@animalabs/connectome-host 0.7.3 → 0.8.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 (97) hide show
  1. package/.env.example +12 -5
  2. package/.github/PULL_REQUEST_TEMPLATE.md +3 -2
  3. package/.github/workflows/changelog.yml +9 -4
  4. package/.github/workflows/ci.yml +5 -3
  5. package/.github/workflows/publish.yml +12 -6
  6. package/CHANGELOG.md +401 -10
  7. package/CONTRIBUTING.md +47 -19
  8. package/HEADLESS-FLEET-PLAN.md +22 -0
  9. package/README.md +39 -1
  10. package/bun.lock +27 -31
  11. package/changelog.d/README.md +28 -0
  12. package/docs/AGENT-ONBOARDING.md +1 -1
  13. package/docs/debug-context-api.md +2 -2
  14. package/docs/retrieval-traces.md +173 -0
  15. package/docs/webui-deployment.md +2 -1
  16. package/package.json +6 -6
  17. package/recipes/SETUP.md +11 -5
  18. package/recipes/TRIUMVIRATE-SETUP.md +68 -14
  19. package/recipes/knowledge-miner.json +0 -30
  20. package/recipes/mock-test.json +19 -0
  21. package/recipes/triumvirate.json +6 -1
  22. package/scripts/audit-module-optins.ts +288 -0
  23. package/scripts/release-changelog.ts +210 -21
  24. package/src/cache-keepalive-log.ts +41 -0
  25. package/src/commands.ts +96 -0
  26. package/src/framework-strategy.ts +50 -4
  27. package/src/gate-telemetry.ts +106 -0
  28. package/src/headless.ts +24 -0
  29. package/src/index.ts +179 -64
  30. package/src/mcpl-config.ts +99 -1
  31. package/src/modules/fleet-module.ts +60 -1
  32. package/src/modules/fleet-types.ts +30 -1
  33. package/src/modules/identity-module.ts +310 -2
  34. package/src/modules/instructions-module.ts +265 -0
  35. package/src/modules/mcpl-admin-module.ts +89 -13
  36. package/src/modules/retrieval-module.ts +249 -51
  37. package/src/modules/retrieval-trace-page.ts +254 -0
  38. package/src/modules/retrieval-trace.ts +904 -0
  39. package/src/modules/subagent-module.ts +18 -0
  40. package/src/modules/tts-relay-module.ts +33 -18
  41. package/src/modules/web-ui-module.ts +445 -894
  42. package/src/recipe.ts +787 -29
  43. package/src/retrieval-config.ts +39 -0
  44. package/src/strategies/frontdesk-strategy.ts +34 -125
  45. package/src/tui.ts +325 -54
  46. package/src/web/panel-data.ts +1206 -0
  47. package/src/web/protocol.ts +75 -10
  48. package/src/workspace-mounts.ts +73 -0
  49. package/test/audit-module-optins.test.ts +174 -0
  50. package/test/cache-keepalive-log.test.ts +83 -0
  51. package/test/conversations-recipe.test.ts +142 -0
  52. package/test/fleet-panel-request.test.ts +90 -0
  53. package/test/framework-fkm-composition.test.ts +35 -3
  54. package/test/framework-strategy-defaults.test.ts +41 -0
  55. package/test/frontdesk-strategy.test.ts +25 -37
  56. package/test/gate-telemetry-adapter.test.ts +84 -0
  57. package/test/gate-telemetry.test.ts +91 -0
  58. package/test/headless-panel-request.test.ts +201 -0
  59. package/test/identity-and-surfaces.test.ts +212 -1
  60. package/test/instructions-module.test.ts +258 -0
  61. package/test/mcpl-admin-module.test.ts +64 -0
  62. package/test/mcpl-agent-overlay.test.ts +51 -3
  63. package/test/mcpl-child-env.test.ts +64 -0
  64. package/test/mock-headless-child.ts +14 -0
  65. package/test/nudge-command.test.ts +47 -0
  66. package/test/recipe-cache-keepalive.test.ts +59 -0
  67. package/test/recipe-compression-fallback.test.ts +19 -0
  68. package/test/recipe-hybrid-prose-routing.test.ts +12 -0
  69. package/test/recipe-instructions.test.ts +176 -0
  70. package/test/recipe-kv-unified.test.ts +87 -0
  71. package/test/recipe-mcp-source.test.ts +54 -0
  72. package/test/recipe-openai-compatible.test.ts +54 -0
  73. package/test/recipe-path-resolution.test.ts +19 -8
  74. package/test/recipe-provider.test.ts +14 -0
  75. package/test/recipe-save-unresolved.test.ts +244 -0
  76. package/test/recipe-source-only.test.ts +38 -0
  77. package/test/release-changelog.test.ts +202 -0
  78. package/test/retrieval-auth-loopback.test.ts +49 -0
  79. package/test/retrieval-config.test.ts +74 -0
  80. package/test/retrieval-module.test.ts +821 -0
  81. package/test/subagent-prose-routing.test.ts +109 -0
  82. package/test/tui-format.test.ts +106 -0
  83. package/test/web-ui-context-coverage.test.ts +1 -1
  84. package/test/web-ui-module.test.ts +189 -3
  85. package/test/web-ui-observers.test.ts +8 -5
  86. package/test/web-ui-protocol.test.ts +0 -0
  87. package/test/workspace-mounts.test.ts +68 -0
  88. package/web/src/App.tsx +160 -44
  89. package/web/src/Context.tsx +35 -8
  90. package/web/src/ContextDocument.tsx +20 -5
  91. package/web/src/Files.tsx +2 -8
  92. package/web/src/Health.tsx +61 -1
  93. package/web/src/Lessons.tsx +2 -38
  94. package/web/src/Mcpl.tsx +80 -14
  95. package/web/src/Pins.tsx +5 -0
  96. package/web/src/Settings.tsx +5 -0
  97. package/web/vite.config.ts +8 -2
package/CONTRIBUTING.md CHANGED
@@ -43,7 +43,7 @@ plus, when applicable, **Not verified**, **Out of scope**, and
43
43
  - **Tests accompany behavior changes.** Review scrutinizes test substance,
44
44
  not mere presence — a test that can't fail on the unfixed code will be
45
45
  called out.
46
- - **Changelog entry** under `## Unreleased` for anything behavior-affecting
46
+ - **Changelog fragment** in `changelog.d/` for anything behavior-affecting
47
47
  (see below).
48
48
 
49
49
  Conventional-commit-style titles (`feat(recipe): …`, `fix(subagent): …`) are
@@ -80,33 +80,61 @@ that don't fail on unfixed code, or with claims the branch itself disproves.
80
80
 
81
81
  ## Changelog
82
82
 
83
- `CHANGELOG.md` keeps a standing `## Unreleased` section with
84
- `### Breaking` / `### Added` / `### Changed` / `### Fixed` subsections
85
- (loosely [Keep a Changelog](https://keepachangelog.com/)).
86
-
87
- - **The entry lands with the change** same commit, or at least the same
83
+ Changelog entries land as **fragment files** in
84
+ [`changelog.d/`](changelog.d/) one file per change and are folded into
85
+ `CHANGELOG.md` (loosely [Keep a Changelog](https://keepachangelog.com/)) at
86
+ release time. One file per change is what keeps concurrent work from
87
+ conflicting: when every PR edited the same `## Unreleased` section, any PR
88
+ that outlived another merge hit a conflict in `CHANGELOG.md`; distinct files
89
+ never do.
90
+
91
+ - **Format:** `changelog.d/<slug>.<breaking|added|changed|fixed>.md`, a flat
92
+ file directly in `changelog.d/`, containing one or more markdown bullets
93
+ (`- …`) written exactly as they should appear in `CHANGELOG.md`:
94
+ continuation lines indent two spaces, nested bullets are fine, headings
95
+ and horizontal rules are refused (even indented — a heading inside a
96
+ fragment would corrupt the section structure). The slug just has to be
97
+ unique among pending fragments and filesystem-safe — the PR number works,
98
+ and so does the branch name with `/` replaced by `-`
99
+ (`100-prose-routing.added.md`, `fix-retry-backoff.fixed.md`). The release
100
+ script scans the directory fail-closed: a subdirectory, an unrecognized
101
+ category suffix, or any other stray file aborts the release rather than
102
+ silently stranding an entry.
103
+
104
+ - **The fragment lands with the change** — same commit, or at least the same
88
105
  PR. This binds direct pushes to `main` just as much as PRs. On PRs, CI
89
- enforces it softly: touching `src/` without touching `CHANGELOG.md` fails
90
- the `changelog` check unless the `no-changelog` label is applied.
106
+ enforces it softly: touching `src/` without adding a fragment (or editing
107
+ `CHANGELOG.md`) fails the `changelog` check unless the `no-changelog`
108
+ label is applied.
91
109
  - **What needs an entry:** anything an operator, recipe author, or module
92
110
  developer would notice — behavior, config/recipe schema, CLI, tool
93
111
  surfaces, defaults. Internal refactors, test-only, and docs-only changes
94
112
  don't.
95
- - **Breaking entries are audience-scoped.** Name the audience in the heading
96
- (`### Breaking (recipe authors only)`) and cover: **who needs to act**,
113
+ - **Breaking entries are audience-scoped.** Open the bullet by naming who
114
+ needs to act (`- **Recipe authors:** …`) and cover: **who needs to act**,
97
115
  **migration**, and **unchanged** (what readers might fear broke but
98
116
  didn't). The fleet recipe-path entry in `CHANGELOG.md` is the canonical
99
117
  example of the format.
118
+ - **Editing `## Unreleased` in `CHANGELOG.md` directly still works** and is
119
+ merged with the fragments at release time — it remains the right place to
120
+ restructure pending entries, and the escape hatch for anything the
121
+ fragment format can't express (e.g. an audience-qualified
122
+ `### Breaking (recipe authors only)` heading, which `breaking` fragments
123
+ will then join). Keep one `## Unreleased` heading — the release script
124
+ refuses more than one, since only the first is ever cut.
100
125
  - **Releases** (maintainers): `npm version <patch|minor|major>` does the
101
- whole cut — the `version` hook retitles `Unreleased` to
102
- `## X.Y.Z — YYYY-MM-DD` (keeping a fresh `Unreleased` above it, and
103
- refusing to release when there are no entries), then npm commits and tags.
104
- `git push --follow-tags` triggers CI, which refuses a tag with no matching
105
- changelog section, publishes `@animalabs/connectome-host` to npm, and
106
- creates the GitHub release with that section as its notes. The two release
107
- jobs are independent: some consumers run github-clone checkouts, so
108
- release notes must exist even when npm publish fails. Version bumps are a
109
- maintainer release-time action, not part of feature PRs.
126
+ whole cut — the `version` hook folds the pending fragments plus any
127
+ entries filed directly under `Unreleased` into `## X.Y.Z — YYYY-MM-DD`
128
+ (subsections emitted in `### Breaking` / `### Added` / `### Changed` /
129
+ `### Fixed` order), deletes the consumed fragments, keeps a fresh empty
130
+ `Unreleased` above, and refuses to release when there is nothing to
131
+ release; npm then commits and tags. `git push --follow-tags` triggers CI,
132
+ which refuses a tag with no matching changelog section, publishes
133
+ `@animalabs/connectome-host` to npm, and creates the GitHub release with
134
+ that section as its notes. The two release jobs are independent: some
135
+ consumers run github-clone checkouts, so release notes must exist even
136
+ when npm publish fails. Version bumps are a maintainer release-time
137
+ action, not part of feature PRs.
110
138
 
111
139
  ## Building and testing
112
140
 
@@ -223,12 +223,34 @@ One JSON object per line. All events include `type`; most include `ts` (epoch ms
223
223
  {"type":"text","content":"Please resummarize last week"}
224
224
  {"type":"command","command":"/status"}
225
225
  {"type":"shutdown","graceful":true}
226
+ {"type":"panel-request","op":"settings","params":{"agent":"clerk"},"corrId":"panel-1"}
226
227
  ```
227
228
 
228
229
  - `subscribe` is idempotent. Typically sent once right after connection. Supports simple glob (`tool:*`, `inference:*`).
229
230
  - `text` produces an `external-message` event with `source: 'headless'` — same effect as user typing into the child's own TUI.
230
231
  - `command` routes through the child's `commands.ts` handler exactly as if typed locally.
231
232
  - `shutdown` sets `graceful`; child completes in-flight inference, then exits. `graceful: false` is equivalent to SIGTERM.
233
+ - `panel-request` runs one operator-panel operation in the child via the shared
234
+ `runPanelOp` dispatcher (`src/web/panel-data.ts`) — the same code the WebUI
235
+ host runs for its own process, so parent and child views of any panel can
236
+ never drift. Ops: `mcpl`, `settings`, `settings-update`, `settings-reset`,
237
+ `settings-cancel-transition`, `pins`, `pin-add`, `pin-remove`, `health`,
238
+ `context-makeup`, `context-coverage`, `context-curve`, `context-preview`,
239
+ `context-maintenance`, `debug-context`. The child answers with a single
240
+ `panel-response`:
241
+
242
+ ```json
243
+ {"type":"panel-response","op":"settings","corrId":"panel-1","ok":true,"data":{...}}
244
+ {"type":"panel-response","op":"settings","corrId":"panel-1","ok":false,"error":"Agent not found: x","status":404}
245
+ ```
246
+
247
+ `status` is HTTP-ish so the parent's `?scope=<child>` proxy routes
248
+ (`/debug/context/*`, `/healthz`) can answer faithfully. `panel-response`
249
+ (like the other request/response snapshots) bypasses the subscription
250
+ filter. Parent-side, `FleetModule.requestPanel()` wraps the corrId
251
+ bookkeeping in a promise and never rejects — unreachable children resolve
252
+ `{ok:false,status:502}`, silence resolves `{ok:false,status:504}` after the
253
+ timeout (default 30s).
232
254
 
233
255
  ### Connection lifecycle
234
256
 
package/README.md CHANGED
@@ -118,16 +118,52 @@ device-code flow if needed. No `OPENAI_API_KEY` is used for this provider. Use
118
118
  warns if the service reports that it fell back to Standard; Fast mode consumes
119
119
  subscription credits at a higher rate when applied.
120
120
 
121
+ ### OpenAI-compatible endpoints (Ollama, vLLM, Together, Groq, NanoGPT, ...)
122
+
123
+ Any server speaking the OpenAI chat-completions API works through the generic
124
+ `openai-compatible` provider — the recipe names the endpoint and the model:
125
+
126
+ ```json
127
+ {
128
+ "agent": {
129
+ "provider": "openai-compatible",
130
+ "baseUrl": "http://localhost:11434/v1",
131
+ "model": "qwen3:32b",
132
+ "systemPrompt": "You are a helpful assistant."
133
+ }
134
+ }
135
+ ```
136
+
137
+ The API key is read from `OPENAI_COMPATIBLE_API_KEY` only — deliberately no
138
+ `OPENAI_API_KEY` fallback: `baseUrl` is recipe-controlled, and a real OpenAI
139
+ credential must never be sent silently to an arbitrary endpoint. Local
140
+ servers usually need none. `agent.model` is required —
141
+ there is no default model for an arbitrary endpoint. Tool calls use the
142
+ standard `tool_calls` format, so the endpoint must support function calling
143
+ for tool-using recipes. Provider-side prompt caching and cache accounting
144
+ depend on what the endpoint reports.
145
+
121
146
  ## What it provides
122
147
 
123
148
  - **Web UI**: browser operator console (`modules.webui`) — live chat with full interiority (thinking, tool calls, streaming), agent/fleet tree, context makeup + compression coverage, call ledger with cache verdicts and billing-grade costs, health/ops alerts, Chronicle branch tree, lessons, MCPL config, workspace files; scoped read-only observer access via device keys
124
149
  - **TUI + readline modes**: OpenTUI interactive terminal or `--no-tui` for pipes/CI
125
150
  - **Subagent forking** (opt-in, `modules.subagents`): Spawn/fork parallel agents with fleet tree view (Tab to toggle)
126
- - **Persistent lessons** (opt-in, `modules.lessons`): Knowledge store with confidence scores and tags. Automatic retrieval-injection of lessons into context (`modules.retrieval`) is a separate opt-in — it adds per-turn context churn and Haiku calls, so enable it only for agents that actually curate a lesson library
151
+ - **Persistent lessons** (opt-in, `modules.lessons`): Knowledge store with confidence scores and tags. Automatic retrieval-injection of lessons into context (`modules.retrieval`) is a separate opt-in — it adds per-turn context churn and retrieval-model calls, so enable it only for agents that actually curate a lesson library
127
152
  - **Time-travel**: Chronicle-backed undo/redo, named checkpoints, branch exploration
128
153
  - **Session management**: Isolated sessions with auto-naming
129
154
  - **MCPL support**: Connect any MCP/MCPL server; wake subscriptions for selective event triggering
130
155
  - **File products**: Write reports and documents, materialize to disk
156
+ - **Shared instructions** (opt-in, `modules.instructions`): a living instructions document (CLAUDE.md analogue) kept in a workspace mount and injected into every agent's context on every turn — the resident agent and all ephemeral subagents. Edits take effect on the next turn; nothing is persisted to history. Defaults: path `instructions/AGENTS.md`, `position: "system"`, 32 KiB cap (reads are bounded to the cap); a missing file is fail-open (no injection, warn once), while a path naming a nonexistent mount fails at recipe load — including on the implicit default workspace (`input` + `products`), whose mount set can never satisfy the default path, so declare an `instructions` mount explicitly. **Who edits, and how it propagates**: the module reads *disk*; agent `workspace--write`/`edit` land in Chronicle and reach disk only on an `autoMaterialize: true` mount — validation therefore requires it on a read-write instructions mount. On a read-only mount the flow reverses: human/deploy edits to disk reach the injection, but not `workspace--read` (which serves Chronicle) — prefer routing human feedback through conversation and letting the agent make the edit. Symlinks that lead outside the mount are rejected (realpath containment), never injected. **Cache note**: at `position: "system"` the block lives in every agent's prompt-cache prefix, so each edit is a fleet-wide cache cold start on the next turn — curate in batches, or use `afterUser` for cache-cheap, lower-salience injection. Compared to **lessons** (`modules.lessons`): lessons are a structured, confidence-scored store with model-driven retrieval; instructions are one free-form curated document, always present verbatim
157
+
158
+ For `openai-responses` and `openai-codex`, an object-valued
159
+ `modules.retrieval` can set `reasoningEffort` (`none`, `minimal`, `low`,
160
+ `medium`, `high`, `xhigh`, or `max`) independently of the primary agent.
161
+ Retrieval calls are independent one-shot requests, so there is no separate
162
+ retrieval reasoning-context setting. When `reasoningEffort` is configured,
163
+ `model` must also be set explicitly: the historical retrieval default is a
164
+ Claude model and cannot be sent through an OpenAI adapter. Anthropic/Claude
165
+ uses different native thinking controls and does not accept this OpenAI-shaped
166
+ option.
131
167
 
132
168
  ## Prerequisites
133
169
 
@@ -146,6 +182,7 @@ npm install
146
182
  |----------|---------|-------------|
147
183
  | `ANTHROPIC_API_KEY` | (required) | Anthropic API key |
148
184
  | `OPENAI_API_KEY` | — | OpenAI Platform key for `openai-responses` recipes |
185
+ | `OPENAI_COMPATIBLE_API_KEY` | — | Key for `openai-compatible` recipes (no `OPENAI_API_KEY` fallback by design); omit for local servers |
149
186
  | `CODEX_BINARY` | `codex` | Codex CLI executable for `openai-codex` subscription auth |
150
187
  | `CODEX_HOME` | `~/.codex` | Codex credential/config directory |
151
188
  | `CODEX_BASE_URL` | ChatGPT Codex backend | Optional subscription transport override |
@@ -175,6 +212,7 @@ non-loopback binds require basic-auth credentials. Build the SPA bundle once wit
175
212
  - Ops alerts (compression quarantine, refusal streaks, inference-exhausted) render as persistent banner rows
176
213
  - Usage panel: per-agent costs and a billing-grade call ledger with cache verdicts
177
214
  - `/curve` — compression-curve visualization; `/healthz` — liveness JSON for doctor/fleet tooling
215
+ - `/debug/retrieval/view` — operator-only per-run lesson selection viewer (see `docs/retrieval-traces.md`)
178
216
  - Read-only observer access via Ed25519 device keys with per-grant scopes (see `docs/webui-deployment.md`)
179
217
 
180
218
  For SPA development: `cd web && bun run dev` proxies the Vite dev server onto a
package/bun.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "lockfileVersion": 1,
3
- "configVersion": 1,
3
+ "configVersion": 0,
4
4
  "workspaces": {
5
5
  "": {
6
- "name": "connectome-host",
6
+ "name": "@animalabs/connectome-host",
7
7
  "dependencies": {
8
- "@animalabs/agent-framework": "^0.7.0",
9
- "@animalabs/chronicle": "^0.2.0",
10
- "@animalabs/context-manager": "^0.6.0",
11
- "@animalabs/membrane": "^0.5.75",
8
+ "@animalabs/agent-framework": "^0.12.0",
9
+ "@animalabs/chronicle": "^0.3.0",
10
+ "@animalabs/context-manager": "^0.6.3",
11
+ "@animalabs/membrane": "^0.5.82",
12
12
  "@opentui/core": "^0.1.82",
13
13
  },
14
14
  "devDependencies": {
@@ -19,13 +19,13 @@
19
19
  },
20
20
  },
21
21
  "packages": {
22
- "@animalabs/agent-framework": ["@animalabs/agent-framework@0.7.0", "", { "dependencies": { "@animalabs/chronicle": "^0.2.2", "@animalabs/context-manager": "^0.6.0", "@animalabs/membrane": "^0.5.75", "chokidar": "^4.0.3", "discord.js": "^14.25.1", "ws": "^8.18.0" }, "bin": { "agent-framework-mcp": "dist/src/api/mcp-server.js", "agent-framework-recover": "dist/src/recovery/recover-cli.js" } }, "sha512-9FRQsCPaCZuZe0pyj+xq2NvdbSWQxRvdgO8nojVezpysaJL+w/Ba9tahGaOK7ZP12ZqnX3Q88wlttsXY+A47Gw=="],
22
+ "@animalabs/agent-framework": ["@animalabs/agent-framework@0.12.0", "", { "dependencies": { "@animalabs/chronicle": "^0.3.0", "@animalabs/context-manager": "^0.6.0", "@animalabs/membrane": "^0.5.78", "chokidar": "^4.0.3", "discord.js": "^14.25.1", "ws": "^8.18.0" }, "bin": { "agent-framework-mcp": "dist/src/api/mcp-server.js", "agent-framework-recover": "dist/src/recovery/recover-cli.js" } }, "sha512-Yj0E4vA+kqMxp8LzVT1DBBppwBtPaaweOCloO47pAbJemLzLsJoCD1O9GOYjZ75LLfvGenzLgg1fWo0wXkMJ1w=="],
23
23
 
24
- "@animalabs/chronicle": ["@animalabs/chronicle@0.2.1", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.1", "@animalabs/chronicle-darwin-x64": "0.2.1", "@animalabs/chronicle-linux-arm64-gnu": "0.2.1", "@animalabs/chronicle-linux-x64-gnu": "0.2.1", "@animalabs/chronicle-win32-x64-msvc": "0.2.1" } }, "sha512-rDFc069yfi7BQUusgsXBwBdqljUWLByXSYaTF40AP+tonBh0No3eF9VzKTSy1I8DYg/jAUHIKtVdKDGsVMVubw=="],
24
+ "@animalabs/chronicle": ["@animalabs/chronicle@0.3.0", "", {}, "sha512-6BBJ9pWb8AnuHTNJTU07Y6Wut3IvdgWFxsy05IdlWcEnR5W23dlaBlaeJq7gDc7TwX05HfsDC+QZFEc69G+s4Q=="],
25
25
 
26
- "@animalabs/context-manager": ["@animalabs/context-manager@0.6.0", "", { "dependencies": { "@animalabs/chronicle": "^0.2.6", "@animalabs/membrane": "^0.5.69" } }, "sha512-X8PKvHouS0dXt6faHeMyI2FehgyFKPT3vBaqM7QN6o/O/3I5pU8UX+WR1nsixfgw+la83lDC+OHn+lPe1A7DVg=="],
26
+ "@animalabs/context-manager": ["@animalabs/context-manager@0.6.3", "", { "dependencies": { "@animalabs/chronicle": "^0.3.0", "@animalabs/membrane": "^0.5.69" } }, "sha512-zh60LgZxXzBbGrLpDHBAfGSPSL/H8mxz8nSWLOSh4pjiTOYbD0o0BjAM8CFz4LiaOIXnuSCbRoiv5UKsnrKwDw=="],
27
27
 
28
- "@animalabs/membrane": ["@animalabs/membrane@0.5.75", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-eWtkrbQQga8UWDMH4VzPfZzcwYQLwngUcQ2tMeuERMBJ6WkXQzSJkcQVjM3ZvexvytnLsFTMOATvT58Igl9JuA=="],
28
+ "@animalabs/membrane": ["@animalabs/membrane@0.5.82", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-kCI3s/HXnXBPVcYCXIZfsdJBLRj77j5QyA9Hor1mC/nyD35D7e7N/VgR9awxqdGGWgIvgpjs6owXbGMk5t1pQA=="],
29
29
 
30
30
  "@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.52.0", "", { "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ=="],
31
31
 
@@ -37,7 +37,7 @@
37
37
 
38
38
  "@discordjs/formatters": ["@discordjs/formatters@0.6.2", "", { "dependencies": { "discord-api-types": "^0.38.33" } }, "sha512-y4UPwWhH6vChKRkGdMB4odasUbHOUwy7KL+OVwF86PvT6QVOwElx+TiI1/6kcmcEe+g5YRXJFiXSXUdabqZOvQ=="],
39
39
 
40
- "@discordjs/rest": ["@discordjs/rest@2.6.1", "", { "dependencies": { "@discordjs/collection": "^2.1.1", "@discordjs/util": "^1.2.0", "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "discord-api-types": "^0.38.40", "magic-bytes.js": "^1.13.0", "tslib": "^2.6.3", "undici": "6.24.1" } }, "sha512-wwQdgjeaoYFiaG+atbqx6aJDpqW7JHAo0HrQkBTbYzM3/PJ3GweQIpgElNcGZ26DCUOXMyawYd0YF7vtr+fZXg=="],
40
+ "@discordjs/rest": ["@discordjs/rest@2.6.3", "", { "dependencies": { "@discordjs/collection": "^2.1.1", "@discordjs/util": "^1.2.0", "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "discord-api-types": "^0.38.50", "magic-bytes.js": "^1.13.0", "tslib": "^2.6.3", "undici": "^6.27.0" } }, "sha512-wvOylxNYJkwKjctS/Mn5GP1w9r3/rzyH+ThD1JlAca6zEdlHs8QWBBUQJpU5Q+W6DoIj/Ljh1IPlZs7hTU+UAg=="],
41
41
 
42
42
  "@discordjs/util": ["@discordjs/util@1.2.0", "", { "dependencies": { "discord-api-types": "^0.38.33" } }, "sha512-3LKP7F2+atl9vJFhaBjn4nOaSWahZ/yWjOvA4e5pnXkt2qyXRCHLxoBQy81GFtLGCq7K9lPm9R517M1U+/90Qg=="],
43
43
 
@@ -117,23 +117,23 @@
117
117
 
118
118
  "@sapphire/shapeshift": ["@sapphire/shapeshift@4.0.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21" } }, "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg=="],
119
119
 
120
- "@sapphire/snowflake": ["@sapphire/snowflake@3.5.3", "", {}, "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ=="],
120
+ "@sapphire/snowflake": ["@sapphire/snowflake@3.5.5", "", {}, "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ=="],
121
121
 
122
122
  "@tokenizer/token": ["@tokenizer/token@0.3.0", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="],
123
123
 
124
124
  "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
125
125
 
126
- "@types/node": ["@types/node@22.19.19", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew=="],
126
+ "@types/node": ["@types/node@22.20.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q=="],
127
127
 
128
128
  "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
129
129
 
130
130
  "@vladfrangu/async_event_emitter": ["@vladfrangu/async_event_emitter@2.4.7", "", {}, "sha512-Xfe6rpCTxSxfbswi/W/Pz7zp1WWSNn4A0eW4mLkQUewCrXXtMj31lCg+iQyTkh/CkusZSq9eDflu7tjEDXUY6g=="],
131
131
 
132
- "@webgpu/types": ["@webgpu/types@0.1.70", "", {}, "sha512-LFiNHHKMvmAEvwVew3JLJmTdShhbdwRFSImUshGhE2mGE8ybQzIo63l5uRp+YKnNx+8Qno8Kf6gN+DKMreIJCA=="],
132
+ "@webgpu/types": ["@webgpu/types@0.1.71", "", {}, "sha512-mMy8/ODcKhab808co15eW+yN+HgXoQxRQHTiBV9Mrvl1r0ufnid7YOcI+gi4eUWSWl9ezD6TW2KXccrL8HCh2A=="],
133
133
 
134
134
  "abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="],
135
135
 
136
- "ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
136
+ "ansi-regex": ["ansi-regex@6.3.0", "", {}, "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ=="],
137
137
 
138
138
  "any-base": ["any-base@1.1.0", "", {}, "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg=="],
139
139
 
@@ -163,9 +163,9 @@
163
163
 
164
164
  "diff": ["diff@8.0.2", "", {}, "sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg=="],
165
165
 
166
- "discord-api-types": ["discord-api-types@0.38.48", "", {}, "sha512-WFUE/2o0lBlLeCQonQ+Pu2RqHAqbytBJ2RlXR91gzk05InSS6k9ShzzLYoymrA4c2oRgRKGE7/VqQJNNdGWSxQ=="],
166
+ "discord-api-types": ["discord-api-types@0.38.53", "", {}, "sha512-HL1zz/UuZ+bbJjA/X8Kbxx9gk8v9rJAbTeWRNYKmIdjwJ7EovjlHgoJTxcLpATfNJ+AonOtMdy3Y5MVIJAAd/A=="],
167
167
 
168
- "discord.js": ["discord.js@14.26.4", "", { "dependencies": { "@discordjs/builders": "^1.14.1", "@discordjs/collection": "1.5.3", "@discordjs/formatters": "^0.6.2", "@discordjs/rest": "^2.6.1", "@discordjs/util": "^1.2.0", "@discordjs/ws": "^1.2.3", "@sapphire/snowflake": "3.5.3", "discord-api-types": "^0.38.40", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "magic-bytes.js": "^1.13.0", "tslib": "^2.6.3", "undici": "6.24.1" } }, "sha512-4oBp8tc6Kf8IDBwAHhbsMaAqx1b5fob9SNasZT7V6yyyUydoO5i5fGuX7TmvRtR+q/WgKRnRViRoAWnG7fNyvA=="],
168
+ "discord.js": ["discord.js@14.27.0", "", { "dependencies": { "@discordjs/builders": "^1.14.1", "@discordjs/collection": "1.5.3", "@discordjs/formatters": "^0.6.2", "@discordjs/rest": "^2.6.2", "@discordjs/util": "^1.2.0", "@discordjs/ws": "^1.2.3", "@sapphire/snowflake": "3.5.5", "discord-api-types": "^0.38.49", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "magic-bytes.js": "^1.13.0", "tslib": "^2.6.3", "undici": "^6.27.0" } }, "sha512-qHbFlFG2N7y3LjPySYsL6A1+BnX6bkTVgo842EX0CqVPk/KTMwZkojPHEXKsQUpWZNyz5BISNHK1cPpQw0+m4A=="],
169
169
 
170
170
  "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
171
171
 
@@ -195,11 +195,11 @@
195
195
 
196
196
  "lodash.snakecase": ["lodash.snakecase@4.1.1", "", {}, "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="],
197
197
 
198
- "magic-bytes.js": ["magic-bytes.js@1.13.0", "", {}, "sha512-afO2mnxW7GDTXMm5/AoN1WuOcdoKhtgXjIvHmobqTD1grNplhGdv3PFOyjCVmrnOZBIT/gD/koDKpYG+0mvHcg=="],
198
+ "magic-bytes.js": ["magic-bytes.js@1.13.1", "", {}, "sha512-x5sn4UX2k5gCWlcfmoFwG4TPie8+dctESyqOBdhB5p6MsgWXdBKGmt9nXPObj/JI50TTL928lc5Yt1WntMn1bw=="],
199
199
 
200
- "marked": ["marked@17.0.1", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-boeBdiS0ghpWcSwoNm/jJBwdpFaMnZWRzjA6SkUMYb40SVaN1x7mmfGKp0jvexGcx+7y2La5zRZsYFZI6Qpypg=="],
200
+ "marked": ["marked@17.0.1", "", { "bin": "bin/marked.js" }, "sha512-boeBdiS0ghpWcSwoNm/jJBwdpFaMnZWRzjA6SkUMYb40SVaN1x7mmfGKp0jvexGcx+7y2La5zRZsYFZI6Qpypg=="],
201
201
 
202
- "mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],
202
+ "mime": ["mime@3.0.0", "", { "bin": "cli.js" }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],
203
203
 
204
204
  "omggif": ["omggif@1.0.10", "", {}, "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw=="],
205
205
 
@@ -213,9 +213,9 @@
213
213
 
214
214
  "peek-readable": ["peek-readable@4.1.0", "", {}, "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg=="],
215
215
 
216
- "pixelmatch": ["pixelmatch@5.3.0", "", { "dependencies": { "pngjs": "^6.0.0" }, "bin": { "pixelmatch": "bin/pixelmatch" } }, "sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q=="],
216
+ "pixelmatch": ["pixelmatch@5.3.0", "", { "dependencies": { "pngjs": "^6.0.0" }, "bin": "bin/pixelmatch" }, "sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q=="],
217
217
 
218
- "planck": ["planck@1.5.0", "", { "peerDependencies": { "stage-js": "^1.0.0-alpha.12" } }, "sha512-dlvqJE+FscZgrGUXJ5ybd0o5bvZ5XXyZNbm08xGsXp9WjXeAyWSFT6n9s/1PQcUBo4546fDXA5RMA4wbDyZw6g=="],
218
+ "planck": ["planck@1.4.2", "", { "peerDependencies": { "stage-js": "^1.0.0-alpha.12" } }, "sha512-mNbhnV3g8X2rwGxzcesjmN8BDA6qfXgQxXVMkWau9MCRlQY0RLNEkyHlVp6yFy/X6qrzAXyNONCnZ1cGDLrNew=="],
219
219
 
220
220
  "pngjs": ["pngjs@7.0.0", "", {}, "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow=="],
221
221
 
@@ -229,11 +229,11 @@
229
229
 
230
230
  "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
231
231
 
232
- "sax": ["sax@1.6.0", "", {}, "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA=="],
232
+ "sax": ["sax@1.6.1", "", {}, "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q=="],
233
233
 
234
234
  "simple-xml-to-json": ["simple-xml-to-json@1.2.7", "", {}, "sha512-mz9VXphOxQWX3eQ/uXCtm6upltoN0DLx8Zb5T4TFC4FHB7S9FDPGre8CfLWqPWQQH/GrQYd2AXhhVM5LDpYx6Q=="],
235
235
 
236
- "stage-js": ["stage-js@1.0.2", "", {}, "sha512-EWTRBYlg7Qv9wGUao99/PfRe3KaiQqWmgSvTOXvaWnu1Jk/q/vV8yJVu6bi/3EqDZeMVnCPAjheba6OFc5k1GQ=="],
236
+ "stage-js": ["stage-js@1.0.1", "", {}, "sha512-cz14aPp/wY0s3bkb/B93BPP5ZAEhgBbRmAT3CCDqert8eCAqIpQ0RB2zpK8Ksxf+Pisl5oTzvPHtL4CVzzeHcw=="],
237
237
 
238
238
  "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
239
239
 
@@ -255,7 +255,7 @@
255
255
 
256
256
  "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
257
257
 
258
- "undici": ["undici@6.24.1", "", {}, "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA=="],
258
+ "undici": ["undici@6.28.0", "", {}, "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA=="],
259
259
 
260
260
  "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
261
261
 
@@ -263,7 +263,7 @@
263
263
 
264
264
  "web-tree-sitter": ["web-tree-sitter@0.25.10", "", { "peerDependencies": { "@types/emscripten": "^1.40.0" }, "optionalPeers": ["@types/emscripten"] }, "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA=="],
265
265
 
266
- "ws": ["ws@8.21.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="],
266
+ "ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="],
267
267
 
268
268
  "xml-parse-from-string": ["xml-parse-from-string@1.0.1", "", {}, "sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g=="],
269
269
 
@@ -275,14 +275,10 @@
275
275
 
276
276
  "zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
277
277
 
278
- "@animalabs/agent-framework/@animalabs/chronicle": ["@animalabs/chronicle@0.2.6", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.6", "@animalabs/chronicle-darwin-x64": "0.2.6", "@animalabs/chronicle-linux-arm64-gnu": "0.2.6", "@animalabs/chronicle-linux-x64-gnu": "0.2.6", "@animalabs/chronicle-win32-x64-msvc": "0.2.6" } }, "sha512-+gbt2GR4SP8MnKxeqkJZf6oZn339fLiBtk6GHyBD/gHQ4e4eFqBpTaTd5eKycKBws0xWGcOqyiJFH4IdBkweUA=="],
279
-
280
- "@animalabs/context-manager/@animalabs/chronicle": ["@animalabs/chronicle@0.2.6", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.6", "@animalabs/chronicle-darwin-x64": "0.2.6", "@animalabs/chronicle-linux-arm64-gnu": "0.2.6", "@animalabs/chronicle-linux-x64-gnu": "0.2.6", "@animalabs/chronicle-win32-x64-msvc": "0.2.6" } }, "sha512-+gbt2GR4SP8MnKxeqkJZf6oZn339fLiBtk6GHyBD/gHQ4e4eFqBpTaTd5eKycKBws0xWGcOqyiJFH4IdBkweUA=="],
278
+ "@animalabs/context-manager/@animalabs/membrane": ["@animalabs/membrane@0.5.80", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-D4xEij+J/3sJo2ZKFyjAeb0VuJl3QmygzEmi44J0nDNtmJSpUPYMJMaSid/ABj3dIs5EyXds/Ltr4qqyQ2DRTw=="],
281
279
 
282
280
  "@discordjs/rest/@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
283
281
 
284
- "@discordjs/rest/@sapphire/snowflake": ["@sapphire/snowflake@3.5.5", "", {}, "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ=="],
285
-
286
282
  "@discordjs/ws/@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
287
283
 
288
284
  "image-q/@types/node": ["@types/node@16.9.1", "", {}, "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g=="],
@@ -0,0 +1,28 @@
1
+ # Pending changelog fragments
2
+
3
+ One file per change, so concurrent branches never conflict the way shared
4
+ `CHANGELOG.md` edits do. At release time `npm version` folds every fragment
5
+ here into the new version section of `CHANGELOG.md` and deletes it.
6
+
7
+ **Name:** `<slug>.<breaking|added|changed|fixed>.md`, as a flat file directly
8
+ in this directory. The slug just has to be unique among pending fragments and
9
+ filesystem-safe: the PR number works, and so does the branch name with `/`
10
+ replaced by `-` (`100-prose-routing.added.md`, `fix-retry-backoff.fixed.md`). The
11
+ release script refuses subdirectories and any other stray file here, so a
12
+ misplaced entry fails the release loudly instead of being left out.
13
+
14
+ **Content:** one or more markdown bullets, exactly as they should appear in
15
+ `CHANGELOG.md`. Continuation lines indent two spaces (nested bullets are
16
+ fine); headings and horizontal rules are refused even when indented, since a
17
+ heading inside a fragment would corrupt the section structure:
18
+
19
+
20
+ ```markdown
21
+ - Recipes accept `agent.proseRouting: "disabled"` for tool-only external
22
+ publication (#100). Continuation lines indent two spaces.
23
+ ```
24
+
25
+ Breaking fragments open by naming who needs to act:
26
+ `- **Recipe authors:** …`.
27
+
28
+ See [CONTRIBUTING.md](../CONTRIBUTING.md#changelog) for what needs an entry.
@@ -274,7 +274,7 @@ workloads whose cache is normally reused within five minutes.
274
274
 
275
275
  **`subagents`/`lessons`/`retrieval` are NOT part of the standard recipe.**
276
276
  All three are opt-in. RetrievalModule in particular injects context-dependent
277
- content into every compile (and spends two Haiku calls per turn), so it must
277
+ content into every compile (and spends up to two configured retrieval-model calls), so it must
278
278
  be an explicit opt-in for agents that actually curate a lesson library.
279
279
  Current host code defaults all three to off, but keep the explicit `false`
280
280
  entries in the recipe anyway — older host checkouts treated these as opt-out,
@@ -75,8 +75,8 @@ The trade-off is fidelity: the default response **omits the dynamically
75
75
  gathered injections** (lessons, retrieval results, MCPL `beforeInference`
76
76
  context), because gathering those is *not* free or transparent:
77
77
 
78
- - module `gatherContext` can run inference — e.g. the retrieval module makes
79
- Haiku calls, which cost tokens and add latency;
78
+ - module `gatherContext` can run inference — e.g. the retrieval module makes configured model calls, which cost tokens and add
79
+ latency;
80
80
  - MCPL `beforeInference` hooks are arbitrary RPCs to external servers with
81
81
  side effects, and a preview never sends the paired `afterInference`, which
82
82
  can leave a stateful server half-open.
@@ -0,0 +1,173 @@
1
+ # Retrieval Traces
2
+
3
+ The retrieval module can record a bounded, per-run explanation of automatic
4
+ lesson selection. The trace shows which concepts the selector returned, which
5
+ lessons matched mechanically, which candidates survived relevance filtering,
6
+ and the exact lesson block injected into the next compile.
7
+
8
+ Tracing is diagnostic. It does not change selection, trigger an extra model
9
+ call, or claim access to hidden chain-of-thought.
10
+
11
+ ## Prerequisites
12
+
13
+ Enable lessons, retrieval, and the Web UI in the recipe:
14
+
15
+ ```json
16
+ {
17
+ "modules": {
18
+ "lessons": true,
19
+ "retrieval": {
20
+ "model": "gpt-5.4-mini",
21
+ "maxInjected": 5,
22
+ "reasoningEffort": "high"
23
+ },
24
+ "webui": {
25
+ "host": "127.0.0.1",
26
+ "port": 7340,
27
+ "basicAuth": {
28
+ "username": "${WEBUI_USER}",
29
+ "password": "${WEBUI_PASS}"
30
+ }
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ `reasoningEffort` accepts `none`, `minimal`, `low`, `medium`, `high`, `xhigh`,
37
+ or `max`. It is optional, applies to both retrieval calls, and does not inherit
38
+ the primary agent's reasoning setting. This field is supported only when
39
+ `agent.provider` is `openai-responses` or `openai-codex`; Anthropic/Claude uses
40
+ separate native thinking controls and is rejected here rather than receiving an
41
+ invalid OpenAI-shaped request.
42
+
43
+ Retrieval remains opt-in and requires the lessons module. Depending on the
44
+ candidate count, one turn can use one selector call plus an optional relevance
45
+ call.
46
+
47
+ ## Operator viewer
48
+
49
+ Open:
50
+
51
+ ```text
52
+ http://127.0.0.1:7340/debug/retrieval/view
53
+ ```
54
+
55
+ The viewer highlights selected lessons, lists all mechanically matched
56
+ candidates and their match provenance, summarizes the relevance decision, and
57
+ keeps the retained trace JSON behind a diagnostic disclosure. Each run is
58
+ labeled with the invoking agent name. Separate Host processes retain separate
59
+ trace stores and viewers; the endpoint does not aggregate fleet children.
60
+
61
+ ## JSON endpoint
62
+
63
+ ```text
64
+ GET /debug/retrieval[?limit=20][&includeInputs=1]
65
+ ```
66
+
67
+ | Parameter | Default | Meaning |
68
+ |---|---:|---|
69
+ | `limit` | `20` | Newest traces to return, clamped to `1..100`. |
70
+ | `includeInputs` | off | Exact recent conversation and model-stage inputs are included only when the value is the literal `1`. |
71
+
72
+ Example envelope:
73
+
74
+ ```json
75
+ {
76
+ "schemaVersion": 1,
77
+ "enabled": true,
78
+ "includeInputs": false,
79
+ "traces": []
80
+ }
81
+ ```
82
+
83
+ Each trace can include:
84
+
85
+ - configured model and request-level reasoning parameters;
86
+ - recent-context hash, message count, and available message IDs;
87
+ - selector prompt, raw returned text, normalized provider blocks, parsed
88
+ concepts, and parse mode;
89
+ - every mechanical candidate, lesson snapshot, and content/tag match reason;
90
+ - relevance-call output or the reason validation was skipped;
91
+ - final relevant and injected lesson IDs, exact lesson snapshots, injection
92
+ namespace/position, and rendered `## Retrieved Knowledge` block;
93
+ - cache-hit provenance, outcome, duration, and errors.
94
+
95
+ Opaque or redacted reasoning blocks are retained only as provider-returned
96
+ content blocks. The trace does not decrypt them or present them as hidden
97
+ chain-of-thought. Each lesson snapshot is a point-in-time copy of every
98
+ `Lesson` field: `id`, `content`, `confidence`, `tags`, `evidence`, `created`,
99
+ `updated`, `deprecated`, and optional `deprecationReason`.
100
+
101
+ If retrieval is disabled, the endpoint returns `enabled: false` and an empty
102
+ trace list.
103
+
104
+ ## Authentication and privacy
105
+
106
+ Both routes require password-derived operator authentication, including on a
107
+ loopback bind. Web UI Basic Auth must be configured; the routes accept either
108
+ direct valid Basic Auth or a full session created by password sign-in. A
109
+ loopback-only Web UI without configured credentials returns `401` for these two
110
+ routes, while other Web UI routes retain their historical loopback behavior.
111
+ Read-only observer cookies are rejected even when they carry the `debug` scope.
112
+
113
+ Exact recent conversation and stage inputs are omitted by default because they
114
+ can contain private text. Use `includeInputs=1` deliberately; values such as
115
+ `true` or `yes` do not enable disclosure. Lesson contents, selector output,
116
+ candidate provenance, and the final injected block remain visible in the
117
+ default trace because they are the subject of the diagnostic.
118
+
119
+ Every response from either retrieval route uses `Cache-Control: no-store`,
120
+ including authentication failures, not-yet-bound responses, and internal
121
+ errors.
122
+
123
+ ## Retention and failure behavior
124
+
125
+ The retrieval module retains at most the newest 100 traces and, by default, at
126
+ most 8 MiB of UTF-8 encoded trace JSON in process memory. The limits are
127
+ enforced after every active trace mutation. When the byte budget is reached,
128
+ the oldest traces are evicted until both limits are satisfied. Traces are not
129
+ written to Chronicle and disappear when the Host restarts. Cache provenance is
130
+ rewritten when a referenced source is evicted or truncated, while each
131
+ cache-hit trace keeps its own complete selected-lesson snapshots when they fit
132
+ within the budget.
133
+
134
+ If one trace alone exceeds the byte budget, it is replaced with a small record
135
+ whose `truncation.kind` is `tombstone` and whose reason and original encoded
136
+ size make clear that the detailed payload is unavailable. Tombstones are never
137
+ presented as exact traces. Payloads that fit remain complete.
138
+
139
+ Trace recording is fail-open: metadata collection and serialization failures
140
+ must not block retrieval or the primary inference. Arbitrary provider blocks
141
+ and request-level provider parameters are converted to JSON-safe snapshots
142
+ before they are exposed. Their retained representations bound recursion depth,
143
+ total nodes, array items, object keys,
144
+ individual strings, and aggregate string bytes. When a bound applies, the
145
+ stage's `responseContentTruncation` records the explicit reason and active
146
+ limits. Cycles, BigInts, nonfinite numbers, and unreadable properties remain
147
+ safe to serialize using explicit unavailable-value records.
148
+
149
+ Viewing an existing trace is read-only. Retrieval itself still performs its
150
+ normal model calls and lesson lookup when the agent gathers context.
151
+
152
+ ## Response codes
153
+
154
+ | Status | Meaning |
155
+ |---:|---|
156
+ | `200` | Viewer or trace response returned. |
157
+ | `401` | Missing operator authentication, including observer-only sessions. |
158
+ | `500` | Retrieval Trace listing failed; the response remains noncacheable. |
159
+ | `503` | Host application has not bound to the Web UI yet. |
160
+
161
+ ## Troubleshooting
162
+
163
+ - `enabled: false`: enable both `modules.lessons` and `modules.retrieval`, then
164
+ restart with the updated recipe.
165
+ - Empty `traces`: no retrieval run has completed or started since this Host
166
+ process began.
167
+ - Many candidates but few selected lessons: the relevance stage is filtering
168
+ mechanical keyword matches. `maxInjected` is a ceiling, not a quota.
169
+ - `sourceTraceEvicted: true`: a cache hit refers to a run older than the
170
+ in-memory retention window; the exact selected lesson snapshots remain on the
171
+ cache-hit trace.
172
+ - `sourceTraceTruncated: true`: the referenced source is retained only as a
173
+ tombstone; inspect the complete snapshots on the cache-hit trace itself.
@@ -160,7 +160,8 @@ Query params:
160
160
  - `agent=<name>` — defaults to the recipe's root agent
161
161
  - `injections=1` — opt into full fidelity: gather the dynamic injections too.
162
162
  **Not transparent** — this can run inference (e.g. the retrieval module's
163
- Haiku calls cost tokens) and fires MCPL `beforeInference` hooks (whose paired
163
+ configured model calls cost tokens) and fires MCPL `beforeInference` hooks
164
+ (whose paired
164
165
  `afterInference` is never sent, so a stateful server may be left half-open).
165
166
  - `pretty=1` — pretty-print the JSON
166
167