@mono-agent/agent-app 0.12.0 → 0.14.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 (200) hide show
  1. package/README.md +190 -33
  2. package/dist/adapter-send-tools-main.js +0 -1
  3. package/dist/adapter-send-tools-main.js.map +1 -1
  4. package/dist/adapter-send-tools.d.ts +8 -5
  5. package/dist/adapter-send-tools.d.ts.map +1 -1
  6. package/dist/adapter-send-tools.js +195 -257
  7. package/dist/adapter-send-tools.js.map +1 -1
  8. package/dist/app-controller-channels.d.ts.map +1 -1
  9. package/dist/app-controller-channels.js +2 -1
  10. package/dist/app-controller-channels.js.map +1 -1
  11. package/dist/app-controller-continuation.d.ts.map +1 -1
  12. package/dist/app-controller-continuation.js +1 -5
  13. package/dist/app-controller-continuation.js.map +1 -1
  14. package/dist/app-controller-lifecycle.d.ts.map +1 -1
  15. package/dist/app-controller-lifecycle.js +2 -6
  16. package/dist/app-controller-lifecycle.js.map +1 -1
  17. package/dist/app-controller-maintenance.d.ts +2 -1
  18. package/dist/app-controller-maintenance.d.ts.map +1 -1
  19. package/dist/app-controller-maintenance.js +66 -2
  20. package/dist/app-controller-maintenance.js.map +1 -1
  21. package/dist/app-controller-memory-health.d.ts +1 -1
  22. package/dist/app-controller-memory-health.d.ts.map +1 -1
  23. package/dist/app-controller-memory-health.js +5 -1
  24. package/dist/app-controller-memory-health.js.map +1 -1
  25. package/dist/app-controller-responder.d.ts.map +1 -1
  26. package/dist/app-controller-responder.js +12 -4
  27. package/dist/app-controller-responder.js.map +1 -1
  28. package/dist/app-controller-traceability.d.ts.map +1 -1
  29. package/dist/app-controller-traceability.js +15 -1
  30. package/dist/app-controller-traceability.js.map +1 -1
  31. package/dist/app-controller-utils.js +1 -1
  32. package/dist/app-controller-utils.js.map +1 -1
  33. package/dist/app-controller.d.ts +14 -1
  34. package/dist/app-controller.d.ts.map +1 -1
  35. package/dist/app-controller.js +61 -9
  36. package/dist/app-controller.js.map +1 -1
  37. package/dist/audit-runs.d.ts.map +1 -1
  38. package/dist/audit-runs.js +12 -2
  39. package/dist/audit-runs.js.map +1 -1
  40. package/dist/background-environment.d.ts +1 -0
  41. package/dist/background-environment.d.ts.map +1 -1
  42. package/dist/background-environment.js +1 -0
  43. package/dist/background-environment.js.map +1 -1
  44. package/dist/background-runtime.d.ts +39 -2
  45. package/dist/background-runtime.d.ts.map +1 -1
  46. package/dist/background-runtime.js +901 -49
  47. package/dist/background-runtime.js.map +1 -1
  48. package/dist/background.d.ts +36 -3
  49. package/dist/background.d.ts.map +1 -1
  50. package/dist/background.js +404 -57
  51. package/dist/background.js.map +1 -1
  52. package/dist/channel-drivers/cron.js +8 -1
  53. package/dist/channel-drivers/cron.js.map +1 -1
  54. package/dist/channel-drivers/live.d.ts +3 -2
  55. package/dist/channel-drivers/live.d.ts.map +1 -1
  56. package/dist/channel-drivers/live.js +3 -2
  57. package/dist/channel-drivers/live.js.map +1 -1
  58. package/dist/channel-drivers/native-notify.d.ts +2 -0
  59. package/dist/channel-drivers/native-notify.d.ts.map +1 -1
  60. package/dist/channel-drivers/native-notify.js +14 -2
  61. package/dist/channel-drivers/native-notify.js.map +1 -1
  62. package/dist/channel-drivers/slack.d.ts.map +1 -1
  63. package/dist/channel-drivers/slack.js +55 -0
  64. package/dist/channel-drivers/slack.js.map +1 -1
  65. package/dist/channel-drivers/telegram.d.ts.map +1 -1
  66. package/dist/channel-drivers/telegram.js +19 -14
  67. package/dist/channel-drivers/telegram.js.map +1 -1
  68. package/dist/channel-drivers/tui.d.ts.map +1 -1
  69. package/dist/channel-drivers/tui.js +8 -0
  70. package/dist/channel-drivers/tui.js.map +1 -1
  71. package/dist/channel-runtime-controls.d.ts +23 -0
  72. package/dist/channel-runtime-controls.d.ts.map +1 -0
  73. package/dist/channel-runtime-controls.js +63 -0
  74. package/dist/channel-runtime-controls.js.map +1 -0
  75. package/dist/channel-status-display.d.ts +15 -0
  76. package/dist/channel-status-display.d.ts.map +1 -0
  77. package/dist/channel-status-display.js +48 -0
  78. package/dist/channel-status-display.js.map +1 -0
  79. package/dist/cli-args.d.ts +23 -22
  80. package/dist/cli-args.d.ts.map +1 -1
  81. package/dist/cli-args.js +136 -83
  82. package/dist/cli-args.js.map +1 -1
  83. package/dist/cli-background-command.d.ts +1 -0
  84. package/dist/cli-background-command.d.ts.map +1 -1
  85. package/dist/cli-background-command.js +158 -27
  86. package/dist/cli-background-command.js.map +1 -1
  87. package/dist/cli-commands.d.ts +2 -2
  88. package/dist/cli-commands.d.ts.map +1 -1
  89. package/dist/cli-commands.js +27 -59
  90. package/dist/cli-commands.js.map +1 -1
  91. package/dist/cli-help.d.ts +19 -1
  92. package/dist/cli-help.d.ts.map +1 -1
  93. package/dist/cli-help.js +203 -67
  94. package/dist/cli-help.js.map +1 -1
  95. package/dist/cli-init-command.d.ts.map +1 -1
  96. package/dist/cli-init-command.js +4 -18
  97. package/dist/cli-init-command.js.map +1 -1
  98. package/dist/cli-install-skill-command.d.ts.map +1 -1
  99. package/dist/cli-install-skill-command.js +32 -3
  100. package/dist/cli-install-skill-command.js.map +1 -1
  101. package/dist/cli-runs-command.d.ts +10 -0
  102. package/dist/cli-runs-command.d.ts.map +1 -0
  103. package/dist/cli-runs-command.js +66 -0
  104. package/dist/cli-runs-command.js.map +1 -0
  105. package/dist/cli-sandbox-command.d.ts +1 -1
  106. package/dist/cli-sandbox-command.d.ts.map +1 -1
  107. package/dist/cli-sandbox-command.js +14 -2
  108. package/dist/cli-sandbox-command.js.map +1 -1
  109. package/dist/cli-validate-config-command.d.ts +24 -5
  110. package/dist/cli-validate-config-command.d.ts.map +1 -1
  111. package/dist/cli-validate-config-command.js +120 -41
  112. package/dist/cli-validate-config-command.js.map +1 -1
  113. package/dist/config-reference.d.ts.map +1 -1
  114. package/dist/config-reference.js +4 -5
  115. package/dist/config-reference.js.map +1 -1
  116. package/dist/docs-mcp-pairing.d.ts +35 -0
  117. package/dist/docs-mcp-pairing.d.ts.map +1 -0
  118. package/dist/docs-mcp-pairing.js +311 -0
  119. package/dist/docs-mcp-pairing.js.map +1 -0
  120. package/dist/doctor.d.ts +6 -0
  121. package/dist/doctor.d.ts.map +1 -1
  122. package/dist/doctor.js +4 -5
  123. package/dist/doctor.js.map +1 -1
  124. package/dist/install-skill.d.ts +2 -0
  125. package/dist/install-skill.d.ts.map +1 -1
  126. package/dist/install-skill.js +10 -4
  127. package/dist/install-skill.js.map +1 -1
  128. package/dist/interaction-bridge.d.ts +5 -20
  129. package/dist/interaction-bridge.d.ts.map +1 -1
  130. package/dist/interaction-bridge.js +255 -100
  131. package/dist/interaction-bridge.js.map +1 -1
  132. package/dist/launchd.d.ts +35 -1
  133. package/dist/launchd.d.ts.map +1 -1
  134. package/dist/launchd.js +131 -2
  135. package/dist/launchd.js.map +1 -1
  136. package/dist/managed-runtime-publication.d.ts +22 -0
  137. package/dist/managed-runtime-publication.d.ts.map +1 -0
  138. package/dist/managed-runtime-publication.js +91 -0
  139. package/dist/managed-runtime-publication.js.map +1 -0
  140. package/dist/managed-startup.d.ts +8 -0
  141. package/dist/managed-startup.d.ts.map +1 -0
  142. package/dist/managed-startup.js +12 -0
  143. package/dist/managed-startup.js.map +1 -0
  144. package/dist/memory-retrieval.d.ts.map +1 -1
  145. package/dist/memory-retrieval.js +31 -18
  146. package/dist/memory-retrieval.js.map +1 -1
  147. package/dist/metrics.d.ts.map +1 -1
  148. package/dist/metrics.js +12 -2
  149. package/dist/metrics.js.map +1 -1
  150. package/dist/modules/catalog.js +1 -1
  151. package/dist/modules/catalog.js.map +1 -1
  152. package/dist/modules/known-tools.d.ts +1 -1
  153. package/dist/modules/known-tools.d.ts.map +1 -1
  154. package/dist/modules/known-tools.js +0 -3
  155. package/dist/modules/known-tools.js.map +1 -1
  156. package/dist/posted-reply-history.d.ts.map +1 -1
  157. package/dist/posted-reply-history.js +7 -0
  158. package/dist/posted-reply-history.js.map +1 -1
  159. package/dist/request-model-override.d.ts +2 -2
  160. package/dist/request-model-override.js +8 -4
  161. package/dist/request-model-override.js.map +1 -1
  162. package/dist/run-history.d.ts +6 -2
  163. package/dist/run-history.d.ts.map +1 -1
  164. package/dist/run-history.js +511 -118
  165. package/dist/run-history.js.map +1 -1
  166. package/dist/runtime-provenance.d.ts.map +1 -1
  167. package/dist/runtime-provenance.js +10 -5
  168. package/dist/runtime-provenance.js.map +1 -1
  169. package/dist/tui-command.d.ts.map +1 -1
  170. package/dist/tui-command.js +2 -1
  171. package/dist/tui-command.js.map +1 -1
  172. package/dist/ui.js +1 -1
  173. package/dist/ui.js.map +1 -1
  174. package/dist/wizard/from-flags.d.ts +0 -1
  175. package/dist/wizard/from-flags.d.ts.map +1 -1
  176. package/dist/wizard/from-flags.js +1 -8
  177. package/dist/wizard/from-flags.js.map +1 -1
  178. package/dist/wizard/index.d.ts +1 -1
  179. package/dist/wizard/index.d.ts.map +1 -1
  180. package/dist/wizard/index.js +1 -1
  181. package/dist/wizard/index.js.map +1 -1
  182. package/dist/wizard/presets.d.ts +3 -12
  183. package/dist/wizard/presets.d.ts.map +1 -1
  184. package/dist/wizard/presets.js +3 -15
  185. package/dist/wizard/presets.js.map +1 -1
  186. package/dist/wizard/prompts.d.ts.map +1 -1
  187. package/dist/wizard/prompts.js +3 -4
  188. package/dist/wizard/prompts.js.map +1 -1
  189. package/dist/wizard/run.js +3 -3
  190. package/dist/wizard/run.js.map +1 -1
  191. package/package.json +15 -16
  192. package/schema/mono-agent.config.schema.json +4 -4
  193. package/skills/mono-agent-composer/SKILL.md +13 -5
  194. package/skills/mono-agent-composer/agents/openai.yaml +1 -1
  195. package/skills/mono-agent-composer/references/config-blueprint.md +18 -10
  196. package/skills/mono-agent-composer/references/discovery-questions.md +8 -5
  197. package/skills/mono-agent-composer/references/feature-coverage.md +10 -9
  198. package/skills/mono-agent-composer/references/package-map.md +10 -4
  199. package/skills/mono-agent-composer/references/playbooks.md +6 -6
  200. package/skills/mono-agent-composer/references/validation.md +24 -2
package/README.md CHANGED
@@ -3,14 +3,21 @@
3
3
  Config-first mono-agent host. Reads one `mono-agent.config.json` in a folder,
4
4
  builds the configured responder, and starts every configured communication
5
5
  channel plus traceability. Ships the
6
- `mono-agent` CLI (`init`, `auth`, `sandbox`, `validate`, `memory`, `tui`, `web`, `sessions`, `start`) so an agent folder works without
6
+ `mono-agent` CLI (`init`, `auth`, `sandbox`, `validate`, `memory`, `tui`, `web`, `start`) so an agent folder works without
7
7
  hand-written composition code.
8
8
 
9
9
  Setup has two deliberate wall-clock paths: flags or non-TTY input use the fast scaffold-only path (unless explicit `--auth` adds provider setup) and never claim readiness. Bare `mono-agent init` on a TTY makes one real no-tool model call per selected route before committing the scaffold, with timeouts of 90s for each cloud route and 240s for each local route.
10
10
 
11
11
  ## Category
12
12
 
13
+ <!-- package-metadata:start -->
14
+ <!-- Generated by scripts/generate-package-docs.mjs. Do not edit by hand. -->
15
+
13
16
  Category: `app`
17
+ Tier: `core`
18
+ Catalog responsibility: Runs a config-first agent host: loads mono-agent.config.json, owns configured responder/harness/runtime/memory composition, and starts every configured channel and traceability.
19
+
20
+ <!-- package-metadata:end -->
14
21
 
15
22
  ## Responsibility
16
23
 
@@ -23,16 +30,22 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
23
30
  composition
24
31
  (including canonical `runtime.fallbacks` routes and legacy
25
32
  `runtime.fallbackModels` compatibility).
26
- - Preserve completed blocking `AskUser` / `TelegramAskButtons` question,
27
- options, and outcome in the assistant history copy so cold/stateless provider
28
- replay does not lose the out-of-band exchange.
33
+ - Preserve bounded answered/expired `AskUser` evidence in the assistant history
34
+ copy so cold/stateless provider replay does not lose the out-of-band exchange;
35
+ cancelled asks are not journaled.
29
36
  - Expose the request-scoped read-only `RunHistory` tool for safe normalized
30
- evidence from completed prior runs in the current conversation bucket.
37
+ search and paged evidence from completed prior runs in the logical
38
+ conversation, independent of daily rollover buckets.
31
39
  - Drive each channel through a uniform driver contract with per-channel
32
- `disabled` / `waiting_for_config` / `running` / `failed` status.
40
+ `disabled` / `waiting_for_config` / `running` / `degraded` / `failed` status.
41
+ `degraded` means a temporarily unavailable transport owns its recovery while
42
+ the responder remains alive; `failed` is terminal until the host restarts or
43
+ reloads that channel.
33
44
  - Register the host as a traceability source. Config edits are made directly in
34
45
  `mono-agent.config.json`, or proposed through the OS-owner-managed macOS
35
46
  configuration TUI; direct edits take effect on the next `mono-agent restart`.
47
+ - Reconcile installed macOS LaunchAgents at login and every five minutes, and
48
+ make `status` require agreement between the cached trace and launchd's live PID.
36
49
  - Resolve and surface any configured `observability.exporters` (the Phoenix
37
50
  preset): `start`/`status` report the configured endpoint and a note that JSONL
38
51
  artifacts remain local; `validate` performs the live reachability probe. Export
@@ -43,20 +56,29 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
43
56
  - Scaffold (`mono-agent init`) and validate (`mono-agent validate`) agent
44
57
  folders non-destructively.
45
58
  - Operate the machine-wide `@mono-agent/web` assistant-ui console through
46
- `mono-agent web`, and preserve the read-only `@mono-agent/session-web`
47
- recorder under `mono-agent sessions`.
59
+ `mono-agent web`. The `@mono-agent/session-web` recorder still ships but its
60
+ `mono-agent sessions` launcher was removed; use `mono-agent tui`
61
+ (recorded-run replay) or `mono-agent web` (live console).
48
62
 
49
63
  ## Install / Usage
50
64
 
51
65
  ```bash
52
- # inside the workspace
53
- pnpm --filter @mono-agent/agent-app run build
66
+ # Install the scoped CLI host directly:
67
+ npm install --global @mono-agent/agent-app
54
68
 
55
- # guided, readiness-proven setup and run
69
+ # Create an agent folder through the guided, readiness-proven path:
56
70
  cd /path/to/agent-folder
57
- node <workspace>/packages/agent-app/dist/cli.js init
71
+ mono-agent init
72
+ mono-agent validate
73
+ mono-agent start
58
74
  ```
59
75
 
76
+ For a one-off setup without a global install, use
77
+ `npm create mono-agent@latest init`; the `create-mono-agent` alias delegates to this
78
+ same CLI.
79
+
80
+ ### Guided initialization and readiness
81
+
60
82
  On an interactive terminal, bare `mono-agent init` (no flags) runs a colourful,
61
83
  step-by-step wizard — powered by `@clack/prompts` — that asks for the public
62
84
  agent name plus exact Role text for `IDENTITY.md` → `## Role` and composes the capability selection before writing anything. An existing `IDENTITY.md` is preserved and the review says the entered Role will not be written. Escape
@@ -119,7 +141,9 @@ action fails the check.
119
141
  Escape or Ctrl-C interrupts preflight; recovery can resume verified routes when
120
142
  the non-secret plan fingerprint still matches, restart all checks, edit choices,
121
143
  or cancel. Authentication repair clears every prior route proof because it can
122
- replace credential bytes. Guided commit atomically creates the config and rechecks its exact snapshot after validation. On macOS it then creates or refreshes the canonical per-config launchd service, waits for a fresh `startup-complete` trace source, and opens `mono-agent tui --configure` remotely against that same background responder. A background-start failure preserves the committed files, skips the chat, and prints exact `start`, `status`, and `logs --follow` recovery commands plus log paths. Off macOS, conversational configuration is unavailable: the wizard preserves the files and gives manual edit/validate, foreground-start, and ordinary-TUI guidance without claiming readiness. Any flag or non-TTY invocation remains scaffold-only and never starts a process.
144
+ replace credential bytes. Guided commit atomically creates the config and rechecks its exact snapshot after validation. On macOS it then creates or refreshes the canonical per-config launchd service and waits up to 60 seconds for a fresh trace whose durable `metadata.lifecycle.startupCompleted` proof is true. The worker publishes that proof only after channels, memory rituals, and final memory-health work complete; later trace refreshes change the diagnostic `metadata.reason` without revoking readiness. The controller also re-proves the live launchd PID, exact snapshot, current channel/memory health, and reachable TUI before it opens `mono-agent tui --configure` against that background responder. A readiness timeout or trace/TUI-probe error preserves the committed files and skips chat, then unloads the worker plus scheduled maintenance and removes their definitions only when stopped state is proven. If cleanup cannot be proven, the command says that a process may still be running and prints exact `start`, `status`, and `logs --follow` recovery commands plus log paths. Workers from an older release that have no durable lifecycle marker must restart once before configuration can attach. Off macOS, conversational configuration is unavailable: the wizard preserves the files and gives manual edit/validate, foreground-start, and ordinary-TUI guidance without claiming readiness. Any flag or non-TTY invocation remains scaffold-only and never starts a process.
145
+
146
+ ### Managed skills and documentation companion
123
147
 
124
148
  Every scaffold selects versioned `mono-agent-configure` and `mono-agent-memory`
125
149
  skills from `./skills` with index disclosure. `ReadSkill` remains separate from
@@ -133,6 +157,17 @@ The persistent SELF-CONFIG workflow guidance is managed-skill version `1.2.0`.
133
157
  Existing unchanged copies are reported as stale and are never rewritten on TUI
134
158
  startup; run `mono-agent install-skill --project --update` explicitly to refresh them.
135
159
 
160
+ Harness-mode `mono-agent install-skill` also pairs the exact matching
161
+ `@mono-agent/docs-mcp` version with available selected Codex and Claude Code
162
+ CLIs. That read-only companion gives `mono-agent-composer` offline semantic and
163
+ exact-identifier search over the public docs and its authoritative references.
164
+ Use `--no-docs-mcp` for a skill-only install. Managed MCP and skill changes are
165
+ transactional; an unrelated entry named `mono-agent-docs` is never overwritten,
166
+ including with `--force`. Project `--check` / `--update` mode does not touch
167
+ harness MCP configuration.
168
+
169
+ ### Conversational self-configuration
170
+
136
171
  In the separate, visibly marked **SELF-CONFIG** session only, the background app injects proposal-only
137
172
  `ProposeAgentConfiguration`. The opening message shows a user-led map of identity/knowledge,
138
173
  runtime/models, skills/tools/MCP/plugins, memory, channels/APIs/A2A, automation,
@@ -168,6 +203,8 @@ each settled turn receives a fresh opaque proposal capability plus a safe host-o
168
203
  summary. Fast follow-up text remains in the editor until settlement and is never sent
169
204
  as ordinary chat or to a stale endpoint. Remote/proactive channels never receive this tool.
170
205
 
206
+ ### Managed background runtime
207
+
171
208
  Before the first macOS background launch, the CLI copies the exact package and
172
209
  already-resolved dependency closure it is currently executing—including configured
173
210
  channel plugins and the optional Supermemory backend—into an owner-only,
@@ -179,7 +216,18 @@ digest are bound into the runtime marker and verified on every reuse. The Launch
179
216
  `npm create`/npx cache. Existing verified runtime snapshots are reused and
180
217
  retained because another agent may still reference them. A loaded job is fully
181
218
  booted out and bootstrapped again so rewritten arguments and environment are
182
- adopted. Launchd enters Node through `/usr/bin/env -i`, so inherited variables
219
+ adopted. During a slow install, the existing healthy worker remains loaded. An
220
+ active shared installation may take up to five minutes; concurrent consumers
221
+ wait behind its PID/incarnation-aware lock and reuse the resulting closure. An
222
+ owner-private per-instance publication barrier makes any KeepAlive respawn wait
223
+ until the replacement closure and plist are committed; dead or PID-reused
224
+ controller ownership is recovered by process incarnation. The replacement
225
+ plist carries a path-free proof of the finalized marker, and the worker
226
+ revalidates its exact canonical CLI, marker, manifest fingerprint, and launch
227
+ boundary before loading config or channels. Only that verified active closure
228
+ is automatically reopened read-only by app-owned SRT; the runtimes parent and
229
+ historical sibling closures remain outside the implicit policy. Launchd enters
230
+ Node through `/usr/bin/env -i`, so inherited variables
183
231
  such as `NODE_OPTIONS` cannot execute before the worker's allowlisted environment
184
232
  is established. Every foreground worker holds one owner-only lifetime lease for its
185
233
  canonical config, so a managed and manual host cannot run together. A per-config
@@ -191,6 +239,8 @@ name the canonical config. Readiness requires one live launchd-owned trace PID,
191
239
  the exact durable snapshot, and, for configuration, a reachable TUI endpoint.
192
240
  Stop succeeds only after both launchd unload and worker death are proven.
193
241
 
242
+ ### Validation, recovery, and managed logs
243
+
194
244
  `mono-agent validate` (and its `doctor` alias) reports the provenance of the CLI
195
245
  producing the report in its Runtime provenance section: a private managed marker
196
246
  whose freshly recomputed installed closure and coherent current manifest validate
@@ -200,7 +250,27 @@ not an attestation of a separately running daemon.
200
250
 
201
251
  Managed launchd stdout/stderr use a fixed automatic policy: each active file
202
252
  and each of three retained generations is capped at 5 MiB. A separate one-shot
203
- LaunchAgent checks every five minutes. When maintenance is needed it takes the
253
+ LaunchAgent runs at login and every five minutes with no `KeepAlive` and
254
+ `/dev/null` output. It first authenticates its exact launchd-owned PID,
255
+ reconstructs the durable worker environment, validates config, and captures a
256
+ fresh snapshot. It compares the strictly parsed loaded main definition and its
257
+ verified runtime proof with the original controller CLI's inert version/digest;
258
+ it never executes mutable source bytes. If the source disappeared, it can repair
259
+ an inactive or snapshot-drifted worker from its private helper closure without
260
+ claiming an upgrade or downgrading a healthy worker.
261
+
262
+ The helper executes with a closed system `PATH` while carrying the worker's
263
+ non-secret durable `PATH` as a private argument. Recovery therefore preserves
264
+ the worker's toolchain lookup without letting it shadow the helper's own system
265
+ commands.
266
+
267
+ When reconciliation is needed, the existing worker stays loaded through runtime
268
+ installation. The helper then stops only the main job, refreshes both plists,
269
+ bootstraps the main job, and waits for the normal 60-second readiness proof. A
270
+ failure preserves the helper and both definitions for the next scheduled retry;
271
+ explicit stop unloads the helper and removes both definitions after PID-death
272
+ proof, so it cannot resurrect a stopped service. When log maintenance is needed,
273
+ the helper takes the
204
274
  same per-config lifecycle lock, verifies the existing main plist, proves the
205
275
  worker stopped, and commits owner-only bounded tails through per-agent,
206
276
  fsynced deterministic stages plus a recoverable journal. A separate per-agent
@@ -225,6 +295,8 @@ and operational values such as `PATH`/`HOME`. Shell-only provider credentials an
225
295
  config overrides cannot create a success that launchd cannot reproduce; persisted
226
296
  non-secret `MONO_AGENT_*` overrides are rejected by name.
227
297
 
298
+ ### Provider readiness and route safety
299
+
228
300
  Direct Codex discovery checks the executable, login status, and live app-server
229
301
  model catalog without equating catalog availability with authentication or a
230
302
  verified turn. Missing Codex setup points to the official instructions at
@@ -251,14 +323,33 @@ silently drops a required capability. Pi `pi:opencode-go:*` remains a Pi route.
251
323
  Direct OpenCode also requires exact allow-all; restrictive static policies fail
252
324
  validation/runtime and an incompatible dynamic override is warned and ignored.
253
325
 
326
+ ### Run history
327
+
254
328
  `RunHistory` requires no config key. It is automatically available under
255
329
  allow-all on MCP-capable routes; a restrictive `tools.allowedTools` must name
256
- `RunHistory` explicitly (`run_history` remains a deprecated input alias), and
330
+ `RunHistory` explicitly (`run_history` remains a deprecated policy alias), and
257
331
  `disallowedTools` can remove it. Direct OpenCode and other MCP-incompatible
258
- routes suppress it. Its `list` and `inspect` actions can read only completed
259
- prior runs in the exact current conversation bucket and return bounded,
260
- normalized evidence. Structured projected values first pass through the shared
261
- observability redactor: non-numeric values under sensitive-looking object keys
332
+ routes suppress it. The agent-facing shorthand is `{}` to list recent runs,
333
+ `{ "query": "topic terms" }` to search safe trigger and summary metadata,
334
+ `{ "runId": "..." }` for a compact overview, and
335
+ `{ "runId": "...", "cursor": "..." }` for the next timeline page. The
336
+ `run_id` spelling and explicit `action: "list" | "search" | "inspect"` remain
337
+ compatible. List/search defaults to 5 results (maximum 10); timeline pages hold
338
+ at most 10 entries and about 16 KiB. Each result includes tool-authored
339
+ `navigation.guidance` and exact `navigation.nextActions[].arguments` for
340
+ continuing exploration.
341
+ List and search read retained summaries once; search never reads event JSONL
342
+ and matches all normalized terms only against sanitized trigger/user input,
343
+ run id, dates, status/failure kind, source/detail, model, and effort. Daily
344
+ session rollover buckets are treated as one logical conversation when rollover
345
+ is configured, while current/running runs and unrelated conversations or
346
+ threads stay unavailable. Inspect returns metadata, trigger, final visible
347
+ output, warning/failure summaries, and tool-name call/error counts before any
348
+ timeline detail is requested. Timeline continuation is cursor-paged, and nested
349
+ `RunHistory` result bodies are omitted to prevent recursive expansion.
350
+ All returned historical evidence is bounded and normalized. Structured
351
+ projected values first pass through the shared observability redactor:
352
+ non-numeric values under sensitive-looking object keys
262
353
  are redacted; numeric values under matched keys are retained; free text is not
263
354
  content-scanned or scrubbed. `RunHistory` then applies an additional projection
264
355
  sanitizer. In that second pass, numeric values under `credential`, `private_key`,
@@ -267,19 +358,30 @@ and `bearer` can remain visible; numeric values under `apiKey`, `token`,
267
358
  Assignment-shaped password or secret prose is content-scanned and replaced with
268
359
  the diagnostic or tool-result omission sentinel. An optionally quoted assignment
269
360
  value is exempt only when its complete value is exactly `[redacted]`; any prefix
270
- or suffix is omitted. Results exclude the
271
- current/running run, other conversations or rollover buckets, system prompts,
272
- reasoning, recalled memory, turn-context payloads, and raw artifact paths;
273
- historical text is marked untrusted.
361
+ or suffix is omitted. Results exclude the current/running run, unrelated
362
+ conversations or threads, system prompts, reasoning, recalled memory,
363
+ turn-context payloads, and raw artifact paths; historical text is marked
364
+ untrusted.
365
+
366
+ ### Channel interactions and conversation history
274
367
 
275
368
  For missing context, the agent should use active conversation history first,
276
369
  `MemoryRecall` for intentionally captured durable facts, and `RunHistory` for
277
- exact prior-run/tool evidence. Completed blocking `AskUser` and
278
- `TelegramAskButtons` exchanges are written into the assistant history copy
279
- before the final response, explicitly labelled as untrusted historical data and
280
- bounded by newest whole interactions, without changing the outward message or
281
- long-term memory capture. `TelegramAskButtons` with `wait: false` continues to produce a
282
- synthetic next turn when the user taps later.
370
+ exact prior-run/tool evidence. Answered or expired blocking `AskUser` exchanges
371
+ are written into the assistant history copy before the final response;
372
+ cancelled asks are not journaled. The copy is explicitly labelled as untrusted
373
+ historical data and bounded by newest whole interactions. If the newest valid
374
+ entry is oversized, its option descriptions may be omitted while its questions,
375
+ outcome, and answers stay whole. This does not change the outward message or
376
+ long-term memory capture. The strict tool accepts one to five structured
377
+ questions, each with two or three described options and an optional multi-select
378
+ mode. Slack and Telegram present the questions sequentially with native buttons
379
+ plus a typed custom reply; the web console renders the whole question set as one
380
+ form. The built-in Telegram `/new` command uses the configured responder's
381
+ host-owned reset surface to clear only that conversation and force
382
+ skill/startup-context reload on its next turn.
383
+
384
+ ### Memory health and maintenance
283
385
 
284
386
  The app publishes a cached, content-free `memoryHealth` snapshot in the primary
285
387
  trace-source heartbeat and any enabled best-effort global mirror. Built-in
@@ -329,8 +431,9 @@ a declared but missing variable stays `waiting` and never retries keyless.
329
431
  Changing provider, model, or dimension on an existing root requires a stopped,
330
432
  config-aware `mono-agent memory rebuild --json`. BuJo uses the selected
331
433
  embeddings service independently from its explicit capture LLM (`agent-host` in
332
- generated configs, or an authored Ollama block). The advanced standalone
333
- `memory-bujo migrate` command remains Ollama-only and outside guided init.
434
+ generated configs, or an authored Ollama block). The standalone `memory-bujo`
435
+ maintenance CLI has been removed; run every memory operation config-aware through
436
+ `mono-agent memory <subcommand>` from the agent folder.
334
437
  `retry` makes dead/delayed intake due for the
335
438
  next store start; `resolve` explicitly abandons one item without claiming
336
439
  capture succeeded, keeps permanent duplicate protection, and refuses a retained
@@ -343,6 +446,8 @@ death blocks normal writers until recovery resumes. Explicit restore refuses to
343
446
  overwrite any durable change made after cleanup and atomically consumes the
344
447
  verified sibling snapshot without constructing a third full copy.
345
448
 
449
+ ### Fleet verification
450
+
346
451
  For launchd fleet verification, invoke the deployed CLI with each plist's exact
347
452
  `ProgramArguments[0]` Node, `[1]` CLI, absolute `--config`/`--env-file`, and
348
453
  managed `PATH`. Probe children retain only launchd-safe operational environment
@@ -351,7 +456,7 @@ proxy overrides are not fleet evidence. The current fleet contract is Node
351
456
  `24.15.0`, modules ABI `137`; an ambient shell Node or environment is not
352
457
  evidence that the service can load the native memory modules.
353
458
 
354
- Programmatic:
459
+ ### Programmatic embedding
355
460
 
356
461
  ```ts
357
462
  import { startMonoAgentApp } from "@mono-agent/agent-app";
@@ -361,8 +466,50 @@ console.log(app.channelStatuses());
361
466
  await app.stop();
362
467
  ```
363
468
 
469
+ ## Architecture
470
+
471
+ ### Data flow
472
+
473
+ `@mono-agent/agent-app` is the composition root. A running host follows this
474
+ path:
475
+
476
+ 1. Resolve built-in and configured plugin `ChannelDriver`s, then load each
477
+ channel's config together with the shared core config.
478
+ 2. Build a separate configured responder for each active channel. The responder
479
+ composes the runtime, harness, memory, tool/MCP policy, conversation history,
480
+ recorder, and request-scoped extensions.
481
+ 3. Start every driver in parallel. Each driver normalizes transport input into
482
+ the shared request/stream contract and returns a `RunningChannel` handle.
483
+ 4. Publish traceability, exporter, sandbox, continuation, and memory-health
484
+ state while the controller tracks channel states as `disabled`,
485
+ `waiting_for_config`, `running`, `degraded`, or `failed`.
486
+ 5. On stop or reload, stop the transport first, then dispose its responder so
487
+ queued turns and warm provider sessions cannot outlive the config snapshot.
488
+
489
+ ### Package structure
490
+
491
+ | Area | Modules | Purpose |
492
+ | --- | --- | --- |
493
+ | Stable host facade | `app.ts`, `app-controller*.ts` | Startup, status, reload, channel lifecycle, traceability, and teardown. |
494
+ | Configured agent | `configured-agent.ts`, `app-controller-responder.ts` | Runtime, harness, memory, history, tools, and recorder composition. |
495
+ | Channel integration | `channels.ts`, `channel-drivers/` | Built-in drivers plus config-loaded plugin resolution. |
496
+ | Interaction and send tools | `interaction-bridge.ts`, `adapter-send-tools*.ts` | Structured `AskUser` state, channel sinks, progress, adapter-send tools, and bounded interaction-history projection. |
497
+ | Operator CLI | `cli*.ts`, `init.ts`, `doctor.ts`, `background*.ts` | Setup, validation, managed service lifecycle, and diagnostics. |
498
+ | Host services | `run-history.ts`, `continuation*.ts`, `memory-*.ts` | Bounded prior-run evidence, durable continuations, and memory operations. |
499
+
364
500
  ## Public API
365
501
 
502
+ ### Start here
503
+
504
+ | Need | Primary API |
505
+ | --- | --- |
506
+ | Start or stop a config-first host | `startMonoAgentApp`, `MonoAgentApp`, `MonoAgentAppOptions` |
507
+ | Build only the configured execution stack | `createConfiguredAgentResponder`, `createConfiguredAgentHarness`, `createConfiguredAgentRuntime`, `createConfiguredMemory` |
508
+ | Embed selected built-in channels | `defaultChannelDrivers`, `resolveChannelDrivers`, `createTelegramChannelDriver`, `createSlackChannelDriver`, `createWebhookChannelDriver`, `createOpenAIApiChannelDriver`, `createCronChannelDriver` |
509
+ | Scaffold or validate an agent folder | `initMonoAgentFolder`, `validateMonoAgentFolder` |
510
+ | Add bounded prior-run inspection | `createRunHistoryRuntimeExtension`, `isRunHistoryToolAllowed` |
511
+ | Operate the CLI programmatically | `runCli`, `parseCliArgs`, `renderHelp` |
512
+
366
513
  <!-- public-api-inventory:start -->
367
514
  <!-- Generated by scripts/generate-public-api-docs.mjs. Do not edit by hand. -->
368
515
 
@@ -555,6 +702,16 @@ compose communication adapters; adapters never depend on it.
555
702
  `@mono-agent/agent-harness` and `@mono-agent/runtime-adapter`).
556
703
  - Multi-agent orchestration (owned by `@mono-agent/agent-orchestrator`).
557
704
 
705
+ ## Related Documentation
706
+
707
+ - [Quickstart](https://mono-agent-docs.vercel.app/getting-started/quickstart/)
708
+ - [Agent folder layout](https://mono-agent-docs.vercel.app/config/folder-layout/)
709
+ - [Configuration blueprint](https://mono-agent-docs.vercel.app/config/blueprint/)
710
+ - [CLI reference](https://mono-agent-docs.vercel.app/observability/cli-reference/)
711
+ - [Programmatic composition](https://mono-agent-docs.vercel.app/programmatic/composition/)
712
+ - [Channels](https://mono-agent-docs.vercel.app/channels/)
713
+ - [Package source and generated API inventory](https://github.com/robertsreberski/mono-agent/tree/main/packages/agent-app)
714
+
558
715
  ## Verification
559
716
 
560
717
  ```bash
@@ -13,7 +13,6 @@ async function main() {
13
13
  const proxy = createAdapterSendProxy(process.env, {
14
14
  directLoopbackUrls: [
15
15
  settings.telegram?.apiRoot,
16
- settings.telegram?.askBridge?.bridgeUrl,
17
16
  settings.askUser?.bridgeUrl,
18
17
  childConfig.deliveryHistory?.bridgeUrl,
19
18
  ].filter((value) => value !== undefined),
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-send-tools-main.js","sourceRoot":"","sources":["../src/adapter-send-tools-main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EACL,sBAAsB,EACtB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kCAAkC,EAClC,6BAA6B,EAC7B,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AAEjC,KAAK,UAAU,IAAI;IACjB,MAAM,WAAW,GAAG,kCAAkC,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnF,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CAAC,WAAW,CAAC,KAAK,EAAE;QACxE,YAAY,EAAE,WAAW,CAAC,YAAY;KACvC,CAAC,CAAC;IACH,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,MAAM,KAAK,GAAG,sBAAsB,CAAC,OAAO,CAAC,GAAG,EAAE;QAChD,kBAAkB,EAAE;YAClB,QAAQ,CAAC,QAAQ,EAAE,OAAO;YAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,S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K,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3G,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -29,11 +29,9 @@ export interface TelegramSendToolSettings {
29
29
  /** Which telegram tools the policy permits (the adapter config gates the rest). */
30
30
  readonly tools: {
31
31
  readonly send: boolean;
32
- readonly ask: boolean;
33
32
  /** The single TelegramSendFile tool (document + photo via a `kind` param). */
34
33
  readonly file: boolean;
35
34
  };
36
- readonly askBridge?: AskUserToolSettings;
37
35
  readonly sendTools?: {
38
36
  readonly scope?: "producing-conversation";
39
37
  readonly pathScope?: "run-output";
@@ -56,7 +54,8 @@ export interface AskUserToolSettings {
56
54
  readonly bridgeUrl: string;
57
55
  readonly bridgeToken: string;
58
56
  readonly timeoutMs: number;
59
- readonly conversationId?: string;
57
+ readonly producerConversationId?: string;
58
+ readonly interactionConversationId?: string;
60
59
  readonly runId?: string;
61
60
  }
62
61
  export interface AdapterSendToolsSettings {
@@ -66,7 +65,7 @@ export interface AdapterSendToolsSettings {
66
65
  }
67
66
  export interface AdapterSendToolsClients {
68
67
  readonly slack?: Pick<SlackWebApi, "chatPostMessage">;
69
- readonly telegram?: Pick<TelegramMessageSender, "sendMessage" | "sendDocument" | "sendPhoto" | "editMessageText">;
68
+ readonly telegram?: Partial<Pick<TelegramMessageSender, "sendMessage" | "sendDocument" | "sendPhoto">>;
70
69
  }
71
70
  export interface AdapterSendToolsHttpOptions {
72
71
  readonly fetchImpl?: typeof fetch;
@@ -107,6 +106,9 @@ export interface AdapterSendToolsIndexing {
107
106
  interface AdapterSendToolsRequestInput {
108
107
  readonly request?: {
109
108
  readonly conversationId?: string;
109
+ readonly replyTo?: {
110
+ readonly conversationId?: string;
111
+ };
110
112
  };
111
113
  readonly runId?: string;
112
114
  }
@@ -116,7 +118,7 @@ export interface AdapterSendToolsResolveOptions {
116
118
  readonly logger?: {
117
119
  warn?: (message: string, metadata?: Record<string, unknown>) => void;
118
120
  } | undefined;
119
- /** Suppress bridge-backed AskUser/TelegramAskButtons for MCP-incompatible routes. */
121
+ /** Suppress bridge-backed AskUser for MCP-incompatible routes. */
120
122
  readonly suppressInteractionTools?: boolean | undefined;
121
123
  /** App-owned master bridge settings; never sourced from project MCP config. */
122
124
  readonly interaction?: AdapterSendToolsInteractionEnv | undefined;
@@ -139,6 +141,7 @@ export declare function isAdapterSendToolAllowed(name: string, policy: {
139
141
  */
140
142
  export interface AdapterSendToolsChildContext {
141
143
  readonly conversationId?: string;
144
+ readonly interactionConversationId?: string;
142
145
  readonly runId?: string;
143
146
  readonly indexPath?: string;
144
147
  readonly runOutputDir?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-send-tools.d.ts","sourceRoot":"","sources":["../src/adapter-send-tools.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAGV,qBAAqB,EAGtB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAkB/D;;;;;;;;;GASG;AAEH,eAAO,MAAM,kCAAkC,4BAA4B,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,aAAa,EAAE,OAAO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