pantheon-opencode 1.1.1 → 1.2.0-beta.9.7bef03e

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.
Files changed (45) hide show
  1. package/README.md +74 -1
  2. package/bin/pantheon-init.mjs +79 -0
  3. package/commands/pantheon-audit.md +25 -0
  4. package/commands/pantheon-consolidate.md +11 -0
  5. package/commands/pantheon-deepwork.md +79 -0
  6. package/commands/pantheon-optimize.md +79 -0
  7. package/commands/pantheon-vision.md +67 -0
  8. package/commands/pantheon.md +49 -0
  9. package/opencode.json +12 -41
  10. package/package.json +5 -1
  11. package/scripts/doctor.mjs +4 -2
  12. package/scripts/install/health-check.mjs +101 -1
  13. package/scripts/install/model-picker.mjs +118 -0
  14. package/scripts/install/opencode.mjs +98 -17
  15. package/scripts/install-mcp.mjs +98 -13
  16. package/scripts/mcp_persistence_server.py +331 -1
  17. package/scripts/secret-scan.mjs +76 -0
  18. package/scripts/validate-routing.mjs +15 -0
  19. package/src/agents/aphrodite.md +7 -0
  20. package/src/agents/demeter.md +7 -0
  21. package/src/agents/hephaestus.md +7 -0
  22. package/src/agents/hermes.md +7 -0
  23. package/src/agents/zeus.md +31 -18
  24. package/src/instructions/agent-return-format.instructions.md +1 -0
  25. package/src/instructions/zeus-anti-stall.instructions.md +43 -5
  26. package/src/instructions/zeus-timeout-retry.instructions.md +47 -10
  27. package/src/mcp/install-mcp.mjs +6 -913
  28. package/src/mcp/mcp_persistence_server.py +332 -0
  29. package/src/mcp/pantheon_vision_server.py +495 -0
  30. package/src/mcp/requirements-vision.txt +3 -0
  31. package/src/pantheon/auto-wake.ts +91 -0
  32. package/src/pantheon/background-job-board.ts +568 -0
  33. package/src/pantheon/file-persistence.ts +95 -0
  34. package/src/pantheon/presets.d.mts +99 -0
  35. package/src/pantheon/presets.mjs +491 -0
  36. package/src/pantheon/vision.ts +1340 -0
  37. package/src/plugin.ts +40 -25
  38. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  39. package/src/plugins/tui/dist/tui.js +806 -222
  40. package/src/plugins/tui/dist/tui.tsx +866 -121
  41. package/src/plugins/tui/package.json +2 -2
  42. package/src/plugins/tui/src/index.tsx +866 -121
  43. package/src/routing.yml +179 -0
  44. package/commands/pantheon-reflect.md +0 -16
  45. package/commands/pantheon-verify.md +0 -17
@@ -10,24 +10,61 @@ When a delegated agent does not respond in time, enforce the timeout policy from
10
10
 
11
11
  ## Timeout Behavior by Agent Role
12
12
 
13
- | Agent Role | Timeout | Retry Policy | Fallback | Partial Results OK? | Reasoning Effort |
13
+ | Agent Role | Timeout | Retry Policy | Fallback Chain | Partial Results OK? | Reasoning Effort |
14
14
  |------------|---------|-------------|----------|---------------------|------------------|
15
- | Explorer (@apollo) | 60s | 2 retries, exponential backoff | @athena | ✅ Yes | low |
16
- | Implementer (@hermes, @aphrodite, @demeter) | 180s | 3 retries, exponential backoff | @talos | ❌ No | medium |
17
- | Reviewer (@themis) | 120s | 2 retries, exponential backoff | @zeus | ❌ No | high |
18
- | Infrastructure (@prometheus) | 300s | 2 retries, exponential backoff | @hermes | ❌ No | medium |
19
- | Hotfix (@talos) | 30s | 1 retry, no backoff | @hermes | ✅ Yes | low |
20
- | Remote Sensing (@gaia) | 120s | 2 retries, exponential backoff | @hermes | ✅ Yes | high |
15
+ | Explorer (@apollo) | 60s | 2 retries, exp backoff | @athena (plan) → @hermes (impl) | ✅ Yes | low |
16
+ | Implementer (@hermes, @aphrodite, @demeter) | 180s | 3 retries, exp backoff | @talos (hotfix) → @athena (replan) | ❌ No | medium |
17
+ | Reviewer (@themis) | 120s | 3 retries, exp backoff | @zeus (escalate) → user | ❌ No | high |
18
+ | Infrastructure (@prometheus) | 300s | 3 retries, exp backoff | @hermes (config) → @zeus (escalate) | ❌ No | medium |
19
+ | Hotfix (@talos) | 30s | 2 retries, no backoff | @hermes (full fix) | ✅ Yes | low |
20
+ | Remote Sensing (@gaia) | 120s | 2 retries, exp backoff | @hermes (generic) | ✅ Yes | high |
21
21
 
22
22
  ## Retry Flow
23
23
 
24
24
  ```
25
25
  Task dispatch → timeout elapsed → log timeout
26
- ├─ retry_count > 0 → retry with backoff → decrement retry_count
27
- ├─ fallback_agent exists → dispatch to fallback
28
- └─ no retries + no fallback → return TIMEOUT error to user
26
+ ├─ retry_count > 0 → retry with exponential backoff → decrement retry_count
27
+ │ └─ still failing? → retry again (up to retry_count limit)
28
+ │
29
+ ├─ retries exhausted → FALLBACK CHAIN:
30
+ │ ├─ fallback[0] exists? → dispatch to fallback agent
31
+ │ │ └─ keep original task spec + context; add error context
32
+ │ ├─ fallback[1] exists? → dispatch to second fallback
33
+ │ └─ all fallbacks failed? → ESCALATE
34
+ │
35
+ ├─ no fallbacks defined → return TIMEOUT error to user
36
+ │
37
+ └─ ESCALATE: "Agent X failed after N retries. Fallbacks Y, Z also failed.
38
+ Options: (a) try different agent, (b) simplify scope, (c) manual"
29
39
  ```
30
40
 
41
+
42
+
43
+ ## Fallback Chain Definitions
44
+
45
+ Each fallback chain is evaluated left-to-right: if the first fallback fails, try the second, etc.
46
+
47
+ | Agent | Fallback[0] | Fallback[1] | Escalate To |
48
+ |-------|------------|------------|-------------|
49
+ | @apollo | @athena (plan scoped task) | @hermes (implement search) | @zeus |
50
+ | @hermes | @talos (minimal fix) | @athena (replan + simplify) | @zeus |
51
+ | @aphrodite | @talos (CSS/UX fix) | @hermes (generic fallback) | @zeus |
52
+ | @demeter | @hermes (generic backend) | @athena (replan schema) | @zeus |
53
+ | @themis | @zeus (direct escalation) | — | user |
54
+ | @prometheus | @hermes (config/deploy) | @zeus | user |
55
+ | @talos | @hermes (full implementation) | — | @zeus |
56
+ | @hephaestus | @nyx (observability debug) | @hermes (generic) | @zeus |
57
+ | @nyx | @hermes (generic) | — | @zeus |
58
+ | @iris | @zeus (manual override) | — | user |
59
+ | @mnemosyne | @zeus (manual) | — | user |
60
+
61
+ ### Escalation Protocol
62
+ When ALL fallbacks fail:
63
+ 1. Log the full failure chain: which agents were tried, what error each returned
64
+ 2. Report to user: "Task [X] failed. Tried: [agent list]. Error: [summary]."
65
+ 3. Offer options: (a) try different approach, (b) simplify scope, (c) manual fix
66
+ 4. NEVER retry the same chain automatically — break the cycle
67
+
31
68
  ### Session Reuse Check
32
69
  Before dispatching a task, check if a reusable session exists:
33
70