@intentic/sandbox-contract 1.233.0 → 1.234.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 +4 -3
- package/dist/agent-catalog.d.ts +2 -1
- package/dist/agent-catalog.d.ts.map +1 -1
- package/dist/agent-catalog.js +19 -13
- package/dist/agent-catalog.js.map +1 -1
- package/dist/chores/chores.d.ts.map +1 -1
- package/dist/chores/chores.js +36 -1
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js +70 -0
- package/dist/chores/probes.js.map +1 -1
- package/dist/command-classes.d.ts +5 -2
- package/dist/command-classes.d.ts.map +1 -1
- package/dist/command-classes.js +34 -13
- package/dist/command-classes.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +30 -0
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/chores.contract.d.ts +17 -0
- package/dist/contracts/chores.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +2 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/issues.contract.d.ts +89 -0
- package/dist/contracts/issues.contract.d.ts.map +1 -0
- package/dist/contracts/issues.contract.js +50 -0
- package/dist/contracts/issues.contract.js.map +1 -0
- package/dist/contracts/runner.contract.d.ts +102 -102
- package/dist/contracts/settings.contract.d.ts +12 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/credential-material.d.ts +2 -0
- package/dist/credential-material.d.ts.map +1 -0
- package/dist/credential-material.js +36 -0
- package/dist/credential-material.js.map +1 -0
- package/dist/definition.d.ts +8 -0
- package/dist/definition.d.ts.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +1 -0
- package/dist/history-state.js.map +1 -1
- package/dist/hostnames.d.ts +2 -0
- package/dist/hostnames.d.ts.map +1 -1
- package/dist/hostnames.js +3 -1
- package/dist/hostnames.js.map +1 -1
- package/dist/index.d.ts +268 -116
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime-state.d.ts +9 -0
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js +3 -0
- package/dist/runtime-state.js.map +1 -1
- package/dist/schemas/agent.d.ts +6 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +2 -1
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/automations.d.ts +45 -0
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +6 -1
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +2 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +3 -1
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/issues.d.ts +324 -0
- package/dist/schemas/issues.d.ts.map +1 -0
- package/dist/schemas/issues.js +107 -0
- package/dist/schemas/issues.js.map +1 -0
- package/dist/schemas/maintenance.d.ts +62 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js +22 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/settings.d.ts +6 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +4 -0
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/webext.d.ts +24 -0
- package/dist/schemas/webext.d.ts.map +1 -1
- package/dist/schemas/webext.js +9 -0
- package/dist/schemas/webext.js.map +1 -1
- package/dist/webext-links.d.ts +1 -0
- package/dist/webext-links.d.ts.map +1 -1
- package/dist/webext-links.js +1 -0
- package/dist/webext-links.js.map +1 -1
- package/dist/workspace-state.d.ts +10 -6
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +13 -8
- package/dist/workspace-state.js.map +1 -1
- package/package.json +8 -8
- package/src/agent-catalog.test.ts +55 -54
- package/src/agent-catalog.ts +29 -22
- package/src/capability-ledger.test.ts +11 -2
- package/src/chores/chores.test.ts +1 -1
- package/src/chores/chores.ts +66 -1
- package/src/chores/probes.test.ts +65 -0
- package/src/chores/probes.ts +133 -1
- package/src/chores/verdict.test.ts +29 -19
- package/src/command-classes.test.ts +71 -4
- package/src/command-classes.ts +112 -22
- package/src/contracts/extensions.contract.ts +3 -2
- package/src/contracts/issues.contract.ts +60 -0
- package/src/credential-material.test.ts +120 -0
- package/src/credential-material.ts +100 -0
- package/src/history-state.ts +12 -0
- package/src/hostnames.ts +18 -2
- package/src/index.ts +5 -0
- package/src/routes.test.ts +4 -2
- package/src/runtime-state.ts +16 -0
- package/src/schemas/agent.ts +15 -2
- package/src/schemas/automations.ts +14 -2
- package/src/schemas/extension-updates.ts +3 -1
- package/src/schemas/issues.ts +279 -0
- package/src/schemas/maintenance.ts +51 -1
- package/src/schemas/settings.ts +32 -0
- package/src/schemas/terminal.ts +6 -4
- package/src/schemas/webext.ts +29 -0
- package/src/tunnel-ids.test.ts +3 -1
- package/src/webext-links.ts +10 -0
- package/src/workspace-state.test.ts +3 -1
- package/src/workspace-state.ts +27 -37
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const IssueKindSchema: z.ZodEnum<{
|
|
3
|
+
crash: "crash";
|
|
4
|
+
detection: "detection";
|
|
5
|
+
report: "report";
|
|
6
|
+
}>;
|
|
7
|
+
export type IssueKind = z.infer<typeof IssueKindSchema>;
|
|
8
|
+
export declare const IssueBreadcrumbSchema: z.ZodObject<{
|
|
9
|
+
at: z.ZodNumber;
|
|
10
|
+
kind: z.ZodString;
|
|
11
|
+
message: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type IssueBreadcrumb = z.infer<typeof IssueBreadcrumbSchema>;
|
|
14
|
+
export declare const IssueReporterSchema: z.ZodObject<{
|
|
15
|
+
email: z.ZodOptional<z.ZodString>;
|
|
16
|
+
name: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type IssueReporter = z.infer<typeof IssueReporterSchema>;
|
|
19
|
+
export declare const IssueReportSchema: z.ZodObject<{
|
|
20
|
+
kind: z.ZodEnum<{
|
|
21
|
+
crash: "crash";
|
|
22
|
+
detection: "detection";
|
|
23
|
+
report: "report";
|
|
24
|
+
}>;
|
|
25
|
+
message: z.ZodString;
|
|
26
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
27
|
+
url: z.ZodOptional<z.ZodString>;
|
|
28
|
+
release: z.ZodOptional<z.ZodString>;
|
|
29
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
30
|
+
description: z.ZodOptional<z.ZodString>;
|
|
31
|
+
reporter: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
email: z.ZodOptional<z.ZodString>;
|
|
33
|
+
name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
breadcrumbs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
at: z.ZodNumber;
|
|
37
|
+
kind: z.ZodString;
|
|
38
|
+
message: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
41
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type IssueReport = z.infer<typeof IssueReportSchema>;
|
|
44
|
+
export declare const IssueIngestSchema: z.ZodObject<{
|
|
45
|
+
report: z.ZodObject<{
|
|
46
|
+
kind: z.ZodEnum<{
|
|
47
|
+
crash: "crash";
|
|
48
|
+
detection: "detection";
|
|
49
|
+
report: "report";
|
|
50
|
+
}>;
|
|
51
|
+
message: z.ZodString;
|
|
52
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
53
|
+
url: z.ZodOptional<z.ZodString>;
|
|
54
|
+
release: z.ZodOptional<z.ZodString>;
|
|
55
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
56
|
+
description: z.ZodOptional<z.ZodString>;
|
|
57
|
+
reporter: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
email: z.ZodOptional<z.ZodString>;
|
|
59
|
+
name: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
breadcrumbs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
62
|
+
at: z.ZodNumber;
|
|
63
|
+
kind: z.ZodString;
|
|
64
|
+
message: z.ZodString;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
66
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
67
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
clientId: z.ZodString;
|
|
70
|
+
powNonce: z.ZodOptional<z.ZodString>;
|
|
71
|
+
key: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type IssueIngest = z.infer<typeof IssueIngestSchema>;
|
|
74
|
+
export declare const IssueStatusSchema: z.ZodEnum<{
|
|
75
|
+
ignored: "ignored";
|
|
76
|
+
investigating: "investigating";
|
|
77
|
+
open: "open";
|
|
78
|
+
resolved: "resolved";
|
|
79
|
+
}>;
|
|
80
|
+
export type IssueStatus = z.infer<typeof IssueStatusSchema>;
|
|
81
|
+
export declare const IssueRunSchema: z.ZodObject<{
|
|
82
|
+
conversationId: z.ZodString;
|
|
83
|
+
at: z.ZodNumber;
|
|
84
|
+
atCount: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export type IssueRun = z.infer<typeof IssueRunSchema>;
|
|
87
|
+
export declare const IssueSchema: z.ZodObject<{
|
|
88
|
+
kind: z.ZodEnum<{
|
|
89
|
+
crash: "crash";
|
|
90
|
+
detection: "detection";
|
|
91
|
+
report: "report";
|
|
92
|
+
}>;
|
|
93
|
+
title: z.ZodString;
|
|
94
|
+
culprit: z.ZodOptional<z.ZodString>;
|
|
95
|
+
automationId: z.ZodString;
|
|
96
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
97
|
+
firstSeen: z.ZodNumber;
|
|
98
|
+
lastSeen: z.ZodNumber;
|
|
99
|
+
count: z.ZodNumber;
|
|
100
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
101
|
+
ignored: "ignored";
|
|
102
|
+
investigating: "investigating";
|
|
103
|
+
open: "open";
|
|
104
|
+
resolved: "resolved";
|
|
105
|
+
}>>;
|
|
106
|
+
statusAt: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
release: z.ZodOptional<z.ZodString>;
|
|
108
|
+
sample: z.ZodObject<{
|
|
109
|
+
kind: z.ZodEnum<{
|
|
110
|
+
crash: "crash";
|
|
111
|
+
detection: "detection";
|
|
112
|
+
report: "report";
|
|
113
|
+
}>;
|
|
114
|
+
message: z.ZodString;
|
|
115
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
116
|
+
url: z.ZodOptional<z.ZodString>;
|
|
117
|
+
release: z.ZodOptional<z.ZodString>;
|
|
118
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
119
|
+
description: z.ZodOptional<z.ZodString>;
|
|
120
|
+
reporter: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
email: z.ZodOptional<z.ZodString>;
|
|
122
|
+
name: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
breadcrumbs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
125
|
+
at: z.ZodNumber;
|
|
126
|
+
kind: z.ZodString;
|
|
127
|
+
message: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
130
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
firedAt: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
134
|
+
conversationId: z.ZodString;
|
|
135
|
+
at: z.ZodNumber;
|
|
136
|
+
atCount: z.ZodNumber;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export type Issue = z.infer<typeof IssueSchema>;
|
|
140
|
+
export declare const IssueSummarySchema: z.ZodObject<{
|
|
141
|
+
kind: z.ZodEnum<{
|
|
142
|
+
crash: "crash";
|
|
143
|
+
detection: "detection";
|
|
144
|
+
report: "report";
|
|
145
|
+
}>;
|
|
146
|
+
title: z.ZodString;
|
|
147
|
+
culprit: z.ZodOptional<z.ZodString>;
|
|
148
|
+
automationId: z.ZodString;
|
|
149
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
150
|
+
firstSeen: z.ZodNumber;
|
|
151
|
+
lastSeen: z.ZodNumber;
|
|
152
|
+
count: z.ZodNumber;
|
|
153
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
154
|
+
ignored: "ignored";
|
|
155
|
+
investigating: "investigating";
|
|
156
|
+
open: "open";
|
|
157
|
+
resolved: "resolved";
|
|
158
|
+
}>>;
|
|
159
|
+
statusAt: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
release: z.ZodOptional<z.ZodString>;
|
|
161
|
+
sample: z.ZodObject<{
|
|
162
|
+
kind: z.ZodEnum<{
|
|
163
|
+
crash: "crash";
|
|
164
|
+
detection: "detection";
|
|
165
|
+
report: "report";
|
|
166
|
+
}>;
|
|
167
|
+
message: z.ZodString;
|
|
168
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
169
|
+
url: z.ZodOptional<z.ZodString>;
|
|
170
|
+
release: z.ZodOptional<z.ZodString>;
|
|
171
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
reporter: z.ZodOptional<z.ZodObject<{
|
|
174
|
+
email: z.ZodOptional<z.ZodString>;
|
|
175
|
+
name: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
breadcrumbs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
178
|
+
at: z.ZodNumber;
|
|
179
|
+
kind: z.ZodString;
|
|
180
|
+
message: z.ZodString;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
182
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
183
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
firedAt: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
187
|
+
conversationId: z.ZodString;
|
|
188
|
+
at: z.ZodNumber;
|
|
189
|
+
atCount: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>>>;
|
|
191
|
+
id: z.ZodString;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export type IssueSummary = z.infer<typeof IssueSummarySchema>;
|
|
194
|
+
export declare const IssuesListSchema: z.ZodObject<{
|
|
195
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
196
|
+
kind: z.ZodEnum<{
|
|
197
|
+
crash: "crash";
|
|
198
|
+
detection: "detection";
|
|
199
|
+
report: "report";
|
|
200
|
+
}>;
|
|
201
|
+
title: z.ZodString;
|
|
202
|
+
culprit: z.ZodOptional<z.ZodString>;
|
|
203
|
+
automationId: z.ZodString;
|
|
204
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
205
|
+
firstSeen: z.ZodNumber;
|
|
206
|
+
lastSeen: z.ZodNumber;
|
|
207
|
+
count: z.ZodNumber;
|
|
208
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
209
|
+
ignored: "ignored";
|
|
210
|
+
investigating: "investigating";
|
|
211
|
+
open: "open";
|
|
212
|
+
resolved: "resolved";
|
|
213
|
+
}>>;
|
|
214
|
+
statusAt: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
release: z.ZodOptional<z.ZodString>;
|
|
216
|
+
sample: z.ZodObject<{
|
|
217
|
+
kind: z.ZodEnum<{
|
|
218
|
+
crash: "crash";
|
|
219
|
+
detection: "detection";
|
|
220
|
+
report: "report";
|
|
221
|
+
}>;
|
|
222
|
+
message: z.ZodString;
|
|
223
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
224
|
+
url: z.ZodOptional<z.ZodString>;
|
|
225
|
+
release: z.ZodOptional<z.ZodString>;
|
|
226
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
227
|
+
description: z.ZodOptional<z.ZodString>;
|
|
228
|
+
reporter: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
email: z.ZodOptional<z.ZodString>;
|
|
230
|
+
name: z.ZodOptional<z.ZodString>;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
breadcrumbs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
233
|
+
at: z.ZodNumber;
|
|
234
|
+
kind: z.ZodString;
|
|
235
|
+
message: z.ZodString;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
238
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
firedAt: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
|
+
conversationId: z.ZodString;
|
|
243
|
+
at: z.ZodNumber;
|
|
244
|
+
atCount: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
invalid: z.ZodArray<z.ZodString>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
export type IssuesList = z.infer<typeof IssuesListSchema>;
|
|
251
|
+
export declare const IssueIdParamSchema: z.ZodObject<{
|
|
252
|
+
id: z.ZodString;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
export declare const IssueStatusInputSchema: z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
status: z.ZodEnum<{
|
|
257
|
+
ignored: "ignored";
|
|
258
|
+
open: "open";
|
|
259
|
+
resolved: "resolved";
|
|
260
|
+
}>;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
export type IssueStatusInput = z.infer<typeof IssueStatusInputSchema>;
|
|
263
|
+
export declare const IssuesConfigSchema: z.ZodObject<{
|
|
264
|
+
ingestKey: z.ZodOptional<z.ZodString>;
|
|
265
|
+
keyFromBrowsers: z.ZodOptional<z.ZodBoolean>;
|
|
266
|
+
dailyReportMax: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
escalateAfter: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
antiBot: z.ZodOptional<z.ZodEnum<{
|
|
269
|
+
pow: "pow";
|
|
270
|
+
}>>;
|
|
271
|
+
title: z.ZodOptional<z.ZodString>;
|
|
272
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
273
|
+
thanks: z.ZodOptional<z.ZodString>;
|
|
274
|
+
askEmail: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
276
|
+
captureCrashes: z.ZodOptional<z.ZodBoolean>;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
export type IssuesConfig = z.infer<typeof IssuesConfigSchema>;
|
|
279
|
+
export declare const IssuePublicConfigSchema: z.ZodObject<{
|
|
280
|
+
automationId: z.ZodString;
|
|
281
|
+
title: z.ZodString;
|
|
282
|
+
prompt: z.ZodString;
|
|
283
|
+
thanks: z.ZodString;
|
|
284
|
+
askEmail: z.ZodBoolean;
|
|
285
|
+
accent: z.ZodString;
|
|
286
|
+
captureCrashes: z.ZodBoolean;
|
|
287
|
+
antiBot: z.ZodEnum<{
|
|
288
|
+
off: "off";
|
|
289
|
+
pow: "pow";
|
|
290
|
+
}>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
export type IssuePublicConfig = z.infer<typeof IssuePublicConfigSchema>;
|
|
293
|
+
export declare const IssueChallengeSchema: z.ZodObject<{
|
|
294
|
+
salt: z.ZodString;
|
|
295
|
+
difficulty: z.ZodNumber;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
export type IssueChallenge = z.infer<typeof IssueChallengeSchema>;
|
|
298
|
+
export declare const IssueAcceptedSchema: z.ZodObject<{
|
|
299
|
+
ok: z.ZodLiteral<true>;
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
export type IssueAccepted = z.infer<typeof IssueAcceptedSchema>;
|
|
303
|
+
export declare const IssueInstallSchema: z.ZodObject<{
|
|
304
|
+
origin: z.ZodString;
|
|
305
|
+
allowed: z.ZodBoolean;
|
|
306
|
+
lastSeenAt: z.ZodNumber;
|
|
307
|
+
loads: z.ZodNumber;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
export declare const IssueInstallsSchema: z.ZodObject<{
|
|
310
|
+
origins: z.ZodArray<z.ZodObject<{
|
|
311
|
+
origin: z.ZodString;
|
|
312
|
+
allowed: z.ZodBoolean;
|
|
313
|
+
lastSeenAt: z.ZodNumber;
|
|
314
|
+
loads: z.ZodNumber;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
export type IssueInstalls = z.infer<typeof IssueInstallsSchema>;
|
|
318
|
+
export declare const IssueIntakeIdParamSchema: z.ZodObject<{
|
|
319
|
+
automationId: z.ZodString;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
export declare const ISSUES_DAILY_MAX_DEFAULT = 2000;
|
|
322
|
+
export declare const ISSUES_ESCALATE_AFTER_DEFAULT = 10;
|
|
323
|
+
export declare const ISSUE_PAYLOAD_MAX = 96000;
|
|
324
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M,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,eAAO,MAAM,wBAAwB;;iBAAgE,CAAC;AAYtG,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAK7C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAIhD,eAAO,MAAM,iBAAiB,QAAS,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { entryId } from "./internal.js";
|
|
3
|
+
export const IssueKindSchema = z.enum(["crash", "report", "detection"]);
|
|
4
|
+
export const IssueBreadcrumbSchema = z.object({
|
|
5
|
+
at: z.number().describe("When, in milliseconds."),
|
|
6
|
+
kind: z.string().max(40).describe("What sort of thing it was: a console line, a request, a click, a route change."),
|
|
7
|
+
message: z.string().max(300).describe("What it said, already truncated by the SDK."),
|
|
8
|
+
});
|
|
9
|
+
export const IssueReporterSchema = z.object({
|
|
10
|
+
email: z.string().max(320).optional().describe("An address they typed, to reach them about it. Unverified."),
|
|
11
|
+
name: z.string().max(200).optional().describe("A name they typed. Unverified, and never identity."),
|
|
12
|
+
});
|
|
13
|
+
const CONTEXT_KEYS_MAX = 20;
|
|
14
|
+
const IssueContextSchema = z
|
|
15
|
+
.record(z.string().max(60), z.string().max(300))
|
|
16
|
+
.refine((context) => Object.keys(context).length <= CONTEXT_KEYS_MAX, { message: `at most ${CONTEXT_KEYS_MAX} context entries` });
|
|
17
|
+
export const IssueReportSchema = z.object({
|
|
18
|
+
kind: IssueKindSchema.describe("A crash the SDK caught, something a person wrote in, or a problem the SDK noticed on its own."),
|
|
19
|
+
message: z.string().min(1).max(1000).describe("The error's own message, or the headline of what a person reported."),
|
|
20
|
+
stack: z.string().max(20_000).optional().describe("The stack, verbatim from the browser."),
|
|
21
|
+
url: z.string().max(2000).optional().describe("Where it happened: the page's address, or a screen name in an app."),
|
|
22
|
+
release: z.string().max(200).optional().describe("Which build it came from: a commit sha or a tag. With it the agent reads your real source rather than minified frames."),
|
|
23
|
+
userAgent: z.string().max(400).optional().describe("What the browser said it was."),
|
|
24
|
+
description: z.string().max(5000).optional().describe("What the person typed, when a person is the one reporting."),
|
|
25
|
+
reporter: IssueReporterSchema.optional().describe("Who says they are reporting it. Unverified by construction."),
|
|
26
|
+
breadcrumbs: z.array(IssueBreadcrumbSchema).max(40).optional().describe("What happened just before, oldest first."),
|
|
27
|
+
context: IssueContextSchema.optional().describe("Whatever else the app attached: a route, a version, a locale."),
|
|
28
|
+
fingerprint: z.string().max(200).optional().describe("Group by this instead of by the stack, when your app knows better than the stack does."),
|
|
29
|
+
});
|
|
30
|
+
export const IssueIngestSchema = z.object({
|
|
31
|
+
report: IssueReportSchema,
|
|
32
|
+
clientId: z.string().min(1).max(200).describe("The SDK's own id for this browser. Not a secret: it is what the rate limit counts against."),
|
|
33
|
+
powNonce: z.string().max(400).optional(),
|
|
34
|
+
key: z.string().max(200).optional(),
|
|
35
|
+
});
|
|
36
|
+
export const IssueStatusSchema = z.enum(["open", "investigating", "resolved", "ignored"]);
|
|
37
|
+
export const IssueRunSchema = z.object({
|
|
38
|
+
conversationId: z.string().describe("The conversation this run became."),
|
|
39
|
+
at: z.number().describe("When it started, in milliseconds."),
|
|
40
|
+
atCount: z.number().describe("How many times it had happened when this run started."),
|
|
41
|
+
});
|
|
42
|
+
export const IssueSchema = z.object({
|
|
43
|
+
kind: IssueKindSchema,
|
|
44
|
+
title: z.string().min(1).max(300).describe("The one line this is listed under."),
|
|
45
|
+
culprit: z.string().max(300).optional().describe("The frame it came from, when the stack named one."),
|
|
46
|
+
automationId: entryId.describe("Which intake received it."),
|
|
47
|
+
origin: z.string().max(400).optional().describe("Which site it came from."),
|
|
48
|
+
firstSeen: z.number().describe("When it first happened, in milliseconds."),
|
|
49
|
+
lastSeen: z.number().describe("When it last happened, in milliseconds."),
|
|
50
|
+
count: z.number().describe("How many times this exact thing has arrived."),
|
|
51
|
+
status: IssueStatusSchema.default("open").describe("Where it stands with you."),
|
|
52
|
+
statusAt: z.number().optional().describe("When the status last changed, in milliseconds."),
|
|
53
|
+
release: z.string().max(200).optional().describe("The build the latest one came from."),
|
|
54
|
+
sample: IssueReportSchema.describe("The most recent one, in full."),
|
|
55
|
+
firedAt: z.number().optional().describe("What the count stood at the last time this woke an agent."),
|
|
56
|
+
runs: z.array(IssueRunSchema).max(20).optional().describe("The turns started for it."),
|
|
57
|
+
});
|
|
58
|
+
export const IssueSummarySchema = IssueSchema.extend({ id: entryId.describe("The issue's id, which is its fingerprint.") });
|
|
59
|
+
export const IssuesListSchema = z.object({
|
|
60
|
+
issues: z.array(IssueSummarySchema).describe("The inbox, most recently seen first."),
|
|
61
|
+
invalid: z.array(z.string()).describe("Files in the issues directory that could not be read at all."),
|
|
62
|
+
});
|
|
63
|
+
export const IssueIdParamSchema = z.object({ id: entryId.describe("Which issue.") });
|
|
64
|
+
export const IssueStatusInputSchema = z.object({
|
|
65
|
+
id: entryId.describe("Which issue."),
|
|
66
|
+
status: z.enum(["open", "resolved", "ignored"]).describe("Where it now stands with you."),
|
|
67
|
+
});
|
|
68
|
+
export const IssuesConfigSchema = z.object({
|
|
69
|
+
ingestKey: z.string().min(1).optional().describe("The key an app with no website origin presents. Rotate it freely: the limits, not this, are what bound the damage."),
|
|
70
|
+
keyFromBrowsers: z.boolean().optional().describe("Let a browser report with the key alone, rather than only from a site you listed. Off unless you need it."),
|
|
71
|
+
dailyReportMax: z.number().int().positive().optional().describe("How many reports a day this intake accepts at all."),
|
|
72
|
+
escalateAfter: z.number().int().positive().optional().describe("How many more times a known crash must happen before it wakes an agent again."),
|
|
73
|
+
antiBot: z.enum(["pow"]).optional().describe("Make a person's browser solve a small puzzle before it accepts a written report."),
|
|
74
|
+
title: z.string().max(80).optional().describe("The dialog's heading."),
|
|
75
|
+
prompt: z.string().max(300).optional().describe("The line above the box they type in."),
|
|
76
|
+
thanks: z.string().max(300).optional().describe("What it says once they have sent it."),
|
|
77
|
+
askEmail: z.boolean().optional().describe("Ask for an address to reply to. Optional for them either way."),
|
|
78
|
+
accent: z
|
|
79
|
+
.string()
|
|
80
|
+
.regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, "accent must be a hex colour, e.g. #e47100")
|
|
81
|
+
.optional(),
|
|
82
|
+
captureCrashes: z.boolean().optional().describe("Catch uncaught errors automatically, as well as what people write in."),
|
|
83
|
+
});
|
|
84
|
+
export const IssuePublicConfigSchema = z.object({
|
|
85
|
+
automationId: z.string(),
|
|
86
|
+
title: z.string(),
|
|
87
|
+
prompt: z.string(),
|
|
88
|
+
thanks: z.string(),
|
|
89
|
+
askEmail: z.boolean(),
|
|
90
|
+
accent: z.string(),
|
|
91
|
+
captureCrashes: z.boolean(),
|
|
92
|
+
antiBot: z.enum(["pow", "off"]),
|
|
93
|
+
});
|
|
94
|
+
export const IssueChallengeSchema = z.object({ salt: z.string(), difficulty: z.number().int().positive() });
|
|
95
|
+
export const IssueAcceptedSchema = z.object({ ok: z.literal(true), id: z.string() });
|
|
96
|
+
export const IssueInstallSchema = z.object({
|
|
97
|
+
origin: z.string(),
|
|
98
|
+
allowed: z.boolean(),
|
|
99
|
+
lastSeenAt: z.number(),
|
|
100
|
+
loads: z.number(),
|
|
101
|
+
});
|
|
102
|
+
export const IssueInstallsSchema = z.object({ origins: z.array(IssueInstallSchema) });
|
|
103
|
+
export const IssueIntakeIdParamSchema = z.object({ automationId: entryId.describe("Which intake.") });
|
|
104
|
+
export const ISSUES_DAILY_MAX_DEFAULT = 2000;
|
|
105
|
+
export const ISSUES_ESCALATE_AFTER_DEFAULT = 10;
|
|
106
|
+
export const ISSUE_PAYLOAD_MAX = 96_000;
|
|
107
|
+
//# sourceMappingURL=issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/schemas/issues.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,E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jscpd", "ui", "bundle"];
|
|
2
|
+
export declare const PROBE_IDS: readonly ["outdated", "audit", "knip", "jscpd", "ui", "bundle", "mutation"];
|
|
3
3
|
export declare const ProbeIdSchema: z.ZodEnum<{
|
|
4
4
|
audit: "audit";
|
|
5
5
|
bundle: "bundle";
|
|
6
6
|
jscpd: "jscpd";
|
|
7
7
|
knip: "knip";
|
|
8
|
+
mutation: "mutation";
|
|
8
9
|
outdated: "outdated";
|
|
9
10
|
ui: "ui";
|
|
10
11
|
}>;
|
|
@@ -77,6 +78,19 @@ export declare const BundleSchema: z.ZodObject<{
|
|
|
77
78
|
}, z.core.$strip>>;
|
|
78
79
|
}, z.core.$strip>;
|
|
79
80
|
export type Bundle = z.infer<typeof BundleSchema>;
|
|
81
|
+
export declare const MutationScoreSchema: z.ZodObject<{
|
|
82
|
+
score: z.ZodNumber;
|
|
83
|
+
killed: z.ZodNumber;
|
|
84
|
+
survived: z.ZodNumber;
|
|
85
|
+
inconclusive: z.ZodNumber;
|
|
86
|
+
survivors: z.ZodArray<z.ZodObject<{
|
|
87
|
+
file: z.ZodString;
|
|
88
|
+
line: z.ZodNumber;
|
|
89
|
+
mutator: z.ZodString;
|
|
90
|
+
replacement: z.ZodString;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type MutationScore = z.infer<typeof MutationScoreSchema>;
|
|
80
94
|
export declare const ProbeStateSchema: z.ZodEnum<{
|
|
81
95
|
failed: "failed";
|
|
82
96
|
ok: "ok";
|
|
@@ -157,6 +171,20 @@ export declare const ProbeFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
157
171
|
gzip: z.ZodNumber;
|
|
158
172
|
}, z.core.$strip>>;
|
|
159
173
|
}, z.core.$strip>;
|
|
174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
175
|
+
id: z.ZodLiteral<"mutation">;
|
|
176
|
+
mutation: z.ZodObject<{
|
|
177
|
+
score: z.ZodNumber;
|
|
178
|
+
killed: z.ZodNumber;
|
|
179
|
+
survived: z.ZodNumber;
|
|
180
|
+
inconclusive: z.ZodNumber;
|
|
181
|
+
survivors: z.ZodArray<z.ZodObject<{
|
|
182
|
+
file: z.ZodString;
|
|
183
|
+
line: z.ZodNumber;
|
|
184
|
+
mutator: z.ZodString;
|
|
185
|
+
replacement: z.ZodString;
|
|
186
|
+
}, z.core.$strip>>;
|
|
187
|
+
}, z.core.$strip>;
|
|
160
188
|
}, z.core.$strip>], "id">;
|
|
161
189
|
export type ProbeFacts = z.infer<typeof ProbeFactsSchema>;
|
|
162
190
|
export declare const ProbeResultSchema: z.ZodObject<{
|
|
@@ -165,6 +193,7 @@ export declare const ProbeResultSchema: z.ZodObject<{
|
|
|
165
193
|
bundle: "bundle";
|
|
166
194
|
jscpd: "jscpd";
|
|
167
195
|
knip: "knip";
|
|
196
|
+
mutation: "mutation";
|
|
168
197
|
outdated: "outdated";
|
|
169
198
|
ui: "ui";
|
|
170
199
|
}>;
|
|
@@ -249,6 +278,20 @@ export declare const ProbeResultSchema: z.ZodObject<{
|
|
|
249
278
|
gzip: z.ZodNumber;
|
|
250
279
|
}, z.core.$strip>>;
|
|
251
280
|
}, z.core.$strip>;
|
|
281
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
282
|
+
id: z.ZodLiteral<"mutation">;
|
|
283
|
+
mutation: z.ZodObject<{
|
|
284
|
+
score: z.ZodNumber;
|
|
285
|
+
killed: z.ZodNumber;
|
|
286
|
+
survived: z.ZodNumber;
|
|
287
|
+
inconclusive: z.ZodNumber;
|
|
288
|
+
survivors: z.ZodArray<z.ZodObject<{
|
|
289
|
+
file: z.ZodString;
|
|
290
|
+
line: z.ZodNumber;
|
|
291
|
+
mutator: z.ZodString;
|
|
292
|
+
replacement: z.ZodString;
|
|
293
|
+
}, z.core.$strip>>;
|
|
294
|
+
}, z.core.$strip>;
|
|
252
295
|
}, z.core.$strip>], "id">>;
|
|
253
296
|
reason: z.ZodOptional<z.ZodString>;
|
|
254
297
|
}, z.core.$strip>;
|
|
@@ -337,6 +380,7 @@ export declare const RunningProbeSchema: z.ZodObject<{
|
|
|
337
380
|
bundle: "bundle";
|
|
338
381
|
jscpd: "jscpd";
|
|
339
382
|
knip: "knip";
|
|
383
|
+
mutation: "mutation";
|
|
340
384
|
outdated: "outdated";
|
|
341
385
|
ui: "ui";
|
|
342
386
|
}>;
|
|
@@ -353,6 +397,7 @@ export declare const ChoresReportSchema: z.ZodObject<{
|
|
|
353
397
|
bundle: "bundle";
|
|
354
398
|
jscpd: "jscpd";
|
|
355
399
|
knip: "knip";
|
|
400
|
+
mutation: "mutation";
|
|
356
401
|
outdated: "outdated";
|
|
357
402
|
ui: "ui";
|
|
358
403
|
}>;
|
|
@@ -437,6 +482,20 @@ export declare const ChoresReportSchema: z.ZodObject<{
|
|
|
437
482
|
gzip: z.ZodNumber;
|
|
438
483
|
}, z.core.$strip>>;
|
|
439
484
|
}, z.core.$strip>;
|
|
485
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
486
|
+
id: z.ZodLiteral<"mutation">;
|
|
487
|
+
mutation: z.ZodObject<{
|
|
488
|
+
score: z.ZodNumber;
|
|
489
|
+
killed: z.ZodNumber;
|
|
490
|
+
survived: z.ZodNumber;
|
|
491
|
+
inconclusive: z.ZodNumber;
|
|
492
|
+
survivors: z.ZodArray<z.ZodObject<{
|
|
493
|
+
file: z.ZodString;
|
|
494
|
+
line: z.ZodNumber;
|
|
495
|
+
mutator: z.ZodString;
|
|
496
|
+
replacement: z.ZodString;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
}, z.core.$strip>;
|
|
440
499
|
}, z.core.$strip>], "id">>;
|
|
441
500
|
reason: z.ZodOptional<z.ZodString>;
|
|
442
501
|
}, z.core.$strip>>;
|
|
@@ -499,6 +558,7 @@ export declare const ChoresReportSchema: z.ZodObject<{
|
|
|
499
558
|
bundle: "bundle";
|
|
500
559
|
jscpd: "jscpd";
|
|
501
560
|
knip: "knip";
|
|
561
|
+
mutation: "mutation";
|
|
502
562
|
outdated: "outdated";
|
|
503
563
|
ui: "ui";
|
|
504
564
|
}>;
|
|
@@ -515,6 +575,7 @@ export declare const ChoreProbeRequestSchema: z.ZodObject<{
|
|
|
515
575
|
bundle: "bundle";
|
|
516
576
|
jscpd: "jscpd";
|
|
517
577
|
knip: "knip";
|
|
578
|
+
mutation: "mutation";
|
|
518
579
|
outdated: "outdated";
|
|
519
580
|
ui: "ui";
|
|
520
581
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../src/schemas/maintenance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,SAAS,YAAI,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../src/schemas/maintenance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,SAAS,YAAI,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AACrG,eAAO,MAAM,aAAa;;;;;;;;EAAoB,CAAC;AAC/C,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAGpD,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAahC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAmBzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAItD,eAAO,MAA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MAAM,sBAAsB;;;;;;;;;;;;iBAAyB,CAAC;AAI7D,eAAO,MAAM,oBAAoB;;;;;;;;;iBAK/B,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAEnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { WorkspaceHotspotSchema, WorkspaceKeyModuleSchema } from "./codebase-health.js";
|
|
3
|
-
export const PROBE_IDS = ["outdated", "audit", "knip", "jscpd", "ui", "bundle"];
|
|
3
|
+
export const PROBE_IDS = ["outdated", "audit", "knip", "jscpd", "ui", "bundle", "mutation"];
|
|
4
4
|
export const ProbeIdSchema = z.enum(PROBE_IDS);
|
|
5
5
|
export const OutdatedPackageSchema = z.object({
|
|
6
6
|
name: z.string().describe("The dependency."),
|
|
@@ -83,6 +83,26 @@ export const BundleSchema = z.object({
|
|
|
83
83
|
}))
|
|
84
84
|
.describe("What is in it, piece by piece."),
|
|
85
85
|
});
|
|
86
|
+
export const MutationScoreSchema = z.object({
|
|
87
|
+
score: z
|
|
88
|
+
.number()
|
|
89
|
+
.describe("The share of injected faults the suite caught. Not a coverage figure: coverage says a line ran, this says an assertion depended on it."),
|
|
90
|
+
killed: z.number().int().nonnegative().describe("Faults the suite caught."),
|
|
91
|
+
survived: z.number().int().nonnegative().describe("Faults it did not: code that can be broken with every test still green."),
|
|
92
|
+
inconclusive: z
|
|
93
|
+
.number()
|
|
94
|
+
.int()
|
|
95
|
+
.nonnegative()
|
|
96
|
+
.describe("Faults it never got a verdict on, because they would not compile or were configured out. Left out of the score entirely, since neither answer is known."),
|
|
97
|
+
survivors: z
|
|
98
|
+
.array(z.object({
|
|
99
|
+
file: z.string().describe("Where it is."),
|
|
100
|
+
line: z.number().int().nonnegative().describe("Which line."),
|
|
101
|
+
mutator: z.string().describe("What was changed, in the mutation tool's own vocabulary."),
|
|
102
|
+
replacement: z.string().describe("What it became, so a reader can judge whether it matters without opening the file."),
|
|
103
|
+
}))
|
|
104
|
+
.describe("The surviving faults themselves. A percentage is a mood; a named line with the change that went unnoticed is a morning's work."),
|
|
105
|
+
});
|
|
86
106
|
export const ProbeStateSchema = z.enum(["ok", "unavailable", "failed"]);
|
|
87
107
|
export const ProbeFactsSchema = z.discriminatedUnion("id", [
|
|
88
108
|
z.object({ id: z.literal("outdated"), packages: z.array(OutdatedPackageSchema) }),
|
|
@@ -91,6 +111,7 @@ export const ProbeFactsSchema = z.discriminatedUnion("id", [
|
|
|
91
111
|
z.object({ id: z.literal("jscpd"), duplication: DuplicationSchema }),
|
|
92
112
|
z.object({ id: z.literal("ui"), scan: UiScanSchema }),
|
|
93
113
|
z.object({ id: z.literal("bundle"), bundle: BundleSchema }),
|
|
114
|
+
z.object({ id: z.literal("mutation"), mutation: MutationScoreSchema }),
|
|
94
115
|
]);
|
|
95
116
|
export const ProbeResultSchema = z.object({
|
|
96
117
|
id: ProbeIdSchema.describe("Which measurement this is."),
|