opencode-swarm 7.148.2 → 7.148.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background/delegation-health.d.ts +100 -0
- package/dist/background/pending-delegations.d.ts +97 -0
- package/dist/background/queue.d.ts +45 -7
- package/dist/background/worker.d.ts +24 -3
- package/dist/cli/{config-doctor-6danhdcy.js → config-doctor-ycf9ws4p.js} +2 -2
- package/dist/cli/{core-0ghwny8q.js → core-a1bhs3xa.js} +1 -1
- package/dist/cli/{curation-policy-hkdghd3a.js → curation-policy-fbvctttr.js} +5 -5
- package/dist/cli/{curator-wvm7qbkk.js → curator-8y57gq1g.js} +26 -26
- package/dist/cli/{curator-llm-factory-6n47j5qn.js → curator-llm-factory-rj4vw5fd.js} +26 -26
- package/dist/cli/{evidence-summary-service-0xwrkmf9.js → evidence-summary-service-wkp0gfpd.js} +10 -10
- package/dist/cli/{gate-evidence-6e5yhcy6.js → gate-evidence-qty15skw.js} +5 -5
- package/dist/cli/{guardrail-explain-tgv7rvap.js → guardrail-explain-2n3ahs0m.js} +27 -27
- package/dist/cli/{guardrail-log-k0zk6rbs.js → guardrail-log-bmxrb3r2.js} +3 -3
- package/dist/cli/{guardrail-reset-4fw16xmb.js → guardrail-reset-be3sx0am.js} +26 -26
- package/dist/cli/{hive-promoter-zemwxxw1.js → hive-promoter-te5d78yt.js} +26 -26
- package/dist/cli/{index-x9q0b3a8.js → index-0045n7qe.js} +2 -2
- package/dist/cli/{index-7jaq84cg.js → index-1vbmra32.js} +1 -1
- package/dist/cli/{index-q6kscnts.js → index-622phhp5.js} +3 -3
- package/dist/cli/{index-84ytts36.js → index-6kw1a3bk.js} +4 -4
- package/dist/cli/{index-nqwn8sf0.js → index-7rerkeg8.js} +1 -1
- package/dist/cli/{index-x4kgn37c.js → index-8djgxw2w.js} +2 -2
- package/dist/cli/{index-ndqhtgrc.js → index-8kzrgjt6.js} +1 -1
- package/dist/cli/{index-x9jppg8b.js → index-9m8jy3av.js} +2 -2
- package/dist/cli/{index-xn7h24x4.js → index-9qzkcmry.js} +3 -3
- package/dist/cli/{index-5vyej8pc.js → index-b1c83zf9.js} +5 -5
- package/dist/cli/{index-s0nss8c4.js → index-b94487xm.js} +1 -1
- package/dist/cli/{index-pzt7ed53.js → index-bccfz7br.js} +4 -4
- package/dist/cli/{index-mbcyz77e.js → index-gswx08pr.js} +4 -4
- package/dist/cli/{index-hsq8nyen.js → index-hj1xd3pg.js} +265 -83
- package/dist/cli/{index-ebt47fnp.js → index-j382eh60.js} +1 -1
- package/dist/cli/{index-m5z2fgs4.js → index-k1s8gxjh.js} +1 -1
- package/dist/cli/{index-zpn3wqvp.js → index-kg4knw6r.js} +2 -2
- package/dist/cli/{index-r9g7ymv2.js → index-nq4tkfpc.js} +1 -1
- package/dist/cli/{index-k2ad2vtb.js → index-qbvq3xt2.js} +1 -1
- package/dist/cli/{index-3pbvdde0.js → index-qpewzk0q.js} +2 -2
- package/dist/cli/{index-2n9rwvcc.js → index-qwmrt51t.js} +1 -1
- package/dist/cli/{index-03wz9h63.js → index-rzzwem6x.js} +28 -28
- package/dist/cli/{index-s0s1e5jp.js → index-skgeytf6.js} +6 -6
- package/dist/cli/{index-wgrvq2bc.js → index-sxtz2d26.js} +6 -6
- package/dist/cli/{index-092deqxs.js → index-t25evmna.js} +400 -12
- package/dist/cli/{index-2zz8b0rb.js → index-vhefvcta.js} +2 -2
- package/dist/cli/{index-rsn4jm90.js → index-vrp2zva8.js} +1 -1
- package/dist/cli/{index-nxydm56k.js → index-w00hn0dd.js} +2 -2
- package/dist/cli/{index-crpkb5x6.js → index-ye7kpzrk.js} +5 -5
- package/dist/cli/{index-mgcffsk0.js → index-yq89bgnz.js} +1 -1
- package/dist/cli/index.js +26 -26
- package/dist/cli/{knowledge-escalator-rfw35yt1.js → knowledge-escalator-9w53tx55.js} +10 -10
- package/dist/cli/{knowledge-events-wmjm5wn6.js → knowledge-events-my31zepa.js} +8 -8
- package/dist/cli/{knowledge-link-5dctq0ax.js → knowledge-link-spw879rs.js} +4 -4
- package/dist/cli/{knowledge-store-f2ev6s5p.js → knowledge-store-yf59mxp5.js} +5 -5
- package/dist/cli/{knowledge-validator-6cmwpx9e.js → knowledge-validator-8n569fp4.js} +7 -7
- package/dist/cli/{pending-delegations-h4gr264y.js → pending-delegations-f4wvyzbf.js} +10 -2
- package/dist/cli/{pr-subscriptions-9mg6mwc0.js → pr-subscriptions-f4xw1rxy.js} +2 -2
- package/dist/cli/{runner-9g2pcg10.js → runner-rk26nk58.js} +5 -5
- package/dist/cli/{scan-cursor-x1ma7edk.js → scan-cursor-www6dbn8.js} +6 -6
- package/dist/cli/{schema-g5ggmb47.js → schema-vyg0k7rh.js} +1 -1
- package/dist/cli/{scope-persistence-gt0zpp6a.js → scope-persistence-3qbr019s.js} +6 -6
- package/dist/cli/{skill-generator-q6m110d5.js → skill-generator-fh8emssb.js} +12 -12
- package/dist/cli/{worktree-collision-ownership-e0p490vw.js → worktree-collision-ownership-wqy7mgb3.js} +2 -2
- package/dist/cli/{worktree-isolation-akwwt8n5.js → worktree-isolation-sbsdx1yj.js} +26 -26
- package/dist/hooks/delegation-gate.d.ts +1 -0
- package/dist/index.js +16 -15
- package/dist/services/status-service.d.ts +55 -3
- package/package.json +1 -1
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
resolveExecutableFromPath,
|
|
7
7
|
runEvaluation,
|
|
8
8
|
runExternalTool
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-j382eh60.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeToolNameLowerCase,
|
|
12
12
|
stableCanonicalStringify
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-b94487xm.js";
|
|
14
14
|
import {
|
|
15
15
|
detectStraySwarmDirs,
|
|
16
16
|
readDoctorArtifact,
|
|
17
17
|
removeStraySwarmDir,
|
|
18
18
|
runConfigDoctor
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-1vbmra32.js";
|
|
20
20
|
import {
|
|
21
21
|
MAX_TRANSIENT_RETRIES,
|
|
22
22
|
archiveEvidence,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
updateTaskStatus,
|
|
63
63
|
validateProjectRoot,
|
|
64
64
|
validateSymlinkBoundary
|
|
65
|
-
} from "./index-
|
|
65
|
+
} from "./index-b1c83zf9.js";
|
|
66
66
|
import {
|
|
67
67
|
EvaluationTaskV1Schema,
|
|
68
68
|
GateAuditManifestV1Schema,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
saveGateAuditResult,
|
|
80
80
|
savePromotionDecision,
|
|
81
81
|
saveTaskSetSnapshot
|
|
82
|
-
} from "./index-
|
|
82
|
+
} from "./index-8djgxw2w.js";
|
|
83
83
|
import {
|
|
84
84
|
loadDatabaseCtor
|
|
85
85
|
} from "./index-134d35c1.js";
|
|
@@ -105,12 +105,12 @@ import {
|
|
|
105
105
|
} from "./index-y8552snf.js";
|
|
106
106
|
import {
|
|
107
107
|
readRecentEscalations
|
|
108
|
-
} from "./index-
|
|
108
|
+
} from "./index-ye7kpzrk.js";
|
|
109
109
|
import {
|
|
110
110
|
alreadyCuratedThisGeneration,
|
|
111
111
|
claimNextScanBatch,
|
|
112
112
|
resolveCohortId
|
|
113
|
-
} from "./index-
|
|
113
|
+
} from "./index-w00hn0dd.js";
|
|
114
114
|
import {
|
|
115
115
|
CURATOR_INIT_PROMPT,
|
|
116
116
|
CURATOR_PHASE_PROMPT,
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
listActive,
|
|
160
160
|
subscribe,
|
|
161
161
|
unsubscribe
|
|
162
|
-
} from "./index-
|
|
162
|
+
} from "./index-qwmrt51t.js";
|
|
163
163
|
import {
|
|
164
164
|
BUNDLED_PROJECT_SKILL_ROOT,
|
|
165
165
|
DEFAULT_SKILL_MIN_CONFIDENCE,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
retireSkill,
|
|
181
181
|
selectCandidateEntries,
|
|
182
182
|
syncBundledProjectSkillsIfMissingAsync
|
|
183
|
-
} from "./index-
|
|
183
|
+
} from "./index-bccfz7br.js";
|
|
184
184
|
import {
|
|
185
185
|
appendUnactionable,
|
|
186
186
|
quarantineEntry,
|
|
@@ -191,11 +191,11 @@ import {
|
|
|
191
191
|
validateActionableFields,
|
|
192
192
|
validateLesson,
|
|
193
193
|
validateSkillPath
|
|
194
|
-
} from "./index-
|
|
194
|
+
} from "./index-gswx08pr.js";
|
|
195
195
|
import {
|
|
196
196
|
authorizeCuration,
|
|
197
197
|
buildConfigFingerprintInput
|
|
198
|
-
} from "./index-
|
|
198
|
+
} from "./index-nq4tkfpc.js";
|
|
199
199
|
import {
|
|
200
200
|
cohortConfigFingerprint
|
|
201
201
|
} from "./index-rtry5xyf.js";
|
|
@@ -213,9 +213,13 @@ import {
|
|
|
213
213
|
MAX_RECOVERY_LEDGER_BYTES,
|
|
214
214
|
collectDelegationLedgerHealth,
|
|
215
215
|
findByBatchId,
|
|
216
|
+
maintainBackgroundDelegations,
|
|
217
|
+
readDelegationHealthArtifact,
|
|
216
218
|
readDelegations,
|
|
219
|
+
scanBackgroundCoderReservationsForAdmission,
|
|
220
|
+
scanDelegationsForRecovery,
|
|
217
221
|
sweepStaleDelegations
|
|
218
|
-
} from "./index-
|
|
222
|
+
} from "./index-t25evmna.js";
|
|
219
223
|
import {
|
|
220
224
|
WORKTREE_LIFECYCLE_LOCK_FILE,
|
|
221
225
|
recordWorktreeProvisioningOwner,
|
|
@@ -248,18 +252,18 @@ import {
|
|
|
248
252
|
transitionTaskWorkflowEvidence,
|
|
249
253
|
withTaskEvidenceTransaction,
|
|
250
254
|
writeWorkflowWalFile
|
|
251
|
-
} from "./index-
|
|
255
|
+
} from "./index-622phhp5.js";
|
|
252
256
|
import {
|
|
253
257
|
provisionWorktree,
|
|
254
258
|
removeWorktree
|
|
255
|
-
} from "./index-
|
|
259
|
+
} from "./index-8kzrgjt6.js";
|
|
256
260
|
import {
|
|
257
261
|
MAX_PENDING_SCOPE_BINDINGS,
|
|
258
262
|
canonicalWorkspaceIdentity,
|
|
259
263
|
clearAllScopes,
|
|
260
264
|
clearScopeBindingFromDisk,
|
|
261
265
|
clearScopeBindings
|
|
262
|
-
} from "./index-
|
|
266
|
+
} from "./index-6kw1a3bk.js";
|
|
263
267
|
import {
|
|
264
268
|
appendLedgerEvent,
|
|
265
269
|
computePlanHash,
|
|
@@ -274,7 +278,7 @@ import {
|
|
|
274
278
|
readPlanEpochIdentity,
|
|
275
279
|
replayFromLedgerWithStatus,
|
|
276
280
|
takeSnapshotEvent
|
|
277
|
-
} from "./index-
|
|
281
|
+
} from "./index-9m8jy3av.js";
|
|
278
282
|
import {
|
|
279
283
|
isPathWithinDeclaredScope,
|
|
280
284
|
sanitizeDiagnosticText
|
|
@@ -326,7 +330,7 @@ import {
|
|
|
326
330
|
transactFile,
|
|
327
331
|
transactKnowledge,
|
|
328
332
|
wordBigrams
|
|
329
|
-
} from "./index-
|
|
333
|
+
} from "./index-sxtz2d26.js";
|
|
330
334
|
import {
|
|
331
335
|
MAX_EVENT_LOG_ENTRIES,
|
|
332
336
|
_internals as _internals2,
|
|
@@ -340,10 +344,10 @@ import {
|
|
|
340
344
|
recordKnowledgeEvent,
|
|
341
345
|
recordPhaseCloseIntent,
|
|
342
346
|
resolveKnowledgeEventsPath
|
|
343
|
-
} from "./index-
|
|
347
|
+
} from "./index-skgeytf6.js";
|
|
344
348
|
import {
|
|
345
349
|
resolveWorktreeIsolationConfig
|
|
346
|
-
} from "./index-
|
|
350
|
+
} from "./index-0045n7qe.js";
|
|
347
351
|
import {
|
|
348
352
|
RetrospectiveEvidenceSchema
|
|
349
353
|
} from "./index-gprxjmm7.js";
|
|
@@ -353,7 +357,7 @@ import {
|
|
|
353
357
|
init_loader,
|
|
354
358
|
loadPluginConfig,
|
|
355
359
|
loadPluginConfigWithMeta
|
|
356
|
-
} from "./index-
|
|
360
|
+
} from "./index-7rerkeg8.js";
|
|
357
361
|
import {
|
|
358
362
|
DEFAULT_SKILL_OPT_CONFIG,
|
|
359
363
|
FALLBACK_MODELS_MAX,
|
|
@@ -367,7 +371,7 @@ import {
|
|
|
367
371
|
package_default,
|
|
368
372
|
resolveAutoReviewConfig,
|
|
369
373
|
stripKnownSwarmPrefix
|
|
370
|
-
} from "./index-
|
|
374
|
+
} from "./index-yq89bgnz.js";
|
|
371
375
|
import {
|
|
372
376
|
AGENT_TOOL_MAP,
|
|
373
377
|
ALL_AGENT_NAMES,
|
|
@@ -419,10 +423,10 @@ import {
|
|
|
419
423
|
resolveLinkDir,
|
|
420
424
|
sanitizeLinkId,
|
|
421
425
|
writeLinkPointer
|
|
422
|
-
} from "./index-
|
|
426
|
+
} from "./index-k1s8gxjh.js";
|
|
423
427
|
import {
|
|
424
428
|
atomicWriteFile
|
|
425
|
-
} from "./index-
|
|
429
|
+
} from "./index-vhefvcta.js";
|
|
426
430
|
import {
|
|
427
431
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
428
432
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -434,7 +438,7 @@ import {
|
|
|
434
438
|
atomicWriteSwarmFileSync,
|
|
435
439
|
matchTempGrammar,
|
|
436
440
|
parseTargetBasename
|
|
437
|
-
} from "./index-
|
|
441
|
+
} from "./index-kg4knw6r.js";
|
|
438
442
|
import {
|
|
439
443
|
assertProjectRoot,
|
|
440
444
|
hasExplicitProjectBoundary,
|
|
@@ -442,7 +446,7 @@ import {
|
|
|
442
446
|
listActiveLocks,
|
|
443
447
|
tryAcquireLock,
|
|
444
448
|
withEvidenceLock
|
|
445
|
-
} from "./index-
|
|
449
|
+
} from "./index-vrp2zva8.js";
|
|
446
450
|
import {
|
|
447
451
|
emit,
|
|
448
452
|
getLastHeartbeat,
|
|
@@ -5604,7 +5608,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
|
|
|
5604
5608
|
awaitingMergeByCallID,
|
|
5605
5609
|
cleanupStandardWorktreeForCallId,
|
|
5606
5610
|
standardWorktreeByCallID
|
|
5607
|
-
} = await import("./worktree-isolation-
|
|
5611
|
+
} = await import("./worktree-isolation-sbsdx1yj.js");
|
|
5608
5612
|
standardWorktreeByCallID.delete(descriptor.callID);
|
|
5609
5613
|
if (hasResidue)
|
|
5610
5614
|
awaitingMergeByCallID.set(descriptor.callID, {
|
|
@@ -5706,7 +5710,7 @@ async function recoverCoderSettlement(directory, taskId) {
|
|
|
5706
5710
|
awaitingMergeByCallID,
|
|
5707
5711
|
finishStandardWorktreeDispatch,
|
|
5708
5712
|
standardWorktreeByCallID
|
|
5709
|
-
} = await import("./worktree-isolation-
|
|
5713
|
+
} = await import("./worktree-isolation-sbsdx1yj.js");
|
|
5710
5714
|
const descriptor = wal.worktree;
|
|
5711
5715
|
const reconstructedDispatch = {
|
|
5712
5716
|
callID: descriptor.callID,
|
|
@@ -18382,7 +18386,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
18382
18386
|
};
|
|
18383
18387
|
}
|
|
18384
18388
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
18385
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
18389
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-9qzkcmry.js");
|
|
18386
18390
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
18387
18391
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
18388
18392
|
if (sweepConfig?.enabled === false)
|
|
@@ -19500,7 +19504,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
19500
19504
|
}
|
|
19501
19505
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
19502
19506
|
try {
|
|
19503
|
-
const skillModule = await import("./skill-generator-
|
|
19507
|
+
const skillModule = await import("./skill-generator-fh8emssb.js");
|
|
19504
19508
|
for (const cand of skillCandidates) {
|
|
19505
19509
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
19506
19510
|
continue;
|
|
@@ -19972,7 +19976,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
19972
19976
|
} catch {}
|
|
19973
19977
|
}
|
|
19974
19978
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
19975
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
19979
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-9w53tx55.js");
|
|
19976
19980
|
for (const { id } of contradictedEntries) {
|
|
19977
19981
|
try {
|
|
19978
19982
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -20791,7 +20795,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
20791
20795
|
warnings.push("Failed to collect knowledge summary.");
|
|
20792
20796
|
}
|
|
20793
20797
|
try {
|
|
20794
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
20798
|
+
const { getScanStatus } = await import("./scan-cursor-www6dbn8.js");
|
|
20795
20799
|
const scanStatus = await getScanStatus(directory);
|
|
20796
20800
|
if (scanStatus.remaining_estimate > 0) {
|
|
20797
20801
|
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.`);
|
|
@@ -20963,9 +20967,9 @@ var _internals26 = {
|
|
|
20963
20967
|
verifyPostMortemKnowledgeActions,
|
|
20964
20968
|
repairPostMortemActions,
|
|
20965
20969
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
20966
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
20970
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vyg0k7rh.js");
|
|
20967
20971
|
try {
|
|
20968
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
20972
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-9qzkcmry.js");
|
|
20969
20973
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
20970
20974
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
20971
20975
|
} catch {
|
|
@@ -20973,11 +20977,11 @@ var _internals26 = {
|
|
|
20973
20977
|
}
|
|
20974
20978
|
},
|
|
20975
20979
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
20976
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
20980
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-8y57gq1g.js");
|
|
20977
20981
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
20978
20982
|
},
|
|
20979
20983
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
20980
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
20984
|
+
const { checkHivePromotions } = await import("./hive-promoter-te5d78yt.js");
|
|
20981
20985
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
20982
20986
|
},
|
|
20983
20987
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -20986,7 +20990,7 @@ var _internals26 = {
|
|
|
20986
20990
|
activateProposal,
|
|
20987
20991
|
listSkills: listSkills2,
|
|
20988
20992
|
sanitizeSlug
|
|
20989
|
-
} = await import("./skill-generator-
|
|
20993
|
+
} = await import("./skill-generator-fh8emssb.js");
|
|
20990
20994
|
const result = {
|
|
20991
20995
|
approved: [],
|
|
20992
20996
|
rejected: [],
|
|
@@ -22322,9 +22326,9 @@ function hashContent(content) {
|
|
|
22322
22326
|
return createHash10("sha1").update(content).digest("hex");
|
|
22323
22327
|
}
|
|
22324
22328
|
async function loadConfigForPolicyCurator(directory) {
|
|
22325
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
22329
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vyg0k7rh.js");
|
|
22326
22330
|
try {
|
|
22327
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
22331
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-9qzkcmry.js");
|
|
22328
22332
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
22329
22333
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
22330
22334
|
} catch {
|
|
@@ -33520,7 +33524,7 @@ async function runFinalizeStage(ctx) {
|
|
|
33520
33524
|
}
|
|
33521
33525
|
}
|
|
33522
33526
|
try {
|
|
33523
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
33527
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-vyg0k7rh.js");
|
|
33524
33528
|
const { config: pmLoadedConfig } = _internals41.loadPluginConfigWithMeta(ctx.directory);
|
|
33525
33529
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
33526
33530
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -35713,9 +35717,9 @@ var _internals45 = {
|
|
|
35713
35717
|
loadPluginConfigWithMeta,
|
|
35714
35718
|
loadCuratorDeps: async () => {
|
|
35715
35719
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
35716
|
-
import("./schema-
|
|
35717
|
-
import("./curator-
|
|
35718
|
-
import("./curator-llm-factory-
|
|
35720
|
+
import("./schema-vyg0k7rh.js"),
|
|
35721
|
+
import("./curator-8y57gq1g.js"),
|
|
35722
|
+
import("./curator-llm-factory-rj4vw5fd.js")
|
|
35719
35723
|
]);
|
|
35720
35724
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
35721
35725
|
}
|
|
@@ -36705,7 +36709,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
36705
36709
|
let scanCompleted = false;
|
|
36706
36710
|
let scanRemaining = 0;
|
|
36707
36711
|
try {
|
|
36708
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
36712
|
+
const { getScanStatus } = await import("./scan-cursor-www6dbn8.js");
|
|
36709
36713
|
const status = await getScanStatus(directory);
|
|
36710
36714
|
scanGeneration = status.generation;
|
|
36711
36715
|
scanCompleted = status.completed;
|
|
@@ -36713,19 +36717,19 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
36713
36717
|
} catch {}
|
|
36714
36718
|
let configMatch = null;
|
|
36715
36719
|
try {
|
|
36716
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
36720
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-spw879rs.js");
|
|
36717
36721
|
if (isLinked2(directory)) {
|
|
36718
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
36722
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vyg0k7rh.js");
|
|
36719
36723
|
let config;
|
|
36720
36724
|
try {
|
|
36721
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
36725
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-9qzkcmry.js");
|
|
36722
36726
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
36723
36727
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
36724
36728
|
} catch {
|
|
36725
36729
|
config = KnowledgeConfigSchema2.parse({});
|
|
36726
36730
|
}
|
|
36727
36731
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
36728
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
36732
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-fbvctttr.js");
|
|
36729
36733
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
36730
36734
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
36731
36735
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -38029,7 +38033,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
38029
38033
|
const result = runConfigDoctor(config, directory);
|
|
38030
38034
|
let output;
|
|
38031
38035
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
38032
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
38036
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-ycf9ws4p.js");
|
|
38033
38037
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
38034
38038
|
applyLossy: true
|
|
38035
38039
|
});
|
|
@@ -38969,7 +38973,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
38969
38973
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
38970
38974
|
}
|
|
38971
38975
|
async function handleEvidenceSummaryCommand(directory) {
|
|
38972
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
38976
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-wkp0gfpd.js");
|
|
38973
38977
|
const artifact = await buildEvidenceSummary(directory);
|
|
38974
38978
|
if (!artifact) {
|
|
38975
38979
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -61096,9 +61100,12 @@ function comparePriority(a, b) {
|
|
|
61096
61100
|
return priorityDiff;
|
|
61097
61101
|
return a.createdAt - b.createdAt;
|
|
61098
61102
|
}
|
|
61103
|
+
var MAX_TERMINAL_IDS = 2048;
|
|
61099
61104
|
|
|
61100
61105
|
class AutomationQueue {
|
|
61101
61106
|
items = [];
|
|
61107
|
+
inflight = new Map;
|
|
61108
|
+
terminalIds = new Map;
|
|
61102
61109
|
maxSize;
|
|
61103
61110
|
defaultMaxRetries;
|
|
61104
61111
|
defaultBackoffMs;
|
|
@@ -61153,49 +61160,86 @@ class AutomationQueue {
|
|
|
61153
61160
|
return item.id;
|
|
61154
61161
|
}
|
|
61155
61162
|
dequeue() {
|
|
61156
|
-
|
|
61157
|
-
|
|
61158
|
-
|
|
61159
|
-
|
|
61163
|
+
if (this.inflight.size >= this.maxSize)
|
|
61164
|
+
return;
|
|
61165
|
+
const now2 = Date.now();
|
|
61166
|
+
const index = this.items.findIndex((item2) => item2.retry?.nextAttemptAt === undefined || item2.retry.nextAttemptAt <= now2);
|
|
61167
|
+
if (index === -1)
|
|
61168
|
+
return;
|
|
61169
|
+
const [item] = this.items.splice(index, 1);
|
|
61170
|
+
if (!item)
|
|
61171
|
+
return;
|
|
61172
|
+
this.inflight.set(item.id, item);
|
|
61173
|
+
this.eventBus.publish("queue.item.dequeued", { itemId: item.id });
|
|
61160
61174
|
return item;
|
|
61161
61175
|
}
|
|
61162
61176
|
peek() {
|
|
61163
61177
|
return this.items[0];
|
|
61164
61178
|
}
|
|
61165
61179
|
get(id) {
|
|
61166
|
-
return this.items.find((item) => item.id === id);
|
|
61180
|
+
return this.items.find((item) => item.id === id) ?? this.inflight.get(id);
|
|
61167
61181
|
}
|
|
61168
|
-
|
|
61169
|
-
|
|
61170
|
-
|
|
61171
|
-
|
|
61172
|
-
|
|
61182
|
+
inflightSize() {
|
|
61183
|
+
return this.inflight.size;
|
|
61184
|
+
}
|
|
61185
|
+
removeQueuedOrInflight(id) {
|
|
61186
|
+
const queuedIndex = this.items.findIndex((item) => item.id === id);
|
|
61187
|
+
if (queuedIndex !== -1) {
|
|
61188
|
+
const [removed] = this.items.splice(queuedIndex, 1);
|
|
61189
|
+
return removed;
|
|
61173
61190
|
}
|
|
61174
|
-
|
|
61191
|
+
const inflightItem = this.inflight.get(id);
|
|
61192
|
+
if (inflightItem)
|
|
61193
|
+
this.inflight.delete(id);
|
|
61194
|
+
return inflightItem;
|
|
61175
61195
|
}
|
|
61176
|
-
|
|
61177
|
-
|
|
61178
|
-
if (
|
|
61179
|
-
this.
|
|
61196
|
+
markTerminal(id, at) {
|
|
61197
|
+
this.terminalIds.set(id, at);
|
|
61198
|
+
if (this.terminalIds.size > MAX_TERMINAL_IDS) {
|
|
61199
|
+
const oldest = this.terminalIds.keys().next().value;
|
|
61200
|
+
if (oldest !== undefined)
|
|
61201
|
+
this.terminalIds.delete(oldest);
|
|
61180
61202
|
}
|
|
61181
|
-
|
|
61203
|
+
}
|
|
61204
|
+
remove(id) {
|
|
61205
|
+
if (this.terminalIds.has(id))
|
|
61206
|
+
return false;
|
|
61207
|
+
return this.removeQueuedOrInflight(id) !== undefined;
|
|
61208
|
+
}
|
|
61209
|
+
complete(id) {
|
|
61210
|
+
if (this.terminalIds.has(id))
|
|
61211
|
+
return false;
|
|
61212
|
+
const removed = this.removeQueuedOrInflight(id);
|
|
61213
|
+
if (!removed)
|
|
61214
|
+
return false;
|
|
61215
|
+
this.markTerminal(id, Date.now());
|
|
61216
|
+
this.eventBus.publish("queue.item.completed", { itemId: id });
|
|
61217
|
+
return true;
|
|
61182
61218
|
}
|
|
61183
61219
|
retry(id, _error) {
|
|
61220
|
+
if (this.terminalIds.has(id))
|
|
61221
|
+
return false;
|
|
61184
61222
|
const item = this.get(id);
|
|
61185
61223
|
if (!item || !item.retry)
|
|
61186
61224
|
return false;
|
|
61187
61225
|
item.retry.attempts++;
|
|
61188
61226
|
item.retry.lastAttempt = Date.now();
|
|
61189
61227
|
if (item.retry.attempts >= item.retry.maxAttempts) {
|
|
61228
|
+
this.removeQueuedOrInflight(id);
|
|
61229
|
+
this.markTerminal(id, Date.now());
|
|
61190
61230
|
this.eventBus.publish("queue.item.failed", {
|
|
61191
61231
|
itemId: id,
|
|
61192
61232
|
attempts: item.retry.attempts
|
|
61193
61233
|
});
|
|
61194
|
-
this.remove(id);
|
|
61195
61234
|
return false;
|
|
61196
61235
|
}
|
|
61197
61236
|
const backoff = Math.min(item.retry.backoffMs * 2 ** (item.retry.attempts - 1), item.retry.maxBackoffMs);
|
|
61198
61237
|
item.retry.nextAttemptAt = Date.now() + backoff;
|
|
61238
|
+
this.inflight.delete(id);
|
|
61239
|
+
if (!this.items.some((queued) => queued.id === id)) {
|
|
61240
|
+
this.items.push(item);
|
|
61241
|
+
this.items.sort(comparePriority);
|
|
61242
|
+
}
|
|
61199
61243
|
this.eventBus.publish("queue.item.retry scheduled", {
|
|
61200
61244
|
itemId: id,
|
|
61201
61245
|
attempt: item.retry.attempts,
|
|
@@ -61218,7 +61262,14 @@ class AutomationQueue {
|
|
|
61218
61262
|
return this.items.length >= this.maxSize;
|
|
61219
61263
|
}
|
|
61220
61264
|
clear() {
|
|
61265
|
+
for (const item of this.items) {
|
|
61266
|
+
this.eventBus.publish("queue.item.evicted", { itemId: item.id });
|
|
61267
|
+
}
|
|
61221
61268
|
this.items = [];
|
|
61269
|
+
for (const item of this.inflight.values()) {
|
|
61270
|
+
this.eventBus.publish("queue.item.evicted", { itemId: item.id });
|
|
61271
|
+
}
|
|
61272
|
+
this.inflight.clear();
|
|
61222
61273
|
}
|
|
61223
61274
|
getAll() {
|
|
61224
61275
|
return [...this.items];
|
|
@@ -61236,7 +61287,8 @@ class AutomationQueue {
|
|
|
61236
61287
|
normal: this.items.filter((i) => i.priority === "normal").length,
|
|
61237
61288
|
low: this.items.filter((i) => i.priority === "low").length
|
|
61238
61289
|
},
|
|
61239
|
-
retryable: this.getRetryableItems().length
|
|
61290
|
+
retryable: this.getRetryableItems().length,
|
|
61291
|
+
inflight: this.inflight.size
|
|
61240
61292
|
};
|
|
61241
61293
|
}
|
|
61242
61294
|
}
|
|
@@ -61390,7 +61442,8 @@ class WorkerManager {
|
|
|
61390
61442
|
processedCount: worker.processedCount,
|
|
61391
61443
|
errorCount: worker.errorCount,
|
|
61392
61444
|
lastError: worker.lastError,
|
|
61393
|
-
queueSize: worker.queue.size()
|
|
61445
|
+
queueSize: worker.queue.size(),
|
|
61446
|
+
queueInflight: worker.queue.inflightSize()
|
|
61394
61447
|
};
|
|
61395
61448
|
}
|
|
61396
61449
|
getWorkerNames() {
|
|
@@ -68321,7 +68374,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
|
|
|
68321
68374
|
if (!input.dispatcher) {
|
|
68322
68375
|
throw new Error("no evaluation dispatcher available (cannot run validation)");
|
|
68323
68376
|
}
|
|
68324
|
-
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-
|
|
68377
|
+
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-rk26nk58.js");
|
|
68325
68378
|
const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
|
|
68326
68379
|
const result = await _internals95.evaluateCandidateV1({
|
|
68327
68380
|
projectRoot: input.directory,
|
|
@@ -69237,6 +69290,73 @@ var _internals96 = {
|
|
|
69237
69290
|
getActiveFullAutoSessionID,
|
|
69238
69291
|
loadFullAutoRunState
|
|
69239
69292
|
};
|
|
69293
|
+
async function collectBackgroundWorkStatus(directory) {
|
|
69294
|
+
try {
|
|
69295
|
+
await maintainBackgroundDelegations(directory, {
|
|
69296
|
+
lockTimeoutMs: 2000,
|
|
69297
|
+
reason: "status"
|
|
69298
|
+
});
|
|
69299
|
+
} catch {}
|
|
69300
|
+
const counts = {
|
|
69301
|
+
pending: 0,
|
|
69302
|
+
running: 0,
|
|
69303
|
+
completed: 0,
|
|
69304
|
+
consumed: 0,
|
|
69305
|
+
stale: 0,
|
|
69306
|
+
cancelled: 0,
|
|
69307
|
+
error: 0,
|
|
69308
|
+
ingestion_error: 0
|
|
69309
|
+
};
|
|
69310
|
+
const maintenance = readDelegationHealthArtifact(directory)?.maintenance ?? null;
|
|
69311
|
+
const empty = {
|
|
69312
|
+
counts,
|
|
69313
|
+
reservations: [],
|
|
69314
|
+
maintenance,
|
|
69315
|
+
source: "uncertain"
|
|
69316
|
+
};
|
|
69317
|
+
let scan;
|
|
69318
|
+
try {
|
|
69319
|
+
scan = scanDelegationsForRecovery(directory);
|
|
69320
|
+
} catch (error2) {
|
|
69321
|
+
return {
|
|
69322
|
+
...empty,
|
|
69323
|
+
uncertainty: `delegation recovery scan failed: ${error2 instanceof Error ? error2.message : String(error2)}`
|
|
69324
|
+
};
|
|
69325
|
+
}
|
|
69326
|
+
if (scan.status === "uncertain") {
|
|
69327
|
+
return {
|
|
69328
|
+
...empty,
|
|
69329
|
+
uncertainty: `delegation ledger over its recovery bound or corrupt: ${scan.reason}`
|
|
69330
|
+
};
|
|
69331
|
+
}
|
|
69332
|
+
const reservationScan = scanBackgroundCoderReservationsForAdmission(directory);
|
|
69333
|
+
if (reservationScan.status === "uncertain") {
|
|
69334
|
+
return {
|
|
69335
|
+
...empty,
|
|
69336
|
+
uncertainty: `coder reservation store unreadable: ${reservationScan.reason}`
|
|
69337
|
+
};
|
|
69338
|
+
}
|
|
69339
|
+
for (const record of scan.owners) {
|
|
69340
|
+
if (record.status in counts) {
|
|
69341
|
+
counts[record.status] += 1;
|
|
69342
|
+
}
|
|
69343
|
+
}
|
|
69344
|
+
const now2 = Date.now();
|
|
69345
|
+
const reservations = reservationScan.reservations.map((reservation) => ({
|
|
69346
|
+
reservationId: reservation.reservationId,
|
|
69347
|
+
planTaskId: reservation.planTaskId,
|
|
69348
|
+
generation: reservation.generation ?? 1,
|
|
69349
|
+
state: reservation.state,
|
|
69350
|
+
leaseState: reservation.leaseExpiresAt === undefined ? "protected-legacy" : reservation.leaseExpiresAt > now2 ? "active" : "expired",
|
|
69351
|
+
...reservation.leaseExpiresAt !== undefined ? { leaseExpiresAt: reservation.leaseExpiresAt } : {}
|
|
69352
|
+
}));
|
|
69353
|
+
return {
|
|
69354
|
+
counts,
|
|
69355
|
+
reservations,
|
|
69356
|
+
maintenance,
|
|
69357
|
+
source: "validated-recovery"
|
|
69358
|
+
};
|
|
69359
|
+
}
|
|
69240
69360
|
function formatLedgerBytes(bytes) {
|
|
69241
69361
|
if (bytes >= 1024 * 1024) {
|
|
69242
69362
|
return `${Math.round(bytes / (1024 * 1024) * 10) / 10} MiB`;
|
|
@@ -69276,7 +69396,7 @@ function formatAgo(ms) {
|
|
|
69276
69396
|
const days = Math.floor(hours / 24);
|
|
69277
69397
|
return `${days}d ago`;
|
|
69278
69398
|
}
|
|
69279
|
-
async function getStatusData(directory, agents, sessionId) {
|
|
69399
|
+
async function getStatusData(directory, agents, sessionId, options) {
|
|
69280
69400
|
const plan = await loadPlan(directory);
|
|
69281
69401
|
let status;
|
|
69282
69402
|
if (plan && plan.migration_status !== "migration_failed") {
|
|
@@ -69372,6 +69492,16 @@ async function getStatusData(directory, agents, sessionId) {
|
|
|
69372
69492
|
} catch {
|
|
69373
69493
|
status.delegationLedgerHealth = undefined;
|
|
69374
69494
|
}
|
|
69495
|
+
const backgroundSubagentsEnabled = options?.backgroundSubagents ?? (() => {
|
|
69496
|
+
try {
|
|
69497
|
+
return loadPluginConfig(directory)?.hooks?.background_subagents === true;
|
|
69498
|
+
} catch {
|
|
69499
|
+
return false;
|
|
69500
|
+
}
|
|
69501
|
+
})();
|
|
69502
|
+
if (backgroundSubagentsEnabled) {
|
|
69503
|
+
status.backgroundWork = await collectBackgroundWorkStatus(directory);
|
|
69504
|
+
}
|
|
69375
69505
|
try {
|
|
69376
69506
|
const pointer = readLinkPointer(directory);
|
|
69377
69507
|
if (pointer) {
|
|
@@ -69696,12 +69826,64 @@ function formatStatusMarkdown(status) {
|
|
|
69696
69826
|
lines.push(` - Live set: ${counts.activeOwners} active owners, ${counts.pendingAdvisories} pending advisories, ${counts.lateTerminals} late terminals, ${counts.orphanWorktreeOwners} unsettled worktree owners`);
|
|
69697
69827
|
}
|
|
69698
69828
|
}
|
|
69829
|
+
const backgroundWork = status.backgroundWork;
|
|
69830
|
+
if (backgroundWork) {
|
|
69831
|
+
lines.push(...renderBackgroundWorkLines(backgroundWork));
|
|
69832
|
+
}
|
|
69699
69833
|
return lines.join(`
|
|
69700
69834
|
`);
|
|
69701
69835
|
}
|
|
69702
|
-
|
|
69703
|
-
const
|
|
69836
|
+
function renderBackgroundWorkLines(backgroundWork) {
|
|
69837
|
+
const lines = ["", "**Background Work** (opt-in):"];
|
|
69838
|
+
if (backgroundWork.source === "uncertain") {
|
|
69839
|
+
lines.push(` - \u26A0 State uncertain: ${backgroundWork.uncertainty ?? "unknown reason"} \u2014 counts and reservations are not shown rather than partially trusted`);
|
|
69840
|
+
} else {
|
|
69841
|
+
const counts = backgroundWork.counts;
|
|
69842
|
+
lines.push(` - Delegations: ${counts.pending} pending, ${counts.running} running, ${counts.completed} completed (unconsumed), ${counts.consumed} consumed, ${counts.stale} stale, ${counts.cancelled} cancelled, ${counts.error} error, ${counts.ingestion_error} ingestion_error`);
|
|
69843
|
+
if (backgroundWork.reservations.length > 0) {
|
|
69844
|
+
lines.push(` - Reservations (${backgroundWork.reservations.length} active):`);
|
|
69845
|
+
for (const reservation of backgroundWork.reservations) {
|
|
69846
|
+
const lease = reservation.leaseState === "active" && reservation.leaseExpiresAt ? `active until ${new Date(reservation.leaseExpiresAt).toISOString()}` : reservation.leaseState;
|
|
69847
|
+
lines.push(` - ${reservation.reservationId.slice(0, 12)}\u2026 ${reservation.state} gen ${reservation.generation} task ${reservation.planTaskId ?? "(call-scoped)"} \u2014 lease ${lease}`);
|
|
69848
|
+
}
|
|
69849
|
+
} else {
|
|
69850
|
+
lines.push(" - Reservations: none");
|
|
69851
|
+
}
|
|
69852
|
+
lines.push(" - Source: validated recovery (bounded scan)");
|
|
69853
|
+
}
|
|
69854
|
+
const maintenance = backgroundWork.maintenance;
|
|
69855
|
+
if (maintenance) {
|
|
69856
|
+
if (maintenance.lastOkAt !== null) {
|
|
69857
|
+
const summary = maintenance.lastSummary;
|
|
69858
|
+
lines.push(` - Maintenance: last ok ${new Date(maintenance.lastOkAt).toISOString()} (swept ${summary.sweptStale}, released ${summary.released}, renewed ${summary.renewed}, retained ${summary.retained})`);
|
|
69859
|
+
} else {
|
|
69860
|
+
lines.push(" - Maintenance: no successful run recorded");
|
|
69861
|
+
}
|
|
69862
|
+
if (maintenance.lastFailure) {
|
|
69863
|
+
lines.push(` - \u26A0 Last maintenance failure (${new Date(maintenance.lastFailure.at).toISOString()}): ${maintenance.lastFailure.reason}`);
|
|
69864
|
+
}
|
|
69865
|
+
if (maintenance.lastContentionAt !== null) {
|
|
69866
|
+
lines.push(` - \u26A0 Last maintenance lock contention: ${new Date(maintenance.lastContentionAt).toISOString()}`);
|
|
69867
|
+
}
|
|
69868
|
+
if (maintenance.facts.length > 0) {
|
|
69869
|
+
lines.push(` - Recent maintenance facts (${maintenance.facts.length}):`);
|
|
69870
|
+
for (const fact of maintenance.facts.slice(-5).reverse()) {
|
|
69871
|
+
const target = fact.reservationId ? ` ${fact.reservationId.slice(0, 12)}\u2026` : fact.correlationId ? ` ${fact.correlationId.slice(0, 12)}\u2026` : "";
|
|
69872
|
+
lines.push(` - ${new Date(fact.at).toISOString()} ${fact.kind}${target} \u2014 ${fact.reason}`);
|
|
69873
|
+
}
|
|
69874
|
+
}
|
|
69875
|
+
}
|
|
69876
|
+
return lines;
|
|
69877
|
+
}
|
|
69878
|
+
async function handleStatusCommand(directory, agents, sessionId, options) {
|
|
69879
|
+
const statusData = await getStatusData(directory, agents, sessionId, options);
|
|
69704
69880
|
if (!statusData.hasPlan) {
|
|
69881
|
+
if (statusData.backgroundWork) {
|
|
69882
|
+
const lines = ["No active swarm plan found."];
|
|
69883
|
+
lines.push(...renderBackgroundWorkLines(statusData.backgroundWork));
|
|
69884
|
+
return lines.join(`
|
|
69885
|
+
`);
|
|
69886
|
+
}
|
|
69705
69887
|
if (statusData.specStale) {
|
|
69706
69888
|
const reason = statusData.specStaleReason ?? "spec.md changed since plan saved";
|
|
69707
69889
|
const stored = statusData.specStaleStoredHash ?? "unknown";
|
|
@@ -70227,7 +70409,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
70227
70409
|
async function handleHelpCommand(ctx) {
|
|
70228
70410
|
const targetCommand = ctx.args.join(" ");
|
|
70229
70411
|
if (!targetCommand) {
|
|
70230
|
-
const { buildHelpText } = await import("./index-
|
|
70412
|
+
const { buildHelpText } = await import("./index-rzzwem6x.js");
|
|
70231
70413
|
return buildHelpText();
|
|
70232
70414
|
}
|
|
70233
70415
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -70236,7 +70418,7 @@ async function handleHelpCommand(ctx) {
|
|
|
70236
70418
|
return _internals98.buildDetailedHelp(resolved.key, resolved.entry);
|
|
70237
70419
|
}
|
|
70238
70420
|
const similar = _internals98.findSimilarCommands(targetCommand);
|
|
70239
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
70421
|
+
const { buildHelpText: fullHelp } = await import("./index-rzzwem6x.js");
|
|
70240
70422
|
if (similar.length > 0) {
|
|
70241
70423
|
return `Command '/swarm ${targetCommand}' not found.
|
|
70242
70424
|
|
|
@@ -70416,7 +70598,7 @@ var COMMAND_REGISTRY = {
|
|
|
70416
70598
|
},
|
|
70417
70599
|
"guardrail explain": {
|
|
70418
70600
|
handler: async (ctx) => {
|
|
70419
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
70601
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-2n3ahs0m.js");
|
|
70420
70602
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
70421
70603
|
},
|
|
70422
70604
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -70426,7 +70608,7 @@ var COMMAND_REGISTRY = {
|
|
|
70426
70608
|
},
|
|
70427
70609
|
"guardrail reset": {
|
|
70428
70610
|
handler: async (ctx) => {
|
|
70429
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
70611
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-be3sx0am.js");
|
|
70430
70612
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
70431
70613
|
},
|
|
70432
70614
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -70435,7 +70617,7 @@ var COMMAND_REGISTRY = {
|
|
|
70435
70617
|
},
|
|
70436
70618
|
"guardrail-explain": {
|
|
70437
70619
|
handler: async (ctx) => {
|
|
70438
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
70620
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-2n3ahs0m.js");
|
|
70439
70621
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
70440
70622
|
},
|
|
70441
70623
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -70445,7 +70627,7 @@ var COMMAND_REGISTRY = {
|
|
|
70445
70627
|
},
|
|
70446
70628
|
"guardrail-reset": {
|
|
70447
70629
|
handler: async (ctx) => {
|
|
70448
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
70630
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-be3sx0am.js");
|
|
70449
70631
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
70450
70632
|
},
|
|
70451
70633
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -70455,7 +70637,7 @@ var COMMAND_REGISTRY = {
|
|
|
70455
70637
|
},
|
|
70456
70638
|
"guardrail-log": {
|
|
70457
70639
|
handler: async (ctx) => {
|
|
70458
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
70640
|
+
const { handleGuardrailLog } = await import("./guardrail-log-bmxrb3r2.js");
|
|
70459
70641
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
70460
70642
|
},
|
|
70461
70643
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -76882,7 +77064,7 @@ function getDisplayBudget() {
|
|
|
76882
77064
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
76883
77065
|
const map = new Map;
|
|
76884
77066
|
try {
|
|
76885
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
77067
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-f4xw1rxy.js");
|
|
76886
77068
|
const records = await listActive2(directory);
|
|
76887
77069
|
for (const record of records) {
|
|
76888
77070
|
if (record.sessionID !== sessionID)
|
|
@@ -77298,7 +77480,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
77298
77480
|
return extracted === expectedSessionId;
|
|
77299
77481
|
}
|
|
77300
77482
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
77301
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
77483
|
+
const collisionOwnership = await import("./worktree-collision-ownership-wqy7mgb3.js");
|
|
77302
77484
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
77303
77485
|
}
|
|
77304
77486
|
async function precreateStandardWorktreeSession(args) {
|
|
@@ -77446,7 +77628,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
77446
77628
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, provisionResult.worktreePath);
|
|
77447
77629
|
if (laneProfile) {
|
|
77448
77630
|
try {
|
|
77449
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
77631
|
+
const { writeLaneProfileToDiskReal } = await import("./core-a1bhs3xa.js");
|
|
77450
77632
|
await writeLaneProfileToDiskReal(provisionResult.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
77451
77633
|
} catch {}
|
|
77452
77634
|
}
|
|
@@ -78104,7 +78286,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
78104
78286
|
}
|
|
78105
78287
|
clearWorktreeMergeStatus(statusKey);
|
|
78106
78288
|
try {
|
|
78107
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
78289
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-a1bhs3xa.js");
|
|
78108
78290
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
78109
78291
|
} catch {}
|
|
78110
78292
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|