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

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 (50) hide show
  1. package/AGENTS.global.md +3 -3
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +22 -0
  4. package/README.md +69 -30
  5. package/README.pt-BR.md +5 -4
  6. package/bin/pantheon-init.mjs +279 -101
  7. package/package.json +4 -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/migrate.mjs +45 -38
  17. package/scripts/install/model-picker.mjs +63 -22
  18. package/scripts/install/opencode-version.mjs +9 -1
  19. package/scripts/install/opencode.mjs +265 -79
  20. package/scripts/install/plan-artifact.mjs +517 -0
  21. package/scripts/install/plan.mjs +165 -3
  22. package/scripts/install/plugin.mjs +118 -14
  23. package/scripts/install/shared.mjs +186 -65
  24. package/scripts/install/state.mjs +63 -8
  25. package/scripts/install/venv.mjs +15 -6
  26. package/scripts/install/verify.mjs +128 -0
  27. package/scripts/install/vision-prompt.mjs +2 -0
  28. package/scripts/install-mcp.mjs +1 -1
  29. package/scripts/manifest-inventory.mjs +49 -3
  30. package/scripts/node-engine-policy.mjs +74 -0
  31. package/scripts/package-evidence.mjs +6 -0
  32. package/scripts/postinstall.mjs +3 -4
  33. package/scripts/reconcile.mjs +325 -0
  34. package/scripts/uninstall.mjs +258 -34
  35. package/scripts/update.mjs +164 -0
  36. package/scripts/validate-node-engine-policy.mjs +13 -0
  37. package/scripts/version-check.mjs +34 -1
  38. package/scripts/versioning.mjs +9 -1
  39. package/skills-lock.json +3 -3
  40. package/src/agents/mnemosyne.md +7 -2
  41. package/src/instructions/memory-protocol.instructions.md +2 -2
  42. package/src/instructions/zeus-memory-operations.instructions.md +4 -3
  43. package/src/pantheon/v2-unsupported.mjs +2 -3
  44. package/src/plugins/tui/dist/tui-v2.js +2 -2
  45. package/src/plugins/tui/dist/tui.js +1 -1
  46. package/src/plugins/tui/package-lock.json +3 -3
  47. package/src/plugins/tui/package.json +2 -2
  48. package/src/skills/artifact-management/SKILL.md +5 -1
  49. package/src/skills/memory-bank/SKILL.md +5 -1
  50. 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,28 @@ 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.12] - 2026-10-17
22
+
23
+ ## 🆕 What's New
24
+
25
+ - **Raise the Node.js support floor to 26.4.0** for the package, CLI, installer,
26
+ and Node-based tooling. This release drops Node 22, Node 24, and Node
27
+ 26.0–26.3; the npm `beta` dist-tag remains the intended publication channel.
28
+ - **Clarify runtime boundaries:** this package requirement is not a universal
29
+ OpenCode host-runtime claim. Official OpenCode V2.0.31 has a Bun runtime path
30
+ and a separate Node build pinned to 26.4.0; no Bun minimum is asserted.
31
+ - **Keep `node:sqlite` as a separate capability threshold:** Node >=22.5 may
32
+ provide the optional `pantheon_cost` backend, but does not imply package
33
+ support on that Node version.
34
+ - **Recommend a persistent external Git worktree location** in interactive TTY
35
+ setup summaries and the shipped worktrees skill. This is guidance only;
36
+ Pantheon does not create worktrees or directories automatically.
37
+
38
+ ## 🐞 Fixed
39
+
40
+ - **Synchronize Beta 12 version metadata and Node engine policy** across package
41
+ manifests, locks, citation/release metadata, CLI guards, doctor, and CI.
42
+
21
43
  ## [v1.6.0-beta.11] - 2026-10-15
22
44
 
23
45
  ## 🆕 What's New
package/README.md CHANGED
@@ -31,16 +31,17 @@ 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.
44
45
 
45
46
  From the project where you want to use Pantheon:
46
47
 
@@ -53,22 +54,63 @@ The installer guides you through the available setup. For optional MCP servers,
53
54
  project-local installation, or non-interactive setup, see the
54
55
  [installation guide](docs/INSTALLATION.md).
55
56
 
57
+ In an interactive TTY setup summary, Pantheon recommends the persistent
58
+ external worktree location
59
+ `<project-parent>/.pantheon-worktrees/<exact-repository-directory-basename>/<task>`
60
+ (for example, `/home/user/.pantheon-worktrees/My Project/feature-name`). Use the
61
+ project directory's exact basename, including spaces; do not normalize it into
62
+ a slug. This is guidance for future agent work only; Pantheon does not create
63
+ Git worktrees or directories automatically. See the shipped
64
+ [worktrees skill](src/skills/worktrees/SKILL.md) for the agent workflow.
65
+
56
66
  A non-interactive apply requires `--yes` (alias `-y`): without a TTY and
57
67
  without `--yes`, `init` prints the change plan and applies nothing. Exit codes:
58
68
  `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.
69
+ authorization, `3` drift (a planned target changed before apply), `130` canceled.
70
+
71
+ Preview with `init --dry-run`. To review and apply across separate invocations,
72
+ save a versioned plan and then explicitly authorize it:
73
+
74
+ ```bash
75
+ npx pantheon-opencode init --dry-run --project --no-mcp --components agents \
76
+ --save-plan .pantheon-install-plan.json
77
+ npx pantheon-opencode init --apply-plan .pantheon-install-plan.json --yes
78
+ npx pantheon-opencode init --dry-run --json # machine-readable preview on stdout
79
+ ```
80
+
81
+ Saved plans use mode `0600`, contain operation metadata and fingerprints rather
82
+ than generated file contents, and are bound to their original target and plan
83
+ file path. Applying rechecks the package source and destination snapshots; drift
84
+ aborts before writes. Saved plans do not support `--force`/`--clean`, and
85
+ machine-readable previews reject those options because clean performs bulk removal.
86
+ A dry-run skips probing the OpenCode host to avoid host-side writes; when no version hint
87
+ is configured, it assumes V1 and reports that advisory. Pass
88
+ `--opencode-version v1|v2` to preview a specific generation.
89
+ Saving an artifact is supported on Linux, Darwin, FreeBSD, OpenBSD, and NetBSD
90
+ when the required descriptor paths and filesystem flags are usable. Cross-platform
91
+ behavior has not been fully tested; unsupported platforms fail closed rather
92
+ than risk writing through a replaced parent directory.
93
+ Previews describe managed-file operations, not every bulk or external effect
94
+ (such as Python environment setup). The `postinstall`/`sync-tui` step also only
95
+ refreshes TUI artifacts and is outside this approval flow.
96
+
97
+ Before the first managed-file write, `init` saves an exact backup set under
98
+ `.pantheon/backups/<timestamp>/` (directory `0700`, files `0600`, the 5 most
99
+ recent kept); it is a byte-for-byte copy and therefore also contains any API
100
+ keys or tokens already present in your files — it is never printed. Recover with
101
+ `pantheon-opencode restore [--project] [--yes]`. There is no automatic rollback;
102
+ an interrupted apply is recoverable from the backup in the same way.
103
+ To remove Pantheon-managed files, review with
104
+ `pantheon-opencode uninstall --project --dry-run` (or `--global`) before applying
105
+ with `--force`. The opt-in `--purge-data` removes only a verified install-state
106
+ file and never removes recovery backups; see the installation guide for details.
107
+ New installs also record a versioned per-file ownership inventory. Review stale,
108
+ unchanged installer-owned files with `pantheon-opencode reconcile --project --dry-run`
109
+ (or `--global --dry-run`); preview is read-only, and apply requires `--apply --yes` or a
110
+ saved reviewed plan. Legacy files without inventory, modified files, and
111
+ symlinks are preserved for manual review. An explicit `--target PATH` uses project
112
+ layout; combine it with `--global` to select the flat global layout. See the
113
+ [installation guide](docs/INSTALLATION.md).
72
114
  The bundled Python MCP servers use the pinned MCP SDK 2.2.0 and standalone
73
115
  FastMCP 4.0.10 runtime; see the [MCP guide](docs/MCP.md).
74
116
  The installer also turns each agent's `mcp_tools` allowlist into native
@@ -254,7 +296,7 @@ available.
254
296
 
255
297
  | Variable | Default | Purpose |
256
298
  |----------|---------|---------|
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 |
299
+ | `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
300
 
259
301
  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
302
 
@@ -543,13 +585,10 @@ Key order does not matter.
543
585
  One command keeps an existing installation current:
544
586
 
545
587
  ```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
588
+ # Install globally first; update refuses local, workspace, and npx copies.
589
+ npm install -g pantheon-opencode@beta
590
+ pantheon-opencode update # npm beta channel + config refresh
591
+ pantheon-opencode update --stable # stable channel instead
553
592
  ```
554
593
 
555
594
  `update` compares your installed version with the npm dist-tag, runs
@@ -851,7 +890,7 @@ or whole-file binary classification. The host-backed evidence is in
851
890
 
852
891
  `npm run coverage:plugin-v2` runs the `tests/pantheon/*.test.ts` suite with
853
892
  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
893
+ for `src/plugin-v2.ts` only. It requires Node `>=26.4.0`; branch and function
855
894
  coverage are reported but are not gates. This is not a repository-wide coverage
856
895
  claim.
857
896
 
package/README.pt-BR.md CHANGED
@@ -31,7 +31,9 @@ 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
+ 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
37
 
36
38
  No projeto em que você quer usar o Pantheon:
37
39
 
@@ -75,8 +77,7 @@ verificações repetíveis e passagens claras entre etapas do trabalho.
75
77
 
76
78
  ## Status
77
79
 
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
80
+ Versão operacional neste checkout: **v1.6.0-beta.12** (esta página não afirma publicação). O Pantheon foi feito para OpenCode e depende da
80
81
  disponibilidade e da configuração do OpenCode e dos serviços opcionais que você
81
82
  escolher. Veja as [releases](https://github.com/ils15/pantheon-opencode/releases)
82
83
  e o [changelog](CHANGELOG.md) para acompanhar as mudanças publicadas.
@@ -536,7 +537,7 @@ anteriores foram preservadas separadamente em
536
537
 
537
538
  `npm run coverage:plugin-v2` executa a suíte `tests/pantheon/*.test.ts` com a
538
539
  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`;
540
+ cobertura de linhas somente para `src/plugin-v2.ts`. Requer Node `>=26.4.0`;
540
541
  coberturas de branches e funções são informativas, não gates. Isso não é uma
541
542
  alegação de cobertura do repositório inteiro.
542
543