@reticlehq/core 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activation-entry.d.ts +9 -0
- package/dist/activation-entry.js +9 -0
- package/dist/artifacts/drive-script.d.ts +84 -1217
- package/dist/artifacts/drive-script.js +1 -1
- package/dist/artifacts/flow-constants.d.ts +15 -0
- package/dist/artifacts/flow-constants.js +15 -0
- package/dist/artifacts/flow-expect-flat.d.ts +8 -192
- package/dist/artifacts/flow-expect-flat.js +2 -2
- package/dist/artifacts/flow-results.d.ts +26 -0
- package/dist/artifacts/flow-types.d.ts +212 -2295
- package/dist/artifacts/flow-types.js +14 -2
- package/dist/artifacts/harness-credits.d.ts +6 -3
- package/dist/artifacts/harness-credits.js +9 -6
- package/dist/artifacts/harness-map.d.ts +8 -69
- package/dist/artifacts/harness-map.js +1 -1
- package/dist/artifacts/hud-notices.d.ts +8 -82
- package/dist/artifacts/hud-notices.js +1 -1
- package/dist/artifacts/impact.d.ts +104 -1665
- package/dist/artifacts/impact.js +38 -21
- package/dist/artifacts/journal.d.ts +15 -231
- package/dist/artifacts/journal.js +15 -2
- package/dist/artifacts/prompt-context.d.ts +7 -33
- package/dist/artifacts/prompt-context.js +15 -4
- package/dist/artifacts/screenshot-upload.d.ts +3 -26
- package/dist/artifacts/screenshot-upload.js +1 -1
- package/dist/graph/app-graph.d.ts +137 -0
- package/dist/graph/app-graph.js +498 -0
- package/dist/hooks/hook-events.d.ts +15 -171
- package/dist/hooks/hook-events.js +1 -1
- package/dist/hud-entry.js +1 -1
- package/dist/identity/checkout.d.ts +41 -0
- package/dist/identity/checkout.js +118 -0
- package/dist/identity/state-dir.d.ts +23 -0
- package/dist/identity/state-dir.js +43 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/onboarding.d.ts +23 -52
- package/dist/onboarding.js +20 -1
- package/dist/registry/daemon-registry.d.ts +2 -14
- package/dist/registry/daemon-registry.js +1 -1
- package/dist/registry/dev-server-registry.d.ts +2 -31
- package/dist/registry/dev-server-registry.js +1 -1
- package/dist/registry/project-registry.d.ts +4 -32
- package/dist/registry/project-registry.js +1 -1
- package/dist/schema/command-message.json +65 -68
- package/dist/schema/command-name.json +29 -33
- package/dist/schema/command-result.json +25 -30
- package/dist/schema/event-message.json +104 -101
- package/dist/schema/event-payloads.json +246 -108
- package/dist/schema/event-type.json +47 -48
- package/dist/schema/hello-message.json +150 -133
- package/dist/schema/reticle-event.json +98 -94
- package/dist/schema/reticle-message.json +338 -310
- package/dist/telemetry-bug.d.ts +4 -75
- package/dist/telemetry-bug.js +1 -1
- package/dist/telemetry-entry.d.ts +1 -1
- package/dist/telemetry-entry.js +1 -1
- package/dist/telemetry-feedback.d.ts +17 -91
- package/dist/telemetry-feedback.js +20 -1
- package/dist/telemetry-refusal.d.ts +4 -31
- package/dist/telemetry-refusal.js +1 -1
- package/dist/telemetry-session.d.ts +45 -624
- package/dist/telemetry-session.js +25 -12
- package/dist/telemetry-signals.d.ts +211 -86
- package/dist/telemetry-signals.js +100 -2
- package/dist/telemetry.d.ts +321 -1691
- package/dist/telemetry.js +72 -6
- package/dist/verdict/check-sentence.d.ts +34 -0
- package/dist/verdict/check-sentence.js +228 -0
- package/dist/verdict/compare-source.d.ts +1 -1
- package/dist/verdict/compare-source.js +1 -1
- package/dist/verdict/consequence.d.ts +15 -0
- package/dist/verdict/consequence.js +11 -0
- package/dist/verdict/disparity.d.ts +8 -56
- package/dist/verdict/disparity.js +1 -1
- package/dist/verdict/findings.d.ts +10 -0
- package/dist/verdict/findings.js +13 -0
- package/dist/verdict/instrumentation-coverage.d.ts +6 -37
- package/dist/verdict/instrumentation-coverage.js +15 -59
- package/dist/verdict/instrumentation-gap.d.ts +72 -0
- package/dist/verdict/instrumentation-gap.js +64 -0
- package/dist/verdict/intent.d.ts +25 -224
- package/dist/verdict/intent.js +1 -1
- package/dist/verdict/predicate-tree.d.ts +2 -0
- package/dist/verdict/predicate-tree.js +16 -0
- package/dist/verdict/predicate.d.ts +3 -2
- package/dist/verdict/predicate.js +107 -16
- package/dist/verdict/property-assertion.d.ts +23 -101
- package/dist/verdict/property-assertion.js +1 -1
- package/dist/verdict/run-report.d.ts +71 -0
- package/dist/verdict/run-report.js +53 -0
- package/dist/verdict/security.d.ts +48 -2
- package/dist/verdict/security.js +185 -18
- package/dist/verdict/verification-run.d.ts +124 -1623
- package/dist/verdict/verification-run.js +37 -6
- package/dist/verdict/verify-progress.d.ts +22 -64
- package/dist/verdict/verify-progress.js +1 -1
- package/dist/wire/constants/constants.d.ts +56 -141
- package/dist/wire/constants/constants.js +64 -144
- package/dist/wire/constants/discovery.d.ts +4 -4
- package/dist/wire/constants/discovery.js +4 -4
- package/dist/wire/constants/event-types.d.ts +37 -1
- package/dist/wire/constants/event-types.js +35 -1
- package/dist/wire/constants/hud-controls.js +0 -2
- package/dist/wire/constants/hud-use.d.ts +4 -0
- package/dist/wire/constants/hud-use.js +4 -0
- package/dist/wire/constants/mcp-wire.d.ts +16 -0
- package/dist/wire/constants/mcp-wire.js +16 -0
- package/dist/wire/constants/response-body-reason.d.ts +19 -0
- package/dist/wire/constants/response-body-reason.js +18 -0
- package/dist/wire/constants/reticle-env.d.ts +140 -0
- package/dist/wire/constants/reticle-env.js +140 -0
- package/dist/wire/constants/session-constants.d.ts +11 -0
- package/dist/wire/constants/session-constants.js +11 -0
- package/dist/wire/event-payloads.d.ts +173 -629
- package/dist/wire/event-payloads.js +107 -23
- package/dist/wire/event-priority.js +1 -0
- package/dist/wire/messages.d.ts +90 -713
- package/dist/wire/messages.js +19 -3
- package/dist/wire/narrow.d.ts +6 -0
- package/dist/wire/narrow.js +26 -0
- package/dist/wire/next-step.d.ts +50 -0
- package/dist/wire/next-step.js +37 -0
- package/dist/wire/platform-link.d.ts +7 -0
- package/dist/wire/platform-link.js +14 -8
- package/dist/wire/production/activation-ticket.d.ts +64 -0
- package/dist/wire/production/activation-ticket.js +148 -0
- package/dist/wire/production/hello-mode.d.ts +35 -0
- package/dist/wire/production/hello-mode.js +32 -0
- package/dist/wire/production/production-policy.d.ts +92 -0
- package/dist/wire/production/production-policy.js +133 -0
- package/dist/wire/tool-names.d.ts +2 -0
- package/dist/wire/tool-names.js +2 -0
- package/dist/wire/types.d.ts +102 -700
- package/dist/wire/types.js +5 -5
- package/dist/words/upgrade.d.ts +3 -13
- package/dist/words/upgrade.js +1 -1
- package/package.json +7 -4
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Daemon-side only: the HUD draws a plan from a flat view of it (`PlanView`), never this schema.
|
|
16
16
|
*/
|
|
17
|
-
import
|
|
17
|
+
import * as z from 'zod';
|
|
18
18
|
import { PredicateSchema } from '../verdict/predicate.js';
|
|
19
19
|
export const ScriptStepKind = {
|
|
20
20
|
REPLAY: 'replay',
|
|
@@ -104,6 +104,15 @@ export type AnchorKind = (typeof AnchorKind)[keyof typeof AnchorKind];
|
|
|
104
104
|
* here" marker that a human/self-healing pass re-binds. Satisfies the anchor min(1).
|
|
105
105
|
*/
|
|
106
106
|
export declare const DEGRADED_ANCHOR_ROLE = "unresolved";
|
|
107
|
+
/**
|
|
108
|
+
* The role a document-key press (Escape, Tab, a modifier shortcut) is saved under (#1559).
|
|
109
|
+
*
|
|
110
|
+
* Such a press ran live against no element: `act` resolves it to the document and dispatches it with
|
|
111
|
+
* no ref. It has nothing to anchor to, and it needs nothing, so the saved step carries this nameless
|
|
112
|
+
* ROLE anchor, not the degraded placeholder, and replay dispatches it exactly as it ran. Only a press
|
|
113
|
+
* of a document key is read this way; on any other action the anchor addresses nothing.
|
|
114
|
+
*/
|
|
115
|
+
export declare const DOCUMENT_ANCHOR_ROLE = "document";
|
|
107
116
|
/**
|
|
108
117
|
* The JSON replacer every flow is written and sent with: a predicate flag at its default is left
|
|
109
118
|
* out. An older platform's schema rejects a key it does not know (`ignoreCase` on a text check was
|
|
@@ -234,6 +243,12 @@ export declare const DriftReason: {
|
|
|
234
243
|
* faster endpoint; the fix for SIGNAL_NOT_OBSERVED is the handler behind the action.
|
|
235
244
|
*/
|
|
236
245
|
readonly NET_STILL_IN_FLIGHT: "net_still_in_flight";
|
|
246
|
+
/**
|
|
247
|
+
* The step's action reached a target no person could have clicked: covered, of no size, or off
|
|
248
|
+
* screen after scrolling. Synthetic dispatch reaches it all the same, so the consequence can hold.
|
|
249
|
+
* Undecided, as the live act answers it, never a pass and never the app's failure.
|
|
250
|
+
*/
|
|
251
|
+
readonly TARGET_UNREACHABLE: "target_unreachable";
|
|
237
252
|
};
|
|
238
253
|
export type DriftReason = (typeof DriftReason)[keyof typeof DriftReason];
|
|
239
254
|
/**
|
|
@@ -116,6 +116,15 @@ export const AnchorKind = {
|
|
|
116
116
|
* here" marker that a human/self-healing pass re-binds. Satisfies the anchor min(1).
|
|
117
117
|
*/
|
|
118
118
|
export const DEGRADED_ANCHOR_ROLE = 'unresolved';
|
|
119
|
+
/**
|
|
120
|
+
* The role a document-key press (Escape, Tab, a modifier shortcut) is saved under (#1559).
|
|
121
|
+
*
|
|
122
|
+
* Such a press ran live against no element: `act` resolves it to the document and dispatches it with
|
|
123
|
+
* no ref. It has nothing to anchor to, and it needs nothing, so the saved step carries this nameless
|
|
124
|
+
* ROLE anchor, not the degraded placeholder, and replay dispatches it exactly as it ran. Only a press
|
|
125
|
+
* of a document key is read this way; on any other action the anchor addresses nothing.
|
|
126
|
+
*/
|
|
127
|
+
export const DOCUMENT_ANCHOR_ROLE = 'document';
|
|
119
128
|
/**
|
|
120
129
|
* The JSON replacer every flow is written and sent with: a predicate flag at its default is left
|
|
121
130
|
* out. An older platform's schema rejects a key it does not know (`ignoreCase` on a text check was
|
|
@@ -246,6 +255,12 @@ export const DriftReason = {
|
|
|
246
255
|
* faster endpoint; the fix for SIGNAL_NOT_OBSERVED is the handler behind the action.
|
|
247
256
|
*/
|
|
248
257
|
NET_STILL_IN_FLIGHT: 'net_still_in_flight',
|
|
258
|
+
/**
|
|
259
|
+
* The step's action reached a target no person could have clicked: covered, of no size, or off
|
|
260
|
+
* screen after scrolling. Synthetic dispatch reaches it all the same, so the consequence can hold.
|
|
261
|
+
* Undecided, as the live act answers it, never a pass and never the app's failure.
|
|
262
|
+
*/
|
|
263
|
+
TARGET_UNREACHABLE: 'target_unreachable',
|
|
249
264
|
};
|
|
250
265
|
/**
|
|
251
266
|
* Did the step's anchor resolve and its action RUN, leaving only the declared consequence unmet?
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* in memory is lifted. That is what makes the migration safe to ship to people whose flows are
|
|
11
11
|
* committed to a repository they share.
|
|
12
12
|
*/
|
|
13
|
-
import
|
|
13
|
+
import * as z from 'zod';
|
|
14
14
|
import type { Predicate } from '../verdict/predicate.js';
|
|
15
15
|
/**
|
|
16
16
|
* A post-condition a step asserts (compiled from a structured annotation; optional).
|
|
@@ -22,225 +22,41 @@ import type { Predicate } from '../verdict/predicate.js';
|
|
|
22
22
|
* flow then replays green against nothing, having proved no real regression.
|
|
23
23
|
*/
|
|
24
24
|
export declare const FlowExpectSchema: z.ZodObject<{
|
|
25
|
-
/**
|
|
26
|
-
* The route the step must have reached — the consequence of a NAVIGATION.
|
|
27
|
-
*
|
|
28
|
-
* Absent until now, and its absence was not a corner case: navigation is one of the commonest
|
|
29
|
-
* journeys there is, and every route-asserted drive saved a flow that could never go red. Found
|
|
30
|
-
* by driving a real app, where `act_and_wait { until: { kind: "route" } }` returned
|
|
31
|
-
* `verified: "yes"` and the flow saved from that same drive graded `assertion-free`.
|
|
32
|
-
*
|
|
33
|
-
* Additive and optional, so a flow file written before it still parses and FLOW_FILE_VERSION
|
|
34
|
-
* stays 1 — the same treatment `signalData` and `signalCount` had.
|
|
35
|
-
*/
|
|
36
25
|
route: z.ZodOptional<z.ZodObject<{
|
|
37
26
|
pathname: z.ZodOptional<z.ZodString>;
|
|
38
27
|
contains: z.ZodOptional<z.ZodString>;
|
|
39
|
-
},
|
|
40
|
-
contains?: string | undefined;
|
|
41
|
-
pathname?: string | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
contains?: string | undefined;
|
|
44
|
-
pathname?: string | undefined;
|
|
45
|
-
}>>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
46
29
|
signal: z.ZodOptional<z.ZodString>;
|
|
47
|
-
/**
|
|
48
|
-
* Optional payload shape an `assert-signal` annotation requires the signal
|
|
49
|
-
* to match (the predicate DSL's signal.dataMatches). Additive/optional — a flow file with a
|
|
50
|
-
* bare `signal` still parses, and the on-disk version stays FLOW_FILE_VERSION 1.
|
|
51
|
-
*/
|
|
52
30
|
signalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
-
/**
|
|
54
|
-
* Exact number of times the signal must have fired — the signal-side twin of `net.count`, and the
|
|
55
|
-
* only way a saved flow can keep a cardinality the agent actually asserted. Without it a
|
|
56
|
-
* `count: 1` drive would be recorded as bare presence, which is a strictly WEAKER claim than the
|
|
57
|
-
* one made: the replayed flow then goes green on the double-fire it was recorded to catch.
|
|
58
|
-
* Additive/optional — a flow file with a bare `signal` still parses, and FLOW_FILE_VERSION stays 1.
|
|
59
|
-
*/
|
|
60
31
|
signalCount: z.ZodOptional<z.ZodNumber>;
|
|
61
32
|
net: z.ZodOptional<z.ZodObject<{
|
|
62
33
|
method: z.ZodOptional<z.ZodString>;
|
|
63
34
|
urlContains: z.ZodOptional<z.ZodString>;
|
|
64
35
|
status: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
/**
|
|
66
|
-
* Exact number of matching requests since the action — turns presence into a cardinality
|
|
67
|
-
* assertion. Catches the double-submit / useEffect-double-fire / retry-storm regression class:
|
|
68
|
-
* the request fired (presence passes) but fired the WRONG number of times. Omit = presence (≥1).
|
|
69
|
-
*/
|
|
70
36
|
count: z.ZodOptional<z.ZodNumber>;
|
|
71
|
-
},
|
|
72
|
-
status?: number | undefined;
|
|
73
|
-
method?: string | undefined;
|
|
74
|
-
urlContains?: string | undefined;
|
|
75
|
-
count?: number | undefined;
|
|
76
|
-
}, {
|
|
77
|
-
status?: number | undefined;
|
|
78
|
-
method?: string | undefined;
|
|
79
|
-
urlContains?: string | undefined;
|
|
80
|
-
count?: number | undefined;
|
|
81
|
-
}>>;
|
|
82
|
-
/**
|
|
83
|
-
* Console golden end-condition: assert the action logged (or, with absent:true, did NOT log) a
|
|
84
|
-
* console message at `level` (default 'error'). `absent:true` is the common case — "the action
|
|
85
|
-
* completed with a clean console" — catching the regression where an action throws a caught error
|
|
86
|
-
* / logs an uncaught rejection while the UI still renders fine (a presence check passes it).
|
|
87
|
-
*/
|
|
37
|
+
}, z.core.$strict>>;
|
|
88
38
|
console: z.ZodOptional<z.ZodObject<{
|
|
89
39
|
level: z.ZodOptional<z.ZodString>;
|
|
90
40
|
absent: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
-
},
|
|
92
|
-
level?: string | undefined;
|
|
93
|
-
absent?: boolean | undefined;
|
|
94
|
-
}, {
|
|
95
|
-
level?: string | undefined;
|
|
96
|
-
absent?: boolean | undefined;
|
|
97
|
-
}>>;
|
|
41
|
+
}, z.core.$strict>>;
|
|
98
42
|
element: z.ZodOptional<z.ZodObject<{
|
|
99
43
|
testid: z.ZodOptional<z.ZodString>;
|
|
100
44
|
role: z.ZodOptional<z.ZodString>;
|
|
101
45
|
name: z.ZodOptional<z.ZodString>;
|
|
102
|
-
},
|
|
103
|
-
testid?: string | undefined;
|
|
104
|
-
role?: string | undefined;
|
|
105
|
-
name?: string | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
testid?: string | undefined;
|
|
108
|
-
role?: string | undefined;
|
|
109
|
-
name?: string | undefined;
|
|
110
|
-
}>>;
|
|
111
|
-
/**
|
|
112
|
-
* Rendered text as an end-condition, using the shapes the assert surface already accepts.
|
|
113
|
-
*
|
|
114
|
-
* The gap this closes: an app with no testids, no `reticle.signal`, no registrable store and no
|
|
115
|
-
* network call on the interaction under test -- a discount price computed and rendered, a
|
|
116
|
-
* formatted total, a derived label -- could not produce an asserted flow AT ALL. Everything the
|
|
117
|
-
* vocabulary offered needed a channel that app does not have, so the only honest outcome was
|
|
118
|
-
* `assertion-free`, which is a permanent green (#811).
|
|
119
|
-
*
|
|
120
|
-
* Derived-DOM rendering is a large share of what actually breaks in a UI, and it was the share
|
|
121
|
-
* that could not be pinned.
|
|
122
|
-
*
|
|
123
|
-
* Classified PRESENCE, not consequence, and that is not a technicality: text is read from the
|
|
124
|
-
* DOM, so a locator healed to the wrong element can still satisfy it. It earns `presence-only`,
|
|
125
|
-
* which is a real grade above `assertion-free` and honestly below `signal`/`net`/`state`.
|
|
126
|
-
*/
|
|
46
|
+
}, z.core.$strict>>;
|
|
127
47
|
text: z.ZodOptional<z.ZodObject<{
|
|
128
48
|
contains: z.ZodString;
|
|
129
|
-
/** Narrow the search to a container, exactly as the `text` predicate's `scope` does. */
|
|
130
49
|
scope: z.ZodOptional<z.ZodString>;
|
|
131
|
-
/** Assert the text is GONE — the regression check for a cleared error or a dismissed toast. */
|
|
132
50
|
absent: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
-
/** Require the match to be visible, not merely present in the DOM. */
|
|
134
51
|
visible: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
},
|
|
136
|
-
contains: string;
|
|
137
|
-
visible?: boolean | undefined;
|
|
138
|
-
scope?: string | undefined;
|
|
139
|
-
absent?: boolean | undefined;
|
|
140
|
-
}, {
|
|
141
|
-
contains: string;
|
|
142
|
-
visible?: boolean | undefined;
|
|
143
|
-
scope?: string | undefined;
|
|
144
|
-
absent?: boolean | undefined;
|
|
145
|
-
}>>;
|
|
146
|
-
/**
|
|
147
|
-
* Assert a registered store's value — the source of truth no DOM/network read can reach. Compiles
|
|
148
|
-
* to the predicate engine's `state` predicate. Additive/optional — a flow without it still parses
|
|
149
|
-
* and the on-disk version stays FLOW_FILE_VERSION 1. `equals` accepts a literal, omitted = presence,
|
|
150
|
-
* or a `{ $gte | $contains | $length }` operator pattern.
|
|
151
|
-
*/
|
|
52
|
+
}, z.core.$strict>>;
|
|
152
53
|
state: z.ZodOptional<z.ZodObject<{
|
|
153
54
|
store: z.ZodOptional<z.ZodString>;
|
|
154
55
|
path: z.ZodString;
|
|
155
56
|
equals: z.ZodOptional<z.ZodUnknown>;
|
|
156
|
-
/**
|
|
157
|
-
* Treat this as an INVARIANT that must still hold AFTER the action settles, rather than a
|
|
158
|
-
* condition to wait for. Set it for a blast-radius check ("this unrelated path must NOT have
|
|
159
|
-
* moved") — without it a wait-until-true read passes before an over-reaching side-effect lands.
|
|
160
|
-
*/
|
|
161
57
|
hold: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
hold?: boolean | undefined;
|
|
165
|
-
store?: string | undefined;
|
|
166
|
-
equals?: unknown;
|
|
167
|
-
}, {
|
|
168
|
-
path: string;
|
|
169
|
-
hold?: boolean | undefined;
|
|
170
|
-
store?: string | undefined;
|
|
171
|
-
equals?: unknown;
|
|
172
|
-
}>>;
|
|
173
|
-
}, "strict", z.ZodTypeAny, {
|
|
174
|
-
signal?: string | undefined;
|
|
175
|
-
net?: {
|
|
176
|
-
status?: number | undefined;
|
|
177
|
-
method?: string | undefined;
|
|
178
|
-
urlContains?: string | undefined;
|
|
179
|
-
count?: number | undefined;
|
|
180
|
-
} | undefined;
|
|
181
|
-
state?: {
|
|
182
|
-
path: string;
|
|
183
|
-
hold?: boolean | undefined;
|
|
184
|
-
store?: string | undefined;
|
|
185
|
-
equals?: unknown;
|
|
186
|
-
} | undefined;
|
|
187
|
-
element?: {
|
|
188
|
-
testid?: string | undefined;
|
|
189
|
-
role?: string | undefined;
|
|
190
|
-
name?: string | undefined;
|
|
191
|
-
} | undefined;
|
|
192
|
-
text?: {
|
|
193
|
-
contains: string;
|
|
194
|
-
visible?: boolean | undefined;
|
|
195
|
-
scope?: string | undefined;
|
|
196
|
-
absent?: boolean | undefined;
|
|
197
|
-
} | undefined;
|
|
198
|
-
route?: {
|
|
199
|
-
contains?: string | undefined;
|
|
200
|
-
pathname?: string | undefined;
|
|
201
|
-
} | undefined;
|
|
202
|
-
console?: {
|
|
203
|
-
level?: string | undefined;
|
|
204
|
-
absent?: boolean | undefined;
|
|
205
|
-
} | undefined;
|
|
206
|
-
signalData?: Record<string, unknown> | undefined;
|
|
207
|
-
signalCount?: number | undefined;
|
|
208
|
-
}, {
|
|
209
|
-
signal?: string | undefined;
|
|
210
|
-
net?: {
|
|
211
|
-
status?: number | undefined;
|
|
212
|
-
method?: string | undefined;
|
|
213
|
-
urlContains?: string | undefined;
|
|
214
|
-
count?: number | undefined;
|
|
215
|
-
} | undefined;
|
|
216
|
-
state?: {
|
|
217
|
-
path: string;
|
|
218
|
-
hold?: boolean | undefined;
|
|
219
|
-
store?: string | undefined;
|
|
220
|
-
equals?: unknown;
|
|
221
|
-
} | undefined;
|
|
222
|
-
element?: {
|
|
223
|
-
testid?: string | undefined;
|
|
224
|
-
role?: string | undefined;
|
|
225
|
-
name?: string | undefined;
|
|
226
|
-
} | undefined;
|
|
227
|
-
text?: {
|
|
228
|
-
contains: string;
|
|
229
|
-
visible?: boolean | undefined;
|
|
230
|
-
scope?: string | undefined;
|
|
231
|
-
absent?: boolean | undefined;
|
|
232
|
-
} | undefined;
|
|
233
|
-
route?: {
|
|
234
|
-
contains?: string | undefined;
|
|
235
|
-
pathname?: string | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
console?: {
|
|
238
|
-
level?: string | undefined;
|
|
239
|
-
absent?: boolean | undefined;
|
|
240
|
-
} | undefined;
|
|
241
|
-
signalData?: Record<string, unknown> | undefined;
|
|
242
|
-
signalCount?: number | undefined;
|
|
243
|
-
}>;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
244
60
|
export type FlowExpect = z.infer<typeof FlowExpectSchema>;
|
|
245
61
|
/**
|
|
246
62
|
* Lift a flat `FlowExpect` into the predicate a current file stores directly.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* in memory is lifted. That is what makes the migration safe to ship to people whose flows are
|
|
11
11
|
* committed to a repository they share.
|
|
12
12
|
*/
|
|
13
|
-
import
|
|
13
|
+
import * as z from 'zod';
|
|
14
14
|
import { PredicateKind } from '../verdict/consequence.js';
|
|
15
15
|
/**
|
|
16
16
|
* A post-condition a step asserts (compiled from a structured annotation; optional).
|
|
@@ -43,7 +43,7 @@ export const FlowExpectSchema = z
|
|
|
43
43
|
* to match (the predicate DSL's signal.dataMatches). Additive/optional — a flow file with a
|
|
44
44
|
* bare `signal` still parses, and the on-disk version stays FLOW_FILE_VERSION 1.
|
|
45
45
|
*/
|
|
46
|
-
signalData: z.record(z.unknown()).optional(),
|
|
46
|
+
signalData: z.record(z.string(), z.unknown()).optional(),
|
|
47
47
|
/**
|
|
48
48
|
* Exact number of times the signal must have fired — the signal-side twin of `net.count`, and the
|
|
49
49
|
* only way a saved flow can keep a cardinality the agent actually asserted. Without it a
|
|
@@ -312,6 +312,17 @@ export interface SuiteVerdict {
|
|
|
312
312
|
* Carrying them also means a green suite is not reported as `pass`: see `status`.
|
|
313
313
|
*/
|
|
314
314
|
contradictions?: SuiteContradiction[];
|
|
315
|
+
/**
|
|
316
|
+
* Each flow that cannot replay as it was saved: no starting page, an anchor a replay cannot find
|
|
317
|
+
* or that several elements share, live data in an expect, or a step that writes real data. A
|
|
318
|
+
* drift on such a flow is the flow, not the app. Omitted when every flow replays as saved.
|
|
319
|
+
*/
|
|
320
|
+
replayability?: {
|
|
321
|
+
flow: string;
|
|
322
|
+
status: string;
|
|
323
|
+
why?: string[];
|
|
324
|
+
writes?: true;
|
|
325
|
+
}[];
|
|
315
326
|
}
|
|
316
327
|
/** A step-level contradiction, addressed back to the flow and step that produced it. */
|
|
317
328
|
export interface SuiteContradiction extends Contradiction {
|
|
@@ -377,6 +388,12 @@ export interface FlowReplayResult {
|
|
|
377
388
|
atStep: number;
|
|
378
389
|
notAttempted: number;
|
|
379
390
|
};
|
|
391
|
+
/**
|
|
392
|
+
* Set when replay waited for the start page longer than the step budget, because the leased tab
|
|
393
|
+
* said the page was still loading (a cold dev server compiling the route). Absent means the wait
|
|
394
|
+
* stayed inside the budget.
|
|
395
|
+
*/
|
|
396
|
+
startPageWait?: StartPageWait;
|
|
380
397
|
/**
|
|
381
398
|
* Set on an `ok` replay whose flow cannot fail: it asserts no observable consequence, or has no
|
|
382
399
|
* steps at all. The replay genuinely completed, so the status stays `ok` — but a bare `ok` read
|
|
@@ -414,6 +431,15 @@ export interface FlowReplayResult {
|
|
|
414
431
|
status: string;
|
|
415
432
|
}[];
|
|
416
433
|
}
|
|
434
|
+
/** How long replay waited for a start page that was still loading. */
|
|
435
|
+
export interface StartPageWait {
|
|
436
|
+
/** From the navigation to the page connecting, or to replay giving up. */
|
|
437
|
+
waitedMs: number;
|
|
438
|
+
/** The step budget the wait went past. */
|
|
439
|
+
budgetMs: number;
|
|
440
|
+
/** What the tab said the last time replay asked. True when replay gave up means it gave up at the cap. */
|
|
441
|
+
stillLoading: boolean;
|
|
442
|
+
}
|
|
417
443
|
/** A concrete, confidence-scored rebind proposed for one drifted step. */
|
|
418
444
|
export interface HealProposal {
|
|
419
445
|
/** 0-based step index in the flow. */
|