@reticlehq/core 2.14.0 → 3.1.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-entry.d.ts → artifacts/artifacts-entry.d.ts} +7 -7
- package/dist/{artifacts-entry.js → artifacts/artifacts-entry.js} +7 -7
- package/dist/artifacts/flow-composition.d.ts +30 -0
- package/dist/artifacts/flow-composition.js +19 -0
- package/dist/{flow-constants.d.ts → artifacts/flow-constants.d.ts} +89 -3
- package/dist/{flow-constants.js → artifacts/flow-constants.js} +95 -4
- package/dist/artifacts/flow-mutation-target.d.ts +39 -0
- package/dist/artifacts/flow-mutation-target.js +89 -0
- package/dist/artifacts/flow-order.d.ts +30 -0
- package/dist/artifacts/flow-order.js +49 -0
- package/dist/artifacts/flow-select.d.ts +56 -0
- package/dist/artifacts/flow-select.js +56 -0
- package/dist/artifacts/flow-step-tool.d.ts +31 -0
- package/dist/artifacts/flow-step-tool.js +31 -0
- package/dist/artifacts/flow-types.d.ts +3736 -0
- package/dist/artifacts/flow-types.js +463 -0
- package/dist/artifacts/flow-unreached.d.ts +12 -0
- package/dist/artifacts/flow-unreached.js +24 -0
- package/dist/{impact.d.ts → artifacts/impact.d.ts} +119 -103
- package/dist/{impact.js → artifacts/impact.js} +14 -5
- package/dist/{journal.d.ts → artifacts/journal.d.ts} +51 -7
- package/dist/{journal.js → artifacts/journal.js} +38 -2
- package/dist/artifacts/step-effect.d.ts +29 -0
- package/dist/artifacts/step-effect.js +28 -0
- package/dist/hooks/hook-events.d.ts +311 -0
- package/dist/hooks/hook-events.js +127 -0
- package/dist/hooks/hooks-entry.d.ts +9 -0
- package/dist/hooks/hooks-entry.js +9 -0
- package/dist/{brand.d.ts → identity/brand.d.ts} +7 -0
- package/dist/{contract-fingerprint.d.ts → identity/contract-fingerprint.d.ts} +21 -3
- package/dist/{contract-fingerprint.js → identity/contract-fingerprint.js} +22 -4
- package/dist/{document-identity.d.ts → identity/document-identity.d.ts} +4 -5
- package/dist/{document-identity.js → identity/document-identity.js} +4 -5
- package/dist/{source-constants.d.ts → identity/source-constants.d.ts} +4 -4
- package/dist/{source-constants.js → identity/source-constants.js} +4 -4
- package/dist/index.d.ts +56 -43
- package/dist/index.js +65 -45
- package/dist/onboarding.d.ts +114 -0
- package/dist/onboarding.js +141 -0
- package/dist/realm/registry.d.ts +212 -0
- package/dist/realm/registry.js +302 -0
- package/dist/{dev-server-registry.d.ts → registry/dev-server-registry.d.ts} +6 -7
- package/dist/{dev-server-registry.js → registry/dev-server-registry.js} +28 -19
- package/dist/{project-registry.d.ts → registry/project-registry.d.ts} +5 -5
- package/dist/{project-registry.js → registry/project-registry.js} +5 -5
- package/dist/schema/command-name.json +31 -0
- package/dist/schema/event-payloads.json +791 -0
- package/dist/schema/hello-message.json +70 -2
- package/dist/schema/reticle-message.json +70 -2
- package/dist/telemetry-entry.d.ts +1 -1
- package/dist/telemetry-entry.js +1 -1
- package/dist/telemetry-feedback.d.ts +15 -16
- package/dist/telemetry-feedback.js +11 -12
- package/dist/telemetry-license.d.ts +1 -1
- package/dist/telemetry-license.js +1 -1
- package/dist/telemetry-refusal.d.ts +11 -11
- package/dist/telemetry-refusal.js +7 -8
- package/dist/telemetry-session.d.ts +51 -59
- package/dist/telemetry-session.js +47 -55
- package/dist/telemetry.d.ts +243 -214
- package/dist/telemetry.js +83 -98
- package/dist/tour-entry.d.ts +10 -0
- package/dist/tour-entry.js +10 -0
- package/dist/tour.d.ts +125 -0
- package/dist/tour.js +165 -0
- package/dist/{consequence.d.ts → verdict/consequence.d.ts} +32 -15
- package/dist/{consequence.js → verdict/consequence.js} +9 -31
- package/dist/{finding-fingerprint.js → verdict/finding-fingerprint.js} +1 -1
- package/dist/{findings.d.ts → verdict/findings.d.ts} +86 -39
- package/dist/{findings.js → verdict/findings.js} +103 -49
- package/dist/{instrumentation-gap.d.ts → verdict/instrumentation-gap.d.ts} +7 -14
- package/dist/{instrumentation-gap.js → verdict/instrumentation-gap.js} +7 -15
- package/dist/{intent.d.ts → verdict/intent.d.ts} +35 -46
- package/dist/{intent.js → verdict/intent.js} +11 -22
- package/dist/verdict/revision.d.ts +44 -0
- package/dist/verdict/revision.js +53 -0
- package/dist/{run-context.d.ts → verdict/run-context.d.ts} +13 -34
- package/dist/{run-context.js → verdict/run-context.js} +15 -36
- package/dist/{security.js → verdict/security.js} +12 -21
- package/dist/{verification-run.d.ts → verdict/verification-run.d.ts} +381 -105
- package/dist/{verification-run.js → verdict/verification-run.js} +157 -21
- package/dist/{verified-constants.d.ts → verdict/verified-constants.d.ts} +25 -13
- package/dist/{verified-constants.js → verdict/verified-constants.js} +25 -13
- package/dist/{verify-progress.d.ts → verdict/verify-progress.d.ts} +18 -22
- package/dist/{verify-progress.js → verdict/verify-progress.js} +6 -10
- package/dist/wire/channel.d.ts +46 -0
- package/dist/wire/channel.js +95 -0
- package/dist/{constants.d.ts → wire/constants/constants.d.ts} +91 -28
- package/dist/{constants.js → wire/constants/constants.js} +105 -28
- package/dist/{session-constants.d.ts → wire/constants/session-constants.d.ts} +9 -2
- package/dist/{session-constants.js → wire/constants/session-constants.js} +9 -2
- package/dist/{desktop-contract.js → wire/desktop-contract.js} +1 -1
- package/dist/{event-classification.js → wire/event-classification.js} +1 -1
- package/dist/{event-payloads.d.ts → wire/event-payloads.d.ts} +68 -13
- package/dist/{event-payloads.js → wire/event-payloads.js} +21 -3
- package/dist/{event-priority.d.ts → wire/event-priority.d.ts} +1 -4
- package/dist/{event-priority.js → wire/event-priority.js} +2 -5
- package/dist/{global-press.js → wire/global-press.js} +1 -1
- package/dist/{messages.d.ts → wire/messages.d.ts} +239 -48
- package/dist/{messages.js → wire/messages.js} +68 -5
- package/dist/wire/narrow.d.ts +39 -0
- package/dist/wire/narrow.js +45 -0
- package/dist/{net.d.ts → wire/net.d.ts} +12 -13
- package/dist/{net.js → wire/net.js} +12 -13
- package/dist/wire/platform.d.ts +37 -0
- package/dist/wire/platform.js +36 -0
- package/dist/{redaction.js → wire/redaction.js} +12 -12
- package/dist/wire/tool-names.d.ts +133 -0
- package/dist/wire/tool-names.js +142 -0
- package/dist/{toon.js → wire/toon.js} +1 -1
- package/dist/{types.d.ts → wire/types.d.ts} +77 -76
- package/dist/{types.js → wire/types.js} +4 -3
- package/dist/{no-session-reason.d.ts → words/no-session-reason.d.ts} +7 -3
- package/dist/{no-session-reason.js → words/no-session-reason.js} +7 -3
- package/dist/{notices.d.ts → words/notices.d.ts} +8 -12
- package/dist/{notices.js → words/notices.js} +8 -12
- package/package.json +16 -7
- package/dist/flow-types.d.ts +0 -1711
- package/dist/flow-types.js +0 -247
- package/dist/{impact-savings.d.ts → artifacts/impact-savings.d.ts} +0 -0
- package/dist/{impact-savings.js → artifacts/impact-savings.js} +0 -0
- package/dist/{brand.js → identity/brand.js} +0 -0
- package/dist/{edit-epoch.d.ts → identity/edit-epoch.d.ts} +0 -0
- package/dist/{edit-epoch.js → identity/edit-epoch.js} +0 -0
- package/dist/{project-id.d.ts → identity/project-id.d.ts} +0 -0
- package/dist/{project-id.js → identity/project-id.js} +0 -0
- package/dist/{daemon-registry.d.ts → registry/daemon-registry.d.ts} +0 -0
- package/dist/{daemon-registry.js → registry/daemon-registry.js} +0 -0
- package/dist/{finding-fingerprint.d.ts → verdict/finding-fingerprint.d.ts} +0 -0
- package/dist/{security.d.ts → verdict/security.d.ts} +0 -0
- package/dist/{desktop-contract.d.ts → wire/desktop-contract.d.ts} +0 -0
- package/dist/{event-classification.d.ts → wire/event-classification.d.ts} +0 -0
- package/dist/{global-press.d.ts → wire/global-press.d.ts} +0 -0
- package/dist/{redaction.d.ts → wire/redaction.d.ts} +0 -0
- package/dist/{state-select.d.ts → wire/state-select.d.ts} +0 -0
- package/dist/{state-select.js → wire/state-select.js} +0 -0
- package/dist/{toon.d.ts → wire/toon.d.ts} +0 -0
- package/dist/{browser-misdirect.d.ts → words/browser-misdirect.d.ts} +0 -0
- package/dist/{browser-misdirect.js → words/browser-misdirect.js} +0 -0
- package/dist/{unreachable-notice.d.ts → words/unreachable-notice.d.ts} +0 -0
- package/dist/{unreachable-notice.js → words/unreachable-notice.js} +0 -0
- package/dist/{upgrade.d.ts → words/upgrade.d.ts} +2 -2
- /package/dist/{upgrade.js → words/upgrade.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a value off the wire without trusting it.
|
|
3
|
+
*
|
|
4
|
+
* Everything that arrives from a page, a config file or an agent's arguments is `unknown` until
|
|
5
|
+
* something checks it. These are that check, in the smallest form: give me the string if it is a
|
|
6
|
+
* string, and nothing if it is not.
|
|
7
|
+
*
|
|
8
|
+
* They lived under `tools/` in the server package, because a tool handler was the first thing that
|
|
9
|
+
* needed them. Nothing about them is a tool: the rules that decide a verdict use them, the session
|
|
10
|
+
* uses them, the command line uses them. A helper filed under where it was first needed rather than
|
|
11
|
+
* what it does is a helper that drags its old neighbourhood along behind it, and this one was
|
|
12
|
+
* dragging the whole tool surface into the verdict engine.
|
|
13
|
+
*
|
|
14
|
+
* `undefined` for a value of the wrong type, never a default. A number that arrives as the string
|
|
15
|
+
* "12" is not a number, and quietly making it one is how a wire mistake becomes a wrong answer that
|
|
16
|
+
* nothing reports.
|
|
17
|
+
*/
|
|
18
|
+
/** The value if it is a string, otherwise nothing. */
|
|
19
|
+
export declare function asString(value: unknown): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The value if it is a number, otherwise nothing.
|
|
22
|
+
*
|
|
23
|
+
* `NaN` and `Infinity` pass, because `typeof NaN` is `'number'`. That is worth knowing rather than
|
|
24
|
+
* quietly fixing here: this moved out of the server unchanged, and tightening it in the same commit
|
|
25
|
+
* would be a behaviour change wearing a refactor's message. If a caller needs a finite number it
|
|
26
|
+
* should say so where it reads the value.
|
|
27
|
+
*/
|
|
28
|
+
export declare function asNumber(value: unknown): number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The value if it is an object, otherwise an empty one.
|
|
31
|
+
*
|
|
32
|
+
* The odd one out: it answers with `{}` rather than `undefined`, because every caller is about to
|
|
33
|
+
* read a key off it and an empty object gives them `undefined` for free.
|
|
34
|
+
*
|
|
35
|
+
* An ARRAY passes, because an array is an object to JavaScript. Almost certainly not what a caller
|
|
36
|
+
* reaching for a named key meant, and left exactly as it was for the same reason as above: this is a
|
|
37
|
+
* move, and a move that also changes behaviour is two changes wearing one message.
|
|
38
|
+
*/
|
|
39
|
+
export declare function asRecord(value: unknown): Record<string, unknown>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a value off the wire without trusting it.
|
|
3
|
+
*
|
|
4
|
+
* Everything that arrives from a page, a config file or an agent's arguments is `unknown` until
|
|
5
|
+
* something checks it. These are that check, in the smallest form: give me the string if it is a
|
|
6
|
+
* string, and nothing if it is not.
|
|
7
|
+
*
|
|
8
|
+
* They lived under `tools/` in the server package, because a tool handler was the first thing that
|
|
9
|
+
* needed them. Nothing about them is a tool: the rules that decide a verdict use them, the session
|
|
10
|
+
* uses them, the command line uses them. A helper filed under where it was first needed rather than
|
|
11
|
+
* what it does is a helper that drags its old neighbourhood along behind it, and this one was
|
|
12
|
+
* dragging the whole tool surface into the verdict engine.
|
|
13
|
+
*
|
|
14
|
+
* `undefined` for a value of the wrong type, never a default. A number that arrives as the string
|
|
15
|
+
* "12" is not a number, and quietly making it one is how a wire mistake becomes a wrong answer that
|
|
16
|
+
* nothing reports.
|
|
17
|
+
*/
|
|
18
|
+
/** The value if it is a string, otherwise nothing. */
|
|
19
|
+
export function asString(value) {
|
|
20
|
+
return 'string' === typeof value ? value : undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The value if it is a number, otherwise nothing.
|
|
24
|
+
*
|
|
25
|
+
* `NaN` and `Infinity` pass, because `typeof NaN` is `'number'`. That is worth knowing rather than
|
|
26
|
+
* quietly fixing here: this moved out of the server unchanged, and tightening it in the same commit
|
|
27
|
+
* would be a behaviour change wearing a refactor's message. If a caller needs a finite number it
|
|
28
|
+
* should say so where it reads the value.
|
|
29
|
+
*/
|
|
30
|
+
export function asNumber(value) {
|
|
31
|
+
return 'number' === typeof value ? value : undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The value if it is an object, otherwise an empty one.
|
|
35
|
+
*
|
|
36
|
+
* The odd one out: it answers with `{}` rather than `undefined`, because every caller is about to
|
|
37
|
+
* read a key off it and an empty object gives them `undefined` for free.
|
|
38
|
+
*
|
|
39
|
+
* An ARRAY passes, because an array is an object to JavaScript. Almost certainly not what a caller
|
|
40
|
+
* reaching for a named key meant, and left exactly as it was for the same reason as above: this is a
|
|
41
|
+
* move, and a move that also changes behaviour is two changes wearing one message.
|
|
42
|
+
*/
|
|
43
|
+
export function asRecord(value) {
|
|
44
|
+
return 'object' === typeof value && value !== null ? value : {};
|
|
45
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Network-call vocabulary shared by the browser SDK and the server.
|
|
3
|
-
* keep that file under the size cap.
|
|
2
|
+
* Network-call vocabulary shared by the browser SDK and the server.
|
|
4
3
|
*/
|
|
5
4
|
/**
|
|
6
5
|
* What issued a network-shaped call. Desktop apps (Electron, Tauri) reach their backend over IPC
|
|
@@ -17,9 +16,9 @@ export declare const NetInitiator: {
|
|
|
17
16
|
*
|
|
18
17
|
* A server-rendered app answers a click with a full document load: the old document is torn down
|
|
19
18
|
* with the SDK inside it, and the SDK comes back up in a page whose defining request happened
|
|
20
|
-
* before it existed. No patched transport could have seen it, so
|
|
21
|
-
* it at all
|
|
22
|
-
*
|
|
19
|
+
* before it existed. No patched transport could have seen it, so without this initiator the net
|
|
20
|
+
* channel has no record of it at all: a `net` clause naming the destination MISSES and the verdict
|
|
21
|
+
* comes back `unknown` even though route and heading verified.
|
|
23
22
|
*
|
|
24
23
|
* DISTINCT FROM the document-INITIATED subresource initiators (`link`, `css`, `img`, `script`,
|
|
25
24
|
* `manifest`, `other`) that the resource-timing observer stamps. Those prove that observer is
|
|
@@ -74,19 +73,19 @@ export declare const IpcStatus: {
|
|
|
74
73
|
* `202 Accepted` — the server took the request and has NOT finished processing it.
|
|
75
74
|
*
|
|
76
75
|
* The only status in HTTP whose meaning is "no outcome yet". Folding it into the 2xx success band is
|
|
77
|
-
* how an asynchronous workflow gets verified at exactly the moment nothing has been decided:
|
|
78
|
-
*
|
|
79
|
-
*
|
|
76
|
+
* how an asynchronous workflow gets verified at exactly the moment nothing has been decided: a
|
|
77
|
+
* dispatch answers 202, the UI renders success, the page settles, and the server reverts the write
|
|
78
|
+
* a second later.
|
|
80
79
|
*/
|
|
81
80
|
export declare const HTTP_ACCEPTED = 202;
|
|
82
81
|
/**
|
|
83
82
|
* Traffic the DEV TOOLCHAIN makes about itself — never the app under test.
|
|
84
83
|
*
|
|
85
|
-
* A CLOSED list, deliberately.
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
84
|
+
* A CLOSED list, deliberately. Without it a correct navigation grades `verified: "no"` because the
|
|
85
|
+
* dev overlay is fetching a source map for an unrelated React warning (`POST
|
|
86
|
+
* /__nextjs_original-stack-frames`) and that in-flight request counts as "the UI advanced over a
|
|
87
|
+
* request that never settled" — a false negative on every action in any app that logs one dev
|
|
88
|
+
* warning.
|
|
90
89
|
*
|
|
91
90
|
* The rule for adding an entry: it must be a channel the FRAMEWORK owns, that no application route
|
|
92
91
|
* can occupy, and that fires as a consequence of running in dev rather than of anything the user
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Network-call vocabulary shared by the browser SDK and the server.
|
|
3
|
-
* keep that file under the size cap.
|
|
2
|
+
* Network-call vocabulary shared by the browser SDK and the server.
|
|
4
3
|
*/
|
|
5
4
|
/**
|
|
6
5
|
* What issued a network-shaped call. Desktop apps (Electron, Tauri) reach their backend over IPC
|
|
@@ -17,9 +16,9 @@ export const NetInitiator = {
|
|
|
17
16
|
*
|
|
18
17
|
* A server-rendered app answers a click with a full document load: the old document is torn down
|
|
19
18
|
* with the SDK inside it, and the SDK comes back up in a page whose defining request happened
|
|
20
|
-
* before it existed. No patched transport could have seen it, so
|
|
21
|
-
* it at all
|
|
22
|
-
*
|
|
19
|
+
* before it existed. No patched transport could have seen it, so without this initiator the net
|
|
20
|
+
* channel has no record of it at all: a `net` clause naming the destination MISSES and the verdict
|
|
21
|
+
* comes back `unknown` even though route and heading verified.
|
|
23
22
|
*
|
|
24
23
|
* DISTINCT FROM the document-INITIATED subresource initiators (`link`, `css`, `img`, `script`,
|
|
25
24
|
* `manifest`, `other`) that the resource-timing observer stamps. Those prove that observer is
|
|
@@ -73,19 +72,19 @@ export const IpcStatus = {
|
|
|
73
72
|
* `202 Accepted` — the server took the request and has NOT finished processing it.
|
|
74
73
|
*
|
|
75
74
|
* The only status in HTTP whose meaning is "no outcome yet". Folding it into the 2xx success band is
|
|
76
|
-
* how an asynchronous workflow gets verified at exactly the moment nothing has been decided:
|
|
77
|
-
*
|
|
78
|
-
*
|
|
75
|
+
* how an asynchronous workflow gets verified at exactly the moment nothing has been decided: a
|
|
76
|
+
* dispatch answers 202, the UI renders success, the page settles, and the server reverts the write
|
|
77
|
+
* a second later.
|
|
79
78
|
*/
|
|
80
79
|
export const HTTP_ACCEPTED = 202;
|
|
81
80
|
/**
|
|
82
81
|
* Traffic the DEV TOOLCHAIN makes about itself — never the app under test.
|
|
83
82
|
*
|
|
84
|
-
* A CLOSED list, deliberately.
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
83
|
+
* A CLOSED list, deliberately. Without it a correct navigation grades `verified: "no"` because the
|
|
84
|
+
* dev overlay is fetching a source map for an unrelated React warning (`POST
|
|
85
|
+
* /__nextjs_original-stack-frames`) and that in-flight request counts as "the UI advanced over a
|
|
86
|
+
* request that never settled" — a false negative on every action in any app that logs one dev
|
|
87
|
+
* warning.
|
|
89
88
|
*
|
|
90
89
|
* The rule for adding an entry: it must be a channel the FRAMEWORK owns, that no application route
|
|
91
90
|
* can occupy, and that fires as a consequence of running in dev rather than of anything the user
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What kind of surface an app presents, which decides what can be demanded of it.
|
|
3
|
+
*
|
|
4
|
+
* This is deliberately NOT the list of shells. "Which shell is this" -- a browser, Electron, Tauri --
|
|
5
|
+
* is a question about what somebody is using, and it belongs to the usage contract. "What kind of
|
|
6
|
+
* surface is this" is a question about what can be observed, and it is the one verification needs.
|
|
7
|
+
*
|
|
8
|
+
* Electron and Tauri are two different products and one kind of surface: a web page inside a native
|
|
9
|
+
* window. Code that branched on the shell had to name both, and would have to name a third that
|
|
10
|
+
* behaved identically. Code that branches on the surface names `webview` once.
|
|
11
|
+
*
|
|
12
|
+
* There are no dependencies here on purpose. A third-party implementation says which of these it is
|
|
13
|
+
* and needs nothing from this package to say it.
|
|
14
|
+
*
|
|
15
|
+
* Absent on the wire means `web`. That is the back-compat convention used throughout the handshake:
|
|
16
|
+
* a field nobody sent means what everything meant before the field existed.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PlatformProfile: {
|
|
19
|
+
/** A browser document. The page owns the window. */
|
|
20
|
+
readonly WEB: "web";
|
|
21
|
+
/**
|
|
22
|
+
* A web page inside something else's window: Electron's renderer, Tauri, Capacitor, a React
|
|
23
|
+
* Native WebView. It renders like the web and the window around it is not ours.
|
|
24
|
+
*/
|
|
25
|
+
readonly WEBVIEW: "webview";
|
|
26
|
+
/**
|
|
27
|
+
* A native view tree -- iOS, Android, Flutter. There are elements and they are not DOM nodes, so
|
|
28
|
+
* anything that assumes a document is wrong here.
|
|
29
|
+
*/
|
|
30
|
+
readonly NATIVE: "native";
|
|
31
|
+
/**
|
|
32
|
+
* No rendering surface at all: a job, a worker, an API. It can still be observed and it can still
|
|
33
|
+
* be asserted about; it just cannot be looked at or photographed.
|
|
34
|
+
*/
|
|
35
|
+
readonly SERVICE: "service";
|
|
36
|
+
};
|
|
37
|
+
export type PlatformProfile = (typeof PlatformProfile)[keyof typeof PlatformProfile];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What kind of surface an app presents, which decides what can be demanded of it.
|
|
3
|
+
*
|
|
4
|
+
* This is deliberately NOT the list of shells. "Which shell is this" -- a browser, Electron, Tauri --
|
|
5
|
+
* is a question about what somebody is using, and it belongs to the usage contract. "What kind of
|
|
6
|
+
* surface is this" is a question about what can be observed, and it is the one verification needs.
|
|
7
|
+
*
|
|
8
|
+
* Electron and Tauri are two different products and one kind of surface: a web page inside a native
|
|
9
|
+
* window. Code that branched on the shell had to name both, and would have to name a third that
|
|
10
|
+
* behaved identically. Code that branches on the surface names `webview` once.
|
|
11
|
+
*
|
|
12
|
+
* There are no dependencies here on purpose. A third-party implementation says which of these it is
|
|
13
|
+
* and needs nothing from this package to say it.
|
|
14
|
+
*
|
|
15
|
+
* Absent on the wire means `web`. That is the back-compat convention used throughout the handshake:
|
|
16
|
+
* a field nobody sent means what everything meant before the field existed.
|
|
17
|
+
*/
|
|
18
|
+
export const PlatformProfile = {
|
|
19
|
+
/** A browser document. The page owns the window. */
|
|
20
|
+
WEB: 'web',
|
|
21
|
+
/**
|
|
22
|
+
* A web page inside something else's window: Electron's renderer, Tauri, Capacitor, a React
|
|
23
|
+
* Native WebView. It renders like the web and the window around it is not ours.
|
|
24
|
+
*/
|
|
25
|
+
WEBVIEW: 'webview',
|
|
26
|
+
/**
|
|
27
|
+
* A native view tree -- iOS, Android, Flutter. There are elements and they are not DOM nodes, so
|
|
28
|
+
* anything that assumes a document is wrong here.
|
|
29
|
+
*/
|
|
30
|
+
NATIVE: 'native',
|
|
31
|
+
/**
|
|
32
|
+
* No rendering surface at all: a job, a worker, an API. It can still be observed and it can still
|
|
33
|
+
* be asserted about; it just cannot be looked at or photographed.
|
|
34
|
+
*/
|
|
35
|
+
SERVICE: 'service',
|
|
36
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { REDACTED_VALUE } from './constants.js';
|
|
1
|
+
import { REDACTED_VALUE } from './constants/constants.js';
|
|
2
2
|
import { URL_RAW } from './net.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wire redaction rules — which field names carry credentials, and which VALUE shapes are secrets
|
|
5
5
|
* regardless of the field they sit in.
|
|
6
6
|
*
|
|
7
|
-
* These live in core because they are a property of the wire, not of one side of it
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* security regex to redact them would be the worst possible place to have two copies drift.
|
|
7
|
+
* These live in core because they are a property of the wire, not of one side of it: the browser
|
|
8
|
+
* SDK and the driven path (which captures request bodies raw off the network stack) both redact
|
|
9
|
+
* with them, and a security regex is the worst possible place to have two copies drift.
|
|
11
10
|
*/
|
|
12
11
|
// `pass[-_]?phrase` is the fourth spelling of the first three. There is no benign field called
|
|
13
12
|
// `passphrase`: it is what an SSH key, a keystore, an encrypted backup and a wallet all call their
|
|
@@ -17,21 +16,22 @@ import { URL_RAW } from './net.js';
|
|
|
17
16
|
// away, but the window in which one is useful is the window in which a drive is running, and the
|
|
18
17
|
// journal is written to disk and read back later. `(otp|totp|mfa|recovery|backup)[-_]?codes?`
|
|
19
18
|
// carries the camelCase spellings too, since `[-_]?` is optional and the rule is case-insensitive.
|
|
20
|
-
// Bare `otp`/`totp` are boundary-anchored: unanchored they
|
|
21
|
-
// this file's own history is a list of false positives that had to be walked back.
|
|
19
|
+
// Bare `otp`/`totp` are boundary-anchored: unanchored they fire inside ordinary words.
|
|
22
20
|
// `code` on its own is deliberately NOT here — `statusCode`, `postcode`, `couponCode` and
|
|
23
21
|
// `countryCode` are ordinary app data an agent needs in order to reach a verdict.
|
|
24
22
|
//
|
|
25
23
|
// `token` must match auth CREDENTIALS, not compound design fields. Bare/separated `token(s)` and
|
|
26
24
|
// auth-prefixed tokens (accessToken, auth_token, sessionToken, …) are redacted; `colorToken`,
|
|
27
|
-
// `backgroundToken`, `tokenCount`, `designToken` are NOT —
|
|
28
|
-
//
|
|
29
|
-
// `token` must match auth CREDENTIALS, not compound design fields (see note above). `cookie` is
|
|
30
|
-
// boundary-anchored the same way: it targets the `Cookie` / `Set-Cookie` HTTP HEADER names (which
|
|
25
|
+
// `backgroundToken`, `tokenCount`, `designToken` are NOT — redacting those blinds
|
|
26
|
+
// reticle_inspect/reticle_state to legitimate app data. `cookie` is boundary-anchored the same way: it targets the `Cookie` / `Set-Cookie` HTTP HEADER names (which
|
|
31
27
|
// bundle the session credential and were the one wire payload reaching the journal + the agent
|
|
32
28
|
// unredacted), NOT any key that merely contains the substring — `scopecookie`, `cookieConsent`,
|
|
33
29
|
// `cookiePolicy` are legitimate app values an agent may need to read, and stay visible.
|
|
34
|
-
|
|
30
|
+
// Bare `card` and `pan` are boundary-anchored for the same reason. Without them a checkout POST
|
|
31
|
+
// reaches the agent as `{"planId":"team","card":"4111111111111111"}` — `credit_card` and
|
|
32
|
+
// `card_number` are not the only spellings, and `card` is what Stripe's own object calls it. The
|
|
33
|
+
// anchors keep `discard`, `cardinality` and `panel` visible.
|
|
34
|
+
const SENSITIVE_KEY = /password|passwd|passcode|pass[-_]?phrase|(?:otp|totp|mfa|recovery|backup)[-_]?codes?|(?:^|[-_])(?:otp|totp)(?=$|[-_])|secret|(?:(?:access|refresh|auth|bearer|api|id|session|csrf|client)[-_]?tokens?|(?:^|[-_])tokens?(?=$|[-_]))|session[-_]?id|(?:^|[-_])(?:sid|pwd|jwt)(?=$|[-_])|authorization|(?:^|[-_])(?:set[-_])?cookie(?=$|[-_])|api[-_]?key|access[-_]?key|private[-_]?key|client[-_]?secret|credit[-_]?card|card[-_]?(?:number|num|no|pan)(?=$|[-_])|(?:^|[-_])(?:card|pan)(?=$|[-_])|cvv|cvc|ssn|(?:^|[-_])(?:signature|sig)$|(?:^|[-_])credential$|x-(?:amz|goog)-(?:signature|credential|security-token)$/i;
|
|
35
35
|
/**
|
|
36
36
|
* The built-in rule, always available and never configurable.
|
|
37
37
|
*
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names an agent calls Reticle by.
|
|
3
|
+
*
|
|
4
|
+
* Wire strings, and this package is where wire strings live: a name here crosses the boundary between
|
|
5
|
+
* an agent and the daemon exactly as an event type crosses the one between the page and the bridge.
|
|
6
|
+
* It sat under the server's tool directory because that is where the handlers are, and the result was
|
|
7
|
+
* that every feature wanting to name a tool -- flows naming the steps it replays, crawl, runs -- had
|
|
8
|
+
* to import from the tool surface to get at a string. Thirty-three of those imports were this one
|
|
9
|
+
* table.
|
|
10
|
+
*
|
|
11
|
+
* MCP tool names exposed to the coding agent. No free strings. The three that appear in a persisted
|
|
12
|
+
* flow (ACT / ACT_SEQUENCE / ACT_AND_WAIT) come from core's FlowStepTool — one source shared with the
|
|
13
|
+
* browser recorder and the flow schema, so a rename can't desync the recorder from the replayer. */
|
|
14
|
+
export declare const ReticleTool: {
|
|
15
|
+
readonly SESSIONS: "reticle_sessions";
|
|
16
|
+
/**
|
|
17
|
+
* The merged read family — snapshot/query/inspect/state under one name, on the `merged` surface.
|
|
18
|
+
*
|
|
19
|
+
* A name of its own rather than reusing `reticle_snapshot`, because the merged tool answers four
|
|
20
|
+
* different questions and calling it "snapshot" would make three of them undiscoverable.
|
|
21
|
+
*/
|
|
22
|
+
readonly LOOK: "reticle_look";
|
|
23
|
+
readonly SNAPSHOT: "reticle_snapshot";
|
|
24
|
+
readonly QUERY: "reticle_query";
|
|
25
|
+
readonly INSPECT: "reticle_inspect";
|
|
26
|
+
readonly ACT: "reticle_act";
|
|
27
|
+
readonly ACT_SEQUENCE: "reticle_act_sequence";
|
|
28
|
+
readonly ACT_AND_WAIT: "reticle_act_and_wait";
|
|
29
|
+
readonly OBSERVE: "reticle_observe";
|
|
30
|
+
readonly LINEAGE: "reticle_lineage";
|
|
31
|
+
readonly WAIT_FOR: "reticle_wait_for";
|
|
32
|
+
readonly NETWORK: "reticle_network";
|
|
33
|
+
readonly CONSOLE: "reticle_console";
|
|
34
|
+
readonly ANIMATIONS: "reticle_animations";
|
|
35
|
+
readonly ASSERT: "reticle_assert";
|
|
36
|
+
readonly RECONCILE: "reticle_reconcile";
|
|
37
|
+
readonly BASELINE_SAVE: "reticle_baseline_save";
|
|
38
|
+
readonly BASELINE_LIST: "reticle_baseline_list";
|
|
39
|
+
readonly DIFF: "reticle_diff";
|
|
40
|
+
readonly RECORD_START: "reticle_record_start";
|
|
41
|
+
readonly RECORD_STOP: "reticle_record_stop";
|
|
42
|
+
readonly REPLAY: "reticle_replay";
|
|
43
|
+
readonly EXPLORE: "reticle_explore";
|
|
44
|
+
readonly NARRATE: "reticle_narrate";
|
|
45
|
+
readonly CLOCK: "reticle_clock";
|
|
46
|
+
readonly STATE: "reticle_state";
|
|
47
|
+
readonly STORAGE: "reticle_storage";
|
|
48
|
+
readonly CAPABILITIES: "reticle_capabilities";
|
|
49
|
+
readonly CONTRACT_SAVE: "reticle_contract_save";
|
|
50
|
+
readonly DOMAIN: "reticle_domain";
|
|
51
|
+
readonly FLOW_SAVE: "reticle_flow_save";
|
|
52
|
+
readonly FLOW_LIST: "reticle_flow_list";
|
|
53
|
+
readonly FLOW_LOAD: "reticle_flow_load";
|
|
54
|
+
readonly FLOW_DELETE: "reticle_flow_delete";
|
|
55
|
+
readonly FLOW_REPLAY: "reticle_flow_replay";
|
|
56
|
+
/** replay EVERY saved flow → one consolidated suite verdict + prioritized fixes (the loop closer). */
|
|
57
|
+
readonly FLOW_VERIFY: "reticle_flow_verify";
|
|
58
|
+
/** persist the human-recorded flow from the live tab. */
|
|
59
|
+
readonly FLOW_SAVE_RECORDED: "reticle_flow_save_recorded";
|
|
60
|
+
/** propose (+ opt-in apply) a nearest-match rebind for a drifted flow. */
|
|
61
|
+
readonly FLOW_HEAL: "reticle_flow_heal";
|
|
62
|
+
/** Does this flow notice when the thing it depends on breaks? See flow-mutate-tools.ts. */
|
|
63
|
+
readonly FLOW_MUTATE: "reticle_flow_mutate";
|
|
64
|
+
/** structured annotation → compiles into the recording's expect/dynamic/success. */
|
|
65
|
+
readonly ANNOTATE: "reticle_annotate";
|
|
66
|
+
readonly AFFECTED: "reticle_affected";
|
|
67
|
+
readonly COVERAGE: "reticle_coverage";
|
|
68
|
+
readonly VERIFY_CHANGE: "reticle_verify_change";
|
|
69
|
+
/** drive the app with a model and SAVE what it drove, for a project with nothing to replay yet. */
|
|
70
|
+
readonly VERIFY_EXPLORE: "reticle_verify_explore";
|
|
71
|
+
/** Merged: change/flows/affected/coverage/crawl — "what is proved, and what is not". */
|
|
72
|
+
readonly INTENT: "reticle_intent";
|
|
73
|
+
/** what THIS run has established, proved, and not yet discharged — pulled when memory is gone. */
|
|
74
|
+
readonly CONTEXT: "reticle_context";
|
|
75
|
+
readonly VERIFY: "reticle_verify";
|
|
76
|
+
/** read cross-run history (.reticle/project.json) + diff-vs-last for a name. */
|
|
77
|
+
readonly PROJECT: "reticle_project";
|
|
78
|
+
/** The team's shared memory, read on demand — see memory/memory-tools.ts. */
|
|
79
|
+
readonly MEMORY: "reticle_memory";
|
|
80
|
+
/** explicitly record a run outcome (the manual companion to auto-recording). */
|
|
81
|
+
readonly RUN_RECORD: "reticle_run_record";
|
|
82
|
+
/** capture a pixel screenshot (CDP/driven browser) →.reticle/visual/<name>.png. */
|
|
83
|
+
readonly SCREENSHOT: "reticle_screenshot";
|
|
84
|
+
/** stub/intercept network on the driven page (500, offline, delay) for error/edge-state testing. */
|
|
85
|
+
readonly NETWORK_MOCK: "reticle_network_mock";
|
|
86
|
+
/** pin the driven page's viewport to fixed pixels for reproducible visual baselines. */
|
|
87
|
+
readonly VIEWPORT: "reticle_viewport";
|
|
88
|
+
/** perceptual-diff the live page against a saved visual baseline. */
|
|
89
|
+
readonly VISUAL_DIFF: "reticle_visual_diff";
|
|
90
|
+
/** autonomously click every reachable control + report anomalies (no script). */
|
|
91
|
+
readonly CRAWL: "reticle_crawl";
|
|
92
|
+
/** scroll a virtualized list until a queried row mounts, then return it. */
|
|
93
|
+
readonly SCROLL_TO: "reticle_scroll_to";
|
|
94
|
+
/** Session lifecycle: tune the presenter session (e.g. idle-end window) for the app's needs.
|
|
95
|
+
* Member of the consolidated reticle_session {action:"tune"} — no longer advertised alone. */
|
|
96
|
+
readonly SESSION_TUNE: "reticle_session_tune";
|
|
97
|
+
/** Live-control: end the session (→ ended + push PRESENTER). Handlers live in the tools facet. */
|
|
98
|
+
readonly END_SESSION: "reticle_end_session";
|
|
99
|
+
/** Live-control: hand the session back to the human between turns (→ waiting/ask, revivable). */
|
|
100
|
+
readonly YIELD: "reticle_yield";
|
|
101
|
+
/** Live-control: clear a pause (→ active). */
|
|
102
|
+
readonly RESUME: "reticle_resume";
|
|
103
|
+
/** Live-control: drain the human→agent inbox (explicit poll). */
|
|
104
|
+
readonly MESSAGES: "reticle_messages";
|
|
105
|
+
/** Human review: list the mistakes the human pinned to elements, and resolve them once fixed. */
|
|
106
|
+
readonly REVIEW: "reticle_review";
|
|
107
|
+
/** First-run readiness: block briefly until the app's SDK connects (smooths the init→connect race). */
|
|
108
|
+
readonly WAIT_READY: "reticle_wait_ready";
|
|
109
|
+
/** Navigate the connected browser tab to a URL. */
|
|
110
|
+
readonly NAVIGATE: "reticle_navigate";
|
|
111
|
+
/** Reload the connected browser tab (soft or hard). */
|
|
112
|
+
readonly REFRESH: "reticle_refresh";
|
|
113
|
+
/** Export a verification-run artifact (.reticle/runs/<id>.json) — the OEM/CI-consumable verdict. */
|
|
114
|
+
readonly RUN_EXPORT: "reticle_run_export";
|
|
115
|
+
/** Consolidated families — one action-dispatched tool per family; members below stay
|
|
116
|
+
* defined (handlers intact) but are no longer advertised separately. */
|
|
117
|
+
readonly BASELINE: "reticle_baseline";
|
|
118
|
+
readonly SESSION: "reticle_session";
|
|
119
|
+
readonly RECORD: "reticle_record";
|
|
120
|
+
readonly FLOW: "reticle_flow";
|
|
121
|
+
readonly LEASE: "reticle_lease";
|
|
122
|
+
/** Lease a fresh isolated headless context from the shared browser pool (one per flow). */
|
|
123
|
+
readonly LEASE_ACQUIRE: "reticle_lease_acquire";
|
|
124
|
+
/** Release a previously leased context, freeing the pool slot. */
|
|
125
|
+
readonly LEASE_RELEASE: "reticle_lease_release";
|
|
126
|
+
/** Meta: discover tool definitions on demand instead of paying for all of them every turn. */
|
|
127
|
+
readonly TOOLS: "reticle_tools";
|
|
128
|
+
/** Meta: invoke any tool by name — the escape hatch that keeps a trimmed profile a trim, not a removal. */
|
|
129
|
+
readonly RUN: "reticle_run";
|
|
130
|
+
/** Report that Reticle itself failed — the agent's only way to tell us what to fix. */
|
|
131
|
+
readonly FEEDBACK: "reticle_feedback";
|
|
132
|
+
};
|
|
133
|
+
export type ReticleTool = (typeof ReticleTool)[keyof typeof ReticleTool];
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* From the LEAF, not from `flow-types`.
|
|
3
|
+
*
|
|
4
|
+
* Every file in the browser SDK imports `ReticleTool` from here. `flow-types` builds eleven zod
|
|
5
|
+
* schemas at module scope, so importing one constant through it loaded all of them into every page
|
|
6
|
+
* Reticle instruments — and a browser never validates a flow FILE. Measured: the schemas were
|
|
7
|
+
* reachable from the SDK entry, and three separate additions to them moved the first-load ceiling
|
|
8
|
+
* in a single week.
|
|
9
|
+
*/
|
|
10
|
+
import { FlowStepTool } from '../artifacts/flow-step-tool.js';
|
|
11
|
+
/**
|
|
12
|
+
* The names an agent calls Reticle by.
|
|
13
|
+
*
|
|
14
|
+
* Wire strings, and this package is where wire strings live: a name here crosses the boundary between
|
|
15
|
+
* an agent and the daemon exactly as an event type crosses the one between the page and the bridge.
|
|
16
|
+
* It sat under the server's tool directory because that is where the handlers are, and the result was
|
|
17
|
+
* that every feature wanting to name a tool -- flows naming the steps it replays, crawl, runs -- had
|
|
18
|
+
* to import from the tool surface to get at a string. Thirty-three of those imports were this one
|
|
19
|
+
* table.
|
|
20
|
+
*
|
|
21
|
+
* MCP tool names exposed to the coding agent. No free strings. The three that appear in a persisted
|
|
22
|
+
* flow (ACT / ACT_SEQUENCE / ACT_AND_WAIT) come from core's FlowStepTool — one source shared with the
|
|
23
|
+
* browser recorder and the flow schema, so a rename can't desync the recorder from the replayer. */
|
|
24
|
+
export const ReticleTool = {
|
|
25
|
+
SESSIONS: 'reticle_sessions',
|
|
26
|
+
/**
|
|
27
|
+
* The merged read family — snapshot/query/inspect/state under one name, on the `merged` surface.
|
|
28
|
+
*
|
|
29
|
+
* A name of its own rather than reusing `reticle_snapshot`, because the merged tool answers four
|
|
30
|
+
* different questions and calling it "snapshot" would make three of them undiscoverable.
|
|
31
|
+
*/
|
|
32
|
+
LOOK: 'reticle_look',
|
|
33
|
+
SNAPSHOT: 'reticle_snapshot',
|
|
34
|
+
QUERY: 'reticle_query',
|
|
35
|
+
INSPECT: 'reticle_inspect',
|
|
36
|
+
ACT: FlowStepTool.ACT,
|
|
37
|
+
ACT_SEQUENCE: FlowStepTool.ACT_SEQUENCE,
|
|
38
|
+
ACT_AND_WAIT: FlowStepTool.ACT_AND_WAIT,
|
|
39
|
+
OBSERVE: 'reticle_observe',
|
|
40
|
+
LINEAGE: 'reticle_lineage',
|
|
41
|
+
WAIT_FOR: 'reticle_wait_for',
|
|
42
|
+
NETWORK: 'reticle_network',
|
|
43
|
+
CONSOLE: 'reticle_console',
|
|
44
|
+
ANIMATIONS: 'reticle_animations',
|
|
45
|
+
ASSERT: 'reticle_assert',
|
|
46
|
+
RECONCILE: 'reticle_reconcile',
|
|
47
|
+
BASELINE_SAVE: 'reticle_baseline_save',
|
|
48
|
+
BASELINE_LIST: 'reticle_baseline_list',
|
|
49
|
+
DIFF: 'reticle_diff',
|
|
50
|
+
RECORD_START: 'reticle_record_start',
|
|
51
|
+
RECORD_STOP: 'reticle_record_stop',
|
|
52
|
+
REPLAY: 'reticle_replay',
|
|
53
|
+
EXPLORE: 'reticle_explore',
|
|
54
|
+
NARRATE: 'reticle_narrate',
|
|
55
|
+
CLOCK: 'reticle_clock',
|
|
56
|
+
STATE: 'reticle_state',
|
|
57
|
+
STORAGE: 'reticle_storage',
|
|
58
|
+
CAPABILITIES: 'reticle_capabilities',
|
|
59
|
+
CONTRACT_SAVE: 'reticle_contract_save',
|
|
60
|
+
DOMAIN: 'reticle_domain',
|
|
61
|
+
FLOW_SAVE: 'reticle_flow_save',
|
|
62
|
+
FLOW_LIST: 'reticle_flow_list',
|
|
63
|
+
FLOW_LOAD: 'reticle_flow_load',
|
|
64
|
+
FLOW_DELETE: 'reticle_flow_delete',
|
|
65
|
+
FLOW_REPLAY: 'reticle_flow_replay',
|
|
66
|
+
/** replay EVERY saved flow → one consolidated suite verdict + prioritized fixes (the loop closer). */
|
|
67
|
+
FLOW_VERIFY: 'reticle_flow_verify',
|
|
68
|
+
/** persist the human-recorded flow from the live tab. */
|
|
69
|
+
FLOW_SAVE_RECORDED: 'reticle_flow_save_recorded',
|
|
70
|
+
/** propose (+ opt-in apply) a nearest-match rebind for a drifted flow. */
|
|
71
|
+
FLOW_HEAL: 'reticle_flow_heal',
|
|
72
|
+
/** Does this flow notice when the thing it depends on breaks? See flow-mutate-tools.ts. */
|
|
73
|
+
FLOW_MUTATE: 'reticle_flow_mutate',
|
|
74
|
+
/** structured annotation → compiles into the recording's expect/dynamic/success. */
|
|
75
|
+
ANNOTATE: 'reticle_annotate',
|
|
76
|
+
AFFECTED: 'reticle_affected',
|
|
77
|
+
COVERAGE: 'reticle_coverage',
|
|
78
|
+
VERIFY_CHANGE: 'reticle_verify_change',
|
|
79
|
+
/** drive the app with a model and SAVE what it drove, for a project with nothing to replay yet. */
|
|
80
|
+
VERIFY_EXPLORE: 'reticle_verify_explore',
|
|
81
|
+
/** Merged: change/flows/affected/coverage/crawl — "what is proved, and what is not". */
|
|
82
|
+
INTENT: 'reticle_intent',
|
|
83
|
+
/** what THIS run has established, proved, and not yet discharged — pulled when memory is gone. */
|
|
84
|
+
CONTEXT: 'reticle_context',
|
|
85
|
+
VERIFY: 'reticle_verify',
|
|
86
|
+
/** read cross-run history (.reticle/project.json) + diff-vs-last for a name. */
|
|
87
|
+
PROJECT: 'reticle_project',
|
|
88
|
+
/** The team's shared memory, read on demand — see memory/memory-tools.ts. */
|
|
89
|
+
MEMORY: 'reticle_memory',
|
|
90
|
+
/** explicitly record a run outcome (the manual companion to auto-recording). */
|
|
91
|
+
RUN_RECORD: 'reticle_run_record',
|
|
92
|
+
/** capture a pixel screenshot (CDP/driven browser) →.reticle/visual/<name>.png. */
|
|
93
|
+
SCREENSHOT: 'reticle_screenshot',
|
|
94
|
+
/** stub/intercept network on the driven page (500, offline, delay) for error/edge-state testing. */
|
|
95
|
+
NETWORK_MOCK: 'reticle_network_mock',
|
|
96
|
+
/** pin the driven page's viewport to fixed pixels for reproducible visual baselines. */
|
|
97
|
+
VIEWPORT: 'reticle_viewport',
|
|
98
|
+
/** perceptual-diff the live page against a saved visual baseline. */
|
|
99
|
+
VISUAL_DIFF: 'reticle_visual_diff',
|
|
100
|
+
/** autonomously click every reachable control + report anomalies (no script). */
|
|
101
|
+
CRAWL: 'reticle_crawl',
|
|
102
|
+
/** scroll a virtualized list until a queried row mounts, then return it. */
|
|
103
|
+
SCROLL_TO: 'reticle_scroll_to',
|
|
104
|
+
/** Session lifecycle: tune the presenter session (e.g. idle-end window) for the app's needs.
|
|
105
|
+
* Member of the consolidated reticle_session {action:"tune"} — no longer advertised alone. */
|
|
106
|
+
SESSION_TUNE: 'reticle_session_tune',
|
|
107
|
+
/** Live-control: end the session (→ ended + push PRESENTER). Handlers live in the tools facet. */
|
|
108
|
+
END_SESSION: 'reticle_end_session',
|
|
109
|
+
/** Live-control: hand the session back to the human between turns (→ waiting/ask, revivable). */
|
|
110
|
+
YIELD: 'reticle_yield',
|
|
111
|
+
/** Live-control: clear a pause (→ active). */
|
|
112
|
+
RESUME: 'reticle_resume',
|
|
113
|
+
/** Live-control: drain the human→agent inbox (explicit poll). */
|
|
114
|
+
MESSAGES: 'reticle_messages',
|
|
115
|
+
/** Human review: list the mistakes the human pinned to elements, and resolve them once fixed. */
|
|
116
|
+
REVIEW: 'reticle_review',
|
|
117
|
+
/** First-run readiness: block briefly until the app's SDK connects (smooths the init→connect race). */
|
|
118
|
+
WAIT_READY: 'reticle_wait_ready',
|
|
119
|
+
/** Navigate the connected browser tab to a URL. */
|
|
120
|
+
NAVIGATE: 'reticle_navigate',
|
|
121
|
+
/** Reload the connected browser tab (soft or hard). */
|
|
122
|
+
REFRESH: 'reticle_refresh',
|
|
123
|
+
/** Export a verification-run artifact (.reticle/runs/<id>.json) — the OEM/CI-consumable verdict. */
|
|
124
|
+
RUN_EXPORT: 'reticle_run_export',
|
|
125
|
+
/** Consolidated families — one action-dispatched tool per family; members below stay
|
|
126
|
+
* defined (handlers intact) but are no longer advertised separately. */
|
|
127
|
+
BASELINE: 'reticle_baseline',
|
|
128
|
+
SESSION: 'reticle_session',
|
|
129
|
+
RECORD: 'reticle_record',
|
|
130
|
+
FLOW: 'reticle_flow',
|
|
131
|
+
LEASE: 'reticle_lease',
|
|
132
|
+
/** Lease a fresh isolated headless context from the shared browser pool (one per flow). */
|
|
133
|
+
LEASE_ACQUIRE: 'reticle_lease_acquire',
|
|
134
|
+
/** Release a previously leased context, freeing the pool slot. */
|
|
135
|
+
LEASE_RELEASE: 'reticle_lease_release',
|
|
136
|
+
/** Meta: discover tool definitions on demand instead of paying for all of them every turn. */
|
|
137
|
+
TOOLS: 'reticle_tools',
|
|
138
|
+
/** Meta: invoke any tool by name — the escape hatch that keeps a trimmed profile a trim, not a removal. */
|
|
139
|
+
RUN: 'reticle_run',
|
|
140
|
+
/** Report that Reticle itself failed — the agent's only way to tell us what to fix. */
|
|
141
|
+
FEEDBACK: 'reticle_feedback',
|
|
142
|
+
};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* count=N child count (for containers, replaces expanding children)
|
|
26
26
|
* ph="..." placeholder text
|
|
27
27
|
*/
|
|
28
|
-
import { ElementState } from './constants.js';
|
|
28
|
+
import { ElementState } from './constants/constants.js';
|
|
29
29
|
const ROLE_MAP = {
|
|
30
30
|
button: 'btn',
|
|
31
31
|
textbox: 'inp',
|