@crewai-ts/core 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/a2a.d.ts +1684 -0
  2. package/dist/a2ui-schemas.d.ts +3312 -0
  3. package/dist/a2ui.d.ts +379 -0
  4. package/dist/agent-adapters.d.ts +178 -0
  5. package/dist/agent-executors.d.ts +508 -0
  6. package/dist/agent-parser.d.ts +44 -0
  7. package/dist/agent-planning.d.ts +358 -0
  8. package/dist/agent-utils.d.ts +210 -0
  9. package/dist/agent.d.ts +444 -0
  10. package/dist/auth.d.ts +179 -0
  11. package/dist/config-utils.d.ts +5 -0
  12. package/dist/content-processor.d.ts +12 -0
  13. package/dist/context.d.ts +157 -0
  14. package/dist/converter.d.ts +97 -0
  15. package/dist/crew-chat.d.ts +97 -0
  16. package/dist/crew.d.ts +424 -0
  17. package/dist/decorators.d.ts +20 -0
  18. package/dist/env.d.ts +13 -0
  19. package/dist/errors.d.ts +27 -0
  20. package/dist/evaluators.d.ts +477 -0
  21. package/dist/events.d.ts +2657 -0
  22. package/dist/execution-utils.d.ts +85 -0
  23. package/dist/experimental-conversational.d.ts +181 -0
  24. package/dist/file-handler.d.ts +36 -0
  25. package/dist/file-store.d.ts +37 -0
  26. package/dist/files.d.ts +554 -0
  27. package/dist/flow-conversation.d.ts +90 -0
  28. package/dist/flow-definition.d.ts +195 -0
  29. package/dist/flow-persistence.d.ts +107 -0
  30. package/dist/flow-visualization.d.ts +77 -0
  31. package/dist/flow.d.ts +927 -0
  32. package/dist/formatter.d.ts +7 -0
  33. package/dist/guardrail.d.ts +95 -0
  34. package/dist/hooks.d.ts +241 -0
  35. package/dist/human-input.d.ts +74 -0
  36. package/dist/i18n.d.ts +26 -0
  37. package/dist/index.d.ts +99 -13004
  38. package/dist/input-files.d.ts +24 -0
  39. package/dist/input-provider.d.ts +22 -0
  40. package/dist/knowledge.d.ts +353 -0
  41. package/dist/lite-agent-output.d.ts +69 -0
  42. package/dist/lite-agent.d.ts +154 -0
  43. package/dist/llm.d.ts +630 -0
  44. package/dist/llms-hooks-transport.d.ts +1 -2
  45. package/dist/lock-store.d.ts +14 -0
  46. package/dist/logger.d.ts +55 -0
  47. package/dist/mcp.d.ts +315 -0
  48. package/dist/memory.d.ts +915 -0
  49. package/dist/metadata.d.ts +9 -0
  50. package/dist/misc-compat.d.ts +125 -0
  51. package/dist/openai-completion.d.ts +324 -0
  52. package/dist/outputs.d.ts +69 -0
  53. package/dist/planning.d.ts +60 -0
  54. package/dist/plus-api.d.ts +194 -0
  55. package/dist/project-compat.d.ts +133 -0
  56. package/dist/project.d.ts +221 -0
  57. package/dist/prompts.d.ts +66 -0
  58. package/dist/provider-completions.d.ts +593 -0
  59. package/dist/rag.d.ts +1074 -0
  60. package/dist/rpm.d.ts +27 -0
  61. package/dist/rw-lock.d.ts +21 -0
  62. package/dist/schema-utils.d.ts +121 -0
  63. package/dist/security.d.ts +66 -0
  64. package/dist/settings.d.ts +103 -0
  65. package/dist/skills.d.ts +145 -0
  66. package/dist/state-provider-core.d.ts +1 -1
  67. package/dist/state.d.ts +204 -0
  68. package/dist/step-execution-context.d.ts +36 -0
  69. package/dist/streaming.d.ts +153 -0
  70. package/dist/string-utils.d.ts +12 -0
  71. package/dist/task-output-storage.d.ts +62 -0
  72. package/dist/task.d.ts +305 -0
  73. package/dist/telemetry.d.ts +91 -0
  74. package/dist/token-counter-callback.d.ts +36 -0
  75. package/dist/tools.d.ts +563 -0
  76. package/dist/tracing-utils.d.ts +56 -0
  77. package/dist/training-converter.d.ts +36 -0
  78. package/dist/training-handler.d.ts +10 -0
  79. package/dist/types.d.ts +72 -0
  80. package/dist/utilities.d.ts +130 -0
  81. package/dist/utility-types.d.ts +10 -0
  82. package/dist/version.d.ts +12 -0
  83. package/package.json +326 -4904
  84. package/dist/index.d.cts +0 -13068
  85. package/dist/llms-hooks-transport-ChGiFBiU.d.ts +0 -233
  86. package/dist/llms-hooks-transport-DZlurMUQ.d.cts +0 -233
  87. package/dist/llms-hooks-transport.d.cts +0 -2
  88. package/dist/state-provider-core-Be9RKRAm.d.cts +0 -4876
  89. package/dist/state-provider-core-Be9RKRAm.d.ts +0 -4876
  90. package/dist/state-provider-core.d.cts +0 -1
@@ -0,0 +1,2657 @@
1
+ import type { LiteAgentOutput } from "./lite-agent-output.js";
2
+ import type { CrewOutput, TaskOutput } from "./outputs.js";
3
+ import { type TraceEventsPayload, type TraceFinalizePayload } from "./plus-api.js";
4
+ import { RuntimeState } from "./state.js";
5
+ import { Telemetry } from "./telemetry.js";
6
+ import type { InputValues, MaybePromise } from "./types.js";
7
+ export type EventType = "crew_kickoff_started" | "crew_kickoff_completed" | "crew_kickoff_failed" | "crew_train_started" | "crew_train_completed" | "crew_train_failed" | "crew_test_started" | "crew_test_completed" | "crew_test_failed" | "task_started" | "task_completed" | "task_failed" | "task_evaluation" | "crew_test_result" | "agent_execution_started" | "agent_execution_completed" | "agent_execution_error" | "agent_evaluation_started" | "agent_evaluation_completed" | "agent_evaluation_failed" | "agent_reasoning_started" | "agent_reasoning_completed" | "agent_reasoning_failed" | "a2a_delegation_started" | "a2a_delegation_completed" | "a2a_conversation_started" | "a2a_message_sent" | "a2a_response_received" | "a2a_conversation_completed" | "a2a_polling_started" | "a2a_polling_status" | "a2a_push_notification_registered" | "a2a_push_notification_received" | "a2a_push_notification_sent" | "a2a_push_notification_timeout" | "a2a_streaming_started" | "a2a_streaming_chunk" | "a2a_agent_card_fetched" | "a2a_authentication_failed" | "a2a_artifact_received" | "a2a_connection_error" | "a2a_server_task_started" | "a2a_server_task_completed" | "a2a_server_task_canceled" | "a2a_server_task_failed" | "a2a_parallel_delegation_started" | "a2a_parallel_delegation_completed" | "a2a_transport_negotiated" | "a2a_content_type_negotiated" | "a2a_context_created" | "a2a_context_expired" | "a2a_context_idle" | "a2a_context_completed" | "a2a_context_pruned" | "mcp_connection_started" | "mcp_connection_completed" | "mcp_connection_failed" | "mcp_tool_execution_started" | "mcp_tool_execution_completed" | "mcp_tool_execution_failed" | "mcp_config_fetch_failed" | "skill_discovery_started" | "skill_discovery_completed" | "skill_loaded" | "skill_activated" | "skill_load_failed" | "skill_download_started" | "skill_download_completed" | "llm_call_started" | "llm_call_completed" | "llm_call_failed" | "llm_stream_chunk" | "llm_thinking_chunk" | "llm_guardrail_started" | "llm_guardrail_completed" | "knowledge_search_query_started" | "knowledge_search_query_completed" | "knowledge_query_started" | "knowledge_query_failed" | "knowledge_query_completed" | "knowledge_search_query_failed" | "tool_usage_started" | "tool_usage_finished" | "tool_usage_error" | "tool_validate_input_error" | "tool_selection_error" | "tool_execution_error" | "lite_agent_execution_started" | "lite_agent_execution_completed" | "lite_agent_execution_error" | "human_feedback_requested" | "human_feedback_received" | "memory_save_started" | "memory_save_completed" | "memory_save_failed" | "memory_query_started" | "memory_query_completed" | "memory_query_failed" | "memory_retrieval_started" | "memory_retrieval_completed" | "memory_retrieval_failed" | "flow_started" | "flow_created" | "flow_finished" | "flow_failed" | "flow_paused" | "flow_plot" | "flow_input_requested" | "flow_input_received" | "method_execution_started" | "method_execution_finished" | "method_execution_failed" | "method_execution_paused" | "checkpoint_started" | "checkpoint_completed" | "checkpoint_failed" | "checkpoint_pruned" | "checkpoint_fork_started" | "checkpoint_fork_completed" | "checkpoint_restore_started" | "checkpoint_restore_completed" | "checkpoint_restore_failed" | "step_observation_started" | "step_observation_completed" | "step_observation_failed" | "plan_refinement" | "plan_replan_triggered" | "goal_achieved_early" | "SIGTERM" | "SIGINT" | "SIGHUP" | "SIGTSTP" | "SIGCONT" | "agent_logs_started" | "agent_logs_execution" | "cc_env" | "codex_env" | "cursor_env" | "default_env";
8
+ type EventClass<TEvent extends CrewAIEvent = CrewAIEvent> = abstract new (...args: unknown[]) => TEvent;
9
+ type EventRegistrationKey = EventType | EventClass;
10
+ export type BaseEventOptions = {
11
+ type: EventType;
12
+ sourceType?: string | null;
13
+ sourceFingerprint?: string | null;
14
+ parentEventId?: string | null;
15
+ previousEventId?: string | null;
16
+ triggeredByEventId?: string | null;
17
+ startedEventId?: string | null;
18
+ };
19
+ export declare class BaseEvent {
20
+ readonly timestamp: Date;
21
+ readonly type: EventType;
22
+ readonly eventId: string;
23
+ readonly emissionSequence: number;
24
+ sourceType: string | null;
25
+ sourceFingerprint: string | null;
26
+ fingerprintMetadata: Record<string, unknown> | null;
27
+ fingerprint_metadata: Record<string, unknown> | null;
28
+ taskId: string | null;
29
+ task_id: string | null;
30
+ taskName: string | null;
31
+ task_name: string | null;
32
+ agentId: string | null;
33
+ agent_id: string | null;
34
+ agentRole: string | null;
35
+ agent_role: string | null;
36
+ parentEventId: string | null;
37
+ previousEventId: string | null;
38
+ triggeredByEventId: string | null;
39
+ startedEventId: string | null;
40
+ constructor(options: BaseEventOptions);
41
+ toJSON(): Record<string, unknown>;
42
+ to_json(exclude?: Set<string> | readonly string[] | null): Record<string, unknown>;
43
+ _set_task_params(data: Record<string, unknown>): void;
44
+ _set_agent_params(data: Record<string, unknown>): void;
45
+ }
46
+ export declare abstract class FlowEvent extends BaseEvent {
47
+ }
48
+ export declare abstract class ReasoningEvent extends BaseEvent {
49
+ }
50
+ export declare abstract class ToolUsageEvent extends BaseEvent {
51
+ }
52
+ export type CrewBaseEventOptions = Omit<BaseEventOptions, "sourceType" | "sourceFingerprint"> & {
53
+ sourceType?: string | null | undefined;
54
+ sourceFingerprint?: string | null | undefined;
55
+ crewName?: string | null | undefined;
56
+ crew_name?: string | null | undefined;
57
+ crew?: unknown;
58
+ fingerprintMetadata?: Record<string, unknown> | null | undefined;
59
+ fingerprint_metadata?: Record<string, unknown> | null | undefined;
60
+ };
61
+ export declare abstract class CrewBaseEvent extends BaseEvent {
62
+ readonly crewName: string | null;
63
+ readonly crew_name: string | null;
64
+ readonly crew: unknown;
65
+ fingerprintMetadata: Record<string, unknown> | null;
66
+ fingerprint_metadata: Record<string, unknown> | null;
67
+ constructor(options: CrewBaseEventOptions);
68
+ _set_crew_fingerprint(): void;
69
+ toJSON(): Record<string, unknown>;
70
+ to_json(exclude?: Set<string> | readonly string[] | null): Record<string, unknown>;
71
+ }
72
+ export declare abstract class MemoryBaseEvent extends BaseEvent {
73
+ }
74
+ export declare class CrewKickoffStartedEvent extends CrewBaseEvent {
75
+ readonly inputs: InputValues | null;
76
+ constructor(options?: {
77
+ crewName?: string | null;
78
+ crew_name?: string | null;
79
+ crew?: unknown;
80
+ inputs?: InputValues | null;
81
+ startedEventId?: string | null;
82
+ started_event_id?: string | null;
83
+ });
84
+ }
85
+ export declare class CrewKickoffCompletedEvent extends CrewBaseEvent {
86
+ readonly output: CrewOutput;
87
+ readonly totalTokens: number;
88
+ readonly total_tokens: number;
89
+ constructor(options: {
90
+ crewName?: string | null;
91
+ crew_name?: string | null;
92
+ crew?: unknown;
93
+ output: CrewOutput;
94
+ totalTokens?: number;
95
+ total_tokens?: number;
96
+ startedEventId?: string | null;
97
+ started_event_id?: string | null;
98
+ });
99
+ }
100
+ export declare class CrewKickoffFailedEvent extends CrewBaseEvent {
101
+ readonly error: string;
102
+ constructor(options: {
103
+ crewName?: string | null;
104
+ crew_name?: string | null;
105
+ crew?: unknown;
106
+ error: unknown;
107
+ startedEventId?: string | null;
108
+ started_event_id?: string | null;
109
+ });
110
+ }
111
+ export declare class CrewTrainStartedEvent extends CrewBaseEvent {
112
+ readonly n_iterations: number;
113
+ readonly filename: string;
114
+ readonly inputs: InputValues | null;
115
+ constructor(options: {
116
+ crewName?: string | null;
117
+ crew_name?: string | null;
118
+ crew?: unknown;
119
+ n_iterations: number;
120
+ filename: string;
121
+ inputs?: InputValues | null;
122
+ });
123
+ }
124
+ export declare class CrewTrainCompletedEvent extends CrewBaseEvent {
125
+ readonly n_iterations: number;
126
+ readonly filename: string;
127
+ constructor(options: {
128
+ crewName?: string | null;
129
+ crew_name?: string | null;
130
+ crew?: unknown;
131
+ n_iterations: number;
132
+ filename: string;
133
+ });
134
+ }
135
+ export declare class CrewTrainFailedEvent extends CrewBaseEvent {
136
+ readonly error: string;
137
+ constructor(options: {
138
+ crewName?: string | null;
139
+ crew_name?: string | null;
140
+ crew?: unknown;
141
+ error: unknown;
142
+ });
143
+ }
144
+ export declare class CrewTestStartedEvent extends CrewBaseEvent {
145
+ readonly n_iterations: number;
146
+ readonly eval_llm: unknown;
147
+ readonly inputs: InputValues | null;
148
+ constructor(options: {
149
+ crewName?: string | null;
150
+ crew_name?: string | null;
151
+ crew?: unknown;
152
+ n_iterations: number;
153
+ eval_llm?: unknown;
154
+ inputs?: InputValues | null;
155
+ });
156
+ }
157
+ export declare class CrewTestCompletedEvent extends CrewBaseEvent {
158
+ constructor(options?: {
159
+ crewName?: string | null;
160
+ crew_name?: string | null;
161
+ crew?: unknown;
162
+ });
163
+ }
164
+ export declare class CrewTestFailedEvent extends CrewBaseEvent {
165
+ readonly error: string;
166
+ constructor(options: {
167
+ crewName?: string | null;
168
+ crew_name?: string | null;
169
+ crew?: unknown;
170
+ error: unknown;
171
+ });
172
+ }
173
+ export declare class TaskStartedEvent extends BaseEvent {
174
+ readonly taskName: string | null;
175
+ readonly taskDescription: string;
176
+ readonly context: string | null;
177
+ constructor(options: {
178
+ taskName?: string | null;
179
+ taskDescription: string;
180
+ context?: string | null;
181
+ });
182
+ }
183
+ export declare class TaskCompletedEvent extends BaseEvent {
184
+ readonly taskName: string | null;
185
+ readonly taskDescription: string;
186
+ readonly output: TaskOutput;
187
+ constructor(options: {
188
+ taskName?: string | null;
189
+ taskDescription: string;
190
+ output: TaskOutput;
191
+ });
192
+ }
193
+ export declare class TaskFailedEvent extends BaseEvent {
194
+ readonly taskName: string | null;
195
+ readonly taskDescription: string;
196
+ readonly error: string;
197
+ constructor(options: {
198
+ taskName?: string | null;
199
+ taskDescription: string;
200
+ error: unknown;
201
+ });
202
+ }
203
+ export declare class TaskEvaluationEvent extends BaseEvent {
204
+ readonly evaluationType: string;
205
+ readonly evaluation_type: string;
206
+ readonly task: unknown;
207
+ constructor(options?: {
208
+ evaluationType?: string;
209
+ evaluation_type?: string;
210
+ task?: unknown;
211
+ });
212
+ }
213
+ export declare class CrewTestResultEvent extends CrewBaseEvent {
214
+ readonly quality: number;
215
+ readonly executionDuration: number | null;
216
+ readonly execution_duration: number | null;
217
+ readonly model: string | null;
218
+ constructor(options: {
219
+ quality: number;
220
+ executionDuration?: number | null;
221
+ execution_duration?: number | null;
222
+ model?: string | null;
223
+ crewName?: string | null;
224
+ crew_name?: string | null;
225
+ crew?: unknown;
226
+ });
227
+ }
228
+ export declare function _set_agent_fingerprint(event: BaseEvent, agent: unknown): void;
229
+ export declare function _set_task_fingerprint(event: BaseEvent, task: unknown): void;
230
+ export declare class AgentExecutionStartedEvent extends BaseEvent {
231
+ readonly agent: unknown;
232
+ readonly task: unknown;
233
+ readonly tools: readonly unknown[] | null;
234
+ readonly taskPrompt: string;
235
+ readonly task_prompt: string;
236
+ readonly fingerprintMetadata: Record<string, unknown> | null;
237
+ readonly fingerprint_metadata: Record<string, unknown> | null;
238
+ constructor(options: {
239
+ agent: unknown;
240
+ task: unknown;
241
+ tools?: readonly unknown[] | null;
242
+ taskPrompt?: string;
243
+ task_prompt?: string;
244
+ });
245
+ setFingerprintData(): this;
246
+ set_fingerprint_data(): this;
247
+ }
248
+ export declare class AgentExecutionCompletedEvent extends BaseEvent {
249
+ readonly agent: unknown;
250
+ readonly task: unknown;
251
+ readonly output: string;
252
+ readonly fingerprintMetadata: Record<string, unknown> | null;
253
+ readonly fingerprint_metadata: Record<string, unknown> | null;
254
+ constructor(options: {
255
+ agent: unknown;
256
+ task: unknown;
257
+ output: string;
258
+ });
259
+ setFingerprintData(): this;
260
+ set_fingerprint_data(): this;
261
+ }
262
+ export declare class AgentExecutionErrorEvent extends BaseEvent {
263
+ readonly agent: unknown;
264
+ readonly task: unknown;
265
+ readonly error: string;
266
+ readonly fingerprintMetadata: Record<string, unknown> | null;
267
+ readonly fingerprint_metadata: Record<string, unknown> | null;
268
+ constructor(options: {
269
+ agent: unknown;
270
+ task: unknown;
271
+ error: unknown;
272
+ });
273
+ setFingerprintData(): this;
274
+ set_fingerprint_data(): this;
275
+ }
276
+ export declare class AgentEvaluationStartedEvent extends BaseEvent {
277
+ readonly agent_id: string;
278
+ readonly agent_role: string;
279
+ readonly task_id: string | null;
280
+ readonly iteration: number;
281
+ constructor(options: {
282
+ agent_id: string;
283
+ agent_role: string;
284
+ task_id?: string | null;
285
+ iteration: number;
286
+ });
287
+ }
288
+ export declare class AgentEvaluationCompletedEvent extends BaseEvent {
289
+ readonly agent_id: string;
290
+ readonly agent_role: string;
291
+ readonly task_id: string | null;
292
+ readonly iteration: number;
293
+ readonly metric_category: unknown;
294
+ readonly score: unknown;
295
+ constructor(options: {
296
+ agent_id: string;
297
+ agent_role: string;
298
+ task_id?: string | null;
299
+ iteration: number;
300
+ metric_category: unknown;
301
+ score: unknown;
302
+ });
303
+ }
304
+ export declare class AgentEvaluationFailedEvent extends BaseEvent {
305
+ readonly agent_id: string;
306
+ readonly agent_role: string;
307
+ readonly task_id: string | null;
308
+ readonly iteration: number;
309
+ readonly error: string;
310
+ constructor(options: {
311
+ agent_id: string;
312
+ agent_role: string;
313
+ task_id?: string | null;
314
+ iteration: number;
315
+ error: unknown;
316
+ });
317
+ }
318
+ export declare class AgentReasoningStartedEvent extends BaseEvent {
319
+ readonly agentRole: string;
320
+ readonly agent_role: string;
321
+ readonly taskId: string;
322
+ readonly task_id: string;
323
+ readonly attempt: number;
324
+ readonly fromTask: unknown;
325
+ readonly from_task: unknown;
326
+ constructor(options?: {
327
+ agentRole?: string;
328
+ agent_role?: string;
329
+ taskId?: string;
330
+ task_id?: string;
331
+ attempt?: number;
332
+ fromTask?: unknown;
333
+ from_task?: unknown;
334
+ });
335
+ }
336
+ export declare class AgentReasoningCompletedEvent extends BaseEvent {
337
+ readonly agentRole: string;
338
+ readonly agent_role: string;
339
+ readonly taskId: string;
340
+ readonly task_id: string;
341
+ readonly plan: string;
342
+ readonly ready: boolean;
343
+ readonly attempt: number;
344
+ readonly fromTask: unknown;
345
+ readonly from_task: unknown;
346
+ readonly fromAgent: unknown;
347
+ readonly from_agent: unknown;
348
+ constructor(options: {
349
+ agentRole?: string;
350
+ agent_role?: string;
351
+ taskId?: string;
352
+ task_id?: string;
353
+ plan: string;
354
+ ready: boolean;
355
+ attempt?: number;
356
+ fromTask?: unknown;
357
+ from_task?: unknown;
358
+ fromAgent?: unknown;
359
+ from_agent?: unknown;
360
+ });
361
+ }
362
+ export declare class AgentReasoningFailedEvent extends BaseEvent {
363
+ readonly agentRole: string;
364
+ readonly agent_role: string;
365
+ readonly taskId: string;
366
+ readonly task_id: string;
367
+ readonly error: string;
368
+ readonly attempt: number;
369
+ readonly fromTask: unknown;
370
+ readonly from_task: unknown;
371
+ readonly fromAgent: unknown;
372
+ readonly from_agent: unknown;
373
+ constructor(options: {
374
+ agentRole?: string;
375
+ agent_role?: string;
376
+ taskId?: string;
377
+ task_id?: string;
378
+ error: unknown;
379
+ attempt?: number;
380
+ fromTask?: unknown;
381
+ from_task?: unknown;
382
+ fromAgent?: unknown;
383
+ from_agent?: unknown;
384
+ });
385
+ }
386
+ export declare class HumanFeedbackRequestedEvent extends BaseEvent {
387
+ readonly taskName: string | null;
388
+ readonly task_name: string | null;
389
+ readonly taskDescription: string | null;
390
+ readonly task_description: string | null;
391
+ readonly output: unknown;
392
+ readonly flowName: string | null;
393
+ readonly flow_name: string | null;
394
+ readonly methodName: string | null;
395
+ readonly method_name: string | null;
396
+ readonly message: string | null;
397
+ readonly emit: readonly string[] | null;
398
+ readonly request_id: string | null;
399
+ constructor(options: {
400
+ taskName?: string | null;
401
+ task_name?: string | null;
402
+ taskDescription?: string | null;
403
+ task_description?: string | null;
404
+ output: unknown;
405
+ flowName?: string | null;
406
+ flow_name?: string | null;
407
+ methodName?: string | null;
408
+ method_name?: string | null;
409
+ message?: string | null;
410
+ emit?: readonly string[] | null;
411
+ request_id?: string | null;
412
+ });
413
+ }
414
+ export declare class HumanFeedbackReceivedEvent extends BaseEvent {
415
+ readonly taskName: string | null;
416
+ readonly task_name: string | null;
417
+ readonly taskDescription: string | null;
418
+ readonly task_description: string | null;
419
+ readonly feedback: string;
420
+ readonly accepted: boolean;
421
+ readonly flowName: string | null;
422
+ readonly flow_name: string | null;
423
+ readonly methodName: string | null;
424
+ readonly method_name: string | null;
425
+ readonly outcome: string | null;
426
+ readonly request_id: string | null;
427
+ constructor(options: {
428
+ taskName?: string | null;
429
+ task_name?: string | null;
430
+ taskDescription?: string | null;
431
+ task_description?: string | null;
432
+ feedback: string;
433
+ accepted?: boolean;
434
+ flowName?: string | null;
435
+ flow_name?: string | null;
436
+ methodName?: string | null;
437
+ method_name?: string | null;
438
+ outcome?: string | null;
439
+ request_id?: string | null;
440
+ });
441
+ }
442
+ export declare class ToolUsageStartedEvent extends BaseEvent {
443
+ readonly toolName: string;
444
+ readonly tool_name: string;
445
+ readonly toolArgs: Record<string, unknown> | string;
446
+ readonly tool_args: Record<string, unknown> | string;
447
+ readonly toolClass: string | null;
448
+ readonly tool_class: string | null;
449
+ constructor(options: {
450
+ toolName?: string;
451
+ tool_name?: string;
452
+ toolArgs?: Record<string, unknown> | string;
453
+ tool_args?: Record<string, unknown> | string;
454
+ toolClass?: string | null;
455
+ tool_class?: string | null;
456
+ } & Record<string, unknown>);
457
+ }
458
+ export declare class ToolUsageFinishedEvent extends BaseEvent {
459
+ readonly toolName: string;
460
+ readonly tool_name: string;
461
+ readonly toolArgs: Record<string, unknown> | string;
462
+ readonly tool_args: Record<string, unknown> | string;
463
+ readonly toolClass: string | null;
464
+ readonly tool_class: string | null;
465
+ readonly startedAt: Date;
466
+ readonly started_at: Date;
467
+ readonly finishedAt: Date;
468
+ readonly finished_at: Date;
469
+ readonly fromCache: boolean;
470
+ readonly from_cache: boolean;
471
+ readonly output: unknown;
472
+ constructor(options: {
473
+ toolName?: string;
474
+ tool_name?: string;
475
+ toolArgs?: Record<string, unknown> | string;
476
+ tool_args?: Record<string, unknown> | string;
477
+ toolClass?: string | null;
478
+ tool_class?: string | null;
479
+ startedAt?: Date;
480
+ started_at?: Date;
481
+ finishedAt?: Date;
482
+ finished_at?: Date;
483
+ fromCache?: boolean;
484
+ from_cache?: boolean;
485
+ output: unknown;
486
+ } & Record<string, unknown>);
487
+ }
488
+ export declare class ToolUsageErrorEvent extends BaseEvent {
489
+ readonly toolName: string;
490
+ readonly tool_name: string;
491
+ readonly toolArgs: Record<string, unknown> | string;
492
+ readonly tool_args: Record<string, unknown> | string;
493
+ readonly toolClass: string | null;
494
+ readonly tool_class: string | null;
495
+ readonly error: string;
496
+ constructor(options: {
497
+ toolName?: string;
498
+ tool_name?: string;
499
+ toolArgs?: Record<string, unknown> | string;
500
+ tool_args?: Record<string, unknown> | string;
501
+ toolClass?: string | null;
502
+ tool_class?: string | null;
503
+ error: unknown;
504
+ } & Record<string, unknown>);
505
+ }
506
+ export declare class ToolValidateInputErrorEvent extends BaseEvent {
507
+ readonly toolName: string;
508
+ readonly tool_name: string;
509
+ readonly toolArgs: Record<string, unknown> | string;
510
+ readonly tool_args: Record<string, unknown> | string;
511
+ readonly toolClass: string | null;
512
+ readonly tool_class: string | null;
513
+ readonly error: string;
514
+ constructor(options: {
515
+ toolName?: string;
516
+ tool_name?: string;
517
+ toolArgs?: Record<string, unknown> | string;
518
+ tool_args?: Record<string, unknown> | string;
519
+ toolClass?: string | null;
520
+ tool_class?: string | null;
521
+ error: unknown;
522
+ } & Record<string, unknown>);
523
+ }
524
+ export declare class ToolSelectionErrorEvent extends BaseEvent {
525
+ readonly toolName: string;
526
+ readonly tool_name: string;
527
+ readonly toolArgs: Record<string, unknown> | string;
528
+ readonly tool_args: Record<string, unknown> | string;
529
+ readonly toolClass: string | null;
530
+ readonly tool_class: string | null;
531
+ readonly error: string;
532
+ constructor(options: {
533
+ toolName?: string;
534
+ tool_name?: string;
535
+ toolArgs?: Record<string, unknown> | string;
536
+ tool_args?: Record<string, unknown> | string;
537
+ toolClass?: string | null;
538
+ tool_class?: string | null;
539
+ error: unknown;
540
+ } & Record<string, unknown>);
541
+ }
542
+ export declare class ToolExecutionErrorEvent extends BaseEvent {
543
+ readonly error: string;
544
+ readonly tool_name: string;
545
+ readonly tool_args: Record<string, unknown>;
546
+ readonly tool_class: unknown;
547
+ readonly agent: unknown;
548
+ readonly fingerprintMetadata: Record<string, unknown> | null;
549
+ readonly fingerprint_metadata: Record<string, unknown> | null;
550
+ constructor(options: {
551
+ error: unknown;
552
+ tool_name: string;
553
+ tool_args: Record<string, unknown>;
554
+ tool_class: unknown;
555
+ agent?: unknown;
556
+ });
557
+ }
558
+ export declare class LiteAgentExecutionStartedEvent extends BaseEvent {
559
+ readonly agentInfo: Record<string, unknown>;
560
+ readonly agent_info: Record<string, unknown>;
561
+ readonly messages: readonly unknown[];
562
+ constructor(options?: {
563
+ agentInfo?: Record<string, unknown>;
564
+ agent_info?: Record<string, unknown>;
565
+ messages?: readonly unknown[];
566
+ });
567
+ }
568
+ export declare class LiteAgentExecutionCompletedEvent extends BaseEvent {
569
+ readonly agentInfo: Record<string, unknown>;
570
+ readonly agent_info: Record<string, unknown>;
571
+ readonly output: LiteAgentOutput;
572
+ constructor(options: {
573
+ agentInfo?: Record<string, unknown>;
574
+ agent_info?: Record<string, unknown>;
575
+ output: LiteAgentOutput;
576
+ });
577
+ }
578
+ export declare class LiteAgentExecutionErrorEvent extends BaseEvent {
579
+ readonly agentInfo: Record<string, unknown>;
580
+ readonly agent_info: Record<string, unknown>;
581
+ readonly error: string;
582
+ constructor(options: {
583
+ agentInfo?: Record<string, unknown>;
584
+ agent_info?: Record<string, unknown>;
585
+ error: unknown;
586
+ });
587
+ }
588
+ export declare class MemorySaveStartedEvent extends BaseEvent {
589
+ readonly value: string | null;
590
+ readonly metadata: Record<string, unknown> | null;
591
+ readonly agentRole: string | null;
592
+ constructor(options?: {
593
+ value?: string | null;
594
+ metadata?: Record<string, unknown> | null;
595
+ agentRole?: string | null;
596
+ });
597
+ }
598
+ export declare class MemorySaveCompletedEvent extends BaseEvent {
599
+ readonly value: string;
600
+ readonly metadata: Record<string, unknown> | null;
601
+ readonly agentRole: string | null;
602
+ readonly saveTimeMs: number;
603
+ constructor(options: {
604
+ value: string;
605
+ metadata?: Record<string, unknown> | null;
606
+ agentRole?: string | null;
607
+ saveTimeMs: number;
608
+ });
609
+ }
610
+ export declare class MemorySaveFailedEvent extends BaseEvent {
611
+ readonly value: string | null;
612
+ readonly metadata: Record<string, unknown> | null;
613
+ readonly agentRole: string | null;
614
+ readonly error: string;
615
+ constructor(options: {
616
+ value?: string | null;
617
+ metadata?: Record<string, unknown> | null;
618
+ agentRole?: string | null;
619
+ error: unknown;
620
+ });
621
+ }
622
+ export declare class MemoryQueryStartedEvent extends BaseEvent {
623
+ readonly query: string;
624
+ readonly limit: number;
625
+ readonly scoreThreshold: number | null;
626
+ constructor(options: {
627
+ query: string;
628
+ limit: number;
629
+ scoreThreshold?: number | null;
630
+ });
631
+ }
632
+ export declare class MemoryQueryCompletedEvent extends BaseEvent {
633
+ readonly query: string;
634
+ readonly results: unknown;
635
+ readonly limit: number;
636
+ readonly scoreThreshold: number | null;
637
+ readonly queryTimeMs: number;
638
+ constructor(options: {
639
+ query: string;
640
+ results: unknown;
641
+ limit: number;
642
+ scoreThreshold?: number | null;
643
+ queryTimeMs: number;
644
+ });
645
+ }
646
+ export declare class MemoryQueryFailedEvent extends BaseEvent {
647
+ readonly query: string;
648
+ readonly limit: number;
649
+ readonly scoreThreshold: number | null;
650
+ readonly error: string;
651
+ constructor(options: {
652
+ query: string;
653
+ limit: number;
654
+ scoreThreshold?: number | null;
655
+ error: unknown;
656
+ });
657
+ }
658
+ export declare class MemoryRetrievalStartedEvent extends BaseEvent {
659
+ readonly task_id: string | null;
660
+ constructor(options?: {
661
+ task_id?: string | null;
662
+ });
663
+ }
664
+ export declare class MemoryRetrievalCompletedEvent extends BaseEvent {
665
+ readonly task_id: string | null;
666
+ readonly memory_content: string;
667
+ readonly retrieval_time_ms: number;
668
+ constructor(options: {
669
+ task_id?: string | null;
670
+ memory_content: string;
671
+ retrieval_time_ms: number;
672
+ });
673
+ }
674
+ export declare class MemoryRetrievalFailedEvent extends BaseEvent {
675
+ readonly task_id: string | null;
676
+ readonly error: string;
677
+ constructor(options: {
678
+ task_id?: string | null;
679
+ error: unknown;
680
+ });
681
+ }
682
+ export declare class FlowStartedEvent extends BaseEvent {
683
+ readonly flowName: string;
684
+ readonly flow_name: string;
685
+ readonly inputs: InputValues;
686
+ constructor(options: {
687
+ flowName?: string;
688
+ flow_name?: string;
689
+ inputs?: InputValues;
690
+ });
691
+ }
692
+ export declare class FlowCreatedEvent extends BaseEvent {
693
+ readonly flowName: string;
694
+ readonly flow_name: string;
695
+ constructor(options: {
696
+ flowName?: string;
697
+ flow_name?: string;
698
+ });
699
+ }
700
+ export declare class FlowFinishedEvent extends BaseEvent {
701
+ readonly flowName: string;
702
+ readonly flow_name: string;
703
+ readonly result: unknown;
704
+ readonly state: unknown;
705
+ constructor(options: {
706
+ flowName?: string;
707
+ flow_name?: string;
708
+ result: unknown;
709
+ state: unknown;
710
+ });
711
+ }
712
+ export declare class FlowFailedEvent extends BaseEvent {
713
+ readonly flowName: string;
714
+ readonly flow_name: string;
715
+ readonly error: string;
716
+ readonly state: unknown;
717
+ constructor(options: {
718
+ flowName?: string;
719
+ flow_name?: string;
720
+ error: unknown;
721
+ state: unknown;
722
+ });
723
+ }
724
+ export declare class FlowPausedEvent extends BaseEvent {
725
+ readonly flowName: string;
726
+ readonly flow_name: string;
727
+ readonly flowId: string | null;
728
+ readonly flow_id: string | null;
729
+ readonly methodName: string | null;
730
+ readonly method_name: string | null;
731
+ readonly pending: unknown;
732
+ readonly state: unknown;
733
+ readonly message: string | null;
734
+ readonly emit: readonly string[] | null;
735
+ constructor(options: {
736
+ flowName?: string;
737
+ flow_name?: string;
738
+ flowId?: string | null;
739
+ flow_id?: string | null;
740
+ methodName?: string | null;
741
+ method_name?: string | null;
742
+ pending?: unknown;
743
+ state: unknown;
744
+ message?: string | null;
745
+ emit?: readonly string[] | null;
746
+ });
747
+ }
748
+ export declare class FlowPlotEvent extends BaseEvent {
749
+ readonly flowName: string;
750
+ readonly flow_name: string;
751
+ constructor(options: {
752
+ flowName?: string;
753
+ flow_name?: string;
754
+ });
755
+ }
756
+ export declare class FlowInputRequestedEvent extends BaseEvent {
757
+ readonly flowName: string;
758
+ readonly flow_name: string;
759
+ readonly methodName: string | null;
760
+ readonly method_name: string | null;
761
+ readonly message: string;
762
+ readonly metadata: Record<string, unknown> | null;
763
+ constructor(options: {
764
+ flowName?: string;
765
+ flow_name?: string;
766
+ methodName?: string | null;
767
+ method_name?: string | null;
768
+ message: string;
769
+ metadata?: Record<string, unknown> | null;
770
+ });
771
+ }
772
+ export declare class FlowInputReceivedEvent extends BaseEvent {
773
+ readonly flowName: string;
774
+ readonly flow_name: string;
775
+ readonly methodName: string | null;
776
+ readonly method_name: string | null;
777
+ readonly message: string;
778
+ readonly response: string | null;
779
+ readonly metadata: Record<string, unknown> | null;
780
+ readonly responseMetadata: Record<string, unknown> | null;
781
+ readonly response_metadata: Record<string, unknown> | null;
782
+ constructor(options: {
783
+ flowName?: string;
784
+ flow_name?: string;
785
+ methodName?: string | null;
786
+ method_name?: string | null;
787
+ message: string;
788
+ response: string | null;
789
+ metadata?: Record<string, unknown> | null;
790
+ responseMetadata?: Record<string, unknown> | null;
791
+ response_metadata?: Record<string, unknown> | null;
792
+ });
793
+ }
794
+ export declare class MethodExecutionStartedEvent extends BaseEvent {
795
+ readonly flowName: string;
796
+ readonly flow_name: string;
797
+ readonly methodName: string;
798
+ readonly method_name: string;
799
+ readonly state: unknown;
800
+ readonly params: Record<string, unknown> | null;
801
+ constructor(options: {
802
+ flowName?: string;
803
+ flow_name?: string;
804
+ methodName?: string;
805
+ method_name?: string;
806
+ state: unknown;
807
+ params?: Record<string, unknown> | null;
808
+ });
809
+ }
810
+ export declare class MethodExecutionFinishedEvent extends BaseEvent {
811
+ readonly flowName: string;
812
+ readonly flow_name: string;
813
+ readonly methodName: string;
814
+ readonly method_name: string;
815
+ readonly result: unknown;
816
+ readonly state: unknown;
817
+ constructor(options: {
818
+ flowName?: string;
819
+ flow_name?: string;
820
+ methodName?: string;
821
+ method_name?: string;
822
+ result: unknown;
823
+ state: unknown;
824
+ });
825
+ }
826
+ export declare class MethodExecutionFailedEvent extends BaseEvent {
827
+ readonly flowName: string;
828
+ readonly flow_name: string;
829
+ readonly methodName: string;
830
+ readonly method_name: string;
831
+ readonly error: string;
832
+ readonly state: unknown;
833
+ constructor(options: {
834
+ flowName?: string;
835
+ flow_name?: string;
836
+ methodName?: string;
837
+ method_name?: string;
838
+ error: unknown;
839
+ state: unknown;
840
+ });
841
+ }
842
+ export declare class MethodExecutionPausedEvent extends BaseEvent {
843
+ readonly flowName: string;
844
+ readonly flow_name: string;
845
+ readonly methodName: string;
846
+ readonly method_name: string;
847
+ readonly flowId: string | null;
848
+ readonly flow_id: string | null;
849
+ readonly pending: unknown;
850
+ readonly state: unknown;
851
+ readonly message: string | null;
852
+ readonly emit: readonly string[] | null;
853
+ constructor(options: {
854
+ flowName?: string;
855
+ flow_name?: string;
856
+ methodName?: string;
857
+ method_name?: string;
858
+ flowId?: string | null;
859
+ flow_id?: string | null;
860
+ pending?: unknown;
861
+ state: unknown;
862
+ message?: string | null;
863
+ emit?: readonly string[] | null;
864
+ });
865
+ }
866
+ export declare abstract class CheckpointBaseEvent extends BaseEvent {
867
+ readonly location: string;
868
+ readonly provider: string;
869
+ readonly trigger: string | null;
870
+ readonly branch: string | null;
871
+ readonly parent_id: string | null;
872
+ constructor(type: EventType, options: {
873
+ location: string;
874
+ provider: string;
875
+ trigger?: string | null;
876
+ branch?: string | null;
877
+ parent_id?: string | null;
878
+ });
879
+ }
880
+ export declare class CheckpointStartedEvent extends CheckpointBaseEvent {
881
+ constructor(options: {
882
+ location: string;
883
+ provider: string;
884
+ trigger?: string | null;
885
+ branch?: string | null;
886
+ parent_id?: string | null;
887
+ });
888
+ }
889
+ export declare class CheckpointCompletedEvent extends CheckpointBaseEvent {
890
+ readonly checkpoint_id: string;
891
+ readonly duration_ms: number;
892
+ constructor(options: {
893
+ location: string;
894
+ provider: string;
895
+ checkpoint_id: string;
896
+ duration_ms: number;
897
+ trigger?: string | null;
898
+ branch?: string | null;
899
+ parent_id?: string | null;
900
+ });
901
+ }
902
+ export declare class CheckpointFailedEvent extends CheckpointBaseEvent {
903
+ readonly error: string;
904
+ constructor(options: {
905
+ location: string;
906
+ provider: string;
907
+ error: unknown;
908
+ trigger?: string | null;
909
+ branch?: string | null;
910
+ parent_id?: string | null;
911
+ });
912
+ }
913
+ export declare class CheckpointPrunedEvent extends CheckpointBaseEvent {
914
+ readonly removed_count: number;
915
+ readonly max_checkpoints: number;
916
+ constructor(options: {
917
+ location: string;
918
+ provider: string;
919
+ removed_count: number;
920
+ max_checkpoints: number;
921
+ trigger?: string | null;
922
+ branch?: string | null;
923
+ parent_id?: string | null;
924
+ });
925
+ }
926
+ export declare abstract class CheckpointForkBaseEvent extends BaseEvent {
927
+ readonly branch: string;
928
+ readonly parent_branch: string | null;
929
+ readonly parent_checkpoint_id: string | null;
930
+ constructor(type: EventType, options: {
931
+ branch: string;
932
+ parent_branch?: string | null;
933
+ parent_checkpoint_id?: string | null;
934
+ });
935
+ }
936
+ export declare class CheckpointForkStartedEvent extends CheckpointForkBaseEvent {
937
+ constructor(options: {
938
+ branch: string;
939
+ parent_branch?: string | null;
940
+ parent_checkpoint_id?: string | null;
941
+ });
942
+ }
943
+ export declare class CheckpointForkCompletedEvent extends CheckpointForkBaseEvent {
944
+ constructor(options: {
945
+ branch: string;
946
+ parent_branch?: string | null;
947
+ parent_checkpoint_id?: string | null;
948
+ });
949
+ }
950
+ export declare abstract class CheckpointRestoreBaseEvent extends BaseEvent {
951
+ readonly location: string;
952
+ readonly provider: string | null;
953
+ constructor(type: EventType, options: {
954
+ location: string;
955
+ provider?: string | null;
956
+ });
957
+ }
958
+ export declare class CheckpointRestoreStartedEvent extends CheckpointRestoreBaseEvent {
959
+ constructor(options: {
960
+ location: string;
961
+ provider?: string | null;
962
+ });
963
+ }
964
+ export declare class CheckpointRestoreCompletedEvent extends CheckpointRestoreBaseEvent {
965
+ readonly checkpoint_id: string;
966
+ readonly branch: string | null;
967
+ readonly parent_id: string | null;
968
+ readonly duration_ms: number;
969
+ constructor(options: {
970
+ location: string;
971
+ checkpoint_id: string;
972
+ duration_ms: number;
973
+ provider?: string | null;
974
+ branch?: string | null;
975
+ parent_id?: string | null;
976
+ });
977
+ }
978
+ export declare class CheckpointRestoreFailedEvent extends CheckpointRestoreBaseEvent {
979
+ readonly error: string;
980
+ constructor(options: {
981
+ location: string;
982
+ error: unknown;
983
+ provider?: string | null;
984
+ });
985
+ }
986
+ export type ObservationCommonEventOptions = {
987
+ agent_role: string;
988
+ step_number: number;
989
+ step_description?: string;
990
+ from_task?: unknown;
991
+ from_agent?: unknown;
992
+ };
993
+ export declare abstract class ObservationEvent extends BaseEvent {
994
+ readonly agent_role: string;
995
+ readonly step_number: number;
996
+ readonly step_description: string;
997
+ readonly from_task: unknown;
998
+ readonly from_agent: unknown;
999
+ readonly task_id: string | null;
1000
+ readonly task_name: string | null;
1001
+ readonly agent_id: string | null;
1002
+ constructor(type: EventType, options: ObservationCommonEventOptions);
1003
+ }
1004
+ export declare class StepObservationStartedEvent extends ObservationEvent {
1005
+ constructor(options: ObservationCommonEventOptions);
1006
+ }
1007
+ export declare class StepObservationCompletedEvent extends ObservationEvent {
1008
+ readonly step_completed_successfully: boolean;
1009
+ readonly key_information_learned: string;
1010
+ readonly remaining_plan_still_valid: boolean;
1011
+ readonly needs_full_replan: boolean;
1012
+ readonly replan_reason: string | null;
1013
+ readonly goal_already_achieved: boolean;
1014
+ readonly suggested_refinements: readonly string[] | null;
1015
+ constructor(options: ObservationCommonEventOptions & {
1016
+ step_completed_successfully?: boolean;
1017
+ key_information_learned?: string;
1018
+ remaining_plan_still_valid?: boolean;
1019
+ needs_full_replan?: boolean;
1020
+ replan_reason?: string | null;
1021
+ goal_already_achieved?: boolean;
1022
+ suggested_refinements?: readonly string[] | null;
1023
+ });
1024
+ }
1025
+ export declare class StepObservationFailedEvent extends ObservationEvent {
1026
+ readonly error: string;
1027
+ constructor(options: ObservationCommonEventOptions & {
1028
+ error?: unknown;
1029
+ });
1030
+ }
1031
+ export declare class PlanRefinementEvent extends ObservationEvent {
1032
+ readonly refined_step_count: number;
1033
+ readonly refinements: readonly string[] | null;
1034
+ constructor(options: ObservationCommonEventOptions & {
1035
+ refined_step_count?: number;
1036
+ refinements?: readonly string[] | null;
1037
+ });
1038
+ }
1039
+ export declare class PlanReplanTriggeredEvent extends ObservationEvent {
1040
+ readonly replan_reason: string;
1041
+ readonly replan_count: number;
1042
+ readonly completed_steps_preserved: number;
1043
+ constructor(options: ObservationCommonEventOptions & {
1044
+ replan_reason?: string;
1045
+ replan_count?: number;
1046
+ completed_steps_preserved?: number;
1047
+ });
1048
+ }
1049
+ export declare class GoalAchievedEarlyEvent extends ObservationEvent {
1050
+ readonly steps_remaining: number;
1051
+ readonly steps_completed: number;
1052
+ constructor(options: ObservationCommonEventOptions & {
1053
+ steps_remaining?: number;
1054
+ steps_completed?: number;
1055
+ });
1056
+ }
1057
+ export declare const SignalType: {
1058
+ readonly SIGTERM: 15;
1059
+ readonly SIGINT: 2;
1060
+ readonly SIGHUP: 1;
1061
+ readonly SIGTSTP: 20;
1062
+ readonly SIGCONT: 18;
1063
+ };
1064
+ export type SignalType = typeof SignalType[keyof typeof SignalType];
1065
+ export declare abstract class SignalEventBase extends BaseEvent {
1066
+ readonly signal_number: SignalType;
1067
+ readonly reason: string | null;
1068
+ constructor(type: EventType, signalNumber: SignalType, reason?: string | null);
1069
+ modelDump(): Record<string, unknown>;
1070
+ model_dump(): Record<string, unknown>;
1071
+ }
1072
+ export declare class SigTermEvent extends SignalEventBase {
1073
+ constructor(options?: {
1074
+ reason?: string | null;
1075
+ });
1076
+ }
1077
+ export declare class SigIntEvent extends SignalEventBase {
1078
+ constructor(options?: {
1079
+ reason?: string | null;
1080
+ });
1081
+ }
1082
+ export declare class SigHupEvent extends SignalEventBase {
1083
+ constructor(options?: {
1084
+ reason?: string | null;
1085
+ });
1086
+ }
1087
+ export declare class SigTStpEvent extends SignalEventBase {
1088
+ constructor(options?: {
1089
+ reason?: string | null;
1090
+ });
1091
+ }
1092
+ export declare class SigContEvent extends SignalEventBase {
1093
+ constructor(options?: {
1094
+ reason?: string | null;
1095
+ });
1096
+ }
1097
+ export type SignalEvent = SigTermEvent | SigIntEvent | SigHupEvent | SigTStpEvent | SigContEvent;
1098
+ export declare const SignalEvent: Readonly<{
1099
+ kind: "SignalEvent";
1100
+ }>;
1101
+ export declare const SIGNAL_EVENT_TYPES: readonly [typeof SigTermEvent, typeof SigIntEvent, typeof SigHupEvent, typeof SigTStpEvent, typeof SigContEvent];
1102
+ declare function validateSignalEventPayload(data: unknown): SignalEvent;
1103
+ export declare const signal_event_adapter: Readonly<{
1104
+ validatePython: typeof validateSignalEventPayload;
1105
+ validate_python: typeof validateSignalEventPayload;
1106
+ }>;
1107
+ export declare function on_signal<THandler extends EventHandler<SignalEvent>>(handler: THandler): THandler;
1108
+ export declare class AgentLogsStartedEvent extends BaseEvent {
1109
+ readonly agent_role: string;
1110
+ readonly task_description: string | null;
1111
+ readonly verbose: boolean;
1112
+ constructor(options: {
1113
+ agent_role: string;
1114
+ task_description?: string | null;
1115
+ verbose?: boolean;
1116
+ });
1117
+ }
1118
+ export declare class AgentLogsExecutionEvent extends BaseEvent {
1119
+ readonly agent_role: string;
1120
+ readonly formatted_answer: unknown;
1121
+ readonly verbose: boolean;
1122
+ constructor(options: {
1123
+ agent_role: string;
1124
+ formatted_answer: unknown;
1125
+ verbose?: boolean;
1126
+ });
1127
+ }
1128
+ export type A2AEventMetadata = Record<string, unknown>;
1129
+ export type A2AAgentCardMetadata = Record<string, unknown>;
1130
+ export type A2ACommonEventOptions = {
1131
+ fromTask?: unknown;
1132
+ from_task?: unknown;
1133
+ fromAgent?: unknown;
1134
+ from_agent?: unknown;
1135
+ sourceType?: string | null;
1136
+ source_type?: string | null;
1137
+ sourceFingerprint?: string | null;
1138
+ source_fingerprint?: string | null;
1139
+ };
1140
+ export declare abstract class A2AEventBase extends BaseEvent {
1141
+ readonly fromTask: unknown;
1142
+ readonly from_task: unknown;
1143
+ readonly fromAgent: unknown;
1144
+ readonly from_agent: unknown;
1145
+ readonly taskId: string | null;
1146
+ readonly task_id: string | null;
1147
+ readonly taskName: string | null;
1148
+ readonly task_name: string | null;
1149
+ readonly agentId: string | null;
1150
+ readonly agent_id: string | null;
1151
+ readonly agentRole: string | null;
1152
+ readonly agent_role: string | null;
1153
+ readonly fingerprintMetadata: A2AEventMetadata | null;
1154
+ readonly fingerprint_metadata: A2AEventMetadata | null;
1155
+ static extractTaskAndAgentMetadata<T extends Record<string, unknown>>(data: T): T & Record<string, unknown>;
1156
+ static extract_task_and_agent_metadata(data: Record<string, unknown>): Record<string, unknown>;
1157
+ constructor(type: EventType, options?: A2ACommonEventOptions);
1158
+ }
1159
+ export declare class A2ADelegationStartedEvent extends A2AEventBase {
1160
+ readonly endpoint: string;
1161
+ readonly task_description: string;
1162
+ readonly agent_id: string;
1163
+ readonly context_id: string | null;
1164
+ readonly is_multiturn: boolean;
1165
+ readonly turn_number: number;
1166
+ readonly a2a_agent_name: string | null;
1167
+ readonly agent_card: A2AAgentCardMetadata | null;
1168
+ readonly protocol_version: string | null;
1169
+ readonly provider: A2AEventMetadata | null;
1170
+ readonly skill_id: string | null;
1171
+ readonly metadata: A2AEventMetadata | null;
1172
+ readonly extensions: readonly string[] | null;
1173
+ constructor(options: A2ACommonEventOptions & {
1174
+ endpoint: string;
1175
+ task_description: string;
1176
+ agent_id?: string;
1177
+ context_id?: string | null;
1178
+ is_multiturn?: boolean;
1179
+ turn_number?: number;
1180
+ a2a_agent_name?: string | null;
1181
+ agent_card?: A2AAgentCardMetadata | null;
1182
+ protocol_version?: string | null;
1183
+ provider?: A2AEventMetadata | null;
1184
+ skill_id?: string | null;
1185
+ metadata?: A2AEventMetadata | null;
1186
+ extensions?: readonly string[] | null;
1187
+ });
1188
+ }
1189
+ export declare class A2ADelegationCompletedEvent extends A2AEventBase {
1190
+ readonly status: string;
1191
+ readonly result: string | null;
1192
+ readonly error: string | null;
1193
+ readonly context_id: string | null;
1194
+ readonly is_multiturn: boolean;
1195
+ readonly endpoint: string | null;
1196
+ readonly a2a_agent_name: string | null;
1197
+ readonly agent_card: A2AAgentCardMetadata | null;
1198
+ readonly provider: A2AEventMetadata | null;
1199
+ readonly metadata: A2AEventMetadata | null;
1200
+ readonly extensions: readonly string[] | null;
1201
+ constructor(options: A2ACommonEventOptions & {
1202
+ status: string;
1203
+ result?: string | null;
1204
+ error?: string | null;
1205
+ context_id?: string | null;
1206
+ is_multiturn?: boolean;
1207
+ endpoint?: string | null;
1208
+ a2a_agent_name?: string | null;
1209
+ agent_card?: A2AAgentCardMetadata | null;
1210
+ provider?: A2AEventMetadata | null;
1211
+ metadata?: A2AEventMetadata | null;
1212
+ extensions?: readonly string[] | null;
1213
+ });
1214
+ }
1215
+ export declare class A2AConversationStartedEvent extends A2AEventBase {
1216
+ readonly agent_id: string;
1217
+ readonly endpoint: string;
1218
+ readonly context_id: string | null;
1219
+ readonly a2a_agent_name: string | null;
1220
+ readonly agent_card: A2AAgentCardMetadata | null;
1221
+ readonly protocol_version: string | null;
1222
+ readonly provider: A2AEventMetadata | null;
1223
+ readonly skill_id: string | null;
1224
+ readonly reference_task_ids: readonly string[] | null;
1225
+ readonly metadata: A2AEventMetadata | null;
1226
+ readonly extensions: readonly string[] | null;
1227
+ constructor(options: A2ACommonEventOptions & {
1228
+ agent_id?: string;
1229
+ endpoint: string;
1230
+ context_id?: string | null;
1231
+ a2a_agent_name?: string | null;
1232
+ agent_card?: A2AAgentCardMetadata | null;
1233
+ protocol_version?: string | null;
1234
+ provider?: A2AEventMetadata | null;
1235
+ skill_id?: string | null;
1236
+ reference_task_ids?: readonly string[] | null;
1237
+ metadata?: A2AEventMetadata | null;
1238
+ extensions?: readonly string[] | null;
1239
+ });
1240
+ }
1241
+ export declare class A2AMessageSentEvent extends A2AEventBase {
1242
+ readonly message: string;
1243
+ readonly turn_number: number;
1244
+ readonly context_id: string | null;
1245
+ readonly message_id: string | null;
1246
+ readonly is_multiturn: boolean;
1247
+ readonly agent_role: string | null;
1248
+ readonly endpoint: string | null;
1249
+ readonly a2a_agent_name: string | null;
1250
+ readonly skill_id: string | null;
1251
+ readonly metadata: A2AEventMetadata | null;
1252
+ readonly extensions: readonly string[] | null;
1253
+ constructor(options: A2ACommonEventOptions & {
1254
+ message: string;
1255
+ turn_number: number;
1256
+ context_id?: string | null;
1257
+ message_id?: string | null;
1258
+ is_multiturn?: boolean;
1259
+ agent_role?: string | null;
1260
+ endpoint?: string | null;
1261
+ a2a_agent_name?: string | null;
1262
+ skill_id?: string | null;
1263
+ metadata?: A2AEventMetadata | null;
1264
+ extensions?: readonly string[] | null;
1265
+ });
1266
+ }
1267
+ export declare class A2AResponseReceivedEvent extends A2AEventBase {
1268
+ readonly response: string;
1269
+ readonly turn_number: number;
1270
+ readonly context_id: string | null;
1271
+ readonly message_id: string | null;
1272
+ readonly is_multiturn: boolean;
1273
+ readonly status: string;
1274
+ readonly final: boolean;
1275
+ readonly agent_role: string | null;
1276
+ readonly endpoint: string | null;
1277
+ readonly a2a_agent_name: string | null;
1278
+ readonly metadata: A2AEventMetadata | null;
1279
+ readonly extensions: readonly string[] | null;
1280
+ constructor(options: A2ACommonEventOptions & {
1281
+ response: string;
1282
+ turn_number: number;
1283
+ status: string;
1284
+ context_id?: string | null;
1285
+ message_id?: string | null;
1286
+ is_multiturn?: boolean;
1287
+ final?: boolean;
1288
+ agent_role?: string | null;
1289
+ endpoint?: string | null;
1290
+ a2a_agent_name?: string | null;
1291
+ metadata?: A2AEventMetadata | null;
1292
+ extensions?: readonly string[] | null;
1293
+ });
1294
+ }
1295
+ export declare class A2AConversationCompletedEvent extends A2AEventBase {
1296
+ readonly status: "completed" | "failed";
1297
+ readonly final_result: string | null;
1298
+ readonly error: string | null;
1299
+ readonly context_id: string | null;
1300
+ readonly total_turns: number;
1301
+ readonly endpoint: string | null;
1302
+ readonly a2a_agent_name: string | null;
1303
+ readonly agent_card: A2AAgentCardMetadata | null;
1304
+ readonly reference_task_ids: readonly string[] | null;
1305
+ readonly metadata: A2AEventMetadata | null;
1306
+ readonly extensions: readonly string[] | null;
1307
+ constructor(options: A2ACommonEventOptions & {
1308
+ status: "completed" | "failed";
1309
+ total_turns: number;
1310
+ final_result?: string | null;
1311
+ error?: string | null;
1312
+ context_id?: string | null;
1313
+ endpoint?: string | null;
1314
+ a2a_agent_name?: string | null;
1315
+ agent_card?: A2AAgentCardMetadata | null;
1316
+ reference_task_ids?: readonly string[] | null;
1317
+ metadata?: A2AEventMetadata | null;
1318
+ extensions?: readonly string[] | null;
1319
+ });
1320
+ }
1321
+ export declare class A2APollingStartedEvent extends A2AEventBase {
1322
+ readonly task_id: string;
1323
+ readonly context_id: string | null;
1324
+ readonly polling_interval: number;
1325
+ readonly endpoint: string;
1326
+ readonly a2a_agent_name: string | null;
1327
+ readonly metadata: A2AEventMetadata | null;
1328
+ constructor(options: A2ACommonEventOptions & {
1329
+ task_id?: string;
1330
+ context_id?: string | null;
1331
+ polling_interval: number;
1332
+ endpoint: string;
1333
+ a2a_agent_name?: string | null;
1334
+ metadata?: A2AEventMetadata | null;
1335
+ });
1336
+ }
1337
+ export declare class A2APollingStatusEvent extends A2AEventBase {
1338
+ readonly task_id: string;
1339
+ readonly context_id: string | null;
1340
+ readonly state: string;
1341
+ readonly elapsed_seconds: number;
1342
+ readonly poll_count: number;
1343
+ readonly endpoint: string | null;
1344
+ readonly a2a_agent_name: string | null;
1345
+ readonly metadata: A2AEventMetadata | null;
1346
+ constructor(options: A2ACommonEventOptions & {
1347
+ task_id?: string;
1348
+ state: string;
1349
+ elapsed_seconds: number;
1350
+ poll_count: number;
1351
+ context_id?: string | null;
1352
+ endpoint?: string | null;
1353
+ a2a_agent_name?: string | null;
1354
+ metadata?: A2AEventMetadata | null;
1355
+ });
1356
+ }
1357
+ export declare class A2APushNotificationRegisteredEvent extends A2AEventBase {
1358
+ readonly task_id: string;
1359
+ readonly context_id: string | null;
1360
+ readonly callback_url: string;
1361
+ readonly endpoint: string | null;
1362
+ readonly a2a_agent_name: string | null;
1363
+ readonly metadata: A2AEventMetadata | null;
1364
+ constructor(options: A2ACommonEventOptions & {
1365
+ task_id?: string;
1366
+ callback_url: string;
1367
+ context_id?: string | null;
1368
+ endpoint?: string | null;
1369
+ a2a_agent_name?: string | null;
1370
+ metadata?: A2AEventMetadata | null;
1371
+ });
1372
+ }
1373
+ export declare class A2APushNotificationReceivedEvent extends A2AEventBase {
1374
+ readonly task_id: string;
1375
+ readonly context_id: string | null;
1376
+ readonly state: string;
1377
+ readonly endpoint: string | null;
1378
+ readonly a2a_agent_name: string | null;
1379
+ readonly metadata: A2AEventMetadata | null;
1380
+ constructor(options: A2ACommonEventOptions & {
1381
+ task_id?: string;
1382
+ state: string;
1383
+ context_id?: string | null;
1384
+ endpoint?: string | null;
1385
+ a2a_agent_name?: string | null;
1386
+ metadata?: A2AEventMetadata | null;
1387
+ });
1388
+ }
1389
+ export declare class A2APushNotificationSentEvent extends A2AEventBase {
1390
+ readonly task_id: string;
1391
+ readonly context_id: string | null;
1392
+ readonly callback_url: string;
1393
+ readonly state: string;
1394
+ readonly success: boolean;
1395
+ readonly error: string | null;
1396
+ readonly metadata: A2AEventMetadata | null;
1397
+ constructor(options: A2ACommonEventOptions & {
1398
+ task_id?: string;
1399
+ callback_url: string;
1400
+ state: string;
1401
+ context_id?: string | null;
1402
+ success?: boolean;
1403
+ error?: string | null;
1404
+ metadata?: A2AEventMetadata | null;
1405
+ });
1406
+ }
1407
+ export declare class A2APushNotificationTimeoutEvent extends A2AEventBase {
1408
+ readonly task_id: string;
1409
+ readonly context_id: string | null;
1410
+ readonly timeout_seconds: number;
1411
+ readonly endpoint: string | null;
1412
+ readonly a2a_agent_name: string | null;
1413
+ readonly metadata: A2AEventMetadata | null;
1414
+ constructor(options: A2ACommonEventOptions & {
1415
+ task_id?: string;
1416
+ timeout_seconds: number;
1417
+ context_id?: string | null;
1418
+ endpoint?: string | null;
1419
+ a2a_agent_name?: string | null;
1420
+ metadata?: A2AEventMetadata | null;
1421
+ });
1422
+ }
1423
+ export declare class A2AStreamingStartedEvent extends A2AEventBase {
1424
+ readonly task_id: string | null;
1425
+ readonly context_id: string | null;
1426
+ readonly endpoint: string;
1427
+ readonly a2a_agent_name: string | null;
1428
+ readonly turn_number: number;
1429
+ readonly is_multiturn: boolean;
1430
+ readonly agent_role: string | null;
1431
+ readonly metadata: A2AEventMetadata | null;
1432
+ readonly extensions: readonly string[] | null;
1433
+ constructor(options: A2ACommonEventOptions & {
1434
+ endpoint: string;
1435
+ task_id?: string | null;
1436
+ context_id?: string | null;
1437
+ a2a_agent_name?: string | null;
1438
+ turn_number?: number;
1439
+ is_multiturn?: boolean;
1440
+ agent_role?: string | null;
1441
+ metadata?: A2AEventMetadata | null;
1442
+ extensions?: readonly string[] | null;
1443
+ });
1444
+ }
1445
+ export declare class A2AStreamingChunkEvent extends A2AEventBase {
1446
+ readonly task_id: string | null;
1447
+ readonly context_id: string | null;
1448
+ readonly chunk: string;
1449
+ readonly chunk_index: number;
1450
+ readonly final: boolean;
1451
+ readonly endpoint: string | null;
1452
+ readonly a2a_agent_name: string | null;
1453
+ readonly turn_number: number;
1454
+ readonly is_multiturn: boolean;
1455
+ readonly metadata: A2AEventMetadata | null;
1456
+ readonly extensions: readonly string[] | null;
1457
+ constructor(options: A2ACommonEventOptions & {
1458
+ chunk: string;
1459
+ chunk_index: number;
1460
+ task_id?: string | null;
1461
+ context_id?: string | null;
1462
+ final?: boolean;
1463
+ endpoint?: string | null;
1464
+ a2a_agent_name?: string | null;
1465
+ turn_number?: number;
1466
+ is_multiturn?: boolean;
1467
+ metadata?: A2AEventMetadata | null;
1468
+ extensions?: readonly string[] | null;
1469
+ });
1470
+ }
1471
+ export declare class A2AAgentCardFetchedEvent extends A2AEventBase {
1472
+ readonly endpoint: string;
1473
+ readonly a2a_agent_name: string | null;
1474
+ readonly agent_card: A2AAgentCardMetadata | null;
1475
+ readonly protocol_version: string | null;
1476
+ readonly provider: A2AEventMetadata | null;
1477
+ readonly cached: boolean;
1478
+ readonly fetch_time_ms: number | null;
1479
+ readonly metadata: A2AEventMetadata | null;
1480
+ constructor(options: A2ACommonEventOptions & {
1481
+ endpoint: string;
1482
+ a2a_agent_name?: string | null;
1483
+ agent_card?: A2AAgentCardMetadata | null;
1484
+ protocol_version?: string | null;
1485
+ provider?: A2AEventMetadata | null;
1486
+ cached?: boolean;
1487
+ fetch_time_ms?: number | null;
1488
+ metadata?: A2AEventMetadata | null;
1489
+ });
1490
+ }
1491
+ export declare class A2AAuthenticationFailedEvent extends A2AEventBase {
1492
+ readonly endpoint: string;
1493
+ readonly auth_type: string | null;
1494
+ readonly error: string;
1495
+ readonly status_code: number | null;
1496
+ readonly a2a_agent_name: string | null;
1497
+ readonly protocol_version: string | null;
1498
+ readonly metadata: A2AEventMetadata | null;
1499
+ constructor(options: A2ACommonEventOptions & {
1500
+ endpoint: string;
1501
+ error: unknown;
1502
+ auth_type?: string | null;
1503
+ status_code?: number | null;
1504
+ a2a_agent_name?: string | null;
1505
+ protocol_version?: string | null;
1506
+ metadata?: A2AEventMetadata | null;
1507
+ });
1508
+ }
1509
+ export declare class A2AArtifactReceivedEvent extends A2AEventBase {
1510
+ readonly task_id: string;
1511
+ readonly artifact_id: string;
1512
+ readonly artifact_name: string | null;
1513
+ readonly artifact_description: string | null;
1514
+ readonly mime_type: string | null;
1515
+ readonly size_bytes: number | null;
1516
+ readonly append: boolean;
1517
+ readonly last_chunk: boolean;
1518
+ readonly endpoint: string | null;
1519
+ readonly a2a_agent_name: string | null;
1520
+ readonly context_id: string | null;
1521
+ readonly turn_number: number;
1522
+ readonly is_multiturn: boolean;
1523
+ readonly metadata: A2AEventMetadata | null;
1524
+ readonly extensions: readonly string[] | null;
1525
+ constructor(options: A2ACommonEventOptions & {
1526
+ task_id?: string;
1527
+ artifact_id: string;
1528
+ artifact_name?: string | null;
1529
+ artifact_description?: string | null;
1530
+ mime_type?: string | null;
1531
+ size_bytes?: number | null;
1532
+ append?: boolean;
1533
+ last_chunk?: boolean;
1534
+ endpoint?: string | null;
1535
+ a2a_agent_name?: string | null;
1536
+ context_id?: string | null;
1537
+ turn_number?: number;
1538
+ is_multiturn?: boolean;
1539
+ metadata?: A2AEventMetadata | null;
1540
+ extensions?: readonly string[] | null;
1541
+ });
1542
+ }
1543
+ export declare class A2AConnectionErrorEvent extends A2AEventBase {
1544
+ readonly endpoint: string;
1545
+ readonly error: string;
1546
+ readonly error_type: string | null;
1547
+ readonly status_code: number | null;
1548
+ readonly a2a_agent_name: string | null;
1549
+ readonly operation: string | null;
1550
+ readonly context_id: string | null;
1551
+ readonly task_id: string | null;
1552
+ readonly metadata: A2AEventMetadata | null;
1553
+ constructor(options: A2ACommonEventOptions & {
1554
+ endpoint: string;
1555
+ error: unknown;
1556
+ error_type?: string | null;
1557
+ status_code?: number | null;
1558
+ a2a_agent_name?: string | null;
1559
+ operation?: string | null;
1560
+ context_id?: string | null;
1561
+ task_id?: string | null;
1562
+ metadata?: A2AEventMetadata | null;
1563
+ });
1564
+ }
1565
+ export declare class A2AServerTaskStartedEvent extends A2AEventBase {
1566
+ readonly task_id: string;
1567
+ readonly context_id: string;
1568
+ readonly metadata: A2AEventMetadata | null;
1569
+ constructor(options: A2ACommonEventOptions & {
1570
+ task_id?: string;
1571
+ context_id: string;
1572
+ metadata?: A2AEventMetadata | null;
1573
+ });
1574
+ }
1575
+ export declare class A2AServerTaskCompletedEvent extends A2AEventBase {
1576
+ readonly task_id: string;
1577
+ readonly context_id: string;
1578
+ readonly result: string;
1579
+ readonly metadata: A2AEventMetadata | null;
1580
+ constructor(options: A2ACommonEventOptions & {
1581
+ task_id?: string;
1582
+ context_id: string;
1583
+ result: string;
1584
+ metadata?: A2AEventMetadata | null;
1585
+ });
1586
+ }
1587
+ export declare class A2AServerTaskCanceledEvent extends A2AEventBase {
1588
+ readonly task_id: string;
1589
+ readonly context_id: string;
1590
+ readonly metadata: A2AEventMetadata | null;
1591
+ constructor(options: A2ACommonEventOptions & {
1592
+ task_id?: string;
1593
+ context_id: string;
1594
+ metadata?: A2AEventMetadata | null;
1595
+ });
1596
+ }
1597
+ export declare class A2AServerTaskFailedEvent extends A2AEventBase {
1598
+ readonly task_id: string;
1599
+ readonly context_id: string;
1600
+ readonly error: string;
1601
+ readonly metadata: A2AEventMetadata | null;
1602
+ constructor(options: A2ACommonEventOptions & {
1603
+ task_id?: string;
1604
+ context_id: string;
1605
+ error: unknown;
1606
+ metadata?: A2AEventMetadata | null;
1607
+ });
1608
+ }
1609
+ export declare class A2AParallelDelegationStartedEvent extends A2AEventBase {
1610
+ readonly endpoints: readonly string[];
1611
+ readonly task_description: string;
1612
+ constructor(options: A2ACommonEventOptions & {
1613
+ endpoints: readonly string[];
1614
+ task_description: string;
1615
+ });
1616
+ }
1617
+ export declare class A2AParallelDelegationCompletedEvent extends A2AEventBase {
1618
+ readonly endpoints: readonly string[];
1619
+ readonly success_count: number;
1620
+ readonly failure_count: number;
1621
+ readonly results: Record<string, string> | null;
1622
+ constructor(options: A2ACommonEventOptions & {
1623
+ endpoints: readonly string[];
1624
+ success_count: number;
1625
+ failure_count: number;
1626
+ results?: Record<string, string> | null;
1627
+ });
1628
+ }
1629
+ export declare class A2ATransportNegotiatedEvent extends A2AEventBase {
1630
+ readonly endpoint: string;
1631
+ readonly a2a_agent_name: string | null;
1632
+ readonly negotiated_transport: string;
1633
+ readonly negotiated_url: string;
1634
+ readonly source: string;
1635
+ readonly client_supported_transports: readonly string[];
1636
+ readonly server_supported_transports: readonly string[];
1637
+ readonly server_preferred_transport: string;
1638
+ readonly client_preferred_transport: string | null;
1639
+ readonly metadata: A2AEventMetadata | null;
1640
+ constructor(options: A2ACommonEventOptions & {
1641
+ endpoint: string;
1642
+ negotiated_transport: string;
1643
+ negotiated_url: string;
1644
+ source: string;
1645
+ client_supported_transports: readonly string[];
1646
+ server_supported_transports: readonly string[];
1647
+ server_preferred_transport: string;
1648
+ a2a_agent_name?: string | null;
1649
+ client_preferred_transport?: string | null;
1650
+ metadata?: A2AEventMetadata | null;
1651
+ });
1652
+ }
1653
+ export declare class A2AContentTypeNegotiatedEvent extends A2AEventBase {
1654
+ readonly endpoint: string;
1655
+ readonly a2a_agent_name: string | null;
1656
+ readonly skill_name: string | null;
1657
+ readonly client_input_modes: readonly string[];
1658
+ readonly client_output_modes: readonly string[];
1659
+ readonly server_input_modes: readonly string[];
1660
+ readonly server_output_modes: readonly string[];
1661
+ readonly negotiated_input_modes: readonly string[];
1662
+ readonly negotiated_output_modes: readonly string[];
1663
+ readonly negotiation_success: boolean;
1664
+ readonly metadata: A2AEventMetadata | null;
1665
+ constructor(options: A2ACommonEventOptions & {
1666
+ endpoint: string;
1667
+ client_input_modes: readonly string[];
1668
+ client_output_modes: readonly string[];
1669
+ server_input_modes: readonly string[];
1670
+ server_output_modes: readonly string[];
1671
+ negotiated_input_modes: readonly string[];
1672
+ negotiated_output_modes: readonly string[];
1673
+ a2a_agent_name?: string | null;
1674
+ skill_name?: string | null;
1675
+ negotiation_success?: boolean;
1676
+ metadata?: A2AEventMetadata | null;
1677
+ });
1678
+ }
1679
+ export declare class A2AContextCreatedEvent extends A2AEventBase {
1680
+ readonly context_id: string;
1681
+ readonly created_at: number;
1682
+ readonly metadata: A2AEventMetadata | null;
1683
+ constructor(options: A2ACommonEventOptions & {
1684
+ context_id: string;
1685
+ created_at: number;
1686
+ metadata?: A2AEventMetadata | null;
1687
+ });
1688
+ }
1689
+ export declare class A2AContextExpiredEvent extends A2AEventBase {
1690
+ readonly context_id: string;
1691
+ readonly created_at: number;
1692
+ readonly age_seconds: number;
1693
+ readonly task_count: number;
1694
+ readonly metadata: A2AEventMetadata | null;
1695
+ constructor(options: A2ACommonEventOptions & {
1696
+ context_id: string;
1697
+ created_at: number;
1698
+ age_seconds: number;
1699
+ task_count: number;
1700
+ metadata?: A2AEventMetadata | null;
1701
+ });
1702
+ }
1703
+ export declare class A2AContextIdleEvent extends A2AEventBase {
1704
+ readonly context_id: string;
1705
+ readonly idle_seconds: number;
1706
+ readonly task_count: number;
1707
+ readonly metadata: A2AEventMetadata | null;
1708
+ constructor(options: A2ACommonEventOptions & {
1709
+ context_id: string;
1710
+ idle_seconds: number;
1711
+ task_count: number;
1712
+ metadata?: A2AEventMetadata | null;
1713
+ });
1714
+ }
1715
+ export declare class A2AContextCompletedEvent extends A2AEventBase {
1716
+ readonly context_id: string;
1717
+ readonly total_tasks: number;
1718
+ readonly duration_seconds: number;
1719
+ readonly metadata: A2AEventMetadata | null;
1720
+ constructor(options: A2ACommonEventOptions & {
1721
+ context_id: string;
1722
+ total_tasks: number;
1723
+ duration_seconds: number;
1724
+ metadata?: A2AEventMetadata | null;
1725
+ });
1726
+ }
1727
+ export declare class A2AContextPrunedEvent extends A2AEventBase {
1728
+ readonly context_id: string;
1729
+ readonly task_count: number;
1730
+ readonly age_seconds: number;
1731
+ readonly metadata: A2AEventMetadata | null;
1732
+ constructor(options: A2ACommonEventOptions & {
1733
+ context_id: string;
1734
+ task_count: number;
1735
+ age_seconds: number;
1736
+ metadata?: A2AEventMetadata | null;
1737
+ });
1738
+ }
1739
+ export type MCPCommonEventOptions = {
1740
+ server_name: string;
1741
+ server_url?: string | null;
1742
+ transport_type?: string | null;
1743
+ agent_id?: string | null;
1744
+ agent_role?: string | null;
1745
+ from_agent?: unknown;
1746
+ from_task?: unknown;
1747
+ };
1748
+ export declare abstract class MCPEvent extends BaseEvent {
1749
+ readonly server_name: string;
1750
+ readonly server_url: string | null;
1751
+ readonly transport_type: string | null;
1752
+ readonly agent_id: string | null;
1753
+ readonly agent_role: string | null;
1754
+ readonly from_agent: unknown;
1755
+ readonly from_task: unknown;
1756
+ constructor(type: EventType, options: MCPCommonEventOptions);
1757
+ }
1758
+ export declare class MCPConnectionStartedEvent extends MCPEvent {
1759
+ readonly connect_timeout: number | null;
1760
+ readonly is_reconnect: boolean;
1761
+ constructor(options: MCPCommonEventOptions & {
1762
+ connect_timeout?: number | null;
1763
+ is_reconnect?: boolean;
1764
+ });
1765
+ }
1766
+ export declare class MCPConnectionCompletedEvent extends MCPEvent {
1767
+ readonly started_at: Date | null;
1768
+ readonly completed_at: Date | null;
1769
+ readonly connection_duration_ms: number | null;
1770
+ readonly is_reconnect: boolean;
1771
+ constructor(options: MCPCommonEventOptions & {
1772
+ started_at?: Date | null;
1773
+ completed_at?: Date | null;
1774
+ connection_duration_ms?: number | null;
1775
+ is_reconnect?: boolean;
1776
+ });
1777
+ }
1778
+ export declare class MCPConnectionFailedEvent extends MCPEvent {
1779
+ readonly error: string;
1780
+ readonly error_type: string | null;
1781
+ readonly started_at: Date | null;
1782
+ readonly failed_at: Date | null;
1783
+ constructor(options: MCPCommonEventOptions & {
1784
+ error: unknown;
1785
+ error_type?: string | null;
1786
+ started_at?: Date | null;
1787
+ failed_at?: Date | null;
1788
+ });
1789
+ }
1790
+ export declare class MCPToolExecutionStartedEvent extends MCPEvent {
1791
+ readonly tool_name: string;
1792
+ readonly tool_args: Record<string, unknown> | null;
1793
+ constructor(options: MCPCommonEventOptions & {
1794
+ tool_name: string;
1795
+ tool_args?: Record<string, unknown> | null;
1796
+ });
1797
+ }
1798
+ export declare class MCPToolExecutionCompletedEvent extends MCPEvent {
1799
+ readonly tool_name: string;
1800
+ readonly tool_args: Record<string, unknown> | null;
1801
+ readonly result: unknown;
1802
+ readonly started_at: Date | null;
1803
+ readonly completed_at: Date | null;
1804
+ readonly execution_duration_ms: number | null;
1805
+ constructor(options: MCPCommonEventOptions & {
1806
+ tool_name: string;
1807
+ tool_args?: Record<string, unknown> | null;
1808
+ result?: unknown;
1809
+ started_at?: Date | null;
1810
+ completed_at?: Date | null;
1811
+ execution_duration_ms?: number | null;
1812
+ });
1813
+ }
1814
+ export declare class MCPToolExecutionFailedEvent extends MCPEvent {
1815
+ readonly tool_name: string;
1816
+ readonly tool_args: Record<string, unknown> | null;
1817
+ readonly error: string;
1818
+ readonly error_type: string | null;
1819
+ readonly started_at: Date | null;
1820
+ readonly failed_at: Date | null;
1821
+ constructor(options: MCPCommonEventOptions & {
1822
+ tool_name: string;
1823
+ tool_args?: Record<string, unknown> | null;
1824
+ error: unknown;
1825
+ error_type?: string | null;
1826
+ started_at?: Date | null;
1827
+ failed_at?: Date | null;
1828
+ });
1829
+ }
1830
+ export declare class MCPConfigFetchFailedEvent extends BaseEvent {
1831
+ readonly slug: string;
1832
+ readonly error: string;
1833
+ readonly error_type: string | null;
1834
+ constructor(options: {
1835
+ slug: string;
1836
+ error: unknown;
1837
+ error_type?: string | null;
1838
+ });
1839
+ }
1840
+ export type SkillCommonEventOptions = {
1841
+ skill_name?: string;
1842
+ skill_path?: string | null;
1843
+ from_agent?: unknown;
1844
+ from_task?: unknown;
1845
+ };
1846
+ export declare abstract class SkillEvent extends BaseEvent {
1847
+ readonly skill_name: string;
1848
+ readonly skill_path: string | null;
1849
+ readonly from_agent: unknown;
1850
+ readonly from_task: unknown;
1851
+ constructor(type: EventType, options?: SkillCommonEventOptions);
1852
+ }
1853
+ export declare class SkillDiscoveryStartedEvent extends SkillEvent {
1854
+ readonly search_path: string;
1855
+ constructor(options: SkillCommonEventOptions & {
1856
+ search_path: string;
1857
+ });
1858
+ }
1859
+ export declare class SkillDiscoveryCompletedEvent extends SkillEvent {
1860
+ readonly search_path: string;
1861
+ readonly skills_found: number;
1862
+ readonly skill_names: readonly string[];
1863
+ constructor(options: SkillCommonEventOptions & {
1864
+ search_path: string;
1865
+ skills_found: number;
1866
+ skill_names: readonly string[];
1867
+ });
1868
+ }
1869
+ export declare class SkillLoadedEvent extends SkillEvent {
1870
+ readonly disclosure_level: number;
1871
+ constructor(options?: SkillCommonEventOptions & {
1872
+ disclosure_level?: number;
1873
+ });
1874
+ }
1875
+ export declare class SkillActivatedEvent extends SkillEvent {
1876
+ readonly disclosure_level: number;
1877
+ constructor(options?: SkillCommonEventOptions & {
1878
+ disclosure_level?: number;
1879
+ });
1880
+ }
1881
+ export declare class SkillLoadFailedEvent extends SkillEvent {
1882
+ readonly error: string;
1883
+ constructor(options: SkillCommonEventOptions & {
1884
+ error: unknown;
1885
+ });
1886
+ }
1887
+ export declare class SkillDownloadStartedEvent extends SkillEvent {
1888
+ readonly registry_ref: string;
1889
+ readonly version: string | null;
1890
+ constructor(options: SkillCommonEventOptions & {
1891
+ registry_ref: string;
1892
+ version?: string | null;
1893
+ });
1894
+ }
1895
+ export declare class SkillDownloadCompletedEvent extends SkillEvent {
1896
+ readonly registry_ref: string;
1897
+ readonly version: string | null;
1898
+ readonly cache_path: string | null;
1899
+ constructor(options: SkillCommonEventOptions & {
1900
+ registry_ref: string;
1901
+ version?: string | null;
1902
+ cache_path?: string | null;
1903
+ });
1904
+ }
1905
+ export declare const LLMCallType: {
1906
+ readonly TOOL_CALL: "tool_call";
1907
+ readonly LLM_CALL: "llm_call";
1908
+ };
1909
+ export type LLMCallType = typeof LLMCallType[keyof typeof LLMCallType];
1910
+ export type LLMEventMessage = string | readonly Record<string, unknown>[];
1911
+ export type LLMFunctionCall = {
1912
+ arguments: string;
1913
+ name?: string | null;
1914
+ };
1915
+ export declare class ToolCall {
1916
+ readonly id: string | null;
1917
+ readonly function: LLMFunctionCall;
1918
+ readonly type: string | null;
1919
+ readonly index: number;
1920
+ constructor(options: LLMToolCall);
1921
+ }
1922
+ export type LLMToolCall = {
1923
+ id?: string | null;
1924
+ function: LLMFunctionCall;
1925
+ type?: string | null;
1926
+ index: number;
1927
+ };
1928
+ export type LLMCommonEventOptions = {
1929
+ from_task?: unknown;
1930
+ from_agent?: unknown;
1931
+ model?: string | null;
1932
+ call_id: string;
1933
+ };
1934
+ export declare abstract class LLMEventBase extends BaseEvent {
1935
+ readonly from_task: unknown;
1936
+ readonly from_agent: unknown;
1937
+ readonly model: string | null;
1938
+ readonly call_id: string;
1939
+ readonly task_id: string | null;
1940
+ readonly task_name: string | null;
1941
+ readonly agent_id: string | null;
1942
+ readonly agent_role: string | null;
1943
+ constructor(type: EventType, options: LLMCommonEventOptions);
1944
+ }
1945
+ export declare class LLMCallStartedEvent extends LLMEventBase {
1946
+ readonly messages: LLMEventMessage | null;
1947
+ readonly tools: readonly Record<string, unknown>[] | null;
1948
+ readonly callbacks: readonly unknown[] | null;
1949
+ readonly available_functions: Record<string, unknown> | null;
1950
+ constructor(options: LLMCommonEventOptions & {
1951
+ messages?: LLMEventMessage | null;
1952
+ tools?: readonly Record<string, unknown>[] | null;
1953
+ callbacks?: readonly unknown[] | null;
1954
+ available_functions?: Record<string, unknown> | null;
1955
+ });
1956
+ }
1957
+ export declare class LLMCallCompletedEvent extends LLMEventBase {
1958
+ readonly messages: LLMEventMessage | null;
1959
+ readonly response: unknown;
1960
+ readonly call_type: LLMCallType;
1961
+ readonly usage: Record<string, unknown> | null;
1962
+ constructor(options: LLMCommonEventOptions & {
1963
+ response: unknown;
1964
+ call_type: LLMCallType;
1965
+ messages?: LLMEventMessage | null;
1966
+ usage?: Record<string, unknown> | null;
1967
+ });
1968
+ }
1969
+ export declare class LLMCallFailedEvent extends LLMEventBase {
1970
+ readonly error: string;
1971
+ constructor(options: LLMCommonEventOptions & {
1972
+ error: unknown;
1973
+ });
1974
+ }
1975
+ export declare class LLMStreamChunkEvent extends LLMEventBase {
1976
+ readonly chunk: string;
1977
+ readonly tool_call: LLMToolCall | null;
1978
+ readonly call_type: LLMCallType | null;
1979
+ readonly response_id: string | null;
1980
+ constructor(options: LLMCommonEventOptions & {
1981
+ chunk: string;
1982
+ tool_call?: LLMToolCall | null;
1983
+ call_type?: LLMCallType | null;
1984
+ response_id?: string | null;
1985
+ });
1986
+ }
1987
+ export declare class LLMThinkingChunkEvent extends LLMEventBase {
1988
+ readonly chunk: string;
1989
+ readonly response_id: string | null;
1990
+ constructor(options: LLMCommonEventOptions & {
1991
+ chunk: string;
1992
+ response_id?: string | null;
1993
+ });
1994
+ }
1995
+ export type LLMGuardrailCommonEventOptions = {
1996
+ task_id?: string | null;
1997
+ task_name?: string | null;
1998
+ from_task?: unknown;
1999
+ from_agent?: unknown;
2000
+ agent_role?: string | null;
2001
+ agent_id?: string | null;
2002
+ guardrail_type?: string | null;
2003
+ guardrail_name?: string | null;
2004
+ };
2005
+ export declare abstract class LLMGuardrailBaseEvent extends BaseEvent {
2006
+ readonly task_id: string | null;
2007
+ readonly task_name: string | null;
2008
+ readonly from_task: unknown;
2009
+ readonly from_agent: unknown;
2010
+ readonly agent_role: string | null;
2011
+ readonly agent_id: string | null;
2012
+ guardrail_type: string | null;
2013
+ guardrail_name: string | null;
2014
+ constructor(type: EventType, options?: LLMGuardrailCommonEventOptions);
2015
+ }
2016
+ type LLMGuardrailCallable = (...args: never[]) => unknown;
2017
+ export declare class LLMGuardrailStartedEvent extends LLMGuardrailBaseEvent {
2018
+ guardrail: string | LLMGuardrailCallable;
2019
+ readonly retry_count: number;
2020
+ constructor(options: LLMGuardrailCommonEventOptions & {
2021
+ guardrail: string | LLMGuardrailCallable;
2022
+ retry_count: number;
2023
+ });
2024
+ }
2025
+ export declare class LLMGuardrailCompletedEvent extends LLMGuardrailBaseEvent {
2026
+ readonly success: boolean;
2027
+ readonly result: unknown;
2028
+ readonly error: string | null;
2029
+ readonly retry_count: number;
2030
+ constructor(options: LLMGuardrailCommonEventOptions & {
2031
+ success: boolean;
2032
+ result: unknown;
2033
+ error?: unknown;
2034
+ retry_count: number;
2035
+ });
2036
+ }
2037
+ export type KnowledgeCommonEventOptions = {
2038
+ task_id?: string | null;
2039
+ task_name?: string | null;
2040
+ from_task?: unknown;
2041
+ from_agent?: unknown;
2042
+ agent_role?: string | null;
2043
+ agent_id?: string | null;
2044
+ };
2045
+ export declare abstract class KnowledgeEventBase extends BaseEvent {
2046
+ readonly task_id: string | null;
2047
+ readonly task_name: string | null;
2048
+ readonly from_task: unknown;
2049
+ readonly from_agent: unknown;
2050
+ readonly agent_role: string | null;
2051
+ readonly agent_id: string | null;
2052
+ constructor(type: EventType, options?: KnowledgeCommonEventOptions);
2053
+ }
2054
+ export declare class KnowledgeRetrievalStartedEvent extends KnowledgeEventBase {
2055
+ constructor(options?: KnowledgeCommonEventOptions);
2056
+ }
2057
+ export declare class KnowledgeRetrievalCompletedEvent extends KnowledgeEventBase {
2058
+ readonly query: string;
2059
+ readonly retrieved_knowledge: string;
2060
+ constructor(options: KnowledgeCommonEventOptions & {
2061
+ query: string;
2062
+ retrieved_knowledge: string;
2063
+ });
2064
+ }
2065
+ export declare class KnowledgeQueryStartedEvent extends KnowledgeEventBase {
2066
+ readonly task_prompt: string;
2067
+ constructor(options: KnowledgeCommonEventOptions & {
2068
+ task_prompt: string;
2069
+ });
2070
+ }
2071
+ export declare class KnowledgeQueryFailedEvent extends KnowledgeEventBase {
2072
+ readonly error: string;
2073
+ constructor(options: KnowledgeCommonEventOptions & {
2074
+ error: unknown;
2075
+ });
2076
+ }
2077
+ export declare class KnowledgeQueryCompletedEvent extends KnowledgeEventBase {
2078
+ readonly query: string;
2079
+ constructor(options: KnowledgeCommonEventOptions & {
2080
+ query: string;
2081
+ });
2082
+ }
2083
+ export declare class KnowledgeSearchQueryFailedEvent extends KnowledgeEventBase {
2084
+ readonly query: string;
2085
+ readonly error: string;
2086
+ constructor(options: KnowledgeCommonEventOptions & {
2087
+ query: string;
2088
+ error: unknown;
2089
+ });
2090
+ }
2091
+ export declare class CCEnvEvent extends BaseEvent {
2092
+ constructor();
2093
+ }
2094
+ export declare class CodexEnvEvent extends BaseEvent {
2095
+ constructor();
2096
+ }
2097
+ export declare class CursorEnvEvent extends BaseEvent {
2098
+ constructor();
2099
+ }
2100
+ export declare class DefaultEnvEvent extends BaseEvent {
2101
+ constructor();
2102
+ }
2103
+ export type EnvContextEvent = CCEnvEvent | CodexEnvEvent | CursorEnvEvent | DefaultEnvEvent;
2104
+ export declare const EnvContextEvent: Readonly<{
2105
+ kind: "EnvContextEvent";
2106
+ }>;
2107
+ export declare const ENV_CONTEXT_EVENT_TYPES: readonly [typeof CCEnvEvent, typeof CodexEnvEvent, typeof CursorEnvEvent, typeof DefaultEnvEvent];
2108
+ declare function validateEnvContextEventPayload(data: unknown): EnvContextEvent;
2109
+ export declare const env_context_event_adapter: Readonly<{
2110
+ validatePython: typeof validateEnvContextEventPayload;
2111
+ validate_python: typeof validateEnvContextEventPayload;
2112
+ }>;
2113
+ export type CrewAIEvent = CCEnvEvent | CodexEnvEvent | CursorEnvEvent | DefaultEnvEvent | CrewKickoffStartedEvent | CrewKickoffCompletedEvent | CrewKickoffFailedEvent | CrewTrainStartedEvent | CrewTrainCompletedEvent | CrewTrainFailedEvent | CrewTestStartedEvent | CrewTestCompletedEvent | CrewTestFailedEvent | TaskStartedEvent | TaskCompletedEvent | TaskFailedEvent | TaskEvaluationEvent | CrewTestResultEvent | AgentExecutionStartedEvent | AgentExecutionCompletedEvent | AgentExecutionErrorEvent | AgentEvaluationStartedEvent | AgentEvaluationCompletedEvent | AgentEvaluationFailedEvent | AgentReasoningStartedEvent | AgentReasoningCompletedEvent | AgentReasoningFailedEvent | A2ADelegationStartedEvent | A2ADelegationCompletedEvent | A2AConversationStartedEvent | A2AMessageSentEvent | A2AResponseReceivedEvent | A2AConversationCompletedEvent | A2APollingStartedEvent | A2APollingStatusEvent | A2APushNotificationRegisteredEvent | A2APushNotificationReceivedEvent | A2APushNotificationSentEvent | A2APushNotificationTimeoutEvent | A2AStreamingStartedEvent | A2AStreamingChunkEvent | A2AAgentCardFetchedEvent | A2AAuthenticationFailedEvent | A2AArtifactReceivedEvent | A2AConnectionErrorEvent | A2AServerTaskStartedEvent | A2AServerTaskCompletedEvent | A2AServerTaskCanceledEvent | A2AServerTaskFailedEvent | A2AParallelDelegationStartedEvent | A2AParallelDelegationCompletedEvent | A2ATransportNegotiatedEvent | A2AContentTypeNegotiatedEvent | A2AContextCreatedEvent | A2AContextExpiredEvent | A2AContextIdleEvent | A2AContextCompletedEvent | A2AContextPrunedEvent | MCPConnectionStartedEvent | MCPConnectionCompletedEvent | MCPConnectionFailedEvent | MCPToolExecutionStartedEvent | MCPToolExecutionCompletedEvent | MCPToolExecutionFailedEvent | MCPConfigFetchFailedEvent | SkillDiscoveryStartedEvent | SkillDiscoveryCompletedEvent | SkillLoadedEvent | SkillActivatedEvent | SkillLoadFailedEvent | SkillDownloadStartedEvent | SkillDownloadCompletedEvent | LLMCallStartedEvent | LLMCallCompletedEvent | LLMCallFailedEvent | LLMStreamChunkEvent | LLMThinkingChunkEvent | LLMGuardrailStartedEvent | LLMGuardrailCompletedEvent | KnowledgeRetrievalStartedEvent | KnowledgeRetrievalCompletedEvent | KnowledgeQueryStartedEvent | KnowledgeQueryFailedEvent | KnowledgeQueryCompletedEvent | KnowledgeSearchQueryFailedEvent | HumanFeedbackRequestedEvent | HumanFeedbackReceivedEvent | ToolUsageStartedEvent | ToolUsageFinishedEvent | ToolUsageErrorEvent | ToolValidateInputErrorEvent | ToolSelectionErrorEvent | ToolExecutionErrorEvent | LiteAgentExecutionStartedEvent | LiteAgentExecutionCompletedEvent | LiteAgentExecutionErrorEvent | MemorySaveStartedEvent | MemorySaveCompletedEvent | MemorySaveFailedEvent | MemoryQueryStartedEvent | MemoryQueryCompletedEvent | MemoryQueryFailedEvent | MemoryRetrievalStartedEvent | MemoryRetrievalCompletedEvent | MemoryRetrievalFailedEvent | FlowStartedEvent | FlowCreatedEvent | FlowFinishedEvent | FlowFailedEvent | FlowPausedEvent | FlowPlotEvent | FlowInputRequestedEvent | FlowInputReceivedEvent | MethodExecutionStartedEvent | MethodExecutionFinishedEvent | MethodExecutionFailedEvent | MethodExecutionPausedEvent | CheckpointStartedEvent | CheckpointCompletedEvent | CheckpointFailedEvent | CheckpointPrunedEvent | CheckpointForkStartedEvent | CheckpointForkCompletedEvent | CheckpointRestoreStartedEvent | CheckpointRestoreCompletedEvent | CheckpointRestoreFailedEvent | StepObservationStartedEvent | StepObservationCompletedEvent | StepObservationFailedEvent | PlanRefinementEvent | PlanReplanTriggeredEvent | GoalAchievedEarlyEvent | SignalEvent | AgentLogsStartedEvent | AgentLogsExecutionEvent;
2114
+ export type EventMap = {
2115
+ crew_kickoff_started: CrewKickoffStartedEvent;
2116
+ crew_kickoff_completed: CrewKickoffCompletedEvent;
2117
+ crew_kickoff_failed: CrewKickoffFailedEvent;
2118
+ crew_train_started: CrewTrainStartedEvent;
2119
+ crew_train_completed: CrewTrainCompletedEvent;
2120
+ crew_train_failed: CrewTrainFailedEvent;
2121
+ crew_test_started: CrewTestStartedEvent;
2122
+ crew_test_completed: CrewTestCompletedEvent;
2123
+ crew_test_failed: CrewTestFailedEvent;
2124
+ task_started: TaskStartedEvent;
2125
+ task_completed: TaskCompletedEvent;
2126
+ task_failed: TaskFailedEvent;
2127
+ task_evaluation: TaskEvaluationEvent;
2128
+ crew_test_result: CrewTestResultEvent;
2129
+ agent_execution_started: AgentExecutionStartedEvent;
2130
+ agent_execution_completed: AgentExecutionCompletedEvent;
2131
+ agent_execution_error: AgentExecutionErrorEvent;
2132
+ agent_evaluation_started: AgentEvaluationStartedEvent;
2133
+ agent_evaluation_completed: AgentEvaluationCompletedEvent;
2134
+ agent_evaluation_failed: AgentEvaluationFailedEvent;
2135
+ agent_reasoning_started: AgentReasoningStartedEvent;
2136
+ agent_reasoning_completed: AgentReasoningCompletedEvent;
2137
+ agent_reasoning_failed: AgentReasoningFailedEvent;
2138
+ a2a_delegation_started: A2ADelegationStartedEvent;
2139
+ a2a_delegation_completed: A2ADelegationCompletedEvent;
2140
+ a2a_conversation_started: A2AConversationStartedEvent;
2141
+ a2a_message_sent: A2AMessageSentEvent;
2142
+ a2a_response_received: A2AResponseReceivedEvent;
2143
+ a2a_conversation_completed: A2AConversationCompletedEvent;
2144
+ a2a_polling_started: A2APollingStartedEvent;
2145
+ a2a_polling_status: A2APollingStatusEvent;
2146
+ a2a_push_notification_registered: A2APushNotificationRegisteredEvent;
2147
+ a2a_push_notification_received: A2APushNotificationReceivedEvent;
2148
+ a2a_push_notification_sent: A2APushNotificationSentEvent;
2149
+ a2a_push_notification_timeout: A2APushNotificationTimeoutEvent;
2150
+ a2a_streaming_started: A2AStreamingStartedEvent;
2151
+ a2a_streaming_chunk: A2AStreamingChunkEvent;
2152
+ a2a_agent_card_fetched: A2AAgentCardFetchedEvent;
2153
+ a2a_authentication_failed: A2AAuthenticationFailedEvent;
2154
+ a2a_artifact_received: A2AArtifactReceivedEvent;
2155
+ a2a_connection_error: A2AConnectionErrorEvent;
2156
+ a2a_server_task_started: A2AServerTaskStartedEvent;
2157
+ a2a_server_task_completed: A2AServerTaskCompletedEvent;
2158
+ a2a_server_task_canceled: A2AServerTaskCanceledEvent;
2159
+ a2a_server_task_failed: A2AServerTaskFailedEvent;
2160
+ a2a_parallel_delegation_started: A2AParallelDelegationStartedEvent;
2161
+ a2a_parallel_delegation_completed: A2AParallelDelegationCompletedEvent;
2162
+ a2a_transport_negotiated: A2ATransportNegotiatedEvent;
2163
+ a2a_content_type_negotiated: A2AContentTypeNegotiatedEvent;
2164
+ a2a_context_created: A2AContextCreatedEvent;
2165
+ a2a_context_expired: A2AContextExpiredEvent;
2166
+ a2a_context_idle: A2AContextIdleEvent;
2167
+ a2a_context_completed: A2AContextCompletedEvent;
2168
+ a2a_context_pruned: A2AContextPrunedEvent;
2169
+ mcp_connection_started: MCPConnectionStartedEvent;
2170
+ mcp_connection_completed: MCPConnectionCompletedEvent;
2171
+ mcp_connection_failed: MCPConnectionFailedEvent;
2172
+ mcp_tool_execution_started: MCPToolExecutionStartedEvent;
2173
+ mcp_tool_execution_completed: MCPToolExecutionCompletedEvent;
2174
+ mcp_tool_execution_failed: MCPToolExecutionFailedEvent;
2175
+ mcp_config_fetch_failed: MCPConfigFetchFailedEvent;
2176
+ skill_discovery_started: SkillDiscoveryStartedEvent;
2177
+ skill_discovery_completed: SkillDiscoveryCompletedEvent;
2178
+ skill_loaded: SkillLoadedEvent;
2179
+ skill_activated: SkillActivatedEvent;
2180
+ skill_load_failed: SkillLoadFailedEvent;
2181
+ skill_download_started: SkillDownloadStartedEvent;
2182
+ skill_download_completed: SkillDownloadCompletedEvent;
2183
+ llm_call_started: LLMCallStartedEvent;
2184
+ llm_call_completed: LLMCallCompletedEvent;
2185
+ llm_call_failed: LLMCallFailedEvent;
2186
+ llm_stream_chunk: LLMStreamChunkEvent;
2187
+ llm_thinking_chunk: LLMThinkingChunkEvent;
2188
+ llm_guardrail_started: LLMGuardrailStartedEvent;
2189
+ llm_guardrail_completed: LLMGuardrailCompletedEvent;
2190
+ knowledge_search_query_started: KnowledgeRetrievalStartedEvent;
2191
+ knowledge_search_query_completed: KnowledgeRetrievalCompletedEvent;
2192
+ knowledge_query_started: KnowledgeQueryStartedEvent;
2193
+ knowledge_query_failed: KnowledgeQueryFailedEvent;
2194
+ knowledge_query_completed: KnowledgeQueryCompletedEvent;
2195
+ knowledge_search_query_failed: KnowledgeSearchQueryFailedEvent;
2196
+ human_feedback_requested: HumanFeedbackRequestedEvent;
2197
+ human_feedback_received: HumanFeedbackReceivedEvent;
2198
+ tool_usage_started: ToolUsageStartedEvent;
2199
+ tool_usage_finished: ToolUsageFinishedEvent;
2200
+ tool_usage_error: ToolUsageErrorEvent;
2201
+ tool_validate_input_error: ToolValidateInputErrorEvent;
2202
+ tool_selection_error: ToolSelectionErrorEvent;
2203
+ tool_execution_error: ToolExecutionErrorEvent;
2204
+ lite_agent_execution_started: LiteAgentExecutionStartedEvent;
2205
+ lite_agent_execution_completed: LiteAgentExecutionCompletedEvent;
2206
+ lite_agent_execution_error: LiteAgentExecutionErrorEvent;
2207
+ memory_save_started: MemorySaveStartedEvent;
2208
+ memory_save_completed: MemorySaveCompletedEvent;
2209
+ memory_save_failed: MemorySaveFailedEvent;
2210
+ memory_query_started: MemoryQueryStartedEvent;
2211
+ memory_query_completed: MemoryQueryCompletedEvent;
2212
+ memory_query_failed: MemoryQueryFailedEvent;
2213
+ memory_retrieval_started: MemoryRetrievalStartedEvent;
2214
+ memory_retrieval_completed: MemoryRetrievalCompletedEvent;
2215
+ memory_retrieval_failed: MemoryRetrievalFailedEvent;
2216
+ flow_started: FlowStartedEvent;
2217
+ flow_created: FlowCreatedEvent;
2218
+ flow_finished: FlowFinishedEvent;
2219
+ flow_failed: FlowFailedEvent;
2220
+ flow_paused: FlowPausedEvent;
2221
+ flow_plot: FlowPlotEvent;
2222
+ flow_input_requested: FlowInputRequestedEvent;
2223
+ flow_input_received: FlowInputReceivedEvent;
2224
+ method_execution_started: MethodExecutionStartedEvent;
2225
+ method_execution_finished: MethodExecutionFinishedEvent;
2226
+ method_execution_failed: MethodExecutionFailedEvent;
2227
+ method_execution_paused: MethodExecutionPausedEvent;
2228
+ checkpoint_started: CheckpointStartedEvent;
2229
+ checkpoint_completed: CheckpointCompletedEvent;
2230
+ checkpoint_failed: CheckpointFailedEvent;
2231
+ checkpoint_pruned: CheckpointPrunedEvent;
2232
+ checkpoint_fork_started: CheckpointForkStartedEvent;
2233
+ checkpoint_fork_completed: CheckpointForkCompletedEvent;
2234
+ checkpoint_restore_started: CheckpointRestoreStartedEvent;
2235
+ checkpoint_restore_completed: CheckpointRestoreCompletedEvent;
2236
+ checkpoint_restore_failed: CheckpointRestoreFailedEvent;
2237
+ step_observation_started: StepObservationStartedEvent;
2238
+ step_observation_completed: StepObservationCompletedEvent;
2239
+ step_observation_failed: StepObservationFailedEvent;
2240
+ plan_refinement: PlanRefinementEvent;
2241
+ plan_replan_triggered: PlanReplanTriggeredEvent;
2242
+ goal_achieved_early: GoalAchievedEarlyEvent;
2243
+ SIGTERM: SigTermEvent;
2244
+ SIGINT: SigIntEvent;
2245
+ SIGHUP: SigHupEvent;
2246
+ SIGTSTP: SigTStpEvent;
2247
+ SIGCONT: SigContEvent;
2248
+ agent_logs_started: AgentLogsStartedEvent;
2249
+ agent_logs_execution: AgentLogsExecutionEvent;
2250
+ cc_env: CCEnvEvent;
2251
+ codex_env: CodexEnvEvent;
2252
+ cursor_env: CursorEnvEvent;
2253
+ default_env: DefaultEnvEvent;
2254
+ };
2255
+ export type EventHandler<TEvent extends CrewAIEvent = CrewAIEvent> = (source: unknown, event: TEvent, runtimeState?: RuntimeState | null) => void | Promise<void>;
2256
+ export declare const EventHandler: Readonly<{
2257
+ kind: "EventHandler";
2258
+ }>;
2259
+ export type ConsoleStreamingLive = {
2260
+ start: () => void;
2261
+ stop: () => void;
2262
+ readonly active?: boolean;
2263
+ };
2264
+ export type SyncHandler = (source: unknown, event: BaseEvent, context?: unknown) => void;
2265
+ export type AsyncHandler = (source: unknown, event: BaseEvent, context?: unknown) => Promise<void>;
2266
+ export type SyncHandlerSet = ReadonlySet<SyncHandler>;
2267
+ export type AsyncHandlerSet = ReadonlySet<AsyncHandler>;
2268
+ export type Handler = (source: unknown, event: BaseEvent, context?: unknown) => unknown;
2269
+ export type ExecutionPlan = Array<Set<Handler>>;
2270
+ export type EventT_co = BaseEvent;
2271
+ export declare const SyncHandler: Readonly<{
2272
+ kind: "SyncHandler";
2273
+ }>;
2274
+ export declare const AsyncHandler: Readonly<{
2275
+ kind: "AsyncHandler";
2276
+ }>;
2277
+ export declare const SyncHandlerSet: Readonly<{
2278
+ kind: "SyncHandlerSet";
2279
+ }>;
2280
+ export declare const AsyncHandlerSet: Readonly<{
2281
+ kind: "AsyncHandlerSet";
2282
+ }>;
2283
+ export declare const Handler: Readonly<{
2284
+ kind: "Handler";
2285
+ }>;
2286
+ export declare const ExecutionPlan: Readonly<{
2287
+ kind: "ExecutionPlan";
2288
+ }>;
2289
+ export declare const EventT_co: Readonly<{
2290
+ kind: "EventT_co";
2291
+ }>;
2292
+ export declare const EventTypes: Readonly<{
2293
+ kind: "EventTypes";
2294
+ }>;
2295
+ export declare function _get_or_create_counter(): IterableIterator<number>;
2296
+ export declare function get_next_emission_sequence(): number;
2297
+ export declare function is_replaying(): boolean;
2298
+ export declare class Depends<THandler extends EventHandler = EventHandler> {
2299
+ readonly handler: THandler;
2300
+ constructor(handler: THandler);
2301
+ __repr__(): string;
2302
+ __eq__(other: unknown): boolean;
2303
+ __hash__(): number;
2304
+ toString(): string;
2305
+ }
2306
+ export declare class CircularDependencyError extends Error {
2307
+ readonly handlers: readonly EventHandler[];
2308
+ constructor(handlers?: readonly EventHandler[]);
2309
+ }
2310
+ export declare function is_async_handler(handler: unknown): handler is AsyncHandler;
2311
+ export declare function is_call_handler_safe(handler: SyncHandler, source: unknown, event: BaseEvent, state?: unknown): Error | null;
2312
+ export declare class HandlerGraph {
2313
+ readonly handlers: Map<Handler, readonly Depends[]>;
2314
+ readonly levels: ExecutionPlan;
2315
+ constructor(handlers: Map<Handler, readonly Depends[]> | Record<string, readonly Depends[]>);
2316
+ private resolve;
2317
+ getExecutionPlan(): ExecutionPlan;
2318
+ get_execution_plan(): ExecutionPlan;
2319
+ }
2320
+ export declare function build_execution_plan(handlers: readonly Handler[], dependencies?: Map<Handler, readonly Depends[]> | Record<string, readonly Depends[]>): ExecutionPlan;
2321
+ export declare class TraceBatch {
2322
+ readonly version: string;
2323
+ readonly batchId: string;
2324
+ readonly batch_id: string;
2325
+ readonly userContext: Record<string, string>;
2326
+ readonly user_context: Record<string, string>;
2327
+ readonly executionMetadata: Record<string, unknown>;
2328
+ readonly execution_metadata: Record<string, unknown>;
2329
+ events: BaseEvent[];
2330
+ constructor(options?: {
2331
+ version?: string;
2332
+ batchId?: string;
2333
+ batch_id?: string;
2334
+ userContext?: Record<string, string>;
2335
+ user_context?: Record<string, string>;
2336
+ executionMetadata?: Record<string, unknown>;
2337
+ execution_metadata?: Record<string, unknown>;
2338
+ events?: BaseEvent[];
2339
+ });
2340
+ toDict(): Record<string, unknown>;
2341
+ to_dict(): Record<string, unknown>;
2342
+ }
2343
+ export declare class TraceEvent extends BaseEvent {
2344
+ readonly raw: Record<string, unknown>;
2345
+ constructor(options?: BaseEventOptions | Record<string, unknown>);
2346
+ toDict(): Record<string, unknown>;
2347
+ to_dict(): Record<string, unknown>;
2348
+ }
2349
+ type TraceBackendApi = {
2350
+ sendTraceEvents?: (traceBatchId: string, payload: TraceEventsPayload) => unknown;
2351
+ send_trace_events?: (traceBatchId: string, payload: TraceEventsPayload) => unknown;
2352
+ sendEphemeralTraceEvents?: (traceBatchId: string, payload: TraceEventsPayload) => unknown;
2353
+ send_ephemeral_trace_events?: (traceBatchId: string, payload: TraceEventsPayload) => unknown;
2354
+ finalizeTraceBatch?: (traceBatchId: string, payload: TraceFinalizePayload) => unknown;
2355
+ finalize_trace_batch?: (traceBatchId: string, payload: TraceFinalizePayload) => unknown;
2356
+ finalizeEphemeralTraceBatch?: (traceBatchId: string, payload: TraceFinalizePayload) => unknown;
2357
+ finalize_ephemeral_trace_batch?: (traceBatchId: string, payload: TraceFinalizePayload) => unknown;
2358
+ };
2359
+ export declare class TraceBatchManager {
2360
+ readonly plusApi: TraceBackendApi;
2361
+ readonly plus_api: TraceBackendApi;
2362
+ isCurrentBatchEphemeral: boolean;
2363
+ is_current_batch_ephemeral: boolean;
2364
+ traceBatchId: string | null;
2365
+ trace_batch_id: string | null;
2366
+ currentBatch: TraceBatch | null;
2367
+ current_batch: TraceBatch | null;
2368
+ eventBuffer: BaseEvent[];
2369
+ event_buffer: BaseEvent[];
2370
+ executionStartTimes: Map<string, number>;
2371
+ execution_start_times: Map<string, number>;
2372
+ batchOwnerType: string | null;
2373
+ batch_owner_type: string | null;
2374
+ batchOwnerId: string | null;
2375
+ batch_owner_id: string | null;
2376
+ backendInitialized: boolean;
2377
+ backend_initialized: boolean;
2378
+ batchFinalized: boolean;
2379
+ batch_finalized: boolean;
2380
+ _batch_finalized: boolean;
2381
+ deferSessionFinalization: boolean;
2382
+ defer_session_finalization: boolean;
2383
+ ephemeralTraceUrl: string | null;
2384
+ ephemeral_trace_url: string | null;
2385
+ private pendingEventsCount;
2386
+ private backendFinalizePromise;
2387
+ constructor(options?: {
2388
+ plusApi?: TraceBackendApi;
2389
+ plus_api?: TraceBackendApi;
2390
+ });
2391
+ initializeBatch(userContext: Record<string, string> | {
2392
+ userContext?: Record<string, string>;
2393
+ user_context?: Record<string, string>;
2394
+ executionMetadata?: Record<string, unknown>;
2395
+ execution_metadata?: Record<string, unknown>;
2396
+ useEphemeral?: boolean;
2397
+ use_ephemeral?: boolean;
2398
+ }, executionMetadata?: Record<string, unknown>, useEphemeral?: boolean): TraceBatch;
2399
+ initialize_batch(userContext: Parameters<TraceBatchManager["initializeBatch"]>[0], executionMetadata?: Record<string, unknown>, useEphemeral?: boolean): TraceBatch;
2400
+ beginEventProcessing(): void;
2401
+ begin_event_processing(): void;
2402
+ endEventProcessing(): void;
2403
+ end_event_processing(): void;
2404
+ waitForPendingEvents(_timeout?: number): boolean;
2405
+ wait_for_pending_events(timeout?: number): boolean;
2406
+ addEvent(traceEvent: BaseEvent): void;
2407
+ add_event(traceEvent: BaseEvent): void;
2408
+ finalizeBatch(): TraceBatch | null;
2409
+ finalize_batch(): TraceBatch | null;
2410
+ finalizeBackendBatch(): Promise<boolean>;
2411
+ _finalize_backend_batch(): Promise<boolean>;
2412
+ private finalizeBackendBatchOnce;
2413
+ private readTraceResponseJson;
2414
+ hasEvents(): boolean;
2415
+ has_events(): boolean;
2416
+ getEventCount(): number;
2417
+ get_event_count(): number;
2418
+ isBatchInitialized(): boolean;
2419
+ is_batch_initialized(): boolean;
2420
+ shouldFinalizeOnShutdown(): boolean;
2421
+ should_finalize_on_shutdown(): boolean;
2422
+ waitForBatchInitialization(_timeout?: number): boolean;
2423
+ wait_for_batch_initialization(timeout?: number): boolean;
2424
+ recordStartTime(key: string): void;
2425
+ record_start_time(key: string): void;
2426
+ calculateDuration(key: string): number;
2427
+ private setBatchFinalized;
2428
+ calculate_duration(key: string): number;
2429
+ getTraceId(): string | null;
2430
+ get_trace_id(): string | null;
2431
+ }
2432
+ export declare abstract class BaseEventListener {
2433
+ verbose: boolean;
2434
+ constructor(eventBus?: EventBus);
2435
+ abstract setupListeners(eventBus: EventBus): void;
2436
+ setup_listeners(eventBus: EventBus): void;
2437
+ }
2438
+ export declare class EventBus {
2439
+ _shutting_down: boolean;
2440
+ private readonly handlers;
2441
+ private readonly classHandlers;
2442
+ private readonly handlerDependencies;
2443
+ private readonly classHandlerDependencies;
2444
+ private readonly pendingHandlers;
2445
+ private currentRuntimeState;
2446
+ private registeredEntityIds;
2447
+ on<TEvent extends CrewAIEvent>(eventType: EventClass<TEvent>): (registeredHandler: EventHandler<TEvent>) => EventHandler<TEvent>;
2448
+ on<TEvent extends CrewAIEvent>(eventType: EventClass<TEvent>, handler: EventHandler<TEvent>, dependsOn?: Depends | readonly Depends[] | null): () => void;
2449
+ on<TEventType extends EventType>(eventType: TEventType): (registeredHandler: EventHandler<EventMap[TEventType]>) => EventHandler<EventMap[TEventType]>;
2450
+ on<TEventType extends EventType>(eventType: TEventType, handler: EventHandler<EventMap[TEventType]>, dependsOn?: Depends | readonly Depends[] | null): () => void;
2451
+ off(eventType: EventRegistrationKey, handler: EventHandler): void;
2452
+ once<TEvent extends CrewAIEvent>(eventType: EventClass<TEvent>, handler: EventHandler<TEvent>): () => void;
2453
+ emit(source: unknown, event: CrewAIEvent): void;
2454
+ replay(source: unknown, event: CrewAIEvent): void;
2455
+ aemit(source: unknown, event: CrewAIEvent): Promise<void>;
2456
+ registerHandler<TEventType extends EventType>(eventType: TEventType, handler: EventHandler<EventMap[TEventType]>): void;
2457
+ register_handler<TEventType extends EventType>(eventType: TEventType, handler: EventHandler<EventMap[TEventType]>): void;
2458
+ flush(timeout?: number | null): Promise<boolean>;
2459
+ scopedHandlers<T>(callback: () => MaybePromise<T>): MaybePromise<T>;
2460
+ scoped_handlers<T>(callback: () => MaybePromise<T>): MaybePromise<T>;
2461
+ private dispatchPrepared;
2462
+ private dispatchPreparedAndWait;
2463
+ private emitWithDependencies;
2464
+ private runDependencyPlan;
2465
+ private runRemainingDependencyPlan;
2466
+ private runDependencyPlanAndWait;
2467
+ private callHandler;
2468
+ private trackPendingHandler;
2469
+ clear(): void;
2470
+ setRuntimeState(state: RuntimeState): void;
2471
+ set_runtime_state(state: RuntimeState): void;
2472
+ get runtimeState(): RuntimeState | null;
2473
+ get runtime_state(): RuntimeState | null;
2474
+ registerEntity(entity: unknown): void;
2475
+ register_entity(entity: unknown): void;
2476
+ private recordEvent;
2477
+ private prepareEvent;
2478
+ private registerSource;
2479
+ validateDependencies(): void;
2480
+ validate_dependencies(): void;
2481
+ shutdown(wait?: boolean): MaybePromise<void>;
2482
+ private restoreHandlers;
2483
+ private handlerStores;
2484
+ private addHandler;
2485
+ private handlerSet;
2486
+ private dependencyMap;
2487
+ private deleteHandlerSet;
2488
+ private deleteDependencyMap;
2489
+ private resolveHandlers;
2490
+ }
2491
+ export declare const crewaiEventBus: EventBus;
2492
+ export declare const crewai_event_bus: EventBus;
2493
+ export declare const CrewAIEventsBus: typeof EventBus;
2494
+ export declare class EventListener extends BaseEventListener {
2495
+ private static instance;
2496
+ _telemetry: Telemetry;
2497
+ formatter: ConsoleFormatter;
2498
+ executionSpans: Map<unknown, unknown>;
2499
+ execution_spans: Map<unknown, unknown>;
2500
+ nextChunk: number;
2501
+ next_chunk: number;
2502
+ textStream: string;
2503
+ text_stream: string;
2504
+ knowledgeRetrievalInProgress: boolean;
2505
+ knowledge_retrieval_in_progress: boolean;
2506
+ knowledgeQueryInProgress: boolean;
2507
+ knowledge_query_in_progress: boolean;
2508
+ static getInstance(): EventListener;
2509
+ setupListeners(eventBus: EventBus): void;
2510
+ setup_listeners(eventBus: EventBus): void;
2511
+ }
2512
+ export declare class ConsoleFormatter {
2513
+ readonly verbose: boolean;
2514
+ static readonly toolUsageCounts: Map<string, number>;
2515
+ static crewCompletionPrinted: boolean;
2516
+ current_a2a_turn_count: number;
2517
+ private pendingA2AMessage;
2518
+ private pendingA2AAgentRole;
2519
+ private pendingA2ATurnNumber;
2520
+ private currentA2AAgentName;
2521
+ private isStreaming;
2522
+ private justStreamedFinalAnswer;
2523
+ private lastStreamCallType;
2524
+ _streaming_live: ConsoleStreamingLive | null;
2525
+ constructor(options?: {
2526
+ verbose?: boolean;
2527
+ });
2528
+ create_panel(content: unknown, title: string, style?: string): Record<string, unknown>;
2529
+ createPanel(content: unknown, title: string, style?: string): Record<string, unknown>;
2530
+ _show_version_update_message_if_needed(): void;
2531
+ _show_tracing_disabled_message_if_needed(): void;
2532
+ _simplify_tools_field<TFields extends Record<string, unknown>>(fields: TFields): TFields;
2533
+ create_status_content(title: string, name: string, status_style?: string, tool_args?: Record<string, unknown> | string, fields?: Record<string, unknown>): string;
2534
+ createStatusContent(title: string, name: string, statusStyle?: string, toolArgs?: Record<string, unknown> | string, fields?: Record<string, unknown>): string;
2535
+ print(...args: unknown[]): void;
2536
+ pause_live_updates(): void;
2537
+ pauseLiveUpdates(): void;
2538
+ resume_live_updates(): void;
2539
+ resumeLiveUpdates(): void;
2540
+ print_panel(content: unknown, title: string, style?: string, is_flow?: boolean): void;
2541
+ printPanel(content: unknown, title: string, style?: string, isFlow?: boolean): void;
2542
+ handle_crew_status(crew_name: string, source_id: string, status?: string, final_string_output?: string): void;
2543
+ handleCrewStatus(crewName: string, sourceId: string, status?: string, finalStringOutput?: string): void;
2544
+ handle_crew_started(crew_name: string, source_id: string): void;
2545
+ handleCrewStarted(crewName: string, sourceId: string): void;
2546
+ handle_task_started(task_id: string, task_name?: string | null): void;
2547
+ handleTaskStarted(taskId: string, taskName?: string | null): void;
2548
+ handle_task_status(task_id: string, agent_role: string, status?: string, task_name?: string | null): void;
2549
+ handleTaskStatus(taskId: string, agentRole: string, status?: string, taskName?: string | null): void;
2550
+ handle_flow_created(flow_name: string, flow_id: string): void;
2551
+ handle_flow_started(flow_name: string, flow_id: string): void;
2552
+ handle_flow_status(flow_name: string, flow_id: string, status?: string): void;
2553
+ handle_method_status(method_name: string, status?: string): void;
2554
+ handle_llm_tool_usage_started(tool_name: string, tool_args: Record<string, unknown> | string): void;
2555
+ handle_llm_tool_usage_finished(tool_name: string): void;
2556
+ handle_llm_tool_usage_error(tool_name: string, error: string): void;
2557
+ handle_tool_usage_started(tool_name: string, tool_args?: Record<string, unknown> | string, run_attempts?: number | null): void;
2558
+ handle_tool_usage_finished(tool_name: string, output: string, run_attempts?: number | null): void;
2559
+ handle_tool_usage_error(tool_name: string, error: string, run_attempts?: number | null): void;
2560
+ handle_llm_call_failed(error: string): void;
2561
+ handle_llm_stream_chunk(accumulated_text: string, call_type?: unknown): void;
2562
+ handle_llm_stream_completed(): void;
2563
+ create_streaming_live(): ConsoleStreamingLive;
2564
+ handle_crew_test_started(crew_name: string, source_id: string, n_iterations: number): void;
2565
+ handle_crew_test_completed(crew_name: string): void;
2566
+ handle_crew_train_started(crew_name: string, timestamp: string): void;
2567
+ handle_crew_train_completed(crew_name: string, timestamp: string): void;
2568
+ handle_crew_train_failed(crew_name: string): void;
2569
+ handle_crew_test_failed(crew_name: string): void;
2570
+ create_lite_agent_branch(lite_agent_role: string): void;
2571
+ update_lite_agent_status(lite_agent_role: string, status?: string, fields?: Record<string, unknown>): void;
2572
+ handle_lite_agent_execution(lite_agent_role: string, status?: string, error?: unknown, fields?: Record<string, unknown>): void;
2573
+ handle_knowledge_retrieval_started(): void;
2574
+ handle_knowledge_retrieval_completed(retrieved_knowledge: unknown, search_query: string): void;
2575
+ handle_knowledge_query_started(task_prompt: string): void;
2576
+ handle_knowledge_query_failed(error: string): void;
2577
+ handle_knowledge_query_completed(): void;
2578
+ handle_knowledge_search_query_failed(error: string): void;
2579
+ handle_reasoning_started(attempt: number): void;
2580
+ handle_reasoning_completed(plan: string, ready: boolean): void;
2581
+ handle_reasoning_failed(error: string): void;
2582
+ handle_observation_started(agent_role: string, step_number: number, step_description: string): void;
2583
+ handle_observation_completed(agent_role: string, step_number: number, step_completed: boolean, plan_valid: boolean, key_info: string, needs_replan: boolean, goal_achieved: boolean): void;
2584
+ handle_observation_failed(step_number: number, error: string): void;
2585
+ handle_plan_refinement(step_number: number, refined_count: number, refinements: readonly string[] | null): void;
2586
+ handle_plan_replan(reason: string, replan_count: number, preserved_count: number): void;
2587
+ handle_goal_achieved_early(steps_completed: number, steps_remaining: number): void;
2588
+ handle_agent_logs_started(agent_role: string, task_description?: string | null, verbose?: boolean): void;
2589
+ handle_agent_logs_execution(agent_role: string, formatted_answer: unknown, verbose?: boolean): void;
2590
+ handle_memory_retrieval_started(): void;
2591
+ handle_memory_retrieval_completed(memory_content: string, retrieval_time_ms: number): void;
2592
+ handle_memory_query_failed(error: string, source_type: string): void;
2593
+ handle_memory_save_started(): void;
2594
+ handle_memory_save_completed(save_time_ms: number, source_type: string): void;
2595
+ handle_memory_save_failed(error: string, source_type: string): void;
2596
+ handle_guardrail_started(guardrail_name: string, retry_count: number): void;
2597
+ handle_guardrail_completed(success: boolean, error: string | null, retry_count: number): void;
2598
+ handle_a2a_delegation_started(endpoint: string, task_description: string, agent_id: string, is_multiturn?: boolean, turn_number?: number): void;
2599
+ handle_a2a_delegation_completed(status: string, result?: string | null, error?: string | null, is_multiturn?: boolean): void;
2600
+ handle_a2a_conversation_started(agent_id: string, endpoint: string): void;
2601
+ handle_a2a_message_sent(message: string, turn_number: number, agent_role?: string | null): void;
2602
+ handle_a2a_response_received(response: string, turn_number: number, status: string, agent_role?: string | null): void;
2603
+ handle_a2a_conversation_completed(status: string, final_result: string | null, error: string | null, total_turns: number): void;
2604
+ handle_mcp_connection_started(server_name: string, server_url?: string | null, transport_type?: string | null, is_reconnect?: boolean, connect_timeout?: number | null): void;
2605
+ handle_mcp_connection_completed(server_name: string, server_url?: string | null, transport_type?: string | null, connection_duration_ms?: number | null, is_reconnect?: boolean): void;
2606
+ handle_mcp_connection_failed(server_name: string, server_url?: string | null, transport_type?: string | null, error?: string, error_type?: string | null): void;
2607
+ handle_mcp_config_fetch_failed(slug: string, error?: string, error_type?: string | null): void;
2608
+ handle_mcp_tool_execution_started(server_name: string, tool_name: string, tool_args?: Record<string, unknown> | null): void;
2609
+ handle_mcp_tool_execution_failed(server_name: string, tool_name: string, tool_args?: Record<string, unknown> | null, error?: string, error_type?: string | null): void;
2610
+ handle_a2a_polling_started(task_id: string, polling_interval: number, endpoint: string): void;
2611
+ handle_a2a_polling_status(task_id: string, state: string, elapsed_seconds: number, poll_count: number): void;
2612
+ private truncate;
2613
+ private formatConsoleValue;
2614
+ }
2615
+ export declare const event_listener: EventListener;
2616
+ export declare class TraceCollectionListener extends BaseEventListener {
2617
+ readonly batchManager: TraceBatchManager;
2618
+ readonly batch_manager: TraceBatchManager;
2619
+ constructor(eventBus?: EventBus, batchManager?: TraceBatchManager);
2620
+ setupListeners(_eventBus: EventBus): void;
2621
+ setup_listeners(eventBus: EventBus): void;
2622
+ static _isInsideActiveFlowContext(): boolean;
2623
+ static _is_inside_active_flow_context(): boolean;
2624
+ _nestedInFlowExecution(): boolean;
2625
+ _nested_in_flow_execution(): boolean;
2626
+ shouldFinalizeBatchForOwner(): boolean;
2627
+ _should_finalize_batch_for_owner(): boolean;
2628
+ _handleActionEvent(_eventType: string, _source: unknown, event: BaseEvent): void;
2629
+ _handle_action_event(eventType: string, source: unknown, event: BaseEvent): void;
2630
+ }
2631
+ export declare class FirstTimeTraceHandler {
2632
+ readonly enabled: boolean;
2633
+ isFirstTime: boolean;
2634
+ is_first_time: boolean;
2635
+ collectedEvents: boolean;
2636
+ collected_events: boolean;
2637
+ traceBatchId: string | null;
2638
+ trace_batch_id: string | null;
2639
+ ephemeralUrl: string | null;
2640
+ ephemeral_url: string | null;
2641
+ batchManager: TraceBatchManager | null;
2642
+ batch_manager: TraceBatchManager | null;
2643
+ constructor(enabled?: boolean);
2644
+ initializeForFirstTimeUser(): boolean;
2645
+ initialize_for_first_time_user(): boolean;
2646
+ setBatchManager(batchManager: TraceBatchManager): void;
2647
+ set_batch_manager(batch_manager: TraceBatchManager): void;
2648
+ markEventsCollected(): void;
2649
+ mark_events_collected(): void;
2650
+ handleExecutionCompletion(): void;
2651
+ handle_execution_completion(): void;
2652
+ private captureLocalTraceSummary;
2653
+ _resetBatchState(): void;
2654
+ _reset_batch_state(): void;
2655
+ }
2656
+ export declare function resetEmissionSequence(): void;
2657
+ export {};