@reticlehq/core 3.6.0 → 3.8.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/activation-entry.d.ts +9 -0
- package/dist/activation-entry.js +9 -0
- package/dist/artifacts/artifacts-entry.d.ts +2 -0
- package/dist/artifacts/artifacts-entry.js +2 -0
- package/dist/artifacts/drive-script.d.ts +222 -116
- package/dist/artifacts/drive-script.js +24 -1
- package/dist/artifacts/flow-constants.d.ts +33 -0
- package/dist/artifacts/flow-constants.js +35 -0
- package/dist/artifacts/flow-expect-flat.d.ts +8 -8
- package/dist/artifacts/flow-results.d.ts +461 -0
- package/dist/artifacts/flow-results.js +1 -0
- package/dist/artifacts/flow-types.d.ts +177 -543
- package/dist/artifacts/flow-types.js +17 -2
- package/dist/artifacts/harness-credits.d.ts +42 -0
- package/dist/artifacts/harness-credits.js +72 -0
- package/dist/artifacts/harness-map.d.ts +98 -0
- package/dist/artifacts/harness-map.js +36 -0
- package/dist/artifacts/impact.d.ts +355 -149
- package/dist/artifacts/impact.js +84 -49
- package/dist/artifacts/journal.d.ts +81 -11
- package/dist/artifacts/journal.js +39 -0
- package/dist/artifacts/prompt-context.d.ts +12 -0
- package/dist/artifacts/prompt-context.js +14 -3
- package/dist/artifacts/screenshot-upload.d.ts +51 -0
- package/dist/artifacts/screenshot-upload.js +26 -0
- package/dist/graph/app-graph.d.ts +137 -0
- package/dist/graph/app-graph.js +498 -0
- package/dist/hooks/hook-events.d.ts +26 -26
- package/dist/hud-entry.d.ts +1 -0
- package/dist/hud-entry.js +2 -0
- package/dist/identity/checkout.d.ts +41 -0
- package/dist/identity/checkout.js +118 -0
- package/dist/identity/state-dir.d.ts +23 -0
- package/dist/identity/state-dir.js +43 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +15 -0
- package/dist/onboarding.d.ts +30 -1
- package/dist/onboarding.js +25 -0
- package/dist/realm/registry.js +19 -1
- package/dist/registry/dev-server-registry.d.ts +2 -2
- package/dist/schema/command-message.json +30 -0
- package/dist/schema/command-name.json +3 -1
- package/dist/schema/event-message.json +3 -1
- package/dist/schema/event-payloads.json +156 -3
- package/dist/schema/event-type.json +3 -1
- package/dist/schema/hello-message.json +21 -0
- package/dist/schema/reticle-event.json +3 -1
- package/dist/schema/reticle-message.json +54 -1
- package/dist/telemetry-bug.d.ts +169 -0
- package/dist/telemetry-bug.js +123 -0
- package/dist/telemetry-entry.d.ts +2 -1
- package/dist/telemetry-entry.js +2 -1
- package/dist/telemetry-feedback.d.ts +16 -2
- package/dist/telemetry-feedback.js +19 -0
- package/dist/telemetry-session.d.ts +91 -2
- package/dist/telemetry-session.js +65 -0
- package/dist/telemetry-signals.d.ts +557 -0
- package/dist/telemetry-signals.js +225 -0
- package/dist/telemetry.d.ts +649 -296
- package/dist/telemetry.js +110 -119
- package/dist/verdict/check-sentence.d.ts +34 -0
- package/dist/verdict/check-sentence.js +228 -0
- package/dist/verdict/consequence.d.ts +15 -0
- package/dist/verdict/consequence.js +11 -0
- package/dist/verdict/disparity.d.ts +105 -0
- package/dist/verdict/disparity.js +40 -0
- package/dist/verdict/findings.d.ts +16 -0
- package/dist/verdict/findings.js +22 -0
- package/dist/verdict/instrumentation-coverage.d.ts +84 -0
- package/dist/verdict/instrumentation-coverage.js +182 -0
- package/dist/verdict/instrumentation-gap.d.ts +79 -0
- package/dist/verdict/instrumentation-gap.js +65 -1
- package/dist/verdict/intent.d.ts +19 -5
- package/dist/verdict/intent.js +13 -1
- package/dist/verdict/predicate-tree.d.ts +17 -0
- package/dist/verdict/predicate-tree.js +37 -0
- package/dist/verdict/predicate.d.ts +16 -1
- package/dist/verdict/predicate.js +188 -13
- package/dist/verdict/property-assertion.d.ts +2 -2
- package/dist/verdict/run-report.d.ts +166 -0
- package/dist/verdict/run-report.js +53 -0
- package/dist/verdict/security.d.ts +60 -1
- package/dist/verdict/security.js +174 -12
- package/dist/verdict/verification-run.d.ts +713 -68
- package/dist/verdict/verification-run.js +113 -0
- package/dist/verdict/verify-progress.d.ts +6 -6
- package/dist/wire/constants/constants.d.ts +69 -155
- package/dist/wire/constants/constants.js +78 -159
- package/dist/wire/constants/discovery.d.ts +4 -4
- package/dist/wire/constants/discovery.js +4 -4
- package/dist/wire/constants/event-types.d.ts +35 -1
- package/dist/wire/constants/event-types.js +33 -1
- package/dist/wire/constants/hud-controls.js +15 -5
- package/dist/wire/constants/hud-use.d.ts +33 -4
- package/dist/wire/constants/hud-use.js +30 -4
- package/dist/wire/constants/mcp-wire.d.ts +26 -0
- package/dist/wire/constants/mcp-wire.js +26 -0
- package/dist/wire/constants/response-body-reason.d.ts +19 -0
- package/dist/wire/constants/response-body-reason.js +18 -0
- package/dist/wire/constants/reticle-chrome.d.ts +19 -0
- package/dist/wire/constants/reticle-chrome.js +19 -0
- package/dist/wire/constants/reticle-env.d.ts +138 -0
- package/dist/wire/constants/reticle-env.js +138 -0
- package/dist/wire/constants/session-constants.d.ts +26 -2
- package/dist/wire/constants/session-constants.js +26 -2
- package/dist/wire/desktop-contract.d.ts +8 -0
- package/dist/wire/desktop-contract.js +11 -0
- package/dist/wire/event-payloads.d.ts +202 -36
- package/dist/wire/event-payloads.js +100 -16
- package/dist/wire/messages.d.ts +193 -54
- package/dist/wire/messages.js +25 -1
- package/dist/wire/narrow.d.ts +6 -0
- package/dist/wire/narrow.js +26 -0
- package/dist/wire/next-step.d.ts +90 -0
- package/dist/wire/next-step.js +37 -0
- package/dist/wire/platform-link.d.ts +84 -0
- package/dist/wire/platform-link.js +57 -6
- package/dist/wire/production/activation-ticket.d.ts +64 -0
- package/dist/wire/production/activation-ticket.js +148 -0
- package/dist/wire/production/hello-mode.d.ts +35 -0
- package/dist/wire/production/hello-mode.js +32 -0
- package/dist/wire/production/production-policy.d.ts +138 -0
- package/dist/wire/production/production-policy.js +133 -0
- package/dist/wire/tool-names.d.ts +4 -0
- package/dist/wire/tool-names.js +4 -0
- package/dist/wire/types.d.ts +90 -52
- package/dist/wire/types.js +5 -0
- package/dist/words/notices.d.ts +1 -1
- package/dist/words/notices.js +1 -1
- 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 +5 -1
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Wire-level constants. No free strings anywhere in Reticle reference these directly —
|
|
3
3
|
* every string/number that crosses the browser <-> bridge <-> agent boundary is named here.
|
|
4
4
|
*/
|
|
5
|
+
import { ReticleEnv } from './reticle-env.js';
|
|
5
6
|
export const RETICLE_DEFAULT_PORT = 4400;
|
|
6
7
|
export const RETICLE_WS_PATH = '/reticle';
|
|
7
|
-
|
|
8
|
-
export const MCP_SSE_PATH = '/mcp/sse';
|
|
9
|
-
export const MCP_MESSAGE_PATH = '/mcp/message';
|
|
8
|
+
export * from './mcp-wire.js';
|
|
10
9
|
/**
|
|
11
10
|
* The name this MCP server answers to — in its own `serverInfo` handshake, and in the registration
|
|
12
11
|
* an installer writes into an agent's config. Those must be the same string or the agent registers
|
|
@@ -30,6 +29,12 @@ export const MCP_SERVER_NAME = 'reticle';
|
|
|
30
29
|
export const MCP_SHUTDOWN_EVENT = 'reticle-shutdown';
|
|
31
30
|
/** Local-only daemon introspection — `reticle status` GETs this for sessions + health at a glance. */
|
|
32
31
|
export const STATUS_PATH = '/status';
|
|
32
|
+
/**
|
|
33
|
+
* Local-only stop request — `reticle stop` and `reticle kill` POST here first, with the pairing token
|
|
34
|
+
* as a bearer token. It runs the daemon's normal shutdown path. A signal cannot do that on Windows,
|
|
35
|
+
* where it ends the process at once.
|
|
36
|
+
*/
|
|
37
|
+
export const SHUTDOWN_PATH = '/shutdown';
|
|
33
38
|
/**
|
|
34
39
|
* Query flag on STATUS_PATH: the caller (a running `reticle init`) is waiting on this daemon, so it
|
|
35
40
|
* must not idle out yet. Without it the daemon init started exited mid-wait on a slow desktop build.
|
|
@@ -105,138 +110,7 @@ export const RETICLE_URL_PARAM = {
|
|
|
105
110
|
};
|
|
106
111
|
/** The loopback bind address. The daemon/bridge bind here by default — never expose Reticle off-host. */
|
|
107
112
|
export const LOOPBACK_HOST = '127.0.0.1';
|
|
108
|
-
|
|
109
|
-
* Every environment variable Reticle reads, named once. A misspelled inline env string silently
|
|
110
|
-
* disables the control it gates (e.g. a typo'd `RETICLE_TOKEN` would disable auth) — so the names live
|
|
111
|
-
* here and nowhere else. The values are the literal process.env keys.
|
|
112
|
-
*/
|
|
113
|
-
export const ReticleEnv = {
|
|
114
|
-
/** "0"/"false"/"off" turns off telemetry and every optional outbound call; DO_NOT_TRACK too. */
|
|
115
|
-
TELEMETRY: 'RETICLE_TELEMETRY',
|
|
116
|
-
DO_NOT_TRACK: 'DO_NOT_TRACK',
|
|
117
|
-
/** Shared-secret the browser SDK must present in HELLO; absent ⇒ loopback-trust only. */
|
|
118
|
-
TOKEN: 'RETICLE_TOKEN',
|
|
119
|
-
/** Bridge bind host. Defaults to loopback; setting anything else is opt-in remote exposure. */
|
|
120
|
-
HOST: 'RETICLE_HOST',
|
|
121
|
-
/** Comma-separated WS Origin allow-list for the bridge. */
|
|
122
|
-
ALLOWED_ORIGINS: 'RETICLE_ALLOWED_ORIGINS',
|
|
123
|
-
/** Bridge/daemon WS port override. */
|
|
124
|
-
PORT: 'RETICLE_PORT',
|
|
125
|
-
/** Daemon state — pidfiles, discovery registry, logs. Defaults to `~/.reticle`. Overridable
|
|
126
|
-
* because a read-only $HOME (sandboxed agent, locked-down Windows profile, container) otherwise
|
|
127
|
-
* makes the daemon unstartable with a raw EACCES naming nothing. Reported by a Windows user. */
|
|
128
|
-
STATE_DIR: 'RETICLE_STATE_DIR',
|
|
129
|
-
/** Attach to an already-running browser over CDP instead of launching one. */
|
|
130
|
-
CDP_URL: 'RETICLE_CDP_URL',
|
|
131
|
-
/** The Chromium executable to launch, in place of Playwright's own build or an installed Chrome. */
|
|
132
|
-
CHROMIUM_PATH: 'RETICLE_CHROMIUM_PATH',
|
|
133
|
-
/** Max simultaneous leased headless contexts in the browser pool (resource cap). */
|
|
134
|
-
MAX_CONTEXTS: 'RETICLE_MAX_CONTEXTS',
|
|
135
|
-
/**
|
|
136
|
-
* Inbound events per second before the bridge starts SAMPLING (never disconnecting).
|
|
137
|
-
*
|
|
138
|
-
* Raise it for a legitimately busy app — a streaming dashboard, a live grid — rather than accept
|
|
139
|
-
* partial coverage. Free and local: the daemon runs on the same machine, so a higher ceiling costs
|
|
140
|
-
* nothing to anyone.
|
|
141
|
-
*/
|
|
142
|
-
MAX_MESSAGES_PER_SECOND: 'RETICLE_MAX_MESSAGES_PER_SECOND',
|
|
143
|
-
/** Bearer token required by the optional `reticle serve --http` verify endpoint. */
|
|
144
|
-
VERIFY_TOKEN: 'RETICLE_VERIFY_TOKEN',
|
|
145
|
-
/** Ms of continuous idleness (no agent, no browser session, no lease) before the daemon self-exits;
|
|
146
|
-
* `0` disables. Keeps Reticle from lingering on a user's machine after the editor closes. */
|
|
147
|
-
IDLE_SHUTDOWN: 'RETICLE_IDLE_SHUTDOWN_MS',
|
|
148
|
-
/** Idle re-check cadence (default 30s). Overridable so daemon-lifecycle-test can watch a full
|
|
149
|
-
* exit/wake cycle in seconds rather than minutes. */
|
|
150
|
-
IDLE_CHECK: 'RETICLE_IDLE_CHECK_MS',
|
|
151
|
-
/**
|
|
152
|
-
* Grace for a daemon with an agent ATTACHED. Longer than the base on purpose: quiet with a client
|
|
153
|
-
* present means a slow install or a thinking human, not an unwanted daemon — a flat 5 minutes was
|
|
154
|
-
* killing live runs mid-install. Derived from the base when unset.
|
|
155
|
-
*/
|
|
156
|
-
IDLE_ATTACHED: 'RETICLE_IDLE_ATTACHED_MS',
|
|
157
|
-
/**
|
|
158
|
-
* How often the daemon writes `reticle_daemon_alive`, so a GAP in its log is evidence it died.
|
|
159
|
-
*
|
|
160
|
-
* Overridable for the same reason the idle windows are: a spec that has to prove "a killed daemon
|
|
161
|
-
* is distinguishable from a tidy one" cannot wait 30 seconds per beat, and a spec that instead
|
|
162
|
-
* re-implements the cadence is insensitive to the thing it claims to guard.
|
|
163
|
-
*/
|
|
164
|
-
HEARTBEAT: 'RETICLE_HEARTBEAT_MS',
|
|
165
|
-
/** Directory holding the auto-provisioned pairing token. Defaults to ~/.reticle; relocatable for CI. */
|
|
166
|
-
PAIRING_TOKEN_DIR: 'RETICLE_PAIRING_TOKEN_DIR',
|
|
167
|
-
/** Force the durable causal journal off (`0`/`false`/`off`) or on (`1`/`true`/`on`); default on. */
|
|
168
|
-
JOURNAL: 'RETICLE_JOURNAL',
|
|
169
|
-
/**
|
|
170
|
-
* Verbose internal flow tracing for people working ON Reticle (`1`/`true`/`on`); default off.
|
|
171
|
-
*
|
|
172
|
-
* Distinct from the journal, which records what the AGENT did to the app. This records what
|
|
173
|
-
* RETICLE did to answer it: one line per internal stage, with its duration and nesting, so a
|
|
174
|
-
* developer can see which code a tool call actually went through and where the time went.
|
|
175
|
-
* Off by default and free when off — a trace on every tool call is a cost on the hot path.
|
|
176
|
-
*/
|
|
177
|
-
TRACE: 'RETICLE_TRACE',
|
|
178
|
-
/**
|
|
179
|
-
* How many consecutive reconnects the MCP proxy attempts before it stops retrying and goes
|
|
180
|
-
* dormant. Overridable for the same reason the idle windows are: the real budget takes MINUTES to
|
|
181
|
-
* exhaust, so the one spec that proves the proxy SURVIVES exhaustion could not run at all without
|
|
182
|
-
* shortening it. A budget nobody can reach in a test is a budget nobody tests.
|
|
183
|
-
*/
|
|
184
|
-
RECONNECT_ATTEMPTS: 'RETICLE_RECONNECT_ATTEMPTS',
|
|
185
|
-
/** Quiet window before an abandoned MCP stdio proxy exits; `0` disables the watcher. */
|
|
186
|
-
MCP_PROXY_IDLE: 'RETICLE_MCP_PROXY_IDLE_MS',
|
|
187
|
-
/**
|
|
188
|
-
* API key for the harness — the model that drives the app when no coding agent is in the loop.
|
|
189
|
-
*
|
|
190
|
-
* The standard Anthropic name, on purpose: a machine that can already run a coding agent can
|
|
191
|
-
* already run the harness, with nothing to configure. Absent ⇒ the harness is simply unavailable
|
|
192
|
-
* and every other part of Reticle is unaffected.
|
|
193
|
-
*/
|
|
194
|
-
HARNESS_KEY: 'ANTHROPIC_API_KEY',
|
|
195
|
-
/** Model the harness drives with. Defaults to a small one — see `DEFAULT_HARNESS_MODEL`. */
|
|
196
|
-
HARNESS_MODEL: 'RETICLE_HARNESS_MODEL',
|
|
197
|
-
/** Base URL for the harness's model API, for a proxy or a gateway. */
|
|
198
|
-
HARNESS_BASE_URL: 'RETICLE_HARNESS_BASE_URL',
|
|
199
|
-
/** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
|
|
200
|
-
HARNESS_MAX_STEPS: 'RETICLE_HARNESS_MAX_STEPS',
|
|
201
|
-
/**
|
|
202
|
-
* Which model backs the harness driver: `anthropic` (the default) or `jev`.
|
|
203
|
-
*
|
|
204
|
-
* Two drivers exist because the driver's job turns out not to need a text generator. It picks the
|
|
205
|
-
* next action and says what it expects; the verdict is decided afterwards by the engine, with no
|
|
206
|
-
* model anywhere near it. A System One model answers typed questions against a state, which is
|
|
207
|
-
* exactly that job and none of the rest, so it can drive without being able to generate a
|
|
208
|
-
* sentence. Unset keeps the existing behaviour for everybody who has not asked for this.
|
|
209
|
-
*/
|
|
210
|
-
HARNESS_DRIVER: 'RETICLE_HARNESS_DRIVER',
|
|
211
|
-
/**
|
|
212
|
-
* A direct Jev key, for this repo's own benchmarks and for anyone holding a TypeSafe account.
|
|
213
|
-
*
|
|
214
|
-
* Users are not expected to have one. The ordinary path is the key they already minted on the
|
|
215
|
-
* platform (`RETICLE_API_KEY`), which reaches Jev through the proxy at `RETICLE_CLOUD_URL` —
|
|
216
|
-
* this variable is the escape hatch that skips it, and it takes precedence when both are set so
|
|
217
|
-
* that a developer debugging the upstream is never silently talking to the proxy instead.
|
|
218
|
-
*/
|
|
219
|
-
HARNESS_JEV_KEY: 'JEV_API_KEY',
|
|
220
|
-
/** Base URL for the Jev API, for a proxy or a gateway. Defaults to TypeSafe's own endpoint. */
|
|
221
|
-
HARNESS_JEV_URL: 'RETICLE_HARNESS_JEV_URL',
|
|
222
|
-
/** A direct OpenAI key. As with Jev, the ordinary path is the platform key and its proxy. */
|
|
223
|
-
HARNESS_OPENAI_KEY: 'OPENAI_API_KEY',
|
|
224
|
-
/** Model the OpenAI driver uses. Defaults to a small one — see `DEFAULT_OPENAI_MODEL`. */
|
|
225
|
-
HARNESS_OPENAI_MODEL: 'RETICLE_HARNESS_OPENAI_MODEL',
|
|
226
|
-
/**
|
|
227
|
-
* The API key minted on the platform, and the host it belongs to.
|
|
228
|
-
*
|
|
229
|
-
* Read through `apiKeyFrom()`, never directly — see the note on that function for why there are
|
|
230
|
-
* two names for one key and why neither may be dropped.
|
|
231
|
-
*/
|
|
232
|
-
API_KEY: 'RETICLE_API_KEY',
|
|
233
|
-
/** The name this key had until 2026-09. Still honoured; see `apiKeyFrom()`. */
|
|
234
|
-
CLOUD_KEY: 'RETICLE_CLOUD_KEY',
|
|
235
|
-
/** The platform host. Read through `cloudUrlFrom()`, which also accepts `URL`. */
|
|
236
|
-
CLOUD_URL: 'RETICLE_CLOUD_URL',
|
|
237
|
-
/** The short name for `CLOUD_URL`, which people type first. `CLOUD_URL` wins when both are set. */
|
|
238
|
-
URL: 'RETICLE_URL',
|
|
239
|
-
};
|
|
113
|
+
export { ReticleEnv } from './reticle-env.js';
|
|
240
114
|
/**
|
|
241
115
|
* The platform API key, whichever name it arrives under.
|
|
242
116
|
*
|
|
@@ -255,16 +129,18 @@ export const ReticleEnv = {
|
|
|
255
129
|
*/
|
|
256
130
|
export function apiKeyFrom(env) {
|
|
257
131
|
const current = env[ReticleEnv.API_KEY];
|
|
258
|
-
if (current !== undefined && 0 < current.length)
|
|
132
|
+
if (current !== undefined && 0 < current.length) {
|
|
259
133
|
return current;
|
|
134
|
+
}
|
|
260
135
|
const legacy = env[ReticleEnv.CLOUD_KEY];
|
|
261
136
|
return legacy !== undefined && 0 < legacy.length ? legacy : undefined;
|
|
262
137
|
}
|
|
263
138
|
/** The platform URL, under either name — one function so no caller forgets the second. */
|
|
264
139
|
export function cloudUrlFrom(env) {
|
|
265
140
|
const canonical = env[ReticleEnv.CLOUD_URL];
|
|
266
|
-
if (canonical !== undefined && 0 < canonical.length)
|
|
141
|
+
if (canonical !== undefined && 0 < canonical.length) {
|
|
267
142
|
return canonical;
|
|
143
|
+
}
|
|
268
144
|
const short = env[ReticleEnv.URL];
|
|
269
145
|
return short !== undefined && 0 < short.length ? short : undefined;
|
|
270
146
|
}
|
|
@@ -274,8 +150,9 @@ export const DEFAULT_PLATFORM_URL = 'https://app.reticle.sh';
|
|
|
274
150
|
export function platformUrlFrom(env) {
|
|
275
151
|
// A loop, not /\/+$/: that pattern is polynomial on a value made of many slashes.
|
|
276
152
|
let url = cloudUrlFrom(env) ?? DEFAULT_PLATFORM_URL;
|
|
277
|
-
while (url.endsWith('/'))
|
|
153
|
+
while (url.endsWith('/')) {
|
|
278
154
|
url = url.slice(0, -1);
|
|
155
|
+
}
|
|
279
156
|
return url;
|
|
280
157
|
}
|
|
281
158
|
/**
|
|
@@ -371,8 +248,27 @@ export const DANGEROUS_ACTION_CONFIRM_ARG = 'confirmDangerous';
|
|
|
371
248
|
* through the SDK instead.
|
|
372
249
|
*/
|
|
373
250
|
export const NATIVE_INPUT_ARG = 'native';
|
|
251
|
+
/**
|
|
252
|
+
* INSPECT argument: scroll an off-viewport element to the center before it is measured. The real-input
|
|
253
|
+
* path sends it, because a real pointer aimed at an off-viewport box lands on nothing (#1711).
|
|
254
|
+
*/
|
|
255
|
+
export const INSPECT_REVEAL_ARG = 'reveal';
|
|
256
|
+
/**
|
|
257
|
+
* INSPECT result field, present only when `INSPECT_REVEAL_ARG` was sent: whether the element's center
|
|
258
|
+
* is inside the viewport, measured after the scroll. An SDK that predates it omits it, and a caller
|
|
259
|
+
* must read that absence as unknown, never as out of view.
|
|
260
|
+
*/
|
|
261
|
+
export const INSPECT_IN_VIEWPORT_FIELD = 'inViewport';
|
|
374
262
|
/** Schema version stamped onto compiled replay programs. */
|
|
375
263
|
export const REPLAY_PROGRAM_VERSION = 1;
|
|
264
|
+
/**
|
|
265
|
+
* The instruction files `reticle init` writes its Reticle section into, and the line that opens the
|
|
266
|
+
* section. `init` writes it and the server reads it, so both take it from here.
|
|
267
|
+
*/
|
|
268
|
+
export const AgentRules = {
|
|
269
|
+
FILES: ['CLAUDE.md', 'AGENTS.md'],
|
|
270
|
+
BEGIN: '<!-- reticle:begin (managed by `reticle init` — edit outside these markers) -->',
|
|
271
|
+
};
|
|
376
272
|
/** The git-checked Reticle workspace directory + its layout. No free strings. */
|
|
377
273
|
export const ReticleDir = {
|
|
378
274
|
ROOT: '.reticle',
|
|
@@ -405,6 +301,8 @@ export const ReticleDir = {
|
|
|
405
301
|
VISUAL_SUBDIR: 'visual',
|
|
406
302
|
/** verification-run artifacts —.reticle/runs/<runId>.json (the OEM/CI-consumable verdict). */
|
|
407
303
|
RUNS_SUBDIR: 'runs',
|
|
304
|
+
/** Dev-server logs, only when the state home cannot be written. Machine-local, like `runs/`. */
|
|
305
|
+
LOGS_SUBDIR: 'logs',
|
|
408
306
|
/** fail-to-pass bug capsules —.reticle/capsules/<id>.json (a minimal failing flow + its evidence). */
|
|
409
307
|
CAPSULES_SUBDIR: 'capsules',
|
|
410
308
|
/**
|
|
@@ -419,6 +317,11 @@ export const ReticleDir = {
|
|
|
419
317
|
PLANS_SUBDIR: 'plans',
|
|
420
318
|
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
421
319
|
SESSIONS_SUBDIR: 'sessions',
|
|
320
|
+
/**
|
|
321
|
+
* Every tool call an agent made, in full, with what it did to the page —
|
|
322
|
+
* .reticle/episodes/<connection>.jsonl. Local evidence: never committed, never sent.
|
|
323
|
+
*/
|
|
324
|
+
EPISODES_SUBDIR: 'episodes',
|
|
422
325
|
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
423
326
|
JOURNAL_EVENTS_FILE: 'events.jsonl',
|
|
424
327
|
/** append-only action ledger inside a session dir (one JournalAction per line). */
|
|
@@ -434,19 +337,23 @@ export const ReticleDir = {
|
|
|
434
337
|
JOURNAL_EVENTS_CLOSED_FILE: 'events.closed.json',
|
|
435
338
|
/** learned expected-envelopes per route, accumulated across runs (the deviation-report baseline). */
|
|
436
339
|
ENVELOPES_FILE: 'envelopes.json',
|
|
437
|
-
|
|
438
|
-
AMBIENT_FILE: 'ambient.json',
|
|
340
|
+
AMBIENT_FILE: 'ambient.json', // learned action-less churn regions, excluded from settle/summaries
|
|
439
341
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
440
342
|
FLAKE_FILE: 'flake.json',
|
|
441
343
|
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
442
344
|
COVERAGE_FILE: 'coverage.json',
|
|
443
345
|
/** Human review marks (HUD notes), pending and resolved — see server portal/session/human. */
|
|
444
346
|
NOTES_FILE: 'notes.json',
|
|
445
|
-
/** The user's latest request
|
|
347
|
+
/** The user's latest request: the newest prompt the hook captured, or the one the agent relayed. Local. */
|
|
446
348
|
REQUEST_FILE: 'request.json',
|
|
349
|
+
/** Every prompt the agent hook captured, one JSON line each, oldest first. `request.json` holds the newest. */
|
|
350
|
+
REQUESTS_LOG_FILE: 'requests.jsonl',
|
|
351
|
+
/** The prompt history moved aside when `requests.jsonl` fills. The same words, so the same rule. */
|
|
352
|
+
REQUESTS_LOG_ROTATED_FILE: 'requests.1.jsonl',
|
|
353
|
+
APP_NOTES_FILE: 'app-notes.json', // confirmed targeting hints for the next session; never evidence
|
|
447
354
|
PLATFORM_MOMENTS_FILE: 'platform-moments.json', // moments already said, so each is said once
|
|
448
355
|
/**
|
|
449
|
-
* the project's cloud binding — .reticle/cloud.json, written by `reticle
|
|
356
|
+
* the project's cloud binding — .reticle/cloud.json, written by `reticle connect`. Git-checked and
|
|
450
357
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
451
358
|
* ~/.reticle/credentials.json instead, because that one must never reach a repository.
|
|
452
359
|
*/
|
|
@@ -507,6 +414,8 @@ export const VisualReason = {
|
|
|
507
414
|
// quietly downgraded: a caller who asked for the whole scroll height and silently got the visible
|
|
508
415
|
// part would bank a baseline that says nothing about the content below the fold.
|
|
509
416
|
FULL_PAGE_UNSUPPORTED: 'full-page-unsupported',
|
|
417
|
+
// Desktop capture returns the whole window and cannot honor clip or ref.
|
|
418
|
+
CROP_UNSUPPORTED: 'crop-unsupported',
|
|
510
419
|
// The shell answered, and the window had no composited frame to photograph yet. Distinct from
|
|
511
420
|
// CAPTURE_FAILED on purpose: the capture ran and the window was empty, which is a timing fact
|
|
512
421
|
// about the window rather than a failure of the capture path. Electron's `capturePage()` returns
|
|
@@ -556,8 +465,8 @@ export const ContractReadError = {
|
|
|
556
465
|
};
|
|
557
466
|
// The event vocabulary lives beside this file and is re-exported here, so `EventType` stays one
|
|
558
467
|
// import path for every consumer. See event-types.ts for why it moved.
|
|
559
|
-
import { EventType } from './event-types.js';
|
|
560
|
-
export { EventType };
|
|
468
|
+
import { CanvasTrigger, EventType, MediaEvent } from './event-types.js';
|
|
469
|
+
export { CanvasTrigger, EventType, MediaEvent };
|
|
561
470
|
/** Bounds for the per-session ring buffer. */
|
|
562
471
|
export const RING_BUFFER_DEFAULTS = {
|
|
563
472
|
MAX_EVENTS: 2000,
|
|
@@ -583,6 +492,11 @@ export const PhenomenonType = {
|
|
|
583
492
|
};
|
|
584
493
|
/** Signal the React adapter fires once hydration commits (handlers attached). Shared browser↔server. */
|
|
585
494
|
export const RETICLE_HYDRATION_SIGNAL = 'reticle:hydration-complete';
|
|
495
|
+
/**
|
|
496
|
+
* Work the app declared it is doing (`reticle.busy(work)`): `{ delta: 1 }` when it starts and
|
|
497
|
+
* `{ delta: -1 }` when it ends. `settled` counts it as in flight, like a request. Shared browser↔server.
|
|
498
|
+
*/
|
|
499
|
+
export const RETICLE_BUSY_SIGNAL = 'reticle:busy';
|
|
586
500
|
/**
|
|
587
501
|
* The registered-store name the React adapter uses for render stats, read via reticle_state. It crosses
|
|
588
502
|
* the wire as a store id AND the browser SDK special-cases it as reticle-owned (so it isn't flagged as
|
|
@@ -676,6 +590,10 @@ export const InputModeReason = {
|
|
|
676
590
|
* permanent for the session, not a transient downgrade, so it should stop asking.
|
|
677
591
|
*/
|
|
678
592
|
NOT_CONFIGURED: 'real-input-not-configured-for-this-session',
|
|
593
|
+
TARGET_NOT_FOCUSABLE: 'target-cannot-hold-focus', // lease press: the named element took no focus
|
|
594
|
+
/** A production drive presses only in the page. A native key goes to whatever holds focus, so
|
|
595
|
+
* the production policy could not judge the control it pressed. */
|
|
596
|
+
PRODUCTION_PRESS_IN_PAGE: 'production-drive-presses-in-page',
|
|
679
597
|
};
|
|
680
598
|
/** Best-effort caveats attached to action results so the agent can interpret a no-op. */
|
|
681
599
|
export const ActionWarning = {
|
|
@@ -688,11 +606,9 @@ export const ActionWarning = {
|
|
|
688
606
|
* actionable. Scroll it into a clear area or dismiss the overlay on top.
|
|
689
607
|
*/
|
|
690
608
|
CLICK_OCCLUDED: 'target is visually occluded by another element; a real user could not click it (synthetic dispatch still delivered the event) — dismiss the overlay or scroll the target clear',
|
|
691
|
-
/**
|
|
692
|
-
* A document-key press (Escape, Tab, a modifier shortcut) was dispatched at the focused
|
|
693
|
-
* element or the document. No named target was given, so the effect must not claim one.
|
|
694
|
-
*/
|
|
609
|
+
/** A document-key press (Escape, Tab, a shortcut) went to the focused element or document. */
|
|
695
610
|
GLOBAL_PRESS: 'press landed on the focused element or document — no named target was given, so this effect does not claim one',
|
|
611
|
+
CLICK_NOT_A_CONTROL: 'target is not a control and sits inside none (no button/link/input role, onclick, tabindex or pointer cursor), so a click on it may do nothing — if nothing happened, target the control inside it by role',
|
|
696
612
|
};
|
|
697
613
|
/** Failure modes when Reticle launches/drives its own browser (`reticle drive`). */
|
|
698
614
|
export const DriveErrorCode = {
|
|
@@ -829,10 +745,7 @@ export const ReticleCommand = {
|
|
|
829
745
|
SCROLL: 'scroll',
|
|
830
746
|
/** Session lifecycle: agent tunes the presenter session (e.g. idle-end timeout) for the app's needs. */
|
|
831
747
|
SESSION_CONFIG: 'session_config',
|
|
832
|
-
/**
|
|
833
|
-
* Live-control: bridge → browser. Pushes the current session state to the panel so an
|
|
834
|
-
* AGENT-driven pause/end keeps the presenter in sync. `args: { state, text? }`.
|
|
835
|
-
*/
|
|
748
|
+
/** Bridge → browser: the session state, so an agent's pause/end syncs the panel. `{ state, text? }`. */
|
|
836
749
|
PRESENTER: 'presenter',
|
|
837
750
|
/**
|
|
838
751
|
* Bridge -> browser: the user's own impact record, so the HUD can show what Reticle has done for
|
|
@@ -849,6 +762,8 @@ export const ReticleCommand = {
|
|
|
849
762
|
* screen-recording permission. Answered only when the app installed the capture helper.
|
|
850
763
|
*/
|
|
851
764
|
CAPTURE: 'capture',
|
|
765
|
+
/** The page drawn in-page to a JPEG, `{ ok, width, height, chunks }` (base64 under the string cap). */
|
|
766
|
+
RENDER: 'render',
|
|
852
767
|
/** Navigate the page to a new URL. `args: { url: string }`. */
|
|
853
768
|
NAVIGATE: 'navigate',
|
|
854
769
|
/** Reload the page. `args: { hard?: boolean }` — hard clears the cache via location replace trick. */
|
|
@@ -859,6 +774,8 @@ export const ReticleCommand = {
|
|
|
859
774
|
FLOW_PROGRESS: 'flow.progress',
|
|
860
775
|
/** Bridge → browser: the Harness's drive plan and each part's status, a `PlanView`. */
|
|
861
776
|
PLAN: 'plan',
|
|
777
|
+
/** The coverage markers (`CoverageMarker`) the app's own page carries; silent, no HUD paint. */
|
|
778
|
+
MARKERS: 'markers',
|
|
862
779
|
};
|
|
863
780
|
/** Presenter intent shown to the human watcher: is the agent reading or acting? */
|
|
864
781
|
export const PresenterMode = {
|
|
@@ -880,17 +797,19 @@ export const MessageKind = {
|
|
|
880
797
|
EVENT: 'event',
|
|
881
798
|
};
|
|
882
799
|
/**
|
|
883
|
-
* WHY a lease came back `ready: false
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* probably does not embed `@reticlehq/core`. A REUSED lease can fail readiness a second way, and it
|
|
887
|
-
* is the opposite problem: an SDK did dial in, and has since stopped answering. The next action
|
|
888
|
-
* differs — check the install versus recover the tab — so the two get names rather than sharing a
|
|
889
|
-
* bare `false`.
|
|
800
|
+
* WHY a lease came back `ready: false`. Each reason wants a different next action — check the
|
|
801
|
+
* install, recover a wedged tab, or bring a hidden one to the front — so they get names rather
|
|
802
|
+
* than sharing a bare `false`.
|
|
890
803
|
*/
|
|
891
804
|
export const LeaseNotReadyReason = {
|
|
892
805
|
/** No SDK dialled in within the wait. The install is the thing to look at. */
|
|
893
806
|
SDK_NEVER_DIALLED: 'sdk_never_dialled',
|
|
894
807
|
/** One dialled in and stopped answering: the tab is attached but wedged. */
|
|
895
808
|
SDK_STOPPED_ANSWERING: 'sdk_stopped_answering',
|
|
809
|
+
/** The SDK answers, but its tab is hidden: timers and rAF are throttled, so nothing on it verifies. */
|
|
810
|
+
TAB_HIDDEN: 'tab_hidden',
|
|
811
|
+
/** The page is not an HTML document (an `.svg`, for example), so the zero-install reader did not run. */
|
|
812
|
+
NOT_HTML_DOCUMENT: 'not_html_document',
|
|
813
|
+
/** The zero-install reader failed, for example because the tab closed during setup. */
|
|
814
|
+
READER_FAILED: 'reader_failed',
|
|
896
815
|
};
|
|
@@ -15,11 +15,11 @@ export declare const DISCOVERY_CALL_URL = "https://calendar.app.google/h9NRDbBBQ
|
|
|
15
15
|
export declare const FOUNDER_EMAIL = "hey@reticle.sh";
|
|
16
16
|
/** A mailto for that address, subject filled so the note is findable in the inbox. A literal: see first-load-size. */
|
|
17
17
|
export declare const FOUNDER_MAILTO = "mailto:hey@reticle.sh?subject=Reticle%20feedback";
|
|
18
|
-
/** How somebody leaves an email instead
|
|
19
|
-
export declare const DISCOVERY_EMAIL_COMMAND = "npx @reticlehq/server
|
|
18
|
+
/** How somebody leaves an email instead: a note with a reply address, sent only when they run it. */
|
|
19
|
+
export declare const DISCOVERY_EMAIL_COMMAND = "npx @reticlehq/server feedback --contact you@company.com \"what you are building\"";
|
|
20
20
|
export declare const DiscoveryInvite: {
|
|
21
21
|
/** Shown to the person using Reticle. */
|
|
22
|
-
readonly HUMAN: "Stuck, or want Reticle to work differently? Talk to the founder: https://calendar.app.google/h9NRDbBBQetyTzWM6 · or
|
|
22
|
+
readonly HUMAN: "Stuck, or want Reticle to work differently? Talk to the founder: https://calendar.app.google/h9NRDbBBQetyTzWM6 · or send a note with your email: npx @reticlehq/server feedback --contact you@company.com \"what you are building\"";
|
|
23
23
|
/** Read by the agent, which passes it on rather than acting on it. */
|
|
24
|
-
readonly AGENT: "If the person you are working with is stuck or Reticle got in their way, offer them a call with the founder (https://calendar.app.google/h9NRDbBBQetyTzWM6) or
|
|
24
|
+
readonly AGENT: "If the person you are working with is stuck or Reticle got in their way, offer them a call with the founder (https://calendar.app.google/h9NRDbBBQetyTzWM6) or a note with their email (npx @reticlehq/server feedback --contact you@company.com \"what you are building\"). Offer it; never book a call or submit an email for them.";
|
|
25
25
|
};
|
|
@@ -15,11 +15,11 @@ export const DISCOVERY_CALL_URL = 'https://calendar.app.google/h9NRDbBBQetyTzWM6
|
|
|
15
15
|
export const FOUNDER_EMAIL = 'hey@reticle.sh';
|
|
16
16
|
/** A mailto for that address, subject filled so the note is findable in the inbox. A literal: see first-load-size. */
|
|
17
17
|
export const FOUNDER_MAILTO = 'mailto:hey@reticle.sh?subject=Reticle%20feedback';
|
|
18
|
-
/** How somebody leaves an email instead
|
|
19
|
-
export const DISCOVERY_EMAIL_COMMAND = 'npx @reticlehq/server
|
|
18
|
+
/** How somebody leaves an email instead: a note with a reply address, sent only when they run it. */
|
|
19
|
+
export const DISCOVERY_EMAIL_COMMAND = 'npx @reticlehq/server feedback --contact you@company.com "what you are building"';
|
|
20
20
|
export const DiscoveryInvite = {
|
|
21
21
|
/** Shown to the person using Reticle. */
|
|
22
|
-
HUMAN: `Stuck, or want Reticle to work differently? Talk to the founder: ${DISCOVERY_CALL_URL} · or
|
|
22
|
+
HUMAN: `Stuck, or want Reticle to work differently? Talk to the founder: ${DISCOVERY_CALL_URL} · or send a note with your email: ${DISCOVERY_EMAIL_COMMAND}`,
|
|
23
23
|
/** Read by the agent, which passes it on rather than acting on it. */
|
|
24
|
-
AGENT: `If the person you are working with is stuck or Reticle got in their way, offer them a call with the founder (${DISCOVERY_CALL_URL}) or
|
|
24
|
+
AGENT: `If the person you are working with is stuck or Reticle got in their way, offer them a call with the founder (${DISCOVERY_CALL_URL}) or a note with their email (${DISCOVERY_EMAIL_COMMAND}). Offer it; never book a call or submit an email for them.`,
|
|
25
25
|
};
|
|
@@ -59,12 +59,15 @@ export declare const EventType: {
|
|
|
59
59
|
/** element focus moved — `data: { to, from, toBody }`. Focus dropping to body after an act is a regression. */
|
|
60
60
|
readonly FOCUS_CHANGE: "focus.change";
|
|
61
61
|
/**
|
|
62
|
-
* a form field's value moved — `data: { field, kind, value?, redacted?, length }`.
|
|
62
|
+
* a form field's value moved — `data: { field, kind, value?, checked?, previous?, previousChecked?, redacted?, length }`.
|
|
63
63
|
*
|
|
64
64
|
* The DOM observer never saw this: `value` is in its attribute allowlist, but React and every
|
|
65
65
|
* controlled input set the PROPERTY, so `MutationObserver` does not fire. `value` is omitted and
|
|
66
66
|
* `redacted` set for a password, a sensitive name, or a payment autocomplete hint; `length` is
|
|
67
67
|
* always present, because "it was wiped" is assertable without carrying anybody's data.
|
|
68
|
+
* `checked` is the checkbox/radio property (`value` there is the HTML value, usually `"on"`).
|
|
69
|
+
* `kind: "settled"` is a read after the action's handlers; `previous` / `previousChecked` are
|
|
70
|
+
* the pre-action reading, so a restore is distinguishable from a render.
|
|
68
71
|
*/
|
|
69
72
|
readonly FIELD_CHANGE: "field.change";
|
|
70
73
|
/** browser → bridge: a human recording compiled in-page. */
|
|
@@ -118,5 +121,36 @@ export declare const EventType: {
|
|
|
118
121
|
* off the wire before the buffer, so no verdict, settle or agent read ever sees it.
|
|
119
122
|
*/
|
|
120
123
|
readonly HUD_USED: "hud.used";
|
|
124
|
+
/**
|
|
125
|
+
* A `<video>` or `<audio>` changed playback state: `data: { event, tag, currentTime, duration?,
|
|
126
|
+
* readyState, paused }`. The event's own `t` orders it against the network, which is what a media
|
|
127
|
+
* defect ("Ready before the response arrived") is: an ordering in time no DOM count shows.
|
|
128
|
+
*/
|
|
129
|
+
readonly MEDIA_STATE: "media.state";
|
|
130
|
+
/**
|
|
131
|
+
* A `<canvas>` drew something different: `data: { digest, width, height, mean }`. A hash of a
|
|
132
|
+
* 16x16 sample of its pixels and their mean colour, emitted only when the digest changes. What a
|
|
133
|
+
* canvas shows never reaches the DOM, so without this a canvas app's output is invisible.
|
|
134
|
+
*/
|
|
135
|
+
readonly CANVAS_DIGEST: "canvas.digest";
|
|
121
136
|
};
|
|
122
137
|
export type EventType = (typeof EventType)[keyof typeof EventType];
|
|
138
|
+
/** The media events `MEDIA_STATE` reports. Not `timeupdate`: it fires several times a second. */
|
|
139
|
+
export declare const MediaEvent: {
|
|
140
|
+
readonly PLAY: "play";
|
|
141
|
+
readonly PLAYING: "playing";
|
|
142
|
+
readonly PAUSE: "pause";
|
|
143
|
+
readonly SEEKED: "seeked";
|
|
144
|
+
readonly ENDED: "ended";
|
|
145
|
+
readonly LOADED_DATA: "loadeddata";
|
|
146
|
+
readonly CAN_PLAY: "canplay";
|
|
147
|
+
readonly WAITING: "waiting";
|
|
148
|
+
readonly ERROR: "error";
|
|
149
|
+
};
|
|
150
|
+
export type MediaEvent = (typeof MediaEvent)[keyof typeof MediaEvent];
|
|
151
|
+
/** What took a `CANVAS_DIGEST`: the 500 ms poll, or the end of an act (inside its window). */
|
|
152
|
+
export declare const CanvasTrigger: {
|
|
153
|
+
readonly POLL: "poll";
|
|
154
|
+
readonly ACT: "act";
|
|
155
|
+
};
|
|
156
|
+
export type CanvasTrigger = (typeof CanvasTrigger)[keyof typeof CanvasTrigger];
|
|
@@ -59,12 +59,15 @@ export const EventType = {
|
|
|
59
59
|
/** element focus moved — `data: { to, from, toBody }`. Focus dropping to body after an act is a regression. */
|
|
60
60
|
FOCUS_CHANGE: 'focus.change',
|
|
61
61
|
/**
|
|
62
|
-
* a form field's value moved — `data: { field, kind, value?, redacted?, length }`.
|
|
62
|
+
* a form field's value moved — `data: { field, kind, value?, checked?, previous?, previousChecked?, redacted?, length }`.
|
|
63
63
|
*
|
|
64
64
|
* The DOM observer never saw this: `value` is in its attribute allowlist, but React and every
|
|
65
65
|
* controlled input set the PROPERTY, so `MutationObserver` does not fire. `value` is omitted and
|
|
66
66
|
* `redacted` set for a password, a sensitive name, or a payment autocomplete hint; `length` is
|
|
67
67
|
* always present, because "it was wiped" is assertable without carrying anybody's data.
|
|
68
|
+
* `checked` is the checkbox/radio property (`value` there is the HTML value, usually `"on"`).
|
|
69
|
+
* `kind: "settled"` is a read after the action's handlers; `previous` / `previousChecked` are
|
|
70
|
+
* the pre-action reading, so a restore is distinguishable from a render.
|
|
68
71
|
*/
|
|
69
72
|
FIELD_CHANGE: 'field.change',
|
|
70
73
|
/** browser → bridge: a human recording compiled in-page. */
|
|
@@ -118,4 +121,33 @@ export const EventType = {
|
|
|
118
121
|
* off the wire before the buffer, so no verdict, settle or agent read ever sees it.
|
|
119
122
|
*/
|
|
120
123
|
HUD_USED: 'hud.used',
|
|
124
|
+
/**
|
|
125
|
+
* A `<video>` or `<audio>` changed playback state: `data: { event, tag, currentTime, duration?,
|
|
126
|
+
* readyState, paused }`. The event's own `t` orders it against the network, which is what a media
|
|
127
|
+
* defect ("Ready before the response arrived") is: an ordering in time no DOM count shows.
|
|
128
|
+
*/
|
|
129
|
+
MEDIA_STATE: 'media.state',
|
|
130
|
+
/**
|
|
131
|
+
* A `<canvas>` drew something different: `data: { digest, width, height, mean }`. A hash of a
|
|
132
|
+
* 16x16 sample of its pixels and their mean colour, emitted only when the digest changes. What a
|
|
133
|
+
* canvas shows never reaches the DOM, so without this a canvas app's output is invisible.
|
|
134
|
+
*/
|
|
135
|
+
CANVAS_DIGEST: 'canvas.digest',
|
|
136
|
+
};
|
|
137
|
+
/** The media events `MEDIA_STATE` reports. Not `timeupdate`: it fires several times a second. */
|
|
138
|
+
export const MediaEvent = {
|
|
139
|
+
PLAY: 'play',
|
|
140
|
+
PLAYING: 'playing',
|
|
141
|
+
PAUSE: 'pause',
|
|
142
|
+
SEEKED: 'seeked',
|
|
143
|
+
ENDED: 'ended',
|
|
144
|
+
LOADED_DATA: 'loadeddata',
|
|
145
|
+
CAN_PLAY: 'canplay',
|
|
146
|
+
WAITING: 'waiting',
|
|
147
|
+
ERROR: 'error',
|
|
148
|
+
};
|
|
149
|
+
/** What took a `CANVAS_DIGEST`: the 500 ms poll, or the end of an act (inside its window). */
|
|
150
|
+
export const CanvasTrigger = {
|
|
151
|
+
POLL: 'poll',
|
|
152
|
+
ACT: 'act',
|
|
121
153
|
};
|
|
@@ -34,7 +34,8 @@ const PLAIN_CONTROLS = [
|
|
|
34
34
|
'carousel-next',
|
|
35
35
|
'carousel-close',
|
|
36
36
|
'page-close',
|
|
37
|
-
'
|
|
37
|
+
'team-open',
|
|
38
|
+
'team-save',
|
|
38
39
|
'talk-book',
|
|
39
40
|
'account-signin',
|
|
40
41
|
'account-trigger',
|
|
@@ -60,11 +61,20 @@ const PLAIN_CONTROLS = [
|
|
|
60
61
|
'mark-send',
|
|
61
62
|
// The Agent Log's own Harness switch; the Settings one is `setting.harnessEnabled`.
|
|
62
63
|
'harness-switch',
|
|
63
|
-
//
|
|
64
|
-
'
|
|
64
|
+
// Run Harness beside it, and Stop while the drive it started runs.
|
|
65
|
+
'harness-run',
|
|
66
|
+
'harness-stop',
|
|
67
|
+
// The Agent Log's foot row: opens the Harness page.
|
|
68
|
+
'harness-open',
|
|
69
|
+
// The Agent Log's foot row: the Harness on/off switch.
|
|
70
|
+
'harness-toggle',
|
|
71
|
+
// Link this project, on the Harness page.
|
|
72
|
+
'harness-link',
|
|
73
|
+
// The coding-agent block on the Agent Log: copy a prompt when none is connected.
|
|
74
|
+
'agent-copy',
|
|
75
|
+
// "See all" below Impact's recent bugs.
|
|
65
76
|
'defects-all',
|
|
66
77
|
// "See the logs" beside a replay the person started from a chip.
|
|
67
|
-
'see-logs',
|
|
68
78
|
// The Harness plan board on the Agent Log: hide it, or open one journey's steps.
|
|
69
79
|
'plan-close',
|
|
70
80
|
'plan-journey',
|
|
@@ -98,7 +108,7 @@ const KEYED_CONTROLS = {
|
|
|
98
108
|
'tour-target': ['copy', 'back', 'done', 'next', 'skip'],
|
|
99
109
|
link: ['docs', 'github', 'site', 'discord', 'defect', 'dashboard'],
|
|
100
110
|
'annotation-tab': ['current', 'history'],
|
|
101
|
-
'chat-view-btn': ['activity', 'flows', 'annotations'],
|
|
111
|
+
'chat-view-btn': ['activity', 'flows', 'annotations', 'harness'],
|
|
102
112
|
};
|
|
103
113
|
let controls;
|
|
104
114
|
/**
|
|
@@ -12,19 +12,34 @@ export declare const HudView: {
|
|
|
12
12
|
};
|
|
13
13
|
export type HudView = (typeof HudView)[keyof typeof HudView];
|
|
14
14
|
/**
|
|
15
|
-
* Which page is showing, when the HUD is open: the Agent Log (`chat`), the Flows and
|
|
16
|
-
* inside it, Impact (`report`)
|
|
17
|
-
* number rather than a guess.
|
|
15
|
+
* Which page is showing, when the HUD is open: the Agent Log (`chat`), the Flows, Notes and Harness
|
|
16
|
+
* pages inside it, Impact (`report`), Settings, or the account menu open over any of them. Timed per
|
|
17
|
+
* page, so how long somebody spends on each is a number rather than a guess.
|
|
18
|
+
*
|
|
19
|
+
* `harness` and `account` were missing, so the Harness page was timed as `chat` (it opens over the
|
|
20
|
+
* Agent Log) and an open account menu was not seen at all.
|
|
18
21
|
*/
|
|
19
22
|
export declare const HudPanel: {
|
|
20
23
|
readonly CHAT: "chat";
|
|
21
24
|
readonly FLOWS: "flows";
|
|
22
25
|
readonly NOTES: "notes";
|
|
26
|
+
readonly HARNESS: "harness";
|
|
23
27
|
readonly SETTINGS: "settings";
|
|
24
28
|
readonly REPORT: "report";
|
|
29
|
+
readonly ACCOUNT: "account";
|
|
25
30
|
readonly NONE: "none";
|
|
26
31
|
};
|
|
27
32
|
export type HudPanel = (typeof HudPanel)[keyof typeof HudPanel];
|
|
33
|
+
/**
|
|
34
|
+
* Where the HUD asked somebody to sign in or link this project: the rail card under every page, the
|
|
35
|
+
* Harness page's own sign-in / link control, or the header's "Save runs for your team".
|
|
36
|
+
*/
|
|
37
|
+
export declare const HudPromptSurface: {
|
|
38
|
+
readonly RAIL: "rail";
|
|
39
|
+
readonly HARNESS: "harness";
|
|
40
|
+
readonly HEADER: "header";
|
|
41
|
+
};
|
|
42
|
+
export type HudPromptSurface = (typeof HudPromptSurface)[keyof typeof HudPromptSurface];
|
|
28
43
|
/** What a toggle was switched to; absent for a plain press. */
|
|
29
44
|
export declare const HudToggle: {
|
|
30
45
|
readonly ON: "on";
|
|
@@ -41,6 +56,10 @@ export declare const HudVisibility: {
|
|
|
41
56
|
readonly REMOVED: "removed";
|
|
42
57
|
};
|
|
43
58
|
export type HudVisibility = (typeof HudVisibility)[keyof typeof HudVisibility];
|
|
59
|
+
/** Minimum Reticle SDK version supporting HUD placement/visibility controls via session tune. */
|
|
60
|
+
export declare const HUD_MIN_SDK_VERSION = "3.6.0";
|
|
61
|
+
/** Wire diagnostic returned when an agent attempts to position a HUD that was previously removed. */
|
|
62
|
+
export declare const HUD_RELOAD_TO_RESTORE = "reload to restore";
|
|
44
63
|
/** The corner an agent can move the HUD to; `bottom-right` is where it docks by default. */
|
|
45
64
|
export declare const HudCorner: {
|
|
46
65
|
readonly TOP_LEFT: "top-left";
|
|
@@ -64,8 +83,16 @@ export declare const ScriptStatus: {
|
|
|
64
83
|
readonly FAILED: "failed";
|
|
65
84
|
/** Never started: something it needed failed. */
|
|
66
85
|
readonly BLOCKED: "blocked";
|
|
67
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* A branch case whose condition did not hold, or a step the destructive-action guard stopped
|
|
88
|
+
* because nobody acknowledged it. Not a failure.
|
|
89
|
+
*/
|
|
68
90
|
readonly NOT_TAKEN: "not-taken";
|
|
91
|
+
/**
|
|
92
|
+
* Ran, and decided nothing: its end was on the page before it acted, or it reached its goal with
|
|
93
|
+
* no check that could have gone red. Neither proved nor a failure.
|
|
94
|
+
*/
|
|
95
|
+
readonly UNDECIDED: "undecided";
|
|
69
96
|
};
|
|
70
97
|
export type ScriptStatus = (typeof ScriptStatus)[keyof typeof ScriptStatus];
|
|
71
98
|
/** The HUD's picture of a drive plan: lanes side by side, journeys in order, steps inside. */
|
|
@@ -81,6 +108,8 @@ export interface PlanView {
|
|
|
81
108
|
/** Journeys in earlier lanes this one waits on. */
|
|
82
109
|
waitsOn: string[];
|
|
83
110
|
status: ScriptStatus;
|
|
111
|
+
/** Why it did not pass, when there is more to say than its status. */
|
|
112
|
+
why?: string;
|
|
84
113
|
steps: {
|
|
85
114
|
label: string;
|
|
86
115
|
status: ScriptStatus;
|