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.
Files changed (41) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +13 -25
  3. package/README.pt-BR.md +4 -5
  4. package/package.json +1 -1
  5. package/plugin.json +1 -1
  6. package/pyproject.toml +1 -1
  7. package/scripts/mcp_persistence_server.py +1 -1
  8. package/src/agents/apollo.md +1 -0
  9. package/src/agents/gaia.md +1 -0
  10. package/src/agents/zeus.md +8 -29
  11. package/src/mcp/mcp_persistence_server.py +1 -1
  12. package/src/pantheon/{delegation-compaction.ts → compaction-context.ts} +10 -100
  13. package/src/pantheon/cost-command.ts +1 -2
  14. package/src/pantheon/delegation-enforce.ts +59 -14
  15. package/src/pantheon/goal-loop.ts +1 -1
  16. package/src/pantheon/goal-store.ts +1 -1
  17. package/src/pantheon/idle-continuation.ts +4 -6
  18. package/src/pantheon/model-command.ts +1 -2
  19. package/src/pantheon/native-task-status.ts +2 -2
  20. package/src/pantheon/session-id.ts +30 -0
  21. package/src/pantheon/task-result-guard.ts +2 -3
  22. package/src/pantheon/todo-enforcer.ts +3 -3
  23. package/src/pantheon/tool-context.ts +23 -0
  24. package/src/pantheon/v2-bridge.ts +1 -4
  25. package/src/plugin-v2.ts +4 -15
  26. package/src/plugin.ts +61 -245
  27. package/src/plugins/tui/dist/tui.d.ts +49 -79
  28. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  29. package/src/plugins/tui/dist/tui.js +48 -189
  30. package/src/plugins/tui/package-lock.json +2 -2
  31. package/src/plugins/tui/package.json +1 -1
  32. package/src/plugins/tui/src/index.tsx +97 -295
  33. package/src/skills/context-compression/SKILL.md +1 -1
  34. package/src/pantheon/delegate-manager.ts +0 -851
  35. package/src/pantheon/delegation-classifier.ts +0 -306
  36. package/src/pantheon/delegation-finalize.ts +0 -468
  37. package/src/pantheon/delegation-notify.ts +0 -212
  38. package/src/pantheon/delegation-toast.ts +0 -73
  39. package/src/pantheon/delegation.ts +0 -1349
  40. package/src/pantheon/native-probe.ts +0 -234
  41. 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
- }