pantheon-opencode 1.6.2-beta.3 β†’ 1.6.2-beta.5

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 (71) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +209 -1
  3. package/bin/pantheon-init.mjs +22 -0
  4. package/package.json +9 -3
  5. package/plugin.json +1 -1
  6. package/pyproject.toml +1 -1
  7. package/scripts/decision-router-budget.mjs +781 -0
  8. package/scripts/decision-router-v2-budget.mjs +218 -0
  9. package/scripts/decision-router-v2-egress.mjs +272 -0
  10. package/scripts/decision-router.mjs +519 -0
  11. package/scripts/docs-check-changelog.mjs +5 -3
  12. package/scripts/install/decision-layer-preview.mjs +376 -0
  13. package/scripts/install/decision-router-config.mjs +579 -0
  14. package/scripts/install/interactive.mjs +76 -5
  15. package/scripts/install/opencode.mjs +12 -0
  16. package/scripts/install/state.mjs +5 -0
  17. package/scripts/install/strings.mjs +4 -0
  18. package/scripts/mcp_resources.py +11 -9
  19. package/scripts/release-notes.mjs +30 -7
  20. package/scripts/versioning.mjs +41 -5
  21. package/src/agents/zeus.md +12 -0
  22. package/src/mcp/eval_store.py +11 -4
  23. package/src/mcp/mcp_resources.py +11 -9
  24. package/src/mcp/memory_mcp.py +293 -150
  25. package/src/pantheon/local-decision-agents.ts +170 -0
  26. package/src/pantheon/local-decision-budget.ts +1043 -0
  27. package/src/pantheon/local-decision-egress-gate.ts +264 -0
  28. package/src/pantheon/local-decision-prompt.ts +268 -0
  29. package/src/pantheon/local-decision-provider-matrix.ts +92 -0
  30. package/src/pantheon/local-decision-provider-protocol.ts +335 -0
  31. package/src/pantheon/local-decision-provider.internal.ts +260 -0
  32. package/src/pantheon/local-decision-router.ts +225 -0
  33. package/src/pantheon/local-decision-skills.ts +281 -0
  34. package/src/pantheon/local-decision-tool.ts +160 -0
  35. package/src/pantheon/local-decision-turn.ts +338 -0
  36. package/src/pantheon/local-decision-usage-evidence.internal.ts +207 -0
  37. package/src/pantheon/local-orchestration.ts +322 -0
  38. package/src/pantheon/pantheon-decision-catalog.ts +101 -0
  39. package/src/pantheon/v2-decision-budget.ts +456 -0
  40. package/src/pantheon/v2-decision-contracts.ts +300 -0
  41. package/src/pantheon/v2-decision-egress.ts +203 -0
  42. package/src/pantheon/v2-decision-events.ts +180 -0
  43. package/src/pantheon/v2-decision-heuristic.ts +121 -0
  44. package/src/pantheon/v2-decision-points/p1-agent.ts +91 -0
  45. package/src/pantheon/v2-decision-points/p10-claims.ts +243 -0
  46. package/src/pantheon/v2-decision-points/p11-catalog.ts +220 -0
  47. package/src/pantheon/v2-decision-points/p2-skill.ts +83 -0
  48. package/src/pantheon/v2-decision-points/p3-complexity.ts +108 -0
  49. package/src/pantheon/v2-decision-points/p4-memory.ts +137 -0
  50. package/src/pantheon/v2-decision-points/p5-themis-verify.ts +190 -0
  51. package/src/pantheon/v2-decision-points/p6-council.ts +161 -0
  52. package/src/pantheon/v2-decision-points/p7-loop.ts +263 -0
  53. package/src/pantheon/v2-decision-points/p8-guardrail.ts +366 -0
  54. package/src/pantheon/v2-decision-points/p9-memory-compaction.ts +304 -0
  55. package/src/pantheon/v2-decision-points.ts +242 -0
  56. package/src/pantheon/v2-decision-policy.ts +166 -0
  57. package/src/pantheon/v2-decision-premises.ts +146 -0
  58. package/src/pantheon/v2-decision-prompt-surface.ts +115 -0
  59. package/src/pantheon/v2-decision-rank.ts +91 -0
  60. package/src/pantheon/v2-decision-registry.ts +391 -0
  61. package/src/pantheon/v2-decision-resource-ids.ts +127 -0
  62. package/src/pantheon/v2-decision-shadow.ts +123 -0
  63. package/src/pantheon/v2-decision-telemetry.ts +214 -0
  64. package/src/pantheon/v2-decision-verify.ts +51 -0
  65. package/src/pantheon/v2-tools.ts +35 -15
  66. package/src/plugin-v2.ts +357 -22
  67. package/src/plugin.ts +4 -0
  68. package/src/plugins/tui/dist/tui-v2.js +3 -3
  69. package/src/plugins/tui/dist/tui.js +1 -1
  70. package/src/plugins/tui/package-lock.json +2 -2
  71. package/src/plugins/tui/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
10
10
  <!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
11
11
  move this section to a versioned entry and reset the template below. -->
12
12
 
13
+ ## [v1.6.2-beta.5] - 2026-11-01
14
+
15
+ ## πŸ†• What's New
16
+ - **routing** β€” wire decision points to their declared host surfaces in shadow (#304)
17
+ - **routing** β€” add V2 decision layer with measured-shape adapters (#303)
18
+
19
+ ## 🐞 Fixed
20
+ - **mcp** β€” harden memory and resource MCP reliability (#306)
21
+ ## [v1.6.2-beta.4] - 2026-10-31
22
+
23
+ ### Added
24
+
25
+ - **install** β€” Added a user-level `decision-router` admin CLI for enablement, selection, consent, per-user/provider/model caps, and period confirmation; config is private and non-secret.
26
+ - **install** β€” Added `decision-router holds` to list unresolved reservations without reserving, reconciling, releasing, or pruning.
27
+ - **docs** β€” Added an offline protocol for separately evaluating agent routing and task complexity; no benchmark results or provider selection are claimed.
28
+ - **routing** β€” Added a default-off, local-only recommendation API for exact canonical agent roles and structured complexity dimensions; it does not dispatch agents or change gates.
29
+ - **routing** β€” Added a private V2 per-turn selector: allowlisted skills, at most one specialist, one call per session/message, and deterministic local fallback.
30
+ - **routing** β€” Added a private fixed-endpoint adapter for `gpt-6-luna` and `jev-1.14.0` with no caller-supplied transport, retry, or fan-out; Console/Free and Bifrost stay ineligible.
31
+ - **routing** β€” Provider contract tests run under the real `tsx` runner (`npm run test:ts`) for the exact payload, gate denials, usage reconciliation, and one call per turn; no live call was made.
32
+ - **routing** β€” Added a user-level `enabled` switch, canonical provider/model matrix, and a single ledger mapping; provider egress also requires the host `permission.assert` gate.
33
+ - **routing** β€” Added a user-scoped SQLite ledger with explicit UTC reservations and no default caps. Admission caps are local safeguards, not invoice guarantees.
34
+ - **docs** β€” `decision-router status`/`holds` are read paths: `status` may create the SQLite ledger, and both may migrate it, but neither reserves, reconciles, releases, or prunes.
35
+ - **docs** β€” The `local-decision-router` subpath is TypeScript source needing the host runtime or a transpiler; the published CLI uses the committed ESM bundle.
36
+
37
+ ### Changed
38
+
39
+ - **security** β€” Decision egress is fail-closed: a missing gate, cap, period, or credential means zero requests; V1 stays local-only.
40
+ - **release** β€” `prepack` now runs the `check:decision-router` drift gate, so a stale ledger bundle cannot be packed or published.
41
+
42
+ ### Fixed
43
+
44
+ - **install** β€” `decision-router caps user` without flags now reports `Both --monthly-usd and --per-decision-usd are required` as a one-line usage error instead of a stack trace.
45
+ - **routing** β€” `permission.assert` denial (thrown or returned, including the host's `Permission denied: decision.egress` message) means zero requests; an explicit `deny` rule is the kill-switch.
46
+ - **routing** β€” Egress trusts the user-level config; `permission.assert` is only the host kill-switch. A v2.2.0 canary showed an unruled assertion resolves allow and `evaluate` runs only on that path.
47
+ - **routing** β€” A cached provider decision re-reads the user-level config/consent gate before reuse, so revoking consent takes effect without waiting for cache expiry.
48
+ - **security** β€” The prompt hook reuses one decision per turn and never logs or persists the raw request; payloads stay allowlisted.
49
+ - **security** β€” Credential rejection now requires a token boundary and structured `sk-` prefixes, so prose such as `task-force-*` or `disk-usage-*` is no longer treated as a key.
50
+ - **routing** β€” Reusing a cached provider decision does not re-prompt the same permission gate; a different or missing gate is still evaluated and denies fail-closed.
51
+ - **docs** β€” Clarified that `decision-router holds` performs no reservation, reconciliation, release, or pruning, while opening an existing ledger may apply a forward-only schema migration.
52
+
53
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
54
+ move this section to a versioned entry and reset the template below. --&gt;
13
55
  ## [v1.6.2-beta.3] - 2026-10-29
14
56
 
15
57
  ### Changed
package/README.md CHANGED
@@ -97,6 +97,14 @@ see [Quick Start](docs/QUICKSTART.md).
97
97
  and documenting work.
98
98
  - **5 local MCP servers** for project memory, persistence, resources, confined
99
99
  script execution, and vision.
100
+ - **A selective, advisory decision router** with structured local results and an
101
+ optional per-turn skill/agent recommendation. Provider egress is fail-closed: it
102
+ requires explicit enablement, consent, one cap-valid `openai-decisions` or
103
+ `typesafe-jev` candidate, a confirmed period, and the host permission gate.
104
+ Console/Free and Bifrost are never eligible. This statement applies to this
105
+ decision subsystemβ€”not to all Pantheon egress; quota and Vision integrations
106
+ retain their separately documented external requests. See the
107
+ [router reference](docs/reference/local-decision-router.md).
100
108
  - **An optional TUI** with a dispatch sidebar block and a full-width
101
109
  `/dispatch` panel. The V2 TUI also provides a quota overview in the
102
110
  sidebar/footer and a `/quota` details panel. Quota display is enabled by
@@ -140,6 +148,11 @@ see [Quick Start](docs/QUICKSTART.md).
140
148
  the
141
149
  [quota provider coverage table](docs/tui-v2-quota-providers.md) for limits and
142
150
  troubleshooting.
151
+
152
+
153
+ Quota status requests are separate from the decision subsystem and continue to use
154
+ their documented provider APIs. Removing decision-provider transport does not
155
+ disable these quota requests.
143
156
  `/quota-go-check` is a separate manual, confirmation-gated diagnostic: one
144
157
  GET to `https://opencode.ai/zen/go/v1/usage` with the configured Go API key
145
158
  (not OAuth), at most one attempt per plugin runtime. It never refreshes quota,
@@ -229,6 +242,185 @@ fan-in or job recovery without an exposed mechanism.
229
242
  The delegation model, caller/target matrix, and approval gates are documented
230
243
  in [Architecture](docs/ARCHITECTURE.md) and
231
244
  [Permissions, Gates & Delegation](docs/PERMISSIONS-QUALITY-DELEGATION.md).
245
+ The [local decision router](docs/reference/local-decision-router.md) is
246
+ consultative: it narrows an advisory skill list and can recommend at most one
247
+ specialist, but it never intercepts native child-session dispatch or changes
248
+ permissions. The standalone API is default-off
249
+ (`PANTHEON_LOCAL_DECISION_ROUTER=1`); per-turn selection additionally requires
250
+ `enabled: true` in the user-level config. Provider egress is fail-closed and
251
+ requires every local gate plus a non-denying host `ctx.permission.assert`. The
252
+ host is not deny-by-default for `decision.egress` (an unruled assertion resolved
253
+ allow on the measured canary), so the user-level config/consent gate is the
254
+ source of truth and an explicit host `deny` rule is the kill-switch. A canary
255
+ measured the assertion contract but made no live provider call, so egress remains
256
+ unverified and off by default. Native child-session dispatch remains the final
257
+ routing action.
258
+
259
+ The installer may retain a legacy target-specific preference; it does not control
260
+ runtime routing. `npx pantheon-opencode decision-router ...` manages user-level
261
+ enablement, selection, candidates, consent, caps, and period confirmation. The
262
+ separate SQLite ledger has no default caps. Caps limit local admission but are not
263
+ invoice guarantees. Installation does not contact a model provider or inspect
264
+ credentials. The published CLI imports committed ESM bundles:
265
+ `npm run build:decision-router` regenerates them and `npm run check:decision-router`
266
+ (the `prepack`/`prepublishOnly` drift gate) fails when any is stale. The
267
+ `pantheon-opencode/local-decision-router` subpath itself is TypeScript source, so
268
+ it loads only in the host runtime or under a transpiler such as `tsx`.
269
+
270
+ Decision-layer commands are separated by effect. `decision-router help`,
271
+ `status`, `preview` and `holds` are read-only: they never create, migrate, or
272
+ write the config or the SQLite ledger, and neither does `setup` without
273
+ `--apply`. `select` records a preference and can never enable anything β€” moving
274
+ the target also revokes consent recorded for the previous one. `setup` prints a
275
+ **computed diff of the target artifacts** (snapshot + SHA-256 per file, compared
276
+ against the exact bytes the writer would produce); `setup --apply` is the form
277
+ that writes, and a second run reports `0 create Β· 0 update`. It is deliberately
278
+ not the installer's "Change plan", which announced 112 creates for an apply that
279
+ created nothing. `setup --target <dir>` also reconciles the
280
+ `.pantheon/install-state.json` provider/consent record with the user-level config;
281
+ that record is derived from the config and never asserts consent the config lacks.
282
+ Neither path creates a backup: installer backup sets accumulate once per
283
+ application and contain credential-bearing material (API keys/tokens), so no
284
+ extra copy is made. Installer file-ownership tracking is partial and asymmetric β€”
285
+ `file_inventory` indexes 53 PROJECT artifacts and no GLOBAL ones (F-15); the
286
+ 106-project / 107-global denominators are derived from the 213-artifact total and
287
+ are not separately indexed β€” so this preview compares the decision-layer
288
+ artifacts it owns, not "everything the installer touched".
289
+
290
+ Provider egress remains opt-in with the default `off`; no command in this layer
291
+ can switch it on without enablement, recorded consent, one cap- and
292
+ period-eligible candidate and a non-denying host gate. The fixed OpenAI/TypeSafe
293
+ endpoints are retained inert and are documented as **unwired**; this statement is
294
+ about wiring, not about removing any transport. Each endpoint carries its own
295
+ explicit wire status, and a test fails when a declared endpoint is neither
296
+ asserted `unwired` nor exercised by a real path. Verification covers **only the
297
+ paths a probe exercised β€” none** β€” so nothing here is evidence about network
298
+ absence on an unexercised path; `permission.evaluate.egress` is likewise
299
+ unreachable in the probed host (a tool declaring it is never advertised to the
300
+ provider). Measured surface coverage is
301
+ reported honestly rather than implied: P7 runs behind `PANTHEON_V2_P7_LOOP` with
302
+ an **advisory** execution cap (never described as enforcement), P2 is
303
+ **advisory-only** (an empirical no-op on the default path), P9 was measured on
304
+ top-level **and child** sessions with `reason:"overflow"` still unmeasured, and
305
+ P8 is **advisory: not activatable by measurement** β€” its declared rules match no
306
+ delivered permission payload, so it narrows nothing (PROBE-F).
307
+
308
+ ### The V2 decision layer is declared in full and wired in part
309
+
310
+ The V2 decision layer declares eleven integration points (P1–P11) over three
311
+ decision primitives β€” `ask`, `rank`, and `verify` β€” and a deterministic policy
312
+ that decides which point may run. **Seven of the eleven have a production call
313
+ site: two behind flags that are off by default, five in shadow.**
314
+
315
+ - **P7 (loop)** is wired to `session.execution.succeeded` behind
316
+ `PANTHEON_V2_P7_LOOP`, which is off. It writes each observation to an
317
+ in-memory, bounded telemetry collector that the plugin never reads back and
318
+ exposes only to tests, so "records" here does not mean an operator-visible log.
319
+ - **P8 (guardrail)** is wired to `permission.evaluate` behind
320
+ `PANTHEON_V2_P8_GUARDRAIL`, which is off. C8 is closed **by measurement**, and
321
+ the measurement is negative: PROBE-F delivered 24 real `permission.evaluate`
322
+ events and every declared rule matched none of them (a valid `action` token and
323
+ a top-level `sessionID` are always present), the host resolves an unrecognised
324
+ effect as `ask` and proceeds, and `permission.evaluate.egress` is unreachable
325
+ (a tool declaring it is never advertised to the provider). As declared, P8 does
326
+ not narrow. The flag stays off.
327
+ - **P1 and P2** are registered on `session.hook('prompt')` in **shadow**. They
328
+ observe the same admission payload through a projection that carries only
329
+ `prompt.agents` and `prompt.skills`: no text, no file bytes, no metadata, no
330
+ mutation, no throw. Every record says `effect: none` and goes to an in-memory,
331
+ bounded collector the plugin never reads back (test-visible only).
332
+ - **P3** is wired at its declared `tool.invoke` in **shadow**: the
333
+ `pantheon_local_decision` tool hands the adapter its own input, whose schema
334
+ requires `complexity` and `gateStatus`. It records a classification when the
335
+ tool is invoked β€” never a permanent `complexity.invalid` refusal from a payload
336
+ that cannot carry the vector β€” and applies nothing.
337
+ - **P9** is wired at its declared `session.hook('compaction')` in **shadow**, on
338
+ the carrier that was actually measured: the top-level `sessionID` and the
339
+ `system` part array. It records the decision key and the payload shape and
340
+ pushes nothing β€” the injected compaction context is unchanged β€” and a payload
341
+ whose only session id is a nested `session.id` (a field the 2.2.5 host never
342
+ sends) produces no decision at all. The same shape was measured in a **child**
343
+ session (PROBE-G: hook fires 3/3, child `sessionID` at top level, `system` an
344
+ array of 4), so no child-specific branch exists. `reason:"overflow"` was not
345
+ inducible and is not designed for. No measured surface carries the memory
346
+ candidate list it would retain or discard, so its record states that absence
347
+ rather than a retention or a priority.
348
+ - **P11** is wired inside `ctx.tool.transform` in **shadow**: it reads the draft
349
+ the host hands that callback and calls none of its mutators. Shadow has no
350
+ responder, so it records the validated `choice` question over the draft ids β€”
351
+ never a selection.
352
+
353
+ **The other four β€” P4, P5, P6 and P10 β€” are library code with no production call
354
+ site.** Nothing constructs or registers them outside the per-point test suites β€”
355
+ the offline harness imports no adapter module. P6 and P10 declared the prompt
356
+ hook, but that payload never carries council candidates or counsellor claims, so
357
+ they stay unwired instead of recording a refusal from a surface that cannot feed
358
+ them. P4 ranks a memory candidate array and the measured `context` payload
359
+ carries `system` text parts, not candidates; P5 verifies a declared
360
+ `{ requirements, responses }` pair and the `execute.after` event carries
361
+ neither. On a host they do not read the turn, record no telemetry and have no
362
+ switch to turn off, because nothing registers them.
363
+
364
+ "Shadow" therefore means no behavioural change, not a claim of effect: the five
365
+ shadow points read a narrow slice of their surface and decide nothing from it,
366
+ and the two flag-gated points are off. No activation flag is set in a default
367
+ install.
368
+
369
+ The CLI separates effects: `npx pantheon-opencode decision-router help`, `status`,
370
+ `preview` and `holds` never write, `setup` writes only under `--apply`, `preview`
371
+ is an alias of `setup`, and `select` records a preference without enabling
372
+ anything. Egress stays opt-in and off, and only the explicit `enable`, `consent`,
373
+ `caps` and `period` actions can change that; no read-only command can.
374
+
375
+ What the layer does **not** do today, stated as measured rather than implied:
376
+
377
+ - **P2 (skills) is advisory-only and does not filter.** It is an empirical no-op
378
+ on the default path, because the host sends `prompt.skills` absent. Effective
379
+ project-skill filtering was cancelled by measurement, not emulated, and no
380
+ token reduction is claimed.
381
+ - **P7 (loop) is behind `PANTHEON_V2_P7_LOOP`, off by default, and does not
382
+ enforce loop limits.** It counts executions and writes an `effect: none`
383
+ observation to an in-memory collector that nothing reads back. Its
384
+ 12-execution cap is **advisory**: no measured host surface signals a new user
385
+ turn, so nothing is claimed to reset the streak.
386
+ - **P9 (compaction) is measured in top-level and child sessions.** PROBE-G fired
387
+ the hook in a real child 3/3 with the child's `sessionID` at top level and the
388
+ same payload shape. `reason: "overflow"` was **not inducible** in 6 error
389
+ shapes β€” the host retried and completed, and the one failure-recovery
390
+ compaction was persisted as `reason:"auto"` β€” so that path stays unmeasured;
391
+ the checkpoint reinjection inside a child was not exercised, and the `messages`
392
+ channel remains UNKNOWN. The memory candidate list is not available on any
393
+ measured surface, so the wired P9 record names that absence and claims no
394
+ retention or priority.
395
+ - **P8 (guardrail) is not activatable by measurement.** PROBE-F delivered 24 real
396
+ `permission.evaluate` events: the payload is
397
+ `["sessionID","agent","action","resources","metadata","source","effect"]` with
398
+ `effect` an own writable data property pre-populated by the host, and a written
399
+ `deny` **is** honoured. But neither declared rule can match a delivered payload
400
+ (valid `action` token, `sessionID` always present), the host lets an
401
+ unrecognised effect resolve as `ask` and execute, and
402
+ `permission.evaluate.egress` is unreachable β€” so the current rule set matches
403
+ nothing and does not narrow. The point is recorded as **advisory**, not as
404
+ awaiting review, and the inertness is the measured verdict rather than a design
405
+ claim. `execute.before` remains the only hard barrier.
406
+ - **The embeddings-versus-BM25 comparison has not been run.** The environment is
407
+ offline with no embedding model available, so BM25 remains the baseline and no
408
+ gain or loss in retrieval or tokens is claimed in either direction.
409
+
410
+ Calibration that was run: the offline harness
411
+ (`npx tsx tests/pantheon/v2-decision-harness.test.ts`) executed 264 synthetic
412
+ cases β€” 132 normal, 66 refusal, 66 adversarial β€” across the eleven points, with
413
+ 24 cases per point and the suite asserting at least 20 cases, 5 refusals and 5
414
+ adversarial cases per point. All 264 cases passed on 2026-10-31. This harness is
415
+ the only place all eleven points are exercised in one run, but it imports no
416
+ adapter module: it iterates the registry and exercises the shared primitives,
417
+ while the adapters are covered by their per-point suites
418
+ (`v2-decision-p1.test.ts` … `v2-decision-p11.test.ts`). Passing it says nothing
419
+ about whether a point is registered in a host.
420
+ The harness measures contracts (admission, refusal, shadow no-op, telemetry
421
+ redaction, offline discipline, registry integrity), **not** token use, quality,
422
+ latency or any effect inside a host turn. Numbers and unmeasured surfaces are
423
+ recorded in the [router reference](docs/reference/local-decision-router.md).
232
424
 
233
425
  ## Documentation
234
426
 
@@ -240,15 +432,31 @@ in [Architecture](docs/ARCHITECTURE.md) and
240
432
  | [Compatibility](docs/COMPATIBILITY.md) | [OpenCode V2](docs/opencode-v2.md) |
241
433
  | [Agents & Skills](docs/agents/README.md) | [Platforms](docs/PLATFORMS.md) |
242
434
  | [Release Process](docs/RELEASING.md) | [Branch Protection](docs/BRANCH-PROTECTION.md) |
243
- | [Model Routing](docs/reference/model-routing.md) | [Env Vars](docs/reference/env-vars.md) Β· [Code Mode](docs/reference/code-mode.md) |
435
+ | [Model Routing](docs/reference/model-routing.md) | [Local Decision Router](docs/reference/local-decision-router.md) Β· [Offline Evaluation Protocol](docs/reference/offline-evaluation.md) Β· [Env Vars](docs/reference/env-vars.md) Β· [Code Mode](docs/reference/code-mode.md) |
244
436
  | [Contributing](CONTRIBUTING.md) | [Roadmap](ROADMAP.md) Β· [Changelog](CHANGELOG.md) |
245
437
 
438
+ Memory writes through `pantheon-memory` are serialized, and failed writes are
439
+ reported as failures rather than as stored entries. Eval resources wait for
440
+ SQLite locks and close their connections; project-specific resources resolve
441
+ the current project root per request while preserving the trusted
442
+ `PANTHEON_HOME` fallback. See [Memory](docs/MEMORY.md) for store separation and
443
+ [MCP tools](docs/mcp-tools.md) for details.
444
+
246
445
  The release install gate's tool canary loads the installed tarball's V2 plugin
247
446
  entry under OpenCode 2.0.30 and verifies `hashline_edit` registration, Code Mode
248
447
  visibility, and a bounded edit in an isolated project. It does not prove npm
249
448
  publication or compatibility with untested host versions; details are in the
250
449
  [release process](docs/RELEASING.md).
251
450
 
451
+ Generate beta release notes from commits since the latest prior beta tag with
452
+ `node scripts/versioning.mjs apply --beta --notes`. See the [release
453
+ procedure](docs/RELEASING.md) for details.
454
+ After the version bump, verify and rebuild the TUI workspace from the repository
455
+ root with `npm run typecheck --workspace=src/plugins/tui` and
456
+ `npm run build --workspace=src/plugins/tui`.
457
+ The maintainer-only `release` scope is excluded from public notes and their
458
+ Closed Issues references; see the [release-notes policy](docs/RELEASING.md#release-notes).
459
+
252
460
  ## Status
253
461
 
254
462
  The manifests in this checkout express the version being prepared, not a
@@ -84,6 +84,12 @@ function printUsage() {
84
84
  ' npx pantheon-opencode init --merge-dev-config <path> # Merge a dev config (off by default)',
85
85
  )
86
86
  console.log(' npx pantheon-opencode set-tier <name> # Set active model preset (global)')
87
+ console.log(
88
+ ' npx pantheon-opencode decision-router help|status|setup|preview|holds # read-only',
89
+ )
90
+ console.log(
91
+ ' npx pantheon-opencode decision-router select|enable|consent|caps|period # explicit actions',
92
+ )
87
93
  console.log(
88
94
  ' npx pantheon-opencode update [--stable] # Update package + re-run init (default: beta channel)',
89
95
  )
@@ -192,6 +198,22 @@ async function main() {
192
198
  process.exit(result.status ?? 1)
193
199
  }
194
200
 
201
+ if (command === 'decision-router') {
202
+ const { DecisionRouterUsageError, runDecisionRouterCommand } = await import(
203
+ '../scripts/decision-router.mjs'
204
+ )
205
+ try {
206
+ await runDecisionRouterCommand(args.slice(1))
207
+ } catch (error) {
208
+ // A malformed command line is user input, not a crash: print one line and
209
+ // skip the stack the top-level handler would otherwise dump.
210
+ if (!(error instanceof DecisionRouterUsageError)) throw error
211
+ console.error(`Error: ${error.message}`)
212
+ process.exit(1)
213
+ }
214
+ return
215
+ }
216
+
195
217
  // beta.5: one-command update β€” check npm dist-tag, install, re-init.
196
218
  // Default channel is `beta` (the prerelease line); `--stable` uses `latest`.
197
219
  if (command === 'update') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantheon-opencode",
3
- "version": "1.6.2-beta.3",
3
+ "version": "1.6.2-beta.5",
4
4
  "description": "Multi-agent orchestration for OpenCode β€” 14 specialized agents, TDD, Themis review gates.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -11,6 +11,7 @@
11
11
  "registry": "https://registry.npmjs.org/"
12
12
  },
13
13
  "exports": {
14
+ "./local-decision-router": "./src/pantheon/local-decision-router.ts",
14
15
  "./plugin": "./src/plugin.ts",
15
16
  "./plugin-v2": "./src/plugin-v2.ts",
16
17
  "./v2-bridge": "./src/pantheon/v2-bridge.ts"
@@ -20,6 +21,8 @@
20
21
  "prepare": "husky",
21
22
  "setup": "node scripts/setup.mjs",
22
23
  "build:agents-md": "node scripts/build-agents-md.mjs",
24
+ "build:decision-router": "node scripts/build-decision-router.mjs",
25
+ "check:decision-router": "node scripts/build-decision-router.mjs --check",
23
26
  "skills:lock": "node scripts/update-skills-lock.mjs",
24
27
  "setup:lite": "node bin/pantheon-init.mjs init --yes --clean --components agents,skills,instructions",
25
28
  "doctor": "node scripts/doctor.mjs",
@@ -27,7 +30,8 @@
27
30
  "init": "node bin/pantheon-init.mjs init --yes",
28
31
  "opencode": "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true opencode",
29
32
  "start": "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true opencode",
30
- "prepublishOnly": "node scripts/validate-routing.mjs",
33
+ "prepack": "npm run check:decision-router",
34
+ "prepublishOnly": "node scripts/validate-routing.mjs && npm run check:decision-router",
31
35
  "postpublish": "node -e \"console.log('βœ… Published pantheon-opencode v' + require('./package.json').version + ' to npm')\"",
32
36
  "version:status": "node scripts/versioning.mjs status",
33
37
  "version:apply": "node scripts/versioning.mjs apply",
@@ -35,7 +39,7 @@
35
39
  "release:dry-run": "node scripts/versioning.mjs status && node scripts/release-notes.mjs && node scripts/package-evidence.mjs",
36
40
  "package:evidence": "node scripts/package-evidence.mjs",
37
41
  "engine:check": "node scripts/validate-node-engine-policy.mjs",
38
- "package:validate": "node scripts/validate-package.mjs && npm run engine:check",
42
+ "package:validate": "node scripts/validate-package.mjs && npm run check:decision-router && npm run engine:check",
39
43
  "lint": "biome ci .",
40
44
  "docs:lint": "node scripts/docs-link-check.mjs",
41
45
  "docs:media": "node scripts/docs-media.mjs",
@@ -87,6 +91,7 @@
87
91
  "src/instructions/*.instructions.md",
88
92
  "src/mcp/*.mjs",
89
93
  "scripts/*.mjs",
94
+ "!scripts/build-decision-router.mjs",
90
95
  "src/mcp/*.sh",
91
96
  "src/routing.yml",
92
97
  "src/pantheon/**",
@@ -116,6 +121,7 @@
116
121
  "@commitlint/cli": "21.2.3",
117
122
  "@commitlint/config-conventional": "21.2.3",
118
123
  "ajv": "8.20.0",
124
+ "esbuild": "0.28.2",
119
125
  "husky": "^9.1.7",
120
126
  "tsx": "4.23.15",
121
127
  "typescript": "7.0.2"
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pantheon",
3
3
  "publisher": "ils15",
4
- "version": "1.6.2-beta.3",
4
+ "version": "1.6.2-beta.5",
5
5
  "displayName": "Pantheon",
6
6
  "description": "Conductor-Delegate orchestration platform with 14 specialized agents, 20 skills, and OpenCode support.",
7
7
  "agents": "./src/agents",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
4
4
 
5
5
  [project]
6
6
  name = "pantheon"
7
- version = "1.6.2-beta.3"
7
+ version = "1.6.2-beta.5"
8
8
  description = "Multi-agent orchestration framework"
9
9
  requires-python = ">=3.11"
10
10
  # Python sources under src/mcp/ import fastmcp/pydantic at runtime, but those