pantheon-opencode 1.6.0-beta.6 → 1.6.0-beta.8
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.md +19 -769
- package/CHANGELOG.md +53 -0
- package/README.md +78 -9
- package/README.pt-BR.md +10 -4
- package/package.json +5 -1
- package/plugin.json +2 -2
- package/pyproject.toml +3 -1
- package/scripts/build-agents-md.mjs +159 -26
- package/scripts/install/agents-md.mjs +2 -2
- package/scripts/install/config-migration.mjs +115 -1
- package/scripts/install/interactive.mjs +1 -1
- package/scripts/install/opencode.mjs +245 -12
- package/scripts/install/shared.mjs +115 -7
- package/scripts/sync-artifacts.mjs +2 -2
- package/scripts/test-opencode-v2-sandbox.sh +155 -4
- package/scripts/validate-sandbox-install.mjs +138 -0
- package/skills-lock.json +5 -5
- package/src/agents/aphrodite.md +18 -36
- package/src/agents/demeter.md +8 -27
- package/src/agents/gaia.md +1 -0
- package/src/agents/hephaestus.md +10 -20
- package/src/agents/hermes.md +15 -37
- package/src/agents/mnemosyne.md +14 -42
- package/src/agents/prometheus.md +16 -19
- package/src/agents/talos.md +4 -1
- package/src/agents/themis.md +4 -4
- package/src/agents/zeus.md +24 -127
- package/src/instructions/agent-return-format.instructions.md +2 -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 -121
- package/src/instructions/zeus-anti-stall.instructions.md +14 -69
- 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/pantheon/v2-delegation-enforce.ts +87 -0
- package/src/pantheon/v2-execute-after.ts +186 -0
- package/src/pantheon/v2-unsupported.mjs +0 -23
- package/src/plugin-v2.ts +271 -36
- package/src/plugins/tui/dist/tui.d.ts +11 -8
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +53 -37
- package/src/plugins/tui/package-lock.json +30 -33
- package/src/plugins/tui/package.json +5 -1
- package/src/plugins/tui/src/index.tsx +103 -82
- package/src/plugins/tui/tsdown.config.ts +17 -0
- package/src/routing.yml +10 -5
- package/src/skills/README.md +3 -3
- package/src/skills/artifact-management/SKILL.md +12 -5
- package/src/skills/auto-continue/SKILL.md +37 -28
- package/src/skills/code-review-checklist/SKILL.md +5 -5
- package/src/skills/context-compression/SKILL.md +26 -879
- package/src/skills/tdd-with-agents/SKILL.md +18 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pantheon-tui",
|
|
9
|
-
"version": "1.6.0-beta.
|
|
9
|
+
"version": "1.6.0-beta.8",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@opencode-ai/plugin": "1.18.33",
|
|
@@ -41,19 +41,6 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"node_modules/@ampproject/remapping": {
|
|
45
|
-
"version": "2.3.0",
|
|
46
|
-
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
|
47
|
-
"integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
|
|
48
|
-
"license": "Apache-2.0",
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@jridgewell/gen-mapping": "^0.3.5",
|
|
51
|
-
"@jridgewell/trace-mapping": "^0.3.24"
|
|
52
|
-
},
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">=6.0.0"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
44
|
"node_modules/@babel/code-frame": {
|
|
58
45
|
"version": "7.29.7",
|
|
59
46
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
|
|
@@ -78,21 +65,21 @@
|
|
|
78
65
|
}
|
|
79
66
|
},
|
|
80
67
|
"node_modules/@babel/core": {
|
|
81
|
-
"version": "7.
|
|
82
|
-
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.
|
|
83
|
-
"integrity": "sha512-
|
|
84
|
-
"license": "MIT",
|
|
85
|
-
"dependencies": {
|
|
86
|
-
"@
|
|
87
|
-
"@babel/
|
|
88
|
-
"@babel/
|
|
89
|
-
"@babel/helper-
|
|
90
|
-
"@babel/
|
|
91
|
-
"@babel/
|
|
92
|
-
"@babel/
|
|
93
|
-
"@babel/
|
|
94
|
-
"@babel/
|
|
95
|
-
"@
|
|
68
|
+
"version": "7.29.7",
|
|
69
|
+
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",
|
|
70
|
+
"integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@babel/code-frame": "^7.29.7",
|
|
74
|
+
"@babel/generator": "^7.29.7",
|
|
75
|
+
"@babel/helper-compilation-targets": "^7.29.7",
|
|
76
|
+
"@babel/helper-module-transforms": "^7.29.7",
|
|
77
|
+
"@babel/helpers": "^7.29.7",
|
|
78
|
+
"@babel/parser": "^7.29.7",
|
|
79
|
+
"@babel/template": "^7.29.7",
|
|
80
|
+
"@babel/traverse": "^7.29.7",
|
|
81
|
+
"@babel/types": "^7.29.7",
|
|
82
|
+
"@jridgewell/remapping": "^2.3.5",
|
|
96
83
|
"convert-source-map": "^2.0.0",
|
|
97
84
|
"debug": "^4.1.0",
|
|
98
85
|
"gensync": "^1.0.0-beta.2",
|
|
@@ -469,6 +456,16 @@
|
|
|
469
456
|
"@jridgewell/trace-mapping": "^0.3.24"
|
|
470
457
|
}
|
|
471
458
|
},
|
|
459
|
+
"node_modules/@jridgewell/remapping": {
|
|
460
|
+
"version": "2.3.5",
|
|
461
|
+
"resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
|
|
462
|
+
"integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
|
|
463
|
+
"license": "MIT",
|
|
464
|
+
"dependencies": {
|
|
465
|
+
"@jridgewell/gen-mapping": "^0.3.5",
|
|
466
|
+
"@jridgewell/trace-mapping": "^0.3.24"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
472
469
|
"node_modules/@jridgewell/resolve-uri": {
|
|
473
470
|
"version": "3.1.2",
|
|
474
471
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
|
@@ -2537,9 +2534,9 @@
|
|
|
2537
2534
|
}
|
|
2538
2535
|
},
|
|
2539
2536
|
"node_modules/seroval": {
|
|
2540
|
-
"version": "1.
|
|
2541
|
-
"resolved": "https://registry.npmjs.org/seroval/-/seroval-1.
|
|
2542
|
-
"integrity": "sha512-
|
|
2537
|
+
"version": "1.6.8",
|
|
2538
|
+
"resolved": "https://registry.npmjs.org/seroval/-/seroval-1.6.8.tgz",
|
|
2539
|
+
"integrity": "sha512-HlSgSAkTk4EqHcje1ptJjfZi1YDv5KbhVJ/d3P7T/nAXua2VmDu+AKDX5VTdFfZf48nDkWB2TKYt0DrCSa+3wg==",
|
|
2543
2540
|
"license": "MIT",
|
|
2544
2541
|
"engines": {
|
|
2545
2542
|
"node": ">=10"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.6.0-beta.
|
|
4
|
+
"version": "1.6.0-beta.8",
|
|
5
5
|
"description": "Pantheon TUI plugin — sidebar (version, preset, sessions, real-time delegations) + AI subscription usage gauges incl. OpenCode Go/Zen dollar limits (vendored, MIT)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
@@ -31,8 +31,12 @@
|
|
|
31
31
|
"tsdown": "0.23.0"
|
|
32
32
|
},
|
|
33
33
|
"overrides": {
|
|
34
|
+
"@babel/core": "7.29.7",
|
|
35
|
+
"seroval": "1.6.8",
|
|
36
|
+
"solid-js": "1.9.12",
|
|
34
37
|
"rolldown": "1.2.7"
|
|
35
38
|
},
|
|
39
|
+
"//overrides": "TUI production advisory fixes: Babel >=7.29.6 and Seroval >=1.6.3; Solid stays at 1.9.12 to satisfy OpenTUI's exact peer. Remove only after upstream ranges include fixed versions; Seroval compatibility is covered by the Solid serializer regression test.",
|
|
36
40
|
"dependencies": {
|
|
37
41
|
"@opencode-ai/plugin": "1.18.33",
|
|
38
42
|
"@opentui/core": "0.5.10",
|
|
@@ -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
|
|
|
@@ -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,6 +10,21 @@ 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
29
|
entry: { tui: 'src/index.tsx', server: 'src/server.ts' },
|
|
14
30
|
format: ['esm'],
|
|
@@ -33,4 +49,5 @@ export default defineConfig({
|
|
|
33
49
|
deps: {
|
|
34
50
|
neverBundle: [/^@opencode-ai\//, /^@opentui\//, /^solid-js/],
|
|
35
51
|
},
|
|
52
|
+
onSuccess: ensureDistArtifactsEndWithNewline,
|
|
36
53
|
})
|
package/src/routing.yml
CHANGED
|
@@ -459,6 +459,8 @@ handoffs:
|
|
|
459
459
|
(priority-aware, budget-allocated), archive IMPL/REVIEW to 02-progress-log.md,
|
|
460
460
|
update _xref/index.md cross-references.'
|
|
461
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).
|
|
462
464
|
fallback_chains:
|
|
463
465
|
apollo:
|
|
464
466
|
- athena
|
|
@@ -518,7 +520,7 @@ background_delegation:
|
|
|
518
520
|
prune_ttl_ms: 86400000 # 24h
|
|
519
521
|
read_only_agents: [apollo, gaia]
|
|
520
522
|
session_max: 3
|
|
521
|
-
retry_count: 1
|
|
523
|
+
retry_count: 1 # one retry after an initial transient failure; no retry loops
|
|
522
524
|
# ── O5: permission.task — glob rules for which subagents an agent may
|
|
523
525
|
# invoke (last matching rule wins; deny removes the agent from the delegate
|
|
524
526
|
# tool description entirely — prevents circular delegation at the
|
|
@@ -551,7 +553,10 @@ hashline:
|
|
|
551
553
|
full_auto:
|
|
552
554
|
enabled: false # opt-in: goal continuations are OFF by default
|
|
553
555
|
max_continuations: 25 # hard cap on goal continuations per session
|
|
554
|
-
#
|
|
555
|
-
#
|
|
556
|
-
#
|
|
557
|
-
#
|
|
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
|
@@ -23,8 +23,8 @@ There are **20 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.
|
|
@@ -124,7 +124,7 @@ The `SKILL.md` file contains YAML frontmatter with `name`, `description`, and pl
|
|
|
124
124
|
| 1 | agent-coordination | Orchestration & Workflow | Zeus |
|
|
125
125
|
| 2 | artifact-management | Orchestration & Workflow | Zeus, Mnemosyne, Iris |
|
|
126
126
|
| 3 | auto-continue | Orchestration & Workflow | Zeus, Apollo, Hephaestus, Nyx, Gaia |
|
|
127
|
-
| 4 | context-compression | Orchestration & Workflow | Zeus, Mnemosyne
|
|
127
|
+
| 4 | context-compression | Orchestration & Workflow | Zeus, Mnemosyne |
|
|
128
128
|
| 5 | memory-bank | Orchestration & Workflow | Mnemosyne, Athena |
|
|
129
129
|
| 6 | session-goal | Orchestration & Workflow | Zeus, Mnemosyne |
|
|
130
130
|
| 7 | clonedeps | Development Tools | Hermes, Hephaestus |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: artifact-management
|
|
3
|
-
description: "Structured
|
|
3
|
+
description: "Structured artifacts for planned, multi-phase, or materially risky implementation work."
|
|
4
4
|
context: fork
|
|
5
5
|
globs: []
|
|
6
6
|
alwaysApply: false
|
|
@@ -8,7 +8,7 @@ alwaysApply: false
|
|
|
8
8
|
|
|
9
9
|
# Artifact Management
|
|
10
10
|
|
|
11
|
-
Structured artifact trail
|
|
11
|
+
Structured artifact trail for planned, multi-phase, or materially risky implementation work. Artifacts are not a prerequisite for simple fixes or read-only investigation.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -55,6 +55,13 @@ All ephemeral artifacts live in `.pantheon/memory-bank/.tmp/` — gitignored and
|
|
|
55
55
|
|
|
56
56
|
> **Zeus does NOT generate artifacts.** He orchestrates agents that generate them.
|
|
57
57
|
|
|
58
|
+
## Proportional Use
|
|
59
|
+
|
|
60
|
+
- Create PLAN/IMPL/REVIEW artifacts for planned multi-phase work or when risk, auditability, or an explicit request needs a durable phase trail.
|
|
61
|
+
- A bounded, reversible fix should be investigated only as far as needed, implemented, verified with focused checks, and returned as a concise summary. Do not create PLAN, IMPL, or REVIEW artifacts for it.
|
|
62
|
+
- Read-only lookup or trivial discovery needs no DISC artifact; use one only when findings are broad enough to be reused or drive a material decision.
|
|
63
|
+
- The absence of an artifact never waives Themis review or human approval for auth/security, data/schema/migrations, production-impacting work, or sensitive actions.
|
|
64
|
+
|
|
58
65
|
---
|
|
59
66
|
|
|
60
67
|
## Templates
|
|
@@ -103,9 +110,9 @@ All ephemeral artifacts live in `.pantheon/memory-bank/.tmp/` — gitignored and
|
|
|
103
110
|
|
|
104
111
|
## Human Pause Points
|
|
105
112
|
|
|
106
|
-
1. **After PLAN** →
|
|
107
|
-
2. **After REVIEW** →
|
|
108
|
-
3. **Before
|
|
113
|
+
1. **After a required PLAN** → pause only when a material scope/risk decision needs approval.
|
|
114
|
+
2. **After required REVIEW** → preserve auth/security/data/schema and other sensitive approval gates.
|
|
115
|
+
3. **Before commit/push/merge/deploy or destructive/global action** → require explicit human approval.
|
|
109
116
|
|
|
110
117
|
---
|
|
111
118
|
|