pantheon-opencode 1.4.2 → 1.5.0-beta.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.
Files changed (98) hide show
  1. package/.pantheon/code-mode/.gitkeep +0 -0
  2. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-1.json +8 -0
  3. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-10.json +8 -0
  4. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-11.json +8 -0
  5. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-2.json +8 -0
  6. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-3.json +8 -0
  7. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-4.json +8 -0
  8. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-5.json +8 -0
  9. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-6.json +8 -0
  10. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-7.json +8 -0
  11. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-8.json +8 -0
  12. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/checkpoint-9.json +8 -0
  13. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/heartbeat.json +8 -0
  14. package/.pantheon/code-mode/.pantheon/deepwork/initial-token-40k/session.json +11 -0
  15. package/.pantheon/code-mode/README.md +93 -0
  16. package/.pantheon/code-mode/checkpoint-session.py +7 -0
  17. package/.pantheon/code-mode/checkpoint-session.sh +11 -0
  18. package/.pantheon/code-mode/checkpoint_session.py +481 -0
  19. package/.pantheon/code-mode/compress-inline.py +450 -0
  20. package/.pantheon/code-mode/eval-llm-judge.py +255 -0
  21. package/.pantheon/code-mode/eval-monte-carlo.py +368 -0
  22. package/.pantheon/code-mode/eval-run.py +197 -0
  23. package/.pantheon/code-mode/eval-static.py +321 -0
  24. package/.pantheon/code-mode/example-sync.sh +5 -0
  25. package/.pantheon/code-mode/session-end-save.py +186 -0
  26. package/.pantheon/code-mode/session-end-save.sh +18 -0
  27. package/.pantheon/code-mode/test-allowed.sh +5 -0
  28. package/.pantheon/code-mode/test-auto-continue-checkpoint.sh +179 -0
  29. package/.pantheon/code-mode/test-env.sh +7 -0
  30. package/.pantheon/code-mode/test-prlimit.sh +9 -0
  31. package/.pantheon/code-mode/test-timeout.sh +6 -0
  32. package/README.md +158 -1189
  33. package/README.pt-BR.md +222 -0
  34. package/bin/pantheon-init.mjs +30 -11
  35. package/opencode.json +1 -0
  36. package/package.json +14 -3
  37. package/plugin.json +15 -0
  38. package/scripts/_pantheon_paths.py +48 -7
  39. package/scripts/ci-validate-yaml.py +7 -2
  40. package/scripts/code_mode_server.py +33 -2
  41. package/scripts/doctor.mjs +135 -127
  42. package/scripts/generate-preset-docs.mjs +127 -66
  43. package/scripts/generate-prompts.sh +2 -2
  44. package/scripts/install/cli-ui.mjs +8 -1
  45. package/scripts/install/config-migration.mjs +401 -0
  46. package/scripts/install/health-check.mjs +3 -3
  47. package/scripts/install/model-picker.mjs +72 -23
  48. package/scripts/install/opencode-version.mjs +47 -0
  49. package/scripts/install/opencode.mjs +261 -88
  50. package/scripts/install/plugin.mjs +112 -42
  51. package/scripts/install/shared.mjs +13 -158
  52. package/scripts/install-mcp.mjs +44 -232
  53. package/scripts/mcp_persistence_server.py +344 -15
  54. package/scripts/mcp_resources_server.py +144 -40
  55. package/scripts/memory_mcp_server.py +2 -2
  56. package/scripts/recover-zenodo-deposition.mjs +146 -0
  57. package/scripts/sync-tui.mjs +32 -7
  58. package/scripts/test-opencode-v1-v2-sandbox.sh +591 -0
  59. package/scripts/uninstall.mjs +298 -954
  60. package/scripts/validate-zenodo-release.mjs +154 -0
  61. package/scripts/zenodo-artifact.mjs +21 -0
  62. package/scripts/zenodo-release-state.mjs +53 -0
  63. package/src/mcp/_pantheon_paths.py +48 -7
  64. package/src/mcp/code_mode_server.py +33 -2
  65. package/src/mcp/eval_store.py +1 -1
  66. package/src/mcp/mcp_persistence_server.py +344 -15
  67. package/src/mcp/mcp_resources_server.py +144 -40
  68. package/src/mcp/pantheon_vision_server.py +1 -1
  69. package/src/mcp/toon_codec.py +491 -0
  70. package/src/pantheon/background-job-board.ts +67 -1
  71. package/src/pantheon/cost-command.ts +6 -2
  72. package/src/pantheon/delegate-manager.ts +384 -0
  73. package/src/pantheon/delegate-task-adapter.ts +444 -0
  74. package/src/pantheon/delegation-notify.ts +35 -20
  75. package/src/pantheon/model-command.ts +86 -32
  76. package/src/pantheon/token-opt.ts +555 -0
  77. package/src/pantheon/toon-codec.ts +481 -0
  78. package/src/pantheon/tui-version-check.ts +1 -3
  79. package/src/pantheon/v2-bridge.ts +129 -0
  80. package/src/pantheon/v2-events.ts +131 -0
  81. package/src/pantheon/v2-hooks.ts +287 -0
  82. package/src/pantheon/v2-tool-definitions.ts +331 -0
  83. package/src/plugin-v2/index.ts +21 -0
  84. package/src/plugin-v2.ts +836 -0
  85. package/src/plugin.ts +57 -10
  86. package/src/plugins/tui/dist/server.d.ts +1 -1
  87. package/src/plugins/tui/dist/server.d.ts.map +1 -1
  88. package/src/plugins/tui/dist/server.js +1 -1
  89. package/src/plugins/tui/dist/server.js.map +1 -1
  90. package/src/plugins/tui/dist/tui.d.ts +10 -7
  91. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  92. package/src/plugins/tui/dist/tui.js +11 -8
  93. package/src/plugins/tui/dist/tui.js.map +1 -1
  94. package/src/plugins/tui/dist/tui.tsx +22 -16
  95. package/src/plugins/tui/package-lock.json +51 -51
  96. package/src/plugins/tui/package.json +7 -7
  97. package/src/plugins/tui/src/index.tsx +22 -16
  98. package/src/skills/README.md +0 -2
@@ -892,18 +892,18 @@ async function setupUsageBar(api: TuiPluginApi) {
892
892
  * (`client.session.children` + `session.parentID === current`).
893
893
  * Live status comes from `api.state.session.status(childID)`
894
894
  * (busy/retry → running; idle → terminal). This does NOT depend on
895
- * tool-part events, which runtime 1.18.13 may not deliver for
896
- * pantheon_delegate (the "(0) even while delegating" symptom).
895
+ * tool-part events, which runtime 1.18.13 may not deliver for
896
+ * pantheon_delegate (the "(0) even while delegating" symptom).
897
897
  *
898
898
  * 1b. NATIVE task() CHILDREN — `session.children` returns ALL children,
899
899
  * and the native `task()` tool ALSO spawns a child session with
900
900
  * parentID = caller. A child WITHOUT a board report is a native
901
901
  * task() child: childrenToDelegationEntries tags it source
902
- * 'children-only' with the `[task]` row tag (distinct info color),
902
+ * 'children-only' with the `[native]` row tag (distinct info color),
903
903
  * so native task() work is visible in the panel alongside board
904
- * delegates ([apo-1]) — never filtered out, never duplicated with a
905
- * board row for the same child (a child WITH a report keeps the md
906
- * entry, source 'md').
904
+ * delegates ([pantheon:apo-1]) — never filtered out, never duplicated
905
+ * with a board row for the same child (a child WITH a report keeps the
906
+ * md entry, source 'md').
907
907
  *
908
908
  * 2. ENRICHMENT + HISTORY — markdown reports the job board persists under
909
909
  * `.pantheon/delegations/<sessionID>/<alias>.md` (written by
@@ -975,7 +975,7 @@ export type DelegationEntry = {
975
975
  read?: boolean
976
976
  /** Internal provenance used to keep a finalized md report authoritative.
977
977
  * 'children-only' = a native task() child session with NO board report
978
- * (rendered with the distinct `[task]` tag); 'md' = board report wins. */
978
+ * (rendered with the distinct `[native]` tag); 'md' = board report wins. */
979
979
  source?: 'child' | 'live' | 'md' | 'children-only'
980
980
  }
981
981
 
@@ -1885,12 +1885,14 @@ export function childStatusToState(status: string | undefined): 'running' | 'com
1885
1885
  return 'running' // busy, retry, or unknown
1886
1886
  }
1887
1887
 
1888
- /** Row tag for a delegation entry: `[task]` for native task() children
1889
- * (source 'children-only' — no board report), `[<alias>]` for board rows
1890
- * ([apo-1]). The panel renders the tag with a distinct style so native
1891
- * task() children are visually separable from pantheon_delegate jobs. */
1888
+ /** Row tag for a delegation entry: `[native]` for native task() children
1889
+ * (source 'children-only' — no board report), `[pantheon:<alias>]` for board
1890
+ * rows ([pantheon:apo-1]) — the same tags the manager prints in
1891
+ * pantheon_delegation_list, so panel rows and CLI list lines match. The
1892
+ * panel renders the tag with a distinct style so native task() children are
1893
+ * visually separable from pantheon_delegate jobs. */
1892
1894
  export function delegationTag(entry: DelegationEntry): string {
1893
- return entry.source === 'children-only' ? '[task]' : `[${entry.alias}]`
1895
+ return entry.source === 'children-only' ? '[native]' : `[pantheon:${entry.alias}]`
1894
1896
  }
1895
1897
 
1896
1898
  /** Turn child sessions (PRIMARY) enriched with md reports into the display
@@ -1902,7 +1904,7 @@ export function delegationTag(entry: DelegationEntry): string {
1902
1904
  * time.created. A report-less child is a NATIVE task() child (every
1903
1905
  * child of the current session — pantheon_delegate OR the native `task()`
1904
1906
  * tool — carries parentID = caller), so it gets source 'children-only'
1905
- * and the `[task]` tag instead of a board alias.
1907
+ * and the `[native]` tag instead of a board alias.
1906
1908
  * Terminal md state wins over the derived state; a running md defers to
1907
1909
  * the child's live status. Sorted running-first (compareDelegationEntries).
1908
1910
  * Pure — no I/O. */
@@ -2092,8 +2094,8 @@ function DelegationRow(props: {
2092
2094
  }
2093
2095
  })
2094
2096
 
2095
- // The row tag: `[task]` for native task() children (no board report),
2096
- // `[apo-1]`-style alias for pantheon_delegate board rows. Rendered with
2097
+ // The row tag: `[native]` for native task() children (no board report),
2098
+ // `[pantheon:apo-1]`-style alias for pantheon_delegate board rows. Rendered with
2097
2099
  // the info color so task() children are visually distinct from delegates.
2098
2100
  const tagColor = createMemo(() => (props.job.source === 'children-only' ? theme().info : color()))
2099
2101
 
@@ -2591,9 +2593,13 @@ const tui: TuiPlugin = (api, _options, _meta) => {
2591
2593
  })
2592
2594
  }
2593
2595
 
2594
- const plugin: TuiPluginModule & { id: string } = {
2596
+ const plugin: TuiPluginModule & { id: string; setup: () => Promise<void> } = {
2595
2597
  id: 'pantheon.tui',
2596
2598
  tui,
2599
+ // Beta loader contract: every `plugins` directory entry must expose a
2600
+ // no-op `setup` so the entry loads as `pantheon.tui` with zero errors
2601
+ // (sandbox probe evidence). The TUI itself boots via `tui()`.
2602
+ setup: async () => {},
2597
2603
  }
2598
2604
 
2599
2605
  export default plugin
@@ -119,9 +119,7 @@ The `SKILL.md` file contains YAML frontmatter with `name`, `description`, and pl
119
119
 
120
120
  - **On-demand loading**: Skills are loaded when an agent's task matches the skill's description. The agent invokes the skill via the `skill` tool, injecting the domain knowledge into context.
121
121
  - **Agent frontmatter**: Agents declare which skills they use via the `skills:` field in their `.agent.md` frontmatter. The platform uses this to determine relevance.
122
- - **VS Code Copilot**: Automatically injects skill content when the agent detects a matching task description. Skills appear in the Available Skills list and can be loaded via `/skill` commands.
123
122
  - **OpenCode platform**: Skills are listed in the system prompt's `<available_skills>` block. The agent invokes `skill` with the matching name to load the full content.
124
- - **Other platforms**: Each platform loads skills differently. Refer to platform-specific documentation for integration details.
125
123
 
126
124
  ## Quick Reference Table
127
125