opencode-swarm 7.122.0 → 7.122.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/{config-doctor-404c8mf8.js → config-doctor-3ksh1534.js} +2 -2
- package/dist/cli/{core-xnwasfpc.js → core-cwgb7ev8.js} +1 -1
- package/dist/cli/{curation-policy-cj1tpzr5.js → curation-policy-4j4qce5a.js} +5 -5
- package/dist/cli/{curator-llm-factory-8rg0f77t.js → curator-llm-factory-x769hn66.js} +22 -20
- package/dist/cli/{curator-3rze3pd4.js → curator-qfh07497.js} +22 -20
- package/dist/cli/{evidence-summary-service-k14ykm03.js → evidence-summary-service-96ndczbk.js} +7 -5
- package/dist/cli/{gate-evidence-tbpezk28.js → gate-evidence-xqks3kk2.js} +3 -3
- package/dist/cli/{guardrail-explain-hdsxa2c5.js → guardrail-explain-kj0e9r25.js} +23 -21
- package/dist/cli/{guardrail-log-dhpp0kmn.js → guardrail-log-z291m4gw.js} +3 -3
- package/dist/cli/{hive-promoter-dh38qd9m.js → hive-promoter-00mktxkk.js} +22 -20
- package/dist/cli/{index-zvae4m8g.js → index-17eybc3z.js} +1 -1
- package/dist/cli/{index-kyvg2cmp.js → index-19zn67q6.js} +1 -1
- package/dist/cli/{index-rbfq77sz.js → index-2j25br0p.js} +12 -10
- package/dist/cli/{index-9xpgytj9.js → index-3rr0ese8.js} +1 -1
- package/dist/cli/{index-gr7ssnj9.js → index-5he0kwnx.js} +3 -3
- package/dist/cli/{index-68aggz0v.js → index-6srk9a5q.js} +2 -2
- package/dist/cli/{index-qg11yf8q.js → index-6xnxz6z0.js} +1 -1
- package/dist/cli/{index-emkb0bbe.js → index-7cspygmb.js} +277 -673
- package/dist/cli/{index-3r1w7xky.js → index-cqsak7bf.js} +2 -2
- package/dist/cli/index-ctpgsj84.js +547 -0
- package/dist/cli/index-d6h5hq91.js +564 -0
- package/dist/cli/{index-vqcgmy4y.js → index-det5jwfk.js} +1 -1
- package/dist/cli/{index-3sx27bxt.js → index-dywekeen.js} +3 -3
- package/dist/cli/{index-wtn8wf7h.js → index-gw3m5fw0.js} +1 -1
- package/dist/cli/{index-rkd6qwjh.js → index-hns7xjm7.js} +2 -2
- package/dist/cli/{index-xdsj4qtd.js → index-j9kxwshw.js} +5 -5
- package/dist/cli/{index-jzpv74mq.js → index-jm81nhks.js} +24 -22
- package/dist/cli/{index-ahxrne50.js → index-kanrv3sv.js} +160 -58
- package/dist/cli/{index-j33zb3cx.js → index-m0bmh3w0.js} +4 -4
- package/dist/cli/index-m1abzg93.js +68 -0
- package/dist/cli/{index-ny13nr0x.js → index-n2712byd.js} +6 -6
- package/dist/cli/{index-3jvqw5hy.js → index-q27bajqb.js} +1 -1
- package/dist/cli/{index-qt2yaghg.js → index-vcgfqd8f.js} +1 -63
- package/dist/cli/{index-tftv9xh9.js → index-wr8qgpz5.js} +1 -1
- package/dist/cli/index.js +22 -20
- package/dist/cli/{knowledge-escalator-sya06p12.js → knowledge-escalator-dyxsm78k.js} +6 -6
- package/dist/cli/{knowledge-events-xzps61a9.js → knowledge-events-36q6nvae.js} +4 -4
- package/dist/cli/{knowledge-link-sy85fw3w.js → knowledge-link-4yd2z8ev.js} +3 -3
- package/dist/cli/{knowledge-store-qg66a93n.js → knowledge-store-e07b4s54.js} +4 -4
- package/dist/cli/{knowledge-validator-gar6wv4f.js → knowledge-validator-sfyf7wn2.js} +7 -7
- package/dist/cli/pr-subscriptions-x653151h.js +1 -1
- package/dist/cli/{scan-cursor-nx5y5k7r.js → scan-cursor-hm0aqqae.js} +5 -5
- package/dist/cli/{schema-vwxpsk6j.js → schema-13bnng2n.js} +1 -1
- package/dist/cli/scope-persistence-d9erwnvb.js +36 -0
- package/dist/cli/{skill-generator-nt5qxafq.js → skill-generator-g6r52x94.js} +8 -8
- package/dist/config/constants.d.ts +3 -2
- package/dist/hooks/delegation-gate.d.ts +19 -1
- package/dist/hooks/guardrails/nontransient-circuit.d.ts +47 -0
- package/dist/hooks/scope-guard.d.ts +9 -2
- package/dist/hooks/write-target-resolver.d.ts +30 -0
- package/dist/index.js +405 -369
- package/dist/sandbox/win32/restricted-environment-executor.d.ts +3 -2
- package/dist/scope/scope-binding.d.ts +89 -0
- package/dist/scope/scope-persistence.d.ts +53 -12
- package/dist/state.d.ts +25 -1
- package/dist/tools/declare-scope.d.ts +5 -1
- package/dist/tools/file-extractor-planner.d.ts +31 -0
- package/dist/tools/file-extractor.d.ts +2 -7
- package/package.json +1 -1
- package/dist/cli/index-51gg9947.js +0 -254
- package/dist/cli/scope-persistence-mfr36yc9.js +0 -20
- package/dist/cli/{index-h07wn84h.js → index-7mkpsw6g.js} +3 -3
- package/dist/cli/{pending-delegations-0z3znsec.js → pending-delegations-68cbaqv2.js} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-6srk9a5q.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-17eybc3z.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -83,49 +83,51 @@ import {
|
|
|
83
83
|
handleWriteRetroCommand,
|
|
84
84
|
normalizeSwarmCommandInput,
|
|
85
85
|
resolveCommand
|
|
86
|
-
} from "./index-
|
|
87
|
-
import"./index-
|
|
88
|
-
import"./index-
|
|
89
|
-
import"./index-
|
|
86
|
+
} from "./index-kanrv3sv.js";
|
|
87
|
+
import"./index-19zn67q6.js";
|
|
88
|
+
import"./index-det5jwfk.js";
|
|
89
|
+
import"./index-7cspygmb.js";
|
|
90
90
|
import"./index-4905hd2m.js";
|
|
91
91
|
import"./index-nprawcc0.js";
|
|
92
|
-
import"./index-
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
92
|
+
import"./index-5he0kwnx.js";
|
|
93
|
+
import"./index-j9kxwshw.js";
|
|
94
|
+
import"./index-hns7xjm7.js";
|
|
95
95
|
import"./index-vxv732ex.js";
|
|
96
96
|
import"./index-c8s9a3zh.js";
|
|
97
97
|
import"./index-816rkp4y.js";
|
|
98
98
|
import"./index-22e127jw.js";
|
|
99
|
-
import"./index-
|
|
100
|
-
import"./index-
|
|
99
|
+
import"./index-m0bmh3w0.js";
|
|
100
|
+
import"./index-cqsak7bf.js";
|
|
101
101
|
import"./index-rtry5xyf.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
102
|
+
import"./index-n2712byd.js";
|
|
103
|
+
import"./index-dywekeen.js";
|
|
104
104
|
import"./index-ae75rja9.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
105
|
+
import"./index-q27bajqb.js";
|
|
106
|
+
import"./index-3rr0ese8.js";
|
|
107
|
+
import"./index-vcgfqd8f.js";
|
|
108
108
|
import"./index-gnp9x6se.js";
|
|
109
109
|
import {
|
|
110
110
|
AGENT_TOOL_MAP,
|
|
111
111
|
ORCHESTRATOR_NAME,
|
|
112
112
|
stripKnownSwarmPrefix
|
|
113
|
-
} from "./index-
|
|
113
|
+
} from "./index-wr8qgpz5.js";
|
|
114
114
|
import"./index-4rhcth7a.js";
|
|
115
115
|
import"./index-8fwhhayc.js";
|
|
116
116
|
import"./index-q1exe2b3.js";
|
|
117
|
-
import"./index-
|
|
118
|
-
import"./index-
|
|
117
|
+
import"./index-d6h5hq91.js";
|
|
118
|
+
import"./index-ctpgsj84.js";
|
|
119
|
+
import"./index-m1abzg93.js";
|
|
120
|
+
import"./index-gw3m5fw0.js";
|
|
119
121
|
import"./index-ye3fndsw.js";
|
|
120
122
|
import"./index-kzj3fp7c.js";
|
|
121
123
|
import"./index-5e4e2hvv.js";
|
|
122
124
|
import"./index-p0arc26j.js";
|
|
123
125
|
import"./index-zgwm4ryv.js";
|
|
124
126
|
import"./index-dqh3zhhc.js";
|
|
125
|
-
import"./index-
|
|
126
|
-
import"./index-
|
|
127
|
-
import"./index-76kvm9z5.js";
|
|
127
|
+
import"./index-6xnxz6z0.js";
|
|
128
|
+
import"./index-7mkpsw6g.js";
|
|
128
129
|
import"./index-fsrp8wp3.js";
|
|
130
|
+
import"./index-76kvm9z5.js";
|
|
129
131
|
import"./index-q2rrv0cy.js";
|
|
130
132
|
import"./index-293f68mj.js";
|
|
131
133
|
import"./index-7g4c7s5r.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
readDoctorArtifact,
|
|
5
5
|
removeStraySwarmDir,
|
|
6
6
|
runConfigDoctor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-det5jwfk.js";
|
|
8
8
|
import {
|
|
9
9
|
EvaluationTaskV1Schema,
|
|
10
10
|
GateAuditManifestV1Schema,
|
|
@@ -13,18 +13,15 @@ import {
|
|
|
13
13
|
IdentifierSchema,
|
|
14
14
|
MAX_TRANSIENT_RETRIES,
|
|
15
15
|
admitEvaluationTask,
|
|
16
|
-
appendLedgerEvent,
|
|
17
16
|
archiveEvidence,
|
|
18
17
|
canonicalHash,
|
|
19
18
|
canonicalJson,
|
|
20
19
|
checkRequirementCoverage,
|
|
21
20
|
closePlanTerminalState,
|
|
22
21
|
computeManifestContentHash,
|
|
23
|
-
computePlanHash,
|
|
24
22
|
computeSpecHash,
|
|
25
23
|
computeTaskInputContentHash,
|
|
26
24
|
computeTaskSetContentHash,
|
|
27
|
-
derivePlanId,
|
|
28
25
|
derivePlanMarkdown,
|
|
29
26
|
disableEpicMode,
|
|
30
27
|
enableEpicMode,
|
|
@@ -34,7 +31,6 @@ import {
|
|
|
34
31
|
getExecutor,
|
|
35
32
|
getGitRepositoryStatus,
|
|
36
33
|
initDurableStatusPath,
|
|
37
|
-
initLedger,
|
|
38
34
|
init_executor,
|
|
39
35
|
isEpicModeActive,
|
|
40
36
|
isGitRepo,
|
|
@@ -65,7 +61,7 @@ import {
|
|
|
65
61
|
saveTaskSetSnapshot,
|
|
66
62
|
transientBackoff,
|
|
67
63
|
validateProjectRoot
|
|
68
|
-
} from "./index-
|
|
64
|
+
} from "./index-7cspygmb.js";
|
|
69
65
|
import {
|
|
70
66
|
withTimeout
|
|
71
67
|
} from "./index-4905hd2m.js";
|
|
@@ -95,15 +91,15 @@ import {
|
|
|
95
91
|
retireSkill,
|
|
96
92
|
selectCandidateEntries,
|
|
97
93
|
syncBundledProjectSkillsIfMissingAsync
|
|
98
|
-
} from "./index-
|
|
94
|
+
} from "./index-5he0kwnx.js";
|
|
99
95
|
import {
|
|
100
96
|
readRecentEscalations
|
|
101
|
-
} from "./index-
|
|
97
|
+
} from "./index-j9kxwshw.js";
|
|
102
98
|
import {
|
|
103
99
|
alreadyCuratedThisGeneration,
|
|
104
100
|
claimNextScanBatch,
|
|
105
101
|
resolveCohortId
|
|
106
|
-
} from "./index-
|
|
102
|
+
} from "./index-hns7xjm7.js";
|
|
107
103
|
import {
|
|
108
104
|
CURATOR_INIT_PROMPT,
|
|
109
105
|
CURATOR_PHASE_PROMPT,
|
|
@@ -136,11 +132,11 @@ import {
|
|
|
136
132
|
validateActionability,
|
|
137
133
|
validateActionableFields,
|
|
138
134
|
validateLesson
|
|
139
|
-
} from "./index-
|
|
135
|
+
} from "./index-m0bmh3w0.js";
|
|
140
136
|
import {
|
|
141
137
|
authorizeCuration,
|
|
142
138
|
buildConfigFingerprintInput
|
|
143
|
-
} from "./index-
|
|
139
|
+
} from "./index-cqsak7bf.js";
|
|
144
140
|
import {
|
|
145
141
|
cohortConfigFingerprint
|
|
146
142
|
} from "./index-rtry5xyf.js";
|
|
@@ -170,7 +166,7 @@ import {
|
|
|
170
166
|
transactFile,
|
|
171
167
|
transactKnowledge,
|
|
172
168
|
wordBigrams
|
|
173
|
-
} from "./index-
|
|
169
|
+
} from "./index-n2712byd.js";
|
|
174
170
|
import {
|
|
175
171
|
MAX_EVENT_LOG_ENTRIES,
|
|
176
172
|
_internals,
|
|
@@ -180,7 +176,7 @@ import {
|
|
|
180
176
|
recordHiveKnowledgeEvent,
|
|
181
177
|
recordKnowledgeEvent,
|
|
182
178
|
resolveKnowledgeEventsPath
|
|
183
|
-
} from "./index-
|
|
179
|
+
} from "./index-dywekeen.js";
|
|
184
180
|
import {
|
|
185
181
|
resolveHiveDataDir,
|
|
186
182
|
resolveHiveEventsPath,
|
|
@@ -196,15 +192,14 @@ import {
|
|
|
196
192
|
resolveLinkDir,
|
|
197
193
|
sanitizeLinkId,
|
|
198
194
|
writeLinkPointer
|
|
199
|
-
} from "./index-
|
|
195
|
+
} from "./index-q27bajqb.js";
|
|
200
196
|
import {
|
|
201
197
|
loadPluginConfig,
|
|
202
198
|
loadPluginConfigWithMeta
|
|
203
|
-
} from "./index-
|
|
199
|
+
} from "./index-3rr0ese8.js";
|
|
204
200
|
import {
|
|
205
|
-
PlanSchema,
|
|
206
201
|
RetrospectiveEvidenceSchema
|
|
207
|
-
} from "./index-
|
|
202
|
+
} from "./index-vcgfqd8f.js";
|
|
208
203
|
import {
|
|
209
204
|
AGENT_TOOL_MAP,
|
|
210
205
|
ALL_SUBAGENT_NAMES,
|
|
@@ -215,7 +210,7 @@ import {
|
|
|
215
210
|
TOOL_NAME_SET,
|
|
216
211
|
getCanonicalAgentRole,
|
|
217
212
|
stripKnownSwarmPrefix
|
|
218
|
-
} from "./index-
|
|
213
|
+
} from "./index-wr8qgpz5.js";
|
|
219
214
|
import {
|
|
220
215
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
221
216
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -226,8 +221,20 @@ import {
|
|
|
226
221
|
init_capability_probe
|
|
227
222
|
} from "./index-8fwhhayc.js";
|
|
228
223
|
import {
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
MAX_PENDING_SCOPE_BINDINGS,
|
|
225
|
+
clearAllScopes,
|
|
226
|
+
clearScopeBindingFromDisk,
|
|
227
|
+
clearScopeBindings
|
|
228
|
+
} from "./index-d6h5hq91.js";
|
|
229
|
+
import {
|
|
230
|
+
appendLedgerEvent,
|
|
231
|
+
computePlanHash,
|
|
232
|
+
derivePlanId,
|
|
233
|
+
initLedger
|
|
234
|
+
} from "./index-ctpgsj84.js";
|
|
235
|
+
import {
|
|
236
|
+
PlanSchema
|
|
237
|
+
} from "./index-m1abzg93.js";
|
|
231
238
|
import {
|
|
232
239
|
advisoryWarn,
|
|
233
240
|
getDeferredWarnings
|
|
@@ -246,7 +253,7 @@ import {
|
|
|
246
253
|
} from "./index-zgwm4ryv.js";
|
|
247
254
|
import {
|
|
248
255
|
atomicWriteFile
|
|
249
|
-
} from "./index-
|
|
256
|
+
} from "./index-7mkpsw6g.js";
|
|
250
257
|
import {
|
|
251
258
|
tryAcquireLock,
|
|
252
259
|
withEvidenceLock
|
|
@@ -9858,7 +9865,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
9858
9865
|
}
|
|
9859
9866
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
9860
9867
|
try {
|
|
9861
|
-
const skillModule = await import("./skill-generator-
|
|
9868
|
+
const skillModule = await import("./skill-generator-g6r52x94.js");
|
|
9862
9869
|
for (const cand of skillCandidates) {
|
|
9863
9870
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
9864
9871
|
continue;
|
|
@@ -10195,7 +10202,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
10195
10202
|
} catch {}
|
|
10196
10203
|
}
|
|
10197
10204
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
10198
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
10205
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-dyxsm78k.js");
|
|
10199
10206
|
for (const { id } of contradictedEntries) {
|
|
10200
10207
|
try {
|
|
10201
10208
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -10993,7 +11000,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
10993
11000
|
warnings.push("Failed to collect knowledge summary.");
|
|
10994
11001
|
}
|
|
10995
11002
|
try {
|
|
10996
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
11003
|
+
const { getScanStatus } = await import("./scan-cursor-hm0aqqae.js");
|
|
10997
11004
|
const scanStatus = await getScanStatus(directory);
|
|
10998
11005
|
if (scanStatus.remaining_estimate > 0) {
|
|
10999
11006
|
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.`);
|
|
@@ -11165,9 +11172,9 @@ var _internals16 = {
|
|
|
11165
11172
|
verifyPostMortemKnowledgeActions,
|
|
11166
11173
|
repairPostMortemActions,
|
|
11167
11174
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
11168
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
11175
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-13bnng2n.js");
|
|
11169
11176
|
try {
|
|
11170
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
11177
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2j25br0p.js");
|
|
11171
11178
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
11172
11179
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
11173
11180
|
} catch {
|
|
@@ -11175,11 +11182,11 @@ var _internals16 = {
|
|
|
11175
11182
|
}
|
|
11176
11183
|
},
|
|
11177
11184
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
11178
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
11185
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-qfh07497.js");
|
|
11179
11186
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
11180
11187
|
},
|
|
11181
11188
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
11182
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
11189
|
+
const { checkHivePromotions } = await import("./hive-promoter-00mktxkk.js");
|
|
11183
11190
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
11184
11191
|
},
|
|
11185
11192
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -11188,7 +11195,7 @@ var _internals16 = {
|
|
|
11188
11195
|
activateProposal,
|
|
11189
11196
|
listSkills: listSkills2,
|
|
11190
11197
|
sanitizeSlug
|
|
11191
|
-
} = await import("./skill-generator-
|
|
11198
|
+
} = await import("./skill-generator-g6r52x94.js");
|
|
11192
11199
|
const result = {
|
|
11193
11200
|
approved: [],
|
|
11194
11201
|
rejected: [],
|
|
@@ -13705,9 +13712,9 @@ function hashContent(content) {
|
|
|
13705
13712
|
return createHash5("sha1").update(content).digest("hex");
|
|
13706
13713
|
}
|
|
13707
13714
|
async function loadConfigForPolicyCurator(directory) {
|
|
13708
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
13715
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-13bnng2n.js");
|
|
13709
13716
|
try {
|
|
13710
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
13717
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2j25br0p.js");
|
|
13711
13718
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
13712
13719
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
13713
13720
|
} catch {
|
|
@@ -16865,7 +16872,7 @@ async function runFinalizeStage(ctx) {
|
|
|
16865
16872
|
}
|
|
16866
16873
|
}
|
|
16867
16874
|
try {
|
|
16868
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
16875
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-13bnng2n.js");
|
|
16869
16876
|
const { config: pmLoadedConfig } = _internals25.loadPluginConfigWithMeta(ctx.directory);
|
|
16870
16877
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
16871
16878
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -19016,9 +19023,9 @@ var _internals29 = {
|
|
|
19016
19023
|
readSwarmFileAsync,
|
|
19017
19024
|
loadCuratorDeps: async () => {
|
|
19018
19025
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
19019
|
-
import("./schema-
|
|
19020
|
-
import("./curator-
|
|
19021
|
-
import("./curator-llm-factory-
|
|
19026
|
+
import("./schema-13bnng2n.js"),
|
|
19027
|
+
import("./curator-qfh07497.js"),
|
|
19028
|
+
import("./curator-llm-factory-x769hn66.js")
|
|
19022
19029
|
]);
|
|
19023
19030
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
19024
19031
|
}
|
|
@@ -19516,7 +19523,7 @@ import { fileURLToPath } from "url";
|
|
|
19516
19523
|
// package.json
|
|
19517
19524
|
var package_default = {
|
|
19518
19525
|
name: "opencode-swarm",
|
|
19519
|
-
version: "7.122.
|
|
19526
|
+
version: "7.122.1",
|
|
19520
19527
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
19521
19528
|
main: "dist/index.js",
|
|
19522
19529
|
types: "dist/index.d.ts",
|
|
@@ -19965,7 +19972,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
19965
19972
|
let scanCompleted = false;
|
|
19966
19973
|
let scanRemaining = 0;
|
|
19967
19974
|
try {
|
|
19968
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
19975
|
+
const { getScanStatus } = await import("./scan-cursor-hm0aqqae.js");
|
|
19969
19976
|
const status = await getScanStatus(directory);
|
|
19970
19977
|
scanGeneration = status.generation;
|
|
19971
19978
|
scanCompleted = status.completed;
|
|
@@ -19973,19 +19980,19 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
19973
19980
|
} catch {}
|
|
19974
19981
|
let configMatch = null;
|
|
19975
19982
|
try {
|
|
19976
|
-
const { isLinked: isLinked2 } = await import("./knowledge-link-
|
|
19983
|
+
const { isLinked: isLinked2 } = await import("./knowledge-link-4yd2z8ev.js");
|
|
19977
19984
|
if (isLinked2(directory)) {
|
|
19978
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
19985
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-13bnng2n.js");
|
|
19979
19986
|
let config;
|
|
19980
19987
|
try {
|
|
19981
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
19988
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2j25br0p.js");
|
|
19982
19989
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
19983
19990
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
19984
19991
|
} catch {
|
|
19985
19992
|
config = KnowledgeConfigSchema2.parse({});
|
|
19986
19993
|
}
|
|
19987
19994
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
19988
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
19995
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-4j4qce5a.js");
|
|
19989
19996
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
19990
19997
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
19991
19998
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -21163,7 +21170,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
21163
21170
|
const result = runConfigDoctor(config, directory);
|
|
21164
21171
|
let output;
|
|
21165
21172
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
21166
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
21173
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-3ksh1534.js");
|
|
21167
21174
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true);
|
|
21168
21175
|
output = formatDoctorMarkdown(fixResult.result);
|
|
21169
21176
|
} else {
|
|
@@ -21976,7 +21983,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
21976
21983
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
21977
21984
|
}
|
|
21978
21985
|
async function handleEvidenceSummaryCommand(directory) {
|
|
21979
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
21986
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-96ndczbk.js");
|
|
21980
21987
|
const artifact = await buildEvidenceSummary(directory);
|
|
21981
21988
|
if (!artifact) {
|
|
21982
21989
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -39356,7 +39363,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
39356
39363
|
async function handleHelpCommand(ctx) {
|
|
39357
39364
|
const targetCommand = ctx.args.join(" ");
|
|
39358
39365
|
if (!targetCommand) {
|
|
39359
|
-
const { buildHelpText } = await import("./index-
|
|
39366
|
+
const { buildHelpText } = await import("./index-jm81nhks.js");
|
|
39360
39367
|
return buildHelpText();
|
|
39361
39368
|
}
|
|
39362
39369
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -39365,7 +39372,7 @@ async function handleHelpCommand(ctx) {
|
|
|
39365
39372
|
return _internals63.buildDetailedHelp(resolved.key, resolved.entry);
|
|
39366
39373
|
}
|
|
39367
39374
|
const similar = _internals63.findSimilarCommands(targetCommand);
|
|
39368
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
39375
|
+
const { buildHelpText: fullHelp } = await import("./index-jm81nhks.js");
|
|
39369
39376
|
if (similar.length > 0) {
|
|
39370
39377
|
return `Command '/swarm ${targetCommand}' not found.
|
|
39371
39378
|
|
|
@@ -39498,7 +39505,7 @@ var COMMAND_REGISTRY = {
|
|
|
39498
39505
|
},
|
|
39499
39506
|
"guardrail explain": {
|
|
39500
39507
|
handler: async (ctx) => {
|
|
39501
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
39508
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-kj0e9r25.js");
|
|
39502
39509
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
39503
39510
|
},
|
|
39504
39511
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -39508,7 +39515,7 @@ var COMMAND_REGISTRY = {
|
|
|
39508
39515
|
},
|
|
39509
39516
|
"guardrail-explain": {
|
|
39510
39517
|
handler: async (ctx) => {
|
|
39511
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
39518
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-kj0e9r25.js");
|
|
39512
39519
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
39513
39520
|
},
|
|
39514
39521
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -39518,7 +39525,7 @@ var COMMAND_REGISTRY = {
|
|
|
39518
39525
|
},
|
|
39519
39526
|
"guardrail-log": {
|
|
39520
39527
|
handler: async (ctx) => {
|
|
39521
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
39528
|
+
const { handleGuardrailLog } = await import("./guardrail-log-z291m4gw.js");
|
|
39522
39529
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
39523
39530
|
},
|
|
39524
39531
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -40523,11 +40530,11 @@ If a tool modifies a file, it is a CODER tool. Delegate.
|
|
|
40523
40530
|
1a. SCOPE DISCIPLINE \u2014 call declare_scope BEFORE every coder delegation AND before any test_engineer delegation that will write new test files.
|
|
40524
40531
|
- Before you delegate a coding task, call declare_scope with { taskId, files } where \`files\` is the exact list of paths the coder is allowed to write. Bundle any generated/lockfile paths that the change will produce (e.g. package-lock.json, Cargo.lock, dist/*).
|
|
40525
40532
|
- Before you delegate to test_engineer with an instruction to CREATE or MODIFY test files, call declare_scope with { taskId, files } listing the exact test file path(s) (e.g. src/auth/login.test.ts, tests/unit/foo.spec.ts) the test_engineer is expected to write.
|
|
40526
|
-
- If coder or test_engineer returns "WRITE BLOCKED" for a path outside the declared list: call declare_scope again with the missing path added. Do NOT instruct the coder to use bash, sed, echo, cat, tee, dd, or any interpreter eval (python -c, node -e, bun -e, ruby -e) to bypass the block.
|
|
40527
|
-
- Never wrap a file write in eval, bash -c, sh -c, a subshell, or a heredoc-to-file redirect
|
|
40533
|
+
- If coder or test_engineer returns "WRITE BLOCKED" for a path outside the declared list: call declare_scope again with the missing path added. Do NOT instruct the coder to use bash, sed, echo, cat, tee, dd, or any interpreter eval (python -c, node -e, bun -e, ruby -e) to bypass the block. Alternate mechanisms cannot create write authority and violate scope discipline.
|
|
40534
|
+
- Never wrap a file write in eval, bash -c, sh -c, a subshell, or a heredoc-to-file redirect as a workaround. Shell and interpreter targets are scope-checked when they can be proven, and unverifiable write payloads fail closed.
|
|
40528
40535
|
- Do NOT use mv, Move-Item, move, ren, Rename-Item, or cp-then-rm chains to relocate, rename, or delete files under \`.swarm/\` as a workaround for blocked destructive commands. Those are file-move shell bypasses and are banned. Use the tool's dedicated tools (\`.swarm/\` file management or evidence manager tools) instead.
|
|
40529
40536
|
- If you cannot enumerate files up front (e.g. a broad refactor), declare the containing directories \u2014 declare_scope accepts directory entries and grants containment.
|
|
40530
|
-
- Rationale:
|
|
40537
|
+
- Rationale: coder Task preflight binds scope to the exact workspace, plan generation, task, parent session, and Task call. Missing or malformed scope blocks delegation with SCOPE_NOT_DECLARED; conflicting lower-precedence FILE:/plan paths block with SCOPE_CONFLICT before the coder starts.
|
|
40531
40538
|
<!-- BEHAVIORAL_GUIDANCE_END -->
|
|
40532
40539
|
2. ONE agent per message. Send, STOP, wait for response.
|
|
40533
40540
|
Exception: Stage B reviewer/test_engineer gate agents for the SAME completed coder task may be dispatched together before waiting when both gates are required. This exception NEVER applies to coder delegations. Preserve ONE task per coder call.
|
|
@@ -40541,7 +40548,7 @@ If a tool modifies a file, it is a CODER tool. Delegate.
|
|
|
40541
40548
|
<!-- BEHAVIORAL_GUIDANCE_START -->
|
|
40542
40549
|
BATCHING DETECTION \u2014 you are batching if your coder delegation contains ANY of:
|
|
40543
40550
|
- The word "and" connecting two actions ("update X AND add Y")
|
|
40544
|
-
- Multiple FILE
|
|
40551
|
+
- Multiple objectives hidden behind a comma-separated FILE value (use one complete relative path per FILE: line)
|
|
40545
40552
|
- Multiple TASK objectives ("TASK: Refactor the processor and update the config")
|
|
40546
40553
|
- Phrases like "also", "while you're at it", "additionally", "as well"
|
|
40547
40554
|
|
|
@@ -41308,7 +41315,7 @@ Purpose: Ingest issue evidence, trace impact, and transition to the full fix wor
|
|
|
41308
41315
|
ACTION: Load skill ${bundledProjectSkillFileReference("issue-ingest")} immediately. Follow the protocol defined there.
|
|
41309
41316
|
|
|
41310
41317
|
HARD CONSTRAINTS:
|
|
41311
|
-
- Preserve issue evidence, flag missing repro details, and route
|
|
41318
|
+
- Preserve issue evidence, flag missing repro details, and route every delegation through the current session's active-swarm role mapping; no swarm ID receives special behavior.
|
|
41312
41319
|
|
|
41313
41320
|
RECOVERY: At mode entry, read .swarm/issue-reference.json to recover the source issue URL, number, and flags (plan/trace/noRepro) if the mode signal has been lost or context was compacted.
|
|
41314
41321
|
|
|
@@ -42381,7 +42388,7 @@ DO NOT:
|
|
|
42381
42388
|
- Use the semantic diff as a substitute for your own reasoning about correctness
|
|
42382
42389
|
|
|
42383
42390
|
## EXPLORER FINDINGS \u2014 VALIDATE BEFORE REPORTING
|
|
42384
|
-
Explorer agent outputs
|
|
42391
|
+
Explorer agent outputs may contain observations labeled as REVIEW NEEDED, RISKS, VERDICT, BREAKING, COMPATIBLE, or similar judgment language. Treat these as CANDIDATE OBSERVATIONS, not established facts, regardless of the active swarm's user-defined ID.
|
|
42385
42392
|
- BEFORE including any issue-like finding from explorer input in your final report: READ the relevant code yourself and verify the issue independently
|
|
42386
42393
|
- Do NOT adopt the explorer's VERDICT, BREAKING, or COMPATIBLE labels as your own \u2014 you must reach your own conclusion
|
|
42387
42394
|
- Explorer's RISKS section names potential concerns \u2014 you determine if they are actual issues through your own review
|
|
@@ -42727,6 +42734,17 @@ SME is read-only. Cache persistence is Architect's responsibility \u2014 save th
|
|
|
42727
42734
|
|
|
42728
42735
|
// src/agents/index.ts
|
|
42729
42736
|
var warnedAgents = new Set;
|
|
42737
|
+
var NONTRANSIENT_STOP_PROTOCOL = [
|
|
42738
|
+
"",
|
|
42739
|
+
"## NON-TRANSIENT TOOL FAILURE PROTOCOL \u2014 MANDATORY",
|
|
42740
|
+
"Apply this protocol when a tool reports ParserError, ParseError, MissingEndCurlyBrace, CommandNotFoundException, a command-not-found/not-recognized error, or [sandbox] BLOCKED.",
|
|
42741
|
+
"It also applies when guardrails report NON-TRANSIENT STOP or NON-TRANSIENT CIRCUIT BREAKER \u2014 including the third same-category permanent failure:",
|
|
42742
|
+
"1. STOP. Do not retry the same operation with a different command, shell, tool, quoting style, or wrapper.",
|
|
42743
|
+
"2. Treat the failure as structural, not transient. Do not spend retry budget on it.",
|
|
42744
|
+
"3. Report BLOCKED with the exact error category and the command/tool that failed.",
|
|
42745
|
+
"4. Wait for corrected input, environment, scope, or a verified new invocation before continuing."
|
|
42746
|
+
].join(`
|
|
42747
|
+
`);
|
|
42730
42748
|
var _swarmAgentsMap = new Map;
|
|
42731
42749
|
var KNOWN_VARIANT_VALUES = new Set([
|
|
42732
42750
|
"low",
|
|
@@ -43080,6 +43098,13 @@ var loggedFirstCalls = new Set;
|
|
|
43080
43098
|
// src/hooks/guardrails/messages-transform.ts
|
|
43081
43099
|
var TRANSIENT_STATUS_CODES = new Set([408, 429, 500, 502, 503, 504, 529]);
|
|
43082
43100
|
|
|
43101
|
+
// src/hooks/guardrails/nontransient-circuit.ts
|
|
43102
|
+
var IMMEDIATE_HARD_STOP_CATEGORIES = new Set([
|
|
43103
|
+
"shell_parse_error",
|
|
43104
|
+
"command_not_found",
|
|
43105
|
+
"sandbox_wrapper_failure"
|
|
43106
|
+
]);
|
|
43107
|
+
|
|
43083
43108
|
// src/commands/command-dispatch.ts
|
|
43084
43109
|
function normalizeSwarmCommandInput(command, argumentText) {
|
|
43085
43110
|
if (command !== "swarm" && !command.startsWith("swarm-")) {
|
|
@@ -44762,6 +44787,9 @@ function resolveWriteTargets(command, writes, cwd) {
|
|
|
44762
44787
|
};
|
|
44763
44788
|
});
|
|
44764
44789
|
}
|
|
44790
|
+
|
|
44791
|
+
// src/tools/file-extractor-planner.ts
|
|
44792
|
+
var cachedPlans = new WeakMap;
|
|
44765
44793
|
// src/hooks/guardrails/index.ts
|
|
44766
44794
|
var SPEC_DRIFT_BLOCKED_TOOLS = new Set([
|
|
44767
44795
|
"save_plan",
|
|
@@ -44782,7 +44810,46 @@ var EvidenceTaskIdPlanSchema = exports_external.object({
|
|
|
44782
44810
|
}).passthrough()).optional()
|
|
44783
44811
|
}).passthrough()).optional()
|
|
44784
44812
|
}).passthrough();
|
|
44785
|
-
|
|
44813
|
+
|
|
44814
|
+
class BoundedPendingScopeMap extends Map {
|
|
44815
|
+
expiresAtByKey = new Map;
|
|
44816
|
+
sweepExpired(now = Date.now()) {
|
|
44817
|
+
for (const [key, expiresAt] of this.expiresAtByKey) {
|
|
44818
|
+
if (expiresAt <= now)
|
|
44819
|
+
this.delete(key);
|
|
44820
|
+
}
|
|
44821
|
+
}
|
|
44822
|
+
set(key, value) {
|
|
44823
|
+
this.sweepExpired();
|
|
44824
|
+
this.delete(key);
|
|
44825
|
+
super.set(key, value);
|
|
44826
|
+
this.expiresAtByKey.set(key, Date.now() + 5 * 60000);
|
|
44827
|
+
while (this.size > MAX_PENDING_SCOPE_BINDINGS) {
|
|
44828
|
+
const oldest = this.keys().next().value;
|
|
44829
|
+
if (!oldest)
|
|
44830
|
+
break;
|
|
44831
|
+
this.delete(oldest);
|
|
44832
|
+
}
|
|
44833
|
+
return this;
|
|
44834
|
+
}
|
|
44835
|
+
get(key) {
|
|
44836
|
+
this.sweepExpired();
|
|
44837
|
+
return super.get(key);
|
|
44838
|
+
}
|
|
44839
|
+
has(key) {
|
|
44840
|
+
this.sweepExpired();
|
|
44841
|
+
return super.has(key);
|
|
44842
|
+
}
|
|
44843
|
+
delete(key) {
|
|
44844
|
+
this.expiresAtByKey.delete(key);
|
|
44845
|
+
return super.delete(key);
|
|
44846
|
+
}
|
|
44847
|
+
clear() {
|
|
44848
|
+
this.expiresAtByKey.clear();
|
|
44849
|
+
super.clear();
|
|
44850
|
+
}
|
|
44851
|
+
}
|
|
44852
|
+
var pendingCoderScopeByTaskId = new BoundedPendingScopeMap;
|
|
44786
44853
|
function clearPendingCoderScope() {
|
|
44787
44854
|
pendingCoderScopeByTaskId.clear();
|
|
44788
44855
|
}
|
|
@@ -44893,6 +44960,16 @@ var STATE_ORDER2 = [
|
|
|
44893
44960
|
"tests_run",
|
|
44894
44961
|
"complete"
|
|
44895
44962
|
];
|
|
44963
|
+
function createNonTransientCircuitState(agentName, invocationId) {
|
|
44964
|
+
return {
|
|
44965
|
+
ownerAgent: stripKnownSwarmPrefix(agentName),
|
|
44966
|
+
ownerInvocationId: invocationId,
|
|
44967
|
+
category: null,
|
|
44968
|
+
sameCategoryCount: 0,
|
|
44969
|
+
hardStop: false,
|
|
44970
|
+
lastSignal: null
|
|
44971
|
+
};
|
|
44972
|
+
}
|
|
44896
44973
|
var _toolAggregates = new Map;
|
|
44897
44974
|
var defaultRunContext = new AgentRunContext("default", _toolAggregates);
|
|
44898
44975
|
var _runContexts = new Map;
|
|
@@ -44944,6 +45021,13 @@ function resetSwarmState() {
|
|
|
44944
45021
|
swarmState.fullAutoEnabledInConfig = false;
|
|
44945
45022
|
swarmState.environmentProfiles.clear();
|
|
44946
45023
|
clearPendingCoderScope();
|
|
45024
|
+
for (const binding of clearScopeBindings()) {
|
|
45025
|
+
clearScopeBindingFromDisk({
|
|
45026
|
+
directory: binding.workspaceIdentity,
|
|
45027
|
+
taskId: binding.taskId,
|
|
45028
|
+
ownerSessionId: binding.ownerSessionId
|
|
45029
|
+
});
|
|
45030
|
+
}
|
|
44947
45031
|
resetStandardWorktreeIsolationState();
|
|
44948
45032
|
resetRealtimeLearningNudgeState();
|
|
44949
45033
|
_councilDisagreementWarned.clear();
|
|
@@ -45003,6 +45087,8 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
|
|
|
45003
45087
|
activeInvocationId: 0,
|
|
45004
45088
|
lastInvocationIdByAgent: {},
|
|
45005
45089
|
windows: {},
|
|
45090
|
+
nonTransientCircuit: createNonTransientCircuitState(agentName, 0),
|
|
45091
|
+
pendingToolExecutions: new Map,
|
|
45006
45092
|
lastCompactionHint: 0,
|
|
45007
45093
|
architectWriteCount: 0,
|
|
45008
45094
|
lastCoderDelegationTaskId: null,
|
|
@@ -45083,6 +45169,14 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
|
|
|
45083
45169
|
}
|
|
45084
45170
|
}
|
|
45085
45171
|
function endAgentSession(sessionId) {
|
|
45172
|
+
const removedBindings = clearScopeBindings((binding) => binding.ownerSessionId === sessionId || binding.parentOwnerSessionId === sessionId);
|
|
45173
|
+
for (const binding of removedBindings) {
|
|
45174
|
+
clearScopeBindingFromDisk({
|
|
45175
|
+
directory: binding.workspaceIdentity,
|
|
45176
|
+
taskId: binding.taskId,
|
|
45177
|
+
ownerSessionId: binding.ownerSessionId
|
|
45178
|
+
});
|
|
45179
|
+
}
|
|
45086
45180
|
swarmState.agentSessions.delete(sessionId);
|
|
45087
45181
|
clearRealtimeLearningNudgeSession(sessionId);
|
|
45088
45182
|
}
|
|
@@ -45099,6 +45193,7 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
45099
45193
|
telemetry.agentActivated(sessionId, agentName, oldName);
|
|
45100
45194
|
session.delegationActive = false;
|
|
45101
45195
|
session.lastAgentEventTime = now;
|
|
45196
|
+
session.nonTransientCircuit = createNonTransientCircuitState(agentName, 0);
|
|
45102
45197
|
if (!session.windows) {
|
|
45103
45198
|
session.activeInvocationId = 0;
|
|
45104
45199
|
session.lastInvocationIdByAgent = {};
|
|
@@ -45110,6 +45205,12 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
45110
45205
|
session.lastInvocationIdByAgent = {};
|
|
45111
45206
|
session.windows = {};
|
|
45112
45207
|
}
|
|
45208
|
+
if (session.nonTransientCircuit === undefined) {
|
|
45209
|
+
session.nonTransientCircuit = createNonTransientCircuitState(session.agentName, session.activeInvocationId ?? 0);
|
|
45210
|
+
}
|
|
45211
|
+
if (session.pendingToolExecutions === undefined) {
|
|
45212
|
+
session.pendingToolExecutions = new Map;
|
|
45213
|
+
}
|
|
45113
45214
|
if (session.lastCompactionHint === undefined) {
|
|
45114
45215
|
session.lastCompactionHint = 0;
|
|
45115
45216
|
}
|
|
@@ -45262,13 +45363,14 @@ function beginInvocation(sessionId, agentName) {
|
|
|
45262
45363
|
throw new Error(`Cannot begin invocation: session ${sessionId} does not exist`);
|
|
45263
45364
|
}
|
|
45264
45365
|
const stripped = stripKnownSwarmPrefix(agentName);
|
|
45265
|
-
if (stripped === ORCHESTRATOR_NAME) {
|
|
45266
|
-
return null;
|
|
45267
|
-
}
|
|
45268
45366
|
const lastId = session.lastInvocationIdByAgent[stripped] || 0;
|
|
45269
45367
|
const newId = lastId + 1;
|
|
45270
45368
|
session.lastInvocationIdByAgent[stripped] = newId;
|
|
45271
45369
|
session.activeInvocationId = newId;
|
|
45370
|
+
session.nonTransientCircuit = createNonTransientCircuitState(stripped, newId);
|
|
45371
|
+
if (stripped === ORCHESTRATOR_NAME) {
|
|
45372
|
+
return null;
|
|
45373
|
+
}
|
|
45272
45374
|
const now = Date.now();
|
|
45273
45375
|
const window = {
|
|
45274
45376
|
id: newId,
|