triss-coworker 0.22.2 → 0.22.3

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,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.22.3] — 2026-07-04
11
+
12
+ ### Fixed
13
+
14
+ - `getEnvFilePath('global')` in `src/secrets.js` now resolves `homedir()`
15
+ lazily on each call. The path was previously frozen into module-level
16
+ constants (`GLOBAL_DIR`/`GLOBAL_FILE`) at import time, so any later
17
+ `HOME` override — notably in tests — was ignored, unlike the lazy
18
+ resolution already used by `coder.js` and `safety.js`. Runtime path
19
+ values are unchanged. (#6)
20
+
10
21
  ## [0.22.2] — 2026-07-04
11
22
 
12
23
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triss-coworker",
3
- "version": "0.22.2",
3
+ "version": "0.22.3",
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": {
package/src/secrets.js CHANGED
@@ -11,12 +11,14 @@ import { dirname, join } from 'node:path';
11
11
  import readline from 'node:readline';
12
12
  import { projectRoot } from './safety.js';
13
13
 
14
- const GLOBAL_DIR = join(homedir(), '.config', 'triss');
15
- const GLOBAL_FILE = join(GLOBAL_DIR, '.env');
16
14
  const LOCAL_FILE_NAME = '.triss.env';
17
15
 
16
+ // Resolve HOME lazily on each call so tests (and runtime) that override
17
+ // HOME / TRISS_PROJECT_ROOT are honored — matches the lazy style already
18
+ // used by projectRoot() in safety.js. Computing at import time froze the
19
+ // path to whatever HOME was when secrets.js first loaded.
18
20
  export function getEnvFilePath(scope = 'global') {
19
- if (scope === 'global') return GLOBAL_FILE;
21
+ if (scope === 'global') return join(homedir(), '.config', 'triss', '.env');
20
22
  if (scope === 'local') return join(projectRoot(), LOCAL_FILE_NAME);
21
23
  throw new Error(`Unknown scope "${scope}" — use "global" or "local"`);
22
24
  }