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
package/src/plugin.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
zeusReadGuard,
|
|
19
19
|
} from './pantheon/delegation-enforce.ts'
|
|
20
20
|
import { GOAL_LOOP_DEFAULTS, GoalLoop, GoalStore } from './pantheon/goal-loop.ts'
|
|
21
|
+
import { createGuardPathResolver } from './pantheon/guard-path.ts'
|
|
21
22
|
import { createReadEnhancer } from './pantheon/hashline/read-enhancer.ts'
|
|
22
23
|
import { createHashlineEditTool } from './pantheon/hashline/tool.ts'
|
|
23
24
|
import { createIdleDispatcher } from './pantheon/idle-continuation.ts'
|
|
@@ -37,6 +38,7 @@ import {
|
|
|
37
38
|
import { TodoPreserver } from './pantheon/todo-preserve.ts'
|
|
38
39
|
import { handleToolCeilingEvent, type ToolCeilingResult } from './pantheon/tool-ceiling.ts'
|
|
39
40
|
import { checkTuiVersionStaleness } from './pantheon/tui-version-check.ts'
|
|
41
|
+
import { createV2Bridge, registerV2Bridge } from './pantheon/v2-bridge.ts'
|
|
40
42
|
import { activePresetCandidates, createVisionHandler } from './pantheon/vision.ts'
|
|
41
43
|
|
|
42
44
|
// ─── Background Job Board Singleton ────────────────────────────────────
|
|
@@ -238,15 +240,18 @@ function adaptTodoEnforcerClient(client: PluginInput['client']): TodoEnforcerCli
|
|
|
238
240
|
|
|
239
241
|
/**
|
|
240
242
|
* Pantheon plugin for OpenCode. Pasted images are intercepted via the
|
|
241
|
-
* `chat.message` hook (proven to fire in opencode 1.18.11).
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
243
|
+
* `chat.message` hook (proven to fire in opencode 1.18.11). Credentials follow
|
|
244
|
+
* the endpoint: a Zen endpoint (`opencode` / `opencode-go*`) may use the shared
|
|
245
|
+
* `PANTHEON_OPENCODE_API_KEY` / `OPENCODE_API_KEY` env keys and the legacy
|
|
246
|
+
* `opencode-go` / `opencode` auth-store entries, while a non-Zen endpoint uses
|
|
247
|
+
* ONLY its own auth-store entry (never the Zen env keys or legacy entries).
|
|
248
|
+
* When a credential is available the image is described NATIVELY by the
|
|
249
|
+
* multimodal model via the endpoint's OpenAI-compatible API, and replaced with
|
|
250
|
+
* the text description — no MCP tool required. Without a credential the legacy
|
|
251
|
+
* pattern applies: the image is replaced with a text instruction telling the
|
|
252
|
+
* model to call a vision MCP tool (default `pantheon_vision_vision_describe`).
|
|
253
|
+
* Either way the image never reaches the main provider, so text-only models
|
|
254
|
+
* cannot fail with an `image_url` error.
|
|
250
255
|
*
|
|
251
256
|
* The canonical `pantheon-vision` MCP owns the standalone describe/OCR/analyze
|
|
252
257
|
* tools. The installed OpenCode plugin API exposes no stable pre-provider
|
|
@@ -276,6 +281,14 @@ const plugin: Plugin = async (input: PluginInput) => {
|
|
|
276
281
|
// Runtime TUI version staleness check — warns if the copied TUI plugin
|
|
277
282
|
// is older than the installed package. Runs once, fail-open, no auto-sync.
|
|
278
283
|
checkTuiVersionStaleness((msg) => log.warn(msg))
|
|
284
|
+
// Symlink resolution for the Zeus read guard (#272). The guard predicate is
|
|
285
|
+
// pure and synchronous, so the filesystem work happens here instead: one
|
|
286
|
+
// resolver per plugin instance, rooted at the project directory the host
|
|
287
|
+
// reported. `docs/link → ../src` must not read `src/` just because the
|
|
288
|
+
// string path looks harmless.
|
|
289
|
+
const resolveGuardPath = createGuardPathResolver(
|
|
290
|
+
input.directory || input.worktree || process.cwd(),
|
|
291
|
+
)
|
|
279
292
|
const vision = createVisionHandler(input)
|
|
280
293
|
// Wave 1 (PR #46): TODO continuation enforcer for root sessions. The event
|
|
281
294
|
// hook routes `session.idle` events here; an active goal owns the idle
|
|
@@ -297,8 +310,9 @@ const plugin: Plugin = async (input: PluginInput) => {
|
|
|
297
310
|
client: adaptTodoEnforcerClient(input.client),
|
|
298
311
|
})
|
|
299
312
|
|
|
300
|
-
// Wave 3 (PR #46):
|
|
301
|
-
//
|
|
313
|
+
// Wave 3 (PR #46): goal loop. The plugin uses hard-coded GOAL_LOOP_DEFAULTS;
|
|
314
|
+
// routing.yml documents defaults/guards but no runtime config enables the
|
|
315
|
+
// loop in this build. File-based GoalStore
|
|
302
316
|
// (`.pantheon/goals/<sessionID>.json` — the plugin layer cannot reach MCP
|
|
303
317
|
// KV). Idle routing: an active goal owns the idle (goal loop); otherwise
|
|
304
318
|
// the todo enforcer gets it (see idle-continuation.ts).
|
|
@@ -312,6 +326,14 @@ const plugin: Plugin = async (input: PluginInput) => {
|
|
|
312
326
|
const goalTools = goalLoop.tools()
|
|
313
327
|
const idleDispatcher = createIdleDispatcher({ goalLoop, todoEnforcer })
|
|
314
328
|
|
|
329
|
+
// Cross-generation bridge (issue #265 review): publish THESE singletons so a
|
|
330
|
+
// V2 plugin loaded in the same process reuses this enforcer instead of
|
|
331
|
+
// building a second one. Two enforcers would answer one `session.idle` twice
|
|
332
|
+
// — V1's dispatcher below and V2's `onSessionIdle` would each inject a
|
|
333
|
+
// continuation prompt. Registration is a no-op on a V1-only install: nothing
|
|
334
|
+
// in this process reads the registry unless a V2 entry resolves it.
|
|
335
|
+
registerV2Bridge(createV2Bridge({ board, todoEnforcer }))
|
|
336
|
+
|
|
315
337
|
// Wave 2 (PR #46): hashline — tag-anchored edits. The read enhancer
|
|
316
338
|
// (tool.execute.after) augments `read` output with per-line sha256 tags
|
|
317
339
|
// (`12#XJ|content`); hashline_edit anchors edits to those refs. Additive —
|
|
@@ -474,8 +496,10 @@ const plugin: Plugin = async (input: PluginInput) => {
|
|
|
474
496
|
// read-only enforcement guard (denies mutating tools in read-only
|
|
475
497
|
// sessions), then release-134 Phase 3 rewrites the first
|
|
476
498
|
// post-compaction `todowrite` with the captured todo snapshot. All are
|
|
477
|
-
// no-ops for non-matching sessions/tools.
|
|
478
|
-
|
|
499
|
+
// no-ops for non-matching sessions/tools. The read guard also checks the
|
|
500
|
+
// SYMLINK-RESOLVED form of every target path (#272), so a link into a
|
|
501
|
+
// denied root cannot pass on its string spelling.
|
|
502
|
+
zeusReadGuard(input.tool, output?.args, sessionAgents.get(input.sessionID), resolveGuardPath)
|
|
479
503
|
await enforcementGuard(input, output)
|
|
480
504
|
await commandNormalizer(input, output)
|
|
481
505
|
await todoPreserver.beforeTodoWrite(input, output)
|