@primitive.ai/prim 0.1.0-alpha.117 → 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.
Files changed (47) hide show
  1. package/README.md +21 -21
  2. package/SKILL.md +3 -3
  3. package/dist/{chunk-XG7S3LIL.js → chunk-3NJ4FUPK.js} +889 -919
  4. package/dist/{chunk-J5HBSRAV.js → chunk-4HEWA4IO.js} +1 -1
  5. package/dist/{chunk-LEUZDTNT.js → chunk-B3FVP7VQ.js} +1 -1
  6. package/dist/{chunk-4OEJ2ONG.js → chunk-C2AEY4AI.js} +2 -13
  7. package/dist/{chunk-S55JKCHQ.js → chunk-C2AJBMP2.js} +2 -2
  8. package/dist/{chunk-D3ZDZZYS.js → chunk-CHRICRVE.js} +17 -10
  9. package/dist/{chunk-HMD5K6W7.js → chunk-ECP7EGOD.js} +2 -2
  10. package/dist/{chunk-FTW4ZCBA.js → chunk-FPDOBG3H.js} +1 -1
  11. package/dist/{chunk-3TIKBQHV.js → chunk-JGOFEG6T.js} +6 -4
  12. package/dist/chunk-JSBRDJBE.js +30 -0
  13. package/dist/{chunk-KGBMU76T.js → chunk-JXQVXU2K.js} +1 -1
  14. package/dist/chunk-KZB4ABIB.js +13 -0
  15. package/dist/{chunk-I3J344DF.js → chunk-L3NUFCOD.js} +5 -5
  16. package/dist/{chunk-6IRAGUYK.js → chunk-LEEWUN74.js} +2 -2
  17. package/dist/{chunk-JKJ22ONL.js → chunk-OHLVHT6R.js} +6 -6
  18. package/dist/{chunk-RLBASQJD.js → chunk-OIXHRN32.js} +4 -4
  19. package/dist/{chunk-LLKJAET2.js → chunk-PYIIYC3A.js} +8 -16
  20. package/dist/{chunk-NEQI2VLM.js → chunk-Q4CWXKNV.js} +5 -5
  21. package/dist/{chunk-4SN5BCIG.js → chunk-QX7QFMLF.js} +2 -2
  22. package/dist/{chunk-CXMLAWC2.js → chunk-SCOEPFOV.js} +2 -2
  23. package/dist/{chunk-6JHKKLA2.js → chunk-UMSJ4DU2.js} +46 -46
  24. package/dist/{chunk-JKO6PZWQ.js → chunk-VEI7KUOU.js} +26 -48
  25. package/dist/hook-runtime/daemon/server.js +1 -0
  26. package/dist/hook-runtime/hooks/post-commit.js +1 -0
  27. package/dist/hook-runtime/hooks/post-rewrite.js +1 -0
  28. package/dist/hook-runtime/hooks/post-tool-use.js +29 -29
  29. package/dist/hook-runtime/hooks/pre-commit.js +1 -0
  30. package/dist/hook-runtime/hooks/pre-tool-use-worker.js +34746 -0
  31. package/dist/hook-runtime/hooks/pre-tool-use.js +82 -35547
  32. package/dist/hook-runtime/hooks/prim-hook.js +22 -22
  33. package/dist/hook-runtime/hooks/session-end.js +14 -14
  34. package/dist/hook-runtime/hooks/session-start.js +100 -100
  35. package/dist/hook-runtime/index.js +244 -256
  36. package/dist/hook-runtime/statusline-main.js +1 -0
  37. package/dist/hooks/post-commit.js +8 -7
  38. package/dist/hooks/post-rewrite.js +7 -6
  39. package/dist/hooks/post-tool-use.js +25 -22
  40. package/dist/hooks/pre-commit.js +5 -4
  41. package/dist/hooks/pre-tool-use-worker.js +222 -0
  42. package/dist/hooks/pre-tool-use.js +73 -255
  43. package/dist/hooks/prim-hook.js +25 -22
  44. package/dist/hooks/session-end.js +10 -7
  45. package/dist/hooks/session-start.js +22 -19
  46. package/dist/index.js +54 -53
  47. package/package.json +3 -3
@@ -1,269 +1,87 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- PREFLIGHT_PROTOCOL_VERSION,
4
- PREFLIGHT_WAIT_MS,
5
- PreflightPausedError,
6
- boundedClientVersion,
7
- editPreview,
8
- hasCompleteCoverage,
9
- pausedResult,
10
- proposalFor,
11
- proposalIsTruncated,
12
- resolvePreflightTargets,
13
- resultForPreflight,
14
- toolInputDigest,
15
- waitForPreflight
16
- } from "../chunk-D3ZDZZYS.js";
17
- import {
18
- observeDemoInvocation
19
- } from "../chunk-CXMLAWC2.js";
20
- import {
21
- appendCodexContext,
22
- hasVisibleCodexMessage,
23
- prepareCodexContext
24
- } from "../chunk-LLKJAET2.js";
25
- import {
26
- buildCodexOutput,
27
- buildCursorOutput,
28
- buildHermesOutput,
29
- buildHookOutput,
30
- demoteForMode,
31
- failOpenCodex,
32
- failOpenCursor,
33
- failOpenHermes,
34
- failOpenOutput,
35
- readHookMode
36
- } from "../chunk-I3J344DF.js";
37
- import "../chunk-4SN5BCIG.js";
38
- import "../chunk-6IRAGUYK.js";
39
- import {
40
- cachedCollectScopeAdmits
41
- } from "../chunk-3TIKBQHV.js";
42
- import {
43
- HttpError
44
- } from "../chunk-6JHKKLA2.js";
45
- import {
46
- normalizeEnvelope,
47
- parseAgent,
48
- readHookStdin,
49
- shouldSuppressImportedCursorHandler
50
- } from "../chunk-4OEJ2ONG.js";
51
- import "../chunk-JKO6PZWQ.js";
52
- import "../chunk-J5HBSRAV.js";
53
- import {
54
- currentBranch,
55
- githubRepositoryFullName,
56
- isRepoActive,
57
- packageVersion,
58
- repoSyncId,
59
- resolveAuthCredential
60
- } from "../chunk-XG7S3LIL.js";
3
+ parseAgent
4
+ } from "../chunk-KZB4ABIB.js";
5
+ import "../chunk-JSBRDJBE.js";
61
6
 
62
7
  // src/hooks/pre-tool-use.ts
63
- var STDIN_TIMEOUT_MS = 1e3;
64
- var deadline = performance.now() + Math.max(0, PREFLIGHT_WAIT_MS - Math.ceil(process.uptime() * 1e3));
65
- var activeMutation = false;
8
+ import { spawn } from "child_process";
9
+ import { fileURLToPath } from "url";
10
+ var BUDGET_MS = 2e3;
11
+ var OUTPUT_RESERVE_MS = 150;
12
+ var MAX_OUTPUT_BYTES = 262144;
66
13
  var agent = parseAgent(process.argv);
67
- async function emit(output) {
68
- return await new Promise((resolve) => {
69
- try {
70
- process.stdout.write(`${JSON.stringify(output)}
71
- `, (error) => resolve(!error));
72
- } catch {
73
- resolve(false);
74
- }
75
- });
76
- }
77
- async function emitWithAcknowledgment(output, acknowledge) {
78
- const handedOff = await emit(output);
79
- await acknowledge?.(handedOff);
80
- }
81
- function failOpen() {
82
- if (agent === "hermes") return failOpenHermes();
83
- if (agent === "cursor") return failOpenCursor();
84
- return agent === "codex" ? failOpenCodex() : failOpenOutput();
85
- }
86
- function invocationId(envelope) {
87
- const value = agent === "hermes" ? envelope.extra?.tool_call_id : envelope.tool_use_id;
88
- return typeof value === "string" && value.length > 0 ? value : void 0;
89
- }
90
- function hermesAdvisory(result, aggregate) {
91
- const parts = [];
92
- if (aggregate === "warn") parts.push(result.reason);
93
- if (result.verdict === "unavailable") {
94
- parts.push(result.unavailable ?? result.reason);
95
- }
96
- if (result.additionalContext && result.additionalContext !== result.reason) {
97
- parts.push(result.additionalContext);
98
- }
99
- const message = [...new Set(parts.filter(Boolean))].join("\n");
100
- return message.startsWith("[primitive]") ? message : message ? `[primitive] ${message}` : "";
101
- }
102
- function preflightFailure(error) {
103
- if (!(error instanceof HttpError && error.status === 401)) {
104
- return "enforcement service unavailable; change was not verified";
105
- }
106
- if (resolveAuthCredential()?.source === "environment") {
107
- return "PRIM_TOKEN was rejected; change was not verified";
108
- }
109
- return "authentication required; run `prim auth login`; change was not verified";
110
- }
111
- async function emitUnverified(message, checkId) {
112
- const result = pausedResult(message, checkId);
113
- const output = agent === "hermes" ? buildHermesOutput("deny", [result]) : agent === "cursor" ? buildCursorOutput("deny", [result]) : agent === "codex" ? buildCodexOutput("deny", [result]) : buildHookOutput("deny", [result]);
114
- await emit(output);
115
- }
116
- async function main() {
117
- const mode = readHookMode(process.env);
118
- if (mode === "off") {
119
- await emit(failOpen());
120
- return;
121
- }
122
- let raw;
14
+ var silent = agent === "cursor" ? { permission: "allow" } : agent === "claude_code" ? {
15
+ hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "allow" }
16
+ } : {};
17
+ var remaining = Math.max(0, BUDGET_MS - process.uptime() * 1e3 - OUTPUT_RESERVE_MS);
18
+ var child;
19
+ var finished = false;
20
+ var stdout = "";
21
+ var stderr = "";
22
+ function stopWorker() {
23
+ if (!child?.pid) return;
123
24
  try {
124
- raw = await readHookStdin(STDIN_TIMEOUT_MS);
25
+ if (process.platform !== "win32") process.kill(-child.pid, "SIGKILL");
26
+ else child.kill("SIGKILL");
125
27
  } catch {
126
- await emitUnverified("The tool input could not be read completely");
127
- return;
128
- }
129
- let envelope;
130
- try {
131
- const incoming = JSON.parse(raw);
132
- if (!incoming || typeof incoming !== "object" || Array.isArray(incoming)) {
133
- throw new Error("The hook envelope must be an object");
134
- }
135
- const fields = incoming;
136
- if (agent !== "cursor" && shouldSuppressImportedCursorHandler(fields, "prim-pre-tool-use")) {
137
- await emit(failOpenCursor());
138
- return;
139
- }
140
- envelope = normalizeEnvelope(fields, agent);
141
- if (typeof envelope.hook_event_name !== "string" || !envelope.hook_event_name) {
142
- throw new Error("The hook event identity is unavailable");
143
- }
144
- } catch {
145
- await emitUnverified("The tool invocation could not be identified safely");
146
- return;
147
28
  }
29
+ }
30
+ function finish(output = silent, diagnostics = "") {
31
+ if (finished) return;
32
+ finished = true;
33
+ clearTimeout(timer);
34
+ process.stdin.unpipe();
35
+ process.stdin.pause();
36
+ stopWorker();
37
+ if (diagnostics) process.stderr.write(diagnostics);
38
+ process.stdout.write(`${JSON.stringify(output)}
39
+ `, () => process.exit(0));
40
+ }
41
+ var timer = setTimeout(() => finish(), remaining);
42
+ process.once("SIGTERM", () => finish());
43
+ process.once("SIGINT", () => finish());
44
+ process.once("exit", stopWorker);
45
+ if (remaining <= 0) finish();
46
+ else {
148
47
  try {
149
- if (observeDemoInvocation(envelope, agent, false).invocation) {
150
- await emit(failOpen());
151
- return;
152
- }
153
- } catch {
154
- }
155
- if (envelope.hook_event_name !== "PreToolUse") {
156
- await emit(failOpen());
157
- return;
158
- }
159
- if (typeof envelope.tool_name !== "string" || !envelope.tool_name) {
160
- await emitUnverified("The tool invocation is missing its tool identity");
161
- return;
162
- }
163
- const toolName = envelope.tool_name;
164
- const cwd = typeof envelope.cwd === "string" && envelope.cwd.length > 0 ? envelope.cwd : process.cwd();
165
- const targets = resolvePreflightTargets({
166
- toolName,
167
- toolInput: envelope.tool_input,
168
- agent,
169
- cwd
170
- });
171
- if (targets.mutation === "none") {
172
- await emit(failOpen());
173
- return;
174
- }
175
- if (!isRepoActive(cwd)) {
176
- await emit(failOpen());
177
- return;
178
- }
179
- activeMutation = true;
180
- if (targets.paths.length === 0 && !targets.definite) {
181
- await emit(failOpen());
182
- return;
183
- }
184
- if (agent === "cursor" && targets.coverage === "unverified") {
185
- await emitUnverified("tool targets were ambiguous or outside the active repository");
186
- return;
187
- }
188
- const binding = repoSyncId(cwd);
189
- const branch = currentBranch(cwd);
190
- const sessionId = envelope.session_id;
191
- const callId = invocationId(envelope);
192
- if (!binding || typeof sessionId !== "string" || !sessionId || !callId) {
193
- await emitUnverified(
194
- "GitHub repo connection is required for repository-specific file attribution, Conflict Gate verification, and commit correlation; or tool invocation identity is unavailable"
48
+ child = spawn(
49
+ process.execPath,
50
+ [
51
+ fileURLToPath(new URL("./pre-tool-use-worker.js", import.meta.url)),
52
+ "--agent",
53
+ agent,
54
+ String(Date.now() + remaining - 50)
55
+ ],
56
+ {
57
+ detached: process.platform !== "win32",
58
+ stdio: ["pipe", "pipe", "pipe"]
59
+ }
195
60
  );
196
- return;
197
- }
198
- const collectScopeAdmits = cachedCollectScopeAdmits(cwd, {
199
- repository: githubRepositoryFullName(cwd) ?? void 0,
200
- branch,
201
- agent,
202
- paths: targets.paths,
203
- pathsComplete: targets.coverage === "complete"
204
- });
205
- const request = {
206
- protocolVersion: PREFLIGHT_PROTOCOL_VERSION,
207
- operation: "start",
208
- toolInputDigest: toolInputDigest(toolName, envelope.tool_input),
209
- agent,
210
- clientMode: mode,
211
- clientVersion: boundedClientVersion(packageVersion()),
212
- sessionId,
213
- invocationId: callId,
214
- repoSyncId: binding,
215
- paths: targets.paths,
216
- coverage: targets.coverage,
217
- ...branch === void 0 ? {} : { branch },
218
- proposal: collectScopeAdmits ? proposalFor(envelope.tool_input) : ""
219
- };
220
- let result;
221
- try {
222
- const response = await waitForPreflight(request, {
223
- deadline,
224
- onProgress: ({ evaluationCoverage: coverage }) => {
225
- process.stderr.write(
226
- `[primitive] Checking Decisions: ${coverage.evaluatedCount + coverage.bypassedCount}/${coverage.candidateCount}${coverage.discoveryComplete ? "" : "+"} covered.
227
- `
228
- );
61
+ child.on("error", () => finish());
62
+ child.stdin?.on("error", () => finish());
63
+ child.stderr?.setEncoding("utf8").on("data", (chunk) => {
64
+ stderr = (stderr + chunk).slice(0, MAX_OUTPUT_BYTES);
65
+ });
66
+ child.stdout?.setEncoding("utf8").on("data", (chunk) => {
67
+ stdout += chunk;
68
+ if (stdout.length > MAX_OUTPUT_BYTES) return finish();
69
+ if (!stdout.includes("\n")) return;
70
+ try {
71
+ const message = JSON.parse(stdout);
72
+ if (!message || typeof message !== "object" || !("output" in message) || !("confirmed" in message))
73
+ return finish();
74
+ if (!message.output || typeof message.output !== "object" || Array.isArray(message.output))
75
+ return finish();
76
+ if (message.confirmed === true) finish(message.output, stderr);
77
+ else finish();
78
+ } catch {
79
+ finish();
229
80
  }
230
81
  });
231
- if (!hasCompleteCoverage(response)) {
232
- await emitUnverified(response.message || response.reasonCode, response.checkId);
233
- return;
234
- }
235
- result = resultForPreflight(
236
- response,
237
- editPreview(toolName, envelope.tool_input, targets.paths),
238
- request,
239
- collectScopeAdmits && (toolName === "Bash" || toolName === "Shell") && proposalIsTruncated(envelope.tool_input)
240
- );
241
- } catch (error) {
242
- await emitUnverified(
243
- error instanceof PreflightPausedError ? error.message : preflightFailure(error),
244
- error instanceof PreflightPausedError ? error.checkId : void 0
245
- );
246
- return;
247
- }
248
- const aggregate = demoteForMode(result.verdict === "unavailable" ? "deny" : result.verdict, mode);
249
- if (agent === "hermes" && aggregate !== "deny" && aggregate !== "ask") {
250
- const advisory = hermesAdvisory(result, aggregate);
251
- if (advisory) process.stderr.write(`${advisory}
252
- `);
253
- }
254
- let output = agent === "hermes" ? buildHermesOutput(aggregate, [result]) : agent === "cursor" ? buildCursorOutput(aggregate, [result]) : agent === "codex" ? buildCodexOutput(aggregate, [result]) : buildHookOutput(aggregate, [result]);
255
- if (agent === "codex" && hasVisibleCodexMessage(output) && typeof sessionId === "string" && sessionId.length > 0) {
256
- try {
257
- const context = await prepareCodexContext({ cwd, sessionId, includeDigest: false });
258
- output = appendCodexContext(output, context.context);
259
- await emitWithAcknowledgment(output, context.acknowledge);
260
- return;
261
- } catch {
262
- }
82
+ child.on("exit", () => finish());
83
+ if (child.stdin) process.stdin.pipe(child.stdin);
84
+ } catch {
85
+ finish();
263
86
  }
264
- await emit(output);
265
87
  }
266
- main().catch(async () => {
267
- if (activeMutation) await emitUnverified("The Decision check could not complete");
268
- else await emit(failOpen());
269
- });
@@ -8,59 +8,62 @@ import {
8
8
  acknowledgeDecisionFeedback,
9
9
  leaseDecisionFeedback,
10
10
  renderFeedback
11
- } from "../chunk-FTW4ZCBA.js";
11
+ } from "../chunk-FPDOBG3H.js";
12
12
  import {
13
13
  recordConversationCaptured
14
- } from "../chunk-KGBMU76T.js";
14
+ } from "../chunk-JXQVXU2K.js";
15
15
  import {
16
16
  unattendedEnv
17
17
  } from "../chunk-OYHYCK4K.js";
18
18
  import {
19
19
  enrichHookPayloadWithFileRefs,
20
20
  preserveHookFileMetadata
21
- } from "../chunk-RLBASQJD.js";
21
+ } from "../chunk-OIXHRN32.js";
22
+ import {
23
+ prepareCodexContext
24
+ } from "../chunk-PYIIYC3A.js";
25
+ import "../chunk-QX7QFMLF.js";
22
26
  import {
23
27
  postToolInvocationId,
24
28
  shouldFlushAfter,
25
29
  toMove
26
- } from "../chunk-S55JKCHQ.js";
30
+ } from "../chunk-C2AJBMP2.js";
27
31
  import {
28
32
  getOrCreateWorkspaceId
29
33
  } from "../chunk-EZXEWFDG.js";
30
34
  import {
31
35
  appendMove,
32
36
  resolveOrg
33
- } from "../chunk-HMD5K6W7.js";
37
+ } from "../chunk-ECP7EGOD.js";
38
+ import "../chunk-4HEWA4IO.js";
34
39
  import {
35
40
  observeDemoInvocation
36
- } from "../chunk-CXMLAWC2.js";
41
+ } from "../chunk-SCOEPFOV.js";
37
42
  import {
38
- prepareCodexContext
39
- } from "../chunk-LLKJAET2.js";
40
- import "../chunk-I3J344DF.js";
41
- import "../chunk-4SN5BCIG.js";
43
+ normalizeEnvelope,
44
+ readHookStdin,
45
+ shouldSuppressImportedCursorHandler
46
+ } from "../chunk-C2AEY4AI.js";
47
+ import "../chunk-L3NUFCOD.js";
48
+ import "../chunk-VEI7KUOU.js";
42
49
  import {
43
50
  scrubFromCwd,
44
51
  writeHookDebug
45
- } from "../chunk-6IRAGUYK.js";
52
+ } from "../chunk-LEEWUN74.js";
46
53
  import {
47
54
  cachedCollectScopeAdmits
48
- } from "../chunk-3TIKBQHV.js";
49
- import "../chunk-6JHKKLA2.js";
50
- import {
51
- normalizeEnvelope,
52
- parseAgent,
53
- readHookStdin,
54
- shouldSuppressImportedCursorHandler
55
- } from "../chunk-4OEJ2ONG.js";
56
- import "../chunk-JKO6PZWQ.js";
57
- import "../chunk-J5HBSRAV.js";
55
+ } from "../chunk-JGOFEG6T.js";
56
+ import "../chunk-UMSJ4DU2.js";
58
57
  import {
59
58
  currentBranch,
60
59
  isRepoActiveForCapture,
61
60
  repoSyncId,
62
61
  resolveRepositoryContext
63
- } from "../chunk-XG7S3LIL.js";
62
+ } from "../chunk-3NJ4FUPK.js";
63
+ import {
64
+ parseAgent
65
+ } from "../chunk-KZB4ABIB.js";
66
+ import "../chunk-JSBRDJBE.js";
64
67
 
65
68
  // src/hooks/prim-hook.ts
66
69
  import { spawn } from "child_process";
@@ -1,17 +1,20 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ daemonRequest
4
+ } from "../chunk-4HEWA4IO.js";
2
5
  import {
3
6
  normalizeEnvelope,
4
- parseAgent,
5
7
  readHookStdin,
6
8
  shouldSuppressImportedCursorHandler
7
- } from "../chunk-4OEJ2ONG.js";
8
- import "../chunk-JKO6PZWQ.js";
9
- import {
10
- daemonRequest
11
- } from "../chunk-J5HBSRAV.js";
9
+ } from "../chunk-C2AEY4AI.js";
10
+ import "../chunk-VEI7KUOU.js";
12
11
  import {
13
12
  isRepoActiveForCapture
14
- } from "../chunk-XG7S3LIL.js";
13
+ } from "../chunk-3NJ4FUPK.js";
14
+ import {
15
+ parseAgent
16
+ } from "../chunk-KZB4ABIB.js";
17
+ import "../chunk-JSBRDJBE.js";
15
18
 
16
19
  // src/hooks/session-end.ts
17
20
  var STDIN_TIMEOUT_MS = 1e3;
@@ -7,7 +7,7 @@ import {
7
7
  kickDaemonEnsure,
8
8
  refreshClaudePlugins,
9
9
  warmBinCache
10
- } from "../chunk-JKJ22ONL.js";
10
+ } from "../chunk-OHLVHT6R.js";
11
11
  import {
12
12
  buildHookOutput,
13
13
  handoffHookOutput
@@ -17,44 +17,47 @@ import {
17
17
  acknowledgeDecisionFeedback,
18
18
  leaseDecisionFeedback,
19
19
  renderFeedback
20
- } from "../chunk-FTW4ZCBA.js";
20
+ } from "../chunk-FPDOBG3H.js";
21
21
  import {
22
22
  clearHooksWired,
23
23
  recordHooksWired
24
- } from "../chunk-KGBMU76T.js";
24
+ } from "../chunk-JXQVXU2K.js";
25
25
  import "../chunk-OYHYCK4K.js";
26
- import {
27
- getOrCreateWorkspaceId
28
- } from "../chunk-EZXEWFDG.js";
29
26
  import {
30
27
  prepareCodexContext
31
- } from "../chunk-LLKJAET2.js";
32
- import "../chunk-4SN5BCIG.js";
28
+ } from "../chunk-PYIIYC3A.js";
29
+ import "../chunk-QX7QFMLF.js";
33
30
  import {
34
- fetchAndCacheCollectScope
35
- } from "../chunk-3TIKBQHV.js";
31
+ getOrCreateWorkspaceId
32
+ } from "../chunk-EZXEWFDG.js";
36
33
  import {
37
- getSiteUrl,
38
- isSessionEnded
39
- } from "../chunk-6JHKKLA2.js";
34
+ daemonRequest
35
+ } from "../chunk-4HEWA4IO.js";
40
36
  import {
41
37
  normalizeEnvelope,
42
- parseAgent,
43
38
  readHookStdin,
44
39
  shouldSuppressImportedCursorHandler
45
- } from "../chunk-4OEJ2ONG.js";
40
+ } from "../chunk-C2AEY4AI.js";
46
41
  import {
47
42
  MANAGED_GIT_HOOK_NAMES
48
- } from "../chunk-JKO6PZWQ.js";
43
+ } from "../chunk-VEI7KUOU.js";
49
44
  import {
50
- daemonRequest
51
- } from "../chunk-J5HBSRAV.js";
45
+ fetchAndCacheCollectScope
46
+ } from "../chunk-JGOFEG6T.js";
47
+ import {
48
+ getSiteUrl,
49
+ isSessionEnded
50
+ } from "../chunk-UMSJ4DU2.js";
52
51
  import {
53
52
  gitToplevel,
54
53
  isRepoActiveForCapture,
55
54
  repoActiveFlag,
56
55
  setRepoActive
57
- } from "../chunk-XG7S3LIL.js";
56
+ } from "../chunk-3NJ4FUPK.js";
57
+ import {
58
+ parseAgent
59
+ } from "../chunk-KZB4ABIB.js";
60
+ import "../chunk-JSBRDJBE.js";
58
61
 
59
62
  // src/hooks/reauth-notice.ts
60
63
  var REAUTH_NOTICE = "[prim] authentication ended \u2014 run `prim auth login` to resume decision capture";