@vostride/agent-qa-analytics 0.0.1 → 0.2.1
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/LICENSE.md +105 -0
- package/NOTICE.md +11 -0
- package/dist/index.cjs +961 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1772 -0
- package/dist/index.d.ts +1772 -0
- package/dist/index.js +893 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1772 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PostHogOptions } from 'posthog-node';
|
|
3
|
+
import { RunEventEnvelope } from '@vostride/agent-qa-schema';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The metadata key `assertNoUnconstrainedStrings` looks for.
|
|
7
|
+
*
|
|
8
|
+
* A tag alone buys NOTHING — the checker also requires the schema to carry at least one check, so a
|
|
9
|
+
* bare `z.string()` wearing this marker still reds. That is deliberate: an allow-list whose entry
|
|
10
|
+
* condition is "say the magic word" is an allow-list anyone can join, and the planted-tag cell
|
|
11
|
+
* exists to keep it that way.
|
|
12
|
+
*/
|
|
13
|
+
declare const ANALYTICS_VOCABULARY_META_KEY = "analyticsVocabulary";
|
|
14
|
+
declare const ANALYTICS_KNOWN_ID_MARKER = "known-id";
|
|
15
|
+
/**
|
|
16
|
+
* The known-id fields' guards, as FUNCTIONS a host can call (398-10).
|
|
17
|
+
*
|
|
18
|
+
* Published beside the schemas because an emitter has to make the same decision the schema makes
|
|
19
|
+
* and has to make it BEFORE capture: nothing parses an event on the way to the transport, so a
|
|
20
|
+
* foreign string put on `run_id` is not refused, it is SENT — and `run_id` is a known-id codec
|
|
21
|
+
* precisely so that cannot happen. A host filtering ids for itself would need `@vostride/agent-qa-ids`,
|
|
22
|
+
* which the surface firewall does not admit; asking the package that owns the union is the route
|
|
23
|
+
* that exists. Anything that is not a canonical id becomes an absence, which every field allows.
|
|
24
|
+
*/
|
|
25
|
+
declare function analyticsRunId(value: unknown): string | undefined;
|
|
26
|
+
declare function analyticsTestId(value: unknown): string | undefined;
|
|
27
|
+
declare function analyticsSuiteId(value: unknown): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* WHICH HOST EMITTED, and deliberately NOT the 397 D-04 surface roster.
|
|
30
|
+
*
|
|
31
|
+
* 2026-08-17. The roster answers "which invocation doors does the parity suite measure" and is
|
|
32
|
+
* pinned closed at `chat` and `mcp`. This list answers a different question — which process sent
|
|
33
|
+
* the event — and `cli` and `daemon` are real answers to it while being no kind of surface. Tying
|
|
34
|
+
* the two would make a roster change an analytics schema change for no reason, and would make this
|
|
35
|
+
* list wrong the moment a host emits that is not a door.
|
|
36
|
+
*/
|
|
37
|
+
declare const ANALYTICS_EMITTING_HOSTS: readonly ["cli", "chat", "mcp", "daemon"];
|
|
38
|
+
declare const ANALYTICS_RUNTIME_CONTEXTS: readonly ["user", "ci"];
|
|
39
|
+
declare const ANALYTICS_AGENT_PRODUCTS: readonly ["claude_code", "cursor", "gemini_cli", "augment", "goose", "opencode", "codex", "cline", "amp", "unknown"];
|
|
40
|
+
declare const ANALYTICS_TRIGGER_SOURCES: readonly ["cli", "chat", "mcp", "daemon", "unknown"];
|
|
41
|
+
declare const ANALYTICS_RUNNERS: readonly ["local", "browserstack", "unknown"];
|
|
42
|
+
declare const ANALYTICS_PLATFORMS: readonly ["web", "android", "ios", "unknown"];
|
|
43
|
+
declare const ANALYTICS_RUN_STATUSES: readonly ["passed", "failed", "skipped", "cancelled", "timeout", "unknown"];
|
|
44
|
+
declare const ANALYTICS_SUITE_EXECUTION_MODES: readonly ["sequential", "parallel", "unknown"];
|
|
45
|
+
declare const ANALYTICS_FAILURE_CATEGORIES: readonly ["assertion", "timeout", "cancelled", "setup", "hook", "appium", "browser_install", "llm_context", "llm_provider", "memory", "framework", "unknown"];
|
|
46
|
+
declare const ANALYTICS_MCP_SERVER_STATES: readonly ["started", "stopped"];
|
|
47
|
+
declare const ANALYTICS_MCP_TRANSPORTS: readonly ["stdio", "http"];
|
|
48
|
+
declare const ANALYTICS_MCP_TOOL_STATUSES: readonly ["success", "error"];
|
|
49
|
+
declare const ANALYTICS_MCP_ERROR_CATEGORIES: readonly ["validation", "scope_denied", "unknown_tool", "tool_error", "unknown"];
|
|
50
|
+
declare const ANALYTICS_DAEMON_JOB_KINDS: readonly ["run", "suite", "recovery", "unknown"];
|
|
51
|
+
declare const ANALYTICS_DAEMON_JOB_OUTCOMES: readonly ["completed", "failed", "cancelled", "abandoned", "unknown"];
|
|
52
|
+
declare const ANALYTICS_INIT_MODES: readonly ["interactive", "agent", "scaffold"];
|
|
53
|
+
declare const ANALYTICS_INIT_OUTCOMES: readonly ["created", "updated", "unchanged", "failed"];
|
|
54
|
+
declare const ANALYTICS_CHAT_END_REASONS: readonly ["exit", "interrupt", "error", "unknown"];
|
|
55
|
+
/**
|
|
56
|
+
* The MCP tool-name vocabulary, PRODUCED from the declared projection table.
|
|
57
|
+
*
|
|
58
|
+
* Not retyped, on purpose: this is the second consumer of the same twelve names, and the first
|
|
59
|
+
* thing a second transcription does is survive a rename that the first one did not.
|
|
60
|
+
*/
|
|
61
|
+
declare const ANALYTICS_MCP_TOOL_NAMES: [string, ...string[]];
|
|
62
|
+
/**
|
|
63
|
+
* The membership, in the order D-18 states it.
|
|
64
|
+
*
|
|
65
|
+
* The names keep the `agent-qa.` prefix the v33 set used: the events land in a project shared with
|
|
66
|
+
* nothing else today, but a prefix costs nothing and un-prefixing later is a rename of history.
|
|
67
|
+
*/
|
|
68
|
+
declare const ANALYTICS_EVENT_NAMES: readonly ["agent-qa.test_run.completed", "agent-qa.suite_run.completed", "agent-qa.chat.session.completed", "agent-qa.chat.turn.completed", "agent-qa.daemon.job.completed", "agent-qa.mcp.server.lifecycle", "agent-qa.mcp.tool.invoked", "agent-qa.init.completed", "agent-qa.explain.answered", "agent-qa.explain.abstained"];
|
|
69
|
+
type AnalyticsEventName = (typeof ANALYTICS_EVENT_NAMES)[number];
|
|
70
|
+
/**
|
|
71
|
+
* The v33 names that are NOT members, listed rather than merely absent.
|
|
72
|
+
*
|
|
73
|
+
* 2026-08-17 (Phase 398 plan 03, D-18 · RESEARCH Open Question 2). Two different reasons:
|
|
74
|
+
*
|
|
75
|
+
* `analytics.initialized` and `analytics.test_event` were TRANSPORT SELF-TESTS — an event whose
|
|
76
|
+
* only content is "the thing that sends events works" is a diagnostic, and shipping it as product
|
|
77
|
+
* signal means every dashboard has to remember to exclude it. Dropped outright; the zero-network
|
|
78
|
+
* differential in plan 06 is the same claim, proven rather than reported.
|
|
79
|
+
*
|
|
80
|
+
* The three `dashboard.*` rows are dropped BECAUSE THE DASHBOARD IS BEING REBUILT. M5 re-adds
|
|
81
|
+
* what it needs against this port, which is the right moment to decide what a rebuilt dashboard
|
|
82
|
+
* is actually worth measuring — carrying the v1 answers forward would have pre-decided it.
|
|
83
|
+
*
|
|
84
|
+
* RETUNE: a name re-added here must be REMOVED from this list in the same change. The disjointness
|
|
85
|
+
* cell fires if it appears in both, so the two lists cannot quietly disagree.
|
|
86
|
+
*/
|
|
87
|
+
declare const RETIRED_V33_EVENT_NAMES: readonly ["agent-qa.analytics.initialized", "agent-qa.analytics.test_event", "agent-qa.dashboard.opened", "agent-qa.dashboard.live_mode.started", "agent-qa.dashboard.entity.created"];
|
|
88
|
+
declare const ANALYTICS_EVENT_SCHEMA_BY_NAME: {
|
|
89
|
+
readonly 'agent-qa.test_run.completed': z.ZodObject<{
|
|
90
|
+
name: z.ZodLiteral<"agent-qa.test_run.completed">;
|
|
91
|
+
properties: z.ZodObject<{
|
|
92
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
93
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
94
|
+
cli: "cli";
|
|
95
|
+
chat: "chat";
|
|
96
|
+
mcp: "mcp";
|
|
97
|
+
daemon: "daemon";
|
|
98
|
+
}>>;
|
|
99
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
user: "user";
|
|
101
|
+
ci: "ci";
|
|
102
|
+
}>>;
|
|
103
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
104
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
unknown: "unknown";
|
|
106
|
+
claude_code: "claude_code";
|
|
107
|
+
cursor: "cursor";
|
|
108
|
+
gemini_cli: "gemini_cli";
|
|
109
|
+
augment: "augment";
|
|
110
|
+
goose: "goose";
|
|
111
|
+
opencode: "opencode";
|
|
112
|
+
codex: "codex";
|
|
113
|
+
cline: "cline";
|
|
114
|
+
amp: "amp";
|
|
115
|
+
}>>;
|
|
116
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
117
|
+
test_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
118
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
cli: "cli";
|
|
120
|
+
chat: "chat";
|
|
121
|
+
mcp: "mcp";
|
|
122
|
+
daemon: "daemon";
|
|
123
|
+
unknown: "unknown";
|
|
124
|
+
}>>;
|
|
125
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
unknown: "unknown";
|
|
127
|
+
local: "local";
|
|
128
|
+
browserstack: "browserstack";
|
|
129
|
+
}>>;
|
|
130
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
unknown: "unknown";
|
|
132
|
+
web: "web";
|
|
133
|
+
android: "android";
|
|
134
|
+
ios: "ios";
|
|
135
|
+
}>>;
|
|
136
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
unknown: "unknown";
|
|
138
|
+
passed: "passed";
|
|
139
|
+
failed: "failed";
|
|
140
|
+
skipped: "skipped";
|
|
141
|
+
cancelled: "cancelled";
|
|
142
|
+
timeout: "timeout";
|
|
143
|
+
}>>;
|
|
144
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
unknown: "unknown";
|
|
146
|
+
cancelled: "cancelled";
|
|
147
|
+
timeout: "timeout";
|
|
148
|
+
assertion: "assertion";
|
|
149
|
+
setup: "setup";
|
|
150
|
+
hook: "hook";
|
|
151
|
+
appium: "appium";
|
|
152
|
+
browser_install: "browser_install";
|
|
153
|
+
llm_context: "llm_context";
|
|
154
|
+
llm_provider: "llm_provider";
|
|
155
|
+
memory: "memory";
|
|
156
|
+
framework: "framework";
|
|
157
|
+
}>>;
|
|
158
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
160
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
readonly 'agent-qa.suite_run.completed': z.ZodObject<{
|
|
173
|
+
name: z.ZodLiteral<"agent-qa.suite_run.completed">;
|
|
174
|
+
properties: z.ZodObject<{
|
|
175
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
176
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
cli: "cli";
|
|
178
|
+
chat: "chat";
|
|
179
|
+
mcp: "mcp";
|
|
180
|
+
daemon: "daemon";
|
|
181
|
+
}>>;
|
|
182
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
user: "user";
|
|
184
|
+
ci: "ci";
|
|
185
|
+
}>>;
|
|
186
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
187
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
unknown: "unknown";
|
|
189
|
+
claude_code: "claude_code";
|
|
190
|
+
cursor: "cursor";
|
|
191
|
+
gemini_cli: "gemini_cli";
|
|
192
|
+
augment: "augment";
|
|
193
|
+
goose: "goose";
|
|
194
|
+
opencode: "opencode";
|
|
195
|
+
codex: "codex";
|
|
196
|
+
cline: "cline";
|
|
197
|
+
amp: "amp";
|
|
198
|
+
}>>;
|
|
199
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
200
|
+
suite_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
201
|
+
suite_child_count: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
suite_passed_count: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
suite_failed_count: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
suite_skipped_count: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
suite_execution_mode: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
unknown: "unknown";
|
|
207
|
+
sequential: "sequential";
|
|
208
|
+
parallel: "parallel";
|
|
209
|
+
}>>;
|
|
210
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
cli: "cli";
|
|
212
|
+
chat: "chat";
|
|
213
|
+
mcp: "mcp";
|
|
214
|
+
daemon: "daemon";
|
|
215
|
+
unknown: "unknown";
|
|
216
|
+
}>>;
|
|
217
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
unknown: "unknown";
|
|
219
|
+
local: "local";
|
|
220
|
+
browserstack: "browserstack";
|
|
221
|
+
}>>;
|
|
222
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
unknown: "unknown";
|
|
224
|
+
web: "web";
|
|
225
|
+
android: "android";
|
|
226
|
+
ios: "ios";
|
|
227
|
+
}>>;
|
|
228
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
229
|
+
unknown: "unknown";
|
|
230
|
+
passed: "passed";
|
|
231
|
+
failed: "failed";
|
|
232
|
+
skipped: "skipped";
|
|
233
|
+
cancelled: "cancelled";
|
|
234
|
+
timeout: "timeout";
|
|
235
|
+
}>>;
|
|
236
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
unknown: "unknown";
|
|
238
|
+
cancelled: "cancelled";
|
|
239
|
+
timeout: "timeout";
|
|
240
|
+
assertion: "assertion";
|
|
241
|
+
setup: "setup";
|
|
242
|
+
hook: "hook";
|
|
243
|
+
appium: "appium";
|
|
244
|
+
browser_install: "browser_install";
|
|
245
|
+
llm_context: "llm_context";
|
|
246
|
+
llm_provider: "llm_provider";
|
|
247
|
+
memory: "memory";
|
|
248
|
+
framework: "framework";
|
|
249
|
+
}>>;
|
|
250
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
252
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
readonly 'agent-qa.chat.session.completed': z.ZodObject<{
|
|
265
|
+
name: z.ZodLiteral<"agent-qa.chat.session.completed">;
|
|
266
|
+
properties: z.ZodObject<{
|
|
267
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
268
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
269
|
+
cli: "cli";
|
|
270
|
+
chat: "chat";
|
|
271
|
+
mcp: "mcp";
|
|
272
|
+
daemon: "daemon";
|
|
273
|
+
}>>;
|
|
274
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
275
|
+
user: "user";
|
|
276
|
+
ci: "ci";
|
|
277
|
+
}>>;
|
|
278
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
279
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
280
|
+
unknown: "unknown";
|
|
281
|
+
claude_code: "claude_code";
|
|
282
|
+
cursor: "cursor";
|
|
283
|
+
gemini_cli: "gemini_cli";
|
|
284
|
+
augment: "augment";
|
|
285
|
+
goose: "goose";
|
|
286
|
+
opencode: "opencode";
|
|
287
|
+
codex: "codex";
|
|
288
|
+
cline: "cline";
|
|
289
|
+
amp: "amp";
|
|
290
|
+
}>>;
|
|
291
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
292
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
turn_count: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
slash_command_count: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
function_call_count: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
end_reason: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
unknown: "unknown";
|
|
298
|
+
error: "error";
|
|
299
|
+
exit: "exit";
|
|
300
|
+
interrupt: "interrupt";
|
|
301
|
+
}>>;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
}, z.core.$strict>;
|
|
304
|
+
readonly 'agent-qa.chat.turn.completed': z.ZodObject<{
|
|
305
|
+
name: z.ZodLiteral<"agent-qa.chat.turn.completed">;
|
|
306
|
+
properties: z.ZodObject<{
|
|
307
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
308
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
cli: "cli";
|
|
310
|
+
chat: "chat";
|
|
311
|
+
mcp: "mcp";
|
|
312
|
+
daemon: "daemon";
|
|
313
|
+
}>>;
|
|
314
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
315
|
+
user: "user";
|
|
316
|
+
ci: "ci";
|
|
317
|
+
}>>;
|
|
318
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
319
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
320
|
+
unknown: "unknown";
|
|
321
|
+
claude_code: "claude_code";
|
|
322
|
+
cursor: "cursor";
|
|
323
|
+
gemini_cli: "gemini_cli";
|
|
324
|
+
augment: "augment";
|
|
325
|
+
goose: "goose";
|
|
326
|
+
opencode: "opencode";
|
|
327
|
+
codex: "codex";
|
|
328
|
+
cline: "cline";
|
|
329
|
+
amp: "amp";
|
|
330
|
+
}>>;
|
|
331
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
332
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
tool_call_count: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
errored: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
}, z.core.$strict>;
|
|
339
|
+
}, z.core.$strict>;
|
|
340
|
+
readonly 'agent-qa.daemon.job.completed': z.ZodObject<{
|
|
341
|
+
name: z.ZodLiteral<"agent-qa.daemon.job.completed">;
|
|
342
|
+
properties: z.ZodObject<{
|
|
343
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
344
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
345
|
+
cli: "cli";
|
|
346
|
+
chat: "chat";
|
|
347
|
+
mcp: "mcp";
|
|
348
|
+
daemon: "daemon";
|
|
349
|
+
}>>;
|
|
350
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
351
|
+
user: "user";
|
|
352
|
+
ci: "ci";
|
|
353
|
+
}>>;
|
|
354
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
355
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
356
|
+
unknown: "unknown";
|
|
357
|
+
claude_code: "claude_code";
|
|
358
|
+
cursor: "cursor";
|
|
359
|
+
gemini_cli: "gemini_cli";
|
|
360
|
+
augment: "augment";
|
|
361
|
+
goose: "goose";
|
|
362
|
+
opencode: "opencode";
|
|
363
|
+
codex: "codex";
|
|
364
|
+
cline: "cline";
|
|
365
|
+
amp: "amp";
|
|
366
|
+
}>>;
|
|
367
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
368
|
+
job_kind: z.ZodOptional<z.ZodEnum<{
|
|
369
|
+
unknown: "unknown";
|
|
370
|
+
run: "run";
|
|
371
|
+
suite: "suite";
|
|
372
|
+
recovery: "recovery";
|
|
373
|
+
}>>;
|
|
374
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
375
|
+
unknown: "unknown";
|
|
376
|
+
failed: "failed";
|
|
377
|
+
cancelled: "cancelled";
|
|
378
|
+
completed: "completed";
|
|
379
|
+
abandoned: "abandoned";
|
|
380
|
+
}>>;
|
|
381
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
attempt_count: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
}, z.core.$strict>;
|
|
386
|
+
readonly 'agent-qa.mcp.server.lifecycle': z.ZodObject<{
|
|
387
|
+
name: z.ZodLiteral<"agent-qa.mcp.server.lifecycle">;
|
|
388
|
+
properties: z.ZodObject<{
|
|
389
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
390
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
391
|
+
cli: "cli";
|
|
392
|
+
chat: "chat";
|
|
393
|
+
mcp: "mcp";
|
|
394
|
+
daemon: "daemon";
|
|
395
|
+
}>>;
|
|
396
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
397
|
+
user: "user";
|
|
398
|
+
ci: "ci";
|
|
399
|
+
}>>;
|
|
400
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
401
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
unknown: "unknown";
|
|
403
|
+
claude_code: "claude_code";
|
|
404
|
+
cursor: "cursor";
|
|
405
|
+
gemini_cli: "gemini_cli";
|
|
406
|
+
augment: "augment";
|
|
407
|
+
goose: "goose";
|
|
408
|
+
opencode: "opencode";
|
|
409
|
+
codex: "codex";
|
|
410
|
+
cline: "cline";
|
|
411
|
+
amp: "amp";
|
|
412
|
+
}>>;
|
|
413
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
414
|
+
mcp_server_state: z.ZodOptional<z.ZodEnum<{
|
|
415
|
+
started: "started";
|
|
416
|
+
stopped: "stopped";
|
|
417
|
+
}>>;
|
|
418
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
419
|
+
stdio: "stdio";
|
|
420
|
+
http: "http";
|
|
421
|
+
}>>;
|
|
422
|
+
mcp_tool_count: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
}, z.core.$strict>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
readonly 'agent-qa.mcp.tool.invoked': z.ZodObject<{
|
|
426
|
+
name: z.ZodLiteral<"agent-qa.mcp.tool.invoked">;
|
|
427
|
+
properties: z.ZodObject<{
|
|
428
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
429
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
430
|
+
cli: "cli";
|
|
431
|
+
chat: "chat";
|
|
432
|
+
mcp: "mcp";
|
|
433
|
+
daemon: "daemon";
|
|
434
|
+
}>>;
|
|
435
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
436
|
+
user: "user";
|
|
437
|
+
ci: "ci";
|
|
438
|
+
}>>;
|
|
439
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
440
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
441
|
+
unknown: "unknown";
|
|
442
|
+
claude_code: "claude_code";
|
|
443
|
+
cursor: "cursor";
|
|
444
|
+
gemini_cli: "gemini_cli";
|
|
445
|
+
augment: "augment";
|
|
446
|
+
goose: "goose";
|
|
447
|
+
opencode: "opencode";
|
|
448
|
+
codex: "codex";
|
|
449
|
+
cline: "cline";
|
|
450
|
+
amp: "amp";
|
|
451
|
+
}>>;
|
|
452
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
453
|
+
tool_name: z.ZodOptional<z.ZodEnum<{
|
|
454
|
+
[x: string]: string;
|
|
455
|
+
}>>;
|
|
456
|
+
mcp_tool_status: z.ZodOptional<z.ZodEnum<{
|
|
457
|
+
error: "error";
|
|
458
|
+
success: "success";
|
|
459
|
+
}>>;
|
|
460
|
+
mcp_error_category: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
unknown: "unknown";
|
|
462
|
+
validation: "validation";
|
|
463
|
+
scope_denied: "scope_denied";
|
|
464
|
+
unknown_tool: "unknown_tool";
|
|
465
|
+
tool_error: "tool_error";
|
|
466
|
+
}>>;
|
|
467
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
468
|
+
stdio: "stdio";
|
|
469
|
+
http: "http";
|
|
470
|
+
}>>;
|
|
471
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
}, z.core.$strict>;
|
|
473
|
+
}, z.core.$strict>;
|
|
474
|
+
readonly 'agent-qa.init.completed': z.ZodObject<{
|
|
475
|
+
name: z.ZodLiteral<"agent-qa.init.completed">;
|
|
476
|
+
properties: z.ZodObject<{
|
|
477
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
478
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
479
|
+
cli: "cli";
|
|
480
|
+
chat: "chat";
|
|
481
|
+
mcp: "mcp";
|
|
482
|
+
daemon: "daemon";
|
|
483
|
+
}>>;
|
|
484
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
485
|
+
user: "user";
|
|
486
|
+
ci: "ci";
|
|
487
|
+
}>>;
|
|
488
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
489
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
490
|
+
unknown: "unknown";
|
|
491
|
+
claude_code: "claude_code";
|
|
492
|
+
cursor: "cursor";
|
|
493
|
+
gemini_cli: "gemini_cli";
|
|
494
|
+
augment: "augment";
|
|
495
|
+
goose: "goose";
|
|
496
|
+
opencode: "opencode";
|
|
497
|
+
codex: "codex";
|
|
498
|
+
cline: "cline";
|
|
499
|
+
amp: "amp";
|
|
500
|
+
}>>;
|
|
501
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
502
|
+
init_mode: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
interactive: "interactive";
|
|
504
|
+
agent: "agent";
|
|
505
|
+
scaffold: "scaffold";
|
|
506
|
+
}>>;
|
|
507
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
failed: "failed";
|
|
509
|
+
created: "created";
|
|
510
|
+
updated: "updated";
|
|
511
|
+
unchanged: "unchanged";
|
|
512
|
+
}>>;
|
|
513
|
+
created_file_count: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
}, z.core.$strict>;
|
|
516
|
+
}, z.core.$strict>;
|
|
517
|
+
readonly 'agent-qa.explain.answered': z.ZodObject<{
|
|
518
|
+
name: z.ZodLiteral<"agent-qa.explain.answered">;
|
|
519
|
+
properties: z.ZodObject<{
|
|
520
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
521
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
522
|
+
cli: "cli";
|
|
523
|
+
chat: "chat";
|
|
524
|
+
mcp: "mcp";
|
|
525
|
+
daemon: "daemon";
|
|
526
|
+
}>>;
|
|
527
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
528
|
+
user: "user";
|
|
529
|
+
ci: "ci";
|
|
530
|
+
}>>;
|
|
531
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
532
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
533
|
+
unknown: "unknown";
|
|
534
|
+
claude_code: "claude_code";
|
|
535
|
+
cursor: "cursor";
|
|
536
|
+
gemini_cli: "gemini_cli";
|
|
537
|
+
augment: "augment";
|
|
538
|
+
goose: "goose";
|
|
539
|
+
opencode: "opencode";
|
|
540
|
+
codex: "codex";
|
|
541
|
+
cline: "cline";
|
|
542
|
+
amp: "amp";
|
|
543
|
+
}>>;
|
|
544
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
545
|
+
cited_row_count: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
547
|
+
}, z.core.$strict>;
|
|
548
|
+
}, z.core.$strict>;
|
|
549
|
+
readonly 'agent-qa.explain.abstained': z.ZodObject<{
|
|
550
|
+
name: z.ZodLiteral<"agent-qa.explain.abstained">;
|
|
551
|
+
properties: z.ZodObject<{
|
|
552
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
553
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
554
|
+
cli: "cli";
|
|
555
|
+
chat: "chat";
|
|
556
|
+
mcp: "mcp";
|
|
557
|
+
daemon: "daemon";
|
|
558
|
+
}>>;
|
|
559
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
560
|
+
user: "user";
|
|
561
|
+
ci: "ci";
|
|
562
|
+
}>>;
|
|
563
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
564
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
unknown: "unknown";
|
|
566
|
+
claude_code: "claude_code";
|
|
567
|
+
cursor: "cursor";
|
|
568
|
+
gemini_cli: "gemini_cli";
|
|
569
|
+
augment: "augment";
|
|
570
|
+
goose: "goose";
|
|
571
|
+
opencode: "opencode";
|
|
572
|
+
codex: "codex";
|
|
573
|
+
cline: "cline";
|
|
574
|
+
amp: "amp";
|
|
575
|
+
}>>;
|
|
576
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
577
|
+
suggested_row_count: z.ZodOptional<z.ZodNumber>;
|
|
578
|
+
catalog_empty: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
}, z.core.$strict>;
|
|
581
|
+
}, z.core.$strict>;
|
|
582
|
+
};
|
|
583
|
+
declare const ANALYTICS_EVENT_MEMBERS: readonly [z.ZodObject<{
|
|
584
|
+
name: z.ZodLiteral<"agent-qa.test_run.completed">;
|
|
585
|
+
properties: z.ZodObject<{
|
|
586
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
587
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
588
|
+
cli: "cli";
|
|
589
|
+
chat: "chat";
|
|
590
|
+
mcp: "mcp";
|
|
591
|
+
daemon: "daemon";
|
|
592
|
+
}>>;
|
|
593
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
594
|
+
user: "user";
|
|
595
|
+
ci: "ci";
|
|
596
|
+
}>>;
|
|
597
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
598
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
599
|
+
unknown: "unknown";
|
|
600
|
+
claude_code: "claude_code";
|
|
601
|
+
cursor: "cursor";
|
|
602
|
+
gemini_cli: "gemini_cli";
|
|
603
|
+
augment: "augment";
|
|
604
|
+
goose: "goose";
|
|
605
|
+
opencode: "opencode";
|
|
606
|
+
codex: "codex";
|
|
607
|
+
cline: "cline";
|
|
608
|
+
amp: "amp";
|
|
609
|
+
}>>;
|
|
610
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
611
|
+
test_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
612
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
613
|
+
cli: "cli";
|
|
614
|
+
chat: "chat";
|
|
615
|
+
mcp: "mcp";
|
|
616
|
+
daemon: "daemon";
|
|
617
|
+
unknown: "unknown";
|
|
618
|
+
}>>;
|
|
619
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
620
|
+
unknown: "unknown";
|
|
621
|
+
local: "local";
|
|
622
|
+
browserstack: "browserstack";
|
|
623
|
+
}>>;
|
|
624
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
625
|
+
unknown: "unknown";
|
|
626
|
+
web: "web";
|
|
627
|
+
android: "android";
|
|
628
|
+
ios: "ios";
|
|
629
|
+
}>>;
|
|
630
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
631
|
+
unknown: "unknown";
|
|
632
|
+
passed: "passed";
|
|
633
|
+
failed: "failed";
|
|
634
|
+
skipped: "skipped";
|
|
635
|
+
cancelled: "cancelled";
|
|
636
|
+
timeout: "timeout";
|
|
637
|
+
}>>;
|
|
638
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
639
|
+
unknown: "unknown";
|
|
640
|
+
cancelled: "cancelled";
|
|
641
|
+
timeout: "timeout";
|
|
642
|
+
assertion: "assertion";
|
|
643
|
+
setup: "setup";
|
|
644
|
+
hook: "hook";
|
|
645
|
+
appium: "appium";
|
|
646
|
+
browser_install: "browser_install";
|
|
647
|
+
llm_context: "llm_context";
|
|
648
|
+
llm_provider: "llm_provider";
|
|
649
|
+
memory: "memory";
|
|
650
|
+
framework: "framework";
|
|
651
|
+
}>>;
|
|
652
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
653
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
654
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
655
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
656
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
657
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
658
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
659
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
660
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
661
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
662
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
663
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
664
|
+
}, z.core.$strict>;
|
|
665
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
666
|
+
name: z.ZodLiteral<"agent-qa.suite_run.completed">;
|
|
667
|
+
properties: z.ZodObject<{
|
|
668
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
669
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
670
|
+
cli: "cli";
|
|
671
|
+
chat: "chat";
|
|
672
|
+
mcp: "mcp";
|
|
673
|
+
daemon: "daemon";
|
|
674
|
+
}>>;
|
|
675
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
676
|
+
user: "user";
|
|
677
|
+
ci: "ci";
|
|
678
|
+
}>>;
|
|
679
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
680
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
681
|
+
unknown: "unknown";
|
|
682
|
+
claude_code: "claude_code";
|
|
683
|
+
cursor: "cursor";
|
|
684
|
+
gemini_cli: "gemini_cli";
|
|
685
|
+
augment: "augment";
|
|
686
|
+
goose: "goose";
|
|
687
|
+
opencode: "opencode";
|
|
688
|
+
codex: "codex";
|
|
689
|
+
cline: "cline";
|
|
690
|
+
amp: "amp";
|
|
691
|
+
}>>;
|
|
692
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
693
|
+
suite_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
694
|
+
suite_child_count: z.ZodOptional<z.ZodNumber>;
|
|
695
|
+
suite_passed_count: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
suite_failed_count: z.ZodOptional<z.ZodNumber>;
|
|
697
|
+
suite_skipped_count: z.ZodOptional<z.ZodNumber>;
|
|
698
|
+
suite_execution_mode: z.ZodOptional<z.ZodEnum<{
|
|
699
|
+
unknown: "unknown";
|
|
700
|
+
sequential: "sequential";
|
|
701
|
+
parallel: "parallel";
|
|
702
|
+
}>>;
|
|
703
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
704
|
+
cli: "cli";
|
|
705
|
+
chat: "chat";
|
|
706
|
+
mcp: "mcp";
|
|
707
|
+
daemon: "daemon";
|
|
708
|
+
unknown: "unknown";
|
|
709
|
+
}>>;
|
|
710
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
711
|
+
unknown: "unknown";
|
|
712
|
+
local: "local";
|
|
713
|
+
browserstack: "browserstack";
|
|
714
|
+
}>>;
|
|
715
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
716
|
+
unknown: "unknown";
|
|
717
|
+
web: "web";
|
|
718
|
+
android: "android";
|
|
719
|
+
ios: "ios";
|
|
720
|
+
}>>;
|
|
721
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
722
|
+
unknown: "unknown";
|
|
723
|
+
passed: "passed";
|
|
724
|
+
failed: "failed";
|
|
725
|
+
skipped: "skipped";
|
|
726
|
+
cancelled: "cancelled";
|
|
727
|
+
timeout: "timeout";
|
|
728
|
+
}>>;
|
|
729
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
730
|
+
unknown: "unknown";
|
|
731
|
+
cancelled: "cancelled";
|
|
732
|
+
timeout: "timeout";
|
|
733
|
+
assertion: "assertion";
|
|
734
|
+
setup: "setup";
|
|
735
|
+
hook: "hook";
|
|
736
|
+
appium: "appium";
|
|
737
|
+
browser_install: "browser_install";
|
|
738
|
+
llm_context: "llm_context";
|
|
739
|
+
llm_provider: "llm_provider";
|
|
740
|
+
memory: "memory";
|
|
741
|
+
framework: "framework";
|
|
742
|
+
}>>;
|
|
743
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
744
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
745
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
746
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
747
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
748
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
749
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
752
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
753
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
754
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
755
|
+
}, z.core.$strict>;
|
|
756
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
757
|
+
name: z.ZodLiteral<"agent-qa.chat.session.completed">;
|
|
758
|
+
properties: z.ZodObject<{
|
|
759
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
760
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
761
|
+
cli: "cli";
|
|
762
|
+
chat: "chat";
|
|
763
|
+
mcp: "mcp";
|
|
764
|
+
daemon: "daemon";
|
|
765
|
+
}>>;
|
|
766
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
767
|
+
user: "user";
|
|
768
|
+
ci: "ci";
|
|
769
|
+
}>>;
|
|
770
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
771
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
772
|
+
unknown: "unknown";
|
|
773
|
+
claude_code: "claude_code";
|
|
774
|
+
cursor: "cursor";
|
|
775
|
+
gemini_cli: "gemini_cli";
|
|
776
|
+
augment: "augment";
|
|
777
|
+
goose: "goose";
|
|
778
|
+
opencode: "opencode";
|
|
779
|
+
codex: "codex";
|
|
780
|
+
cline: "cline";
|
|
781
|
+
amp: "amp";
|
|
782
|
+
}>>;
|
|
783
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
784
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
turn_count: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
slash_command_count: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
function_call_count: z.ZodOptional<z.ZodNumber>;
|
|
788
|
+
end_reason: z.ZodOptional<z.ZodEnum<{
|
|
789
|
+
unknown: "unknown";
|
|
790
|
+
error: "error";
|
|
791
|
+
exit: "exit";
|
|
792
|
+
interrupt: "interrupt";
|
|
793
|
+
}>>;
|
|
794
|
+
}, z.core.$strict>;
|
|
795
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
796
|
+
name: z.ZodLiteral<"agent-qa.chat.turn.completed">;
|
|
797
|
+
properties: z.ZodObject<{
|
|
798
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
799
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
800
|
+
cli: "cli";
|
|
801
|
+
chat: "chat";
|
|
802
|
+
mcp: "mcp";
|
|
803
|
+
daemon: "daemon";
|
|
804
|
+
}>>;
|
|
805
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
806
|
+
user: "user";
|
|
807
|
+
ci: "ci";
|
|
808
|
+
}>>;
|
|
809
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
810
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
811
|
+
unknown: "unknown";
|
|
812
|
+
claude_code: "claude_code";
|
|
813
|
+
cursor: "cursor";
|
|
814
|
+
gemini_cli: "gemini_cli";
|
|
815
|
+
augment: "augment";
|
|
816
|
+
goose: "goose";
|
|
817
|
+
opencode: "opencode";
|
|
818
|
+
codex: "codex";
|
|
819
|
+
cline: "cline";
|
|
820
|
+
amp: "amp";
|
|
821
|
+
}>>;
|
|
822
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
823
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
824
|
+
tool_call_count: z.ZodOptional<z.ZodNumber>;
|
|
825
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
826
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
827
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
828
|
+
errored: z.ZodOptional<z.ZodBoolean>;
|
|
829
|
+
}, z.core.$strict>;
|
|
830
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
831
|
+
name: z.ZodLiteral<"agent-qa.daemon.job.completed">;
|
|
832
|
+
properties: z.ZodObject<{
|
|
833
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
834
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
835
|
+
cli: "cli";
|
|
836
|
+
chat: "chat";
|
|
837
|
+
mcp: "mcp";
|
|
838
|
+
daemon: "daemon";
|
|
839
|
+
}>>;
|
|
840
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
841
|
+
user: "user";
|
|
842
|
+
ci: "ci";
|
|
843
|
+
}>>;
|
|
844
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
845
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
846
|
+
unknown: "unknown";
|
|
847
|
+
claude_code: "claude_code";
|
|
848
|
+
cursor: "cursor";
|
|
849
|
+
gemini_cli: "gemini_cli";
|
|
850
|
+
augment: "augment";
|
|
851
|
+
goose: "goose";
|
|
852
|
+
opencode: "opencode";
|
|
853
|
+
codex: "codex";
|
|
854
|
+
cline: "cline";
|
|
855
|
+
amp: "amp";
|
|
856
|
+
}>>;
|
|
857
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
858
|
+
job_kind: z.ZodOptional<z.ZodEnum<{
|
|
859
|
+
unknown: "unknown";
|
|
860
|
+
run: "run";
|
|
861
|
+
suite: "suite";
|
|
862
|
+
recovery: "recovery";
|
|
863
|
+
}>>;
|
|
864
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
865
|
+
unknown: "unknown";
|
|
866
|
+
failed: "failed";
|
|
867
|
+
cancelled: "cancelled";
|
|
868
|
+
completed: "completed";
|
|
869
|
+
abandoned: "abandoned";
|
|
870
|
+
}>>;
|
|
871
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
872
|
+
attempt_count: z.ZodOptional<z.ZodNumber>;
|
|
873
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
874
|
+
}, z.core.$strict>;
|
|
875
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
876
|
+
name: z.ZodLiteral<"agent-qa.mcp.server.lifecycle">;
|
|
877
|
+
properties: z.ZodObject<{
|
|
878
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
879
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
880
|
+
cli: "cli";
|
|
881
|
+
chat: "chat";
|
|
882
|
+
mcp: "mcp";
|
|
883
|
+
daemon: "daemon";
|
|
884
|
+
}>>;
|
|
885
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
886
|
+
user: "user";
|
|
887
|
+
ci: "ci";
|
|
888
|
+
}>>;
|
|
889
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
890
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
891
|
+
unknown: "unknown";
|
|
892
|
+
claude_code: "claude_code";
|
|
893
|
+
cursor: "cursor";
|
|
894
|
+
gemini_cli: "gemini_cli";
|
|
895
|
+
augment: "augment";
|
|
896
|
+
goose: "goose";
|
|
897
|
+
opencode: "opencode";
|
|
898
|
+
codex: "codex";
|
|
899
|
+
cline: "cline";
|
|
900
|
+
amp: "amp";
|
|
901
|
+
}>>;
|
|
902
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
903
|
+
mcp_server_state: z.ZodOptional<z.ZodEnum<{
|
|
904
|
+
started: "started";
|
|
905
|
+
stopped: "stopped";
|
|
906
|
+
}>>;
|
|
907
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
908
|
+
stdio: "stdio";
|
|
909
|
+
http: "http";
|
|
910
|
+
}>>;
|
|
911
|
+
mcp_tool_count: z.ZodOptional<z.ZodNumber>;
|
|
912
|
+
}, z.core.$strict>;
|
|
913
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
914
|
+
name: z.ZodLiteral<"agent-qa.mcp.tool.invoked">;
|
|
915
|
+
properties: z.ZodObject<{
|
|
916
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
917
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
918
|
+
cli: "cli";
|
|
919
|
+
chat: "chat";
|
|
920
|
+
mcp: "mcp";
|
|
921
|
+
daemon: "daemon";
|
|
922
|
+
}>>;
|
|
923
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
924
|
+
user: "user";
|
|
925
|
+
ci: "ci";
|
|
926
|
+
}>>;
|
|
927
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
928
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
929
|
+
unknown: "unknown";
|
|
930
|
+
claude_code: "claude_code";
|
|
931
|
+
cursor: "cursor";
|
|
932
|
+
gemini_cli: "gemini_cli";
|
|
933
|
+
augment: "augment";
|
|
934
|
+
goose: "goose";
|
|
935
|
+
opencode: "opencode";
|
|
936
|
+
codex: "codex";
|
|
937
|
+
cline: "cline";
|
|
938
|
+
amp: "amp";
|
|
939
|
+
}>>;
|
|
940
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
941
|
+
tool_name: z.ZodOptional<z.ZodEnum<{
|
|
942
|
+
[x: string]: string;
|
|
943
|
+
}>>;
|
|
944
|
+
mcp_tool_status: z.ZodOptional<z.ZodEnum<{
|
|
945
|
+
error: "error";
|
|
946
|
+
success: "success";
|
|
947
|
+
}>>;
|
|
948
|
+
mcp_error_category: z.ZodOptional<z.ZodEnum<{
|
|
949
|
+
unknown: "unknown";
|
|
950
|
+
validation: "validation";
|
|
951
|
+
scope_denied: "scope_denied";
|
|
952
|
+
unknown_tool: "unknown_tool";
|
|
953
|
+
tool_error: "tool_error";
|
|
954
|
+
}>>;
|
|
955
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
956
|
+
stdio: "stdio";
|
|
957
|
+
http: "http";
|
|
958
|
+
}>>;
|
|
959
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
960
|
+
}, z.core.$strict>;
|
|
961
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
962
|
+
name: z.ZodLiteral<"agent-qa.init.completed">;
|
|
963
|
+
properties: z.ZodObject<{
|
|
964
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
965
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
966
|
+
cli: "cli";
|
|
967
|
+
chat: "chat";
|
|
968
|
+
mcp: "mcp";
|
|
969
|
+
daemon: "daemon";
|
|
970
|
+
}>>;
|
|
971
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
972
|
+
user: "user";
|
|
973
|
+
ci: "ci";
|
|
974
|
+
}>>;
|
|
975
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
976
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
977
|
+
unknown: "unknown";
|
|
978
|
+
claude_code: "claude_code";
|
|
979
|
+
cursor: "cursor";
|
|
980
|
+
gemini_cli: "gemini_cli";
|
|
981
|
+
augment: "augment";
|
|
982
|
+
goose: "goose";
|
|
983
|
+
opencode: "opencode";
|
|
984
|
+
codex: "codex";
|
|
985
|
+
cline: "cline";
|
|
986
|
+
amp: "amp";
|
|
987
|
+
}>>;
|
|
988
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
989
|
+
init_mode: z.ZodOptional<z.ZodEnum<{
|
|
990
|
+
interactive: "interactive";
|
|
991
|
+
agent: "agent";
|
|
992
|
+
scaffold: "scaffold";
|
|
993
|
+
}>>;
|
|
994
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
995
|
+
failed: "failed";
|
|
996
|
+
created: "created";
|
|
997
|
+
updated: "updated";
|
|
998
|
+
unchanged: "unchanged";
|
|
999
|
+
}>>;
|
|
1000
|
+
created_file_count: z.ZodOptional<z.ZodNumber>;
|
|
1001
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
}, z.core.$strict>;
|
|
1003
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1004
|
+
name: z.ZodLiteral<"agent-qa.explain.answered">;
|
|
1005
|
+
properties: z.ZodObject<{
|
|
1006
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1008
|
+
cli: "cli";
|
|
1009
|
+
chat: "chat";
|
|
1010
|
+
mcp: "mcp";
|
|
1011
|
+
daemon: "daemon";
|
|
1012
|
+
}>>;
|
|
1013
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1014
|
+
user: "user";
|
|
1015
|
+
ci: "ci";
|
|
1016
|
+
}>>;
|
|
1017
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1018
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1019
|
+
unknown: "unknown";
|
|
1020
|
+
claude_code: "claude_code";
|
|
1021
|
+
cursor: "cursor";
|
|
1022
|
+
gemini_cli: "gemini_cli";
|
|
1023
|
+
augment: "augment";
|
|
1024
|
+
goose: "goose";
|
|
1025
|
+
opencode: "opencode";
|
|
1026
|
+
codex: "codex";
|
|
1027
|
+
cline: "cline";
|
|
1028
|
+
amp: "amp";
|
|
1029
|
+
}>>;
|
|
1030
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1031
|
+
cited_row_count: z.ZodOptional<z.ZodNumber>;
|
|
1032
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1033
|
+
}, z.core.$strict>;
|
|
1034
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1035
|
+
name: z.ZodLiteral<"agent-qa.explain.abstained">;
|
|
1036
|
+
properties: z.ZodObject<{
|
|
1037
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1039
|
+
cli: "cli";
|
|
1040
|
+
chat: "chat";
|
|
1041
|
+
mcp: "mcp";
|
|
1042
|
+
daemon: "daemon";
|
|
1043
|
+
}>>;
|
|
1044
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1045
|
+
user: "user";
|
|
1046
|
+
ci: "ci";
|
|
1047
|
+
}>>;
|
|
1048
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1049
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1050
|
+
unknown: "unknown";
|
|
1051
|
+
claude_code: "claude_code";
|
|
1052
|
+
cursor: "cursor";
|
|
1053
|
+
gemini_cli: "gemini_cli";
|
|
1054
|
+
augment: "augment";
|
|
1055
|
+
goose: "goose";
|
|
1056
|
+
opencode: "opencode";
|
|
1057
|
+
codex: "codex";
|
|
1058
|
+
cline: "cline";
|
|
1059
|
+
amp: "amp";
|
|
1060
|
+
}>>;
|
|
1061
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1062
|
+
suggested_row_count: z.ZodOptional<z.ZodNumber>;
|
|
1063
|
+
catalog_empty: z.ZodOptional<z.ZodBoolean>;
|
|
1064
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1065
|
+
}, z.core.$strict>;
|
|
1066
|
+
}, z.core.$strict>];
|
|
1067
|
+
declare const AgentQaAnalyticsEventSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
1068
|
+
name: z.ZodLiteral<"agent-qa.test_run.completed">;
|
|
1069
|
+
properties: z.ZodObject<{
|
|
1070
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1071
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1072
|
+
cli: "cli";
|
|
1073
|
+
chat: "chat";
|
|
1074
|
+
mcp: "mcp";
|
|
1075
|
+
daemon: "daemon";
|
|
1076
|
+
}>>;
|
|
1077
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1078
|
+
user: "user";
|
|
1079
|
+
ci: "ci";
|
|
1080
|
+
}>>;
|
|
1081
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1082
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1083
|
+
unknown: "unknown";
|
|
1084
|
+
claude_code: "claude_code";
|
|
1085
|
+
cursor: "cursor";
|
|
1086
|
+
gemini_cli: "gemini_cli";
|
|
1087
|
+
augment: "augment";
|
|
1088
|
+
goose: "goose";
|
|
1089
|
+
opencode: "opencode";
|
|
1090
|
+
codex: "codex";
|
|
1091
|
+
cline: "cline";
|
|
1092
|
+
amp: "amp";
|
|
1093
|
+
}>>;
|
|
1094
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1095
|
+
test_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
1096
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
1097
|
+
cli: "cli";
|
|
1098
|
+
chat: "chat";
|
|
1099
|
+
mcp: "mcp";
|
|
1100
|
+
daemon: "daemon";
|
|
1101
|
+
unknown: "unknown";
|
|
1102
|
+
}>>;
|
|
1103
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1104
|
+
unknown: "unknown";
|
|
1105
|
+
local: "local";
|
|
1106
|
+
browserstack: "browserstack";
|
|
1107
|
+
}>>;
|
|
1108
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
1109
|
+
unknown: "unknown";
|
|
1110
|
+
web: "web";
|
|
1111
|
+
android: "android";
|
|
1112
|
+
ios: "ios";
|
|
1113
|
+
}>>;
|
|
1114
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1115
|
+
unknown: "unknown";
|
|
1116
|
+
passed: "passed";
|
|
1117
|
+
failed: "failed";
|
|
1118
|
+
skipped: "skipped";
|
|
1119
|
+
cancelled: "cancelled";
|
|
1120
|
+
timeout: "timeout";
|
|
1121
|
+
}>>;
|
|
1122
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
1123
|
+
unknown: "unknown";
|
|
1124
|
+
cancelled: "cancelled";
|
|
1125
|
+
timeout: "timeout";
|
|
1126
|
+
assertion: "assertion";
|
|
1127
|
+
setup: "setup";
|
|
1128
|
+
hook: "hook";
|
|
1129
|
+
appium: "appium";
|
|
1130
|
+
browser_install: "browser_install";
|
|
1131
|
+
llm_context: "llm_context";
|
|
1132
|
+
llm_provider: "llm_provider";
|
|
1133
|
+
memory: "memory";
|
|
1134
|
+
framework: "framework";
|
|
1135
|
+
}>>;
|
|
1136
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1137
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
1138
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
1139
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1140
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1141
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1142
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
1143
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1144
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1145
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1146
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
1147
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1148
|
+
}, z.core.$strict>;
|
|
1149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1150
|
+
name: z.ZodLiteral<"agent-qa.suite_run.completed">;
|
|
1151
|
+
properties: z.ZodObject<{
|
|
1152
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1154
|
+
cli: "cli";
|
|
1155
|
+
chat: "chat";
|
|
1156
|
+
mcp: "mcp";
|
|
1157
|
+
daemon: "daemon";
|
|
1158
|
+
}>>;
|
|
1159
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1160
|
+
user: "user";
|
|
1161
|
+
ci: "ci";
|
|
1162
|
+
}>>;
|
|
1163
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1164
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1165
|
+
unknown: "unknown";
|
|
1166
|
+
claude_code: "claude_code";
|
|
1167
|
+
cursor: "cursor";
|
|
1168
|
+
gemini_cli: "gemini_cli";
|
|
1169
|
+
augment: "augment";
|
|
1170
|
+
goose: "goose";
|
|
1171
|
+
opencode: "opencode";
|
|
1172
|
+
codex: "codex";
|
|
1173
|
+
cline: "cline";
|
|
1174
|
+
amp: "amp";
|
|
1175
|
+
}>>;
|
|
1176
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1177
|
+
suite_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
1178
|
+
suite_child_count: z.ZodOptional<z.ZodNumber>;
|
|
1179
|
+
suite_passed_count: z.ZodOptional<z.ZodNumber>;
|
|
1180
|
+
suite_failed_count: z.ZodOptional<z.ZodNumber>;
|
|
1181
|
+
suite_skipped_count: z.ZodOptional<z.ZodNumber>;
|
|
1182
|
+
suite_execution_mode: z.ZodOptional<z.ZodEnum<{
|
|
1183
|
+
unknown: "unknown";
|
|
1184
|
+
sequential: "sequential";
|
|
1185
|
+
parallel: "parallel";
|
|
1186
|
+
}>>;
|
|
1187
|
+
trigger_source: z.ZodOptional<z.ZodEnum<{
|
|
1188
|
+
cli: "cli";
|
|
1189
|
+
chat: "chat";
|
|
1190
|
+
mcp: "mcp";
|
|
1191
|
+
daemon: "daemon";
|
|
1192
|
+
unknown: "unknown";
|
|
1193
|
+
}>>;
|
|
1194
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
1195
|
+
unknown: "unknown";
|
|
1196
|
+
local: "local";
|
|
1197
|
+
browserstack: "browserstack";
|
|
1198
|
+
}>>;
|
|
1199
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
1200
|
+
unknown: "unknown";
|
|
1201
|
+
web: "web";
|
|
1202
|
+
android: "android";
|
|
1203
|
+
ios: "ios";
|
|
1204
|
+
}>>;
|
|
1205
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1206
|
+
unknown: "unknown";
|
|
1207
|
+
passed: "passed";
|
|
1208
|
+
failed: "failed";
|
|
1209
|
+
skipped: "skipped";
|
|
1210
|
+
cancelled: "cancelled";
|
|
1211
|
+
timeout: "timeout";
|
|
1212
|
+
}>>;
|
|
1213
|
+
failure_category: z.ZodOptional<z.ZodEnum<{
|
|
1214
|
+
unknown: "unknown";
|
|
1215
|
+
cancelled: "cancelled";
|
|
1216
|
+
timeout: "timeout";
|
|
1217
|
+
assertion: "assertion";
|
|
1218
|
+
setup: "setup";
|
|
1219
|
+
hook: "hook";
|
|
1220
|
+
appium: "appium";
|
|
1221
|
+
browser_install: "browser_install";
|
|
1222
|
+
llm_context: "llm_context";
|
|
1223
|
+
llm_provider: "llm_provider";
|
|
1224
|
+
memory: "memory";
|
|
1225
|
+
framework: "framework";
|
|
1226
|
+
}>>;
|
|
1227
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1228
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
1229
|
+
step_count: z.ZodOptional<z.ZodNumber>;
|
|
1230
|
+
passed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1231
|
+
failed_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1232
|
+
skipped_step_count: z.ZodOptional<z.ZodNumber>;
|
|
1233
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
1234
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1235
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1236
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1237
|
+
is_flaky: z.ZodOptional<z.ZodBoolean>;
|
|
1238
|
+
memory_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1239
|
+
}, z.core.$strict>;
|
|
1240
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1241
|
+
name: z.ZodLiteral<"agent-qa.chat.session.completed">;
|
|
1242
|
+
properties: z.ZodObject<{
|
|
1243
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1244
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1245
|
+
cli: "cli";
|
|
1246
|
+
chat: "chat";
|
|
1247
|
+
mcp: "mcp";
|
|
1248
|
+
daemon: "daemon";
|
|
1249
|
+
}>>;
|
|
1250
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1251
|
+
user: "user";
|
|
1252
|
+
ci: "ci";
|
|
1253
|
+
}>>;
|
|
1254
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1255
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1256
|
+
unknown: "unknown";
|
|
1257
|
+
claude_code: "claude_code";
|
|
1258
|
+
cursor: "cursor";
|
|
1259
|
+
gemini_cli: "gemini_cli";
|
|
1260
|
+
augment: "augment";
|
|
1261
|
+
goose: "goose";
|
|
1262
|
+
opencode: "opencode";
|
|
1263
|
+
codex: "codex";
|
|
1264
|
+
cline: "cline";
|
|
1265
|
+
amp: "amp";
|
|
1266
|
+
}>>;
|
|
1267
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1268
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1269
|
+
turn_count: z.ZodOptional<z.ZodNumber>;
|
|
1270
|
+
slash_command_count: z.ZodOptional<z.ZodNumber>;
|
|
1271
|
+
function_call_count: z.ZodOptional<z.ZodNumber>;
|
|
1272
|
+
end_reason: z.ZodOptional<z.ZodEnum<{
|
|
1273
|
+
unknown: "unknown";
|
|
1274
|
+
error: "error";
|
|
1275
|
+
exit: "exit";
|
|
1276
|
+
interrupt: "interrupt";
|
|
1277
|
+
}>>;
|
|
1278
|
+
}, z.core.$strict>;
|
|
1279
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1280
|
+
name: z.ZodLiteral<"agent-qa.chat.turn.completed">;
|
|
1281
|
+
properties: z.ZodObject<{
|
|
1282
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1284
|
+
cli: "cli";
|
|
1285
|
+
chat: "chat";
|
|
1286
|
+
mcp: "mcp";
|
|
1287
|
+
daemon: "daemon";
|
|
1288
|
+
}>>;
|
|
1289
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1290
|
+
user: "user";
|
|
1291
|
+
ci: "ci";
|
|
1292
|
+
}>>;
|
|
1293
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1294
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1295
|
+
unknown: "unknown";
|
|
1296
|
+
claude_code: "claude_code";
|
|
1297
|
+
cursor: "cursor";
|
|
1298
|
+
gemini_cli: "gemini_cli";
|
|
1299
|
+
augment: "augment";
|
|
1300
|
+
goose: "goose";
|
|
1301
|
+
opencode: "opencode";
|
|
1302
|
+
codex: "codex";
|
|
1303
|
+
cline: "cline";
|
|
1304
|
+
amp: "amp";
|
|
1305
|
+
}>>;
|
|
1306
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1307
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1308
|
+
tool_call_count: z.ZodOptional<z.ZodNumber>;
|
|
1309
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1310
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1311
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1312
|
+
errored: z.ZodOptional<z.ZodBoolean>;
|
|
1313
|
+
}, z.core.$strict>;
|
|
1314
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1315
|
+
name: z.ZodLiteral<"agent-qa.daemon.job.completed">;
|
|
1316
|
+
properties: z.ZodObject<{
|
|
1317
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1318
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1319
|
+
cli: "cli";
|
|
1320
|
+
chat: "chat";
|
|
1321
|
+
mcp: "mcp";
|
|
1322
|
+
daemon: "daemon";
|
|
1323
|
+
}>>;
|
|
1324
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1325
|
+
user: "user";
|
|
1326
|
+
ci: "ci";
|
|
1327
|
+
}>>;
|
|
1328
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1329
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1330
|
+
unknown: "unknown";
|
|
1331
|
+
claude_code: "claude_code";
|
|
1332
|
+
cursor: "cursor";
|
|
1333
|
+
gemini_cli: "gemini_cli";
|
|
1334
|
+
augment: "augment";
|
|
1335
|
+
goose: "goose";
|
|
1336
|
+
opencode: "opencode";
|
|
1337
|
+
codex: "codex";
|
|
1338
|
+
cline: "cline";
|
|
1339
|
+
amp: "amp";
|
|
1340
|
+
}>>;
|
|
1341
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1342
|
+
job_kind: z.ZodOptional<z.ZodEnum<{
|
|
1343
|
+
unknown: "unknown";
|
|
1344
|
+
run: "run";
|
|
1345
|
+
suite: "suite";
|
|
1346
|
+
recovery: "recovery";
|
|
1347
|
+
}>>;
|
|
1348
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
1349
|
+
unknown: "unknown";
|
|
1350
|
+
failed: "failed";
|
|
1351
|
+
cancelled: "cancelled";
|
|
1352
|
+
completed: "completed";
|
|
1353
|
+
abandoned: "abandoned";
|
|
1354
|
+
}>>;
|
|
1355
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1356
|
+
attempt_count: z.ZodOptional<z.ZodNumber>;
|
|
1357
|
+
run_id: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
1358
|
+
}, z.core.$strict>;
|
|
1359
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1360
|
+
name: z.ZodLiteral<"agent-qa.mcp.server.lifecycle">;
|
|
1361
|
+
properties: z.ZodObject<{
|
|
1362
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1363
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1364
|
+
cli: "cli";
|
|
1365
|
+
chat: "chat";
|
|
1366
|
+
mcp: "mcp";
|
|
1367
|
+
daemon: "daemon";
|
|
1368
|
+
}>>;
|
|
1369
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1370
|
+
user: "user";
|
|
1371
|
+
ci: "ci";
|
|
1372
|
+
}>>;
|
|
1373
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1374
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1375
|
+
unknown: "unknown";
|
|
1376
|
+
claude_code: "claude_code";
|
|
1377
|
+
cursor: "cursor";
|
|
1378
|
+
gemini_cli: "gemini_cli";
|
|
1379
|
+
augment: "augment";
|
|
1380
|
+
goose: "goose";
|
|
1381
|
+
opencode: "opencode";
|
|
1382
|
+
codex: "codex";
|
|
1383
|
+
cline: "cline";
|
|
1384
|
+
amp: "amp";
|
|
1385
|
+
}>>;
|
|
1386
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1387
|
+
mcp_server_state: z.ZodOptional<z.ZodEnum<{
|
|
1388
|
+
started: "started";
|
|
1389
|
+
stopped: "stopped";
|
|
1390
|
+
}>>;
|
|
1391
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
1392
|
+
stdio: "stdio";
|
|
1393
|
+
http: "http";
|
|
1394
|
+
}>>;
|
|
1395
|
+
mcp_tool_count: z.ZodOptional<z.ZodNumber>;
|
|
1396
|
+
}, z.core.$strict>;
|
|
1397
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1398
|
+
name: z.ZodLiteral<"agent-qa.mcp.tool.invoked">;
|
|
1399
|
+
properties: z.ZodObject<{
|
|
1400
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1401
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1402
|
+
cli: "cli";
|
|
1403
|
+
chat: "chat";
|
|
1404
|
+
mcp: "mcp";
|
|
1405
|
+
daemon: "daemon";
|
|
1406
|
+
}>>;
|
|
1407
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1408
|
+
user: "user";
|
|
1409
|
+
ci: "ci";
|
|
1410
|
+
}>>;
|
|
1411
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1412
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1413
|
+
unknown: "unknown";
|
|
1414
|
+
claude_code: "claude_code";
|
|
1415
|
+
cursor: "cursor";
|
|
1416
|
+
gemini_cli: "gemini_cli";
|
|
1417
|
+
augment: "augment";
|
|
1418
|
+
goose: "goose";
|
|
1419
|
+
opencode: "opencode";
|
|
1420
|
+
codex: "codex";
|
|
1421
|
+
cline: "cline";
|
|
1422
|
+
amp: "amp";
|
|
1423
|
+
}>>;
|
|
1424
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1425
|
+
tool_name: z.ZodOptional<z.ZodEnum<{
|
|
1426
|
+
[x: string]: string;
|
|
1427
|
+
}>>;
|
|
1428
|
+
mcp_tool_status: z.ZodOptional<z.ZodEnum<{
|
|
1429
|
+
error: "error";
|
|
1430
|
+
success: "success";
|
|
1431
|
+
}>>;
|
|
1432
|
+
mcp_error_category: z.ZodOptional<z.ZodEnum<{
|
|
1433
|
+
unknown: "unknown";
|
|
1434
|
+
validation: "validation";
|
|
1435
|
+
scope_denied: "scope_denied";
|
|
1436
|
+
unknown_tool: "unknown_tool";
|
|
1437
|
+
tool_error: "tool_error";
|
|
1438
|
+
}>>;
|
|
1439
|
+
mcp_transport: z.ZodOptional<z.ZodEnum<{
|
|
1440
|
+
stdio: "stdio";
|
|
1441
|
+
http: "http";
|
|
1442
|
+
}>>;
|
|
1443
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1444
|
+
}, z.core.$strict>;
|
|
1445
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1446
|
+
name: z.ZodLiteral<"agent-qa.init.completed">;
|
|
1447
|
+
properties: z.ZodObject<{
|
|
1448
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1449
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1450
|
+
cli: "cli";
|
|
1451
|
+
chat: "chat";
|
|
1452
|
+
mcp: "mcp";
|
|
1453
|
+
daemon: "daemon";
|
|
1454
|
+
}>>;
|
|
1455
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1456
|
+
user: "user";
|
|
1457
|
+
ci: "ci";
|
|
1458
|
+
}>>;
|
|
1459
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1460
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1461
|
+
unknown: "unknown";
|
|
1462
|
+
claude_code: "claude_code";
|
|
1463
|
+
cursor: "cursor";
|
|
1464
|
+
gemini_cli: "gemini_cli";
|
|
1465
|
+
augment: "augment";
|
|
1466
|
+
goose: "goose";
|
|
1467
|
+
opencode: "opencode";
|
|
1468
|
+
codex: "codex";
|
|
1469
|
+
cline: "cline";
|
|
1470
|
+
amp: "amp";
|
|
1471
|
+
}>>;
|
|
1472
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1473
|
+
init_mode: z.ZodOptional<z.ZodEnum<{
|
|
1474
|
+
interactive: "interactive";
|
|
1475
|
+
agent: "agent";
|
|
1476
|
+
scaffold: "scaffold";
|
|
1477
|
+
}>>;
|
|
1478
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
1479
|
+
failed: "failed";
|
|
1480
|
+
created: "created";
|
|
1481
|
+
updated: "updated";
|
|
1482
|
+
unchanged: "unchanged";
|
|
1483
|
+
}>>;
|
|
1484
|
+
created_file_count: z.ZodOptional<z.ZodNumber>;
|
|
1485
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1486
|
+
}, z.core.$strict>;
|
|
1487
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1488
|
+
name: z.ZodLiteral<"agent-qa.explain.answered">;
|
|
1489
|
+
properties: z.ZodObject<{
|
|
1490
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1491
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1492
|
+
cli: "cli";
|
|
1493
|
+
chat: "chat";
|
|
1494
|
+
mcp: "mcp";
|
|
1495
|
+
daemon: "daemon";
|
|
1496
|
+
}>>;
|
|
1497
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1498
|
+
user: "user";
|
|
1499
|
+
ci: "ci";
|
|
1500
|
+
}>>;
|
|
1501
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1502
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1503
|
+
unknown: "unknown";
|
|
1504
|
+
claude_code: "claude_code";
|
|
1505
|
+
cursor: "cursor";
|
|
1506
|
+
gemini_cli: "gemini_cli";
|
|
1507
|
+
augment: "augment";
|
|
1508
|
+
goose: "goose";
|
|
1509
|
+
opencode: "opencode";
|
|
1510
|
+
codex: "codex";
|
|
1511
|
+
cline: "cline";
|
|
1512
|
+
amp: "amp";
|
|
1513
|
+
}>>;
|
|
1514
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1515
|
+
cited_row_count: z.ZodOptional<z.ZodNumber>;
|
|
1516
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1517
|
+
}, z.core.$strict>;
|
|
1518
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1519
|
+
name: z.ZodLiteral<"agent-qa.explain.abstained">;
|
|
1520
|
+
properties: z.ZodObject<{
|
|
1521
|
+
agent_qa_version: z.ZodOptional<z.ZodString>;
|
|
1522
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
1523
|
+
cli: "cli";
|
|
1524
|
+
chat: "chat";
|
|
1525
|
+
mcp: "mcp";
|
|
1526
|
+
daemon: "daemon";
|
|
1527
|
+
}>>;
|
|
1528
|
+
runtime_context: z.ZodOptional<z.ZodEnum<{
|
|
1529
|
+
user: "user";
|
|
1530
|
+
ci: "ci";
|
|
1531
|
+
}>>;
|
|
1532
|
+
is_internal: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1533
|
+
agent_product: z.ZodOptional<z.ZodEnum<{
|
|
1534
|
+
unknown: "unknown";
|
|
1535
|
+
claude_code: "claude_code";
|
|
1536
|
+
cursor: "cursor";
|
|
1537
|
+
gemini_cli: "gemini_cli";
|
|
1538
|
+
augment: "augment";
|
|
1539
|
+
goose: "goose";
|
|
1540
|
+
opencode: "opencode";
|
|
1541
|
+
codex: "codex";
|
|
1542
|
+
cline: "cline";
|
|
1543
|
+
amp: "amp";
|
|
1544
|
+
}>>;
|
|
1545
|
+
$process_person_profile: z.ZodOptional<z.ZodLiteral<false>>;
|
|
1546
|
+
suggested_row_count: z.ZodOptional<z.ZodNumber>;
|
|
1547
|
+
catalog_empty: z.ZodOptional<z.ZodBoolean>;
|
|
1548
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1549
|
+
}, z.core.$strict>;
|
|
1550
|
+
}, z.core.$strict>], "name">;
|
|
1551
|
+
type AgentQaAnalyticsEvent = z.infer<typeof AgentQaAnalyticsEventSchema>;
|
|
1552
|
+
/**
|
|
1553
|
+
* Walks every member of the union and throws naming the member and the field path of any string
|
|
1554
|
+
* that is not drawn from a closed vocabulary.
|
|
1555
|
+
*
|
|
1556
|
+
* FAIL-CLOSED. A construct this walker does not recognise is reported, not skipped. The alternative
|
|
1557
|
+
* — treat the unknown as fine — means the rule silently stops covering whatever zod grows next, and
|
|
1558
|
+
* a guard that quietly narrows is worse than no guard, because the suite keeps saying yes.
|
|
1559
|
+
*
|
|
1560
|
+
* The bar this has to clear is not "the shipped union passes". It is that a planted plain string
|
|
1561
|
+
* REDS, that a string wearing the known-id tag without a refinement ALSO reds, and that neither an
|
|
1562
|
+
* optional, a record value nor an array element is a place to hide one.
|
|
1563
|
+
*/
|
|
1564
|
+
declare function assertNoUnconstrainedStrings(members: readonly z.ZodType[]): void;
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* The shape every member of the closed event union satisfies.
|
|
1568
|
+
*
|
|
1569
|
+
* The port is written against this rather than against the union itself so the transport layer
|
|
1570
|
+
* carries no knowledge of which events exist; `AnalyticsPort` is parameterised by the union at the
|
|
1571
|
+
* package surface, which is what keeps a non-member event from reaching `capture` at a call site.
|
|
1572
|
+
*/
|
|
1573
|
+
interface AnalyticsEventEnvelope {
|
|
1574
|
+
readonly name: string;
|
|
1575
|
+
readonly properties: Readonly<Record<string, AnalyticsPropertyValue>>;
|
|
1576
|
+
}
|
|
1577
|
+
type AnalyticsPropertyValue = string | number | boolean | undefined | Readonly<Record<string, string | number | boolean | undefined>>;
|
|
1578
|
+
/** What a transport is handed: the event plus the identity it is attributed to. */
|
|
1579
|
+
interface AnalyticsCapturePayload {
|
|
1580
|
+
readonly distinctId: string;
|
|
1581
|
+
readonly isInternal?: boolean;
|
|
1582
|
+
readonly event: AnalyticsEventEnvelope;
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* The wire side. Implementations may be synchronous (test sinks) or asynchronous (PostHog);
|
|
1586
|
+
* the port normalises both and swallows either one's failures.
|
|
1587
|
+
*
|
|
1588
|
+
* `flush` and `shutdown` are separate on purpose. A host flushes at natural boundaries — a run
|
|
1589
|
+
* ending, a command returning — and shuts down once, at exit; collapsing them means either a
|
|
1590
|
+
* process that leaks a live client or a mid-session teardown of the thing still being used.
|
|
1591
|
+
*/
|
|
1592
|
+
interface AnalyticsTransport {
|
|
1593
|
+
capture(payload: AnalyticsCapturePayload): void | Promise<void>;
|
|
1594
|
+
flush(): void | Promise<void>;
|
|
1595
|
+
shutdown(): void | Promise<void>;
|
|
1596
|
+
}
|
|
1597
|
+
/** Resolves the anonymous distinct id an event is attributed to. */
|
|
1598
|
+
type AnalyticsIdentityResolver = () => AnalyticsIdentity | Promise<AnalyticsIdentity>;
|
|
1599
|
+
interface AnalyticsIdentity {
|
|
1600
|
+
readonly distinctId: string;
|
|
1601
|
+
readonly isInternal?: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
interface AnalyticsPort<TEvent extends AnalyticsEventEnvelope = AnalyticsEventEnvelope> {
|
|
1604
|
+
capture(event: TEvent): void;
|
|
1605
|
+
flush(): Promise<void>;
|
|
1606
|
+
shutdown(): Promise<void>;
|
|
1607
|
+
}
|
|
1608
|
+
interface AnalyticsPortOptions {
|
|
1609
|
+
/** Absent when opted out or keyless: the port then drops every capture (447-04, D-08). */
|
|
1610
|
+
readonly transport?: AnalyticsTransport;
|
|
1611
|
+
readonly identity: AnalyticsIdentityResolver;
|
|
1612
|
+
/**
|
|
1613
|
+
* How long `shutdown` will wait for the transport before releasing its caller (T-398-35 / WR-02).
|
|
1614
|
+
*
|
|
1615
|
+
* A host calls `shutdown` on its way OUT — at a terminal exit, in a `finally`, on the error path.
|
|
1616
|
+
* Whatever it waits for is time a person spends looking at a terminal that has already finished
|
|
1617
|
+
* its work. posthog-node's own shutdown defaults to 30 000 ms and races retriable flushes against
|
|
1618
|
+
* it, so an unreachable network turns a completed run into half a minute of dead prompt.
|
|
1619
|
+
*
|
|
1620
|
+
* The default is deliberately small. This is the LAST thing a process does; delivering the final
|
|
1621
|
+
* batch is worth a couple of seconds and no more.
|
|
1622
|
+
*/
|
|
1623
|
+
readonly shutdownTimeoutMs?: number;
|
|
1624
|
+
}
|
|
1625
|
+
declare function createAnalyticsPort<TEvent extends AnalyticsEventEnvelope = AnalyticsEventEnvelope>(options: AnalyticsPortOptions): AnalyticsPort<TEvent>;
|
|
1626
|
+
|
|
1627
|
+
/** The only thing the seam needs from a mask: the host binds the declared-secret mask here. */
|
|
1628
|
+
interface AnalyticsMaskingContext {
|
|
1629
|
+
mask(text: string): string;
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Mask every string leaf of an outgoing payload, before anything has been serialized.
|
|
1633
|
+
*
|
|
1634
|
+
* Returns a NEW payload rather than mutating: the caller's object is the host's, and a host that
|
|
1635
|
+
* kept a reference to an event it emitted should not find its own data rewritten underneath it.
|
|
1636
|
+
*/
|
|
1637
|
+
declare function maskEventForSend(payload: AnalyticsCapturePayload, context: AnalyticsMaskingContext | undefined): AnalyticsCapturePayload;
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* The subset of the PostHog client this transport uses.
|
|
1641
|
+
*
|
|
1642
|
+
* `flush` is REQUIRED, not optional, and that is the whole content of the fix (398-15, CR-01): the
|
|
1643
|
+
* interface previously declared only `capture`/`shutdown`, so the type system could not express the
|
|
1644
|
+
* correct per-boundary call and the transport reached for `shutdown` instead. An optional member
|
|
1645
|
+
* with a shutdown fallback would reinstate the same defect behind a spelling. posthog-node 5.33.2
|
|
1646
|
+
* exposes both. The contract being honoured is stated at `port.ts:49-51`.
|
|
1647
|
+
*/
|
|
1648
|
+
interface PosthogAnalyticsClient {
|
|
1649
|
+
capture(input: {
|
|
1650
|
+
distinctId: string;
|
|
1651
|
+
event: string;
|
|
1652
|
+
properties: Record<string, unknown>;
|
|
1653
|
+
}): void;
|
|
1654
|
+
flush(): void | Promise<void>;
|
|
1655
|
+
shutdown(): void | Promise<void>;
|
|
1656
|
+
}
|
|
1657
|
+
interface PosthogTransportOptions {
|
|
1658
|
+
readonly projectKey: string;
|
|
1659
|
+
readonly host: string;
|
|
1660
|
+
readonly disableGeoip?: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* posthog-node's own `fetch` option, passed straight through.
|
|
1663
|
+
*
|
|
1664
|
+
* 2026-08-17 (Phase 398 plan 03): this exists for plan 06's sandboxed-sink arm of the zero-network
|
|
1665
|
+
* differential. posthog-node 5.33.2 sends through `this.options.fetch ?? fetch`, so injecting here
|
|
1666
|
+
* observes the SHIPPED send path rather than a parallel one built for the test — which is the
|
|
1667
|
+
* difference between measuring the product and measuring the fixture.
|
|
1668
|
+
*/
|
|
1669
|
+
readonly fetch?: PostHogOptions['fetch'];
|
|
1670
|
+
/** The host's declared-secret mask, applied at the send seam. Absent means no masking. */
|
|
1671
|
+
readonly maskingContext?: AnalyticsMaskingContext;
|
|
1672
|
+
/** An already-constructed client, for tests that need to observe construction itself. */
|
|
1673
|
+
readonly client?: PosthogAnalyticsClient;
|
|
1674
|
+
}
|
|
1675
|
+
declare function createPosthogTransport(options: PosthogTransportOptions): AnalyticsTransport;
|
|
1676
|
+
/** The factory shape `composeAnalytics` calls, so a cell can spy on whether it was called at all. */
|
|
1677
|
+
type PosthogTransportFactory = (options: PosthogTransportOptions) => AnalyticsTransport;
|
|
1678
|
+
|
|
1679
|
+
type AnalyticsOptOutReason = 'config-privacy';
|
|
1680
|
+
type AnalyticsTransportKind = 'none' | 'posthog';
|
|
1681
|
+
interface AnalyticsOptOutConfig {
|
|
1682
|
+
readonly analytics?: {
|
|
1683
|
+
readonly privacy?: boolean;
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1686
|
+
interface ComposeAnalyticsOptions {
|
|
1687
|
+
readonly config?: AnalyticsOptOutConfig;
|
|
1688
|
+
readonly identity?: AnalyticsIdentityResolver;
|
|
1689
|
+
readonly projectKey?: string;
|
|
1690
|
+
readonly projectHost?: string;
|
|
1691
|
+
/**
|
|
1692
|
+
* The host's declared-secret mask, which the send seam applies (D-19, plan 06). It reaches only
|
|
1693
|
+
* the opted-IN arm: the deny arm has no transport, so there is no payload to mask.
|
|
1694
|
+
*/
|
|
1695
|
+
readonly maskingContext?: AnalyticsMaskingContext;
|
|
1696
|
+
/** Replaces the transport on the OPTED-IN arm only. Never consulted once the answer is deny. */
|
|
1697
|
+
readonly transportOverride?: AnalyticsTransport;
|
|
1698
|
+
/** Replaces the PostHog transport CONSTRUCTOR, so a cell can observe whether it was called. */
|
|
1699
|
+
readonly posthogTransportFactory?: PosthogTransportFactory;
|
|
1700
|
+
}
|
|
1701
|
+
interface ComposedAnalytics<TEvent extends AnalyticsEventEnvelope = AnalyticsEventEnvelope> {
|
|
1702
|
+
readonly port: AnalyticsPort<TEvent>;
|
|
1703
|
+
/** The transport the port was built over; `undefined` when opted out or keyless. */
|
|
1704
|
+
readonly transport: AnalyticsTransport | undefined;
|
|
1705
|
+
readonly optedOut: boolean;
|
|
1706
|
+
readonly optOutReasons: readonly AnalyticsOptOutReason[];
|
|
1707
|
+
readonly transportKind: AnalyticsTransportKind;
|
|
1708
|
+
}
|
|
1709
|
+
declare function composeAnalytics<TEvent extends AnalyticsEventEnvelope = AnalyticsEventEnvelope>(options?: ComposeAnalyticsOptions): ComposedAnalytics<TEvent>;
|
|
1710
|
+
|
|
1711
|
+
type AnalyticsRuntimeContext = (typeof ANALYTICS_RUNTIME_CONTEXTS)[number];
|
|
1712
|
+
type AnalyticsAgentProduct = (typeof ANALYTICS_AGENT_PRODUCTS)[number];
|
|
1713
|
+
/** The id scheme, named so a cell can assert it rather than a reader having to trust a comment. */
|
|
1714
|
+
declare const ANALYTICS_USER_ID_PREFIX = "u";
|
|
1715
|
+
declare const ANALYTICS_USER_ID_WORDS = 10;
|
|
1716
|
+
/** What a resolved identity is, before anything decides whether to send on its behalf. */
|
|
1717
|
+
interface ResolvedAnalyticsIdentity {
|
|
1718
|
+
distinctId: string;
|
|
1719
|
+
runtimeContext: AnalyticsRuntimeContext;
|
|
1720
|
+
agentProduct?: AnalyticsAgentProduct;
|
|
1721
|
+
isInternal?: boolean;
|
|
1722
|
+
}
|
|
1723
|
+
/** The on-disk record. Two keys, carried verbatim, and the exact set a cell pins. */
|
|
1724
|
+
interface AnalyticsIdentityStore {
|
|
1725
|
+
distinctId: string;
|
|
1726
|
+
is_internal: boolean;
|
|
1727
|
+
}
|
|
1728
|
+
interface ResolveAnalyticsIdentityOptions {
|
|
1729
|
+
env?: Record<string, string | undefined>;
|
|
1730
|
+
ci?: boolean;
|
|
1731
|
+
identityPath?: string;
|
|
1732
|
+
homeDir?: string;
|
|
1733
|
+
}
|
|
1734
|
+
declare function getAnalyticsIdentityPath(env?: Record<string, string | undefined>, homeDir?: string): string;
|
|
1735
|
+
declare function generateAnalyticsUserId(): string;
|
|
1736
|
+
declare function readAnalyticsIdentity(path?: string): Promise<AnalyticsIdentityStore | null>;
|
|
1737
|
+
declare function resolveAnalyticsAgentProduct(env?: Record<string, string | undefined>): AnalyticsAgentProduct | undefined;
|
|
1738
|
+
declare function resolveAnalyticsIdentity(options?: ResolveAnalyticsIdentityOptions): Promise<ResolvedAnalyticsIdentity>;
|
|
1739
|
+
|
|
1740
|
+
type AnalyticsTriggerSource = (typeof ANALYTICS_TRIGGER_SOURCES)[number];
|
|
1741
|
+
type AnalyticsRunner = (typeof ANALYTICS_RUNNERS)[number];
|
|
1742
|
+
/**
|
|
1743
|
+
* The identity-shaped properties every event in a session carries.
|
|
1744
|
+
*
|
|
1745
|
+
* Handed in rather than resolved here: `resolveAnalyticsIdentity` answers who, `compose.ts` answers
|
|
1746
|
+
* whether, and a subscriber that reached for either would be a third opinion on both.
|
|
1747
|
+
*/
|
|
1748
|
+
interface AnalyticsRunStandardProperties {
|
|
1749
|
+
agent_qa_version?: string;
|
|
1750
|
+
surface?: (typeof ANALYTICS_EMITTING_HOSTS)[number];
|
|
1751
|
+
runtime_context?: (typeof ANALYTICS_RUNTIME_CONTEXTS)[number];
|
|
1752
|
+
agent_product?: (typeof ANALYTICS_AGENT_PRODUCTS)[number];
|
|
1753
|
+
$process_person_profile?: false;
|
|
1754
|
+
}
|
|
1755
|
+
interface AnalyticsRunSubscriberOptions {
|
|
1756
|
+
/** The composed port. An opted-out host passes one with no transport; see the header. */
|
|
1757
|
+
port: AnalyticsPort<AgentQaAnalyticsEvent>;
|
|
1758
|
+
/** How the run was triggered, as known at the composition root. */
|
|
1759
|
+
triggerSource?: string;
|
|
1760
|
+
/** Which runner executed it, as known at the composition root. */
|
|
1761
|
+
runner?: string;
|
|
1762
|
+
standardProperties?: AnalyticsRunStandardProperties;
|
|
1763
|
+
}
|
|
1764
|
+
interface AnalyticsRunSubscriber {
|
|
1765
|
+
handler(envelope: RunEventEnvelope): void;
|
|
1766
|
+
flush(): Promise<void>;
|
|
1767
|
+
}
|
|
1768
|
+
declare function createAnalyticsRunSubscriber(options: AnalyticsRunSubscriberOptions): AnalyticsRunSubscriber;
|
|
1769
|
+
|
|
1770
|
+
type AgentQaAnalyticsPort = AnalyticsPort<AgentQaAnalyticsEvent>;
|
|
1771
|
+
|
|
1772
|
+
export { ANALYTICS_AGENT_PRODUCTS, ANALYTICS_CHAT_END_REASONS, ANALYTICS_DAEMON_JOB_KINDS, ANALYTICS_DAEMON_JOB_OUTCOMES, ANALYTICS_EMITTING_HOSTS, ANALYTICS_EVENT_MEMBERS, ANALYTICS_EVENT_NAMES, ANALYTICS_EVENT_SCHEMA_BY_NAME, ANALYTICS_FAILURE_CATEGORIES, ANALYTICS_INIT_MODES, ANALYTICS_INIT_OUTCOMES, ANALYTICS_KNOWN_ID_MARKER, ANALYTICS_MCP_ERROR_CATEGORIES, ANALYTICS_MCP_SERVER_STATES, ANALYTICS_MCP_TOOL_NAMES, ANALYTICS_MCP_TOOL_STATUSES, ANALYTICS_MCP_TRANSPORTS, ANALYTICS_PLATFORMS, ANALYTICS_RUNNERS, ANALYTICS_RUNTIME_CONTEXTS, ANALYTICS_RUN_STATUSES, ANALYTICS_SUITE_EXECUTION_MODES, ANALYTICS_TRIGGER_SOURCES, ANALYTICS_USER_ID_PREFIX, ANALYTICS_USER_ID_WORDS, ANALYTICS_VOCABULARY_META_KEY, type AgentQaAnalyticsEvent, AgentQaAnalyticsEventSchema, type AgentQaAnalyticsPort, type AnalyticsAgentProduct, type AnalyticsCapturePayload, type AnalyticsEventEnvelope, type AnalyticsEventName, type AnalyticsIdentity, type AnalyticsIdentityResolver, type AnalyticsIdentityStore, type AnalyticsMaskingContext, type AnalyticsOptOutConfig, type AnalyticsOptOutReason, type AnalyticsPort, type AnalyticsPortOptions, type AnalyticsPropertyValue, type AnalyticsRunStandardProperties, type AnalyticsRunSubscriber, type AnalyticsRunSubscriberOptions, type AnalyticsRunner, type AnalyticsRuntimeContext, type AnalyticsTransport, type AnalyticsTransportKind, type AnalyticsTriggerSource, type ComposeAnalyticsOptions, type ComposedAnalytics, type PosthogAnalyticsClient, type PosthogTransportFactory, type PosthogTransportOptions, RETIRED_V33_EVENT_NAMES, type ResolveAnalyticsIdentityOptions, type ResolvedAnalyticsIdentity, analyticsRunId, analyticsSuiteId, analyticsTestId, assertNoUnconstrainedStrings, composeAnalytics, createAnalyticsPort, createAnalyticsRunSubscriber, createPosthogTransport, generateAnalyticsUserId, getAnalyticsIdentityPath, maskEventForSend, readAnalyticsIdentity, resolveAnalyticsAgentProduct, resolveAnalyticsIdentity };
|