opencode-swarm 7.187.0 → 7.187.2
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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/pr-review-contract.d.ts +2 -2
- package/dist/cli/{auto-checkpoint-r69e82bh.js → auto-checkpoint-2xmptd5t.js} +8 -8
- package/dist/cli/{checkpoint-1sqwbgra.js → checkpoint-2y7z19y5.js} +14 -13
- package/dist/cli/{coder-settlement-b9qx0732.js → coder-settlement-s4d28fa6.js} +9 -9
- package/dist/cli/{config-doctor-s4fr5qwr.js → config-doctor-312afzhr.js} +13 -12
- package/dist/cli/{core-bezezjy9.js → core-2bywxc4w.js} +2 -2
- package/dist/cli/{curation-policy-2x2w3b57.js → curation-policy-sr29thf5.js} +5 -5
- package/dist/cli/{curator-drift-785xnxdv.js → curator-drift-xx8pp4g9.js} +6 -6
- package/dist/cli/{curator-w4hp7a10.js → curator-dvhf6jex.js} +37 -35
- package/dist/cli/{curator-llm-factory-p0wwyswg.js → curator-llm-factory-4g2nvr76.js} +37 -35
- package/dist/cli/doctor-knowledge-receipt-phase-id-m239pgbz.js +83 -0
- package/dist/cli/{evidence-summary-service-33qcm9xc.js → evidence-summary-service-9et04fjh.js} +17 -16
- package/dist/cli/{gate-evidence-9ehj968e.js → gate-evidence-73vj3bgm.js} +6 -6
- package/dist/cli/{guardrail-explain-5715fdzv.js → guardrail-explain-8n4fx9zv.js} +38 -36
- package/dist/cli/{guardrail-log-k1dfzfzm.js → guardrail-log-9gmfvnd7.js} +7 -7
- package/dist/cli/{guardrail-reset-nt88n9dm.js → guardrail-reset-k3mrq25e.js} +37 -35
- package/dist/cli/{hive-promoter-c8fjn186.js → hive-promoter-bp3rz0q6.js} +37 -35
- package/dist/cli/{index-df2p0k0s.js → index-26zs9wsj.js} +2 -2
- package/dist/cli/{index-ectvhv8e.js → index-310h5192.js} +2 -2
- package/dist/cli/{index-en7vzpeq.js → index-33345434.js} +4 -4
- package/dist/cli/{index-2wgvjwpr.js → index-3ckfawjf.js} +3 -3
- package/dist/cli/{index-b2je0z0t.js → index-3g3n9fjq.js} +4 -4
- package/dist/cli/{index-ycz8z2db.js → index-3y0nr248.js} +3 -3
- package/dist/cli/{index-v08ksq0b.js → index-4g39nne8.js} +2 -2
- package/dist/cli/{index-t3hcd6zz.js → index-6t7ygevg.js} +1 -1
- package/dist/cli/{index-5m56c5r6.js → index-7fxy1s86.js} +4 -4
- package/dist/cli/{index-pymr99as.js → index-85cx1mmb.js} +4 -4
- package/dist/cli/{index-2s8wdagg.js → index-9jafghwk.js} +37 -35
- package/dist/cli/{index-evy5yrsw.js → index-b308erem.js} +3 -3
- package/dist/cli/{index-qzgfheb4.js → index-b5tthmy2.js} +2 -2
- package/dist/cli/{index-yw1g78v9.js → index-bstjg81q.js} +1 -1
- package/dist/cli/{index-hvr82s1t.js → index-dqberkr3.js} +4 -4
- package/dist/cli/{index-jtncfvhe.js → index-dx6bhbd6.js} +1 -1
- package/dist/cli/{index-ww8payq9.js → index-e9ry78z5.js} +2 -2
- package/dist/cli/{index-1vvr69ka.js → index-efbhea00.js} +1 -1
- package/dist/cli/{index-xs96nry2.js → index-exj7czz9.js} +4 -4
- package/dist/cli/{index-sztx0vyt.js → index-f6pft90q.js} +3 -3
- package/dist/cli/{index-6ersmqjd.js → index-j5db3v56.js} +318 -767
- package/dist/cli/{index-pts38j6x.js → index-jh9nrshe.js} +2 -2
- package/dist/cli/{index-0yj79yk1.js → index-jyxgkp4a.js} +1 -1
- package/dist/cli/index-kc635w60.js +748 -0
- package/dist/cli/{index-cppqxjw9.js → index-m1vsqmyr.js} +1 -1
- package/dist/cli/index-m9zzj4ee.js +10 -0
- package/dist/cli/{index-rm676s0p.js → index-n45kz69m.js} +1 -1
- package/dist/cli/{index-dypmvvga.js → index-n55exns2.js} +1 -1
- package/dist/cli/{index-pfpnzf6w.js → index-n8kqhxay.js} +1 -1
- package/dist/cli/{index-bbqxt1p5.js → index-pqffq9mm.js} +3 -3
- package/dist/cli/{index-knbjtqwt.js → index-rtdxyjrg.js} +8 -6
- package/dist/cli/{index-r7gt2w1b.js → index-tkm2rj27.js} +1 -1
- package/dist/cli/{index-cx4s7cak.js → index-tmp07h7b.js} +39 -37
- package/dist/cli/{index-ta48pe8j.js → index-tngc1erw.js} +3 -3
- package/dist/cli/{index-akt0arnt.js → index-tq6sbcys.js} +105 -185
- package/dist/cli/{index-c8ffgcvz.js → index-v9y0230d.js} +1 -1
- package/dist/cli/{index-469xmpd6.js → index-w0bvez8c.js} +1 -1
- package/dist/cli/{index-4g6sw4eq.js → index-wpxy7099.js} +1 -1
- package/dist/cli/{index-yf0cc6c5.js → index-xs070yr9.js} +2 -2
- package/dist/cli/{index-zzxnssy3.js → index-xv0t2sed.js} +4 -4
- package/dist/cli/{index-krqq8kbq.js → index-y81jjedn.js} +6 -6
- package/dist/cli/{index-d6kvatwp.js → index-z04d01pv.js} +11 -16
- package/dist/cli/index.js +38 -36
- package/dist/cli/{knowledge-escalator-qttydcx2.js → knowledge-escalator-fnqctvxz.js} +14 -12
- package/dist/cli/{knowledge-events-4vf0vj82.js → knowledge-events-mr1vh3nb.js} +12 -10
- package/dist/cli/{knowledge-link-p2c8agc8.js → knowledge-link-93nzznwd.js} +4 -4
- package/dist/cli/{knowledge-store-bw1dk2eb.js → knowledge-store-dxy4s9k6.js} +5 -5
- package/dist/cli/{knowledge-validator-gefcc36h.js → knowledge-validator-gy39attk.js} +7 -7
- package/dist/cli/{mcp-d5p0k3p1.js → mcp-bxb59wsq.js} +1 -1
- package/dist/cli/{model-preflight-fmx49pwy.js → model-preflight-2kje0sp0.js} +37 -35
- package/dist/cli/{pending-delegations-8333cb3y.js → pending-delegations-fm2nx2k0.js} +7 -7
- package/dist/cli/{pr-subscriptions-p42ny2sn.js → pr-subscriptions-g4f9rehb.js} +7 -7
- package/dist/cli/{pr-workflow-gate-csy32z8w.js → pr-workflow-gate-qtq1wq95.js} +37 -35
- package/dist/cli/{runner-cbpr45cs.js → runner-verr6er5.js} +5 -5
- package/dist/cli/{scan-cursor-14mwymtz.js → scan-cursor-8taj944f.js} +6 -6
- package/dist/cli/{schema-6426g0gw.js → schema-yxq3bjmd.js} +2 -2
- package/dist/cli/{scope-persistence-avkv3s4m.js → scope-persistence-jppvjncr.js} +12 -12
- package/dist/cli/{server-d9rk2zeb.js → server-2s7wqg9e.js} +37 -35
- package/dist/cli/{skill-generator-epdvdsh5.js → skill-generator-pyf95aqw.js} +16 -14
- package/dist/cli/{snapshot-coordination-init-35f7wrqb.js → snapshot-coordination-init-8gbxw9sa.js} +37 -35
- package/dist/cli/{speckit-checkoff-erwa7fbj.js → speckit-checkoff-x2z0jamv.js} +4 -4
- package/dist/cli/{telemetry-2vwb3n42.js → telemetry-xwj899pd.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-3tqkw81h.js → worktree-collision-ownership-455bdcnk.js} +7 -7
- package/dist/cli/{worktree-isolation-0rrjqypt.js → worktree-isolation-8x4p7tvm.js} +37 -35
- package/dist/commands/doctor-knowledge-receipt-phase-id.d.ts +16 -0
- package/dist/hooks/extractors.d.ts +15 -0
- package/dist/hooks/knowledge-injector.d.ts +5 -0
- package/dist/hooks/knowledge-receipt-ledger.d.ts +50 -4
- package/dist/hooks/knowledge-receipt-observability.d.ts +1 -1
- package/dist/hooks/phase-complete-directive-gate.d.ts +18 -1
- package/dist/hooks/phase-directives.d.ts +7 -3
- package/dist/index.js +469 -460
- package/dist/state.d.ts +26 -3
- package/dist/tools/phase-complete.d.ts +2 -2
- package/dist/tools/repair-knowledge-receipt-ledger.d.ts +26 -0
- package/dist/utils/path.d.ts +23 -0
- package/package.json +1 -1
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
protectedRoots,
|
|
9
9
|
redactDecisionLineForArchive,
|
|
10
10
|
stableCanonicalStringify
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-3g3n9fjq.js";
|
|
12
12
|
import {
|
|
13
13
|
detectStraySwarmDirs,
|
|
14
14
|
readDoctorArtifact,
|
|
15
15
|
removeStraySwarmDir,
|
|
16
16
|
resolvePlanParallelizationFlag,
|
|
17
17
|
runConfigDoctor
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-pqffq9mm.js";
|
|
19
19
|
import {
|
|
20
20
|
archiveEvidence,
|
|
21
21
|
checkRequirementCoverage,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
sanitizeTaskId,
|
|
28
28
|
saveEvidence,
|
|
29
29
|
validateProjectRoot
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-f6pft90q.js";
|
|
31
31
|
import {
|
|
32
32
|
JAVA_SYMBOL_GRAMMAR,
|
|
33
33
|
LANGUAGE_REGISTRY,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
runEvaluation,
|
|
49
49
|
runExternalTool,
|
|
50
50
|
withDisposableWorktree
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-n55exns2.js";
|
|
52
52
|
import {
|
|
53
53
|
EvaluationTaskV1Schema,
|
|
54
54
|
GateAuditManifestV1Schema,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
saveGateAuditResult,
|
|
66
66
|
savePromotionDecision,
|
|
67
67
|
saveTaskSetSnapshot
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-26zs9wsj.js";
|
|
69
69
|
import {
|
|
70
70
|
canonicalHash,
|
|
71
71
|
canonicalJson,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
alreadyCuratedThisGeneration,
|
|
82
82
|
claimNextScanBatch,
|
|
83
83
|
resolveCohortId
|
|
84
|
-
} from "./index-
|
|
84
|
+
} from "./index-4g39nne8.js";
|
|
85
85
|
import {
|
|
86
86
|
CURATOR_CONSOLIDATION_PROMPT,
|
|
87
87
|
CURATOR_INIT_PROMPT,
|
|
@@ -100,13 +100,13 @@ import {
|
|
|
100
100
|
getGroupCommitWriter,
|
|
101
101
|
importLegacyJsonl,
|
|
102
102
|
readPriorDriftReports
|
|
103
|
-
} from "./index-
|
|
103
|
+
} from "./index-tkm2rj27.js";
|
|
104
104
|
import {
|
|
105
105
|
assertNoUnsettledCoderDispatch,
|
|
106
106
|
listCoderSettlementWalStates,
|
|
107
107
|
recoverCoderSettlement,
|
|
108
108
|
recoverStaleCoderSettlements
|
|
109
|
-
} from "./index-
|
|
109
|
+
} from "./index-85cx1mmb.js";
|
|
110
110
|
import {
|
|
111
111
|
BUNDLED_PROJECT_SKILL_ROOT,
|
|
112
112
|
DEFAULT_SKILL_MIN_CONFIDENCE,
|
|
@@ -127,11 +127,11 @@ import {
|
|
|
127
127
|
retireSkill,
|
|
128
128
|
selectCandidateEntries,
|
|
129
129
|
syncBundledProjectSkillsIfMissingAsync
|
|
130
|
-
} from "./index-
|
|
130
|
+
} from "./index-3ckfawjf.js";
|
|
131
131
|
import {
|
|
132
132
|
buildEscalationBriefing,
|
|
133
133
|
readRecentEscalations
|
|
134
|
-
} from "./index-
|
|
134
|
+
} from "./index-rtdxyjrg.js";
|
|
135
135
|
import {
|
|
136
136
|
parsePorcelainV2Snapshot,
|
|
137
137
|
resolveCommitCountSince,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
sweepStale,
|
|
181
181
|
unsubscribe,
|
|
182
182
|
updateSnapshot
|
|
183
|
-
} from "./index-
|
|
183
|
+
} from "./index-3y0nr248.js";
|
|
184
184
|
import {
|
|
185
185
|
WORKTREE_LIFECYCLE_LOCK_FILE,
|
|
186
186
|
recordWorktreeProvisioningOwner,
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
resolveWorkingDirectory,
|
|
209
209
|
swarmOverwriteCandidates,
|
|
210
210
|
trackedDirtyCandidates
|
|
211
|
-
} from "./index-
|
|
211
|
+
} from "./index-dqberkr3.js";
|
|
212
212
|
import {
|
|
213
213
|
MAX_TRANSIENT_RETRIES,
|
|
214
214
|
PlanRecoverySupersededError,
|
|
@@ -231,12 +231,11 @@ import {
|
|
|
231
231
|
readLaneEnvFileFromDiskSync,
|
|
232
232
|
resetToMainAfterMerge,
|
|
233
233
|
resetToRemoteBranch,
|
|
234
|
-
sanitizeContextText,
|
|
235
234
|
savePlan,
|
|
236
235
|
transientBackoff,
|
|
237
236
|
updateTaskStatus,
|
|
238
237
|
withPlanLifecycleLock
|
|
239
|
-
} from "./index-
|
|
238
|
+
} from "./index-z04d01pv.js";
|
|
240
239
|
import {
|
|
241
240
|
containsControlChars,
|
|
242
241
|
containsPathTraversal,
|
|
@@ -252,7 +251,7 @@ import {
|
|
|
252
251
|
resolveSpeckitProjection,
|
|
253
252
|
validateSpeckit,
|
|
254
253
|
writeProjectedSpecSync
|
|
255
|
-
} from "./index-
|
|
254
|
+
} from "./index-efbhea00.js";
|
|
256
255
|
import {
|
|
257
256
|
clearWorktreeMergeStatus,
|
|
258
257
|
getAllWorktreeMergeFailures,
|
|
@@ -283,7 +282,7 @@ import {
|
|
|
283
282
|
transitionTaskWorkflowEvidenceWithStatus,
|
|
284
283
|
withTaskEvidenceTransaction,
|
|
285
284
|
writeWorkflowWalFile
|
|
286
|
-
} from "./index-
|
|
285
|
+
} from "./index-b308erem.js";
|
|
287
286
|
import {
|
|
288
287
|
isPathUnderSwarmWorktreeBase,
|
|
289
288
|
listLiveLaneOwners,
|
|
@@ -292,7 +291,7 @@ import {
|
|
|
292
291
|
recordLiveLaneOwner,
|
|
293
292
|
removeWorktree,
|
|
294
293
|
resolveWorktreeBaseDir
|
|
295
|
-
} from "./index-
|
|
294
|
+
} from "./index-jh9nrshe.js";
|
|
296
295
|
import {
|
|
297
296
|
DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
|
|
298
297
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
@@ -326,26 +325,35 @@ import {
|
|
|
326
325
|
scanBackgroundCoderReservationsForAdmission,
|
|
327
326
|
scanDelegationsForRecovery,
|
|
328
327
|
sweepStaleDelegations
|
|
329
|
-
} from "./index-
|
|
328
|
+
} from "./index-exj7czz9.js";
|
|
330
329
|
import {
|
|
331
330
|
MAX_EVENT_LOG_ENTRIES,
|
|
332
331
|
_internals,
|
|
333
|
-
commitDisplayedMembership,
|
|
334
|
-
commitEmptyRetrieval,
|
|
335
|
-
commitGateReleaseBatch,
|
|
336
332
|
effectiveRetrievalOutcomes,
|
|
337
333
|
newTraceId,
|
|
338
|
-
queryHistoricalOutcomes,
|
|
339
|
-
queryLiveMemberships,
|
|
340
334
|
readAuthoritativeKnowledgeCounterRollups,
|
|
341
335
|
readKnowledgeCounterRollups,
|
|
342
336
|
readKnowledgeEvents,
|
|
343
|
-
reconcilePhaseClose,
|
|
344
337
|
recordHiveKnowledgeEvent,
|
|
345
338
|
recordKnowledgeEvent,
|
|
346
|
-
recordPhaseCloseIntent,
|
|
347
339
|
resolveKnowledgeEventsPath
|
|
348
|
-
} from "./index-
|
|
340
|
+
} from "./index-kc635w60.js";
|
|
341
|
+
import {
|
|
342
|
+
commitDisplayedMembership,
|
|
343
|
+
commitEmptyRetrieval,
|
|
344
|
+
commitGateReleaseBatch,
|
|
345
|
+
extractContextDecisions,
|
|
346
|
+
extractCurrentPhase,
|
|
347
|
+
extractCurrentPhaseFromPlan,
|
|
348
|
+
extractPhaseIdFromLabel,
|
|
349
|
+
queryHistoricalOutcomes,
|
|
350
|
+
queryLiveMemberships,
|
|
351
|
+
reconcilePhaseClose,
|
|
352
|
+
recordPhaseCloseIntent
|
|
353
|
+
} from "./index-j5db3v56.js";
|
|
354
|
+
import {
|
|
355
|
+
sanitizeContextText
|
|
356
|
+
} from "./index-m9zzj4ee.js";
|
|
349
357
|
import {
|
|
350
358
|
estimateCharsForTokens,
|
|
351
359
|
estimateTokens,
|
|
@@ -373,18 +381,18 @@ import {
|
|
|
373
381
|
validateActionableFields,
|
|
374
382
|
validateLesson,
|
|
375
383
|
validateSkillPath
|
|
376
|
-
} from "./index-
|
|
384
|
+
} from "./index-xv0t2sed.js";
|
|
377
385
|
import {
|
|
378
386
|
MAX_CURATION_PROPOSALS,
|
|
379
387
|
authorizeCuration,
|
|
380
388
|
buildConfigFingerprintInput
|
|
381
|
-
} from "./index-
|
|
389
|
+
} from "./index-n8kqhxay.js";
|
|
382
390
|
import {
|
|
383
391
|
cohortConfigFingerprint
|
|
384
392
|
} from "./index-rtry5xyf.js";
|
|
385
393
|
import {
|
|
386
394
|
resolveWorktreeIsolationConfig
|
|
387
|
-
} from "./index-
|
|
395
|
+
} from "./index-tngc1erw.js";
|
|
388
396
|
import {
|
|
389
397
|
RetrospectiveEvidenceSchema
|
|
390
398
|
} from "./index-kbkk7vnh.js";
|
|
@@ -396,7 +404,7 @@ import {
|
|
|
396
404
|
clearScopeBindings,
|
|
397
405
|
readAuthoritativeScopeBindingSet,
|
|
398
406
|
readDeclaredScopeFilesFromBindings
|
|
399
|
-
} from "./index-
|
|
407
|
+
} from "./index-310h5192.js";
|
|
400
408
|
import {
|
|
401
409
|
clearPlanLedgerForReset,
|
|
402
410
|
computePlanStructureHash,
|
|
@@ -412,7 +420,7 @@ import {
|
|
|
412
420
|
replayFromLedgerWithStatus,
|
|
413
421
|
resolvePlanningProfile,
|
|
414
422
|
takeSnapshotEvent
|
|
415
|
-
} from "./index-
|
|
423
|
+
} from "./index-7fxy1s86.js";
|
|
416
424
|
import {
|
|
417
425
|
CORE_EVENT_LOCKED,
|
|
418
426
|
appendCoreEventSync,
|
|
@@ -422,7 +430,7 @@ import {
|
|
|
422
430
|
hasSpecDriftAuditEvent,
|
|
423
431
|
hasTaskRepairAuditEvent,
|
|
424
432
|
readCoreEvents
|
|
425
|
-
} from "./index-
|
|
433
|
+
} from "./index-e9ry78z5.js";
|
|
426
434
|
import {
|
|
427
435
|
DEFAULT_QA_GATES,
|
|
428
436
|
computeProfileHash,
|
|
@@ -470,7 +478,7 @@ import {
|
|
|
470
478
|
observeModelLimitResolution,
|
|
471
479
|
observeStoreHealth,
|
|
472
480
|
readLearningHealth
|
|
473
|
-
} from "./index-
|
|
481
|
+
} from "./index-v9y0230d.js";
|
|
474
482
|
import {
|
|
475
483
|
appendKnowledge,
|
|
476
484
|
appendRejectedLesson,
|
|
@@ -501,7 +509,7 @@ import {
|
|
|
501
509
|
transactFile,
|
|
502
510
|
transactKnowledge,
|
|
503
511
|
wordBigrams
|
|
504
|
-
} from "./index-
|
|
512
|
+
} from "./index-y81jjedn.js";
|
|
505
513
|
import {
|
|
506
514
|
readTailJsonl,
|
|
507
515
|
readTailJsonlDetailed,
|
|
@@ -522,13 +530,13 @@ import {
|
|
|
522
530
|
resolveLinkDir,
|
|
523
531
|
sanitizeLinkId,
|
|
524
532
|
writeLinkPointer
|
|
525
|
-
} from "./index-
|
|
533
|
+
} from "./index-n45kz69m.js";
|
|
526
534
|
import {
|
|
527
535
|
atomicWriteFile
|
|
528
|
-
} from "./index-
|
|
536
|
+
} from "./index-6t7ygevg.js";
|
|
529
537
|
import {
|
|
530
538
|
withEvidenceLock
|
|
531
|
-
} from "./index-
|
|
539
|
+
} from "./index-jyxgkp4a.js";
|
|
532
540
|
import {
|
|
533
541
|
assertProjectRoot
|
|
534
542
|
} from "./index-t7hmqgjy.js";
|
|
@@ -542,7 +550,7 @@ import {
|
|
|
542
550
|
pseudonymousRef,
|
|
543
551
|
resolveLineageSalt,
|
|
544
552
|
telemetry
|
|
545
|
-
} from "./index-
|
|
553
|
+
} from "./index-dx6bhbd6.js";
|
|
546
554
|
import {
|
|
547
555
|
SESSION_KEY_SEPARATOR,
|
|
548
556
|
canonicalRootKey,
|
|
@@ -582,7 +590,7 @@ import {
|
|
|
582
590
|
loadGateOverrides,
|
|
583
591
|
loadPluginConfig,
|
|
584
592
|
loadPluginConfigWithMeta
|
|
585
|
-
} from "./index-
|
|
593
|
+
} from "./index-w0bvez8c.js";
|
|
586
594
|
import {
|
|
587
595
|
addDeferredWarning,
|
|
588
596
|
advisoryWarn,
|
|
@@ -614,7 +622,7 @@ import {
|
|
|
614
622
|
resolveContextWindow,
|
|
615
623
|
resolveGeneratedAgentRole,
|
|
616
624
|
stripKnownSwarmPrefix
|
|
617
|
-
} from "./index-
|
|
625
|
+
} from "./index-b5tthmy2.js";
|
|
618
626
|
import {
|
|
619
627
|
AGENT_TOOL_MAP,
|
|
620
628
|
ALL_AGENT_NAMES,
|
|
@@ -637,7 +645,7 @@ import {
|
|
|
637
645
|
init_agent_names,
|
|
638
646
|
init_constants,
|
|
639
647
|
init_tool_metadata
|
|
640
|
-
} from "./index-
|
|
648
|
+
} from "./index-bstjg81q.js";
|
|
641
649
|
import {
|
|
642
650
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
643
651
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -3403,7 +3411,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
|
|
|
3403
3411
|
return null;
|
|
3404
3412
|
throw error2;
|
|
3405
3413
|
}
|
|
3406
|
-
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-
|
|
3414
|
+
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-qtq1wq95.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
|
|
3407
3415
|
if (!legacy)
|
|
3408
3416
|
return null;
|
|
3409
3417
|
const namespace = workflowGateStateCoordinationNamespace(sessionID);
|
|
@@ -3490,7 +3498,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
|
|
|
3490
3498
|
let recoveryState = null;
|
|
3491
3499
|
if (!currentAuthoritative) {
|
|
3492
3500
|
if (options.allowSalvagedRead) {
|
|
3493
|
-
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-
|
|
3501
|
+
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-qtq1wq95.js");
|
|
3494
3502
|
recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
|
|
3495
3503
|
}
|
|
3496
3504
|
if (!recoveryState) {
|
|
@@ -15063,7 +15071,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
15063
15071
|
return extracted === expectedSessionId;
|
|
15064
15072
|
}
|
|
15065
15073
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
15066
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
15074
|
+
const collisionOwnership = await import("./worktree-collision-ownership-455bdcnk.js");
|
|
15067
15075
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
15068
15076
|
}
|
|
15069
15077
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -15489,7 +15497,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
15489
15497
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
15490
15498
|
if (laneProfile) {
|
|
15491
15499
|
try {
|
|
15492
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
15500
|
+
const { writeLaneProfileToDiskReal } = await import("./core-2bywxc4w.js");
|
|
15493
15501
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
15494
15502
|
} catch {}
|
|
15495
15503
|
}
|
|
@@ -16468,7 +16476,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
16468
16476
|
}
|
|
16469
16477
|
clearWorktreeMergeStatus(statusKey);
|
|
16470
16478
|
try {
|
|
16471
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
16479
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-2bywxc4w.js");
|
|
16472
16480
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
16473
16481
|
} catch {}
|
|
16474
16482
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -16688,101 +16696,6 @@ var CANDIDATE_TTL_MS = 10 * 60 * 1000;
|
|
|
16688
16696
|
// src/hooks/guardrails/index.ts
|
|
16689
16697
|
init_logger();
|
|
16690
16698
|
|
|
16691
|
-
// src/utils/context-decisions.ts
|
|
16692
|
-
function extractContextDecisions(content) {
|
|
16693
|
-
const decisions = [];
|
|
16694
|
-
const MAX_CONTENT_CHARS = 1e6;
|
|
16695
|
-
const bounded = content.length > MAX_CONTENT_CHARS ? content.slice(0, MAX_CONTENT_CHARS) : content;
|
|
16696
|
-
const lines = bounded.split(`
|
|
16697
|
-
`);
|
|
16698
|
-
let inDecisionsSection = false;
|
|
16699
|
-
let currentPhase = null;
|
|
16700
|
-
let lineNumber = 0;
|
|
16701
|
-
for (let i = 0;i < lines.length; i++) {
|
|
16702
|
-
const line = lines[i];
|
|
16703
|
-
lineNumber = i + 1;
|
|
16704
|
-
const phaseMatch = line.match(/^## Phase (\d+)/);
|
|
16705
|
-
if (phaseMatch) {
|
|
16706
|
-
currentPhase = parseInt(phaseMatch[1], 10);
|
|
16707
|
-
}
|
|
16708
|
-
if (line.trim() === "## Decisions") {
|
|
16709
|
-
inDecisionsSection = true;
|
|
16710
|
-
continue;
|
|
16711
|
-
}
|
|
16712
|
-
if (inDecisionsSection && line.startsWith("## ")) {
|
|
16713
|
-
break;
|
|
16714
|
-
}
|
|
16715
|
-
if (inDecisionsSection && line.trim().startsWith("- ")) {
|
|
16716
|
-
const text = line.trim().substring(2);
|
|
16717
|
-
const confirmed = text.includes("\u2705") || text.includes("[confirmed]");
|
|
16718
|
-
const timestampMatch = text.match(/\[(\d{4}-\d{2}-\d{2}T[\d:.]+Z?)\]/);
|
|
16719
|
-
const timestamp = timestampMatch ? timestampMatch[1] : null;
|
|
16720
|
-
const decisionPhaseMatch = text.match(/Phase (\d+)/);
|
|
16721
|
-
const decisionPhase = decisionPhaseMatch ? parseInt(decisionPhaseMatch[1], 10) : currentPhase;
|
|
16722
|
-
decisions.push({
|
|
16723
|
-
raw: line,
|
|
16724
|
-
text: text.replace(/\s*\[.*?\]\s*/g, "").trim(),
|
|
16725
|
-
phase: decisionPhase,
|
|
16726
|
-
confirmed,
|
|
16727
|
-
timestamp,
|
|
16728
|
-
line: lineNumber
|
|
16729
|
-
});
|
|
16730
|
-
}
|
|
16731
|
-
}
|
|
16732
|
-
return decisions;
|
|
16733
|
-
}
|
|
16734
|
-
|
|
16735
|
-
// src/hooks/extractors.ts
|
|
16736
|
-
function extractCurrentPhase(planContent) {
|
|
16737
|
-
if (!planContent) {
|
|
16738
|
-
return null;
|
|
16739
|
-
}
|
|
16740
|
-
planContent = sanitizeContextText(planContent);
|
|
16741
|
-
const lines = planContent.split(`
|
|
16742
|
-
`);
|
|
16743
|
-
for (let i = 0;i < Math.min(20, lines.length); i++) {
|
|
16744
|
-
const line = lines[i].trim();
|
|
16745
|
-
const progressMatch = line.match(/^## Phase (\d+):?\s*(.*?)\s*\[IN PROGRESS\]/i);
|
|
16746
|
-
if (progressMatch) {
|
|
16747
|
-
const phaseNum = progressMatch[1];
|
|
16748
|
-
const description = progressMatch[2]?.trim() || "";
|
|
16749
|
-
return `Phase ${phaseNum}: ${description} [IN PROGRESS]`;
|
|
16750
|
-
}
|
|
16751
|
-
}
|
|
16752
|
-
for (let i = 0;i < Math.min(20, lines.length); i++) {
|
|
16753
|
-
const line = lines[i].trim();
|
|
16754
|
-
const blockedMatch = line.match(/^## Phase (\d+):?\s*(.*?)\s*\[BLOCKED\]/i);
|
|
16755
|
-
if (blockedMatch) {
|
|
16756
|
-
const phaseNum = blockedMatch[1];
|
|
16757
|
-
const description = blockedMatch[2]?.trim() || "";
|
|
16758
|
-
return `Phase ${phaseNum}: ${description} [BLOCKED]`;
|
|
16759
|
-
}
|
|
16760
|
-
}
|
|
16761
|
-
for (let i = 0;i < Math.min(3, lines.length); i++) {
|
|
16762
|
-
const line = lines[i].trim();
|
|
16763
|
-
const phaseMatch = line.match(/Phase:\s*(\d+)/i);
|
|
16764
|
-
if (phaseMatch) {
|
|
16765
|
-
const phaseNum = phaseMatch[1];
|
|
16766
|
-
return `Phase ${phaseNum} [PENDING]`;
|
|
16767
|
-
}
|
|
16768
|
-
}
|
|
16769
|
-
return null;
|
|
16770
|
-
}
|
|
16771
|
-
function extractCurrentPhaseFromPlan(plan) {
|
|
16772
|
-
const phaseId = resolveActivePhaseId(plan);
|
|
16773
|
-
const phase = plan.phases.find((p) => p.id === phaseId);
|
|
16774
|
-
if (!phase)
|
|
16775
|
-
return null;
|
|
16776
|
-
const statusMap = {
|
|
16777
|
-
pending: "PENDING",
|
|
16778
|
-
in_progress: "IN PROGRESS",
|
|
16779
|
-
complete: "COMPLETE",
|
|
16780
|
-
blocked: "BLOCKED"
|
|
16781
|
-
};
|
|
16782
|
-
const statusText = statusMap[phase.status] || "PENDING";
|
|
16783
|
-
return sanitizeContextText(`Phase ${phase.id}: ${phase.name} [${statusText}]`);
|
|
16784
|
-
}
|
|
16785
|
-
|
|
16786
16699
|
// src/hooks/task-result-classifier.ts
|
|
16787
16700
|
var SUCCESS_STATES = new Set([
|
|
16788
16701
|
"completed",
|
|
@@ -24117,7 +24030,7 @@ function clearCriticalShownIds(sessionID) {
|
|
|
24117
24030
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
24118
24031
|
const map = new Map;
|
|
24119
24032
|
try {
|
|
24120
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
24033
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-g4f9rehb.js");
|
|
24121
24034
|
const records = await listActive2(directory);
|
|
24122
24035
|
for (const record of records) {
|
|
24123
24036
|
if (record.sessionID !== sessionID)
|
|
@@ -40625,9 +40538,9 @@ function hashContent(content) {
|
|
|
40625
40538
|
return createHash27("sha1").update(content).digest("hex");
|
|
40626
40539
|
}
|
|
40627
40540
|
async function loadConfigForPolicyCurator(directory) {
|
|
40628
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
40541
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
|
|
40629
40542
|
try {
|
|
40630
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
40543
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
|
|
40631
40544
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
40632
40545
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
40633
40546
|
} catch {
|
|
@@ -43685,7 +43598,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
|
|
|
43685
43598
|
const seam = _internals38.createCuratorLLMDelegate;
|
|
43686
43599
|
if (seam)
|
|
43687
43600
|
return seam(directory, mode, sessionId);
|
|
43688
|
-
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-
|
|
43601
|
+
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-4g2nvr76.js");
|
|
43689
43602
|
return createCuratorLLMDelegate(directory, mode, sessionId);
|
|
43690
43603
|
}
|
|
43691
43604
|
async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
|
|
@@ -44014,7 +43927,7 @@ async function runFinalizeStage(ctx) {
|
|
|
44014
43927
|
current_phase: phase.id
|
|
44015
43928
|
}) ?? `Phase ${phase.id}`;
|
|
44016
43929
|
receiptPhaseLabels.set(phase.id, label);
|
|
44017
|
-
const intent = await closeReceiptLifecycleInternals.recordPhaseCloseIntent(ctx.directory, label, ctx.options.sessionID);
|
|
43930
|
+
const intent = await closeReceiptLifecycleInternals.recordPhaseCloseIntent(ctx.directory, label, ctx.options.sessionID, undefined, phase.id);
|
|
44018
43931
|
if (!intent.ok) {
|
|
44019
43932
|
if (intent.detail === NO_RECEIPT_PHASE_CLOSE_SCOPE_DETAIL) {
|
|
44020
43933
|
receiptLifecycleSkippedPhaseIds.add(phase.id);
|
|
@@ -44072,7 +43985,7 @@ async function runFinalizeStage(ctx) {
|
|
|
44072
43985
|
if (receiptLifecycleSkippedPhaseIds.has(phase.id)) {
|
|
44073
43986
|
continue;
|
|
44074
43987
|
}
|
|
44075
|
-
const reconciled = await closeReceiptLifecycleInternals.reconcilePhaseClose(ctx.directory, receiptPhaseLabels.get(phase.id) ?? `Phase ${phase.id}`, true, ctx.options.sessionID);
|
|
43988
|
+
const reconciled = await closeReceiptLifecycleInternals.reconcilePhaseClose(ctx.directory, receiptPhaseLabels.get(phase.id) ?? `Phase ${phase.id}`, true, ctx.options.sessionID, undefined, phase.id);
|
|
44076
43989
|
if (!reconciled.ok) {
|
|
44077
43990
|
hardStopTerminalization(ctx, `Receipt phase-close reconciliation failed for phase ${phase.id}: ${reconciled.detail}`);
|
|
44078
43991
|
return;
|
|
@@ -44080,7 +43993,7 @@ async function runFinalizeStage(ctx) {
|
|
|
44080
43993
|
}
|
|
44081
43994
|
}
|
|
44082
43995
|
try {
|
|
44083
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
43996
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-yxq3bjmd.js");
|
|
44084
43997
|
const { config: pmLoadedConfig } = _internals38.loadPluginConfigWithMeta(ctx.directory);
|
|
44085
43998
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
44086
43999
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -46266,7 +46179,7 @@ function serializeAgentSession(s) {
|
|
|
46266
46179
|
}
|
|
46267
46180
|
async function writeSnapshot(directory, state) {
|
|
46268
46181
|
try {
|
|
46269
|
-
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-
|
|
46182
|
+
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-8gbxw9sa.js");
|
|
46270
46183
|
await ensureSnapshotCoordinationReady(directory);
|
|
46271
46184
|
const snapshot = {
|
|
46272
46185
|
version: 3,
|
|
@@ -49282,7 +49195,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
49282
49195
|
};
|
|
49283
49196
|
}
|
|
49284
49197
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
49285
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
49198
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
|
|
49286
49199
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
49287
49200
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
49288
49201
|
if (sweepConfig?.enabled === false)
|
|
@@ -50406,7 +50319,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
50406
50319
|
}
|
|
50407
50320
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
50408
50321
|
try {
|
|
50409
|
-
const skillModule = await import("./skill-generator-
|
|
50322
|
+
const skillModule = await import("./skill-generator-pyf95aqw.js");
|
|
50410
50323
|
for (const cand of skillCandidates) {
|
|
50411
50324
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
50412
50325
|
continue;
|
|
@@ -50878,7 +50791,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
50878
50791
|
} catch {}
|
|
50879
50792
|
}
|
|
50880
50793
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
50881
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
50794
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-fnqctvxz.js");
|
|
50882
50795
|
for (const { id } of contradictedEntries) {
|
|
50883
50796
|
try {
|
|
50884
50797
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -51710,7 +51623,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
51710
51623
|
warnings.push("Failed to collect knowledge summary.");
|
|
51711
51624
|
}
|
|
51712
51625
|
try {
|
|
51713
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
51626
|
+
const { getScanStatus } = await import("./scan-cursor-8taj944f.js");
|
|
51714
51627
|
const scanStatus = await getScanStatus(directory);
|
|
51715
51628
|
if (scanStatus.remaining_estimate > 0) {
|
|
51716
51629
|
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.`);
|
|
@@ -51882,9 +51795,9 @@ var _internals56 = {
|
|
|
51882
51795
|
verifyPostMortemKnowledgeActions,
|
|
51883
51796
|
repairPostMortemActions,
|
|
51884
51797
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
51885
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
51798
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
|
|
51886
51799
|
try {
|
|
51887
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
51800
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
|
|
51888
51801
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
51889
51802
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
51890
51803
|
} catch {
|
|
@@ -51892,11 +51805,11 @@ var _internals56 = {
|
|
|
51892
51805
|
}
|
|
51893
51806
|
},
|
|
51894
51807
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
51895
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
51808
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-dvhf6jex.js");
|
|
51896
51809
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
51897
51810
|
},
|
|
51898
51811
|
checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
|
|
51899
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
51812
|
+
const { checkHivePromotions } = await import("./hive-promoter-bp3rz0q6.js");
|
|
51900
51813
|
return checkHivePromotions(entries2, knowledgeConfig, directory);
|
|
51901
51814
|
},
|
|
51902
51815
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -51905,7 +51818,7 @@ var _internals56 = {
|
|
|
51905
51818
|
activateProposal,
|
|
51906
51819
|
listSkills: listSkills2,
|
|
51907
51820
|
sanitizeSlug
|
|
51908
|
-
} = await import("./skill-generator-
|
|
51821
|
+
} = await import("./skill-generator-pyf95aqw.js");
|
|
51909
51822
|
const result = {
|
|
51910
51823
|
approved: [],
|
|
51911
51824
|
rejected: [],
|
|
@@ -51947,7 +51860,7 @@ var _internals56 = {
|
|
|
51947
51860
|
return result;
|
|
51948
51861
|
},
|
|
51949
51862
|
readPriorDriftReports: async (directory) => {
|
|
51950
|
-
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-
|
|
51863
|
+
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-xx8pp4g9.js");
|
|
51951
51864
|
return readPriorDriftReports2(directory);
|
|
51952
51865
|
},
|
|
51953
51866
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -60391,7 +60304,7 @@ function wireCloseInternals() {
|
|
|
60391
60304
|
archiveEvidence,
|
|
60392
60305
|
endAgentSession,
|
|
60393
60306
|
flushAndDrainTelemetry: async () => {
|
|
60394
|
-
const { flushAndDrainTelemetry } = await import("./telemetry-
|
|
60307
|
+
const { flushAndDrainTelemetry } = await import("./telemetry-xwj899pd.js");
|
|
60395
60308
|
return flushAndDrainTelemetry();
|
|
60396
60309
|
},
|
|
60397
60310
|
finalizeContextTelemetry,
|
|
@@ -61750,9 +61663,9 @@ var _internals66 = {
|
|
|
61750
61663
|
loadPluginConfigWithMeta,
|
|
61751
61664
|
loadCuratorDeps: async () => {
|
|
61752
61665
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
|
|
61753
|
-
import("./schema-
|
|
61754
|
-
import("./curator-
|
|
61755
|
-
import("./curator-llm-factory-
|
|
61666
|
+
import("./schema-yxq3bjmd.js"),
|
|
61667
|
+
import("./curator-dvhf6jex.js"),
|
|
61668
|
+
import("./curator-llm-factory-4g2nvr76.js")
|
|
61756
61669
|
]);
|
|
61757
61670
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
|
|
61758
61671
|
}
|
|
@@ -64150,7 +64063,7 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64150
64063
|
let scanCompleted = false;
|
|
64151
64064
|
let scanRemaining = 0;
|
|
64152
64065
|
try {
|
|
64153
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
64066
|
+
const { getScanStatus } = await import("./scan-cursor-8taj944f.js");
|
|
64154
64067
|
const status = await getScanStatus(directory);
|
|
64155
64068
|
scanGeneration = status.generation;
|
|
64156
64069
|
scanCompleted = status.completed;
|
|
@@ -64158,19 +64071,19 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64158
64071
|
} catch {}
|
|
64159
64072
|
let configMatch = null;
|
|
64160
64073
|
try {
|
|
64161
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
64074
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-93nzznwd.js");
|
|
64162
64075
|
if (isLinked2(directory)) {
|
|
64163
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
64076
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
|
|
64164
64077
|
let config;
|
|
64165
64078
|
try {
|
|
64166
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
64079
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
|
|
64167
64080
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
64168
64081
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
64169
64082
|
} catch {
|
|
64170
64083
|
config = KnowledgeConfigSchema2.parse({});
|
|
64171
64084
|
}
|
|
64172
64085
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
64173
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
64086
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-sr29thf5.js");
|
|
64174
64087
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
64175
64088
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
64176
64089
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -65619,7 +65532,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65619
65532
|
const result = runConfigDoctor(config, directory, planParallelizationEnabled);
|
|
65620
65533
|
let output;
|
|
65621
65534
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
65622
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
65535
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-312afzhr.js");
|
|
65623
65536
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
65624
65537
|
applyLossy: true
|
|
65625
65538
|
});
|
|
@@ -65657,7 +65570,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65657
65570
|
`;
|
|
65658
65571
|
}
|
|
65659
65572
|
try {
|
|
65660
|
-
const { runModelPreflight } = await import("./model-preflight-
|
|
65573
|
+
const { runModelPreflight } = await import("./model-preflight-2kje0sp0.js");
|
|
65661
65574
|
const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
|
|
65662
65575
|
const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
|
|
65663
65576
|
const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
|
|
@@ -65690,6 +65603,10 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65690
65603
|
output += "\nDispatching these roles will fail permanently. Fix the effective model in opencode-swarm.json \u2014 the matching swarm override wins over top-level `agents.<role>.model`. `fallback_models` only serve transient runtime failures.\n";
|
|
65691
65604
|
}
|
|
65692
65605
|
} catch {}
|
|
65606
|
+
try {
|
|
65607
|
+
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-m239pgbz.js");
|
|
65608
|
+
output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
|
|
65609
|
+
} catch {}
|
|
65693
65610
|
const strayDirs = detectStraySwarmDirs(directory);
|
|
65694
65611
|
if (strayDirs.length > 0) {
|
|
65695
65612
|
if (enableAutoFix) {
|
|
@@ -66584,7 +66501,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
66584
66501
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
66585
66502
|
}
|
|
66586
66503
|
async function handleEvidenceSummaryCommand(directory) {
|
|
66587
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
66504
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-9et04fjh.js");
|
|
66588
66505
|
const artifact = await buildEvidenceSummary(directory);
|
|
66589
66506
|
if (!artifact) {
|
|
66590
66507
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -82781,10 +82698,11 @@ function pickDirectiveRepresentatives(candidates) {
|
|
|
82781
82698
|
}
|
|
82782
82699
|
return [...byEntry.values()];
|
|
82783
82700
|
}
|
|
82784
|
-
async function readPhaseDirectivesToVerify(directory, phaseLabel) {
|
|
82701
|
+
async function readPhaseDirectivesToVerify(directory, phaseLabel, phaseId) {
|
|
82785
82702
|
try {
|
|
82786
82703
|
const result = await queryLiveMemberships(directory, {
|
|
82787
82704
|
phase: phaseLabel || undefined,
|
|
82705
|
+
...phaseId !== undefined ? { phase_id: phaseId } : {},
|
|
82788
82706
|
include_terminal: true,
|
|
82789
82707
|
include_phase_closed: false
|
|
82790
82708
|
});
|
|
@@ -83190,10 +83108,7 @@ function fingerprintInstructionInputs(inputs) {
|
|
|
83190
83108
|
].join("|");
|
|
83191
83109
|
}
|
|
83192
83110
|
function phaseNumberOf(label) {
|
|
83193
|
-
|
|
83194
|
-
return;
|
|
83195
|
-
const m = /^Phase\s+(\d+)/i.exec(label);
|
|
83196
|
-
return m ? Number(m[1]) : undefined;
|
|
83111
|
+
return extractPhaseIdFromLabel(label);
|
|
83197
83112
|
}
|
|
83198
83113
|
function recordInjectionSkip(directory, reason, detail) {
|
|
83199
83114
|
const context = {};
|
|
@@ -83429,6 +83344,7 @@ async function injectForDelegate(params) {
|
|
|
83429
83344
|
session_id: sessionId,
|
|
83430
83345
|
exposure_kind: "delegate_directive",
|
|
83431
83346
|
phase: params.phase,
|
|
83347
|
+
phase_id: params.phase_id,
|
|
83432
83348
|
task_id: params.taskId,
|
|
83433
83349
|
agent,
|
|
83434
83350
|
cohort_id: cohortId,
|
|
@@ -83538,6 +83454,7 @@ async function injectForDelegateIntoMessages(directory, config, output, agentNam
|
|
|
83538
83454
|
}
|
|
83539
83455
|
const plan = await loadPlan(directory).catch(() => null);
|
|
83540
83456
|
const phaseLabel = plan ? extractCurrentPhaseFromPlan(plan) ?? `Phase ${plan.current_phase ?? 1}` : undefined;
|
|
83457
|
+
const phaseId = phaseLabel !== undefined ? extractPhaseIdFromLabel(phaseLabel) : undefined;
|
|
83541
83458
|
const { entries: entries2, trace_id } = await injectForDelegate({
|
|
83542
83459
|
directory,
|
|
83543
83460
|
agent: agentName,
|
|
@@ -83545,6 +83462,7 @@ async function injectForDelegateIntoMessages(directory, config, output, agentNam
|
|
|
83545
83462
|
taskTitle,
|
|
83546
83463
|
sessionId,
|
|
83547
83464
|
phase: phaseLabel,
|
|
83465
|
+
...phaseId !== undefined ? { phase_id: phaseId } : {},
|
|
83548
83466
|
config
|
|
83549
83467
|
});
|
|
83550
83468
|
const block = buildDelegateDirectiveBlock(entries2, config, trace_id, charBudget);
|
|
@@ -83553,7 +83471,7 @@ async function injectForDelegateIntoMessages(directory, config, output, agentNam
|
|
|
83553
83471
|
if (block)
|
|
83554
83472
|
injectKnowledgeMessage(output, block, sessionId);
|
|
83555
83473
|
if (isReviewer && !alreadyVerified) {
|
|
83556
|
-
const toVerify = await readPhaseDirectivesToVerify(directory, phaseLabel);
|
|
83474
|
+
const toVerify = await readPhaseDirectivesToVerify(directory, phaseLabel, phaseId);
|
|
83557
83475
|
const complianceBlock = buildDirectiveComplianceBlock(toVerify, Math.min(config.inject_char_budget ?? DIRECTIVE_COMPLIANCE_DEFAULT_CHAR_BUDGET, DIRECTIVE_COMPLIANCE_HARD_CHAR_CAP));
|
|
83558
83476
|
if (complianceBlock) {
|
|
83559
83477
|
injectReviewerComplianceMessage(output, complianceBlock, sessionId);
|
|
@@ -83993,11 +83911,13 @@ ${freshPreamble}` : `<curator_briefing>${truncatedBriefing}</curator_briefing>`;
|
|
|
83993
83911
|
const byId = new Map(filteredEntries.map((entry) => [entry.id, entry]));
|
|
83994
83912
|
const cohortId = await _internals87.ensureCohortIdCached(directory, sessionId);
|
|
83995
83913
|
const sourceLinkId = _internals87.readLinkPointer(directory)?.linkId;
|
|
83914
|
+
const architectPhaseId = extractPhaseIdFromLabel(retrievalCtx.currentPhase);
|
|
83996
83915
|
const membership = await _internals87.commitDisplayedMembership(directory, {
|
|
83997
83916
|
trace_id: search.trace_id,
|
|
83998
83917
|
session_id: sessionId,
|
|
83999
83918
|
exposure_kind: "architect_directive",
|
|
84000
83919
|
phase: retrievalCtx.currentPhase,
|
|
83920
|
+
...architectPhaseId !== undefined ? { phase_id: architectPhaseId } : {},
|
|
84001
83921
|
task_id: retrievalCtx.taskId,
|
|
84002
83922
|
agent: "architect",
|
|
84003
83923
|
cohort_id: cohortId,
|
|
@@ -91032,7 +90952,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
91032
90952
|
}
|
|
91033
90953
|
const sdkOpts = signal ? { signal } : {};
|
|
91034
90954
|
try {
|
|
91035
|
-
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-
|
|
90955
|
+
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-9jafghwk.js");
|
|
91036
90956
|
const createResult = await client.session.create({
|
|
91037
90957
|
...sessionId ? {
|
|
91038
90958
|
body: {
|
|
@@ -93369,7 +93289,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
|
|
|
93369
93289
|
clearedEvents: []
|
|
93370
93290
|
};
|
|
93371
93291
|
try {
|
|
93372
|
-
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-
|
|
93292
|
+
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-qtq1wq95.js");
|
|
93373
93293
|
await cancelPrFeedbackPublication2(directory, sessionID, reason);
|
|
93374
93294
|
} catch (err) {
|
|
93375
93295
|
warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -107110,7 +107030,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
|
|
|
107110
107030
|
if (!input.dispatcher) {
|
|
107111
107031
|
throw new Error("no evaluation dispatcher available (cannot run validation)");
|
|
107112
107032
|
}
|
|
107113
|
-
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-
|
|
107033
|
+
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-verr6er5.js");
|
|
107114
107034
|
const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
|
|
107115
107035
|
const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals128.evaluateCandidateV1({
|
|
107116
107036
|
projectRoot: input.directory,
|
|
@@ -109739,7 +109659,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
109739
109659
|
async function handleHelpCommand(ctx) {
|
|
109740
109660
|
const targetCommand = ctx.args.join(" ");
|
|
109741
109661
|
if (!targetCommand) {
|
|
109742
|
-
const { buildHelpText } = await import("./index-
|
|
109662
|
+
const { buildHelpText } = await import("./index-tmp07h7b.js");
|
|
109743
109663
|
return buildHelpText();
|
|
109744
109664
|
}
|
|
109745
109665
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -109753,7 +109673,7 @@ async function handleHelpCommand(ctx) {
|
|
|
109753
109673
|
> Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
|
|
109754
109674
|
}
|
|
109755
109675
|
const similar = _internals27.findSimilarCommands(targetCommand);
|
|
109756
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
109676
|
+
const { buildHelpText: fullHelp } = await import("./index-tmp07h7b.js");
|
|
109757
109677
|
if (similar.length > 0) {
|
|
109758
109678
|
return `Command '/swarm ${targetCommand}' not found.
|
|
109759
109679
|
|
|
@@ -110081,7 +110001,7 @@ var COMMAND_REGISTRY = {
|
|
|
110081
110001
|
},
|
|
110082
110002
|
"guardrail explain": {
|
|
110083
110003
|
handler: async (ctx) => {
|
|
110084
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
110004
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-8n4fx9zv.js");
|
|
110085
110005
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
110086
110006
|
},
|
|
110087
110007
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -110091,7 +110011,7 @@ var COMMAND_REGISTRY = {
|
|
|
110091
110011
|
},
|
|
110092
110012
|
"guardrail reset": {
|
|
110093
110013
|
handler: async (ctx) => {
|
|
110094
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
110014
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-k3mrq25e.js");
|
|
110095
110015
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
110096
110016
|
},
|
|
110097
110017
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -110112,7 +110032,7 @@ var COMMAND_REGISTRY = {
|
|
|
110112
110032
|
},
|
|
110113
110033
|
"guardrail-log": {
|
|
110114
110034
|
handler: async (ctx) => {
|
|
110115
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
110035
|
+
const { handleGuardrailLog } = await import("./guardrail-log-9gmfvnd7.js");
|
|
110116
110036
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
110117
110037
|
},
|
|
110118
110038
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|