@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 @@
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,CA8CpE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAqBD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BtB,CAAC;AACZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AA2IlE,iGAAiG;AACjG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASb,CAAC;AACpB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,113 @@
1
+ import type { TokenUsage } from '../adapters/types.js';
2
+ import { type WorkflowEnvironmentFactory, type WorkflowState } from './environment.js';
3
+ import { type AgentWorkflow } from './schema.js';
4
+ import type { AgentTarget, AgentTurnRequest } from './target.js';
5
+ export type AgentWorkflowExecution = 'completed' | 'unsupported' | 'invalid' | 'failed' | 'cancelled' | 'timeout' | 'budget_exceeded';
6
+ export type AgentWorkflowReason = 'finished' | 'invalid_workflow' | 'invalid_options' | 'invalid_fixture' | 'target_unavailable' | 'invalid_response' | 'target_error' | 'tool_use_unsupported' | 'preflight_failed' | 'environment_unavailable' | 'invalid_environment' | 'tool_failed' | 'policy_denied' | 'cancelled' | 'deadline' | 'max_actions' | 'max_model_requests' | 'max_tool_calls' | 'max_tokens' | 'usage_unavailable' | 'transcript_limit';
7
+ export interface AgentWorkflowEvent {
8
+ sequence: number;
9
+ elapsedMs: number;
10
+ type: 'started' | 'model_requested' | 'model_completed' | 'tool_requested' | 'tool_completed' | 'preflight_completed' | 'finished';
11
+ phase: 'execution' | 'preflight';
12
+ operationId?: string;
13
+ requestedCallIdHash?: string;
14
+ tool?: string;
15
+ status?: 'completed' | 'denied' | 'invalid' | 'failed';
16
+ }
17
+ export interface AgentWorkflowRecord {
18
+ schemaVersion: '1';
19
+ engine: 'native';
20
+ execution: AgentWorkflowExecution;
21
+ reason: AgentWorkflowReason;
22
+ policy: 'passed' | 'denied';
23
+ configuration?: {
24
+ sha256: string;
25
+ provider: {
26
+ sha256: string;
27
+ display?: string;
28
+ };
29
+ model: {
30
+ sha256: string;
31
+ display?: string;
32
+ };
33
+ generation: {
34
+ maxTokens: number;
35
+ temperature: number;
36
+ };
37
+ limits: AgentWorkflow['environment']['policy']['budgets'];
38
+ };
39
+ taskVerification: 'unavailable';
40
+ environment: 'simulated' | 'sandbox' | 'unknown';
41
+ capability: {
42
+ advertised: boolean | null;
43
+ transportCancellation: boolean;
44
+ preflight: 'not_requested' | 'passed' | 'failed';
45
+ observedModelHash?: string;
46
+ observedModel?: {
47
+ sha256: string;
48
+ display?: string;
49
+ };
50
+ };
51
+ usage: {
52
+ status: 'reported' | 'partial' | 'unavailable';
53
+ reported: TokenUsage;
54
+ missingRequests: number;
55
+ inFlightUnknown: boolean;
56
+ preflight: TokenUsage;
57
+ };
58
+ budgets: {
59
+ actions: number;
60
+ modelRequests: number;
61
+ toolCalls: number;
62
+ modelRequestAccounting: 'target_invocations';
63
+ transportAttempts: 'unavailable';
64
+ tokenOvershoot: number;
65
+ elapsedMs: number;
66
+ };
67
+ cleanup: {
68
+ status: 'completed' | 'unresolved';
69
+ artifacts: 'discarded' | 'retained' | 'unknown';
70
+ pendingOperations: number;
71
+ };
72
+ artifacts: {
73
+ state: 'available' | 'unavailable';
74
+ stateSha256?: string;
75
+ files?: {
76
+ pathSha256: string;
77
+ contentSha256: string;
78
+ bytes: number;
79
+ }[];
80
+ omittedFiles?: number;
81
+ };
82
+ events: AgentWorkflowEvent[];
83
+ droppedEvents: number;
84
+ }
85
+ export interface AgentWorkflowResult {
86
+ /** Metadata only. Safe default persistence boundary, never contains model text or fixture content. */
87
+ record: AgentWorkflowRecord;
88
+ /** Sensitive working data; persist only with an explicit application policy. */
89
+ state: WorkflowState | null;
90
+ transcript: AgentTurnRequest['messages'];
91
+ }
92
+ export interface AgentWorkflowSessionOptions {
93
+ workflow: AgentWorkflow;
94
+ target: AgentTarget;
95
+ fixtureRoot?: string;
96
+ environmentFactory?: WorkflowEnvironmentFactory;
97
+ preflight?: boolean;
98
+ preflightOnly?: boolean;
99
+ signal?: AbortSignal;
100
+ /** Total bounded drain/snapshot/close period: 1000 ms simulated, 6000 ms sandbox by default. */
101
+ cleanupTimeoutMs?: number;
102
+ onEvent?: (event: AgentWorkflowEvent) => void;
103
+ }
104
+ export interface AgentWorkflowSession {
105
+ readonly state: 'idle' | 'running' | 'cancelling' | 'completed';
106
+ run(): Promise<AgentWorkflowResult>;
107
+ cancel(): void;
108
+ events(): AsyncIterable<AgentWorkflowEvent>;
109
+ }
110
+ /** Native host-owned loop. No adapter or model may change authority or replenish run budgets. */
111
+ export declare function createAgentWorkflowSession(options: AgentWorkflowSessionOptions): AgentWorkflowSession;
112
+ export declare function runAgentWorkflow(options: AgentWorkflowSessionOptions): Promise<AgentWorkflowResult>;
113
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/agent-workflow/session.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,CAAC;CAC/C;AACD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;IAChE,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpC,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC7C;AAwJD,iGAAiG;AACjG,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,oBAAoB,CA6yBtB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAE9B"}
@@ -0,0 +1,35 @@
1
+ import { type WorkflowJson, type WorkflowPolicy } from './schema.js';
2
+ type JsonObject = {
3
+ [key: string]: WorkflowJson;
4
+ };
5
+ type ToolFailureCode = 'undeclared_tool' | 'permission_denied' | 'invalid_input' | 'invalid_state' | 'not_found' | 'output_limit' | 'invalid_policy' | 'tool_error';
6
+ export interface SimulatedToolEvidence {
7
+ tool: string;
8
+ version: '1';
9
+ status: 'succeeded' | 'denied' | 'invalid' | 'failed';
10
+ code?: ToolFailureCode;
11
+ }
12
+ export type SimulatedToolResult = {
13
+ status: 'succeeded';
14
+ output: WorkflowJson;
15
+ state: JsonObject;
16
+ evidence: SimulatedToolEvidence;
17
+ } | {
18
+ status: 'denied' | 'invalid' | 'failed';
19
+ code: ToolFailureCode;
20
+ evidence: SimulatedToolEvidence;
21
+ };
22
+ /**
23
+ * One deterministic simulated call, with isolated input/output state and metadata-only evidence.
24
+ * Budgets are declarative here: a future environment runner owns action counts and deadlines.
25
+ * `side_effects` governs external effects; declared local state writes never authorize real effects.
26
+ */
27
+ export declare function executeSimulatedTool(request: {
28
+ tool: string;
29
+ input: unknown;
30
+ state: unknown;
31
+ policy: WorkflowPolicy;
32
+ declaredTools: readonly string[];
33
+ }): SimulatedToolResult;
34
+ export {};
35
+ //# sourceMappingURL=simulated-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulated-tools.d.ts","sourceRoot":"","sources":["../../src/agent-workflow/simulated-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,cAAc,EAIpB,MAAM,UAAU,CAAC;AAElB,KAAK,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,CAAC;AAClD,KAAK,eAAe,GAChB,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,WAAW,GACX,cAAc,GACd,gBAAgB,GAChB,YAAY,CAAC;AACjB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACtD,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AACD,MAAM,MAAM,mBAAmB,GAC3B;IACE,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,qBAAqB,CAAC;CACjC,GACD;IACE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,qBAAqB,CAAC;CACjC,CAAC;AAqCN;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GAAG,mBAAmB,CAgJtB"}
@@ -0,0 +1,243 @@
1
+ import { z } from 'zod';
2
+ import type { ModelClient, TokenUsage, ToolCall } from '../adapters/types.js';
3
+ export declare const agentTurnRequestSchema: z.ZodObject<{
4
+ messages: z.ZodArray<z.ZodObject<{
5
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
6
+ content: z.ZodString;
7
+ toolCallId: z.ZodOptional<z.ZodString>;
8
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
+ id: z.ZodString;
10
+ type: z.ZodLiteral<"function">;
11
+ function: z.ZodObject<{
12
+ name: z.ZodString;
13
+ arguments: z.ZodString;
14
+ }, "strict", z.ZodTypeAny, {
15
+ name: string;
16
+ arguments: string;
17
+ }, {
18
+ name: string;
19
+ arguments: string;
20
+ }>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ function: {
23
+ name: string;
24
+ arguments: string;
25
+ };
26
+ type: "function";
27
+ id: string;
28
+ }, {
29
+ function: {
30
+ name: string;
31
+ arguments: string;
32
+ };
33
+ type: "function";
34
+ id: string;
35
+ }>, "many">>;
36
+ }, "strict", z.ZodTypeAny, {
37
+ role: "system" | "user" | "assistant" | "tool";
38
+ content: string;
39
+ tool_calls?: {
40
+ function: {
41
+ name: string;
42
+ arguments: string;
43
+ };
44
+ type: "function";
45
+ id: string;
46
+ }[] | undefined;
47
+ toolCallId?: string | undefined;
48
+ }, {
49
+ role: "system" | "user" | "assistant" | "tool";
50
+ content: string;
51
+ tool_calls?: {
52
+ function: {
53
+ name: string;
54
+ arguments: string;
55
+ };
56
+ type: "function";
57
+ id: string;
58
+ }[] | undefined;
59
+ toolCallId?: string | undefined;
60
+ }>, "many">;
61
+ tools: z.ZodArray<z.ZodObject<{
62
+ type: z.ZodLiteral<"function">;
63
+ function: z.ZodObject<{
64
+ name: z.ZodString;
65
+ description: z.ZodOptional<z.ZodString>;
66
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ name: string;
69
+ parameters: Record<string, unknown>;
70
+ description?: string | undefined;
71
+ }, {
72
+ name: string;
73
+ parameters: Record<string, unknown>;
74
+ description?: string | undefined;
75
+ }>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ function: {
78
+ name: string;
79
+ parameters: Record<string, unknown>;
80
+ description?: string | undefined;
81
+ };
82
+ type: "function";
83
+ }, {
84
+ function: {
85
+ name: string;
86
+ parameters: Record<string, unknown>;
87
+ description?: string | undefined;
88
+ };
89
+ type: "function";
90
+ }>, "many">;
91
+ model: z.ZodOptional<z.ZodString>;
92
+ generation: z.ZodObject<{
93
+ maxTokens: z.ZodNumber;
94
+ temperature: z.ZodOptional<z.ZodNumber>;
95
+ topP: z.ZodOptional<z.ZodNumber>;
96
+ seed: z.ZodOptional<z.ZodNumber>;
97
+ stop: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
98
+ }, "strict", z.ZodTypeAny, {
99
+ maxTokens: number;
100
+ stop?: string[] | undefined;
101
+ seed?: number | undefined;
102
+ temperature?: number | undefined;
103
+ topP?: number | undefined;
104
+ }, {
105
+ maxTokens: number;
106
+ stop?: string[] | undefined;
107
+ seed?: number | undefined;
108
+ temperature?: number | undefined;
109
+ topP?: number | undefined;
110
+ }>;
111
+ budgets: z.ZodObject<{
112
+ timeoutMs: z.ZodNumber;
113
+ maxToolCalls: z.ZodNumber;
114
+ }, "strict", z.ZodTypeAny, {
115
+ timeoutMs: number;
116
+ maxToolCalls: number;
117
+ }, {
118
+ timeoutMs: number;
119
+ maxToolCalls: number;
120
+ }>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ tools: {
123
+ function: {
124
+ name: string;
125
+ parameters: Record<string, unknown>;
126
+ description?: string | undefined;
127
+ };
128
+ type: "function";
129
+ }[];
130
+ generation: {
131
+ maxTokens: number;
132
+ stop?: string[] | undefined;
133
+ seed?: number | undefined;
134
+ temperature?: number | undefined;
135
+ topP?: number | undefined;
136
+ };
137
+ budgets: {
138
+ timeoutMs: number;
139
+ maxToolCalls: number;
140
+ };
141
+ messages: {
142
+ role: "system" | "user" | "assistant" | "tool";
143
+ content: string;
144
+ tool_calls?: {
145
+ function: {
146
+ name: string;
147
+ arguments: string;
148
+ };
149
+ type: "function";
150
+ id: string;
151
+ }[] | undefined;
152
+ toolCallId?: string | undefined;
153
+ }[];
154
+ model?: string | undefined;
155
+ }, {
156
+ tools: {
157
+ function: {
158
+ name: string;
159
+ parameters: Record<string, unknown>;
160
+ description?: string | undefined;
161
+ };
162
+ type: "function";
163
+ }[];
164
+ generation: {
165
+ maxTokens: number;
166
+ stop?: string[] | undefined;
167
+ seed?: number | undefined;
168
+ temperature?: number | undefined;
169
+ topP?: number | undefined;
170
+ };
171
+ budgets: {
172
+ timeoutMs: number;
173
+ maxToolCalls: number;
174
+ };
175
+ messages: {
176
+ role: "system" | "user" | "assistant" | "tool";
177
+ content: string;
178
+ tool_calls?: {
179
+ function: {
180
+ name: string;
181
+ arguments: string;
182
+ };
183
+ type: "function";
184
+ id: string;
185
+ }[] | undefined;
186
+ toolCallId?: string | undefined;
187
+ }[];
188
+ model?: string | undefined;
189
+ }>;
190
+ export type AgentTurnRequest = z.infer<typeof agentTurnRequestSchema>;
191
+ export type AgentTargetFailure = {
192
+ rejectedCall?: {
193
+ requestedCallIdHash: string;
194
+ tool: string;
195
+ reason: 'undeclared_tool' | 'invalid_arguments' | 'duplicate_id';
196
+ };
197
+ tokens?: TokenUsage;
198
+ usageAvailable?: boolean;
199
+ status: 'unsupported' | 'invalid' | 'error';
200
+ code: 'invalid_request' | 'tool_use_unsupported' | 'invalid_response' | 'target_error' | 'timeout' | 'aborted';
201
+ };
202
+ export type AgentTargetCapabilities = {
203
+ status: 'available';
204
+ toolUse: boolean;
205
+ transportCancellation: boolean;
206
+ };
207
+ export type AgentTurnResult = AgentTargetFailure | {
208
+ status: 'completed';
209
+ id: string;
210
+ model: string;
211
+ message: {
212
+ role: 'assistant';
213
+ content: string;
214
+ tool_calls?: ToolCall[];
215
+ };
216
+ /** Adapter-reported counts only; zero can mean unavailable in existing adapters. */
217
+ tokens: TokenUsage;
218
+ usageAvailable?: boolean;
219
+ latencyMs: number;
220
+ finishReason?: 'stop' | 'length' | 'tool_calls' | 'content_filter';
221
+ };
222
+ /** One bounded model turn. Tool execution, policy enforcement, and scoring belong to the harness. */
223
+ export interface AgentTarget {
224
+ readonly provider: string;
225
+ capabilities(options: {
226
+ timeoutMs: number;
227
+ }, signal?: AbortSignal): Promise<AgentTargetCapabilities | AgentTargetFailure>;
228
+ turn(request: AgentTurnRequest, signal?: AbortSignal): Promise<AgentTurnResult>;
229
+ /** Wait for underlying callbacks hidden behind a bounded turn facade. */
230
+ drain?(options: {
231
+ timeoutMs: number;
232
+ }): Promise<{
233
+ pendingOperations: number;
234
+ }>;
235
+ }
236
+ export declare function validWorkflowTranscript(messages: AgentTurnRequest['messages']): boolean;
237
+ /**
238
+ * Bridge existing adapters without provider-specific dispatch. Workflow calls disable supported
239
+ * transport retries and propagate abort only when the adapter declares transport cancellation.
240
+ * Returned text/tool arguments are working conversation data, not sanitized retained evidence.
241
+ */
242
+ export declare function createModelClientTarget(client: ModelClient): AgentTarget;
243
+ //# sourceMappingURL=target.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../src/agent-workflow/target.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAmB,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAsB5F,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCxB,CAAC;AAmBZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAA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CAAC,CAAC;IACzD,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAChF,yEAAyE;IACzE,KAAK,CAAC,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF;AAgCD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,OAAO,CAwBvF;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAsKxE"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Artifacts module exports
3
3
  */
4
- export * from './types';
5
- export { createRunManifest } from './manifest';
4
+ export * from './types.js';
5
+ export { createRunManifest } from './manifest.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Run manifest generation utilities
3
3
  */
4
- import type { CaseResult, CostProvenance, ExecutionProvenance, ManifestRedactionInfo, ResolvedConfig, RunAttemptEvidence, RunConfig, RunManifest, WorkloadIdentity } from './types';
4
+ import type { CaseResult, CostProvenance, ExecutionProvenance, ManifestRedactionInfo, ResolvedConfig, RunAttemptEvidence, RunConfig, RunManifest, WorkloadIdentity } from './types.js';
5
5
  /**
6
6
  * Create a new run manifest
7
7
  */
@@ -162,9 +162,9 @@ export interface CaseResult {
162
162
  /** Redaction information for this case */
163
163
  redaction?: CaseRedactionInfo;
164
164
  /** Ordered tool activity captured for an enabled tool loop. */
165
- toolTrace?: import('../tools').ToolTraceEntry[];
165
+ toolTrace?: import('../tools/index.js').ToolTraceEntry[];
166
166
  /** Terminal status for an enabled tool loop. */
167
- toolLoop?: import('../tools').ToolLoopSummary;
167
+ toolLoop?: import('../tools/index.js').ToolLoopSummary;
168
168
  }
169
169
  /**
170
170
  * Cost estimation details
@@ -5,7 +5,7 @@
5
5
  * same canonical workload/rubric was declared; it does not attest to provider
6
6
  * behaviour or replace a future assessment-profile compatibility decision.
7
7
  */
8
- import type { RunManifest } from '../artifacts/types';
8
+ import type { RunManifest } from '../artifacts/types.js';
9
9
  export type ComparisonEligibilityStatus = 'compatible' | 'qualified' | 'incomparable';
10
10
  export type ComparisonEligibilityReasonCode = 'scenario_mismatch' | 'workload_identity_missing' | 'rubric_identity_missing' | 'workload_mismatch' | 'rubric_mismatch' | 'execution_provenance_missing' | 'target_provider_changed' | 'target_model_changed' | 'generation_settings_changed';
11
11
  /** A bounded, machine-readable reason for a comparison decision. */
@@ -1,2 +1,2 @@
1
- export { assessComparisonEligibility, isComparisonAvailable, type ComparisonEligibility, type ComparisonEligibilityReason, type ComparisonEligibilityReasonCode, type ComparisonEligibilityStatus, } from './eligibility';
1
+ export { assessComparisonEligibility, isComparisonAvailable, type ComparisonEligibility, type ComparisonEligibilityReason, type ComparisonEligibilityReasonCode, type ComparisonEligibilityStatus, } from './eligibility.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Combined evaluator - evaluates multiple expectations with and/or logic
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types.js';
6
6
  export declare class CombinedEvaluator implements Evaluator {
7
7
  readonly type = "combined";
8
8
  evaluate(response: string, expected: Expected, context?: EvaluatorContext): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Contains evaluator - checks if response contains specific values
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class ContainsEvaluator implements Evaluator {
7
7
  readonly type = "contains";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Exact match evaluator
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class ExactEvaluator implements Evaluator {
7
7
  readonly type = "exact";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Fuzzy match evaluator using Levenshtein distance
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class FuzzyEvaluator implements Evaluator {
7
7
  readonly type = "fuzzy";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Evaluators module - exports all evaluator types and utilities
3
3
  */
4
- import type { Evaluator } from './types';
4
+ import type { Evaluator } from './types.js';
5
5
  /**
6
6
  * Get an evaluator by type
7
7
  */
@@ -14,16 +14,16 @@ export declare function registerEvaluator(type: string, evaluator: Evaluator): v
14
14
  * List available evaluator types
15
15
  */
16
16
  export declare function listEvaluators(): string[];
17
- export * from './types';
18
- export { ExactEvaluator } from './exact';
19
- export { RegexEvaluator } from './regex';
20
- export { FuzzyEvaluator } from './fuzzy';
21
- export { ContainsEvaluator } from './contains';
22
- export { NotContainsEvaluator } from './not-contains';
23
- export { CombinedEvaluator } from './combined';
24
- export { JsonSchemaEvaluator } from './json-schema';
25
- export { LLMGraderEvaluator } from './llm-grader';
26
- export { SimilarityEvaluator } from './similarity';
27
- export { InlineEvaluator, SUPPORTED_EXPRESSIONS } from './inline';
28
- export { ToolTraceEvaluator } from './tool-trace';
17
+ export * from './types.js';
18
+ export { ExactEvaluator } from './exact.js';
19
+ export { RegexEvaluator } from './regex.js';
20
+ export { FuzzyEvaluator } from './fuzzy.js';
21
+ export { ContainsEvaluator } from './contains.js';
22
+ export { NotContainsEvaluator } from './not-contains.js';
23
+ export { CombinedEvaluator } from './combined.js';
24
+ export { JsonSchemaEvaluator } from './json-schema.js';
25
+ export { LLMGraderEvaluator } from './llm-grader.js';
26
+ export { SimilarityEvaluator } from './similarity.js';
27
+ export { InlineEvaluator, SUPPORTED_EXPRESSIONS } from './inline.js';
28
+ export { ToolTraceEvaluator } from './tool-trace.js';
29
29
  //# sourceMappingURL=index.d.ts.map
@@ -9,8 +9,8 @@
9
9
  * - Regex matching: response.match(/pattern/)
10
10
  * - JSON parsing: JSON.parse(response)
11
11
  */
12
- import type { Expected } from '../scenario/schema';
13
- import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types';
12
+ import type { Expected } from '../scenario/schema.js';
13
+ import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types.js';
14
14
  export declare class InlineEvaluator implements Evaluator {
15
15
  readonly type = "inline";
16
16
  evaluate(response: string, expected: Expected, _context?: EvaluatorContext): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * JSON Schema evaluator - validates response against a JSON schema
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class JsonSchemaEvaluator implements Evaluator {
7
7
  readonly type = "json_schema";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * LLM-based grader evaluator
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types.js';
6
6
  export declare class LLMGraderEvaluator implements Evaluator {
7
7
  readonly type = "llm_grader";
8
8
  evaluate(response: string, expected: Expected, context?: EvaluatorContext): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Not Contains evaluator - checks if response does NOT contain specific values
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class NotContainsEvaluator implements Evaluator {
7
7
  readonly type = "not_contains";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Regex pattern evaluator
3
3
  */
4
- import type { Expected } from '../scenario/schema';
5
- import type { Evaluator, EvaluatorResult } from './types';
4
+ import type { Expected } from '../scenario/schema.js';
5
+ import type { Evaluator, EvaluatorResult } from './types.js';
6
6
  export declare class RegexEvaluator implements Evaluator {
7
7
  readonly type = "regex";
8
8
  evaluate(response: string, expected: Expected): Promise<EvaluatorResult>;
@@ -3,8 +3,8 @@
3
3
  * Uses vector embeddings for semantic similarity matching when available,
4
4
  * falls back to LLM-based semantic comparison otherwise.
5
5
  */
6
- import type { Expected } from '../scenario/schema';
7
- import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types';
6
+ import type { Expected } from '../scenario/schema.js';
7
+ import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types.js';
8
8
  export declare class SimilarityEvaluator implements Evaluator {
9
9
  readonly type = "similarity";
10
10
  evaluate(response: string, expected: Expected, context?: EvaluatorContext): Promise<EvaluatorResult>;
@@ -1,5 +1,5 @@
1
- import type { Expected } from '../scenario/schema';
2
- import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types';
1
+ import type { Expected } from '../scenario/schema.js';
2
+ import type { Evaluator, EvaluatorContext, EvaluatorResult } from './types.js';
3
3
  export declare class ToolTraceEvaluator implements Evaluator {
4
4
  readonly type = "tool_trace";
5
5
  evaluate(_response: string, expected: Expected, context?: EvaluatorContext): Promise<EvaluatorResult>;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Evaluator types and interfaces
3
3
  */
4
- import type { ModelClient } from '../adapters/types';
5
- import type { Expected, TestCase } from '../scenario/schema';
6
- import type { ToolTraceEntry } from '../tools';
4
+ import type { ModelClient } from '../adapters/types.js';
5
+ import type { Expected, TestCase } from '../scenario/schema.js';
6
+ import type { ToolTraceEntry } from '../tools/index.js';
7
7
  /**
8
8
  * Context provided to evaluators
9
9
  */