@wrongstack/cli 1.0.0 → 1.0.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.
@@ -19,16 +19,16 @@ import {
19
19
  wantsLocalHelp
20
20
  } from "./chunk-2VMJ3E5Z.js";
21
21
  import "./chunk-B4JLSXZB.js";
22
- import "./chunk-VUVOMXWP.js";
23
22
  import {
24
23
  restoreFlags
25
24
  } from "./chunk-CSAPOCBP.js";
25
+ import "./chunk-VUVOMXWP.js";
26
26
  import {
27
27
  activeProfileConfigPath
28
28
  } from "./chunk-YMXXOOFN.js";
29
29
  import {
30
30
  parseAuthFlags
31
- } from "./chunk-Z7A5MXKJ.js";
31
+ } from "./chunk-E6RFXHWD.js";
32
32
  import "./chunk-TNK6237M.js";
33
33
  import {
34
34
  loadConfigProviders,
@@ -595,4 +595,4 @@ async function runAuthRemove(deps, providerId) {
595
595
  export {
596
596
  authCmd
597
597
  };
598
- //# sourceMappingURL=auth-KIBJZZIE.js.map
598
+ //# sourceMappingURL=auth-ZUMCDNE5.js.map
@@ -99,5 +99,12 @@ export declare function maybeRunSystemPromptMenu(opts: {
99
99
  reader: ReadlineInputReader;
100
100
  profileConfigPath: string;
101
101
  paths: SystemPromptMenuPaths;
102
+ /**
103
+ * Persistence override — defaults to the real `persistSystemPromptVariant`.
104
+ * Test seam: lets the persistence-failure path be exercised deterministically
105
+ * on every platform instead of relying on chmod semantics, which Windows
106
+ * does not reliably honor for directory renames.
107
+ */
108
+ persist?: typeof persistSystemPromptVariant | undefined;
102
109
  }): Promise<SystemPromptMenuOutcome>;
103
110
  //# sourceMappingURL=system-prompt-menu.d.ts.map
@@ -3,10 +3,12 @@
3
3
  var loaders = {
4
4
  acp: async () => (await import("./acp-3LARESEO.js")).acpCmd,
5
5
  init: async () => (await import("./init-DRMMFG2G.js")).initCmd,
6
- auth: async () => (await import("./auth-KIBJZZIE.js")).authCmd,
6
+ auth: async () => (await import("./auth-ZUMCDNE5.js")).authCmd,
7
7
  update: async () => (await import("./update-5DPB4YD4.js")).updateCmd,
8
8
  sessions: async () => (await import("./sessions-config-UL45XKX7.js")).sessionsCmd,
9
9
  config: async () => (await import("./sessions-config-UL45XKX7.js")).configCmd,
10
+ "config-export": async () => (await import("./config-transfer-2YF3CRTN.js")).configExportCmd,
11
+ "config-import": async () => (await import("./config-transfer-2YF3CRTN.js")).configImportCmd,
10
12
  rewind: async () => (await import("./rewind-JA3ZLCNM.js")).rewindCmd,
11
13
  replay: async () => (await import("./replay-JJ2NOWD6.js")).replayCmd,
12
14
  audit: async () => (await import("./audit-46YK5DSC.js")).auditCmd,
@@ -49,4 +51,4 @@ export {
49
51
  subcommands,
50
52
  subcommandNames
51
53
  };
52
- //# sourceMappingURL=chunk-ETYHZPXP.js.map
54
+ //# sourceMappingURL=chunk-D2VCUN7M.js.map
@@ -22,7 +22,6 @@ var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
22
22
  "no-recovery",
23
23
  "recover",
24
24
  "output-json",
25
- "prompt",
26
25
  "metrics",
27
26
  "webui",
28
27
  "webui-session-child",
@@ -238,4 +237,4 @@ export {
238
237
  parseAuthFlags,
239
238
  parseSpawnFlags
240
239
  };
241
- //# sourceMappingURL=chunk-Z7A5MXKJ.js.map
240
+ //# sourceMappingURL=chunk-E6RFXHWD.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-FPIWTJ2G.js";
5
5
  import {
6
6
  parseArgs
7
- } from "./chunk-Z7A5MXKJ.js";
7
+ } from "./chunk-E6RFXHWD.js";
8
8
 
9
9
  // src/boot/short-circuit-flags.ts
10
10
  async function handleHelpVersionShortCircuit(argv) {
@@ -22,7 +22,7 @@ async function handleHelpVersionShortCircuit(argv) {
22
22
  }
23
23
  if (earlyFlags["help"] === true) {
24
24
  if (positional.length > 0) {
25
- const { subcommandNames } = await import("./subcommands-HZQKA4G2.js");
25
+ const { subcommandNames } = await import("./subcommands-WJLBHVKC.js");
26
26
  if (subcommandNames.includes(positional[0])) {
27
27
  const first = positional[0];
28
28
  const deep = positional[1];
@@ -43,4 +43,4 @@ async function handleHelpVersionShortCircuit(argv) {
43
43
  export {
44
44
  handleHelpVersionShortCircuit
45
45
  };
46
- //# sourceMappingURL=chunk-4HV5RKZH.js.map
46
+ //# sourceMappingURL=chunk-KHWDTNBZ.js.map
@@ -0,0 +1,51 @@
1
+
2
+ // src/settings-behavior-sections.ts
3
+ var BEHAVIOR_SECTION_KEYS = [
4
+ "context",
5
+ "tools",
6
+ "log",
7
+ "features",
8
+ "session",
9
+ "indexing",
10
+ "circuitBreaker",
11
+ "modelRuntime",
12
+ "Sage",
13
+ "skills",
14
+ "systemPrompt",
15
+ "autonomy",
16
+ "maxConcurrent",
17
+ "yolo",
18
+ "nextPrediction",
19
+ "hints",
20
+ "debugStream"
21
+ ];
22
+ function extractBehaviorSettings(config) {
23
+ const out = {};
24
+ for (const key of BEHAVIOR_SECTION_KEYS) {
25
+ const value = config[key];
26
+ if (value !== void 0) out[key] = structuredClone(value);
27
+ }
28
+ return out;
29
+ }
30
+ function mergeBehaviorSettings(target, settings) {
31
+ const applied = [];
32
+ for (const key of BEHAVIOR_SECTION_KEYS) {
33
+ const value = settings[key];
34
+ if (value === void 0) continue;
35
+ if (value !== null && typeof value === "object") {
36
+ const current = target[key] ?? {};
37
+ target[key] = { ...current, ...value };
38
+ } else {
39
+ target[key] = value;
40
+ }
41
+ applied.push(key);
42
+ }
43
+ return applied;
44
+ }
45
+
46
+ export {
47
+ BEHAVIOR_SECTION_KEYS,
48
+ extractBehaviorSettings,
49
+ mergeBehaviorSettings
50
+ };
51
+ //# sourceMappingURL=chunk-UQUYBDMG.js.map
@@ -19,14 +19,14 @@ import {
19
19
  } from "./chunk-EWKESL4L.js";
20
20
  import {
21
21
  subcommands
22
- } from "./chunk-ETYHZPXP.js";
22
+ } from "./chunk-D2VCUN7M.js";
23
23
  import {
24
24
  renderDeepHelp,
25
25
  renderFocusedHelp
26
26
  } from "./chunk-MXEJEYT7.js";
27
27
  import {
28
28
  handleHelpVersionShortCircuit
29
- } from "./chunk-4HV5RKZH.js";
29
+ } from "./chunk-KHWDTNBZ.js";
30
30
  import {
31
31
  DEFAULT_PORT
32
32
  } from "./chunk-C2E24IXZ.js";
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-YMXXOOFN.js";
68
68
  import {
69
69
  parseArgs
70
- } from "./chunk-Z7A5MXKJ.js";
70
+ } from "./chunk-E6RFXHWD.js";
71
71
  import "./chunk-TNK6237M.js";
72
72
  import {
73
73
  mutateConfigProviders,
@@ -1556,7 +1556,7 @@ async function maybeRunSystemPromptMenu(opts) {
1556
1556
  });
1557
1557
  if (chosen === savedVariant) return { variant: chosen, aborted: false, changed: false };
1558
1558
  try {
1559
- await persistSystemPromptVariant(opts.profileConfigPath, chosen);
1559
+ await (opts.persist ?? persistSystemPromptVariant)(opts.profileConfigPath, chosen);
1560
1560
  } catch (err) {
1561
1561
  return { variant: chosen, aborted: false, changed: true, persistError: err };
1562
1562
  }
@@ -3117,4 +3117,4 @@ async function initializeCli(argv) {
3117
3117
  export {
3118
3118
  initializeCli
3119
3119
  };
3120
- //# sourceMappingURL=cli-context-CYMKNOK3.js.map
3120
+ //# sourceMappingURL=cli-context-7X3M6U73.js.map
@@ -23,9 +23,6 @@ import {
23
23
  runGit,
24
24
  setSuggestions
25
25
  } from "./chunk-SXJTVNWF.js";
26
- import {
27
- setupPlugins
28
- } from "./chunk-5IA5337I.js";
29
26
  import {
30
27
  deriveFsAccessPair,
31
28
  filterSafeForProject,
@@ -33,6 +30,9 @@ import {
33
30
  persistConfigSetting,
34
31
  persistTelegramConfig
35
32
  } from "./chunk-JACOMTIH.js";
33
+ import {
34
+ setupPlugins
35
+ } from "./chunk-5IA5337I.js";
36
36
  import {
37
37
  configureSimpleUiRuntimeContext,
38
38
  detectProjectFacts,
@@ -71,6 +71,9 @@ import "./chunk-JHPXJRRI.js";
71
71
  import {
72
72
  recordGateDecision
73
73
  } from "./chunk-D3K4NYQL.js";
74
+ import {
75
+ BEHAVIOR_SECTION_KEYS
76
+ } from "./chunk-UQUYBDMG.js";
74
77
  import {
75
78
  CLI_VERSION
76
79
  } from "./chunk-XJXDOF63.js";
@@ -110,7 +113,7 @@ import {
110
113
  } from "./chunk-YMXXOOFN.js";
111
114
  import {
112
115
  parseSpawnFlags
113
- } from "./chunk-Z7A5MXKJ.js";
116
+ } from "./chunk-E6RFXHWD.js";
114
117
  import {
115
118
  runCodexOAuthLogin
116
119
  } from "./chunk-TNK6237M.js";
@@ -5561,17 +5564,20 @@ function createAuthPanelHost(deps) {
5561
5564
  addCustomProvider(io) {
5562
5565
  return runFlow(() => addCustomProvider(flowDeps(deps, io)), deps.onProvidersChanged);
5563
5566
  },
5564
- addLocal(presetId, io) {
5567
+ addLocal(presetId, io, opts) {
5565
5568
  return runFlow(async () => {
5566
5569
  const preset = LOCAL_LLM_PRESETS.find((p) => p.id === presetId);
5567
5570
  if (!preset) {
5568
5571
  io.onLog(`\u2717 Unknown local preset "${presetId}".`);
5569
5572
  return false;
5570
5573
  }
5571
- const url = (await io.prompt(`Base URL (Enter = ${preset.defaultBaseUrl})`, { secret: false })).trim();
5574
+ const url = opts?.baseUrl !== void 0 ? opts.baseUrl.trim() : (await io.prompt(`Base URL (Enter = ${preset.defaultBaseUrl})`, {
5575
+ secret: false
5576
+ })).trim();
5572
5577
  const code = await runAuthLocal(flowDeps(deps, io), {
5573
5578
  name: preset.id,
5574
5579
  baseUrl: url || void 0,
5580
+ apiKey: opts !== void 0 ? (opts.apiKey ?? "").trim() : void 0,
5575
5581
  models: "999"
5576
5582
  });
5577
5583
  return code === 0;
@@ -5722,7 +5728,7 @@ function createRuntimeLifecycleDeps(input) {
5722
5728
  return shared.length > 0 ? shared : input.getCurrentSuggestions();
5723
5729
  },
5724
5730
  autoProceedDelayMs: autonomy?.autoProceedDelayMs ?? 45e3,
5725
- autoProceedMaxIterations: autonomy?.autoProceedMaxIterations ?? 50,
5731
+ autoProceedMaxIterations: autonomy?.autoProceedMaxIterations ?? 0,
5726
5732
  onValidateAutoProceed: (suggestion, lastOutput) => validateAutoProceed(input.context, suggestion, lastOutput),
5727
5733
  getEternalEngine: input.getEternalEngine,
5728
5734
  getParallelEngine: input.getParallelEngine,
@@ -6029,7 +6035,7 @@ async function runCliExecution(params) {
6029
6035
  governanceHandle,
6030
6036
  setConfig
6031
6037
  } = params;
6032
- const { execute } = await import("./execution-3Y55IWBK.js");
6038
+ const { execute } = await import("./execution-MIBWBYB6.js");
6033
6039
  return execute(
6034
6040
  toExecuteDeps({
6035
6041
  core: {
@@ -27111,6 +27117,7 @@ import { color as color56 } from "@wrongstack/core/utils";
27111
27117
 
27112
27118
  // src/slash-commands/settings-mutations.ts
27113
27119
  import { noOpVault as noOpVault10 } from "@wrongstack/core/security";
27120
+ import { CONFIG_BEHAVIOR_DEFAULTS } from "@wrongstack/core/storage";
27114
27121
  import {
27115
27122
  isReasoningEffort as isReasoningEffort3,
27116
27123
  REASONING_EFFORT_LEVELS as REASONING_EFFORT_LEVELS3
@@ -27169,7 +27176,8 @@ var ALL_SETTINGS_KEYS = [
27169
27176
  "statusline",
27170
27177
  "animation",
27171
27178
  "read-symbols",
27172
- "defaults"
27179
+ "defaults",
27180
+ "reset"
27173
27181
  ];
27174
27182
  async function executeSettingsSubcommand(sub, rest, opts) {
27175
27183
  const activeProfile = opts.configStore.get().activeProfile ?? "default";
@@ -27952,6 +27960,9 @@ async function executeSettingsSubcommand(sub, rest, opts) {
27952
27960
  });
27953
27961
  return { message: `${color54.green("\u2713")} animation style \u2192 ${color54.cyan(raw)}` };
27954
27962
  }
27963
+ if (sub === "reset") {
27964
+ return executeSettingsReset(rest, persistDeps, opts, activeProfile);
27965
+ }
27955
27966
  return {
27956
27967
  message: `${color54.red("Unknown setting")} "${sub}". ${unknownSubcommand(sub, ALL_SETTINGS_KEYS, "settings")}`
27957
27968
  };
@@ -27961,6 +27972,62 @@ async function executeSettingsSubcommand(sub, rest, opts) {
27961
27972
  };
27962
27973
  }
27963
27974
  }
27975
+ var RESET_SECTIONS = BEHAVIOR_SECTION_KEYS;
27976
+ async function executeSettingsReset(rest, persistDeps, opts, profileName) {
27977
+ const args = rest.map((a) => a.toLowerCase()).filter(Boolean);
27978
+ if (args.length === 0) {
27979
+ return {
27980
+ message: [
27981
+ `${color54.amber("Usage:")} /settings reset all ${color54.dim("or pick sections:")}`,
27982
+ ` ${RESET_SECTIONS.join(", ")}`,
27983
+ color54.dim(
27984
+ `Identity is kept (providers, models, API keys, MCP servers, extensions, plugins, fallbacks). Profile: ${profileName}`
27985
+ )
27986
+ ].join("\n")
27987
+ };
27988
+ }
27989
+ const wantsAll = args.includes("all");
27990
+ const invalid = args.filter((a) => a !== "all" && !RESET_SECTIONS.includes(a));
27991
+ if (invalid.length > 0) {
27992
+ return {
27993
+ message: `${color54.red("Unknown section")}: ${invalid.join(", ")}. Valid: ${color54.cyan(RESET_SECTIONS.join(", "))}, all`
27994
+ };
27995
+ }
27996
+ const sections = wantsAll ? [...RESET_SECTIONS] : [...new Set(args)];
27997
+ if (!opts.confirm) {
27998
+ return {
27999
+ message: `${color54.red("Reset unavailable")}: no confirmation surface in this context. Run /settings reset from the interactive REPL or TUI.`
28000
+ };
28001
+ }
28002
+ const confirmed = await opts.confirm(
28003
+ `Reset ${sections.length} section(s) of profile "${profileName}" to factory defaults? ${sections.join(", ")}`,
28004
+ false
28005
+ );
28006
+ if (confirmed !== true) {
28007
+ return { message: `${color54.dim("Reset cancelled \u2014 nothing changed.")}` };
28008
+ }
28009
+ const defaults = structuredClone(CONFIG_BEHAVIOR_DEFAULTS);
28010
+ const patch = {};
28011
+ for (const key of sections) {
28012
+ const value = defaults[key];
28013
+ if (value === void 0) continue;
28014
+ patch[key] = value !== null && typeof value === "object" ? { ...value } : value;
28015
+ }
28016
+ await persistConfigSetting(persistDeps, (cfg) => {
28017
+ for (const [key, value] of Object.entries(patch)) {
28018
+ if (value !== null && typeof value === "object") {
28019
+ const current = cfg[key] ?? {};
28020
+ cfg[key] = { ...current, ...value };
28021
+ } else {
28022
+ cfg[key] = value;
28023
+ }
28024
+ }
28025
+ });
28026
+ opts.configStore.update(patch);
28027
+ return {
28028
+ message: `${color54.green("\u2713")} Reset ${sections.length} section(s) \u2192 ${color54.cyan(sections.join(", "))} ${color54.dim(`profile: ${profileName}; some halves apply on next session start`)}`
28029
+ };
28030
+ }
27964
28031
 
27965
28032
  // src/slash-commands/settings-view.ts
27966
28033
  import { resolveFleetChatVerbosity } from "@wrongstack/core/types";
@@ -27986,6 +28053,7 @@ var SETTINGS_HELP = [
27986
28053
  " /settings semver-part patch|minor|major|auto Default part for /semver and the semver_bump tool",
27987
28054
  " /settings breaker on|off Enable/disable the process circuit breaker (gates bash/exec)",
27988
28055
  " /settings breaker-timeout <seconds> Auto kill/reset delay when the breaker trips (0 = manual)",
28056
+ " /settings reset [all|<section>...] Reset behavior sections to factory defaults (asks first; identity kept)",
27989
28057
  " /settings context-mode balanced|frugal|deep Context window policy",
27990
28058
  " /settings context-strategy hybrid|intelligent|selective Compactor strategy",
27991
28059
  " /settings context-auto-compact on|off Auto-compact context when thresholds crossed",
@@ -32441,7 +32509,7 @@ async function spawnAgent2(director, sessionId, role, task, maxIterations) {
32441
32509
  const base = FLEET_ROSTER5[role] ?? {
32442
32510
  id: `manual-${Date.now()}`,
32443
32511
  name: role,
32444
- maxIterations: maxIterations ?? 50,
32512
+ maxIterations: maxIterations ?? 0,
32445
32513
  maxToolCalls: 200
32446
32514
  };
32447
32515
  const config = task !== void 0 ? { ...base, task } : base;
@@ -37279,4 +37347,4 @@ export {
37279
37347
  CLI_VERSION,
37280
37348
  runInteractive
37281
37349
  };
37282
- //# sourceMappingURL=cli-main-TTIVR4DI.js.map
37350
+ //# sourceMappingURL=cli-main-53KG6HAV.js.map
@@ -0,0 +1,99 @@
1
+ import {
2
+ extractBehaviorSettings,
3
+ mergeBehaviorSettings
4
+ } from "./chunk-UQUYBDMG.js";
5
+
6
+ // src/subcommands/handlers/config-transfer.ts
7
+ import * as fs from "node:fs/promises";
8
+ import * as path from "node:path";
9
+ import { color, toErrorMessage } from "@wrongstack/core/utils";
10
+ var FILE_NAME = "wstack-config.json";
11
+ var SAFETY_NOTE = "No providers, API keys, fallbacks, or model/fallback routing data is included.";
12
+ var configExportCmd = async (_args, deps) => {
13
+ const settings = extractBehaviorSettings(deps.config);
14
+ const payload = {
15
+ kind: "wstack-config",
16
+ version: 1,
17
+ exportedAt: (/* @__PURE__ */ new Date()).toISOString(),
18
+ profile: String(
19
+ deps.config["activeProfile"] ?? "default"
20
+ ),
21
+ settings
22
+ };
23
+ const target = path.resolve(deps.cwd, FILE_NAME);
24
+ try {
25
+ await fs.writeFile(target, `${JSON.stringify(payload, null, 2)}
26
+ `, "utf8");
27
+ } catch (err) {
28
+ deps.renderer.writeError(`Export failed: ${toErrorMessage(err)}`);
29
+ return 1;
30
+ }
31
+ deps.renderer.write(`${color.green("\u2713")} Wrote ${color.cyan(target)}
32
+ `);
33
+ deps.renderer.write(` Sections: ${color.cyan(Object.keys(settings).join(", "))}
34
+ `);
35
+ deps.renderer.write(` ${color.dim(SAFETY_NOTE)}
36
+ `);
37
+ return 0;
38
+ };
39
+ var configImportCmd = async (_args, deps) => {
40
+ const target = path.resolve(deps.cwd, FILE_NAME);
41
+ let payload;
42
+ try {
43
+ payload = JSON.parse(await fs.readFile(target, "utf8"));
44
+ } catch (err) {
45
+ deps.renderer.writeError(
46
+ `Import failed: cannot read ${FILE_NAME} in ${deps.cwd} \u2014 ${toErrorMessage(err)}`
47
+ );
48
+ return 1;
49
+ }
50
+ if (payload["kind"] !== "wstack-config") {
51
+ deps.renderer.writeError(
52
+ `Import failed: ${FILE_NAME} is not a wstack config export (missing "kind": "wstack-config").`
53
+ );
54
+ return 1;
55
+ }
56
+ const settings = payload["settings"];
57
+ if (settings === null || typeof settings !== "object") {
58
+ deps.renderer.writeError("Import failed: the export carries no settings object.");
59
+ return 1;
60
+ }
61
+ const profile = String(
62
+ deps.config["activeProfile"] ?? "default"
63
+ );
64
+ const profilePath = deps.paths.profileConfig(profile);
65
+ let disk = {};
66
+ try {
67
+ disk = JSON.parse(await fs.readFile(profilePath, "utf8"));
68
+ } catch {
69
+ }
70
+ const applied = mergeBehaviorSettings(disk, settings);
71
+ if (applied.length === 0) {
72
+ deps.renderer.write(
73
+ `${color.amber("Nothing to import")} \u2014 the export carries none of the known behavior sections.
74
+ `
75
+ );
76
+ return 0;
77
+ }
78
+ try {
79
+ await fs.writeFile(profilePath, `${JSON.stringify(disk, null, 2)}
80
+ `, "utf8");
81
+ } catch (err) {
82
+ deps.renderer.writeError(`Import failed while writing profile: ${toErrorMessage(err)}`);
83
+ return 1;
84
+ }
85
+ deps.renderer.write(
86
+ `${color.green("\u2713")} Imported ${applied.length} section(s) into profile ${color.cyan(profile)}: ${color.cyan(applied.join(", "))}
87
+ `
88
+ );
89
+ deps.renderer.write(` ${color.dim(SAFETY_NOTE)}
90
+ `);
91
+ deps.renderer.write(` ${color.dim("Restart wstack so imported settings take effect.")}
92
+ `);
93
+ return 0;
94
+ };
95
+ export {
96
+ configExportCmd,
97
+ configImportCmd
98
+ };
99
+ //# sourceMappingURL=config-transfer-2YF3CRTN.js.map
@@ -211,7 +211,7 @@ async function runWebUIDispatch(ctx) {
211
211
  const isSimpleUi = !isSessionChild && flags["simpleui"] === true;
212
212
  agent.disableInteractiveConfirmation();
213
213
  renderer.setSilent(true);
214
- const { runWebUI } = await import("./webui-server-T6AMOXJJ.js");
214
+ const { runWebUI } = await import("./webui-server-5R35BHWZ.js");
215
215
  const flagValue = (names) => {
216
216
  for (const name of names) {
217
217
  if (!Object.hasOwn(flags, name)) continue;
@@ -1874,20 +1874,20 @@ function createSettingsAdapter(ctx) {
1874
1874
  const contextModeRaw = cfg.context?.mode;
1875
1875
  const contextMode = contextModeRaw === "frugal" || contextModeRaw === "deep" ? contextModeRaw : "balanced";
1876
1876
  const reasoningEffortRaw = modelRuntime?.reasoning?.effort;
1877
- const reasoningEffort = reasoningEffortRaw === "none" || reasoningEffortRaw === "minimal" || reasoningEffortRaw === "low" || reasoningEffortRaw === "medium" || reasoningEffortRaw === "high" || reasoningEffortRaw === "xhigh" || reasoningEffortRaw === "max" ? reasoningEffortRaw : "high";
1877
+ const reasoningEffort = reasoningEffortRaw === "none" || reasoningEffortRaw === "minimal" || reasoningEffortRaw === "low" || reasoningEffortRaw === "medium" || reasoningEffortRaw === "high" || reasoningEffortRaw === "xhigh" || reasoningEffortRaw === "max" ? reasoningEffortRaw : "medium";
1878
1878
  const featuresAllow = cfg.features?.allowOutsideProjectRoot;
1879
1879
  const toolsRestrict = cfg.tools?.restrictToProjectRoot;
1880
1880
  const resolvedAllow = featuresAllow !== void 0 ? featuresAllow : toolsRestrict !== void 0 ? !toolsRestrict : true;
1881
1881
  const resolvedRestrict = !resolvedAllow;
1882
1882
  return {
1883
1883
  mode,
1884
- delayMs: autonomy?.autoProceedDelayMs ?? 45e3,
1884
+ delayMs: autonomy?.autoProceedDelayMs ?? 15e3,
1885
1885
  titleAnimation: autonomy?.terminalTitleAnimation !== false,
1886
- yolo: cfg.yolo ?? autonomy?.yolo ?? false,
1886
+ yolo: cfg.yolo ?? autonomy?.yolo ?? true,
1887
1887
  fleetChatVerbosity: resolveFleetChatVerbosity(cfg.autonomy),
1888
- chime: autonomy?.chime ?? false,
1888
+ chime: autonomy?.chime ?? true,
1889
1889
  confirmExit: autonomy?.confirmExit !== false,
1890
- nextPrediction: cfg.nextPrediction ?? false,
1890
+ nextPrediction: cfg.nextPrediction ?? true,
1891
1891
  featureMcp: cfg.features?.mcp !== false,
1892
1892
  featurePlugins: cfg.features?.plugins !== false,
1893
1893
  featureMemory: cfg.features?.memory !== false,
@@ -1901,11 +1901,11 @@ function createSettingsAdapter(ctx) {
1901
1901
  contextAutoCompact: cfg.context?.autoCompact !== false,
1902
1902
  contextStrategy: cfg.context?.strategy ?? "hybrid",
1903
1903
  contextMode,
1904
- maxConcurrent: cfg.maxConcurrent ?? 4,
1905
- logLevel: cfg.log?.level ?? "info",
1906
- auditLevel: cfg.session?.auditLevel ?? "standard",
1904
+ maxConcurrent: cfg.maxConcurrent ?? 10,
1905
+ logLevel: cfg.log?.level ?? "warn",
1906
+ auditLevel: cfg.session?.auditLevel ?? "full",
1907
1907
  indexOnStart: cfg.indexing?.onSessionStart !== false,
1908
- maxIterations: cfg.tools?.maxIterations ?? 500,
1908
+ maxIterations: cfg.tools?.maxIterations ?? 0,
1909
1909
  // Multi-diff summary threshold — mirrors the WebUI parity path
1910
1910
  // (pref-helpers.ts reads/writes `decrypted.autonomy.multiDiffSummaryThreshold`;
1911
1911
  // here we read from `decrypted.tools.multiDiffSummaryThreshold` to
@@ -1913,17 +1913,17 @@ function createSettingsAdapter(ctx) {
1913
1913
  multiDiffSummaryThreshold: cfg.tools?.multiDiffSummaryThreshold ?? 5,
1914
1914
  nextStepsTool: cfg.tools?.nextsteps?.enabled === true,
1915
1915
  restrictFsToRoot: resolvedRestrict,
1916
- autoProceedMaxIterations: cfg.autonomy?.autoProceedMaxIterations ?? 50,
1916
+ autoProceedMaxIterations: cfg.autonomy?.autoProceedMaxIterations ?? 0,
1917
1917
  debugStream: cfg.debugStream ?? false,
1918
1918
  shellBangWarningDontShowAgain: autonomy?.shellBangWarningDontShowAgain === true,
1919
1919
  statuslineMode: autonomy?.statuslineMode === "no-color" ? "no-color" : autonomy?.statuslineMode === "detailed" ? "detailed" : "minimum",
1920
1920
  thinkingWord: normalizeTuiThinkingWord(autonomy?.thinkingWord),
1921
1921
  animationStyle: normalizeAnimationStyle(autonomy?.animationStyle),
1922
1922
  configScope: cfg.configScope ?? "global",
1923
- systemPromptVariant: cfg.systemPrompt?.variant === "lite" || cfg.systemPrompt?.variant === "pro" ? cfg.systemPrompt.variant : "default",
1924
- enhanceDelayMs: cfg.autonomy?.enhanceDelayMs ?? 6e4,
1923
+ systemPromptVariant: cfg.systemPrompt?.variant === "lite" || cfg.systemPrompt?.variant === "pro" ? cfg.systemPrompt.variant : cfg.systemPrompt?.variant === "default" ? "default" : "pro",
1924
+ enhanceDelayMs: cfg.autonomy?.enhanceDelayMs ?? 15e3,
1925
1925
  enhanceEnabled: cfg.autonomy?.enhance ?? true,
1926
- enhanceLanguage: cfg.autonomy?.enhanceLanguage === "english" ? "english" : "original",
1926
+ enhanceLanguage: cfg.autonomy?.enhanceLanguage === "english" ? "english" : cfg.autonomy?.enhanceLanguage === "original" ? "original" : "english",
1927
1927
  midRunSendPicker: cfg.autonomy?.midRunSendPicker ?? true,
1928
1928
  mouseMode: autonomy?.mouseMode ?? false,
1929
1929
  autonomyNextPrompt: cfg.autonomy?.autonomyNextPrompt ?? "auto {{suggestion}}",
@@ -1933,7 +1933,7 @@ function createSettingsAdapter(ctx) {
1933
1933
  cacheTtl: modelRuntime?.cache?.ttl === "5m" || modelRuntime?.cache?.ttl === "1h" ? modelRuntime.cache.ttl : "default",
1934
1934
  breakerEnabled: cfg.circuitBreaker?.enabled === true,
1935
1935
  breakerAutoKillResetMs: cfg.circuitBreaker?.autoKillResetMs ?? 6e4,
1936
- showModelReasoning: autonomy?.showModelReasoning ?? true,
1936
+ showModelReasoning: autonomy?.showModelReasoning ?? false,
1937
1937
  showAgentSwarmPanel: coerceAgentSwarmMode(autonomy?.showAgentSwarmPanel),
1938
1938
  showSidebar: autonomy?.showSidebar ?? true,
1939
1939
  // Migrate the legacy `autonomy.showAgentSwarmPanel: 'sidebar'` into
@@ -4983,7 +4983,7 @@ function printBanner(renderer, projectName) {
4983
4983
  }
4984
4984
 
4985
4985
  // src/repl.ts
4986
- var DEFAULT_MAX_CONSECUTIVE_AUTO_PROCEED = 50;
4986
+ var DEFAULT_MAX_CONSECUTIVE_AUTO_PROCEED = 0;
4987
4987
  async function runRepl(opts) {
4988
4988
  if (opts.banner !== false) printBanner(opts.renderer, opts.projectName);
4989
4989
  await renderGoalBanner(opts);
@@ -6741,4 +6741,4 @@ export {
6741
6741
  execute,
6742
6742
  resolveReviewerFallbackModels
6743
6743
  };
6744
- //# sourceMappingURL=execution-3Y55IWBK.js.map
6744
+ //# sourceMappingURL=execution-MIBWBYB6.js.map
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-XJXDOF63.js";
9
9
  import {
10
10
  parseArgs
11
- } from "./chunk-Z7A5MXKJ.js";
11
+ } from "./chunk-E6RFXHWD.js";
12
12
 
13
13
  // src/cli-entry-main.ts
14
14
  async function main(argv) {
@@ -16,14 +16,14 @@ async function main(argv) {
16
16
  applySessionShellDefault();
17
17
  const earlyFlags = parseArgs(argv).flags;
18
18
  if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
19
- const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-6PSP56L7.js");
19
+ const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-UREFSYBL.js");
20
20
  const earlyExit = await handleHelpVersionShortCircuit(argv);
21
21
  if (earlyExit !== null) return earlyExit;
22
22
  }
23
- const { initializeCli } = await import("./cli-context-CYMKNOK3.js");
23
+ const { initializeCli } = await import("./cli-context-7X3M6U73.js");
24
24
  const cliCtx = await initializeCli(argv);
25
25
  if (typeof cliCtx === "number") return cliCtx;
26
- const { runInteractive } = await import("./cli-main-TTIVR4DI.js");
26
+ const { runInteractive } = await import("./cli-main-53KG6HAV.js");
27
27
  return runInteractive(cliCtx);
28
28
  }
29
29
 
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The behavior half of the config — the sections `CONFIG_BEHAVIOR_DEFAULTS`
3
+ * defines that describe *how the product behaves*. One shared list so
4
+ * `/settings reset` (factory restore) and `wstack config-export` /
5
+ * `wstack config-import` (portable settings transfer) can never drift apart.
6
+ *
7
+ * Identity and user-owned namespaces are NEVER part of this set: `provider`,
8
+ * `model`, `providers` (API keys), `mcpServers`, `extensions`, `plugins`,
9
+ * `hq`, `launch`, `fallbackAuto`, `fallbackProfiles`, `fallbackModels`,
10
+ * `fallbackBridge`, `favoriteModels*`, `modelMatrix`, `modelTiers`,
11
+ * `configScope`, `uiLocale`, `version`, `activeProfile`. Portable exports are
12
+ * therefore structurally free of credentials and model-routing data.
13
+ */
14
+ export declare const BEHAVIOR_SECTION_KEYS: readonly ['context', 'tools', 'log', 'features', 'session', 'indexing', 'circuitBreaker', 'modelRuntime', 'Sage', 'skills', 'systemPrompt', 'autonomy', 'maxConcurrent', 'yolo', 'nextPrediction', 'hints', 'debugStream'];
15
+ export type BehaviorSectionKey = (typeof BEHAVIOR_SECTION_KEYS)[number];
16
+ /** Deep-copy the behavior sections out of a loaded config. */
17
+ export declare function extractBehaviorSettings(config: Record<string, unknown>): Record<string, unknown>;
18
+ /** Merge behavior sections from a portable export over an existing config object. */
19
+ export declare function mergeBehaviorSettings(target: Record<string, unknown>, settings: Record<string, unknown>): string[];
20
+ //# sourceMappingURL=settings-behavior-sections.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  handleHelpVersionShortCircuit
3
- } from "./chunk-4HV5RKZH.js";
3
+ } from "./chunk-KHWDTNBZ.js";
4
4
  import "./chunk-FPIWTJ2G.js";
5
5
  import "./chunk-XJXDOF63.js";
6
- import "./chunk-Z7A5MXKJ.js";
6
+ import "./chunk-E6RFXHWD.js";
7
7
  export {
8
8
  handleHelpVersionShortCircuit
9
9
  };
10
- //# sourceMappingURL=short-circuit-flags-6PSP56L7.js.map
10
+ //# sourceMappingURL=short-circuit-flags-UREFSYBL.js.map
@@ -0,0 +1,6 @@
1
+ import type { SubcommandHandler } from '../contracts.js';
2
+ /** `wstack config-export` — write portable behavior settings to ./wstack-config.json. */
3
+ export declare const configExportCmd: SubcommandHandler;
4
+ /** `wstack config-import` — apply ./wstack-config.json behavior settings to the active profile. */
5
+ export declare const configImportCmd: SubcommandHandler;
6
+ //# sourceMappingURL=config-transfer.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  subcommandNames,
3
3
  subcommands
4
- } from "./chunk-ETYHZPXP.js";
4
+ } from "./chunk-D2VCUN7M.js";
5
5
  export {
6
6
  subcommandNames,
7
7
  subcommands
8
8
  };
9
- //# sourceMappingURL=subcommands-HZQKA4G2.js.map
9
+ //# sourceMappingURL=subcommands-WJLBHVKC.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createHqCommandDispatcher
3
3
  } from "./chunk-IMWXXF4J.js";
4
- import {
5
- WEBUI_SESSION_CHILD_CAPABILITIES
6
- } from "./chunk-GPPRNAKW.js";
7
4
  import {
8
5
  createKanbanRunMirror
9
6
  } from "./chunk-VCYZ3WZV.js";
7
+ import {
8
+ WEBUI_SESSION_CHILD_CAPABILITIES
9
+ } from "./chunk-GPPRNAKW.js";
10
10
  import {
11
11
  startCliHqConnection
12
12
  } from "./chunk-TE3Q32JP.js";
@@ -1951,4 +1951,4 @@ async function runWebUI(opts) {
1951
1951
  export {
1952
1952
  runWebUI
1953
1953
  };
1954
- //# sourceMappingURL=webui-server-T6AMOXJJ.js.map
1954
+ //# sourceMappingURL=webui-server-5R35BHWZ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
6
6
  "keywords": [
@@ -41,36 +41,36 @@
41
41
  "data"
42
42
  ],
43
43
  "dependencies": {
44
- "@wrongstack/acp": "1.0.0",
45
- "@wrongstack/bench": "1.0.0",
46
- "@wrongstack/core": "1.0.0",
47
- "@wrongstack/primitives": "1.0.0",
48
- "@wrongstack/kanban": "1.0.0",
49
- "@wrongstack/mcp": "1.0.0",
50
- "@wrongstack/persistence": "1.0.0",
51
- "@wrongstack/plug-lsp": "1.0.0",
52
- "@wrongstack/plugins": "1.0.0",
53
- "@wrongstack/providers": "1.0.0",
54
- "@wrongstack/requirement-intake": "1.0.0",
55
- "@wrongstack/runtime": "1.0.0",
56
- "@wrongstack/sage": "1.0.0",
57
- "@wrongstack/sdd": "1.0.0",
58
- "@wrongstack/security-scanner": "1.0.0",
59
- "@wrongstack/simpleui": "1.0.0",
60
- "@wrongstack/techstack": "1.0.0",
61
- "@wrongstack/telegram": "1.0.0",
62
- "@wrongstack/tools": "1.0.0",
63
- "@wrongstack/tui": "1.0.0",
44
+ "@wrongstack/acp": "1.0.1",
45
+ "@wrongstack/bench": "1.0.1",
46
+ "@wrongstack/core": "1.0.1",
47
+ "@wrongstack/primitives": "1.0.1",
48
+ "@wrongstack/kanban": "1.0.1",
49
+ "@wrongstack/mcp": "1.0.1",
50
+ "@wrongstack/persistence": "1.0.1",
51
+ "@wrongstack/plug-lsp": "1.0.1",
52
+ "@wrongstack/plugins": "1.0.1",
53
+ "@wrongstack/providers": "1.0.1",
54
+ "@wrongstack/requirement-intake": "1.0.1",
55
+ "@wrongstack/runtime": "1.0.1",
56
+ "@wrongstack/sage": "1.0.1",
57
+ "@wrongstack/sdd": "1.0.1",
58
+ "@wrongstack/security-scanner": "1.0.1",
59
+ "@wrongstack/simpleui": "1.0.1",
60
+ "@wrongstack/techstack": "1.0.1",
61
+ "@wrongstack/telegram": "1.0.1",
62
+ "@wrongstack/tools": "1.0.1",
63
+ "@wrongstack/tui": "1.0.1",
64
64
  "@wrongstack/vector-memory": "1.0.0",
65
- "@wrongstack/webui": "1.0.0",
66
- "@wrongstack/webui-hq": "1.0.0",
67
- "@wrongstack/webui-protocol": "1.0.0",
68
- "@wrongstack/wrongtrace": "1.0.0",
69
- "@wrongstack/webui-server": "1.0.0",
65
+ "@wrongstack/webui": "1.0.1",
66
+ "@wrongstack/webui-hq": "1.0.1",
67
+ "@wrongstack/webui-protocol": "1.0.1",
68
+ "@wrongstack/wrongtrace": "1.0.1",
69
+ "@wrongstack/webui-server": "1.0.1",
70
70
  "ws": "^8.21.3"
71
71
  },
72
72
  "optionalDependencies": {
73
- "@wrongstack/desktop": "1.0.0"
73
+ "@wrongstack/desktop": "1.0.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/node": "^26.2.0",