pantheon-opencode 1.6.0-beta.1 → 1.6.0-beta.11
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 +206 -0
- package/AGENTS.md +10 -891
- package/CHANGELOG.md +350 -0
- package/README.md +561 -52
- package/README.pt-BR.md +285 -20
- package/bin/pantheon-init.mjs +70 -4
- package/commands/pantheon-audit.md +7 -1
- package/commands/pantheon-consolidate.md +1 -1
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-focus.md +17 -0
- package/commands/pantheon-vision.md +61 -12
- package/package.json +24 -17
- package/plugin.json +2 -2
- package/pyproject.toml +8 -6
- package/scripts/build-agents-md.mjs +428 -56
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/{code_mode_server.py → code_mode.py} +3 -3
- package/scripts/cost.mjs +244 -41
- package/scripts/doctor.mjs +151 -1
- package/scripts/install/agents-md.mjs +4 -4
- package/scripts/install/backup.mjs +475 -0
- package/scripts/install/cli-ui.mjs +6 -1
- package/scripts/install/config-migration.mjs +317 -4
- package/scripts/install/exit-codes.mjs +26 -0
- package/scripts/install/health-check.mjs +21 -19
- package/scripts/install/interactive.mjs +16 -2
- package/scripts/install/migrate.mjs +41 -22
- package/scripts/install/opencode-version.mjs +246 -4
- package/scripts/install/opencode.mjs +1175 -215
- package/scripts/install/plan.mjs +287 -0
- package/scripts/install/plugin.mjs +62 -14
- package/scripts/install/shared.mjs +190 -48
- package/scripts/install/strings.mjs +20 -0
- package/scripts/install/venv.mjs +13 -3
- package/scripts/install/vision-prompt.mjs +171 -0
- package/scripts/install-mcp.mjs +28 -9
- package/scripts/{mcp_persistence_server.py → mcp_persistence.py} +52 -17
- package/{src/mcp/mcp_resources_server.py → scripts/mcp_resources.py} +2 -2
- package/scripts/{memory_mcp_server.py → memory_mcp.py} +2 -2
- package/scripts/probe-context-rehydrate.mjs +8 -2
- package/scripts/probe-pantheon-cost.mjs +71 -15
- package/scripts/prune.mjs +9 -3
- package/scripts/restore.mjs +222 -0
- package/scripts/run-node-tests.mjs +189 -0
- package/scripts/sync-artifacts.mjs +26 -13
- package/scripts/sync-tui.mjs +24 -3
- package/scripts/test-opencode-v2-sandbox.sh +180 -26
- package/scripts/validate-routing.mjs +3 -3
- package/scripts/validate-sandbox-install.mjs +138 -0
- package/scripts/versioning.mjs +13 -1
- package/scripts/vision-status.mjs +682 -0
- package/skills-lock.json +8 -8
- package/src/agents/aphrodite.md +20 -37
- package/src/agents/apollo.md +7 -3
- package/src/agents/athena.md +63 -35
- package/src/agents/demeter.md +8 -28
- package/src/agents/gaia.md +1 -1
- package/src/agents/hephaestus.md +10 -21
- package/src/agents/hermes.md +15 -38
- package/src/agents/iris.md +7 -1
- package/src/agents/mnemosyne.md +18 -54
- package/src/agents/nyx.md +1 -1
- package/src/agents/prometheus.md +16 -20
- package/src/agents/talos.md +10 -2
- package/src/agents/themis.md +5 -5
- package/src/agents/zeus.md +99 -172
- package/src/instructions/agent-return-format.instructions.md +34 -17
- package/src/instructions/backend-standards.instructions.md +2 -0
- package/src/instructions/frontend-standards.instructions.md +3 -1
- package/src/instructions/memory-protocol.instructions.md +12 -110
- package/src/instructions/test-economy.instructions.md +21 -0
- package/src/instructions/zeus-anti-stall.instructions.md +20 -67
- package/src/instructions/zeus-communication-rules.instructions.md +0 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +31 -260
- package/src/instructions/zeus-memory-operations.instructions.md +30 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +61 -89
- package/src/mcp/{code_mode_server.py → code_mode.py} +3 -3
- package/src/mcp/eval_store.py +2 -2
- package/src/mcp/{mcp_persistence_server.py → mcp_persistence.py} +52 -17
- package/{scripts/mcp_resources_server.py → src/mcp/mcp_resources.py} +2 -2
- package/src/mcp/{memory_mcp_server.py → memory_mcp.py} +2 -2
- package/src/mcp/{pantheon_vision_server.py → pantheon_vision.py} +286 -42
- package/src/mcp/requirements-mcp.txt +6 -4
- package/src/mcp/requirements-vision.txt +2 -2
- package/src/pantheon/cost-command.ts +403 -102
- package/src/pantheon/delegation-enforce.ts +10 -1
- package/src/pantheon/model-agents.ts +19 -0
- package/src/pantheon/model-command.ts +218 -56
- package/src/pantheon/presets.d.mts +0 -8
- package/src/pantheon/presets.mjs +5 -32
- package/src/pantheon/v2-bounded-read.ts +640 -0
- package/src/pantheon/v2-delegation-enforce.ts +214 -0
- package/src/pantheon/v2-execute-after.ts +186 -0
- package/src/pantheon/v2-model-overrides.ts +275 -0
- package/src/pantheon/v2-tools.ts +418 -0
- package/src/pantheon/v2-unsupported.d.mts +11 -0
- package/src/pantheon/v2-unsupported.mjs +90 -0
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1160 -115
- package/src/plugin-v2.ts +1158 -219
- package/src/plugin.ts +12 -9
- package/src/plugins/tui/dist/server.d.ts +1 -2
- package/src/plugins/tui/dist/server.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.d.ts +154 -0
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -0
- package/src/plugins/tui/dist/tui-v2.js +659 -0
- package/src/plugins/tui/dist/tui-v2.js.map +1 -0
- package/src/plugins/tui/dist/tui.d.ts +85 -82
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +72 -59
- package/src/plugins/tui/index-v2.ts +6 -0
- package/src/plugins/tui/package-lock.json +5516 -1353
- package/src/plugins/tui/package.json +22 -12
- package/src/plugins/tui/src/index-v2.tsx +734 -0
- package/src/plugins/tui/src/index.tsx +106 -85
- package/src/plugins/tui/src/opencode-v2.d.ts +13 -0
- package/src/plugins/tui/tsconfig.build.json +5 -0
- package/src/plugins/tui/tsconfig.typecheck.json +5 -0
- package/src/plugins/tui/tsdown.config.ts +22 -2
- package/src/plugins/tui/tui-v2.ts +2 -0
- package/src/plugins/tui/tui.ts +3 -0
- package/src/routing.yml +11 -21
- package/src/skills/README.md +3 -3
- package/src/skills/agent-coordination/SKILL.md +7 -2
- package/src/skills/artifact-management/SKILL.md +12 -5
- package/src/skills/auto-continue/SKILL.md +52 -35
- package/src/skills/code-review-checklist/SKILL.md +5 -5
- package/src/skills/context-compression/SKILL.md +26 -879
- package/src/skills/session-goal/SKILL.md +14 -5
- package/src/skills/spec-driven-development/SKILL.md +3 -1
- package/src/skills/tdd-with-agents/SKILL.md +18 -10
- package/opencode.json +0 -58
|
@@ -18,16 +18,16 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Risk-Proportional Gates
|
|
22
22
|
|
|
23
23
|
| Gate | Trigger | What happens |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
| **GATE 0 —
|
|
26
|
-
| **GATE 1 — Plan Approval** |
|
|
27
|
-
| **GATE 2 —
|
|
28
|
-
| **GATE 3 — Git
|
|
25
|
+
| **GATE 0 — Explicit Council** | User explicitly invokes council and it returns `AWAITING_APPROVAL` | Stop and follow the approval the council requests; do not launch a council automatically for ordinary implementation. |
|
|
26
|
+
| **GATE 1 — Plan Approval** | A plan was requested or scope/risk makes planning necessary | Ask before implementation only when the plan introduces a material choice or risk; omit this gate for a bounded, clear fix. |
|
|
27
|
+
| **GATE 2 — Risk Review** | Auth/security, data/schema/migration, API contract, production configuration, or other material risk | Themis review and human approval before sensitive or irreversible action. For a trivial, isolated, reversible edit, provide a concise result instead of manufacturing a review phase. |
|
|
28
|
+
| **GATE 3 — Git / External Action** | Commit, push, merge, production deploy, destructive operation, global configuration, or broad permission change | Always stop for explicit human approval. Full-auto never authorizes these actions by implication. |
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
An explicit `AWAITING_APPROVAL` from an invoked council remains a hard stop. Authentication/security and data/schema changes retain their review and approval gates even in full-auto.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -36,32 +36,35 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
36
36
|
**Continue automatically when:**
|
|
37
37
|
- Next todo is a direct consequence of the current one
|
|
38
38
|
- Action is reversible (file edits, tests, linting)
|
|
39
|
-
- Scope is within the
|
|
39
|
+
- Scope is within the user's explicitly authorized task (a prior plan is not required for a small clear fix)
|
|
40
40
|
- No new ambiguity has emerged
|
|
41
41
|
|
|
42
42
|
**Stop and ask when:**
|
|
43
43
|
- A todo requires a decision not covered by the plan
|
|
44
44
|
- An unexpected error changes the approach
|
|
45
45
|
- A dependency is missing or broken
|
|
46
|
-
-
|
|
46
|
+
- Remaining context is too thin to carry the task through — write an explicit handoff instead
|
|
47
|
+
- The task reaches a sensitive gate in the table above; full-auto does not override it
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
### Full-auto Authorization
|
|
50
|
+
|
|
51
|
+
Full-auto may continue only within a task and scope the user explicitly authorized. It may run reversible edits and proportionate verification; it must stop for auth/security, data/schema changes with risk, destructive or global changes, broad permissions, deploy, push, or merge. Never infer permission to expand the scope from a full-auto request.
|
|
49
52
|
|
|
50
53
|
---
|
|
51
54
|
|
|
52
55
|
## Implementation Pattern
|
|
53
56
|
|
|
54
57
|
```
|
|
55
|
-
1. Create
|
|
56
|
-
2.
|
|
57
|
-
3.
|
|
58
|
-
4.
|
|
58
|
+
1. Create a checklist only for multi-step work; a one-step fix needs no todo ceremony
|
|
59
|
+
2. Use native todo operations only when a todo-write tool is visible in the active session; otherwise keep the checklist explicit in the conversation
|
|
60
|
+
3. Mark work complete in the available checklist as soon as it is done
|
|
61
|
+
4. Do not claim that the native todo list was updated when no todo-write tool is exposed
|
|
59
62
|
5. Do NOT ask "should I continue?" between clear steps
|
|
60
|
-
6. Stop at
|
|
63
|
+
6. Stop at any applicable risk gate; do not require a plan/review gate for a low-risk edit
|
|
61
64
|
7. After gate approval, resume with next todo
|
|
62
65
|
```
|
|
63
66
|
|
|
64
|
-
**Never batch-complete
|
|
67
|
+
**Never batch-complete checklist items.** Mark each completed as soon as done; do not imply a tool call occurred unless it did.
|
|
65
68
|
|
|
66
69
|
---
|
|
67
70
|
|
|
@@ -70,7 +73,7 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
70
73
|
- [ ] Previous step completed successfully (tests pass, no errors)
|
|
71
74
|
- [ ] Next step is within approved plan scope
|
|
72
75
|
- [ ] No new blocking issues emerged
|
|
73
|
-
- [ ]
|
|
76
|
+
- [ ] Remaining context can carry the next step, or an explicit handoff will be written
|
|
74
77
|
|
|
75
78
|
---
|
|
76
79
|
|
|
@@ -89,9 +92,9 @@ Phase N complete. Summary:
|
|
|
89
92
|
|
|
90
93
|
### Cooldown Rules
|
|
91
94
|
1. **Between parallel waves (no dependency):** No cooldown needed — wave results are independent
|
|
92
|
-
2. **Between sequential
|
|
93
|
-
3. **After Themis review
|
|
94
|
-
4. **Session reuse check:**
|
|
95
|
+
2. **Between sequential phases:** Summarize when dependencies or risk changed; skip ceremony for one-step work
|
|
96
|
+
3. **After required Themis review:** Reassess findings before continuing
|
|
97
|
+
4. **Session reuse check:** Reuse a prior specialist session only when it reduces real context duplication
|
|
95
98
|
|
|
96
99
|
### Abbreviated Cooldown
|
|
97
100
|
When auto-continuing between sequential non-gated phases, the cooldown is abbreviated to one line:
|
|
@@ -104,6 +107,14 @@ Only expand to full cooldown when hitting a mandatory gate.
|
|
|
104
107
|
|
|
105
108
|
## Timeout & Retry Enforcement
|
|
106
109
|
|
|
110
|
+
Delegate through the root `subagent` tool observed in the Beta 10 runtime. `task()` is
|
|
111
|
+
host/API terminology, not an assumed root tool; call shape and background support are
|
|
112
|
+
runtime-dependent. Prefer synchronous dispatch unless the active schema exposes background
|
|
113
|
+
and the host provides an observable completion notification. Do not assume `task_status`,
|
|
114
|
+
`cancel_task`, or board-based tracking/recovery tools are available. When no completion
|
|
115
|
+
mechanism is observable, use synchronous dispatch or state the limitation; do not claim
|
|
116
|
+
that jobs are being tracked or recovered.
|
|
117
|
+
|
|
107
118
|
When a delegated agent does not respond in time, enforce the timeout policy defined in
|
|
108
119
|
`src/instructions/zeus-timeout-retry.instructions.md`.
|
|
109
120
|
|
|
@@ -125,7 +136,7 @@ When dispatching, set the expectation explicitly:
|
|
|
125
136
|
|
|
126
137
|
### Timeout Tracking Table
|
|
127
138
|
|
|
128
|
-
Maintain
|
|
139
|
+
Maintain an in-context (not persistent/native) checklist of delegations when needed:
|
|
129
140
|
|
|
130
141
|
| Agent | Started | Timeout | Status | Partial OK? |
|
|
131
142
|
|-------|---------|---------|--------|-------------|
|
|
@@ -163,19 +174,25 @@ Should I now run the migration tests? [waiting]
|
|
|
163
174
|
Session state is **not** file-based. It lives in **pantheon-persistence** under the
|
|
164
175
|
`checkpoint:<slug>` namespace and is cleaned up automatically by a 4h TTL.
|
|
165
176
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
Use checkpoints only when `context_save` and `context_get` are explicitly
|
|
178
|
+
present in the active session's tool list. If unavailable, do not attempt a
|
|
179
|
+
checkpoint or guess a session ID; carry the handoff in the normal response.
|
|
180
|
+
|
|
181
|
+
When available, call `context_save` with `content=JSON.stringify(state)` and an
|
|
182
|
+
explicit `session_id`. A successful save needs no immediate `context_get`; read
|
|
183
|
+
only when resuming or when the save result is uncertain. Reuse the same session
|
|
184
|
+
ID so the `latest` pointer survives compaction. `state` must be an object — never pass a bare string as `content`: its
|
|
185
|
+
`goal`/`phase`/`delegations`/`heartbeat` values are objects and `tail` is an array.
|
|
186
|
+
`goal` is optional; when unset, omit the key rather than passing a string placeholder.
|
|
170
187
|
|
|
171
188
|
### Heartbeat Check
|
|
172
|
-
-
|
|
173
|
-
- Write a heartbeat after
|
|
189
|
+
- Check heartbeat only when checkpoint tools are available and the workflow needs a durable resume.
|
|
190
|
+
- Write a heartbeat after anti-stall recovery only when the current session exposes checkpoint tools.
|
|
174
191
|
|
|
175
192
|
### Checkpoint Rules
|
|
176
|
-
1. Save
|
|
177
|
-
2. Include current phase
|
|
178
|
-
3. On resume
|
|
193
|
+
1. Save checkpoints only for long-running/multi-phase work, context-loss risk, or substantive parallel work — not a one-off command or bounded fix
|
|
194
|
+
2. Include current phase and remaining tasks when a checkpoint is warranted
|
|
195
|
+
3. On resume, read the latest checkpoint only with a known session ID; otherwise request the missing handoff context.
|
|
179
196
|
|
|
180
197
|
> Do not create `heartbeat.json`, `checkpoint-<N>.json`, or `session.json` under
|
|
181
198
|
> `.pantheon/deepwork/`. That file-based mechanism is retired — TTL handles cleanup, and reading
|
|
@@ -189,10 +206,10 @@ Configurable gates for different platforms and risk levels:
|
|
|
189
206
|
|
|
190
207
|
| Gate | Default | Auto-Approval Condition |
|
|
191
208
|
|------|---------|------------------------|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
209
|
+
| Council | Only when explicitly invoked | Never auto-start a council for ordinary implementation |
|
|
210
|
+
| Plan approval | Only for requested or risk-required plans | Skip for bounded, clear work |
|
|
211
|
+
| Themis review | Required for sensitive/material changes | May omit for trivial isolated edits; never auto-bypass required findings |
|
|
212
|
+
| Git / external actions | Never Auto | Commit, push, merge, deploy, destructive/global changes require explicit approval |
|
|
196
213
|
| Deploy | Always Ask | N/A — always requires human |
|
|
197
214
|
| Destructive DB Ops | Always Ask | N/A — always requires human |
|
|
198
215
|
|
|
@@ -205,8 +222,8 @@ auto-continue:
|
|
|
205
222
|
idle_stall: 120 # seconds before stall detection
|
|
206
223
|
idle_pause: 300 # seconds before auto-pause
|
|
207
224
|
gates:
|
|
208
|
-
plan_approval:
|
|
209
|
-
themis_review:
|
|
225
|
+
plan_approval: when_required_by_scope_or_risk
|
|
226
|
+
themis_review: required_for_sensitive_or_material_changes
|
|
210
227
|
git_commit: never_auto
|
|
211
228
|
deploy: always_ask
|
|
212
229
|
destructive_ops: always_ask
|
|
@@ -52,11 +52,11 @@ biome check --write --unsafe <files>
|
|
|
52
52
|
- [ ] Proper file sizes (<300 lines)
|
|
53
53
|
|
|
54
54
|
### Testing
|
|
55
|
-
- [ ]
|
|
56
|
-
- [ ]
|
|
57
|
-
- [ ] Integration tests
|
|
58
|
-
- [ ]
|
|
59
|
-
- [ ]
|
|
55
|
+
- [ ] Tests cover the changed behavior where meaningful; documentation/format-only changes do not need invented tests
|
|
56
|
+
- [ ] Apply an explicit repository coverage threshold only when measurable and relevant to the changed code
|
|
57
|
+
- [ ] Integration tests where the change crosses workflow boundaries
|
|
58
|
+
- [ ] Relevant edge cases tested for the changed behavior/risk
|
|
59
|
+
- [ ] Relevant error conditions tested
|
|
60
60
|
|
|
61
61
|
### Security (OWASP Top 10)
|
|
62
62
|
- [ ] Input validation present
|