@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/LICENSE
CHANGED
|
@@ -1,113 +1,202 @@
|
|
|
1
|
-
NOTE: @reticlehq/core is an umbrella package that bundles other Reticle packages.
|
|
2
|
-
The embeddable SDK packages it re-exports are Apache-2.0; the server it
|
|
3
|
-
includes is under the Functional Source License below, which is the most
|
|
4
|
-
restrictive term and therefore governs the bundle. See the root LICENSE for
|
|
5
|
-
the full per-package breakdown.
|
|
6
1
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
You
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Reticle Labs
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/dist/brand.d.ts
CHANGED
|
@@ -6,16 +6,45 @@
|
|
|
6
6
|
* allowed *set*) with type safety for the *values* that travel.
|
|
7
7
|
*
|
|
8
8
|
* Pattern:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* export type RunId = Brand<string, 'RunId'>;
|
|
10
|
+
* export const asRunId = (s: string): RunId => s as RunId; // mint at a trusted/validated boundary
|
|
11
11
|
* The brand is a phantom (erased at runtime) — `RunId` is just a string at runtime, free to serialize.
|
|
12
12
|
* Mint ONLY after validation (e.g. behind a `(s): s is RunId` guard) so a branded value is also a valid
|
|
13
|
-
* one. Zod-validated fields use `z.string
|
|
13
|
+
* one. Zod-validated fields use `z.string.brand<'X'>` instead, so the schema is the single source.
|
|
14
14
|
*/
|
|
15
15
|
declare const brand: unique symbol;
|
|
16
16
|
/** A nominal wrapper: `T` tagged with brand `B`, assignable FROM nowhere except an explicit mint/cast. */
|
|
17
17
|
export type Brand<T, B extends string> = T & {
|
|
18
18
|
readonly [brand]: B;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* A flow name that has passed the path-segment guard.
|
|
22
|
+
*
|
|
23
|
+
* The doc above names this exact hazard — "a plain `string` runId and a `string` flowName are
|
|
24
|
+
* interchangeable to the compiler and get swapped by accident (both feed path helpers!)" — and for a
|
|
25
|
+
* long time only RunId was branded, so the pair the warning describes was half-fixed. `flowPath` and
|
|
26
|
+
* `runPath` sit beside each other and take the same shape; the compiler could not tell them apart.
|
|
27
|
+
*/
|
|
28
|
+
export type FlowName = Brand<string, 'FlowName'>;
|
|
29
|
+
/**
|
|
30
|
+
* A session id that has passed the path-segment guard. Joined straight into journal paths, so the same
|
|
31
|
+
* argument applies. Mint ONLY through the validating guard, never with a bare cast.
|
|
32
|
+
*/
|
|
33
|
+
export type SessionId = Brand<string, 'SessionId'>;
|
|
34
|
+
/**
|
|
35
|
+
* A live element handle (`e42`) minted by the browser's ref registry.
|
|
36
|
+
*
|
|
37
|
+
* The most-passed identifier in the codebase and the one crossing browser↔bridge↔agent most often. The
|
|
38
|
+
* registry keys a plain `Map<string, WeakRef<Element>>`, so handing it a sessionId returns null — a
|
|
39
|
+
* silent miss rather than an error. Branding stops OUR code confusing the two; a ref arriving from the
|
|
40
|
+
* wire is still an untrusted string until the registry resolves it.
|
|
41
|
+
*/
|
|
42
|
+
export type Ref = Brand<string, 'Ref'>;
|
|
43
|
+
/** Mint a Ref — the registry does this when it hands out a handle. */
|
|
44
|
+
export declare const asRef: (value: string) => Ref;
|
|
45
|
+
/** Mint a FlowName — call ONLY behind isValidFlowName, or on a literal in a test. */
|
|
46
|
+
export declare const asFlowName: (value: string) => FlowName;
|
|
47
|
+
/** Mint a SessionId — call ONLY behind isValidSessionId, or on a literal in a test. */
|
|
48
|
+
export declare const asSessionId: (value: string) => SessionId;
|
|
20
49
|
export {};
|
|
21
50
|
//# sourceMappingURL=brand.d.ts.map
|
package/dist/brand.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AAEnC,0GAA0G;AAC1G,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AAEnC,0GAA0G;AAC1G,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEvC,sEAAsE;AACtE,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,KAAG,GAAmB,CAAC;AAE1D,qFAAqF;AACrF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,QAA6B,CAAC;AACzE,uFAAuF;AACvF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,SAA+B,CAAC"}
|
package/dist/brand.js
CHANGED
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
* allowed *set*) with type safety for the *values* that travel.
|
|
7
7
|
*
|
|
8
8
|
* Pattern:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* export type RunId = Brand<string, 'RunId'>;
|
|
10
|
+
* export const asRunId = (s: string): RunId => s as RunId; // mint at a trusted/validated boundary
|
|
11
11
|
* The brand is a phantom (erased at runtime) — `RunId` is just a string at runtime, free to serialize.
|
|
12
12
|
* Mint ONLY after validation (e.g. behind a `(s): s is RunId` guard) so a branded value is also a valid
|
|
13
|
-
* one. Zod-validated fields use `z.string
|
|
13
|
+
* one. Zod-validated fields use `z.string.brand<'X'>` instead, so the schema is the single source.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
/** Mint a Ref — the registry does this when it hands out a handle. */
|
|
16
|
+
export const asRef = (value) => value;
|
|
17
|
+
/** Mint a FlowName — call ONLY behind isValidFlowName, or on a literal in a test. */
|
|
18
|
+
export const asFlowName = (value) => value;
|
|
19
|
+
/** Mint a SessionId — call ONLY behind isValidSessionId, or on a literal in a test. */
|
|
20
|
+
export const asSessionId = (value) => value;
|
|
16
21
|
//# sourceMappingURL=brand.js.map
|
package/dist/brand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiCH,sEAAsE;AACtE,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAO,EAAE,CAAC,KAAY,CAAC;AAE1D,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAa,EAAY,EAAE,CAAC,KAAiB,CAAC;AACzE,uFAAuF;AACvF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAa,EAAE,CAAC,KAAkB,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export declare const ReticleEnv: {
|
|
|
54
54
|
readonly IDLE_SHUTDOWN: "RETICLE_IDLE_SHUTDOWN_MS";
|
|
55
55
|
/** Directory holding the auto-provisioned pairing token. Defaults to ~/.reticle; relocatable for CI. */
|
|
56
56
|
readonly PAIRING_TOKEN_DIR: "RETICLE_PAIRING_TOKEN_DIR";
|
|
57
|
+
/** Force the durable causal journal off (`0`/`false`/`off`) or on (`1`/`true`/`on`); default on. */
|
|
58
|
+
readonly JOURNAL: "RETICLE_JOURNAL";
|
|
57
59
|
};
|
|
58
60
|
/** Hard transport bounds shared by the browser and bridge. */
|
|
59
61
|
export declare const TRANSPORT_LIMITS: {
|
|
@@ -73,6 +75,9 @@ export declare const TRANSPORT_LIMITS: {
|
|
|
73
75
|
readonly MAX_COMMAND_NAME_LENGTH: 128;
|
|
74
76
|
readonly MAX_REF_LENGTH: 128;
|
|
75
77
|
readonly MAX_ERROR_LENGTH: 4096;
|
|
78
|
+
/** Cap on a captured stack trace before it crosses the wire — the console observer and both React
|
|
79
|
+
* error hooks (error-boundary, hydration-error) all truncate to this, so it is one fact. */
|
|
80
|
+
readonly MAX_STACK_LENGTH: 4000;
|
|
76
81
|
readonly MAX_SERIALIZE_DEPTH: 8;
|
|
77
82
|
readonly MAX_COLLECTION_ITEMS: 200;
|
|
78
83
|
readonly MAX_OBJECT_KEYS: 200;
|
|
@@ -84,6 +89,14 @@ export declare const TRANSPORT_LIMITS: {
|
|
|
84
89
|
};
|
|
85
90
|
/** Replacement used when sensitive data is removed before crossing the bridge. */
|
|
86
91
|
export declare const REDACTED_VALUE = "[REDACTED]";
|
|
92
|
+
/**
|
|
93
|
+
* The attribute the build plugin stamps on JSX host elements as `file:line:column`, so the browser SDK
|
|
94
|
+
* and the React adapter can map a DOM node back to its source file (the source-pointer feature, needed
|
|
95
|
+
* on React 19 which dropped _debugSource). Read here by both packages — it was duplicated as a local
|
|
96
|
+
* const in dom/source.ts AND dom/query.ts and inlined as a literal in the React adapter. The stamper
|
|
97
|
+
* (@reticlehq/babel-plugin, separate build tooling) stamps this same literal and MUST match it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const DATA_RETICLE_SOURCE_ATTR = "data-reticle-source";
|
|
87
100
|
/** Explicit opt-in argument required for potentially destructive actions. */
|
|
88
101
|
export declare const DANGEROUS_ACTION_CONFIRM_ARG = "confirmDangerous";
|
|
89
102
|
/** Schema version stamped onto compiled replay programs. */
|
|
@@ -96,13 +109,29 @@ export declare const ReticleDir: {
|
|
|
96
109
|
readonly BASELINES_SUBDIR: "baselines";
|
|
97
110
|
/** cross-run memory — outcomes of past runs (the "did it behave like last time?" file). */
|
|
98
111
|
readonly PROJECT_FILE: "project.json";
|
|
99
|
-
/** opt-in pixel baselines
|
|
112
|
+
/** opt-in pixel baselines —.reticle/visual/<name>.png + <name>.diff.png. */
|
|
100
113
|
readonly VISUAL_SUBDIR: "visual";
|
|
101
|
-
/** verification-run artifacts
|
|
114
|
+
/** verification-run artifacts —.reticle/runs/<runId>.json (the OEM/CI-consumable verdict). */
|
|
102
115
|
readonly RUNS_SUBDIR: "runs";
|
|
116
|
+
/** fail-to-pass bug capsules —.reticle/capsules/<id>.json (a minimal failing flow + its evidence). */
|
|
117
|
+
readonly CAPSULES_SUBDIR: "capsules";
|
|
118
|
+
/** durable causal journal —.reticle/sessions/<id>/{events,actions}.jsonl (the substrate). */
|
|
119
|
+
readonly SESSIONS_SUBDIR: "sessions";
|
|
120
|
+
/** append-only event ledger inside a session dir (one ReticleEvent per line). */
|
|
121
|
+
readonly JOURNAL_EVENTS_FILE: "events.jsonl";
|
|
122
|
+
/** append-only action ledger inside a session dir (one JournalAction per line). */
|
|
123
|
+
readonly JOURNAL_ACTIONS_FILE: "actions.jsonl";
|
|
124
|
+
/** learned expected-envelopes per route, accumulated across runs (the deviation-report baseline). */
|
|
125
|
+
readonly ENVELOPES_FILE: "envelopes.json";
|
|
126
|
+
/** learned ambient (action-less churn) region map — excluded from settle/summaries/envelopes. */
|
|
127
|
+
readonly AMBIENT_FILE: "ambient.json";
|
|
128
|
+
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
129
|
+
readonly FLAKE_FILE: "flake.json";
|
|
130
|
+
/** Per-flow assertion tiers recorded on each PASSING replay — the gate's anti-downgrade baseline. */
|
|
131
|
+
readonly TIERS_FILE: "assertion-tiers.json";
|
|
103
132
|
/**
|
|
104
133
|
* Auto-provisioned bridge pairing token, stored at ~/.reticle/pairing-token (mode 0600). Written by
|
|
105
|
-
* the daemon, read Node-side by the build plugins to inject into connect
|
|
134
|
+
* the daemon, read Node-side by the build plugins to inject into connect. A browser sandbox cannot
|
|
106
135
|
* read it, so a rogue localhost app can't present it — that's what stops cross-app session hijack.
|
|
107
136
|
*/
|
|
108
137
|
readonly PAIRING_TOKEN_FILE: "pairing-token";
|
|
@@ -150,6 +179,10 @@ export declare const CRAWL_DEFAULTS: {
|
|
|
150
179
|
/** HTTP status at/above which a response counts as a failed request. */
|
|
151
180
|
readonly FAILED_STATUS: 400;
|
|
152
181
|
};
|
|
182
|
+
/** Default max wait for reticle_assert / reticle_wait_for / reticle_act_and_wait when the caller gives
|
|
183
|
+
* no `timeout_ms`. One fact, shared by the server tools and the @reticlehq/test matchers so the test
|
|
184
|
+
* package's assumption can't silently diverge from the server default. */
|
|
185
|
+
export declare const DEFAULT_ASSERT_TIMEOUT_MS = 4000;
|
|
153
186
|
/** How long to wait between npm registry update checks (24 h). */
|
|
154
187
|
export declare const UpdateCheckIntervalMs: number;
|
|
155
188
|
/** Schema version stamped into contract.json so a reader can reject/upgrade old files. */
|
|
@@ -186,21 +219,48 @@ export declare const EventType: {
|
|
|
186
219
|
readonly CONSOLE_LOG: "console.log";
|
|
187
220
|
readonly CONSOLE_WARN: "console.warn";
|
|
188
221
|
readonly CONSOLE_ERROR: "console.error";
|
|
222
|
+
readonly CONSOLE_INFO: "console.info";
|
|
223
|
+
readonly CONSOLE_DEBUG: "console.debug";
|
|
189
224
|
readonly ERROR_UNCAUGHT: "error.uncaught";
|
|
190
225
|
readonly VISIBLE_SHOWN: "visible.shown";
|
|
191
|
-
readonly VISIBLE_HIDDEN: "visible.hidden";
|
|
192
226
|
readonly ANIM_START: "anim.start";
|
|
193
227
|
readonly ANIM_END: "anim.end";
|
|
194
228
|
readonly SCROLL_POSITION: "scroll.position";
|
|
195
229
|
readonly REVEAL_SHOWN: "reveal.shown";
|
|
196
230
|
readonly SIGNAL: "signal";
|
|
197
231
|
readonly STATE_CHANGE: "state.change";
|
|
232
|
+
/** a write to localStorage/sessionStorage/cookies — `data: { area, key, old?, new? }` (values redacted). */
|
|
233
|
+
readonly STORAGE_CHANGE: "storage.change";
|
|
198
234
|
/** page-level visibility/focus health (distinct from element-level VISIBLE_*). */
|
|
199
235
|
readonly PAGE_HEALTH: "page.health";
|
|
236
|
+
/** aggregated React commits over a throttle window (dev builds) — `data: { commits }`. Commit storms /
|
|
237
|
+
* wasted re-renders show up here without a per-render flood. */
|
|
238
|
+
readonly RENDER_COMMIT: "render.commit";
|
|
239
|
+
/** element focus moved — `data: { to, from, toBody }`. Focus dropping to body after an act is a regression. */
|
|
240
|
+
readonly FOCUS_CHANGE: "focus.change";
|
|
200
241
|
/** browser → bridge: a human recording compiled in-page. */
|
|
201
242
|
readonly FLOW_RECORDED: "flow.recorded";
|
|
202
243
|
/** synthetic: browser transport queue overflowed; events were dropped. `data: { dropped: number }`. */
|
|
203
244
|
readonly TRANSPORT_OVERFLOW: "transport.overflow";
|
|
245
|
+
/**
|
|
246
|
+
* synthetic: a per-channel cap truncated a batch (e.g. a DOM mutation flood). `data: { channel, dropped }`.
|
|
247
|
+
* Marks downstream rollups/envelopes as built on incomplete data — a ledger that lies at scale is worse
|
|
248
|
+
* than no ledger, so truncation is never silent.
|
|
249
|
+
*/
|
|
250
|
+
readonly TRUNCATED: "truncated";
|
|
251
|
+
/**
|
|
252
|
+
* synthetic: the SDK detected a region it CANNOT observe (a cross-origin iframe, a closed shadow root).
|
|
253
|
+
* `data: { kind: BlindSpotKind, count }`. Surfaced on results as `coverage: partial` so a green never
|
|
254
|
+
* implies it saw everything.
|
|
255
|
+
*/
|
|
256
|
+
readonly BLIND_SPOT: "blind-spot";
|
|
257
|
+
/**
|
|
258
|
+
* synthetic (driven only): CDP/Playwright-authoritative network detail for a response the in-page
|
|
259
|
+
* fetch/XHR wrapper also saw — full response headers + authoritative status/mimeType the page-side
|
|
260
|
+
* wrapper can't reach. `data: { url, method?, status, headers, resourceType? }`. Merged onto the
|
|
261
|
+
* matching in-page NET_REQUEST so the driven view never loses fidelity to an outside-in tool.
|
|
262
|
+
*/
|
|
263
|
+
readonly NET_DETAIL: "net.detail";
|
|
204
264
|
/**
|
|
205
265
|
* Live-control: browser → bridge. A human acted on the presenter panel.
|
|
206
266
|
* `data: { kind: HumanControlKind; text?: string }`. Rides the existing EventMessage.
|
|
@@ -215,6 +275,81 @@ export declare const EventType: {
|
|
|
215
275
|
readonly HUMAN_MARK: "human.mark";
|
|
216
276
|
};
|
|
217
277
|
export type EventType = (typeof EventType)[keyof typeof EventType];
|
|
278
|
+
/**
|
|
279
|
+
* Named phenomena the perception layer detects deterministically over the journal — capsules and
|
|
280
|
+
* deviation reports lead with these names, not raw events. The library grows in later releases; the
|
|
281
|
+
* mechanism (versioned matchers + evidence templates) lands now.
|
|
282
|
+
*/
|
|
283
|
+
export declare const PhenomenonType: {
|
|
284
|
+
/** An act dispatched but the app did nothing — no DOM/net/route/signal in its window. */
|
|
285
|
+
readonly DEAD_CLICK: "dead-click";
|
|
286
|
+
/** A click landed before hydration attached handlers — a silent no-op. */
|
|
287
|
+
readonly PRE_HYDRATION_CLICK: "pre-hydration-click";
|
|
288
|
+
/** A 5xx response that occurred while the page was hidden — looks fine, isn't. */
|
|
289
|
+
readonly HIDDEN_500: "hidden-500";
|
|
290
|
+
/** A request started and never completed within the window — a hung/in-flight request. */
|
|
291
|
+
readonly HUNG_REQUEST: "hung-request";
|
|
292
|
+
/** A React error boundary caught and swallowed — a fine-looking fallback over a broken feature. */
|
|
293
|
+
readonly SWALLOWED_ERROR: "swallowed-error";
|
|
294
|
+
};
|
|
295
|
+
export type PhenomenonType = (typeof PhenomenonType)[keyof typeof PhenomenonType];
|
|
296
|
+
/** Signal the React adapter fires once hydration commits (handlers attached). Shared browser↔server. */
|
|
297
|
+
export declare const RETICLE_HYDRATION_SIGNAL = "reticle:hydration-complete";
|
|
298
|
+
/**
|
|
299
|
+
* The registered-store name the React adapter uses for render stats, read via reticle_state. It crosses
|
|
300
|
+
* the wire as a store id AND the browser SDK special-cases it as reticle-owned (so it isn't flagged as
|
|
301
|
+
* an unregistered store), so the name is one fact in core — a rename in the adapter must not silently
|
|
302
|
+
* stop the SDK's owned-store matching.
|
|
303
|
+
*/
|
|
304
|
+
export declare const RETICLE_RENDERS_STORE = "__reticle_renders";
|
|
305
|
+
/**
|
|
306
|
+
* Signal the React adapter fires when an error boundary catches (dev-only). Carried on the signal channel
|
|
307
|
+
* (the SDK's public emit surface) so the server sees a boundary that swallowed — the purest "looks fine,
|
|
308
|
+
* isn't", invisible to every other channel. `data: { message, stack?, componentStack? }`.
|
|
309
|
+
*/
|
|
310
|
+
export declare const RETICLE_ERROR_BOUNDARY_SIGNAL = "reticle:error-boundary";
|
|
311
|
+
/**
|
|
312
|
+
* Signal the React adapter fires on a hydration mismatch — server-rendered markup that disagrees with the
|
|
313
|
+
* client's first render. React reports these as *recoverable* errors (`hydrateRoot(el, App,
|
|
314
|
+
* { onRecoverableError })`); a mismatch silently discards the SSR DOM and re-renders on the client, so the
|
|
315
|
+
* page "looks fine" while event handlers, form state, or scroll position were lost — invisible to DOM/
|
|
316
|
+
* network/console. `data: { message, stack?, componentStack? }`.
|
|
317
|
+
*/
|
|
318
|
+
export declare const RETICLE_HYDRATION_ERROR_SIGNAL = "reticle:hydration-error";
|
|
319
|
+
/** The observation channel a TRUNCATED event names, so downstream knows WHICH data is incomplete. */
|
|
320
|
+
export declare const TruncationChannel: {
|
|
321
|
+
readonly DOM: "dom";
|
|
322
|
+
};
|
|
323
|
+
export type TruncationChannel = (typeof TruncationChannel)[keyof typeof TruncationChannel];
|
|
324
|
+
/**
|
|
325
|
+
* A region the SDK cannot see into — surfaced (never hidden) so a result's coverage reads honestly.
|
|
326
|
+
* Crosses the wire in a BLIND_SPOT event's `kind`, so it lives in core (the contract), not the server.
|
|
327
|
+
*/
|
|
328
|
+
export declare const BlindSpotKind: {
|
|
329
|
+
readonly CLOSED_SHADOW_ROOT: "closed-shadow-root";
|
|
330
|
+
readonly CROSS_ORIGIN_IFRAME: "cross-origin-iframe";
|
|
331
|
+
readonly VIRTUALIZED_UNMOUNTED: "virtualized-unmounted";
|
|
332
|
+
/**
|
|
333
|
+
* Something wrapped `fetch` before we did, so the request we record is not necessarily the request
|
|
334
|
+
* that leaves. Wrappers chain outermost-first: anything installed EARLIER sits below us and mutates
|
|
335
|
+
* after we have read `init.body`. An interceptor initialised before connect(), or a polyfill, does
|
|
336
|
+
* exactly that. Unfixable from inside the page — there is no "patch last" primitive — so it is
|
|
337
|
+
* declared instead, and a verdict over it reports partial coverage rather than implying we saw the wire.
|
|
338
|
+
*/
|
|
339
|
+
readonly WRAPPED_NETWORK: "wrapped-network";
|
|
340
|
+
};
|
|
341
|
+
export type BlindSpotKind = (typeof BlindSpotKind)[keyof typeof BlindSpotKind];
|
|
342
|
+
/**
|
|
343
|
+
* How an event was linked to the action it is attributed to. `window` means the SDK stamped the
|
|
344
|
+
* currently-active action's id onto every event observed between that action's dispatch and its
|
|
345
|
+
* settle — a time-window heuristic, not proven dataflow. It is the only tier available until
|
|
346
|
+
* commit-stream linking upgrades it; the label stays on so a chain is never presented as dataflow
|
|
347
|
+
* truth (see plan risk register).
|
|
348
|
+
*/
|
|
349
|
+
export declare const EventAttribution: {
|
|
350
|
+
readonly WINDOW: "window";
|
|
351
|
+
};
|
|
352
|
+
export type EventAttribution = (typeof EventAttribution)[keyof typeof EventAttribution];
|
|
218
353
|
/** The web-perf metrics carried in an EventType.PERF event's `metric` field. */
|
|
219
354
|
export declare const PerfMetric: {
|
|
220
355
|
/** Largest Contentful Paint (ms). */
|
|
@@ -334,7 +469,7 @@ export declare const QueryBy: {
|
|
|
334
469
|
readonly TESTID: "testid";
|
|
335
470
|
readonly ALT: "alt";
|
|
336
471
|
/** Resolve by component identity / source location (auto-anchors — addresses any element with
|
|
337
|
-
* no hand-added testid). Pair with ElementQuery.component and/or
|
|
472
|
+
* no hand-added testid). Pair with ElementQuery.component and/or.source. */
|
|
338
473
|
readonly COMPONENT: "component";
|
|
339
474
|
};
|
|
340
475
|
export type QueryBy = (typeof QueryBy)[keyof typeof QueryBy];
|