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.
Files changed (36) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +19 -14
  2. package/.opencode/skills/execute/SKILL.md +5 -0
  3. package/.opencode/skills/phase-wrap/SKILL.md +2 -0
  4. package/.opencode/skills/plan/SKILL.md +22 -15
  5. package/.opencode/skills/specify/SKILL.md +18 -14
  6. package/.opencode/skills/swarm-pr-feedback/SKILL.md +1 -0
  7. package/dist/agents/architect.d.ts +9 -7
  8. package/dist/cli/{curation-policy-62w2pwfz.js → curation-policy-dptr1rfe.js} +2 -2
  9. package/dist/cli/{curator-mhhvx2pw.js → curator-23hynz78.js} +9 -9
  10. package/dist/cli/{curator-llm-factory-av2tcfy9.js → curator-llm-factory-r648jn8e.js} +9 -9
  11. package/dist/cli/{guardrail-explain-kqx2bczn.js → guardrail-explain-6atsd4vr.js} +10 -10
  12. package/dist/cli/{hive-promoter-6mhnhrbx.js → hive-promoter-bnkhzd46.js} +9 -9
  13. package/dist/cli/{index-s6hskqg6.js → index-0ff5cm9j.js} +85 -40
  14. package/dist/cli/{index-4b1e5m0d.js → index-16z6txq3.js} +1 -1
  15. package/dist/cli/{index-gbnpz7rh.js → index-2bnfwmk3.js} +1 -1
  16. package/dist/cli/{index-1012f47p.js → index-2yd75hms.js} +3 -3
  17. package/dist/cli/{index-0cdq55k0.js → index-68fpa7ff.js} +10 -10
  18. package/dist/cli/{index-74xejn4v.js → index-a1c9az5e.js} +117 -19
  19. package/dist/cli/{index-0f45t7xy.js → index-bcgfhxzv.js} +4 -4
  20. package/dist/cli/{index-e315gwc9.js → index-cdx337js.js} +1 -1
  21. package/dist/cli/{index-yq4s3q43.js → index-kwnsatzq.js} +2 -2
  22. package/dist/cli/{index-1htanqp1.js → index-mgrsx5hn.js} +1 -1
  23. package/dist/cli/{index-ccfkfrew.js → index-y4ry07h8.js} +1 -1
  24. package/dist/cli/{index-gd5w3ef8.js → index-yfzn5r9s.js} +3 -3
  25. package/dist/cli/index.js +9 -9
  26. package/dist/cli/{knowledge-escalator-h3hg7ek7.js → knowledge-escalator-4hc8w7sd.js} +3 -3
  27. package/dist/cli/{knowledge-events-jtr66wxz.js → knowledge-events-kyqjv1f8.js} +1 -1
  28. package/dist/cli/{knowledge-store-69ttjjjs.js → knowledge-store-06k0p1gs.js} +1 -1
  29. package/dist/cli/{knowledge-validator-yn06rh13.js → knowledge-validator-42xjmcmh.js} +4 -4
  30. package/dist/cli/{scan-cursor-r0w2p5gz.js → scan-cursor-gjcvpyta.js} +2 -2
  31. package/dist/cli/{skill-generator-a7xfyddq.js → skill-generator-t6j93mwt.js} +5 -5
  32. package/dist/commands/turbo-constants.d.ts +6 -0
  33. package/dist/config/constants.d.ts +1 -1
  34. package/dist/config/loader.d.ts +26 -0
  35. package/dist/index.js +30 -63
  36. 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
- advisoryWarn(`[opencode-swarm] Ignored ${removed.length} unrecognized config key(s): ${removed.join(", ")}. The rest of your configuration was preserved. Fix or remove these keys.`);
219
- return secure(recovered.data);
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
- advisoryWarn("[opencode-swarm] Project config ignored due to validation errors. Using user config.");
227
- return secure(userParseResult.data);
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
- advisoryWarn(`[opencode-swarm] Project config ignored; also ignored ${userStripped.removed.length} unrecognized user-config key(s): ${userStripped.removed.join(", ")}.`);
234
- return secure(userRecovered.data);
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
- advisoryWarn(`[opencode-swarm] Merged config validation failed. Unrecognized key(s): ${offending.join(", ")}.`);
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
- advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration.");
245
- return PluginConfigSchema.parse({ guardrails: { enabled: true } });
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
- return parseConfigWithFallback(mergedRaw, rawUserConfig, result, loadedFromFile, configHadErrors);
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
- const config = loadPluginConfig(directory);
298
- return { config, loadedFromFile, configHadErrors };
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 PluginConfigSchema.parse({
349
- ...mergedRaw,
350
- guardrails: { enabled: true }
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 result.data;
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 { config, loadedFromFile, configHadErrors };
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-1012f47p.js";
9
+ } from "./index-2yd75hms.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-gbnpz7rh.js";
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-yn06rh13.js");
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-4b1e5m0d.js");
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 {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-1012f47p.js";
5
+ } from "./index-2yd75hms.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-1htanqp1.js";
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-1012f47p.js";
12
+ } from "./index-2yd75hms.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-q27bajqb.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-rtry5xyf.js";
5
5
  import {
6
6
  readKnowledgeEvents
7
- } from "./index-gbnpz7rh.js";
7
+ } from "./index-2bnfwmk3.js";
8
8
  import {
9
9
  isLinked,
10
10
  readLinkPointer,
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-s6hskqg6.js";
15
+ } from "./index-0ff5cm9j.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-yq4s3q43.js";
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-1012f47p.js";
12
+ } from "./index-2yd75hms.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-gbnpz7rh.js";
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-s6hskqg6.js";
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-gd5w3ef8.js";
18
- import"./index-0f45t7xy.js";
19
- import"./index-e315gwc9.js";
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-yq4s3q43.js";
25
- import"./index-1htanqp1.js";
24
+ import"./index-kwnsatzq.js";
25
+ import"./index-mgrsx5hn.js";
26
26
  import"./index-rtry5xyf.js";
27
- import"./index-1012f47p.js";
28
- import"./index-gbnpz7rh.js";
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-74xejn4v.js";
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-0f45t7xy.js";
12
- import"./index-1012f47p.js";
13
- import"./index-gbnpz7rh.js";
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-gbnpz7rh.js";
29
+ } from "./index-2bnfwmk3.js";
30
30
  import"./index-ae75rja9.js";
31
31
  import"./index-q27bajqb.js";
32
32
  import"./index-zgwm4ryv.js";
@@ -40,7 +40,7 @@ import {
40
40
  transactKnowledge,
41
41
  transactKnowledgeWithCas,
42
42
  wordBigrams
43
- } from "./index-1012f47p.js";
43
+ } from "./index-2yd75hms.js";
44
44
  import {
45
45
  resolveHiveDataDir
46
46
  } from "./index-ae75rja9.js";
@@ -23,11 +23,11 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-yq4s3q43.js";
27
- import"./index-1htanqp1.js";
26
+ } from "./index-kwnsatzq.js";
27
+ import"./index-mgrsx5hn.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-1012f47p.js";
30
- import"./index-gbnpz7rh.js";
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-e315gwc9.js";
8
- import"./index-1012f47p.js";
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-gd5w3ef8.js";
37
- import"./index-yq4s3q43.js";
38
- import"./index-1htanqp1.js";
36
+ } from "./index-yfzn5r9s.js";
37
+ import"./index-kwnsatzq.js";
38
+ import"./index-mgrsx5hn.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-1012f47p.js";
41
- import"./index-gbnpz7rh.js";
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 and drift verification gate) are automatically bypassed \u2014 phase_complete will succeed without drift verification evidence when turbo is active. 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";
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
  /**
@@ -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.