@reticlehq/core 3.2.0 → 3.4.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/README.md +1 -1
- package/dist/artifacts/flow-composition.d.ts +3 -2
- package/dist/artifacts/flow-constants.d.ts +68 -2
- package/dist/artifacts/flow-constants.js +84 -2
- package/dist/artifacts/flow-expect-flat.d.ts +260 -0
- package/dist/artifacts/flow-expect-flat.js +284 -0
- package/dist/artifacts/flow-mutation-target.d.ts +0 -1
- package/dist/artifacts/flow-mutation-target.js +30 -2
- package/dist/artifacts/flow-step-tool.d.ts +2 -0
- package/dist/artifacts/flow-types.d.ts +1285 -1343
- package/dist/artifacts/flow-types.js +111 -140
- package/dist/artifacts/impact.d.ts +48 -20
- package/dist/artifacts/impact.js +11 -0
- package/dist/artifacts/journal.d.ts +34 -6
- package/dist/artifacts/journal.js +13 -0
- package/dist/hooks/hook-events.d.ts +18 -18
- package/dist/hud-entry.d.ts +9 -0
- package/dist/hud-entry.js +9 -0
- package/dist/identity/source-constants.d.ts +11 -0
- package/dist/identity/source-constants.js +11 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +25 -1
- package/dist/onboarding.d.ts +2 -2
- package/dist/realm/registry.d.ts +0 -8
- package/dist/realm/registry.js +1 -11
- package/dist/registry/daemon-registry.d.ts +14 -4
- package/dist/registry/daemon-registry.js +20 -4
- package/dist/schema/event-message.json +3 -1
- package/dist/schema/event-payloads.json +72 -0
- package/dist/schema/event-type.json +3 -1
- package/dist/schema/reticle-event.json +3 -1
- package/dist/schema/reticle-message.json +3 -1
- package/dist/source-constants.cjs +1 -0
- package/dist/source-constants.d.cts +1 -0
- package/dist/telemetry-feedback.d.ts +6 -6
- package/dist/telemetry-refusal.d.ts +5 -4
- package/dist/telemetry-session.d.ts +25 -2
- package/dist/telemetry-session.js +13 -0
- package/dist/telemetry.d.ts +130 -102
- package/dist/verdict/compare-source.d.ts +80 -0
- package/dist/verdict/compare-source.js +93 -0
- package/dist/verdict/consequence.d.ts +12 -0
- package/dist/verdict/consequence.js +15 -0
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +24 -0
- package/dist/verdict/intent.js +66 -10
- package/dist/verdict/predicate-tree.d.ts +82 -0
- package/dist/verdict/predicate-tree.js +186 -0
- package/dist/verdict/predicate.d.ts +138 -0
- package/dist/verdict/predicate.js +430 -0
- package/dist/verdict/property-assertion.d.ts +191 -0
- package/dist/verdict/property-assertion.js +42 -0
- package/dist/verdict/security.js +16 -4
- package/dist/verdict/verdict-attribution.d.ts +52 -0
- package/dist/verdict/verdict-attribution.js +87 -0
- package/dist/verdict/verification-run.d.ts +330 -83
- package/dist/verdict/verification-run.js +44 -1
- package/dist/verdict/verified-constants.d.ts +9 -0
- package/dist/verdict/verified-constants.js +9 -0
- package/dist/wire/channel.d.ts +10 -0
- package/dist/wire/channel.js +25 -0
- package/dist/wire/constants/constants.d.ts +65 -102
- package/dist/wire/constants/constants.js +79 -101
- package/dist/wire/constants/discovery.d.ts +25 -0
- package/dist/wire/constants/discovery.js +25 -0
- package/dist/wire/constants/event-types.d.ts +122 -0
- package/dist/wire/constants/event-types.js +121 -0
- package/dist/wire/constants/hud-controls.d.ts +19 -0
- package/dist/wire/constants/hud-controls.js +95 -0
- package/dist/wire/constants/hud-use.d.ts +27 -0
- package/dist/wire/constants/hud-use.js +24 -0
- package/dist/wire/constants/session-constants.d.ts +10 -0
- package/dist/wire/constants/session-constants.js +10 -0
- package/dist/wire/event-payloads.d.ts +72 -13
- package/dist/wire/event-payloads.js +26 -4
- package/dist/wire/messages.d.ts +97 -56
- package/dist/wire/messages.js +17 -0
- package/dist/wire/net.d.ts +35 -0
- package/dist/wire/net.js +41 -0
- package/dist/wire/redaction.js +17 -0
- package/dist/wire/state-select.d.ts +2 -1
- package/dist/wire/state-select.js +56 -3
- package/dist/wire/toon.d.ts +1 -1
- package/dist/wire/toon.js +30 -8
- package/dist/wire/types.d.ts +119 -94
- package/dist/wire/types.js +23 -1
- package/dist/words/no-session-reason.d.ts +7 -0
- package/dist/words/no-session-reason.js +7 -0
- package/dist/words/notices.d.ts +7 -0
- package/dist/words/notices.js +9 -2
- package/package.json +7 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TRANSPORT_LIMITS, TruncationChannel } from '../wire/constants/constants.js';
|
|
3
3
|
import { Verified } from '../verdict/verified-constants.js';
|
|
4
|
+
import { PredicateKind } from '../verdict/consequence.js';
|
|
4
5
|
/**
|
|
5
6
|
* The durable causal journal. Each session gets an append-only pair on disk:
|
|
6
7
|
* `.reticle/sessions/<id>/events.jsonl` (one `ReticleEvent` per line — already seq/actionId-stamped
|
|
@@ -91,6 +92,18 @@ export const JournalVerdictEffectSchema = z.object({
|
|
|
91
92
|
verified: z.nativeEnum(Verified),
|
|
92
93
|
/** `file:line` for the element driven, when the page told us one. */
|
|
93
94
|
source: z.string().max(TRANSPORT_LIMITS.MAX_URL_LENGTH).optional(),
|
|
95
|
+
/**
|
|
96
|
+
* Which source of truth answering the claim required -- the predicate's own kind.
|
|
97
|
+
*
|
|
98
|
+
* A run folded from this journal has to say what a check READ, and with no field here it had
|
|
99
|
+
* nothing to say it from: every check ever folded was stamped `element`, including the ones whose
|
|
100
|
+
* own `grade` in the same object said `net`. Channel routing reads this, so a network verdict
|
|
101
|
+
* arrived as a UI verdict.
|
|
102
|
+
*
|
|
103
|
+
* Optional, because a record written before this field existed has no kind and must not be read
|
|
104
|
+
* as though it had one.
|
|
105
|
+
*/
|
|
106
|
+
kind: z.nativeEnum(PredicateKind).optional(),
|
|
94
107
|
/**
|
|
95
108
|
* Was the claim written down BEFORE the action, or after it?
|
|
96
109
|
*
|
|
@@ -70,8 +70,8 @@ export declare const VerdictHookPayloadSchema: z.ZodObject<{
|
|
|
70
70
|
at: string;
|
|
71
71
|
tool: string;
|
|
72
72
|
verified: string;
|
|
73
|
-
projectId?: string | undefined;
|
|
74
73
|
url?: string | undefined;
|
|
74
|
+
projectId?: string | undefined;
|
|
75
75
|
sessionId?: string | undefined;
|
|
76
76
|
because?: string | undefined;
|
|
77
77
|
}, {
|
|
@@ -79,8 +79,8 @@ export declare const VerdictHookPayloadSchema: z.ZodObject<{
|
|
|
79
79
|
at: string;
|
|
80
80
|
tool: string;
|
|
81
81
|
verified: string;
|
|
82
|
-
projectId?: string | undefined;
|
|
83
82
|
url?: string | undefined;
|
|
83
|
+
projectId?: string | undefined;
|
|
84
84
|
sessionId?: string | undefined;
|
|
85
85
|
because?: string | undefined;
|
|
86
86
|
}>;
|
|
@@ -98,8 +98,8 @@ export declare const BugFoundHookPayloadSchema: z.ZodObject<{
|
|
|
98
98
|
tool: z.ZodString;
|
|
99
99
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
|
-
event: "bug_found";
|
|
102
101
|
kind: string;
|
|
102
|
+
event: "bug_found";
|
|
103
103
|
at: string;
|
|
104
104
|
tool: string;
|
|
105
105
|
repeat: boolean;
|
|
@@ -109,8 +109,8 @@ export declare const BugFoundHookPayloadSchema: z.ZodObject<{
|
|
|
109
109
|
sessionId?: string | undefined;
|
|
110
110
|
fingerprint?: string | undefined;
|
|
111
111
|
}, {
|
|
112
|
-
event: "bug_found";
|
|
113
112
|
kind: string;
|
|
113
|
+
event: "bug_found";
|
|
114
114
|
at: string;
|
|
115
115
|
tool: string;
|
|
116
116
|
repeat: boolean;
|
|
@@ -133,15 +133,15 @@ export declare const SessionHookPayloadSchema: z.ZodObject<{
|
|
|
133
133
|
event: "session_started" | "session_ended";
|
|
134
134
|
at: string;
|
|
135
135
|
sessionId: string;
|
|
136
|
-
projectId?: string | undefined;
|
|
137
136
|
url?: string | undefined;
|
|
137
|
+
projectId?: string | undefined;
|
|
138
138
|
runtime?: string | undefined;
|
|
139
139
|
}, {
|
|
140
140
|
event: "session_started" | "session_ended";
|
|
141
141
|
at: string;
|
|
142
142
|
sessionId: string;
|
|
143
|
-
projectId?: string | undefined;
|
|
144
143
|
url?: string | undefined;
|
|
144
|
+
projectId?: string | undefined;
|
|
145
145
|
runtime?: string | undefined;
|
|
146
146
|
}>;
|
|
147
147
|
export type SessionHookPayload = z.infer<typeof SessionHookPayloadSchema>;
|
|
@@ -154,15 +154,15 @@ export declare const SyncHookPayloadSchema: z.ZodObject<{
|
|
|
154
154
|
ok: z.ZodBoolean;
|
|
155
155
|
error: z.ZodOptional<z.ZodString>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
event: "sync_completed";
|
|
158
157
|
ok: boolean;
|
|
158
|
+
event: "sync_completed";
|
|
159
159
|
at: string;
|
|
160
160
|
runsPushed: number;
|
|
161
161
|
error?: string | undefined;
|
|
162
162
|
projectId?: string | undefined;
|
|
163
163
|
}, {
|
|
164
|
-
event: "sync_completed";
|
|
165
164
|
ok: boolean;
|
|
165
|
+
event: "sync_completed";
|
|
166
166
|
at: string;
|
|
167
167
|
runsPushed: number;
|
|
168
168
|
error?: string | undefined;
|
|
@@ -185,8 +185,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
185
185
|
at: string;
|
|
186
186
|
tool: string;
|
|
187
187
|
verified: string;
|
|
188
|
-
projectId?: string | undefined;
|
|
189
188
|
url?: string | undefined;
|
|
189
|
+
projectId?: string | undefined;
|
|
190
190
|
sessionId?: string | undefined;
|
|
191
191
|
because?: string | undefined;
|
|
192
192
|
}, {
|
|
@@ -194,8 +194,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
194
194
|
at: string;
|
|
195
195
|
tool: string;
|
|
196
196
|
verified: string;
|
|
197
|
-
projectId?: string | undefined;
|
|
198
197
|
url?: string | undefined;
|
|
198
|
+
projectId?: string | undefined;
|
|
199
199
|
sessionId?: string | undefined;
|
|
200
200
|
because?: string | undefined;
|
|
201
201
|
}>, z.ZodObject<{
|
|
@@ -211,8 +211,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
211
211
|
tool: z.ZodString;
|
|
212
212
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
|
-
event: "bug_found";
|
|
215
214
|
kind: string;
|
|
215
|
+
event: "bug_found";
|
|
216
216
|
at: string;
|
|
217
217
|
tool: string;
|
|
218
218
|
repeat: boolean;
|
|
@@ -222,8 +222,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
222
222
|
sessionId?: string | undefined;
|
|
223
223
|
fingerprint?: string | undefined;
|
|
224
224
|
}, {
|
|
225
|
-
event: "bug_found";
|
|
226
225
|
kind: string;
|
|
226
|
+
event: "bug_found";
|
|
227
227
|
at: string;
|
|
228
228
|
tool: string;
|
|
229
229
|
repeat: boolean;
|
|
@@ -244,15 +244,15 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
244
244
|
event: "session_started";
|
|
245
245
|
at: string;
|
|
246
246
|
sessionId: string;
|
|
247
|
-
projectId?: string | undefined;
|
|
248
247
|
url?: string | undefined;
|
|
248
|
+
projectId?: string | undefined;
|
|
249
249
|
runtime?: string | undefined;
|
|
250
250
|
}, {
|
|
251
251
|
event: "session_started";
|
|
252
252
|
at: string;
|
|
253
253
|
sessionId: string;
|
|
254
|
-
projectId?: string | undefined;
|
|
255
254
|
url?: string | undefined;
|
|
255
|
+
projectId?: string | undefined;
|
|
256
256
|
runtime?: string | undefined;
|
|
257
257
|
}>, z.ZodObject<{
|
|
258
258
|
at: z.ZodString;
|
|
@@ -266,15 +266,15 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
266
266
|
event: "session_ended";
|
|
267
267
|
at: string;
|
|
268
268
|
sessionId: string;
|
|
269
|
-
projectId?: string | undefined;
|
|
270
269
|
url?: string | undefined;
|
|
270
|
+
projectId?: string | undefined;
|
|
271
271
|
runtime?: string | undefined;
|
|
272
272
|
}, {
|
|
273
273
|
event: "session_ended";
|
|
274
274
|
at: string;
|
|
275
275
|
sessionId: string;
|
|
276
|
-
projectId?: string | undefined;
|
|
277
276
|
url?: string | undefined;
|
|
277
|
+
projectId?: string | undefined;
|
|
278
278
|
runtime?: string | undefined;
|
|
279
279
|
}>, z.ZodObject<{
|
|
280
280
|
at: z.ZodString;
|
|
@@ -285,15 +285,15 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
|
|
|
285
285
|
ok: z.ZodBoolean;
|
|
286
286
|
error: z.ZodOptional<z.ZodString>;
|
|
287
287
|
}, "strip", z.ZodTypeAny, {
|
|
288
|
-
event: "sync_completed";
|
|
289
288
|
ok: boolean;
|
|
289
|
+
event: "sync_completed";
|
|
290
290
|
at: string;
|
|
291
291
|
runsPushed: number;
|
|
292
292
|
error?: string | undefined;
|
|
293
293
|
projectId?: string | undefined;
|
|
294
294
|
}, {
|
|
295
|
-
event: "sync_completed";
|
|
296
295
|
ok: boolean;
|
|
296
|
+
event: "sync_completed";
|
|
297
297
|
at: string;
|
|
298
298
|
runsPushed: number;
|
|
299
299
|
error?: string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@reticlehq/core/hud` — the HUD's control names, for the panel that renders them and the daemon
|
|
3
|
+
* that counts them.
|
|
4
|
+
*
|
|
5
|
+
* A subpath for the reason `./tour` is one: the SDK loads core's root entry on every page, and the
|
|
6
|
+
* control list re-exported from there landed in a chunk every page downloads, though only the lazily
|
|
7
|
+
* loaded panel ever reads it. `first-load-size` measured it.
|
|
8
|
+
*/
|
|
9
|
+
export * from './wire/constants/hud-controls.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@reticlehq/core/hud` — the HUD's control names, for the panel that renders them and the daemon
|
|
3
|
+
* that counts them.
|
|
4
|
+
*
|
|
5
|
+
* A subpath for the reason `./tour` is one: the SDK loads core's root entry on every page, and the
|
|
6
|
+
* control list re-exported from there landed in a chunk every page downloads, though only the lazily
|
|
7
|
+
* loaded panel ever reads it. `first-load-size` measured it.
|
|
8
|
+
*/
|
|
9
|
+
export * from './wire/constants/hud-controls.js';
|
|
@@ -30,3 +30,14 @@ export declare const RETICLE_ROOT_GLOBAL = "__RETICLE_ROOT__";
|
|
|
30
30
|
* package's version. See `sdkVersion` on the HELLO message.
|
|
31
31
|
*/
|
|
32
32
|
export declare const RETICLE_SDK_VERSION_GLOBAL = "__RETICLE_SDK_VERSION__";
|
|
33
|
+
/**
|
|
34
|
+
* The per-file opt-out for source stamping: a file whose FIRST non-empty line is a comment carrying
|
|
35
|
+
* this marker — the `//` line form, the block-comment form, or `<!-- @reticle-ignore -->` for a
|
|
36
|
+
* Svelte component — is not stamped at all.
|
|
37
|
+
*
|
|
38
|
+
* Whole file, first line, on purpose. The reasons to opt out are file-shaped ("this component is
|
|
39
|
+
* generated", "stamping this one breaks a snapshot test"), and a marker that worked from line 40
|
|
40
|
+
* would be a marker nobody can find. The string lives here so the Babel plugin, the Vite plugin and
|
|
41
|
+
* the docs cannot drift on it; the stampers own the line check (#853).
|
|
42
|
+
*/
|
|
43
|
+
export declare const RETICLE_IGNORE_MARKER = "@reticle-ignore";
|
|
@@ -30,3 +30,14 @@ export const RETICLE_ROOT_GLOBAL = '__RETICLE_ROOT__';
|
|
|
30
30
|
* package's version. See `sdkVersion` on the HELLO message.
|
|
31
31
|
*/
|
|
32
32
|
export const RETICLE_SDK_VERSION_GLOBAL = '__RETICLE_SDK_VERSION__';
|
|
33
|
+
/**
|
|
34
|
+
* The per-file opt-out for source stamping: a file whose FIRST non-empty line is a comment carrying
|
|
35
|
+
* this marker — the `//` line form, the block-comment form, or `<!-- @reticle-ignore -->` for a
|
|
36
|
+
* Svelte component — is not stamped at all.
|
|
37
|
+
*
|
|
38
|
+
* Whole file, first line, on purpose. The reasons to opt out are file-shaped ("this component is
|
|
39
|
+
* generated", "stamping this one breaks a snapshot test"), and a marker that worked from line 40
|
|
40
|
+
* would be a marker nobody can find. The string lives here so the Babel plugin, the Vite plugin and
|
|
41
|
+
* the docs cannot drift on it; the stampers own the line check (#853).
|
|
42
|
+
*/
|
|
43
|
+
export const RETICLE_IGNORE_MARKER = '@reticle-ignore';
|
package/dist/index.d.ts
CHANGED
|
@@ -28,14 +28,18 @@ export * from './identity/source-constants.js';
|
|
|
28
28
|
export * from './wire/event-classification.js';
|
|
29
29
|
export * from './wire/global-press.js';
|
|
30
30
|
export * from './verdict/verified-constants.js';
|
|
31
|
+
export * from './verdict/verdict-attribution.js';
|
|
31
32
|
export * from './verdict/verify-progress.js';
|
|
32
33
|
export * from './wire/constants/session-constants.js';
|
|
34
|
+
export * from './wire/constants/hud-use.js';
|
|
35
|
+
export * from './wire/constants/discovery.js';
|
|
33
36
|
export * from './identity/document-identity.js';
|
|
34
37
|
export * from './identity/edit-epoch.js';
|
|
35
38
|
export * from './wire/messages.js';
|
|
36
39
|
export * from './wire/event-payloads.js';
|
|
37
40
|
export * from './wire/event-priority.js';
|
|
38
41
|
export * from './artifacts/flow-constants.js';
|
|
42
|
+
export * from './artifacts/flow-step-tool.js';
|
|
39
43
|
export * from './artifacts/flow-types.js';
|
|
40
44
|
export * from './artifacts/step-effect.js';
|
|
41
45
|
export * from './artifacts/flow-composition.js';
|
|
@@ -46,6 +50,11 @@ export * from './wire/net.js';
|
|
|
46
50
|
export * from './verdict/findings.js';
|
|
47
51
|
export * from './wire/desktop-contract.js';
|
|
48
52
|
export * from './verdict/consequence.js';
|
|
53
|
+
export * from './verdict/property-assertion.js';
|
|
54
|
+
export * from './verdict/compare-source.js';
|
|
55
|
+
export * from './verdict/predicate.js';
|
|
56
|
+
export * from './verdict/predicate-tree.js';
|
|
57
|
+
export * from './artifacts/flow-expect-flat.js';
|
|
49
58
|
export * from './identity/project-id.js';
|
|
50
59
|
export * from './words/notices.js';
|
|
51
60
|
export * from './artifacts/journal.js';
|
package/dist/index.js
CHANGED
|
@@ -29,15 +29,31 @@ export * from './identity/source-constants.js'; // DATA_RETICLE_SOURCE_ATTR, RET
|
|
|
29
29
|
export * from './wire/event-classification.js'; // CHURN_TYPES — shared eviction priority for buffer/queue
|
|
30
30
|
export * from './wire/global-press.js'; // which press is a document key (Escape / Tab / a shortcut)
|
|
31
31
|
export * from './verdict/verified-constants.js'; // Verified — the one field an agent gates on
|
|
32
|
+
// Its own module so a page that never needs it does not download it — see first-load-size.
|
|
33
|
+
export * from './verdict/verdict-attribution.js';
|
|
32
34
|
export * from './verdict/verify-progress.js'; // VerifyPhase — what a run is doing while it is still doing it
|
|
33
35
|
export * from './wire/constants/session-constants.js';
|
|
36
|
+
export * from './wire/constants/hud-use.js'; // where the HUD sits, for HUD_USED events
|
|
37
|
+
export * from './wire/constants/discovery.js'; // the call-the-founder invitation, one link for every surface
|
|
34
38
|
export * from './identity/document-identity.js'; // which document an observation belongs to
|
|
35
39
|
export * from './identity/edit-epoch.js'; // which round of source edits an observation belongs to
|
|
36
40
|
export * from './wire/messages.js'; // ReticleEvent + the message schemas
|
|
37
41
|
export * from './wire/event-payloads.js'; // per-event payload schemas + wire vocab
|
|
38
42
|
export * from './wire/event-priority.js'; // which events survive the bridge rate cap
|
|
39
43
|
export * from './artifacts/flow-constants.js'; // moved off wire/constants/constants, which had no use for them
|
|
40
|
-
|
|
44
|
+
/*
|
|
45
|
+
* The leaf FIRST, and separately from the file it describes. `flow-step-tool.ts` was extracted out
|
|
46
|
+
* of `flow-types.ts` precisely so the browser SDK — which imports `FlowStepTool` and nothing else
|
|
47
|
+
* from there — would stop downloading eleven zod schemas it can never use. `flow-types.ts` then
|
|
48
|
+
* re-exported the two names for convenience, which put the whole module straight back on the
|
|
49
|
+
* barrel's path to them and quietly undid the extraction: measured at 6,222 B of every page load,
|
|
50
|
+
* reached through one constant.
|
|
51
|
+
*
|
|
52
|
+
* That is the same shape as the z-index that dragged the panel's stylesheet in, and as `StepEffect`
|
|
53
|
+
* on the line below. A leaf is only a leaf if the barrel names it directly.
|
|
54
|
+
*/
|
|
55
|
+
export * from './artifacts/flow-step-tool.js'; // FlowStepTool / CROSS_STEP_ADDRESS: a leaf, named directly
|
|
56
|
+
export * from './artifacts/flow-types.js'; // FlowStep, FlowExpect, replay result shapes
|
|
41
57
|
export * from './artifacts/step-effect.js'; // StepEffect: a leaf, so the page never downloads it
|
|
42
58
|
export * from './artifacts/flow-composition.js'; // canFollow: may B replay straight after A
|
|
43
59
|
export * from './verdict/verification-run.js'; // run/verdict shapes for the CI surface
|
|
@@ -47,6 +63,14 @@ export * from './wire/net.js'; // NetInitiator / ipc:// scheme — network + des
|
|
|
47
63
|
export * from './verdict/findings.js'; // crawl anomalies + cross-channel contradictions
|
|
48
64
|
export * from './wire/desktop-contract.js'; // the Electron preload/main/renderer/daemon string contract
|
|
49
65
|
export * from './verdict/consequence.js';
|
|
66
|
+
// The predicate CONTRACT: what a caller may declare, and what a saved flow may carry. The engine
|
|
67
|
+
// owns the reasoning over it and re-exports both halves as one surface.
|
|
68
|
+
export * from './verdict/property-assertion.js';
|
|
69
|
+
export * from './verdict/compare-source.js';
|
|
70
|
+
export * from './verdict/predicate.js';
|
|
71
|
+
export * from './verdict/predicate-tree.js';
|
|
72
|
+
// The version 1 reader: a flat expect lifted to the predicate a v2 file stores directly.
|
|
73
|
+
export * from './artifacts/flow-expect-flat.js';
|
|
50
74
|
export * from './identity/project-id.js';
|
|
51
75
|
export * from './words/notices.js';
|
|
52
76
|
export * from './artifacts/journal.js';
|
package/dist/onboarding.d.ts
CHANGED
|
@@ -95,16 +95,16 @@ export declare const OnboardingStepSchema: z.ZodObject<{
|
|
|
95
95
|
*/
|
|
96
96
|
unattended: z.ZodOptional<z.ZodBoolean>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
status: "skipped" | "started" | "completed" | "failed" | "abandoned";
|
|
99
98
|
step: string;
|
|
99
|
+
status: "skipped" | "completed" | "started" | "failed" | "abandoned";
|
|
100
100
|
phase: "install" | "onboard" | "first_run";
|
|
101
101
|
reason?: string | undefined;
|
|
102
102
|
stack?: string | undefined;
|
|
103
103
|
elapsedMs?: number | undefined;
|
|
104
104
|
unattended?: boolean | undefined;
|
|
105
105
|
}, {
|
|
106
|
-
status: "skipped" | "started" | "completed" | "failed" | "abandoned";
|
|
107
106
|
step: string;
|
|
107
|
+
status: "skipped" | "completed" | "started" | "failed" | "abandoned";
|
|
108
108
|
phase: "install" | "onboard" | "first_run";
|
|
109
109
|
reason?: string | undefined;
|
|
110
110
|
stack?: string | undefined;
|
package/dist/realm/registry.d.ts
CHANGED
|
@@ -202,11 +202,3 @@ export declare function profileOfRuntime(runtime: string | undefined): PlatformP
|
|
|
202
202
|
export declare const DETERMINISM_BY_SURFACE: Record<Surface, DeterminismProfile>;
|
|
203
203
|
/** The declared profile for a surface. */
|
|
204
204
|
export declare function determinismFor(surface: Surface): DeterminismProfile;
|
|
205
|
-
/**
|
|
206
|
-
* May a resume re-drive the steps before the one asked for?
|
|
207
|
-
*
|
|
208
|
-
* The one question the resume path has to ask before it silently repeats somebody's actions. Derived
|
|
209
|
-
* through the protocol's own `resumeStrategy` rather than by reading `replayPrefix` here, so this
|
|
210
|
-
* cannot drift from the rule the specification publishes.
|
|
211
|
-
*/
|
|
212
|
-
export declare function mayResumeByReplayingPrefix(surface: Surface): boolean;
|
package/dist/realm/registry.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* how to patch a build config, what a connect snippet looks like — those are code and live with the
|
|
19
19
|
* code that runs them. This table holds facts you could write on an index card.
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
21
|
+
import { Surface } from 'open-verification';
|
|
22
22
|
import { AppRuntime } from '../telemetry-feedback.js';
|
|
23
23
|
import { PlatformProfile } from '../wire/platform.js';
|
|
24
24
|
/**
|
|
@@ -290,13 +290,3 @@ export const DETERMINISM_BY_SURFACE = {
|
|
|
290
290
|
export function determinismFor(surface) {
|
|
291
291
|
return DETERMINISM_BY_SURFACE[surface];
|
|
292
292
|
}
|
|
293
|
-
/**
|
|
294
|
-
* May a resume re-drive the steps before the one asked for?
|
|
295
|
-
*
|
|
296
|
-
* The one question the resume path has to ask before it silently repeats somebody's actions. Derived
|
|
297
|
-
* through the protocol's own `resumeStrategy` rather than by reading `replayPrefix` here, so this
|
|
298
|
-
* cannot drift from the rule the specification publishes.
|
|
299
|
-
*/
|
|
300
|
-
export function mayResumeByReplayingPrefix(surface) {
|
|
301
|
-
return ResumeStrategy.REFUSE !== resumeStrategy(determinismFor(surface));
|
|
302
|
-
}
|
|
@@ -27,9 +27,19 @@ export type DaemonRegistryEntry = z.infer<typeof DaemonRegistryEntrySchema>;
|
|
|
27
27
|
/**
|
|
28
28
|
* Pick the daemon port an app should connect to, given the registry entries, the app's projectId, and
|
|
29
29
|
* a liveness probe. Pure so both the vite and next plugins share one rule and it's unit-testable:
|
|
30
|
-
* 1.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* 1. the port the project CONFIGURED wins whenever a live daemon is registered on it that is not
|
|
31
|
+
* another project's (a daemon naming no project counts; one naming a different project never does);
|
|
32
|
+
* 2. otherwise drop dead daemons (crashed, stale entry);
|
|
33
|
+
* 3. among the living, prefer the one whose projectId matches the app's — lowest port wins on a tie;
|
|
34
|
+
* 4. return null when nothing matches, so the caller falls back to the default port (never guesses a
|
|
33
35
|
* mismatched daemon — a wrong auto-connect is worse than the honest default).
|
|
36
|
+
*
|
|
37
|
+
* The first rule exists because `init --port <new>` starts a daemon on the new port while the old one
|
|
38
|
+
* for the same project is still alive. Discovery by projectId then found both, took the lower, and
|
|
39
|
+
* the page dialled the OLD daemon: init waited on the new one and exited with "connected to a
|
|
40
|
+
* DIFFERENT Reticle daemon". `.reticle.json` is what the daemon and the CLI follow, so when a daemon
|
|
41
|
+
* answers there it is the answer; the registry only speaks when nothing does. Another project's
|
|
42
|
+
* daemon squatting that port is not an answer: the pairing token is per machine, so taking it would
|
|
43
|
+
* pair this page with that project's bridge while this project's own daemon sat live elsewhere.
|
|
34
44
|
*/
|
|
35
|
-
export declare function pickDaemonPort(entries: readonly DaemonRegistryEntry[], projectId: string | undefined, isAlive: (pid: number) => boolean): number | null;
|
|
45
|
+
export declare function pickDaemonPort(entries: readonly DaemonRegistryEntry[], projectId: string | undefined, isAlive: (pid: number) => boolean, configuredPort?: number): number | null;
|
|
@@ -31,12 +31,28 @@ export const DaemonRegistryEntrySchema = z.object({
|
|
|
31
31
|
/**
|
|
32
32
|
* Pick the daemon port an app should connect to, given the registry entries, the app's projectId, and
|
|
33
33
|
* a liveness probe. Pure so both the vite and next plugins share one rule and it's unit-testable:
|
|
34
|
-
* 1.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* 1. the port the project CONFIGURED wins whenever a live daemon is registered on it that is not
|
|
35
|
+
* another project's (a daemon naming no project counts; one naming a different project never does);
|
|
36
|
+
* 2. otherwise drop dead daemons (crashed, stale entry);
|
|
37
|
+
* 3. among the living, prefer the one whose projectId matches the app's — lowest port wins on a tie;
|
|
38
|
+
* 4. return null when nothing matches, so the caller falls back to the default port (never guesses a
|
|
37
39
|
* mismatched daemon — a wrong auto-connect is worse than the honest default).
|
|
40
|
+
*
|
|
41
|
+
* The first rule exists because `init --port <new>` starts a daemon on the new port while the old one
|
|
42
|
+
* for the same project is still alive. Discovery by projectId then found both, took the lower, and
|
|
43
|
+
* the page dialled the OLD daemon: init waited on the new one and exited with "connected to a
|
|
44
|
+
* DIFFERENT Reticle daemon". `.reticle.json` is what the daemon and the CLI follow, so when a daemon
|
|
45
|
+
* answers there it is the answer; the registry only speaks when nothing does. Another project's
|
|
46
|
+
* daemon squatting that port is not an answer: the pairing token is per machine, so taking it would
|
|
47
|
+
* pair this page with that project's bridge while this project's own daemon sat live elsewhere.
|
|
38
48
|
*/
|
|
39
|
-
export function pickDaemonPort(entries, projectId, isAlive) {
|
|
49
|
+
export function pickDaemonPort(entries, projectId, isAlive, configuredPort) {
|
|
50
|
+
if (undefined !== configuredPort &&
|
|
51
|
+
entries.some((e) => e.port === configuredPort &&
|
|
52
|
+
isAlive(e.pid) &&
|
|
53
|
+
(e.projectId === undefined || projectId === undefined || e.projectId === projectId))) {
|
|
54
|
+
return configuredPort;
|
|
55
|
+
}
|
|
40
56
|
if (projectId === undefined || 0 === projectId.length)
|
|
41
57
|
return null;
|
|
42
58
|
const matches = entries
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"dialog.opened",
|
|
46
46
|
"render.commit",
|
|
47
47
|
"focus.change",
|
|
48
|
+
"field.change",
|
|
48
49
|
"flow.recorded",
|
|
49
50
|
"transport.overflow",
|
|
50
51
|
"truncated",
|
|
@@ -53,7 +54,8 @@
|
|
|
53
54
|
"net.detail",
|
|
54
55
|
"human.control",
|
|
55
56
|
"human.mark",
|
|
56
|
-
"download"
|
|
57
|
+
"download",
|
|
58
|
+
"hud.used"
|
|
57
59
|
]
|
|
58
60
|
},
|
|
59
61
|
"sessionId": {
|
|
@@ -92,6 +92,9 @@
|
|
|
92
92
|
"urlRaw": {
|
|
93
93
|
"type": "string"
|
|
94
94
|
},
|
|
95
|
+
"nextAction": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
95
98
|
"requestShape": {
|
|
96
99
|
"type": "string"
|
|
97
100
|
}
|
|
@@ -585,6 +588,39 @@
|
|
|
585
588
|
"additionalProperties": false,
|
|
586
589
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
587
590
|
},
|
|
591
|
+
"field.change": {
|
|
592
|
+
"type": "object",
|
|
593
|
+
"properties": {
|
|
594
|
+
"field": {
|
|
595
|
+
"type": "string"
|
|
596
|
+
},
|
|
597
|
+
"kind": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"enum": [
|
|
600
|
+
"input",
|
|
601
|
+
"change"
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
"length": {
|
|
605
|
+
"type": "integer",
|
|
606
|
+
"minimum": 0
|
|
607
|
+
},
|
|
608
|
+
"value": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
},
|
|
611
|
+
"redacted": {
|
|
612
|
+
"type": "boolean",
|
|
613
|
+
"const": true
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"required": [
|
|
617
|
+
"field",
|
|
618
|
+
"kind",
|
|
619
|
+
"length"
|
|
620
|
+
],
|
|
621
|
+
"additionalProperties": false,
|
|
622
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
623
|
+
},
|
|
588
624
|
"flow.recorded": {
|
|
589
625
|
"type": "object",
|
|
590
626
|
"properties": {
|
|
@@ -790,6 +826,42 @@
|
|
|
790
826
|
],
|
|
791
827
|
"additionalProperties": false,
|
|
792
828
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
829
|
+
},
|
|
830
|
+
"hud.used": {
|
|
831
|
+
"type": "object",
|
|
832
|
+
"properties": {
|
|
833
|
+
"control": {
|
|
834
|
+
"type": "string",
|
|
835
|
+
"maxLength": 48,
|
|
836
|
+
"pattern": "^[a-z][a-zA-Z-]*(\\.[a-zA-Z-]+)?$"
|
|
837
|
+
},
|
|
838
|
+
"toggle": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"enum": [
|
|
841
|
+
"on",
|
|
842
|
+
"off"
|
|
843
|
+
]
|
|
844
|
+
},
|
|
845
|
+
"view": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"enum": [
|
|
848
|
+
"bubble",
|
|
849
|
+
"collapsed",
|
|
850
|
+
"expanded"
|
|
851
|
+
]
|
|
852
|
+
},
|
|
853
|
+
"panel": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"enum": [
|
|
856
|
+
"chat",
|
|
857
|
+
"settings",
|
|
858
|
+
"report",
|
|
859
|
+
"none"
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"additionalProperties": false,
|
|
864
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
793
865
|
}
|
|
794
866
|
}
|
|
795
867
|
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"dialog.opened",
|
|
33
33
|
"render.commit",
|
|
34
34
|
"focus.change",
|
|
35
|
+
"field.change",
|
|
35
36
|
"flow.recorded",
|
|
36
37
|
"transport.overflow",
|
|
37
38
|
"truncated",
|
|
@@ -40,7 +41,8 @@
|
|
|
40
41
|
"net.detail",
|
|
41
42
|
"human.control",
|
|
42
43
|
"human.mark",
|
|
43
|
-
"download"
|
|
44
|
+
"download",
|
|
45
|
+
"hud.used"
|
|
44
46
|
]
|
|
45
47
|
}
|
|
46
48
|
},
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dialog.opened",
|
|
39
39
|
"render.commit",
|
|
40
40
|
"focus.change",
|
|
41
|
+
"field.change",
|
|
41
42
|
"flow.recorded",
|
|
42
43
|
"transport.overflow",
|
|
43
44
|
"truncated",
|
|
@@ -46,7 +47,8 @@
|
|
|
46
47
|
"net.detail",
|
|
47
48
|
"human.control",
|
|
48
49
|
"human.mark",
|
|
49
|
-
"download"
|
|
50
|
+
"download",
|
|
51
|
+
"hud.used"
|
|
50
52
|
]
|
|
51
53
|
},
|
|
52
54
|
"sessionId": {
|
|
@@ -252,6 +252,7 @@
|
|
|
252
252
|
"dialog.opened",
|
|
253
253
|
"render.commit",
|
|
254
254
|
"focus.change",
|
|
255
|
+
"field.change",
|
|
255
256
|
"flow.recorded",
|
|
256
257
|
"transport.overflow",
|
|
257
258
|
"truncated",
|
|
@@ -260,7 +261,8 @@
|
|
|
260
261
|
"net.detail",
|
|
261
262
|
"human.control",
|
|
262
263
|
"human.mark",
|
|
263
|
-
"download"
|
|
264
|
+
"download",
|
|
265
|
+
"hud.used"
|
|
264
266
|
]
|
|
265
267
|
},
|
|
266
268
|
"sessionId": {
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
export declare const DATA_RETICLE_SOURCE_ATTR: "data-reticle-source";
|
|
3
3
|
export declare const RETICLE_ROOT_GLOBAL: "__RETICLE_ROOT__";
|
|
4
4
|
export declare const RETICLE_SDK_VERSION_GLOBAL: "__RETICLE_SDK_VERSION__";
|
|
5
|
+
export declare const RETICLE_IGNORE_MARKER: "@reticle-ignore";
|