@primitive.ai/prim 0.1.0-alpha.107 → 0.1.0-alpha.109
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 +2 -2
- package/SKILL.md +21 -16
- package/dist/{chunk-6VFUHQ4J.js → chunk-AIAYIXBJ.js} +1 -1
- package/dist/{chunk-7NNJ67YN.js → chunk-D24AUSVP.js} +1 -1
- package/dist/{chunk-4CO4A6NR.js → chunk-EQYIPUFX.js} +1 -1
- package/dist/{chunk-6L7EYXVF.js → chunk-FDXDV2AT.js} +3 -3
- package/dist/{chunk-FFYZ3XMX.js → chunk-GFJ4QIVR.js} +210 -117
- package/dist/{chunk-2EKPBZNA.js → chunk-IQZA65NV.js} +19 -24
- package/dist/{chunk-P5I4HGMW.js → chunk-LFZYNNQQ.js} +1 -1
- package/dist/{chunk-TPWJQD5E.js → chunk-QJOK2VOE.js} +1 -1
- package/dist/{chunk-72CQVK4E.js → chunk-RXD6LFA2.js} +1 -1
- package/dist/{chunk-LVRD562C.js → chunk-YQFJUBNU.js} +1 -1
- package/dist/daemon/server.js +210 -117
- package/dist/hook-runtime/daemon/server.js +210 -117
- package/dist/hook-runtime/hooks/post-commit.js +210 -117
- package/dist/hook-runtime/hooks/post-rewrite.js +210 -117
- package/dist/hook-runtime/hooks/post-tool-use.js +210 -117
- package/dist/hook-runtime/hooks/pre-tool-use.js +210 -117
- package/dist/hook-runtime/hooks/prim-hook.js +210 -117
- package/dist/hook-runtime/hooks/session-start.js +225 -137
- package/dist/hook-runtime/index.js +4297 -355
- package/dist/hooks/post-commit.js +3 -3
- package/dist/hooks/post-rewrite.js +3 -3
- package/dist/hooks/post-tool-use.js +9 -9
- package/dist/hooks/pre-tool-use.js +6 -6
- package/dist/hooks/prim-hook.js +8 -8
- package/dist/hooks/session-start.js +4 -4
- package/dist/index.js +321 -158
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ After successful setup, the optional **author story** puts you in a new engineer
|
|
|
49
49
|
shoes in a disposable project:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
|
-
Implement CSV export → Your earlier Decision blocks email →
|
|
52
|
+
Implement CSV export → Your earlier Decision blocks email → Accept or Supercede
|
|
53
53
|
→ Real outcome email
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -107,7 +107,7 @@ so the agent runs it directly — instead of fetching a doc and executing a comm
|
|
|
107
107
|
it, which an auto-mode safety classifier blocks as untrusted-origin code:
|
|
108
108
|
|
|
109
109
|
```text
|
|
110
|
-
Install the Primitive CLI and activate passive decision capture for this repository: run `npx --yes @primitive.ai/prim@latest setup` and
|
|
110
|
+
Install the Primitive CLI and activate passive decision capture for this repository: run `npx --yes @primitive.ai/prim@latest setup` and show concise progress plus actionable warnings. Drive setup and its onboarding nextAction yourself; I'll handle browser authorization and any hook-trust review the agent requires. This request authorizes setup's built-in activation of this repository and an idempotent retry of that step, but not activation in another repository or creation of a Decision. If enable or health fails, surface the actual error; do not claim fresh activation approval is required. Then show me the welcome.
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
That single command runs the whole install and current-repository activation in one
|
package/SKILL.md
CHANGED
|
@@ -161,17 +161,19 @@ observed hook execution, and verified capture are different states. Preserve
|
|
|
161
161
|
`health` warnings and `readiness` rather than declaring everything active.
|
|
162
162
|
|
|
163
163
|
If isolation is pending, run `diagnosticAction` once. It is safe before isolation:
|
|
164
|
-
it reports the installed runtime
|
|
165
|
-
run. The acknowledgment event is **PreToolUse**,
|
|
166
|
-
**Shell** for Cursor, and **terminal** for Hermes.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
run
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
164
|
+
it reports the installed runtime, native Codex trust when available, and the last
|
|
165
|
+
content-free observation for this run. The acknowledgment event is **PreToolUse**,
|
|
166
|
+
with **Bash** for Codex/Claude, **Shell** for Cursor, and **terminal** for Hermes.
|
|
167
|
+
Codex snapshots hooks in running sessions: a trusted file is not proof that the
|
|
168
|
+
session loaded it. Setup requests a native reload without changing trust. If the
|
|
169
|
+
diagnostic returns `repairAction`, run it once, then follow `resumeAction` for the
|
|
170
|
+
same run. If refresh cannot reach the calling host, have the user exit and resume
|
|
171
|
+
that same Codex session to load its hooks. Ask for hook review only when reported;
|
|
172
|
+
never repeat trust instructions for already-trusted hooks. Missing evidence is
|
|
173
|
+
unknown, not proof of healthy or disabled hooks. After one repair, retry only on
|
|
174
|
+
new evidence. Retain the run even after an expired npm cache. Never fabricate an
|
|
175
|
+
acknowledgment, dump hook configuration/transcripts, or restart the retry budget
|
|
176
|
+
with a new tour. Offer skip only as an option, not as the diagnosis.
|
|
175
177
|
|
|
176
178
|
Run follow-up actions with the configuration-directory access already authorized
|
|
177
179
|
for setup, subject to host policy. Report EPERM/EACCES with the actual path and
|
|
@@ -190,8 +192,8 @@ If blocked, end with the observed cause (or explicitly unknown boundary), the
|
|
|
190
192
|
single next repair, and the command to resume the retained run.
|
|
191
193
|
|
|
192
194
|
Render each `presentation` once as Markdown, preserving diagrams and file evidence.
|
|
193
|
-
Do not echo JSON/STDERR, expand the records, or add a prose recap. Keep the
|
|
194
|
-
**
|
|
195
|
+
Do not echo JSON/STDERR, expand the records, or add a prose recap. Keep the returned
|
|
196
|
+
**[DEMO]** titles. This uses the production semantic
|
|
195
197
|
evaluator on private demo records and a demo-only blocking policy; native production
|
|
196
198
|
hooks did not supply the verdict. Production outcomes still vary by agent and
|
|
197
199
|
Decision state, including Claude's permission prompt.
|
|
@@ -201,10 +203,13 @@ same chat. At `awaitUserPrompt`, show the copyable CSV-export task and **wait fo
|
|
|
201
203
|
user to enter it**. Only then run `attemptAction`. Do not auto-submit it, ask them to
|
|
202
204
|
adopt the prior Decision, or implement the feature yourself.
|
|
203
205
|
|
|
204
|
-
At the actual block, show the unchanged file and
|
|
205
|
-
|
|
206
|
+
At the actual block, show the returned unchanged file and **Accept / Supercede** choices.
|
|
207
|
+
Accept uses `choices.adhere`; Supercede uses `choices.supersede`. Supercede approves the replacement,
|
|
206
208
|
**Allow customer names and email addresses in CSV exports**, and requires a short
|
|
207
|
-
reason in the user's own words.
|
|
209
|
+
reason in the user's own words. If missing, ask `choices.supersede.prompt` exactly;
|
|
210
|
+
if already supplied, do not ask again. The exploration prompts in the success message
|
|
211
|
+
are suggestions for the participant, not actions to execute automatically.
|
|
212
|
+
Append `'--reason'` and their single-quoted reason
|
|
208
213
|
to `choices.supersede.command`; escape any apostrophe as `'\''`, matching the
|
|
209
214
|
command's existing shell quoting. Never invent a reason or execute a placeholder.
|
|
210
215
|
Do not call production `reconcile` or `decisions create` for these samples.
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
analyzeShellTargets,
|
|
6
6
|
extractFileTargets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D24AUSVP.js";
|
|
8
8
|
import {
|
|
9
9
|
scrubEnvironmentPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YQFJUBNU.js";
|
|
11
11
|
import {
|
|
12
12
|
cachedCollectScopeAdmits
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GFJ4QIVR.js";
|
|
14
14
|
import {
|
|
15
15
|
canonicalRepositoryPath,
|
|
16
16
|
currentBranch,
|