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
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* pantheon-tui — Pantheon TUI plugin for opencode.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* V1 bundle: `tsdown` emits `dist/tui.js`, re-exported by root `tui.ts`.
|
|
9
|
+
* OpenCode V2 uses the separate `src/index-v2.tsx` entry and native CLI plugin
|
|
10
|
+
* API. No raw TSX implementation is shipped. Because the bundle inlines relative
|
|
11
11
|
* imports, this entry may be split into modules without breaking the loader.
|
|
12
12
|
*
|
|
13
13
|
* Slots:
|
|
@@ -53,16 +53,7 @@ import { homedir } from 'node:os'
|
|
|
53
53
|
import { dirname, join } from 'node:path'
|
|
54
54
|
import { fileURLToPath } from 'node:url'
|
|
55
55
|
import type { TuiPlugin, TuiPluginApi, TuiPluginModule } from '@opencode-ai/plugin/tui'
|
|
56
|
-
import {
|
|
57
|
-
createEffect,
|
|
58
|
-
createMemo,
|
|
59
|
-
createResource,
|
|
60
|
-
createSignal,
|
|
61
|
-
For,
|
|
62
|
-
onCleanup,
|
|
63
|
-
onMount,
|
|
64
|
-
Show,
|
|
65
|
-
} from 'solid-js'
|
|
56
|
+
import { createMemo, createResource, createSignal, For, onCleanup, onMount, Show } from 'solid-js'
|
|
66
57
|
|
|
67
58
|
// ─── Double-load guard (mirrors src/pantheon/plugin-once.ts) ───────────────
|
|
68
59
|
// Opencode merges global + project plugin paths, so this module can load twice
|
|
@@ -919,9 +910,9 @@ async function setupUsageBar(api: TuiPluginApi) {
|
|
|
919
910
|
* (filterDelegationsToSession) drops every non-focused report — the panel
|
|
920
911
|
* lists only the focused session.
|
|
921
912
|
*
|
|
922
|
-
* 3. REFRESH — session.created/updated/deleted/status events and
|
|
923
|
-
*
|
|
924
|
-
*
|
|
913
|
+
* 3. REFRESH — session.created/updated/deleted/status events and live-store
|
|
914
|
+
* subscription notifications re-fetch children; a 1s safety poll
|
|
915
|
+
* (oh-my-opencode-slim pattern) re-fetches
|
|
925
916
|
* children + re-reads the md so the panel updates EVEN without events.
|
|
926
917
|
*
|
|
927
918
|
* 4. DIAGNOSTICS — every re-fetch logs
|
|
@@ -947,8 +938,8 @@ async function setupUsageBar(api: TuiPluginApi) {
|
|
|
947
938
|
* panel renders EMPTY — zero rows, zero errors.
|
|
948
939
|
*
|
|
949
940
|
* The live tool-part lifecycle helpers below remain (tested, exported) but
|
|
950
|
-
* are no longer the source of truth: they
|
|
951
|
-
* re-
|
|
941
|
+
* are no longer the source of truth: they update the shared live store, whose
|
|
942
|
+
* subscribers re-trigger the children fetch. Everything is fail-open: a missing
|
|
952
943
|
* children API or directory yields [], and any unreadable input is skipped —
|
|
953
944
|
* never crash. */
|
|
954
945
|
|
|
@@ -2631,18 +2622,88 @@ function DelegationRow(props: {
|
|
|
2631
2622
|
|
|
2632
2623
|
/* ─── Main Sidebar View ──────────────────────────────────── */
|
|
2633
2624
|
|
|
2634
|
-
/** Plugin-level live delegation store shared
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
2637
|
-
* durable child list and also reads the map as an optimistic live source. */
|
|
2625
|
+
/** Plugin-level live delegation store shared by event subscriptions and View.
|
|
2626
|
+
* Mutations notify subscribers so the View can refresh its durable child
|
|
2627
|
+
* list while also reading the map as an optimistic live source. */
|
|
2638
2628
|
export type LiveDelegationStore = {
|
|
2639
2629
|
map: Map<string, LiveDelegationEntry>
|
|
2640
|
-
/**
|
|
2641
|
-
|
|
2642
|
-
/**
|
|
2630
|
+
/** Subscribe to invalidations consumed by the sidebar's refresh path. */
|
|
2631
|
+
subscribe: (listener: () => void) => () => void
|
|
2632
|
+
/** Notify sidebar subscribers after a live mutation. */
|
|
2643
2633
|
bump: () => void
|
|
2644
2634
|
}
|
|
2645
2635
|
|
|
2636
|
+
/** Create the observable live store shared by task events and the sidebar. */
|
|
2637
|
+
export function createLiveDelegationStore(): LiveDelegationStore {
|
|
2638
|
+
const listeners = new Set<() => void>()
|
|
2639
|
+
return {
|
|
2640
|
+
map: new Map<string, LiveDelegationEntry>(),
|
|
2641
|
+
subscribe(listener) {
|
|
2642
|
+
listeners.add(listener)
|
|
2643
|
+
return () => listeners.delete(listener)
|
|
2644
|
+
},
|
|
2645
|
+
bump() {
|
|
2646
|
+
for (const listener of listeners) listener()
|
|
2647
|
+
},
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
/** Register the live task-part events that invalidate the sidebar store. */
|
|
2652
|
+
export function registerLiveDelegationEvents(
|
|
2653
|
+
api: TuiPluginApi,
|
|
2654
|
+
liveStore: LiveDelegationStore,
|
|
2655
|
+
): () => void {
|
|
2656
|
+
const unsubLive: (() => void)[] = []
|
|
2657
|
+
|
|
2658
|
+
try {
|
|
2659
|
+
unsubLive.push(
|
|
2660
|
+
api.event.on('message.part.updated', (event: unknown) => {
|
|
2661
|
+
// SDK v2 shape: properties.part (v1 drift: properties.info.part).
|
|
2662
|
+
const props = ((event as { properties?: unknown } | null)?.properties ?? {}) as {
|
|
2663
|
+
part?: unknown
|
|
2664
|
+
info?: { part?: unknown }
|
|
2665
|
+
}
|
|
2666
|
+
const part = (props.part ?? props.info?.part) as DelegationToolPart | undefined
|
|
2667
|
+
if (part === undefined) return
|
|
2668
|
+
// beta.6: track the live tool call per child session (panel's
|
|
2669
|
+
// activity line). Fire-and-forget — display-only state.
|
|
2670
|
+
const sample = extractToolActivity(part as Parameters<typeof extractToolActivity>[0])
|
|
2671
|
+
if (sample !== null)
|
|
2672
|
+
trackToolActivity(latestToolActivity, sample.sessionID, sample.activity)
|
|
2673
|
+
if (reduceDelegationToolPart(liveStore.map, part)) liveStore.bump()
|
|
2674
|
+
}),
|
|
2675
|
+
)
|
|
2676
|
+
} catch {
|
|
2677
|
+
/* events API unavailable — children API + 1s poll cover the panel */
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
try {
|
|
2681
|
+
unsubLive.push(
|
|
2682
|
+
api.event.on('message.part.removed', (event: unknown) => {
|
|
2683
|
+
// SDK v2 shape: properties.partID (v1 drift: properties.part.id).
|
|
2684
|
+
const props = ((event as { properties?: unknown } | null)?.properties ?? {}) as {
|
|
2685
|
+
partID?: string
|
|
2686
|
+
part?: { id?: string }
|
|
2687
|
+
}
|
|
2688
|
+
const partID = props.partID ?? props.part?.id
|
|
2689
|
+
if (partID !== undefined && removeDelegationEntry(liveStore.map, partID)) liveStore.bump()
|
|
2690
|
+
}),
|
|
2691
|
+
)
|
|
2692
|
+
} catch {
|
|
2693
|
+
/* events API unavailable — children API + 1s poll cover the panel */
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
return () => {
|
|
2697
|
+
for (const unsub of unsubLive) {
|
|
2698
|
+
try {
|
|
2699
|
+
unsub()
|
|
2700
|
+
} catch {
|
|
2701
|
+
/* ignore */
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2646
2707
|
function View(props: {
|
|
2647
2708
|
api: TuiPluginApi
|
|
2648
2709
|
sessionID: string | undefined
|
|
@@ -2758,7 +2819,7 @@ function View(props: {
|
|
|
2758
2819
|
// means the event bus isn't delivering, and the 1s poll is what keeps
|
|
2759
2820
|
// the panel honest.
|
|
2760
2821
|
let eventRefreshCount = 0
|
|
2761
|
-
// In-flight guard: overlap between the poll, events and
|
|
2822
|
+
// In-flight guard: overlap between the poll, events and store subscribers
|
|
2762
2823
|
// collapses into one fetch — no duplicate work, no duplicate entries.
|
|
2763
2824
|
let delegationsInflight: Promise<void> | null = null
|
|
2764
2825
|
const refreshDelegations = () => {
|
|
@@ -2910,14 +2971,17 @@ function View(props: {
|
|
|
2910
2971
|
/* events API not available — the 1s poll still covers it */
|
|
2911
2972
|
}
|
|
2912
2973
|
|
|
2913
|
-
//
|
|
2914
|
-
//
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2974
|
+
// Task-part events invalidate the same store the panel reads, refreshing
|
|
2975
|
+
// children when those events arrive and making optimistic live rows visible.
|
|
2976
|
+
cleanup.push(
|
|
2977
|
+
props.liveStore.subscribe(() => {
|
|
2978
|
+
eventRefreshCount += 1
|
|
2979
|
+
void refreshDelegations()
|
|
2980
|
+
}),
|
|
2981
|
+
)
|
|
2982
|
+
// Fetch the initial state; future updates use the store subscription above.
|
|
2983
|
+
eventRefreshCount += 1
|
|
2984
|
+
void refreshDelegations()
|
|
2921
2985
|
|
|
2922
2986
|
// Safety poll (OMO-slim pattern): 1s re-fetch children + md + tick the
|
|
2923
2987
|
// elapsed counter. Guarantees the panel updates even with zero events.
|
|
@@ -2935,8 +2999,8 @@ function View(props: {
|
|
|
2935
2999
|
// compacting, so after a compaction/attach the live map would start
|
|
2936
3000
|
// empty even though the session still holds the delegation tool parts.
|
|
2937
3001
|
// Re-seed the live map from the session's existing parts (in message
|
|
2938
|
-
// order) right after the subscriptions are registered — the
|
|
2939
|
-
//
|
|
3002
|
+
// order) right after the subscriptions are registered — the store
|
|
3003
|
+
// notification re-triggers the children fetch. Fail-open: if the SDK access is
|
|
2940
3004
|
// unavailable we skip — the children API + the 1s poll keep the panel
|
|
2941
3005
|
// working.
|
|
2942
3006
|
try {
|
|
@@ -3072,61 +3136,18 @@ const tui: TuiPlugin = (api, _options, _meta) => {
|
|
|
3072
3136
|
// Vendored feature (MIT): AI subscription usage gauges.
|
|
3073
3137
|
void setupUsageBar(api) // async init — never blocks sidebar registration
|
|
3074
3138
|
|
|
3075
|
-
// ── Live delegation store (tool-part tracker
|
|
3076
|
-
// TRIGGER) ──
|
|
3139
|
+
// ── Live delegation store (tool-part tracker + sidebar invalidation) ──
|
|
3077
3140
|
// The Delegations panel's PRIMARY source is `api.client.session.children`
|
|
3078
3141
|
// (delegations-sidebar pattern) — `message.part.updated` may not fire for
|
|
3079
3142
|
// the native task tool on runtime 1.18.13 (the "(0)" symptom). The
|
|
3080
|
-
// tool-part lifecycle below still tracks `task` parts and
|
|
3081
|
-
//
|
|
3143
|
+
// tool-part lifecycle below still tracks `task` parts and invalidates the
|
|
3144
|
+
// store subscription consumed by the View: when part events DO arrive, the panel
|
|
3082
3145
|
// re-fetches children. Fail-open: if the events API is unavailable nothing
|
|
3083
3146
|
// subscribes and the 1s safety poll keeps the panel working (never crash).
|
|
3084
|
-
const
|
|
3085
|
-
const
|
|
3086
|
-
map: new Map<string, LiveDelegationEntry>(),
|
|
3087
|
-
version: liveVersion,
|
|
3088
|
-
bump: () => setLiveVersion((v) => v + 1),
|
|
3089
|
-
}
|
|
3090
|
-
const unsubLive: (() => void)[] = []
|
|
3091
|
-
|
|
3092
|
-
try {
|
|
3093
|
-
unsubLive.push(
|
|
3094
|
-
api.event.on('message.part.updated', (event: any) => {
|
|
3095
|
-
// SDK v2 shape: properties.part (v1 drift: properties.info.part).
|
|
3096
|
-
const props = (event?.properties ?? {}) as { part?: unknown; info?: { part?: unknown } }
|
|
3097
|
-
const part = (props.part ?? props.info?.part) as DelegationToolPart | undefined
|
|
3098
|
-
if (part === undefined) return
|
|
3099
|
-
// beta.6: track the live tool call per child session (panel's
|
|
3100
|
-
// activity line). Fire-and-forget — display-only state.
|
|
3101
|
-
const sample = extractToolActivity(part as any)
|
|
3102
|
-
if (sample !== null)
|
|
3103
|
-
trackToolActivity(latestToolActivity, sample.sessionID, sample.activity)
|
|
3104
|
-
if (reduceDelegationToolPart(liveStore.map, part)) liveStore.bump()
|
|
3105
|
-
}),
|
|
3106
|
-
)
|
|
3107
|
-
} catch {
|
|
3108
|
-
/* events API unavailable — children API + 1s poll cover the panel */
|
|
3109
|
-
}
|
|
3110
|
-
try {
|
|
3111
|
-
unsubLive.push(
|
|
3112
|
-
api.event.on('message.part.removed', (event: any) => {
|
|
3113
|
-
// SDK v2 shape: properties.partID (v1 drift: properties.part.id).
|
|
3114
|
-
const props = (event?.properties ?? {}) as { partID?: string; part?: { id?: string } }
|
|
3115
|
-
const partID = props.partID ?? props.part?.id
|
|
3116
|
-
if (partID !== undefined && removeDelegationEntry(liveStore.map, partID)) liveStore.bump()
|
|
3117
|
-
}),
|
|
3118
|
-
)
|
|
3119
|
-
} catch {
|
|
3120
|
-
/* events API unavailable — children API + 1s poll cover the panel */
|
|
3121
|
-
}
|
|
3147
|
+
const liveStore = createLiveDelegationStore()
|
|
3148
|
+
const unsubscribeLive = registerLiveDelegationEvents(api, liveStore)
|
|
3122
3149
|
api.lifecycle.onDispose(() => {
|
|
3123
|
-
|
|
3124
|
-
try {
|
|
3125
|
-
unsub()
|
|
3126
|
-
} catch {
|
|
3127
|
-
/* ignore */
|
|
3128
|
-
}
|
|
3129
|
-
}
|
|
3150
|
+
unsubscribeLive()
|
|
3130
3151
|
liveStore.map.clear()
|
|
3131
3152
|
})
|
|
3132
3153
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": "Typecheck gate for the V2 TUI entry only. `tsc --noEmit` at the package root was a no-op: with no tsconfig in this directory tsc walked up to the repo tsconfig.json, which excludes src/plugins/tui entirely — so nothing here was checked. tsdown bundles without type-checking, which is how an invalid event name (session.updated, absent from the OpenCode V2 event union) shipped in the V2 rewrite. This config points tsc at the V2 entry plus its ambient declarations so a type error in src/index-v2.tsx fails `npm run typecheck`. The V1 entry (src/index.tsx) is intentionally NOT included: it carries pre-existing type errors out of scope for the V2 gate. Keep this file strict JSON — the repo pre-commit `check-json` hook rejects comments.",
|
|
3
|
+
"extends": "./tsconfig.build.json",
|
|
4
|
+
"include": ["src/index-v2.tsx", "src/opencode-v2.d.ts"]
|
|
5
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { appendFile, readdir, readFile } from 'node:fs/promises'
|
|
2
3
|
import { join } from 'node:path'
|
|
3
4
|
import { fileURLToPath } from 'node:url'
|
|
4
5
|
import solid from 'rolldown-plugin-solid'
|
|
@@ -9,13 +10,31 @@ const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8')) as
|
|
|
9
10
|
version: string
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
async function ensureDistArtifactsEndWithNewline(): Promise<void> {
|
|
14
|
+
const dist = join(__dirname, 'dist')
|
|
15
|
+
const entries = await readdir(dist, { withFileTypes: true })
|
|
16
|
+
|
|
17
|
+
await Promise.all(
|
|
18
|
+
entries
|
|
19
|
+
.filter((entry) => entry.isFile())
|
|
20
|
+
.map(async ({ name }) => {
|
|
21
|
+
const path = join(dist, name)
|
|
22
|
+
const contents = await readFile(path, 'utf8')
|
|
23
|
+
if (!contents.endsWith('\n')) await appendFile(path, '\n')
|
|
24
|
+
}),
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
12
28
|
export default defineConfig({
|
|
13
|
-
entry: { tui: 'src/index.tsx', server: 'src/server.ts' },
|
|
29
|
+
entry: { tui: 'src/index.tsx', 'tui-v2': 'src/index-v2.tsx', server: 'src/server.ts' },
|
|
14
30
|
format: ['esm'],
|
|
15
31
|
platform: 'node',
|
|
16
32
|
outDir: 'dist',
|
|
17
33
|
clean: true,
|
|
18
34
|
outExtensions: () => ({ js: '.js' }),
|
|
35
|
+
dts: {
|
|
36
|
+
tsconfig: join(__dirname, 'tsconfig.build.json'),
|
|
37
|
+
},
|
|
19
38
|
define: {
|
|
20
39
|
__PANTHEON_VERSION__: JSON.stringify(pkg.version),
|
|
21
40
|
},
|
|
@@ -28,6 +47,7 @@ export default defineConfig({
|
|
|
28
47
|
}),
|
|
29
48
|
],
|
|
30
49
|
deps: {
|
|
31
|
-
neverBundle: [/^@opencode-ai\//, /^@opentui\//, /^solid-js/],
|
|
50
|
+
neverBundle: [/^@opencode-ai\//, /^@opencode\//, /^@opentui\//, /^solid-js/],
|
|
32
51
|
},
|
|
52
|
+
onSuccess: ensureDistArtifactsEndWithNewline,
|
|
33
53
|
})
|
package/src/routing.yml
CHANGED
|
@@ -3,7 +3,7 @@ presets:
|
|
|
3
3
|
go-free:
|
|
4
4
|
description: "Free-tier lineup via OpenCode Zen 2026: big-pickle orchestrator, nemotron-3-super-free planner, qwen3.6-plus-free reviewer, deepseek-v4-flash-free implementers, mimo-v2.5-free scouts. Only -free suffix models; quota, availability and pricing depend on Zen account. 2026 pricing verified."
|
|
5
5
|
vision:
|
|
6
|
-
model: opencode/mimo-v2.
|
|
6
|
+
model: opencode/mimo-v2.6-flash-free
|
|
7
7
|
reasoning_effort: low
|
|
8
8
|
providers:
|
|
9
9
|
opencode:
|
|
@@ -99,7 +99,6 @@ presets:
|
|
|
99
99
|
agents:
|
|
100
100
|
zeus:
|
|
101
101
|
role: Central orchestrator
|
|
102
|
-
max_steps: 40 # R4: step budget — at max_steps the agent is forced to summarize-and-stop. Tracker is permanent-per-process (no reset wiring).
|
|
103
102
|
reasoning_effort: medium
|
|
104
103
|
user_invocable: true
|
|
105
104
|
can_delegate: true
|
|
@@ -134,11 +133,9 @@ agents:
|
|
|
134
133
|
- artifact-management
|
|
135
134
|
- context-compression
|
|
136
135
|
- auto-continue
|
|
137
|
-
- orchestration-workflow
|
|
138
136
|
- incremental-implementation
|
|
139
137
|
athena:
|
|
140
138
|
role: Strategic planner
|
|
141
|
-
max_steps: 15 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
142
139
|
reasoning_effort: high
|
|
143
140
|
user_invocable: true
|
|
144
141
|
can_delegate: true
|
|
@@ -158,7 +155,6 @@ agents:
|
|
|
158
155
|
- memory-bank
|
|
159
156
|
apollo:
|
|
160
157
|
role: Investigation scout
|
|
161
|
-
max_steps: 25 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
162
158
|
reasoning_effort: low
|
|
163
159
|
user_invocable: false
|
|
164
160
|
can_delegate: false
|
|
@@ -176,7 +172,6 @@ agents:
|
|
|
176
172
|
- auto-continue
|
|
177
173
|
hermes:
|
|
178
174
|
role: Backend specialist
|
|
179
|
-
max_steps: 60 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
180
175
|
reasoning_effort: medium
|
|
181
176
|
user_invocable: true
|
|
182
177
|
can_delegate: true
|
|
@@ -199,7 +194,6 @@ agents:
|
|
|
199
194
|
- incremental-implementation
|
|
200
195
|
aphrodite:
|
|
201
196
|
role: Frontend specialist
|
|
202
|
-
max_steps: 60 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
203
197
|
reasoning_effort: medium
|
|
204
198
|
user_invocable: true
|
|
205
199
|
can_delegate: false
|
|
@@ -220,7 +214,6 @@ agents:
|
|
|
220
214
|
- file-prompts
|
|
221
215
|
demeter:
|
|
222
216
|
role: Database specialist
|
|
223
|
-
max_steps: 50 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
224
217
|
reasoning_effort: medium
|
|
225
218
|
user_invocable: true
|
|
226
219
|
can_delegate: false
|
|
@@ -240,7 +233,6 @@ agents:
|
|
|
240
233
|
- incremental-implementation
|
|
241
234
|
themis:
|
|
242
235
|
role: Quality gate
|
|
243
|
-
max_steps: 25 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
244
236
|
reasoning_effort: high
|
|
245
237
|
user_invocable: true
|
|
246
238
|
can_delegate: false
|
|
@@ -262,7 +254,6 @@ agents:
|
|
|
262
254
|
- context-compression
|
|
263
255
|
prometheus:
|
|
264
256
|
role: Infrastructure specialist
|
|
265
|
-
max_steps: 30 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
266
257
|
reasoning_effort: medium
|
|
267
258
|
user_invocable: true
|
|
268
259
|
can_delegate: false
|
|
@@ -281,7 +272,6 @@ agents:
|
|
|
281
272
|
- incremental-implementation
|
|
282
273
|
hephaestus:
|
|
283
274
|
role: AI pipelines
|
|
284
|
-
max_steps: 50 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
285
275
|
reasoning_effort: medium
|
|
286
276
|
user_invocable: true
|
|
287
277
|
can_delegate: false
|
|
@@ -300,7 +290,6 @@ agents:
|
|
|
300
290
|
- auto-continue
|
|
301
291
|
nyx:
|
|
302
292
|
role: Observability
|
|
303
|
-
max_steps: 25 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
304
293
|
reasoning_effort: low
|
|
305
294
|
user_invocable: true
|
|
306
295
|
can_delegate: false
|
|
@@ -319,7 +308,6 @@ agents:
|
|
|
319
308
|
- auto-continue
|
|
320
309
|
gaia:
|
|
321
310
|
role: Remote sensing domain specialist
|
|
322
|
-
max_steps: 25 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
323
311
|
reasoning_effort: low
|
|
324
312
|
user_invocable: false
|
|
325
313
|
can_delegate: false
|
|
@@ -334,7 +322,6 @@ agents:
|
|
|
334
322
|
- auto-continue
|
|
335
323
|
iris:
|
|
336
324
|
role: GitHub operations
|
|
337
|
-
max_steps: 20 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
338
325
|
reasoning_effort: low
|
|
339
326
|
user_invocable: true
|
|
340
327
|
can_delegate: false
|
|
@@ -352,7 +339,6 @@ agents:
|
|
|
352
339
|
- artifact-management
|
|
353
340
|
mnemosyne:
|
|
354
341
|
role: Memory bank
|
|
355
|
-
max_steps: 20 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
356
342
|
reasoning_effort: low
|
|
357
343
|
user_invocable: true
|
|
358
344
|
can_delegate: false
|
|
@@ -376,7 +362,6 @@ agents:
|
|
|
376
362
|
- session-goal
|
|
377
363
|
talos:
|
|
378
364
|
role: Hotfix agent
|
|
379
|
-
max_steps: 15 # R4: step budget — at max_steps the agent is forced to summarize-and-stop
|
|
380
365
|
reasoning_effort: low
|
|
381
366
|
user_invocable: true
|
|
382
367
|
can_delegate: false
|
|
@@ -474,6 +459,8 @@ handoffs:
|
|
|
474
459
|
(priority-aware, budget-allocated), archive IMPL/REVIEW to 02-progress-log.md,
|
|
475
460
|
update _xref/index.md cross-references.'
|
|
476
461
|
|
|
462
|
+
# Canonical explicit fallback map for Zeus timeout/retry policy. Evaluate
|
|
463
|
+
# left-to-right; an absent agent entry means escalate (never guess a fallback).
|
|
477
464
|
fallback_chains:
|
|
478
465
|
apollo:
|
|
479
466
|
- athena
|
|
@@ -530,11 +517,10 @@ background_job_board:
|
|
|
530
517
|
background_delegation:
|
|
531
518
|
timeout_ms: 900000 # 15 min
|
|
532
519
|
poll_ms: 250
|
|
533
|
-
max_compaction_items: 10
|
|
534
520
|
prune_ttl_ms: 86400000 # 24h
|
|
535
521
|
read_only_agents: [apollo, gaia]
|
|
536
522
|
session_max: 3
|
|
537
|
-
retry_count: 1
|
|
523
|
+
retry_count: 1 # one retry after an initial transient failure; no retry loops
|
|
538
524
|
# ── O5: permission.task — glob rules for which subagents an agent may
|
|
539
525
|
# invoke (last matching rule wins; deny removes the agent from the delegate
|
|
540
526
|
# tool description entirely — prevents circular delegation at the
|
|
@@ -567,7 +553,10 @@ hashline:
|
|
|
567
553
|
full_auto:
|
|
568
554
|
enabled: false # opt-in: goal continuations are OFF by default
|
|
569
555
|
max_continuations: 25 # hard cap on goal continuations per session
|
|
570
|
-
#
|
|
571
|
-
#
|
|
572
|
-
#
|
|
573
|
-
#
|
|
556
|
+
# Full-auto only continues a task/scope explicitly authorized by the user.
|
|
557
|
+
# It never authorizes auth/security gates, risky data/schema or destructive
|
|
558
|
+
# operations, global config, broad permissions, production deploy, push, or merge.
|
|
559
|
+
# Low-risk execution is proportional: no forced plan/discovery/council/artifact
|
|
560
|
+
# for a bounded fix; use focused verification. Documentation mirror — runtime
|
|
561
|
+
# behavior is implemented in the plugin (GOAL_LOOP_DEFAULTS).
|
|
562
|
+
# Wave 3 (PR #46): one active goal per session (pending → in_progress → done).
|
package/src/skills/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Skills are reference modules loaded on demand by agents. Each skill provides domain-specific knowledge — architecture patterns, security checklists, optimization strategies, and implementation guides. Agents load skills when their task matches the skill's description, keeping context focused and token-efficient.
|
|
6
6
|
|
|
7
|
-
There are **
|
|
7
|
+
There are **20 skills** divided into **5 domains**.
|
|
8
8
|
|
|
9
9
|
## Skills by Domain
|
|
10
10
|
|
|
@@ -23,82 +23,78 @@ There are **21 skills** divided into **5 domains**.
|
|
|
23
23
|
- Used by: Zeus, Apollo, Hephaestus, Nyx, Gaia
|
|
24
24
|
|
|
25
25
|
4. **context-compression** — `context-compression/SKILL.md`
|
|
26
|
-
-
|
|
27
|
-
- Used by: Zeus, Mnemosyne
|
|
26
|
+
- Native compaction guidance and explicit checkpoint rules; no automatic compression MCP calls.
|
|
27
|
+
- Used by: Zeus, Mnemosyne
|
|
28
28
|
|
|
29
29
|
5. **memory-bank** — `memory-bank/SKILL.md`
|
|
30
30
|
- Memory bank rules, structure, and optimization — complete guide to Pantheon memory management.
|
|
31
31
|
- Used by: Mnemosyne, Athena
|
|
32
32
|
|
|
33
|
-
6. **
|
|
34
|
-
- Practical step-by-step walkthrough for orchestrating features end-to-end using the multi-agent system, from planning through deployment.
|
|
35
|
-
- Used by: Zeus
|
|
36
|
-
|
|
37
|
-
7. **session-goal** — `session-goal/SKILL.md`
|
|
33
|
+
6. **session-goal** — `session-goal/SKILL.md`
|
|
38
34
|
- Pin session objectives to prevent scope creep across long multi-agent sessions.
|
|
39
35
|
- Used by: Zeus, Mnemosyne
|
|
40
36
|
|
|
41
37
|
### Domain 2: Development Tools
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
7. **clonedeps** — `clonedeps/SKILL.md`
|
|
44
40
|
- Clones dependency source locally so agents can inspect library internals, understand behavior, and debug integration issues.
|
|
45
41
|
- Used by: Hermes, Hephaestus
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
8. **git-workflow-and-versioning** — `git-workflow-and-versioning/SKILL.md`
|
|
48
44
|
- Atomic commits, conventional commits, trunk-based development workflow.
|
|
49
45
|
- Used by: Hermes, Prometheus, Iris
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
9. **incremental-implementation** — `incremental-implementation/SKILL.md`
|
|
52
48
|
- Implement in thin vertical slices — one commit per task, testable, rollback-safe.
|
|
53
49
|
- Used by: Zeus, Hermes, Aphrodite, Demeter, Prometheus, Talos
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
10. **loop-engineering** — `loop-engineering/SKILL.md`
|
|
56
52
|
- Iterative refinement pattern for complex problems — solve, review, improve, repeat in controlled cycles.
|
|
57
53
|
- Used by: All agents
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
11. **reflect** — `reflect/SKILL.md`
|
|
60
56
|
- Turns repeated workflow friction into reusable skills, agents, or configuration improvements.
|
|
61
57
|
- Used by: All agents
|
|
62
58
|
|
|
63
|
-
|
|
59
|
+
12. **simplify** — `simplify/SKILL.md`
|
|
64
60
|
- Behavior-preserving code simplification for readability, maintainability, and reduced complexity.
|
|
65
61
|
- Used by: All agents
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
13. **worktrees** — `worktrees/SKILL.md`
|
|
68
64
|
- Git worktrees as safe, isolated coding lanes for risky or parallel work without affecting the main workspace.
|
|
69
65
|
- Used by: All agents
|
|
70
66
|
|
|
71
67
|
### Domain 3: Quality & Security
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
14. **code-review-checklist** — `code-review-checklist/SKILL.md`
|
|
74
70
|
- Systematic code review with quality gates, security audit, and parallel checks for structured feedback.
|
|
75
71
|
- Used by: Themis
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
15. **security-hardening** — `security-hardening/SKILL.md`
|
|
78
74
|
- Security gate — OWASP, SAST, secrets detection, MCP hardening, dependency audit.
|
|
79
75
|
- Used by: Themis, Nyx
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
16. **tdd-with-agents** — `tdd-with-agents/SKILL.md`
|
|
82
78
|
- TDD enforcement with RED→GREEN→REFACTOR cycle and advanced testing patterns across all layers.
|
|
83
79
|
- Used by: Hermes, Aphrodite, Demeter, Themis, Hephaestus
|
|
84
80
|
|
|
85
81
|
### Domain 4: Planning
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
17. **codemap** — `codemap/SKILL.md`
|
|
88
84
|
- Generates hierarchical repository maps so agents understand codebase structure without re-reading every file.
|
|
89
85
|
- Used by: Apollo, Zeus
|
|
90
86
|
|
|
91
|
-
|
|
87
|
+
18. **spec-driven-development** — `spec-driven-development/SKILL.md`
|
|
92
88
|
- Define requirements via spec-first before any code — PRD, edge cases, acceptance criteria.
|
|
93
89
|
- Used by: Athena
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
19. **verification-planning** — `verification-planning/SKILL.md`
|
|
96
92
|
- Plans an evidence path before non-trivial changes, ensuring changes are testable and verifiable.
|
|
97
93
|
- Used by: Athena, Zeus
|
|
98
94
|
|
|
99
95
|
### Domain 5: Frontend Development
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
20. **visual-review-pipeline** — `visual-review-pipeline/SKILL.md`
|
|
102
98
|
- Automated visual review pipeline — Playwright screenshots, self-analysis, fix loop, escalation.
|
|
103
99
|
- Used by: Aphrodite
|
|
104
100
|
|
|
@@ -128,24 +124,23 @@ The `SKILL.md` file contains YAML frontmatter with `name`, `description`, and pl
|
|
|
128
124
|
| 1 | agent-coordination | Orchestration & Workflow | Zeus |
|
|
129
125
|
| 2 | artifact-management | Orchestration & Workflow | Zeus, Mnemosyne, Iris |
|
|
130
126
|
| 3 | auto-continue | Orchestration & Workflow | Zeus, Apollo, Hephaestus, Nyx, Gaia |
|
|
131
|
-
| 4 | context-compression | Orchestration & Workflow | Zeus, Mnemosyne
|
|
127
|
+
| 4 | context-compression | Orchestration & Workflow | Zeus, Mnemosyne |
|
|
132
128
|
| 5 | memory-bank | Orchestration & Workflow | Mnemosyne, Athena |
|
|
133
|
-
| 6 |
|
|
134
|
-
| 7 |
|
|
135
|
-
| 8 |
|
|
136
|
-
| 9 |
|
|
137
|
-
| 10 |
|
|
138
|
-
| 11 |
|
|
139
|
-
| 12 |
|
|
140
|
-
| 13 |
|
|
141
|
-
| 14 |
|
|
142
|
-
| 15 |
|
|
143
|
-
| 16 |
|
|
144
|
-
| 17 |
|
|
145
|
-
| 18 |
|
|
146
|
-
| 19 |
|
|
147
|
-
| 20 |
|
|
148
|
-
| 21 | visual-review-pipeline | Frontend Development | Aphrodite |
|
|
129
|
+
| 6 | session-goal | Orchestration & Workflow | Zeus, Mnemosyne |
|
|
130
|
+
| 7 | clonedeps | Development Tools | Hermes, Hephaestus |
|
|
131
|
+
| 8 | git-workflow-and-versioning | Development Tools | Hermes, Prometheus, Iris |
|
|
132
|
+
| 9 | incremental-implementation | Development Tools | Zeus, Hermes, Aphrodite, Demeter, Prometheus, Talos |
|
|
133
|
+
| 10 | loop-engineering | Development Tools | All agents |
|
|
134
|
+
| 11 | reflect | Development Tools | All agents |
|
|
135
|
+
| 12 | simplify | Development Tools | All agents |
|
|
136
|
+
| 13 | worktrees | Development Tools | All agents |
|
|
137
|
+
| 14 | code-review-checklist | Quality & Security | Themis |
|
|
138
|
+
| 15 | security-hardening | Quality & Security | Themis, Nyx |
|
|
139
|
+
| 16 | tdd-with-agents | Quality & Security | Hermes, Aphrodite, Demeter, Themis, Hephaestus |
|
|
140
|
+
| 17 | codemap | Planning | Apollo, Zeus |
|
|
141
|
+
| 18 | spec-driven-development | Planning | Athena |
|
|
142
|
+
| 19 | verification-planning | Planning | Athena, Zeus |
|
|
143
|
+
| 20 | visual-review-pipeline | Frontend Development | Aphrodite |
|
|
149
144
|
|
|
150
145
|
---
|
|
151
146
|
|