triss-coworker 0.34.0 → 0.36.0

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,175 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.36.0] — 2026-08-18
11
+
12
+ ### Added
13
+
14
+ - **OpenCode 2 coder engine (beta)**: `triss coder run --engine opencode2`
15
+ and `triss coder init --engine opencode2`, pinned to the exact verified
16
+ build `@opencode-ai/cli@0.0.0-next-17430` (`TRISS_CODER_OPENCODE2_VERSION`
17
+ to override). The beta runs every managed invocation `--standalone` with
18
+ auto-update disabled, isolates V2 state under `<project>/.triss/opencode2/`
19
+ (0700), folds the V2 event stream into the shared usage envelope
20
+ (`usage_source: "opencode2"`, terminal-error precedence, no fabricated
21
+ zeros), namespaces sessions per engine, and rides the shared opencode-v1
22
+ configuration backend for `coder model set` / rollback. See
23
+ docs/opencode2.md and docs/opencode2-engine-plan.md.
24
+
25
+ ### Security (opencode2 engine beta)
26
+
27
+ - Fail-closed effective-configuration preflight for `coder run --engine
28
+ opencode2`: the managed provider projection (exact package, settings keys,
29
+ credential placeholder, and the worker `baseURL` compared against the
30
+ configured Triss worker endpoint), `provider.api` and model-level
31
+ transport overrides are rejected before any credential is forwarded, and
32
+ the permission gate requires deny-everything shell policy (no live
33
+ allow/ask rule — the credential sits in the child environment), proven
34
+ with a real last-match-wins evaluator.
35
+ - `opencode2` runs resolve the engine binary to an absolute path
36
+ (`which` + `realpath`) and spawn exactly that path, re-verifying the same
37
+ path and version after the run.
38
+ - Session store reads fail closed on malformed namespaces (no silent data
39
+ loss on rewrite); the lookup happens inside the isolation cleanup guard so
40
+ a malformed store never leaks a worktree/branch.
41
+ - XDG runtime roots reject symlinked path components anywhere in the chain
42
+ below the project root.
43
+ - `opencode init --engine opencode2` owns its flow: credential prompt and
44
+ `--local`/`--global` scope are honored, an exact-pin mismatch is terminal
45
+ before any config mutation, and the post-setup audit is the full provider
46
+ + permission preflight (not just the plugin/agent scan).
47
+ - The full run preflight parses config layers through the JSONC-aware
48
+ canonical parser (comments and trailing commas no longer abort the run),
49
+ and `parseOpenCodeDocument` drops trailing commas followed by comments.
50
+
51
+ ### Fixed (review rounds 4–6)
52
+
53
+ - Dual legacy/native config forms (`provider`+`providers`,
54
+ `plugin`+`plugins`, `permission`+`permissions`) reject — the pinned build
55
+ prefers the native value while a legacy-first projection audits the other
56
+ one; the worker key/endpoint provenance gate resolves each field's
57
+ EFFECTIVE source from the pre-dotenv snapshot (a decoy key in the project
58
+ `.triss.env` cannot mask a shell key); unrelated provider definitions
59
+ (in-process npm code) reject; the audit walks the canonical
60
+ (`realpathSync.native`) runtime directory; audited sources are re-audited
61
+ immediately before the credential-bearing spawn (TOCTOU); the top-level
62
+ key table is captured from the official schema (benign keys no longer
63
+ false-reject; object `lsp`/`formatter` and `experimental` reject).
64
+ - A held session-store lock no longer discards a finished run:
65
+ `persistSessionMapping` retries with backoff and degrades to the lock-free
66
+ protocol (mapping kept, warning emitted, foreign lock untouched).
67
+ - A corrupted `sessions.json` on the V1 `--isolate` path no longer strands
68
+ the `.triss/wt/<slug>` worktree and `coder/<slug>` branch.
69
+ - `TRISS_CODER_ENGINE=opencode2` from a `.env` file now routes `coder init`
70
+ to the V2 flow (the engine is resolved after the env files load); the
71
+ pre-dotenv snapshots are threaded through so the provenance and
72
+ pin-shadow checks stay exact.
73
+ - `coder init --engine opencode2` on a tree carrying the V1 bash allowlist
74
+ rejects BEFORE any credential/config write with actionable guidance; a
75
+ fresh V2 init warns that the shared deny-everything policy removes the
76
+ allowlisted commands from plain V1 runs (documented in
77
+ docs/opencode2.md, including two new troubleshooting rows).
78
+ - Model inspection tolerates unrelated hostile config shapes (a non-string
79
+ plugin reference, unreadable directories) — the post-commit audit of a
80
+ successful `coder model set` no longer rolls back over them; `coder
81
+ models` warnings use the OpenCode branch for `opencode2` (no false
82
+ `configured-model-unavailable` for a shell-exported foreign model);
83
+ rollback of an `opencode2` record reports engine `opencode2`.
84
+ - `opencode-go/` routes price as unknown (the Go reseller's tariffs are
85
+ unmodeled); the prefixed `TRISS_PRICE_OPENCODE_GO_<MODEL>` override is
86
+ the documented way to price them.
87
+ - Unknown `engines.*` namespaces in the session store fail closed;
88
+ `ensureOpenCode2RuntimeDirs` reports the directories it created;
89
+ `.env.example` documents `TRISS_CODER_OPENCODE2_VERSION`.
90
+
91
+ ### Artifact integrity (0.36.0)
92
+
93
+ - `triss-dsh-provider-bundle-0.36.0.tgz` — sha256
94
+ `0e3100362fc02d242deac114ec6e0c4c966bbe5edde4f156a2ffdb76ef2eb329`,
95
+ integrity `sha512-P2QoA6Ahu/J9swIJhk9IkuP1OLR+bzn4zJdUKyuskutbis2GUSt5m3n+QmqP7B0rB1JAqi0WGIMkUrTBcmf9cQ==`
96
+ (computed with the pinned release npm 11.6.2 via
97
+ `scripts/publish-gate.js pack-inspect`; `npm pack` output is
98
+ byte-deterministic — tar entries carry the fixed npm epoch mtime — so a
99
+ test pins this value against every future pack of the same content).
100
+ - Root `triss-coworker-0.36.0.tgz` sha256 is reproducible via
101
+ `npm pack` at tag `v0.36.0` (the root tarball ships `CHANGELOG.md`, so its
102
+ hash cannot be recorded inside this file); registry verification compares
103
+ the packed artifact against the published tarball byte-for-byte
104
+ (`scripts/publish-gate.js pack-inspect`).
105
+
106
+ ## [0.35.0] — 2026-08-14
107
+
108
+ ### Added
109
+
110
+ - `triss-dsh-provider-bundle`, a standalone npm package (workspace
111
+ `packages/dsh-provider-bundle`) that activates the DeepSeek Harness
112
+ `llm-pi-ai` adapter for `opencode`, `opencode-go`, and `zai` routes in a
113
+ `dsh` profile without changing the Harness default provider or model.
114
+ - Release gates publish and registry-verify both packages from one
115
+ coordinated tag (`scripts/publish-gate.js`, updated `publish.yml`), and a
116
+ dedicated CI bundle matrix covers Node `22.19.0`, `24`, and `26` plus
117
+ `pnpm`-missing diagnostics.
118
+
119
+ ### Changed
120
+
121
+ - `test/coder-init-credential-gate-blocker.test.js` pins
122
+ `TRISS_PROJECT_ROOT` to the temp HOME so credential-gate isolation no
123
+ longer depends on cwd lookups; no runtime code changed in this release
124
+ train (an earlier iteration of this PR touched `src/safety.js` and was
125
+ reverted for expanding the sandbox boundary).
126
+ - The publish workflow plans publication from live registry state for BOTH
127
+ packages (`plan-publish`), skips a publish step when the registry already
128
+ holds the byte-identical tarball, and registry-verifies both packages again
129
+ after publication — a partial-failure rerun is now safe, including after
130
+ `main` has moved past the tag (fresh releases require the exact
131
+ `origin/main` tip; retries only require the tag to remain an ancestor,
132
+ via `publish-gate.js authorize-tag`).
133
+ - The tag workflow separates privileges: an unprivileged `release-gates`
134
+ job runs every repository-script verification (versions, tarball
135
+ inspection, registry planning, tag authorization) and only a minimal
136
+ `npm-publish` job behind the `npm-production` environment holds
137
+ `id-token: write`. The publish job repacks with `--ignore-scripts` and
138
+ byte-compares both tarballs against the gates artifact before publishing
139
+ the same bytes with `--provenance`.
140
+ - CI gains a required `dsh plugin lifecycle` job (real `@deepseek-ai/dsh`
141
+ 0.1.0-rc.6 + pnpm 9): add → real in-place update (add v2 over v1, no
142
+ remove) → remove → reinstall → npx-style anchor, asserting the dumped
143
+ `llm-pi-ai.config.providers` object (exact provider set and `apiKeyEnv`
144
+ mapping) plus the profile manifest at every phase. The job lives in a
145
+ reusable `bundle-checks` workflow included by both PR CI and the tag
146
+ publish flow, and a post-publish `registry-acceptance` job installs the
147
+ published package from the registry on Node `22.19.0` and `24`, exercises
148
+ add/update/remove/reinstall, and records the compatibility tuple with
149
+ registry integrity and provenance evidence.
150
+ - `npm test` now runs `scripts/check-lockfile-gate.cjs`, which asserts the
151
+ workspace name/version/engines against the live manifests plus the
152
+ pinned `@deepseek-ai/dsh-app-boot`.
153
+
154
+ ### Unchanged
155
+
156
+ - Triss runtime code, CLI, MCP schemas, and the root `triss-coworker`
157
+ published-file allowlist; the root tarball contains no companion manifest
158
+ or patch. (Correction, review finding: the follow-up fix commit DID touch
159
+ `src/safety.js` — `projectRoot()` was extended to `.codex/worktrees`,
160
+ widening the restricted-mode sandbox boundary to sibling worktrees. That
161
+ change is REVERTED in this corrective release; only the test-isolation
162
+ env pin from that commit remains.)
163
+
164
+ ### Artifact integrity (0.35.0)
165
+
166
+ - `triss-dsh-provider-bundle-0.35.0.tgz` — sha256
167
+ `25d9d80417c7955ac29d933cdb9c3c5e412e0a6a3ebc2f73de852985ce2a4900`,
168
+ integrity `sha512-7NkUhHg+RruXEAJhMXr1nWlFv7g7N2iAh0z416oTS7yK/PPi4GnE8h8LqJOzFrGr86BUPHMhVmYinNe8cF6YZQ==`
169
+ (computed with the pinned release npm 11.6.2 via
170
+ `scripts/publish-gate.js pack-inspect`; `npm pack` output is
171
+ byte-deterministic — tar entries carry the fixed npm epoch mtime — so a
172
+ test pins this value against every future pack of the same content).
173
+ - Root `triss-coworker-0.35.0.tgz` sha256 is reproducible via
174
+ `npm pack` at tag `v0.35.0` (the root tarball ships `CHANGELOG.md`, so its
175
+ hash cannot be recorded inside this file); registry verification compares
176
+ the packed artifact against the published tarball byte-for-byte
177
+ (`scripts/publish-gate.js pack-inspect`).
178
+
10
179
  ## [0.34.0] — 2026-08-13
11
180
 
12
181
  ### Added
package/README.md CHANGED
@@ -279,7 +279,8 @@ The exposed tool set is **filtered by configured credentials**:
279
279
  `ZHIPU_API_KEY` (Z.AI GLM), `OPENCODE_API_KEY` (OpenCode Zen or Go),
280
280
  `MOONSHOT_API_KEY` (Moonshot Kimi), or `KIMI_API_KEY` (Kimi for Coding)
281
281
  (setup: `triss coder init`). `triss_coder_run` takes an optional `engine`
282
- (`opencode` default, or `crush`); its timeout defaults to
282
+ (`opencode` V1 default; `--engine opencode2` beta — see
283
+ [opencode2.md](docs/opencode2.md) — or `crush`); its timeout defaults to
283
284
  1500s (25 min) over MCP, above the CLI's 900s, since coding runs are
284
285
  expected to be long; override per call via the `timeout` arg. For
285
286
  runs that may exceed it, use `triss coder run` on the CLI instead.
@@ -311,8 +312,8 @@ and writing**.
311
312
  | `triss review` | Code review on a branch, PR, or explicitly piped diff (linked ticket only for branch/PR) | The agent reading the whole diff |
312
313
  | `triss commit-msg` | Generates a commit message from staged diff | Hand-writing or copy-pasting from web LLMs |
313
314
  | `triss usage` | Cumulative cost / token usage with per-project breakdown | Squinting at stderr after each call |
314
- | `triss coder init` | Sets up a coding agent (default `opencode` engine; `--engine crush` for crush): provider key/profile (`--provider worker` reuses `TRISS_WORKER_*`; Z.AI GLM default; Zen, Go, and Kimi are also supported), config, permission policy, and agent templates. Blocks (non-zero) on an unsafe existing `opencode.json` — missing deny-first bash policy (override with `--allow-unsafe-bash`) or a stale/cross-provider `small_model`. | Manually installing/configuring opencode |
315
- | `triss coder run` | Spawns the coding agent (the OpenAI-compatible Triss worker, GLM, Kimi, OpenCode Zen, or OpenCode Go) and prints one JSON envelope (`--engine opencode\|crush`; `--isolate` for a disposable worktree — opencode defaults to isolate-OFF, crush defaults to isolate-ON; crush adds opt-in `--restrict`/`--no-restrict` for its CLI allowlist). **POSIX only** (macOS/Linux) — refuses to run on Windows. | Manually driving `opencode run` and parsing its ndjson stream |
315
+ | `triss coder init` | Sets up a coding agent (default `opencode` V1 engine; `--engine opencode2` for the V2 beta — shares the `opencode.json` config, see [docs/opencode2.md](docs/opencode2.md); `--engine crush` for crush): provider key/profile (`--provider worker` reuses `TRISS_WORKER_*`; Z.AI GLM default; Zen, Go, and Kimi are also supported), config, permission policy, and agent templates. Blocks (non-zero) on an unsafe existing `opencode.json` — missing deny-first bash policy (override with `--allow-unsafe-bash`) or a stale/cross-provider `small_model`. | Manually installing/configuring opencode |
316
+ | `triss coder run` | Spawns the coding agent (the OpenAI-compatible Triss worker, GLM, Kimi, OpenCode Zen, or OpenCode Go) and prints one JSON envelope (`--engine opencode|opencode2|crush` — opencode V1 default, opencode2 beta per [docs/opencode2.md](docs/opencode2.md); `--isolate` for a disposable worktree — opencode defaults to isolate-OFF, crush defaults to isolate-ON; crush adds opt-in `--restrict`/`--no-restrict` for its CLI allowlist). **POSIX only** (macOS/Linux) — refuses to run on Windows. | Manually driving `opencode run` and parsing its ndjson stream |
316
317
  | `triss coder clean` | Removes finished `.triss/wt` isolation worktrees (`--all` forces all) | Manually finding and deleting stale git worktrees |
317
318
  | `triss init` | Drops a tiny (~15 line) delegation block into `CLAUDE.md` / `AGENTS.md` | Hand-writing routing rules |
318
319
  | `triss agent-help` | Prints the full delegation cookbook on demand (the nano block points here) | A 200-line CLAUDE.md that always loads |
@@ -587,8 +588,9 @@ default timeout, configurable via `--timeout <ms>`.
587
588
 
588
589
  Delegates an implementation task to a cheap coding agent — the existing
589
590
  OpenAI-compatible Triss worker, GLM, Kimi,
590
- OpenCode Zen, or OpenCode Go models (the `opencode` engine by default; `crush` is an
591
- alternative — see **Engines** below) instead of the primary model writing
591
+ OpenCode Zen, or OpenCode Go models (the `opencode` V1 engine by default;
592
+ `opencode2` beta — see [docs/opencode2.md](docs/opencode2.md) — or `crush`; see
593
+ **Engines** below) instead of the primary model writing
592
594
  the code itself.
593
595
 
594
596
  ```bash
package/bin/triss.js CHANGED
@@ -276,7 +276,7 @@ config
276
276
  .option('-f, --force', 're-prompt for keys that are already set')
277
277
  .option('--standard', 'API key + one model only — skip the standard/advanced prompt')
278
278
  .option('--advanced', 'full wizard with presets, base URL, integrations — skip the prompt')
279
- .option('--coder-engine <name>', 'coder target only: coding engine to configure (opencode default, or crush). `coder init` uses --engine')
279
+ .option('--coder-engine <name>', 'coder target only: coding engine to configure (opencode default, opencode2 beta, or crush). `coder init` uses --engine')
280
280
  .option('--coder-provider <name>', 'coder target only: opencode engine provider (zai, worker, opencode-zen, opencode-go, moonshot, kimi-for-coding). `coder init` uses --provider')
281
281
  .action(wrap(runWizard));
282
282
 
@@ -324,14 +324,14 @@ config
324
324
 
325
325
  const coder = program
326
326
  .command('coder')
327
- .description('Run a coding agent (OpenCode or Crush engine)');
327
+ .description('Run a coding agent (OpenCode V1, OpenCode 2 beta, or Crush engine)');
328
328
 
329
329
  coder
330
330
  .command('init')
331
- .description('Install/configure a coding engine (opencode default, or crush), provider key, permission policy, and agent templates')
331
+ .description('Install/configure a coding engine (opencode default, opencode2 beta, or crush), provider key, permission policy, and agent templates')
332
332
  .option('-g, --global', 'save to the global scope (~/.config/triss/.env, ~/.config/opencode/)')
333
333
  .option('-l, --local', 'save to the project scope (./.triss.env, ./opencode.json)')
334
- .option('--engine <name>', 'coding engine to configure: opencode (default) or crush')
334
+ .option('--engine <name>', 'coding engine to configure: opencode (default), opencode2 (beta — shares the opencode.json config; see docs/opencode2.md), or crush')
335
335
  .option('--provider <name>', 'opencode engine model provider: zai, worker (existing OpenAI-compatible TRISS_WORKER_* profile), opencode-zen, opencode-go, moonshot, or kimi-for-coding')
336
336
  .option('--allow-unverified', 'requires explicit --provider opencode-go (alias: go): allow the built-in fallback only after a temporary network or HTTP 408/429/500/502/503/504 catalogue failure (never bypasses 401/403, empty, or invalid responses)')
337
337
  .option('--allow-unsafe-bash', 'proceed even if an existing opencode.json has no deny-first bash policy (the agent runs with --auto)')
@@ -339,11 +339,11 @@ coder
339
339
 
340
340
  coder
341
341
  .command('run [prompt]')
342
- .description('Spawn a coding agent — GLM, the OpenAI-compatible Triss worker, Kimi, OpenCode Zen, or OpenCode Go (opencode default, or --engine crush) — and print a JSON envelope to stdout')
343
- .option('--engine <name>', 'coding engine: opencode (default) or crush')
342
+ .description('Spawn a coding agent — GLM, the OpenAI-compatible Triss worker, Kimi, OpenCode Zen, or OpenCode Go (opencode default; opencode2 beta or --engine crush) — and print a JSON envelope to stdout')
343
+ .option('--engine <name>', 'coding engine: opencode (default), opencode2 (beta — see docs/opencode2.md), or crush')
344
344
  .option('--session <id>', 'triss-side session slug, mapped to a real opencode session id in .triss/sessions.json')
345
345
  .option('--continue', 'continue the most recent opencode session (maps to opencode --continue)')
346
- .option('--agent <name>', 'opencode agent template to use', 'coder')
346
+ .option('--agent <name>', 'agent template to use (V1 default: coder; opencode2 beta uses its built-in primary agent unless set)')
347
347
  .option('--provider <name>', 'OpenCode only: select a provider for one run; requires --model and does not modify .env or opencode.json')
348
348
  .option('--model <p/m>', 'override the MAIN model for this one run only (does not change small_model or repair persistent config; use `triss coder model set` for that)')
349
349
  .option('--small-model <p/m>', 'with --provider, override small_model for one run (defaults to the one-shot main model)')
@@ -366,10 +366,10 @@ coder
366
366
  coder
367
367
  .command('models')
368
368
  .description('List current + live coder models, provider compatibility, and credential readiness (read-only)\n\n' +
369
- 'Configuration sources:\n' +
370
- ' • opencode: project opencode.json (local) or ~/.config/opencode/opencode.json (global)\n' +
369
+ 'Configuration sources (layered; later sources win):\n' +
370
+ ' • opencode & opencode2: JSONC-aware layered config — global ~/.config/opencode/opencode.json, then every opencode.json/.opencode/opencode.json up from the project root to the Git boundary (project-local wins)\n' +
371
371
  ' • crush: ./.crush/crush.json (local) or ~/.local/share/crush/crush.json (global)')
372
- .option('--engine <name>', 'coding engine: opencode (default) or crush')
372
+ .option('--engine <name>', 'coding engine: opencode (default), opencode2 (beta — layered JSONC config), or crush')
373
373
  .option('--provider <name>', 'provider kind: zai, worker, opencode-zen, opencode-go, moonshot, or kimi-for-coding')
374
374
  .option('--json', 'print the stable machine-readable state object (no secrets)')
375
375
  .action(wrap(runCoderModels));
@@ -391,7 +391,7 @@ coderModel
391
391
  ' • crush: project .crush/crush.json (local) or ~/.local/share/crush/crush.json (global)'
392
392
  )
393
393
  .option('--small <model>', 'small/fast model id (omit to keep the current compatible value)')
394
- .option('--engine <name>', 'coding engine: opencode (default) or crush')
394
+ .option('--engine <name>', 'coding engine: opencode (default), opencode2 (beta — layered JSONC config), or crush')
395
395
  .option('--provider <name>', 'provider kind: zai, worker, opencode-zen, opencode-go, moonshot, or kimi-for-coding')
396
396
  .option('-g, --global', 'write to the global scope (OpenCode: ~/.config/opencode/opencode.json + global .env; Crush: ~/.local/share/crush/crush.json)')
397
397
  .option('-l, --local', 'write to the project scope (OpenCode: ./opencode.json + ./.triss.env; Crush: ./.crush/crush.json)')
@@ -263,14 +263,15 @@ self-hosted endpoints).
263
263
  | Variable | Required | Default | Notes |
264
264
  | -------------------------------- | -------- | ------------------ | ------------------------------------------ |
265
265
  | `ZHIPU_API_KEY` | yes¹ | — | Z.AI API key for `ask`/`review --provider glm` and GLM coder models — <https://z.ai/manage-apikey/apikey-list> |
266
- | `OPENCODE_API_KEY` | no¹ | — | Shared OpenCode credential for Zen `opencode/*` and paid Go `opencode-go/*` models (opencode engine only). A key alone does not prove Go subscription, quota, or regional readiness. See [opencode-zen.md](opencode-zen.md) and [opencode-go.md](opencode-go.md). |
266
+ | `OPENCODE_API_KEY` | no¹ | — | Shared OpenCode credential for Zen `opencode/*` and paid Go `opencode-go/*` models (opencode engines). A key alone does not prove Go subscription, quota, or regional readiness. See [opencode-zen.md](opencode-zen.md) and [opencode-go.md](opencode-go.md). |
267
267
  | `MOONSHOT_API_KEY` | no¹ | — | Moonshot AI (Kimi) key for `ask`/`review --provider kimi` and `moonshotai/*` coder models — <https://platform.kimi.ai/console/api-keys> |
268
- | `KIMI_API_KEY` | no¹ | — | Kimi for Coding subscription key (opencode engine only) — unlocks `kimi-for-coding/*` models like `kimi-for-coding/k3` — <https://www.kimi.com/code/docs/en/> |
268
+ | `KIMI_API_KEY` | no¹ | — | Kimi for Coding subscription key (opencode engines) — unlocks `kimi-for-coding/*` models like `kimi-for-coding/k3` — <https://www.kimi.com/code/docs/en/> |
269
269
  | `TRISS_KIMI_BASE_URL` | no | `https://api.moonshot.ai/v1` | Endpoint for `--provider kimi` ask/review calls — set `https://api.moonshot.cn/v1` for a China-mainland key. Trailing slashes are stripped; a blank/degenerate value falls back to the default |
270
270
  | `TRISS_CODER_MODEL` | no | `zai-coding-plan/glm-5.2` | Resolved **main** model, passed to opencode via `--model`. Worker uses `triss-worker/<id>`, Go uses `opencode-go/<id>`, and Zen uses `opencode/<id>`. Main and small must stay within one provider prefix. |
271
271
  | `TRISS_CODER_SMALL_MODEL` | no | `zai-coding-plan/glm-5-turbo` | Small/fast **management/init intent** — written to `opencode.json` `small_model` by `init`/`triss coder model set`. **Not** a runtime override of an already-pinned small role (see precedence) |
272
272
  | `TRISS_CODER_OPENCODE_VERSION` | no | `1.18.7` | Pin override for the `opencode-ai` npm install |
273
- | `TRISS_CODER_ENGINE` | no | `opencode` | Coding engine: `opencode` (default) or `crush` |
273
+ | `TRISS_CODER_ENGINE` | no | `opencode` | Coding engine: `opencode` (default), `opencode2` (beta — see [opencode2.md](./opencode2.md)), or `crush` |
274
+ | `TRISS_CODER_OPENCODE2_VERSION` | no | `0.0.0-next-17430` | Exact pin override for the `@opencode-ai/cli` npm install (opencode2 engine — exact match required) |
274
275
  | `TRISS_CODER_CRUSH_VERSION` | no | `0.1.6` | Pin override for the `@phpcraftdream/crush` npm install (crush engine) |
275
276
  | `TRISS_CODER_CRUSH_RESTRICT` | no | unset (`0`) | crush only — `1` opts INTO the CLI allowlist (`--restrict-run` + `--allow-bash`/`--allow-tool`, the only enforcement path that works today — crush 0.1.3 ignores the `permissions.run` config). Unset leaves crush unrestricted; crush then defaults to isolate-ON. CLI `--restrict`/`--no-restrict` overrides; crush.json `permissions.run.restrict` is the next fallback (forward-compat — currently inert) |
276
277