@primitive.ai/prim 0.1.0-alpha.116 → 0.1.0-alpha.118
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 +21 -21
- package/SKILL.md +3 -3
- package/dist/{chunk-XG7S3LIL.js → chunk-3NJ4FUPK.js} +889 -919
- package/dist/{chunk-J5HBSRAV.js → chunk-4HEWA4IO.js} +1 -1
- package/dist/{chunk-LEUZDTNT.js → chunk-B3FVP7VQ.js} +1 -1
- package/dist/{chunk-4OEJ2ONG.js → chunk-C2AEY4AI.js} +2 -13
- package/dist/{chunk-S55JKCHQ.js → chunk-C2AJBMP2.js} +2 -2
- package/dist/{chunk-D3ZDZZYS.js → chunk-CHRICRVE.js} +17 -10
- package/dist/{chunk-HMD5K6W7.js → chunk-ECP7EGOD.js} +2 -2
- package/dist/{chunk-FTW4ZCBA.js → chunk-FPDOBG3H.js} +1 -1
- package/dist/{chunk-3TIKBQHV.js → chunk-JGOFEG6T.js} +6 -4
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/{chunk-KGBMU76T.js → chunk-JXQVXU2K.js} +1 -1
- package/dist/chunk-KZB4ABIB.js +13 -0
- package/dist/{chunk-I3J344DF.js → chunk-L3NUFCOD.js} +5 -5
- package/dist/{chunk-6IRAGUYK.js → chunk-LEEWUN74.js} +2 -2
- package/dist/{chunk-JKJ22ONL.js → chunk-OHLVHT6R.js} +6 -6
- package/dist/{chunk-RLBASQJD.js → chunk-OIXHRN32.js} +4 -4
- package/dist/{chunk-LLKJAET2.js → chunk-PYIIYC3A.js} +8 -16
- package/dist/{chunk-NEQI2VLM.js → chunk-Q4CWXKNV.js} +5 -5
- package/dist/{chunk-4SN5BCIG.js → chunk-QX7QFMLF.js} +2 -2
- package/dist/{chunk-CXMLAWC2.js → chunk-SCOEPFOV.js} +2 -2
- package/dist/{chunk-6JHKKLA2.js → chunk-UMSJ4DU2.js} +46 -46
- package/dist/{chunk-JKO6PZWQ.js → chunk-VEI7KUOU.js} +26 -48
- package/dist/hook-runtime/daemon/server.js +1 -0
- package/dist/hook-runtime/hooks/post-commit.js +1 -0
- package/dist/hook-runtime/hooks/post-rewrite.js +1 -0
- package/dist/hook-runtime/hooks/post-tool-use.js +29 -29
- package/dist/hook-runtime/hooks/pre-commit.js +1 -0
- package/dist/hook-runtime/hooks/pre-tool-use-worker.js +34746 -0
- package/dist/hook-runtime/hooks/pre-tool-use.js +82 -35549
- package/dist/hook-runtime/hooks/prim-hook.js +22 -22
- package/dist/hook-runtime/hooks/session-end.js +14 -14
- package/dist/hook-runtime/hooks/session-start.js +100 -100
- package/dist/hook-runtime/index.js +244 -256
- package/dist/hook-runtime/statusline-main.js +1 -0
- package/dist/hooks/post-commit.js +8 -7
- package/dist/hooks/post-rewrite.js +7 -6
- package/dist/hooks/post-tool-use.js +25 -22
- package/dist/hooks/pre-commit.js +5 -4
- package/dist/hooks/pre-tool-use-worker.js +222 -0
- package/dist/hooks/pre-tool-use.js +73 -257
- package/dist/hooks/prim-hook.js +25 -22
- package/dist/hooks/session-end.js +10 -7
- package/dist/hooks/session-start.js +22 -19
- package/dist/index.js +54 -53
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,24 +13,26 @@ presence — from the command line and via session + git hooks.
|
|
|
13
13
|
> organization, gates can warn, pause, or block a conflicting edit until you resolve
|
|
14
14
|
> the decision and retry. Automatic decision capture in active repositories is separate.
|
|
15
15
|
|
|
16
|
-
When Enforcement is enabled,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
When Enforcement is enabled, automatic V4 checks wait at most **two seconds**.
|
|
17
|
+
Confirmed conflicts found in that window retain the existing review/warning
|
|
18
|
+
behavior. Otherwise work proceeds silently, including on timeout, incomplete
|
|
19
|
+
coverage, authentication problems, or service failure. Admitted evaluations
|
|
20
|
+
continue in the backend for internal review; later results cannot stop or undo
|
|
21
|
+
an edit and do not send a user notification.
|
|
22
|
+
|
|
23
|
+
Explicit inspection and recovery retain their longer wait:
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
26
|
prim decisions preflight status <checkId>
|
|
23
|
-
prim decisions preflight resume <checkId>
|
|
27
|
+
prim decisions preflight resume <checkId>
|
|
24
28
|
```
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Primitive cannot guarantee that host failure boundary. Reload/restart and trust
|
|
33
|
-
the updated hooks as directed by the installer.
|
|
30
|
+
There is no V3 fallback. Re-run `prim <agent> install` and `prim doctor` to repair
|
|
31
|
+
the two-second hook timeout and fail-open settings. Claude uses its default
|
|
32
|
+
failure behavior, Cursor uses `failClosed: false`, and Hermes uses
|
|
33
|
+
`fail_closed: false`. Codex also permits the action if the hook fails. Reload or
|
|
34
|
+
restart the host as directed by the installer. Older installations retain their
|
|
35
|
+
blocking behavior until upgraded and repaired.
|
|
34
36
|
|
|
35
37
|
## Installation
|
|
36
38
|
|
|
@@ -583,18 +585,16 @@ They never install or upgrade the host or change your host settings.
|
|
|
583
585
|
|
|
584
586
|
```bash
|
|
585
587
|
pnpm test:preflight-host # Installed Codex
|
|
586
|
-
pnpm test:preflight-host:claude # Claude 2.1.
|
|
588
|
+
pnpm test:preflight-host:claude # Claude 2.1.284+ on PATH
|
|
587
589
|
pnpm test:preflight-host:claude --binary /path/to/compatible/claude
|
|
588
590
|
# CLI_CLAUDE_BIN also selects the Claude binary.
|
|
589
591
|
```
|
|
590
592
|
|
|
591
|
-
Each check covers completed allow, paused evaluation
|
|
592
|
-
backend JSON, CLI deadline expiry, hook crash, and host watchdog expiry.
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
its current limitation by expecting execution in those two cases; explicit CLI
|
|
597
|
-
denials still block. Unsupported Claude versions fail before the fixture runs.
|
|
593
|
+
Each check covers completed allow, confirmed conflict, paused evaluation, malformed
|
|
594
|
+
backend JSON, CLI deadline expiry, hook crash, and host watchdog expiry. Only the
|
|
595
|
+
confirmed conflict prevents the sentinel write. The hook budget and watchdog are
|
|
596
|
+
two seconds; no fixture waits minutes. Unsupported Claude versions fail before
|
|
597
|
+
the fixture runs.
|
|
598
598
|
The separate `pnpm test:preflight-v4 --schema /path/to/cli-http-v1.schema.json`
|
|
599
599
|
check validates the built CLI against a supplied authoritative backend contract.
|
|
600
600
|
|
package/SKILL.md
CHANGED
|
@@ -40,11 +40,11 @@ When Enforcement is enabled, before an edit (Claude Code: Edit/Write/MultiEdit;
|
|
|
40
40
|
|
|
41
41
|
- **deny** -- the edit is blocked. Name each governing Decision and the proposed conflicting edit. Overriding a Decision requires explicit human approval for that specific override. Reconcile bypasses are disabled until a host can provide verifiable human approval; keep the edit blocked and choose a compatible approach.
|
|
42
42
|
- **warn / additional context** -- the edit proceeds, but a relevant prior decision is surfaced. Read it. Cursor, Codex, and Hermes map a would-be `ask` to **deny**. Do not change gate settings, use sandbox escalation, or request prefix permissions to evade the block. Automatic approval review, `--yes`, and an agent assertion are not human approval.
|
|
43
|
-
- **
|
|
43
|
+
- **No confirmed conflict within two seconds** -- work proceeds silently. Incomplete checks and service failures do not deny the tool or add a notice. Already admitted evaluations continue for internal review; later findings do not stop or undo that edit.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The two-second automatic budget includes local preparation, authentication, and network requests. A confirmed conflict can retain normal block/warn policy while other Decisions are still being evaluated; partial coverage remains explicit in the receipt. The full tool input is hashed before redaction and truncation. The CLI never falls back to V3. Explicit `prim decisions preflight status <checkId>` and `resume <checkId>` remain available for internal inspection and recovery with the longer manual budget.
|
|
46
46
|
|
|
47
|
-
Run `prim <agent> install` to repair the
|
|
47
|
+
Run `prim <agent> install` to repair the two-second hook timeout and fail-open settings, then `prim doctor`. Claude uses its default failure behavior; Cursor uses `failClosed: false`; Hermes uses `fail_closed: false`. Codex also permits tools on hook failure. Restart or refresh the host as directed. Older CLI installations retain blocking behavior until upgraded and repaired.
|
|
48
48
|
|
|
49
49
|
## Read the graph before large or load-bearing edits
|
|
50
50
|
|