@primitive.ai/prim 0.1.0-alpha.85 → 0.1.0-alpha.87
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/SKILL.md +1 -1
- package/dist/chunk-BOW3Y3KS.js +18531 -0
- package/dist/{chunk-XGADQPCI.js → chunk-EWM3RYCA.js} +11 -1
- package/dist/{chunk-4CZTNXIS.js → chunk-GBEPUEPZ.js} +1 -1
- package/dist/{chunk-7O6NAUKJ.js → chunk-KL322THW.js} +1 -1
- package/dist/{chunk-OUXH3UEP.js → chunk-MDDHTIXL.js} +1 -1
- package/dist/{chunk-HWSS4BV5.js → chunk-WPD4QRNJ.js} +1 -1
- package/dist/daemon/server.js +8387 -2511
- package/dist/hook-runtime/daemon/server.js +8387 -2511
- package/dist/hook-runtime/hooks/post-commit.js +18292 -179
- package/dist/hook-runtime/hooks/post-rewrite.js +18110 -2
- package/dist/hook-runtime/hooks/post-tool-use.js +18550 -351
- package/dist/hook-runtime/hooks/pre-tool-use.js +18254 -137
- package/dist/hook-runtime/hooks/prim-hook.js +18281 -163
- package/dist/hook-runtime/hooks/session-start.js +18168 -225
- package/dist/hook-runtime/index.js +11429 -5040
- package/dist/hooks/post-commit.js +12 -3
- package/dist/hooks/post-rewrite.js +8 -4
- package/dist/hooks/post-tool-use.js +19 -6
- package/dist/hooks/pre-tool-use.js +15 -3
- package/dist/hooks/prim-hook.js +34 -22
- package/dist/hooks/session-start.js +9 -19
- package/dist/index.js +558 -12175
- package/package.json +1 -1
- package/dist/chunk-TJTVHDJ5.js +0 -321
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
scheduleCollectScopeRefresh
|
|
3
|
+
} from "./chunk-BOW3Y3KS.js";
|
|
4
|
+
|
|
1
5
|
// src/ingest-response.ts
|
|
2
6
|
var IngestAcknowledgementError = class extends Error {
|
|
3
7
|
constructor(message) {
|
|
@@ -5,7 +9,7 @@ var IngestAcknowledgementError = class extends Error {
|
|
|
5
9
|
this.name = "IngestAcknowledgementError";
|
|
6
10
|
}
|
|
7
11
|
};
|
|
8
|
-
function requireDurableIngestAcknowledgement(value, expected) {
|
|
12
|
+
function requireDurableIngestAcknowledgement(value, expected, cwd = process.cwd()) {
|
|
9
13
|
if (typeof value !== "object" || value === null) {
|
|
10
14
|
throw new IngestAcknowledgementError("ingest response was not an object");
|
|
11
15
|
}
|
|
@@ -18,6 +22,12 @@ function requireDurableIngestAcknowledgement(value, expected) {
|
|
|
18
22
|
`ingest acknowledged ${String(response.acknowledged)} of ${String(expected)} moves`
|
|
19
23
|
);
|
|
20
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
|
+
}
|
|
21
31
|
return value;
|
|
22
32
|
}
|
|
23
33
|
|