@artemiskit/core 0.5.2 → 0.6.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/adapters/factory.d.ts +1 -1
  3. package/dist/adapters/index.d.ts +3 -3
  4. package/dist/adapters/registry.d.ts +1 -1
  5. package/dist/agent-evaluation/index.d.ts +2 -2
  6. package/dist/agent-evaluation/scorer.d.ts +1 -1
  7. package/dist/agent-workflow/catalog.d.ts +27 -0
  8. package/dist/agent-workflow/catalog.d.ts.map +1 -0
  9. package/dist/agent-workflow/index.d.ts +7 -0
  10. package/dist/agent-workflow/index.d.ts.map +1 -0
  11. package/dist/agent-workflow/parser.d.ts +7 -0
  12. package/dist/agent-workflow/parser.d.ts.map +1 -0
  13. package/dist/agent-workflow/schema.d.ts +664 -0
  14. package/dist/agent-workflow/schema.d.ts.map +1 -0
  15. package/dist/agent-workflow/simulated-tools.d.ts +35 -0
  16. package/dist/agent-workflow/simulated-tools.d.ts.map +1 -0
  17. package/dist/agent-workflow/target.d.ts +230 -0
  18. package/dist/agent-workflow/target.d.ts.map +1 -0
  19. package/dist/artifacts/index.d.ts +2 -2
  20. package/dist/artifacts/manifest.d.ts +1 -1
  21. package/dist/artifacts/types.d.ts +2 -2
  22. package/dist/comparison/eligibility.d.ts +26 -0
  23. package/dist/comparison/eligibility.d.ts.map +1 -0
  24. package/dist/comparison/index.d.ts +2 -0
  25. package/dist/comparison/index.d.ts.map +1 -0
  26. package/dist/evaluators/combined.d.ts +2 -2
  27. package/dist/evaluators/contains.d.ts +2 -2
  28. package/dist/evaluators/exact.d.ts +2 -2
  29. package/dist/evaluators/fuzzy.d.ts +2 -2
  30. package/dist/evaluators/index.d.ts +13 -13
  31. package/dist/evaluators/inline.d.ts +2 -2
  32. package/dist/evaluators/json-schema.d.ts +2 -2
  33. package/dist/evaluators/llm-grader.d.ts +2 -2
  34. package/dist/evaluators/not-contains.d.ts +2 -2
  35. package/dist/evaluators/regex.d.ts +2 -2
  36. package/dist/evaluators/similarity.d.ts +2 -2
  37. package/dist/evaluators/tool-trace.d.ts +2 -2
  38. package/dist/evaluators/types.d.ts +3 -3
  39. package/dist/index.d.ts +15 -13
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +16346 -14967
  42. package/dist/provenance/execution-provenance.d.ts +1 -1
  43. package/dist/provenance/git.d.ts +1 -1
  44. package/dist/provenance/index.d.ts +4 -4
  45. package/dist/provenance/workload-identity.d.ts +2 -2
  46. package/dist/redaction/index.d.ts +2 -2
  47. package/dist/redaction/redactor.d.ts +1 -1
  48. package/dist/runner/executor.d.ts +3 -3
  49. package/dist/runner/index.d.ts +3 -3
  50. package/dist/runner/runner.d.ts +1 -1
  51. package/dist/runner/types.d.ts +5 -5
  52. package/dist/scenario/index.d.ts +4 -4
  53. package/dist/scenario/parser.d.ts +1 -1
  54. package/dist/scenario/variables.d.ts +1 -1
  55. package/dist/storage/factory.d.ts +1 -1
  56. package/dist/storage/index.d.ts +4 -4
  57. package/dist/storage/local.d.ts +2 -2
  58. package/dist/storage/local.d.ts.map +1 -1
  59. package/dist/storage/supabase.d.ts +2 -2
  60. package/dist/storage/supabase.d.ts.map +1 -1
  61. package/dist/storage/types.d.ts +6 -2
  62. package/dist/storage/types.d.ts.map +1 -1
  63. package/dist/tools/fixture-executor.d.ts +2 -2
  64. package/dist/tools/index.d.ts +3 -3
  65. package/dist/tools/types.d.ts +1 -1
  66. package/dist/utils/index.d.ts +2 -2
  67. package/dist/validator/index.d.ts +2 -2
  68. package/dist/validator/validator.d.ts +1 -1
  69. package/package.json +4 -4
  70. package/src/agent-workflow/catalog.ts +219 -0
  71. package/src/agent-workflow/index.ts +6 -0
  72. package/src/agent-workflow/parser.ts +43 -0
  73. package/src/agent-workflow/schema.test.ts +218 -0
  74. package/src/agent-workflow/schema.ts +254 -0
  75. package/src/agent-workflow/simulated-tools.test.ts +177 -0
  76. package/src/agent-workflow/simulated-tools.ts +230 -0
  77. package/src/agent-workflow/target.test.ts +276 -0
  78. package/src/agent-workflow/target.ts +292 -0
  79. package/src/comparison/eligibility.test.ts +101 -0
  80. package/src/comparison/eligibility.ts +116 -0
  81. package/src/comparison/index.ts +8 -0
  82. package/src/index.ts +6 -0
  83. package/src/storage/local.test.ts +39 -0
  84. package/src/storage/local.ts +9 -1
  85. package/src/storage/supabase.ts +9 -1
  86. package/src/storage/types.ts +5 -1
@@ -0,0 +1,664 @@
1
+ import { z } from 'zod';
2
+ export type WorkflowJson = null | boolean | number | string | WorkflowJson[] | {
3
+ [key: string]: WorkflowJson;
4
+ };
5
+ /** Limit both recursive work and retained fixture size before schema parsing/cloning. */
6
+ export declare function isWorkflowJson(value: unknown): value is WorkflowJson;
7
+ export declare function isWorkflowRelativePath(value: string): boolean;
8
+ export declare const WorkflowPolicySchema: z.ZodObject<{
9
+ network: z.ZodLiteral<"denied">;
10
+ side_effects: z.ZodEnum<["denied", "approval_required"]>;
11
+ permissions: z.ZodObject<{
12
+ documents: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
13
+ records: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
14
+ files: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
15
+ workflow_state: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
16
+ communication: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
17
+ coordination: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ documents?: "read" | "write" | undefined;
20
+ records?: "read" | "write" | undefined;
21
+ files?: "read" | "write" | undefined;
22
+ workflow_state?: "read" | "write" | undefined;
23
+ communication?: "read" | "write" | undefined;
24
+ coordination?: "read" | "write" | undefined;
25
+ }, {
26
+ documents?: "read" | "write" | undefined;
27
+ records?: "read" | "write" | undefined;
28
+ files?: "read" | "write" | undefined;
29
+ workflow_state?: "read" | "write" | undefined;
30
+ communication?: "read" | "write" | undefined;
31
+ coordination?: "read" | "write" | undefined;
32
+ }>;
33
+ budgets: z.ZodObject<{
34
+ max_actions: z.ZodNumber;
35
+ max_tool_calls: z.ZodOptional<z.ZodNumber>;
36
+ timeout_ms: z.ZodNumber;
37
+ max_tokens: z.ZodOptional<z.ZodNumber>;
38
+ }, "strict", z.ZodTypeAny, {
39
+ max_actions: number;
40
+ timeout_ms: number;
41
+ max_tokens?: number | undefined;
42
+ max_tool_calls?: number | undefined;
43
+ }, {
44
+ max_actions: number;
45
+ timeout_ms: number;
46
+ max_tokens?: number | undefined;
47
+ max_tool_calls?: number | undefined;
48
+ }>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ network: "denied";
51
+ side_effects: "denied" | "approval_required";
52
+ permissions: {
53
+ documents?: "read" | "write" | undefined;
54
+ records?: "read" | "write" | undefined;
55
+ files?: "read" | "write" | undefined;
56
+ workflow_state?: "read" | "write" | undefined;
57
+ communication?: "read" | "write" | undefined;
58
+ coordination?: "read" | "write" | undefined;
59
+ };
60
+ budgets: {
61
+ max_actions: number;
62
+ timeout_ms: number;
63
+ max_tokens?: number | undefined;
64
+ max_tool_calls?: number | undefined;
65
+ };
66
+ }, {
67
+ network: "denied";
68
+ side_effects: "denied" | "approval_required";
69
+ permissions: {
70
+ documents?: "read" | "write" | undefined;
71
+ records?: "read" | "write" | undefined;
72
+ files?: "read" | "write" | undefined;
73
+ workflow_state?: "read" | "write" | undefined;
74
+ communication?: "read" | "write" | undefined;
75
+ coordination?: "read" | "write" | undefined;
76
+ };
77
+ budgets: {
78
+ max_actions: number;
79
+ timeout_ms: number;
80
+ max_tokens?: number | undefined;
81
+ max_tool_calls?: number | undefined;
82
+ };
83
+ }>;
84
+ export type WorkflowPolicy = z.infer<typeof WorkflowPolicySchema>;
85
+ /** V1 rejects unavailable authority/environment features rather than silently accepting them. */
86
+ export declare const AgentWorkflowSchema: z.ZodPipeline<z.ZodEffects<z.ZodUnknown, unknown, unknown>, z.ZodEffects<z.ZodObject<{
87
+ version: z.ZodLiteral<"1">;
88
+ kind: z.ZodLiteral<"agent_workflow">;
89
+ name: z.ZodEffects<z.ZodString, string, string>;
90
+ description: z.ZodOptional<z.ZodString>;
91
+ target: z.ZodObject<{
92
+ provider: z.ZodString;
93
+ model: z.ZodString;
94
+ }, "strict", z.ZodTypeAny, {
95
+ provider: string;
96
+ model: string;
97
+ }, {
98
+ provider: string;
99
+ model: string;
100
+ }>;
101
+ environment: z.ZodObject<{
102
+ type: z.ZodLiteral<"simulated">;
103
+ policy: z.ZodObject<{
104
+ network: z.ZodLiteral<"denied">;
105
+ side_effects: z.ZodEnum<["denied", "approval_required"]>;
106
+ permissions: z.ZodObject<{
107
+ documents: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
108
+ records: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
109
+ files: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
110
+ workflow_state: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
111
+ communication: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
112
+ coordination: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ documents?: "read" | "write" | undefined;
115
+ records?: "read" | "write" | undefined;
116
+ files?: "read" | "write" | undefined;
117
+ workflow_state?: "read" | "write" | undefined;
118
+ communication?: "read" | "write" | undefined;
119
+ coordination?: "read" | "write" | undefined;
120
+ }, {
121
+ documents?: "read" | "write" | undefined;
122
+ records?: "read" | "write" | undefined;
123
+ files?: "read" | "write" | undefined;
124
+ workflow_state?: "read" | "write" | undefined;
125
+ communication?: "read" | "write" | undefined;
126
+ coordination?: "read" | "write" | undefined;
127
+ }>;
128
+ budgets: z.ZodObject<{
129
+ max_actions: z.ZodNumber;
130
+ max_tool_calls: z.ZodOptional<z.ZodNumber>;
131
+ timeout_ms: z.ZodNumber;
132
+ max_tokens: z.ZodOptional<z.ZodNumber>;
133
+ }, "strict", z.ZodTypeAny, {
134
+ max_actions: number;
135
+ timeout_ms: number;
136
+ max_tokens?: number | undefined;
137
+ max_tool_calls?: number | undefined;
138
+ }, {
139
+ max_actions: number;
140
+ timeout_ms: number;
141
+ max_tokens?: number | undefined;
142
+ max_tool_calls?: number | undefined;
143
+ }>;
144
+ }, "strict", z.ZodTypeAny, {
145
+ network: "denied";
146
+ side_effects: "denied" | "approval_required";
147
+ permissions: {
148
+ documents?: "read" | "write" | undefined;
149
+ records?: "read" | "write" | undefined;
150
+ files?: "read" | "write" | undefined;
151
+ workflow_state?: "read" | "write" | undefined;
152
+ communication?: "read" | "write" | undefined;
153
+ coordination?: "read" | "write" | undefined;
154
+ };
155
+ budgets: {
156
+ max_actions: number;
157
+ timeout_ms: number;
158
+ max_tokens?: number | undefined;
159
+ max_tool_calls?: number | undefined;
160
+ };
161
+ }, {
162
+ network: "denied";
163
+ side_effects: "denied" | "approval_required";
164
+ permissions: {
165
+ documents?: "read" | "write" | undefined;
166
+ records?: "read" | "write" | undefined;
167
+ files?: "read" | "write" | undefined;
168
+ workflow_state?: "read" | "write" | undefined;
169
+ communication?: "read" | "write" | undefined;
170
+ coordination?: "read" | "write" | undefined;
171
+ };
172
+ budgets: {
173
+ max_actions: number;
174
+ timeout_ms: number;
175
+ max_tokens?: number | undefined;
176
+ max_tool_calls?: number | undefined;
177
+ };
178
+ }>;
179
+ }, "strict", z.ZodTypeAny, {
180
+ type: "simulated";
181
+ policy: {
182
+ network: "denied";
183
+ side_effects: "denied" | "approval_required";
184
+ permissions: {
185
+ documents?: "read" | "write" | undefined;
186
+ records?: "read" | "write" | undefined;
187
+ files?: "read" | "write" | undefined;
188
+ workflow_state?: "read" | "write" | undefined;
189
+ communication?: "read" | "write" | undefined;
190
+ coordination?: "read" | "write" | undefined;
191
+ };
192
+ budgets: {
193
+ max_actions: number;
194
+ timeout_ms: number;
195
+ max_tokens?: number | undefined;
196
+ max_tool_calls?: number | undefined;
197
+ };
198
+ };
199
+ }, {
200
+ type: "simulated";
201
+ policy: {
202
+ network: "denied";
203
+ side_effects: "denied" | "approval_required";
204
+ permissions: {
205
+ documents?: "read" | "write" | undefined;
206
+ records?: "read" | "write" | undefined;
207
+ files?: "read" | "write" | undefined;
208
+ workflow_state?: "read" | "write" | undefined;
209
+ communication?: "read" | "write" | undefined;
210
+ coordination?: "read" | "write" | undefined;
211
+ };
212
+ budgets: {
213
+ max_actions: number;
214
+ timeout_ms: number;
215
+ max_tokens?: number | undefined;
216
+ max_tool_calls?: number | undefined;
217
+ };
218
+ };
219
+ }>;
220
+ tools: z.ZodArray<z.ZodEnum<["search", "read_document", "query_records", "read_file", "write_file", "calculator", "get_workflow_state", "request_approval", "record_decision", "draft_message", "delegate_task", "get_task_status"]>, "many">;
221
+ workflow: z.ZodObject<{
222
+ system_instructions: z.ZodString;
223
+ initial_state: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodType<WorkflowJson, z.ZodTypeDef, WorkflowJson>, WorkflowJson, WorkflowJson>]>;
224
+ turns: z.ZodArray<z.ZodObject<{
225
+ role: z.ZodLiteral<"user">;
226
+ content: z.ZodString;
227
+ }, "strict", z.ZodTypeAny, {
228
+ role: "user";
229
+ content: string;
230
+ }, {
231
+ role: "user";
232
+ content: string;
233
+ }>, "many">;
234
+ }, "strict", z.ZodTypeAny, {
235
+ system_instructions: string;
236
+ initial_state: WorkflowJson;
237
+ turns: {
238
+ role: "user";
239
+ content: string;
240
+ }[];
241
+ }, {
242
+ system_instructions: string;
243
+ initial_state: WorkflowJson;
244
+ turns: {
245
+ role: "user";
246
+ content: string;
247
+ }[];
248
+ }>;
249
+ outcomes: z.ZodObject<{
250
+ deterministic: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
251
+ type: z.ZodLiteral<"workflow_state">;
252
+ path: z.ZodEffects<z.ZodString, string, string>;
253
+ equals: z.ZodType<WorkflowJson, z.ZodTypeDef, WorkflowJson>;
254
+ }, "strict", z.ZodTypeAny, {
255
+ path: string;
256
+ type: "workflow_state";
257
+ equals: WorkflowJson;
258
+ }, {
259
+ path: string;
260
+ type: "workflow_state";
261
+ equals: WorkflowJson;
262
+ }>, z.ZodObject<{
263
+ type: z.ZodLiteral<"tool_trace">;
264
+ tool: z.ZodEnum<["search", "read_document", "query_records", "read_file", "write_file", "calculator", "get_workflow_state", "request_approval", "record_decision", "draft_message", "delegate_task", "get_task_status"]>;
265
+ minimum_calls: z.ZodNumber;
266
+ maximum_calls: z.ZodOptional<z.ZodNumber>;
267
+ }, "strict", z.ZodTypeAny, {
268
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
269
+ type: "tool_trace";
270
+ minimum_calls: number;
271
+ maximum_calls?: number | undefined;
272
+ }, {
273
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
274
+ type: "tool_trace";
275
+ minimum_calls: number;
276
+ maximum_calls?: number | undefined;
277
+ }>, z.ZodObject<{
278
+ type: z.ZodLiteral<"policy">;
279
+ rule: z.ZodEnum<["no_undeclared_tool", "permissions_respected", "network_denied", "budgets_respected", "no_external_side_effects"]>;
280
+ expected: z.ZodLiteral<"passed">;
281
+ }, "strict", z.ZodTypeAny, {
282
+ expected: "passed";
283
+ type: "policy";
284
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
285
+ }, {
286
+ expected: "passed";
287
+ type: "policy";
288
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
289
+ }>, z.ZodObject<{
290
+ type: z.ZodLiteral<"file">;
291
+ path: z.ZodEffects<z.ZodString, string, string>;
292
+ exists: z.ZodBoolean;
293
+ equals: z.ZodOptional<z.ZodString>;
294
+ }, "strict", z.ZodTypeAny, {
295
+ path: string;
296
+ type: "file";
297
+ exists: boolean;
298
+ equals?: string | undefined;
299
+ }, {
300
+ path: string;
301
+ type: "file";
302
+ exists: boolean;
303
+ equals?: string | undefined;
304
+ }>]>, "many">;
305
+ semantic: z.ZodOptional<z.ZodArray<z.ZodObject<{
306
+ type: z.ZodLiteral<"llm_judge">;
307
+ rubric: z.ZodString;
308
+ mode: z.ZodLiteral<"strict_assurance">;
309
+ }, "strict", z.ZodTypeAny, {
310
+ type: "llm_judge";
311
+ rubric: string;
312
+ mode: "strict_assurance";
313
+ }, {
314
+ type: "llm_judge";
315
+ rubric: string;
316
+ mode: "strict_assurance";
317
+ }>, "many">>;
318
+ }, "strict", z.ZodTypeAny, {
319
+ deterministic: ({
320
+ path: string;
321
+ type: "workflow_state";
322
+ equals: WorkflowJson;
323
+ } | {
324
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
325
+ type: "tool_trace";
326
+ minimum_calls: number;
327
+ maximum_calls?: number | undefined;
328
+ } | {
329
+ expected: "passed";
330
+ type: "policy";
331
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
332
+ } | {
333
+ path: string;
334
+ type: "file";
335
+ exists: boolean;
336
+ equals?: string | undefined;
337
+ })[];
338
+ semantic?: {
339
+ type: "llm_judge";
340
+ rubric: string;
341
+ mode: "strict_assurance";
342
+ }[] | undefined;
343
+ }, {
344
+ deterministic: ({
345
+ path: string;
346
+ type: "workflow_state";
347
+ equals: WorkflowJson;
348
+ } | {
349
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
350
+ type: "tool_trace";
351
+ minimum_calls: number;
352
+ maximum_calls?: number | undefined;
353
+ } | {
354
+ expected: "passed";
355
+ type: "policy";
356
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
357
+ } | {
358
+ path: string;
359
+ type: "file";
360
+ exists: boolean;
361
+ equals?: string | undefined;
362
+ })[];
363
+ semantic?: {
364
+ type: "llm_judge";
365
+ rubric: string;
366
+ mode: "strict_assurance";
367
+ }[] | undefined;
368
+ }>;
369
+ evidence: z.ZodObject<{
370
+ trace: z.ZodLiteral<"summary">;
371
+ artifacts: z.ZodLiteral<"checksums">;
372
+ redact: z.ZodLiteral<true>;
373
+ }, "strict", z.ZodTypeAny, {
374
+ trace: "summary";
375
+ artifacts: "checksums";
376
+ redact: true;
377
+ }, {
378
+ trace: "summary";
379
+ artifacts: "checksums";
380
+ redact: true;
381
+ }>;
382
+ }, "strict", z.ZodTypeAny, {
383
+ name: string;
384
+ version: "1";
385
+ tools: ("search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status")[];
386
+ environment: {
387
+ type: "simulated";
388
+ policy: {
389
+ network: "denied";
390
+ side_effects: "denied" | "approval_required";
391
+ permissions: {
392
+ documents?: "read" | "write" | undefined;
393
+ records?: "read" | "write" | undefined;
394
+ files?: "read" | "write" | undefined;
395
+ workflow_state?: "read" | "write" | undefined;
396
+ communication?: "read" | "write" | undefined;
397
+ coordination?: "read" | "write" | undefined;
398
+ };
399
+ budgets: {
400
+ max_actions: number;
401
+ timeout_ms: number;
402
+ max_tokens?: number | undefined;
403
+ max_tool_calls?: number | undefined;
404
+ };
405
+ };
406
+ };
407
+ evidence: {
408
+ trace: "summary";
409
+ artifacts: "checksums";
410
+ redact: true;
411
+ };
412
+ target: {
413
+ provider: string;
414
+ model: string;
415
+ };
416
+ workflow: {
417
+ system_instructions: string;
418
+ initial_state: WorkflowJson;
419
+ turns: {
420
+ role: "user";
421
+ content: string;
422
+ }[];
423
+ };
424
+ kind: "agent_workflow";
425
+ outcomes: {
426
+ deterministic: ({
427
+ path: string;
428
+ type: "workflow_state";
429
+ equals: WorkflowJson;
430
+ } | {
431
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
432
+ type: "tool_trace";
433
+ minimum_calls: number;
434
+ maximum_calls?: number | undefined;
435
+ } | {
436
+ expected: "passed";
437
+ type: "policy";
438
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
439
+ } | {
440
+ path: string;
441
+ type: "file";
442
+ exists: boolean;
443
+ equals?: string | undefined;
444
+ })[];
445
+ semantic?: {
446
+ type: "llm_judge";
447
+ rubric: string;
448
+ mode: "strict_assurance";
449
+ }[] | undefined;
450
+ };
451
+ description?: string | undefined;
452
+ }, {
453
+ name: string;
454
+ version: "1";
455
+ tools: ("search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status")[];
456
+ environment: {
457
+ type: "simulated";
458
+ policy: {
459
+ network: "denied";
460
+ side_effects: "denied" | "approval_required";
461
+ permissions: {
462
+ documents?: "read" | "write" | undefined;
463
+ records?: "read" | "write" | undefined;
464
+ files?: "read" | "write" | undefined;
465
+ workflow_state?: "read" | "write" | undefined;
466
+ communication?: "read" | "write" | undefined;
467
+ coordination?: "read" | "write" | undefined;
468
+ };
469
+ budgets: {
470
+ max_actions: number;
471
+ timeout_ms: number;
472
+ max_tokens?: number | undefined;
473
+ max_tool_calls?: number | undefined;
474
+ };
475
+ };
476
+ };
477
+ evidence: {
478
+ trace: "summary";
479
+ artifacts: "checksums";
480
+ redact: true;
481
+ };
482
+ target: {
483
+ provider: string;
484
+ model: string;
485
+ };
486
+ workflow: {
487
+ system_instructions: string;
488
+ initial_state: WorkflowJson;
489
+ turns: {
490
+ role: "user";
491
+ content: string;
492
+ }[];
493
+ };
494
+ kind: "agent_workflow";
495
+ outcomes: {
496
+ deterministic: ({
497
+ path: string;
498
+ type: "workflow_state";
499
+ equals: WorkflowJson;
500
+ } | {
501
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
502
+ type: "tool_trace";
503
+ minimum_calls: number;
504
+ maximum_calls?: number | undefined;
505
+ } | {
506
+ expected: "passed";
507
+ type: "policy";
508
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
509
+ } | {
510
+ path: string;
511
+ type: "file";
512
+ exists: boolean;
513
+ equals?: string | undefined;
514
+ })[];
515
+ semantic?: {
516
+ type: "llm_judge";
517
+ rubric: string;
518
+ mode: "strict_assurance";
519
+ }[] | undefined;
520
+ };
521
+ description?: string | undefined;
522
+ }>, {
523
+ name: string;
524
+ version: "1";
525
+ tools: ("search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status")[];
526
+ environment: {
527
+ type: "simulated";
528
+ policy: {
529
+ network: "denied";
530
+ side_effects: "denied" | "approval_required";
531
+ permissions: {
532
+ documents?: "read" | "write" | undefined;
533
+ records?: "read" | "write" | undefined;
534
+ files?: "read" | "write" | undefined;
535
+ workflow_state?: "read" | "write" | undefined;
536
+ communication?: "read" | "write" | undefined;
537
+ coordination?: "read" | "write" | undefined;
538
+ };
539
+ budgets: {
540
+ max_actions: number;
541
+ timeout_ms: number;
542
+ max_tokens?: number | undefined;
543
+ max_tool_calls?: number | undefined;
544
+ };
545
+ };
546
+ };
547
+ evidence: {
548
+ trace: "summary";
549
+ artifacts: "checksums";
550
+ redact: true;
551
+ };
552
+ target: {
553
+ provider: string;
554
+ model: string;
555
+ };
556
+ workflow: {
557
+ system_instructions: string;
558
+ initial_state: WorkflowJson;
559
+ turns: {
560
+ role: "user";
561
+ content: string;
562
+ }[];
563
+ };
564
+ kind: "agent_workflow";
565
+ outcomes: {
566
+ deterministic: ({
567
+ path: string;
568
+ type: "workflow_state";
569
+ equals: WorkflowJson;
570
+ } | {
571
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
572
+ type: "tool_trace";
573
+ minimum_calls: number;
574
+ maximum_calls?: number | undefined;
575
+ } | {
576
+ expected: "passed";
577
+ type: "policy";
578
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
579
+ } | {
580
+ path: string;
581
+ type: "file";
582
+ exists: boolean;
583
+ equals?: string | undefined;
584
+ })[];
585
+ semantic?: {
586
+ type: "llm_judge";
587
+ rubric: string;
588
+ mode: "strict_assurance";
589
+ }[] | undefined;
590
+ };
591
+ description?: string | undefined;
592
+ }, {
593
+ name: string;
594
+ version: "1";
595
+ tools: ("search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status")[];
596
+ environment: {
597
+ type: "simulated";
598
+ policy: {
599
+ network: "denied";
600
+ side_effects: "denied" | "approval_required";
601
+ permissions: {
602
+ documents?: "read" | "write" | undefined;
603
+ records?: "read" | "write" | undefined;
604
+ files?: "read" | "write" | undefined;
605
+ workflow_state?: "read" | "write" | undefined;
606
+ communication?: "read" | "write" | undefined;
607
+ coordination?: "read" | "write" | undefined;
608
+ };
609
+ budgets: {
610
+ max_actions: number;
611
+ timeout_ms: number;
612
+ max_tokens?: number | undefined;
613
+ max_tool_calls?: number | undefined;
614
+ };
615
+ };
616
+ };
617
+ evidence: {
618
+ trace: "summary";
619
+ artifacts: "checksums";
620
+ redact: true;
621
+ };
622
+ target: {
623
+ provider: string;
624
+ model: string;
625
+ };
626
+ workflow: {
627
+ system_instructions: string;
628
+ initial_state: WorkflowJson;
629
+ turns: {
630
+ role: "user";
631
+ content: string;
632
+ }[];
633
+ };
634
+ kind: "agent_workflow";
635
+ outcomes: {
636
+ deterministic: ({
637
+ path: string;
638
+ type: "workflow_state";
639
+ equals: WorkflowJson;
640
+ } | {
641
+ tool: "search" | "read_document" | "query_records" | "read_file" | "write_file" | "calculator" | "get_workflow_state" | "request_approval" | "record_decision" | "draft_message" | "delegate_task" | "get_task_status";
642
+ type: "tool_trace";
643
+ minimum_calls: number;
644
+ maximum_calls?: number | undefined;
645
+ } | {
646
+ expected: "passed";
647
+ type: "policy";
648
+ rule: "no_undeclared_tool" | "permissions_respected" | "network_denied" | "budgets_respected" | "no_external_side_effects";
649
+ } | {
650
+ path: string;
651
+ type: "file";
652
+ exists: boolean;
653
+ equals?: string | undefined;
654
+ })[];
655
+ semantic?: {
656
+ type: "llm_judge";
657
+ rubric: string;
658
+ mode: "strict_assurance";
659
+ }[] | undefined;
660
+ };
661
+ description?: string | undefined;
662
+ }>>;
663
+ export type AgentWorkflow = z.infer<typeof AgentWorkflowSchema>;
664
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/agent-workflow/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,YAAY,GACpB,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,YAAY,EAAE,GACd;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,CAAC;AAGpC,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CA4CpE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAqBD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBtB,CAAC;AACZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAkIlE,iGAAiG;AACjG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASb,CAAC;AACpB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}