@agentclutch/action-card 0.7.3-alpha.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/LICENSE +3 -0
- package/README.md +27 -0
- package/dist/builders.d.ts +16 -0
- package/dist/builders.d.ts.map +1 -0
- package/dist/builders.js +22 -0
- package/dist/builders.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +837 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +447 -0
- package/dist/schema.js.map +1 -0
- package/dist/types.d.ts +157 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validators.d.ts +19 -0
- package/dist/validators.d.ts.map +1 -0
- package/dist/validators.js +33 -0
- package/dist/validators.js.map +1 -0
- package/package.json +49 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { JsonObject, JsonValue } from "./types.js";
|
|
3
|
+
export declare const ActionSurfaceSchema: z.ZodEnum<{
|
|
4
|
+
browser: "browser";
|
|
5
|
+
desktop: "desktop";
|
|
6
|
+
filesystem: "filesystem";
|
|
7
|
+
shell: "shell";
|
|
8
|
+
mcp: "mcp";
|
|
9
|
+
email: "email";
|
|
10
|
+
chat: "chat";
|
|
11
|
+
github: "github";
|
|
12
|
+
calendar: "calendar";
|
|
13
|
+
payment: "payment";
|
|
14
|
+
saas: "saas";
|
|
15
|
+
endpoint: "endpoint";
|
|
16
|
+
unknown: "unknown";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const ConsequenceClassSchema: z.ZodEnum<{
|
|
19
|
+
unknown: "unknown";
|
|
20
|
+
none: "none";
|
|
21
|
+
local_visual_change: "local_visual_change";
|
|
22
|
+
local_file_write: "local_file_write";
|
|
23
|
+
local_file_delete: "local_file_delete";
|
|
24
|
+
external_message_send: "external_message_send";
|
|
25
|
+
external_business_submission: "external_business_submission";
|
|
26
|
+
payment_or_purchase: "payment_or_purchase";
|
|
27
|
+
identity_or_permission_change: "identity_or_permission_change";
|
|
28
|
+
production_change: "production_change";
|
|
29
|
+
code_repository_change: "code_repository_change";
|
|
30
|
+
endpoint_or_device_change: "endpoint_or_device_change";
|
|
31
|
+
sensitive_data_access: "sensitive_data_access";
|
|
32
|
+
}>;
|
|
33
|
+
export declare const ReversibilitySchema: z.ZodEnum<{
|
|
34
|
+
unknown: "unknown";
|
|
35
|
+
cleanly_reversible: "cleanly_reversible";
|
|
36
|
+
compensable: "compensable";
|
|
37
|
+
residue_remains: "residue_remains";
|
|
38
|
+
not_cleanly_reversible: "not_cleanly_reversible";
|
|
39
|
+
irreversible: "irreversible";
|
|
40
|
+
}>;
|
|
41
|
+
export declare const BlastRadiusSchema: z.ZodEnum<{
|
|
42
|
+
unknown: "unknown";
|
|
43
|
+
none: "none";
|
|
44
|
+
single_page: "single_page";
|
|
45
|
+
single_local_file: "single_local_file";
|
|
46
|
+
workspace: "workspace";
|
|
47
|
+
single_user: "single_user";
|
|
48
|
+
single_customer: "single_customer";
|
|
49
|
+
team: "team";
|
|
50
|
+
organization: "organization";
|
|
51
|
+
public: "public";
|
|
52
|
+
production: "production";
|
|
53
|
+
}>;
|
|
54
|
+
export declare const RiskLevelSchema: z.ZodEnum<{
|
|
55
|
+
unknown: "unknown";
|
|
56
|
+
low: "low";
|
|
57
|
+
medium: "medium";
|
|
58
|
+
high: "high";
|
|
59
|
+
critical: "critical";
|
|
60
|
+
}>;
|
|
61
|
+
export declare const UserOptionSchema: z.ZodEnum<{
|
|
62
|
+
approve_once: "approve_once";
|
|
63
|
+
approve_always_for_this_target: "approve_always_for_this_target";
|
|
64
|
+
edit_fields: "edit_fields";
|
|
65
|
+
accept_lesson: "accept_lesson";
|
|
66
|
+
reject_lesson: "reject_lesson";
|
|
67
|
+
disable_lesson: "disable_lesson";
|
|
68
|
+
take_wheel: "take_wheel";
|
|
69
|
+
block: "block";
|
|
70
|
+
create_rule: "create_rule";
|
|
71
|
+
request_more_context: "request_more_context";
|
|
72
|
+
}>;
|
|
73
|
+
export declare const UserDecisionTypeSchema: z.ZodEnum<{
|
|
74
|
+
approve_once: "approve_once";
|
|
75
|
+
edit_fields: "edit_fields";
|
|
76
|
+
accept_lesson: "accept_lesson";
|
|
77
|
+
reject_lesson: "reject_lesson";
|
|
78
|
+
disable_lesson: "disable_lesson";
|
|
79
|
+
take_wheel: "take_wheel";
|
|
80
|
+
block: "block";
|
|
81
|
+
create_rule: "create_rule";
|
|
82
|
+
request_more_context: "request_more_context";
|
|
83
|
+
timeout: "timeout";
|
|
84
|
+
}>;
|
|
85
|
+
export declare const EvidenceSourceTypeSchema: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
dom: "dom";
|
|
88
|
+
user_instruction: "user_instruction";
|
|
89
|
+
file: "file";
|
|
90
|
+
screenshot: "screenshot";
|
|
91
|
+
tool_output: "tool_output";
|
|
92
|
+
api_response: "api_response";
|
|
93
|
+
memory: "memory";
|
|
94
|
+
system_policy: "system_policy";
|
|
95
|
+
}>;
|
|
96
|
+
export declare const JsonValueSchema: z.ZodType<JsonValue>;
|
|
97
|
+
export declare const JsonObjectSchema: z.ZodType<JsonObject>;
|
|
98
|
+
export declare const AgentDescriptorSchema: z.ZodObject<{
|
|
99
|
+
id: z.ZodOptional<z.ZodString>;
|
|
100
|
+
name: z.ZodString;
|
|
101
|
+
runtime: z.ZodOptional<z.ZodString>;
|
|
102
|
+
version: z.ZodOptional<z.ZodString>;
|
|
103
|
+
model: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export declare const BoundingBoxSchema: z.ZodObject<{
|
|
106
|
+
x: z.ZodNumber;
|
|
107
|
+
y: z.ZodNumber;
|
|
108
|
+
width: z.ZodNumber;
|
|
109
|
+
height: z.ZodNumber;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
export declare const VisibleTargetSchema: z.ZodObject<{
|
|
112
|
+
surface: z.ZodEnum<{
|
|
113
|
+
browser: "browser";
|
|
114
|
+
desktop: "desktop";
|
|
115
|
+
filesystem: "filesystem";
|
|
116
|
+
shell: "shell";
|
|
117
|
+
mcp: "mcp";
|
|
118
|
+
email: "email";
|
|
119
|
+
chat: "chat";
|
|
120
|
+
github: "github";
|
|
121
|
+
calendar: "calendar";
|
|
122
|
+
payment: "payment";
|
|
123
|
+
saas: "saas";
|
|
124
|
+
endpoint: "endpoint";
|
|
125
|
+
unknown: "unknown";
|
|
126
|
+
}>;
|
|
127
|
+
target_app: z.ZodOptional<z.ZodString>;
|
|
128
|
+
url: z.ZodOptional<z.ZodString>;
|
|
129
|
+
page_title: z.ZodOptional<z.ZodString>;
|
|
130
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
131
|
+
selector_hash: z.ZodOptional<z.ZodString>;
|
|
132
|
+
button_text: z.ZodOptional<z.ZodString>;
|
|
133
|
+
aria_label: z.ZodOptional<z.ZodString>;
|
|
134
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
x: z.ZodNumber;
|
|
136
|
+
y: z.ZodNumber;
|
|
137
|
+
width: z.ZodNumber;
|
|
138
|
+
height: z.ZodNumber;
|
|
139
|
+
}, z.core.$strict>>;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
export declare const EvidenceItemSchema: z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
label: z.ZodString;
|
|
144
|
+
source_type: z.ZodEnum<{
|
|
145
|
+
unknown: "unknown";
|
|
146
|
+
dom: "dom";
|
|
147
|
+
user_instruction: "user_instruction";
|
|
148
|
+
file: "file";
|
|
149
|
+
screenshot: "screenshot";
|
|
150
|
+
tool_output: "tool_output";
|
|
151
|
+
api_response: "api_response";
|
|
152
|
+
memory: "memory";
|
|
153
|
+
system_policy: "system_policy";
|
|
154
|
+
}>;
|
|
155
|
+
source_ref: z.ZodOptional<z.ZodString>;
|
|
156
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
157
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
158
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
export declare const ChangedFieldSchema: z.ZodObject<{
|
|
162
|
+
field: z.ZodString;
|
|
163
|
+
before: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
164
|
+
after: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
165
|
+
evidence_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
export declare const ConsequenceDescriptorSchema: z.ZodObject<{
|
|
169
|
+
class: z.ZodEnum<{
|
|
170
|
+
unknown: "unknown";
|
|
171
|
+
none: "none";
|
|
172
|
+
local_visual_change: "local_visual_change";
|
|
173
|
+
local_file_write: "local_file_write";
|
|
174
|
+
local_file_delete: "local_file_delete";
|
|
175
|
+
external_message_send: "external_message_send";
|
|
176
|
+
external_business_submission: "external_business_submission";
|
|
177
|
+
payment_or_purchase: "payment_or_purchase";
|
|
178
|
+
identity_or_permission_change: "identity_or_permission_change";
|
|
179
|
+
production_change: "production_change";
|
|
180
|
+
code_repository_change: "code_repository_change";
|
|
181
|
+
endpoint_or_device_change: "endpoint_or_device_change";
|
|
182
|
+
sensitive_data_access: "sensitive_data_access";
|
|
183
|
+
}>;
|
|
184
|
+
label: z.ZodString;
|
|
185
|
+
description: z.ZodOptional<z.ZodString>;
|
|
186
|
+
reversibility: z.ZodEnum<{
|
|
187
|
+
unknown: "unknown";
|
|
188
|
+
cleanly_reversible: "cleanly_reversible";
|
|
189
|
+
compensable: "compensable";
|
|
190
|
+
residue_remains: "residue_remains";
|
|
191
|
+
not_cleanly_reversible: "not_cleanly_reversible";
|
|
192
|
+
irreversible: "irreversible";
|
|
193
|
+
}>;
|
|
194
|
+
blast_radius: z.ZodEnum<{
|
|
195
|
+
unknown: "unknown";
|
|
196
|
+
none: "none";
|
|
197
|
+
single_page: "single_page";
|
|
198
|
+
single_local_file: "single_local_file";
|
|
199
|
+
workspace: "workspace";
|
|
200
|
+
single_user: "single_user";
|
|
201
|
+
single_customer: "single_customer";
|
|
202
|
+
team: "team";
|
|
203
|
+
organization: "organization";
|
|
204
|
+
public: "public";
|
|
205
|
+
production: "production";
|
|
206
|
+
}>;
|
|
207
|
+
requires_confirmation: z.ZodBoolean;
|
|
208
|
+
possible_residue: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
209
|
+
compensation_hint: z.ZodOptional<z.ZodString>;
|
|
210
|
+
}, z.core.$strict>;
|
|
211
|
+
export declare const RiskDescriptorSchema: z.ZodObject<{
|
|
212
|
+
level: z.ZodEnum<{
|
|
213
|
+
unknown: "unknown";
|
|
214
|
+
low: "low";
|
|
215
|
+
medium: "medium";
|
|
216
|
+
high: "high";
|
|
217
|
+
critical: "critical";
|
|
218
|
+
}>;
|
|
219
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
221
|
+
policy_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
}, z.core.$strict>;
|
|
223
|
+
export declare const ProposedActionSchema: z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
kind: z.ZodString;
|
|
226
|
+
label: z.ZodString;
|
|
227
|
+
description: z.ZodOptional<z.ZodString>;
|
|
228
|
+
surface: z.ZodEnum<{
|
|
229
|
+
browser: "browser";
|
|
230
|
+
desktop: "desktop";
|
|
231
|
+
filesystem: "filesystem";
|
|
232
|
+
shell: "shell";
|
|
233
|
+
mcp: "mcp";
|
|
234
|
+
email: "email";
|
|
235
|
+
chat: "chat";
|
|
236
|
+
github: "github";
|
|
237
|
+
calendar: "calendar";
|
|
238
|
+
payment: "payment";
|
|
239
|
+
saas: "saas";
|
|
240
|
+
endpoint: "endpoint";
|
|
241
|
+
unknown: "unknown";
|
|
242
|
+
}>;
|
|
243
|
+
target: z.ZodObject<{
|
|
244
|
+
surface: z.ZodEnum<{
|
|
245
|
+
browser: "browser";
|
|
246
|
+
desktop: "desktop";
|
|
247
|
+
filesystem: "filesystem";
|
|
248
|
+
shell: "shell";
|
|
249
|
+
mcp: "mcp";
|
|
250
|
+
email: "email";
|
|
251
|
+
chat: "chat";
|
|
252
|
+
github: "github";
|
|
253
|
+
calendar: "calendar";
|
|
254
|
+
payment: "payment";
|
|
255
|
+
saas: "saas";
|
|
256
|
+
endpoint: "endpoint";
|
|
257
|
+
unknown: "unknown";
|
|
258
|
+
}>;
|
|
259
|
+
target_app: z.ZodOptional<z.ZodString>;
|
|
260
|
+
url: z.ZodOptional<z.ZodString>;
|
|
261
|
+
page_title: z.ZodOptional<z.ZodString>;
|
|
262
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
263
|
+
selector_hash: z.ZodOptional<z.ZodString>;
|
|
264
|
+
button_text: z.ZodOptional<z.ZodString>;
|
|
265
|
+
aria_label: z.ZodOptional<z.ZodString>;
|
|
266
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
267
|
+
x: z.ZodNumber;
|
|
268
|
+
y: z.ZodNumber;
|
|
269
|
+
width: z.ZodNumber;
|
|
270
|
+
height: z.ZodNumber;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
}, z.core.$strict>;
|
|
273
|
+
changed_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
274
|
+
field: z.ZodString;
|
|
275
|
+
before: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
276
|
+
after: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
277
|
+
evidence_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
}, z.core.$strict>>>;
|
|
280
|
+
raw: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
281
|
+
}, z.core.$strict>;
|
|
282
|
+
export declare const ActionCardSchema: z.ZodObject<{
|
|
283
|
+
type: z.ZodLiteral<"agentclutch.action_card.v0">;
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
run_id: z.ZodString;
|
|
286
|
+
created_at: z.ZodString;
|
|
287
|
+
agent: z.ZodObject<{
|
|
288
|
+
id: z.ZodOptional<z.ZodString>;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
runtime: z.ZodOptional<z.ZodString>;
|
|
291
|
+
version: z.ZodOptional<z.ZodString>;
|
|
292
|
+
model: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
proposed_action: z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
kind: z.ZodString;
|
|
297
|
+
label: z.ZodString;
|
|
298
|
+
description: z.ZodOptional<z.ZodString>;
|
|
299
|
+
surface: z.ZodEnum<{
|
|
300
|
+
browser: "browser";
|
|
301
|
+
desktop: "desktop";
|
|
302
|
+
filesystem: "filesystem";
|
|
303
|
+
shell: "shell";
|
|
304
|
+
mcp: "mcp";
|
|
305
|
+
email: "email";
|
|
306
|
+
chat: "chat";
|
|
307
|
+
github: "github";
|
|
308
|
+
calendar: "calendar";
|
|
309
|
+
payment: "payment";
|
|
310
|
+
saas: "saas";
|
|
311
|
+
endpoint: "endpoint";
|
|
312
|
+
unknown: "unknown";
|
|
313
|
+
}>;
|
|
314
|
+
target: z.ZodObject<{
|
|
315
|
+
surface: z.ZodEnum<{
|
|
316
|
+
browser: "browser";
|
|
317
|
+
desktop: "desktop";
|
|
318
|
+
filesystem: "filesystem";
|
|
319
|
+
shell: "shell";
|
|
320
|
+
mcp: "mcp";
|
|
321
|
+
email: "email";
|
|
322
|
+
chat: "chat";
|
|
323
|
+
github: "github";
|
|
324
|
+
calendar: "calendar";
|
|
325
|
+
payment: "payment";
|
|
326
|
+
saas: "saas";
|
|
327
|
+
endpoint: "endpoint";
|
|
328
|
+
unknown: "unknown";
|
|
329
|
+
}>;
|
|
330
|
+
target_app: z.ZodOptional<z.ZodString>;
|
|
331
|
+
url: z.ZodOptional<z.ZodString>;
|
|
332
|
+
page_title: z.ZodOptional<z.ZodString>;
|
|
333
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
334
|
+
selector_hash: z.ZodOptional<z.ZodString>;
|
|
335
|
+
button_text: z.ZodOptional<z.ZodString>;
|
|
336
|
+
aria_label: z.ZodOptional<z.ZodString>;
|
|
337
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
x: z.ZodNumber;
|
|
339
|
+
y: z.ZodNumber;
|
|
340
|
+
width: z.ZodNumber;
|
|
341
|
+
height: z.ZodNumber;
|
|
342
|
+
}, z.core.$strict>>;
|
|
343
|
+
}, z.core.$strict>;
|
|
344
|
+
changed_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
345
|
+
field: z.ZodString;
|
|
346
|
+
before: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
347
|
+
after: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
348
|
+
evidence_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
349
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
}, z.core.$strict>>>;
|
|
351
|
+
raw: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
352
|
+
}, z.core.$strict>;
|
|
353
|
+
consequence: z.ZodObject<{
|
|
354
|
+
class: z.ZodEnum<{
|
|
355
|
+
unknown: "unknown";
|
|
356
|
+
none: "none";
|
|
357
|
+
local_visual_change: "local_visual_change";
|
|
358
|
+
local_file_write: "local_file_write";
|
|
359
|
+
local_file_delete: "local_file_delete";
|
|
360
|
+
external_message_send: "external_message_send";
|
|
361
|
+
external_business_submission: "external_business_submission";
|
|
362
|
+
payment_or_purchase: "payment_or_purchase";
|
|
363
|
+
identity_or_permission_change: "identity_or_permission_change";
|
|
364
|
+
production_change: "production_change";
|
|
365
|
+
code_repository_change: "code_repository_change";
|
|
366
|
+
endpoint_or_device_change: "endpoint_or_device_change";
|
|
367
|
+
sensitive_data_access: "sensitive_data_access";
|
|
368
|
+
}>;
|
|
369
|
+
label: z.ZodString;
|
|
370
|
+
description: z.ZodOptional<z.ZodString>;
|
|
371
|
+
reversibility: z.ZodEnum<{
|
|
372
|
+
unknown: "unknown";
|
|
373
|
+
cleanly_reversible: "cleanly_reversible";
|
|
374
|
+
compensable: "compensable";
|
|
375
|
+
residue_remains: "residue_remains";
|
|
376
|
+
not_cleanly_reversible: "not_cleanly_reversible";
|
|
377
|
+
irreversible: "irreversible";
|
|
378
|
+
}>;
|
|
379
|
+
blast_radius: z.ZodEnum<{
|
|
380
|
+
unknown: "unknown";
|
|
381
|
+
none: "none";
|
|
382
|
+
single_page: "single_page";
|
|
383
|
+
single_local_file: "single_local_file";
|
|
384
|
+
workspace: "workspace";
|
|
385
|
+
single_user: "single_user";
|
|
386
|
+
single_customer: "single_customer";
|
|
387
|
+
team: "team";
|
|
388
|
+
organization: "organization";
|
|
389
|
+
public: "public";
|
|
390
|
+
production: "production";
|
|
391
|
+
}>;
|
|
392
|
+
requires_confirmation: z.ZodBoolean;
|
|
393
|
+
possible_residue: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
394
|
+
compensation_hint: z.ZodOptional<z.ZodString>;
|
|
395
|
+
}, z.core.$strict>;
|
|
396
|
+
risk: z.ZodObject<{
|
|
397
|
+
level: z.ZodEnum<{
|
|
398
|
+
unknown: "unknown";
|
|
399
|
+
low: "low";
|
|
400
|
+
medium: "medium";
|
|
401
|
+
high: "high";
|
|
402
|
+
critical: "critical";
|
|
403
|
+
}>;
|
|
404
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
406
|
+
policy_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
407
|
+
}, z.core.$strict>;
|
|
408
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
label: z.ZodString;
|
|
411
|
+
source_type: z.ZodEnum<{
|
|
412
|
+
unknown: "unknown";
|
|
413
|
+
dom: "dom";
|
|
414
|
+
user_instruction: "user_instruction";
|
|
415
|
+
file: "file";
|
|
416
|
+
screenshot: "screenshot";
|
|
417
|
+
tool_output: "tool_output";
|
|
418
|
+
api_response: "api_response";
|
|
419
|
+
memory: "memory";
|
|
420
|
+
system_policy: "system_policy";
|
|
421
|
+
}>;
|
|
422
|
+
source_ref: z.ZodOptional<z.ZodString>;
|
|
423
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
424
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
425
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
426
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
427
|
+
}, z.core.$strict>>;
|
|
428
|
+
user_options: z.ZodArray<z.ZodEnum<{
|
|
429
|
+
approve_once: "approve_once";
|
|
430
|
+
approve_always_for_this_target: "approve_always_for_this_target";
|
|
431
|
+
edit_fields: "edit_fields";
|
|
432
|
+
accept_lesson: "accept_lesson";
|
|
433
|
+
reject_lesson: "reject_lesson";
|
|
434
|
+
disable_lesson: "disable_lesson";
|
|
435
|
+
take_wheel: "take_wheel";
|
|
436
|
+
block: "block";
|
|
437
|
+
create_rule: "create_rule";
|
|
438
|
+
request_more_context: "request_more_context";
|
|
439
|
+
}>>;
|
|
440
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
441
|
+
metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
442
|
+
}, z.core.$strict>;
|
|
443
|
+
export declare const ActorDescriptorSchema: z.ZodObject<{
|
|
444
|
+
id: z.ZodOptional<z.ZodString>;
|
|
445
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strict>;
|
|
447
|
+
export declare const UserDecisionSchema: z.ZodObject<{
|
|
448
|
+
type: z.ZodLiteral<"agentclutch.user_decision.v0">;
|
|
449
|
+
id: z.ZodString;
|
|
450
|
+
action_card_id: z.ZodString;
|
|
451
|
+
run_id: z.ZodString;
|
|
452
|
+
decided_at: z.ZodString;
|
|
453
|
+
decision: z.ZodEnum<{
|
|
454
|
+
approve_once: "approve_once";
|
|
455
|
+
edit_fields: "edit_fields";
|
|
456
|
+
accept_lesson: "accept_lesson";
|
|
457
|
+
reject_lesson: "reject_lesson";
|
|
458
|
+
disable_lesson: "disable_lesson";
|
|
459
|
+
take_wheel: "take_wheel";
|
|
460
|
+
block: "block";
|
|
461
|
+
create_rule: "create_rule";
|
|
462
|
+
request_more_context: "request_more_context";
|
|
463
|
+
timeout: "timeout";
|
|
464
|
+
}>;
|
|
465
|
+
edited_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
466
|
+
field: z.ZodString;
|
|
467
|
+
before: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
468
|
+
after: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
469
|
+
evidence_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
470
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
471
|
+
}, z.core.$strict>>>;
|
|
472
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
473
|
+
rule: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
474
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
475
|
+
id: z.ZodOptional<z.ZodString>;
|
|
476
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
477
|
+
}, z.core.$strict>>;
|
|
478
|
+
}, z.core.$strict>;
|
|
479
|
+
export declare const InterventionEventSchema: z.ZodObject<{
|
|
480
|
+
type: z.ZodLiteral<"agentclutch.intervention_event.v0">;
|
|
481
|
+
id: z.ZodString;
|
|
482
|
+
run_id: z.ZodString;
|
|
483
|
+
action_card_id: z.ZodOptional<z.ZodString>;
|
|
484
|
+
timestamp: z.ZodString;
|
|
485
|
+
event: z.ZodEnum<{
|
|
486
|
+
take_wheel: "take_wheel";
|
|
487
|
+
block: "block";
|
|
488
|
+
timeout: "timeout";
|
|
489
|
+
pause: "pause";
|
|
490
|
+
resume: "resume";
|
|
491
|
+
approve: "approve";
|
|
492
|
+
edit: "edit";
|
|
493
|
+
rule_created: "rule_created";
|
|
494
|
+
}>;
|
|
495
|
+
summary: z.ZodString;
|
|
496
|
+
data: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
|
|
497
|
+
}, z.core.$strict>;
|
|
498
|
+
export declare const PerceptionElementSchema: z.ZodObject<{
|
|
499
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
500
|
+
role: z.ZodOptional<z.ZodString>;
|
|
501
|
+
label: z.ZodOptional<z.ZodString>;
|
|
502
|
+
text: z.ZodOptional<z.ZodString>;
|
|
503
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
504
|
+
consequential_hint: z.ZodOptional<z.ZodBoolean>;
|
|
505
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
506
|
+
x: z.ZodNumber;
|
|
507
|
+
y: z.ZodNumber;
|
|
508
|
+
width: z.ZodNumber;
|
|
509
|
+
height: z.ZodNumber;
|
|
510
|
+
}, z.core.$strict>>;
|
|
511
|
+
}, z.core.$strict>;
|
|
512
|
+
export declare const PerceptionFrameSchema: z.ZodObject<{
|
|
513
|
+
type: z.ZodLiteral<"agentclutch.perception_frame.v0">;
|
|
514
|
+
id: z.ZodString;
|
|
515
|
+
run_id: z.ZodString;
|
|
516
|
+
timestamp: z.ZodString;
|
|
517
|
+
surface: z.ZodEnum<{
|
|
518
|
+
browser: "browser";
|
|
519
|
+
desktop: "desktop";
|
|
520
|
+
filesystem: "filesystem";
|
|
521
|
+
shell: "shell";
|
|
522
|
+
mcp: "mcp";
|
|
523
|
+
email: "email";
|
|
524
|
+
chat: "chat";
|
|
525
|
+
github: "github";
|
|
526
|
+
calendar: "calendar";
|
|
527
|
+
payment: "payment";
|
|
528
|
+
saas: "saas";
|
|
529
|
+
endpoint: "endpoint";
|
|
530
|
+
unknown: "unknown";
|
|
531
|
+
}>;
|
|
532
|
+
visible_text: z.ZodOptional<z.ZodString>;
|
|
533
|
+
url: z.ZodOptional<z.ZodString>;
|
|
534
|
+
page_title: z.ZodOptional<z.ZodString>;
|
|
535
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
536
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
537
|
+
role: z.ZodOptional<z.ZodString>;
|
|
538
|
+
label: z.ZodOptional<z.ZodString>;
|
|
539
|
+
text: z.ZodOptional<z.ZodString>;
|
|
540
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
541
|
+
consequential_hint: z.ZodOptional<z.ZodBoolean>;
|
|
542
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
x: z.ZodNumber;
|
|
544
|
+
y: z.ZodNumber;
|
|
545
|
+
width: z.ZodNumber;
|
|
546
|
+
height: z.ZodNumber;
|
|
547
|
+
}, z.core.$strict>>;
|
|
548
|
+
}, z.core.$strict>>>;
|
|
549
|
+
}, z.core.$strict>;
|
|
550
|
+
export declare const RunStoryStepSchema: z.ZodObject<{
|
|
551
|
+
timestamp: z.ZodString;
|
|
552
|
+
actor: z.ZodEnum<{
|
|
553
|
+
agent: "agent";
|
|
554
|
+
user: "user";
|
|
555
|
+
system: "system";
|
|
556
|
+
}>;
|
|
557
|
+
text: z.ZodString;
|
|
558
|
+
action_card_id: z.ZodOptional<z.ZodString>;
|
|
559
|
+
decision_id: z.ZodOptional<z.ZodString>;
|
|
560
|
+
}, z.core.$strict>;
|
|
561
|
+
export declare const RunStorySchema: z.ZodObject<{
|
|
562
|
+
type: z.ZodLiteral<"agentclutch.run_story.v0">;
|
|
563
|
+
id: z.ZodString;
|
|
564
|
+
run_id: z.ZodString;
|
|
565
|
+
created_at: z.ZodString;
|
|
566
|
+
title: z.ZodString;
|
|
567
|
+
summary: z.ZodString;
|
|
568
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
569
|
+
timestamp: z.ZodString;
|
|
570
|
+
actor: z.ZodEnum<{
|
|
571
|
+
agent: "agent";
|
|
572
|
+
user: "user";
|
|
573
|
+
system: "system";
|
|
574
|
+
}>;
|
|
575
|
+
text: z.ZodString;
|
|
576
|
+
action_card_id: z.ZodOptional<z.ZodString>;
|
|
577
|
+
decision_id: z.ZodOptional<z.ZodString>;
|
|
578
|
+
}, z.core.$strict>>;
|
|
579
|
+
}, z.core.$strict>;
|
|
580
|
+
export declare const ActionCardJsonSchema: {
|
|
581
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
582
|
+
readonly $id: "https://agentclutch.dev/schemas/action-card.schema.json";
|
|
583
|
+
readonly title: "AgentClutch Action Card v0";
|
|
584
|
+
readonly type: "object";
|
|
585
|
+
readonly required: readonly ["type", "id", "run_id", "created_at", "agent", "proposed_action", "consequence", "risk", "evidence", "user_options"];
|
|
586
|
+
readonly properties: {
|
|
587
|
+
readonly type: {
|
|
588
|
+
readonly const: "agentclutch.action_card.v0";
|
|
589
|
+
};
|
|
590
|
+
readonly id: {
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
readonly minLength: 1;
|
|
593
|
+
};
|
|
594
|
+
readonly run_id: {
|
|
595
|
+
readonly type: "string";
|
|
596
|
+
readonly minLength: 1;
|
|
597
|
+
};
|
|
598
|
+
readonly created_at: {
|
|
599
|
+
readonly type: "string";
|
|
600
|
+
readonly format: "date-time";
|
|
601
|
+
};
|
|
602
|
+
readonly agent: {
|
|
603
|
+
readonly type: "object";
|
|
604
|
+
readonly required: readonly ["name"];
|
|
605
|
+
readonly properties: {
|
|
606
|
+
readonly id: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
};
|
|
609
|
+
readonly name: {
|
|
610
|
+
readonly type: "string";
|
|
611
|
+
};
|
|
612
|
+
readonly runtime: {
|
|
613
|
+
readonly type: "string";
|
|
614
|
+
};
|
|
615
|
+
readonly version: {
|
|
616
|
+
readonly type: "string";
|
|
617
|
+
};
|
|
618
|
+
readonly model: {
|
|
619
|
+
readonly type: "string";
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
readonly additionalProperties: false;
|
|
623
|
+
};
|
|
624
|
+
readonly proposed_action: {
|
|
625
|
+
readonly type: "object";
|
|
626
|
+
readonly required: readonly ["id", "kind", "label", "surface", "target"];
|
|
627
|
+
readonly properties: {
|
|
628
|
+
readonly id: {
|
|
629
|
+
readonly type: "string";
|
|
630
|
+
};
|
|
631
|
+
readonly kind: {
|
|
632
|
+
readonly type: "string";
|
|
633
|
+
};
|
|
634
|
+
readonly label: {
|
|
635
|
+
readonly type: "string";
|
|
636
|
+
};
|
|
637
|
+
readonly description: {
|
|
638
|
+
readonly type: "string";
|
|
639
|
+
};
|
|
640
|
+
readonly surface: {
|
|
641
|
+
readonly type: "string";
|
|
642
|
+
};
|
|
643
|
+
readonly target: {
|
|
644
|
+
readonly type: "object";
|
|
645
|
+
readonly required: readonly ["surface"];
|
|
646
|
+
readonly properties: {
|
|
647
|
+
readonly surface: {
|
|
648
|
+
readonly type: "string";
|
|
649
|
+
};
|
|
650
|
+
readonly target_app: {
|
|
651
|
+
readonly type: "string";
|
|
652
|
+
};
|
|
653
|
+
readonly url: {
|
|
654
|
+
readonly type: "string";
|
|
655
|
+
};
|
|
656
|
+
readonly page_title: {
|
|
657
|
+
readonly type: "string";
|
|
658
|
+
};
|
|
659
|
+
readonly selector: {
|
|
660
|
+
readonly type: "string";
|
|
661
|
+
};
|
|
662
|
+
readonly selector_hash: {
|
|
663
|
+
readonly type: "string";
|
|
664
|
+
};
|
|
665
|
+
readonly button_text: {
|
|
666
|
+
readonly type: "string";
|
|
667
|
+
};
|
|
668
|
+
readonly aria_label: {
|
|
669
|
+
readonly type: "string";
|
|
670
|
+
};
|
|
671
|
+
readonly bounding_box: {
|
|
672
|
+
readonly type: "object";
|
|
673
|
+
readonly required: readonly ["x", "y", "width", "height"];
|
|
674
|
+
readonly properties: {
|
|
675
|
+
readonly x: {
|
|
676
|
+
readonly type: "number";
|
|
677
|
+
};
|
|
678
|
+
readonly y: {
|
|
679
|
+
readonly type: "number";
|
|
680
|
+
};
|
|
681
|
+
readonly width: {
|
|
682
|
+
readonly type: "number";
|
|
683
|
+
};
|
|
684
|
+
readonly height: {
|
|
685
|
+
readonly type: "number";
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
readonly additionalProperties: false;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
readonly additionalProperties: false;
|
|
692
|
+
};
|
|
693
|
+
readonly changed_fields: {
|
|
694
|
+
readonly type: "array";
|
|
695
|
+
readonly items: {
|
|
696
|
+
readonly type: "object";
|
|
697
|
+
readonly required: readonly ["field", "after"];
|
|
698
|
+
readonly properties: {
|
|
699
|
+
readonly field: {
|
|
700
|
+
readonly type: "string";
|
|
701
|
+
};
|
|
702
|
+
readonly before: true;
|
|
703
|
+
readonly after: true;
|
|
704
|
+
readonly evidence_ids: {
|
|
705
|
+
readonly type: "array";
|
|
706
|
+
readonly items: {
|
|
707
|
+
readonly type: "string";
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
readonly editable: {
|
|
711
|
+
readonly type: "boolean";
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
readonly additionalProperties: false;
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
readonly raw: {
|
|
718
|
+
readonly type: "object";
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
readonly additionalProperties: false;
|
|
722
|
+
};
|
|
723
|
+
readonly consequence: {
|
|
724
|
+
readonly type: "object";
|
|
725
|
+
readonly required: readonly ["class", "label", "reversibility", "blast_radius", "requires_confirmation"];
|
|
726
|
+
readonly properties: {
|
|
727
|
+
readonly class: {
|
|
728
|
+
readonly type: "string";
|
|
729
|
+
};
|
|
730
|
+
readonly label: {
|
|
731
|
+
readonly type: "string";
|
|
732
|
+
};
|
|
733
|
+
readonly description: {
|
|
734
|
+
readonly type: "string";
|
|
735
|
+
};
|
|
736
|
+
readonly reversibility: {
|
|
737
|
+
readonly type: "string";
|
|
738
|
+
};
|
|
739
|
+
readonly blast_radius: {
|
|
740
|
+
readonly type: "string";
|
|
741
|
+
};
|
|
742
|
+
readonly requires_confirmation: {
|
|
743
|
+
readonly type: "boolean";
|
|
744
|
+
};
|
|
745
|
+
readonly possible_residue: {
|
|
746
|
+
readonly type: "array";
|
|
747
|
+
readonly items: {
|
|
748
|
+
readonly type: "string";
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
readonly compensation_hint: {
|
|
752
|
+
readonly type: "string";
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
readonly additionalProperties: false;
|
|
756
|
+
};
|
|
757
|
+
readonly risk: {
|
|
758
|
+
readonly type: "object";
|
|
759
|
+
readonly required: readonly ["level", "reasons"];
|
|
760
|
+
readonly properties: {
|
|
761
|
+
readonly level: {
|
|
762
|
+
readonly type: "string";
|
|
763
|
+
};
|
|
764
|
+
readonly score: {
|
|
765
|
+
readonly type: "number";
|
|
766
|
+
readonly minimum: 0;
|
|
767
|
+
readonly maximum: 100;
|
|
768
|
+
};
|
|
769
|
+
readonly reasons: {
|
|
770
|
+
readonly type: "array";
|
|
771
|
+
readonly items: {
|
|
772
|
+
readonly type: "string";
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
readonly policy_ids: {
|
|
776
|
+
readonly type: "array";
|
|
777
|
+
readonly items: {
|
|
778
|
+
readonly type: "string";
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
readonly additionalProperties: false;
|
|
783
|
+
};
|
|
784
|
+
readonly evidence: {
|
|
785
|
+
readonly type: "array";
|
|
786
|
+
readonly items: {
|
|
787
|
+
readonly type: "object";
|
|
788
|
+
readonly required: readonly ["id", "label", "source_type"];
|
|
789
|
+
readonly properties: {
|
|
790
|
+
readonly id: {
|
|
791
|
+
readonly type: "string";
|
|
792
|
+
};
|
|
793
|
+
readonly label: {
|
|
794
|
+
readonly type: "string";
|
|
795
|
+
};
|
|
796
|
+
readonly source_type: {
|
|
797
|
+
readonly type: "string";
|
|
798
|
+
};
|
|
799
|
+
readonly source_ref: {
|
|
800
|
+
readonly type: "string";
|
|
801
|
+
};
|
|
802
|
+
readonly summary: {
|
|
803
|
+
readonly type: "string";
|
|
804
|
+
};
|
|
805
|
+
readonly quote: {
|
|
806
|
+
readonly type: "string";
|
|
807
|
+
};
|
|
808
|
+
readonly confidence: {
|
|
809
|
+
readonly type: "number";
|
|
810
|
+
readonly minimum: 0;
|
|
811
|
+
readonly maximum: 1;
|
|
812
|
+
};
|
|
813
|
+
readonly hash: {
|
|
814
|
+
readonly type: "string";
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
readonly additionalProperties: false;
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
readonly user_options: {
|
|
821
|
+
readonly type: "array";
|
|
822
|
+
readonly items: {
|
|
823
|
+
readonly type: "string";
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
readonly expires_at: {
|
|
827
|
+
readonly type: "string";
|
|
828
|
+
readonly format: "date-time";
|
|
829
|
+
};
|
|
830
|
+
readonly metadata: {
|
|
831
|
+
readonly type: "object";
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
readonly additionalProperties: false;
|
|
835
|
+
};
|
|
836
|
+
export type ActionCardFromSchema = z.infer<typeof ActionCardSchema>;
|
|
837
|
+
//# sourceMappingURL=schema.d.ts.map
|