pantheon-opencode 1.6.0-beta.14 → 1.6.0-beta.17
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.
- package/AGENTS.global.md +8 -10
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +62 -3
- package/README.md +155 -24
- package/README.pt-BR.md +14 -14
- package/package.json +3 -3
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/_pantheon_paths.py +24 -0
- package/scripts/doctor.mjs +7 -2
- package/scripts/install-mcp.mjs +1 -1
- package/scripts/mcp_persistence.py +1260 -1017
- package/scripts/memory_mcp.py +12 -843
- package/scripts/test-opencode-v2-sandbox.sh +2 -115
- package/skills-lock.json +3 -3
- package/src/agents/aphrodite.md +11 -10
- package/src/agents/apollo.md +1 -2
- package/src/agents/athena.md +13 -13
- package/src/agents/demeter.md +10 -7
- package/src/agents/gaia.md +0 -1
- package/src/agents/hephaestus.md +4 -3
- package/src/agents/hermes.md +10 -9
- package/src/agents/iris.md +0 -1
- package/src/agents/mnemosyne.md +3 -2
- package/src/agents/nyx.md +4 -4
- package/src/agents/prometheus.md +12 -11
- package/src/agents/zeus.md +27 -2
- package/src/instructions/agent-return-format.instructions.md +7 -9
- package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
- package/src/instructions/zeus-memory-operations.instructions.md +9 -1
- package/src/instructions/zeus-timeout-retry.instructions.md +8 -1
- package/src/mcp/_pantheon_paths.py +24 -0
- package/src/mcp/mcp_codemap_module.py +86 -18
- package/src/mcp/mcp_persistence.py +1260 -1017
- package/src/mcp/memory_mcp.py +101 -57
- package/src/pantheon/goal-loop.ts +11 -8
- package/src/pantheon/task-result-guard.ts +50 -14
- package/src/pantheon/v2-execute-after.ts +135 -24
- package/src/pantheon/v2-tools.ts +10 -1
- package/src/plugin-v2.ts +6 -4
- package/src/plugin.ts +3 -2
- package/src/plugins/tui/dist/tui-v2.js +2 -2
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/routing.yml +4 -4
- package/src/skills/codemap/SKILL.md +1 -1
- package/src/skills/memory-bank/SKILL.md +17 -13
- package/src/skills/session-goal/SKILL.md +12 -22
- package/scripts/probe-context-rehydrate.mjs +0 -263
package/AGENTS.global.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
2
2
|
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
3
3
|
<!-- Source of truth: src/instructions/*.instructions.md + the static sections in this script. -->
|
|
4
|
-
<!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-19T11:33:38-03:00 sha=ff2d99c -->
|
|
5
5
|
|
|
6
6
|
# Pantheon Agent System — OpenCode
|
|
7
7
|
|
|
@@ -52,6 +52,7 @@ All implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) M
|
|
|
52
52
|
**tokens:** ~N input / ~M output (estimated)
|
|
53
53
|
**status:** complete | partial (reason) | escalated (reason)
|
|
54
54
|
**blockers:** [list any blockers or null]
|
|
55
|
+
**memory_context:** {"refs":[{"namespace":"<safe namespace>","key":"<safe key>"}],"takeaway":"<concise relevant takeaway>"} (optional only if memory affected; non-sensitive refs/takeaway, no secrets or copied memory; only in this summary, not Apollo/Athena or council formats)
|
|
55
56
|
|
|
56
57
|
For investigation agents (Apollo, Athena), return structured findings with:
|
|
57
58
|
- Key findings as bullet points
|
|
@@ -60,12 +61,12 @@ For investigation agents (Apollo, Athena), return structured findings with:
|
|
|
60
61
|
|
|
61
62
|
### Athena Plan Handoff
|
|
62
63
|
|
|
63
|
-
When Athena
|
|
64
|
-
the complete Markdown plan, not just a summary, artifact
|
|
65
|
-
question. Include the goal, scope and assumptions, actionable
|
|
66
|
-
files or areas, dependencies, verification, risks, open
|
|
67
|
-
acceptance criteria; mark unknowns instead of guessing.
|
|
68
|
-
|
|
64
|
+
When Zeus delegates Athena through the root `subagent` dispatch, its final task
|
|
65
|
+
result MUST contain the complete Markdown plan, not just a summary, artifact
|
|
66
|
+
path, or approval question. Include the goal, scope and assumptions, actionable
|
|
67
|
+
phases, affected files or areas, dependencies, verification, risks, open
|
|
68
|
+
questions, and acceptance criteria; mark unknowns instead of guessing. This
|
|
69
|
+
plan contract supersedes the generic structured-findings format above.
|
|
69
70
|
Athena must not call `agent/askQuestions`, pause for user input, or ask for
|
|
70
71
|
approval in the child session. Zeus must publish the returned full plan as a
|
|
71
72
|
normal message in the main conversation before triggering any approval UI;
|
|
@@ -121,9 +122,6 @@ Equal self-reported counts (for example, several specialists each reporting 7) d
|
|
|
121
122
|
**specific_claims:** 2 (self-reported; advisory)
|
|
122
123
|
```
|
|
123
124
|
|
|
124
|
-
## Memory Context
|
|
125
|
-
If memory affected the result, state the takeaway briefly; do not repeat the entry or task context. If persistence was expected but no write tool was exposed or a write failed, state that it was not persisted; never imply a successful store without confirmation.
|
|
126
|
-
|
|
127
125
|
<!-- Source: src/instructions/memory-protocol.instructions.md -->
|
|
128
126
|
## Memory Protocol
|
|
129
127
|
|
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
2
2
|
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
3
3
|
<!-- Source of truth: the static project sections in scripts/build-agents-md.mjs. -->
|
|
4
|
-
<!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-19T11:33:38-03:00 sha=ff2d99c -->
|
|
5
5
|
|
|
6
6
|
# Pantheon — Repository Setup
|
|
7
7
|
|
package/CHANGELOG.md
CHANGED
|
@@ -5,9 +5,68 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [v1.6.0-beta.17] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
- **Persistence MCP reduced to six registered tools:** only `context_save`,
|
|
13
|
+
`context_get`, and the four `goal_*` tools remain exposed; the twelve KV and
|
|
14
|
+
context-management tools were unregistered while internal SQLite KV helpers
|
|
15
|
+
remain for checkpoint storage. Goal tools are Zeus-only because goals are
|
|
16
|
+
session-scoped and cannot be read across sessions, so Athena/Themis cannot
|
|
17
|
+
read Zeus's goal or create one in their own root session.
|
|
18
|
+
- **Phase 7 — Memory search error contract:** `memory_search` now returns a
|
|
19
|
+
typed, sanitized error when the memory store cannot be read instead of an
|
|
20
|
+
empty list; an empty result now means nothing matched. All-stopword queries
|
|
21
|
+
previously fell back to a literal FTS match and now return no results, making
|
|
22
|
+
the behavior uniform with queries whose stopwords are dropped.
|
|
23
|
+
- **Phase 8 — Memory MCP packaging:** `scripts/memory_mcp.py` is now a thin shim
|
|
24
|
+
delegating to canonical `src/mcp/memory_mcp.py`, removing the stale divergent
|
|
25
|
+
copy; the sync test now asserts that their registered tool lists are equal.
|
|
9
26
|
|
|
10
|
-
|
|
27
|
+
## 🆕 What's New
|
|
28
|
+
|
|
29
|
+
- **V1 goal tools soft-deprecated:** `pantheon_goal_create`,
|
|
30
|
+
`pantheon_goal_update`, and `pantheon_goal_get` remain available with
|
|
31
|
+
unchanged behavior, but stored legacy goals are not automatically continued
|
|
32
|
+
in the current build. The durable manual replacement is the Persistence MCP
|
|
33
|
+
`goal_*` surface available in this branch. Tool removal is deferred to a
|
|
34
|
+
future release and requires explicit human approval.
|
|
35
|
+
|
|
36
|
+
## 🐞 Fixed
|
|
37
|
+
|
|
38
|
+
- **Disabled goal loop does not suppress idle enforcement:** `hasActiveGoal`
|
|
39
|
+
now returns false while the loop is disabled, so stored legacy goals do not
|
|
40
|
+
prevent the todo enforcer from receiving idle events.
|
|
41
|
+
- **Empty child-dispatch result is an explicit error:** an empty result returned by a child dispatch is now surfaced as an error instead of being passed through as a normal result.
|
|
42
|
+
|
|
43
|
+
## ⚠️ Known Issues
|
|
44
|
+
|
|
45
|
+
- **`pantheon_cost` aggregates by agent and phase:** V1 reports both dimensions; V2 reports the literal phase `unknown`. The shipped tool has no per-session, per-model, per-provider or USD dimension; per-session aggregation exists only in the unpublished benchmark harness.
|
|
46
|
+
- **An empty child result can arrive as a completed call:** the host supplies the placeholder `Subagent completed without a text response.`; Pantheon’s guard replaces the payload with its explicit error text, while the host’s completed status remains unchanged.
|
|
47
|
+
- **A user `opencode.jsonc` can change the effective plugin set:** the host merges `opencode.json` with a sibling `opencode.jsonc` (scalars from `.jsonc` win, arrays are unioned), and Pantheon registers its plugin only in `opencode.json`.
|
|
48
|
+
|
|
49
|
+
## ✅ Closed Issues
|
|
50
|
+
|
|
51
|
+
## [v1.6.0-beta.15] - 2026-10-19
|
|
52
|
+
|
|
53
|
+
## 🆕 What's New
|
|
54
|
+
|
|
55
|
+
- **Safe memory handoffs and agent contracts:** delegation briefs can pass
|
|
56
|
+
minimized, non-sensitive memory references and takeaways as untrusted context;
|
|
57
|
+
return formats and discovery/review routing are clarified across agent roles.
|
|
58
|
+
- **Optional per-session token breakdowns:** benchmark reports can show root and
|
|
59
|
+
descendant usage when session data is complete; incomplete data remains
|
|
60
|
+
unavailable rather than being zero-filled.
|
|
61
|
+
|
|
62
|
+
## 🐞 Fixed
|
|
63
|
+
|
|
64
|
+
- **Empty task/subagent results:** empty child-dispatch results are surfaced as
|
|
65
|
+
explicit errors while non-empty structured results remain intact.
|
|
66
|
+
|
|
67
|
+
## [v1.6.0-beta.14] - 2026-10-17
|
|
68
|
+
|
|
69
|
+
_Published manually to npm on 2026-10-17; source commit and tag unknown._
|
|
11
70
|
|
|
12
71
|
## 🆕 What's New
|
|
13
72
|
|
|
@@ -1205,7 +1264,7 @@ latência total e wall de F1 segue inconclusivo.
|
|
|
1205
1264
|
|
|
1206
1265
|
- **Todo continuation enforcer**: auto-continues sessions with incomplete todos on `session.idle` (4 guards: board-running, in-flight, exponential cooldown, max-failures cap) + kill-switch `PANTHEON_TODO_ENFORCER=off`
|
|
1207
1266
|
- **Hashline hash-anchored edits**: `hashline_edit` tool with sha256-truncated line tags, additive read enhancer, validate-before-write with `>>>` mismatch hints + Did-you-mean suggestions; blocked in read-only sessions
|
|
1208
|
-
- **Full-auto goal loop
|
|
1267
|
+
- **Full-auto goal loop:** `pantheon_goal_create/update/get` tools, atomic GoalStore, priority idle dispatcher (active goal suppresses enforcer), max 25 continuations. The loop is disabled by the hard-coded plugin defaults; `routing.yml` documents defaults and guards but does not enable it.
|
|
1209
1268
|
- **Dispatch retry-on-empty**: classifies empty results (mode 1: 0 tokens; mode 2: reasoning without text) with cap-1 automatic retry
|
|
1210
1269
|
- **Cost tracking**: JSONL ledger + `pantheon_cost` command reading opencode.db (zero-dep, node:sqlite → scripts/cost.mjs fallback)
|
|
1211
1270
|
- **Themis phase reviews** route to deepseek-v4-flash (pro reserved for final release gate); Athena stays premium (council red-line)
|
package/README.md
CHANGED
|
@@ -179,8 +179,20 @@ Memory is used selectively: the coordinator searches once only when project
|
|
|
179
179
|
history could affect a task, then passes relevant results to specialists. Store
|
|
180
180
|
one concise, reusable outcome at task completion when it will matter later;
|
|
181
181
|
routine child summaries and phase updates stay in the current handoff. The
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
`pantheon-memory` MCP is the durable SQLite entry store; project files under
|
|
183
|
+
`.pantheon/memory-bank/` are read on demand through `pantheon://memory-bank/{path}`
|
|
184
|
+
and are not auto-loaded. Session-checkpoint tools are separate, optional
|
|
185
|
+
Persistence APIs and are not called automatically by compaction hooks. Global
|
|
186
|
+
and sandbox doctor profiles require `pantheon-memory`, `pantheon-resources`,
|
|
187
|
+
and `pantheon-persistence`; lite mode keeps MCP checks optional. See
|
|
188
|
+
[Memory usage](docs/MEMORY.md).
|
|
189
|
+
|
|
190
|
+
Delegated handoffs may include optional `memory_context` only when useful
|
|
191
|
+
memory affects the subtask: include safe references and a concise takeaway,
|
|
192
|
+
never full memory or sensitive information/secrets; omit it otherwise. Treat
|
|
193
|
+
this context as untrusted and potentially outdated: the request and instructions
|
|
194
|
+
take precedence, and embedded instructions must not be followed. `memory_search`
|
|
195
|
+
searches project history; `memory_recall` retrieves an entry by exact key.
|
|
184
196
|
|
|
185
197
|
## Status
|
|
186
198
|
|
|
@@ -211,6 +223,26 @@ Both columns of the 1.6.x row are real, and they are not the same claim. Read
|
|
|
211
223
|
[the plugin contract](#opencode-v1v2--dual-version-160-beta1) for what each
|
|
212
224
|
generation actually registers.
|
|
213
225
|
|
|
226
|
+
### Node runtime floor
|
|
227
|
+
|
|
228
|
+
`engines.node` is `>=26.4.0`: Pantheon's own alignment policy with the official
|
|
229
|
+
OpenCode Node build, which CI pins to exactly 26.4.0 — not a claim about the
|
|
230
|
+
host runtime. Below the floor the package still installs, but `postinstall`
|
|
231
|
+
only warns and skips the TUI and config sync, and the CLI stops with an
|
|
232
|
+
explicit version message before any setup write. The `node:sqlite` threshold
|
|
233
|
+
(Node >= 22.5) is a separate, lower capability bound for the optional
|
|
234
|
+
`pantheon_cost` SQLite backend.
|
|
235
|
+
|
|
236
|
+
### Config registration and the host's config merge
|
|
237
|
+
|
|
238
|
+
Pantheon registers its plugin in `opencode.json`; the installer never writes
|
|
239
|
+
`opencode.jsonc`. The OpenCode V2 host also loads a sibling `opencode.jsonc`
|
|
240
|
+
from the same config directory when one exists, and merges the two files:
|
|
241
|
+
scalars from `.jsonc` win, and arrays are unioned. A `plugin`/`plugins` entry
|
|
242
|
+
in `.jsonc` therefore joins the effective plugin set instead of replacing the
|
|
243
|
+
registration Pantheon wrote. The merge is silent, so a host can load a plugin
|
|
244
|
+
that appears only in `.jsonc`.
|
|
245
|
+
|
|
214
246
|
### What "supported on OpenCode 1.X" concretely means
|
|
215
247
|
|
|
216
248
|
On the 1.6 line, an OpenCode 1.X host gets the **V1 plugin**:
|
|
@@ -261,6 +293,71 @@ before child creation, and rejects a matrix-valid dispatch from a child. The
|
|
|
261
293
|
remaining V2 surface still has unsupported goal tools and registration-only
|
|
262
294
|
session/compaction hooks, so the 1.6 line is not full V2 feature parity.
|
|
263
295
|
|
|
296
|
+
### Manual goals are Persistence MCP tools, not V2 plugin tools
|
|
297
|
+
|
|
298
|
+
The Persistence MCP exposes exactly six tools: `context_save`, `context_get`,
|
|
299
|
+
`goal_create`, `goal_get`, `goal_update`, and `goal_done`. The KV table remains
|
|
300
|
+
internal checkpoint storage; the former KV management/search and context
|
|
301
|
+
list/statistics/rehydration/summary operations are not registered.
|
|
302
|
+
|
|
303
|
+
The existing `pantheon-persistence` server provides manual `goal_create`,
|
|
304
|
+
`goal_get`, `goal_update`, and `goal_done` tools for the current OpenCode
|
|
305
|
+
session. The four goal tools are granted only to Zeus. Goals are partitioned by OpenCode session ID in the Persistence
|
|
306
|
+
deployment database; the session ID is a correlation key, not authentication.
|
|
307
|
+
In a global install, different projects share this database. The
|
|
308
|
+
supported boundary is OpenCode v2.0.30 local stdio, not independent clients or
|
|
309
|
+
HTTP. Same-user clients that bypass OpenCode, host bypasses, and compromised
|
|
310
|
+
OpenCode configuration are outside the trust model. Athena and Themis do not
|
|
311
|
+
receive `goal_get`: a child session cannot read Zeus's goal, and as root they
|
|
312
|
+
cannot create a goal in their own session because only Zeus has `goal_create`.
|
|
313
|
+
All other agents are also denied. Grant changes come from
|
|
314
|
+
canonical agent frontmatter and take effect through controlled init/restart
|
|
315
|
+
plus effective-permission verification, not promised hot reload.
|
|
316
|
+
|
|
317
|
+
These are manual records only: they do not replace or migrate the V1
|
|
318
|
+
`src/pantheon/goal-store.ts` authority, write to it, or trigger continuation,
|
|
319
|
+
reinjection, an evaluator, loop, board, TUI/RPC, or `ctx.storage`. The V2 plugin's
|
|
320
|
+
own goal tools remain unsupported. Persistence startup creates the database file
|
|
321
|
+
and bootstraps its existing KV schema, but performs no goal-table DDL; goal
|
|
322
|
+
operations fail closed until an explicit migration. First compare the resolved
|
|
323
|
+
target with `--migrate-goals --dry-run`. Resolution precedence is explicit
|
|
324
|
+
`--project-db`, then `PANTHEON_PROJECT`, then the runtime target directory (the
|
|
325
|
+
parent of the installed `scripts/` directory), never the operator's shell cwd.
|
|
326
|
+
An explicit relative `--project-db` is resolved against that runtime root;
|
|
327
|
+
when `PANTHEON_PROJECT` is used, it must be absolute or the command stops with
|
|
328
|
+
an actionable error. The CLI cannot independently witness the Persistence
|
|
329
|
+
server's database binding, so a human must confirm the selected target (for
|
|
330
|
+
example, compare it with the database open in the server process) before
|
|
331
|
+
approving migration.
|
|
332
|
+
Stop the Persistence server before the authoritative dry-run and keep it stopped
|
|
333
|
+
for the whole migration; a concurrent writer that interferes with the safety
|
|
334
|
+
check causes it to abort rather than proceed. For a global install, preview
|
|
335
|
+
with `<runtime>/.venv/bin/python3 <runtime>/scripts/mcp_persistence.py
|
|
336
|
+
--migrate-goals --dry-run`; for a project install, preview with
|
|
337
|
+
`<project>/.venv/bin/python3
|
|
338
|
+
<project>/.opencode/scripts/mcp_persistence.py --migrate-goals --dry-run`.
|
|
339
|
+
The simplest reliable source of truth for the interpreter is `command[0]` in
|
|
340
|
+
`opencode.json` for `pantheon-persistence`. The dry-run reports database size
|
|
341
|
+
and `-wal`/`-shm` presence before opening the DB. If either sidecar exists, it
|
|
342
|
+
uses plain read-only mode so committed WAL state is visible; if neither exists,
|
|
343
|
+
it uses `immutable=1` to avoid creating sidecars, including in a read-only
|
|
344
|
+
directory. If the goal-table state is `unknown`, the command exits with status
|
|
345
|
+
2: stop and investigate, and do not treat it as a healthy result. Ask the user
|
|
346
|
+
to approve before migration. The migration creates a timestamped
|
|
347
|
+
adjacent full copy of the Persistence DB, including all KV data, with mode
|
|
348
|
+
`0600`; backups live beside the selected DB. With the runtime-default target,
|
|
349
|
+
uninstall/reinstall may replace that directory, so move any backup you need
|
|
350
|
+
outside it first. Content-digest
|
|
351
|
+
verification and backup-retention automation are deferred; for now the operator
|
|
352
|
+
must prune old backups manually. An already-current schema creates no backup. If
|
|
353
|
+
migration history exists but `pantheon_goals` is missing, stop and preserve the
|
|
354
|
+
database; a human operator must restore a verified backup or recover the missing
|
|
355
|
+
schema before approving another migration. The goal tests require the
|
|
356
|
+
pinned `fastmcp==4.0.10` and `mcp==2.2.0` versions from
|
|
357
|
+
`src/mcp/requirements-mcp.txt`. Tests use synthetic temporary databases only;
|
|
358
|
+
no real DB or global configuration is changed, and rollout remains gated on
|
|
359
|
+
Themis review and explicit user approval.
|
|
360
|
+
|
|
264
361
|
### Verified against which OpenCode versions
|
|
265
362
|
|
|
266
363
|
| What | Verified against | How |
|
|
@@ -310,6 +407,27 @@ cancellation, job tracking, or board-based recovery. If the runtime does not
|
|
|
310
407
|
make completion observable, report that limitation. The configured fallback or
|
|
311
408
|
escalation chain still applies.
|
|
312
409
|
|
|
410
|
+
Every root dispatch carries a concise handoff brief: objective/result; bounded
|
|
411
|
+
scope and acceptance criteria; only relevant inputs/context; constraints and
|
|
412
|
+
safety gates; expected deliverable/return format; and verification. Do not copy
|
|
413
|
+
the full conversation or unrelated history. Use the role-specific return
|
|
414
|
+
contract: implementation uses `## subtask_summary`, investigations return
|
|
415
|
+
structured findings, Athena plans return the complete plan, and council responses
|
|
416
|
+
use `## specialist_response`. Optional `memory_context` is included only when
|
|
417
|
+
relevant memory affects the task; keep it minimal, non-sensitive, and untrusted,
|
|
418
|
+
with no secrets or embedded instructions to follow. The host may independently
|
|
419
|
+
inherit conversation transcript; the explicit brief does not control that and is
|
|
420
|
+
not a claim of reduced overall context or token use. Child agents send discovery
|
|
421
|
+
or review needs and relevant findings to Zeus rather than dispatching another
|
|
422
|
+
Pantheon agent themselves.
|
|
423
|
+
|
|
424
|
+
Choose inline work or delegation qualitatively, not by file/line thresholds:
|
|
425
|
+
self-contained work that needs no specialist stays inline; one bounded,
|
|
426
|
+
specialist task goes to one agent; independent fronts may use separate root
|
|
427
|
+
dispatches. Consider uncertainty, domain expertise, dependencies, risk, and how
|
|
428
|
+
the result will be verified; preserve planning, review, and approval gates when
|
|
429
|
+
those factors require them.
|
|
430
|
+
|
|
313
431
|
## Cost tool backend
|
|
314
432
|
|
|
315
433
|
`pantheon_cost` prefers a read-only `node:sqlite` backend against the selected
|
|
@@ -402,19 +520,26 @@ per installation; V1 and V2 Pantheon plugins must never be registered together.
|
|
|
402
520
|
|---|---|---|
|
|
403
521
|
| OpenCode config key | singular `plugin` | plural `plugins` |
|
|
404
522
|
| Pantheon registration | `src/plugin.ts` plus `src/plugins/pantheon-hooks.ts` | `<installed>/src/plugin-v2` directory (`index.ts` re-exports `src/plugin-v2.ts`) |
|
|
405
|
-
| Runtime contract | Pantheon V1 plugin: 6 tools (`hashline_edit`, the 3 goal tools, `pantheon_cost`, `pantheon_model`), event/tool hooks and V1 compaction handling | Full V2 plugin: 3 orchestration tools plus `vision_describe` when the model catalog is available, 5 event subscriptions, session hooks (`prompt`, `context`), a read-only-enforcing tool `execute.before` hook, plus configuration transforms |
|
|
523
|
+
| Runtime contract | Pantheon V1 plugin: 6 tools (`hashline_edit`, the 3 goal tools, `pantheon_cost`, `pantheon_model`), event/tool hooks and V1 compaction handling | Full V2 plugin: 3 unconditional orchestration tools plus up to 2 host-dependent ones (`vision_describe` when the model catalog is available, `pantheon_bounded_read` when the host exposes its permission and session APIs), 5 event subscriptions, session hooks (`prompt`, `context`), a read-only-enforcing tool `execute.before` hook, plus configuration transforms |
|
|
406
524
|
| V1 APIs | Registered | Own tool definitions via `ctx.tool.transform()` — not the V1 plugin path |
|
|
407
525
|
|
|
408
|
-
The V2 plugin provides 3 orchestration tools (`hashline_edit`,
|
|
409
|
-
`pantheon_model`)
|
|
526
|
+
The V2 plugin provides 3 unconditional orchestration tools (`hashline_edit`,
|
|
527
|
+
`pantheon_cost`, `pantheon_model`) plus up to 2 host-dependent ones —
|
|
528
|
+
`vision_describe` when the host exposes its model catalog, and
|
|
529
|
+
`pantheon_bounded_read` when the host exposes its permission and session APIs
|
|
530
|
+
(root Zeus sessions only, see
|
|
531
|
+
[Bounded workspace reads](#bounded-workspace-reads-f3b)) — 5 event
|
|
532
|
+
subscriptions (`session.created`, `session.idle`,
|
|
410
533
|
`session.deleted`, `session.error`, `session.compacted`), session hooks
|
|
411
534
|
(`prompt`, `context`),
|
|
412
535
|
and a tool `execute.before` hook that enforces read-only sessions. The 3 goal
|
|
413
536
|
tools are **not**
|
|
414
537
|
registered on V2: the goal loop needs a `GoalStore`, a `GoalLoopClient` and a
|
|
415
538
|
`BackgroundJobBoard`, none of which the V2 `PluginContext` exposes, so the gap
|
|
416
|
-
is reported as the `goal-tools` unsupported-feature marker.
|
|
417
|
-
|
|
539
|
+
is reported as the `goal-tools` unsupported-feature marker. The V1 contract
|
|
540
|
+
still registers the deprecated legacy goal tools, but they store/read goals
|
|
541
|
+
without automatically continuing the session in the current build. For durable
|
|
542
|
+
manual goals, use the Persistence MCP `goal_*` surface available in this branch.
|
|
418
543
|
|
|
419
544
|
V2 also registers `vision_describe` when `ctx.model.list()` is available. It
|
|
420
545
|
checks the live catalog for image input, prefers the paid OpenCode Go
|
|
@@ -757,20 +882,14 @@ scripts/test-opencode-v2-sandbox.sh --prepare # tarball + install + init in
|
|
|
757
882
|
~/pantheon-sandbox/start-pantheon.sh # interactive TUI in that isolated beta sandbox
|
|
758
883
|
scripts/test-opencode-v2-sandbox.sh --run v2 # base validation only
|
|
759
884
|
scripts/test-opencode-v2-sandbox.sh --prompts # base validation + prompt battery
|
|
760
|
-
scripts/test-opencode-v2-sandbox.sh --rehydrate # offline context rehydration/session-summary probe
|
|
761
885
|
scripts/test-opencode-v2-sandbox.sh --hooks # V2 hook callback canary
|
|
762
|
-
scripts/test-opencode-v2-sandbox.sh --rehydrate --hooks # run both canaries
|
|
763
886
|
scripts/test-opencode-v2-sandbox.sh --reset # wipe the sandbox root
|
|
764
887
|
```
|
|
765
888
|
|
|
766
|
-
Modes are combinable (e.g. `--prepare --run v2 --prompts`). `--
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
`execute.before` security enforcement. With the probe-only `--rehydrate --hooks`
|
|
771
|
-
pair (without `--run`, `--prompts`, or `--cost`), the hooks canary still runs if
|
|
772
|
-
rehydration fails, and the command returns a failing status afterward. These
|
|
773
|
-
are test/sandbox canaries, not proof of Pantheon security enforcement. Binaries
|
|
889
|
+
Modes are combinable (e.g. `--prepare --run v2 --prompts`). `--hooks` runs a V2
|
|
890
|
+
hook canary against the sandbox binary to check that hook callbacks fire; it does
|
|
891
|
+
not test transform callback effects or prove Pantheon's `execute.before` security
|
|
892
|
+
enforcement. These are test/sandbox canaries, not proof of Pantheon security enforcement. Binaries
|
|
774
893
|
are resolved strictly inside the sandbox npm prefix — a non-prepared sandbox
|
|
775
894
|
fails fast instead of silently testing the host installation. The sandbox is
|
|
776
895
|
always built from the checkout this script lives in; it never infers a
|
|
@@ -801,6 +920,18 @@ refuses to overwrite an existing result, so the run identity lives in the file
|
|
|
801
920
|
name. Scenario A performs real web research, so its variance is
|
|
802
921
|
network-dependent and recorded per run.
|
|
803
922
|
|
|
923
|
+
`reportVersion` remains `3`; token usage fields are unchanged and
|
|
924
|
+
`tokens.sessionBreakdown` is an optional additive field. It belongs to the
|
|
925
|
+
benchmark report in the unpublished `bench/` harness, not to the shipped
|
|
926
|
+
`pantheon_cost` tool. That tool aggregates by agent and phase in V1; V2 reports
|
|
927
|
+
the phase as the literal `unknown`. When available, `sessionBreakdown` reports
|
|
928
|
+
input, output, and input+output total per unique session, plus root and
|
|
929
|
+
descendant subtotals. These are overlapping views of the aggregate, not extra
|
|
930
|
+
usage; no agent/call/section attribution is inferred. Incomplete token-field
|
|
931
|
+
coverage or a session without assistant usage makes the breakdown unavailable
|
|
932
|
+
without zero-fill. If token collection itself is unavailable, the optional key
|
|
933
|
+
may be absent; consumers should handle either case.
|
|
934
|
+
|
|
804
935
|
### Measurement profiles (explicit, never inferred)
|
|
805
936
|
|
|
806
937
|
Instructions are injected from two surfaces: the global config dir and the
|
|
@@ -936,14 +1067,14 @@ Env overrides:
|
|
|
936
1067
|
Exit codes: `0` no real failures · `1` real failure (see `prompts-report.md`
|
|
937
1068
|
in the sandbox root) · `2` usage error · `3` sandbox not prepared.
|
|
938
1069
|
|
|
939
|
-
###
|
|
1070
|
+
### Memory MCP source of truth
|
|
940
1071
|
|
|
941
|
-
`
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1072
|
+
`src/mcp/memory_mcp.py` is the canonical Memory MCP server and exposes the six
|
|
1073
|
+
`memory_*` tools plus three `code_*` codemap tools. `scripts/memory_mcp.py` is a
|
|
1074
|
+
source-tree compatibility entrypoint that delegates to it. The runtime installer
|
|
1075
|
+
copies the canonical source into the installed scripts directory, while
|
|
1076
|
+
`install-mcp.mjs` prefers that installed copy and falls back to the source-tree
|
|
1077
|
+
entrypoint when running from a checkout.
|
|
947
1078
|
|
|
948
1079
|
### Task-result guard
|
|
949
1080
|
|
package/README.pt-BR.md
CHANGED
|
@@ -37,6 +37,8 @@ Com a configuração padrão do npm, versões incompatíveis podem gerar um avis
|
|
|
37
37
|
|
|
38
38
|
Esse requisito do pacote não significa que todo host OpenCode execute Node: o OpenCode V2.0.31 oficial oferece um caminho de runtime Bun e um build Node separado fixado em Node 26.4.0. Não há aqui um requisito mínimo para Bun. O backend SQLite opcional de `pantheon_cost` tem um limite de capacidade distinto (`node:sqlite` requer Node >=22.5), que não reduz o requisito de suporte do pacote.
|
|
39
39
|
|
|
40
|
+
O piso `>=26.4.0` é a política de alinhamento do próprio pacote com o build Node oficial do OpenCode, que a CI fixa exatamente em 26.4.0; não é uma afirmação sobre o runtime do host.
|
|
41
|
+
|
|
40
42
|
No projeto em que você quer usar o Pantheon:
|
|
41
43
|
|
|
42
44
|
```bash
|
|
@@ -79,7 +81,7 @@ verificações repetíveis e passagens claras entre etapas do trabalho.
|
|
|
79
81
|
|
|
80
82
|
## Status
|
|
81
83
|
|
|
82
|
-
Versão operacional neste checkout: **v1.6.0-beta.
|
|
84
|
+
Versão operacional neste checkout: **v1.6.0-beta.17** (esta página não afirma publicação). O Pantheon foi feito para OpenCode e depende da
|
|
83
85
|
disponibilidade e da configuração do OpenCode e dos serviços opcionais que você
|
|
84
86
|
escolher. Veja as [releases](https://github.com/ils15/pantheon-opencode/releases)
|
|
85
87
|
e o [changelog](CHANGELOG.md) para acompanhar as mudanças publicadas.
|
|
@@ -129,12 +131,15 @@ registrados juntos.
|
|
|
129
131
|
|---|---|---|
|
|
130
132
|
| Chave de config do OpenCode | `plugin` singular | `plugins` plural |
|
|
131
133
|
| Registro Pantheon | `src/plugin.ts` mais `src/plugins/pantheon-hooks.ts` | `pantheon-opencode/plugin-v2` (`src/plugin-v2.ts`) |
|
|
132
|
-
| Contrato de runtime | Plugin Pantheon V1: 6 ferramentas (`hashline_edit`, as 3 ferramentas de goal, `pantheon_cost`, `pantheon_model`), hooks de evento/ferramenta e tratamento de compactação V1 | Plugin V2 completo: 3 ferramentas de orquestração mais `vision_describe` quando o catálogo de modelos está disponível, 5 assinaturas de eventos, session hooks (`prompt`, `context`), um hook `execute.before` que impõe sessões somente-leitura, além de transforms de configuração |
|
|
134
|
+
| Contrato de runtime | Plugin Pantheon V1: 6 ferramentas (`hashline_edit`, as 3 ferramentas de goal, `pantheon_cost`, `pantheon_model`), hooks de evento/ferramenta e tratamento de compactação V1 | Plugin V2 completo: 3 ferramentas de orquestração incondicionais mais até 2 dependentes do host (`vision_describe` quando o catálogo de modelos está disponível, `pantheon_bounded_read` quando o host expõe suas APIs de permissão e sessão), 5 assinaturas de eventos, session hooks (`prompt`, `context`), um hook `execute.before` que impõe sessões somente-leitura, além de transforms de configuração |
|
|
133
135
|
| APIs V1 | Registradas | Definições próprias de ferramentas via `ctx.tool.transform()` — não pelo caminho do plugin V1 |
|
|
134
136
|
|
|
135
|
-
O plugin V2 fornece 3 ferramentas de orquestração
|
|
136
|
-
`pantheon_cost`, `pantheon_model`)
|
|
137
|
-
|
|
137
|
+
O plugin V2 fornece 3 ferramentas de orquestração incondicionais
|
|
138
|
+
(`hashline_edit`, `pantheon_cost`, `pantheon_model`) mais até 2 dependentes do
|
|
139
|
+
host — `vision_describe` quando o host expõe seu catálogo de modelos, e
|
|
140
|
+
`pantheon_bounded_read` quando o host expõe suas APIs de permissão e sessão
|
|
141
|
+
(apenas sessões root do Zeus) — 5 assinaturas de eventos (`session.created`,
|
|
142
|
+
`session.idle`, `session.deleted`, `session.error`, `session.compacted`), session hooks (`prompt`,
|
|
138
143
|
`context`) e um hook de ferramenta `execute.before` que impõe sessões
|
|
139
144
|
somente-leitura. As 3 ferramentas de goal **não** são
|
|
140
145
|
registradas no V2: o goal loop precisa de um `GoalStore`, de um
|
|
@@ -428,21 +433,16 @@ exclusivo V2, portanto há uma única perna.
|
|
|
428
433
|
scripts/test-opencode-v2-sandbox.sh --prepare # tarball + install + init no sandbox
|
|
429
434
|
scripts/test-opencode-v2-sandbox.sh --run v2 # apenas validação base
|
|
430
435
|
scripts/test-opencode-v2-sandbox.sh --prompts # validação base + bateria de prompts
|
|
431
|
-
scripts/test-opencode-v2-sandbox.sh --rehydrate # sondas offline de rehydration/summary de sessão
|
|
432
436
|
scripts/test-opencode-v2-sandbox.sh --hooks # canário de callbacks de hooks V2
|
|
433
|
-
scripts/test-opencode-v2-sandbox.sh --rehydrate --hooks # executa os dois canários
|
|
434
437
|
scripts/test-opencode-v2-sandbox.sh --reset # limpa a raiz do sandbox
|
|
435
438
|
```
|
|
436
439
|
|
|
437
|
-
Os modos são combináveis (ex.: `--prepare --run v2 --prompts`). `--
|
|
438
|
-
|
|
439
|
-
`--hooks` executa um canário de hooks V2 com o binário do sandbox para verificar
|
|
440
|
+
Os modos são combináveis (ex.: `--prepare --run v2 --prompts`). `--hooks` executa
|
|
441
|
+
um canário de hooks V2 com o binário do sandbox para verificar
|
|
440
442
|
se os callbacks de hooks são disparados; ele não testa os efeitos dos callbacks
|
|
441
443
|
de transform nem comprova o enforcement de segurança `execute.before` do
|
|
442
|
-
Pantheon.
|
|
443
|
-
|
|
444
|
-
comando retorna falha em seguida. Esses canários de teste/sandbox não são prova
|
|
445
|
-
de enforcement de segurança do Pantheon. Os binários são resolvidos estritamente
|
|
444
|
+
Pantheon. Esses canários de teste/sandbox não são prova de enforcement de
|
|
445
|
+
segurança do Pantheon. Os binários são resolvidos estritamente
|
|
446
446
|
dentro do prefix npm do sandbox — um sandbox não preparado falha rápido em vez
|
|
447
447
|
de testar silenciosamente a instalação do host.
|
|
448
448
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-opencode",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.17",
|
|
4
4
|
"description": "Multi-agent orchestration for OpenCode — 14 specialized agents, TDD, Themis review gates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@clack/prompts": "1.8.1",
|
|
103
103
|
"@opencode-ai/plugin": "1.18.33",
|
|
104
|
+
"@opencode-ai/sdk": "1.18.33",
|
|
104
105
|
"js-yaml": "^5.4.2",
|
|
105
|
-
"zod": "4.1.8"
|
|
106
|
-
"@opencode-ai/sdk": "1.18.33"
|
|
106
|
+
"zod": "4.1.8"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@biomejs/biome": "2.5.14",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon",
|
|
3
3
|
"publisher": "ils15",
|
|
4
|
-
"version": "1.6.0-beta.
|
|
4
|
+
"version": "1.6.0-beta.17",
|
|
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
|
@@ -72,6 +72,30 @@ def pantheon_project() -> Path | None:
|
|
|
72
72
|
return None
|
|
73
73
|
|
|
74
74
|
|
|
75
|
+
def trusted_project_root() -> Path | None:
|
|
76
|
+
"""Return an explicitly host-bound project root, or ``None``.
|
|
77
|
+
|
|
78
|
+
The globally launched Memory MCP commonly runs with its working directory
|
|
79
|
+
set to the installed runtime, not the active project. Therefore this
|
|
80
|
+
security-sensitive lookup deliberately accepts only an absolute
|
|
81
|
+
``PANTHEON_PROJECT`` binding and never falls back to ``PWD`` or cwd.
|
|
82
|
+
"""
|
|
83
|
+
configured_root = os.environ.get("PANTHEON_PROJECT")
|
|
84
|
+
if not configured_root:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
candidate = Path(configured_root)
|
|
88
|
+
if not candidate.is_absolute():
|
|
89
|
+
return None
|
|
90
|
+
try:
|
|
91
|
+
root = candidate.resolve(strict=True)
|
|
92
|
+
except (OSError, RuntimeError):
|
|
93
|
+
return None
|
|
94
|
+
if not root.is_dir() or root == Path(root.anchor):
|
|
95
|
+
return None
|
|
96
|
+
return root
|
|
97
|
+
|
|
98
|
+
|
|
75
99
|
def _is_valid_logical_cwd(logical_cwd: str, physical_cwd: str) -> bool:
|
|
76
100
|
"""Validate a launcher-provided logical cwd without resolving its result.
|
|
77
101
|
|
package/scripts/doctor.mjs
CHANGED
|
@@ -333,7 +333,10 @@ function checkMcpConfig(args) {
|
|
|
333
333
|
section('B. MCP Configuration')
|
|
334
334
|
|
|
335
335
|
const configs = collectMcpConfigs(args)
|
|
336
|
-
|
|
336
|
+
// This required-server check tests config-entry presence only. It does not
|
|
337
|
+
// verify enabled state, command/transport usability, connectivity, or health.
|
|
338
|
+
const requiredMcpNames =
|
|
339
|
+
args.profile === 'lite' ? [] : ['pantheon-memory', 'pantheon-resources', 'pantheon-persistence']
|
|
337
340
|
|
|
338
341
|
if (configs.length === 0) {
|
|
339
342
|
if (requiredMcpNames.length > 0) {
|
|
@@ -447,7 +450,9 @@ function checkMcpConfig(args) {
|
|
|
447
450
|
const configured = new Set(configs.flatMap((cfg) => Object.keys(cfg.data.mcp ?? {})))
|
|
448
451
|
for (const required of requiredMcpNames) {
|
|
449
452
|
if (configured.has(required))
|
|
450
|
-
pass(
|
|
453
|
+
pass(
|
|
454
|
+
`Required MCP "${required}" entry is present (presence check only; this check does not verify enabled state, command/transport usability, connectivity, or health)`,
|
|
455
|
+
)
|
|
451
456
|
else error(`Required MCP "${required}" not configured in any available config`)
|
|
452
457
|
}
|
|
453
458
|
}
|
package/scripts/install-mcp.mjs
CHANGED
|
@@ -259,7 +259,7 @@ export const MCPS = {
|
|
|
259
259
|
tier: 1,
|
|
260
260
|
name: 'Pantheon Persistence',
|
|
261
261
|
description:
|
|
262
|
-
'Pantheon Persistence MCP Server —
|
|
262
|
+
'Pantheon Persistence MCP Server — operational-state checkpoints via context_save/context_get and four manual session-scoped goal tools',
|
|
263
263
|
env: [],
|
|
264
264
|
platforms: {
|
|
265
265
|
opencode: {
|