pantheon-opencode 2.0.4 → 2.1.1
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 +1 -1
- package/CHANGELOG.md +53 -0
- package/README.md +27 -11
- package/README.pt-BR.md +27 -11
- package/commands/pantheon-deepwork.md +11 -2
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/prompts/orchestrate-with-zeus.prompt.md +2 -0
- package/pyproject.toml +1 -1
- package/scripts/cost.mjs +4 -5
- package/scripts/docs-media.mjs +1 -1
- package/skills-lock.json +1 -1
- package/src/agents/athena.md +10 -8
- package/src/agents/themis.md +1 -0
- package/src/agents/zeus.md +32 -3
- package/src/instructions/agent-return-format.instructions.md +1 -1
- package/src/mcp/pantheon_vision.py +33 -2
- package/src/pantheon/cost-command.ts +4 -1
- package/src/pantheon/deepwork/deepwork-tool.ts +370 -0
- package/src/pantheon/deepwork/plan-projection.ts +274 -0
- package/src/pantheon/deepwork/plan-schema.ts +93 -0
- package/src/pantheon/deepwork/plan-tracker.ts +336 -0
- package/src/pantheon/native-vision.ts +4 -2
- package/src/pantheon/skill-search-tool.ts +2 -2
- package/src/pantheon/tools.ts +2 -0
- package/src/plugin/index.js +922 -42
- package/src/plugin.ts +2 -2
- package/src/plugins/tui/dist/tui.js +461 -289
- 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 +14 -16
- package/src/plugins/tui/src/decision-router-state.ts +22 -10
- package/src/plugins/tui/src/pantheon-settings-state.ts +119 -35
- package/src/plugins/tui/src/pantheon-settings.tsx +142 -48
- package/src/plugins/tui/src/preset-state.ts +96 -6
- package/src/plugins/tui/src/update-status.ts +62 -22
- package/src/skills/prompt-refinery/SKILL.md +6 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-tui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pantheon-tui",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.1.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@opencode/plugin": "2.0.26",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
* shows where the thresholds sit today.
|
|
22
22
|
*/
|
|
23
23
|
import type { SettingsTab } from './pantheon-settings-state.ts'
|
|
24
|
-
import { resolveLanguage } from './settings-i18n.ts'
|
|
25
24
|
|
|
26
25
|
export interface GoalLoopPrefs {
|
|
27
26
|
enabled: boolean
|
|
@@ -82,8 +81,7 @@ export function buildAutonomyTab(input: {
|
|
|
82
81
|
goalLoopRestartPending?: boolean | undefined
|
|
83
82
|
languagePref?: string | undefined
|
|
84
83
|
}): SettingsTab {
|
|
85
|
-
const
|
|
86
|
-
const isPt = lang === 'pt-BR'
|
|
84
|
+
const isPt = input.languagePref === 'pt-BR'
|
|
87
85
|
|
|
88
86
|
return {
|
|
89
87
|
id: 'autonomy',
|
|
@@ -154,32 +152,32 @@ export function buildAutonomyTab(input: {
|
|
|
154
152
|
},
|
|
155
153
|
{
|
|
156
154
|
title: isPt
|
|
157
|
-
? 'Gradiente de
|
|
158
|
-
: 'Decision
|
|
155
|
+
? 'Gradiente de Decisão (política de referência · governado por J1 e Orçamentos)'
|
|
156
|
+
: 'Decision Gradient (reference policy · governed by J1 & Budgets)',
|
|
159
157
|
rows: [
|
|
160
158
|
{
|
|
161
159
|
id: 'autonomy.gradient.solo',
|
|
162
|
-
name: 'Decide solo',
|
|
163
|
-
value: 'autonomous',
|
|
160
|
+
name: isPt ? 'Decisão solo' : 'Decide solo',
|
|
161
|
+
value: isPt ? 'autônomo' : 'autonomous',
|
|
164
162
|
note: isPt
|
|
165
|
-
? '
|
|
163
|
+
? 'ações rotineiras de baixo risco · reversível sem travas (sem portão)'
|
|
166
164
|
: 'reversible & low-risk edits, routine fixes (no gate)',
|
|
167
165
|
},
|
|
168
166
|
{
|
|
169
167
|
id: 'autonomy.gradient.jev',
|
|
170
|
-
name: 'Jev decides',
|
|
171
|
-
value: 'arbitrated',
|
|
168
|
+
name: isPt ? 'Decisão Jev' : 'Jev decides',
|
|
169
|
+
value: isPt ? 'arbitrado' : 'arbitrated',
|
|
172
170
|
note: isPt
|
|
173
|
-
? 'ambiguidade de tipos e
|
|
174
|
-
: 'typed ambiguity & candidate ranking
|
|
171
|
+
? 'ambiguidade de tipos e rotas · configurado nos Tetos de Orçamento acima'
|
|
172
|
+
: 'typed ambiguity & candidate ranking · configured via Budgets above',
|
|
175
173
|
},
|
|
176
174
|
{
|
|
177
175
|
id: 'autonomy.gradient.human',
|
|
178
|
-
name: 'Human decides',
|
|
179
|
-
value: 'human review',
|
|
176
|
+
name: isPt ? 'Aprovação humana' : 'Human decides',
|
|
177
|
+
value: isPt ? 'revisão humana' : 'human review',
|
|
180
178
|
note: isPt
|
|
181
|
-
? '
|
|
182
|
-
: 'high-risk & destructive operations
|
|
179
|
+
? 'ações destrutivas e de alto risco · configurado no limiar do Portão J1'
|
|
180
|
+
: 'high-risk & destructive operations · configured via J1 Gate',
|
|
183
181
|
},
|
|
184
182
|
],
|
|
185
183
|
},
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import { chmodSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'
|
|
18
18
|
import { dirname, join } from 'node:path'
|
|
19
19
|
import type { SettingsRow, SettingsTab } from './pantheon-settings-state.ts'
|
|
20
|
-
import { resolveLanguage } from './settings-i18n.ts'
|
|
21
20
|
|
|
22
21
|
export const DECISION_ENABLED_CYCLE: readonly string[] = Object.freeze(['enabled', 'disabled'])
|
|
23
22
|
|
|
@@ -88,21 +87,35 @@ export const DECISION_KNOWN_MODELS: Readonly<Record<string, string>> = Object.fr
|
|
|
88
87
|
* note. Drift-pinned against the installer/runtime sources in tests.
|
|
89
88
|
*/
|
|
90
89
|
export const DECISION_PROVIDER_CREDENTIALS: Readonly<
|
|
91
|
-
Record<string, { env?: string; note: string }>
|
|
90
|
+
Record<string, { env?: string; note: string; notePt?: string }>
|
|
92
91
|
> = Object.freeze({
|
|
93
92
|
'openai-decisions': {
|
|
94
93
|
note: 'host-configured model — provision via `decision-router setup-model openai-decisions`',
|
|
94
|
+
notePt: 'modelo do host — configure via `decision-router setup-model openai-decisions`',
|
|
95
|
+
},
|
|
96
|
+
'typesafe-jev': {
|
|
97
|
+
env: 'TYPESAFE_API_KEY',
|
|
98
|
+
note: 'export TYPESAFE_API_KEY=… then restart',
|
|
99
|
+
notePt: 'export TYPESAFE_API_KEY=… e depois reinicie',
|
|
100
|
+
},
|
|
101
|
+
'opencode-console-jev': {
|
|
102
|
+
note: 'rides your OpenCode login — no separate key',
|
|
103
|
+
notePt: 'utiliza login do OpenCode — sem chave separada',
|
|
104
|
+
},
|
|
105
|
+
'openrouter-jev': {
|
|
106
|
+
env: 'OPENROUTER_API_KEY',
|
|
107
|
+
note: 'export OPENROUTER_API_KEY=… then restart',
|
|
108
|
+
notePt: 'export OPENROUTER_API_KEY=… e depois reinicie',
|
|
95
109
|
},
|
|
96
|
-
'typesafe-jev': { env: 'TYPESAFE_API_KEY', note: 'export TYPESAFE_API_KEY=… then restart' },
|
|
97
|
-
'opencode-console-jev': { note: 'rides your OpenCode login — no separate key' },
|
|
98
|
-
'openrouter-jev': { env: 'OPENROUTER_API_KEY', note: 'export OPENROUTER_API_KEY=… then restart' },
|
|
99
110
|
'vercel-gateway-jev': {
|
|
100
111
|
env: 'AI_GATEWAY_API_KEY',
|
|
101
112
|
note: 'export AI_GATEWAY_API_KEY=… then restart',
|
|
113
|
+
notePt: 'export AI_GATEWAY_API_KEY=… e depois reinicie',
|
|
102
114
|
},
|
|
103
115
|
'cloudflare-workers-jev': {
|
|
104
116
|
env: 'CLOUDFLARE_API_TOKEN',
|
|
105
117
|
note: 'needs accountId (setup-model --account-id=…) + CLOUDFLARE_API_TOKEN',
|
|
118
|
+
notePt: 'requer accountId (setup-model --account-id=…) + CLOUDFLARE_API_TOKEN',
|
|
106
119
|
},
|
|
107
120
|
})
|
|
108
121
|
|
|
@@ -343,8 +356,7 @@ export function buildDecisionTab(
|
|
|
343
356
|
configProviders: ReadonlySet<string> = new Set(),
|
|
344
357
|
languagePref?: string | undefined,
|
|
345
358
|
): SettingsTab {
|
|
346
|
-
const
|
|
347
|
-
const isPt = lang === 'pt-BR'
|
|
359
|
+
const isPt = languagePref === 'pt-BR'
|
|
348
360
|
const { config, corrupt } = read
|
|
349
361
|
const rows: SettingsRow[] = [
|
|
350
362
|
{
|
|
@@ -355,10 +367,10 @@ export function buildDecisionTab(
|
|
|
355
367
|
...(corrupt ? {} : { cycle: DECISION_ENABLED_CYCLE }),
|
|
356
368
|
note: corrupt
|
|
357
369
|
? isPt
|
|
358
|
-
? 'config inválida — runtime fail-closes;
|
|
370
|
+
? 'config inválida — runtime fail-closes; repare via `decision-router setup-model`'
|
|
359
371
|
: 'config unreadable/invalid — runtime fail-closes; repair via `decision-router setup-model`'
|
|
360
372
|
: isPt
|
|
361
|
-
? '
|
|
373
|
+
? 'aplica em tempo real — arbitragem de decisões relida a cada chamada'
|
|
362
374
|
: 'applies live — the runtime re-reads this on every gated call',
|
|
363
375
|
},
|
|
364
376
|
{
|
|
@@ -440,7 +452,7 @@ export function buildDecisionTab(
|
|
|
440
452
|
id: `decision.key.${provider}`,
|
|
441
453
|
name: provider,
|
|
442
454
|
value: status === 'missing' ? 'MISSING' : status,
|
|
443
|
-
note: credential.note,
|
|
455
|
+
note: isPt ? (credential.notePt ?? credential.note) : credential.note,
|
|
444
456
|
}
|
|
445
457
|
}),
|
|
446
458
|
},
|
|
@@ -332,18 +332,21 @@ export function settledDraft(draft: SettingsDraft, applied: readonly string[]):
|
|
|
332
332
|
|
|
333
333
|
export const GATES_ENABLED_CYCLE: readonly string[] = Object.freeze(['enabled', 'disabled'])
|
|
334
334
|
|
|
335
|
-
export function buildGatesTab(load: OverridesLoad): SettingsTab {
|
|
335
|
+
export function buildGatesTab(load: OverridesLoad, languagePref?: string): SettingsTab {
|
|
336
|
+
const isPt = languagePref === 'pt-BR'
|
|
336
337
|
const merged = mergedOverrides(load)
|
|
337
338
|
const rowFor = (behavior: SettingsBehavior): SettingsRow => {
|
|
338
339
|
const fromProject = load.project[behavior.id] !== undefined
|
|
339
340
|
const writable = !fromProject && canWriteOverrides(load)
|
|
340
341
|
return {
|
|
341
342
|
id: `gate.${behavior.id}`,
|
|
342
|
-
name: fromProject ? `${behavior.title} (project)` : behavior.title,
|
|
343
|
+
name: fromProject ? `${behavior.title} (${isPt ? 'projeto' : 'project'})` : behavior.title,
|
|
343
344
|
value: isBehaviorDisabled(merged, behavior.id) ? 'disabled' : 'enabled',
|
|
344
345
|
...(writable ? { cycle: GATES_ENABLED_CYCLE } : {}),
|
|
345
346
|
note: fromProject
|
|
346
|
-
?
|
|
347
|
+
? isPt
|
|
348
|
+
? 'arquivo do projeto tem precedência · edite .pantheon/overrides.json'
|
|
349
|
+
: 'project file wins at runtime — edit .pantheon/overrides.json'
|
|
347
350
|
: behavior.description,
|
|
348
351
|
}
|
|
349
352
|
}
|
|
@@ -353,34 +356,106 @@ export function buildGatesTab(load: OverridesLoad): SettingsTab {
|
|
|
353
356
|
id: 'gates',
|
|
354
357
|
title: 'Gates',
|
|
355
358
|
groups: [
|
|
356
|
-
{ title: 'Install skills', rows: install.map(rowFor) },
|
|
357
|
-
{ title: 'Runtime gates', rows: runtime.map(rowFor) },
|
|
359
|
+
{ title: isPt ? 'Skills instaladas' : 'Install skills', rows: install.map(rowFor) },
|
|
360
|
+
{ title: isPt ? 'Portões de execução' : 'Runtime gates', rows: runtime.map(rowFor) },
|
|
358
361
|
],
|
|
359
362
|
}
|
|
360
363
|
}
|
|
361
364
|
|
|
362
|
-
export
|
|
365
|
+
export interface AboutTabExtra {
|
|
366
|
+
nodeVersion?: string
|
|
367
|
+
platform?: string
|
|
368
|
+
preset?: string | null
|
|
369
|
+
decisionEnabled?: boolean
|
|
370
|
+
j1Mode?: string
|
|
371
|
+
languagePref?: string
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export function buildAboutTab(version: string, extra?: AboutTabExtra): SettingsTab {
|
|
375
|
+
const isPt = extra?.languagePref === 'pt-BR'
|
|
376
|
+
|
|
377
|
+
const sysRows: SettingsRow[] = [
|
|
378
|
+
{
|
|
379
|
+
id: 'about.version',
|
|
380
|
+
name: isPt ? 'Versão' : 'Version',
|
|
381
|
+
value: `v${version}`,
|
|
382
|
+
note: isPt
|
|
383
|
+
? 'OpenCode 2.x nativo — contrato V1 descontinuado'
|
|
384
|
+
: 'OpenCode 2.x only — the V1 contract is removed',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
id: 'about.behaviors',
|
|
388
|
+
name: isPt ? 'Comportamentos' : 'Behaviors',
|
|
389
|
+
value: String(SETTINGS_BEHAVIORS.length),
|
|
390
|
+
note: isPt
|
|
391
|
+
? 'portões e skills de governança registradas'
|
|
392
|
+
: 'registered governance gates and skills',
|
|
393
|
+
},
|
|
394
|
+
]
|
|
395
|
+
|
|
396
|
+
if (extra?.nodeVersion) {
|
|
397
|
+
sysRows.push({
|
|
398
|
+
id: 'about.runtime',
|
|
399
|
+
name: 'Runtime Node.js',
|
|
400
|
+
value: `v${extra.nodeVersion}`,
|
|
401
|
+
note: extra.platform ? `${isPt ? 'plataforma' : 'platform'}: ${extra.platform}` : '',
|
|
402
|
+
})
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const govRows: SettingsRow[] = [
|
|
406
|
+
{
|
|
407
|
+
id: 'about.preset',
|
|
408
|
+
name: isPt ? 'Predefinição' : 'Active Preset',
|
|
409
|
+
value: extra?.preset ?? 'none',
|
|
410
|
+
note: isPt ? 'modelo global ativo do Pantheon' : 'global model preset active in Pantheon',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
id: 'about.decision',
|
|
414
|
+
name: isPt ? 'Assistente Jev' : 'Decision Router',
|
|
415
|
+
value: extra?.decisionEnabled
|
|
416
|
+
? isPt
|
|
417
|
+
? 'ativado'
|
|
418
|
+
: 'enabled'
|
|
419
|
+
: isPt
|
|
420
|
+
? 'desativado'
|
|
421
|
+
: 'disabled',
|
|
422
|
+
note: isPt ? 'arbitragem de modelos e candidatos' : 'model and candidate arbitration',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
id: 'about.j1',
|
|
426
|
+
name: isPt ? 'Portão J1' : 'J1 Risk Gate',
|
|
427
|
+
value: extra?.j1Mode ?? 'shadow',
|
|
428
|
+
note: isPt
|
|
429
|
+
? 'portão de risco de segurança operacional'
|
|
430
|
+
: 'operational safety risk score gate',
|
|
431
|
+
},
|
|
432
|
+
]
|
|
433
|
+
|
|
434
|
+
const refRows: SettingsRow[] = [
|
|
435
|
+
{
|
|
436
|
+
id: 'about.license',
|
|
437
|
+
name: isPt ? 'Licença' : 'License',
|
|
438
|
+
value: 'MIT',
|
|
439
|
+
note: 'Open source · Pantheon Project',
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
id: 'about.repo',
|
|
443
|
+
name: isPt ? 'Repositório' : 'Repository',
|
|
444
|
+
value: 'ils15/pantheon-opencode',
|
|
445
|
+
note: 'github.com/ils15/pantheon-opencode',
|
|
446
|
+
},
|
|
447
|
+
]
|
|
448
|
+
|
|
449
|
+
const groups = [{ title: isPt ? 'Sistema & Plataforma' : 'System & Platform', rows: sysRows }]
|
|
450
|
+
if (extra?.preset !== undefined || extra?.decisionEnabled !== undefined) {
|
|
451
|
+
groups.push({ title: isPt ? 'Governança & Roteamento' : 'Governance & Routing', rows: govRows })
|
|
452
|
+
}
|
|
453
|
+
groups.push({ title: isPt ? 'Projeto & Referências' : 'Project & References', rows: refRows })
|
|
454
|
+
|
|
363
455
|
return {
|
|
364
456
|
id: 'about',
|
|
365
|
-
title: 'About',
|
|
366
|
-
groups
|
|
367
|
-
{
|
|
368
|
-
rows: [
|
|
369
|
-
{
|
|
370
|
-
id: 'about.version',
|
|
371
|
-
name: 'Version',
|
|
372
|
-
value: `v${version}`,
|
|
373
|
-
note: 'OpenCode 2.x only — the V1 contract is removed',
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
id: 'about.behaviors',
|
|
377
|
-
name: 'Behaviors',
|
|
378
|
-
value: String(SETTINGS_BEHAVIORS.length),
|
|
379
|
-
note: 'docs/design/2.0-settings-and-install.md',
|
|
380
|
-
},
|
|
381
|
-
],
|
|
382
|
-
},
|
|
383
|
-
],
|
|
457
|
+
title: isPt ? 'Sobre' : 'About',
|
|
458
|
+
groups,
|
|
384
459
|
}
|
|
385
460
|
}
|
|
386
461
|
|
|
@@ -393,48 +468,57 @@ export interface ChangelogHighlightItem {
|
|
|
393
468
|
export function buildChangelogTab(
|
|
394
469
|
version: string,
|
|
395
470
|
items: ChangelogHighlightItem[] = [],
|
|
471
|
+
languagePref?: string | undefined,
|
|
396
472
|
): SettingsTab {
|
|
473
|
+
const isPt = languagePref === 'pt-BR'
|
|
474
|
+
|
|
397
475
|
const rows: SettingsRow[] = []
|
|
398
476
|
if (items.length > 0) {
|
|
399
477
|
items.forEach((item, index) => {
|
|
400
478
|
rows.push({
|
|
401
479
|
id: `changelog.item.${index + 1}`,
|
|
402
480
|
name: item.title.slice(0, 26),
|
|
403
|
-
value:
|
|
481
|
+
value: '',
|
|
404
482
|
note: item.detail,
|
|
405
483
|
})
|
|
406
484
|
})
|
|
407
485
|
} else {
|
|
408
486
|
rows.push({
|
|
409
487
|
id: 'changelog.info',
|
|
410
|
-
name: 'Release',
|
|
488
|
+
name: isPt ? 'Versão' : 'Release',
|
|
411
489
|
value: `v${version}`,
|
|
412
|
-
note:
|
|
490
|
+
note: isPt
|
|
491
|
+
? 'veja o histórico completo no CHANGELOG.md ou no GitHub'
|
|
492
|
+
: 'view full history in CHANGELOG.md or GitHub releases',
|
|
413
493
|
})
|
|
414
494
|
}
|
|
415
495
|
|
|
416
496
|
return {
|
|
417
497
|
id: 'changelog',
|
|
418
|
-
title: 'Changelog',
|
|
498
|
+
title: isPt ? 'Changelog' : 'Changelog',
|
|
419
499
|
groups: [
|
|
420
500
|
{
|
|
421
|
-
title: `What's New in v${version}`,
|
|
501
|
+
title: isPt ? `Novidades na versão v${version}` : `What's New in v${version}`,
|
|
422
502
|
rows,
|
|
423
503
|
},
|
|
424
504
|
{
|
|
425
|
-
title: 'Release References',
|
|
505
|
+
title: isPt ? 'Referências de Versão' : 'Release References',
|
|
426
506
|
rows: [
|
|
427
507
|
{
|
|
428
508
|
id: 'changelog.docs',
|
|
429
|
-
name: 'Documentation',
|
|
509
|
+
name: isPt ? 'Documentação' : 'Documentation',
|
|
430
510
|
value: 'CHANGELOG.md',
|
|
431
|
-
note:
|
|
511
|
+
note: isPt
|
|
512
|
+
? 'incluído na raiz do plugin e do repositório'
|
|
513
|
+
: 'shipped at plugin root and repository root',
|
|
432
514
|
},
|
|
433
515
|
{
|
|
434
516
|
id: 'changelog.repo',
|
|
435
|
-
name: 'GitHub Repository',
|
|
517
|
+
name: isPt ? 'Repositório GitHub' : 'GitHub Repository',
|
|
436
518
|
value: 'ils15/pantheon-opencode',
|
|
437
|
-
note:
|
|
519
|
+
note: isPt
|
|
520
|
+
? 'versões, pull requests e discussões'
|
|
521
|
+
: 'releases, pull requests and discussion',
|
|
438
522
|
},
|
|
439
523
|
],
|
|
440
524
|
},
|