sprag-cli 3.40.1 → 3.41.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprag-cli",
3
- "version": "3.40.1",
3
+ "version": "3.41.0",
4
4
  "description": "Sprag - a quality ratchet harness for AI coding agents: model-fitting delegation, ratchet rules, doc2md, Korean style gate. Same tool as claude-token-saver, under its new name.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,8 @@
10
10
  "scripts": {
11
11
  "test": "node --test",
12
12
  "docs:statusline": "node scripts/docs-statusline.mjs",
13
- "postinstall": "node bin/cli.js install || true"
13
+ "postinstall": "node bin/cli.js install || true",
14
+ "publish:legacy": "node scripts/publish-legacy.mjs"
14
15
  },
15
16
  "files": [
16
17
  "bin/",
@@ -23,7 +23,10 @@ import { fileURLToPath } from 'node:url';
23
23
  import { userDataDir } from './paths.js';
24
24
  import { debug } from './debug.js';
25
25
 
26
- const PKG_NAME = 'claude-token-saver';
26
+ // Whichever name this copy was installed under (sprag-cli or the legacy
27
+ // claude-token-saver) is the one whose registry entry must be consulted.
28
+ import { createRequire } from 'node:module';
29
+ const PKG_NAME = createRequire(import.meta.url)('../package.json').name;
27
30
  const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24h — the registry is not a health endpoint
28
31
  const FETCH_TIMEOUT_MS = 5000;
29
32