@runfile-ai/schemas 0.1.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/event.d.ts +978 -122
- package/dist/event.d.ts.map +1 -1
- package/dist/event.js +269 -18
- package/dist/event.js.map +1 -1
- package/dist/evidence.d.ts +624 -126
- package/dist/evidence.d.ts.map +1 -1
- package/dist/ingest.d.ts +5111 -360
- package/dist/ingest.d.ts.map +1 -1
- package/dist/ingest.js +155 -24
- package/dist/ingest.js.map +1 -1
- package/dist/vault.d.ts +6 -6
- package/generated/json-schema/event.json +692 -44
- package/generated/json-schema/evidence.json +291 -14
- package/generated/json-schema/ingest.json +758 -96
- package/generated/json-schema/vault.json +17 -1
- package/package.json +1 -1
package/dist/event.d.ts
CHANGED
|
@@ -36,39 +36,39 @@ export declare const ActorSchema: z.ZodEffects<z.ZodObject<{
|
|
|
36
36
|
tool_version_hash?: string | undefined;
|
|
37
37
|
}>;
|
|
38
38
|
export type Actor = z.infer<typeof ActorSchema>;
|
|
39
|
-
export declare const ActionKindEnum: z.ZodEnum<["
|
|
39
|
+
export declare const ActionKindEnum: z.ZodEnum<["graph_node_enter", "graph_node_exit", "llm_call", "llm_call_chunk", "tool_call", "tool_result", "tool_approval_requested", "tool_approval_granted", "tool_approval_denied", "state_read", "state_write", "decision", "run_create", "run_end", "run_suspend", "run_resume", "run_abandon", "delegate", "handoff", "schedule_task", "parallel_group_open", "parallel_group_close", "human_approval", "human_input", "policy_check", "anomaly_flag", "sdk_diagnostic"]>;
|
|
40
40
|
export type ActionKind = z.infer<typeof ActionKindEnum>;
|
|
41
41
|
export declare const ActionOutcomeEnum: z.ZodEnum<["success", "failure", "partial", "timeout", "cancelled"]>;
|
|
42
42
|
export declare const ActionSchema: z.ZodObject<{
|
|
43
|
-
kind: z.ZodEnum<["
|
|
43
|
+
kind: z.ZodEnum<["graph_node_enter", "graph_node_exit", "llm_call", "llm_call_chunk", "tool_call", "tool_result", "tool_approval_requested", "tool_approval_granted", "tool_approval_denied", "state_read", "state_write", "decision", "run_create", "run_end", "run_suspend", "run_resume", "run_abandon", "delegate", "handoff", "schedule_task", "parallel_group_open", "parallel_group_close", "human_approval", "human_input", "policy_check", "anomaly_flag", "sdk_diagnostic"]>;
|
|
44
44
|
name: z.ZodString;
|
|
45
45
|
outcome: z.ZodOptional<z.ZodEnum<["success", "failure", "partial", "timeout", "cancelled"]>>;
|
|
46
46
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
47
47
|
}, "strict", z.ZodTypeAny, {
|
|
48
|
-
kind: "
|
|
48
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
49
49
|
name: string;
|
|
50
50
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
51
51
|
duration_ms?: number | undefined;
|
|
52
52
|
}, {
|
|
53
|
-
kind: "
|
|
53
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
54
54
|
name: string;
|
|
55
55
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
56
56
|
duration_ms?: number | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
export type Action = z.infer<typeof ActionSchema>;
|
|
59
|
-
export declare const DataClassificationEnum: z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci"]>;
|
|
59
|
+
export declare const DataClassificationEnum: z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci", "audit_of_audit"]>;
|
|
60
60
|
export declare const SubjectSchema: z.ZodObject<{
|
|
61
61
|
resource_urn: z.ZodOptional<z.ZodString>;
|
|
62
|
-
data_classification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci"]>>;
|
|
62
|
+
data_classification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci", "audit_of_audit"]>>;
|
|
63
63
|
regulatory_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
64
|
}, "strict", z.ZodTypeAny, {
|
|
65
65
|
regulatory_tags?: string[] | undefined;
|
|
66
66
|
resource_urn?: string | undefined;
|
|
67
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
67
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
regulatory_tags?: string[] | undefined;
|
|
70
70
|
resource_urn?: string | undefined;
|
|
71
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
71
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
export type Subject = z.infer<typeof SubjectSchema>;
|
|
74
74
|
export declare const ModelProviderEnum: z.ZodEnum<["anthropic", "openai", "google", "aws_bedrock", "azure_openai", "ollama", "self_hosted", "other"]>;
|
|
@@ -81,6 +81,7 @@ export declare const ModelRefSchema: z.ZodObject<{
|
|
|
81
81
|
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
82
82
|
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
83
83
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
84
85
|
}, "strict", z.ZodTypeAny, {
|
|
85
86
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
86
87
|
model_id: string;
|
|
@@ -90,6 +91,7 @@ export declare const ModelRefSchema: z.ZodObject<{
|
|
|
90
91
|
input_tokens?: number | undefined;
|
|
91
92
|
output_tokens?: number | undefined;
|
|
92
93
|
temperature?: number | undefined;
|
|
94
|
+
streaming?: boolean | undefined;
|
|
93
95
|
}, {
|
|
94
96
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
95
97
|
model_id: string;
|
|
@@ -99,6 +101,7 @@ export declare const ModelRefSchema: z.ZodObject<{
|
|
|
99
101
|
input_tokens?: number | undefined;
|
|
100
102
|
output_tokens?: number | undefined;
|
|
101
103
|
temperature?: number | undefined;
|
|
104
|
+
streaming?: boolean | undefined;
|
|
102
105
|
}>;
|
|
103
106
|
export type ModelRef = z.infer<typeof ModelRefSchema>;
|
|
104
107
|
export declare const DecisionOutcomeEnum: z.ZodEnum<["approved", "denied", "escalated", "deferred", "no_action", "custom"]>;
|
|
@@ -125,7 +128,118 @@ export declare const DecisionSchema: z.ZodObject<{
|
|
|
125
128
|
reversed_by_event?: string | undefined;
|
|
126
129
|
}>;
|
|
127
130
|
export type Decision = z.infer<typeof DecisionSchema>;
|
|
128
|
-
export declare const
|
|
131
|
+
export declare const SuspensionReasonEnum: z.ZodEnum<["awaiting_human_approval", "awaiting_human_input", "awaiting_webhook", "awaiting_schedule", "awaiting_external_system", "awaiting_subagent", "other"]>;
|
|
132
|
+
export declare const FrameworkEnum: z.ZodEnum<["langgraph", "openai_agents", "claude_agent_sdk", "vercel_ai_sdk", "mcp", "manual", "otel"]>;
|
|
133
|
+
export declare const FrameworkSignalSchema: z.ZodObject<{
|
|
134
|
+
framework: z.ZodOptional<z.ZodEnum<["langgraph", "openai_agents", "claude_agent_sdk", "vercel_ai_sdk", "mcp", "manual", "otel"]>>;
|
|
135
|
+
signal_name: z.ZodOptional<z.ZodString>;
|
|
136
|
+
signal_payload_hash: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, "strict", z.ZodTypeAny, {
|
|
138
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
139
|
+
signal_name?: string | undefined;
|
|
140
|
+
signal_payload_hash?: string | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
143
|
+
signal_name?: string | undefined;
|
|
144
|
+
signal_payload_hash?: string | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
export type FrameworkSignal = z.infer<typeof FrameworkSignalSchema>;
|
|
147
|
+
export declare const DetectionSourceEnum: z.ZodEnum<["framework_inferred", "customer_explicit", "derived"]>;
|
|
148
|
+
export declare const SuspensionDetailsSchema: z.ZodObject<{
|
|
149
|
+
reason: z.ZodEnum<["awaiting_human_approval", "awaiting_human_input", "awaiting_webhook", "awaiting_schedule", "awaiting_external_system", "awaiting_subagent", "other"]>;
|
|
150
|
+
expected_resumer: z.ZodOptional<z.ZodString>;
|
|
151
|
+
expected_resume_by: z.ZodOptional<z.ZodString>;
|
|
152
|
+
detection_source: z.ZodOptional<z.ZodEnum<["framework_inferred", "customer_explicit", "derived"]>>;
|
|
153
|
+
framework_signal: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
framework: z.ZodOptional<z.ZodEnum<["langgraph", "openai_agents", "claude_agent_sdk", "vercel_ai_sdk", "mcp", "manual", "otel"]>>;
|
|
155
|
+
signal_name: z.ZodOptional<z.ZodString>;
|
|
156
|
+
signal_payload_hash: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, "strict", z.ZodTypeAny, {
|
|
158
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
159
|
+
signal_name?: string | undefined;
|
|
160
|
+
signal_payload_hash?: string | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
163
|
+
signal_name?: string | undefined;
|
|
164
|
+
signal_payload_hash?: string | undefined;
|
|
165
|
+
}>>;
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
167
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
168
|
+
expected_resumer?: string | undefined;
|
|
169
|
+
expected_resume_by?: string | undefined;
|
|
170
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
171
|
+
framework_signal?: {
|
|
172
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
173
|
+
signal_name?: string | undefined;
|
|
174
|
+
signal_payload_hash?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
178
|
+
expected_resumer?: string | undefined;
|
|
179
|
+
expected_resume_by?: string | undefined;
|
|
180
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
181
|
+
framework_signal?: {
|
|
182
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
183
|
+
signal_name?: string | undefined;
|
|
184
|
+
signal_payload_hash?: string | undefined;
|
|
185
|
+
} | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
export type SuspensionDetails = z.infer<typeof SuspensionDetailsSchema>;
|
|
188
|
+
export declare const ResumeTriggerEnum: z.ZodEnum<["human_approval_granted", "human_input_received", "webhook_received", "schedule_fired", "external_system_response", "subagent_completed", "manual_resume", "other"]>;
|
|
189
|
+
export declare const ResumeDetailsSchema: z.ZodObject<{
|
|
190
|
+
triggered_by: z.ZodEnum<["human_approval_granted", "human_input_received", "webhook_received", "schedule_fired", "external_system_response", "subagent_completed", "manual_resume", "other"]>;
|
|
191
|
+
resumer_principal: z.ZodOptional<z.ZodString>;
|
|
192
|
+
suspension_duration_seconds: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
suspension_started_event_id: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, "strict", z.ZodTypeAny, {
|
|
195
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
196
|
+
resumer_principal?: string | undefined;
|
|
197
|
+
suspension_duration_seconds?: number | undefined;
|
|
198
|
+
suspension_started_event_id?: string | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
201
|
+
resumer_principal?: string | undefined;
|
|
202
|
+
suspension_duration_seconds?: number | undefined;
|
|
203
|
+
suspension_started_event_id?: string | undefined;
|
|
204
|
+
}>;
|
|
205
|
+
export type ResumeDetails = z.infer<typeof ResumeDetailsSchema>;
|
|
206
|
+
export declare const DelegationFrameworkSignalEnum: z.ZodEnum<["langgraph_subgraph", "openai_agents_as_tool", "claude_agent_sdk_subagent", "manual", "other"]>;
|
|
207
|
+
export declare const DelegationDetailsSchema: z.ZodObject<{
|
|
208
|
+
delegated_run_id: z.ZodString;
|
|
209
|
+
delegated_agent_identity: z.ZodString;
|
|
210
|
+
wait_for_completion: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
framework_signal: z.ZodOptional<z.ZodEnum<["langgraph_subgraph", "openai_agents_as_tool", "claude_agent_sdk_subagent", "manual", "other"]>>;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
delegated_run_id: string;
|
|
214
|
+
delegated_agent_identity: string;
|
|
215
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
216
|
+
wait_for_completion?: boolean | undefined;
|
|
217
|
+
}, {
|
|
218
|
+
delegated_run_id: string;
|
|
219
|
+
delegated_agent_identity: string;
|
|
220
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
221
|
+
wait_for_completion?: boolean | undefined;
|
|
222
|
+
}>;
|
|
223
|
+
export type DelegationDetails = z.infer<typeof DelegationDetailsSchema>;
|
|
224
|
+
export declare const HandoffFrameworkSignalEnum: z.ZodEnum<["openai_agents_handoff", "langgraph_explicit", "manual", "other"]>;
|
|
225
|
+
export declare const HandoffDetailsSchema: z.ZodObject<{
|
|
226
|
+
target_run_id: z.ZodString;
|
|
227
|
+
target_agent_identity: z.ZodString;
|
|
228
|
+
handoff_reason: z.ZodOptional<z.ZodString>;
|
|
229
|
+
framework_signal: z.ZodOptional<z.ZodEnum<["openai_agents_handoff", "langgraph_explicit", "manual", "other"]>>;
|
|
230
|
+
}, "strict", z.ZodTypeAny, {
|
|
231
|
+
target_run_id: string;
|
|
232
|
+
target_agent_identity: string;
|
|
233
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
234
|
+
handoff_reason?: string | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
target_run_id: string;
|
|
237
|
+
target_agent_identity: string;
|
|
238
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
239
|
+
handoff_reason?: string | undefined;
|
|
240
|
+
}>;
|
|
241
|
+
export type HandoffDetails = z.infer<typeof HandoffDetailsSchema>;
|
|
242
|
+
export declare const ContentTypeEnum: z.ZodEnum<["application/json", "text/plain", "application/vnd.runfile.llm-request+json", "application/vnd.runfile.llm-response+json", "application/vnd.runfile.tool-call+json", "application/vnd.runfile.tool-result+json", "application/vnd.runfile.state-snapshot+json", "application/vnd.runfile.framework-signal+json"]>;
|
|
129
243
|
export declare const RedactionAppliedSchema: z.ZodObject<{
|
|
130
244
|
redacted_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
131
245
|
tokenized_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -143,15 +257,18 @@ export type RedactionApplied = z.infer<typeof RedactionAppliedSchema>;
|
|
|
143
257
|
export declare const PayloadEncryptionSchema: z.ZodObject<{
|
|
144
258
|
algorithm: z.ZodLiteral<"aes-256-gcm">;
|
|
145
259
|
data_key_wrapped: z.ZodString;
|
|
146
|
-
|
|
260
|
+
key_id: z.ZodOptional<z.ZodString>;
|
|
261
|
+
nonce: z.ZodString;
|
|
147
262
|
}, "strict", z.ZodTypeAny, {
|
|
148
263
|
algorithm: "aes-256-gcm";
|
|
149
264
|
data_key_wrapped: string;
|
|
150
|
-
|
|
265
|
+
nonce: string;
|
|
266
|
+
key_id?: string | undefined;
|
|
151
267
|
}, {
|
|
152
268
|
algorithm: "aes-256-gcm";
|
|
153
269
|
data_key_wrapped: string;
|
|
154
|
-
|
|
270
|
+
nonce: string;
|
|
271
|
+
key_id?: string | undefined;
|
|
155
272
|
}>;
|
|
156
273
|
export type PayloadEncryption = z.infer<typeof PayloadEncryptionSchema>;
|
|
157
274
|
export declare const PayloadRefSchema: z.ZodObject<{
|
|
@@ -161,17 +278,20 @@ export declare const PayloadRefSchema: z.ZodObject<{
|
|
|
161
278
|
encryption: z.ZodObject<{
|
|
162
279
|
algorithm: z.ZodLiteral<"aes-256-gcm">;
|
|
163
280
|
data_key_wrapped: z.ZodString;
|
|
164
|
-
|
|
281
|
+
key_id: z.ZodOptional<z.ZodString>;
|
|
282
|
+
nonce: z.ZodString;
|
|
165
283
|
}, "strict", z.ZodTypeAny, {
|
|
166
284
|
algorithm: "aes-256-gcm";
|
|
167
285
|
data_key_wrapped: string;
|
|
168
|
-
|
|
286
|
+
nonce: string;
|
|
287
|
+
key_id?: string | undefined;
|
|
169
288
|
}, {
|
|
170
289
|
algorithm: "aes-256-gcm";
|
|
171
290
|
data_key_wrapped: string;
|
|
172
|
-
|
|
291
|
+
nonce: string;
|
|
292
|
+
key_id?: string | undefined;
|
|
173
293
|
}>;
|
|
174
|
-
content_type: z.ZodOptional<z.ZodEnum<["application/json", "text/plain", "application/vnd.runfile.llm-request+json", "application/vnd.runfile.llm-response+json", "application/vnd.runfile.tool-call+json", "application/vnd.runfile.tool-result+json", "application/vnd.runfile.state-snapshot+json"]>>;
|
|
294
|
+
content_type: z.ZodOptional<z.ZodEnum<["application/json", "text/plain", "application/vnd.runfile.llm-request+json", "application/vnd.runfile.llm-response+json", "application/vnd.runfile.tool-call+json", "application/vnd.runfile.tool-result+json", "application/vnd.runfile.state-snapshot+json", "application/vnd.runfile.framework-signal+json"]>>;
|
|
175
295
|
redaction_applied: z.ZodOptional<z.ZodObject<{
|
|
176
296
|
redacted_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
297
|
tokenized_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -192,9 +312,10 @@ export declare const PayloadRefSchema: z.ZodObject<{
|
|
|
192
312
|
encryption: {
|
|
193
313
|
algorithm: "aes-256-gcm";
|
|
194
314
|
data_key_wrapped: string;
|
|
195
|
-
|
|
315
|
+
nonce: string;
|
|
316
|
+
key_id?: string | undefined;
|
|
196
317
|
};
|
|
197
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
318
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
198
319
|
redaction_applied?: {
|
|
199
320
|
redacted_classes?: string[] | undefined;
|
|
200
321
|
tokenized_classes?: string[] | undefined;
|
|
@@ -207,9 +328,10 @@ export declare const PayloadRefSchema: z.ZodObject<{
|
|
|
207
328
|
encryption: {
|
|
208
329
|
algorithm: "aes-256-gcm";
|
|
209
330
|
data_key_wrapped: string;
|
|
210
|
-
|
|
331
|
+
nonce: string;
|
|
332
|
+
key_id?: string | undefined;
|
|
211
333
|
};
|
|
212
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
334
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
213
335
|
redaction_applied?: {
|
|
214
336
|
redacted_classes?: string[] | undefined;
|
|
215
337
|
tokenized_classes?: string[] | undefined;
|
|
@@ -217,42 +339,107 @@ export declare const PayloadRefSchema: z.ZodObject<{
|
|
|
217
339
|
} | undefined;
|
|
218
340
|
}>;
|
|
219
341
|
export type PayloadRef = z.infer<typeof PayloadRefSchema>;
|
|
220
|
-
export declare const
|
|
342
|
+
export declare const OtelAttributesSchema: z.ZodObject<{
|
|
343
|
+
gen_ai_system: z.ZodOptional<z.ZodString>;
|
|
344
|
+
gen_ai_operation_name: z.ZodOptional<z.ZodString>;
|
|
345
|
+
gen_ai_provider_name: z.ZodOptional<z.ZodString>;
|
|
346
|
+
gen_ai_request_model: z.ZodOptional<z.ZodString>;
|
|
347
|
+
gen_ai_response_model: z.ZodOptional<z.ZodString>;
|
|
348
|
+
gen_ai_request_temperature: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
gen_ai_request_top_p: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
gen_ai_request_max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
gen_ai_response_id: z.ZodOptional<z.ZodString>;
|
|
352
|
+
gen_ai_response_finish_reasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
353
|
+
gen_ai_usage_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
gen_ai_usage_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
355
|
+
gen_ai_tool_name: z.ZodOptional<z.ZodString>;
|
|
356
|
+
gen_ai_tool_call_id: z.ZodOptional<z.ZodString>;
|
|
357
|
+
gen_ai_agent_id: z.ZodOptional<z.ZodString>;
|
|
358
|
+
gen_ai_agent_name: z.ZodOptional<z.ZodString>;
|
|
359
|
+
gen_ai_agent_description: z.ZodOptional<z.ZodString>;
|
|
360
|
+
gen_ai_conversation_id: z.ZodOptional<z.ZodString>;
|
|
361
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
362
|
+
}, "strict", z.ZodTypeAny, {
|
|
363
|
+
gen_ai_system?: string | undefined;
|
|
364
|
+
gen_ai_operation_name?: string | undefined;
|
|
365
|
+
gen_ai_provider_name?: string | undefined;
|
|
366
|
+
gen_ai_request_model?: string | undefined;
|
|
367
|
+
gen_ai_response_model?: string | undefined;
|
|
368
|
+
gen_ai_request_temperature?: number | undefined;
|
|
369
|
+
gen_ai_request_top_p?: number | undefined;
|
|
370
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
371
|
+
gen_ai_response_id?: string | undefined;
|
|
372
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
373
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
374
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
375
|
+
gen_ai_tool_name?: string | undefined;
|
|
376
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
377
|
+
gen_ai_agent_id?: string | undefined;
|
|
378
|
+
gen_ai_agent_name?: string | undefined;
|
|
379
|
+
gen_ai_agent_description?: string | undefined;
|
|
380
|
+
gen_ai_conversation_id?: string | undefined;
|
|
381
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
382
|
+
}, {
|
|
383
|
+
gen_ai_system?: string | undefined;
|
|
384
|
+
gen_ai_operation_name?: string | undefined;
|
|
385
|
+
gen_ai_provider_name?: string | undefined;
|
|
386
|
+
gen_ai_request_model?: string | undefined;
|
|
387
|
+
gen_ai_response_model?: string | undefined;
|
|
388
|
+
gen_ai_request_temperature?: number | undefined;
|
|
389
|
+
gen_ai_request_top_p?: number | undefined;
|
|
390
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
391
|
+
gen_ai_response_id?: string | undefined;
|
|
392
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
393
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
394
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
395
|
+
gen_ai_tool_name?: string | undefined;
|
|
396
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
397
|
+
gen_ai_agent_id?: string | undefined;
|
|
398
|
+
gen_ai_agent_name?: string | undefined;
|
|
399
|
+
gen_ai_agent_description?: string | undefined;
|
|
400
|
+
gen_ai_conversation_id?: string | undefined;
|
|
401
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
402
|
+
}>;
|
|
403
|
+
export type OtelAttributes = z.infer<typeof OtelAttributesSchema>;
|
|
404
|
+
export declare const AnomalyCodeEnum: z.ZodEnum<["missing_ambient_context", "chain_break", "sequence_gap", "causality_violation", "out_of_order_arrival", "model_version_drift", "unknown_agent_identity", "data_classification_mismatch", "policy_threshold_without_hitl", "unauthorized_tool_invocation", "redaction_policy_mismatch", "schema_version_warning", "agent_identity_mismatch_with_run", "suspension_sla_exceeded", "apparent_crash_detected", "active_duration_exceeds_threshold", "framework_signal_unrecognised", "otel_attribute_missing", "delegation_loop_detected"]>;
|
|
221
405
|
export declare const AnomalySeverityEnum: z.ZodEnum<["info", "warning", "error", "critical"]>;
|
|
222
406
|
export declare const AnomalyFlagSchema: z.ZodObject<{
|
|
223
|
-
code: z.ZodEnum<["missing_ambient_context", "chain_break", "out_of_order_arrival", "model_version_drift", "unknown_agent_identity", "data_classification_mismatch", "policy_threshold_without_hitl", "unauthorized_tool_invocation", "redaction_policy_mismatch", "schema_version_warning"]>;
|
|
407
|
+
code: z.ZodEnum<["missing_ambient_context", "chain_break", "sequence_gap", "causality_violation", "out_of_order_arrival", "model_version_drift", "unknown_agent_identity", "data_classification_mismatch", "policy_threshold_without_hitl", "unauthorized_tool_invocation", "redaction_policy_mismatch", "schema_version_warning", "agent_identity_mismatch_with_run", "suspension_sla_exceeded", "apparent_crash_detected", "active_duration_exceeds_threshold", "framework_signal_unrecognised", "otel_attribute_missing", "delegation_loop_detected"]>;
|
|
224
408
|
severity: z.ZodEnum<["info", "warning", "error", "critical"]>;
|
|
225
409
|
detail: z.ZodOptional<z.ZodString>;
|
|
226
410
|
}, "strict", z.ZodTypeAny, {
|
|
227
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
411
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
228
412
|
severity: "info" | "warning" | "error" | "critical";
|
|
229
413
|
detail?: string | undefined;
|
|
230
414
|
}, {
|
|
231
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
415
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
232
416
|
severity: "info" | "warning" | "error" | "critical";
|
|
233
417
|
detail?: string | undefined;
|
|
234
418
|
}>;
|
|
235
419
|
export type AnomalyFlag = z.infer<typeof AnomalyFlagSchema>;
|
|
236
420
|
export declare const WallClockSourceEnum: z.ZodEnum<["aws_time_sync", "ntp", "host_system", "unknown"]>;
|
|
237
421
|
export declare const SdkNameEnum: z.ZodEnum<["runfile-py", "@runfile/sdk"]>;
|
|
238
|
-
export declare const SdkFrameworkEnum: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "mastra", "vercel_ai_sdk", "mcp_client", "otel_generic", "manual"]>;
|
|
422
|
+
export declare const SdkFrameworkEnum: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "claude_agent_sdk", "mastra", "vercel_ai_sdk", "pydantic_ai", "crewai", "mcp_client", "otel_generic", "manual"]>;
|
|
239
423
|
export declare const SdkMetadataSchema: z.ZodObject<{
|
|
240
424
|
name: z.ZodEnum<["runfile-py", "@runfile/sdk"]>;
|
|
241
425
|
version: z.ZodString;
|
|
242
|
-
framework: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "mastra", "vercel_ai_sdk", "mcp_client", "otel_generic", "manual"]>;
|
|
426
|
+
framework: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "claude_agent_sdk", "mastra", "vercel_ai_sdk", "pydantic_ai", "crewai", "mcp_client", "otel_generic", "manual"]>;
|
|
243
427
|
framework_version: z.ZodOptional<z.ZodString>;
|
|
428
|
+
adapter: z.ZodOptional<z.ZodString>;
|
|
244
429
|
host: z.ZodOptional<z.ZodString>;
|
|
245
430
|
}, "strict", z.ZodTypeAny, {
|
|
246
|
-
framework: "langgraph" | "
|
|
431
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
247
432
|
name: "runfile-py" | "@runfile/sdk";
|
|
248
433
|
version: string;
|
|
249
434
|
framework_version?: string | undefined;
|
|
435
|
+
adapter?: string | undefined;
|
|
250
436
|
host?: string | undefined;
|
|
251
437
|
}, {
|
|
252
|
-
framework: "langgraph" | "
|
|
438
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
253
439
|
name: "runfile-py" | "@runfile/sdk";
|
|
254
440
|
version: string;
|
|
255
441
|
framework_version?: string | undefined;
|
|
442
|
+
adapter?: string | undefined;
|
|
256
443
|
host?: string | undefined;
|
|
257
444
|
}>;
|
|
258
445
|
export type SdkMetadata = z.infer<typeof SdkMetadataSchema>;
|
|
@@ -273,13 +460,296 @@ export declare const MerkleInclusionSchema: z.ZodObject<{
|
|
|
273
460
|
merkle_root: string;
|
|
274
461
|
}>;
|
|
275
462
|
export type MerkleInclusion = z.infer<typeof MerkleInclusionSchema>;
|
|
463
|
+
/** A typed pointer to a specific event in another run, used for inter-run links. */
|
|
464
|
+
export declare const RunReferenceSchema: z.ZodObject<{
|
|
465
|
+
run_id: z.ZodString;
|
|
466
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
467
|
+
}, "strict", z.ZodTypeAny, {
|
|
468
|
+
run_id: string;
|
|
469
|
+
event_id?: string | undefined;
|
|
470
|
+
}, {
|
|
471
|
+
run_id: string;
|
|
472
|
+
event_id?: string | undefined;
|
|
473
|
+
}>;
|
|
474
|
+
export type RunReference = z.infer<typeof RunReferenceSchema>;
|
|
475
|
+
export declare const RunLifecycleStateEnum: z.ZodEnum<["active", "awaiting_human", "awaiting_webhook", "awaiting_schedule", "ended"]>;
|
|
476
|
+
export type RunLifecycleState = z.infer<typeof RunLifecycleStateEnum>;
|
|
477
|
+
export declare const RunOutcomeEnum: z.ZodEnum<["success", "failure", "incomplete", "abandoned"]>;
|
|
478
|
+
export type RunOutcome = z.infer<typeof RunOutcomeEnum>;
|
|
479
|
+
export declare const SuspensionIntervalSchema: z.ZodObject<{
|
|
480
|
+
started: z.ZodString;
|
|
481
|
+
ended: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
reason: z.ZodEnum<["awaiting_human_approval", "awaiting_human_input", "awaiting_webhook", "awaiting_schedule", "awaiting_external_system", "awaiting_subagent", "other"]>;
|
|
483
|
+
trigger_event_id: z.ZodString;
|
|
484
|
+
resume_event_id: z.ZodOptional<z.ZodString>;
|
|
485
|
+
}, "strict", z.ZodTypeAny, {
|
|
486
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
487
|
+
started: string;
|
|
488
|
+
trigger_event_id: string;
|
|
489
|
+
ended?: string | null | undefined;
|
|
490
|
+
resume_event_id?: string | undefined;
|
|
491
|
+
}, {
|
|
492
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
493
|
+
started: string;
|
|
494
|
+
trigger_event_id: string;
|
|
495
|
+
ended?: string | null | undefined;
|
|
496
|
+
resume_event_id?: string | undefined;
|
|
497
|
+
}>;
|
|
498
|
+
export type SuspensionInterval = z.infer<typeof SuspensionIntervalSchema>;
|
|
276
499
|
/**
|
|
277
|
-
*
|
|
278
|
-
*
|
|
500
|
+
* RunfileRun — a bounded operation owned by exactly one agent identity. Contains many
|
|
501
|
+
* events, may suspend/resume, and may be linked to other runs via delegation, handoff,
|
|
502
|
+
* scheduling, or conversation membership. The run record is a queryable materialisation
|
|
503
|
+
* built by the Event Processor from lifecycle events; it carries no hash fields and is
|
|
504
|
+
* not anchored in the Merkle tree (the run's *events* are).
|
|
505
|
+
*/
|
|
506
|
+
export declare const RunfileRunSchema: z.ZodObject<{
|
|
507
|
+
schema_version: z.ZodString;
|
|
508
|
+
run_id: z.ZodString;
|
|
509
|
+
tenant_id: z.ZodString;
|
|
510
|
+
agent_identity: z.ZodString;
|
|
511
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
512
|
+
lifecycle_state: z.ZodEnum<["active", "awaiting_human", "awaiting_webhook", "awaiting_schedule", "ended"]>;
|
|
513
|
+
started_at: z.ZodString;
|
|
514
|
+
ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
515
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodEnum<["success", "failure", "incomplete", "abandoned"]>>>;
|
|
516
|
+
delegated_from: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
run_id: z.ZodString;
|
|
518
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
519
|
+
}, "strict", z.ZodTypeAny, {
|
|
520
|
+
run_id: string;
|
|
521
|
+
event_id?: string | undefined;
|
|
522
|
+
}, {
|
|
523
|
+
run_id: string;
|
|
524
|
+
event_id?: string | undefined;
|
|
525
|
+
}>>;
|
|
526
|
+
handed_off_from: z.ZodOptional<z.ZodObject<{
|
|
527
|
+
run_id: z.ZodString;
|
|
528
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
529
|
+
}, "strict", z.ZodTypeAny, {
|
|
530
|
+
run_id: string;
|
|
531
|
+
event_id?: string | undefined;
|
|
532
|
+
}, {
|
|
533
|
+
run_id: string;
|
|
534
|
+
event_id?: string | undefined;
|
|
535
|
+
}>>;
|
|
536
|
+
scheduled_from: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
run_id: z.ZodString;
|
|
538
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
539
|
+
}, "strict", z.ZodTypeAny, {
|
|
540
|
+
run_id: string;
|
|
541
|
+
event_id?: string | undefined;
|
|
542
|
+
}, {
|
|
543
|
+
run_id: string;
|
|
544
|
+
event_id?: string | undefined;
|
|
545
|
+
}>>;
|
|
546
|
+
invoked_by: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
run_id: z.ZodString;
|
|
548
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, "strict", z.ZodTypeAny, {
|
|
550
|
+
run_id: string;
|
|
551
|
+
event_id?: string | undefined;
|
|
552
|
+
}, {
|
|
553
|
+
run_id: string;
|
|
554
|
+
event_id?: string | undefined;
|
|
555
|
+
}>>;
|
|
556
|
+
continued_from: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
run_id: z.ZodString;
|
|
558
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
559
|
+
}, "strict", z.ZodTypeAny, {
|
|
560
|
+
run_id: string;
|
|
561
|
+
event_id?: string | undefined;
|
|
562
|
+
}, {
|
|
563
|
+
run_id: string;
|
|
564
|
+
event_id?: string | undefined;
|
|
565
|
+
}>>;
|
|
566
|
+
active_duration_seconds: z.ZodOptional<z.ZodNumber>;
|
|
567
|
+
suspension_intervals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
568
|
+
started: z.ZodString;
|
|
569
|
+
ended: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
570
|
+
reason: z.ZodEnum<["awaiting_human_approval", "awaiting_human_input", "awaiting_webhook", "awaiting_schedule", "awaiting_external_system", "awaiting_subagent", "other"]>;
|
|
571
|
+
trigger_event_id: z.ZodString;
|
|
572
|
+
resume_event_id: z.ZodOptional<z.ZodString>;
|
|
573
|
+
}, "strict", z.ZodTypeAny, {
|
|
574
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
575
|
+
started: string;
|
|
576
|
+
trigger_event_id: string;
|
|
577
|
+
ended?: string | null | undefined;
|
|
578
|
+
resume_event_id?: string | undefined;
|
|
579
|
+
}, {
|
|
580
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
581
|
+
started: string;
|
|
582
|
+
trigger_event_id: string;
|
|
583
|
+
ended?: string | null | undefined;
|
|
584
|
+
resume_event_id?: string | undefined;
|
|
585
|
+
}>, "many">>;
|
|
586
|
+
environment: z.ZodOptional<z.ZodEnum<["production", "staging", "development"]>>;
|
|
587
|
+
labels: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
588
|
+
redaction_policy_version: z.ZodString;
|
|
589
|
+
regulatory_scope_version: z.ZodOptional<z.ZodString>;
|
|
590
|
+
sdk_at_start: z.ZodOptional<z.ZodObject<{
|
|
591
|
+
name: z.ZodEnum<["runfile-py", "@runfile/sdk"]>;
|
|
592
|
+
version: z.ZodString;
|
|
593
|
+
framework: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "claude_agent_sdk", "mastra", "vercel_ai_sdk", "pydantic_ai", "crewai", "mcp_client", "otel_generic", "manual"]>;
|
|
594
|
+
framework_version: z.ZodOptional<z.ZodString>;
|
|
595
|
+
adapter: z.ZodOptional<z.ZodString>;
|
|
596
|
+
host: z.ZodOptional<z.ZodString>;
|
|
597
|
+
}, "strict", z.ZodTypeAny, {
|
|
598
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
599
|
+
name: "runfile-py" | "@runfile/sdk";
|
|
600
|
+
version: string;
|
|
601
|
+
framework_version?: string | undefined;
|
|
602
|
+
adapter?: string | undefined;
|
|
603
|
+
host?: string | undefined;
|
|
604
|
+
}, {
|
|
605
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
606
|
+
name: "runfile-py" | "@runfile/sdk";
|
|
607
|
+
version: string;
|
|
608
|
+
framework_version?: string | undefined;
|
|
609
|
+
adapter?: string | undefined;
|
|
610
|
+
host?: string | undefined;
|
|
611
|
+
}>>;
|
|
612
|
+
merkle_inclusions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
613
|
+
manifest_uri: z.ZodString;
|
|
614
|
+
leaf_index: z.ZodNumber;
|
|
615
|
+
merkle_root: z.ZodString;
|
|
616
|
+
}, "strict", z.ZodTypeAny, {
|
|
617
|
+
manifest_uri: string;
|
|
618
|
+
leaf_index: number;
|
|
619
|
+
merkle_root: string;
|
|
620
|
+
}, {
|
|
621
|
+
manifest_uri: string;
|
|
622
|
+
leaf_index: number;
|
|
623
|
+
merkle_root: string;
|
|
624
|
+
}>, "many">>;
|
|
625
|
+
}, "strict", z.ZodTypeAny, {
|
|
626
|
+
agent_identity: string;
|
|
627
|
+
run_id: string;
|
|
628
|
+
schema_version: string;
|
|
629
|
+
tenant_id: string;
|
|
630
|
+
lifecycle_state: "awaiting_webhook" | "awaiting_schedule" | "active" | "awaiting_human" | "ended";
|
|
631
|
+
started_at: string;
|
|
632
|
+
redaction_policy_version: string;
|
|
633
|
+
outcome?: "success" | "failure" | "incomplete" | "abandoned" | null | undefined;
|
|
634
|
+
conversation_id?: string | undefined;
|
|
635
|
+
ended_at?: string | null | undefined;
|
|
636
|
+
delegated_from?: {
|
|
637
|
+
run_id: string;
|
|
638
|
+
event_id?: string | undefined;
|
|
639
|
+
} | undefined;
|
|
640
|
+
handed_off_from?: {
|
|
641
|
+
run_id: string;
|
|
642
|
+
event_id?: string | undefined;
|
|
643
|
+
} | undefined;
|
|
644
|
+
scheduled_from?: {
|
|
645
|
+
run_id: string;
|
|
646
|
+
event_id?: string | undefined;
|
|
647
|
+
} | undefined;
|
|
648
|
+
invoked_by?: {
|
|
649
|
+
run_id: string;
|
|
650
|
+
event_id?: string | undefined;
|
|
651
|
+
} | undefined;
|
|
652
|
+
continued_from?: {
|
|
653
|
+
run_id: string;
|
|
654
|
+
event_id?: string | undefined;
|
|
655
|
+
} | undefined;
|
|
656
|
+
active_duration_seconds?: number | undefined;
|
|
657
|
+
suspension_intervals?: {
|
|
658
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
659
|
+
started: string;
|
|
660
|
+
trigger_event_id: string;
|
|
661
|
+
ended?: string | null | undefined;
|
|
662
|
+
resume_event_id?: string | undefined;
|
|
663
|
+
}[] | undefined;
|
|
664
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
665
|
+
labels?: Record<string, string> | undefined;
|
|
666
|
+
regulatory_scope_version?: string | undefined;
|
|
667
|
+
sdk_at_start?: {
|
|
668
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
669
|
+
name: "runfile-py" | "@runfile/sdk";
|
|
670
|
+
version: string;
|
|
671
|
+
framework_version?: string | undefined;
|
|
672
|
+
adapter?: string | undefined;
|
|
673
|
+
host?: string | undefined;
|
|
674
|
+
} | undefined;
|
|
675
|
+
merkle_inclusions?: {
|
|
676
|
+
manifest_uri: string;
|
|
677
|
+
leaf_index: number;
|
|
678
|
+
merkle_root: string;
|
|
679
|
+
}[] | undefined;
|
|
680
|
+
}, {
|
|
681
|
+
agent_identity: string;
|
|
682
|
+
run_id: string;
|
|
683
|
+
schema_version: string;
|
|
684
|
+
tenant_id: string;
|
|
685
|
+
lifecycle_state: "awaiting_webhook" | "awaiting_schedule" | "active" | "awaiting_human" | "ended";
|
|
686
|
+
started_at: string;
|
|
687
|
+
redaction_policy_version: string;
|
|
688
|
+
outcome?: "success" | "failure" | "incomplete" | "abandoned" | null | undefined;
|
|
689
|
+
conversation_id?: string | undefined;
|
|
690
|
+
ended_at?: string | null | undefined;
|
|
691
|
+
delegated_from?: {
|
|
692
|
+
run_id: string;
|
|
693
|
+
event_id?: string | undefined;
|
|
694
|
+
} | undefined;
|
|
695
|
+
handed_off_from?: {
|
|
696
|
+
run_id: string;
|
|
697
|
+
event_id?: string | undefined;
|
|
698
|
+
} | undefined;
|
|
699
|
+
scheduled_from?: {
|
|
700
|
+
run_id: string;
|
|
701
|
+
event_id?: string | undefined;
|
|
702
|
+
} | undefined;
|
|
703
|
+
invoked_by?: {
|
|
704
|
+
run_id: string;
|
|
705
|
+
event_id?: string | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
continued_from?: {
|
|
708
|
+
run_id: string;
|
|
709
|
+
event_id?: string | undefined;
|
|
710
|
+
} | undefined;
|
|
711
|
+
active_duration_seconds?: number | undefined;
|
|
712
|
+
suspension_intervals?: {
|
|
713
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
714
|
+
started: string;
|
|
715
|
+
trigger_event_id: string;
|
|
716
|
+
ended?: string | null | undefined;
|
|
717
|
+
resume_event_id?: string | undefined;
|
|
718
|
+
}[] | undefined;
|
|
719
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
720
|
+
labels?: Record<string, string> | undefined;
|
|
721
|
+
regulatory_scope_version?: string | undefined;
|
|
722
|
+
sdk_at_start?: {
|
|
723
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
724
|
+
name: "runfile-py" | "@runfile/sdk";
|
|
725
|
+
version: string;
|
|
726
|
+
framework_version?: string | undefined;
|
|
727
|
+
adapter?: string | undefined;
|
|
728
|
+
host?: string | undefined;
|
|
729
|
+
} | undefined;
|
|
730
|
+
merkle_inclusions?: {
|
|
731
|
+
manifest_uri: string;
|
|
732
|
+
leaf_index: number;
|
|
733
|
+
merkle_root: string;
|
|
734
|
+
}[] | undefined;
|
|
735
|
+
}>;
|
|
736
|
+
export type RunfileRun = z.infer<typeof RunfileRunSchema>;
|
|
737
|
+
/**
|
|
738
|
+
* RunfileEvent — a single action captured within a Run. Ordered within a process segment
|
|
739
|
+
* by `local_seq` (a monotonic capture counter the SDK assigns) and hash-chained in that
|
|
740
|
+
* order via `prev_event_hash` → `event_hash`; the total order within a segment is
|
|
741
|
+
* `(run_id, segment_index, local_seq)`. Causally linked via `parent_event_id` (the
|
|
742
|
+
* execution DAG); concurrent operations grouped via `parallel_group_id`. Segments
|
|
743
|
+
* (separated by suspend/resume) are stitched by the `run_resume` event's `prev_event_hash`
|
|
744
|
+
* referencing the `run_suspend` event. Committed to a daily Merkle root.
|
|
279
745
|
*
|
|
280
746
|
* Conditional-required fields (enforced via superRefine below):
|
|
281
747
|
* - kind=llm_call → model_ref required
|
|
282
748
|
* - kind=decision → decision required
|
|
749
|
+
* - kind=run_suspend → suspension_details required
|
|
750
|
+
* - kind=run_resume → resume_details required
|
|
751
|
+
* - kind=delegate → delegation_details required
|
|
752
|
+
* - kind=handoff → handoff_details required
|
|
283
753
|
* - actor.type=agent → actor.agent_identity required (also enforced inside ActorSchema)
|
|
284
754
|
* - actor.type=tool → actor.tool_id + actor.tool_version_hash required (also enforced inside ActorSchema)
|
|
285
755
|
*/
|
|
@@ -287,28 +757,34 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
287
757
|
schema_version: z.ZodString;
|
|
288
758
|
event_id: z.ZodString;
|
|
289
759
|
tenant_id: z.ZodString;
|
|
290
|
-
|
|
760
|
+
run_id: z.ZodString;
|
|
291
761
|
parent_event_id: z.ZodNullable<z.ZodString>;
|
|
762
|
+
parallel_group_id: z.ZodOptional<z.ZodString>;
|
|
763
|
+
segment_index: z.ZodNumber;
|
|
764
|
+
local_seq: z.ZodNumber;
|
|
292
765
|
captured_at: z.ZodString;
|
|
293
766
|
received_at: z.ZodString;
|
|
294
767
|
wall_clock_source: z.ZodEnum<["aws_time_sync", "ntp", "host_system", "unknown"]>;
|
|
295
768
|
sdk: z.ZodObject<{
|
|
296
769
|
name: z.ZodEnum<["runfile-py", "@runfile/sdk"]>;
|
|
297
770
|
version: z.ZodString;
|
|
298
|
-
framework: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "mastra", "vercel_ai_sdk", "mcp_client", "otel_generic", "manual"]>;
|
|
771
|
+
framework: z.ZodEnum<["langgraph", "langgraph_js", "openai_agents", "openai_agents_js", "anthropic_claude", "anthropic_claude_js", "claude_agent_sdk", "mastra", "vercel_ai_sdk", "pydantic_ai", "crewai", "mcp_client", "otel_generic", "manual"]>;
|
|
299
772
|
framework_version: z.ZodOptional<z.ZodString>;
|
|
773
|
+
adapter: z.ZodOptional<z.ZodString>;
|
|
300
774
|
host: z.ZodOptional<z.ZodString>;
|
|
301
775
|
}, "strict", z.ZodTypeAny, {
|
|
302
|
-
framework: "langgraph" | "
|
|
776
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
303
777
|
name: "runfile-py" | "@runfile/sdk";
|
|
304
778
|
version: string;
|
|
305
779
|
framework_version?: string | undefined;
|
|
780
|
+
adapter?: string | undefined;
|
|
306
781
|
host?: string | undefined;
|
|
307
782
|
}, {
|
|
308
|
-
framework: "langgraph" | "
|
|
783
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
309
784
|
name: "runfile-py" | "@runfile/sdk";
|
|
310
785
|
version: string;
|
|
311
786
|
framework_version?: string | undefined;
|
|
787
|
+
adapter?: string | undefined;
|
|
312
788
|
host?: string | undefined;
|
|
313
789
|
}>;
|
|
314
790
|
actor: z.ZodEffects<z.ZodObject<{
|
|
@@ -348,34 +824,34 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
348
824
|
tool_version_hash?: string | undefined;
|
|
349
825
|
}>;
|
|
350
826
|
action: z.ZodObject<{
|
|
351
|
-
kind: z.ZodEnum<["
|
|
827
|
+
kind: z.ZodEnum<["graph_node_enter", "graph_node_exit", "llm_call", "llm_call_chunk", "tool_call", "tool_result", "tool_approval_requested", "tool_approval_granted", "tool_approval_denied", "state_read", "state_write", "decision", "run_create", "run_end", "run_suspend", "run_resume", "run_abandon", "delegate", "handoff", "schedule_task", "parallel_group_open", "parallel_group_close", "human_approval", "human_input", "policy_check", "anomaly_flag", "sdk_diagnostic"]>;
|
|
352
828
|
name: z.ZodString;
|
|
353
829
|
outcome: z.ZodOptional<z.ZodEnum<["success", "failure", "partial", "timeout", "cancelled"]>>;
|
|
354
830
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
355
831
|
}, "strict", z.ZodTypeAny, {
|
|
356
|
-
kind: "
|
|
832
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
357
833
|
name: string;
|
|
358
834
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
359
835
|
duration_ms?: number | undefined;
|
|
360
836
|
}, {
|
|
361
|
-
kind: "
|
|
837
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
362
838
|
name: string;
|
|
363
839
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
364
840
|
duration_ms?: number | undefined;
|
|
365
841
|
}>;
|
|
366
|
-
subject: z.ZodObject<{
|
|
842
|
+
subject: z.ZodOptional<z.ZodObject<{
|
|
367
843
|
resource_urn: z.ZodOptional<z.ZodString>;
|
|
368
|
-
data_classification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci"]>>;
|
|
844
|
+
data_classification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "pii", "phi", "pci", "fci", "audit_of_audit"]>>;
|
|
369
845
|
regulatory_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
370
846
|
}, "strict", z.ZodTypeAny, {
|
|
371
847
|
regulatory_tags?: string[] | undefined;
|
|
372
848
|
resource_urn?: string | undefined;
|
|
373
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
849
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
374
850
|
}, {
|
|
375
851
|
regulatory_tags?: string[] | undefined;
|
|
376
852
|
resource_urn?: string | undefined;
|
|
377
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
378
|
-
}
|
|
853
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
854
|
+
}>>;
|
|
379
855
|
model_ref: z.ZodOptional<z.ZodObject<{
|
|
380
856
|
provider: z.ZodEnum<["anthropic", "openai", "google", "aws_bedrock", "azure_openai", "ollama", "self_hosted", "other"]>;
|
|
381
857
|
model_id: z.ZodString;
|
|
@@ -385,6 +861,7 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
385
861
|
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
386
862
|
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
387
863
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
864
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
388
865
|
}, "strict", z.ZodTypeAny, {
|
|
389
866
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
390
867
|
model_id: string;
|
|
@@ -394,6 +871,7 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
394
871
|
input_tokens?: number | undefined;
|
|
395
872
|
output_tokens?: number | undefined;
|
|
396
873
|
temperature?: number | undefined;
|
|
874
|
+
streaming?: boolean | undefined;
|
|
397
875
|
}, {
|
|
398
876
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
399
877
|
model_id: string;
|
|
@@ -403,6 +881,7 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
403
881
|
input_tokens?: number | undefined;
|
|
404
882
|
output_tokens?: number | undefined;
|
|
405
883
|
temperature?: number | undefined;
|
|
884
|
+
streaming?: boolean | undefined;
|
|
406
885
|
}>>;
|
|
407
886
|
decision: z.ZodOptional<z.ZodObject<{
|
|
408
887
|
outcome: z.ZodEnum<["approved", "denied", "escalated", "deferred", "no_action", "custom"]>;
|
|
@@ -426,6 +905,93 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
426
905
|
policy_thresholds_crossed?: string[] | undefined;
|
|
427
906
|
reversed_by_event?: string | undefined;
|
|
428
907
|
}>>;
|
|
908
|
+
suspension_details: z.ZodOptional<z.ZodObject<{
|
|
909
|
+
reason: z.ZodEnum<["awaiting_human_approval", "awaiting_human_input", "awaiting_webhook", "awaiting_schedule", "awaiting_external_system", "awaiting_subagent", "other"]>;
|
|
910
|
+
expected_resumer: z.ZodOptional<z.ZodString>;
|
|
911
|
+
expected_resume_by: z.ZodOptional<z.ZodString>;
|
|
912
|
+
detection_source: z.ZodOptional<z.ZodEnum<["framework_inferred", "customer_explicit", "derived"]>>;
|
|
913
|
+
framework_signal: z.ZodOptional<z.ZodObject<{
|
|
914
|
+
framework: z.ZodOptional<z.ZodEnum<["langgraph", "openai_agents", "claude_agent_sdk", "vercel_ai_sdk", "mcp", "manual", "otel"]>>;
|
|
915
|
+
signal_name: z.ZodOptional<z.ZodString>;
|
|
916
|
+
signal_payload_hash: z.ZodOptional<z.ZodString>;
|
|
917
|
+
}, "strict", z.ZodTypeAny, {
|
|
918
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
919
|
+
signal_name?: string | undefined;
|
|
920
|
+
signal_payload_hash?: string | undefined;
|
|
921
|
+
}, {
|
|
922
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
923
|
+
signal_name?: string | undefined;
|
|
924
|
+
signal_payload_hash?: string | undefined;
|
|
925
|
+
}>>;
|
|
926
|
+
}, "strict", z.ZodTypeAny, {
|
|
927
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
928
|
+
expected_resumer?: string | undefined;
|
|
929
|
+
expected_resume_by?: string | undefined;
|
|
930
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
931
|
+
framework_signal?: {
|
|
932
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
933
|
+
signal_name?: string | undefined;
|
|
934
|
+
signal_payload_hash?: string | undefined;
|
|
935
|
+
} | undefined;
|
|
936
|
+
}, {
|
|
937
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
938
|
+
expected_resumer?: string | undefined;
|
|
939
|
+
expected_resume_by?: string | undefined;
|
|
940
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
941
|
+
framework_signal?: {
|
|
942
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
943
|
+
signal_name?: string | undefined;
|
|
944
|
+
signal_payload_hash?: string | undefined;
|
|
945
|
+
} | undefined;
|
|
946
|
+
}>>;
|
|
947
|
+
resume_details: z.ZodOptional<z.ZodObject<{
|
|
948
|
+
triggered_by: z.ZodEnum<["human_approval_granted", "human_input_received", "webhook_received", "schedule_fired", "external_system_response", "subagent_completed", "manual_resume", "other"]>;
|
|
949
|
+
resumer_principal: z.ZodOptional<z.ZodString>;
|
|
950
|
+
suspension_duration_seconds: z.ZodOptional<z.ZodNumber>;
|
|
951
|
+
suspension_started_event_id: z.ZodOptional<z.ZodString>;
|
|
952
|
+
}, "strict", z.ZodTypeAny, {
|
|
953
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
954
|
+
resumer_principal?: string | undefined;
|
|
955
|
+
suspension_duration_seconds?: number | undefined;
|
|
956
|
+
suspension_started_event_id?: string | undefined;
|
|
957
|
+
}, {
|
|
958
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
959
|
+
resumer_principal?: string | undefined;
|
|
960
|
+
suspension_duration_seconds?: number | undefined;
|
|
961
|
+
suspension_started_event_id?: string | undefined;
|
|
962
|
+
}>>;
|
|
963
|
+
delegation_details: z.ZodOptional<z.ZodObject<{
|
|
964
|
+
delegated_run_id: z.ZodString;
|
|
965
|
+
delegated_agent_identity: z.ZodString;
|
|
966
|
+
wait_for_completion: z.ZodOptional<z.ZodBoolean>;
|
|
967
|
+
framework_signal: z.ZodOptional<z.ZodEnum<["langgraph_subgraph", "openai_agents_as_tool", "claude_agent_sdk_subagent", "manual", "other"]>>;
|
|
968
|
+
}, "strict", z.ZodTypeAny, {
|
|
969
|
+
delegated_run_id: string;
|
|
970
|
+
delegated_agent_identity: string;
|
|
971
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
972
|
+
wait_for_completion?: boolean | undefined;
|
|
973
|
+
}, {
|
|
974
|
+
delegated_run_id: string;
|
|
975
|
+
delegated_agent_identity: string;
|
|
976
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
977
|
+
wait_for_completion?: boolean | undefined;
|
|
978
|
+
}>>;
|
|
979
|
+
handoff_details: z.ZodOptional<z.ZodObject<{
|
|
980
|
+
target_run_id: z.ZodString;
|
|
981
|
+
target_agent_identity: z.ZodString;
|
|
982
|
+
handoff_reason: z.ZodOptional<z.ZodString>;
|
|
983
|
+
framework_signal: z.ZodOptional<z.ZodEnum<["openai_agents_handoff", "langgraph_explicit", "manual", "other"]>>;
|
|
984
|
+
}, "strict", z.ZodTypeAny, {
|
|
985
|
+
target_run_id: string;
|
|
986
|
+
target_agent_identity: string;
|
|
987
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
988
|
+
handoff_reason?: string | undefined;
|
|
989
|
+
}, {
|
|
990
|
+
target_run_id: string;
|
|
991
|
+
target_agent_identity: string;
|
|
992
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
993
|
+
handoff_reason?: string | undefined;
|
|
994
|
+
}>>;
|
|
429
995
|
payload_ref: z.ZodOptional<z.ZodObject<{
|
|
430
996
|
s3_uri: z.ZodString;
|
|
431
997
|
sha256: z.ZodString;
|
|
@@ -433,17 +999,20 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
433
999
|
encryption: z.ZodObject<{
|
|
434
1000
|
algorithm: z.ZodLiteral<"aes-256-gcm">;
|
|
435
1001
|
data_key_wrapped: z.ZodString;
|
|
436
|
-
|
|
1002
|
+
key_id: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
nonce: z.ZodString;
|
|
437
1004
|
}, "strict", z.ZodTypeAny, {
|
|
438
1005
|
algorithm: "aes-256-gcm";
|
|
439
1006
|
data_key_wrapped: string;
|
|
440
|
-
|
|
1007
|
+
nonce: string;
|
|
1008
|
+
key_id?: string | undefined;
|
|
441
1009
|
}, {
|
|
442
1010
|
algorithm: "aes-256-gcm";
|
|
443
1011
|
data_key_wrapped: string;
|
|
444
|
-
|
|
1012
|
+
nonce: string;
|
|
1013
|
+
key_id?: string | undefined;
|
|
445
1014
|
}>;
|
|
446
|
-
content_type: z.ZodOptional<z.ZodEnum<["application/json", "text/plain", "application/vnd.runfile.llm-request+json", "application/vnd.runfile.llm-response+json", "application/vnd.runfile.tool-call+json", "application/vnd.runfile.tool-result+json", "application/vnd.runfile.state-snapshot+json"]>>;
|
|
1015
|
+
content_type: z.ZodOptional<z.ZodEnum<["application/json", "text/plain", "application/vnd.runfile.llm-request+json", "application/vnd.runfile.llm-response+json", "application/vnd.runfile.tool-call+json", "application/vnd.runfile.tool-result+json", "application/vnd.runfile.state-snapshot+json", "application/vnd.runfile.framework-signal+json"]>>;
|
|
447
1016
|
redaction_applied: z.ZodOptional<z.ZodObject<{
|
|
448
1017
|
redacted_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
449
1018
|
tokenized_classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -464,9 +1033,10 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
464
1033
|
encryption: {
|
|
465
1034
|
algorithm: "aes-256-gcm";
|
|
466
1035
|
data_key_wrapped: string;
|
|
467
|
-
|
|
1036
|
+
nonce: string;
|
|
1037
|
+
key_id?: string | undefined;
|
|
468
1038
|
};
|
|
469
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1039
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
470
1040
|
redaction_applied?: {
|
|
471
1041
|
redacted_classes?: string[] | undefined;
|
|
472
1042
|
tokenized_classes?: string[] | undefined;
|
|
@@ -479,33 +1049,95 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
479
1049
|
encryption: {
|
|
480
1050
|
algorithm: "aes-256-gcm";
|
|
481
1051
|
data_key_wrapped: string;
|
|
482
|
-
|
|
1052
|
+
nonce: string;
|
|
1053
|
+
key_id?: string | undefined;
|
|
483
1054
|
};
|
|
484
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1055
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
485
1056
|
redaction_applied?: {
|
|
486
1057
|
redacted_classes?: string[] | undefined;
|
|
487
1058
|
tokenized_classes?: string[] | undefined;
|
|
488
1059
|
classifier_version?: string | undefined;
|
|
489
1060
|
} | undefined;
|
|
490
1061
|
}>>;
|
|
1062
|
+
otel_attributes: z.ZodOptional<z.ZodObject<{
|
|
1063
|
+
gen_ai_system: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
gen_ai_operation_name: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
gen_ai_provider_name: z.ZodOptional<z.ZodString>;
|
|
1066
|
+
gen_ai_request_model: z.ZodOptional<z.ZodString>;
|
|
1067
|
+
gen_ai_response_model: z.ZodOptional<z.ZodString>;
|
|
1068
|
+
gen_ai_request_temperature: z.ZodOptional<z.ZodNumber>;
|
|
1069
|
+
gen_ai_request_top_p: z.ZodOptional<z.ZodNumber>;
|
|
1070
|
+
gen_ai_request_max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1071
|
+
gen_ai_response_id: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
gen_ai_response_finish_reasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1073
|
+
gen_ai_usage_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1074
|
+
gen_ai_usage_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1075
|
+
gen_ai_tool_name: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
gen_ai_tool_call_id: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
gen_ai_agent_id: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
gen_ai_agent_name: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
gen_ai_agent_description: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
gen_ai_conversation_id: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1082
|
+
}, "strict", z.ZodTypeAny, {
|
|
1083
|
+
gen_ai_system?: string | undefined;
|
|
1084
|
+
gen_ai_operation_name?: string | undefined;
|
|
1085
|
+
gen_ai_provider_name?: string | undefined;
|
|
1086
|
+
gen_ai_request_model?: string | undefined;
|
|
1087
|
+
gen_ai_response_model?: string | undefined;
|
|
1088
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1089
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1090
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1091
|
+
gen_ai_response_id?: string | undefined;
|
|
1092
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1093
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1094
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1095
|
+
gen_ai_tool_name?: string | undefined;
|
|
1096
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1097
|
+
gen_ai_agent_id?: string | undefined;
|
|
1098
|
+
gen_ai_agent_name?: string | undefined;
|
|
1099
|
+
gen_ai_agent_description?: string | undefined;
|
|
1100
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1101
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1102
|
+
}, {
|
|
1103
|
+
gen_ai_system?: string | undefined;
|
|
1104
|
+
gen_ai_operation_name?: string | undefined;
|
|
1105
|
+
gen_ai_provider_name?: string | undefined;
|
|
1106
|
+
gen_ai_request_model?: string | undefined;
|
|
1107
|
+
gen_ai_response_model?: string | undefined;
|
|
1108
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1109
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1110
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1111
|
+
gen_ai_response_id?: string | undefined;
|
|
1112
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1113
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1114
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1115
|
+
gen_ai_tool_name?: string | undefined;
|
|
1116
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1117
|
+
gen_ai_agent_id?: string | undefined;
|
|
1118
|
+
gen_ai_agent_name?: string | undefined;
|
|
1119
|
+
gen_ai_agent_description?: string | undefined;
|
|
1120
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1121
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1122
|
+
}>>;
|
|
491
1123
|
redaction_policy_version: z.ZodString;
|
|
492
1124
|
regulatory_scope_version: z.ZodOptional<z.ZodString>;
|
|
493
1125
|
anomaly_flags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
494
|
-
code: z.ZodEnum<["missing_ambient_context", "chain_break", "out_of_order_arrival", "model_version_drift", "unknown_agent_identity", "data_classification_mismatch", "policy_threshold_without_hitl", "unauthorized_tool_invocation", "redaction_policy_mismatch", "schema_version_warning"]>;
|
|
1126
|
+
code: z.ZodEnum<["missing_ambient_context", "chain_break", "sequence_gap", "causality_violation", "out_of_order_arrival", "model_version_drift", "unknown_agent_identity", "data_classification_mismatch", "policy_threshold_without_hitl", "unauthorized_tool_invocation", "redaction_policy_mismatch", "schema_version_warning", "agent_identity_mismatch_with_run", "suspension_sla_exceeded", "apparent_crash_detected", "active_duration_exceeds_threshold", "framework_signal_unrecognised", "otel_attribute_missing", "delegation_loop_detected"]>;
|
|
495
1127
|
severity: z.ZodEnum<["info", "warning", "error", "critical"]>;
|
|
496
1128
|
detail: z.ZodOptional<z.ZodString>;
|
|
497
1129
|
}, "strict", z.ZodTypeAny, {
|
|
498
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1130
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
499
1131
|
severity: "info" | "warning" | "error" | "critical";
|
|
500
1132
|
detail?: string | undefined;
|
|
501
1133
|
}, {
|
|
502
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1134
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
503
1135
|
severity: "info" | "warning" | "error" | "critical";
|
|
504
1136
|
detail?: string | undefined;
|
|
505
1137
|
}>, "many">>;
|
|
506
1138
|
environment: z.ZodOptional<z.ZodEnum<["production", "staging", "development"]>>;
|
|
507
1139
|
labels: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
508
|
-
|
|
1140
|
+
prev_event_hash: z.ZodString;
|
|
509
1141
|
event_hash: z.ZodString;
|
|
510
1142
|
merkle_inclusion: z.ZodOptional<z.ZodObject<{
|
|
511
1143
|
manifest_uri: z.ZodString;
|
|
@@ -522,19 +1154,23 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
522
1154
|
}>>;
|
|
523
1155
|
}, "strict", z.ZodTypeAny, {
|
|
524
1156
|
event_hash: string;
|
|
525
|
-
|
|
1157
|
+
run_id: string;
|
|
526
1158
|
event_id: string;
|
|
1159
|
+
schema_version: string;
|
|
527
1160
|
tenant_id: string;
|
|
528
|
-
|
|
1161
|
+
redaction_policy_version: string;
|
|
529
1162
|
parent_event_id: string | null;
|
|
1163
|
+
segment_index: number;
|
|
1164
|
+
local_seq: number;
|
|
530
1165
|
captured_at: string;
|
|
531
1166
|
received_at: string;
|
|
532
1167
|
wall_clock_source: "unknown" | "aws_time_sync" | "ntp" | "host_system";
|
|
533
1168
|
sdk: {
|
|
534
|
-
framework: "langgraph" | "
|
|
1169
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
535
1170
|
name: "runfile-py" | "@runfile/sdk";
|
|
536
1171
|
version: string;
|
|
537
1172
|
framework_version?: string | undefined;
|
|
1173
|
+
adapter?: string | undefined;
|
|
538
1174
|
host?: string | undefined;
|
|
539
1175
|
};
|
|
540
1176
|
actor: {
|
|
@@ -546,18 +1182,12 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
546
1182
|
tool_version_hash?: string | undefined;
|
|
547
1183
|
};
|
|
548
1184
|
action: {
|
|
549
|
-
kind: "
|
|
1185
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
550
1186
|
name: string;
|
|
551
1187
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
552
1188
|
duration_ms?: number | undefined;
|
|
553
1189
|
};
|
|
554
|
-
|
|
555
|
-
regulatory_tags?: string[] | undefined;
|
|
556
|
-
resource_urn?: string | undefined;
|
|
557
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
558
|
-
};
|
|
559
|
-
redaction_policy_version: string;
|
|
560
|
-
prev_hash: string;
|
|
1190
|
+
prev_event_hash: string;
|
|
561
1191
|
decision?: {
|
|
562
1192
|
outcome: "custom" | "approved" | "denied" | "escalated" | "deferred" | "no_action";
|
|
563
1193
|
outcome_label?: string | undefined;
|
|
@@ -566,6 +1196,15 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
566
1196
|
policy_thresholds_crossed?: string[] | undefined;
|
|
567
1197
|
reversed_by_event?: string | undefined;
|
|
568
1198
|
} | undefined;
|
|
1199
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
1200
|
+
labels?: Record<string, string> | undefined;
|
|
1201
|
+
regulatory_scope_version?: string | undefined;
|
|
1202
|
+
parallel_group_id?: string | undefined;
|
|
1203
|
+
subject?: {
|
|
1204
|
+
regulatory_tags?: string[] | undefined;
|
|
1205
|
+
resource_urn?: string | undefined;
|
|
1206
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
1207
|
+
} | undefined;
|
|
569
1208
|
model_ref?: {
|
|
570
1209
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
571
1210
|
model_id: string;
|
|
@@ -575,6 +1214,36 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
575
1214
|
input_tokens?: number | undefined;
|
|
576
1215
|
output_tokens?: number | undefined;
|
|
577
1216
|
temperature?: number | undefined;
|
|
1217
|
+
streaming?: boolean | undefined;
|
|
1218
|
+
} | undefined;
|
|
1219
|
+
suspension_details?: {
|
|
1220
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
1221
|
+
expected_resumer?: string | undefined;
|
|
1222
|
+
expected_resume_by?: string | undefined;
|
|
1223
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
1224
|
+
framework_signal?: {
|
|
1225
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
1226
|
+
signal_name?: string | undefined;
|
|
1227
|
+
signal_payload_hash?: string | undefined;
|
|
1228
|
+
} | undefined;
|
|
1229
|
+
} | undefined;
|
|
1230
|
+
resume_details?: {
|
|
1231
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
1232
|
+
resumer_principal?: string | undefined;
|
|
1233
|
+
suspension_duration_seconds?: number | undefined;
|
|
1234
|
+
suspension_started_event_id?: string | undefined;
|
|
1235
|
+
} | undefined;
|
|
1236
|
+
delegation_details?: {
|
|
1237
|
+
delegated_run_id: string;
|
|
1238
|
+
delegated_agent_identity: string;
|
|
1239
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
1240
|
+
wait_for_completion?: boolean | undefined;
|
|
1241
|
+
} | undefined;
|
|
1242
|
+
handoff_details?: {
|
|
1243
|
+
target_run_id: string;
|
|
1244
|
+
target_agent_identity: string;
|
|
1245
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
1246
|
+
handoff_reason?: string | undefined;
|
|
578
1247
|
} | undefined;
|
|
579
1248
|
payload_ref?: {
|
|
580
1249
|
sha256: string;
|
|
@@ -583,23 +1252,42 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
583
1252
|
encryption: {
|
|
584
1253
|
algorithm: "aes-256-gcm";
|
|
585
1254
|
data_key_wrapped: string;
|
|
586
|
-
|
|
1255
|
+
nonce: string;
|
|
1256
|
+
key_id?: string | undefined;
|
|
587
1257
|
};
|
|
588
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1258
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
589
1259
|
redaction_applied?: {
|
|
590
1260
|
redacted_classes?: string[] | undefined;
|
|
591
1261
|
tokenized_classes?: string[] | undefined;
|
|
592
1262
|
classifier_version?: string | undefined;
|
|
593
1263
|
} | undefined;
|
|
594
1264
|
} | undefined;
|
|
595
|
-
|
|
1265
|
+
otel_attributes?: {
|
|
1266
|
+
gen_ai_system?: string | undefined;
|
|
1267
|
+
gen_ai_operation_name?: string | undefined;
|
|
1268
|
+
gen_ai_provider_name?: string | undefined;
|
|
1269
|
+
gen_ai_request_model?: string | undefined;
|
|
1270
|
+
gen_ai_response_model?: string | undefined;
|
|
1271
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1272
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1273
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1274
|
+
gen_ai_response_id?: string | undefined;
|
|
1275
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1276
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1277
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1278
|
+
gen_ai_tool_name?: string | undefined;
|
|
1279
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1280
|
+
gen_ai_agent_id?: string | undefined;
|
|
1281
|
+
gen_ai_agent_name?: string | undefined;
|
|
1282
|
+
gen_ai_agent_description?: string | undefined;
|
|
1283
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1284
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1285
|
+
} | undefined;
|
|
596
1286
|
anomaly_flags?: {
|
|
597
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1287
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
598
1288
|
severity: "info" | "warning" | "error" | "critical";
|
|
599
1289
|
detail?: string | undefined;
|
|
600
1290
|
}[] | undefined;
|
|
601
|
-
environment?: "production" | "staging" | "development" | undefined;
|
|
602
|
-
labels?: Record<string, string> | undefined;
|
|
603
1291
|
merkle_inclusion?: {
|
|
604
1292
|
manifest_uri: string;
|
|
605
1293
|
leaf_index: number;
|
|
@@ -607,19 +1295,23 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
607
1295
|
} | undefined;
|
|
608
1296
|
}, {
|
|
609
1297
|
event_hash: string;
|
|
610
|
-
|
|
1298
|
+
run_id: string;
|
|
611
1299
|
event_id: string;
|
|
1300
|
+
schema_version: string;
|
|
612
1301
|
tenant_id: string;
|
|
613
|
-
|
|
1302
|
+
redaction_policy_version: string;
|
|
614
1303
|
parent_event_id: string | null;
|
|
1304
|
+
segment_index: number;
|
|
1305
|
+
local_seq: number;
|
|
615
1306
|
captured_at: string;
|
|
616
1307
|
received_at: string;
|
|
617
1308
|
wall_clock_source: "unknown" | "aws_time_sync" | "ntp" | "host_system";
|
|
618
1309
|
sdk: {
|
|
619
|
-
framework: "langgraph" | "
|
|
1310
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
620
1311
|
name: "runfile-py" | "@runfile/sdk";
|
|
621
1312
|
version: string;
|
|
622
1313
|
framework_version?: string | undefined;
|
|
1314
|
+
adapter?: string | undefined;
|
|
623
1315
|
host?: string | undefined;
|
|
624
1316
|
};
|
|
625
1317
|
actor: {
|
|
@@ -631,18 +1323,12 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
631
1323
|
tool_version_hash?: string | undefined;
|
|
632
1324
|
};
|
|
633
1325
|
action: {
|
|
634
|
-
kind: "
|
|
1326
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
635
1327
|
name: string;
|
|
636
1328
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
637
1329
|
duration_ms?: number | undefined;
|
|
638
1330
|
};
|
|
639
|
-
|
|
640
|
-
regulatory_tags?: string[] | undefined;
|
|
641
|
-
resource_urn?: string | undefined;
|
|
642
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
643
|
-
};
|
|
644
|
-
redaction_policy_version: string;
|
|
645
|
-
prev_hash: string;
|
|
1331
|
+
prev_event_hash: string;
|
|
646
1332
|
decision?: {
|
|
647
1333
|
outcome: "custom" | "approved" | "denied" | "escalated" | "deferred" | "no_action";
|
|
648
1334
|
outcome_label?: string | undefined;
|
|
@@ -651,6 +1337,15 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
651
1337
|
policy_thresholds_crossed?: string[] | undefined;
|
|
652
1338
|
reversed_by_event?: string | undefined;
|
|
653
1339
|
} | undefined;
|
|
1340
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
1341
|
+
labels?: Record<string, string> | undefined;
|
|
1342
|
+
regulatory_scope_version?: string | undefined;
|
|
1343
|
+
parallel_group_id?: string | undefined;
|
|
1344
|
+
subject?: {
|
|
1345
|
+
regulatory_tags?: string[] | undefined;
|
|
1346
|
+
resource_urn?: string | undefined;
|
|
1347
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
1348
|
+
} | undefined;
|
|
654
1349
|
model_ref?: {
|
|
655
1350
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
656
1351
|
model_id: string;
|
|
@@ -660,6 +1355,36 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
660
1355
|
input_tokens?: number | undefined;
|
|
661
1356
|
output_tokens?: number | undefined;
|
|
662
1357
|
temperature?: number | undefined;
|
|
1358
|
+
streaming?: boolean | undefined;
|
|
1359
|
+
} | undefined;
|
|
1360
|
+
suspension_details?: {
|
|
1361
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
1362
|
+
expected_resumer?: string | undefined;
|
|
1363
|
+
expected_resume_by?: string | undefined;
|
|
1364
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
1365
|
+
framework_signal?: {
|
|
1366
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
1367
|
+
signal_name?: string | undefined;
|
|
1368
|
+
signal_payload_hash?: string | undefined;
|
|
1369
|
+
} | undefined;
|
|
1370
|
+
} | undefined;
|
|
1371
|
+
resume_details?: {
|
|
1372
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
1373
|
+
resumer_principal?: string | undefined;
|
|
1374
|
+
suspension_duration_seconds?: number | undefined;
|
|
1375
|
+
suspension_started_event_id?: string | undefined;
|
|
1376
|
+
} | undefined;
|
|
1377
|
+
delegation_details?: {
|
|
1378
|
+
delegated_run_id: string;
|
|
1379
|
+
delegated_agent_identity: string;
|
|
1380
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
1381
|
+
wait_for_completion?: boolean | undefined;
|
|
1382
|
+
} | undefined;
|
|
1383
|
+
handoff_details?: {
|
|
1384
|
+
target_run_id: string;
|
|
1385
|
+
target_agent_identity: string;
|
|
1386
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
1387
|
+
handoff_reason?: string | undefined;
|
|
663
1388
|
} | undefined;
|
|
664
1389
|
payload_ref?: {
|
|
665
1390
|
sha256: string;
|
|
@@ -668,23 +1393,42 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
668
1393
|
encryption: {
|
|
669
1394
|
algorithm: "aes-256-gcm";
|
|
670
1395
|
data_key_wrapped: string;
|
|
671
|
-
|
|
1396
|
+
nonce: string;
|
|
1397
|
+
key_id?: string | undefined;
|
|
672
1398
|
};
|
|
673
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1399
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
674
1400
|
redaction_applied?: {
|
|
675
1401
|
redacted_classes?: string[] | undefined;
|
|
676
1402
|
tokenized_classes?: string[] | undefined;
|
|
677
1403
|
classifier_version?: string | undefined;
|
|
678
1404
|
} | undefined;
|
|
679
1405
|
} | undefined;
|
|
680
|
-
|
|
1406
|
+
otel_attributes?: {
|
|
1407
|
+
gen_ai_system?: string | undefined;
|
|
1408
|
+
gen_ai_operation_name?: string | undefined;
|
|
1409
|
+
gen_ai_provider_name?: string | undefined;
|
|
1410
|
+
gen_ai_request_model?: string | undefined;
|
|
1411
|
+
gen_ai_response_model?: string | undefined;
|
|
1412
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1413
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1414
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1415
|
+
gen_ai_response_id?: string | undefined;
|
|
1416
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1417
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1418
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1419
|
+
gen_ai_tool_name?: string | undefined;
|
|
1420
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1421
|
+
gen_ai_agent_id?: string | undefined;
|
|
1422
|
+
gen_ai_agent_name?: string | undefined;
|
|
1423
|
+
gen_ai_agent_description?: string | undefined;
|
|
1424
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1425
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1426
|
+
} | undefined;
|
|
681
1427
|
anomaly_flags?: {
|
|
682
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1428
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
683
1429
|
severity: "info" | "warning" | "error" | "critical";
|
|
684
1430
|
detail?: string | undefined;
|
|
685
1431
|
}[] | undefined;
|
|
686
|
-
environment?: "production" | "staging" | "development" | undefined;
|
|
687
|
-
labels?: Record<string, string> | undefined;
|
|
688
1432
|
merkle_inclusion?: {
|
|
689
1433
|
manifest_uri: string;
|
|
690
1434
|
leaf_index: number;
|
|
@@ -692,19 +1436,23 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
692
1436
|
} | undefined;
|
|
693
1437
|
}>, {
|
|
694
1438
|
event_hash: string;
|
|
695
|
-
|
|
1439
|
+
run_id: string;
|
|
696
1440
|
event_id: string;
|
|
1441
|
+
schema_version: string;
|
|
697
1442
|
tenant_id: string;
|
|
698
|
-
|
|
1443
|
+
redaction_policy_version: string;
|
|
699
1444
|
parent_event_id: string | null;
|
|
1445
|
+
segment_index: number;
|
|
1446
|
+
local_seq: number;
|
|
700
1447
|
captured_at: string;
|
|
701
1448
|
received_at: string;
|
|
702
1449
|
wall_clock_source: "unknown" | "aws_time_sync" | "ntp" | "host_system";
|
|
703
1450
|
sdk: {
|
|
704
|
-
framework: "langgraph" | "
|
|
1451
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
705
1452
|
name: "runfile-py" | "@runfile/sdk";
|
|
706
1453
|
version: string;
|
|
707
1454
|
framework_version?: string | undefined;
|
|
1455
|
+
adapter?: string | undefined;
|
|
708
1456
|
host?: string | undefined;
|
|
709
1457
|
};
|
|
710
1458
|
actor: {
|
|
@@ -716,18 +1464,12 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
716
1464
|
tool_version_hash?: string | undefined;
|
|
717
1465
|
};
|
|
718
1466
|
action: {
|
|
719
|
-
kind: "
|
|
1467
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
720
1468
|
name: string;
|
|
721
1469
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
722
1470
|
duration_ms?: number | undefined;
|
|
723
1471
|
};
|
|
724
|
-
|
|
725
|
-
regulatory_tags?: string[] | undefined;
|
|
726
|
-
resource_urn?: string | undefined;
|
|
727
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
728
|
-
};
|
|
729
|
-
redaction_policy_version: string;
|
|
730
|
-
prev_hash: string;
|
|
1472
|
+
prev_event_hash: string;
|
|
731
1473
|
decision?: {
|
|
732
1474
|
outcome: "custom" | "approved" | "denied" | "escalated" | "deferred" | "no_action";
|
|
733
1475
|
outcome_label?: string | undefined;
|
|
@@ -736,6 +1478,15 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
736
1478
|
policy_thresholds_crossed?: string[] | undefined;
|
|
737
1479
|
reversed_by_event?: string | undefined;
|
|
738
1480
|
} | undefined;
|
|
1481
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
1482
|
+
labels?: Record<string, string> | undefined;
|
|
1483
|
+
regulatory_scope_version?: string | undefined;
|
|
1484
|
+
parallel_group_id?: string | undefined;
|
|
1485
|
+
subject?: {
|
|
1486
|
+
regulatory_tags?: string[] | undefined;
|
|
1487
|
+
resource_urn?: string | undefined;
|
|
1488
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
1489
|
+
} | undefined;
|
|
739
1490
|
model_ref?: {
|
|
740
1491
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
741
1492
|
model_id: string;
|
|
@@ -745,6 +1496,36 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
745
1496
|
input_tokens?: number | undefined;
|
|
746
1497
|
output_tokens?: number | undefined;
|
|
747
1498
|
temperature?: number | undefined;
|
|
1499
|
+
streaming?: boolean | undefined;
|
|
1500
|
+
} | undefined;
|
|
1501
|
+
suspension_details?: {
|
|
1502
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
1503
|
+
expected_resumer?: string | undefined;
|
|
1504
|
+
expected_resume_by?: string | undefined;
|
|
1505
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
1506
|
+
framework_signal?: {
|
|
1507
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
1508
|
+
signal_name?: string | undefined;
|
|
1509
|
+
signal_payload_hash?: string | undefined;
|
|
1510
|
+
} | undefined;
|
|
1511
|
+
} | undefined;
|
|
1512
|
+
resume_details?: {
|
|
1513
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
1514
|
+
resumer_principal?: string | undefined;
|
|
1515
|
+
suspension_duration_seconds?: number | undefined;
|
|
1516
|
+
suspension_started_event_id?: string | undefined;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
delegation_details?: {
|
|
1519
|
+
delegated_run_id: string;
|
|
1520
|
+
delegated_agent_identity: string;
|
|
1521
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
1522
|
+
wait_for_completion?: boolean | undefined;
|
|
1523
|
+
} | undefined;
|
|
1524
|
+
handoff_details?: {
|
|
1525
|
+
target_run_id: string;
|
|
1526
|
+
target_agent_identity: string;
|
|
1527
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
1528
|
+
handoff_reason?: string | undefined;
|
|
748
1529
|
} | undefined;
|
|
749
1530
|
payload_ref?: {
|
|
750
1531
|
sha256: string;
|
|
@@ -753,23 +1534,42 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
753
1534
|
encryption: {
|
|
754
1535
|
algorithm: "aes-256-gcm";
|
|
755
1536
|
data_key_wrapped: string;
|
|
756
|
-
|
|
1537
|
+
nonce: string;
|
|
1538
|
+
key_id?: string | undefined;
|
|
757
1539
|
};
|
|
758
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1540
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
759
1541
|
redaction_applied?: {
|
|
760
1542
|
redacted_classes?: string[] | undefined;
|
|
761
1543
|
tokenized_classes?: string[] | undefined;
|
|
762
1544
|
classifier_version?: string | undefined;
|
|
763
1545
|
} | undefined;
|
|
764
1546
|
} | undefined;
|
|
765
|
-
|
|
1547
|
+
otel_attributes?: {
|
|
1548
|
+
gen_ai_system?: string | undefined;
|
|
1549
|
+
gen_ai_operation_name?: string | undefined;
|
|
1550
|
+
gen_ai_provider_name?: string | undefined;
|
|
1551
|
+
gen_ai_request_model?: string | undefined;
|
|
1552
|
+
gen_ai_response_model?: string | undefined;
|
|
1553
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1554
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1555
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1556
|
+
gen_ai_response_id?: string | undefined;
|
|
1557
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1558
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1559
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1560
|
+
gen_ai_tool_name?: string | undefined;
|
|
1561
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1562
|
+
gen_ai_agent_id?: string | undefined;
|
|
1563
|
+
gen_ai_agent_name?: string | undefined;
|
|
1564
|
+
gen_ai_agent_description?: string | undefined;
|
|
1565
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1566
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1567
|
+
} | undefined;
|
|
766
1568
|
anomaly_flags?: {
|
|
767
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1569
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
768
1570
|
severity: "info" | "warning" | "error" | "critical";
|
|
769
1571
|
detail?: string | undefined;
|
|
770
1572
|
}[] | undefined;
|
|
771
|
-
environment?: "production" | "staging" | "development" | undefined;
|
|
772
|
-
labels?: Record<string, string> | undefined;
|
|
773
1573
|
merkle_inclusion?: {
|
|
774
1574
|
manifest_uri: string;
|
|
775
1575
|
leaf_index: number;
|
|
@@ -777,19 +1577,23 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
777
1577
|
} | undefined;
|
|
778
1578
|
}, {
|
|
779
1579
|
event_hash: string;
|
|
780
|
-
|
|
1580
|
+
run_id: string;
|
|
781
1581
|
event_id: string;
|
|
1582
|
+
schema_version: string;
|
|
782
1583
|
tenant_id: string;
|
|
783
|
-
|
|
1584
|
+
redaction_policy_version: string;
|
|
784
1585
|
parent_event_id: string | null;
|
|
1586
|
+
segment_index: number;
|
|
1587
|
+
local_seq: number;
|
|
785
1588
|
captured_at: string;
|
|
786
1589
|
received_at: string;
|
|
787
1590
|
wall_clock_source: "unknown" | "aws_time_sync" | "ntp" | "host_system";
|
|
788
1591
|
sdk: {
|
|
789
|
-
framework: "langgraph" | "
|
|
1592
|
+
framework: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "manual" | "langgraph_js" | "openai_agents_js" | "anthropic_claude" | "anthropic_claude_js" | "mastra" | "pydantic_ai" | "crewai" | "mcp_client" | "otel_generic";
|
|
790
1593
|
name: "runfile-py" | "@runfile/sdk";
|
|
791
1594
|
version: string;
|
|
792
1595
|
framework_version?: string | undefined;
|
|
1596
|
+
adapter?: string | undefined;
|
|
793
1597
|
host?: string | undefined;
|
|
794
1598
|
};
|
|
795
1599
|
actor: {
|
|
@@ -801,18 +1605,12 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
801
1605
|
tool_version_hash?: string | undefined;
|
|
802
1606
|
};
|
|
803
1607
|
action: {
|
|
804
|
-
kind: "
|
|
1608
|
+
kind: "graph_node_enter" | "graph_node_exit" | "llm_call" | "llm_call_chunk" | "tool_call" | "tool_result" | "tool_approval_requested" | "tool_approval_granted" | "tool_approval_denied" | "state_read" | "state_write" | "decision" | "run_create" | "run_end" | "run_suspend" | "run_resume" | "run_abandon" | "delegate" | "handoff" | "schedule_task" | "parallel_group_open" | "parallel_group_close" | "human_approval" | "human_input" | "policy_check" | "anomaly_flag" | "sdk_diagnostic";
|
|
805
1609
|
name: string;
|
|
806
1610
|
outcome?: "success" | "failure" | "partial" | "timeout" | "cancelled" | undefined;
|
|
807
1611
|
duration_ms?: number | undefined;
|
|
808
1612
|
};
|
|
809
|
-
|
|
810
|
-
regulatory_tags?: string[] | undefined;
|
|
811
|
-
resource_urn?: string | undefined;
|
|
812
|
-
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | undefined;
|
|
813
|
-
};
|
|
814
|
-
redaction_policy_version: string;
|
|
815
|
-
prev_hash: string;
|
|
1613
|
+
prev_event_hash: string;
|
|
816
1614
|
decision?: {
|
|
817
1615
|
outcome: "custom" | "approved" | "denied" | "escalated" | "deferred" | "no_action";
|
|
818
1616
|
outcome_label?: string | undefined;
|
|
@@ -821,6 +1619,15 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
821
1619
|
policy_thresholds_crossed?: string[] | undefined;
|
|
822
1620
|
reversed_by_event?: string | undefined;
|
|
823
1621
|
} | undefined;
|
|
1622
|
+
environment?: "production" | "staging" | "development" | undefined;
|
|
1623
|
+
labels?: Record<string, string> | undefined;
|
|
1624
|
+
regulatory_scope_version?: string | undefined;
|
|
1625
|
+
parallel_group_id?: string | undefined;
|
|
1626
|
+
subject?: {
|
|
1627
|
+
regulatory_tags?: string[] | undefined;
|
|
1628
|
+
resource_urn?: string | undefined;
|
|
1629
|
+
data_classification?: "public" | "internal" | "confidential" | "pii" | "phi" | "pci" | "fci" | "audit_of_audit" | undefined;
|
|
1630
|
+
} | undefined;
|
|
824
1631
|
model_ref?: {
|
|
825
1632
|
provider: "anthropic" | "openai" | "google" | "aws_bedrock" | "azure_openai" | "ollama" | "self_hosted" | "other";
|
|
826
1633
|
model_id: string;
|
|
@@ -830,6 +1637,36 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
830
1637
|
input_tokens?: number | undefined;
|
|
831
1638
|
output_tokens?: number | undefined;
|
|
832
1639
|
temperature?: number | undefined;
|
|
1640
|
+
streaming?: boolean | undefined;
|
|
1641
|
+
} | undefined;
|
|
1642
|
+
suspension_details?: {
|
|
1643
|
+
reason: "other" | "awaiting_human_approval" | "awaiting_human_input" | "awaiting_webhook" | "awaiting_schedule" | "awaiting_external_system" | "awaiting_subagent";
|
|
1644
|
+
expected_resumer?: string | undefined;
|
|
1645
|
+
expected_resume_by?: string | undefined;
|
|
1646
|
+
detection_source?: "framework_inferred" | "customer_explicit" | "derived" | undefined;
|
|
1647
|
+
framework_signal?: {
|
|
1648
|
+
framework?: "langgraph" | "openai_agents" | "claude_agent_sdk" | "vercel_ai_sdk" | "mcp" | "manual" | "otel" | undefined;
|
|
1649
|
+
signal_name?: string | undefined;
|
|
1650
|
+
signal_payload_hash?: string | undefined;
|
|
1651
|
+
} | undefined;
|
|
1652
|
+
} | undefined;
|
|
1653
|
+
resume_details?: {
|
|
1654
|
+
triggered_by: "other" | "human_approval_granted" | "human_input_received" | "webhook_received" | "schedule_fired" | "external_system_response" | "subagent_completed" | "manual_resume";
|
|
1655
|
+
resumer_principal?: string | undefined;
|
|
1656
|
+
suspension_duration_seconds?: number | undefined;
|
|
1657
|
+
suspension_started_event_id?: string | undefined;
|
|
1658
|
+
} | undefined;
|
|
1659
|
+
delegation_details?: {
|
|
1660
|
+
delegated_run_id: string;
|
|
1661
|
+
delegated_agent_identity: string;
|
|
1662
|
+
framework_signal?: "other" | "manual" | "langgraph_subgraph" | "openai_agents_as_tool" | "claude_agent_sdk_subagent" | undefined;
|
|
1663
|
+
wait_for_completion?: boolean | undefined;
|
|
1664
|
+
} | undefined;
|
|
1665
|
+
handoff_details?: {
|
|
1666
|
+
target_run_id: string;
|
|
1667
|
+
target_agent_identity: string;
|
|
1668
|
+
framework_signal?: "other" | "manual" | "openai_agents_handoff" | "langgraph_explicit" | undefined;
|
|
1669
|
+
handoff_reason?: string | undefined;
|
|
833
1670
|
} | undefined;
|
|
834
1671
|
payload_ref?: {
|
|
835
1672
|
sha256: string;
|
|
@@ -838,23 +1675,42 @@ export declare const RunfileEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
838
1675
|
encryption: {
|
|
839
1676
|
algorithm: "aes-256-gcm";
|
|
840
1677
|
data_key_wrapped: string;
|
|
841
|
-
|
|
1678
|
+
nonce: string;
|
|
1679
|
+
key_id?: string | undefined;
|
|
842
1680
|
};
|
|
843
|
-
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | undefined;
|
|
1681
|
+
content_type?: "application/json" | "text/plain" | "application/vnd.runfile.llm-request+json" | "application/vnd.runfile.llm-response+json" | "application/vnd.runfile.tool-call+json" | "application/vnd.runfile.tool-result+json" | "application/vnd.runfile.state-snapshot+json" | "application/vnd.runfile.framework-signal+json" | undefined;
|
|
844
1682
|
redaction_applied?: {
|
|
845
1683
|
redacted_classes?: string[] | undefined;
|
|
846
1684
|
tokenized_classes?: string[] | undefined;
|
|
847
1685
|
classifier_version?: string | undefined;
|
|
848
1686
|
} | undefined;
|
|
849
1687
|
} | undefined;
|
|
850
|
-
|
|
1688
|
+
otel_attributes?: {
|
|
1689
|
+
gen_ai_system?: string | undefined;
|
|
1690
|
+
gen_ai_operation_name?: string | undefined;
|
|
1691
|
+
gen_ai_provider_name?: string | undefined;
|
|
1692
|
+
gen_ai_request_model?: string | undefined;
|
|
1693
|
+
gen_ai_response_model?: string | undefined;
|
|
1694
|
+
gen_ai_request_temperature?: number | undefined;
|
|
1695
|
+
gen_ai_request_top_p?: number | undefined;
|
|
1696
|
+
gen_ai_request_max_tokens?: number | undefined;
|
|
1697
|
+
gen_ai_response_id?: string | undefined;
|
|
1698
|
+
gen_ai_response_finish_reasons?: string[] | undefined;
|
|
1699
|
+
gen_ai_usage_input_tokens?: number | undefined;
|
|
1700
|
+
gen_ai_usage_output_tokens?: number | undefined;
|
|
1701
|
+
gen_ai_tool_name?: string | undefined;
|
|
1702
|
+
gen_ai_tool_call_id?: string | undefined;
|
|
1703
|
+
gen_ai_agent_id?: string | undefined;
|
|
1704
|
+
gen_ai_agent_name?: string | undefined;
|
|
1705
|
+
gen_ai_agent_description?: string | undefined;
|
|
1706
|
+
gen_ai_conversation_id?: string | undefined;
|
|
1707
|
+
extra?: Record<string, string | number | boolean> | undefined;
|
|
1708
|
+
} | undefined;
|
|
851
1709
|
anomaly_flags?: {
|
|
852
|
-
code: "missing_ambient_context" | "chain_break" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning";
|
|
1710
|
+
code: "missing_ambient_context" | "chain_break" | "sequence_gap" | "causality_violation" | "out_of_order_arrival" | "model_version_drift" | "unknown_agent_identity" | "data_classification_mismatch" | "policy_threshold_without_hitl" | "unauthorized_tool_invocation" | "redaction_policy_mismatch" | "schema_version_warning" | "agent_identity_mismatch_with_run" | "suspension_sla_exceeded" | "apparent_crash_detected" | "active_duration_exceeds_threshold" | "framework_signal_unrecognised" | "otel_attribute_missing" | "delegation_loop_detected";
|
|
853
1711
|
severity: "info" | "warning" | "error" | "critical";
|
|
854
1712
|
detail?: string | undefined;
|
|
855
1713
|
}[] | undefined;
|
|
856
|
-
environment?: "production" | "staging" | "development" | undefined;
|
|
857
|
-
labels?: Record<string, string> | undefined;
|
|
858
1714
|
merkle_inclusion?: {
|
|
859
1715
|
manifest_uri: string;
|
|
860
1716
|
leaf_index: number;
|