pantheon-opencode 1.5.0-beta.15 → 1.5.0-beta.17

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 (54) hide show
  1. package/AGENTS.md +14 -63
  2. package/CHANGELOG.md +55 -0
  3. package/README.md +14 -27
  4. package/README.pt-BR.md +5 -6
  5. package/commands/pantheon.md +1 -35
  6. package/package.json +1 -1
  7. package/plugin.json +1 -1
  8. package/pyproject.toml +1 -1
  9. package/scripts/mcp_persistence_server.py +1 -1
  10. package/src/agents/apollo.md +1 -0
  11. package/src/agents/gaia.md +1 -0
  12. package/src/agents/zeus.md +8 -29
  13. package/src/instructions/memory-protocol.instructions.md +6 -3
  14. package/src/instructions/zeus-anti-stall.instructions.md +2 -4
  15. package/src/instructions/zeus-council-synthesis.instructions.md +3 -28
  16. package/src/instructions/zeus-timeout-retry.instructions.md +3 -28
  17. package/src/mcp/mcp_persistence_server.py +1 -1
  18. package/src/mcp/toon_codec.py +2 -4
  19. package/src/pantheon/{delegation-compaction.ts → compaction-context.ts} +10 -100
  20. package/src/pantheon/cost-command.ts +1 -2
  21. package/src/pantheon/delegation-enforce.ts +59 -14
  22. package/src/pantheon/goal-loop.ts +1 -1
  23. package/src/pantheon/goal-store.ts +1 -1
  24. package/src/pantheon/idle-continuation.ts +4 -6
  25. package/src/pantheon/model-command.ts +1 -2
  26. package/src/pantheon/native-task-status.ts +2 -2
  27. package/src/pantheon/session-id.ts +30 -0
  28. package/src/pantheon/task-result-guard.ts +2 -3
  29. package/src/pantheon/todo-enforcer.ts +3 -3
  30. package/src/pantheon/tool-context.ts +23 -0
  31. package/src/pantheon/v2-bridge.ts +1 -4
  32. package/src/plugin-v2.ts +4 -15
  33. package/src/plugin.ts +61 -245
  34. package/src/plugins/tui/dist/tui.d.ts +33 -64
  35. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  36. package/src/plugins/tui/dist/tui.js +30 -177
  37. package/src/plugins/tui/package-lock.json +2 -2
  38. package/src/plugins/tui/package.json +1 -1
  39. package/src/plugins/tui/src/index.tsx +67 -277
  40. package/src/skills/context-compression/SKILL.md +1 -1
  41. package/scripts/dev-tui.sh +0 -48
  42. package/scripts/generate-preset-docs.mjs +0 -300
  43. package/scripts/generate-prompts.sh +0 -222
  44. package/scripts/install/component.mjs +0 -24
  45. package/scripts/install/migrate-config.mjs +0 -302
  46. package/src/pantheon/delegate-manager.ts +0 -851
  47. package/src/pantheon/delegation-classifier.ts +0 -306
  48. package/src/pantheon/delegation-finalize.ts +0 -468
  49. package/src/pantheon/delegation-notify.ts +0 -212
  50. package/src/pantheon/delegation-toast.ts +0 -73
  51. package/src/pantheon/delegation.ts +0 -1349
  52. package/src/pantheon/native-probe.ts +0 -234
  53. package/src/pantheon/step-cap.ts +0 -110
  54. package/src/pantheon/toon-codec.ts +0 -481
@@ -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
- }