pantheon-opencode 1.6.2-beta.1 → 1.6.2-beta.10
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/CHANGELOG.md +163 -0
- package/README.md +236 -60
- package/README.pt-BR.md +19 -1
- package/bin/pantheon-init.mjs +195 -13
- package/package.json +11 -3
- package/plugin.json +1 -1
- package/prompts/README.md +58 -0
- package/prompts/debug-issue.prompt.md +46 -0
- package/prompts/dynamic/agora-generated.txt +38 -0
- package/prompts/dynamic/orchestrate-generated.txt +51 -0
- package/prompts/focus.prompt.md +42 -0
- package/prompts/implement-feature.prompt.md +39 -0
- package/prompts/optimize-database.prompt.md +58 -0
- package/prompts/orchestrate-with-zeus.prompt.md +441 -0
- package/prompts/plan-architecture.prompt.md +59 -0
- package/prompts/quick-discovery-large-codebase.prompt.md +294 -0
- package/prompts/quick-plan-large-feature.prompt.md +197 -0
- package/prompts/semantic-summarize.md +50 -0
- package/prompts/sketch.prompt.md +91 -0
- package/prompts/subtask.prompt.md +131 -0
- package/pyproject.toml +1 -1
- package/scripts/decision-router-budget.mjs +780 -0
- package/scripts/decision-router-v2-budget.mjs +218 -0
- package/scripts/decision-router-v2-egress.mjs +272 -0
- package/scripts/decision-router.mjs +758 -0
- package/scripts/docs-check-changelog.mjs +5 -3
- package/scripts/install/component-selection.mjs +9 -4
- package/scripts/install/decision-layer-preview.mjs +376 -0
- package/scripts/install/decision-router-config.mjs +560 -0
- package/scripts/install/health-check.mjs +20 -11
- package/scripts/install/interactive.mjs +103 -14
- package/scripts/install/interrupt.mjs +4 -3
- package/scripts/install/migrate.mjs +123 -72
- package/scripts/install/opencode.mjs +178 -122
- package/scripts/install/plan.mjs +8 -1
- package/scripts/install/plugin.mjs +4 -3
- package/scripts/install/state.mjs +12 -0
- package/scripts/install/strings.mjs +22 -0
- package/scripts/install/venv.mjs +34 -17
- package/scripts/mcp_resources.py +11 -9
- package/scripts/release-notes.mjs +30 -7
- package/scripts/restore.mjs +22 -10
- package/scripts/sync-tui.mjs +3 -3
- package/scripts/test-opencode-v2-sandbox.sh +10 -6
- package/scripts/versioning.mjs +41 -5
- package/src/agents/aphrodite.md +6 -1
- package/src/agents/apollo.md +1 -0
- package/src/agents/athena.md +1 -0
- package/src/agents/demeter.md +1 -1
- package/src/agents/gaia.md +1 -0
- package/src/agents/hephaestus.md +1 -1
- package/src/agents/hermes.md +8 -10
- package/src/agents/iris.md +1 -1
- package/src/agents/mnemosyne.md +1 -0
- package/src/agents/nyx.md +1 -1
- package/src/agents/prometheus.md +1 -1
- package/src/agents/talos.md +6 -1
- package/src/agents/themis.md +1 -1
- package/src/agents/zeus.md +52 -62
- package/src/mcp/eval_store.py +11 -4
- package/src/mcp/mcp_resources.py +11 -9
- package/src/mcp/memory_mcp.py +293 -150
- package/src/pantheon/cost-command.ts +30 -133
- package/src/pantheon/jev-decision-tool.ts +347 -0
- package/src/pantheon/jev-decisions.ts +625 -0
- package/src/pantheon/local-decision-agents.ts +170 -0
- package/src/pantheon/local-decision-budget.ts +1046 -0
- package/src/pantheon/local-decision-egress-gate.ts +144 -0
- package/src/pantheon/local-decision-prompt.ts +256 -0
- package/src/pantheon/local-decision-provider-matrix.ts +44 -0
- package/src/pantheon/local-decision-router.ts +225 -0
- package/src/pantheon/local-decision-skills.ts +281 -0
- package/src/pantheon/local-decision-tool.ts +160 -0
- package/src/pantheon/local-decision-turn.ts +101 -0
- package/src/pantheon/local-decision-usage-evidence.internal.ts +168 -0
- package/src/pantheon/local-orchestration.ts +322 -0
- package/src/pantheon/model-pricing.ts +1 -536
- package/src/pantheon/pantheon-decision-catalog.ts +101 -0
- package/src/pantheon/v2-decision-budget.ts +456 -0
- package/src/pantheon/v2-decision-contracts.ts +300 -0
- package/src/pantheon/v2-decision-egress.ts +203 -0
- package/src/pantheon/v2-decision-events.ts +180 -0
- package/src/pantheon/v2-decision-heuristic.ts +121 -0
- package/src/pantheon/v2-decision-points/p1-agent.ts +91 -0
- package/src/pantheon/v2-decision-points/p10-claims.ts +243 -0
- package/src/pantheon/v2-decision-points/p11-catalog.ts +220 -0
- package/src/pantheon/v2-decision-points/p2-skill.ts +83 -0
- package/src/pantheon/v2-decision-points/p3-complexity.ts +108 -0
- package/src/pantheon/v2-decision-points/p4-memory.ts +137 -0
- package/src/pantheon/v2-decision-points/p5-themis-verify.ts +190 -0
- package/src/pantheon/v2-decision-points/p6-council.ts +161 -0
- package/src/pantheon/v2-decision-points/p7-loop.ts +263 -0
- package/src/pantheon/v2-decision-points/p8-guardrail.ts +367 -0
- package/src/pantheon/v2-decision-points/p9-memory-compaction.ts +304 -0
- package/src/pantheon/v2-decision-points.ts +242 -0
- package/src/pantheon/v2-decision-policy.ts +166 -0
- package/src/pantheon/v2-decision-premises.ts +146 -0
- package/src/pantheon/v2-decision-prompt-surface.ts +115 -0
- package/src/pantheon/v2-decision-rank.ts +91 -0
- package/src/pantheon/v2-decision-registry.ts +391 -0
- package/src/pantheon/v2-decision-resource-ids.ts +127 -0
- package/src/pantheon/v2-decision-shadow.ts +123 -0
- package/src/pantheon/v2-decision-telemetry.ts +214 -0
- package/src/pantheon/v2-decision-verify.ts +51 -0
- package/src/pantheon/v2-hook-engine.ts +307 -0
- package/src/pantheon/v2-native-decisions.ts +365 -0
- package/src/pantheon/v2-shell-hooks.ts +66 -2
- package/src/pantheon/v2-tools.ts +38 -15
- package/src/plugin-v2.ts +419 -26
- package/src/plugin.ts +4 -0
- package/src/plugins/tui/THIRD_PARTY_NOTICES.md +24 -0
- package/src/plugins/tui/dist/server-v2.d.ts +19 -11
- package/src/plugins/tui/dist/server-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/server-v2.js +19 -666
- package/src/plugins/tui/dist/server-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui-v2.d.ts +11 -203
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +187 -1917
- package/src/plugins/tui/dist/tui-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +17 -2
- package/src/plugins/tui/package.json +4 -2
- package/src/plugins/tui/src/cost-data.ts +607 -0
- package/src/plugins/tui/src/index-v2.tsx +213 -54
- package/src/plugins/tui/src/model-pricing.ts +536 -0
- package/src/plugins/tui/src/server-v2.ts +18 -838
- package/src/plugins/tui/tsdown.config.ts +28 -6
- package/src/plugins/tui/dist/quota-adapters.d.ts +0 -89
- package/src/plugins/tui/dist/quota-adapters.d.ts.map +0 -1
- package/src/plugins/tui/dist/quota-adapters.js +0 -1142
- package/src/plugins/tui/dist/quota-adapters.js.map +0 -1
- package/src/plugins/tui/dist/quota-cli.d.ts +0 -17
- package/src/plugins/tui/dist/quota-cli.d.ts.map +0 -1
- package/src/plugins/tui/dist/quota-cli.js +0 -184
- package/src/plugins/tui/dist/quota-cli.js.map +0 -1
- package/src/plugins/tui/dist/quota-rpc-UL2HuFRJ.js +0 -390
- package/src/plugins/tui/dist/quota-rpc-UL2HuFRJ.js.map +0 -1
- package/src/plugins/tui/src/go-key-diagnostic-ui.ts +0 -100
- package/src/plugins/tui/src/go-key-diagnostic.ts +0 -125
- package/src/plugins/tui/src/quota-adapters.ts +0 -1598
- package/src/plugins/tui/src/quota-cli.ts +0 -237
- package/src/plugins/tui/src/quota-rpc.ts +0 -209
- package/src/plugins/tui/src/quota-v2-model.ts +0 -1032
- package/src/plugins/tui/src/quota-v2.tsx +0 -986
package/src/agents/hermes.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hermes
|
|
3
|
-
description: Backend specialist — FastAPI, Python, async,
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
description: Backend specialist — FastAPI, Python, async, modern Python stdlib,
|
|
4
|
+
obsolete lib detection. Root Hermes may call Apollo for discovery; child
|
|
5
|
+
sessions do not delegate. Sends material work to Themis via Zeus.
|
|
6
6
|
mode: all
|
|
7
7
|
reasoning_effort: medium
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ skills:
|
|
|
21
21
|
- tdd-with-agents
|
|
22
22
|
- worktrees
|
|
23
23
|
permission:
|
|
24
|
-
|
|
24
|
+
shell: allow
|
|
25
25
|
read: allow
|
|
26
26
|
grep: allow
|
|
27
27
|
edit: allow
|
|
@@ -246,13 +246,11 @@ When completing a task, provide:
|
|
|
246
246
|
|
|
247
247
|
**Philosophy**: Clean code, clear error messages, proper async patterns, thorough testing.
|
|
248
248
|
|
|
249
|
-
##
|
|
249
|
+
## Verification Tiers (match the change, not a ritual)
|
|
250
250
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
- Do NOT auto-continue when tests fail unexpectedly — stop and diagnose
|
|
255
|
-
- Partial results NOT allowed — must complete or fail
|
|
251
|
+
- **Small bounded fix** (typo, config, copy, single-function tweak): make the change, run the one targeted test or command that proves it, report. No RED→GREEN→REFACTOR ceremony, no extra discovery passes.
|
|
252
|
+
- **Material change** (new endpoint, schema, service, auth, public behavior): full TDD cycle via `skill: tdd-with-agents`, then the Themis handoff.
|
|
253
|
+
- Auto-continue through the chosen tier for authorized work; stop for required Themis review; stop and diagnose when tests fail unexpectedly; no partial results.
|
|
256
254
|
|
|
257
255
|
## Skills
|
|
258
256
|
Implementação: `tdd-with-agents`, `incremental-implementation`, `code-review-checklist`, `git-workflow-and-versioning`
|
package/src/agents/iris.md
CHANGED
package/src/agents/mnemosyne.md
CHANGED
package/src/agents/nyx.md
CHANGED
package/src/agents/prometheus.md
CHANGED
package/src/agents/talos.md
CHANGED
|
@@ -6,7 +6,7 @@ reasoning_effort: low
|
|
|
6
6
|
permission:
|
|
7
7
|
read: allow
|
|
8
8
|
edit: allow
|
|
9
|
-
|
|
9
|
+
shell: allow
|
|
10
10
|
task:
|
|
11
11
|
"*": deny
|
|
12
12
|
temperature: 0.3
|
|
@@ -22,6 +22,11 @@ mcp_tools:
|
|
|
22
22
|
pantheon-code-mode: [execute_code_script]
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
+
## Verification Tiers
|
|
26
|
+
|
|
27
|
+
Small bounded fix → change + one targeted proof, no ceremony. Material change → full test discipline. Match the tier to the change.
|
|
28
|
+
|
|
29
|
+
|
|
25
30
|
## Core Capabilities
|
|
26
31
|
|
|
27
32
|
### 1. Rapid Repairs
|
package/src/agents/themis.md
CHANGED
package/src/agents/zeus.md
CHANGED
|
@@ -6,8 +6,10 @@ permission:
|
|
|
6
6
|
read: allow
|
|
7
7
|
edit: deny
|
|
8
8
|
hashline_edit: deny
|
|
9
|
+
shell: deny
|
|
9
10
|
bash: deny
|
|
10
11
|
vision_describe: allow
|
|
12
|
+
pantheon_jev_decide: allow
|
|
11
13
|
task:
|
|
12
14
|
"*": allow
|
|
13
15
|
temperature: 0.2
|
|
@@ -36,6 +38,32 @@ skills:
|
|
|
36
38
|
|
|
37
39
|
**Coordenador APENAS. Zeus NUNCA lê arquivos de código-fonte.** Toda leitura de `src/`, `tests/`, `scripts/` vai para @apollo. Leia apenas: config, docs, memory bank, delegação.
|
|
38
40
|
|
|
41
|
+
## Local advisory routing before native delegation
|
|
42
|
+
|
|
43
|
+
- For an obvious, bounded task with one clear specialist, dispatch directly with the native `subagent` tool. Do not call `pantheon_local_decision`, Jev, council, or Athena planning just to confirm an obvious route.
|
|
44
|
+
- For a genuinely ambiguous specialist choice, prefer one typed call to `pantheon_jev_decide` with `mode: "delegation"` (consent- and budget-gated; the tool refuses with a reason when any gate is missing). It returns probabilistic answers with confidence in one fast decision; treat them like any advisory label. If it refuses, or for offline-only setups, fall back to `pantheon_local_decision` (local only), and otherwise to your own routing judgment. Never use Jev for open-ended reasoning: it answers the typed question you asked, nothing more.
|
|
45
|
+
- Build `candidateAgents` only from targets currently shown as available by native `subagent` and allowed by current routing/grants. Do not invent candidates. Supply only relevant available skill IDs and resource IDs; `domain` is one exact candidate ID only when the domain mapping is clear, otherwise null. Pass no task text, transcript, file contents, memory contents, credentials, or secrets.
|
|
46
|
+
- Treat the returned agent/skill/resource IDs and memory boolean as recommendations, not authorization. Re-check the candidate against current routing, grants, and availability before dispatch. Preserve all fixed review, human-approval, data-integrity, and security gates regardless of complexity or recommendation.
|
|
47
|
+
- If `recommendMemorySearch` is true and prior project history could change the outcome, Zeus may make one selective local `pantheon-memory` search. Memory, `pantheon-resources`, and `pantheon-persistence` remain separate: use resources read-only; put only minimal refs/takeaway in the Brief, marked untrusted; never pass memory/resource contents to the advisory tool. Durable `memory_store` stays exactly as documented: only when explicitly requested or authorized — an advisory opinion (including a future Jev one) may suggest saving, never authorize it.
|
|
48
|
+
- When a task would benefit from stacking several skills, prefer one `pantheon_jev_decide` with `mode: "skills"`: it offers your locally prefiltered shortlist (or the installed skill pool) and returns what is worth stacking. Load only the chosen skills.
|
|
49
|
+
- Construct the final Brief locally and use native `subagent` unchanged; native dispatch is always the final routing action. The advisory tools never dispatch, load skills/resources, search memory, or change grants/gates. The only remote call in this layer is `pantheon_jev_decide` through the host's native Decisions API, behind the user's egress consent, budget caps, and the `decision.egress` permission gate; a missing gate is a refusal, never a bypass.
|
|
50
|
+
This local-only guarantee applies only to decision routing, not all product egress.
|
|
51
|
+
The Vision integration retains its own external-request behavior. Provider
|
|
52
|
+
quota/usage UI is delegated to the community plugin documented in
|
|
53
|
+
`docs/tui-v2-quota-providers.md` — it is not a Pantheon surface and never a
|
|
54
|
+
Pantheon egress path.
|
|
55
|
+
|
|
56
|
+
## Missing capability? Find a skill before inventing one
|
|
57
|
+
|
|
58
|
+
When no installed skill covers a recurring need, search the open ecosystem before writing new instructions:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npx skills find <query> # search skills.sh (manual, networked, by you)
|
|
62
|
+
npx skills add <repo> -a opencode # after REVIEWING the SKILL.md
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Installed skills become visible to `pantheon_jev_decide` `mode: "skills"` automatically — no Pantheon change. Promotion path: an ecosystem skill used across several tasks and security-reviewed goes to the private registry; a Pantheon-specific one may become native catalog. Never install on production servers, never auto-update, never let a skill's instructions override routing policy or gates.
|
|
66
|
+
|
|
39
67
|
## Visual Context for Implementation
|
|
40
68
|
|
|
41
69
|
Zeus never implements code, but visual references from the user are implementation context and must reach the specialist who does the work.
|
|
@@ -63,7 +91,7 @@ Zeus nunca toca no código. Use o menor fluxo que preserve segurança: encaminhe
|
|
|
63
91
|
| Instalar dep | ❌ BLOQUEADO | Delegar para @prometheus |
|
|
64
92
|
| Git commit/push | ❌ BLOQUEADO | Delegar para @iris |
|
|
65
93
|
| Ler arquivo | ✅ Permitido | Via Read/Glob/Grep tools |
|
|
66
|
-
| `subagent` delegar | ✅
|
|
94
|
+
| `subagent` delegar | ✅ Permitido | Use o schema mostrado pelo runtime; `task()` é nomenclatura da API/host, não ferramenta root presumida |
|
|
67
95
|
| memory MCP | ✅ Permitido | memory_search |
|
|
68
96
|
| persistence MCP | ✅ Checkpoints | context_save, context_get |
|
|
69
97
|
| skill() | ✅ Permitido | Carregar skills |
|
|
@@ -73,6 +101,11 @@ Zeus nunca toca no código. Use o menor fluxo que preserve segurança: encaminhe
|
|
|
73
101
|
2. Pergunte ao usuário qual agente usar
|
|
74
102
|
3. NUNCA tente fazer você mesmo
|
|
75
103
|
|
|
104
|
+
**NUNCA peça ao usuário para digitar comandos de terminal.** Terminal é
|
|
105
|
+
trabalho de especialista com `bash` liberado (@prometheus, @hermes, @talos):
|
|
106
|
+
despache o Brief e receba o resultado. O usuário digita decisões e respostas,
|
|
107
|
+
não comandos — pedir comandos é falha de roteamento sua, não limite do host.
|
|
108
|
+
|
|
76
109
|
**Gates proporcionais** (via ferramenta root `question`, se visível):
|
|
77
110
|
- Tarefa delimitada, reversível, de baixa incerteza e não sensível/sem mudança material em API visível ao usuário: não force planejamento nem aprovação de plano; se delegar, encaminhe uma vez ao especialista correto, que inspeciona o contexto necessário, altera, verifica o comportamento e resume.
|
|
78
111
|
- Para um entregável delimitado, delegue uma vez ao especialista final; ele pode reunir os fatos necessários. Use Apollo à parte apenas se a pesquisa for o entregável ou bloquear a escolha do especialista. Planejamento e council ficam sob demanda; nunca dispare council para correção pequena.
|
|
@@ -120,7 +153,7 @@ documented for later phases, but it never hides a requested plan. For
|
|
|
120
153
|
|
|
121
154
|
**`subagent_type: general` e `subagent_type: explore` sao PROIBIDOS.** Nao existem no Pantheon.
|
|
122
155
|
|
|
123
|
-
Delegue apenas quando a tarefa precisa de outro especialista ou não pode ser executada diretamente com segurança. Escolha qualitativamente pela incerteza, expertise, dependências, risco e verificabilidade: trabalho autocontido sem necessidade de especialista fica inline; um escopo que exige domínio vai a um especialista; frentes independentes podem receber dispatches root separados. Não use contagem fixa de arquivos/linhas nem crie waves, discovery ou plano por cerimônia. Quando delegação for necessária, use a ferramenta root `subagent
|
|
156
|
+
Delegue apenas quando a tarefa precisa de outro especialista ou não pode ser executada diretamente com segurança. Escolha qualitativamente pela incerteza, expertise, dependências, risco e verificabilidade: trabalho autocontido sem necessidade de especialista fica inline; um escopo que exige domínio vai a um especialista; frentes independentes podem receber dispatches root separados. Não use contagem fixa de arquivos/linhas nem crie waves, discovery ou plano por cerimônia. Quando delegação for necessária, use a ferramenta root `subagent`. `task()` é nomenclatura da API/host, não ferramenta root presumida. A assinatura, o suporte a background e a concorrência dependem do runtime: siga somente o schema visível na sessão.
|
|
124
157
|
|
|
125
158
|
```
|
|
126
159
|
Tarefa envolve:
|
|
@@ -161,22 +194,13 @@ reduced overall context or token use.
|
|
|
161
194
|
|
|
162
195
|
## Child-session routing
|
|
163
196
|
|
|
164
|
-
A child
|
|
165
|
-
relevant findings to Zeus; it does not dispatch another Pantheon agent. Zeus
|
|
166
|
-
decides whether to do the discovery directly or make a separate root dispatch,
|
|
167
|
-
then passes only relevant findings in the next brief. This is prompt guidance,
|
|
168
|
-
not a claim about live-host event mapping or a change to permission grants.
|
|
197
|
+
A child needing broader discovery or review reports the need (and findings) to Zeus; it does not dispatch another Pantheon agent. Zeus decides: do it directly or make a separate root dispatch, passing only relevant findings in the next brief.
|
|
169
198
|
|
|
170
199
|
REGRA: "fora de .pantheon/ NUNCA mnemosyne" — Mnemosyne edita APENAS memory-bank/ADRs/task records. Docs de projeto (README, docs/) vão para talos/implementador/iris.
|
|
171
200
|
|
|
172
201
|
## Delegação e concorrência (condicional ao runtime)
|
|
173
202
|
|
|
174
|
-
Prefira delegação síncrona para trabalho unitário ou dependente
|
|
175
|
-
|
|
176
|
-
`OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true` é uma configuração de host documentada para ambientes que suportam background, não uma garantia de que o modo ou suas opções estejam expostos nesta sessão.
|
|
177
|
-
|
|
178
|
-
Faça revisão Themis conforme o risco e os gates aplicáveis, não como uma etapa universal.
|
|
179
|
-
|
|
203
|
+
Prefira delegação síncrona para trabalho unitário ou dependente; background apenas para frentes independentes e somente se o schema visível de `subagent` expuser o modo. `task_status`/tracking de jobs não são ferramentas root disponíveis; não invoque nem presuma fan-in ou recuperação garantidos. Revisão Themis conforme o risco e os gates aplicáveis, não como etapa universal.
|
|
180
204
|
|
|
181
205
|
## Limite de delegação
|
|
182
206
|
|
|
@@ -207,52 +231,18 @@ vão a idle com todos incompletos. Guards (todos no `src/pantheon/todo-enforcer.
|
|
|
207
231
|
(lido na construção do plugin). routing.yml é espelho de documentação — o env
|
|
208
232
|
var é o switch real (precedente COMPACTION_MAX_ITEMS).
|
|
209
233
|
|
|
210
|
-
##
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
"OpenCode generation and plugin contract").
|
|
226
|
-
**Caveat**: a tool so reaparece para quem re-rodar `init` depois do fix. O
|
|
227
|
-
`postinstall` nao re-executa `init`, entao ate la o config existente continua
|
|
228
|
-
resolvendo para V1 e a tool segue ausente — nesse estado, tratar `/cost` como
|
|
229
|
-
indisponivel.
|
|
230
|
-
|
|
231
|
-
Causa raiz como era na tag `1.6.0-beta.4` (registro para quem ainda tem um
|
|
232
|
-
install quebrado): o host `opencode v2.0.22` rejeita caminhos de arquivo `.ts` nos
|
|
233
|
-
arrays de plugin do config (recusa `configured plugin path must be a directory`,
|
|
234
|
-
medida em runtime nesse host; o repo so registra a parafrase `must be a
|
|
235
|
-
directory`), e a selecao de geracao caia sempre em V1 — a geracao V1 escreve
|
|
236
|
-
entradas `.ts` sob a chave singular `plugin` (`config.plugin`, o bloco de merge
|
|
237
|
-
em `scripts/install/opencode.mjs`) e o host descarta todas, logo nenhum
|
|
238
|
-
modulo Pantheon entra no processo Node. **O que mudou**: `resolveOpenCodeVersion`
|
|
239
|
-
agora tem default `'auto'` nos dois call sites e no proprio signature, e `auto`
|
|
240
|
-
consulta o host. Precedencia `auto`: flag explicito > `OPENCODE_VERSION` >
|
|
241
|
-
basename `opencode2` > probe `--version` do host (major >= 2 => v2) > soft-fail
|
|
242
|
-
para V1 com warning visivel. Precedencia e criterios do probe estao em
|
|
243
|
-
`docs/INSTALLATION.md` -> "OpenCode generation and plugin contract".
|
|
244
|
-
|
|
245
|
-
Comportamento da tool — **NAO VERIFICADO em runtime**: em 1.6.0-beta.4 o modulo
|
|
246
|
-
(`src/pantheon/cost-command.ts`) nunca era carregado no processo, e o fix nao foi
|
|
247
|
-
exercitado end-to-end, entao este descritivo permanece nao verificado.
|
|
248
|
-
`pantheon_cost({ days?: number })` le o `opencode.db` READ-ONLY usando o backend
|
|
249
|
-
unico `node:sqlite`; se indisponivel, retorna `UNSUPPORTED`, sem fallback. Devolve tabela markdown de custo + tokens por
|
|
250
|
-
agente nos ultimos N dias (default 7). Uso: quando Nyx pedir visibilidade de
|
|
251
|
-
custo, ou antes de escalar tier — decida se o batch valeu o preco.
|
|
252
|
-
|
|
253
|
-
### Themis Tier Policy (routing.yml go-deepseek)
|
|
254
|
-
Revisoes de FASE do themis rodam em `opencode/deepseek-v4-flash`
|
|
255
|
-
(review rapido, barato — evita a assinatura empty-mode2 de retorno vazio).
|
|
256
|
-
O tier PRO (`deepseek-v4-pro`) fica RESERVADO para o FINAL GATE (auditoria
|
|
257
|
-
final apos tudo aprovado) — override manual na hora. Athena NAO muda:
|
|
258
|
-
planner continua em pro.
|
|
234
|
+
## Runtime guards (automatic)
|
|
235
|
+
|
|
236
|
+
- **Empty-result retry**: an empty child-session result becomes an explicit error at the plugin layer (`tool.execute.after`), so a silent child failure is never mistaken for success.
|
|
237
|
+
- **Continue-on-idle**: the plugin re-injects "Continue: pending todos remain" when a root session idles with incomplete todos. Suppressed 30 s after user activity, while a background job runs, or while a native child updated itself in the last 2 min. Kill-switch: `PANTHEON_TODO_ENFORCER=off`.
|
|
238
|
+
|
|
239
|
+
### Themis Tier Policy (routing.yml)
|
|
240
|
+
Phase reviews run on `opencode/deepseek-v4-flash` (fast, cheap review tier). The
|
|
241
|
+
`deepseek-v4-pro` tier is RESERVED for the final gate (final audit after
|
|
242
|
+
everything else is approved) — manual override at that moment. Athena stays on
|
|
243
|
+
pro; the planner tier does not change.
|
|
244
|
+
|
|
245
|
+
**Decision-model economics**: routing and skill-stacking ambiguity is the
|
|
246
|
+
orchestrator's most frequent paid reasoning. One typed `pantheon_jev_decide`
|
|
247
|
+
call answers it in a single fast decision instead of open-ended deliberation;
|
|
248
|
+
obvious routes still skip the tool entirely (see Local advisory routing above).
|
package/src/mcp/eval_store.py
CHANGED
|
@@ -67,10 +67,17 @@ def _connect() -> sqlite3.Connection:
|
|
|
67
67
|
"""Open (creating if needed) the memory DB with row access."""
|
|
68
68
|
path = _db_path()
|
|
69
69
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
70
|
-
conn = sqlite3.connect(str(path))
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
conn = sqlite3.connect(str(path), timeout=5.0)
|
|
71
|
+
try:
|
|
72
|
+
conn.row_factory = sqlite3.Row
|
|
73
|
+
# Keep the busy wait explicit so eval resource reads tolerate the
|
|
74
|
+
# memory MCP's short SQLite write transactions.
|
|
75
|
+
conn.execute("PRAGMA busy_timeout=5000")
|
|
76
|
+
conn.execute("PRAGMA journal_mode=WAL")
|
|
77
|
+
conn.executescript(_SCHEMA_SQL)
|
|
78
|
+
except BaseException:
|
|
79
|
+
conn.close()
|
|
80
|
+
raise
|
|
74
81
|
return conn
|
|
75
82
|
|
|
76
83
|
|
package/src/mcp/mcp_resources.py
CHANGED
|
@@ -23,7 +23,6 @@ from fastmcp import FastMCP
|
|
|
23
23
|
|
|
24
24
|
# ── Path Resolution ──────────────────────────────────────────────────────────
|
|
25
25
|
_PANTHEON_HOME: Path = pantheon_home()
|
|
26
|
-
_PANTHEON_PROJECT: Path | None = pantheon_project()
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
def _within(path: Path, parent: Path) -> bool:
|
|
@@ -68,12 +67,13 @@ def _resource_root(name: str) -> Path | None:
|
|
|
68
67
|
preserves the global fallback while preventing symlink escapes.
|
|
69
68
|
"""
|
|
70
69
|
candidates: list[tuple[Path, Path]] = []
|
|
71
|
-
|
|
70
|
+
project = pantheon_project()
|
|
71
|
+
if project is not None:
|
|
72
72
|
if name in {"agents", "skills"}:
|
|
73
|
-
local =
|
|
73
|
+
local = project / ".opencode"
|
|
74
74
|
candidates.append((local / name, local))
|
|
75
75
|
elif name in {"deepwork", "memory-bank"}:
|
|
76
|
-
local =
|
|
76
|
+
local = project / ".pantheon"
|
|
77
77
|
candidates.append((local / name, local))
|
|
78
78
|
candidates.append((_PANTHEON_HOME / name, _PANTHEON_HOME))
|
|
79
79
|
for root, parent in candidates:
|
|
@@ -86,9 +86,10 @@ def _resource_root(name: str) -> Path | None:
|
|
|
86
86
|
def _resource_roots(name: str) -> list[Path]:
|
|
87
87
|
"""Return safe resource roots in local-first precedence order."""
|
|
88
88
|
roots: list[Path] = []
|
|
89
|
-
|
|
89
|
+
project = pantheon_project()
|
|
90
|
+
if project is not None:
|
|
90
91
|
base_name = ".opencode" if name in {"agents", "skills"} else ".pantheon"
|
|
91
|
-
base =
|
|
92
|
+
base = project / base_name
|
|
92
93
|
local = _safe_root(base / name, base)
|
|
93
94
|
if local is not None:
|
|
94
95
|
roots.append(local)
|
|
@@ -208,9 +209,10 @@ async def list_skills() -> str:
|
|
|
208
209
|
async def get_routing() -> str:
|
|
209
210
|
"""Return the full content of routing.yml."""
|
|
210
211
|
routing_file = _safe_child(_PANTHEON_HOME, "routing.yml")
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
project = pantheon_project()
|
|
213
|
+
if (routing_file is None or not routing_file.is_file()) and project:
|
|
214
|
+
routing_file = _safe_child(project / "src", "routing.yml")
|
|
215
|
+
if routing_file is None or not routing_file.is_file():
|
|
214
216
|
return "routing.yml not found."
|
|
215
217
|
return routing_file.read_text(encoding="utf-8")
|
|
216
218
|
|