opencode-swarm 7.187.2 → 7.188.0
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 +18 -1
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/delegation-lifecycle.d.ts +4 -0
- package/dist/cli/{auto-checkpoint-2xmptd5t.js → auto-checkpoint-hm3qjke6.js} +7 -7
- package/dist/cli/{checkpoint-2y7z19y5.js → checkpoint-z3eprns8.js} +12 -12
- package/dist/cli/{coder-settlement-s4d28fa6.js → coder-settlement-enhpgjdh.js} +8 -8
- package/dist/cli/{config-doctor-312afzhr.js → config-doctor-pfwj6c8d.js} +11 -11
- package/dist/cli/{core-2bywxc4w.js → core-r7ypbkzn.js} +1 -1
- package/dist/cli/{curation-policy-sr29thf5.js → curation-policy-v64ctcbd.js} +5 -5
- package/dist/cli/{curator-drift-xx8pp4g9.js → curator-drift-4e9p7afg.js} +5 -5
- package/dist/cli/{curator-llm-factory-4g2nvr76.js → curator-llm-factory-gnx5wyx0.js} +35 -35
- package/dist/cli/{curator-dvhf6jex.js → curator-m1f5tpmq.js} +35 -35
- package/dist/cli/{doctor-knowledge-receipt-phase-id-m239pgbz.js → doctor-knowledge-receipt-phase-id-mdvra07t.js} +6 -6
- package/dist/cli/{evidence-summary-service-9et04fjh.js → evidence-summary-service-64nqgkaw.js} +15 -15
- package/dist/cli/{gate-evidence-73vj3bgm.js → gate-evidence-22eweae0.js} +5 -5
- package/dist/cli/{guardrail-explain-8n4fx9zv.js → guardrail-explain-e6z5x5jt.js} +36 -36
- package/dist/cli/{guardrail-log-9gmfvnd7.js → guardrail-log-x53wpnp0.js} +6 -6
- package/dist/cli/{guardrail-reset-k3mrq25e.js → guardrail-reset-zr13a010.js} +35 -35
- package/dist/cli/{hive-promoter-bp3rz0q6.js → hive-promoter-knbj0apv.js} +35 -35
- package/dist/cli/{index-b308erem.js → index-00mqbc83.js} +3 -3
- package/dist/cli/{index-3ckfawjf.js → index-0dvkbkhg.js} +3 -3
- package/dist/cli/{index-jyxgkp4a.js → index-0v2svrev.js} +1 -1
- package/dist/cli/{index-m1vsqmyr.js → index-170k2yeh.js} +1 -1
- package/dist/cli/{index-3g3n9fjq.js → index-1wzsp7ag.js} +3 -3
- package/dist/cli/{index-f6pft90q.js → index-2bdebshy.js} +3 -3
- package/dist/cli/{index-3y0nr248.js → index-41v699sv.js} +3 -3
- package/dist/cli/{index-dx6bhbd6.js → index-4htcpbs4.js} +70 -51
- package/dist/cli/{index-y81jjedn.js → index-4ws5agzc.js} +6 -6
- package/dist/cli/{index-pqffq9mm.js → index-64s3825r.js} +2 -2
- package/dist/cli/{index-wpxy7099.js → index-6j6fmw3r.js} +1 -1
- package/dist/cli/{index-kc635w60.js → index-6qef1jtq.js} +4 -4
- package/dist/cli/{index-33345434.js → index-6zpfvs4t.js} +3 -3
- package/dist/cli/{index-85cx1mmb.js → index-78ag9dsc.js} +4 -4
- package/dist/cli/{index-6t7ygevg.js → index-7sbyvk99.js} +1 -1
- package/dist/cli/{index-b5tthmy2.js → index-7vrnbtsk.js} +1 -1
- package/dist/cli/{index-z04d01pv.js → index-8b0gmpm6.js} +7 -7
- package/dist/cli/{index-j5db3v56.js → index-8tqt8fbf.js} +4 -4
- package/dist/cli/{index-exj7czz9.js → index-8xzsncfk.js} +4 -4
- package/dist/cli/{index-xs070yr9.js → index-9yw1fgpp.js} +2 -2
- package/dist/cli/{index-tq6sbcys.js → index-aahk3yq1.js} +157 -108
- package/dist/cli/{index-4g39nne8.js → index-af1qsczg.js} +2 -2
- package/dist/cli/{index-e9ry78z5.js → index-b9pz70d0.js} +2 -2
- package/dist/cli/{index-tngc1erw.js → index-bd4agttq.js} +2 -2
- package/dist/cli/{index-dqberkr3.js → index-dfyjz036.js} +77 -11
- package/dist/cli/{index-jh9nrshe.js → index-ggdwbsc3.js} +1 -1
- package/dist/cli/{index-9jafghwk.js → index-j5ecgr3f.js} +35 -35
- package/dist/cli/{index-26zs9wsj.js → index-jd3hvnqn.js} +2 -2
- package/dist/cli/{index-tkm2rj27.js → index-jj222n0z.js} +1 -1
- package/dist/cli/{index-310h5192.js → index-k333nq26.js} +2 -2
- package/dist/cli/{index-v9y0230d.js → index-mb1reyw3.js} +1 -1
- package/dist/cli/{index-w0bvez8c.js → index-nf22t88g.js} +1 -1
- package/dist/cli/{index-tmp07h7b.js → index-qe3e6z5c.js} +37 -37
- package/dist/cli/{index-n8kqhxay.js → index-rwabrcsg.js} +1 -1
- package/dist/cli/{index-xv0t2sed.js → index-txecan4h.js} +14 -9
- package/dist/cli/{index-rtdxyjrg.js → index-w4309fkk.js} +6 -6
- package/dist/cli/{index-n55exns2.js → index-x73e0zkb.js} +1 -1
- package/dist/cli/{index-efbhea00.js → index-xgr0rjhh.js} +1 -1
- package/dist/cli/{index-7fxy1s86.js → index-zwbheerv.js} +4 -4
- package/dist/cli/{index-n45kz69m.js → index-zwgh0gty.js} +1 -1
- package/dist/cli/index.js +36 -36
- package/dist/cli/{knowledge-escalator-fnqctvxz.js → knowledge-escalator-w043k3ah.js} +12 -12
- package/dist/cli/{knowledge-events-mr1vh3nb.js → knowledge-events-krd8ndqh.js} +10 -10
- package/dist/cli/{knowledge-link-93nzznwd.js → knowledge-link-9gx2djyd.js} +4 -4
- package/dist/cli/{knowledge-store-dxy4s9k6.js → knowledge-store-0x9ejztz.js} +5 -5
- package/dist/cli/{knowledge-validator-gy39attk.js → knowledge-validator-y7pr7h3g.js} +7 -7
- package/dist/cli/{mcp-bxb59wsq.js → mcp-tf5b5aqa.js} +1 -1
- package/dist/cli/{model-preflight-2kje0sp0.js → model-preflight-pt6n1re7.js} +35 -35
- package/dist/cli/{pending-delegations-fm2nx2k0.js → pending-delegations-rqfgnay0.js} +7 -7
- package/dist/cli/{pr-subscriptions-g4f9rehb.js → pr-subscriptions-1frpr34c.js} +7 -7
- package/dist/cli/{pr-workflow-gate-qtq1wq95.js → pr-workflow-gate-dhzvaqj8.js} +35 -35
- package/dist/cli/{runner-verr6er5.js → runner-x8sbydkw.js} +5 -5
- package/dist/cli/{scan-cursor-8taj944f.js → scan-cursor-nm6h3gdd.js} +6 -6
- package/dist/cli/{schema-yxq3bjmd.js → schema-4fxm5b9r.js} +1 -1
- package/dist/cli/{scope-persistence-jppvjncr.js → scope-persistence-3hs7yy2b.js} +11 -11
- package/dist/cli/{server-2s7wqg9e.js → server-tmjef10y.js} +35 -35
- package/dist/cli/{skill-generator-pyf95aqw.js → skill-generator-qk0gpwhq.js} +14 -14
- package/dist/cli/{snapshot-coordination-init-8gbxw9sa.js → snapshot-coordination-init-pqsgthaa.js} +35 -35
- package/dist/cli/{speckit-checkoff-x2z0jamv.js → speckit-checkoff-9kx59cdb.js} +3 -3
- package/dist/cli/{telemetry-xwj899pd.js → telemetry-d0j31j5d.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-455bdcnk.js → worktree-collision-ownership-d890zzka.js} +7 -7
- package/dist/cli/{worktree-isolation-8x4p7tvm.js → worktree-isolation-45hj9jy7.js} +35 -35
- package/dist/commands/close/align-stage.d.ts +26 -0
- package/dist/commands/close/context.d.ts +8 -0
- package/dist/commands/close/internals.d.ts +1 -1
- package/dist/commands/destructive-purge.d.ts +55 -27
- package/dist/commands/registry.d.ts +1 -1
- package/dist/hooks/knowledge-validator.d.ts +18 -1
- package/dist/index.js +25 -24
- package/dist/models/model-override-state.d.ts +24 -1
- package/dist/models/task-model-routing.d.ts +58 -1
- package/dist/observability/catalog.d.ts +3 -3
- package/dist/telemetry.d.ts +15 -1
- package/dist/tools/repo-map.d.ts +4 -0
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-4ws5agzc.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveKnowledgeStoreDir
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zwgh0gty.js";
|
|
9
9
|
import {
|
|
10
10
|
init_git_executable,
|
|
11
11
|
resolveGitExecutableAsync
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-nf22t88g.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-7vrnbtsk.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPlan,
|
|
8
8
|
transientBackoff,
|
|
9
9
|
updateTaskCheckpointReceipt
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-8b0gmpm6.js";
|
|
11
11
|
import {
|
|
12
12
|
tool
|
|
13
13
|
} from "./index-9nyqt3kb.js";
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
} from "./index-bejxkee0.js";
|
|
24
24
|
import {
|
|
25
25
|
readLedgerEvents
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-zwbheerv.js";
|
|
27
27
|
import {
|
|
28
28
|
appendCoreEventSync
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-b9pz70d0.js";
|
|
30
30
|
import {
|
|
31
31
|
derivePlanId,
|
|
32
32
|
derivePlanIdentityHash
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./index-r6e8syr3.js";
|
|
45
45
|
import {
|
|
46
46
|
loadPluginConfigWithMeta
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-nf22t88g.js";
|
|
48
48
|
import {
|
|
49
49
|
init_git_executable,
|
|
50
50
|
resolveGitExecutable
|
|
@@ -65,9 +65,11 @@ import * as fs4 from "fs";
|
|
|
65
65
|
import * as path5 from "path";
|
|
66
66
|
|
|
67
67
|
// src/commands/destructive-purge.ts
|
|
68
|
+
import { spawnSync } from "child_process";
|
|
68
69
|
import { createHash, randomBytes } from "crypto";
|
|
69
70
|
import * as fs from "fs";
|
|
70
71
|
import * as path from "path";
|
|
72
|
+
init_git_executable();
|
|
71
73
|
init_logger();
|
|
72
74
|
var PENDING_PURGE_PATH = "pending-purge.json";
|
|
73
75
|
var PENDING_PURGE_TTL_MS = 15 * 60 * 1000;
|
|
@@ -78,8 +80,72 @@ var _internals = {
|
|
|
78
80
|
atomicWriteSwarmFileSync,
|
|
79
81
|
now: () => Date.now(),
|
|
80
82
|
randomBytes,
|
|
81
|
-
scopeDigest
|
|
83
|
+
scopeDigest,
|
|
84
|
+
runGitStatus: runGitStatusSync
|
|
82
85
|
};
|
|
86
|
+
var GIT_STATUS_ARGS = ["status", "--porcelain"];
|
|
87
|
+
function runGitStatusSync(args, cwd) {
|
|
88
|
+
const result = spawnSync(resolveGitExecutable(), args, {
|
|
89
|
+
cwd,
|
|
90
|
+
encoding: "utf8",
|
|
91
|
+
timeout: 1e4,
|
|
92
|
+
maxBuffer: 1024 * 1024,
|
|
93
|
+
windowsHide: true,
|
|
94
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
95
|
+
});
|
|
96
|
+
if (result.error || result.status !== 0)
|
|
97
|
+
return null;
|
|
98
|
+
return result.stdout ?? "";
|
|
99
|
+
}
|
|
100
|
+
function parseTrackedDirtyPaths(statusOutput) {
|
|
101
|
+
const dirtyPaths = [];
|
|
102
|
+
for (const line of statusOutput.split(`
|
|
103
|
+
`)) {
|
|
104
|
+
if (!line)
|
|
105
|
+
continue;
|
|
106
|
+
if (line.startsWith("??"))
|
|
107
|
+
continue;
|
|
108
|
+
const filePath = line.slice(3).trim().replace(/^"|"$/g, "");
|
|
109
|
+
if (!filePath)
|
|
110
|
+
continue;
|
|
111
|
+
if (/[RC]/.test(line.slice(0, 2)) && filePath.includes(" -> ")) {
|
|
112
|
+
for (const side of filePath.split(" -> ")) {
|
|
113
|
+
const cleaned = side.trim().replace(/^"|"$/g, "");
|
|
114
|
+
if (cleaned)
|
|
115
|
+
dirtyPaths.push(cleaned);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
dirtyPaths.push(filePath);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return dirtyPaths;
|
|
122
|
+
}
|
|
123
|
+
function readTrackedDirtyPaths(directory) {
|
|
124
|
+
const statusOutput = _internals.runGitStatus(GIT_STATUS_ARGS, directory);
|
|
125
|
+
if (statusOutput === null)
|
|
126
|
+
return { ok: false };
|
|
127
|
+
return { ok: true, dirtyPaths: parseTrackedDirtyPaths(statusOutput) };
|
|
128
|
+
}
|
|
129
|
+
function recheckBeforeDestructive(directory, expectedDirtyPaths) {
|
|
130
|
+
const read = readTrackedDirtyPaths(directory);
|
|
131
|
+
if (!read.ok) {
|
|
132
|
+
return {
|
|
133
|
+
ok: false,
|
|
134
|
+
reason: "git status could not be re-read before the destructive reset \u2014 the confirmed scope cannot be re-verified",
|
|
135
|
+
newDirtyPaths: []
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const expected = new Set(expectedDirtyPaths);
|
|
139
|
+
const newDirtyPaths = read.dirtyPaths.filter((p) => !expected.has(p));
|
|
140
|
+
if (newDirtyPaths.length > 0) {
|
|
141
|
+
return {
|
|
142
|
+
ok: false,
|
|
143
|
+
reason: `${newDirtyPaths.length} tracked file(s) changed after the close gate was verified`,
|
|
144
|
+
newDirtyPaths
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return { ok: true, dirtyPaths: read.dirtyPaths };
|
|
148
|
+
}
|
|
83
149
|
function pendingPath(directory) {
|
|
84
150
|
return validateSwarmPath(directory, PENDING_PURGE_PATH);
|
|
85
151
|
}
|
|
@@ -370,7 +436,7 @@ function backupTrackedChangesBeforeRollback(directory, repoRelPaths) {
|
|
|
370
436
|
|
|
371
437
|
// src/commands/rollback-gate.ts
|
|
372
438
|
init_git_executable();
|
|
373
|
-
import { spawnSync } from "child_process";
|
|
439
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
374
440
|
import * as fsSync from "fs";
|
|
375
441
|
import * as path3 from "path";
|
|
376
442
|
var ROLLBACK_GIT_KIND = "swarm-rollback-git";
|
|
@@ -379,7 +445,7 @@ var GIT_STATUS_TIMEOUT_MS = 1e4;
|
|
|
379
445
|
var GIT_LIST_MAX_BUFFER_BYTES = 32 * 1024 * 1024;
|
|
380
446
|
var _rollbackGateInternals = {
|
|
381
447
|
runGit: (args, cwd) => {
|
|
382
|
-
const result =
|
|
448
|
+
const result = spawnSync2(resolveGitExecutable(), args, {
|
|
383
449
|
cwd,
|
|
384
450
|
encoding: "utf-8",
|
|
385
451
|
timeout: GIT_STATUS_TIMEOUT_MS,
|
|
@@ -391,7 +457,7 @@ var _rollbackGateInternals = {
|
|
|
391
457
|
return result.stdout ?? "";
|
|
392
458
|
},
|
|
393
459
|
runGitBuffered: (args, cwd) => {
|
|
394
|
-
const result =
|
|
460
|
+
const result = spawnSync2(resolveGitExecutable(), args, {
|
|
395
461
|
cwd,
|
|
396
462
|
encoding: "utf-8",
|
|
397
463
|
timeout: GIT_STATUS_TIMEOUT_MS,
|
|
@@ -413,7 +479,7 @@ function isRealGitRepository(directory) {
|
|
|
413
479
|
}
|
|
414
480
|
return fsSync.existsSync(path3.join(directory, ".git", "HEAD"));
|
|
415
481
|
}
|
|
416
|
-
function
|
|
482
|
+
function parseTrackedDirtyPaths2(statusOutput) {
|
|
417
483
|
const dirtyPaths = [];
|
|
418
484
|
const tokens = statusOutput.split("\x00");
|
|
419
485
|
for (let i = 0;i < tokens.length; i += 1) {
|
|
@@ -471,7 +537,7 @@ function measureGitDestruction(directory, targetSha) {
|
|
|
471
537
|
if (status === null) {
|
|
472
538
|
return { kind: "unreadable" };
|
|
473
539
|
}
|
|
474
|
-
const dirtyRelPaths =
|
|
540
|
+
const dirtyRelPaths = parseTrackedDirtyPaths2(status);
|
|
475
541
|
if (targetSha) {
|
|
476
542
|
for (const rel of untrackedPathsInTargetTree(directory, targetSha)) {
|
|
477
543
|
if (!dirtyRelPaths.includes(rel))
|
|
@@ -1449,4 +1515,4 @@ var checkpoint = createSwarmTool({
|
|
|
1449
1515
|
}
|
|
1450
1516
|
});
|
|
1451
1517
|
|
|
1452
|
-
export { previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
|
|
1518
|
+
export { GIT_STATUS_ARGS, parseTrackedDirtyPaths, recheckBeforeDestructive, previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
|
|
@@ -242,7 +242,7 @@ var _internals2 = {
|
|
|
242
242
|
symlinkSync: fs2.symlinkSync
|
|
243
243
|
},
|
|
244
244
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
245
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
245
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-3hs7yy2b.js");
|
|
246
246
|
return realWrite(directory, taskId, files);
|
|
247
247
|
},
|
|
248
248
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -23,76 +23,76 @@ import {
|
|
|
23
23
|
resolveFallbackModel,
|
|
24
24
|
resolvePrimaryAgentNames,
|
|
25
25
|
stripSwarmPrefix
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
26
|
+
} from "./index-aahk3yq1.js";
|
|
27
|
+
import"./index-1wzsp7ag.js";
|
|
28
|
+
import"./index-64s3825r.js";
|
|
29
|
+
import"./index-2bdebshy.js";
|
|
30
30
|
import"./index-vx8a8w3b.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
31
|
+
import"./index-x73e0zkb.js";
|
|
32
|
+
import"./index-jd3hvnqn.js";
|
|
33
33
|
import"./index-txdagbh7.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-af1qsczg.js";
|
|
35
35
|
import {
|
|
36
36
|
createExplorerAgent
|
|
37
37
|
} from "./index-rdec0y3z.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
38
|
+
import"./index-jj222n0z.js";
|
|
39
|
+
import"./index-78ag9dsc.js";
|
|
40
|
+
import"./index-0dvkbkhg.js";
|
|
41
|
+
import"./index-w4309fkk.js";
|
|
42
42
|
import"./index-mf19yqss.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-41v699sv.js";
|
|
44
44
|
import"./index-cjapb4hy.js";
|
|
45
45
|
import"./index-a8gvszr2.js";
|
|
46
46
|
import"./index-pt7h91zc.js";
|
|
47
47
|
import"./index-q7sjgr1y.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
48
|
+
import"./index-dfyjz036.js";
|
|
49
|
+
import"./index-8b0gmpm6.js";
|
|
50
50
|
import"./index-6b295cas.js";
|
|
51
51
|
import"./index-9nyqt3kb.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-xgr0rjhh.js";
|
|
53
53
|
import"./index-zsrtt42s.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
54
|
+
import"./index-170k2yeh.js";
|
|
55
|
+
import"./index-00mqbc83.js";
|
|
56
|
+
import"./index-ggdwbsc3.js";
|
|
57
57
|
import"./index-g4fs6z4e.js";
|
|
58
|
-
import"./index-
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
58
|
+
import"./index-8xzsncfk.js";
|
|
59
|
+
import"./index-6qef1jtq.js";
|
|
60
|
+
import"./index-8tqt8fbf.js";
|
|
61
61
|
import"./index-m9zzj4ee.js";
|
|
62
62
|
import"./index-bejxkee0.js";
|
|
63
63
|
import"./index-2s7dvzff.js";
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
64
|
+
import"./index-txecan4h.js";
|
|
65
|
+
import"./index-rwabrcsg.js";
|
|
66
66
|
import"./index-rtry5xyf.js";
|
|
67
|
-
import"./index-
|
|
67
|
+
import"./index-bd4agttq.js";
|
|
68
68
|
import"./index-kbkk7vnh.js";
|
|
69
69
|
import"./index-0725jpp7.js";
|
|
70
|
-
import"./index-
|
|
71
|
-
import"./index-
|
|
72
|
-
import"./index-
|
|
70
|
+
import"./index-k333nq26.js";
|
|
71
|
+
import"./index-zwbheerv.js";
|
|
72
|
+
import"./index-b9pz70d0.js";
|
|
73
73
|
import"./index-m1qy7f1e.js";
|
|
74
74
|
import"./index-cc1vzq4m.js";
|
|
75
75
|
import"./index-9hag235h.js";
|
|
76
76
|
import"./index-ry16d01s.js";
|
|
77
77
|
import"./index-rdm3px0g.js";
|
|
78
78
|
import"./index-7pmbnjvj.js";
|
|
79
|
-
import"./index-
|
|
80
|
-
import"./index-
|
|
79
|
+
import"./index-mb1reyw3.js";
|
|
80
|
+
import"./index-4ws5agzc.js";
|
|
81
81
|
import"./index-vzm6zre7.js";
|
|
82
82
|
import"./index-ae75rja9.js";
|
|
83
|
-
import"./index-
|
|
84
|
-
import"./index-
|
|
85
|
-
import"./index-
|
|
83
|
+
import"./index-zwgh0gty.js";
|
|
84
|
+
import"./index-7sbyvk99.js";
|
|
85
|
+
import"./index-0v2svrev.js";
|
|
86
86
|
import"./index-t7hmqgjy.js";
|
|
87
|
-
import"./index-
|
|
87
|
+
import"./index-4htcpbs4.js";
|
|
88
88
|
import"./index-fzpt2djt.js";
|
|
89
89
|
import"./index-ejhxgyvm.js";
|
|
90
90
|
import"./index-7g4c7s5r.js";
|
|
91
91
|
import"./index-r6e8syr3.js";
|
|
92
92
|
import"./index-gx2vp8gx.js";
|
|
93
|
-
import"./index-
|
|
93
|
+
import"./index-nf22t88g.js";
|
|
94
94
|
import"./index-zxdawwc7.js";
|
|
95
|
-
import"./index-
|
|
95
|
+
import"./index-7vrnbtsk.js";
|
|
96
96
|
import"./index-bstjg81q.js";
|
|
97
97
|
import"./index-bk5tah7q.js";
|
|
98
98
|
import"./index-gknz3bv1.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./index-txdagbh7.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteFile
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-7sbyvk99.js";
|
|
13
13
|
import {
|
|
14
14
|
withEvidenceLock
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-0v2svrev.js";
|
|
16
16
|
import {
|
|
17
17
|
assertProjectRoot
|
|
18
18
|
} from "./index-t7hmqgjy.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zwbheerv.js";
|
|
5
5
|
import {
|
|
6
6
|
appendCoreEventSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-b9pz70d0.js";
|
|
8
8
|
import {
|
|
9
9
|
deleteCoordinationState,
|
|
10
10
|
importCoordinationOnce,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-9yw1fgpp.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-6j6fmw3r.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
DEFAULT_CI_DEADLINE_MS,
|
|
@@ -97,77 +97,77 @@ import {
|
|
|
97
97
|
handleWriteRetroCommand,
|
|
98
98
|
normalizeSwarmCommandInput,
|
|
99
99
|
resolveCommand
|
|
100
|
-
} from "./index-
|
|
101
|
-
import"./index-
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
100
|
+
} from "./index-aahk3yq1.js";
|
|
101
|
+
import"./index-1wzsp7ag.js";
|
|
102
|
+
import"./index-64s3825r.js";
|
|
103
|
+
import"./index-2bdebshy.js";
|
|
104
104
|
import"./index-vx8a8w3b.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-x73e0zkb.js";
|
|
106
|
+
import"./index-jd3hvnqn.js";
|
|
107
107
|
import"./index-txdagbh7.js";
|
|
108
|
-
import"./index-
|
|
108
|
+
import"./index-af1qsczg.js";
|
|
109
109
|
import"./index-rdec0y3z.js";
|
|
110
|
-
import"./index-
|
|
111
|
-
import"./index-
|
|
112
|
-
import"./index-
|
|
113
|
-
import"./index-
|
|
110
|
+
import"./index-jj222n0z.js";
|
|
111
|
+
import"./index-78ag9dsc.js";
|
|
112
|
+
import"./index-0dvkbkhg.js";
|
|
113
|
+
import"./index-w4309fkk.js";
|
|
114
114
|
import"./index-mf19yqss.js";
|
|
115
|
-
import"./index-
|
|
115
|
+
import"./index-41v699sv.js";
|
|
116
116
|
import"./index-cjapb4hy.js";
|
|
117
117
|
import"./index-a8gvszr2.js";
|
|
118
118
|
import"./index-pt7h91zc.js";
|
|
119
119
|
import"./index-q7sjgr1y.js";
|
|
120
|
-
import"./index-
|
|
121
|
-
import"./index-
|
|
120
|
+
import"./index-dfyjz036.js";
|
|
121
|
+
import"./index-8b0gmpm6.js";
|
|
122
122
|
import"./index-6b295cas.js";
|
|
123
123
|
import"./index-9nyqt3kb.js";
|
|
124
|
-
import"./index-
|
|
124
|
+
import"./index-xgr0rjhh.js";
|
|
125
125
|
import"./index-zsrtt42s.js";
|
|
126
|
-
import"./index-
|
|
127
|
-
import"./index-
|
|
128
|
-
import"./index-
|
|
126
|
+
import"./index-170k2yeh.js";
|
|
127
|
+
import"./index-00mqbc83.js";
|
|
128
|
+
import"./index-ggdwbsc3.js";
|
|
129
129
|
import"./index-g4fs6z4e.js";
|
|
130
|
-
import"./index-
|
|
131
|
-
import"./index-
|
|
132
|
-
import"./index-
|
|
130
|
+
import"./index-8xzsncfk.js";
|
|
131
|
+
import"./index-6qef1jtq.js";
|
|
132
|
+
import"./index-8tqt8fbf.js";
|
|
133
133
|
import"./index-m9zzj4ee.js";
|
|
134
134
|
import"./index-bejxkee0.js";
|
|
135
135
|
import"./index-2s7dvzff.js";
|
|
136
|
-
import"./index-
|
|
137
|
-
import"./index-
|
|
136
|
+
import"./index-txecan4h.js";
|
|
137
|
+
import"./index-rwabrcsg.js";
|
|
138
138
|
import"./index-rtry5xyf.js";
|
|
139
|
-
import"./index-
|
|
139
|
+
import"./index-bd4agttq.js";
|
|
140
140
|
import"./index-kbkk7vnh.js";
|
|
141
141
|
import"./index-0725jpp7.js";
|
|
142
|
-
import"./index-
|
|
143
|
-
import"./index-
|
|
144
|
-
import"./index-
|
|
142
|
+
import"./index-k333nq26.js";
|
|
143
|
+
import"./index-zwbheerv.js";
|
|
144
|
+
import"./index-b9pz70d0.js";
|
|
145
145
|
import"./index-m1qy7f1e.js";
|
|
146
146
|
import"./index-cc1vzq4m.js";
|
|
147
147
|
import"./index-9hag235h.js";
|
|
148
148
|
import"./index-ry16d01s.js";
|
|
149
149
|
import"./index-rdm3px0g.js";
|
|
150
150
|
import"./index-7pmbnjvj.js";
|
|
151
|
-
import"./index-
|
|
152
|
-
import"./index-
|
|
151
|
+
import"./index-mb1reyw3.js";
|
|
152
|
+
import"./index-4ws5agzc.js";
|
|
153
153
|
import"./index-vzm6zre7.js";
|
|
154
154
|
import"./index-ae75rja9.js";
|
|
155
|
-
import"./index-
|
|
156
|
-
import"./index-
|
|
157
|
-
import"./index-
|
|
155
|
+
import"./index-zwgh0gty.js";
|
|
156
|
+
import"./index-7sbyvk99.js";
|
|
157
|
+
import"./index-0v2svrev.js";
|
|
158
158
|
import"./index-t7hmqgjy.js";
|
|
159
|
-
import"./index-
|
|
159
|
+
import"./index-4htcpbs4.js";
|
|
160
160
|
import"./index-fzpt2djt.js";
|
|
161
161
|
import"./index-ejhxgyvm.js";
|
|
162
162
|
import"./index-7g4c7s5r.js";
|
|
163
163
|
import"./index-r6e8syr3.js";
|
|
164
164
|
import"./index-gx2vp8gx.js";
|
|
165
|
-
import"./index-
|
|
165
|
+
import"./index-nf22t88g.js";
|
|
166
166
|
import"./index-zxdawwc7.js";
|
|
167
167
|
import {
|
|
168
168
|
init_schema,
|
|
169
169
|
stripKnownSwarmPrefix
|
|
170
|
-
} from "./index-
|
|
170
|
+
} from "./index-7vrnbtsk.js";
|
|
171
171
|
import {
|
|
172
172
|
AGENT_TOOL_MAP,
|
|
173
173
|
ORCHESTRATOR_NAME,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-rwabrcsg.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-4ws5agzc.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-zwgh0gty.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-7sbyvk99.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -579,16 +579,16 @@ function auditEntryHealth(entry) {
|
|
|
579
579
|
async function quarantineEntry(directory, entryId, reason, reportedBy, curationContext) {
|
|
580
580
|
if (!directory || directory.includes("..")) {
|
|
581
581
|
warn("[knowledge-validator] quarantineEntry: directory traversal attempt blocked");
|
|
582
|
-
return;
|
|
582
|
+
return { status: "invalid_input" };
|
|
583
583
|
}
|
|
584
584
|
if (!entryId || entryId.includes("\x00") || entryId.includes(`
|
|
585
585
|
`)) {
|
|
586
586
|
warn("[knowledge-validator] quarantineEntry: invalid entryId rejected");
|
|
587
|
-
return;
|
|
587
|
+
return { status: "invalid_input" };
|
|
588
588
|
}
|
|
589
589
|
const validReportedBy = ["architect", "user", "auto"];
|
|
590
590
|
if (!validReportedBy.includes(reportedBy)) {
|
|
591
|
-
return;
|
|
591
|
+
return { status: "invalid_input" };
|
|
592
592
|
}
|
|
593
593
|
const sanitizedReason = reason.slice(0, 500).replace(/[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\x0d]/g, "");
|
|
594
594
|
const knowledgePath = resolveSwarmKnowledgePath(directory);
|
|
@@ -605,7 +605,7 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
|
|
|
605
605
|
const entries = await readKnowledge(knowledgePath);
|
|
606
606
|
const entry = entries.find((e) => e.id === entryId);
|
|
607
607
|
if (!entry) {
|
|
608
|
-
return;
|
|
608
|
+
return { status: "not_found" };
|
|
609
609
|
}
|
|
610
610
|
if (curationContext) {
|
|
611
611
|
const refreshedContext = {
|
|
@@ -615,7 +615,11 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
|
|
|
615
615
|
const decision = await authorizeCuration(curationContext.input, refreshedContext);
|
|
616
616
|
if (!decision.authorized) {
|
|
617
617
|
warn(`[knowledge-validator] quarantineEntry blocked by cohort-safety policy ` + `(basis: ${decision.basis}): ${decision.detail}`);
|
|
618
|
-
return
|
|
618
|
+
return {
|
|
619
|
+
status: "denied",
|
|
620
|
+
basis: decision.basis,
|
|
621
|
+
detail: decision.detail
|
|
622
|
+
};
|
|
619
623
|
}
|
|
620
624
|
}
|
|
621
625
|
const remaining = entries.filter((e) => e.id !== entryId);
|
|
@@ -650,6 +654,7 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
|
|
|
650
654
|
};
|
|
651
655
|
await appendFile(rejectedPath, `${JSON.stringify(rejectedRecord)}
|
|
652
656
|
`, "utf-8");
|
|
657
|
+
return { status: "quarantined" };
|
|
653
658
|
} finally {
|
|
654
659
|
if (release) {
|
|
655
660
|
await release();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledgeEvents,
|
|
4
4
|
recordKnowledgeEvent
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-6qef1jtq.js";
|
|
6
6
|
import {
|
|
7
7
|
queryHistoricalOutcomes
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-8tqt8fbf.js";
|
|
9
9
|
import {
|
|
10
10
|
jaccardBigram,
|
|
11
11
|
readKnowledge,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveSwarmKnowledgePath,
|
|
14
14
|
transactKnowledge,
|
|
15
15
|
wordBigrams
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-4ws5agzc.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -226,11 +226,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
226
226
|
alreadyInactive: true
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
229
|
+
const { quarantineEntry } = await import("./knowledge-validator-y7pr7h3g.js");
|
|
230
230
|
let policyConfig;
|
|
231
231
|
try {
|
|
232
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
233
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
232
|
+
const { KnowledgeConfigSchema } = await import("./schema-4fxm5b9r.js");
|
|
233
|
+
const { loadPluginConfigWithMeta } = await import("./index-6zpfvs4t.js");
|
|
234
234
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
235
235
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
236
236
|
} catch {
|