@mono-agent/agent-app 0.4.0 → 0.4.1

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 (173) hide show
  1. package/README.md +15 -5
  2. package/dist/adapter-send-tools-main.js +2 -2
  3. package/dist/adapter-send-tools-main.js.map +1 -1
  4. package/dist/adapter-send-tools.d.ts +72 -6
  5. package/dist/adapter-send-tools.d.ts.map +1 -1
  6. package/dist/adapter-send-tools.js +413 -38
  7. package/dist/adapter-send-tools.js.map +1 -1
  8. package/dist/app-config.d.ts +48 -11
  9. package/dist/app-config.d.ts.map +1 -1
  10. package/dist/app-config.js +98 -24
  11. package/dist/app-config.js.map +1 -1
  12. package/dist/app.d.ts +10 -0
  13. package/dist/app.d.ts.map +1 -1
  14. package/dist/app.js +659 -48
  15. package/dist/app.js.map +1 -1
  16. package/dist/artifact-retention.d.ts +32 -0
  17. package/dist/artifact-retention.d.ts.map +1 -0
  18. package/dist/artifact-retention.js +111 -0
  19. package/dist/artifact-retention.js.map +1 -0
  20. package/dist/audit-runs.d.ts +12 -0
  21. package/dist/audit-runs.d.ts.map +1 -0
  22. package/dist/audit-runs.js +68 -0
  23. package/dist/audit-runs.js.map +1 -0
  24. package/dist/backfill.d.ts +3 -7
  25. package/dist/backfill.d.ts.map +1 -1
  26. package/dist/backfill.js +115 -11
  27. package/dist/backfill.js.map +1 -1
  28. package/dist/background.d.ts +8 -1
  29. package/dist/background.d.ts.map +1 -1
  30. package/dist/background.js +202 -4
  31. package/dist/background.js.map +1 -1
  32. package/dist/broadcast-recorder.d.ts +27 -0
  33. package/dist/broadcast-recorder.d.ts.map +1 -0
  34. package/dist/broadcast-recorder.js +82 -0
  35. package/dist/broadcast-recorder.js.map +1 -0
  36. package/dist/channel-config-view.d.ts +28 -0
  37. package/dist/channel-config-view.d.ts.map +1 -0
  38. package/dist/channel-config-view.js +79 -0
  39. package/dist/channel-config-view.js.map +1 -0
  40. package/dist/channel-gate.d.ts +22 -0
  41. package/dist/channel-gate.d.ts.map +1 -0
  42. package/dist/channel-gate.js +35 -0
  43. package/dist/channel-gate.js.map +1 -0
  44. package/dist/channel-plugins.d.ts +39 -0
  45. package/dist/channel-plugins.d.ts.map +1 -0
  46. package/dist/channel-plugins.js +346 -0
  47. package/dist/channel-plugins.js.map +1 -0
  48. package/dist/channels.d.ts +62 -73
  49. package/dist/channels.d.ts.map +1 -1
  50. package/dist/channels.js +833 -126
  51. package/dist/channels.js.map +1 -1
  52. package/dist/cli.d.ts +53 -3
  53. package/dist/cli.d.ts.map +1 -1
  54. package/dist/cli.js +696 -28
  55. package/dist/cli.js.map +1 -1
  56. package/dist/config-reference.d.ts +24 -0
  57. package/dist/config-reference.d.ts.map +1 -0
  58. package/dist/config-reference.js +580 -0
  59. package/dist/config-reference.js.map +1 -0
  60. package/dist/configured-agent.d.ts +104 -0
  61. package/dist/configured-agent.d.ts.map +1 -0
  62. package/dist/configured-agent.js +578 -0
  63. package/dist/configured-agent.js.map +1 -0
  64. package/dist/consumer-contract.d.ts +36 -0
  65. package/dist/consumer-contract.d.ts.map +1 -0
  66. package/dist/consumer-contract.js +290 -0
  67. package/dist/consumer-contract.js.map +1 -0
  68. package/dist/doctor.d.ts +9 -0
  69. package/dist/doctor.d.ts.map +1 -1
  70. package/dist/doctor.js +252 -55
  71. package/dist/doctor.js.map +1 -1
  72. package/dist/index.d.ts +9 -3
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +5 -2
  75. package/dist/index.js.map +1 -1
  76. package/dist/init.d.ts +23 -7
  77. package/dist/init.d.ts.map +1 -1
  78. package/dist/init.js +91 -26
  79. package/dist/init.js.map +1 -1
  80. package/dist/install-skill.d.ts +1 -1
  81. package/dist/install-skill.js +2 -2
  82. package/dist/install-skill.js.map +1 -1
  83. package/dist/interaction-bridge.d.ts +72 -0
  84. package/dist/interaction-bridge.d.ts.map +1 -0
  85. package/dist/interaction-bridge.js +354 -0
  86. package/dist/interaction-bridge.js.map +1 -0
  87. package/dist/memory-command.d.ts +10 -0
  88. package/dist/memory-command.d.ts.map +1 -0
  89. package/dist/memory-command.js +649 -0
  90. package/dist/memory-command.js.map +1 -0
  91. package/dist/memory-recall-main.js +1 -1
  92. package/dist/memory-recall-main.js.map +1 -1
  93. package/dist/memory-recall.d.ts +41 -5
  94. package/dist/memory-recall.d.ts.map +1 -1
  95. package/dist/memory-recall.js +75 -5
  96. package/dist/memory-recall.js.map +1 -1
  97. package/dist/memory-rituals.d.ts +8 -11
  98. package/dist/memory-rituals.d.ts.map +1 -1
  99. package/dist/memory-rituals.js +26 -25
  100. package/dist/memory-rituals.js.map +1 -1
  101. package/dist/metrics.d.ts +13 -0
  102. package/dist/metrics.d.ts.map +1 -0
  103. package/dist/metrics.js +105 -0
  104. package/dist/metrics.js.map +1 -0
  105. package/dist/notify-destinations.d.ts +23 -0
  106. package/dist/notify-destinations.d.ts.map +1 -0
  107. package/dist/notify-destinations.js +79 -0
  108. package/dist/notify-destinations.js.map +1 -0
  109. package/dist/posted-message-index.d.ts +61 -0
  110. package/dist/posted-message-index.d.ts.map +1 -0
  111. package/dist/posted-message-index.js +178 -0
  112. package/dist/posted-message-index.js.map +1 -0
  113. package/dist/proactive-notify.d.ts +32 -0
  114. package/dist/proactive-notify.d.ts.map +1 -0
  115. package/dist/proactive-notify.js +62 -0
  116. package/dist/proactive-notify.js.map +1 -0
  117. package/dist/recipes/base.d.ts +15 -0
  118. package/dist/recipes/base.d.ts.map +1 -0
  119. package/dist/recipes/base.js +51 -0
  120. package/dist/recipes/base.js.map +1 -0
  121. package/dist/recipes/catalog.d.ts +4 -0
  122. package/dist/recipes/catalog.d.ts.map +1 -0
  123. package/dist/recipes/catalog.js +509 -0
  124. package/dist/recipes/catalog.js.map +1 -0
  125. package/dist/recipes/index.d.ts +11 -0
  126. package/dist/recipes/index.d.ts.map +1 -0
  127. package/dist/recipes/index.js +14 -0
  128. package/dist/recipes/index.js.map +1 -0
  129. package/dist/recipes/types.d.ts +70 -0
  130. package/dist/recipes/types.d.ts.map +1 -0
  131. package/dist/recipes/types.js +15 -0
  132. package/dist/recipes/types.js.map +1 -0
  133. package/dist/request-model-override.d.ts +67 -0
  134. package/dist/request-model-override.d.ts.map +1 -0
  135. package/dist/request-model-override.js +96 -0
  136. package/dist/request-model-override.js.map +1 -0
  137. package/dist/runs-health.d.ts +22 -0
  138. package/dist/runs-health.d.ts.map +1 -0
  139. package/dist/runs-health.js +144 -0
  140. package/dist/runs-health.js.map +1 -0
  141. package/dist/seen-conversations.d.ts +22 -0
  142. package/dist/seen-conversations.d.ts.map +1 -0
  143. package/dist/seen-conversations.js +120 -0
  144. package/dist/seen-conversations.js.map +1 -0
  145. package/dist/setup.d.ts +29 -0
  146. package/dist/setup.d.ts.map +1 -0
  147. package/dist/setup.js +97 -0
  148. package/dist/setup.js.map +1 -0
  149. package/dist/trigger-overrides.d.ts +17 -0
  150. package/dist/trigger-overrides.d.ts.map +1 -0
  151. package/dist/trigger-overrides.js +30 -0
  152. package/dist/trigger-overrides.js.map +1 -0
  153. package/dist/tui-command.d.ts +56 -0
  154. package/dist/tui-command.d.ts.map +1 -0
  155. package/dist/tui-command.js +160 -0
  156. package/dist/tui-command.js.map +1 -0
  157. package/dist/ui.d.ts.map +1 -1
  158. package/dist/ui.js +4 -0
  159. package/dist/ui.js.map +1 -1
  160. package/dist/web-command.d.ts +39 -0
  161. package/dist/web-command.d.ts.map +1 -0
  162. package/dist/web-command.js +151 -0
  163. package/dist/web-command.js.map +1 -0
  164. package/package.json +17 -17
  165. package/schema/mono-agent.config.schema.json +1686 -0
  166. package/skills/mono-agent-composer/SKILL.md +34 -9
  167. package/skills/mono-agent-composer/agents/openai.yaml +4 -0
  168. package/skills/mono-agent-composer/references/config-blueprint.md +52 -18
  169. package/skills/mono-agent-composer/references/discovery-questions.md +14 -16
  170. package/skills/mono-agent-composer/references/feature-coverage.md +19 -15
  171. package/skills/mono-agent-composer/references/package-map.md +17 -19
  172. package/skills/mono-agent-composer/references/playbooks.md +209 -0
  173. package/skills/mono-agent-composer/references/validation.md +9 -1
@@ -5,10 +5,31 @@ description: Construct a working mono-agent in the current folder from one mono-
5
5
 
6
6
  # Mono Agent Composer
7
7
 
8
- Construct a working mono-agent in the user's current folder — empty or already holding knowledge — from one `mono-agent.config.json`. Discover what the user wants (runtime with backup models, communication channels incl. crons and webhooks, skills, MCP servers, memory strategy incl. semantic search, sandbox, observability), write the config, then make it run with the `mono-agent` CLI. The config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it too); changes apply on the next `mono-agent restart`. No hand-written host code unless the user genuinely needs programmatic composition. `references/feature-coverage.md` maps every framework feature to a config key, CLI flag, or the programmatic escape hatch — consult it before declaring anything impossible or inventing keys.
8
+ Construct a working mono-agent in the user's current folder — empty or already holding knowledge — from one `mono-agent.config.json`. Discover what the user wants (runtime with backup models, communication channels incl. crons and webhooks, skills, MCP servers, memory strategy incl. semantic search, sandbox, observability), write the config, then make it run with the `mono-agent` CLI. The config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it too); changes apply on the next `mono-agent restart`. No hand-written host code unless the user genuinely needs programmatic composition.
9
+
10
+ ## Authoritative Sources — Read the References, Not the Package Source
11
+
12
+ The `references/*.md` bundled beside this SKILL.md ARE the source of truth for what a mono-agent can do and how to configure it. They are maintained in lockstep with the framework and are **complete for configuration and capabilities**. Answer every "can it do X?", "what is the key for Y?", and "how is Z configured?" from them.
13
+
14
+ Do **not** read or grep the `@mono-agent` TypeScript/package source — `packages/*/src`, `node_modules/@mono-agent/*`, the vendored runtime — to compose, configure, or troubleshoot an agent. For configuration the source is not more authoritative than the references: it is slower, easy to misread, and full of internal-only knobs that are NOT user-configurable. You will usually be working in the user's own agent folder where that source does not even exist.
15
+
16
+ - `references/feature-coverage.md` is the **exhaustive** map of every feature to a `config` key, `cli` flag, `auto` behavior, or `code`-only escape hatch. If a capability is listed `config`/`cli`, use that key/flag verbatim. If it is **not in the table, or is marked `code`**, it is not reachable through `mono-agent.config.json` — say so plainly and name the escape hatch. Absence from the table means "not configurable," never "go check the source."
17
+ - The real exception: if the user is **modifying the framework itself** (changing `@mono-agent` package code), that is framework development, not composing an agent — outside this skill. Only then is reading `packages/*/src` correct.
18
+ - The published docs site (<https://mono-agent-docs.vercel.app/>) is the human-facing companion and the repo's `docs/` is a repo-only long-form mirror an end user will not have. Neither is needed: the bundled references work offline and are sufficient.
19
+
20
+ **Red flags — STOP, you are about to grep source you should not:**
21
+
22
+ | Thought | Reality |
23
+ | --- | --- |
24
+ | "Let me verify the key name against the source." | The references give the exact key. Trust them; don't re-derive from source. |
25
+ | "The references might be incomplete — I'll double-check `packages/.../src`." | `feature-coverage.md` is exhaustive for config/CLI. Not in it = not configurable. |
26
+ | "I'll confirm the docs and source agree." | You are composing an agent, not auditing the framework. The references are the contract. |
27
+ | "The real behavior is in the source, not just the docs." | For configuration the references are authoritative. Answer from them and stop. |
9
28
 
10
29
  ## Operating Rules
11
30
 
31
+ - Answer capability/config questions from the bundled `references/*.md` (authoritative and complete) — never grep or read the `@mono-agent` package source to compose an agent. See "Authoritative Sources" above.
32
+
12
33
  - The deliverable is a folder that works: `mono-agent.config.json` + `IDENTITY.md` (+ optional `skills/`, `mcp.json`), validated and started — not a tutorial.
13
34
  - Start by discovering the intended agent product, not by naming packages.
14
35
  - Ask one question at a time; skip anything the user already answered.
@@ -38,22 +59,23 @@ Everything below runs in the user's agent folder, not the workspace.
38
59
 
39
60
  ## Composition Flow
40
61
 
41
- 1. **Discover.** Read `references/discovery-questions.md` and resolve: runtime model + backup models, channels, identity/knowledge, skills, tools/MCP, memory strategy, sandbox, observability, and the acceptance smoke test.
42
- 2. **Scaffold.** In the user's folder run:
62
+ 1. **Discover.** Read `references/discovery-questions.md` and resolve: runtime model + backup models, channels, identity/knowledge, skills, tools/MCP, memory strategy, sandbox, observability, and the acceptance smoke test. Then run `mono-agent recipes list` (and `mono-agent recipes show <id>`) for an executable blueprint matching the user's intent; `references/playbooks.md` is the prose companion. If a recipe fits, use it as the starting shape.
63
+ 2. **Scaffold.** In the user's folder, prefer the recipe path when one fits:
43
64
 
44
65
  ```bash
45
- mono-agent init --model <ref> [--fallback-models <csv>] [--memory lite|journal|bujo]
66
+ mono-agent init --recipe <id> [--with slack,cron] [--dry-run] # blueprint + .env.example + checklist
67
+ mono-agent init --model <ref> [--fallback-models <csv>] [--memory lite|journal|bujo] # bare scaffold
46
68
  ```
47
69
 
48
- This writes a minimal `mono-agent.config.json` (webhook enabled as the zero-credential smoke channel), an `IDENTITY.md` that references any knowledge files already present, and `.mono-agent/` working directories. It never overwrites existing files.
49
- 3. **Configure.** Edit `mono-agent.config.json` to match the discovery answers. Read `references/config-blueprint.md` for the full annotated config shape: every channel section, skills, MCP, memory, sandbox, and fallback models.
70
+ Either writes a `mono-agent.config.json`, an `IDENTITY.md` that references any knowledge files already present, and `.mono-agent/` working directories (recipes also emit a `.env.example` and any extra files). `--dry-run` previews without writing. It never overwrites existing files.
71
+ 3. **Configure.** Edit `mono-agent.config.json` to match the discovery answers. Read `references/config-blueprint.md` for the full annotated config shape: every channel section, skills, MCP, memory, sandbox, and fallback models. Run `mono-agent config` to see the resolved configuration field-by-field with each value tagged `env` / `json` / `default` — the fastest way to confirm a value came from where you intended.
50
72
  4. **Validate.**
51
73
 
52
74
  ```bash
53
- mono-agent validate
75
+ mono-agent validate [--recipe <id>] [--consumer <path>]
54
76
  ```
55
77
 
56
- Fix every `[error]` section. `[waiting]` channels are fine — they are simply not configured yet. Re-run until the report says the config is ready.
78
+ Fix every `[error]` section. `[waiting]` channels are fine — they are simply not configured yet. With `--recipe`, the report also flags any capability the recipe promised that is not yet live. Re-run until the report says the config is ready.
57
79
  5. **Start and smoke.**
58
80
 
59
81
  ```bash
@@ -64,16 +86,19 @@ Everything below runs in the user's agent folder, not the workspace.
64
86
 
65
87
  ## When Config Is Not Enough
66
88
 
67
- Config-first covers one responder served over any combination of the seven channels (webhook, OpenAI-compatible API, Telegram, Slack, WhatsApp, A2A, cron) plus sandbox, memory (lite with FTS-only recall, journal with hybrid BM25+vector recall + configured embeddings, or bujo with SQLite-indexed hybrid recall + LLM capture/reconcile + entity graph + auto-scheduled reflection/migration), and traceability. Drop to programmatic composition only for: custom `MonoRuntimeLike` implementations, request-scoped runtime extensions, tool approval gates, structured output schemas, multi-agent orchestration (`@mono-agent/agent-orchestrator`), custom channel message texts, or bespoke transports — `references/feature-coverage.md` lists which features are config keys and which are code-only. Read `references/package-map.md` for the package boundaries, and start from `startMonoAgentApp({ drivers, runtime, ... })` or `@mono-agent/agent-host` rather than re-writing lifecycle glue. For eval suites over the composed agent, use `@mono-agent/agent-evals`.
89
+ Config-first covers one responder served over any combination of the seven channels (webhook, OpenAI-compatible API, Telegram, Slack, WhatsApp, A2A, cron) plus sandbox, memory (lite with FTS-only recall, journal with hybrid BM25+vector recall + configured embeddings, or bujo with SQLite-indexed hybrid recall + LLM capture/reconcile + entity graph + auto-scheduled consolidation), and traceability. Drop to programmatic composition only for: custom `MonoRuntimeLike` implementations, request-scoped runtime extensions, tool approval gates, structured output schemas, multi-agent orchestration (`@mono-agent/agent-orchestrator`), custom channel message texts, or bespoke transports — `references/feature-coverage.md` lists which features are config keys and which are code-only. Read `references/package-map.md` for the package boundaries, and start from `startMonoAgentApp({ drivers, runtime, ... })` or `@mono-agent/agent-app` rather than re-writing lifecycle glue.
68
90
 
69
91
  ## Implementation References
70
92
 
71
93
  - `references/discovery-questions.md` — the question sequence and which config keys each answer fills.
72
94
  - `references/config-blueprint.md` — annotated `mono-agent.config.json` covering every section, plus the folder layout and programmatic escape hatch.
73
95
  - `references/feature-coverage.md` — every framework feature mapped to config / CLI / code / dev-tooling coverage; the answer to "can the config do X?".
96
+ - `references/playbooks.md` — end-to-end recipes (persona → config block → `init`/`validate`/`start`/smoke). Check for a matching recipe before hand-assembling a config.
74
97
  - `references/package-map.md` — which package owns what, for programmatic composition and troubleshooting.
75
98
  - `references/validation.md` — validation commands and per-channel smoke tests; read before claiming the agent works.
76
99
 
100
+ These bundled `references/*` files are your authoritative, self-sufficient source — they ship with `@mono-agent/agent-app` and work offline, so always read them rather than the package source or a remote site. The published documentation site at <https://mono-agent-docs.vercel.app/> (notably its Playbooks index and Feature Matrix) is the human-facing companion, and the repo's `docs/reference/feature-registry.md` is a longer-form mirror that exists only inside a framework checkout — neither is required, and do not depend on the live site being reachable.
101
+
77
102
  ## Done Criteria
78
103
 
79
104
  - `mono-agent validate` exits 0 in the user's folder.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Mono Agent Composer"
3
+ short_description: "Compose config-first mono-agents"
4
+ default_prompt: "Use $mono-agent-composer to build and validate a config-first mono-agent folder."
@@ -1,5 +1,10 @@
1
1
  # Config Blueprint
2
2
 
3
+ > A prose, per-domain version of this reference (runtime, channels, memory, …)
4
+ > lives on the published docs site:
5
+ > <https://mono-agent-docs.vercel.app/config/>. This annotated JSON
6
+ > stays the offline canonical shape.
7
+
3
8
  One `mono-agent.config.json` declares the whole agent. Paths are relative to the folder; every field also has a `MONO_AGENT_*` env var that overrides it (env > JSON > defaults). Omit a section to leave that capability off — every section except `runtime.model` and `context.identityPath` is optional. `references/feature-coverage.md` maps every framework feature to its config key; if a capability is not listed there, it needs the programmatic escape hatch.
4
9
 
5
10
  ## Folder Layout
@@ -32,7 +37,6 @@ my-agent/
32
37
  "executionMode": "sdk", // sdk | cli (default inferred from model)
33
38
  "effort": "medium", // none|low|medium|high|xhigh|max
34
39
  "permissionMode": "default", // default|plan|acceptEdits|bypassPermissions (CLI backends)
35
- "reasoningSummary": "auto", // auto|concise|detailed|off|on
36
40
  "maxTurns": 0, // 0 or omitted means unlimited; 1-100 caps turns
37
41
  "workspace": ".",
38
42
  "session": { "mode": "continuous", "idleTimeoutMs": 1800000 } // or "per-message"
@@ -70,11 +74,11 @@ my-agent/
70
74
  },
71
75
 
72
76
  // Memory strategy. Omit the section for no memory.
73
- // Three tiers over one substrate (memory-store + memory-bujo):
77
+ // Three tiers over one substrate (@mono-agent/memory store + bujo subpaths):
74
78
  // lite — FTS keyword recall + rapid-log; no external deps.
75
79
  // journal — + hybrid recall (BM25+vector) + decay; needs embeddings.
76
80
  // bujo — + LLM capture/reconcile + entity graph + auto-scheduled
77
- // reflection/migration; needs embeddings + an app-level memory.llm.
81
+ // lightweight consolidation; needs embeddings + an app-level memory.llm for capture/tier selection.
78
82
  "memory": {
79
83
  "mode": "bujo", // lite | journal | bujo
80
84
  "path": "./.mono-agent/memory", // root directory for all tiers
@@ -87,17 +91,16 @@ my-agent/
87
91
  "apiKeyEnv": "OPENAI_API_KEY", // or inline "apiKey"; required for openai
88
92
  "dim": 768 // nomic-embed-text:v1.5 output dimension
89
93
  },
90
- "llm": { // enables bujo capture/rituals; omit for lite/journal
94
+ "llm": { // enables bujo capture and the effective bujo tier; omit for lite/journal
91
95
  // Env: MONO_AGENT_MEMORY_LLM_PROVIDER / _MODEL / _EXECUTION_MODE / _ENDPOINT.
92
96
  "provider": "ollama", // ollama | agent-host
93
97
  "model": "qwen3.6:latest", // ollama: model string; agent-host: runtime ref, e.g. pi:openai-codex:gpt-5.5
94
98
  "endpoint": "http://localhost:11434" // ollama only; invalid for agent-host
95
99
  // For agent-host, use: "model": "pi:openai-codex:gpt-5.5", "executionMode": "sdk"; omit endpoint.
96
100
  },
97
- // Bujo auto-scheduler — override defaults or disable per-ritual.
98
- // Rituals run in-app; no external cron or launchd needed.
99
- "reflection": { "enabled": true, "cron": "0 3 * * *" }, // default: nightly 03:00
100
- "migration": { "enabled": true, "cron": "0 4 1 * *" } // default: 1st of month 04:00
101
+ // Bujo auto-scheduler — override the default or disable it.
102
+ // Consolidation runs in-app; no external cron or launchd needed.
103
+ "consolidation": { "enabled": true, "cron": "0 */2 * * *" } // default: every two hours
101
104
  },
102
105
 
103
106
  // Fail-closed tool policy + MCP servers. Deny wins; overlap is rejected.
@@ -120,13 +123,21 @@ my-agent/
120
123
 
121
124
  // Observability: JSONL artifacts (always written; the local fallback) + the
122
125
  // trace-source registry that `mono-agent status` reads.
123
- "artifacts": { "dir": "./.mono-agent/artifacts" },
126
+ "artifacts": {
127
+ "dir": "./.mono-agent/artifacts",
128
+ "retention": { "maxAgeDays": 365, "maxCount": 50000, "dryRun": false },
129
+ "memoryRetention": { "maxAgeDays": 7, "maxCount": 5000, "dryRun": false }
130
+ },
124
131
  "traceability": {
125
132
  "registryDir": "./.mono-agent/trace-sources",
126
133
  "sourceId": "my-agent",
127
134
  "sourceLabel": "My Agent",
128
135
  "heartbeatMs": 10000,
129
- "staleAfterMs": 30000
136
+ "staleAfterMs": 30000,
137
+ // Also mirror this agent's manifest into the global ~/.mono-agent/trace-sources
138
+ // registry so `mono-agent tui` discovers it from any directory. Default true;
139
+ // set false to keep the agent visible only via its own registryDir.
140
+ "globalDiscovery": true
130
141
  },
131
142
 
132
143
  // Optional trace viewer: add a Phoenix (OTLP) exporter to browse traces in
@@ -137,8 +148,27 @@ my-agent/
137
148
  ]
138
149
  },
139
150
 
140
- // ----- Channels: one section per channel; all independent. An unconfigured
141
- // ----- channel reports waiting_for_config and never blocks the others.
151
+ // ----- Channels: one section per channel; all independent. Most channels are
152
+ // ----- opt-in; operator surfaces (`tui`, `live`) default on and can opt out.
153
+ // ----- A waiting/disabled channel never blocks the others.
154
+
155
+ "tui": {
156
+ "enabled": true, // default-on loopback operator console endpoint
157
+ "host": "127.0.0.1",
158
+ "port": 0,
159
+ "basePath": "/tui",
160
+ "allowNonLoopback": false,
161
+ "apiKey": "optional-bearer"
162
+ },
163
+
164
+ "live": {
165
+ "enabled": true, // default-on read-only SSE relay for mono-agent web
166
+ "host": "127.0.0.1",
167
+ "port": 0,
168
+ "basePath": "/live",
169
+ "allowNonLoopback": false,
170
+ "apiKey": "optional-bearer"
171
+ },
142
172
 
143
173
  "webhook": {
144
174
  "enabled": true,
@@ -197,8 +227,8 @@ my-agent/
197
227
  },
198
228
 
199
229
  "a2a": {
230
+ "enabled": true, // canonical channel-root flag (legacy a2a.provider.enabled still honored)
200
231
  "provider": {
201
- "enabled": true,
202
232
  "host": "127.0.0.1",
203
233
  "port": 4201,
204
234
  "publicBaseUrl": "https://agent.example.com", // Agent Card URL when fronted by a proxy
@@ -239,18 +269,22 @@ my-agent/
239
269
  ## Lifecycle
240
270
 
241
271
  ```bash
272
+ mono-agent recipes list # executable blueprints (id, risk, tags)
273
+ mono-agent recipes show <id> # generated config + .env.example + follow-up checklist
274
+ mono-agent init --recipe <id> [--with slack,cron] [--dry-run] # scaffold from a blueprint
242
275
  mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory lite|journal|bujo]
243
- mono-agent validate # per-section report incl. sandbox, observability, every channel; exit 0 means ready
276
+ mono-agent config # resolved config field-by-field, each value tagged env/json/default
277
+ mono-agent validate [--recipe <id>] [--consumer <path>] # per-section report; --recipe also checks the recipe's capabilities
244
278
  mono-agent start # traceability + every configured channel
245
279
  mono-agent restart # apply config edits (config is JSON-first; restart to re-apply)
246
280
  mono-agent restart --force # restart AND purge persisted pi sessions (fresh start; durable memory kept)
247
281
  ```
248
282
 
249
- A `.env` file in the folder is loaded automatically (exported shell variables win); use `--env-file <path>` for an alternate file. `start` prints the traceability source (Phoenix when an `observability.exporters` Phoenix entry is configured, otherwise the local JSONL artifacts) and one status line per channel: `running` with its endpoint facts, `waiting_for_config` with the exact missing setting, `disabled`, or `failed` with the reason. Config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it) and run `mono-agent restart` to apply — there is no live browser re-apply.
283
+ A `.env` file in the folder is loaded automatically (exported shell variables win); use `--env-file <path>` for an alternate file. `validate --consumer <path>` loads the consumer folder's `.env` by default and resolves relative `--config` / `--env-file` paths there. `start` prints the traceability source (Phoenix when an `observability.exporters` Phoenix entry is configured, otherwise the local JSONL artifacts) and one status line per channel: `running` with its endpoint facts, `waiting_for_config` with the exact missing setting, `disabled`, or `failed` with the reason. Config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it) and run `mono-agent restart` to apply — there is no live browser re-apply.
250
284
 
251
- For BuJo capture and rituals, 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` maintenance CLI remains Ollama-only; `agent-host` LLM capture is an in-app composition path that injects the `LlmComplete` implementation into the BuJo store.
285
+ 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` maintenance CLI remains Ollama-only; `agent-host` LLM capture is an in-app composition path that injects the `LlmComplete` implementation into the BuJo store.
252
286
 
253
- For a local terminal chat against the same config, `@mono-agent/tui` ships a `mono-agent-tui` bin: `mono-agent-tui --config ./mono-agent.config.json`.
287
+ 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); 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).
254
288
 
255
289
  ## Programmatic Escape Hatch
256
290
 
@@ -266,4 +300,4 @@ const app = await startMonoAgentApp({
266
300
  });
267
301
  ```
268
302
 
269
- For a bare responder without channels, use `@mono-agent/config` + `@mono-agent/agent-host` (`createConfiguredAgentResponder` — also takes `memory`, `historyStore`, `runtimeOptions`, `runtimeOptionsForRequest`). For multi-agent orchestration, add `@mono-agent/agent-orchestrator` (`createCollaboratorToolRuntimeExtension`) — see `references/package-map.md`. Channel message texts and stream tuning (welcome/help/error texts, edit debounce) are channel-driver overrides, not config keys.
303
+ For a bare responder without channels, use `@mono-agent/config` + `@mono-agent/agent-app` (`createConfiguredAgentResponder` — also takes `memory`, `historyStore`, `runtimeOptions`, `runtimeOptionsForRequest`). For multi-agent orchestration, add `@mono-agent/agent-orchestrator` (`createCollaboratorToolRuntimeExtension`) — see `references/package-map.md`. Channel message texts and stream tuning (welcome/help/error texts, edit debounce) are channel-driver overrides, not config keys.
@@ -87,10 +87,10 @@ Should the agent remember anything between conversations?
87
87
  2. Lite memory — FTS keyword recall + rapid-log capture; zero external deps
88
88
  3. Journal memory — hybrid recall (BM25+vector) + salience decay; requires embeddings
89
89
  4. BuJo memory — full tier: journal + LLM capture/reconcile + entity graph + auto-scheduled
90
- reflection/migration; requires embeddings AND a chat model
90
+ consolidation; requires embeddings AND a chat model
91
91
  ```
92
92
 
93
- All tiers share the same `@mono-agent/memory-bujo` substrate. Fills: `memory.mode`
93
+ All tiers share the same `@mono-agent/memory/bujo` substrate. Fills: `memory.mode`
94
94
  (`lite`/`journal`/`bujo`), `memory.path`, `memory.writeMode`
95
95
  (`disabled`/`append-host-summary`/`capture`), and tier-specific blocks below.
96
96
 
@@ -134,13 +134,12 @@ Write:
134
134
  After writing, remind the user to run `mono-agent validate` (checks root writability and
135
135
  provider-specific liveness; Ollama model pulls are checked only when using Ollama).
136
136
 
137
- **Tier 4 — bujo (embeddings + chat model + auto-rituals):**
137
+ **Tier 4 — bujo (embeddings + chat model + consolidation):**
138
138
 
139
139
  Proactively explain what bujo does: capture → reconcile (ADD/UPDATE/SUPERSEDE/NOOP),
140
- hybrid BM25+vector recall, entity graph, reflection (decay + insight synthesis), monthly
141
- migration (promote/reschedule/cluster/forget), living `index.md` + `future-log.md`.
142
- The reflection and migration rituals are **auto-scheduled in-app** — no external cron or
143
- launchd setup needed.
140
+ hybrid BM25+vector recall, entity graph, scheduled consolidation (decay + duplicate
141
+ superseding), living `index.md`, and an empty retired `future-log.md` stub. Consolidation
142
+ is **auto-scheduled in-app** — no external cron or launchd setup needed.
144
143
 
145
144
  - Ask: which embeddings provider/model? Use the same choices as journal.
146
145
  - Ask: which chat LLM provider/model for LLM pipelines?
@@ -150,9 +149,9 @@ launchd setup needed.
150
149
  `executionMode: "sdk"`. Do not use CLI-backed refs such as `codex:gpt-5.5`; they are
151
150
  rejected for memory LLMs until runtimes can enforce no external actions.
152
151
  - Ask: should per-turn intelligent capture be enabled (`writeMode: "capture"`), or only
153
- deterministic rapid-log summaries (`append-host-summary`) plus scheduled rituals?
154
- - Ask: should we keep the default reflection/migration schedule (nightly `0 3 * * *` /
155
- monthly `0 4 1 * *`), or customise the cron expressions?
152
+ deterministic rapid-log summaries (`append-host-summary`) plus scheduled consolidation?
153
+ - Ask: should we keep the default consolidation schedule (`0 */2 * * *`), customise the
154
+ cron expression, or disable scheduled consolidation?
156
155
 
157
156
  Write (embeddings + chat model):
158
157
 
@@ -183,11 +182,10 @@ For an agent-host memory LLM, write the `llm` block as:
183
182
  }
184
183
  ```
185
184
 
186
- If the user customises the ritual schedule, add the `reflection`/`migration` blocks:
185
+ If the user customises the consolidation schedule, add the `consolidation` block:
187
186
 
188
187
  ```jsonc
189
- "reflection": { "enabled": true, "cron": "0 3 * * *" },
190
- "migration": { "enabled": true, "cron": "0 4 1 * *" }
188
+ "consolidation": { "enabled": true, "cron": "0 */4 * * *" }
191
189
  ```
192
190
 
193
191
  After writing, append a prerequisite note:
@@ -199,8 +197,8 @@ Before running mono-agent validate, pull the required models:
199
197
  ```
200
198
 
201
199
  Then run `mono-agent validate` — the Memory section confirms the root is writable,
202
- provider-specific liveness, and the ritual cadence (with next-run times).
203
- See `docs/memory.md` for the full tier table, config shapes, and CLI subcommands
200
+ provider-specific liveness, and the consolidation cadence.
201
+ See `docs/memory/index.md` for the full tier table, config shapes, and CLI subcommands
204
202
  (`memory-bujo rebuild|recall|index|reflect|migrate`).
205
203
 
206
204
  ## 7. Sandbox
@@ -229,7 +227,7 @@ Do you need a browsable trace viewer or just local artifacts?
229
227
  2. JSONL artifacts only (the local fallback; no external viewer)
230
228
  ```
231
229
 
232
- Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and — when Phoenix is wanted — an `observability.exporters` (phoenix) OTLP entry. Local JSONL artifacts are always written and are the fallback when no exporter is configured. Artifacts record runtime/tool/message events and summaries, not private chain-of-thought. For a local terminal chat, mention `mono-agent-tui --config ./mono-agent.config.json`. Config is JSON-first — edit `mono-agent.config.json` directly and run `mono-agent restart` to apply changes.
230
+ Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and — when Phoenix is wanted — an `observability.exporters` (phoenix) OTLP entry. Local JSONL artifacts are always written and are the fallback when no exporter is configured. Artifacts record runtime/tool/message events and summaries, not private chain-of-thought. For a terminal operator console, mention `mono-agent tui` (run from anywhere once the agent is started; live chat with thinking/tool insight, run replay, config view). Config is JSON-first — edit `mono-agent.config.json` directly and run `mono-agent restart` to apply changes.
233
231
 
234
232
  ## 9. Acceptance Smoke Test
235
233
 
@@ -1,21 +1,20 @@
1
1
  # Feature Coverage
2
2
 
3
- Every framework capability and how a composed agent reaches it. Use this to answer "can the config do X?" without guessing: `config` = a `mono-agent.config.json` key (env var override always exists), `cli` = a `mono-agent` CLI flag/command, `auto` = always on when the app runs, `code` = programmatic escape hatch only, `dev` = development/test tooling. The repo's `docs/feature-registry.md` is the long-form source of truth.
3
+ Every framework capability and how a composed agent reaches it. This table is the **authoritative, exhaustive** answer to "can the config do X?" answer from it, do not grep the `@mono-agent` package source to confirm. `config` = a `mono-agent.config.json` key (env var override always exists), `cli` = a `mono-agent` CLI flag/command, `auto` = always on when the app runs, `code` = programmatic escape hatch only, `dev` = development/test tooling. A capability that is absent here, or marked `code`, is not reachable through config — that is the answer, not a cue to read source. The repo's `docs/reference/feature-registry.md` (framework checkout only) and the documentation site at <https://mono-agent-docs.vercel.app/> are longer-form human-facing mirrors of this same table.
4
4
 
5
5
  ## Runtime
6
6
 
7
7
  | Capability | Coverage | Where |
8
8
  | --- | --- | --- |
9
- | Model backends: claude (sdk/cli), codex (cli), pi sdk providers (OpenAI, Copilot, OpenRouter, Ollama, ...) | config | `runtime.model` |
9
+ | Model backends: claude (sdk/cli), codex (cli), pi sdk providers (OpenAI, Copilot, OpenRouter, Ollama, ...), opencode (cli, `opencode:<provider>:<model>` via the OpenCode server) | config | `runtime.model` |
10
10
  | Backup models on retryable provider failure | config | `runtime.fallbackModels` |
11
11
  | Execution mode (sdk/cli), effort, max turns, workspace | config | `runtime.executionMode`, `runtime.effort`, `runtime.maxTurns`, `runtime.workspace` |
12
12
  | Tool-permission posture for CLI backends | config | `runtime.permissionMode` |
13
- | Reasoning summary verbosity | config | `runtime.reasoningSummary` |
14
13
  | Continuous provider sessions with idle eviction | config | `runtime.session.{mode,idleTimeoutMs}` |
15
14
  | Local providers (Ollama / LM Studio / OpenAI-compatible) | config | `providers.local[]` |
16
15
  | Pi OAuth credentials | config | `providers.piAuthPath` |
17
16
  | Tool-output bloat guard, cost tracking | auto | built into every run |
18
- | Context handling | provider | delegated to the provider; the pi bridge (pi-agent-core AgentHarness) runs no automatic in-loop summarization, so runs report `context_compaction_applied: null` |
17
+ | 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` |
19
18
  | Structured output (JSON schema), live input steering | code | harness `runtimeOptions` |
20
19
  | Tool approval gates (risk tiers, timeouts, always-allow) | code | `createMonoRuntime({ onToolApprovalRequest, ... })` — needs a host UI |
21
20
  | Fully custom runtime | code | `startMonoAgentApp({ runtime })` |
@@ -30,11 +29,11 @@ Every framework capability and how a composed agent reaches it. Use this to answ
30
29
  | Conversation history (in-memory; unlimited unless turns are capped) | auto | sized from `runtime.maxTurns`; custom store via code |
31
30
  | Lite memory (FTS keyword recall + rapid-log capture; no external deps) | config | `memory.mode: "lite"`, `path`, `maxBytes`, `writeMode` |
32
31
  | Journal memory (hybrid recall BM25+vector + salience decay; needs configured embeddings) | config | `memory.mode: "journal"`, `path`, `memory.embeddings.{provider,model,dim}` (`provider: "ollama" | "openai"`) |
33
- | BuJo memory (journal + LLM capture/reconcile ADD/UPDATE/SUPERSEDE/NOOP + entity graph + auto-scheduled reflection/migration; needs embeddings + an app-level `memory.llm`) | config | `memory.mode: "bujo"`, `path`, `memory.embeddings.{provider,model,dim}`, `memory.llm` with `provider: "ollama"` (`model`, optional `endpoint`) or `provider: "agent-host"` (`model` is an SDK runtime model ref, e.g. `pi:openai-codex:gpt-5.5`, optional `executionMode: "sdk"`) — see `docs/memory.md` |
34
- | BuJo reflection auto-scheduler (nightly decay + insight synthesis; in-app, no external cron needed) | config | `memory.reflection.{enabled,cron}` (default `0 3 * * *`); env `MONO_AGENT_MEMORY_REFLECTION_CRON`, `MONO_AGENT_MEMORY_REFLECTION_ENABLED` |
35
- | BuJo migration auto-scheduler (monthly promote/reschedule/cluster/forget; in-app) | config | `memory.migration.{enabled,cron}` (default `0 4 1 * *`); env `MONO_AGENT_MEMORY_MIGRATION_CRON`, `MONO_AGENT_MEMORY_MIGRATION_ENABLED` |
36
- | Memory out-of-band maintenance CLI (rebuild/recall/index/reflect/migrate) | cli | `memory-bujo <subcommand> <root>`; opt-in `MONO_AGENT_MEMORY_EMBEDDINGS_PROVIDER`/`_MODEL`/`_DIM` for semantic recall; reflect/migrate are Ollama-only and require `MONO_AGENT_MEMORY_LLM_MODEL` (optional `MONO_AGENT_MEMORY_LLM_ENDPOINT`) |
37
- | Memory liveness check (root writable; provider-specific Ollama checks only when embeddings/chat use Ollama; BuJo LLM config + ritual cadence — loud warn, no silent fallback) | cli | `mono-agent validate` |
32
+ | BuJo memory (journal + LLM capture/reconcile ADD/UPDATE/SUPERSEDE/NOOP + entity graph + auto-scheduled consolidation; needs embeddings + an app-level `memory.llm`) | config | `memory.mode: "bujo"`, `path`, `memory.embeddings.{provider,model,dim}`, `memory.llm` with `provider: "ollama"` (`model`, optional `endpoint`) or `provider: "agent-host"` (`model` is an SDK runtime model ref, e.g. `pi:openai-codex:gpt-5.5`, optional `executionMode: "sdk"`) — see `docs/memory/index.md` |
33
+ | BuJo consolidation auto-scheduler (lightweight decay + duplicate superseding; in-app, no external cron needed) | config | `memory.consolidation.{enabled,cron}` (default `0 */2 * * *`); env `MONO_AGENT_MEMORY_CONSOLIDATION_CRON`, `MONO_AGENT_MEMORY_CONSOLIDATION_ENABLED` |
34
+ | Memory out-of-band maintenance CLI (rebuild/recall/index/legacy reflect/migrate) | cli | `memory-bujo <subcommand> <root>`; opt-in `MONO_AGENT_MEMORY_EMBEDDINGS_PROVIDER`/`_MODEL`/`_DIM` for semantic recall; legacy reflect/migrate are Ollama-only and require `MONO_AGENT_MEMORY_LLM_MODEL` (optional `MONO_AGENT_MEMORY_LLM_ENDPOINT`) |
35
+ | Config-aware memory preview CLI (stats/today/show/search/top for the configured backend; local search warns and falls back to FTS-only when embeddings are down) | cli | `mono-agent memory stats\|today\|show <date>\|search <query>\|top [--limit <n>] [--json]` |
36
+ | Memory liveness check (root writable; provider-specific Ollama checks only when embeddings/chat use Ollama; BuJo LLM config + consolidation cadence — loud warn, no silent fallback) | cli | `mono-agent validate` |
38
37
  | Host summaries appended after runs | config | `memory.writeMode: "append-host-summary"` |
39
38
  | Auto-provisioned read-only `memory_recall` tool (hybrid keyword+semantic search) exposed to the agent from the single memory config; no chat LLM | config | `config.memory.recallTool.enabled` (`MONO_AGENT_MEMORY_RECALL_TOOL_ENABLED`, default on for journal/bujo with embeddings) |
40
39
 
@@ -61,8 +60,10 @@ Every framework capability and how a composed agent reaches it. Use this to answ
61
60
  | Telegram (long polling, chat allowlist) | config | `telegram` section |
62
61
  | Slack (Socket Mode, channel allowlist, mention handling) | config | `slack` section |
63
62
  | WhatsApp (Baileys, QR login, group mention/any triggers) | config | `whatsapp` section |
64
- | A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer) | config | `a2a.provider` + `a2a.agent` + `a2a.skill` |
63
+ | A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer) | config | `a2a.enabled` (canonical; legacy `a2a.provider.enabled` honored) + `a2a.provider` + `a2a.agent` + `a2a.skill` |
65
64
  | A2A consumer settings (remote agent URLs, timeouts) | config + code | `a2a.consumer` holds settings; calls via `createA2AConsumerResponder` |
65
+ | TUI stream endpoint (operator console transport) | config | `tui.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback |
66
+ | Live event relay (read-only run-event SSE for web) | config | `live.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback |
66
67
  | Cron jobs (five-field expressions, timezones, overlap skip) | config | `cron.jobs[]`, single-job `MONO_AGENT_CRON_*`, or one markdown file per job in `cron.dir` / `MONO_AGENT_CRON_DIR` (default `cron/`) |
67
68
  | Channel message texts / stream tuning (welcome, debounce, ...) | code | channel driver overrides |
68
69
  | Custom transports | code | implement `ChannelDriver`, pass via `startMonoAgentApp({ drivers })` |
@@ -71,13 +72,16 @@ Every framework capability and how a composed agent reaches it. Use this to answ
71
72
 
72
73
  | Capability | Coverage | Where |
73
74
  | --- | --- | --- |
74
- | JSONL run artifacts (events + summaries, secrets redacted) | config | `artifacts.dir` |
75
- | Trace-source registry (heartbeat manifests `mono-agent status` reads) | config | `traceability.{registryDir,sourceId,sourceLabel,heartbeatMs,staleAfterMs}` |
75
+ | JSONL run artifacts (events + summaries, secrets redacted) | config | `artifacts.dir`, `artifacts.retention`, `artifacts.memoryRetention` |
76
+ | Trace-source registry (heartbeat manifests `mono-agent status` reads) | config | `traceability.{registryDir,sourceId,sourceLabel,heartbeatMs,staleAfterMs,globalDiscovery}` |
76
77
  | Phoenix trace viewer (OTLP exporter; local JSONL artifacts are the fallback) | config | `observability.exporters` (phoenix entry) |
77
- | Terminal chat (TUI with transcript + redacted config pane) | cli | `mono-agent-tui --config ./mono-agent.config.json` |
78
- | Scaffold / validate / start / install-skill | cli | `mono-agent init|validate|start|install-skill` |
78
+ | 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) |
79
+ | Session Recorder web PWA (read-only run browser) | cli | `mono-agent web [--host] [--port] [--no-open] [--allow-non-loopback] [--include-memory]`; consumes the default-on `live` relay and local artifacts; memory runs are opt-in |
80
+ | Executable config blueprints (generate config + `.env.example` + checklist) | cli | `mono-agent recipes list\|show <id>`, `mono-agent init --recipe <id>` |
81
+ | Resolved config view (every field tagged env/json/default) | cli | `mono-agent config` |
82
+ | Scaffold / validate / start / install-skill | cli | `mono-agent init\|validate [--consumer <path>]\|config\|recipes\|start\|install-skill` |
83
+ | Recipe capability check (selected recipe live?) | cli | `mono-agent validate --recipe <id>` |
79
84
  | `.env` auto-loading | cli | automatic; `--env-file <path>` |
80
85
  | Explicit failure objects (no fake success) | auto | harness |
81
86
  | Per-request runtime options, custom memory/history stores | code | `createConfiguredAgentResponder` options |
82
87
  | Multi-agent delegation (`ask_collaborator` loopback MCP tool) | code | `@mono-agent/agent-orchestrator` |
83
- | Eval scenarios/suites (trajectory + judge assertions) | dev | `@mono-agent/agent-evals`, live runs via `MONO_AGENT_EVAL_LIVE=1` |
@@ -4,7 +4,7 @@ Use this map to select the smallest mono-agent package set for a host. Package c
4
4
 
5
5
  ## App Join (default)
6
6
 
7
- `@mono-agent/agent-app` is the config-first host: it loads `mono-agent.config.json`, builds the responder through `agent-host`, and drives every configured channel plus traceability and any configured observability exporters. It ships the `mono-agent` CLI (`init`, `validate`, `start`) and is the only publishable package allowed to compose communication adapters.
7
+ `@mono-agent/agent-app` is the config-first host: it loads `mono-agent.config.json`, owns configured runtime/harness/responder/memory composition, and drives every configured channel plus traceability and any configured observability exporters. It ships the `mono-agent` CLI (`init`, `validate`, `start`) and is the only publishable package allowed to compose communication adapters.
8
8
 
9
9
  ```ts
10
10
  import { startMonoAgentApp } from "@mono-agent/agent-app";
@@ -23,13 +23,13 @@ Every real host needs these concepts:
23
23
  | Shared request/response shape | `@mono-agent/agent-contracts` | `AgentResponder`, request, response, stream, cancellation contracts | Prompt building, runtime execution, transport |
24
24
  | Core config | `@mono-agent/config` | Runtime, context, memory, tools, artifact, traceability settings | Adapter credentials, chat allowlists |
25
25
  | Runtime facade | `@mono-agent/runtime-adapter` | Model refs, execution-mode validation, local provider runtime options | Prompts, adapters, memory |
26
- | Configured responder | `@mono-agent/agent-host` | Turns `MonoAgentConfig` into runtime, harness, and responder | Polling chats, serving APIs, adapter settings |
26
+ | Configured responder | `@mono-agent/agent-app` | Turns `MonoAgentConfig` into runtime, memory, harness, and responder | Polling chats, serving APIs, adapter settings |
27
27
 
28
28
  Minimal local host:
29
29
 
30
30
  ```ts
31
31
  import { loadMonoAgentConfigWithSources } from "@mono-agent/config";
32
- import { createConfiguredAgentResponder } from "@mono-agent/agent-host";
32
+ import { createConfiguredAgentResponder } from "@mono-agent/agent-app";
33
33
 
34
34
  const config = await loadMonoAgentConfigWithSources({
35
35
  env: process.env,
@@ -37,7 +37,7 @@ const config = await loadMonoAgentConfigWithSources({
37
37
  jsonPath: "./mono-agent.config.json",
38
38
  });
39
39
 
40
- const responder = createConfiguredAgentResponder({ config });
40
+ const responder = await createConfiguredAgentResponder({ config });
41
41
  ```
42
42
 
43
43
  ## Context And Skill Join
@@ -46,18 +46,18 @@ Use this path when the agent needs identity, selected skills, history, and optio
46
46
 
47
47
  | Need | Package | Use |
48
48
  | --- | --- | --- |
49
- | Prompt assembly | `@mono-agent/context` | Load identity/SOUL/skills/history/memory into deterministic prompt context |
50
- | Selected skill bodies | `@mono-agent/skills` | Load only configured skills from `<skillsRoot>/<name>/SKILL.md` |
51
- | Memory substrate (schema, migrations, FTS+vector db, RRF) | `@mono-agent/memory-store` | SQLite storage, BM25 FTS, optional vector index, hybrid recall; `MemoryStore`/`MemoryBlock`/`MemoryWriteResult` contract |
52
- | Memory engine (all tiers: lite/journal/bujo) | `@mono-agent/memory-bujo` | `BujoMemoryStore` — tier-aware: FTS recall (lite), hybrid recall + decay (journal), LLM capture/reconcile + entity graph + reflection/migration + auto-scheduler (bujo) |
53
- | Embedding providers | `@mono-agent/memory-search` | Ollama/OpenAI embedding providers used by memory-store for vector recall |
49
+ | Prompt assembly | `@mono-agent/agent-harness` | Load identity/SOUL/skills/history/memory into deterministic prompt context |
50
+ | Selected skill bodies | `@mono-agent/agent-harness` | Load only configured skills from `<skillsRoot>/<name>/SKILL.md` |
51
+ | Memory substrate (schema, migrations, FTS+vector db, RRF) | `@mono-agent/memory/store` | SQLite storage, BM25 FTS, optional vector index, hybrid recall; re-exports `MemoryStore`/`MemoryBlock`/`MemoryWriteResult` from `@mono-agent/agent-contracts` |
52
+ | Memory engine (all tiers: lite/journal/bujo) | `@mono-agent/memory/bujo` | `BujoMemoryStore` — tier-aware: FTS recall (lite), hybrid recall + decay (journal), LLM capture/reconcile + entity graph + scheduled consolidation (bujo) |
53
+ | Embedding providers | `@mono-agent/memory/search` | Ollama/OpenAI embedding providers used by the store subpath for vector recall |
54
54
  | Recall tool surface | `@mono-agent/agent-app` (bundled) | Auto-provisions a read-only `memory_recall` tool (hybrid keyword+semantic search) from `config.memory.recallTool.enabled`; spawns the bundled `mono-agent-memory` stdio child using the same memory root + embeddings as the in-app memory |
55
55
 
56
56
  Mono-agent selected skills are not auto-selected by description. The host chooses `context.selectedSkills`, and the harness loads those exact bodies.
57
57
 
58
58
  ## Execution Join
59
59
 
60
- Use `@mono-agent/agent-harness` directly when a host needs custom runtime, memory, history, recorder, or request-scoped runtime options. Use `@mono-agent/agent-host` when config-driven composition is enough.
60
+ Use `@mono-agent/agent-harness` directly when a host needs custom prompt/runtime/memory/history/recorder wiring below the config layer. Use `@mono-agent/agent-app` when config-driven composition is enough.
61
61
 
62
62
  `@mono-agent/agent-harness` owns:
63
63
 
@@ -72,10 +72,10 @@ Use `@mono-agent/agent-harness` directly when a host needs custom runtime, memor
72
72
 
73
73
  ## Tools And MCP Join
74
74
 
75
- Use `@mono-agent/tool-policy` for fail-closed tool/MCP policy normalization:
75
+ Use `@mono-agent/agent-harness` for fail-closed tool/MCP policy normalization:
76
76
 
77
77
  ```ts
78
- import { createToolPolicy, toolPolicyToRuntimeOptions } from "@mono-agent/tool-policy";
78
+ import { createToolPolicy, toolPolicyToRuntimeOptions } from "@mono-agent/agent-harness";
79
79
 
80
80
  const policy = createToolPolicy({
81
81
  allowedTools: ["Read", "Grep"],
@@ -98,25 +98,23 @@ Communication adapters are edge packages. They accept an `AgentResponder` and ow
98
98
  | Slack | `@mono-agent/slack-adapter` | Allowed channel or DM gets a streamed reply |
99
99
  | WhatsApp | `@mono-agent/whatsapp-adapter` | Allowed sender/group trigger produces a reply |
100
100
  | OpenAI-compatible API | `@mono-agent/openai-api-adapter` | `curl /v1/models` and `/v1/chat/completions` |
101
+ | Operator endpoints | `@mono-agent/operator-adapter` | `mono-agent tui` connects; `mono-agent web` observes live runs |
101
102
  | A2A provider/consumer | `@mono-agent/a2a-adapter` | Send text to the Agent Card URL |
102
103
  | Webhook | `@mono-agent/webhook-adapter` | `curl` the configured invocation path |
103
104
  | Cron | `@mono-agent/cron-adapter` | One scheduled or manually triggered invocation |
104
105
 
105
- Adapters must not import the harness, runtime adapter, memory packages (`memory-store`, `memory-bujo`, `memory-search`), or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
106
+ Adapters must not import the harness, runtime adapter, memory package (`@mono-agent/memory` subpaths), or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
106
107
 
107
108
  ## Observability Join
108
109
 
109
110
  Use:
110
111
 
111
- - `@mono-agent/tui` for local terminal chat and redacted read-only config (`mono-agent-tui --config ./mono-agent.config.json`).
112
- - `@mono-agent/observability` for JSONL event artifacts, summaries, and trace-source registration; add `@mono-agent/observability-otel` for the Phoenix OTLP exporter configured via `observability.exporters`.
112
+ - `@mono-agent/tui` for the pi-tui operator console (`mono-agent tui`): live chat with full stream-event insight, recorded-run replay, config view.
113
+ - `@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/observability` for JSONL event artifacts, summaries, trace-source registration, and the `@mono-agent/observability/otel` Phoenix OTLP exporter configured via `observability.exporters`.
113
115
 
114
116
  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; local JSONL artifacts are the fallback otherwise.
115
117
 
116
- ## Evaluation Join
117
-
118
- Use `@mono-agent/agent-evals` to define end-to-end scenarios against a responder or harness: final-text assertions, trajectory/tool-call matching, cost/turn/duration budgets, and custom judges, with local JSON/markdown artifacts. Live-provider scenarios are skipped unless `MONO_AGENT_EVAL_LIVE=1`.
119
-
120
118
  ## Multi-Agent Join
121
119
 
122
120
  Use `@mono-agent/agent-orchestrator` when one runtime should call named collaborator responders through a bounded MCP tool. Keep collaborator selection in the orchestrator layer, not inside A2A. A2A remains direct discovery and text/task communication.