@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
package/dist/wire/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { HudPanel, HudToggle, HudView } from './constants/hud-use.js';
|
|
2
|
+
import { HudPanel, HudPromptSurface, HudToggle, HudView } from './constants/hud-use.js';
|
|
3
3
|
import { EventAttribution, EventType, RETICLE_MIN_PROTOCOL_VERSION, RETICLE_PROTOCOL_VERSION, MessageKind, TRANSPORT_LIMITS, } from './constants/constants.js';
|
|
4
4
|
import { HumanControlKind, MarkAnchorStrategy } from './constants/session-constants.js';
|
|
5
5
|
import { MAX_WIRE_REDACT_KEYS, MAX_WIRE_REDACT_KEY_LENGTH } from './redaction.js';
|
|
@@ -7,6 +7,7 @@ import { DOCUMENT_ID_LENGTH } from '../identity/document-identity.js';
|
|
|
7
7
|
import { NO_EDITS_OBSERVED } from '../identity/edit-epoch.js';
|
|
8
8
|
import { PlatformProfile } from './platform.js';
|
|
9
9
|
import { ChannelId } from './channel.js';
|
|
10
|
+
import { OutwardAction } from '../verdict/security.js';
|
|
10
11
|
const sessionIdSchema = z.string().min(1).max(TRANSPORT_LIMITS.MAX_SESSION_ID_LENGTH);
|
|
11
12
|
const refSchema = z.string().max(TRANSPORT_LIMITS.MAX_REF_LENGTH);
|
|
12
13
|
const documentIdSchema = z.string().min(1).max(DOCUMENT_ID_LENGTH);
|
|
@@ -33,6 +34,10 @@ export const HudUseDataSchema = z.object({
|
|
|
33
34
|
toggle: z.nativeEnum(HudToggle).optional(),
|
|
34
35
|
view: z.nativeEnum(HudView).optional(),
|
|
35
36
|
panel: z.nativeEnum(HudPanel).optional(),
|
|
37
|
+
/** A rail slide that became the visible one. Its shape is checked where it is counted. */
|
|
38
|
+
slide: z.string().max(56).optional(),
|
|
39
|
+
/** A sign-in or link prompt became visible on this surface. */
|
|
40
|
+
prompt: z.nativeEnum(HudPromptSurface).optional(),
|
|
36
41
|
});
|
|
37
42
|
/**
|
|
38
43
|
* Human review: the narrowed payload of a HUMAN_MARK event. A human flagged a mistake pinned to an
|
|
@@ -246,12 +251,23 @@ export const HelloMessageSchema = z.object({
|
|
|
246
251
|
.optional(),
|
|
247
252
|
});
|
|
248
253
|
/** Agent -> browser request, routed by the bridge with a correlation id. */
|
|
254
|
+
/** Who sent a command: the Harness, or (when absent) the agent connected to the daemon. */
|
|
255
|
+
export const CommandActor = {
|
|
256
|
+
HARNESS: 'harness',
|
|
257
|
+
};
|
|
249
258
|
export const CommandMessageSchema = z.object({
|
|
250
259
|
kind: z.literal(MessageKind.COMMAND),
|
|
251
260
|
id: z.string().min(1).max(TRANSPORT_LIMITS.MAX_COMMAND_ID_LENGTH),
|
|
252
261
|
sessionId: sessionIdSchema.optional(),
|
|
253
262
|
name: z.string().min(1).max(TRANSPORT_LIMITS.MAX_COMMAND_NAME_LENGTH),
|
|
254
263
|
args: z.record(z.unknown()).default({}),
|
|
264
|
+
/** Set when the Harness sent it, so the HUD can say who is driving. */
|
|
265
|
+
by: z.nativeEnum(CommandActor).optional(),
|
|
266
|
+
/**
|
|
267
|
+
* Set on a Harness command a model chose: the outward actions (`OutwardAction`) its journey asks
|
|
268
|
+
* for. The page presses no other outward control. Absent: not gated (an agent, a saved flow).
|
|
269
|
+
*/
|
|
270
|
+
outward: z.object({ allowed: z.array(z.nativeEnum(OutwardAction)).max(16) }).optional(),
|
|
255
271
|
});
|
|
256
272
|
/** Browser -> agent reply to a command. */
|
|
257
273
|
export const CommandResultSchema = z.object({
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { HudVisibility } from './constants/hud-use.js';
|
|
2
|
+
/** Bumped only for a change an older reader would MISREAD. A new field is not one. */
|
|
3
|
+
export declare const PLATFORM_LINK_VERSION = 1;
|
|
4
|
+
/** What a daemon can do for the platform, as it reports it. */
|
|
5
|
+
export declare const LinkCapability: {
|
|
6
|
+
/** Reads a `DriveSpec`, and reports what it applied and what it ignored. */
|
|
7
|
+
readonly DRIVE_SPEC: "drive-spec";
|
|
8
|
+
/** Drives the person's own open tab. */
|
|
9
|
+
readonly TARGET_TAB: "target:tab";
|
|
10
|
+
/** Opens the app in a browser of its own with no window. */
|
|
11
|
+
readonly TARGET_HEADLESS: "target:headless";
|
|
12
|
+
/** Opens the app in a browser window the person can watch. */
|
|
13
|
+
readonly TARGET_HEADED: "target:headed";
|
|
14
|
+
/** Shows, hides or removes the HUD on the page it drives. */
|
|
15
|
+
readonly HUD: "hud";
|
|
16
|
+
/** Runs a drive the platform orchestrates, one batch of tool calls at a time. */
|
|
17
|
+
readonly TOOL_SESSION: "tool-session";
|
|
18
|
+
/** Sends pictures of the page while it drives. */
|
|
19
|
+
readonly FRAMES: "frames";
|
|
20
|
+
};
|
|
21
|
+
export type LinkCapability = (typeof LinkCapability)[keyof typeof LinkCapability];
|
|
22
|
+
/** Where a drive runs. */
|
|
23
|
+
export declare const DriveTarget: {
|
|
24
|
+
/** A tab the person already has open. Their HUD shows it happening. */
|
|
25
|
+
readonly TAB: "tab";
|
|
26
|
+
/** A fresh browser context with no window. */
|
|
27
|
+
readonly HEADLESS: "headless";
|
|
28
|
+
/** A fresh browser window on the person's screen. */
|
|
29
|
+
readonly HEADED: "headed";
|
|
30
|
+
};
|
|
31
|
+
export type DriveTarget = (typeof DriveTarget)[keyof typeof DriveTarget];
|
|
32
|
+
/** Who decides each step of a drive. */
|
|
33
|
+
export declare const DriveMode: {
|
|
34
|
+
/** The daemon's own Harness plans and judges it. What every daemon before this link did. */
|
|
35
|
+
readonly LOCAL: "local";
|
|
36
|
+
/** The platform decides every step over a tool session; the daemon only runs tools. */
|
|
37
|
+
readonly PLATFORM: "platform";
|
|
38
|
+
};
|
|
39
|
+
export type DriveMode = (typeof DriveMode)[keyof typeof DriveMode];
|
|
40
|
+
/** Why a field of a spec was not applied. */
|
|
41
|
+
export declare const SpecIgnoredReason: {
|
|
42
|
+
/** This daemon does not know the field: the platform is newer. */
|
|
43
|
+
readonly UNKNOWN: "unknown";
|
|
44
|
+
/** The value did not read as the field's type. */
|
|
45
|
+
readonly INVALID: "invalid";
|
|
46
|
+
/** Known and valid, but this machine cannot do it right now (no browser, no HUD on the page). */
|
|
47
|
+
readonly UNAVAILABLE: "unavailable";
|
|
48
|
+
};
|
|
49
|
+
export type SpecIgnoredReason = (typeof SpecIgnoredReason)[keyof typeof SpecIgnoredReason];
|
|
50
|
+
export interface DriveSpec {
|
|
51
|
+
target?: DriveTarget;
|
|
52
|
+
mode?: DriveMode;
|
|
53
|
+
/** The address to open, for a target that opens one. Absent: the app's own last address. */
|
|
54
|
+
url?: string;
|
|
55
|
+
hud?: HudVisibility;
|
|
56
|
+
persona?: string;
|
|
57
|
+
maxSteps?: number;
|
|
58
|
+
/** Whether pictures of the page may leave the machine. */
|
|
59
|
+
record?: boolean;
|
|
60
|
+
/** A plan the platform saved: run it as it stands instead of asking for a new one. */
|
|
61
|
+
plan?: string;
|
|
62
|
+
/**
|
|
63
|
+
* A person started this run (Run plan, Re-verify, Run suite) and so acknowledged the saved flows'
|
|
64
|
+
* own destructive steps: their replays may take them. A fresh action the model decides keeps the
|
|
65
|
+
* guard whatever this says.
|
|
66
|
+
*/
|
|
67
|
+
confirmDangerous?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface SpecIgnored {
|
|
70
|
+
field: string;
|
|
71
|
+
reason: SpecIgnoredReason;
|
|
72
|
+
/** Why, in a person's words, when there is more to say than the reason. */
|
|
73
|
+
detail?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Read a spec as far as it can be read. Never throws: a field that does not validate, or that this
|
|
77
|
+
* daemon does not know, is reported in `ignored` and the rest still apply.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseDriveSpec(raw: unknown): {
|
|
80
|
+
spec: DriveSpec;
|
|
81
|
+
ignored: SpecIgnored[];
|
|
82
|
+
};
|
|
83
|
+
/** What a daemon did with a spec, sent back with the drive's result or its first session ask. */
|
|
84
|
+
export interface DriveApplied {
|
|
85
|
+
target: DriveTarget;
|
|
86
|
+
mode: DriveMode;
|
|
87
|
+
url?: string;
|
|
88
|
+
hud?: HudVisibility;
|
|
89
|
+
/** The tab the drive ran in. */
|
|
90
|
+
sessionId?: string;
|
|
91
|
+
}
|
|
92
|
+
/** One tool call the platform asks the daemon to run. */
|
|
93
|
+
export interface ToolSessionCall {
|
|
94
|
+
seq: number;
|
|
95
|
+
tool: string;
|
|
96
|
+
args: Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/** How one call went, as the daemon ran it. `result` is the tool's own answer, unedited. */
|
|
99
|
+
export interface ToolSessionResult {
|
|
100
|
+
seq: number;
|
|
101
|
+
ok: boolean;
|
|
102
|
+
result?: unknown;
|
|
103
|
+
error?: string;
|
|
104
|
+
ms: number;
|
|
105
|
+
}
|
|
106
|
+
/** The platform's answer to a session ask: the next calls, or that the drive is over. */
|
|
107
|
+
export interface ToolSessionReply {
|
|
108
|
+
calls: ToolSessionCall[];
|
|
109
|
+
done: boolean;
|
|
110
|
+
}
|
|
111
|
+
/** Bounds a daemon holds a tool session to, whatever the platform asks. */
|
|
112
|
+
export declare const TOOL_SESSION_LIMITS: {
|
|
113
|
+
/** Calls one drive may make in all: a loop on the platform must not drive forever. */
|
|
114
|
+
readonly MAX_CALLS: 1000;
|
|
115
|
+
/** Calls taken from one answer; the rest are not run. */
|
|
116
|
+
readonly MAX_BATCH: 25;
|
|
117
|
+
/**
|
|
118
|
+
* Times one ask is sent again after the network or the platform failed it. The SAME ask, under
|
|
119
|
+
* the same `ask` number, so the platform answers it once: a resend never advances the drive twice.
|
|
120
|
+
*/
|
|
121
|
+
readonly RETRIES: 4;
|
|
122
|
+
/** The first wait before asking again; it doubles each time (0.5s, 1s, 2s, 4s). */
|
|
123
|
+
readonly RETRY_BASE_MS: 500;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Whether an ask that came back with this status is worth sending again: the platform or the network
|
|
127
|
+
* failed it (5xx, 429, 408). A refusal (4xx) is the platform's answer, and asking again changes nothing.
|
|
128
|
+
*/
|
|
129
|
+
export declare const sessionAskRetryable: (status: number) => boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Read the platform's answer. Never throws: an answer that does not read is "done", because a drive
|
|
132
|
+
* that cannot understand its orders must stop rather than guess. A call that does not read is
|
|
133
|
+
* dropped; the platform sees no result for its `seq` and decides what that means.
|
|
134
|
+
*/
|
|
135
|
+
export declare function parseToolSessionReply(raw: unknown): ToolSessionReply;
|
|
136
|
+
/** How much a platform notice matters to the person reading it. */
|
|
137
|
+
export declare const LinkNoticeLevel: {
|
|
138
|
+
readonly INFO: "info";
|
|
139
|
+
readonly WARN: "warn";
|
|
140
|
+
/** Their Reticle is older than what the platform can use: what to run to update it. */
|
|
141
|
+
readonly UPDATE: "update";
|
|
142
|
+
};
|
|
143
|
+
export type LinkNoticeLevel = (typeof LinkNoticeLevel)[keyof typeof LinkNoticeLevel];
|
|
144
|
+
/**
|
|
145
|
+
* Something the platform tells the person through their daemon: "update Reticle to drive with every
|
|
146
|
+
* option". The one way a platform reaches a daemon it cannot change, so it is kept to a sentence.
|
|
147
|
+
*/
|
|
148
|
+
export interface LinkNotice {
|
|
149
|
+
level: LinkNoticeLevel;
|
|
150
|
+
text: string;
|
|
151
|
+
url?: string;
|
|
152
|
+
}
|
|
153
|
+
export declare const LINK_NOTICE_MAX = 3;
|
|
154
|
+
export declare const LINK_NOTICE_TEXT_MAX = 300;
|
|
155
|
+
/** Read the platform's notices; one that does not read is dropped, never shown half-read. */
|
|
156
|
+
export declare function parseLinkNotices(raw: unknown): LinkNotice[];
|
|
157
|
+
/** The platform's paths the daemon calls, all with its machine key. */
|
|
158
|
+
export declare const LinkPath: {
|
|
159
|
+
/** The apps this machine has connected; answered with apps to open and whether a drive waits. */
|
|
160
|
+
readonly APPS: "/v1/harness/local-apps";
|
|
161
|
+
/** The next drive for this project, or null. */
|
|
162
|
+
readonly NEXT_DRIVE: "/v1/harness/local-drives/next";
|
|
163
|
+
/** How a drive ended. */
|
|
164
|
+
readonly driveResult: (id: string) => string;
|
|
165
|
+
/** A picture of the driven page. */
|
|
166
|
+
readonly driveFrames: (id: string) => string;
|
|
167
|
+
/** One turn of a tool session: results in, next calls out. */
|
|
168
|
+
readonly driveSession: (id: string) => string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* What a daemon adds to each local-apps report so the platform can say what an app is missing and
|
|
172
|
+
* why a page never connected. Every key is additive: a platform that predates one ignores it.
|
|
173
|
+
*/
|
|
174
|
+
export declare const LinkReportKey: {
|
|
175
|
+
/** Per app: the channels its page announced in its HELLO. */
|
|
176
|
+
readonly CHANNELS: "channels";
|
|
177
|
+
/** Per app: instrumentation gaps its verdicts recorded, deduped by kind + missing, newest first. */
|
|
178
|
+
readonly GAPS: "gaps";
|
|
179
|
+
/** Per app: the framework adapters its page announced. */
|
|
180
|
+
readonly ADAPTERS: "adapters";
|
|
181
|
+
/**
|
|
182
|
+
* Per app: coverage capabilities that do not apply to it (`CoverageCapability` values, see
|
|
183
|
+
* `NotApplicableSchema`), excluded from both sides of the coverage score. Always sent, empty when
|
|
184
|
+
* every capability applies.
|
|
185
|
+
*/
|
|
186
|
+
readonly NOT_APPLICABLE: "notApplicable";
|
|
187
|
+
/** Top level: dev servers listening on this machine that no Reticle page has connected from. */
|
|
188
|
+
readonly DEV_SERVERS: "devServers";
|
|
189
|
+
/** Top level: the last page handshake this daemon refused, and why. */
|
|
190
|
+
readonly HELLO_FAILURE: "helloFailure";
|
|
191
|
+
/** Top level: `.reticle` folders holding runs that never reached the platform. */
|
|
192
|
+
readonly UNSYNCED: "unsynced";
|
|
193
|
+
};
|
|
194
|
+
/** How many recorded gaps one app reports. */
|
|
195
|
+
export declare const LINK_APP_GAPS_MAX = 20;
|
|
196
|
+
/** One recorded instrumentation gap, as an app report carries it. */
|
|
197
|
+
export interface LinkAppGap {
|
|
198
|
+
kind: string;
|
|
199
|
+
missing: string;
|
|
200
|
+
fix: string;
|
|
201
|
+
seenAt: number;
|
|
202
|
+
}
|
|
203
|
+
/** A dev server listening on localhost with no connected Reticle page. */
|
|
204
|
+
export interface LinkDevServer {
|
|
205
|
+
url: string;
|
|
206
|
+
port: number;
|
|
207
|
+
}
|
|
208
|
+
/** The last refused page handshake: version skew, token, port or protocol, in `reason`. */
|
|
209
|
+
export interface LinkHelloFailure {
|
|
210
|
+
reason: string;
|
|
211
|
+
at: number;
|
|
212
|
+
sdkVersion?: string;
|
|
213
|
+
}
|
|
214
|
+
/** A `.reticle` folder with runs that never reached the platform. `root` is `~`-relative. */
|
|
215
|
+
export interface LinkUnsyncedRoot {
|
|
216
|
+
root: string;
|
|
217
|
+
runs: number;
|
|
218
|
+
linked: boolean;
|
|
219
|
+
/** The project the folder belongs to, so a board lists only its own. Absent when none is named. */
|
|
220
|
+
projectId?: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Markers a daemon adds to an app's `channels` beside the protocol channel ids, for the two
|
|
224
|
+
* capabilities no channel names. Sent only on evidence, never while the gap that names the same
|
|
225
|
+
* capability is recorded: absence of both reads as "not seen yet", never as covered.
|
|
226
|
+
*/
|
|
227
|
+
export declare const CoverageMarker: {
|
|
228
|
+
/** The page carries `data-reticle-source` (the build plugin is active). */
|
|
229
|
+
readonly SOURCE: "source";
|
|
230
|
+
/** The app's snapshots show `data-testid` on its controls. */
|
|
231
|
+
readonly TESTID: "testid";
|
|
232
|
+
};
|
|
233
|
+
export type CoverageMarker = (typeof CoverageMarker)[keyof typeof CoverageMarker];
|
|
234
|
+
/**
|
|
235
|
+
* The file:line capability's name (`CoverageCapability.SOURCE_MAPPING` is this). Here, beside the
|
|
236
|
+
* markers, so a page can say it does not apply without loading the coverage rules into first load.
|
|
237
|
+
*/
|
|
238
|
+
export declare const SOURCE_MAPPING_CAPABILITY = "file:line source mapping";
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The link between a person's daemon and the Reticle platform: what each says to the other.
|
|
3
|
+
*
|
|
4
|
+
* The platform deploys any day; the daemon only changes when somebody upgrades it. So this contract
|
|
5
|
+
* is built to let a newer platform ask an older daemon for things, and an older platform keep working
|
|
6
|
+
* with a newer daemon:
|
|
7
|
+
*
|
|
8
|
+
* - The daemon says which version of this link it speaks and what it can do (`LinkCapability`), on
|
|
9
|
+
* every report. The platform offers a person only what their machine said it can do, and never
|
|
10
|
+
* infers a capability from a version number.
|
|
11
|
+
* - A drive arrives with a `DriveSpec`. Every field is read on its own; one the daemon does not know,
|
|
12
|
+
* or cannot honour, is reported back as ignored with a reason. A drive never fails because the
|
|
13
|
+
* platform asked for more than this daemon understands.
|
|
14
|
+
* - A drive in `platform` mode is a tool session: the platform decides every step and the daemon
|
|
15
|
+
* only runs Reticle's own tools and returns their raw results. Planning, personas, repeats for
|
|
16
|
+
* flakiness, judging and the summary all live on the platform, so they change without a release.
|
|
17
|
+
*
|
|
18
|
+
* Every arrow points out from the daemon: it asks, the platform answers. Nothing listens for the
|
|
19
|
+
* platform on the person's machine.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import { HudVisibility } from './constants/hud-use.js';
|
|
23
|
+
/** Bumped only for a change an older reader would MISREAD. A new field is not one. */
|
|
24
|
+
export const PLATFORM_LINK_VERSION = 1;
|
|
25
|
+
/** What a daemon can do for the platform, as it reports it. */
|
|
26
|
+
export const LinkCapability = {
|
|
27
|
+
/** Reads a `DriveSpec`, and reports what it applied and what it ignored. */
|
|
28
|
+
DRIVE_SPEC: 'drive-spec',
|
|
29
|
+
/** Drives the person's own open tab. */
|
|
30
|
+
TARGET_TAB: 'target:tab',
|
|
31
|
+
/** Opens the app in a browser of its own with no window. */
|
|
32
|
+
TARGET_HEADLESS: 'target:headless',
|
|
33
|
+
/** Opens the app in a browser window the person can watch. */
|
|
34
|
+
TARGET_HEADED: 'target:headed',
|
|
35
|
+
/** Shows, hides or removes the HUD on the page it drives. */
|
|
36
|
+
HUD: 'hud',
|
|
37
|
+
/** Runs a drive the platform orchestrates, one batch of tool calls at a time. */
|
|
38
|
+
TOOL_SESSION: 'tool-session',
|
|
39
|
+
/** Sends pictures of the page while it drives. */
|
|
40
|
+
FRAMES: 'frames',
|
|
41
|
+
};
|
|
42
|
+
/** Where a drive runs. */
|
|
43
|
+
export const DriveTarget = {
|
|
44
|
+
/** A tab the person already has open. Their HUD shows it happening. */
|
|
45
|
+
TAB: 'tab',
|
|
46
|
+
/** A fresh browser context with no window. */
|
|
47
|
+
HEADLESS: 'headless',
|
|
48
|
+
/** A fresh browser window on the person's screen. */
|
|
49
|
+
HEADED: 'headed',
|
|
50
|
+
};
|
|
51
|
+
/** Who decides each step of a drive. */
|
|
52
|
+
export const DriveMode = {
|
|
53
|
+
/** The daemon's own Harness plans and judges it. What every daemon before this link did. */
|
|
54
|
+
LOCAL: 'local',
|
|
55
|
+
/** The platform decides every step over a tool session; the daemon only runs tools. */
|
|
56
|
+
PLATFORM: 'platform',
|
|
57
|
+
};
|
|
58
|
+
/** Why a field of a spec was not applied. */
|
|
59
|
+
export const SpecIgnoredReason = {
|
|
60
|
+
/** This daemon does not know the field: the platform is newer. */
|
|
61
|
+
UNKNOWN: 'unknown',
|
|
62
|
+
/** The value did not read as the field's type. */
|
|
63
|
+
INVALID: 'invalid',
|
|
64
|
+
/** Known and valid, but this machine cannot do it right now (no browser, no HUD on the page). */
|
|
65
|
+
UNAVAILABLE: 'unavailable',
|
|
66
|
+
};
|
|
67
|
+
const PERSONA_MAX = 2_000;
|
|
68
|
+
const PLAN_ID_MAX = 128;
|
|
69
|
+
const STEPS_MAX = 500;
|
|
70
|
+
/** Each field of a spec, validated on its own so one bad field never costs the others. */
|
|
71
|
+
const SPEC_FIELDS = {
|
|
72
|
+
target: z.enum([DriveTarget.TAB, DriveTarget.HEADLESS, DriveTarget.HEADED]),
|
|
73
|
+
mode: z.enum([DriveMode.LOCAL, DriveMode.PLATFORM]),
|
|
74
|
+
url: z
|
|
75
|
+
.string()
|
|
76
|
+
.url()
|
|
77
|
+
.refine((u) => /^https?:/i.test(u)),
|
|
78
|
+
hud: z.enum([HudVisibility.SHOWN, HudVisibility.HIDDEN, HudVisibility.REMOVED]),
|
|
79
|
+
persona: z.string().min(1).max(PERSONA_MAX),
|
|
80
|
+
maxSteps: z.number().int().min(1).max(STEPS_MAX),
|
|
81
|
+
record: z.boolean(),
|
|
82
|
+
plan: z.string().min(1).max(PLAN_ID_MAX),
|
|
83
|
+
confirmDangerous: z.boolean(),
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Read a spec as far as it can be read. Never throws: a field that does not validate, or that this
|
|
87
|
+
* daemon does not know, is reported in `ignored` and the rest still apply.
|
|
88
|
+
*/
|
|
89
|
+
export function parseDriveSpec(raw) {
|
|
90
|
+
const ignored = [];
|
|
91
|
+
const spec = {};
|
|
92
|
+
if ('object' !== typeof raw || null === raw || Array.isArray(raw))
|
|
93
|
+
return { spec, ignored };
|
|
94
|
+
for (const [field, value] of Object.entries(raw)) {
|
|
95
|
+
const schema = SPEC_FIELDS[field];
|
|
96
|
+
if (schema === undefined) {
|
|
97
|
+
ignored.push({ field, reason: SpecIgnoredReason.UNKNOWN });
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const parsed = schema.safeParse(value);
|
|
101
|
+
if (parsed.success)
|
|
102
|
+
spec[field] = parsed.data;
|
|
103
|
+
else
|
|
104
|
+
ignored.push({ field, reason: SpecIgnoredReason.INVALID });
|
|
105
|
+
}
|
|
106
|
+
return { spec, ignored };
|
|
107
|
+
}
|
|
108
|
+
/** Bounds a daemon holds a tool session to, whatever the platform asks. */
|
|
109
|
+
export const TOOL_SESSION_LIMITS = {
|
|
110
|
+
/** Calls one drive may make in all: a loop on the platform must not drive forever. */
|
|
111
|
+
MAX_CALLS: 1_000,
|
|
112
|
+
/** Calls taken from one answer; the rest are not run. */
|
|
113
|
+
MAX_BATCH: 25,
|
|
114
|
+
/**
|
|
115
|
+
* Times one ask is sent again after the network or the platform failed it. The SAME ask, under
|
|
116
|
+
* the same `ask` number, so the platform answers it once: a resend never advances the drive twice.
|
|
117
|
+
*/
|
|
118
|
+
RETRIES: 4,
|
|
119
|
+
/** The first wait before asking again; it doubles each time (0.5s, 1s, 2s, 4s). */
|
|
120
|
+
RETRY_BASE_MS: 500,
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Whether an ask that came back with this status is worth sending again: the platform or the network
|
|
124
|
+
* failed it (5xx, 429, 408). A refusal (4xx) is the platform's answer, and asking again changes nothing.
|
|
125
|
+
*/
|
|
126
|
+
export const sessionAskRetryable = (status) => 500 <= status || 429 === status || 408 === status;
|
|
127
|
+
const SessionCallSchema = z.object({
|
|
128
|
+
seq: z.number().int().nonnegative(),
|
|
129
|
+
tool: z.string().min(1).max(100),
|
|
130
|
+
args: z.record(z.unknown()).default({}),
|
|
131
|
+
});
|
|
132
|
+
/**
|
|
133
|
+
* Read the platform's answer. Never throws: an answer that does not read is "done", because a drive
|
|
134
|
+
* that cannot understand its orders must stop rather than guess. A call that does not read is
|
|
135
|
+
* dropped; the platform sees no result for its `seq` and decides what that means.
|
|
136
|
+
*/
|
|
137
|
+
export function parseToolSessionReply(raw) {
|
|
138
|
+
if ('object' !== typeof raw || null === raw)
|
|
139
|
+
return { calls: [], done: true };
|
|
140
|
+
const record = raw;
|
|
141
|
+
const calls = (Array.isArray(record.calls) ? record.calls : [])
|
|
142
|
+
.slice(0, TOOL_SESSION_LIMITS.MAX_BATCH)
|
|
143
|
+
.flatMap((call) => {
|
|
144
|
+
const parsed = SessionCallSchema.safeParse(call);
|
|
145
|
+
return parsed.success ? [parsed.data] : [];
|
|
146
|
+
});
|
|
147
|
+
return { calls, done: true === record.done || 0 === calls.length };
|
|
148
|
+
}
|
|
149
|
+
/** How much a platform notice matters to the person reading it. */
|
|
150
|
+
export const LinkNoticeLevel = {
|
|
151
|
+
INFO: 'info',
|
|
152
|
+
WARN: 'warn',
|
|
153
|
+
/** Their Reticle is older than what the platform can use: what to run to update it. */
|
|
154
|
+
UPDATE: 'update',
|
|
155
|
+
};
|
|
156
|
+
export const LINK_NOTICE_MAX = 3;
|
|
157
|
+
export const LINK_NOTICE_TEXT_MAX = 300;
|
|
158
|
+
/** Read the platform's notices; one that does not read is dropped, never shown half-read. */
|
|
159
|
+
export function parseLinkNotices(raw) {
|
|
160
|
+
const levels = new Set(Object.values(LinkNoticeLevel));
|
|
161
|
+
return (Array.isArray(raw) ? raw : [])
|
|
162
|
+
.flatMap((entry) => {
|
|
163
|
+
if ('object' !== typeof entry || null === entry)
|
|
164
|
+
return [];
|
|
165
|
+
const notice = entry;
|
|
166
|
+
const text = 'string' === typeof notice.text ? notice.text.trim() : '';
|
|
167
|
+
if ('string' !== typeof notice.level || !levels.has(notice.level) || 0 === text.length)
|
|
168
|
+
return [];
|
|
169
|
+
const url = 'string' === typeof notice.url && /^https?:\/\//i.test(notice.url) ? notice.url : undefined;
|
|
170
|
+
return [
|
|
171
|
+
{
|
|
172
|
+
level: notice.level,
|
|
173
|
+
text: text.slice(0, LINK_NOTICE_TEXT_MAX),
|
|
174
|
+
...(url === undefined ? {} : { url }),
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
})
|
|
178
|
+
.slice(0, LINK_NOTICE_MAX);
|
|
179
|
+
}
|
|
180
|
+
/** The platform's paths the daemon calls, all with its machine key. */
|
|
181
|
+
export const LinkPath = {
|
|
182
|
+
/** The apps this machine has connected; answered with apps to open and whether a drive waits. */
|
|
183
|
+
APPS: '/v1/harness/local-apps',
|
|
184
|
+
/** The next drive for this project, or null. */
|
|
185
|
+
NEXT_DRIVE: '/v1/harness/local-drives/next',
|
|
186
|
+
/** How a drive ended. */
|
|
187
|
+
driveResult: (id) => `/v1/harness/local-drives/${encodeURIComponent(id)}`,
|
|
188
|
+
/** A picture of the driven page. */
|
|
189
|
+
driveFrames: (id) => `/v1/harness/local-drives/${encodeURIComponent(id)}/frames`,
|
|
190
|
+
/** One turn of a tool session: results in, next calls out. */
|
|
191
|
+
driveSession: (id) => `/v1/harness/local-drives/${encodeURIComponent(id)}/session`,
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* What a daemon adds to each local-apps report so the platform can say what an app is missing and
|
|
195
|
+
* why a page never connected. Every key is additive: a platform that predates one ignores it.
|
|
196
|
+
*/
|
|
197
|
+
export const LinkReportKey = {
|
|
198
|
+
/** Per app: the channels its page announced in its HELLO. */
|
|
199
|
+
CHANNELS: 'channels',
|
|
200
|
+
/** Per app: instrumentation gaps its verdicts recorded, deduped by kind + missing, newest first. */
|
|
201
|
+
GAPS: 'gaps',
|
|
202
|
+
/** Per app: the framework adapters its page announced. */
|
|
203
|
+
ADAPTERS: 'adapters',
|
|
204
|
+
/**
|
|
205
|
+
* Per app: coverage capabilities that do not apply to it (`CoverageCapability` values, see
|
|
206
|
+
* `NotApplicableSchema`), excluded from both sides of the coverage score. Always sent, empty when
|
|
207
|
+
* every capability applies.
|
|
208
|
+
*/
|
|
209
|
+
NOT_APPLICABLE: 'notApplicable',
|
|
210
|
+
/** Top level: dev servers listening on this machine that no Reticle page has connected from. */
|
|
211
|
+
DEV_SERVERS: 'devServers',
|
|
212
|
+
/** Top level: the last page handshake this daemon refused, and why. */
|
|
213
|
+
HELLO_FAILURE: 'helloFailure',
|
|
214
|
+
/** Top level: `.reticle` folders holding runs that never reached the platform. */
|
|
215
|
+
UNSYNCED: 'unsynced',
|
|
216
|
+
};
|
|
217
|
+
/** How many recorded gaps one app reports. */
|
|
218
|
+
export const LINK_APP_GAPS_MAX = 20;
|
|
219
|
+
/**
|
|
220
|
+
* Markers a daemon adds to an app's `channels` beside the protocol channel ids, for the two
|
|
221
|
+
* capabilities no channel names. Sent only on evidence, never while the gap that names the same
|
|
222
|
+
* capability is recorded: absence of both reads as "not seen yet", never as covered.
|
|
223
|
+
*/
|
|
224
|
+
export const CoverageMarker = {
|
|
225
|
+
/** The page carries `data-reticle-source` (the build plugin is active). */
|
|
226
|
+
SOURCE: 'source',
|
|
227
|
+
/** The app's snapshots show `data-testid` on its controls. */
|
|
228
|
+
TESTID: 'testid',
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* The file:line capability's name (`CoverageCapability.SOURCE_MAPPING` is this). Here, beside the
|
|
232
|
+
* markers, so a page can say it does not apply without loading the coverage rules into first load.
|
|
233
|
+
*/
|
|
234
|
+
export const SOURCE_MAPPING_CAPABILITY = 'file:line source mapping';
|
|
@@ -75,6 +75,8 @@ export declare const ReticleTool: {
|
|
|
75
75
|
readonly VERIFY: "reticle_verify";
|
|
76
76
|
/** read cross-run history (.reticle/project.json) + diff-vs-last for a name. */
|
|
77
77
|
readonly PROJECT: "reticle_project";
|
|
78
|
+
/** Where the user stands: sign-in, project link, plan, credits, Harness. */
|
|
79
|
+
readonly ACCOUNT: "reticle_account";
|
|
78
80
|
/** The team's shared memory, read on demand — see memory/memory-tools.ts. */
|
|
79
81
|
readonly MEMORY: "reticle_memory";
|
|
80
82
|
/** explicitly record a run outcome (the manual companion to auto-recording). */
|
package/dist/wire/tool-names.js
CHANGED
|
@@ -85,6 +85,8 @@ export const ReticleTool = {
|
|
|
85
85
|
VERIFY: 'reticle_verify',
|
|
86
86
|
/** read cross-run history (.reticle/project.json) + diff-vs-last for a name. */
|
|
87
87
|
PROJECT: 'reticle_project',
|
|
88
|
+
/** Where the user stands: sign-in, project link, plan, credits, Harness. */
|
|
89
|
+
ACCOUNT: 'reticle_account',
|
|
88
90
|
/** The team's shared memory, read on demand — see memory/memory-tools.ts. */
|
|
89
91
|
MEMORY: 'reticle_memory',
|
|
90
92
|
/** explicitly record a run outcome (the manual companion to auto-recording). */
|
package/dist/wire/types.d.ts
CHANGED
|
@@ -82,6 +82,11 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
82
82
|
* verification was handed back to the human. Requires `scope`.
|
|
83
83
|
*/
|
|
84
84
|
self: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
/**
|
|
86
|
+
* Compare `text` with its case intact. A search is forgiving about case; a CHECK is not — the
|
|
87
|
+
* text predicate sends this, so "Saved Priya" can fail against a page reading "Saved priya".
|
|
88
|
+
*/
|
|
89
|
+
matchCase: z.ZodOptional<z.ZodBoolean>;
|
|
85
90
|
}, "strict", z.ZodTypeAny, {
|
|
86
91
|
text?: string | undefined;
|
|
87
92
|
testid?: string | undefined;
|
|
@@ -91,16 +96,17 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
91
96
|
placeholder?: string | undefined;
|
|
92
97
|
alt?: string | undefined;
|
|
93
98
|
value?: string | undefined;
|
|
94
|
-
name?: string | undefined;
|
|
95
|
-
by?: "text" | "testid" | "role" | "component" | "label" | "placeholder" | "alt" | undefined;
|
|
96
|
-
attrs?: string[] | undefined;
|
|
97
99
|
source?: {
|
|
98
100
|
file: string;
|
|
99
101
|
line: number;
|
|
100
102
|
column?: number | undefined;
|
|
101
103
|
} | undefined;
|
|
104
|
+
name?: string | undefined;
|
|
105
|
+
by?: "text" | "testid" | "role" | "component" | "label" | "placeholder" | "alt" | undefined;
|
|
106
|
+
attrs?: string[] | undefined;
|
|
102
107
|
scope?: string | undefined;
|
|
103
108
|
self?: boolean | undefined;
|
|
109
|
+
matchCase?: boolean | undefined;
|
|
104
110
|
}, {
|
|
105
111
|
text?: string | undefined;
|
|
106
112
|
testid?: string | undefined;
|
|
@@ -110,16 +116,17 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
110
116
|
placeholder?: string | undefined;
|
|
111
117
|
alt?: string | undefined;
|
|
112
118
|
value?: string | undefined;
|
|
113
|
-
name?: string | undefined;
|
|
114
|
-
by?: "text" | "testid" | "role" | "component" | "label" | "placeholder" | "alt" | undefined;
|
|
115
|
-
attrs?: string[] | undefined;
|
|
116
119
|
source?: {
|
|
117
120
|
file: string;
|
|
118
121
|
line: number;
|
|
119
122
|
column?: number | undefined;
|
|
120
123
|
} | undefined;
|
|
124
|
+
name?: string | undefined;
|
|
125
|
+
by?: "text" | "testid" | "role" | "component" | "label" | "placeholder" | "alt" | undefined;
|
|
126
|
+
attrs?: string[] | undefined;
|
|
121
127
|
scope?: string | undefined;
|
|
122
128
|
self?: boolean | undefined;
|
|
129
|
+
matchCase?: boolean | undefined;
|
|
123
130
|
}>;
|
|
124
131
|
export type ElementQuery = z.infer<typeof ElementQuerySchema>;
|
|
125
132
|
/** Compact semantic descriptor of one element surfaced to the agent. */
|
|
@@ -224,6 +231,12 @@ export interface QueryEmptyHint {
|
|
|
224
231
|
* the recovery is `{ scope: <ref>, self: true }` rather than another guess at the text.
|
|
225
232
|
*/
|
|
226
233
|
splitText?: ElementDescriptor;
|
|
234
|
+
/**
|
|
235
|
+
* Present only when a case-exact TEXT check missed and the page shows the text in another case:
|
|
236
|
+
* what it shows. Reported as "split across children" before, with the same failing check as the
|
|
237
|
+
* recovery; the recovery is `ignoreCase: true`.
|
|
238
|
+
*/
|
|
239
|
+
caseMiss?: string;
|
|
227
240
|
/**
|
|
228
241
|
* Present only when a ROLE+NAME search missed and that role DOES carry a nearly-matching name.
|
|
229
242
|
*
|
|
@@ -234,6 +247,13 @@ export interface QueryEmptyHint {
|
|
|
234
247
|
* stays exact; the miss answers.
|
|
235
248
|
*/
|
|
236
249
|
nameNearMiss?: string[];
|
|
250
|
+
/**
|
|
251
|
+
* Present only when a TESTID search missed and the value IS on the page under a different test-id
|
|
252
|
+
* attribute (`data-test-subj`, `data-cy`, ...). The testid locator reads one attribute; naming the
|
|
253
|
+
* one that holds the value turns "matched no element" into a one-line config fix
|
|
254
|
+
* (`testIdAttribute` in `.reticle.json`).
|
|
255
|
+
*/
|
|
256
|
+
testidFoundUnder?: string;
|
|
237
257
|
}
|
|
238
258
|
/** Result of the QUERY command / reticle_query tool. `hint` present ONLY on zero matches. */
|
|
239
259
|
export interface QueryResult {
|
package/dist/wire/types.js
CHANGED
|
@@ -71,6 +71,11 @@ export const ElementQuerySchema = z
|
|
|
71
71
|
* verification was handed back to the human. Requires `scope`.
|
|
72
72
|
*/
|
|
73
73
|
self: z.boolean().optional(),
|
|
74
|
+
/**
|
|
75
|
+
* Compare `text` with its case intact. A search is forgiving about case; a CHECK is not — the
|
|
76
|
+
* text predicate sends this, so "Saved Priya" can fail against a page reading "Saved priya".
|
|
77
|
+
*/
|
|
78
|
+
matchCase: z.boolean().optional(),
|
|
74
79
|
})
|
|
75
80
|
.strict();
|
|
76
81
|
/** One named flow advertised by the app (mirrors the browser CapabilityFlow). */
|
|
@@ -23,6 +23,13 @@ export declare const NoSessionReason: {
|
|
|
23
23
|
readonly LEASE_EXPIRED: "lease_expired";
|
|
24
24
|
/** Connected before; the tab was closed, navigated away, or hard-reloaded. */
|
|
25
25
|
readonly TAB_GONE: "tab_gone";
|
|
26
|
+
/**
|
|
27
|
+
* Connected before, and the SDK reported the page navigating away just before the socket
|
|
28
|
+
* closed (#1256). A load-time `location.assign` to an uninstrumented page used to read as
|
|
29
|
+
* TAB_GONE — the daemon only saw the socket close. This is the departure note outranking the
|
|
30
|
+
* hedge: the tab was not closed, it left for somewhere named.
|
|
31
|
+
*/
|
|
32
|
+
readonly NAVIGATED_AWAY: "navigated_away";
|
|
26
33
|
/**
|
|
27
34
|
* Connected before, and the route the tab was on answers 5xx right now. A server error tears the
|
|
28
35
|
* page down and the SDK never reconnects, so it used to read as TAB_GONE — the URL was known, and
|
|
@@ -23,6 +23,13 @@ export const NoSessionReason = {
|
|
|
23
23
|
LEASE_EXPIRED: 'lease_expired',
|
|
24
24
|
/** Connected before; the tab was closed, navigated away, or hard-reloaded. */
|
|
25
25
|
TAB_GONE: 'tab_gone',
|
|
26
|
+
/**
|
|
27
|
+
* Connected before, and the SDK reported the page navigating away just before the socket
|
|
28
|
+
* closed (#1256). A load-time `location.assign` to an uninstrumented page used to read as
|
|
29
|
+
* TAB_GONE — the daemon only saw the socket close. This is the departure note outranking the
|
|
30
|
+
* hedge: the tab was not closed, it left for somewhere named.
|
|
31
|
+
*/
|
|
32
|
+
NAVIGATED_AWAY: 'navigated_away',
|
|
26
33
|
/**
|
|
27
34
|
* Connected before, and the route the tab was on answers 5xx right now. A server error tears the
|
|
28
35
|
* page down and the SDK never reconnects, so it used to read as TAB_GONE — the URL was known, and
|