@bli-cockpit/telemetry-core 0.1.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/README.md +8 -0
- package/dist/common.d.ts +45 -0
- package/dist/common.js +41 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/ingest-dto.d.ts +677 -0
- package/dist/ingest-dto.js +59 -0
- package/dist/local-config.d.ts +72 -0
- package/dist/local-config.js +46 -0
- package/dist/paths.d.ts +22 -0
- package/dist/paths.js +66 -0
- package/dist/privacy.d.ts +80 -0
- package/dist/privacy.js +110 -0
- package/dist/risk-flags.d.ts +102 -0
- package/dist/risk-flags.js +46 -0
- package/dist/source-adapter.d.ts +235 -0
- package/dist/source-adapter.js +37 -0
- package/dist/trace-sink.d.ts +58 -0
- package/dist/trace-sink.js +35 -0
- package/dist/work-context.d.ts +76 -0
- package/dist/work-context.js +37 -0
- package/package.json +38 -0
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TelemetryEventTypeSchema: z.ZodEnum<{
|
|
3
|
+
session_started: "session_started";
|
|
4
|
+
session_ended: "session_ended";
|
|
5
|
+
work_context_updated: "work_context_updated";
|
|
6
|
+
source_scan_completed: "source_scan_completed";
|
|
7
|
+
ticket_binding_detected: "ticket_binding_detected";
|
|
8
|
+
risk_flag_detected: "risk_flag_detected";
|
|
9
|
+
review_signal_detected: "review_signal_detected";
|
|
10
|
+
pr_status_detected: "pr_status_detected";
|
|
11
|
+
command_signal_detected: "command_signal_detected";
|
|
12
|
+
otel_span_normalized: "otel_span_normalized";
|
|
13
|
+
otel_log_normalized: "otel_log_normalized";
|
|
14
|
+
}>;
|
|
15
|
+
export type TelemetryEventType = z.infer<typeof TelemetryEventTypeSchema>;
|
|
16
|
+
export declare const TelemetryIngestEventDtoSchema: z.ZodObject<{
|
|
17
|
+
event_id: z.ZodString;
|
|
18
|
+
event_type: z.ZodEnum<{
|
|
19
|
+
session_started: "session_started";
|
|
20
|
+
session_ended: "session_ended";
|
|
21
|
+
work_context_updated: "work_context_updated";
|
|
22
|
+
source_scan_completed: "source_scan_completed";
|
|
23
|
+
ticket_binding_detected: "ticket_binding_detected";
|
|
24
|
+
risk_flag_detected: "risk_flag_detected";
|
|
25
|
+
review_signal_detected: "review_signal_detected";
|
|
26
|
+
pr_status_detected: "pr_status_detected";
|
|
27
|
+
command_signal_detected: "command_signal_detected";
|
|
28
|
+
otel_span_normalized: "otel_span_normalized";
|
|
29
|
+
otel_log_normalized: "otel_log_normalized";
|
|
30
|
+
}>;
|
|
31
|
+
occurred_at: z.ZodString;
|
|
32
|
+
provenance: z.ZodObject<{
|
|
33
|
+
capture_source: z.ZodEnum<{
|
|
34
|
+
unknown: "unknown";
|
|
35
|
+
codex_jsonl: "codex_jsonl";
|
|
36
|
+
codex_otel: "codex_otel";
|
|
37
|
+
car_state: "car_state";
|
|
38
|
+
git_state: "git_state";
|
|
39
|
+
github_state: "github_state";
|
|
40
|
+
linear_state: "linear_state";
|
|
41
|
+
mcp_local: "mcp_local";
|
|
42
|
+
claude_hooks: "claude_hooks";
|
|
43
|
+
manual_event: "manual_event";
|
|
44
|
+
collector_runtime: "collector_runtime";
|
|
45
|
+
}>;
|
|
46
|
+
capture_adapter_version: z.ZodString;
|
|
47
|
+
collector_version: z.ZodString;
|
|
48
|
+
repo: z.ZodString;
|
|
49
|
+
branch: z.ZodString;
|
|
50
|
+
operator_id: z.ZodString;
|
|
51
|
+
session_id: z.ZodString;
|
|
52
|
+
work_context_id: z.ZodString;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
privacy_classification: z.ZodEnum<{
|
|
55
|
+
metadata: "metadata";
|
|
56
|
+
redacted_summary: "redacted_summary";
|
|
57
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
58
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
59
|
+
}>;
|
|
60
|
+
redaction: z.ZodObject<{
|
|
61
|
+
privacy_classification: z.ZodEnum<{
|
|
62
|
+
metadata: "metadata";
|
|
63
|
+
redacted_summary: "redacted_summary";
|
|
64
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
65
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
66
|
+
}>;
|
|
67
|
+
redaction_status: z.ZodEnum<{
|
|
68
|
+
metadata_only: "metadata_only";
|
|
69
|
+
redacted: "redacted";
|
|
70
|
+
raw_local_only: "raw_local_only";
|
|
71
|
+
raw_remote_short_retention: "raw_remote_short_retention";
|
|
72
|
+
}>;
|
|
73
|
+
redacted_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
74
|
+
raw_evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
75
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
76
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
79
|
+
metrics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
80
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>>;
|
|
81
|
+
ticket_binding: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
ticket_id: z.ZodString;
|
|
83
|
+
binding_source: z.ZodEnum<{
|
|
84
|
+
active_work_context: "active_work_context";
|
|
85
|
+
branch_name: "branch_name";
|
|
86
|
+
linear_assignment: "linear_assignment";
|
|
87
|
+
car_ticket: "car_ticket";
|
|
88
|
+
github_pr: "github_pr";
|
|
89
|
+
mcp_context: "mcp_context";
|
|
90
|
+
manual_picker: "manual_picker";
|
|
91
|
+
}>;
|
|
92
|
+
confidence: z.ZodNumber;
|
|
93
|
+
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
94
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
risk_flags: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
97
|
+
risk_flag_id: z.ZodString;
|
|
98
|
+
risk_type: z.ZodEnum<{
|
|
99
|
+
no_plan_signal_before_large_edit: "no_plan_signal_before_large_edit";
|
|
100
|
+
p1_or_p2_review_finding: "p1_or_p2_review_finding";
|
|
101
|
+
many_add_revert_loops: "many_add_revert_loops";
|
|
102
|
+
repeated_same_tool_input_shape: "repeated_same_tool_input_shape";
|
|
103
|
+
tool_call_loop: "tool_call_loop";
|
|
104
|
+
file_thrash_same_path: "file_thrash_same_path";
|
|
105
|
+
context_window_pressure: "context_window_pressure";
|
|
106
|
+
permission_denied_spike: "permission_denied_spike";
|
|
107
|
+
high_token_or_time_burn_no_pr: "high_token_or_time_burn_no_pr";
|
|
108
|
+
stuck_for_30_minutes: "stuck_for_30_minutes";
|
|
109
|
+
repeated_same_failing_command: "repeated_same_failing_command";
|
|
110
|
+
branch_ticket_mismatch: "branch_ticket_mismatch";
|
|
111
|
+
collector_stale: "collector_stale";
|
|
112
|
+
}>;
|
|
113
|
+
severity: z.ZodEnum<{
|
|
114
|
+
info: "info";
|
|
115
|
+
warning: "warning";
|
|
116
|
+
high: "high";
|
|
117
|
+
}>;
|
|
118
|
+
observed_at: z.ZodString;
|
|
119
|
+
evidence_labels: z.ZodArray<z.ZodEnum<{
|
|
120
|
+
missing_plan_signal: "missing_plan_signal";
|
|
121
|
+
large_edit: "large_edit";
|
|
122
|
+
p1_review_finding: "p1_review_finding";
|
|
123
|
+
p2_review_finding: "p2_review_finding";
|
|
124
|
+
add_revert_loop: "add_revert_loop";
|
|
125
|
+
same_tool_input_shape: "same_tool_input_shape";
|
|
126
|
+
tool_call_loop_window: "tool_call_loop_window";
|
|
127
|
+
same_path_churn: "same_path_churn";
|
|
128
|
+
token_pressure: "token_pressure";
|
|
129
|
+
permission_denied: "permission_denied";
|
|
130
|
+
approval_denied: "approval_denied";
|
|
131
|
+
no_pr_after_work: "no_pr_after_work";
|
|
132
|
+
idle_or_stuck_duration: "idle_or_stuck_duration";
|
|
133
|
+
same_failing_command: "same_failing_command";
|
|
134
|
+
branch_ticket_disagreement: "branch_ticket_disagreement";
|
|
135
|
+
collector_last_seen_stale: "collector_last_seen_stale";
|
|
136
|
+
}>>;
|
|
137
|
+
evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
138
|
+
provenance: z.ZodObject<{
|
|
139
|
+
capture_source: z.ZodEnum<{
|
|
140
|
+
unknown: "unknown";
|
|
141
|
+
codex_jsonl: "codex_jsonl";
|
|
142
|
+
codex_otel: "codex_otel";
|
|
143
|
+
car_state: "car_state";
|
|
144
|
+
git_state: "git_state";
|
|
145
|
+
github_state: "github_state";
|
|
146
|
+
linear_state: "linear_state";
|
|
147
|
+
mcp_local: "mcp_local";
|
|
148
|
+
claude_hooks: "claude_hooks";
|
|
149
|
+
manual_event: "manual_event";
|
|
150
|
+
collector_runtime: "collector_runtime";
|
|
151
|
+
}>;
|
|
152
|
+
capture_adapter_version: z.ZodString;
|
|
153
|
+
collector_version: z.ZodString;
|
|
154
|
+
repo: z.ZodString;
|
|
155
|
+
branch: z.ZodString;
|
|
156
|
+
operator_id: z.ZodString;
|
|
157
|
+
session_id: z.ZodString;
|
|
158
|
+
work_context_id: z.ZodString;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
}, z.core.$strict>>>;
|
|
161
|
+
raw_evidence_pointers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
162
|
+
raw_evidence_pointer_id: z.ZodString;
|
|
163
|
+
privacy_classification: z.ZodEnum<{
|
|
164
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
165
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
166
|
+
}>;
|
|
167
|
+
retention_policy: z.ZodObject<{
|
|
168
|
+
mode: z.ZodEnum<{
|
|
169
|
+
local_only: "local_only";
|
|
170
|
+
remote_short_retention: "remote_short_retention";
|
|
171
|
+
}>;
|
|
172
|
+
privacy_classification: z.ZodEnum<{
|
|
173
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
174
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
175
|
+
}>;
|
|
176
|
+
remote_retention_days: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
storage_scope: z.ZodEnum<{
|
|
180
|
+
local_file: "local_file";
|
|
181
|
+
remote_object: "remote_object";
|
|
182
|
+
}>;
|
|
183
|
+
local_path: z.ZodOptional<z.ZodString>;
|
|
184
|
+
object_key: z.ZodOptional<z.ZodString>;
|
|
185
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
186
|
+
byte_size: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
188
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
189
|
+
}, z.core.$strict>>>;
|
|
190
|
+
otel: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
trace_id: z.ZodOptional<z.ZodString>;
|
|
192
|
+
span_id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
parent_span_id: z.ZodOptional<z.ZodString>;
|
|
194
|
+
span_name: z.ZodOptional<z.ZodString>;
|
|
195
|
+
span_kind: z.ZodOptional<z.ZodEnum<{
|
|
196
|
+
internal: "internal";
|
|
197
|
+
server: "server";
|
|
198
|
+
client: "client";
|
|
199
|
+
producer: "producer";
|
|
200
|
+
consumer: "consumer";
|
|
201
|
+
}>>;
|
|
202
|
+
log_severity: z.ZodOptional<z.ZodString>;
|
|
203
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>>;
|
|
204
|
+
}, z.core.$strict>>;
|
|
205
|
+
external_trace_sink_pointer: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
provider: z.ZodEnum<{
|
|
207
|
+
custom: "custom";
|
|
208
|
+
otel_collector: "otel_collector";
|
|
209
|
+
langfuse: "langfuse";
|
|
210
|
+
phoenix: "phoenix";
|
|
211
|
+
datadog: "datadog";
|
|
212
|
+
honeycomb: "honeycomb";
|
|
213
|
+
}>;
|
|
214
|
+
trace_id: z.ZodOptional<z.ZodString>;
|
|
215
|
+
span_id: z.ZodOptional<z.ZodString>;
|
|
216
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
217
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
218
|
+
exported_at: z.ZodOptional<z.ZodString>;
|
|
219
|
+
privacy_classification: z.ZodDefault<z.ZodEnum<{
|
|
220
|
+
metadata: "metadata";
|
|
221
|
+
redacted_summary: "redacted_summary";
|
|
222
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
223
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
224
|
+
}>>;
|
|
225
|
+
}, z.core.$strict>>;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
export type TelemetryIngestEventDto = z.infer<typeof TelemetryIngestEventDtoSchema>;
|
|
228
|
+
export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
229
|
+
envelope_version: z.ZodLiteral<"telemetry-ingest.v1">;
|
|
230
|
+
generated_at: z.ZodString;
|
|
231
|
+
collector_version: z.ZodString;
|
|
232
|
+
session_reference: z.ZodObject<{
|
|
233
|
+
operator_id: z.ZodString;
|
|
234
|
+
auth_subject_id: z.ZodString;
|
|
235
|
+
email: z.ZodOptional<z.ZodString>;
|
|
236
|
+
team_id: z.ZodOptional<z.ZodString>;
|
|
237
|
+
device_id: z.ZodOptional<z.ZodString>;
|
|
238
|
+
device_name: z.ZodOptional<z.ZodString>;
|
|
239
|
+
session_id: z.ZodString;
|
|
240
|
+
session_file_path: z.ZodString;
|
|
241
|
+
session_state: z.ZodEnum<{
|
|
242
|
+
unknown: "unknown";
|
|
243
|
+
missing: "missing";
|
|
244
|
+
valid: "valid";
|
|
245
|
+
expired: "expired";
|
|
246
|
+
}>;
|
|
247
|
+
auth_method: z.ZodOptional<z.ZodEnum<{
|
|
248
|
+
unknown: "unknown";
|
|
249
|
+
ambient_device_token: "ambient_device_token";
|
|
250
|
+
supabase_bearer: "supabase_bearer";
|
|
251
|
+
}>>;
|
|
252
|
+
issued_at: z.ZodOptional<z.ZodString>;
|
|
253
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
work_context: z.ZodObject<{
|
|
256
|
+
work_context_id: z.ZodString;
|
|
257
|
+
repo: z.ZodString;
|
|
258
|
+
branch: z.ZodString;
|
|
259
|
+
operator_id: z.ZodString;
|
|
260
|
+
session_id: z.ZodString;
|
|
261
|
+
started_at: z.ZodString;
|
|
262
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
263
|
+
active_ticket_id: z.ZodOptional<z.ZodString>;
|
|
264
|
+
ticket_binding_candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
265
|
+
ticket_id: z.ZodString;
|
|
266
|
+
binding_source: z.ZodEnum<{
|
|
267
|
+
active_work_context: "active_work_context";
|
|
268
|
+
branch_name: "branch_name";
|
|
269
|
+
linear_assignment: "linear_assignment";
|
|
270
|
+
car_ticket: "car_ticket";
|
|
271
|
+
github_pr: "github_pr";
|
|
272
|
+
mcp_context: "mcp_context";
|
|
273
|
+
manual_picker: "manual_picker";
|
|
274
|
+
}>;
|
|
275
|
+
confidence: z.ZodNumber;
|
|
276
|
+
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
277
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
278
|
+
}, z.core.$strict>>>;
|
|
279
|
+
pull_request_url: z.ZodOptional<z.ZodString>;
|
|
280
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
capture_source: z.ZodEnum<{
|
|
282
|
+
unknown: "unknown";
|
|
283
|
+
codex_jsonl: "codex_jsonl";
|
|
284
|
+
codex_otel: "codex_otel";
|
|
285
|
+
car_state: "car_state";
|
|
286
|
+
git_state: "git_state";
|
|
287
|
+
github_state: "github_state";
|
|
288
|
+
linear_state: "linear_state";
|
|
289
|
+
mcp_local: "mcp_local";
|
|
290
|
+
claude_hooks: "claude_hooks";
|
|
291
|
+
manual_event: "manual_event";
|
|
292
|
+
collector_runtime: "collector_runtime";
|
|
293
|
+
}>;
|
|
294
|
+
capture_adapter_version: z.ZodString;
|
|
295
|
+
collector_version: z.ZodString;
|
|
296
|
+
repo: z.ZodString;
|
|
297
|
+
branch: z.ZodString;
|
|
298
|
+
operator_id: z.ZodString;
|
|
299
|
+
session_id: z.ZodString;
|
|
300
|
+
work_context_id: z.ZodString;
|
|
301
|
+
}, z.core.$strict>>;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
events: z.ZodArray<z.ZodObject<{
|
|
304
|
+
event_id: z.ZodString;
|
|
305
|
+
event_type: z.ZodEnum<{
|
|
306
|
+
session_started: "session_started";
|
|
307
|
+
session_ended: "session_ended";
|
|
308
|
+
work_context_updated: "work_context_updated";
|
|
309
|
+
source_scan_completed: "source_scan_completed";
|
|
310
|
+
ticket_binding_detected: "ticket_binding_detected";
|
|
311
|
+
risk_flag_detected: "risk_flag_detected";
|
|
312
|
+
review_signal_detected: "review_signal_detected";
|
|
313
|
+
pr_status_detected: "pr_status_detected";
|
|
314
|
+
command_signal_detected: "command_signal_detected";
|
|
315
|
+
otel_span_normalized: "otel_span_normalized";
|
|
316
|
+
otel_log_normalized: "otel_log_normalized";
|
|
317
|
+
}>;
|
|
318
|
+
occurred_at: z.ZodString;
|
|
319
|
+
provenance: z.ZodObject<{
|
|
320
|
+
capture_source: z.ZodEnum<{
|
|
321
|
+
unknown: "unknown";
|
|
322
|
+
codex_jsonl: "codex_jsonl";
|
|
323
|
+
codex_otel: "codex_otel";
|
|
324
|
+
car_state: "car_state";
|
|
325
|
+
git_state: "git_state";
|
|
326
|
+
github_state: "github_state";
|
|
327
|
+
linear_state: "linear_state";
|
|
328
|
+
mcp_local: "mcp_local";
|
|
329
|
+
claude_hooks: "claude_hooks";
|
|
330
|
+
manual_event: "manual_event";
|
|
331
|
+
collector_runtime: "collector_runtime";
|
|
332
|
+
}>;
|
|
333
|
+
capture_adapter_version: z.ZodString;
|
|
334
|
+
collector_version: z.ZodString;
|
|
335
|
+
repo: z.ZodString;
|
|
336
|
+
branch: z.ZodString;
|
|
337
|
+
operator_id: z.ZodString;
|
|
338
|
+
session_id: z.ZodString;
|
|
339
|
+
work_context_id: z.ZodString;
|
|
340
|
+
}, z.core.$strict>;
|
|
341
|
+
privacy_classification: z.ZodEnum<{
|
|
342
|
+
metadata: "metadata";
|
|
343
|
+
redacted_summary: "redacted_summary";
|
|
344
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
345
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
346
|
+
}>;
|
|
347
|
+
redaction: z.ZodObject<{
|
|
348
|
+
privacy_classification: z.ZodEnum<{
|
|
349
|
+
metadata: "metadata";
|
|
350
|
+
redacted_summary: "redacted_summary";
|
|
351
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
352
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
353
|
+
}>;
|
|
354
|
+
redaction_status: z.ZodEnum<{
|
|
355
|
+
metadata_only: "metadata_only";
|
|
356
|
+
redacted: "redacted";
|
|
357
|
+
raw_local_only: "raw_local_only";
|
|
358
|
+
raw_remote_short_retention: "raw_remote_short_retention";
|
|
359
|
+
}>;
|
|
360
|
+
redacted_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
361
|
+
raw_evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
362
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
363
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
364
|
+
}, z.core.$strict>;
|
|
365
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
366
|
+
metrics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
367
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>>;
|
|
368
|
+
ticket_binding: z.ZodOptional<z.ZodObject<{
|
|
369
|
+
ticket_id: z.ZodString;
|
|
370
|
+
binding_source: z.ZodEnum<{
|
|
371
|
+
active_work_context: "active_work_context";
|
|
372
|
+
branch_name: "branch_name";
|
|
373
|
+
linear_assignment: "linear_assignment";
|
|
374
|
+
car_ticket: "car_ticket";
|
|
375
|
+
github_pr: "github_pr";
|
|
376
|
+
mcp_context: "mcp_context";
|
|
377
|
+
manual_picker: "manual_picker";
|
|
378
|
+
}>;
|
|
379
|
+
confidence: z.ZodNumber;
|
|
380
|
+
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
381
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, z.core.$strict>>;
|
|
383
|
+
risk_flags: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
384
|
+
risk_flag_id: z.ZodString;
|
|
385
|
+
risk_type: z.ZodEnum<{
|
|
386
|
+
no_plan_signal_before_large_edit: "no_plan_signal_before_large_edit";
|
|
387
|
+
p1_or_p2_review_finding: "p1_or_p2_review_finding";
|
|
388
|
+
many_add_revert_loops: "many_add_revert_loops";
|
|
389
|
+
repeated_same_tool_input_shape: "repeated_same_tool_input_shape";
|
|
390
|
+
tool_call_loop: "tool_call_loop";
|
|
391
|
+
file_thrash_same_path: "file_thrash_same_path";
|
|
392
|
+
context_window_pressure: "context_window_pressure";
|
|
393
|
+
permission_denied_spike: "permission_denied_spike";
|
|
394
|
+
high_token_or_time_burn_no_pr: "high_token_or_time_burn_no_pr";
|
|
395
|
+
stuck_for_30_minutes: "stuck_for_30_minutes";
|
|
396
|
+
repeated_same_failing_command: "repeated_same_failing_command";
|
|
397
|
+
branch_ticket_mismatch: "branch_ticket_mismatch";
|
|
398
|
+
collector_stale: "collector_stale";
|
|
399
|
+
}>;
|
|
400
|
+
severity: z.ZodEnum<{
|
|
401
|
+
info: "info";
|
|
402
|
+
warning: "warning";
|
|
403
|
+
high: "high";
|
|
404
|
+
}>;
|
|
405
|
+
observed_at: z.ZodString;
|
|
406
|
+
evidence_labels: z.ZodArray<z.ZodEnum<{
|
|
407
|
+
missing_plan_signal: "missing_plan_signal";
|
|
408
|
+
large_edit: "large_edit";
|
|
409
|
+
p1_review_finding: "p1_review_finding";
|
|
410
|
+
p2_review_finding: "p2_review_finding";
|
|
411
|
+
add_revert_loop: "add_revert_loop";
|
|
412
|
+
same_tool_input_shape: "same_tool_input_shape";
|
|
413
|
+
tool_call_loop_window: "tool_call_loop_window";
|
|
414
|
+
same_path_churn: "same_path_churn";
|
|
415
|
+
token_pressure: "token_pressure";
|
|
416
|
+
permission_denied: "permission_denied";
|
|
417
|
+
approval_denied: "approval_denied";
|
|
418
|
+
no_pr_after_work: "no_pr_after_work";
|
|
419
|
+
idle_or_stuck_duration: "idle_or_stuck_duration";
|
|
420
|
+
same_failing_command: "same_failing_command";
|
|
421
|
+
branch_ticket_disagreement: "branch_ticket_disagreement";
|
|
422
|
+
collector_last_seen_stale: "collector_last_seen_stale";
|
|
423
|
+
}>>;
|
|
424
|
+
evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
425
|
+
provenance: z.ZodObject<{
|
|
426
|
+
capture_source: z.ZodEnum<{
|
|
427
|
+
unknown: "unknown";
|
|
428
|
+
codex_jsonl: "codex_jsonl";
|
|
429
|
+
codex_otel: "codex_otel";
|
|
430
|
+
car_state: "car_state";
|
|
431
|
+
git_state: "git_state";
|
|
432
|
+
github_state: "github_state";
|
|
433
|
+
linear_state: "linear_state";
|
|
434
|
+
mcp_local: "mcp_local";
|
|
435
|
+
claude_hooks: "claude_hooks";
|
|
436
|
+
manual_event: "manual_event";
|
|
437
|
+
collector_runtime: "collector_runtime";
|
|
438
|
+
}>;
|
|
439
|
+
capture_adapter_version: z.ZodString;
|
|
440
|
+
collector_version: z.ZodString;
|
|
441
|
+
repo: z.ZodString;
|
|
442
|
+
branch: z.ZodString;
|
|
443
|
+
operator_id: z.ZodString;
|
|
444
|
+
session_id: z.ZodString;
|
|
445
|
+
work_context_id: z.ZodString;
|
|
446
|
+
}, z.core.$strict>;
|
|
447
|
+
}, z.core.$strict>>>;
|
|
448
|
+
raw_evidence_pointers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
449
|
+
raw_evidence_pointer_id: z.ZodString;
|
|
450
|
+
privacy_classification: z.ZodEnum<{
|
|
451
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
452
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
453
|
+
}>;
|
|
454
|
+
retention_policy: z.ZodObject<{
|
|
455
|
+
mode: z.ZodEnum<{
|
|
456
|
+
local_only: "local_only";
|
|
457
|
+
remote_short_retention: "remote_short_retention";
|
|
458
|
+
}>;
|
|
459
|
+
privacy_classification: z.ZodEnum<{
|
|
460
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
461
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
462
|
+
}>;
|
|
463
|
+
remote_retention_days: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
465
|
+
}, z.core.$strict>;
|
|
466
|
+
storage_scope: z.ZodEnum<{
|
|
467
|
+
local_file: "local_file";
|
|
468
|
+
remote_object: "remote_object";
|
|
469
|
+
}>;
|
|
470
|
+
local_path: z.ZodOptional<z.ZodString>;
|
|
471
|
+
object_key: z.ZodOptional<z.ZodString>;
|
|
472
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
473
|
+
byte_size: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
475
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strict>>>;
|
|
477
|
+
otel: z.ZodOptional<z.ZodObject<{
|
|
478
|
+
trace_id: z.ZodOptional<z.ZodString>;
|
|
479
|
+
span_id: z.ZodOptional<z.ZodString>;
|
|
480
|
+
parent_span_id: z.ZodOptional<z.ZodString>;
|
|
481
|
+
span_name: z.ZodOptional<z.ZodString>;
|
|
482
|
+
span_kind: z.ZodOptional<z.ZodEnum<{
|
|
483
|
+
internal: "internal";
|
|
484
|
+
server: "server";
|
|
485
|
+
client: "client";
|
|
486
|
+
producer: "producer";
|
|
487
|
+
consumer: "consumer";
|
|
488
|
+
}>>;
|
|
489
|
+
log_severity: z.ZodOptional<z.ZodString>;
|
|
490
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>>;
|
|
491
|
+
}, z.core.$strict>>;
|
|
492
|
+
external_trace_sink_pointer: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
provider: z.ZodEnum<{
|
|
494
|
+
custom: "custom";
|
|
495
|
+
otel_collector: "otel_collector";
|
|
496
|
+
langfuse: "langfuse";
|
|
497
|
+
phoenix: "phoenix";
|
|
498
|
+
datadog: "datadog";
|
|
499
|
+
honeycomb: "honeycomb";
|
|
500
|
+
}>;
|
|
501
|
+
trace_id: z.ZodOptional<z.ZodString>;
|
|
502
|
+
span_id: z.ZodOptional<z.ZodString>;
|
|
503
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
504
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
505
|
+
exported_at: z.ZodOptional<z.ZodString>;
|
|
506
|
+
privacy_classification: z.ZodDefault<z.ZodEnum<{
|
|
507
|
+
metadata: "metadata";
|
|
508
|
+
redacted_summary: "redacted_summary";
|
|
509
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
510
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
511
|
+
}>>;
|
|
512
|
+
}, z.core.$strict>>;
|
|
513
|
+
}, z.core.$strict>>;
|
|
514
|
+
source_scan_results: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
515
|
+
adapter: z.ZodObject<{
|
|
516
|
+
capture_source: z.ZodEnum<{
|
|
517
|
+
unknown: "unknown";
|
|
518
|
+
codex_jsonl: "codex_jsonl";
|
|
519
|
+
codex_otel: "codex_otel";
|
|
520
|
+
car_state: "car_state";
|
|
521
|
+
git_state: "git_state";
|
|
522
|
+
github_state: "github_state";
|
|
523
|
+
linear_state: "linear_state";
|
|
524
|
+
mcp_local: "mcp_local";
|
|
525
|
+
claude_hooks: "claude_hooks";
|
|
526
|
+
manual_event: "manual_event";
|
|
527
|
+
collector_runtime: "collector_runtime";
|
|
528
|
+
}>;
|
|
529
|
+
adapter_name: z.ZodString;
|
|
530
|
+
capture_adapter_version: z.ZodString;
|
|
531
|
+
}, z.core.$strict>;
|
|
532
|
+
work_context_id: z.ZodOptional<z.ZodString>;
|
|
533
|
+
status: z.ZodEnum<{
|
|
534
|
+
ok: "ok";
|
|
535
|
+
partial: "partial";
|
|
536
|
+
skipped: "skipped";
|
|
537
|
+
failed: "failed";
|
|
538
|
+
}>;
|
|
539
|
+
started_at: z.ZodString;
|
|
540
|
+
finished_at: z.ZodOptional<z.ZodString>;
|
|
541
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
542
|
+
events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
543
|
+
source_event_id: z.ZodString;
|
|
544
|
+
event_type: z.ZodString;
|
|
545
|
+
occurred_at: z.ZodOptional<z.ZodString>;
|
|
546
|
+
redaction: z.ZodObject<{
|
|
547
|
+
privacy_classification: z.ZodEnum<{
|
|
548
|
+
metadata: "metadata";
|
|
549
|
+
redacted_summary: "redacted_summary";
|
|
550
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
551
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
552
|
+
}>;
|
|
553
|
+
redaction_status: z.ZodEnum<{
|
|
554
|
+
metadata_only: "metadata_only";
|
|
555
|
+
redacted: "redacted";
|
|
556
|
+
raw_local_only: "raw_local_only";
|
|
557
|
+
raw_remote_short_retention: "raw_remote_short_retention";
|
|
558
|
+
}>;
|
|
559
|
+
redacted_fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
560
|
+
raw_evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
561
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
562
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
563
|
+
}, z.core.$strict>;
|
|
564
|
+
raw_evidence_pointers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
565
|
+
raw_evidence_pointer_id: z.ZodString;
|
|
566
|
+
privacy_classification: z.ZodEnum<{
|
|
567
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
568
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
569
|
+
}>;
|
|
570
|
+
retention_policy: z.ZodObject<{
|
|
571
|
+
mode: z.ZodEnum<{
|
|
572
|
+
local_only: "local_only";
|
|
573
|
+
remote_short_retention: "remote_short_retention";
|
|
574
|
+
}>;
|
|
575
|
+
privacy_classification: z.ZodEnum<{
|
|
576
|
+
local_only_raw_evidence: "local_only_raw_evidence";
|
|
577
|
+
remote_short_retention_raw_evidence: "remote_short_retention_raw_evidence";
|
|
578
|
+
}>;
|
|
579
|
+
remote_retention_days: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
581
|
+
}, z.core.$strict>;
|
|
582
|
+
storage_scope: z.ZodEnum<{
|
|
583
|
+
local_file: "local_file";
|
|
584
|
+
remote_object: "remote_object";
|
|
585
|
+
}>;
|
|
586
|
+
local_path: z.ZodOptional<z.ZodString>;
|
|
587
|
+
object_key: z.ZodOptional<z.ZodString>;
|
|
588
|
+
content_hash_sha256: z.ZodOptional<z.ZodString>;
|
|
589
|
+
byte_size: z.ZodOptional<z.ZodNumber>;
|
|
590
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
591
|
+
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
592
|
+
}, z.core.$strict>>>;
|
|
593
|
+
}, z.core.$strict>>>;
|
|
594
|
+
ticket_binding_candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
595
|
+
ticket_id: z.ZodString;
|
|
596
|
+
binding_source: z.ZodEnum<{
|
|
597
|
+
active_work_context: "active_work_context";
|
|
598
|
+
branch_name: "branch_name";
|
|
599
|
+
linear_assignment: "linear_assignment";
|
|
600
|
+
car_ticket: "car_ticket";
|
|
601
|
+
github_pr: "github_pr";
|
|
602
|
+
mcp_context: "mcp_context";
|
|
603
|
+
manual_picker: "manual_picker";
|
|
604
|
+
}>;
|
|
605
|
+
confidence: z.ZodNumber;
|
|
606
|
+
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
607
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
608
|
+
}, z.core.$strict>>>;
|
|
609
|
+
risk_flags: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
610
|
+
risk_flag_id: z.ZodString;
|
|
611
|
+
risk_type: z.ZodEnum<{
|
|
612
|
+
no_plan_signal_before_large_edit: "no_plan_signal_before_large_edit";
|
|
613
|
+
p1_or_p2_review_finding: "p1_or_p2_review_finding";
|
|
614
|
+
many_add_revert_loops: "many_add_revert_loops";
|
|
615
|
+
repeated_same_tool_input_shape: "repeated_same_tool_input_shape";
|
|
616
|
+
tool_call_loop: "tool_call_loop";
|
|
617
|
+
file_thrash_same_path: "file_thrash_same_path";
|
|
618
|
+
context_window_pressure: "context_window_pressure";
|
|
619
|
+
permission_denied_spike: "permission_denied_spike";
|
|
620
|
+
high_token_or_time_burn_no_pr: "high_token_or_time_burn_no_pr";
|
|
621
|
+
stuck_for_30_minutes: "stuck_for_30_minutes";
|
|
622
|
+
repeated_same_failing_command: "repeated_same_failing_command";
|
|
623
|
+
branch_ticket_mismatch: "branch_ticket_mismatch";
|
|
624
|
+
collector_stale: "collector_stale";
|
|
625
|
+
}>;
|
|
626
|
+
severity: z.ZodEnum<{
|
|
627
|
+
info: "info";
|
|
628
|
+
warning: "warning";
|
|
629
|
+
high: "high";
|
|
630
|
+
}>;
|
|
631
|
+
observed_at: z.ZodString;
|
|
632
|
+
evidence_labels: z.ZodArray<z.ZodEnum<{
|
|
633
|
+
missing_plan_signal: "missing_plan_signal";
|
|
634
|
+
large_edit: "large_edit";
|
|
635
|
+
p1_review_finding: "p1_review_finding";
|
|
636
|
+
p2_review_finding: "p2_review_finding";
|
|
637
|
+
add_revert_loop: "add_revert_loop";
|
|
638
|
+
same_tool_input_shape: "same_tool_input_shape";
|
|
639
|
+
tool_call_loop_window: "tool_call_loop_window";
|
|
640
|
+
same_path_churn: "same_path_churn";
|
|
641
|
+
token_pressure: "token_pressure";
|
|
642
|
+
permission_denied: "permission_denied";
|
|
643
|
+
approval_denied: "approval_denied";
|
|
644
|
+
no_pr_after_work: "no_pr_after_work";
|
|
645
|
+
idle_or_stuck_duration: "idle_or_stuck_duration";
|
|
646
|
+
same_failing_command: "same_failing_command";
|
|
647
|
+
branch_ticket_disagreement: "branch_ticket_disagreement";
|
|
648
|
+
collector_last_seen_stale: "collector_last_seen_stale";
|
|
649
|
+
}>>;
|
|
650
|
+
evidence_pointer_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
651
|
+
provenance: z.ZodObject<{
|
|
652
|
+
capture_source: z.ZodEnum<{
|
|
653
|
+
unknown: "unknown";
|
|
654
|
+
codex_jsonl: "codex_jsonl";
|
|
655
|
+
codex_otel: "codex_otel";
|
|
656
|
+
car_state: "car_state";
|
|
657
|
+
git_state: "git_state";
|
|
658
|
+
github_state: "github_state";
|
|
659
|
+
linear_state: "linear_state";
|
|
660
|
+
mcp_local: "mcp_local";
|
|
661
|
+
claude_hooks: "claude_hooks";
|
|
662
|
+
manual_event: "manual_event";
|
|
663
|
+
collector_runtime: "collector_runtime";
|
|
664
|
+
}>;
|
|
665
|
+
capture_adapter_version: z.ZodString;
|
|
666
|
+
collector_version: z.ZodString;
|
|
667
|
+
repo: z.ZodString;
|
|
668
|
+
branch: z.ZodString;
|
|
669
|
+
operator_id: z.ZodString;
|
|
670
|
+
session_id: z.ZodString;
|
|
671
|
+
work_context_id: z.ZodString;
|
|
672
|
+
}, z.core.$strict>;
|
|
673
|
+
}, z.core.$strict>>>;
|
|
674
|
+
diagnostic_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
675
|
+
}, z.core.$strict>>>;
|
|
676
|
+
}, z.core.$strict>;
|
|
677
|
+
export type TelemetryIngestEnvelope = z.infer<typeof TelemetryIngestEnvelopeSchema>;
|