@primitive.ai/prim 0.1.0-alpha.103 → 0.1.0-alpha.104
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/README.md +4 -1
- package/dist/{chunk-O2WV5SQZ.js → chunk-2EKPBZNA.js} +1 -1
- package/dist/{chunk-6C3CCVDI.js → chunk-NH3VC7YO.js} +1 -1
- package/dist/{chunk-K4JWJ6OM.js → chunk-PO5QAYD7.js} +8 -5
- package/dist/hook-runtime/index.js +8 -5
- package/dist/hooks/post-tool-use.js +2 -2
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/prim-hook.js +2 -2
- package/dist/hooks/session-end.js +2 -2
- package/dist/hooks/session-start.js +3 -3
- package/dist/index.js +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -15,7 +15,10 @@ presence — from the command line and via session + git hooks.
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
-
Requires Node.js
|
|
18
|
+
Requires Node.js 22.23.4+, 24.22.1+, or 26.12.1+ within those major versions.
|
|
19
|
+
Node.js 20 is no longer supported. After updating Node.js, restart the daemon
|
|
20
|
+
with `prim daemon restart` and rerun your agent's `prim <agent> install` command
|
|
21
|
+
and `prim hooks install` to repin their runtimes to the updated executable.
|
|
19
22
|
|
|
20
23
|
```bash
|
|
21
24
|
npm install -g @primitive.ai/prim
|
|
@@ -440,15 +440,18 @@ function hasSafeRuntimeLayout(paths, selected) {
|
|
|
440
440
|
(relativePath) => privateFile(join(selected.dir, relativePath), DATA_FILE_MODE)
|
|
441
441
|
);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function sameNodeExecutable(recorded, desired) {
|
|
444
444
|
try {
|
|
445
|
-
if (!statSync(
|
|
446
|
-
accessSync(
|
|
447
|
-
return realpathSync(
|
|
445
|
+
if (!statSync(recorded).isFile()) return false;
|
|
446
|
+
accessSync(recorded, constants.X_OK);
|
|
447
|
+
return realpathSync(recorded) === realpathSync(desired);
|
|
448
448
|
} catch {
|
|
449
449
|
return false;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
+
function recordedNodeMatchesCurrentProcess(nodePath) {
|
|
453
|
+
return sameNodeExecutable(nodePath, process.execPath);
|
|
454
|
+
}
|
|
452
455
|
function inspectHookRuntime(options = {}) {
|
|
453
456
|
let paths;
|
|
454
457
|
try {
|
|
@@ -575,7 +578,7 @@ function stageHookRuntime(options = {}) {
|
|
|
575
578
|
if (precedence === void 0) {
|
|
576
579
|
throw new Error("cannot stage hook runtime: selected release version is malformed");
|
|
577
580
|
}
|
|
578
|
-
const selectRequested = !selected || precedence < 0;
|
|
581
|
+
const selectRequested = !selected || precedence < 0 || precedence === 0 && !sameNodeExecutable(selected.manifest.nodePath, nodePath);
|
|
579
582
|
const requestedExists = existsSync(releaseDir);
|
|
580
583
|
const protectedBefore = new Set(selected ? [selected.name] : []);
|
|
581
584
|
if (selectRequested && requestedExists) protectedBefore.add(releaseName);
|
|
@@ -33849,15 +33849,18 @@ function hasSafeRuntimeLayout(paths, selected) {
|
|
|
33849
33849
|
(relativePath) => privateFile(join11(selected.dir, relativePath), DATA_FILE_MODE)
|
|
33850
33850
|
);
|
|
33851
33851
|
}
|
|
33852
|
-
function
|
|
33852
|
+
function sameNodeExecutable(recorded, desired) {
|
|
33853
33853
|
try {
|
|
33854
|
-
if (!statSync2(
|
|
33855
|
-
accessSync(
|
|
33856
|
-
return realpathSync2(
|
|
33854
|
+
if (!statSync2(recorded).isFile()) return false;
|
|
33855
|
+
accessSync(recorded, constants2.X_OK);
|
|
33856
|
+
return realpathSync2(recorded) === realpathSync2(desired);
|
|
33857
33857
|
} catch {
|
|
33858
33858
|
return false;
|
|
33859
33859
|
}
|
|
33860
33860
|
}
|
|
33861
|
+
function recordedNodeMatchesCurrentProcess(nodePath) {
|
|
33862
|
+
return sameNodeExecutable(nodePath, process.execPath);
|
|
33863
|
+
}
|
|
33861
33864
|
function inspectHookRuntime(options = {}) {
|
|
33862
33865
|
let paths;
|
|
33863
33866
|
try {
|
|
@@ -33984,7 +33987,7 @@ function stageHookRuntime(options = {}) {
|
|
|
33984
33987
|
if (precedence === void 0) {
|
|
33985
33988
|
throw new Error("cannot stage hook runtime: selected release version is malformed");
|
|
33986
33989
|
}
|
|
33987
|
-
const selectRequested = !selected || precedence < 0;
|
|
33990
|
+
const selectRequested = !selected || precedence < 0 || precedence === 0 && !sameNodeExecutable(selected.manifest.nodePath, nodePath);
|
|
33988
33991
|
const requestedExists = existsSync5(releaseDir);
|
|
33989
33992
|
const protectedBefore = new Set(selected ? [selected.name] : []);
|
|
33990
33993
|
if (selectRequested && requestedExists) protectedBefore.add(releaseName);
|
|
@@ -44,8 +44,8 @@ import {
|
|
|
44
44
|
parseAgent,
|
|
45
45
|
readHookStdin,
|
|
46
46
|
shouldSuppressImportedCursorHandler
|
|
47
|
-
} from "../chunk-
|
|
48
|
-
import "../chunk-
|
|
47
|
+
} from "../chunk-NH3VC7YO.js";
|
|
48
|
+
import "../chunk-PO5QAYD7.js";
|
|
49
49
|
import "../chunk-5LRKJTLA.js";
|
|
50
50
|
import {
|
|
51
51
|
currentBranch,
|
|
@@ -38,8 +38,8 @@ import {
|
|
|
38
38
|
parseAgent,
|
|
39
39
|
readHookStdin,
|
|
40
40
|
shouldSuppressImportedCursorHandler
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
} from "../chunk-NH3VC7YO.js";
|
|
42
|
+
import "../chunk-PO5QAYD7.js";
|
|
43
43
|
import "../chunk-5LRKJTLA.js";
|
|
44
44
|
import {
|
|
45
45
|
canonicalGitRoot,
|
package/dist/hooks/prim-hook.js
CHANGED
|
@@ -52,8 +52,8 @@ import {
|
|
|
52
52
|
parseAgent,
|
|
53
53
|
readHookStdin,
|
|
54
54
|
shouldSuppressImportedCursorHandler
|
|
55
|
-
} from "../chunk-
|
|
56
|
-
import "../chunk-
|
|
55
|
+
} from "../chunk-NH3VC7YO.js";
|
|
56
|
+
import "../chunk-PO5QAYD7.js";
|
|
57
57
|
import "../chunk-5LRKJTLA.js";
|
|
58
58
|
import {
|
|
59
59
|
currentBranch,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
parseAgent,
|
|
5
5
|
readHookStdin,
|
|
6
6
|
shouldSuppressImportedCursorHandler
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-NH3VC7YO.js";
|
|
8
|
+
import "../chunk-PO5QAYD7.js";
|
|
9
9
|
import {
|
|
10
10
|
daemonRequest
|
|
11
11
|
} from "../chunk-5LRKJTLA.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
kickDaemonEnsure,
|
|
8
8
|
refreshClaudePlugins,
|
|
9
9
|
warmBinCache
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-2EKPBZNA.js";
|
|
11
11
|
import {
|
|
12
12
|
buildHookOutput,
|
|
13
13
|
handoffHookOutput
|
|
@@ -42,10 +42,10 @@ import {
|
|
|
42
42
|
parseAgent,
|
|
43
43
|
readHookStdin,
|
|
44
44
|
shouldSuppressImportedCursorHandler
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-NH3VC7YO.js";
|
|
46
46
|
import {
|
|
47
47
|
MANAGED_GIT_HOOK_NAMES
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-PO5QAYD7.js";
|
|
49
49
|
import {
|
|
50
50
|
daemonRequest
|
|
51
51
|
} from "../chunk-5LRKJTLA.js";
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveRepositoryBinding,
|
|
20
20
|
uninstallGitHookAtPath,
|
|
21
21
|
uninstallProjectGitHook
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2EKPBZNA.js";
|
|
23
23
|
import {
|
|
24
24
|
requireDurableIngestAcknowledgement
|
|
25
25
|
} from "./chunk-IDMLJ4TM.js";
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
stableNodePath,
|
|
139
139
|
stageHookRuntime,
|
|
140
140
|
stripCommand
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-PO5QAYD7.js";
|
|
142
142
|
import {
|
|
143
143
|
daemonIsLive,
|
|
144
144
|
daemonRequest
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primitive.ai/prim",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.104",
|
|
4
4
|
"description": "CLI for Primitive's decision graph — passive decision capture, conflict gate, and team presence",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"pre-commit"
|
|
25
25
|
],
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": "
|
|
27
|
+
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
|
|
28
28
|
},
|
|
29
29
|
"packageManager": "pnpm@9.15.9",
|
|
30
30
|
"bin": {
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
"@types/diff": "^5.2.0",
|
|
77
77
|
"@types/node": "^25.5.0",
|
|
78
78
|
"@types/update-notifier": "^6.0.8",
|
|
79
|
-
"@vitest/coverage-v8": "^
|
|
79
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
80
80
|
"ajv": "8.20.0",
|
|
81
81
|
"json-schema-to-typescript": "15.0.4",
|
|
82
82
|
"tsup": "^8.0.0",
|
|
83
83
|
"typescript": "^5.5.0",
|
|
84
|
-
"vitest": "^
|
|
84
|
+
"vitest": "^4.1.12"
|
|
85
85
|
}
|
|
86
86
|
}
|