pantheon-opencode 2.0.0-rc.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.global.md +2 -2
- package/AGENTS.md +8 -8
- package/CHANGELOG.md +54 -0
- package/README.md +2 -0
- package/README.pt-BR.md +2 -0
- package/bin/pantheon-init.mjs +13 -0
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +1 -1
- package/commands/pantheon-optimize.md +41 -63
- package/package.json +4 -3
- package/plugin.json +1 -1
- package/prompts/optimize-database.prompt.md +5 -5
- package/prompts/plan-architecture.prompt.md +6 -6
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +10 -10
- package/scripts/build-plugin.mjs +26 -0
- package/scripts/install/opencode-version.mjs +17 -5
- package/scripts/install/opencode.mjs +8 -1
- package/scripts/optimize.mjs +322 -0
- package/scripts/prune.mjs +105 -14
- package/scripts/update.mjs +20 -15
- package/skills-lock.json +11 -11
- package/src/agents/aphrodite.md +15 -14
- package/src/agents/apollo.md +2 -1
- package/src/agents/athena.md +5 -5
- package/src/agents/demeter.md +2 -0
- package/src/agents/hephaestus.md +1 -0
- package/src/agents/hermes.md +19 -95
- package/src/agents/iris.md +3 -0
- package/src/agents/nyx.md +1 -0
- package/src/agents/prometheus.md +2 -0
- package/src/agents/talos.md +3 -0
- package/src/agents/themis.md +91 -87
- package/src/agents/zeus.md +41 -266
- package/src/instructions/agent-return-format.instructions.md +1 -1
- package/src/instructions/memory-protocol.instructions.md +1 -1
- package/src/instructions/zeus-anti-stall.instructions.md +3 -3
- package/src/instructions/zeus-communication-rules.instructions.md +1 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
- package/src/instructions/zeus-timeout-retry.instructions.md +10 -10
- package/src/pantheon/model-command.ts +12 -12
- package/src/pantheon/tools.ts +4 -0
- package/src/pantheon/tui-version-check.ts +1 -1
- package/src/pantheon/update-notifier.ts +13 -8
- package/src/pantheon/vision.ts +20 -20
- package/src/plugin/index.js +14594 -0
- package/src/plugins/tui/dist/tui.d.ts +3 -3
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +923 -340
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/autonomy-state.ts +27 -15
- package/src/plugins/tui/src/index.tsx +44 -23
- package/src/plugins/tui/src/pantheon-settings.tsx +461 -105
- package/src/plugins/tui/src/tui-prefs.ts +106 -4
- package/src/plugins/tui/src/update-notice.ts +9 -6
- package/src/plugins/tui/src/whats-new-open.ts +4 -4
- package/src/plugins/tui/src/whats-new.tsx +119 -17
- package/src/skills/agent-coordination/SKILL.md +6 -6
- package/src/skills/artifact-management/SKILL.md +43 -39
- package/src/skills/artifact-management/references/artifact-templates.md +103 -48
- package/src/skills/auto-continue/references/auto-continue-details.md +13 -13
- package/src/skills/code-review-checklist/SKILL.md +6 -6
- package/src/skills/incremental-implementation/SKILL.md +13 -13
- package/src/skills/memory-bank/references/anti-patterns.md +3 -3
- package/src/skills/spec-driven-development/SKILL.md +12 -14
- package/src/skills/tdd-with-agents/SKILL.md +6 -5
- package/src/skills/visual-review-pipeline/SKILL.md +1 -1
- package/src/skills/visual-review-pipeline/references/workflow-steps.md +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pantheon-tui",
|
|
9
|
-
"version": "2.0.0
|
|
9
|
+
"version": "2.0.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@opencode/plugin": "2.0.26",
|
|
@@ -36,6 +36,16 @@ export const DEFAULT_GOAL_LOOP_PREFS: GoalLoopPrefs = {
|
|
|
36
36
|
|
|
37
37
|
export const GOAL_LOOP_ENABLED_CYCLE: readonly string[] = Object.freeze(['enabled', 'disabled'])
|
|
38
38
|
|
|
39
|
+
export const MAX_CONTINUATIONS_CYCLE: readonly string[] = Object.freeze([
|
|
40
|
+
'10',
|
|
41
|
+
'25',
|
|
42
|
+
'50',
|
|
43
|
+
'100',
|
|
44
|
+
'200',
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
export const COOLDOWN_MS_CYCLE: readonly string[] = Object.freeze(['1000', '2000', '5000', '10000'])
|
|
48
|
+
|
|
39
49
|
export interface DecisionBudgets {
|
|
40
50
|
monthlyUsd: number
|
|
41
51
|
perDecisionUsd: number
|
|
@@ -75,7 +85,7 @@ export function buildAutonomyTab(input: {
|
|
|
75
85
|
title: 'Autonomy',
|
|
76
86
|
groups: [
|
|
77
87
|
{
|
|
78
|
-
title: 'Goal loop (
|
|
88
|
+
title: 'Goal loop (multi-turn session auto-continuation)',
|
|
79
89
|
rows: [
|
|
80
90
|
{
|
|
81
91
|
id: 'autonomy.goal_loop.enabled',
|
|
@@ -83,64 +93,66 @@ export function buildAutonomyTab(input: {
|
|
|
83
93
|
value: input.goalLoop.enabled ? 'enabled' : 'disabled',
|
|
84
94
|
cycle: GOAL_LOOP_ENABLED_CYCLE,
|
|
85
95
|
note:
|
|
86
|
-
'
|
|
96
|
+
'auto-continues multi-turn tasks when session goes idle' +
|
|
87
97
|
(input.goalLoopRestartPending
|
|
88
|
-
? ' ·
|
|
98
|
+
? ' · [!] restart required to apply'
|
|
89
99
|
: ' · applies after OpenCode restart'),
|
|
90
100
|
},
|
|
91
101
|
{
|
|
92
102
|
id: 'autonomy.goal_loop.maxContinuations',
|
|
93
103
|
name: 'Max continuations',
|
|
94
104
|
value: String(input.goalLoop.maxContinuations),
|
|
95
|
-
|
|
105
|
+
cycle: MAX_CONTINUATIONS_CYCLE,
|
|
106
|
+
note: '1..200 — safety ceiling to prevent runaway tasks',
|
|
96
107
|
},
|
|
97
108
|
{
|
|
98
109
|
id: 'autonomy.goal_loop.cooldownMs',
|
|
99
110
|
name: 'Cooldown (ms)',
|
|
100
111
|
value: String(input.goalLoop.cooldownMs),
|
|
101
|
-
|
|
112
|
+
cycle: COOLDOWN_MS_CYCLE,
|
|
113
|
+
note: 'delay between autonomous turns (min 1000ms)',
|
|
102
114
|
},
|
|
103
115
|
],
|
|
104
116
|
},
|
|
105
117
|
{
|
|
106
|
-
title: 'Decision budgets (applies live)',
|
|
118
|
+
title: 'Decision budgets (applies live per gated call)',
|
|
107
119
|
rows: [
|
|
108
120
|
{
|
|
109
121
|
id: 'autonomy.budget.monthly',
|
|
110
122
|
name: 'Monthly cap',
|
|
111
123
|
value: formatUsd(input.budgets.monthlyUsd),
|
|
112
124
|
cycle: MONTHLY_USD_CYCLE,
|
|
113
|
-
note: '
|
|
125
|
+
note: 'monthly USD ceiling for gated arbitrator decisions',
|
|
114
126
|
},
|
|
115
127
|
{
|
|
116
128
|
id: 'autonomy.budget.perDecision',
|
|
117
129
|
name: 'Per-decision cap',
|
|
118
130
|
value: formatUsd(input.budgets.perDecisionUsd),
|
|
119
131
|
cycle: PER_DECISION_USD_CYCLE,
|
|
120
|
-
note: '
|
|
132
|
+
note: 'price cap — gated decisions above this are refused',
|
|
121
133
|
},
|
|
122
134
|
],
|
|
123
135
|
},
|
|
124
136
|
{
|
|
125
|
-
title: 'Decision gradient (
|
|
137
|
+
title: 'Decision gradient (reference policy · J1 owns the risk axis)',
|
|
126
138
|
rows: [
|
|
127
139
|
{
|
|
128
140
|
id: 'autonomy.gradient.solo',
|
|
129
141
|
name: 'Decide solo',
|
|
130
|
-
value: '
|
|
131
|
-
note: 'edits, routine fixes
|
|
142
|
+
value: 'autonomous',
|
|
143
|
+
note: 'reversible & low-risk edits, routine fixes (no gate)',
|
|
132
144
|
},
|
|
133
145
|
{
|
|
134
146
|
id: 'autonomy.gradient.jev',
|
|
135
147
|
name: 'Jev decides',
|
|
136
|
-
value: '
|
|
137
|
-
note: '
|
|
148
|
+
value: 'arbitrated',
|
|
149
|
+
note: 'typed ambiguity & candidate ranking (budget-capped)',
|
|
138
150
|
},
|
|
139
151
|
{
|
|
140
152
|
id: 'autonomy.gradient.human',
|
|
141
153
|
name: 'Human decides',
|
|
142
|
-
value: '
|
|
143
|
-
note: '
|
|
154
|
+
value: 'human review',
|
|
155
|
+
note: 'high-risk & destructive operations (J1 gate)',
|
|
144
156
|
},
|
|
145
157
|
],
|
|
146
158
|
},
|
|
@@ -27,11 +27,13 @@ import {
|
|
|
27
27
|
} from './model-usage-limits'
|
|
28
28
|
import {
|
|
29
29
|
openPantheonSettings,
|
|
30
|
+
PantheonSettingsSlot,
|
|
30
31
|
pantheonSettingsBlocking,
|
|
31
32
|
setupPantheonSettings,
|
|
32
33
|
} from './pantheon-settings'
|
|
34
|
+
import { PRESET_NONE } from './preset-state'
|
|
33
35
|
import { cellWidth, GRAPHEMES, SIDEBAR_CONTENT_WIDTH } from './sidebar-width'
|
|
34
|
-
import { initTuiPrefs, tuiPrefs } from './tui-prefs'
|
|
36
|
+
import { initTuiPrefs, tuiDraftPreview, tuiPrefs } from './tui-prefs'
|
|
35
37
|
import { nextCheckState, pickUpdateNotice, type UpdateCheckState } from './update-notice.ts'
|
|
36
38
|
import { maybeShowWhatsNewV2 } from './whats-new'
|
|
37
39
|
|
|
@@ -66,7 +68,7 @@ const SPINNER_INTERVAL_MS = 80
|
|
|
66
68
|
/** Bounded warm-up: sync at most this many sessions at plugin load. */
|
|
67
69
|
const WARMUP_SESSION_LIMIT = 24
|
|
68
70
|
/** Sidebar body shown while the host has not published a session yet. */
|
|
69
|
-
export const SIDEBAR_WAITING_LABEL = '
|
|
71
|
+
export const SIDEBAR_WAITING_LABEL = 'Waiting for session…'
|
|
70
72
|
/** Delegate-completion toast title. */
|
|
71
73
|
const TOAST_TITLE = 'Pantheon'
|
|
72
74
|
/** Marker before the preset label (fixed header, home status, prompt footer).
|
|
@@ -700,7 +702,7 @@ export function contextBlockRows(
|
|
|
700
702
|
const spent: ContextRow | null =
|
|
701
703
|
spentValue === null
|
|
702
704
|
? null
|
|
703
|
-
: { lead: null, value: spentValue, tail: null, suffix: '
|
|
705
|
+
: { lead: null, value: spentValue, tail: null, suffix: ' spent in session', tone: null }
|
|
704
706
|
if (usage === null) return spent === null ? null : { tokens: null, percent: null, spent }
|
|
705
707
|
|
|
706
708
|
const tokensValue = formatTokenCount(usage.tokens)
|
|
@@ -2323,7 +2325,7 @@ export function buildDispatchBlock(
|
|
|
2323
2325
|
export const DISPATCH_PANEL_NAME = 'pantheon.dispatch'
|
|
2324
2326
|
/** Toast shown when `ui.panel.open` refuses (no session route is active). The
|
|
2325
2327
|
* panel only exists inside a session, so there is no alternative route. */
|
|
2326
|
-
export const DISPATCH_PANEL_TOAST = '
|
|
2328
|
+
export const DISPATCH_PANEL_TOAST = 'Open a session to view Dispatch'
|
|
2327
2329
|
/** Panel title marker — the same glyph the sidebar block header uses. */
|
|
2328
2330
|
export const DISPATCH_PANEL_HEADER_MARKER = '\u25C8'
|
|
2329
2331
|
/** Selected-row gutter marker (`▸`, one cell). */
|
|
@@ -2335,7 +2337,7 @@ export const DISPATCH_PANEL_RULE_CHAR = '\u2500'
|
|
|
2335
2337
|
/** Em dash for any datum the host did not publish. */
|
|
2336
2338
|
export const DISPATCH_PANEL_DASH = '\u2014'
|
|
2337
2339
|
/** Body of an empty panel (the claim still renders, the list is just empty). */
|
|
2338
|
-
export const DISPATCH_PANEL_EMPTY_TEXT = '
|
|
2340
|
+
export const DISPATCH_PANEL_EMPTY_TEXT = 'No delegated sessions'
|
|
2339
2341
|
/** Width at or above which the list and the detail sit side by side. */
|
|
2340
2342
|
export const DISPATCH_PANEL_WIDE_MIN_WIDTH = 72
|
|
2341
2343
|
/** Rows the viewport holds; pageup/pagedown move by exactly this many rows. */
|
|
@@ -2643,42 +2645,42 @@ export const DISPATCH_PANEL_COMMANDS: readonly DispatchPanelCommandSpec[] = [
|
|
|
2643
2645
|
{
|
|
2644
2646
|
action: 'up',
|
|
2645
2647
|
id: 'pantheon.dispatch.up',
|
|
2646
|
-
title: 'Dispatch:
|
|
2648
|
+
title: 'Dispatch: select previous',
|
|
2647
2649
|
bind: 'k,up',
|
|
2648
2650
|
},
|
|
2649
2651
|
{
|
|
2650
2652
|
action: 'down',
|
|
2651
2653
|
id: 'pantheon.dispatch.down',
|
|
2652
|
-
title: 'Dispatch:
|
|
2654
|
+
title: 'Dispatch: select next',
|
|
2653
2655
|
bind: 'j,down',
|
|
2654
2656
|
},
|
|
2655
|
-
{ action: 'home', id: 'pantheon.dispatch.home', title: 'Dispatch:
|
|
2656
|
-
{ action: 'end', id: 'pantheon.dispatch.end', title: 'Dispatch:
|
|
2657
|
+
{ action: 'home', id: 'pantheon.dispatch.home', title: 'Dispatch: first', bind: 'home' },
|
|
2658
|
+
{ action: 'end', id: 'pantheon.dispatch.end', title: 'Dispatch: last', bind: 'end' },
|
|
2657
2659
|
{
|
|
2658
2660
|
action: 'pageup',
|
|
2659
2661
|
id: 'pantheon.dispatch.pageup',
|
|
2660
|
-
title: 'Dispatch:
|
|
2662
|
+
title: 'Dispatch: page up',
|
|
2661
2663
|
bind: 'pageup',
|
|
2662
2664
|
},
|
|
2663
2665
|
{
|
|
2664
2666
|
action: 'pagedown',
|
|
2665
2667
|
id: 'pantheon.dispatch.pagedown',
|
|
2666
|
-
title: 'Dispatch:
|
|
2668
|
+
title: 'Dispatch: page down',
|
|
2667
2669
|
bind: 'pagedown',
|
|
2668
2670
|
},
|
|
2669
2671
|
{
|
|
2670
2672
|
action: 'toggle',
|
|
2671
2673
|
id: 'pantheon.dispatch.toggle',
|
|
2672
|
-
title: 'Dispatch:
|
|
2674
|
+
title: 'Dispatch: expand detail',
|
|
2673
2675
|
bind: 'enter',
|
|
2674
2676
|
},
|
|
2675
2677
|
{
|
|
2676
2678
|
action: 'fullscreen',
|
|
2677
2679
|
id: 'pantheon.dispatch.fullscreen',
|
|
2678
|
-
title: 'Dispatch:
|
|
2680
|
+
title: 'Dispatch: fullscreen',
|
|
2679
2681
|
bind: 'f',
|
|
2680
2682
|
},
|
|
2681
|
-
{ action: 'close', id: 'pantheon.dispatch.close', title: 'Dispatch:
|
|
2683
|
+
{ action: 'close', id: 'pantheon.dispatch.close', title: 'Dispatch: close', bind: 'escape,q' },
|
|
2682
2684
|
]
|
|
2683
2685
|
|
|
2684
2686
|
/** Run one action against the model and the host-owned panel input. Kept apart
|
|
@@ -2741,10 +2743,10 @@ export function dispatchPanelFooter(shortcutsOf: (id: string) => readonly string
|
|
|
2741
2743
|
return text === '' ? DISPATCH_PANEL_DASH : text
|
|
2742
2744
|
}
|
|
2743
2745
|
return [
|
|
2744
|
-
`${keys('pantheon.dispatch.up')} ${keys('pantheon.dispatch.down')}
|
|
2745
|
-
`${keys('pantheon.dispatch.toggle')}
|
|
2746
|
+
`${keys('pantheon.dispatch.up')} ${keys('pantheon.dispatch.down')} move`,
|
|
2747
|
+
`${keys('pantheon.dispatch.toggle')} detail`,
|
|
2746
2748
|
`${keys('pantheon.dispatch.fullscreen')} fullscreen`,
|
|
2747
|
-
`${keys('pantheon.dispatch.close')}
|
|
2749
|
+
`${keys('pantheon.dispatch.close')} close`,
|
|
2748
2750
|
].join(SPEND_LINE_SEPARATOR)
|
|
2749
2751
|
}
|
|
2750
2752
|
|
|
@@ -3166,7 +3168,18 @@ function useActivePreset(context: any): {
|
|
|
3166
3168
|
clearInterval(timer)
|
|
3167
3169
|
})
|
|
3168
3170
|
})
|
|
3169
|
-
|
|
3171
|
+
const effectivePreset = () => {
|
|
3172
|
+
const preview = tuiDraftPreview()
|
|
3173
|
+
if (preview && 'preset' in preview) {
|
|
3174
|
+
const stagedName = preview.preset
|
|
3175
|
+
return {
|
|
3176
|
+
...preset(),
|
|
3177
|
+
name: stagedName === PRESET_NONE ? null : stagedName,
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
return preset()
|
|
3181
|
+
}
|
|
3182
|
+
return { preset: effectivePreset, overrides }
|
|
3170
3183
|
}
|
|
3171
3184
|
|
|
3172
3185
|
/** Debounce for the git file-count revalidation. `vcs.status` is an HTTP call;
|
|
@@ -3939,10 +3952,10 @@ function ContextRowView(props: { row: ContextRow; fg: string; muted: string }) {
|
|
|
3939
3952
|
)
|
|
3940
3953
|
return (
|
|
3941
3954
|
<Show
|
|
3942
|
-
when={props.row.suffix !== '
|
|
3955
|
+
when={props.row.suffix !== ' spent in session'}
|
|
3943
3956
|
fallback={
|
|
3944
3957
|
<box flexDirection="column">
|
|
3945
|
-
<For each={sidebarMoneyLines('
|
|
3958
|
+
<For each={sidebarMoneyLines('spent in session', props.row.value)}>
|
|
3946
3959
|
{(line) => <text fg={props.fg}>{line}</text>}
|
|
3947
3960
|
</For>
|
|
3948
3961
|
</box>
|
|
@@ -4094,7 +4107,7 @@ function Sidebar(props: SidebarProps): JSX.Element {
|
|
|
4094
4107
|
}
|
|
4095
4108
|
>
|
|
4096
4109
|
{(current: any) => (
|
|
4097
|
-
<text fg={text()}>{`
|
|
4110
|
+
<text fg={text()}>{`Session: ${truncateLabel(current().title || current().id)}`}</text>
|
|
4098
4111
|
)}
|
|
4099
4112
|
</Show>
|
|
4100
4113
|
|
|
@@ -4133,9 +4146,9 @@ function Sidebar(props: SidebarProps): JSX.Element {
|
|
|
4133
4146
|
single accent. When no message carries cost this loop is empty
|
|
4134
4147
|
and the block keeps its original token/spend rows. */}
|
|
4135
4148
|
<Show when={tuiPrefs().sidebar.context.modelUsage && usageRows().length > 0}>
|
|
4136
|
-
<text fg={muted()}>
|
|
4149
|
+
<text fg={muted()}>Session · reported cost</text>
|
|
4137
4150
|
<text fg={muted()}>
|
|
4138
|
-
{'
|
|
4151
|
+
{'Model'.padEnd(MODEL_USAGE_MODEL_WIDTH) +
|
|
4139
4152
|
' Tokens'.padStart(8) +
|
|
4140
4153
|
' USD'.padStart(10)}
|
|
4141
4154
|
</text>
|
|
@@ -4651,6 +4664,13 @@ const plugin = Plugin.define({
|
|
|
4651
4664
|
} catch {
|
|
4652
4665
|
/* settings unavailable on this host — the command toasts/fails open */
|
|
4653
4666
|
}
|
|
4667
|
+
// In-session settings docked above prompt (session.composer.top)
|
|
4668
|
+
const unregisterSettingsSlot = context.ui.slot({
|
|
4669
|
+
append: 'session.composer.top',
|
|
4670
|
+
render: ({ sessionID }: { sessionID: string }) => (
|
|
4671
|
+
<PantheonSettingsSlot context={context} sessionID={sessionID} />
|
|
4672
|
+
),
|
|
4673
|
+
})
|
|
4654
4674
|
// One-time "What's new" window (per Pantheon version) — fire-and-forget:
|
|
4655
4675
|
// resolves the running version and the shipped CHANGELOG.md, then opens a
|
|
4656
4676
|
// host dialog when the version changed since the last dismissal. Fail-open;
|
|
@@ -4662,6 +4682,7 @@ const plugin = Plugin.define({
|
|
|
4662
4682
|
if (typeof unregisterHome === 'function') unregisterHome()
|
|
4663
4683
|
if (typeof unregisterPromptFooter === 'function') unregisterPromptFooter()
|
|
4664
4684
|
if (typeof unregisterPanel === 'function') unregisterPanel()
|
|
4685
|
+
if (typeof unregisterSettingsSlot === 'function') unregisterSettingsSlot()
|
|
4665
4686
|
if (typeof unregisterCommands === 'function') unregisterCommands()
|
|
4666
4687
|
if (typeof unregisterSettingsCommands === 'function') unregisterSettingsCommands()
|
|
4667
4688
|
delete globalState[SINGLETON]
|