triss-coworker 0.42.0 → 0.44.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/ARCHITECTURE.md +5 -0
- package/CHANGELOG.md +183 -1
- package/README.md +134 -34
- package/bin/triss.js +27 -15
- package/docs/adr/2026-09-05-user-choice-and-easy-setup.md +98 -0
- package/docs/adr/README.md +5 -0
- package/docs/cli-reference.md +63 -0
- package/docs/compatibility.md +6 -0
- package/docs/configuration.md +76 -4
- package/docs/data-flows.md +1 -1
- package/docs/engines/crush.md +38 -4
- package/docs/engines/index.md +2 -2
- package/docs/engines/omp.md +8 -0
- package/docs/engines/opencode-go.md +56 -1
- package/docs/engines/opencode2.md +37 -1
- package/docs/getting-started.md +131 -10
- package/docs/mcp.md +83 -6
- package/docs/reliable-delegation-contract.md +17 -4
- package/docs/security-model.md +64 -0
- package/docs/usage-accounting.md +3 -0
- package/package.json +14 -9
- package/src/coder-credential-proxy.js +418 -9
- package/src/coder-engines/crush.js +96 -58
- package/src/coder-engines/omp.js +15 -7
- package/src/coder-engines/opencode2.js +60 -15
- package/src/coder-providers.js +110 -94
- package/src/commands/ask.js +18 -1
- package/src/commands/chat.js +3 -1
- package/src/commands/coder.js +912 -309
- package/src/commands/commit-msg.js +3 -1
- package/src/commands/config.js +33 -428
- package/src/commands/exec.js +13 -3
- package/src/commands/fetch.js +1 -0
- package/src/commands/init.js +26 -12
- package/src/commands/review.js +5 -1
- package/src/commands/status.js +49 -8
- package/src/commands/write.js +3 -1
- package/src/integrations/_contract.js +14 -1
- package/src/integrations/_registry.js +5 -0
- package/src/integrations/confluence/commands.js +7 -5
- package/src/integrations/github/commands.js +8 -9
- package/src/integrations/gitlab/commands.js +8 -9
- package/src/integrations/jira/commands.js +10 -10
- package/src/integrations/linear/commands.js +10 -10
- package/src/mcp/handlers.js +71 -36
- package/src/mcp/server.js +16 -6
- package/src/mcp/tools.js +46 -17
- package/src/migration/migrate.js +40 -0
- package/src/model-engine-adapters.js +41 -3
- package/src/model-projection-policy.js +131 -0
- package/src/model-runtime.js +20 -0
- package/src/model-selection.js +67 -9
- package/src/opencode2-preflight.js +3 -3
- package/src/paths.js +4 -0
- package/src/provider-config.js +11 -1
- package/src/provider-contract.js +23 -1
- package/src/provider-model-transport.js +290 -0
- package/src/provider-registry.js +7 -0
- package/src/secrets.js +205 -2
- package/src/setup/configuration.js +1052 -0
- package/src/setup/engines.js +637 -0
- package/src/setup/plan.js +589 -0
- package/src/setup/readiness.js +102 -0
- package/src/setup/wizard.js +1112 -0
- package/src/transport-registry.js +8 -1
- package/src/transports/openai-chat.js +2 -1
- package/src/transports/openai-responses.js +14 -1
- package/src/transports/result.js +5 -0
- package/templates/claude-full.md +41 -32
- package/templates/claude.md +21 -13
- package/templates/codex-full.md +24 -15
- package/templates/codex.md +21 -15
package/ARCHITECTURE.md
CHANGED
|
@@ -36,3 +36,8 @@ behavior change. Priority candidates are coder orchestration, model management,
|
|
|
36
36
|
updater installation, MCP installation, and MCP handlers.
|
|
37
37
|
|
|
38
38
|
Architecture decisions that change trust boundaries belong in `docs/adr/`.
|
|
39
|
+
|
|
40
|
+
The accepted owner decision on
|
|
41
|
+
[user choice, best-effort execution, and easy setup](docs/adr/2026-09-05-user-choice-and-easy-setup.md)
|
|
42
|
+
governs provider/engine availability and wizard design. Existing runtime gates
|
|
43
|
+
are not product requirements when they conflict with that decision.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,187 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- All execution engines now run non-coder model projections (`ask`, `review`,
|
|
13
|
+
`chat`, `write`, `commit-msg`): `opencode` keeps its verified read-only
|
|
14
|
+
projection; `opencode2`, `omp`, and `crush` execute best-effort and attach a
|
|
15
|
+
warning naming the concrete limitation that is not verified, instead of
|
|
16
|
+
rejecting the run before launch.
|
|
17
|
+
- `triss config wizard` now opens the Easy path directly (provider + key,
|
|
18
|
+
assistant hosts, summary, first command) and preserves existing explicit
|
|
19
|
+
choices on rerun. `--advanced` exposes the full sections; an optional target
|
|
20
|
+
argument accepts a canonical provider id, `coder`, or an integration name;
|
|
21
|
+
`--yes`, `--agent`, and `--install` support headless apply; `triss init
|
|
22
|
+
--setup` delegates to the same wizard after writing agent rules.
|
|
23
|
+
- New persisted fields: `TRISS_CODER_PROVIDER`, `TRISS_DEFAULT_EFFORT`,
|
|
24
|
+
`TRISS_CODER_EFFORT`, `TRISS_PROTECT_CREDENTIALS`, and
|
|
25
|
+
`TRISS_CODER_PROTECT_CREDENTIALS` (credential protection is a tri-state:
|
|
26
|
+
absent, true, or false — the string `"false"` is never a truthy opt-in) and
|
|
27
|
+
`TRISS_MODEL_TRANSPORTS` (exact-model direct transport override map).
|
|
28
|
+
- The `direct` engine now serves `opencode-zen` and `opencode-go` models
|
|
29
|
+
through audited per-model transports (OpenAI Chat, OpenAI Responses,
|
|
30
|
+
Anthropic Messages); a model without resolvable direct metadata fails with
|
|
31
|
+
the stable `TRISS_DIRECT_ENGINE_REQUIRED` code and an actionable
|
|
32
|
+
`TRISS_MODEL_TRANSPORTS` remedy instead of a generic registry error.
|
|
33
|
+
- `--protect-credentials` / `--no-protect-credentials` on model-backed
|
|
34
|
+
commands: the former requests the parent-owned proxy and falls back to a
|
|
35
|
+
warned best-effort raw run when a protected route is unavailable; the latter
|
|
36
|
+
overrides a persisted protection choice for one run. MCP forwards
|
|
37
|
+
`protect_credentials` as the same tri-state.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Crush is provider-neutral: any canonical provider projects onto a run-scoped
|
|
42
|
+
config with `$ENV` credential references. Protected mode remains the crush
|
|
43
|
+
default; an explicit `--no-protect-credentials` runs crush raw through the
|
|
44
|
+
same run-scoped config as a disclosed best-effort choice. Responses-protocol
|
|
45
|
+
models ride a bounded chat→responses bridge in the credential proxy
|
|
46
|
+
(message-only; tool rounds are refused with a precise error).
|
|
47
|
+
- `triss ask`, `triss review`, and other model-backed commands no longer
|
|
48
|
+
require engine-specific provider restrictions: provider and engine are
|
|
49
|
+
independent choices, honored as selected with truthful warnings for
|
|
50
|
+
best-effort routes.
|
|
51
|
+
- The setup wizard no longer resets an existing provider/engine selection or
|
|
52
|
+
installs a Claude MCP server implicitly; Easy and Advanced share one setup
|
|
53
|
+
and resolution path.
|
|
54
|
+
|
|
55
|
+
## [0.44.0] — 2026-09-08
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- `triss config wizard` opens the Easy path directly: pick any canonical
|
|
60
|
+
provider, paste its key, choose which assistant host to connect (Claude
|
|
61
|
+
Code, Codex, both, or skip host wiring), review the summary before apply,
|
|
62
|
+
and finish with a first command to try. Reruns reuse the existing
|
|
63
|
+
configuration instead of resetting it.
|
|
64
|
+
- `triss config wizard --advanced` exposes the full tuning sections —
|
|
65
|
+
providers, execution (engine, effort, tri-state credential protection),
|
|
66
|
+
connections (MCP and agent rules selectable independently), integrations
|
|
67
|
+
(keep/unset with effective-source display), runtime (including pricing),
|
|
68
|
+
and in-place engine version pins.
|
|
69
|
+
- Targeted wizard setups configure one piece:
|
|
70
|
+
`triss config wizard <provider-id>`, `triss config wizard coder` (with
|
|
71
|
+
`--coder-provider`, `--coder-engine`, `--coder-protect-credentials`), or an
|
|
72
|
+
integration name.
|
|
73
|
+
- Headless apply: `triss config wizard --yes --agent none [--install]`
|
|
74
|
+
assembles a complete configuration from existing files, the environment,
|
|
75
|
+
and explicit flags; missing requirements exit non-zero before writing.
|
|
76
|
+
`triss init --setup` delegates to the same wizard after writing agent
|
|
77
|
+
rules.
|
|
78
|
+
- Every execution engine now serves every canonical provider: crush runs any
|
|
79
|
+
provider through a run-scoped config with `$ENV` credential references
|
|
80
|
+
(provider block seeded before `crush models use`), and opencode2, omp, and
|
|
81
|
+
crush execute non-coder projections (`ask`, `review`, `chat`, `write`,
|
|
82
|
+
`commit-msg`) best-effort with structured warnings naming the unverified
|
|
83
|
+
limitation.
|
|
84
|
+
- `--protect-credentials` / `--no-protect-credentials` on model-backed
|
|
85
|
+
commands; MCP forwards `protect_credentials` as the same tri-state and
|
|
86
|
+
carries credential mode and disclosures in the run envelope.
|
|
87
|
+
- `TRISS_CODER_EFFORT` and `TRISS_DEFAULT_EFFORT` knobs, honored by every
|
|
88
|
+
engine (crush discloses when a provider declares no effort support).
|
|
89
|
+
|
|
90
|
+
### Changed
|
|
91
|
+
|
|
92
|
+
- Credential protection is a verbatim tri-state (absent/true/false) across
|
|
93
|
+
the CLI, MCP, and persisted configuration: `TRISS_PROTECT_CREDENTIALS` and
|
|
94
|
+
`TRISS_CODER_PROTECT_CREDENTIALS` persist explicit choices, and an explicit
|
|
95
|
+
false overrides a persisted true.
|
|
96
|
+
- The setup wizard no longer resets an existing provider/engine selection or
|
|
97
|
+
installs a Claude MCP server implicitly; Easy and Advanced share one setup
|
|
98
|
+
and resolution path, integrations gate readiness only when selected, and
|
|
99
|
+
readiness is re-derived from post-apply state.
|
|
100
|
+
- Engine installers run with a minimal environment allowlist (provider and
|
|
101
|
+
integration tokens never reach npm lifecycle scripts or downloaded
|
|
102
|
+
installers), curl|sh installers run as two argv spawns instead of a shell
|
|
103
|
+
string, and the exact install command is shown before Apply.
|
|
104
|
+
- Env-file writes are atomic (0600 temp file + rename after the CAS check);
|
|
105
|
+
host-plan status is tracked per concrete target; `config set` validates
|
|
106
|
+
provider and engine values; `triss status` reads `TRISS_CODER_ENGINE`
|
|
107
|
+
through the layered setup state.
|
|
108
|
+
- Migration gates the wizard on a `blocked` preflight state instead of
|
|
109
|
+
writing schema-2 over a conflict.
|
|
110
|
+
|
|
111
|
+
### Fixed
|
|
112
|
+
|
|
113
|
+
- A debug path in the wizard's readiness diagnostics could print full
|
|
114
|
+
credentials to stderr; it is removed and privacy tests now guard the
|
|
115
|
+
route, the preserved value, and both former exposure points.
|
|
116
|
+
- MCP `protect_credentials: false` was indistinguishable from absent and
|
|
117
|
+
could not override a persisted true.
|
|
118
|
+
- OMP runs discarded usage/cost records; the coder transport protocol now
|
|
119
|
+
resolves from the same captured snapshot as the model, and child stderr
|
|
120
|
+
echoed in errors is masked.
|
|
121
|
+
- `triss init --setup` works in non-TTY shells (`--yes` registered).
|
|
122
|
+
- Root-endpoint provider URLs no longer gain a silent `/v1` in protected
|
|
123
|
+
runs; unverified cleanup no longer fails closed on a recycled pgid.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Artifact integrity (0.44.0)
|
|
127
|
+
|
|
128
|
+
- `triss-dsh-provider-bundle-0.44.0.tgz` — sha256
|
|
129
|
+
`c2e8ce70bb5964cdbcc16a42c574b6f85c142c36d905d066e042c0150f50b935`
|
|
130
|
+
— `sha512-l8rIL6i7vgukA7efR8Q2PvG8YBnAVRdnlWL338FgZmNt9r+/Efz8OgujnkFb39KLK1qe/sdHY+HntvcLZ9GrQw==`
|
|
131
|
+
(computed with npm pack; the output is byte-deterministic).
|
|
132
|
+
- Root `triss-coworker-0.44.0.tgz` sha256 is reproducible via `npm pack` at
|
|
133
|
+
tag `v0.44.0`; the root tarball ships `CHANGELOG.md`, so its hash cannot be
|
|
134
|
+
recorded inside this file. Registry verification compares the packed
|
|
135
|
+
artifact with the published tarball byte-for-byte.
|
|
136
|
+
|
|
137
|
+
## [0.43.0] — 2026-09-05
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- Website repositioned around managed delegation for AI development: a new
|
|
142
|
+
homepage with a real, recorded, manually verified research example, workflow
|
|
143
|
+
guides for research, review, and bounded implementation
|
|
144
|
+
(`/workflows/`), a shorter agent-aware quickstart, consistent secondary
|
|
145
|
+
pages, and a reproducibly generated social card. The inference-cost
|
|
146
|
+
calculator, its formulas, and its methodology remain unchanged on `/cost/`.
|
|
147
|
+
- GitHub/npm-facing documentation and package metadata now describe managed
|
|
148
|
+
delegation consistently. The README leads with research, review, and bounded
|
|
149
|
+
implementation, followed by host-aware setup and result-inspection guidance.
|
|
150
|
+
Packaged quickstart and agent instructions use the same positioning without
|
|
151
|
+
guaranteed savings or a mandatory model brand. The documented Node.js minimum
|
|
152
|
+
is 22.12.0, matching the root package.
|
|
153
|
+
- `triss-dsh-provider-bundle` is version-aligned at 0.43.0; its catalogue
|
|
154
|
+
routes are unchanged.
|
|
155
|
+
|
|
156
|
+
### Fixed
|
|
157
|
+
|
|
158
|
+
- Website rendering no longer waits on a separate shared stylesheet request.
|
|
159
|
+
Optional font display prevents late font swaps from moving visible text;
|
|
160
|
+
slow first loads may retain the system fallback for that page view.
|
|
161
|
+
|
|
162
|
+
- OpenCode 2 now qualifies the published beta CLI against its current
|
|
163
|
+
`0.0.0-beta-19059` floor and required option declarations, accepting every
|
|
164
|
+
newer compatible version without pinning a build or help-description
|
|
165
|
+
sentence. `provider/model#variant` remains the runtime transport for explicit
|
|
166
|
+
effort, but help prose is not a compatibility gate. Capability errors now
|
|
167
|
+
name missing options separately from below-minimum versions. Pre-suffixed
|
|
168
|
+
public/configured OpenCode 2 models are rejected before engine side effects.
|
|
169
|
+
- Added `TRISS_DEFAULT_ENGINE` so model-backed commands can persist a direct or verified OpenCode route. OpenCode projections install and verify an active primary agent pinned as `default_agent`; its deny-by-default context-only policy provides no ambient file, delegation, skill, or executable tools, and the final merged agent state is audited before credentials are forwarded. Engine warnings remain structured across MCP model tools, and explicit credential protection is available on every engine.
|
|
170
|
+
- `triss_coder_run` retains the documented `protectCredentials` MCP spelling
|
|
171
|
+
as a deprecated compatibility alias. It is OR-merged with
|
|
172
|
+
`protect_credentials`, so either truthy spelling selects protected
|
|
173
|
+
credential handling; new clients should use `protect_credentials`.
|
|
174
|
+
- OpenCode Go and Zen coder transports now retain an OpenCode-prefixed
|
|
175
|
+
transient provider identity, selecting native OpenCode V1 request semantics.
|
|
176
|
+
The protected credential proxy preserves only bounded correlation headers,
|
|
177
|
+
specific user agent, and validated retry response metadata upstream while
|
|
178
|
+
dropping the repository fingerprint.
|
|
179
|
+
|
|
180
|
+
### Artifact integrity (0.43.0)
|
|
181
|
+
|
|
182
|
+
- `triss-dsh-provider-bundle-0.43.0.tgz` — sha256
|
|
183
|
+
`7c40016a7fe9eea6ffc0c494b90622cf9429d9fced5f33471e0f9519f17452be`
|
|
184
|
+
— `sha512-eP6Y88SKX7vvY6FWbYTzBfNHSn5FNgjZ3ZPWETQWToefkABS1pyJNEgH063AgPt5MNVy0S6/LwG07exVaOpJLQ==`
|
|
185
|
+
(computed with npm pack; the output is byte-deterministic).
|
|
186
|
+
- Root `triss-coworker-0.43.0.tgz` sha256 is reproducible via `npm pack` at
|
|
187
|
+
tag `v0.43.0`; the root tarball ships `CHANGELOG.md`, so its hash cannot be
|
|
188
|
+
recorded inside this file. Registry verification compares the packed
|
|
189
|
+
artifact with the published tarball byte-for-byte.
|
|
190
|
+
|
|
10
191
|
## [0.42.0] — 2026-08-29
|
|
11
192
|
|
|
12
193
|
### Added
|
|
@@ -1830,7 +2011,8 @@ pre-0.42 release after migration.
|
|
|
1830
2011
|
|
|
1831
2012
|
- Initial release of `triss-coworker`.
|
|
1832
2013
|
|
|
1833
|
-
[Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.
|
|
2014
|
+
[Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.43.0...HEAD
|
|
2015
|
+
[0.43.0]: https://github.com/ayleen/triss-coworker/compare/v0.42.0...v0.43.0
|
|
1834
2016
|
[0.42.0]: https://github.com/ayleen/triss-coworker/compare/v0.41.1...v0.42.0
|
|
1835
2017
|
[0.41.1]: https://github.com/ayleen/triss-coworker/compare/v0.41.0...v0.41.1
|
|
1836
2018
|
[0.41.0]: https://github.com/ayleen/triss-coworker/compare/v0.40.0...v0.41.0
|
package/README.md
CHANGED
|
@@ -5,35 +5,94 @@
|
|
|
5
5
|
[](https://github.com/ayleen/triss-coworker/actions/workflows/test.yml)
|
|
6
6
|
[](https://www.bestpractices.dev/en/projects/14266)
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
|
-
[](LICENSE)
|
|
8
|
+
[](https://github.com/ayleen/triss-coworker/blob/main/LICENSE)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Give your coding agent a coworker.**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Triss is a managed delegation layer for AI development: a local, open-source CLI and MCP server. Delegate codebase research, second reviews, and bounded implementation through one configurable provider runtime. Choose supported providers, models, and coding engines; inspect the result before accepting it.
|
|
13
|
+
|
|
14
|
+
**Website:** [triss.work](https://triss.work/) · **Workflows:** [triss.work/workflows](https://triss.work/workflows/) · **Quickstart:** [triss.work/docs/getting-started](https://triss.work/docs/getting-started/)
|
|
15
|
+
|
|
16
|
+
## When to use Triss
|
|
17
|
+
|
|
18
|
+
| Task | What you delegate | What you inspect |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| [Understand unfamiliar code](https://triss.work/workflows/research/) | Selected files and a focused question | Findings with source references |
|
|
21
|
+
| [Get a second review](https://triss.work/workflows/review/) | A branch, PR, or diff | Concrete findings to verify before changing code |
|
|
22
|
+
| [Delegate a bounded change](https://triss.work/workflows/implementation/) | A complete task, constraints, and checks | Worktree changes, execution results, and checks before accepting |
|
|
23
|
+
|
|
24
|
+
### Why add it to Claude Code or Codex?
|
|
25
|
+
|
|
26
|
+
Keep your primary agent focused on decisions while Triss provides a common CLI/MCP interface for delegated work, provider and engine selection, retained coding results, and usage accounting. It complements your host's tools and subagents rather than replacing them. You can also use the CLI directly without an agent host.
|
|
27
|
+
|
|
28
|
+
Delegation can reduce primary-agent context and inference costs, but savings depend on the selected models and repeated work; they are not guaranteed. A completed run is not proof that its result is correct.
|
|
13
29
|
|
|
14
30
|
## Requirements
|
|
15
31
|
|
|
16
|
-
- Node.js 22 or newer
|
|
32
|
+
- Node.js **22.12.0 or newer**
|
|
17
33
|
- macOS or Linux for `triss coder run`
|
|
18
34
|
- one supported provider credential
|
|
19
35
|
|
|
20
|
-
##
|
|
36
|
+
## Quickstart
|
|
21
37
|
|
|
22
38
|
```bash
|
|
23
39
|
npm install -g triss-coworker
|
|
24
|
-
|
|
25
|
-
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`triss config wizard` opens the Easy path directly: pick a provider, paste its
|
|
43
|
+
key, choose the assistant hosts to register, and run your first command. It
|
|
44
|
+
reuses existing configuration instead of resetting it. `--advanced` exposes the
|
|
45
|
+
full sections (providers, execution, connections, integrations, runtime), and a
|
|
46
|
+
target argument (`triss config wizard opencode-go`, `triss config wizard coder`,
|
|
47
|
+
`triss config wizard jira`) sets up just that piece. Non-interactive shells add
|
|
48
|
+
`--yes` to apply a complete configuration assembled from existing files, the
|
|
49
|
+
environment, and explicit flags:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
triss config wizard --yes --agent none
|
|
26
53
|
```
|
|
27
54
|
|
|
28
55
|
Connect Claude Code, Codex, or both:
|
|
29
56
|
|
|
30
57
|
```bash
|
|
31
|
-
triss init --target claude --global
|
|
58
|
+
triss init --target claude --global --setup # writes rules, then runs the wizard
|
|
32
59
|
triss init --target codex --global
|
|
33
60
|
triss mcp install --target claude --global
|
|
34
61
|
triss mcp install --target codex --global
|
|
35
62
|
```
|
|
36
63
|
|
|
64
|
+
**Terminal only:** configure the same profile without installing host
|
|
65
|
+
integration. Omit values to enter them interactively; secret input is masked:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
triss config set -g TRISS_OPENAI_COMPATIBLE_API_KEY
|
|
69
|
+
triss config set -g TRISS_OPENAI_COMPATIBLE_MODEL
|
|
70
|
+
triss config set -g TRISS_OPENAI_COMPATIBLE_SMALL_MODEL
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Check the credential and selected defaults with `triss status`. Existing provider and engine choices are not changed by these three profile-field commands; use `triss config wizard --advanced` to adjust them if needed.
|
|
74
|
+
|
|
75
|
+
For an installed host, run `triss mcp status` and restart that host's session. There is no need to repeat `triss init` or `triss mcp install` if the wizard already connected it. Terminal users skip this step.
|
|
76
|
+
|
|
77
|
+
From a project containing `README.md`, try one focused task:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
triss ask --paths README.md \
|
|
81
|
+
--question "What does this project do, and which setup steps does its README require? Cite the relevant lines."
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Inspect the answer against the file. Then try the [research](https://triss.work/workflows/research/), [review](https://triss.work/workflows/review/), or [implementation](https://triss.work/workflows/implementation/) workflow.
|
|
85
|
+
|
|
86
|
+
Full setup and manual host-connection commands: [Quickstart](https://triss.work/docs/getting-started/).
|
|
87
|
+
|
|
88
|
+
### What stays under your control
|
|
89
|
+
|
|
90
|
+
- Selected context is sent to your configured model provider; local execution does not mean that code stays on your machine.
|
|
91
|
+
- Coding engines can modify files and run commands. A worktree separates changes; it is **not an OS sandbox**.
|
|
92
|
+
- Review findings, inspect diffs, and run appropriate checks before accepting a result.
|
|
93
|
+
|
|
94
|
+
Read the [security guide](https://triss.work/security/) before using confidential repositories.
|
|
95
|
+
|
|
37
96
|
## Upgrading from Triss < 0.42.0
|
|
38
97
|
|
|
39
98
|
Triss 0.42 replaces the old model configuration with unified provider profiles. After installing the update and before running model commands:
|
|
@@ -64,12 +123,12 @@ Every provider has an endpoint, credential, `model` role, and `smallModel` role.
|
|
|
64
123
|
4. global `~/.config/triss/.env`;
|
|
65
124
|
5. registry defaults.
|
|
66
125
|
|
|
67
|
-
`TRISS_DEFAULT_PROVIDER` selects the provider when a request omits one. Direct CLI and MCP commands accept a native model id. Coder model options use `<provider>/<model-id>`.
|
|
126
|
+
`TRISS_DEFAULT_PROVIDER` selects the provider when a request omits one; `TRISS_DEFAULT_ENGINE` selects `direct`, `opencode`, `opencode2`, `omp`, or `crush` when it omits an engine. Direct CLI and MCP commands accept a native model id. Coder model options use `<provider>/<model-id>`. Every engine can execute non-coder model projections (`ask`, `review`, `chat`, …); what differs per engine is the available protection, not permission to run. `opencode` and `direct` have a verified read-only projection; `opencode2` runs the same deny-everything projection agent through its run-scoped config surface, `omp` uses its run-private policy overlay, and `crush` runs single-agent with the restrict allowlist. Engines without a verified projection report their concrete limitation as a warning on the result — never as a refusal.
|
|
68
127
|
|
|
69
128
|
Shared reasoning effort values:
|
|
70
129
|
|
|
71
130
|
```text
|
|
72
|
-
|
|
131
|
+
low | medium | high | xhigh | max
|
|
73
132
|
```
|
|
74
133
|
|
|
75
134
|
Examples:
|
|
@@ -89,9 +148,13 @@ Omit `--model` to use the command's provider role. There are no public model pre
|
|
|
89
148
|
## Configuration
|
|
90
149
|
|
|
91
150
|
```bash
|
|
92
|
-
triss config wizard
|
|
93
|
-
triss config wizard --
|
|
151
|
+
triss config wizard # Easy setup (provider + key + hosts)
|
|
152
|
+
triss config wizard --advanced # full sections
|
|
153
|
+
triss config wizard opencode-go # targeted provider setup
|
|
154
|
+
triss config wizard coder --coder-engine omp --coder-provider moonshot
|
|
155
|
+
triss config wizard coder --coder-protect-credentials # persist TRISS_CODER_PROTECT_CREDENTIALS=true (proxy mode instead of default best-effort raw)
|
|
94
156
|
triss config set TRISS_DEFAULT_PROVIDER zai
|
|
157
|
+
triss config set TRISS_DEFAULT_ENGINE direct
|
|
95
158
|
triss config get TRISS_ZAI_MODEL
|
|
96
159
|
triss config list
|
|
97
160
|
triss config path
|
|
@@ -99,6 +162,39 @@ triss config edit
|
|
|
99
162
|
triss config unset TRISS_ZAI_MODEL
|
|
100
163
|
```
|
|
101
164
|
|
|
165
|
+
To route bare `ask`, `review`, and other model-backed calls through OpenCode Go
|
|
166
|
+
with Muse:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
triss coder init --engine opencode --provider opencode-go
|
|
170
|
+
triss config set TRISS_DEFAULT_PROVIDER opencode-go
|
|
171
|
+
triss config set TRISS_DEFAULT_ENGINE opencode
|
|
172
|
+
triss config set TRISS_OPENCODE_GO_MODEL muse-spark-1.3-contributor
|
|
173
|
+
triss config set TRISS_OPENCODE_GO_SMALL_MODEL muse-spark-1.3-contributor
|
|
174
|
+
|
|
175
|
+
triss ask --paths 'src/**/*.js' --question "Find correctness defects"
|
|
176
|
+
triss review
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Explicit request flags still win. Engine-backed non-coder calls receive the
|
|
180
|
+
complete request context in the prompt. OpenCode installs and verifies a
|
|
181
|
+
run-scoped active primary `triss-readonly-projection` agent pinned as
|
|
182
|
+
`default_agent`; its permission contract denies every tool by default, so it
|
|
183
|
+
never gains ambient file, shell, edit, skill, or delegation access. The other
|
|
184
|
+
engines apply their best-effort equivalents (run-scoped config surface,
|
|
185
|
+
run-private policy overlay, or the restrict allowlist) and attach a warning
|
|
186
|
+
that names exactly what is not verified. The process still runs as the current
|
|
187
|
+
OS user and is not a filesystem sandbox. Add `--protect-credentials` to a model
|
|
188
|
+
command when the selected credential can be kept behind the parent-owned proxy
|
|
189
|
+
(it falls back to a best-effort raw run with a warning when a protected route
|
|
190
|
+
is unavailable); `--no-protect-credentials` overrides a persisted
|
|
191
|
+
`TRISS_PROTECT_CREDENTIALS=true` choice for one run. For coder runs configured
|
|
192
|
+
through the wizard, `--coder-protect-credentials` / `--coder-no-protect-credentials`
|
|
193
|
+
persist `TRISS_CODER_PROTECT_CREDENTIALS=true` / `=false` (cannot be combined);
|
|
194
|
+
the coder-specific value takes precedence over the shared
|
|
195
|
+
`TRISS_PROTECT_CREDENTIALS`. Raw-mode and engine
|
|
196
|
+
warnings are preserved in MCP structured results for every model-backed tool.
|
|
197
|
+
|
|
102
198
|
Provider fields:
|
|
103
199
|
|
|
104
200
|
| Provider | Credential | Endpoint | Main role | Small role |
|
|
@@ -110,7 +206,7 @@ Provider fields:
|
|
|
110
206
|
| `moonshot` | `MOONSHOT_API_KEY` | `TRISS_MOONSHOT_BASE_URL` | `TRISS_MOONSHOT_MODEL` | `TRISS_MOONSHOT_SMALL_MODEL` |
|
|
111
207
|
| `kimi-for-coding` | `KIMI_API_KEY` | `TRISS_KIMI_FOR_CODING_BASE_URL` | `TRISS_KIMI_FOR_CODING_MODEL` | `TRISS_KIMI_FOR_CODING_SMALL_MODEL` |
|
|
112
208
|
|
|
113
|
-
Project values are stored in `./.triss.env`, are mode `0600`, and override global values. Full reference: [
|
|
209
|
+
Project values are stored in `./.triss.env`, are mode `0600`, and override global values. Full reference: [configuration](https://github.com/ayleen/triss-coworker/blob/main/docs/configuration.md).
|
|
114
210
|
|
|
115
211
|
## Commands
|
|
116
212
|
|
|
@@ -141,19 +237,22 @@ Use `triss <command> --help` for exact arguments.
|
|
|
141
237
|
Supported engines:
|
|
142
238
|
|
|
143
239
|
- `opencode` — default OpenCode engine
|
|
144
|
-
- `opencode2` — OpenCode 2 beta
|
|
145
|
-
- `crush` —
|
|
240
|
+
- `opencode2` — OpenCode 2 beta, current-or-newer compatibility
|
|
241
|
+
- `crush` — provider-neutral single-envelope engine (any canonical provider)
|
|
146
242
|
- `omp` — native Oh My Pi adapter
|
|
147
243
|
|
|
148
|
-
|
|
244
|
+
OpenCode 2 has a supported floor of `0.0.0-beta-19059` and accepts every newer
|
|
245
|
+
parseable version by default when the required CLI options are present. It is
|
|
246
|
+
never pinned to one exact build or help-description sentence. OMP has a
|
|
247
|
+
supported floor of `18.0.6`.
|
|
149
248
|
|
|
150
249
|
Setup examples:
|
|
151
250
|
|
|
152
251
|
```bash
|
|
153
252
|
triss coder init --engine opencode --provider openai-compatible
|
|
154
253
|
triss coder init --engine opencode2 --provider opencode-zen
|
|
155
|
-
triss coder init --engine crush --provider
|
|
156
|
-
triss coder init --engine omp --provider
|
|
254
|
+
triss coder init --engine crush --provider opencode-go
|
|
255
|
+
triss coder init --engine omp --provider moonshot
|
|
157
256
|
```
|
|
158
257
|
|
|
159
258
|
Run examples:
|
|
@@ -170,26 +269,27 @@ triss coder run --isolate --session auth-fix \
|
|
|
170
269
|
"Fix the authentication bug and run focused checks"
|
|
171
270
|
```
|
|
172
271
|
|
|
173
|
-
Each run forwards only the selected provider credential. Protected routes use parent-owned loopback credential mediation and fail closed when an
|
|
272
|
+
Each run forwards only the selected provider credential. Protected routes use parent-owned loopback credential mediation and fail closed when a protected route cannot actually contain the real key; an explicit `--no-protect-credentials` runs crush raw through the same run-scoped config with the selected credential (best-effort, warned). `--isolate` uses `.triss/wt/<slug>` for a reviewable worktree.
|
|
273
|
+
|
|
274
|
+
The `opencode` V1 engine preserves native OpenCode routing for Zen and Go. In
|
|
275
|
+
protected mode, only `User-Agent` plus session, request, and client identity
|
|
276
|
+
headers reach the provider; the project fingerprint stays local.
|
|
174
277
|
|
|
175
278
|
Engine details:
|
|
176
279
|
|
|
177
|
-
- [OpenCode Zen](docs/engines/opencode-zen.md)
|
|
178
|
-
- [OpenCode Go](docs/engines/opencode-go.md)
|
|
179
|
-
- [OpenCode 2](docs/engines/opencode2.md)
|
|
180
|
-
- [Crush](docs/engines/crush.md)
|
|
181
|
-
- [OMP](docs/engines/omp.md)
|
|
280
|
+
- [OpenCode Zen](https://github.com/ayleen/triss-coworker/blob/main/docs/engines/opencode-zen.md)
|
|
281
|
+
- [OpenCode Go](https://github.com/ayleen/triss-coworker/blob/main/docs/engines/opencode-go.md)
|
|
282
|
+
- [OpenCode 2](https://github.com/ayleen/triss-coworker/blob/main/docs/engines/opencode2.md)
|
|
283
|
+
- [Crush](https://github.com/ayleen/triss-coworker/blob/main/docs/engines/crush.md)
|
|
284
|
+
- [OMP](https://github.com/ayleen/triss-coworker/blob/main/docs/engines/omp.md)
|
|
182
285
|
|
|
183
286
|
## MCP
|
|
184
287
|
|
|
185
|
-
|
|
186
|
-
triss mcp install --target claude --global
|
|
187
|
-
triss mcp install --target codex --global
|
|
188
|
-
```
|
|
288
|
+
If the wizard has not already connected your host, choose Claude Code or Codex in the [host-connection guide](https://triss.work/docs/getting-started/#step-4). Only run setup for the host you intend to use.
|
|
189
289
|
|
|
190
290
|
Core tools include `triss_ask`, `triss_chat`, `triss_fetch`, `triss_review`, `triss_write`, `triss_commit_msg`, `triss_status`, and the migration/update surfaces. Coder tools appear when any canonical provider credential is configured. Tracker tools appear only when their integration credential is ready.
|
|
191
291
|
|
|
192
|
-
The MCP schemas use the same `provider`, `model`, `effort`, and engine contracts as the CLI. Full reference: [
|
|
292
|
+
The MCP schemas use the same `provider`, `model`, `effort`, and engine contracts as the CLI. Full reference: [MCP](https://github.com/ayleen/triss-coworker/blob/main/docs/mcp.md).
|
|
193
293
|
|
|
194
294
|
## Integrations
|
|
195
295
|
|
|
@@ -198,7 +298,7 @@ The MCP schemas use the same `provider`, `model`, `effort`, and engine contracts
|
|
|
198
298
|
- GitHub Issues: `GITHUB_TOKEN` or `gh auth token`
|
|
199
299
|
- GitLab Issues: `GITLAB_TOKEN`
|
|
200
300
|
|
|
201
|
-
Integration clients apply response-size bounds, request timeouts, redirect policy, and path sandboxing. Extension guide
|
|
301
|
+
Integration clients apply response-size bounds, request timeouts, redirect policy, and path sandboxing. [Extension guide](https://github.com/ayleen/triss-coworker/blob/main/docs/extending.md).
|
|
202
302
|
|
|
203
303
|
## Usage and pricing
|
|
204
304
|
|
|
@@ -211,7 +311,7 @@ triss usage --json
|
|
|
211
311
|
triss usage --reset
|
|
212
312
|
```
|
|
213
313
|
|
|
214
|
-
Usage records preserve provider, model, token-class provenance, billing mode, and whether cost is complete. Unknown prices remain unknown. `TRISS_PRICE_<MODEL_ID>` can override a model price without changing routing. See [
|
|
314
|
+
Usage records preserve provider, model, token-class provenance, billing mode, and whether cost is complete. Unknown prices remain unknown. `TRISS_PRICE_<MODEL_ID>` can override a model price without changing routing. See [usage accounting](https://github.com/ayleen/triss-coworker/blob/main/docs/usage-accounting.md).
|
|
215
315
|
|
|
216
316
|
## Updates
|
|
217
317
|
|
|
@@ -232,7 +332,7 @@ Package-managed installs receive update notices but update through their package
|
|
|
232
332
|
- coder engine configuration is audited before credential forwarding;
|
|
233
333
|
- migration uses compare-and-swap writes, private backups, rollback, and cleanup resume.
|
|
234
334
|
|
|
235
|
-
Report vulnerabilities privately according to [SECURITY.md](SECURITY.md).
|
|
335
|
+
Report vulnerabilities privately according to [SECURITY.md](https://github.com/ayleen/triss-coworker/blob/main/SECURITY.md).
|
|
236
336
|
|
|
237
337
|
## Development
|
|
238
338
|
|
|
@@ -243,8 +343,8 @@ npm run typecheck
|
|
|
243
343
|
npm test
|
|
244
344
|
```
|
|
245
345
|
|
|
246
|
-
Architecture: [ARCHITECTURE.md](ARCHITECTURE.md).
|
|
346
|
+
Architecture: [ARCHITECTURE.md](https://github.com/ayleen/triss-coworker/blob/main/ARCHITECTURE.md).
|
|
247
347
|
|
|
248
348
|
## License
|
|
249
349
|
|
|
250
|
-
MIT — see [LICENSE](LICENSE).
|
|
350
|
+
MIT — see [LICENSE](https://github.com/ayleen/triss-coworker/blob/main/LICENSE).
|
package/bin/triss.js
CHANGED
|
@@ -106,23 +106,29 @@ function addModelSelectionOptions(command) {
|
|
|
106
106
|
.option('--provider <id>', 'canonical provider id')
|
|
107
107
|
.option('-m, --model <id>', 'provider-qualified model id, or a bare id with --provider')
|
|
108
108
|
.option('--engine <id>', 'execution engine (direct, opencode, opencode2, omp, or crush)')
|
|
109
|
+
.option('--protect-credentials', MODEL_PROTECT_HELP)
|
|
110
|
+
.option('--no-protect-credentials', 'override a persisted TRISS_PROTECT_CREDENTIALS=true choice for this run')
|
|
109
111
|
.option('-e, --effort <level>', 'reasoning effort: low, medium, high, xhigh, or max', parseEffort);
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
// Shared help text for model-backed credential protection.
|
|
115
|
+
const MODEL_PROTECT_HELP =
|
|
116
|
+
'Use the parent-owned credential proxy for the model projection.\n' +
|
|
117
|
+
'Falls back to a best-effort raw run with a warning when a verified\n' +
|
|
118
|
+
'protected route is unavailable for the selected engine.';
|
|
119
|
+
|
|
112
120
|
// Shared help text for the credential-mode flag (`coder init` and `coder run`;
|
|
113
121
|
// `triss exec --code` forwards it under its own shorter description).
|
|
114
122
|
const PROTECT_HELP =
|
|
115
|
-
'Use the parent-owned credential proxy and strict executable-surface gates
|
|
116
|
-
'
|
|
117
|
-
'
|
|
123
|
+
'Use the parent-owned credential proxy and strict executable-surface gates\n' +
|
|
124
|
+
'where the selected engine supports them; otherwise run best-effort with a\n' +
|
|
125
|
+
'warning. An explicit --no-protect-credentials overrides a persisted\n' +
|
|
126
|
+
'TRISS_*_PROTECT_CREDENTIALS=true choice for this run.';
|
|
118
127
|
|
|
119
128
|
const program = new Command();
|
|
120
129
|
program
|
|
121
130
|
.name('triss')
|
|
122
|
-
.description(
|
|
123
|
-
'Provider-neutral coworker for AI coding agents. Delegate bulk reads, ' +
|
|
124
|
-
'code generation, chat extraction, reviews, and tracker I/O.',
|
|
125
|
-
)
|
|
131
|
+
.description(packageJson.description)
|
|
126
132
|
.version(packageJson.version);
|
|
127
133
|
|
|
128
134
|
program.hook('postAction', async () => {
|
|
@@ -145,6 +151,7 @@ program
|
|
|
145
151
|
.option('-t, --target <agent>', 'target agent (claude | codex | both); omit for an interactive prompt')
|
|
146
152
|
.option('-f, --force', 'force-replace an existing triss block without diffing')
|
|
147
153
|
.option('-s, --setup', 'after writing CLAUDE.md, run `triss config wizard` to fill in credentials')
|
|
154
|
+
.option('--yes', 'with --setup: non-interactive apply of a complete headless configuration (required outside a TTY)')
|
|
148
155
|
.action(wrap(runInit));
|
|
149
156
|
|
|
150
157
|
addModelSelectionOptions(
|
|
@@ -228,14 +235,15 @@ program
|
|
|
228
235
|
.option('--system <text>', 'forward the system prompt to ask/chat')
|
|
229
236
|
.option('--stream', 'forward streaming preference')
|
|
230
237
|
.option('--no-stream', 'disable forwarded streaming')
|
|
231
|
-
.option('--engine <name>', 'forward
|
|
238
|
+
.option('--engine <name>', 'forward model execution engine')
|
|
232
239
|
.option('--agent <name>', 'forward coder agent template')
|
|
233
240
|
.option('--session <id>', 'forward coder session')
|
|
234
241
|
.option('--continue', 'continue the most recent coder session')
|
|
235
242
|
.option('--isolate', 'forward coder isolation')
|
|
236
243
|
.option('--no-isolate', 'disable coder isolation')
|
|
237
244
|
.option('--allow-best-effort-caller-worktree', 'forward coder isolation downgrade')
|
|
238
|
-
.option('--protect-credentials', 'forward
|
|
245
|
+
.option('--protect-credentials', 'forward protected credential mode for model-backed and coder routes')
|
|
246
|
+
.option('--no-protect-credentials', 'override a persisted TRISS_PROTECT_CREDENTIALS=true choice for this run')
|
|
239
247
|
.option('--restrict', 'forward coder restriction')
|
|
240
248
|
.option('--no-restrict', 'disable coder restriction')
|
|
241
249
|
.option('--cwd <path>', 'forward coder working directory')
|
|
@@ -325,15 +333,19 @@ const config = program
|
|
|
325
333
|
|
|
326
334
|
config
|
|
327
335
|
.command('wizard [target]')
|
|
328
|
-
.description('Interactive setup. Optional target:
|
|
336
|
+
.description('Interactive setup (Easy by default, Advanced by choice). Optional target: a canonical provider id, coder, or an integration name (jira | linear | …)')
|
|
329
337
|
.option('-g, --global', 'save to ~/.config/triss/.env (default if not asked)')
|
|
330
338
|
.option('-l, --local', 'save to ./.triss.env (project-local override)')
|
|
331
|
-
.option('-f, --force', 're-prompt for
|
|
332
|
-
.option('--standard', '
|
|
333
|
-
.option('--advanced', 'full wizard
|
|
339
|
+
.option('-f, --force', 're-prompt for values that are already set')
|
|
340
|
+
.option('--standard', 'explicit Easy path (same as the default interactive flow)')
|
|
341
|
+
.option('--advanced', 'full Advanced wizard — providers, execution, connections, integrations, runtime')
|
|
342
|
+
.option('--yes', 'non-interactive apply of a complete configuration assembled from existing files, the environment, and explicit flags')
|
|
343
|
+
.option('--agent <agent>', 'headless host intent: claude | codex | both | none (non-TTY default: none)')
|
|
344
|
+
.option('--install', 'allow installing missing engines in a headless run (without it, missing dependencies are reported)')
|
|
334
345
|
.option('--coder-engine <name>', 'coder target only: coding engine to configure (opencode default, opencode2 beta, crush, or omp — see docs/engines/omp.md). `coder init` uses --engine')
|
|
335
346
|
.option('--coder-provider <name>', 'coder target only: canonical provider id. `coder init` uses --provider')
|
|
336
347
|
.option('--coder-protect-credentials', 'coder target only: configure the parent-owned credential proxy mode instead of the default best_effort_raw. `coder init` uses --protect-credentials')
|
|
348
|
+
.option('--coder-no-protect-credentials', 'coder target only: persist/forward an explicit unprotected choice that overrides TRISS_PROTECT_CREDENTIALS=true')
|
|
337
349
|
.action(wrap(runWizard));
|
|
338
350
|
|
|
339
351
|
config
|
|
@@ -389,9 +401,8 @@ coder
|
|
|
389
401
|
.option('-l, --local', 'save to the project scope (./.triss.env, ./opencode.json)')
|
|
390
402
|
.option('--engine <name>', 'coding engine to configure: opencode (default), opencode2 (beta — shares the opencode.json config; see docs/engines/opencode2.md), crush, or omp (see docs/engines/omp.md)')
|
|
391
403
|
.option('--provider <name>', 'canonical model provider id')
|
|
392
|
-
.option('--allow-unverified', 'requires explicit --provider opencode-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)')
|
|
393
|
-
.option('--allow-unsafe-bash', 'proceed even if an existing opencode.json has no deny-first bash policy (the agent runs with --auto)')
|
|
394
404
|
.option('--protect-credentials', PROTECT_HELP)
|
|
405
|
+
.option('--no-protect-credentials', 'override a persisted TRISS_PROTECT_CREDENTIALS=true choice for this setup/run')
|
|
395
406
|
.action(wrap(runCoderInit));
|
|
396
407
|
|
|
397
408
|
coder
|
|
@@ -412,6 +423,7 @@ coder
|
|
|
412
423
|
.option('--timeout <sec>', 'kill the engine after this many seconds', parsePositiveNumber, 900)
|
|
413
424
|
.option('--allow-best-effort-caller-worktree', 'allow downgrade to caller worktree when isolated isolation cannot be enforced (default off — fails before spawn without it)')
|
|
414
425
|
.option('--protect-credentials', PROTECT_HELP)
|
|
426
|
+
.option('--no-protect-credentials', 'override a persisted TRISS_PROTECT_CREDENTIALS=true choice for this run')
|
|
415
427
|
.option('--stdin', 'read the prompt from piped stdin instead of the [prompt] argument')
|
|
416
428
|
.option('--json', 'no-op — the envelope is always JSON; kept for symmetry with other commands')
|
|
417
429
|
.action((prompt, opts) => wrap(runCoderRun)(prompt, opts));
|