@tiny-fish/cli 0.48.3-next.389 → 0.48.3-next.391
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.
|
@@ -179,6 +179,18 @@ export async function runGuarded(state, telemetry, body) {
|
|
|
179
179
|
function probeTimeoutMs(client) {
|
|
180
180
|
return client.supportCheck.timeoutMs ?? NON_INTERACTIVE_TIMEOUT_MS;
|
|
181
181
|
}
|
|
182
|
+
// Flags go unseen for reasons besides age; state facts, not causes.
|
|
183
|
+
function unavailableMessage(client, version) {
|
|
184
|
+
const { minVersion } = client.supportCheck;
|
|
185
|
+
const found = version ? ` (found ${version})` : '';
|
|
186
|
+
// Numeric collation orders dotted versions: 7.7.3 sorts after 7.4.13.
|
|
187
|
+
const belowMin = minVersion && (!version || version.localeCompare(minVersion, 'en', { numeric: true }) < 0);
|
|
188
|
+
const required = belowMin
|
|
189
|
+
? ` ${client.displayName} ${minVersion} or newer is required${found}.`
|
|
190
|
+
: '';
|
|
191
|
+
return (`${client.supportCheck.unavailableMessage}${required}` +
|
|
192
|
+
' Set TINYFISH_DEBUG=1 and retry to print the help output TinyFish read.');
|
|
193
|
+
}
|
|
182
194
|
function throwProbeFailure(client, result) {
|
|
183
195
|
throwIfInterrupted(result);
|
|
184
196
|
// A hung probe is a timeout, not a missing capability.
|
|
@@ -188,10 +200,13 @@ function throwProbeFailure(client, result) {
|
|
|
188
200
|
`${probeTimeoutMs(client) / 1000}s. Retry.`, 'timeout', { cause: result.error, failureDetail: spawnFailureDetail(result) });
|
|
189
201
|
}
|
|
190
202
|
// It ran and exited non-zero, so the version is still answerable.
|
|
191
|
-
|
|
203
|
+
debugProbeOutput(client, sanitizeLine(`${result.stdout ?? ''}\n${result.stderr ?? ''}`));
|
|
204
|
+
const harnessVersion = probeHarnessVersion(client);
|
|
205
|
+
throw new ConnectStepError(unavailableMessage(client, harnessVersion), 'harness_command_unsupported', {
|
|
192
206
|
cause: result.error,
|
|
193
|
-
harnessVersion
|
|
194
|
-
|
|
207
|
+
harnessVersion,
|
|
208
|
+
// A spawn error leaves stderr empty; its message is the diagnosis.
|
|
209
|
+
failureDetail: result.error?.message ?? spawnFailureDetail(result),
|
|
195
210
|
});
|
|
196
211
|
}
|
|
197
212
|
function supportProbeOutput(client) {
|
|
@@ -220,8 +235,9 @@ function requireEssential(client, output) {
|
|
|
220
235
|
if (client.supportCheck.patterns.every((pattern) => pattern.test(output)))
|
|
221
236
|
return;
|
|
222
237
|
debugProbeOutput(client, output);
|
|
223
|
-
|
|
224
|
-
|
|
238
|
+
const harnessVersion = probeHarnessVersion(client);
|
|
239
|
+
throw new ConnectStepError(unavailableMessage(client, harnessVersion), 'harness_too_old', {
|
|
240
|
+
harnessVersion,
|
|
225
241
|
});
|
|
226
242
|
}
|
|
227
243
|
/** Absence is a fact; an unknown flag means an upstream rename. */
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// User-facing copy for the harness specs; kept apart so the spec file stays structure.
|
|
2
|
-
// An old install is only one reason a flag can go unseen, so no message asserts the cause.
|
|
3
|
-
const SUPPORT_CHECK_DEBUG_HINT = ' Set TINYFISH_DEBUG=1 and retry to print the help output TinyFish read.';
|
|
4
2
|
export const MCP_ADD_UNAVAILABLE_MESSAGE = 'Could not confirm this Claude Code installation exposes `claude mcp add`: `claude mcp ' +
|
|
5
|
-
'--help` did not list it. Update Claude Code with `claude update` and retry.'
|
|
6
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
3
|
+
'--help` did not list it. Update Claude Code with `claude update` and retry.';
|
|
7
4
|
// `claude mcp login` only exists upstream from Claude Code 2.1.186; older installs still register.
|
|
8
5
|
export const CLAUDE_CODE_KEYED_FALLBACK_NOTE = 'Using your stored TinyFish API key: this Claude Code predates one-command sign-in ' +
|
|
9
6
|
'(`claude mcp login`), so no browser sign-in is needed.';
|
|
@@ -13,8 +10,7 @@ export const CLAUDE_CODE_DEFERRED_AUTH_NOTE = 'TinyFish is registered in Claude
|
|
|
13
10
|
'Run `tinyfish connect claude-code --api-key <key>` instead.';
|
|
14
11
|
export const CODEX_MCP_URL_UNAVAILABLE_MESSAGE = 'Could not confirm this Codex installation supports remote MCP servers: `codex mcp add ' +
|
|
15
12
|
'--help` did not list `--url`. Update Codex and retry, or add TinyFish manually with ' +
|
|
16
|
-
'`codex mcp add`.'
|
|
17
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
13
|
+
'`codex mcp add`.';
|
|
18
14
|
export const CODEX_KEYED_FALLBACK_NOTE = 'Using your stored TinyFish API key: this Codex cannot report whether an OAuth sign-in ' +
|
|
19
15
|
'finished, so no browser sign-in is attempted.';
|
|
20
16
|
export const CODEX_DEFERRED_AUTH_NOTE = 'TinyFish is registered in Codex but not signed in: this Codex predates reliable sign-in ' +
|
|
@@ -22,24 +18,20 @@ export const CODEX_DEFERRED_AUTH_NOTE = 'TinyFish is registered in Codex but not
|
|
|
22
18
|
'`npm install -g @openai/codex@latest` for one-command sign-in.';
|
|
23
19
|
export const HERMES_OAUTH_UNAVAILABLE_MESSAGE = 'Could not confirm this Hermes installation supports one-command MCP authentication: `hermes ' +
|
|
24
20
|
'mcp add --help` did not list `--auth oauth`. Update Hermes and retry, or add TinyFish ' +
|
|
25
|
-
'manually with `hermes mcp add`.'
|
|
26
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
21
|
+
'manually with `hermes mcp add`.';
|
|
27
22
|
export const GROK_HTTP_UNAVAILABLE_MESSAGE = 'Could not confirm this Grok installation supports remote MCP servers: `grok mcp add --help` ' +
|
|
28
23
|
'did not list `--transport`. Update Grok and retry, or add TinyFish manually with ' +
|
|
29
|
-
'`grok mcp add`.'
|
|
30
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
24
|
+
'`grok mcp add`.';
|
|
31
25
|
// Grok has no `mcp login`; sign-in only happens inside the TUI. No key nudge here: a revoked
|
|
32
26
|
// key leaves Grok with no OAuth fallback, and doctor cannot spot that yet (PF-3618).
|
|
33
27
|
export const GROK_SIGN_IN_HINT = 'TinyFish is registered in Grok. Open Grok, run `/mcps`, select tinyfish, and press `i` to ' +
|
|
34
28
|
'sign in.';
|
|
35
29
|
export const OPENCLAW_SKILL_UNAVAILABLE_MESSAGE = 'Could not confirm this OpenClaw installation supports global skill installation: `openclaw ' +
|
|
36
30
|
'skills install --help` did not list `--global`. Update OpenClaw and retry, or install ' +
|
|
37
|
-
'manually with `openclaw skills install @tinyfish/tinyfish --global`.'
|
|
38
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
31
|
+
'manually with `openclaw skills install @tinyfish/tinyfish --global`.';
|
|
39
32
|
export const OPENCODE_MCP_ADD_UNAVAILABLE_MESSAGE = 'Could not confirm this OpenCode installation supports one-command MCP setup: `opencode mcp ' +
|
|
40
33
|
'add --help` did not list `--url`. Update OpenCode and retry, or add TinyFish manually with ' +
|
|
41
|
-
'`opencode mcp add`.'
|
|
42
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
34
|
+
'`opencode mcp add`.';
|
|
43
35
|
// OpenCode is model-agnostic (unlike Claude Code / Codex), so a fresh install can default to a
|
|
44
36
|
// model with no tool support — TinyFish runs entirely on tool calls, so it would fail there.
|
|
45
37
|
export const OPENCODE_MODEL_NOTE = 'Note: TinyFish runs on tool calls, so OpenCode needs a model that supports tool use. Image-only ' +
|
|
@@ -47,9 +39,8 @@ export const OPENCODE_MODEL_NOTE = 'Note: TinyFish runs on tool calls, so OpenCo
|
|
|
47
39
|
"OpenCode's model if the walkthrough can't start.";
|
|
48
40
|
export const KILO_MCP_ADD_UNAVAILABLE_MESSAGE = 'Could not confirm this Kilo Code installation supports remote MCP servers: `kilo mcp add ' +
|
|
49
41
|
'--help` did not list `--url`. Update Kilo Code with `kilo upgrade` and retry, or add ' +
|
|
50
|
-
'TinyFish manually with `kilo mcp add`.'
|
|
51
|
-
SUPPORT_CHECK_DEBUG_HINT;
|
|
42
|
+
'TinyFish manually with `kilo mcp add`.';
|
|
52
43
|
export const HERMES_RESTART_NOTE = 'Restart your Hermes session to pick up TinyFish — Hermes discovers MCP servers at startup.';
|
|
53
44
|
export const CLINE_MCP_ADD_UNAVAILABLE_MESSAGE = 'Could not confirm this Cline installation supports non-interactive MCP setup: `cline mcp add ' +
|
|
54
|
-
'--help` did not list `--transport` and `--yes`. Update Cline with `cline
|
|
55
|
-
|
|
45
|
+
'--help` did not list `--transport` and `--yes`. Update Cline with `npm i -g cline@latest` ' +
|
|
46
|
+
'or `cline --update` and retry.';
|
|
@@ -14,6 +14,8 @@ export interface HarnessSupportCheck {
|
|
|
14
14
|
unknownVariant?: RegExp;
|
|
15
15
|
/** Defaults to NON_INTERACTIVE_TIMEOUT_MS; raise for a slow cold start. */
|
|
16
16
|
timeoutMs?: number;
|
|
17
|
+
/** First release with the probed flags; bisected upstream, not derivable. */
|
|
18
|
+
minVersion?: string;
|
|
17
19
|
unavailableMessage: string;
|
|
18
20
|
}
|
|
19
21
|
/** One entry per harness: every per-harness fact, and no behaviour. */
|
|
@@ -124,6 +126,8 @@ export declare const HARNESS_SPECS: {
|
|
|
124
126
|
args: string[];
|
|
125
127
|
patterns: RegExp[];
|
|
126
128
|
keyAuthPattern: RegExp;
|
|
129
|
+
timeoutMs: number;
|
|
130
|
+
minVersion: string;
|
|
127
131
|
unavailableMessage: string;
|
|
128
132
|
};
|
|
129
133
|
urlStyle: "positional";
|
|
@@ -232,6 +236,7 @@ export declare const HARNESS_SPECS: {
|
|
|
232
236
|
args: string[];
|
|
233
237
|
patterns: RegExp[];
|
|
234
238
|
keyAuthPattern: RegExp;
|
|
239
|
+
minVersion: string;
|
|
235
240
|
unavailableMessage: string;
|
|
236
241
|
};
|
|
237
242
|
urlStyle: "flag";
|
|
@@ -51,6 +51,9 @@ export const HARNESS_SPECS = {
|
|
|
51
51
|
// Without `--yes` the add opens a wizard and exits non-zero off a TTY.
|
|
52
52
|
patterns: [/--transport(?:[\s<=]|$)/m, /--yes(?:[\s<=]|$)/m],
|
|
53
53
|
keyAuthPattern: HEADER_FLAG,
|
|
54
|
+
// Cold start on first run outlasts the 10s default.
|
|
55
|
+
timeoutMs: 30_000,
|
|
56
|
+
minVersion: '3.0.30',
|
|
54
57
|
unavailableMessage: CLINE_MCP_ADD_UNAVAILABLE_MESSAGE,
|
|
55
58
|
},
|
|
56
59
|
urlStyle: 'positional',
|
|
@@ -162,6 +165,7 @@ export const HARNESS_SPECS = {
|
|
|
162
165
|
args: ['mcp', 'add', '--help'],
|
|
163
166
|
patterns: [/--url(?:\s|$)/m],
|
|
164
167
|
keyAuthPattern: HEADER_FLAG,
|
|
168
|
+
minVersion: '7.4.13',
|
|
165
169
|
unavailableMessage: KILO_MCP_ADD_UNAVAILABLE_MESSAGE,
|
|
166
170
|
},
|
|
167
171
|
urlStyle: 'flag',
|