triss-coworker 0.25.0 → 0.26.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 +56 -1
- package/README.md +69 -21
- package/bin/triss.js +6 -6
- package/docs/configuration.md +39 -14
- package/docs/glm-clients.md +8 -6
- package/docs/mcp.md +48 -25
- package/docs/opencode-zen.md +24 -15
- package/package.json +2 -1
- package/src/client.js +33 -3
- package/src/commands/coder.js +219 -51
- package/src/commands/status.js +26 -5
- package/src/config.js +48 -15
- package/src/mcp/handlers.js +15 -1
- package/src/mcp/tools.js +21 -16
- package/src/models.js +71 -2
- package/src/moonshot.js +16 -0
- package/src/usage.js +21 -6
- package/templates/claude-full.md +14 -5
- package/templates/claude.md +7 -4
- package/templates/codex-full.md +12 -4
- package/templates/codex.md +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.26.0] — 2026-07-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Kimi (Moonshot AI) as a first-class inference provider.** `triss ask` and
|
|
15
|
+
`triss review` accept `--provider kimi` (aliases `moonshot`, `moonshotai`;
|
|
16
|
+
also the `provider` field on the `triss_ask` / `triss_review` MCP tools), using
|
|
17
|
+
`MOONSHOT_API_KEY` against the OpenAI-compatible
|
|
18
|
+
`https://api.moonshot.ai/v1` endpoint. `--model pro` maps to `kimi-k3` —
|
|
19
|
+
Moonshot's flagship open-weights model (released 2026-07-16, weights
|
|
20
|
+
published 2026-07-26) — and `--model flash` to `kimi-k2.6`, the cheapest
|
|
21
|
+
current-generation model. Model ids are passed bare: Kimi has a single
|
|
22
|
+
endpoint, so there is no prefix grammar and no endpoint auto-correction.
|
|
23
|
+
`TRISS_KIMI_BASE_URL` points the route at a different host (e.g. the
|
|
24
|
+
China-mainland `api.moonshot.cn`). Both settings live in the reloadable
|
|
25
|
+
provider snapshot, so a long-lived MCP server picks up edits without a
|
|
26
|
+
restart.
|
|
27
|
+
- **Kimi in `triss coder`.** `triss coder init --provider moonshot` sets up
|
|
28
|
+
pay-as-you-go `moonshotai/*` models (default main `moonshotai/kimi-k2.7-code`,
|
|
29
|
+
small `moonshotai/kimi-k2.6`), and `--provider kimi-for-coding` sets up the
|
|
30
|
+
flat-rate Kimi for Coding subscription (`kimi-for-coding/k3` — Kimi K3 —
|
|
31
|
+
with `KIMI_API_KEY`). Unlike Z.AI there is no plan probe: the two Kimi plans
|
|
32
|
+
use different credential envs, so the provider choice already names the
|
|
33
|
+
endpoint. Runs forward only the key the resolved model needs; a Kimi-only
|
|
34
|
+
machine needs no `ZHIPU_API_KEY`. The `moonshotai-cn/*` prefix is recognised
|
|
35
|
+
for China-mainland pins. The crush engine remains Z.AI-only and now rejects
|
|
36
|
+
any non-GLM model override explicitly.
|
|
37
|
+
- `triss status` / `triss_status` print a Kimi routing block (key presence,
|
|
38
|
+
resolved endpoint and its source, preset models), and
|
|
39
|
+
`triss_coder_run` / `triss_coder_status` surface once any provider
|
|
40
|
+
credential is set — `ZHIPU_API_KEY`, `OPENCODE_API_KEY`,
|
|
41
|
+
`MOONSHOT_API_KEY`, or `KIMI_API_KEY`.
|
|
42
|
+
- Kimi list prices (fetched 2026-07-27 from platform.kimi.ai) ship built-in
|
|
43
|
+
for `kimi-k3`, `kimi-k2.7-code`, `kimi-k2.7-code-highspeed`, and
|
|
44
|
+
`kimi-k2.6`, matched whether the id is logged bare (ask/review) or under
|
|
45
|
+
opencode's `moonshotai/` / `moonshotai-cn/` prefix (coder runs).
|
|
46
|
+
`kimi-for-coding/*` subscription calls are accounted as known `$0` — the
|
|
47
|
+
plan meters by quota, like the Z.AI Coding Plan.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- The opencode engine pin was bumped from 1.17.18 to 1.18.7 (2026-07-27
|
|
52
|
+
release; the 1.18.x line is bugfix/Desktop work with no `run` CLI changes,
|
|
53
|
+
and 1.18.4 specifically improved Kimi model handling).
|
|
54
|
+
- The `coder` row in `triss status` is labelled `coder` (previously
|
|
55
|
+
`GLM/coder`) now that it fronts GLM, Kimi, and OpenCode Zen credentials.
|
|
56
|
+
- The npm tarball no longer ships `docs/promo/` (marketing drafts); the
|
|
57
|
+
package `files` list excludes it explicitly.
|
|
58
|
+
- A bare `triss coder run` that fails on a missing `ZHIPU_API_KEY` now names
|
|
59
|
+
the working `--model` path when another provider's key (Zen/Kimi) is
|
|
60
|
+
configured, and Kimi 429 responses carry a rate-limit/balance hint.
|
|
61
|
+
|
|
10
62
|
## [0.25.0] — 2026-07-27
|
|
11
63
|
|
|
12
64
|
### Added
|
|
@@ -728,7 +780,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
728
780
|
|
|
729
781
|
- Initial release of `triss-coworker`.
|
|
730
782
|
|
|
731
|
-
[Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.
|
|
783
|
+
[Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.26.0...HEAD
|
|
784
|
+
[0.26.0]: https://github.com/ayleen/triss-coworker/compare/v0.25.0...v0.26.0
|
|
785
|
+
[0.25.0]: https://github.com/ayleen/triss-coworker/compare/v0.24.2...v0.25.0
|
|
786
|
+
[0.24.2]: https://github.com/ayleen/triss-coworker/compare/v0.24.1...v0.24.2
|
|
732
787
|
[0.24.1]: https://github.com/ayleen/triss-coworker/compare/v0.24.0...v0.24.1
|
|
733
788
|
[0.24.0]: https://github.com/ayleen/triss-coworker/compare/v0.23.0...v0.24.0
|
|
734
789
|
[0.23.0]: https://github.com/ayleen/triss-coworker/compare/v0.22.4...v0.23.0
|
package/README.md
CHANGED
|
@@ -236,10 +236,12 @@ The exposed tool set is **filtered by configured credentials**:
|
|
|
236
236
|
- **`triss_linear_*`** when `LINEAR_API_KEY` is set.
|
|
237
237
|
- **`triss_github_*`** when `GITHUB_TOKEN` is set (or `gh` CLI logged in).
|
|
238
238
|
- **`triss_gitlab_*`** when `GITLAB_TOKEN` is set.
|
|
239
|
-
- **`triss_coder_run` + `triss_coder_status`** when
|
|
239
|
+
- **`triss_coder_run` + `triss_coder_status`** when any coder provider key is
|
|
240
|
+
set — `ZHIPU_API_KEY` (Z.AI GLM), `OPENCODE_API_KEY` (OpenCode Zen),
|
|
241
|
+
`MOONSHOT_API_KEY` (Moonshot Kimi), or `KIMI_API_KEY` (Kimi for Coding)
|
|
240
242
|
(setup: `triss coder init`). `triss_coder_run` takes an optional `engine`
|
|
241
243
|
(`opencode` default, or `crush`); its timeout defaults to
|
|
242
|
-
1500s (25 min) over MCP, above the CLI's 900s, since
|
|
244
|
+
1500s (25 min) over MCP, above the CLI's 900s, since coding runs are
|
|
243
245
|
expected to be long; override per call via the `timeout` arg. For
|
|
244
246
|
runs that may exceed it, use `triss coder run` on the CLI instead.
|
|
245
247
|
|
|
@@ -269,8 +271,8 @@ and writing**.
|
|
|
269
271
|
| `triss review` | Code review on current branch or a PR (diff + linked ticket) | The agent reading the whole diff |
|
|
270
272
|
| `triss commit-msg` | Generates a commit message from staged diff | Hand-writing or copy-pasting from web LLMs |
|
|
271
273
|
| `triss usage` | Cumulative cost / token usage with per-project breakdown | Squinting at stderr after each call |
|
|
272
|
-
| `triss coder init` | Sets up a coding agent (default `opencode` engine; `--engine crush` for crush): provider key (Z.AI GLM
|
|
273
|
-
| `triss coder run` | Spawns the
|
|
274
|
+
| `triss coder init` | Sets up a coding agent (default `opencode` engine; `--engine crush` for crush): provider key (Z.AI GLM default; `--provider opencode-zen` for free OpenCode Zen models like `hy3`; `--provider moonshot` for Kimi pay-as-you-go; `--provider kimi-for-coding` for the Kimi subscription), `opencode.json` / crush models + `permissions.run` policy, 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 |
|
|
275
|
+
| `triss coder run` | Spawns the coding agent (GLM, Kimi, or Zen models) 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 |
|
|
274
276
|
| `triss coder clean` | Removes finished `.triss/wt` isolation worktrees (`--all` forces all) | Manually finding and deleting stale git worktrees |
|
|
275
277
|
| `triss init` | Drops a tiny (~15 line) delegation block into `CLAUDE.md` / `AGENTS.md` | Hand-writing routing rules |
|
|
276
278
|
| `triss agent-help` | Prints the full delegation cookbook on demand (the nano block points here) | A 200-line CLAUDE.md that always loads |
|
|
@@ -292,6 +294,10 @@ triss ask --paths "src/**/*.ts" \
|
|
|
292
294
|
triss ask --paths "src/**/*.ts" \
|
|
293
295
|
--question "Find SQL injection risks" \
|
|
294
296
|
--provider glm --model pro
|
|
297
|
+
|
|
298
|
+
triss ask --paths "src/**/*.ts" \
|
|
299
|
+
--question "Find SQL injection risks" \
|
|
300
|
+
--provider kimi --model pro # Kimi K3 via MOONSHOT_API_KEY
|
|
295
301
|
```
|
|
296
302
|
|
|
297
303
|
Typical output is a focused answer with cited file paths, not a raw file dump.
|
|
@@ -404,6 +410,7 @@ triss review 123 # GitHub PR #123 (requires `gh` CLI)
|
|
|
404
410
|
triss review --base develop # explicit base
|
|
405
411
|
triss review --skip-issue # don't try ticket lookup
|
|
406
412
|
triss review --provider glm # same review flow, one-shot GLM inference
|
|
413
|
+
triss review --provider kimi # …or Kimi (pro preset = kimi-k3)
|
|
407
414
|
```
|
|
408
415
|
|
|
409
416
|
Defaults to the `pro` preset because review needs reasoning. Output is
|
|
@@ -443,9 +450,10 @@ default timeout, configurable via `--timeout <ms>`.
|
|
|
443
450
|
|
|
444
451
|
### `triss coder`
|
|
445
452
|
|
|
446
|
-
Delegates an implementation task to a
|
|
447
|
-
engine by default; `crush` is an
|
|
448
|
-
instead of the primary model writing
|
|
453
|
+
Delegates an implementation task to a cheap coding agent — GLM, Kimi, or
|
|
454
|
+
OpenCode Zen models (the `opencode` engine by default; `crush` is an
|
|
455
|
+
alternative — see **Engines** below) instead of the primary model writing
|
|
456
|
+
the code itself.
|
|
449
457
|
|
|
450
458
|
```bash
|
|
451
459
|
triss coder init # once: key, opencode.json, agent templates
|
|
@@ -456,11 +464,17 @@ triss coder clean # remove finished isolation wo
|
|
|
456
464
|
```
|
|
457
465
|
|
|
458
466
|
`triss coder init` first asks which provider to configure — **Z.AI GLM**
|
|
459
|
-
(default)
|
|
460
|
-
Hunyuan `hy3`)
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
467
|
+
(default), **OpenCode Zen** (`--provider opencode-zen`, free models incl.
|
|
468
|
+
Hunyuan `hy3`), **Moonshot Kimi** (`--provider moonshot`, pay-as-you-go
|
|
469
|
+
`moonshotai/*` models like `kimi-k2.7-code`), or **Kimi for Coding**
|
|
470
|
+
(`--provider kimi-for-coding`, the flat-rate subscription serving Kimi K3).
|
|
471
|
+
For Z.AI it probes which plan your key works with (subscription vs.
|
|
472
|
+
pay-as-you-go) and writes the matching model prefix; for Zen it saves an
|
|
473
|
+
`OPENCODE_API_KEY` and writes an `opencode/<id>` model; the two Kimi
|
|
474
|
+
providers need no probe at all — their plans use different keys
|
|
475
|
+
(`MOONSHOT_API_KEY` vs `KIMI_API_KEY`), so the choice already names the
|
|
476
|
+
endpoint. Either way it lets you pick the model interactively. See the
|
|
477
|
+
**Providers** section below and
|
|
464
478
|
[docs/opencode-zen.md](docs/opencode-zen.md) for the OpenCode Zen deep‑dive.
|
|
465
479
|
|
|
466
480
|
Prints one JSON envelope to stdout — `files_changed`, `diff_stat`, and
|
|
@@ -494,9 +508,14 @@ natively; triss also forwards it as `ZAI_API_KEY` for older binaries; see
|
|
|
494
508
|
|
|
495
509
|
**Providers** — the `opencode` engine isn't limited to Z.AI. The required
|
|
496
510
|
API key follows the model's `<provider>/` prefix: `zai-coding-plan/*` and
|
|
497
|
-
`zai/*` (GLM) use `ZHIPU_API_KEY
|
|
511
|
+
`zai/*` (GLM) use `ZHIPU_API_KEY`; `opencode/*` models — served free by
|
|
498
512
|
[OpenCode Zen](https://opencode.ai/docs/zen/), e.g. **`opencode/hy3-free`**
|
|
499
|
-
(Tencent Hunyuan 3) — use `OPENCODE_API_KEY
|
|
513
|
+
(Tencent Hunyuan 3) — use `OPENCODE_API_KEY`; `moonshotai/*` (and the
|
|
514
|
+
China-mainland `moonshotai-cn/*`) Kimi models use `MOONSHOT_API_KEY`; and
|
|
515
|
+
`kimi-for-coding/*` models — the flat-rate
|
|
516
|
+
[Kimi for Coding](https://www.kimi.com/code/docs/en/) subscription, e.g.
|
|
517
|
+
**`kimi-for-coding/k3`** (Kimi K3) — use `KIMI_API_KEY`. To point coder at
|
|
518
|
+
a Zen model:
|
|
500
519
|
|
|
501
520
|
```bash
|
|
502
521
|
triss coder init --provider opencode-zen # guided: key + opencode.json
|
|
@@ -509,10 +528,21 @@ triss coder run "add input validation to /signup"
|
|
|
509
528
|
triss coder run "..." --model opencode/hy3-free
|
|
510
529
|
```
|
|
511
530
|
|
|
531
|
+
Kimi works the same way:
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
triss coder init --provider moonshot # pay-as-you-go: kimi-k2.7-code default
|
|
535
|
+
triss coder init --provider kimi-for-coding # subscription: Kimi K3 on a flat plan
|
|
536
|
+
# …or per-run, without changing the default:
|
|
537
|
+
triss coder run "..." --model moonshotai/kimi-k3
|
|
538
|
+
triss coder run "..." --model kimi-for-coding/k3
|
|
539
|
+
```
|
|
540
|
+
|
|
512
541
|
`triss coder run` passes the resolved model to opencode with `--model` and
|
|
513
542
|
forwards only the key that model needs, so a Zen run works with
|
|
514
|
-
`OPENCODE_API_KEY` alone
|
|
515
|
-
|
|
543
|
+
`OPENCODE_API_KEY` alone and a Kimi run with `MOONSHOT_API_KEY` /
|
|
544
|
+
`KIMI_API_KEY` alone — no Z.AI key required. The deny-first `opencode.json`
|
|
545
|
+
bash policy applies to every provider. Any Zen model id works via
|
|
516
546
|
`TRISS_CODER_MODEL=opencode/<id>` / `--model`, not just the free ones the
|
|
517
547
|
picker lists. (The `crush` engine speaks Z.AI only.) Full details, the model
|
|
518
548
|
catalogue, and every configuration path are in
|
|
@@ -595,13 +625,15 @@ requires an OpenAI-compatible chat-completions endpoint.
|
|
|
595
625
|
|
|
596
626
|
You can also pass any model id directly: `--model deepseek-v4-pro`.
|
|
597
627
|
|
|
598
|
-
`ask` and `review` can route the same one-shot request to GLM without
|
|
599
|
-
the agentic `coder` runtime:
|
|
628
|
+
`ask` and `review` can route the same one-shot request to GLM or Kimi without
|
|
629
|
+
invoking the agentic `coder` runtime:
|
|
600
630
|
|
|
601
631
|
```bash
|
|
602
632
|
triss ask --paths ... --question "..." --provider glm --model flash
|
|
603
633
|
triss review --provider glm --model pro
|
|
604
634
|
triss review --provider glm --model zai/glm-5.2 # pay-as-you-go endpoint
|
|
635
|
+
triss review --provider kimi # pro preset → kimi-k3
|
|
636
|
+
triss ask --paths ... --question "..." --provider kimi --model flash # kimi-k2.6
|
|
605
637
|
```
|
|
606
638
|
|
|
607
639
|
For GLM, `pro` maps to `glm-5.2` on both endpoints, while `flash` — the cheap
|
|
@@ -620,6 +652,17 @@ it for the rest of the process. Pin it (`TRISS_CODER_MODEL=zai/glm-5.2`, or run
|
|
|
620
652
|
`triss coder init`) to skip that probe. `triss status` shows the resolved
|
|
621
653
|
endpoint, where it came from, and the presets it selects.
|
|
622
654
|
|
|
655
|
+
For Kimi (`--provider kimi`, alias `moonshot`), `pro` maps to **`kimi-k3`** —
|
|
656
|
+
Moonshot's flagship open-weights model ($3.00/$15.00 per 1M tokens, cache-hit
|
|
657
|
+
input $0.30) — and `flash` to `kimi-k2.6` ($0.95/$4.00, cache-hit $0.16), the
|
|
658
|
+
cheapest current-generation model on the platform. `MOONSHOT_API_KEY` is
|
|
659
|
+
reused from the coder setup, there is a single OpenAI-compatible endpoint
|
|
660
|
+
(`https://api.moonshot.ai/v1`; set `TRISS_KIMI_BASE_URL` for the
|
|
661
|
+
China-mainland `api.moonshot.cn`), and model ids are passed bare —
|
|
662
|
+
`--model kimi-k2.7-code`. The Kimi for Coding subscription is coder-only: its
|
|
663
|
+
endpoint speaks the Anthropic protocol, which ask/review's OpenAI client
|
|
664
|
+
cannot use.
|
|
665
|
+
|
|
623
666
|
`triss coder` stays separate because it is an agent runtime with tools,
|
|
624
667
|
sessions, and worktree isolation.
|
|
625
668
|
|
|
@@ -631,12 +674,17 @@ triss config set TRISS_WORKER_API_KEY # masked prompt
|
|
|
631
674
|
# That's it — BASE_URL / FLASH / PRO use the current DeepSeek V4 defaults.
|
|
632
675
|
```
|
|
633
676
|
|
|
634
|
-
#### Kimi / Moonshot
|
|
677
|
+
#### Kimi / Moonshot (first-class)
|
|
678
|
+
```bash
|
|
679
|
+
triss config set MOONSHOT_API_KEY # masked prompt
|
|
680
|
+
triss ask --provider kimi ... # flash=kimi-k2.6, pro=kimi-k3
|
|
681
|
+
```
|
|
682
|
+
Or replace the worker entirely (keeps `--provider` free for something else):
|
|
635
683
|
```bash
|
|
636
684
|
triss config set TRISS_WORKER_API_KEY $MOONSHOT_API_KEY
|
|
637
685
|
triss config set TRISS_WORKER_BASE_URL https://api.moonshot.ai/v1
|
|
638
|
-
triss config set TRISS_WORKER_FLASH_MODEL kimi-k2.
|
|
639
|
-
triss config set TRISS_WORKER_PRO_MODEL kimi-
|
|
686
|
+
triss config set TRISS_WORKER_FLASH_MODEL kimi-k2.6
|
|
687
|
+
triss config set TRISS_WORKER_PRO_MODEL kimi-k3
|
|
640
688
|
```
|
|
641
689
|
|
|
642
690
|
#### Ollama (local, free)
|
package/bin/triss.js
CHANGED
|
@@ -66,12 +66,12 @@ program
|
|
|
66
66
|
|
|
67
67
|
program
|
|
68
68
|
.command('ask')
|
|
69
|
-
.description('Delegate bulk reading to the configured worker or
|
|
69
|
+
.description('Delegate bulk reading to the configured worker, GLM, or Kimi; returns a structured summary')
|
|
70
70
|
.option('-p, --paths <paths...>', 'files or globs to read')
|
|
71
71
|
.option('-u, --urls <urls...>', 'http(s) URLs to fetch and convert to markdown')
|
|
72
72
|
.option('--stdin', 'read piped stdin as an additional source (for `cmd | triss ask --stdin ...`)')
|
|
73
73
|
.requiredOption('-q, --question <text>', 'question to answer about the corpus')
|
|
74
|
-
.option('--provider <name>', 'inference provider: worker (default), deepseek (alias), or
|
|
74
|
+
.option('--provider <name>', 'inference provider: worker (default), deepseek (alias), glm, or kimi (alias: moonshot)')
|
|
75
75
|
.option('-m, --model <name>', 'model preset (flash | pro) or full model id')
|
|
76
76
|
.option('--max-tokens <n>', 'token budget for reasoning + answer', (v) => parseInt(v, 10), 8192)
|
|
77
77
|
.option('--system <text>', 'override the system prompt')
|
|
@@ -131,11 +131,11 @@ program
|
|
|
131
131
|
|
|
132
132
|
program
|
|
133
133
|
.command('review [pr]')
|
|
134
|
-
.description('Code review via the configured worker or
|
|
134
|
+
.description('Code review via the configured worker, GLM, or Kimi. No arg: current branch vs default base. With <pr>: GitHub PR via gh.')
|
|
135
135
|
.option('-b, --base <branch>', 'compare against this branch (default: auto-detect origin/HEAD or main/master/develop)')
|
|
136
136
|
.option('--skip-issue', "don't try to look up a Jira/Linear ticket from the branch/PR title")
|
|
137
137
|
.option('-q, --question <text>', 'override the default review question')
|
|
138
|
-
.option('--provider <name>', 'inference provider: worker (default), deepseek (alias), or
|
|
138
|
+
.option('--provider <name>', 'inference provider: worker (default), deepseek (alias), glm, or kimi (alias: moonshot)')
|
|
139
139
|
.option('-m, --model <name>', 'model preset (flash | pro) or full model id (default: pro)')
|
|
140
140
|
.option('--max-tokens <n>', 'token budget for the review (default 8192)')
|
|
141
141
|
.option('--no-stream', 'disable streaming output')
|
|
@@ -235,13 +235,13 @@ coder
|
|
|
235
235
|
.option('-g, --global', 'save to the global scope (~/.config/triss/.env, ~/.config/opencode/)')
|
|
236
236
|
.option('-l, --local', 'save to the project scope (./.triss.env, ./opencode.json)')
|
|
237
237
|
.option('--engine <name>', 'coding engine to configure: opencode (default) or crush')
|
|
238
|
-
.option('--provider <name>', 'opencode engine model provider: zai (Z.AI GLM, default)
|
|
238
|
+
.option('--provider <name>', 'opencode engine model provider: zai (Z.AI GLM, default), opencode-zen (free models incl. hy3), moonshot (Kimi pay-as-you-go), or kimi-for-coding (subscription)')
|
|
239
239
|
.option('--allow-unsafe-bash', 'proceed even if an existing opencode.json has no deny-first bash policy (the agent runs with --auto)')
|
|
240
240
|
.action(wrap(runCoderInit));
|
|
241
241
|
|
|
242
242
|
coder
|
|
243
243
|
.command('run [prompt]')
|
|
244
|
-
.description('Spawn a
|
|
244
|
+
.description('Spawn a coding agent — GLM, Kimi, or Zen models (opencode default, or --engine crush) — and print a JSON envelope to stdout')
|
|
245
245
|
.option('--engine <name>', 'coding engine: opencode (default) or crush')
|
|
246
246
|
.option('--session <id>', 'triss-side session slug, mapped to a real opencode session id in .triss/sessions.json')
|
|
247
247
|
.option('--continue', 'continue the most recent opencode session (maps to opencode --continue)')
|
package/docs/configuration.md
CHANGED
|
@@ -122,7 +122,7 @@ Removes a variable.
|
|
|
122
122
|
| `worker` | `TRISS_WORKER_API_KEY`, `TRISS_WORKER_BASE_URL`, `TRISS_WORKER_FLASH_MODEL`, `TRISS_WORKER_PRO_MODEL` | only `TRISS_WORKER_API_KEY` is required |
|
|
123
123
|
| `jira` | `ATLASSIAN_BASE_URL`, `ATLASSIAN_EMAIL`, `ATLASSIAN_API_TOKEN` | all three |
|
|
124
124
|
| `linear` | `LINEAR_API_KEY`, `LINEAR_API_URL` | only `LINEAR_API_KEY` is required |
|
|
125
|
-
| `coder` | `ZHIPU_API_KEY`, `OPENCODE_API_KEY` (setup: `triss coder init` — engine, `opencode.json`, agent templates) | `ZHIPU_API_KEY` (Z.AI GLM); `OPENCODE_API_KEY`
|
|
125
|
+
| `coder` | `ZHIPU_API_KEY`, `OPENCODE_API_KEY`, `MOONSHOT_API_KEY`, `KIMI_API_KEY` (setup: `triss coder init` — engine, `opencode.json`, agent templates) | `ZHIPU_API_KEY` (Z.AI GLM); the others optional — `OPENCODE_API_KEY` (OpenCode Zen), `MOONSHOT_API_KEY` (Moonshot Kimi), `KIMI_API_KEY` (Kimi for Coding) |
|
|
126
126
|
|
|
127
127
|
When you add a new integration (see [extending.md](extending.md)), its
|
|
128
128
|
`envVars` declaration is automatically picked up — no wizard changes needed.
|
|
@@ -250,15 +250,18 @@ self-hosted endpoints).
|
|
|
250
250
|
| `TRISS_WORKER_PRO_MODEL` | no | `deepseek-v4-pro` | Override the `pro` preset |
|
|
251
251
|
| `TRISS_DEFAULT_MODEL` | no | `flash` | Which preset is used when no `--model`|
|
|
252
252
|
|
|
253
|
-
### GLM and coder
|
|
253
|
+
### GLM, Kimi, and coder
|
|
254
254
|
|
|
255
255
|
| Variable | Required | Default | Notes |
|
|
256
256
|
| -------------------------------- | -------- | ------------------ | ------------------------------------------ |
|
|
257
257
|
| `ZHIPU_API_KEY` | yes¹ | — | Z.AI API key for `ask`/`review --provider glm` and GLM coder models — <https://z.ai/manage-apikey/apikey-list> |
|
|
258
258
|
| `OPENCODE_API_KEY` | no¹ | — | OpenCode Zen key (opencode engine only) — unlocks `opencode/*` models like `opencode/hy3-free` — <https://opencode.ai/docs/zen/> |
|
|
259
|
-
| `
|
|
259
|
+
| `MOONSHOT_API_KEY` | no¹ | — | Moonshot AI (Kimi) key for `ask`/`review --provider kimi` and `moonshotai/*` coder models — <https://platform.kimi.ai/console/api-keys> |
|
|
260
|
+
| `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/> |
|
|
261
|
+
| `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 |
|
|
262
|
+
| `TRISS_CODER_MODEL` | no | `zai-coding-plan/glm-5.2` | Resolved model, passed to opencode via `--model` (and written to `opencode.json` by `init`). Use `opencode/hy3-free` for OpenCode Zen, `moonshotai/kimi-k2.7-code` for Moonshot, `kimi-for-coding/k3` for the Kimi subscription |
|
|
260
263
|
| `TRISS_CODER_SMALL_MODEL` | no | `zai-coding-plan/glm-5-turbo` | Small/fast model written to `opencode.json`|
|
|
261
|
-
| `TRISS_CODER_OPENCODE_VERSION` | no | `1.
|
|
264
|
+
| `TRISS_CODER_OPENCODE_VERSION` | no | `1.18.7` | Pin override for the `opencode-ai` npm install |
|
|
262
265
|
| `TRISS_CODER_ENGINE` | no | `opencode` | Coding engine: `opencode` (default) or `crush` |
|
|
263
266
|
| `TRISS_CODER_CRUSH_VERSION` | no | `0.1.6` | Pin override for the `@phpcraftdream/crush` npm install (crush engine) |
|
|
264
267
|
| `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) |
|
|
@@ -285,6 +288,16 @@ pay-as-you-go), and a prefix may carry a preset too — `zai/flash` means "the
|
|
|
285
288
|
pay-as-you-go flash model". A bare model id inherits the prefix from
|
|
286
289
|
`TRISS_CODER_MODEL`, then falls back to `zai-coding-plan`.
|
|
287
290
|
|
|
291
|
+
`--provider kimi` (alias `moonshot`) works the same way with
|
|
292
|
+
`MOONSHOT_API_KEY`: `pro` maps to `kimi-k3` (the flagship) and `flash` to
|
|
293
|
+
`kimi-k2.6` (the cheapest current-generation model). Kimi has a single
|
|
294
|
+
OpenAI-compatible endpoint, so model ids are passed bare — there is no
|
|
295
|
+
prefix grammar and no endpoint auto-correction. `TRISS_KIMI_BASE_URL`
|
|
296
|
+
points the route at a different host (e.g. `https://api.moonshot.cn/v1`).
|
|
297
|
+
The Kimi for Coding subscription (`KIMI_API_KEY`) is coder-only — its
|
|
298
|
+
endpoint speaks the Anthropic protocol, which ask/review's OpenAI client
|
|
299
|
+
cannot use.
|
|
300
|
+
|
|
288
301
|
**Endpoint auto-correction.** A Z.AI key carries no marker of which plan it
|
|
289
302
|
belongs to, so an unpinned `zai-coding-plan` route is a guess. When nothing
|
|
290
303
|
pinned the endpoint — no explicit prefix, no `TRISS_CODER_MODEL` — and the
|
|
@@ -301,16 +314,22 @@ preset models.
|
|
|
301
314
|
¹ **Credentials are provider-specific.** A run needs the one key its
|
|
302
315
|
resolved model requires: `zai-coding-plan/*` and `zai/*` (GLM) need
|
|
303
316
|
`ZHIPU_API_KEY`; `opencode/*` OpenCode Zen models (e.g. the free
|
|
304
|
-
`opencode/hy3-free`) need `OPENCODE_API_KEY
|
|
317
|
+
`opencode/hy3-free`) need `OPENCODE_API_KEY`; `moonshotai/*` and
|
|
318
|
+
`moonshotai-cn/*` Kimi models need `MOONSHOT_API_KEY`; `kimi-for-coding/*`
|
|
319
|
+
subscription models need `KIMI_API_KEY`. So `ZHIPU_API_KEY` is
|
|
305
320
|
"required" only in the sense that it is the default provider's key — a
|
|
306
|
-
zen-only setup runs on `OPENCODE_API_KEY` alone
|
|
321
|
+
zen-only setup runs on `OPENCODE_API_KEY` alone, a Kimi-only setup on its
|
|
322
|
+
Kimi key alone. `triss coder run` forwards
|
|
307
323
|
whichever key the model needs to the engine subprocess and gates on it
|
|
308
324
|
before spawning. The `crush` engine speaks Z.AI only and always needs
|
|
309
|
-
`ZHIPU_API_KEY`. `triss status` / `triss_coder_status` show
|
|
310
|
-
the coder MCP tools surface once **
|
|
311
|
-
`triss coder init --provider opencode-zen`
|
|
312
|
-
|
|
313
|
-
|
|
325
|
+
`ZHIPU_API_KEY`. `triss status` / `triss_coder_status` show all provider
|
|
326
|
+
keys, and the coder MCP tools surface once **any** is set. Run
|
|
327
|
+
`triss coder init --provider opencode-zen` (or `--provider moonshot` /
|
|
328
|
+
`--provider kimi-for-coding`) to set up a non-GLM model interactively
|
|
329
|
+
(key + `opencode.json`); Zen details are in
|
|
330
|
+
[opencode-zen.md](opencode-zen.md). The two Kimi providers need no
|
|
331
|
+
endpoint probe: their plans use different keys, so the provider choice
|
|
332
|
+
already names the endpoint.
|
|
314
333
|
|
|
315
334
|
**Engines.** `opencode` (default) enforces a deny-first per-command bash
|
|
316
335
|
allowlist via `opencode.json` (curated safe commands only) that actually
|
|
@@ -405,10 +424,16 @@ canonical `zai/<model>` id and ship with Z.AI's published list prices for the
|
|
|
405
424
|
models both endpoints advertise (`glm-4.5`, `glm-4.5-air`, `glm-4.6`,
|
|
406
425
|
`glm-4.7`, `glm-5`, `glm-5-turbo`, `glm-5.1`, `glm-5.2`), so a PAYG cost is
|
|
407
426
|
reported, not guessed. Override any of them the same way — `zai/glm-5.2` maps
|
|
408
|
-
to `TRISS_PRICE_ZAI_GLM_5_2`.
|
|
427
|
+
to `TRISS_PRICE_ZAI_GLM_5_2`. Kimi PAYG models ship with Moonshot's list
|
|
428
|
+
prices (`kimi-k3`, `kimi-k2.7-code`, `kimi-k2.7-code-highspeed`,
|
|
429
|
+
`kimi-k2.6`), matched whether the id is logged bare (ask/review) or with
|
|
430
|
+
opencode's `moonshotai/` / `moonshotai-cn/` prefix (coder runs) — and a
|
|
431
|
+
`TRISS_PRICE_<MODEL_ID>` override keyed on the bare id
|
|
432
|
+
(`TRISS_PRICE_KIMI_K3`) covers both forms the same way.
|
|
433
|
+
Subscription calls — `zai-coding-plan/*` and `kimi-for-coding/*` — stay
|
|
409
434
|
`$0` because the plan meters by quota rather than tokens. Any model outside
|
|
410
|
-
|
|
411
|
-
is explicitly unknown until you set its matching `TRISS_PRICE_<MODEL_ID>`
|
|
435
|
+
those catalogues — a newly released GLM/Kimi id, `opencode/*` OpenCode Zen
|
|
436
|
+
models — is explicitly unknown until you set its matching `TRISS_PRICE_<MODEL_ID>`
|
|
412
437
|
override. Usage JSONL keeps `cost_usd` numeric for
|
|
413
438
|
compatibility and marks these records with `cost_usd_known: false`; existing
|
|
414
439
|
historical records are not relabelled.
|
package/docs/glm-clients.md
CHANGED
|
@@ -39,7 +39,9 @@ see §3). It **drives a local agent binary** and parses the one JSON
|
|
|
39
39
|
envelope that binary prints. There are two such binaries ("engines"), both
|
|
40
40
|
behind the same adapter interface. crush is always fed `ZHIPU_API_KEY`
|
|
41
41
|
(bridged to `ZAI_API_KEY`); opencode is fed whichever key its resolved model
|
|
42
|
-
needs — `ZHIPU_API_KEY` for GLM, `OPENCODE_API_KEY` for OpenCode Zen (§3)
|
|
42
|
+
needs — `ZHIPU_API_KEY` for GLM, `OPENCODE_API_KEY` for OpenCode Zen (§3),
|
|
43
|
+
`MOONSHOT_API_KEY` for `moonshotai/*` Kimi, `KIMI_API_KEY` for
|
|
44
|
+
`kimi-for-coding/*`.
|
|
43
45
|
|
|
44
46
|
---
|
|
45
47
|
|
|
@@ -48,11 +50,11 @@ needs — `ZHIPU_API_KEY` for GLM, `OPENCODE_API_KEY` for OpenCode Zen (§3).
|
|
|
48
50
|
| | **opencode** (engine #1, default) | **crush** (engine #2) |
|
|
49
51
|
|---|---|---|
|
|
50
52
|
| Select via | default, or `--engine opencode` | `--engine crush` / `TRISS_CODER_ENGINE=crush` |
|
|
51
|
-
| npm package | `opencode-ai` (pinned `1.
|
|
53
|
+
| npm package | `opencode-ai` (pinned `1.18.7`) | `@phpcraftdream/crush` (pinned `0.1.6`) |
|
|
52
54
|
| Version pin env | `TRISS_CODER_OPENCODE_VERSION` | `TRISS_CODER_CRUSH_VERSION` |
|
|
53
|
-
| Key it reads | `ZHIPU_API_KEY` (native); `OPENCODE_API_KEY` for `opencode/…` Zen models | `ZAI_API_KEY` (Triss bridges from `ZHIPU_API_KEY`; crush ≥0.1.1 also reads `ZHIPU_API_KEY` natively) |
|
|
54
|
-
| Providers | Z.AI GLM (`zai-coding-plan/…`, `zai/…`)
|
|
55
|
-
| Provider config | `opencode.json` with a `zai-coding-plan/…` (or `zai/…`) model prefix; Zen models resolve via opencode's built-in `opencode`
|
|
55
|
+
| Key it reads | `ZHIPU_API_KEY` (native); `OPENCODE_API_KEY` for `opencode/…` Zen models; `MOONSHOT_API_KEY` for `moonshotai/…`; `KIMI_API_KEY` for `kimi-for-coding/…` | `ZAI_API_KEY` (Triss bridges from `ZHIPU_API_KEY`; crush ≥0.1.1 also reads `ZHIPU_API_KEY` natively) |
|
|
56
|
+
| Providers | Z.AI GLM (`zai-coding-plan/…`, `zai/…`), OpenCode Zen (`opencode/…`, e.g. `opencode/hy3-free`), **and** Moonshot Kimi (`moonshotai/…` PAYG, `kimi-for-coding/…` subscription — see README's Providers section) | Z.AI GLM only |
|
|
57
|
+
| Provider config | `opencode.json` with a `zai-coding-plan/…` (or `zai/…`) model prefix; Zen/Kimi models resolve via opencode's built-in `opencode` / `moonshotai` / `kimi-for-coding` providers | `crush.json` `models` block (atoms `glm5_2` / `glm5_turbo`) |
|
|
56
58
|
| Output | ndjson stream that Triss folds into one envelope | ONE JSON object at end-of-run — trivial last-line parse |
|
|
57
59
|
| Sessions | slug → real `ses_…` id mapped in `.triss/sessions.json` | native get-or-create with the caller's arbitrary id — no map |
|
|
58
60
|
| Safety model | **deny-first bash allowlist** in `opencode.json` (persistent, enforced) | config `permissions.run` seeded into `crush.json` for forward-compat, but **currently inert** — enforcement is opt-in via `--restrict`, which emits the allowlist as **CLI flags** (`--allow-bash`/`--allow-tool`). See §8 |
|
|
@@ -279,7 +281,7 @@ Read `files_changed` + `diff_stat` + `worktree` to know what to review.
|
|
|
279
281
|
| `TRISS_CODER_ENGINE` | no | Default engine: `opencode` (default) or `crush`. |
|
|
280
282
|
| `TRISS_CODER_MODEL` | no | Override main model, e.g. `zai-coding-plan/glm-5.2` (verbatim, prefix included). |
|
|
281
283
|
| `TRISS_CODER_SMALL_MODEL` | no | Override small/fast model, e.g. `zai-coding-plan/glm-5-turbo`. |
|
|
282
|
-
| `TRISS_CODER_OPENCODE_VERSION` | no | Pin a different `opencode-ai` npm version (default `1.
|
|
284
|
+
| `TRISS_CODER_OPENCODE_VERSION` | no | Pin a different `opencode-ai` npm version (default `1.18.7`). |
|
|
283
285
|
| `TRISS_CODER_CRUSH_VERSION` | no | Pin a different `@phpcraftdream/crush` version (default `0.1.6`). |
|
|
284
286
|
| `TRISS_CODER_CRUSH_RESTRICT` | no | crush only: `1` opts INTO the allowlist (emits `--restrict-run` plus the `--allow-bash`/`--allow-tool` CLI flags — the only enforcement path that works today); unset/`0` leaves crush unrestricted (the default, paired with isolate-ON). Overridden per-run by `--restrict`/`--no-restrict`. |
|
|
285
287
|
|
package/docs/mcp.md
CHANGED
|
@@ -190,12 +190,14 @@ agent (or `claude /mcp`) lists tools, the new ones show up without
|
|
|
190
190
|
restarting Claude Code. Replacing or removing an integration credential that
|
|
191
191
|
is already loaded still requires restarting that MCP process.
|
|
192
192
|
|
|
193
|
-
GLM calls have a narrower per-call refresh path: `triss_ask` and
|
|
193
|
+
GLM and Kimi calls have a narrower per-call refresh path: `triss_ask` and
|
|
194
194
|
`triss_review` with `provider: "glm"` re-read file-backed
|
|
195
|
-
`TRISS_CODER_MODEL` and `ZHIPU_API_KEY` before each call
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
`TRISS_CODER_MODEL` and `ZHIPU_API_KEY` before each call, and with
|
|
196
|
+
`provider: "kimi"` re-read `MOONSHOT_API_KEY` and `TRISS_KIMI_BASE_URL`.
|
|
197
|
+
Edits and removals take effect without restarting the MCP server, except
|
|
198
|
+
that values supplied by the parent environment continue to win. This does
|
|
199
|
+
not change the existing `tools/list` refresh behaviour for other
|
|
200
|
+
integrations.
|
|
199
201
|
|
|
200
202
|
## What tools are exposed
|
|
201
203
|
|
|
@@ -208,17 +210,19 @@ Core tools are always listed. Model calls default to the worker and require
|
|
|
208
210
|
- `triss_chat` — bare prompt to the worker model
|
|
209
211
|
- `triss_ask` — read files/URLs and answer a question; accepts an optional
|
|
210
212
|
`provider` field: `worker` (default), `deepseek` (an alias for `worker`),
|
|
211
|
-
or `
|
|
213
|
+
`glm`, or `kimi` (`moonshot` is an alias)
|
|
212
214
|
- `triss_fetch` — fetch URL(s) as markdown, optional summary
|
|
213
215
|
- `triss_review` — code review on current branch or a GitHub PR; accepts the
|
|
214
216
|
same optional `provider` field as `triss_ask`
|
|
215
217
|
- `triss_commit_msg` — generate a Conventional Commits message from staged diff
|
|
216
218
|
- `triss_write` — generate boilerplate from a spec; with `target` writes the file (path-sandboxed), without `target` returns the content
|
|
217
219
|
- `triss_status` — current configuration and integration readiness, including a
|
|
218
|
-
GLM block
|
|
219
|
-
call resolves to, what selected it, and the preset models
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
GLM block — whether `ZHIPU_API_KEY` is set, the endpoint a `provider: "glm"`
|
|
221
|
+
call resolves to, what selected it, and the preset models — and a Kimi block
|
|
222
|
+
(`MOONSHOT_API_KEY` presence, the resolved endpoint, presets). A GLM- or
|
|
223
|
+
Kimi-only server has no worker key, so the worker rows say `(missing)` while
|
|
224
|
+
those provider calls work — the routes are labelled separately for that
|
|
225
|
+
reason.
|
|
222
226
|
|
|
223
227
|
For `triss_ask` and `triss_review`, `provider: "glm"` requires
|
|
224
228
|
`ZHIPU_API_KEY` rather than `TRISS_WORKER_API_KEY`. `pro` selects `glm-5.2` on
|
|
@@ -232,6 +236,16 @@ a preset, so `zai/flash` is valid. When neither the request nor
|
|
|
232
236
|
whichever one works for the rest of the process (re-probed if the key
|
|
233
237
|
changes). A pinned endpoint is never second-guessed.
|
|
234
238
|
|
|
239
|
+
For `provider: "kimi"`, `MOONSHOT_API_KEY` is required instead. `pro` selects
|
|
240
|
+
`kimi-k3` (the flagship) and `flash` selects `kimi-k2.6` (the cheapest
|
|
241
|
+
current-generation model). There is a single OpenAI-compatible endpoint
|
|
242
|
+
(`https://api.moonshot.ai/v1`; override with `TRISS_KIMI_BASE_URL`, e.g. for
|
|
243
|
+
the China-mainland `api.moonshot.cn`), so model ids are passed bare — no
|
|
244
|
+
prefix grammar and no endpoint auto-correction to reason about. The Kimi for
|
|
245
|
+
Coding subscription is not usable here: its endpoint speaks the Anthropic
|
|
246
|
+
protocol, which these tools' OpenAI client cannot speak — it works through
|
|
247
|
+
`triss_coder_run` instead.
|
|
248
|
+
|
|
235
249
|
Exposed **only when ATLASSIAN_BASE_URL/EMAIL/API_TOKEN are all set**
|
|
236
250
|
(both Jira and Confluence reuse the same Atlassian credentials):
|
|
237
251
|
|
|
@@ -298,9 +312,11 @@ override for self-hosted instances):
|
|
|
298
312
|
`triss_gitlab_update` `triss_gitlab_comment`
|
|
299
313
|
|
|
300
314
|
Exposed **when a provider credential is set** — `ZHIPU_API_KEY` (Z.AI GLM,
|
|
301
|
-
the default)
|
|
302
|
-
[opencode-zen.md](opencode-zen.md))
|
|
303
|
-
|
|
315
|
+
the default), `OPENCODE_API_KEY` (OpenCode Zen — see
|
|
316
|
+
[opencode-zen.md](opencode-zen.md)), `MOONSHOT_API_KEY` (Moonshot Kimi
|
|
317
|
+
pay-as-you-go), **or** `KIMI_API_KEY` (Kimi for Coding subscription).
|
|
318
|
+
Setup: `triss coder init` (`--provider opencode-zen`, `--provider moonshot`,
|
|
319
|
+
or `--provider kimi-for-coding`) or `triss config wizard coder`.
|
|
304
320
|
|
|
305
321
|
- `triss_coder_run` — delegate an implementation task to a coding
|
|
306
322
|
agent (default `opencode` engine; `engine: "crush"` selects the crush
|
|
@@ -315,13 +331,16 @@ the default) **or** `OPENCODE_API_KEY` (OpenCode Zen — see
|
|
|
315
331
|
isolate-OFF, crush resolves unset to isolate-ON (crush 0.1.3's
|
|
316
332
|
`permissions.run` config is inert and denied bash deadlocks, so the
|
|
317
333
|
worktree is its reliable safety layer). `model` takes a `<provider>/<id>`
|
|
318
|
-
string — a Z.AI GLM (`zai-coding-plan/glm-5.2`)
|
|
319
|
-
(`opencode/hy3-free`,
|
|
320
|
-
|
|
334
|
+
string — a Z.AI GLM (`zai-coding-plan/glm-5.2`), an OpenCode Zen model
|
|
335
|
+
(`opencode/hy3-free`, needs `OPENCODE_API_KEY`), a Moonshot Kimi model
|
|
336
|
+
(`moonshotai/kimi-k2.7-code`, needs `MOONSHOT_API_KEY`), or a Kimi for
|
|
337
|
+
Coding model (`kimi-for-coding/k3`, needs `KIMI_API_KEY`); triss forwards
|
|
338
|
+
only the key that model's provider requires.
|
|
321
339
|
- `triss_coder_status` — the default engine, each engine's version/install
|
|
322
340
|
state (`opencode` vs the pinned version, `crush` presence), which
|
|
323
|
-
`opencode.json` / `crush.json` files exist,
|
|
324
|
-
`
|
|
341
|
+
`opencode.json` / `crush.json` files exist, provider key presence
|
|
342
|
+
(`ZHIPU_API_KEY` / `OPENCODE_API_KEY` / `MOONSHOT_API_KEY` /
|
|
343
|
+
`KIMI_API_KEY` — never the value), and how many isolation
|
|
325
344
|
worktrees are live.
|
|
326
345
|
|
|
327
346
|
**Timeout defaults to 1500s (25 min) over MCP**, above the CLI's 900s,
|
|
@@ -399,7 +418,8 @@ fresh `triss mcp install` requires a session restart to take effect.
|
|
|
399
418
|
**"Triss listed but a model call fails"** — `triss status` to check the
|
|
400
419
|
provider's API key. Core tools are always listed: their default `worker`
|
|
401
420
|
route needs `TRISS_WORKER_API_KEY`, while `triss_ask` and `triss_review` with
|
|
402
|
-
`provider: "glm"` need `ZHIPU_API_KEY
|
|
421
|
+
`provider: "glm"` need `ZHIPU_API_KEY` and with `provider: "kimi"` need
|
|
422
|
+
`MOONSHOT_API_KEY`.
|
|
403
423
|
|
|
404
424
|
**"Jira tools missing in this project"** — Triss couldn't find the
|
|
405
425
|
ATLASSIAN_* triple. Either your global `~/.config/triss/.env` has them
|
|
@@ -443,12 +463,15 @@ invocation.
|
|
|
443
463
|
|
|
444
464
|
GLM records keep the endpoint the call actually used (`zai-coding-plan/` or
|
|
445
465
|
`zai/`) — including after an endpoint auto-correction, so a retried call is
|
|
446
|
-
billed to the endpoint that served it. Subscription calls
|
|
447
|
-
`$0` accounting (the plan meters by
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
466
|
+
billed to the endpoint that served it. Subscription calls (Z.AI Coding Plan,
|
|
467
|
+
`kimi-for-coding/*`) retain the known `$0` accounting (the plan meters by
|
|
468
|
+
quota), and PAYG calls carry the providers' published list prices for the
|
|
469
|
+
catalogue models — Kimi ids are priced whether logged bare (`kimi-k3`, from
|
|
470
|
+
ask/review) or with opencode's prefix (`moonshotai/kimi-k3`, from coder
|
|
471
|
+
runs). Anything still unpriced — a GLM id outside that catalogue,
|
|
472
|
+
`opencode/*` OpenCode Zen — keeps numeric `cost_usd: 0` for JSONL
|
|
473
|
+
compatibility, adds `cost_usd_known: false`, and is displayed by
|
|
474
|
+
`triss usage` as `unknown`, not as free. Set the matching
|
|
452
475
|
`TRISS_PRICE_<MODEL_ID>` override to account for one.
|
|
453
476
|
|
|
454
477
|
To attribute all calls from one MCP server process to a single outer
|