@artemiskit/core 0.5.3 → 0.6.1

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