opencode-swarm 7.144.2 → 7.144.4
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/.opencode/skills/swarm-pr-review/SKILL.md +3 -1
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +124 -0
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +2 -0
- package/README.md +3 -1
- package/dist/background/pending-delegations.d.ts +34 -0
- package/dist/cli/{config-doctor-7dfvxwjb.js → config-doctor-rw9zrjk6.js} +3 -3
- package/dist/cli/{core-dwmwdc4y.js → core-zjx9aqaf.js} +3 -3
- package/dist/cli/{curation-policy-pkb2eeb1.js → curation-policy-0wbrh11c.js} +5 -5
- package/dist/cli/curator-drift-2jbjv03a.js +1 -1
- package/dist/cli/{curator-w213v33y.js → curator-g54a7wv0.js} +33 -33
- package/dist/cli/{curator-llm-factory-rrs1q4hg.js → curator-llm-factory-xgb4pxmm.js} +33 -33
- package/dist/cli/{evidence-summary-service-t7n2h1he.js → evidence-summary-service-fnr5y54e.js} +14 -14
- package/dist/cli/{gate-evidence-xvxn603y.js → gate-evidence-2xt1x07r.js} +7 -7
- package/dist/cli/{guardrail-explain-v1mwsnkq.js → guardrail-explain-6wcgr9tz.js} +34 -34
- package/dist/cli/{guardrail-log-dn03dpz2.js → guardrail-log-5w4b9zrw.js} +4 -4
- package/dist/cli/{hive-promoter-asjtj7ga.js → hive-promoter-x63ehffd.js} +35 -35
- package/dist/cli/{index-ckrasab9.js → index-03pv47h2.js} +9 -9
- package/dist/cli/{index-4q9vfav6.js → index-1csyxv0f.js} +1 -1
- package/dist/cli/{index-s2rcz51a.js → index-1jsmmx7y.js} +66 -34
- package/dist/cli/{index-jsfghpy2.js → index-2m7mavaz.js} +2 -2
- package/dist/cli/{index-p3tnmkvc.js → index-4w5qdbk7.js} +12 -12
- package/dist/cli/{index-dhh2j2nd.js → index-8j0va7jp.js} +2 -2
- package/dist/cli/{index-y95nwsge.js → index-9qq7c18c.js} +1 -1
- package/dist/cli/{index-qpt8ahph.js → index-az8etqpp.js} +12 -12
- package/dist/cli/{index-gdd4jt6b.js → index-bt9aa01f.js} +1 -1
- package/dist/cli/{index-333kvewd.js → index-btmsqv7p.js} +4 -4
- package/dist/cli/{index-d55crzd4.js → index-cz25e8xp.js} +7 -7
- package/dist/cli/{index-g2ajae1z.js → index-d12jd5mn.js} +2 -2
- package/dist/cli/{index-tq5s07ta.js → index-dty5qgk2.js} +1 -1
- package/dist/cli/{index-k31en0ja.js → index-f9vvg5xb.js} +3 -3
- package/dist/cli/{index-k92cagmt.js → index-fqcjragy.js} +2 -2
- package/dist/cli/{index-jb4tchvy.js → index-h98t1m88.js} +2 -2
- package/dist/cli/{index-4fda8kkw.js → index-jabkn643.js} +30 -5
- package/dist/cli/{index-erfnw81g.js → index-mazgg5s2.js} +1 -1
- package/dist/cli/{index-m6wv2qdr.js → index-nckg4gxb.js} +2 -2
- package/dist/cli/{index-tg9fn2dy.js → index-p7cm3gtj.js} +38 -36
- package/dist/cli/{index-dg2w0wr4.js → index-psvxq93b.js} +3 -3
- package/dist/cli/{index-zr370283.js → index-pw83zgny.js} +3 -3
- package/dist/cli/{index-nretd4qn.js → index-q4ed1jk7.js} +1539 -963
- package/dist/cli/{index-hqvt3mhk.js → index-q67jb94n.js} +1 -1
- package/dist/cli/{index-whezv7vc.js → index-v3y3qg48.js} +1 -1
- package/dist/cli/{index-av0f6mm0.js → index-x6tp0hfr.js} +9 -9
- package/dist/cli/{index-h3z64mhz.js → index-y8j8ehc8.js} +2 -2
- package/dist/cli/{index-ne8cfgw5.js → index-yts89pqg.js} +4 -4
- package/dist/cli/{index-w7x7qxz2.js → index-ywn7vtxp.js} +1 -1
- package/dist/cli/{index-g1c5fgaw.js → index-z6v7kwpa.js} +4 -4
- package/dist/cli/{index-7ca3a6gj.js → index-zb0xcz9t.js} +10 -10
- package/dist/cli/index.js +34 -34
- package/dist/cli/{knowledge-escalator-cg19dhe5.js → knowledge-escalator-ypg14d5r.js} +13 -13
- package/dist/cli/{knowledge-events-yzvysaqd.js → knowledge-events-nkrym4wb.js} +11 -11
- package/dist/cli/{knowledge-link-fn5j3r4q.js → knowledge-link-e4qgqmpx.js} +4 -4
- package/dist/cli/{knowledge-store-6f77xpmm.js → knowledge-store-vh3nhtg2.js} +6 -6
- package/dist/cli/{knowledge-validator-4b28zdxa.js → knowledge-validator-jrxvexv6.js} +8 -8
- package/dist/cli/{pending-delegations-thy8g30k.js → pending-delegations-pw79c8ds.js} +3 -3
- package/dist/cli/{pr-subscriptions-jyav582d.js → pr-subscriptions-fk628bhc.js} +3 -3
- package/dist/cli/{runner-pde6b5sx.js → runner-b02sz2vx.js} +5 -5
- package/dist/cli/{scan-cursor-nqbb1xt6.js → scan-cursor-fp7w5jmc.js} +7 -7
- package/dist/cli/{schema-jj2pb6zp.js → schema-rptwqbm4.js} +2 -2
- package/dist/cli/{scope-persistence-63nasq0z.js → scope-persistence-0bkaxawa.js} +7 -7
- package/dist/cli/{skill-generator-nsymtdqm.js → skill-generator-nh8b4gjv.js} +16 -16
- package/dist/cli/{telemetry-xyfb5vm8.js → telemetry-cybx6cfz.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-j6d33p49.js → worktree-collision-ownership-hqd9ypsz.js} +6 -6
- package/dist/cli/{worktree-isolation-g54kxw6x.js → worktree-isolation-canf3rj8.js} +33 -33
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/recover.d.ts +17 -0
- package/dist/commands/registry.d.ts +10 -2
- package/dist/commands/reset-session.d.ts +2 -0
- package/dist/hooks/context-budget.d.ts +4 -0
- package/dist/hooks/context-usage.d.ts +48 -0
- package/dist/hooks/pr-workflow-gate.d.ts +160 -4
- package/dist/index.js +556 -550
- package/dist/observability/catalog.d.ts +8 -6
- package/dist/sast/semgrep.d.ts +3 -2
- package/dist/telemetry.d.ts +17 -1
- package/dist/tools/context-status.d.ts +9 -3
- package/dist/tools/dispatch-lanes.d.ts +27 -2
- package/dist/tools/pre-check-batch.d.ts +9 -0
- package/dist/tools/sast-scan.d.ts +3 -0
- package/dist/workflow/coder-settlement.d.ts +74 -0
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
validateSwarmPath
|
|
4
|
+
} from "./index-rn0eq85g.js";
|
|
2
5
|
import {
|
|
3
6
|
loadPluginConfigWithMeta
|
|
4
|
-
} from "./index-
|
|
7
|
+
} from "./index-9qq7c18c.js";
|
|
5
8
|
import {
|
|
6
9
|
KnowledgeConfigSchema,
|
|
7
10
|
init_schema
|
|
8
|
-
} from "./index-
|
|
9
|
-
import {
|
|
10
|
-
validateSwarmPath
|
|
11
|
-
} from "./index-rn0eq85g.js";
|
|
11
|
+
} from "./index-y8j8ehc8.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-ywn7vtxp.js";
|
|
18
18
|
import {
|
|
19
19
|
atomicWriteFile
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-mazgg5s2.js";
|
|
21
21
|
import {
|
|
22
22
|
assertProjectRoot
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-f9vvg5xb.js";
|
|
24
|
+
import {
|
|
25
|
+
emit
|
|
26
|
+
} from "./index-1jsmmx7y.js";
|
|
24
27
|
import {
|
|
25
28
|
require_proper_lockfile
|
|
26
29
|
} from "./index-7g4c7s5r.js";
|
|
27
|
-
import {
|
|
28
|
-
emit
|
|
29
|
-
} from "./index-s2rcz51a.js";
|
|
30
30
|
import {
|
|
31
31
|
init_logger,
|
|
32
32
|
warn
|
|
@@ -2545,7 +2545,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2545
2545
|
}
|
|
2546
2546
|
let bumps = 0;
|
|
2547
2547
|
if (deltas.length > 0) {
|
|
2548
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2548
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-vh3nhtg2.js");
|
|
2549
2549
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2550
2550
|
}
|
|
2551
2551
|
return {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
SWARM_WORKTREE_DIR_NAME,
|
|
8
8
|
init_constants
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-v3y3qg48.js";
|
|
10
10
|
import {
|
|
11
11
|
bunSpawn
|
|
12
12
|
} from "./index-4nt52yr9.js";
|
|
@@ -86,7 +86,7 @@ var _internals = {
|
|
|
86
86
|
symlinkSync: fs.symlinkSync
|
|
87
87
|
},
|
|
88
88
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
89
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
89
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-0bkaxawa.js");
|
|
90
90
|
return realWrite(directory, taskId, files);
|
|
91
91
|
},
|
|
92
92
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -6,16 +6,19 @@ import {
|
|
|
6
6
|
EvaluationRunV1Schema,
|
|
7
7
|
GateAuditResultV1Schema,
|
|
8
8
|
getProtectedEvaluationRunIds
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-fqcjragy.js";
|
|
10
10
|
import {
|
|
11
11
|
readEffectiveSpecSync
|
|
12
12
|
} from "./index-9ss2m4rs.js";
|
|
13
|
+
import {
|
|
14
|
+
getWorktreeMergeFailure
|
|
15
|
+
} from "./index-zsrtt42s.js";
|
|
13
16
|
import {
|
|
14
17
|
isValidTaskId,
|
|
15
18
|
readTaskEvidence,
|
|
16
19
|
readTaskEvidenceRaw,
|
|
17
20
|
sanitizeTaskId
|
|
18
|
-
} from "./index-
|
|
21
|
+
} from "./index-cz25e8xp.js";
|
|
19
22
|
import {
|
|
20
23
|
LedgerStaleWriterError,
|
|
21
24
|
appendLedgerEvent,
|
|
@@ -35,10 +38,7 @@ import {
|
|
|
35
38
|
replayFromLedgerWithStatus,
|
|
36
39
|
takeSnapshotEvent,
|
|
37
40
|
takeSnapshotWithRetry
|
|
38
|
-
} from "./index-
|
|
39
|
-
import {
|
|
40
|
-
getWorktreeMergeFailure
|
|
41
|
-
} from "./index-zsrtt42s.js";
|
|
41
|
+
} from "./index-z6v7kwpa.js";
|
|
42
42
|
import {
|
|
43
43
|
_internals,
|
|
44
44
|
buildDefaultPolicy,
|
|
@@ -51,13 +51,13 @@ import {
|
|
|
51
51
|
EvidenceBundleSchema,
|
|
52
52
|
EvidenceSchema
|
|
53
53
|
} from "./index-gprxjmm7.js";
|
|
54
|
-
import {
|
|
55
|
-
PlanSchema
|
|
56
|
-
} from "./index-y95nwsge.js";
|
|
57
54
|
import {
|
|
58
55
|
readSwarmFileAsync,
|
|
59
56
|
validateSwarmPath
|
|
60
57
|
} from "./index-rn0eq85g.js";
|
|
58
|
+
import {
|
|
59
|
+
PlanSchema
|
|
60
|
+
} from "./index-9qq7c18c.js";
|
|
61
61
|
import {
|
|
62
62
|
invalidateCachedArtifact,
|
|
63
63
|
readCachedParsedFile
|
|
@@ -66,10 +66,10 @@ import {
|
|
|
66
66
|
assertProjectRoot,
|
|
67
67
|
tryAcquireLock,
|
|
68
68
|
withEvidenceLock
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-f9vvg5xb.js";
|
|
70
70
|
import {
|
|
71
71
|
emit
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-1jsmmx7y.js";
|
|
73
73
|
import {
|
|
74
74
|
ZodError,
|
|
75
75
|
init_zod
|
|
@@ -5212,4 +5212,4 @@ function mergeDurableGateEntriesFromEvidence(taskId, entries, evidence) {
|
|
|
5212
5212
|
return merged;
|
|
5213
5213
|
}
|
|
5214
5214
|
|
|
5215
|
-
export { projectDbExists, getProjectDb, closeProjectDb, buildTaskCompletionDescriptor, ensureTaskCheckpointReceipt, updateTaskCheckpointReceipt, isValidEnvKey, getExecutor, init_executor, MAX_TRANSIENT_RETRIES, isTransientSpawnError, transientBackoff, getGitRepositoryStatus, isGitRepo, getDefaultBaseBranch, detectDefaultRemoteBranch, resetToRemoteBranch, resetToMainAfterMerge, containsPathTraversal, containsControlChars, validateSymlinkBoundary, isStateUnreadable, loadEpicSessionState, isEpicModeActive, enableEpicMode, disableEpicMode,
|
|
5215
|
+
export { projectDbExists, getProjectDb, closeProjectDb, normalizePath, buildTaskCompletionDescriptor, ensureTaskCheckpointReceipt, updateTaskCheckpointReceipt, isValidEnvKey, getExecutor, init_executor, MAX_TRANSIENT_RETRIES, isTransientSpawnError, transientBackoff, getGitRepositoryStatus, isGitRepo, getDefaultBaseBranch, detectDefaultRemoteBranch, resetToRemoteBranch, resetToMainAfterMerge, containsPathTraversal, containsControlChars, validateSymlinkBoundary, isStateUnreadable, loadEpicSessionState, isEpicModeActive, enableEpicMode, disableEpicMode, pathsConflict, isGlobalFile, isProtectedPath, readTaskScopes, loadPlanJsonOnly, loadPlan, savePlan, closePlanTerminalState, updateTaskStatus, derivePlanMarkdown, isValidEvidenceType, sanitizeTaskId2 as sanitizeTaskId, validateProjectRoot, saveEvidence, loadEvidence, listEvidenceTaskIds, checkRequirementCoverage, archiveEvidence, readDurableGateEvidence, getDurableGateEvidenceStatus, getDurableGateEvidenceStatusForTask, mergeDurableGateEntriesFromEvidence };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
_internals,
|
|
4
4
|
resolveWorktreeIsolationConfig
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-psvxq93b.js";
|
|
6
6
|
import {
|
|
7
7
|
ApprovalEvidenceSchema,
|
|
8
8
|
BaseEvidenceSchema,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
loadPluginConfig,
|
|
43
43
|
loadPluginConfigWithMeta,
|
|
44
44
|
loadPluginConfigWithMetaAsync
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-9qq7c18c.js";
|
|
46
46
|
import {
|
|
47
47
|
AUTO_REVIEW_V8_BURN_IN_DECISION,
|
|
48
48
|
AgentOverrideConfigSchema,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
TurboConfigSchema,
|
|
65
65
|
WorktreeIsolationConfigSchema,
|
|
66
66
|
resolveAutoReviewConfig
|
|
67
|
-
} from "./index-
|
|
67
|
+
} from "./index-y8j8ehc8.js";
|
|
68
68
|
import"./index-4rhhvd1a.js";
|
|
69
69
|
import {
|
|
70
70
|
ALL_AGENT_NAMES,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
QA_AGENTS,
|
|
76
76
|
isQAAgent,
|
|
77
77
|
isSubagent
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-v3y3qg48.js";
|
|
79
79
|
import"./index-zjygnfay.js";
|
|
80
80
|
import"./index-bk5tah7q.js";
|
|
81
81
|
import"./index-bpmtbmy9.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
autoCommitDirty,
|
|
4
|
+
cleanUntrackedFiles
|
|
5
|
+
} from "./index-8j0va7jp.js";
|
|
2
6
|
import {
|
|
3
7
|
isPathWithinDeclaredScope,
|
|
4
8
|
unsafePathTextReason
|
|
5
9
|
} from "./index-556ja8an.js";
|
|
6
|
-
import {
|
|
7
|
-
autoCommitDirty,
|
|
8
|
-
cleanUntrackedFiles
|
|
9
|
-
} from "./index-dhh2j2nd.js";
|
|
10
10
|
import {
|
|
11
11
|
validateSwarmPath
|
|
12
12
|
} from "./index-rn0eq85g.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
atomicWriteFile,
|
|
19
19
|
taskEvidencePath,
|
|
20
20
|
withTaskEvidenceLock
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-mazgg5s2.js";
|
|
22
22
|
import {
|
|
23
23
|
telemetry
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-1jsmmx7y.js";
|
|
25
25
|
import {
|
|
26
26
|
exports_external,
|
|
27
27
|
init_zod
|
|
@@ -847,7 +847,7 @@ function assertTaskEvidenceWriteAllowed(directory, taskId, event) {
|
|
|
847
847
|
const coderWalPath = validateSwarmPath(directory, `coder-settlements/${taskId}.json`);
|
|
848
848
|
const coderWal = readWorkflowWalFileSync("coder-settlement", coderWalPath, taskId);
|
|
849
849
|
if ((coderWal?.state === "DISPATCHED" || coderWal?.state === "PREPARED") && !(event != null && event.transitionId === coderWal.transitionId && (event.type === "dispatch_attempted" || event.type === "dispatch_no_mutation" || event.type === "accepted_mutation"))) {
|
|
850
|
-
throw new Error(`CODER_SETTLEMENT_IN_PROGRESS: transition ${String(coderWal.transitionId)} owns evidence for task ${taskId}
|
|
850
|
+
throw new Error(`CODER_SETTLEMENT_IN_PROGRESS: transition ${String(coderWal.transitionId)} owns evidence for task ${taskId}. Wait for the owning transition to settle or run /swarm recover ${taskId} (or /swarm reset-session), then retry; do not remove the WAL by hand.`);
|
|
851
851
|
}
|
|
852
852
|
const terminalWalPath = validateSwarmPath(directory, `task-terminals/${taskId}.json`);
|
|
853
853
|
const terminalWal = readWorkflowWalFileSync("task-terminal", terminalWalPath, taskId);
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
init_schema,
|
|
13
13
|
stripKnownSwarmPrefix
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-y8j8ehc8.js";
|
|
15
15
|
import {
|
|
16
16
|
init_constants
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-v3y3qg48.js";
|
|
18
18
|
import {
|
|
19
19
|
init_logger,
|
|
20
20
|
warn
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readLinkPointer,
|
|
8
8
|
resolveKnowledgeStoreDir,
|
|
9
9
|
resolveLinkDir
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ywn7vtxp.js";
|
|
11
11
|
|
|
12
12
|
// src/knowledge/curation-policy.ts
|
|
13
13
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./index-y8552snf.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteFile
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-mazgg5s2.js";
|
|
13
13
|
import {
|
|
14
14
|
assertProjectRoot,
|
|
15
15
|
withEvidenceLock
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-f9vvg5xb.js";
|
|
17
17
|
import {
|
|
18
18
|
exports_external,
|
|
19
19
|
init_zod
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
PluginConfigSchema,
|
|
7
7
|
init_schema,
|
|
8
8
|
stripKnownSwarmPrefix
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-y8j8ehc8.js";
|
|
10
10
|
import {
|
|
11
11
|
ALL_AGENT_NAMES,
|
|
12
12
|
init_constants
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-v3y3qg48.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
16
|
} from "./index-zgwm4ryv.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./index-rn0eq85g.js";
|
|
5
5
|
import {
|
|
6
6
|
withEvidenceLock
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-f9vvg5xb.js";
|
|
8
8
|
import {
|
|
9
9
|
exports_external,
|
|
10
10
|
init_zod
|
|
@@ -248,6 +248,16 @@ var INGESTION_CLAIM_LEASE_MS = 30000;
|
|
|
248
248
|
var BACKGROUND_INGESTION_LEASE_MS = 30000;
|
|
249
249
|
var DEFAULT_STALE_DELEGATION_TIMEOUT_MS = 30 * 60000;
|
|
250
250
|
var DEFAULT_SWEEPABLE_DELEGATION_STATUSES = new Set(["pending", "running", "ingestion_error"]);
|
|
251
|
+
var WorkflowLaneRecoverySchema = exports_external.object({
|
|
252
|
+
workflowLane: exports_external.string(),
|
|
253
|
+
kind: exports_external.enum([
|
|
254
|
+
"parser-normalization",
|
|
255
|
+
"parser-row-recovery",
|
|
256
|
+
"truncated-preview-durable-artifact",
|
|
257
|
+
"transcript-incomplete-terminal-candidate"
|
|
258
|
+
]),
|
|
259
|
+
reason: exports_external.string()
|
|
260
|
+
}).strict();
|
|
251
261
|
var ResultSchema = exports_external.object({
|
|
252
262
|
text: exports_external.string().optional(),
|
|
253
263
|
error: exports_external.string().optional(),
|
|
@@ -260,7 +270,8 @@ var ResultSchema = exports_external.object({
|
|
|
260
270
|
outputArtifactError: exports_external.string().optional(),
|
|
261
271
|
transcriptIncomplete: exports_external.boolean().optional(),
|
|
262
272
|
messageCount: exports_external.number().optional(),
|
|
263
|
-
salvagedWorkflowLanes: exports_external.array(exports_external.string()).optional()
|
|
273
|
+
salvagedWorkflowLanes: exports_external.array(exports_external.string()).optional(),
|
|
274
|
+
salvagedWorkflowLaneRecoveries: exports_external.array(WorkflowLaneRecoverySchema).optional()
|
|
264
275
|
}).strict();
|
|
265
276
|
var WorkspaceSchema = exports_external.object({
|
|
266
277
|
directory: exports_external.string(),
|
|
@@ -1412,6 +1423,10 @@ async function appendDelegationTransition(directory, correlationId, transition)
|
|
|
1412
1423
|
const current = findRecordForWrite(records, correlationId);
|
|
1413
1424
|
if (!current)
|
|
1414
1425
|
return;
|
|
1426
|
+
if (transition.expectedCurrentStatuses && !transition.expectedCurrentStatuses.includes(current.status)) {
|
|
1427
|
+
next = current;
|
|
1428
|
+
return;
|
|
1429
|
+
}
|
|
1415
1430
|
if (isTerminal(current.status) && transition.status !== "consumed" && transition.status !== "ingestion_error" && !(current.status === "completed" && transition.status === "stale")) {
|
|
1416
1431
|
next = current;
|
|
1417
1432
|
return;
|
|
@@ -1449,7 +1464,7 @@ function sameTerminalEvent(left, right) {
|
|
|
1449
1464
|
return left.eventId === right.eventId && left.status === right.status && sameRetainedResult(left.result, right.result);
|
|
1450
1465
|
}
|
|
1451
1466
|
function sameRetainedResult(left, right) {
|
|
1452
|
-
return left.chars === right.chars && left.truncated === right.truncated && left.digest === right.digest && left.outputRef === right.outputRef && left.outputPreviewChars === right.outputPreviewChars && left.outputDegraded === right.outputDegraded && left.outputArtifactError === right.outputArtifactError && left.transcriptIncomplete === right.transcriptIncomplete && left.messageCount === right.messageCount && sameJson(left.salvagedWorkflowLanes, right.salvagedWorkflowLanes);
|
|
1467
|
+
return left.chars === right.chars && left.truncated === right.truncated && left.digest === right.digest && left.outputRef === right.outputRef && left.outputPreviewChars === right.outputPreviewChars && left.outputDegraded === right.outputDegraded && left.outputArtifactError === right.outputArtifactError && left.transcriptIncomplete === right.transcriptIncomplete && left.messageCount === right.messageCount && sameJson(left.salvagedWorkflowLanes, right.salvagedWorkflowLanes) && sameJson(left.salvagedWorkflowLaneRecoveries, right.salvagedWorkflowLaneRecoveries);
|
|
1453
1468
|
}
|
|
1454
1469
|
function settlementProvenanceFor(record) {
|
|
1455
1470
|
const baseline = record.taskChangeContext?.baseline;
|
|
@@ -2020,12 +2035,18 @@ function findOpenAsyncLaneBatches(directory) {
|
|
|
2020
2035
|
function isTerminal(status) {
|
|
2021
2036
|
return status === "completed" || status === "error" || status === "cancelled" || status === "stale" || status === "consumed";
|
|
2022
2037
|
}
|
|
2023
|
-
function sweepStaleLocked(directory, timeoutMs, now, statuses = DEFAULT_SWEEPABLE_DELEGATION_STATUSES) {
|
|
2038
|
+
function sweepStaleLocked(directory, timeoutMs, now, statuses = DEFAULT_SWEEPABLE_DELEGATION_STATUSES, filters = {}) {
|
|
2024
2039
|
let swept = 0;
|
|
2040
|
+
const { excludeCorrelationIds, includeCorrelationIds } = filters;
|
|
2025
2041
|
const records = loadRecordsForWrite(directory);
|
|
2026
2042
|
if (records === null)
|
|
2027
2043
|
return 0;
|
|
2028
2044
|
for (const record of records) {
|
|
2045
|
+
if (includeCorrelationIds !== undefined && !includeCorrelationIds.has(record.correlationId)) {
|
|
2046
|
+
continue;
|
|
2047
|
+
}
|
|
2048
|
+
if (excludeCorrelationIds?.has(record.correlationId))
|
|
2049
|
+
continue;
|
|
2029
2050
|
if (!statuses.has(record.status))
|
|
2030
2051
|
continue;
|
|
2031
2052
|
if (now - record.updatedAt <= timeoutMs)
|
|
@@ -2045,8 +2066,12 @@ async function sweepStaleDelegations(directory, timeoutMs, options = {}) {
|
|
|
2045
2066
|
if (!timeoutMs || timeoutMs <= 0)
|
|
2046
2067
|
return 0;
|
|
2047
2068
|
const statuses = options.statuses ?? DEFAULT_SWEEPABLE_DELEGATION_STATUSES;
|
|
2069
|
+
const filters = {
|
|
2070
|
+
excludeCorrelationIds: options.excludeCorrelationIds,
|
|
2071
|
+
includeCorrelationIds: options.includeCorrelationIds
|
|
2072
|
+
};
|
|
2048
2073
|
try {
|
|
2049
|
-
return await withEvidenceLock(directory, BACKGROUND_DELEGATIONS_FILE, STORE_LOCK_AGENT, STORE_LOCK_TASK, async () => sweepStaleLocked(directory, timeoutMs, Date.now(), statuses));
|
|
2074
|
+
return await withEvidenceLock(directory, BACKGROUND_DELEGATIONS_FILE, STORE_LOCK_AGENT, STORE_LOCK_TASK, async () => sweepStaleLocked(directory, timeoutMs, Date.now(), statuses, filters));
|
|
2050
2075
|
} catch (err) {
|
|
2051
2076
|
warn(`[background] sweepStaleDelegations failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2052
2077
|
return 0;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-03pv47h2.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveKnowledgeStoreDir
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-ywn7vtxp.js";
|
|
9
9
|
import {
|
|
10
10
|
init_knowledge_types,
|
|
11
11
|
isActiveStatus
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2m7mavaz.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-q67jb94n.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
handlePreflightCommand,
|
|
67
67
|
handlePromoteCommand,
|
|
68
68
|
handleQaGatesCommand,
|
|
69
|
+
handleRecoverCommand,
|
|
69
70
|
handleResetCommand,
|
|
70
71
|
handleResetSessionCommand,
|
|
71
72
|
handleRetrieveCommand,
|
|
@@ -84,65 +85,65 @@ import {
|
|
|
84
85
|
handleWriteRetroCommand,
|
|
85
86
|
normalizeSwarmCommandInput,
|
|
86
87
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
88
|
-
import"./index-
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
88
|
+
} from "./index-q4ed1jk7.js";
|
|
89
|
+
import"./index-d12jd5mn.js";
|
|
90
|
+
import"./index-h98t1m88.js";
|
|
91
|
+
import"./index-az8etqpp.js";
|
|
91
92
|
import"./index-134d35c1.js";
|
|
92
93
|
import"./index-b6e016tv.js";
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
94
|
+
import"./index-1csyxv0f.js";
|
|
95
|
+
import"./index-fqcjragy.js";
|
|
95
96
|
import"./index-y8552snf.js";
|
|
96
|
-
import"./index-
|
|
97
|
+
import"./index-nckg4gxb.js";
|
|
97
98
|
import"./index-70ha9e09.js";
|
|
98
99
|
import"./index-c8s9a3zh.js";
|
|
99
100
|
import"./index-9ss2m4rs.js";
|
|
100
|
-
import"./index-d55crzd4.js";
|
|
101
101
|
import"./index-74hpm6sh.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
102
|
+
import"./index-bt9aa01f.js";
|
|
103
|
+
import"./index-zb0xcz9t.js";
|
|
104
|
+
import"./index-x6tp0hfr.js";
|
|
105
|
+
import"./index-yts89pqg.js";
|
|
106
|
+
import"./index-dty5qgk2.js";
|
|
107
|
+
import"./index-rtry5xyf.js";
|
|
108
108
|
import"./index-zsrtt42s.js";
|
|
109
|
+
import"./index-jabkn643.js";
|
|
109
110
|
import"./index-k3cxyk66.js";
|
|
110
|
-
import"./index-
|
|
111
|
-
import"./index-
|
|
112
|
-
import"./index-
|
|
113
|
-
import"./index-
|
|
111
|
+
import"./index-cz25e8xp.js";
|
|
112
|
+
import"./index-8j0va7jp.js";
|
|
113
|
+
import"./index-pw83zgny.js";
|
|
114
|
+
import"./index-z6v7kwpa.js";
|
|
115
|
+
import"./index-556ja8an.js";
|
|
114
116
|
import"./index-7sy3aa9m.js";
|
|
115
117
|
import"./index-wx8zdh4a.js";
|
|
116
|
-
import"./index-
|
|
117
|
-
import"./index-
|
|
118
|
+
import"./index-8fwhhayc.js";
|
|
119
|
+
import"./index-q1exe2b3.js";
|
|
120
|
+
import"./index-03pv47h2.js";
|
|
121
|
+
import"./index-4w5qdbk7.js";
|
|
122
|
+
import"./index-psvxq93b.js";
|
|
118
123
|
import"./index-gprxjmm7.js";
|
|
119
124
|
import"./index-n832052r.js";
|
|
120
|
-
import"./index-
|
|
125
|
+
import"./index-rn0eq85g.js";
|
|
126
|
+
import"./index-z6xqpmqg.js";
|
|
127
|
+
import"./index-9qq7c18c.js";
|
|
121
128
|
import {
|
|
122
129
|
init_schema,
|
|
123
130
|
stripKnownSwarmPrefix
|
|
124
|
-
} from "./index-
|
|
125
|
-
import"./index-rn0eq85g.js";
|
|
131
|
+
} from "./index-y8j8ehc8.js";
|
|
126
132
|
import"./index-4rhhvd1a.js";
|
|
127
133
|
import {
|
|
128
134
|
AGENT_TOOL_MAP,
|
|
129
135
|
ORCHESTRATOR_NAME,
|
|
130
136
|
init_constants
|
|
131
|
-
} from "./index-
|
|
132
|
-
import"./index-z6xqpmqg.js";
|
|
137
|
+
} from "./index-v3y3qg48.js";
|
|
133
138
|
import"./index-zjygnfay.js";
|
|
134
|
-
import"./index-ne8cfgw5.js";
|
|
135
|
-
import"./index-tq5s07ta.js";
|
|
136
|
-
import"./index-rtry5xyf.js";
|
|
137
|
-
import"./index-ckrasab9.js";
|
|
138
139
|
import"./index-ae75rja9.js";
|
|
139
|
-
import"./index-
|
|
140
|
-
import"./index-
|
|
141
|
-
import"./index-bk5tah7q.js";
|
|
140
|
+
import"./index-ywn7vtxp.js";
|
|
141
|
+
import"./index-mazgg5s2.js";
|
|
142
142
|
import"./index-ed5ykebp.js";
|
|
143
|
-
import"./index-
|
|
143
|
+
import"./index-bk5tah7q.js";
|
|
144
|
+
import"./index-f9vvg5xb.js";
|
|
145
|
+
import"./index-1jsmmx7y.js";
|
|
144
146
|
import"./index-7g4c7s5r.js";
|
|
145
|
-
import"./index-s2rcz51a.js";
|
|
146
147
|
import"./index-bpmtbmy9.js";
|
|
147
148
|
import"./index-4nt52yr9.js";
|
|
148
149
|
import"./index-zgwm4ryv.js";
|
|
@@ -413,6 +414,7 @@ export {
|
|
|
413
414
|
handleRetrieveCommand,
|
|
414
415
|
handleResetSessionCommand,
|
|
415
416
|
handleResetCommand,
|
|
417
|
+
handleRecoverCommand,
|
|
416
418
|
handleQaGatesCommand,
|
|
417
419
|
handlePromoteCommand,
|
|
418
420
|
handlePreflightCommand,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-9qq7c18c.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-y8j8ehc8.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-v3y3qg48.js";
|
|
13
13
|
|
|
14
14
|
// src/config/index.ts
|
|
15
15
|
init_constants();
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash,
|
|
4
4
|
derivePlanId
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-z6v7kwpa.js";
|
|
6
6
|
import {
|
|
7
7
|
unsafePathTextReason
|
|
8
8
|
} from "./index-556ja8an.js";
|
|
9
9
|
import {
|
|
10
10
|
PlanSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-9qq7c18c.js";
|
|
12
12
|
import {
|
|
13
13
|
assertProjectRoot
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-f9vvg5xb.js";
|
|
15
15
|
import {
|
|
16
16
|
require_proper_lockfile
|
|
17
17
|
} from "./index-7g4c7s5r.js";
|