triss-coworker 0.41.1 → 0.43.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.
Files changed (92) hide show
  1. package/ARCHITECTURE.md +38 -0
  2. package/CHANGELOG.md +125 -1
  3. package/README.md +216 -1299
  4. package/SECURITY.md +236 -0
  5. package/THIRD_PARTY_NOTICES +1 -0
  6. package/bin/triss.js +76 -91
  7. package/docs/compatibility.md +6 -0
  8. package/docs/configuration.md +129 -666
  9. package/docs/data-flows.md +1 -1
  10. package/docs/engines/crush.md +12 -59
  11. package/docs/engines/index.md +1 -1
  12. package/docs/engines/omp.md +23 -120
  13. package/docs/engines/opencode-go.md +82 -105
  14. package/docs/engines/opencode-zen.md +21 -377
  15. package/docs/engines/opencode2.md +45 -140
  16. package/docs/extending.md +260 -0
  17. package/docs/getting-started.md +117 -10
  18. package/docs/integrations/jira.md +2 -2
  19. package/docs/mcp.md +117 -680
  20. package/docs/reliable-delegation-contract.md +1 -1
  21. package/docs/security-model.md +16 -0
  22. package/docs/usage-accounting.md +24 -24
  23. package/package.json +13 -7
  24. package/src/coder-credential-proxy.js +78 -5
  25. package/src/coder-engine-registry.js +3 -3
  26. package/src/coder-engines/crush.js +55 -13
  27. package/src/coder-engines/omp.js +2 -0
  28. package/src/coder-engines/opencode2.js +60 -13
  29. package/src/coder-providers.js +76 -45
  30. package/src/commands/ask.js +45 -28
  31. package/src/commands/chat.js +34 -24
  32. package/src/commands/coder.js +588 -1121
  33. package/src/commands/commit-msg.js +33 -19
  34. package/src/commands/config.js +25 -53
  35. package/src/commands/exec.js +14 -6
  36. package/src/commands/fetch.js +4 -0
  37. package/src/commands/init.js +6 -5
  38. package/src/commands/migrate.js +24 -0
  39. package/src/commands/review.js +58 -58
  40. package/src/commands/status.js +57 -66
  41. package/src/commands/write.js +35 -23
  42. package/src/config.js +1 -121
  43. package/src/integrations/_contract.js +50 -20
  44. package/src/integrations/_registry.js +20 -14
  45. package/src/integrations/confluence/commands.js +7 -5
  46. package/src/integrations/confluence/index.js +8 -8
  47. package/src/integrations/github/commands.js +12 -6
  48. package/src/integrations/github/index.js +12 -12
  49. package/src/integrations/gitlab/commands.js +8 -6
  50. package/src/integrations/gitlab/index.js +12 -12
  51. package/src/integrations/jira/commands.js +14 -7
  52. package/src/integrations/jira/index.js +13 -13
  53. package/src/integrations/linear/commands.js +14 -7
  54. package/src/integrations/linear/index.js +12 -12
  55. package/src/mcp/handlers.js +154 -172
  56. package/src/mcp/review-core.js +4 -0
  57. package/src/mcp/server.js +10 -8
  58. package/src/mcp/tools.js +102 -87
  59. package/src/migration/legacy-inventory.js +59 -0
  60. package/src/migration/migrate.js +708 -0
  61. package/src/model-engine-adapters.js +106 -0
  62. package/src/model-projection-policy.js +110 -0
  63. package/src/model-runtime.js +79 -0
  64. package/src/model-selection.js +137 -0
  65. package/src/model-usage.js +59 -0
  66. package/src/opencode2-preflight.js +29 -57
  67. package/src/paths.js +4 -0
  68. package/src/provider-config.js +99 -0
  69. package/src/provider-contract.js +121 -0
  70. package/src/provider-errors.js +5 -5
  71. package/src/provider-registry.js +147 -0
  72. package/src/provider-security.js +55 -0
  73. package/src/review-defaults.js +2 -43
  74. package/src/review-live.js +13 -15
  75. package/src/secrets.js +7 -5
  76. package/src/transport-registry.js +70 -0
  77. package/src/transports/anthropic-messages.js +155 -0
  78. package/src/transports/openai-chat.js +185 -0
  79. package/src/transports/openai-responses.js +123 -0
  80. package/src/transports/result.js +80 -0
  81. package/src/usage-schema.js +13 -30
  82. package/src/usage.js +27 -47
  83. package/src/zai.js +3 -22
  84. package/templates/claude-full.md +58 -70
  85. package/templates/claude.md +30 -29
  86. package/templates/codex-full.md +42 -61
  87. package/templates/codex.md +29 -30
  88. package/src/client.js +0 -470
  89. package/src/coder-models.js +0 -3457
  90. package/src/commands/coder-models.js +0 -1196
  91. package/src/models.js +0 -203
  92. package/src/moonshot.js +0 -19
@@ -0,0 +1,38 @@
1
+ # Architecture
2
+
3
+ Triss is a Node.js CLI and MCP server. The CLI, MCP surface, and standalone
4
+ artifact use the same application modules; there is no separate hosted
5
+ control plane.
6
+
7
+ ## Component map
8
+
9
+ | Area | Responsibility | Primary locations |
10
+ | --- | --- | --- |
11
+ | CLI layer | Argument parsing, command routing, human and JSON output | `bin/triss.js`, `src/commands/` |
12
+ | MCP layer | Tool schemas, request handlers, cancellation, host installation | `src/mcp/` |
13
+ | Provider runtime | Canonical registry, immutable config snapshot, role/model resolution, effort mapping, transports, and normalized results | `src/provider-*.js`, `src/model-*.js`, `src/transport-*.js`, `src/transports/` |
14
+ | Coder engines | OpenCode, OpenCode 2, Crush, and OMP projections of the shared provider runtime | `src/commands/coder.js`, `src/coder-engines/`, `src/coder-providers.js` |
15
+ | Credential proxy | Parent-owned, short-lived credential mediation for child engines | `src/coder-credential-proxy.js` |
16
+ | Isolation policy | Worktree isolation, capability reporting, process ownership, bounded writes | `src/coder-sandbox.js`, `src/managed-root.js`, `src/coder-process-supervisor.js` |
17
+ | State and result stores | Session, run, result, lease, ownership, and recovery state machines | `src/coder-*.js`, `src/owned-process-*.js` |
18
+ | Updater | Passive discovery, manifest verification, transactional install and rollback | `src/update/`, `src/commands/update.js` |
19
+ | Integrations | GitHub, GitLab, Jira, Confluence, and Linear adapters | `src/integrations/` |
20
+ | Release artifacts | npm package, companion package, and deterministic standalone artifact | `package.json`, `packages/`, `scripts/release-gates.js`, `.github/workflows/publish.yml` |
21
+
22
+ ## Dependency direction
23
+
24
+ Command and MCP adapters may call shared domain modules. Shared modules do not
25
+ import the CLI or MCP presentation layers. External input is validated and
26
+ bounded before it reaches providers, integrations, filesystem operations, or
27
+ child processes. Release-only acceptance support lives under `test/support/`
28
+ and is excluded from production packages.
29
+
30
+ ## Large-module policy
31
+
32
+ Several modules currently combine too many responsibilities. Refactoring is
33
+ incremental: extract one cohesive boundary at a time, preserve public exports,
34
+ add characterization tests first, and avoid mixing a structural split with a
35
+ behavior change. Priority candidates are coder orchestration, model management,
36
+ updater installation, MCP installation, and MCP handlers.
37
+
38
+ Architecture decisions that change trust boundaries belong in `docs/adr/`.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,128 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.43.0] — 2026-09-05
11
+
12
+ ### Changed
13
+
14
+ - Website repositioned around managed delegation for AI development: a new
15
+ homepage with a real, recorded, manually verified research example, workflow
16
+ guides for research, review, and bounded implementation
17
+ (`/workflows/`), a shorter agent-aware quickstart, consistent secondary
18
+ pages, and a reproducibly generated social card. The inference-cost
19
+ calculator, its formulas, and its methodology remain unchanged on `/cost/`.
20
+ - GitHub/npm-facing documentation and package metadata now describe managed
21
+ delegation consistently. The README leads with research, review, and bounded
22
+ implementation, followed by host-aware setup and result-inspection guidance.
23
+ Packaged quickstart and agent instructions use the same positioning without
24
+ guaranteed savings or a mandatory model brand. The documented Node.js minimum
25
+ is 22.12.0, matching the root package.
26
+ - `triss-dsh-provider-bundle` is version-aligned at 0.43.0; its catalogue
27
+ routes are unchanged.
28
+
29
+ ### Fixed
30
+
31
+ - Website rendering no longer waits on a separate shared stylesheet request.
32
+ Optional font display prevents late font swaps from moving visible text;
33
+ slow first loads may retain the system fallback for that page view.
34
+
35
+ - OpenCode 2 now qualifies the published beta CLI against its current
36
+ `0.0.0-beta-19059` floor and required option declarations, accepting every
37
+ newer compatible version without pinning a build or help-description
38
+ sentence. `provider/model#variant` remains the runtime transport for explicit
39
+ effort, but help prose is not a compatibility gate. Capability errors now
40
+ name missing options separately from below-minimum versions. Pre-suffixed
41
+ public/configured OpenCode 2 models are rejected before engine side effects.
42
+ - 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, explicit credential protection is available, and unverified OpenCode 2, OMP, and Crush projections are rejected before launch.
43
+ - `triss_coder_run` retains the documented `protectCredentials` MCP spelling
44
+ as a deprecated compatibility alias. It is OR-merged with
45
+ `protect_credentials`, so either truthy spelling selects protected
46
+ credential handling; new clients should use `protect_credentials`.
47
+ - OpenCode Go and Zen coder transports now retain an OpenCode-prefixed
48
+ transient provider identity, selecting native OpenCode V1 request semantics.
49
+ The protected credential proxy preserves only bounded correlation headers,
50
+ specific user agent, and validated retry response metadata upstream while
51
+ dropping the repository fingerprint.
52
+
53
+ ### Artifact integrity (0.43.0)
54
+
55
+ - `triss-dsh-provider-bundle-0.43.0.tgz` — sha256
56
+ `7c40016a7fe9eea6ffc0c494b90622cf9429d9fced5f33471e0f9519f17452be`
57
+ — `sha512-eP6Y88SKX7vvY6FWbYTzBfNHSn5FNgjZ3ZPWETQWToefkABS1pyJNEgH063AgPt5MNVy0S6/LwG07exVaOpJLQ==`
58
+ (computed with npm pack; the output is byte-deterministic).
59
+ - Root `triss-coworker-0.43.0.tgz` sha256 is reproducible via `npm pack` at
60
+ tag `v0.43.0`; the root tarball ships `CHANGELOG.md`, so its hash cannot be
61
+ recorded inside this file. Registry verification compares the packed
62
+ artifact with the published tarball byte-for-byte.
63
+
64
+ ## [0.42.0] — 2026-08-29
65
+
66
+ ### Added
67
+
68
+ - Unified provider profiles for `openai-compatible`, `zai`, `opencode-zen`,
69
+ `opencode-go`, `moonshot`, and `kimi-for-coding`, with explicit main and
70
+ small native-model roles.
71
+ - One shared provider, model, engine, and reasoning-effort selection contract
72
+ across CLI commands, MCP tools, integrations, and coder engines.
73
+ - Native OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages
74
+ transports behind normalized execution results and usage accounting.
75
+ - `triss migrate`, which discovers pre-0.42 state, resolves conflicts before
76
+ writing, performs an atomic canonical migration, verifies the production
77
+ resolver, removes legacy fields only after verification, and supports safe
78
+ cleanup resume.
79
+
80
+ ### Changed
81
+
82
+ - Coder engines now project the shared provider registry instead of maintaining
83
+ separate provider identities, credentials, endpoints, and model defaults.
84
+ - Provider credentials and endpoints use field-level provenance checks before
85
+ credential-bearing engine launches.
86
+ - `triss status`, help, generated agent rules, documentation, and the website
87
+ report canonical provider IDs and concrete native model IDs.
88
+ - `triss-dsh-provider-bundle` is version-aligned at 0.42.0; its catalogue
89
+ routes are unchanged.
90
+
91
+ ### Fixed
92
+
93
+ - Quoted values from external dotenv writers no longer disappear when they
94
+ contain literal backslashes or control characters that are invalid JSON;
95
+ Triss preserves the quoted payload while retaining JSON-compatible
96
+ round-tripping for values written by its own configuration commands.
97
+
98
+ ### Removed
99
+
100
+ - Legacy provider aliases, public `flash`/`pro` presets, worker-specific
101
+ runtime configuration, and global coder model pins.
102
+ - The `coder models` and `coder model set` surfaces. Provider role models are
103
+ configured directly in canonical provider profiles.
104
+ - Compatibility readers from normal runtime paths. Pre-0.42 spellings remain
105
+ understood only by `triss migrate`.
106
+
107
+ ### Upgrade from Triss < 0.42.0
108
+
109
+ Triss 0.42 replaces worker configuration and model presets with unified
110
+ provider profiles. After installing the update and before running model
111
+ commands:
112
+
113
+ ```bash
114
+ triss migrate
115
+ triss status
116
+ ```
117
+
118
+ Restart MCP hosts and agent sessions after migration. Do not downgrade to a
119
+ pre-0.42 release after migration.
120
+
121
+ ### Artifact integrity (0.42.0)
122
+
123
+ - `triss-dsh-provider-bundle-0.42.0.tgz` — sha256
124
+ `e3e620037b4ddb9d2f55728b3c5cb5d8ecbd514499962b2c587bc41d3b1a7422`
125
+ — `sha512-0YvcF+7iKTDDNvx4cv/+QZOeHaMok2Rd7WNcWm2RIsYl01TgRtG0yaP7GamdXfY9NaowJmSx48r6RA6COZ+IoA==`
126
+ (computed with npm pack; the output is byte-deterministic).
127
+ - Root `triss-coworker-0.42.0.tgz` sha256 is reproducible via `npm pack` at
128
+ tag `v0.42.0`; the root tarball ships `CHANGELOG.md`, so its hash cannot be
129
+ recorded inside this file. Registry verification compares the packed
130
+ artifact with the published tarball byte-for-byte.
131
+
10
132
  ## [0.41.1] — 2026-08-29
11
133
 
12
134
  ### Fixed
@@ -1762,7 +1884,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1762
1884
 
1763
1885
  - Initial release of `triss-coworker`.
1764
1886
 
1765
- [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.41.1...HEAD
1887
+ [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.43.0...HEAD
1888
+ [0.43.0]: https://github.com/ayleen/triss-coworker/compare/v0.42.0...v0.43.0
1889
+ [0.42.0]: https://github.com/ayleen/triss-coworker/compare/v0.41.1...v0.42.0
1766
1890
  [0.41.1]: https://github.com/ayleen/triss-coworker/compare/v0.41.0...v0.41.1
1767
1891
  [0.41.0]: https://github.com/ayleen/triss-coworker/compare/v0.40.0...v0.41.0
1768
1892
  [0.40.0]: https://github.com/ayleen/triss-coworker/compare/v0.39.2...v0.40.0