@tiny-fish/cli 0.27.0 → 0.27.1-next.230
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.
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import spawn from "cross-spawn";
|
|
3
3
|
import { CONNECT_ATTEMPT_ENV, isAttemptId, resolvedApiKey, takePendingConnectAttempt, } from "./auth.js";
|
|
4
4
|
import { CLI_VERSION } from "./constants.js";
|
|
5
|
-
import { detectHumanInitiated } from "./harness.js";
|
|
5
|
+
import { detectHarness, detectHumanInitiated } from "./harness.js";
|
|
6
6
|
import { errLine, sanitizeLine } from "./output.js";
|
|
7
7
|
import { postConnectEvent, telemetryDisabled } from "./setup-telemetry.js";
|
|
8
8
|
import { installSignalGuard } from "./signals.js";
|
|
@@ -241,6 +241,8 @@ export function createConnectTelemetry(mcpUrl, client, opts) {
|
|
|
241
241
|
cli_version: CLI_VERSION,
|
|
242
242
|
// Same signal the usage events carry, so TTY and headless connects can be split.
|
|
243
243
|
is_human_initiated: detectHumanInitiated(),
|
|
244
|
+
// "none", not absent — absent has to keep meaning "CLI too old".
|
|
245
|
+
calling_harness: detectHarness() ?? "none",
|
|
244
246
|
})).catch((error) => {
|
|
245
247
|
// postConnectEvent is total, so this only fires if something inside deliver starts
|
|
246
248
|
// throwing. Same channel postConnectEvent uses for its own failures.
|
package/dist/lib/harness.js
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
// one. OpenClaw drives Claude Code via `sdk-cli`, so its env carries both
|
|
9
9
|
// CLAUDECODE=1 and OPENCLAW_MCP_*; it must be checked before claude-code.
|
|
10
10
|
const hasVarWithPrefix = (env, prefix) => Object.keys(env).some((key) => key.startsWith(prefix));
|
|
11
|
+
// A new name here must also join KNOWN_CALLING_HARNESSES in
|
|
12
|
+
// frontend/app/api/cli/connect-event/route.ts, or connect telemetry buckets it as `other`.
|
|
11
13
|
// First match wins. Base agents (claude-code) go last so embedding wrappers win.
|
|
12
14
|
const HARNESS_FINGERPRINTS = [
|
|
13
15
|
{ name: "openclaw", matches: (env) => hasVarWithPrefix(env, "OPENCLAW_MCP_") },
|