pantheon-opencode 1.6.0-beta.9 → 1.6.1
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 +118 -0
- package/AGENTS.md +18 -168
- package/CHANGELOG.md +144 -365
- package/README.md +124 -607
- package/README.pt-BR.md +120 -345
- package/bin/pantheon-init.mjs +504 -141
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-vision.md +61 -12
- package/package.json +22 -13
- package/plugin.json +1 -1
- package/pyproject.toml +6 -2
- package/scripts/_pantheon_paths.py +24 -0
- package/scripts/build-agents-md.mjs +368 -69
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/check-plugin-v2-coverage.mjs +11 -8
- package/scripts/docs-check-changelog.mjs +204 -0
- package/scripts/docs-link-check.mjs +314 -0
- package/scripts/docs-media.mjs +157 -0
- package/scripts/doctor.mjs +850 -45
- package/scripts/install/agents-md.mjs +2 -2
- package/scripts/install/backup.mjs +648 -0
- package/scripts/install/cli-ui.mjs +303 -72
- package/scripts/install/component-selection.mjs +61 -0
- package/scripts/install/config-migration.mjs +583 -27
- package/scripts/install/exit-codes.mjs +26 -0
- package/scripts/install/file-inventory.mjs +555 -0
- package/scripts/install/health-check.mjs +31 -25
- package/scripts/install/interactive.mjs +99 -383
- package/scripts/install/interrupt.mjs +78 -0
- package/scripts/install/migrate.mjs +49 -25
- package/scripts/install/model-picker.mjs +218 -250
- package/scripts/install/opencode-state.mjs +91 -0
- package/scripts/install/opencode-version.mjs +83 -21
- package/scripts/install/opencode.mjs +1675 -187
- package/scripts/install/plan-artifact.mjs +517 -0
- package/scripts/install/plan.mjs +475 -0
- package/scripts/install/plugin.mjs +214 -27
- package/scripts/install/prompt-result.mjs +2 -0
- package/scripts/install/run-record.mjs +115 -0
- package/scripts/install/shared.mjs +256 -99
- package/scripts/install/state.mjs +63 -8
- package/scripts/install/strings.mjs +93 -8
- package/scripts/install/v2-capabilities.mjs +205 -0
- package/scripts/install/venv.mjs +90 -47
- package/scripts/install/verify.mjs +128 -0
- package/scripts/install/vision-prompt.mjs +173 -0
- package/scripts/install-mcp.mjs +2 -2
- package/scripts/manifest-inventory.mjs +49 -3
- package/scripts/mcp_persistence.py +1535 -1050
- package/scripts/memory_mcp.py +12 -843
- package/scripts/node-engine-policy.mjs +85 -0
- package/scripts/package-evidence.mjs +10 -2
- package/scripts/postinstall.mjs +26 -26
- package/scripts/probe-pantheon-cost.mjs +118 -19
- package/scripts/prune.mjs +9 -3
- package/scripts/reconcile.mjs +325 -0
- package/scripts/release-gates.mjs +687 -0
- package/scripts/restore.mjs +222 -0
- package/scripts/run-node-tests.mjs +24 -8
- package/scripts/sync-artifacts.mjs +19 -7
- package/scripts/sync-tui.mjs +5 -1
- package/scripts/test-opencode-v2-sandbox.sh +36 -123
- package/scripts/uninstall.mjs +369 -34
- package/scripts/update.mjs +164 -0
- package/scripts/validate-node-engine-policy.mjs +13 -0
- package/scripts/version-check.mjs +34 -1
- package/scripts/versioning.mjs +23 -3
- package/scripts/vision-status.mjs +682 -0
- package/skills-lock.json +8 -8
- package/src/agents/aphrodite.md +13 -10
- package/src/agents/apollo.md +4 -5
- package/src/agents/athena.md +74 -46
- package/src/agents/demeter.md +10 -7
- package/src/agents/gaia.md +0 -1
- package/src/agents/hephaestus.md +4 -3
- package/src/agents/hermes.md +10 -9
- package/src/agents/iris.md +6 -1
- package/src/agents/mnemosyne.md +10 -4
- package/src/agents/nyx.md +4 -4
- package/src/agents/prometheus.md +12 -11
- package/src/agents/talos.md +6 -0
- package/src/agents/zeus.md +84 -56
- package/src/instructions/agent-return-format.instructions.md +12 -41
- package/src/instructions/memory-protocol.instructions.md +5 -11
- package/src/instructions/test-economy.instructions.md +12 -0
- package/src/instructions/yagni.instructions.md +6 -15
- package/src/instructions/zeus-anti-stall.instructions.md +6 -6
- package/src/instructions/zeus-communication-rules.instructions.md +6 -6
- package/src/instructions/zeus-council-synthesis.instructions.md +11 -12
- package/src/instructions/zeus-memory-operations.instructions.md +13 -7
- package/src/instructions/zeus-timeout-retry.instructions.md +36 -10
- package/src/mcp/_pantheon_paths.py +24 -0
- package/src/mcp/mcp_codemap_module.py +86 -18
- package/src/mcp/mcp_persistence.py +1535 -1050
- package/src/mcp/memory_mcp.py +444 -94
- package/src/mcp/pantheon_vision.py +285 -41
- package/src/mcp/requirements-mcp.txt +6 -1
- package/src/mcp/requirements-vision.txt +1 -1
- package/src/pantheon/context-pruner.ts +541 -0
- package/src/pantheon/cost-command.ts +901 -60
- package/src/pantheon/delegation-enforce.ts +160 -23
- package/src/pantheon/goal-loop.ts +11 -8
- package/src/pantheon/guard-path.ts +162 -0
- package/src/pantheon/memory-context.ts +1017 -0
- package/src/pantheon/model-agents.ts +19 -0
- package/src/pantheon/model-command.ts +218 -56
- package/src/pantheon/model-pricing.ts +536 -0
- package/src/pantheon/presets.mjs +2 -0
- package/src/pantheon/task-result-guard.ts +50 -14
- package/src/pantheon/v2-bounded-read.ts +654 -0
- package/src/pantheon/v2-bridge.ts +27 -0
- package/src/pantheon/v2-delegation-enforce.ts +133 -6
- package/src/pantheon/v2-execute-after.ts +135 -24
- package/src/pantheon/v2-model-overrides.ts +275 -0
- package/src/pantheon/v2-shell-hooks.ts +260 -0
- package/src/pantheon/v2-tools.ts +89 -35
- package/src/pantheon/v2-unsupported.mjs +34 -7
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1166 -116
- package/src/plugin-v2.ts +1039 -171
- package/src/plugin.ts +37 -13
- package/src/plugins/tui/dist/tui-v2.d.ts +1029 -2
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +3742 -85
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +15 -15
- package/src/plugins/tui/package.json +7 -5
- package/src/plugins/tui/src/index-v2.tsx +4314 -50
- package/src/plugins/tui/tsconfig.typecheck.json +5 -0
- package/src/routing.yml +50 -5
- package/src/skills/agent-coordination/SKILL.md +7 -2
- package/src/skills/artifact-management/SKILL.md +5 -1
- package/src/skills/auto-continue/SKILL.md +14 -6
- package/src/skills/codemap/SKILL.md +1 -1
- package/src/skills/memory-bank/SKILL.md +21 -13
- package/src/skills/session-goal/SKILL.md +12 -22
- package/src/skills/spec-driven-development/SKILL.md +3 -1
- package/src/skills/worktrees/SKILL.md +30 -11
- package/scripts/probe-context-rehydrate.mjs +0 -263
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
12
12
|
import { dirname, join } from 'node:path'
|
|
13
13
|
import { fileURLToPath } from 'node:url'
|
|
14
|
+
import { configure as configureUi, tag } from './cli-ui.mjs'
|
|
15
|
+
import { ACTIONS, fingerprintOutput, recordChange } from './plan.mjs'
|
|
14
16
|
import { createInitialState, readState, writeState } from './state.mjs'
|
|
15
17
|
|
|
16
18
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
@@ -44,10 +46,14 @@ export function detectVersion(target) {
|
|
|
44
46
|
*
|
|
45
47
|
* @param {string} target - Installation directory
|
|
46
48
|
* @param {string|null} currentVersion - Detected version (null = fresh install)
|
|
47
|
-
* @param {{ dryRun?: boolean }} [options]
|
|
49
|
+
* @param {{ dryRun?: boolean, recorder?: (change: object) => void }} [options]
|
|
48
50
|
* @returns {{ applied: number, messages: string[] }}
|
|
49
51
|
*/
|
|
50
|
-
export function runMigrations(
|
|
52
|
+
export function runMigrations(
|
|
53
|
+
target,
|
|
54
|
+
currentVersion,
|
|
55
|
+
{ dryRun = false, recorder = null, updatedAt = new Date().toISOString() } = {},
|
|
56
|
+
) {
|
|
51
57
|
const applied = []
|
|
52
58
|
const semver = parseSemver(currentVersion)
|
|
53
59
|
|
|
@@ -104,16 +110,18 @@ export function runMigrations(target, currentVersion, { dryRun = false } = {}) {
|
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
// ── Write updated state ───────────────────────────────────────────
|
|
107
|
-
if (applied.length > 0
|
|
113
|
+
if (applied.length > 0) {
|
|
114
|
+
const statePath = join(target, '.pantheon', 'install-state.json')
|
|
108
115
|
const newVersion = formatSemver(semver)
|
|
109
116
|
let state = readState(target)
|
|
110
|
-
|
|
117
|
+
const stateExisted = state !== null
|
|
118
|
+
if (!state) state = createInitialState(newVersion, updatedAt)
|
|
111
119
|
state.pantheon_version = newVersion
|
|
112
120
|
for (const m of applied) {
|
|
113
121
|
state.applied_migrations.push({
|
|
114
122
|
from: m.from,
|
|
115
123
|
to: m.to,
|
|
116
|
-
applied_at:
|
|
124
|
+
applied_at: updatedAt,
|
|
117
125
|
status: 'completed',
|
|
118
126
|
})
|
|
119
127
|
}
|
|
@@ -125,12 +133,31 @@ export function runMigrations(target, currentVersion, { dryRun = false } = {}) {
|
|
|
125
133
|
runtime: { version: 1, status: 'installed' },
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
|
-
|
|
136
|
+
state.updated_at = updatedAt
|
|
137
|
+
state.schema_version = 2
|
|
138
|
+
const stateContent = `${JSON.stringify(state, null, 2)}\n`
|
|
139
|
+
if (!dryRun) writeState(target, state, { updatedAt })
|
|
140
|
+
recordChange(
|
|
141
|
+
{
|
|
142
|
+
path: statePath,
|
|
143
|
+
action: stateExisted ? ACTIONS.UPDATE : ACTIONS.CREATE,
|
|
144
|
+
bytes: Buffer.byteLength(stateContent, 'utf8'),
|
|
145
|
+
outputFingerprint: fingerprintOutput(stateContent),
|
|
146
|
+
scored: false,
|
|
147
|
+
},
|
|
148
|
+
recorder,
|
|
149
|
+
)
|
|
150
|
+
return {
|
|
151
|
+
applied: applied.length,
|
|
152
|
+
messages: applied.map((m) => `${m.from} → ${m.to}: ${m.description}`),
|
|
153
|
+
plannedState: state,
|
|
154
|
+
}
|
|
129
155
|
}
|
|
130
156
|
|
|
131
157
|
return {
|
|
132
158
|
applied: applied.length,
|
|
133
159
|
messages: applied.map((m) => `${m.from} → ${m.to}: ${m.description}`),
|
|
160
|
+
plannedState: null,
|
|
134
161
|
}
|
|
135
162
|
}
|
|
136
163
|
|
|
@@ -238,26 +265,24 @@ export function resumePendingMigration(target) {
|
|
|
238
265
|
export function rollbackMigration(target, version) {
|
|
239
266
|
const state = readState(target)
|
|
240
267
|
if (!state) {
|
|
241
|
-
console.log('
|
|
268
|
+
console.log(' [WARN] No install state found — nothing to roll back')
|
|
242
269
|
return { success: false, reason: 'No install state' }
|
|
243
270
|
}
|
|
244
271
|
|
|
245
272
|
const migrations = state.applied_migrations || []
|
|
246
273
|
const targetMigration = migrations.find((m) => m.to === version && m.status === 'completed')
|
|
247
274
|
if (!targetMigration) {
|
|
248
|
-
console.log(`
|
|
275
|
+
console.log(` [WARN] No completed migration found for version ${version}`)
|
|
249
276
|
return { success: false, reason: 'Migration not found' }
|
|
250
277
|
}
|
|
251
278
|
|
|
252
|
-
console.log(
|
|
253
|
-
` \u{1F504} Rolling back migration: ${targetMigration.from} \u2192 ${targetMigration.to}`,
|
|
254
|
-
)
|
|
279
|
+
console.log(` Rolling back migration: ${targetMigration.from} -> ${targetMigration.to}`)
|
|
255
280
|
|
|
256
281
|
targetMigration.status = 'rolled_back'
|
|
257
282
|
state.pantheon_version = targetMigration.from
|
|
258
283
|
writeState(target, state)
|
|
259
284
|
|
|
260
|
-
console.log(`
|
|
285
|
+
console.log(` [OK] Rolled back to ${targetMigration.from}`)
|
|
261
286
|
return { success: true, migration: targetMigration }
|
|
262
287
|
}
|
|
263
288
|
|
|
@@ -328,24 +353,23 @@ function main() {
|
|
|
328
353
|
const dryRun = args.includes('--dry-run')
|
|
329
354
|
const force = args.includes('--force')
|
|
330
355
|
const list = args.includes('--list')
|
|
356
|
+
// One dry-run marker for the whole CLI: cli-ui's tag(). This file used to
|
|
357
|
+
// hardcode its own `[DRY-RUN]` prefix while other CLIs printed `[dry-run]`.
|
|
358
|
+
configureUi({ dryRun })
|
|
331
359
|
|
|
332
360
|
if (list) {
|
|
333
361
|
const history = listAppliedMigrations(target)
|
|
334
362
|
if (!history.currentVersion) {
|
|
335
|
-
console.log(`
|
|
363
|
+
console.log(` [INFO] No install state found in: ${target}`)
|
|
336
364
|
return
|
|
337
365
|
}
|
|
338
366
|
console.log(` Current version: ${history.currentVersion}`)
|
|
339
367
|
console.log(` Previous version: ${history.previousVersion || 'N/A'}`)
|
|
340
368
|
console.log(` Applied migrations: ${history.migrations.length}`)
|
|
341
369
|
for (const m of history.migrations) {
|
|
342
|
-
const
|
|
343
|
-
m.status === 'completed'
|
|
344
|
-
|
|
345
|
-
: m.status === 'rolled_back'
|
|
346
|
-
? '\u{1F504}'
|
|
347
|
-
: '\u26A0\uFE0F'
|
|
348
|
-
console.log(` ${icon} ${m.from} \u2192 ${m.to} [${m.status}] (${m.applied_at})`)
|
|
370
|
+
const status =
|
|
371
|
+
m.status === 'completed' ? '[OK]' : m.status === 'rolled_back' ? '[ROLLED BACK]' : '[WARN]'
|
|
372
|
+
console.log(` ${status} ${m.from} -> ${m.to} [${m.status}] (${m.applied_at})`)
|
|
349
373
|
}
|
|
350
374
|
return
|
|
351
375
|
}
|
|
@@ -361,9 +385,9 @@ function main() {
|
|
|
361
385
|
if (!dryRun) {
|
|
362
386
|
const state = createInitialState(PANTHON_VERSION)
|
|
363
387
|
writeState(target, state)
|
|
364
|
-
console.log(`
|
|
388
|
+
console.log(` [OK] Fresh install — state written (${PANTHON_VERSION})`)
|
|
365
389
|
} else {
|
|
366
|
-
console.log(`
|
|
390
|
+
console.log(` ${tag(`Fresh install — would write state (${PANTHON_VERSION})`)}`)
|
|
367
391
|
}
|
|
368
392
|
return
|
|
369
393
|
}
|
|
@@ -371,19 +395,19 @@ function main() {
|
|
|
371
395
|
console.log(` Current version: ${currentVersion}`)
|
|
372
396
|
|
|
373
397
|
if (!force && currentVersion === PANTHON_VERSION) {
|
|
374
|
-
console.log('
|
|
398
|
+
console.log(' [OK] Already at latest version — no migrations needed')
|
|
375
399
|
return
|
|
376
400
|
}
|
|
377
401
|
|
|
378
402
|
const migration = runMigrations(target, currentVersion, { dryRun })
|
|
379
403
|
|
|
380
404
|
if (migration.applied > 0) {
|
|
381
|
-
console.log(`
|
|
405
|
+
console.log(` [OK] Applied ${migration.applied} migration(s):`)
|
|
382
406
|
for (const msg of migration.messages) {
|
|
383
407
|
console.log(` \u2022 ${msg}`)
|
|
384
408
|
}
|
|
385
409
|
} else {
|
|
386
|
-
console.log('
|
|
410
|
+
console.log(' [INFO] No applicable migrations')
|
|
387
411
|
}
|
|
388
412
|
}
|
|
389
413
|
|