@hyperwindmill/caretaker-cli 0.24.0 → 0.25.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 (71) hide show
  1. package/dist/acp/index.d.ts +3 -0
  2. package/dist/acp/index.d.ts.map +1 -0
  3. package/dist/acp/index.js +2 -0
  4. package/dist/acp/install.d.ts +12 -0
  5. package/dist/acp/install.d.ts.map +1 -0
  6. package/dist/acp/install.js +110 -0
  7. package/dist/acp/registry.d.ts +10 -0
  8. package/dist/acp/registry.d.ts.map +1 -0
  9. package/dist/acp/registry.js +116 -0
  10. package/dist/cli/web/mcp_bridge.d.ts +7 -1
  11. package/dist/cli/web/mcp_bridge.d.ts.map +1 -1
  12. package/dist/cli/web/mcp_bridge.js +10 -6
  13. package/dist/cli/web/scheduler/memory_sweep.d.ts.map +1 -1
  14. package/dist/cli/web/scheduler/memory_sweep.js +1 -0
  15. package/dist/cli/web/scheduler/task_review.d.ts.map +1 -1
  16. package/dist/cli/web/scheduler/task_review.js +25 -0
  17. package/dist/cli/web/scheduler/task_roles.d.ts +1 -1
  18. package/dist/cli/web/scheduler/task_roles.d.ts.map +1 -1
  19. package/dist/cli/web/scheduler/task_roles.js +6 -6
  20. package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
  21. package/dist/cli/web/scheduler/task_strategy.js +23 -2
  22. package/dist/cli/web/server.d.ts +1 -1
  23. package/dist/cli/web/server.d.ts.map +1 -1
  24. package/dist/cli/web/server.js +27 -5
  25. package/dist/harness/acp_policy.d.ts +41 -0
  26. package/dist/harness/acp_policy.d.ts.map +1 -0
  27. package/dist/harness/acp_policy.js +59 -0
  28. package/dist/harness/acp_pool.d.ts +33 -0
  29. package/dist/harness/acp_pool.d.ts.map +1 -0
  30. package/dist/harness/acp_pool.js +148 -0
  31. package/dist/harness/acp_runner.d.ts +4 -0
  32. package/dist/harness/acp_runner.d.ts.map +1 -0
  33. package/dist/harness/acp_runner.js +347 -0
  34. package/dist/harness/claude_code_runner.d.ts +2 -0
  35. package/dist/harness/claude_code_runner.d.ts.map +1 -1
  36. package/dist/harness/claude_code_runner.js +1 -1
  37. package/dist/harness/confirm_gate.d.ts +12 -0
  38. package/dist/harness/confirm_gate.d.ts.map +1 -0
  39. package/dist/harness/confirm_gate.js +33 -0
  40. package/dist/harness/index.d.ts +1 -0
  41. package/dist/harness/index.d.ts.map +1 -1
  42. package/dist/harness/index.js +1 -0
  43. package/dist/harness/loop.d.ts +3 -0
  44. package/dist/harness/loop.d.ts.map +1 -1
  45. package/dist/harness/loop.js +6 -0
  46. package/dist/harness/memory_recall.d.ts +8 -3
  47. package/dist/harness/memory_recall.d.ts.map +1 -1
  48. package/dist/harness/memory_recall.js +11 -7
  49. package/dist/harness/title.js +1 -1
  50. package/dist/mcp/builtin_server.d.ts +1 -0
  51. package/dist/mcp/builtin_server.d.ts.map +1 -1
  52. package/dist/mcp/builtin_server.js +3 -2
  53. package/dist/mcp/run_command_tool.d.ts +13 -0
  54. package/dist/mcp/run_command_tool.d.ts.map +1 -0
  55. package/dist/mcp/run_command_tool.js +51 -0
  56. package/dist/session/store.d.ts +1 -0
  57. package/dist/session/store.d.ts.map +1 -1
  58. package/dist/session/store.js +6 -0
  59. package/dist/session/types.d.ts +3 -0
  60. package/dist/session/types.d.ts.map +1 -1
  61. package/dist/tui/agents.d.ts.map +1 -1
  62. package/dist/tui/agents.js +57 -23
  63. package/dist/tui/chat.d.ts.map +1 -1
  64. package/dist/tui/chat.js +7 -8
  65. package/dist/tui/providers.d.ts.map +1 -1
  66. package/dist/tui/providers.js +116 -17
  67. package/dist/webview/standalone.css +18 -0
  68. package/dist/webview/standalone.css.map +2 -2
  69. package/dist/webview/standalone.js +235 -25
  70. package/dist/webview/standalone.js.map +2 -2
  71. package/package.json +8 -3
package/dist/tui/chat.js CHANGED
@@ -4,6 +4,7 @@ import { Box, Text, useInput } from 'ink';
4
4
  import SelectInput from 'ink-select-input';
5
5
  import TextInput from 'ink-text-input';
6
6
  import { run } from '../harness/loop.js';
7
+ import { ConfirmGateState } from '../harness/confirm_gate.js';
7
8
  import { tools as toolRegistry } from '../harness/tools/instance.js';
8
9
  import { resolveAgentTools } from '../harness/tools/index.js';
9
10
  import { expandTemplate, parseSlashInvocation, resolveCommand } from '../commands/loader.js';
@@ -21,10 +22,10 @@ export default function ChatScreen({ agent, provider, initialSession, onBack, })
21
22
  const abortRef = useRef(null);
22
23
  const titleAbortRef = useRef(null);
23
24
  const titlePendingRef = useRef(false);
24
- // Tools that still require confirmation in this session. Mutated when the
25
- // user picks "always", so subsequent calls skip the prompt for that tool.
26
- // Init from the agent's persisted confirmTools; "always" is in-memory only.
27
- const confirmSetRef = useRef(new Set(agent.confirmTools ?? []));
25
+ // Confirm-gate state: native/claude-code agents prompt only for
26
+ // agent.confirmTools names; ACP agents prompt on every permission request
27
+ // the agent raises. "always" is remembered in-memory only.
28
+ const confirmGateRef = useRef(new ConfirmGateState(provider.type, agent.confirmTools));
28
29
  const [pendingConfirm, setPendingConfirm] = useState(null);
29
30
  useEffect(() => {
30
31
  if (!initialSession)
@@ -133,7 +134,7 @@ export default function ChatScreen({ agent, provider, initialSession, onBack, })
133
134
  onChunk: (s) => setLiveText((prev) => prev + s),
134
135
  onThinking: (s) => setLiveThinking((prev) => prev + s),
135
136
  confirmTool: (id, name, args) => new Promise((resolve) => {
136
- if (!confirmSetRef.current.has(name)) {
137
+ if (!confirmGateRef.current.needsAsk(name)) {
137
138
  resolve('once');
138
139
  return;
139
140
  }
@@ -208,9 +209,7 @@ export default function ChatScreen({ agent, provider, initialSession, onBack, })
208
209
  { label: 'Reject', value: 'reject' },
209
210
  ], onSelect: (item) => {
210
211
  const decision = item.value;
211
- if (decision === 'always') {
212
- confirmSetRef.current.delete(pendingConfirm.name);
213
- }
212
+ confirmGateRef.current.remember(pendingConfirm.name, decision);
214
213
  pendingConfirm.resolve(decision);
215
214
  setPendingConfirm(null);
216
215
  } }) })] })), mode === 'running' && !pendingConfirm && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "(running\u2026 esc to abort)" }) })), _jsx(ContextBar, { messages: messages, model: agent.model })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/tui/providers.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,2CA+KnE"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/tui/providers.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,2CAmLnE"}
@@ -4,6 +4,7 @@ import { Box, Text, useInput } from 'ink';
4
4
  import SelectInput from 'ink-select-input';
5
5
  import TextInput from 'ink-text-input';
6
6
  import { loadAgents, loadConfig, saveConfig } from '../store/json.js';
7
+ import { fetchAcpRegistry } from '../acp/index.js';
7
8
  export default function Providers({ onBack }) {
8
9
  const [providers, setProviders] = useState([]);
9
10
  const [loaded, setLoaded] = useState(false);
@@ -67,8 +68,7 @@ export default function Providers({ onBack }) {
67
68
  } }) })] }));
68
69
  }
69
70
  if (mode === 'detail' && selected) {
70
- const isClaudeCode = selected.type === 'claude-code';
71
- return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: selected.name }), isClaudeCode ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "type: claude-code" }), _jsxs(Text, { children: ["command: ", selected.command || '(default: claude on PATH)'] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["endpoint: ", selected.endpoint] }), _jsxs(Text, { children: ["apiKey: ", selected.apiKey ? '(set)' : '(none)'] })] })), _jsx(Box, { marginTop: 1, children: _jsx(SelectInput, { items: [
71
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: selected.name }), selected.type === 'acp' ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "type: External agent (ACP)" }), _jsxs(Text, { children: ["command: ", selected.command || '(none)'] }), _jsxs(Text, { children: ["args: ", (selected.args ?? []).join(' ') || '(none)'] })] })) : selected.type === 'claude-code' ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "type: claude-code" }), _jsxs(Text, { children: ["command: ", selected.command || '(default: claude on PATH)'] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["endpoint: ", selected.endpoint] }), _jsxs(Text, { children: ["apiKey: ", selected.apiKey ? '(set)' : '(none)'] })] })), _jsx(Box, { marginTop: 1, children: _jsx(SelectInput, { items: [
72
72
  { label: 'Edit', value: 'edit' },
73
73
  { label: 'Delete', value: 'delete' },
74
74
  { label: '← Back', value: 'back' },
@@ -85,25 +85,24 @@ export default function Providers({ onBack }) {
85
85
  }
86
86
  const items = [
87
87
  ...providers.map((p) => ({
88
- label: p.type === 'claude-code'
89
- ? `${p.name} — Claude Code (local CLI)${p.command ? ` — ${p.command}` : ''}`
90
- : `${p.name} — ${p.endpoint}`,
88
+ label: p.type === 'acp'
89
+ ? `${p.name} — External agent (ACP) — ${p.command ?? ''} ${(p.args ?? []).join(' ')}`.trim()
90
+ : p.type === 'claude-code'
91
+ ? `${p.name} — Claude Code (local CLI)${p.command ? ` — ${p.command}` : ''}`
92
+ : `${p.name} — ${p.endpoint}`,
91
93
  value: `p:${p.name}`,
92
94
  })),
93
95
  { label: '+ Create new', value: '__new__' },
94
96
  { label: '← Back', value: '__back__' },
95
97
  ];
96
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: ["Providers (", providers.length, ")"] }), _jsx(Box, { marginTop: 1, children: _jsx(SelectInput, { items: items, onSelect: (item) => {
98
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Providers" }), _jsx(Box, { marginTop: 1, children: _jsx(SelectInput, { items: items, onSelect: (item) => {
97
99
  if (item.value === '__back__')
98
100
  return onBack();
99
101
  if (item.value === '__new__')
100
102
  return setMode('create');
101
- const name = item.value.replace(/^p:/, '');
102
- const p = providers.find((x) => x.name === name);
103
- if (p) {
104
- setSelected(p);
105
- setMode('detail');
106
- }
103
+ const name = item.value.slice(2);
104
+ setSelected(providers.find((p) => p.name === name) ?? null);
105
+ setMode('detail');
107
106
  } }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "(esc to go back)" }) })] }));
108
107
  }
109
108
  function ProviderForm({ existingNames, initial, onSave, onCancel, }) {
@@ -112,17 +111,87 @@ function ProviderForm({ existingNames, initial, onSave, onCancel, }) {
112
111
  // providers by name, so switching type out from under them is a footgun
113
112
  // (same rationale as the webview form).
114
113
  const [type, setType] = useState(initial?.type ?? 'openai');
115
- const [step, setStep] = useState(isEdit ? (type === 'claude-code' ? 'command' : 'endpoint') : 'type');
114
+ const [step, setStep] = useState(isEdit ? (type === 'acp' || type === 'claude-code' ? 'command' : 'endpoint') : 'type');
116
115
  const [name, setName] = useState(initial?.name ?? '');
117
116
  const [endpoint, setEndpoint] = useState(initial?.endpoint ?? '');
118
117
  const [apiKey, setApiKey] = useState(initial?.apiKey ?? '');
119
118
  const [command, setCommand] = useState(initial?.command ?? '');
119
+ const [args, setArgs] = useState((initial?.args ?? []).join(' '));
120
+ const [presets, setPresets] = useState([]);
121
+ const [presetError, setPresetError] = useState(null);
122
+ const [presetLabel, setPresetLabel] = useState('Custom (manual command)');
123
+ const [selfLoaded, setSelfLoaded] = useState(initial?.selfLoadedContextFiles ?? []);
124
+ const [env, setEnv] = useState(initial?.env);
120
125
  const [error, setError] = useState(null);
126
+ useEffect(() => {
127
+ if (step === 'preset') {
128
+ void fetchAcpRegistry()
129
+ .then(setPresets)
130
+ .catch((e) => {
131
+ setPresetError(String(e));
132
+ setStep('command');
133
+ });
134
+ }
135
+ }, [step]);
121
136
  useInput((_input, key) => {
122
137
  if (key.escape)
123
138
  onCancel();
124
139
  });
140
+ const presetItems = [
141
+ { label: 'Custom (manual command)', value: 'custom' },
142
+ ...presets.map((p) => ({
143
+ label: p.dist
144
+ ? p.dist.kind === 'binary'
145
+ ? `${p.name} (binary — install from the web GUI, or enter the path manually)`
146
+ : p.name
147
+ : `${p.name} (not available on this platform)`,
148
+ value: p.id,
149
+ })),
150
+ ];
151
+ const handleSelectPreset = (item) => {
152
+ if (item.value === 'custom') {
153
+ setPresetLabel('Custom (manual command)');
154
+ setSelfLoaded([]);
155
+ setEnv(undefined);
156
+ setStep('command');
157
+ return;
158
+ }
159
+ const chosen = presets.find((p) => p.id === item.value);
160
+ if (!chosen) {
161
+ setStep('command');
162
+ return;
163
+ }
164
+ setPresetLabel(chosen.name);
165
+ setSelfLoaded(chosen.selfLoadedContextFiles);
166
+ if (chosen.dist?.env)
167
+ setEnv(chosen.dist.env);
168
+ // Prefill only — the user reviews command/args before saving (binary
169
+ // presets have nothing to prefill: install from the web GUI or type the path).
170
+ const prefill = chosen.dist && chosen.dist.kind !== 'binary' ? chosen.dist : null;
171
+ setCommand(prefill ? prefill.command : '');
172
+ setArgs(prefill ? prefill.args.join(' ') : '');
173
+ setStep('command');
174
+ };
125
175
  const finalize = () => {
176
+ if (type === 'acp') {
177
+ const p = {
178
+ name: name.trim(),
179
+ type: 'acp',
180
+ endpoint: '',
181
+ command: command.trim(),
182
+ };
183
+ const argList = args.trim() ? args.trim().split(/\s+/) : [];
184
+ if (argList.length)
185
+ p.args = argList;
186
+ const envToSave = env ?? initial?.env;
187
+ if (envToSave)
188
+ p.env = envToSave;
189
+ const selfLoadedToSave = selfLoaded.length ? selfLoaded : initial?.selfLoadedContextFiles;
190
+ if (selfLoadedToSave?.length)
191
+ p.selfLoadedContextFiles = selfLoadedToSave;
192
+ void onSave(p);
193
+ return;
194
+ }
126
195
  if (type === 'claude-code') {
127
196
  const p = { name: name.trim(), type: 'claude-code', endpoint: '' };
128
197
  if (command.trim())
@@ -147,7 +216,15 @@ function ProviderForm({ existingNames, initial, onSave, onCancel, }) {
147
216
  if (existingNames.includes(v))
148
217
  return setError('name already exists');
149
218
  setError(null);
150
- setStep(type === 'claude-code' ? 'command' : 'endpoint');
219
+ if (type === 'acp') {
220
+ setStep('preset');
221
+ }
222
+ else if (type === 'claude-code') {
223
+ setStep('command');
224
+ }
225
+ else {
226
+ setStep('endpoint');
227
+ }
151
228
  }
152
229
  else if (step === 'endpoint') {
153
230
  const v = endpoint.trim();
@@ -157,6 +234,19 @@ function ProviderForm({ existingNames, initial, onSave, onCancel, }) {
157
234
  setStep('apiKey');
158
235
  }
159
236
  else if (step === 'command') {
237
+ if (type === 'acp') {
238
+ const v = command.trim();
239
+ if (!v)
240
+ return setError('command is required (e.g. npx or binary path)');
241
+ setError(null);
242
+ setStep('args');
243
+ }
244
+ else {
245
+ setError(null);
246
+ finalize();
247
+ }
248
+ }
249
+ else if (step === 'args') {
160
250
  setError(null);
161
251
  finalize();
162
252
  }
@@ -164,15 +254,24 @@ function ProviderForm({ existingNames, initial, onSave, onCancel, }) {
164
254
  finalize();
165
255
  }
166
256
  };
167
- const stepOrder = type === 'claude-code' ? ['type', 'name', 'command'] : ['type', 'name', 'endpoint', 'apiKey'];
257
+ const stepOrder = type === 'acp'
258
+ ? ['type', 'name', 'preset', 'command', 'args']
259
+ : type === 'claude-code'
260
+ ? ['type', 'name', 'command']
261
+ : ['type', 'name', 'endpoint', 'apiKey'];
168
262
  const currentIdx = stepOrder.indexOf(step);
169
263
  const isPending = (s) => stepOrder.indexOf(s) > currentIdx;
170
264
  return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: isEdit ? `Edit provider "${initial.name}"` : 'New provider' }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { children: "type: " }), !isEdit && step === 'type' ? (_jsx(SelectInput, { items: [
171
265
  { label: 'OpenAI-compatible endpoint', value: 'openai' },
172
266
  { label: 'Claude Code (local CLI)', value: 'claude-code' },
173
- ], initialIndex: type === 'claude-code' ? 1 : 0, onSelect: (item) => {
267
+ { label: 'External agent (ACP)', value: 'acp' },
268
+ ], initialIndex: type === 'acp' ? 2 : type === 'claude-code' ? 1 : 0, onSelect: (item) => {
174
269
  setType(item.value);
175
270
  setError(null);
176
271
  setStep('name');
177
- } })) : (_jsx(Text, { children: type === 'claude-code' ? 'Claude Code (local CLI)' : 'OpenAI-compatible endpoint' }))] }), _jsxs(Box, { children: [_jsx(Text, { children: "name: " }), !isEdit && step === 'name' ? (_jsx(TextInput, { value: name, onChange: setName, onSubmit: submit })) : isPending('name') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: name }))] }), type === 'claude-code' ? (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { children: "command: " }), step === 'command' ? (_jsx(TextInput, { value: command, onChange: setCommand, onSubmit: submit, placeholder: "claude (default: resolved from PATH)" })) : isPending('command') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: command || '(default: claude on PATH)' }))] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." }) })] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { children: "endpoint: " }), step === 'endpoint' ? (_jsx(TextInput, { value: endpoint, onChange: setEndpoint, onSubmit: submit, placeholder: "https://api.openai.com" })) : isPending('endpoint') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: endpoint }))] }), _jsxs(Box, { children: [_jsx(Text, { children: "apiKey: " }), step === 'apiKey' ? (_jsx(TextInput, { value: apiKey, onChange: setApiKey, onSubmit: submit, placeholder: isEdit ? '(enter to keep current)' : '(optional, enter to skip)', mask: "*" })) : isPending('apiKey') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: apiKey ? '(set)' : '(none)' }))] })] })), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "(esc to cancel)" }) })] }));
272
+ } })) : (_jsx(Text, { children: type === 'acp'
273
+ ? 'External agent (ACP)'
274
+ : type === 'claude-code'
275
+ ? 'Claude Code (local CLI)'
276
+ : 'OpenAI-compatible endpoint' }))] }), _jsxs(Box, { children: [_jsx(Text, { children: "name: " }), !isEdit && step === 'name' ? (_jsx(TextInput, { value: name, onChange: setName, onSubmit: submit })) : isPending('name') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: name }))] }), type === 'acp' ? (_jsxs(_Fragment, { children: [!isEdit && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { children: "preset: " }), step === 'preset' ? (presets.length === 0 && !presetError ? (_jsx(Text, { dimColor: true, children: "loading presets\u2026" })) : (_jsx(SelectInput, { items: presetItems, onSelect: handleSelectPreset }))) : isPending('preset') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: presetLabel }))] }), presetError && (_jsx(Box, { children: _jsxs(Text, { dimColor: true, children: ["Registry unavailable (", presetError, ") \u2014 enter command manually"] }) }))] })), _jsxs(Box, { children: [_jsx(Text, { children: "command: " }), step === 'command' ? (_jsx(TextInput, { value: command, onChange: setCommand, onSubmit: submit, placeholder: "npx or /path/to/binary" })) : isPending('command') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: command }))] }), _jsxs(Box, { children: [_jsx(Text, { children: "arguments: " }), step === 'args' ? (_jsx(TextInput, { value: args, onChange: setArgs, onSubmit: submit, placeholder: "@agentclientprotocol/claude-agent-acp" })) : isPending('args') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: args || '(none)' }))] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Space-separated arguments for the agent server. Edit caretaker.json for env vars." }) })] })) : type === 'claude-code' ? (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { children: "command: " }), step === 'command' ? (_jsx(TextInput, { value: command, onChange: setCommand, onSubmit: submit, placeholder: "claude (default: resolved from PATH)" })) : isPending('command') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: command || '(default: claude on PATH)' }))] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." }) })] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { children: "endpoint: " }), step === 'endpoint' ? (_jsx(TextInput, { value: endpoint, onChange: setEndpoint, onSubmit: submit, placeholder: "https://api.openai.com" })) : isPending('endpoint') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: endpoint }))] }), _jsxs(Box, { children: [_jsx(Text, { children: "apiKey: " }), step === 'apiKey' ? (_jsx(TextInput, { value: apiKey, onChange: setApiKey, onSubmit: submit, placeholder: isEdit ? '(enter to keep current)' : '(optional, enter to skip)', mask: "*" })) : isPending('apiKey') ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: apiKey ? '(set)' : '(none)' }))] })] })), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "(esc to cancel)" }) })] }));
178
277
  }
@@ -1815,6 +1815,24 @@ body.vscode-light .settings-panel__tab-btn--active {
1815
1815
  .input-with-action button {
1816
1816
  flex-shrink: 0;
1817
1817
  }
1818
+ .form-error {
1819
+ color: var(--danger-red, #f87171);
1820
+ font-size: 11px;
1821
+ line-height: 1.4;
1822
+ margin: 4px 0 0;
1823
+ }
1824
+ .install-log {
1825
+ margin-top: 8px;
1826
+ padding: 8px;
1827
+ font-family: monospace;
1828
+ font-size: 11px;
1829
+ white-space: pre-wrap;
1830
+ word-break: break-all;
1831
+ background: rgba(0, 0, 0, 0.2);
1832
+ border-radius: 4px;
1833
+ max-height: 150px;
1834
+ overflow-y: auto;
1835
+ }
1818
1836
  .voice-backend-status {
1819
1837
  display: flex;
1820
1838
  align-items: center;