pantheon-opencode 2.1.4 → 2.1.6
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 +6 -6
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +52 -0
- package/README.md +60 -233
- package/README.pt-BR.md +64 -220
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/install/opencode.mjs +12 -0
- package/scripts/test-slice.mjs +34 -2
- package/skills-lock.json +1 -1
- package/src/agents/aphrodite.md +3 -1
- package/src/agents/apollo.md +1 -0
- package/src/agents/athena.md +1 -0
- package/src/agents/demeter.md +2 -0
- package/src/agents/gaia.md +1 -0
- package/src/agents/hephaestus.md +1 -0
- package/src/agents/hermes.md +2 -1
- package/src/agents/iris.md +1 -0
- package/src/agents/mnemosyne.md +1 -0
- package/src/agents/nyx.md +1 -0
- package/src/agents/prometheus.md +1 -0
- package/src/agents/talos.md +1 -0
- package/src/agents/themis.md +1 -0
- package/src/agents/zeus.md +8 -2
- package/src/instructions/backend-standards.instructions.md +5 -0
- package/src/instructions/test-economy.instructions.md +6 -6
- package/src/mcp/pantheon_vision.py +4 -1
- package/src/pantheon/auto-permissions.ts +4 -3
- package/src/pantheon/deepwork/deepwork-tool.ts +23 -75
- package/src/pantheon/deepwork/plan-schema.ts +4 -2
- package/src/pantheon/deepwork/plan-tracker.ts +380 -90
- package/src/pantheon/jev-decision-tool.ts +1 -7
- package/src/pantheon/local-decision-tool.ts +1 -1
- package/src/pantheon/native-vision.ts +1 -1
- package/src/pantheon/skill-search-tool.ts +241 -47
- package/src/pantheon/tool-context.ts +23 -0
- package/src/pantheon/tools.ts +46 -41
- package/src/plugin/index.js +521 -222
- package/src/plugin.ts +1 -0
- package/src/plugins/tui/dist/tui.d.ts +7 -6
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +198 -269
- 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/index.tsx +7 -45
- package/src/plugins/tui/src/tui-prefs.ts +3 -9
- package/src/skills/test-slicing/SKILL.md +14 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pantheon-tui",
|
|
9
|
-
"version": "2.1.
|
|
9
|
+
"version": "2.1.6",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@opencode/plugin": "2.0.26",
|
|
@@ -1886,8 +1886,10 @@ export function collectDispatch(
|
|
|
1886
1886
|
/* ─── Block layout ───────────────────────────────────────── */
|
|
1887
1887
|
|
|
1888
1888
|
/** Sidebar blocks in render order. Spacing is derived from this list instead of
|
|
1889
|
-
* from the view, so a hidden block can never leave an empty gap behind.
|
|
1890
|
-
|
|
1889
|
+
* from the view, so a hidden block can never leave an empty gap behind.
|
|
1890
|
+
* Note: The custom Todo block was removed from the sidebar composition because
|
|
1891
|
+
* OpenCode 2.x natively renders the Todo panel when `todowrite` is used. */
|
|
1892
|
+
export type SidebarBlockKey = 'context' | 'git' | 'dispatch'
|
|
1891
1893
|
|
|
1892
1894
|
/** One rendered block: its key, and whether a blank line precedes it. */
|
|
1893
1895
|
export type SidebarBlock = { key: SidebarBlockKey; spacer: boolean }
|
|
@@ -1895,14 +1897,12 @@ export type SidebarBlock = { key: SidebarBlockKey; spacer: boolean }
|
|
|
1895
1897
|
/** Header glyph per block — one codepoint each, rendered muted before the bold
|
|
1896
1898
|
* label. The fixed header (version/preset/session) takes none.
|
|
1897
1899
|
* Measured as one terminal cell by the host (`@opentui/core` counts
|
|
1898
|
-
* `emoji-regex` matches as two): ▤ U+25A4 (EAW=A), ◆ U+25C6 (A),
|
|
1899
|
-
* ◈ U+25C8 (A).
|
|
1900
|
-
*
|
|
1901
|
-
* was replaced by the host's own Notice glyph. */
|
|
1900
|
+
* `emoji-regex` matches as two): ▤ U+25A4 (EAW=A), ◆ U+25C6 (A),
|
|
1901
|
+
* ◈ U+25C8 (A). `⌁` U+2301 (the old Dispatch glyph) was replaced by the host's
|
|
1902
|
+
* own Notice glyph. */
|
|
1902
1903
|
export const BLOCK_ICONS: Record<SidebarBlockKey, string> = {
|
|
1903
1904
|
context: '\u25A4',
|
|
1904
1905
|
git: '\u25C6',
|
|
1905
|
-
todo: '\u25BE',
|
|
1906
1906
|
dispatch: '\u25C8',
|
|
1907
1907
|
}
|
|
1908
1908
|
|
|
@@ -3839,7 +3839,6 @@ export function createSidebarModel(
|
|
|
3839
3839
|
present.push('context')
|
|
3840
3840
|
}
|
|
3841
3841
|
if (prefs.sidebar.blocks.git && (branch() !== null || gitLine() !== null)) present.push('git')
|
|
3842
|
-
if (prefs.sidebar.blocks.todo && todo().visible.length > 0) present.push('todo')
|
|
3843
3842
|
if (prefs.sidebar.blocks.dispatch && dispatch() !== null) present.push('dispatch')
|
|
3844
3843
|
return withBlockSpacers(present)
|
|
3845
3844
|
})
|
|
@@ -4019,13 +4018,6 @@ function Sidebar(props: SidebarProps): JSX.Element {
|
|
|
4019
4018
|
const text = () => context.theme.text?.base
|
|
4020
4019
|
const muted = () => context.theme.text?.muted ?? text()
|
|
4021
4020
|
const tone = (value: DelegationTone) => context.theme?.text?.feedback?.[value]?.base ?? text()
|
|
4022
|
-
/* Single accent: in-progress uses `theme.text.feedback.warning.base` when the
|
|
4023
|
-
* theme ships it, so live work is the only colored row. */
|
|
4024
|
-
const todoFg = (status: TodoStatus) => {
|
|
4025
|
-
const rowTone = todoTone(status)
|
|
4026
|
-
if (rowTone === 'accent') return tone('warning')
|
|
4027
|
-
return rowTone === 'muted' ? muted() : text()
|
|
4028
|
-
}
|
|
4029
4021
|
const open = (sessionID: string) => () => navigateToSession(context.ui?.router, sessionID)
|
|
4030
4022
|
/* Spacing comes from the block list, never from the view: a block with no
|
|
4031
4023
|
* content is simply absent there, so it leaves no orphan gap behind. */
|
|
@@ -4212,36 +4204,6 @@ function Sidebar(props: SidebarProps): JSX.Element {
|
|
|
4212
4204
|
</box>
|
|
4213
4205
|
</Show>
|
|
4214
4206
|
|
|
4215
|
-
{/* Todo — derived from the newest completed `todowrite` in the active
|
|
4216
|
-
session's transcript (no todo API exists in the installed client).
|
|
4217
|
-
Rows are grouped in_progress → pending → completed → cancelled, capped
|
|
4218
|
-
at six, and every row keeps a single accent: live work only. The
|
|
4219
|
-
header takes `warning` so the block reads apart from the neutral
|
|
4220
|
-
reference blocks above it. */}
|
|
4221
|
-
<Show when={block('todo')}>
|
|
4222
|
-
<box flexDirection="column">
|
|
4223
|
-
<Show when={spacer('todo')}>
|
|
4224
|
-
<box height={1} />
|
|
4225
|
-
</Show>
|
|
4226
|
-
<Show when={model.todo().visible.length > 0}>
|
|
4227
|
-
<box flexDirection="column">
|
|
4228
|
-
<BlockHeader
|
|
4229
|
-
icon={BLOCK_ICONS.todo}
|
|
4230
|
-
label="Todo"
|
|
4231
|
-
fg={tone('warning')}
|
|
4232
|
-
muted={muted()}
|
|
4233
|
-
/>
|
|
4234
|
-
<For each={model.todo().visible}>
|
|
4235
|
-
{(item: TodoItem) => <text fg={todoFg(item.status)}>{todoRowText(item)}</text>}
|
|
4236
|
-
</For>
|
|
4237
|
-
<Show when={hiddenTodoText(model.todo().hidden)}>
|
|
4238
|
-
{(line) => <text fg={muted()}>{line()}</text>}
|
|
4239
|
-
</Show>
|
|
4240
|
-
</box>
|
|
4241
|
-
</Show>
|
|
4242
|
-
</box>
|
|
4243
|
-
</Show>
|
|
4244
|
-
|
|
4245
4207
|
{/* Dispatch — one block for the whole child set. The header carries the
|
|
4246
4208
|
live count and the subtree's real spend; then one row per live child
|
|
4247
4209
|
(newest first, capped at three, `… +N rodando` beyond), the aggregated
|
|
@@ -195,7 +195,7 @@ export interface TuiPrefs {
|
|
|
195
195
|
}
|
|
196
196
|
sidebar: {
|
|
197
197
|
header: { version: boolean; preset: boolean; session: boolean }
|
|
198
|
-
blocks: { context: boolean; git: boolean; todo
|
|
198
|
+
blocks: { context: boolean; git: boolean; todo?: boolean; dispatch: boolean }
|
|
199
199
|
context: {
|
|
200
200
|
gauge: GaugeStyle
|
|
201
201
|
barShape: BarShapePref
|
|
@@ -221,7 +221,7 @@ export const DEFAULT_TUI_PREFS: TuiPrefs = {
|
|
|
221
221
|
},
|
|
222
222
|
sidebar: {
|
|
223
223
|
header: { version: true, preset: true, session: true },
|
|
224
|
-
blocks: { context: true, git: true, todo:
|
|
224
|
+
blocks: { context: true, git: true, todo: false, dispatch: true },
|
|
225
225
|
context: {
|
|
226
226
|
gauge: 'both',
|
|
227
227
|
barShape: 'line',
|
|
@@ -306,7 +306,7 @@ export function normalizeTuiPrefs(raw: unknown): TuiPrefs {
|
|
|
306
306
|
blocks: {
|
|
307
307
|
context: asBool(blocks.context, true),
|
|
308
308
|
git: asBool(blocks.git, true),
|
|
309
|
-
todo: asBool(blocks.todo,
|
|
309
|
+
todo: asBool(blocks.todo, false),
|
|
310
310
|
dispatch: asBool(blocks.dispatch, true),
|
|
311
311
|
},
|
|
312
312
|
context: {
|
|
@@ -460,12 +460,6 @@ export function buildTuiTab(prefs: TuiPrefs, languagePref?: string): SettingsTab
|
|
|
460
460
|
prefs.sidebar.blocks.git,
|
|
461
461
|
isPt ? 'branch + contagem de alterações' : 'branch + working-tree counts',
|
|
462
462
|
),
|
|
463
|
-
row(
|
|
464
|
-
'tui.sidebar.block.todo',
|
|
465
|
-
isPt ? 'Bloco Todo' : 'Todo block',
|
|
466
|
-
prefs.sidebar.blocks.todo,
|
|
467
|
-
isPt ? 'tarefas pendentes mais recentes' : 'the newest todowrite',
|
|
468
|
-
),
|
|
469
463
|
row(
|
|
470
464
|
'tui.sidebar.block.dispatch',
|
|
471
465
|
isPt ? 'Bloco Dispatch' : 'Dispatch block',
|
|
@@ -19,13 +19,18 @@ Always prefer the repository's own focused selector or diff-aware command over g
|
|
|
19
19
|
2. If a project-defined focused selector exists, execute it directly.
|
|
20
20
|
3. If absent, map the modified file directly to its corresponding test file.
|
|
21
21
|
|
|
22
|
-
### 2. Scope Escalation &
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
|
|
22
|
+
### 2. Scope Escalation & Risk-Based Protocol (Issue #444)
|
|
23
|
+
- **Focused Slice First:** Identify affected files/behaviors and run the narrowest slice (<10s).
|
|
24
|
+
- **Triggers for Package-Level Expansion:** Broaden beyond the local slice ONLY when changes:
|
|
25
|
+
1. Cross module/package boundaries
|
|
26
|
+
2. Alter public API/contracts or data schemas/migrations
|
|
27
|
+
3. Touch authentication, authorization, or security boundaries
|
|
28
|
+
- **Broad Suite Distinction:** When running a broad suite, state explicitly whether it is an agent recommendation or a mandatory repository/CI gate.
|
|
29
|
+
- **Never Delete Tests to Speed Up:** Propose test removal only with concrete evidence of duplication, flakiness, or zero detection value.
|
|
30
|
+
- **CLI vs Code Execution:** Execute CLI binaries (`opencode-quota`, `git`, `npm`, `pytest`) via `shell`/`bash`, never JS eval (`execute`); on failure, never glob `~/.config`.
|
|
26
31
|
- **Mapping Gap Handling:** If a modified file has no direct test counterpart:
|
|
27
32
|
1. Report the mapping gap explicitly: `[Test Mapping Gap] No direct test file for <file>.`
|
|
28
|
-
2. Execute a bounded risk-appropriate fallback (static lint/typecheck gate
|
|
33
|
+
2. Execute a bounded risk-appropriate fallback (static lint/typecheck gate plus closest slice).
|
|
29
34
|
3. DO NOT escalate to running the entire repository test suite.
|
|
30
35
|
|
|
31
36
|
### 3. Failure/Fix Loop (Rerun Only Failed Tests)
|
|
@@ -36,11 +41,12 @@ Always prefer the repository's own focused selector or diff-aware command over g
|
|
|
36
41
|
3. **DO NOT rerun checks that already passed** when their covered code did not change.
|
|
37
42
|
4. Once the targeted test passes, rerun the single slice file once to confirm no regressions within the file.
|
|
38
43
|
|
|
39
|
-
### 4. Observable Task Receipt Summary
|
|
40
|
-
Every implementation specialist MUST include the detailed test receipt in
|
|
44
|
+
### 4. Observable Task Receipt Summary (Issue #444)
|
|
45
|
+
Every implementation specialist MUST include the detailed test receipt in `subtask_summary`, distinguishing agent-executed tests from CI gates and pending validations:
|
|
41
46
|
```markdown
|
|
42
47
|
**tests:** [PASS | WARN | FAIL] `<command>` (targets: N, duration: <X>s, selection: <reason or repo selector>)
|
|
43
|
-
**
|
|
48
|
+
**validation_scope:** focused_slice | package_suite | ci_gate_required
|
|
49
|
+
**pending_validation:** none | [deferred broad suites / CI gates]
|
|
44
50
|
```
|
|
45
51
|
*Example:*
|
|
46
52
|
`**tests:** [PASS] npx tsx tests/pantheon/auto-permissions.test.ts (targets: 10, duration: 0.12s, selection: direct file slice for auto-permissions.ts)`
|