pantheon-opencode 1.6.0-beta.7 → 1.6.0-beta.8
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.md +58 -15
- package/CHANGELOG.md +37 -100
- package/README.md +78 -102
- package/README.pt-BR.md +19 -37
- package/package.json +1 -2
- package/plugin.json +2 -2
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +2 -3
- package/scripts/doctor.mjs +22 -104
- package/scripts/hooks/scan-secrets.sh +97 -0
- package/scripts/install/config-migration.mjs +9 -42
- package/scripts/install/interactive.mjs +1 -1
- package/scripts/install/opencode.mjs +114 -43
- package/scripts/install/strings.mjs +0 -8
- package/scripts/probe-pantheon-cost.mjs +3 -16
- package/scripts/test-opencode-v2-sandbox.sh +203 -786
- package/scripts/validate-sandbox-install.mjs +138 -0
- package/skills-lock.json +3 -4
- package/src/agents/aphrodite.md +2 -9
- package/src/agents/demeter.md +0 -9
- package/src/agents/gaia.md +1 -0
- package/src/agents/hephaestus.md +0 -9
- package/src/agents/hermes.md +2 -9
- package/src/agents/mnemosyne.md +14 -42
- package/src/agents/prometheus.md +0 -9
- package/src/agents/themis.md +0 -1
- package/src/agents/zeus.md +180 -19
- package/src/instructions/agent-return-format.instructions.md +48 -3
- package/src/instructions/memory-protocol.instructions.md +8 -9
- package/src/instructions/zeus-anti-stall.instructions.md +54 -6
- package/src/instructions/zeus-council-synthesis.instructions.md +71 -0
- package/src/instructions/zeus-memory-operations.instructions.md +4 -4
- package/src/instructions/zeus-timeout-retry.instructions.md +81 -7
- package/src/pantheon/v2-delegation-enforce.ts +2 -1
- package/src/plugin-v2.ts +251 -168
- package/src/plugins/pantheon-hooks.ts +35 -82
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +26 -50
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/index.tsx +25 -60
- package/src/routing.yml +4 -2
- package/src/skills/README.md +7 -12
- package/src/skills/agent-coordination/SKILL.md +83 -13
- package/src/skills/auto-continue/SKILL.md +13 -14
- package/src/skills/context-compression/SKILL.md +26 -879
- package/src/pantheon/secret-scanner.ts +0 -489
- package/src/plugins/tui/README.md +0 -14
- package/src/skills/council-synthesis/SKILL.md +0 -29
package/AGENTS.md
CHANGED
|
@@ -38,9 +38,8 @@ Para validar a instalação global do pacote pantheon-opencode COMO UM USUÁRIO
|
|
|
38
38
|
|
|
39
39
|
- Rodar: `bash ~/pantheon-sandbox/run-test.sh` (opencode mcp list 5/5 connected + doctor 0 erros + abre TUI isolado)
|
|
40
40
|
- Regra para agentes: ao validar instalação global (npm pack, `init`, MCPs, hooks), usar o sandbox — NUNCA testar no ambiente de dev
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- Detalhes: ver `~/pantheon-sandbox/README.md` após o prepare
|
|
41
|
+
- Descarte: `rm -rf ~/pantheon-sandbox`
|
|
42
|
+
- Detalhes: ver `~/pantheon-sandbox/README.md`
|
|
44
43
|
|
|
45
44
|
## Conventions
|
|
46
45
|
|
|
@@ -65,7 +64,7 @@ are rendered into only the matching installed agent prompts.
|
|
|
65
64
|
|
|
66
65
|
# Agent Return Format
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
All implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
|
|
69
68
|
|
|
70
69
|
## subtask_summary
|
|
71
70
|
**files_changed:** [list of file paths, one per line]
|
|
@@ -76,13 +75,58 @@ Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) retur
|
|
|
76
75
|
**status:** complete | partial (reason) | escalated (reason)
|
|
77
76
|
**blockers:** [list any blockers or null]
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
For investigation agents (Apollo, Athena), return structured findings with:
|
|
80
79
|
- Key findings as bullet points
|
|
81
80
|
- File paths with line numbers
|
|
82
81
|
- Relevant code snippets (max 3 lines each)
|
|
83
82
|
|
|
83
|
+
## Council Specialist Response Format
|
|
84
|
+
|
|
85
|
+
When responding to a `/pantheon` council synthesis invocation, specialists MUST return this structured format:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
## specialist_response
|
|
89
|
+
**position:** <clear one-sentence position answering the question>
|
|
90
|
+
**reasoning:** <2-4 sentences with logical chain>
|
|
91
|
+
**trade_offs:** <what's gained vs lost, specific>
|
|
92
|
+
**risks:** <what could go wrong, max 3 items>
|
|
93
|
+
**confidence:** High | Medium | Low
|
|
94
|
+
**agreement_signals:** agree:@agent1 on <issue>, agree:@agent2 on <issue> | disagree:@agent3 on <issue>
|
|
95
|
+
**specific_claims:** <count of specific factual claims in response>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Field Rules
|
|
99
|
+
|
|
100
|
+
| Field | Required | Validation |
|
|
101
|
+
|-------|----------|------------|
|
|
102
|
+
| position | ✅ | Single sentence, must directly answer the question |
|
|
103
|
+
| reasoning | ✅ | 2-4 sentences with logical chain |
|
|
104
|
+
| trade_offs | ✅ | At least one gain and one loss, specific to context |
|
|
105
|
+
| risks | ✅ | Max 3 bullet points |
|
|
106
|
+
| confidence | ✅ | One of: High, Medium, Low |
|
|
107
|
+
| agreement_signals | Optional | Format: `agree:@agent on issue \| disagree:@agent on issue`. Use only when you can reference other specialists expected positions. |
|
|
108
|
+
| specific_claims | ✅ | Integer count of verifiable factual statements in the response |
|
|
109
|
+
|
|
110
|
+
### Confidence Guidelines
|
|
111
|
+
|
|
112
|
+
- **High**: Position backed by 3+ specific claims with evidence or direct experience
|
|
113
|
+
- **Medium**: Position backed by 1-2 specific claims
|
|
114
|
+
- **Low**: Position is opinion-based or speculative
|
|
115
|
+
|
|
116
|
+
### Example
|
|
117
|
+
```
|
|
118
|
+
## specialist_response
|
|
119
|
+
**position:** The BackgroundJobBoard should be used for council crash recovery
|
|
120
|
+
**reasoning:** The board already supports running→completed→reconciled state machine with persistence. Registering council dispatches there adds ~50ms overhead but prevents total session loss on context crash. The WAL pattern ensures no data loss on restart.
|
|
121
|
+
**trade_offs:** Gain: crash recovery for multi-minute council sessions. Lose: ~50ms registration overhead per council.
|
|
122
|
+
**risks:** Board persistence failure could block council start — implement with fire-and-forget error handling
|
|
123
|
+
**confidence:** High
|
|
124
|
+
**agreement_signals:** agree:@themis on persist-before-notify
|
|
125
|
+
**specific_claims:** 3
|
|
126
|
+
```
|
|
127
|
+
|
|
84
128
|
## Memory Context
|
|
85
|
-
If
|
|
129
|
+
If memory affected the result, state the takeaway briefly; do not repeat the entry or task context.
|
|
86
130
|
|
|
87
131
|
<!-- Source: src/instructions/memory-protocol.instructions.md -->
|
|
88
132
|
## Memory Protocol
|
|
@@ -94,18 +138,17 @@ These rules apply to all agents; each agent file may add domain-specific rules.
|
|
|
94
138
|
|
|
95
139
|
## Universal Rules
|
|
96
140
|
|
|
97
|
-
###
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
- Agents have read-only memory access: only `memory_search()` is available.
|
|
141
|
+
### Retrieval
|
|
142
|
+
- Search only when prior project history could change the outcome; skip self-contained questions and bounded changes.
|
|
143
|
+
- For delegated work, Zeus searches at most once and passes useful hits to the specialist. Reuse supplied results; search separately only if relevant history is needed but missing.
|
|
144
|
+
- Use a targeted query (`top_k=2`); do not search the whole prompt by default. Missing or irrelevant results never block current work.
|
|
102
145
|
|
|
103
|
-
###
|
|
104
|
-
`memory_store()` is
|
|
105
|
-
|
|
146
|
+
### Persistence
|
|
147
|
+
- `memory_store()` is manual, not automatic. Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state.
|
|
148
|
+
- Confirm the store succeeded before claiming persistence. There is no automatic memory WAL or recovery. Add ADRs to the memory bank only when explicitly requested.
|
|
106
149
|
|
|
107
150
|
### Relevance and permanent records
|
|
108
|
-
|
|
151
|
+
Ignore weak matches; routine summaries do not belong in durable memory.
|
|
109
152
|
|
|
110
153
|
<!-- Source: src/instructions/yagni.instructions.md -->
|
|
111
154
|
## YAGNI Anti-overengineering
|
package/CHANGELOG.md
CHANGED
|
@@ -18,122 +18,59 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
18
18
|
|
|
19
19
|
## ✅ Closed Issues
|
|
20
20
|
|
|
21
|
-
## [v1.6.0-beta.
|
|
21
|
+
## [v1.6.0-beta.8] - 2026-10-11
|
|
22
22
|
|
|
23
23
|
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
|
24
24
|
move this section to a versioned entry and reset the template below. -->
|
|
25
25
|
|
|
26
|
-
## 🆕 What's New
|
|
27
|
-
|
|
28
|
-
- **Simpler agent dispatch:** answer no-change questions directly, send bounded
|
|
29
|
-
fixes to one specialist, load council instructions on demand, and remove
|
|
30
|
-
routine per-task KV/cache routing. No token, cost, or latency savings are
|
|
31
|
-
claimed without live measurements.
|
|
32
|
-
- **V2 install and permissions:** use a versioned package-root plugin pin and
|
|
33
|
-
migrate V1 `task`/`write` permissions to V2 `subagent`/`edit`, retaining the
|
|
34
|
-
stricter effect when rules collide.
|
|
35
|
-
- **Release and runtime hardening:** bounded in-process secret scanning,
|
|
36
|
-
fail-closed V2 registration, TUI timer disposal, truthful doctor reporting,
|
|
37
|
-
and guarded V2 sandbox prepare/reset.
|
|
38
|
-
|
|
39
26
|
## 🐞 Fixed
|
|
40
27
|
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
prerelease versions; checkout installs warn when their exact npm pin is not
|
|
45
|
-
published yet.
|
|
46
|
-
- V2 permission migration maps `task → subagent` and `write → edit` and
|
|
47
|
-
preserves the stricter conflicting rule.
|
|
48
|
-
|
|
49
|
-
## ⚠️ Known Issues
|
|
50
|
-
|
|
51
|
-
- Live provider E2E is blocked by HTTP 403; an interactive model-backed V2 TUI
|
|
52
|
-
turn remains unverified.
|
|
53
|
-
- The V2 tool canary targets OpenCode 2.0.22 while the installable CLI differs
|
|
54
|
-
(issue #216); V1 host end-to-end validation is also deferred.
|
|
55
|
-
- The observed P0-4 tool-catalog oscillation has no reproduced cause; its
|
|
56
|
-
reproduction harness remains follow-up work.
|
|
57
|
-
- V2 `init` from an unpublished source checkout writes a versioned npm pin that
|
|
58
|
-
cannot resolve until that version is published; the installer warns.
|
|
59
|
-
## [v1.6.0] - 2026-10-10
|
|
28
|
+
- **opencode-v2** — repair session lookup and beta sandbox reuse
|
|
29
|
+
- **scripts** — isolate beta background service port
|
|
30
|
+
## [v1.6.0-beta.7] - 2026-10-10
|
|
60
31
|
|
|
61
|
-
|
|
62
|
-
|
|
32
|
+
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
|
33
|
+
move this section to a versioned entry and reset the template below. -->
|
|
63
34
|
|
|
64
35
|
## 🆕 What's New
|
|
65
36
|
|
|
66
|
-
- **
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- **
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
37
|
+
- **Permissões MCP nativas por agente no OpenCode V1 e V2.** O instalador
|
|
38
|
+
converte a allowlist `mcp_tools` de cada agente em regras nativas: nega por
|
|
39
|
+
padrão os servidores Pantheon omitidos, libera apenas as ferramentas
|
|
40
|
+
declaradas e preserva MCPs de terceiros. O V2 mantém os servidores
|
|
41
|
+
conectados; as regras limitam quais ferramentas cada agente vê.
|
|
42
|
+
- **Guarda V2 de delegação alinhada ao contrato de permissões.** Os hooks de
|
|
43
|
+
permissão e de sessão aplicam as restrições de sessão somente-leitura e a
|
|
44
|
+
matriz caller→target sem conceder acesso além do configurado pelo host.
|
|
45
|
+
- **Menos chamadas automáticas de memória e compressão.** A busca de contexto
|
|
46
|
+
do Zeus reutiliza o resultado de início de tarefa, e o protocolo de
|
|
47
|
+
compressão deixa de recomendar pipelines automáticos extensos.
|
|
48
|
+
- **Prova de identidade da instalação do sandbox.** O teste global compara a
|
|
49
|
+
versão e arquivos do pacote instalado com este checkout e rejeita referências
|
|
50
|
+
npm antigas nas configurações ativas antes de validar o runtime.
|
|
51
|
+
- O `--prepare` agora gera `start-pantheon.sh` para abrir o TUI interativo com o
|
|
52
|
+
beta instalado e HOME, configuração XDG, projeto e banco de dados isolados do
|
|
53
|
+
sandbox. O launcher fixa a porta do serviço gerenciado em `49376` e falha sem
|
|
54
|
+
parar serviços existentes se a porta dedicada já estiver ocupada.
|
|
82
55
|
|
|
83
56
|
## 🐞 Fixed
|
|
84
57
|
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
occupied port without reusing or stopping the existing service.
|
|
94
|
-
- Sandbox `tmp/` is not blanket-deleted: prepare only expires hash-named Node
|
|
95
|
-
compile-cache files owned by the current user and older than 30 days. Runtime
|
|
96
|
-
state, unknown entries, and handoff/evidence files remain untouched.
|
|
97
|
-
- **V2 plugin registration is stable across install locations.** `init` now
|
|
98
|
-
writes the exact `pantheon-opencode@<version>` npm entry and the package root
|
|
99
|
-
exports the V2 plugin. This replaces absolute paths into a global prefix or
|
|
100
|
-
transient `npx` cache; `doctor` recognizes the pinned package and reports
|
|
101
|
-
version drift. A clean production-only package consumer test covers the root
|
|
102
|
-
export.
|
|
103
|
-
- **V1-to-V2 permissions preserve their intended actions.** Migration maps
|
|
104
|
-
`task` to V2 `subagent` and `write` to the `edit` action that also governs
|
|
105
|
-
`write`/`patch`. If V1 `edit` and `write` rules collide on one resource, the
|
|
106
|
-
more restrictive effect wins. Tests cover global and nested agent rules.
|
|
107
|
-
- **`doctor` distinguishes SQLite readiness from tool registration.** The
|
|
108
|
-
`node:sqlite` check now says it verifies only the backend prerequisite, not
|
|
109
|
-
whether `pantheon_cost` registered on the active host.
|
|
110
|
-
- **Release documentation was reconciled with current code.** The V2 caller /
|
|
111
|
-
target matrix is enforced by `permission.evaluate`; the bridge export is an
|
|
112
|
-
importable utility but is not wired into production; the V2 event count and
|
|
113
|
-
package registration format are corrected in both READMEs and the install /
|
|
114
|
-
upgrade guides.
|
|
58
|
+
- Referências versionadas/alias do pacote Pantheon que sobravam na lista
|
|
59
|
+
`plugins` agora são reconhecidas pelo instalador e substituídas pelo caminho
|
|
60
|
+
do plugin local correto, sem afetar plugins de terceiros com nomes parecidos.
|
|
61
|
+
- A suíte CI foi separada do caminho crítico de instalação/empacotamento para
|
|
62
|
+
reduzir o tempo até o resultado das verificações do pacote.
|
|
63
|
+
- O `run-test.sh` gerado agora define seu timeout do `mcp list` antes do uso
|
|
64
|
+
sob `set -u`; antes, a variável ausente interrompia o teste antes de chamar
|
|
65
|
+
o CLI. A saída do comando também fica disponível quando o gate falha.
|
|
115
66
|
|
|
116
67
|
## ⚠️ Known Issues
|
|
117
68
|
|
|
118
|
-
- **
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
`opencode 2.0.22`; the installable CLI has drifted from that canary contract
|
|
124
|
-
(tracked in issue #216). See the README compatibility table for the measured
|
|
125
|
-
evidence and limitations.
|
|
126
|
-
- **Release validation is not complete.** Live provider E2E returned HTTP 403,
|
|
127
|
-
the interactive V2 TUI/model-backed turn has not been verified, and the
|
|
128
|
-
previously observed within-session tool-catalog oscillation (P0-4) still has
|
|
129
|
-
no reproduced cause. This candidate must not be published until the host
|
|
130
|
-
validation gates are resolved or explicitly waived.
|
|
131
|
-
- **V2 init from an unpublished source checkout cannot bootstrap its own npm
|
|
132
|
-
pin.** It writes the exact package version and emits a warning; OpenCode
|
|
133
|
-
cannot resolve that version until it is published. This is limited to
|
|
134
|
-
running the installer from the repository checkout. After publication, use
|
|
135
|
-
the npm-installed or `npx` installer for the supported consumer path.
|
|
136
|
-
|
|
69
|
+
- **A delegação real ainda precisa de confirmação nesta beta.** O teste manual
|
|
70
|
+
anterior de `HERMES-PONG` foi negado com
|
|
71
|
+
`Pantheon delegation denied: authoritative caller session is unavailable`;
|
|
72
|
+
a correção de permissões e a instalação isolada precisam ser verificadas no
|
|
73
|
+
TUI OpenCode V2 antes de considerar a delegação validada.
|
|
137
74
|
## [v1.6.0-beta.6] - 2026-10-05
|
|
138
75
|
|
|
139
76
|
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
package/README.md
CHANGED
|
@@ -54,6 +54,9 @@ project-local installation, or non-interactive setup, see the
|
|
|
54
54
|
[installation guide](docs/INSTALLATION.md).
|
|
55
55
|
The bundled Python MCP servers use the pinned MCP SDK 2.2.0 and standalone
|
|
56
56
|
FastMCP 4.0.10 runtime; see the [MCP guide](docs/MCP.md).
|
|
57
|
+
The installer also turns each agent's `mcp_tools` allowlist into native
|
|
58
|
+
per-agent permissions for OpenCode V1 and V2; see the
|
|
59
|
+
[agent MCP reference](docs/AGENT-MCP.md).
|
|
57
60
|
|
|
58
61
|
## A simple example
|
|
59
62
|
|
|
@@ -64,13 +67,6 @@ Once OpenCode is running, describe the outcome you want:
|
|
|
64
67
|
```
|
|
65
68
|
|
|
66
69
|
Pantheon helps turn that request into a plan and a sequence of reviewed steps.
|
|
67
|
-
For questions that do not require repository changes, Zeus answers directly;
|
|
68
|
-
small, reversible fixes use one specialist dispatch. Discovery, planning,
|
|
69
|
-
parallel work, and council review are reserved for tasks that benefit from them.
|
|
70
|
-
|
|
71
|
-
For a tiny, bounded repair, invoke `@talos` directly (for example,
|
|
72
|
-
`@talos fix this typo`). That skips the Zeus orchestration call; use `/pantheon`
|
|
73
|
-
for planning, delegation, multi-file work, or quality gates.
|
|
74
70
|
|
|
75
71
|
## Who is it for?
|
|
76
72
|
|
|
@@ -87,12 +83,19 @@ clear handoff between stages of work.
|
|
|
87
83
|
- Project memory that helps preserve relevant context between sessions.
|
|
88
84
|
- Optional integrations for common development tasks.
|
|
89
85
|
|
|
86
|
+
Memory is used selectively: the coordinator searches once only when project
|
|
87
|
+
history could affect a task, then passes relevant results to specialists. Store
|
|
88
|
+
one concise, reusable outcome at task completion when it will matter later;
|
|
89
|
+
routine child summaries and phase updates stay in the current handoff. The
|
|
90
|
+
session-checkpoint tools are separate, optional persistence APIs and are not
|
|
91
|
+
called automatically by compaction hooks. See [Memory usage](docs/MEMORY.md).
|
|
92
|
+
|
|
90
93
|
## Status
|
|
91
94
|
|
|
92
|
-
Candidate version:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
published
|
|
95
|
+
Candidate version: the manifests in this checkout express the version being
|
|
96
|
+
prepared, not a confirmed publication. A beta is published only after the
|
|
97
|
+
Release workflow completes successfully. To check which version is actually
|
|
98
|
+
published, consult the npm `beta` dist-tag. Pantheon is designed for OpenCode
|
|
96
99
|
and depends on the availability and configuration of OpenCode and any optional
|
|
97
100
|
services you choose to use. Check the
|
|
98
101
|
[releases](https://github.com/ils15/pantheon-opencode/releases) and
|
|
@@ -135,19 +138,18 @@ host is an unsupported mixed/wrong-generation configuration, not a supported mod
|
|
|
135
138
|
|
|
136
139
|
### What the OpenCode 2 path is — and is not
|
|
137
140
|
|
|
138
|
-
**Not inert.** V2
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
unsupported and are reported as `goal-tools`.
|
|
141
|
+
**Not inert.** The V2 path (`src/plugin-v2`, registered as a directory because
|
|
142
|
+
the V2 loader rejects bare file paths) registers real tools with real
|
|
143
|
+
`input`/`output` schemas via `ctx.tool.transform()`, 5 event subscriptions,
|
|
144
|
+
session hooks and tool/permission hooks that enforce read-only sessions and the
|
|
145
|
+
caller→target delegation matrix. The matrix applies only to Pantheon-managed
|
|
146
|
+
targets: Zeus may delegate to any registered agent; Athena and Hermes may target
|
|
147
|
+
Apollo only; other Pantheon callers and unknown callers are denied. Child
|
|
148
|
+
sessions cannot delegate to Pantheon agents. Calls between native/custom agents
|
|
149
|
+
remain under host permissions. The V2 path never adds an allow grant or
|
|
150
|
+
overrides an explicit host deny; missing or mismatched identity fails closed
|
|
151
|
+
for the attempted Pantheon delegation. The 3 goal tools remain unsupported and
|
|
152
|
+
are reported as `goal-tools`.
|
|
151
153
|
|
|
152
154
|
**Not complete either, and the V2 support claim is currently narrowed.** Two
|
|
153
155
|
facts, both recorded in this repository rather than smoothed over:
|
|
@@ -170,14 +172,14 @@ facts, both recorded in this repository rather than smoothed over:
|
|
|
170
172
|
Treat the 1.6 line's OpenCode 2 support as **real but partial**, and do not read
|
|
171
173
|
the 1.6.x row as "OpenCode 2 is finished".
|
|
172
174
|
|
|
173
|
-
### Verified
|
|
175
|
+
### Verified against which OpenCode versions
|
|
174
176
|
|
|
175
177
|
| What | Verified against | How |
|
|
176
178
|
|---|---|---|
|
|
177
|
-
| V1 plugin
|
|
179
|
+
| V1 plugin + generation gate | The OpenCode 1.18.x line. This package pins `@opencode-ai/plugin` and `@opencode-ai/sdk` to `1.18.33`; the highest published `opencode-ai` host package (the one shipping the `opencode` binary) is `1.18.34` | Dependency pin (`package.json`); generation-gate unit tests over injected host banners; installer end-to-end tests asserting the emitted `opencode.json` shape |
|
|
178
180
|
| V2 plugin tool surface | `opencode 2.0.22` (the host the canary was written against) | `tests/canary/plugin-v2-tool-canary.test.mjs`, driving `hashline_edit` through a real `opencode serve` |
|
|
179
181
|
| V2 against the current installable CLI | **Not verified.** Canary fails 12/12; see issue #216 | — |
|
|
180
|
-
| Exact 1.X host version exercised end-to-end | **Unverified
|
|
182
|
+
| Exact 1.X host version the 1.6 line is exercised against end-to-end | **Unverified.** No V1 host leg exists: the sandbox runner is V2-only and `--run v1` is rejected | — |
|
|
181
183
|
|
|
182
184
|
## Delegation (native `task()`)
|
|
183
185
|
|
|
@@ -188,17 +190,27 @@ there is no Pantheon-specific delegation tool surface to configure. See
|
|
|
188
190
|
[ADR-0011](.pantheon/memory-bank/adr/0011-delegation-engine-contract.md) for the
|
|
189
191
|
historical engine contract.
|
|
190
192
|
|
|
191
|
-
This
|
|
192
|
-
V2
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
193
|
+
This beta.8 candidate combines native per-agent MCP permissions for OpenCode V1
|
|
194
|
+
and V2, V2 delegation-permission alignment, simpler memory/compression
|
|
195
|
+
instructions, and a sandbox check that proves the installed package matches
|
|
196
|
+
this checkout instead of silently accepting stale npm-cached code. The isolated
|
|
197
|
+
sandbox launcher also pins the OpenCode background service to its dedicated
|
|
198
|
+
loopback port, rather than colliding with another OpenCode installation. The Zeus
|
|
199
|
+
prompt reuses one task-start memory-search result for context and routing;
|
|
200
|
+
runtime call counts and latency have not been measured. A beta.7 V2 dispatch
|
|
201
|
+
failed because the permission hook passed a bare string to `ctx.session.get`
|
|
202
|
+
instead of the V2 input object `{ sessionID }`; beta.8 corrects the call and
|
|
203
|
+
adds contract tests for the success and failure cases. The user subsequently
|
|
204
|
+
reported a successful Hermes liveness delegation in the active session, but
|
|
205
|
+
freshly restarting and testing the beta.8 sandbox remains the end-to-end gate.
|
|
206
|
+
The original report also included a separate `GET /api/session/{id}/permission`
|
|
207
|
+
404; the session ID exists in the beta7-candidate database but not the default
|
|
208
|
+
global database. Both OpenCode services were running, so the 404 in the global
|
|
209
|
+
log may come from the other instance; this remains an end-to-end verification
|
|
210
|
+
item.
|
|
211
|
+
|
|
212
|
+
Delegated tasks get at most one retry after an initial timeout or failure. If
|
|
213
|
+
that retry fails, the configured fallback or escalation chain applies.
|
|
202
214
|
|
|
203
215
|
## Cost tool backend
|
|
204
216
|
|
|
@@ -289,8 +301,8 @@ per installation; V1 and V2 Pantheon plugins must never be registered together.
|
|
|
289
301
|
| | V1 | V2 |
|
|
290
302
|
|---|---|---|
|
|
291
303
|
| OpenCode config key | singular `plugin` | plural `plugins` |
|
|
292
|
-
| Pantheon registration | `src/plugin.ts` plus `src/plugins/pantheon-hooks.ts` |
|
|
293
|
-
| Runtime contract | Pantheon V1 plugin: 6 tools (`hashline_edit`, the 3 goal tools, `pantheon_cost`, `pantheon_model`), event/tool hooks and V1 compaction handling | V2 plugin: 3
|
|
304
|
+
| Pantheon registration | `src/plugin.ts` plus `src/plugins/pantheon-hooks.ts` | `<installed>/src/plugin-v2` directory (`index.ts` re-exports `src/plugin-v2.ts`) |
|
|
305
|
+
| 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 tools (`hashline_edit`, `pantheon_cost`, `pantheon_model`), 5 event subscriptions, session hooks (`prompt`, `context`), a read-only-enforcing tool `execute.before` hook, plus configuration transforms |
|
|
294
306
|
| V1 APIs | Registered | Own tool definitions via `ctx.tool.transform()` — not the V1 plugin path |
|
|
295
307
|
|
|
296
308
|
The V2 plugin provides 3 orchestration tools (`hashline_edit`, `pantheon_cost`,
|
|
@@ -328,41 +340,14 @@ every call. Unsupported V2 features are `legacy-hooks` (the V1-specific hook
|
|
|
328
340
|
surface), `catalog-transform`, `integration-transform`, `skill-transform` and
|
|
329
341
|
`goal-tools`.
|
|
330
342
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
V1 and V2 use the same in-process scanner on their tool `execute.before` paths.
|
|
340
|
-
The scanner accepts up to **5 MiB (5,242,880 UTF-8 bytes) of serialized hook
|
|
341
|
-
payload**. Larger or malformed payloads are denied fail-closed; the rejected
|
|
342
|
-
payload is not written to the scanner log. This bound applies to the complete
|
|
343
|
-
serialized hook payload, not just one argument field. Before calling
|
|
344
|
-
`JSON.stringify`, the scanner iteratively preflights compact JSON byte size,
|
|
345
|
-
including UTF-8 and JSON escapes, and stops as soon as the limit is exceeded.
|
|
346
|
-
It rejects cycles, enumerable accessors and `toJSON` hooks, proxies, excessive
|
|
347
|
-
nesting, and non-JSON values without serializing or logging them.
|
|
348
|
-
|
|
349
|
-
V2 registers its required enforcement hook before registering Pantheon tools.
|
|
350
|
-
If the host rejects that hook, startup reports `secret-scan-hook` and
|
|
351
|
-
`pantheon-tools-disabled`, and Pantheon V2 tools are not registered. This does
|
|
352
|
-
not disable or claim scanner coverage for native host built-in tools; those may
|
|
353
|
-
remain available under the host's own policies. The opt-in timing harness is
|
|
354
|
-
reproducible with `npx tsx scripts/bench-secret-scanner.ts`: it runs 3 warmups
|
|
355
|
-
and 15 measured calls per size, reporting median timings for the current
|
|
356
|
-
`scanSecretText` implementation on safe ASCII strings only. It excludes payload
|
|
357
|
-
preflight/serialization and host-hook overhead, is not a historical or
|
|
358
|
-
Bash-versus-TypeScript comparison, and makes no speedup claim. It does not print
|
|
359
|
-
scan input.
|
|
360
|
-
|
|
361
|
-
The package exposes both contracts as importable exports: the package root and
|
|
362
|
-
`pantheon-opencode/plugin-v2` load V2; `pantheon-opencode/plugin` loads V1.
|
|
363
|
-
`pantheon-opencode/v2-bridge` is currently an importable utility only:
|
|
364
|
-
production setup does not wire it into the V2 plugin, so it does not provide
|
|
365
|
-
runtime interoperability or restore V1 goal/board features.
|
|
343
|
+
The package exposes both contracts as importable exports: `pantheon-opencode/plugin`
|
|
344
|
+
(V1), `pantheon-opencode/plugin-v2` (V2) and `pantheon-opencode/v2-bridge`
|
|
345
|
+
(optional interop), so a host can load either contract explicitly.
|
|
346
|
+
|
|
347
|
+
The V1→V2 bridge (`src/pantheon/v2-bridge.ts`) enables optional interop:
|
|
348
|
+
V1 infrastructure singletons (BackgroundJobBoard, GoalStore,
|
|
349
|
+
TodoEnforcer, VisionHandler) are passed through V2 `ctx.options`. The bridge is
|
|
350
|
+
optional — V2 works standalone with graceful degradation.
|
|
366
351
|
|
|
367
352
|
Select the contract explicitly when installing:
|
|
368
353
|
|
|
@@ -379,8 +364,8 @@ the host in this order: an explicit `OPENCODE_VERSION=v1|v2` wins; otherwise an
|
|
|
379
364
|
binary is asked for its `--version` and a major of 2 or more selects V2. Every
|
|
380
365
|
other case — an unreadable probe, an unparseable banner, or a banner whose
|
|
381
366
|
version-like tokens contradict each other with no tool name to break the tie —
|
|
382
|
-
warns once and falls back to V1, because
|
|
383
|
-
|
|
367
|
+
warns once and falls back to V1, because a plural `plugins` directory entry on
|
|
368
|
+
an unknown 1.x host loses the plugin entirely.
|
|
384
369
|
|
|
385
370
|
The probe prefers the token that follows the tool name, so a runtime token
|
|
386
371
|
ahead of it (`node v22.1.0 (opencode 1.18.33)`) or a trailing build date
|
|
@@ -444,9 +429,8 @@ Key order does not matter.
|
|
|
444
429
|
One command keeps an existing installation current:
|
|
445
430
|
|
|
446
431
|
```bash
|
|
447
|
-
# Without a global install, pin the
|
|
448
|
-
#
|
|
449
|
-
# release candidate:
|
|
432
|
+
# Without a global install, ALWAYS pin the dist-tag — plain `npx
|
|
433
|
+
# pantheon-opencode` resolves `latest`, which is the stable release (1.4.3):
|
|
450
434
|
npx pantheon-opencode@beta update # npm beta channel + config refresh
|
|
451
435
|
npx pantheon-opencode@beta update --stable # stable channel instead
|
|
452
436
|
|
|
@@ -547,12 +531,15 @@ agent delegation. The gate is fail-closed: every required check must return an
|
|
|
547
531
|
explicit PASS; timeouts, auth/network/provider failures and missing
|
|
548
532
|
prerequisites block the run.
|
|
549
533
|
|
|
550
|
-
The
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
the
|
|
534
|
+
The runner defaults to the current stable `@opencode/cli` package and its
|
|
535
|
+
`opencode2` alias; set `OPENCODE_V2_SPEC` only when a test needs a different
|
|
536
|
+
host build. This keeps Pantheon beta testing separate from the OpenCode CLI
|
|
537
|
+
release channel.
|
|
538
|
+
|
|
539
|
+
"V2" here refers only to the hook canary observed against an OpenCode v2.0.18
|
|
540
|
+
host, where at least one tested hook callback fired; it does not establish
|
|
541
|
+
compatibility with the stable `@opencode/plugin@2.0.18` SDK or full 2.x
|
|
542
|
+
contract. This branch still pins transitional `@opencode-ai/plugin@1.18.30`.
|
|
556
543
|
On hosts where both `opencode` and `opencode2` exist, the latter is typically
|
|
557
544
|
a shim that execs the same binary, so an older side-by-side comparison proved
|
|
558
545
|
nothing about the binary itself. The project is V2-exclusive, so there is a
|
|
@@ -560,12 +547,13 @@ single leg.
|
|
|
560
547
|
|
|
561
548
|
```bash
|
|
562
549
|
scripts/test-opencode-v2-sandbox.sh --prepare # tarball + install + init in the sandbox
|
|
550
|
+
~/pantheon-sandbox/start-pantheon.sh # interactive TUI in that isolated beta sandbox
|
|
563
551
|
scripts/test-opencode-v2-sandbox.sh --run v2 # base validation only
|
|
564
552
|
scripts/test-opencode-v2-sandbox.sh --prompts # base validation + prompt battery
|
|
565
553
|
scripts/test-opencode-v2-sandbox.sh --rehydrate # offline context rehydration/session-summary probe
|
|
566
554
|
scripts/test-opencode-v2-sandbox.sh --hooks # V2 hook callback canary
|
|
567
555
|
scripts/test-opencode-v2-sandbox.sh --rehydrate --hooks # run both canaries
|
|
568
|
-
scripts/test-opencode-v2-sandbox.sh --reset #
|
|
556
|
+
scripts/test-opencode-v2-sandbox.sh --reset # wipe the sandbox root
|
|
569
557
|
```
|
|
570
558
|
|
|
571
559
|
Modes are combinable (e.g. `--prepare --run v2 --prompts`). `--rehydrate` runs
|
|
@@ -578,20 +566,8 @@ rehydration fails, and the command returns a failing status afterward. These
|
|
|
578
566
|
are test/sandbox canaries, not proof of Pantheon security enforcement. Binaries
|
|
579
567
|
are resolved strictly inside the sandbox npm prefix — a non-prepared sandbox
|
|
580
568
|
fails fast instead of silently testing the host installation. The sandbox is
|
|
581
|
-
always built from the checkout this script lives in
|
|
582
|
-
|
|
583
|
-
resolved checkout is used by prepare and the generated `run-test.sh`; dangling,
|
|
584
|
-
relative, and non-Pantheon paths fail before packaging. `--prepare` generates
|
|
585
|
-
`run-test.sh`, `start-pantheon.sh`, and a sandbox-local `README.md`.
|
|
586
|
-
|
|
587
|
-
`PANTHEON_V2_PORT` selects the dedicated loopback port (default `49376`). The
|
|
588
|
-
harness validates the port and refuses an occupied listener without reusing or
|
|
589
|
-
stopping it. `PANTHEON_V2_HOST` defaults to `127.0.0.1` and rejects non-loopback
|
|
590
|
-
addresses. `PANTHEON_V2_MCP_LIST_TIMEOUT` controls each `mcp list` call
|
|
591
|
-
(default `15` seconds). On prepare, only hash-named Node compile-cache files
|
|
592
|
-
owned by the current user and older than 30 days may expire under
|
|
593
|
-
`tmp/node-compile-cache`; runtime state and unrecognized files (including
|
|
594
|
-
handoff evidence) are preserved.
|
|
569
|
+
always built from the checkout this script lives in; it never infers a
|
|
570
|
+
repository from a sibling directory.
|
|
595
571
|
|
|
596
572
|
This validates the prepared isolated sandbox only. A PASS is not proof of
|
|
597
573
|
support for every real host or for host configurations that were not exercised.
|
|
@@ -610,7 +586,7 @@ Env overrides:
|
|
|
610
586
|
|----------|---------|---------|
|
|
611
587
|
| `PANTHEON_SANDBOX_ROOT` | `~/pantheon-sandbox` | Sandbox root (refused if unsafe for `--reset`) |
|
|
612
588
|
| `OPENCODE_V1_SPEC` | `opencode-ai@1.18.18` | Configures the V1 plugin only; the V2-only sandbox runner does not consume or support it |
|
|
613
|
-
| `OPENCODE_V2_SPEC` | `@opencode
|
|
589
|
+
| `OPENCODE_V2_SPEC` | `@opencode/cli@latest` | npm spec providing the `opencode2` binary |
|
|
614
590
|
| `PANTHEON_SANDBOX_MODEL` | `opencode-go/mimo-v2.5` | Model used by init and prompts |
|
|
615
591
|
| `PANTHEON_PROMPT_TIMEOUT` | `300` | Per-prompt timeout in seconds |
|
|
616
592
|
|