@method-ai-hq/sdk 0.15.1 → 0.16.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/README.md +1 -1
- package/dist/packages/method-document/src/conversion-report.d.ts +2 -2
- package/dist/packages/sdk/package.json +2 -2
- package/dist/packages/sdk/src/authoring-instructions.d.ts +1 -1
- package/dist/packages/sdk/src/authoring-instructions.js +1 -1
- package/dist/packages/sdk/src/current-inspection.d.ts +2 -0
- package/dist/packages/sdk/src/current-inspection.js +26 -17
- package/dist/packages/sdk/src/current-runtime.js +6 -2
- package/dist/packages/sdk/src/failure.d.ts +11 -0
- package/dist/packages/sdk/src/failure.js +25 -0
- package/dist/packages/sdk/src/inspect.js +1 -1
- package/dist/packages/sdk/src/method-help.js +3 -3
- package/dist/packages/sdk/src/method-sync.js +3 -4
- package/dist/packages/sdk/src/method.d.ts +0 -2
- package/dist/packages/sdk/src/method.js +5 -9
- package/dist/packages/sdk/src/production.js +1 -1
- package/dist/packages/sdk/src/run-saved.d.ts +1 -1
- package/dist/packages/sdk/src/run-saved.js +4 -2
- package/dist/packages/sdk/src/run-worker.js +10 -1
- package/dist/packages/sdk/src/worker.js +4 -3
- package/dist/packages/workflow-language/src/inspection.d.ts +260 -126
- package/dist/packages/workflow-language/src/inspection.js +30 -10
- package/package.json +2 -2
|
@@ -1,21 +1,79 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type Json, type Step, type Workflow, type Shape } from "./schema.js";
|
|
3
|
+
export declare const FailureOwnerSchema: z.ZodEnum<["method_code", "agent_work", "outside_service", "limit", "setup", "needs_you", "method_platform"]>;
|
|
4
|
+
export type FailureOwner = z.infer<typeof FailureOwnerSchema>;
|
|
5
|
+
/** The runtime's failure record of a run that stopped: whose problem it is, where in the Method, and the next action. */
|
|
3
6
|
export declare const FailureSchema: z.ZodObject<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
owner: z.ZodEnum<["method_code", "agent_work", "outside_service", "limit", "setup", "needs_you", "method_platform"]>;
|
|
8
|
+
code: z.ZodString;
|
|
9
|
+
headline: z.ZodString;
|
|
10
|
+
step: z.ZodNullable<z.ZodString>;
|
|
11
|
+
step_name: z.ZodNullable<z.ZodString>;
|
|
12
|
+
iteration: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
failed_iterations: z.ZodArray<z.ZodNumber, "many">;
|
|
14
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
phase: z.ZodNullable<z.ZodEnum<["action", "check", "effect", "tool", "setup"]>>;
|
|
16
|
+
check_name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
next: z.ZodObject<{
|
|
18
|
+
action: z.ZodEnum<["fix_method", "run_again", "raise_limit", "fix_setup", "answer", "report_bug"]>;
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
command: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
text: string;
|
|
23
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
24
|
+
command?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
text: string;
|
|
27
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
28
|
+
command?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
+
details: z.ZodOptional<z.ZodString>;
|
|
32
|
+
diagnostics: z.ZodOptional<z.ZodString>;
|
|
8
33
|
}, "strict", z.ZodTypeAny, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
34
|
+
code: string;
|
|
35
|
+
next: {
|
|
36
|
+
text: string;
|
|
37
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
38
|
+
command?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
step: string | null;
|
|
41
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
42
|
+
headline: string;
|
|
43
|
+
step_name: string | null;
|
|
44
|
+
iteration: number | null;
|
|
45
|
+
failed_iterations: number[];
|
|
46
|
+
total: number | null;
|
|
47
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
48
|
+
check_name: string | null;
|
|
49
|
+
evidence?: string[] | undefined;
|
|
50
|
+
details?: string | undefined;
|
|
51
|
+
diagnostics?: string | undefined;
|
|
13
52
|
}, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
53
|
+
code: string;
|
|
54
|
+
next: {
|
|
55
|
+
text: string;
|
|
56
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
57
|
+
command?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
step: string | null;
|
|
60
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
61
|
+
headline: string;
|
|
62
|
+
step_name: string | null;
|
|
63
|
+
iteration: number | null;
|
|
64
|
+
failed_iterations: number[];
|
|
65
|
+
total: number | null;
|
|
66
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
67
|
+
check_name: string | null;
|
|
68
|
+
evidence?: string[] | undefined;
|
|
69
|
+
details?: string | undefined;
|
|
70
|
+
diagnostics?: string | undefined;
|
|
18
71
|
}>;
|
|
72
|
+
export type RunFailure = z.infer<typeof FailureSchema>;
|
|
73
|
+
/** Whose problem a failure is, in a few plain words. */
|
|
74
|
+
export declare function ownerText(owner: FailureOwner): string;
|
|
75
|
+
export declare const RunStatusSchema: z.ZodEnum<["running", "waiting_for_you", "succeeded", "unconfirmed", "failed"]>;
|
|
76
|
+
export type RunStatus = z.infer<typeof RunStatusSchema>;
|
|
19
77
|
export declare const ObservedEffectsSchema: z.ZodUnion<[z.ZodObject<{
|
|
20
78
|
network: z.ZodArray<z.ZodString, "many">;
|
|
21
79
|
reads: z.ZodArray<z.ZodString, "many">;
|
|
@@ -80,14 +138,21 @@ export declare const RunEventSchema: z.ZodObject<{
|
|
|
80
138
|
completed: z.ZodOptional<z.ZodNumber>;
|
|
81
139
|
total: z.ZodOptional<z.ZodNumber>;
|
|
82
140
|
unit: z.ZodOptional<z.ZodString>;
|
|
141
|
+
key: z.ZodOptional<z.ZodString>;
|
|
142
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
83
144
|
}, "strict", z.ZodTypeAny, {
|
|
84
145
|
at: string;
|
|
85
146
|
type: string;
|
|
86
147
|
tool?: string | undefined;
|
|
87
148
|
kind?: "classify" | undefined;
|
|
149
|
+
key?: string | undefined;
|
|
88
150
|
child?: string | undefined;
|
|
89
151
|
model?: string | undefined;
|
|
152
|
+
total?: number | undefined;
|
|
90
153
|
phase?: "check" | "action" | undefined;
|
|
154
|
+
command?: string | undefined;
|
|
155
|
+
diagnostics?: string | undefined;
|
|
91
156
|
provider?: string | undefined;
|
|
92
157
|
request_id?: string | undefined;
|
|
93
158
|
operation_id?: string | undefined;
|
|
@@ -101,20 +166,23 @@ export declare const RunEventSchema: z.ZodObject<{
|
|
|
101
166
|
detail?: string | undefined;
|
|
102
167
|
sequence?: number | undefined;
|
|
103
168
|
call_id?: string | undefined;
|
|
104
|
-
command?: string | undefined;
|
|
105
169
|
exit_code?: number | null | undefined;
|
|
106
|
-
diagnostics?: string | undefined;
|
|
107
170
|
completed?: number | undefined;
|
|
108
|
-
total?: number | undefined;
|
|
109
171
|
unit?: string | undefined;
|
|
172
|
+
attempt?: number | undefined;
|
|
173
|
+
attempts?: number | undefined;
|
|
110
174
|
}, {
|
|
111
175
|
at: string;
|
|
112
176
|
type: string;
|
|
113
177
|
tool?: string | undefined;
|
|
114
178
|
kind?: "classify" | undefined;
|
|
179
|
+
key?: string | undefined;
|
|
115
180
|
child?: string | undefined;
|
|
116
181
|
model?: string | undefined;
|
|
182
|
+
total?: number | undefined;
|
|
117
183
|
phase?: "check" | "action" | undefined;
|
|
184
|
+
command?: string | undefined;
|
|
185
|
+
diagnostics?: string | undefined;
|
|
118
186
|
provider?: string | undefined;
|
|
119
187
|
request_id?: string | undefined;
|
|
120
188
|
operation_id?: string | undefined;
|
|
@@ -128,12 +196,11 @@ export declare const RunEventSchema: z.ZodObject<{
|
|
|
128
196
|
detail?: string | undefined;
|
|
129
197
|
sequence?: number | undefined;
|
|
130
198
|
call_id?: string | undefined;
|
|
131
|
-
command?: string | undefined;
|
|
132
199
|
exit_code?: number | null | undefined;
|
|
133
|
-
diagnostics?: string | undefined;
|
|
134
200
|
completed?: number | undefined;
|
|
135
|
-
total?: number | undefined;
|
|
136
201
|
unit?: string | undefined;
|
|
202
|
+
attempt?: number | undefined;
|
|
203
|
+
attempts?: number | undefined;
|
|
137
204
|
}>;
|
|
138
205
|
export declare const InspectionSchema: z.ZodObject<{
|
|
139
206
|
started_at: z.ZodOptional<z.ZodString>;
|
|
@@ -143,23 +210,72 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
143
210
|
schema: z.ZodLiteral<"workflow-inspection/2">;
|
|
144
211
|
workflow: z.ZodType<import("./schema.js").CurrentWorkflow, z.ZodTypeDef, import("./schema.js").CurrentWorkflow>;
|
|
145
212
|
run_id: z.ZodString;
|
|
146
|
-
status: z.
|
|
147
|
-
error: z.ZodOptional<z.ZodString>;
|
|
213
|
+
status: z.ZodEnum<["running", "waiting_for_you", "succeeded", "unconfirmed", "failed"]>;
|
|
148
214
|
failure: z.ZodOptional<z.ZodObject<{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
215
|
+
owner: z.ZodEnum<["method_code", "agent_work", "outside_service", "limit", "setup", "needs_you", "method_platform"]>;
|
|
216
|
+
code: z.ZodString;
|
|
217
|
+
headline: z.ZodString;
|
|
218
|
+
step: z.ZodNullable<z.ZodString>;
|
|
219
|
+
step_name: z.ZodNullable<z.ZodString>;
|
|
220
|
+
iteration: z.ZodNullable<z.ZodNumber>;
|
|
221
|
+
failed_iterations: z.ZodArray<z.ZodNumber, "many">;
|
|
222
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
phase: z.ZodNullable<z.ZodEnum<["action", "check", "effect", "tool", "setup"]>>;
|
|
224
|
+
check_name: z.ZodNullable<z.ZodString>;
|
|
225
|
+
next: z.ZodObject<{
|
|
226
|
+
action: z.ZodEnum<["fix_method", "run_again", "raise_limit", "fix_setup", "answer", "report_bug"]>;
|
|
227
|
+
text: z.ZodString;
|
|
228
|
+
command: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, "strict", z.ZodTypeAny, {
|
|
230
|
+
text: string;
|
|
231
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
232
|
+
command?: string | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
text: string;
|
|
235
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
236
|
+
command?: string | undefined;
|
|
237
|
+
}>;
|
|
238
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
239
|
+
details: z.ZodOptional<z.ZodString>;
|
|
240
|
+
diagnostics: z.ZodOptional<z.ZodString>;
|
|
153
241
|
}, "strict", z.ZodTypeAny, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
242
|
+
code: string;
|
|
243
|
+
next: {
|
|
244
|
+
text: string;
|
|
245
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
246
|
+
command?: string | undefined;
|
|
247
|
+
};
|
|
248
|
+
step: string | null;
|
|
249
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
250
|
+
headline: string;
|
|
251
|
+
step_name: string | null;
|
|
252
|
+
iteration: number | null;
|
|
253
|
+
failed_iterations: number[];
|
|
254
|
+
total: number | null;
|
|
255
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
256
|
+
check_name: string | null;
|
|
257
|
+
evidence?: string[] | undefined;
|
|
258
|
+
details?: string | undefined;
|
|
259
|
+
diagnostics?: string | undefined;
|
|
158
260
|
}, {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
261
|
+
code: string;
|
|
262
|
+
next: {
|
|
263
|
+
text: string;
|
|
264
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
265
|
+
command?: string | undefined;
|
|
266
|
+
};
|
|
267
|
+
step: string | null;
|
|
268
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
269
|
+
headline: string;
|
|
270
|
+
step_name: string | null;
|
|
271
|
+
iteration: number | null;
|
|
272
|
+
failed_iterations: number[];
|
|
273
|
+
total: number | null;
|
|
274
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
275
|
+
check_name: string | null;
|
|
276
|
+
evidence?: string[] | undefined;
|
|
277
|
+
details?: string | undefined;
|
|
278
|
+
diagnostics?: string | undefined;
|
|
163
279
|
}>>;
|
|
164
280
|
inputs: z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>;
|
|
165
281
|
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
|
|
@@ -310,14 +426,21 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
310
426
|
completed: z.ZodOptional<z.ZodNumber>;
|
|
311
427
|
total: z.ZodOptional<z.ZodNumber>;
|
|
312
428
|
unit: z.ZodOptional<z.ZodString>;
|
|
429
|
+
key: z.ZodOptional<z.ZodString>;
|
|
430
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
431
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
313
432
|
}, "strict", z.ZodTypeAny, {
|
|
314
433
|
at: string;
|
|
315
434
|
type: string;
|
|
316
435
|
tool?: string | undefined;
|
|
317
436
|
kind?: "classify" | undefined;
|
|
437
|
+
key?: string | undefined;
|
|
318
438
|
child?: string | undefined;
|
|
319
439
|
model?: string | undefined;
|
|
440
|
+
total?: number | undefined;
|
|
320
441
|
phase?: "check" | "action" | undefined;
|
|
442
|
+
command?: string | undefined;
|
|
443
|
+
diagnostics?: string | undefined;
|
|
321
444
|
provider?: string | undefined;
|
|
322
445
|
request_id?: string | undefined;
|
|
323
446
|
operation_id?: string | undefined;
|
|
@@ -331,20 +454,23 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
331
454
|
detail?: string | undefined;
|
|
332
455
|
sequence?: number | undefined;
|
|
333
456
|
call_id?: string | undefined;
|
|
334
|
-
command?: string | undefined;
|
|
335
457
|
exit_code?: number | null | undefined;
|
|
336
|
-
diagnostics?: string | undefined;
|
|
337
458
|
completed?: number | undefined;
|
|
338
|
-
total?: number | undefined;
|
|
339
459
|
unit?: string | undefined;
|
|
460
|
+
attempt?: number | undefined;
|
|
461
|
+
attempts?: number | undefined;
|
|
340
462
|
}, {
|
|
341
463
|
at: string;
|
|
342
464
|
type: string;
|
|
343
465
|
tool?: string | undefined;
|
|
344
466
|
kind?: "classify" | undefined;
|
|
467
|
+
key?: string | undefined;
|
|
345
468
|
child?: string | undefined;
|
|
346
469
|
model?: string | undefined;
|
|
470
|
+
total?: number | undefined;
|
|
347
471
|
phase?: "check" | "action" | undefined;
|
|
472
|
+
command?: string | undefined;
|
|
473
|
+
diagnostics?: string | undefined;
|
|
348
474
|
provider?: string | undefined;
|
|
349
475
|
request_id?: string | undefined;
|
|
350
476
|
operation_id?: string | undefined;
|
|
@@ -358,34 +484,16 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
358
484
|
detail?: string | undefined;
|
|
359
485
|
sequence?: number | undefined;
|
|
360
486
|
call_id?: string | undefined;
|
|
361
|
-
command?: string | undefined;
|
|
362
487
|
exit_code?: number | null | undefined;
|
|
363
|
-
diagnostics?: string | undefined;
|
|
364
488
|
completed?: number | undefined;
|
|
365
|
-
total?: number | undefined;
|
|
366
489
|
unit?: string | undefined;
|
|
490
|
+
attempt?: number | undefined;
|
|
491
|
+
attempts?: number | undefined;
|
|
367
492
|
}>, "many">>;
|
|
368
493
|
invocations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
369
494
|
step_id: z.ZodString;
|
|
370
|
-
status: z.
|
|
495
|
+
status: z.ZodEnum<["running", "returned", "passed", "skipped", "waiting_for_you", "failed", "stopped"]>;
|
|
371
496
|
verification: z.ZodOptional<z.ZodEnum<["checked", "unchecked"]>>;
|
|
372
|
-
error: z.ZodOptional<z.ZodString>;
|
|
373
|
-
failure: z.ZodOptional<z.ZodObject<{
|
|
374
|
-
phase: z.ZodEnum<["environment", "input", "action", "check", "change"]>;
|
|
375
|
-
expected: z.ZodString;
|
|
376
|
-
observed: z.ZodString;
|
|
377
|
-
evidence: z.ZodArray<z.ZodString, "many">;
|
|
378
|
-
}, "strict", z.ZodTypeAny, {
|
|
379
|
-
expected: string;
|
|
380
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
381
|
-
observed: string;
|
|
382
|
-
evidence: string[];
|
|
383
|
-
}, {
|
|
384
|
-
expected: string;
|
|
385
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
386
|
-
observed: string;
|
|
387
|
-
evidence: string[];
|
|
388
|
-
}>>;
|
|
389
497
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
|
|
390
498
|
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
|
|
391
499
|
checks: z.ZodArray<z.ZodObject<{
|
|
@@ -459,14 +567,21 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
459
567
|
completed: z.ZodOptional<z.ZodNumber>;
|
|
460
568
|
total: z.ZodOptional<z.ZodNumber>;
|
|
461
569
|
unit: z.ZodOptional<z.ZodString>;
|
|
570
|
+
key: z.ZodOptional<z.ZodString>;
|
|
571
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
572
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
462
573
|
}, "strict", z.ZodTypeAny, {
|
|
463
574
|
at: string;
|
|
464
575
|
type: string;
|
|
465
576
|
tool?: string | undefined;
|
|
466
577
|
kind?: "classify" | undefined;
|
|
578
|
+
key?: string | undefined;
|
|
467
579
|
child?: string | undefined;
|
|
468
580
|
model?: string | undefined;
|
|
581
|
+
total?: number | undefined;
|
|
469
582
|
phase?: "check" | "action" | undefined;
|
|
583
|
+
command?: string | undefined;
|
|
584
|
+
diagnostics?: string | undefined;
|
|
470
585
|
provider?: string | undefined;
|
|
471
586
|
request_id?: string | undefined;
|
|
472
587
|
operation_id?: string | undefined;
|
|
@@ -480,20 +595,23 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
480
595
|
detail?: string | undefined;
|
|
481
596
|
sequence?: number | undefined;
|
|
482
597
|
call_id?: string | undefined;
|
|
483
|
-
command?: string | undefined;
|
|
484
598
|
exit_code?: number | null | undefined;
|
|
485
|
-
diagnostics?: string | undefined;
|
|
486
599
|
completed?: number | undefined;
|
|
487
|
-
total?: number | undefined;
|
|
488
600
|
unit?: string | undefined;
|
|
601
|
+
attempt?: number | undefined;
|
|
602
|
+
attempts?: number | undefined;
|
|
489
603
|
}, {
|
|
490
604
|
at: string;
|
|
491
605
|
type: string;
|
|
492
606
|
tool?: string | undefined;
|
|
493
607
|
kind?: "classify" | undefined;
|
|
608
|
+
key?: string | undefined;
|
|
494
609
|
child?: string | undefined;
|
|
495
610
|
model?: string | undefined;
|
|
611
|
+
total?: number | undefined;
|
|
496
612
|
phase?: "check" | "action" | undefined;
|
|
613
|
+
command?: string | undefined;
|
|
614
|
+
diagnostics?: string | undefined;
|
|
497
615
|
provider?: string | undefined;
|
|
498
616
|
request_id?: string | undefined;
|
|
499
617
|
operation_id?: string | undefined;
|
|
@@ -507,12 +625,11 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
507
625
|
detail?: string | undefined;
|
|
508
626
|
sequence?: number | undefined;
|
|
509
627
|
call_id?: string | undefined;
|
|
510
|
-
command?: string | undefined;
|
|
511
628
|
exit_code?: number | null | undefined;
|
|
512
|
-
diagnostics?: string | undefined;
|
|
513
629
|
completed?: number | undefined;
|
|
514
|
-
total?: number | undefined;
|
|
515
630
|
unit?: string | undefined;
|
|
631
|
+
attempt?: number | undefined;
|
|
632
|
+
attempts?: number | undefined;
|
|
516
633
|
}>, "many">;
|
|
517
634
|
observed_effects: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
518
635
|
network: z.ZodArray<z.ZodString, "many">;
|
|
@@ -543,7 +660,7 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
543
660
|
unavailable: string;
|
|
544
661
|
}>]>>;
|
|
545
662
|
}, "strict", z.ZodTypeAny, {
|
|
546
|
-
status:
|
|
663
|
+
status: "running" | "waiting_for_you" | "failed" | "returned" | "passed" | "skipped" | "stopped";
|
|
547
664
|
checks: {
|
|
548
665
|
method: string;
|
|
549
666
|
id: string;
|
|
@@ -556,9 +673,13 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
556
673
|
type: string;
|
|
557
674
|
tool?: string | undefined;
|
|
558
675
|
kind?: "classify" | undefined;
|
|
676
|
+
key?: string | undefined;
|
|
559
677
|
child?: string | undefined;
|
|
560
678
|
model?: string | undefined;
|
|
679
|
+
total?: number | undefined;
|
|
561
680
|
phase?: "check" | "action" | undefined;
|
|
681
|
+
command?: string | undefined;
|
|
682
|
+
diagnostics?: string | undefined;
|
|
562
683
|
provider?: string | undefined;
|
|
563
684
|
request_id?: string | undefined;
|
|
564
685
|
operation_id?: string | undefined;
|
|
@@ -572,23 +693,15 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
572
693
|
detail?: string | undefined;
|
|
573
694
|
sequence?: number | undefined;
|
|
574
695
|
call_id?: string | undefined;
|
|
575
|
-
command?: string | undefined;
|
|
576
696
|
exit_code?: number | null | undefined;
|
|
577
|
-
diagnostics?: string | undefined;
|
|
578
697
|
completed?: number | undefined;
|
|
579
|
-
total?: number | undefined;
|
|
580
698
|
unit?: string | undefined;
|
|
699
|
+
attempt?: number | undefined;
|
|
700
|
+
attempts?: number | undefined;
|
|
581
701
|
}[];
|
|
582
702
|
step_id: string;
|
|
583
703
|
changes: Record<string, Json>;
|
|
584
|
-
error?: string | undefined;
|
|
585
704
|
inputs?: Record<string, Json> | undefined;
|
|
586
|
-
failure?: {
|
|
587
|
-
expected: string;
|
|
588
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
589
|
-
observed: string;
|
|
590
|
-
evidence: string[];
|
|
591
|
-
} | undefined;
|
|
592
705
|
verification?: "checked" | "unchecked" | undefined;
|
|
593
706
|
outputs?: Record<string, Json> | undefined;
|
|
594
707
|
prompts?: {
|
|
@@ -608,7 +721,7 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
608
721
|
unavailable: string;
|
|
609
722
|
} | undefined;
|
|
610
723
|
}, {
|
|
611
|
-
status:
|
|
724
|
+
status: "running" | "waiting_for_you" | "failed" | "returned" | "passed" | "skipped" | "stopped";
|
|
612
725
|
checks: {
|
|
613
726
|
method: string;
|
|
614
727
|
id: string;
|
|
@@ -621,9 +734,13 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
621
734
|
type: string;
|
|
622
735
|
tool?: string | undefined;
|
|
623
736
|
kind?: "classify" | undefined;
|
|
737
|
+
key?: string | undefined;
|
|
624
738
|
child?: string | undefined;
|
|
625
739
|
model?: string | undefined;
|
|
740
|
+
total?: number | undefined;
|
|
626
741
|
phase?: "check" | "action" | undefined;
|
|
742
|
+
command?: string | undefined;
|
|
743
|
+
diagnostics?: string | undefined;
|
|
627
744
|
provider?: string | undefined;
|
|
628
745
|
request_id?: string | undefined;
|
|
629
746
|
operation_id?: string | undefined;
|
|
@@ -637,23 +754,15 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
637
754
|
detail?: string | undefined;
|
|
638
755
|
sequence?: number | undefined;
|
|
639
756
|
call_id?: string | undefined;
|
|
640
|
-
command?: string | undefined;
|
|
641
757
|
exit_code?: number | null | undefined;
|
|
642
|
-
diagnostics?: string | undefined;
|
|
643
758
|
completed?: number | undefined;
|
|
644
|
-
total?: number | undefined;
|
|
645
759
|
unit?: string | undefined;
|
|
760
|
+
attempt?: number | undefined;
|
|
761
|
+
attempts?: number | undefined;
|
|
646
762
|
}[];
|
|
647
763
|
step_id: string;
|
|
648
764
|
changes: Record<string, Json>;
|
|
649
|
-
error?: string | undefined;
|
|
650
765
|
inputs?: Record<string, Json> | undefined;
|
|
651
|
-
failure?: {
|
|
652
|
-
expected: string;
|
|
653
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
654
|
-
observed: string;
|
|
655
|
-
evidence: string[];
|
|
656
|
-
} | undefined;
|
|
657
766
|
verification?: "checked" | "unchecked" | undefined;
|
|
658
767
|
outputs?: Record<string, Json> | undefined;
|
|
659
768
|
prompts?: {
|
|
@@ -674,7 +783,7 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
674
783
|
} | undefined;
|
|
675
784
|
}>>;
|
|
676
785
|
}, "strict", z.ZodTypeAny, {
|
|
677
|
-
status:
|
|
786
|
+
status: "running" | "waiting_for_you" | "succeeded" | "unconfirmed" | "failed";
|
|
678
787
|
inputs: Record<string, Json>;
|
|
679
788
|
schema: "workflow-inspection/2";
|
|
680
789
|
workflow: import("./schema.js").CurrentWorkflow;
|
|
@@ -685,7 +794,7 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
685
794
|
setup?: string | undefined;
|
|
686
795
|
}>;
|
|
687
796
|
invocations: Record<string, {
|
|
688
|
-
status:
|
|
797
|
+
status: "running" | "waiting_for_you" | "failed" | "returned" | "passed" | "skipped" | "stopped";
|
|
689
798
|
checks: {
|
|
690
799
|
method: string;
|
|
691
800
|
id: string;
|
|
@@ -698,9 +807,13 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
698
807
|
type: string;
|
|
699
808
|
tool?: string | undefined;
|
|
700
809
|
kind?: "classify" | undefined;
|
|
810
|
+
key?: string | undefined;
|
|
701
811
|
child?: string | undefined;
|
|
702
812
|
model?: string | undefined;
|
|
813
|
+
total?: number | undefined;
|
|
703
814
|
phase?: "check" | "action" | undefined;
|
|
815
|
+
command?: string | undefined;
|
|
816
|
+
diagnostics?: string | undefined;
|
|
704
817
|
provider?: string | undefined;
|
|
705
818
|
request_id?: string | undefined;
|
|
706
819
|
operation_id?: string | undefined;
|
|
@@ -714,23 +827,15 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
714
827
|
detail?: string | undefined;
|
|
715
828
|
sequence?: number | undefined;
|
|
716
829
|
call_id?: string | undefined;
|
|
717
|
-
command?: string | undefined;
|
|
718
830
|
exit_code?: number | null | undefined;
|
|
719
|
-
diagnostics?: string | undefined;
|
|
720
831
|
completed?: number | undefined;
|
|
721
|
-
total?: number | undefined;
|
|
722
832
|
unit?: string | undefined;
|
|
833
|
+
attempt?: number | undefined;
|
|
834
|
+
attempts?: number | undefined;
|
|
723
835
|
}[];
|
|
724
836
|
step_id: string;
|
|
725
837
|
changes: Record<string, Json>;
|
|
726
|
-
error?: string | undefined;
|
|
727
838
|
inputs?: Record<string, Json> | undefined;
|
|
728
|
-
failure?: {
|
|
729
|
-
expected: string;
|
|
730
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
731
|
-
observed: string;
|
|
732
|
-
evidence: string[];
|
|
733
|
-
} | undefined;
|
|
734
839
|
verification?: "checked" | "unchecked" | undefined;
|
|
735
840
|
outputs?: Record<string, Json> | undefined;
|
|
736
841
|
prompts?: {
|
|
@@ -772,7 +877,6 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
772
877
|
entrypoint: string;
|
|
773
878
|
} | undefined;
|
|
774
879
|
}[] | undefined;
|
|
775
|
-
error?: string | undefined;
|
|
776
880
|
state?: Record<string, Json> | undefined;
|
|
777
881
|
environment?: Record<string, {
|
|
778
882
|
evidence: string[];
|
|
@@ -784,19 +888,37 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
784
888
|
local_run_directory?: string | undefined;
|
|
785
889
|
content?: "device" | undefined;
|
|
786
890
|
failure?: {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
891
|
+
code: string;
|
|
892
|
+
next: {
|
|
893
|
+
text: string;
|
|
894
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
895
|
+
command?: string | undefined;
|
|
896
|
+
};
|
|
897
|
+
step: string | null;
|
|
898
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
899
|
+
headline: string;
|
|
900
|
+
step_name: string | null;
|
|
901
|
+
iteration: number | null;
|
|
902
|
+
failed_iterations: number[];
|
|
903
|
+
total: number | null;
|
|
904
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
905
|
+
check_name: string | null;
|
|
906
|
+
evidence?: string[] | undefined;
|
|
907
|
+
details?: string | undefined;
|
|
908
|
+
diagnostics?: string | undefined;
|
|
791
909
|
} | undefined;
|
|
792
910
|
events?: {
|
|
793
911
|
at: string;
|
|
794
912
|
type: string;
|
|
795
913
|
tool?: string | undefined;
|
|
796
914
|
kind?: "classify" | undefined;
|
|
915
|
+
key?: string | undefined;
|
|
797
916
|
child?: string | undefined;
|
|
798
917
|
model?: string | undefined;
|
|
918
|
+
total?: number | undefined;
|
|
799
919
|
phase?: "check" | "action" | undefined;
|
|
920
|
+
command?: string | undefined;
|
|
921
|
+
diagnostics?: string | undefined;
|
|
800
922
|
provider?: string | undefined;
|
|
801
923
|
request_id?: string | undefined;
|
|
802
924
|
operation_id?: string | undefined;
|
|
@@ -810,15 +932,14 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
810
932
|
detail?: string | undefined;
|
|
811
933
|
sequence?: number | undefined;
|
|
812
934
|
call_id?: string | undefined;
|
|
813
|
-
command?: string | undefined;
|
|
814
935
|
exit_code?: number | null | undefined;
|
|
815
|
-
diagnostics?: string | undefined;
|
|
816
936
|
completed?: number | undefined;
|
|
817
|
-
total?: number | undefined;
|
|
818
937
|
unit?: string | undefined;
|
|
938
|
+
attempt?: number | undefined;
|
|
939
|
+
attempts?: number | undefined;
|
|
819
940
|
}[] | undefined;
|
|
820
941
|
}, {
|
|
821
|
-
status:
|
|
942
|
+
status: "running" | "waiting_for_you" | "succeeded" | "unconfirmed" | "failed";
|
|
822
943
|
inputs: Record<string, Json>;
|
|
823
944
|
schema: "workflow-inspection/2";
|
|
824
945
|
workflow: import("./schema.js").CurrentWorkflow;
|
|
@@ -829,7 +950,7 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
829
950
|
setup?: string | undefined;
|
|
830
951
|
}>;
|
|
831
952
|
invocations: Record<string, {
|
|
832
|
-
status:
|
|
953
|
+
status: "running" | "waiting_for_you" | "failed" | "returned" | "passed" | "skipped" | "stopped";
|
|
833
954
|
checks: {
|
|
834
955
|
method: string;
|
|
835
956
|
id: string;
|
|
@@ -842,9 +963,13 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
842
963
|
type: string;
|
|
843
964
|
tool?: string | undefined;
|
|
844
965
|
kind?: "classify" | undefined;
|
|
966
|
+
key?: string | undefined;
|
|
845
967
|
child?: string | undefined;
|
|
846
968
|
model?: string | undefined;
|
|
969
|
+
total?: number | undefined;
|
|
847
970
|
phase?: "check" | "action" | undefined;
|
|
971
|
+
command?: string | undefined;
|
|
972
|
+
diagnostics?: string | undefined;
|
|
848
973
|
provider?: string | undefined;
|
|
849
974
|
request_id?: string | undefined;
|
|
850
975
|
operation_id?: string | undefined;
|
|
@@ -858,23 +983,15 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
858
983
|
detail?: string | undefined;
|
|
859
984
|
sequence?: number | undefined;
|
|
860
985
|
call_id?: string | undefined;
|
|
861
|
-
command?: string | undefined;
|
|
862
986
|
exit_code?: number | null | undefined;
|
|
863
|
-
diagnostics?: string | undefined;
|
|
864
987
|
completed?: number | undefined;
|
|
865
|
-
total?: number | undefined;
|
|
866
988
|
unit?: string | undefined;
|
|
989
|
+
attempt?: number | undefined;
|
|
990
|
+
attempts?: number | undefined;
|
|
867
991
|
}[];
|
|
868
992
|
step_id: string;
|
|
869
993
|
changes: Record<string, Json>;
|
|
870
|
-
error?: string | undefined;
|
|
871
994
|
inputs?: Record<string, Json> | undefined;
|
|
872
|
-
failure?: {
|
|
873
|
-
expected: string;
|
|
874
|
-
phase: "check" | "input" | "action" | "environment" | "change";
|
|
875
|
-
observed: string;
|
|
876
|
-
evidence: string[];
|
|
877
|
-
} | undefined;
|
|
878
995
|
verification?: "checked" | "unchecked" | undefined;
|
|
879
996
|
outputs?: Record<string, Json> | undefined;
|
|
880
997
|
prompts?: {
|
|
@@ -916,7 +1033,6 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
916
1033
|
entrypoint: string;
|
|
917
1034
|
} | undefined;
|
|
918
1035
|
}[] | undefined;
|
|
919
|
-
error?: string | undefined;
|
|
920
1036
|
state?: Record<string, Json> | undefined;
|
|
921
1037
|
environment?: Record<string, {
|
|
922
1038
|
evidence: string[];
|
|
@@ -928,19 +1044,37 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
928
1044
|
local_run_directory?: string | undefined;
|
|
929
1045
|
content?: "device" | undefined;
|
|
930
1046
|
failure?: {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1047
|
+
code: string;
|
|
1048
|
+
next: {
|
|
1049
|
+
text: string;
|
|
1050
|
+
action: "answer" | "fix_method" | "run_again" | "raise_limit" | "fix_setup" | "report_bug";
|
|
1051
|
+
command?: string | undefined;
|
|
1052
|
+
};
|
|
1053
|
+
step: string | null;
|
|
1054
|
+
owner: "method_code" | "agent_work" | "outside_service" | "limit" | "setup" | "needs_you" | "method_platform";
|
|
1055
|
+
headline: string;
|
|
1056
|
+
step_name: string | null;
|
|
1057
|
+
iteration: number | null;
|
|
1058
|
+
failed_iterations: number[];
|
|
1059
|
+
total: number | null;
|
|
1060
|
+
phase: "check" | "tool" | "action" | "effect" | "setup" | null;
|
|
1061
|
+
check_name: string | null;
|
|
1062
|
+
evidence?: string[] | undefined;
|
|
1063
|
+
details?: string | undefined;
|
|
1064
|
+
diagnostics?: string | undefined;
|
|
935
1065
|
} | undefined;
|
|
936
1066
|
events?: {
|
|
937
1067
|
at: string;
|
|
938
1068
|
type: string;
|
|
939
1069
|
tool?: string | undefined;
|
|
940
1070
|
kind?: "classify" | undefined;
|
|
1071
|
+
key?: string | undefined;
|
|
941
1072
|
child?: string | undefined;
|
|
942
1073
|
model?: string | undefined;
|
|
1074
|
+
total?: number | undefined;
|
|
943
1075
|
phase?: "check" | "action" | undefined;
|
|
1076
|
+
command?: string | undefined;
|
|
1077
|
+
diagnostics?: string | undefined;
|
|
944
1078
|
provider?: string | undefined;
|
|
945
1079
|
request_id?: string | undefined;
|
|
946
1080
|
operation_id?: string | undefined;
|
|
@@ -954,12 +1088,11 @@ export declare const InspectionSchema: z.ZodObject<{
|
|
|
954
1088
|
detail?: string | undefined;
|
|
955
1089
|
sequence?: number | undefined;
|
|
956
1090
|
call_id?: string | undefined;
|
|
957
|
-
command?: string | undefined;
|
|
958
1091
|
exit_code?: number | null | undefined;
|
|
959
|
-
diagnostics?: string | undefined;
|
|
960
1092
|
completed?: number | undefined;
|
|
961
|
-
total?: number | undefined;
|
|
962
1093
|
unit?: string | undefined;
|
|
1094
|
+
attempt?: number | undefined;
|
|
1095
|
+
attempts?: number | undefined;
|
|
963
1096
|
}[] | undefined;
|
|
964
1097
|
}>;
|
|
965
1098
|
export type RunInspection = z.infer<typeof InspectionSchema>;
|
|
@@ -984,7 +1117,8 @@ export declare function inspectCatalog(workflow: Workflow): {
|
|
|
984
1117
|
export declare function copyInstructions(step: Step, inputs?: Record<string, Json>, resources?: Record<string, unknown>): string;
|
|
985
1118
|
export declare function observedValue(item: InspectItem, inspection: RunInspection, invocation?: string): Json | undefined;
|
|
986
1119
|
/**
|
|
987
|
-
* The device form of a run record (run_data: device). Keep step status, kinds, names, timing, and the
|
|
988
|
-
* prompts, files,
|
|
1120
|
+
* The device form of a run record (run_data: device). Keep step status, kinds, names, timing, task counts, and the failure record without its
|
|
1121
|
+
* evidence, details, and diagnostics. Remove inputs, outputs, prompts, files, event text, and other free text. The server accepts only this
|
|
1122
|
+
* form when an organization keeps run content on devices.
|
|
989
1123
|
*/
|
|
990
1124
|
export declare function deviceOnly(inspection: RunInspection): RunInspection;
|