opencode-swarm 7.125.5 → 7.126.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/brainstorm/SKILL.md +19 -14
- package/.opencode/skills/execute/SKILL.md +5 -0
- package/.opencode/skills/phase-wrap/SKILL.md +2 -0
- package/.opencode/skills/plan/SKILL.md +22 -15
- package/.opencode/skills/specify/SKILL.md +18 -14
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +1 -0
- package/dist/agents/architect.d.ts +9 -7
- package/dist/cli/{curation-policy-62w2pwfz.js → curation-policy-dptr1rfe.js} +2 -2
- package/dist/cli/{curator-mhhvx2pw.js → curator-23hynz78.js} +9 -9
- package/dist/cli/{curator-llm-factory-av2tcfy9.js → curator-llm-factory-r648jn8e.js} +9 -9
- package/dist/cli/{guardrail-explain-kqx2bczn.js → guardrail-explain-6atsd4vr.js} +10 -10
- package/dist/cli/{hive-promoter-6mhnhrbx.js → hive-promoter-bnkhzd46.js} +9 -9
- package/dist/cli/{index-s6hskqg6.js → index-0ff5cm9j.js} +85 -40
- package/dist/cli/{index-4b1e5m0d.js → index-16z6txq3.js} +1 -1
- package/dist/cli/{index-gbnpz7rh.js → index-2bnfwmk3.js} +1 -1
- package/dist/cli/{index-1012f47p.js → index-2yd75hms.js} +3 -3
- package/dist/cli/{index-0cdq55k0.js → index-68fpa7ff.js} +10 -10
- package/dist/cli/{index-74xejn4v.js → index-a1c9az5e.js} +117 -19
- package/dist/cli/{index-0f45t7xy.js → index-bcgfhxzv.js} +4 -4
- package/dist/cli/{index-e315gwc9.js → index-cdx337js.js} +1 -1
- package/dist/cli/{index-yq4s3q43.js → index-kwnsatzq.js} +2 -2
- package/dist/cli/{index-1htanqp1.js → index-mgrsx5hn.js} +1 -1
- package/dist/cli/{index-ccfkfrew.js → index-y4ry07h8.js} +1 -1
- package/dist/cli/{index-gd5w3ef8.js → index-yfzn5r9s.js} +3 -3
- package/dist/cli/index.js +9 -9
- package/dist/cli/{knowledge-escalator-h3hg7ek7.js → knowledge-escalator-4hc8w7sd.js} +3 -3
- package/dist/cli/{knowledge-events-jtr66wxz.js → knowledge-events-kyqjv1f8.js} +1 -1
- package/dist/cli/{knowledge-store-69ttjjjs.js → knowledge-store-06k0p1gs.js} +1 -1
- package/dist/cli/{knowledge-validator-yn06rh13.js → knowledge-validator-42xjmcmh.js} +4 -4
- package/dist/cli/{scan-cursor-r0w2p5gz.js → scan-cursor-gjcvpyta.js} +2 -2
- package/dist/cli/{skill-generator-a7xfyddq.js → skill-generator-t6j93mwt.js} +5 -5
- package/dist/commands/turbo-constants.d.ts +6 -0
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/loader.d.ts +26 -0
- package/dist/index.js +30 -63
- package/package.json +2 -1
|
@@ -215,34 +215,63 @@ function parseConfigWithFallback(mergedRaw, rawUserConfig, failedResult, loadedF
|
|
|
215
215
|
if (removed.length > 0) {
|
|
216
216
|
const recovered = PluginConfigSchema.safeParse(cleaned);
|
|
217
217
|
if (recovered.success) {
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
const warning = `Ignored ${removed.length} unrecognized config key(s): ${removed.join(", ")}. The rest of your configuration was preserved. Fix or remove these keys.`;
|
|
219
|
+
advisoryWarn(`[opencode-swarm] ${warning}`);
|
|
220
|
+
return {
|
|
221
|
+
config: secure(recovered.data),
|
|
222
|
+
recovery: "stripped_keys",
|
|
223
|
+
removedKeys: removed,
|
|
224
|
+
warnings: [warning]
|
|
225
|
+
};
|
|
220
226
|
}
|
|
221
227
|
}
|
|
222
228
|
if (rawUserConfig) {
|
|
223
229
|
const userSanitized = sanitizeSectionConfigs(rawUserConfig ?? {});
|
|
224
230
|
const userParseResult = PluginConfigSchema.safeParse(userSanitized);
|
|
225
231
|
if (userParseResult.success) {
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
const warning = "Project config ignored due to validation errors. Using user config.";
|
|
233
|
+
advisoryWarn(`[opencode-swarm] ${warning}`);
|
|
234
|
+
return {
|
|
235
|
+
config: secure(userParseResult.data),
|
|
236
|
+
recovery: "user_only",
|
|
237
|
+
removedKeys: [],
|
|
238
|
+
warnings: [warning]
|
|
239
|
+
};
|
|
228
240
|
}
|
|
229
241
|
const userStripped = stripUnrecognizedKeys(userSanitized, userParseResult.error);
|
|
230
242
|
if (userStripped.removed.length > 0) {
|
|
231
243
|
const userRecovered = PluginConfigSchema.safeParse(userStripped.cleaned);
|
|
232
244
|
if (userRecovered.success) {
|
|
233
|
-
|
|
234
|
-
|
|
245
|
+
const warning = `Project config ignored; also ignored ${userStripped.removed.length} unrecognized user-config key(s): ${userStripped.removed.join(", ")}.`;
|
|
246
|
+
advisoryWarn(`[opencode-swarm] ${warning}`);
|
|
247
|
+
return {
|
|
248
|
+
config: secure(userRecovered.data),
|
|
249
|
+
recovery: "user_only",
|
|
250
|
+
removedKeys: userStripped.removed,
|
|
251
|
+
warnings: [warning]
|
|
252
|
+
};
|
|
235
253
|
}
|
|
236
254
|
}
|
|
237
255
|
}
|
|
238
256
|
const offending = stripUnrecognizedKeys(mergedRaw, result.error).removed;
|
|
257
|
+
const warnings = [];
|
|
239
258
|
if (offending.length > 0) {
|
|
240
|
-
|
|
259
|
+
const warning = `Merged config validation failed. Unrecognized key(s): ${offending.join(", ")}.`;
|
|
260
|
+
advisoryWarn(`[opencode-swarm] ${warning}`);
|
|
261
|
+
warnings.push(warning);
|
|
241
262
|
} else {
|
|
242
263
|
advisoryWarn("[opencode-swarm] Merged config validation failed:", formatZodIssues(result.error));
|
|
264
|
+
warnings.push("Merged config validation failed.");
|
|
243
265
|
}
|
|
244
|
-
|
|
245
|
-
|
|
266
|
+
const securityWarning = "\u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration.";
|
|
267
|
+
advisoryWarn(`[opencode-swarm] ${securityWarning}`);
|
|
268
|
+
warnings.push(securityWarning);
|
|
269
|
+
return {
|
|
270
|
+
config: PluginConfigSchema.parse({ guardrails: { enabled: true } }),
|
|
271
|
+
recovery: "guardrails_defaults",
|
|
272
|
+
removedKeys: offending,
|
|
273
|
+
warnings
|
|
274
|
+
};
|
|
246
275
|
}
|
|
247
276
|
function rawFullAutoLocked(raw) {
|
|
248
277
|
if (!raw || typeof raw !== "object")
|
|
@@ -285,17 +314,67 @@ function loadPluginConfig(directory) {
|
|
|
285
314
|
}
|
|
286
315
|
return result.data;
|
|
287
316
|
}
|
|
288
|
-
|
|
317
|
+
const { config } = parseConfigWithFallback(mergedRaw, rawUserConfig, result, loadedFromFile, configHadErrors);
|
|
318
|
+
return config;
|
|
289
319
|
}
|
|
290
320
|
function loadPluginConfigWithMeta(directory) {
|
|
291
321
|
const userConfigPath = path.join(getUserConfigDir(), "opencode", CONFIG_FILENAME);
|
|
292
322
|
const projectConfigPath = path.join(directory, ".opencode", CONFIG_FILENAME);
|
|
293
323
|
const userResult = loadRawConfigFromPath(userConfigPath);
|
|
294
324
|
const projectResult = loadRawConfigFromPath(projectConfigPath);
|
|
325
|
+
const rawUserConfig = userResult.config;
|
|
326
|
+
const rawProjectConfig = projectResult.config;
|
|
295
327
|
const loadedFromFile = userResult.fileExisted || projectResult.fileExisted;
|
|
296
328
|
const configHadErrors = userResult.hadError || projectResult.hadError;
|
|
297
|
-
|
|
298
|
-
|
|
329
|
+
let mergedRaw = rawUserConfig ?? {};
|
|
330
|
+
if (rawProjectConfig) {
|
|
331
|
+
mergedRaw = deepMerge(mergedRaw, rawProjectConfig);
|
|
332
|
+
}
|
|
333
|
+
if (rawFullAutoLocked(rawUserConfig) || rawFullAutoLocked(rawProjectConfig)) {
|
|
334
|
+
const fullAutoRaw = mergedRaw.full_auto && typeof mergedRaw.full_auto === "object" && !Array.isArray(mergedRaw.full_auto) ? mergedRaw.full_auto : {};
|
|
335
|
+
mergedRaw = {
|
|
336
|
+
...mergedRaw,
|
|
337
|
+
full_auto: { ...fullAutoRaw, locked: true }
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
mergedRaw = migratePresetsConfig(mergedRaw);
|
|
341
|
+
mergedRaw = sanitizeSectionConfigs(mergedRaw);
|
|
342
|
+
const result = PluginConfigSchema.safeParse(mergedRaw);
|
|
343
|
+
if (result.success) {
|
|
344
|
+
if (loadedFromFile && configHadErrors) {
|
|
345
|
+
const config2 = PluginConfigSchema.parse({
|
|
346
|
+
...mergedRaw,
|
|
347
|
+
guardrails: { enabled: true }
|
|
348
|
+
});
|
|
349
|
+
return {
|
|
350
|
+
config: config2,
|
|
351
|
+
loadedFromFile,
|
|
352
|
+
configHadErrors,
|
|
353
|
+
recovery: "guardrails_defaults",
|
|
354
|
+
removedKeys: [],
|
|
355
|
+
warnings: [
|
|
356
|
+
"\u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration."
|
|
357
|
+
]
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
config: result.data,
|
|
362
|
+
loadedFromFile,
|
|
363
|
+
configHadErrors,
|
|
364
|
+
recovery: "none",
|
|
365
|
+
removedKeys: [],
|
|
366
|
+
warnings: []
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
const { config, recovery, removedKeys, warnings } = parseConfigWithFallback(mergedRaw, rawUserConfig, result, loadedFromFile, configHadErrors);
|
|
370
|
+
return {
|
|
371
|
+
config,
|
|
372
|
+
loadedFromFile,
|
|
373
|
+
configHadErrors,
|
|
374
|
+
recovery,
|
|
375
|
+
removedKeys,
|
|
376
|
+
warnings
|
|
377
|
+
};
|
|
299
378
|
}
|
|
300
379
|
async function loadRawConfigFromPathAsync(configPath) {
|
|
301
380
|
try {
|
|
@@ -345,12 +424,24 @@ function reduceParsedConfig(rawUserConfig, rawProjectConfig, loadedFromFile, con
|
|
|
345
424
|
const result = PluginConfigSchema.safeParse(mergedRaw);
|
|
346
425
|
if (result.success) {
|
|
347
426
|
if (loadedFromFile && configHadErrors) {
|
|
348
|
-
return
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
427
|
+
return {
|
|
428
|
+
config: PluginConfigSchema.parse({
|
|
429
|
+
...mergedRaw,
|
|
430
|
+
guardrails: { enabled: true }
|
|
431
|
+
}),
|
|
432
|
+
recovery: "guardrails_defaults",
|
|
433
|
+
removedKeys: [],
|
|
434
|
+
warnings: [
|
|
435
|
+
"\u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration."
|
|
436
|
+
]
|
|
437
|
+
};
|
|
352
438
|
}
|
|
353
|
-
return
|
|
439
|
+
return {
|
|
440
|
+
config: result.data,
|
|
441
|
+
recovery: "none",
|
|
442
|
+
removedKeys: [],
|
|
443
|
+
warnings: []
|
|
444
|
+
};
|
|
354
445
|
}
|
|
355
446
|
return parseConfigWithFallback(mergedRaw, rawUserConfig, result, loadedFromFile, configHadErrors);
|
|
356
447
|
}
|
|
@@ -363,8 +454,15 @@ async function loadPluginConfigWithMetaAsync(directory) {
|
|
|
363
454
|
]);
|
|
364
455
|
const loadedFromFile = userResult.fileExisted || projectResult.fileExisted;
|
|
365
456
|
const configHadErrors = userResult.hadError || projectResult.hadError;
|
|
366
|
-
const config = reduceParsedConfig(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
|
|
367
|
-
return {
|
|
457
|
+
const { config, recovery, removedKeys, warnings } = reduceParsedConfig(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
|
|
458
|
+
return {
|
|
459
|
+
config,
|
|
460
|
+
loadedFromFile,
|
|
461
|
+
configHadErrors,
|
|
462
|
+
recovery,
|
|
463
|
+
removedKeys,
|
|
464
|
+
warnings
|
|
465
|
+
};
|
|
368
466
|
}
|
|
369
467
|
function loadAgentPrompt(agentName) {
|
|
370
468
|
const promptsDir = path.join(getUserConfigDir(), "opencode", PROMPTS_DIR_NAME);
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-2yd75hms.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-2bnfwmk3.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-42xjmcmh.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
196
|
const { KnowledgeConfigSchema } = await import("./schema-69z8w1ka.js");
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-16z6txq3.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-mgrsx5hn.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-2yd75hms.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-q27bajqb.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-kwnsatzq.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-2yd75hms.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-2bnfwmk3.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
package/dist/cli/index.js
CHANGED
|
@@ -7,28 +7,28 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-0ff5cm9j.js";
|
|
11
11
|
import"./index-dezgmvtw.js";
|
|
12
12
|
import"./index-jt7hnr7q.js";
|
|
13
13
|
import"./index-kk1scggc.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-yfzn5r9s.js";
|
|
18
|
+
import"./index-bcgfhxzv.js";
|
|
19
|
+
import"./index-cdx337js.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-kwnsatzq.js";
|
|
25
|
+
import"./index-mgrsx5hn.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-2yd75hms.js";
|
|
28
|
+
import"./index-2bnfwmk3.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-a1c9az5e.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-bcgfhxzv.js";
|
|
12
|
+
import"./index-2yd75hms.js";
|
|
13
|
+
import"./index-2bnfwmk3.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-2bnfwmk3.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-kwnsatzq.js";
|
|
27
|
+
import"./index-mgrsx5hn.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-2yd75hms.js";
|
|
30
|
+
import"./index-2bnfwmk3.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-cdx337js.js";
|
|
8
|
+
import"./index-2yd75hms.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-yfzn5r9s.js";
|
|
37
|
+
import"./index-kwnsatzq.js";
|
|
38
|
+
import"./index-mgrsx5hn.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-2yd75hms.js";
|
|
41
|
+
import"./index-2bnfwmk3.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the gate-bypass enumeration in Turbo enable messages.
|
|
3
|
+
* Used by all four standard-Turbo enable return strings and by the registry help text.
|
|
4
|
+
* Kept in a separate file to avoid circular-import issues between turbo.ts and registry.ts.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TURBO_BYPASS_DISCLOSURE: string;
|
|
@@ -82,7 +82,7 @@ export declare const COMPACTION_DEFAULTS: {
|
|
|
82
82
|
readonly emergencyThreshold: 80;
|
|
83
83
|
readonly preserveLastNTurns: 5;
|
|
84
84
|
};
|
|
85
|
-
export declare const TURBO_MODE_BANNER = "## \uD83D\uDE80 TURBO MODE ACTIVE\n\n**Speed optimization enabled for this session.**\n\nWhile Turbo Mode is active:\n- **Stage A gates** (lint, imports, pre_check_batch) are still REQUIRED for ALL tasks\n- **Tier 3 tasks** (security-sensitive files matching: architect*.ts, delegation*.ts, guardrails*.ts, adversarial*.ts, sanitiz*.ts, auth*, permission*, crypto*, secret*, security) still require FULL review (Stage B)\n- **Tier 0-2 tasks** can skip Stage B (reviewer, test_engineer) to speed up execution\n- **Phase completion gates** (completion-verify
|
|
85
|
+
export declare const TURBO_MODE_BANNER = "## \uD83D\uDE80 TURBO MODE ACTIVE\n\n**Speed optimization enabled for this session.**\n\nWhile Turbo Mode is active:\n- **Stage A gates** (lint, imports, pre_check_batch) are still REQUIRED for ALL tasks\n- **Tier 3 tasks** (security-sensitive files matching: architect*.ts, delegation*.ts, guardrails*.ts, adversarial*.ts, sanitiz*.ts, auth*, permission*, crypto*, secret*, security) still require FULL review (Stage B)\n- **Tier 0-2 tasks** can skip Stage B (reviewer, test_engineer) to speed up execution\n- **Phase completion gates** (Gates 1\u20135: completion-verify, drift-verifier, hallucination-guard, mutation-gate, phase-council) are automatically bypassed via the orchestrator short-circuit at `src/tools/phase-complete.ts:774\u2013827` when turbo is active; Gate 5b (architecture-supervisor), Gate 6 (final-council), and Gate 7 (full-auto) remain enforced. Note: turbo bypass is session-scoped; one session's turbo does not affect other sessions.\n\nClassification still determines the pipeline:\n- TIER 0 (metadata): lint + diff only \u2014 no change\n- TIER 1 (docs): Stage A + reviewer \u2014 no change\n- TIER 2 (standard code): Stage A + reviewer + test_engineer \u2014 CAN SKIP Stage B with turboMode\n- TIER 3 (critical): Stage A + 2x reviewer + 2x test_engineer \u2014 Stage B REQUIRED (no turbo bypass)\n\nDo NOT skip Stage A gates. Do NOT skip Stage B for TIER 3.\n";
|
|
86
86
|
export declare const FULL_AUTO_BANNER = "## \u26A1 FULL-AUTO MODE ACTIVE\n\nYou are operating without a human in the loop. All escalations route to the Autonomous Oversight Critic instead of a user.\n\nBehavioral changes:\n- TIER 3 escalations go to the critic, not a human. Frame your questions technically, not conversationally.\n- Phase completion approval comes from the critic. Ensure all evidence is written before requesting.\n- The critic defaults to REJECT. Do not attempt to pressure, negotiate, or shortcut. Complete the evidence trail.\n- If the critic returns ESCALATE_TO_HUMAN, the session will pause or terminate. Only the critic can trigger this.\n- Do NOT ask \"Ready for Phase N+1?\" \u2014 call phase_complete directly. The critic reviews automatically.\n";
|
|
87
87
|
export declare const AUTO_PROCEED_BANNER = "## \u23ED\uFE0F AUTO-PROCEED STATUS\n\nAuto-proceed controls whether the architect advances to the next phase automatically (skipping the \"Ready for Phase N+1?\" confirmation).\n\nBehavioral rules:\n- Session override (set via /swarm auto-proceed on|off) wins over the plan default.\n- If neither is set, auto-proceed defaults to OFF and the architect asks before advancing.\n- Full-auto mode (critic oversight) is independent \u2014 it has its own auto-advance mechanism.\n- autoProceedNudgeDone prevents the FR-004 first-boundary nudge from re-firing in this session.\n\nTo toggle at runtime: call swarm_command({ command: \"auto-proceed\", args: [\"on\"|\"off\"] }) from the architect.\n";
|
|
88
88
|
/**
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import { type PluginConfig } from './schema';
|
|
3
3
|
export declare const MAX_CONFIG_FILE_BYTES = 102400;
|
|
4
|
+
/**
|
|
5
|
+
* Recovery type indicating how the config was recovered from parse failure.
|
|
6
|
+
* - 'none': config parsed cleanly on first attempt
|
|
7
|
+
* - 'stripped_keys': Zod-confirmed unrecognized keys were surgically removed and parse succeeded
|
|
8
|
+
* - 'user_only': project config was ignored (validation error); user config used alone
|
|
9
|
+
* - 'guardrails_defaults': no recovery succeeded; fail-secure guardrails defaults applied
|
|
10
|
+
*/
|
|
11
|
+
export type RecoveryType = 'none' | 'stripped_keys' | 'user_only' | 'guardrails_defaults';
|
|
12
|
+
/**
|
|
13
|
+
* Structured recovery metadata returned by parseConfigWithFallback.
|
|
14
|
+
* Exposed via loadPluginConfigWithMeta[Async] so programmatic callers can
|
|
15
|
+
* introspect what recovery was performed.
|
|
16
|
+
*/
|
|
17
|
+
export interface RecoveryInfo {
|
|
18
|
+
recovery: RecoveryType;
|
|
19
|
+
/** Dotted key paths that were removed during recovery (empty if none were stripped). */
|
|
20
|
+
removedKeys: string[];
|
|
21
|
+
/** Human-readable advisory messages describing what recovery was performed. */
|
|
22
|
+
warnings: string[];
|
|
23
|
+
}
|
|
4
24
|
export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
|
|
5
25
|
/**
|
|
6
26
|
* Flatten a ZodError into a compact, single-line, human-readable summary that
|
|
@@ -29,6 +49,9 @@ export declare function loadPluginConfigWithMeta(directory: string): {
|
|
|
29
49
|
* e.g. the Full-Auto `locked` activation guard — must treat this as
|
|
30
50
|
* "config unknown", not "config defaults". */
|
|
31
51
|
configHadErrors: boolean;
|
|
52
|
+
recovery: RecoveryType;
|
|
53
|
+
removedKeys: string[];
|
|
54
|
+
warnings: string[];
|
|
32
55
|
};
|
|
33
56
|
/**
|
|
34
57
|
* Async variant of `loadPluginConfigWithMeta`. Used by the plugin entry
|
|
@@ -38,6 +61,9 @@ export declare function loadPluginConfigWithMetaAsync(directory: string): Promis
|
|
|
38
61
|
config: PluginConfig;
|
|
39
62
|
loadedFromFile: boolean;
|
|
40
63
|
configHadErrors: boolean;
|
|
64
|
+
recovery: RecoveryType;
|
|
65
|
+
removedKeys: string[];
|
|
66
|
+
warnings: string[];
|
|
41
67
|
}>;
|
|
42
68
|
/**
|
|
43
69
|
* Load custom prompt for an agent from the prompts directory.
|