@mono-agent/agent-app 0.20.14 → 0.21.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 (262) hide show
  1. package/README.md +227 -80
  2. package/dist/adapter-send-tools.d.ts +3 -2
  3. package/dist/adapter-send-tools.d.ts.map +1 -1
  4. package/dist/adapter-send-tools.js +15 -5
  5. package/dist/adapter-send-tools.js.map +1 -1
  6. package/dist/app-controller-channels.d.ts +2 -0
  7. package/dist/app-controller-channels.d.ts.map +1 -1
  8. package/dist/app-controller-channels.js +10 -1
  9. package/dist/app-controller-channels.js.map +1 -1
  10. package/dist/app-controller-maintenance.d.ts +3 -1
  11. package/dist/app-controller-maintenance.d.ts.map +1 -1
  12. package/dist/app-controller-maintenance.js +3 -0
  13. package/dist/app-controller-maintenance.js.map +1 -1
  14. package/dist/app-controller-responder.d.ts +2 -0
  15. package/dist/app-controller-responder.d.ts.map +1 -1
  16. package/dist/app-controller-responder.js +21 -17
  17. package/dist/app-controller-responder.js.map +1 -1
  18. package/dist/app-controller-traceability.d.ts.map +1 -1
  19. package/dist/app-controller-traceability.js +3 -0
  20. package/dist/app-controller-traceability.js.map +1 -1
  21. package/dist/app-controller-types.d.ts +1 -0
  22. package/dist/app-controller-types.d.ts.map +1 -1
  23. package/dist/app-controller.d.ts +2 -0
  24. package/dist/app-controller.d.ts.map +1 -1
  25. package/dist/app-controller.js +3 -0
  26. package/dist/app-controller.js.map +1 -1
  27. package/dist/artifact-retention.js +11 -0
  28. package/dist/artifact-retention.js.map +1 -1
  29. package/dist/background.d.ts +0 -6
  30. package/dist/background.d.ts.map +1 -1
  31. package/dist/background.js +5 -58
  32. package/dist/background.js.map +1 -1
  33. package/dist/channel-drivers/tui.d.ts +2 -2
  34. package/dist/channel-drivers/tui.d.ts.map +1 -1
  35. package/dist/channel-drivers/tui.js +27 -8
  36. package/dist/channel-drivers/tui.js.map +1 -1
  37. package/dist/cli-args.d.ts +4 -5
  38. package/dist/cli-args.d.ts.map +1 -1
  39. package/dist/cli-args.js +20 -19
  40. package/dist/cli-args.js.map +1 -1
  41. package/dist/cli-background-command.d.ts.map +1 -1
  42. package/dist/cli-background-command.js +4 -0
  43. package/dist/cli-background-command.js.map +1 -1
  44. package/dist/cli-commands.d.ts.map +1 -1
  45. package/dist/cli-commands.js +13 -2
  46. package/dist/cli-commands.js.map +1 -1
  47. package/dist/cli-help.d.ts.map +1 -1
  48. package/dist/cli-help.js +33 -19
  49. package/dist/cli-help.js.map +1 -1
  50. package/dist/cli-init-command.d.ts.map +1 -1
  51. package/dist/cli-init-command.js +26 -22
  52. package/dist/cli-init-command.js.map +1 -1
  53. package/dist/cli-install-skill-command.d.ts.map +1 -1
  54. package/dist/cli-install-skill-command.js +12 -3
  55. package/dist/cli-install-skill-command.js.map +1 -1
  56. package/dist/config-reference.d.ts +1 -0
  57. package/dist/config-reference.d.ts.map +1 -1
  58. package/dist/config-reference.js +66 -10
  59. package/dist/config-reference.js.map +1 -1
  60. package/dist/configured-agent.d.ts +9 -1
  61. package/dist/configured-agent.d.ts.map +1 -1
  62. package/dist/configured-agent.js +95 -29
  63. package/dist/configured-agent.js.map +1 -1
  64. package/dist/cron-control-store.d.ts.map +1 -1
  65. package/dist/cron-control-store.js +4 -2
  66. package/dist/cron-control-store.js.map +1 -1
  67. package/dist/doctor.d.ts.map +1 -1
  68. package/dist/doctor.js +215 -45
  69. package/dist/doctor.js.map +1 -1
  70. package/dist/index.d.ts +2 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +1 -0
  73. package/dist/index.js.map +1 -1
  74. package/dist/interaction-bridge.d.ts +3 -3
  75. package/dist/interaction-bridge.d.ts.map +1 -1
  76. package/dist/interaction-bridge.js +27 -10
  77. package/dist/interaction-bridge.js.map +1 -1
  78. package/dist/launchd.d.ts +2 -0
  79. package/dist/launchd.d.ts.map +1 -1
  80. package/dist/launchd.js +3 -0
  81. package/dist/launchd.js.map +1 -1
  82. package/dist/local-tui-session.d.ts +14 -0
  83. package/dist/local-tui-session.d.ts.map +1 -0
  84. package/dist/local-tui-session.js +100 -0
  85. package/dist/local-tui-session.js.map +1 -0
  86. package/dist/mcp-apps.d.ts.map +1 -1
  87. package/dist/mcp-apps.js +3 -0
  88. package/dist/mcp-apps.js.map +1 -1
  89. package/dist/memory-journal.d.ts +53 -0
  90. package/dist/memory-journal.d.ts.map +1 -0
  91. package/dist/memory-journal.js +586 -0
  92. package/dist/memory-journal.js.map +1 -0
  93. package/dist/memory-recall.d.ts.map +1 -1
  94. package/dist/memory-recall.js +16 -2
  95. package/dist/memory-recall.js.map +1 -1
  96. package/dist/memory-retrieval.d.ts +9 -0
  97. package/dist/memory-retrieval.d.ts.map +1 -1
  98. package/dist/memory-retrieval.js +20 -0
  99. package/dist/memory-retrieval.js.map +1 -1
  100. package/dist/modules/base.js +1 -1
  101. package/dist/modules/base.js.map +1 -1
  102. package/dist/modules/known-tools.d.ts +1 -1
  103. package/dist/modules/known-tools.d.ts.map +1 -1
  104. package/dist/modules/known-tools.js +1 -0
  105. package/dist/modules/known-tools.js.map +1 -1
  106. package/dist/monitors-command.js +12 -2
  107. package/dist/monitors-command.js.map +1 -1
  108. package/dist/monitors-config.d.ts +4 -1
  109. package/dist/monitors-config.d.ts.map +1 -1
  110. package/dist/monitors-config.js +5 -1
  111. package/dist/monitors-config.js.map +1 -1
  112. package/dist/monitors-context.d.ts.map +1 -1
  113. package/dist/monitors-context.js +14 -2
  114. package/dist/monitors-context.js.map +1 -1
  115. package/dist/monitors-service.d.ts +2 -2
  116. package/dist/monitors-service.d.ts.map +1 -1
  117. package/dist/monitors-service.js +227 -96
  118. package/dist/monitors-service.js.map +1 -1
  119. package/dist/monitors-store.d.ts +11 -1
  120. package/dist/monitors-store.d.ts.map +1 -1
  121. package/dist/monitors-store.js +36 -6
  122. package/dist/monitors-store.js.map +1 -1
  123. package/dist/notify-destinations.d.ts +3 -2
  124. package/dist/notify-destinations.d.ts.map +1 -1
  125. package/dist/notify-destinations.js +6 -7
  126. package/dist/notify-destinations.js.map +1 -1
  127. package/dist/posted-reply-history.d.ts.map +1 -1
  128. package/dist/posted-reply-history.js +40 -3
  129. package/dist/posted-reply-history.js.map +1 -1
  130. package/dist/proactive-notify.d.ts +20 -1
  131. package/dist/proactive-notify.d.ts.map +1 -1
  132. package/dist/proactive-notify.js +56 -3
  133. package/dist/proactive-notify.js.map +1 -1
  134. package/dist/process-job-channel-routing.js +2 -1
  135. package/dist/process-job-channel-routing.js.map +1 -1
  136. package/dist/process-job-output-tail.d.ts +53 -0
  137. package/dist/process-job-output-tail.d.ts.map +1 -0
  138. package/dist/process-job-output-tail.js +257 -0
  139. package/dist/process-job-output-tail.js.map +1 -0
  140. package/dist/process-jobs-config.d.ts +1 -1
  141. package/dist/process-jobs-config.js +1 -1
  142. package/dist/process-jobs-config.js.map +1 -1
  143. package/dist/process-jobs-context.d.ts +3 -1
  144. package/dist/process-jobs-context.d.ts.map +1 -1
  145. package/dist/process-jobs-context.js +44 -11
  146. package/dist/process-jobs-context.js.map +1 -1
  147. package/dist/process-jobs-runtime.d.ts.map +1 -1
  148. package/dist/process-jobs-runtime.js +14 -0
  149. package/dist/process-jobs-runtime.js.map +1 -1
  150. package/dist/process-jobs-service.d.ts.map +1 -1
  151. package/dist/process-jobs-service.js +115 -23
  152. package/dist/process-jobs-service.js.map +1 -1
  153. package/dist/process-jobs-store.d.ts +3 -1
  154. package/dist/process-jobs-store.d.ts.map +1 -1
  155. package/dist/process-jobs-store.js +4 -1
  156. package/dist/process-jobs-store.js.map +1 -1
  157. package/dist/process-output-redaction.d.ts +26 -1
  158. package/dist/process-output-redaction.d.ts.map +1 -1
  159. package/dist/process-output-redaction.js +164 -2
  160. package/dist/process-output-redaction.js.map +1 -1
  161. package/dist/project-skills.d.ts +11 -5
  162. package/dist/project-skills.d.ts.map +1 -1
  163. package/dist/project-skills.js +88 -39
  164. package/dist/project-skills.js.map +1 -1
  165. package/dist/provider-auth-checks.d.ts +27 -0
  166. package/dist/provider-auth-checks.d.ts.map +1 -0
  167. package/dist/provider-auth-checks.js +349 -0
  168. package/dist/provider-auth-checks.js.map +1 -0
  169. package/dist/provider-auth-observations.d.ts +22 -0
  170. package/dist/provider-auth-observations.d.ts.map +1 -0
  171. package/dist/provider-auth-observations.js +139 -0
  172. package/dist/provider-auth-observations.js.map +1 -0
  173. package/dist/provider-auth-operator.d.ts +19 -0
  174. package/dist/provider-auth-operator.d.ts.map +1 -0
  175. package/dist/provider-auth-operator.js +560 -0
  176. package/dist/provider-auth-operator.js.map +1 -0
  177. package/dist/provider-auth-status.d.ts +20 -0
  178. package/dist/provider-auth-status.d.ts.map +1 -0
  179. package/dist/provider-auth-status.js +235 -0
  180. package/dist/provider-auth-status.js.map +1 -0
  181. package/dist/provider-model-catalog.d.ts +17 -0
  182. package/dist/provider-model-catalog.d.ts.map +1 -1
  183. package/dist/provider-model-catalog.js +113 -2
  184. package/dist/provider-model-catalog.js.map +1 -1
  185. package/dist/provider-setup.d.ts +22 -0
  186. package/dist/provider-setup.d.ts.map +1 -1
  187. package/dist/provider-setup.js +101 -15
  188. package/dist/provider-setup.js.map +1 -1
  189. package/dist/reply-artifacts.d.ts +3 -1
  190. package/dist/reply-artifacts.d.ts.map +1 -1
  191. package/dist/reply-artifacts.js +45 -10
  192. package/dist/reply-artifacts.js.map +1 -1
  193. package/dist/request-model-override.d.ts +11 -2
  194. package/dist/request-model-override.d.ts.map +1 -1
  195. package/dist/request-model-override.js +51 -1
  196. package/dist/request-model-override.js.map +1 -1
  197. package/dist/request-scoped-mcp.d.ts +3 -0
  198. package/dist/request-scoped-mcp.d.ts.map +1 -1
  199. package/dist/request-scoped-mcp.js +1 -1
  200. package/dist/request-scoped-mcp.js.map +1 -1
  201. package/dist/run-history.d.ts.map +1 -1
  202. package/dist/run-history.js +56 -13
  203. package/dist/run-history.js.map +1 -1
  204. package/dist/seen-conversations.d.ts +4 -3
  205. package/dist/seen-conversations.d.ts.map +1 -1
  206. package/dist/seen-conversations.js +6 -5
  207. package/dist/seen-conversations.js.map +1 -1
  208. package/dist/session-history.d.ts +14 -0
  209. package/dist/session-history.d.ts.map +1 -1
  210. package/dist/session-history.js +120 -5
  211. package/dist/session-history.js.map +1 -1
  212. package/dist/systemd-command.d.ts +8 -0
  213. package/dist/systemd-command.d.ts.map +1 -0
  214. package/dist/systemd-command.js +206 -0
  215. package/dist/systemd-command.js.map +1 -0
  216. package/dist/systemd.d.ts +51 -0
  217. package/dist/systemd.d.ts.map +1 -0
  218. package/dist/systemd.js +299 -0
  219. package/dist/systemd.js.map +1 -0
  220. package/dist/tool-output-artifacts.d.ts +4 -0
  221. package/dist/tool-output-artifacts.d.ts.map +1 -0
  222. package/dist/tool-output-artifacts.js +17 -0
  223. package/dist/tool-output-artifacts.js.map +1 -0
  224. package/dist/tui-command.d.ts +0 -45
  225. package/dist/tui-command.d.ts.map +1 -1
  226. package/dist/tui-command.js +27 -264
  227. package/dist/tui-command.js.map +1 -1
  228. package/dist/untrusted-text.js +2 -2
  229. package/dist/web-command.d.ts +3 -0
  230. package/dist/web-command.d.ts.map +1 -1
  231. package/dist/web-command.js +112 -7
  232. package/dist/web-command.js.map +1 -1
  233. package/dist/web-request-coordinator.d.ts +19 -0
  234. package/dist/web-request-coordinator.d.ts.map +1 -0
  235. package/dist/web-request-coordinator.js +242 -0
  236. package/dist/web-request-coordinator.js.map +1 -0
  237. package/dist/wizard/prompts.d.ts.map +1 -1
  238. package/dist/wizard/prompts.js +1 -0
  239. package/dist/wizard/prompts.js.map +1 -1
  240. package/dist/wizard/run.js +1 -1
  241. package/dist/wizard/run.js.map +1 -1
  242. package/package.json +18 -18
  243. package/schema/mono-agent.config.schema.json +120 -8
  244. package/skills/mono-agent-composer/SKILL.md +4 -4
  245. package/skills/mono-agent-composer/references/config-blueprint.md +18 -7
  246. package/skills/mono-agent-composer/references/discovery-questions.md +10 -5
  247. package/skills/mono-agent-composer/references/feature-coverage.md +30 -14
  248. package/skills/mono-agent-composer/references/package-map.md +6 -3
  249. package/skills/mono-agent-composer/references/playbooks.md +20 -5
  250. package/skills/mono-agent-composer/references/validation.md +4 -3
  251. package/dist/configuration-proposal-main.d.ts +0 -3
  252. package/dist/configuration-proposal-main.d.ts.map +0 -1
  253. package/dist/configuration-proposal-main.js +0 -13
  254. package/dist/configuration-proposal-main.js.map +0 -1
  255. package/dist/configuration-proposal-tool.d.ts +0 -33
  256. package/dist/configuration-proposal-tool.d.ts.map +0 -1
  257. package/dist/configuration-proposal-tool.js +0 -180
  258. package/dist/configuration-proposal-tool.js.map +0 -1
  259. package/dist/local-configuration.d.ts +0 -99
  260. package/dist/local-configuration.d.ts.map +0 -1
  261. package/dist/local-configuration.js +0 -1302
  262. package/dist/local-configuration.js.map +0 -1
package/README.md CHANGED
@@ -32,8 +32,17 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
32
32
  - Preserve bounded answered/expired `AskUser` evidence in the assistant history
33
33
  copy so cold/stateless provider replay does not lose the out-of-band exchange;
34
34
  cancelled asks are not journaled.
35
+ - Publish the harness's bounded, redacted continuity account for every admitted
36
+ non-isolated turn that settles as cancelled or failed before its success
37
+ commit. Cancellation preserves operator, shutdown, stale-session, signal,
38
+ timeout, generic, and unrecorded-reason provenance; failure records a trusted
39
+ host settlement category while bounding/redacting runtime/provider code and
40
+ detail as untrusted evidence. Eligible durable Pi recovery retains native context
41
+ without appending the account to Pi; cold reseed includes the account. The
42
+ on-disk history shape is unchanged by recovery;
43
+ `RunHistory` and `SessionHistory` remain the deeper evidence paths.
35
44
  - Expose the request-scoped read-only `RunHistory` tool for safe normalized
36
- search and paged evidence from completed prior runs in the logical
45
+ recovery, search, and paged evidence from settled prior runs in the logical
37
46
  conversation, independent of daily rollover buckets.
38
47
  - Expose the sibling request-scoped read-only `SessionHistory` tool over the
39
48
  harness's canonical retained managed-tool lifecycle sidecar.
@@ -45,7 +54,8 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
45
54
  Slack/Telegram/web/WhatsApp wake routing with exact active-run steering and a
46
55
  reserved visible normal-turn fallback,
47
56
  wake with age-bounded busy deferrals, bounded pending/store materialization,
48
- stable secret-free safety errors, native same-message lifecycle surfaces,
57
+ stable secret-free safety errors, a memory-only redacted live output tail,
58
+ native same-message lifecycle surfaces,
49
59
  fail-closed live store health, a bounded monotonic registry that seals every
50
60
  retained state root even after disable or reconfiguration, bounded locked
51
61
  recovery through a fixed-name owner-private sibling directory while request
@@ -64,6 +74,10 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
64
74
  tool-capable wake turns; web uses ordinary assistant turns rather than a
65
75
  Monitor card, and shares one per-thread serialization lane with ProcessJobs
66
76
  wakes and queued user follow-ups.
77
+ Optional batch deduplication and wake intervals suppress unnecessary inference;
78
+ exit-only watches deliver one terminal wake. The host clamps intervals through
79
+ `monitors.maxWakeIntervalMs` (default/cap 300000) and exposes durable suppression
80
+ and delivery-disposition counters. `maxChainDepth` defaults to 4, with cap 64.
67
81
  - Drive each channel through a uniform driver contract with per-channel
68
82
  `disabled` / `waiting_for_config` / `running` / `degraded` / `failed` status.
69
83
  `degraded` means a temporarily unavailable transport owns its recovery while
@@ -77,8 +91,8 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
77
91
  actions are config-opt-in, API-key-protected, and explicitly confirmed; they
78
92
  never rewrite config, environment, or Markdown job sources.
79
93
  - Register the host as a traceability source. Config edits are made directly in
80
- `mono-agent.config.json`, or proposed through the OS-owner-managed macOS
81
- configuration TUI; direct edits take effect on the next `mono-agent restart`.
94
+ `mono-agent.config.json` or `IDENTITY.md` and take effect after validation and
95
+ `mono-agent restart`.
82
96
  - Check managed launchd logs with bounded metadata reads every five minutes,
83
97
  reconcile installed macOS LaunchAgents at login and hourly, and make `status`
84
98
  require agreement between the cached trace and launchd's live PID.
@@ -92,16 +106,25 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
92
106
  - Scaffold (`mono-agent init`) and validate (`mono-agent validate`) agent
93
107
  folders non-destructively.
94
108
  - Resolve local-first WebSearch/WebFetch settings into every runtime run and
95
- report a separate bounded readiness section for loopback SearXNG plus the
96
- optional `agent-browser` renderer; the app never owns either companion's
97
- lifecycle.
109
+ report the four-request default WebSearch budget plus separate bounded
110
+ readiness for explicit Ollama or loopback
111
+ SearXNG plus the optional `agent-browser` renderer; the app never owns any
112
+ companion's lifecycle. Opt-in `tools.web.coordination: "host"` injects the same private
113
+ admission and cooldown store into parent and subagent runs;
114
+ `mono-agent web-control status|reset` inspects or clears idle operational state.
115
+ - Bind oversized tool-block persistence to the harness's authoritative run id,
116
+ writing owner-private raw payloads under `artifacts.dir/tool-output/<runId>/`.
117
+ The sink is not injected into out-of-harness child callbacks. The hourly
118
+ artifact sweep bounds run directories with the existing `artifacts.retention`
119
+ policy while conservatively retaining active, uncertain, or recently modified runs.
98
120
  - Operate the machine-wide `@mono-agent/web` assistant-ui console through
99
- `mono-agent web`, including persisted curated host themes and hostname
100
- identity; on macOS pair its worker with one helper-only, stopped-writer log
101
- controller while the worker remains wake-only; publish a bounded, refreshable
102
- skill registry through each running operator endpoint so the web composer can
103
- discover valid `$skill-name` references; use `mono-agent tui` for bounded
104
- recorded-run replay.
121
+ `mono-agent web`, including persisted curated host themes and a console label
122
+ that defaults to the hostname and can be restored with `--name -`; on macOS
123
+ pair its worker with one helper-only,
124
+ stopped-writer log controller while the worker remains wake-only; publish a
125
+ bounded, refreshable skill registry through each running operator endpoint so
126
+ the web composer can discover valid `$skill-name` references; use
127
+ `mono-agent tui` for bounded recorded-run replay.
105
128
  - Discover and expose one exact running agent through the ACP core-session
106
129
  profile with `mono-agent bridge acp`, including durable session resume, while
107
130
  preserving agent-owned configuration, workspace, sandbox, tools, MCP servers,
@@ -109,6 +132,14 @@ Turn a folder's `mono-agent.config.json` into a running agent host:
109
132
 
110
133
  ## Install / Usage
111
134
 
135
+ Process-job chains keep the default depth budget of 4 and allow a configured
136
+ ceiling of 64. Request diagnostics remain visible when the budget is exhausted.
137
+ Background Exec/Bash accepts `wake_on_completion: false` for helpers that only
138
+ need terminal card updates. Exact sentinel-only wakes suppress delivery; a
139
+ receipt timeout before the destination confirms steering or durable follow-up
140
+ admission settles as unknown and never automatically replays. A confirmed web
141
+ follow-up receipt does not wait for that turn's later model outcome.
142
+
112
143
  ```bash
113
144
  # Install the scoped CLI host directly:
114
145
  npm install --global @mono-agent/agent-app
@@ -126,6 +157,10 @@ same CLI.
126
157
 
127
158
  ### Guided initialization and readiness
128
159
 
160
+ Linux lifecycle commands use systemd user services with journald logs and
161
+ `dev (unmanaged)` runtime provenance. See [Linux background services](../../docs/observability/linux-services.md)
162
+ for linger, external HTTPS, migration, and the initial operator-command scope.
163
+
129
164
  On an interactive terminal, bare `mono-agent init` (no flags) runs a colourful,
130
165
  step-by-step wizard — powered by `@clack/prompts` — that asks for the public
131
166
  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
@@ -155,9 +190,12 @@ primary/fallback pickers combine every bundled model
155
190
  for the guided Pi providers (Anthropic, GitHub Copilot, OpenAI Codex, and
156
191
  OpenCode-Go), Codex's live account catalog, the Claude SDK catalog, and local
157
192
  discovery. The live Codex provider default leads when available; offline setup
158
- falls back to curated `codex:gpt-5.6-terra` without guessing effort metadata, so
159
- only **Provider default** is offered until live `model/list` succeeds. GPT-5.6 Sol is selectable as
160
- `codex:gpt-5.6-sol` or `pi:openai-codex:gpt-5.6-sol`.
193
+ falls back to curated `openai-codex:gpt-5.6-terra` without guessing effort metadata, so
194
+ only **Provider default** is offered until live `model/list` succeeds. GPT-6
195
+ Astra is selectable as `openai-codex:gpt-6-astra` for Codex subscriptions;
196
+ `openai:gpt-6-astra` is also runtime-compatible for OpenAI API keys through the
197
+ existing hand-authored provider path, without adding direct OpenAI to guided
198
+ setup. GPT-5.6 Sol remains selectable as `openai-codex:gpt-5.6-sol`.
161
199
  OpenCode-Go Pi refs can save `OPENCODE_API_KEY` into
162
200
  the Pi auth store or remain environment-provided, and any number of fallback
163
201
  models are selected from the same discovered choices one at a time. Each route
@@ -188,21 +226,39 @@ action fails the check.
188
226
  Escape or Ctrl-C interrupts preflight; recovery can resume verified routes when
189
227
  the non-secret plan fingerprint still matches, restart all checks, edit choices,
190
228
  or cancel. Authentication repair clears every prior route proof because it can
191
- 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.
229
+ replace credential bytes. Guided commit atomically creates the config and
230
+ rechecks its exact snapshot after validation. On macOS it then creates or
231
+ refreshes the canonical per-config launchd service and waits up to 60 seconds
232
+ for a fresh trace whose durable `metadata.lifecycle.startupCompleted` proof is
233
+ true. The worker publishes that proof only after channels, memory rituals, and
234
+ final memory-health work complete; later trace refreshes change the diagnostic
235
+ `metadata.reason` without revoking readiness. Once ready, init prints the manual
236
+ continuation: edit `mono-agent.config.json` or `IDENTITY.md`, run
237
+ `mono-agent validate`, restart, and open the ordinary TUI. A readiness timeout
238
+ preserves the committed files, then unloads the worker plus scheduled
239
+ maintenance and removes their definitions only when stopped state is proven. If
240
+ cleanup cannot be proven, the command says that a process may still be running
241
+ and prints exact `start`, `status`, and `logs --follow` recovery commands plus
242
+ log paths. On Linux the next steps use the systemd background service and
243
+ ordinary TUI; platforms without a background backend use foreground start. Any
244
+ flag or non-TTY invocation remains scaffold-only and never starts a process.
192
245
 
193
246
  ### Managed skills and documentation companion
194
247
 
195
- Every scaffold selects versioned `mono-agent-configure` and `mono-agent-memory`
196
- skills from `./skills` with index disclosure. `ReadSkill` remains separate from
197
- action-tool policy. `mono-agent install-skill --project --check|--update` reports
198
- version/hash drift and refreshes only unchanged managed copies with backups; a
199
- canonical owner-only non-symlink parent chain, per-project owner lock, and
200
- compare-and-swap activation prevent outside or concurrent
201
- operator edits from being overwritten, and a partial activation restores only
202
- files that still equal the managed bytes it wrote.
203
- The persistent SELF-CONFIG workflow guidance is managed-skill version `1.2.0`.
204
- Existing unchanged copies are reported as stale and are never rewritten on TUI
205
- startup; run `mono-agent install-skill --project --update` explicitly to refresh them.
248
+ Every scaffold selects the versioned `mono-agent-memory` skill from `./skills`
249
+ with index disclosure. `ReadSkill` remains separate from action-tool policy.
250
+ `mono-agent install-skill --project --check|--update` reports version/hash drift
251
+ and refreshes only unchanged managed copies with backups; a canonical owner-only
252
+ non-symlink parent chain, per-project owner lock, and compare-and-swap activation
253
+ prevent outside or concurrent operator edits from being overwritten, and a
254
+ partial activation restores only files that still equal the managed bytes it
255
+ wrote. Bundle version `2.0.0` retires `mono-agent-configure`: runtime loading
256
+ ignores that exact selected name and validation reports it as non-fatal waiting,
257
+ while any other missing selected skill remains an error. Project check reports
258
+ four retirement states. Project update removes a retired manifest entry and
259
+ deletes its file only when the entry proves ownership and its bytes still match;
260
+ modified and colliding copies fail closed, and retirement participates in the
261
+ same lock, backup, and rollback transaction as the memory update.
206
262
 
207
263
  Harness-mode `mono-agent install-skill` also pairs the exact matching
208
264
  `@mono-agent/docs-mcp` version with available selected Codex and Claude Code
@@ -213,43 +269,6 @@ transactional; an unrelated entry named `mono-agent-docs` is never overwritten,
213
269
  including with `--force`. Project `--check` / `--update` mode does not touch
214
270
  harness MCP configuration.
215
271
 
216
- ### Conversational self-configuration
217
-
218
- In the separate, visibly marked **SELF-CONFIG** session only, the background app injects proposal-only
219
- `ProposeAgentConfiguration`. The opening message shows a user-led map of identity/knowledge,
220
- runtime/models, skills/tools/MCP/plugins, memory, channels/APIs/A2A, automation,
221
- security, observability/operations, and acceptance criteria, then builds the chosen
222
- workflow conversationally. It says never to enter secrets and to expect a separate
223
- host approval before anything changes. Approval, rejection, a proposal-free turn,
224
- `done`, and `no changes` all keep SELF-CONFIG active; only `/quit`, `/exit`, or
225
- double `ctrl+c` exits the session, and quitting leaves the background agent running.
226
- The host accepts only a fail-closed low-risk
227
- allowlist: public name; effort, turn/session UX; selected project skills and
228
- disclosure; memory size or MemoryRecall enablement; semantic tool-policy
229
- tightening; and the separately validated Role body. Every path, memory-tier or
230
- capture-cost change, runtime/provider route, channel/proactive/plugin, MCP,
231
- exporter, embeddings/LLM endpoint, sandbox/network field, secret, and unknown
232
- future field is handed to the explicit guided flow. It canonicalizes
233
- config/Identity/state paths without following symlink parents, stages and
234
- fsyncs replacements, then performs the final source comparison and rename as
235
- one non-yielding commit step under an owner-only transaction lock. Separate TUI
236
- confirmation, failure-atomic config/Role rollback compensation, rollback
237
- evidence, a successful managed restart, and a fresh ready trace source remain mandatory. Configuration turns replace
238
- the ordinary tool/MCP policy with `ReadSkill`, `MemoryRecall`, and the proposal
239
- tool only. Pure direct-Codex chains use its native read-only plan posture;
240
- mixed chains keep the finite proposal surface so a route that cannot represent
241
- it cannot widen authority. Direct OpenCode cannot receive the host-owned MCP
242
- proposal capability: a direct-OpenCode primary is routed through a configured
243
- proposal-capable fallback, while a direct-OpenCode fallback makes self-configuration
244
- unavailable with explicit remediation. The approval card shows
245
- every full, untruncated JSON patch value and pages through the exact Role body
246
- while keeping Reject/Approve reachable, and rejects
247
- terminal-control or bidi-control review text before displaying it. The configuration
248
- conversation id stays stable across incremental checkpoints and verified restarts;
249
- each settled turn receives a fresh opaque proposal capability plus a safe host-outcome
250
- summary. Fast follow-up text remains in the editor until settlement and is never sent
251
- as ordinary chat or to a stale endpoint. Remote/proactive channels never receive this tool.
252
-
253
272
  ### Managed background runtime
254
273
 
255
274
  Before the first macOS background launch, the CLI copies the exact package and
@@ -289,8 +308,8 @@ login or reboot. A loaded v1 proof is treated as one-time drift and republished
289
308
  by the recovery controller.
290
309
  A managed worker freezes the proven config, Identity, optional Soul, and MCP authority
291
310
  file into private read-only copies before app/channel loading, while trace metadata continues to
292
- name the canonical config. Readiness requires one live launchd-owned trace PID,
293
- the exact durable snapshot, and, for configuration, a reachable TUI endpoint.
311
+ name the canonical config. Readiness requires one live launchd-owned trace PID and
312
+ the exact durable snapshot.
294
313
  Stop succeeds only after both launchd unload and worker death are proven.
295
314
 
296
315
  ### Validation, recovery, and managed logs
@@ -302,10 +321,11 @@ names its full closure id plus sanitized install metadata; other executions repo
302
321
  `dev (unmanaged)`. With `--consumer`, this remains the validator CLI's provenance,
303
322
  not an attestation of a separately running daemon.
304
323
 
305
- Its **Web search & fetch** section reports the resolved SearXNG backend and
324
+ Its **Web search & fetch** section reports the resolved search backend and
306
325
  static/browser extraction mode. With liveness enabled it performs one bounded
307
- JSON query against a configured loopback SearXNG endpoint and checks that an
308
- enabled browser renderer reports `agent-browser` 0.33.1 or newer. Start
326
+ JSON query against the selected SearXNG or Ollama endpoint and checks that an
327
+ enabled browser renderer reports `agent-browser` 0.33.1 or newer. Hosted Ollama
328
+ authentication is sent only to the exact official origin. Start
309
329
  preflight (`liveness: false`) skips both probes without changing structural
310
330
  validation.
311
331
 
@@ -438,8 +458,16 @@ verified turn. Missing Codex setup points to the official instructions at
438
458
  <https://developers.openai.com/codex/cli/>; the app never auto-installs it. The
439
459
  wizard offers browser callback and headless device-code login. Detected credentials
440
460
  skip redundant authentication but remain unverified until the exact route call
441
- successfully runs. Guided Pi setup covers Anthropic, GitHub Copilot, OpenAI Codex,
442
- and OpenCode-Go; other hand-authored Pi and local-provider configs remain compatible
461
+ successfully runs. Passive status treats refreshable OAuth expiry as present but
462
+ unverified and fails closed on unusable material or unsafe stores. The optional
463
+ provider-auth check operator runs one explicit target-only, bounded request per
464
+ displayed provider, records only fixed sanitized outcomes, and never probes from
465
+ a status read. Ordinary run evidence is generation-fenced before provider
466
+ execution: a target-store mutation invalidates already-running summaries and
467
+ their failover attempts, including when the surrounding persistence finishes
468
+ after logical cancellation or reports a post-install cleanup failure. Guided Pi
469
+ setup covers Anthropic, GitHub Copilot, OpenAI Codex, and OpenCode-Go; other
470
+ hand-authored Pi and local-provider configs remain compatible
443
471
  without being advertised as guided cloud integrations. Supported OAuth methods and
444
472
  the OpenCode-Go key flow come from the bundled upstream catalog;
445
473
  stale auth locks are repaired only when the recorded process is securely proven
@@ -450,13 +478,30 @@ common monotonic contract covers the whole chain and rejects or skips a route
450
478
  that cannot represent it. Pi keeps mono-agent tool policy and optional SRT. No
451
479
  route silently drops a required capability.
452
480
 
481
+ Every app-owned TUI/operator endpoint owns an in-memory provider-auth service
482
+ for the web console's Agent settings, with no additional configuration. Its
483
+ routes are keyless when the endpoint has no normal API key and otherwise require
484
+ that bearer. It reports only providers used by effective configured routes and
485
+ keeps credential detection distinct from a successful live request. GitHub
486
+ Copilot and OpenAI Codex use Pi's native device-code flow; Anthropic uses the
487
+ existing manual-code redirect callback; API-key providers use masked
488
+ provider-owned prompts. Returned credentials pass through the same owner-private,
489
+ cross-process-locked, sibling-preserving, no-clobber Pi-store transaction as
490
+ the CLI API-key flow. A valid repeated login replaces the current session only
491
+ after validation. Late provider work is discarded before promotion; a mutation
492
+ already in atomic promotion or cleanup drains before another writer starts. If
493
+ that drain exceeds two seconds, the fresh session fails closed with
494
+ `replacement_timeout`. Sessions, submitted values, URLs, and codes are never
495
+ written to agent history. The service covers `providers.piAuthPath` only, not
496
+ Codex CLI credentials.
497
+
453
498
  ### Run history
454
499
 
455
500
  `RunHistory` requires no config key. It is automatically available under
456
501
  allow-all on MCP-capable routes; a restrictive `tools.allowedTools` must name
457
502
  `RunHistory` explicitly (`run_history` remains a deprecated policy alias), and
458
503
  `disallowedTools` can remove it. Direct OpenCode and other MCP-incompatible
459
- routes suppress it. The agent-facing shorthand is `{}` to list recent runs,
504
+ routes suppress it. The agent-facing shorthand is `{}` to list recent settled runs,
460
505
  `{ "query": "topic terms" }` to search safe trigger and summary metadata,
461
506
  `{ "runId": "..." }` for a compact overview, and
462
507
  `{ "runId": "...", "cursor": "..." }` for the next timeline page. The
@@ -464,7 +509,11 @@ routes suppress it. The agent-facing shorthand is `{}` to list recent runs,
464
509
  compatible. List/search defaults to 5 results (maximum 10); timeline pages hold
465
510
  at most 10 entries and about 16 KiB. Each result includes tool-authored
466
511
  `navigation.guidance` and exact `navigation.nextActions[].arguments` for
467
- continuing exploration.
512
+ continuing exploration. For an unhinted request to pick up, continue, or
513
+ recover incomplete work, start with `{}`, select a `failed`, `cancelled`, or
514
+ `interrupted` candidate, and inspect its `runId`. That overview marks output as
515
+ incomplete evidence and returns a conditional exact `navigation.relatedTools`
516
+ handoff to follow only when `SessionHistory` is available.
468
517
  List and search read retained summaries once; search never reads event JSONL
469
518
  and matches all normalized terms only against sanitized trigger/user input,
470
519
  run id, dates, status/failure kind, source/detail, model, and effort. Daily
@@ -514,6 +563,14 @@ successful-turn commit. A lifecycle record may therefore exist without a
514
563
  canonical message-history entry. Stable conversation/run/tool-call keys and
515
564
  writer-assigned per-run start/end sequences make retries idempotent; process
516
565
  recovery closes dangling starts as `interrupted` without rerunning a tool.
566
+ Each client event waits at most 250 ms for foreground confirmation. If an
567
+ accepted write is still queued or syncing, the event records immutable
568
+ `persistence: "deferred"` metadata without an error code while the worker keeps
569
+ the real request alive. The harness drains those accepted writes before bounded
570
+ run finalization. `persisted` means the row committed before publication;
571
+ `failed` is reserved for a definitive writer rejection. A deferred run artifact
572
+ is not final storage evidence: after the run, `SessionHistory` is authoritative
573
+ for committed rows. All three event states keep `untrusted: true`.
517
574
  Arguments/results are securely pre-bounded, redacted, and byte-bounded, with truncation metadata and
518
575
  opaque artifact ids. Filesystem-shaped spans in object keys and string values use an opaque host-root token plus
519
576
  at most two non-sensitive trailing components, so commands and results remain
@@ -523,6 +580,33 @@ root, or private run path. Only regular files beneath the configured run-specifi
523
580
  outside or symlinked paths are dropped. Isolated/proactive
524
581
  runs persist but search excludes them unless explicitly requested.
525
582
 
583
+ Configured harness runs install the run-bound tool-output sink. When a tool
584
+ lifecycle record persists too, `SessionHistory` exposes only its opaque id and
585
+ current availability, never the host path or contents. The immediate truncation
586
+ summary still names a successfully saved path. These files contain raw,
587
+ untrusted data. The hourly artifact sweep removes eligible run directories by
588
+ the existing `artifacts.retention` age/count policy, with dry-run parity; it
589
+ protects directories projected from running or uncertain summaries and can
590
+ clean an aged orphan without a tool-history row. Recently modified directories
591
+ are held through the next hourly interval, even under count pressure, and are
592
+ revalidated before removal. Tool-history retention itself
593
+ still owns only its database records and tombstones. After file pruning,
594
+ `SessionHistory` recomputes the opaque reference as unavailable.
595
+
596
+ For tool evidence from a failed, cancelled, or interrupted `RunHistory` candidate, use
597
+ `{ "action": "search", "runIds": ["..."], "includeIsolated": true }` without
598
+ a `states` filter. If it returns no records, do not broaden into another run or
599
+ conversation. Each search result distinguishes the invocation `recordId` from
600
+ the terminal `resultRecordId`; follow its trusted navigation to inspect the
601
+ result first when present and the invocation when its arguments are needed.
602
+ The exact navigation retains `includeIsolated: true`, uses `chunkBytes: 8192`,
603
+ and gives the next exact `get` arguments for every cursor. A bounded search
604
+ preview is not the full record and cannot replace record-level inspection when
605
+ recovering interrupted work. This is read-only evidence recovery: it does not
606
+ resume provider state, replay tools, rerun work, or guarantee continuation from
607
+ the interrupted point. Continue as fresh work in the current run with currently
608
+ available tools and fresh verification.
609
+
526
610
  `{ "action": "search" }` returns at most 10 bounded previews with text,
527
611
  tool/state/run/time filters and a query-bound opaque cursor.
528
612
  `{ "action": "get", "recordId": "..." }` (or `toolCallId`) returns bounded
@@ -537,6 +621,7 @@ projection capped at 64 KiB including its truncation marker; warm provider resum
537
621
  continues natively and receives no replay. A zero-byte fresh sidecar is absent
538
622
  for automatic projection; another corrupt/unsafe projection emits a structured
539
623
  warning and continues the turn, while explicit SessionHistory reads fail closed.
624
+ Neither history tool resumes provider state or replays/reruns retained work.
540
625
  Lazy writer acquisition keeps one at-most-10-second restart-handoff attempt.
541
626
  After failure, writes from every already-created turn reuse that rejection and
542
627
  new turns fail immediately during an initial 30-second backoff. Each failed
@@ -572,6 +657,26 @@ terminal record in place. A newer tool-history schema hard-fails downgrade until
572
657
  persisted conversation state is purged; an older compatible version is reported
573
658
  as upgrade-pending for the next writer.
574
659
 
660
+ ### Memory evidence routing and chronological browsing
661
+
662
+ The configured host keeps four evidence sources distinct: the active
663
+ conversation for what was just said, `MemoryRecall` for a targeted durable fact
664
+ or decision, `MemoryJournal` for a broad retrospective over explicit local
665
+ calendar dates, and `RunHistory`/`SessionHistory` for exact execution evidence.
666
+ Unhinted interrupted-work recovery still begins with `RunHistory {}`.
667
+
668
+ `MemoryJournal` is request-scoped and read-only. It is offered only for a local
669
+ Lite, Journal, or BuJo store when `memory.recallTool.enabled` is on and normal
670
+ tool policy allows it. Supermemory has search but no chronological capability.
671
+ A first call requires `fromDate`, `throughDate`, and an IANA `timeZone`; the
672
+ inclusive range is capped at 31 calendar days. Pages default to 10 and cap at
673
+ 25 entries, 8 KiB projected data, and 2 KiB per entry text. The frozen snapshot
674
+ caps at 1,000 entries/2 MiB and continues only with its request-private authenticated,
675
+ run-bound cursor at the exact issued offset.
676
+ It returns curated daily-source provenance and lifecycle state, excludes raw
677
+ audit observations and dropped records, and labels content untrusted. A clean
678
+ empty range, unsupported composition, and backend failure remain distinct.
679
+
575
680
  ### Durable memory writes
576
681
 
577
682
  `Remember` gives the agent an explicit way to persist one stated fact, closing
@@ -612,10 +717,19 @@ title remains the fallback.
612
717
 
613
718
  ### Channel interactions and conversation history
614
719
 
720
+ The configured agent preserves the harness's positive `importContext`
721
+ capability through root-ownership, monitor, process-job, posted-reply, reply-file,
722
+ and MCP-App decorators. The default durable store exposes it only when complete
723
+ batch retention and provider-state retirement or absence are provable. Slack's
724
+ posted-reply wrapper overlays destination history only on the leased Send view;
725
+ the canonical import itself stays scope-free.
726
+
615
727
  For missing context, the agent should use active conversation history first,
616
- `MemoryRecall` for intentionally captured durable facts, `RunHistory` for exact
617
- prior-run evidence, and `SessionHistory` for retained managed-tool calls and
618
- results. Answered or expired blocking `AskUser` exchanges
728
+ `MemoryRecall` for a targeted intentionally captured durable fact,
729
+ `MemoryJournal` for a broad explicit-period curated retrospective, `RunHistory`
730
+ for exact settled prior-run evidence (including failed/cancelled/interrupted
731
+ work), and `SessionHistory` for retained managed-tool calls and results.
732
+ Answered or expired blocking `AskUser` exchanges
619
733
  are written into the assistant history copy before the final response;
620
734
  cancelled asks are not journaled. The copy is explicitly labelled as untrusted
621
735
  historical data and bounded by newest whole interactions. If the newest valid
@@ -745,8 +859,8 @@ staging, current-run, or authorized in-flight content. Retried identities are
745
859
  deduplicated. A manifest
746
860
  that cannot accept its delivery-conversation binding becomes one bounded failed
747
861
  part while answer text and other valid parts survive. Terminal failure,
748
- cancellation, or missing run metadata removes uncommitted state. The sealed
749
- local self-configuration override excludes this publisher.
862
+ cancellation, or missing run metadata removes uncommitted state. An authenticated
863
+ authoritative request-tool override can exclude this publisher.
750
864
 
751
865
  Audit storage performs one root inventory for a process/root lifecycle, then
752
866
  maintains exact owner byte counts under a global append gate. Reclamation uses
@@ -779,8 +893,16 @@ ten-minute idle timeout. See
779
893
  [Reply files and MCP Apps](https://mono-agent-docs.vercel.app/tools/rich-replies/)
780
894
  for native channel behavior, fallbacks, browser security, and limits.
781
895
 
896
+ Successful cron answers suppressed by the shared notification classifier project
897
+ `NOTHING_TO_REPORT` as operator summary and detail text. Classification uses the
898
+ full stored answer before either byte limit, including a sentinel on the final
899
+ line of long narration. Agent SQLite and retained activity keep the original
900
+ text; failures and non-suppressed output retain their existing truncation rules.
901
+
782
902
  ## Architecture
783
903
 
904
+ Configured continuous sessions persist the requested primary model with their durable epoch. Per-model runtime factories are cached for the harness lifetime, and history retirement resolves the owning runtime. A model switch cold-seeds one new epoch; repeated overrides stay warm. Existing fallback and proactive-isolation policies continue to apply. See [session boundaries](../../docs/runtime/sessions-concurrency.md).
905
+
784
906
  ### Data flow
785
907
 
786
908
  `@mono-agent/agent-app` is the composition root. A running host follows this
@@ -818,7 +940,7 @@ path:
818
940
  | Channel integration | `channels.ts`, `channel-drivers/` | Built-in drivers plus config-loaded plugin resolution. |
819
941
  | 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. |
820
942
  | Operator CLI | `cli*.ts`, `jobs-command.ts`, `init.ts`, `doctor.ts`, `doctor-observability.ts`, `background*.ts`, `launchd*.ts`, `managed-web-logs.ts`, `web-*.ts` | Setup, focused validation sections, paired managed service/log lifecycle, process-job operation, and diagnostics. |
821
- | Host services | `run-history.ts`, `session-history.ts`, `conversation-title.ts`, `request-scoped-mcp.ts`, `process-jobs*.ts`, `continuation*.ts`, `memory-*.ts` | Shared request-scoped guards, bounded prior-run/tool-lifecycle evidence, automatic web conversation titles, local process-job ownership/wake/recovery, durable continuations, and memory operations. |
943
+ | Host services | `run-history.ts`, `session-history.ts`, `conversation-title.ts`, `request-scoped-mcp.ts`, `process-jobs*.ts`, `continuation*.ts`, `memory-*.ts` | Shared request-scoped guards, bounded prior-run/tool-lifecycle evidence, bounded local memory chronology, automatic web conversation titles, local process-job ownership/wake/recovery, durable continuations, and memory operations. |
822
944
 
823
945
  ## Public API
824
946
 
@@ -832,6 +954,7 @@ path:
832
954
  | Scaffold or validate an agent folder | `initMonoAgentFolder`, `validateMonoAgentFolder` |
833
955
  | Add bounded prior-run inspection | `createRunHistoryRuntimeExtension`, `isRunHistoryToolAllowed` |
834
956
  | Add bounded retained-tool inspection | `createSessionHistoryRuntimeExtension`, `isSessionHistoryToolAllowed` |
957
+ | Add bounded local memory chronology | `createMemoryJournalRuntimeExtension`, `isMemoryJournalToolAllowed`, `resolveMemoryJournalRange` |
835
958
  | Operate the CLI programmatically, including process jobs and the managed web lifecycle | `runCli`, `runJobsCommand`, `parseCliArgs`, `renderHelp` |
836
959
 
837
960
  The web maintenance controller and publication helpers remain private CLI
@@ -909,8 +1032,20 @@ IssueContinuationCapabilityInput
909
1032
  MANAGED_SRT_LOCK_SHA256
910
1033
  MANAGED_SRT_PACKAGE
911
1034
  MANAGED_SRT_VERSION
1035
+ MEMORY_JOURNAL_DEFAULT_PAGE_SIZE
1036
+ MEMORY_JOURNAL_ENTRY_TEXT_MAX_BYTES
1037
+ MEMORY_JOURNAL_MAX_PAGE_SIZE
1038
+ MEMORY_JOURNAL_MAX_RANGE_DAYS
1039
+ MEMORY_JOURNAL_MAX_SNAPSHOTS
1040
+ MEMORY_JOURNAL_MCP_SERVER_NAME
1041
+ MEMORY_JOURNAL_PAGE_MAX_BYTES
1042
+ MEMORY_JOURNAL_TOOL_NAME
912
1043
  ManagedSrtSetupOptions
913
1044
  ManagedSrtSetupResult
1045
+ MemoryJournalBinding
1046
+ MemoryJournalCapableStore
1047
+ MemoryJournalErrorCode
1048
+ MemoryJournalRuntimeExtensionOptions
914
1049
  MemoryRitualSchedule
915
1050
  MonoAgentApp
916
1051
  MonoAgentAppConfigInput
@@ -922,6 +1057,7 @@ PreflightResult
922
1057
  RUN_HISTORY_MCP_SERVER_NAME
923
1058
  RUN_HISTORY_TOOL_NAME
924
1059
  ResolvedExporter
1060
+ ResolvedMemoryJournalRange
925
1061
  RunContinuationCommandOptions
926
1062
  RunHistoryBinding
927
1063
  RunHistoryRuntimeExtension
@@ -967,6 +1103,8 @@ createConfiguredAgentResponder
967
1103
  createConfiguredAgentRuntime
968
1104
  createConfiguredMemory
969
1105
  createCronChannelDriver
1106
+ createMemoryJournalRuntimeExtension
1107
+ createMemoryJournalServer
970
1108
  createOpenAIApiChannelDriver
971
1109
  createRunHistoryRuntimeExtension
972
1110
  createRunHistoryServer
@@ -985,6 +1123,9 @@ isAppCoreConfigError
985
1123
  isColorEnabled
986
1124
  isContinuationMode
987
1125
  isContinuationState
1126
+ isMemoryJournalCapableStore
1127
+ isMemoryJournalToolAllowed
1128
+ isMemoryJournalToolPolicyName
988
1129
  isRunHistoryToolAllowed
989
1130
  isSessionHistoryToolAllowed
990
1131
  keyValue
@@ -1005,6 +1146,7 @@ resolveAppTraceSourceId
1005
1146
  resolveAppTraceSourceLabel
1006
1147
  resolveAppTraceStaleAfterMs
1007
1148
  resolveChannelDrivers
1149
+ resolveMemoryJournalRange
1008
1150
  rule
1009
1151
  runCli
1010
1152
  runContinuationCommand
@@ -1038,6 +1180,11 @@ compose communication adapters; adapters never depend on it.
1038
1180
  `@mono-agent/agent-harness` and `@mono-agent/runtime-adapter`).
1039
1181
  - Multi-agent orchestration (owned by `@mono-agent/agent-orchestrator`).
1040
1182
 
1183
+ Opt in to metadata-only prompt-cache request fingerprints with
1184
+ `providers.piNative.promptCacheDiagnostics` (default `false`) or
1185
+ `MONO_AGENT_PI_PROMPT_CACHE_DIAGNOSTICS`. The offline reader is documented in
1186
+ [Prompt-cache measurement](https://mono-agent-docs.vercel.app/runtime/prompt-cache-measurement/).
1187
+
1041
1188
  ## Related Documentation
1042
1189
 
1043
1190
  - [Quickstart](https://mono-agent-docs.vercel.app/getting-started/quickstart/)
@@ -53,7 +53,7 @@ export interface TelegramSendToolSettings {
53
53
  export interface AskUserToolSettings {
54
54
  readonly bridgeUrl: string;
55
55
  readonly bridgeToken: string;
56
- readonly timeoutMs: number;
56
+ readonly timeoutMs: number | null;
57
57
  readonly producerConversationId?: string;
58
58
  readonly interactionConversationId?: string;
59
59
  readonly runId?: string;
@@ -89,6 +89,7 @@ export interface AdapterSendToolsDeliveryHistoryCapabilityIssuer {
89
89
  export interface AdapterSendToolsRuntimeExtension {
90
90
  readonly runtimeOptions: {
91
91
  readonly mcpServers: Record<string, unknown>;
92
+ readonly mcpCallNoTotalTimeoutTools?: readonly string[];
92
93
  };
93
94
  readonly cleanup: () => Promise<void>;
94
95
  readonly settleCleanup?: () => Promise<void>;
@@ -151,7 +152,7 @@ export interface AdapterSendToolsChildContext {
151
152
  export interface AdapterSendToolsInteractionEnv {
152
153
  readonly bridgeUrl: string;
153
154
  readonly bridgeToken: string;
154
- readonly timeoutMs: number;
155
+ readonly timeoutMs: number | null;
155
156
  }
156
157
  export declare function adapterSendToolsMcpEnv(configPath: string, allowedTools: readonly string[], context?: AdapterSendToolsChildContext, interaction?: AdapterSendToolsInteractionEnv): Record<string, string>;
157
158
  export interface AdapterSendToolsChildConfig {
@@ -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,EAEV,qBAAqB,EAEtB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AA2B/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,CAAC;IAChC,uFAAuF;IACvF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,uFAAuF;IACvF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,mFAAmF;IACnF,QAA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veAskUserToolSettings(env, interaction) {
73
73
  if (bridgeUrl === undefined || bridgeToken === undefined) {
74
74
  return undefined;
75
75
  }
76
- const timeoutRaw = Number(optionalString(env.MONO_AGENT_ASK_USER_TIMEOUT_MS));
77
- const timeoutMs = interaction?.timeoutMs
78
- ?? (Number.isFinite(timeoutRaw) && timeoutRaw >= 1000 ? timeoutRaw : 600_000);
76
+ const timeoutValue = optionalString(env.MONO_AGENT_ASK_USER_TIMEOUT_MS);
77
+ const timeoutRaw = Number(timeoutValue);
78
+ const timeoutMs = interaction?.timeoutMs !== undefined
79
+ ? interaction.timeoutMs
80
+ : timeoutValue === "none"
81
+ ? null
82
+ : Number.isFinite(timeoutRaw) && timeoutRaw >= 1000 ? timeoutRaw : 600_000;
79
83
  const producerConversationId = optionalString(env.MONO_AGENT_ADAPTER_TOOLS_PRODUCING_CONVERSATION_ID);
80
84
  const interactionConversationId = optionalString(env.MONO_AGENT_ADAPTER_TOOLS_INTERACTION_CONVERSATION_ID);
81
85
  const runId = optionalString(env.MONO_AGENT_ADAPTER_TOOLS_PRODUCING_RUN_ID);
@@ -145,7 +149,7 @@ export function adapterSendToolsMcpEnv(configPath, allowedTools, context, intera
145
149
  : {
146
150
  MONO_AGENT_INTERACTION_BRIDGE_URL: interaction.bridgeUrl,
147
151
  MONO_AGENT_INTERACTION_BRIDGE_TOKEN: interaction.bridgeToken,
148
- MONO_AGENT_ASK_USER_TIMEOUT_MS: String(interaction.timeoutMs),
152
+ MONO_AGENT_ASK_USER_TIMEOUT_MS: interaction.timeoutMs === null ? "none" : String(interaction.timeoutMs),
149
153
  }),
150
154
  };
151
155
  }
@@ -249,6 +253,9 @@ export function createAdapterSendToolsRuntimeExtension(configPath, cwd, allowedT
249
253
  : undefined;
250
254
  return {
251
255
  runtimeOptions: {
256
+ ...(interaction?.timeoutMs === null && allowedTools.includes("AskUser")
257
+ ? { mcpCallNoTotalTimeoutTools: [`${ADAPTER_SEND_TOOLS_MCP_SERVER_NAME}:AskUser`] }
258
+ : {}),
252
259
  mcpServers: {
253
260
  [ADAPTER_SEND_TOOLS_MCP_SERVER_NAME]: adapterSendToolsMcpServerSpec(configPath, cwd, allowedTools, context, interaction),
254
261
  },
@@ -315,7 +322,10 @@ const ASK_USER_POLL_WAIT_MS = 20_000;
315
322
  function registerAskUserTool(server, settings, fetchImpl) {
316
323
  server.registerTool("AskUser", {
317
324
  title: "Ask the user and wait",
318
- description: "Ask 1–5 related questions and WAIT for the user to answer them in the current conversation. Each question must offer 2–3 concise options with descriptions; the UI also permits a custom reply. Use multiSelect only when several choices may be combined. Put long decision context or a draft in message. A second concurrent AskUser call fails. If the wait expires, finish gracefully using the returned partial answers and state any assumptions.",
325
+ description: "Ask 1–5 related questions and WAIT for the user to answer them in the current conversation. Each question must offer 2–3 concise options with descriptions; the UI also permits a custom reply. Use multiSelect only when several choices may be combined. Put long decision context or a draft in message. A second concurrent AskUser call fails. "
326
+ + (settings.timeoutMs === null
327
+ ? "This interaction has no automatic expiry; keep waiting until the user answers or cancels."
328
+ : "If the wait expires, finish gracefully using the returned partial answers and state any assumptions."),
319
329
  inputSchema: {
320
330
  message: z.string().min(1).max(4_096).optional().describe("Optional context or draft shown above the questions."),
321
331
  questions: z.array(z.object({