pantheon-opencode 1.5.0-beta.2 → 1.5.0-beta.20
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/.pantheon/code-mode/manifest.json +21 -0
- package/AGENTS.md +14 -63
- package/CHANGELOG.md +1260 -0
- package/README.md +162 -23
- package/README.pt-BR.md +104 -19
- package/bin/pantheon-init.mjs +178 -21
- package/commands/pantheon.md +1 -35
- package/package.json +23 -15
- package/plugin.json +1 -1
- package/pyproject.toml +62 -0
- package/scripts/code_mode_server.py +431 -55
- package/scripts/doctor.mjs +207 -9
- package/scripts/install/cli-ui.mjs +17 -11
- package/scripts/install/config-migration.mjs +4 -6
- package/scripts/install/opencode.mjs +137 -35
- package/scripts/install/plugin.mjs +12 -45
- package/scripts/install/shared.mjs +43 -2
- package/scripts/install/strings.mjs +129 -0
- package/scripts/install-mcp.mjs +1 -0
- package/scripts/manifest-inventory.mjs +410 -0
- package/scripts/mcp_persistence_server.py +536 -164
- package/scripts/package-evidence.mjs +242 -0
- package/scripts/probe-pantheon-cost.mjs +10 -1
- package/scripts/release-beta-version.mjs +56 -60
- package/scripts/sync-artifacts.mjs +169 -0
- package/scripts/sync-tui.mjs +129 -64
- package/scripts/test-opencode-v1-v2-sandbox.sh +79 -161
- package/scripts/validation-policy.mjs +7 -7
- package/scripts/version-check.mjs +113 -108
- package/scripts/versioning.mjs +230 -86
- package/src/agents/apollo.md +1 -0
- package/src/agents/gaia.md +1 -0
- package/src/agents/mnemosyne.md +1 -1
- package/src/agents/zeus.md +11 -54
- package/src/instructions/memory-protocol.instructions.md +6 -3
- package/src/instructions/zeus-anti-stall.instructions.md +2 -4
- package/src/instructions/zeus-council-synthesis.instructions.md +3 -28
- package/src/instructions/zeus-timeout-retry.instructions.md +3 -28
- package/src/mcp/code_mode_server.py +431 -55
- package/src/mcp/mcp_persistence_server.py +536 -164
- package/src/mcp/toon_codec.py +2 -4
- package/src/pantheon/background-job-board.ts +47 -5
- package/src/pantheon/{delegation-compaction.ts → compaction-context.ts} +10 -100
- package/src/pantheon/cost-command.ts +309 -44
- package/src/pantheon/delegation-enforce.ts +59 -14
- package/src/pantheon/file-persistence-salvage.ts +64 -0
- package/src/pantheon/file-persistence.ts +194 -45
- package/src/pantheon/goal-loop.ts +1 -1
- package/src/pantheon/goal-store.ts +1 -1
- package/src/pantheon/idle-continuation.ts +4 -6
- package/src/pantheon/model-command.ts +1 -2
- package/src/pantheon/native-task-status.ts +139 -0
- package/src/pantheon/presets.d.mts +0 -20
- package/src/pantheon/presets.mjs +0 -64
- package/src/pantheon/session-guard.ts +2 -2
- package/src/pantheon/session-id.ts +30 -0
- package/src/pantheon/shared-board.ts +37 -0
- package/src/pantheon/task-result-guard.ts +106 -0
- package/src/pantheon/todo-enforcer.ts +3 -3
- package/src/pantheon/tool-ceiling.ts +159 -0
- package/src/pantheon/tool-context.ts +23 -0
- package/src/pantheon/v2-bridge.ts +1 -4
- package/src/plugin-v2.ts +8 -21
- package/src/plugin.ts +83 -251
- package/src/plugins/pantheon-hooks.ts +51 -0
- package/src/plugins/tui/dist/server.d.ts +1 -1
- package/src/plugins/tui/dist/server.d.ts.map +1 -1
- package/src/plugins/tui/dist/server.js +1 -1
- package/src/plugins/tui/dist/server.js.map +1 -1
- package/src/plugins/tui/dist/tui.d.ts +261 -77
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +640 -234
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +2 -2
- package/src/plugins/tui/src/index.tsx +872 -226
- package/src/routing.yml +0 -16
- package/src/skills/context-compression/SKILL.md +1 -1
- package/scripts/generate-preset-docs.mjs +0 -300
- package/scripts/generate-prompts.sh +0 -222
- package/scripts/hash_verify.py +0 -192
- package/scripts/install/component.mjs +0 -24
- package/scripts/install/migrate-config.mjs +0 -302
- package/scripts/test-context-compression.sh +0 -169
- package/src/pantheon/auto-wake.ts +0 -89
- package/src/pantheon/chat-reminders.ts +0 -9
- package/src/pantheon/comment-checker.ts +0 -48
- package/src/pantheon/compaction-assert.ts +0 -160
- package/src/pantheon/cost-tracker.ts +0 -108
- package/src/pantheon/delegate-manager.ts +0 -669
- package/src/pantheon/delegation-classifier.ts +0 -307
- package/src/pantheon/delegation-finalize.ts +0 -374
- package/src/pantheon/delegation-notify.ts +0 -212
- package/src/pantheon/delegation-toast.ts +0 -73
- package/src/pantheon/delegation.ts +0 -1120
- package/src/pantheon/dispatch-guard.ts +0 -109
- package/src/pantheon/permission-eval.ts +0 -284
- package/src/pantheon/preemptive-compact.ts +0 -76
- package/src/pantheon/retry-policy.ts +0 -212
- package/src/pantheon/step-cap.ts +0 -110
- package/src/pantheon/token-opt.ts +0 -781
- package/src/pantheon/toon-codec.ts +0 -481
- package/src/pantheon/v2-events.ts +0 -131
- package/src/pantheon/v2-hooks.ts +0 -287
- package/src/pantheon/v2-tool-definitions.ts +0 -331
- package/src/pantheon/zeus-delegate-with-retry.ts +0 -406
- package/src/plugins/tui/dist/tui.tsx +0 -2605
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"scripts": {
|
|
4
|
+
"checkpoint-session.py": "b70f6667ba287622d6353ada2612c7f2fb70d4ee170d456ecd7ee2b6ead891aa",
|
|
5
|
+
"checkpoint-session.sh": "5b07e7c6c309e1db5c63f1f409eeb300a446bb9598899d94fdb13d94b56eb5f1",
|
|
6
|
+
"checkpoint_session.py": "8c52919eae450147742553f11faa347644c9e79f7acffa2fcc4452a5ed294a0a",
|
|
7
|
+
"compress-inline.py": "d3185cef07ff8b57d5a98d6c06a5b71504186ad2112fdb5a1ff48b0214d9cd3c",
|
|
8
|
+
"eval-llm-judge.py": "6d25df589c0f6cffa4766d0ad8eb86ac958960bc8c0f59e93098c7bf8effbbe8",
|
|
9
|
+
"eval-monte-carlo.py": "64c5eba9b072bec1f3eb713654da7edb9df46041395fdc4cb65730720135f8b1",
|
|
10
|
+
"eval-run.py": "5abfdac7d67d66838dd7ee402383e205ae39c0d912deb8a3a9a9a9c4d05952f5",
|
|
11
|
+
"eval-static.py": "33573295cf82a3c98e5f4c230ac376a40d1286ac16ff3aa031987396cde083b5",
|
|
12
|
+
"example-sync.sh": "7fce84c8dc5a9d25d441a4cb59549a2731910e72d6ef82df45ac5ca6ea66c729",
|
|
13
|
+
"session-end-save.py": "11088a722642d022e5e2ebad78292db4aa4803087b32e261b6eb069e9b991c48",
|
|
14
|
+
"session-end-save.sh": "5fb410143bf62ed7d7c912805b00ae79171127b1b8ff0825db0eb4bf03b595a8",
|
|
15
|
+
"test-allowed.sh": "723b116490044ffb403092c74b6bb94ee37330fecf453241f4cca22977ae8cdf",
|
|
16
|
+
"test-auto-continue-checkpoint.sh": "de2641a4da0f26e9653f320d44763e5b5ed698cf9c701c103c5c82f91175376f",
|
|
17
|
+
"test-env.sh": "6ea48a044451e5938e28fcb709368a7249a7d1b42615b190e40682ad26d4d1f9",
|
|
18
|
+
"test-prlimit.sh": "a82bca59d3c7a8b7c2b273622dc89762bd6a02e155629567a6c5b9aab4b92761",
|
|
19
|
+
"test-timeout.sh": "55d8b580983c2b4b27cad7d1c0ae1ba0c238ae53d2114b14c6b236b421c8ba6d"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/AGENTS.md
CHANGED
|
@@ -301,7 +301,9 @@ memory_store({
|
|
|
301
301
|
agreements: ["point1", "point2"],
|
|
302
302
|
divergences: [{"issue": "...", "resolution": "..."}],
|
|
303
303
|
response_rate: "X of Y",
|
|
304
|
-
themis_audit: "approved|issues"
|
|
304
|
+
themis_audit: "approved|issues",
|
|
305
|
+
precedent_used: false,
|
|
306
|
+
timestamp: "<ISO-8601>"
|
|
305
307
|
},
|
|
306
308
|
metadata: {
|
|
307
309
|
type: "council_decision",
|
|
@@ -310,6 +312,7 @@ memory_store({
|
|
|
310
312
|
}
|
|
311
313
|
})
|
|
312
314
|
```
|
|
315
|
+
`value` is JSON-serialized before storing (the MCP `memory_store.value` argument is a string).
|
|
313
316
|
|
|
314
317
|
### Read Path (Precedent Fast-Path)
|
|
315
318
|
Before dispatching a new council, Zeus runs:
|
|
@@ -320,8 +323,8 @@ memory_search(question, top_k=2, namespace="council_decisions")
|
|
|
320
323
|
Result interpretation:
|
|
321
324
|
| Score | Age | Action |
|
|
322
325
|
|-------|-----|--------|
|
|
323
|
-
| > 0.85 | < 30 days | Return precedent as fast-path answer. Skip council dispatch entirely. |
|
|
324
|
-
| > 0.85 | >= 30 days | Return with warning "Reavaliar se contexto mudou" + proceed with council |
|
|
326
|
+
| > 0.85 | < 30 days | Return precedent verbatim (note "⚠️ Decisão de [data] — reavaliar se contexto mudou") as fast-path answer. Skip council dispatch entirely. |
|
|
327
|
+
| > 0.85 | >= 30 days | Return with warning "Reavaliar se contexto mudou — decisão tem mais de 30 dias" + proceed with council |
|
|
325
328
|
| 0.5 - 0.85 | Any | Include as context for specialists but still dispatch council |
|
|
326
329
|
| < 0.5 | Any | Ignore, proceed with fresh council |
|
|
327
330
|
|
|
@@ -371,7 +374,7 @@ You MUST self-monitor for these stall conditions:
|
|
|
371
374
|
| Symptom | Detection Rule | Recovery Action |
|
|
372
375
|
|---------|---------------|-----------------|
|
|
373
376
|
| Silent loop | 3+ consecutive turns with no tool call AND no visible progress | Output `[STALL_DETECTED]` and re-read your task definition. If still stuck, escalate to user with: "I appear to be stuck on [task]. Options: (1) retry with different approach, (2) delegate to specialist, (3) simplify scope." |
|
|
374
|
-
| Delegation black hole | Agent dispatched but no response after 2x the timeout from routing.yml | Log the hang, cancel via `cancel_task`,
|
|
377
|
+
| Delegation black hole | Agent dispatched but no response after 2x the timeout from routing.yml | Log the hang, cancel via `cancel_task`, then follow the fallback chain in `## ⏱️ Timeout & Retry Enforcement` |
|
|
375
378
|
| Circular delegation | Same specialist re-dispatched for same task 2+ times without progress | Break cycle: dispatch to different specialist OR escalate to user |
|
|
376
379
|
| Idle after completion | All background tasks completed but no synthesis/next step for 2+ turns | Force synthesis: summarize all completed results and propose next action |
|
|
377
380
|
| Context thrash | Re-reading same files repeatedly without new action | Stop re-reading. State: "Already have context on [file]. Proceeding with [action]." |
|
|
@@ -397,9 +400,7 @@ When a delegation fails (timeout, empty response, error):
|
|
|
397
400
|
|
|
398
401
|
2. **Retry ONCE** with rephrased prompt — add: "Previous attempt failed with: [error]. Adjusted approach: [what changed]."
|
|
399
402
|
|
|
400
|
-
3. **If retry also fails** →
|
|
401
|
-
- Dispatch to fallback agent (from routing.yml)
|
|
402
|
-
- If no fallback, escalate to user with: "Task [X] failed after retry. Options: (a) simplify, (b) different agent, (c) manual intervention."
|
|
403
|
+
3. **If retry also fails** → do NOT retry blindly; follow the fallback chain and escalation protocol in `## ⏱️ Timeout & Retry Enforcement`.
|
|
403
404
|
|
|
404
405
|
## Progress Checkpoint
|
|
405
406
|
|
|
@@ -564,10 +565,7 @@ sequenceDiagram
|
|
|
564
565
|
## Dispatch Sequence (9-Step Protocol)
|
|
565
566
|
|
|
566
567
|
### Step 0 — Precedent Fast-Path (Fase 1)
|
|
567
|
-
|
|
568
|
-
- Score > 0.85 AND age < 30 days → return precedent verbatim with note "⚠️ Decisão de [data] — reavaliar se contexto mudou". SKIP entire dispatch.
|
|
569
|
-
- Score > 0.85 AND age > 30 days → return precedent with ⚠️ "Reavaliar se contexto mudou — decisão tem mais de 30 dias"
|
|
570
|
-
- Else → proceed to Step 0b
|
|
568
|
+
Run the precedent read path defined in `## Memory Protocol > Council Decisions Namespace` (`memory_search(query, top_k=2, namespace="council_decisions")`). If no precedent applies, proceed to Step 0b.
|
|
571
569
|
|
|
572
570
|
### Step 0b — Apollo Pre-Scan (Fase 2, --research flag)
|
|
573
571
|
If `/pantheon --research <question>`: dispatch @apollo with 30s timeout. Inject findings as `shared_context` into ALL specialist prompts. Skip if flag absent.
|
|
@@ -669,33 +667,11 @@ task(subagent_type: "themis", prompt: "Audit this council synthesis for fidelity
|
|
|
669
667
|
- If issues → fix each issue before delivering to user
|
|
670
668
|
|
|
671
669
|
### Step 9 — Persist & Reconcile (Fase 1)
|
|
672
|
-
|
|
673
|
-
memory_store({
|
|
674
|
-
namespace: "council_decisions",
|
|
675
|
-
key: "council:<yyyy-mm-dd>:<slug>",
|
|
676
|
-
value: JSON.stringify({
|
|
677
|
-
question, specialists, recommendation, confidence,
|
|
678
|
-
agreements, divergences, precedent_used, timestamp
|
|
679
|
-
}),
|
|
680
|
-
metadata: {type: "council_decision", specialist_count: N}
|
|
681
|
-
})
|
|
682
|
-
board.markReconciled("<task-id>")
|
|
683
|
-
```
|
|
670
|
+
Persist the decision using the write path in `## Memory Protocol > Council Decisions Namespace`, then `board.markReconciled("<task-id>")`.
|
|
684
671
|
|
|
685
672
|
## Specialist Output Format (Fase 1 — machine-parseable structured fields)
|
|
686
673
|
|
|
687
|
-
Specialists MUST return
|
|
688
|
-
|
|
689
|
-
```
|
|
690
|
-
## specialist_response
|
|
691
|
-
**position:** <clear one-sentence position>
|
|
692
|
-
**reasoning:** <2-4 sentences>
|
|
693
|
-
**trade_offs:** <what's gained vs lost>
|
|
694
|
-
**risks:** <what could go wrong>
|
|
695
|
-
**confidence:** High | Medium | Low
|
|
696
|
-
**agreement_signals:** agree: @agent1, @agent2 on [issue] | disagree: @agent3 on [issue]
|
|
697
|
-
**specific_claims:** <count of specific factual claims in response>
|
|
698
|
-
```
|
|
674
|
+
Specialists MUST return the structured `## specialist_response` format (position, reasoning, trade_offs, risks, confidence, agreement_signals, specific_claims) defined in `## Agent Return Format > Council Specialist Response Format`.
|
|
699
675
|
|
|
700
676
|
## Domain-to-Specialist Mapping
|
|
701
677
|
|
|
@@ -928,39 +904,14 @@ ANY NO → full task (IMPL artifact + Themis review mandatory)
|
|
|
928
904
|
3. **No Themis dependency** — output doesn't feed into a phase that requires review
|
|
929
905
|
|
|
930
906
|
## Subtask Return Format
|
|
931
|
-
|
|
932
|
-
```
|
|
933
|
-
## subtask_summary
|
|
934
|
-
**files_changed:** [paths]
|
|
935
|
-
**summary:** What was done
|
|
936
|
-
**tests:** ✅ or N/A
|
|
937
|
-
**status:** complete | partial | escalated
|
|
938
|
-
```
|
|
907
|
+
Return the standard `## subtask_summary` defined in `## Agent Return Format` (files_changed, summary, tests, coverage, tokens, status, blockers).
|
|
939
908
|
|
|
940
909
|
## Timeout Parcial (Partial Results)
|
|
941
910
|
|
|
942
|
-
Timeout
|
|
943
|
-
- ✅ @apollo — can return partial file list ("found 7 of 12 files before timeout")
|
|
944
|
-
- ✅ @gaia — can return partial literature findings
|
|
945
|
-
|
|
946
|
-
- ✅ @talos — can confirm progress if hotfix times out
|
|
947
|
-
- ❌ Never for implementers or reviewers — must complete or fail
|
|
948
|
-
|
|
949
|
-
When dispatching with partial-OK, set expectation:
|
|
950
|
-
```
|
|
951
|
-
@apollo Search for auth files. Timeout parcial OK — return whatever you have.
|
|
952
|
-
```
|
|
911
|
+
Only agents marked ✅ in the Timeout Behavior table above may return partial results: @apollo (partial file list, e.g. "found 7 of 12 files before timeout"), @gaia (partial literature findings) and @talos (confirm progress if a hotfix times out). Never for implementers or reviewers — they must complete or fail. When dispatching with partial-OK, set the expectation: `@apollo Search for auth files. Timeout parcial OK — return whatever you have.`
|
|
953
912
|
|
|
954
913
|
---
|
|
955
914
|
|
|
956
915
|
# 📊 TIMEOUT TRACKING
|
|
957
916
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
| Agent | Timeout | Status | Partial OK? |
|
|
961
|
-
|-------|---------|--------|-------------|
|
|
962
|
-
| @apollo | 60s | ✅ complete | ✅ |
|
|
963
|
-
| @hermes | 180s | ⏳ in progress | ❌ |
|
|
964
|
-
| @themis | 120s | ⏳ in progress | ❌ |
|
|
965
|
-
|
|
966
|
-
Log timeouts to `/memories/session/timeout-log.md` for later analysis.
|
|
917
|
+
Track in-flight delegations against the Timeout Behavior table above. Log timeouts to `/memories/session/timeout-log.md` for later analysis.
|