@reticlehq/core 2.0.1 → 2.2.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/LICENSE +201 -112
- package/NOTICE +5 -0
- package/dist/brand.d.ts +32 -3
- package/dist/brand.d.ts.map +1 -1
- package/dist/brand.js +9 -4
- package/dist/brand.js.map +1 -1
- package/dist/consequence.d.ts +31 -0
- package/dist/consequence.d.ts.map +1 -0
- package/dist/consequence.js +45 -0
- package/dist/consequence.js.map +1 -0
- package/dist/constants.d.ts +161 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +156 -5
- package/dist/constants.js.map +1 -1
- package/dist/daemon-registry.d.ts +5 -5
- package/dist/daemon-registry.d.ts.map +1 -1
- package/dist/daemon-registry.js +5 -5
- package/dist/daemon-registry.js.map +1 -1
- package/dist/event-payloads.d.ts +502 -0
- package/dist/event-payloads.d.ts.map +1 -0
- package/dist/event-payloads.js +138 -0
- package/dist/event-payloads.js.map +1 -0
- package/dist/flow-constants.d.ts +2 -2
- package/dist/flow-constants.js +7 -7
- package/dist/flow-constants.js.map +1 -1
- package/dist/flow-types.d.ts +156 -32
- package/dist/flow-types.d.ts.map +1 -1
- package/dist/flow-types.js +23 -1
- package/dist/flow-types.js.map +1 -1
- package/dist/index.d.ts +19 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -11
- package/dist/index.js.map +1 -1
- package/dist/journal.d.ts +90 -0
- package/dist/journal.d.ts.map +1 -0
- package/dist/journal.js +38 -0
- package/dist/journal.js.map +1 -0
- package/dist/messages.d.ts +118 -16
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +15 -2
- package/dist/messages.js.map +1 -1
- package/dist/notices.d.ts +4 -4
- package/dist/notices.js +4 -4
- package/dist/redaction.d.ts +4 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +33 -0
- package/dist/redaction.js.map +1 -0
- package/dist/schema/event-message.json +23 -1
- package/dist/schema/event-type.json +10 -1
- package/dist/schema/reticle-event.json +23 -1
- package/dist/schema/reticle-message.json +23 -1
- package/dist/session-constants.d.ts +2 -2
- package/dist/session-constants.js +2 -2
- package/dist/state-select.d.ts.map +1 -1
- package/dist/state-select.js +21 -5
- package/dist/state-select.js.map +1 -1
- package/dist/toon.d.ts +13 -12
- package/dist/toon.d.ts.map +1 -1
- package/dist/toon.js +37 -20
- package/dist/toon.js.map +1 -1
- package/dist/types.d.ts +80 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -3
- package/dist/types.js.map +1 -1
- package/dist/upgrade.d.ts +5 -5
- package/dist/upgrade.js +3 -3
- package/dist/verification-run.d.ts +25 -23
- package/dist/verification-run.d.ts.map +1 -1
- package/dist/verification-run.js +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EventType } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Per-event-type payload schemas — the typed replacement for the envelope's open `data` record.
|
|
5
|
+
* The envelope (`ReticleEventSchema.data`) stays open on the wire so a richer SDK is never rejected
|
|
6
|
+
* mid-upgrade; narrowing happens here, at the server's inbound boundary and wherever the journal reads
|
|
7
|
+
* an event's fields. `parseEventPayload` is that boundary.
|
|
8
|
+
*
|
|
9
|
+
* Two fidelity tiers by design:
|
|
10
|
+
* - **Precise + closed** for stable observers (dom/route/perf/anim/scroll/signal/health/...).
|
|
11
|
+
* - **Precise on the load-bearing fields + `.passthrough`** for observers / will enrich
|
|
12
|
+
* (network, console, error, state, storage) — today's fields are validated, tomorrow's added
|
|
13
|
+
* fields (stack, TTFB, initiator, path diffs) pass through instead of failing closed. Each closes
|
|
14
|
+
* fully as its observer is rewritten.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Wire payload vocabularies. The browser observers EMIT these values and the schemas below VALIDATE
|
|
18
|
+
* them, so a browser-side typo (`'SSE'`) would pass tsc and fail only here, at runtime. Each is a const
|
|
19
|
+
* object — the browser imports the members, the schema derives its z.nativeEnum from the same object —
|
|
20
|
+
* so emitter and validator are one source. Co-located with the schemas (kept constants.ts under its cap).
|
|
21
|
+
*/
|
|
22
|
+
export declare const StreamTransport: {
|
|
23
|
+
readonly SSE: "sse";
|
|
24
|
+
readonly WS: "ws";
|
|
25
|
+
};
|
|
26
|
+
export type StreamTransport = (typeof StreamTransport)[keyof typeof StreamTransport];
|
|
27
|
+
export declare const StreamDirection: {
|
|
28
|
+
readonly OPEN: "open";
|
|
29
|
+
readonly IN: "in";
|
|
30
|
+
readonly OUT: "out";
|
|
31
|
+
};
|
|
32
|
+
export type StreamDirection = (typeof StreamDirection)[keyof typeof StreamDirection];
|
|
33
|
+
export declare const ScrollDirection: {
|
|
34
|
+
readonly UP: "up";
|
|
35
|
+
readonly DOWN: "down";
|
|
36
|
+
};
|
|
37
|
+
export type ScrollDirection = (typeof ScrollDirection)[keyof typeof ScrollDirection];
|
|
38
|
+
export declare const StorageArea: {
|
|
39
|
+
readonly LOCAL: "local";
|
|
40
|
+
readonly SESSION: "session";
|
|
41
|
+
readonly COOKIE: "cookie";
|
|
42
|
+
};
|
|
43
|
+
export type StorageArea = (typeof StorageArea)[keyof typeof StorageArea];
|
|
44
|
+
/**
|
|
45
|
+
* The registry. `satisfies Record<EventType,...>` makes a missing event type a *compile* error —
|
|
46
|
+
* the wire can never carry a type without a payload contract.
|
|
47
|
+
*/
|
|
48
|
+
export declare const EVENT_PAYLOAD_SCHEMAS: {
|
|
49
|
+
"dom.added": z.ZodObject<{
|
|
50
|
+
role: z.ZodOptional<z.ZodString>;
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
role?: string | undefined;
|
|
54
|
+
name?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
role?: string | undefined;
|
|
57
|
+
name?: string | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
"dom.removed": z.ZodObject<{
|
|
60
|
+
role: z.ZodOptional<z.ZodString>;
|
|
61
|
+
name: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
role?: string | undefined;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
role?: string | undefined;
|
|
67
|
+
name?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
"dom.attr": z.ZodObject<{
|
|
70
|
+
attr: z.ZodString;
|
|
71
|
+
value: z.ZodOptional<z.ZodString>;
|
|
72
|
+
old: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
74
|
+
attr: z.ZodString;
|
|
75
|
+
value: z.ZodOptional<z.ZodString>;
|
|
76
|
+
old: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
78
|
+
attr: z.ZodString;
|
|
79
|
+
value: z.ZodOptional<z.ZodString>;
|
|
80
|
+
old: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
82
|
+
"dom.text": z.ZodObject<{
|
|
83
|
+
text: z.ZodString;
|
|
84
|
+
old: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
text: string;
|
|
87
|
+
old?: string | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
text: string;
|
|
90
|
+
old?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
"net.request": z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
method: z.ZodString;
|
|
95
|
+
url: z.ZodString;
|
|
96
|
+
status: z.ZodNumber;
|
|
97
|
+
ok: z.ZodBoolean;
|
|
98
|
+
durationMs: z.ZodNumber;
|
|
99
|
+
initiator: z.ZodString;
|
|
100
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
method: z.ZodString;
|
|
103
|
+
url: z.ZodString;
|
|
104
|
+
status: z.ZodNumber;
|
|
105
|
+
ok: z.ZodBoolean;
|
|
106
|
+
durationMs: z.ZodNumber;
|
|
107
|
+
initiator: z.ZodString;
|
|
108
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
method: z.ZodString;
|
|
111
|
+
url: z.ZodString;
|
|
112
|
+
status: z.ZodNumber;
|
|
113
|
+
ok: z.ZodBoolean;
|
|
114
|
+
durationMs: z.ZodNumber;
|
|
115
|
+
initiator: z.ZodString;
|
|
116
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
117
|
+
"net.pending": z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
method: z.ZodString;
|
|
120
|
+
url: z.ZodString;
|
|
121
|
+
initiator: z.ZodString;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
url: string;
|
|
124
|
+
id: string;
|
|
125
|
+
method: string;
|
|
126
|
+
initiator: string;
|
|
127
|
+
}, {
|
|
128
|
+
url: string;
|
|
129
|
+
id: string;
|
|
130
|
+
method: string;
|
|
131
|
+
initiator: string;
|
|
132
|
+
}>;
|
|
133
|
+
"net.stream": z.ZodObject<{
|
|
134
|
+
transport: z.ZodNativeEnum<{
|
|
135
|
+
readonly SSE: "sse";
|
|
136
|
+
readonly WS: "ws";
|
|
137
|
+
}>;
|
|
138
|
+
direction: z.ZodNativeEnum<{
|
|
139
|
+
readonly OPEN: "open";
|
|
140
|
+
readonly IN: "in";
|
|
141
|
+
readonly OUT: "out";
|
|
142
|
+
}>;
|
|
143
|
+
url: z.ZodString;
|
|
144
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
145
|
+
transport: z.ZodNativeEnum<{
|
|
146
|
+
readonly SSE: "sse";
|
|
147
|
+
readonly WS: "ws";
|
|
148
|
+
}>;
|
|
149
|
+
direction: z.ZodNativeEnum<{
|
|
150
|
+
readonly OPEN: "open";
|
|
151
|
+
readonly IN: "in";
|
|
152
|
+
readonly OUT: "out";
|
|
153
|
+
}>;
|
|
154
|
+
url: z.ZodString;
|
|
155
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
156
|
+
transport: z.ZodNativeEnum<{
|
|
157
|
+
readonly SSE: "sse";
|
|
158
|
+
readonly WS: "ws";
|
|
159
|
+
}>;
|
|
160
|
+
direction: z.ZodNativeEnum<{
|
|
161
|
+
readonly OPEN: "open";
|
|
162
|
+
readonly IN: "in";
|
|
163
|
+
readonly OUT: "out";
|
|
164
|
+
}>;
|
|
165
|
+
url: z.ZodString;
|
|
166
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
167
|
+
perf: z.ZodObject<{
|
|
168
|
+
metric: z.ZodNativeEnum<{
|
|
169
|
+
readonly LCP: "lcp";
|
|
170
|
+
readonly CLS: "cls";
|
|
171
|
+
readonly LONGTASK: "longtask";
|
|
172
|
+
}>;
|
|
173
|
+
value: z.ZodNumber;
|
|
174
|
+
at: z.ZodNumber;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
value: number;
|
|
177
|
+
at: number;
|
|
178
|
+
metric: "lcp" | "cls" | "longtask";
|
|
179
|
+
}, {
|
|
180
|
+
value: number;
|
|
181
|
+
at: number;
|
|
182
|
+
metric: "lcp" | "cls" | "longtask";
|
|
183
|
+
}>;
|
|
184
|
+
"route.change": z.ZodObject<{
|
|
185
|
+
from: z.ZodString;
|
|
186
|
+
to: z.ZodString;
|
|
187
|
+
pathname: z.ZodString;
|
|
188
|
+
search: z.ZodString;
|
|
189
|
+
hash: z.ZodString;
|
|
190
|
+
}, "strip", z.ZodTypeAny, {
|
|
191
|
+
from: string;
|
|
192
|
+
to: string;
|
|
193
|
+
pathname: string;
|
|
194
|
+
search: string;
|
|
195
|
+
hash: string;
|
|
196
|
+
}, {
|
|
197
|
+
from: string;
|
|
198
|
+
to: string;
|
|
199
|
+
pathname: string;
|
|
200
|
+
search: string;
|
|
201
|
+
hash: string;
|
|
202
|
+
}>;
|
|
203
|
+
"console.log": z.ZodObject<{
|
|
204
|
+
message: z.ZodString;
|
|
205
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
206
|
+
message: z.ZodString;
|
|
207
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
208
|
+
message: z.ZodString;
|
|
209
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
210
|
+
"console.warn": z.ZodObject<{
|
|
211
|
+
message: z.ZodString;
|
|
212
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
213
|
+
message: z.ZodString;
|
|
214
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
215
|
+
message: z.ZodString;
|
|
216
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
217
|
+
"console.error": z.ZodObject<{
|
|
218
|
+
message: z.ZodString;
|
|
219
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
220
|
+
message: z.ZodString;
|
|
221
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
222
|
+
message: z.ZodString;
|
|
223
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
224
|
+
"console.info": z.ZodObject<{
|
|
225
|
+
message: z.ZodString;
|
|
226
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
227
|
+
message: z.ZodString;
|
|
228
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
229
|
+
message: z.ZodString;
|
|
230
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
231
|
+
"console.debug": z.ZodObject<{
|
|
232
|
+
message: z.ZodString;
|
|
233
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
234
|
+
message: z.ZodString;
|
|
235
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
236
|
+
message: z.ZodString;
|
|
237
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
238
|
+
"error.uncaught": z.ZodObject<{
|
|
239
|
+
message: z.ZodString;
|
|
240
|
+
source: z.ZodOptional<z.ZodString>;
|
|
241
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
244
|
+
message: z.ZodString;
|
|
245
|
+
source: z.ZodOptional<z.ZodString>;
|
|
246
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
249
|
+
message: z.ZodString;
|
|
250
|
+
source: z.ZodOptional<z.ZodString>;
|
|
251
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
254
|
+
"visible.shown": z.ZodObject<{
|
|
255
|
+
role: z.ZodOptional<z.ZodString>;
|
|
256
|
+
name: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
|
+
role?: string | undefined;
|
|
259
|
+
name?: string | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
role?: string | undefined;
|
|
262
|
+
name?: string | undefined;
|
|
263
|
+
}>;
|
|
264
|
+
"anim.start": z.ZodObject<{
|
|
265
|
+
name: z.ZodString;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
name: string;
|
|
268
|
+
}, {
|
|
269
|
+
name: string;
|
|
270
|
+
}>;
|
|
271
|
+
"anim.end": z.ZodObject<{
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
name: string;
|
|
275
|
+
}, {
|
|
276
|
+
name: string;
|
|
277
|
+
}>;
|
|
278
|
+
"scroll.position": z.ZodObject<{
|
|
279
|
+
x: z.ZodNumber;
|
|
280
|
+
y: z.ZodNumber;
|
|
281
|
+
percent: z.ZodNumber;
|
|
282
|
+
direction: z.ZodNativeEnum<{
|
|
283
|
+
readonly UP: "up";
|
|
284
|
+
readonly DOWN: "down";
|
|
285
|
+
}>;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
direction: "up" | "down";
|
|
288
|
+
x: number;
|
|
289
|
+
y: number;
|
|
290
|
+
percent: number;
|
|
291
|
+
}, {
|
|
292
|
+
direction: "up" | "down";
|
|
293
|
+
x: number;
|
|
294
|
+
y: number;
|
|
295
|
+
percent: number;
|
|
296
|
+
}>;
|
|
297
|
+
"reveal.shown": z.ZodObject<{
|
|
298
|
+
role: z.ZodOptional<z.ZodString>;
|
|
299
|
+
name: z.ZodOptional<z.ZodString>;
|
|
300
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
301
|
+
role: z.ZodOptional<z.ZodString>;
|
|
302
|
+
name: z.ZodOptional<z.ZodString>;
|
|
303
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
304
|
+
role: z.ZodOptional<z.ZodString>;
|
|
305
|
+
name: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
307
|
+
signal: z.ZodObject<{
|
|
308
|
+
name: z.ZodString;
|
|
309
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
|
311
|
+
name: string;
|
|
312
|
+
data?: unknown;
|
|
313
|
+
}, {
|
|
314
|
+
name: string;
|
|
315
|
+
data?: unknown;
|
|
316
|
+
}>;
|
|
317
|
+
"state.change": z.ZodObject<{
|
|
318
|
+
name: z.ZodString;
|
|
319
|
+
value: z.ZodUnknown;
|
|
320
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
321
|
+
name: z.ZodString;
|
|
322
|
+
value: z.ZodUnknown;
|
|
323
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
value: z.ZodUnknown;
|
|
326
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
327
|
+
"storage.change": z.ZodObject<{
|
|
328
|
+
area: z.ZodNativeEnum<{
|
|
329
|
+
readonly LOCAL: "local";
|
|
330
|
+
readonly SESSION: "session";
|
|
331
|
+
readonly COOKIE: "cookie";
|
|
332
|
+
}>;
|
|
333
|
+
key: z.ZodString;
|
|
334
|
+
old: z.ZodOptional<z.ZodString>;
|
|
335
|
+
new: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, "strip", z.ZodTypeAny, {
|
|
337
|
+
area: "local" | "session" | "cookie";
|
|
338
|
+
key: string;
|
|
339
|
+
old?: string | undefined;
|
|
340
|
+
new?: string | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
area: "local" | "session" | "cookie";
|
|
343
|
+
key: string;
|
|
344
|
+
old?: string | undefined;
|
|
345
|
+
new?: string | undefined;
|
|
346
|
+
}>;
|
|
347
|
+
"page.health": z.ZodObject<{
|
|
348
|
+
hidden: z.ZodBoolean;
|
|
349
|
+
focused: z.ZodBoolean;
|
|
350
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
351
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
352
|
+
hidden: z.ZodBoolean;
|
|
353
|
+
focused: z.ZodBoolean;
|
|
354
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
356
|
+
hidden: z.ZodBoolean;
|
|
357
|
+
focused: z.ZodBoolean;
|
|
358
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
360
|
+
"render.commit": z.ZodObject<{
|
|
361
|
+
commits: z.ZodNumber;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
commits: number;
|
|
364
|
+
}, {
|
|
365
|
+
commits: number;
|
|
366
|
+
}>;
|
|
367
|
+
"focus.change": z.ZodObject<{
|
|
368
|
+
to: z.ZodOptional<z.ZodString>;
|
|
369
|
+
from: z.ZodOptional<z.ZodString>;
|
|
370
|
+
toBody: z.ZodBoolean;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
toBody: boolean;
|
|
373
|
+
from?: string | undefined;
|
|
374
|
+
to?: string | undefined;
|
|
375
|
+
}, {
|
|
376
|
+
toBody: boolean;
|
|
377
|
+
from?: string | undefined;
|
|
378
|
+
to?: string | undefined;
|
|
379
|
+
}>;
|
|
380
|
+
"flow.recorded": z.ZodObject<{
|
|
381
|
+
name: z.ZodString;
|
|
382
|
+
flow: z.ZodUnknown;
|
|
383
|
+
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
name: string;
|
|
385
|
+
flow?: unknown;
|
|
386
|
+
}, {
|
|
387
|
+
name: string;
|
|
388
|
+
flow?: unknown;
|
|
389
|
+
}>;
|
|
390
|
+
"transport.overflow": z.ZodObject<{
|
|
391
|
+
dropped: z.ZodNumber;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
dropped: number;
|
|
394
|
+
}, {
|
|
395
|
+
dropped: number;
|
|
396
|
+
}>;
|
|
397
|
+
truncated: z.ZodObject<{
|
|
398
|
+
channel: z.ZodString;
|
|
399
|
+
dropped: z.ZodNumber;
|
|
400
|
+
}, "strip", z.ZodTypeAny, {
|
|
401
|
+
dropped: number;
|
|
402
|
+
channel: string;
|
|
403
|
+
}, {
|
|
404
|
+
dropped: number;
|
|
405
|
+
channel: string;
|
|
406
|
+
}>;
|
|
407
|
+
"blind-spot": z.ZodObject<{
|
|
408
|
+
kind: z.ZodNativeEnum<{
|
|
409
|
+
readonly CLOSED_SHADOW_ROOT: "closed-shadow-root";
|
|
410
|
+
readonly CROSS_ORIGIN_IFRAME: "cross-origin-iframe";
|
|
411
|
+
readonly VIRTUALIZED_UNMOUNTED: "virtualized-unmounted";
|
|
412
|
+
readonly WRAPPED_NETWORK: "wrapped-network";
|
|
413
|
+
}>;
|
|
414
|
+
count: z.ZodNumber;
|
|
415
|
+
}, "strip", z.ZodTypeAny, {
|
|
416
|
+
kind: "closed-shadow-root" | "cross-origin-iframe" | "virtualized-unmounted" | "wrapped-network";
|
|
417
|
+
count: number;
|
|
418
|
+
}, {
|
|
419
|
+
kind: "closed-shadow-root" | "cross-origin-iframe" | "virtualized-unmounted" | "wrapped-network";
|
|
420
|
+
count: number;
|
|
421
|
+
}>;
|
|
422
|
+
"net.detail": z.ZodObject<{
|
|
423
|
+
url: z.ZodString;
|
|
424
|
+
method: z.ZodOptional<z.ZodString>;
|
|
425
|
+
status: z.ZodNumber;
|
|
426
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
427
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
428
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
429
|
+
url: z.ZodString;
|
|
430
|
+
method: z.ZodOptional<z.ZodString>;
|
|
431
|
+
status: z.ZodNumber;
|
|
432
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
433
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
434
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
435
|
+
url: z.ZodString;
|
|
436
|
+
method: z.ZodOptional<z.ZodString>;
|
|
437
|
+
status: z.ZodNumber;
|
|
438
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
439
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
440
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
441
|
+
"human.control": z.ZodObject<{
|
|
442
|
+
kind: z.ZodNativeEnum<{
|
|
443
|
+
readonly PAUSE: "pause";
|
|
444
|
+
readonly RESUME: "resume";
|
|
445
|
+
readonly END: "end";
|
|
446
|
+
readonly MESSAGE: "message";
|
|
447
|
+
readonly REPLAY: "replay";
|
|
448
|
+
}>;
|
|
449
|
+
text: z.ZodOptional<z.ZodString>;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
kind: "pause" | "resume" | "end" | "message" | "replay";
|
|
452
|
+
text?: string | undefined;
|
|
453
|
+
}, {
|
|
454
|
+
kind: "pause" | "resume" | "end" | "message" | "replay";
|
|
455
|
+
text?: string | undefined;
|
|
456
|
+
}>;
|
|
457
|
+
"human.mark": z.ZodObject<{
|
|
458
|
+
note: z.ZodString;
|
|
459
|
+
anchor: z.ZodString;
|
|
460
|
+
strategy: z.ZodNativeEnum<{
|
|
461
|
+
readonly TESTID: "testid";
|
|
462
|
+
readonly COMPONENT: "component";
|
|
463
|
+
readonly ROLE: "role";
|
|
464
|
+
readonly POSITION: "position";
|
|
465
|
+
}>;
|
|
466
|
+
label: z.ZodOptional<z.ZodString>;
|
|
467
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
file: z.ZodString;
|
|
469
|
+
line: z.ZodNumber;
|
|
470
|
+
}, "strip", z.ZodTypeAny, {
|
|
471
|
+
file: string;
|
|
472
|
+
line: number;
|
|
473
|
+
}, {
|
|
474
|
+
file: string;
|
|
475
|
+
line: number;
|
|
476
|
+
}>>;
|
|
477
|
+
route: z.ZodOptional<z.ZodString>;
|
|
478
|
+
}, "strip", z.ZodTypeAny, {
|
|
479
|
+
note: string;
|
|
480
|
+
anchor: string;
|
|
481
|
+
strategy: "testid" | "role" | "component" | "position";
|
|
482
|
+
label?: string | undefined;
|
|
483
|
+
source?: {
|
|
484
|
+
file: string;
|
|
485
|
+
line: number;
|
|
486
|
+
} | undefined;
|
|
487
|
+
route?: string | undefined;
|
|
488
|
+
}, {
|
|
489
|
+
note: string;
|
|
490
|
+
anchor: string;
|
|
491
|
+
strategy: "testid" | "role" | "component" | "position";
|
|
492
|
+
label?: string | undefined;
|
|
493
|
+
source?: {
|
|
494
|
+
file: string;
|
|
495
|
+
line: number;
|
|
496
|
+
} | undefined;
|
|
497
|
+
route?: string | undefined;
|
|
498
|
+
}>;
|
|
499
|
+
};
|
|
500
|
+
/** Narrow an event's `data` against its type's payload schema. Unknown in, typed-or-error out. */
|
|
501
|
+
export declare function parseEventPayload(type: EventType, data: unknown): z.SafeParseReturnType<unknown, unknown>;
|
|
502
|
+
//# sourceMappingURL=event-payloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-payloads.d.ts","sourceRoot":"","sources":["../src/event-payloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAA6B,MAAM,gBAAgB,CAAC;AAGtE;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;CAAoC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,eAAO,MAAM,eAAe;;;;CAAkD,CAAC;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,eAAO,MAAM,eAAe;;;CAAsC,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,eAAO,MAAM,WAAW;;;;CAAoE,CAAC;AAC7F,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AA0BzE;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFS,CAAC;AAE5C,kGAAkG;AAClG,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,OAAO,GACZ,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAEzC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EventType, PerfMetric, BlindSpotKind } from './constants.js';
|
|
3
|
+
import { HumanControlDataSchema, HumanMarkDataSchema } from './messages.js';
|
|
4
|
+
/**
|
|
5
|
+
* Per-event-type payload schemas — the typed replacement for the envelope's open `data` record.
|
|
6
|
+
* The envelope (`ReticleEventSchema.data`) stays open on the wire so a richer SDK is never rejected
|
|
7
|
+
* mid-upgrade; narrowing happens here, at the server's inbound boundary and wherever the journal reads
|
|
8
|
+
* an event's fields. `parseEventPayload` is that boundary.
|
|
9
|
+
*
|
|
10
|
+
* Two fidelity tiers by design:
|
|
11
|
+
* - **Precise + closed** for stable observers (dom/route/perf/anim/scroll/signal/health/...).
|
|
12
|
+
* - **Precise on the load-bearing fields + `.passthrough`** for observers / will enrich
|
|
13
|
+
* (network, console, error, state, storage) — today's fields are validated, tomorrow's added
|
|
14
|
+
* fields (stack, TTFB, initiator, path diffs) pass through instead of failing closed. Each closes
|
|
15
|
+
* fully as its observer is rewritten.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Wire payload vocabularies. The browser observers EMIT these values and the schemas below VALIDATE
|
|
19
|
+
* them, so a browser-side typo (`'SSE'`) would pass tsc and fail only here, at runtime. Each is a const
|
|
20
|
+
* object — the browser imports the members, the schema derives its z.nativeEnum from the same object —
|
|
21
|
+
* so emitter and validator are one source. Co-located with the schemas (kept constants.ts under its cap).
|
|
22
|
+
*/
|
|
23
|
+
export const StreamTransport = { SSE: 'sse', WS: 'ws' };
|
|
24
|
+
export const StreamDirection = { OPEN: 'open', IN: 'in', OUT: 'out' };
|
|
25
|
+
export const ScrollDirection = { UP: 'up', DOWN: 'down' };
|
|
26
|
+
export const StorageArea = { LOCAL: 'local', SESSION: 'session', COOKIE: 'cookie' };
|
|
27
|
+
const elementLabel = z.object({ role: z.string().optional(), name: z.string().optional() });
|
|
28
|
+
const netStreamSchema = z
|
|
29
|
+
.object({
|
|
30
|
+
transport: z.nativeEnum(StreamTransport),
|
|
31
|
+
direction: z.nativeEnum(StreamDirection),
|
|
32
|
+
url: z.string(),
|
|
33
|
+
})
|
|
34
|
+
.passthrough();
|
|
35
|
+
const netRequestSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
method: z.string(),
|
|
39
|
+
url: z.string(),
|
|
40
|
+
status: z.number(),
|
|
41
|
+
ok: z.boolean(),
|
|
42
|
+
durationMs: z.number(),
|
|
43
|
+
initiator: z.string(),
|
|
44
|
+
})
|
|
45
|
+
.passthrough();
|
|
46
|
+
const consoleSchema = z.object({ message: z.string() }).passthrough();
|
|
47
|
+
/**
|
|
48
|
+
* The registry. `satisfies Record<EventType,...>` makes a missing event type a *compile* error —
|
|
49
|
+
* the wire can never carry a type without a payload contract.
|
|
50
|
+
*/
|
|
51
|
+
export const EVENT_PAYLOAD_SCHEMAS = {
|
|
52
|
+
[EventType.DOM_ADDED]: elementLabel,
|
|
53
|
+
[EventType.DOM_REMOVED]: elementLabel,
|
|
54
|
+
[EventType.DOM_ATTR]: z
|
|
55
|
+
.object({ attr: z.string(), value: z.string().optional(), old: z.string().optional() })
|
|
56
|
+
.passthrough(),
|
|
57
|
+
[EventType.DOM_TEXT]: z.object({ text: z.string(), old: z.string().optional() }),
|
|
58
|
+
[EventType.NET_REQUEST]: netRequestSchema,
|
|
59
|
+
[EventType.NET_PENDING]: z.object({
|
|
60
|
+
id: z.string(),
|
|
61
|
+
method: z.string(),
|
|
62
|
+
url: z.string(),
|
|
63
|
+
initiator: z.string(),
|
|
64
|
+
}),
|
|
65
|
+
[EventType.NET_STREAM]: netStreamSchema,
|
|
66
|
+
[EventType.PERF]: z.object({
|
|
67
|
+
metric: z.nativeEnum(PerfMetric),
|
|
68
|
+
value: z.number(),
|
|
69
|
+
at: z.number(),
|
|
70
|
+
}),
|
|
71
|
+
[EventType.ROUTE_CHANGE]: z.object({
|
|
72
|
+
from: z.string(),
|
|
73
|
+
to: z.string(),
|
|
74
|
+
pathname: z.string(),
|
|
75
|
+
search: z.string(),
|
|
76
|
+
hash: z.string(),
|
|
77
|
+
}),
|
|
78
|
+
[EventType.CONSOLE_LOG]: consoleSchema,
|
|
79
|
+
[EventType.CONSOLE_WARN]: consoleSchema,
|
|
80
|
+
[EventType.CONSOLE_ERROR]: consoleSchema,
|
|
81
|
+
[EventType.CONSOLE_INFO]: consoleSchema,
|
|
82
|
+
[EventType.CONSOLE_DEBUG]: consoleSchema,
|
|
83
|
+
[EventType.ERROR_UNCAUGHT]: z
|
|
84
|
+
.object({
|
|
85
|
+
message: z.string(),
|
|
86
|
+
source: z.string().optional(),
|
|
87
|
+
line: z.number().optional(),
|
|
88
|
+
kind: z.string().optional(),
|
|
89
|
+
})
|
|
90
|
+
.passthrough(),
|
|
91
|
+
[EventType.VISIBLE_SHOWN]: elementLabel,
|
|
92
|
+
[EventType.ANIM_START]: z.object({ name: z.string() }),
|
|
93
|
+
[EventType.ANIM_END]: z.object({ name: z.string() }),
|
|
94
|
+
[EventType.SCROLL_POSITION]: z.object({
|
|
95
|
+
x: z.number(),
|
|
96
|
+
y: z.number(),
|
|
97
|
+
percent: z.number(),
|
|
98
|
+
direction: z.nativeEnum(ScrollDirection),
|
|
99
|
+
}),
|
|
100
|
+
[EventType.REVEAL_SHOWN]: elementLabel.passthrough(),
|
|
101
|
+
[EventType.SIGNAL]: z.object({ name: z.string(), data: z.unknown().optional() }),
|
|
102
|
+
[EventType.STATE_CHANGE]: z.object({ name: z.string(), value: z.unknown() }).passthrough(),
|
|
103
|
+
[EventType.STORAGE_CHANGE]: z.object({
|
|
104
|
+
area: z.nativeEnum(StorageArea),
|
|
105
|
+
key: z.string(),
|
|
106
|
+
old: z.string().optional(),
|
|
107
|
+
new: z.string().optional(),
|
|
108
|
+
}),
|
|
109
|
+
[EventType.PAGE_HEALTH]: z
|
|
110
|
+
.object({ hidden: z.boolean(), focused: z.boolean(), reason: z.string().optional() })
|
|
111
|
+
.passthrough(),
|
|
112
|
+
[EventType.RENDER_COMMIT]: z.object({ commits: z.number() }),
|
|
113
|
+
[EventType.FOCUS_CHANGE]: z.object({
|
|
114
|
+
to: z.string().optional(),
|
|
115
|
+
from: z.string().optional(),
|
|
116
|
+
toBody: z.boolean(),
|
|
117
|
+
}),
|
|
118
|
+
[EventType.FLOW_RECORDED]: z.object({ name: z.string(), flow: z.unknown() }),
|
|
119
|
+
[EventType.TRANSPORT_OVERFLOW]: z.object({ dropped: z.number() }),
|
|
120
|
+
[EventType.TRUNCATED]: z.object({ channel: z.string(), dropped: z.number() }),
|
|
121
|
+
[EventType.BLIND_SPOT]: z.object({ kind: z.nativeEnum(BlindSpotKind), count: z.number() }),
|
|
122
|
+
[EventType.NET_DETAIL]: z
|
|
123
|
+
.object({
|
|
124
|
+
url: z.string(),
|
|
125
|
+
method: z.string().optional(),
|
|
126
|
+
status: z.number(),
|
|
127
|
+
headers: z.record(z.string()),
|
|
128
|
+
resourceType: z.string().optional(),
|
|
129
|
+
})
|
|
130
|
+
.passthrough(),
|
|
131
|
+
[EventType.HUMAN_CONTROL]: HumanControlDataSchema,
|
|
132
|
+
[EventType.HUMAN_MARK]: HumanMarkDataSchema,
|
|
133
|
+
};
|
|
134
|
+
/** Narrow an event's `data` against its type's payload schema. Unknown in, typed-or-error out. */
|
|
135
|
+
export function parseEventPayload(type, data) {
|
|
136
|
+
return EVENT_PAYLOAD_SCHEMAS[type].safeParse(data);
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=event-payloads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-payloads.js","sourceRoot":"","sources":["../src/event-payloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE5E;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAW,CAAC;AAGjE,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAW,CAAC;AAG/E,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAW,CAAC;AAGnE,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAG7F,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE5F,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC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AM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC7E,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC1F,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC;SACtB,MAAM,CAAC;QACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC;SACD,WAAW,EAAE;IAChB,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,sBAAsB;IACjD,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,mBAAmB;CACF,CAAC;AAE5C,kGAAkG;AAClG,MAAM,UAAU,iBAAiB,CAC/B,IAAe,EACf,IAAa;IAEb,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC"}
|
package/dist/flow-constants.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
export declare const PROJECT_FILE_VERSION = 1;
|
|
11
11
|
/**
|
|
12
12
|
* Structured outcome when reading project.json fails (never thrown to the agent).
|
|
13
|
-
* Mirrors ContractReadError. NOTE: recordRun
|
|
13
|
+
* Mirrors ContractReadError. NOTE: recordRun self-heals a MALFORMED file (starts fresh) so a
|
|
14
14
|
* corrupt history never wedges the agent; only the READ path (reticle_project) surfaces MALFORMED.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ProjectReadError: {
|
|
@@ -158,7 +158,7 @@ export declare const AnnotationTarget: {
|
|
|
158
158
|
export type AnnotationTarget = (typeof AnnotationTarget)[keyof typeof AnnotationTarget];
|
|
159
159
|
/**
|
|
160
160
|
* Structured failure codes for the annotate compiler/tool (returned, never
|
|
161
|
-
* thrown / free strings). NO_ACTIVE_RECORDING = annotate
|
|
161
|
+
* thrown / free strings). NO_ACTIVE_RECORDING = annotate with nothing recording; NO_STEP_TO_
|
|
162
162
|
* ANNOTATE = an assert-* with zero captured steps yet; UNKNOWN_KIND = kind ∉ AnnotationKind (or a
|
|
163
163
|
* free natural-language string — see AnnotationSchema's FUTURE note); MISSING_FIELD = e.g. a
|
|
164
164
|
* success-state with neither signal nor testid.
|