A non-numeric MAM_READY_EMPTY_GIVEUP, SKS_EMPTY_GIVEUP, SKS_IDLE_RETRIES,
SKS_IDLE_RETRY_BACKOFF_S, MAM_LOCK_STEAL_RETRIES, MAM_DIFF_MAX_BYTES,
MAM_DIFF_MAX_LINES or RECONCILE_POLL_INTERVAL was a `[` error or a sleep
error at the point of use (PR #43 review claude R3). They now go through
mam_int_knob: decimal, a warning and the default for a bad value. Minimums
are in test_issue26_ints.py INT_KNOBS: 1 for the give-up counts (0 acts as
1), the diff caps (0 truncates every diff) and the poll interval (0 is a
busy loop); 0 for the retry counts (one attempt) and the retry backoff.
SKS_QUIESCENT_INTERVAL stays raw: its default is 0.5 s and sleep's
fraction is its meaning; NOT_ARITHMETIC says so.
loop_lock.sh and diff_collect.sh also run without lib.sh (the Python runner
and the tests source them alone), so mam_int / mam_int_knob move verbatim
to lib_int.sh, which lib.sh sources and those two source when the function
is missing. remove.sh's no-manifest fallback list names the new file
(install copies every file under .agents/skills). test_issue21_loop_b l15,
which builds a control root holding only diff_collect.sh, copies it too.
Tests: the table guard now reads every shell file; scripts sourced alone
read their knobs as decimal; _pane_quiescent with SKS_EMPTY_GIVEUP=abc
gives up with a warning and no `[` error (14 of the new cases fail at
0051fd6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCGpJXhSZasJLU38ksDghe
🚀 Multi-Agent Mux (MAM) Deployment & Gitea Integration
This directory contains packaging templates and installation scripts to deploy the Multi-Agent Mux framework into workspaces hosted on Gitea (or GitHub).
📁 Deployment Directory Structure
install.sh: A self-contained, idempotent remote shell installer (via curl) that checks system requirements (herdr,python3), sets up a local python virtual environment (.venv), and performs 3-way refresh with key-level registry merge (Rev.2).install_mam.sh: A local-clone installer that copies rules/skills (.agents/),AGENTS.md, manifests, and asset hashes into target projects.lib_ownership.sh: Single source of truth for framework-owned files and key-level registry files.update.sh: In-place updater script installed into target.mam_deploy/update.sh.remove.sh: Clean uninstaller script installed into target.mam_deploy/remove.sh.generate-env.sh: Environment configuration bootstrap helper.INSTALL.md: Detailed installation and quick-start user manual.plugin.json: Metadata declaration file to register MAM as an installable plugin for AI Agent coding platforms.gitea-ci.yml: CI/CD pipeline definition template for Gitea Actions (running ShellCheck linting, Python syntax checks, and pytest suite).
📦 How to Install and Deploy
1. Simple One-Liner Installation (from Gitea repository)
Once you push this repository to your Gitea instance, users can install it in their local workspace directory by running:
curl -fsSL https://git.godopu.com/tmpl/multi-agent-mux/raw/branch/main/deploy/install.sh | bash
Alternatively, if they have cloned the repository, they can execute:
bash deploy/install.sh
2. Local-Clone Installation
If you already have cloned this repository locally, you can port MAM to other local target projects:
bash deploy/install_mam.sh --target /path/to/your/project
Refer to INSTALL.md inside this directory for the full instructions and workflows.
Note
install_mam.shautomatically deploys.mam_deploy/update.shand.mam_deploy/remove.shinto target workspaces, recording install manifests and asset hashes to enable clean updates and uninstalls.
3. Custom Fork / Private Mirror Installations
If you run a private mirror or fork, you can override the source URLs during installation using environment variables:
# Installing from a custom mirror (pipe prepends must be applied to the bash command)
curl -fsSL https://my-mirror.example.com/.../install.sh \
| MAM_REPO_URL=https://my-mirror.example.com/me/multi-agent-mux.git \
MAM_ARCHIVE_URL=https://my-mirror.example.com/me/multi-agent-mux/archive/main.tar.gz \
bash
# Updating an existing workspace against a mirror
MAM_INSTALLER_URL=https://my-mirror.example.com/.../install.sh bash deploy/update.sh
4. Registering as a Workspace Plugin
To register these skills globally or for a specific workspace:
- Workspace Level: Copy the
.agents/folder into your project root. - Global Level (Gemini/Antigravity): Register the plugin path in your global config file at
~/.gemini/config/skills.json:{ "entries": [ { "path": "/absolute/path/to/multi-agent-mux/.agents/skills" } ] }
5. Private NATS Broker & Submodule Integration (nats-docker)
For production deployments and private networks, MAM utilizes a dedicated NATS broker (nats:2.12-alpine with MQTT 3.1.1 and JetStream enabled). The container assets and deployment guides are managed in the nats-docker submodule:
# When cloning the repository with internal credentials:
git clone --recurse-submodules https://git.godopu.com/tmpl/multi-agent-mux.git
# Or initialize submodules in an existing clone:
git submodule update --init --recursive
Note
nats-dockeris an optional submodule hosted in the private repositorylaa/nats-docker. If cloning without internal credentials, omit--recurse-submodules. The MAM framework functions out-of-the-box using standard MQTT brokers configured in.mam.env.
Refer to nats-docker/PRIVATE_SERVER.md and MESSAGING.md for detailed configuration, .mam.env generation, and security guidelines.
🤖 Gitea Actions CI/CD Setup
To automate testing and script linting on your Gitea repository:
- Ensure Gitea Actions is enabled on your Gitea instance.
- Copy the Gitea CI workflow to your workspace's workflow folder:
mkdir -p .gitea/workflows cp deploy/gitea-ci.yml .gitea/workflows/ci.yml - Commit and push to your Gitea repository. The pipeline will validate shell syntax and python file compilation on every push to
mainand pull requests.