@tiny-fish/cli 0.30.1-next.249 → 0.30.1-next.251
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/commands/connect.js
CHANGED
|
@@ -8,7 +8,7 @@ import { installWebSkill } from "../lib/skill-install.js";
|
|
|
8
8
|
import { ConnectInterruptedError, ConnectStepError, createConnectTelemetry, finishSetupCommand, requireCommandSupport, runGuarded, settle, SignInTimeoutError, spawnStepError, throwIfInterrupted, NON_INTERACTIVE_TIMEOUT_MS, } from "../lib/connect-runtime.js";
|
|
9
9
|
import { cursorInstallDeeplink, cursorMcpPath, readCursorTinyfishEntry, writeCursorMcpConfig, } from "../lib/cursor-config.js";
|
|
10
10
|
import { runConnectAll } from "../lib/connect-all.js";
|
|
11
|
-
import { AuthMode } from "../lib/harness-detect.js";
|
|
11
|
+
import { AuthMode, RELOAD_ACTION } from "../lib/harness-detect.js";
|
|
12
12
|
import { detectHumanInitiated } from "../lib/harness.js";
|
|
13
13
|
import { TINYFISH_API_KEY_VAR } from "../lib/constants.js";
|
|
14
14
|
import { emitNotice } from "../lib/notice.js";
|
|
@@ -220,7 +220,8 @@ function connectedLine(client, signInDeferred) {
|
|
|
220
220
|
return (`TinyFish is configured in ${client.displayName}. ${client.displayName} will ask you ` +
|
|
221
221
|
"to sign in to TinyFish the first time you use it.");
|
|
222
222
|
}
|
|
223
|
-
return `TinyFish is connected. Open ${client.displayName}
|
|
223
|
+
return (`TinyFish is connected. Open ${client.displayName}; if it is already running, ` +
|
|
224
|
+
`${RELOAD_ACTION[client.connectClient]} to pick up the tools.`);
|
|
224
225
|
}
|
|
225
226
|
// Runs after `completed` settled: steps fail alone, the rest still run.
|
|
226
227
|
function runPostInstallSteps(client, options, state, telemetry, signInDeferred) {
|
|
@@ -387,8 +388,10 @@ export async function connectOpenClaw(options) {
|
|
|
387
388
|
settle(state, telemetry, "completed");
|
|
388
389
|
if (!options.launch) {
|
|
389
390
|
// Under --all the summary already lists OpenClaw.
|
|
390
|
-
if (!options.deferOutro)
|
|
391
|
-
errLine("TinyFish is connected. Open OpenClaw
|
|
391
|
+
if (!options.deferOutro) {
|
|
392
|
+
errLine("TinyFish is connected. Open OpenClaw; if it is already running, " +
|
|
393
|
+
`${RELOAD_ACTION.openclaw} to pick up the skill.`);
|
|
394
|
+
}
|
|
392
395
|
return;
|
|
393
396
|
}
|
|
394
397
|
state.stage = "walkthrough_launch";
|
package/dist/lib/connect-all.js
CHANGED
|
@@ -7,7 +7,7 @@ import { HARNESS_CAPABILITIES, NATIVE_BY_HARNESS } from "./connect-clients.js";
|
|
|
7
7
|
import { createStdinPrompt, runCliFallback } from "./connect-fallback.js";
|
|
8
8
|
import { ConnectInterruptedError, ConnectStepError, SignInTimeoutError, finishSetupCommand, } from "./connect-runtime.js";
|
|
9
9
|
import { pickHarnesses } from "./connect-picker.js";
|
|
10
|
-
import { commandOnPath, detectInstalledHarnesses, HARNESS_COMMANDS, HARNESS_DISPLAY_NAMES as DISPLAY_NAMES, ALL_HARNESSES, } from "./harness-detect.js";
|
|
10
|
+
import { commandOnPath, detectInstalledHarnesses, HARNESS_COMMANDS, HARNESS_DISPLAY_NAMES as DISPLAY_NAMES, ALL_HARNESSES, RELOAD_ACTION, } from "./harness-detect.js";
|
|
11
11
|
import { detectHumanInitiated } from "./harness.js";
|
|
12
12
|
import { emitNotice } from "./notice.js";
|
|
13
13
|
import { removeCursorMcpServer, planCursorWrite } from "./cursor-config.js";
|
|
@@ -320,6 +320,20 @@ function summaryLine(result, uninstall) {
|
|
|
320
320
|
}
|
|
321
321
|
return `✓ ${name} — installed, ${verifyLabel}`;
|
|
322
322
|
}
|
|
323
|
+
/** One line for every harness: seven near-identical paragraphs is what this replaces. */
|
|
324
|
+
function reloadHint(results) {
|
|
325
|
+
const byAction = new Map();
|
|
326
|
+
for (const result of results) {
|
|
327
|
+
if (!result.installed)
|
|
328
|
+
continue;
|
|
329
|
+
const action = RELOAD_ACTION[result.harness];
|
|
330
|
+
byAction.set(action, [...(byAction.get(action) ?? []), DISPLAY_NAMES[result.harness]]);
|
|
331
|
+
}
|
|
332
|
+
if (byAction.size === 0)
|
|
333
|
+
return undefined;
|
|
334
|
+
const parts = [...byAction].map(([action, names]) => `${names.join(", ")} — ${action}`);
|
|
335
|
+
return `TinyFish tools load when a harness starts. If one is already open: ${parts.join("; ")}.`;
|
|
336
|
+
}
|
|
323
337
|
/** Absent and unpicked harnesses are noise once something real happened. */
|
|
324
338
|
function renderSummary(results, uninstall) {
|
|
325
339
|
if (!results.some(actionable))
|
|
@@ -489,6 +503,11 @@ export async function runConnectAll(opts) {
|
|
|
489
503
|
outLine("TinyFish setup summary:");
|
|
490
504
|
for (const line of renderSummary(results, opts.uninstall))
|
|
491
505
|
outLine(line);
|
|
506
|
+
const reload = opts.uninstall ? undefined : reloadHint(results);
|
|
507
|
+
if (reload) {
|
|
508
|
+
outLine("");
|
|
509
|
+
outLine(reload);
|
|
510
|
+
}
|
|
492
511
|
// Before the launch handover: anything printed after it is never seen.
|
|
493
512
|
for (const line of outro)
|
|
494
513
|
errLine(line);
|
|
@@ -549,9 +568,13 @@ export async function runConnectAll(opts) {
|
|
|
549
568
|
}
|
|
550
569
|
return exitCode;
|
|
551
570
|
}
|
|
552
|
-
const FIRST_TASK_PROMPT = "My TinyFish setup just finished — verify it with a real run
|
|
553
|
-
"
|
|
554
|
-
"
|
|
571
|
+
export const FIRST_TASK_PROMPT = "My TinyFish setup just finished — verify it with a real run. Use the MCP server named " +
|
|
572
|
+
"`tinyfish` for every TinyFish tool call; if another TinyFish server is also registered, still " +
|
|
573
|
+
"use `tinyfish` and do not ask me which. Then use the TinyFish search tool to find today's " +
|
|
574
|
+
"top Hacker News story, fetch that page with the TinyFish fetch tool, and give me a two-line " +
|
|
575
|
+
"summary. Show which tools you call. If a tool call comes back blocked or not approved, tell " +
|
|
576
|
+
"me which tool needs approval and how to grant it, then wait for me instead of abandoning the " +
|
|
577
|
+
"task.";
|
|
555
578
|
// Launchable seeded agents, best-first — cursor-agent shares ~/.cursor/mcp.json with the IDE.
|
|
556
579
|
const LAUNCHERS = [
|
|
557
580
|
{ harness: "cursor", args: [FIRST_TASK_PROMPT] },
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const ALL_HARNESSES: readonly ["claude-code", "codex", "cursor", "grok", "hermes", "openclaw", "opencode"];
|
|
2
2
|
export type Harness = (typeof ALL_HARNESSES)[number];
|
|
3
3
|
export declare const HARNESS_DISPLAY_NAMES: Record<Harness, string>;
|
|
4
|
+
/** MCP config is read at startup, so a running harness needs this to see TinyFish. */
|
|
5
|
+
export declare const RELOAD_ACTION: Record<Harness, string>;
|
|
4
6
|
export declare enum Registered {
|
|
5
7
|
Yes = "yes",
|
|
6
8
|
No = "no",
|
|
@@ -20,6 +20,17 @@ export const HARNESS_DISPLAY_NAMES = {
|
|
|
20
20
|
openclaw: "OpenClaw",
|
|
21
21
|
opencode: "OpenCode",
|
|
22
22
|
};
|
|
23
|
+
/** MCP config is read at startup, so a running harness needs this to see TinyFish. */
|
|
24
|
+
export const RELOAD_ACTION = {
|
|
25
|
+
"claude-code": "restart it",
|
|
26
|
+
codex: "restart it",
|
|
27
|
+
// docs.x.ai/build/features/mcp-servers: `r` in /mcps rereads the config.
|
|
28
|
+
grok: "run /mcps and press r",
|
|
29
|
+
hermes: "restart it",
|
|
30
|
+
openclaw: "restart it",
|
|
31
|
+
opencode: "restart it",
|
|
32
|
+
cursor: "reload the window",
|
|
33
|
+
};
|
|
23
34
|
// Values are the wire contract; the report schema derives from these.
|
|
24
35
|
export var Registered;
|
|
25
36
|
(function (Registered) {
|