@assemble-dev/shared-types 0.1.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.
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/run-metadata.ts
21
+ var run_metadata_exports = {};
22
+ __export(run_metadata_exports, {
23
+ RunMetadataSchema: () => RunMetadataSchema
24
+ });
25
+ module.exports = __toCommonJS(run_metadata_exports);
26
+ var import_zod = require("zod");
27
+ var RunMetadataSchema = import_zod.z.object({
28
+ sessionId: import_zod.z.string().optional(),
29
+ userId: import_zod.z.string().optional(),
30
+ tags: import_zod.z.array(import_zod.z.string()).optional(),
31
+ parentTraceId: import_zod.z.string().optional(),
32
+ parentSpanId: import_zod.z.string().optional()
33
+ });
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ RunMetadataSchema
37
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const RunMetadataSchema: z.ZodObject<{
4
+ sessionId: z.ZodOptional<z.ZodString>;
5
+ userId: z.ZodOptional<z.ZodString>;
6
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
+ parentTraceId: z.ZodOptional<z.ZodString>;
8
+ parentSpanId: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ type RunMetadata = z.infer<typeof RunMetadataSchema>;
11
+
12
+ export { type RunMetadata, RunMetadataSchema };
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const RunMetadataSchema: z.ZodObject<{
4
+ sessionId: z.ZodOptional<z.ZodString>;
5
+ userId: z.ZodOptional<z.ZodString>;
6
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
+ parentTraceId: z.ZodOptional<z.ZodString>;
8
+ parentSpanId: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ type RunMetadata = z.infer<typeof RunMetadataSchema>;
11
+
12
+ export { type RunMetadata, RunMetadataSchema };
@@ -0,0 +1,6 @@
1
+ import {
2
+ RunMetadataSchema
3
+ } from "./chunk-F5XOAPYA.js";
4
+ export {
5
+ RunMetadataSchema
6
+ };
package/dist/runs.cjs ADDED
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/runs.ts
21
+ var runs_exports = {};
22
+ __export(runs_exports, {
23
+ AgentCallSchema: () => AgentCallSchema,
24
+ AgentCallStatusSchema: () => AgentCallStatusSchema,
25
+ ApprovalStatusSchema: () => ApprovalStatusSchema,
26
+ PolicyActionSchema: () => PolicyActionSchema,
27
+ PolicyDecisionSchema: () => PolicyDecisionSchema,
28
+ RoutingDecisionSchema: () => RoutingDecisionSchema,
29
+ RunApprovalSchema: () => RunApprovalSchema,
30
+ RunArtifactSchema: () => RunArtifactSchema,
31
+ RunErrorSchema: () => RunErrorSchema,
32
+ RunMessageRoleSchema: () => RunMessageRoleSchema,
33
+ RunMessageSchema: () => RunMessageSchema,
34
+ RunMetricsSchema: () => RunMetricsSchema,
35
+ RunStateSchema: () => RunStateSchema,
36
+ RunStatusSchema: () => RunStatusSchema,
37
+ TokenUsageSchema: () => TokenUsageSchema,
38
+ ToolCallSchema: () => ToolCallSchema,
39
+ ToolCallStatusSchema: () => ToolCallStatusSchema
40
+ });
41
+ module.exports = __toCommonJS(runs_exports);
42
+ var import_zod2 = require("zod");
43
+
44
+ // src/json.ts
45
+ var import_zod = require("zod");
46
+ var JsonPrimitiveSchema = import_zod.z.union([
47
+ import_zod.z.string(),
48
+ import_zod.z.number(),
49
+ import_zod.z.boolean(),
50
+ import_zod.z.null()
51
+ ]);
52
+ var JsonValueSchema = import_zod.z.lazy(
53
+ () => import_zod.z.union([
54
+ JsonPrimitiveSchema,
55
+ import_zod.z.array(JsonValueSchema),
56
+ import_zod.z.record(import_zod.z.string(), JsonValueSchema)
57
+ ])
58
+ );
59
+ var JsonObjectSchema = import_zod.z.record(import_zod.z.string(), JsonValueSchema);
60
+
61
+ // src/runs.ts
62
+ var RunStatusSchema = import_zod2.z.enum([
63
+ "pending",
64
+ "running",
65
+ "awaiting_approval",
66
+ "completed",
67
+ "failed",
68
+ "canceled",
69
+ "rejected"
70
+ ]);
71
+ var PolicyActionSchema = import_zod2.z.enum([
72
+ "allow",
73
+ "block",
74
+ "requireApproval",
75
+ "logOnly",
76
+ "redact"
77
+ ]);
78
+ var ApprovalStatusSchema = import_zod2.z.enum(["pending", "approved", "rejected"]);
79
+ var RunErrorSchema = import_zod2.z.object({
80
+ message: import_zod2.z.string(),
81
+ code: import_zod2.z.string().optional(),
82
+ agentName: import_zod2.z.string().optional(),
83
+ toolName: import_zod2.z.string().optional(),
84
+ timestamp: import_zod2.z.iso.datetime()
85
+ });
86
+ var RunMessageRoleSchema = import_zod2.z.enum([
87
+ "system",
88
+ "user",
89
+ "assistant",
90
+ "tool"
91
+ ]);
92
+ var RunMessageSchema = import_zod2.z.object({
93
+ role: RunMessageRoleSchema,
94
+ content: import_zod2.z.string(),
95
+ agentName: import_zod2.z.string().optional(),
96
+ toolName: import_zod2.z.string().optional(),
97
+ timestamp: import_zod2.z.iso.datetime()
98
+ });
99
+ var AgentCallStatusSchema = import_zod2.z.enum(["running", "completed", "failed"]);
100
+ var AgentCallSchema = import_zod2.z.object({
101
+ id: import_zod2.z.string(),
102
+ agentName: import_zod2.z.string(),
103
+ status: AgentCallStatusSchema,
104
+ input: JsonValueSchema,
105
+ output: JsonValueSchema.nullable(),
106
+ error: RunErrorSchema.nullable(),
107
+ startedAt: import_zod2.z.iso.datetime(),
108
+ completedAt: import_zod2.z.iso.datetime().nullable(),
109
+ latencyMs: import_zod2.z.number().nonnegative().nullable()
110
+ });
111
+ var ToolCallStatusSchema = import_zod2.z.enum([
112
+ "requested",
113
+ "approved",
114
+ "blocked",
115
+ "completed",
116
+ "failed"
117
+ ]);
118
+ var ToolCallSchema = import_zod2.z.object({
119
+ id: import_zod2.z.string(),
120
+ toolName: import_zod2.z.string(),
121
+ agentName: import_zod2.z.string(),
122
+ status: ToolCallStatusSchema,
123
+ input: JsonValueSchema,
124
+ output: JsonValueSchema.nullable(),
125
+ error: RunErrorSchema.nullable(),
126
+ requestedAt: import_zod2.z.iso.datetime(),
127
+ completedAt: import_zod2.z.iso.datetime().nullable(),
128
+ latencyMs: import_zod2.z.number().nonnegative().nullable()
129
+ });
130
+ var PolicyDecisionSchema = import_zod2.z.object({
131
+ policyName: import_zod2.z.string(),
132
+ action: PolicyActionSchema,
133
+ agentName: import_zod2.z.string().optional(),
134
+ toolName: import_zod2.z.string().optional(),
135
+ reason: import_zod2.z.string(),
136
+ timestamp: import_zod2.z.iso.datetime()
137
+ });
138
+ var RoutingDecisionSchema = import_zod2.z.object({
139
+ supervisorName: import_zod2.z.string(),
140
+ selectedAgentName: import_zod2.z.string(),
141
+ candidateAgentNames: import_zod2.z.array(import_zod2.z.string()),
142
+ reason: import_zod2.z.string(),
143
+ timestamp: import_zod2.z.iso.datetime()
144
+ });
145
+ var RunApprovalSchema = import_zod2.z.object({
146
+ id: import_zod2.z.string(),
147
+ status: ApprovalStatusSchema,
148
+ toolCallId: import_zod2.z.string().nullable(),
149
+ toolName: import_zod2.z.string().optional(),
150
+ agentName: import_zod2.z.string().optional(),
151
+ reason: import_zod2.z.string(),
152
+ requestedAt: import_zod2.z.iso.datetime(),
153
+ decidedAt: import_zod2.z.iso.datetime().nullable(),
154
+ decidedBy: import_zod2.z.string().nullable()
155
+ });
156
+ var RunArtifactSchema = import_zod2.z.object({
157
+ key: import_zod2.z.string(),
158
+ value: JsonValueSchema,
159
+ producedByAgentName: import_zod2.z.string().optional(),
160
+ createdAt: import_zod2.z.iso.datetime()
161
+ });
162
+ var TokenUsageSchema = import_zod2.z.object({
163
+ inputTokens: import_zod2.z.number().int().nonnegative(),
164
+ outputTokens: import_zod2.z.number().int().nonnegative(),
165
+ totalTokens: import_zod2.z.number().int().nonnegative(),
166
+ cacheCreationInputTokens: import_zod2.z.number().int().nonnegative().optional(),
167
+ cacheReadInputTokens: import_zod2.z.number().int().nonnegative().optional()
168
+ });
169
+ var RunMetricsSchema = import_zod2.z.object({
170
+ totalLatencyMs: import_zod2.z.number().nonnegative().nullable(),
171
+ tokenUsage: TokenUsageSchema.nullable(),
172
+ agentCallCount: import_zod2.z.number().int().nonnegative(),
173
+ toolCallCount: import_zod2.z.number().int().nonnegative(),
174
+ policyDecisionCount: import_zod2.z.number().int().nonnegative(),
175
+ approvalCount: import_zod2.z.number().int().nonnegative()
176
+ });
177
+ var RunStateSchema = import_zod2.z.object({
178
+ runId: import_zod2.z.string(),
179
+ workflowName: import_zod2.z.string(),
180
+ status: RunStatusSchema,
181
+ input: JsonValueSchema,
182
+ messages: import_zod2.z.array(RunMessageSchema),
183
+ agentCalls: import_zod2.z.array(AgentCallSchema),
184
+ toolCalls: import_zod2.z.array(ToolCallSchema),
185
+ policyDecisions: import_zod2.z.array(PolicyDecisionSchema),
186
+ routingDecisions: import_zod2.z.array(RoutingDecisionSchema),
187
+ approvals: import_zod2.z.array(RunApprovalSchema),
188
+ artifacts: import_zod2.z.array(RunArtifactSchema),
189
+ errors: import_zod2.z.array(RunErrorSchema),
190
+ metrics: RunMetricsSchema,
191
+ finalOutput: JsonValueSchema.nullable(),
192
+ createdAt: import_zod2.z.iso.datetime(),
193
+ startedAt: import_zod2.z.iso.datetime().nullable(),
194
+ completedAt: import_zod2.z.iso.datetime().nullable()
195
+ });
196
+ // Annotate the CommonJS export names for ESM import in node:
197
+ 0 && (module.exports = {
198
+ AgentCallSchema,
199
+ AgentCallStatusSchema,
200
+ ApprovalStatusSchema,
201
+ PolicyActionSchema,
202
+ PolicyDecisionSchema,
203
+ RoutingDecisionSchema,
204
+ RunApprovalSchema,
205
+ RunArtifactSchema,
206
+ RunErrorSchema,
207
+ RunMessageRoleSchema,
208
+ RunMessageSchema,
209
+ RunMetricsSchema,
210
+ RunStateSchema,
211
+ RunStatusSchema,
212
+ TokenUsageSchema,
213
+ ToolCallSchema,
214
+ ToolCallStatusSchema
215
+ });
@@ -0,0 +1,326 @@
1
+ import { JsonValue } from './json.cjs';
2
+ import { z } from 'zod';
3
+
4
+ declare const RunStatusSchema: z.ZodEnum<{
5
+ pending: "pending";
6
+ running: "running";
7
+ awaiting_approval: "awaiting_approval";
8
+ completed: "completed";
9
+ failed: "failed";
10
+ canceled: "canceled";
11
+ rejected: "rejected";
12
+ }>;
13
+ type RunStatus = z.infer<typeof RunStatusSchema>;
14
+ declare const PolicyActionSchema: z.ZodEnum<{
15
+ allow: "allow";
16
+ block: "block";
17
+ requireApproval: "requireApproval";
18
+ logOnly: "logOnly";
19
+ redact: "redact";
20
+ }>;
21
+ type PolicyAction = z.infer<typeof PolicyActionSchema>;
22
+ declare const ApprovalStatusSchema: z.ZodEnum<{
23
+ pending: "pending";
24
+ rejected: "rejected";
25
+ approved: "approved";
26
+ }>;
27
+ type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;
28
+ declare const RunErrorSchema: z.ZodObject<{
29
+ message: z.ZodString;
30
+ code: z.ZodOptional<z.ZodString>;
31
+ agentName: z.ZodOptional<z.ZodString>;
32
+ toolName: z.ZodOptional<z.ZodString>;
33
+ timestamp: z.ZodISODateTime;
34
+ }, z.core.$strip>;
35
+ type RunError = z.infer<typeof RunErrorSchema>;
36
+ declare const RunMessageRoleSchema: z.ZodEnum<{
37
+ system: "system";
38
+ user: "user";
39
+ assistant: "assistant";
40
+ tool: "tool";
41
+ }>;
42
+ type RunMessageRole = z.infer<typeof RunMessageRoleSchema>;
43
+ declare const RunMessageSchema: z.ZodObject<{
44
+ role: z.ZodEnum<{
45
+ system: "system";
46
+ user: "user";
47
+ assistant: "assistant";
48
+ tool: "tool";
49
+ }>;
50
+ content: z.ZodString;
51
+ agentName: z.ZodOptional<z.ZodString>;
52
+ toolName: z.ZodOptional<z.ZodString>;
53
+ timestamp: z.ZodISODateTime;
54
+ }, z.core.$strip>;
55
+ type RunMessage = z.infer<typeof RunMessageSchema>;
56
+ declare const AgentCallStatusSchema: z.ZodEnum<{
57
+ running: "running";
58
+ completed: "completed";
59
+ failed: "failed";
60
+ }>;
61
+ type AgentCallStatus = z.infer<typeof AgentCallStatusSchema>;
62
+ declare const AgentCallSchema: z.ZodObject<{
63
+ id: z.ZodString;
64
+ agentName: z.ZodString;
65
+ status: z.ZodEnum<{
66
+ running: "running";
67
+ completed: "completed";
68
+ failed: "failed";
69
+ }>;
70
+ input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
71
+ output: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
72
+ error: z.ZodNullable<z.ZodObject<{
73
+ message: z.ZodString;
74
+ code: z.ZodOptional<z.ZodString>;
75
+ agentName: z.ZodOptional<z.ZodString>;
76
+ toolName: z.ZodOptional<z.ZodString>;
77
+ timestamp: z.ZodISODateTime;
78
+ }, z.core.$strip>>;
79
+ startedAt: z.ZodISODateTime;
80
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
81
+ latencyMs: z.ZodNullable<z.ZodNumber>;
82
+ }, z.core.$strip>;
83
+ type AgentCall = z.infer<typeof AgentCallSchema>;
84
+ declare const ToolCallStatusSchema: z.ZodEnum<{
85
+ completed: "completed";
86
+ failed: "failed";
87
+ approved: "approved";
88
+ requested: "requested";
89
+ blocked: "blocked";
90
+ }>;
91
+ type ToolCallStatus = z.infer<typeof ToolCallStatusSchema>;
92
+ declare const ToolCallSchema: z.ZodObject<{
93
+ id: z.ZodString;
94
+ toolName: z.ZodString;
95
+ agentName: z.ZodString;
96
+ status: z.ZodEnum<{
97
+ completed: "completed";
98
+ failed: "failed";
99
+ approved: "approved";
100
+ requested: "requested";
101
+ blocked: "blocked";
102
+ }>;
103
+ input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
104
+ output: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
105
+ error: z.ZodNullable<z.ZodObject<{
106
+ message: z.ZodString;
107
+ code: z.ZodOptional<z.ZodString>;
108
+ agentName: z.ZodOptional<z.ZodString>;
109
+ toolName: z.ZodOptional<z.ZodString>;
110
+ timestamp: z.ZodISODateTime;
111
+ }, z.core.$strip>>;
112
+ requestedAt: z.ZodISODateTime;
113
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
114
+ latencyMs: z.ZodNullable<z.ZodNumber>;
115
+ }, z.core.$strip>;
116
+ type ToolCall = z.infer<typeof ToolCallSchema>;
117
+ declare const PolicyDecisionSchema: z.ZodObject<{
118
+ policyName: z.ZodString;
119
+ action: z.ZodEnum<{
120
+ allow: "allow";
121
+ block: "block";
122
+ requireApproval: "requireApproval";
123
+ logOnly: "logOnly";
124
+ redact: "redact";
125
+ }>;
126
+ agentName: z.ZodOptional<z.ZodString>;
127
+ toolName: z.ZodOptional<z.ZodString>;
128
+ reason: z.ZodString;
129
+ timestamp: z.ZodISODateTime;
130
+ }, z.core.$strip>;
131
+ type PolicyDecision = z.infer<typeof PolicyDecisionSchema>;
132
+ declare const RoutingDecisionSchema: z.ZodObject<{
133
+ supervisorName: z.ZodString;
134
+ selectedAgentName: z.ZodString;
135
+ candidateAgentNames: z.ZodArray<z.ZodString>;
136
+ reason: z.ZodString;
137
+ timestamp: z.ZodISODateTime;
138
+ }, z.core.$strip>;
139
+ type RoutingDecision = z.infer<typeof RoutingDecisionSchema>;
140
+ declare const RunApprovalSchema: z.ZodObject<{
141
+ id: z.ZodString;
142
+ status: z.ZodEnum<{
143
+ pending: "pending";
144
+ rejected: "rejected";
145
+ approved: "approved";
146
+ }>;
147
+ toolCallId: z.ZodNullable<z.ZodString>;
148
+ toolName: z.ZodOptional<z.ZodString>;
149
+ agentName: z.ZodOptional<z.ZodString>;
150
+ reason: z.ZodString;
151
+ requestedAt: z.ZodISODateTime;
152
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
153
+ decidedBy: z.ZodNullable<z.ZodString>;
154
+ }, z.core.$strip>;
155
+ type RunApproval = z.infer<typeof RunApprovalSchema>;
156
+ declare const RunArtifactSchema: z.ZodObject<{
157
+ key: z.ZodString;
158
+ value: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
159
+ producedByAgentName: z.ZodOptional<z.ZodString>;
160
+ createdAt: z.ZodISODateTime;
161
+ }, z.core.$strip>;
162
+ type RunArtifact = z.infer<typeof RunArtifactSchema>;
163
+ declare const TokenUsageSchema: z.ZodObject<{
164
+ inputTokens: z.ZodNumber;
165
+ outputTokens: z.ZodNumber;
166
+ totalTokens: z.ZodNumber;
167
+ cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
168
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
169
+ }, z.core.$strip>;
170
+ type TokenUsage = z.infer<typeof TokenUsageSchema>;
171
+ declare const RunMetricsSchema: z.ZodObject<{
172
+ totalLatencyMs: z.ZodNullable<z.ZodNumber>;
173
+ tokenUsage: z.ZodNullable<z.ZodObject<{
174
+ inputTokens: z.ZodNumber;
175
+ outputTokens: z.ZodNumber;
176
+ totalTokens: z.ZodNumber;
177
+ cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
178
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
179
+ }, z.core.$strip>>;
180
+ agentCallCount: z.ZodNumber;
181
+ toolCallCount: z.ZodNumber;
182
+ policyDecisionCount: z.ZodNumber;
183
+ approvalCount: z.ZodNumber;
184
+ }, z.core.$strip>;
185
+ type RunMetrics = z.infer<typeof RunMetricsSchema>;
186
+ declare const RunStateSchema: z.ZodObject<{
187
+ runId: z.ZodString;
188
+ workflowName: z.ZodString;
189
+ status: z.ZodEnum<{
190
+ pending: "pending";
191
+ running: "running";
192
+ awaiting_approval: "awaiting_approval";
193
+ completed: "completed";
194
+ failed: "failed";
195
+ canceled: "canceled";
196
+ rejected: "rejected";
197
+ }>;
198
+ input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
199
+ messages: z.ZodArray<z.ZodObject<{
200
+ role: z.ZodEnum<{
201
+ system: "system";
202
+ user: "user";
203
+ assistant: "assistant";
204
+ tool: "tool";
205
+ }>;
206
+ content: z.ZodString;
207
+ agentName: z.ZodOptional<z.ZodString>;
208
+ toolName: z.ZodOptional<z.ZodString>;
209
+ timestamp: z.ZodISODateTime;
210
+ }, z.core.$strip>>;
211
+ agentCalls: z.ZodArray<z.ZodObject<{
212
+ id: z.ZodString;
213
+ agentName: z.ZodString;
214
+ status: z.ZodEnum<{
215
+ running: "running";
216
+ completed: "completed";
217
+ failed: "failed";
218
+ }>;
219
+ input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
220
+ output: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
221
+ error: z.ZodNullable<z.ZodObject<{
222
+ message: z.ZodString;
223
+ code: z.ZodOptional<z.ZodString>;
224
+ agentName: z.ZodOptional<z.ZodString>;
225
+ toolName: z.ZodOptional<z.ZodString>;
226
+ timestamp: z.ZodISODateTime;
227
+ }, z.core.$strip>>;
228
+ startedAt: z.ZodISODateTime;
229
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
230
+ latencyMs: z.ZodNullable<z.ZodNumber>;
231
+ }, z.core.$strip>>;
232
+ toolCalls: z.ZodArray<z.ZodObject<{
233
+ id: z.ZodString;
234
+ toolName: z.ZodString;
235
+ agentName: z.ZodString;
236
+ status: z.ZodEnum<{
237
+ completed: "completed";
238
+ failed: "failed";
239
+ approved: "approved";
240
+ requested: "requested";
241
+ blocked: "blocked";
242
+ }>;
243
+ input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
244
+ output: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
245
+ error: z.ZodNullable<z.ZodObject<{
246
+ message: z.ZodString;
247
+ code: z.ZodOptional<z.ZodString>;
248
+ agentName: z.ZodOptional<z.ZodString>;
249
+ toolName: z.ZodOptional<z.ZodString>;
250
+ timestamp: z.ZodISODateTime;
251
+ }, z.core.$strip>>;
252
+ requestedAt: z.ZodISODateTime;
253
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
254
+ latencyMs: z.ZodNullable<z.ZodNumber>;
255
+ }, z.core.$strip>>;
256
+ policyDecisions: z.ZodArray<z.ZodObject<{
257
+ policyName: z.ZodString;
258
+ action: z.ZodEnum<{
259
+ allow: "allow";
260
+ block: "block";
261
+ requireApproval: "requireApproval";
262
+ logOnly: "logOnly";
263
+ redact: "redact";
264
+ }>;
265
+ agentName: z.ZodOptional<z.ZodString>;
266
+ toolName: z.ZodOptional<z.ZodString>;
267
+ reason: z.ZodString;
268
+ timestamp: z.ZodISODateTime;
269
+ }, z.core.$strip>>;
270
+ routingDecisions: z.ZodArray<z.ZodObject<{
271
+ supervisorName: z.ZodString;
272
+ selectedAgentName: z.ZodString;
273
+ candidateAgentNames: z.ZodArray<z.ZodString>;
274
+ reason: z.ZodString;
275
+ timestamp: z.ZodISODateTime;
276
+ }, z.core.$strip>>;
277
+ approvals: z.ZodArray<z.ZodObject<{
278
+ id: z.ZodString;
279
+ status: z.ZodEnum<{
280
+ pending: "pending";
281
+ rejected: "rejected";
282
+ approved: "approved";
283
+ }>;
284
+ toolCallId: z.ZodNullable<z.ZodString>;
285
+ toolName: z.ZodOptional<z.ZodString>;
286
+ agentName: z.ZodOptional<z.ZodString>;
287
+ reason: z.ZodString;
288
+ requestedAt: z.ZodISODateTime;
289
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
290
+ decidedBy: z.ZodNullable<z.ZodString>;
291
+ }, z.core.$strip>>;
292
+ artifacts: z.ZodArray<z.ZodObject<{
293
+ key: z.ZodString;
294
+ value: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
295
+ producedByAgentName: z.ZodOptional<z.ZodString>;
296
+ createdAt: z.ZodISODateTime;
297
+ }, z.core.$strip>>;
298
+ errors: z.ZodArray<z.ZodObject<{
299
+ message: z.ZodString;
300
+ code: z.ZodOptional<z.ZodString>;
301
+ agentName: z.ZodOptional<z.ZodString>;
302
+ toolName: z.ZodOptional<z.ZodString>;
303
+ timestamp: z.ZodISODateTime;
304
+ }, z.core.$strip>>;
305
+ metrics: z.ZodObject<{
306
+ totalLatencyMs: z.ZodNullable<z.ZodNumber>;
307
+ tokenUsage: z.ZodNullable<z.ZodObject<{
308
+ inputTokens: z.ZodNumber;
309
+ outputTokens: z.ZodNumber;
310
+ totalTokens: z.ZodNumber;
311
+ cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
312
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
313
+ }, z.core.$strip>>;
314
+ agentCallCount: z.ZodNumber;
315
+ toolCallCount: z.ZodNumber;
316
+ policyDecisionCount: z.ZodNumber;
317
+ approvalCount: z.ZodNumber;
318
+ }, z.core.$strip>;
319
+ finalOutput: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
320
+ createdAt: z.ZodISODateTime;
321
+ startedAt: z.ZodNullable<z.ZodISODateTime>;
322
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
323
+ }, z.core.$strip>;
324
+ type RunState = z.infer<typeof RunStateSchema>;
325
+
326
+ export { type AgentCall, AgentCallSchema, type AgentCallStatus, AgentCallStatusSchema, type ApprovalStatus, ApprovalStatusSchema, type PolicyAction, PolicyActionSchema, type PolicyDecision, PolicyDecisionSchema, type RoutingDecision, RoutingDecisionSchema, type RunApproval, RunApprovalSchema, type RunArtifact, RunArtifactSchema, type RunError, RunErrorSchema, type RunMessage, type RunMessageRole, RunMessageRoleSchema, RunMessageSchema, type RunMetrics, RunMetricsSchema, type RunState, RunStateSchema, type RunStatus, RunStatusSchema, type TokenUsage, TokenUsageSchema, type ToolCall, ToolCallSchema, type ToolCallStatus, ToolCallStatusSchema };