pantheon-opencode 1.6.0-beta.1 → 1.6.0-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.
Files changed (120) hide show
  1. package/AGENTS.global.md +182 -0
  2. package/AGENTS.md +10 -891
  3. package/CHANGELOG.md +326 -0
  4. package/README.md +496 -32
  5. package/README.pt-BR.md +285 -20
  6. package/bin/pantheon-init.mjs +26 -3
  7. package/commands/pantheon-audit.md +7 -1
  8. package/commands/pantheon-consolidate.md +1 -1
  9. package/commands/pantheon-deepwork.md +14 -3
  10. package/commands/pantheon-focus.md +17 -0
  11. package/commands/pantheon-vision.md +61 -12
  12. package/package.json +21 -14
  13. package/plugin.json +2 -2
  14. package/pyproject.toml +8 -6
  15. package/scripts/build-agents-md.mjs +374 -56
  16. package/scripts/changelog-merge.mjs +161 -0
  17. package/scripts/{code_mode_server.py → code_mode.py} +3 -3
  18. package/scripts/cost.mjs +244 -41
  19. package/scripts/doctor.mjs +151 -1
  20. package/scripts/install/agents-md.mjs +4 -4
  21. package/scripts/install/config-migration.mjs +317 -4
  22. package/scripts/install/health-check.mjs +21 -19
  23. package/scripts/install/interactive.mjs +1 -1
  24. package/scripts/install/opencode-version.mjs +246 -4
  25. package/scripts/install/opencode.mjs +627 -179
  26. package/scripts/install/plugin.mjs +43 -9
  27. package/scripts/install/shared.mjs +120 -12
  28. package/scripts/install/vision-prompt.mjs +161 -0
  29. package/scripts/install-mcp.mjs +28 -9
  30. package/scripts/{mcp_persistence_server.py → mcp_persistence.py} +2 -2
  31. package/{src/mcp/mcp_resources_server.py → scripts/mcp_resources.py} +2 -2
  32. package/scripts/{memory_mcp_server.py → memory_mcp.py} +2 -2
  33. package/scripts/probe-context-rehydrate.mjs +8 -2
  34. package/scripts/probe-pantheon-cost.mjs +71 -15
  35. package/scripts/run-node-tests.mjs +189 -0
  36. package/scripts/sync-artifacts.mjs +26 -13
  37. package/scripts/sync-tui.mjs +24 -3
  38. package/scripts/test-opencode-v2-sandbox.sh +180 -26
  39. package/scripts/validate-routing.mjs +3 -3
  40. package/scripts/validate-sandbox-install.mjs +138 -0
  41. package/scripts/versioning.mjs +13 -1
  42. package/scripts/vision-status.mjs +682 -0
  43. package/skills-lock.json +8 -8
  44. package/src/agents/aphrodite.md +20 -37
  45. package/src/agents/apollo.md +7 -3
  46. package/src/agents/athena.md +63 -35
  47. package/src/agents/demeter.md +8 -28
  48. package/src/agents/gaia.md +1 -1
  49. package/src/agents/hephaestus.md +10 -21
  50. package/src/agents/hermes.md +15 -38
  51. package/src/agents/iris.md +1 -1
  52. package/src/agents/mnemosyne.md +18 -54
  53. package/src/agents/nyx.md +1 -1
  54. package/src/agents/prometheus.md +16 -20
  55. package/src/agents/talos.md +10 -2
  56. package/src/agents/themis.md +5 -5
  57. package/src/agents/zeus.md +99 -129
  58. package/src/instructions/agent-return-format.instructions.md +18 -3
  59. package/src/instructions/backend-standards.instructions.md +2 -0
  60. package/src/instructions/frontend-standards.instructions.md +3 -1
  61. package/src/instructions/memory-protocol.instructions.md +11 -110
  62. package/src/instructions/zeus-anti-stall.instructions.md +14 -61
  63. package/src/instructions/zeus-communication-rules.instructions.md +0 -1
  64. package/src/instructions/zeus-council-synthesis.instructions.md +32 -260
  65. package/src/instructions/zeus-memory-operations.instructions.md +26 -0
  66. package/src/instructions/zeus-timeout-retry.instructions.md +40 -87
  67. package/src/mcp/{code_mode_server.py → code_mode.py} +3 -3
  68. package/src/mcp/eval_store.py +2 -2
  69. package/src/mcp/{mcp_persistence_server.py → mcp_persistence.py} +2 -2
  70. package/{scripts/mcp_resources_server.py → src/mcp/mcp_resources.py} +2 -2
  71. package/src/mcp/{memory_mcp_server.py → memory_mcp.py} +2 -2
  72. package/src/mcp/{pantheon_vision_server.py → pantheon_vision.py} +286 -42
  73. package/src/mcp/requirements-mcp.txt +6 -4
  74. package/src/mcp/requirements-vision.txt +2 -2
  75. package/src/pantheon/cost-command.ts +399 -101
  76. package/src/pantheon/delegation-enforce.ts +10 -1
  77. package/src/pantheon/presets.d.mts +0 -8
  78. package/src/pantheon/presets.mjs +5 -32
  79. package/src/pantheon/v2-bounded-read.ts +640 -0
  80. package/src/pantheon/v2-delegation-enforce.ts +214 -0
  81. package/src/pantheon/v2-execute-after.ts +186 -0
  82. package/src/pantheon/v2-tools.ts +429 -0
  83. package/src/pantheon/v2-unsupported.d.mts +11 -0
  84. package/src/pantheon/v2-unsupported.mjs +90 -0
  85. package/src/pantheon/v2-vision.ts +622 -0
  86. package/src/pantheon/vision-local.ts +531 -0
  87. package/src/pantheon/vision.ts +1160 -115
  88. package/src/plugin-v2.ts +1145 -219
  89. package/src/plugin.ts +12 -9
  90. package/src/plugins/tui/dist/server.d.ts +1 -2
  91. package/src/plugins/tui/dist/server.d.ts.map +1 -1
  92. package/src/plugins/tui/dist/tui-v2.d.ts +154 -0
  93. package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -0
  94. package/src/plugins/tui/dist/tui-v2.js +659 -0
  95. package/src/plugins/tui/dist/tui-v2.js.map +1 -0
  96. package/src/plugins/tui/dist/tui.d.ts +85 -82
  97. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  98. package/src/plugins/tui/dist/tui.js +72 -59
  99. package/src/plugins/tui/index-v2.ts +6 -0
  100. package/src/plugins/tui/package-lock.json +5516 -1353
  101. package/src/plugins/tui/package.json +22 -12
  102. package/src/plugins/tui/src/index-v2.tsx +734 -0
  103. package/src/plugins/tui/src/index.tsx +106 -85
  104. package/src/plugins/tui/src/opencode-v2.d.ts +13 -0
  105. package/src/plugins/tui/tsconfig.build.json +5 -0
  106. package/src/plugins/tui/tsconfig.typecheck.json +5 -0
  107. package/src/plugins/tui/tsdown.config.ts +22 -2
  108. package/src/plugins/tui/tui-v2.ts +2 -0
  109. package/src/plugins/tui/tui.ts +3 -0
  110. package/src/routing.yml +11 -21
  111. package/src/skills/README.md +3 -3
  112. package/src/skills/agent-coordination/SKILL.md +7 -2
  113. package/src/skills/artifact-management/SKILL.md +12 -5
  114. package/src/skills/auto-continue/SKILL.md +39 -30
  115. package/src/skills/code-review-checklist/SKILL.md +5 -5
  116. package/src/skills/context-compression/SKILL.md +26 -879
  117. package/src/skills/session-goal/SKILL.md +14 -5
  118. package/src/skills/spec-driven-development/SKILL.md +3 -1
  119. package/src/skills/tdd-with-agents/SKILL.md +18 -10
  120. package/opencode.json +0 -58
@@ -104,14 +104,6 @@ export interface RoutingRetryPolicyOptions {
104
104
  logger?: { warn?: (msg: string) => void }
105
105
  }
106
106
 
107
- /**
108
- * R4: per-agent step caps from routing.yml `agents.<name>.max_steps`.
109
- * Fail-open → {} (no agent capped).
110
- */
111
- export declare function loadRoutingMaxSteps(
112
- options?: RoutingRetryPolicyOptions,
113
- ): Record<string, number>
114
-
115
107
  /**
116
108
  * O5: permission.task glob rules from routing.yml `permission.task`
117
109
  * (glob pattern → 'allow' | 'deny'). Fail-open → null.
@@ -26,7 +26,7 @@
26
26
  import { readFileSync } from 'node:fs'
27
27
  import { join } from 'node:path'
28
28
  import { fileURLToPath } from 'node:url'
29
- import yaml from 'js-yaml'
29
+ import { load } from 'js-yaml'
30
30
 
31
31
  export const EFFORT_RANK = { low: 0, medium: 1, high: 2 }
32
32
 
@@ -61,6 +61,8 @@ export const CAPABILITY_TABLE = [
61
61
  // entry above matches 'mimo/v2.5' (full-string) but NOT 'mimo-v2.5'
62
62
  // (segment 'mimo-v2.5' has no slash, so 'mimo/' prefix cannot match).
63
63
  { prefix: 'mimo-v2.5', maxEffort: 'low', stripEffort: false, vision: true },
64
+ // Current free OpenCode Zen vision model (renamed to the v2.6 Flash family).
65
+ { prefix: 'mimo-v2.6-flash', maxEffort: 'low', stripEffort: false, vision: true },
64
66
  // mimo-v2.5-pro is text-only per models.dev api.json (2026-08-27).
65
67
  { prefix: 'mimo-v2.5-pro', maxEffort: 'low', stripEffort: false, vision: false },
66
68
  // Go subscription specific — bare segment prefixes so opencode-go/<model> IDs match
@@ -192,7 +194,7 @@ export function loadPresetDefs(routingPath) {
192
194
  }
193
195
  let routing
194
196
  try {
195
- routing = yaml.load(raw)
197
+ routing = load(raw)
196
198
  } catch (err) {
197
199
  throw new Error(`presets: failed to load routing.yml: ${err.message}`)
198
200
  }
@@ -209,39 +211,10 @@ export function loadPresetDefs(routingPath) {
209
211
  function loadRoutingYaml(routingPath) {
210
212
  const path = routingPath ?? fileURLToPath(new URL('../routing.yml', import.meta.url))
211
213
  const raw = readFileSync(path, 'utf8')
212
- const routing = yaml.load(raw)
214
+ const routing = load(raw)
213
215
  return routing && typeof routing === 'object' ? routing : null
214
216
  }
215
217
 
216
- /**
217
- * Load the R4 per-agent step caps from routing.yml
218
- * (`agents.<name>.max_steps`). Fail-open: missing config yields {}.
219
- *
220
- * @param {object} [opts]
221
- * @param {string} [opts.routingPath]
222
- * @param {{warn?: Function}} [opts.logger]
223
- * @returns {Record<string, number>} lowercase agent → max_steps
224
- */
225
- export function loadRoutingMaxSteps({ routingPath, logger = console } = {}) {
226
- try {
227
- const routing = loadRoutingYaml(routingPath)
228
- const agents = routing?.agents
229
- if (!agents || typeof agents !== 'object') return {}
230
- const out = {}
231
- for (const [agent, spec] of Object.entries(agents)) {
232
- const maxSteps = spec && typeof spec === 'object' ? spec.max_steps : undefined
233
- if (Number.isSafeInteger(maxSteps) && maxSteps > 0) {
234
- out[agent.toLowerCase()] = maxSteps
235
- }
236
- }
237
- return out
238
- } catch (err) {
239
- const reason = err instanceof Error ? err.message : String(err)
240
- logger.warn?.(`presets: routing.yml max_steps unavailable (${reason})`)
241
- return {}
242
- }
243
- }
244
-
245
218
  /**
246
219
  * Load the O5 permission.task glob rules from routing.yml
247
220
  * (`permission.task:`). Fail-open: missing config yields null (caller keeps