@reticlehq/core 2.3.0 → 2.5.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/consequence.d.ts +27 -0
- package/dist/consequence.js +26 -0
- package/dist/constants.d.ts +52 -8
- package/dist/constants.js +49 -8
- package/dist/contract-fingerprint.d.ts +29 -0
- package/dist/contract-fingerprint.js +56 -0
- package/dist/daemon-registry.js +1 -1
- package/dist/event-payloads.d.ts +50 -2
- package/dist/event-payloads.js +12 -1
- package/dist/flow-constants.d.ts +8 -0
- package/dist/flow-constants.js +12 -0
- package/dist/flow-types.d.ts +40 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/journal.d.ts +2 -2
- package/dist/messages.d.ts +72 -0
- package/dist/messages.js +34 -0
- package/dist/net.d.ts +40 -0
- package/dist/net.js +44 -0
- package/dist/project-id.d.ts +28 -0
- package/dist/project-id.js +51 -0
- package/dist/redaction.d.ts +64 -0
- package/dist/redaction.js +118 -1
- package/dist/schema/hello-message.json +17 -0
- package/dist/schema/reticle-message.json +17 -0
- package/dist/security.js +10 -5
- package/dist/source-constants.d.ts +32 -0
- package/dist/source-constants.js +32 -0
- package/dist/state-select.d.ts +24 -2
- package/dist/state-select.js +102 -22
- package/dist/telemetry-feedback.d.ts +32 -10
- package/dist/telemetry-feedback.js +21 -0
- package/dist/telemetry-session.d.ts +30 -0
- package/dist/telemetry-session.js +24 -0
- package/dist/telemetry.d.ts +491 -81
- package/dist/telemetry.js +188 -2
- package/dist/toon.d.ts +2 -1
- package/dist/toon.js +37 -37
- package/dist/types.d.ts +54 -6
- package/dist/types.js +12 -0
- package/dist/upgrade.js +1 -1
- package/dist/verification-run.d.ts +38 -38
- package/dist/verified-constants.d.ts +37 -0
- package/dist/verified-constants.js +36 -0
- package/package.json +5 -3
package/dist/messages.d.ts
CHANGED
|
@@ -179,6 +179,36 @@ export declare const HelloMessageSchema: z.ZodObject<{
|
|
|
179
179
|
token: z.ZodOptional<z.ZodString>;
|
|
180
180
|
/** Whether the app has advertised a capability registry (reticle.describe). */
|
|
181
181
|
hasCapabilities: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
/**
|
|
183
|
+
* The version of the SDK in the page, so a version-skewed pair can SAY so.
|
|
184
|
+
*
|
|
185
|
+
* `protocolVersion` only catches an incompatible wire format. A 2.2.1 SDK against a 2.4.0 daemon
|
|
186
|
+
* agrees on the protocol, connects fine, and then disagrees about tool behaviour — which surfaced
|
|
187
|
+
* as a bare `-32000` with nothing on either side naming a version. Supplied by the build plugin
|
|
188
|
+
* (which can read the installed package's version Node-side); absent means "unknown", never
|
|
189
|
+
* "matching", so a hand-wired connect is not falsely reported as in sync.
|
|
190
|
+
*/
|
|
191
|
+
sdkVersion: z.ZodOptional<z.ZodString>;
|
|
192
|
+
/**
|
|
193
|
+
* The wire contract this SDK build speaks (see contract-fingerprint.ts) — DERIVED from core's
|
|
194
|
+
* vocabulary, so it moves only when a name on the wire genuinely changes.
|
|
195
|
+
*
|
|
196
|
+
* `sdkVersion` above answers "which release is this"; this answers the question that actually
|
|
197
|
+
* decides whether the pair works, and it answers it for the two cases a version cannot: a patch
|
|
198
|
+
* bump that changed nothing (equal here → stay quiet) and two different BUILDS of one version
|
|
199
|
+
* number, which is what a stale daemon or a cached npx install is (unequal here → say so).
|
|
200
|
+
*/
|
|
201
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
202
|
+
/**
|
|
203
|
+
* Extra key names this app declared sensitive via `connect({ redact: { keys } })`.
|
|
204
|
+
*
|
|
205
|
+
* Sent so the DRIVEN path redacts them too: a request body captured by the daemon from the network
|
|
206
|
+
* stack never passes through the SDK, so an app-declared credential would otherwise reach the
|
|
207
|
+
* journal in cleartext on exactly the path the user cannot see. Literal names only — a pattern
|
|
208
|
+
* compiled from the wire would be a ReDoS surface, and the exemption list is never sent because it
|
|
209
|
+
* is the only part of the config that could REMOVE redaction. See `wireRedactionKeys`.
|
|
210
|
+
*/
|
|
211
|
+
redactKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
182
212
|
}, "strip", z.ZodTypeAny, {
|
|
183
213
|
kind: "hello";
|
|
184
214
|
sessionId: string;
|
|
@@ -189,6 +219,9 @@ export declare const HelloMessageSchema: z.ZodObject<{
|
|
|
189
219
|
projectId?: string | undefined;
|
|
190
220
|
token?: string | undefined;
|
|
191
221
|
hasCapabilities?: boolean | undefined;
|
|
222
|
+
sdkVersion?: string | undefined;
|
|
223
|
+
contract?: string | undefined;
|
|
224
|
+
redactKeys?: string[] | undefined;
|
|
192
225
|
}, {
|
|
193
226
|
kind: "hello";
|
|
194
227
|
sessionId: string;
|
|
@@ -199,6 +232,9 @@ export declare const HelloMessageSchema: z.ZodObject<{
|
|
|
199
232
|
projectId?: string | undefined;
|
|
200
233
|
token?: string | undefined;
|
|
201
234
|
hasCapabilities?: boolean | undefined;
|
|
235
|
+
sdkVersion?: string | undefined;
|
|
236
|
+
contract?: string | undefined;
|
|
237
|
+
redactKeys?: string[] | undefined;
|
|
202
238
|
}>;
|
|
203
239
|
export type HelloMessage = z.infer<typeof HelloMessageSchema>;
|
|
204
240
|
/** Agent -> browser request, routed by the bridge with a correlation id. */
|
|
@@ -368,6 +404,36 @@ export declare const ReticleMessageSchema: z.ZodDiscriminatedUnion<"kind", [z.Zo
|
|
|
368
404
|
token: z.ZodOptional<z.ZodString>;
|
|
369
405
|
/** Whether the app has advertised a capability registry (reticle.describe). */
|
|
370
406
|
hasCapabilities: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
/**
|
|
408
|
+
* The version of the SDK in the page, so a version-skewed pair can SAY so.
|
|
409
|
+
*
|
|
410
|
+
* `protocolVersion` only catches an incompatible wire format. A 2.2.1 SDK against a 2.4.0 daemon
|
|
411
|
+
* agrees on the protocol, connects fine, and then disagrees about tool behaviour — which surfaced
|
|
412
|
+
* as a bare `-32000` with nothing on either side naming a version. Supplied by the build plugin
|
|
413
|
+
* (which can read the installed package's version Node-side); absent means "unknown", never
|
|
414
|
+
* "matching", so a hand-wired connect is not falsely reported as in sync.
|
|
415
|
+
*/
|
|
416
|
+
sdkVersion: z.ZodOptional<z.ZodString>;
|
|
417
|
+
/**
|
|
418
|
+
* The wire contract this SDK build speaks (see contract-fingerprint.ts) — DERIVED from core's
|
|
419
|
+
* vocabulary, so it moves only when a name on the wire genuinely changes.
|
|
420
|
+
*
|
|
421
|
+
* `sdkVersion` above answers "which release is this"; this answers the question that actually
|
|
422
|
+
* decides whether the pair works, and it answers it for the two cases a version cannot: a patch
|
|
423
|
+
* bump that changed nothing (equal here → stay quiet) and two different BUILDS of one version
|
|
424
|
+
* number, which is what a stale daemon or a cached npx install is (unequal here → say so).
|
|
425
|
+
*/
|
|
426
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
427
|
+
/**
|
|
428
|
+
* Extra key names this app declared sensitive via `connect({ redact: { keys } })`.
|
|
429
|
+
*
|
|
430
|
+
* Sent so the DRIVEN path redacts them too: a request body captured by the daemon from the network
|
|
431
|
+
* stack never passes through the SDK, so an app-declared credential would otherwise reach the
|
|
432
|
+
* journal in cleartext on exactly the path the user cannot see. Literal names only — a pattern
|
|
433
|
+
* compiled from the wire would be a ReDoS surface, and the exemption list is never sent because it
|
|
434
|
+
* is the only part of the config that could REMOVE redaction. See `wireRedactionKeys`.
|
|
435
|
+
*/
|
|
436
|
+
redactKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
371
437
|
}, "strip", z.ZodTypeAny, {
|
|
372
438
|
kind: "hello";
|
|
373
439
|
sessionId: string;
|
|
@@ -378,6 +444,9 @@ export declare const ReticleMessageSchema: z.ZodDiscriminatedUnion<"kind", [z.Zo
|
|
|
378
444
|
projectId?: string | undefined;
|
|
379
445
|
token?: string | undefined;
|
|
380
446
|
hasCapabilities?: boolean | undefined;
|
|
447
|
+
sdkVersion?: string | undefined;
|
|
448
|
+
contract?: string | undefined;
|
|
449
|
+
redactKeys?: string[] | undefined;
|
|
381
450
|
}, {
|
|
382
451
|
kind: "hello";
|
|
383
452
|
sessionId: string;
|
|
@@ -388,6 +457,9 @@ export declare const ReticleMessageSchema: z.ZodDiscriminatedUnion<"kind", [z.Zo
|
|
|
388
457
|
projectId?: string | undefined;
|
|
389
458
|
token?: string | undefined;
|
|
390
459
|
hasCapabilities?: boolean | undefined;
|
|
460
|
+
sdkVersion?: string | undefined;
|
|
461
|
+
contract?: string | undefined;
|
|
462
|
+
redactKeys?: string[] | undefined;
|
|
391
463
|
}>, z.ZodObject<{
|
|
392
464
|
kind: z.ZodLiteral<"command">;
|
|
393
465
|
id: z.ZodString;
|
package/dist/messages.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { EventAttribution, EventType, RETICLE_PROTOCOL_VERSION, MessageKind, TRANSPORT_LIMITS, } from './constants.js';
|
|
3
3
|
import { HumanControlKind, MarkAnchorStrategy } from './session-constants.js';
|
|
4
|
+
import { MAX_WIRE_REDACT_KEYS, MAX_WIRE_REDACT_KEY_LENGTH } from './redaction.js';
|
|
4
5
|
const sessionIdSchema = z.string().min(1).max(TRANSPORT_LIMITS.MAX_SESSION_ID_LENGTH);
|
|
5
6
|
const refSchema = z.string().max(TRANSPORT_LIMITS.MAX_REF_LENGTH);
|
|
6
7
|
/**
|
|
@@ -85,6 +86,39 @@ export const HelloMessageSchema = z.object({
|
|
|
85
86
|
token: z.string().max(TRANSPORT_LIMITS.MAX_TOKEN_LENGTH).optional(),
|
|
86
87
|
/** Whether the app has advertised a capability registry (reticle.describe). */
|
|
87
88
|
hasCapabilities: z.boolean().optional(),
|
|
89
|
+
/**
|
|
90
|
+
* The version of the SDK in the page, so a version-skewed pair can SAY so.
|
|
91
|
+
*
|
|
92
|
+
* `protocolVersion` only catches an incompatible wire format. A 2.2.1 SDK against a 2.4.0 daemon
|
|
93
|
+
* agrees on the protocol, connects fine, and then disagrees about tool behaviour — which surfaced
|
|
94
|
+
* as a bare `-32000` with nothing on either side naming a version. Supplied by the build plugin
|
|
95
|
+
* (which can read the installed package's version Node-side); absent means "unknown", never
|
|
96
|
+
* "matching", so a hand-wired connect is not falsely reported as in sync.
|
|
97
|
+
*/
|
|
98
|
+
sdkVersion: z.string().max(TRANSPORT_LIMITS.MAX_ADAPTER_NAME_LENGTH).optional(),
|
|
99
|
+
/**
|
|
100
|
+
* The wire contract this SDK build speaks (see contract-fingerprint.ts) — DERIVED from core's
|
|
101
|
+
* vocabulary, so it moves only when a name on the wire genuinely changes.
|
|
102
|
+
*
|
|
103
|
+
* `sdkVersion` above answers "which release is this"; this answers the question that actually
|
|
104
|
+
* decides whether the pair works, and it answers it for the two cases a version cannot: a patch
|
|
105
|
+
* bump that changed nothing (equal here → stay quiet) and two different BUILDS of one version
|
|
106
|
+
* number, which is what a stale daemon or a cached npx install is (unequal here → say so).
|
|
107
|
+
*/
|
|
108
|
+
contract: z.string().max(TRANSPORT_LIMITS.MAX_ADAPTER_NAME_LENGTH).optional(),
|
|
109
|
+
/**
|
|
110
|
+
* Extra key names this app declared sensitive via `connect({ redact: { keys } })`.
|
|
111
|
+
*
|
|
112
|
+
* Sent so the DRIVEN path redacts them too: a request body captured by the daemon from the network
|
|
113
|
+
* stack never passes through the SDK, so an app-declared credential would otherwise reach the
|
|
114
|
+
* journal in cleartext on exactly the path the user cannot see. Literal names only — a pattern
|
|
115
|
+
* compiled from the wire would be a ReDoS surface, and the exemption list is never sent because it
|
|
116
|
+
* is the only part of the config that could REMOVE redaction. See `wireRedactionKeys`.
|
|
117
|
+
*/
|
|
118
|
+
redactKeys: z
|
|
119
|
+
.array(z.string().min(1).max(MAX_WIRE_REDACT_KEY_LENGTH))
|
|
120
|
+
.max(MAX_WIRE_REDACT_KEYS)
|
|
121
|
+
.optional(),
|
|
88
122
|
});
|
|
89
123
|
/** Agent -> browser request, routed by the bridge with a correlation id. */
|
|
90
124
|
export const CommandMessageSchema = z.object({
|
package/dist/net.d.ts
CHANGED
|
@@ -39,3 +39,43 @@ export declare const IpcStatus: {
|
|
|
39
39
|
* settled, and the server reverted the shipment 1.2s later.
|
|
40
40
|
*/
|
|
41
41
|
export declare const HTTP_ACCEPTED = 202;
|
|
42
|
+
/**
|
|
43
|
+
* Traffic the DEV TOOLCHAIN makes about itself — never the app under test.
|
|
44
|
+
*
|
|
45
|
+
* A CLOSED list, deliberately. Reported from a real drive: a correct Next.js navigation graded
|
|
46
|
+
* `verified: "no"` because the dev overlay was fetching a source map for an unrelated React key
|
|
47
|
+
* warning (`POST /__nextjs_original-stack-frames`), and that in-flight request counted as "the UI
|
|
48
|
+
* advanced over a request that never settled". Every app that logs one dev warning got a false
|
|
49
|
+
* negative on every action — the worst defect class after a false green.
|
|
50
|
+
*
|
|
51
|
+
* The rule for adding an entry: it must be a channel the FRAMEWORK owns, that no application route
|
|
52
|
+
* can occupy, and that fires as a consequence of running in dev rather than of anything the user
|
|
53
|
+
* did. Widening one of these until it can swallow an app endpoint converts this false negative into
|
|
54
|
+
* a false GREEN, so each pattern is anchored to a reserved prefix or a build-tool file suffix:
|
|
55
|
+
*
|
|
56
|
+
* - `/__nextjs` — every Next dev-overlay endpoint shares this reserved prefix (`_original-stack-frames`,
|
|
57
|
+
* `_original-stack-frame`, `_launch-editor`, `_source-map`, `_error_feedback`, `_server_status`,
|
|
58
|
+
* `_devtools_config`, `_font`, …). Verified against next@15 and next@16 `dist`.
|
|
59
|
+
* - `/_next/webpack-hmr` + `/_next/static/webpack/` — Next's HMR channel and the `.hot-update.*`
|
|
60
|
+
* chunks it fetches. `/_next/static/chunks/` and `/_next/image` are NOT here: those are the app.
|
|
61
|
+
* - `.hot-update.` — the webpack HMR file suffix, for any webpack app (CRA, Rspack, plain webpack).
|
|
62
|
+
* - `/@vite/` (`client`, `env`), `/@react-refresh`, `/__vite_ping` — the Vite dev client, which is
|
|
63
|
+
* what SvelteKit, Astro, Remix and plain Vite all run. Verified present in vite@7/vite@8 and in
|
|
64
|
+
* astro@7's dist. Vite's `/@id/` and `/@fs/` are NOT here: those load the app's own modules.
|
|
65
|
+
*/
|
|
66
|
+
export declare const DevToolingChannel: {
|
|
67
|
+
readonly NEXT_DEV_OVERLAY: "/__nextjs";
|
|
68
|
+
readonly NEXT_HMR: "/_next/webpack-hmr";
|
|
69
|
+
readonly NEXT_HMR_CHUNKS: "/_next/static/webpack/";
|
|
70
|
+
readonly WEBPACK_HOT_UPDATE: ".hot-update.";
|
|
71
|
+
readonly VITE_CLIENT: "/@vite/";
|
|
72
|
+
readonly VITE_REACT_REFRESH: "/@react-refresh";
|
|
73
|
+
readonly VITE_PING: "/__vite_ping";
|
|
74
|
+
};
|
|
75
|
+
export type DevToolingChannel = (typeof DevToolingChannel)[keyof typeof DevToolingChannel];
|
|
76
|
+
/**
|
|
77
|
+
* Is this URL dev tooling rather than the app? Used to keep such calls out of the settle decision and
|
|
78
|
+
* out of contradiction hunting. Never used to HIDE the call: the event stays in the timeline and the
|
|
79
|
+
* exclusion is disclosed alongside the verdict.
|
|
80
|
+
*/
|
|
81
|
+
export declare function isDevToolingUrl(url: string | undefined): boolean;
|
package/dist/net.js
CHANGED
|
@@ -38,3 +38,47 @@ export const IpcStatus = {
|
|
|
38
38
|
* settled, and the server reverted the shipment 1.2s later.
|
|
39
39
|
*/
|
|
40
40
|
export const HTTP_ACCEPTED = 202;
|
|
41
|
+
/**
|
|
42
|
+
* Traffic the DEV TOOLCHAIN makes about itself — never the app under test.
|
|
43
|
+
*
|
|
44
|
+
* A CLOSED list, deliberately. Reported from a real drive: a correct Next.js navigation graded
|
|
45
|
+
* `verified: "no"` because the dev overlay was fetching a source map for an unrelated React key
|
|
46
|
+
* warning (`POST /__nextjs_original-stack-frames`), and that in-flight request counted as "the UI
|
|
47
|
+
* advanced over a request that never settled". Every app that logs one dev warning got a false
|
|
48
|
+
* negative on every action — the worst defect class after a false green.
|
|
49
|
+
*
|
|
50
|
+
* The rule for adding an entry: it must be a channel the FRAMEWORK owns, that no application route
|
|
51
|
+
* can occupy, and that fires as a consequence of running in dev rather than of anything the user
|
|
52
|
+
* did. Widening one of these until it can swallow an app endpoint converts this false negative into
|
|
53
|
+
* a false GREEN, so each pattern is anchored to a reserved prefix or a build-tool file suffix:
|
|
54
|
+
*
|
|
55
|
+
* - `/__nextjs` — every Next dev-overlay endpoint shares this reserved prefix (`_original-stack-frames`,
|
|
56
|
+
* `_original-stack-frame`, `_launch-editor`, `_source-map`, `_error_feedback`, `_server_status`,
|
|
57
|
+
* `_devtools_config`, `_font`, …). Verified against next@15 and next@16 `dist`.
|
|
58
|
+
* - `/_next/webpack-hmr` + `/_next/static/webpack/` — Next's HMR channel and the `.hot-update.*`
|
|
59
|
+
* chunks it fetches. `/_next/static/chunks/` and `/_next/image` are NOT here: those are the app.
|
|
60
|
+
* - `.hot-update.` — the webpack HMR file suffix, for any webpack app (CRA, Rspack, plain webpack).
|
|
61
|
+
* - `/@vite/` (`client`, `env`), `/@react-refresh`, `/__vite_ping` — the Vite dev client, which is
|
|
62
|
+
* what SvelteKit, Astro, Remix and plain Vite all run. Verified present in vite@7/vite@8 and in
|
|
63
|
+
* astro@7's dist. Vite's `/@id/` and `/@fs/` are NOT here: those load the app's own modules.
|
|
64
|
+
*/
|
|
65
|
+
export const DevToolingChannel = {
|
|
66
|
+
NEXT_DEV_OVERLAY: '/__nextjs',
|
|
67
|
+
NEXT_HMR: '/_next/webpack-hmr',
|
|
68
|
+
NEXT_HMR_CHUNKS: '/_next/static/webpack/',
|
|
69
|
+
WEBPACK_HOT_UPDATE: '.hot-update.',
|
|
70
|
+
VITE_CLIENT: '/@vite/',
|
|
71
|
+
VITE_REACT_REFRESH: '/@react-refresh',
|
|
72
|
+
VITE_PING: '/__vite_ping',
|
|
73
|
+
};
|
|
74
|
+
const DEV_TOOLING_PATTERNS = Object.values(DevToolingChannel);
|
|
75
|
+
/**
|
|
76
|
+
* Is this URL dev tooling rather than the app? Used to keep such calls out of the settle decision and
|
|
77
|
+
* out of contradiction hunting. Never used to HIDE the call: the event stays in the timeline and the
|
|
78
|
+
* exclusion is disclosed alongside the verdict.
|
|
79
|
+
*/
|
|
80
|
+
export function isDevToolingUrl(url) {
|
|
81
|
+
if (url === undefined)
|
|
82
|
+
return false;
|
|
83
|
+
return DEV_TOOLING_PATTERNS.some((pattern) => url.includes(pattern));
|
|
84
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a project's stable identity is SPELLED. The rule, once, for everyone who has to produce it.
|
|
3
|
+
*
|
|
4
|
+
* projectId is what scopes a session to an app, so the build plugin's stamp and what `reticle init`
|
|
5
|
+
* records into `.reticle.json` have to agree exactly or the app's sessions land under a project
|
|
6
|
+
* nobody is looking at. It was maintained as two byte-identical copies — `slugifyPackageName`,
|
|
7
|
+
* `shortHash` and `deriveProjectId` in both `@reticlehq/vite-plugin` and `@reticlehq/server` — held
|
|
8
|
+
* in sync by a comment asking the next contributor to keep them identical. They still were, but
|
|
9
|
+
* nothing would have failed on the day they were not: no test compares them, and the symptom of a
|
|
10
|
+
* mismatch is a session quietly filed under the wrong id.
|
|
11
|
+
*
|
|
12
|
+
* The hashing stays with the callers because it needs `node:crypto`, and core is isomorphic — the
|
|
13
|
+
* same split `discoverDaemonPort` already uses, where core owns the selection rule and each package
|
|
14
|
+
* owns its own filesystem plumbing.
|
|
15
|
+
*/
|
|
16
|
+
/** How much of the digest goes into the id. Short enough to read, long enough not to collide. */
|
|
17
|
+
export declare const PROJECT_ID_HASH_LENGTH = 8;
|
|
18
|
+
/** `@acme/web` → `acme-web`; non-alphanumerics collapse to single dashes; edges trimmed. */
|
|
19
|
+
export declare function slugifyPackageName(name: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* The stable projectId: a slug of the package name (falling back to the root's folder name, then
|
|
22
|
+
* `app`), plus a short fingerprint of the absolute root so two checkouts of the same package are
|
|
23
|
+
* still distinct.
|
|
24
|
+
*
|
|
25
|
+
* `hash` is injected rather than imported — it is the one impure, Node-only part, and passing it in
|
|
26
|
+
* is what lets this rule live in the isomorphic package with the callers that own `node:crypto`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function projectIdFrom(pkgName: string | undefined, rootPath: string, hash: (input: string) => string): string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a project's stable identity is SPELLED. The rule, once, for everyone who has to produce it.
|
|
3
|
+
*
|
|
4
|
+
* projectId is what scopes a session to an app, so the build plugin's stamp and what `reticle init`
|
|
5
|
+
* records into `.reticle.json` have to agree exactly or the app's sessions land under a project
|
|
6
|
+
* nobody is looking at. It was maintained as two byte-identical copies — `slugifyPackageName`,
|
|
7
|
+
* `shortHash` and `deriveProjectId` in both `@reticlehq/vite-plugin` and `@reticlehq/server` — held
|
|
8
|
+
* in sync by a comment asking the next contributor to keep them identical. They still were, but
|
|
9
|
+
* nothing would have failed on the day they were not: no test compares them, and the symptom of a
|
|
10
|
+
* mismatch is a session quietly filed under the wrong id.
|
|
11
|
+
*
|
|
12
|
+
* The hashing stays with the callers because it needs `node:crypto`, and core is isomorphic — the
|
|
13
|
+
* same split `discoverDaemonPort` already uses, where core owns the selection rule and each package
|
|
14
|
+
* owns its own filesystem plumbing.
|
|
15
|
+
*/
|
|
16
|
+
/** How much of the digest goes into the id. Short enough to read, long enough not to collide. */
|
|
17
|
+
export const PROJECT_ID_HASH_LENGTH = 8;
|
|
18
|
+
/** Fallback id base when neither the package name nor the folder name yields anything usable. */
|
|
19
|
+
const FALLBACK_PROJECT_BASE = 'app';
|
|
20
|
+
/** `@acme/web` → `acme-web`; non-alphanumerics collapse to single dashes; edges trimmed. */
|
|
21
|
+
export function slugifyPackageName(name) {
|
|
22
|
+
return name
|
|
23
|
+
.toLowerCase()
|
|
24
|
+
.replace(/^@/, '')
|
|
25
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
26
|
+
.replace(/^-+|-+$/g, '');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The last segment of a path — `node:path`'s `basename`, reimplemented because core may not import
|
|
30
|
+
* Node. Handles both separators so a Windows root produces the same id as a POSIX one.
|
|
31
|
+
*/
|
|
32
|
+
function pathTail(path) {
|
|
33
|
+
const trimmed = path.replace(/[/\\]+$/, '');
|
|
34
|
+
const cut = Math.max(trimmed.lastIndexOf('/'), trimmed.lastIndexOf('\\'));
|
|
35
|
+
return -1 === cut ? trimmed : trimmed.slice(cut + 1);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The stable projectId: a slug of the package name (falling back to the root's folder name, then
|
|
39
|
+
* `app`), plus a short fingerprint of the absolute root so two checkouts of the same package are
|
|
40
|
+
* still distinct.
|
|
41
|
+
*
|
|
42
|
+
* `hash` is injected rather than imported — it is the one impure, Node-only part, and passing it in
|
|
43
|
+
* is what lets this rule live in the isomorphic package with the callers that own `node:crypto`.
|
|
44
|
+
*/
|
|
45
|
+
export function projectIdFrom(pkgName, rootPath, hash) {
|
|
46
|
+
const fromName = pkgName !== undefined ? slugifyPackageName(pkgName) : '';
|
|
47
|
+
const base = fromName.length > 0
|
|
48
|
+
? fromName
|
|
49
|
+
: slugifyPackageName(pathTail(rootPath)) || FALLBACK_PROJECT_BASE;
|
|
50
|
+
return `${base}-${hash(rootPath)}`;
|
|
51
|
+
}
|
package/dist/redaction.d.ts
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in rule, always available and never configurable.
|
|
3
|
+
*
|
|
4
|
+
* Separate from `isSensitiveKey` on purpose: the driven path needs a floor that no page-supplied
|
|
5
|
+
* config can lower, and the conformance test needs something to compare an unconfigured policy
|
|
6
|
+
* against. Every existing caller wants `isSensitiveKey`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function defaultIsSensitiveKey(key: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* An app's additions to (and subtractions from) the default rule.
|
|
11
|
+
*
|
|
12
|
+
* Additive by construction: `keys` can only ever redact MORE, and `allow` only exempts from the
|
|
13
|
+
* DEFAULT rule. There is deliberately no way to replace the default set — a user who could would
|
|
14
|
+
* eventually ship an app that leaks, and Reticle would be the thing that recorded it.
|
|
15
|
+
*/
|
|
16
|
+
export interface RedactionConfig {
|
|
17
|
+
/**
|
|
18
|
+
* Extra keys to redact. A string matches a key name EXACTLY (case-insensitively) — `'code'` does
|
|
19
|
+
* not redact `codeOwner` — and a RegExp is tested against the key. Use a string unless you need a
|
|
20
|
+
* pattern: only strings cross the bridge (see `wireRedactionKeys`).
|
|
21
|
+
*/
|
|
22
|
+
keys?: ReadonlyArray<string | RegExp>;
|
|
23
|
+
/**
|
|
24
|
+
* Keys to exempt from the DEFAULT rule, for the false positives every app has its own version of
|
|
25
|
+
* (`designToken`, an internal `sessionId` that is not a credential). Exact, case-insensitive.
|
|
26
|
+
* Loses to `keys`: an explicit redact instruction beats an exemption.
|
|
27
|
+
*/
|
|
28
|
+
allow?: readonly string[];
|
|
29
|
+
}
|
|
30
|
+
/** A resolved rule. An object rather than a bare function so a caller can hold one per session. */
|
|
31
|
+
export interface RedactionPolicy {
|
|
32
|
+
isSensitiveKey: (key: string) => boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve a config into a rule.
|
|
36
|
+
*
|
|
37
|
+
* `onWarn` fires ONCE here, at build time, rather than per key: the check runs on every serialized
|
|
38
|
+
* key of every event, so a per-key warning would flood the console of the app it is trying to help.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildRedactionPolicy(config?: RedactionConfig, onWarn?: (message: string) => void): RedactionPolicy;
|
|
41
|
+
export declare function setActiveRedactionPolicy(policy: RedactionPolicy): void;
|
|
42
|
+
export declare function resetActiveRedactionPolicy(): void;
|
|
43
|
+
/** Whether a key carries a credential, under the policy in force. */
|
|
1
44
|
export declare function isSensitiveKey(key: string): boolean;
|
|
45
|
+
/** Cap on how many declared keys travel in a hello — a bound, not a limit anyone should reach. */
|
|
46
|
+
export declare const MAX_WIRE_REDACT_KEYS = 64;
|
|
47
|
+
/** Cap on one declared key's length, so a hello cannot be inflated by a pathological name. */
|
|
48
|
+
export declare const MAX_WIRE_REDACT_KEY_LENGTH = 128;
|
|
49
|
+
/**
|
|
50
|
+
* The part of a config that may cross the bridge, so the server redacts an app's own credentials on
|
|
51
|
+
* the driven path too — where request bodies are captured raw from the network stack and never pass
|
|
52
|
+
* through the SDK at all.
|
|
53
|
+
*
|
|
54
|
+
* Two deliberate exclusions, and both are the safe direction of the asymmetry:
|
|
55
|
+
*
|
|
56
|
+
* - **RegExp entries do not travel.** Compiling a pattern that arrived over a socket and running it
|
|
57
|
+
* against every key of every request body is a ReDoS surface handed to whatever is on the page.
|
|
58
|
+
* A dropped pattern means the driven path over-redacts relative to the config, never under.
|
|
59
|
+
* - **`allow` never travels.** It is the only part of the config that REMOVES redaction, so a page
|
|
60
|
+
* able to send it could quietly un-redact `password` in the daemon's journal for every session.
|
|
61
|
+
* The driven path keeps the default floor.
|
|
62
|
+
*
|
|
63
|
+
* Both limitations are documented for users in docs/usage.md ("Extending the redaction rules").
|
|
64
|
+
*/
|
|
65
|
+
export declare function wireRedactionKeys(config?: RedactionConfig): string[];
|
|
2
66
|
/** Redact high-confidence secret shapes anywhere in a text/value, independent of any surrounding key. */
|
|
3
67
|
export declare function scrubKnownSecrets(text: string): string;
|
package/dist/redaction.js
CHANGED
|
@@ -18,9 +18,126 @@ import { REDACTED_VALUE } from './constants.js';
|
|
|
18
18
|
// unredacted), NOT any key that merely contains the substring — `scopecookie`, `cookieConsent`,
|
|
19
19
|
// `cookiePolicy` are legitimate app values an agent may need to read, and stay visible.
|
|
20
20
|
const SENSITIVE_KEY = /password|passwd|passcode|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|cvv|cvc|ssn|(?:^|[-_])(?:signature|sig)$|(?:^|[-_])credential$|x-(?:amz|goog)-(?:signature|credential|security-token)$/i;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The built-in rule, always available and never configurable.
|
|
23
|
+
*
|
|
24
|
+
* Separate from `isSensitiveKey` on purpose: the driven path needs a floor that no page-supplied
|
|
25
|
+
* config can lower, and the conformance test needs something to compare an unconfigured policy
|
|
26
|
+
* against. Every existing caller wants `isSensitiveKey`.
|
|
27
|
+
*/
|
|
28
|
+
export function defaultIsSensitiveKey(key) {
|
|
22
29
|
return SENSITIVE_KEY.test(key);
|
|
23
30
|
}
|
|
31
|
+
function normalizeNames(values) {
|
|
32
|
+
const out = new Set();
|
|
33
|
+
for (const value of values ?? []) {
|
|
34
|
+
const trimmed = value.trim().toLowerCase();
|
|
35
|
+
if (trimmed.length > 0)
|
|
36
|
+
out.add(trimmed);
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Resolve a config into a rule.
|
|
42
|
+
*
|
|
43
|
+
* `onWarn` fires ONCE here, at build time, rather than per key: the check runs on every serialized
|
|
44
|
+
* key of every event, so a per-key warning would flood the console of the app it is trying to help.
|
|
45
|
+
*/
|
|
46
|
+
export function buildRedactionPolicy(config, onWarn) {
|
|
47
|
+
const literalKeys = normalizeNames(config?.keys?.filter((k) => 'string' === typeof k));
|
|
48
|
+
const patterns = (config?.keys ?? []).filter((k) => k instanceof RegExp);
|
|
49
|
+
const allowed = normalizeNames(config?.allow);
|
|
50
|
+
// Exempting a key the default rule calls a credential is a deliberate choice with a real blast
|
|
51
|
+
// radius: that value now reaches the agent transcript and the on-disk journal. Say it once, name
|
|
52
|
+
// the keys, and say nothing about the ordinary case — an exemption for a key the rule never
|
|
53
|
+
// matched is the false-positive fix this option exists for, and warning about it would train
|
|
54
|
+
// people to ignore the warning that matters.
|
|
55
|
+
const exemptedCredentials = [...allowed].filter((key) => defaultIsSensitiveKey(key) && !literalKeys.has(key));
|
|
56
|
+
if (exemptedCredentials.length > 0 && onWarn !== undefined) {
|
|
57
|
+
onWarn(`[reticle] redact.allow is exempting ${exemptedCredentials.join(', ')} from redaction. The ` +
|
|
58
|
+
`default rule treats ${1 === exemptedCredentials.length ? 'that key' : 'those keys'} as a ` +
|
|
59
|
+
`credential, so ${1 === exemptedCredentials.length ? 'its value' : 'their values'} will now ` +
|
|
60
|
+
`reach the agent transcript and the on-disk journal in cleartext.`);
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
isSensitiveKey: (key) => {
|
|
64
|
+
const normalized = key.toLowerCase();
|
|
65
|
+
if (literalKeys.has(normalized))
|
|
66
|
+
return true;
|
|
67
|
+
for (const pattern of patterns) {
|
|
68
|
+
// `test` on a /g regex advances lastIndex between calls, so the same key alternates
|
|
69
|
+
// true/false. Reset it rather than trusting every caller to omit the flag.
|
|
70
|
+
pattern.lastIndex = 0;
|
|
71
|
+
if (pattern.test(key))
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (allowed.has(normalized))
|
|
75
|
+
return false;
|
|
76
|
+
return defaultIsSensitiveKey(key);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The rule in force for THIS process.
|
|
82
|
+
*
|
|
83
|
+
* Ambient rather than threaded through the ~10 call sites that redact, so configuring it changes
|
|
84
|
+
* every one of them at once and adding a new one cannot accidentally opt out. Set by `connect()` in
|
|
85
|
+
* the browser, where one page means one config.
|
|
86
|
+
*
|
|
87
|
+
* The server deliberately does NOT set this. A daemon serves many sessions in one process, so an
|
|
88
|
+
* ambient policy there would let one app's config decide another app's redaction; the driven path
|
|
89
|
+
* holds its own policy per daemon instead, built only from what sessions declared as EXTRA keys.
|
|
90
|
+
*/
|
|
91
|
+
let activePolicy;
|
|
92
|
+
export function setActiveRedactionPolicy(policy) {
|
|
93
|
+
activePolicy = policy;
|
|
94
|
+
}
|
|
95
|
+
export function resetActiveRedactionPolicy() {
|
|
96
|
+
activePolicy = undefined;
|
|
97
|
+
}
|
|
98
|
+
/** Whether a key carries a credential, under the policy in force. */
|
|
99
|
+
export function isSensitiveKey(key) {
|
|
100
|
+
return activePolicy === undefined ? defaultIsSensitiveKey(key) : activePolicy.isSensitiveKey(key);
|
|
101
|
+
}
|
|
102
|
+
/** Cap on how many declared keys travel in a hello — a bound, not a limit anyone should reach. */
|
|
103
|
+
export const MAX_WIRE_REDACT_KEYS = 64;
|
|
104
|
+
/** Cap on one declared key's length, so a hello cannot be inflated by a pathological name. */
|
|
105
|
+
export const MAX_WIRE_REDACT_KEY_LENGTH = 128;
|
|
106
|
+
/**
|
|
107
|
+
* The part of a config that may cross the bridge, so the server redacts an app's own credentials on
|
|
108
|
+
* the driven path too — where request bodies are captured raw from the network stack and never pass
|
|
109
|
+
* through the SDK at all.
|
|
110
|
+
*
|
|
111
|
+
* Two deliberate exclusions, and both are the safe direction of the asymmetry:
|
|
112
|
+
*
|
|
113
|
+
* - **RegExp entries do not travel.** Compiling a pattern that arrived over a socket and running it
|
|
114
|
+
* against every key of every request body is a ReDoS surface handed to whatever is on the page.
|
|
115
|
+
* A dropped pattern means the driven path over-redacts relative to the config, never under.
|
|
116
|
+
* - **`allow` never travels.** It is the only part of the config that REMOVES redaction, so a page
|
|
117
|
+
* able to send it could quietly un-redact `password` in the daemon's journal for every session.
|
|
118
|
+
* The driven path keeps the default floor.
|
|
119
|
+
*
|
|
120
|
+
* Both limitations are documented for users in docs/usage.md ("Extending the redaction rules").
|
|
121
|
+
*/
|
|
122
|
+
export function wireRedactionKeys(config) {
|
|
123
|
+
const seen = new Set();
|
|
124
|
+
const out = [];
|
|
125
|
+
for (const key of config?.keys ?? []) {
|
|
126
|
+
if (typeof key !== 'string')
|
|
127
|
+
continue;
|
|
128
|
+
const trimmed = key.trim();
|
|
129
|
+
if (0 === trimmed.length || trimmed.length > MAX_WIRE_REDACT_KEY_LENGTH)
|
|
130
|
+
continue;
|
|
131
|
+
const normalized = trimmed.toLowerCase();
|
|
132
|
+
if (seen.has(normalized))
|
|
133
|
+
continue;
|
|
134
|
+
seen.add(normalized);
|
|
135
|
+
out.push(trimmed);
|
|
136
|
+
if (out.length >= MAX_WIRE_REDACT_KEYS)
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
24
141
|
// High-confidence credential SHAPES, redacted regardless of key name — for scanning body/value text where
|
|
25
142
|
// a secret can sit under a benign key (`{"note":"<jwt>"}`, `<meta content="sk_live_…">`). Deliberately
|
|
26
143
|
// narrow (JWT, known provider prefixes) so it never corrupts legitimate prose the way a broad
|
|
@@ -42,6 +42,23 @@
|
|
|
42
42
|
},
|
|
43
43
|
"hasCapabilities": {
|
|
44
44
|
"type": "boolean"
|
|
45
|
+
},
|
|
46
|
+
"sdkVersion": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"maxLength": 128
|
|
49
|
+
},
|
|
50
|
+
"contract": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"maxLength": 128
|
|
53
|
+
},
|
|
54
|
+
"redactKeys": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 128
|
|
60
|
+
},
|
|
61
|
+
"maxItems": 64
|
|
45
62
|
}
|
|
46
63
|
},
|
|
47
64
|
"required": [
|
|
@@ -44,6 +44,23 @@
|
|
|
44
44
|
},
|
|
45
45
|
"hasCapabilities": {
|
|
46
46
|
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"sdkVersion": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"maxLength": 128
|
|
51
|
+
},
|
|
52
|
+
"contract": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"maxLength": 128
|
|
55
|
+
},
|
|
56
|
+
"redactKeys": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1,
|
|
61
|
+
"maxLength": 128
|
|
62
|
+
},
|
|
63
|
+
"maxItems": 64
|
|
47
64
|
}
|
|
48
65
|
},
|
|
49
66
|
"required": [
|
package/dist/security.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
const DANGEROUS_ACTION = /\b(delete|remove|destroy|erase|drop|terminate|revoke|reset|logout|log out|sign out|close account|cancel subscription|purchase|buy|pay|place order|confirm order|deploy|publish|send|transfer|withdraw|refund)\b/i;
|
|
2
|
+
/** The hostnames that ARE loopback outright, with no parsing: the name, and IPv6 ::1 both ways. */
|
|
3
|
+
const LOOPBACK_HOSTNAMES = ['localhost', '::1', '0:0:0:0:0:0:0:1'];
|
|
4
|
+
/** IPv4 loopback is the whole 127.0.0.0/8 block, so the first octet is the entire test. */
|
|
5
|
+
const IPV4_LOOPBACK_FIRST_OCTET = '127';
|
|
6
|
+
const IPV4_OCTET_COUNT = 4;
|
|
7
|
+
const IPV4_OCTET_MAX = 255;
|
|
2
8
|
/** True only for literal loopback hosts, never lookalike DNS names such as 127.example.com. */
|
|
3
9
|
export function isLoopbackHostname(hostname) {
|
|
4
10
|
const normalized = hostname.toLowerCase().replace(/^\[|\]$/g, '');
|
|
5
|
-
if (normalized
|
|
11
|
+
if (LOOPBACK_HOSTNAMES.includes(normalized))
|
|
6
12
|
return true;
|
|
7
|
-
}
|
|
8
13
|
const octets = normalized.split('.');
|
|
9
|
-
return (octets.length
|
|
10
|
-
octets[0]
|
|
14
|
+
return (IPV4_OCTET_COUNT === octets.length &&
|
|
15
|
+
IPV4_LOOPBACK_FIRST_OCTET === octets[0] &&
|
|
11
16
|
octets.every((octet) => {
|
|
12
17
|
if (!/^\d{1,3}$/.test(octet))
|
|
13
18
|
return false;
|
|
14
19
|
const value = Number(octet);
|
|
15
|
-
return value >= 0 && value <=
|
|
20
|
+
return value >= 0 && value <= IPV4_OCTET_MAX;
|
|
16
21
|
}));
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source mapping: how a DOM node is traced back to the line of code that rendered it.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `constants.ts` — these two are read by the build plugins, the browser SDK and the
|
|
5
|
+
* React adapter together, and they change for one reason (the source-pointer feature) rather than
|
|
6
|
+
* for the dozen reasons the wire contract does.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The attribute the build plugin stamps on JSX host elements as `file:line:column`, so the browser SDK
|
|
10
|
+
* and the React adapter can map a DOM node back to its source file (the source-pointer feature, needed
|
|
11
|
+
* on React 19 which dropped _debugSource). Read here by both packages — it was duplicated as a local
|
|
12
|
+
* const in dom/source.ts AND dom/query.ts and inlined as a literal in the React adapter. The stamper
|
|
13
|
+
* (@reticlehq/babel-plugin, separate build tooling) stamps this same literal and MUST match it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DATA_RETICLE_SOURCE_ATTR = "data-reticle-source";
|
|
16
|
+
/**
|
|
17
|
+
* Compile-time global carrying the project root, so the SDK can report source paths RELATIVE to the
|
|
18
|
+
* repo.
|
|
19
|
+
*
|
|
20
|
+
* React's `_debugSource.fileName` is ABSOLUTE (`/Users/you/app/src/Counter.tsx`), while the babel
|
|
21
|
+
* stamp is repo-relative (`src/Counter.tsx`). Both reach the agent as `source`, so the same product
|
|
22
|
+
* emitted two different path shapes depending on which React version an app happened to be on —
|
|
23
|
+
* and an absolute path from someone else's machine is noise in a report, not a pointer. Defined by
|
|
24
|
+
* the build plugins, which are the only place that knows the root.
|
|
25
|
+
*/
|
|
26
|
+
export declare const RETICLE_ROOT_GLOBAL = "__RETICLE_ROOT__";
|
|
27
|
+
/**
|
|
28
|
+
* Compile-time global carrying the SDK's own package version, so a version-skewed pair can name
|
|
29
|
+
* itself. Defined by the build plugins, which are the only place that can read the installed
|
|
30
|
+
* package's version. See `sdkVersion` on the HELLO message.
|
|
31
|
+
*/
|
|
32
|
+
export declare const RETICLE_SDK_VERSION_GLOBAL = "__RETICLE_SDK_VERSION__";
|