opencode-swarm 7.184.6 → 7.184.8
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 -3
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +20 -0
- package/README.md +9 -4
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{coder-settlement-cxe9fn9d.js → coder-settlement-r66d0hrv.js} +11 -11
- package/dist/cli/{config-doctor-f2semh9v.js → config-doctor-4283xkfv.js} +3 -3
- package/dist/cli/{core-xf46e82t.js → core-mz92tdmh.js} +4 -4
- package/dist/cli/{curation-policy-49f8jx48.js → curation-policy-k43q6b91.js} +4 -4
- package/dist/cli/{curator-drift-8ez4czhj.js → curator-drift-apjkb9ef.js} +9 -9
- package/dist/cli/curator-llm-factory-79ee75n4.js +75 -0
- package/dist/cli/{curator-n2gvb7rc.js → curator-x826phy6.js} +38 -38
- package/dist/cli/{evidence-summary-service-e2gt8tnz.js → evidence-summary-service-5tbqybse.js} +17 -17
- package/dist/cli/{gate-evidence-9zpdk87c.js → gate-evidence-v6g6bwm5.js} +8 -6
- package/dist/cli/guardrail-explain-xdztayqz.js +76 -0
- package/dist/cli/{guardrail-log-e4ysdxag.js → guardrail-log-nqg3kd9m.js} +7 -7
- package/dist/cli/{guardrail-reset-1fxdaqwf.js → guardrail-reset-vyn98as6.js} +38 -38
- package/dist/cli/{hive-promoter-y81jkaj5.js → hive-promoter-y7ddjf37.js} +38 -38
- package/dist/cli/{index-b5xcv0ec.js → index-0nzrz0a7.js} +4 -4
- package/dist/cli/{index-ar2gsn6b.js → index-14j1jkyy.js} +6 -6
- package/dist/cli/{index-ya32wfkp.js → index-1t2ctwkd.js} +1 -1
- package/dist/cli/{index-7136wpb2.js → index-239r2znx.js} +46 -19
- package/dist/cli/{index-k53a69vb.js → index-2t4zv1ag.js} +7 -14
- package/dist/cli/{index-4b8997qs.js → index-4hrc0gmy.js} +7 -7
- package/dist/cli/{index-y1xtkdys.js → index-5rpg65jz.js} +7 -7
- package/dist/cli/{index-5j6g6kqj.js → index-65xbb93y.js} +3 -3
- package/dist/cli/{index-zm08qe68.js → index-6d2fdc4g.js} +5 -5
- package/dist/cli/{index-3w3cssas.js → index-6grdzhtz.js} +7 -7
- package/dist/cli/{index-5p5tpj50.js → index-6wtf98v6.js} +2 -2
- package/dist/cli/{index-3n5zsp31.js → index-7xv2hvr6.js} +2 -2
- package/dist/cli/{index-wy3zpwjy.js → index-98a0rxby.js} +1 -1
- package/dist/cli/{index-vyjped9g.js → index-b1v0zxnh.js} +2 -2
- package/dist/cli/{index-gekvpzaf.js → index-bn604f1g.js} +2 -2
- package/dist/cli/{index-9vbsarg2.js → index-cnm1e97z.js} +5 -5
- package/dist/cli/{index-d4rhnvtf.js → index-cq0ft5wb.js} +1 -1
- package/dist/cli/{index-77g30h6x.js → index-dqb9528c.js} +2 -2
- package/dist/cli/{index-xf69xty9.js → index-e1zrgvqg.js} +1 -1
- package/dist/cli/{index-wzec3c4g.js → index-ezagem2g.js} +4 -0
- package/dist/cli/{index-zzvxj02e.js → index-fr6x6vn2.js} +1 -1
- package/dist/cli/{index-475bkab8.js → index-g2r6t7by.js} +1 -1
- package/dist/cli/{index-m62eysrr.js → index-gkrsy2vy.js} +168 -105
- package/dist/cli/{index-kx3hfpb8.js → index-h5y74yhy.js} +12 -12
- package/dist/cli/{index-qksf7d8b.js → index-kdkp3zds.js} +4 -4
- package/dist/cli/{index-dtgj8d9k.js → index-n2md4hfb.js} +4 -4
- package/dist/cli/{index-kkj76rky.js → index-psdt9tg0.js} +3 -3
- package/dist/cli/{index-p45t3c66.js → index-pv82gzpy.js} +1 -1
- package/dist/cli/{index-6g664sy8.js → index-q39ecyaq.js} +1 -1
- package/dist/cli/{index-skw3bgg1.js → index-q858w0wz.js} +4 -4
- package/dist/cli/{index-47wqppx9.js → index-qat6caah.js} +38 -38
- package/dist/cli/{index-earq3mda.js → index-qeqn241m.js} +1 -1
- package/dist/cli/{index-8x0vtc05.js → index-qntx5f14.js} +3 -3
- package/dist/cli/{index-h2vpqaf1.js → index-rdsrbanf.js} +6 -6
- package/dist/cli/{index-f0nj3d8z.js → index-rmspt7xm.js} +1 -1
- package/dist/cli/{index-jvk95e6y.js → index-s95ghsy1.js} +1 -1
- package/dist/cli/{index-w9hxzcz4.js → index-t0mb5a9p.js} +1 -1
- package/dist/cli/{index-jjdrhr7z.js → index-tr83fkh2.js} +5 -5
- package/dist/cli/{index-ejk27p7n.js → index-w9517q25.js} +40 -40
- package/dist/cli/{index-456awy1p.js → index-xqxqepsy.js} +2 -2
- package/dist/cli/{index-k1p87csx.js → index-z9b6abs8.js} +2 -2
- package/dist/cli/{index-g1aa3sdm.js → index-zce97jmt.js} +2 -2
- package/dist/cli/{index-taw9b4v5.js → index-zcka2cmb.js} +1 -1
- package/dist/cli/index.js +39 -39
- package/dist/cli/{knowledge-escalator-pw06n575.js → knowledge-escalator-2f5kkezr.js} +12 -12
- package/dist/cli/{knowledge-events-f4wgd8n2.js → knowledge-events-4qewgabr.js} +10 -10
- package/dist/cli/{knowledge-link-ap2274vm.js → knowledge-link-xw6vsbx3.js} +3 -3
- package/dist/cli/{knowledge-store-rttx0zb9.js → knowledge-store-04jxzbz5.js} +4 -4
- package/dist/cli/{knowledge-validator-nakzbx9d.js → knowledge-validator-x9g76cgh.js} +6 -6
- package/dist/cli/{mcp-fdgfryxa.js → mcp-zcmpnd9g.js} +1 -1
- package/dist/cli/{model-preflight-wmm3tard.js → model-preflight-y2wvmkmw.js} +38 -38
- package/dist/cli/{pending-delegations-eswsasts.js → pending-delegations-44cwy210.js} +10 -10
- package/dist/cli/{pr-subscriptions-fvwnd217.js → pr-subscriptions-hmca4kyq.js} +10 -10
- package/dist/cli/{pr-workflow-gate-v4e8k3gn.js → pr-workflow-gate-anzvkr87.js} +38 -38
- package/dist/cli/{runner-yz3ysehf.js → runner-pvdhxh74.js} +4 -4
- package/dist/cli/{scan-cursor-krrzh2x5.js → scan-cursor-t020wayb.js} +5 -5
- package/dist/cli/{schema-wv7r4x4q.js → schema-q5xjg4ww.js} +2 -2
- package/dist/cli/{scope-persistence-d3jv0v2w.js → scope-persistence-yk8bhh58.js} +14 -14
- package/dist/cli/{server-cxf8qmej.js → server-z5r7yyg7.js} +38 -38
- package/dist/cli/{skill-generator-gbs540wv.js → skill-generator-gma98zj6.js} +14 -14
- package/dist/cli/{snapshot-coordination-init-p98yacqd.js → snapshot-coordination-init-5hgtne5d.js} +38 -38
- package/dist/cli/{speckit-checkoff-1zhq6dsh.js → speckit-checkoff-5p71mpy2.js} +5 -5
- package/dist/cli/{workspace-snapshot-xwhhznt3.js → workspace-snapshot-553c6cd3.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-rm7ybyyc.js → worktree-collision-ownership-z4hg58zq.js} +11 -11
- package/dist/cli/{worktree-isolation-vz6et0s2.js → worktree-isolation-505j9dhm.js} +38 -38
- package/dist/commands/registry.d.ts +1 -1
- package/dist/gate-evidence.d.ts +51 -0
- package/dist/hooks/extractors.d.ts +23 -0
- package/dist/index.js +43 -44
- package/dist/services/context-budget-service.d.ts +12 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/record-branch-freshness.d.ts +6 -0
- package/dist/tools/record-trace-validation.d.ts +11 -0
- package/dist/tools/recover-stage-a-task.d.ts +5 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/dist/workflow/settlement-recovery.d.ts +52 -0
- package/dist/workflow/stage-a-repair.d.ts +13 -8
- package/dist/workflow/task-recovery-status.d.ts +11 -2
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-smd5741x.js +0 -75
- package/dist/cli/guardrail-explain-e9kjxg97.js +0 -76
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
protectedRoots,
|
|
9
9
|
redactDecisionLineForArchive,
|
|
10
10
|
stableCanonicalStringify
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-qntx5f14.js";
|
|
12
12
|
import {
|
|
13
13
|
LANGUAGE_REGISTRY,
|
|
14
14
|
_internals as _internals3,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
runEvaluation,
|
|
28
28
|
runExternalTool,
|
|
29
29
|
withDisposableWorktree
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-q39ecyaq.js";
|
|
31
31
|
import {
|
|
32
32
|
buildDriftInjectionText,
|
|
33
33
|
canonicalProjectKey,
|
|
@@ -36,13 +36,13 @@ import {
|
|
|
36
36
|
getGroupCommitWriter,
|
|
37
37
|
importLegacyJsonl,
|
|
38
38
|
readPriorDriftReports
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-psdt9tg0.js";
|
|
40
40
|
import {
|
|
41
41
|
detectStraySwarmDirs,
|
|
42
42
|
readDoctorArtifact,
|
|
43
43
|
removeStraySwarmDir,
|
|
44
44
|
runConfigDoctor
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-dqb9528c.js";
|
|
46
46
|
import {
|
|
47
47
|
MAX_TRANSIENT_RETRIES,
|
|
48
48
|
PlanRecoverySupersededError,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
updateTaskStatus,
|
|
84
84
|
validateProjectRoot,
|
|
85
85
|
withPlanLifecycleLock
|
|
86
|
-
} from "./index-
|
|
86
|
+
} from "./index-h5y74yhy.js";
|
|
87
87
|
import {
|
|
88
88
|
EvaluationTaskV1Schema,
|
|
89
89
|
GateAuditManifestV1Schema,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
saveGateAuditResult,
|
|
101
101
|
savePromotionDecision,
|
|
102
102
|
saveTaskSetSnapshot
|
|
103
|
-
} from "./index-
|
|
103
|
+
} from "./index-1t2ctwkd.js";
|
|
104
104
|
import {
|
|
105
105
|
canonicalHash,
|
|
106
106
|
canonicalJson,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
resolveSpeckitProjection,
|
|
121
121
|
validateSpeckit,
|
|
122
122
|
writeProjectedSpecSync
|
|
123
|
-
} from "./index-
|
|
123
|
+
} from "./index-zcka2cmb.js";
|
|
124
124
|
import {
|
|
125
125
|
containsControlChars,
|
|
126
126
|
containsPathTraversal,
|
|
@@ -148,16 +148,16 @@ import {
|
|
|
148
148
|
retireSkill,
|
|
149
149
|
selectCandidateEntries,
|
|
150
150
|
syncBundledProjectSkillsIfMissingAsync
|
|
151
|
-
} from "./index-
|
|
151
|
+
} from "./index-kdkp3zds.js";
|
|
152
152
|
import {
|
|
153
153
|
buildEscalationBriefing,
|
|
154
154
|
readRecentEscalations
|
|
155
|
-
} from "./index-
|
|
155
|
+
} from "./index-6d2fdc4g.js";
|
|
156
156
|
import {
|
|
157
157
|
alreadyCuratedThisGeneration,
|
|
158
158
|
claimNextScanBatch,
|
|
159
159
|
resolveCohortId
|
|
160
|
-
} from "./index-
|
|
160
|
+
} from "./index-z9b6abs8.js";
|
|
161
161
|
import {
|
|
162
162
|
CURATOR_CONSOLIDATION_PROMPT,
|
|
163
163
|
CURATOR_INIT_PROMPT,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
sweepStale,
|
|
178
178
|
unsubscribe,
|
|
179
179
|
updateSnapshot
|
|
180
|
-
} from "./index-
|
|
180
|
+
} from "./index-14j1jkyy.js";
|
|
181
181
|
import {
|
|
182
182
|
clearWorktreeMergeStatus,
|
|
183
183
|
getAllWorktreeMergeFailures,
|
|
@@ -189,7 +189,7 @@ import {
|
|
|
189
189
|
listCoderSettlementWalStates,
|
|
190
190
|
recoverCoderSettlement,
|
|
191
191
|
recoverStaleCoderSettlements
|
|
192
|
-
} from "./index-
|
|
192
|
+
} from "./index-4hrc0gmy.js";
|
|
193
193
|
import {
|
|
194
194
|
parsePorcelainV2Snapshot,
|
|
195
195
|
resolveCommitCountSince,
|
|
@@ -217,12 +217,12 @@ import {
|
|
|
217
217
|
resolveRemoteUrlIdentity,
|
|
218
218
|
resolveRemoteUrlIdentityAsync,
|
|
219
219
|
switchPrFeedbackTrackingCandidateAsync
|
|
220
|
-
} from "./index-
|
|
220
|
+
} from "./index-b1v0zxnh.js";
|
|
221
221
|
import {
|
|
222
222
|
WORKTREE_LIFECYCLE_LOCK_FILE,
|
|
223
223
|
recordWorktreeProvisioningOwner,
|
|
224
224
|
removeWorktreeProvisioningOwner
|
|
225
|
-
} from "./index-
|
|
225
|
+
} from "./index-7xv2hvr6.js";
|
|
226
226
|
import {
|
|
227
227
|
getLanguageForExtension
|
|
228
228
|
} from "./index-pt7h91zc.js";
|
|
@@ -257,10 +257,10 @@ import {
|
|
|
257
257
|
readWorkflowWalFile,
|
|
258
258
|
recoverMergeBackFromImmutableCoordinates,
|
|
259
259
|
startupOrphanRecovery,
|
|
260
|
-
|
|
260
|
+
transitionTaskWorkflowEvidenceWithStatus,
|
|
261
261
|
withTaskEvidenceTransaction,
|
|
262
262
|
writeWorkflowWalFile
|
|
263
|
-
} from "./index-
|
|
263
|
+
} from "./index-239r2znx.js";
|
|
264
264
|
import {
|
|
265
265
|
isPathUnderSwarmWorktreeBase,
|
|
266
266
|
listLiveLaneOwners,
|
|
@@ -269,7 +269,7 @@ import {
|
|
|
269
269
|
recordLiveLaneOwner,
|
|
270
270
|
removeWorktree,
|
|
271
271
|
resolveWorktreeBaseDir
|
|
272
|
-
} from "./index-
|
|
272
|
+
} from "./index-q858w0wz.js";
|
|
273
273
|
import {
|
|
274
274
|
DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
|
|
275
275
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
@@ -303,7 +303,7 @@ import {
|
|
|
303
303
|
scanBackgroundCoderReservationsForAdmission,
|
|
304
304
|
scanDelegationsForRecovery,
|
|
305
305
|
sweepStaleDelegations
|
|
306
|
-
} from "./index-
|
|
306
|
+
} from "./index-rdsrbanf.js";
|
|
307
307
|
import {
|
|
308
308
|
MAX_EVENT_LOG_ENTRIES,
|
|
309
309
|
_internals,
|
|
@@ -322,7 +322,7 @@ import {
|
|
|
322
322
|
recordKnowledgeEvent,
|
|
323
323
|
recordPhaseCloseIntent,
|
|
324
324
|
resolveKnowledgeEventsPath
|
|
325
|
-
} from "./index-
|
|
325
|
+
} from "./index-6grdzhtz.js";
|
|
326
326
|
import {
|
|
327
327
|
estimateCharsForTokens,
|
|
328
328
|
estimateTokens,
|
|
@@ -330,7 +330,7 @@ import {
|
|
|
330
330
|
readSwarmFileAsync,
|
|
331
331
|
safeHook,
|
|
332
332
|
validateSwarmPath
|
|
333
|
-
} from "./index-
|
|
333
|
+
} from "./index-98a0rxby.js";
|
|
334
334
|
import {
|
|
335
335
|
bunFile,
|
|
336
336
|
bunSpawn,
|
|
@@ -350,18 +350,18 @@ import {
|
|
|
350
350
|
validateActionableFields,
|
|
351
351
|
validateLesson,
|
|
352
352
|
validateSkillPath
|
|
353
|
-
} from "./index-
|
|
353
|
+
} from "./index-n2md4hfb.js";
|
|
354
354
|
import {
|
|
355
355
|
MAX_CURATION_PROPOSALS,
|
|
356
356
|
authorizeCuration,
|
|
357
357
|
buildConfigFingerprintInput
|
|
358
|
-
} from "./index-
|
|
358
|
+
} from "./index-qeqn241m.js";
|
|
359
359
|
import {
|
|
360
360
|
cohortConfigFingerprint
|
|
361
361
|
} from "./index-rtry5xyf.js";
|
|
362
362
|
import {
|
|
363
363
|
resolveWorktreeIsolationConfig
|
|
364
|
-
} from "./index-
|
|
364
|
+
} from "./index-65xbb93y.js";
|
|
365
365
|
import {
|
|
366
366
|
RetrospectiveEvidenceSchema
|
|
367
367
|
} from "./index-frcemc0b.js";
|
|
@@ -373,7 +373,7 @@ import {
|
|
|
373
373
|
clearScopeBindings,
|
|
374
374
|
readAuthoritativeScopeBindingSet,
|
|
375
375
|
readDeclaredScopeFilesFromBindings
|
|
376
|
-
} from "./index-
|
|
376
|
+
} from "./index-tr83fkh2.js";
|
|
377
377
|
import {
|
|
378
378
|
clearPlanLedgerForReset,
|
|
379
379
|
computePlanStructureHash,
|
|
@@ -389,7 +389,7 @@ import {
|
|
|
389
389
|
replayFromLedgerWithStatus,
|
|
390
390
|
resolvePlanningProfile,
|
|
391
391
|
takeSnapshotEvent
|
|
392
|
-
} from "./index-
|
|
392
|
+
} from "./index-cnm1e97z.js";
|
|
393
393
|
import {
|
|
394
394
|
CORE_EVENT_LOCKED,
|
|
395
395
|
appendCoreEventSync,
|
|
@@ -399,7 +399,7 @@ import {
|
|
|
399
399
|
hasSpecDriftAuditEvent,
|
|
400
400
|
hasTaskRepairAuditEvent,
|
|
401
401
|
readCoreEvents
|
|
402
|
-
} from "./index-
|
|
402
|
+
} from "./index-s95ghsy1.js";
|
|
403
403
|
import {
|
|
404
404
|
DEFAULT_QA_GATES,
|
|
405
405
|
computeProfileHash,
|
|
@@ -407,7 +407,7 @@ import {
|
|
|
407
407
|
getEffectiveGates,
|
|
408
408
|
getProfileLookupForIdentity,
|
|
409
409
|
setGatesForIdentity
|
|
410
|
-
} from "./index-
|
|
410
|
+
} from "./index-xqxqepsy.js";
|
|
411
411
|
import {
|
|
412
412
|
MAX_COORDINATION_STATE_LIST_ROWS,
|
|
413
413
|
deleteCoordinationImports,
|
|
@@ -420,7 +420,7 @@ import {
|
|
|
420
420
|
listCoordinationStates,
|
|
421
421
|
transitionCoordinationState,
|
|
422
422
|
withCoordinationTransaction
|
|
423
|
-
} from "./index-
|
|
423
|
+
} from "./index-rmspt7xm.js";
|
|
424
424
|
import {
|
|
425
425
|
DURABILITY_CLASSES,
|
|
426
426
|
closeAllProjectDbs,
|
|
@@ -429,7 +429,7 @@ import {
|
|
|
429
429
|
projectDbExists,
|
|
430
430
|
projectDbPath,
|
|
431
431
|
withImmediateTransaction
|
|
432
|
-
} from "./index-
|
|
432
|
+
} from "./index-t0mb5a9p.js";
|
|
433
433
|
import {
|
|
434
434
|
loadDatabaseCtor
|
|
435
435
|
} from "./index-rdm3px0g.js";
|
|
@@ -445,7 +445,7 @@ import {
|
|
|
445
445
|
observeModelLimitResolution,
|
|
446
446
|
observeStoreHealth,
|
|
447
447
|
readLearningHealth
|
|
448
|
-
} from "./index-
|
|
448
|
+
} from "./index-fr6x6vn2.js";
|
|
449
449
|
import {
|
|
450
450
|
appendKnowledge,
|
|
451
451
|
appendRejectedLesson,
|
|
@@ -476,7 +476,7 @@ import {
|
|
|
476
476
|
transactFile,
|
|
477
477
|
transactKnowledge,
|
|
478
478
|
wordBigrams
|
|
479
|
-
} from "./index-
|
|
479
|
+
} from "./index-5rpg65jz.js";
|
|
480
480
|
import {
|
|
481
481
|
readTailJsonl,
|
|
482
482
|
readTailJsonlDetailed,
|
|
@@ -497,11 +497,11 @@ import {
|
|
|
497
497
|
resolveLinkDir,
|
|
498
498
|
sanitizeLinkId,
|
|
499
499
|
writeLinkPointer
|
|
500
|
-
} from "./index-
|
|
500
|
+
} from "./index-g2r6t7by.js";
|
|
501
501
|
import {
|
|
502
502
|
atomicWriteFile,
|
|
503
503
|
withEvidenceLock
|
|
504
|
-
} from "./index-
|
|
504
|
+
} from "./index-e1zrgvqg.js";
|
|
505
505
|
import {
|
|
506
506
|
assertProjectRoot,
|
|
507
507
|
hasExplicitProjectBoundary,
|
|
@@ -543,7 +543,7 @@ import {
|
|
|
543
543
|
matchTempGrammar,
|
|
544
544
|
parseTargetBasename,
|
|
545
545
|
resetSwarmArtifactCache
|
|
546
|
-
} from "./index-
|
|
546
|
+
} from "./index-2t4zv1ag.js";
|
|
547
547
|
import {
|
|
548
548
|
PlanSchema,
|
|
549
549
|
TaskStatusSchema,
|
|
@@ -557,7 +557,7 @@ import {
|
|
|
557
557
|
loadGateOverrides,
|
|
558
558
|
loadPluginConfig,
|
|
559
559
|
loadPluginConfigWithMeta
|
|
560
|
-
} from "./index-
|
|
560
|
+
} from "./index-cq0ft5wb.js";
|
|
561
561
|
import {
|
|
562
562
|
addDeferredWarning,
|
|
563
563
|
advisoryWarn,
|
|
@@ -589,7 +589,7 @@ import {
|
|
|
589
589
|
resolveContextWindow,
|
|
590
590
|
resolveGeneratedAgentRole,
|
|
591
591
|
stripKnownSwarmPrefix
|
|
592
|
-
} from "./index-
|
|
592
|
+
} from "./index-zce97jmt.js";
|
|
593
593
|
import {
|
|
594
594
|
AGENT_TOOL_MAP,
|
|
595
595
|
ALL_AGENT_NAMES,
|
|
@@ -612,7 +612,7 @@ import {
|
|
|
612
612
|
init_agent_names,
|
|
613
613
|
init_constants,
|
|
614
614
|
init_tool_metadata
|
|
615
|
-
} from "./index-
|
|
615
|
+
} from "./index-ezagem2g.js";
|
|
616
616
|
import {
|
|
617
617
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
618
618
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -3352,7 +3352,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
|
|
|
3352
3352
|
return null;
|
|
3353
3353
|
throw error2;
|
|
3354
3354
|
}
|
|
3355
|
-
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-
|
|
3355
|
+
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-anzvkr87.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
|
|
3356
3356
|
if (!legacy)
|
|
3357
3357
|
return null;
|
|
3358
3358
|
const namespace = workflowGateStateCoordinationNamespace(sessionID);
|
|
@@ -3439,7 +3439,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
|
|
|
3439
3439
|
let recoveryState = null;
|
|
3440
3440
|
if (!currentAuthoritative) {
|
|
3441
3441
|
if (options.allowSalvagedRead) {
|
|
3442
|
-
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-
|
|
3442
|
+
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-anzvkr87.js");
|
|
3443
3443
|
recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
|
|
3444
3444
|
}
|
|
3445
3445
|
if (!recoveryState) {
|
|
@@ -14824,7 +14824,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
14824
14824
|
return extracted === expectedSessionId;
|
|
14825
14825
|
}
|
|
14826
14826
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
14827
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
14827
|
+
const collisionOwnership = await import("./worktree-collision-ownership-z4hg58zq.js");
|
|
14828
14828
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
14829
14829
|
}
|
|
14830
14830
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -15250,7 +15250,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
15250
15250
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
15251
15251
|
if (laneProfile) {
|
|
15252
15252
|
try {
|
|
15253
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
15253
|
+
const { writeLaneProfileToDiskReal } = await import("./core-mz92tdmh.js");
|
|
15254
15254
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
15255
15255
|
} catch {}
|
|
15256
15256
|
}
|
|
@@ -16229,7 +16229,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
16229
16229
|
}
|
|
16230
16230
|
clearWorktreeMergeStatus(statusKey);
|
|
16231
16231
|
try {
|
|
16232
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
16232
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-mz92tdmh.js");
|
|
16233
16233
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
16234
16234
|
} catch {}
|
|
16235
16235
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -23858,7 +23858,7 @@ function clearCriticalShownIds(sessionID) {
|
|
|
23858
23858
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
23859
23859
|
const map = new Map;
|
|
23860
23860
|
try {
|
|
23861
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
23861
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-hmca4kyq.js");
|
|
23862
23862
|
const records = await listActive2(directory);
|
|
23863
23863
|
for (const record of records) {
|
|
23864
23864
|
if (record.sessionID !== sessionID)
|
|
@@ -40983,9 +40983,9 @@ function hashContent(content) {
|
|
|
40983
40983
|
return createHash25("sha1").update(content).digest("hex");
|
|
40984
40984
|
}
|
|
40985
40985
|
async function loadConfigForPolicyCurator(directory) {
|
|
40986
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
40986
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q5xjg4ww.js");
|
|
40987
40987
|
try {
|
|
40988
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
40988
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0nzrz0a7.js");
|
|
40989
40989
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
40990
40990
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
40991
40991
|
} catch {
|
|
@@ -44043,7 +44043,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
|
|
|
44043
44043
|
const seam = _internals38.createCuratorLLMDelegate;
|
|
44044
44044
|
if (seam)
|
|
44045
44045
|
return seam(directory, mode, sessionId);
|
|
44046
|
-
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-
|
|
44046
|
+
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-79ee75n4.js");
|
|
44047
44047
|
return createCuratorLLMDelegate(directory, mode, sessionId);
|
|
44048
44048
|
}
|
|
44049
44049
|
async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
|
|
@@ -44438,7 +44438,7 @@ async function runFinalizeStage(ctx) {
|
|
|
44438
44438
|
}
|
|
44439
44439
|
}
|
|
44440
44440
|
try {
|
|
44441
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
44441
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-q5xjg4ww.js");
|
|
44442
44442
|
const { config: pmLoadedConfig } = _internals38.loadPluginConfigWithMeta(ctx.directory);
|
|
44443
44443
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
44444
44444
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -46624,7 +46624,7 @@ function serializeAgentSession(s) {
|
|
|
46624
46624
|
}
|
|
46625
46625
|
async function writeSnapshot(directory, state) {
|
|
46626
46626
|
try {
|
|
46627
|
-
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-
|
|
46627
|
+
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-5hgtne5d.js");
|
|
46628
46628
|
await ensureSnapshotCoordinationReady(directory);
|
|
46629
46629
|
const snapshot = {
|
|
46630
46630
|
version: 3,
|
|
@@ -49802,7 +49802,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
49802
49802
|
};
|
|
49803
49803
|
}
|
|
49804
49804
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
49805
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
49805
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0nzrz0a7.js");
|
|
49806
49806
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
49807
49807
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
49808
49808
|
if (sweepConfig?.enabled === false)
|
|
@@ -50926,7 +50926,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
50926
50926
|
}
|
|
50927
50927
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
50928
50928
|
try {
|
|
50929
|
-
const skillModule = await import("./skill-generator-
|
|
50929
|
+
const skillModule = await import("./skill-generator-gma98zj6.js");
|
|
50930
50930
|
for (const cand of skillCandidates) {
|
|
50931
50931
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
50932
50932
|
continue;
|
|
@@ -51398,7 +51398,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
51398
51398
|
} catch {}
|
|
51399
51399
|
}
|
|
51400
51400
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
51401
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
51401
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-2f5kkezr.js");
|
|
51402
51402
|
for (const { id } of contradictedEntries) {
|
|
51403
51403
|
try {
|
|
51404
51404
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -52230,7 +52230,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
52230
52230
|
warnings.push("Failed to collect knowledge summary.");
|
|
52231
52231
|
}
|
|
52232
52232
|
try {
|
|
52233
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
52233
|
+
const { getScanStatus } = await import("./scan-cursor-t020wayb.js");
|
|
52234
52234
|
const scanStatus = await getScanStatus(directory);
|
|
52235
52235
|
if (scanStatus.remaining_estimate > 0) {
|
|
52236
52236
|
warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
|
|
@@ -52402,9 +52402,9 @@ var _internals57 = {
|
|
|
52402
52402
|
verifyPostMortemKnowledgeActions,
|
|
52403
52403
|
repairPostMortemActions,
|
|
52404
52404
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
52405
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
52405
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q5xjg4ww.js");
|
|
52406
52406
|
try {
|
|
52407
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
52407
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0nzrz0a7.js");
|
|
52408
52408
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
52409
52409
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
52410
52410
|
} catch {
|
|
@@ -52412,11 +52412,11 @@ var _internals57 = {
|
|
|
52412
52412
|
}
|
|
52413
52413
|
},
|
|
52414
52414
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
52415
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
52415
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-x826phy6.js");
|
|
52416
52416
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
52417
52417
|
},
|
|
52418
52418
|
checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
|
|
52419
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
52419
|
+
const { checkHivePromotions } = await import("./hive-promoter-y7ddjf37.js");
|
|
52420
52420
|
return checkHivePromotions(entries2, knowledgeConfig, directory);
|
|
52421
52421
|
},
|
|
52422
52422
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -52425,7 +52425,7 @@ var _internals57 = {
|
|
|
52425
52425
|
activateProposal,
|
|
52426
52426
|
listSkills: listSkills2,
|
|
52427
52427
|
sanitizeSlug
|
|
52428
|
-
} = await import("./skill-generator-
|
|
52428
|
+
} = await import("./skill-generator-gma98zj6.js");
|
|
52429
52429
|
const result = {
|
|
52430
52430
|
approved: [],
|
|
52431
52431
|
rejected: [],
|
|
@@ -52467,7 +52467,7 @@ var _internals57 = {
|
|
|
52467
52467
|
return result;
|
|
52468
52468
|
},
|
|
52469
52469
|
readPriorDriftReports: async (directory) => {
|
|
52470
|
-
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-
|
|
52470
|
+
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-apjkb9ef.js");
|
|
52471
52471
|
return readPriorDriftReports2(directory);
|
|
52472
52472
|
},
|
|
52473
52473
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -62263,9 +62263,9 @@ var _internals67 = {
|
|
|
62263
62263
|
loadPluginConfigWithMeta,
|
|
62264
62264
|
loadCuratorDeps: async () => {
|
|
62265
62265
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
|
|
62266
|
-
import("./schema-
|
|
62267
|
-
import("./curator-
|
|
62268
|
-
import("./curator-llm-factory-
|
|
62266
|
+
import("./schema-q5xjg4ww.js"),
|
|
62267
|
+
import("./curator-x826phy6.js"),
|
|
62268
|
+
import("./curator-llm-factory-79ee75n4.js")
|
|
62269
62269
|
]);
|
|
62270
62270
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
|
|
62271
62271
|
}
|
|
@@ -64017,7 +64017,7 @@ function classifySettlementWalState(entry, workflow) {
|
|
|
64017
64017
|
suggestedNextCommand: ""
|
|
64018
64018
|
};
|
|
64019
64019
|
}
|
|
64020
|
-
function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck) {
|
|
64020
|
+
function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck, options) {
|
|
64021
64021
|
const snapshot = evidence2?.workflow !== undefined && evidence2.workflow !== null ? { ...evidence2.workflow, authoritative: true } : null;
|
|
64022
64022
|
if (snapshot === null) {
|
|
64023
64023
|
return {
|
|
@@ -64047,6 +64047,16 @@ function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck) {
|
|
|
64047
64047
|
};
|
|
64048
64048
|
}
|
|
64049
64049
|
}
|
|
64050
|
+
if (options?.settlementCommittedAccepted === true && (snapshot.state === "idle" || snapshot.state === "blocked")) {
|
|
64051
|
+
return {
|
|
64052
|
+
...base,
|
|
64053
|
+
category: "settlement_wedge",
|
|
64054
|
+
repairAllowed: greenPreCheck === true,
|
|
64055
|
+
uncertainExternalEffect: false,
|
|
64056
|
+
explanation: `settlement-backed task wedge \u2014 workflow at ${snapshot.state} while a COMMITTED accepted coder settlement still justifies Stage A for generation ${snapshot.generation}${greenPreCheck === true ? " and green post-settlement pre-check bundles exist: the missing Stage A record is deterministically repairable without re-running the coder or editing evidence" : greenPreCheck === false ? " but pre-check proof is missing or not green: run pre_check_batch first \u2014 the repair refuses to mark Stage A passed without proof" : ""}`,
|
|
64057
|
+
suggestedNextCommand: `/swarm recover ${taskId}`
|
|
64058
|
+
};
|
|
64059
|
+
}
|
|
64050
64060
|
return {
|
|
64051
64061
|
...base,
|
|
64052
64062
|
category: "healthy",
|
|
@@ -64134,15 +64144,65 @@ async function enumerateStageACandidates(directory, requested) {
|
|
|
64134
64144
|
truncated
|
|
64135
64145
|
};
|
|
64136
64146
|
}
|
|
64147
|
+
function latestCommittedAcceptedSettlementMs(taskId, walStates) {
|
|
64148
|
+
let latest = null;
|
|
64149
|
+
for (const state of walStates) {
|
|
64150
|
+
if (state.taskId !== taskId)
|
|
64151
|
+
continue;
|
|
64152
|
+
if (state.state !== "COMMITTED")
|
|
64153
|
+
continue;
|
|
64154
|
+
if (state.accepted !== true)
|
|
64155
|
+
continue;
|
|
64156
|
+
if (state.recordedAt === undefined)
|
|
64157
|
+
continue;
|
|
64158
|
+
const parsed = Date.parse(state.recordedAt);
|
|
64159
|
+
if (!Number.isFinite(parsed))
|
|
64160
|
+
continue;
|
|
64161
|
+
latest = latest === null ? parsed : Math.max(latest, parsed);
|
|
64162
|
+
}
|
|
64163
|
+
return latest;
|
|
64164
|
+
}
|
|
64137
64165
|
async function scanStageATask(directory, taskId, walStates) {
|
|
64138
64166
|
const evidence2 = await readTaskEvidence(directory, taskId);
|
|
64139
64167
|
const workflow = getTaskWorkflowSnapshot(evidence2);
|
|
64140
|
-
if (workflow.state
|
|
64168
|
+
if (workflow.state === "coder_delegated") {
|
|
64169
|
+
if (!evidence2?.gates?.pre_check) {
|
|
64170
|
+
const greenness = await hasGreenPostSettlementPreCheck(directory, liveWedgeSettledAfterMs(taskId, workflow, walStates));
|
|
64171
|
+
if (!greenness.green) {
|
|
64172
|
+
return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
|
|
64173
|
+
}
|
|
64174
|
+
return {
|
|
64175
|
+
kind: "repairable",
|
|
64176
|
+
mode: "live_wedge",
|
|
64177
|
+
generation: workflow.generation,
|
|
64178
|
+
green: true,
|
|
64179
|
+
predecessorTransitionId: workflow.lastTransitionId ?? null,
|
|
64180
|
+
evidence: evidence2
|
|
64181
|
+
};
|
|
64182
|
+
}
|
|
64141
64183
|
return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
|
|
64142
64184
|
}
|
|
64143
|
-
if (
|
|
64185
|
+
if (workflow.state === "idle" || workflow.state === "blocked") {
|
|
64186
|
+
const settledAfterMs = latestCommittedAcceptedSettlementMs(taskId, walStates);
|
|
64187
|
+
if (settledAfterMs !== null && (workflow.state === "blocked" || !evidence2?.gates?.pre_check)) {
|
|
64188
|
+
const greenness = await hasGreenPostSettlementPreCheck(directory, settledAfterMs);
|
|
64189
|
+
if (!greenness.green) {
|
|
64190
|
+
return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
|
|
64191
|
+
}
|
|
64192
|
+
return {
|
|
64193
|
+
kind: "repairable",
|
|
64194
|
+
mode: "settlement_wedge",
|
|
64195
|
+
generation: workflow.generation,
|
|
64196
|
+
green: true,
|
|
64197
|
+
predecessorTransitionId: workflow.lastTransitionId ?? null,
|
|
64198
|
+
evidence: evidence2
|
|
64199
|
+
};
|
|
64200
|
+
}
|
|
64144
64201
|
return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
|
|
64145
64202
|
}
|
|
64203
|
+
return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
|
|
64204
|
+
}
|
|
64205
|
+
function liveWedgeSettledAfterMs(taskId, workflow, walStates) {
|
|
64146
64206
|
let settledAfterMs = null;
|
|
64147
64207
|
for (const state of walStates) {
|
|
64148
64208
|
if (state.taskId !== taskId)
|
|
@@ -64161,17 +64221,7 @@ async function scanStageATask(directory, taskId, walStates) {
|
|
|
64161
64221
|
if (Number.isFinite(fallbackTs))
|
|
64162
64222
|
settledAfterMs = fallbackTs;
|
|
64163
64223
|
}
|
|
64164
|
-
|
|
64165
|
-
if (!greenness.green) {
|
|
64166
|
-
return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
|
|
64167
|
-
}
|
|
64168
|
-
return {
|
|
64169
|
-
kind: "repairable",
|
|
64170
|
-
generation: workflow.generation,
|
|
64171
|
-
green: true,
|
|
64172
|
-
predecessorTransitionId: workflow.lastTransitionId ?? null,
|
|
64173
|
-
evidence: evidence2
|
|
64174
|
-
};
|
|
64224
|
+
return settledAfterMs;
|
|
64175
64225
|
}
|
|
64176
64226
|
async function scanWedgedStageA(directory, options) {
|
|
64177
64227
|
const { selected, truncated } = await enumerateStageACandidates(directory, options?.taskIds);
|
|
@@ -64181,9 +64231,13 @@ async function scanWedgedStageA(directory, options) {
|
|
|
64181
64231
|
try {
|
|
64182
64232
|
const verdict = await scanStageATask(directory, taskId, walStates);
|
|
64183
64233
|
if (verdict.kind === "repairable") {
|
|
64184
|
-
results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, verdict.green
|
|
64234
|
+
results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, verdict.green, {
|
|
64235
|
+
settlementCommittedAccepted: verdict.mode === "settlement_wedge"
|
|
64236
|
+
}));
|
|
64185
64237
|
} else if (verdict.kind === "not_green") {
|
|
64186
|
-
results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, false
|
|
64238
|
+
results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, false, {
|
|
64239
|
+
settlementCommittedAccepted: verdict.evidence !== null && ["idle", "blocked"].includes(getTaskWorkflowSnapshot(verdict.evidence).state) && latestCommittedAcceptedSettlementMs(taskId, walStates) !== null
|
|
64240
|
+
}));
|
|
64187
64241
|
} else {
|
|
64188
64242
|
results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, null));
|
|
64189
64243
|
}
|
|
@@ -64216,18 +64270,23 @@ async function repairWedgedStageA(directory, options) {
|
|
|
64216
64270
|
continue;
|
|
64217
64271
|
}
|
|
64218
64272
|
const transitionId = `stage-a-repair:${taskId}:${scan.generation}`;
|
|
64219
|
-
await
|
|
64273
|
+
const { duplicated } = await transitionTaskWorkflowEvidenceWithStatus(directory, taskId, {
|
|
64220
64274
|
type: "stage_a_passed",
|
|
64275
|
+
...scan.mode === "settlement_wedge" ? { settlementRecovery: true } : {},
|
|
64221
64276
|
expectedGeneration: scan.generation,
|
|
64222
64277
|
transitionId
|
|
64223
64278
|
});
|
|
64224
|
-
|
|
64225
|
-
|
|
64226
|
-
|
|
64227
|
-
|
|
64228
|
-
|
|
64229
|
-
|
|
64230
|
-
|
|
64279
|
+
if (!duplicated) {
|
|
64280
|
+
await appendStageARepairEvent(directory, {
|
|
64281
|
+
action: "repaired",
|
|
64282
|
+
taskId,
|
|
64283
|
+
transitionId,
|
|
64284
|
+
generation: scan.generation,
|
|
64285
|
+
...scan.mode === "settlement_wedge" ? { settlementRecovery: true } : {},
|
|
64286
|
+
via: "swarm-recover",
|
|
64287
|
+
predecessorTransitionId: scan.predecessorTransitionId
|
|
64288
|
+
});
|
|
64289
|
+
}
|
|
64231
64290
|
results.push({
|
|
64232
64291
|
taskId,
|
|
64233
64292
|
outcome: "repaired",
|
|
@@ -64599,7 +64658,7 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64599
64658
|
let scanCompleted = false;
|
|
64600
64659
|
let scanRemaining = 0;
|
|
64601
64660
|
try {
|
|
64602
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
64661
|
+
const { getScanStatus } = await import("./scan-cursor-t020wayb.js");
|
|
64603
64662
|
const status = await getScanStatus(directory);
|
|
64604
64663
|
scanGeneration = status.generation;
|
|
64605
64664
|
scanCompleted = status.completed;
|
|
@@ -64607,19 +64666,19 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64607
64666
|
} catch {}
|
|
64608
64667
|
let configMatch = null;
|
|
64609
64668
|
try {
|
|
64610
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
64669
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-xw6vsbx3.js");
|
|
64611
64670
|
if (isLinked2(directory)) {
|
|
64612
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
64671
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q5xjg4ww.js");
|
|
64613
64672
|
let config;
|
|
64614
64673
|
try {
|
|
64615
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
64674
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0nzrz0a7.js");
|
|
64616
64675
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
64617
64676
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
64618
64677
|
} catch {
|
|
64619
64678
|
config = KnowledgeConfigSchema2.parse({});
|
|
64620
64679
|
}
|
|
64621
64680
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
64622
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
64681
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-k43q6b91.js");
|
|
64623
64682
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
64624
64683
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
64625
64684
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -65625,7 +65684,7 @@ async function getDiagnoseData(directory, sessionID) {
|
|
|
65625
65684
|
settlementStatuses.push(classifySettlementWalState(entry, workflow));
|
|
65626
65685
|
}
|
|
65627
65686
|
const wedgeScan = await scanWedgedStageA(directory);
|
|
65628
|
-
const wedgeStatuses = wedgeScan.results.filter((status) => status.category === "live_wedge");
|
|
65687
|
+
const wedgeStatuses = wedgeScan.results.filter((status) => status.category === "live_wedge" || status.category === "settlement_wedge");
|
|
65629
65688
|
const knownTaskIds = new Set([
|
|
65630
65689
|
...settlementStates.map((entry) => entry.taskId),
|
|
65631
65690
|
...wedgeScan.results.map((status) => status.taskId)
|
|
@@ -65644,7 +65703,8 @@ async function getDiagnoseData(directory, sessionID) {
|
|
|
65644
65703
|
...wedgeStatuses
|
|
65645
65704
|
];
|
|
65646
65705
|
const missingLines = missingStatuses.map(renderTaskRecoveryLine).filter(Boolean);
|
|
65647
|
-
const
|
|
65706
|
+
const wedgeTaskIds = new Set(wedgeStatuses.map((s) => s.taskId));
|
|
65707
|
+
const healthyCount = settlementStatuses.filter((s) => s.category === "healthy" && !wedgeTaskIds.has(s.taskId)).length;
|
|
65648
65708
|
if (nonHealthy.length === 0 && !truncated) {
|
|
65649
65709
|
checks.push({
|
|
65650
65710
|
name: "Coder Settlements",
|
|
@@ -65665,7 +65725,7 @@ async function getDiagnoseData(directory, sessionID) {
|
|
|
65665
65725
|
checks.push({
|
|
65666
65726
|
name: "Coder Settlements",
|
|
65667
65727
|
status: "\u26A0\uFE0F",
|
|
65668
|
-
detail: `${lines.join("; ")}${healthyCount > 0 ? `; ${healthyCount} healthy settlement(s)` : ""}. Categories: missing/stale/ambiguous/corrupt/live_wedge \u2014 stale settlements block dispatches with CODER_DISPATCH_IN_PROGRESS. ${renderRecoveryInvocationQuickForms()}${truncationNote}`
|
|
65728
|
+
detail: `${lines.join("; ")}${healthyCount > 0 ? `; ${healthyCount} healthy settlement(s)` : ""}. Categories: missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge \u2014 stale settlements block dispatches with CODER_DISPATCH_IN_PROGRESS. ${renderRecoveryInvocationQuickForms()}${truncationNote}`
|
|
65669
65729
|
});
|
|
65670
65730
|
}
|
|
65671
65731
|
} catch (error2) {
|
|
@@ -66066,7 +66126,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
66066
66126
|
const result = runConfigDoctor(config, directory);
|
|
66067
66127
|
let output;
|
|
66068
66128
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
66069
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
66129
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-4283xkfv.js");
|
|
66070
66130
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
66071
66131
|
applyLossy: true
|
|
66072
66132
|
});
|
|
@@ -66104,7 +66164,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
66104
66164
|
`;
|
|
66105
66165
|
}
|
|
66106
66166
|
try {
|
|
66107
|
-
const { runModelPreflight } = await import("./model-preflight-
|
|
66167
|
+
const { runModelPreflight } = await import("./model-preflight-y2wvmkmw.js");
|
|
66108
66168
|
const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
|
|
66109
66169
|
const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
|
|
66110
66170
|
const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
|
|
@@ -67031,7 +67091,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
67031
67091
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
67032
67092
|
}
|
|
67033
67093
|
async function handleEvidenceSummaryCommand(directory) {
|
|
67034
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
67094
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-5tbqybse.js");
|
|
67035
67095
|
const artifact = await buildEvidenceSummary(directory);
|
|
67036
67096
|
if (!artifact) {
|
|
67037
67097
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -91305,7 +91365,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
91305
91365
|
}
|
|
91306
91366
|
const sdkOpts = signal ? { signal } : {};
|
|
91307
91367
|
try {
|
|
91308
|
-
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-
|
|
91368
|
+
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-qat6caah.js");
|
|
91309
91369
|
const createResult = await client.session.create({
|
|
91310
91370
|
...sessionId ? {
|
|
91311
91371
|
body: {
|
|
@@ -93278,7 +93338,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
|
|
|
93278
93338
|
clearedEvents: []
|
|
93279
93339
|
};
|
|
93280
93340
|
try {
|
|
93281
|
-
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-
|
|
93341
|
+
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-anzvkr87.js");
|
|
93282
93342
|
await cancelPrFeedbackPublication2(directory, sessionID, reason);
|
|
93283
93343
|
} catch (err) {
|
|
93284
93344
|
warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -101143,6 +101203,9 @@ function renderStageARepairOutcome(outcome) {
|
|
|
101143
101203
|
if (outcome.state === "rework_required") {
|
|
101144
101204
|
return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is rework_required \u2014 not a coder_delegated Stage A wedge, nothing to repair here. If the Stage B verdict did not require a code change, have the architect run the recover_rework_task tool for this task; otherwise delegate the coder to repair first.`;
|
|
101145
101205
|
}
|
|
101206
|
+
if (outcome.state === "idle" || outcome.state === "blocked") {
|
|
101207
|
+
return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is ${outcome.state} \u2014 no Stage A repair is needed or provable here (a mechanical repair requires a COMMITTED accepted coder settlement AND green post-settlement pre-check evidence AND no Stage A proof already recorded). When Stage A is already recorded the task needs nothing; when the receipts exist but the mechanical envelope excludes them, the architect can run the audited recover_stage_a_task tool. --force does not override Stage A wedge-classification refusals.`;
|
|
101208
|
+
}
|
|
101146
101209
|
return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is ${outcome.state} with pre_check proof present or not settled \u2014 nothing to repair`;
|
|
101147
101210
|
case "skipped_not_green":
|
|
101148
101211
|
return `\u23ED\uFE0F Task ${outcome.taskId}: no green post-settlement pre-check evidence (${outcome.reason === "no_pre_check_bundles" ? "missing or non-green secretscan/SAST bundle \u2014 run pre_check_batch first" : "latest pre-check run failed or predates the settlement"}) \u2014 refusing to mark Stage A passed without proof`;
|
|
@@ -106813,7 +106876,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
|
|
|
106813
106876
|
if (!input.dispatcher) {
|
|
106814
106877
|
throw new Error("no evaluation dispatcher available (cannot run validation)");
|
|
106815
106878
|
}
|
|
106816
|
-
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-
|
|
106879
|
+
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-pvdhxh74.js");
|
|
106817
106880
|
const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
|
|
106818
106881
|
const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals128.evaluateCandidateV1({
|
|
106819
106882
|
projectRoot: input.directory,
|
|
@@ -109442,7 +109505,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
109442
109505
|
async function handleHelpCommand(ctx) {
|
|
109443
109506
|
const targetCommand = ctx.args.join(" ");
|
|
109444
109507
|
if (!targetCommand) {
|
|
109445
|
-
const { buildHelpText } = await import("./index-
|
|
109508
|
+
const { buildHelpText } = await import("./index-w9517q25.js");
|
|
109446
109509
|
return buildHelpText();
|
|
109447
109510
|
}
|
|
109448
109511
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -109456,7 +109519,7 @@ async function handleHelpCommand(ctx) {
|
|
|
109456
109519
|
> Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
|
|
109457
109520
|
}
|
|
109458
109521
|
const similar = _internals26.findSimilarCommands(targetCommand);
|
|
109459
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
109522
|
+
const { buildHelpText: fullHelp } = await import("./index-w9517q25.js");
|
|
109460
109523
|
if (similar.length > 0) {
|
|
109461
109524
|
return `Command '/swarm ${targetCommand}' not found.
|
|
109462
109525
|
|
|
@@ -109771,7 +109834,7 @@ var COMMAND_REGISTRY = {
|
|
|
109771
109834
|
},
|
|
109772
109835
|
"guardrail explain": {
|
|
109773
109836
|
handler: async (ctx) => {
|
|
109774
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
109837
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-xdztayqz.js");
|
|
109775
109838
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
109776
109839
|
},
|
|
109777
109840
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -109781,7 +109844,7 @@ var COMMAND_REGISTRY = {
|
|
|
109781
109844
|
},
|
|
109782
109845
|
"guardrail reset": {
|
|
109783
109846
|
handler: async (ctx) => {
|
|
109784
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
109847
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-vyn98as6.js");
|
|
109785
109848
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
109786
109849
|
},
|
|
109787
109850
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -109802,7 +109865,7 @@ var COMMAND_REGISTRY = {
|
|
|
109802
109865
|
},
|
|
109803
109866
|
"guardrail-log": {
|
|
109804
109867
|
handler: async (ctx) => {
|
|
109805
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
109868
|
+
const { handleGuardrailLog } = await import("./guardrail-log-nqg3kd9m.js");
|
|
109806
109869
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
109807
109870
|
},
|
|
109808
109871
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -110579,7 +110642,7 @@ Subcommands:
|
|
|
110579
110642
|
recover: {
|
|
110580
110643
|
handler: (ctx) => handleRecoverCommand(ctx.directory, ctx.args),
|
|
110581
110644
|
description: "Recover wedged coder settlements [task_id] [--force]",
|
|
110582
|
-
details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014
|
|
110645
|
+
details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014 and the settlement-wedge class (issue #2828): a task whose workflow drifted to idle or blocked while a COMMITTED accepted coder settlement and green post-settlement pre-check evidence still justify Stage A gets the missing stage_a_passed written directly, with a settlementRecovery marker and a stage_a_repair audit event in .swarm/events.jsonl; the architect-side audited escape hatch for the same receipts is the recover_stage_a_task tool. Note that --force affects only in-process settlement-WAL ownership and does not override Stage A wedge-classification refusals. Pass [task_id] to scope both phases to one task. Diagnose and repair emit per-category status explanations (missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge) with shell-correct invocation guidance per host \u2014 see docs/troubleshooting/recovery-runbook.md (#2665). Human-only.",
|
|
110583
110646
|
args: "[task_id] [--force]",
|
|
110584
110647
|
category: "utility",
|
|
110585
110648
|
toolPolicy: "human-only"
|