pantheon-opencode 1.6.0-beta.9 → 1.6.0
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 +126 -376
- package/README.md +83 -610
- package/README.pt-BR.md +120 -345
- package/bin/pantheon-init.mjs +366 -132
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-vision.md +61 -12
- package/package.json +19 -11
- 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 +828 -40
- 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 +78 -383
- package/scripts/install/migrate.mjs +49 -25
- package/scripts/install/model-picker.mjs +218 -250
- package/scripts/install/opencode-version.mjs +83 -21
- package/scripts/install/opencode.mjs +1413 -154
- 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/shared.mjs +256 -99
- package/scripts/install/state.mjs +63 -8
- package/scripts/install/strings.mjs +60 -4
- 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 +682 -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 +5 -0
- package/src/pantheon/context-pruner.ts +541 -0
- package/src/pantheon/cost-command.ts +814 -60
- package/src/pantheon/goal-loop.ts +11 -8
- 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 +640 -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-tools.ts +89 -35
- package/src/pantheon/v2-unsupported.mjs +2 -3
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1160 -115
- package/src/plugin-v2.ts +654 -162
- package/src/plugin.ts +15 -11
- 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 +6 -6
- package/src/plugins/tui/package.json +5 -4
- 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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { validateNodeEnginePolicy } from './node-engine-policy.mjs'
|
|
4
|
+
|
|
5
|
+
const root = fileURLToPath(new URL('..', import.meta.url))
|
|
6
|
+
const errors = validateNodeEnginePolicy(root)
|
|
7
|
+
if (errors.length) {
|
|
8
|
+
console.error('Node engine policy validation failed:')
|
|
9
|
+
for (const error of errors) console.error(`- ${error}`)
|
|
10
|
+
process.exitCode = 1
|
|
11
|
+
} else {
|
|
12
|
+
console.log('Node engine policy is consistent across manifests and lockfiles.')
|
|
13
|
+
}
|
|
@@ -19,6 +19,14 @@ export const MANIFESTS = Object.freeze(
|
|
|
19
19
|
}),
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
+
const RELEASE_METADATA = Object.freeze(
|
|
23
|
+
VERSION_MANIFEST_INVENTORY.filter((item) => item.role === 'metadata').map((item) => ({
|
|
24
|
+
name: item.file,
|
|
25
|
+
file: item.file,
|
|
26
|
+
kind: item.kind,
|
|
27
|
+
})),
|
|
28
|
+
)
|
|
29
|
+
|
|
22
30
|
function readLegacyVersion(root, manifest) {
|
|
23
31
|
const path = join(root, manifest.file)
|
|
24
32
|
const text = readFileSync(path, 'utf8')
|
|
@@ -27,6 +35,11 @@ function readLegacyVersion(root, manifest) {
|
|
|
27
35
|
if (!match) throw new Error(`${manifest.file} is missing version`)
|
|
28
36
|
return match[1]
|
|
29
37
|
}
|
|
38
|
+
if (manifest.kind === 'cff') {
|
|
39
|
+
const match = text.match(/^version:\s*([^\s#]+)\s*(?:#.*)?$/m)
|
|
40
|
+
if (!match) throw new Error(`${manifest.file} is missing version`)
|
|
41
|
+
return match[1]
|
|
42
|
+
}
|
|
30
43
|
const data = JSON.parse(text)
|
|
31
44
|
if (typeof data.version !== 'string') throw new Error(`${manifest.file} is missing version`)
|
|
32
45
|
return data.version
|
|
@@ -64,6 +77,15 @@ export function compareVersions(root) {
|
|
|
64
77
|
}
|
|
65
78
|
return { name: manifest.name, version, ok: version !== null && version === source }
|
|
66
79
|
})
|
|
80
|
+
const releaseMetadata = RELEASE_METADATA.map((manifest) => {
|
|
81
|
+
let version = null
|
|
82
|
+
try {
|
|
83
|
+
version = readLegacyVersion(root, manifest)
|
|
84
|
+
} catch (error) {
|
|
85
|
+
errors.push(`${manifest.file}: ${error.message}`)
|
|
86
|
+
}
|
|
87
|
+
return { name: manifest.name, version, ok: version !== null && version === source }
|
|
88
|
+
})
|
|
67
89
|
const locks = LOCK_INVENTORY.map((entry) => {
|
|
68
90
|
let version = null
|
|
69
91
|
try {
|
|
@@ -81,11 +103,13 @@ export function compareVersions(root) {
|
|
|
81
103
|
return {
|
|
82
104
|
source,
|
|
83
105
|
manifests,
|
|
106
|
+
releaseMetadata,
|
|
84
107
|
locks,
|
|
85
108
|
errors: [...new Set(errors)],
|
|
86
109
|
ok:
|
|
87
110
|
source !== null &&
|
|
88
111
|
manifests.every((item) => item.ok) &&
|
|
112
|
+
releaseMetadata.every((item) => item.ok) &&
|
|
89
113
|
locks.every((item) => item.ok) &&
|
|
90
114
|
errors.length === 0,
|
|
91
115
|
}
|
|
@@ -100,7 +124,11 @@ export function syncToSource(root) {
|
|
|
100
124
|
const source = inventory.sourceVersion
|
|
101
125
|
const changed = inventory.versions.filter(({ version }) => version !== source).length
|
|
102
126
|
const lockChanged = inventory.documents.filter(
|
|
103
|
-
({ entry, data }) =>
|
|
127
|
+
({ entry, data }) =>
|
|
128
|
+
entry.role === 'lock' &&
|
|
129
|
+
(data.version !== source ||
|
|
130
|
+
(entry.file === 'package-lock.json' &&
|
|
131
|
+
data.packages?.['src/plugins/tui']?.version !== source)),
|
|
104
132
|
).length
|
|
105
133
|
if (changed || lockChanged) writeInventoryVersion(inventory, source)
|
|
106
134
|
return changed + lockChanged
|
|
@@ -114,6 +142,11 @@ function printDivergenceTable(result) {
|
|
|
114
142
|
item.version ?? 'MISSING',
|
|
115
143
|
item.ok ? 'ok' : 'DIVERGENT',
|
|
116
144
|
]),
|
|
145
|
+
...result.releaseMetadata.map((item) => [
|
|
146
|
+
item.name,
|
|
147
|
+
item.version ?? 'MISSING',
|
|
148
|
+
item.ok ? 'ok' : 'DIVERGENT',
|
|
149
|
+
]),
|
|
117
150
|
...result.locks.map((item) => [
|
|
118
151
|
item.name,
|
|
119
152
|
item.version ?? 'MISSING',
|
package/scripts/versioning.mjs
CHANGED
|
@@ -24,6 +24,7 @@ import { execFileSync } from 'node:child_process'
|
|
|
24
24
|
import { existsSync, readFileSync } from 'node:fs'
|
|
25
25
|
import { basename, dirname, join } from 'node:path'
|
|
26
26
|
import { fileURLToPath } from 'node:url'
|
|
27
|
+
import { mergeUnreleasedIntoVersion } from './changelog-merge.mjs'
|
|
27
28
|
import {
|
|
28
29
|
commitPreparedUpdates,
|
|
29
30
|
prepareInventoryVersion,
|
|
@@ -110,7 +111,15 @@ function analyzeConventionalCommits(since) {
|
|
|
110
111
|
function prepareManifests(newVersion) {
|
|
111
112
|
if (!SEMVER_PATTERN.test(newVersion)) throw new Error(`invalid version: ${newVersion}`)
|
|
112
113
|
const inventory = validateInventory(ROOT, { allowVersionDivergence: true })
|
|
113
|
-
|
|
114
|
+
const releaseMetadataFiles = new Set(
|
|
115
|
+
inventory.documents
|
|
116
|
+
.filter(({ entry }) => entry.role === 'metadata')
|
|
117
|
+
.map(({ entry }) => entry.file),
|
|
118
|
+
)
|
|
119
|
+
const updates = prepareInventoryVersion(inventory, newVersion).filter(
|
|
120
|
+
({ path }) => !releaseMetadataFiles.has(path.slice(ROOT.length + 1)),
|
|
121
|
+
)
|
|
122
|
+
return { inventory, updates }
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
/**
|
|
@@ -311,7 +320,7 @@ function prepareUnreleased(newVersion, dateStr, notesBody = null) {
|
|
|
311
320
|
// injection when interpolated next to the template's HTML comment.
|
|
312
321
|
const writtenBody = sanitizeCommentDelimiters(cleanedBody)
|
|
313
322
|
|
|
314
|
-
const newTemplate = `\n\n<!-- Add new changes here. Running \`node scripts/versioning.mjs apply\` will\n move this section to a versioned entry and reset the template below.
|
|
323
|
+
const newTemplate = `\n\n<!-- Add new changes here. Running \`node scripts/versioning.mjs apply\` will\n move this section to a versioned entry and reset the template below. -->`
|
|
315
324
|
const newVersionHeader = `## [v${newVersion}] - ${dateStr}`
|
|
316
325
|
|
|
317
326
|
const before = content.slice(0, idx)
|
|
@@ -471,6 +480,17 @@ switch (command) {
|
|
|
471
480
|
case 'changelog': {
|
|
472
481
|
const version = arg || getCurrentVersion()
|
|
473
482
|
const date = new Date().toISOString().slice(0, 10)
|
|
483
|
+
const currentChangelog = readFileSync(CHANGELOG_PATH, 'utf-8')
|
|
484
|
+
const mergePlan = mergeUnreleasedIntoVersion(currentChangelog, version)
|
|
485
|
+
if (mergePlan) {
|
|
486
|
+
if (mergePlan.changed) {
|
|
487
|
+
commitPreparedUpdates([{ path: CHANGELOG_PATH, content: mergePlan.content }])
|
|
488
|
+
console.log(` ✓ CHANGELOG: merged [Unreleased] into existing [v${version}]`)
|
|
489
|
+
} else {
|
|
490
|
+
console.log(` ✓ CHANGELOG: [Unreleased] is empty; [v${version}] unchanged`)
|
|
491
|
+
}
|
|
492
|
+
break
|
|
493
|
+
}
|
|
474
494
|
const changelogPlan = prepareUnreleased(version, date)
|
|
475
495
|
if (changelogPlan.changed) {
|
|
476
496
|
commitPreparedUpdates([{ path: CHANGELOG_PATH, content: changelogPlan.content }])
|
|
@@ -492,7 +512,7 @@ Commands:
|
|
|
492
512
|
--beta: advance the committed X.Y.Z-beta.N line and
|
|
493
513
|
promote [Unreleased] → [vX.Y.Z-beta.N] in CHANGELOG
|
|
494
514
|
beta Alias for 'apply --beta'
|
|
495
|
-
changelog [version] Promote [Unreleased]
|
|
515
|
+
changelog [version] Promote [Unreleased], or merge into an existing version section
|
|
496
516
|
|
|
497
517
|
Release flow (stable):
|
|
498
518
|
1. node scripts/versioning.mjs apply [minor]
|