pantheon-opencode 1.6.0-beta.11 → 1.6.0-beta.13

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 (53) hide show
  1. package/AGENTS.global.md +3 -3
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +39 -0
  4. package/README.md +85 -31
  5. package/README.pt-BR.md +7 -4
  6. package/bin/pantheon-init.mjs +278 -102
  7. package/package.json +5 -3
  8. package/plugin.json +1 -1
  9. package/pyproject.toml +1 -1
  10. package/scripts/build-agents-md.mjs +77 -13
  11. package/scripts/check-plugin-v2-coverage.mjs +7 -7
  12. package/scripts/doctor.mjs +242 -19
  13. package/scripts/install/backup.mjs +191 -18
  14. package/scripts/install/cli-ui.mjs +73 -0
  15. package/scripts/install/file-inventory.mjs +555 -0
  16. package/scripts/install/interactive.mjs +69 -391
  17. package/scripts/install/migrate.mjs +45 -38
  18. package/scripts/install/model-picker.mjs +63 -22
  19. package/scripts/install/opencode-version.mjs +9 -1
  20. package/scripts/install/opencode.mjs +279 -79
  21. package/scripts/install/plan-artifact.mjs +517 -0
  22. package/scripts/install/plan.mjs +165 -3
  23. package/scripts/install/plugin.mjs +118 -14
  24. package/scripts/install/prompt-result.mjs +2 -0
  25. package/scripts/install/shared.mjs +188 -65
  26. package/scripts/install/state.mjs +63 -8
  27. package/scripts/install/venv.mjs +15 -6
  28. package/scripts/install/verify.mjs +128 -0
  29. package/scripts/install/vision-prompt.mjs +2 -0
  30. package/scripts/install-mcp.mjs +1 -1
  31. package/scripts/manifest-inventory.mjs +49 -3
  32. package/scripts/node-engine-policy.mjs +85 -0
  33. package/scripts/package-evidence.mjs +6 -0
  34. package/scripts/postinstall.mjs +26 -26
  35. package/scripts/reconcile.mjs +325 -0
  36. package/scripts/sync-tui.mjs +5 -1
  37. package/scripts/uninstall.mjs +258 -34
  38. package/scripts/update.mjs +164 -0
  39. package/scripts/validate-node-engine-policy.mjs +13 -0
  40. package/scripts/version-check.mjs +34 -1
  41. package/scripts/versioning.mjs +9 -1
  42. package/skills-lock.json +3 -3
  43. package/src/agents/mnemosyne.md +7 -2
  44. package/src/instructions/memory-protocol.instructions.md +2 -2
  45. package/src/instructions/zeus-memory-operations.instructions.md +4 -3
  46. package/src/pantheon/v2-unsupported.mjs +2 -3
  47. package/src/plugins/tui/dist/tui-v2.js +2 -2
  48. package/src/plugins/tui/dist/tui.js +1 -1
  49. package/src/plugins/tui/package-lock.json +3 -3
  50. package/src/plugins/tui/package.json +2 -2
  51. package/src/skills/artifact-management/SKILL.md +5 -1
  52. package/src/skills/memory-bank/SKILL.md +5 -1
  53. package/src/skills/worktrees/SKILL.md +30 -11
package/AGENTS.global.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
2
2
  <!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
3
3
  <!-- Source of truth: src/instructions/*.instructions.md + the static sections in this script. -->
4
- <!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-15T14:32:32-03:00 sha=66bf918 -->
4
+ <!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-16T15:32:02-03:00 sha=2cda37c -->
5
5
 
6
6
  # Pantheon Agent System — OpenCode
7
7
 
@@ -140,8 +140,8 @@ These rules apply to all agents; each agent file may add domain-specific rules.
140
140
  - Use a targeted query (`top_k=2`); do not search the whole prompt by default. Missing or irrelevant results never block current work.
141
141
 
142
142
  ### Persistence
143
- - A memory write is optional and conditional on a write tool being exposed and permitted in the active session. Search permission does not imply write permission; in the reported Beta 10 Zeus root, `memory_store` is not exposed/granted.
144
- - Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state. Confirm a successful write before claiming persistence.
143
+ - Tool grants vary by agent/runtime. Zeus's installed allowlist has `memory_search` and temporary `context_save`/`context_get` checkpoints, but no durable writes; Mnemosyne's includes `memory_store` and other durable-memory tools. Use only tools exposed and permitted in the active session.
144
+ - Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state. Confirm a successful write before claiming persistence. Never store secrets, credentials, or tokens. `memory_store` stores submitted values and metadata without guaranteed redaction; omit sensitive content or redact it before storage.
145
145
  - If no write tool is available or the write did not succeed, say that the information was not persisted. Do not imply automatic memory storage or recovery. Add ADRs to the memory bank only when explicitly requested.
146
146
 
147
147
  ### Relevance and permanent records
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
2
2
  <!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
3
3
  <!-- Source of truth: the static project sections in scripts/build-agents-md.mjs. -->
4
- <!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-15T14:32:32-03:00 sha=66bf918 -->
4
+ <!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-16T15:32:02-03:00 sha=2cda37c -->
5
5
 
6
6
  # Pantheon — Repository Setup
7
7
 
package/CHANGELOG.md CHANGED
@@ -18,6 +18,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
18
18
 
19
19
  ## ✅ Closed Issues
20
20
 
21
+ ## [v1.6.0-beta.13] - 2026-10-17
22
+
23
+ ## 🆕 What's New
24
+
25
+ - **Modernize interactive TTY setup** with `@clack/prompts` while keeping the
26
+ existing component, install-location, authorization, and worktree guidance
27
+ choices. Canceling the setup wizard leaves configuration unchanged; headless,
28
+ `--yes`, dry-run, and non-TTY behavior remain available.
29
+
30
+ ## 🐞 Fixed
31
+
32
+ - **Let npm finish on an unsupported Node runtime:** postinstall now warns and
33
+ skips Node-dependent TUI/config sync, leaving the CLI to show its explicit
34
+ Node >=26.4.0 hard gate and user-managed upgrade instructions.
35
+ - **Synchronize Beta 13 package and release metadata** across manifests and
36
+ lockfiles without changing the Node >=26.4.0 engine floor.
37
+
38
+ ## [v1.6.0-beta.12] - 2026-10-17
39
+
40
+ ## 🆕 What's New
41
+
42
+ - **Raise the Node.js support floor to 26.4.0** for the package, CLI, installer,
43
+ and Node-based tooling. This release drops Node 22, Node 24, and Node
44
+ 26.0–26.3; the npm `beta` dist-tag remains the intended publication channel.
45
+ - **Clarify runtime boundaries:** this package requirement is not a universal
46
+ OpenCode host-runtime claim. Official OpenCode V2.0.31 has a Bun runtime path
47
+ and a separate Node build pinned to 26.4.0; no Bun minimum is asserted.
48
+ - **Keep `node:sqlite` as a separate capability threshold:** Node >=22.5 may
49
+ provide the optional `pantheon_cost` backend, but does not imply package
50
+ support on that Node version.
51
+ - **Recommend a persistent external Git worktree location** in interactive TTY
52
+ setup summaries and the shipped worktrees skill. This is guidance only;
53
+ Pantheon does not create worktrees or directories automatically.
54
+
55
+ ## 🐞 Fixed
56
+
57
+ - **Synchronize Beta 12 version metadata and Node engine policy** across package
58
+ manifests, locks, citation/release metadata, CLI guards, doctor, and CI.
59
+
21
60
  ## [v1.6.0-beta.11] - 2026-10-15
22
61
 
23
62
  ## 🆕 What's New
package/README.md CHANGED
@@ -31,16 +31,29 @@ way to plan work, make progress, check results, and keep useful project context.
31
31
  ## Start in 2 minutes
32
32
 
33
33
  Requirements: [OpenCode 1.18.4+](https://opencode.ai/docs/) and Node.js
34
- 22.22.2+ (or 24.15.0+ / 26+). For which OpenCode generation each Pantheon
35
- release line supports, see
34
+ 26.4.0+ for the Pantheon CLI, installer, and Node-based tooling. For which
35
+ OpenCode generation each Pantheon release line supports, see
36
36
  [Compatibility and support policy](#compatibility-and-support-policy).
37
37
 
38
- Pantheon declares `engines.node` as `^22.22.2 || ^24.15.0 || >=26.0.0`. The
39
- floor reflects what the dependency tree actually needs — the transitive
40
- `ini@7` rejects earlier 22.x/24.x builds with `EBADENGINE` — and odd-numbered
41
- Node releases (23, 25) are out of range. The `pantheon_cost` tool also needs
42
- `node:sqlite`, which requires Node >= 22.5; `doctor` warns when the running
43
- runtime cannot load it.
38
+ Pantheon declares `engines.node` as `>=26.4.0`; Node 22, Node 24, and Node
39
+ 26.0–26.3 are not supported by this release. This package floor does not imply
40
+ that every OpenCode host runs on Node: official OpenCode V2.0.31 has a Bun
41
+ runtime path and a separate Node build pinned to Node 26.4.0. No Bun minimum is
42
+ asserted here. The optional `pantheon_cost` SQLite backend has its own capability
43
+ threshold, `node:sqlite` on Node >= 22.5; that feature threshold does not lower
44
+ Pantheon's package or CLI support floor.
45
+
46
+ With npm's default configuration, an unsupported Node version may produce an
47
+ `EBADENGINE` warning during install. Pantheon's postinstall then skips Node-based
48
+ sync without changing OpenCode configuration, and the CLI itself exits with a
49
+ clear error before setup. If needed, switch using a user-managed version
50
+ manager—no system-wide install is required:
51
+
52
+ ```bash
53
+ nvm install 26.4.0 && nvm use 26.4.0
54
+ # or: fnm install 26.4.0 && fnm use 26.4.0
55
+ # or: volta install node@26.4.0
56
+ ```
44
57
 
45
58
  From the project where you want to use Pantheon:
46
59
 
@@ -49,26 +62,70 @@ npx pantheon-opencode init
49
62
  opencode
50
63
  ```
51
64
 
52
- The installer guides you through the available setup. For optional MCP servers,
65
+ In a TTY, the interactive setup uses Clack prompts to choose components and a
66
+ global or project location before reviewing the apply. Canceling writes nothing.
67
+ `--yes`, `--headless`, `--dry-run`, and non-TTY workflows retain their existing
68
+ behavior. The installer guides you through the available setup. For optional MCP servers,
53
69
  project-local installation, or non-interactive setup, see the
54
70
  [installation guide](docs/INSTALLATION.md).
55
71
 
72
+ In an interactive TTY setup summary, Pantheon recommends the persistent
73
+ external worktree location
74
+ `<project-parent>/.pantheon-worktrees/<exact-repository-directory-basename>/<task>`
75
+ (for example, `/home/user/.pantheon-worktrees/My Project/feature-name`). Use the
76
+ project directory's exact basename, including spaces; do not normalize it into
77
+ a slug. This is guidance for future agent work only; Pantheon does not create
78
+ Git worktrees or directories automatically. See the shipped
79
+ [worktrees skill](src/skills/worktrees/SKILL.md) for the agent workflow.
80
+
56
81
  A non-interactive apply requires `--yes` (alias `-y`): without a TTY and
57
82
  without `--yes`, `init` prints the change plan and applies nothing. Exit codes:
58
83
  `0` success or plan/no-apply, `1` failure, `2` apply requested without
59
- authorization, `3` drift (a planned target changed between plan and apply),
60
- `130` canceled. Drift is checked within a single run (plan → apply); it cannot
61
- be detected across two separate CLI invocations (no plan is persisted).
62
-
63
- Preview without writing anything with `init --dry-run`. Before the first write,
64
- `init` saves an exact backup set under `.pantheon/backups/<timestamp>/`
65
- (directory `0700`, files `0600`, the 5 most recent kept); it is a byte-for-byte
66
- copy and therefore also contains any API keys or tokens already present in your
67
- files — it is never printed. Recover with
68
- `pantheon-opencode restore [--project] [--yes]` (there is no automatic
69
- rollback; an interrupted apply is recoverable the same way). The
70
- `postinstall`/`sync-tui` step only refreshes TUI artifacts and is deliberately
71
- outside this approval flow — no prompt is possible there.
84
+ authorization, `3` drift (a planned target changed before apply), `130` canceled.
85
+
86
+ Preview with `init --dry-run`. To review and apply across separate invocations,
87
+ save a versioned plan and then explicitly authorize it:
88
+
89
+ ```bash
90
+ npx pantheon-opencode init --dry-run --project --no-mcp --components agents \
91
+ --save-plan .pantheon-install-plan.json
92
+ npx pantheon-opencode init --apply-plan .pantheon-install-plan.json --yes
93
+ npx pantheon-opencode init --dry-run --json # machine-readable preview on stdout
94
+ ```
95
+
96
+ Saved plans use mode `0600`, contain operation metadata and fingerprints rather
97
+ than generated file contents, and are bound to their original target and plan
98
+ file path. Applying rechecks the package source and destination snapshots; drift
99
+ aborts before writes. Saved plans do not support `--force`/`--clean`, and
100
+ machine-readable previews reject those options because clean performs bulk removal.
101
+ A dry-run skips probing the OpenCode host to avoid host-side writes; when no version hint
102
+ is configured, it assumes V1 and reports that advisory. Pass
103
+ `--opencode-version v1|v2` to preview a specific generation.
104
+ Saving an artifact is supported on Linux, Darwin, FreeBSD, OpenBSD, and NetBSD
105
+ when the required descriptor paths and filesystem flags are usable. Cross-platform
106
+ behavior has not been fully tested; unsupported platforms fail closed rather
107
+ than risk writing through a replaced parent directory.
108
+ Previews describe managed-file operations, not every bulk or external effect
109
+ (such as Python environment setup). The `postinstall`/`sync-tui` step also only
110
+ refreshes TUI artifacts and is outside this approval flow.
111
+
112
+ Before the first managed-file write, `init` saves an exact backup set under
113
+ `.pantheon/backups/<timestamp>/` (directory `0700`, files `0600`, the 5 most
114
+ recent kept); it is a byte-for-byte copy and therefore also contains any API
115
+ keys or tokens already present in your files — it is never printed. Recover with
116
+ `pantheon-opencode restore [--project] [--yes]`. There is no automatic rollback;
117
+ an interrupted apply is recoverable from the backup in the same way.
118
+ To remove Pantheon-managed files, review with
119
+ `pantheon-opencode uninstall --project --dry-run` (or `--global`) before applying
120
+ with `--force`. The opt-in `--purge-data` removes only a verified install-state
121
+ file and never removes recovery backups; see the installation guide for details.
122
+ New installs also record a versioned per-file ownership inventory. Review stale,
123
+ unchanged installer-owned files with `pantheon-opencode reconcile --project --dry-run`
124
+ (or `--global --dry-run`); preview is read-only, and apply requires `--apply --yes` or a
125
+ saved reviewed plan. Legacy files without inventory, modified files, and
126
+ symlinks are preserved for manual review. An explicit `--target PATH` uses project
127
+ layout; combine it with `--global` to select the flat global layout. See the
128
+ [installation guide](docs/INSTALLATION.md).
72
129
  The bundled Python MCP servers use the pinned MCP SDK 2.2.0 and standalone
73
130
  FastMCP 4.0.10 runtime; see the [MCP guide](docs/MCP.md).
74
131
  The installer also turns each agent's `mcp_tools` allowlist into native
@@ -254,7 +311,7 @@ available.
254
311
 
255
312
  | Variable | Default | Purpose |
256
313
  |----------|---------|---------|
257
- | `PANTHEON_NODE` | `node` from `PATH` | Path to a Node.js >= 22.5 binary used by the CLI fallback; an explicit path must exist and be executable, otherwise the tool fails fast instead of ignoring the override |
314
+ | `PANTHEON_NODE` | `node` from `PATH` | Path to a Node.js >= 22.5 binary used only for the `node:sqlite` capability in the CLI fallback; this is not the Pantheon package support floor. An explicit path must exist and be executable, otherwise the tool fails fast instead of ignoring the override |
258
315
 
259
316
  Tool interpretation matters: `pantheon_model status` reports configuration, not the model serving a completion. V2 manual model overrides are project-only; global override files are neither read nor applied, and global mutation is unsupported until a future surface can obtain separate explicit human authorization. V2 ignores static presets and applies only explicit per-agent project model/variant overrides, leaving the host default unchanged otherwise; V1 preset behavior remains legacy pending compatibility decisions. `pantheon_cost` is a rolling token aggregate, not a session-level or monetary cost report. See the [OpenCode plugin tool notes](docs/mcp-tools.md#opencode-plugin-tools) for details and measurement limits.
260
317
 
@@ -543,13 +600,10 @@ Key order does not matter.
543
600
  One command keeps an existing installation current:
544
601
 
545
602
  ```bash
546
- # Without a global install, ALWAYS pin the dist-tag — plain `npx
547
- # pantheon-opencode` resolves `latest`, which is the stable release (1.4.3):
548
- npx pantheon-opencode@beta update # npm beta channel + config refresh
549
- npx pantheon-opencode@beta update --stable # stable channel instead
550
-
551
- # With a global install, use the global bin (defaults to the beta channel):
552
- pantheon-opencode update
603
+ # Install globally first; update refuses local, workspace, and npx copies.
604
+ npm install -g pantheon-opencode@beta
605
+ pantheon-opencode update # npm beta channel + config refresh
606
+ pantheon-opencode update --stable # stable channel instead
553
607
  ```
554
608
 
555
609
  `update` compares your installed version with the npm dist-tag, runs
@@ -851,7 +905,7 @@ or whole-file binary classification. The host-backed evidence is in
851
905
 
852
906
  `npm run coverage:plugin-v2` runs the `tests/pantheon/*.test.ts` suite with
853
907
  Node's source-mapped native coverage and enforces an 80% line-coverage minimum
854
- for `src/plugin-v2.ts` only. It requires Node `v24.15.0`; branch and function
908
+ for `src/plugin-v2.ts` only. It requires Node `>=26.4.0`; branch and function
855
909
  coverage are reported but are not gates. This is not a repository-wide coverage
856
910
  claim.
857
911
 
package/README.pt-BR.md CHANGED
@@ -31,7 +31,11 @@ de planejar o trabalho, avançar, conferir resultados e preservar o contexto
31
31
 
32
32
  ## Comece em 2 minutos
33
33
 
34
- Requisitos: [OpenCode 1.18.4+](https://opencode.ai/docs/) e Node.js `^22.22.2 || ^24.15.0 || >=26.0.0`.
34
+ Requisitos: [OpenCode 1.18.4+](https://opencode.ai/docs/) e Node.js `>=26.4.0` para a CLI, o instalador e as ferramentas Node do Pantheon. Node 22, Node 24 e Node 26.0–26.3 não são compatíveis com esta versão.
35
+
36
+ Com a configuração padrão do npm, versões incompatíveis podem gerar um aviso `EBADENGINE`; o postinstall pula a sincronização Node/config, e a CLI bloqueia a configuração antes de gravar arquivos. Para atualizar sem instalação de sistema, use um gerenciador de Node do usuário: `nvm install 26.4.0 && nvm use 26.4.0`, `fnm install 26.4.0 && fnm use 26.4.0` ou `volta install node@26.4.0`.
37
+
38
+ Esse requisito do pacote não significa que todo host OpenCode execute Node: o OpenCode V2.0.31 oficial oferece um caminho de runtime Bun e um build Node separado fixado em Node 26.4.0. Não há aqui um requisito mínimo para Bun. O backend SQLite opcional de `pantheon_cost` tem um limite de capacidade distinto (`node:sqlite` requer Node >=22.5), que não reduz o requisito de suporte do pacote.
35
39
 
36
40
  No projeto em que você quer usar o Pantheon:
37
41
 
@@ -75,8 +79,7 @@ verificações repetíveis e passagens claras entre etapas do trabalho.
75
79
 
76
80
  ## Status
77
81
 
78
- Versão operacional neste checkout: **v1.6.0-beta.1** (primeira beta compatível
79
- com OpenCode 2; esta página não afirma publicação). O Pantheon foi feito para OpenCode e depende da
82
+ Versão operacional neste checkout: **v1.6.0-beta.13** (esta página não afirma publicação). O Pantheon foi feito para OpenCode e depende da
80
83
  disponibilidade e da configuração do OpenCode e dos serviços opcionais que você
81
84
  escolher. Veja as [releases](https://github.com/ils15/pantheon-opencode/releases)
82
85
  e o [changelog](CHANGELOG.md) para acompanhar as mudanças publicadas.
@@ -536,7 +539,7 @@ anteriores foram preservadas separadamente em
536
539
 
537
540
  `npm run coverage:plugin-v2` executa a suíte `tests/pantheon/*.test.ts` com a
538
541
  cobertura nativa do Node habilitada para source maps e exige pelo menos 80% de
539
- cobertura de linhas somente para `src/plugin-v2.ts`. Requer Node `v24.15.0`;
542
+ cobertura de linhas somente para `src/plugin-v2.ts`. Requer Node `>=26.4.0`;
540
543
  coberturas de branches e funções são informativas, não gates. Isso não é uma
541
544
  alegação de cobertura do repositório inteiro.
542
545