opencode-swarm 7.154.0 → 7.154.1
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/dist/background/pr-subscriptions.d.ts +7 -0
- package/dist/cli/{config-doctor-8p9y543t.js → config-doctor-keasv3r8.js} +2 -2
- package/dist/cli/{core-1h6x6k59.js → core-7aj5g3f4.js} +1 -1
- package/dist/cli/{curation-policy-9r902jw4.js → curation-policy-a6tve11y.js} +5 -5
- package/dist/cli/{curator-yj00z1qz.js → curator-anz136hr.js} +27 -27
- package/dist/cli/{curator-llm-factory-ypwf3a90.js → curator-llm-factory-cr5ckwbd.js} +27 -27
- package/dist/cli/{evidence-summary-service-npq04240.js → evidence-summary-service-6tgme7p3.js} +11 -11
- package/dist/cli/{gate-evidence-4b6t0ycn.js → gate-evidence-36nfx4vb.js} +5 -5
- package/dist/cli/{guardrail-explain-dyxbhrdj.js → guardrail-explain-frb5xd5h.js} +28 -28
- package/dist/cli/{guardrail-log-eyecsekk.js → guardrail-log-fvma65xm.js} +5 -5
- package/dist/cli/{guardrail-reset-269jdwhd.js → guardrail-reset-3qk6k334.js} +27 -27
- package/dist/cli/{hive-promoter-5936am48.js → hive-promoter-v3dhtzfa.js} +27 -27
- package/dist/cli/{index-4g00jhbs.js → index-0vss7vdg.js} +3 -3
- package/dist/cli/{index-s0a4ewkb.js → index-107cv0dr.js} +1 -1
- package/dist/cli/{index-10zvxqra.js → index-155pbsan.js} +1 -1
- package/dist/cli/{index-48m4841x.js → index-1sjnqsc8.js} +1 -1
- package/dist/cli/{index-yve4e8fx.js → index-2ppbt5cf.js} +1 -1
- package/dist/cli/{index-6yc06dx9.js → index-3md256qr.js} +1 -1
- package/dist/cli/{index-snnps1vm.js → index-4r46q7tk.js} +5 -5
- package/dist/cli/{index-2mbs5q26.js → index-50cy1a3p.js} +7 -7
- package/dist/cli/{index-3mhgv8d6.js → index-97q41ds3.js} +2 -2
- package/dist/cli/{index-3db7xza0.js → index-9wzgztj9.js} +1 -1
- package/dist/cli/{index-7jnh1sgb.js → index-9xev69y4.js} +1 -1
- package/dist/cli/{index-wpstzk85.js → index-9znypky4.js} +4 -4
- package/dist/cli/{index-68w5jxv5.js → index-akm1dbr9.js} +3 -3
- package/dist/cli/{index-wfxg3s7n.js → index-bmkxc6sa.js} +95 -22
- package/dist/cli/{index-tnm9bb8b.js → index-fz9xcq6z.js} +1 -1
- package/dist/cli/{index-ttqnhxxq.js → index-h1g8w4v0.js} +2 -2
- package/dist/cli/{index-qcz4xprd.js → index-h7pamys0.js} +4 -4
- package/dist/cli/{index-p4y7jefb.js → index-p17hs70t.js} +2 -2
- package/dist/cli/{index-s70tmqn3.js → index-qm8b3aaj.js} +4 -4
- package/dist/cli/{index-1tdsddab.js → index-r0yavfvm.js} +64 -63
- package/dist/cli/{index-pcj7jk4t.js → index-sx5f2fq9.js} +3 -3
- package/dist/cli/{index-y64jrbch.js → index-tmgbwgsm.js} +2 -2
- package/dist/cli/{index-hk4wa0v1.js → index-wmxke5se.js} +6 -6
- package/dist/cli/{index-dwh02jmv.js → index-wqp8kk0w.js} +7 -7
- package/dist/cli/{index-2kzxkx50.js → index-wxpemcdj.js} +29 -29
- package/dist/cli/{index-vtdwkfbv.js → index-xagq35tf.js} +1 -1
- package/dist/cli/{index-c6dfyzdh.js → index-xdy28ngt.js} +1 -1
- package/dist/cli/{index-4y7g04py.js → index-xsbf2mmf.js} +1 -1
- package/dist/cli/{index-3hdnfmhp.js → index-y7gyhe13.js} +2 -2
- package/dist/cli/{index-mddgkqg9.js → index-yy4yps8w.js} +2 -2
- package/dist/cli/{index-nkr634n6.js → index-zak84bqr.js} +1 -1
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-bxpzeth0.js → knowledge-escalator-1gjv97hj.js} +10 -10
- package/dist/cli/{knowledge-events-jxdpg2hj.js → knowledge-events-94hfvp85.js} +8 -8
- package/dist/cli/{knowledge-link-nwxykjya.js → knowledge-link-fs8hgh4h.js} +4 -4
- package/dist/cli/{knowledge-store-336hyzs8.js → knowledge-store-g7grbt7h.js} +5 -5
- package/dist/cli/{knowledge-validator-9wkvnsv0.js → knowledge-validator-ep0ym1e4.js} +7 -7
- package/dist/cli/{pending-delegations-0fmj1qy6.js → pending-delegations-0pf2dtwx.js} +3 -3
- package/dist/cli/{pr-subscriptions-1ndwgtbw.js → pr-subscriptions-e70phj71.js} +3 -3
- package/dist/cli/{runner-06dvm53x.js → runner-b7pskcxb.js} +5 -5
- package/dist/cli/{scan-cursor-3xxqtxwx.js → scan-cursor-8zps8v46.js} +6 -6
- package/dist/cli/{schema-jdx83m4m.js → schema-8sx9jp7v.js} +1 -1
- package/dist/cli/{scope-persistence-wgxn2kba.js → scope-persistence-zacyjnx9.js} +7 -7
- package/dist/cli/{skill-generator-vmxsc2fm.js → skill-generator-xs5n5j4k.js} +12 -12
- package/dist/cli/{telemetry-q2km2zrz.js → telemetry-r8e8zey7.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-gsay5210.js → worktree-collision-ownership-yjk5ya71.js} +3 -3
- package/dist/cli/{worktree-isolation-peb4bkg3.js → worktree-isolation-cpf6b8ns.js} +27 -27
- package/dist/index.js +6 -6
- package/dist/telemetry.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readLinkPointer,
|
|
8
8
|
resolveKnowledgeStoreDir,
|
|
9
9
|
resolveLinkDir
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-9wzgztj9.js";
|
|
11
11
|
|
|
12
12
|
// src/knowledge/curation-policy.ts
|
|
13
13
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-wmxke5se.js";
|
|
10
10
|
import {
|
|
11
11
|
queryHistoricalOutcomes,
|
|
12
12
|
readKnowledgeEvents,
|
|
13
13
|
recordKnowledgeEvent
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-50cy1a3p.js";
|
|
15
15
|
import {
|
|
16
16
|
init_knowledge_types,
|
|
17
17
|
isActiveStatus
|
|
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
224
224
|
alreadyInactive: true
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
227
|
+
const { quarantineEntry } = await import("./knowledge-validator-ep0ym1e4.js");
|
|
228
228
|
let policyConfig;
|
|
229
229
|
try {
|
|
230
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
231
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
230
|
+
const { KnowledgeConfigSchema } = await import("./schema-8sx9jp7v.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-sx5f2fq9.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
} from "./index-4cgee5vh.js";
|
|
5
5
|
import {
|
|
6
6
|
loadPluginConfigWithMeta
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-xsbf2mmf.js";
|
|
8
8
|
import {
|
|
9
9
|
KnowledgeConfigSchema,
|
|
10
10
|
init_schema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-fz9xcq6z.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveHiveEventsPath
|
|
14
14
|
} from "./index-ae75rja9.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveKnowledgeStoreDir
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-9wzgztj9.js";
|
|
18
18
|
import {
|
|
19
19
|
atomicWriteFile
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-107cv0dr.js";
|
|
21
21
|
import {
|
|
22
22
|
assertProjectRoot
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-xagq35tf.js";
|
|
24
24
|
import {
|
|
25
25
|
emit
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-h1g8w4v0.js";
|
|
27
27
|
import {
|
|
28
28
|
require_proper_lockfile
|
|
29
29
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2793,7 +2793,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
let bumps = 0;
|
|
2795
2795
|
if (deltas.length > 0) {
|
|
2796
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2796
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-g7grbt7h.js");
|
|
2797
2797
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2798
2798
|
}
|
|
2799
2799
|
return {
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-r0yavfvm.js";
|
|
18
18
|
import {
|
|
19
19
|
checkFileAuthority,
|
|
20
20
|
classifyFile,
|
|
21
21
|
isInDeclaredScope,
|
|
22
22
|
redactPath,
|
|
23
23
|
redactShellCommand
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-y7gyhe13.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-zak84bqr.js";
|
|
6
6
|
import {
|
|
7
7
|
isPathWithinDeclaredScope,
|
|
8
8
|
unsafePathTextReason
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
atomicWriteFile,
|
|
27
27
|
taskEvidencePath,
|
|
28
28
|
withTaskEvidenceLock
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-107cv0dr.js";
|
|
30
30
|
import {
|
|
31
31
|
assertProjectRoot
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-xagq35tf.js";
|
|
33
33
|
import {
|
|
34
34
|
telemetry
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-h1g8w4v0.js";
|
|
36
36
|
import {
|
|
37
37
|
exports_external,
|
|
38
38
|
init_zod
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-h7pamys0.js";
|
|
6
6
|
import {
|
|
7
7
|
withTimeoutSignal
|
|
8
8
|
} from "./index-q7sjgr1y.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
resolveHiveKnowledgePath,
|
|
13
13
|
resolveSwarmKnowledgePath,
|
|
14
14
|
transactKnowledge
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-wmxke5se.js";
|
|
16
16
|
import {
|
|
17
17
|
effectiveRetrievalOutcomes,
|
|
18
18
|
readAuthoritativeKnowledgeCounterRollups
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-50cy1a3p.js";
|
|
20
20
|
import {
|
|
21
21
|
advisoryWarn,
|
|
22
22
|
init_warning_buffer
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./index-c809a69b.js";
|
|
8
8
|
import {
|
|
9
9
|
withEvidenceLock
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-xagq35tf.js";
|
|
11
11
|
import {
|
|
12
12
|
telemetry
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-h1g8w4v0.js";
|
|
14
14
|
import {
|
|
15
15
|
exports_external,
|
|
16
16
|
init_zod
|
|
@@ -175,7 +175,13 @@ function foldLegacyRegion(filePath, startByte, maxBytes) {
|
|
|
175
175
|
try {
|
|
176
176
|
fd = fs.openSync(filePath, "r");
|
|
177
177
|
} catch {
|
|
178
|
-
return {
|
|
178
|
+
return {
|
|
179
|
+
folded,
|
|
180
|
+
nextByte: startByte,
|
|
181
|
+
eof: true,
|
|
182
|
+
aborted: true,
|
|
183
|
+
corruptLines
|
|
184
|
+
};
|
|
179
185
|
}
|
|
180
186
|
const processLineBytes = (line) => {
|
|
181
187
|
if (line.length === 0)
|
|
@@ -206,7 +212,13 @@ function foldLegacyRegion(filePath, startByte, maxBytes) {
|
|
|
206
212
|
try {
|
|
207
213
|
const size = fs.fstatSync(fd).size;
|
|
208
214
|
if (startByte >= size) {
|
|
209
|
-
return {
|
|
215
|
+
return {
|
|
216
|
+
folded,
|
|
217
|
+
nextByte: startByte,
|
|
218
|
+
eof: true,
|
|
219
|
+
aborted: false,
|
|
220
|
+
corruptLines
|
|
221
|
+
};
|
|
210
222
|
}
|
|
211
223
|
const chunk = Buffer.alloc(PR_SUBSCRIPTION_LIMITS.readChunkBytes);
|
|
212
224
|
let pending = [];
|
|
@@ -223,7 +235,13 @@ function foldLegacyRegion(filePath, startByte, maxBytes) {
|
|
|
223
235
|
pending = [];
|
|
224
236
|
pendingLen = 0;
|
|
225
237
|
oversize = false;
|
|
226
|
-
return {
|
|
238
|
+
return {
|
|
239
|
+
folded,
|
|
240
|
+
nextByte: consumedTo,
|
|
241
|
+
eof: true,
|
|
242
|
+
aborted: false,
|
|
243
|
+
corruptLines
|
|
244
|
+
};
|
|
227
245
|
};
|
|
228
246
|
while (true) {
|
|
229
247
|
const want = Math.min(chunk.length, size - pos);
|
|
@@ -263,12 +281,24 @@ function foldLegacyRegion(filePath, startByte, maxBytes) {
|
|
|
263
281
|
}
|
|
264
282
|
if (consumedTo - startByte >= maxBytes && pendingLen === 0 && !oversize) {
|
|
265
283
|
const eof = consumedTo >= size;
|
|
266
|
-
return {
|
|
284
|
+
return {
|
|
285
|
+
folded,
|
|
286
|
+
nextByte: consumedTo,
|
|
287
|
+
eof,
|
|
288
|
+
aborted: false,
|
|
289
|
+
corruptLines
|
|
290
|
+
};
|
|
267
291
|
}
|
|
268
292
|
}
|
|
269
293
|
} catch (err) {
|
|
270
294
|
log(`[pr-monitor] foldLegacyRegion failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
271
|
-
return {
|
|
295
|
+
return {
|
|
296
|
+
folded,
|
|
297
|
+
nextByte: consumedTo,
|
|
298
|
+
eof: true,
|
|
299
|
+
aborted: true,
|
|
300
|
+
corruptLines
|
|
301
|
+
};
|
|
272
302
|
} finally {
|
|
273
303
|
try {
|
|
274
304
|
fs.closeSync(fd);
|
|
@@ -379,11 +409,12 @@ function writeCheckpointFile(directory, checkpoint) {
|
|
|
379
409
|
}
|
|
380
410
|
const content = `${JSON.stringify(checkpoint)}
|
|
381
411
|
`;
|
|
382
|
-
|
|
383
|
-
|
|
412
|
+
const contentBytes = Buffer.byteLength(content, "utf-8");
|
|
413
|
+
if (contentBytes > PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes) {
|
|
414
|
+
throw new Error(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
|
|
384
415
|
}
|
|
385
|
-
if (
|
|
386
|
-
log(`[pr-monitor] checkpoint pressure: ${
|
|
416
|
+
if (contentBytes > PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes) {
|
|
417
|
+
log(`[pr-monitor] checkpoint pressure: ${contentBytes}/${PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes} bytes`);
|
|
387
418
|
}
|
|
388
419
|
ensureSwarmDir(directory);
|
|
389
420
|
atomicWriteSwarmFileSync(checkpointPath(directory), content);
|
|
@@ -393,7 +424,7 @@ function quarantineCheckpoint(directory, slot) {
|
|
|
393
424
|
const to = slot === "foreign" ? foreignSlotPath(directory) : corruptSlotPath(directory);
|
|
394
425
|
try {
|
|
395
426
|
try {
|
|
396
|
-
fs.
|
|
427
|
+
fs.renameSync(to, `${to}.prev`);
|
|
397
428
|
} catch {}
|
|
398
429
|
renameWithRetry(from, to);
|
|
399
430
|
return true;
|
|
@@ -550,6 +581,10 @@ function maybeArchiveLegacy(directory, checkpoint) {
|
|
|
550
581
|
log(`[pr-monitor] legacy archive deferred: ${err instanceof Error ? err.message : String(err)}`);
|
|
551
582
|
return null;
|
|
552
583
|
}
|
|
584
|
+
try {
|
|
585
|
+
const now = Date.now() / 1000;
|
|
586
|
+
fs.utimesSync(legacyArchivePath(directory), now, now);
|
|
587
|
+
} catch {}
|
|
553
588
|
migration.archived = true;
|
|
554
589
|
return { kind: "archive" };
|
|
555
590
|
}
|
|
@@ -570,8 +605,9 @@ function emitHealthTelemetry(trigger, checkpoint) {
|
|
|
570
605
|
compactions: checkpoint.maintenance.compactions,
|
|
571
606
|
corrupt_count: checkpoint.maintenance.corruptLegacyRecords,
|
|
572
607
|
dropped_audit_count: checkpoint.maintenance.droppedAuditTransitions,
|
|
573
|
-
checkpoint_bytes: JSON.stringify(checkpoint)
|
|
574
|
-
limit_bytes: PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes
|
|
608
|
+
checkpoint_bytes: Buffer.byteLength(JSON.stringify(checkpoint), "utf-8"),
|
|
609
|
+
limit_bytes: PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes,
|
|
610
|
+
recovery_resets: checkpoint.maintenance.resets
|
|
575
611
|
});
|
|
576
612
|
}
|
|
577
613
|
var legacyOverLimitWarned = new Map;
|
|
@@ -607,7 +643,8 @@ function overlayLegacy(directory, checkpoint) {
|
|
|
607
643
|
usedLegacy: false,
|
|
608
644
|
absorbed: 0,
|
|
609
645
|
corruptLines: 0,
|
|
610
|
-
overLimit: false
|
|
646
|
+
overLimit: false,
|
|
647
|
+
aborted: false
|
|
611
648
|
};
|
|
612
649
|
}
|
|
613
650
|
if (stat.size > PR_SUBSCRIPTION_LIMITS.legacySourceMaxBytes) {
|
|
@@ -617,7 +654,8 @@ function overlayLegacy(directory, checkpoint) {
|
|
|
617
654
|
usedLegacy: false,
|
|
618
655
|
absorbed: 0,
|
|
619
656
|
corruptLines: 0,
|
|
620
|
-
overLimit: true
|
|
657
|
+
overLimit: true,
|
|
658
|
+
aborted: false
|
|
621
659
|
};
|
|
622
660
|
}
|
|
623
661
|
const migration = checkpoint.migration;
|
|
@@ -632,7 +670,8 @@ function overlayLegacy(directory, checkpoint) {
|
|
|
632
670
|
usedLegacy: true,
|
|
633
671
|
absorbed: absorbed2,
|
|
634
672
|
corruptLines: fold2.corruptLines,
|
|
635
|
-
overLimit: false
|
|
673
|
+
overLimit: false,
|
|
674
|
+
aborted: fold2.aborted
|
|
636
675
|
};
|
|
637
676
|
}
|
|
638
677
|
if (stat.size === migration.sourceBytes && stat.mtimeMs === migration.sourceMtimeMs) {
|
|
@@ -641,7 +680,8 @@ function overlayLegacy(directory, checkpoint) {
|
|
|
641
680
|
usedLegacy: false,
|
|
642
681
|
absorbed: 0,
|
|
643
682
|
corruptLines: 0,
|
|
644
|
-
overLimit: false
|
|
683
|
+
overLimit: false,
|
|
684
|
+
aborted: false
|
|
645
685
|
};
|
|
646
686
|
}
|
|
647
687
|
const fold = foldLegacyRegion(legacy, 0, Number.MAX_SAFE_INTEGER);
|
|
@@ -651,7 +691,8 @@ function overlayLegacy(directory, checkpoint) {
|
|
|
651
691
|
usedLegacy: true,
|
|
652
692
|
absorbed,
|
|
653
693
|
corruptLines: fold.corruptLines,
|
|
654
|
-
overLimit: false
|
|
694
|
+
overLimit: false,
|
|
695
|
+
aborted: fold.aborted
|
|
655
696
|
};
|
|
656
697
|
}
|
|
657
698
|
async function loadViewForRead(directory) {
|
|
@@ -690,10 +731,19 @@ async function loadViewForRead(directory) {
|
|
|
690
731
|
const fold = foldLegacyRegion(legacyPath, 0, Number.MAX_SAFE_INTEGER);
|
|
691
732
|
const view = {};
|
|
692
733
|
mergeFoldedRecords(view, fold.folded);
|
|
693
|
-
|
|
734
|
+
if (!fold.aborted) {
|
|
735
|
+
await bootstrapCheckpointFromLegacy(directory, view, fold);
|
|
736
|
+
}
|
|
694
737
|
return { view, recoverySource: "legacy-log" };
|
|
695
738
|
}
|
|
739
|
+
var bootstrapAttempted = new Map;
|
|
696
740
|
async function bootstrapCheckpointFromLegacy(directory, foldedView, fold) {
|
|
741
|
+
if (bootstrapAttempted.has(directory))
|
|
742
|
+
return;
|
|
743
|
+
if (bootstrapAttempted.size >= 32) {
|
|
744
|
+
bootstrapAttempted.delete(bootstrapAttempted.keys().next().value);
|
|
745
|
+
}
|
|
746
|
+
bootstrapAttempted.set(directory, true);
|
|
697
747
|
try {
|
|
698
748
|
await withEvidenceLock(directory, PR_SUBSCRIPTIONS_FILE, STORE_LOCK_AGENT, STORE_LOCK_TASK, async () => {
|
|
699
749
|
if (readCheckpoint(directory).kind !== "absent")
|
|
@@ -734,17 +784,20 @@ function loadViewForWrite(directory) {
|
|
|
734
784
|
if (read.kind === "ok" && sameProjectRoot(read.value.rootPath, directory)) {
|
|
735
785
|
checkpoint = cloneCheckpoint(read.value);
|
|
736
786
|
} else if (read.kind === "ok") {
|
|
787
|
+
const displaced = Object.keys(read.value.records).length;
|
|
737
788
|
quarantineCheckpoint(directory, "foreign");
|
|
738
789
|
checkpoint = freshCheckpoint(directory);
|
|
739
|
-
checkpoint.maintenance.resets += 1;
|
|
790
|
+
checkpoint.maintenance.resets += read.value.maintenance.resets + 1;
|
|
740
791
|
audit.push({ kind: "foreign-rebind" });
|
|
741
792
|
dirty = true;
|
|
793
|
+
log(`[pr-monitor] foreign checkpoint quarantined (${displaced} displaced records, recorded root ${read.value.rootPath}); store rebound to ${directory}`);
|
|
742
794
|
} else if (read.kind === "invalid") {
|
|
743
795
|
quarantineCheckpoint(directory, "corrupt");
|
|
744
796
|
checkpoint = freshCheckpoint(directory);
|
|
745
797
|
checkpoint.maintenance.resets += 1;
|
|
746
798
|
audit.push({ kind: "corrupt-quarantine" });
|
|
747
799
|
dirty = true;
|
|
800
|
+
log(`[pr-monitor] corrupt checkpoint quarantined; store rebound to ${directory}`);
|
|
748
801
|
} else {
|
|
749
802
|
checkpoint = freshCheckpoint(directory);
|
|
750
803
|
}
|
|
@@ -783,6 +836,26 @@ function loadViewForWrite(directory) {
|
|
|
783
836
|
checkpoint.maintenance.corruptLegacyRecords += fold.corruptLines;
|
|
784
837
|
corruptTotal += fold.corruptLines;
|
|
785
838
|
cursor = fold.nextByte;
|
|
839
|
+
if (fold.aborted) {
|
|
840
|
+
const progress = cloneCheckpoint(checkpoint);
|
|
841
|
+
progress.records = { ...view };
|
|
842
|
+
progress.migration = {
|
|
843
|
+
scannedBytes: cursor,
|
|
844
|
+
sourceBytes: legacySize,
|
|
845
|
+
sourceMtimeMs: legacyMtime,
|
|
846
|
+
corruptLines: corruptTotal,
|
|
847
|
+
done: false,
|
|
848
|
+
archived: false,
|
|
849
|
+
startedAt
|
|
850
|
+
};
|
|
851
|
+
progress.updatedAt = Date.now();
|
|
852
|
+
progress.sequence += 1;
|
|
853
|
+
writeCheckpointFile(directory, progress);
|
|
854
|
+
checkpoint.sequence = progress.sequence;
|
|
855
|
+
log(`[pr-monitor] legacy scan aborted by an I/O error after ${cursor} bytes \u2014 migration stays incomplete and will retry`);
|
|
856
|
+
dirty = true;
|
|
857
|
+
return { checkpoint, view, audit, dirty };
|
|
858
|
+
}
|
|
786
859
|
const compactEvent = compactTerminalRecords(view, checkpoint);
|
|
787
860
|
if (compactEvent)
|
|
788
861
|
audit.push(compactEvent);
|
|
@@ -830,7 +903,7 @@ function loadViewForWrite(directory) {
|
|
|
830
903
|
}
|
|
831
904
|
const overlaid = overlayLegacy(directory, checkpoint);
|
|
832
905
|
view = overlaid.view;
|
|
833
|
-
if (overlaid.usedLegacy) {
|
|
906
|
+
if (overlaid.usedLegacy && !overlaid.aborted) {
|
|
834
907
|
migration.sourceBytes = legacySize;
|
|
835
908
|
migration.sourceMtimeMs = legacyMtime;
|
|
836
909
|
migration.scannedBytes = legacySize;
|
|
@@ -21,7 +21,7 @@ var package_default;
|
|
|
21
21
|
var init_package = __esm(() => {
|
|
22
22
|
package_default = {
|
|
23
23
|
name: "opencode-swarm",
|
|
24
|
-
version: "7.154.
|
|
24
|
+
version: "7.154.1",
|
|
25
25
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
26
26
|
main: "dist/index.js",
|
|
27
27
|
types: "dist/index.d.ts",
|
|
@@ -452,7 +452,7 @@ var CATALOG_SOURCE = [
|
|
|
452
452
|
category: "prm",
|
|
453
453
|
severity: "error",
|
|
454
454
|
privacyClass: "pseudonymous",
|
|
455
|
-
producer: "src/telemetry.ts:
|
|
455
|
+
producer: "src/telemetry.ts:1118",
|
|
456
456
|
consumers: NO_CONSUMERS,
|
|
457
457
|
futureOwnerIssue: ISSUE_SINK,
|
|
458
458
|
retentionOwnerIssue: ISSUE_SINK,
|
|
@@ -738,7 +738,7 @@ var CATALOG_SOURCE = [
|
|
|
738
738
|
category: "lifecycle",
|
|
739
739
|
severity: "notice",
|
|
740
740
|
privacyClass: "operational",
|
|
741
|
-
producer: "src/telemetry.ts:
|
|
741
|
+
producer: "src/telemetry.ts:1102",
|
|
742
742
|
consumers: NO_CONSUMERS,
|
|
743
743
|
futureOwnerIssue: ISSUE_SINK,
|
|
744
744
|
retentionOwnerIssue: ISSUE_SINK,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2ppbt5cf.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-wmxke5se.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-9wzgztj9.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-107cv0dr.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-xsbf2mmf.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-fz9xcq6z.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash,
|
|
4
4
|
derivePlanId
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-0vss7vdg.js";
|
|
6
6
|
import {
|
|
7
7
|
appendCoreEventSync
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-xdy28ngt.js";
|
|
9
9
|
import {
|
|
10
10
|
unsafePathTextReason
|
|
11
11
|
} from "./index-556ja8an.js";
|
|
12
12
|
import {
|
|
13
13
|
PlanSchema
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-xsbf2mmf.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteSwarmFile,
|
|
17
17
|
atomicWriteSwarmFileSync
|
|
18
18
|
} from "./index-c809a69b.js";
|
|
19
19
|
import {
|
|
20
20
|
assertProjectRoot
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-xagq35tf.js";
|
|
22
22
|
import {
|
|
23
23
|
require_proper_lockfile
|
|
24
24
|
} from "./index-7g4c7s5r.js";
|