@reticlehq/core 3.5.0 → 3.7.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/dist/artifacts/artifacts-entry.d.ts +4 -0
- package/dist/artifacts/artifacts-entry.js +4 -0
- package/dist/artifacts/drive-script.d.ts +1404 -0
- package/dist/artifacts/drive-script.js +220 -0
- package/dist/artifacts/flow-constants.d.ts +19 -0
- package/dist/artifacts/flow-constants.js +21 -0
- package/dist/artifacts/flow-results.d.ts +450 -0
- package/dist/artifacts/flow-results.js +1 -0
- package/dist/artifacts/flow-types.d.ts +75 -427
- package/dist/artifacts/flow-types.js +15 -2
- package/dist/artifacts/harness-credits.d.ts +39 -0
- package/dist/artifacts/harness-credits.js +69 -0
- package/dist/artifacts/harness-map.d.ts +98 -0
- package/dist/artifacts/harness-map.js +36 -0
- package/dist/artifacts/hud-notices.d.ts +134 -0
- package/dist/artifacts/hud-notices.js +124 -0
- package/dist/artifacts/impact.d.ts +489 -189
- package/dist/artifacts/impact.js +90 -47
- package/dist/artifacts/journal.d.ts +105 -5
- package/dist/artifacts/journal.js +41 -0
- package/dist/artifacts/prompt-context.d.ts +105 -0
- package/dist/artifacts/prompt-context.js +108 -0
- package/dist/artifacts/screenshot-upload.d.ts +51 -0
- package/dist/artifacts/screenshot-upload.js +26 -0
- package/dist/desktop-contract.cjs +1 -0
- package/dist/desktop-contract.d.cts +1 -0
- package/dist/hooks/hook-events.d.ts +4 -4
- package/dist/hud-entry.d.ts +2 -0
- package/dist/hud-entry.js +4 -0
- package/dist/identity/contract-fingerprint.d.ts +9 -0
- package/dist/identity/contract-fingerprint.js +12 -0
- package/dist/identity/testid-attribute.d.ts +18 -0
- package/dist/identity/testid-attribute.js +24 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -1
- package/dist/onboarding.d.ts +10 -2
- package/dist/onboarding.js +6 -0
- package/dist/realm/registry.js +19 -1
- package/dist/schema/command-message.json +36 -0
- package/dist/schema/command-name.json +5 -1
- package/dist/schema/event-payloads.json +56 -2
- package/dist/schema/reticle-message.json +36 -0
- package/dist/telemetry-bug.d.ts +169 -0
- package/dist/telemetry-bug.js +123 -0
- package/dist/telemetry-entry.d.ts +1 -0
- package/dist/telemetry-entry.js +1 -0
- package/dist/telemetry-feedback.d.ts +2 -2
- package/dist/telemetry-refusal.d.ts +5 -4
- package/dist/telemetry-session.d.ts +79 -1
- package/dist/telemetry-session.js +57 -1
- package/dist/telemetry-signals.d.ts +339 -0
- package/dist/telemetry-signals.js +138 -0
- package/dist/telemetry.d.ts +330 -276
- package/dist/telemetry.js +40 -115
- package/dist/tour.d.ts +1 -0
- package/dist/tour.js +13 -5
- package/dist/verdict/consequence.d.ts +3 -0
- package/dist/verdict/disparity.d.ts +105 -0
- package/dist/verdict/disparity.js +40 -0
- package/dist/verdict/findings.d.ts +11 -0
- package/dist/verdict/findings.js +16 -0
- package/dist/verdict/instrumentation-coverage.d.ts +115 -0
- package/dist/verdict/instrumentation-coverage.js +226 -0
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +19 -5
- package/dist/verdict/intent.js +13 -1
- package/dist/verdict/predicate-tree.d.ts +15 -0
- package/dist/verdict/predicate-tree.js +21 -0
- package/dist/verdict/predicate.d.ts +28 -0
- package/dist/verdict/predicate.js +94 -15
- package/dist/verdict/security.d.ts +25 -0
- package/dist/verdict/security.js +82 -0
- package/dist/verdict/verdict-attribution.js +1 -0
- package/dist/verdict/verification-run.d.ts +638 -32
- package/dist/verdict/verification-run.js +90 -0
- package/dist/verdict/verified-constants.d.ts +19 -0
- package/dist/verdict/verified-constants.js +22 -0
- package/dist/wire/constants/constants.d.ts +60 -32
- package/dist/wire/constants/constants.js +61 -33
- package/dist/wire/constants/hud-controls.d.ts +1 -1
- package/dist/wire/constants/hud-controls.js +34 -1
- package/dist/wire/constants/hud-use.d.ts +89 -1
- package/dist/wire/constants/hud-use.js +62 -1
- package/dist/wire/constants/mcp-wire.d.ts +10 -0
- package/dist/wire/constants/mcp-wire.js +10 -0
- package/dist/wire/constants/reticle-chrome.d.ts +19 -0
- package/dist/wire/constants/reticle-chrome.js +19 -0
- package/dist/wire/constants/session-constants.d.ts +21 -0
- package/dist/wire/constants/session-constants.js +21 -0
- package/dist/wire/desktop-contract.d.ts +11 -0
- package/dist/wire/desktop-contract.js +14 -0
- package/dist/wire/event-payloads.d.ts +77 -4
- package/dist/wire/event-payloads.js +27 -0
- package/dist/wire/global-press.d.ts +34 -3
- package/dist/wire/global-press.js +91 -3
- package/dist/wire/hold.d.ts +14 -0
- package/dist/wire/hold.js +18 -0
- package/dist/wire/messages.d.ts +129 -32
- package/dist/wire/messages.js +17 -1
- package/dist/wire/platform-link.d.ts +238 -0
- package/dist/wire/platform-link.js +234 -0
- package/dist/wire/tool-names.d.ts +2 -0
- package/dist/wire/tool-names.js +2 -0
- package/dist/wire/types.d.ts +26 -6
- package/dist/wire/types.js +5 -0
- 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 +1 -1
- package/dist/words/notices.js +5 -3
- package/dist/words/upgrade.js +1 -1
- package/dist/words/writing-rule.d.ts +14 -0
- package/dist/words/writing-rule.js +17 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { z } from 'zod';
|
|
|
13
13
|
import { SubjectRefSchema } from 'open-verification';
|
|
14
14
|
import { PredicateKind } from './consequence.js';
|
|
15
15
|
import { Verified } from './verified-constants.js';
|
|
16
|
+
import { RunDisparitySchema } from './disparity.js';
|
|
16
17
|
/** Schema version stamped into every run file so a reader can reject/upgrade old artifacts. */
|
|
17
18
|
export const RUN_FILE_VERSION = 3;
|
|
18
19
|
/**
|
|
@@ -90,6 +91,17 @@ export const RunFlowStatus = {
|
|
|
90
91
|
SKIPPED: 'skipped',
|
|
91
92
|
HEALED: 'healed',
|
|
92
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* What one drive came to, and the only place that is decided. A check that came back no is the only
|
|
96
|
+
* failure. Checks nobody could decide, or a goal the model judged missed with no check against it,
|
|
97
|
+
* are NOT PROVED (`skipped`): undecided evidence calls for a better check, never a code change, and
|
|
98
|
+
* a drive with nothing failed was reported "1 broken" before this rule was one rule.
|
|
99
|
+
*/
|
|
100
|
+
export function driveFlowStatus(checks) {
|
|
101
|
+
if (0 < checks.failed)
|
|
102
|
+
return RunFlowStatus.FAIL;
|
|
103
|
+
return 0 < checks.held && false !== checks.goalMet ? RunFlowStatus.PASS : RunFlowStatus.SKIPPED;
|
|
104
|
+
}
|
|
93
105
|
/**
|
|
94
106
|
* The kind of standalone assertion captured outside a flow.
|
|
95
107
|
*
|
|
@@ -195,6 +207,49 @@ export const RunChangedFileSchema = z.object({
|
|
|
195
207
|
export const RUN_STEP_RESULTS_MAX = 200;
|
|
196
208
|
export const RUN_TEXT_MAX = 300;
|
|
197
209
|
export const RUN_RECORDING_MAX_BYTES = 64 * 1024;
|
|
210
|
+
/**
|
|
211
|
+
* Where a step screenshot's pixels came from. `browser` is a real screenshot (CDP, a leased page, or
|
|
212
|
+
* the desktop shell's own window capture); `rendered` is the page drawn in-page by the SDK, which can
|
|
213
|
+
* miss cross-origin images and fonts, so a reader is told it is approximate.
|
|
214
|
+
*/
|
|
215
|
+
export const ScreenshotSource = {
|
|
216
|
+
BROWSER: 'browser',
|
|
217
|
+
RENDERED: 'rendered',
|
|
218
|
+
};
|
|
219
|
+
/** How a step screenshot is taken and kept — shared by the daemon, the SDK and the platform. */
|
|
220
|
+
export const STEP_SCREENSHOT = {
|
|
221
|
+
/** `.reticle/visual/runs/<runId>/<seq>-<tool>.jpg` */
|
|
222
|
+
RUNS_DIR: 'runs',
|
|
223
|
+
/** One line per landed screenshot, beside the images: what the run artifact and the upload read. */
|
|
224
|
+
MANIFEST_FILE: 'shots.jsonl',
|
|
225
|
+
JPEG_QUALITY: 0.7,
|
|
226
|
+
MAX_SIDE_PX: 1600,
|
|
227
|
+
/** The platform refuses more than this for one run, so the daemon stops taking them there. */
|
|
228
|
+
MAX_PER_RUN: 300,
|
|
229
|
+
/** The platform refuses an image larger than this, decoded. */
|
|
230
|
+
MAX_BYTES: 1.5 * 1024 * 1024,
|
|
231
|
+
};
|
|
232
|
+
/** One step's screenshot as a run artifact records it. `file` is relative to the run's directory. */
|
|
233
|
+
export const StepScreenshotSchema = z.object({
|
|
234
|
+
file: z.string(),
|
|
235
|
+
source: z.nativeEnum(ScreenshotSource),
|
|
236
|
+
width: z.number(),
|
|
237
|
+
height: z.number(),
|
|
238
|
+
sha256: z.string(),
|
|
239
|
+
});
|
|
240
|
+
/** Every screenshot a run took, in order — including the actions that produced no verdict. */
|
|
241
|
+
export const RunScreenshotSchema = StepScreenshotSchema.extend({
|
|
242
|
+
seq: z.number(),
|
|
243
|
+
tool: z.string(),
|
|
244
|
+
/** The flow step it belongs to, as `<flow>#<step>`, when it was taken during a replay. */
|
|
245
|
+
step: z.string().optional(),
|
|
246
|
+
/** Taken for a call that produced a verdict — what lets the run pair it with its check. */
|
|
247
|
+
verdict: z.boolean().optional(),
|
|
248
|
+
/** The check this picture is of (see `RunCheck.checkId`), when it could be paired with one. */
|
|
249
|
+
checkId: z.string().optional(),
|
|
250
|
+
/** The journal action it was taken for: how a run pairs it with its check (`RunCheck.actionId`). */
|
|
251
|
+
actionId: z.string().optional(),
|
|
252
|
+
});
|
|
198
253
|
/** One step of a replayed flow, as synced: its outcome and the pages it ran on and led to. */
|
|
199
254
|
export const RunStepResultSchema = z.object({
|
|
200
255
|
step: z.number(),
|
|
@@ -206,6 +261,8 @@ export const RunStepResultSchema = z.object({
|
|
|
206
261
|
error: z.string().optional(),
|
|
207
262
|
/** The drift's reason kind, when the step drifted. */
|
|
208
263
|
drift: z.string().optional(),
|
|
264
|
+
/** What the page looked like when this step's outcome was decided. */
|
|
265
|
+
screenshot: StepScreenshotSchema.optional(),
|
|
209
266
|
});
|
|
210
267
|
/**
|
|
211
268
|
* The flow a run replayed, as recorded: enough to replay it again somewhere else.
|
|
@@ -220,6 +277,8 @@ export const RunFlowRecordingSchema = z.object({
|
|
|
220
277
|
/** A flow that was replayed as part of the run. */
|
|
221
278
|
export const RunFlowResultSchema = z.object({
|
|
222
279
|
name: z.string(),
|
|
280
|
+
/** The saved flow this replayed copy was generated from — see the flow file's `template`. */
|
|
281
|
+
template: z.string().optional(),
|
|
223
282
|
status: z.nativeEnum(RunFlowStatus),
|
|
224
283
|
steps: z.number(),
|
|
225
284
|
durationMs: z.number(),
|
|
@@ -259,6 +318,13 @@ export const RunCheckSchema = z.object({
|
|
|
259
318
|
* recorded which, and those are different facts about the evidence.
|
|
260
319
|
*/
|
|
261
320
|
declaredBeforeActing: z.boolean().optional(),
|
|
321
|
+
/**
|
|
322
|
+
* What the check required and what it saw, in the engine's words, when it said — "an element
|
|
323
|
+
* matching {"testid":"pay"} in state 'enabled'" and "present, visible, disabled". Without them an
|
|
324
|
+
* issue a CI run found had no Expected or Actual to show. Optional: older runs carry neither.
|
|
325
|
+
*/
|
|
326
|
+
expected: z.string().optional(),
|
|
327
|
+
observed: z.string().optional(),
|
|
262
328
|
/**
|
|
263
329
|
* What kind of evidence bought this answer.
|
|
264
330
|
*
|
|
@@ -284,6 +350,12 @@ export const RunCheckSchema = z.object({
|
|
|
284
350
|
reason: z.string().optional(),
|
|
285
351
|
/** This check's own name, so a later verdict can cite it. See revision.ts. */
|
|
286
352
|
checkId: z.string().optional(),
|
|
353
|
+
/** The journal action that produced it, kept on this machine to pair it with its screenshot. */
|
|
354
|
+
actionId: z.string().optional(),
|
|
355
|
+
/** The declared intent this check was taken for, by id: what it proves, named rather than timed. */
|
|
356
|
+
intent: z.string().optional(),
|
|
357
|
+
/** What the page looked like when this check was decided. */
|
|
358
|
+
screenshot: StepScreenshotSchema.optional(),
|
|
287
359
|
/**
|
|
288
360
|
* The earlier check this one corrects, as `<runId>#<checkId>`.
|
|
289
361
|
*
|
|
@@ -428,12 +500,30 @@ export const ReticleVerificationRunSchema = z.object({
|
|
|
428
500
|
* an invented subject is worse than an absent one.
|
|
429
501
|
*/
|
|
430
502
|
subject: SubjectRefSchema.optional(),
|
|
503
|
+
/**
|
|
504
|
+
* The prompt this verification answered, when the agent relayed one. Loose here because this
|
|
505
|
+
* schema loads with every page; its shape is `PromptContextSchema` in `@reticlehq/core/artifacts`,
|
|
506
|
+
* which the daemon writes and reads it with.
|
|
507
|
+
*/
|
|
508
|
+
context: z.record(z.unknown()).optional(),
|
|
431
509
|
changedFiles: z.array(RunChangedFileSchema).default([]),
|
|
432
510
|
flows: z.array(RunFlowResultSchema).default([]),
|
|
433
511
|
checks: z.array(RunCheckSchema).default([]),
|
|
434
512
|
risks: z.array(RunRiskSchema).default([]),
|
|
435
513
|
evidence: VerificationEvidenceSchema,
|
|
436
514
|
repair: z.object({ failurePackets: z.array(RepairPacketSchema).default([]) }).optional(),
|
|
515
|
+
/** What the page looked like after each action, assert and replayed step. Absent on older runs. */
|
|
516
|
+
screenshots: z.array(RunScreenshotSchema).optional(),
|
|
437
517
|
verdict: RunVerdictSchema,
|
|
438
518
|
signature: RunSignatureSchema.optional(),
|
|
519
|
+
/**
|
|
520
|
+
* On a Harness run: each goal the session's coding agent also judged, and how the two compare.
|
|
521
|
+
* Optional and additive; an older platform strips it and keeps the body.
|
|
522
|
+
*/
|
|
523
|
+
disparity: z.array(RunDisparitySchema).optional(),
|
|
524
|
+
/**
|
|
525
|
+
* What the coding agent itself said the session showed (`reticle_session { end, claim }`), kept
|
|
526
|
+
* beside the graded `verdict` so claimed-vs-graded can be compared. Never read as the verdict.
|
|
527
|
+
*/
|
|
528
|
+
agentClaim: z.nativeEnum(VerdictStatus).optional(),
|
|
439
529
|
});
|
|
@@ -106,6 +106,11 @@ export declare const VerifiedReason: {
|
|
|
106
106
|
readonly CONTRADICTED: "contradicted";
|
|
107
107
|
/** The consequence was already true beforehand, so it proves nothing about the action. */
|
|
108
108
|
readonly ALREADY_TRUE: "already_true";
|
|
109
|
+
/**
|
|
110
|
+
* The consequence held, but only on elements that are hidden: a `text` or stateless `element`
|
|
111
|
+
* check matches DOM presence, so a success template still hidden in the DOM passed it.
|
|
112
|
+
*/
|
|
113
|
+
readonly HIDDEN_MATCH: "hidden_match";
|
|
109
114
|
/** The capture was not clean, so a green would only describe what happened to be observed. */
|
|
110
115
|
readonly UNCLEAN_CAPTURE: "unclean_capture";
|
|
111
116
|
/**
|
|
@@ -190,6 +195,20 @@ export type CaptureLoss = (typeof CaptureLoss)[keyof typeof CaptureLoss];
|
|
|
190
195
|
*/
|
|
191
196
|
export declare const CDP_NO_PROVIDER_REASON = "no-cdp-provider";
|
|
192
197
|
export declare const CDP_NO_PROVIDER_RECOMMENDATION = "this needs a Reticle-driven browser (it is applied through CDP, which the always-on SDK cannot do) \u2014 start with `reticle drive <url>` or set RETICLE_CDP_URL";
|
|
198
|
+
/**
|
|
199
|
+
* What `reticle_viewport` answers when nothing can resize the page (#1273).
|
|
200
|
+
*
|
|
201
|
+
* On an SDK-only tab — the one the person opened themselves — the refusal is inherent: a page cannot
|
|
202
|
+
* resize its own window. But a LEASED tab is a Playwright-owned page and CAN be resized, and the
|
|
203
|
+
* tool already takes that route when there is one. The generic recommendation above named only the
|
|
204
|
+
* routes that need a human (`reticle drive`, `RETICLE_CDP_URL`), so an agent that was refused had
|
|
205
|
+
* no way to learn that one call of its own would have worked.
|
|
206
|
+
*
|
|
207
|
+
* Neither `reticle_lease` nor `reticle_viewport` is on the default advertised surface, so the lease
|
|
208
|
+
* is named the way a caller can actually reach it: through `reticle_run`. The human routes stay,
|
|
209
|
+
* second, for the agent that wants to drive the person's own tab.
|
|
210
|
+
*/
|
|
211
|
+
export declare const VIEWPORT_NO_PROVIDER_RECOMMENDATION: string;
|
|
193
212
|
/**
|
|
194
213
|
* A region the SDK cannot see into — surfaced (never hidden) so a result's coverage reads honestly.
|
|
195
214
|
* Crosses the wire in a BLIND_SPOT event's `kind`, so it lives in core (the contract), not the server.
|
|
@@ -105,6 +105,11 @@ export const VerifiedReason = {
|
|
|
105
105
|
CONTRADICTED: 'contradicted',
|
|
106
106
|
/** The consequence was already true beforehand, so it proves nothing about the action. */
|
|
107
107
|
ALREADY_TRUE: 'already_true',
|
|
108
|
+
/**
|
|
109
|
+
* The consequence held, but only on elements that are hidden: a `text` or stateless `element`
|
|
110
|
+
* check matches DOM presence, so a success template still hidden in the DOM passed it.
|
|
111
|
+
*/
|
|
112
|
+
HIDDEN_MATCH: 'hidden_match',
|
|
108
113
|
/** The capture was not clean, so a green would only describe what happened to be observed. */
|
|
109
114
|
UNCLEAN_CAPTURE: 'unclean_capture',
|
|
110
115
|
/**
|
|
@@ -187,6 +192,23 @@ export const CaptureLoss = {
|
|
|
187
192
|
*/
|
|
188
193
|
export const CDP_NO_PROVIDER_REASON = 'no-cdp-provider';
|
|
189
194
|
export const CDP_NO_PROVIDER_RECOMMENDATION = 'this needs a Reticle-driven browser (it is applied through CDP, which the always-on SDK cannot do) — start with `reticle drive <url>` or set RETICLE_CDP_URL';
|
|
195
|
+
/**
|
|
196
|
+
* What `reticle_viewport` answers when nothing can resize the page (#1273).
|
|
197
|
+
*
|
|
198
|
+
* On an SDK-only tab — the one the person opened themselves — the refusal is inherent: a page cannot
|
|
199
|
+
* resize its own window. But a LEASED tab is a Playwright-owned page and CAN be resized, and the
|
|
200
|
+
* tool already takes that route when there is one. The generic recommendation above named only the
|
|
201
|
+
* routes that need a human (`reticle drive`, `RETICLE_CDP_URL`), so an agent that was refused had
|
|
202
|
+
* no way to learn that one call of its own would have worked.
|
|
203
|
+
*
|
|
204
|
+
* Neither `reticle_lease` nor `reticle_viewport` is on the default advertised surface, so the lease
|
|
205
|
+
* is named the way a caller can actually reach it: through `reticle_run`. The human routes stay,
|
|
206
|
+
* second, for the agent that wants to drive the person's own tab.
|
|
207
|
+
*/
|
|
208
|
+
export const VIEWPORT_NO_PROVIDER_RECOMMENDATION = 'a page cannot resize its own window, but a leased tab can be resized — acquire one with ' +
|
|
209
|
+
'reticle_run { tool: "reticle_lease", args: { action: "acquire", url } }, then call reticle_viewport ' +
|
|
210
|
+
'again with the sessionId it returns. To resize the tab you already have open instead, start with ' +
|
|
211
|
+
'`reticle drive <url>` or set RETICLE_CDP_URL';
|
|
190
212
|
/**
|
|
191
213
|
* A region the SDK cannot see into — surfaced (never hidden) so a result's coverage reads honestly.
|
|
192
214
|
* Crosses the wire in a BLIND_SPOT event's `kind`, so it lives in core (the contract), not the server.
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const RETICLE_DEFAULT_PORT = 4400;
|
|
6
6
|
export declare const RETICLE_WS_PATH = "/reticle";
|
|
7
|
-
|
|
8
|
-
export declare const MCP_SSE_PATH = "/mcp/sse";
|
|
9
|
-
export declare const MCP_MESSAGE_PATH = "/mcp/message";
|
|
7
|
+
export * from './mcp-wire.js';
|
|
10
8
|
/**
|
|
11
9
|
* The name this MCP server answers to — in its own `serverInfo` handshake, and in the registration
|
|
12
10
|
* an installer writes into an agent's config. Those must be the same string or the agent registers
|
|
@@ -94,6 +92,12 @@ export declare const RETICLE_URL_PARAM: {
|
|
|
94
92
|
* needs (nobody is sitting in front of it) without touching identity.
|
|
95
93
|
*/
|
|
96
94
|
readonly OPENED: "__reticle_opened";
|
|
95
|
+
/**
|
|
96
|
+
* How the HUD starts on a page Reticle opened: `shown`, `hidden` or `removed` (`HudVisibility`).
|
|
97
|
+
* On the URL rather than a command because a command sent before the HUD mounts is lost, and a
|
|
98
|
+
* headless drive should never paint a HUD it was asked not to.
|
|
99
|
+
*/
|
|
100
|
+
readonly HUD: "__reticle_hud";
|
|
97
101
|
};
|
|
98
102
|
/** The loopback bind address. The daemon/bridge bind here by default — never expose Reticle off-host. */
|
|
99
103
|
export declare const LOOPBACK_HOST = "127.0.0.1";
|
|
@@ -103,6 +107,9 @@ export declare const LOOPBACK_HOST = "127.0.0.1";
|
|
|
103
107
|
* here and nowhere else. The values are the literal process.env keys.
|
|
104
108
|
*/
|
|
105
109
|
export declare const ReticleEnv: {
|
|
110
|
+
/** "0"/"false"/"off" turns off telemetry and every optional outbound call; DO_NOT_TRACK too. */
|
|
111
|
+
readonly TELEMETRY: "RETICLE_TELEMETRY";
|
|
112
|
+
readonly DO_NOT_TRACK: "DO_NOT_TRACK";
|
|
106
113
|
/** Shared-secret the browser SDK must present in HELLO; absent ⇒ loopback-trust only. */
|
|
107
114
|
readonly TOKEN: "RETICLE_TOKEN";
|
|
108
115
|
/** Bridge bind host. Defaults to loopback; setting anything else is opt-in remote exposure. */
|
|
@@ -117,6 +124,8 @@ export declare const ReticleEnv: {
|
|
|
117
124
|
readonly STATE_DIR: "RETICLE_STATE_DIR";
|
|
118
125
|
/** Attach to an already-running browser over CDP instead of launching one. */
|
|
119
126
|
readonly CDP_URL: "RETICLE_CDP_URL";
|
|
127
|
+
/** The Chromium executable to launch, in place of Playwright's own build or an installed Chrome. */
|
|
128
|
+
readonly CHROMIUM_PATH: "RETICLE_CHROMIUM_PATH";
|
|
120
129
|
/** Max simultaneous leased headless contexts in the browser pool (resource cap). */
|
|
121
130
|
readonly MAX_CONTEXTS: "RETICLE_MAX_CONTEXTS";
|
|
122
131
|
/**
|
|
@@ -185,6 +194,8 @@ export declare const ReticleEnv: {
|
|
|
185
194
|
readonly HARNESS_BASE_URL: "RETICLE_HARNESS_BASE_URL";
|
|
186
195
|
/** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
|
|
187
196
|
readonly HARNESS_MAX_STEPS: "RETICLE_HARNESS_MAX_STEPS";
|
|
197
|
+
/** The free drive `reticle try` was granted, sent on every Harness call it bills. */
|
|
198
|
+
readonly DRIVE_ID: "RETICLE_DRIVE_ID";
|
|
188
199
|
/**
|
|
189
200
|
* Which model backs the harness driver: `anthropic` (the default) or `jev`.
|
|
190
201
|
*
|
|
@@ -339,8 +350,9 @@ export declare const ReticleDir: {
|
|
|
339
350
|
/**
|
|
340
351
|
* the user's own record of what Reticle has done for them — .reticle/impact.json.
|
|
341
352
|
*
|
|
342
|
-
*
|
|
343
|
-
* about
|
|
353
|
+
* NOT telemetry: telemetry answers questions about the product; this answers the user's question
|
|
354
|
+
* about their own work. A linked project's copy syncs to the user's own dashboard (the sync cycle's
|
|
355
|
+
* `impact` kind); the machine-wide copy in `~/.reticle` never leaves the machine.
|
|
344
356
|
*/
|
|
345
357
|
readonly IMPACT_FILE: "impact.json";
|
|
346
358
|
/** what changes were SUPPOSED to make true —.reticle/intent.json (git-checked, reviewed) */
|
|
@@ -355,14 +367,6 @@ export declare const ReticleDir: {
|
|
|
355
367
|
* classified nor ignored.
|
|
356
368
|
*/
|
|
357
369
|
readonly INTENT_SUBDIR: "intent";
|
|
358
|
-
/**
|
|
359
|
-
* what a drive types into a field, keyed by the field's label —.reticle/fill-values.json.
|
|
360
|
-
*
|
|
361
|
-
* Git-checked on purpose. A generated value is paid for once and then belongs to the project: the
|
|
362
|
-
* next drive reuses it for free, a replay sends exactly what the recording sent, and a human who
|
|
363
|
-
* dislikes one can edit the file rather than argue with a model.
|
|
364
|
-
*/
|
|
365
|
-
readonly FILL_VALUES_FILE: "fill-values.json";
|
|
366
370
|
/** opt-in pixel baselines —.reticle/visual/<name>.png + <name>.diff.png. */
|
|
367
371
|
readonly VISUAL_SUBDIR: "visual";
|
|
368
372
|
/** verification-run artifacts —.reticle/runs/<runId>.json (the OEM/CI-consumable verdict). */
|
|
@@ -377,6 +381,8 @@ export declare const ReticleDir: {
|
|
|
377
381
|
* in three separate files, so the guard could not see it and nobody was ever asked.
|
|
378
382
|
*/
|
|
379
383
|
readonly FEEDBACK_SUBDIR: "feedback";
|
|
384
|
+
/** Every Harness drive plan, and how each journey went — .reticle/plans/<when>-<planId>.json. */
|
|
385
|
+
readonly PLANS_SUBDIR: "plans";
|
|
380
386
|
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
381
387
|
readonly SESSIONS_SUBDIR: "sessions";
|
|
382
388
|
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
@@ -394,14 +400,19 @@ export declare const ReticleDir: {
|
|
|
394
400
|
readonly JOURNAL_EVENTS_CLOSED_FILE: "events.closed.json";
|
|
395
401
|
/** learned expected-envelopes per route, accumulated across runs (the deviation-report baseline). */
|
|
396
402
|
readonly ENVELOPES_FILE: "envelopes.json";
|
|
397
|
-
/** learned ambient (action-less churn) region map — excluded from settle/summaries/envelopes. */
|
|
398
403
|
readonly AMBIENT_FILE: "ambient.json";
|
|
399
404
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
400
405
|
readonly FLAKE_FILE: "flake.json";
|
|
401
406
|
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
402
407
|
readonly COVERAGE_FILE: "coverage.json";
|
|
403
|
-
/**
|
|
404
|
-
|
|
408
|
+
/** Human review marks (HUD notes), pending and resolved — see server portal/session/human. */
|
|
409
|
+
readonly NOTES_FILE: "notes.json";
|
|
410
|
+
/** The user's latest request, as the agent relayed it. Local: it is the user's own words. */
|
|
411
|
+
readonly REQUEST_FILE: "request.json";
|
|
412
|
+
readonly APP_NOTES_FILE: "app-notes.json";
|
|
413
|
+
readonly PLATFORM_MOMENTS_FILE: "platform-moments.json";
|
|
414
|
+
/**
|
|
415
|
+
* the project's cloud binding — .reticle/cloud.json, written by `reticle connect`. Git-checked and
|
|
405
416
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
406
417
|
* ~/.reticle/credentials.json instead, because that one must never reach a repository.
|
|
407
418
|
*/
|
|
@@ -603,6 +614,16 @@ export type InputMode = (typeof InputMode)[keyof typeof InputMode];
|
|
|
603
614
|
export declare const InputModeReason: {
|
|
604
615
|
readonly NOT_POINTER: "not-a-pointer-action";
|
|
605
616
|
readonly SYNTHETIC_CLICK_PREFERRED: "synthetic-click-preferred";
|
|
617
|
+
/** A `press` that NAMED an element stays synthetic: dispatching at that element reaches it
|
|
618
|
+
* exactly, while a real keyboard sends the key to whatever holds focus. */
|
|
619
|
+
readonly SYNTHETIC_ELEMENT_PRESS_PREFERRED: "synthetic-element-press-preferred";
|
|
620
|
+
/** A `press` that named `keys` — several keys held down TOGETHER — stays synthetic: only the
|
|
621
|
+
* in-page dispatcher implements the down-in-order / up-in-reverse sequence. */
|
|
622
|
+
readonly SYNTHETIC_MULTI_KEY_PRESS_PREFERRED: "synthetic-multi-key-press-preferred";
|
|
623
|
+
/** A `press` that named an explicit `code` stays synthetic: the real driver presses by KEY name and
|
|
624
|
+
* cannot send a physical `code` that disagrees with it (`text:'z', code:'KeyY'` on a non-US
|
|
625
|
+
* layout), so a real chord would strike a different key than the one asked for. */
|
|
626
|
+
readonly SYNTHETIC_KEY_CODE_PRESS_PREFERRED: "synthetic-key-code-press-preferred";
|
|
606
627
|
readonly PAGE_NOT_CORRELATED: "page-not-correlated-to-a-cdp-target";
|
|
607
628
|
readonly ELEMENT_NOT_LOCATABLE: "element-not-locatable";
|
|
608
629
|
readonly DRAG_TARGET_UNRESOLVED: "drag-target-unresolved";
|
|
@@ -641,6 +662,14 @@ export declare const DriveErrorCode: {
|
|
|
641
662
|
readonly PLAYWRIGHT_MISSING: "playwright_missing";
|
|
642
663
|
readonly LAUNCH_FAILED: "launch_failed";
|
|
643
664
|
readonly NAVIGATE_FAILED: "navigate_failed";
|
|
665
|
+
/**
|
|
666
|
+
* A key could not be RELEASED after it was pressed. Distinct from every other drive failure
|
|
667
|
+
* because the browser is left in an unknown state: the key may still be down. The caller must
|
|
668
|
+
* not answer that by replaying the press synthetically — the replay lands on top of a keyboard
|
|
669
|
+
* that is already holding something, which is exactly the corruption the release exists to
|
|
670
|
+
* prevent.
|
|
671
|
+
*/
|
|
672
|
+
readonly RELEASE_FAILED: "release_failed";
|
|
644
673
|
};
|
|
645
674
|
export type DriveErrorCode = (typeof DriveErrorCode)[keyof typeof DriveErrorCode];
|
|
646
675
|
/** Human-facing message when the optional playwright dep is absent. */
|
|
@@ -785,10 +814,7 @@ export declare const ReticleCommand: {
|
|
|
785
814
|
readonly SCROLL: "scroll";
|
|
786
815
|
/** Session lifecycle: agent tunes the presenter session (e.g. idle-end timeout) for the app's needs. */
|
|
787
816
|
readonly SESSION_CONFIG: "session_config";
|
|
788
|
-
/**
|
|
789
|
-
* Live-control: bridge → browser. Pushes the current session state to the panel so an
|
|
790
|
-
* AGENT-driven pause/end keeps the presenter in sync. `args: { state, text? }`.
|
|
791
|
-
*/
|
|
817
|
+
/** Bridge → browser: the session state, so an agent's pause/end syncs the panel. `{ state, text? }`. */
|
|
792
818
|
readonly PRESENTER: "presenter";
|
|
793
819
|
/**
|
|
794
820
|
* Bridge -> browser: the user's own impact record, so the HUD can show what Reticle has done for
|
|
@@ -805,16 +831,20 @@ export declare const ReticleCommand: {
|
|
|
805
831
|
* screen-recording permission. Answered only when the app installed the capture helper.
|
|
806
832
|
*/
|
|
807
833
|
readonly CAPTURE: "capture";
|
|
834
|
+
/** The page drawn in-page to a JPEG, `{ ok, width, height, chunks }` (base64 under the string cap). */
|
|
835
|
+
readonly RENDER: "render";
|
|
808
836
|
/** Navigate the page to a new URL. `args: { url: string }`. */
|
|
809
837
|
readonly NAVIGATE: "navigate";
|
|
810
838
|
/** Reload the page. `args: { hard?: boolean }` — hard clears the cache via location replace trick. */
|
|
811
839
|
readonly REFRESH: "refresh";
|
|
812
|
-
/**
|
|
813
|
-
* Bridge → browser: the saved flows the human can replay from the panel.
|
|
814
|
-
* `args: { flows: [{ name, start? }] }` — `start` is the first step's testid anchor, a page hint the
|
|
815
|
-
* HUD uses to show a flow only where it can begin. Absent when the first step isn't testid-anchored.
|
|
816
|
-
*/
|
|
840
|
+
/** Bridge → browser: replayable flows, `{ flows: [{ name, start? }] }`; `start` = first testid. */
|
|
817
841
|
readonly FLOWS: "flows";
|
|
842
|
+
/** Bridge → browser: a HUD replay's progress, `{ name, done, total, status }`. */
|
|
843
|
+
readonly FLOW_PROGRESS: "flow.progress";
|
|
844
|
+
/** Bridge → browser: the Harness's drive plan and each part's status, a `PlanView`. */
|
|
845
|
+
readonly PLAN: "plan";
|
|
846
|
+
/** The coverage markers (`CoverageMarker`) the app's own page carries; silent, no HUD paint. */
|
|
847
|
+
readonly MARKERS: "markers";
|
|
818
848
|
};
|
|
819
849
|
export type ReticleCommand = (typeof ReticleCommand)[keyof typeof ReticleCommand];
|
|
820
850
|
/** Presenter intent shown to the human watcher: is the agent reading or acting? */
|
|
@@ -840,18 +870,16 @@ export declare const MessageKind: {
|
|
|
840
870
|
};
|
|
841
871
|
export type MessageKind = (typeof MessageKind)[keyof typeof MessageKind];
|
|
842
872
|
/**
|
|
843
|
-
* WHY a lease came back `ready: false
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
* probably does not embed `@reticlehq/core`. A REUSED lease can fail readiness a second way, and it
|
|
847
|
-
* is the opposite problem: an SDK did dial in, and has since stopped answering. The next action
|
|
848
|
-
* differs — check the install versus recover the tab — so the two get names rather than sharing a
|
|
849
|
-
* bare `false`.
|
|
873
|
+
* WHY a lease came back `ready: false`. Each reason wants a different next action — check the
|
|
874
|
+
* install, recover a wedged tab, or bring a hidden one to the front — so they get names rather
|
|
875
|
+
* than sharing a bare `false`.
|
|
850
876
|
*/
|
|
851
877
|
export declare const LeaseNotReadyReason: {
|
|
852
878
|
/** No SDK dialled in within the wait. The install is the thing to look at. */
|
|
853
879
|
readonly SDK_NEVER_DIALLED: "sdk_never_dialled";
|
|
854
880
|
/** One dialled in and stopped answering: the tab is attached but wedged. */
|
|
855
881
|
readonly SDK_STOPPED_ANSWERING: "sdk_stopped_answering";
|
|
882
|
+
/** The SDK answers, but its tab is hidden: timers and rAF are throttled, so nothing on it verifies. */
|
|
883
|
+
readonly TAB_HIDDEN: "tab_hidden";
|
|
856
884
|
};
|
|
857
885
|
export type LeaseNotReadyReason = (typeof LeaseNotReadyReason)[keyof typeof LeaseNotReadyReason];
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const RETICLE_DEFAULT_PORT = 4400;
|
|
6
6
|
export const RETICLE_WS_PATH = '/reticle';
|
|
7
|
-
|
|
8
|
-
export const MCP_SSE_PATH = '/mcp/sse';
|
|
9
|
-
export const MCP_MESSAGE_PATH = '/mcp/message';
|
|
7
|
+
export * from './mcp-wire.js';
|
|
10
8
|
/**
|
|
11
9
|
* The name this MCP server answers to — in its own `serverInfo` handshake, and in the registration
|
|
12
10
|
* an installer writes into an agent's config. Those must be the same string or the agent registers
|
|
@@ -96,6 +94,12 @@ export const RETICLE_URL_PARAM = {
|
|
|
96
94
|
* needs (nobody is sitting in front of it) without touching identity.
|
|
97
95
|
*/
|
|
98
96
|
OPENED: '__reticle_opened',
|
|
97
|
+
/**
|
|
98
|
+
* How the HUD starts on a page Reticle opened: `shown`, `hidden` or `removed` (`HudVisibility`).
|
|
99
|
+
* On the URL rather than a command because a command sent before the HUD mounts is lost, and a
|
|
100
|
+
* headless drive should never paint a HUD it was asked not to.
|
|
101
|
+
*/
|
|
102
|
+
HUD: '__reticle_hud',
|
|
99
103
|
};
|
|
100
104
|
/** The loopback bind address. The daemon/bridge bind here by default — never expose Reticle off-host. */
|
|
101
105
|
export const LOOPBACK_HOST = '127.0.0.1';
|
|
@@ -105,6 +109,9 @@ export const LOOPBACK_HOST = '127.0.0.1';
|
|
|
105
109
|
* here and nowhere else. The values are the literal process.env keys.
|
|
106
110
|
*/
|
|
107
111
|
export const ReticleEnv = {
|
|
112
|
+
/** "0"/"false"/"off" turns off telemetry and every optional outbound call; DO_NOT_TRACK too. */
|
|
113
|
+
TELEMETRY: 'RETICLE_TELEMETRY',
|
|
114
|
+
DO_NOT_TRACK: 'DO_NOT_TRACK',
|
|
108
115
|
/** Shared-secret the browser SDK must present in HELLO; absent ⇒ loopback-trust only. */
|
|
109
116
|
TOKEN: 'RETICLE_TOKEN',
|
|
110
117
|
/** Bridge bind host. Defaults to loopback; setting anything else is opt-in remote exposure. */
|
|
@@ -119,6 +126,8 @@ export const ReticleEnv = {
|
|
|
119
126
|
STATE_DIR: 'RETICLE_STATE_DIR',
|
|
120
127
|
/** Attach to an already-running browser over CDP instead of launching one. */
|
|
121
128
|
CDP_URL: 'RETICLE_CDP_URL',
|
|
129
|
+
/** The Chromium executable to launch, in place of Playwright's own build or an installed Chrome. */
|
|
130
|
+
CHROMIUM_PATH: 'RETICLE_CHROMIUM_PATH',
|
|
122
131
|
/** Max simultaneous leased headless contexts in the browser pool (resource cap). */
|
|
123
132
|
MAX_CONTEXTS: 'RETICLE_MAX_CONTEXTS',
|
|
124
133
|
/**
|
|
@@ -187,6 +196,8 @@ export const ReticleEnv = {
|
|
|
187
196
|
HARNESS_BASE_URL: 'RETICLE_HARNESS_BASE_URL',
|
|
188
197
|
/** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
|
|
189
198
|
HARNESS_MAX_STEPS: 'RETICLE_HARNESS_MAX_STEPS',
|
|
199
|
+
/** The free drive `reticle try` was granted, sent on every Harness call it bills. */
|
|
200
|
+
DRIVE_ID: 'RETICLE_DRIVE_ID',
|
|
190
201
|
/**
|
|
191
202
|
* Which model backs the harness driver: `anthropic` (the default) or `jev`.
|
|
192
203
|
*
|
|
@@ -373,8 +384,9 @@ export const ReticleDir = {
|
|
|
373
384
|
/**
|
|
374
385
|
* the user's own record of what Reticle has done for them — .reticle/impact.json.
|
|
375
386
|
*
|
|
376
|
-
*
|
|
377
|
-
* about
|
|
387
|
+
* NOT telemetry: telemetry answers questions about the product; this answers the user's question
|
|
388
|
+
* about their own work. A linked project's copy syncs to the user's own dashboard (the sync cycle's
|
|
389
|
+
* `impact` kind); the machine-wide copy in `~/.reticle` never leaves the machine.
|
|
378
390
|
*/
|
|
379
391
|
IMPACT_FILE: 'impact.json',
|
|
380
392
|
/** what changes were SUPPOSED to make true —.reticle/intent.json (git-checked, reviewed) */
|
|
@@ -389,14 +401,6 @@ export const ReticleDir = {
|
|
|
389
401
|
* classified nor ignored.
|
|
390
402
|
*/
|
|
391
403
|
INTENT_SUBDIR: 'intent',
|
|
392
|
-
/**
|
|
393
|
-
* what a drive types into a field, keyed by the field's label —.reticle/fill-values.json.
|
|
394
|
-
*
|
|
395
|
-
* Git-checked on purpose. A generated value is paid for once and then belongs to the project: the
|
|
396
|
-
* next drive reuses it for free, a replay sends exactly what the recording sent, and a human who
|
|
397
|
-
* dislikes one can edit the file rather than argue with a model.
|
|
398
|
-
*/
|
|
399
|
-
FILL_VALUES_FILE: 'fill-values.json',
|
|
400
404
|
/** opt-in pixel baselines —.reticle/visual/<name>.png + <name>.diff.png. */
|
|
401
405
|
VISUAL_SUBDIR: 'visual',
|
|
402
406
|
/** verification-run artifacts —.reticle/runs/<runId>.json (the OEM/CI-consumable verdict). */
|
|
@@ -411,6 +415,8 @@ export const ReticleDir = {
|
|
|
411
415
|
* in three separate files, so the guard could not see it and nobody was ever asked.
|
|
412
416
|
*/
|
|
413
417
|
FEEDBACK_SUBDIR: 'feedback',
|
|
418
|
+
/** Every Harness drive plan, and how each journey went — .reticle/plans/<when>-<planId>.json. */
|
|
419
|
+
PLANS_SUBDIR: 'plans',
|
|
414
420
|
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
415
421
|
SESSIONS_SUBDIR: 'sessions',
|
|
416
422
|
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
@@ -428,14 +434,19 @@ export const ReticleDir = {
|
|
|
428
434
|
JOURNAL_EVENTS_CLOSED_FILE: 'events.closed.json',
|
|
429
435
|
/** learned expected-envelopes per route, accumulated across runs (the deviation-report baseline). */
|
|
430
436
|
ENVELOPES_FILE: 'envelopes.json',
|
|
431
|
-
|
|
432
|
-
AMBIENT_FILE: 'ambient.json',
|
|
437
|
+
AMBIENT_FILE: 'ambient.json', // learned action-less churn regions, excluded from settle/summaries
|
|
433
438
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
434
439
|
FLAKE_FILE: 'flake.json',
|
|
435
440
|
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
436
441
|
COVERAGE_FILE: 'coverage.json',
|
|
437
|
-
/**
|
|
438
|
-
|
|
442
|
+
/** Human review marks (HUD notes), pending and resolved — see server portal/session/human. */
|
|
443
|
+
NOTES_FILE: 'notes.json',
|
|
444
|
+
/** The user's latest request, as the agent relayed it. Local: it is the user's own words. */
|
|
445
|
+
REQUEST_FILE: 'request.json',
|
|
446
|
+
APP_NOTES_FILE: 'app-notes.json', // confirmed targeting hints for the next session; never evidence
|
|
447
|
+
PLATFORM_MOMENTS_FILE: 'platform-moments.json', // moments already said, so each is said once
|
|
448
|
+
/**
|
|
449
|
+
* the project's cloud binding — .reticle/cloud.json, written by `reticle connect`. Git-checked and
|
|
439
450
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
440
451
|
* ~/.reticle/credentials.json instead, because that one must never reach a repository.
|
|
441
452
|
*/
|
|
@@ -642,6 +653,16 @@ export const InputModeReason = {
|
|
|
642
653
|
// Clicks default to the occlusion-honest synthetic path ("don't click, run the code") even with a
|
|
643
654
|
// provider configured; pass action arg native:true to force a trusted native click when needed.
|
|
644
655
|
SYNTHETIC_CLICK_PREFERRED: 'synthetic-click-preferred',
|
|
656
|
+
/** A `press` that NAMED an element stays synthetic: dispatching at that element reaches it
|
|
657
|
+
* exactly, while a real keyboard sends the key to whatever holds focus. */
|
|
658
|
+
SYNTHETIC_ELEMENT_PRESS_PREFERRED: 'synthetic-element-press-preferred',
|
|
659
|
+
/** A `press` that named `keys` — several keys held down TOGETHER — stays synthetic: only the
|
|
660
|
+
* in-page dispatcher implements the down-in-order / up-in-reverse sequence. */
|
|
661
|
+
SYNTHETIC_MULTI_KEY_PRESS_PREFERRED: 'synthetic-multi-key-press-preferred',
|
|
662
|
+
/** A `press` that named an explicit `code` stays synthetic: the real driver presses by KEY name and
|
|
663
|
+
* cannot send a physical `code` that disagrees with it (`text:'z', code:'KeyY'` on a non-US
|
|
664
|
+
* layout), so a real chord would strike a different key than the one asked for. */
|
|
665
|
+
SYNTHETIC_KEY_CODE_PRESS_PREFERRED: 'synthetic-key-code-press-preferred',
|
|
645
666
|
PAGE_NOT_CORRELATED: 'page-not-correlated-to-a-cdp-target', // no CDP page matches session.url
|
|
646
667
|
ELEMENT_NOT_LOCATABLE: 'element-not-locatable', // INSPECT returned no box (off-screen/stale ref)
|
|
647
668
|
DRAG_TARGET_UNRESOLVED: 'drag-target-unresolved', // drag toRef missing or not locatable
|
|
@@ -678,6 +699,14 @@ export const DriveErrorCode = {
|
|
|
678
699
|
PLAYWRIGHT_MISSING: 'playwright_missing',
|
|
679
700
|
LAUNCH_FAILED: 'launch_failed',
|
|
680
701
|
NAVIGATE_FAILED: 'navigate_failed',
|
|
702
|
+
/**
|
|
703
|
+
* A key could not be RELEASED after it was pressed. Distinct from every other drive failure
|
|
704
|
+
* because the browser is left in an unknown state: the key may still be down. The caller must
|
|
705
|
+
* not answer that by replaying the press synthetically — the replay lands on top of a keyboard
|
|
706
|
+
* that is already holding something, which is exactly the corruption the release exists to
|
|
707
|
+
* prevent.
|
|
708
|
+
*/
|
|
709
|
+
RELEASE_FAILED: 'release_failed',
|
|
681
710
|
};
|
|
682
711
|
/** Human-facing message when the optional playwright dep is absent. */
|
|
683
712
|
export const DRIVE_PLAYWRIGHT_MISSING_MSG = "reticle drive needs the optional 'playwright' package — install it: pnpm add -D playwright && npx playwright install chromium";
|
|
@@ -800,10 +829,7 @@ export const ReticleCommand = {
|
|
|
800
829
|
SCROLL: 'scroll',
|
|
801
830
|
/** Session lifecycle: agent tunes the presenter session (e.g. idle-end timeout) for the app's needs. */
|
|
802
831
|
SESSION_CONFIG: 'session_config',
|
|
803
|
-
/**
|
|
804
|
-
* Live-control: bridge → browser. Pushes the current session state to the panel so an
|
|
805
|
-
* AGENT-driven pause/end keeps the presenter in sync. `args: { state, text? }`.
|
|
806
|
-
*/
|
|
832
|
+
/** Bridge → browser: the session state, so an agent's pause/end syncs the panel. `{ state, text? }`. */
|
|
807
833
|
PRESENTER: 'presenter',
|
|
808
834
|
/**
|
|
809
835
|
* Bridge -> browser: the user's own impact record, so the HUD can show what Reticle has done for
|
|
@@ -820,16 +846,20 @@ export const ReticleCommand = {
|
|
|
820
846
|
* screen-recording permission. Answered only when the app installed the capture helper.
|
|
821
847
|
*/
|
|
822
848
|
CAPTURE: 'capture',
|
|
849
|
+
/** The page drawn in-page to a JPEG, `{ ok, width, height, chunks }` (base64 under the string cap). */
|
|
850
|
+
RENDER: 'render',
|
|
823
851
|
/** Navigate the page to a new URL. `args: { url: string }`. */
|
|
824
852
|
NAVIGATE: 'navigate',
|
|
825
853
|
/** Reload the page. `args: { hard?: boolean }` — hard clears the cache via location replace trick. */
|
|
826
854
|
REFRESH: 'refresh',
|
|
827
|
-
/**
|
|
828
|
-
* Bridge → browser: the saved flows the human can replay from the panel.
|
|
829
|
-
* `args: { flows: [{ name, start? }] }` — `start` is the first step's testid anchor, a page hint the
|
|
830
|
-
* HUD uses to show a flow only where it can begin. Absent when the first step isn't testid-anchored.
|
|
831
|
-
*/
|
|
855
|
+
/** Bridge → browser: replayable flows, `{ flows: [{ name, start? }] }`; `start` = first testid. */
|
|
832
856
|
FLOWS: 'flows',
|
|
857
|
+
/** Bridge → browser: a HUD replay's progress, `{ name, done, total, status }`. */
|
|
858
|
+
FLOW_PROGRESS: 'flow.progress',
|
|
859
|
+
/** Bridge → browser: the Harness's drive plan and each part's status, a `PlanView`. */
|
|
860
|
+
PLAN: 'plan',
|
|
861
|
+
/** The coverage markers (`CoverageMarker`) the app's own page carries; silent, no HUD paint. */
|
|
862
|
+
MARKERS: 'markers',
|
|
833
863
|
};
|
|
834
864
|
/** Presenter intent shown to the human watcher: is the agent reading or acting? */
|
|
835
865
|
export const PresenterMode = {
|
|
@@ -851,17 +881,15 @@ export const MessageKind = {
|
|
|
851
881
|
EVENT: 'event',
|
|
852
882
|
};
|
|
853
883
|
/**
|
|
854
|
-
* WHY a lease came back `ready: false
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
* probably does not embed `@reticlehq/core`. A REUSED lease can fail readiness a second way, and it
|
|
858
|
-
* is the opposite problem: an SDK did dial in, and has since stopped answering. The next action
|
|
859
|
-
* differs — check the install versus recover the tab — so the two get names rather than sharing a
|
|
860
|
-
* bare `false`.
|
|
884
|
+
* WHY a lease came back `ready: false`. Each reason wants a different next action — check the
|
|
885
|
+
* install, recover a wedged tab, or bring a hidden one to the front — so they get names rather
|
|
886
|
+
* than sharing a bare `false`.
|
|
861
887
|
*/
|
|
862
888
|
export const LeaseNotReadyReason = {
|
|
863
889
|
/** No SDK dialled in within the wait. The install is the thing to look at. */
|
|
864
890
|
SDK_NEVER_DIALLED: 'sdk_never_dialled',
|
|
865
891
|
/** One dialled in and stopped answering: the tab is attached but wedged. */
|
|
866
892
|
SDK_STOPPED_ANSWERING: 'sdk_stopped_answering',
|
|
893
|
+
/** The SDK answers, but its tab is hidden: timers and rAF are throttled, so nothing on it verifies. */
|
|
894
|
+
TAB_HIDDEN: 'tab_hidden',
|
|
867
895
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the browser test that walks the rendered HUD fails if any control has no id in this list.
|
|
10
10
|
*/
|
|
11
11
|
/** The attributes whose value is part of the id. Read by the browser to build one. */
|
|
12
|
-
export declare const HUD_KEYED_ATTRS: readonly ["setting", "check", "settings-cycle", "theme", "tour-target", "link"];
|
|
12
|
+
export declare const HUD_KEYED_ATTRS: readonly ["setting", "check", "settings-cycle", "theme", "tour-target", "link", "annotation-tab", "chat-view-btn"];
|
|
13
13
|
/**
|
|
14
14
|
* Is this a control id the HUD renders?
|
|
15
15
|
*
|