opencode-swarm 7.171.2 → 7.172.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/README.md +5 -0
- 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 +21 -5
- package/dist/background/pending-delegations.d.ts +118 -6
- package/dist/cli/ast-diff-f2a1y02y.js +13 -0
- package/dist/cli/{coder-settlement-9e696204.js → coder-settlement-pw4jbrez.js} +14 -14
- package/dist/cli/{config-doctor-zr748h4m.js → config-doctor-ab0ckcsc.js} +6 -6
- package/dist/cli/{core-aa3jmzcs.js → core-ty98bsnz.js} +5 -5
- package/dist/cli/{curation-policy-fakrpw5t.js → curation-policy-cvjd6kz8.js} +7 -7
- package/dist/cli/{curator-drift-r9r8gepb.js → curator-drift-b0pbzjxv.js} +8 -8
- package/dist/cli/curator-llm-factory-69vje2m7.js +72 -0
- package/dist/cli/{curator-xgpxtaf1.js → curator-rvrhbsy2.js} +45 -45
- package/dist/cli/{dispatch-hwwj3qrb.js → dispatch-9yqqqfr6.js} +2 -2
- package/dist/cli/{evidence-summary-service-5e2323zr.js → evidence-summary-service-wmer0c5b.js} +22 -22
- package/dist/cli/{gate-evidence-5htpsr5y.js → gate-evidence-6d0f6ekr.js} +9 -9
- package/dist/cli/guardrail-explain-z06dyan0.js +73 -0
- package/dist/cli/guardrail-log-bmyxcdfk.js +23 -0
- package/dist/cli/{guardrail-reset-rdqxeqy0.js → guardrail-reset-9wmbhwff.js} +45 -45
- package/dist/cli/hive-promoter-mc8xssba.js +87 -0
- package/dist/cli/{index-mazy938h.js → index-008sppht.js} +4 -4
- package/dist/cli/{index-aa2eyfvr.js → index-31fes86t.js} +2 -2
- package/dist/cli/{index-vqb65csb.js → index-3r17j2gc.js} +138 -28
- package/dist/cli/{index-wfh89qct.js → index-66tshqdp.js} +4 -4
- package/dist/cli/{index-e7yv4xw1.js → index-93z2fhyp.js} +3 -3
- package/dist/cli/{index-6k5aq7b9.js → index-9bg5vc22.js} +2 -2
- package/dist/cli/{index-g6nen3gt.js → index-9p00xent.js} +1 -1
- package/dist/cli/{index-yqbnsmmv.js → index-bdqefjxg.js} +1 -1
- package/dist/cli/{index-f1rj1j8t.js → index-br08k19k.js} +2713 -1429
- package/dist/cli/{index-ee6ydtfe.js → index-c1ggtmpm.js} +1 -1
- package/dist/cli/{index-2ryy0cwt.js → index-c5wyannc.js} +30 -18
- package/dist/cli/{index-qcy7eg6z.js → index-dg5znyqw.js} +154 -37
- package/dist/cli/{index-sxt7fgcw.js → index-ecaws78e.js} +1 -1
- package/dist/cli/{index-j6rq132j.js → index-edext37b.js} +7 -7
- package/dist/cli/{index-cw912re7.js → index-fpbcxykc.js} +1 -1
- package/dist/cli/{index-3qf1vxtb.js → index-frcemc0b.js} +1 -1
- package/dist/cli/{index-nfs78aqj.js → index-gdrdtbw6.js} +2 -2
- package/dist/cli/{index-bpmtbmy9.js → index-gknz3bv1.js} +1 -1
- package/dist/cli/{index-kb66he4e.js → index-h91jjw6t.js} +1 -1
- package/dist/cli/{index-er6sk4e6.js → index-ha3wsy2e.js} +2 -2
- package/dist/cli/{index-5400m33a.js → index-hnvmj9wx.js} +1 -1
- package/dist/cli/{index-dsgc303n.js → index-hx0pas8b.js} +4 -4
- package/dist/cli/{index-0caqxnby.js → index-hydccmm1.js} +1 -1
- package/dist/cli/{index-r60cw2jt.js → index-j8warkkj.js} +7 -7
- package/dist/cli/{index-rrc08h4q.js → index-jc0as97z.js} +5 -5
- package/dist/cli/{index-9dz2ee2g.js → index-jmn35na4.js} +70 -50
- package/dist/cli/{index-95e3a9en.js → index-jzrx2sx2.js} +1 -1
- package/dist/cli/{index-b3pmzbh1.js → index-ma38q4rf.js} +2 -2
- package/dist/cli/{index-fhh02gwx.js → index-mq69g46a.js} +2 -2
- package/dist/cli/{index-3jcp3zb6.js → index-nzpw41w6.js} +2 -2
- package/dist/cli/{index-9txyxbqc.js → index-pmg1k4mv.js} +8 -8
- package/dist/cli/{index-b43rt5ph.js → index-pt7h91zc.js} +19 -1
- package/dist/cli/{index-7hnjs7tf.js → index-q58xegd7.js} +2 -2
- package/dist/cli/{index-0yffa3np.js → index-qfz31dcy.js} +5 -5
- package/dist/cli/{ast-diff-b0esr2kf.js → index-qss1s93b.js} +3 -6
- package/dist/cli/{index-d79q2f8z.js → index-re1ey51s.js} +4 -4
- package/dist/cli/{index-jr6pypmj.js → index-rhe9zbe2.js} +45 -45
- package/dist/cli/{index-qdy4a48x.js → index-sakgsnxj.js} +3 -3
- package/dist/cli/{index-04ph4jp2.js → index-tm6z0wgj.js} +2 -2
- package/dist/cli/{index-nyn01yrz.js → index-tr3tbtgw.js} +2 -2
- package/dist/cli/{index-q2yk70rs.js → index-twpzfwga.js} +4 -3
- package/dist/cli/{index-ph94evsh.js → index-vqs7dxp7.js} +7 -7
- package/dist/cli/{index-gq2zdxep.js → index-w0141tkw.js} +8 -8
- package/dist/cli/{index-11gz0few.js → index-wf6pbrg7.js} +1 -1
- package/dist/cli/{index-n832052r.js → index-wrt875kh.js} +1 -1
- package/dist/cli/{index-nbdmdyke.js → index-ws3ggk1h.js} +7 -7
- package/dist/cli/{index-9vfp6g53.js → index-y21gyrt6.js} +47 -47
- package/dist/cli/{index-7qqwx64h.js → index-y5x1swr8.js} +8 -8
- package/dist/cli/{index-evxd1art.js → index-yf1mvexg.js} +2 -2
- package/dist/cli/{semantic-classifier-ygqk0me1.js → index-ykamkw55.js} +2 -5
- package/dist/cli/{index-9br68j86.js → index-z2deqhpp.js} +1 -1
- package/dist/cli/{index-5a8q4qr5.js → index-zcjdw8dw.js} +2 -2
- package/dist/cli/index.js +53 -47
- package/dist/cli/{knowledge-escalator-kn74r5w8.js → knowledge-escalator-k4ab3f1f.js} +17 -17
- package/dist/cli/{knowledge-events-7gpw741m.js → knowledge-events-aqy4hb15.js} +15 -15
- package/dist/cli/{knowledge-link-vh9pfnb9.js → knowledge-link-51m3c09s.js} +6 -6
- package/dist/cli/{knowledge-store-3f9kke7z.js → knowledge-store-xgkga9xj.js} +7 -7
- package/dist/cli/{knowledge-validator-c2z68v8v.js → knowledge-validator-vvgs8m7m.js} +9 -9
- package/dist/cli/mcp-qvgka4c8.js +78 -0
- package/dist/cli/mcp.d.ts +27 -0
- package/dist/cli/{model-preflight-1ycat9jz.js → model-preflight-2mvdbj0c.js} +1 -1
- package/dist/cli/{pending-delegations-d5c07rb7.js → pending-delegations-1xvmbw29.js} +21 -13
- package/dist/cli/{pr-subscriptions-krv0jvds.js → pr-subscriptions-13xqrhwx.js} +13 -13
- package/dist/cli/{pr-workflow-gate-hmdht1he.js → pr-workflow-gate-6qzpckxa.js} +45 -45
- package/dist/cli/{runner-8m8qhngm.js → runner-k2t9n662.js} +7 -7
- package/dist/cli/{scan-cursor-b57xxs3q.js → scan-cursor-q5nycpzb.js} +8 -8
- package/dist/cli/{schema-r8tv8dqm.js → schema-a8gskpey.js} +3 -3
- package/dist/cli/{scope-persistence-0sc90mpj.js → scope-persistence-q0n6y3n7.js} +17 -17
- package/dist/cli/semantic-classifier-bjsez0v5.js +8 -0
- package/dist/cli/server-wmbahe8h.js +18129 -0
- package/dist/cli/{skill-generator-syxa1mxm.js → skill-generator-z76whwng.js} +19 -19
- package/dist/cli/snapshot-coordination-init-k2fgw463.js +86 -0
- package/dist/cli/{telemetry-0mz37v3h.js → telemetry-zed80n86.js} +3 -3
- package/dist/cli/{workspace-snapshot-hkz2wt1c.js → workspace-snapshot-93dx9rbt.js} +4 -4
- package/dist/cli/{worktree-collision-ownership-1tzw8qzp.js → worktree-collision-ownership-deyrgr70.js} +14 -14
- package/dist/cli/{worktree-isolation-ez0e48v3.js → worktree-isolation-9rjxaxp6.js} +45 -45
- package/dist/hooks/pr-workflow-gate.d.ts +14 -2
- package/dist/hooks/pr-workflow-session-resolver.d.ts +45 -0
- package/dist/hooks/search-knowledge.d.ts +7 -0
- package/dist/index.js +108 -108
- package/dist/mcp/adapters/knowledge-memory.d.ts +16 -0
- package/dist/mcp/adapters/scope-repo.d.ts +14 -0
- package/dist/mcp/adapters/verification.d.ts +20 -0
- package/dist/mcp/pipeline.d.ts +25 -0
- package/dist/mcp/registry.d.ts +47 -0
- package/dist/mcp/server.d.ts +35 -0
- package/dist/memory/gateway.d.ts +9 -1
- package/dist/observability/catalog.d.ts +4 -3
- package/dist/plan/index.d.ts +1 -0
- package/dist/plan/ledger.d.ts +10 -0
- package/dist/plan/manager.d.ts +38 -2
- package/dist/pr-review/completion.d.ts +12 -0
- package/dist/telemetry.d.ts +11 -1
- package/dist/tools/dispatch-lanes.d.ts +5 -1
- package/dist/tools/phase-complete.d.ts +1 -1
- package/dist/tools/placeholder-scan.d.ts +10 -0
- package/dist/tools/pr-workflow-status.d.ts +6 -0
- package/dist/tools/quality-budget.d.ts +10 -0
- package/dist/tools/repo-map.d.ts +5 -0
- package/dist/tools/sast-scan.d.ts +11 -0
- package/dist/tools/swarm-memory-recall.d.ts +12 -0
- package/dist/tools/syntax-check.d.ts +12 -1
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-nshzhgs4.js +0 -72
- package/dist/cli/guardrail-explain-d0h0p73g.js +0 -73
- package/dist/cli/guardrail-log-heejmjce.js +0 -23
- package/dist/cli/hive-promoter-n262tkm3.js +0 -87
- package/dist/cli/snapshot-coordination-init-x18mwxyv.js +0 -86
|
@@ -30,4 +30,4 @@ function simpleGlobToRegex(pattern, flags = "i") {
|
|
|
30
30
|
const escaped = pattern.split("*").map((starSegment) => starSegment.split("?").map(escapeRegex).join(".")).join(".*");
|
|
31
31
|
return new RegExp(`^${escaped}$`, flags);
|
|
32
32
|
}
|
|
33
|
-
export { SwarmError, simpleGlobToRegex };
|
|
33
|
+
export { SwarmError, escapeRegex, simpleGlobToRegex };
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
import {
|
|
3
3
|
derivePlanId,
|
|
4
4
|
derivePlanIdentityHash
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-9p00xent.js";
|
|
6
6
|
import {
|
|
7
7
|
getProjectDb,
|
|
8
8
|
projectDbExists,
|
|
9
9
|
withImmediateTransaction,
|
|
10
10
|
withProjectDbReadOnly
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-bdqefjxg.js";
|
|
12
12
|
import {
|
|
13
13
|
assertProjectRoot,
|
|
14
14
|
withEvidenceLock
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-yf1mvexg.js";
|
|
16
16
|
import {
|
|
17
17
|
emit
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-jmn35na4.js";
|
|
19
19
|
import {
|
|
20
20
|
ExecutionProfileSchema,
|
|
21
21
|
PlanSchema,
|
|
22
22
|
TaskStatusSchema,
|
|
23
23
|
init_loader,
|
|
24
24
|
loadPluginConfig
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-zcjdw8dw.js";
|
|
26
26
|
import {
|
|
27
27
|
init_package,
|
|
28
28
|
package_default
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-twpzfwga.js";
|
|
30
30
|
import {
|
|
31
31
|
criticalWarn,
|
|
32
32
|
init_logger,
|
|
@@ -1244,7 +1244,8 @@ async function initLedger(directory, planId, initialPlanHash, initialPlan) {
|
|
|
1244
1244
|
if (!initialPlanHash) {
|
|
1245
1245
|
try {
|
|
1246
1246
|
if (fs.existsSync(planJsonPath)) {
|
|
1247
|
-
const
|
|
1247
|
+
const initBytes = fs.readFileSync(planJsonPath);
|
|
1248
|
+
const content = new TextDecoder("utf-8", { fatal: true }).decode(initBytes);
|
|
1248
1249
|
const plan = JSON.parse(content);
|
|
1249
1250
|
planHashAfter = computePlanLedgerHash(plan);
|
|
1250
1251
|
if (!embeddedPlan)
|
|
@@ -1750,11 +1751,16 @@ function reconstructPlanFromEvents(directory, events) {
|
|
|
1750
1751
|
const relevantEvents = events.filter((e) => e.plan_id === targetPlanId);
|
|
1751
1752
|
{
|
|
1752
1753
|
const snapshotEvents = relevantEvents.filter((e) => e.event_type === "snapshot");
|
|
1753
|
-
|
|
1754
|
-
const
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
|
|
1754
|
+
for (let i = snapshotEvents.length - 1;i >= 0; i--) {
|
|
1755
|
+
const candidate = snapshotEvents[i];
|
|
1756
|
+
const candidatePayload = candidate.payload;
|
|
1757
|
+
const parseResult = candidatePayload && candidatePayload.plan ? PlanSchema.safeParse(candidatePayload.plan) : null;
|
|
1758
|
+
if (!parseResult || !parseResult.success) {
|
|
1759
|
+
log(`[ledger] Skipping degraded snapshot event seq=${candidate.seq} (payload failed PlanSchema validation); falling back to older snapshot history.`);
|
|
1760
|
+
continue;
|
|
1761
|
+
}
|
|
1762
|
+
let plan2 = parseResult.data;
|
|
1763
|
+
const eventsAfterSnapshot = relevantEvents.filter((e) => e.seq > candidate.seq);
|
|
1758
1764
|
for (const event of eventsAfterSnapshot) {
|
|
1759
1765
|
plan2 = applyEventToPlan(plan2, event);
|
|
1760
1766
|
if (plan2 === null) {
|
|
@@ -1784,7 +1790,8 @@ function reconstructPlanFromEvents(directory, events) {
|
|
|
1784
1790
|
}
|
|
1785
1791
|
let plan;
|
|
1786
1792
|
try {
|
|
1787
|
-
const
|
|
1793
|
+
const bootstrapBytes = fs.readFileSync(planJsonPath);
|
|
1794
|
+
const content = new TextDecoder("utf-8", { fatal: true }).decode(bootstrapBytes);
|
|
1788
1795
|
plan = JSON.parse(content);
|
|
1789
1796
|
} catch {
|
|
1790
1797
|
return null;
|
|
@@ -1933,12 +1940,12 @@ async function quarantineLedgerSuffix(directory, badSuffix) {
|
|
|
1933
1940
|
}
|
|
1934
1941
|
}
|
|
1935
1942
|
async function loadLastApprovedPlan(directory, expectedPlanId) {
|
|
1936
|
-
const
|
|
1937
|
-
return findLastApprovedSnapshot(events, expectedPlanId);
|
|
1943
|
+
const integrity = await readLedgerEventsWithIntegrity(directory);
|
|
1944
|
+
return findLastApprovedSnapshot(integrity.events, expectedPlanId);
|
|
1938
1945
|
}
|
|
1939
1946
|
async function loadLastPlanCriticApprovedSnapshot(directory, expectedPlanId) {
|
|
1940
|
-
const
|
|
1941
|
-
return findLastApprovedSnapshot(events, expectedPlanId, (payload) => payload.approval?.source === "plan_critic_gate");
|
|
1947
|
+
const integrity = await readLedgerEventsWithIntegrity(directory);
|
|
1948
|
+
return findLastApprovedSnapshot(integrity.events, expectedPlanId, (payload) => payload.approval?.source === "plan_critic_gate");
|
|
1942
1949
|
}
|
|
1943
1950
|
function findLastApprovedSnapshot(events, expectedPlanId, extraFilter) {
|
|
1944
1951
|
if (events.length === 0) {
|
|
@@ -1957,6 +1964,11 @@ function findLastApprovedSnapshot(events, expectedPlanId, extraFilter) {
|
|
|
1957
1964
|
if (!payload || typeof payload !== "object" || !payload.plan) {
|
|
1958
1965
|
continue;
|
|
1959
1966
|
}
|
|
1967
|
+
const parsedPlan = PlanSchema.safeParse(payload.plan);
|
|
1968
|
+
if (!parsedPlan.success) {
|
|
1969
|
+
criticalWarn(`[ledger] Skipping schema-invalid critic_approved snapshot at seq ${event.seq}: ${parsedPlan.error.issues[0]?.message ?? "unknown schema error"}`);
|
|
1970
|
+
continue;
|
|
1971
|
+
}
|
|
1960
1972
|
if (expectedPlanId !== undefined) {
|
|
1961
1973
|
const payloadPlanId = derivePlanId(payload.plan);
|
|
1962
1974
|
if (payloadPlanId !== expectedPlanId) {
|
|
@@ -1967,7 +1979,7 @@ function findLastApprovedSnapshot(events, expectedPlanId, extraFilter) {
|
|
|
1967
1979
|
continue;
|
|
1968
1980
|
}
|
|
1969
1981
|
return {
|
|
1970
|
-
plan:
|
|
1982
|
+
plan: parsedPlan.data,
|
|
1971
1983
|
seq: event.seq,
|
|
1972
1984
|
timestamp: event.timestamp,
|
|
1973
1985
|
approval: payload.approval,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-ma38q4rf.js";
|
|
5
5
|
import {
|
|
6
6
|
bunWrite
|
|
7
7
|
} from "./index-2s7dvzff.js";
|
|
@@ -18,18 +18,21 @@ import {
|
|
|
18
18
|
releaseCoordinationLease,
|
|
19
19
|
transitionCoordinationState,
|
|
20
20
|
withCoordinationTransaction
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-9p00xent.js";
|
|
22
22
|
import {
|
|
23
23
|
getProjectDb,
|
|
24
24
|
projectDbExists
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-bdqefjxg.js";
|
|
26
26
|
import {
|
|
27
27
|
observeDelegationLedgerPressure
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-gdrdtbw6.js";
|
|
29
29
|
import {
|
|
30
30
|
EvidenceLockTimeoutError,
|
|
31
31
|
withEvidenceLock
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-yf1mvexg.js";
|
|
33
|
+
import {
|
|
34
|
+
telemetry
|
|
35
|
+
} from "./index-jmn35na4.js";
|
|
33
36
|
import {
|
|
34
37
|
canonicalRootKeyFresh,
|
|
35
38
|
sameProjectRoot
|
|
@@ -37,7 +40,7 @@ import {
|
|
|
37
40
|
import {
|
|
38
41
|
exports_external,
|
|
39
42
|
init_zod
|
|
40
|
-
} from "./index-
|
|
43
|
+
} from "./index-gknz3bv1.js";
|
|
41
44
|
import {
|
|
42
45
|
criticalWarn,
|
|
43
46
|
init_logger,
|
|
@@ -1620,6 +1623,14 @@ var ManifestSchema = exports_external.object({
|
|
|
1620
1623
|
updatedAt: exports_external.number().int().nonnegative()
|
|
1621
1624
|
}).strict();
|
|
1622
1625
|
var WRITER_ID = `w-${process.pid}-${Math.random().toString(36).slice(2, 10)}`;
|
|
1626
|
+
function portableSyncSleep(ms) {
|
|
1627
|
+
try {
|
|
1628
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
1629
|
+
} catch {
|
|
1630
|
+
const start = Date.now();
|
|
1631
|
+
while (Date.now() - start < ms) {}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1623
1634
|
var _checkpointInternals = {
|
|
1624
1635
|
renameWithRetry: (from, to) => {
|
|
1625
1636
|
let lastError;
|
|
@@ -1641,14 +1652,7 @@ var _checkpointInternals = {
|
|
|
1641
1652
|
renameOnce: (from, to) => {
|
|
1642
1653
|
fs2.renameSync(from, to);
|
|
1643
1654
|
},
|
|
1644
|
-
syncSleep:
|
|
1645
|
-
try {
|
|
1646
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
1647
|
-
} catch {
|
|
1648
|
-
const start = Date.now();
|
|
1649
|
-
while (Date.now() - start < ms) {}
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1655
|
+
syncSleep: portableSyncSleep
|
|
1652
1656
|
};
|
|
1653
1657
|
function writeDurableFileSync(target, contents) {
|
|
1654
1658
|
const tmp = `${target}.tmp-${process.pid}-${Math.random().toString(36).slice(2, 10)}`;
|
|
@@ -2541,22 +2545,100 @@ function maybeCompactDelegationsLocked(directory) {
|
|
|
2541
2545
|
function ensureSwarmDir(directory) {
|
|
2542
2546
|
fs2.mkdirSync(path2.resolve(directory, ".swarm"), { recursive: true });
|
|
2543
2547
|
}
|
|
2544
|
-
|
|
2548
|
+
var DELEGATION_READ_RETRY_DELAY_MS = 25;
|
|
2549
|
+
var MAX_TRACKED_DELEGATION_READ_UNCERTAIN_ROOTS = 32;
|
|
2550
|
+
var DELEGATION_READ_UNCERTAIN_EMIT_COOLDOWN_MS = 60000;
|
|
2551
|
+
var delegationReadUncertainEmitAtByRoot = new Map;
|
|
2552
|
+
var delegationReadUncertainEmitOrder = [];
|
|
2553
|
+
var DELEGATION_READ_REASON_MAX_CHARS = 200;
|
|
2554
|
+
function readDelegationLoadAttempt(directory) {
|
|
2545
2555
|
const importState = ensureDelegationCoordinationImported(directory, false);
|
|
2546
|
-
if (importState === "uncertain")
|
|
2547
|
-
return
|
|
2556
|
+
if (importState === "uncertain") {
|
|
2557
|
+
return {
|
|
2558
|
+
status: "uncertain",
|
|
2559
|
+
reason: "background delegation coordination state is uncertain",
|
|
2560
|
+
source: "coordination-import",
|
|
2561
|
+
attempts: 1
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2548
2564
|
if (importState === "ready") {
|
|
2549
2565
|
const coordination = coordinationRowsToDelegations(directory);
|
|
2550
|
-
if (coordination !== null)
|
|
2551
|
-
return coordination;
|
|
2552
|
-
|
|
2566
|
+
if (coordination !== null) {
|
|
2567
|
+
return { status: "ok", records: coordination, source: "coordination" };
|
|
2568
|
+
}
|
|
2569
|
+
return {
|
|
2570
|
+
status: "uncertain",
|
|
2571
|
+
reason: "background delegation coordination state is unreadable or over-bound",
|
|
2572
|
+
source: "coordination-read",
|
|
2573
|
+
attempts: 1
|
|
2574
|
+
};
|
|
2553
2575
|
}
|
|
2554
2576
|
const load = loadFoldedState(directory, { strict: false });
|
|
2555
2577
|
if (load.status === "uncertain") {
|
|
2556
|
-
|
|
2557
|
-
|
|
2578
|
+
return {
|
|
2579
|
+
status: "uncertain",
|
|
2580
|
+
reason: `background delegation store is unreadable: ${load.reason.slice(0, DELEGATION_READ_REASON_MAX_CHARS)}`,
|
|
2581
|
+
source: "fold",
|
|
2582
|
+
attempts: 1,
|
|
2583
|
+
...load.repairHint ? { repairHint: load.repairHint } : {}
|
|
2584
|
+
};
|
|
2558
2585
|
}
|
|
2559
|
-
|
|
2586
|
+
const loadSource = load.mode === "legacy" ? "legacy-ledger" : load.mode;
|
|
2587
|
+
return {
|
|
2588
|
+
status: "ok",
|
|
2589
|
+
records: [...load.records.values()],
|
|
2590
|
+
source: loadSource
|
|
2591
|
+
};
|
|
2592
|
+
}
|
|
2593
|
+
function emitDelegationReadUncertainBounded(directory, outcome) {
|
|
2594
|
+
try {
|
|
2595
|
+
const rootKey = canonicalRootKeyFresh(directory);
|
|
2596
|
+
const now = Date.now();
|
|
2597
|
+
const last = delegationReadUncertainEmitAtByRoot.get(rootKey);
|
|
2598
|
+
if (last !== undefined && now - last < _internals.delegationReadUncertainEmitCooldownMs) {
|
|
2599
|
+
return;
|
|
2600
|
+
}
|
|
2601
|
+
delegationReadUncertainEmitAtByRoot.delete(rootKey);
|
|
2602
|
+
delegationReadUncertainEmitAtByRoot.set(rootKey, now);
|
|
2603
|
+
const priorOccurrence = delegationReadUncertainEmitOrder.indexOf(rootKey);
|
|
2604
|
+
if (priorOccurrence >= 0) {
|
|
2605
|
+
delegationReadUncertainEmitOrder.splice(priorOccurrence, 1);
|
|
2606
|
+
}
|
|
2607
|
+
delegationReadUncertainEmitOrder.push(rootKey);
|
|
2608
|
+
while (delegationReadUncertainEmitOrder.length > 0) {
|
|
2609
|
+
if (delegationReadUncertainEmitOrder.length <= MAX_TRACKED_DELEGATION_READ_UNCERTAIN_ROOTS) {
|
|
2610
|
+
break;
|
|
2611
|
+
}
|
|
2612
|
+
const evicted = delegationReadUncertainEmitOrder.shift();
|
|
2613
|
+
if (evicted === undefined)
|
|
2614
|
+
break;
|
|
2615
|
+
delegationReadUncertainEmitAtByRoot.delete(evicted);
|
|
2616
|
+
}
|
|
2617
|
+
const reasonCode = outcome.reason.split("(")[0].trim().split(/\s+/).slice(0, 6).join("_").slice(0, 64);
|
|
2618
|
+
telemetry.delegationReadUncertain({
|
|
2619
|
+
attempt: outcome.attempts,
|
|
2620
|
+
reasonCode,
|
|
2621
|
+
source: outcome.source
|
|
2622
|
+
});
|
|
2623
|
+
} catch {}
|
|
2624
|
+
}
|
|
2625
|
+
function readDelegationsDetailed(directory) {
|
|
2626
|
+
const first = readDelegationLoadAttempt(directory);
|
|
2627
|
+
if (first.status === "ok")
|
|
2628
|
+
return first;
|
|
2629
|
+
portableSyncSleep(_internals.readRetryDelayMs);
|
|
2630
|
+
const second = readDelegationLoadAttempt(directory);
|
|
2631
|
+
if (second.status === "ok")
|
|
2632
|
+
return second;
|
|
2633
|
+
const finalOutcome = { ...second, attempts: 2 };
|
|
2634
|
+
recordLedgerUncertainty(directory, finalOutcome.reason, `advisory-${finalOutcome.source}`, finalOutcome.repairHint);
|
|
2635
|
+
emitDelegationReadUncertainBounded(directory, finalOutcome);
|
|
2636
|
+
warn(`[background] readDelegationsDetailed: authoritative state uncertain after retry (${finalOutcome.reason}); treating the store as unknown, not empty`);
|
|
2637
|
+
return finalOutcome;
|
|
2638
|
+
}
|
|
2639
|
+
function readDelegations(directory) {
|
|
2640
|
+
const outcome = readDelegationsDetailed(directory);
|
|
2641
|
+
return outcome.status === "ok" ? outcome.records : [];
|
|
2560
2642
|
}
|
|
2561
2643
|
function scanDelegationsForRecovery(directory) {
|
|
2562
2644
|
const importState = ensureDelegationCoordinationImported(directory, false);
|
|
@@ -2595,14 +2677,22 @@ function scanDelegationsForRecovery(directory) {
|
|
|
2595
2677
|
const source = load.mode === "legacy" ? "legacy-ledger" : load.mode;
|
|
2596
2678
|
return { status: "ok", owners: [...load.records.values()], source };
|
|
2597
2679
|
}
|
|
2598
|
-
function
|
|
2680
|
+
function findByCorrelationIdDetailed(directory, correlationId) {
|
|
2599
2681
|
if (!correlationId)
|
|
2600
|
-
return null;
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2682
|
+
return { status: "ok", value: null };
|
|
2683
|
+
const read = readDelegationsDetailed(directory);
|
|
2684
|
+
if (read.status === "uncertain")
|
|
2685
|
+
return read;
|
|
2686
|
+
for (const record of read.records) {
|
|
2687
|
+
if (record.correlationId === correlationId) {
|
|
2688
|
+
return { status: "ok", value: record };
|
|
2689
|
+
}
|
|
2604
2690
|
}
|
|
2605
|
-
return null;
|
|
2691
|
+
return { status: "ok", value: null };
|
|
2692
|
+
}
|
|
2693
|
+
function findByCorrelationId(directory, correlationId) {
|
|
2694
|
+
const outcome = findByCorrelationIdDetailed(directory, correlationId);
|
|
2695
|
+
return outcome.status === "ok" ? outcome.value : null;
|
|
2606
2696
|
}
|
|
2607
2697
|
function appendRecord(directory, record) {
|
|
2608
2698
|
const importState = ensureDelegationCoordinationImported(directory, true);
|
|
@@ -3251,6 +3341,16 @@ function getLegacyCoderSettlementReconciler(directory) {
|
|
|
3251
3341
|
return legacyCoderSettlementReconcilers.get(canonicalRootKeyFresh(directory));
|
|
3252
3342
|
}
|
|
3253
3343
|
var _internals = {
|
|
3344
|
+
readRetryDelayMs: DELEGATION_READ_RETRY_DELAY_MS,
|
|
3345
|
+
delegationReadUncertainEmitCooldownMs: DELEGATION_READ_UNCERTAIN_EMIT_COOLDOWN_MS,
|
|
3346
|
+
resetDelegationReadUncertainRegistry: () => {
|
|
3347
|
+
delegationReadUncertainEmitAtByRoot.clear();
|
|
3348
|
+
delegationReadUncertainEmitOrder.length = 0;
|
|
3349
|
+
},
|
|
3350
|
+
delegationReadUncertainEmitOrderSnapshot: () => [
|
|
3351
|
+
...delegationReadUncertainEmitOrder
|
|
3352
|
+
],
|
|
3353
|
+
delegationReadUncertainCooldownsSnapshot: () => new Map(delegationReadUncertainEmitAtByRoot),
|
|
3254
3354
|
getLegacyCoderSettlementReconciler,
|
|
3255
3355
|
readFallbackDirectory,
|
|
3256
3356
|
getLegacyCoderSettlementReconcilerOrder: () => [
|
|
@@ -3642,10 +3742,20 @@ async function acknowledgeObservedBackgroundAdvisories(directory, parentSessionI
|
|
|
3642
3742
|
async function releasePreparedBackgroundAdvisories(directory, parentSessionId, preparationId, eventIds) {
|
|
3643
3743
|
return releaseBackgroundAdvisoryPreparation(directory, parentSessionId, preparationId, eventIds);
|
|
3644
3744
|
}
|
|
3645
|
-
function
|
|
3745
|
+
function findByBatchIdDetailed(directory, batchId, opts) {
|
|
3646
3746
|
if (!batchId)
|
|
3647
|
-
return [];
|
|
3648
|
-
|
|
3747
|
+
return { status: "ok", value: [] };
|
|
3748
|
+
const read = readDelegationsDetailed(directory);
|
|
3749
|
+
if (read.status === "uncertain")
|
|
3750
|
+
return read;
|
|
3751
|
+
return {
|
|
3752
|
+
status: "ok",
|
|
3753
|
+
value: read.records.filter((record) => record.batchId === batchId && (opts?.parentSessionId === undefined || record.parentSessionId === opts.parentSessionId))
|
|
3754
|
+
};
|
|
3755
|
+
}
|
|
3756
|
+
function findByBatchId(directory, batchId, opts) {
|
|
3757
|
+
const outcome = findByBatchIdDetailed(directory, batchId, opts);
|
|
3758
|
+
return outcome.status === "ok" ? outcome.value : [];
|
|
3649
3759
|
}
|
|
3650
3760
|
function findOpenAsyncLaneBatches(directory) {
|
|
3651
3761
|
return readDelegations(directory).filter((record) => record.batchId !== undefined && (record.status === "pending" || record.status === "running"));
|
|
@@ -3899,9 +4009,16 @@ async function removeDelegationFallback(directory, correlationId) {
|
|
|
3899
4009
|
async function findDelegationForCompletion(directory, correlationId) {
|
|
3900
4010
|
if (!correlationId)
|
|
3901
4011
|
return null;
|
|
3902
|
-
const primary =
|
|
3903
|
-
if (primary)
|
|
3904
|
-
return {
|
|
4012
|
+
const primary = findByCorrelationIdDetailed(directory, correlationId);
|
|
4013
|
+
if (primary.status === "uncertain") {
|
|
4014
|
+
return {
|
|
4015
|
+
source: "uncertain",
|
|
4016
|
+
record: null,
|
|
4017
|
+
uncertain: `delegation store unreadable after ${primary.attempts} attempts (${primary.reason})`
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
if (primary.value)
|
|
4021
|
+
return { source: "primary", record: primary.value };
|
|
3905
4022
|
const fallback = await readDelegationFallback(directory, correlationId);
|
|
3906
4023
|
return fallback ? { source: "fallback", record: fallback.record, fallback } : null;
|
|
3907
4024
|
}
|
|
@@ -4524,7 +4641,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
4524
4641
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
4525
4642
|
if (candidates.length === 0)
|
|
4526
4643
|
return 0;
|
|
4527
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
4644
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-pw4jbrez.js");
|
|
4528
4645
|
let transferred = 0;
|
|
4529
4646
|
for (const record of candidates) {
|
|
4530
4647
|
try {
|
|
@@ -4881,4 +4998,4 @@ async function maintainBackgroundDelegations(directory, options = {}) {
|
|
|
4881
4998
|
return emitObservation("ok");
|
|
4882
4999
|
}
|
|
4883
5000
|
|
|
4884
|
-
export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, decodePrReviewWorkflowBinding, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, registerStaleSweepObserver, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
|
|
5001
|
+
export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, decodePrReviewWorkflowBinding, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, DELEGATION_READ_RETRY_DELAY_MS, readDelegationsDetailed, readDelegations, scanDelegationsForRecovery, findByCorrelationIdDetailed, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchIdDetailed, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, registerStaleSweepObserver, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
|
|
@@ -1358,4 +1358,4 @@ var init_constants = __esm(() => {
|
|
|
1358
1358
|
};
|
|
1359
1359
|
});
|
|
1360
1360
|
|
|
1361
|
-
export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_NAMES, TOOL_NAME_SET, getPrWorkflowToolCapability, TOOL_DESCRIPTIONS, AGENT_TOOL_MAP, init_tool_metadata, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
|
|
1361
|
+
export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_METADATA, TOOL_NAMES, TOOL_NAME_SET, getPrWorkflowToolCapability, TOOL_DESCRIPTIONS, AGENT_TOOL_MAP, init_tool_metadata, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-c5wyannc.js";
|
|
5
5
|
import {
|
|
6
6
|
appendCoreEventSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9bg5vc22.js";
|
|
8
8
|
import {
|
|
9
9
|
deleteCoordinationState,
|
|
10
10
|
derivePlanId,
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
transitionCoordinationState,
|
|
14
14
|
transitionCoordinationStateWithinTransaction,
|
|
15
15
|
withCoordinationTransaction
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-9p00xent.js";
|
|
17
17
|
import {
|
|
18
18
|
getProjectDb
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-bdqefjxg.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalExistingFilesystemPath,
|
|
22
22
|
legacyCanonicalExistingFilesystemPath
|
|
23
23
|
} from "./index-ry16d01s.js";
|
|
24
24
|
import {
|
|
25
25
|
assertProjectRoot
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-yf1mvexg.js";
|
|
27
27
|
import {
|
|
28
28
|
require_proper_lockfile
|
|
29
29
|
} from "./index-7g4c7s5r.js";
|
|
30
30
|
import {
|
|
31
31
|
atomicWriteSwarmFile,
|
|
32
32
|
atomicWriteSwarmFileSync
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-ws3ggk1h.js";
|
|
34
34
|
import {
|
|
35
35
|
PlanSchema
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-zcjdw8dw.js";
|
|
37
37
|
import {
|
|
38
38
|
init_path_identity,
|
|
39
39
|
unsafePathTextReason
|
|
@@ -197,4 +197,4 @@ var _internals = {
|
|
|
197
197
|
validateTargetWithinRoot
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
export { containsPathTraversal, containsControlChars, validateWorkspaceRoot, validateSymlinkBoundary, isCanonicalPathWithinRoot, validateTargetWithinRoot };
|
|
200
|
+
export { containsPathTraversal, containsControlChars, validateWorkspaceRoot, validateProjectDirectory, validateSymlinkBoundary, isCanonicalPathWithinRoot, validateTargetWithinRoot };
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
pseudonymousRef,
|
|
4
4
|
resolveLineageSalt,
|
|
5
5
|
telemetry
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-jmn35na4.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteSwarmFile
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-ws3ggk1h.js";
|
|
10
10
|
import {
|
|
11
11
|
canonicalRootKeyFresh
|
|
12
12
|
} from "./index-1xnse449.js";
|
|
@@ -13873,4 +13873,4 @@ var init_zod = __esm(() => {
|
|
|
13873
13873
|
init_external();
|
|
13874
13874
|
});
|
|
13875
13875
|
|
|
13876
|
-
export { ZodError, exports_external, init_zod };
|
|
13876
|
+
export { $constructor, defineLazy, clone, normalizeParams, init_util, parse, parseAsync, safeParse, safeParseAsync, $ZodType, $ZodObject, init_locales, toJSONSchema, init_json_schema_processors, init_core2 as init_core, exports_iso, ZodError, string2 as string, number2 as number, boolean2 as boolean, _null3 as _null, unknown, array, object, looseObject, union, discriminatedUnion, intersection, record, _enum2 as _enum, literal, ZodOptional, optional, custom, preprocess, exports_external, init_zod };
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
readEvaluationRun,
|
|
10
10
|
saveEvaluationRun,
|
|
11
11
|
saveTaskSetSnapshot
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-nzpw41w6.js";
|
|
13
13
|
import {
|
|
14
14
|
canonicalHash,
|
|
15
15
|
computeCandidateInputContentHash,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
exports_external,
|
|
26
26
|
init_zod
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-gknz3bv1.js";
|
|
28
28
|
import {
|
|
29
29
|
init_logger,
|
|
30
30
|
warn
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
observeStoreHealth
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-gdrdtbw6.js";
|
|
5
5
|
import {
|
|
6
6
|
telemetry
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-jmn35na4.js";
|
|
8
8
|
import {
|
|
9
9
|
init_schema,
|
|
10
10
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-twpzfwga.js";
|
|
12
12
|
import {
|
|
13
13
|
init_constants
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-ecaws78e.js";
|
|
15
15
|
import {
|
|
16
16
|
getPathFlavor,
|
|
17
17
|
init_path_identity,
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
} from "./index-ae75rja9.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveKnowledgeStoreDir
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-jzrx2sx2.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFile
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-yf1mvexg.js";
|
|
18
18
|
import {
|
|
19
19
|
require_proper_lockfile
|
|
20
20
|
} from "./index-7g4c7s5r.js";
|
|
21
21
|
import {
|
|
22
22
|
readCachedParsedFile
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-ws3ggk1h.js";
|
|
24
24
|
import {
|
|
25
25
|
init_knowledge_types,
|
|
26
26
|
isActiveStatus
|
|
@@ -739,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
739
739
|
const {
|
|
740
740
|
readAuthoritativeKnowledgeCounterRollups,
|
|
741
741
|
effectiveRetrievalOutcomes
|
|
742
|
-
} = await import("./knowledge-events-
|
|
742
|
+
} = await import("./knowledge-events-aqy4hb15.js");
|
|
743
743
|
const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
|
|
744
744
|
const flagIds = new Set;
|
|
745
745
|
for (const e of atFloor) {
|
|
@@ -806,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
809
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
810
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
809
|
+
const { quarantineEntry } = await import("./knowledge-validator-vvgs8m7m.js");
|
|
810
|
+
const { KnowledgeConfigSchema } = await import("./schema-a8gskpey.js");
|
|
811
811
|
let config;
|
|
812
812
|
try {
|
|
813
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
813
|
+
const { loadPluginConfigWithMeta } = await import("./index-vqs7dxp7.js");
|
|
814
814
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
815
815
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
816
816
|
} catch {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-008sppht.js";
|
|
6
6
|
import {
|
|
7
7
|
validateSwarmPath
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-ma38q4rf.js";
|
|
9
9
|
import {
|
|
10
10
|
bunSpawn,
|
|
11
11
|
classifySpawnFailure
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
atomicWriteFile,
|
|
16
16
|
taskEvidencePath,
|
|
17
17
|
withTaskEvidenceLock
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-yf1mvexg.js";
|
|
19
19
|
import {
|
|
20
20
|
telemetry
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-jmn35na4.js";
|
|
22
22
|
import {
|
|
23
23
|
init_git_executable,
|
|
24
24
|
resolveGitExecutable
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
exports_external,
|
|
32
32
|
init_zod
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-gknz3bv1.js";
|
|
34
34
|
import {
|
|
35
35
|
init_path_identity,
|
|
36
36
|
isPathWithinDeclaredScope,
|