feat: add Multica runtime adapter#73
Merged
Merged
Conversation
Introduce a mnemon-harness multica surface backed by the local Multica CLI. The first slice probes local readiness, imports Multica issues as Mnemon teamwork signals, and projects Mnemon updates back to issue comments without changing the core event model. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-harness; make harness-build; live probe against Multica v0.3.31 desktop profile.
Add a codex-family app-server probe command for Multica runtime integration. It records argv/env/stdin JSON-RPC frames with secret redaction and responds to the minimal initialize, thread/start, thread/name/set, and turn/start flow used by Multica's codex backend. Validation: go test ./harness/cmd/mnemon-multica-runtime-probe ./harness/internal/driver ./harness/cmd/mnemon-harness. Live probe against Multica v0.3.31 confirmed custom codex profile registration, command invocation as 'app-server --listen stdio://', task-scoped MULTICA_* env injection, and completed run message delivery.
Add structured Multica CLI wrappers for runtime profiles, runtimes, agents, issue creation, assignment, status, metadata, runs, and run messages. The wrappers keep long issue descriptions on stdin and preserve explicit profile/workspace scoping for later provisioning and acceptance flows. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-multica-runtime-probe. Live check confirmed the temporary probe runtime profile was cleaned up and default Multica runtimes remain online.
Add a Multica participant registry and a mnemon-harness multica provision command. Provisioning creates or reuses a codex-family runtime profile, resolves an online runtime, creates/restores/updates the five default Mnemon participant agents, and writes the local Multica registry for later runtime and projection use. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-multica-runtime-probe. Live probe verified the authenticated Multica daemon remains ready with default runtimes after temporary probe cleanup.
Add a codex-family Multica runtime shim that resolves assigned issues, maps Multica agents to Mnemon principals, and ingests observed teamwork signals without mixing runtime IDs into narrative payloads. Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-multica-runtime-probe
Provision now writes explicit Multica agent custom_env for the Mnemon runtime registry, workspace, CLI, and optional local mnemond control settings using the audited agent env command over stdin. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-multica-runtime
After a Multica runtime task is admitted into Mnemon, append a stable Mnemon update comment back to the source issue so the product surface reflects runtime progress without changing canonical teamwork state. Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/internal/driver ./harness/cmd/mnemon-harness
The Multica runtime can now render local Mnemon wake candidates and drive the addressed managed agent with the sentinel-only wake query when MNEMON_MANAGED_RUNTIME is explicitly configured. Projection comments include the managed wake status. Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemond ./harness/cmd/mnemon-acceptance
Add a test-only Multica runtime prod-sim command that starts from a real Multica issue assignment, waits for runtime run evidence, and verifies Mnemon ingest and optional managed wake signals from run messages. Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/internal/driver ./harness/cmd/mnemon-harness ./harness/cmd/mnemond ./harness/cmd/mnemon-acceptance
Handle Multica's wrapped agent custom_env payload, let provisioning inject managed runtime settings, and select managed wake candidates that match the current Multica issue instead of stale rendered events. Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/cmd/mnemon-harness ./harness/internal/driver ./harness/cmd/mnemond ./harness/cmd/mnemon-acceptance; live Multica prod-sim passed with real Codex app-server managed wake at /tmp/mnemon-multica-live/acceptance-codex-wake-2/acceptance-report.json
Add Multica hub metadata, assignment fingerprint, and file ledger helpers alongside CLI support for issue children and metadata access. These primitives give the runtime a deterministic way to identify assignment child-issue mailboxes and avoid duplicate projections. Validation: go test ./harness/internal/driver
Teach the Multica runtime to initialize root session issues for hub mode and to correlate assignment child-issue mailboxes without importing them as new teamwork signals. Assignment dispatch now wakes the local managed agent through rendered Mnemon context while keeping the raw query as [mnemon:wake]. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-multica-runtime
Add the Multica hub writer path that pulls structured mnemond assignment/progress views, creates assignment child-issue mailboxes with correlation metadata, and records hub ledger entries to avoid duplicate projections. Provisioned Multica participants now explicitly run with MNEMON_HUB_BACKEND=multica. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-multica-runtime ./harness/cmd/mnemon-harness
Extend the Multica prod-sim acceptance command with an optional hub-flow gate that verifies a five-participant registry, root session metadata, assignment child issue mailboxes, child runtime correlation messages, and distinct Multica agent run evidence. Validation: go test ./harness/internal/driver ./harness/cmd/mnemon-multica-runtime ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-acceptance
Avoid expanding an empty token argument array in the standard remind hook when trusted local access is used. Add an execution-level hook test that verifies a managed wake can render teamwork.events without a token file.\n\nValidation: go test ./...
Make generated local env files provide defaults instead of overriding an explicit runtime environment. This lets mnemond-managed agents share a workspace while still preserving the per-agent principal passed by the managed runtime.\n\nValidation: go test ./...
Allow Multica provision to pass an explicit mnemon-harness executable to participant agents. This keeps managed wake hooks on the same build as the registered runtime during local validation and packaged deployments.\n\nValidation: go test ./...
Project Mnemon runtime progress into Multica agent run messages while keeping protocol JSON internal. Assignment mailbox projection now creates the child issue, writes mailbox metadata, and only then assigns the target agent to avoid child issues being misclassified as new sessions.\n\nValidation: go test ./...
Emit Codex-style runtime item lifecycle events, decouple managed wake duration from subsequent Multica projection calls, and project rule-based issue status transitions from Mnemon hub events. Assignment feedback now moves child issues and the root issue through Multica-visible states without using LLM judgment.\n\nValidation: go test ./...
Emit Mnemon runtime progress as Codex-like commentary messages and commandExecution items so Multica can show incremental text, tool_use, and tool_result rows while a run is still active. Keep only the terminal summary as final_answer. Tests cover commandExecution projection, commentary/final phase separation, multiple message items, and deterministic env override behavior. Validated with go test ./... and a live Multica TEA-20 smoke run that produced 18 run messages across text/tool_use/tool_result.
Project Multica hub artifacts from assignment mailbox turns, dispatch child mailboxes during root managed wakes, and reduce child assignment latency by separating dispatch metadata from supplemental metadata. Expand Multica acceptance visibility around run messages, comments, and final statuses. Validation: go test -count=1 ./...; live TEA-36 confirmed child runs started before the root run completed.
Expose Multica runtime diagnostics through mnemon-multica-runtime probe/diagnose mode instead of a second runtime command. This keeps one product runtime identity while preserving the protocol/env recorder for debugging. Validation: go test -count=1 ./...
Forward sanitized native Codex app-server item streams from mnemond-managed wake turns into the Multica runtime detail stream while keeping the wake query as the minimal [mnemon:wake] sentinel and avoiding Mnemon protocol event writes for trace data. Validation: go test -count=1 ./harness/internal/driver ./harness/internal/codexapp ./harness/cmd/mnemon-multica-runtime; go test -count=1 ./...; real Multica TEA-45 completed with managed Codex text/tool activity visible in run messages, governed.db trace marker count 0.
Introduce a single-agent Multica participant registration path that adopts an existing UI-created agent by id or name, writes the Mnemon registry mapping, and injects the participant runtime environment. The old provision helper is hidden from the public Multica command surface and now composes the same registration primitive for its five-role test setup. Validation: go test -count=1 ./...; go run ./harness/cmd/mnemon-harness multica participant register --help; go run ./harness/cmd/mnemon-harness multica --help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation