pantheon-opencode 1.5.2 → 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.
- package/.pantheon/code-mode/README.md +4 -2
- package/.pantheon/code-mode/checkpoint_session.py +138 -102
- package/.pantheon/code-mode/compress-inline.py +102 -57
- package/.pantheon/code-mode/manifest.json +2 -8
- package/AGENTS.global.md +182 -0
- package/AGENTS.md +10 -891
- package/CHANGELOG.md +343 -0
- package/README.md +577 -79
- package/README.pt-BR.md +345 -60
- package/bin/pantheon-init.mjs +26 -3
- 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-optimize.md +2 -2
- package/commands/pantheon-vision.md +61 -12
- package/package.json +30 -11
- package/plugin.json +2 -2
- package/pyproject.toml +11 -16
- package/scripts/build-agents-md.mjs +376 -58
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/check-plugin-v2-coverage.mjs +213 -0
- package/scripts/ci-validate-yaml.py +7 -5
- package/scripts/{code_mode_server.py → code_mode.py} +119 -27
- package/scripts/cost.mjs +244 -41
- package/scripts/doctor.mjs +236 -29
- package/scripts/install/agents-md.mjs +4 -4
- package/scripts/install/cli-ui.mjs +1 -1
- package/scripts/install/config-migration.mjs +319 -6
- package/scripts/install/health-check.mjs +26 -37
- package/scripts/install/interactive.mjs +7 -7
- package/scripts/install/migrate.mjs +1 -1
- package/scripts/install/opencode-version.mjs +246 -4
- package/scripts/install/opencode.mjs +627 -179
- package/scripts/install/plugin.mjs +43 -9
- package/scripts/install/shared.mjs +120 -12
- package/scripts/install/vision-prompt.mjs +161 -0
- package/scripts/install-mcp.mjs +28 -9
- package/scripts/{mcp_persistence_server.py → mcp_persistence.py} +392 -78
- package/{src/mcp/mcp_resources_server.py → scripts/mcp_resources.py} +2 -2
- package/scripts/{memory_mcp_server.py → memory_mcp.py} +372 -198
- package/scripts/postinstall.mjs +0 -7
- package/scripts/probe-context-rehydrate.mjs +36 -13
- package/scripts/probe-pantheon-cost.mjs +71 -15
- package/scripts/prune.mjs +2 -2
- 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 +1913 -0
- package/scripts/validate-routing.mjs +43 -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 +15 -16
- 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 +1 -1
- package/src/agents/mnemosyne.md +23 -60
- 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 -130
- package/src/instructions/agent-return-format.instructions.md +18 -3
- 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 +11 -110
- package/src/instructions/zeus-anti-stall.instructions.md +14 -61
- package/src/instructions/zeus-communication-rules.instructions.md +0 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +32 -260
- package/src/instructions/zeus-memory-operations.instructions.md +26 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +40 -87
- package/src/mcp/{code_mode_server.py → code_mode.py} +119 -27
- package/src/mcp/eval_store.py +2 -2
- package/src/mcp/mcp_codemap_module.py +559 -129
- package/src/mcp/{mcp_persistence_server.py → mcp_persistence.py} +392 -78
- package/{scripts/mcp_resources_server.py → src/mcp/mcp_resources.py} +2 -2
- package/src/mcp/{memory_mcp_server.py → memory_mcp.py} +373 -250
- package/src/mcp/{pantheon_vision_server.py → pantheon_vision.py} +396 -40
- package/src/mcp/requirements-mcp.txt +10 -6
- package/src/mcp/requirements-vision.txt +4 -2
- package/src/pantheon/cost-command.ts +399 -101
- package/src/pantheon/delegation-enforce.ts +10 -1
- package/src/pantheon/model-command.ts +18 -7
- package/src/pantheon/presets.d.mts +0 -8
- package/src/pantheon/presets.mjs +5 -32
- package/src/pantheon/todo-enforcer.ts +1 -1
- 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-tools.ts +429 -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 +1161 -116
- package/src/plugin-v2.ts +1244 -288
- 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 +5504 -1341
- package/src/plugins/tui/package.json +25 -15
- 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 -22
- package/src/skills/README.md +34 -39
- 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 +54 -95
- 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/.pantheon/code-mode/eval-llm-judge.py +0 -255
- package/.pantheon/code-mode/eval-monte-carlo.py +0 -368
- package/.pantheon/code-mode/eval-run.py +0 -197
- package/.pantheon/code-mode/eval-static.py +0 -321
- package/.pantheon/code-mode/session-end-save.py +0 -186
- package/.pantheon/code-mode/session-end-save.sh +0 -18
- package/opencode.json +0 -58
- package/scripts/recover-zenodo-deposition.mjs +0 -146
- package/scripts/test-opencode-v1-v2-sandbox.sh +0 -862
- package/scripts/validate-zenodo-release.mjs +0 -154
- package/scripts/zenodo-artifact.mjs +0 -94
- package/scripts/zenodo-release-state.mjs +0 -53
- package/src/skills/orchestration-workflow/SKILL.md +0 -311
|
@@ -350,7 +350,9 @@ function presetPathForScope(options: ModelCommandOptions, scope: ModelScope): st
|
|
|
350
350
|
const globalCandidates = globalConfigCandidates(options).map((p) =>
|
|
351
351
|
resolve(join(dirname(p), '.pantheon', 'active-preset.json')),
|
|
352
352
|
)
|
|
353
|
-
|
|
353
|
+
const fallback = globalCandidates[0] ?? candidates[0]
|
|
354
|
+
if (!fallback) throw new ModelCommandError('global preset path is unavailable')
|
|
355
|
+
return fallback
|
|
354
356
|
}
|
|
355
357
|
|
|
356
358
|
async function readActivePresetRaw(path: string, label: string): Promise<ReadFileResult> {
|
|
@@ -552,10 +554,16 @@ async function updateActivePreset(
|
|
|
552
554
|
const overrides = shaped.overrides as Record<string, unknown>
|
|
553
555
|
const agents = overrides.agents as Record<string, unknown>
|
|
554
556
|
|
|
555
|
-
|
|
557
|
+
if (typeof args.agent !== 'string') {
|
|
558
|
+
throw new ModelCommandError(`${action} requires --agent <name>`)
|
|
559
|
+
}
|
|
560
|
+
const agentKey = validateAgent(args.agent)
|
|
556
561
|
|
|
557
562
|
if (action === 'set') {
|
|
558
|
-
|
|
563
|
+
if (typeof args.model !== 'string') {
|
|
564
|
+
throw new ModelCommandError('set requires --model <provider/model-id>')
|
|
565
|
+
}
|
|
566
|
+
const model = args.model
|
|
559
567
|
const effort = args.effort
|
|
560
568
|
let variantInfo: { variant: 'low' | 'medium' | 'high' | null; clamped: boolean }
|
|
561
569
|
try {
|
|
@@ -778,22 +786,25 @@ async function promptViaReadline(
|
|
|
778
786
|
): Promise<Record<string, unknown>> {
|
|
779
787
|
const answers: Record<string, unknown> = {}
|
|
780
788
|
// Q1 agent
|
|
781
|
-
const agentQ = questions[0]
|
|
789
|
+
const agentQ = questions[0]
|
|
790
|
+
const modelQ = questions[1]
|
|
791
|
+
const effortQ = questions[2]
|
|
792
|
+
const scopeQ = questions[3]
|
|
793
|
+
if (!agentQ || !modelQ || !effortQ || !scopeQ) {
|
|
794
|
+
throw new ModelCommandError('wizard requires agent, model, effort, and scope questions')
|
|
795
|
+
}
|
|
782
796
|
const agentPrompt = `${agentQ.question} [${KNOWN_AGENTS.join('/')}] : `
|
|
783
797
|
const agentAns = (await rl.question(agentPrompt)).trim().toLowerCase()
|
|
784
798
|
answers.agent = agentAns || KNOWN_AGENTS[0]
|
|
785
799
|
|
|
786
|
-
const modelQ = questions[1]!
|
|
787
800
|
const modelAns = (await rl.question(`${modelQ.question} : `)).trim()
|
|
788
801
|
answers.model = modelAns
|
|
789
802
|
|
|
790
|
-
const effortQ = questions[2]!
|
|
791
803
|
const effortAns = (await rl.question(`${effortQ.question} [low/medium/high] : `))
|
|
792
804
|
.trim()
|
|
793
805
|
.toLowerCase()
|
|
794
806
|
answers.effort = effortAns || 'medium'
|
|
795
807
|
|
|
796
|
-
const scopeQ = questions[3]!
|
|
797
808
|
const scopeAns = (await rl.question(`${scopeQ.question} [project/global] : `))
|
|
798
809
|
.trim()
|
|
799
810
|
.toLowerCase()
|
|
@@ -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.
|
package/src/pantheon/presets.mjs
CHANGED
|
@@ -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
|
|
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 =
|
|
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 =
|
|
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
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
import type { BackgroundJobBoard } from './background-job-board.ts'
|
|
51
51
|
import { createPantheonLogger } from './logger.ts'
|
|
52
|
-
import {
|
|
52
|
+
import { safeSessionPath } from './session-guard.ts'
|
|
53
53
|
|
|
54
54
|
// Silence-by-default TUI policy (pantheon-hooks L42-58): the default warn
|
|
55
55
|
// fallback logs to .pantheon/logs/hooks.log; console echo is opt-in via
|