opencode-swarm 7.188.8 → 7.188.9
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/cli/{auto-checkpoint-cdcf7yeb.js → auto-checkpoint-8hn7sczv.js} +4 -4
- package/dist/cli/{checkpoint-jpc3a69d.js → checkpoint-zagm80g6.js} +8 -8
- package/dist/cli/{coder-settlement-rmaypr7g.js → coder-settlement-ea9wk0fa.js} +3 -3
- package/dist/cli/{config-doctor-b5t9hrzb.js → config-doctor-482f83pc.js} +7 -7
- package/dist/cli/{core-ky5b3mh6.js → core-jev9px23.js} +1 -1
- package/dist/cli/{curator-drift-2dwkkykq.js → curator-drift-tzr8cq9d.js} +5 -5
- package/dist/cli/{curator-llm-factory-ajtxk3sm.js → curator-llm-factory-vwxengt1.js} +26 -26
- package/dist/cli/{curator-bsafet3m.js → curator-sw5w1yxn.js} +26 -26
- package/dist/cli/{dispatch-qvcztbpf.js → dispatch-h8m1jntz.js} +47 -220
- package/dist/cli/{doctor-knowledge-receipt-phase-id-mckkwm0c.js → doctor-knowledge-receipt-phase-id-78hqh9ds.js} +4 -4
- package/dist/cli/{evidence-summary-service-svrt4se9.js → evidence-summary-service-dpx7844s.js} +9 -9
- package/dist/cli/{gate-evidence-jcw4mvwr.js → gate-evidence-v5fbpnfe.js} +2 -2
- package/dist/cli/{guardrail-explain-5j0cg165.js → guardrail-explain-020gkz5c.js} +27 -27
- package/dist/cli/{guardrail-log-h6fc7rnv.js → guardrail-log-z14b98cn.js} +3 -3
- package/dist/cli/{guardrail-reset-kjmqnr5r.js → guardrail-reset-cg6kfk8r.js} +26 -26
- package/dist/cli/{hive-promoter-edp5c7k2.js → hive-promoter-bse7dh34.js} +26 -26
- package/dist/cli/{index-js2jykf9.js → index-0dp2ak7d.js} +1 -1
- package/dist/cli/{index-0g7wya30.js → index-0e49htcs.js} +1 -1
- package/dist/cli/{index-mcnqpmw6.js → index-0whh6em0.js} +2 -2
- package/dist/cli/{index-b81wsm2s.js → index-2mmbzyqb.js} +1 -1
- package/dist/cli/{index-sarq27b9.js → index-4xc838p0.js} +1 -1
- package/dist/cli/{index-wbjk8xq9.js → index-64e9z08z.js} +2 -2
- package/dist/cli/{index-chsaj89g.js → index-6nx6qf7v.js} +1 -1
- package/dist/cli/{index-kwbgrb3y.js → index-7jtxt3qp.js} +1 -1
- package/dist/cli/{index-r89wr177.js → index-804rs273.js} +1 -1
- package/dist/cli/{index-8hf3rt47.js → index-akkskstq.js} +4 -4
- package/dist/cli/{index-8gyt9j0a.js → index-b2g020d7.js} +1 -1
- package/dist/cli/{index-vhqcqq73.js → index-b913b1yc.js} +1 -1
- package/dist/cli/{index-d1yjbjf9.js → index-byfk6w9a.js} +3 -3
- package/dist/cli/{index-e69469z9.js → index-bzeegaem.js} +2 -2
- package/dist/cli/{index-vx8a8w3b.js → index-c0tjwb5k.js} +496 -201
- package/dist/cli/{index-11v15np0.js → index-cxybg712.js} +2 -2
- package/dist/cli/{index-hsmvdecz.js → index-d1z2yrwq.js} +2 -2
- package/dist/cli/{index-n8n94des.js → index-ddgmj923.js} +26 -26
- package/dist/cli/{index-gfqz06ra.js → index-dhkgby53.js} +2 -2
- package/dist/cli/{index-fqyd21v7.js → index-g0we5tpv.js} +3 -3
- package/dist/cli/{index-d4vrpe06.js → index-gd602ztc.js} +1 -1
- package/dist/cli/{index-yyh5kegx.js → index-hjyakvcq.js} +1 -1
- package/dist/cli/{index-f0kk9daj.js → index-kjb143pz.js} +3 -3
- package/dist/cli/{index-pd9hkz4f.js → index-ng5n8tp0.js} +3 -3
- package/dist/cli/{index-kx0sr39t.js → index-peyrzden.js} +28 -28
- package/dist/cli/{index-s55t0cdc.js → index-ps6fyxfc.js} +5 -5
- package/dist/cli/{index-nyy3hpwg.js → index-q6y176gs.js} +6 -6
- package/dist/cli/{index-fbw4g7yh.js → index-qdp9ny78.js} +1 -1
- package/dist/cli/{index-h93hm2ew.js → index-sndyex1t.js} +241 -165
- package/dist/cli/{index-qg3tx5az.js → index-t6tew3pf.js} +1 -1
- package/dist/cli/{index-9m3pcjf2.js → index-v71w06rr.js} +1 -1
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-ndsm1023.js → knowledge-escalator-wah5yybk.js} +7 -7
- package/dist/cli/{knowledge-events-pcbxvykz.js → knowledge-events-akz8013r.js} +5 -5
- package/dist/cli/{knowledge-store-00t92ypz.js → knowledge-store-hy12373e.js} +1 -1
- package/dist/cli/{knowledge-validator-f8mkzp37.js → knowledge-validator-yrqkdt1w.js} +2 -2
- package/dist/cli/{mcp-sawqgyk6.js → mcp-0srnsd05.js} +1 -1
- package/dist/cli/{model-preflight-7rrjh3wp.js → model-preflight-m3v8hn9k.js} +26 -26
- package/dist/cli/{pending-delegations-2161efex.js → pending-delegations-40txwk2h.js} +2 -2
- package/dist/cli/{pr-subscriptions-m47zghfv.js → pr-subscriptions-w6n5s9c7.js} +1 -1
- package/dist/cli/{pr-workflow-gate-hmtae8gc.js → pr-workflow-gate-mx9t1p5j.js} +26 -26
- package/dist/cli/{scan-cursor-gdy1qjed.js → scan-cursor-phbwfaya.js} +2 -2
- package/dist/cli/{schema-qaxjz2de.js → schema-t1xwd728.js} +1 -1
- package/dist/cli/{scope-persistence-dnx61ybv.js → scope-persistence-m6qrwt3d.js} +5 -5
- package/dist/cli/{server-6wmhhy81.js → server-7pt2zhnc.js} +26 -26
- package/dist/cli/{skill-generator-sgv3bdgt.js → skill-generator-pnv8efrw.js} +8 -8
- package/dist/cli/{snapshot-coordination-init-qbtzxwga.js → snapshot-coordination-init-514wtctt.js} +26 -26
- package/dist/cli/{speckit-checkoff-yepzgcmj.js → speckit-checkoff-beh1nw7v.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-cswsfrj6.js → worktree-collision-ownership-f5wca0gg.js} +2 -2
- package/dist/cli/{worktree-isolation-vj7egepy.js → worktree-isolation-bd6c5x8h.js} +26 -26
- package/dist/commands/recover.d.ts +1 -1
- package/dist/commands/registry.d.ts +1 -1
- package/dist/index.js +207 -207
- package/dist/lang/backends/java.d.ts +39 -0
- package/dist/lang/default-backend.d.ts +15 -0
- package/dist/tools/test-runner.d.ts +31 -1
- package/dist/utils/windows-batch.d.ts +53 -0
- package/dist/workflow/session-view.d.ts +47 -0
- package/dist/workflow/stage-a-repair.d.ts +1 -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-2mmbzyqb.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-dhkgby53.js";
|
|
19
19
|
import {
|
|
20
20
|
archiveEvidence,
|
|
21
21
|
checkRequirementCoverage,
|
|
@@ -27,19 +27,26 @@ import {
|
|
|
27
27
|
sanitizeTaskId,
|
|
28
28
|
saveEvidence,
|
|
29
29
|
validateProjectRoot
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-v71w06rr.js";
|
|
31
31
|
import {
|
|
32
32
|
JAVA_SYMBOL_GRAMMAR,
|
|
33
33
|
LANGUAGE_REGISTRY,
|
|
34
|
+
WINDOWS_BATCH_WRAPPER_EXTENSIONS,
|
|
34
35
|
_internals as _internals3,
|
|
35
36
|
_internals1 as _internals4,
|
|
37
|
+
buildGradleTestCommand,
|
|
38
|
+
buildMavenTestCommand,
|
|
36
39
|
buildNativeTargetCommand,
|
|
40
|
+
buildWindowsBatchCommand,
|
|
37
41
|
getProfileForFile,
|
|
38
42
|
isCommandAvailable,
|
|
43
|
+
isWindowsCommandInterpreterLaunch,
|
|
39
44
|
maskCommentsAndLiterals,
|
|
40
45
|
parseJavaImports,
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
resolveContainedWindowsBatchCommand,
|
|
47
|
+
resolveLocalNodeTool,
|
|
48
|
+
resolveMavenWrapperCommand
|
|
49
|
+
} from "./index-c0tjwb5k.js";
|
|
43
50
|
import {
|
|
44
51
|
captureWorkingTreeFingerprint,
|
|
45
52
|
createModelEvaluationExecutor,
|
|
@@ -81,7 +88,7 @@ import {
|
|
|
81
88
|
alreadyCuratedThisGeneration,
|
|
82
89
|
claimNextScanBatch,
|
|
83
90
|
resolveCohortId
|
|
84
|
-
} from "./index-
|
|
91
|
+
} from "./index-0e49htcs.js";
|
|
85
92
|
import {
|
|
86
93
|
CURATOR_CONSOLIDATION_PROMPT,
|
|
87
94
|
CURATOR_INIT_PROMPT,
|
|
@@ -100,13 +107,13 @@ import {
|
|
|
100
107
|
getGroupCommitWriter,
|
|
101
108
|
importLegacyJsonl,
|
|
102
109
|
readPriorDriftReports
|
|
103
|
-
} from "./index-
|
|
110
|
+
} from "./index-qdp9ny78.js";
|
|
104
111
|
import {
|
|
105
112
|
assertNoUnsettledCoderDispatch,
|
|
106
113
|
listCoderSettlementWalStates,
|
|
107
114
|
recoverCoderSettlement,
|
|
108
115
|
recoverStaleCoderSettlements
|
|
109
|
-
} from "./index-
|
|
116
|
+
} from "./index-kjb143pz.js";
|
|
110
117
|
import {
|
|
111
118
|
BUNDLED_PROJECT_SKILL_ROOT,
|
|
112
119
|
DEFAULT_SKILL_MIN_CONFIDENCE,
|
|
@@ -127,11 +134,11 @@ import {
|
|
|
127
134
|
retireSkill,
|
|
128
135
|
selectCandidateEntries,
|
|
129
136
|
syncBundledProjectSkillsIfMissingAsync
|
|
130
|
-
} from "./index-
|
|
137
|
+
} from "./index-byfk6w9a.js";
|
|
131
138
|
import {
|
|
132
139
|
buildEscalationBriefing,
|
|
133
140
|
readRecentEscalations
|
|
134
|
-
} from "./index-
|
|
141
|
+
} from "./index-q6y176gs.js";
|
|
135
142
|
import {
|
|
136
143
|
parsePorcelainV2Snapshot,
|
|
137
144
|
resolveCommitCountSince,
|
|
@@ -211,7 +218,7 @@ import {
|
|
|
211
218
|
resolveWorkingDirectory,
|
|
212
219
|
swarmOverwriteCandidates,
|
|
213
220
|
trackedDirtyCandidates
|
|
214
|
-
} from "./index-
|
|
221
|
+
} from "./index-ng5n8tp0.js";
|
|
215
222
|
import {
|
|
216
223
|
MAX_TRANSIENT_RETRIES,
|
|
217
224
|
PlanRecoverySupersededError,
|
|
@@ -238,7 +245,7 @@ import {
|
|
|
238
245
|
transientBackoff,
|
|
239
246
|
updateTaskStatus,
|
|
240
247
|
withPlanLifecycleLock
|
|
241
|
-
} from "./index-
|
|
248
|
+
} from "./index-ps6fyxfc.js";
|
|
242
249
|
import {
|
|
243
250
|
containsControlChars,
|
|
244
251
|
containsPathTraversal,
|
|
@@ -254,7 +261,7 @@ import {
|
|
|
254
261
|
resolveSpeckitProjection,
|
|
255
262
|
validateSpeckit,
|
|
256
263
|
writeProjectedSpecSync
|
|
257
|
-
} from "./index-
|
|
264
|
+
} from "./index-7jtxt3qp.js";
|
|
258
265
|
import {
|
|
259
266
|
clearWorktreeMergeStatus,
|
|
260
267
|
getAllWorktreeMergeFailures,
|
|
@@ -285,7 +292,7 @@ import {
|
|
|
285
292
|
transitionTaskWorkflowEvidenceWithStatus,
|
|
286
293
|
withTaskEvidenceTransaction,
|
|
287
294
|
writeWorkflowWalFile
|
|
288
|
-
} from "./index-
|
|
295
|
+
} from "./index-t6tew3pf.js";
|
|
289
296
|
import {
|
|
290
297
|
isPathUnderSwarmWorktreeBase,
|
|
291
298
|
listLiveLaneOwners,
|
|
@@ -294,7 +301,7 @@ import {
|
|
|
294
301
|
recordLiveLaneOwner,
|
|
295
302
|
removeWorktree,
|
|
296
303
|
resolveWorktreeBaseDir
|
|
297
|
-
} from "./index-
|
|
304
|
+
} from "./index-b913b1yc.js";
|
|
298
305
|
import {
|
|
299
306
|
DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
|
|
300
307
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
@@ -328,7 +335,7 @@ import {
|
|
|
328
335
|
scanBackgroundCoderReservationsForAdmission,
|
|
329
336
|
scanDelegationsForRecovery,
|
|
330
337
|
sweepStaleDelegations
|
|
331
|
-
} from "./index-
|
|
338
|
+
} from "./index-0dp2ak7d.js";
|
|
332
339
|
import {
|
|
333
340
|
MAX_EVENT_LOG_ENTRIES,
|
|
334
341
|
_internals,
|
|
@@ -340,7 +347,7 @@ import {
|
|
|
340
347
|
recordHiveKnowledgeEvent,
|
|
341
348
|
recordKnowledgeEvent,
|
|
342
349
|
resolveKnowledgeEventsPath
|
|
343
|
-
} from "./index-
|
|
350
|
+
} from "./index-cxybg712.js";
|
|
344
351
|
import {
|
|
345
352
|
commitDisplayedMembership,
|
|
346
353
|
commitEmptyRetrieval,
|
|
@@ -353,7 +360,7 @@ import {
|
|
|
353
360
|
queryLiveMemberships,
|
|
354
361
|
reconcilePhaseClose,
|
|
355
362
|
recordPhaseCloseIntent
|
|
356
|
-
} from "./index-
|
|
363
|
+
} from "./index-0whh6em0.js";
|
|
357
364
|
import {
|
|
358
365
|
sanitizeContextText
|
|
359
366
|
} from "./index-m9zzj4ee.js";
|
|
@@ -384,7 +391,7 @@ import {
|
|
|
384
391
|
validateActionableFields,
|
|
385
392
|
validateLesson,
|
|
386
393
|
validateSkillPath
|
|
387
|
-
} from "./index-
|
|
394
|
+
} from "./index-804rs273.js";
|
|
388
395
|
import {
|
|
389
396
|
MAX_CURATION_PROPOSALS,
|
|
390
397
|
authorizeCuration,
|
|
@@ -395,7 +402,7 @@ import {
|
|
|
395
402
|
} from "./index-rtry5xyf.js";
|
|
396
403
|
import {
|
|
397
404
|
resolveWorktreeIsolationConfig
|
|
398
|
-
} from "./index-
|
|
405
|
+
} from "./index-64e9z08z.js";
|
|
399
406
|
import {
|
|
400
407
|
RetrospectiveEvidenceSchema
|
|
401
408
|
} from "./index-kbkk7vnh.js";
|
|
@@ -407,7 +414,7 @@ import {
|
|
|
407
414
|
clearScopeBindings,
|
|
408
415
|
readAuthoritativeScopeBindingSet,
|
|
409
416
|
readDeclaredScopeFilesFromBindings
|
|
410
|
-
} from "./index-
|
|
417
|
+
} from "./index-4xc838p0.js";
|
|
411
418
|
import {
|
|
412
419
|
clearPlanLedgerForReset,
|
|
413
420
|
computePlanStructureHash,
|
|
@@ -423,7 +430,7 @@ import {
|
|
|
423
430
|
replayFromLedgerWithStatus,
|
|
424
431
|
resolvePlanningProfile,
|
|
425
432
|
takeSnapshotEvent
|
|
426
|
-
} from "./index-
|
|
433
|
+
} from "./index-bzeegaem.js";
|
|
427
434
|
import {
|
|
428
435
|
CORE_EVENT_LOCKED,
|
|
429
436
|
appendCoreEventSync,
|
|
@@ -512,7 +519,7 @@ import {
|
|
|
512
519
|
transactFile,
|
|
513
520
|
transactKnowledge,
|
|
514
521
|
wordBigrams
|
|
515
|
-
} from "./index-
|
|
522
|
+
} from "./index-akkskstq.js";
|
|
516
523
|
import {
|
|
517
524
|
readTailJsonl,
|
|
518
525
|
readTailJsonlDetailed,
|
|
@@ -593,7 +600,7 @@ import {
|
|
|
593
600
|
loadGateOverrides,
|
|
594
601
|
loadPluginConfig,
|
|
595
602
|
loadPluginConfigWithMeta
|
|
596
|
-
} from "./index-
|
|
603
|
+
} from "./index-hjyakvcq.js";
|
|
597
604
|
import {
|
|
598
605
|
addDeferredWarning,
|
|
599
606
|
advisoryWarn,
|
|
@@ -625,7 +632,7 @@ import {
|
|
|
625
632
|
resolveContextWindow,
|
|
626
633
|
resolveGeneratedAgentRole,
|
|
627
634
|
stripKnownSwarmPrefix
|
|
628
|
-
} from "./index-
|
|
635
|
+
} from "./index-gd602ztc.js";
|
|
629
636
|
import {
|
|
630
637
|
AGENT_TOOL_MAP,
|
|
631
638
|
ALL_AGENT_NAMES,
|
|
@@ -3414,7 +3421,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
|
|
|
3414
3421
|
return null;
|
|
3415
3422
|
throw error2;
|
|
3416
3423
|
}
|
|
3417
|
-
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-
|
|
3424
|
+
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-mx9t1p5j.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
|
|
3418
3425
|
if (!legacy)
|
|
3419
3426
|
return null;
|
|
3420
3427
|
const namespace = workflowGateStateCoordinationNamespace(sessionID);
|
|
@@ -3501,7 +3508,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
|
|
|
3501
3508
|
let recoveryState = null;
|
|
3502
3509
|
if (!currentAuthoritative) {
|
|
3503
3510
|
if (options.allowSalvagedRead) {
|
|
3504
|
-
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-
|
|
3511
|
+
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-mx9t1p5j.js");
|
|
3505
3512
|
recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
|
|
3506
3513
|
}
|
|
3507
3514
|
if (!recoveryState) {
|
|
@@ -15074,7 +15081,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
15074
15081
|
return extracted === expectedSessionId;
|
|
15075
15082
|
}
|
|
15076
15083
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
15077
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
15084
|
+
const collisionOwnership = await import("./worktree-collision-ownership-f5wca0gg.js");
|
|
15078
15085
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
15079
15086
|
}
|
|
15080
15087
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -15500,7 +15507,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
15500
15507
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
15501
15508
|
if (laneProfile) {
|
|
15502
15509
|
try {
|
|
15503
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
15510
|
+
const { writeLaneProfileToDiskReal } = await import("./core-jev9px23.js");
|
|
15504
15511
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
15505
15512
|
} catch {}
|
|
15506
15513
|
}
|
|
@@ -16479,7 +16486,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
16479
16486
|
}
|
|
16480
16487
|
clearWorktreeMergeStatus(statusKey);
|
|
16481
16488
|
try {
|
|
16482
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
16489
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-jev9px23.js");
|
|
16483
16490
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
16484
16491
|
} catch {}
|
|
16485
16492
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -24117,7 +24124,7 @@ function clearCriticalShownIds(sessionID) {
|
|
|
24117
24124
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
24118
24125
|
const map = new Map;
|
|
24119
24126
|
try {
|
|
24120
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
24127
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-w6n5s9c7.js");
|
|
24121
24128
|
const records = await listActive2(directory);
|
|
24122
24129
|
for (const record of records) {
|
|
24123
24130
|
if (record.sessionID !== sessionID)
|
|
@@ -40664,9 +40671,9 @@ function hashContent(content) {
|
|
|
40664
40671
|
return createHash27("sha1").update(content).digest("hex");
|
|
40665
40672
|
}
|
|
40666
40673
|
async function loadConfigForPolicyCurator(directory) {
|
|
40667
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
40674
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-t1xwd728.js");
|
|
40668
40675
|
try {
|
|
40669
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
40676
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-g0we5tpv.js");
|
|
40670
40677
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
40671
40678
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
40672
40679
|
} catch {
|
|
@@ -43724,7 +43731,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
|
|
|
43724
43731
|
const seam = _internals38.createCuratorLLMDelegate;
|
|
43725
43732
|
if (seam)
|
|
43726
43733
|
return seam(directory, mode, sessionId);
|
|
43727
|
-
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-
|
|
43734
|
+
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-vwxengt1.js");
|
|
43728
43735
|
return createCuratorLLMDelegate(directory, mode, sessionId);
|
|
43729
43736
|
}
|
|
43730
43737
|
async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
|
|
@@ -44119,7 +44126,7 @@ async function runFinalizeStage(ctx) {
|
|
|
44119
44126
|
}
|
|
44120
44127
|
}
|
|
44121
44128
|
try {
|
|
44122
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
44129
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-t1xwd728.js");
|
|
44123
44130
|
const { config: pmLoadedConfig } = _internals38.loadPluginConfigWithMeta(ctx.directory);
|
|
44124
44131
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
44125
44132
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -46356,7 +46363,7 @@ function serializeAgentSession(s) {
|
|
|
46356
46363
|
}
|
|
46357
46364
|
async function writeSnapshot(directory, state) {
|
|
46358
46365
|
try {
|
|
46359
|
-
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-
|
|
46366
|
+
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-514wtctt.js");
|
|
46360
46367
|
await ensureSnapshotCoordinationReady(directory);
|
|
46361
46368
|
const snapshot = {
|
|
46362
46369
|
version: 3,
|
|
@@ -49366,7 +49373,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
49366
49373
|
};
|
|
49367
49374
|
}
|
|
49368
49375
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
49369
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
49376
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-g0we5tpv.js");
|
|
49370
49377
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
49371
49378
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
49372
49379
|
if (sweepConfig?.enabled === false)
|
|
@@ -50490,7 +50497,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
50490
50497
|
}
|
|
50491
50498
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
50492
50499
|
try {
|
|
50493
|
-
const skillModule = await import("./skill-generator-
|
|
50500
|
+
const skillModule = await import("./skill-generator-pnv8efrw.js");
|
|
50494
50501
|
for (const cand of skillCandidates) {
|
|
50495
50502
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
50496
50503
|
continue;
|
|
@@ -50962,7 +50969,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
50962
50969
|
} catch {}
|
|
50963
50970
|
}
|
|
50964
50971
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
50965
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
50972
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-wah5yybk.js");
|
|
50966
50973
|
for (const { id } of contradictedEntries) {
|
|
50967
50974
|
try {
|
|
50968
50975
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -51794,7 +51801,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
51794
51801
|
warnings.push("Failed to collect knowledge summary.");
|
|
51795
51802
|
}
|
|
51796
51803
|
try {
|
|
51797
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
51804
|
+
const { getScanStatus } = await import("./scan-cursor-phbwfaya.js");
|
|
51798
51805
|
const scanStatus = await getScanStatus(directory);
|
|
51799
51806
|
if (scanStatus.remaining_estimate > 0) {
|
|
51800
51807
|
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.`);
|
|
@@ -51966,9 +51973,9 @@ var _internals56 = {
|
|
|
51966
51973
|
verifyPostMortemKnowledgeActions,
|
|
51967
51974
|
repairPostMortemActions,
|
|
51968
51975
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
51969
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
51976
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-t1xwd728.js");
|
|
51970
51977
|
try {
|
|
51971
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
51978
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-g0we5tpv.js");
|
|
51972
51979
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
51973
51980
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
51974
51981
|
} catch {
|
|
@@ -51976,11 +51983,11 @@ var _internals56 = {
|
|
|
51976
51983
|
}
|
|
51977
51984
|
},
|
|
51978
51985
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
51979
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
51986
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-sw5w1yxn.js");
|
|
51980
51987
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
51981
51988
|
},
|
|
51982
51989
|
checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
|
|
51983
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
51990
|
+
const { checkHivePromotions } = await import("./hive-promoter-bse7dh34.js");
|
|
51984
51991
|
return checkHivePromotions(entries2, knowledgeConfig, directory);
|
|
51985
51992
|
},
|
|
51986
51993
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -51989,7 +51996,7 @@ var _internals56 = {
|
|
|
51989
51996
|
activateProposal,
|
|
51990
51997
|
listSkills: listSkills2,
|
|
51991
51998
|
sanitizeSlug
|
|
51992
|
-
} = await import("./skill-generator-
|
|
51999
|
+
} = await import("./skill-generator-pnv8efrw.js");
|
|
51993
52000
|
const result = {
|
|
51994
52001
|
approved: [],
|
|
51995
52002
|
rejected: [],
|
|
@@ -52031,7 +52038,7 @@ var _internals56 = {
|
|
|
52031
52038
|
return result;
|
|
52032
52039
|
},
|
|
52033
52040
|
readPriorDriftReports: async (directory) => {
|
|
52034
|
-
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-
|
|
52041
|
+
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-tzr8cq9d.js");
|
|
52035
52042
|
return readPriorDriftReports2(directory);
|
|
52036
52043
|
},
|
|
52037
52044
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -61834,9 +61841,9 @@ var _internals66 = {
|
|
|
61834
61841
|
loadPluginConfigWithMeta,
|
|
61835
61842
|
loadCuratorDeps: async () => {
|
|
61836
61843
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
|
|
61837
|
-
import("./schema-
|
|
61838
|
-
import("./curator-
|
|
61839
|
-
import("./curator-llm-factory-
|
|
61844
|
+
import("./schema-t1xwd728.js"),
|
|
61845
|
+
import("./curator-sw5w1yxn.js"),
|
|
61846
|
+
import("./curator-llm-factory-vwxengt1.js")
|
|
61840
61847
|
]);
|
|
61841
61848
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
|
|
61842
61849
|
}
|
|
@@ -63522,6 +63529,33 @@ import { readdir as readdir5 } from "fs/promises";
|
|
|
63522
63529
|
init_path_identity();
|
|
63523
63530
|
init_logger();
|
|
63524
63531
|
|
|
63532
|
+
// src/workflow/session-view.ts
|
|
63533
|
+
function applySessionWorkflowView(session, taskId, workflow) {
|
|
63534
|
+
session.taskWorkflowStates.set(taskId, workflow.state);
|
|
63535
|
+
session.stageBCompletion?.delete(taskId);
|
|
63536
|
+
session.taskCouncilApproved?.delete(taskId);
|
|
63537
|
+
session.taskCouncilWorkflowGeneration?.delete(taskId);
|
|
63538
|
+
updateTaskWorkflowCache(session, taskId, workflow);
|
|
63539
|
+
}
|
|
63540
|
+
var STAGE_A_RECOVERED_STATES = [
|
|
63541
|
+
"pre_check_passed",
|
|
63542
|
+
"reviewer_run",
|
|
63543
|
+
"tests_run"
|
|
63544
|
+
];
|
|
63545
|
+
function isStageARecoveredState(state) {
|
|
63546
|
+
return STAGE_A_RECOVERED_STATES.includes(state);
|
|
63547
|
+
}
|
|
63548
|
+
function shouldRefreshStageARecoveryView(view, recoveredState) {
|
|
63549
|
+
if (view === undefined)
|
|
63550
|
+
return true;
|
|
63551
|
+
if (view === "rework_required" || view === "blocked")
|
|
63552
|
+
return true;
|
|
63553
|
+
if (view === "tests_run" || view === "closed" || view === "complete") {
|
|
63554
|
+
return false;
|
|
63555
|
+
}
|
|
63556
|
+
return compareTaskWorkflowStateRank(recoveredState, view) > 0;
|
|
63557
|
+
}
|
|
63558
|
+
|
|
63525
63559
|
// src/workflow/task-recovery-status.ts
|
|
63526
63560
|
init_path_identity();
|
|
63527
63561
|
function identitySuffix(status) {
|
|
@@ -63823,6 +63857,7 @@ async function scanWedgedStageA(directory, options) {
|
|
|
63823
63857
|
}
|
|
63824
63858
|
async function repairWedgedStageA(directory, options) {
|
|
63825
63859
|
const requested = options?.taskIds;
|
|
63860
|
+
const refreshSession = options?.sessionId ? getAgentSession(options.sessionId) : undefined;
|
|
63826
63861
|
const { selected, truncated } = await enumerateStageACandidates(directory, requested);
|
|
63827
63862
|
const { states: walStates } = await listCoderSettlementWalStates(directory);
|
|
63828
63863
|
const results = [];
|
|
@@ -63830,6 +63865,12 @@ async function repairWedgedStageA(directory, options) {
|
|
|
63830
63865
|
try {
|
|
63831
63866
|
const scan = await scanStageATask(directory, taskId, walStates);
|
|
63832
63867
|
if (scan.kind === "not_wedged") {
|
|
63868
|
+
if (refreshSession && isStageARecoveredState(scan.state)) {
|
|
63869
|
+
const snapshot = getTaskWorkflowSnapshot(await readTaskEvidence(directory, taskId));
|
|
63870
|
+
if (snapshot.authoritative && isStageARecoveredState(snapshot.state) && shouldRefreshStageARecoveryView(refreshSession.taskWorkflowStates.get(taskId), snapshot.state)) {
|
|
63871
|
+
applySessionWorkflowView(refreshSession, taskId, snapshot);
|
|
63872
|
+
}
|
|
63873
|
+
}
|
|
63833
63874
|
results.push({
|
|
63834
63875
|
taskId,
|
|
63835
63876
|
outcome: "skipped_not_wedged",
|
|
@@ -63846,12 +63887,18 @@ async function repairWedgedStageA(directory, options) {
|
|
|
63846
63887
|
continue;
|
|
63847
63888
|
}
|
|
63848
63889
|
const transitionId = `stage-a-repair:${taskId}:${scan.generation}`;
|
|
63849
|
-
const { duplicated } = await transitionTaskWorkflowEvidenceWithStatus(directory, taskId, {
|
|
63890
|
+
const { evidence: updatedEvidence, duplicated } = await transitionTaskWorkflowEvidenceWithStatus(directory, taskId, {
|
|
63850
63891
|
type: "stage_a_passed",
|
|
63851
63892
|
...scan.mode === "settlement_wedge" ? { settlementRecovery: true } : {},
|
|
63852
63893
|
expectedGeneration: scan.generation,
|
|
63853
63894
|
transitionId
|
|
63854
63895
|
});
|
|
63896
|
+
if (refreshSession) {
|
|
63897
|
+
const snapshot = getTaskWorkflowSnapshot(updatedEvidence);
|
|
63898
|
+
if (isStageARecoveredState(snapshot.state) && shouldRefreshStageARecoveryView(refreshSession.taskWorkflowStates.get(taskId), snapshot.state)) {
|
|
63899
|
+
applySessionWorkflowView(refreshSession, taskId, snapshot);
|
|
63900
|
+
}
|
|
63901
|
+
}
|
|
63855
63902
|
if (!duplicated) {
|
|
63856
63903
|
await appendStageARepairEvent(directory, {
|
|
63857
63904
|
action: "repaired",
|
|
@@ -64234,7 +64281,7 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64234
64281
|
let scanCompleted = false;
|
|
64235
64282
|
let scanRemaining = 0;
|
|
64236
64283
|
try {
|
|
64237
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
64284
|
+
const { getScanStatus } = await import("./scan-cursor-phbwfaya.js");
|
|
64238
64285
|
const status = await getScanStatus(directory);
|
|
64239
64286
|
scanGeneration = status.generation;
|
|
64240
64287
|
scanCompleted = status.completed;
|
|
@@ -64244,10 +64291,10 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
64244
64291
|
try {
|
|
64245
64292
|
const { isLinked: isLinked2 } = await import("./knowledge-link-h4pdcnya.js");
|
|
64246
64293
|
if (isLinked2(directory)) {
|
|
64247
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
64294
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-t1xwd728.js");
|
|
64248
64295
|
let config;
|
|
64249
64296
|
try {
|
|
64250
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
64297
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-g0we5tpv.js");
|
|
64251
64298
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
64252
64299
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
64253
64300
|
} catch {
|
|
@@ -65703,7 +65750,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65703
65750
|
const result = runConfigDoctor(config, directory, planParallelizationEnabled);
|
|
65704
65751
|
let output;
|
|
65705
65752
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
65706
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
65753
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-482f83pc.js");
|
|
65707
65754
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
65708
65755
|
applyLossy: true
|
|
65709
65756
|
});
|
|
@@ -65741,7 +65788,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65741
65788
|
`;
|
|
65742
65789
|
}
|
|
65743
65790
|
try {
|
|
65744
|
-
const { runModelPreflight } = await import("./model-preflight-
|
|
65791
|
+
const { runModelPreflight } = await import("./model-preflight-m3v8hn9k.js");
|
|
65745
65792
|
const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
|
|
65746
65793
|
const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
|
|
65747
65794
|
const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
|
|
@@ -65775,7 +65822,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
65775
65822
|
}
|
|
65776
65823
|
} catch {}
|
|
65777
65824
|
try {
|
|
65778
|
-
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-
|
|
65825
|
+
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-78hqh9ds.js");
|
|
65779
65826
|
output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
|
|
65780
65827
|
} catch {}
|
|
65781
65828
|
const strayDirs = detectStraySwarmDirs(directory);
|
|
@@ -66672,7 +66719,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
66672
66719
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
66673
66720
|
}
|
|
66674
66721
|
async function handleEvidenceSummaryCommand(directory) {
|
|
66675
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
66722
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-dpx7844s.js");
|
|
66676
66723
|
const artifact = await buildEvidenceSummary(directory);
|
|
66677
66724
|
if (!artifact) {
|
|
66678
66725
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -91119,7 +91166,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
91119
91166
|
}
|
|
91120
91167
|
const sdkOpts = signal ? { signal } : {};
|
|
91121
91168
|
try {
|
|
91122
|
-
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-
|
|
91169
|
+
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-ddgmj923.js");
|
|
91123
91170
|
const createResult = await client.session.create({
|
|
91124
91171
|
...sessionId ? {
|
|
91125
91172
|
body: {
|
|
@@ -93456,7 +93503,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
|
|
|
93456
93503
|
clearedEvents: []
|
|
93457
93504
|
};
|
|
93458
93505
|
try {
|
|
93459
|
-
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-
|
|
93506
|
+
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-mx9t1p5j.js");
|
|
93460
93507
|
await cancelPrFeedbackPublication2(directory, sessionID, reason);
|
|
93461
93508
|
} catch (err) {
|
|
93462
93509
|
warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -94757,8 +94804,12 @@ var BIN_DIRECTORY = ".bin";
|
|
|
94757
94804
|
var MAX_PACKAGE_MANIFEST_BYTES = 256 * 1024;
|
|
94758
94805
|
var MAX_PATH_SHIM_BYTES = 64 * 1024;
|
|
94759
94806
|
var UNSAFE_SHELL_WRAPPER_EXTENSIONS = new Set([".bat", ".cmd", ".ps1"]);
|
|
94760
|
-
var
|
|
94761
|
-
|
|
94807
|
+
var lintWindowsBatchDeps = {
|
|
94808
|
+
platform: () => _internals106.platform(),
|
|
94809
|
+
comSpec: () => _internals106.comSpec(),
|
|
94810
|
+
realpathSync: (candidate2) => _internals106.realpathSync(candidate2),
|
|
94811
|
+
statSync: (candidate2) => _internals106.statSync(candidate2)
|
|
94812
|
+
};
|
|
94762
94813
|
var LINTER_PACKAGES = {
|
|
94763
94814
|
biome: "@biomejs/biome",
|
|
94764
94815
|
eslint: "eslint"
|
|
@@ -95184,62 +95235,17 @@ function resolveAdditionalExecutable(name) {
|
|
|
95184
95235
|
}
|
|
95185
95236
|
return resolveExecutableFromPath([`${name}.exe`], _internals106.pathEnv(), platform);
|
|
95186
95237
|
}
|
|
95187
|
-
function
|
|
95188
|
-
|
|
95189
|
-
if (!candidate2 || !path128.isAbsolute(candidate2) || path128.basename(candidate2).toLowerCase() !== "cmd.exe" || !isRegularFile(candidate2)) {
|
|
95190
|
-
return null;
|
|
95191
|
-
}
|
|
95192
|
-
try {
|
|
95193
|
-
const canonical = _internals106.realpathSync(candidate2);
|
|
95194
|
-
return path128.basename(canonical).toLowerCase() === "cmd.exe" ? canonical : null;
|
|
95195
|
-
} catch {
|
|
95196
|
-
return null;
|
|
95197
|
-
}
|
|
95198
|
-
}
|
|
95199
|
-
function buildWindowsBatchCommand(wrapperPath, args) {
|
|
95200
|
-
const interpreter = resolveWindowsCommandInterpreter();
|
|
95201
|
-
if (!interpreter)
|
|
95202
|
-
return null;
|
|
95203
|
-
let canonicalWrapper;
|
|
95204
|
-
try {
|
|
95205
|
-
canonicalWrapper = _internals106.realpathSync(wrapperPath);
|
|
95206
|
-
} catch {
|
|
95207
|
-
return null;
|
|
95208
|
-
}
|
|
95209
|
-
if (!isRegularFile(canonicalWrapper) || !WINDOWS_BATCH_WRAPPER_EXTENSIONS.includes(path128.extname(canonicalWrapper).toLowerCase())) {
|
|
95210
|
-
return null;
|
|
95211
|
-
}
|
|
95212
|
-
const tokens = [canonicalWrapper, ...args];
|
|
95213
|
-
if (tokens.some((token) => WINDOWS_CMD_UNSAFE_TOKEN.test(token)))
|
|
95214
|
-
return null;
|
|
95215
|
-
const command = `call ${tokens.map((token) => `"${token}"`).join(" ")}`;
|
|
95216
|
-
return [interpreter, "/d", "/s", "/v:off", "/c", command];
|
|
95238
|
+
function buildWindowsBatchCommand2(wrapperPath, args) {
|
|
95239
|
+
return buildWindowsBatchCommand(wrapperPath, args, lintWindowsBatchDeps);
|
|
95217
95240
|
}
|
|
95218
95241
|
function resolveWindowsBatchCommandFromPath(name, args) {
|
|
95219
95242
|
if (_internals106.platform() !== "win32")
|
|
95220
95243
|
return null;
|
|
95221
95244
|
const wrapper = resolveExecutableFromPath(WINDOWS_BATCH_WRAPPER_EXTENSIONS.map((extension) => `${name}${extension}`), _internals106.pathEnv(), "win32");
|
|
95222
|
-
return wrapper ?
|
|
95245
|
+
return wrapper ? buildWindowsBatchCommand2(wrapper, args) : null;
|
|
95223
95246
|
}
|
|
95224
|
-
function
|
|
95225
|
-
|
|
95226
|
-
return null;
|
|
95227
|
-
const candidate2 = path128.join(cwd, fileName);
|
|
95228
|
-
if (!isRegularFile(candidate2))
|
|
95229
|
-
return null;
|
|
95230
|
-
let canonicalCwd;
|
|
95231
|
-
let canonicalCandidate;
|
|
95232
|
-
try {
|
|
95233
|
-
canonicalCwd = _internals106.realpathSync(cwd);
|
|
95234
|
-
canonicalCandidate = _internals106.realpathSync(candidate2);
|
|
95235
|
-
} catch {
|
|
95236
|
-
return null;
|
|
95237
|
-
}
|
|
95238
|
-
const relative22 = path128.relative(canonicalCwd, canonicalCandidate);
|
|
95239
|
-
if (relative22 === "" || relative22.startsWith("..") || path128.isAbsolute(relative22)) {
|
|
95240
|
-
return null;
|
|
95241
|
-
}
|
|
95242
|
-
return buildWindowsBatchCommand(canonicalCandidate, args);
|
|
95247
|
+
function resolveContainedWindowsBatchCommand2(cwd, fileName, args) {
|
|
95248
|
+
return resolveContainedWindowsBatchCommand(cwd, fileName, args, lintWindowsBatchDeps);
|
|
95243
95249
|
}
|
|
95244
95250
|
function buildAdditionalCommand(name, args) {
|
|
95245
95251
|
const executable = resolveAdditionalExecutable(name);
|
|
@@ -95268,7 +95274,7 @@ function resolveCheckstyleCommand(cwd) {
|
|
|
95268
95274
|
const hasGradleSignal = hasCheckstyleGradleSignal(cwd);
|
|
95269
95275
|
if (hasGradleSignal) {
|
|
95270
95276
|
if (_internals106.platform() === "win32") {
|
|
95271
|
-
const gradlew =
|
|
95277
|
+
const gradlew = resolveContainedWindowsBatchCommand2(cwd, "gradlew.bat", [
|
|
95272
95278
|
"checkstyleMain"
|
|
95273
95279
|
]);
|
|
95274
95280
|
if (gradlew)
|
|
@@ -98062,6 +98068,7 @@ var MAX_SAFE_SOURCE_FILES = 1;
|
|
|
98062
98068
|
var MAX_RAW_FILE_ENTRIES = 512;
|
|
98063
98069
|
var MAX_FILE_PATH_LENGTH2 = 4096;
|
|
98064
98070
|
var MAX_GRAPH_FILE_BYTES = 4 * 1024 * 1024;
|
|
98071
|
+
var MAX_MAVEN_MODULE_PROBE_ENTRIES = 100;
|
|
98065
98072
|
var DEFAULT_LOAD_IMPACT_MAP = loadImpactMap;
|
|
98066
98073
|
async function estimateFanOut(sourceFiles, cwd) {
|
|
98067
98074
|
try {
|
|
@@ -98444,7 +98451,7 @@ var DISPATCH_FRAMEWORK_MAP = {
|
|
|
98444
98451
|
};
|
|
98445
98452
|
async function detectTestFrameworkViaDispatch(cwd) {
|
|
98446
98453
|
try {
|
|
98447
|
-
const { pickBackend } = await import("./dispatch-
|
|
98454
|
+
const { pickBackend } = await import("./dispatch-h8m1jntz.js");
|
|
98448
98455
|
const backend = await pickBackend(cwd);
|
|
98449
98456
|
if (!backend?.selectTestFramework)
|
|
98450
98457
|
return "none";
|
|
@@ -98460,7 +98467,7 @@ async function buildTestCommandViaDispatch(framework, scope, files, coverage, ba
|
|
|
98460
98467
|
if (framework === "none")
|
|
98461
98468
|
return null;
|
|
98462
98469
|
try {
|
|
98463
|
-
const { pickBackend } = await import("./dispatch-
|
|
98470
|
+
const { pickBackend } = await import("./dispatch-h8m1jntz.js");
|
|
98464
98471
|
const backend = await pickBackend(baseDir);
|
|
98465
98472
|
if (backend?.buildTestCommand) {
|
|
98466
98473
|
const cmd = backend.buildTestCommand(framework, files, baseDir, {
|
|
@@ -98482,7 +98489,7 @@ async function parseTestOutputViaDispatch(framework, output, baseDir) {
|
|
|
98482
98489
|
if (framework === "none")
|
|
98483
98490
|
return null;
|
|
98484
98491
|
try {
|
|
98485
|
-
const { pickBackend } = await import("./dispatch-
|
|
98492
|
+
const { pickBackend } = await import("./dispatch-h8m1jntz.js");
|
|
98486
98493
|
const backend = await pickBackend(baseDir);
|
|
98487
98494
|
if (!backend?.parseTestOutput)
|
|
98488
98495
|
return null;
|
|
@@ -98502,7 +98509,82 @@ async function parseTestOutputViaDispatch(framework, output, baseDir) {
|
|
|
98502
98509
|
return null;
|
|
98503
98510
|
}
|
|
98504
98511
|
}
|
|
98505
|
-
|
|
98512
|
+
function relativeEscapesRoot(relative24) {
|
|
98513
|
+
return relative24 === ".." || relative24.startsWith(`..${path132.sep}`) || path132.isAbsolute(relative24);
|
|
98514
|
+
}
|
|
98515
|
+
function resolveMavenModuleDir(root, files) {
|
|
98516
|
+
const resolvedRoot = path132.resolve(root);
|
|
98517
|
+
let rootReal;
|
|
98518
|
+
const isContainedModuleDir = (dir) => {
|
|
98519
|
+
if (rootReal === undefined) {
|
|
98520
|
+
try {
|
|
98521
|
+
rootReal = _internals110.realpathSync(resolvedRoot);
|
|
98522
|
+
} catch {
|
|
98523
|
+
rootReal = null;
|
|
98524
|
+
}
|
|
98525
|
+
}
|
|
98526
|
+
if (rootReal === null)
|
|
98527
|
+
return false;
|
|
98528
|
+
let dirReal;
|
|
98529
|
+
try {
|
|
98530
|
+
dirReal = _internals110.realpathSync(dir);
|
|
98531
|
+
} catch {
|
|
98532
|
+
return false;
|
|
98533
|
+
}
|
|
98534
|
+
return !relativeEscapesRoot(path132.relative(rootReal, dirReal));
|
|
98535
|
+
};
|
|
98536
|
+
if (files && files.length > 0) {
|
|
98537
|
+
for (const file of files) {
|
|
98538
|
+
const resolvedFile = path132.resolve(resolvedRoot, file);
|
|
98539
|
+
const relativeToRoot = path132.relative(resolvedRoot, resolvedFile);
|
|
98540
|
+
if (relativeEscapesRoot(relativeToRoot)) {
|
|
98541
|
+
continue;
|
|
98542
|
+
}
|
|
98543
|
+
let current = path132.dirname(resolvedFile);
|
|
98544
|
+
while (true) {
|
|
98545
|
+
if (_internals110.existsSync(path132.join(current, "pom.xml")) && isContainedModuleDir(current)) {
|
|
98546
|
+
return current;
|
|
98547
|
+
}
|
|
98548
|
+
if (current === resolvedRoot)
|
|
98549
|
+
break;
|
|
98550
|
+
const parent = path132.dirname(current);
|
|
98551
|
+
if (parent === current)
|
|
98552
|
+
break;
|
|
98553
|
+
if (relativeEscapesRoot(path132.relative(resolvedRoot, parent))) {
|
|
98554
|
+
break;
|
|
98555
|
+
}
|
|
98556
|
+
current = parent;
|
|
98557
|
+
}
|
|
98558
|
+
}
|
|
98559
|
+
return null;
|
|
98560
|
+
}
|
|
98561
|
+
let entries2;
|
|
98562
|
+
try {
|
|
98563
|
+
entries2 = _internals110.readdirSync(resolvedRoot);
|
|
98564
|
+
} catch {
|
|
98565
|
+
return null;
|
|
98566
|
+
}
|
|
98567
|
+
entries2.sort((a, b) => a.localeCompare(b));
|
|
98568
|
+
let inspected = 0;
|
|
98569
|
+
for (const entry of entries2) {
|
|
98570
|
+
if (entry.startsWith(".") || entry === "node_modules")
|
|
98571
|
+
continue;
|
|
98572
|
+
if (inspected >= MAX_MAVEN_MODULE_PROBE_ENTRIES)
|
|
98573
|
+
break;
|
|
98574
|
+
inspected++;
|
|
98575
|
+
const candidate2 = path132.join(resolvedRoot, entry);
|
|
98576
|
+
if (_internals110.existsSync(path132.join(candidate2, "pom.xml")) && isContainedModuleDir(candidate2)) {
|
|
98577
|
+
return candidate2;
|
|
98578
|
+
}
|
|
98579
|
+
}
|
|
98580
|
+
return null;
|
|
98581
|
+
}
|
|
98582
|
+
function resolveNestedMavenModuleDir(root, files) {
|
|
98583
|
+
if (_internals110.existsSync(path132.join(root, "pom.xml")))
|
|
98584
|
+
return null;
|
|
98585
|
+
return resolveMavenModuleDir(root, files);
|
|
98586
|
+
}
|
|
98587
|
+
async function detectTestFramework(cwd, files) {
|
|
98506
98588
|
const baseDir = cwd;
|
|
98507
98589
|
try {
|
|
98508
98590
|
const packageJsonPath = path132.join(baseDir, "package.json");
|
|
@@ -98594,6 +98676,10 @@ async function detectTestFramework(cwd) {
|
|
|
98594
98676
|
return "rspec";
|
|
98595
98677
|
if (detectMinitest(baseDir))
|
|
98596
98678
|
return "minitest";
|
|
98679
|
+
const mavenModuleDir = resolveNestedMavenModuleDir(baseDir, files);
|
|
98680
|
+
if (mavenModuleDir && (_internals110.isCommandAvailable("mvn") || resolveMavenWrapperCommand(mavenModuleDir, ["test"]) !== null)) {
|
|
98681
|
+
return "maven";
|
|
98682
|
+
}
|
|
98597
98683
|
return "none";
|
|
98598
98684
|
}
|
|
98599
98685
|
function detectPhpTest(cwd) {
|
|
@@ -98985,30 +99071,10 @@ function buildTestCommand(framework, scope, files, coverage, baseDir, bail, targ
|
|
|
98985
99071
|
return args;
|
|
98986
99072
|
}
|
|
98987
99073
|
case "maven": {
|
|
98988
|
-
|
|
98989
|
-
if (targets && targets.length > 0) {
|
|
98990
|
-
args.push(`-Dtest=${targets.join(",")}`);
|
|
98991
|
-
}
|
|
98992
|
-
return args;
|
|
99074
|
+
return buildMavenTestCommand(baseDir, targets);
|
|
98993
99075
|
}
|
|
98994
99076
|
case "gradle": {
|
|
98995
|
-
|
|
98996
|
-
const hasGradlewBat = fs68.existsSync(path132.join(baseDir, "gradlew.bat"));
|
|
98997
|
-
const hasGradlew = fs68.existsSync(path132.join(baseDir, "gradlew"));
|
|
98998
|
-
const args = [];
|
|
98999
|
-
if (hasGradlewBat && isWindows)
|
|
99000
|
-
args.push("gradlew.bat");
|
|
99001
|
-
else if (hasGradlew)
|
|
99002
|
-
args.push("./gradlew");
|
|
99003
|
-
else
|
|
99004
|
-
args.push("gradle");
|
|
99005
|
-
args.push("test");
|
|
99006
|
-
if (targets && targets.length > 0) {
|
|
99007
|
-
for (const target of targets) {
|
|
99008
|
-
args.push("--tests", target);
|
|
99009
|
-
}
|
|
99010
|
-
}
|
|
99011
|
-
return args;
|
|
99077
|
+
return buildGradleTestCommand(baseDir, targets);
|
|
99012
99078
|
}
|
|
99013
99079
|
case "dotnet-test": {
|
|
99014
99080
|
const args = ["dotnet", "test"];
|
|
@@ -99597,7 +99663,8 @@ async function runTests(framework, scope, files, coverage, timeout_ms, cwd, bail
|
|
|
99597
99663
|
stderr: "pipe",
|
|
99598
99664
|
cwd: executionCwd,
|
|
99599
99665
|
timeout: timeout_ms,
|
|
99600
|
-
killProcessTree: true
|
|
99666
|
+
killProcessTree: true,
|
|
99667
|
+
...isWindowsCommandInterpreterLaunch(command) ? { windowsVerbatimArguments: true } : {}
|
|
99601
99668
|
});
|
|
99602
99669
|
const stdoutPromise = readBoundedStream2(proc.stdout, MAX_OUTPUT_BYTES5);
|
|
99603
99670
|
const stderrPromise = readBoundedStream2(proc.stderr, MAX_OUTPUT_BYTES5);
|
|
@@ -99653,8 +99720,9 @@ async function runTests(framework, scope, files, coverage, timeout_ms, cwd, bail
|
|
|
99653
99720
|
totals.total = parsedTestCases.length;
|
|
99654
99721
|
}
|
|
99655
99722
|
const isTimeout = timedOutByDeadline;
|
|
99723
|
+
const spawnFailure = proc.spawnError;
|
|
99656
99724
|
const nativeTargetObserved = resolvedNativeTarget ? didExecuteNativeTarget(resolvedNativeTarget, output) : true;
|
|
99657
|
-
const testPassed = exitCode === 0 && !isTimeout && totals.failed === 0 && nativeTargetObserved;
|
|
99725
|
+
const testPassed = exitCode === 0 && !isTimeout && !spawnFailure && totals.failed === 0 && nativeTargetObserved;
|
|
99658
99726
|
if (testPassed) {
|
|
99659
99727
|
const result = {
|
|
99660
99728
|
success: true,
|
|
@@ -99683,9 +99751,9 @@ async function runTests(framework, scope, files, coverage, timeout_ms, cwd, bail
|
|
|
99683
99751
|
duration_ms,
|
|
99684
99752
|
totals,
|
|
99685
99753
|
rawOutput: output,
|
|
99686
|
-
error: isTimeout ? `Tests timed out after ${timeout_ms}ms` : !nativeTargetObserved ? `Native target "${resolvedNativeTarget?.name}" did not execute` : `Tests failed with ${totals.failed} failures`,
|
|
99687
|
-
message: isTimeout ? `${framework} tests timed out after ${timeout_ms}ms` : !nativeTargetObserved ? `${framework} did not report the exact requested native target; refusing a false-green 0/0 result` : `${framework} tests failed (${totals.failed}/${totals.total} failed)`,
|
|
99688
|
-
outcome: isTimeout ? "error" : "regression",
|
|
99754
|
+
error: spawnFailure ? `Test command failed to launch: ${spawnFailure.message}` : isTimeout ? `Tests timed out after ${timeout_ms}ms` : !nativeTargetObserved ? `Native target "${resolvedNativeTarget?.name}" did not execute` : `Tests failed with ${totals.failed} failures`,
|
|
99755
|
+
message: spawnFailure ? `${framework} test process could not be started: ${spawnFailure.message} \u2014 a launch failure (for example a missing executable or unusable working directory), not a test regression. Check the command, PATH, and cwd instead of the tests.` : isTimeout ? `${framework} tests timed out after ${timeout_ms}ms` : !nativeTargetObserved ? `${framework} did not report the exact requested native target; refusing a false-green 0/0 result` : `${framework} tests failed (${totals.failed}/${totals.total} failed)`,
|
|
99756
|
+
outcome: spawnFailure || isTimeout ? "error" : "regression",
|
|
99689
99757
|
testCases: parsedTestCases
|
|
99690
99758
|
};
|
|
99691
99759
|
if (coveragePercent !== undefined) {
|
|
@@ -99893,7 +99961,7 @@ var test_runner = createSwarmTool({
|
|
|
99893
99961
|
path: exports_external.string()
|
|
99894
99962
|
}).optional().describe('For scope "target": exact framework-native test name plus a workspace-relative package/build directory. Absolute paths, traversal, coverage, bail, and broad fallback are rejected.'),
|
|
99895
99963
|
files: exports_external.array(exports_external.string().min(1).max(MAX_FILE_PATH_LENGTH2)).max(MAX_RAW_FILE_ENTRIES).optional().describe('Specific files to test. For "convention", pass source files or direct test files. For "graph" and "impact", pass source files only.'),
|
|
99896
|
-
targets: exports_external.array(exports_external.string()).optional().describe("Framework-native test names or patterns to filter which tests run. Supported by cargo, go-test, maven, gradle, dotnet-test, ctest, and swift-test. Each entry is passed as-is to the framework's native filter flag."),
|
|
99964
|
+
targets: exports_external.array(exports_external.string()).optional().describe("Framework-native test names or patterns to filter which tests run. Supported by cargo, go-test, maven, gradle, dotnet-test, ctest, and swift-test. Each entry is passed as-is to the framework's native filter flag. Targets only filter a files-driven selection \u2014 provide a non-empty files array for the convention, graph, and impact scopes; targets alone cannot drive discovery."),
|
|
99897
99965
|
coverage: exports_external.boolean().optional().describe("Enable coverage reporting if supported"),
|
|
99898
99966
|
bail: exports_external.boolean().optional().describe("Stop running tests after the first failure. Default false. Note: coverage may be incomplete when bail=true with coverage=true."),
|
|
99899
99967
|
timeout_ms: exports_external.number().int().min(1).default(DEFAULT_TIMEOUT_MS3).describe("Timeout in milliseconds (default 60000, max 300000)"),
|
|
@@ -100000,13 +100068,13 @@ var test_runner = createSwarmTool({
|
|
|
100000
100068
|
return JSON.stringify(errorResult, null, 2);
|
|
100001
100069
|
}
|
|
100002
100070
|
}
|
|
100003
|
-
if ((scope === "convention" || scope === "graph" || scope === "impact") && (!args.files || args.files.length === 0)
|
|
100071
|
+
if ((scope === "convention" || scope === "graph" || scope === "impact") && (!args.files || args.files.length === 0)) {
|
|
100004
100072
|
const errorResult = {
|
|
100005
100073
|
success: false,
|
|
100006
100074
|
framework: "none",
|
|
100007
100075
|
scope,
|
|
100008
|
-
error: 'scope "convention", "graph", and "impact" require
|
|
100009
|
-
message: 'When using scope "convention", "graph", or "impact",
|
|
100076
|
+
error: 'scope "convention", "graph", and "impact" require a non-empty files array - targets only filter which tests run and cannot substitute for files (omitting files causes unsafe full-project discovery)',
|
|
100077
|
+
message: 'When using scope "convention", "graph", or "impact", provide at least one source or direct-test file in "files"; "targets" only filter which tests run within that selection and cannot drive discovery on their own. Example: { scope: "convention", files: ["tests/test_calc.py"] }',
|
|
100010
100078
|
outcome: "error",
|
|
100011
100079
|
resolution: makeResolution(scope, scope, [], [], "skip", workingDir)
|
|
100012
100080
|
};
|
|
@@ -100023,10 +100091,10 @@ var test_runner = createSwarmTool({
|
|
|
100023
100091
|
} else if (useDispatch) {
|
|
100024
100092
|
framework = await detectTestFrameworkViaDispatch(workingDir);
|
|
100025
100093
|
if (framework === "none") {
|
|
100026
|
-
framework = await detectTestFramework(workingDir);
|
|
100094
|
+
framework = await detectTestFramework(workingDir, _files);
|
|
100027
100095
|
}
|
|
100028
100096
|
} else {
|
|
100029
|
-
framework = await detectTestFramework(workingDir);
|
|
100097
|
+
framework = await detectTestFramework(workingDir, _files);
|
|
100030
100098
|
}
|
|
100031
100099
|
if (framework === "none") {
|
|
100032
100100
|
const result2 = {
|
|
@@ -100048,6 +100116,12 @@ var test_runner = createSwarmTool({
|
|
|
100048
100116
|
};
|
|
100049
100117
|
return JSON.stringify(result2, null, 2);
|
|
100050
100118
|
}
|
|
100119
|
+
if (scope !== "target" && framework === "maven") {
|
|
100120
|
+
const mavenModuleDir = resolveNestedMavenModuleDir(workingDir, _files);
|
|
100121
|
+
if (mavenModuleDir) {
|
|
100122
|
+
nativeExecutionDirectory = mavenModuleDir;
|
|
100123
|
+
}
|
|
100124
|
+
}
|
|
100051
100125
|
let testFiles = [];
|
|
100052
100126
|
let graphFallbackReason;
|
|
100053
100127
|
let effectiveScope = scope;
|
|
@@ -100055,14 +100129,14 @@ var test_runner = createSwarmTool({
|
|
|
100055
100129
|
let selectionCacheStatus;
|
|
100056
100130
|
let selectionSourceFiles = [];
|
|
100057
100131
|
if (scope === "target") {} else if (scope === "all") {} else if (scope === "convention") {
|
|
100058
|
-
const directTestFiles =
|
|
100059
|
-
const sourceFiles =
|
|
100132
|
+
const directTestFiles = _files.filter((file) => isConventionTestFilePath(file));
|
|
100133
|
+
const sourceFiles = _files.filter((file) => {
|
|
100060
100134
|
if (directTestFiles.includes(file))
|
|
100061
100135
|
return false;
|
|
100062
100136
|
const ext = path132.extname(file).toLowerCase();
|
|
100063
100137
|
return SOURCE_EXTENSIONS.has(ext);
|
|
100064
100138
|
});
|
|
100065
|
-
const invalidFiles =
|
|
100139
|
+
const invalidFiles = _files.filter((file) => !directTestFiles.includes(file) && !sourceFiles.includes(file));
|
|
100066
100140
|
if (directTestFiles.length === 0 && sourceFiles.length === 0) {
|
|
100067
100141
|
const errorResult = {
|
|
100068
100142
|
success: false,
|
|
@@ -100085,7 +100159,7 @@ var test_runner = createSwarmTool({
|
|
|
100085
100159
|
};
|
|
100086
100160
|
return JSON.stringify(errorResult, null, 2);
|
|
100087
100161
|
}
|
|
100088
|
-
selectionSourceFiles = normalizeSelectionFiles(
|
|
100162
|
+
selectionSourceFiles = normalizeSelectionFiles(_files, workingDir);
|
|
100089
100163
|
if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
|
|
100090
100164
|
const errorResult = {
|
|
100091
100165
|
success: false,
|
|
@@ -100103,7 +100177,7 @@ var test_runner = createSwarmTool({
|
|
|
100103
100177
|
...getTestFilesFromConvention(sourceFiles, workingDir)
|
|
100104
100178
|
].filter((file, index, items) => items.indexOf(file) === index);
|
|
100105
100179
|
} else if (scope === "graph") {
|
|
100106
|
-
const sourceFiles = normalizeSelectionFiles(
|
|
100180
|
+
const sourceFiles = normalizeSelectionFiles(_files.filter((f) => {
|
|
100107
100181
|
if (isConventionTestFilePath(f)) {
|
|
100108
100182
|
return false;
|
|
100109
100183
|
}
|
|
@@ -100146,7 +100220,7 @@ var test_runner = createSwarmTool({
|
|
|
100146
100220
|
testFiles = getTestFilesFromConvention(sourceFiles, workingDir).slice(0, MAX_SAFE_TEST_FILES2 + 1);
|
|
100147
100221
|
}
|
|
100148
100222
|
} else if (scope === "impact") {
|
|
100149
|
-
const sourceFiles = normalizeSelectionFiles(
|
|
100223
|
+
const sourceFiles = normalizeSelectionFiles(_files.filter((f) => {
|
|
100150
100224
|
if (isConventionTestFilePath(f)) {
|
|
100151
100225
|
return false;
|
|
100152
100226
|
}
|
|
@@ -100316,6 +100390,7 @@ var _internals110 = {
|
|
|
100316
100390
|
existsSync: fs68.existsSync,
|
|
100317
100391
|
readdirSync: fs68.readdirSync,
|
|
100318
100392
|
readFileSync: fs68.readFileSync,
|
|
100393
|
+
realpathSync: fs68.realpathSync,
|
|
100319
100394
|
resolveLocalNodeTool,
|
|
100320
100395
|
bunSpawn,
|
|
100321
100396
|
buildNativeTargetCommand,
|
|
@@ -101442,7 +101517,7 @@ function renderStageARepairOutcome(outcome) {
|
|
|
101442
101517
|
return `\u274C Task ${outcome.taskId}: unknown repair outcome`;
|
|
101443
101518
|
}
|
|
101444
101519
|
}
|
|
101445
|
-
async function handleRecoverCommand(directory, args) {
|
|
101520
|
+
async function handleRecoverCommand(directory, args, sessionID) {
|
|
101446
101521
|
const force = args.includes("--force");
|
|
101447
101522
|
if (args.includes("--coordination")) {
|
|
101448
101523
|
try {
|
|
@@ -101499,7 +101574,8 @@ async function handleRecoverCommand(directory, args) {
|
|
|
101499
101574
|
}
|
|
101500
101575
|
try {
|
|
101501
101576
|
const { results: repairResults, truncated: repairTruncated } = await repairWedgedStageA(directory, {
|
|
101502
|
-
...taskId ? { taskIds: [taskId] } : {}
|
|
101577
|
+
...taskId ? { taskIds: [taskId] } : {},
|
|
101578
|
+
...sessionID ? { sessionId: sessionID } : {}
|
|
101503
101579
|
});
|
|
101504
101580
|
const repaired = repairResults.filter((r) => r.outcome === "repaired");
|
|
101505
101581
|
if (repairResults.length > 0) {
|
|
@@ -109830,7 +109906,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
109830
109906
|
async function handleHelpCommand(ctx) {
|
|
109831
109907
|
const targetCommand = ctx.args.join(" ");
|
|
109832
109908
|
if (!targetCommand) {
|
|
109833
|
-
const { buildHelpText } = await import("./index-
|
|
109909
|
+
const { buildHelpText } = await import("./index-peyrzden.js");
|
|
109834
109910
|
return buildHelpText();
|
|
109835
109911
|
}
|
|
109836
109912
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -109844,7 +109920,7 @@ async function handleHelpCommand(ctx) {
|
|
|
109844
109920
|
> Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
|
|
109845
109921
|
}
|
|
109846
109922
|
const similar = _internals27.findSimilarCommands(targetCommand);
|
|
109847
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
109923
|
+
const { buildHelpText: fullHelp } = await import("./index-peyrzden.js");
|
|
109848
109924
|
if (similar.length > 0) {
|
|
109849
109925
|
return `Command '/swarm ${targetCommand}' not found.
|
|
109850
109926
|
|
|
@@ -110172,7 +110248,7 @@ var COMMAND_REGISTRY = {
|
|
|
110172
110248
|
},
|
|
110173
110249
|
"guardrail explain": {
|
|
110174
110250
|
handler: async (ctx) => {
|
|
110175
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
110251
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-020gkz5c.js");
|
|
110176
110252
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
110177
110253
|
},
|
|
110178
110254
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -110182,7 +110258,7 @@ var COMMAND_REGISTRY = {
|
|
|
110182
110258
|
},
|
|
110183
110259
|
"guardrail reset": {
|
|
110184
110260
|
handler: async (ctx) => {
|
|
110185
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
110261
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-cg6kfk8r.js");
|
|
110186
110262
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
110187
110263
|
},
|
|
110188
110264
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -110203,7 +110279,7 @@ var COMMAND_REGISTRY = {
|
|
|
110203
110279
|
},
|
|
110204
110280
|
"guardrail-log": {
|
|
110205
110281
|
handler: async (ctx) => {
|
|
110206
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
110282
|
+
const { handleGuardrailLog } = await import("./guardrail-log-z14b98cn.js");
|
|
110207
110283
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
110208
110284
|
},
|
|
110209
110285
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -110978,9 +111054,9 @@ Subcommands:
|
|
|
110978
111054
|
toolPolicy: "restricted"
|
|
110979
111055
|
},
|
|
110980
111056
|
recover: {
|
|
110981
|
-
handler: (ctx) => handleRecoverCommand(ctx.directory, ctx.args),
|
|
111057
|
+
handler: (ctx) => handleRecoverCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
110982
111058
|
description: "Recover wedged coder settlements [task_id] [--force]",
|
|
110983
|
-
details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014 and the settlement-wedge class (issue #2828): a task whose workflow drifted to idle or blocked while a COMMITTED accepted coder settlement and green post-settlement pre-check evidence still justify Stage A gets the missing stage_a_passed written directly, with a settlementRecovery marker and a stage_a_repair audit event in .swarm/events.jsonl; the architect-side audited escape hatch for the same receipts is the recover_stage_a_task tool. Note that --force affects only in-process settlement-WAL ownership and does not override Stage A wedge-classification refusals. Pass [task_id] to scope both phases to one task. Diagnose and repair emit per-category status explanations (missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge) with shell-correct invocation guidance per host \u2014 see docs/troubleshooting/recovery-runbook.md (#2665). Human-only.",
|
|
111059
|
+
details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014 and the settlement-wedge class (issue #2828): a task whose workflow drifted to idle or blocked while a COMMITTED accepted coder settlement and green post-settlement pre-check evidence still justify Stage A gets the missing stage_a_passed written directly, with a settlementRecovery marker and a stage_a_repair audit event in .swarm/events.jsonl; the architect-side audited escape hatch for the same receipts is the recover_stage_a_task tool. Both recovery surfaces also refresh the invoking session's in-memory task workflow view, so a blocked-start wedge does not survive the recovery in the session that ran it (#3043). Note that --force affects only in-process settlement-WAL ownership and does not override Stage A wedge-classification refusals. Pass [task_id] to scope both phases to one task. Diagnose and repair emit per-category status explanations (missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge) with shell-correct invocation guidance per host \u2014 see docs/troubleshooting/recovery-runbook.md (#2665). Human-only.",
|
|
110984
111060
|
args: "[task_id] [--force]",
|
|
110985
111061
|
category: "utility",
|
|
110986
111062
|
toolPolicy: "human-only"
|
|
@@ -114762,7 +114838,7 @@ EXECUTION BOUNDARY:
|
|
|
114762
114838
|
- scope: "all" is PROHIBITED for test_engineer \u2014 full-suite output can destabilize opencode's SSE streaming, and the architect handles regression sweeps separately via scope: "graph"
|
|
114763
114839
|
- If you need to verify tests beyond your assigned file, report the concern in your VERDICT and the architect will handle it
|
|
114764
114840
|
- If you wrote tests/foo.test.ts for src/foo.ts, you MUST run only tests/foo.test.ts
|
|
114765
|
-
- The test_runner convention scope recognises direct test files in supported locations/naming conventions: Python (test_*.py, *_test.py), Ruby (*_spec.rb), Java/Kotlin (*Test.*), C# (*Tests.cs), and PowerShell (*.Tests.ps1). For Go and CTest, use scope "target" with an exact framework-native name; never broaden to a package/build sweep. For target-based frameworks (cargo, maven, gradle, dotnet-test, swift-test), you may also pass framework-native test names or patterns in the \`targets\` array parameter alongside \`files
|
|
114841
|
+
- The test_runner convention scope recognises direct test files in supported locations/naming conventions: Python (test_*.py, *_test.py), Ruby (*_spec.rb), Java/Kotlin (*Test.*), C# (*Tests.cs), and PowerShell (*.Tests.ps1). For Go and CTest, use scope "target" with an exact framework-native name; never broaden to a package/build sweep. For target-based frameworks (cargo, maven, gradle, dotnet-test, swift-test), you may also pass framework-native test names or patterns in the \`targets\` array parameter alongside \`files\` (\`targets\` alone cannot drive discovery: the convention, graph, and impact scopes require a non-empty \`files\` array).
|
|
114766
114842
|
|
|
114767
114843
|
TOOL USAGE:
|
|
114768
114844
|
- Use \`test_runner\` tool for test execution
|