@bli-cockpit/telemetry-core 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evidence-completeness.d.ts +106 -0
- package/dist/evidence-completeness.js +70 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ingest-dto.d.ts +152 -0
- package/dist/ingest-dto.js +2 -0
- package/dist/work-context.d.ts +88 -0
- package/dist/work-context.js +47 -0
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const EvidenceCompletenessStatusSchema: z.ZodEnum<{
|
|
3
|
+
unknown: "unknown";
|
|
4
|
+
failed: "failed";
|
|
5
|
+
complete: "complete";
|
|
6
|
+
partial: "partial";
|
|
7
|
+
empty: "empty";
|
|
8
|
+
}>;
|
|
9
|
+
export type EvidenceCompletenessStatus = z.infer<typeof EvidenceCompletenessStatusSchema>;
|
|
10
|
+
export declare const EvidenceCompletenessSourceCountSchema: z.ZodObject<{
|
|
11
|
+
source: z.ZodString;
|
|
12
|
+
scanned_count: z.ZodNumber;
|
|
13
|
+
included_count: z.ZodNumber;
|
|
14
|
+
skipped_count: z.ZodNumber;
|
|
15
|
+
truncated_count: z.ZodNumber;
|
|
16
|
+
deferred_count: z.ZodNumber;
|
|
17
|
+
reused_count: z.ZodNumber;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type EvidenceCompletenessSourceCount = z.infer<typeof EvidenceCompletenessSourceCountSchema>;
|
|
20
|
+
export declare const EvidenceCompletenessTotalsSchema: z.ZodObject<{
|
|
21
|
+
scanned_count: z.ZodNumber;
|
|
22
|
+
included_count: z.ZodNumber;
|
|
23
|
+
skipped_count: z.ZodNumber;
|
|
24
|
+
truncated_count: z.ZodNumber;
|
|
25
|
+
deferred_count: z.ZodNumber;
|
|
26
|
+
reused_count: z.ZodNumber;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type EvidenceCompletenessTotals = z.infer<typeof EvidenceCompletenessTotalsSchema>;
|
|
29
|
+
export declare const EvidenceCompletenessCapSchema: z.ZodObject<{
|
|
30
|
+
source: z.ZodString;
|
|
31
|
+
cap_type: z.ZodString;
|
|
32
|
+
limit: z.ZodNumber;
|
|
33
|
+
observed: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
applied: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export type EvidenceCompletenessCap = z.infer<typeof EvidenceCompletenessCapSchema>;
|
|
37
|
+
export declare const EvidenceCompletenessSkipReasonSchema: z.ZodObject<{
|
|
38
|
+
source: z.ZodString;
|
|
39
|
+
reason: z.ZodString;
|
|
40
|
+
count: z.ZodNumber;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type EvidenceCompletenessSkipReason = z.infer<typeof EvidenceCompletenessSkipReasonSchema>;
|
|
43
|
+
export declare const EvidenceCompletenessTruncationMarkerSchema: z.ZodObject<{
|
|
44
|
+
source: z.ZodString;
|
|
45
|
+
reason: z.ZodString;
|
|
46
|
+
count: z.ZodNumber;
|
|
47
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
observed_bytes: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
included_bytes: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type EvidenceCompletenessTruncationMarker = z.infer<typeof EvidenceCompletenessTruncationMarkerSchema>;
|
|
52
|
+
export declare const EvidenceCompletenessPayloadSchema: z.ZodObject<{
|
|
53
|
+
schema_version: z.ZodLiteral<"evidence-completeness.v1">;
|
|
54
|
+
status: z.ZodEnum<{
|
|
55
|
+
unknown: "unknown";
|
|
56
|
+
failed: "failed";
|
|
57
|
+
complete: "complete";
|
|
58
|
+
partial: "partial";
|
|
59
|
+
empty: "empty";
|
|
60
|
+
}>;
|
|
61
|
+
generated_at: z.ZodString;
|
|
62
|
+
scan_window: z.ZodObject<{
|
|
63
|
+
started_at: z.ZodString;
|
|
64
|
+
finished_at: z.ZodString;
|
|
65
|
+
since_minutes: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
source_counts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
scanned_count: z.ZodNumber;
|
|
70
|
+
included_count: z.ZodNumber;
|
|
71
|
+
skipped_count: z.ZodNumber;
|
|
72
|
+
truncated_count: z.ZodNumber;
|
|
73
|
+
deferred_count: z.ZodNumber;
|
|
74
|
+
reused_count: z.ZodNumber;
|
|
75
|
+
}, z.core.$strict>>>;
|
|
76
|
+
totals: z.ZodObject<{
|
|
77
|
+
scanned_count: z.ZodNumber;
|
|
78
|
+
included_count: z.ZodNumber;
|
|
79
|
+
skipped_count: z.ZodNumber;
|
|
80
|
+
truncated_count: z.ZodNumber;
|
|
81
|
+
deferred_count: z.ZodNumber;
|
|
82
|
+
reused_count: z.ZodNumber;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
caps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
85
|
+
source: z.ZodString;
|
|
86
|
+
cap_type: z.ZodString;
|
|
87
|
+
limit: z.ZodNumber;
|
|
88
|
+
observed: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
applied: z.ZodBoolean;
|
|
90
|
+
}, z.core.$strict>>>;
|
|
91
|
+
skip_reasons: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
92
|
+
source: z.ZodString;
|
|
93
|
+
reason: z.ZodString;
|
|
94
|
+
count: z.ZodNumber;
|
|
95
|
+
}, z.core.$strict>>>;
|
|
96
|
+
truncation_markers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
97
|
+
source: z.ZodString;
|
|
98
|
+
reason: z.ZodString;
|
|
99
|
+
count: z.ZodNumber;
|
|
100
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
observed_bytes: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
included_bytes: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
notes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
export type EvidenceCompletenessPayload = z.infer<typeof EvidenceCompletenessPayloadSchema>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { IsoDateTimeSchema, NonEmptyStringSchema } from "./common.js";
|
|
3
|
+
const EvidenceCountSchema = z.number().int().nonnegative();
|
|
4
|
+
export const EvidenceCompletenessStatusSchema = z.enum([
|
|
5
|
+
"complete",
|
|
6
|
+
"partial",
|
|
7
|
+
"empty",
|
|
8
|
+
"failed",
|
|
9
|
+
"unknown",
|
|
10
|
+
]);
|
|
11
|
+
export const EvidenceCompletenessSourceCountSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
source: NonEmptyStringSchema,
|
|
14
|
+
scanned_count: EvidenceCountSchema,
|
|
15
|
+
included_count: EvidenceCountSchema,
|
|
16
|
+
skipped_count: EvidenceCountSchema,
|
|
17
|
+
truncated_count: EvidenceCountSchema,
|
|
18
|
+
deferred_count: EvidenceCountSchema,
|
|
19
|
+
reused_count: EvidenceCountSchema,
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
export const EvidenceCompletenessTotalsSchema = EvidenceCompletenessSourceCountSchema.omit({ source: true }).strict();
|
|
23
|
+
export const EvidenceCompletenessCapSchema = z
|
|
24
|
+
.object({
|
|
25
|
+
source: NonEmptyStringSchema,
|
|
26
|
+
cap_type: NonEmptyStringSchema,
|
|
27
|
+
limit: EvidenceCountSchema,
|
|
28
|
+
observed: EvidenceCountSchema.optional(),
|
|
29
|
+
applied: z.boolean(),
|
|
30
|
+
})
|
|
31
|
+
.strict();
|
|
32
|
+
export const EvidenceCompletenessSkipReasonSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
source: NonEmptyStringSchema,
|
|
35
|
+
reason: NonEmptyStringSchema,
|
|
36
|
+
count: EvidenceCountSchema,
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
export const EvidenceCompletenessTruncationMarkerSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
source: NonEmptyStringSchema,
|
|
42
|
+
reason: NonEmptyStringSchema,
|
|
43
|
+
count: EvidenceCountSchema,
|
|
44
|
+
max_bytes: EvidenceCountSchema.optional(),
|
|
45
|
+
observed_bytes: EvidenceCountSchema.optional(),
|
|
46
|
+
included_bytes: EvidenceCountSchema.optional(),
|
|
47
|
+
})
|
|
48
|
+
.strict();
|
|
49
|
+
export const EvidenceCompletenessPayloadSchema = z
|
|
50
|
+
.object({
|
|
51
|
+
schema_version: z.literal("evidence-completeness.v1"),
|
|
52
|
+
status: EvidenceCompletenessStatusSchema,
|
|
53
|
+
generated_at: IsoDateTimeSchema,
|
|
54
|
+
scan_window: z
|
|
55
|
+
.object({
|
|
56
|
+
started_at: IsoDateTimeSchema,
|
|
57
|
+
finished_at: IsoDateTimeSchema,
|
|
58
|
+
since_minutes: EvidenceCountSchema.optional(),
|
|
59
|
+
})
|
|
60
|
+
.strict(),
|
|
61
|
+
source_counts: z.array(EvidenceCompletenessSourceCountSchema).default([]),
|
|
62
|
+
totals: EvidenceCompletenessTotalsSchema,
|
|
63
|
+
caps: z.array(EvidenceCompletenessCapSchema).default([]),
|
|
64
|
+
skip_reasons: z.array(EvidenceCompletenessSkipReasonSchema).default([]),
|
|
65
|
+
truncation_markers: z
|
|
66
|
+
.array(EvidenceCompletenessTruncationMarkerSchema)
|
|
67
|
+
.default([]),
|
|
68
|
+
notes: z.array(NonEmptyStringSchema.max(160)).default([]),
|
|
69
|
+
})
|
|
70
|
+
.strict();
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/ingest-dto.d.ts
CHANGED
|
@@ -88,6 +88,60 @@ export declare const TelemetryIngestEventDtoSchema: z.ZodObject<{
|
|
|
88
88
|
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
89
89
|
metrics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
90
90
|
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]>>]>>>;
|
|
91
|
+
evidence_completeness: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
schema_version: z.ZodLiteral<"evidence-completeness.v1">;
|
|
93
|
+
status: z.ZodEnum<{
|
|
94
|
+
unknown: "unknown";
|
|
95
|
+
failed: "failed";
|
|
96
|
+
complete: "complete";
|
|
97
|
+
partial: "partial";
|
|
98
|
+
empty: "empty";
|
|
99
|
+
}>;
|
|
100
|
+
generated_at: z.ZodString;
|
|
101
|
+
scan_window: z.ZodObject<{
|
|
102
|
+
started_at: z.ZodString;
|
|
103
|
+
finished_at: z.ZodString;
|
|
104
|
+
since_minutes: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
source_counts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
107
|
+
source: z.ZodString;
|
|
108
|
+
scanned_count: z.ZodNumber;
|
|
109
|
+
included_count: z.ZodNumber;
|
|
110
|
+
skipped_count: z.ZodNumber;
|
|
111
|
+
truncated_count: z.ZodNumber;
|
|
112
|
+
deferred_count: z.ZodNumber;
|
|
113
|
+
reused_count: z.ZodNumber;
|
|
114
|
+
}, z.core.$strict>>>;
|
|
115
|
+
totals: z.ZodObject<{
|
|
116
|
+
scanned_count: z.ZodNumber;
|
|
117
|
+
included_count: z.ZodNumber;
|
|
118
|
+
skipped_count: z.ZodNumber;
|
|
119
|
+
truncated_count: z.ZodNumber;
|
|
120
|
+
deferred_count: z.ZodNumber;
|
|
121
|
+
reused_count: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
caps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
124
|
+
source: z.ZodString;
|
|
125
|
+
cap_type: z.ZodString;
|
|
126
|
+
limit: z.ZodNumber;
|
|
127
|
+
observed: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
applied: z.ZodBoolean;
|
|
129
|
+
}, z.core.$strict>>>;
|
|
130
|
+
skip_reasons: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
131
|
+
source: z.ZodString;
|
|
132
|
+
reason: z.ZodString;
|
|
133
|
+
count: z.ZodNumber;
|
|
134
|
+
}, z.core.$strict>>>;
|
|
135
|
+
truncation_markers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
136
|
+
source: z.ZodString;
|
|
137
|
+
reason: z.ZodString;
|
|
138
|
+
count: z.ZodNumber;
|
|
139
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
observed_bytes: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
included_bytes: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strict>>>;
|
|
143
|
+
notes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
144
|
+
}, z.core.$strict>>;
|
|
91
145
|
ticket_binding: z.ZodOptional<z.ZodObject<{
|
|
92
146
|
ticket_id: z.ZodString;
|
|
93
147
|
binding_source: z.ZodEnum<{
|
|
@@ -305,6 +359,50 @@ export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
|
305
359
|
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
306
360
|
external_url: z.ZodOptional<z.ZodString>;
|
|
307
361
|
}, z.core.$strict>>>;
|
|
362
|
+
topic_label: z.ZodOptional<z.ZodString>;
|
|
363
|
+
topic_summary_redacted: z.ZodOptional<z.ZodString>;
|
|
364
|
+
work_intent: z.ZodOptional<z.ZodEnum<{
|
|
365
|
+
unknown: "unknown";
|
|
366
|
+
implementation: "implementation";
|
|
367
|
+
bug_fix: "bug_fix";
|
|
368
|
+
root_cause_analysis: "root_cause_analysis";
|
|
369
|
+
planning: "planning";
|
|
370
|
+
discovery: "discovery";
|
|
371
|
+
review: "review";
|
|
372
|
+
testing: "testing";
|
|
373
|
+
documentation: "documentation";
|
|
374
|
+
release: "release";
|
|
375
|
+
learning: "learning";
|
|
376
|
+
coordination: "coordination";
|
|
377
|
+
maintenance: "maintenance";
|
|
378
|
+
analysis: "analysis";
|
|
379
|
+
other: "other";
|
|
380
|
+
}>>;
|
|
381
|
+
work_phase: z.ZodOptional<z.ZodEnum<{
|
|
382
|
+
unknown: "unknown";
|
|
383
|
+
implementation: "implementation";
|
|
384
|
+
planning: "planning";
|
|
385
|
+
discovery: "discovery";
|
|
386
|
+
review: "review";
|
|
387
|
+
testing: "testing";
|
|
388
|
+
documentation: "documentation";
|
|
389
|
+
release: "release";
|
|
390
|
+
analysis: "analysis";
|
|
391
|
+
other: "other";
|
|
392
|
+
debugging: "debugging";
|
|
393
|
+
handoff: "handoff";
|
|
394
|
+
}>>;
|
|
395
|
+
intent_source: z.ZodOptional<z.ZodEnum<{
|
|
396
|
+
unknown: "unknown";
|
|
397
|
+
explicit_user: "explicit_user";
|
|
398
|
+
linear_ticket: "linear_ticket";
|
|
399
|
+
git_branch: "git_branch";
|
|
400
|
+
collector_heuristic: "collector_heuristic";
|
|
401
|
+
agent_heuristic: "agent_heuristic";
|
|
402
|
+
llm_inference: "llm_inference";
|
|
403
|
+
manual: "manual";
|
|
404
|
+
}>>;
|
|
405
|
+
intent_confidence: z.ZodOptional<z.ZodNumber>;
|
|
308
406
|
pull_request_url: z.ZodOptional<z.ZodString>;
|
|
309
407
|
provenance: z.ZodOptional<z.ZodObject<{
|
|
310
408
|
capture_source: z.ZodEnum<{
|
|
@@ -411,6 +509,60 @@ export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
|
411
509
|
redacted_summary: z.ZodOptional<z.ZodString>;
|
|
412
510
|
metrics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
413
511
|
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]>>]>>>;
|
|
512
|
+
evidence_completeness: z.ZodOptional<z.ZodObject<{
|
|
513
|
+
schema_version: z.ZodLiteral<"evidence-completeness.v1">;
|
|
514
|
+
status: z.ZodEnum<{
|
|
515
|
+
unknown: "unknown";
|
|
516
|
+
failed: "failed";
|
|
517
|
+
complete: "complete";
|
|
518
|
+
partial: "partial";
|
|
519
|
+
empty: "empty";
|
|
520
|
+
}>;
|
|
521
|
+
generated_at: z.ZodString;
|
|
522
|
+
scan_window: z.ZodObject<{
|
|
523
|
+
started_at: z.ZodString;
|
|
524
|
+
finished_at: z.ZodString;
|
|
525
|
+
since_minutes: z.ZodOptional<z.ZodNumber>;
|
|
526
|
+
}, z.core.$strict>;
|
|
527
|
+
source_counts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
528
|
+
source: z.ZodString;
|
|
529
|
+
scanned_count: z.ZodNumber;
|
|
530
|
+
included_count: z.ZodNumber;
|
|
531
|
+
skipped_count: z.ZodNumber;
|
|
532
|
+
truncated_count: z.ZodNumber;
|
|
533
|
+
deferred_count: z.ZodNumber;
|
|
534
|
+
reused_count: z.ZodNumber;
|
|
535
|
+
}, z.core.$strict>>>;
|
|
536
|
+
totals: z.ZodObject<{
|
|
537
|
+
scanned_count: z.ZodNumber;
|
|
538
|
+
included_count: z.ZodNumber;
|
|
539
|
+
skipped_count: z.ZodNumber;
|
|
540
|
+
truncated_count: z.ZodNumber;
|
|
541
|
+
deferred_count: z.ZodNumber;
|
|
542
|
+
reused_count: z.ZodNumber;
|
|
543
|
+
}, z.core.$strict>;
|
|
544
|
+
caps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
545
|
+
source: z.ZodString;
|
|
546
|
+
cap_type: z.ZodString;
|
|
547
|
+
limit: z.ZodNumber;
|
|
548
|
+
observed: z.ZodOptional<z.ZodNumber>;
|
|
549
|
+
applied: z.ZodBoolean;
|
|
550
|
+
}, z.core.$strict>>>;
|
|
551
|
+
skip_reasons: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
552
|
+
source: z.ZodString;
|
|
553
|
+
reason: z.ZodString;
|
|
554
|
+
count: z.ZodNumber;
|
|
555
|
+
}, z.core.$strict>>>;
|
|
556
|
+
truncation_markers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
557
|
+
source: z.ZodString;
|
|
558
|
+
reason: z.ZodString;
|
|
559
|
+
count: z.ZodNumber;
|
|
560
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
observed_bytes: z.ZodOptional<z.ZodNumber>;
|
|
562
|
+
included_bytes: z.ZodOptional<z.ZodNumber>;
|
|
563
|
+
}, z.core.$strict>>>;
|
|
564
|
+
notes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
565
|
+
}, z.core.$strict>>;
|
|
414
566
|
ticket_binding: z.ZodOptional<z.ZodObject<{
|
|
415
567
|
ticket_id: z.ZodString;
|
|
416
568
|
binding_source: z.ZodEnum<{
|
package/dist/ingest-dto.js
CHANGED
|
@@ -5,6 +5,7 @@ import { PrivacyClassificationSchema, RawEvidencePointerSchema, RedactionMetadat
|
|
|
5
5
|
import { RiskFlagSchema } from "./risk-flags.js";
|
|
6
6
|
import { SourceScanResultSchema } from "./source-adapter.js";
|
|
7
7
|
import { ExternalTraceSinkPointerSchema, NormalizedOtelTelemetrySchema, } from "./trace-sink.js";
|
|
8
|
+
import { EvidenceCompletenessPayloadSchema } from "./evidence-completeness.js";
|
|
8
9
|
import { LocalWorkContextSchema, TicketBindingCandidateSchema, } from "./work-context.js";
|
|
9
10
|
export const TelemetryEventTypeSchema = z.enum([
|
|
10
11
|
"session_started",
|
|
@@ -30,6 +31,7 @@ export const TelemetryIngestEventDtoSchema = z
|
|
|
30
31
|
redacted_summary: z.string().trim().min(1).max(4000).optional(),
|
|
31
32
|
metrics: z.record(z.string(), z.number()).default({}),
|
|
32
33
|
attributes: JsonAttributeRecordSchema.default({}),
|
|
34
|
+
evidence_completeness: EvidenceCompletenessPayloadSchema.optional(),
|
|
33
35
|
ticket_binding: TicketBindingCandidateSchema.optional(),
|
|
34
36
|
risk_flags: z.array(RiskFlagSchema).default([]),
|
|
35
37
|
raw_evidence_pointers: z.array(RawEvidencePointerSchema).default([]),
|
package/dist/work-context.d.ts
CHANGED
|
@@ -25,6 +25,50 @@ export declare const TicketBindingCandidateSchema: z.ZodObject<{
|
|
|
25
25
|
external_url: z.ZodOptional<z.ZodString>;
|
|
26
26
|
}, z.core.$strict>;
|
|
27
27
|
export type TicketBindingCandidate = z.infer<typeof TicketBindingCandidateSchema>;
|
|
28
|
+
export declare const WorkIntentSchema: z.ZodEnum<{
|
|
29
|
+
unknown: "unknown";
|
|
30
|
+
implementation: "implementation";
|
|
31
|
+
bug_fix: "bug_fix";
|
|
32
|
+
root_cause_analysis: "root_cause_analysis";
|
|
33
|
+
planning: "planning";
|
|
34
|
+
discovery: "discovery";
|
|
35
|
+
review: "review";
|
|
36
|
+
testing: "testing";
|
|
37
|
+
documentation: "documentation";
|
|
38
|
+
release: "release";
|
|
39
|
+
learning: "learning";
|
|
40
|
+
coordination: "coordination";
|
|
41
|
+
maintenance: "maintenance";
|
|
42
|
+
analysis: "analysis";
|
|
43
|
+
other: "other";
|
|
44
|
+
}>;
|
|
45
|
+
export type WorkIntent = z.infer<typeof WorkIntentSchema>;
|
|
46
|
+
export declare const WorkPhaseSchema: z.ZodEnum<{
|
|
47
|
+
unknown: "unknown";
|
|
48
|
+
implementation: "implementation";
|
|
49
|
+
planning: "planning";
|
|
50
|
+
discovery: "discovery";
|
|
51
|
+
review: "review";
|
|
52
|
+
testing: "testing";
|
|
53
|
+
documentation: "documentation";
|
|
54
|
+
release: "release";
|
|
55
|
+
analysis: "analysis";
|
|
56
|
+
other: "other";
|
|
57
|
+
debugging: "debugging";
|
|
58
|
+
handoff: "handoff";
|
|
59
|
+
}>;
|
|
60
|
+
export type WorkPhase = z.infer<typeof WorkPhaseSchema>;
|
|
61
|
+
export declare const IntentSourceSchema: z.ZodEnum<{
|
|
62
|
+
unknown: "unknown";
|
|
63
|
+
explicit_user: "explicit_user";
|
|
64
|
+
linear_ticket: "linear_ticket";
|
|
65
|
+
git_branch: "git_branch";
|
|
66
|
+
collector_heuristic: "collector_heuristic";
|
|
67
|
+
agent_heuristic: "agent_heuristic";
|
|
68
|
+
llm_inference: "llm_inference";
|
|
69
|
+
manual: "manual";
|
|
70
|
+
}>;
|
|
71
|
+
export type IntentSource = z.infer<typeof IntentSourceSchema>;
|
|
28
72
|
export declare const LocalWorkContextSchema: z.ZodObject<{
|
|
29
73
|
work_context_id: z.ZodString;
|
|
30
74
|
repo: z.ZodString;
|
|
@@ -56,6 +100,50 @@ export declare const LocalWorkContextSchema: z.ZodObject<{
|
|
|
56
100
|
evidence_labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
57
101
|
external_url: z.ZodOptional<z.ZodString>;
|
|
58
102
|
}, z.core.$strict>>>;
|
|
103
|
+
topic_label: z.ZodOptional<z.ZodString>;
|
|
104
|
+
topic_summary_redacted: z.ZodOptional<z.ZodString>;
|
|
105
|
+
work_intent: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
unknown: "unknown";
|
|
107
|
+
implementation: "implementation";
|
|
108
|
+
bug_fix: "bug_fix";
|
|
109
|
+
root_cause_analysis: "root_cause_analysis";
|
|
110
|
+
planning: "planning";
|
|
111
|
+
discovery: "discovery";
|
|
112
|
+
review: "review";
|
|
113
|
+
testing: "testing";
|
|
114
|
+
documentation: "documentation";
|
|
115
|
+
release: "release";
|
|
116
|
+
learning: "learning";
|
|
117
|
+
coordination: "coordination";
|
|
118
|
+
maintenance: "maintenance";
|
|
119
|
+
analysis: "analysis";
|
|
120
|
+
other: "other";
|
|
121
|
+
}>>;
|
|
122
|
+
work_phase: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
unknown: "unknown";
|
|
124
|
+
implementation: "implementation";
|
|
125
|
+
planning: "planning";
|
|
126
|
+
discovery: "discovery";
|
|
127
|
+
review: "review";
|
|
128
|
+
testing: "testing";
|
|
129
|
+
documentation: "documentation";
|
|
130
|
+
release: "release";
|
|
131
|
+
analysis: "analysis";
|
|
132
|
+
other: "other";
|
|
133
|
+
debugging: "debugging";
|
|
134
|
+
handoff: "handoff";
|
|
135
|
+
}>>;
|
|
136
|
+
intent_source: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
unknown: "unknown";
|
|
138
|
+
explicit_user: "explicit_user";
|
|
139
|
+
linear_ticket: "linear_ticket";
|
|
140
|
+
git_branch: "git_branch";
|
|
141
|
+
collector_heuristic: "collector_heuristic";
|
|
142
|
+
agent_heuristic: "agent_heuristic";
|
|
143
|
+
llm_inference: "llm_inference";
|
|
144
|
+
manual: "manual";
|
|
145
|
+
}>>;
|
|
146
|
+
intent_confidence: z.ZodOptional<z.ZodNumber>;
|
|
59
147
|
pull_request_url: z.ZodOptional<z.ZodString>;
|
|
60
148
|
provenance: z.ZodOptional<z.ZodObject<{
|
|
61
149
|
capture_source: z.ZodEnum<{
|
package/dist/work-context.js
CHANGED
|
@@ -18,6 +18,47 @@ export const TicketBindingCandidateSchema = z
|
|
|
18
18
|
external_url: z.string().url().optional(),
|
|
19
19
|
})
|
|
20
20
|
.strict();
|
|
21
|
+
export const WorkIntentSchema = z.enum([
|
|
22
|
+
"implementation",
|
|
23
|
+
"bug_fix",
|
|
24
|
+
"root_cause_analysis",
|
|
25
|
+
"planning",
|
|
26
|
+
"discovery",
|
|
27
|
+
"review",
|
|
28
|
+
"testing",
|
|
29
|
+
"documentation",
|
|
30
|
+
"release",
|
|
31
|
+
"learning",
|
|
32
|
+
"coordination",
|
|
33
|
+
"maintenance",
|
|
34
|
+
"analysis",
|
|
35
|
+
"unknown",
|
|
36
|
+
"other",
|
|
37
|
+
]);
|
|
38
|
+
export const WorkPhaseSchema = z.enum([
|
|
39
|
+
"planning",
|
|
40
|
+
"discovery",
|
|
41
|
+
"implementation",
|
|
42
|
+
"debugging",
|
|
43
|
+
"review",
|
|
44
|
+
"testing",
|
|
45
|
+
"documentation",
|
|
46
|
+
"release",
|
|
47
|
+
"handoff",
|
|
48
|
+
"analysis",
|
|
49
|
+
"unknown",
|
|
50
|
+
"other",
|
|
51
|
+
]);
|
|
52
|
+
export const IntentSourceSchema = z.enum([
|
|
53
|
+
"explicit_user",
|
|
54
|
+
"linear_ticket",
|
|
55
|
+
"git_branch",
|
|
56
|
+
"collector_heuristic",
|
|
57
|
+
"agent_heuristic",
|
|
58
|
+
"llm_inference",
|
|
59
|
+
"manual",
|
|
60
|
+
"unknown",
|
|
61
|
+
]);
|
|
21
62
|
export const LocalWorkContextSchema = z
|
|
22
63
|
.object({
|
|
23
64
|
work_context_id: NonEmptyStringSchema,
|
|
@@ -38,6 +79,12 @@ export const LocalWorkContextSchema = z
|
|
|
38
79
|
ticket_binding_candidates: z
|
|
39
80
|
.array(TicketBindingCandidateSchema)
|
|
40
81
|
.default([]),
|
|
82
|
+
topic_label: NonEmptyStringSchema.max(120).optional(),
|
|
83
|
+
topic_summary_redacted: z.string().trim().min(1).max(500).optional(),
|
|
84
|
+
work_intent: WorkIntentSchema.optional(),
|
|
85
|
+
work_phase: WorkPhaseSchema.optional(),
|
|
86
|
+
intent_source: IntentSourceSchema.optional(),
|
|
87
|
+
intent_confidence: z.number().min(0).max(1).optional(),
|
|
41
88
|
pull_request_url: z.string().url().optional(),
|
|
42
89
|
provenance: CaptureProvenanceSchema.optional(),
|
|
43
90
|
})
|