@reticlehq/core 3.2.0 → 3.4.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 +1 -1
- package/dist/artifacts/flow-composition.d.ts +3 -2
- package/dist/artifacts/flow-constants.d.ts +68 -2
- package/dist/artifacts/flow-constants.js +84 -2
- package/dist/artifacts/flow-expect-flat.d.ts +260 -0
- package/dist/artifacts/flow-expect-flat.js +284 -0
- package/dist/artifacts/flow-mutation-target.d.ts +0 -1
- package/dist/artifacts/flow-mutation-target.js +30 -2
- package/dist/artifacts/flow-step-tool.d.ts +2 -0
- package/dist/artifacts/flow-types.d.ts +1285 -1343
- package/dist/artifacts/flow-types.js +111 -140
- package/dist/artifacts/impact.d.ts +48 -20
- package/dist/artifacts/impact.js +11 -0
- package/dist/artifacts/journal.d.ts +34 -6
- package/dist/artifacts/journal.js +13 -0
- package/dist/hooks/hook-events.d.ts +18 -18
- package/dist/hud-entry.d.ts +9 -0
- package/dist/hud-entry.js +9 -0
- package/dist/identity/source-constants.d.ts +11 -0
- package/dist/identity/source-constants.js +11 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +25 -1
- package/dist/onboarding.d.ts +2 -2
- package/dist/realm/registry.d.ts +0 -8
- package/dist/realm/registry.js +1 -11
- package/dist/registry/daemon-registry.d.ts +14 -4
- package/dist/registry/daemon-registry.js +20 -4
- package/dist/schema/event-message.json +3 -1
- package/dist/schema/event-payloads.json +72 -0
- package/dist/schema/event-type.json +3 -1
- package/dist/schema/reticle-event.json +3 -1
- package/dist/schema/reticle-message.json +3 -1
- package/dist/source-constants.cjs +1 -0
- package/dist/source-constants.d.cts +1 -0
- package/dist/telemetry-feedback.d.ts +6 -6
- package/dist/telemetry-refusal.d.ts +5 -4
- package/dist/telemetry-session.d.ts +25 -2
- package/dist/telemetry-session.js +13 -0
- package/dist/telemetry.d.ts +130 -102
- package/dist/verdict/compare-source.d.ts +80 -0
- package/dist/verdict/compare-source.js +93 -0
- package/dist/verdict/consequence.d.ts +12 -0
- package/dist/verdict/consequence.js +15 -0
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +24 -0
- package/dist/verdict/intent.js +66 -10
- package/dist/verdict/predicate-tree.d.ts +82 -0
- package/dist/verdict/predicate-tree.js +186 -0
- package/dist/verdict/predicate.d.ts +138 -0
- package/dist/verdict/predicate.js +430 -0
- package/dist/verdict/property-assertion.d.ts +191 -0
- package/dist/verdict/property-assertion.js +42 -0
- package/dist/verdict/security.js +16 -4
- package/dist/verdict/verdict-attribution.d.ts +52 -0
- package/dist/verdict/verdict-attribution.js +87 -0
- package/dist/verdict/verification-run.d.ts +330 -83
- package/dist/verdict/verification-run.js +44 -1
- package/dist/verdict/verified-constants.d.ts +9 -0
- package/dist/verdict/verified-constants.js +9 -0
- package/dist/wire/channel.d.ts +10 -0
- package/dist/wire/channel.js +25 -0
- package/dist/wire/constants/constants.d.ts +65 -102
- package/dist/wire/constants/constants.js +79 -101
- package/dist/wire/constants/discovery.d.ts +25 -0
- package/dist/wire/constants/discovery.js +25 -0
- package/dist/wire/constants/event-types.d.ts +122 -0
- package/dist/wire/constants/event-types.js +121 -0
- package/dist/wire/constants/hud-controls.d.ts +19 -0
- package/dist/wire/constants/hud-controls.js +95 -0
- package/dist/wire/constants/hud-use.d.ts +27 -0
- package/dist/wire/constants/hud-use.js +24 -0
- package/dist/wire/constants/session-constants.d.ts +10 -0
- package/dist/wire/constants/session-constants.js +10 -0
- package/dist/wire/event-payloads.d.ts +72 -13
- package/dist/wire/event-payloads.js +26 -4
- package/dist/wire/messages.d.ts +97 -56
- package/dist/wire/messages.js +17 -0
- package/dist/wire/net.d.ts +35 -0
- package/dist/wire/net.js +41 -0
- package/dist/wire/redaction.js +17 -0
- package/dist/wire/state-select.d.ts +2 -1
- package/dist/wire/state-select.js +56 -3
- package/dist/wire/toon.d.ts +1 -1
- package/dist/wire/toon.js +30 -8
- package/dist/wire/types.d.ts +119 -94
- package/dist/wire/types.js +23 -1
- package/dist/words/no-session-reason.d.ts +7 -0
- package/dist/words/no-session-reason.js +7 -0
- package/dist/words/notices.d.ts +7 -0
- package/dist/words/notices.js +9 -2
- package/package.json +7 -2
|
@@ -187,6 +187,36 @@ export const RunChangedFileSchema = z.object({
|
|
|
187
187
|
changeKind: z.nativeEnum(RunChangeKind),
|
|
188
188
|
risk: z.array(z.nativeEnum(RiskSurface)).default([]),
|
|
189
189
|
});
|
|
190
|
+
/**
|
|
191
|
+
* How much of a replay a synced run carries, so a teammate can replay it from the cloud without the
|
|
192
|
+
* artifact growing with the flow: past these, the per-step list stops and the recording is omitted
|
|
193
|
+
* (said so by `recordingOmitted`), never cut mid-flow into a journey nobody drove.
|
|
194
|
+
*/
|
|
195
|
+
export const RUN_STEP_RESULTS_MAX = 200;
|
|
196
|
+
export const RUN_TEXT_MAX = 300;
|
|
197
|
+
export const RUN_RECORDING_MAX_BYTES = 64 * 1024;
|
|
198
|
+
/** One step of a replayed flow, as synced: its outcome and the pages it ran on and led to. */
|
|
199
|
+
export const RunStepResultSchema = z.object({
|
|
200
|
+
step: z.number(),
|
|
201
|
+
anchor: z.string(),
|
|
202
|
+
ok: z.boolean(),
|
|
203
|
+
page: z.string().optional(),
|
|
204
|
+
endPage: z.string().optional(),
|
|
205
|
+
consequence: z.string().optional(),
|
|
206
|
+
error: z.string().optional(),
|
|
207
|
+
/** The drift's reason kind, when the step drifted. */
|
|
208
|
+
drift: z.string().optional(),
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* The flow a run replayed, as recorded: enough to replay it again somewhere else.
|
|
212
|
+
*
|
|
213
|
+
* `steps` are FlowSteps, left opaque here: this module loads before the flow schema, and importing
|
|
214
|
+
* it made a cycle that crashed the built CLI at startup while every source-level test passed.
|
|
215
|
+
*/
|
|
216
|
+
export const RunFlowRecordingSchema = z.object({
|
|
217
|
+
startPath: z.string().optional(),
|
|
218
|
+
steps: z.array(z.unknown()),
|
|
219
|
+
});
|
|
190
220
|
/** A flow that was replayed as part of the run. */
|
|
191
221
|
export const RunFlowResultSchema = z.object({
|
|
192
222
|
name: z.string(),
|
|
@@ -199,10 +229,23 @@ export const RunFlowResultSchema = z.object({
|
|
|
199
229
|
.optional(),
|
|
200
230
|
evidenceRef: z.string().optional(),
|
|
201
231
|
failureReason: z.string().optional(),
|
|
232
|
+
/** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
|
|
233
|
+
stepResults: z.array(RunStepResultSchema).optional(),
|
|
234
|
+
/** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
|
|
235
|
+
recording: RunFlowRecordingSchema.optional(),
|
|
236
|
+
/** True when the recording was too large to carry. */
|
|
237
|
+
recordingOmitted: z.boolean().optional(),
|
|
202
238
|
});
|
|
203
239
|
/** A standalone assertion not tied to a flow. `evidence` is opaque (narrowed per kind by the caller). */
|
|
204
240
|
export const RunCheckSchema = z.object({
|
|
205
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Which source of truth answering this claim required.
|
|
243
|
+
*
|
|
244
|
+
* Optional, because a check folded from a journal written before the kind was recorded has none,
|
|
245
|
+
* and the only alternatives are refusing the whole run or filling in a kind nobody observed. An
|
|
246
|
+
* absent field says nobody wrote it down; a present one is what the predicate actually read.
|
|
247
|
+
*/
|
|
248
|
+
kind: z.preprocess((given) => ('string' === typeof given ? (OLD_CHECK_KIND_SPELLING[given] ?? given) : given), z.nativeEnum(PredicateKind).optional()),
|
|
206
249
|
predicate: z.string(),
|
|
207
250
|
status: z.preprocess((given) => ('string' === typeof given ? (OLD_CHECK_STATUS_SPELLING[given] ?? given) : given), z.nativeEnum(Verified)),
|
|
208
251
|
evidence: z.unknown().optional(),
|
|
@@ -61,6 +61,15 @@ export declare const VerifiedReason: {
|
|
|
61
61
|
* to produce the same empty answer. Saying `no` to the second blames the app for a gap in the
|
|
62
62
|
* tooling, and is the confident wrong answer this whole mechanism exists to remove.
|
|
63
63
|
*/
|
|
64
|
+
/**
|
|
65
|
+
* The page SDK and the daemon are on different wire contracts, so the evidence behind this claim
|
|
66
|
+
* cannot be trusted -- `reticle_session` already warns that under skew "dispatched/settled may be
|
|
67
|
+
* silent no-ops", which is a statement about the EVIDENCE, not about the app.
|
|
68
|
+
*
|
|
69
|
+
* UNKNOWN rather than NO, because nothing was disproved. Reported from the field as a `yes` with
|
|
70
|
+
* exit 0 printed beside an evidence block that named the skew in the same payload.
|
|
71
|
+
*/
|
|
72
|
+
readonly VERSION_SKEW: "version_skew";
|
|
64
73
|
readonly CAPABILITY_ABSENT: "capability-absent";
|
|
65
74
|
/** The assertion was never EVALUATED — under-specified call, or nothing instrumented to read. */
|
|
66
75
|
readonly INCONCLUSIVE: "inconclusive";
|
|
@@ -60,6 +60,15 @@ export const VerifiedReason = {
|
|
|
60
60
|
* to produce the same empty answer. Saying `no` to the second blames the app for a gap in the
|
|
61
61
|
* tooling, and is the confident wrong answer this whole mechanism exists to remove.
|
|
62
62
|
*/
|
|
63
|
+
/**
|
|
64
|
+
* The page SDK and the daemon are on different wire contracts, so the evidence behind this claim
|
|
65
|
+
* cannot be trusted -- `reticle_session` already warns that under skew "dispatched/settled may be
|
|
66
|
+
* silent no-ops", which is a statement about the EVIDENCE, not about the app.
|
|
67
|
+
*
|
|
68
|
+
* UNKNOWN rather than NO, because nothing was disproved. Reported from the field as a `yes` with
|
|
69
|
+
* exit 0 printed beside an evidence block that named the skew in the same payload.
|
|
70
|
+
*/
|
|
71
|
+
VERSION_SKEW: 'version_skew',
|
|
63
72
|
CAPABILITY_ABSENT: 'capability-absent',
|
|
64
73
|
/** The assertion was never EVALUATED — under-specified call, or nothing instrumented to read. */
|
|
65
74
|
INCONCLUSIVE: 'inconclusive',
|
package/dist/wire/channel.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CHANNEL_DEFAULTS, ChannelId, Independence } from 'open-verification';
|
|
2
2
|
import { PredicateKind } from '../verdict/consequence.js';
|
|
3
|
+
import type { Predicate } from '../verdict/predicate.js';
|
|
3
4
|
/**
|
|
4
5
|
* The sources of truth a verdict can be built from.
|
|
5
6
|
*
|
|
@@ -21,6 +22,15 @@ import { PredicateKind } from '../verdict/consequence.js';
|
|
|
21
22
|
export { ChannelId };
|
|
22
23
|
/** The channels a claim of this kind needs to look at. */
|
|
23
24
|
export declare function channelsRead(kind: PredicateKind): readonly ChannelId[];
|
|
25
|
+
/**
|
|
26
|
+
* The channels this claim needs, reading a composite's members rather than its kind (#1116).
|
|
27
|
+
*
|
|
28
|
+
* The union of the members is exactly as strict as the table: a wrapped `state` clause still needs
|
|
29
|
+
* `state`. What the table cannot do is tell `allOf[net, text]` from one that holds a state clause, so
|
|
30
|
+
* it refused every composite on a page without a store. A composite with no members keeps the
|
|
31
|
+
* table's answer, the whole set, so it can never read as needing nothing.
|
|
32
|
+
*/
|
|
33
|
+
export declare function channelsReadBy(predicate: Predicate): readonly ChannelId[];
|
|
24
34
|
/**
|
|
25
35
|
* The independence rule, and where it lives.
|
|
26
36
|
*
|
package/dist/wire/channel.js
CHANGED
|
@@ -39,6 +39,9 @@ const CHANNELS_OF = {
|
|
|
39
39
|
[PredicateKind.ANIMATION]: [ChannelId.UI, ChannelId.TIME],
|
|
40
40
|
// "Has everything gone quiet" is a question about time, and about the traffic being waited on.
|
|
41
41
|
[PredicateKind.SETTLED]: [ChannelId.TIME, ChannelId.NET],
|
|
42
|
+
// Every channel a value can be read off. The table cannot see which two a given comparison names;
|
|
43
|
+
// `channelsReadBy` can, and answers with exactly those.
|
|
44
|
+
[PredicateKind.COMPARE]: [ChannelId.UI, ChannelId.NET, ChannelId.STATE, ChannelId.SIGNAL],
|
|
42
45
|
// A claim made of other claims can contain any of them. Reporting only its own channels would
|
|
43
46
|
// make `allOf` a way to wrap a claim and escape the rule entirely.
|
|
44
47
|
[PredicateKind.ALL_OF]: ANY_CHANNEL_A_CLAIM_CAN_READ(),
|
|
@@ -68,6 +71,28 @@ function ANY_CHANNEL_A_CLAIM_CAN_READ() {
|
|
|
68
71
|
export function channelsRead(kind) {
|
|
69
72
|
return CHANNELS_OF[kind];
|
|
70
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* The channels this claim needs, reading a composite's members rather than its kind (#1116).
|
|
76
|
+
*
|
|
77
|
+
* The union of the members is exactly as strict as the table: a wrapped `state` clause still needs
|
|
78
|
+
* `state`. What the table cannot do is tell `allOf[net, text]` from one that holds a state clause, so
|
|
79
|
+
* it refused every composite on a page without a store. A composite with no members keeps the
|
|
80
|
+
* table's answer, the whole set, so it can never read as needing nothing.
|
|
81
|
+
*/
|
|
82
|
+
export function channelsReadBy(predicate) {
|
|
83
|
+
if (PredicateKind.NOT === predicate.kind)
|
|
84
|
+
return channelsReadBy(predicate.predicate);
|
|
85
|
+
// A source's `from` IS the kind whose channel it reads, so the table already knows the answer.
|
|
86
|
+
if (PredicateKind.COMPARE === predicate.kind) {
|
|
87
|
+
return [...new Set([predicate.left, predicate.right].flatMap((s) => CHANNELS_OF[s.from]))];
|
|
88
|
+
}
|
|
89
|
+
if (PredicateKind.ALL_OF !== predicate.kind && PredicateKind.ANY_OF !== predicate.kind) {
|
|
90
|
+
return CHANNELS_OF[predicate.kind];
|
|
91
|
+
}
|
|
92
|
+
if (0 === predicate.predicates.length)
|
|
93
|
+
return CHANNELS_OF[predicate.kind];
|
|
94
|
+
return [...new Set(predicate.predicates.flatMap(channelsReadBy))];
|
|
95
|
+
}
|
|
71
96
|
/**
|
|
72
97
|
* The independence rule, and where it lives.
|
|
73
98
|
*
|
|
@@ -30,6 +30,13 @@ export declare const MCP_SERVER_NAME = "reticle";
|
|
|
30
30
|
export declare const MCP_SHUTDOWN_EVENT = "reticle-shutdown";
|
|
31
31
|
/** Local-only daemon introspection — `reticle status` GETs this for sessions + health at a glance. */
|
|
32
32
|
export declare const STATUS_PATH = "/status";
|
|
33
|
+
/**
|
|
34
|
+
* Query flag on STATUS_PATH: the caller (a running `reticle init`) is waiting on this daemon, so it
|
|
35
|
+
* must not idle out yet. Without it the daemon init started exited mid-wait on a slow desktop build.
|
|
36
|
+
*/
|
|
37
|
+
export declare const STATUS_HOLD_QUERY = "hold";
|
|
38
|
+
/** How long one hold lasts. The holder renews it well inside this window for as long as it waits. */
|
|
39
|
+
export declare const STATUS_HOLD_MS = 60000;
|
|
33
40
|
/**
|
|
34
41
|
* Local-only drive request — `reticle drive <url>` POSTs `{url}` here when a daemon already owns the
|
|
35
42
|
* bridge port, and gets back the pooled session that daemon opened. The CLI asks instead of binding,
|
|
@@ -212,7 +219,10 @@ export declare const ReticleEnv: {
|
|
|
212
219
|
readonly API_KEY: "RETICLE_API_KEY";
|
|
213
220
|
/** The name this key had until 2026-09. Still honoured; see `apiKeyFrom()`. */
|
|
214
221
|
readonly CLOUD_KEY: "RETICLE_CLOUD_KEY";
|
|
222
|
+
/** The platform host. Read through `cloudUrlFrom()`, which also accepts `URL`. */
|
|
215
223
|
readonly CLOUD_URL: "RETICLE_CLOUD_URL";
|
|
224
|
+
/** The short name for `CLOUD_URL`, which people type first. `CLOUD_URL` wins when both are set. */
|
|
225
|
+
readonly URL: "RETICLE_URL";
|
|
216
226
|
};
|
|
217
227
|
/**
|
|
218
228
|
* The platform API key, whichever name it arrives under.
|
|
@@ -231,6 +241,34 @@ export declare const ReticleEnv: {
|
|
|
231
241
|
* works before removing the old.
|
|
232
242
|
*/
|
|
233
243
|
export declare function apiKeyFrom(env: Record<string, string | undefined>): string | undefined;
|
|
244
|
+
/** The platform URL, under either name — one function so no caller forgets the second. */
|
|
245
|
+
export declare function cloudUrlFrom(env: Record<string, string | undefined>): string | undefined;
|
|
246
|
+
/** The hosted platform: where every client dials when nothing names another host. */
|
|
247
|
+
export declare const DEFAULT_PLATFORM_URL = "https://app.reticle.sh";
|
|
248
|
+
/** The platform URL from the environment, else the hosted service. No trailing slash. */
|
|
249
|
+
export declare function platformUrlFrom(env: Record<string, string | undefined>): string;
|
|
250
|
+
/**
|
|
251
|
+
* The platform credential the environment carries, or undefined when it carries no key.
|
|
252
|
+
*
|
|
253
|
+
* The key alone is enough: the URL falls back to the hosted service. Every reader of the env key
|
|
254
|
+
* goes through here, because each of them used to demand a URL as well, and a CI job that set only
|
|
255
|
+
* the key — which is what the platform tells it to do — silently reached nothing.
|
|
256
|
+
*/
|
|
257
|
+
export declare function platformCredentialFrom(env: Record<string, string | undefined>): {
|
|
258
|
+
url: string;
|
|
259
|
+
apiKey: string;
|
|
260
|
+
} | undefined;
|
|
261
|
+
/**
|
|
262
|
+
* How many runs one `POST /v1/sync` may carry, by count and by serialized size.
|
|
263
|
+
*
|
|
264
|
+
* One request used to carry every unsent run, so a backlog bigger than the platform's body limit
|
|
265
|
+
* was refused whole, offered again next cycle, and never caught up. The byte bound sits well under
|
|
266
|
+
* that limit because flows, capsules and derived records ride in the first request too.
|
|
267
|
+
*/
|
|
268
|
+
export declare const SYNC_BATCH_LIMITS: {
|
|
269
|
+
readonly MAX_RUNS: 50;
|
|
270
|
+
readonly MAX_BYTES: number;
|
|
271
|
+
};
|
|
234
272
|
/** Hard transport bounds shared by the browser and bridge. */
|
|
235
273
|
export declare const TRANSPORT_LIMITS: {
|
|
236
274
|
readonly MAX_MESSAGE_BYTES: number;
|
|
@@ -331,6 +369,14 @@ export declare const ReticleDir: {
|
|
|
331
369
|
readonly RUNS_SUBDIR: "runs";
|
|
332
370
|
/** fail-to-pass bug capsules —.reticle/capsules/<id>.json (a minimal failing flow + its evidence). */
|
|
333
371
|
readonly CAPSULES_SUBDIR: "capsules";
|
|
372
|
+
/**
|
|
373
|
+
* Where a feedback report refused delivery is copied — .reticle/feedback/.
|
|
374
|
+
*
|
|
375
|
+
* Named here rather than at the writer because the partition over this object is what decides
|
|
376
|
+
* whether a name Reticle creates is committed, ignored, or swept. It was spelled as a free string
|
|
377
|
+
* in three separate files, so the guard could not see it and nobody was ever asked.
|
|
378
|
+
*/
|
|
379
|
+
readonly FEEDBACK_SUBDIR: "feedback";
|
|
334
380
|
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
335
381
|
readonly SESSIONS_SUBDIR: "sessions";
|
|
336
382
|
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
@@ -352,6 +398,8 @@ export declare const ReticleDir: {
|
|
|
352
398
|
readonly AMBIENT_FILE: "ambient.json";
|
|
353
399
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
354
400
|
readonly FLAKE_FILE: "flake.json";
|
|
401
|
+
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
402
|
+
readonly COVERAGE_FILE: "coverage.json";
|
|
355
403
|
/**
|
|
356
404
|
* the project's cloud binding — .reticle/cloud.json, written by `reticle link`. Git-checked and
|
|
357
405
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
@@ -390,6 +438,16 @@ export declare const ReticleDir: {
|
|
|
390
438
|
*/
|
|
391
439
|
readonly PAIRING_TOKEN_FILE: "pairing-token";
|
|
392
440
|
};
|
|
441
|
+
/**
|
|
442
|
+
* The names INSIDE `.reticle/intent/` — kept apart from `ReticleDir`, which lists what `.reticle/`
|
|
443
|
+
* itself holds and is what the retention tiers classify.
|
|
444
|
+
*/
|
|
445
|
+
export declare const IntentDir: {
|
|
446
|
+
/** One per subject: `.reticle/intent/<subject>/intent.json`. A flow's name is its subject. */
|
|
447
|
+
readonly SHARD_FILE: "intent.json";
|
|
448
|
+
/** Derived from the shards: `.reticle/intent/index.json`, one line per intent. */
|
|
449
|
+
readonly INDEX_FILE: "index.json";
|
|
450
|
+
};
|
|
393
451
|
/**
|
|
394
452
|
* Structured reasons a screenshot/visual-diff could not produce a verdict (never
|
|
395
453
|
* thrown as free strings). The visual layer is OPT-IN and CDP/Playwright-driven — it is NEVER
|
|
@@ -445,110 +503,14 @@ export declare const ContractReadError: {
|
|
|
445
503
|
readonly MALFORMED: "contract-malformed";
|
|
446
504
|
};
|
|
447
505
|
export type ContractReadError = (typeof ContractReadError)[keyof typeof ContractReadError];
|
|
506
|
+
import { EventType } from './event-types.js';
|
|
507
|
+
export { EventType };
|
|
448
508
|
/** Bounds for the per-session ring buffer. */
|
|
449
509
|
export declare const RING_BUFFER_DEFAULTS: {
|
|
450
510
|
readonly MAX_EVENTS: 2000;
|
|
451
511
|
readonly MAX_AGE_MS: 60000;
|
|
452
512
|
readonly MAX_BYTES: number;
|
|
453
513
|
};
|
|
454
|
-
/** Normalized event types pushed into the ring buffer. */
|
|
455
|
-
export declare const EventType: {
|
|
456
|
-
readonly DOM_ADDED: "dom.added";
|
|
457
|
-
readonly DOM_REMOVED: "dom.removed";
|
|
458
|
-
readonly DOM_ATTR: "dom.attr";
|
|
459
|
-
readonly DOM_TEXT: "dom.text";
|
|
460
|
-
readonly NET_REQUEST: "net.request";
|
|
461
|
-
readonly NET_PENDING: "net.pending";
|
|
462
|
-
/** An SSE (EventSource) or WebSocket frame — a message on a long-lived streaming connection. */
|
|
463
|
-
readonly NET_STREAM: "net.stream";
|
|
464
|
-
/** A web-perf metric a screenshot can't verify: LCP, cumulative layout shift, or a long task. */
|
|
465
|
-
readonly PERF: "perf";
|
|
466
|
-
readonly ROUTE_CHANGE: "route.change";
|
|
467
|
-
readonly CONSOLE_LOG: "console.log";
|
|
468
|
-
readonly CONSOLE_WARN: "console.warn";
|
|
469
|
-
readonly CONSOLE_ERROR: "console.error";
|
|
470
|
-
readonly CONSOLE_INFO: "console.info";
|
|
471
|
-
readonly CONSOLE_DEBUG: "console.debug";
|
|
472
|
-
readonly ERROR_UNCAUGHT: "error.uncaught";
|
|
473
|
-
readonly VISIBLE_SHOWN: "visible.shown";
|
|
474
|
-
readonly ANIM_START: "anim.start";
|
|
475
|
-
readonly ANIM_END: "anim.end";
|
|
476
|
-
readonly SCROLL_POSITION: "scroll.position";
|
|
477
|
-
readonly REVEAL_SHOWN: "reveal.shown";
|
|
478
|
-
readonly SIGNAL: "signal";
|
|
479
|
-
readonly STATE_CHANGE: "state.change";
|
|
480
|
-
/** a write to localStorage/sessionStorage/cookies — `data: { area, key, old?, new? }` (values redacted). */
|
|
481
|
-
readonly STORAGE_CHANGE: "storage.change";
|
|
482
|
-
/** page-level visibility/focus health (distinct from element-level VISIBLE_*). */
|
|
483
|
-
readonly PAGE_HEALTH: "page.health";
|
|
484
|
-
/**
|
|
485
|
-
* synthetic: the page called window.open, so the consequence of what was just clicked may live in
|
|
486
|
-
* another browsing context this one cannot observe (an OAuth popup is the archetype).
|
|
487
|
-
* `data: { href }` — the URL the page asked to open, when it named one.
|
|
488
|
-
*/
|
|
489
|
-
readonly CONTEXT_OPENED: "context.opened";
|
|
490
|
-
/**
|
|
491
|
-
* The app opened a native `alert`/`confirm`/`prompt` while Reticle was driving it.
|
|
492
|
-
*
|
|
493
|
-
* Recorded because Reticle ANSWERS these rather than letting them block — a native dialog halts
|
|
494
|
-
* the main thread, and the SDK's own message pump is on that thread, so one `confirm` behind a
|
|
495
|
-
* driven click made the tab permanently unresponsive with no recovery from inside the session.
|
|
496
|
-
* Answering silently would trade a wedge for an invisible one, so the question the app asked, and
|
|
497
|
-
* the answer given, ride out as an event.
|
|
498
|
-
*/
|
|
499
|
-
readonly DIALOG_OPENED: "dialog.opened";
|
|
500
|
-
/** aggregated React commits over a throttle window (dev builds) — `data: { commits }`. Commit storms /
|
|
501
|
-
* wasted re-renders show up here without a per-render flood. */
|
|
502
|
-
readonly RENDER_COMMIT: "render.commit";
|
|
503
|
-
/** element focus moved — `data: { to, from, toBody }`. Focus dropping to body after an act is a regression. */
|
|
504
|
-
readonly FOCUS_CHANGE: "focus.change";
|
|
505
|
-
/** browser → bridge: a human recording compiled in-page. */
|
|
506
|
-
readonly FLOW_RECORDED: "flow.recorded";
|
|
507
|
-
/** synthetic: browser transport queue overflowed; events were dropped. `data: { dropped: number }`. */
|
|
508
|
-
readonly TRANSPORT_OVERFLOW: "transport.overflow";
|
|
509
|
-
/**
|
|
510
|
-
* synthetic: a per-channel cap truncated a batch (e.g. a DOM mutation flood). `data: { channel, dropped }`.
|
|
511
|
-
* Marks downstream rollups/envelopes as built on incomplete data — a ledger that lies at scale is worse
|
|
512
|
-
* than no ledger, so truncation is never silent.
|
|
513
|
-
*/
|
|
514
|
-
readonly TRUNCATED: "truncated";
|
|
515
|
-
/**
|
|
516
|
-
* synthetic: the SDK detected a region it CANNOT observe (a cross-origin iframe, a closed shadow root).
|
|
517
|
-
* `data: { kind: BlindSpotKind, count }`. Surfaced on results as `coverage: partial` so a green never
|
|
518
|
-
* implies it saw everything.
|
|
519
|
-
*/
|
|
520
|
-
readonly BLIND_SPOT: "blind-spot";
|
|
521
|
-
/** synthetic: the SDK ITSELF failed (an observer threw). `data: { site, message, errorType }`.
|
|
522
|
-
* Rides the existing bridge — no outbound request. See browser/observers/sdk-failure.ts. */
|
|
523
|
-
readonly SDK_FAILED: "sdk.failed";
|
|
524
|
-
/**
|
|
525
|
-
* synthetic (driven only): CDP/Playwright-authoritative network detail for a response the in-page
|
|
526
|
-
* fetch/XHR wrapper also saw — full response headers + authoritative status/mimeType the page-side
|
|
527
|
-
* wrapper can't reach. `data: { url, method?, status, headers, resourceType? }`. Merged onto the
|
|
528
|
-
* matching in-page NET_REQUEST so the driven view never loses fidelity to an outside-in tool.
|
|
529
|
-
*/
|
|
530
|
-
readonly NET_DETAIL: "net.detail";
|
|
531
|
-
/**
|
|
532
|
-
* Live-control: browser → bridge. A human acted on the presenter panel.
|
|
533
|
-
* `data: { kind: HumanControlKind; text?: string }`. Rides the existing EventMessage.
|
|
534
|
-
*/
|
|
535
|
-
readonly HUMAN_CONTROL: "human.control";
|
|
536
|
-
/**
|
|
537
|
-
* Human review: browser → bridge. A human pinned a mistake to an element on the running page
|
|
538
|
-
* (the "annotate the bug where you see it" loop). `data` narrows to HumanMarkDataSchema — a note
|
|
539
|
-
* plus a re-resolvable element anchor (and its source file:line when the framework stamped one) so
|
|
540
|
-
* the agent that drains the mark knows exactly which element and which source to fix.
|
|
541
|
-
*/
|
|
542
|
-
readonly HUMAN_MARK: "human.mark";
|
|
543
|
-
/**
|
|
544
|
-
* The app produced a FILE — a Blob handed to `URL.createObjectURL`, usually saved by clicking an
|
|
545
|
-
* anchor with `download`. `data: { filename?, mimeType, bytes, lines?, preview? }`. The one artifact
|
|
546
|
-
* class no outside-the-browser tool can inspect: it never crosses the network, so there is no
|
|
547
|
-
* request to intercept. See `observers/download.ts` for the defect that motivated it.
|
|
548
|
-
*/
|
|
549
|
-
readonly DOWNLOAD: "download";
|
|
550
|
-
};
|
|
551
|
-
export type EventType = (typeof EventType)[keyof typeof EventType];
|
|
552
514
|
/**
|
|
553
515
|
* Named phenomena the perception layer detects deterministically over the journal — capsules and
|
|
554
516
|
* deviation reports lead with these names, not raw events. The library grows in later releases; the
|
|
@@ -779,14 +741,15 @@ export declare const ElementState: {
|
|
|
779
741
|
readonly DISABLED: "disabled";
|
|
780
742
|
readonly CHECKED: "checked";
|
|
781
743
|
readonly EXPANDED: "expanded";
|
|
744
|
+
readonly PRESSED: "pressed";
|
|
782
745
|
readonly FOCUSED: "focused";
|
|
783
746
|
readonly PRESENT: "present";
|
|
784
747
|
/**
|
|
785
748
|
* Inside the viewport right now (getBoundingClientRect intersects the window). Distinct from
|
|
786
|
-
* `visible`, which folds only aria-hidden/[hidden]/display/visibility/opacity and
|
|
787
|
-
* true for content below the fold of a scrolling
|
|
788
|
-
*
|
|
789
|
-
* returns already_true. (#398)
|
|
749
|
+
* `visible`, which folds only aria-hidden/[hidden]/display/visibility/opacity and a closed
|
|
750
|
+
* `<details>` ancestor, and so is already true for content below the fold of a scrolling
|
|
751
|
+
* container. Without this, `scrollIntoView` is ungradeable: the target satisfied
|
|
752
|
+
* `visible`/`present` before the scroll, so act_and_wait returns already_true. (#398)
|
|
790
753
|
*/
|
|
791
754
|
readonly IN_VIEWPORT: "inViewport";
|
|
792
755
|
};
|
|
@@ -30,6 +30,13 @@ export const MCP_SERVER_NAME = 'reticle';
|
|
|
30
30
|
export const MCP_SHUTDOWN_EVENT = 'reticle-shutdown';
|
|
31
31
|
/** Local-only daemon introspection — `reticle status` GETs this for sessions + health at a glance. */
|
|
32
32
|
export const STATUS_PATH = '/status';
|
|
33
|
+
/**
|
|
34
|
+
* Query flag on STATUS_PATH: the caller (a running `reticle init`) is waiting on this daemon, so it
|
|
35
|
+
* must not idle out yet. Without it the daemon init started exited mid-wait on a slow desktop build.
|
|
36
|
+
*/
|
|
37
|
+
export const STATUS_HOLD_QUERY = 'hold';
|
|
38
|
+
/** How long one hold lasts. The holder renews it well inside this window for as long as it waits. */
|
|
39
|
+
export const STATUS_HOLD_MS = 60_000;
|
|
33
40
|
/**
|
|
34
41
|
* Local-only drive request — `reticle drive <url>` POSTs `{url}` here when a daemon already owns the
|
|
35
42
|
* bridge port, and gets back the pooled session that daemon opened. The CLI asks instead of binding,
|
|
@@ -214,7 +221,10 @@ export const ReticleEnv = {
|
|
|
214
221
|
API_KEY: 'RETICLE_API_KEY',
|
|
215
222
|
/** The name this key had until 2026-09. Still honoured; see `apiKeyFrom()`. */
|
|
216
223
|
CLOUD_KEY: 'RETICLE_CLOUD_KEY',
|
|
224
|
+
/** The platform host. Read through `cloudUrlFrom()`, which also accepts `URL`. */
|
|
217
225
|
CLOUD_URL: 'RETICLE_CLOUD_URL',
|
|
226
|
+
/** The short name for `CLOUD_URL`, which people type first. `CLOUD_URL` wins when both are set. */
|
|
227
|
+
URL: 'RETICLE_URL',
|
|
218
228
|
};
|
|
219
229
|
/**
|
|
220
230
|
* The platform API key, whichever name it arrives under.
|
|
@@ -239,6 +249,46 @@ export function apiKeyFrom(env) {
|
|
|
239
249
|
const legacy = env[ReticleEnv.CLOUD_KEY];
|
|
240
250
|
return legacy !== undefined && 0 < legacy.length ? legacy : undefined;
|
|
241
251
|
}
|
|
252
|
+
/** The platform URL, under either name — one function so no caller forgets the second. */
|
|
253
|
+
export function cloudUrlFrom(env) {
|
|
254
|
+
const canonical = env[ReticleEnv.CLOUD_URL];
|
|
255
|
+
if (canonical !== undefined && 0 < canonical.length)
|
|
256
|
+
return canonical;
|
|
257
|
+
const short = env[ReticleEnv.URL];
|
|
258
|
+
return short !== undefined && 0 < short.length ? short : undefined;
|
|
259
|
+
}
|
|
260
|
+
/** The hosted platform: where every client dials when nothing names another host. */
|
|
261
|
+
export const DEFAULT_PLATFORM_URL = 'https://app.reticle.sh';
|
|
262
|
+
/** The platform URL from the environment, else the hosted service. No trailing slash. */
|
|
263
|
+
export function platformUrlFrom(env) {
|
|
264
|
+
// A loop, not /\/+$/: that pattern is polynomial on a value made of many slashes.
|
|
265
|
+
let url = cloudUrlFrom(env) ?? DEFAULT_PLATFORM_URL;
|
|
266
|
+
while (url.endsWith('/'))
|
|
267
|
+
url = url.slice(0, -1);
|
|
268
|
+
return url;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* The platform credential the environment carries, or undefined when it carries no key.
|
|
272
|
+
*
|
|
273
|
+
* The key alone is enough: the URL falls back to the hosted service. Every reader of the env key
|
|
274
|
+
* goes through here, because each of them used to demand a URL as well, and a CI job that set only
|
|
275
|
+
* the key — which is what the platform tells it to do — silently reached nothing.
|
|
276
|
+
*/
|
|
277
|
+
export function platformCredentialFrom(env) {
|
|
278
|
+
const apiKey = apiKeyFrom(env);
|
|
279
|
+
return apiKey === undefined ? undefined : { url: platformUrlFrom(env), apiKey };
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* How many runs one `POST /v1/sync` may carry, by count and by serialized size.
|
|
283
|
+
*
|
|
284
|
+
* One request used to carry every unsent run, so a backlog bigger than the platform's body limit
|
|
285
|
+
* was refused whole, offered again next cycle, and never caught up. The byte bound sits well under
|
|
286
|
+
* that limit because flows, capsules and derived records ride in the first request too.
|
|
287
|
+
*/
|
|
288
|
+
export const SYNC_BATCH_LIMITS = {
|
|
289
|
+
MAX_RUNS: 50,
|
|
290
|
+
MAX_BYTES: 4 * 1024 * 1024,
|
|
291
|
+
};
|
|
242
292
|
/** Hard transport bounds shared by the browser and bridge. */
|
|
243
293
|
export const TRANSPORT_LIMITS = {
|
|
244
294
|
MAX_MESSAGE_BYTES: 1024 * 1024,
|
|
@@ -353,6 +403,14 @@ export const ReticleDir = {
|
|
|
353
403
|
RUNS_SUBDIR: 'runs',
|
|
354
404
|
/** fail-to-pass bug capsules —.reticle/capsules/<id>.json (a minimal failing flow + its evidence). */
|
|
355
405
|
CAPSULES_SUBDIR: 'capsules',
|
|
406
|
+
/**
|
|
407
|
+
* Where a feedback report refused delivery is copied — .reticle/feedback/.
|
|
408
|
+
*
|
|
409
|
+
* Named here rather than at the writer because the partition over this object is what decides
|
|
410
|
+
* whether a name Reticle creates is committed, ignored, or swept. It was spelled as a free string
|
|
411
|
+
* in three separate files, so the guard could not see it and nobody was ever asked.
|
|
412
|
+
*/
|
|
413
|
+
FEEDBACK_SUBDIR: 'feedback',
|
|
356
414
|
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
357
415
|
SESSIONS_SUBDIR: 'sessions',
|
|
358
416
|
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
@@ -374,6 +432,8 @@ export const ReticleDir = {
|
|
|
374
432
|
AMBIENT_FILE: 'ambient.json',
|
|
375
433
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
376
434
|
FLAKE_FILE: 'flake.json',
|
|
435
|
+
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
436
|
+
COVERAGE_FILE: 'coverage.json',
|
|
377
437
|
/**
|
|
378
438
|
* the project's cloud binding — .reticle/cloud.json, written by `reticle link`. Git-checked and
|
|
379
439
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
@@ -412,6 +472,16 @@ export const ReticleDir = {
|
|
|
412
472
|
*/
|
|
413
473
|
PAIRING_TOKEN_FILE: 'pairing-token',
|
|
414
474
|
};
|
|
475
|
+
/**
|
|
476
|
+
* The names INSIDE `.reticle/intent/` — kept apart from `ReticleDir`, which lists what `.reticle/`
|
|
477
|
+
* itself holds and is what the retention tiers classify.
|
|
478
|
+
*/
|
|
479
|
+
export const IntentDir = {
|
|
480
|
+
/** One per subject: `.reticle/intent/<subject>/intent.json`. A flow's name is its subject. */
|
|
481
|
+
SHARD_FILE: 'intent.json',
|
|
482
|
+
/** Derived from the shards: `.reticle/intent/index.json`, one line per intent. */
|
|
483
|
+
INDEX_FILE: 'index.json',
|
|
484
|
+
};
|
|
415
485
|
/**
|
|
416
486
|
* Structured reasons a screenshot/visual-diff could not produce a verdict (never
|
|
417
487
|
* thrown as free strings). The visual layer is OPT-IN and CDP/Playwright-driven — it is NEVER
|
|
@@ -473,109 +543,16 @@ export const ContractReadError = {
|
|
|
473
543
|
MISSING: 'contract-missing', // no .reticle/contract.json on disk
|
|
474
544
|
MALFORMED: 'contract-malformed', // present but not valid JSON / fails schema
|
|
475
545
|
};
|
|
546
|
+
// The event vocabulary lives beside this file and is re-exported here, so `EventType` stays one
|
|
547
|
+
// import path for every consumer. See event-types.ts for why it moved.
|
|
548
|
+
import { EventType } from './event-types.js';
|
|
549
|
+
export { EventType };
|
|
476
550
|
/** Bounds for the per-session ring buffer. */
|
|
477
551
|
export const RING_BUFFER_DEFAULTS = {
|
|
478
552
|
MAX_EVENTS: 2000,
|
|
479
553
|
MAX_AGE_MS: 60_000,
|
|
480
554
|
MAX_BYTES: TRANSPORT_LIMITS.MAX_BUFFER_BYTES,
|
|
481
555
|
};
|
|
482
|
-
/** Normalized event types pushed into the ring buffer. */
|
|
483
|
-
export const EventType = {
|
|
484
|
-
DOM_ADDED: 'dom.added',
|
|
485
|
-
DOM_REMOVED: 'dom.removed',
|
|
486
|
-
DOM_ATTR: 'dom.attr',
|
|
487
|
-
DOM_TEXT: 'dom.text',
|
|
488
|
-
NET_REQUEST: 'net.request',
|
|
489
|
-
NET_PENDING: 'net.pending',
|
|
490
|
-
/** An SSE (EventSource) or WebSocket frame — a message on a long-lived streaming connection. */
|
|
491
|
-
NET_STREAM: 'net.stream',
|
|
492
|
-
/** A web-perf metric a screenshot can't verify: LCP, cumulative layout shift, or a long task. */
|
|
493
|
-
PERF: 'perf',
|
|
494
|
-
ROUTE_CHANGE: 'route.change',
|
|
495
|
-
CONSOLE_LOG: 'console.log',
|
|
496
|
-
CONSOLE_WARN: 'console.warn',
|
|
497
|
-
CONSOLE_ERROR: 'console.error',
|
|
498
|
-
CONSOLE_INFO: 'console.info',
|
|
499
|
-
CONSOLE_DEBUG: 'console.debug',
|
|
500
|
-
ERROR_UNCAUGHT: 'error.uncaught',
|
|
501
|
-
VISIBLE_SHOWN: 'visible.shown',
|
|
502
|
-
ANIM_START: 'anim.start',
|
|
503
|
-
ANIM_END: 'anim.end',
|
|
504
|
-
SCROLL_POSITION: 'scroll.position',
|
|
505
|
-
REVEAL_SHOWN: 'reveal.shown',
|
|
506
|
-
SIGNAL: 'signal',
|
|
507
|
-
STATE_CHANGE: 'state.change',
|
|
508
|
-
/** a write to localStorage/sessionStorage/cookies — `data: { area, key, old?, new? }` (values redacted). */
|
|
509
|
-
STORAGE_CHANGE: 'storage.change',
|
|
510
|
-
/** page-level visibility/focus health (distinct from element-level VISIBLE_*). */
|
|
511
|
-
PAGE_HEALTH: 'page.health',
|
|
512
|
-
/**
|
|
513
|
-
* synthetic: the page called window.open, so the consequence of what was just clicked may live in
|
|
514
|
-
* another browsing context this one cannot observe (an OAuth popup is the archetype).
|
|
515
|
-
* `data: { href }` — the URL the page asked to open, when it named one.
|
|
516
|
-
*/
|
|
517
|
-
CONTEXT_OPENED: 'context.opened',
|
|
518
|
-
/**
|
|
519
|
-
* The app opened a native `alert`/`confirm`/`prompt` while Reticle was driving it.
|
|
520
|
-
*
|
|
521
|
-
* Recorded because Reticle ANSWERS these rather than letting them block — a native dialog halts
|
|
522
|
-
* the main thread, and the SDK's own message pump is on that thread, so one `confirm` behind a
|
|
523
|
-
* driven click made the tab permanently unresponsive with no recovery from inside the session.
|
|
524
|
-
* Answering silently would trade a wedge for an invisible one, so the question the app asked, and
|
|
525
|
-
* the answer given, ride out as an event.
|
|
526
|
-
*/
|
|
527
|
-
DIALOG_OPENED: 'dialog.opened',
|
|
528
|
-
/** aggregated React commits over a throttle window (dev builds) — `data: { commits }`. Commit storms /
|
|
529
|
-
* wasted re-renders show up here without a per-render flood. */
|
|
530
|
-
RENDER_COMMIT: 'render.commit',
|
|
531
|
-
/** element focus moved — `data: { to, from, toBody }`. Focus dropping to body after an act is a regression. */
|
|
532
|
-
FOCUS_CHANGE: 'focus.change',
|
|
533
|
-
/** browser → bridge: a human recording compiled in-page. */
|
|
534
|
-
FLOW_RECORDED: 'flow.recorded',
|
|
535
|
-
/** synthetic: browser transport queue overflowed; events were dropped. `data: { dropped: number }`. */
|
|
536
|
-
TRANSPORT_OVERFLOW: 'transport.overflow',
|
|
537
|
-
/**
|
|
538
|
-
* synthetic: a per-channel cap truncated a batch (e.g. a DOM mutation flood). `data: { channel, dropped }`.
|
|
539
|
-
* Marks downstream rollups/envelopes as built on incomplete data — a ledger that lies at scale is worse
|
|
540
|
-
* than no ledger, so truncation is never silent.
|
|
541
|
-
*/
|
|
542
|
-
TRUNCATED: 'truncated',
|
|
543
|
-
/**
|
|
544
|
-
* synthetic: the SDK detected a region it CANNOT observe (a cross-origin iframe, a closed shadow root).
|
|
545
|
-
* `data: { kind: BlindSpotKind, count }`. Surfaced on results as `coverage: partial` so a green never
|
|
546
|
-
* implies it saw everything.
|
|
547
|
-
*/
|
|
548
|
-
BLIND_SPOT: 'blind-spot',
|
|
549
|
-
/** synthetic: the SDK ITSELF failed (an observer threw). `data: { site, message, errorType }`.
|
|
550
|
-
* Rides the existing bridge — no outbound request. See browser/observers/sdk-failure.ts. */
|
|
551
|
-
SDK_FAILED: 'sdk.failed',
|
|
552
|
-
/**
|
|
553
|
-
* synthetic (driven only): CDP/Playwright-authoritative network detail for a response the in-page
|
|
554
|
-
* fetch/XHR wrapper also saw — full response headers + authoritative status/mimeType the page-side
|
|
555
|
-
* wrapper can't reach. `data: { url, method?, status, headers, resourceType? }`. Merged onto the
|
|
556
|
-
* matching in-page NET_REQUEST so the driven view never loses fidelity to an outside-in tool.
|
|
557
|
-
*/
|
|
558
|
-
NET_DETAIL: 'net.detail',
|
|
559
|
-
/**
|
|
560
|
-
* Live-control: browser → bridge. A human acted on the presenter panel.
|
|
561
|
-
* `data: { kind: HumanControlKind; text?: string }`. Rides the existing EventMessage.
|
|
562
|
-
*/
|
|
563
|
-
HUMAN_CONTROL: 'human.control',
|
|
564
|
-
/**
|
|
565
|
-
* Human review: browser → bridge. A human pinned a mistake to an element on the running page
|
|
566
|
-
* (the "annotate the bug where you see it" loop). `data` narrows to HumanMarkDataSchema — a note
|
|
567
|
-
* plus a re-resolvable element anchor (and its source file:line when the framework stamped one) so
|
|
568
|
-
* the agent that drains the mark knows exactly which element and which source to fix.
|
|
569
|
-
*/
|
|
570
|
-
HUMAN_MARK: 'human.mark',
|
|
571
|
-
/**
|
|
572
|
-
* The app produced a FILE — a Blob handed to `URL.createObjectURL`, usually saved by clicking an
|
|
573
|
-
* anchor with `download`. `data: { filename?, mimeType, bytes, lines?, preview? }`. The one artifact
|
|
574
|
-
* class no outside-the-browser tool can inspect: it never crosses the network, so there is no
|
|
575
|
-
* request to intercept. See `observers/download.ts` for the defect that motivated it.
|
|
576
|
-
*/
|
|
577
|
-
DOWNLOAD: 'download',
|
|
578
|
-
};
|
|
579
556
|
/**
|
|
580
557
|
* Named phenomena the perception layer detects deterministically over the journal — capsules and
|
|
581
558
|
* deviation reports lead with these names, not raw events. The library grows in later releases; the
|
|
@@ -781,14 +758,15 @@ export const ElementState = {
|
|
|
781
758
|
DISABLED: 'disabled',
|
|
782
759
|
CHECKED: 'checked',
|
|
783
760
|
EXPANDED: 'expanded',
|
|
761
|
+
PRESSED: 'pressed',
|
|
784
762
|
FOCUSED: 'focused',
|
|
785
763
|
PRESENT: 'present',
|
|
786
764
|
/**
|
|
787
765
|
* Inside the viewport right now (getBoundingClientRect intersects the window). Distinct from
|
|
788
|
-
* `visible`, which folds only aria-hidden/[hidden]/display/visibility/opacity and
|
|
789
|
-
* true for content below the fold of a scrolling
|
|
790
|
-
*
|
|
791
|
-
* returns already_true. (#398)
|
|
766
|
+
* `visible`, which folds only aria-hidden/[hidden]/display/visibility/opacity and a closed
|
|
767
|
+
* `<details>` ancestor, and so is already true for content below the fold of a scrolling
|
|
768
|
+
* container. Without this, `scrollIntoView` is ungradeable: the target satisfied
|
|
769
|
+
* `visible`/`present` before the scroll, so act_and_wait returns already_true. (#398)
|
|
792
770
|
*/
|
|
793
771
|
IN_VIEWPORT: 'inViewport',
|
|
794
772
|
};
|