@reticlehq/core 2.1.0 → 2.2.1
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/LICENSE +201 -112
- package/NOTICE +5 -0
- package/dist/brand.d.ts +32 -3
- package/dist/brand.d.ts.map +1 -1
- package/dist/brand.js +9 -4
- package/dist/brand.js.map +1 -1
- package/dist/constants.d.ts +140 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +136 -5
- package/dist/constants.js.map +1 -1
- package/dist/daemon-registry.d.ts +5 -5
- package/dist/daemon-registry.d.ts.map +1 -1
- package/dist/daemon-registry.js +5 -5
- package/dist/daemon-registry.js.map +1 -1
- package/dist/event-payloads.d.ts +502 -0
- package/dist/event-payloads.d.ts.map +1 -0
- package/dist/event-payloads.js +138 -0
- package/dist/event-payloads.js.map +1 -0
- package/dist/flow-constants.d.ts +2 -2
- package/dist/flow-constants.js +7 -7
- package/dist/flow-constants.js.map +1 -1
- package/dist/flow-types.d.ts +155 -32
- package/dist/flow-types.d.ts.map +1 -1
- package/dist/flow-types.js +23 -1
- package/dist/flow-types.js.map +1 -1
- package/dist/index.d.ts +20 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/journal.d.ts +90 -0
- package/dist/journal.d.ts.map +1 -0
- package/dist/journal.js +38 -0
- package/dist/journal.js.map +1 -0
- package/dist/messages.d.ts +112 -16
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +15 -2
- package/dist/messages.js.map +1 -1
- package/dist/notices.d.ts +4 -4
- package/dist/notices.js +4 -4
- package/dist/redaction.d.ts +4 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +33 -0
- package/dist/redaction.js.map +1 -0
- package/dist/schema/event-message.json +21 -1
- package/dist/schema/event-type.json +8 -1
- package/dist/schema/reticle-event.json +21 -1
- package/dist/schema/reticle-message.json +21 -1
- package/dist/session-constants.d.ts +2 -2
- package/dist/session-constants.js +2 -2
- package/dist/state-select.d.ts.map +1 -1
- package/dist/state-select.js +21 -5
- package/dist/state-select.js.map +1 -1
- package/dist/telemetry.d.ts +90 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +55 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/toon.d.ts +10 -10
- package/dist/toon.d.ts.map +1 -1
- package/dist/toon.js +34 -18
- package/dist/toon.js.map +1 -1
- package/dist/types.d.ts +70 -12
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -1
- package/dist/upgrade.d.ts +19 -5
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +17 -4
- package/dist/upgrade.js.map +1 -1
- package/dist/verification-run.d.ts +23 -23
- package/dist/verification-run.js +1 -1
- package/package.json +6 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from './brand.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { type AnnotationErrorCode, type AnnotationTarget, ElementState } from './constants.js';
|
|
3
4
|
import type { FlowExpect } from './flow-types.js';
|
|
@@ -22,6 +23,11 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
22
23
|
alt: z.ZodOptional<z.ZodString>;
|
|
23
24
|
/** Component display name (auto-anchor resolution). The nearest enclosing component of the target. */
|
|
24
25
|
component: z.ZodOptional<z.ZodString>;
|
|
26
|
+
/**
|
|
27
|
+
* Attribute names to project onto each match (e.g. `['href']` to inventory links, `['src']` for
|
|
28
|
+
* images). Without this the descriptor carries only semantics, so URLs are unreachable.
|
|
29
|
+
*/
|
|
30
|
+
attrs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
31
|
/** Source location of the target element (auto-anchor resolution) — the precise, granular match. */
|
|
26
32
|
source: z.ZodOptional<z.ZodObject<{
|
|
27
33
|
file: z.ZodString;
|
|
@@ -54,6 +60,7 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
54
60
|
} | undefined;
|
|
55
61
|
name?: string | undefined;
|
|
56
62
|
by?: "testid" | "role" | "component" | "text" | "label" | "placeholder" | "alt" | undefined;
|
|
63
|
+
attrs?: string[] | undefined;
|
|
57
64
|
scope?: string | undefined;
|
|
58
65
|
}, {
|
|
59
66
|
testid?: string | undefined;
|
|
@@ -71,23 +78,64 @@ export declare const ElementQuerySchema: z.ZodObject<{
|
|
|
71
78
|
} | undefined;
|
|
72
79
|
name?: string | undefined;
|
|
73
80
|
by?: "testid" | "role" | "component" | "text" | "label" | "placeholder" | "alt" | undefined;
|
|
81
|
+
attrs?: string[] | undefined;
|
|
74
82
|
scope?: string | undefined;
|
|
75
83
|
}>;
|
|
76
84
|
export type ElementQuery = z.infer<typeof ElementQuerySchema>;
|
|
77
85
|
/** Compact semantic descriptor of one element surfaced to the agent. */
|
|
78
86
|
export interface ElementDescriptor {
|
|
79
|
-
|
|
87
|
+
/** Branded: minted by the browser's ref registry, so it cannot be confused with another id kind. */
|
|
88
|
+
ref: Ref;
|
|
80
89
|
role: string;
|
|
81
90
|
name: string;
|
|
82
91
|
value?: string;
|
|
83
92
|
states: ElementState[];
|
|
84
93
|
visible: boolean;
|
|
85
94
|
text?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Attributes explicitly requested via `ElementQuery.attrs`. Absent attributes are omitted (so
|
|
97
|
+
* "missing" and "present but blank" stay distinguishable) and credential-bearing names are redacted.
|
|
98
|
+
*/
|
|
99
|
+
attrs?: Record<string, string>;
|
|
100
|
+
/**
|
|
101
|
+
* Where this element is written, as `file:line` — the nearest `data-reticle-source` stamped by the
|
|
102
|
+
* build plugin in dev. Absent in production builds and in apps that do not use the plugin, so an
|
|
103
|
+
* agent must treat it as a shortcut rather than a guarantee.
|
|
104
|
+
*
|
|
105
|
+
* A compact string rather than `{file, line}` because a descriptor can repeat hundreds of times in
|
|
106
|
+
* one response and every consumer either opens an editor or prints it.
|
|
107
|
+
*/
|
|
108
|
+
source?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Chart geometry faults found inside this element — PRESENT ONLY WHEN SOMETHING IS WRONG.
|
|
111
|
+
*
|
|
112
|
+
* A chart is the one dashboard surface where the store and the screen diverge invisibly: every
|
|
113
|
+
* other widget renders text a comparison can read, while a chart renders coordinates that a correct
|
|
114
|
+
* `series` can still turn into a blank or NaN-filled path. Reported on the descriptor rather than
|
|
115
|
+
* behind a new tool so it costs nothing to ask for — the agent already queries the chart element,
|
|
116
|
+
* and a healthy chart adds zero bytes because the field is omitted.
|
|
117
|
+
*/
|
|
118
|
+
chart?: ChartFault[];
|
|
119
|
+
}
|
|
120
|
+
/** One chart geometry fault. `kind` is what an agent branches on; `sample` is bounded for the wire. */
|
|
121
|
+
export interface ChartFault {
|
|
122
|
+
kind: 'non-finite-coordinates' | 'empty-geometry' | 'degenerate-geometry';
|
|
123
|
+
tag: string;
|
|
124
|
+
attr: string;
|
|
125
|
+
sample: string;
|
|
86
126
|
}
|
|
87
127
|
export interface MatchResult {
|
|
88
128
|
matched: boolean;
|
|
89
129
|
count: number;
|
|
90
130
|
elements: ElementDescriptor[];
|
|
131
|
+
/**
|
|
132
|
+
* True when a `scope` was given but resolved to nothing (the container was unmounted or the selector
|
|
133
|
+
* matched no element). The search returns zero matches WITHOUT falling back to the whole page, and
|
|
134
|
+
* this flag says why — so "element absent" and "scope vanished" stay distinguishable. Without it, a
|
|
135
|
+
* scoped assertion silently widened to the body (a phantom positive) or read a gone scope as a
|
|
136
|
+
* confirmed absence (a false negative); both are the false-green shape this tool exists to prevent.
|
|
137
|
+
*/
|
|
138
|
+
scopeMissing?: boolean;
|
|
91
139
|
}
|
|
92
140
|
/**
|
|
93
141
|
* A semantic cluster of interactive elements in the DOM — the replacement for the raw testid list
|
|
@@ -117,7 +165,17 @@ export interface QueryEmptyHint {
|
|
|
117
165
|
/** Result of the QUERY command / reticle_query tool. `hint` present ONLY on zero matches. */
|
|
118
166
|
export interface QueryResult {
|
|
119
167
|
elements: ElementDescriptor[];
|
|
168
|
+
/**
|
|
169
|
+
* How many elements MATCHED, which is not the same as how many are in `elements`.
|
|
170
|
+
*
|
|
171
|
+
* Descriptors are expensive to build and the transport caps collections, so beyond a point matches
|
|
172
|
+
* are counted but not described. Reporting the count separately is what keeps "how many are there?"
|
|
173
|
+
* an exact answer instead of a description of the cap.
|
|
174
|
+
*/
|
|
175
|
+
count: number;
|
|
120
176
|
hint?: QueryEmptyHint;
|
|
177
|
+
/** See MatchResult.scopeMissing — a provided scope resolved to nothing; the search did not widen. */
|
|
178
|
+
scopeMissing?: boolean;
|
|
121
179
|
}
|
|
122
180
|
/** One named flow advertised by the app (mirrors the browser CapabilityFlow). */
|
|
123
181
|
export declare const CapabilityFlowSchema: z.ZodObject<{
|
|
@@ -517,8 +575,8 @@ export declare const RunRecordSchema: z.ZodObject<{
|
|
|
517
575
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
518
576
|
}, "strip", z.ZodTypeAny, {
|
|
519
577
|
status: "pass" | "drift" | "error" | "fail";
|
|
520
|
-
at: number;
|
|
521
578
|
kind: "flow_replay" | "manual";
|
|
579
|
+
at: number;
|
|
522
580
|
name: string;
|
|
523
581
|
durationMs?: number | undefined;
|
|
524
582
|
evidence?: {
|
|
@@ -529,8 +587,8 @@ export declare const RunRecordSchema: z.ZodObject<{
|
|
|
529
587
|
summary?: string | undefined;
|
|
530
588
|
}, {
|
|
531
589
|
status: "pass" | "drift" | "error" | "fail";
|
|
532
|
-
at: number;
|
|
533
590
|
kind: "flow_replay" | "manual";
|
|
591
|
+
at: number;
|
|
534
592
|
name: string;
|
|
535
593
|
durationMs?: number | undefined;
|
|
536
594
|
evidence?: {
|
|
@@ -596,8 +654,8 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
596
654
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
597
655
|
}, "strip", z.ZodTypeAny, {
|
|
598
656
|
status: "pass" | "drift" | "error" | "fail";
|
|
599
|
-
at: number;
|
|
600
657
|
kind: "flow_replay" | "manual";
|
|
658
|
+
at: number;
|
|
601
659
|
name: string;
|
|
602
660
|
durationMs?: number | undefined;
|
|
603
661
|
evidence?: {
|
|
@@ -608,8 +666,8 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
608
666
|
summary?: string | undefined;
|
|
609
667
|
}, {
|
|
610
668
|
status: "pass" | "drift" | "error" | "fail";
|
|
611
|
-
at: number;
|
|
612
669
|
kind: "flow_replay" | "manual";
|
|
670
|
+
at: number;
|
|
613
671
|
name: string;
|
|
614
672
|
durationMs?: number | undefined;
|
|
615
673
|
evidence?: {
|
|
@@ -622,8 +680,8 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
622
680
|
}, "strip", z.ZodTypeAny, {
|
|
623
681
|
runs: {
|
|
624
682
|
status: "pass" | "drift" | "error" | "fail";
|
|
625
|
-
at: number;
|
|
626
683
|
kind: "flow_replay" | "manual";
|
|
684
|
+
at: number;
|
|
627
685
|
name: string;
|
|
628
686
|
durationMs?: number | undefined;
|
|
629
687
|
evidence?: {
|
|
@@ -641,8 +699,8 @@ export declare const ProjectFileSchema: z.ZodObject<{
|
|
|
641
699
|
}, {
|
|
642
700
|
runs: {
|
|
643
701
|
status: "pass" | "drift" | "error" | "fail";
|
|
644
|
-
at: number;
|
|
645
702
|
kind: "flow_replay" | "manual";
|
|
703
|
+
at: number;
|
|
646
704
|
name: string;
|
|
647
705
|
durationMs?: number | undefined;
|
|
648
706
|
evidence?: {
|
|
@@ -731,13 +789,13 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
731
789
|
}, "strip", z.ZodTypeAny, {
|
|
732
790
|
status?: number | undefined;
|
|
733
791
|
method?: string | undefined;
|
|
734
|
-
urlContains?: string | undefined;
|
|
735
792
|
count?: number | undefined;
|
|
793
|
+
urlContains?: string | undefined;
|
|
736
794
|
}, {
|
|
737
795
|
status?: number | undefined;
|
|
738
796
|
method?: string | undefined;
|
|
739
|
-
urlContains?: string | undefined;
|
|
740
797
|
count?: number | undefined;
|
|
798
|
+
urlContains?: string | undefined;
|
|
741
799
|
}>>;
|
|
742
800
|
console: z.ZodOptional<z.ZodObject<{
|
|
743
801
|
level: z.ZodOptional<z.ZodString>;
|
|
@@ -756,8 +814,8 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
756
814
|
net?: {
|
|
757
815
|
status?: number | undefined;
|
|
758
816
|
method?: string | undefined;
|
|
759
|
-
urlContains?: string | undefined;
|
|
760
817
|
count?: number | undefined;
|
|
818
|
+
urlContains?: string | undefined;
|
|
761
819
|
} | undefined;
|
|
762
820
|
console?: {
|
|
763
821
|
level?: string | undefined;
|
|
@@ -774,8 +832,8 @@ export declare const AnnotationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
774
832
|
net?: {
|
|
775
833
|
status?: number | undefined;
|
|
776
834
|
method?: string | undefined;
|
|
777
|
-
urlContains?: string | undefined;
|
|
778
835
|
count?: number | undefined;
|
|
836
|
+
urlContains?: string | undefined;
|
|
779
837
|
} | undefined;
|
|
780
838
|
console?: {
|
|
781
839
|
level?: string | undefined;
|
|
@@ -815,7 +873,7 @@ export type AnnotateResult = {
|
|
|
815
873
|
* (success-state). All optional; exactly the fields the compiled kind needs are set.
|
|
816
874
|
*/
|
|
817
875
|
export interface AnnotatePatch {
|
|
818
|
-
/** index of the step whose
|
|
876
|
+
/** index of the step whose.expect is set (assert-signal / assert-visible). */
|
|
819
877
|
stepIndex?: number;
|
|
820
878
|
stepExpect?: FlowExpect;
|
|
821
879
|
/** the testid pushed into flow.dynamic[] (mark-dynamic). */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,KAAK,mBAAm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,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -15,6 +15,11 @@ export const ElementQuerySchema = z.object({
|
|
|
15
15
|
alt: z.string().optional(),
|
|
16
16
|
/** Component display name (auto-anchor resolution). The nearest enclosing component of the target. */
|
|
17
17
|
component: z.string().optional(),
|
|
18
|
+
/**
|
|
19
|
+
* Attribute names to project onto each match (e.g. `['href']` to inventory links, `['src']` for
|
|
20
|
+
* images). Without this the descriptor carries only semantics, so URLs are unreachable.
|
|
21
|
+
*/
|
|
22
|
+
attrs: z.array(z.string()).optional(),
|
|
18
23
|
/** Source location of the target element (auto-anchor resolution) — the precise, granular match. */
|
|
19
24
|
source: z
|
|
20
25
|
.object({ file: z.string(), line: z.number(), column: z.number().optional() })
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EAGd,qBAAqB,EACrB,YAAY,EACZ,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,OA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G;QACpG,mCAAmC;QACnC,OAAO,EAAE,CAAC;aACP,MAAM,CAAC;YACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SAC/B,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;QACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxB,CAAC;CACH,CAAC,CAAC"}
|
package/dist/upgrade.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* the hint is honest about the exact problem the paid tier solves.
|
|
9
9
|
*
|
|
10
10
|
* Design guarantees the emitter must honour (enforced server-side, named here so both ends agree):
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* - one hint per capability per session,
|
|
12
|
+
* - fully silenceable via the env switch below,
|
|
13
|
+
* - the agent's objective never includes "drive upgrades" — it reports a blocker, it does not sell.
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
/** Env switch that silences ALL upgrade hints — respected by the server before any hint is emitted. */
|
|
@@ -32,6 +32,13 @@ export declare const CloudCapability: {
|
|
|
32
32
|
readonly CORPUS_HEAL: "corpus_heal";
|
|
33
33
|
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
34
34
|
readonly CI_GATE: "ci_gate";
|
|
35
|
+
/**
|
|
36
|
+
* Hosted execution — verify a URL on OUR browsers instead of the caller's. This is the axis a local
|
|
37
|
+
* tool structurally cannot serve: CI with no Chromium, background/autonomous agents with no foreground
|
|
38
|
+
* browser, and "verify my deployed staging URL". Without this capability the runner pillar had no name,
|
|
39
|
+
* so a blocked agent could not emit a hint for it at all.
|
|
40
|
+
*/
|
|
41
|
+
readonly HOSTED_RUNNER: "hosted_runner";
|
|
35
42
|
};
|
|
36
43
|
export type CloudCapability = (typeof CloudCapability)[keyof typeof CloudCapability];
|
|
37
44
|
/**
|
|
@@ -51,18 +58,25 @@ export declare const UpgradeHintSchema: z.ZodObject<{
|
|
|
51
58
|
readonly CORPUS_HEAL: "corpus_heal";
|
|
52
59
|
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
53
60
|
readonly CI_GATE: "ci_gate";
|
|
61
|
+
/**
|
|
62
|
+
* Hosted execution — verify a URL on OUR browsers instead of the caller's. This is the axis a local
|
|
63
|
+
* tool structurally cannot serve: CI with no Chromium, background/autonomous agents with no foreground
|
|
64
|
+
* browser, and "verify my deployed staging URL". Without this capability the runner pillar had no name,
|
|
65
|
+
* so a blocked agent could not emit a hint for it at all.
|
|
66
|
+
*/
|
|
67
|
+
readonly HOSTED_RUNNER: "hosted_runner";
|
|
54
68
|
}>;
|
|
55
69
|
reason: z.ZodString;
|
|
56
70
|
unlockedBy: z.ZodString;
|
|
57
71
|
learnMoreUrl: z.ZodString;
|
|
58
72
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate";
|
|
60
73
|
reason: string;
|
|
74
|
+
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate" | "hosted_runner";
|
|
61
75
|
unlockedBy: string;
|
|
62
76
|
learnMoreUrl: string;
|
|
63
77
|
}, {
|
|
64
|
-
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate";
|
|
65
78
|
reason: string;
|
|
79
|
+
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate" | "hosted_runner";
|
|
66
80
|
unlockedBy: string;
|
|
67
81
|
learnMoreUrl: string;
|
|
68
82
|
}>;
|
package/dist/upgrade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.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G,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,WAAW,CAQzE"}
|
package/dist/upgrade.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* the hint is honest about the exact problem the paid tier solves.
|
|
9
9
|
*
|
|
10
10
|
* Design guarantees the emitter must honour (enforced server-side, named here so both ends agree):
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* - one hint per capability per session,
|
|
12
|
+
* - fully silenceable via the env switch below,
|
|
13
|
+
* - the agent's objective never includes "drive upgrades" — it reports a blocker, it does not sell.
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
/** Env switch that silences ALL upgrade hints — respected by the server before any hint is emitted. */
|
|
@@ -32,6 +32,13 @@ export const CloudCapability = {
|
|
|
32
32
|
CORPUS_HEAL: 'corpus_heal',
|
|
33
33
|
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
34
34
|
CI_GATE: 'ci_gate',
|
|
35
|
+
/**
|
|
36
|
+
* Hosted execution — verify a URL on OUR browsers instead of the caller's. This is the axis a local
|
|
37
|
+
* tool structurally cannot serve: CI with no Chromium, background/autonomous agents with no foreground
|
|
38
|
+
* browser, and "verify my deployed staging URL". Without this capability the runner pillar had no name,
|
|
39
|
+
* so a blocked agent could not emit a hint for it at all.
|
|
40
|
+
*/
|
|
41
|
+
HOSTED_RUNNER: 'hosted_runner',
|
|
35
42
|
};
|
|
36
43
|
/**
|
|
37
44
|
* A single, structured hint. `reason` states the blocker as fact; `unlockedBy` names the one action that
|
|
@@ -67,12 +74,18 @@ const COPY_BY_CAPABILITY = {
|
|
|
67
74
|
},
|
|
68
75
|
[CloudCapability.CORPUS_HEAL]: {
|
|
69
76
|
reason: 'Corpus-ranked heal uses refactor outcomes learned across the fleet, served from the cloud.',
|
|
70
|
-
|
|
77
|
+
// Learned intelligence sits above the flat team seat (usage tier) — the copy must not promise it
|
|
78
|
+
// to a team plan that does not include it.
|
|
79
|
+
unlockedBy: 'Enable the hosted heal service on Reticle Cloud.',
|
|
71
80
|
},
|
|
72
81
|
[CloudCapability.CI_GATE]: {
|
|
73
82
|
reason: 'Verify-before-merge is a governance gate that runs in your CI against a hosted policy.',
|
|
74
83
|
unlockedBy: 'Configure the Reticle Cloud CI gate for your repository.',
|
|
75
84
|
},
|
|
85
|
+
[CloudCapability.HOSTED_RUNNER]: {
|
|
86
|
+
reason: 'Verifying without a local browser (CI, a background agent, or a deployed URL) needs a browser we run for you.',
|
|
87
|
+
unlockedBy: 'Link a Reticle Cloud account to run verifications on hosted browsers.',
|
|
88
|
+
},
|
|
76
89
|
};
|
|
77
90
|
/** Build the canonical hint for a capability. Pure — the emitter decides WHEN, this decides WHAT. */
|
|
78
91
|
export function buildUpgradeHint(capability) {
|
package/dist/upgrade.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../src/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uGAAuG;AACvG,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE5D,oGAAoG;AACpG,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,mGAAmG;IACnG,WAAW,EAAE,aAAa;IAC1B,yFAAyF;IACzF,WAAW,EAAE,aAAa;IAC1B,sEAAsE;IACtE,WAAW,EAAE,aAAa;IAC1B,gGAAgG;IAChG,WAAW,EAAE,aAAa;IAC1B,mEAAmE;IACnE,OAAO,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../src/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uGA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,EAAE,yDAAyD;KACtE;IACD,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE;QAC7B,MAAM,EACJ,4FAA4F;QAC9F,iGAAiG;QACjG,2CAA2C;QAC3C,UAAU,EAAE,kDAAkD;KAC/D;IACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE;QACzB,MAAM,EACJ,wFAAwF;QAC1F,UAAU,EAAE,0DAA0D;KACvE;IACD,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE;QAC/B,MAAM,EACJ,+GAA+G;QACjH,UAAU,EAAE,uEAAuE;KACpF;CACF,CAAC;AAEF,qGAAqG;AACrG,MAAM,UAAU,gBAAgB,CAAC,UAA2B;IAC1D,MAAM,IAAI,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO;QACL,UAAU;QACV,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,YAAY,EAAE,oBAAoB;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Conventions match the rest of `@reticlehq/core`: enums are `as const` objects narrowed with
|
|
9
9
|
* `z.nativeEnum`, timestamps are epoch-ms NUMBERS (the clock is injected — never read inside pure
|
|
10
|
-
* logic), no `any` (opaque evidence is `z.unknown
|
|
10
|
+
* logic), no `any` (opaque evidence is `z.unknown`), and every domain string is a named constant.
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
/** Schema version stamped into every run file so a reader can reject/upgrade old artifacts. */
|
|
@@ -215,8 +215,8 @@ export declare const RunFlowResultSchema: z.ZodObject<{
|
|
|
215
215
|
}, "strip", z.ZodTypeAny, {
|
|
216
216
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
217
217
|
name: string;
|
|
218
|
-
steps: number;
|
|
219
218
|
durationMs: number;
|
|
219
|
+
steps: number;
|
|
220
220
|
healed?: {
|
|
221
221
|
from: string;
|
|
222
222
|
to: string;
|
|
@@ -228,8 +228,8 @@ export declare const RunFlowResultSchema: z.ZodObject<{
|
|
|
228
228
|
}, {
|
|
229
229
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
230
230
|
name: string;
|
|
231
|
-
steps: number;
|
|
232
231
|
durationMs: number;
|
|
232
|
+
steps: number;
|
|
233
233
|
healed?: {
|
|
234
234
|
from: string;
|
|
235
235
|
to: string;
|
|
@@ -378,12 +378,12 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
378
378
|
kind: z.ZodString;
|
|
379
379
|
summary: z.ZodString;
|
|
380
380
|
}, "strip", z.ZodTypeAny, {
|
|
381
|
-
at: number;
|
|
382
381
|
kind: string;
|
|
382
|
+
at: number;
|
|
383
383
|
summary: string;
|
|
384
384
|
}, {
|
|
385
|
-
at: number;
|
|
386
385
|
kind: string;
|
|
386
|
+
at: number;
|
|
387
387
|
summary: string;
|
|
388
388
|
}>, "many">>;
|
|
389
389
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -406,8 +406,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
406
406
|
actual?: unknown;
|
|
407
407
|
}[];
|
|
408
408
|
timeline: {
|
|
409
|
-
at: number;
|
|
410
409
|
kind: string;
|
|
410
|
+
at: number;
|
|
411
411
|
summary: string;
|
|
412
412
|
}[];
|
|
413
413
|
}, {
|
|
@@ -430,8 +430,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
430
430
|
actual?: unknown;
|
|
431
431
|
}[] | undefined;
|
|
432
432
|
timeline?: {
|
|
433
|
-
at: number;
|
|
434
433
|
kind: string;
|
|
434
|
+
at: number;
|
|
435
435
|
summary: string;
|
|
436
436
|
}[] | undefined;
|
|
437
437
|
}>;
|
|
@@ -552,13 +552,13 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
552
552
|
name: string;
|
|
553
553
|
framework: "react" | "next" | "vite" | "other";
|
|
554
554
|
commit?: string | undefined;
|
|
555
|
-
env?: "
|
|
555
|
+
env?: "local" | "ci" | "preview" | undefined;
|
|
556
556
|
previewUrl?: string | undefined;
|
|
557
557
|
}, {
|
|
558
558
|
name: string;
|
|
559
559
|
framework: "react" | "next" | "vite" | "other";
|
|
560
560
|
commit?: string | undefined;
|
|
561
|
-
env?: "
|
|
561
|
+
env?: "local" | "ci" | "preview" | undefined;
|
|
562
562
|
previewUrl?: string | undefined;
|
|
563
563
|
}>;
|
|
564
564
|
agent: z.ZodObject<{
|
|
@@ -651,8 +651,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
651
651
|
}, "strip", z.ZodTypeAny, {
|
|
652
652
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
653
653
|
name: string;
|
|
654
|
-
steps: number;
|
|
655
654
|
durationMs: number;
|
|
655
|
+
steps: number;
|
|
656
656
|
healed?: {
|
|
657
657
|
from: string;
|
|
658
658
|
to: string;
|
|
@@ -664,8 +664,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
664
664
|
}, {
|
|
665
665
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
666
666
|
name: string;
|
|
667
|
-
steps: number;
|
|
668
667
|
durationMs: number;
|
|
668
|
+
steps: number;
|
|
669
669
|
healed?: {
|
|
670
670
|
from: string;
|
|
671
671
|
to: string;
|
|
@@ -808,12 +808,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
808
808
|
kind: z.ZodString;
|
|
809
809
|
summary: z.ZodString;
|
|
810
810
|
}, "strip", z.ZodTypeAny, {
|
|
811
|
-
at: number;
|
|
812
811
|
kind: string;
|
|
812
|
+
at: number;
|
|
813
813
|
summary: string;
|
|
814
814
|
}, {
|
|
815
|
-
at: number;
|
|
816
815
|
kind: string;
|
|
816
|
+
at: number;
|
|
817
817
|
summary: string;
|
|
818
818
|
}>, "many">>;
|
|
819
819
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -836,8 +836,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
836
836
|
actual?: unknown;
|
|
837
837
|
}[];
|
|
838
838
|
timeline: {
|
|
839
|
-
at: number;
|
|
840
839
|
kind: string;
|
|
840
|
+
at: number;
|
|
841
841
|
summary: string;
|
|
842
842
|
}[];
|
|
843
843
|
}, {
|
|
@@ -860,8 +860,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
860
860
|
actual?: unknown;
|
|
861
861
|
}[] | undefined;
|
|
862
862
|
timeline?: {
|
|
863
|
-
at: number;
|
|
864
863
|
kind: string;
|
|
864
|
+
at: number;
|
|
865
865
|
summary: string;
|
|
866
866
|
}[] | undefined;
|
|
867
867
|
}>;
|
|
@@ -976,8 +976,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
976
976
|
flows: {
|
|
977
977
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
978
978
|
name: string;
|
|
979
|
-
steps: number;
|
|
980
979
|
durationMs: number;
|
|
980
|
+
steps: number;
|
|
981
981
|
healed?: {
|
|
982
982
|
from: string;
|
|
983
983
|
to: string;
|
|
@@ -987,8 +987,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
987
987
|
evidenceRef?: string | undefined;
|
|
988
988
|
failureReason?: string | undefined;
|
|
989
989
|
}[];
|
|
990
|
-
createdAt: number;
|
|
991
990
|
durationMs: number;
|
|
991
|
+
createdAt: number;
|
|
992
992
|
evidence: {
|
|
993
993
|
consoleErrors: {
|
|
994
994
|
message: string;
|
|
@@ -1009,8 +1009,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1009
1009
|
actual?: unknown;
|
|
1010
1010
|
}[];
|
|
1011
1011
|
timeline: {
|
|
1012
|
-
at: number;
|
|
1013
1012
|
kind: string;
|
|
1013
|
+
at: number;
|
|
1014
1014
|
summary: string;
|
|
1015
1015
|
}[];
|
|
1016
1016
|
};
|
|
@@ -1021,7 +1021,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1021
1021
|
name: string;
|
|
1022
1022
|
framework: "react" | "next" | "vite" | "other";
|
|
1023
1023
|
commit?: string | undefined;
|
|
1024
|
-
env?: "
|
|
1024
|
+
env?: "local" | "ci" | "preview" | undefined;
|
|
1025
1025
|
previewUrl?: string | undefined;
|
|
1026
1026
|
};
|
|
1027
1027
|
agent: {
|
|
@@ -1082,8 +1082,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1082
1082
|
signedAt: number;
|
|
1083
1083
|
} | undefined;
|
|
1084
1084
|
}, {
|
|
1085
|
-
createdAt: number;
|
|
1086
1085
|
durationMs: number;
|
|
1086
|
+
createdAt: number;
|
|
1087
1087
|
evidence: {
|
|
1088
1088
|
consoleErrors?: {
|
|
1089
1089
|
message: string;
|
|
@@ -1104,8 +1104,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1104
1104
|
actual?: unknown;
|
|
1105
1105
|
}[] | undefined;
|
|
1106
1106
|
timeline?: {
|
|
1107
|
-
at: number;
|
|
1108
1107
|
kind: string;
|
|
1108
|
+
at: number;
|
|
1109
1109
|
summary: string;
|
|
1110
1110
|
}[] | undefined;
|
|
1111
1111
|
};
|
|
@@ -1116,7 +1116,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1116
1116
|
name: string;
|
|
1117
1117
|
framework: "react" | "next" | "vite" | "other";
|
|
1118
1118
|
commit?: string | undefined;
|
|
1119
|
-
env?: "
|
|
1119
|
+
env?: "local" | "ci" | "preview" | undefined;
|
|
1120
1120
|
previewUrl?: string | undefined;
|
|
1121
1121
|
};
|
|
1122
1122
|
agent: {
|
|
@@ -1138,8 +1138,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1138
1138
|
flows?: {
|
|
1139
1139
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
1140
1140
|
name: string;
|
|
1141
|
-
steps: number;
|
|
1142
1141
|
durationMs: number;
|
|
1142
|
+
steps: number;
|
|
1143
1143
|
healed?: {
|
|
1144
1144
|
from: string;
|
|
1145
1145
|
to: string;
|
package/dist/verification-run.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Conventions match the rest of `@reticlehq/core`: enums are `as const` objects narrowed with
|
|
9
9
|
* `z.nativeEnum`, timestamps are epoch-ms NUMBERS (the clock is injected — never read inside pure
|
|
10
|
-
* logic), no `any` (opaque evidence is `z.unknown
|
|
10
|
+
* logic), no `any` (opaque evidence is `z.unknown`), and every domain string is a named constant.
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
/** Schema version stamped into every run file so a reader can reject/upgrade old artifacts. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reticlehq/core",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
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",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
35
|
-
"README.md"
|
|
35
|
+
"README.md",
|
|
36
|
+
"NOTICE"
|
|
36
37
|
],
|
|
37
38
|
"sideEffects": false,
|
|
38
39
|
"keywords": [
|
|
@@ -42,6 +43,9 @@
|
|
|
42
43
|
"protocol",
|
|
43
44
|
"reticle"
|
|
44
45
|
],
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=20.0.0"
|
|
48
|
+
},
|
|
45
49
|
"scripts": {
|
|
46
50
|
"build": "tsc -b && node scripts/gen-schema.mjs",
|
|
47
51
|
"typecheck": "tsc -b",
|