@tiny-fish/cli 0.47.3-next.381 → 0.47.3-next.382
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.
|
@@ -12,6 +12,11 @@ function fixModeOf(options) {
|
|
|
12
12
|
export function telemetryPayload(report, offered, outcomes, options, durationMs) {
|
|
13
13
|
const count = (status) => report.checks.filter((check) => check.status === status).length;
|
|
14
14
|
const failed = report.checks.filter((check) => check.status === 'fail');
|
|
15
|
+
const warned = report.checks.filter((check) => check.status === 'warn');
|
|
16
|
+
const idsOf = (checks) => [...new Set(checks.map((check) => check.id))];
|
|
17
|
+
const harnessesOf = (checks) => [
|
|
18
|
+
...new Set(checks.map((check) => check.harness).filter((h) => h !== null)),
|
|
19
|
+
];
|
|
15
20
|
return {
|
|
16
21
|
outcome: 'completed',
|
|
17
22
|
schema_version: report.schema_version,
|
|
@@ -33,8 +38,10 @@ export function telemetryPayload(report, offered, outcomes, options, durationMs)
|
|
|
33
38
|
// Same signal cli_connect_stage carries, so agent and human doctor runs split.
|
|
34
39
|
is_human_initiated: detectHumanInitiated(),
|
|
35
40
|
// Two flat arrays rather than one of pairs: PostHog groups by element, not by field.
|
|
36
|
-
failed_check_ids:
|
|
37
|
-
failed_harnesses:
|
|
41
|
+
failed_check_ids: idsOf(failed),
|
|
42
|
+
failed_harnesses: harnessesOf(failed),
|
|
43
|
+
warn_check_ids: idsOf(warned),
|
|
44
|
+
warn_harnesses: harnessesOf(warned),
|
|
38
45
|
harnesses: report.harnesses,
|
|
39
46
|
// Clamped, not validated: a --fix parked at a prompt must not fail the parse and drop the run.
|
|
40
47
|
duration_ms: Math.min(durationMs, MAX_DURATION_MS),
|
|
@@ -140,7 +140,15 @@ declare const doctorCompletedPayloadSchema: z.ZodObject<{
|
|
|
140
140
|
all: "all";
|
|
141
141
|
}>;
|
|
142
142
|
is_human_initiated: z.ZodBoolean;
|
|
143
|
-
failed_check_ids: z.ZodArray<z.
|
|
143
|
+
failed_check_ids: z.ZodArray<z.ZodEnum<{
|
|
144
|
+
"cli-version": "cli-version";
|
|
145
|
+
"mcp-connectivity": "mcp-connectivity";
|
|
146
|
+
"harness-registration": "harness-registration";
|
|
147
|
+
"cli-credential": "cli-credential";
|
|
148
|
+
"cli-auth-call": "cli-auth-call";
|
|
149
|
+
"pi-adapter": "pi-adapter";
|
|
150
|
+
"hermes-plugin": "hermes-plugin";
|
|
151
|
+
}>>;
|
|
144
152
|
failed_harnesses: z.ZodArray<z.ZodEnum<{
|
|
145
153
|
openclaw: "openclaw";
|
|
146
154
|
omp: "omp";
|
|
@@ -155,6 +163,29 @@ declare const doctorCompletedPayloadSchema: z.ZodObject<{
|
|
|
155
163
|
cline: "cline";
|
|
156
164
|
"claude-code": "claude-code";
|
|
157
165
|
}>>;
|
|
166
|
+
warn_check_ids: z.ZodArray<z.ZodEnum<{
|
|
167
|
+
"cli-version": "cli-version";
|
|
168
|
+
"mcp-connectivity": "mcp-connectivity";
|
|
169
|
+
"harness-registration": "harness-registration";
|
|
170
|
+
"cli-credential": "cli-credential";
|
|
171
|
+
"cli-auth-call": "cli-auth-call";
|
|
172
|
+
"pi-adapter": "pi-adapter";
|
|
173
|
+
"hermes-plugin": "hermes-plugin";
|
|
174
|
+
}>>;
|
|
175
|
+
warn_harnesses: z.ZodArray<z.ZodEnum<{
|
|
176
|
+
openclaw: "openclaw";
|
|
177
|
+
omp: "omp";
|
|
178
|
+
grok: "grok";
|
|
179
|
+
cursor: "cursor";
|
|
180
|
+
codex: "codex";
|
|
181
|
+
hermes: "hermes";
|
|
182
|
+
"command-code": "command-code";
|
|
183
|
+
kilo: "kilo";
|
|
184
|
+
opencode: "opencode";
|
|
185
|
+
pi: "pi";
|
|
186
|
+
cline: "cline";
|
|
187
|
+
"claude-code": "claude-code";
|
|
188
|
+
}>>;
|
|
158
189
|
harnesses: z.ZodArray<z.ZodObject<{
|
|
159
190
|
harness: z.ZodEnum<{
|
|
160
191
|
openclaw: "openclaw";
|
|
@@ -256,7 +287,15 @@ declare const doctorPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
256
287
|
all: "all";
|
|
257
288
|
}>;
|
|
258
289
|
is_human_initiated: z.ZodBoolean;
|
|
259
|
-
failed_check_ids: z.ZodArray<z.
|
|
290
|
+
failed_check_ids: z.ZodArray<z.ZodEnum<{
|
|
291
|
+
"cli-version": "cli-version";
|
|
292
|
+
"mcp-connectivity": "mcp-connectivity";
|
|
293
|
+
"harness-registration": "harness-registration";
|
|
294
|
+
"cli-credential": "cli-credential";
|
|
295
|
+
"cli-auth-call": "cli-auth-call";
|
|
296
|
+
"pi-adapter": "pi-adapter";
|
|
297
|
+
"hermes-plugin": "hermes-plugin";
|
|
298
|
+
}>>;
|
|
260
299
|
failed_harnesses: z.ZodArray<z.ZodEnum<{
|
|
261
300
|
openclaw: "openclaw";
|
|
262
301
|
omp: "omp";
|
|
@@ -271,6 +310,29 @@ declare const doctorPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
271
310
|
cline: "cline";
|
|
272
311
|
"claude-code": "claude-code";
|
|
273
312
|
}>>;
|
|
313
|
+
warn_check_ids: z.ZodArray<z.ZodEnum<{
|
|
314
|
+
"cli-version": "cli-version";
|
|
315
|
+
"mcp-connectivity": "mcp-connectivity";
|
|
316
|
+
"harness-registration": "harness-registration";
|
|
317
|
+
"cli-credential": "cli-credential";
|
|
318
|
+
"cli-auth-call": "cli-auth-call";
|
|
319
|
+
"pi-adapter": "pi-adapter";
|
|
320
|
+
"hermes-plugin": "hermes-plugin";
|
|
321
|
+
}>>;
|
|
322
|
+
warn_harnesses: z.ZodArray<z.ZodEnum<{
|
|
323
|
+
openclaw: "openclaw";
|
|
324
|
+
omp: "omp";
|
|
325
|
+
grok: "grok";
|
|
326
|
+
cursor: "cursor";
|
|
327
|
+
codex: "codex";
|
|
328
|
+
hermes: "hermes";
|
|
329
|
+
"command-code": "command-code";
|
|
330
|
+
kilo: "kilo";
|
|
331
|
+
opencode: "opencode";
|
|
332
|
+
pi: "pi";
|
|
333
|
+
cline: "cline";
|
|
334
|
+
"claude-code": "claude-code";
|
|
335
|
+
}>>;
|
|
274
336
|
harnesses: z.ZodArray<z.ZodObject<{
|
|
275
337
|
harness: z.ZodEnum<{
|
|
276
338
|
openclaw: "openclaw";
|
|
@@ -2,6 +2,7 @@ import { createHash } from 'node:crypto';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { validateKeyFormat } from './auth.js';
|
|
4
4
|
import { BASE_URL, CLI_INVOCATION_ID, CLI_VERSION } from './constants.js';
|
|
5
|
+
import { CHECK_IDS } from './doctor-report.js';
|
|
5
6
|
import { ALL_HARNESSES, AuthMode, Registered } from './harness/harness-detect.js';
|
|
6
7
|
import { detectHarness, detectRuntimeEnv } from './harness.js';
|
|
7
8
|
import { captureNotice } from './notice.js';
|
|
@@ -260,8 +261,10 @@ const doctorCompletedPayloadSchema = z.object({
|
|
|
260
261
|
harness_scope: z.enum(DOCTOR_HARNESS_SCOPES),
|
|
261
262
|
is_human_initiated: z.boolean(),
|
|
262
263
|
/** Flat and distinct: PostHog cannot group by array elements of an object. */
|
|
263
|
-
failed_check_ids: z.array(z.
|
|
264
|
+
failed_check_ids: z.array(z.enum(CHECK_IDS)).max(32),
|
|
264
265
|
failed_harnesses: z.array(z.enum(ALL_HARNESSES)).max(16),
|
|
266
|
+
warn_check_ids: z.array(z.enum(CHECK_IDS)).max(32),
|
|
267
|
+
warn_harnesses: z.array(z.enum(ALL_HARNESSES)).max(16),
|
|
265
268
|
harnesses: z
|
|
266
269
|
.array(z.object({
|
|
267
270
|
harness: z.enum(ALL_HARNESSES),
|