@bli-cockpit/telemetry-core 0.1.65 → 0.1.66
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/agent-setup.d.ts +57 -0
- package/dist/agent-setup.js +20 -0
- package/dist/collector-heartbeat.d.ts +54 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ingest-dto.d.ts +2 -2
- package/dist/setup-receipt.d.ts +54 -0
- package/dist/setup-receipt.js +2 -0
- package/dist/work-context.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SetupNameSchema: z.ZodString;
|
|
3
|
+
export declare const AgentSetupSchema: z.ZodObject<{
|
|
4
|
+
checked_at: z.ZodString;
|
|
5
|
+
os: z.ZodEnum<{
|
|
6
|
+
darwin: "darwin";
|
|
7
|
+
win32: "win32";
|
|
8
|
+
other: "other";
|
|
9
|
+
}>;
|
|
10
|
+
cli_version: z.ZodString;
|
|
11
|
+
claude: z.ZodObject<{
|
|
12
|
+
version: z.ZodNullable<z.ZodString>;
|
|
13
|
+
model: z.ZodNullable<z.ZodString>;
|
|
14
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
15
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
16
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
17
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
18
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
19
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
transport: z.ZodEnum<{
|
|
22
|
+
unknown: "unknown";
|
|
23
|
+
stdio: "stdio";
|
|
24
|
+
http: "http";
|
|
25
|
+
sse: "sse";
|
|
26
|
+
}>;
|
|
27
|
+
}, z.core.$strict>>>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
codex: z.ZodObject<{
|
|
30
|
+
version: z.ZodNullable<z.ZodString>;
|
|
31
|
+
model: z.ZodNullable<z.ZodString>;
|
|
32
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
33
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
34
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
35
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
36
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
37
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
transport: z.ZodEnum<{
|
|
40
|
+
unknown: "unknown";
|
|
41
|
+
stdio: "stdio";
|
|
42
|
+
http: "http";
|
|
43
|
+
sse: "sse";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strict>>>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodEnum<{
|
|
49
|
+
"CLAUDE.md": "CLAUDE.md";
|
|
50
|
+
"AGENTS.md": "AGENTS.md";
|
|
51
|
+
}>;
|
|
52
|
+
exists: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
54
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type AgentSetup = z.infer<typeof AgentSetupSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { containsSecretLikeContent } from "./secret-guards.js";
|
|
3
|
+
// Names are the only free text allowed to cross this boundary. No command,
|
|
4
|
+
// URL, argument, path, environment value or configuration body is accepted.
|
|
5
|
+
export const SetupNameSchema = z.string().max(100).regex(/^[a-z0-9][a-z0-9_.@+-]*$/i)
|
|
6
|
+
.refine(value => !containsSecretLikeContent(value), "secret_like_name");
|
|
7
|
+
const names = z.array(SetupNameSchema).max(500);
|
|
8
|
+
const tool = z.object({
|
|
9
|
+
version: SetupNameSchema.nullable(), model: SetupNameSchema.nullable(), effort: SetupNameSchema.nullable(),
|
|
10
|
+
skills: names.nullable(), plugins: names.nullable(), agents: names.nullable(), hooks: names.nullable(),
|
|
11
|
+
mcp: z.array(z.object({ name: SetupNameSchema, transport: z.enum(["stdio", "http", "sse", "unknown"]) }).strict()).max(500).nullable(),
|
|
12
|
+
}).strict();
|
|
13
|
+
export const AgentSetupSchema = z.object({
|
|
14
|
+
checked_at: z.string().datetime(), os: z.enum(["darwin", "win32", "other"]), cli_version: SetupNameSchema,
|
|
15
|
+
claude: tool, codex: tool,
|
|
16
|
+
instructions: z.array(z.object({
|
|
17
|
+
name: z.enum(["CLAUDE.md", "AGENTS.md"]), exists: z.boolean().nullable(),
|
|
18
|
+
sha256: z.string().regex(/^[a-f0-9]{64}$/).nullable(), bytes: z.number().int().nonnegative().nullable(),
|
|
19
|
+
}).strict()).max(2),
|
|
20
|
+
}).strict();
|
|
@@ -172,6 +172,60 @@ export declare const CollectorHeartbeatSchema: z.ZodObject<{
|
|
|
172
172
|
}, z.core.$strict>>;
|
|
173
173
|
setup_receipt: z.ZodOptional<z.ZodObject<{
|
|
174
174
|
schema_version: z.ZodLiteral<"setup-receipt.v1">;
|
|
175
|
+
agent_setup: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
checked_at: z.ZodString;
|
|
177
|
+
os: z.ZodEnum<{
|
|
178
|
+
darwin: "darwin";
|
|
179
|
+
win32: "win32";
|
|
180
|
+
other: "other";
|
|
181
|
+
}>;
|
|
182
|
+
cli_version: z.ZodString;
|
|
183
|
+
claude: z.ZodObject<{
|
|
184
|
+
version: z.ZodNullable<z.ZodString>;
|
|
185
|
+
model: z.ZodNullable<z.ZodString>;
|
|
186
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
187
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
188
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
189
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
190
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
191
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
transport: z.ZodEnum<{
|
|
194
|
+
unknown: "unknown";
|
|
195
|
+
stdio: "stdio";
|
|
196
|
+
http: "http";
|
|
197
|
+
sse: "sse";
|
|
198
|
+
}>;
|
|
199
|
+
}, z.core.$strict>>>;
|
|
200
|
+
}, z.core.$strict>;
|
|
201
|
+
codex: z.ZodObject<{
|
|
202
|
+
version: z.ZodNullable<z.ZodString>;
|
|
203
|
+
model: z.ZodNullable<z.ZodString>;
|
|
204
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
205
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
206
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
207
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
208
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
209
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
transport: z.ZodEnum<{
|
|
212
|
+
unknown: "unknown";
|
|
213
|
+
stdio: "stdio";
|
|
214
|
+
http: "http";
|
|
215
|
+
sse: "sse";
|
|
216
|
+
}>;
|
|
217
|
+
}, z.core.$strict>>>;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
220
|
+
name: z.ZodEnum<{
|
|
221
|
+
"CLAUDE.md": "CLAUDE.md";
|
|
222
|
+
"AGENTS.md": "AGENTS.md";
|
|
223
|
+
}>;
|
|
224
|
+
exists: z.ZodNullable<z.ZodBoolean>;
|
|
225
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
226
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
227
|
+
}, z.core.$strict>>;
|
|
228
|
+
}, z.core.$strict>>;
|
|
175
229
|
checked_at: z.ZodString;
|
|
176
230
|
browser: z.ZodObject<{
|
|
177
231
|
status: z.ZodEnum<{
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/ingest-dto.d.ts
CHANGED
|
@@ -427,6 +427,7 @@ export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
|
427
427
|
topic_summary_redacted: z.ZodOptional<z.ZodString>;
|
|
428
428
|
work_intent: z.ZodOptional<z.ZodEnum<{
|
|
429
429
|
unknown: "unknown";
|
|
430
|
+
other: "other";
|
|
430
431
|
implementation: "implementation";
|
|
431
432
|
bug_fix: "bug_fix";
|
|
432
433
|
root_cause_analysis: "root_cause_analysis";
|
|
@@ -440,10 +441,10 @@ export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
|
440
441
|
coordination: "coordination";
|
|
441
442
|
maintenance: "maintenance";
|
|
442
443
|
analysis: "analysis";
|
|
443
|
-
other: "other";
|
|
444
444
|
}>>;
|
|
445
445
|
work_phase: z.ZodOptional<z.ZodEnum<{
|
|
446
446
|
unknown: "unknown";
|
|
447
|
+
other: "other";
|
|
447
448
|
implementation: "implementation";
|
|
448
449
|
planning: "planning";
|
|
449
450
|
discovery: "discovery";
|
|
@@ -452,7 +453,6 @@ export declare const TelemetryIngestEnvelopeSchema: z.ZodObject<{
|
|
|
452
453
|
documentation: "documentation";
|
|
453
454
|
release: "release";
|
|
454
455
|
analysis: "analysis";
|
|
455
|
-
other: "other";
|
|
456
456
|
debugging: "debugging";
|
|
457
457
|
handoff: "handoff";
|
|
458
458
|
}>>;
|
package/dist/setup-receipt.d.ts
CHANGED
|
@@ -66,6 +66,60 @@ declare const PieceSchema: z.ZodObject<{
|
|
|
66
66
|
export type SetupPiece = z.infer<typeof PieceSchema>;
|
|
67
67
|
export declare const SetupReceiptSchema: z.ZodObject<{
|
|
68
68
|
schema_version: z.ZodLiteral<"setup-receipt.v1">;
|
|
69
|
+
agent_setup: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
checked_at: z.ZodString;
|
|
71
|
+
os: z.ZodEnum<{
|
|
72
|
+
darwin: "darwin";
|
|
73
|
+
win32: "win32";
|
|
74
|
+
other: "other";
|
|
75
|
+
}>;
|
|
76
|
+
cli_version: z.ZodString;
|
|
77
|
+
claude: z.ZodObject<{
|
|
78
|
+
version: z.ZodNullable<z.ZodString>;
|
|
79
|
+
model: z.ZodNullable<z.ZodString>;
|
|
80
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
81
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
82
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
83
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
84
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
85
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
transport: z.ZodEnum<{
|
|
88
|
+
unknown: "unknown";
|
|
89
|
+
stdio: "stdio";
|
|
90
|
+
http: "http";
|
|
91
|
+
sse: "sse";
|
|
92
|
+
}>;
|
|
93
|
+
}, z.core.$strict>>>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
codex: z.ZodObject<{
|
|
96
|
+
version: z.ZodNullable<z.ZodString>;
|
|
97
|
+
model: z.ZodNullable<z.ZodString>;
|
|
98
|
+
effort: z.ZodNullable<z.ZodString>;
|
|
99
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
100
|
+
plugins: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
101
|
+
agents: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
102
|
+
hooks: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
103
|
+
mcp: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
transport: z.ZodEnum<{
|
|
106
|
+
unknown: "unknown";
|
|
107
|
+
stdio: "stdio";
|
|
108
|
+
http: "http";
|
|
109
|
+
sse: "sse";
|
|
110
|
+
}>;
|
|
111
|
+
}, z.core.$strict>>>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
114
|
+
name: z.ZodEnum<{
|
|
115
|
+
"CLAUDE.md": "CLAUDE.md";
|
|
116
|
+
"AGENTS.md": "AGENTS.md";
|
|
117
|
+
}>;
|
|
118
|
+
exists: z.ZodNullable<z.ZodBoolean>;
|
|
119
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
120
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
121
|
+
}, z.core.$strict>>;
|
|
122
|
+
}, z.core.$strict>>;
|
|
69
123
|
checked_at: z.ZodString;
|
|
70
124
|
browser: z.ZodObject<{
|
|
71
125
|
status: z.ZodEnum<{
|
package/dist/setup-receipt.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { AgentSetupSchema } from "./agent-setup.js";
|
|
2
3
|
import { IsoDateTimeSchema } from "./common.js";
|
|
3
4
|
/**
|
|
4
5
|
* "Is this machine actually connected?" — one block, read back off the machine
|
|
@@ -86,6 +87,7 @@ const PieceSchema = z
|
|
|
86
87
|
export const SetupReceiptSchema = z
|
|
87
88
|
.object({
|
|
88
89
|
schema_version: z.literal(SETUP_RECEIPT_SCHEMA_VERSION),
|
|
90
|
+
agent_setup: AgentSetupSchema.optional(),
|
|
89
91
|
/** When these words were read off this machine. Ages out; never trusted stale. */
|
|
90
92
|
checked_at: IsoDateTimeSchema,
|
|
91
93
|
/** Did a person ever sign a browser in for this machine? */
|
package/dist/work-context.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const TicketBindingCandidateSchema: z.ZodObject<{
|
|
|
27
27
|
export type TicketBindingCandidate = z.infer<typeof TicketBindingCandidateSchema>;
|
|
28
28
|
export declare const WorkIntentSchema: z.ZodEnum<{
|
|
29
29
|
unknown: "unknown";
|
|
30
|
+
other: "other";
|
|
30
31
|
implementation: "implementation";
|
|
31
32
|
bug_fix: "bug_fix";
|
|
32
33
|
root_cause_analysis: "root_cause_analysis";
|
|
@@ -40,11 +41,11 @@ export declare const WorkIntentSchema: z.ZodEnum<{
|
|
|
40
41
|
coordination: "coordination";
|
|
41
42
|
maintenance: "maintenance";
|
|
42
43
|
analysis: "analysis";
|
|
43
|
-
other: "other";
|
|
44
44
|
}>;
|
|
45
45
|
export type WorkIntent = z.infer<typeof WorkIntentSchema>;
|
|
46
46
|
export declare const WorkPhaseSchema: z.ZodEnum<{
|
|
47
47
|
unknown: "unknown";
|
|
48
|
+
other: "other";
|
|
48
49
|
implementation: "implementation";
|
|
49
50
|
planning: "planning";
|
|
50
51
|
discovery: "discovery";
|
|
@@ -53,7 +54,6 @@ export declare const WorkPhaseSchema: z.ZodEnum<{
|
|
|
53
54
|
documentation: "documentation";
|
|
54
55
|
release: "release";
|
|
55
56
|
analysis: "analysis";
|
|
56
|
-
other: "other";
|
|
57
57
|
debugging: "debugging";
|
|
58
58
|
handoff: "handoff";
|
|
59
59
|
}>;
|
|
@@ -106,6 +106,7 @@ export declare const LocalWorkContextSchema: z.ZodObject<{
|
|
|
106
106
|
topic_summary_redacted: z.ZodOptional<z.ZodString>;
|
|
107
107
|
work_intent: z.ZodOptional<z.ZodEnum<{
|
|
108
108
|
unknown: "unknown";
|
|
109
|
+
other: "other";
|
|
109
110
|
implementation: "implementation";
|
|
110
111
|
bug_fix: "bug_fix";
|
|
111
112
|
root_cause_analysis: "root_cause_analysis";
|
|
@@ -119,10 +120,10 @@ export declare const LocalWorkContextSchema: z.ZodObject<{
|
|
|
119
120
|
coordination: "coordination";
|
|
120
121
|
maintenance: "maintenance";
|
|
121
122
|
analysis: "analysis";
|
|
122
|
-
other: "other";
|
|
123
123
|
}>>;
|
|
124
124
|
work_phase: z.ZodOptional<z.ZodEnum<{
|
|
125
125
|
unknown: "unknown";
|
|
126
|
+
other: "other";
|
|
126
127
|
implementation: "implementation";
|
|
127
128
|
planning: "planning";
|
|
128
129
|
discovery: "discovery";
|
|
@@ -131,7 +132,6 @@ export declare const LocalWorkContextSchema: z.ZodObject<{
|
|
|
131
132
|
documentation: "documentation";
|
|
132
133
|
release: "release";
|
|
133
134
|
analysis: "analysis";
|
|
134
|
-
other: "other";
|
|
135
135
|
debugging: "debugging";
|
|
136
136
|
handoff: "handoff";
|
|
137
137
|
}>>;
|