pantheon-opencode 1.6.3-beta.10 → 1.6.3-beta.12
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/CHANGELOG.md +39 -6
- package/README.md +6 -0
- package/bin/pantheon-init.mjs +15 -27
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/decision-router-budget.mjs +102 -2
- package/scripts/decision-router-v2-budget.mjs +2 -2
- package/scripts/decision-router.mjs +82 -25
- package/scripts/install/decision-router-config.mjs +12 -4
- package/scripts/install/interactive.mjs +44 -27
- package/scripts/install/opencode.mjs +6 -0
- package/scripts/jev-live-probe.mjs +110 -84
- package/scripts/skill-search.mjs +242 -0
- package/src/agents/aphrodite.md +34 -1
- package/src/agents/apollo.md +227 -0
- package/src/agents/athena.md +24 -0
- package/src/agents/demeter.md +33 -0
- package/src/agents/gaia.md +24 -0
- package/src/agents/hephaestus.md +24 -0
- package/src/agents/hermes.md +33 -0
- package/src/agents/iris.md +24 -0
- package/src/agents/mnemosyne.md +25 -3
- package/src/agents/nyx.md +53 -22
- package/src/agents/prometheus.md +242 -1
- package/src/agents/talos.md +24 -0
- package/src/agents/themis.md +24 -0
- package/src/agents/zeus.md +36 -20
- package/src/pantheon/jev-decision-tool.ts +69 -11
- package/src/pantheon/jev-decisions.ts +68 -5
- package/src/pantheon/jev-quality-score.ts +1 -1
- package/src/pantheon/jev-rank-verify.ts +22 -7
- package/src/pantheon/jev-risk-gate.ts +1 -0
- package/src/pantheon/local-decision-budget.ts +169 -2
- package/src/pantheon/local-decision-router.ts +10 -0
- package/src/pantheon/local-decision-usage-evidence.internal.ts +2 -2
- package/src/pantheon/pantheon-decision-catalog.ts +1 -1
- package/src/pantheon/v2-decision-budget.ts +4 -2
- package/src/plugins/tui/dist/tui-v2.js +128 -25
- package/src/plugins/tui/dist/tui-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/whats-new-highlights.ts +59 -5
- package/src/plugins/tui/src/whats-new-open.ts +41 -1
- package/src/plugins/tui/src/whats-new.tsx +61 -8
|
@@ -10,8 +10,13 @@
|
|
|
10
10
|
* awaited — startup must never block). The decision lives in
|
|
11
11
|
* whats-new-open.ts; this file is only the host glue + view:
|
|
12
12
|
* `context.ui.dialog.show` plus a keymap layer gated on the open signal so
|
|
13
|
-
* `escape`/`q` dismiss while (and only while) the
|
|
14
|
-
* gated-layer pattern as the dispatch panel.
|
|
13
|
+
* `escape`/`q` dismiss and `n`/`p` flip pages while (and only while) the
|
|
14
|
+
* window is up — the same gated-layer pattern as the dispatch panel.
|
|
15
|
+
*
|
|
16
|
+
* The window shows the curated 🆕 What's New summary (whats-new-highlights
|
|
17
|
+
* prefers it), hard-wrapped to the window width and sliced into fixed-size
|
|
18
|
+
* pages — a big changelog can never overflow the terminal; the footer points
|
|
19
|
+
* at the complete CHANGELOG.md.
|
|
15
20
|
*
|
|
16
21
|
* Deliberately V2-only: the two dist entries are self-contained (the V1
|
|
17
22
|
* sidebar mirrors the preset resolver rather than importing it) because any
|
|
@@ -29,22 +34,37 @@
|
|
|
29
34
|
import type { Context } from '@opencode/plugin/tui/context'
|
|
30
35
|
import { createSignal, For } from 'solid-js'
|
|
31
36
|
import { readChangelogForBundle, resolveRunningVersion } from './whats-new-highlights.ts'
|
|
32
|
-
import { openWhatsNew, type WhatsNewViewData } from './whats-new-open.ts'
|
|
37
|
+
import { openWhatsNew, type WhatsNewViewData, wrapWhatsNewLine } from './whats-new-open.ts'
|
|
33
38
|
import { defaultWhatsNewStatePath } from './whats-new-state.ts'
|
|
34
39
|
|
|
35
|
-
/** Window body: title, rule,
|
|
36
|
-
export function WhatsNewContent(props: {
|
|
40
|
+
/** Window body: title, rule, the current page (wrapped), footer hint. */
|
|
41
|
+
export function WhatsNewContent(props: {
|
|
42
|
+
data: WhatsNewViewData
|
|
43
|
+
page: () => number
|
|
44
|
+
pageCount: () => number
|
|
45
|
+
fg?: any
|
|
46
|
+
muted?: any
|
|
47
|
+
}) {
|
|
48
|
+
const rows = () => {
|
|
49
|
+
const current = props.data.pages[Math.min(props.page(), props.pageCount() - 1)] ?? []
|
|
50
|
+
const wrapped: string[] = []
|
|
51
|
+
for (const line of current) wrapped.push(...wrapWhatsNewLine(line, 76))
|
|
52
|
+
return wrapped
|
|
53
|
+
}
|
|
37
54
|
return (
|
|
38
55
|
<box flexDirection="column" paddingLeft={1} paddingRight={1} paddingTop={1}>
|
|
39
56
|
<text attributes={1} fg={props.fg}>
|
|
40
57
|
{props.data.title}
|
|
41
58
|
</text>
|
|
42
59
|
<text fg={props.muted}>{'─'.repeat(38)}</text>
|
|
43
|
-
<For each={
|
|
60
|
+
<For each={rows()}>
|
|
44
61
|
{(line: string) => <text fg={line.startsWith('• ') ? props.fg : props.muted}>{line}</text>}
|
|
45
62
|
</For>
|
|
46
63
|
<box height={1} />
|
|
47
|
-
<text fg={props.muted}>
|
|
64
|
+
<text fg={props.muted}>
|
|
65
|
+
{props.pageCount() > 1 ? `${props.page() + 1}/${props.pageCount()} · ` : ''}
|
|
66
|
+
{props.data.hint}
|
|
67
|
+
</text>
|
|
48
68
|
</box>
|
|
49
69
|
)
|
|
50
70
|
}
|
|
@@ -61,6 +81,9 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
61
81
|
const changelogText = await readChangelogForBundle(import.meta.url)
|
|
62
82
|
|
|
63
83
|
const [open, setOpen] = createSignal(false)
|
|
84
|
+
const [page, setPage] = createSignal(0)
|
|
85
|
+
let viewData: WhatsNewViewData | undefined
|
|
86
|
+
const pageCount = () => Math.max(1, Math.ceil(viewData?.pages.length ?? 1))
|
|
64
87
|
let dismiss: () => void = () => {}
|
|
65
88
|
try {
|
|
66
89
|
// Gated layer: inert (all keys fall through) while the window is closed.
|
|
@@ -78,6 +101,26 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
78
101
|
return undefined
|
|
79
102
|
},
|
|
80
103
|
},
|
|
104
|
+
{
|
|
105
|
+
id: 'pantheon.whats-new.next',
|
|
106
|
+
title: 'Próxima página',
|
|
107
|
+
bind: 'n,right',
|
|
108
|
+
run: () => {
|
|
109
|
+
if (!open()) return false
|
|
110
|
+
setPage((current) => Math.min(current + 1, pageCount() - 1))
|
|
111
|
+
return undefined
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'pantheon.whats-new.prev',
|
|
116
|
+
title: 'Página anterior',
|
|
117
|
+
bind: 'p,left',
|
|
118
|
+
run: () => {
|
|
119
|
+
if (!open()) return false
|
|
120
|
+
setPage((current) => Math.max(current - 1, 0))
|
|
121
|
+
return undefined
|
|
122
|
+
},
|
|
123
|
+
},
|
|
81
124
|
],
|
|
82
125
|
}))
|
|
83
126
|
} catch {
|
|
@@ -101,11 +144,21 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
101
144
|
}
|
|
102
145
|
close()
|
|
103
146
|
}
|
|
147
|
+
viewData = render()
|
|
148
|
+
setPage(0)
|
|
104
149
|
setOpen(true)
|
|
105
150
|
try {
|
|
106
151
|
const theme = context.theme?.text ?? {}
|
|
107
152
|
context.ui.dialog.show(
|
|
108
|
-
() =>
|
|
153
|
+
() => (
|
|
154
|
+
<WhatsNewContent
|
|
155
|
+
data={viewData as WhatsNewViewData}
|
|
156
|
+
page={page}
|
|
157
|
+
pageCount={pageCount}
|
|
158
|
+
fg={theme.base}
|
|
159
|
+
muted={theme.muted}
|
|
160
|
+
/>
|
|
161
|
+
),
|
|
109
162
|
close,
|
|
110
163
|
)
|
|
111
164
|
} catch {
|