@wrongstack/cli 0.282.2 → 0.283.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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { CODEX_MODELS, color, ToolCapabilities, PHASE_EVENT_NAMES, readBundledInstructionText, writeErr, loadPlugins, renderProgress, SpecStore, TaskGraphStore, analyzeCriticalPath, getTemplate, listTemplates, templateToMarkdown, SpecParser, renderSpecAnalysis, AISpecBuilder, expectDefined, DefaultTaskStore, TaskTracker, renderTaskGraph, withFileLock, ConfigError, resolveHqDataDir, ensureHqFirstRunAuthFile, DEFAULT_HQ_REDACTION_POLICY, createHqPersistence, HqCommandAuditLog, HqAlertEngine, toAlertMessage, validateHqCommand, watchHqAuthFile, parseHqFrame, HQ_PROTOCOL_VERSION, parseHqEventPayload, scrubAndTruncateHqPreview, FetchError, removeColumn, addColumn, getTask, removeTask, getBoard, assignTask, updateTaskAssignment, listBoards, updateGoalMetricOnTask, addGoalMetricToTask, releaseTaskClaim, claimReadyTask, getTaskChain, setTaskChain, copyTaskToBoard, transferTaskToBoard, moveTask, updateTask, mergeTasks, splitTask, addTask, syncBoardFromTaskGraph, deserializeTaskGraph, exportBoardToTaskGraph, serializeTaskGraph, getKanbanOrchestrationSnapshot, listReadyTasks, generateBoardFromDescription, createBoard, parseLinesIntoTasks, removeBoard, duplicateBoard, updateBoard, wstackGlobalRoot, DefaultSecretScrubber, resolveWstackPaths, watchProviderConfig, TOKENS, PromptUsageStore, ToolRegistry, GlobalMailbox, resolveSessionLoggingConfig, createSessionEventBridge, HookRegistry, HookRunner, shellHooksEqual, countShellHooks, normalizeTokenSavingTier, allServers as allServers$1, SlashCommandRegistry, attachDepWatcherBridge, createFallbackModelExtension, SessionMemoryConsolidator, BrainDecisionQueue, ObservableBrainArbiter, HumanEscalatingBrainArbiter, createTieredBrainArbiter, DefaultBrainArbiter, BrainMonitor, mailboxSessionTag, createDelegateTool, FLEET_ROSTER, createMcpControlTool, startTechStackConsumer, startPackageOutdatedWatcher, SddRunRegistry, recordFileAction, createAutonomyBrain, DefaultPluginAPI, SpecVersioning, buildTranscriptFromEvents, DefaultLogger, DefaultModelsRegistry, isStdinTTY, FsError, atomicWrite, EventBus, runProviderWithRetry, ReplayLogStore, ReplayProviderRunner, mergeCustomModelDefs, DefaultSystemPromptBuilder, makeAutonomyPromptContributor, sessionScopedPath as sessionScopedPath$1, createContextManagerTool, makeMailboxTool, makeMailSendTool, makeMailInboxTool, makeFleetStatusTool, applyToolDescriptionModes, applyToolResultRenderModes, InMemoryMetricsSink, wireMetricsToEvents, DefaultHealthRegistry, startMetricsServer, createHqPublisherFromEnv, DEFAULT_SESSION_PRUNE_DAYS, RecoveryLock, DefaultAttachmentStore, Context, QueueStore, loadTodosCheckpoint, attachTodosCheckpoint, loadDirectorState, loadPlan, createDefaultPipelines, applyModelRuntime, installDesignStudioMiddleware, resolveContextWindowPolicy, resolveAuditLevel, AutoCompactionMiddleware, estimateRequestTokensCalibrated, Agent, FleetManager, makeDirectorSessionFactory, WorktreeManager, Director, makeFleetEmitTool, AdaptiveConcurrencyController, resolveSubagentModelTarget, DEFAULT_SUBAGENT_BASELINE, AutoApprovePermissionPolicy, mergeModelRuntime, ToolValidationError, WIDE_SUBAGENT_CAPABILITIES, resolveProjectDir, FleetSupervisor, AgentError, PhaseStore, PhaseOrchestrator, assignNickname, AutoPhasePlanner, PhaseGraphBuilder, makeLLMClassifier, writeOut, ParallelEternalEngine, EternalAutonomyEngine, CHIMERA_REVIEW_PROMPT, setQueuedMessagesSnapshot, bootConfig as bootConfig$1, setOutputLineGuard, setRawMode, DefaultSessionReader, ToolAuditLog, DefaultSessionRewinder, DefaultSessionStore, ProviderRegistry, makePreferSideConflictResolver, makeAgentSubagentRunner, NULL_FLEET_BUS, ERROR_CODES, buildChildEnv, exportBoardAsMarkdown, formatContextWindowModeList, repairToolUseAdjacency, getContextWindowMode, AGENT_CATALOG, dispatchAgent, normalizeToolDescriptionMode, getToolDescriptionMode, noOpVault, formatTodosList, loadTasks, formatTaskList, formatTaskProgress, mutateTasks, emptyPlan, addPlanItem, savePlan, formatPlan, recordCompletedWorkEvidence, saveCompletedWorkCheckpoint, SessionRecovery, loadGoal, goalFilePath, summarizeUsage, saveGoal, formatGoal, emptyGoal, buildGoalPreamble, pendingBtwCount, setBtwNote, getDesignKitLoader, getDesignState, clearActiveKit, clearPersistedActiveKit, recordOverrides, setDesignOverrides, loadActiveKit, isDesignStack, applyTokenOverrides, materializeTokens, setActiveKit, readHqRuntimeFileSync, resolveHqConfig, MATRIX_PHASE_KEYS, matrixKeyKind, phaseForRole, resolveModelMatrix, resolveModelTargetFromEntry, fallbackProfileChain, parseModelRef, normalizeModelRef, onResize, hasOpenTodos, InputBuilder, DefaultSecretVault as DefaultSecretVault$1, decryptConfigSecrets as decryptConfigSecrets$1, encryptConfigSecrets as encryptConfigSecrets$1, DEFAULT_CONTEXT_WINDOW_MODE_ID, HQ_AUTH_FILE_VERSION, truncate, createBoardFromTaskGraph, addDependency, addNoteToTask, addCheckToTask, estimateMessageTokens, AGENTS_BY_PHASE, validateAgainstSchema, normalizeToolResultRenderMode, getToolResultRenderMode, setToolResultRenderMode, resolveMailboxIdentity, smartDefaultFallbackChain, AutonomousCoordinator, mutateHqAuthFile, mintHqToken, readHqAuthFile, areDependenciesMet, findBlockedTasks, renderInstructionTemplate, recentTextTurns, gatedEnhancerReasoning, enhanceUserPrompt, mutatePlan, setPlanItemStatus, getPlanTemplate, resolveProviderModelList, ParseError, startSessionTelemetryBridge, startFleetTelemetryBridge, startBrainTelemetryBridge, startWorktreeTelemetryBridge, startToolTelemetryBridge, startCostTelemetryBridge } from '@wrongstack/core';
2
+ import { CODEX_MODELS, color, ToolCapabilities, PHASE_EVENT_NAMES, readBundledInstructionText, writeErr, loadPlugins, renderProgress, SpecStore, TaskGraphStore, analyzeCriticalPath, getTemplate, listTemplates, templateToMarkdown, SpecParser, renderSpecAnalysis, AISpecBuilder, expectDefined, DefaultTaskStore, TaskTracker, renderTaskGraph, withFileLock, ConfigError, resolveHqDataDir, ensureHqFirstRunAuthFile, DEFAULT_HQ_REDACTION_POLICY, createHqPersistence, HqCommandAuditLog, HqAlertEngine, toAlertMessage, validateHqCommand, watchHqAuthFile, parseHqFrame, HQ_PROTOCOL_VERSION, parseHqEventPayload, scrubAndTruncateHqPreview, FetchError, removeColumn, addColumn, getTask, removeTask, getBoard, assignTask, updateTaskAssignment, listBoards, updateGoalMetricOnTask, addGoalMetricToTask, releaseTaskClaim, claimReadyTask, getTaskChain, setTaskChain, copyTaskToBoard, transferTaskToBoard, moveTask, updateTask, mergeTasks, splitTask, addTask, syncBoardFromTaskGraph, deserializeTaskGraph, exportBoardToTaskGraph, serializeTaskGraph, getKanbanOrchestrationSnapshot, listReadyTasks, generateBoardFromDescription, createBoard, parseLinesIntoTasks, removeBoard, duplicateBoard, updateBoard, wstackGlobalRoot, DefaultSecretScrubber, resolveWstackPaths, watchProviderConfig, TOKENS, PromptUsageStore, ToolRegistry, GlobalMailbox, resolveSessionLoggingConfig, createSessionEventBridge, HookRegistry, HookRunner, shellHooksEqual, countShellHooks, normalizeTokenSavingTier, allServers as allServers$1, SlashCommandRegistry, attachDepWatcherBridge, createFallbackModelExtension, SessionMemoryConsolidator, BrainDecisionQueue, ObservableBrainArbiter, HumanEscalatingBrainArbiter, createTieredBrainArbiter, DefaultBrainArbiter, BrainMonitor, mailboxSessionTag, createDelegateTool, FLEET_ROSTER, createMcpControlTool, startTechStackConsumer, startPackageOutdatedWatcher, SddRunRegistry, recordFileAction, createAutonomyBrain, DefaultPluginAPI, SpecVersioning, buildTranscriptFromEvents, DefaultLogger, DefaultModelsRegistry, isStdinTTY, FsError, atomicWrite, EventBus, runProviderWithRetry, ReplayLogStore, ReplayProviderRunner, mergeCustomModelDefs, DefaultSystemPromptBuilder, makeAutonomyPromptContributor, sessionScopedPath as sessionScopedPath$1, createContextManagerTool, makeMailboxTool, makeMailSendTool, makeMailInboxTool, makeFleetStatusTool, applyToolDescriptionModes, applyToolResultRenderModes, InMemoryMetricsSink, wireMetricsToEvents, DefaultHealthRegistry, startMetricsServer, createHqPublisherFromEnv, DEFAULT_SESSION_PRUNE_DAYS, RecoveryLock, DefaultAttachmentStore, Context, QueueStore, loadTodosCheckpoint, attachTodosCheckpoint, loadDirectorState, loadPlan, createDefaultPipelines, applyModelRuntime, installDesignStudioMiddleware, resolveContextWindowPolicy, resolveAuditLevel, AutoCompactionMiddleware, estimateRequestTokensCalibrated, Agent, FleetManager, makeDirectorSessionFactory, WorktreeManager, Director, makeFleetEmitTool, AdaptiveConcurrencyController, resolveSubagentModelTarget, DEFAULT_SUBAGENT_BASELINE, AutoApprovePermissionPolicy, mergeModelRuntime, ToolValidationError, WIDE_SUBAGENT_CAPABILITIES, resolveProjectDir, FleetSupervisor, AgentError, PhaseStore, PhaseOrchestrator, assignNickname, AutoPhasePlanner, PhaseGraphBuilder, makeLLMClassifier, writeOut, ParallelEternalEngine, EternalAutonomyEngine, CHIMERA_REVIEW_PROMPT, setQueuedMessagesSnapshot, bootConfig as bootConfig$1, setOutputLineGuard, setRawMode, DefaultSessionReader, ToolAuditLog, DefaultSessionRewinder, DefaultSessionStore, ProviderRegistry, makePreferSideConflictResolver, makeAgentSubagentRunner, NULL_FLEET_BUS, ERROR_CODES, buildChildEnv, exportBoardAsMarkdown, formatContextWindowModeList, repairToolUseAdjacency, getContextWindowMode, AGENT_CATALOG, dispatchAgent, normalizeToolDescriptionMode, getToolDescriptionMode, noOpVault, formatTodosList, loadTasks, formatTaskList, formatTaskProgress, mutateTasks, emptyPlan, addPlanItem, savePlan, formatPlan, recordCompletedWorkEvidence, saveCompletedWorkCheckpoint, SessionRecovery, loadGoal, goalFilePath, summarizeUsage, saveGoal, formatGoal, emptyGoal, buildGoalPreamble, pendingBtwCount, setBtwNote, getDesignKitLoader, getDesignState, clearActiveKit, clearPersistedActiveKit, recordOverrides, setDesignOverrides, loadActiveKit, isDesignStack, applyTokenOverrides, materializeTokens, setActiveKit, readHqRuntimeFileSync, resolveHqConfig, MATRIX_PHASE_KEYS, matrixKeyKind, phaseForRole, resolveModelMatrix, resolveModelTargetFromEntry, fallbackProfileChain, parseModelRef, normalizeModelRef, onResize, hasOpenTodos, InputBuilder, detectContinueIntent, resolveContinuation, DefaultSecretVault as DefaultSecretVault$1, decryptConfigSecrets as decryptConfigSecrets$1, encryptConfigSecrets as encryptConfigSecrets$1, DEFAULT_CONTEXT_WINDOW_MODE_ID, HQ_AUTH_FILE_VERSION, truncate, createBoardFromTaskGraph, addDependency, addNoteToTask, addCheckToTask, estimateMessageTokens, AGENTS_BY_PHASE, validateAgainstSchema, normalizeToolResultRenderMode, getToolResultRenderMode, setToolResultRenderMode, resolveMailboxIdentity, smartDefaultFallbackChain, AutonomousCoordinator, mutateHqAuthFile, mintHqToken, readHqAuthFile, areDependenciesMet, findBlockedTasks, renderInstructionTemplate, recentTextTurns, gatedEnhancerReasoning, enhanceUserPrompt, mutatePlan, setPlanItemStatus, getPlanTemplate, resolveProviderModelList, ParseError, startSessionTelemetryBridge, startFleetTelemetryBridge, startBrainTelemetryBridge, startWorktreeTelemetryBridge, startToolTelemetryBridge, startCostTelemetryBridge } from '@wrongstack/core';
3
3
  import * as fs2 from 'fs/promises';
4
4
  import { access, readFile } from 'fs/promises';
5
5
  import { DefaultSecretVault, decryptConfigSecrets, encryptConfigSecrets, isSecretField } from '@wrongstack/core/security';
@@ -23916,15 +23916,15 @@ function buildModeCommand(opts) {
23916
23916
  " /mode Show current mode and available modes",
23917
23917
  " /mode <id> Switch to a different mode",
23918
23918
  "",
23919
- "Available modes:",
23920
- " default General-purpose coding assistant",
23921
- " brief Fast, no-nonsense \u2014 get to the point",
23922
- " teach Mentor mode \u2014 explains why, not just what",
23923
- " code-reviewer, code-auditor, architect, debugger, tester, devops, refactorer",
23919
+ "Available mode families:",
23920
+ " Token-saving: brief, review-lite, audit-lite, plan-lite, debug-lite, test-lite, refactor-lite, research-lite",
23921
+ " Deep/full: code-reviewer, code-auditor, architect, debugger, tester, devops, refactorer, ui-design, teach, research-web",
23924
23922
  "",
23925
- "Example:",
23926
- " /mode brief Switch to brief mode",
23927
- " /mode teach Switch to teach mode"
23923
+ "Examples:",
23924
+ " /mode brief Ultra-compact responses",
23925
+ " /mode review-lite Narrow changed-file review",
23926
+ " /mode code-reviewer Full correctness/security review",
23927
+ " /mode teach Mentor-style explanations"
23928
23928
  ].join("\n"),
23929
23929
  async run(args, ctx) {
23930
23930
  const modeStore = opts.modeStore;
@@ -25847,6 +25847,64 @@ function formatSuggestions(suggestions) {
25847
25847
  return lines.join("\n");
25848
25848
  }
25849
25849
 
25850
+ // src/slash-commands/surfaces.ts
25851
+ var DESKTOP_MESSAGE = [
25852
+ "WrongStack Desktop",
25853
+ "\u2500".repeat("WrongStack Desktop".length),
25854
+ "The desktop app is the local graphical shell for WrongStack sessions, project state, and agent coordination.",
25855
+ "",
25856
+ "Recommended path:",
25857
+ " Start it from your desktop launcher or from the platform-specific package you installed.",
25858
+ "",
25859
+ "Why this command only explains:",
25860
+ " A slash command runs inside the current CLI/TUI process, so silently launching a GUI is platform- and install-dependent. Keeping this informational avoids surprising side effects."
25861
+ ].join("\n");
25862
+ var WEBUI_MESSAGE = [
25863
+ "WrongStack Web UI",
25864
+ "\u2500".repeat("WrongStack Web UI".length),
25865
+ "The Web UI is the browser-based view for sessions, agents, mailbox coordination, and project activity.",
25866
+ "",
25867
+ "Recommended path:",
25868
+ " Start the Web UI/HQ server with the project command you normally use, then open the printed local URL in your browser.",
25869
+ "",
25870
+ "Why this command only explains:",
25871
+ " The active slash-command surface may not know which port, host, or Web UI package is running. Showing guidance is more reliable than guessing and opening the wrong target."
25872
+ ].join("\n");
25873
+ function buildDesktopCommand() {
25874
+ return {
25875
+ name: "desktop",
25876
+ category: "App",
25877
+ description: "Explain how to access the WrongStack Desktop app.",
25878
+ help: [
25879
+ "Usage:",
25880
+ " /desktop",
25881
+ "",
25882
+ "Shows where the Desktop app fits and why the CLI/TUI does not automatically launch it."
25883
+ ].join("\n"),
25884
+ async run() {
25885
+ return { message: DESKTOP_MESSAGE };
25886
+ }
25887
+ };
25888
+ }
25889
+ function buildWebuiCommand() {
25890
+ return {
25891
+ name: "webui",
25892
+ aliases: ["web"],
25893
+ category: "App",
25894
+ description: "Explain how to access the WrongStack browser UI.",
25895
+ help: [
25896
+ "Usage:",
25897
+ " /webui",
25898
+ " /web",
25899
+ "",
25900
+ "Shows Web UI access guidance without guessing whether a local server is already running."
25901
+ ].join("\n"),
25902
+ async run() {
25903
+ return { message: WEBUI_MESSAGE };
25904
+ }
25905
+ };
25906
+ }
25907
+
25850
25908
  // src/slash-commands/agents.ts
25851
25909
  init_helpers();
25852
25910
  function formatAgentLine(a) {
@@ -29085,7 +29143,7 @@ ${color.dim("No default chat set. You can add it later: /telegram-setup <token>
29085
29143
  `${color.amber("\u26A0")} Restart WrongStack for the plugin to pick up the new config.`,
29086
29144
  "",
29087
29145
  "After restart, try:",
29088
- ` ${color.cyan("/telegram:status")} \u2014 check bot connection`,
29146
+ ` ${color.cyan("/telegram")} \u2014 check bot connection`,
29089
29147
  ` ${color.cyan("/telegram:send")} \u2014 send a test message`
29090
29148
  ].join("\n")
29091
29149
  };
@@ -29221,6 +29279,7 @@ function buildToolCommand(opts) {
29221
29279
  " /tool <name> result simple|extend Set ONLY the on-screen result mode",
29222
29280
  " /tool disable <name> Hide a tool from the registry and system prompt",
29223
29281
  " /tool enable <name> Restore a disabled tool",
29282
+ " /tool <name> disable|enable Same as above, noun-first alias",
29224
29283
  " /tool enable-all Restore all disabled tools",
29225
29284
  "",
29226
29285
  "Modes:",
@@ -29459,6 +29518,19 @@ function buildToolCommand(opts) {
29459
29518
  return { message: `${color.red("Error")}: ${toErrorMessage$1(err)}` };
29460
29519
  }
29461
29520
  }
29521
+ const action = parts[1]?.toLowerCase();
29522
+ if (action === "disable" || action === "enable") {
29523
+ if (parts.length > 2) {
29524
+ return {
29525
+ message: `${color.amber("Usage:")} /tool ${name} ${action}`
29526
+ };
29527
+ }
29528
+ try {
29529
+ return { message: action === "disable" ? await cmdDisable(name) : await cmdEnable(name) };
29530
+ } catch (err) {
29531
+ return { message: `${color.red("Error")}: ${toErrorMessage$1(err)}` };
29532
+ }
29533
+ }
29462
29534
  if (!opts.toolRegistry.get(name) && !opts.toolRegistry.isDisabled(name)) {
29463
29535
  return {
29464
29536
  message: `${color.red("Unknown tool")}: ${name}. Use ${color.dim("/tools")} to list registered tools.`
@@ -29539,7 +29611,7 @@ function buildToolsCommand(opts) {
29539
29611
  async run(args) {
29540
29612
  const reg = opts.toolRegistry;
29541
29613
  const filter = args.trim().toLowerCase();
29542
- const allTools = reg.listWithOwner();
29614
+ const allTools = [...reg.listWithOwner(), ...reg.listDisabled()];
29543
29615
  const all = filter ? allTools.filter(
29544
29616
  ({ tool, owner }) => tool.name.toLowerCase().includes(filter) || owner.toLowerCase().includes(filter)
29545
29617
  ) : allTools;
@@ -29769,6 +29841,8 @@ function buildYoloCommand(opts) {
29769
29841
  function buildBuiltinSlashCommands(opts) {
29770
29842
  return [
29771
29843
  buildHelpCommand(opts),
29844
+ buildDesktopCommand(),
29845
+ buildWebuiCommand(),
29772
29846
  buildInitCommand(opts),
29773
29847
  buildClearCommand(opts),
29774
29848
  buildInterruptCommand(opts),
@@ -38011,6 +38085,7 @@ function createSettingsAdapter(ctx) {
38011
38085
  restrictFsToRoot: resolvedRestrict,
38012
38086
  autoProceedMaxIterations: cfg.autonomy?.autoProceedMaxIterations ?? 50,
38013
38087
  debugStream: cfg.debugStream ?? false,
38088
+ shellBangWarningDontShowAgain: autonomy?.shellBangWarningDontShowAgain === true,
38014
38089
  statuslineMode: autonomy?.statuslineMode === "minimum" ? "minimum" : "detailed",
38015
38090
  thinkingWord: normalizeTuiThinkingWord(autonomy?.thinkingWord),
38016
38091
  animationStyle: normalizeAnimationStyle(autonomy?.animationStyle),
@@ -38031,7 +38106,7 @@ function createSettingsAdapter(ctx) {
38031
38106
  }
38032
38107
  async function saveSettings(s) {
38033
38108
  try {
38034
- if (s.mode !== void 0 || s.delayMs !== void 0 || s.titleAnimation !== void 0 || s.yolo !== void 0 || s.streamFleet !== void 0 || s.chime !== void 0 || s.confirmExit !== void 0 || s.mouseMode !== void 0 || s.featureMcp !== void 0 || s.featurePlugins !== void 0 || s.featureMemory !== void 0 || s.featureSkills !== void 0 || s.featureModelsRegistry !== void 0 || s.featureTokenSaving !== void 0 || s.allowOutsideProjectRoot !== void 0 || s.contextAutoCompact !== void 0 || s.contextStrategy !== void 0 || s.contextMode !== void 0 || s.maxConcurrent !== void 0 || s.logLevel !== void 0 || s.auditLevel !== void 0 || s.indexOnStart !== void 0 || s.maxIterations !== void 0 || s.restrictFsToRoot !== void 0 || s.nextPrediction !== void 0 || s.debugStream !== void 0 || s.configScope !== void 0 || s.enhanceDelayMs !== void 0 || s.enhanceEnabled !== void 0 || s.enhanceLanguage !== void 0 || s.midRunSendPicker !== void 0 || s.statuslineMode !== void 0 || s.thinkingWord !== void 0 || s.animationStyle !== void 0 || s.autonomyNextPrompt !== void 0 || s.autoProceedMaxIterations !== void 0 || s.reasoningMode !== void 0 || s.reasoningEffort !== void 0 || s.reasoningPreserve !== void 0 || s.cacheTtl !== void 0) {
38109
+ if (s.mode !== void 0 || s.delayMs !== void 0 || s.titleAnimation !== void 0 || s.yolo !== void 0 || s.streamFleet !== void 0 || s.chime !== void 0 || s.confirmExit !== void 0 || s.mouseMode !== void 0 || s.featureMcp !== void 0 || s.featurePlugins !== void 0 || s.featureMemory !== void 0 || s.featureSkills !== void 0 || s.featureModelsRegistry !== void 0 || s.featureTokenSaving !== void 0 || s.allowOutsideProjectRoot !== void 0 || s.contextAutoCompact !== void 0 || s.contextStrategy !== void 0 || s.contextMode !== void 0 || s.maxConcurrent !== void 0 || s.logLevel !== void 0 || s.auditLevel !== void 0 || s.indexOnStart !== void 0 || s.maxIterations !== void 0 || s.restrictFsToRoot !== void 0 || s.nextPrediction !== void 0 || s.debugStream !== void 0 || s.shellBangWarningDontShowAgain !== void 0 || s.configScope !== void 0 || s.enhanceDelayMs !== void 0 || s.enhanceEnabled !== void 0 || s.enhanceLanguage !== void 0 || s.midRunSendPicker !== void 0 || s.statuslineMode !== void 0 || s.thinkingWord !== void 0 || s.animationStyle !== void 0 || s.autonomyNextPrompt !== void 0 || s.autoProceedMaxIterations !== void 0 || s.reasoningMode !== void 0 || s.reasoningEffort !== void 0 || s.reasoningPreserve !== void 0 || s.cacheTtl !== void 0) {
38035
38110
  const configScope = s.configScope ?? configStore.get().configScope ?? "global";
38036
38111
  const targetPath = configScope === "project" && wpaths.inProjectConfig ? wpaths.inProjectConfig : wpaths.globalConfig;
38037
38112
  let raw;
@@ -38061,6 +38136,8 @@ function createSettingsAdapter(ctx) {
38061
38136
  if (s.enhanceEnabled !== void 0) autonomy.enhance = s.enhanceEnabled;
38062
38137
  if (s.enhanceLanguage !== void 0) autonomy.enhanceLanguage = s.enhanceLanguage;
38063
38138
  if (s.midRunSendPicker !== void 0) autonomy.midRunSendPicker = s.midRunSendPicker;
38139
+ if (s.shellBangWarningDontShowAgain !== void 0)
38140
+ autonomy.shellBangWarningDontShowAgain = s.shellBangWarningDontShowAgain;
38064
38141
  if (s.statuslineMode !== void 0) autonomy.statuslineMode = s.statuslineMode;
38065
38142
  if (s.thinkingWord !== void 0)
38066
38143
  autonomy.thinkingWord = normalizeTuiThinkingWord(s.thinkingWord);
@@ -38898,11 +38975,37 @@ ${color.dim(taskList2)}
38898
38975
  }
38899
38976
  continue;
38900
38977
  }
38901
- const ph = await builder.appendPaste(raw);
38902
- if (ph) {
38903
- const lineCount = raw.split("\n").length;
38904
- opts.renderer.write(color.dim(` \u21B3 ${ph} (${lineCount} lines)
38978
+ if (detectContinueIntent(trimmed)) {
38979
+ const resolved = resolveContinuation({
38980
+ todos: opts.agent.ctx.todos,
38981
+ suggestions: getSuggestions()
38982
+ });
38983
+ if (resolved.source === "open") {
38984
+ opts.renderer.write(
38985
+ ` ${color.amber("\u26A0")} ${color.bold("'continue' has no anchor")} ${color.dim("\u2014 no pending todo or suggestion.")}
38986
+ ` + color.dim(" If you proceed, I'll choose the next step from context; that can drift.\n")
38987
+ );
38988
+ const ans = (await opts.reader.readLine(color.dim(" Proceed anyway? [Y/n \xB7 e = type your own] "))).trim().toLowerCase();
38989
+ if (ans === "n" || ans === "no") {
38990
+ opts.renderer.write(color.dim(" Cancelled \u2014 nothing sent.\n"));
38991
+ continue;
38992
+ }
38993
+ if (ans === "e" || ans === "edit") {
38994
+ opts.renderer.write(color.dim(" Okay \u2014 type what to continue with.\n"));
38995
+ continue;
38996
+ }
38997
+ } else {
38998
+ opts.renderer.write(color.dim(` ${resolved.label}
38999
+ `));
39000
+ }
39001
+ builder.appendText(resolved.text);
39002
+ } else {
39003
+ const ph = await builder.appendPaste(raw);
39004
+ if (ph) {
39005
+ const lineCount = raw.split("\n").length;
39006
+ opts.renderer.write(color.dim(` \u21B3 ${ph} (${lineCount} lines)
38905
39007
  `));
39008
+ }
38906
39009
  }
38907
39010
  const blocks = await builder.submit();
38908
39011
  const sddContext = getActiveSDDContext();
@@ -42972,9 +43075,11 @@ function wireEventWiring(deps) {
42972
43075
  evOn("provider.fallback", (p) => {
42973
43076
  if (!isCurrentSession(p.sessionId)) return;
42974
43077
  stopSpinnerAndStreaming();
43078
+ const contextWarning = p.contextWindowWarning ? ` \u26A0 smaller context window: ${p.contextWindowWarning.fromMaxContext.toLocaleString("en-US")} \u2192 ${p.contextWindowWarning.toMaxContext.toLocaleString("en-US")} tokens${p.contextWindowWarning.currentTokens ? `; current request \u2248 ${p.contextWindowWarning.currentTokens.toLocaleString("en-US")} tokens (${Math.round(p.contextWindowWarning.currentTokens / p.contextWindowWarning.toMaxContext * 100)}% of new window)` : ""}
43079
+ ` : "";
42975
43080
  writeErr(
42976
43081
  color.yellow(` \u21BB rate-limited (${p.status}) \u2014 switched to ${p.to.providerId}/${p.to.model}
42977
- `)
43082
+ ${contextWarning}`)
42978
43083
  );
42979
43084
  spinner.start(color.dim(`${p.to.providerId}/${p.to.model} thinking\u2026`));
42980
43085
  });
@@ -45113,6 +45218,22 @@ Restart WrongStack to load or unload plugin code in this session.`;
45113
45218
  error: result.code === 0 ? void 0 : result.message
45114
45219
  };
45115
45220
  };
45221
+ const getToolPickerItems = () => {
45222
+ const rows = [...toolRegistry.listWithOwner(), ...toolRegistry.listDisabled()];
45223
+ return rows.map(({ tool, owner }) => {
45224
+ const descMode = getToolDescriptionMode(toolRegistry, tool.name);
45225
+ return {
45226
+ name: tool.name,
45227
+ owner,
45228
+ category: tool.category ?? "Other",
45229
+ enabled: !toolRegistry.isDisabled(tool.name),
45230
+ mutating: tool.mutating,
45231
+ permission: tool.permission,
45232
+ descMode,
45233
+ description: tool.description
45234
+ };
45235
+ });
45236
+ };
45116
45237
  const savedProviderCfg = config.providers?.[config.provider];
45117
45238
  return execute({
45118
45239
  agent,
@@ -45219,22 +45340,7 @@ Restart WrongStack to load or unload plugin code in this session.`;
45219
45340
  const items = await listMcp(deps);
45220
45341
  return { items: items.map((s) => ({ name: s.name, enabled: s.enabled, status: s.status, transport: s.transport, description: s.description, toolCount: s.tools.length, lazy: s.lazy })), message: `Restarted "${name}".`, error: void 0 };
45221
45342
  },
45222
- getToolsItems: () => {
45223
- const all = toolRegistry.listWithOwner().map(({ tool, owner }) => {
45224
- const descMode = getToolDescriptionMode(toolRegistry, tool.name);
45225
- return {
45226
- name: tool.name,
45227
- owner,
45228
- category: tool.category ?? "Other",
45229
- enabled: !toolRegistry.isDisabled(tool.name),
45230
- mutating: tool.mutating,
45231
- permission: tool.permission,
45232
- descMode,
45233
- description: tool.description
45234
- };
45235
- });
45236
- return all;
45237
- },
45343
+ getToolsItems: getToolPickerItems,
45238
45344
  onToolToggle: async (name) => {
45239
45345
  const disabled = new Set(config.tools?.disabledTools ?? []);
45240
45346
  const isCurrentlyDisabled = toolRegistry.isDisabled(name);
@@ -45248,18 +45354,8 @@ Restart WrongStack to load or unload plugin code in this session.`;
45248
45354
  const nextTools = { ...config.tools ?? {}, disabledTools: Array.from(disabled) };
45249
45355
  config = patchConfig(config, { tools: nextTools });
45250
45356
  configStore.update({ tools: nextTools });
45251
- const items = toolRegistry.listWithOwner().map(({ tool, owner }) => ({
45252
- name: tool.name,
45253
- owner,
45254
- category: tool.category ?? "Other",
45255
- enabled: !toolRegistry.isDisabled(tool.name),
45256
- mutating: tool.mutating,
45257
- permission: tool.permission,
45258
- descMode: getToolDescriptionMode(toolRegistry, tool.name),
45259
- description: tool.description
45260
- }));
45261
45357
  return {
45262
- items,
45358
+ items: getToolPickerItems(),
45263
45359
  message: isCurrentlyDisabled ? `Enabled "${name}".` : `Disabled "${name}".`,
45264
45360
  error: void 0
45265
45361
  };