@tiny-fish/cli 0.23.1-next.206 → 0.24.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.
package/dist/lib/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIStatusError, agentRunAsyncResponseSchema, agentRunResponseSchema, agentRunWithStreamingResponseSchema, fetchResponseSchema, browserSessionSchema, searchQueryResponseSchema, TinyFish, runSchema, runStatusSchema, } from "@tiny-fish/sdk";
|
|
2
2
|
import { CONNECT_SOURCE, loadConfig } from "./auth.js";
|
|
3
|
-
import { API_URL_OVERRIDE, CLI_VERSION } from "./constants.js";
|
|
3
|
+
import { API_URL_OVERRIDE, CLI_AGENT_IDENTITY, CLI_VERSION } from "./constants.js";
|
|
4
4
|
import { detectHarness, detectHumanInitiated } from "./harness.js";
|
|
5
5
|
import { captureNotice } from "./notice.js";
|
|
6
6
|
import { ApiError } from "./output.js";
|
|
@@ -34,7 +34,7 @@ class TinyFishCliClient extends TinyFish {
|
|
|
34
34
|
const base = super._buildHeaders();
|
|
35
35
|
const headers = {
|
|
36
36
|
...base,
|
|
37
|
-
"X-TF-Request-Origin":
|
|
37
|
+
"X-TF-Request-Origin": CLI_AGENT_IDENTITY,
|
|
38
38
|
"User-Agent": `${base["User-Agent"] ?? ""} @tiny-fish/cli/${CLI_VERSION}`.trim(),
|
|
39
39
|
};
|
|
40
40
|
// Forwarded explicitly: the pinned published SDK may predate TF_CLIENT_* support.
|
|
@@ -3,7 +3,7 @@ import spawn from "cross-spawn";
|
|
|
3
3
|
import { loadConfig, persistApiKeyToEnvironment, validateKeyFormat, writeConfig } from "./auth.js";
|
|
4
4
|
import { CURSOR_SKILL_TARGET, NATIVE_MCP_CLIENTS, OPENCLAW_SKILL_INSTALL_ARGS, } from "./connect-clients.js";
|
|
5
5
|
import { commandNotFound, ConnectStepError, spawnStepError, throwIfInterrupted, NON_INTERACTIVE_TIMEOUT_MS, } from "./connect-runtime.js";
|
|
6
|
-
import { TINYFISH_CLI_PACKAGE } from "./constants.js";
|
|
6
|
+
import { CLI_AGENT_IDENTITY, TINYFISH_CLI_PACKAGE } from "./constants.js";
|
|
7
7
|
import { installRoot } from "./install-root.js";
|
|
8
8
|
import { errLine } from "./output.js";
|
|
9
9
|
export const SKILL_INSTALL_TIMEOUT_MS = 120_000;
|
|
@@ -66,6 +66,8 @@ function skillAddArgs(skillAgents) {
|
|
|
66
66
|
function skillSpawnEnv() {
|
|
67
67
|
return {
|
|
68
68
|
...process.env,
|
|
69
|
+
// `skills` gates its logo art on agent detection.
|
|
70
|
+
AI_AGENT: CLI_AGENT_IDENTITY,
|
|
69
71
|
PATH: `${path.dirname(process.execPath)}${path.delimiter}${process.env.PATH ?? ""}`,
|
|
70
72
|
};
|
|
71
73
|
}
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const CLI_VERSION: string;
|
|
2
2
|
/** Unversioned: the install site appends `@latest`, the version read must not. */
|
|
3
3
|
export declare const TINYFISH_CLI_PACKAGE = "@tiny-fish/cli";
|
|
4
|
+
export declare const CLI_AGENT_IDENTITY = "tinyfish-cli";
|
|
4
5
|
export declare const BASE_URL: string;
|
|
5
6
|
export declare const API_URL_OVERRIDE: string | undefined;
|
|
6
7
|
/** URL where users can create and manage API keys */
|
package/dist/lib/constants.js
CHANGED
|
@@ -4,6 +4,8 @@ const _pkg = _require("../../package.json");
|
|
|
4
4
|
export const CLI_VERSION = _pkg.version;
|
|
5
5
|
/** Unversioned: the install site appends `@latest`, the version read must not. */
|
|
6
6
|
export const TINYFISH_CLI_PACKAGE = "@tiny-fish/cli";
|
|
7
|
+
// How we identify ourselves to other tools; `skills` echoes it back.
|
|
8
|
+
export const CLI_AGENT_IDENTITY = "tinyfish-cli";
|
|
7
9
|
/** Base URL for the TinyFish API. Override with TINYFISH_API_URL for staging/self-hosted. */
|
|
8
10
|
const apiUrlOverride = process.env["TINYFISH_API_URL"]?.trim() || undefined;
|
|
9
11
|
if (apiUrlOverride) {
|