@reticlehq/core 1.3.0 → 2.0.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 +14 -86
- package/dist/brand.d.ts +21 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +16 -0
- package/dist/brand.js.map +1 -0
- package/dist/constants.d.ts +371 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +343 -0
- package/dist/constants.js.map +1 -0
- package/dist/flow-constants.d.ts +175 -0
- package/dist/flow-constants.d.ts.map +1 -0
- package/dist/flow-constants.js +162 -0
- package/dist/flow-constants.js.map +1 -0
- package/dist/flow-types.d.ts +1182 -0
- package/dist/flow-types.d.ts.map +1 -0
- package/dist/flow-types.js +144 -0
- package/dist/flow-types.js.map +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -5543
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +424 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +103 -0
- package/dist/messages.js.map +1 -0
- package/dist/notices.d.ts +47 -0
- package/dist/notices.d.ts.map +1 -0
- package/dist/notices.js +51 -0
- package/dist/notices.js.map +1 -0
- package/dist/schema/command-message.json +41 -0
- package/dist/schema/command-result.json +34 -0
- package/dist/schema/event-message.json +77 -0
- package/dist/schema/event-type.json +35 -0
- package/dist/schema/hello-message.json +59 -0
- package/dist/schema/reticle-event.json +63 -0
- package/dist/schema/reticle-message.json +193 -0
- package/dist/security.d.ts +5 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +22 -0
- package/dist/security.js.map +1 -0
- package/dist/session-constants.d.ts +116 -0
- package/dist/session-constants.d.ts.map +1 -0
- package/dist/session-constants.js +113 -0
- package/dist/session-constants.js.map +1 -0
- package/dist/state-select.d.ts +23 -0
- package/dist/state-select.d.ts.map +1 -0
- package/dist/state-select.js +60 -0
- package/dist/state-select.js.map +1 -0
- package/dist/toon.d.ts +44 -0
- package/dist/toon.d.ts.map +1 -0
- package/dist/toon.js +153 -0
- package/dist/toon.js.map +1 -0
- package/dist/types.d.ts +833 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +165 -0
- package/dist/types.js.map +1 -0
- package/dist/upgrade.d.ts +74 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +88 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/verification-run.d.ts +1195 -0
- package/dist/verification-run.d.ts.map +1 -0
- package/dist/verification-run.js +261 -0
- package/dist/verification-run.js.map +1 -0
- package/package.json +32 -79
- package/dist/babel.d.ts +0 -7
- package/dist/babel.js +0 -32
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -11264
- package/dist/eslint.d.ts +0 -1
- package/dist/eslint.js +0 -134
- package/dist/loader.cjs +0 -52
- package/dist/next.d.ts +0 -21
- package/dist/next.js +0 -24
- package/dist/server.d.ts +0 -1
- package/dist/server.js +0 -9486
- package/dist/test.d.ts +0 -1
- package/dist/test.js +0 -9368
- package/dist/vite.d.ts +0 -1
- package/dist/vite.js +0 -196
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type AnnotationErrorCode, type AnnotationTarget, ElementState } from './constants.js';
|
|
3
|
+
import type { FlowExpect } from './flow-types.js';
|
|
4
|
+
/** A query describing which element(s) to find, Testing-Library style. */
|
|
5
|
+
export declare const ElementQuerySchema: z.ZodObject<{
|
|
6
|
+
by: z.ZodOptional<z.ZodNativeEnum<{
|
|
7
|
+
readonly ROLE: "role";
|
|
8
|
+
readonly TEXT: "text";
|
|
9
|
+
readonly LABEL: "label";
|
|
10
|
+
readonly PLACEHOLDER: "placeholder";
|
|
11
|
+
readonly TESTID: "testid";
|
|
12
|
+
readonly ALT: "alt";
|
|
13
|
+
readonly COMPONENT: "component";
|
|
14
|
+
}>>;
|
|
15
|
+
value: z.ZodOptional<z.ZodString>;
|
|
16
|
+
role: z.ZodOptional<z.ZodString>;
|
|
17
|
+
name: z.ZodOptional<z.ZodString>;
|
|
18
|
+
text: z.ZodOptional<z.ZodString>;
|
|
19
|
+
label: z.ZodOptional<z.ZodString>;
|
|
20
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
21
|
+
testid: z.ZodOptional<z.ZodString>;
|
|
22
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
/** Component display name (auto-anchor resolution). The nearest enclosing component of the target. */
|
|
24
|
+
component: z.ZodOptional<z.ZodString>;
|
|
25
|
+
/** Source location of the target element (auto-anchor resolution) — the precise, granular match. */
|
|
26
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
file: z.ZodString;
|
|
28
|
+
line: z.ZodNumber;
|
|
29
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
file: string;
|
|
32
|
+
line: number;
|
|
33
|
+
column?: number | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
file: string;
|
|
36
|
+
line: number;
|
|
37
|
+
column?: number | undefined;
|
|
38
|
+
}>>;
|
|
39
|
+
/** CSS selector or ref to scope the search. */
|
|
40
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
testid?: string | undefined;
|
|
43
|
+
role?: string | undefined;
|
|
44
|
+
component?: string | undefined;
|
|
45
|
+
text?: string | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
placeholder?: string | undefined;
|
|
48
|
+
alt?: string | undefined;
|
|
49
|
+
value?: string | undefined;
|
|
50
|
+
source?: {
|
|
51
|
+
file: string;
|
|
52
|
+
line: number;
|
|
53
|
+
column?: number | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
name?: string | undefined;
|
|
56
|
+
by?: "testid" | "role" | "component" | "text" | "label" | "placeholder" | "alt" | undefined;
|
|
57
|
+
scope?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
testid?: string | undefined;
|
|
60
|
+
role?: string | undefined;
|
|
61
|
+
component?: string | undefined;
|
|
62
|
+
text?: string | undefined;
|
|
63
|
+
label?: string | undefined;
|
|
64
|
+
placeholder?: string | undefined;
|
|
65
|
+
alt?: string | undefined;
|
|
66
|
+
value?: string | undefined;
|
|
67
|
+
source?: {
|
|
68
|
+
file: string;
|
|
69
|
+
line: number;
|
|
70
|
+
column?: number | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
by?: "testid" | "role" | "component" | "text" | "label" | "placeholder" | "alt" | undefined;
|
|
74
|
+
scope?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
export type ElementQuery = z.infer<typeof ElementQuerySchema>;
|
|
77
|
+
/** Compact semantic descriptor of one element surfaced to the agent. */
|
|
78
|
+
export interface ElementDescriptor {
|
|
79
|
+
ref: string;
|
|
80
|
+
role: string;
|
|
81
|
+
name: string;
|
|
82
|
+
value?: string;
|
|
83
|
+
states: ElementState[];
|
|
84
|
+
visible: boolean;
|
|
85
|
+
text?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface MatchResult {
|
|
88
|
+
matched: boolean;
|
|
89
|
+
count: number;
|
|
90
|
+
elements: ElementDescriptor[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A semantic cluster of interactive elements in the DOM — the replacement for the raw testid list
|
|
94
|
+
* in zero-match hints. Tells the agent "there is a list with 847 rows" rather than 12 opaque IDs.
|
|
95
|
+
*/
|
|
96
|
+
export interface PresentRegion {
|
|
97
|
+
/** ARIA role of the container element. */
|
|
98
|
+
role: string;
|
|
99
|
+
/** Accessible name of the container, if present. */
|
|
100
|
+
name?: string;
|
|
101
|
+
/** Number of direct role-bearing children in the container. */
|
|
102
|
+
childCount: number;
|
|
103
|
+
/** Up to 3 `role[name]` strings sampled from the first children (for orientation). */
|
|
104
|
+
sample: string[];
|
|
105
|
+
}
|
|
106
|
+
/** Diagnostic hint attached to a zero-match reticle_query result. */
|
|
107
|
+
export interface QueryEmptyHint {
|
|
108
|
+
/** location.pathname + location.search at query time. */
|
|
109
|
+
route: string;
|
|
110
|
+
/** Semantic clusters of the page's interactive regions — the successor to presentTestids. */
|
|
111
|
+
presentRegions: PresentRegion[];
|
|
112
|
+
/** @deprecated Use presentRegions. Kept for one major cycle; removed next major. */
|
|
113
|
+
presentTestids: string[];
|
|
114
|
+
/** True if a capability-registered testid is present in the scope. */
|
|
115
|
+
knownEmptyState: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** Result of the QUERY command / reticle_query tool. `hint` present ONLY on zero matches. */
|
|
118
|
+
export interface QueryResult {
|
|
119
|
+
elements: ElementDescriptor[];
|
|
120
|
+
hint?: QueryEmptyHint;
|
|
121
|
+
}
|
|
122
|
+
/** One named flow advertised by the app (mirrors the browser CapabilityFlow). */
|
|
123
|
+
export declare const CapabilityFlowSchema: z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
steps: z.ZodArray<z.ZodString, "many">;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
name: string;
|
|
128
|
+
steps: string[];
|
|
129
|
+
}, {
|
|
130
|
+
name: string;
|
|
131
|
+
steps: string[];
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* A declared risk zone — the app naming a surface (auth/payment/db/…) and the paths it covers, so a
|
|
135
|
+
* host can gate on it. Shares RiskSurface with the verification-run verdict so a declaration and a
|
|
136
|
+
* detection speak the same vocabulary. ENFORCED LATER — parsed + surfaced now.
|
|
137
|
+
*/
|
|
138
|
+
export declare const RiskZoneSchema: z.ZodObject<{
|
|
139
|
+
surface: z.ZodNativeEnum<{
|
|
140
|
+
readonly AUTH: "auth";
|
|
141
|
+
readonly PAYMENT: "payment";
|
|
142
|
+
readonly DB: "db";
|
|
143
|
+
readonly MIGRATION: "migration";
|
|
144
|
+
readonly RLS: "rls";
|
|
145
|
+
readonly SECRETS: "secrets";
|
|
146
|
+
readonly DESTRUCTIVE: "destructive";
|
|
147
|
+
readonly EXTERNAL: "external";
|
|
148
|
+
}>;
|
|
149
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
150
|
+
note: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
153
|
+
note?: string | undefined;
|
|
154
|
+
paths?: string[] | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
157
|
+
note?: string | undefined;
|
|
158
|
+
paths?: string[] | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Optional governance metadata an app may declare about its testable surface: who owns it, safety
|
|
162
|
+
* invariants, allowed scopes, store paths/selectors to redact, and declared risk zones. All optional
|
|
163
|
+
* and additive — a manifest without any of it stays valid (back-compat). Parsed + surfaced now;
|
|
164
|
+
* enforcement (policy gates, redaction-by-declaration) comes later.
|
|
165
|
+
*/
|
|
166
|
+
export declare const ManifestGovernanceSchema: z.ZodObject<{
|
|
167
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
168
|
+
safety: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
169
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
170
|
+
redact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
171
|
+
risk: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
|
+
surface: z.ZodNativeEnum<{
|
|
173
|
+
readonly AUTH: "auth";
|
|
174
|
+
readonly PAYMENT: "payment";
|
|
175
|
+
readonly DB: "db";
|
|
176
|
+
readonly MIGRATION: "migration";
|
|
177
|
+
readonly RLS: "rls";
|
|
178
|
+
readonly SECRETS: "secrets";
|
|
179
|
+
readonly DESTRUCTIVE: "destructive";
|
|
180
|
+
readonly EXTERNAL: "external";
|
|
181
|
+
}>;
|
|
182
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
183
|
+
note: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
186
|
+
note?: string | undefined;
|
|
187
|
+
paths?: string[] | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
190
|
+
note?: string | undefined;
|
|
191
|
+
paths?: string[] | undefined;
|
|
192
|
+
}>, "many">>;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
risk?: {
|
|
195
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
196
|
+
note?: string | undefined;
|
|
197
|
+
paths?: string[] | undefined;
|
|
198
|
+
}[] | undefined;
|
|
199
|
+
scope?: string[] | undefined;
|
|
200
|
+
owner?: string | undefined;
|
|
201
|
+
safety?: string[] | undefined;
|
|
202
|
+
redact?: string[] | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
risk?: {
|
|
205
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
206
|
+
note?: string | undefined;
|
|
207
|
+
paths?: string[] | undefined;
|
|
208
|
+
}[] | undefined;
|
|
209
|
+
scope?: string[] | undefined;
|
|
210
|
+
owner?: string | undefined;
|
|
211
|
+
safety?: string[] | undefined;
|
|
212
|
+
redact?: string[] | undefined;
|
|
213
|
+
}>;
|
|
214
|
+
export type ManifestGovernance = z.infer<typeof ManifestGovernanceSchema>;
|
|
215
|
+
/** The app's testable surface — persisted form of the browser Capabilities. */
|
|
216
|
+
export declare const CapabilitiesSchema: z.ZodObject<{
|
|
217
|
+
testids: z.ZodArray<z.ZodString, "many">;
|
|
218
|
+
signals: z.ZodArray<z.ZodString, "many">;
|
|
219
|
+
stores: z.ZodArray<z.ZodString, "many">;
|
|
220
|
+
flows: z.ZodArray<z.ZodObject<{
|
|
221
|
+
name: z.ZodString;
|
|
222
|
+
steps: z.ZodArray<z.ZodString, "many">;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
name: string;
|
|
225
|
+
steps: string[];
|
|
226
|
+
}, {
|
|
227
|
+
name: string;
|
|
228
|
+
steps: string[];
|
|
229
|
+
}>, "many">;
|
|
230
|
+
/** Optional declared governance (owner/safety/scope/redact/risk). Additive — back-compat safe. */
|
|
231
|
+
governance: z.ZodOptional<z.ZodObject<{
|
|
232
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
233
|
+
safety: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
234
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
235
|
+
redact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
236
|
+
risk: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
237
|
+
surface: z.ZodNativeEnum<{
|
|
238
|
+
readonly AUTH: "auth";
|
|
239
|
+
readonly PAYMENT: "payment";
|
|
240
|
+
readonly DB: "db";
|
|
241
|
+
readonly MIGRATION: "migration";
|
|
242
|
+
readonly RLS: "rls";
|
|
243
|
+
readonly SECRETS: "secrets";
|
|
244
|
+
readonly DESTRUCTIVE: "destructive";
|
|
245
|
+
readonly EXTERNAL: "external";
|
|
246
|
+
}>;
|
|
247
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
248
|
+
note: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
251
|
+
note?: string | undefined;
|
|
252
|
+
paths?: string[] | undefined;
|
|
253
|
+
}, {
|
|
254
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
255
|
+
note?: string | undefined;
|
|
256
|
+
paths?: string[] | undefined;
|
|
257
|
+
}>, "many">>;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
risk?: {
|
|
260
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
261
|
+
note?: string | undefined;
|
|
262
|
+
paths?: string[] | undefined;
|
|
263
|
+
}[] | undefined;
|
|
264
|
+
scope?: string[] | undefined;
|
|
265
|
+
owner?: string | undefined;
|
|
266
|
+
safety?: string[] | undefined;
|
|
267
|
+
redact?: string[] | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
risk?: {
|
|
270
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
271
|
+
note?: string | undefined;
|
|
272
|
+
paths?: string[] | undefined;
|
|
273
|
+
}[] | undefined;
|
|
274
|
+
scope?: string[] | undefined;
|
|
275
|
+
owner?: string | undefined;
|
|
276
|
+
safety?: string[] | undefined;
|
|
277
|
+
redact?: string[] | undefined;
|
|
278
|
+
}>>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
flows: {
|
|
281
|
+
name: string;
|
|
282
|
+
steps: string[];
|
|
283
|
+
}[];
|
|
284
|
+
testids: string[];
|
|
285
|
+
signals: string[];
|
|
286
|
+
stores: string[];
|
|
287
|
+
governance?: {
|
|
288
|
+
risk?: {
|
|
289
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
290
|
+
note?: string | undefined;
|
|
291
|
+
paths?: string[] | undefined;
|
|
292
|
+
}[] | undefined;
|
|
293
|
+
scope?: string[] | undefined;
|
|
294
|
+
owner?: string | undefined;
|
|
295
|
+
safety?: string[] | undefined;
|
|
296
|
+
redact?: string[] | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
flows: {
|
|
300
|
+
name: string;
|
|
301
|
+
steps: string[];
|
|
302
|
+
}[];
|
|
303
|
+
testids: string[];
|
|
304
|
+
signals: string[];
|
|
305
|
+
stores: string[];
|
|
306
|
+
governance?: {
|
|
307
|
+
risk?: {
|
|
308
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
309
|
+
note?: string | undefined;
|
|
310
|
+
paths?: string[] | undefined;
|
|
311
|
+
}[] | undefined;
|
|
312
|
+
scope?: string[] | undefined;
|
|
313
|
+
owner?: string | undefined;
|
|
314
|
+
safety?: string[] | undefined;
|
|
315
|
+
redact?: string[] | undefined;
|
|
316
|
+
} | undefined;
|
|
317
|
+
}>;
|
|
318
|
+
export type CapabilitiesContract = z.infer<typeof CapabilitiesSchema>;
|
|
319
|
+
/** The on-disk contract.json envelope: versioned + timestamped capabilities. */
|
|
320
|
+
export declare const ContractFileSchema: z.ZodObject<{
|
|
321
|
+
version: z.ZodNumber;
|
|
322
|
+
generatedAt: z.ZodNumber;
|
|
323
|
+
capabilities: z.ZodObject<{
|
|
324
|
+
testids: z.ZodArray<z.ZodString, "many">;
|
|
325
|
+
signals: z.ZodArray<z.ZodString, "many">;
|
|
326
|
+
stores: z.ZodArray<z.ZodString, "many">;
|
|
327
|
+
flows: z.ZodArray<z.ZodObject<{
|
|
328
|
+
name: z.ZodString;
|
|
329
|
+
steps: z.ZodArray<z.ZodString, "many">;
|
|
330
|
+
}, "strip", z.ZodTypeAny, {
|
|
331
|
+
name: string;
|
|
332
|
+
steps: string[];
|
|
333
|
+
}, {
|
|
334
|
+
name: string;
|
|
335
|
+
steps: string[];
|
|
336
|
+
}>, "many">;
|
|
337
|
+
/** Optional declared governance (owner/safety/scope/redact/risk). Additive — back-compat safe. */
|
|
338
|
+
governance: z.ZodOptional<z.ZodObject<{
|
|
339
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
340
|
+
safety: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
341
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
342
|
+
redact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
343
|
+
risk: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
344
|
+
surface: z.ZodNativeEnum<{
|
|
345
|
+
readonly AUTH: "auth";
|
|
346
|
+
readonly PAYMENT: "payment";
|
|
347
|
+
readonly DB: "db";
|
|
348
|
+
readonly MIGRATION: "migration";
|
|
349
|
+
readonly RLS: "rls";
|
|
350
|
+
readonly SECRETS: "secrets";
|
|
351
|
+
readonly DESTRUCTIVE: "destructive";
|
|
352
|
+
readonly EXTERNAL: "external";
|
|
353
|
+
}>;
|
|
354
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
355
|
+
note: z.ZodOptional<z.ZodString>;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
358
|
+
note?: string | undefined;
|
|
359
|
+
paths?: string[] | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
362
|
+
note?: string | undefined;
|
|
363
|
+
paths?: string[] | undefined;
|
|
364
|
+
}>, "many">>;
|
|
365
|
+
}, "strip", z.ZodTypeAny, {
|
|
366
|
+
risk?: {
|
|
367
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
368
|
+
note?: string | undefined;
|
|
369
|
+
paths?: string[] | undefined;
|
|
370
|
+
}[] | undefined;
|
|
371
|
+
scope?: string[] | undefined;
|
|
372
|
+
owner?: string | undefined;
|
|
373
|
+
safety?: string[] | undefined;
|
|
374
|
+
redact?: string[] | undefined;
|
|
375
|
+
}, {
|
|
376
|
+
risk?: {
|
|
377
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
378
|
+
note?: string | undefined;
|
|
379
|
+
paths?: string[] | undefined;
|
|
380
|
+
}[] | undefined;
|
|
381
|
+
scope?: string[] | undefined;
|
|
382
|
+
owner?: string | undefined;
|
|
383
|
+
safety?: string[] | undefined;
|
|
384
|
+
redact?: string[] | undefined;
|
|
385
|
+
}>>;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
flows: {
|
|
388
|
+
name: string;
|
|
389
|
+
steps: string[];
|
|
390
|
+
}[];
|
|
391
|
+
testids: string[];
|
|
392
|
+
signals: string[];
|
|
393
|
+
stores: string[];
|
|
394
|
+
governance?: {
|
|
395
|
+
risk?: {
|
|
396
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
397
|
+
note?: string | undefined;
|
|
398
|
+
paths?: string[] | undefined;
|
|
399
|
+
}[] | undefined;
|
|
400
|
+
scope?: string[] | undefined;
|
|
401
|
+
owner?: string | undefined;
|
|
402
|
+
safety?: string[] | undefined;
|
|
403
|
+
redact?: string[] | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
}, {
|
|
406
|
+
flows: {
|
|
407
|
+
name: string;
|
|
408
|
+
steps: string[];
|
|
409
|
+
}[];
|
|
410
|
+
testids: string[];
|
|
411
|
+
signals: string[];
|
|
412
|
+
stores: string[];
|
|
413
|
+
governance?: {
|
|
414
|
+
risk?: {
|
|
415
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
416
|
+
note?: string | undefined;
|
|
417
|
+
paths?: string[] | undefined;
|
|
418
|
+
}[] | undefined;
|
|
419
|
+
scope?: string[] | undefined;
|
|
420
|
+
owner?: string | undefined;
|
|
421
|
+
safety?: string[] | undefined;
|
|
422
|
+
redact?: string[] | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
}>;
|
|
425
|
+
}, "strip", z.ZodTypeAny, {
|
|
426
|
+
capabilities: {
|
|
427
|
+
flows: {
|
|
428
|
+
name: string;
|
|
429
|
+
steps: string[];
|
|
430
|
+
}[];
|
|
431
|
+
testids: string[];
|
|
432
|
+
signals: string[];
|
|
433
|
+
stores: string[];
|
|
434
|
+
governance?: {
|
|
435
|
+
risk?: {
|
|
436
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
437
|
+
note?: string | undefined;
|
|
438
|
+
paths?: string[] | undefined;
|
|
439
|
+
}[] | undefined;
|
|
440
|
+
scope?: string[] | undefined;
|
|
441
|
+
owner?: string | undefined;
|
|
442
|
+
safety?: string[] | undefined;
|
|
443
|
+
redact?: string[] | undefined;
|
|
444
|
+
} | undefined;
|
|
445
|
+
};
|
|
446
|
+
version: number;
|
|
447
|
+
generatedAt: number;
|
|
448
|
+
}, {
|
|
449
|
+
capabilities: {
|
|
450
|
+
flows: {
|
|
451
|
+
name: string;
|
|
452
|
+
steps: string[];
|
|
453
|
+
}[];
|
|
454
|
+
testids: string[];
|
|
455
|
+
signals: string[];
|
|
456
|
+
stores: string[];
|
|
457
|
+
governance?: {
|
|
458
|
+
risk?: {
|
|
459
|
+
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
460
|
+
note?: string | undefined;
|
|
461
|
+
paths?: string[] | undefined;
|
|
462
|
+
}[] | undefined;
|
|
463
|
+
scope?: string[] | undefined;
|
|
464
|
+
owner?: string | undefined;
|
|
465
|
+
safety?: string[] | undefined;
|
|
466
|
+
redact?: string[] | undefined;
|
|
467
|
+
} | undefined;
|
|
468
|
+
};
|
|
469
|
+
version: number;
|
|
470
|
+
generatedAt: number;
|
|
471
|
+
}>;
|
|
472
|
+
/**
|
|
473
|
+
* Evidence counts captured with a run so the agent can compare runs over time
|
|
474
|
+
* ("console errors went 0→3 since last run"). All optional: a run records only what it observed.
|
|
475
|
+
*/
|
|
476
|
+
export declare const RunEvidenceSchema: z.ZodObject<{
|
|
477
|
+
consoleErrors: z.ZodOptional<z.ZodNumber>;
|
|
478
|
+
networkErrors: z.ZodOptional<z.ZodNumber>;
|
|
479
|
+
driftSteps: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
}, "strip", z.ZodTypeAny, {
|
|
481
|
+
consoleErrors?: number | undefined;
|
|
482
|
+
networkErrors?: number | undefined;
|
|
483
|
+
driftSteps?: number | undefined;
|
|
484
|
+
}, {
|
|
485
|
+
consoleErrors?: number | undefined;
|
|
486
|
+
networkErrors?: number | undefined;
|
|
487
|
+
driftSteps?: number | undefined;
|
|
488
|
+
}>;
|
|
489
|
+
/** One persisted run outcome in .reticle/project.json. */
|
|
490
|
+
export declare const RunRecordSchema: z.ZodObject<{
|
|
491
|
+
kind: z.ZodNativeEnum<{
|
|
492
|
+
readonly FLOW_REPLAY: "flow_replay";
|
|
493
|
+
readonly MANUAL: "manual";
|
|
494
|
+
}>;
|
|
495
|
+
name: z.ZodString;
|
|
496
|
+
status: z.ZodNativeEnum<{
|
|
497
|
+
readonly PASS: "pass";
|
|
498
|
+
readonly DRIFT: "drift";
|
|
499
|
+
readonly ERROR: "error";
|
|
500
|
+
readonly FAIL: "fail";
|
|
501
|
+
}>;
|
|
502
|
+
at: z.ZodNumber;
|
|
503
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
504
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
505
|
+
consoleErrors: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
networkErrors: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
driftSteps: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
}, "strip", z.ZodTypeAny, {
|
|
509
|
+
consoleErrors?: number | undefined;
|
|
510
|
+
networkErrors?: number | undefined;
|
|
511
|
+
driftSteps?: number | undefined;
|
|
512
|
+
}, {
|
|
513
|
+
consoleErrors?: number | undefined;
|
|
514
|
+
networkErrors?: number | undefined;
|
|
515
|
+
driftSteps?: number | undefined;
|
|
516
|
+
}>>;
|
|
517
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
518
|
+
}, "strip", z.ZodTypeAny, {
|
|
519
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
520
|
+
kind: "flow_replay" | "manual";
|
|
521
|
+
at: number;
|
|
522
|
+
name: string;
|
|
523
|
+
durationMs?: number | undefined;
|
|
524
|
+
evidence?: {
|
|
525
|
+
consoleErrors?: number | undefined;
|
|
526
|
+
networkErrors?: number | undefined;
|
|
527
|
+
driftSteps?: number | undefined;
|
|
528
|
+
} | undefined;
|
|
529
|
+
summary?: string | undefined;
|
|
530
|
+
}, {
|
|
531
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
532
|
+
kind: "flow_replay" | "manual";
|
|
533
|
+
at: number;
|
|
534
|
+
name: string;
|
|
535
|
+
durationMs?: number | undefined;
|
|
536
|
+
evidence?: {
|
|
537
|
+
consoleErrors?: number | undefined;
|
|
538
|
+
networkErrors?: number | undefined;
|
|
539
|
+
driftSteps?: number | undefined;
|
|
540
|
+
} | undefined;
|
|
541
|
+
summary?: string | undefined;
|
|
542
|
+
}>;
|
|
543
|
+
export type RunRecord = z.infer<typeof RunRecordSchema>;
|
|
544
|
+
/** The optional learned map of the app (known flow/route names). */
|
|
545
|
+
export declare const ProjectLearnedSchema: z.ZodObject<{
|
|
546
|
+
flows: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
547
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
548
|
+
}, "strip", z.ZodTypeAny, {
|
|
549
|
+
flows?: string[] | undefined;
|
|
550
|
+
routes?: string[] | undefined;
|
|
551
|
+
}, {
|
|
552
|
+
flows?: string[] | undefined;
|
|
553
|
+
routes?: string[] | undefined;
|
|
554
|
+
}>;
|
|
555
|
+
export type ProjectLearned = z.infer<typeof ProjectLearnedSchema>;
|
|
556
|
+
/** The on-disk project.json envelope: versioned learned-map + chronological runs. */
|
|
557
|
+
export declare const ProjectFileSchema: z.ZodObject<{
|
|
558
|
+
version: z.ZodNumber;
|
|
559
|
+
learned: z.ZodOptional<z.ZodObject<{
|
|
560
|
+
flows: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
561
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
562
|
+
}, "strip", z.ZodTypeAny, {
|
|
563
|
+
flows?: string[] | undefined;
|
|
564
|
+
routes?: string[] | undefined;
|
|
565
|
+
}, {
|
|
566
|
+
flows?: string[] | undefined;
|
|
567
|
+
routes?: string[] | undefined;
|
|
568
|
+
}>>;
|
|
569
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
570
|
+
kind: z.ZodNativeEnum<{
|
|
571
|
+
readonly FLOW_REPLAY: "flow_replay";
|
|
572
|
+
readonly MANUAL: "manual";
|
|
573
|
+
}>;
|
|
574
|
+
name: z.ZodString;
|
|
575
|
+
status: z.ZodNativeEnum<{
|
|
576
|
+
readonly PASS: "pass";
|
|
577
|
+
readonly DRIFT: "drift";
|
|
578
|
+
readonly ERROR: "error";
|
|
579
|
+
readonly FAIL: "fail";
|
|
580
|
+
}>;
|
|
581
|
+
at: z.ZodNumber;
|
|
582
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
583
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
584
|
+
consoleErrors: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
networkErrors: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
driftSteps: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
}, "strip", z.ZodTypeAny, {
|
|
588
|
+
consoleErrors?: number | undefined;
|
|
589
|
+
networkErrors?: number | undefined;
|
|
590
|
+
driftSteps?: number | undefined;
|
|
591
|
+
}, {
|
|
592
|
+
consoleErrors?: number | undefined;
|
|
593
|
+
networkErrors?: number | undefined;
|
|
594
|
+
driftSteps?: number | undefined;
|
|
595
|
+
}>>;
|
|
596
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
}, "strip", z.ZodTypeAny, {
|
|
598
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
599
|
+
kind: "flow_replay" | "manual";
|
|
600
|
+
at: number;
|
|
601
|
+
name: string;
|
|
602
|
+
durationMs?: number | undefined;
|
|
603
|
+
evidence?: {
|
|
604
|
+
consoleErrors?: number | undefined;
|
|
605
|
+
networkErrors?: number | undefined;
|
|
606
|
+
driftSteps?: number | undefined;
|
|
607
|
+
} | undefined;
|
|
608
|
+
summary?: string | undefined;
|
|
609
|
+
}, {
|
|
610
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
611
|
+
kind: "flow_replay" | "manual";
|
|
612
|
+
at: number;
|
|
613
|
+
name: string;
|
|
614
|
+
durationMs?: number | undefined;
|
|
615
|
+
evidence?: {
|
|
616
|
+
consoleErrors?: number | undefined;
|
|
617
|
+
networkErrors?: number | undefined;
|
|
618
|
+
driftSteps?: number | undefined;
|
|
619
|
+
} | undefined;
|
|
620
|
+
summary?: string | undefined;
|
|
621
|
+
}>, "many">;
|
|
622
|
+
}, "strip", z.ZodTypeAny, {
|
|
623
|
+
runs: {
|
|
624
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
625
|
+
kind: "flow_replay" | "manual";
|
|
626
|
+
at: number;
|
|
627
|
+
name: string;
|
|
628
|
+
durationMs?: number | undefined;
|
|
629
|
+
evidence?: {
|
|
630
|
+
consoleErrors?: number | undefined;
|
|
631
|
+
networkErrors?: number | undefined;
|
|
632
|
+
driftSteps?: number | undefined;
|
|
633
|
+
} | undefined;
|
|
634
|
+
summary?: string | undefined;
|
|
635
|
+
}[];
|
|
636
|
+
version: number;
|
|
637
|
+
learned?: {
|
|
638
|
+
flows?: string[] | undefined;
|
|
639
|
+
routes?: string[] | undefined;
|
|
640
|
+
} | undefined;
|
|
641
|
+
}, {
|
|
642
|
+
runs: {
|
|
643
|
+
status: "pass" | "drift" | "error" | "fail";
|
|
644
|
+
kind: "flow_replay" | "manual";
|
|
645
|
+
at: number;
|
|
646
|
+
name: string;
|
|
647
|
+
durationMs?: number | undefined;
|
|
648
|
+
evidence?: {
|
|
649
|
+
consoleErrors?: number | undefined;
|
|
650
|
+
networkErrors?: number | undefined;
|
|
651
|
+
driftSteps?: number | undefined;
|
|
652
|
+
} | undefined;
|
|
653
|
+
summary?: string | undefined;
|
|
654
|
+
}[];
|
|
655
|
+
version: number;
|
|
656
|
+
learned?: {
|
|
657
|
+
flows?: string[] | undefined;
|
|
658
|
+
routes?: string[] | undefined;
|
|
659
|
+
} | undefined;
|
|
660
|
+
}>;
|
|
661
|
+
export type ProjectFile = z.infer<typeof ProjectFileSchema>;
|
|
662
|
+
/**
|
|
663
|
+
* The structured annotation REQUEST a human/agent attaches to the live
|
|
664
|
+
* recording (the server-side `reticle_annotate` tool). A discriminated union over the four shipped
|
|
665
|
+
* AnnotationKind values. Each variant carries exactly the fields its compilation needs.
|
|
666
|
+
*
|
|
667
|
+
* FIRST CUT boundary (do NOT remove): only this structured union is accepted. A free
|
|
668
|
+
* NATURAL-LANGUAGE annotation (e.g. the string "the diff should appear") is REJECTED by this
|
|
669
|
+
* schema — never guessed/compiled into a predicate. Free NL → predicate compilation is explicitly
|
|
670
|
+
* FUTURE; a `safeParse` of a bare string returns success:false, which the tool maps
|
|
671
|
+
* to AnnotationErrorCode.UNKNOWN_KIND. No NL parser exists or is faked here.
|
|
672
|
+
*/
|
|
673
|
+
export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
674
|
+
kind: z.ZodLiteral<"assert-signal">;
|
|
675
|
+
name: z.ZodString;
|
|
676
|
+
dataMatches: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
677
|
+
}, "strip", z.ZodTypeAny, {
|
|
678
|
+
kind: "assert-signal";
|
|
679
|
+
name: string;
|
|
680
|
+
dataMatches?: Record<string, unknown> | undefined;
|
|
681
|
+
}, {
|
|
682
|
+
kind: "assert-signal";
|
|
683
|
+
name: string;
|
|
684
|
+
dataMatches?: Record<string, unknown> | undefined;
|
|
685
|
+
}>, z.ZodObject<{
|
|
686
|
+
kind: z.ZodLiteral<"assert-visible">;
|
|
687
|
+
testid: z.ZodString;
|
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
|
689
|
+
testid: string;
|
|
690
|
+
kind: "assert-visible";
|
|
691
|
+
}, {
|
|
692
|
+
testid: string;
|
|
693
|
+
kind: "assert-visible";
|
|
694
|
+
}>, z.ZodObject<{
|
|
695
|
+
kind: z.ZodLiteral<"assert-state">;
|
|
696
|
+
statePath: z.ZodString;
|
|
697
|
+
store: z.ZodOptional<z.ZodString>;
|
|
698
|
+
equals: z.ZodOptional<z.ZodUnknown>;
|
|
699
|
+
}, "strip", z.ZodTypeAny, {
|
|
700
|
+
kind: "assert-state";
|
|
701
|
+
statePath: string;
|
|
702
|
+
store?: string | undefined;
|
|
703
|
+
equals?: unknown;
|
|
704
|
+
}, {
|
|
705
|
+
kind: "assert-state";
|
|
706
|
+
statePath: string;
|
|
707
|
+
store?: string | undefined;
|
|
708
|
+
equals?: unknown;
|
|
709
|
+
}>, z.ZodObject<{
|
|
710
|
+
kind: z.ZodLiteral<"mark-dynamic">;
|
|
711
|
+
testid: z.ZodString;
|
|
712
|
+
}, "strip", z.ZodTypeAny, {
|
|
713
|
+
testid: string;
|
|
714
|
+
kind: "mark-dynamic";
|
|
715
|
+
}, {
|
|
716
|
+
testid: string;
|
|
717
|
+
kind: "mark-dynamic";
|
|
718
|
+
}>, z.ZodObject<{
|
|
719
|
+
kind: z.ZodLiteral<"success-state">;
|
|
720
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
721
|
+
testid: z.ZodOptional<z.ZodString>;
|
|
722
|
+
statePath: z.ZodOptional<z.ZodString>;
|
|
723
|
+
store: z.ZodOptional<z.ZodString>;
|
|
724
|
+
equals: z.ZodOptional<z.ZodUnknown>;
|
|
725
|
+
hold: z.ZodOptional<z.ZodBoolean>;
|
|
726
|
+
net: z.ZodOptional<z.ZodObject<{
|
|
727
|
+
method: z.ZodOptional<z.ZodString>;
|
|
728
|
+
urlContains: z.ZodOptional<z.ZodString>;
|
|
729
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
730
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
731
|
+
}, "strip", z.ZodTypeAny, {
|
|
732
|
+
status?: number | undefined;
|
|
733
|
+
method?: string | undefined;
|
|
734
|
+
urlContains?: string | undefined;
|
|
735
|
+
count?: number | undefined;
|
|
736
|
+
}, {
|
|
737
|
+
status?: number | undefined;
|
|
738
|
+
method?: string | undefined;
|
|
739
|
+
urlContains?: string | undefined;
|
|
740
|
+
count?: number | undefined;
|
|
741
|
+
}>>;
|
|
742
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
743
|
+
level: z.ZodOptional<z.ZodString>;
|
|
744
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
745
|
+
}, "strip", z.ZodTypeAny, {
|
|
746
|
+
level?: string | undefined;
|
|
747
|
+
absent?: boolean | undefined;
|
|
748
|
+
}, {
|
|
749
|
+
level?: string | undefined;
|
|
750
|
+
absent?: boolean | undefined;
|
|
751
|
+
}>>;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
kind: "success-state";
|
|
754
|
+
testid?: string | undefined;
|
|
755
|
+
signal?: string | undefined;
|
|
756
|
+
net?: {
|
|
757
|
+
status?: number | undefined;
|
|
758
|
+
method?: string | undefined;
|
|
759
|
+
urlContains?: string | undefined;
|
|
760
|
+
count?: number | undefined;
|
|
761
|
+
} | undefined;
|
|
762
|
+
console?: {
|
|
763
|
+
level?: string | undefined;
|
|
764
|
+
absent?: boolean | undefined;
|
|
765
|
+
} | undefined;
|
|
766
|
+
store?: string | undefined;
|
|
767
|
+
equals?: unknown;
|
|
768
|
+
hold?: boolean | undefined;
|
|
769
|
+
statePath?: string | undefined;
|
|
770
|
+
}, {
|
|
771
|
+
kind: "success-state";
|
|
772
|
+
testid?: string | undefined;
|
|
773
|
+
signal?: string | undefined;
|
|
774
|
+
net?: {
|
|
775
|
+
status?: number | undefined;
|
|
776
|
+
method?: string | undefined;
|
|
777
|
+
urlContains?: string | undefined;
|
|
778
|
+
count?: number | undefined;
|
|
779
|
+
} | undefined;
|
|
780
|
+
console?: {
|
|
781
|
+
level?: string | undefined;
|
|
782
|
+
absent?: boolean | undefined;
|
|
783
|
+
} | undefined;
|
|
784
|
+
store?: string | undefined;
|
|
785
|
+
equals?: unknown;
|
|
786
|
+
hold?: boolean | undefined;
|
|
787
|
+
statePath?: string | undefined;
|
|
788
|
+
}>, z.ZodObject<{
|
|
789
|
+
kind: z.ZodLiteral<"intent">;
|
|
790
|
+
text: z.ZodString;
|
|
791
|
+
}, "strip", z.ZodTypeAny, {
|
|
792
|
+
text: string;
|
|
793
|
+
kind: "intent";
|
|
794
|
+
}, {
|
|
795
|
+
text: string;
|
|
796
|
+
kind: "intent";
|
|
797
|
+
}>]>;
|
|
798
|
+
export type Annotation = z.infer<typeof AnnotationSchema>;
|
|
799
|
+
/**
|
|
800
|
+
* The reticle_annotate result envelope (discriminated on `ok`, never a free
|
|
801
|
+
* string). On success it names the target (step|flow) + the human compiled-predicate text the
|
|
802
|
+
* recorder confirmation strip shows ("will assert signal diff:shown").
|
|
803
|
+
*/
|
|
804
|
+
export type AnnotateResult = {
|
|
805
|
+
ok: true;
|
|
806
|
+
target: AnnotationTarget;
|
|
807
|
+
compiled: string;
|
|
808
|
+
} | {
|
|
809
|
+
ok: false;
|
|
810
|
+
code: AnnotationErrorCode;
|
|
811
|
+
};
|
|
812
|
+
/**
|
|
813
|
+
* The patch a compiled annotation produces. The caller applies it to the
|
|
814
|
+
* AnnotationStore: a step.expect (assert-*), a flow.dynamic[] entry (mark-dynamic), or flow.success
|
|
815
|
+
* (success-state). All optional; exactly the fields the compiled kind needs are set.
|
|
816
|
+
*/
|
|
817
|
+
export interface AnnotatePatch {
|
|
818
|
+
/** index of the step whose .expect is set (assert-signal / assert-visible). */
|
|
819
|
+
stepIndex?: number;
|
|
820
|
+
stepExpect?: FlowExpect;
|
|
821
|
+
/** the testid pushed into flow.dynamic[] (mark-dynamic). */
|
|
822
|
+
dynamicAdd?: string;
|
|
823
|
+
/** flow.success (success-state). */
|
|
824
|
+
success?: FlowExpect;
|
|
825
|
+
/** flow.intent (intent) — the business goal this flow exists to verify. */
|
|
826
|
+
intent?: string;
|
|
827
|
+
}
|
|
828
|
+
/** Pure compiler output: the result envelope + (on ok) the patch to apply. */
|
|
829
|
+
export interface AnnotateOutcome {
|
|
830
|
+
result: AnnotateResult;
|
|
831
|
+
patch?: AnnotatePatch;
|
|
832
|
+
}
|
|
833
|
+
//# sourceMappingURL=types.d.ts.map
|