@tiny-fish/cli 0.25.1-next.216 → 0.25.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.
@@ -53,5 +53,5 @@ export declare const OPENCODE: NativeMcpClient;
53
53
  /** Every native MCP client. Derive from this, so a new harness cannot be missed. */
54
54
  export declare const NATIVE_MCP_CLIENTS: readonly NativeMcpClient[];
55
55
  export declare const OPENCLAW: SupportedCommand;
56
- export declare function launchNativeMcpClient(client: NativeMcpClient): boolean;
57
- export declare function launchOpenClawWalkthrough(): boolean;
56
+ export declare function launchNativeMcpClient(client: NativeMcpClient): void;
57
+ export declare function launchOpenClawWalkthrough(): void;
@@ -192,6 +192,13 @@ export const GROK = {
192
192
  removals: [{ args: ["mcp", "remove", "tinyfish"], label: "TinyFish registration from Grok" }],
193
193
  addArgs: grokAddArgs,
194
194
  };
195
+ // Handover: spawn errors are ours; the exit is the user's.
196
+ function handOverTerminal(command, args, displayName) {
197
+ const result = spawn.sync(command, args, { stdio: "inherit" });
198
+ if (result.error) {
199
+ throw spawnStepError(`Could not launch ${displayName}`, result);
200
+ }
201
+ }
195
202
  function launchHermesWalkthrough() {
196
203
  const seedResult = spawn.sync("hermes", ["chat", "-Q", "-q", DEFAULT_ONBOARDING_PROMPT], {
197
204
  encoding: "utf8",
@@ -205,15 +212,7 @@ function launchHermesWalkthrough() {
205
212
  if (!sessionId) {
206
213
  throw new Error("Hermes did not return a walkthrough session ID");
207
214
  }
208
- const result = spawn.sync("hermes", ["--resume", sessionId], { stdio: "inherit" });
209
- if (result.error) {
210
- throw spawnStepError("Could not launch Hermes", result);
211
- }
212
- if (result.signal === "SIGINT" || result.signal === "SIGTERM")
213
- return;
214
- if (result.status !== 0) {
215
- throw spawnStepError(`Hermes walkthrough exited with status ${result.status ?? "unknown"}`, result);
216
- }
215
+ handOverTerminal("hermes", ["--resume", sessionId], "Hermes");
217
216
  }
218
217
  export const HERMES = {
219
218
  command: "hermes",
@@ -235,17 +234,7 @@ export const HERMES = {
235
234
  // would be read as a folder. The `--prompt` flag seeds the interactive TUI with a first message
236
235
  // (opencode.ai/docs/cli), so the onboarding guide fires just like the other agents.
237
236
  function launchOpencode() {
238
- const result = spawn.sync("opencode", ["--prompt", DEFAULT_ONBOARDING_PROMPT], {
239
- stdio: "inherit",
240
- });
241
- if (result.error) {
242
- throw spawnStepError("Could not launch OpenCode", result);
243
- }
244
- if (result.signal === "SIGINT" || result.signal === "SIGTERM")
245
- return;
246
- if (result.status !== 0) {
247
- throw spawnStepError(`OpenCode exited with status ${result.status ?? "unknown"}`, result);
248
- }
237
+ handOverTerminal("opencode", ["--prompt", DEFAULT_ONBOARDING_PROMPT], "OpenCode");
249
238
  }
250
239
  export const OPENCODE = {
251
240
  command: "opencode",
@@ -288,31 +277,11 @@ export function launchNativeMcpClient(client) {
288
277
  errLine(`Starting the TinyFish walkthrough in ${client.displayName}...`);
289
278
  if (client.launchWalkthrough) {
290
279
  client.launchWalkthrough();
291
- return true;
292
- }
293
- const result = spawn.sync(client.command, [DEFAULT_ONBOARDING_PROMPT], { stdio: "inherit" });
294
- if (result.error) {
295
- throw spawnStepError(`Could not launch ${client.displayName}`, result);
296
- }
297
- if (result.signal === "SIGINT" || result.signal === "SIGTERM")
298
- return false;
299
- if (result.status !== 0) {
300
- throw spawnStepError(`${client.displayName} walkthrough exited with status ${result.status ?? "unknown"}`, result);
280
+ return;
301
281
  }
302
- return true;
282
+ handOverTerminal(client.command, [DEFAULT_ONBOARDING_PROMPT], client.displayName);
303
283
  }
304
284
  export function launchOpenClawWalkthrough() {
305
285
  errLine("Starting the TinyFish walkthrough in OpenClaw...");
306
- const result = spawn.sync("openclaw", ["chat", "--message", OPENCLAW_ONBOARDING_PROMPT], {
307
- stdio: "inherit",
308
- });
309
- if (result.error) {
310
- throw spawnStepError("Could not launch OpenClaw", result);
311
- }
312
- if (result.signal === "SIGINT" || result.signal === "SIGTERM")
313
- return false;
314
- if (result.status !== 0) {
315
- throw spawnStepError(`OpenClaw walkthrough exited with status ${result.status ?? "unknown"}`, result);
316
- }
317
- return true;
286
+ handOverTerminal("openclaw", ["chat", "--message", OPENCLAW_ONBOARDING_PROMPT], "OpenClaw");
318
287
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-fish/cli",
3
- "version": "0.25.1-next.216",
3
+ "version": "0.25.1",
4
4
  "description": "TinyFish CLI — run web automations from your terminal",
5
5
  "type": "module",
6
6
  "bin": {