opencode-swarm 7.198.2 → 7.199.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-feedback/SKILL.md +6 -6
- package/.opencode/skills/swarm-pr-feedback/references/followup-dispositions.md +74 -0
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +25 -0
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/pending-delegations.d.ts +1 -1
- package/dist/background/pr-review-contract.d.ts +10 -0
- package/dist/cli/{auto-checkpoint-ekp5j5v5.js → auto-checkpoint-1wf9n5yj.js} +8 -8
- package/dist/cli/{checkpoint-30yrbqee.js → checkpoint-gw6f4ghv.js} +16 -16
- package/dist/cli/{coder-settlement-t3zcgsd6.js → coder-settlement-qy77s1x6.js} +12 -12
- package/dist/cli/{config-doctor-6w105xpy.js → config-doctor-2tcp28sc.js} +15 -15
- package/dist/cli/{core-6hyt1hg6.js → core-pz87qafz.js} +3 -3
- package/dist/cli/{curation-policy-m8ng2vm5.js → curation-policy-0smbd33w.js} +6 -6
- package/dist/cli/{curator-drift-z83e3a60.js → curator-drift-c1x7jdxj.js} +8 -8
- package/dist/cli/{curator-bzy7cess.js → curator-fvnptcnw.js} +42 -42
- package/dist/cli/curator-llm-factory-cg1p6ysr.js +82 -0
- package/dist/cli/{doctor-knowledge-receipt-phase-id-8av1860z.js → doctor-knowledge-receipt-phase-id-xwyb5sf8.js} +8 -8
- package/dist/cli/{evidence-summary-service-ym7y7w5k.js → evidence-summary-service-47cptvea.js} +19 -19
- package/dist/cli/{gate-evidence-vvhtzwry.js → gate-evidence-77bzfckz.js} +7 -7
- package/dist/cli/guardrail-explain-0ap0a51w.js +83 -0
- package/dist/cli/{guardrail-log-4f0jxq61.js → guardrail-log-xw37f7ws.js} +7 -7
- package/dist/cli/{guardrail-reset-cqq3yk9s.js → guardrail-reset-3fq8xdjf.js} +42 -42
- package/dist/cli/{hive-promoter-vvgdsx8s.js → hive-promoter-bmdgnmnf.js} +42 -42
- package/dist/cli/{index-vjwmcxz4.js → index-1fwm8vqr.js} +7 -7
- package/dist/cli/{index-drf91t9h.js → index-26h8fb7t.js} +5 -5
- package/dist/cli/{index-yk1vnpzx.js → index-2bc7zfw3.js} +1 -1
- package/dist/cli/{index-7e9mqse6.js → index-2f9tsejp.js} +3 -3
- package/dist/cli/{index-d31b2zvf.js → index-2mx2gn97.js} +1 -1
- package/dist/cli/{index-wg1mt92h.js → index-3gwh8c9d.js} +9 -8
- package/dist/cli/{index-rfcb9f54.js → index-3x07b03s.js} +3 -2
- package/dist/cli/{index-bczx8jcg.js → index-42dtc5nd.js} +5 -12
- package/dist/cli/{index-5h5tj8wc.js → index-4hnxtssf.js} +44 -44
- package/dist/cli/{index-89j5h1j9.js → index-4s6kdsfr.js} +1 -1
- package/dist/cli/{index-4s3770gs.js → index-6dtt0brw.js} +4 -4
- package/dist/cli/{index-hd3d7rcw.js → index-71g0ps66.js} +3 -3
- package/dist/cli/{index-166xny29.js → index-79b9re6h.js} +588 -170
- package/dist/cli/{index-t7qgt5yk.js → index-7c432abn.js} +2 -2
- package/dist/cli/{index-xez06sc1.js → index-820pzqd6.js} +1 -1
- package/dist/cli/{index-v30zmakk.js → index-9ztsfved.js} +2 -2
- package/dist/cli/{index-ehw0s6xa.js → index-a5xzwxdq.js} +1 -1
- package/dist/cli/{index-e4hj8r57.js → index-awt5dpam.js} +2 -2
- package/dist/cli/{index-cfs1k1eh.js → index-b5k6etf9.js} +5 -5
- package/dist/cli/{index-v85gn9jm.js → index-bjzxbxpw.js} +5 -5
- package/dist/cli/{index-qg6qn99c.js → index-bkscmz4z.js} +7 -7
- package/dist/cli/{index-rnjtf5kn.js → index-ckcdheqx.js} +2 -2
- package/dist/cli/{index-xrghsqg3.js → index-e5ecn73v.js} +4 -4
- package/dist/cli/{index-tnnxvq2f.js → index-gds6c8qt.js} +6 -6
- package/dist/cli/{index-tdpfecs3.js → index-hc6wa3yg.js} +2 -2
- package/dist/cli/{index-76mg98ac.js → index-jccs3fgn.js} +1 -1
- package/dist/cli/{index-0y5yvag6.js → index-jjsjjefm.js} +6 -6
- package/dist/cli/{index-whmby20t.js → index-kjhsssaq.js} +42 -42
- package/dist/cli/{index-bj916p5e.js → index-kxaxf3en.js} +17 -4
- package/dist/cli/{index-9keabj7d.js → index-mefad009.js} +4 -4
- package/dist/cli/{index-mx74665q.js → index-mzsj4kkv.js} +4 -4
- package/dist/cli/{index-rqxwv4q5.js → index-nr1pj3hy.js} +1 -1
- package/dist/cli/{index-xt4q610f.js → index-p5pgjp7n.js} +1 -1
- package/dist/cli/{index-h86e4jp9.js → index-pqrepne6.js} +2 -2
- package/dist/cli/{index-84r9rydf.js → index-pxdc0qn1.js} +2 -2
- package/dist/cli/{index-bd4szzja.js → index-qdwccqv5.js} +1 -1
- package/dist/cli/{index-d9jrzepr.js → index-r52wrpb7.js} +3 -3
- package/dist/cli/{index-y81sw9vt.js → index-tnrq0pg8.js} +11 -11
- package/dist/cli/{index-5hbb3088.js → index-vbm2ykr9.js} +4 -4
- package/dist/cli/{index-gc9dvmy7.js → index-vh87e91s.js} +2 -2
- package/dist/cli/{index-wrn4khfb.js → index-w00dj8p5.js} +1 -1
- package/dist/cli/{index-mjmsq8t7.js → index-w7d8gcj0.js} +2 -2
- package/dist/cli/{index-0ap067j7.js → index-y9ckbta5.js} +2 -2
- package/dist/cli/{index-xxb2depv.js → index-ye9bze9s.js} +7 -7
- package/dist/cli/{index-p4xmq6aa.js → index-ywb5er8g.js} +1 -1
- package/dist/cli/{index-6pc5j9rb.js → index-zd15v0gr.js} +3 -3
- package/dist/cli/{index-59w9zfc5.js → index-zg5gnn3m.js} +5 -5
- package/dist/cli/index.js +43 -43
- package/dist/cli/{knowledge-escalator-8hrnc4bd.js → knowledge-escalator-w7b32ak4.js} +14 -14
- package/dist/cli/{knowledge-events-v2abqt9z.js → knowledge-events-y0kb9wbe.js} +12 -12
- package/dist/cli/{knowledge-link-5qt3pe5v.js → knowledge-link-1f91bzcc.js} +5 -5
- package/dist/cli/{knowledge-store-9y17zzce.js → knowledge-store-knrqgmyk.js} +6 -6
- package/dist/cli/{knowledge-validator-7red2zwb.js → knowledge-validator-zg7d9z8p.js} +8 -8
- package/dist/cli/{mcp-gbyndb15.js → mcp-3k1t9q6h.js} +1 -1
- package/dist/cli/{model-preflight-1tsaksc7.js → model-preflight-k92fnbq8.js} +42 -42
- package/dist/cli/{pending-delegations-yg769m4y.js → pending-delegations-ape3hrm0.js} +12 -12
- package/dist/cli/{pr-subscriptions-mc2mvjkj.js → pr-subscriptions-cn13b19x.js} +12 -12
- package/dist/cli/{pr-workflow-gate-0fb280b2.js → pr-workflow-gate-74j5mcxh.js} +46 -42
- package/dist/cli/{runner-rwya5yhg.js → runner-qe3fkzx5.js} +6 -6
- package/dist/cli/{scan-cursor-g74j6gcr.js → scan-cursor-4xxfc42h.js} +7 -7
- package/dist/cli/{schema-q2v7px9y.js → schema-qv9bvhyz.js} +1 -1
- package/dist/cli/{scope-persistence-g88f0163.js → scope-persistence-fmva1cv0.js} +15 -15
- package/dist/cli/{server-j3a7q7gg.js → server-s5ac6ydk.js} +42 -42
- package/dist/cli/{skill-generator-30bjrvcc.js → skill-generator-19ckpm74.js} +16 -16
- package/dist/cli/{snapshot-coordination-init-9ekvft16.js → snapshot-coordination-init-7c0s65jw.js} +42 -42
- package/dist/cli/{speckit-checkoff-sx24fz29.js → speckit-checkoff-9b2zj8hd.js} +4 -4
- package/dist/cli/{telemetry-t3425cht.js → telemetry-6yv06xyz.js} +1 -1
- package/dist/cli/{workspace-snapshot-bst64vey.js → workspace-snapshot-vhvrkbbb.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-shtk6dsk.js → worktree-collision-ownership-3r669yvh.js} +13 -13
- package/dist/cli/{worktree-isolation-x41cgd9n.js → worktree-isolation-5dydsr8c.js} +42 -42
- package/dist/config/schema.d.ts +2 -0
- package/dist/config/skill-contract-digest.d.ts +29 -4
- package/dist/hooks/pr-workflow-gate.d.ts +17 -0
- package/dist/hooks/skill-scoring.d.ts +40 -0
- package/dist/index.js +52 -44
- package/dist/pr-review/verdict-settlement.d.ts +40 -4
- package/dist/state.d.ts +49 -0
- package/opencode-swarm.schema.json +4 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-ykpty14a.js +0 -82
- package/dist/cli/guardrail-explain-1ethgkvp.js +0 -83
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
protectedRoots,
|
|
9
9
|
redactDecisionLineForArchive,
|
|
10
10
|
stableCanonicalStringify
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-kxaxf3en.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-42dtc5nd.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-zg5gnn3m.js";
|
|
31
31
|
import {
|
|
32
32
|
JAVA_SYMBOL_GRAMMAR,
|
|
33
33
|
LANGUAGE_REGISTRY,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
runEvaluation,
|
|
57
57
|
runExternalTool,
|
|
58
58
|
withDisposableWorktree
|
|
59
|
-
} from "./index-
|
|
59
|
+
} from "./index-jccs3fgn.js";
|
|
60
60
|
import {
|
|
61
61
|
EvaluationTaskV1Schema,
|
|
62
62
|
GateAuditManifestV1Schema,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
saveGateAuditResult,
|
|
74
74
|
savePromotionDecision,
|
|
75
75
|
saveTaskSetSnapshot
|
|
76
|
-
} from "./index-
|
|
76
|
+
} from "./index-7c432abn.js";
|
|
77
77
|
import {
|
|
78
78
|
canonicalHash,
|
|
79
79
|
canonicalJson,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
alreadyCuratedThisGeneration,
|
|
90
90
|
claimNextScanBatch,
|
|
91
91
|
resolveCohortId
|
|
92
|
-
} from "./index-
|
|
92
|
+
} from "./index-y9ckbta5.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-r52wrpb7.js";
|
|
112
112
|
import {
|
|
113
113
|
assertNoUnsettledCoderDispatch,
|
|
114
114
|
listCoderSettlementWalStates,
|
|
115
115
|
recoverCoderSettlement,
|
|
116
116
|
recoverStaleCoderSettlements
|
|
117
|
-
} from "./index-
|
|
117
|
+
} from "./index-ye9bze9s.js";
|
|
118
118
|
import {
|
|
119
119
|
BUNDLED_PROJECT_SKILL_ROOT,
|
|
120
120
|
DEFAULT_SKILL_MIN_CONFIDENCE,
|
|
@@ -137,11 +137,11 @@ import {
|
|
|
137
137
|
skillContractDigest,
|
|
138
138
|
splitSkillFrontmatter,
|
|
139
139
|
syncBundledProjectSkillsIfMissingAsync
|
|
140
|
-
} from "./index-
|
|
140
|
+
} from "./index-mefad009.js";
|
|
141
141
|
import {
|
|
142
142
|
buildEscalationBriefing,
|
|
143
143
|
readRecentEscalations
|
|
144
|
-
} from "./index-
|
|
144
|
+
} from "./index-jjsjjefm.js";
|
|
145
145
|
import {
|
|
146
146
|
parsePorcelainV2Snapshot,
|
|
147
147
|
resolveCommitCountSince,
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
resolveRemoteUrlIdentity,
|
|
170
170
|
resolveRemoteUrlIdentityAsync,
|
|
171
171
|
switchPrFeedbackTrackingCandidateAsync
|
|
172
|
-
} from "./index-
|
|
172
|
+
} from "./index-9ztsfved.js";
|
|
173
173
|
import {
|
|
174
174
|
buildCorrelationId,
|
|
175
175
|
buildIssueUrl,
|
|
@@ -190,13 +190,13 @@ import {
|
|
|
190
190
|
sweepStale,
|
|
191
191
|
unsubscribe,
|
|
192
192
|
updateSnapshot
|
|
193
|
-
} from "./index-
|
|
193
|
+
} from "./index-bkscmz4z.js";
|
|
194
194
|
import {
|
|
195
195
|
WORKTREE_LIFECYCLE_LOCK_FILE,
|
|
196
196
|
recordWorktreeProvisioningOwner,
|
|
197
197
|
removeWorktreeProvisioningOwner,
|
|
198
198
|
scanWorktreeProvisioningOwnersForRecovery
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-pxdc0qn1.js";
|
|
200
200
|
import {
|
|
201
201
|
getLanguageForExtension
|
|
202
202
|
} from "./index-pt7h91zc.js";
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
swarmOverwriteCandidates,
|
|
226
226
|
trackedDirtyCandidates,
|
|
227
227
|
transientBackoff
|
|
228
|
-
} from "./index-
|
|
228
|
+
} from "./index-gds6c8qt.js";
|
|
229
229
|
import {
|
|
230
230
|
EPIC_MODE_CONFIG_DISABLED_MESSAGE,
|
|
231
231
|
PlanRecoverySupersededError,
|
|
@@ -257,7 +257,7 @@ import {
|
|
|
257
257
|
updateEpicRecord,
|
|
258
258
|
updateTaskStatus,
|
|
259
259
|
withPlanLifecycleLock
|
|
260
|
-
} from "./index-
|
|
260
|
+
} from "./index-tnrq0pg8.js";
|
|
261
261
|
import {
|
|
262
262
|
containsControlChars,
|
|
263
263
|
containsPathTraversal,
|
|
@@ -274,7 +274,7 @@ import {
|
|
|
274
274
|
resolveSpeckitProjection,
|
|
275
275
|
validateSpeckit,
|
|
276
276
|
writeProjectedSpecSync
|
|
277
|
-
} from "./index-
|
|
277
|
+
} from "./index-zd15v0gr.js";
|
|
278
278
|
import {
|
|
279
279
|
clearWorktreeMergeStatus,
|
|
280
280
|
getAllWorktreeMergeFailures,
|
|
@@ -306,7 +306,7 @@ import {
|
|
|
306
306
|
transitionTaskWorkflowEvidenceWithStatus,
|
|
307
307
|
withTaskEvidenceTransaction,
|
|
308
308
|
writeWorkflowWalFile
|
|
309
|
-
} from "./index-
|
|
309
|
+
} from "./index-vbm2ykr9.js";
|
|
310
310
|
import {
|
|
311
311
|
isPathUnderSwarmWorktreeBase,
|
|
312
312
|
listLiveLaneOwners,
|
|
@@ -315,7 +315,7 @@ import {
|
|
|
315
315
|
recordLiveLaneOwner,
|
|
316
316
|
removeWorktree,
|
|
317
317
|
resolveWorktreeBaseDir
|
|
318
|
-
} from "./index-
|
|
318
|
+
} from "./index-2f9tsejp.js";
|
|
319
319
|
import {
|
|
320
320
|
GitBinaryMissingError,
|
|
321
321
|
GitSpawnCwdError,
|
|
@@ -358,7 +358,7 @@ import {
|
|
|
358
358
|
scanBackgroundCoderReservationsForAdmission,
|
|
359
359
|
scanDelegationsForRecovery,
|
|
360
360
|
sweepStaleDelegations
|
|
361
|
-
} from "./index-
|
|
361
|
+
} from "./index-3gwh8c9d.js";
|
|
362
362
|
import {
|
|
363
363
|
MAX_EVENT_LOG_ENTRIES,
|
|
364
364
|
_internals,
|
|
@@ -370,7 +370,7 @@ import {
|
|
|
370
370
|
recordHiveKnowledgeEvent,
|
|
371
371
|
recordKnowledgeEvent,
|
|
372
372
|
resolveKnowledgeEventsPath
|
|
373
|
-
} from "./index-
|
|
373
|
+
} from "./index-mzsj4kkv.js";
|
|
374
374
|
import {
|
|
375
375
|
commitDisplayedMembership,
|
|
376
376
|
commitEmptyRetrieval,
|
|
@@ -383,7 +383,7 @@ import {
|
|
|
383
383
|
queryLiveMemberships,
|
|
384
384
|
reconcilePhaseClose,
|
|
385
385
|
recordPhaseCloseIntent
|
|
386
|
-
} from "./index-
|
|
386
|
+
} from "./index-bjzxbxpw.js";
|
|
387
387
|
import {
|
|
388
388
|
sanitizeContextText
|
|
389
389
|
} from "./index-m9zzj4ee.js";
|
|
@@ -394,7 +394,7 @@ import {
|
|
|
394
394
|
readSwarmFileAsync,
|
|
395
395
|
safeHook,
|
|
396
396
|
validateSwarmPath
|
|
397
|
-
} from "./index-
|
|
397
|
+
} from "./index-820pzqd6.js";
|
|
398
398
|
import {
|
|
399
399
|
bunFile,
|
|
400
400
|
bunSpawn,
|
|
@@ -414,18 +414,18 @@ import {
|
|
|
414
414
|
validateActionableFields,
|
|
415
415
|
validateLesson,
|
|
416
416
|
validateSkillPath
|
|
417
|
-
} from "./index-
|
|
417
|
+
} from "./index-e5ecn73v.js";
|
|
418
418
|
import {
|
|
419
419
|
MAX_CURATION_PROPOSALS,
|
|
420
420
|
authorizeCuration,
|
|
421
421
|
buildConfigFingerprintInput
|
|
422
|
-
} from "./index-
|
|
422
|
+
} from "./index-2mx2gn97.js";
|
|
423
423
|
import {
|
|
424
424
|
cohortConfigFingerprint
|
|
425
425
|
} from "./index-rtry5xyf.js";
|
|
426
426
|
import {
|
|
427
427
|
resolveWorktreeIsolationConfig
|
|
428
|
-
} from "./index-
|
|
428
|
+
} from "./index-vh87e91s.js";
|
|
429
429
|
import {
|
|
430
430
|
RetrospectiveEvidenceSchema
|
|
431
431
|
} from "./index-g22dps7x.js";
|
|
@@ -437,7 +437,7 @@ import {
|
|
|
437
437
|
clearScopeBindings,
|
|
438
438
|
readAuthoritativeScopeBindingSet,
|
|
439
439
|
readDeclaredScopeFilesFromBindings
|
|
440
|
-
} from "./index-
|
|
440
|
+
} from "./index-b5k6etf9.js";
|
|
441
441
|
import {
|
|
442
442
|
approvedSnapshotCoversPlan,
|
|
443
443
|
clearPlanLedgerForReset,
|
|
@@ -454,7 +454,7 @@ import {
|
|
|
454
454
|
replayFromLedgerWithStatus,
|
|
455
455
|
resolvePlanningProfile,
|
|
456
456
|
takeSnapshotEvent
|
|
457
|
-
} from "./index-
|
|
457
|
+
} from "./index-26h8fb7t.js";
|
|
458
458
|
import {
|
|
459
459
|
CORE_EVENT_LOCKED,
|
|
460
460
|
appendCoreEventSync,
|
|
@@ -464,7 +464,7 @@ import {
|
|
|
464
464
|
hasSpecDriftAuditEvent,
|
|
465
465
|
hasTaskRepairAuditEvent,
|
|
466
466
|
readCoreEvents
|
|
467
|
-
} from "./index-
|
|
467
|
+
} from "./index-awt5dpam.js";
|
|
468
468
|
import {
|
|
469
469
|
DEFAULT_QA_GATES,
|
|
470
470
|
computeProfileHash,
|
|
@@ -472,7 +472,7 @@ import {
|
|
|
472
472
|
getEffectiveGates,
|
|
473
473
|
getProfileLookupForIdentity,
|
|
474
474
|
setGatesForIdentity
|
|
475
|
-
} from "./index-
|
|
475
|
+
} from "./index-p5pgjp7n.js";
|
|
476
476
|
import {
|
|
477
477
|
MAX_COORDINATION_STATE_LIST_ROWS,
|
|
478
478
|
deleteCoordinationImports,
|
|
@@ -483,7 +483,7 @@ import {
|
|
|
483
483
|
listCoordinationStates,
|
|
484
484
|
transitionCoordinationState,
|
|
485
485
|
withCoordinationTransaction
|
|
486
|
-
} from "./index-
|
|
486
|
+
} from "./index-nr1pj3hy.js";
|
|
487
487
|
import {
|
|
488
488
|
DURABILITY_CLASSES,
|
|
489
489
|
closeAllProjectDbs,
|
|
@@ -492,7 +492,7 @@ import {
|
|
|
492
492
|
projectDbExists,
|
|
493
493
|
projectDbPath,
|
|
494
494
|
withImmediateTransaction
|
|
495
|
-
} from "./index-
|
|
495
|
+
} from "./index-w00dj8p5.js";
|
|
496
496
|
import {
|
|
497
497
|
canonicalExistingFilesystemPath,
|
|
498
498
|
canonicalPathForFutureIo,
|
|
@@ -512,7 +512,7 @@ import {
|
|
|
512
512
|
observeModelLimitResolution,
|
|
513
513
|
observeStoreHealth,
|
|
514
514
|
readLearningHealth
|
|
515
|
-
} from "./index-
|
|
515
|
+
} from "./index-hc6wa3yg.js";
|
|
516
516
|
import {
|
|
517
517
|
appendKnowledge,
|
|
518
518
|
appendRejectedLesson,
|
|
@@ -543,7 +543,7 @@ import {
|
|
|
543
543
|
transactFile,
|
|
544
544
|
transactKnowledge,
|
|
545
545
|
wordBigrams
|
|
546
|
-
} from "./index-
|
|
546
|
+
} from "./index-1fwm8vqr.js";
|
|
547
547
|
import {
|
|
548
548
|
readTailJsonl,
|
|
549
549
|
readTailJsonlDetailed,
|
|
@@ -564,13 +564,13 @@ import {
|
|
|
564
564
|
resolveLinkDir,
|
|
565
565
|
sanitizeLinkId,
|
|
566
566
|
writeLinkPointer
|
|
567
|
-
} from "./index-
|
|
567
|
+
} from "./index-2bc7zfw3.js";
|
|
568
568
|
import {
|
|
569
569
|
atomicWriteFile
|
|
570
|
-
} from "./index-
|
|
570
|
+
} from "./index-w7d8gcj0.js";
|
|
571
571
|
import {
|
|
572
572
|
withEvidenceLock
|
|
573
|
-
} from "./index-
|
|
573
|
+
} from "./index-4s6kdsfr.js";
|
|
574
574
|
import {
|
|
575
575
|
assertProjectRoot
|
|
576
576
|
} from "./index-t7hmqgjy.js";
|
|
@@ -584,7 +584,7 @@ import {
|
|
|
584
584
|
pseudonymousRef,
|
|
585
585
|
resolveLineageSalt,
|
|
586
586
|
telemetry
|
|
587
|
-
} from "./index-
|
|
587
|
+
} from "./index-6dtt0brw.js";
|
|
588
588
|
import {
|
|
589
589
|
SESSION_KEY_SEPARATOR,
|
|
590
590
|
canonicalRootKey,
|
|
@@ -610,7 +610,7 @@ import {
|
|
|
610
610
|
matchTempGrammar,
|
|
611
611
|
parseTargetBasename,
|
|
612
612
|
resetSwarmArtifactCache
|
|
613
|
-
} from "./index-
|
|
613
|
+
} from "./index-ywb5er8g.js";
|
|
614
614
|
import {
|
|
615
615
|
PlanSchema,
|
|
616
616
|
TaskStatusSchema,
|
|
@@ -628,7 +628,7 @@ import {
|
|
|
628
628
|
loadPluginConfig,
|
|
629
629
|
loadPluginConfigWithMeta,
|
|
630
630
|
resolveEpicConfig
|
|
631
|
-
} from "./index-
|
|
631
|
+
} from "./index-qdwccqv5.js";
|
|
632
632
|
import {
|
|
633
633
|
GIT_BINARY_ENV_VAR,
|
|
634
634
|
addDeferredWarning,
|
|
@@ -661,7 +661,7 @@ import {
|
|
|
661
661
|
resolveContextWindow,
|
|
662
662
|
resolveGeneratedAgentRole,
|
|
663
663
|
stripKnownSwarmPrefix
|
|
664
|
-
} from "./index-
|
|
664
|
+
} from "./index-3x07b03s.js";
|
|
665
665
|
import {
|
|
666
666
|
AGENT_TOOL_MAP,
|
|
667
667
|
ALL_AGENT_NAMES,
|
|
@@ -3463,7 +3463,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
|
|
|
3463
3463
|
return null;
|
|
3464
3464
|
throw error2;
|
|
3465
3465
|
}
|
|
3466
|
-
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-
|
|
3466
|
+
const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-74j5mcxh.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
|
|
3467
3467
|
if (!legacy)
|
|
3468
3468
|
return null;
|
|
3469
3469
|
const namespace = workflowGateStateCoordinationNamespace(sessionID);
|
|
@@ -3597,7 +3597,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
|
|
|
3597
3597
|
let recoveryState = null;
|
|
3598
3598
|
if (!currentAuthoritative) {
|
|
3599
3599
|
if (options.allowSalvagedRead) {
|
|
3600
|
-
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-
|
|
3600
|
+
const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-74j5mcxh.js");
|
|
3601
3601
|
recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
|
|
3602
3602
|
}
|
|
3603
3603
|
if (!recoveryState) {
|
|
@@ -4867,6 +4867,15 @@ function appendCompositionDiagnostic(diagnostics, message) {
|
|
|
4867
4867
|
return;
|
|
4868
4868
|
diagnostics.push(message.slice(0, MAX_BASE_COVERAGE_DIAGNOSTIC_CHARS));
|
|
4869
4869
|
}
|
|
4870
|
+
var VERDICT_ROW_IDENTIFIER_CHARSET = /^[A-Za-z0-9._:-]+$/;
|
|
4871
|
+
function boundVerdictRowIdentifier(raw) {
|
|
4872
|
+
if (raw === undefined || raw === "")
|
|
4873
|
+
return "(missing)";
|
|
4874
|
+
if (!VERDICT_ROW_IDENTIFIER_CHARSET.test(raw))
|
|
4875
|
+
return "(invalid-id)";
|
|
4876
|
+
const redacted = redactSecrets(raw).slice(0, 64);
|
|
4877
|
+
return VERDICT_ROW_IDENTIFIER_CHARSET.test(redacted) ? redacted : "(redacted)";
|
|
4878
|
+
}
|
|
4870
4879
|
var REVIEWER_ITEM_BINDING_KEY_PREFIX = "item:";
|
|
4871
4880
|
function reviewerItemBindingKey(itemId) {
|
|
4872
4881
|
return `${REVIEWER_ITEM_BINDING_KEY_PREFIX}${itemId}`;
|
|
@@ -4891,6 +4900,7 @@ function composePrReviewPhaseVerdicts(directory, state, phase, ctx, exhaustive =
|
|
|
4891
4900
|
const claims = new Map;
|
|
4892
4901
|
const contributingBatchIds = [];
|
|
4893
4902
|
const diagnostics = [];
|
|
4903
|
+
const deferredQuarantineDiagnostics = [];
|
|
4894
4904
|
const satisfiedObligations = new Set;
|
|
4895
4905
|
const scannedBatches = [];
|
|
4896
4906
|
const laneFailureReasons = new Map;
|
|
@@ -4945,8 +4955,8 @@ function composePrReviewPhaseVerdicts(directory, state, phase, ctx, exhaustive =
|
|
|
4945
4955
|
const arities = [
|
|
4946
4956
|
...new Set(quarantined.map((stray) => stray.arity))
|
|
4947
4957
|
].sort((a, b) => a - b);
|
|
4948
|
-
const ids = quarantined.map((stray) =>
|
|
4949
|
-
|
|
4958
|
+
const ids = quarantined.map((stray) => stray.itemId).filter((value, index, all) => all.indexOf(value) === index).slice(0, 8);
|
|
4959
|
+
deferredQuarantineDiagnostics.push(`${phase} lane "${qualified.expectedLane.laneId}" quarantined ${quarantined.length} illegal-arity ${quarantined[0]?.marker ?? "verdict"} row(s) (arities ${arities.join(", ")}; item ids ${ids.map((id) => `"${id}"`).join(", ")}); quarantined rows carry no verdict`);
|
|
4950
4960
|
}
|
|
4951
4961
|
if (!verdictRowsContainOnlyAssignedIds(markerRows, declaredItems)) {
|
|
4952
4962
|
appendCompositionDiagnostic(diagnostics, `${phase} lane "${qualified.expectedLane.laneId}" contains an unassigned verdict row; it contributes no claims`);
|
|
@@ -5023,6 +5033,9 @@ function composePrReviewPhaseVerdicts(directory, state, phase, ctx, exhaustive =
|
|
|
5023
5033
|
}) : undefined;
|
|
5024
5034
|
appendCompositionDiagnostic(diagnostics, `declared ${phase} lane "${obligation}" produced no successful exact artifact${journalMessage ? `; last rejected write_pr_review_artifact: ${journalMessage}` : ""}${failureReason ? `: ${failureReason}` : ""}`);
|
|
5025
5035
|
}
|
|
5036
|
+
for (const message of deferredQuarantineDiagnostics) {
|
|
5037
|
+
appendCompositionDiagnostic(diagnostics, message);
|
|
5038
|
+
}
|
|
5026
5039
|
const composition = {
|
|
5027
5040
|
claims,
|
|
5028
5041
|
requiredInventory,
|
|
@@ -5053,14 +5066,14 @@ function indexVerdictRows(text, marker) {
|
|
|
5053
5066
|
if (fields.length !== legalArity) {
|
|
5054
5067
|
quarantined.push({
|
|
5055
5068
|
marker,
|
|
5056
|
-
itemId: fields[1]
|
|
5069
|
+
itemId: boundVerdictRowIdentifier(fields[1]),
|
|
5057
5070
|
arity: fields.length
|
|
5058
5071
|
});
|
|
5059
5072
|
continue;
|
|
5060
5073
|
}
|
|
5061
5074
|
if (row.recoveredOverflow) {
|
|
5062
5075
|
const recovery = row.overflowClass;
|
|
5063
|
-
const itemId2 = fields[1]
|
|
5076
|
+
const itemId2 = boundVerdictRowIdentifier(fields[1]);
|
|
5064
5077
|
recoveries.push({ marker, itemId: itemId2, recovery });
|
|
5065
5078
|
warn("PR_REVIEW recovered a legacy verdict row with unescaped pipe overflow", {
|
|
5066
5079
|
marker,
|
|
@@ -5130,7 +5143,7 @@ function analyzePrReviewVerdictRowContract(text, itemIds, phase, reviewerClaims)
|
|
|
5130
5143
|
const marker = phase === "reviewer" ? "[REVIEWED]" : "[CRITIC]";
|
|
5131
5144
|
const assigned = new Set(itemIds);
|
|
5132
5145
|
const { markerRows, parsed, recoveries, quarantined } = parsePrReviewVerdictRows(text, itemIds, phase, reviewerClaims);
|
|
5133
|
-
const observedIds = markerRows.map((fields) => fields[1]
|
|
5146
|
+
const observedIds = markerRows.map((fields) => assigned.has(fields[1] ?? "") ? fields[1] ?? "" : boundVerdictRowIdentifier(fields[1]));
|
|
5134
5147
|
const unexpectedIds = [
|
|
5135
5148
|
...new Set(observedIds.filter((itemId) => !assigned.has(itemId)))
|
|
5136
5149
|
];
|
|
@@ -5300,8 +5313,12 @@ var PrReviewVerdictSettlementItemSchema = exports_external.object({
|
|
|
5300
5313
|
itemId: exports_external.string().trim().min(1),
|
|
5301
5314
|
sourceBatchId: exports_external.string().trim().min(1),
|
|
5302
5315
|
sourceLaneId: exports_external.string().trim().min(1),
|
|
5303
|
-
disposition: exports_external.
|
|
5304
|
-
|
|
5316
|
+
disposition: exports_external.enum([
|
|
5317
|
+
"liveness_dead",
|
|
5318
|
+
"verdict_contract_dead",
|
|
5319
|
+
"resource_dead"
|
|
5320
|
+
]),
|
|
5321
|
+
evidenceClass: exports_external.enum(["liveness", "verdict_contract", "resource"]),
|
|
5305
5322
|
terminalStatus: exports_external.enum(["stale", "cancelled", "error"])
|
|
5306
5323
|
}).strict();
|
|
5307
5324
|
var PrReviewVerdictSettlementReceiptSchema = exports_external.object({
|
|
@@ -5315,11 +5332,26 @@ var PrReviewVerdictSettlementReceiptSchema = exports_external.object({
|
|
|
5315
5332
|
function verdictSettlementRelativePath(runId, phase) {
|
|
5316
5333
|
return path6.join("pr-review", runId, `verdict-settlement.${phase}.json`);
|
|
5317
5334
|
}
|
|
5318
|
-
function
|
|
5335
|
+
function typedDeadDisclosureClassForRecord(record) {
|
|
5319
5336
|
if (record.status !== "cancelled" && record.status !== "stale" && record.status !== "error") {
|
|
5320
|
-
return
|
|
5337
|
+
return null;
|
|
5321
5338
|
}
|
|
5322
|
-
|
|
5339
|
+
const terminalClass = record.terminalResult?.result.workflowLaneFailureClass ?? null;
|
|
5340
|
+
const resultClass = record.result?.workflowLaneFailureClass ?? null;
|
|
5341
|
+
for (const cls of [terminalClass, resultClass]) {
|
|
5342
|
+
switch (cls) {
|
|
5343
|
+
case "liveness":
|
|
5344
|
+
return "liveness";
|
|
5345
|
+
case "verdict_contract":
|
|
5346
|
+
case "contract":
|
|
5347
|
+
return "verdict_contract";
|
|
5348
|
+
case "resource":
|
|
5349
|
+
return "resource";
|
|
5350
|
+
default:
|
|
5351
|
+
break;
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
return null;
|
|
5323
5355
|
}
|
|
5324
5356
|
function deriveVerdictSettlementAdmission(args) {
|
|
5325
5357
|
const { directory, prHeadSha, phase, window, unclaimed } = args;
|
|
@@ -5361,17 +5393,30 @@ function deriveVerdictSettlementAdmission(args) {
|
|
|
5361
5393
|
};
|
|
5362
5394
|
}
|
|
5363
5395
|
const record = read.value.find((candidate) => candidate.batchId === batch.batchId && candidate.laneId === lane.laneId && candidate.mode === expectedMode && candidate.workspace?.prHeadSha === prHeadSha);
|
|
5364
|
-
if (!record
|
|
5396
|
+
if (!record) {
|
|
5365
5397
|
return {
|
|
5366
5398
|
admitted: false,
|
|
5367
|
-
reason: `item ${itemId} still has a non-
|
|
5399
|
+
reason: `item ${itemId} still has a non-admissible owner lane ${lane.laneId} (missing delegation record)`,
|
|
5400
|
+
items: []
|
|
5401
|
+
};
|
|
5402
|
+
}
|
|
5403
|
+
if (record.status === "completed") {
|
|
5404
|
+
continue;
|
|
5405
|
+
}
|
|
5406
|
+
const disclosure = typedDeadDisclosureClassForRecord(record);
|
|
5407
|
+
if (!disclosure) {
|
|
5408
|
+
const blockingClass = record.terminalResult?.result.workflowLaneFailureClass ?? record.result?.workflowLaneFailureClass ?? "classless";
|
|
5409
|
+
return {
|
|
5410
|
+
admitted: false,
|
|
5411
|
+
reason: `item ${itemId} still has a non-admissible owner lane ${lane.laneId} (${blockingClass})`,
|
|
5368
5412
|
items: []
|
|
5369
5413
|
};
|
|
5370
5414
|
}
|
|
5371
5415
|
dead.push({
|
|
5372
5416
|
batchId: batch.batchId,
|
|
5373
5417
|
laneId: lane.laneId,
|
|
5374
|
-
status: record.status === "cancelled" || record.status === "error" ? record.status : "stale"
|
|
5418
|
+
status: record.status === "cancelled" || record.status === "error" ? record.status : "stale",
|
|
5419
|
+
disclosure
|
|
5375
5420
|
});
|
|
5376
5421
|
}
|
|
5377
5422
|
if (itemAttemptBatchIds.size < 1 + PR_REVIEW_VERDICT_RETRY_BUDGET) {
|
|
@@ -5381,18 +5426,43 @@ function deriveVerdictSettlementAdmission(args) {
|
|
|
5381
5426
|
items: []
|
|
5382
5427
|
};
|
|
5383
5428
|
}
|
|
5429
|
+
if (dead.length === 0) {
|
|
5430
|
+
return {
|
|
5431
|
+
admitted: false,
|
|
5432
|
+
reason: `item ${itemId} has no typed-dead owner lane to cite (completed owners consume attempts but are never terminality evidence)`,
|
|
5433
|
+
items: []
|
|
5434
|
+
};
|
|
5435
|
+
}
|
|
5384
5436
|
const first = dead[0];
|
|
5385
5437
|
items.push({
|
|
5386
5438
|
itemId,
|
|
5387
5439
|
sourceBatchId: first.batchId,
|
|
5388
5440
|
sourceLaneId: first.laneId,
|
|
5389
|
-
disposition:
|
|
5390
|
-
evidenceClass:
|
|
5441
|
+
disposition: `${first.disclosure}_dead`,
|
|
5442
|
+
evidenceClass: first.disclosure,
|
|
5391
5443
|
terminalStatus: first.status
|
|
5392
5444
|
});
|
|
5393
5445
|
}
|
|
5394
5446
|
return { admitted: true, reason: "admitted", items };
|
|
5395
5447
|
}
|
|
5448
|
+
function deriveVerdictAttemptCounts(args) {
|
|
5449
|
+
const attemptsRequired = 1 + PR_REVIEW_VERDICT_RETRY_BUDGET;
|
|
5450
|
+
return args.unclaimed.map((itemId) => {
|
|
5451
|
+
const batches = new Set;
|
|
5452
|
+
for (const batch of args.window) {
|
|
5453
|
+
if (batch.lanes.some((lane) => (lane.reviewItemIds ?? []).includes(itemId))) {
|
|
5454
|
+
batches.add(batch.batchId);
|
|
5455
|
+
}
|
|
5456
|
+
}
|
|
5457
|
+
const attemptsUsed = batches.size;
|
|
5458
|
+
return {
|
|
5459
|
+
itemId,
|
|
5460
|
+
attemptsUsed,
|
|
5461
|
+
attemptsRequired,
|
|
5462
|
+
remaining: Math.max(0, attemptsRequired - attemptsUsed)
|
|
5463
|
+
};
|
|
5464
|
+
});
|
|
5465
|
+
}
|
|
5396
5466
|
function buildVerdictSettlementReceipt(args) {
|
|
5397
5467
|
return {
|
|
5398
5468
|
schemaVersion: VERDICT_SETTLEMENT_SCHEMA_VERSION,
|
|
@@ -5619,7 +5689,8 @@ var PR_REVIEW_FAILURE_CLASS_SAFE_DETAILS = {
|
|
|
5619
5689
|
resource: "lane exhausted its resource budget before producing valid output",
|
|
5620
5690
|
deadline: "lane passed its collection deadline without valid terminal output",
|
|
5621
5691
|
liveness: "lane was abandoned by its host (presumed-stale sweep or unobservable host session) without an observed agent failure",
|
|
5622
|
-
operator_cancelled: "lane was cancelled by an explicit operator action (confirmed cancel or human force abort), not by a host or provider failure"
|
|
5692
|
+
operator_cancelled: "lane was cancelled by an explicit operator action (confirmed cancel or human force abort), not by a host or provider failure",
|
|
5693
|
+
verdict_contract: "verdict lane failed its verdict-row or transport contract (issue #3311 typed terminal class)"
|
|
5623
5694
|
};
|
|
5624
5695
|
var PrReviewUnresolvedDimensionRecordSchema = exports_external.object({
|
|
5625
5696
|
dimension: exports_external.enum(PR_REVIEW_BASE_DIMENSION_IDS),
|
|
@@ -5830,8 +5901,22 @@ function latestTypedFailureForBaseDimension(directory, state, dimension) {
|
|
|
5830
5901
|
const eventlessFailure = !terminal && CIRCUIT_TERMINAL_DELEGATION_STATUSES.has(record.status);
|
|
5831
5902
|
const result = terminal?.result ?? record.result;
|
|
5832
5903
|
const failureClass = result?.workflowLaneFailureClass;
|
|
5833
|
-
if (!terminal && !eventlessFailure || !failureClass)
|
|
5904
|
+
if (!terminal && !eventlessFailure || !failureClass) {
|
|
5905
|
+
if ((terminal?.status ?? record.status) === "error" && result?.terminalErrorClass != null) {
|
|
5906
|
+
const candidateResource = {
|
|
5907
|
+
failureClass: "resource",
|
|
5908
|
+
terminalEventId: terminal ? terminal.eventId : `eventless:${record.status}:${result?.digest ?? ""}`,
|
|
5909
|
+
recordedAt: terminal ? terminal.recordedAt : record.completedAt ?? record.updatedAt,
|
|
5910
|
+
batchId: batch.batchId,
|
|
5911
|
+
laneId: lane.laneId
|
|
5912
|
+
};
|
|
5913
|
+
if (!latest || candidateResource.recordedAt > latest.recordedAt || candidateResource.recordedAt === latest.recordedAt && candidateResource.terminalEventId > latest.terminalEventId) {
|
|
5914
|
+
latest = candidateResource;
|
|
5915
|
+
}
|
|
5916
|
+
continue;
|
|
5917
|
+
}
|
|
5834
5918
|
continue;
|
|
5919
|
+
}
|
|
5835
5920
|
if ((terminal?.status ?? record.status) === "completed")
|
|
5836
5921
|
continue;
|
|
5837
5922
|
const candidate = {
|
|
@@ -7194,6 +7279,7 @@ async function ensurePrWorkflowSkillContractsFresh(directory, mode, options = {}
|
|
|
7194
7279
|
}
|
|
7195
7280
|
|
|
7196
7281
|
// src/state.ts
|
|
7282
|
+
init_agent_names();
|
|
7197
7283
|
init_constants();
|
|
7198
7284
|
init_loader();
|
|
7199
7285
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
@@ -11390,7 +11476,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
11390
11476
|
return extracted === expectedSessionId;
|
|
11391
11477
|
}
|
|
11392
11478
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
11393
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
11479
|
+
const collisionOwnership = await import("./worktree-collision-ownership-3r669yvh.js");
|
|
11394
11480
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
11395
11481
|
}
|
|
11396
11482
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -11818,7 +11904,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
11818
11904
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
11819
11905
|
if (laneProfile) {
|
|
11820
11906
|
try {
|
|
11821
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
11907
|
+
const { writeLaneProfileToDiskReal } = await import("./core-pz87qafz.js");
|
|
11822
11908
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
11823
11909
|
} catch {}
|
|
11824
11910
|
}
|
|
@@ -12812,7 +12898,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
12812
12898
|
}
|
|
12813
12899
|
clearWorktreeMergeStatus(statusKey);
|
|
12814
12900
|
try {
|
|
12815
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
12901
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-pz87qafz.js");
|
|
12816
12902
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
12817
12903
|
} catch {}
|
|
12818
12904
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -18531,6 +18617,167 @@ function collectAudienceYamlList(lines, start, end) {
|
|
|
18531
18617
|
nextIndex: i - 1
|
|
18532
18618
|
};
|
|
18533
18619
|
}
|
|
18620
|
+
function scanFlowChar(ch, prev, state) {
|
|
18621
|
+
if (!state.alive)
|
|
18622
|
+
return;
|
|
18623
|
+
if (state.quote) {
|
|
18624
|
+
if (state.escaped) {
|
|
18625
|
+
state.escaped = false;
|
|
18626
|
+
} else if (state.quote === '"' && ch === "\\") {
|
|
18627
|
+
state.escaped = true;
|
|
18628
|
+
} else if (ch === state.quote) {
|
|
18629
|
+
state.quote = undefined;
|
|
18630
|
+
state.atValueStart = false;
|
|
18631
|
+
}
|
|
18632
|
+
return;
|
|
18633
|
+
}
|
|
18634
|
+
if ((ch === '"' || ch === "'") && state.atValueStart) {
|
|
18635
|
+
state.quote = ch;
|
|
18636
|
+
state.atValueStart = false;
|
|
18637
|
+
return;
|
|
18638
|
+
}
|
|
18639
|
+
if (ch === "#" && state.depth === 0 && (prev === "" || /\s/.test(prev))) {
|
|
18640
|
+
state.alive = false;
|
|
18641
|
+
return;
|
|
18642
|
+
}
|
|
18643
|
+
if (ch === "{" || ch === "[") {
|
|
18644
|
+
state.closers.push(ch === "{" ? "}" : "]");
|
|
18645
|
+
state.depth += 1;
|
|
18646
|
+
state.atValueStart = true;
|
|
18647
|
+
return;
|
|
18648
|
+
}
|
|
18649
|
+
if (ch === "}" || ch === "]") {
|
|
18650
|
+
const expected = state.closers[state.closers.length - 1];
|
|
18651
|
+
if (expected !== ch) {
|
|
18652
|
+
state.depth = -1;
|
|
18653
|
+
state.alive = false;
|
|
18654
|
+
return;
|
|
18655
|
+
}
|
|
18656
|
+
state.closers.pop();
|
|
18657
|
+
state.depth -= 1;
|
|
18658
|
+
state.atValueStart = false;
|
|
18659
|
+
return;
|
|
18660
|
+
}
|
|
18661
|
+
if (ch === ",") {
|
|
18662
|
+
state.atValueStart = true;
|
|
18663
|
+
return;
|
|
18664
|
+
}
|
|
18665
|
+
if (ch === ":") {
|
|
18666
|
+
state.atValueStart = true;
|
|
18667
|
+
return;
|
|
18668
|
+
}
|
|
18669
|
+
if (!/\s/.test(ch))
|
|
18670
|
+
state.atValueStart = false;
|
|
18671
|
+
}
|
|
18672
|
+
function initialFlowState() {
|
|
18673
|
+
return {
|
|
18674
|
+
depth: 0,
|
|
18675
|
+
closers: [],
|
|
18676
|
+
quote: undefined,
|
|
18677
|
+
escaped: false,
|
|
18678
|
+
atValueStart: true,
|
|
18679
|
+
alive: true
|
|
18680
|
+
};
|
|
18681
|
+
}
|
|
18682
|
+
function stripFlowTrailingComment(value) {
|
|
18683
|
+
const state = initialFlowState();
|
|
18684
|
+
let prev = "";
|
|
18685
|
+
for (let i = 0;i < value.length; i++) {
|
|
18686
|
+
const ch = value[i];
|
|
18687
|
+
scanFlowChar(ch, prev, state);
|
|
18688
|
+
if (!state.alive || state.depth < 0)
|
|
18689
|
+
return value.slice(0, i).trimEnd();
|
|
18690
|
+
prev = ch;
|
|
18691
|
+
}
|
|
18692
|
+
return value.trimEnd();
|
|
18693
|
+
}
|
|
18694
|
+
function parseMetadataFlowMap(raw) {
|
|
18695
|
+
const trimmed = stripFlowTrailingComment(raw.trim());
|
|
18696
|
+
if (!trimmed.startsWith("{") || !trimmed.endsWith("}"))
|
|
18697
|
+
return null;
|
|
18698
|
+
const inner = trimmed.slice(1, -1).trim();
|
|
18699
|
+
const pairs = [];
|
|
18700
|
+
const duplicateKeys = new Set;
|
|
18701
|
+
if (inner === "")
|
|
18702
|
+
return { pairs, duplicateKeys };
|
|
18703
|
+
const segments = [];
|
|
18704
|
+
const state = initialFlowState();
|
|
18705
|
+
let current = "";
|
|
18706
|
+
let prev = "";
|
|
18707
|
+
for (const ch of inner) {
|
|
18708
|
+
if (ch === "," && state.depth === 0 && !state.quote) {
|
|
18709
|
+
segments.push(current);
|
|
18710
|
+
current = "";
|
|
18711
|
+
prev = ch;
|
|
18712
|
+
continue;
|
|
18713
|
+
}
|
|
18714
|
+
scanFlowChar(ch, prev, state);
|
|
18715
|
+
if (!state.alive || state.depth < 0)
|
|
18716
|
+
return null;
|
|
18717
|
+
current += ch;
|
|
18718
|
+
prev = ch;
|
|
18719
|
+
}
|
|
18720
|
+
if (state.quote || state.depth !== 0 || state.closers.length > 0)
|
|
18721
|
+
return null;
|
|
18722
|
+
segments.push(current);
|
|
18723
|
+
const seen = new Set;
|
|
18724
|
+
for (const segment of segments) {
|
|
18725
|
+
const text = segment.trim();
|
|
18726
|
+
const pair = text.match(/^(?:"([^"]+)"|'([^']+)'|([A-Za-z_][A-Za-z0-9_-]*))\s*:\s*(.*)$/);
|
|
18727
|
+
if (!pair || pair[4].trim() === "")
|
|
18728
|
+
return null;
|
|
18729
|
+
const key = (pair[1] ?? pair[2] ?? pair[3] ?? "").toLowerCase();
|
|
18730
|
+
if (seen.has(key))
|
|
18731
|
+
duplicateKeys.add(key);
|
|
18732
|
+
seen.add(key);
|
|
18733
|
+
pairs.push([pair[1] ?? pair[2] ?? pair[3] ?? "", pair[4].trim()]);
|
|
18734
|
+
}
|
|
18735
|
+
return { pairs, duplicateKeys };
|
|
18736
|
+
}
|
|
18737
|
+
function stripInlineMetadataComment(rawValue) {
|
|
18738
|
+
const trimmed = rawValue.trim();
|
|
18739
|
+
if (trimmed.startsWith("#"))
|
|
18740
|
+
return "";
|
|
18741
|
+
return stripFlowTrailingComment(trimmed);
|
|
18742
|
+
}
|
|
18743
|
+
function flowNeedsContinuation(value) {
|
|
18744
|
+
const state = initialFlowState();
|
|
18745
|
+
let prev = "";
|
|
18746
|
+
for (const ch of value) {
|
|
18747
|
+
scanFlowChar(ch, prev, state);
|
|
18748
|
+
if (!state.alive || state.depth < 0)
|
|
18749
|
+
return false;
|
|
18750
|
+
prev = ch;
|
|
18751
|
+
}
|
|
18752
|
+
return state.depth > 0 || state.quote !== undefined;
|
|
18753
|
+
}
|
|
18754
|
+
function consumeFlowContinuation(firstValue, lines, start, end) {
|
|
18755
|
+
const state = initialFlowState();
|
|
18756
|
+
let prev = "";
|
|
18757
|
+
const advance = (chunk) => {
|
|
18758
|
+
for (const ch of chunk) {
|
|
18759
|
+
scanFlowChar(ch, prev, state);
|
|
18760
|
+
if (!state.alive || state.depth < 0)
|
|
18761
|
+
return false;
|
|
18762
|
+
prev = ch;
|
|
18763
|
+
}
|
|
18764
|
+
return true;
|
|
18765
|
+
};
|
|
18766
|
+
if (!advance(firstValue))
|
|
18767
|
+
return null;
|
|
18768
|
+
const parts = [firstValue.trim()];
|
|
18769
|
+
for (let j = start;j < end; j++) {
|
|
18770
|
+
const line = lines[j] ?? "";
|
|
18771
|
+
parts.push(line.trim());
|
|
18772
|
+
prev = " ";
|
|
18773
|
+
if (!advance(` ${line}`))
|
|
18774
|
+
return null;
|
|
18775
|
+
if (state.depth === 0 && !state.quote && state.closers.length === 0) {
|
|
18776
|
+
return { value: parts.join(" "), endIndex: j };
|
|
18777
|
+
}
|
|
18778
|
+
}
|
|
18779
|
+
return null;
|
|
18780
|
+
}
|
|
18534
18781
|
function collectMetadataChildren(lines, start, end) {
|
|
18535
18782
|
const children = new Map;
|
|
18536
18783
|
const duplicateKeys = new Set;
|
|
@@ -18632,12 +18879,51 @@ function parseSkillFrontmatter(content, skillPath) {
|
|
|
18632
18879
|
if (key === "metadata") {
|
|
18633
18880
|
duplicateMetadataBlocks += 1;
|
|
18634
18881
|
if (duplicateMetadataBlocks === 1) {
|
|
18635
|
-
const
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18882
|
+
const inline = stripInlineMetadataComment(rawValue);
|
|
18883
|
+
if (inline !== "") {
|
|
18884
|
+
let flowValue = inline;
|
|
18885
|
+
let cursorEnd = i;
|
|
18886
|
+
if (flowValue.startsWith("{") && flowNeedsContinuation(flowValue)) {
|
|
18887
|
+
const consumed = consumeFlowContinuation(flowValue, lines, i + 1, end);
|
|
18888
|
+
if (consumed === null) {
|
|
18889
|
+
audience = { status: "invalid", values: [] };
|
|
18890
|
+
continue;
|
|
18891
|
+
}
|
|
18892
|
+
flowValue = consumed.value;
|
|
18893
|
+
cursorEnd = consumed.endIndex;
|
|
18894
|
+
}
|
|
18895
|
+
if (flowValue.startsWith("{")) {
|
|
18896
|
+
const flow = parseMetadataFlowMap(flowValue);
|
|
18897
|
+
if (flow === null) {
|
|
18898
|
+
audience = { status: "invalid", values: [] };
|
|
18899
|
+
} else {
|
|
18900
|
+
const children = new Map;
|
|
18901
|
+
for (const [rawKey, rawValueOfPair] of flow.pairs) {
|
|
18902
|
+
const childKey = rawKey.toLowerCase();
|
|
18903
|
+
if (children.has(childKey))
|
|
18904
|
+
continue;
|
|
18905
|
+
children.set(childKey, {
|
|
18906
|
+
inline: stripQuotes(rawValueOfPair.trim()).replace(/''/g, "'"),
|
|
18907
|
+
listItems: []
|
|
18908
|
+
});
|
|
18909
|
+
}
|
|
18910
|
+
metadataChildren = children;
|
|
18911
|
+
if (flow.duplicateKeys.has("audience")) {
|
|
18912
|
+
audience = { status: "invalid", values: [] };
|
|
18913
|
+
}
|
|
18914
|
+
}
|
|
18915
|
+
} else {
|
|
18916
|
+
audience = { status: "invalid", values: [] };
|
|
18917
|
+
}
|
|
18918
|
+
i = cursorEnd;
|
|
18919
|
+
} else {
|
|
18920
|
+
const collected = collectMetadataChildren(lines, i + 1, end);
|
|
18921
|
+
metadataChildren = collected.children;
|
|
18922
|
+
if (collected.duplicateKeys.has("audience")) {
|
|
18923
|
+
audience = { status: "invalid", values: [] };
|
|
18924
|
+
}
|
|
18925
|
+
i = collected.nextIndex;
|
|
18639
18926
|
}
|
|
18640
|
-
i = collected.nextIndex;
|
|
18641
18927
|
}
|
|
18642
18928
|
continue;
|
|
18643
18929
|
}
|
|
@@ -27163,6 +27449,48 @@ var SPEC_DRIFT_BLOCKED_TOOLS = new Set([
|
|
|
27163
27449
|
var toolCallsSinceLastWrite = new Map;
|
|
27164
27450
|
var noOpWarningIssued = new Set;
|
|
27165
27451
|
var noOpStrongWarningIssued = new Set;
|
|
27452
|
+
// src/hooks/host-boundary.ts
|
|
27453
|
+
init_agent_names();
|
|
27454
|
+
init_schema();
|
|
27455
|
+
init_logger();
|
|
27456
|
+
function resolveMessageTransformContext(output) {
|
|
27457
|
+
const messages = Array.isArray(output?.messages) ? output.messages : [];
|
|
27458
|
+
let sessionID;
|
|
27459
|
+
for (const m of messages) {
|
|
27460
|
+
const sid = m?.info?.sessionID;
|
|
27461
|
+
if (typeof sid === "string" && sid.length > 0) {
|
|
27462
|
+
sessionID = sid;
|
|
27463
|
+
break;
|
|
27464
|
+
}
|
|
27465
|
+
}
|
|
27466
|
+
let agent = resolveAgentOptional(sessionID);
|
|
27467
|
+
if (!agent) {
|
|
27468
|
+
for (let i = messages.length - 1;i >= 0; i--) {
|
|
27469
|
+
const info = messages[i]?.info;
|
|
27470
|
+
if (info?.role === "user" && typeof info.agent === "string" && info.agent) {
|
|
27471
|
+
agent = info.agent;
|
|
27472
|
+
break;
|
|
27473
|
+
}
|
|
27474
|
+
}
|
|
27475
|
+
}
|
|
27476
|
+
const callerRole = agent ? stripKnownSwarmPrefix(agent).toLowerCase() : undefined;
|
|
27477
|
+
return {
|
|
27478
|
+
sessionID,
|
|
27479
|
+
agent,
|
|
27480
|
+
callerRole,
|
|
27481
|
+
isArchitect: callerRole === ORCHESTRATOR_NAME,
|
|
27482
|
+
isDelegate: !!agent && !!callerRole && callerRole !== ORCHESTRATOR_NAME
|
|
27483
|
+
};
|
|
27484
|
+
}
|
|
27485
|
+
function resolveAgentOptional(sessionID) {
|
|
27486
|
+
if (typeof sessionID === "string" && sessionID.length > 0) {
|
|
27487
|
+
const mapped = swarmState.activeAgent.get(sessionID);
|
|
27488
|
+
if (mapped && mapped !== "unknown")
|
|
27489
|
+
return mapped;
|
|
27490
|
+
}
|
|
27491
|
+
return;
|
|
27492
|
+
}
|
|
27493
|
+
|
|
27166
27494
|
// src/hooks/delegation-gate.ts
|
|
27167
27495
|
var EvidenceTaskIdPlanSchema = exports_external.object({
|
|
27168
27496
|
phases: exports_external.array(exports_external.object({
|
|
@@ -28042,6 +28370,7 @@ var swarmState = {
|
|
|
28042
28370
|
activeToolCalls: defaultRunContext.activeToolCalls,
|
|
28043
28371
|
toolAggregates: defaultRunContext.toolAggregates,
|
|
28044
28372
|
activeAgent: defaultRunContext.activeAgent,
|
|
28373
|
+
primaryOwnerBySession: new Map,
|
|
28045
28374
|
delegationChains: defaultRunContext.delegationChains,
|
|
28046
28375
|
pendingEvents: 0,
|
|
28047
28376
|
opencodeClient: null,
|
|
@@ -28070,6 +28399,7 @@ function resetSwarmState() {
|
|
|
28070
28399
|
swarmState.activeToolCalls.clear();
|
|
28071
28400
|
swarmState.toolAggregates.clear();
|
|
28072
28401
|
swarmState.activeAgent.clear();
|
|
28402
|
+
swarmState.primaryOwnerBySession.clear();
|
|
28073
28403
|
swarmState.delegationChains.clear();
|
|
28074
28404
|
swarmState.pendingEvents = 0;
|
|
28075
28405
|
swarmState.lastBudgetBySession.clear();
|
|
@@ -28296,6 +28626,7 @@ function sweepStaleSessions(staleDurationMs = STALE_SESSION_TTL_MS, now = Date.n
|
|
|
28296
28626
|
swarmState.delegationChains.delete(id);
|
|
28297
28627
|
clearDispatchLineageForSession(id);
|
|
28298
28628
|
swarmState.activeAgent.delete(id);
|
|
28629
|
+
swarmState.primaryOwnerBySession.delete(id);
|
|
28299
28630
|
}
|
|
28300
28631
|
return staleIds;
|
|
28301
28632
|
}
|
|
@@ -28467,6 +28798,7 @@ function endAgentSession(sessionId, directory) {
|
|
|
28467
28798
|
swarmState.agentSessions.delete(sessionId);
|
|
28468
28799
|
swarmState.activeAgent.delete(sessionId);
|
|
28469
28800
|
swarmState.delegationChains.delete(sessionId);
|
|
28801
|
+
swarmState.primaryOwnerBySession.delete(sessionId);
|
|
28470
28802
|
clearDispatchLineageForSession(sessionId);
|
|
28471
28803
|
clearRealtimeLearningNudgeSession(sessionId);
|
|
28472
28804
|
resetSessionQueue(sessionId);
|
|
@@ -28698,6 +29030,14 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
28698
29030
|
}
|
|
28699
29031
|
return session;
|
|
28700
29032
|
}
|
|
29033
|
+
var SWARM_AGENT_NAME_SET = new Set(ALL_AGENT_NAMES);
|
|
29034
|
+
var SWARM_SUBAGENT_NAME_SET = new Set(ALL_SUBAGENT_NAMES);
|
|
29035
|
+
var NON_OWNABLE_AGENT_NAMES = new Set([
|
|
29036
|
+
"compaction",
|
|
29037
|
+
"title",
|
|
29038
|
+
"summary",
|
|
29039
|
+
"explore"
|
|
29040
|
+
]);
|
|
28701
29041
|
function recordSessionWorkspaceRoot(sessionId, laneRoot) {
|
|
28702
29042
|
const trimmed = laneRoot.trim();
|
|
28703
29043
|
if (!trimmed)
|
|
@@ -29246,7 +29586,7 @@ function clearCriticalShownIds(sessionID) {
|
|
|
29246
29586
|
async function rehydratePrSubscriptions(sessionID, directory) {
|
|
29247
29587
|
const map = new Map;
|
|
29248
29588
|
try {
|
|
29249
|
-
const { listActive: listActive2 } = await import("./pr-subscriptions-
|
|
29589
|
+
const { listActive: listActive2 } = await import("./pr-subscriptions-cn13b19x.js");
|
|
29250
29590
|
const records = await listActive2(directory);
|
|
29251
29591
|
for (const record of records) {
|
|
29252
29592
|
if (record.sessionID !== sessionID)
|
|
@@ -29852,7 +30192,7 @@ async function readPrWorkflowGateState(directory, sessionID) {
|
|
|
29852
30192
|
}
|
|
29853
30193
|
return state;
|
|
29854
30194
|
}
|
|
29855
|
-
function
|
|
30195
|
+
function isLivenessTerminalLaneRecord(record) {
|
|
29856
30196
|
if (record.status !== "cancelled" && record.status !== "stale" && record.status !== "error") {
|
|
29857
30197
|
return false;
|
|
29858
30198
|
}
|
|
@@ -29997,7 +30337,7 @@ async function submitPrReviewResultCore(directory, childSessionId, input) {
|
|
|
29997
30337
|
const preliminary = childRead.records.filter((record2) => record2.subagentSessionId === child && record2.correlationId === child && (record2.mode === "swarm-pr-review:base" || record2.mode === "swarm-pr-review:micro"));
|
|
29998
30338
|
let repairRecord = null;
|
|
29999
30339
|
if (preliminary.length !== 1) {
|
|
30000
|
-
const repairCandidates = childRead.records.filter((candidate) => candidate.parentSessionId === child && (candidate.mode === "swarm-pr-review:base" || candidate.mode === "swarm-pr-review:micro") && (input.batchId === undefined || input.batchId === candidate.batchId) && (input.laneId === undefined || input.laneId === candidate.laneId) &&
|
|
30340
|
+
const repairCandidates = childRead.records.filter((candidate) => candidate.parentSessionId === child && (candidate.mode === "swarm-pr-review:base" || candidate.mode === "swarm-pr-review:micro") && (input.batchId === undefined || input.batchId === candidate.batchId) && (input.laneId === undefined || input.laneId === candidate.laneId) && isLivenessTerminalLaneRecord(candidate));
|
|
30001
30341
|
if (repairCandidates.length !== 1) {
|
|
30002
30342
|
return {
|
|
30003
30343
|
status: "rejected",
|
|
@@ -31923,6 +32263,34 @@ async function rollbackPrReviewBaseAdmissionIfUnlaunched(directory, sessionID, b
|
|
|
31923
32263
|
return true;
|
|
31924
32264
|
}));
|
|
31925
32265
|
}
|
|
32266
|
+
async function rollbackPrReviewValidationBatchIfUnlaunched(directory, sessionID, batchId) {
|
|
32267
|
+
const normalizedSessionID = normalizeSessionID(sessionID);
|
|
32268
|
+
const normalizedBatchId = normalizeBatchId(batchId);
|
|
32269
|
+
return withPrWorkflowCheckoutMutationLock(directory, async () => withSessionStateMutation(directory, normalizedSessionID, async () => {
|
|
32270
|
+
const state = await readPrWorkflowGateState(directory, normalizedSessionID);
|
|
32271
|
+
if (!state || state.mode !== "PR_REVIEW")
|
|
32272
|
+
return false;
|
|
32273
|
+
const previous = state.prReviewValidationBatches ?? [];
|
|
32274
|
+
if (!previous.some((batch) => batch.batchId === normalizedBatchId)) {
|
|
32275
|
+
return false;
|
|
32276
|
+
}
|
|
32277
|
+
const batchRead = findByBatchIdDetailed(directory, normalizedBatchId, {
|
|
32278
|
+
parentSessionId: normalizedSessionID
|
|
32279
|
+
});
|
|
32280
|
+
if (batchRead.status === "uncertain") {
|
|
32281
|
+
warnDelegationReadUncertainOnce("validation batch rollback existence guard", batchRead);
|
|
32282
|
+
return false;
|
|
32283
|
+
}
|
|
32284
|
+
if (batchRead.value.length > 0)
|
|
32285
|
+
return false;
|
|
32286
|
+
await writeStateWhileLocked(directory, {
|
|
32287
|
+
...state,
|
|
32288
|
+
updatedAt: isoNow(),
|
|
32289
|
+
prReviewValidationBatches: previous.filter((batch) => batch.batchId !== normalizedBatchId)
|
|
32290
|
+
});
|
|
32291
|
+
return true;
|
|
32292
|
+
}));
|
|
32293
|
+
}
|
|
31926
32294
|
var TERMINAL_FAILED_DELEGATION_STATUSES2 = CIRCUIT_TERMINAL_DELEGATION_STATUSES;
|
|
31927
32295
|
var MAX_COVER_UNIVERSE_BITS = 12;
|
|
31928
32296
|
function encodeConsolidatedLaneKey(owned) {
|
|
@@ -32331,7 +32699,12 @@ async function assertPrReviewValidationSettled(directory, sessionID, phase, gate
|
|
|
32331
32699
|
if (!admission.admitted) {
|
|
32332
32700
|
const named = composed.unclaimed.slice(0, MAX_UNCLAIMED_ITEMS_IN_MESSAGE);
|
|
32333
32701
|
const overflow = composed.unclaimed.length - named.length;
|
|
32334
|
-
|
|
32702
|
+
const attemptCounts = deriveVerdictAttemptCounts({
|
|
32703
|
+
window: prReviewPhaseWindow2(state, requiredPhase),
|
|
32704
|
+
unclaimed: composed.unclaimed
|
|
32705
|
+
});
|
|
32706
|
+
const attemptText = attemptCounts.map((count2) => `${count2.itemId}: attempts: ${count2.attemptsUsed} of ${count2.attemptsRequired} (remaining: ${count2.remaining})`).join("; ");
|
|
32707
|
+
throw new Error(`BLOCKED: PR_REVIEW ${requiredPhase} items lack an authenticated verdict from any successful lane: ${named.join(", ")}` + (overflow > 0 ? ` (+${overflow} more)` : "") + (composed.diagnostics.length > 0 ? `; diagnostics: ${composed.diagnostics.join(" | ")}` : "") + `; N-of-M settlement not admissible (${admission.reason}); per-item attempts: ${attemptText}; settle or re-dispatch the unclaimed items to exhaust the retry budget, or complete downgrade-only once admissible`);
|
|
32335
32708
|
}
|
|
32336
32709
|
const runId = state.prReviewArtifactRunId ?? state.prReviewReservedRunId;
|
|
32337
32710
|
if (!runId) {
|
|
@@ -36600,6 +36973,9 @@ function prReviewPhaseWindow2(state, phase) {
|
|
|
36600
36973
|
}
|
|
36601
36974
|
return (latestCouncilIndex >= 0 ? all.slice(latestCouncilIndex + 1) : all).filter((batch) => batch.phase === "reviewer");
|
|
36602
36975
|
}
|
|
36976
|
+
function prReviewPhaseWindowForStatus(state, phase) {
|
|
36977
|
+
return prReviewPhaseWindow2(state, phase);
|
|
36978
|
+
}
|
|
36603
36979
|
function reviewerSubagentSessionIds2(directory, state) {
|
|
36604
36980
|
const forbidden = new Set(state.prReviewRetiredReviewerSessionIds ?? []);
|
|
36605
36981
|
for (const reviewerBatch of (state.prReviewValidationBatches ?? []).filter((batch) => batch.phase === "reviewer")) {
|
|
@@ -46282,9 +46658,9 @@ function hashContent(content) {
|
|
|
46282
46658
|
return createHash29("sha1").update(content).digest("hex");
|
|
46283
46659
|
}
|
|
46284
46660
|
async function loadConfigForPolicyCurator(directory) {
|
|
46285
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
46661
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-qv9bvhyz.js");
|
|
46286
46662
|
try {
|
|
46287
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
46663
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-71g0ps66.js");
|
|
46288
46664
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
46289
46665
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
46290
46666
|
} catch {
|
|
@@ -49342,7 +49718,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
|
|
|
49342
49718
|
const seam = _internals50.createCuratorLLMDelegate;
|
|
49343
49719
|
if (seam)
|
|
49344
49720
|
return seam(directory, mode, sessionId);
|
|
49345
|
-
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-
|
|
49721
|
+
const { createCuratorLLMDelegate } = await import("./curator-llm-factory-cg1p6ysr.js");
|
|
49346
49722
|
return createCuratorLLMDelegate(directory, mode, sessionId);
|
|
49347
49723
|
}
|
|
49348
49724
|
async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
|
|
@@ -49737,7 +50113,7 @@ async function runFinalizeStage(ctx) {
|
|
|
49737
50113
|
}
|
|
49738
50114
|
}
|
|
49739
50115
|
try {
|
|
49740
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
50116
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-qv9bvhyz.js");
|
|
49741
50117
|
const { config: pmLoadedConfig } = _internals50.loadPluginConfigWithMeta(ctx.directory);
|
|
49742
50118
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
49743
50119
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -53770,7 +54146,7 @@ function serializeAgentSession(s) {
|
|
|
53770
54146
|
}
|
|
53771
54147
|
async function writeSnapshot(directory, state) {
|
|
53772
54148
|
try {
|
|
53773
|
-
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-
|
|
54149
|
+
const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-7c0s65jw.js");
|
|
53774
54150
|
await ensureSnapshotCoordinationReady(directory);
|
|
53775
54151
|
const snapshot = {
|
|
53776
54152
|
version: 3,
|
|
@@ -56177,15 +56553,92 @@ async function getSkillVersion(skillPath) {
|
|
|
56177
56553
|
return 1;
|
|
56178
56554
|
}
|
|
56179
56555
|
}
|
|
56556
|
+
var BLOCK_CHILD_NON_STRING_SCALAR = /^(?:-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?|-?\.[0-9]+|true|false|null|yes|no|on|off|~|\d{4}-\d{2}-\d{2}(?:[T ].*)?)$/i;
|
|
56557
|
+
function quoteBlockChildValue(value) {
|
|
56558
|
+
const t = value.trim();
|
|
56559
|
+
const quoted = t.startsWith('"') && t.endsWith('"') && t.length >= 2 || t.startsWith("'") && t.endsWith("'") && t.length >= 2;
|
|
56560
|
+
if (quoted)
|
|
56561
|
+
return t;
|
|
56562
|
+
if (/^\[.*\]$/.test(t) || /^\{.*\}$/.test(t)) {
|
|
56563
|
+
return `'${t.replace(/'/g, "''")}'`;
|
|
56564
|
+
}
|
|
56565
|
+
if (BLOCK_CHILD_NON_STRING_SCALAR.test(t)) {
|
|
56566
|
+
return `'${t.replace(/'/g, "''")}'`;
|
|
56567
|
+
}
|
|
56568
|
+
return t;
|
|
56569
|
+
}
|
|
56180
56570
|
function buildDeterministicRevision(currentContent, currentVersion, violationContexts) {
|
|
56181
56571
|
const nextVersion = currentVersion + 1;
|
|
56182
56572
|
const isoDate = new Date().toISOString().slice(0, 10);
|
|
56183
56573
|
const violationLines = violationContexts.map((v) => `- ${v.agent} (${v.taskId}): ${v.reviewerNotes ?? v.verdict}`).join(`
|
|
56184
56574
|
`);
|
|
56575
|
+
const split = splitSkillFrontmatter(currentContent);
|
|
56576
|
+
const fmLines = split.frontmatter.split(`
|
|
56577
|
+
`);
|
|
56578
|
+
const inlineLineIndex = fmLines.findIndex((line) => /^metadata[ \t]*:[ \t]*\S/i.test(line));
|
|
56579
|
+
const inlineRawValue = inlineLineIndex === -1 ? "" : stripInlineMetadataComment((/^[^:]*:[ \t]*(.*)$/.exec(fmLines[inlineLineIndex] ?? "") ?? [
|
|
56580
|
+
"",
|
|
56581
|
+
""
|
|
56582
|
+
])[1] ?? "");
|
|
56583
|
+
const hasInlineMetadata = inlineLineIndex !== -1 && inlineRawValue !== "";
|
|
56584
|
+
let skipSurgery = false;
|
|
56585
|
+
if (hasInlineMetadata && inlineLineIndex >= 0) {
|
|
56586
|
+
let flowValue = inlineRawValue;
|
|
56587
|
+
let lastInlineLine = inlineLineIndex;
|
|
56588
|
+
if (flowValue.startsWith("{") && flowNeedsContinuation(flowValue)) {
|
|
56589
|
+
const consumed = consumeFlowContinuation(flowValue, fmLines, inlineLineIndex + 1, fmLines.length);
|
|
56590
|
+
if (consumed === null) {
|
|
56591
|
+
skipSurgery = true;
|
|
56592
|
+
} else {
|
|
56593
|
+
flowValue = consumed.value;
|
|
56594
|
+
lastInlineLine = consumed.endIndex;
|
|
56595
|
+
}
|
|
56596
|
+
}
|
|
56597
|
+
if (!skipSurgery) {
|
|
56598
|
+
if (flowValue.startsWith("{")) {
|
|
56599
|
+
const flow = parseMetadataFlowMap(flowValue);
|
|
56600
|
+
if (flow === null) {
|
|
56601
|
+
skipSurgery = true;
|
|
56602
|
+
} else {
|
|
56603
|
+
const childLines = ["metadata:"];
|
|
56604
|
+
let versionHandled = false;
|
|
56605
|
+
for (const [rawKey, rawValue] of flow.pairs) {
|
|
56606
|
+
const key = rawKey.toLowerCase();
|
|
56607
|
+
if (key === "version") {
|
|
56608
|
+
if (versionHandled)
|
|
56609
|
+
continue;
|
|
56610
|
+
childLines.push(` version: "${nextVersion}"`);
|
|
56611
|
+
versionHandled = true;
|
|
56612
|
+
continue;
|
|
56613
|
+
}
|
|
56614
|
+
childLines.push(` ${rawKey}: ${quoteBlockChildValue(rawValue)}`);
|
|
56615
|
+
}
|
|
56616
|
+
if (!versionHandled) {
|
|
56617
|
+
childLines.push(` version: "${nextVersion}"`);
|
|
56618
|
+
}
|
|
56619
|
+
fmLines.splice(inlineLineIndex, lastInlineLine - inlineLineIndex + 1, ...childLines);
|
|
56620
|
+
for (let li = 0;li < fmLines.length; li++) {
|
|
56621
|
+
const column0 = /^version:\s*"?(\d+)"?\s*$/.exec(fmLines[li] ?? "");
|
|
56622
|
+
if (column0) {
|
|
56623
|
+
fmLines[li] = `version: ${nextVersion}`;
|
|
56624
|
+
break;
|
|
56625
|
+
}
|
|
56626
|
+
}
|
|
56627
|
+
}
|
|
56628
|
+
} else {
|
|
56629
|
+
const childLines = [
|
|
56630
|
+
"metadata:",
|
|
56631
|
+
` legacy_inline: '${flowValue.replace(/'/g, "''")}'`,
|
|
56632
|
+
` version: "${nextVersion}"`
|
|
56633
|
+
];
|
|
56634
|
+
fmLines.splice(inlineLineIndex, 1, ...childLines);
|
|
56635
|
+
}
|
|
56636
|
+
}
|
|
56637
|
+
}
|
|
56185
56638
|
const revisionSection = [
|
|
56186
56639
|
"## Revision Notes",
|
|
56187
56640
|
"",
|
|
56188
|
-
`### Version ${nextVersion} (${isoDate})`,
|
|
56641
|
+
skipSurgery ? `### Not revised (${isoDate}) \u2014 unparseable inline metadata; fix the metadata: line` : `### Version ${nextVersion} (${isoDate})`,
|
|
56189
56642
|
"",
|
|
56190
56643
|
`Revised due to ${violationContexts.length} violation(s):`,
|
|
56191
56644
|
violationLines,
|
|
@@ -56194,31 +56647,38 @@ function buildDeterministicRevision(currentContent, currentVersion, violationCon
|
|
|
56194
56647
|
""
|
|
56195
56648
|
].join(`
|
|
56196
56649
|
`);
|
|
56197
|
-
let result
|
|
56198
|
-
|
|
56199
|
-
|
|
56200
|
-
|
|
56201
|
-
|
|
56202
|
-
|
|
56203
|
-
|
|
56204
|
-
|
|
56205
|
-
|
|
56206
|
-
|
|
56207
|
-
|
|
56650
|
+
let result;
|
|
56651
|
+
if (skipSurgery) {
|
|
56652
|
+
result = split.frontmatter + split.body;
|
|
56653
|
+
} else {
|
|
56654
|
+
let fm = fmLines.join(`
|
|
56655
|
+
`);
|
|
56656
|
+
if (!hasInlineMetadata) {
|
|
56657
|
+
const nestedVersion = /^(\s+)version:\s*"?(\d+)"?\s*[ \t]*$/m.exec(fm);
|
|
56658
|
+
if (nestedVersion?.[1]) {
|
|
56659
|
+
fm = fm.replace(/^(\s+)version:\s*"?(\d+)"?\s*[ \t]*$/m, `${nestedVersion[1]}version: "${nextVersion}"`);
|
|
56660
|
+
} else if (/^version:\s*"?(\d+)"?\s*[ \t]*$/m.test(fm)) {
|
|
56661
|
+
fm = fm.replace(/^version:\s*"?(\d+)"?\s*[ \t]*$/m, `version: ${nextVersion}`);
|
|
56662
|
+
} else if (/^(\s+)confidence:\s*/m.test(fm)) {
|
|
56663
|
+
const indent = /^(\s+)confidence:/m.exec(fm)?.[1] ?? "";
|
|
56664
|
+
fm = fm.replace(/^(\s+)(confidence:[^\n]*)$/m, `$1$2
|
|
56208
56665
|
${indent}version: "${nextVersion}"`);
|
|
56209
|
-
|
|
56210
|
-
|
|
56666
|
+
} else if (/^confidence:[^\n]*$/m.test(fm) && !/^metadata:(?:[ \t]*#[^\n]*)?[ \t]*$/im.test(fm)) {
|
|
56667
|
+
fm = fm.replace(/^(confidence:[^\n]*)$/m, `$1
|
|
56211
56668
|
version: ${nextVersion}`);
|
|
56212
|
-
|
|
56213
|
-
|
|
56214
|
-
`
|
|
56215
|
-
|
|
56216
|
-
|
|
56669
|
+
} else if (/^metadata:(?:[ \t]*#[^\n]*)?[ \t]*$/im.test(fm)) {
|
|
56670
|
+
fm = fm.replace(/^metadata:(?:[ \t]*(#[^\n]*))?[ \t]*$/im, (_matched, comment) => comment ? `metadata: ${comment.trim()}
|
|
56671
|
+
version: "${nextVersion}"` : `metadata:
|
|
56672
|
+
version: "${nextVersion}"`);
|
|
56673
|
+
} else {
|
|
56674
|
+
fm = fm.replace(/\n(---[ \t]*(?:\r?\n|$))/, `
|
|
56217
56675
|
metadata:
|
|
56218
56676
|
version: "${nextVersion}"
|
|
56219
56677
|
$1`);
|
|
56678
|
+
}
|
|
56679
|
+
}
|
|
56680
|
+
result = fm + split.body;
|
|
56220
56681
|
}
|
|
56221
|
-
result = fm + split.body;
|
|
56222
56682
|
const revisionNotesPattern = /## Revision Notes\n[\s\S]*?(?=\n## Source Knowledge IDs|$)/;
|
|
56223
56683
|
if (revisionNotesPattern.test(result)) {
|
|
56224
56684
|
result = result.replace(revisionNotesPattern, "");
|
|
@@ -56826,7 +57286,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
56826
57286
|
};
|
|
56827
57287
|
}
|
|
56828
57288
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
56829
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
57289
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-71g0ps66.js");
|
|
56830
57290
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
56831
57291
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
56832
57292
|
if (sweepConfig?.enabled === false)
|
|
@@ -57950,7 +58410,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
57950
58410
|
}
|
|
57951
58411
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
57952
58412
|
try {
|
|
57953
|
-
const skillModule = await import("./skill-generator-
|
|
58413
|
+
const skillModule = await import("./skill-generator-19ckpm74.js");
|
|
57954
58414
|
for (const cand of skillCandidates) {
|
|
57955
58415
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
57956
58416
|
continue;
|
|
@@ -58422,7 +58882,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
58422
58882
|
} catch {}
|
|
58423
58883
|
}
|
|
58424
58884
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
58425
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
58885
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-w7b32ak4.js");
|
|
58426
58886
|
for (const { id } of contradictedEntries) {
|
|
58427
58887
|
try {
|
|
58428
58888
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -59254,7 +59714,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
59254
59714
|
warnings.push("Failed to collect knowledge summary.");
|
|
59255
59715
|
}
|
|
59256
59716
|
try {
|
|
59257
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
59717
|
+
const { getScanStatus } = await import("./scan-cursor-4xxfc42h.js");
|
|
59258
59718
|
const scanStatus = await getScanStatus(directory);
|
|
59259
59719
|
if (scanStatus.remaining_estimate > 0) {
|
|
59260
59720
|
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.`);
|
|
@@ -59426,9 +59886,9 @@ var _internals72 = {
|
|
|
59426
59886
|
verifyPostMortemKnowledgeActions,
|
|
59427
59887
|
repairPostMortemActions,
|
|
59428
59888
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
59429
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
59889
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-qv9bvhyz.js");
|
|
59430
59890
|
try {
|
|
59431
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
59891
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-71g0ps66.js");
|
|
59432
59892
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
59433
59893
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
59434
59894
|
} catch {
|
|
@@ -59436,11 +59896,11 @@ var _internals72 = {
|
|
|
59436
59896
|
}
|
|
59437
59897
|
},
|
|
59438
59898
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
59439
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
59899
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-fvnptcnw.js");
|
|
59440
59900
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
59441
59901
|
},
|
|
59442
59902
|
checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
|
|
59443
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
59903
|
+
const { checkHivePromotions } = await import("./hive-promoter-bmdgnmnf.js");
|
|
59444
59904
|
return checkHivePromotions(entries2, knowledgeConfig, directory);
|
|
59445
59905
|
},
|
|
59446
59906
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -59449,7 +59909,7 @@ var _internals72 = {
|
|
|
59449
59909
|
activateProposal,
|
|
59450
59910
|
listSkills: listSkills2,
|
|
59451
59911
|
sanitizeSlug
|
|
59452
|
-
} = await import("./skill-generator-
|
|
59912
|
+
} = await import("./skill-generator-19ckpm74.js");
|
|
59453
59913
|
const result = {
|
|
59454
59914
|
approved: [],
|
|
59455
59915
|
rejected: [],
|
|
@@ -59491,7 +59951,7 @@ var _internals72 = {
|
|
|
59491
59951
|
return result;
|
|
59492
59952
|
},
|
|
59493
59953
|
readPriorDriftReports: async (directory) => {
|
|
59494
|
-
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-
|
|
59954
|
+
const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-c1x7jdxj.js");
|
|
59495
59955
|
return readPriorDriftReports2(directory);
|
|
59496
59956
|
},
|
|
59497
59957
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -67935,7 +68395,7 @@ function wireCloseInternals() {
|
|
|
67935
68395
|
archiveEvidence,
|
|
67936
68396
|
endAgentSession,
|
|
67937
68397
|
flushAndDrainTelemetry: async () => {
|
|
67938
|
-
const { flushAndDrainTelemetry } = await import("./telemetry-
|
|
68398
|
+
const { flushAndDrainTelemetry } = await import("./telemetry-6yv06xyz.js");
|
|
67939
68399
|
return flushAndDrainTelemetry();
|
|
67940
68400
|
},
|
|
67941
68401
|
finalizeContextTelemetry,
|
|
@@ -69761,9 +70221,9 @@ var _internals80 = {
|
|
|
69761
70221
|
loadPluginConfigWithMeta,
|
|
69762
70222
|
loadCuratorDeps: async () => {
|
|
69763
70223
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
|
|
69764
|
-
import("./schema-
|
|
69765
|
-
import("./curator-
|
|
69766
|
-
import("./curator-llm-factory-
|
|
70224
|
+
import("./schema-qv9bvhyz.js"),
|
|
70225
|
+
import("./curator-fvnptcnw.js"),
|
|
70226
|
+
import("./curator-llm-factory-cg1p6ysr.js")
|
|
69767
70227
|
]);
|
|
69768
70228
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
|
|
69769
70229
|
}
|
|
@@ -72213,7 +72673,7 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
72213
72673
|
let scanCompleted = false;
|
|
72214
72674
|
let scanRemaining = 0;
|
|
72215
72675
|
try {
|
|
72216
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
72676
|
+
const { getScanStatus } = await import("./scan-cursor-4xxfc42h.js");
|
|
72217
72677
|
const status = await getScanStatus(directory);
|
|
72218
72678
|
scanGeneration = status.generation;
|
|
72219
72679
|
scanCompleted = status.completed;
|
|
@@ -72221,19 +72681,19 @@ async function computeCurationDiagnostics(directory, entries2) {
|
|
|
72221
72681
|
} catch {}
|
|
72222
72682
|
let configMatch = null;
|
|
72223
72683
|
try {
|
|
72224
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
72684
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-1f91bzcc.js");
|
|
72225
72685
|
if (isLinked2(directory)) {
|
|
72226
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
72686
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-qv9bvhyz.js");
|
|
72227
72687
|
let config;
|
|
72228
72688
|
try {
|
|
72229
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
72689
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-71g0ps66.js");
|
|
72230
72690
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
72231
72691
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
72232
72692
|
} catch {
|
|
72233
72693
|
config = KnowledgeConfigSchema2.parse({});
|
|
72234
72694
|
}
|
|
72235
72695
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
72236
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
72696
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-0smbd33w.js");
|
|
72237
72697
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
72238
72698
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
72239
72699
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -73682,7 +74142,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
73682
74142
|
const result = runConfigDoctor(config, directory, planParallelizationEnabled);
|
|
73683
74143
|
let output;
|
|
73684
74144
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
73685
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
74145
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-2tcp28sc.js");
|
|
73686
74146
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
73687
74147
|
applyLossy: true
|
|
73688
74148
|
});
|
|
@@ -73720,7 +74180,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
73720
74180
|
`;
|
|
73721
74181
|
}
|
|
73722
74182
|
try {
|
|
73723
|
-
const { runModelPreflight } = await import("./model-preflight-
|
|
74183
|
+
const { runModelPreflight } = await import("./model-preflight-k92fnbq8.js");
|
|
73724
74184
|
const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
|
|
73725
74185
|
const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
|
|
73726
74186
|
const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
|
|
@@ -73754,7 +74214,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
73754
74214
|
}
|
|
73755
74215
|
} catch {}
|
|
73756
74216
|
try {
|
|
73757
|
-
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-
|
|
74217
|
+
const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-xwyb5sf8.js");
|
|
73758
74218
|
output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
|
|
73759
74219
|
} catch {}
|
|
73760
74220
|
const strayDirs = detectStraySwarmDirs(directory);
|
|
@@ -75771,7 +76231,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
75771
76231
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
75772
76232
|
}
|
|
75773
76233
|
async function handleEvidenceSummaryCommand(directory) {
|
|
75774
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
76234
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-47cptvea.js");
|
|
75775
76235
|
const artifact = await buildEvidenceSummary(directory);
|
|
75776
76236
|
if (!artifact) {
|
|
75777
76237
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -91556,48 +92016,6 @@ function parseDirectivesToVerifyBlock(text) {
|
|
|
91556
92016
|
init_schema();
|
|
91557
92017
|
init_logger();
|
|
91558
92018
|
|
|
91559
|
-
// src/hooks/host-boundary.ts
|
|
91560
|
-
init_agent_names();
|
|
91561
|
-
init_schema();
|
|
91562
|
-
init_logger();
|
|
91563
|
-
function resolveMessageTransformContext(output) {
|
|
91564
|
-
const messages = Array.isArray(output?.messages) ? output.messages : [];
|
|
91565
|
-
let sessionID;
|
|
91566
|
-
for (const m of messages) {
|
|
91567
|
-
const sid = m?.info?.sessionID;
|
|
91568
|
-
if (typeof sid === "string" && sid.length > 0) {
|
|
91569
|
-
sessionID = sid;
|
|
91570
|
-
break;
|
|
91571
|
-
}
|
|
91572
|
-
}
|
|
91573
|
-
let agent = resolveAgentOptional(sessionID);
|
|
91574
|
-
if (!agent) {
|
|
91575
|
-
for (let i = messages.length - 1;i >= 0; i--) {
|
|
91576
|
-
const info = messages[i]?.info;
|
|
91577
|
-
if (info?.role === "user" && typeof info.agent === "string" && info.agent) {
|
|
91578
|
-
agent = info.agent;
|
|
91579
|
-
break;
|
|
91580
|
-
}
|
|
91581
|
-
}
|
|
91582
|
-
}
|
|
91583
|
-
const callerRole = agent ? stripKnownSwarmPrefix(agent).toLowerCase() : undefined;
|
|
91584
|
-
return {
|
|
91585
|
-
sessionID,
|
|
91586
|
-
agent,
|
|
91587
|
-
callerRole,
|
|
91588
|
-
isArchitect: callerRole === ORCHESTRATOR_NAME,
|
|
91589
|
-
isDelegate: !!agent && !!callerRole && callerRole !== ORCHESTRATOR_NAME
|
|
91590
|
-
};
|
|
91591
|
-
}
|
|
91592
|
-
function resolveAgentOptional(sessionID) {
|
|
91593
|
-
if (typeof sessionID === "string" && sessionID.length > 0) {
|
|
91594
|
-
const mapped = swarmState.activeAgent.get(sessionID);
|
|
91595
|
-
if (mapped)
|
|
91596
|
-
return mapped;
|
|
91597
|
-
}
|
|
91598
|
-
return;
|
|
91599
|
-
}
|
|
91600
|
-
|
|
91601
92019
|
// src/hooks/knowledge-application.ts
|
|
91602
92020
|
var import_proper_lockfile10 = __toESM(require_proper_lockfile(), 1);
|
|
91603
92021
|
import { existsSync as existsSync59 } from "fs";
|
|
@@ -100240,7 +100658,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
100240
100658
|
}
|
|
100241
100659
|
const sdkOpts = signal ? { signal } : {};
|
|
100242
100660
|
try {
|
|
100243
|
-
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-
|
|
100661
|
+
const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-kjhsssaq.js");
|
|
100244
100662
|
const createResult = await client.session.create({
|
|
100245
100663
|
...sessionId ? {
|
|
100246
100664
|
body: {
|
|
@@ -102338,7 +102756,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
|
|
|
102338
102756
|
clearedEvents: []
|
|
102339
102757
|
};
|
|
102340
102758
|
try {
|
|
102341
|
-
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-
|
|
102759
|
+
const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-74j5mcxh.js");
|
|
102342
102760
|
await cancelPrFeedbackPublication2(directory, sessionID, reason);
|
|
102343
102761
|
} catch (err) {
|
|
102344
102762
|
warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -116230,7 +116648,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
|
|
|
116230
116648
|
if (!input.dispatcher) {
|
|
116231
116649
|
throw new Error("no evaluation dispatcher available (cannot run validation)");
|
|
116232
116650
|
}
|
|
116233
|
-
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-
|
|
116651
|
+
const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-qe3fkzx5.js");
|
|
116234
116652
|
const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
|
|
116235
116653
|
const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals144.evaluateCandidateV1({
|
|
116236
116654
|
projectRoot: input.directory,
|
|
@@ -118823,7 +119241,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
118823
119241
|
async function handleHelpCommand(ctx) {
|
|
118824
119242
|
const targetCommand = ctx.args.join(" ");
|
|
118825
119243
|
if (!targetCommand) {
|
|
118826
|
-
const { buildHelpText } = await import("./index-
|
|
119244
|
+
const { buildHelpText } = await import("./index-4hnxtssf.js");
|
|
118827
119245
|
return buildHelpText();
|
|
118828
119246
|
}
|
|
118829
119247
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -118837,7 +119255,7 @@ async function handleHelpCommand(ctx) {
|
|
|
118837
119255
|
> Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
|
|
118838
119256
|
}
|
|
118839
119257
|
const similar = _internals39.findSimilarCommands(targetCommand);
|
|
118840
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
119258
|
+
const { buildHelpText: fullHelp } = await import("./index-4hnxtssf.js");
|
|
118841
119259
|
if (similar.length > 0) {
|
|
118842
119260
|
return `Command '/swarm ${targetCommand}' not found.
|
|
118843
119261
|
|
|
@@ -119165,7 +119583,7 @@ var COMMAND_REGISTRY = {
|
|
|
119165
119583
|
},
|
|
119166
119584
|
"guardrail explain": {
|
|
119167
119585
|
handler: async (ctx) => {
|
|
119168
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
119586
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-0ap0a51w.js");
|
|
119169
119587
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
119170
119588
|
},
|
|
119171
119589
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -119175,7 +119593,7 @@ var COMMAND_REGISTRY = {
|
|
|
119175
119593
|
},
|
|
119176
119594
|
"guardrail reset": {
|
|
119177
119595
|
handler: async (ctx) => {
|
|
119178
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
119596
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-3fq8xdjf.js");
|
|
119179
119597
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
119180
119598
|
},
|
|
119181
119599
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -119196,7 +119614,7 @@ var COMMAND_REGISTRY = {
|
|
|
119196
119614
|
},
|
|
119197
119615
|
"guardrail-log": {
|
|
119198
119616
|
handler: async (ctx) => {
|
|
119199
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
119617
|
+
const { handleGuardrailLog } = await import("./guardrail-log-xw37f7ws.js");
|
|
119200
119618
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
119201
119619
|
},
|
|
119202
119620
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -124520,4 +124938,4 @@ function getAgentConfigs(config, directory, sessionId, projectContext) {
|
|
|
124520
124938
|
return result;
|
|
124521
124939
|
}
|
|
124522
124940
|
|
|
124523
|
-
export { resetActionCircuitExternally, getBlockingActionCircuit, resolveConfiguredAgentModel, resolveRegisteredAgentModel, resolveEffectiveAgentOverride, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, declaresWindowsWrapperLoose, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, resetArchitectPromptBudgetAdvisories, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals147 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, mergeWriteAnalyses, isPowerShellShaped, isPowerShellReadOnlyPipeline, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, resolveWindowsWriteAuthority, getAgentSession, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, laneChildSessionAgents, recordLaneChildSession, assertTaskIdNotForeignLaneSession, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, runSerializedWithMergeBacks, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals24 as _internals1, redactSecrets, prWorkflowSessionFileStem, ensurePrWorkflowSafeParentDirectory, writePrWorkflowAtomicJson, PrWorkflowCheckoutMutationTimeoutError, withPrWorkflowCheckoutMutationLock, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_REVIEW_SUBMIT_REJECTIONS, MAX_PR_REVIEW_VERDICT_REJECTIONS, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, appendPrWorkflowSkillContractAdvisories, readPrWorkflowGateState, recordPrReviewSubmitRejection, latestPrReviewSubmitRejectionMessage, recordPrReviewVerdictRejection, latestPrReviewVerdictRejectionForLane, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, PR_WORKFLOW_PROBE_SKIPPED_NO_BUDGET_REASON, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewMicroFamilyDispatch, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readAuthoritativeFindingPolicy, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, derivePrReviewCandidateInventoryForStatus, readPrReviewVerdictSettlementReceiptItems, readPrReviewVerdictSettlementEffectiveIds, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, derivePrReviewPresentationOrder, derivePrReviewOrderUnstableItems, derivePrReviewReviewerSeverities, readAuthoritativePrReviewOrderAgreement, formatPrReviewLaneValidationFailure, validateExactStructuredReceiptCoverage2 as validateExactStructuredReceiptCoverage, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, createCuratorLLMDelegate, getCoChangePairs, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals71 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals75 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, searchKnowledge, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals39 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };
|
|
124941
|
+
export { resetActionCircuitExternally, getBlockingActionCircuit, resolveConfiguredAgentModel, resolveRegisteredAgentModel, resolveEffectiveAgentOverride, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, declaresWindowsWrapperLoose, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, resetArchitectPromptBudgetAdvisories, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals147 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, mergeWriteAnalyses, isPowerShellShaped, isPowerShellReadOnlyPipeline, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, resolveWindowsWriteAuthority, getAgentSession, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, laneChildSessionAgents, recordLaneChildSession, assertTaskIdNotForeignLaneSession, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, runSerializedWithMergeBacks, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals24 as _internals1, redactSecrets, prWorkflowSessionFileStem, ensurePrWorkflowSafeParentDirectory, writePrWorkflowAtomicJson, PrWorkflowCheckoutMutationTimeoutError, withPrWorkflowCheckoutMutationLock, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_REVIEW_SUBMIT_REJECTIONS, MAX_PR_REVIEW_VERDICT_REJECTIONS, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, appendPrWorkflowSkillContractAdvisories, readPrWorkflowGateState, recordPrReviewSubmitRejection, latestPrReviewSubmitRejectionMessage, recordPrReviewVerdictRejection, latestPrReviewVerdictRejectionForLane, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, PR_WORKFLOW_PROBE_SKIPPED_NO_BUDGET_REASON, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, rollbackPrReviewValidationBatchIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewMicroFamilyDispatch, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readAuthoritativeFindingPolicy, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, derivePrReviewCandidateInventoryForStatus, prReviewPhaseWindowForStatus, readPrReviewVerdictSettlementReceiptItems, readPrReviewVerdictSettlementEffectiveIds, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, derivePrReviewPresentationOrder, derivePrReviewOrderUnstableItems, derivePrReviewReviewerSeverities, readAuthoritativePrReviewOrderAgreement, formatPrReviewLaneValidationFailure, validateExactStructuredReceiptCoverage2 as validateExactStructuredReceiptCoverage, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, createCuratorLLMDelegate, getCoChangePairs, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals71 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals75 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, searchKnowledge, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals39 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };
|