@mono-agent/agent-app 0.11.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +24 -13
  2. package/dist/background.d.ts +2 -0
  3. package/dist/background.d.ts.map +1 -1
  4. package/dist/background.js +2 -2
  5. package/dist/background.js.map +1 -1
  6. package/dist/channel-drivers/live.d.ts +1 -1
  7. package/dist/channel-drivers/live.js +1 -1
  8. package/dist/channel-drivers/tui.d.ts.map +1 -1
  9. package/dist/channel-drivers/tui.js +24 -0
  10. package/dist/channel-drivers/tui.js.map +1 -1
  11. package/dist/cli-args.d.ts +10 -8
  12. package/dist/cli-args.d.ts.map +1 -1
  13. package/dist/cli-args.js +21 -6
  14. package/dist/cli-args.js.map +1 -1
  15. package/dist/cli-commands.d.ts +2 -0
  16. package/dist/cli-commands.d.ts.map +1 -1
  17. package/dist/cli-commands.js +26 -4
  18. package/dist/cli-commands.js.map +1 -1
  19. package/dist/cli-help.d.ts.map +1 -1
  20. package/dist/cli-help.js +17 -12
  21. package/dist/cli-help.js.map +1 -1
  22. package/dist/config-reference.d.ts +1 -1
  23. package/dist/config-reference.d.ts.map +1 -1
  24. package/dist/config-reference.js +62 -0
  25. package/dist/config-reference.js.map +1 -1
  26. package/dist/configured-agent.js +3 -1
  27. package/dist/configured-agent.js.map +1 -1
  28. package/dist/doctor.js +3 -2
  29. package/dist/doctor.js.map +1 -1
  30. package/dist/launchd.d.ts +16 -0
  31. package/dist/launchd.d.ts.map +1 -1
  32. package/dist/launchd.js +67 -0
  33. package/dist/launchd.js.map +1 -1
  34. package/dist/local-configuration.d.ts +2 -2
  35. package/dist/local-configuration.d.ts.map +1 -1
  36. package/dist/local-configuration.js +10 -10
  37. package/dist/local-configuration.js.map +1 -1
  38. package/dist/modules/known-tools.d.ts +2 -2
  39. package/dist/modules/known-tools.d.ts.map +1 -1
  40. package/dist/modules/known-tools.js +2 -1
  41. package/dist/modules/known-tools.js.map +1 -1
  42. package/dist/notify-runtime.d.ts +26 -0
  43. package/dist/notify-runtime.d.ts.map +1 -0
  44. package/dist/notify-runtime.js +27 -0
  45. package/dist/notify-runtime.js.map +1 -0
  46. package/dist/notify-tool.d.ts +51 -0
  47. package/dist/notify-tool.d.ts.map +1 -0
  48. package/dist/notify-tool.js +182 -0
  49. package/dist/notify-tool.js.map +1 -0
  50. package/dist/project-skills.d.ts +1 -1
  51. package/dist/project-skills.d.ts.map +1 -1
  52. package/dist/project-skills.js +9 -7
  53. package/dist/project-skills.js.map +1 -1
  54. package/dist/recipes/base.d.ts +15 -0
  55. package/dist/recipes/base.d.ts.map +1 -0
  56. package/dist/recipes/base.js +51 -0
  57. package/dist/recipes/base.js.map +1 -0
  58. package/dist/recipes/catalog.d.ts +4 -0
  59. package/dist/recipes/catalog.d.ts.map +1 -0
  60. package/dist/recipes/catalog.js +525 -0
  61. package/dist/recipes/catalog.js.map +1 -0
  62. package/dist/recipes/index.d.ts +11 -0
  63. package/dist/recipes/index.d.ts.map +1 -0
  64. package/dist/recipes/index.js +14 -0
  65. package/dist/recipes/index.js.map +1 -0
  66. package/dist/recipes/types.d.ts +70 -0
  67. package/dist/recipes/types.d.ts.map +1 -0
  68. package/dist/recipes/types.js +15 -0
  69. package/dist/recipes/types.js.map +1 -0
  70. package/dist/request-model-override.d.ts +3 -2
  71. package/dist/request-model-override.d.ts.map +1 -1
  72. package/dist/request-model-override.js +9 -7
  73. package/dist/request-model-override.js.map +1 -1
  74. package/dist/sessions-command.d.ts +53 -0
  75. package/dist/sessions-command.d.ts.map +1 -0
  76. package/dist/sessions-command.js +309 -0
  77. package/dist/sessions-command.js.map +1 -0
  78. package/dist/setup.d.ts +29 -0
  79. package/dist/setup.d.ts.map +1 -0
  80. package/dist/setup.js +97 -0
  81. package/dist/setup.js.map +1 -0
  82. package/dist/tui-command.d.ts +1 -1
  83. package/dist/tui-command.d.ts.map +1 -1
  84. package/dist/tui-command.js +4 -4
  85. package/dist/tui-command.js.map +1 -1
  86. package/dist/web-command.d.ts +109 -43
  87. package/dist/web-command.d.ts.map +1 -1
  88. package/dist/web-command.js +1108 -237
  89. package/dist/web-command.js.map +1 -1
  90. package/dist/wizard/prompts.d.ts.map +1 -1
  91. package/dist/wizard/prompts.js +2 -1
  92. package/dist/wizard/prompts.js.map +1 -1
  93. package/dist/wizard/run.d.ts.map +1 -1
  94. package/dist/wizard/run.js +9 -9
  95. package/dist/wizard/run.js.map +1 -1
  96. package/package.json +16 -15
  97. package/schema/mono-agent.config.schema.json +68 -0
  98. package/skills/mono-agent-composer/SKILL.md +1 -1
  99. package/skills/mono-agent-composer/references/config-blueprint.md +21 -7
  100. package/skills/mono-agent-composer/references/discovery-questions.md +2 -0
  101. package/skills/mono-agent-composer/references/feature-coverage.md +7 -6
  102. package/skills/mono-agent-composer/references/package-map.md +5 -4
  103. package/skills/mono-agent-composer/references/playbooks.md +7 -7
  104. package/skills/mono-agent-composer/references/validation.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-agent/agent-app",
3
- "version": "0.11.4",
3
+ "version": "0.12.0",
4
4
  "description": "Config-first mono-agent host: builds a responder and starts every configured communication channel and traceability from one mono-agent.config.json.",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0-only",
@@ -37,20 +37,21 @@
37
37
  "@clack/prompts": "^1.7.0",
38
38
  "@earendil-works/pi-ai": "0.80.6",
39
39
  "@modelcontextprotocol/sdk": "^1.29.0",
40
- "@mono-agent/agent-contracts": "0.11.4",
41
- "@mono-agent/agent-harness": "0.11.4",
42
- "@mono-agent/config": "0.11.4",
43
- "@mono-agent/cron-adapter": "0.11.4",
44
- "@mono-agent/operator-adapter": "0.11.4",
45
- "@mono-agent/memory": "0.11.4",
46
- "@mono-agent/observability": "0.11.4",
47
- "@mono-agent/openai-api-adapter": "0.11.4",
48
- "@mono-agent/runtime-adapter": "0.11.4",
49
- "@mono-agent/session-web": "0.11.4",
50
- "@mono-agent/slack-adapter": "0.11.4",
51
- "@mono-agent/telegram-adapter": "0.11.4",
52
- "@mono-agent/tui": "0.11.4",
53
- "@mono-agent/webhook-adapter": "0.11.4",
40
+ "@mono-agent/agent-contracts": "0.12.0",
41
+ "@mono-agent/agent-harness": "0.12.0",
42
+ "@mono-agent/config": "0.12.0",
43
+ "@mono-agent/cron-adapter": "0.12.0",
44
+ "@mono-agent/operator-adapter": "0.12.0",
45
+ "@mono-agent/memory": "0.12.0",
46
+ "@mono-agent/observability": "0.12.0",
47
+ "@mono-agent/openai-api-adapter": "0.12.0",
48
+ "@mono-agent/runtime-adapter": "0.12.0",
49
+ "@mono-agent/session-web": "0.12.0",
50
+ "@mono-agent/slack-adapter": "0.12.0",
51
+ "@mono-agent/telegram-adapter": "0.12.0",
52
+ "@mono-agent/tui": "0.12.0",
53
+ "@mono-agent/web": "0.12.0",
54
+ "@mono-agent/webhook-adapter": "0.12.0",
54
55
  "undici": "8.7.0",
55
56
  "zod": "^4.4.3"
56
57
  },
@@ -145,6 +145,74 @@
145
145
  ],
146
146
  "type": "integer"
147
147
  },
148
+ "compaction": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "enabled": {
153
+ "description": "Enables adaptive proactive compaction and one-shot reactive overflow recovery.",
154
+ "examples": [
155
+ true
156
+ ],
157
+ "type": "boolean",
158
+ "default": true
159
+ },
160
+ "triggerRatio": {
161
+ "description": "Fraction of the effective model context window used for the proactive trigger, additionally capped by adaptive safety headroom.",
162
+ "examples": [
163
+ 0.7
164
+ ],
165
+ "type": "number",
166
+ "default": 0.7,
167
+ "minimum": 0.2,
168
+ "maximum": 0.95
169
+ },
170
+ "keepRecentTokens": {
171
+ "description": "Explicit recent-context retention override; omitted derives 10% of the effective context window, clamped to 4,000-20,000 tokens.",
172
+ "examples": [
173
+ 12800
174
+ ],
175
+ "type": "integer",
176
+ "minimum": 4000,
177
+ "maximum": 200000
178
+ },
179
+ "summaryMaxTokens": {
180
+ "description": "Explicit combined summary-output budget override; omitted derives 4% of the effective context window, clamped to 2,000-12,000 tokens.",
181
+ "examples": [
182
+ 5120
183
+ ],
184
+ "type": "integer",
185
+ "minimum": 1000,
186
+ "maximum": 64000
187
+ },
188
+ "minSavingsTokens": {
189
+ "description": "Minimum verified token reduction required for proactive compaction; omitted derives 10% of the effective window, clamped to 4,000-20,000. Reactive recovery accepts any positive reduction.",
190
+ "examples": [
191
+ 12800
192
+ ],
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "maximum": 500000
196
+ },
197
+ "fixedOverheadEnabled": {
198
+ "description": "Includes system instructions, tool schemas, and the current user turn in proactive request-size estimates.",
199
+ "examples": [
200
+ true
201
+ ],
202
+ "type": "boolean",
203
+ "default": true
204
+ },
205
+ "contextWindowOverride": {
206
+ "description": "Persistent correction for inaccurate provider context-window metadata; learned overflow ceilings may lower it process-locally.",
207
+ "examples": [
208
+ 128000
209
+ ],
210
+ "type": "integer",
211
+ "minimum": 32000,
212
+ "maximum": 10000000
213
+ }
214
+ }
215
+ },
148
216
  "workspace": {
149
217
  "description": "Configures workspace for the runtime section.",
150
218
  "examples": [
@@ -82,7 +82,7 @@ Everything below runs in the user's agent folder, not the workspace.
82
82
  mono-agent start
83
83
  ```
84
84
 
85
- Then run the acceptance smoke test matching the chosen channel (see `references/validation.md`). To change anything, edit `mono-agent.config.json` or `IDENTITY.md` directly and run `mono-agent restart`; there is no live browser re-apply. On macOS, `mono-agent tui --configure` can open a temporary proposal-only configuration conversation against the already-running background agent. It is separate from ordinary chat, never accepts secrets, requires an out-of-band approval, and restarts or rolls back through the managed lifecycle. Off macOS, use manual edits plus `validate`, foreground `start`, and ordinary `tui`; conversational configuration is unavailable.
85
+ Then run the acceptance smoke test matching the chosen channel (see `references/validation.md`). To change anything, edit `mono-agent.config.json` or `IDENTITY.md` directly and run `mono-agent restart`; there is no live browser re-apply. On macOS, `mono-agent tui --configure` opens a persistent, visibly marked proposal-only SELF-CONFIG conversation against the already-running background agent. It maps the available capabilities, helps build a workflow conversationally, never accepts secrets, requires an out-of-band approval, and restarts or rolls back through the managed lifecycle. Approval, rejection, and no-change turns continue SELF-CONFIG; only quitting exits. Off macOS, use manual edits plus `validate`, foreground `start`, and ordinary `tui`; conversational configuration is unavailable.
86
86
 
87
87
  ## When Config Is Not Enough
88
88
 
@@ -51,6 +51,16 @@ new agent.
51
51
  // Ranking above max only prevents keyword downgrade.
52
52
  "permissionMode": "default", // default|plan|acceptEdits|bypassPermissions (CLI backends)
53
53
  "maxTurns": 0, // 0 or omitted means unlimited; 1-100 caps turns
54
+ "compaction": {
55
+ "enabled": true, // default true
56
+ "triggerRatio": 0.70, // default 0.70; adaptive safety headroom also applies
57
+ // Omit these three to derive model-window-aware defaults.
58
+ "keepRecentTokens": 12800,
59
+ "summaryMaxTokens": 5120,
60
+ "minSavingsTokens": 12800,
61
+ "fixedOverheadEnabled": true, // include system prompt, tool schemas, and current turn
62
+ "contextWindowOverride": 128000 // optional persistent correction for bad provider metadata
63
+ },
54
64
  "workspace": ".",
55
65
  "session": { "mode": "continuous", "idleTimeoutMs": 1800000 } // or "per-message"
56
66
  },
@@ -145,6 +155,9 @@ new agent.
145
155
  "mcpConfigPath": "./mcp.json" // stdio/sse/http servers; inlined for SDK runtimes
146
156
  },
147
157
 
158
+ // NodeRepl shares state only inside one run and uses the same sandbox policy
159
+ // as Bash.
160
+
148
161
  // Human-in-the-loop bridge: blocking AskUser / TelegramAskButtons plus
149
162
  // run-scoped project-MCP progress. It auto-starts when either ask tool is
150
163
  // allowed, this block or an interaction env override is configured, or
@@ -212,7 +225,7 @@ new agent.
212
225
  },
213
226
 
214
227
  "live": {
215
- "enabled": true, // default-on read-only SSE relay for mono-agent web
228
+ "enabled": true, // default-on read-only SSE relay for mono-agent sessions
216
229
  "host": "127.0.0.1",
217
230
  "port": 0,
218
231
  "basePath": "/live",
@@ -257,11 +270,12 @@ new agent.
257
270
  "modelId": "my-agent" // model id advertised to API clients
258
271
  },
259
272
 
260
- // Telegram & Slack deliver only the FINAL answer by default (no streamed
261
- // interim edits) while showing a working indicator Telegram a "typing…"
262
- // action, Slack a 👀 "seen" reaction. This is built-in behavior (not a JSON
263
- // field); restoring live interim streaming needs a custom channel driver with
264
- // stream.finalOnly=false. The OpenAI-compatible endpoint still streams tokens.
273
+ // Telegram & Slack do not stream ANSWER tokens by default. They first show a
274
+ // working indicator; inbound tool starts then edit one temporary, redacted
275
+ // activity ledger that the final answer replaces. Proactive turns suppress
276
+ // the ledger. This is built-in behavior (not a JSON field); a custom channel
277
+ // driver can set stream.showHints=false or stream.finalOnly=false. The
278
+ // OpenAI-compatible endpoint still streams tokens.
265
279
  "telegram": {
266
280
  "enabled": true, // opt-in; defaults to false (off → "disabled")
267
281
  // Put MONO_AGENT_TELEGRAM_BOT_TOKEN in .env; do not inline botToken here.
@@ -394,7 +408,7 @@ A `.env` file in the folder is loaded automatically (exported shell variables wi
394
408
 
395
409
  For BuJo capture and the effective `bujo` tier that runs scheduled consolidation, configure `memory.llm`. Use `provider: "ollama"` with a local Ollama chat model string and optional `endpoint`, or `provider: "agent-host"` with `model` as a normal SDK runtime model reference such as `pi:openai-codex:gpt-5.5` and `executionMode: "sdk"`. `endpoint` is Ollama-only, and CLI-backed refs such as `codex:gpt-5.5` are rejected for memory LLMs until runtimes can enforce no external actions. The same values can be supplied via `MONO_AGENT_MEMORY_LLM_PROVIDER`, `MONO_AGENT_MEMORY_LLM_MODEL`, `MONO_AGENT_MEMORY_LLM_EXECUTION_MODE`, and `MONO_AGENT_MEMORY_LLM_ENDPOINT`. The standalone `memory-bujo migrate` command remains Ollama-only; other maintenance commands use the configured embeddings provider. `agent-host` LLM capture is an in-app composition path that injects the `LlmComplete` implementation into the BuJo store.
396
410
 
397
- For operator views, run `mono-agent tui` or `mono-agent web` from any directory once the agent is started. Both discover running agents via the trace-source registry. The TUI chats over the default-on `tui` stream endpoint (`"tui": {"enabled": false}` opts out); on macOS, `mono-agent tui --configure` opens a separate temporary proposal-only conversation against the managed background agent and must not be combined with `--local`. The web PWA reads artifacts and live updates from the default-on `live` relay (`"live": {"enabled": false}` opts out). Web history/live views show agent runs by default; add `mono-agent web --include-memory` to inspect memory-maintenance runs. Both bind loopback by default. The low-level `mono-agent-tui` bin also supports `--responder <file>` (embedded, an ESM module default-exporting an `AgentResponderLike` or exporting `createResponder(env, cwd, configJson)`) and `--url <baseUrl>` (direct connect).
411
+ For operator views, run `mono-agent tui`, `mono-agent web`, or `mono-agent sessions` from any directory once the agent is started. All discover running agents via the trace-source registry. The TUI and assistant-ui web console chat over the default-on `tui` stream endpoint (`"tui": {"enabled": false}` opts out); on macOS, `mono-agent tui --configure` opens a persistent, visibly marked proposal-only SELF-CONFIG conversation against the managed background agent and must not be combined with `--local`. Approval, rejection, and no-change turns continue that session; only quitting exits it. `mono-agent web` is an always-on service namespace, binds `0.0.0.0:5050` by default, and has no app login; use `--loopback` to narrow it. The legacy Session Recorder reads artifacts and live updates from the default-on `live` relay (`"live": {"enabled": false}` opts out); run `mono-agent sessions --include-memory` to inspect memory-maintenance runs. The low-level `mono-agent-tui` bin also supports `--responder <file>` (embedded, an ESM module default-exporting an `AgentResponderLike` or exporting `createResponder(env, cwd, configJson)`) and `--url <baseUrl>` (direct connect).
398
412
 
399
413
  ## Programmatic Escape Hatch
400
414
 
@@ -79,6 +79,8 @@ Plus, independently: MCP servers from an mcp.json config file?
79
79
 
80
80
  Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins, even under allow-all), `tools.mcpConfigPath`. The default is allow-all (`["*"]`) — write that unless the user asks to narrow. Under allow-all the adapter-derived send tools (`SlackSendMessage` / `TelegramSendMessage` / …) are auto-available once the channel is enabled; only a **specific** allowlist needs their exact names added. Valid enabled Slack/Telegram adapter config and destination allowlists are required either way. On the pi-native runtime `disallowedTools` does not filter external MCP-server tools — to withhold one, don't declare its server.
81
81
 
82
+ Offer the `NodeRepl` built-in when the user wants run-scoped JavaScript evaluation. It executes with the same sandbox authority as `Bash`.
83
+
82
84
  ## 6. Memory Strategy
83
85
 
84
86
  Question:
@@ -17,7 +17,7 @@ Every framework capability and how a composed agent reaches it. This table is th
17
17
  | Pi OAuth credentials | config | `providers.piAuthPath` | `runtime.pi-credentials` |
18
18
  | Pi-native transport, retry, and durable provider-session tuning | config | `providers.piNative.{transport,piMaxRetries,maxRetryDelayMs,piSessionsRoot}` | `runtime.pi-native-tuning` |
19
19
  | Tool-output bloat guard, cost tracking | auto | built into every run | — |
20
- | Context handling / auto-compaction | provider + auto | delegated to the provider; the pi bridge drives `AgentHarness.compact()` (proactive before a near-window turn + reactive recovery on overflow). Runs report `context_compaction_applied: true` / `false` / `null` | |
20
+ | Context handling / auto-compaction | config + provider | `runtime.compaction.*` (matching `MONO_AGENT_COMPACTION_*`) controls adaptive Pi compaction. Omitted budgets derive from the active model window; reactive recovery re-prompts exactly once only after a verified reduction, and persistent `context_limit` advances to a configured fallback | `runtime.context-compaction` |
21
21
  | Structured output (JSON schema), live input steering | code | harness `runtimeOptions` | — |
22
22
  | Tool approval gates (risk tiers, timeouts, always-allow) | code | `createMonoRuntime({ onToolApprovalRequest, ... })` — needs a host UI | — |
23
23
  | Fully custom runtime | code | `startMonoAgentApp({ runtime })` | — |
@@ -49,7 +49,7 @@ Every framework capability and how a composed agent reaches it. This table is th
49
49
  | Capability | Coverage | Where | Registry config ids |
50
50
  | --- | --- | --- | --- |
51
51
  | Allow-all tool policy (omitted / `["*"]` = all tools; `[]` = none) | config | default `tools.allowedTools`; the harness no-policy safety net is `failClosedToolPolicy()` | `tool-policy.allow-all` |
52
- | Built-in tool allow/deny lists (deny wins, even under allow-all; pi doesn't deny external MCP tools) | config | `tools.allowedTools`, `tools.disallowedTools`; built-ins are Read/Write/Edit/Glob/Grep/Bash/WebFetch/WebSearch | `tool-policy.allowlist`, `tool-policy.denylist`, `runtime.builtin-tools` |
52
+ | Built-in tool allow/deny lists (deny wins, even under allow-all; pi doesn't deny external MCP tools) | config | `tools.allowedTools`, `tools.disallowedTools`; managed built-ins are Read/Write/Edit/Glob/Grep/Bash/NodeRepl/WebFetch/WebSearch | `tool-policy.allowlist`, `tool-policy.denylist`, `runtime.builtin-tools` |
53
53
  | MCP servers (stdio/sse/http) from a JSON file | config | `tools.mcpConfigPath` | `tool-policy.mcp-servers` |
54
54
  | Durable origin-bound continuations for trusted stdio/loopback-HTTP MCP services | config + auto | `tools.continuationServers` + `continuations.*`; interactive claims pin a bounded immutable origin snapshot before commit, exact rollover buckets are preserved, v3 state is restart-safe, and unavailable/legacy snapshots use a fixed zero-model fallback | `agent-app.durable-continuations` |
55
55
  | Adapter-derived send tools for enabled Slack/Telegram adapters | config | auto-available under allow-all once the channel is enabled; a **specific** `tools.allowedTools` must include `SlackSendMessage` / `TelegramSendMessage`; valid `slack.*` / `telegram.*` config and existing adapter allowlists provide credentials and destination bounds; confirmed message posts are idempotently recorded in destination history | `agent-app.adapter-send-tools` |
@@ -74,7 +74,7 @@ Every framework capability and how a composed agent reaches it. This table is th
74
74
  | Slack App Home actions | config | `slack.homeTab: {enabled?, headerText?, buttons?:[{actionId, label, prompt, channelId?, ackText?, threadReply?}]}`; `enabled` defaults to `false`, `buttons` defaults to `[]`; JSON-only | `slack.app-home` |
75
75
  | External channel plugins | config | `channels.plugins[]: { package, id?, label?, config? }`; package must export `createChannelDriver(options)` or a default driver factory | `channel.plugins` |
76
76
  | WhatsApp (Baileys, QR login, group mention/any triggers) | config | `channels.plugins[].package: "@mono-agent/whatsapp-adapter"` plus plugin `config.{enabled,allowedChatJids,allowAllChats,groupMode,botJids,mentionTextAliases,stripMentionText}` | `whatsapp.baileys` |
77
- | A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer, opt-in durable dispatch identity) | config | `channels.plugins[].package: "@mono-agent/a2a-adapter"` plus plugin `config.provider` (including `idempotency.{namespace,stateDir,retentionMs,maxRecords}`), `config.agent`, `config.skill`; `config.enabled` is canonical | `a2a.provider` |
77
+ | A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer, configurable request-body limit, opt-in durable dispatch identity) | config | `channels.plugins[].package: "@mono-agent/a2a-adapter"` plus plugin `config.provider` (including `maxRequestBytes` and `idempotency.{namespace,stateDir,retentionMs,maxRecords}`), `config.agent`, `config.skill`; `config.enabled` is canonical | `a2a.provider` |
78
78
  | A2A consumer settings (remote agent URLs, timeouts) and calls | config + code | same A2A plugin entry's `config.consumer`; calls via `sendA2AMessage({ idempotencyKey })` or `createA2AConsumerResponder({ idempotencyKeyForRequest })` | `a2a.consumer` |
79
79
  | TUI stream endpoint (operator console transport) | config | `tui.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback | `tui.stream-endpoint` |
80
80
  | Live event relay (read-only run-event SSE for web) | config | `live.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback | `live.event-relay` |
@@ -93,10 +93,11 @@ Every framework capability and how a composed agent reaches it. This table is th
93
93
  | Trace-source registry (heartbeat manifests `mono-agent status` reads) | config | `traceability.{registryDir,sourceId,sourceLabel,heartbeatMs,staleAfterMs,globalDiscovery}` | `observability.trace-registry` |
94
94
  | Phoenix trace viewer (best-effort terminal-batched OTLP exporter; independent local JSONL has bounded terminal snapshots and can lose RAM-buffered events on crash) | config | `observability.exporters` (phoenix entry) | `observability.phoenix-exporter` |
95
95
  | Operator console (live chat with thinking/tool/telemetry insight, run replay, config view) | cli | `mono-agent tui [--agent <label>]`; agents serve the `tui` stream endpoint by default (`tui.enabled`, loopback) | — |
96
- | Managed proposal-only configuration conversation | cli + tool | macOS `mono-agent tui --configure` attaches to the authoritative background agent; `/configure`; separate configuration/ordinary conversation ids; host-gated `ProposeAgentConfiguration`; approval restarts and waits for readiness, failed start rolls files/agent back. `--local` is ordinary chat only; off macOS configuration is manual | — |
97
- | Session Recorder web PWA (read-only run browser) | cli | `mono-agent web [--host <addr>] [--port <n>] [--no-open] [--allow-non-loopback] [--show-auth-url] [--include-memory] [--max-runs <n>] [--config <path>] [--env-file <path>]`; package `@mono-agent/session-web`; non-loopback/non-interactive auth uses `MONO_AGENT_WEB_AUTH_TOKEN` | — |
96
+ | Always-on multi-agent web console (persistent conversations, attachments, model/effort selection, reasoning/tools, hidden telemetry-backed cumulative context usage, cancellation) | cli | `mono-agent web start\|stop\|restart\|status\|logs\|run`; bare `mono-agent web` is read-only status/help; default `0.0.0.0:5050`, `--loopback` narrows to `127.0.0.1`; package `@mono-agent/web`; no app authentication, so LAN/Tailnet reachability is the access boundary | — |
97
+ | Managed proposal-only SELF-CONFIG conversation | cli + tool | macOS `mono-agent tui --configure` attaches to the authoritative background agent; persistent marker and capability map; stable configuration conversation with a fresh proposal capability after each checkpoint; host-gated `ProposeAgentConfiguration`; approval restarts and waits for readiness, failed start rolls files/agent back; only quitting exits. `--local` is ordinary chat only; off macOS configuration is manual | — |
98
+ | Session Recorder web PWA (read-only run browser) | cli | `mono-agent sessions [--host <addr>] [--port <n>] [--no-open] [--allow-non-loopback] [--show-auth-url] [--include-memory] [--max-runs <n>] [--config <path>] [--env-file <path>]`; default `127.0.0.1:4599`; package `@mono-agent/session-web`; non-loopback/non-interactive auth uses legacy `MONO_AGENT_WEB_AUTH_TOKEN` | — |
98
99
  | Setup presets (saved answer-sets: generate config + `.env.example` + checklist) | cli | `mono-agent presets list\|show <id>`, `mono-agent init --preset <id> --yes` (`recipes`/`--recipe` deprecated aliases removed in v2.0.0) | — |
99
- | Interactive setup wizard (preset/custom; exact `IDENTITY.md` → `## Role` prompt/outcome; walks model→channels→memory→tools→sandbox→observability; Journal/BuJo explicitly choose Ollama or LM Studio service root/model/dimension/optional auth env using typed discovery and a real probe; macOS starts the background agent before temporary configuration) | cli | `mono-agent init` (no flags, on a TTY; `setup` alias); manual embedding entry still requires readiness probe; flags/non-TTY stay scaffold-only; unsupported platforms use manual configuration/foreground start/ordinary TUI | — |
100
+ | Interactive setup wizard (preset/custom; exact `IDENTITY.md` → `## Role` prompt/outcome; walks model→channels→memory→tools→sandbox→observability; Journal/BuJo explicitly choose Ollama or LM Studio service root/model/dimension/optional auth env using typed discovery and a real probe; macOS starts the background agent before persistent SELF-CONFIG) | cli | `mono-agent init` (no flags, on a TTY; `setup` alias); manual embedding entry still requires readiness probe; flags/non-TTY stay scaffold-only; unsupported platforms use manual configuration/foreground start/ordinary TUI | — |
100
101
  | Tools reporting + no-tools guardrail (allow-all → `All tools allowed`; explicit empty `allowedTools: []` → `waiting`; unknown-tool "did you mean"; send-tool/channel cross-checks) | cli | part of `mono-agent validate`/`doctor`; the wizard's tools step | — |
101
102
  | Resolved config view (every field tagged env/json/default) | cli | `mono-agent config` | — |
102
103
  | Scaffold / validate / start / install-skill | cli | `mono-agent init [--model <ref>] [--fallback <ref> [--fallback-effort <provider-default\|level>]]... [--effort <level>] [--auth]\|validate [--consumer <path>]\|config\|presets\|start\|install-skill`; legacy CLI `--fallback-models <csv>` is removed in v2.0.0 | — |
@@ -96,10 +96,10 @@ Communication adapters are edge packages. They accept an `AgentResponder` and ow
96
96
  | Surface | Package | First smoke |
97
97
  | --- | --- | --- |
98
98
  | Telegram | `@mono-agent/telegram-adapter` | Allowed chat sends a message |
99
- | Slack | `@mono-agent/slack-adapter` | Allowed channel or DM gets a streamed reply |
99
+ | Slack | `@mono-agent/slack-adapter` | Allowed channel or DM gets the final reply |
100
100
  | WhatsApp | `@mono-agent/whatsapp-adapter` (external channel plugin) | Allowed sender/group trigger produces a reply |
101
101
  | OpenAI-compatible API | `@mono-agent/openai-api-adapter` | `curl /v1/models` and `/v1/chat/completions` |
102
- | Operator endpoints | `@mono-agent/operator-adapter` | `mono-agent tui` connects; `mono-agent web` observes live runs |
102
+ | Operator endpoints | `@mono-agent/operator-adapter` | `mono-agent tui` and `mono-agent web` connect for chat; `mono-agent sessions` observes live runs |
103
103
  | A2A provider/consumer | `@mono-agent/a2a-adapter` (external channel plugin) | Send text to the Agent Card URL |
104
104
  | Webhook | `@mono-agent/webhook-adapter` | `curl` the configured invocation path (with `Authorization: Bearer ...` when `apiKey` is set) |
105
105
  | Cron | `@mono-agent/cron-adapter` | One scheduled or manually triggered invocation |
@@ -111,8 +111,9 @@ Adapters must not import the harness, runtime adapter, memory package (`@mono-ag
111
111
  Use:
112
112
 
113
113
  - `@mono-agent/tui` for the pi-tui operator console (`mono-agent tui`): live chat with structured stream-event insight, recorded-run replay, and config view. Remote event frames have a strict 256 KiB UTF-8 NDJSON cap: assistant-thought/tool-call payload fields are reduced and remeasured, while another oversized variant or a reducible event whose minimal form still does not fit becomes a bounded `oversized_event` marker. Other frame kinds are unaffected, and replay contains only key-redacted, capped events that reached terminal JSONL persistence.
114
- - `@mono-agent/session-web` for the read-only Session Recorder web PWA served by `mono-agent web`, including local artifact paging and live relay aggregation.
115
- - `@mono-agent/operator-adapter` for the loopback NDJSON stream endpoint the console connects to (`tui` config section, on by default) and the live SSE endpoint `mono-agent web` observes (`live` config section, on by default).
114
+ - `@mono-agent/web` for the assistant-ui always-on browser console (`mono-agent web`): persistent multi-agent conversations, device-local file picking, streamed reasoning/tools, internal telemetry-backed cumulative context usage, cancellation, LAN-default HTTP on port 5050, and conflict-safe optional Tailscale Serve HTTPS. It has no app login; network reachability is the access boundary.
115
+ - `@mono-agent/session-web` for the legacy read-only Session Recorder PWA served by `mono-agent sessions`, including local artifact paging and live relay aggregation on its existing port 4599 surface.
116
+ - `@mono-agent/operator-adapter` for the loopback NDJSON stream endpoint the TUI and web chat console connect to (`tui` config section, on by default) and the live SSE endpoint `mono-agent sessions` observes (`live` config section, on by default).
116
117
  - `@mono-agent/observability` for JSONL event artifacts, summaries, trace-source registration, and the `@mono-agent/observability/otel` Phoenix OTLP exporter configured via `observability.exporters`.
117
118
 
118
119
  Traceability is local-first. A running host registers a source manifest; `mono-agent status` reads the trace-source registry to report live sources, and artifacts are keyed by `(sourceId, runId)` so duplicate run ids do not collide. Phoenix is the recommended trace viewer when an `observability.exporters` (phoenix) entry is configured; its terminal-batched export is best-effort. Independently, the local recorder writes empty events plus a `running` summary at start and a key-redacted, capped snapshot at finish/fail. Events stay in RAM between those boundaries, so a crash can lose them. Without Phoenix, those bounded terminal JSONL snapshots are the only local run record.
@@ -14,7 +14,7 @@ Flow, check whether one of these fits and adapt it. Verify every key against
14
14
  ## 1. Personal Telegram assistant with BuJo memory
15
15
  **For:** an individual wanting a private assistant that remembers.
16
16
  **Goal:** a Telegram bot (long polling) that captures every turn into BuJo memory with scheduled consolidation and recalls past notes semantically.
17
- **Features:** `telegram.long-polling`, `channel.final-only-delivery`, `memory.bujo`, `memory.per-turn-capture`, `memory.bujo-consolidation`, `memory.recall-tool`, `memory.embeddings`.
17
+ **Features:** `telegram.long-polling`, `channel.final-only-delivery`, `channel.transient-tool-activity`, `memory.bujo`, `memory.per-turn-capture`, `memory.bujo-consolidation`, `memory.recall-tool`, `memory.embeddings`.
18
18
 
19
19
  Put `MONO_AGENT_TELEGRAM_BOT_TOKEN=...` in `.env`; the source config omits the credential.
20
20
 
@@ -31,12 +31,12 @@ Put `MONO_AGENT_TELEGRAM_BOT_TOKEN=...` in `.env`; the source config omits the c
31
31
  }
32
32
  ```
33
33
  **Steps:** `ollama pull nomic-embed-text:v1.5 && ollama pull qwen3.6:latest` → `mono-agent init --model claude:claude-sonnet-4-6 --memory bujo` → add telegram + fill embeddings/llm + `writeMode: capture` → `mono-agent validate` (confirm memory liveness + consolidation cadence) → `mono-agent start`.
34
- **Smoke:** send a fact from the allowed chat, then ask a paraphrased question later; confirm `MemoryRecall` in the run JSONL and that the answer uses it.
34
+ **Smoke:** send a fact from the allowed chat, then ask a paraphrased question later; confirm the temporary memory-tool activity is replaced by the final answer, `MemoryRecall` appears in the run JSONL, and the answer uses it.
35
35
 
36
36
  ## 2. Slack team bot with MCP tools
37
37
  **For:** a DevOps engineer running a shared team bot.
38
38
  **Goal:** a mention-triggered Slack Socket Mode bot with a custom MCP tool, Read/Grep, and `SlackSendMessage` for proactive posts.
39
- **Features:** `slack.socket-mode`, `tool-policy.allowlist`, `tool-policy.mcp-servers`, `agent-app.adapter-send-tools`, `runtime.concurrency`.
39
+ **Features:** `slack.socket-mode`, `channel.transient-tool-activity`, `tool-policy.allowlist`, `tool-policy.mcp-servers`, `agent-app.adapter-send-tools`, `runtime.concurrency`.
40
40
 
41
41
  Put `MONO_AGENT_SLACK_BOT_TOKEN` and `MONO_AGENT_SLACK_APP_TOKEN` in `.env`; the source config omits credentials.
42
42
 
@@ -49,7 +49,7 @@ Put `MONO_AGENT_SLACK_BOT_TOKEN` and `MONO_AGENT_SLACK_APP_TOKEN` in `.env`; the
49
49
  }
50
50
  ```
51
51
  **Steps:** create a Slack app (Socket Mode app token + bot token) → `mono-agent init` (allow-all by default) → write `mcp.json` (the MCP tool becomes available from the server declaration — MCP tools aren't gated by `allowedTools`) → add slack; `SlackSendMessage` is auto-available under allow-all, or name it if you narrow to a specific allowlist → `validate` → `start`.
52
- **Smoke:** mention the bot in an allowed channel; confirm the 👀 reaction, final answer, the MCP tool firing in the artifact, and that `SlackSendMessage` posts only to allowed channels.
52
+ **Smoke:** mention the bot in an allowed channel; confirm the 👀/assistant status, the temporary MCP-tool activity message being replaced by the final answer, the tool firing in the artifact, and `SlackSendMessage` posting only to allowed channels.
53
53
 
54
54
  ## 3. Fully local Ollama agent (no cloud)
55
55
  **For:** a privacy-focused user with no cloud budget.
@@ -144,7 +144,7 @@ Put `MONO_AGENT_SLACK_BOT_TOKEN` and `MONO_AGENT_SLACK_APP_TOKEN` in `.env`; the
144
144
  }
145
145
  ```
146
146
  **Credentials:** put `MONO_AGENT_A2A_BEARER_TOKEN` in the provider's `.env` and `MONO_AGENT_A2A_CONSUMER_BEARER_TOKEN` in the consumer's `.env`; source config omits both tokens.
147
- **Steps:** provider — `init`, add the `@mono-agent/a2a-adapter` plugin entry with `provider`/`agent`/`skill` + env-backed bearer; for paid/non-repeatable calls choose a reviewed stable `provider.idempotency.namespace`; `validate`, `start`, confirm the Agent Card is reachable. Consumer — set plugin `config.consumer` (or compose `createA2AConsumerResponder`), then pass the existing logical dispatch id through `idempotencyKey` / `idempotencyKeyForRequest` rather than generating one per attempt.
147
+ **Steps:** provider — `init`, add the `@mono-agent/a2a-adapter` plugin entry with `provider`/`agent`/`skill` + env-backed bearer; set `provider.maxRequestBytes` only when the caller's task envelope exceeds the 100 KiB SDK default; for paid/non-repeatable calls choose a reviewed stable `provider.idempotency.namespace`; `validate`, `start`, confirm the Agent Card is reachable. Consumer — set plugin `config.consumer` (or compose `createA2AConsumerResponder`), then pass the existing logical dispatch id through `idempotencyKey` / `idempotencyKeyForRequest` rather than generating one per attempt.
148
148
  **Smoke:** repeat one keyed message to the provider's Agent Card URL with the bearer; confirm the same task/result is returned and the responder runs once.
149
149
 
150
150
  ## 8. Multi-agent orchestration (`AskCollaborator`) — code
@@ -175,7 +175,7 @@ const orchestrator = await createConfiguredAgentResponder({
175
175
 
176
176
  ## 9. Sandboxed code agent (loopback only, deny .env)
177
177
  **For:** a security team deploying an internal code assistant.
178
- **Goal:** read repos + run Bash inside the native srt sandbox with loopback-only network access and protected secrets.
178
+ **Goal:** read repos + run Bash or run-scoped NodeRepl inside the native srt sandbox with loopback-only network access and protected secrets.
179
179
  **Features:** `sandbox.mode`, `sandbox.network-policy`, `sandbox.filesystem-scopes`, `sandbox.fallback`, `tool-policy.allow-all`, `memory.journal`.
180
180
 
181
181
  ```json
@@ -186,7 +186,7 @@ const orchestrator = await createConfiguredAgentResponder({
186
186
  }
187
187
  ```
188
188
  **Steps:** `mono-agent init --memory journal` → leave tools at the allow-all default (`["*"]`); the **sandbox**, not an allowlist, is what constrains the code tools → `sandbox.mode native` + `network localhost` + deny-write defaults → keep `fallback: fail-closed` (do NOT set `unsafe-host-process`) → `validate` → `start`.
189
- **Smoke:** ask it to read a file + run Bash (works), then fetch an external URL or write `.env` (both blocked in the artifact). Keep every primary/fallback/trigger model on Pi; direct Codex, Claude, and direct OpenCode reject this mono-agent sandbox policy.
189
+ **Smoke:** ask it to read a file, run Bash, then use NodeRepl twice to retain a variable and produce `42` (all work); next fetch an external URL or write `.env` (both blocked in the artifact). Keep every primary/fallback/trigger model on Pi; direct Codex, Claude, and direct OpenCode reject this mono-agent sandbox policy.
190
190
 
191
191
  ## 10. Phoenix-observed agent with the TUI
192
192
  **For:** an agent builder evaluating runs in a tracing dashboard.
@@ -94,8 +94,8 @@ pnpm run test:demo
94
94
  | Surface | Smoke |
95
95
  | --- | --- |
96
96
  | TUI | Start the host, connect with ordinary `mono-agent tui`, and complete one real prompt against the running responder. |
97
- | Telegram | Send one allowed chat message and verify the reply. |
98
- | Slack | Send one allowed DM or channel message and verify formatting. |
97
+ | Telegram | Send one allowed chat message that uses a tool; verify one transient activity ledger is replaced by the final reply. |
98
+ | Slack | Send one allowed DM or channel message that uses a tool; verify formatting and one transient activity ledger replaced by the final reply. |
99
99
  | Adapter send tools | When `SlackSendMessage` / `TelegramSendMessage` are available (allow-all, or an explicit `tools.allowedTools` entry) with the channel enabled, call them from a non-Slack/Telegram surface such as TUI, cron, or OpenAI API to an allowed destination; verify delivery, then reply at the destination and verify the exact sent text appears in replayed history. |
100
100
  | WhatsApp | Send one allowed sender/group trigger and verify the reply. |
101
101
  | OpenAI API | `curl /v1/models` and `/v1/chat/completions`. |