@reticlehq/core 2.10.0 → 2.12.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/constants.d.ts +22 -0
- package/dist/constants.js +23 -1
- package/dist/document-identity.d.ts +39 -0
- package/dist/document-identity.js +53 -0
- package/dist/edit-epoch.d.ts +36 -0
- package/dist/edit-epoch.js +40 -0
- package/dist/event-payloads.d.ts +18 -4
- package/dist/event-payloads.js +11 -1
- package/dist/findings.d.ts +62 -0
- package/dist/findings.js +75 -0
- package/dist/flow-types.d.ts +70 -0
- package/dist/flow-types.js +22 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/instrumentation-gap.d.ts +141 -0
- package/dist/instrumentation-gap.js +164 -0
- package/dist/intent.d.ts +332 -0
- package/dist/intent.js +133 -0
- package/dist/journal.d.ts +33 -0
- package/dist/journal.js +20 -0
- package/dist/messages.d.ts +84 -10
- package/dist/messages.js +20 -0
- package/dist/notices.d.ts +5 -3
- package/dist/notices.js +5 -3
- package/dist/project-registry.d.ts +86 -0
- package/dist/project-registry.js +66 -0
- package/dist/run-context.d.ts +122 -0
- package/dist/run-context.js +118 -0
- package/dist/schema/event-message.json +10 -0
- package/dist/schema/event-type.json +1 -0
- package/dist/schema/reticle-event.json +10 -0
- package/dist/schema/reticle-message.json +10 -0
- package/dist/security.js +17 -1
- package/dist/source-constants.cjs +9 -0
- package/dist/source-constants.d.cts +4 -0
- package/dist/telemetry-session.d.ts +2 -2
- package/dist/telemetry.d.ts +6 -98
- package/dist/telemetry.js +0 -41
- package/dist/types.d.ts +70 -0
- package/dist/types.js +14 -0
- package/dist/unreachable-notice.d.ts +19 -0
- package/dist/unreachable-notice.js +26 -0
- package/package.json +6 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one phrase in the page's unreachable warning that the daemon parses.
|
|
3
|
+
*
|
|
4
|
+
* A page whose websocket never opened logs its own diagnosis, and the daemon that leased that page
|
|
5
|
+
* reads the address back out of it — the only way either side can name a port mismatch, since the
|
|
6
|
+
* page cannot see the daemon and the daemon never saw the dial.
|
|
7
|
+
*
|
|
8
|
+
* That makes the message a WIRE FORMAT between two packages that must not import each other:
|
|
9
|
+
* `@reticlehq/browser` writes it into a console line, `@reticlehq/server` matches it. Nothing else
|
|
10
|
+
* connects them, so a reworded sentence would break the match with no type error, no failing test in
|
|
11
|
+
* either package, and no symptom except the lease hint quietly going back to guessing.
|
|
12
|
+
*
|
|
13
|
+
* So the prefix lives here, at the bottom of the graph, where a shared contract belongs. Both sides
|
|
14
|
+
* are pinned to it by test.
|
|
15
|
+
*/
|
|
16
|
+
/** Prefix of the page's unreachable warning. The address follows, then a period. */
|
|
17
|
+
export declare const UNREACHABLE_NOTICE_PREFIX = "[Reticle] this page could not open a websocket to ";
|
|
18
|
+
/** Matches the notice and captures the address the page tried. */
|
|
19
|
+
export declare function unreachableUrlIn(text: string): string | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one phrase in the page's unreachable warning that the daemon parses.
|
|
3
|
+
*
|
|
4
|
+
* A page whose websocket never opened logs its own diagnosis, and the daemon that leased that page
|
|
5
|
+
* reads the address back out of it — the only way either side can name a port mismatch, since the
|
|
6
|
+
* page cannot see the daemon and the daemon never saw the dial.
|
|
7
|
+
*
|
|
8
|
+
* That makes the message a WIRE FORMAT between two packages that must not import each other:
|
|
9
|
+
* `@reticlehq/browser` writes it into a console line, `@reticlehq/server` matches it. Nothing else
|
|
10
|
+
* connects them, so a reworded sentence would break the match with no type error, no failing test in
|
|
11
|
+
* either package, and no symptom except the lease hint quietly going back to guessing.
|
|
12
|
+
*
|
|
13
|
+
* So the prefix lives here, at the bottom of the graph, where a shared contract belongs. Both sides
|
|
14
|
+
* are pinned to it by test.
|
|
15
|
+
*/
|
|
16
|
+
/** Prefix of the page's unreachable warning. The address follows, then a period. */
|
|
17
|
+
export const UNREACHABLE_NOTICE_PREFIX = '[Reticle] this page could not open a websocket to ';
|
|
18
|
+
/** Matches the notice and captures the address the page tried. */
|
|
19
|
+
export function unreachableUrlIn(text) {
|
|
20
|
+
if (!text.startsWith(UNREACHABLE_NOTICE_PREFIX))
|
|
21
|
+
return undefined;
|
|
22
|
+
const rest = text.slice(UNREACHABLE_NOTICE_PREFIX.length);
|
|
23
|
+
const end = rest.indexOf('. ');
|
|
24
|
+
const url = 0 > end ? rest : rest.slice(0, end);
|
|
25
|
+
return 0 === url.length ? undefined : url;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reticlehq/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "The Reticle foundation: the shared wire contract — types, zod schemas, constants, messages, and the isomorphic kernel that every Reticle package (browser SDK, server, kits, test harness) imports. Depends only on zod.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"types": "./dist/desktop-contract.d.cts",
|
|
16
16
|
"default": "./dist/desktop-contract.cjs"
|
|
17
17
|
},
|
|
18
|
+
"./source-constants": {
|
|
19
|
+
"types": "./dist/source-constants.d.cts",
|
|
20
|
+
"default": "./dist/source-constants.cjs"
|
|
21
|
+
},
|
|
18
22
|
"./package.json": "./package.json"
|
|
19
23
|
},
|
|
20
24
|
"dependencies": {
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
"node": ">=20.0.0"
|
|
53
57
|
},
|
|
54
58
|
"scripts": {
|
|
55
|
-
"build": "tsc -b && node scripts/gen-schema.mjs && node scripts/gen-desktop-contract.mjs",
|
|
59
|
+
"build": "tsc -b && node scripts/gen-schema.mjs && node scripts/gen-desktop-contract.mjs && node scripts/gen-source-constants.mjs",
|
|
56
60
|
"typecheck": "tsc -b",
|
|
57
61
|
"lint": "eslint src",
|
|
58
62
|
"test:unit": "vitest run src --passWithNoTests",
|