opencode-swarm 7.147.1 → 7.148.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 +26 -11
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +39 -13
- package/dist/cli/{config-doctor-8nskdpgd.js → config-doctor-z2wam5wn.js} +2 -2
- package/dist/cli/{core-9rt6kbk1.js → core-k7m76ce0.js} +1 -1
- package/dist/cli/{curation-policy-9d7jx7cg.js → curation-policy-kd8j8cne.js} +4 -4
- package/dist/cli/{curator-xvymjgan.js → curator-jwpm52kg.js} +23 -23
- package/dist/cli/{curator-llm-factory-8xdxbmnz.js → curator-llm-factory-4qt8b15s.js} +23 -23
- package/dist/cli/{evidence-summary-service-k7a2s8f8.js → evidence-summary-service-90z295j3.js} +9 -9
- package/dist/cli/{gate-evidence-bbpvx28c.js → gate-evidence-3q6q71fw.js} +4 -4
- package/dist/cli/{guardrail-explain-qz2hfyb2.js → guardrail-explain-44xt373y.js} +24 -24
- package/dist/cli/{guardrail-log-6098jxes.js → guardrail-log-kbp5jztb.js} +3 -3
- package/dist/cli/{guardrail-reset-2bcccwmx.js → guardrail-reset-vpazhh8k.js} +23 -23
- package/dist/cli/{hive-promoter-9xzf0r98.js → hive-promoter-tdrkz9nh.js} +23 -23
- package/dist/cli/{index-1k41c7kt.js → index-016708th.js} +2 -2
- package/dist/cli/{index-5qfp2kt4.js → index-07zgs6y0.js} +6 -6
- package/dist/cli/{index-axcvb5kf.js → index-2y14mjfn.js} +2 -2
- package/dist/cli/{index-6cxb7ng4.js → index-52gnz782.js} +3 -3
- package/dist/cli/{index-qy5yz7fn.js → index-702zx3rk.js} +1 -1
- package/dist/cli/{index-9b50bt13.js → index-7ac5z627.js} +1 -1
- package/dist/cli/{index-bp5n93w5.js → index-7hctrdk8.js} +1 -1
- package/dist/cli/{index-by1f9ghd.js → index-9pmmexsd.js} +1 -1
- package/dist/cli/{index-8861hfbt.js → index-crpb0qke.js} +231 -92
- package/dist/cli/{index-b99vp668.js → index-dfvh1r8g.js} +25 -25
- package/dist/cli/{index-n5wzwz8x.js → index-dmbaaz6d.js} +4 -4
- package/dist/cli/{index-7tvbvecm.js → index-ffevkn7k.js} +1 -1
- package/dist/cli/{index-59q7jma6.js → index-gwrv6c56.js} +5 -5
- package/dist/cli/{index-2qapn7fk.js → index-h879g4r4.js} +1 -1
- package/dist/cli/{index-q85xv7t6.js → index-jpa03jcc.js} +1 -1
- package/dist/cli/{index-t4xa2yss.js → index-k6h5yc1j.js} +5 -5
- package/dist/cli/{index-8k9hw17k.js → index-n0fpefqx.js} +2 -2
- package/dist/cli/{index-kbp4xssa.js → index-n96wwf56.js} +4 -4
- package/dist/cli/{index-b834mas0.js → index-p62we2ar.js} +1 -1
- package/dist/cli/{index-zwc96x0a.js → index-qcm97jfh.js} +1 -1
- package/dist/cli/{index-aahyrzmm.js → index-qwj7qjjp.js} +2 -2
- package/dist/cli/{index-vpzvmp21.js → index-rcjq8dm4.js} +2 -2
- package/dist/cli/{index-gkhx2vkh.js → index-sycndcwd.js} +1 -1
- package/dist/cli/{index-b7qzwv3t.js → index-x4rxh8j9.js} +3 -3
- package/dist/cli/{index-1xvxd02x.js → index-y586zet4.js} +1 -1
- package/dist/cli/{index-014mntpw.js → index-ykjjqg79.js} +4 -4
- package/dist/cli/{index-avcqq7xc.js → index-zwpttdgn.js} +1 -1
- package/dist/cli/index.js +23 -23
- package/dist/cli/{knowledge-escalator-300p0bvr.js → knowledge-escalator-0qnm48g8.js} +9 -9
- package/dist/cli/{knowledge-events-5ncg5xv1.js → knowledge-events-3zv81nzp.js} +7 -7
- package/dist/cli/{knowledge-link-stzsjagk.js → knowledge-link-w91bcyx2.js} +3 -3
- package/dist/cli/{knowledge-store-mn75hsww.js → knowledge-store-njtx6wj1.js} +4 -4
- package/dist/cli/{knowledge-validator-763r7qpn.js → knowledge-validator-7eqj5afv.js} +6 -6
- package/dist/cli/{runner-26bc3x73.js → runner-gfzkp9nv.js} +4 -4
- package/dist/cli/{scan-cursor-b7kyjefy.js → scan-cursor-a6dhyf55.js} +5 -5
- package/dist/cli/{schema-zjhwka27.js → schema-p0vn1zgh.js} +1 -1
- package/dist/cli/{scope-persistence-aa7gkgz0.js → scope-persistence-zs97zkt7.js} +5 -5
- package/dist/cli/{skill-generator-nsa7ay0c.js → skill-generator-5qg15q1j.js} +11 -11
- package/dist/cli/{worktree-isolation-3pw7nwnh.js → worktree-isolation-ndb5fwys.js} +23 -23
- package/dist/hooks/pr-workflow-gate.d.ts +64 -3
- package/dist/index.js +54 -11
- package/dist/lang/symbol-visibility.d.ts +10 -7
- package/dist/tools/dispatch-lanes.d.ts +8 -1
- package/dist/tools/repo-graph/types.d.ts +6 -4
- package/package.json +1 -1
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
resolveExecutableFromPath,
|
|
7
7
|
runEvaluation,
|
|
8
8
|
runExternalTool
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-p62we2ar.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeToolNameLowerCase,
|
|
12
12
|
stableCanonicalStringify
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-jpa03jcc.js";
|
|
14
14
|
import {
|
|
15
15
|
detectStraySwarmDirs,
|
|
16
16
|
readDoctorArtifact,
|
|
17
17
|
removeStraySwarmDir,
|
|
18
18
|
runConfigDoctor
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-9pmmexsd.js";
|
|
20
20
|
import {
|
|
21
21
|
MAX_TRANSIENT_RETRIES,
|
|
22
22
|
archiveEvidence,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
updateTaskStatus,
|
|
63
63
|
validateProjectRoot,
|
|
64
64
|
validateSymlinkBoundary
|
|
65
|
-
} from "./index-
|
|
65
|
+
} from "./index-ykjjqg79.js";
|
|
66
66
|
import {
|
|
67
67
|
EvaluationTaskV1Schema,
|
|
68
68
|
GateAuditManifestV1Schema,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
saveGateAuditResult,
|
|
80
80
|
savePromotionDecision,
|
|
81
81
|
saveTaskSetSnapshot
|
|
82
|
-
} from "./index-
|
|
82
|
+
} from "./index-y586zet4.js";
|
|
83
83
|
import {
|
|
84
84
|
loadDatabaseCtor
|
|
85
85
|
} from "./index-134d35c1.js";
|
|
@@ -105,12 +105,12 @@ import {
|
|
|
105
105
|
} from "./index-y8552snf.js";
|
|
106
106
|
import {
|
|
107
107
|
readRecentEscalations
|
|
108
|
-
} from "./index-
|
|
108
|
+
} from "./index-k6h5yc1j.js";
|
|
109
109
|
import {
|
|
110
110
|
alreadyCuratedThisGeneration,
|
|
111
111
|
claimNextScanBatch,
|
|
112
112
|
resolveCohortId
|
|
113
|
-
} from "./index-
|
|
113
|
+
} from "./index-016708th.js";
|
|
114
114
|
import {
|
|
115
115
|
CURATOR_INIT_PROMPT,
|
|
116
116
|
CURATOR_PHASE_PROMPT,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
retireSkill,
|
|
181
181
|
selectCandidateEntries,
|
|
182
182
|
syncBundledProjectSkillsIfMissingAsync
|
|
183
|
-
} from "./index-
|
|
183
|
+
} from "./index-dmbaaz6d.js";
|
|
184
184
|
import {
|
|
185
185
|
appendUnactionable,
|
|
186
186
|
quarantineEntry,
|
|
@@ -191,11 +191,11 @@ import {
|
|
|
191
191
|
validateActionableFields,
|
|
192
192
|
validateLesson,
|
|
193
193
|
validateSkillPath
|
|
194
|
-
} from "./index-
|
|
194
|
+
} from "./index-n96wwf56.js";
|
|
195
195
|
import {
|
|
196
196
|
authorizeCuration,
|
|
197
197
|
buildConfigFingerprintInput
|
|
198
|
-
} from "./index-
|
|
198
|
+
} from "./index-zwpttdgn.js";
|
|
199
199
|
import {
|
|
200
200
|
cohortConfigFingerprint
|
|
201
201
|
} from "./index-rtry5xyf.js";
|
|
@@ -248,18 +248,18 @@ import {
|
|
|
248
248
|
transitionTaskWorkflowEvidence,
|
|
249
249
|
withTaskEvidenceTransaction,
|
|
250
250
|
writeWorkflowWalFile
|
|
251
|
-
} from "./index-
|
|
251
|
+
} from "./index-n0fpefqx.js";
|
|
252
252
|
import {
|
|
253
253
|
provisionWorktree,
|
|
254
254
|
removeWorktree
|
|
255
|
-
} from "./index-
|
|
255
|
+
} from "./index-7ac5z627.js";
|
|
256
256
|
import {
|
|
257
257
|
MAX_PENDING_SCOPE_BINDINGS,
|
|
258
258
|
canonicalWorkspaceIdentity,
|
|
259
259
|
clearAllScopes,
|
|
260
260
|
clearScopeBindingFromDisk,
|
|
261
261
|
clearScopeBindings
|
|
262
|
-
} from "./index-
|
|
262
|
+
} from "./index-52gnz782.js";
|
|
263
263
|
import {
|
|
264
264
|
appendLedgerEvent,
|
|
265
265
|
computePlanHash,
|
|
@@ -274,7 +274,7 @@ import {
|
|
|
274
274
|
readPlanEpochIdentity,
|
|
275
275
|
replayFromLedgerWithStatus,
|
|
276
276
|
takeSnapshotEvent
|
|
277
|
-
} from "./index-
|
|
277
|
+
} from "./index-h879g4r4.js";
|
|
278
278
|
import {
|
|
279
279
|
isPathWithinDeclaredScope,
|
|
280
280
|
sanitizeDiagnosticText
|
|
@@ -326,7 +326,7 @@ import {
|
|
|
326
326
|
transactFile,
|
|
327
327
|
transactKnowledge,
|
|
328
328
|
wordBigrams
|
|
329
|
-
} from "./index-
|
|
329
|
+
} from "./index-07zgs6y0.js";
|
|
330
330
|
import {
|
|
331
331
|
MAX_EVENT_LOG_ENTRIES,
|
|
332
332
|
_internals as _internals2,
|
|
@@ -340,10 +340,10 @@ import {
|
|
|
340
340
|
recordKnowledgeEvent,
|
|
341
341
|
recordPhaseCloseIntent,
|
|
342
342
|
resolveKnowledgeEventsPath
|
|
343
|
-
} from "./index-
|
|
343
|
+
} from "./index-gwrv6c56.js";
|
|
344
344
|
import {
|
|
345
345
|
resolveWorktreeIsolationConfig
|
|
346
|
-
} from "./index-
|
|
346
|
+
} from "./index-rcjq8dm4.js";
|
|
347
347
|
import {
|
|
348
348
|
RetrospectiveEvidenceSchema
|
|
349
349
|
} from "./index-gprxjmm7.js";
|
|
@@ -353,7 +353,7 @@ import {
|
|
|
353
353
|
init_loader,
|
|
354
354
|
loadPluginConfig,
|
|
355
355
|
loadPluginConfigWithMeta
|
|
356
|
-
} from "./index-
|
|
356
|
+
} from "./index-ffevkn7k.js";
|
|
357
357
|
import {
|
|
358
358
|
DEFAULT_SKILL_OPT_CONFIG,
|
|
359
359
|
FALLBACK_MODELS_MAX,
|
|
@@ -367,7 +367,7 @@ import {
|
|
|
367
367
|
package_default,
|
|
368
368
|
resolveAutoReviewConfig,
|
|
369
369
|
stripKnownSwarmPrefix
|
|
370
|
-
} from "./index-
|
|
370
|
+
} from "./index-702zx3rk.js";
|
|
371
371
|
import {
|
|
372
372
|
AGENT_TOOL_MAP,
|
|
373
373
|
ALL_AGENT_NAMES,
|
|
@@ -419,10 +419,10 @@ import {
|
|
|
419
419
|
resolveLinkDir,
|
|
420
420
|
sanitizeLinkId,
|
|
421
421
|
writeLinkPointer
|
|
422
|
-
} from "./index-
|
|
422
|
+
} from "./index-qcm97jfh.js";
|
|
423
423
|
import {
|
|
424
424
|
atomicWriteFile
|
|
425
|
-
} from "./index-
|
|
425
|
+
} from "./index-7hctrdk8.js";
|
|
426
426
|
import {
|
|
427
427
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
428
428
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -434,7 +434,7 @@ import {
|
|
|
434
434
|
atomicWriteSwarmFileSync,
|
|
435
435
|
matchTempGrammar,
|
|
436
436
|
parseTargetBasename
|
|
437
|
-
} from "./index-
|
|
437
|
+
} from "./index-2y14mjfn.js";
|
|
438
438
|
import {
|
|
439
439
|
assertProjectRoot,
|
|
440
440
|
hasExplicitProjectBoundary,
|
|
@@ -4450,7 +4450,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
|
|
|
4450
4450
|
awaitingMergeByCallID,
|
|
4451
4451
|
cleanupStandardWorktreeForCallId,
|
|
4452
4452
|
standardWorktreeByCallID
|
|
4453
|
-
} = await import("./worktree-isolation-
|
|
4453
|
+
} = await import("./worktree-isolation-ndb5fwys.js");
|
|
4454
4454
|
standardWorktreeByCallID.delete(descriptor.callID);
|
|
4455
4455
|
if (hasResidue)
|
|
4456
4456
|
awaitingMergeByCallID.set(descriptor.callID, {
|
|
@@ -4552,7 +4552,7 @@ async function recoverCoderSettlement(directory, taskId) {
|
|
|
4552
4552
|
awaitingMergeByCallID,
|
|
4553
4553
|
finishStandardWorktreeDispatch,
|
|
4554
4554
|
standardWorktreeByCallID
|
|
4555
|
-
} = await import("./worktree-isolation-
|
|
4555
|
+
} = await import("./worktree-isolation-ndb5fwys.js");
|
|
4556
4556
|
const descriptor = wal.worktree;
|
|
4557
4557
|
const reconstructedDispatch = {
|
|
4558
4558
|
callID: descriptor.callID,
|
|
@@ -7461,6 +7461,14 @@ var MAX_DISCLOSED_LANE_IDS = 10;
|
|
|
7461
7461
|
var PR_WORKFLOW_SWEEPABLE_LANE_STATUSES = new Set(["pending", "running"]);
|
|
7462
7462
|
var CAS_ESCAPE_DISCLOSURE = "state revision unsalvageable; cleared without compare-and-swap";
|
|
7463
7463
|
var PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS = 5000;
|
|
7464
|
+
var PR_WORKFLOW_PENDING_LIVENESS_THRESHOLD_MS = 3 * 60000;
|
|
7465
|
+
var PR_WORKFLOW_PENDING_LIVENESS_MODES = new Set([
|
|
7466
|
+
"swarm-pr-review:base",
|
|
7467
|
+
"swarm-pr-review:micro",
|
|
7468
|
+
"swarm-pr-review:council",
|
|
7469
|
+
"swarm-pr-review:reviewer",
|
|
7470
|
+
"swarm-pr-review:critic"
|
|
7471
|
+
]);
|
|
7464
7472
|
var LIVE_SESSION_STATUS_TYPES = new Set([
|
|
7465
7473
|
"busy",
|
|
7466
7474
|
"retry"
|
|
@@ -7469,45 +7477,57 @@ function isLiveSessionStatusType(type) {
|
|
|
7469
7477
|
return LIVE_SESSION_STATUS_TYPES.has(type);
|
|
7470
7478
|
}
|
|
7471
7479
|
var defaultGetSessionOps = () => swarmState.opencodeClient?.session ?? null;
|
|
7472
|
-
async function
|
|
7480
|
+
async function probePrWorkflowLaneSessionStatusTypes(directory, records, timeoutMs) {
|
|
7473
7481
|
const session = _test_exports2.getSessionOps();
|
|
7474
7482
|
const statusOp = session?.status;
|
|
7475
7483
|
if (!session || typeof statusOp !== "function") {
|
|
7476
|
-
return {
|
|
7484
|
+
return { statuses: new Map, degradedReason: "probe-unavailable" };
|
|
7477
7485
|
}
|
|
7478
7486
|
const timeoutError = new Error("PR workflow lane liveness probe exceeded its deadline");
|
|
7479
7487
|
let response;
|
|
7480
7488
|
try {
|
|
7481
|
-
response = await withTimeout((async () => statusOp.call(session, { query: { directory } }))(), _test_exports2.laneLivenessProbeTimeoutMs, timeoutError);
|
|
7489
|
+
response = await withTimeout((async () => statusOp.call(session, { query: { directory } }))(), timeoutMs ?? _test_exports2.laneLivenessProbeTimeoutMs, timeoutError);
|
|
7482
7490
|
} catch (error2) {
|
|
7483
7491
|
return {
|
|
7484
|
-
|
|
7492
|
+
statuses: new Map,
|
|
7485
7493
|
degradedReason: error2 === timeoutError ? "probe-timeout" : "probe-error"
|
|
7486
7494
|
};
|
|
7487
7495
|
}
|
|
7488
7496
|
try {
|
|
7489
7497
|
if (response?.error) {
|
|
7490
|
-
return {
|
|
7498
|
+
return { statuses: new Map, degradedReason: "probe-error" };
|
|
7491
7499
|
}
|
|
7492
7500
|
const data = response?.data;
|
|
7493
7501
|
if (data === null || data === undefined) {
|
|
7494
|
-
return {
|
|
7502
|
+
return { statuses: new Map, degradedReason: "probe-no-data" };
|
|
7495
7503
|
}
|
|
7496
|
-
const
|
|
7504
|
+
const statuses = new Map;
|
|
7497
7505
|
for (const record of records) {
|
|
7498
7506
|
const subagentSessionId = record.subagentSessionId;
|
|
7499
7507
|
if (!subagentSessionId)
|
|
7500
7508
|
continue;
|
|
7501
7509
|
const type = data[subagentSessionId]?.type;
|
|
7502
|
-
if (typeof type === "string"
|
|
7503
|
-
|
|
7510
|
+
if (typeof type === "string") {
|
|
7511
|
+
statuses.set(subagentSessionId, type);
|
|
7504
7512
|
}
|
|
7505
7513
|
}
|
|
7506
|
-
return {
|
|
7514
|
+
return { statuses };
|
|
7507
7515
|
} catch {
|
|
7508
|
-
return {
|
|
7516
|
+
return { statuses: new Map, degradedReason: "probe-error" };
|
|
7509
7517
|
}
|
|
7510
7518
|
}
|
|
7519
|
+
async function probeAlivePrWorkflowLaneSessions(directory, records) {
|
|
7520
|
+
const probe = await probePrWorkflowLaneSessionStatusTypes(directory, records);
|
|
7521
|
+
if (probe.degradedReason) {
|
|
7522
|
+
return { alive: new Set, degradedReason: probe.degradedReason };
|
|
7523
|
+
}
|
|
7524
|
+
const alive = new Set;
|
|
7525
|
+
for (const [sessionId, type] of probe.statuses) {
|
|
7526
|
+
if (isLiveSessionStatusType(type))
|
|
7527
|
+
alive.add(sessionId);
|
|
7528
|
+
}
|
|
7529
|
+
return { alive };
|
|
7530
|
+
}
|
|
7511
7531
|
function describePrWorkflowLaneProbe(settlement) {
|
|
7512
7532
|
const parts = [];
|
|
7513
7533
|
if (settlement.probedAliveLaneIds?.length) {
|
|
@@ -8311,6 +8331,7 @@ var _test_exports2 = {
|
|
|
8311
8331
|
_test_exports2.probeLaneLivenessAsync = probeAlivePrWorkflowLaneSessions;
|
|
8312
8332
|
_test_exports2.getSessionOps = defaultGetSessionOps;
|
|
8313
8333
|
_test_exports2.laneLivenessProbeTimeoutMs = PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS;
|
|
8334
|
+
_test_exports2.pendingLaneLivenessThresholdMs = PR_WORKFLOW_PENDING_LIVENESS_THRESHOLD_MS;
|
|
8314
8335
|
},
|
|
8315
8336
|
beforeTerminalClear: undefined,
|
|
8316
8337
|
beforeAbortClear: undefined,
|
|
@@ -8332,6 +8353,7 @@ var _test_exports2 = {
|
|
|
8332
8353
|
probeLaneLivenessAsync: probeAlivePrWorkflowLaneSessions,
|
|
8333
8354
|
getSessionOps: defaultGetSessionOps,
|
|
8334
8355
|
laneLivenessProbeTimeoutMs: PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS,
|
|
8356
|
+
pendingLaneLivenessThresholdMs: PR_WORKFLOW_PENDING_LIVENESS_THRESHOLD_MS,
|
|
8335
8357
|
resolveCurrentGitHead,
|
|
8336
8358
|
resolveCurrentGitHeadAsync,
|
|
8337
8359
|
resolveCurrentUpstreamPushTarget,
|
|
@@ -8695,18 +8717,22 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
|
|
|
8695
8717
|
});
|
|
8696
8718
|
}
|
|
8697
8719
|
const selectedCouncilLanes = new Set;
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8720
|
+
if (state.prReviewTriggerEvalPath) {
|
|
8721
|
+
for (const batch of [
|
|
8722
|
+
...state.prReviewValidationBatches ?? []
|
|
8723
|
+
].reverse()) {
|
|
8724
|
+
if (batch.phase !== "council")
|
|
8725
|
+
continue;
|
|
8726
|
+
const successful = successfulObligationsFromExactBatch(directory, state, batch.batchId, batch.lanes, "swarm-pr-review:council", batch.validatedAt, true, new Set, ctx.revisionDigest);
|
|
8727
|
+
for (const lane of batch.lanes) {
|
|
8728
|
+
if (successful.has(lane.workflowLane) && !selectedCouncilLanes.has(lane.workflowLane)) {
|
|
8729
|
+
sources.push({
|
|
8730
|
+
batchId: batch.batchId,
|
|
8731
|
+
laneId: lane.laneId,
|
|
8732
|
+
mode: "swarm-pr-review:council"
|
|
8733
|
+
});
|
|
8734
|
+
selectedCouncilLanes.add(lane.workflowLane);
|
|
8735
|
+
}
|
|
8710
8736
|
}
|
|
8711
8737
|
}
|
|
8712
8738
|
}
|
|
@@ -16821,7 +16847,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
16821
16847
|
};
|
|
16822
16848
|
}
|
|
16823
16849
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
16824
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
16850
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-x4rxh8j9.js");
|
|
16825
16851
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
16826
16852
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
16827
16853
|
if (sweepConfig?.enabled === false)
|
|
@@ -17905,7 +17931,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
17905
17931
|
}
|
|
17906
17932
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
17907
17933
|
try {
|
|
17908
|
-
const skillModule = await import("./skill-generator-
|
|
17934
|
+
const skillModule = await import("./skill-generator-5qg15q1j.js");
|
|
17909
17935
|
for (const cand of skillCandidates) {
|
|
17910
17936
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
17911
17937
|
continue;
|
|
@@ -18365,7 +18391,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
18365
18391
|
} catch {}
|
|
18366
18392
|
}
|
|
18367
18393
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
18368
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
18394
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-0qnm48g8.js");
|
|
18369
18395
|
for (const { id } of contradictedEntries) {
|
|
18370
18396
|
try {
|
|
18371
18397
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -19184,7 +19210,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
19184
19210
|
warnings.push("Failed to collect knowledge summary.");
|
|
19185
19211
|
}
|
|
19186
19212
|
try {
|
|
19187
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
19213
|
+
const { getScanStatus } = await import("./scan-cursor-a6dhyf55.js");
|
|
19188
19214
|
const scanStatus = await getScanStatus(directory);
|
|
19189
19215
|
if (scanStatus.remaining_estimate > 0) {
|
|
19190
19216
|
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.`);
|
|
@@ -19356,9 +19382,9 @@ var _internals25 = {
|
|
|
19356
19382
|
verifyPostMortemKnowledgeActions,
|
|
19357
19383
|
repairPostMortemActions,
|
|
19358
19384
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
19359
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
19385
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-p0vn1zgh.js");
|
|
19360
19386
|
try {
|
|
19361
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
19387
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-x4rxh8j9.js");
|
|
19362
19388
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
19363
19389
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
19364
19390
|
} catch {
|
|
@@ -19366,11 +19392,11 @@ var _internals25 = {
|
|
|
19366
19392
|
}
|
|
19367
19393
|
},
|
|
19368
19394
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
19369
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
19395
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-jwpm52kg.js");
|
|
19370
19396
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
19371
19397
|
},
|
|
19372
19398
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
19373
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
19399
|
+
const { checkHivePromotions } = await import("./hive-promoter-tdrkz9nh.js");
|
|
19374
19400
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
19375
19401
|
},
|
|
19376
19402
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -19379,7 +19405,7 @@ var _internals25 = {
|
|
|
19379
19405
|
activateProposal,
|
|
19380
19406
|
listSkills: listSkills2,
|
|
19381
19407
|
sanitizeSlug
|
|
19382
|
-
} = await import("./skill-generator-
|
|
19408
|
+
} = await import("./skill-generator-5qg15q1j.js");
|
|
19383
19409
|
const result = {
|
|
19384
19410
|
approved: [],
|
|
19385
19411
|
rejected: [],
|
|
@@ -20715,9 +20741,9 @@ function hashContent(content) {
|
|
|
20715
20741
|
return createHash10("sha1").update(content).digest("hex");
|
|
20716
20742
|
}
|
|
20717
20743
|
async function loadConfigForPolicyCurator(directory) {
|
|
20718
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
20744
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-p0vn1zgh.js");
|
|
20719
20745
|
try {
|
|
20720
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
20746
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-x4rxh8j9.js");
|
|
20721
20747
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
20722
20748
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
20723
20749
|
} catch {
|
|
@@ -31913,7 +31939,7 @@ async function runFinalizeStage(ctx) {
|
|
|
31913
31939
|
}
|
|
31914
31940
|
}
|
|
31915
31941
|
try {
|
|
31916
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
31942
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-p0vn1zgh.js");
|
|
31917
31943
|
const { config: pmLoadedConfig } = _internals40.loadPluginConfigWithMeta(ctx.directory);
|
|
31918
31944
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
31919
31945
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -34106,9 +34132,9 @@ var _internals44 = {
|
|
|
34106
34132
|
loadPluginConfigWithMeta,
|
|
34107
34133
|
loadCuratorDeps: async () => {
|
|
34108
34134
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
34109
|
-
import("./schema-
|
|
34110
|
-
import("./curator-
|
|
34111
|
-
import("./curator-llm-factory-
|
|
34135
|
+
import("./schema-p0vn1zgh.js"),
|
|
34136
|
+
import("./curator-jwpm52kg.js"),
|
|
34137
|
+
import("./curator-llm-factory-4qt8b15s.js")
|
|
34112
34138
|
]);
|
|
34113
34139
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
34114
34140
|
}
|
|
@@ -35098,7 +35124,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
35098
35124
|
let scanCompleted = false;
|
|
35099
35125
|
let scanRemaining = 0;
|
|
35100
35126
|
try {
|
|
35101
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
35127
|
+
const { getScanStatus } = await import("./scan-cursor-a6dhyf55.js");
|
|
35102
35128
|
const status = await getScanStatus(directory);
|
|
35103
35129
|
scanGeneration = status.generation;
|
|
35104
35130
|
scanCompleted = status.completed;
|
|
@@ -35106,19 +35132,19 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
35106
35132
|
} catch {}
|
|
35107
35133
|
let configMatch = null;
|
|
35108
35134
|
try {
|
|
35109
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
35135
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-w91bcyx2.js");
|
|
35110
35136
|
if (isLinked2(directory)) {
|
|
35111
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
35137
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-p0vn1zgh.js");
|
|
35112
35138
|
let config;
|
|
35113
35139
|
try {
|
|
35114
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
35140
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-x4rxh8j9.js");
|
|
35115
35141
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
35116
35142
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
35117
35143
|
} catch {
|
|
35118
35144
|
config = KnowledgeConfigSchema2.parse({});
|
|
35119
35145
|
}
|
|
35120
35146
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
35121
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
35147
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-kd8j8cne.js");
|
|
35122
35148
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
35123
35149
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
35124
35150
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -36422,7 +36448,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
36422
36448
|
const result = runConfigDoctor(config, directory);
|
|
36423
36449
|
let output;
|
|
36424
36450
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
36425
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
36451
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-z2wam5wn.js");
|
|
36426
36452
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
36427
36453
|
applyLossy: true
|
|
36428
36454
|
});
|
|
@@ -37362,7 +37388,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
37362
37388
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
37363
37389
|
}
|
|
37364
37390
|
async function handleEvidenceSummaryCommand(directory) {
|
|
37365
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
37391
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-90z295j3.js");
|
|
37366
37392
|
const artifact = await buildEvidenceSummary(directory);
|
|
37367
37393
|
if (!artifact) {
|
|
37368
37394
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -46700,7 +46726,13 @@ var PRIVATE_INFO = {
|
|
|
46700
46726
|
exportedReason: "unknown",
|
|
46701
46727
|
apiSurfaceKind: "private"
|
|
46702
46728
|
};
|
|
46703
|
-
var CONTAINER_SCOPED_GRAMMARS = new Set([
|
|
46729
|
+
var CONTAINER_SCOPED_GRAMMARS = new Set([
|
|
46730
|
+
"java",
|
|
46731
|
+
"kotlin",
|
|
46732
|
+
"csharp",
|
|
46733
|
+
"swift",
|
|
46734
|
+
"cpp"
|
|
46735
|
+
]);
|
|
46704
46736
|
var TYPE_DECLARATION_NODE_TYPES = new Set([
|
|
46705
46737
|
"class_declaration",
|
|
46706
46738
|
"interface_declaration",
|
|
@@ -46717,6 +46749,10 @@ function containerScopedDefaultVisibility(grammarId, containerType) {
|
|
|
46717
46749
|
return "public";
|
|
46718
46750
|
case "java":
|
|
46719
46751
|
return "package";
|
|
46752
|
+
case "swift":
|
|
46753
|
+
return "internal";
|
|
46754
|
+
case "cpp":
|
|
46755
|
+
return containerType === "struct_specifier" || containerType === "union_specifier" ? "public" : "private";
|
|
46720
46756
|
default:
|
|
46721
46757
|
return containerType === undefined ? "internal" : "private";
|
|
46722
46758
|
}
|
|
@@ -46932,6 +46968,9 @@ function modifierLanguageVisibility(ctx) {
|
|
|
46932
46968
|
};
|
|
46933
46969
|
}
|
|
46934
46970
|
function cppVisibility(ctx) {
|
|
46971
|
+
if (isInsideAnonymousNamespace(ctx.defNode)) {
|
|
46972
|
+
return { ...PRIVATE_INFO };
|
|
46973
|
+
}
|
|
46935
46974
|
const text = ctx.defNode.text.trimStart();
|
|
46936
46975
|
if (/^static\b/.test(text) || ctx.localName.startsWith("_")) {
|
|
46937
46976
|
return { ...PRIVATE_INFO };
|
|
@@ -46943,6 +46982,18 @@ function cppVisibility(ctx) {
|
|
|
46943
46982
|
apiSurfaceKind: "public"
|
|
46944
46983
|
};
|
|
46945
46984
|
}
|
|
46985
|
+
function isInsideAnonymousNamespace(node) {
|
|
46986
|
+
let current = node.parent;
|
|
46987
|
+
while (current) {
|
|
46988
|
+
if (current.type === "namespace_definition") {
|
|
46989
|
+
const named = current.children.some((child) => child !== null && child.type === "namespace_identifier");
|
|
46990
|
+
if (!named)
|
|
46991
|
+
return true;
|
|
46992
|
+
}
|
|
46993
|
+
current = current.parent;
|
|
46994
|
+
}
|
|
46995
|
+
return false;
|
|
46996
|
+
}
|
|
46946
46997
|
function visibilityFromText(grammarId, text) {
|
|
46947
46998
|
const normalized = declarationPrefix(grammarId, text).trimStart();
|
|
46948
46999
|
if (/\b(private|fileprivate)\b/.test(normalized))
|
|
@@ -46961,7 +47012,12 @@ function visibilityFromText(grammarId, text) {
|
|
|
46961
47012
|
}
|
|
46962
47013
|
return "unknown";
|
|
46963
47014
|
}
|
|
46964
|
-
var ANNOTATED_DECLARATION_GRAMMARS = new Set([
|
|
47015
|
+
var ANNOTATED_DECLARATION_GRAMMARS = new Set([
|
|
47016
|
+
"java",
|
|
47017
|
+
"kotlin",
|
|
47018
|
+
"csharp",
|
|
47019
|
+
"swift"
|
|
47020
|
+
]);
|
|
46965
47021
|
function endOfStringLiteral(text, quote) {
|
|
46966
47022
|
const q = text[quote];
|
|
46967
47023
|
const verbatim = q === '"' && text[quote - 1] === "@";
|
|
@@ -47396,8 +47452,44 @@ var QUERIES = {
|
|
|
47396
47452
|
declarator: (identifier) @func.name
|
|
47397
47453
|
)
|
|
47398
47454
|
) @func.def
|
|
47455
|
+
(function_definition
|
|
47456
|
+
declarator: (pointer_declarator
|
|
47457
|
+
declarator: (function_declarator
|
|
47458
|
+
declarator: (identifier) @func.name
|
|
47459
|
+
)
|
|
47460
|
+
)
|
|
47461
|
+
) @func.def
|
|
47462
|
+
(function_definition
|
|
47463
|
+
(function_declarator
|
|
47464
|
+
declarator: (qualified_identifier (identifier) @func.name)
|
|
47465
|
+
)
|
|
47466
|
+
) @func.def
|
|
47467
|
+
(declaration
|
|
47468
|
+
declarator: (function_declarator
|
|
47469
|
+
declarator: (identifier) @func.name
|
|
47470
|
+
)
|
|
47471
|
+
) @func.def
|
|
47472
|
+
(declaration
|
|
47473
|
+
declarator: (pointer_declarator
|
|
47474
|
+
declarator: (function_declarator
|
|
47475
|
+
declarator: (identifier) @func.name
|
|
47476
|
+
)
|
|
47477
|
+
)
|
|
47478
|
+
) @func.def
|
|
47479
|
+
(function_definition
|
|
47480
|
+
(function_declarator
|
|
47481
|
+
declarator: (field_identifier) @method.name
|
|
47482
|
+
)
|
|
47483
|
+
) @method.def
|
|
47484
|
+
(field_declaration
|
|
47485
|
+
(function_declarator
|
|
47486
|
+
declarator: (field_identifier) @method.name
|
|
47487
|
+
)
|
|
47488
|
+
) @method.def
|
|
47399
47489
|
(class_specifier name: (type_identifier) @class.name) @class.def
|
|
47400
47490
|
(struct_specifier name: (type_identifier) @struct.name) @struct.def
|
|
47491
|
+
(enum_specifier name: (type_identifier) @enum.name) @enum.def
|
|
47492
|
+
(type_definition declarator: (type_identifier) @type.name) @type.def
|
|
47401
47493
|
`,
|
|
47402
47494
|
imports: `
|
|
47403
47495
|
(preproc_include) @import
|
|
@@ -47406,14 +47498,20 @@ var QUERIES = {
|
|
|
47406
47498
|
refs: `
|
|
47407
47499
|
(identifier) @ref.identifier
|
|
47408
47500
|
(namespace_identifier) @ref.identifier
|
|
47501
|
+
(type_identifier) @ref.identifier
|
|
47409
47502
|
`,
|
|
47410
47503
|
exports: ``
|
|
47411
47504
|
},
|
|
47412
47505
|
swift: {
|
|
47413
47506
|
defs: `
|
|
47414
47507
|
(function_declaration name: (simple_identifier) @func.name) @func.def
|
|
47508
|
+
(protocol_function_declaration name: (simple_identifier) @func.name) @func.def
|
|
47415
47509
|
(class_declaration name: (type_identifier) @class.name) @class.def
|
|
47510
|
+
(class_declaration
|
|
47511
|
+
name: (user_type (type_identifier) @extension.name)
|
|
47512
|
+
) @extension.def
|
|
47416
47513
|
(protocol_declaration name: (type_identifier) @protocol.name) @protocol.def
|
|
47514
|
+
(typealias_declaration name: (type_identifier) @type.name) @type.def
|
|
47417
47515
|
`,
|
|
47418
47516
|
imports: `
|
|
47419
47517
|
(import_declaration) @import
|
|
@@ -47421,6 +47519,7 @@ var QUERIES = {
|
|
|
47421
47519
|
refs: `
|
|
47422
47520
|
(identifier) @ref.identifier
|
|
47423
47521
|
(simple_identifier) @ref.identifier
|
|
47522
|
+
(type_identifier) @ref.identifier
|
|
47424
47523
|
`,
|
|
47425
47524
|
exports: ``
|
|
47426
47525
|
},
|
|
@@ -47489,7 +47588,8 @@ var CAPTURE_KIND = {
|
|
|
47489
47588
|
mixin: "type",
|
|
47490
47589
|
protocol: "interface",
|
|
47491
47590
|
record: "class",
|
|
47492
|
-
ctor: "method"
|
|
47591
|
+
ctor: "method",
|
|
47592
|
+
extension: "type"
|
|
47493
47593
|
};
|
|
47494
47594
|
var DEF_TYPES = new Set([
|
|
47495
47595
|
"function_declaration",
|
|
@@ -47534,6 +47634,13 @@ var JVM_CONTAINER_TYPES = new Set([
|
|
|
47534
47634
|
"enum_declaration",
|
|
47535
47635
|
"record_declaration"
|
|
47536
47636
|
]);
|
|
47637
|
+
var NATIVE_CONTAINER_TYPES = new Set([
|
|
47638
|
+
"class_specifier",
|
|
47639
|
+
"struct_specifier",
|
|
47640
|
+
"union_specifier",
|
|
47641
|
+
"class_declaration",
|
|
47642
|
+
"protocol_declaration"
|
|
47643
|
+
]);
|
|
47537
47644
|
var PARAM_TYPES = new Set([
|
|
47538
47645
|
"formal_parameters",
|
|
47539
47646
|
"required_parameter",
|
|
@@ -47542,6 +47649,7 @@ var PARAM_TYPES = new Set([
|
|
|
47542
47649
|
"array_pattern",
|
|
47543
47650
|
"object_pattern"
|
|
47544
47651
|
]);
|
|
47652
|
+
var SWIFT_REF_PARAM_TYPES = new Set([...PARAM_TYPES, "parameter"]);
|
|
47545
47653
|
async function extractFileSymbols(grammarId, source) {
|
|
47546
47654
|
const treeRef = { value: null };
|
|
47547
47655
|
let timeoutId;
|
|
@@ -47626,6 +47734,12 @@ function buildFacts(tree, qs, grammarId) {
|
|
|
47626
47734
|
kind = "method";
|
|
47627
47735
|
}
|
|
47628
47736
|
}
|
|
47737
|
+
if (grammarId === "cpp" || grammarId === "swift") {
|
|
47738
|
+
parentContainerType = nearestAncestorType(originalDefNode, NATIVE_CONTAINER_TYPES);
|
|
47739
|
+
if (parentContainerType !== undefined && kindKey === "func") {
|
|
47740
|
+
kind = "method";
|
|
47741
|
+
}
|
|
47742
|
+
}
|
|
47629
47743
|
const explicitExported = exportNodes.some((en) => isNodeInside(en, defNode));
|
|
47630
47744
|
let isDefaultExport = false;
|
|
47631
47745
|
if (explicitExported && isEsMGrammar(grammarId)) {
|
|
@@ -47666,7 +47780,7 @@ function buildFacts(tree, qs, grammarId) {
|
|
|
47666
47780
|
const nameNode = asTs(nc.node);
|
|
47667
47781
|
const localName = nameNode.text;
|
|
47668
47782
|
const commonJsExport = commonJsExports.get(localName);
|
|
47669
|
-
|
|
47783
|
+
let visibilityInfo = getSymbolVisibilityInfo({
|
|
47670
47784
|
grammarId,
|
|
47671
47785
|
localName,
|
|
47672
47786
|
kind,
|
|
@@ -47679,6 +47793,9 @@ function buildFacts(tree, qs, grammarId) {
|
|
|
47679
47793
|
pythonParentClassExported,
|
|
47680
47794
|
parentContainerType
|
|
47681
47795
|
});
|
|
47796
|
+
if (grammarId === "swift" && kindKey === "extension") {
|
|
47797
|
+
visibilityInfo = { ...visibilityInfo, exported: false };
|
|
47798
|
+
}
|
|
47682
47799
|
const exportedName = isDefaultExport ? "default" : commonJsExport?.exportedName ?? localName;
|
|
47683
47800
|
defs.push({
|
|
47684
47801
|
name: exportedName,
|
|
@@ -47781,6 +47898,7 @@ function buildFacts(tree, qs, grammarId) {
|
|
|
47781
47898
|
const imports = importsWithIndex.sort((a, b) => a.index - b.index).map((item) => item.entry);
|
|
47782
47899
|
const topLevelDefs = defNodes.filter((d) => isTopLevelDef(d.node, root)).map((d) => ({ name: d.name, node: d.node }));
|
|
47783
47900
|
const refs = [];
|
|
47901
|
+
const refParamTypes = grammarId === "swift" ? SWIFT_REF_PARAM_TYPES : PARAM_TYPES;
|
|
47784
47902
|
for (const m of refMatches) {
|
|
47785
47903
|
const cap = m.captures.find((c) => c.name === "ref.identifier");
|
|
47786
47904
|
if (!cap)
|
|
@@ -47792,7 +47910,7 @@ function buildFacts(tree, qs, grammarId) {
|
|
|
47792
47910
|
continue;
|
|
47793
47911
|
if (isInsideImportStatement(refNode))
|
|
47794
47912
|
continue;
|
|
47795
|
-
if (hasAncestorOfType(refNode,
|
|
47913
|
+
if (hasAncestorOfType(refNode, refParamTypes))
|
|
47796
47914
|
continue;
|
|
47797
47915
|
if (refNode.text === "require" && isInsideRequireCall(refNode))
|
|
47798
47916
|
continue;
|
|
@@ -48237,9 +48355,15 @@ function parseCSharpUsing(text) {
|
|
|
48237
48355
|
}
|
|
48238
48356
|
function parseCppInclude(text) {
|
|
48239
48357
|
const t = text.trim();
|
|
48240
|
-
const
|
|
48241
|
-
if (
|
|
48242
|
-
|
|
48358
|
+
const quoted = t.match(/^#\s*include\s+"([^"]+)"/);
|
|
48359
|
+
if (quoted) {
|
|
48360
|
+
const raw = quoted[1];
|
|
48361
|
+
const specifier = raw.startsWith(".") ? raw : `./${raw}`;
|
|
48362
|
+
return { specifier, importType: "namespace", bindings: [] };
|
|
48363
|
+
}
|
|
48364
|
+
const angle = t.match(/^#\s*include\s+<([^>]+)>/);
|
|
48365
|
+
if (angle) {
|
|
48366
|
+
return { specifier: angle[1], importType: "namespace", bindings: [] };
|
|
48243
48367
|
}
|
|
48244
48368
|
const using = t.match(/^using\s+(?:namespace\s+)?(.+?)\s*;?\s*$/);
|
|
48245
48369
|
if (using) {
|
|
@@ -48253,11 +48377,20 @@ function parseCppInclude(text) {
|
|
|
48253
48377
|
}
|
|
48254
48378
|
function parseSwiftImport(text) {
|
|
48255
48379
|
const t = text.trim();
|
|
48256
|
-
const
|
|
48257
|
-
|
|
48258
|
-
|
|
48380
|
+
const attrs = /^(?:@\w+(?:\([^)\n]*\))?\s+)*/.source;
|
|
48381
|
+
const m = t.match(new RegExp(`${attrs}import\\s+((?:class|struct|enum|protocol|typealias|func|var|let)\\s+)?([A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*)\\s*$`));
|
|
48382
|
+
if (!m)
|
|
48383
|
+
return null;
|
|
48384
|
+
const path71 = m[2].split(".");
|
|
48385
|
+
if (m[1] !== undefined && path71.length >= 2) {
|
|
48386
|
+
const imported = path71[path71.length - 1];
|
|
48387
|
+
return {
|
|
48388
|
+
specifier: path71[0],
|
|
48389
|
+
importType: "named",
|
|
48390
|
+
bindings: [{ imported, local: imported }]
|
|
48391
|
+
};
|
|
48259
48392
|
}
|
|
48260
|
-
return
|
|
48393
|
+
return { specifier: m[2], importType: "namespace", bindings: [] };
|
|
48261
48394
|
}
|
|
48262
48395
|
function parseDartImport(text) {
|
|
48263
48396
|
const t = text.trim();
|
|
@@ -50335,7 +50468,13 @@ async function walkRepoGraphInputs(dir, options) {
|
|
|
50335
50468
|
elapsedMs: Math.max(0, _internals64.now() - ctx.startedAt)
|
|
50336
50469
|
};
|
|
50337
50470
|
}
|
|
50338
|
-
var
|
|
50471
|
+
var RANGE_WIDENED_GRAMMARS = new Set([
|
|
50472
|
+
"java",
|
|
50473
|
+
"kotlin",
|
|
50474
|
+
"csharp",
|
|
50475
|
+
"cpp",
|
|
50476
|
+
"swift"
|
|
50477
|
+
]);
|
|
50339
50478
|
|
|
50340
50479
|
// src/tools/repo-graph/query.ts
|
|
50341
50480
|
var DEAD_EXPORT_EXCLUDED_ROLES = new Set([
|
|
@@ -66601,7 +66740,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
|
|
|
66601
66740
|
if (!input.dispatcher) {
|
|
66602
66741
|
throw new Error("no evaluation dispatcher available (cannot run validation)");
|
|
66603
66742
|
}
|
|
66604
|
-
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-
|
|
66743
|
+
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-gfzkp9nv.js");
|
|
66605
66744
|
const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
|
|
66606
66745
|
const result = await _internals94.evaluateCandidateV1({
|
|
66607
66746
|
projectRoot: input.directory,
|
|
@@ -68507,7 +68646,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
68507
68646
|
async function handleHelpCommand(ctx) {
|
|
68508
68647
|
const targetCommand = ctx.args.join(" ");
|
|
68509
68648
|
if (!targetCommand) {
|
|
68510
|
-
const { buildHelpText } = await import("./index-
|
|
68649
|
+
const { buildHelpText } = await import("./index-dfvh1r8g.js");
|
|
68511
68650
|
return buildHelpText();
|
|
68512
68651
|
}
|
|
68513
68652
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -68516,7 +68655,7 @@ async function handleHelpCommand(ctx) {
|
|
|
68516
68655
|
return _internals97.buildDetailedHelp(resolved.key, resolved.entry);
|
|
68517
68656
|
}
|
|
68518
68657
|
const similar = _internals97.findSimilarCommands(targetCommand);
|
|
68519
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
68658
|
+
const { buildHelpText: fullHelp } = await import("./index-dfvh1r8g.js");
|
|
68520
68659
|
if (similar.length > 0) {
|
|
68521
68660
|
return `Command '/swarm ${targetCommand}' not found.
|
|
68522
68661
|
|
|
@@ -68693,7 +68832,7 @@ var COMMAND_REGISTRY = {
|
|
|
68693
68832
|
},
|
|
68694
68833
|
"guardrail explain": {
|
|
68695
68834
|
handler: async (ctx) => {
|
|
68696
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
68835
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-44xt373y.js");
|
|
68697
68836
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
68698
68837
|
},
|
|
68699
68838
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -68703,7 +68842,7 @@ var COMMAND_REGISTRY = {
|
|
|
68703
68842
|
},
|
|
68704
68843
|
"guardrail reset": {
|
|
68705
68844
|
handler: async (ctx) => {
|
|
68706
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
68845
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-vpazhh8k.js");
|
|
68707
68846
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
68708
68847
|
},
|
|
68709
68848
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -68712,7 +68851,7 @@ var COMMAND_REGISTRY = {
|
|
|
68712
68851
|
},
|
|
68713
68852
|
"guardrail-explain": {
|
|
68714
68853
|
handler: async (ctx) => {
|
|
68715
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
68854
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-44xt373y.js");
|
|
68716
68855
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
68717
68856
|
},
|
|
68718
68857
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -68722,7 +68861,7 @@ var COMMAND_REGISTRY = {
|
|
|
68722
68861
|
},
|
|
68723
68862
|
"guardrail-reset": {
|
|
68724
68863
|
handler: async (ctx) => {
|
|
68725
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
68864
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-vpazhh8k.js");
|
|
68726
68865
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
68727
68866
|
},
|
|
68728
68867
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -68732,7 +68871,7 @@ var COMMAND_REGISTRY = {
|
|
|
68732
68871
|
},
|
|
68733
68872
|
"guardrail-log": {
|
|
68734
68873
|
handler: async (ctx) => {
|
|
68735
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
68874
|
+
const { handleGuardrailLog } = await import("./guardrail-log-kbp5jztb.js");
|
|
68736
68875
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
68737
68876
|
},
|
|
68738
68877
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -75723,7 +75862,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
75723
75862
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, provisionResult.worktreePath);
|
|
75724
75863
|
if (laneProfile) {
|
|
75725
75864
|
try {
|
|
75726
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
75865
|
+
const { writeLaneProfileToDiskReal } = await import("./core-k7m76ce0.js");
|
|
75727
75866
|
await writeLaneProfileToDiskReal(provisionResult.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
75728
75867
|
} catch {}
|
|
75729
75868
|
}
|
|
@@ -76381,7 +76520,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
76381
76520
|
}
|
|
76382
76521
|
clearWorktreeMergeStatus(statusKey);
|
|
76383
76522
|
try {
|
|
76384
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
76523
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-k7m76ce0.js");
|
|
76385
76524
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
76386
76525
|
} catch {}
|
|
76387
76526
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|