opencode-swarm 7.190.0 → 7.191.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/swarm-pr-review/SKILL.md +2 -2
- 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-qvk04fya.js → auto-checkpoint-rdwd6w8t.js} +6 -6
- package/dist/cli/{checkpoint-9q2r5c3j.js → checkpoint-jvccxnf3.js} +10 -10
- package/dist/cli/{coder-settlement-xcparbf3.js → coder-settlement-tezdqdzb.js} +4 -4
- package/dist/cli/{config-doctor-by0ak49m.js → config-doctor-48ehw0b0.js} +8 -8
- package/dist/cli/{core-b1b3kxzy.js → core-xevv38dk.js} +2 -2
- package/dist/cli/{curator-drift-6v604220.js → curator-drift-ej1s4fv9.js} +6 -6
- package/dist/cli/{curator-llm-factory-yvbktznk.js → curator-llm-factory-bx720pwc.js} +27 -27
- package/dist/cli/{curator-d7b88mzr.js → curator-xckkw7yt.js} +27 -27
- package/dist/cli/{doctor-knowledge-receipt-phase-id-kwrvnps9.js → doctor-knowledge-receipt-phase-id-89jrgknr.js} +6 -6
- package/dist/cli/{evidence-summary-service-mzr2q4bn.js → evidence-summary-service-b8jqdf13.js} +11 -11
- package/dist/cli/{gate-evidence-78jes9kq.js → gate-evidence-xcydwkha.js} +3 -3
- package/dist/cli/{guardrail-explain-8kt2mxmw.js → guardrail-explain-wvymt5na.js} +28 -28
- package/dist/cli/{guardrail-log-2sthykag.js → guardrail-log-5mmc2y1v.js} +4 -4
- package/dist/cli/{guardrail-reset-2n746rzv.js → guardrail-reset-8nje6gxk.js} +27 -27
- package/dist/cli/{hive-promoter-s7a5gwhz.js → hive-promoter-sd1h9vjg.js} +27 -27
- package/dist/cli/{index-3t9t9q2q.js → index-0331n4t3.js} +27 -27
- package/dist/cli/{index-t73adn9b.js → index-25p51rw2.js} +2 -2
- package/dist/cli/{index-0qc7a88d.js → index-2e2v96yk.js} +1 -1
- package/dist/cli/{index-kp8k95v9.js → index-46fe64s6.js} +5 -5
- package/dist/cli/{index-xyvrfram.js → index-4c7qdtcy.js} +1 -1
- package/dist/cli/{index-mp1s7b0n.js → index-4wsvkvhc.js} +4 -4
- package/dist/cli/{index-sm01zpqe.js → index-5y2y23ac.js} +29 -29
- package/dist/cli/{index-2kpqqcch.js → index-7r41s196.js} +1 -1
- package/dist/cli/{index-ej1hdw16.js → index-7rapcpgx.js} +2 -2
- package/dist/cli/{index-h0xhec3d.js → index-9mq96f00.js} +2 -2
- package/dist/cli/{index-ffgcdf49.js → index-ap0tkg3v.js} +198 -82
- package/dist/cli/{index-tkhenmms.js → index-aw4ex9kn.js} +4 -4
- package/dist/cli/{index-dmq7p8s9.js → index-evj271tm.js} +6 -6
- package/dist/cli/{index-p69k8v0e.js → index-hq84mfha.js} +1 -1
- package/dist/cli/{index-npe10823.js → index-hqdfm79v.js} +1 -1
- package/dist/cli/{index-pkhbd2t5.js → index-j5nhx6e8.js} +1 -0
- package/dist/cli/{index-9xxqdzp4.js → index-kar6wt5k.js} +2 -2
- package/dist/cli/{index-fb5s32c2.js → index-kdsdybmz.js} +5 -5
- package/dist/cli/{index-rgkzcw2a.js → index-ks4h9hag.js} +1 -1
- package/dist/cli/{index-1s95jrgc.js → index-mnx6hgh0.js} +3 -3
- package/dist/cli/{index-69tgdm9t.js → index-msz0qtfy.js} +1 -1
- package/dist/cli/{index-9gcqmgbc.js → index-n9wg3f7d.js} +2 -2
- package/dist/cli/{index-s8b67e6h.js → index-pksy4nzv.js} +4 -0
- package/dist/cli/{index-ejk34dnw.js → index-r27sprvr.js} +1 -1
- package/dist/cli/{index-ajzgeb2s.js → index-rq6tz67x.js} +1 -1
- package/dist/cli/{index-49e65y51.js → index-se6v59r8.js} +2 -2
- package/dist/cli/{index-s92a5ta3.js → index-tn2znwwf.js} +3 -3
- package/dist/cli/{index-a5ca62vt.js → index-wxsmmw0j.js} +1 -1
- package/dist/cli/{index-t0gj8s46.js → index-y6hwrfkt.js} +2 -2
- package/dist/cli/{index-mseerehd.js → index-y8ak7me7.js} +3 -3
- package/dist/cli/{index-zyg1m9d0.js → index-ykkpkzf7.js} +2 -2
- package/dist/cli/{index-vhn4e6rm.js → index-zr2ywh0s.js} +3 -3
- package/dist/cli/index.js +28 -28
- package/dist/cli/{knowledge-escalator-n1ezv1zp.js → knowledge-escalator-8ppf9pcx.js} +9 -9
- package/dist/cli/{knowledge-events-nyqk3mr7.js → knowledge-events-6tqb0a12.js} +7 -7
- package/dist/cli/{knowledge-store-mnxqcyet.js → knowledge-store-2y8rpsj2.js} +1 -1
- package/dist/cli/{knowledge-validator-z30113mp.js → knowledge-validator-5drk80a9.js} +2 -2
- package/dist/cli/{mcp-mnbqw2s5.js → mcp-pehs7fdc.js} +1 -1
- package/dist/cli/{model-preflight-ex482fsy.js → model-preflight-wq4ejsrk.js} +27 -27
- package/dist/cli/{pending-delegations-j18afz5z.js → pending-delegations-6yd5nraz.js} +2 -2
- package/dist/cli/{pr-subscriptions-yngda8mz.js → pr-subscriptions-a1xd8smp.js} +1 -1
- package/dist/cli/{pr-workflow-gate-0vt614f0.js → pr-workflow-gate-prb2tzz7.js} +27 -27
- package/dist/cli/{scan-cursor-8pwfg5g9.js → scan-cursor-waxfq7x5.js} +2 -2
- package/dist/cli/{schema-e58ytmqt.js → schema-zx5j97ww.js} +2 -2
- package/dist/cli/{scope-persistence-9qfx6ext.js → scope-persistence-2q1jzy0h.js} +6 -6
- package/dist/cli/{server-wxcfwsdx.js → server-70mbpd3m.js} +27 -27
- package/dist/cli/{skill-generator-tbd4tq9r.js → skill-generator-xarcb8vm.js} +10 -10
- package/dist/cli/{snapshot-coordination-init-sckyzb94.js → snapshot-coordination-init-cqxsm2rr.js} +27 -27
- package/dist/cli/{speckit-checkoff-k5jm0abh.js → speckit-checkoff-fgt7fdvj.js} +4 -4
- package/dist/cli/{worktree-collision-ownership-3wwfc72t.js → worktree-collision-ownership-bk6znw4c.js} +2 -2
- package/dist/cli/{worktree-isolation-zfk7zk6a.js → worktree-isolation-79jmdq2z.js} +27 -27
- package/dist/config/evidence-schema.d.ts +3 -0
- package/dist/index.js +51 -43
- package/dist/pr-review/render-review-body.d.ts +53 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/pr-review-submission.d.ts +10 -0
- package/dist/tools/secretscan.d.ts +26 -4
- package/dist/tools/tool-metadata.d.ts +4 -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-kar6wt5k.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-aw4ex9kn.js";
|
|
19
19
|
import {
|
|
20
20
|
archiveEvidence,
|
|
21
21
|
checkRequirementCoverage,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
sanitizeTaskId,
|
|
28
28
|
saveEvidence,
|
|
29
29
|
validateProjectRoot
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-n9wg3f7d.js";
|
|
31
31
|
import {
|
|
32
32
|
JAVA_SYMBOL_GRAMMAR,
|
|
33
33
|
LANGUAGE_REGISTRY,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
alreadyCuratedThisGeneration,
|
|
90
90
|
claimNextScanBatch,
|
|
91
91
|
resolveCohortId
|
|
92
|
-
} from "./index-
|
|
92
|
+
} from "./index-rq6tz67x.js";
|
|
93
93
|
import {
|
|
94
94
|
CURATOR_CONSOLIDATION_PROMPT,
|
|
95
95
|
CURATOR_INIT_PROMPT,
|
|
@@ -108,13 +108,13 @@ import {
|
|
|
108
108
|
getGroupCommitWriter,
|
|
109
109
|
importLegacyJsonl,
|
|
110
110
|
readPriorDriftReports
|
|
111
|
-
} from "./index-
|
|
111
|
+
} from "./index-2e2v96yk.js";
|
|
112
112
|
import {
|
|
113
113
|
assertNoUnsettledCoderDispatch,
|
|
114
114
|
listCoderSettlementWalStates,
|
|
115
115
|
recoverCoderSettlement,
|
|
116
116
|
recoverStaleCoderSettlements
|
|
117
|
-
} from "./index-
|
|
117
|
+
} from "./index-zr2ywh0s.js";
|
|
118
118
|
import {
|
|
119
119
|
BUNDLED_PROJECT_SKILL_ROOT,
|
|
120
120
|
DEFAULT_SKILL_MIN_CONFIDENCE,
|
|
@@ -135,11 +135,11 @@ import {
|
|
|
135
135
|
retireSkill,
|
|
136
136
|
selectCandidateEntries,
|
|
137
137
|
syncBundledProjectSkillsIfMissingAsync
|
|
138
|
-
} from "./index-
|
|
138
|
+
} from "./index-tn2znwwf.js";
|
|
139
139
|
import {
|
|
140
140
|
buildEscalationBriefing,
|
|
141
141
|
readRecentEscalations
|
|
142
|
-
} from "./index-
|
|
142
|
+
} from "./index-evj271tm.js";
|
|
143
143
|
import {
|
|
144
144
|
parsePorcelainV2Snapshot,
|
|
145
145
|
resolveCommitCountSince,
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
swarmOverwriteCandidates,
|
|
224
224
|
trackedDirtyCandidates,
|
|
225
225
|
transientBackoff
|
|
226
|
-
} from "./index-
|
|
226
|
+
} from "./index-y8ak7me7.js";
|
|
227
227
|
import {
|
|
228
228
|
EPIC_MODE_CONFIG_DISABLED_MESSAGE,
|
|
229
229
|
PlanRecoverySupersededError,
|
|
@@ -255,7 +255,7 @@ import {
|
|
|
255
255
|
updateEpicRecord,
|
|
256
256
|
updateTaskStatus,
|
|
257
257
|
withPlanLifecycleLock
|
|
258
|
-
} from "./index-
|
|
258
|
+
} from "./index-kdsdybmz.js";
|
|
259
259
|
import {
|
|
260
260
|
containsControlChars,
|
|
261
261
|
containsPathTraversal,
|
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
resolveSpeckitProjection,
|
|
272
272
|
validateSpeckit,
|
|
273
273
|
writeProjectedSpecSync
|
|
274
|
-
} from "./index-
|
|
274
|
+
} from "./index-hq84mfha.js";
|
|
275
275
|
import {
|
|
276
276
|
clearWorktreeMergeStatus,
|
|
277
277
|
getAllWorktreeMergeFailures,
|
|
@@ -303,7 +303,7 @@ import {
|
|
|
303
303
|
transitionTaskWorkflowEvidenceWithStatus,
|
|
304
304
|
withTaskEvidenceTransaction,
|
|
305
305
|
writeWorkflowWalFile
|
|
306
|
-
} from "./index-
|
|
306
|
+
} from "./index-msz0qtfy.js";
|
|
307
307
|
import {
|
|
308
308
|
isPathUnderSwarmWorktreeBase,
|
|
309
309
|
listLiveLaneOwners,
|
|
@@ -312,7 +312,7 @@ import {
|
|
|
312
312
|
recordLiveLaneOwner,
|
|
313
313
|
removeWorktree,
|
|
314
314
|
resolveWorktreeBaseDir
|
|
315
|
-
} from "./index-
|
|
315
|
+
} from "./index-ykkpkzf7.js";
|
|
316
316
|
import {
|
|
317
317
|
GitBinaryMissingError,
|
|
318
318
|
GitSpawnCwdError,
|
|
@@ -354,7 +354,7 @@ import {
|
|
|
354
354
|
scanBackgroundCoderReservationsForAdmission,
|
|
355
355
|
scanDelegationsForRecovery,
|
|
356
356
|
sweepStaleDelegations
|
|
357
|
-
} from "./index-
|
|
357
|
+
} from "./index-hqdfm79v.js";
|
|
358
358
|
import {
|
|
359
359
|
MAX_EVENT_LOG_ENTRIES,
|
|
360
360
|
_internals,
|
|
@@ -366,7 +366,7 @@ import {
|
|
|
366
366
|
recordHiveKnowledgeEvent,
|
|
367
367
|
recordKnowledgeEvent,
|
|
368
368
|
resolveKnowledgeEventsPath
|
|
369
|
-
} from "./index-
|
|
369
|
+
} from "./index-9mq96f00.js";
|
|
370
370
|
import {
|
|
371
371
|
commitDisplayedMembership,
|
|
372
372
|
commitEmptyRetrieval,
|
|
@@ -379,7 +379,7 @@ import {
|
|
|
379
379
|
queryLiveMemberships,
|
|
380
380
|
reconcilePhaseClose,
|
|
381
381
|
recordPhaseCloseIntent
|
|
382
|
-
} from "./index-
|
|
382
|
+
} from "./index-se6v59r8.js";
|
|
383
383
|
import {
|
|
384
384
|
sanitizeContextText
|
|
385
385
|
} from "./index-m9zzj4ee.js";
|
|
@@ -410,7 +410,7 @@ import {
|
|
|
410
410
|
validateActionableFields,
|
|
411
411
|
validateLesson,
|
|
412
412
|
validateSkillPath
|
|
413
|
-
} from "./index-
|
|
413
|
+
} from "./index-7r41s196.js";
|
|
414
414
|
import {
|
|
415
415
|
MAX_CURATION_PROPOSALS,
|
|
416
416
|
authorizeCuration,
|
|
@@ -421,10 +421,10 @@ import {
|
|
|
421
421
|
} from "./index-rtry5xyf.js";
|
|
422
422
|
import {
|
|
423
423
|
resolveWorktreeIsolationConfig
|
|
424
|
-
} from "./index-
|
|
424
|
+
} from "./index-mnx6hgh0.js";
|
|
425
425
|
import {
|
|
426
426
|
RetrospectiveEvidenceSchema
|
|
427
|
-
} from "./index-
|
|
427
|
+
} from "./index-j5nhx6e8.js";
|
|
428
428
|
import {
|
|
429
429
|
MAX_PENDING_SCOPE_BINDINGS,
|
|
430
430
|
canonicalWorkspaceIdentity,
|
|
@@ -433,7 +433,7 @@ import {
|
|
|
433
433
|
clearScopeBindings,
|
|
434
434
|
readAuthoritativeScopeBindingSet,
|
|
435
435
|
readDeclaredScopeFilesFromBindings
|
|
436
|
-
} from "./index-
|
|
436
|
+
} from "./index-ks4h9hag.js";
|
|
437
437
|
import {
|
|
438
438
|
clearPlanLedgerForReset,
|
|
439
439
|
computePlanStructureHash,
|
|
@@ -449,7 +449,7 @@ import {
|
|
|
449
449
|
replayFromLedgerWithStatus,
|
|
450
450
|
resolvePlanningProfile,
|
|
451
451
|
takeSnapshotEvent
|
|
452
|
-
} from "./index-
|
|
452
|
+
} from "./index-7rapcpgx.js";
|
|
453
453
|
import {
|
|
454
454
|
CORE_EVENT_LOCKED,
|
|
455
455
|
appendCoreEventSync,
|
|
@@ -538,7 +538,7 @@ import {
|
|
|
538
538
|
transactFile,
|
|
539
539
|
transactKnowledge,
|
|
540
540
|
wordBigrams
|
|
541
|
-
} from "./index-
|
|
541
|
+
} from "./index-4wsvkvhc.js";
|
|
542
542
|
import {
|
|
543
543
|
readTailJsonl,
|
|
544
544
|
readTailJsonlDetailed,
|
|
@@ -623,7 +623,7 @@ import {
|
|
|
623
623
|
loadPluginConfig,
|
|
624
624
|
loadPluginConfigWithMeta,
|
|
625
625
|
resolveEpicConfig
|
|
626
|
-
} from "./index-
|
|
626
|
+
} from "./index-r27sprvr.js";
|
|
627
627
|
import {
|
|
628
628
|
GIT_BINARY_ENV_VAR,
|
|
629
629
|
addDeferredWarning,
|
|
@@ -656,7 +656,7 @@ import {
|
|
|
656
656
|
resolveContextWindow,
|
|
657
657
|
resolveGeneratedAgentRole,
|
|
658
658
|
stripKnownSwarmPrefix
|
|
659
|
-
} from "./index-
|
|
659
|
+
} from "./index-y6hwrfkt.js";
|
|
660
660
|
import {
|
|
661
661
|
AGENT_TOOL_MAP,
|
|
662
662
|
ALL_AGENT_NAMES,
|
|
@@ -682,7 +682,7 @@ import {
|
|
|
682
682
|
init_agent_names,
|
|
683
683
|
init_constants,
|
|
684
684
|
init_tool_metadata
|
|
685
|
-
} from "./index-
|
|
685
|
+
} from "./index-pksy4nzv.js";
|
|
686
686
|
import {
|
|
687
687
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
688
688
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -3449,7 +3449,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
|
|
|
3449
3449
|
return null;
|
|
3450
3450
|
throw error2;
|
|
3451
3451
|
}
|
|
3452
|
-
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-
|
|
3452
|
+
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-prb2tzz7.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
|
|
3453
3453
|
if (!legacy)
|
|
3454
3454
|
return null;
|
|
3455
3455
|
const namespace = workflowGateStateCoordinationNamespace(sessionID);
|
|
@@ -3536,7 +3536,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
|
|
|
3536
3536
|
let recoveryState = null;
|
|
3537
3537
|
if (!currentAuthoritative) {
|
|
3538
3538
|
if (options.allowSalvagedRead) {
|
|
3539
|
-
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-
|
|
3539
|
+
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-prb2tzz7.js");
|
|
3540
3540
|
recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
|
|
3541
3541
|
}
|
|
3542
3542
|
if (!recoveryState) {
|
|
@@ -10334,7 +10334,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
10334
10334
|
return extracted === expectedSessionId;
|
|
10335
10335
|
}
|
|
10336
10336
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
10337
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
10337
|
+
const collisionOwnership = await import("./worktree-collision-ownership-bk6znw4c.js");
|
|
10338
10338
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
10339
10339
|
}
|
|
10340
10340
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -10761,7 +10761,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
10761
10761
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
10762
10762
|
if (laneProfile) {
|
|
10763
10763
|
try {
|
|
10764
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
10764
|
+
const { writeLaneProfileToDiskReal } = await import("./core-xevv38dk.js");
|
|
10765
10765
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
10766
10766
|
} catch {}
|
|
10767
10767
|
}
|
|
@@ -11754,7 +11754,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
11754
11754
|
}
|
|
11755
11755
|
clearWorktreeMergeStatus(statusKey);
|
|
11756
11756
|
try {
|
|
11757
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
11757
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-xevv38dk.js");
|
|
11758
11758
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
11759
11759
|
} catch {}
|
|
11760
11760
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -27502,7 +27502,7 @@ function clearCriticalShownIds(sessionID) {
|
|
|
27502
27502
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
27503
27503
|
const map = new Map;
|
|
27504
27504
|
try {
|
|
27505
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
27505
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-a1xd8smp.js");
|
|
27506
27506
|
const records = await listActive2(directory);
|
|
27507
27507
|
for (const record of records) {
|
|
27508
27508
|
if (record.sessionID !== sessionID)
|
|
@@ -44048,9 +44048,9 @@ function hashContent(content) {
|
|
|
44048
44048
|
return createHash29("sha1").update(content).digest("hex");
|
|
44049
44049
|
}
|
|
44050
44050
|
async function loadConfigForPolicyCurator(directory) {
|
|
44051
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
44051
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zx5j97ww.js");
|
|
44052
44052
|
try {
|
|
44053
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
44053
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-46fe64s6.js");
|
|
44054
44054
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
44055
44055
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
44056
44056
|
} catch {
|
|
@@ -47108,7 +47108,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
|
|
|
47108
47108
|
const seam = _internals46.createCuratorLLMDelegate;
|
|
47109
47109
|
if (seam)
|
|
47110
47110
|
return seam(directory, mode, sessionId);
|
|
47111
|
-
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-
|
|
47111
|
+
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-bx720pwc.js");
|
|
47112
47112
|
return createCuratorLLMDelegate(directory, mode, sessionId);
|
|
47113
47113
|
}
|
|
47114
47114
|
async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
|
|
@@ -47503,7 +47503,7 @@ async function runFinalizeStage(ctx) {
|
|
|
47503
47503
|
}
|
|
47504
47504
|
}
|
|
47505
47505
|
try {
|
|
47506
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
47506
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-zx5j97ww.js");
|
|
47507
47507
|
const { config: pmLoadedConfig } = _internals46.loadPluginConfigWithMeta(ctx.directory);
|
|
47508
47508
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
47509
47509
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -51536,7 +51536,7 @@ function serializeAgentSession(s) {
|
|
|
51536
51536
|
}
|
|
51537
51537
|
async function writeSnapshot(directory, state) {
|
|
51538
51538
|
try {
|
|
51539
|
-
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-
|
|
51539
|
+
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-cqxsm2rr.js");
|
|
51540
51540
|
await ensureSnapshotCoordinationReady(directory);
|
|
51541
51541
|
const snapshot = {
|
|
51542
51542
|
version: 3,
|
|
@@ -54557,7 +54557,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
54557
54557
|
};
|
|
54558
54558
|
}
|
|
54559
54559
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
54560
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
54560
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-46fe64s6.js");
|
|
54561
54561
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
54562
54562
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
54563
54563
|
if (sweepConfig?.enabled === false)
|
|
@@ -55681,7 +55681,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
55681
55681
|
}
|
|
55682
55682
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
55683
55683
|
try {
|
|
55684
|
-
const skillModule = await import("./skill-generator-
|
|
55684
|
+
const skillModule = await import("./skill-generator-xarcb8vm.js");
|
|
55685
55685
|
for (const cand of skillCandidates) {
|
|
55686
55686
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
55687
55687
|
continue;
|
|
@@ -56153,7 +56153,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
56153
56153
|
} catch {}
|
|
56154
56154
|
}
|
|
56155
56155
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
56156
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
56156
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-8ppf9pcx.js");
|
|
56157
56157
|
for (const { id } of contradictedEntries) {
|
|
56158
56158
|
try {
|
|
56159
56159
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -56985,7 +56985,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
56985
56985
|
warnings.push("Failed to collect knowledge summary.");
|
|
56986
56986
|
}
|
|
56987
56987
|
try {
|
|
56988
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
56988
|
+
const { getScanStatus } = await import("./scan-cursor-waxfq7x5.js");
|
|
56989
56989
|
const scanStatus = await getScanStatus(directory);
|
|
56990
56990
|
if (scanStatus.remaining_estimate > 0) {
|
|
56991
56991
|
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.`);
|
|
@@ -57157,9 +57157,9 @@ var _internals68 = {
|
|
|
57157
57157
|
verifyPostMortemKnowledgeActions,
|
|
57158
57158
|
repairPostMortemActions,
|
|
57159
57159
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
57160
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
57160
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zx5j97ww.js");
|
|
57161
57161
|
try {
|
|
57162
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
57162
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-46fe64s6.js");
|
|
57163
57163
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
57164
57164
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
57165
57165
|
} catch {
|
|
@@ -57167,11 +57167,11 @@ var _internals68 = {
|
|
|
57167
57167
|
}
|
|
57168
57168
|
},
|
|
57169
57169
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
57170
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
57170
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-xckkw7yt.js");
|
|
57171
57171
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
57172
57172
|
},
|
|
57173
57173
|
checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
|
|
57174
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
57174
|
+
const { checkHivePromotions } = await import("./hive-promoter-sd1h9vjg.js");
|
|
57175
57175
|
return checkHivePromotions(entries2, knowledgeConfig, directory);
|
|
57176
57176
|
},
|
|
57177
57177
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -57180,7 +57180,7 @@ var _internals68 = {
|
|
|
57180
57180
|
activateProposal,
|
|
57181
57181
|
listSkills: listSkills2,
|
|
57182
57182
|
sanitizeSlug
|
|
57183
|
-
} = await import("./skill-generator-
|
|
57183
|
+
} = await import("./skill-generator-xarcb8vm.js");
|
|
57184
57184
|
const result = {
|
|
57185
57185
|
approved: [],
|
|
57186
57186
|
rejected: [],
|
|
@@ -57222,7 +57222,7 @@ var _internals68 = {
|
|
|
57222
57222
|
return result;
|
|
57223
57223
|
},
|
|
57224
57224
|
readPriorDriftReports: async (directory) => {
|
|
57225
|
-
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-
|
|
57225
|
+
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-ej1s4fv9.js");
|
|
57226
57226
|
return readPriorDriftReports2(directory);
|
|
57227
57227
|
},
|
|
57228
57228
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -67492,9 +67492,9 @@ var _internals76 = {
|
|
|
67492
67492
|
loadPluginConfigWithMeta,
|
|
67493
67493
|
loadCuratorDeps: async () => {
|
|
67494
67494
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
|
|
67495
|
-
import("./schema-
|
|
67496
|
-
import("./curator-
|
|
67497
|
-
import("./curator-llm-factory-
|
|
67495
|
+
import("./schema-zx5j97ww.js"),
|
|
67496
|
+
import("./curator-xckkw7yt.js"),
|
|
67497
|
+
import("./curator-llm-factory-bx720pwc.js")
|
|
67498
67498
|
]);
|
|
67499
67499
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
|
|
67500
67500
|
}
|
|
@@ -69932,7 +69932,7 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
69932
69932
|
let scanCompleted = false;
|
|
69933
69933
|
let scanRemaining = 0;
|
|
69934
69934
|
try {
|
|
69935
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
69935
|
+
const { getScanStatus } = await import("./scan-cursor-waxfq7x5.js");
|
|
69936
69936
|
const status = await getScanStatus(directory);
|
|
69937
69937
|
scanGeneration = status.generation;
|
|
69938
69938
|
scanCompleted = status.completed;
|
|
@@ -69942,10 +69942,10 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
69942
69942
|
try {
|
|
69943
69943
|
const { isLinked: isLinked2 } = await import("./knowledge-link-6hw3z6wn.js");
|
|
69944
69944
|
if (isLinked2(directory)) {
|
|
69945
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
69945
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zx5j97ww.js");
|
|
69946
69946
|
let config;
|
|
69947
69947
|
try {
|
|
69948
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
69948
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-46fe64s6.js");
|
|
69949
69949
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
69950
69950
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
69951
69951
|
} catch {
|
|
@@ -71401,7 +71401,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
71401
71401
|
const result = runConfigDoctor(config, directory, planParallelizationEnabled);
|
|
71402
71402
|
let output;
|
|
71403
71403
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
71404
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
71404
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-48ehw0b0.js");
|
|
71405
71405
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
71406
71406
|
applyLossy: true
|
|
71407
71407
|
});
|
|
@@ -71439,7 +71439,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
71439
71439
|
`;
|
|
71440
71440
|
}
|
|
71441
71441
|
try {
|
|
71442
|
-
const { runModelPreflight } = await import("./model-preflight-
|
|
71442
|
+
const { runModelPreflight } = await import("./model-preflight-wq4ejsrk.js");
|
|
71443
71443
|
const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
|
|
71444
71444
|
const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
|
|
71445
71445
|
const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
|
|
@@ -71473,7 +71473,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
71473
71473
|
}
|
|
71474
71474
|
} catch {}
|
|
71475
71475
|
try {
|
|
71476
|
-
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-
|
|
71476
|
+
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-89jrgknr.js");
|
|
71477
71477
|
output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
|
|
71478
71478
|
} catch {}
|
|
71479
71479
|
const strayDirs = detectStraySwarmDirs(directory);
|
|
@@ -73490,7 +73490,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
73490
73490
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
73491
73491
|
}
|
|
73492
73492
|
async function handleEvidenceSummaryCommand(directory) {
|
|
73493
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
73493
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-b8jqdf13.js");
|
|
73494
73494
|
const artifact = await buildEvidenceSummary(directory);
|
|
73495
73495
|
if (!artifact) {
|
|
73496
73496
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -74491,6 +74491,26 @@ async function probeFullAutoOversightHealth(input) {
|
|
|
74491
74491
|
|
|
74492
74492
|
// src/commands/full-auto.ts
|
|
74493
74493
|
init_logger();
|
|
74494
|
+
function authorizeFullAuto(directory) {
|
|
74495
|
+
const { config, configHadErrors } = loadPluginConfigWithMeta(directory);
|
|
74496
|
+
if (configHadErrors) {
|
|
74497
|
+
return {
|
|
74498
|
+
authorized: false,
|
|
74499
|
+
message: "Error: Full-Auto Mode cannot be enabled \u2014 a swarm plugin config file exists but could not be loaded, so full_auto.locked cannot be verified. Fix the config file (see warnings above) and retry.",
|
|
74500
|
+
config,
|
|
74501
|
+
configHadErrors
|
|
74502
|
+
};
|
|
74503
|
+
}
|
|
74504
|
+
if (config.full_auto?.locked === true) {
|
|
74505
|
+
return {
|
|
74506
|
+
authorized: false,
|
|
74507
|
+
message: "Error: Full-Auto Mode is locked for this project (full_auto.locked is true in the swarm plugin config). Runtime activation is disabled by configuration; remove the lock to use /swarm full-auto on.",
|
|
74508
|
+
config,
|
|
74509
|
+
configHadErrors
|
|
74510
|
+
};
|
|
74511
|
+
}
|
|
74512
|
+
return { authorized: true, config, configHadErrors };
|
|
74513
|
+
}
|
|
74494
74514
|
async function handleFullAutoCommand(directory, args, sessionID) {
|
|
74495
74515
|
if (!sessionID || sessionID.trim() === "") {
|
|
74496
74516
|
return "Error: No active session context. Full-Auto Mode requires an active session. Use /swarm-full-auto from within an OpenCode session, or start a session first.";
|
|
@@ -74535,6 +74555,10 @@ async function handleFullAutoCommand(directory, args, sessionID) {
|
|
|
74535
74555
|
return probe.healthy ? `Full-Auto oversight recovery probe succeeded for pause generation ${runState.pauseGeneration ?? 0}. The transport path is healthy, but no denied action was replayed. Use \`/swarm full-auto resume\` within 5 minutes to create a new run generation and re-issue the original action for fresh review.` : `Full-Auto oversight recovery probe failed: ${probe.reason}`;
|
|
74536
74556
|
}
|
|
74537
74557
|
if (parsedCommand.kind === "resume") {
|
|
74558
|
+
const auth = authorizeFullAuto(directory);
|
|
74559
|
+
if (!auth.authorized) {
|
|
74560
|
+
return auth.message;
|
|
74561
|
+
}
|
|
74538
74562
|
const runState = loadFullAutoRunState(directory, sessionID);
|
|
74539
74563
|
if (!canResumeFromProbe(runState)) {
|
|
74540
74564
|
return "Error: resume requires a paused infrastructure/deadline run with a recent successful matching retry-oversight probe. Policy, containment, sandbox, or severe-evidence pauses cannot be resumed by probe.";
|
|
@@ -74568,13 +74592,11 @@ async function handleFullAutoCommand(directory, args, sessionID) {
|
|
|
74568
74592
|
let durableError;
|
|
74569
74593
|
let criticModelAdvisory = "";
|
|
74570
74594
|
try {
|
|
74571
|
-
const
|
|
74595
|
+
const auth = authorizeFullAuto(directory);
|
|
74596
|
+
const config = auth.config;
|
|
74572
74597
|
const fullAutoConfig = config.full_auto;
|
|
74573
|
-
if (newFullAutoMode &&
|
|
74574
|
-
return
|
|
74575
|
-
}
|
|
74576
|
-
if (newFullAutoMode && fullAutoConfig?.locked === true) {
|
|
74577
|
-
return "Error: Full-Auto Mode is locked for this project (full_auto.locked is true in the swarm plugin config). Runtime activation is disabled by configuration; remove the lock to use /swarm full-auto on.";
|
|
74598
|
+
if (newFullAutoMode && !auth.authorized) {
|
|
74599
|
+
return auth.message;
|
|
74578
74600
|
}
|
|
74579
74601
|
const effectiveMode = modeOverride ?? fullAutoConfig?.mode ?? "supervised";
|
|
74580
74602
|
modeLabel = effectiveMode;
|
|
@@ -97934,7 +97956,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
97934
97956
|
}
|
|
97935
97957
|
const sdkOpts = signal ? { signal } : {};
|
|
97936
97958
|
try {
|
|
97937
|
-
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-
|
|
97959
|
+
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-0331n4t3.js");
|
|
97938
97960
|
const createResult = await client.session.create({
|
|
97939
97961
|
...sessionId ? {
|
|
97940
97962
|
body: {
|
|
@@ -100271,7 +100293,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
|
|
|
100271
100293
|
clearedEvents: []
|
|
100272
100294
|
};
|
|
100273
100295
|
try {
|
|
100274
|
-
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-
|
|
100296
|
+
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-prb2tzz7.js");
|
|
100275
100297
|
await cancelPrFeedbackPublication2(directory, sessionID, reason);
|
|
100276
100298
|
} catch (err) {
|
|
100277
100299
|
warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -102673,6 +102695,22 @@ function isExcluded(entry, relPath, exactNames, globPatterns) {
|
|
|
102673
102695
|
}
|
|
102674
102696
|
return false;
|
|
102675
102697
|
}
|
|
102698
|
+
function isIgnoredExplicitPath(relPath, ignoreExact, ignoreGlobs) {
|
|
102699
|
+
const segments = relPath.split("/");
|
|
102700
|
+
const file = segments[segments.length - 1] ?? "";
|
|
102701
|
+
if (isExcluded(file, relPath, ignoreExact, ignoreGlobs)) {
|
|
102702
|
+
return true;
|
|
102703
|
+
}
|
|
102704
|
+
let prefix = "";
|
|
102705
|
+
for (let i = 0;i < segments.length - 1; i++) {
|
|
102706
|
+
const segment = segments[i] ?? "";
|
|
102707
|
+
prefix = prefix.length === 0 ? segment : `${prefix}/${segment}`;
|
|
102708
|
+
if (isExcluded(segment, prefix, ignoreExact, ignoreGlobs)) {
|
|
102709
|
+
return true;
|
|
102710
|
+
}
|
|
102711
|
+
}
|
|
102712
|
+
return false;
|
|
102713
|
+
}
|
|
102676
102714
|
function validateDirectoryInput(dir) {
|
|
102677
102715
|
if (!dir || dir.length === 0) {
|
|
102678
102716
|
return "directory is required";
|
|
@@ -103301,6 +103339,7 @@ var secretscan = createSwarmTool({
|
|
|
103301
103339
|
skipped_files: skippedFiles + stats.fileErrors + stats.symlinkSkipped,
|
|
103302
103340
|
policy_skipped_files: 0,
|
|
103303
103341
|
requested_files: 0,
|
|
103342
|
+
ignored_files: 0,
|
|
103304
103343
|
incomplete_files: incompleteFiles,
|
|
103305
103344
|
incomplete_paths: discovery.incompletePaths
|
|
103306
103345
|
};
|
|
@@ -103363,6 +103402,7 @@ async function runSecretscanOnFiles(files, directory, rawRequestedFiles) {
|
|
|
103363
103402
|
let filesScanned = 0;
|
|
103364
103403
|
let skippedFiles = 0;
|
|
103365
103404
|
let policySkippedFiles = 0;
|
|
103405
|
+
let ignoredFiles = 0;
|
|
103366
103406
|
const requestedFiles = Math.max(0, rawRequestedFiles ?? files.length);
|
|
103367
103407
|
const incompletePaths = [];
|
|
103368
103408
|
const rawRoot = path137.resolve(directory);
|
|
@@ -103390,6 +103430,18 @@ async function runSecretscanOnFiles(files, directory, rawRequestedFiles) {
|
|
|
103390
103430
|
if (!rootStat.isDirectory()) {
|
|
103391
103431
|
throw new Error("target must be a directory");
|
|
103392
103432
|
}
|
|
103433
|
+
const ignoreExact = new Set;
|
|
103434
|
+
const ignoreGlobs = [];
|
|
103435
|
+
for (const pattern of loadSecretScanIgnore(canonicalRoot)) {
|
|
103436
|
+
if (pattern.length === 0)
|
|
103437
|
+
continue;
|
|
103438
|
+
if (isGlobOrPathPattern(pattern)) {
|
|
103439
|
+
ignoreGlobs.push(pattern);
|
|
103440
|
+
} else {
|
|
103441
|
+
ignoreExact.add(pattern);
|
|
103442
|
+
}
|
|
103443
|
+
}
|
|
103444
|
+
const hasIgnorePatterns = ignoreExact.size > 0 || ignoreGlobs.length > 0;
|
|
103393
103445
|
const filesToScan = files.slice(0, MAX_EXPLICIT_FILES_SCANNED);
|
|
103394
103446
|
let incompleteFiles = Math.max(0, files.length - filesToScan.length);
|
|
103395
103447
|
if (files.length > filesToScan.length) {
|
|
@@ -103483,6 +103535,14 @@ async function runSecretscanOnFiles(files, directory, rawRequestedFiles) {
|
|
|
103483
103535
|
recordIncompletePath(incompletePaths, canonicalRoot, scanPath, "scope_escape");
|
|
103484
103536
|
continue;
|
|
103485
103537
|
}
|
|
103538
|
+
if (hasIgnorePatterns) {
|
|
103539
|
+
const relPath = path137.relative(canonicalRoot, scanPath).replace(/\\/g, "/");
|
|
103540
|
+
if (isIgnoredExplicitPath(relPath, ignoreExact, ignoreGlobs)) {
|
|
103541
|
+
skippedFiles++;
|
|
103542
|
+
ignoredFiles++;
|
|
103543
|
+
continue;
|
|
103544
|
+
}
|
|
103545
|
+
}
|
|
103486
103546
|
const outcome = scanFileForSecrets(scanPath, "explicit");
|
|
103487
103547
|
switch (outcome.status) {
|
|
103488
103548
|
case "scanned":
|
|
@@ -103520,6 +103580,7 @@ async function runSecretscanOnFiles(files, directory, rawRequestedFiles) {
|
|
|
103520
103580
|
files_scanned: filesScanned,
|
|
103521
103581
|
skipped_files: skippedFiles,
|
|
103522
103582
|
policy_skipped_files: policySkippedFiles,
|
|
103583
|
+
ignored_files: ignoredFiles,
|
|
103523
103584
|
requested_files: requestedFiles,
|
|
103524
103585
|
incomplete_files: incompleteFiles,
|
|
103525
103586
|
incomplete_paths: incompletePaths
|
|
@@ -105280,7 +105341,10 @@ async function parseTestOutputViaDispatch(framework, output, baseDir) {
|
|
|
105280
105341
|
function relativeEscapesRoot(relative28) {
|
|
105281
105342
|
return relative28 === ".." || relative28.startsWith(`..${path140.sep}`) || path140.isAbsolute(relative28);
|
|
105282
105343
|
}
|
|
105283
|
-
|
|
105344
|
+
var MAVEN_BUILD_FILES = ["pom.xml"];
|
|
105345
|
+
var GRADLE_BUILD_FILES = ["build.gradle", "build.gradle.kts"];
|
|
105346
|
+
function resolveModuleDirByMarkers(root, files, markerNames) {
|
|
105347
|
+
const hasMarker = (dir) => markerNames.some((marker) => _internals123.existsSync(path140.join(dir, marker)));
|
|
105284
105348
|
const resolvedRoot = path140.resolve(root);
|
|
105285
105349
|
let rootReal;
|
|
105286
105350
|
const isContainedModuleDir = (dir) => {
|
|
@@ -105310,7 +105374,7 @@ function resolveMavenModuleDir(root, files) {
|
|
|
105310
105374
|
}
|
|
105311
105375
|
let current = path140.dirname(resolvedFile);
|
|
105312
105376
|
while (true) {
|
|
105313
|
-
if (
|
|
105377
|
+
if (hasMarker(current) && isContainedModuleDir(current)) {
|
|
105314
105378
|
return current;
|
|
105315
105379
|
}
|
|
105316
105380
|
if (current === resolvedRoot)
|
|
@@ -105341,16 +105405,23 @@ function resolveMavenModuleDir(root, files) {
|
|
|
105341
105405
|
break;
|
|
105342
105406
|
inspected++;
|
|
105343
105407
|
const candidate2 = path140.join(resolvedRoot, entry);
|
|
105344
|
-
if (
|
|
105408
|
+
if (hasMarker(candidate2) && isContainedModuleDir(candidate2)) {
|
|
105345
105409
|
return candidate2;
|
|
105346
105410
|
}
|
|
105347
105411
|
}
|
|
105348
105412
|
return null;
|
|
105349
105413
|
}
|
|
105350
|
-
function
|
|
105351
|
-
if (_internals123.existsSync(path140.join(root,
|
|
105414
|
+
function resolveNestedModuleDir(root, files, markerNames) {
|
|
105415
|
+
if (markerNames.some((marker) => _internals123.existsSync(path140.join(root, marker)))) {
|
|
105352
105416
|
return null;
|
|
105353
|
-
|
|
105417
|
+
}
|
|
105418
|
+
return resolveModuleDirByMarkers(root, files, markerNames);
|
|
105419
|
+
}
|
|
105420
|
+
function resolveNestedMavenModuleDir(root, files) {
|
|
105421
|
+
return resolveNestedModuleDir(root, files, MAVEN_BUILD_FILES);
|
|
105422
|
+
}
|
|
105423
|
+
function resolveNestedGradleModuleDir(root, files) {
|
|
105424
|
+
return resolveNestedModuleDir(root, files, GRADLE_BUILD_FILES);
|
|
105354
105425
|
}
|
|
105355
105426
|
async function detectTestFramework(cwd, files) {
|
|
105356
105427
|
const baseDir = cwd;
|
|
@@ -105448,6 +105519,10 @@ async function detectTestFramework(cwd, files) {
|
|
|
105448
105519
|
if (mavenModuleDir && (_internals123.isCommandAvailable("mvn") || resolveMavenWrapperCommand(mavenModuleDir, ["test"]) !== null)) {
|
|
105449
105520
|
return "maven";
|
|
105450
105521
|
}
|
|
105522
|
+
const gradleModuleDir = resolveNestedGradleModuleDir(baseDir, files);
|
|
105523
|
+
if (gradleModuleDir && (_internals123.isCommandAvailable("gradle") || _internals123.existsSync(path140.join(gradleModuleDir, "gradlew")) || _internals123.existsSync(path140.join(gradleModuleDir, "gradlew.bat")))) {
|
|
105524
|
+
return "gradle";
|
|
105525
|
+
}
|
|
105451
105526
|
return "none";
|
|
105452
105527
|
}
|
|
105453
105528
|
function detectPhpTest(cwd) {
|
|
@@ -105526,6 +105601,13 @@ function buildLanguageSpecificTestNames(nameWithoutExt, ext) {
|
|
|
105526
105601
|
return [];
|
|
105527
105602
|
}
|
|
105528
105603
|
}
|
|
105604
|
+
function findPathSegmentIndex(normalizedPath, segment) {
|
|
105605
|
+
for (let index = normalizedPath.indexOf(segment);index !== -1; index = normalizedPath.indexOf(segment, index + 1)) {
|
|
105606
|
+
if (index === 0 || normalizedPath[index - 1] === "/")
|
|
105607
|
+
return index;
|
|
105608
|
+
}
|
|
105609
|
+
return -1;
|
|
105610
|
+
}
|
|
105529
105611
|
function getRepoLevelCandidateDirectories(workingDir, relativePath2, ext) {
|
|
105530
105612
|
const relativeDir = path140.dirname(relativePath2);
|
|
105531
105613
|
const nestedRelativeDir = relativeDir === "." ? "" : relativeDir;
|
|
@@ -105534,11 +105616,17 @@ function getRepoLevelCandidateDirectories(workingDir, relativePath2, ext) {
|
|
|
105534
105616
|
return nestedRelativeDir ? [rootDir2, path140.join(rootDir2, nestedRelativeDir)] : [rootDir2];
|
|
105535
105617
|
});
|
|
105536
105618
|
const normalizedRelativePath = relativePath2.replace(/\\/g, "/");
|
|
105537
|
-
if (ext === ".java"
|
|
105538
|
-
|
|
105619
|
+
if (ext === ".java") {
|
|
105620
|
+
const index = findPathSegmentIndex(normalizedRelativePath, "src/main/java/");
|
|
105621
|
+
if (index !== -1) {
|
|
105622
|
+
directories.push(path140.join(workingDir, normalizedRelativePath.slice(0, index), "src/test/java", path140.dirname(normalizedRelativePath.slice(index + "src/main/java/".length))));
|
|
105623
|
+
}
|
|
105539
105624
|
}
|
|
105540
|
-
if (
|
|
105541
|
-
|
|
105625
|
+
if (ext === ".kt" || ext === ".java") {
|
|
105626
|
+
const index = findPathSegmentIndex(normalizedRelativePath, "src/main/kotlin/");
|
|
105627
|
+
if (index !== -1) {
|
|
105628
|
+
directories.push(path140.join(workingDir, normalizedRelativePath.slice(0, index), "src/test/kotlin", path140.dirname(normalizedRelativePath.slice(index + "src/main/kotlin/".length))));
|
|
105629
|
+
}
|
|
105542
105630
|
}
|
|
105543
105631
|
return [...new Set(directories)];
|
|
105544
105632
|
}
|
|
@@ -105740,6 +105828,22 @@ function getTargetedExecutionUnsupportedReason(framework) {
|
|
|
105740
105828
|
return null;
|
|
105741
105829
|
}
|
|
105742
105830
|
}
|
|
105831
|
+
var CLASS_BASED_TEST_EXTENSIONS = new Set([".java", ".kt", ".groovy"]);
|
|
105832
|
+
function deriveClassBasedTargets(files) {
|
|
105833
|
+
const derived = [];
|
|
105834
|
+
const seen = new Set;
|
|
105835
|
+
for (const file of files) {
|
|
105836
|
+
const ext = path140.extname(file);
|
|
105837
|
+
if (!CLASS_BASED_TEST_EXTENSIONS.has(ext.toLowerCase()))
|
|
105838
|
+
return [];
|
|
105839
|
+
const className = path140.basename(file, ext);
|
|
105840
|
+
if (!className || seen.has(className))
|
|
105841
|
+
continue;
|
|
105842
|
+
seen.add(className);
|
|
105843
|
+
derived.push(className);
|
|
105844
|
+
}
|
|
105845
|
+
return derived;
|
|
105846
|
+
}
|
|
105743
105847
|
function buildTestCommand(framework, scope, files, coverage, baseDir, bail, targets, nativeTarget) {
|
|
105744
105848
|
if (nativeTarget) {
|
|
105745
105849
|
return nativeTarget.framework === framework ? buildNativeTargetCommand(nativeTarget) : null;
|
|
@@ -106361,7 +106465,14 @@ async function runTests(framework, scope, files, coverage, timeout_ms, cwd, bail
|
|
|
106361
106465
|
resolvedNativeTarget = resolvedTarget.target;
|
|
106362
106466
|
executionCwd = resolvedTarget.executionDirectory;
|
|
106363
106467
|
}
|
|
106364
|
-
|
|
106468
|
+
let effectiveTargets = targets;
|
|
106469
|
+
if (scope !== "all" && scope !== "target" && files.length > 0 && !(targets && targets.length > 0) && (framework === "maven" || framework === "gradle")) {
|
|
106470
|
+
const derivedTargets = deriveClassBasedTargets(files);
|
|
106471
|
+
if (derivedTargets.length > 0) {
|
|
106472
|
+
effectiveTargets = derivedTargets;
|
|
106473
|
+
}
|
|
106474
|
+
}
|
|
106475
|
+
if (scope !== "all" && scope !== "target" && files.length > 0 && !(effectiveTargets && effectiveTargets.length > 0)) {
|
|
106365
106476
|
const unsupportedReason = getTargetedExecutionUnsupportedReason(framework);
|
|
106366
106477
|
if (unsupportedReason) {
|
|
106367
106478
|
return {
|
|
@@ -106375,7 +106486,7 @@ async function runTests(framework, scope, files, coverage, timeout_ms, cwd, bail
|
|
|
106375
106486
|
}
|
|
106376
106487
|
}
|
|
106377
106488
|
const useDispatchBuild = process.env.SWARM_LANG_BACKEND !== "legacy";
|
|
106378
|
-
const command = useDispatchBuild ? await buildTestCommandViaDispatch(framework, scope, files, coverage, executionCwd, bail,
|
|
106489
|
+
const command = useDispatchBuild ? await buildTestCommandViaDispatch(framework, scope, files, coverage, executionCwd, bail, effectiveTargets, resolvedNativeTarget) ?? buildTestCommand(framework, scope, files, coverage, executionCwd, bail, effectiveTargets, resolvedNativeTarget) : buildTestCommand(framework, scope, files, coverage, executionCwd, bail, effectiveTargets, resolvedNativeTarget);
|
|
106379
106490
|
if (!command) {
|
|
106380
106491
|
return {
|
|
106381
106492
|
success: false,
|
|
@@ -106880,6 +106991,11 @@ var test_runner = createSwarmTool({
|
|
|
106880
106991
|
if (mavenModuleDir) {
|
|
106881
106992
|
nativeExecutionDirectory = mavenModuleDir;
|
|
106882
106993
|
}
|
|
106994
|
+
} else if (scope !== "target" && framework === "gradle") {
|
|
106995
|
+
const gradleModuleDir = resolveNestedGradleModuleDir(workingDir, _files);
|
|
106996
|
+
if (gradleModuleDir) {
|
|
106997
|
+
nativeExecutionDirectory = gradleModuleDir;
|
|
106998
|
+
}
|
|
106883
106999
|
}
|
|
106884
107000
|
let testFiles = [];
|
|
106885
107001
|
let graphFallbackReason;
|
|
@@ -116630,7 +116746,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
116630
116746
|
async function handleHelpCommand(ctx) {
|
|
116631
116747
|
const targetCommand = ctx.args.join(" ");
|
|
116632
116748
|
if (!targetCommand) {
|
|
116633
|
-
const { buildHelpText } = await import("./index-
|
|
116749
|
+
const { buildHelpText } = await import("./index-5y2y23ac.js");
|
|
116634
116750
|
return buildHelpText();
|
|
116635
116751
|
}
|
|
116636
116752
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -116644,7 +116760,7 @@ async function handleHelpCommand(ctx) {
|
|
|
116644
116760
|
> Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
|
|
116645
116761
|
}
|
|
116646
116762
|
const similar = _internals35.findSimilarCommands(targetCommand);
|
|
116647
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
116763
|
+
const { buildHelpText: fullHelp } = await import("./index-5y2y23ac.js");
|
|
116648
116764
|
if (similar.length > 0) {
|
|
116649
116765
|
return `Command '/swarm ${targetCommand}' not found.
|
|
116650
116766
|
|
|
@@ -116972,7 +117088,7 @@ var COMMAND_REGISTRY = {
|
|
|
116972
117088
|
},
|
|
116973
117089
|
"guardrail explain": {
|
|
116974
117090
|
handler: async (ctx) => {
|
|
116975
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
117091
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-wvymt5na.js");
|
|
116976
117092
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
116977
117093
|
},
|
|
116978
117094
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -116982,7 +117098,7 @@ var COMMAND_REGISTRY = {
|
|
|
116982
117098
|
},
|
|
116983
117099
|
"guardrail reset": {
|
|
116984
117100
|
handler: async (ctx) => {
|
|
116985
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
117101
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-8nje6gxk.js");
|
|
116986
117102
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
116987
117103
|
},
|
|
116988
117104
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -117003,7 +117119,7 @@ var COMMAND_REGISTRY = {
|
|
|
117003
117119
|
},
|
|
117004
117120
|
"guardrail-log": {
|
|
117005
117121
|
handler: async (ctx) => {
|
|
117006
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
117122
|
+
const { handleGuardrailLog } = await import("./guardrail-log-5mmc2y1v.js");
|
|
117007
117123
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
117008
117124
|
},
|
|
117009
117125
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -117841,7 +117957,7 @@ Subcommands:
|
|
|
117841
117957
|
handler: (ctx) => handleFullAutoCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
117842
117958
|
description: "Control Full-Auto Mode for the active session [on [mode]|off|exit|status|retry-oversight|resume|abort]",
|
|
117843
117959
|
args: "on [assisted|supervised|strict], off|exit, status, retry-oversight, resume, abort",
|
|
117844
|
-
details: 'First-class toggle for Full-Auto Mode \u2014 a critic gate reviewing escalations on your behalf (the architect still plans and delegates; full-auto never executes tasks itself). No config-level enablement is required: "on" activates immediately (unless full_auto.locked is true in config), "off" disarms the run and returns the session to normal interactive operation, "status" reports the durable run state. ' + 'An optional mode after "on" overrides full_auto.mode for this run: assisted (critic consulted only on policy escalations), supervised (default \u2014 risky/high-impact actions reviewed by the critic), strict (ALL plan mutations reviewed by the critic). ' + "While active, the critic answers architect questions and reviews phase boundaries, delegations, and risky actions on your behalf; only ESCALATE_TO_HUMAN verdicts halt the run for your input. `retry-oversight` performs a transport-only health probe for an infrastructure/deadline pause and never replays the denied action. `resume` requires a recent successful matching probe and no active recovery blockers. `abort` terminates the durable run immediately. The run state is durable (.swarm/full-auto-state.json) and survives restarts; toggle with no argument flips the current state. Composes with an open epic (Epic Mode): both the Full-Auto phase approval and the epic_phase_readiness gate apply at phase_complete.",
|
|
117960
|
+
details: 'First-class toggle for Full-Auto Mode \u2014 a critic gate reviewing escalations on your behalf (the architect still plans and delegates; full-auto never executes tasks itself). No config-level enablement is required: "on" activates immediately (unless full_auto.locked is true in config), "off" disarms the run and returns the session to normal interactive operation, "status" reports the durable run state. ' + 'An optional mode after "on" overrides full_auto.mode for this run: assisted (critic consulted only on policy escalations), supervised (default \u2014 risky/high-impact actions reviewed by the critic), strict (ALL plan mutations reviewed by the critic). ' + "While active, the critic answers architect questions and reviews phase boundaries, delegations, and risky actions on your behalf; only ESCALATE_TO_HUMAN verdicts halt the run for your input. `retry-oversight` performs a transport-only health probe for an infrastructure/deadline pause and never replays the denied action. `resume` runs the same authorization preflight as `on` first (readable config; `full_auto.locked` refuses), then requires a recent successful matching probe and no active recovery blockers. `abort` terminates the durable run immediately. The run state is durable (.swarm/full-auto-state.json) and survives restarts; toggle with no argument flips the current state. Composes with an open epic (Epic Mode): both the Full-Auto phase approval and the epic_phase_readiness gate apply at phase_complete.",
|
|
117845
117961
|
category: "utility",
|
|
117846
117962
|
toolPolicy: "human-only"
|
|
117847
117963
|
},
|