@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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Ref } from '
|
|
1
|
+
import type { Ref } from '../identity/brand.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import type
|
|
3
|
+
import { ElementState } from './constants/constants.js';
|
|
4
|
+
import { type AnnotationErrorCode, type AnnotationTarget } from '../artifacts/flow-constants.js';
|
|
5
|
+
import type { FlowExpect } from '../artifacts/flow-types.js';
|
|
5
6
|
/**
|
|
6
7
|
* A query describing which element(s) to find, Testing-Library style.
|
|
7
8
|
*
|
|
@@ -65,41 +66,41 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
65
66
|
*/
|
|
66
67
|
self: z.ZodOptional<z.ZodBoolean>;
|
|
67
68
|
}, "strict", z.ZodTypeAny, {
|
|
69
|
+
role?: string | undefined;
|
|
70
|
+
text?: string | undefined;
|
|
71
|
+
label?: string | undefined;
|
|
72
|
+
placeholder?: string | undefined;
|
|
73
|
+
testid?: string | undefined;
|
|
74
|
+
alt?: string | undefined;
|
|
75
|
+
component?: string | undefined;
|
|
68
76
|
value?: string | undefined;
|
|
69
77
|
source?: {
|
|
70
78
|
file: string;
|
|
71
79
|
line: number;
|
|
72
80
|
column?: number | undefined;
|
|
73
81
|
} | undefined;
|
|
74
|
-
testid?: string | undefined;
|
|
75
|
-
role?: string | undefined;
|
|
76
|
-
component?: string | undefined;
|
|
77
|
-
text?: string | undefined;
|
|
78
|
-
label?: string | undefined;
|
|
79
|
-
placeholder?: string | undefined;
|
|
80
|
-
alt?: string | undefined;
|
|
81
82
|
name?: string | undefined;
|
|
82
83
|
scope?: string | undefined;
|
|
83
|
-
by?: "
|
|
84
|
+
by?: "role" | "text" | "label" | "placeholder" | "testid" | "alt" | "component" | undefined;
|
|
84
85
|
attrs?: string[] | undefined;
|
|
85
86
|
self?: boolean | undefined;
|
|
86
87
|
}, {
|
|
88
|
+
role?: string | undefined;
|
|
89
|
+
text?: string | undefined;
|
|
90
|
+
label?: string | undefined;
|
|
91
|
+
placeholder?: string | undefined;
|
|
92
|
+
testid?: string | undefined;
|
|
93
|
+
alt?: string | undefined;
|
|
94
|
+
component?: string | undefined;
|
|
87
95
|
value?: string | undefined;
|
|
88
96
|
source?: {
|
|
89
97
|
file: string;
|
|
90
98
|
line: number;
|
|
91
99
|
column?: number | undefined;
|
|
92
100
|
} | undefined;
|
|
93
|
-
testid?: string | undefined;
|
|
94
|
-
role?: string | undefined;
|
|
95
|
-
component?: string | undefined;
|
|
96
|
-
text?: string | undefined;
|
|
97
|
-
label?: string | undefined;
|
|
98
|
-
placeholder?: string | undefined;
|
|
99
|
-
alt?: string | undefined;
|
|
100
101
|
name?: string | undefined;
|
|
101
102
|
scope?: string | undefined;
|
|
102
|
-
by?: "
|
|
103
|
+
by?: "role" | "text" | "label" | "placeholder" | "testid" | "alt" | "component" | undefined;
|
|
103
104
|
attrs?: string[] | undefined;
|
|
104
105
|
self?: boolean | undefined;
|
|
105
106
|
}>;
|
|
@@ -203,9 +204,9 @@ export interface QueryEmptyHint {
|
|
|
203
204
|
*
|
|
204
205
|
* Role+name matching is exact, deliberately: substring matching on `name` would let a query for
|
|
205
206
|
* "Save" select "Save and close", and acting on the wrong control is a worse failure than not
|
|
206
|
-
* finding the right one.
|
|
207
|
-
* word away
|
|
208
|
-
*
|
|
207
|
+
* finding the right one. An exact miss that says nothing costs a whole snapshot to discover the
|
|
208
|
+
* caller was one word away — a query for "Mesh" against a button reading "2 Mesh". The match
|
|
209
|
+
* stays exact; the miss answers.
|
|
209
210
|
*/
|
|
210
211
|
nameNearMiss?: string[];
|
|
211
212
|
}
|
|
@@ -297,22 +298,22 @@ export declare const ManifestGovernanceSchema: z.ZodObject<{
|
|
|
297
298
|
}>, "many">>;
|
|
298
299
|
}, "strip", z.ZodTypeAny, {
|
|
299
300
|
scope?: string[] | undefined;
|
|
301
|
+
owner?: string | undefined;
|
|
300
302
|
risk?: {
|
|
301
303
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
302
304
|
note?: string | undefined;
|
|
303
305
|
paths?: string[] | undefined;
|
|
304
306
|
}[] | undefined;
|
|
305
|
-
owner?: string | undefined;
|
|
306
307
|
safety?: string[] | undefined;
|
|
307
308
|
redact?: string[] | undefined;
|
|
308
309
|
}, {
|
|
309
310
|
scope?: string[] | undefined;
|
|
311
|
+
owner?: string | undefined;
|
|
310
312
|
risk?: {
|
|
311
313
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
312
314
|
note?: string | undefined;
|
|
313
315
|
paths?: string[] | undefined;
|
|
314
316
|
}[] | undefined;
|
|
315
|
-
owner?: string | undefined;
|
|
316
317
|
safety?: string[] | undefined;
|
|
317
318
|
redact?: string[] | undefined;
|
|
318
319
|
}>;
|
|
@@ -362,22 +363,22 @@ export declare const CapabilitiesSchema: z.ZodObject<{
|
|
|
362
363
|
}>, "many">>;
|
|
363
364
|
}, "strip", z.ZodTypeAny, {
|
|
364
365
|
scope?: string[] | undefined;
|
|
366
|
+
owner?: string | undefined;
|
|
365
367
|
risk?: {
|
|
366
368
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
367
369
|
note?: string | undefined;
|
|
368
370
|
paths?: string[] | undefined;
|
|
369
371
|
}[] | undefined;
|
|
370
|
-
owner?: string | undefined;
|
|
371
372
|
safety?: string[] | undefined;
|
|
372
373
|
redact?: string[] | undefined;
|
|
373
374
|
}, {
|
|
374
375
|
scope?: string[] | undefined;
|
|
376
|
+
owner?: string | undefined;
|
|
375
377
|
risk?: {
|
|
376
378
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
377
379
|
note?: string | undefined;
|
|
378
380
|
paths?: string[] | undefined;
|
|
379
381
|
}[] | undefined;
|
|
380
|
-
owner?: string | undefined;
|
|
381
382
|
safety?: string[] | undefined;
|
|
382
383
|
redact?: string[] | undefined;
|
|
383
384
|
}>>;
|
|
@@ -386,17 +387,17 @@ export declare const CapabilitiesSchema: z.ZodObject<{
|
|
|
386
387
|
name: string;
|
|
387
388
|
steps: string[];
|
|
388
389
|
}[];
|
|
389
|
-
testids: string[];
|
|
390
390
|
signals: string[];
|
|
391
|
+
testids: string[];
|
|
391
392
|
stores: string[];
|
|
392
393
|
governance?: {
|
|
393
394
|
scope?: string[] | undefined;
|
|
395
|
+
owner?: string | undefined;
|
|
394
396
|
risk?: {
|
|
395
397
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
396
398
|
note?: string | undefined;
|
|
397
399
|
paths?: string[] | undefined;
|
|
398
400
|
}[] | undefined;
|
|
399
|
-
owner?: string | undefined;
|
|
400
401
|
safety?: string[] | undefined;
|
|
401
402
|
redact?: string[] | undefined;
|
|
402
403
|
} | undefined;
|
|
@@ -405,17 +406,17 @@ export declare const CapabilitiesSchema: z.ZodObject<{
|
|
|
405
406
|
name: string;
|
|
406
407
|
steps: string[];
|
|
407
408
|
}[];
|
|
408
|
-
testids: string[];
|
|
409
409
|
signals: string[];
|
|
410
|
+
testids: string[];
|
|
410
411
|
stores: string[];
|
|
411
412
|
governance?: {
|
|
412
413
|
scope?: string[] | undefined;
|
|
414
|
+
owner?: string | undefined;
|
|
413
415
|
risk?: {
|
|
414
416
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
415
417
|
note?: string | undefined;
|
|
416
418
|
paths?: string[] | undefined;
|
|
417
419
|
}[] | undefined;
|
|
418
|
-
owner?: string | undefined;
|
|
419
420
|
safety?: string[] | undefined;
|
|
420
421
|
redact?: string[] | undefined;
|
|
421
422
|
} | undefined;
|
|
@@ -469,22 +470,22 @@ export declare const ContractFileSchema: z.ZodObject<{
|
|
|
469
470
|
}>, "many">>;
|
|
470
471
|
}, "strip", z.ZodTypeAny, {
|
|
471
472
|
scope?: string[] | undefined;
|
|
473
|
+
owner?: string | undefined;
|
|
472
474
|
risk?: {
|
|
473
475
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
474
476
|
note?: string | undefined;
|
|
475
477
|
paths?: string[] | undefined;
|
|
476
478
|
}[] | undefined;
|
|
477
|
-
owner?: string | undefined;
|
|
478
479
|
safety?: string[] | undefined;
|
|
479
480
|
redact?: string[] | undefined;
|
|
480
481
|
}, {
|
|
481
482
|
scope?: string[] | undefined;
|
|
483
|
+
owner?: string | undefined;
|
|
482
484
|
risk?: {
|
|
483
485
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
484
486
|
note?: string | undefined;
|
|
485
487
|
paths?: string[] | undefined;
|
|
486
488
|
}[] | undefined;
|
|
487
|
-
owner?: string | undefined;
|
|
488
489
|
safety?: string[] | undefined;
|
|
489
490
|
redact?: string[] | undefined;
|
|
490
491
|
}>>;
|
|
@@ -493,17 +494,17 @@ export declare const ContractFileSchema: z.ZodObject<{
|
|
|
493
494
|
name: string;
|
|
494
495
|
steps: string[];
|
|
495
496
|
}[];
|
|
496
|
-
testids: string[];
|
|
497
497
|
signals: string[];
|
|
498
|
+
testids: string[];
|
|
498
499
|
stores: string[];
|
|
499
500
|
governance?: {
|
|
500
501
|
scope?: string[] | undefined;
|
|
502
|
+
owner?: string | undefined;
|
|
501
503
|
risk?: {
|
|
502
504
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
503
505
|
note?: string | undefined;
|
|
504
506
|
paths?: string[] | undefined;
|
|
505
507
|
}[] | undefined;
|
|
506
|
-
owner?: string | undefined;
|
|
507
508
|
safety?: string[] | undefined;
|
|
508
509
|
redact?: string[] | undefined;
|
|
509
510
|
} | undefined;
|
|
@@ -512,66 +513,66 @@ export declare const ContractFileSchema: z.ZodObject<{
|
|
|
512
513
|
name: string;
|
|
513
514
|
steps: string[];
|
|
514
515
|
}[];
|
|
515
|
-
testids: string[];
|
|
516
516
|
signals: string[];
|
|
517
|
+
testids: string[];
|
|
517
518
|
stores: string[];
|
|
518
519
|
governance?: {
|
|
519
520
|
scope?: string[] | undefined;
|
|
521
|
+
owner?: string | undefined;
|
|
520
522
|
risk?: {
|
|
521
523
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
522
524
|
note?: string | undefined;
|
|
523
525
|
paths?: string[] | undefined;
|
|
524
526
|
}[] | undefined;
|
|
525
|
-
owner?: string | undefined;
|
|
526
527
|
safety?: string[] | undefined;
|
|
527
528
|
redact?: string[] | undefined;
|
|
528
529
|
} | undefined;
|
|
529
530
|
}>;
|
|
530
531
|
}, "strip", z.ZodTypeAny, {
|
|
531
|
-
version: 1;
|
|
532
532
|
capabilities: {
|
|
533
533
|
flows: {
|
|
534
534
|
name: string;
|
|
535
535
|
steps: string[];
|
|
536
536
|
}[];
|
|
537
|
-
testids: string[];
|
|
538
537
|
signals: string[];
|
|
538
|
+
testids: string[];
|
|
539
539
|
stores: string[];
|
|
540
540
|
governance?: {
|
|
541
541
|
scope?: string[] | undefined;
|
|
542
|
+
owner?: string | undefined;
|
|
542
543
|
risk?: {
|
|
543
544
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
544
545
|
note?: string | undefined;
|
|
545
546
|
paths?: string[] | undefined;
|
|
546
547
|
}[] | undefined;
|
|
547
|
-
owner?: string | undefined;
|
|
548
548
|
safety?: string[] | undefined;
|
|
549
549
|
redact?: string[] | undefined;
|
|
550
550
|
} | undefined;
|
|
551
551
|
};
|
|
552
|
+
version: 1;
|
|
552
553
|
generatedAt: number;
|
|
553
554
|
}, {
|
|
554
|
-
version: 1;
|
|
555
555
|
capabilities: {
|
|
556
556
|
flows: {
|
|
557
557
|
name: string;
|
|
558
558
|
steps: string[];
|
|
559
559
|
}[];
|
|
560
|
-
testids: string[];
|
|
561
560
|
signals: string[];
|
|
561
|
+
testids: string[];
|
|
562
562
|
stores: string[];
|
|
563
563
|
governance?: {
|
|
564
564
|
scope?: string[] | undefined;
|
|
565
|
+
owner?: string | undefined;
|
|
565
566
|
risk?: {
|
|
566
567
|
surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
|
|
567
568
|
note?: string | undefined;
|
|
568
569
|
paths?: string[] | undefined;
|
|
569
570
|
}[] | undefined;
|
|
570
|
-
owner?: string | undefined;
|
|
571
571
|
safety?: string[] | undefined;
|
|
572
572
|
redact?: string[] | undefined;
|
|
573
573
|
} | undefined;
|
|
574
574
|
};
|
|
575
|
+
version: 1;
|
|
575
576
|
generatedAt: number;
|
|
576
577
|
}>;
|
|
577
578
|
/**
|
|
@@ -621,29 +622,29 @@ export declare const RunRecordSchema: z.ZodObject<{
|
|
|
621
622
|
}>>;
|
|
622
623
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
623
624
|
}, "strip", z.ZodTypeAny, {
|
|
624
|
-
at: number;
|
|
625
625
|
status: "pass" | "drift" | "error" | "fail";
|
|
626
|
-
name: string;
|
|
627
626
|
kind: "flow_replay" | "manual";
|
|
627
|
+
at: number;
|
|
628
|
+
name: string;
|
|
629
|
+
summary?: string | undefined;
|
|
628
630
|
durationMs?: number | undefined;
|
|
629
631
|
evidence?: {
|
|
630
632
|
consoleErrors?: number | undefined;
|
|
631
633
|
networkErrors?: number | undefined;
|
|
632
634
|
driftSteps?: number | undefined;
|
|
633
635
|
} | undefined;
|
|
634
|
-
summary?: string | undefined;
|
|
635
636
|
}, {
|
|
636
|
-
at: number;
|
|
637
637
|
status: "pass" | "drift" | "error" | "fail";
|
|
638
|
-
name: string;
|
|
639
638
|
kind: "flow_replay" | "manual";
|
|
639
|
+
at: number;
|
|
640
|
+
name: string;
|
|
641
|
+
summary?: string | undefined;
|
|
640
642
|
durationMs?: number | undefined;
|
|
641
643
|
evidence?: {
|
|
642
644
|
consoleErrors?: number | undefined;
|
|
643
645
|
networkErrors?: number | undefined;
|
|
644
646
|
driftSteps?: number | undefined;
|
|
645
647
|
} | undefined;
|
|
646
|
-
summary?: string | undefined;
|
|
647
648
|
}>;
|
|
648
649
|
export type RunRecord = z.infer<typeof RunRecordSchema>;
|
|
649
650
|
/** The optional learned map of the app (known flow/route names). */
|
|
@@ -762,45 +763,45 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
762
763
|
}>>;
|
|
763
764
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
764
765
|
}, "strip", z.ZodTypeAny, {
|
|
765
|
-
at: number;
|
|
766
766
|
status: "pass" | "drift" | "error" | "fail";
|
|
767
|
-
name: string;
|
|
768
767
|
kind: "flow_replay" | "manual";
|
|
768
|
+
at: number;
|
|
769
|
+
name: string;
|
|
770
|
+
summary?: string | undefined;
|
|
769
771
|
durationMs?: number | undefined;
|
|
770
772
|
evidence?: {
|
|
771
773
|
consoleErrors?: number | undefined;
|
|
772
774
|
networkErrors?: number | undefined;
|
|
773
775
|
driftSteps?: number | undefined;
|
|
774
776
|
} | undefined;
|
|
775
|
-
summary?: string | undefined;
|
|
776
777
|
}, {
|
|
777
|
-
at: number;
|
|
778
778
|
status: "pass" | "drift" | "error" | "fail";
|
|
779
|
-
name: string;
|
|
780
779
|
kind: "flow_replay" | "manual";
|
|
780
|
+
at: number;
|
|
781
|
+
name: string;
|
|
782
|
+
summary?: string | undefined;
|
|
781
783
|
durationMs?: number | undefined;
|
|
782
784
|
evidence?: {
|
|
783
785
|
consoleErrors?: number | undefined;
|
|
784
786
|
networkErrors?: number | undefined;
|
|
785
787
|
driftSteps?: number | undefined;
|
|
786
788
|
} | undefined;
|
|
787
|
-
summary?: string | undefined;
|
|
788
789
|
}>, "many">;
|
|
789
790
|
}, "strip", z.ZodTypeAny, {
|
|
790
|
-
version: 1;
|
|
791
791
|
runs: {
|
|
792
|
-
at: number;
|
|
793
792
|
status: "pass" | "drift" | "error" | "fail";
|
|
794
|
-
name: string;
|
|
795
793
|
kind: "flow_replay" | "manual";
|
|
794
|
+
at: number;
|
|
795
|
+
name: string;
|
|
796
|
+
summary?: string | undefined;
|
|
796
797
|
durationMs?: number | undefined;
|
|
797
798
|
evidence?: {
|
|
798
799
|
consoleErrors?: number | undefined;
|
|
799
800
|
networkErrors?: number | undefined;
|
|
800
801
|
driftSteps?: number | undefined;
|
|
801
802
|
} | undefined;
|
|
802
|
-
summary?: string | undefined;
|
|
803
803
|
}[];
|
|
804
|
+
version: 1;
|
|
804
805
|
learned?: {
|
|
805
806
|
flows?: string[] | undefined;
|
|
806
807
|
routes?: string[] | undefined;
|
|
@@ -810,20 +811,20 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
810
811
|
} | undefined;
|
|
811
812
|
} | undefined;
|
|
812
813
|
}, {
|
|
813
|
-
version: 1;
|
|
814
814
|
runs: {
|
|
815
|
-
at: number;
|
|
816
815
|
status: "pass" | "drift" | "error" | "fail";
|
|
817
|
-
name: string;
|
|
818
816
|
kind: "flow_replay" | "manual";
|
|
817
|
+
at: number;
|
|
818
|
+
name: string;
|
|
819
|
+
summary?: string | undefined;
|
|
819
820
|
durationMs?: number | undefined;
|
|
820
821
|
evidence?: {
|
|
821
822
|
consoleErrors?: number | undefined;
|
|
822
823
|
networkErrors?: number | undefined;
|
|
823
824
|
driftSteps?: number | undefined;
|
|
824
825
|
} | undefined;
|
|
825
|
-
summary?: string | undefined;
|
|
826
826
|
}[];
|
|
827
|
+
version: 1;
|
|
827
828
|
learned?: {
|
|
828
829
|
flows?: string[] | undefined;
|
|
829
830
|
routes?: string[] | undefined;
|
|
@@ -850,12 +851,12 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
850
851
|
name: z.ZodString;
|
|
851
852
|
dataMatches: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
852
853
|
}, "strip", z.ZodTypeAny, {
|
|
853
|
-
name: string;
|
|
854
854
|
kind: "assert-signal";
|
|
855
|
+
name: string;
|
|
855
856
|
dataMatches?: Record<string, unknown> | undefined;
|
|
856
857
|
}, {
|
|
857
|
-
name: string;
|
|
858
858
|
kind: "assert-signal";
|
|
859
|
+
name: string;
|
|
859
860
|
dataMatches?: Record<string, unknown> | undefined;
|
|
860
861
|
}>, z.ZodObject<{
|
|
861
862
|
kind: z.ZodLiteral<"assert-visible">;
|
|
@@ -891,30 +892,30 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
891
892
|
}, "strip", z.ZodTypeAny, {
|
|
892
893
|
status?: number | undefined;
|
|
893
894
|
method?: string | undefined;
|
|
894
|
-
count?: number | undefined;
|
|
895
895
|
urlContains?: string | undefined;
|
|
896
|
+
count?: number | undefined;
|
|
896
897
|
}, {
|
|
897
898
|
status?: number | undefined;
|
|
898
899
|
method?: string | undefined;
|
|
899
|
-
count?: number | undefined;
|
|
900
900
|
urlContains?: string | undefined;
|
|
901
|
+
count?: number | undefined;
|
|
901
902
|
}>;
|
|
902
903
|
}, "strip", z.ZodTypeAny, {
|
|
903
|
-
kind: "assert-net";
|
|
904
904
|
net: {
|
|
905
905
|
status?: number | undefined;
|
|
906
906
|
method?: string | undefined;
|
|
907
|
-
count?: number | undefined;
|
|
908
907
|
urlContains?: string | undefined;
|
|
908
|
+
count?: number | undefined;
|
|
909
909
|
};
|
|
910
|
-
}, {
|
|
911
910
|
kind: "assert-net";
|
|
911
|
+
}, {
|
|
912
912
|
net: {
|
|
913
913
|
status?: number | undefined;
|
|
914
914
|
method?: string | undefined;
|
|
915
|
-
count?: number | undefined;
|
|
916
915
|
urlContains?: string | undefined;
|
|
916
|
+
count?: number | undefined;
|
|
917
917
|
};
|
|
918
|
+
kind: "assert-net";
|
|
918
919
|
}>, z.ZodObject<{
|
|
919
920
|
kind: z.ZodLiteral<"mark-dynamic">;
|
|
920
921
|
testid: z.ZodString;
|
|
@@ -940,13 +941,13 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
940
941
|
}, "strip", z.ZodTypeAny, {
|
|
941
942
|
status?: number | undefined;
|
|
942
943
|
method?: string | undefined;
|
|
943
|
-
count?: number | undefined;
|
|
944
944
|
urlContains?: string | undefined;
|
|
945
|
+
count?: number | undefined;
|
|
945
946
|
}, {
|
|
946
947
|
status?: number | undefined;
|
|
947
948
|
method?: string | undefined;
|
|
948
|
-
count?: number | undefined;
|
|
949
949
|
urlContains?: string | undefined;
|
|
950
|
+
count?: number | undefined;
|
|
950
951
|
}>>;
|
|
951
952
|
console: z.ZodOptional<z.ZodObject<{
|
|
952
953
|
level: z.ZodOptional<z.ZodString>;
|
|
@@ -976,7 +977,6 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
976
977
|
}>>;
|
|
977
978
|
}, "strip", z.ZodTypeAny, {
|
|
978
979
|
kind: "success-state";
|
|
979
|
-
testid?: string | undefined;
|
|
980
980
|
signal?: string | undefined;
|
|
981
981
|
text?: {
|
|
982
982
|
contains: string;
|
|
@@ -984,11 +984,12 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
984
984
|
absent?: boolean | undefined;
|
|
985
985
|
scope?: string | undefined;
|
|
986
986
|
} | undefined;
|
|
987
|
+
testid?: string | undefined;
|
|
987
988
|
net?: {
|
|
988
989
|
status?: number | undefined;
|
|
989
990
|
method?: string | undefined;
|
|
990
|
-
count?: number | undefined;
|
|
991
991
|
urlContains?: string | undefined;
|
|
992
|
+
count?: number | undefined;
|
|
992
993
|
} | undefined;
|
|
993
994
|
console?: {
|
|
994
995
|
level?: string | undefined;
|
|
@@ -1000,7 +1001,6 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
1000
1001
|
statePath?: string | undefined;
|
|
1001
1002
|
}, {
|
|
1002
1003
|
kind: "success-state";
|
|
1003
|
-
testid?: string | undefined;
|
|
1004
1004
|
signal?: string | undefined;
|
|
1005
1005
|
text?: {
|
|
1006
1006
|
contains: string;
|
|
@@ -1008,11 +1008,12 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
1008
1008
|
absent?: boolean | undefined;
|
|
1009
1009
|
scope?: string | undefined;
|
|
1010
1010
|
} | undefined;
|
|
1011
|
+
testid?: string | undefined;
|
|
1011
1012
|
net?: {
|
|
1012
1013
|
status?: number | undefined;
|
|
1013
1014
|
method?: string | undefined;
|
|
1014
|
-
count?: number | undefined;
|
|
1015
1015
|
urlContains?: string | undefined;
|
|
1016
|
+
count?: number | undefined;
|
|
1016
1017
|
} | undefined;
|
|
1017
1018
|
console?: {
|
|
1018
1019
|
level?: string | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import {
|
|
2
|
+
import { CONTRACT_FILE_VERSION, ElementState, QueryBy } from './constants/constants.js';
|
|
3
|
+
// Imported from where they actually live: these are artifact constants, not wire constants.
|
|
4
|
+
import { AnnotationKind, PROJECT_FILE_VERSION, RunKind, RunStatus, } from '../artifacts/flow-constants.js';
|
|
5
|
+
import { RiskSurface } from '../verdict/verification-run.js';
|
|
5
6
|
/**
|
|
6
7
|
* A query describing which element(s) to find, Testing-Library style.
|
|
7
8
|
*
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WHY an install has produced no session — the closed vocabulary, on its own.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* by `explainNoSession`, the session manager and the refusal reporter alike.
|
|
4
|
+
* `telemetry.ts` is the wire contract; this is the taxonomy the no-session DIAGNOSIS owns, read by
|
|
5
|
+
* `explainNoSession`, the session manager and the refusal reporter alike.
|
|
7
6
|
*
|
|
8
7
|
* `no_session` is the largest refusal cohort, and on its own it is a set difference: the daemon
|
|
9
8
|
* started, no app connected, and nothing says which of several opposite situations that was.
|
|
@@ -15,6 +14,11 @@
|
|
|
15
14
|
* received would be worse than none.
|
|
16
15
|
*/
|
|
17
16
|
export declare const NoSessionReason: {
|
|
17
|
+
/**
|
|
18
|
+
* A page dialled and was REFUSED on its pairing token. The only positive evidence in the set:
|
|
19
|
+
* only an SDK dials the bridge, so the app is running and instrumented and this daemon said no.
|
|
20
|
+
*/
|
|
21
|
+
readonly AUTH_REFUSED: "auth_refused";
|
|
18
22
|
/** Connected before; the session that went was a pooled lease that aged out. */
|
|
19
23
|
readonly LEASE_EXPIRED: "lease_expired";
|
|
20
24
|
/** Connected before; the tab was closed, navigated away, or hard-reloaded. */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WHY an install has produced no session — the closed vocabulary, on its own.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* by `explainNoSession`, the session manager and the refusal reporter alike.
|
|
4
|
+
* `telemetry.ts` is the wire contract; this is the taxonomy the no-session DIAGNOSIS owns, read by
|
|
5
|
+
* `explainNoSession`, the session manager and the refusal reporter alike.
|
|
7
6
|
*
|
|
8
7
|
* `no_session` is the largest refusal cohort, and on its own it is a set difference: the daemon
|
|
9
8
|
* started, no app connected, and nothing says which of several opposite situations that was.
|
|
@@ -15,6 +14,11 @@
|
|
|
15
14
|
* received would be worse than none.
|
|
16
15
|
*/
|
|
17
16
|
export const NoSessionReason = {
|
|
17
|
+
/**
|
|
18
|
+
* A page dialled and was REFUSED on its pairing token. The only positive evidence in the set:
|
|
19
|
+
* only an SDK dials the bridge, so the app is running and instrumented and this daemon said no.
|
|
20
|
+
*/
|
|
21
|
+
AUTH_REFUSED: 'auth_refused',
|
|
18
22
|
/** Connected before; the session that went was a pooled lease that aged out. */
|
|
19
23
|
LEASE_EXPIRED: 'lease_expired',
|
|
20
24
|
/** Connected before; the tab was closed, navigated away, or hard-reloaded. */
|
|
@@ -122,13 +122,11 @@ export declare const LEASE_IS_INVISIBLE_NOTE = "note that a lease is a SEPARATE
|
|
|
122
122
|
/**
|
|
123
123
|
* A DESKTOP window that has gone to the background, which is a different problem with a different fix.
|
|
124
124
|
*
|
|
125
|
-
* The web answer — acquire a lease, or run `reticle drive <url>` — is unavailable here and saying
|
|
126
|
-
* is worse than saying nothing
|
|
127
|
-
* window IS the client,
|
|
128
|
-
* no main process, no preload and no Rust commands.
|
|
129
|
-
*
|
|
130
|
-
* one thing that could not be done — while the thing that works, bringing the window forward, went
|
|
131
|
-
* unsaid.
|
|
125
|
+
* The web answer — acquire a lease, or run `reticle drive <url>` — is unavailable here, and saying
|
|
126
|
+
* it is worse than saying nothing: a lease opens a headless BROWSER context, while an Electron or
|
|
127
|
+
* Tauri app's window IS the client, so a browser pointed at the same dev-server URL is a different
|
|
128
|
+
* program with no main process, no preload and no Rust commands. The thing that works is bringing
|
|
129
|
+
* the window forward.
|
|
132
130
|
*
|
|
133
131
|
* No `reticle_lease` and no `reticle drive` in this sentence, deliberately. Both are checked by test.
|
|
134
132
|
*/
|
|
@@ -141,11 +139,9 @@ export declare const HIDDEN_TAB_RECOMMENDATION: string;
|
|
|
141
139
|
* stale only means no health heartbeat arrived inside the window. For a tab that is not hidden that
|
|
142
140
|
* usually means nothing worse than a quiet page, and such a tab is very often driveable.
|
|
143
141
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* human could not see. One flag produced advice that cost the product's main trust surface and
|
|
148
|
-
* bought nothing.
|
|
142
|
+
* Treating it as equivalent to hidden costs the drive for nothing: a throttled tab routinely takes
|
|
143
|
+
* a sign-in and grades clean net verdicts with no retries, while advice to lease sends the agent
|
|
144
|
+
* into a context the watching human cannot see.
|
|
149
145
|
*
|
|
150
146
|
* So this reports the uncertainty honestly — it MAY be slow, timing-sensitive work is what suffers —
|
|
151
147
|
* and offers the precise instrument for that (`refuseWhenThrottled`) rather than a different
|
|
@@ -132,13 +132,11 @@ export const LEASE_IS_INVISIBLE_NOTE = 'note that a lease is a SEPARATE context:
|
|
|
132
132
|
/**
|
|
133
133
|
* A DESKTOP window that has gone to the background, which is a different problem with a different fix.
|
|
134
134
|
*
|
|
135
|
-
* The web answer — acquire a lease, or run `reticle drive <url>` — is unavailable here and saying
|
|
136
|
-
* is worse than saying nothing
|
|
137
|
-
* window IS the client,
|
|
138
|
-
* no main process, no preload and no Rust commands.
|
|
139
|
-
*
|
|
140
|
-
* one thing that could not be done — while the thing that works, bringing the window forward, went
|
|
141
|
-
* unsaid.
|
|
135
|
+
* The web answer — acquire a lease, or run `reticle drive <url>` — is unavailable here, and saying
|
|
136
|
+
* it is worse than saying nothing: a lease opens a headless BROWSER context, while an Electron or
|
|
137
|
+
* Tauri app's window IS the client, so a browser pointed at the same dev-server URL is a different
|
|
138
|
+
* program with no main process, no preload and no Rust commands. The thing that works is bringing
|
|
139
|
+
* the window forward.
|
|
142
140
|
*
|
|
143
141
|
* No `reticle_lease` and no `reticle drive` in this sentence, deliberately. Both are checked by test.
|
|
144
142
|
*/
|
|
@@ -152,11 +150,9 @@ export const HIDDEN_TAB_RECOMMENDATION = 'tab hidden and may be un-focusable fro
|
|
|
152
150
|
* stale only means no health heartbeat arrived inside the window. For a tab that is not hidden that
|
|
153
151
|
* usually means nothing worse than a quiet page, and such a tab is very often driveable.
|
|
154
152
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* human could not see. One flag produced advice that cost the product's main trust surface and
|
|
159
|
-
* bought nothing.
|
|
153
|
+
* Treating it as equivalent to hidden costs the drive for nothing: a throttled tab routinely takes
|
|
154
|
+
* a sign-in and grades clean net verdicts with no retries, while advice to lease sends the agent
|
|
155
|
+
* into a context the watching human cannot see.
|
|
160
156
|
*
|
|
161
157
|
* So this reports the uncertainty honestly — it MAY be slow, timing-sensitive work is what suffers —
|
|
162
158
|
* and offers the precise instrument for that (`refuseWhenThrottled`) rather than a different
|