triss-coworker 0.22.0 → 0.22.1

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,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.22.1] — 2026-07-04
11
+
12
+ ### Fixed
13
+
14
+ - `triss config wizard` → coder: the Z.AI plan auto-detection now sees a
15
+ freshly-entered `ZHIPU_API_KEY` (the wizard saves the key to the env file
16
+ without touching `process.env`; `runCoderSetup` now reloads env files
17
+ itself). The direct `triss coder init` path was unaffected.
18
+
10
19
  ## [0.22.0] — 2026-07-04
11
20
 
12
21
  ### Added
@@ -519,7 +528,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
519
528
 
520
529
  - Initial release of `triss-coworker`.
521
530
 
522
- [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.22.0...HEAD
531
+ [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.22.1...HEAD
532
+ [0.22.1]: https://github.com/ayleen/triss-coworker/compare/v0.22.0...v0.22.1
523
533
  [0.22.0]: https://github.com/ayleen/triss-coworker/compare/v0.21.0...v0.22.0
524
534
  [0.21.0]: https://github.com/ayleen/triss-coworker/compare/v0.20.1...v0.21.0
525
535
  [0.20.1]: https://github.com/ayleen/triss-coworker/compare/v0.20.0...v0.20.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triss-coworker",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
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');