@primitive.ai/prim 0.1.0-alpha.122 → 0.1.0-alpha.124

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.
Files changed (47) hide show
  1. package/README.md +81 -5
  2. package/dist/{chunk-5ME3WD3P.js → chunk-3OKVMKK2.js} +6 -3
  3. package/dist/chunk-5BZWFN62.js +206 -0
  4. package/dist/{chunk-QG3GASJO.js → chunk-5KPDY5GF.js} +4 -4
  5. package/dist/{chunk-HLMC7VS4.js → chunk-5MH2C5QG.js} +3878 -2644
  6. package/dist/{chunk-NMZSCSMY.js → chunk-6PSCGY2A.js} +11 -1
  7. package/dist/{chunk-OXW6PSPT.js → chunk-6VJ7C2B5.js} +15 -3
  8. package/dist/{chunk-DQ4I3FLF.js → chunk-6W72SEXC.js} +3 -3
  9. package/dist/{chunk-4M23K2KZ.js → chunk-6WKJWW6D.js} +2 -2
  10. package/dist/{chunk-JYPVPYW3.js → chunk-A6YTFBQ4.js} +3 -3
  11. package/dist/{chunk-7LXRFXZG.js → chunk-DGZX3MID.js} +3 -3
  12. package/dist/{chunk-4NUGCUQC.js → chunk-EER7VG3P.js} +2 -2
  13. package/dist/{chunk-JZC2LHS6.js → chunk-EWV7VIZ3.js} +1 -1
  14. package/dist/{chunk-WN7OURQ3.js → chunk-KMWXI7KO.js} +1 -1
  15. package/dist/{chunk-HG7FJK7R.js → chunk-KTXJJE5K.js} +2 -2
  16. package/dist/{chunk-4GYJHN26.js → chunk-Q2PVD5W2.js} +1575 -549
  17. package/dist/{chunk-S3ZIMGXV.js → chunk-QZWLZH6D.js} +76 -2
  18. package/dist/{chunk-ZQ7UK5US.js → chunk-TS2NX6YT.js} +31 -9
  19. package/dist/{chunk-AKGRY7OU.js → chunk-WLVEXOHC.js} +145 -63
  20. package/dist/{chunk-FT673ALA.js → chunk-WQFJ5TEG.js} +2 -2
  21. package/dist/{chunk-T2T45KF6.js → chunk-ZMH6GJUG.js} +4 -4
  22. package/dist/daemon/server.js +7795 -5449
  23. package/dist/hook-runtime/daemon/server.js +7795 -5449
  24. package/dist/hook-runtime/hooks/post-commit.js +5828 -4329
  25. package/dist/hook-runtime/hooks/post-rewrite.js +4331 -2833
  26. package/dist/hook-runtime/hooks/post-tool-use.js +5242 -2892
  27. package/dist/hook-runtime/hooks/pre-commit.js +1253 -280
  28. package/dist/hook-runtime/hooks/pre-tool-use-worker.js +4272 -1982
  29. package/dist/hook-runtime/hooks/pre-tool-use.js +13 -3
  30. package/dist/hook-runtime/hooks/prim-hook.js +4719 -2479
  31. package/dist/hook-runtime/hooks/session-end.js +393 -140
  32. package/dist/hook-runtime/hooks/session-start.js +4207 -1998
  33. package/dist/hook-runtime/index.js +6157 -3544
  34. package/dist/hook-runtime/statusline-main.js +368 -122
  35. package/dist/hooks/post-commit.js +7 -7
  36. package/dist/hooks/post-rewrite.js +6 -6
  37. package/dist/hooks/post-tool-use.js +31 -21
  38. package/dist/hooks/pre-commit.js +4 -4
  39. package/dist/hooks/pre-tool-use-worker.js +88 -18
  40. package/dist/hooks/pre-tool-use.js +13 -3
  41. package/dist/hooks/prim-hook.js +16 -16
  42. package/dist/hooks/session-end.js +4 -4
  43. package/dist/hooks/session-start.js +16 -12
  44. package/dist/index.js +230 -150
  45. package/dist/statusline-main.js +368 -122
  46. package/package.json +5 -2
  47. package/dist/chunk-RRAC76LJ.js +0 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primitive.ai/prim",
3
- "version": "0.1.0-alpha.122",
3
+ "version": "0.1.0-alpha.124",
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",
@@ -70,17 +70,20 @@
70
70
  "typecheck": "tsc --noEmit",
71
71
  "check:reconcile-golden": "node scripts/check-reconcile-golden.mjs",
72
72
  "test": "vitest run",
73
+ "test:machine-runtime": "node scripts/check-machine-runtime.mjs",
73
74
  "test:preflight-host": "node scripts/check-codex-preflight-host.mjs",
74
75
  "test:preflight-host:claude": "node scripts/check-claude-preflight-host.mjs",
75
76
  "test:preflight-v4": "node scripts/check-preflight-v4-e2e.mjs",
76
77
  "test:watch": "vitest",
77
78
  "test:coverage": "vitest run --coverage",
78
- "check:shell-targets-golden": "node scripts/check-shell-targets-golden.mjs"
79
+ "check:shell-targets-golden": "node scripts/check-shell-targets-golden.mjs",
80
+ "test:preflight-v3": "node scripts/check-preflight-v3-e2e.mjs"
79
81
  },
80
82
  "dependencies": {
81
83
  "@lezer/common": "^1.5.4",
82
84
  "@lezer/javascript": "^1.5.6",
83
85
  "@lezer/python": "^1.1.19",
86
+ "@napi-rs/keyring": "2.1.2",
84
87
  "commander": "^12.1.0",
85
88
  "diff": "^5.2.0",
86
89
  "unbash": "4.0.3",
@@ -1,36 +0,0 @@
1
- import {
2
- scheduleCollectScopeRefresh
3
- } from "./chunk-HLMC7VS4.js";
4
-
5
- // src/ingest-response.ts
6
- var IngestAcknowledgementError = class extends Error {
7
- constructor(message) {
8
- super(message);
9
- this.name = "IngestAcknowledgementError";
10
- }
11
- };
12
- function requireDurableIngestAcknowledgement(value, expected, cwd = process.cwd()) {
13
- if (typeof value !== "object" || value === null) {
14
- throw new IngestAcknowledgementError("ingest response was not an object");
15
- }
16
- const response = value;
17
- if (response.disposition !== "persisted") {
18
- throw new IngestAcknowledgementError("ingest response did not confirm persistence");
19
- }
20
- if (response.acknowledged !== expected) {
21
- throw new IngestAcknowledgementError(
22
- `ingest acknowledged ${String(response.acknowledged)} of ${String(expected)} moves`
23
- );
24
- }
25
- if (typeof response.collectScopeVersion === "number" && Number.isSafeInteger(response.collectScopeVersion) && response.collectScopeVersion >= 0) {
26
- const roots = typeof cwd === "string" ? [cwd] : cwd;
27
- for (const root of new Set(roots)) {
28
- scheduleCollectScopeRefresh(root, response.collectScopeVersion);
29
- }
30
- }
31
- return value;
32
- }
33
-
34
- export {
35
- requireDurableIngestAcknowledgement
36
- };