pantheon-opencode 1.5.0-beta.16 → 1.5.0-beta.18
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 +48 -0
- package/README.md +13 -25
- package/README.pt-BR.md +4 -5
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/mcp_persistence_server.py +1 -1
- package/src/agents/apollo.md +1 -0
- package/src/agents/gaia.md +1 -0
- package/src/agents/zeus.md +8 -29
- package/src/mcp/mcp_persistence_server.py +1 -1
- package/src/pantheon/{delegation-compaction.ts → compaction-context.ts} +10 -100
- package/src/pantheon/cost-command.ts +1 -2
- package/src/pantheon/delegation-enforce.ts +59 -14
- package/src/pantheon/goal-loop.ts +1 -1
- package/src/pantheon/goal-store.ts +1 -1
- package/src/pantheon/idle-continuation.ts +4 -6
- package/src/pantheon/model-command.ts +1 -2
- package/src/pantheon/native-task-status.ts +2 -2
- package/src/pantheon/session-id.ts +30 -0
- package/src/pantheon/task-result-guard.ts +2 -3
- package/src/pantheon/todo-enforcer.ts +3 -3
- package/src/pantheon/tool-context.ts +23 -0
- package/src/pantheon/v2-bridge.ts +1 -4
- package/src/plugin-v2.ts +4 -15
- package/src/plugin.ts +61 -245
- package/src/plugins/tui/dist/tui.d.ts +49 -79
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +48 -189
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/index.tsx +97 -295
- package/src/skills/context-compression/SKILL.md +1 -1
- package/src/pantheon/delegate-manager.ts +0 -851
- package/src/pantheon/delegation-classifier.ts +0 -306
- package/src/pantheon/delegation-finalize.ts +0 -468
- package/src/pantheon/delegation-notify.ts +0 -212
- package/src/pantheon/delegation-toast.ts +0 -73
- package/src/pantheon/delegation.ts +0 -1349
- package/src/pantheon/native-probe.ts +0 -234
- package/src/pantheon/step-cap.ts +0 -110
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { BackgroundJobRecord } from './background-job-board.ts'
|
|
2
|
-
|
|
3
|
-
type ToastCategory = 'errors' | 'delegations' | 'council'
|
|
4
|
-
|
|
5
|
-
const toastMode = (process.env.PANTHEON_TOASTS ?? '').trim().toLowerCase()
|
|
6
|
-
const enabledToastCategories: ReadonlySet<ToastCategory> = (() => {
|
|
7
|
-
switch (toastMode) {
|
|
8
|
-
case 'off':
|
|
9
|
-
return new Set()
|
|
10
|
-
case 'errors':
|
|
11
|
-
return new Set(['errors'])
|
|
12
|
-
case 'council':
|
|
13
|
-
return new Set(['errors', 'council'])
|
|
14
|
-
case 'all':
|
|
15
|
-
return new Set(['errors', 'delegations', 'council'])
|
|
16
|
-
default:
|
|
17
|
-
return new Set(['errors', 'delegations', 'council'])
|
|
18
|
-
}
|
|
19
|
-
})()
|
|
20
|
-
const terminalToastsShown = new Set<string>()
|
|
21
|
-
const terminalStates = new Set(['completed', 'error', 'cancelled'])
|
|
22
|
-
|
|
23
|
-
/** Match the lifecycle toast gate used by pantheon-hooks. */
|
|
24
|
-
export function delegationToastEnabled(): boolean {
|
|
25
|
-
return enabledToastCategories.has('delegations')
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type ToastClient = {
|
|
29
|
-
tui?: {
|
|
30
|
-
showToast?: (input: {
|
|
31
|
-
body: {
|
|
32
|
-
title?: string
|
|
33
|
-
message: string
|
|
34
|
-
variant: 'info' | 'success' | 'warning' | 'error'
|
|
35
|
-
duration: number
|
|
36
|
-
}
|
|
37
|
-
}) => Promise<unknown>
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** Best-effort visual completion signal; never affects board finalization. */
|
|
42
|
-
export async function showDelegationTerminalToast(
|
|
43
|
-
client: ToastClient,
|
|
44
|
-
job: Pick<BackgroundJobRecord, 'taskID' | 'alias' | 'agent' | 'state' | 'timedOut'>,
|
|
45
|
-
): Promise<void> {
|
|
46
|
-
try {
|
|
47
|
-
if (!delegationToastEnabled()) return
|
|
48
|
-
const isTerminal = job.timedOut || terminalStates.has(job.state)
|
|
49
|
-
if (isTerminal) {
|
|
50
|
-
if (terminalToastsShown.has(job.taskID)) return
|
|
51
|
-
terminalToastsShown.add(job.taskID)
|
|
52
|
-
}
|
|
53
|
-
const showToast = client.tui?.showToast
|
|
54
|
-
if (typeof showToast !== 'function') return
|
|
55
|
-
const state = job.timedOut ? 'timeout' : job.state
|
|
56
|
-
const variant =
|
|
57
|
-
state === 'completed'
|
|
58
|
-
? 'success'
|
|
59
|
-
: state === 'error' || state === 'timeout'
|
|
60
|
-
? 'error'
|
|
61
|
-
: 'warning'
|
|
62
|
-
await showToast({
|
|
63
|
-
body: {
|
|
64
|
-
title: 'Delegação concluída',
|
|
65
|
-
message: `${job.alias} (${job.agent}) — ${state}`,
|
|
66
|
-
variant,
|
|
67
|
-
duration: 4000,
|
|
68
|
-
},
|
|
69
|
-
})
|
|
70
|
-
} catch {
|
|
71
|
-
// TUI is optional (and may disappear during shutdown); completion is durable.
|
|
72
|
-
}
|
|
73
|
-
}
|