@wrongstack/cli 1.1.2 → 1.1.4

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 (42) hide show
  1. package/dist/{acp-HCGUTFNE.js → acp-MZ5MQBFN.js} +13 -5
  2. package/dist/acp-leader/acp-leader-confirm.d.ts +18 -0
  3. package/dist/acp-leader/acp-leader-context.d.ts +29 -0
  4. package/dist/acp-leader/acp-leader-fleet.d.ts +26 -0
  5. package/dist/acp-leader/acp-leader-host-binding.d.ts +16 -0
  6. package/dist/acp-leader/acp-leader-host.d.ts +80 -0
  7. package/dist/acp-leader/acp-leader-picker.d.ts +21 -0
  8. package/dist/acp-leader/acp-leader-provider.d.ts +85 -0
  9. package/dist/acp-leader/acp-leader-resume.d.ts +10 -0
  10. package/dist/acp-leader/acp-leader-stream.d.ts +82 -0
  11. package/dist/{auth-ANOVZVHE.js → auth-IHQS6AFW.js} +60 -64
  12. package/dist/auth-menu/index.d.ts +1 -2
  13. package/dist/boot/dispatch-webui.d.ts +16 -0
  14. package/dist/{chunk-GRAGMA4B.js → chunk-2LTHDKZX.js} +4 -4
  15. package/dist/chunk-3LEIFO5D.js +65 -0
  16. package/dist/chunk-COGI7EQU.js +1458 -0
  17. package/dist/chunk-GKGWPFW2.js +50 -0
  18. package/dist/{chunk-RAWHRRUJ.js → chunk-I5LJLKA3.js} +198 -197
  19. package/dist/{chunk-5TRZZHMN.js → chunk-JCZ2D3VV.js} +4 -65
  20. package/dist/{chunk-XT3NAHRX.js → chunk-JKTJSLUT.js} +192 -1
  21. package/dist/{chunk-NMXQFQ26.js → chunk-TAE3EGBM.js} +3 -3
  22. package/dist/{chunk-3R3OADC5.js → chunk-ZF4HRR5F.js} +7 -3
  23. package/dist/{cli-context-YIT4FEDM.js → cli-context-E44HQ4ZO.js} +13 -7
  24. package/dist/{cli-main-JIADJ5OL.js → cli-main-OT63I2FX.js} +452 -217
  25. package/dist/{execution-BAP566QC.js → execution-OK34CJKJ.js} +7 -2
  26. package/dist/fleet/acp-live-steer.d.ts +28 -0
  27. package/dist/fleet/acp-permission-bridge.d.ts +49 -0
  28. package/dist/fleet/acp-quota-hold.d.ts +3 -0
  29. package/dist/fleet/acp-quota-reading.d.ts +3 -0
  30. package/dist/fleet/acp-turn-reminders.d.ts +15 -0
  31. package/dist/fleet/acp-wrongstack-bridge.d.ts +42 -0
  32. package/dist/fleet/host-acp.d.ts +20 -2
  33. package/dist/index.js +7 -4
  34. package/dist/{mcp-2XWBJEQN.js → mcp-W7A5HUXV.js} +97 -1
  35. package/dist/mcp-serve-project.d.ts +18 -0
  36. package/dist/{per-subcommand-help-D6J4ZXW2.js → per-subcommand-help-4GYSCMLU.js} +2 -2
  37. package/dist/{short-circuit-flags-CPCT5MWB.js → short-circuit-flags-QEXUS3BY.js} +2 -2
  38. package/dist/{subcommands-VTMIZQBP.js → subcommands-YADUV7IJ.js} +2 -2
  39. package/dist/{webui-server-HIUY3RHD.js → webui-server-CB64CFDG.js} +41 -3
  40. package/package.json +34 -30
  41. package/dist/auth-menu/anthropic-oauth.d.ts +0 -43
  42. package/dist/chunk-ZNNFEKDZ.js +0 -319
@@ -147,64 +147,6 @@ function renderPayloadPreview(input) {
147
147
  return typeof diff === "string" && diff ? clipPreview(diff, diffLineStyle) : "";
148
148
  }
149
149
 
150
- // src/boot/restricted-mode.ts
151
- import { lockToProjectRoot, lockYoloOff, ToolCapabilities } from "@wrongstack/core/security";
152
- var RESTRICTED_ENV = "WRONGSTACK_RESTRICTED";
153
- var RESTRICTED_DENY_CAPABILITIES = [
154
- ToolCapabilities.SHELL_ARBITRARY,
155
- ToolCapabilities.SHELL_RESTRICTED,
156
- ToolCapabilities.SHELL_EXEC,
157
- ToolCapabilities.NET_OUTBOUND,
158
- ToolCapabilities.PACKAGE_INSTALL,
159
- ToolCapabilities.CONFIG_MUTATE,
160
- ToolCapabilities.FS_WRITE_OUTSIDE_PROJECT,
161
- ToolCapabilities.TOOL_MUTATE_ANY,
162
- ToolCapabilities.MCP_PROXY
163
- ];
164
- var CONFLICTING_FLAGS = [
165
- "yolo",
166
- "yolo-plus",
167
- "yolo-destructive",
168
- "full-auto",
169
- "mcp-config",
170
- // Pre-approving a tool would let writes skip the prompt this mode promises.
171
- "allowed-tools"
172
- ];
173
- function isRestrictedMode(flags) {
174
- return flags["restricted"] === true || process.env[RESTRICTED_ENV] === "1";
175
- }
176
- function validateRestrictedMode(flags) {
177
- if (!isRestrictedMode(flags)) return false;
178
- const conflict = CONFLICTING_FLAGS.find(
179
- (name) => flags[name] !== void 0 && flags[name] !== false
180
- );
181
- if (conflict) throw new Error(`--${conflict} cannot be combined with --restricted`);
182
- return true;
183
- }
184
- function withRestrictedTools(restriction, restricted) {
185
- if (!restricted) return restriction;
186
- return {
187
- ...restriction?.only ? { only: restriction.only } : {},
188
- deny: [...restriction?.deny ?? [], "mcp__*"],
189
- denyCapabilities: RESTRICTED_DENY_CAPABILITIES,
190
- requireDeclaredCapabilities: true
191
- };
192
- }
193
- var RESTRICTED_NOTICE = "Restricted mode: no shell, network, installs or MCP tools; files stay inside the project; YOLO is off.";
194
- var announced = false;
195
- function activateRestrictedMode(flags, write) {
196
- if (!validateRestrictedMode(flags)) return false;
197
- lockToProjectRoot();
198
- lockYoloOff();
199
- process.env[RESTRICTED_ENV] = "1";
200
- if (!announced) {
201
- announced = true;
202
- write(`${RESTRICTED_NOTICE}
203
- `);
204
- }
205
- return true;
206
- }
207
-
208
150
  // src/boot/safe-mode.ts
209
151
  var SAFE_MODE_ENV = "WRONGSTACK_SAFE_MODE";
210
152
  function isSafeMode(flags) {
@@ -216,11 +158,11 @@ function propagateSafeMode(flags) {
216
158
  return on;
217
159
  }
218
160
  var SAFE_MODE_NOTICE = "Safe mode: third-party plugins, hooks, configured MCP servers, skills and instruction overrides are off.";
219
- var announced2 = false;
161
+ var announced = false;
220
162
  function announceSafeMode(flags, write) {
221
163
  const on = propagateSafeMode(flags);
222
- if (on && !announced2) {
223
- announced2 = true;
164
+ if (on && !announced) {
165
+ announced = true;
224
166
  write(`${SAFE_MODE_NOTICE}
225
167
  `);
226
168
  }
@@ -597,9 +539,6 @@ export {
597
539
  resolveLaunchAllowedTools,
598
540
  resolveToolRestriction,
599
541
  unknownRestrictedToolNames,
600
- isRestrictedMode,
601
- withRestrictedTools,
602
- activateRestrictedMode,
603
542
  isSafeMode,
604
543
  announceSafeMode,
605
544
  isSimpleUiFullAuto,
@@ -608,4 +547,4 @@ export {
608
547
  detectProjectFacts,
609
548
  renderAgentsTemplate
610
549
  };
611
- //# sourceMappingURL=chunk-5TRZZHMN.js.map
550
+ //# sourceMappingURL=chunk-JCZ2D3VV.js.map
@@ -1,4 +1,192 @@
1
1
 
2
+ // src/fleet/acp-wrongstack-bridge.ts
3
+ import { statSync } from "node:fs";
4
+ import { join } from "node:path";
5
+ import { findAgentDescriptor, REGISTRY_ID_ALIASES } from "@wrongstack/acp";
6
+ import { cliSpawnArgs, isStandaloneBinary } from "@wrongstack/core/utils";
7
+ var DEFAULT_BRIDGE_AGENTS = ["claude-code"];
8
+ var DEFAULT_BRIDGE_SERVERS = [
9
+ "codebase-index",
10
+ "sage",
11
+ "mailbox",
12
+ "kanban"
13
+ ];
14
+ function wstackLaunch(args, entry = process.argv[1]) {
15
+ if (isStandaloneBinary() || entry && /wstack|wrongstack|index\.(js|ts|mjs|cjs)$/.test(entry)) {
16
+ return { command: process.execPath, args: cliSpawnArgs(entry ?? "", args) };
17
+ }
18
+ return { command: "wstack", args };
19
+ }
20
+ var SERVER_NAMES = {
21
+ sage: "wrongstack-sage",
22
+ mailbox: "wrongstack-mailbox",
23
+ kanban: "wrongstack-kanban",
24
+ "codebase-index": "wrongstack-index",
25
+ "requirement-intake": "wrongstack-intake"
26
+ };
27
+ var SERVER_NOTES = {
28
+ sage: () => "- wrongstack-sage: the project's shared memory. Recall what is relevant before you start; when you learn something durable (a decision, a gotcha, a convention), propose it with memory_candidates (WrongStack reviews proposals).",
29
+ mailbox: (delegated) => "- wrongstack-mailbox: the project's agent mailbox, already signed in as you. Send progress, blockers and questions to " + (delegated ? '"@session" (the WrongStack session that delegated this task), ' : '"all" (the agents working in this project), ') + '(a send needs a type, e.g. "note"), check unread mail during long work, and acknowledge what you handle.',
30
+ kanban: () => "- wrongstack-kanban: the project's board. If the task names a card, keep its status current. Lists return only the most recently updated (pass limit for more); use the stats action for totals and workbench for what is in flight.",
31
+ "codebase-index": () => "- wrongstack-index: a prebuilt, ranked symbol index of this repository, kept fresh by WrongStack. Prefer it over grep/glob and whole-file reads for code navigation: codebase_search (where something is defined), codebase_incoming_calls / codebase_outgoing_calls (callers, callees), codebase_read_symbol (one symbol's source), codebase_skeleton (a file or folder outline), codebase_impact_analysis (what a change affects), codebase_context (files relevant to a task), codebase_repo_map (overview). Use grep for literal text such as strings, comments and config values.",
32
+ "requirement-intake": () => "- wrongstack-intake: the project's requirements intake. List open requests; file a new one when you are handed an unrecorded software request."
33
+ };
34
+ function serviceWorkflow(servers) {
35
+ return [
36
+ ...servers.includes("codebase-index") ? [
37
+ "Use wrongstack-index first for code navigation; use your file tools for edits, exact",
38
+ "literal searches, and verification. Start a code task with",
39
+ "mcp__wrongstack-index__codebase_context (task description); for a named symbol use",
40
+ "mcp__wrongstack-index__codebase_search. If the index lacks a result, fall back to your tools."
41
+ ] : [],
42
+ ...servers.includes("sage") ? [
43
+ "Recall relevant decisions from wrongstack-sage before substantial work; propose durable",
44
+ "findings to memory_candidates after verification. Start with",
45
+ "mcp__wrongstack-sage__memory_search using the task topic."
46
+ ] : [],
47
+ ...servers.includes("mailbox") ? [
48
+ "Check wrongstack-mailbox for unread messages when starting and during long work;",
49
+ 'use mcp__wrongstack-mailbox__mailbox_read with action "inbox" to read your',
50
+ "messages. Send meaningful",
51
+ "progress or blockers and acknowledge messages you handle."
52
+ ] : [],
53
+ ...servers.includes("kanban") ? [
54
+ "Use wrongstack-kanban when work is tied to a board task; inspect its current state",
55
+ "with mcp__wrongstack-kanban__kanban_read and update it as work progresses."
56
+ ] : [],
57
+ "If a project service is unavailable, continue with available tools and report the gap."
58
+ ];
59
+ }
60
+ function bridgeTaskKickoff(servers) {
61
+ return [
62
+ "Project-service kickoff for this task:",
63
+ ...servers.includes("codebase-index") ? ["First use mcp__wrongstack-index__codebase_context to locate relevant code."] : [],
64
+ ...servers.includes("sage") ? ["Use mcp__wrongstack-sage__memory_search for prior project guidance."] : [],
65
+ ...servers.includes("mailbox") ? ['Check mcp__wrongstack-mailbox__mailbox_read with action "inbox".'] : [],
66
+ ...servers.includes("kanban") ? ["If the task names a board card, inspect it with mcp__wrongstack-kanban__kanban_read."] : [],
67
+ "Then use file and other tools as the task requires."
68
+ ].join("\n");
69
+ }
70
+ function serverArgs(server, projectRoot, ctx) {
71
+ const actor = ctx.subagentId;
72
+ const base = ["mcp", "serve", server, `--project-root=${projectRoot}`];
73
+ switch (server) {
74
+ case "sage":
75
+ return [...base, `--origin=${actor}`];
76
+ case "mailbox": {
77
+ const name = ctx.config.name ?? actor;
78
+ return [
79
+ ...base,
80
+ `--actor=${actor}`,
81
+ `--name=${name}`,
82
+ ...ctx.config.role ? [`--role=${ctx.config.role}`] : [],
83
+ ...ctx.sessionId ? [`--session-id=${ctx.sessionId}`] : [],
84
+ // Switch last: the global parser would read a following word as its value.
85
+ "--writable"
86
+ ];
87
+ }
88
+ case "kanban":
89
+ return [...base, `--actor=${actor}`, "--writable"];
90
+ case "codebase-index":
91
+ return [...base, "--watch"];
92
+ case "requirement-intake":
93
+ return [...base, "--writable"];
94
+ }
95
+ }
96
+ function bridgeNote(servers, delegated = true) {
97
+ return [
98
+ "You are working as a delegated worker inside a WrongStack project.",
99
+ "WrongStack is the orchestrator the user runs: it sent you this task and receives your",
100
+ "final reply, so end with a clear summary of what you did and what is left.",
101
+ ...delegated ? [
102
+ "While you work, the WrongStack session can steer you: such a message arrives as a",
103
+ 'user message starting with "[WrongStack <kind> from <agent>]". Treat it as coming',
104
+ "from the user who delegated the task, and answer what it asks."
105
+ ] : [],
106
+ "",
107
+ "WrongStack's project services are available as MCP servers:",
108
+ ...servers.map((s) => SERVER_NOTES[s](delegated)),
109
+ "",
110
+ ...serviceWorkflow(servers),
111
+ "",
112
+ "WrongStack applies the user's rules to your edits and commands. A refused permission",
113
+ "comes from them (a deny rule the user wrote, a history-rewriting git command, a",
114
+ "credential read): do not retry it or work around it; finish what you can and name what",
115
+ "was refused in your final reply."
116
+ ].join("\n");
117
+ }
118
+ function leaderBridgeNote(servers) {
119
+ return [
120
+ "You are the leader of a WrongStack session. The user talks to you through WrongStack",
121
+ "(its terminal UI or web UI), which shows your replies, your tool calls and their results.",
122
+ "",
123
+ "WrongStack's project services are available as MCP servers:",
124
+ ...servers.map((s) => SERVER_NOTES[s](false)),
125
+ "",
126
+ ...serviceWorkflow(servers),
127
+ "",
128
+ "WrongStack applies the user's rules to your edits and commands and asks the user when one",
129
+ "needs approval. A refused permission is the user's decision or rule: do not retry it or",
130
+ "work around it.",
131
+ "",
132
+ "When you finish a turn and a concrete follow-on action exists, end your reply with a",
133
+ "<nextsteps> block of 1-4 exact prompts the user can send back to you, one per numbered",
134
+ "line, for example:",
135
+ "<nextsteps>",
136
+ "1. Run the package tests and fix any failure",
137
+ "</nextsteps>",
138
+ "When the work is done, end with <nextsteps-complete/> instead."
139
+ ].join("\n");
140
+ }
141
+ function onPath(command, env = process.env, platform = process.platform) {
142
+ const pathVar = env.PATH ?? env.Path ?? "";
143
+ const exts = platform === "win32" ? ["", ...(env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";")] : [""];
144
+ const sep = platform === "win32" ? ";" : ":";
145
+ for (const dir of pathVar.split(sep)) {
146
+ if (!dir) continue;
147
+ for (const ext of exts) {
148
+ try {
149
+ if (statSync(join(dir, command + ext)).isFile()) return true;
150
+ } catch {
151
+ }
152
+ }
153
+ }
154
+ return false;
155
+ }
156
+ function installedBridgeAgents(acp, isOnPath = (c) => onPath(c)) {
157
+ if ((acp?.bridge?.servers ?? DEFAULT_BRIDGE_SERVERS).length === 0) return [];
158
+ const toCatalogId = new Map(Object.entries(REGISTRY_ID_ALIASES).map(([c, r]) => [r, c]));
159
+ const out = [];
160
+ for (const listed of acp?.bridge?.agents ?? DEFAULT_BRIDGE_AGENTS) {
161
+ const id = findAgentDescriptor(listed) ? listed : toCatalogId.get(listed) ?? listed;
162
+ if (out.includes(id)) continue;
163
+ const probe = findAgentDescriptor(id)?.probe.command;
164
+ if (acp?.agents?.[id] || acp?.agents?.[listed] || probe && isOnPath(probe)) out.push(id);
165
+ }
166
+ return out;
167
+ }
168
+ function wrongstackBridgeSetup(agentId, projectRoot, config, role = "worker") {
169
+ const agents = config?.agents ?? DEFAULT_BRIDGE_AGENTS;
170
+ if (!agents.some((a) => a === agentId || REGISTRY_ID_ALIASES[a] === agentId)) return void 0;
171
+ const servers = [...new Set(config?.servers ?? DEFAULT_BRIDGE_SERVERS)].filter(
172
+ (s) => Object.hasOwn(SERVER_NAMES, s)
173
+ );
174
+ if (servers.length === 0) return void 0;
175
+ return (_task, ctx) => ({
176
+ promptPrefix: bridgeTaskKickoff(servers),
177
+ mcpServers: servers.map((server) => {
178
+ const launch = wstackLaunch(serverArgs(server, projectRoot, ctx));
179
+ return { name: SERVER_NAMES[server], ...launch, env: [] };
180
+ }),
181
+ meta: {
182
+ systemPrompt: {
183
+ // `@session` only reaches someone when a WrongStack session delegated the task.
184
+ append: role === "leader" ? leaderBridgeNote(servers) : bridgeNote(servers, ctx.sessionId !== void 0)
185
+ }
186
+ }
187
+ });
188
+ }
189
+
2
190
  // src/hq-command-controller.ts
3
191
  function createProjectKanbanTransitionHandler(projectRoot) {
4
192
  return async (input) => {
@@ -330,8 +518,11 @@ ${command}
330
518
  }
331
519
 
332
520
  export {
521
+ DEFAULT_BRIDGE_SERVERS,
522
+ installedBridgeAgents,
523
+ wrongstackBridgeSetup,
333
524
  createProjectKanbanTransitionHandler,
334
525
  createProjectKanbanAssignHandler,
335
526
  createHqCommandDispatcher
336
527
  };
337
- //# sourceMappingURL=chunk-XT3NAHRX.js.map
528
+ //# sourceMappingURL=chunk-JKTJSLUT.js.map
@@ -22,11 +22,11 @@ async function handleHelpVersionShortCircuit(argv) {
22
22
  }
23
23
  if (earlyFlags["help"] === true) {
24
24
  if (positional.length > 0) {
25
- const { subcommandNames } = await import("./subcommands-VTMIZQBP.js");
25
+ const { subcommandNames } = await import("./subcommands-YADUV7IJ.js");
26
26
  if (subcommandNames.includes(positional[0])) {
27
27
  const first = positional[0];
28
28
  const deep = positional[1];
29
- const { renderDeepHelp, renderFocusedHelp } = await import("./per-subcommand-help-D6J4ZXW2.js");
29
+ const { renderDeepHelp, renderFocusedHelp } = await import("./per-subcommand-help-4GYSCMLU.js");
30
30
  if (deep && renderDeepHelp(`${first}:${deep}`, stubRenderer)) {
31
31
  return 0;
32
32
  }
@@ -43,4 +43,4 @@ async function handleHelpVersionShortCircuit(argv) {
43
43
  export {
44
44
  handleHelpVersionShortCircuit
45
45
  };
46
- //# sourceMappingURL=chunk-NMXQFQ26.js.map
46
+ //# sourceMappingURL=chunk-TAE3EGBM.js.map
@@ -746,6 +746,10 @@ var helpTable = {
746
746
  {
747
747
  name: "serve",
748
748
  description: "Run the wstack MCP server; --resources/--prompts explicitly expose selected files."
749
+ },
750
+ {
751
+ name: "serve <mailbox|kanban|codebase-index|requirement-intake|sage>",
752
+ description: "Run one of this project's MCP servers over stdio (works in the standalone binary). --project-root defaults to the current project; other flags pass through."
749
753
  }
750
754
  ],
751
755
  seeAlso: "wstack plugin (manage tool plugins similarly)"
@@ -824,8 +828,8 @@ var helpTable = {
824
828
  description: "Pre-fill Ollama / vLLM / LM Studio (--name, --base-url, --no-probe, --model, --audit \u2026)."
825
829
  },
826
830
  {
827
- name: "login <chatgpt|claude|copilot>",
828
- description: "Subscription OAuth login: chatgpt (\u2192 openai-codex), claude (\u2192 anthropic-oauth), or copilot (\u2192 github-copilot). Opens browser; no API key. \u26A0 Using subscriptions outside official clients may violate provider ToS (account ban risk); an API key is the sanctioned path."
831
+ name: "login <chatgpt|copilot>",
832
+ description: "Subscription OAuth login: chatgpt (\u2192 openai-codex) or copilot (\u2192 github-copilot). Claude has no third-party sign-in: use `wstack auth anthropic` with an API key (Max/Team plans include monthly API credits). Opens browser; no API key. \u26A0 Using subscriptions outside official clients may violate provider ToS (account ban risk); an API key is the sanctioned path."
829
833
  }
830
834
  ],
831
835
  seeAlso: "wstack auth local (pre-fill Ollama / vLLM / LM Studio)"
@@ -1296,4 +1300,4 @@ export {
1296
1300
  subcommandsWithFocusedHelp,
1297
1301
  renderGenericHelp
1298
1302
  };
1299
- //# sourceMappingURL=chunk-3R3OADC5.js.map
1303
+ //# sourceMappingURL=chunk-ZF4HRR5F.js.map
@@ -7,7 +7,6 @@ import {
7
7
  writeWebuiSessionChildError
8
8
  } from "./chunk-FUJHWQV4.js";
9
9
  import {
10
- activateRestrictedMode,
11
10
  announceSafeMode,
12
11
  applySimpleUiFullAutoProfile,
13
12
  detectProjectFacts,
@@ -17,7 +16,7 @@ import {
17
16
  renderDiff,
18
17
  resolveLaunchAllowedTools,
19
18
  resolveToolRestriction
20
- } from "./chunk-5TRZZHMN.js";
19
+ } from "./chunk-JCZ2D3VV.js";
21
20
  import {
22
21
  theme as theme2
23
22
  } from "./chunk-JTTV2EVA.js";
@@ -30,14 +29,14 @@ import {
30
29
  } from "./chunk-NL2ABOAS.js";
31
30
  import {
32
31
  subcommands
33
- } from "./chunk-GRAGMA4B.js";
32
+ } from "./chunk-2LTHDKZX.js";
34
33
  import {
35
34
  renderDeepHelp,
36
35
  renderFocusedHelp
37
- } from "./chunk-3R3OADC5.js";
36
+ } from "./chunk-ZF4HRR5F.js";
38
37
  import {
39
38
  handleHelpVersionShortCircuit
40
- } from "./chunk-NMXQFQ26.js";
39
+ } from "./chunk-TAE3EGBM.js";
41
40
  import {
42
41
  DEFAULT_PORT
43
42
  } from "./chunk-AWRZWPJ3.js";
@@ -69,7 +68,7 @@ import {
69
68
  runPicker,
70
69
  saveToGlobalConfig,
71
70
  theme
72
- } from "./chunk-RAWHRRUJ.js";
71
+ } from "./chunk-I5LJLKA3.js";
73
72
  import "./chunk-ZXX3MJRL.js";
74
73
  import {
75
74
  isKeylessLocalProvider,
@@ -82,6 +81,9 @@ import {
82
81
  activeProfileConfigPath
83
82
  } from "./chunk-SPSHEZ46.js";
84
83
  import "./chunk-BIGSVBPI.js";
84
+ import {
85
+ activateRestrictedMode
86
+ } from "./chunk-3LEIFO5D.js";
85
87
  import "./chunk-OZCYZYN2.js";
86
88
  import {
87
89
  runUpdateCommand
@@ -96,6 +98,9 @@ import {
96
98
  import {
97
99
  parseArgs
98
100
  } from "./chunk-75OLD563.js";
101
+ import {
102
+ ACP_LEADER_PROVIDER_ID
103
+ } from "./chunk-GKGWPFW2.js";
99
104
  import "./chunk-H53EXXAU.js";
100
105
  import {
101
106
  applyAsciiMode
@@ -1907,6 +1912,7 @@ async function validateSavedProviderModel(config, modelsRegistry) {
1907
1912
  const modelId = config.model;
1908
1913
  if (!providerId || !modelId) return { ok: false, reason: "missing provider/model" };
1909
1914
  if (isSetupProvider(providerId)) return { ok: true };
1915
+ if (providerId === ACP_LEADER_PROVIDER_ID) return { ok: true };
1910
1916
  const saved = config.providers?.[providerId];
1911
1917
  const lookupId = saved?.type && saved.type !== providerId ? saved.type : providerId;
1912
1918
  const catalogProvider = await modelsRegistry.getProvider(lookupId).catch(() => void 0);
@@ -3622,4 +3628,4 @@ async function initializeCli(argv, options = {}) {
3622
3628
  export {
3623
3629
  initializeCli
3624
3630
  };
3625
- //# sourceMappingURL=cli-context-YIT4FEDM.js.map
3631
+ //# sourceMappingURL=cli-context-E44HQ4ZO.js.map