pantheon-opencode 1.7.0 → 2.0.0-beta.2
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 +2 -2
- package/AGENTS.md +3 -3
- package/CHANGELOG.md +85 -59
- package/README.md +74 -48
- package/README.pt-BR.md +19 -19
- package/bin/pantheon-init.mjs +11 -48
- package/package.json +9 -13
- package/plugin.json +2 -2
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +7 -6
- package/scripts/{check-plugin-v2-coverage.mjs → check-plugin-coverage.mjs} +7 -7
- package/scripts/{decision-router-v2-budget.mjs → decision-router-budget-gates.mjs} +1 -1
- package/scripts/{decision-router-v2-egress.mjs → decision-router-egress.mjs} +1 -1
- package/scripts/decision-router.mjs +2 -2
- package/scripts/docs-media.mjs +1 -1
- package/scripts/doctor.mjs +225 -136
- package/scripts/install/behavior-overrides.bundle.mjs +123 -0
- package/scripts/install/{v2-capabilities.mjs → capabilities.mjs} +7 -7
- package/scripts/install/config-migration.mjs +60 -253
- package/scripts/install/file-inventory.mjs +6 -4
- package/scripts/install/interactive.mjs +1 -1
- package/scripts/install/opencode-state.mjs +13 -12
- package/scripts/install/opencode-version.mjs +97 -162
- package/scripts/install/opencode.mjs +271 -428
- package/scripts/install/plan.mjs +1 -9
- package/scripts/install/plugin.mjs +19 -35
- package/scripts/install/shared.mjs +40 -1
- package/scripts/package-evidence.mjs +1 -4
- package/scripts/probe-pantheon-cost.mjs +1 -1
- package/scripts/reconcile.mjs +5 -7
- package/scripts/release-gates.mjs +22 -61
- package/scripts/setup-v2-config.mjs +10 -8
- package/scripts/setup.mjs +12 -22
- package/scripts/sync-tui.mjs +9 -17
- package/scripts/{test-opencode-v2-sandbox.sh → test-opencode-sandbox.sh} +9 -9
- package/scripts/update-skills-lock.mjs +24 -12
- package/scripts/update.mjs +17 -1
- package/scripts/validate-routing.mjs +79 -4
- package/scripts/validate-sandbox-install.mjs +3 -3
- package/skills-lock.json +25 -8
- package/src/agents/zeus.md +1 -0
- package/src/pantheon/behavior-overrides.ts +191 -0
- package/src/pantheon/{v2-bounded-read.ts → bounded-read.ts} +1 -1
- package/src/pantheon/cost-command.ts +1 -1
- package/src/pantheon/{v2-decision-contracts.ts → decision-contracts.ts} +3 -3
- package/src/pantheon/{v2-decision-points → decision-points}/p1-agent.ts +3 -3
- package/src/pantheon/{v2-decision-points → decision-points}/p10-claims.ts +2 -2
- package/src/pantheon/{v2-decision-points → decision-points}/p11-catalog.ts +2 -2
- package/src/pantheon/{v2-decision-points → decision-points}/p2-skill.ts +3 -3
- package/src/pantheon/{v2-decision-points → decision-points}/p3-complexity.ts +6 -6
- package/src/pantheon/{v2-decision-points → decision-points}/p4-memory.ts +2 -2
- package/src/pantheon/{v2-decision-points → decision-points}/p5-themis-verify.ts +2 -2
- package/src/pantheon/{v2-decision-points → decision-points}/p6-council.ts +3 -3
- package/src/pantheon/{v2-decision-points → decision-points}/p7-loop.ts +5 -5
- package/src/pantheon/{v2-decision-points → decision-points}/p8-guardrail.ts +2 -2
- package/src/pantheon/{v2-decision-points → decision-points}/p9-memory-compaction.ts +2 -2
- package/src/pantheon/{v2-decision-points.ts → decision-points.ts} +5 -5
- package/src/pantheon/{v2-decision-policy.ts → decision-policy.ts} +2 -2
- package/src/pantheon/{v2-decision-prompt-surface.ts → decision-prompt-surface.ts} +3 -3
- package/src/pantheon/{v2-decision-registry.ts → decision-registry.ts} +10 -13
- package/src/pantheon/{v2-decision-resource-ids.ts → decision-resource-ids.ts} +1 -1
- package/src/pantheon/{v2-decision-shadow.ts → decision-shadow.ts} +1 -1
- package/src/pantheon/{v2-decision-telemetry.ts → decision-telemetry.ts} +1 -1
- package/src/pantheon/{v2-execute-after.ts → execute-after.ts} +4 -4
- package/src/pantheon/goal-store.ts +7 -0
- package/src/pantheon/{v2-hook-engine.ts → hook-engine.ts} +3 -3
- package/src/pantheon/jev-decision-tool.ts +3 -3
- package/src/pantheon/jev-decisions.ts +12 -6
- package/src/pantheon/jev-escalation.ts +6 -6
- package/src/pantheon/jev-quality-score.ts +2 -2
- package/src/pantheon/jev-rank-verify.ts +2 -2
- package/src/pantheon/jev-risk-gate.ts +4 -4
- package/src/pantheon/local-decision-agents.ts +1 -1
- package/src/pantheon/local-decision-router.ts +1 -1
- package/src/pantheon/local-decision-tool.ts +2 -2
- package/src/pantheon/local-orchestration.ts +1 -1
- package/src/pantheon/model-command.ts +1 -1
- package/src/pantheon/{v2-vision.ts → native-vision.ts} +12 -15
- package/src/pantheon/pantheon-decision-catalog.ts +12 -0
- package/src/pantheon/{v2-shell-hooks.ts → shell-hooks.ts} +4 -4
- package/src/pantheon/{v2-tools.ts → tools.ts} +4 -4
- package/src/pantheon/{v2-unsupported.d.mts → unsupported.d.mts} +3 -3
- package/src/pantheon/{v2-unsupported.mjs → unsupported.mjs} +8 -8
- package/src/pantheon/update-notifier.ts +101 -0
- package/src/pantheon/vision-local.ts +12 -3
- package/src/pantheon/vision.ts +120 -2
- package/src/{plugin-v2 → plugin}/index.ts +7 -7
- package/src/plugin.ts +2870 -500
- package/src/plugins/hook-runner.ts +3 -3
- package/src/plugins/tui/dist/server.d.ts +23 -9
- package/src/plugins/tui/dist/server.d.ts.map +1 -1
- package/src/plugins/tui/dist/server.js +25 -12
- package/src/plugins/tui/dist/server.js.map +1 -1
- package/src/plugins/tui/dist/tui.d.ts +1023 -494
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +5612 -2086
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/{index-v2.ts → index.ts} +1 -1
- package/src/plugins/tui/package-lock.json +2 -42
- package/src/plugins/tui/package.json +4 -10
- package/src/plugins/tui/src/cost-data.ts +1 -1
- package/src/plugins/tui/src/decision-router-state.ts +242 -0
- package/src/plugins/tui/src/doctor-state.ts +198 -0
- package/src/plugins/tui/src/index.tsx +4222 -2822
- package/src/plugins/tui/src/j1-gate-status.ts +85 -0
- package/src/plugins/tui/src/pantheon-settings-state.ts +245 -0
- package/src/plugins/tui/src/pantheon-settings.tsx +442 -0
- package/src/plugins/tui/src/preset-state.ts +143 -0
- package/src/plugins/tui/src/server.ts +23 -10
- package/src/plugins/tui/src/update-notice.ts +90 -0
- package/src/plugins/tui/src/update-status.ts +98 -0
- package/src/plugins/tui/tsconfig.typecheck.json +9 -2
- package/src/plugins/tui/tsdown.config.ts +3 -5
- package/src/plugins/tui/tui.ts +1 -2
- package/src/routing.yml +36 -0
- package/src/skills/README.md +16 -1
- package/src/skills/artifact-management/SKILL.md +10 -67
- package/src/skills/artifact-management/references/artifact-templates.md +71 -0
- package/src/skills/auto-continue/SKILL.md +10 -0
- package/src/skills/code-review-checklist/SKILL.md +11 -44
- package/src/skills/code-review-checklist/references/review-checklists.md +54 -0
- package/src/skills/instruction-forge/SKILL.md +57 -0
- package/src/skills/instruction-forge/references/agents-md-doctrine.md +50 -0
- package/src/skills/instruction-forge/references/eval-doctrine.md +37 -0
- package/src/skills/instruction-forge/references/skill-doctrine.md +62 -0
- package/src/skills/memory-bank/SKILL.md +11 -90
- package/src/skills/memory-bank/references/anti-patterns.md +33 -0
- package/src/skills/memory-bank/references/product-adoption.md +19 -0
- package/src/skills/memory-bank/references/storage-model.md +21 -0
- package/src/skills/memory-bank/references/structure-and-frequency.md +44 -0
- package/src/skills/reflect/SKILL.md +1 -0
- package/src/skills/session-goal/SKILL.md +7 -54
- package/src/skills/session-goal/references/goal-format.md +26 -0
- package/src/skills/session-goal/references/session-reuse.md +44 -0
- package/src/skills/tdd-with-agents/SKILL.md +11 -101
- package/src/skills/tdd-with-agents/references/advanced-testing-patterns.md +58 -0
- package/src/skills/tdd-with-agents/references/testing-by-layer.md +60 -0
- package/src/skills/visual-review-pipeline/SKILL.md +11 -120
- package/src/skills/visual-review-pipeline/references/findings-schema.md +49 -0
- package/src/skills/visual-review-pipeline/references/workflow-steps.md +111 -0
- package/scripts/hooks/log-session-start.sh +0 -48
- package/scripts/hooks/validate-post-conditions.sh +0 -21
- package/scripts/hooks/validate-talos-scope.sh +0 -50
- package/scripts/hooks/validate-tool-safety.sh +0 -49
- package/src/pantheon/goal-loop.ts +0 -314
- package/src/pantheon/idle-continuation.ts +0 -52
- package/src/pantheon/todo-preserve.ts +0 -301
- package/src/pantheon/tool-ceiling.ts +0 -159
- package/src/pantheon/v2-bridge.ts +0 -153
- package/src/plugin-v2.ts +0 -2954
- package/src/plugins/pantheon-hooks.ts +0 -1433
- package/src/plugins/tui/dist/server-v2.d.ts +0 -30
- package/src/plugins/tui/dist/server-v2.d.ts.map +0 -1
- package/src/plugins/tui/dist/server-v2.js +0 -33
- package/src/plugins/tui/dist/server-v2.js.map +0 -1
- package/src/plugins/tui/dist/tui-v2.d.ts +0 -1039
- package/src/plugins/tui/dist/tui-v2.d.ts.map +0 -1
- package/src/plugins/tui/dist/tui-v2.js +0 -4597
- package/src/plugins/tui/dist/tui-v2.js.map +0 -1
- package/src/plugins/tui/src/index-v2.tsx +0 -4496
- package/src/plugins/tui/src/server-v2.ts +0 -28
- package/src/plugins/tui/tui-v2.ts +0 -2
- /package/src/pantheon/{v2-decision-budget.ts → decision-budget.ts} +0 -0
- /package/src/pantheon/{v2-decision-egress.ts → decision-egress.ts} +0 -0
- /package/src/pantheon/{v2-decision-events.ts → decision-events.ts} +0 -0
- /package/src/pantheon/{v2-decision-heuristic.ts → decision-heuristic.ts} +0 -0
- /package/src/pantheon/{v2-decision-premises.ts → decision-premises.ts} +0 -0
- /package/src/pantheon/{v2-decision-rank.ts → decision-rank.ts} +0 -0
- /package/src/pantheon/{v2-decision-verify.ts → decision-verify.ts} +0 -0
- /package/src/pantheon/{v2-delegation-enforce.ts → delegation-policy.ts} +0 -0
- /package/src/pantheon/{v2-model-overrides.ts → model-overrides.ts} +0 -0
- /package/src/pantheon/{v2-native-decisions.ts → native-decisions.ts} +0 -0
- /package/src/plugins/tui/src/{opencode-v2.d.ts → opencode.d.ts} +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Claude Code stdin protocol: the hook scripts receive
|
|
11
11
|
* `{tool_name, tool_input, agent_id, session_id}` as JSON on stdin. Scripts
|
|
12
|
-
* that read env vars instead (
|
|
12
|
+
* that read env vars instead (on-subagent-delegation-*)
|
|
13
13
|
* get their fields mapped into the child env (SESSION_ID / AGENT_NAME /
|
|
14
14
|
* TASK_DESC) so both protocols work end to end.
|
|
15
15
|
*
|
|
@@ -63,7 +63,7 @@ export function resolveHooksDir(): string {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Map the Claude Code protocol payload into the child environment. Scripts
|
|
66
|
-
* that read env vars (
|
|
66
|
+
* that read env vars (delegation audit scripts) rely on
|
|
67
67
|
* these; scripts that read stdin receive the full JSON via `input` in runHook.
|
|
68
68
|
* PATH is always preserved so `python3`/`bash` resolution inside the scripts
|
|
69
69
|
* is never affected by a stripped-down environment.
|
|
@@ -85,7 +85,7 @@ export function hookEnv(
|
|
|
85
85
|
/**
|
|
86
86
|
* Run one hook script with the Claude Code protocol payload on stdin.
|
|
87
87
|
*
|
|
88
|
-
* @param script file name inside scripts/hooks/ (e.g. "
|
|
88
|
+
* @param script file name inside scripts/hooks/ (e.g. "scan-secrets.sh")
|
|
89
89
|
* @param payload protocol payload translated from the opencode hook event
|
|
90
90
|
* @param opts optional env overrides / cwd / timeout
|
|
91
91
|
* @returns HookResult — NEVER throws; resolve with a non-zero code instead
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
//#region src/server.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* No-op server stub for the
|
|
3
|
+
* No-op server stub for the OpenCode V2 plugin loader.
|
|
4
4
|
*
|
|
5
|
-
* The
|
|
6
|
-
* `server()` entry via `exports["./server"]` (or package.json `main`)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* The OpenCode plugin host requires every plugin (TUI included) to expose a
|
|
6
|
+
* `server()` entry via `exports["./server"]` (or package.json `main`) — for the
|
|
7
|
+
* V2 copy this root `index-v2.ts` re-export resolves to this compiled entry —
|
|
8
|
+
* and it loads that server half only from a `config.plugins` entry (see
|
|
9
|
+
* `scripts/install/opencode.mjs`). When the entry is missing the host fails to
|
|
10
|
+
* attach the plugin's server half and the TUI runtime never wires the reactive
|
|
11
|
+
* channel — the initial JSX mounts but effects/refresh/events stay dead (the
|
|
12
|
+
* "mudo panel" symptom; same contract as the V1 `server.ts` stub).
|
|
10
13
|
*
|
|
11
|
-
* This stub satisfies the loader contract
|
|
12
|
-
*
|
|
14
|
+
* This stub satisfies the loader contract. Field report (beta.13): host 2.2.5
|
|
15
|
+
* validates the default export as a DEFINITION OBJECT — "Plugin must export a
|
|
16
|
+
* default definition with an id and an effect or setup function
|
|
17
|
+
* (SchemaError(Expected object at ["default"]))" — the bare `server()`
|
|
18
|
+
* function form failed that schema on every boot (~3.4k load failures in the
|
|
19
|
+
* host log). The native quota RPC that used to live here was removed in 1.6.2
|
|
20
|
+
* — provider quota/usage visibility is now the community plugin's job
|
|
21
|
+
* (`@slkiser/opencode-quota`, docs/tui-quota-providers.md) — and
|
|
22
|
+
* pantheon-tui has no other background server work of its own.
|
|
13
23
|
*/
|
|
14
|
-
|
|
24
|
+
declare const _default: {
|
|
25
|
+
id: string;
|
|
26
|
+
setup(): {};
|
|
27
|
+
};
|
|
15
28
|
//#endregion
|
|
29
|
+
export { _default as default };
|
|
16
30
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","names":[],"sources":["../src/server.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cAAA;EAuBE;EACA"}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
//#region src/server.ts
|
|
2
2
|
/**
|
|
3
|
-
* No-op server stub for the
|
|
3
|
+
* No-op server stub for the OpenCode V2 plugin loader.
|
|
4
4
|
*
|
|
5
|
-
* The
|
|
6
|
-
* `server()` entry via `exports["./server"]` (or package.json `main`)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* The OpenCode plugin host requires every plugin (TUI included) to expose a
|
|
6
|
+
* `server()` entry via `exports["./server"]` (or package.json `main`) — for the
|
|
7
|
+
* V2 copy this root `index-v2.ts` re-export resolves to this compiled entry —
|
|
8
|
+
* and it loads that server half only from a `config.plugins` entry (see
|
|
9
|
+
* `scripts/install/opencode.mjs`). When the entry is missing the host fails to
|
|
10
|
+
* attach the plugin's server half and the TUI runtime never wires the reactive
|
|
11
|
+
* channel — the initial JSX mounts but effects/refresh/events stay dead (the
|
|
12
|
+
* "mudo panel" symptom; same contract as the V1 `server.ts` stub).
|
|
10
13
|
*
|
|
11
|
-
* This stub satisfies the loader contract
|
|
12
|
-
*
|
|
14
|
+
* This stub satisfies the loader contract. Field report (beta.13): host 2.2.5
|
|
15
|
+
* validates the default export as a DEFINITION OBJECT — "Plugin must export a
|
|
16
|
+
* default definition with an id and an effect or setup function
|
|
17
|
+
* (SchemaError(Expected object at ["default"]))" — the bare `server()`
|
|
18
|
+
* function form failed that schema on every boot (~3.4k load failures in the
|
|
19
|
+
* host log). The native quota RPC that used to live here was removed in 1.6.2
|
|
20
|
+
* — provider quota/usage visibility is now the community plugin's job
|
|
21
|
+
* (`@slkiser/opencode-quota`, docs/tui-quota-providers.md) — and
|
|
22
|
+
* pantheon-tui has no other background server work of its own.
|
|
13
23
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
var server_default = {
|
|
25
|
+
id: "pantheon.tui.server",
|
|
26
|
+
setup() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
17
30
|
//#endregion
|
|
18
|
-
export {
|
|
31
|
+
export { server_default as default };
|
|
19
32
|
|
|
20
33
|
//# sourceMappingURL=server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","names":[],"sources":["../src/server.ts"],"sourcesContent":["/**\n * No-op server stub for the
|
|
1
|
+
{"version":3,"file":"server.js","names":[],"sources":["../src/server.ts"],"sourcesContent":["/**\n * No-op server stub for the OpenCode V2 plugin loader.\n *\n * The OpenCode plugin host requires every plugin (TUI included) to expose a\n * `server()` entry via `exports[\"./server\"]` (or package.json `main`) — for the\n * V2 copy this root `index-v2.ts` re-export resolves to this compiled entry —\n * and it loads that server half only from a `config.plugins` entry (see\n * `scripts/install/opencode.mjs`). When the entry is missing the host fails to\n * attach the plugin's server half and the TUI runtime never wires the reactive\n * channel — the initial JSX mounts but effects/refresh/events stay dead (the\n * \"mudo panel\" symptom; same contract as the V1 `server.ts` stub).\n *\n * This stub satisfies the loader contract. Field report (beta.13): host 2.2.5\n * validates the default export as a DEFINITION OBJECT — \"Plugin must export a\n * default definition with an id and an effect or setup function\n * (SchemaError(Expected object at [\"default\"]))\" — the bare `server()`\n * function form failed that schema on every boot (~3.4k load failures in the\n * host log). The native quota RPC that used to live here was removed in 1.6.2\n * — provider quota/usage visibility is now the community plugin's job\n * (`@slkiser/opencode-quota`, docs/tui-quota-providers.md) — and\n * pantheon-tui has no other background server work of its own.\n */\nexport default {\n id: 'pantheon.tui.server',\n setup() {\n return {}\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAA,iBAAe;CACb,IAAI;CACJ,QAAQ;EACN,OAAO,CAAC;CACV;AACF"}
|