triss-coworker 0.22.0 → 0.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.22.2] — 2026-07-04
11
+
12
+ ### Changed
13
+
14
+ - `triss_coder_run` (MCP): the default timeout is now **1500s (25 min)**,
15
+ up from 300s and above the CLI's 900s, since GLM/opencode runs over MCP
16
+ are expected to be long. A stdio MCP server has no client-side per-call
17
+ cap (Claude Code's `MCP_TOOL_TIMEOUT` is effectively unlimited; the 300s
18
+ idle timeout applies only to remote transports), so triss's own timer is
19
+ the real bound. Override per call via the `timeout` arg.
20
+
21
+ ## [0.22.1] — 2026-07-04
22
+
23
+ ### Fixed
24
+
25
+ - `triss config wizard` → coder: the Z.AI plan auto-detection now sees a
26
+ freshly-entered `ZHIPU_API_KEY` (the wizard saves the key to the env file
27
+ without touching `process.env`; `runCoderSetup` now reloads env files
28
+ itself). The direct `triss coder init` path was unaffected.
29
+
10
30
  ## [0.22.0] — 2026-07-04
11
31
 
12
32
  ### Added
@@ -519,7 +539,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
519
539
 
520
540
  - Initial release of `triss-coworker`.
521
541
 
522
- [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.22.0...HEAD
542
+ [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.22.2...HEAD
543
+ [0.22.2]: https://github.com/ayleen/triss-coworker/compare/v0.22.1...v0.22.2
544
+ [0.22.1]: https://github.com/ayleen/triss-coworker/compare/v0.22.0...v0.22.1
523
545
  [0.22.0]: https://github.com/ayleen/triss-coworker/compare/v0.21.0...v0.22.0
524
546
  [0.21.0]: https://github.com/ayleen/triss-coworker/compare/v0.20.1...v0.21.0
525
547
  [0.20.1]: https://github.com/ayleen/triss-coworker/compare/v0.20.0...v0.20.1
package/README.md CHANGED
@@ -238,8 +238,9 @@ The exposed tool set is **filtered by configured credentials**:
238
238
  - **`triss_gitlab_*`** when `GITLAB_TOKEN` is set.
239
239
  - **`triss_coder_run` + `triss_coder_status`** when `ZHIPU_API_KEY` is set
240
240
  (setup: `triss coder init`). `triss_coder_run`'s timeout defaults to
241
- 300s over MCP, not the CLI's 900s — long tasks should go through
242
- `triss coder run` on the CLI instead.
241
+ 1500s (25 min) over MCP, above the CLI's 900s, since GLM runs are
242
+ expected to be long; override per call via the `timeout` arg. For
243
+ runs that may exceed it, use `triss coder run` on the CLI instead.
243
244
 
244
245
  Add credentials later → restart session → new tools appear automatically.
245
246
 
@@ -366,10 +366,11 @@ Phase 1; do NOT create a full `src/integrations/coder/` directory, this is
366
366
  not a tracker integration).
367
367
  Handlers in `src/mcp/handlers.js` call the same functions as the CLI.
368
368
  `triss_coder_run` in MCP mode must enforce the `safety.js` sandbox (Phase 2
369
- note 6). MCP hosts often time tool calls out before the CLI's 900 s
370
- default — use a lower MCP-side default timeout (300 s), document the
371
- constraint in `docs/mcp.md`, and point long tasks to the CLI-in-background
372
- path in the templates rule.
369
+ note 6). GLM runs over MCP are expected to be long, and stdio MCP has no
370
+ client-side per-call cap — use a generous MCP-side default timeout
371
+ (1500 s), allow per-call override via the `timeout` arg, document the
372
+ constraint in `docs/mcp.md`, and point runs that may exceed it to the
373
+ CLI-in-background path in the templates rule.
373
374
 
374
375
  ## Phase 5 — docs lockstep + tests (definition of done)
375
376
 
package/docs/mcp.md CHANGED
@@ -283,10 +283,13 @@ Exposed **only when ZHIPU_API_KEY is set** (setup: `triss coder init` or
283
283
  `ZHIPU_API_KEY` presence (never the value), which `opencode.json` files
284
284
  exist, and how many isolation worktrees are live.
285
285
 
286
- **Timeout is lower over MCP than on the CLI: 300s, not 900s.** MCP hosts
287
- commonly time out a tool call before a long coding task finishes. For
288
- anything that might run long, use `triss coder run` on the CLI instead
289
- (optionally backgrounded) rather than `triss_coder_run`.
286
+ **Timeout defaults to 1500s (25 min) over MCP**, above the CLI's 900s,
287
+ since GLM runs over MCP are expected to be long. Override per call via
288
+ the `timeout` arg. Stdio MCP has no client-side per-call cap of its own
289
+ (Claude Code's `MCP_TOOL_TIMEOUT` is effectively unlimited, and the 300s
290
+ idle timeout applies only to remote transports), so this value is the
291
+ real bound. For runs that may exceed it, use `triss coder run` on the
292
+ CLI instead (optionally backgrounded) rather than `triss_coder_run`.
290
293
 
291
294
  **Sandbox:** an explicit `cwd`, and (with `isolate`) the git repository
292
295
  root that `.triss/wt/<slug>` will be created under, are both checked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triss-coworker",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "description": "Give your AI coding agent a cheap DeepSeek coworker. Delegate bulk reads, boilerplate, and doc updates to save 60-70% of your token budget.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -277,6 +277,17 @@ async function setupKey(path) {
277
277
  // instead of driving real stdin. `deps.fetch` / `deps.promptChoice` let
278
278
  // tests stub the provider probe and the interactive model pick.
279
279
  export async function runCoderSetup({ scope } = {}, deps = {}) {
280
+ // `triss coder init` calls loadEnvFiles() itself before setupKey() runs,
281
+ // so ZHIPU_API_KEY is already in process.env by the time this function
282
+ // is reached from that path. But CODER_MANIFEST.postSetup (the
283
+ // `triss config wizard` path) calls runCoderSetup directly: the
284
+ // generic env-var loop writes the key to the .env FILE via setVar(),
285
+ // never to process.env. Without reloading here, detectAndReportZaiProvider
286
+ // below reads an unset ZHIPU_API_KEY on a first-time wizard setup,
287
+ // silently skips detection, and falls back to the default provider
288
+ // prefix. override:false + uncached (see config.js) makes this a safe,
289
+ // idempotent no-op when the key is already loaded.
290
+ loadEnvFiles();
280
291
  const resolvedScope = scope || 'global';
281
292
  const sh = deps.spawnSync || nodeSpawnSync;
282
293
  process.stderr.write('\n' + pc.bold('── coder (opencode engine) ──') + '\n');
@@ -856,11 +856,13 @@ export async function gitlabCommentHandler({ project, iid, body }) {
856
856
 
857
857
  // ─── coder ──────────────────────────────────────────────────────────────────
858
858
 
859
- // MCP hosts commonly time out a tool call well before the CLI's 900s
860
- // default — 300s here, documented in docs/mcp.md. Long tasks should go
861
- // through `triss coder run` on the CLI (optionally backgrounded), not
862
- // this tool.
863
- const CODER_MCP_DEFAULT_TIMEOUT = 300;
859
+ // GLM/opencode runs over MCP are expected to be long, so the default is
860
+ // generous — 1500s (25 min), above the CLI's 900s, documented in
861
+ // docs/mcp.md. Stdio MCP has no client-side per-call cap (Claude Code's
862
+ // MCP_TOOL_TIMEOUT is effectively unlimited, and the 300s idle timeout
863
+ // only applies to remote transports), so triss's own timeout is the
864
+ // real bound. Callers can override per request via the `timeout` arg.
865
+ const CODER_MCP_DEFAULT_TIMEOUT = 1500;
864
866
 
865
867
  // `deps` (spawn/spawnSync) is only ever populated by tests — production
866
868
  // calls always fall through to the real subprocess machinery inside
package/src/mcp/tools.js CHANGED
@@ -817,9 +817,10 @@ const CODER_TOOLS = [
817
817
  'engine, set up via `triss coder init`). Returns a JSON envelope: ' +
818
818
  '{engine, engine_version, session_id, exit_reason, final_text, ' +
819
819
  'files_changed, diff_stat, worktree, usage, warnings}. This tool\'s ' +
820
- 'timeout defaults to 300s (vs 900s on the CLI) since MCP hosts often ' +
821
- 'time out long tool calls — for anything that might run long, use ' +
822
- '`triss coder run` on the CLI instead (optionally backgrounded).',
820
+ 'timeout defaults to 1500s (25 min) since GLM runs over MCP are ' +
821
+ 'expected to be long; override per call via the `timeout` arg. For ' +
822
+ 'runs that may exceed that, use `triss coder run` on the CLI ' +
823
+ '(optionally backgrounded).',
823
824
  inputSchema: {
824
825
  type: 'object',
825
826
  properties: {
@@ -834,7 +835,7 @@ const CODER_TOOLS = [
834
835
  model: { type: 'string', description: 'Override the model for this run only' },
835
836
  isolate: { type: 'boolean', description: 'Run in a disposable git worktree under .triss/wt/<slug>' },
836
837
  cwd: { type: 'string', description: 'Working directory (ignored with isolate; sandboxed under MCP)' },
837
- timeout: { type: 'number', description: 'Seconds before the engine is killed (default 300 over MCP)' },
838
+ timeout: { type: 'number', description: 'Seconds before the engine is killed (default 1500 over MCP)' },
838
839
  },
839
840
  required: ['prompt'],
840
841
  },