@reticlehq/core 3.8.0 → 3.8.2
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/drive-script.d.ts +84 -1217
- package/dist/artifacts/drive-script.js +1 -1
- package/dist/artifacts/flow-expect-flat.d.ts +8 -192
- package/dist/artifacts/flow-expect-flat.js +2 -2
- package/dist/artifacts/flow-results.d.ts +15 -0
- package/dist/artifacts/flow-types.d.ts +202 -2331
- package/dist/artifacts/flow-types.js +2 -2
- package/dist/artifacts/harness-map.d.ts +8 -69
- package/dist/artifacts/harness-map.js +1 -1
- package/dist/artifacts/hud-notices.d.ts +8 -82
- package/dist/artifacts/hud-notices.js +1 -1
- package/dist/artifacts/impact.d.ts +80 -1638
- package/dist/artifacts/impact.js +4 -4
- package/dist/artifacts/journal.d.ts +12 -247
- package/dist/artifacts/journal.js +2 -2
- package/dist/artifacts/prompt-context.d.ts +5 -43
- package/dist/artifacts/prompt-context.js +1 -1
- package/dist/artifacts/screenshot-upload.d.ts +3 -26
- package/dist/artifacts/screenshot-upload.js +1 -1
- package/dist/hooks/hook-events.d.ts +15 -171
- package/dist/hooks/hook-events.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/onboarding.d.ts +8 -58
- package/dist/onboarding.js +1 -1
- package/dist/registry/daemon-registry.d.ts +2 -14
- package/dist/registry/daemon-registry.js +1 -1
- package/dist/registry/dev-server-registry.d.ts +2 -31
- package/dist/registry/dev-server-registry.js +1 -1
- package/dist/registry/project-registry.d.ts +4 -32
- package/dist/registry/project-registry.js +1 -1
- package/dist/schema/command-message.json +65 -68
- package/dist/schema/command-name.json +29 -33
- package/dist/schema/command-result.json +25 -30
- package/dist/schema/event-message.json +104 -103
- package/dist/schema/event-payloads.json +142 -119
- package/dist/schema/event-type.json +47 -50
- package/dist/schema/hello-message.json +150 -154
- package/dist/schema/reticle-event.json +98 -96
- package/dist/schema/reticle-message.json +338 -333
- package/dist/telemetry-bug.d.ts +4 -75
- package/dist/telemetry-bug.js +1 -1
- package/dist/telemetry-feedback.d.ts +11 -99
- package/dist/telemetry-feedback.js +1 -1
- package/dist/telemetry-refusal.d.ts +4 -31
- package/dist/telemetry-refusal.js +1 -1
- package/dist/telemetry-session.d.ts +39 -633
- package/dist/telemetry-session.js +10 -8
- package/dist/telemetry-signals.d.ts +58 -151
- package/dist/telemetry-signals.js +12 -1
- package/dist/telemetry.d.ts +137 -1814
- package/dist/telemetry.js +1 -1
- package/dist/verdict/compare-source.d.ts +1 -1
- package/dist/verdict/compare-source.js +1 -1
- package/dist/verdict/disparity.d.ts +8 -56
- package/dist/verdict/disparity.js +1 -1
- package/dist/verdict/instrumentation-coverage.d.ts +3 -3
- package/dist/verdict/instrumentation-coverage.js +1 -1
- package/dist/verdict/instrumentation-gap.d.ts +3 -10
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +25 -224
- package/dist/verdict/intent.js +1 -1
- package/dist/verdict/predicate.d.ts +1 -1
- package/dist/verdict/predicate.js +5 -5
- package/dist/verdict/property-assertion.d.ts +23 -101
- package/dist/verdict/property-assertion.js +1 -1
- package/dist/verdict/run-report.d.ts +13 -108
- package/dist/verdict/run-report.js +1 -1
- package/dist/verdict/security.d.ts +12 -0
- package/dist/verdict/security.js +94 -7
- package/dist/verdict/verification-run.d.ts +112 -1668
- package/dist/verdict/verification-run.js +4 -4
- package/dist/verdict/verify-progress.d.ts +22 -64
- package/dist/verdict/verify-progress.js +1 -1
- package/dist/wire/click-input.d.ts +15 -0
- package/dist/wire/click-input.js +42 -0
- package/dist/wire/constants/event-types.d.ts +2 -0
- package/dist/wire/constants/event-types.js +2 -0
- package/dist/wire/constants/response-body-reason.d.ts +4 -4
- package/dist/wire/constants/response-body-reason.js +4 -4
- package/dist/wire/constants/reticle-env.d.ts +2 -0
- package/dist/wire/constants/reticle-env.js +2 -0
- package/dist/wire/event-payloads.d.ts +108 -678
- package/dist/wire/event-payloads.js +24 -7
- package/dist/wire/event-priority.js +1 -0
- package/dist/wire/messages.d.ts +66 -755
- package/dist/wire/messages.js +3 -3
- package/dist/wire/next-step.d.ts +11 -51
- package/dist/wire/next-step.js +1 -1
- package/dist/wire/platform-link.js +2 -2
- package/dist/wire/production/production-policy.d.ts +37 -83
- package/dist/wire/production/production-policy.js +1 -1
- package/dist/wire/types.d.ts +75 -698
- package/dist/wire/types.js +5 -5
- package/dist/words/upgrade.d.ts +3 -13
- package/dist/words/upgrade.js +1 -1
- package/package.json +4 -5
package/dist/wire/messages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { HudPanel, HudPromptSurface, HudToggle, HudView } from './constants/hud-use.js';
|
|
3
3
|
import { EventAttribution, EventType, RETICLE_MIN_PROTOCOL_VERSION, RETICLE_PROTOCOL_VERSION, MessageKind, TRANSPORT_LIMITS, } from './constants/constants.js';
|
|
4
4
|
import { HumanControlKind, MarkAnchorStrategy } from './constants/session-constants.js';
|
|
@@ -108,7 +108,7 @@ export const ReticleEventSchema = z.object({
|
|
|
108
108
|
*/
|
|
109
109
|
editEpoch: z.number().int().min(NO_EDITS_OBSERVED).optional(),
|
|
110
110
|
/** Event-type-specific payload. Kept open here; refined per observer at the edges. */
|
|
111
|
-
data: z.record(z.unknown()).default({}),
|
|
111
|
+
data: z.record(z.string(), z.unknown()).default({}),
|
|
112
112
|
});
|
|
113
113
|
/** Browser announces itself to the bridge on connect. */
|
|
114
114
|
export const HelloMessageSchema = z.object({
|
|
@@ -276,7 +276,7 @@ export const CommandMessageSchema = z.object({
|
|
|
276
276
|
id: z.string().min(1).max(TRANSPORT_LIMITS.MAX_COMMAND_ID_LENGTH),
|
|
277
277
|
sessionId: sessionIdSchema.optional(),
|
|
278
278
|
name: z.string().min(1).max(TRANSPORT_LIMITS.MAX_COMMAND_NAME_LENGTH),
|
|
279
|
-
args: z.record(z.unknown()).default({}),
|
|
279
|
+
args: z.record(z.string(), z.unknown()).default({}),
|
|
280
280
|
/** Set when the Harness sent it, so the HUD can say who is driving. */
|
|
281
281
|
by: z.nativeEnum(CommandActor).optional(),
|
|
282
282
|
/**
|
package/dist/wire/next-step.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* wrote its own, the Harness refusal said `reticle connect` and the recovery beside it said
|
|
6
6
|
* `npx @reticlehq/server connect`: two spellings of one command, in one answer.
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import * as z from 'zod';
|
|
9
9
|
/** The command that signs a person in and links a project. The docs spell it this way. */
|
|
10
10
|
export declare const CONNECT_COMMAND = "reticle connect";
|
|
11
11
|
/** The refusals that say what to do next as data rather than in a sentence. */
|
|
@@ -19,67 +19,27 @@ export declare const NextWho: {
|
|
|
19
19
|
readonly HUMAN: "human";
|
|
20
20
|
readonly AGENT: "agent";
|
|
21
21
|
};
|
|
22
|
-
export declare const NextStepSchema: z.ZodDiscriminatedUnion<
|
|
22
|
+
export declare const NextStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
23
|
who: z.ZodLiteral<"human">;
|
|
24
24
|
run: z.ZodString;
|
|
25
|
-
},
|
|
26
|
-
who: "human";
|
|
27
|
-
run: string;
|
|
28
|
-
}, {
|
|
29
|
-
who: "human";
|
|
30
|
-
run: string;
|
|
31
|
-
}>, z.ZodObject<{
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
26
|
who: z.ZodLiteral<"agent">;
|
|
33
27
|
tool: z.ZodString;
|
|
34
|
-
},
|
|
35
|
-
tool: string;
|
|
36
|
-
who: "agent";
|
|
37
|
-
}, {
|
|
38
|
-
tool: string;
|
|
39
|
-
who: "agent";
|
|
40
|
-
}>]>;
|
|
28
|
+
}, z.core.$strip>], "who">;
|
|
41
29
|
export type NextStep = z.infer<typeof NextStepSchema>;
|
|
42
30
|
/** A coded refusal, as it rides on a tool's error envelope beside `error`. */
|
|
43
31
|
export declare const CodedRefusalSchema: z.ZodObject<{
|
|
44
|
-
code: z.ZodEnum<
|
|
45
|
-
|
|
32
|
+
code: z.ZodEnum<{
|
|
33
|
+
harness_not_linked: "harness_not_linked";
|
|
34
|
+
}>;
|
|
35
|
+
next: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
36
|
who: z.ZodLiteral<"human">;
|
|
47
37
|
run: z.ZodString;
|
|
48
|
-
},
|
|
49
|
-
who: "human";
|
|
50
|
-
run: string;
|
|
51
|
-
}, {
|
|
52
|
-
who: "human";
|
|
53
|
-
run: string;
|
|
54
|
-
}>, z.ZodObject<{
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
39
|
who: z.ZodLiteral<"agent">;
|
|
56
40
|
tool: z.ZodString;
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
who: "agent";
|
|
60
|
-
}, {
|
|
61
|
-
tool: string;
|
|
62
|
-
who: "agent";
|
|
63
|
-
}>]>, "many">;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
code: "harness_not_linked";
|
|
66
|
-
next: ({
|
|
67
|
-
who: "human";
|
|
68
|
-
run: string;
|
|
69
|
-
} | {
|
|
70
|
-
tool: string;
|
|
71
|
-
who: "agent";
|
|
72
|
-
})[];
|
|
73
|
-
}, {
|
|
74
|
-
code: "harness_not_linked";
|
|
75
|
-
next: ({
|
|
76
|
-
who: "human";
|
|
77
|
-
run: string;
|
|
78
|
-
} | {
|
|
79
|
-
tool: string;
|
|
80
|
-
who: "agent";
|
|
81
|
-
})[];
|
|
82
|
-
}>;
|
|
41
|
+
}, z.core.$strip>], "who">>;
|
|
42
|
+
}, z.core.$strip>;
|
|
83
43
|
export type CodedRefusal = z.infer<typeof CodedRefusalSchema>;
|
|
84
44
|
/** Not linked: the person connects, or the agent drives the journey itself. */
|
|
85
45
|
export declare const HARNESS_NOT_LINKED_NEXT: readonly NextStep[];
|
package/dist/wire/next-step.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* wrote its own, the Harness refusal said `reticle connect` and the recovery beside it said
|
|
6
6
|
* `npx @reticlehq/server connect`: two spellings of one command, in one answer.
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import * as z from 'zod';
|
|
9
9
|
import { ReticleTool } from './tool-names.js';
|
|
10
10
|
/** The command that signs a person in and links a project. The docs spell it this way. */
|
|
11
11
|
export const CONNECT_COMMAND = 'reticle connect';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Every arrow points out from the daemon: it asks, the platform answers. Nothing listens for the
|
|
19
19
|
* platform on the person's machine.
|
|
20
20
|
*/
|
|
21
|
-
import
|
|
21
|
+
import * as z from 'zod';
|
|
22
22
|
import { HudVisibility } from './constants/hud-use.js';
|
|
23
23
|
/** Bumped only for a change an older reader would MISREAD. A new field is not one. */
|
|
24
24
|
export const PLATFORM_LINK_VERSION = 1;
|
|
@@ -130,7 +130,7 @@ export const sessionAskRetryable = (status) => 500 <= status || 429 === status |
|
|
|
130
130
|
const SessionCallSchema = z.object({
|
|
131
131
|
seq: z.number().int().nonnegative(),
|
|
132
132
|
tool: z.string().min(1).max(100),
|
|
133
|
-
args: z.record(z.unknown()).default({}),
|
|
133
|
+
args: z.record(z.string(), z.unknown()).default({}),
|
|
134
134
|
});
|
|
135
135
|
/**
|
|
136
136
|
* Read the platform's answer. Never throws: an answer that does not read is "done", because a drive
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* The production action policy: what a drive on a live site may not do unless its intent says so.
|
|
4
4
|
*
|
|
@@ -30,32 +30,30 @@ export type LiftableProductionRule = (typeof LIFTABLE_PRODUCTION_RULES)[number];
|
|
|
30
30
|
* case-insensitively anywhere in the URL's pathname).
|
|
31
31
|
*/
|
|
32
32
|
export declare const ProductionPolicyEntrySchema: z.ZodObject<{
|
|
33
|
-
rule: z.ZodEnum<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}>;
|
|
33
|
+
rule: z.ZodEnum<{
|
|
34
|
+
"payment or checkout": "payment or checkout";
|
|
35
|
+
"delete a workspace or project": "delete a workspace or project";
|
|
36
|
+
"revoke or rotate a key": "revoke or rotate a key";
|
|
37
|
+
"send an invite or email": "send an invite or email";
|
|
38
|
+
"cancel a subscription": "cancel a subscription";
|
|
39
|
+
"change a member's role": "change a member's role";
|
|
40
|
+
}>;
|
|
41
|
+
methods: z.ZodArray<z.ZodString>;
|
|
42
|
+
path: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
45
44
|
export type ProductionPolicyEntry = z.infer<typeof ProductionPolicyEntrySchema>;
|
|
46
45
|
export declare const ProductionPolicySchema: z.ZodArray<z.ZodObject<{
|
|
47
|
-
rule: z.ZodEnum<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}>, "many">;
|
|
46
|
+
rule: z.ZodEnum<{
|
|
47
|
+
"payment or checkout": "payment or checkout";
|
|
48
|
+
"delete a workspace or project": "delete a workspace or project";
|
|
49
|
+
"revoke or rotate a key": "revoke or rotate a key";
|
|
50
|
+
"send an invite or email": "send an invite or email";
|
|
51
|
+
"cancel a subscription": "cancel a subscription";
|
|
52
|
+
"change a member's role": "change a member's role";
|
|
53
|
+
}>;
|
|
54
|
+
methods: z.ZodArray<z.ZodString>;
|
|
55
|
+
path: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
59
57
|
/** The default list: the REST shapes of the six refused actions. A service may send its own. */
|
|
60
58
|
export declare const DEFAULT_PRODUCTION_POLICY: readonly ProductionPolicyEntry[];
|
|
61
59
|
/** What the refusal says. Every refusal is this sentence; nothing is a silent no-op. */
|
|
@@ -65,74 +63,30 @@ export declare const productionRefusal: (rule: ProductionRule) => string;
|
|
|
65
63
|
export declare const PRODUCTION_TICKET_PATH = "/v1/production-mode/tickets";
|
|
66
64
|
export declare const ProductionTicketRequestSchema: z.ZodObject<{
|
|
67
65
|
workspaceId: z.ZodString;
|
|
68
|
-
/** The single-use HELLO token the daemon minted for this drive. */
|
|
69
66
|
nonce: z.ZodString;
|
|
70
|
-
/** The daemon's bridge port. The service puts it in the page's bootstrap and its CSP. */
|
|
71
67
|
bridgePort: z.ZodNumber;
|
|
72
|
-
scope: z.
|
|
68
|
+
scope: z.ZodEnum<{
|
|
73
69
|
readonly OBSERVE: "observe";
|
|
74
70
|
readonly ACT: "act";
|
|
75
71
|
}>;
|
|
76
|
-
/**
|
|
77
|
-
* The site origin the lease opens: the ticket's `origin`. Optional only so an older daemon still
|
|
78
|
-
* gets a ticket; a service that is told it binds the ticket to it rather than guessing.
|
|
79
|
-
*/
|
|
80
72
|
origin: z.ZodOptional<z.ZodString>;
|
|
81
|
-
/**
|
|
82
|
-
* The bridge the page must dial (`ws://127.0.0.1:<port>/reticle` for the daemon's own): the
|
|
83
|
-
* ticket's `bridge`. Optional for the same reason; absent, the service builds it from `bridgePort`.
|
|
84
|
-
*/
|
|
85
73
|
bridge: z.ZodOptional<z.ZodString>;
|
|
86
|
-
},
|
|
87
|
-
scope: "observe" | "act";
|
|
88
|
-
nonce: string;
|
|
89
|
-
workspaceId: string;
|
|
90
|
-
bridgePort: number;
|
|
91
|
-
origin?: string | undefined;
|
|
92
|
-
bridge?: string | undefined;
|
|
93
|
-
}, {
|
|
94
|
-
scope: "observe" | "act";
|
|
95
|
-
nonce: string;
|
|
96
|
-
workspaceId: string;
|
|
97
|
-
bridgePort: number;
|
|
98
|
-
origin?: string | undefined;
|
|
99
|
-
bridge?: string | undefined;
|
|
100
|
-
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
101
75
|
export type ProductionTicketRequest = z.infer<typeof ProductionTicketRequestSchema>;
|
|
102
76
|
export declare const ProductionTicketResponseSchema: z.ZodObject<{
|
|
103
|
-
/** Signed by the service (format: `activation-ticket.ts`). The lease opens `<url>?reticle_activate=<ticket>`. */
|
|
104
77
|
ticket: z.ZodString;
|
|
105
|
-
/** When the ticket must be redeemed by (ISO 8601). Informational. */
|
|
106
78
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
107
|
-
/** The service's own refused requests for this drive. Absent: `DEFAULT_PRODUCTION_POLICY`. */
|
|
108
79
|
policy: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
109
|
-
rule: z.ZodEnum<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
ticket: string;
|
|
123
|
-
expiresAt?: string | undefined;
|
|
124
|
-
policy?: {
|
|
125
|
-
path: string;
|
|
126
|
-
rule: "payment or checkout" | "delete a workspace or project" | "revoke or rotate a key" | "send an invite or email" | "cancel a subscription" | "change a member's role";
|
|
127
|
-
methods: string[];
|
|
128
|
-
}[] | undefined;
|
|
129
|
-
}, {
|
|
130
|
-
ticket: string;
|
|
131
|
-
expiresAt?: string | undefined;
|
|
132
|
-
policy?: {
|
|
133
|
-
path: string;
|
|
134
|
-
rule: "payment or checkout" | "delete a workspace or project" | "revoke or rotate a key" | "send an invite or email" | "cancel a subscription" | "change a member's role";
|
|
135
|
-
methods: string[];
|
|
136
|
-
}[] | undefined;
|
|
137
|
-
}>;
|
|
80
|
+
rule: z.ZodEnum<{
|
|
81
|
+
"payment or checkout": "payment or checkout";
|
|
82
|
+
"delete a workspace or project": "delete a workspace or project";
|
|
83
|
+
"revoke or rotate a key": "revoke or rotate a key";
|
|
84
|
+
"send an invite or email": "send an invite or email";
|
|
85
|
+
"cancel a subscription": "cancel a subscription";
|
|
86
|
+
"change a member's role": "change a member's role";
|
|
87
|
+
}>;
|
|
88
|
+
methods: z.ZodArray<z.ZodString>;
|
|
89
|
+
path: z.ZodString;
|
|
90
|
+
}, z.core.$strip>>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
138
92
|
export type ProductionTicketResponse = z.infer<typeof ProductionTicketResponseSchema>;
|