@reticlehq/core 3.8.2 → 3.10.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/flow-constants.d.ts +17 -0
- package/dist/artifacts/flow-constants.js +15 -0
- package/dist/artifacts/flow-results.d.ts +27 -2
- package/dist/artifacts/flow-step-tool.d.ts +17 -0
- package/dist/artifacts/flow-step-tool.js +18 -1
- package/dist/artifacts/flow-types.d.ts +59 -0
- package/dist/artifacts/flow-types.js +51 -6
- package/dist/identity/github-action.d.ts +7 -0
- package/dist/identity/github-action.js +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/onboarding.d.ts +60 -0
- package/dist/onboarding.js +35 -0
- package/dist/schema/event-message.json +1 -0
- package/dist/schema/event-payloads.json +47 -1
- package/dist/schema/event-type.json +1 -0
- package/dist/schema/reticle-event.json +1 -0
- package/dist/schema/reticle-message.json +1 -0
- package/dist/telemetry-refusal.d.ts +83 -0
- package/dist/telemetry-refusal.js +56 -0
- package/dist/telemetry-signals.d.ts +132 -0
- package/dist/telemetry-signals.js +68 -0
- package/dist/telemetry.d.ts +89 -4
- package/dist/telemetry.js +5 -3
- package/dist/verdict/findings.d.ts +34 -0
- package/dist/verdict/findings.js +37 -0
- package/dist/verdict/predicate.d.ts +1 -0
- package/dist/verdict/predicate.js +145 -5
- package/dist/verdict/verdict-attribution.js +1 -0
- package/dist/verdict/verified-constants.d.ts +17 -0
- package/dist/verdict/verified-constants.js +17 -0
- package/dist/wire/click-input.d.ts +26 -0
- package/dist/wire/click-input.js +65 -0
- package/dist/wire/constants/animation-command.d.ts +2 -0
- package/dist/wire/constants/animation-command.js +2 -0
- package/dist/wire/constants/console-event.d.ts +44 -0
- package/dist/wire/constants/console-event.js +44 -0
- package/dist/wire/constants/constants.d.ts +45 -0
- package/dist/wire/constants/constants.js +45 -0
- package/dist/wire/constants/determinism.d.ts +17 -0
- package/dist/wire/constants/determinism.js +17 -0
- package/dist/wire/constants/event-types.d.ts +113 -0
- package/dist/wire/constants/event-types.js +87 -0
- package/dist/wire/constants/match-args.d.ts +19 -0
- package/dist/wire/constants/match-args.js +19 -0
- package/dist/wire/constants/reticle-chrome.d.ts +12 -0
- package/dist/wire/constants/reticle-chrome.js +14 -0
- package/dist/wire/constants/session-constants.d.ts +17 -0
- package/dist/wire/constants/session-constants.js +5 -0
- package/dist/wire/event-payloads.d.ts +16 -93
- package/dist/wire/event-payloads.js +26 -72
- package/dist/wire/event-priority.js +1 -0
- package/dist/wire/global-press.d.ts +9 -2
- package/dist/wire/global-press.js +39 -12
- package/dist/wire/messages.d.ts +3 -0
- package/dist/wire/net.d.ts +39 -0
- package/dist/wire/net.js +56 -8
- package/dist/wire/redaction.d.ts +18 -0
- package/dist/wire/redaction.js +72 -0
- package/dist/wire/tool-names.d.ts +4 -0
- package/dist/wire/tool-names.js +4 -0
- package/dist/wire/types.d.ts +31 -0
- package/dist/wire/types.js +10 -0
- package/dist/words/notices.d.ts +10 -0
- package/dist/words/notices.js +19 -0
- package/package.json +1 -1
|
@@ -62,6 +62,13 @@
|
|
|
62
62
|
},
|
|
63
63
|
"initial": {
|
|
64
64
|
"type": "boolean"
|
|
65
|
+
},
|
|
66
|
+
"live": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": [
|
|
69
|
+
"assertive",
|
|
70
|
+
"polite"
|
|
71
|
+
]
|
|
65
72
|
}
|
|
66
73
|
},
|
|
67
74
|
"required": [
|
|
@@ -101,6 +108,9 @@
|
|
|
101
108
|
},
|
|
102
109
|
"requestShape": {
|
|
103
110
|
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"fromDepartedDocument": {
|
|
113
|
+
"type": "boolean"
|
|
104
114
|
}
|
|
105
115
|
},
|
|
106
116
|
"required": [
|
|
@@ -132,6 +142,12 @@
|
|
|
132
142
|
},
|
|
133
143
|
"urlRaw": {
|
|
134
144
|
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"fromDepartedDocument": {
|
|
147
|
+
"type": "boolean"
|
|
148
|
+
},
|
|
149
|
+
"pageUnloaded": {
|
|
150
|
+
"type": "boolean"
|
|
135
151
|
}
|
|
136
152
|
},
|
|
137
153
|
"required": [
|
|
@@ -141,6 +157,29 @@
|
|
|
141
157
|
"initiator"
|
|
142
158
|
]
|
|
143
159
|
},
|
|
160
|
+
"net.unpatched": {
|
|
161
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"url": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
},
|
|
167
|
+
"urlRaw": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"initiator": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"status": {
|
|
174
|
+
"type": "number"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"url",
|
|
179
|
+
"initiator"
|
|
180
|
+
],
|
|
181
|
+
"additionalProperties": {}
|
|
182
|
+
},
|
|
144
183
|
"net.stream": {
|
|
145
184
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
146
185
|
"type": "object",
|
|
@@ -223,6 +262,9 @@
|
|
|
223
262
|
"at": {
|
|
224
263
|
"type": "number"
|
|
225
264
|
},
|
|
265
|
+
"shift": {
|
|
266
|
+
"type": "number"
|
|
267
|
+
},
|
|
226
268
|
"shifted": {
|
|
227
269
|
"type": "object",
|
|
228
270
|
"properties": {
|
|
@@ -717,7 +759,8 @@
|
|
|
717
759
|
"wrapped-network",
|
|
718
760
|
"unobserved-ipc",
|
|
719
761
|
"verdictless-send",
|
|
720
|
-
"unwatched-state"
|
|
762
|
+
"unwatched-state",
|
|
763
|
+
"canvas-paint-unobserved"
|
|
721
764
|
]
|
|
722
765
|
},
|
|
723
766
|
"count": {
|
|
@@ -1046,6 +1089,9 @@
|
|
|
1046
1089
|
"poll",
|
|
1047
1090
|
"act"
|
|
1048
1091
|
]
|
|
1092
|
+
},
|
|
1093
|
+
"visible": {
|
|
1094
|
+
"type": "boolean"
|
|
1049
1095
|
}
|
|
1050
1096
|
},
|
|
1051
1097
|
"required": [
|
|
@@ -34,6 +34,51 @@ export declare const RefusalReason: {
|
|
|
34
34
|
readonly OTHER: "other";
|
|
35
35
|
};
|
|
36
36
|
export type RefusalReason = (typeof RefusalReason)[keyof typeof RefusalReason];
|
|
37
|
+
/**
|
|
38
|
+
* WHICH cause inside a `RefusalReason` bucket, when the server can tell.
|
|
39
|
+
*
|
|
40
|
+
* One member for each entry of `error-recovery.ts`'s recovery table. A missing browser pool has
|
|
41
|
+
* three: no pool, a pool that is shut down, and no Chromium for Playwright. They need different
|
|
42
|
+
* fixes, and `not_ready` alone could not say which one stopped a user. Never the message.
|
|
43
|
+
*/
|
|
44
|
+
export declare const RefusalDetail: {
|
|
45
|
+
readonly NO_SESSION: "no_session";
|
|
46
|
+
readonly MULTIPLE_SESSIONS: "multiple_sessions";
|
|
47
|
+
readonly UNKNOWN_SESSION: "unknown_session";
|
|
48
|
+
readonly SCOPE_MISMATCH: "scope_mismatch";
|
|
49
|
+
readonly SESSION_GONE: "session_gone";
|
|
50
|
+
readonly THROTTLED: "throttled";
|
|
51
|
+
readonly COMMAND_TIMEOUT: "command_timeout";
|
|
52
|
+
/** The daemon has no browser pool: Reticle did not start through `reticle mcp`. */
|
|
53
|
+
readonly POOL_UNAVAILABLE: "pool_unavailable";
|
|
54
|
+
/** The browser pool stopped, because the daemon is shutting down. */
|
|
55
|
+
readonly POOL_SHUT_DOWN: "pool_shut_down";
|
|
56
|
+
/** Playwright has no Chromium installed. */
|
|
57
|
+
readonly CHROMIUM_MISSING: "chromium_missing";
|
|
58
|
+
/** RETICLE_CHROMIUM_PATH names a browser the daemon cannot launch. */
|
|
59
|
+
readonly CHROMIUM_PATH: "chromium_path";
|
|
60
|
+
readonly TOKEN_REQUIRED: "token_required";
|
|
61
|
+
readonly MISSING_BASELINE: "missing_baseline";
|
|
62
|
+
readonly MISSING_RECORDING: "missing_recording";
|
|
63
|
+
readonly STALE_REF: "stale_ref";
|
|
64
|
+
readonly STALE_REF_AFTER_EDIT: "stale_ref_after_edit";
|
|
65
|
+
readonly UNISSUED_REF: "unissued_ref";
|
|
66
|
+
readonly NO_SUCH_OPTION: "no_such_option";
|
|
67
|
+
readonly TARGET_MISSED: "target_missed";
|
|
68
|
+
readonly AMBIGUOUS_TARGET: "ambiguous_target";
|
|
69
|
+
readonly FLOW_STEP_MISSING: "flow_step_missing";
|
|
70
|
+
readonly UNSUPPORTED_SURFACE: "unsupported_surface";
|
|
71
|
+
readonly HOVER_NEEDS_POINTER: "hover_needs_pointer";
|
|
72
|
+
readonly NOT_EDITABLE: "not_editable";
|
|
73
|
+
readonly CONFIRM_DANGEROUS: "confirm_dangerous";
|
|
74
|
+
readonly WRONG_TARGET: "wrong_target";
|
|
75
|
+
readonly PRODUCTION_POLICY: "production_policy";
|
|
76
|
+
readonly BAD_ARGUMENTS: "bad_arguments";
|
|
77
|
+
readonly INVALID_NAME: "invalid_name";
|
|
78
|
+
readonly HARNESS_OFF: "harness_off";
|
|
79
|
+
readonly HARNESS_LOCKED: "harness_locked";
|
|
80
|
+
};
|
|
81
|
+
export type RefusalDetail = (typeof RefusalDetail)[keyof typeof RefusalDetail];
|
|
37
82
|
/** One tool call that could not be served. */
|
|
38
83
|
export declare const ToolRefusalSchema: z.ZodObject<{
|
|
39
84
|
tool: z.ZodString;
|
|
@@ -64,6 +109,44 @@ export declare const ToolRefusalSchema: z.ZodObject<{
|
|
|
64
109
|
readonly NO_CONFIG: "no_config";
|
|
65
110
|
readonly SDK_NOT_REACHING_DAEMON: "sdk_not_reaching_daemon";
|
|
66
111
|
}>>;
|
|
112
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
readonly NO_SESSION: "no_session";
|
|
114
|
+
readonly MULTIPLE_SESSIONS: "multiple_sessions";
|
|
115
|
+
readonly UNKNOWN_SESSION: "unknown_session";
|
|
116
|
+
readonly SCOPE_MISMATCH: "scope_mismatch";
|
|
117
|
+
readonly SESSION_GONE: "session_gone";
|
|
118
|
+
readonly THROTTLED: "throttled";
|
|
119
|
+
readonly COMMAND_TIMEOUT: "command_timeout";
|
|
120
|
+
/** The daemon has no browser pool: Reticle did not start through `reticle mcp`. */
|
|
121
|
+
readonly POOL_UNAVAILABLE: "pool_unavailable";
|
|
122
|
+
/** The browser pool stopped, because the daemon is shutting down. */
|
|
123
|
+
readonly POOL_SHUT_DOWN: "pool_shut_down";
|
|
124
|
+
/** Playwright has no Chromium installed. */
|
|
125
|
+
readonly CHROMIUM_MISSING: "chromium_missing";
|
|
126
|
+
/** RETICLE_CHROMIUM_PATH names a browser the daemon cannot launch. */
|
|
127
|
+
readonly CHROMIUM_PATH: "chromium_path";
|
|
128
|
+
readonly TOKEN_REQUIRED: "token_required";
|
|
129
|
+
readonly MISSING_BASELINE: "missing_baseline";
|
|
130
|
+
readonly MISSING_RECORDING: "missing_recording";
|
|
131
|
+
readonly STALE_REF: "stale_ref";
|
|
132
|
+
readonly STALE_REF_AFTER_EDIT: "stale_ref_after_edit";
|
|
133
|
+
readonly UNISSUED_REF: "unissued_ref";
|
|
134
|
+
readonly NO_SUCH_OPTION: "no_such_option";
|
|
135
|
+
readonly TARGET_MISSED: "target_missed";
|
|
136
|
+
readonly AMBIGUOUS_TARGET: "ambiguous_target";
|
|
137
|
+
readonly FLOW_STEP_MISSING: "flow_step_missing";
|
|
138
|
+
readonly UNSUPPORTED_SURFACE: "unsupported_surface";
|
|
139
|
+
readonly HOVER_NEEDS_POINTER: "hover_needs_pointer";
|
|
140
|
+
readonly NOT_EDITABLE: "not_editable";
|
|
141
|
+
readonly CONFIRM_DANGEROUS: "confirm_dangerous";
|
|
142
|
+
readonly WRONG_TARGET: "wrong_target";
|
|
143
|
+
readonly PRODUCTION_POLICY: "production_policy";
|
|
144
|
+
readonly BAD_ARGUMENTS: "bad_arguments";
|
|
145
|
+
readonly INVALID_NAME: "invalid_name";
|
|
146
|
+
readonly HARNESS_OFF: "harness_off";
|
|
147
|
+
readonly HARNESS_LOCKED: "harness_locked";
|
|
148
|
+
}>>;
|
|
67
149
|
retried: z.ZodBoolean;
|
|
150
|
+
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
151
|
}, z.core.$strip>;
|
|
69
152
|
export type ToolRefusal = z.infer<typeof ToolRefusalSchema>;
|
|
@@ -34,6 +34,50 @@ export const RefusalReason = {
|
|
|
34
34
|
/** A refusal this list does not name. A classifier that cannot say "I don't know" lies instead. */
|
|
35
35
|
OTHER: 'other',
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* WHICH cause inside a `RefusalReason` bucket, when the server can tell.
|
|
39
|
+
*
|
|
40
|
+
* One member for each entry of `error-recovery.ts`'s recovery table. A missing browser pool has
|
|
41
|
+
* three: no pool, a pool that is shut down, and no Chromium for Playwright. They need different
|
|
42
|
+
* fixes, and `not_ready` alone could not say which one stopped a user. Never the message.
|
|
43
|
+
*/
|
|
44
|
+
export const RefusalDetail = {
|
|
45
|
+
NO_SESSION: 'no_session',
|
|
46
|
+
MULTIPLE_SESSIONS: 'multiple_sessions',
|
|
47
|
+
UNKNOWN_SESSION: 'unknown_session',
|
|
48
|
+
SCOPE_MISMATCH: 'scope_mismatch',
|
|
49
|
+
SESSION_GONE: 'session_gone',
|
|
50
|
+
THROTTLED: 'throttled',
|
|
51
|
+
COMMAND_TIMEOUT: 'command_timeout',
|
|
52
|
+
/** The daemon has no browser pool: Reticle did not start through `reticle mcp`. */
|
|
53
|
+
POOL_UNAVAILABLE: 'pool_unavailable',
|
|
54
|
+
/** The browser pool stopped, because the daemon is shutting down. */
|
|
55
|
+
POOL_SHUT_DOWN: 'pool_shut_down',
|
|
56
|
+
/** Playwright has no Chromium installed. */
|
|
57
|
+
CHROMIUM_MISSING: 'chromium_missing',
|
|
58
|
+
/** RETICLE_CHROMIUM_PATH names a browser the daemon cannot launch. */
|
|
59
|
+
CHROMIUM_PATH: 'chromium_path',
|
|
60
|
+
TOKEN_REQUIRED: 'token_required',
|
|
61
|
+
MISSING_BASELINE: 'missing_baseline',
|
|
62
|
+
MISSING_RECORDING: 'missing_recording',
|
|
63
|
+
STALE_REF: 'stale_ref',
|
|
64
|
+
STALE_REF_AFTER_EDIT: 'stale_ref_after_edit',
|
|
65
|
+
UNISSUED_REF: 'unissued_ref',
|
|
66
|
+
NO_SUCH_OPTION: 'no_such_option',
|
|
67
|
+
TARGET_MISSED: 'target_missed',
|
|
68
|
+
AMBIGUOUS_TARGET: 'ambiguous_target',
|
|
69
|
+
FLOW_STEP_MISSING: 'flow_step_missing',
|
|
70
|
+
UNSUPPORTED_SURFACE: 'unsupported_surface',
|
|
71
|
+
HOVER_NEEDS_POINTER: 'hover_needs_pointer',
|
|
72
|
+
NOT_EDITABLE: 'not_editable',
|
|
73
|
+
CONFIRM_DANGEROUS: 'confirm_dangerous',
|
|
74
|
+
WRONG_TARGET: 'wrong_target',
|
|
75
|
+
PRODUCTION_POLICY: 'production_policy',
|
|
76
|
+
BAD_ARGUMENTS: 'bad_arguments',
|
|
77
|
+
INVALID_NAME: 'invalid_name',
|
|
78
|
+
HARNESS_OFF: 'harness_off',
|
|
79
|
+
HARNESS_LOCKED: 'harness_locked',
|
|
80
|
+
};
|
|
37
81
|
/** One tool call that could not be served. */
|
|
38
82
|
export const ToolRefusalSchema = z.object({
|
|
39
83
|
/** Which tool. A name from our own fixed namespace, never app data. */
|
|
@@ -47,6 +91,11 @@ export const ToolRefusalSchema = z.object({
|
|
|
47
91
|
* it cannot carry a reason that does not exist yet. Absent on every other refusal reason.
|
|
48
92
|
*/
|
|
49
93
|
noSessionReason: z.nativeEnum(NoSessionReason).optional(),
|
|
94
|
+
/**
|
|
95
|
+
* WHICH cause inside `reason`, from core's closed `RefusalDetail`. Absent when the recovery table
|
|
96
|
+
* did not recognise the message, and on a refusal that diagnosed itself.
|
|
97
|
+
*/
|
|
98
|
+
detail: z.nativeEnum(RefusalDetail).optional(),
|
|
50
99
|
/**
|
|
51
100
|
* TRUE when the call immediately before this one was the SAME tool, also refused.
|
|
52
101
|
*
|
|
@@ -57,4 +106,11 @@ export const ToolRefusalSchema = z.object({
|
|
|
57
106
|
* gets anybody unstuck.
|
|
58
107
|
*/
|
|
59
108
|
retried: z.boolean(),
|
|
109
|
+
/**
|
|
110
|
+
* The arguments the refused call passed, by NAME, with the value only for an enum we defined
|
|
111
|
+
* (`action:list`, else `action:other`), as `toolParams` reports them. Never a free value. A
|
|
112
|
+
* `bad_args` refusal said nothing about the call's shape, so a tool that confuses agents could
|
|
113
|
+
* not be told apart from one that agents never reach.
|
|
114
|
+
*/
|
|
115
|
+
params: z.array(z.string().min(1).max(64)).max(16).optional(),
|
|
60
116
|
});
|
|
@@ -212,6 +212,31 @@ export declare const HarnessRunSchema: z.ZodObject<{
|
|
|
212
212
|
}>>;
|
|
213
213
|
}, z.core.$strip>;
|
|
214
214
|
export type HarnessRun = z.infer<typeof HarnessRunSchema>;
|
|
215
|
+
/**
|
|
216
|
+
* How `reticle gate` ended. One value for each exit code the gate can give, and `error` for a gate
|
|
217
|
+
* that broke before it gave a judgement. `error` exits 1 like `fail`, and it is a different fact:
|
|
218
|
+
* a `fail` is about the change, an `error` is about Reticle.
|
|
219
|
+
*/
|
|
220
|
+
export declare const GateOutcome: {
|
|
221
|
+
readonly PASS: "pass";
|
|
222
|
+
readonly FAIL: "fail";
|
|
223
|
+
readonly NOTHING_TO_CHECK: "nothing_to_check";
|
|
224
|
+
readonly REGRESSION: "regression";
|
|
225
|
+
readonly ERROR: "error";
|
|
226
|
+
};
|
|
227
|
+
export type GateOutcome = (typeof GateOutcome)[keyof typeof GateOutcome];
|
|
228
|
+
/** `gate_completed`: one per `reticle gate` run. No flow name and no file path. */
|
|
229
|
+
export declare const GateCompletedSchema: z.ZodObject<{
|
|
230
|
+
outcome: z.ZodEnum<{
|
|
231
|
+
readonly PASS: "pass";
|
|
232
|
+
readonly FAIL: "fail";
|
|
233
|
+
readonly NOTHING_TO_CHECK: "nothing_to_check";
|
|
234
|
+
readonly REGRESSION: "regression";
|
|
235
|
+
readonly ERROR: "error";
|
|
236
|
+
}>;
|
|
237
|
+
flowsChecked: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
export type GateCompleted = z.infer<typeof GateCompletedSchema>;
|
|
215
240
|
/**
|
|
216
241
|
* The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there.
|
|
217
242
|
* Every one optional: an older sender has none of them.
|
|
@@ -344,6 +369,17 @@ export declare const SIGNAL_FIELDS: {
|
|
|
344
369
|
readonly OTHER: "other";
|
|
345
370
|
}>>;
|
|
346
371
|
}, z.core.$strip>>;
|
|
372
|
+
/** Only on `gate_completed`. */
|
|
373
|
+
gate: z.ZodOptional<z.ZodObject<{
|
|
374
|
+
outcome: z.ZodEnum<{
|
|
375
|
+
readonly PASS: "pass";
|
|
376
|
+
readonly FAIL: "fail";
|
|
377
|
+
readonly NOTHING_TO_CHECK: "nothing_to_check";
|
|
378
|
+
readonly REGRESSION: "regression";
|
|
379
|
+
readonly ERROR: "error";
|
|
380
|
+
}>;
|
|
381
|
+
flowsChecked: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
}, z.core.$strip>>;
|
|
347
383
|
};
|
|
348
384
|
/**
|
|
349
385
|
* The socket error code behind a drop, as a closed set. Anything else reports `other`, so a new code
|
|
@@ -387,9 +423,73 @@ export declare const ProxyExitSchema: z.ZodObject<{
|
|
|
387
423
|
proxyId: z.ZodOptional<z.ZodString>;
|
|
388
424
|
}, z.core.$strip>;
|
|
389
425
|
export type ProxyExit = z.infer<typeof ProxyExitSchema>;
|
|
426
|
+
/** How a daemon's life ended, as far as its own log can say. */
|
|
427
|
+
export declare const DaemonEnd: {
|
|
428
|
+
/** Still beating within tolerance. */
|
|
429
|
+
readonly ALIVE: "alive";
|
|
430
|
+
/** Logged its own exit, with no signal before it. */
|
|
431
|
+
readonly CLEAN: "clean";
|
|
432
|
+
/** A signal arrived: the cause an exit line with `code: 0` does not carry. */
|
|
433
|
+
readonly SIGNALLED: "signalled";
|
|
434
|
+
/** The beat simply stopped. No exit, no signal: killed, crashed, or swept. */
|
|
435
|
+
readonly DIED_SILENTLY: "died_silently";
|
|
436
|
+
/** It failed to start, before its first beat. `startupError` says where. */
|
|
437
|
+
readonly START_FAILED: "start_failed";
|
|
438
|
+
/** No beat was ever emitted, so the log cannot answer the question. */
|
|
439
|
+
readonly UNKNOWN: "unknown";
|
|
440
|
+
};
|
|
441
|
+
export type DaemonEnd = (typeof DaemonEnd)[keyof typeof DaemonEnd];
|
|
442
|
+
/** Where a daemon start failed. A closed list: the message of the error never leaves the machine. */
|
|
443
|
+
export declare const DaemonStartupError: {
|
|
444
|
+
/** The bind of the port failed, for example with `EADDRINUSE` or `EACCES`. */
|
|
445
|
+
readonly LISTEN: "listen";
|
|
446
|
+
/** The start failed for a different reason. */
|
|
447
|
+
readonly START: "start";
|
|
448
|
+
/** A throw that nothing caught stopped the start. */
|
|
449
|
+
readonly UNCAUGHT_EXCEPTION: "uncaught_exception";
|
|
450
|
+
/** A rejected promise that nothing handled stopped the start. */
|
|
451
|
+
readonly UNHANDLED_REJECTION: "unhandled_rejection";
|
|
452
|
+
/** Node stopped the process before it wrote its first log line, for example on a failed import. */
|
|
453
|
+
readonly BEFORE_LOG: "before_log";
|
|
454
|
+
};
|
|
455
|
+
export type DaemonStartupError = (typeof DaemonStartupError)[keyof typeof DaemonStartupError];
|
|
456
|
+
/** A Node error code, such as `EADDRINUSE` or `ERR_MODULE_NOT_FOUND`. Never a message or a path. */
|
|
457
|
+
export declare const NODE_ERROR_CODE: RegExp;
|
|
390
458
|
/** `daemon_died_unclean`: a daemon start found the pidfile of a daemon that never stopped cleanly. */
|
|
391
459
|
export declare const DaemonDeathSchema: z.ZodObject<{
|
|
392
460
|
ageMs: z.ZodNumber;
|
|
461
|
+
end: z.ZodOptional<z.ZodEnum<{
|
|
462
|
+
/** Still beating within tolerance. */
|
|
463
|
+
readonly ALIVE: "alive";
|
|
464
|
+
/** Logged its own exit, with no signal before it. */
|
|
465
|
+
readonly CLEAN: "clean";
|
|
466
|
+
/** A signal arrived: the cause an exit line with `code: 0` does not carry. */
|
|
467
|
+
readonly SIGNALLED: "signalled";
|
|
468
|
+
/** The beat simply stopped. No exit, no signal: killed, crashed, or swept. */
|
|
469
|
+
readonly DIED_SILENTLY: "died_silently";
|
|
470
|
+
/** It failed to start, before its first beat. `startupError` says where. */
|
|
471
|
+
readonly START_FAILED: "start_failed";
|
|
472
|
+
/** No beat was ever emitted, so the log cannot answer the question. */
|
|
473
|
+
readonly UNKNOWN: "unknown";
|
|
474
|
+
}>>;
|
|
475
|
+
silentMs: z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
477
|
+
sessions: z.ZodOptional<z.ZodNumber>;
|
|
478
|
+
served: z.ZodOptional<z.ZodBoolean>;
|
|
479
|
+
rssMb: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
error: z.ZodOptional<z.ZodString>;
|
|
481
|
+
startupError: z.ZodOptional<z.ZodEnum<{
|
|
482
|
+
/** The bind of the port failed, for example with `EADDRINUSE` or `EACCES`. */
|
|
483
|
+
readonly LISTEN: "listen";
|
|
484
|
+
/** The start failed for a different reason. */
|
|
485
|
+
readonly START: "start";
|
|
486
|
+
/** A throw that nothing caught stopped the start. */
|
|
487
|
+
readonly UNCAUGHT_EXCEPTION: "uncaught_exception";
|
|
488
|
+
/** A rejected promise that nothing handled stopped the start. */
|
|
489
|
+
readonly UNHANDLED_REJECTION: "unhandled_rejection";
|
|
490
|
+
/** Node stopped the process before it wrote its first log line, for example on a failed import. */
|
|
491
|
+
readonly BEFORE_LOG: "before_log";
|
|
492
|
+
}>>;
|
|
393
493
|
}, z.core.$strip>;
|
|
394
494
|
export type DaemonDeath = z.infer<typeof DaemonDeathSchema>;
|
|
395
495
|
/** How the parent started the daemon. On Windows a start through WMI leaves the Job Object. */
|
|
@@ -442,6 +542,38 @@ export declare const TRANSPORT_FIELDS: {
|
|
|
442
542
|
/** Only on `daemon_died_unclean`. */
|
|
443
543
|
daemonDeath: z.ZodOptional<z.ZodObject<{
|
|
444
544
|
ageMs: z.ZodNumber;
|
|
545
|
+
end: z.ZodOptional<z.ZodEnum<{
|
|
546
|
+
/** Still beating within tolerance. */
|
|
547
|
+
readonly ALIVE: "alive";
|
|
548
|
+
/** Logged its own exit, with no signal before it. */
|
|
549
|
+
readonly CLEAN: "clean";
|
|
550
|
+
/** A signal arrived: the cause an exit line with `code: 0` does not carry. */
|
|
551
|
+
readonly SIGNALLED: "signalled";
|
|
552
|
+
/** The beat simply stopped. No exit, no signal: killed, crashed, or swept. */
|
|
553
|
+
readonly DIED_SILENTLY: "died_silently";
|
|
554
|
+
/** It failed to start, before its first beat. `startupError` says where. */
|
|
555
|
+
readonly START_FAILED: "start_failed";
|
|
556
|
+
/** No beat was ever emitted, so the log cannot answer the question. */
|
|
557
|
+
readonly UNKNOWN: "unknown";
|
|
558
|
+
}>>;
|
|
559
|
+
silentMs: z.ZodOptional<z.ZodNumber>;
|
|
560
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
561
|
+
sessions: z.ZodOptional<z.ZodNumber>;
|
|
562
|
+
served: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
+
rssMb: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
error: z.ZodOptional<z.ZodString>;
|
|
565
|
+
startupError: z.ZodOptional<z.ZodEnum<{
|
|
566
|
+
/** The bind of the port failed, for example with `EADDRINUSE` or `EACCES`. */
|
|
567
|
+
readonly LISTEN: "listen";
|
|
568
|
+
/** The start failed for a different reason. */
|
|
569
|
+
readonly START: "start";
|
|
570
|
+
/** A throw that nothing caught stopped the start. */
|
|
571
|
+
readonly UNCAUGHT_EXCEPTION: "uncaught_exception";
|
|
572
|
+
/** A rejected promise that nothing handled stopped the start. */
|
|
573
|
+
readonly UNHANDLED_REJECTION: "unhandled_rejection";
|
|
574
|
+
/** Node stopped the process before it wrote its first log line, for example on a failed import. */
|
|
575
|
+
readonly BEFORE_LOG: "before_log";
|
|
576
|
+
}>>;
|
|
445
577
|
}, z.core.$strip>>;
|
|
446
578
|
/** Only on `wake_refused`. */
|
|
447
579
|
wakeRefusal: z.ZodOptional<z.ZodObject<{
|
|
@@ -138,6 +138,24 @@ export const HarnessRunSchema = z.object({
|
|
|
138
138
|
/** Only on a `blocked` or `failed` run: why it did not drive. */
|
|
139
139
|
reason: z.nativeEnum(HarnessRunReason).optional(),
|
|
140
140
|
});
|
|
141
|
+
/**
|
|
142
|
+
* How `reticle gate` ended. One value for each exit code the gate can give, and `error` for a gate
|
|
143
|
+
* that broke before it gave a judgement. `error` exits 1 like `fail`, and it is a different fact:
|
|
144
|
+
* a `fail` is about the change, an `error` is about Reticle.
|
|
145
|
+
*/
|
|
146
|
+
export const GateOutcome = {
|
|
147
|
+
PASS: 'pass',
|
|
148
|
+
FAIL: 'fail',
|
|
149
|
+
NOTHING_TO_CHECK: 'nothing_to_check',
|
|
150
|
+
REGRESSION: 'regression',
|
|
151
|
+
ERROR: 'error',
|
|
152
|
+
};
|
|
153
|
+
/** `gate_completed`: one per `reticle gate` run. No flow name and no file path. */
|
|
154
|
+
export const GateCompletedSchema = z.object({
|
|
155
|
+
outcome: z.nativeEnum(GateOutcome),
|
|
156
|
+
/** The saved flows that the change affects, which the gate judged. Absent on `error`. */
|
|
157
|
+
flowsChecked: z.number().int().nonnegative().optional(),
|
|
158
|
+
});
|
|
141
159
|
/**
|
|
142
160
|
* The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there.
|
|
143
161
|
* Every one optional: an older sender has none of them.
|
|
@@ -162,6 +180,8 @@ export const SIGNAL_FIELDS = {
|
|
|
162
180
|
link: PlatformLinkSchema.optional(),
|
|
163
181
|
/** Only on `harness_run`. */
|
|
164
182
|
harness: HarnessRunSchema.optional(),
|
|
183
|
+
/** Only on `gate_completed`. */
|
|
184
|
+
gate: GateCompletedSchema.optional(),
|
|
165
185
|
};
|
|
166
186
|
// ── Transport: what happens to the MCP proxy and its daemon when the link fails ──
|
|
167
187
|
// No block below carries a path, a port, a pid or a message.
|
|
@@ -198,10 +218,58 @@ export const ProxyExitSchema = z.object({
|
|
|
198
218
|
toolCalls: z.number().int().nonnegative(),
|
|
199
219
|
proxyId: z.string().min(1).max(64).optional(),
|
|
200
220
|
});
|
|
221
|
+
/** How a daemon's life ended, as far as its own log can say. */
|
|
222
|
+
export const DaemonEnd = {
|
|
223
|
+
/** Still beating within tolerance. */
|
|
224
|
+
ALIVE: 'alive',
|
|
225
|
+
/** Logged its own exit, with no signal before it. */
|
|
226
|
+
CLEAN: 'clean',
|
|
227
|
+
/** A signal arrived: the cause an exit line with `code: 0` does not carry. */
|
|
228
|
+
SIGNALLED: 'signalled',
|
|
229
|
+
/** The beat simply stopped. No exit, no signal: killed, crashed, or swept. */
|
|
230
|
+
DIED_SILENTLY: 'died_silently',
|
|
231
|
+
/** It failed to start, before its first beat. `startupError` says where. */
|
|
232
|
+
START_FAILED: 'start_failed',
|
|
233
|
+
/** No beat was ever emitted, so the log cannot answer the question. */
|
|
234
|
+
UNKNOWN: 'unknown',
|
|
235
|
+
};
|
|
236
|
+
/** Where a daemon start failed. A closed list: the message of the error never leaves the machine. */
|
|
237
|
+
export const DaemonStartupError = {
|
|
238
|
+
/** The bind of the port failed, for example with `EADDRINUSE` or `EACCES`. */
|
|
239
|
+
LISTEN: 'listen',
|
|
240
|
+
/** The start failed for a different reason. */
|
|
241
|
+
START: 'start',
|
|
242
|
+
/** A throw that nothing caught stopped the start. */
|
|
243
|
+
UNCAUGHT_EXCEPTION: 'uncaught_exception',
|
|
244
|
+
/** A rejected promise that nothing handled stopped the start. */
|
|
245
|
+
UNHANDLED_REJECTION: 'unhandled_rejection',
|
|
246
|
+
/** Node stopped the process before it wrote its first log line, for example on a failed import. */
|
|
247
|
+
BEFORE_LOG: 'before_log',
|
|
248
|
+
};
|
|
249
|
+
/** A signal name, never anything else. */
|
|
250
|
+
const SIGNAL_NAME = /^SIG[A-Z0-9]{1,12}$/;
|
|
251
|
+
/** A Node error code, such as `EADDRINUSE` or `ERR_MODULE_NOT_FOUND`. Never a message or a path. */
|
|
252
|
+
export const NODE_ERROR_CODE = /^(E[A-Z0-9]{2,30}|ERR_[A-Z0-9_]{2,60})$/;
|
|
201
253
|
/** `daemon_died_unclean`: a daemon start found the pidfile of a daemon that never stopped cleanly. */
|
|
202
254
|
export const DaemonDeathSchema = z.object({
|
|
203
255
|
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
204
256
|
ageMs: z.number().int().nonnegative(),
|
|
257
|
+
/** How the dead daemon's own log says it ended. */
|
|
258
|
+
end: z.nativeEnum(DaemonEnd).optional(),
|
|
259
|
+
/** Time from its last heartbeat to this discovery. Short with a client connected: killed in use. */
|
|
260
|
+
silentMs: z.number().int().nonnegative().optional(),
|
|
261
|
+
/** The signal it logged before it exited. */
|
|
262
|
+
signal: z.string().regex(SIGNAL_NAME).optional(),
|
|
263
|
+
/** Browser sessions connected at its last heartbeat. */
|
|
264
|
+
sessions: z.number().int().nonnegative().optional(),
|
|
265
|
+
/** Whether it had served any tool call by its last heartbeat. */
|
|
266
|
+
served: z.boolean().optional(),
|
|
267
|
+
/** Its resident memory at its last heartbeat, in MB. */
|
|
268
|
+
rssMb: z.number().int().nonnegative().optional(),
|
|
269
|
+
/** The Node error code of a failed start or a crash. */
|
|
270
|
+
error: z.string().regex(NODE_ERROR_CODE).optional(),
|
|
271
|
+
/** Where the start failed, when `end` is `start_failed`. */
|
|
272
|
+
startupError: z.nativeEnum(DaemonStartupError).optional(),
|
|
205
273
|
});
|
|
206
274
|
/** How the parent started the daemon. On Windows a start through WMI leaves the Job Object. */
|
|
207
275
|
export const DaemonSpawnMethod = {
|