@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;EAc9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;EAcjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAY5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;EAW3B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;EAWjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;EAUnC,CAAC;AAEH,eAAO,MAAM,eAA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AAO,MAAM,kBAAkB;;;;;;;;;;kBAQpB,CAAC;AAEZ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;kBAUhB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JvB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ActionSurfaceSchema = z.enum([
|
|
3
|
+
"browser",
|
|
4
|
+
"desktop",
|
|
5
|
+
"filesystem",
|
|
6
|
+
"shell",
|
|
7
|
+
"mcp",
|
|
8
|
+
"email",
|
|
9
|
+
"chat",
|
|
10
|
+
"github",
|
|
11
|
+
"calendar",
|
|
12
|
+
"payment",
|
|
13
|
+
"saas",
|
|
14
|
+
"endpoint",
|
|
15
|
+
"unknown"
|
|
16
|
+
]);
|
|
17
|
+
export const ConsequenceClassSchema = z.enum([
|
|
18
|
+
"none",
|
|
19
|
+
"local_visual_change",
|
|
20
|
+
"local_file_write",
|
|
21
|
+
"local_file_delete",
|
|
22
|
+
"external_message_send",
|
|
23
|
+
"external_business_submission",
|
|
24
|
+
"payment_or_purchase",
|
|
25
|
+
"identity_or_permission_change",
|
|
26
|
+
"production_change",
|
|
27
|
+
"code_repository_change",
|
|
28
|
+
"endpoint_or_device_change",
|
|
29
|
+
"sensitive_data_access",
|
|
30
|
+
"unknown"
|
|
31
|
+
]);
|
|
32
|
+
export const ReversibilitySchema = z.enum([
|
|
33
|
+
"cleanly_reversible",
|
|
34
|
+
"compensable",
|
|
35
|
+
"residue_remains",
|
|
36
|
+
"not_cleanly_reversible",
|
|
37
|
+
"irreversible",
|
|
38
|
+
"unknown"
|
|
39
|
+
]);
|
|
40
|
+
export const BlastRadiusSchema = z.enum([
|
|
41
|
+
"none",
|
|
42
|
+
"single_page",
|
|
43
|
+
"single_local_file",
|
|
44
|
+
"workspace",
|
|
45
|
+
"single_user",
|
|
46
|
+
"single_customer",
|
|
47
|
+
"team",
|
|
48
|
+
"organization",
|
|
49
|
+
"public",
|
|
50
|
+
"production",
|
|
51
|
+
"unknown"
|
|
52
|
+
]);
|
|
53
|
+
export const RiskLevelSchema = z.enum([
|
|
54
|
+
"low",
|
|
55
|
+
"medium",
|
|
56
|
+
"high",
|
|
57
|
+
"critical",
|
|
58
|
+
"unknown"
|
|
59
|
+
]);
|
|
60
|
+
export const UserOptionSchema = z.enum([
|
|
61
|
+
"approve_once",
|
|
62
|
+
"approve_always_for_this_target",
|
|
63
|
+
"edit_fields",
|
|
64
|
+
"accept_lesson",
|
|
65
|
+
"reject_lesson",
|
|
66
|
+
"disable_lesson",
|
|
67
|
+
"take_wheel",
|
|
68
|
+
"block",
|
|
69
|
+
"create_rule",
|
|
70
|
+
"request_more_context"
|
|
71
|
+
]);
|
|
72
|
+
export const UserDecisionTypeSchema = z.enum([
|
|
73
|
+
"approve_once",
|
|
74
|
+
"edit_fields",
|
|
75
|
+
"accept_lesson",
|
|
76
|
+
"reject_lesson",
|
|
77
|
+
"disable_lesson",
|
|
78
|
+
"take_wheel",
|
|
79
|
+
"block",
|
|
80
|
+
"create_rule",
|
|
81
|
+
"request_more_context",
|
|
82
|
+
"timeout"
|
|
83
|
+
]);
|
|
84
|
+
export const EvidenceSourceTypeSchema = z.enum([
|
|
85
|
+
"dom",
|
|
86
|
+
"user_instruction",
|
|
87
|
+
"file",
|
|
88
|
+
"screenshot",
|
|
89
|
+
"tool_output",
|
|
90
|
+
"api_response",
|
|
91
|
+
"memory",
|
|
92
|
+
"system_policy",
|
|
93
|
+
"unknown"
|
|
94
|
+
]);
|
|
95
|
+
export const JsonValueSchema = z.lazy(() => z.union([
|
|
96
|
+
z.string(),
|
|
97
|
+
z.number(),
|
|
98
|
+
z.boolean(),
|
|
99
|
+
z.null(),
|
|
100
|
+
z.array(JsonValueSchema),
|
|
101
|
+
z.record(z.string(), JsonValueSchema)
|
|
102
|
+
]));
|
|
103
|
+
export const JsonObjectSchema = z.record(z.string(), JsonValueSchema);
|
|
104
|
+
export const AgentDescriptorSchema = z
|
|
105
|
+
.object({
|
|
106
|
+
id: z.string().optional(),
|
|
107
|
+
name: z.string().min(1),
|
|
108
|
+
runtime: z.string().optional(),
|
|
109
|
+
version: z.string().optional(),
|
|
110
|
+
model: z.string().optional()
|
|
111
|
+
})
|
|
112
|
+
.strict();
|
|
113
|
+
export const BoundingBoxSchema = z
|
|
114
|
+
.object({
|
|
115
|
+
x: z.number(),
|
|
116
|
+
y: z.number(),
|
|
117
|
+
width: z.number(),
|
|
118
|
+
height: z.number()
|
|
119
|
+
})
|
|
120
|
+
.strict();
|
|
121
|
+
export const VisibleTargetSchema = z
|
|
122
|
+
.object({
|
|
123
|
+
surface: ActionSurfaceSchema,
|
|
124
|
+
target_app: z.string().optional(),
|
|
125
|
+
url: z.string().optional(),
|
|
126
|
+
page_title: z.string().optional(),
|
|
127
|
+
selector: z.string().optional(),
|
|
128
|
+
selector_hash: z.string().optional(),
|
|
129
|
+
button_text: z.string().optional(),
|
|
130
|
+
aria_label: z.string().optional(),
|
|
131
|
+
bounding_box: BoundingBoxSchema.optional()
|
|
132
|
+
})
|
|
133
|
+
.strict();
|
|
134
|
+
export const EvidenceItemSchema = z
|
|
135
|
+
.object({
|
|
136
|
+
id: z.string().min(1),
|
|
137
|
+
label: z.string().min(1),
|
|
138
|
+
source_type: EvidenceSourceTypeSchema,
|
|
139
|
+
source_ref: z.string().optional(),
|
|
140
|
+
summary: z.string().optional(),
|
|
141
|
+
quote: z.string().optional(),
|
|
142
|
+
confidence: z.number().min(0).max(1).optional(),
|
|
143
|
+
hash: z.string().optional()
|
|
144
|
+
})
|
|
145
|
+
.strict();
|
|
146
|
+
export const ChangedFieldSchema = z
|
|
147
|
+
.object({
|
|
148
|
+
field: z.string().min(1),
|
|
149
|
+
before: JsonValueSchema.optional(),
|
|
150
|
+
after: JsonValueSchema,
|
|
151
|
+
evidence_ids: z.array(z.string()).optional(),
|
|
152
|
+
editable: z.boolean().optional()
|
|
153
|
+
})
|
|
154
|
+
.strict();
|
|
155
|
+
export const ConsequenceDescriptorSchema = z
|
|
156
|
+
.object({
|
|
157
|
+
class: ConsequenceClassSchema,
|
|
158
|
+
label: z.string().min(1),
|
|
159
|
+
description: z.string().optional(),
|
|
160
|
+
reversibility: ReversibilitySchema,
|
|
161
|
+
blast_radius: BlastRadiusSchema,
|
|
162
|
+
requires_confirmation: z.boolean(),
|
|
163
|
+
possible_residue: z.array(z.string()).optional(),
|
|
164
|
+
compensation_hint: z.string().optional()
|
|
165
|
+
})
|
|
166
|
+
.strict();
|
|
167
|
+
export const RiskDescriptorSchema = z
|
|
168
|
+
.object({
|
|
169
|
+
level: RiskLevelSchema,
|
|
170
|
+
score: z.number().min(0).max(100).optional(),
|
|
171
|
+
reasons: z.array(z.string()),
|
|
172
|
+
policy_ids: z.array(z.string()).optional()
|
|
173
|
+
})
|
|
174
|
+
.strict();
|
|
175
|
+
export const ProposedActionSchema = z
|
|
176
|
+
.object({
|
|
177
|
+
id: z.string().min(1),
|
|
178
|
+
kind: z.string().min(1),
|
|
179
|
+
label: z.string().min(1),
|
|
180
|
+
description: z.string().optional(),
|
|
181
|
+
surface: ActionSurfaceSchema,
|
|
182
|
+
target: VisibleTargetSchema,
|
|
183
|
+
changed_fields: z.array(ChangedFieldSchema).optional(),
|
|
184
|
+
raw: JsonObjectSchema.optional()
|
|
185
|
+
})
|
|
186
|
+
.strict();
|
|
187
|
+
export const ActionCardSchema = z
|
|
188
|
+
.object({
|
|
189
|
+
type: z.literal("agentclutch.action_card.v0"),
|
|
190
|
+
id: z.string().min(1),
|
|
191
|
+
run_id: z.string().min(1),
|
|
192
|
+
created_at: z.string().datetime(),
|
|
193
|
+
agent: AgentDescriptorSchema,
|
|
194
|
+
proposed_action: ProposedActionSchema,
|
|
195
|
+
consequence: ConsequenceDescriptorSchema,
|
|
196
|
+
risk: RiskDescriptorSchema,
|
|
197
|
+
evidence: z.array(EvidenceItemSchema),
|
|
198
|
+
user_options: z.array(UserOptionSchema),
|
|
199
|
+
expires_at: z.string().datetime().optional(),
|
|
200
|
+
metadata: JsonObjectSchema.optional()
|
|
201
|
+
})
|
|
202
|
+
.strict();
|
|
203
|
+
export const ActorDescriptorSchema = z
|
|
204
|
+
.object({
|
|
205
|
+
id: z.string().optional(),
|
|
206
|
+
display_name: z.string().optional()
|
|
207
|
+
})
|
|
208
|
+
.strict();
|
|
209
|
+
export const UserDecisionSchema = z
|
|
210
|
+
.object({
|
|
211
|
+
type: z.literal("agentclutch.user_decision.v0"),
|
|
212
|
+
id: z.string().min(1),
|
|
213
|
+
action_card_id: z.string().min(1),
|
|
214
|
+
run_id: z.string().min(1),
|
|
215
|
+
decided_at: z.string().datetime(),
|
|
216
|
+
decision: UserDecisionTypeSchema,
|
|
217
|
+
edited_fields: z.array(ChangedFieldSchema).optional(),
|
|
218
|
+
reason: z.string().optional(),
|
|
219
|
+
rule: JsonObjectSchema.optional(),
|
|
220
|
+
actor: ActorDescriptorSchema.optional()
|
|
221
|
+
})
|
|
222
|
+
.strict();
|
|
223
|
+
export const InterventionEventSchema = z
|
|
224
|
+
.object({
|
|
225
|
+
type: z.literal("agentclutch.intervention_event.v0"),
|
|
226
|
+
id: z.string().min(1),
|
|
227
|
+
run_id: z.string().min(1),
|
|
228
|
+
action_card_id: z.string().optional(),
|
|
229
|
+
timestamp: z.string().datetime(),
|
|
230
|
+
event: z.enum([
|
|
231
|
+
"pause",
|
|
232
|
+
"resume",
|
|
233
|
+
"approve",
|
|
234
|
+
"edit",
|
|
235
|
+
"take_wheel",
|
|
236
|
+
"block",
|
|
237
|
+
"rule_created",
|
|
238
|
+
"timeout"
|
|
239
|
+
]),
|
|
240
|
+
summary: z.string(),
|
|
241
|
+
data: JsonObjectSchema.optional()
|
|
242
|
+
})
|
|
243
|
+
.strict();
|
|
244
|
+
export const PerceptionElementSchema = z
|
|
245
|
+
.object({
|
|
246
|
+
selector: z.string().optional(),
|
|
247
|
+
role: z.string().optional(),
|
|
248
|
+
label: z.string().optional(),
|
|
249
|
+
text: z.string().optional(),
|
|
250
|
+
clickable: z.boolean().optional(),
|
|
251
|
+
consequential_hint: z.boolean().optional(),
|
|
252
|
+
bounding_box: BoundingBoxSchema.optional()
|
|
253
|
+
})
|
|
254
|
+
.strict();
|
|
255
|
+
export const PerceptionFrameSchema = z
|
|
256
|
+
.object({
|
|
257
|
+
type: z.literal("agentclutch.perception_frame.v0"),
|
|
258
|
+
id: z.string().min(1),
|
|
259
|
+
run_id: z.string().min(1),
|
|
260
|
+
timestamp: z.string().datetime(),
|
|
261
|
+
surface: ActionSurfaceSchema,
|
|
262
|
+
visible_text: z.string().optional(),
|
|
263
|
+
url: z.string().optional(),
|
|
264
|
+
page_title: z.string().optional(),
|
|
265
|
+
elements: z.array(PerceptionElementSchema).optional()
|
|
266
|
+
})
|
|
267
|
+
.strict();
|
|
268
|
+
export const RunStoryStepSchema = z
|
|
269
|
+
.object({
|
|
270
|
+
timestamp: z.string().datetime(),
|
|
271
|
+
actor: z.enum(["agent", "user", "system"]),
|
|
272
|
+
text: z.string(),
|
|
273
|
+
action_card_id: z.string().optional(),
|
|
274
|
+
decision_id: z.string().optional()
|
|
275
|
+
})
|
|
276
|
+
.strict();
|
|
277
|
+
export const RunStorySchema = z
|
|
278
|
+
.object({
|
|
279
|
+
type: z.literal("agentclutch.run_story.v0"),
|
|
280
|
+
id: z.string().min(1),
|
|
281
|
+
run_id: z.string().min(1),
|
|
282
|
+
created_at: z.string().datetime(),
|
|
283
|
+
title: z.string(),
|
|
284
|
+
summary: z.string(),
|
|
285
|
+
steps: z.array(RunStoryStepSchema)
|
|
286
|
+
})
|
|
287
|
+
.strict();
|
|
288
|
+
export const ActionCardJsonSchema = {
|
|
289
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
290
|
+
$id: "https://agentclutch.dev/schemas/action-card.schema.json",
|
|
291
|
+
title: "AgentClutch Action Card v0",
|
|
292
|
+
type: "object",
|
|
293
|
+
required: [
|
|
294
|
+
"type",
|
|
295
|
+
"id",
|
|
296
|
+
"run_id",
|
|
297
|
+
"created_at",
|
|
298
|
+
"agent",
|
|
299
|
+
"proposed_action",
|
|
300
|
+
"consequence",
|
|
301
|
+
"risk",
|
|
302
|
+
"evidence",
|
|
303
|
+
"user_options"
|
|
304
|
+
],
|
|
305
|
+
properties: {
|
|
306
|
+
type: { const: "agentclutch.action_card.v0" },
|
|
307
|
+
id: { type: "string", minLength: 1 },
|
|
308
|
+
run_id: { type: "string", minLength: 1 },
|
|
309
|
+
created_at: { type: "string", format: "date-time" },
|
|
310
|
+
agent: {
|
|
311
|
+
type: "object",
|
|
312
|
+
required: ["name"],
|
|
313
|
+
properties: {
|
|
314
|
+
id: { type: "string" },
|
|
315
|
+
name: { type: "string" },
|
|
316
|
+
runtime: { type: "string" },
|
|
317
|
+
version: { type: "string" },
|
|
318
|
+
model: { type: "string" }
|
|
319
|
+
},
|
|
320
|
+
additionalProperties: false
|
|
321
|
+
},
|
|
322
|
+
proposed_action: {
|
|
323
|
+
type: "object",
|
|
324
|
+
required: ["id", "kind", "label", "surface", "target"],
|
|
325
|
+
properties: {
|
|
326
|
+
id: { type: "string" },
|
|
327
|
+
kind: { type: "string" },
|
|
328
|
+
label: { type: "string" },
|
|
329
|
+
description: { type: "string" },
|
|
330
|
+
surface: { type: "string" },
|
|
331
|
+
target: {
|
|
332
|
+
type: "object",
|
|
333
|
+
required: ["surface"],
|
|
334
|
+
properties: {
|
|
335
|
+
surface: { type: "string" },
|
|
336
|
+
target_app: { type: "string" },
|
|
337
|
+
url: { type: "string" },
|
|
338
|
+
page_title: { type: "string" },
|
|
339
|
+
selector: { type: "string" },
|
|
340
|
+
selector_hash: { type: "string" },
|
|
341
|
+
button_text: { type: "string" },
|
|
342
|
+
aria_label: { type: "string" },
|
|
343
|
+
bounding_box: {
|
|
344
|
+
type: "object",
|
|
345
|
+
required: ["x", "y", "width", "height"],
|
|
346
|
+
properties: {
|
|
347
|
+
x: { type: "number" },
|
|
348
|
+
y: { type: "number" },
|
|
349
|
+
width: { type: "number" },
|
|
350
|
+
height: { type: "number" }
|
|
351
|
+
},
|
|
352
|
+
additionalProperties: false
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
additionalProperties: false
|
|
356
|
+
},
|
|
357
|
+
changed_fields: {
|
|
358
|
+
type: "array",
|
|
359
|
+
items: {
|
|
360
|
+
type: "object",
|
|
361
|
+
required: ["field", "after"],
|
|
362
|
+
properties: {
|
|
363
|
+
field: { type: "string" },
|
|
364
|
+
before: true,
|
|
365
|
+
after: true,
|
|
366
|
+
evidence_ids: {
|
|
367
|
+
type: "array",
|
|
368
|
+
items: { type: "string" }
|
|
369
|
+
},
|
|
370
|
+
editable: { type: "boolean" }
|
|
371
|
+
},
|
|
372
|
+
additionalProperties: false
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
raw: { type: "object" }
|
|
376
|
+
},
|
|
377
|
+
additionalProperties: false
|
|
378
|
+
},
|
|
379
|
+
consequence: {
|
|
380
|
+
type: "object",
|
|
381
|
+
required: [
|
|
382
|
+
"class",
|
|
383
|
+
"label",
|
|
384
|
+
"reversibility",
|
|
385
|
+
"blast_radius",
|
|
386
|
+
"requires_confirmation"
|
|
387
|
+
],
|
|
388
|
+
properties: {
|
|
389
|
+
class: { type: "string" },
|
|
390
|
+
label: { type: "string" },
|
|
391
|
+
description: { type: "string" },
|
|
392
|
+
reversibility: { type: "string" },
|
|
393
|
+
blast_radius: { type: "string" },
|
|
394
|
+
requires_confirmation: { type: "boolean" },
|
|
395
|
+
possible_residue: {
|
|
396
|
+
type: "array",
|
|
397
|
+
items: { type: "string" }
|
|
398
|
+
},
|
|
399
|
+
compensation_hint: { type: "string" }
|
|
400
|
+
},
|
|
401
|
+
additionalProperties: false
|
|
402
|
+
},
|
|
403
|
+
risk: {
|
|
404
|
+
type: "object",
|
|
405
|
+
required: ["level", "reasons"],
|
|
406
|
+
properties: {
|
|
407
|
+
level: { type: "string" },
|
|
408
|
+
score: { type: "number", minimum: 0, maximum: 100 },
|
|
409
|
+
reasons: {
|
|
410
|
+
type: "array",
|
|
411
|
+
items: { type: "string" }
|
|
412
|
+
},
|
|
413
|
+
policy_ids: {
|
|
414
|
+
type: "array",
|
|
415
|
+
items: { type: "string" }
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
additionalProperties: false
|
|
419
|
+
},
|
|
420
|
+
evidence: {
|
|
421
|
+
type: "array",
|
|
422
|
+
items: {
|
|
423
|
+
type: "object",
|
|
424
|
+
required: ["id", "label", "source_type"],
|
|
425
|
+
properties: {
|
|
426
|
+
id: { type: "string" },
|
|
427
|
+
label: { type: "string" },
|
|
428
|
+
source_type: { type: "string" },
|
|
429
|
+
source_ref: { type: "string" },
|
|
430
|
+
summary: { type: "string" },
|
|
431
|
+
quote: { type: "string" },
|
|
432
|
+
confidence: { type: "number", minimum: 0, maximum: 1 },
|
|
433
|
+
hash: { type: "string" }
|
|
434
|
+
},
|
|
435
|
+
additionalProperties: false
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
user_options: {
|
|
439
|
+
type: "array",
|
|
440
|
+
items: { type: "string" }
|
|
441
|
+
},
|
|
442
|
+
expires_at: { type: "string", format: "date-time" },
|
|
443
|
+
metadata: { type: "object" }
|
|
444
|
+
},
|
|
445
|
+
additionalProperties: false
|
|
446
|
+
};
|
|
447
|
+
//# sourceMappingURL=schema.js.map
|
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Q,EAAE;oBACzB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;oBACtD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBACzB;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B;QACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;QACnD,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC7B;IACD,oBAAoB,EAAE,KAAK;CACnB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export type ISODateTime = string;
|
|
2
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
3
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
4
|
+
export type JsonObject = {
|
|
5
|
+
[key: string]: JsonValue;
|
|
6
|
+
};
|
|
7
|
+
export type ActionSurface = "browser" | "desktop" | "filesystem" | "shell" | "mcp" | "email" | "chat" | "github" | "calendar" | "payment" | "saas" | "endpoint" | "unknown";
|
|
8
|
+
export type ConsequenceClass = "none" | "local_visual_change" | "local_file_write" | "local_file_delete" | "external_message_send" | "external_business_submission" | "payment_or_purchase" | "identity_or_permission_change" | "production_change" | "code_repository_change" | "endpoint_or_device_change" | "sensitive_data_access" | "unknown";
|
|
9
|
+
export type Reversibility = "cleanly_reversible" | "compensable" | "residue_remains" | "not_cleanly_reversible" | "irreversible" | "unknown";
|
|
10
|
+
export type BlastRadius = "none" | "single_page" | "single_local_file" | "workspace" | "single_user" | "single_customer" | "team" | "organization" | "public" | "production" | "unknown";
|
|
11
|
+
export type RiskLevel = "low" | "medium" | "high" | "critical" | "unknown";
|
|
12
|
+
export type UserOption = "approve_once" | "approve_always_for_this_target" | "edit_fields" | "accept_lesson" | "reject_lesson" | "disable_lesson" | "take_wheel" | "block" | "create_rule" | "request_more_context";
|
|
13
|
+
export interface AgentDescriptor {
|
|
14
|
+
id?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
runtime?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface BoundingBox {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}
|
|
26
|
+
export interface VisibleTarget {
|
|
27
|
+
surface: ActionSurface;
|
|
28
|
+
target_app?: string;
|
|
29
|
+
url?: string;
|
|
30
|
+
page_title?: string;
|
|
31
|
+
selector?: string;
|
|
32
|
+
selector_hash?: string;
|
|
33
|
+
button_text?: string;
|
|
34
|
+
aria_label?: string;
|
|
35
|
+
bounding_box?: BoundingBox;
|
|
36
|
+
}
|
|
37
|
+
export type EvidenceSourceType = "dom" | "user_instruction" | "file" | "screenshot" | "tool_output" | "api_response" | "memory" | "system_policy" | "unknown";
|
|
38
|
+
export interface EvidenceItem {
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
source_type: EvidenceSourceType;
|
|
42
|
+
source_ref?: string;
|
|
43
|
+
summary?: string;
|
|
44
|
+
quote?: string;
|
|
45
|
+
confidence?: number;
|
|
46
|
+
hash?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ChangedField {
|
|
49
|
+
field: string;
|
|
50
|
+
before?: JsonValue;
|
|
51
|
+
after: JsonValue;
|
|
52
|
+
evidence_ids?: string[];
|
|
53
|
+
editable?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface ConsequenceDescriptor {
|
|
56
|
+
class: ConsequenceClass;
|
|
57
|
+
label: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
reversibility: Reversibility;
|
|
60
|
+
blast_radius: BlastRadius;
|
|
61
|
+
requires_confirmation: boolean;
|
|
62
|
+
possible_residue?: string[];
|
|
63
|
+
compensation_hint?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface RiskDescriptor {
|
|
66
|
+
level: RiskLevel;
|
|
67
|
+
score?: number;
|
|
68
|
+
reasons: string[];
|
|
69
|
+
policy_ids?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface ProposedAction {
|
|
72
|
+
id: string;
|
|
73
|
+
kind: string;
|
|
74
|
+
label: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
surface: ActionSurface;
|
|
77
|
+
target: VisibleTarget;
|
|
78
|
+
changed_fields?: ChangedField[];
|
|
79
|
+
raw?: JsonObject;
|
|
80
|
+
}
|
|
81
|
+
export interface ActionCard {
|
|
82
|
+
type: "agentclutch.action_card.v0";
|
|
83
|
+
id: string;
|
|
84
|
+
run_id: string;
|
|
85
|
+
created_at: ISODateTime;
|
|
86
|
+
agent: AgentDescriptor;
|
|
87
|
+
proposed_action: ProposedAction;
|
|
88
|
+
consequence: ConsequenceDescriptor;
|
|
89
|
+
risk: RiskDescriptor;
|
|
90
|
+
evidence: EvidenceItem[];
|
|
91
|
+
user_options: UserOption[];
|
|
92
|
+
expires_at?: ISODateTime;
|
|
93
|
+
metadata?: JsonObject;
|
|
94
|
+
}
|
|
95
|
+
export type UserDecisionType = "approve_once" | "edit_fields" | "accept_lesson" | "reject_lesson" | "disable_lesson" | "take_wheel" | "block" | "create_rule" | "request_more_context" | "timeout";
|
|
96
|
+
export interface UserDecision {
|
|
97
|
+
type: "agentclutch.user_decision.v0";
|
|
98
|
+
id: string;
|
|
99
|
+
action_card_id: string;
|
|
100
|
+
run_id: string;
|
|
101
|
+
decided_at: ISODateTime;
|
|
102
|
+
decision: UserDecisionType;
|
|
103
|
+
edited_fields?: ChangedField[];
|
|
104
|
+
reason?: string;
|
|
105
|
+
rule?: JsonObject;
|
|
106
|
+
actor?: {
|
|
107
|
+
id?: string;
|
|
108
|
+
display_name?: string;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface InterventionEvent {
|
|
112
|
+
type: "agentclutch.intervention_event.v0";
|
|
113
|
+
id: string;
|
|
114
|
+
run_id: string;
|
|
115
|
+
action_card_id?: string;
|
|
116
|
+
timestamp: ISODateTime;
|
|
117
|
+
event: "pause" | "resume" | "approve" | "edit" | "take_wheel" | "block" | "rule_created" | "timeout";
|
|
118
|
+
summary: string;
|
|
119
|
+
data?: JsonObject;
|
|
120
|
+
}
|
|
121
|
+
export interface PerceptionElement {
|
|
122
|
+
selector?: string;
|
|
123
|
+
role?: string;
|
|
124
|
+
label?: string;
|
|
125
|
+
text?: string;
|
|
126
|
+
clickable?: boolean;
|
|
127
|
+
consequential_hint?: boolean;
|
|
128
|
+
bounding_box?: BoundingBox;
|
|
129
|
+
}
|
|
130
|
+
export interface PerceptionFrame {
|
|
131
|
+
type: "agentclutch.perception_frame.v0";
|
|
132
|
+
id: string;
|
|
133
|
+
run_id: string;
|
|
134
|
+
timestamp: ISODateTime;
|
|
135
|
+
surface: ActionSurface;
|
|
136
|
+
visible_text?: string;
|
|
137
|
+
url?: string;
|
|
138
|
+
page_title?: string;
|
|
139
|
+
elements?: PerceptionElement[];
|
|
140
|
+
}
|
|
141
|
+
export interface RunStoryStep {
|
|
142
|
+
timestamp: ISODateTime;
|
|
143
|
+
actor: "agent" | "user" | "system";
|
|
144
|
+
text: string;
|
|
145
|
+
action_card_id?: string;
|
|
146
|
+
decision_id?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface RunStory {
|
|
149
|
+
type: "agentclutch.run_story.v0";
|
|
150
|
+
id: string;
|
|
151
|
+
run_id: string;
|
|
152
|
+
created_at: ISODateTime;
|
|
153
|
+
title: string;
|
|
154
|
+
summary: string;
|
|
155
|
+
steps: RunStoryStep[];
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA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AC,EAAE,WAAW,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,iCAAiC,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,0BAA0B,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ZodIssue } from "zod";
|
|
2
|
+
import type { ActionCard } from "./types.js";
|
|
3
|
+
export declare class ActionCardValidationError extends Error {
|
|
4
|
+
readonly issues: ZodIssue[];
|
|
5
|
+
constructor(message: string, issues: ZodIssue[]);
|
|
6
|
+
}
|
|
7
|
+
export interface ActionCardValidationSuccess {
|
|
8
|
+
success: true;
|
|
9
|
+
data: ActionCard;
|
|
10
|
+
}
|
|
11
|
+
export interface ActionCardValidationFailure {
|
|
12
|
+
success: false;
|
|
13
|
+
issues: ZodIssue[];
|
|
14
|
+
}
|
|
15
|
+
export type ActionCardValidationResult = ActionCardValidationSuccess | ActionCardValidationFailure;
|
|
16
|
+
export declare function parseActionCard(value: unknown): ActionCard;
|
|
17
|
+
export declare function validateActionCard(value: unknown): ActionCardValidationResult;
|
|
18
|
+
export declare function isActionCard(value: unknown): value is ActionCard;
|
|
19
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,SAAgB,MAAM,EAAE,QAAQ,EAAE,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE;CAKhD;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,0BAA0B,GAClC,2BAA2B,GAC3B,2BAA2B,CAAC;AAEhC,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAW1D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAc7E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
|