@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,204 @@
1
+ import { crewaiEventBus, BaseEvent, type EventType } from "./events.js";
2
+ export type CheckpointEventType = EventType | "lite_agent_execution_started" | "lite_agent_execution_completed" | "lite_agent_execution_error";
3
+ export declare const CheckpointEventType: Readonly<{
4
+ kind: "CheckpointEventType";
5
+ }>;
6
+ export type CheckpointTrigger = CheckpointEventType | "*";
7
+ export declare const _event_type_map: Record<string, typeof BaseEvent>;
8
+ export declare function buildEventTypeMap(): Record<string, typeof BaseEvent>;
9
+ export declare const _build_event_type_map: typeof buildEventTypeMap;
10
+ export declare function resolveEvent(value: unknown): BaseEvent;
11
+ export declare const _resolve_event: typeof resolveEvent;
12
+ export declare function _ensure_handlers_registered(): void;
13
+ export declare function _resolve_from_agent(agent: unknown): CheckpointConfig | null;
14
+ export declare function _find_checkpoint(source: unknown): CheckpointConfig | null;
15
+ export declare function _do_checkpoint(state: RuntimeState, cfg: CheckpointConfig, event?: BaseEvent | null): void;
16
+ export declare function _should_checkpoint(source: unknown, event: BaseEvent): CheckpointConfig | null;
17
+ export declare function _on_any_event(source: unknown, event: BaseEvent, state?: unknown): void;
18
+ export declare function _register_all_handlers(event_bus: typeof crewaiEventBus): void;
19
+ export type EdgeType = "parent" | "child" | "trigger" | "triggered_by" | "next" | "previous" | "started" | "completed_by";
20
+ export declare const EdgeType: readonly ["parent", "child", "trigger", "triggered_by", "next", "previous", "started", "completed_by"];
21
+ export declare class EventNode {
22
+ readonly event: BaseEvent;
23
+ readonly edges: Record<string, string[]>;
24
+ constructor(options: {
25
+ event: BaseEvent | Record<string, unknown>;
26
+ edges?: Record<string, readonly string[]>;
27
+ });
28
+ addEdge(edgeType: EdgeType, targetId: string): void;
29
+ add_edge(edgeType: EdgeType, targetId: string): void;
30
+ neighbors(edgeType: EdgeType): string[];
31
+ toJSON(): Record<string, unknown>;
32
+ modelDump(): Record<string, unknown>;
33
+ model_dump(): Record<string, unknown>;
34
+ }
35
+ export declare class EventRecord {
36
+ nodes: Record<string, EventNode>;
37
+ constructor(options?: {
38
+ nodes?: Record<string, EventNode | {
39
+ event: BaseEvent | Record<string, unknown>;
40
+ edges?: Record<string, readonly string[]>;
41
+ }>;
42
+ });
43
+ add(event: BaseEvent): EventNode;
44
+ get(eventId: string): EventNode | null;
45
+ descendants(eventId: string): EventNode[];
46
+ roots(): EventNode[];
47
+ allNodes(): EventNode[];
48
+ all_nodes(): EventNode[];
49
+ clear(): void;
50
+ has(eventId: string): boolean;
51
+ __contains__(eventId: string): boolean;
52
+ get size(): number;
53
+ __len__(): number;
54
+ toJSON(): Record<string, unknown>;
55
+ modelDump(): Record<string, unknown>;
56
+ model_dump(): Record<string, unknown>;
57
+ modelDumpJson(): string;
58
+ model_dump_json(): string;
59
+ static modelValidateJson(value: string): EventRecord;
60
+ static model_validate_json(value: string): EventRecord;
61
+ }
62
+ export type RuntimeStateOptions = {
63
+ root?: readonly unknown[];
64
+ entities?: readonly unknown[];
65
+ provider?: BaseProvider;
66
+ eventRecord?: EventRecord;
67
+ event_record?: EventRecord;
68
+ checkpointId?: string | null;
69
+ checkpoint_id?: string | null;
70
+ parentId?: string | null;
71
+ parent_id?: string | null;
72
+ branch?: string;
73
+ crewaiVersion?: string;
74
+ crewai_version?: string;
75
+ };
76
+ export declare function _sync_checkpoint_fields(entity: object): void;
77
+ export declare function _backfill_memory_kind(value: unknown): void;
78
+ export declare function _backfill_source_type(source: unknown): void;
79
+ export declare function _backfill_sources_on(container: unknown): void;
80
+ export declare function _backfill_discriminators(entity: unknown): void;
81
+ export declare function _prepare_entities(root: readonly object[]): void;
82
+ export declare class RuntimeState {
83
+ root: unknown[];
84
+ private provider;
85
+ private readonly runtimeEventRecord;
86
+ checkpointId: string | null;
87
+ checkpoint_id: string | null;
88
+ parentId: string | null;
89
+ parent_id: string | null;
90
+ branch: string;
91
+ constructor(options?: RuntimeStateOptions);
92
+ get eventRecord(): EventRecord;
93
+ get event_record(): EventRecord;
94
+ get providerType(): string;
95
+ setProvider(provider: BaseProvider): void;
96
+ set_provider(provider: BaseProvider): void;
97
+ checkpoint(location: string): string;
98
+ acheckpoint(location: string): Promise<string>;
99
+ fork(branch?: string): string;
100
+ toJSON(): Record<string, unknown>;
101
+ _serialize(): Record<string, unknown>;
102
+ toJSONText(): string;
103
+ to_json(): string;
104
+ static fromJSONText(raw: string, provider?: BaseProvider): RuntimeState;
105
+ static _deserialize(data: unknown, provider?: BaseProvider): RuntimeState;
106
+ static from_json(raw: string, provider?: BaseProvider): RuntimeState;
107
+ static fromCheckpoint(config: CheckpointConfig, provider?: BaseProvider): Promise<RuntimeState>;
108
+ static from_checkpoint(config: CheckpointConfig, provider?: BaseProvider): Promise<RuntimeState>;
109
+ static afromCheckpoint(config: CheckpointConfig, provider?: BaseProvider): Promise<RuntimeState>;
110
+ static afrom_checkpoint(config: CheckpointConfig, provider?: BaseProvider): Promise<RuntimeState>;
111
+ private chainLineage;
112
+ _chain_lineage(provider: BaseProvider, location: string): void;
113
+ private beginCheckpoint;
114
+ _begin_checkpoint(location: string): [string, string | null, string, number];
115
+ private emitCheckpointCompleted;
116
+ _emit_checkpoint_completed(result: string, providerName: string, branchSnapshot: string, parentIdSnapshot: string | null, startedAt: number): void;
117
+ private emitCheckpointFailed;
118
+ _emit_checkpoint_failed(location: string, providerName: string, branchSnapshot: string, parentIdSnapshot: string | null, error: unknown): void;
119
+ }
120
+ export type CheckpointProviderOptions = {
121
+ parentId?: string | null;
122
+ parent_id?: string | null;
123
+ branch?: string;
124
+ };
125
+ export declare abstract class BaseProvider {
126
+ abstract readonly providerType: string;
127
+ abstract readonly provider_type: string;
128
+ abstract checkpoint(data: string, location: string, options?: CheckpointProviderOptions): string | Promise<string>;
129
+ abstract acheckpoint(data: string, location: string, options?: CheckpointProviderOptions): Promise<string>;
130
+ abstract prune(location: string, maxKeep: number, options?: {
131
+ branch?: string;
132
+ }): number | Promise<number>;
133
+ abstract extractId(location: string): string;
134
+ abstract extract_id(location: string): string;
135
+ abstract fromCheckpoint(location: string): string | Promise<string>;
136
+ abstract from_checkpoint(location: string): string | Promise<string>;
137
+ abstract afromCheckpoint(location: string): Promise<string>;
138
+ abstract afrom_checkpoint(location: string): Promise<string>;
139
+ }
140
+ export declare class JsonProvider implements BaseProvider {
141
+ readonly providerType = "json";
142
+ readonly provider_type = "json";
143
+ checkpoint(data: string, location: string, options?: CheckpointProviderOptions): string;
144
+ acheckpoint(data: string, location: string, options?: CheckpointProviderOptions): Promise<string>;
145
+ prune(location: string, maxKeep: number, options?: {
146
+ branch?: string;
147
+ }): number;
148
+ extractId(location: string): string;
149
+ extract_id(location: string): string;
150
+ fromCheckpoint(location: string): string;
151
+ from_checkpoint(location: string): string;
152
+ afromCheckpoint(location: string): Promise<string>;
153
+ afrom_checkpoint(location: string): Promise<string>;
154
+ }
155
+ export declare class SqliteProvider implements BaseProvider {
156
+ readonly providerType = "sqlite";
157
+ readonly provider_type = "sqlite";
158
+ checkpoint(data: string, location: string, options?: CheckpointProviderOptions): string;
159
+ acheckpoint(data: string, location: string, options?: CheckpointProviderOptions): Promise<string>;
160
+ prune(location: string, maxKeep: number, options?: {
161
+ branch?: string;
162
+ }): number;
163
+ extractId(location: string): string;
164
+ extract_id(location: string): string;
165
+ fromCheckpoint(location: string): string;
166
+ from_checkpoint(location: string): string;
167
+ afromCheckpoint(location: string): Promise<string>;
168
+ afrom_checkpoint(location: string): Promise<string>;
169
+ }
170
+ export type CheckpointConfigOptions = {
171
+ location?: string;
172
+ onEvents?: readonly CheckpointTrigger[];
173
+ on_events?: readonly CheckpointTrigger[];
174
+ provider?: BaseProvider;
175
+ maxCheckpoints?: number | null;
176
+ max_checkpoints?: number | null;
177
+ restoreFrom?: string | null;
178
+ restore_from?: string | null;
179
+ };
180
+ export declare class CheckpointConfig {
181
+ location: string;
182
+ onEvents: readonly CheckpointTrigger[];
183
+ on_events: readonly CheckpointTrigger[];
184
+ provider: BaseProvider;
185
+ maxCheckpoints: number | null;
186
+ max_checkpoints: number | null;
187
+ restoreFrom: string | null;
188
+ restore_from: string | null;
189
+ constructor(options?: CheckpointConfigOptions);
190
+ _register_handlers(): this;
191
+ get triggerAll(): boolean;
192
+ get trigger_all(): boolean;
193
+ get triggerEvents(): ReadonlySet<CheckpointTrigger>;
194
+ get trigger_events(): ReadonlySet<CheckpointTrigger>;
195
+ }
196
+ export type CheckpointOption = CheckpointConfig | CheckpointConfigOptions | boolean | null | undefined;
197
+ export declare function coerceCheckpointConfig(value: CheckpointOption): CheckpointConfig | false | null;
198
+ export declare const _coerce_checkpoint: typeof coerceCheckpointConfig;
199
+ export declare function apply_checkpoint(instance: unknown, from_checkpoint: CheckpointConfig | null): unknown;
200
+ export declare function detectProvider(path: string): BaseProvider;
201
+ export declare const detect_provider: typeof detectProvider;
202
+ export declare function _build_path(directory: string, branch?: string, parent_id?: string | null): string;
203
+ export declare function _safe_branch(base: string, branch: string): void;
204
+ export declare function _make_id(): [string, string];
@@ -0,0 +1,36 @@
1
+ export declare class StepExecutionContext {
2
+ readonly taskDescription: string;
3
+ readonly task_description: string;
4
+ readonly taskGoal: string;
5
+ readonly task_goal: string;
6
+ readonly dependencyResults: Readonly<Record<number, string>>;
7
+ readonly dependency_results: Readonly<Record<number, string>>;
8
+ constructor(options: {
9
+ taskDescription?: string;
10
+ task_description?: string;
11
+ taskGoal?: string;
12
+ task_goal?: string;
13
+ dependencyResults?: Readonly<Record<number, string>>;
14
+ dependency_results?: Readonly<Record<number, string>>;
15
+ });
16
+ getDependencyResult(stepNumber: number): string | null;
17
+ get_dependency_result(stepNumber: number): string | null;
18
+ }
19
+ export declare class StepResult {
20
+ readonly success: boolean;
21
+ readonly result: string;
22
+ readonly error: string | null;
23
+ readonly toolCallsMade: readonly string[];
24
+ readonly tool_calls_made: readonly string[];
25
+ readonly executionTime: number;
26
+ readonly execution_time: number;
27
+ constructor(options: {
28
+ success: boolean;
29
+ result: string;
30
+ error?: string | null;
31
+ toolCallsMade?: readonly string[];
32
+ tool_calls_made?: readonly string[];
33
+ executionTime?: number;
34
+ execution_time?: number;
35
+ });
36
+ }
@@ -0,0 +1,153 @@
1
+ import { type BaseEvent } from "./events.js";
2
+ import { CrewOutput } from "./outputs.js";
3
+ export declare enum StreamChunkType {
4
+ TEXT = "text",
5
+ TOOL_CALL = "tool_call"
6
+ }
7
+ export type ToolCallChunk = {
8
+ toolId?: string | null;
9
+ tool_id?: string | null;
10
+ toolName?: string | null;
11
+ tool_name?: string | null;
12
+ arguments: string;
13
+ index?: number;
14
+ };
15
+ export declare const ToolCallChunk: Readonly<{
16
+ kind: "ToolCallChunk";
17
+ }>;
18
+ export type StreamChunkOptions = {
19
+ content: string;
20
+ chunkType?: StreamChunkType;
21
+ chunk_type?: StreamChunkType;
22
+ taskIndex?: number;
23
+ task_index?: number;
24
+ taskName?: string;
25
+ task_name?: string;
26
+ taskId?: string;
27
+ task_id?: string;
28
+ agentRole?: string;
29
+ agent_role?: string;
30
+ agentId?: string;
31
+ agent_id?: string;
32
+ toolCall?: ToolCallChunk | null;
33
+ tool_call?: ToolCallChunk | null;
34
+ };
35
+ export declare class StreamChunk {
36
+ readonly content: string;
37
+ readonly chunkType: StreamChunkType;
38
+ readonly chunk_type: StreamChunkType;
39
+ readonly taskIndex: number;
40
+ readonly task_index: number;
41
+ readonly taskName: string;
42
+ readonly task_name: string;
43
+ readonly taskId: string;
44
+ readonly task_id: string;
45
+ readonly agentRole: string;
46
+ readonly agent_role: string;
47
+ readonly agentId: string;
48
+ readonly agent_id: string;
49
+ readonly toolCall: ToolCallChunk | null;
50
+ readonly tool_call: ToolCallChunk | null;
51
+ constructor(options: StreamChunkOptions);
52
+ toString(): string;
53
+ __str__(): string;
54
+ }
55
+ export declare abstract class StreamingOutputBase<TResult> implements AsyncIterable<StreamChunk> {
56
+ private readonly run;
57
+ protected resultValue: TResult | null;
58
+ protected hasResult: boolean;
59
+ protected completed: boolean;
60
+ protected cancelled: boolean;
61
+ protected error: unknown;
62
+ protected readonly collectedChunks: StreamChunk[];
63
+ private iteratorStarted;
64
+ constructor(run: () => Promise<TResult>);
65
+ get result(): TResult;
66
+ get isCompleted(): boolean;
67
+ get is_completed(): boolean;
68
+ get isCancelled(): boolean;
69
+ get is_cancelled(): boolean;
70
+ get chunks(): readonly StreamChunk[];
71
+ getFullText(): string;
72
+ get_full_text(): string;
73
+ setResult(result: TResult): void;
74
+ _set_result(result: TResult): void;
75
+ close(): void;
76
+ aclose(): Promise<void>;
77
+ __aenter__(): Promise<this>;
78
+ __aexit__(..._excInfo: unknown[]): Promise<void>;
79
+ [Symbol.iterator](): Iterator<StreamChunk>;
80
+ __iter__(): IterableIterator<StreamChunk>;
81
+ [Symbol.asyncIterator](): AsyncIterableIterator<StreamChunk>;
82
+ __aiter__(): AsyncIterableIterator<StreamChunk>;
83
+ _async_iterate(): AsyncIterableIterator<StreamChunk>;
84
+ protected abstract chunksFromResult(result: TResult): readonly StreamChunk[];
85
+ }
86
+ export declare class CrewStreamingOutput extends StreamingOutputBase<CrewOutput> {
87
+ private resultValues;
88
+ get results(): readonly CrewOutput[];
89
+ setResults(results: readonly CrewOutput[]): void;
90
+ _set_results(results: readonly CrewOutput[]): void;
91
+ protected chunksFromResult(result: CrewOutput): readonly StreamChunk[];
92
+ }
93
+ export declare class FlowStreamingOutput extends StreamingOutputBase<unknown> {
94
+ protected chunksFromResult(result: unknown): readonly StreamChunk[];
95
+ }
96
+ export declare const TaskInfo: Readonly<{
97
+ kind: "TaskInfo";
98
+ }>;
99
+ export type TaskInfo = {
100
+ index: number;
101
+ name: string;
102
+ id: string;
103
+ agent_role: string;
104
+ agent_id: string;
105
+ };
106
+ type QueueItem = StreamChunk | null | Error;
107
+ type StreamHandler = (source: unknown, event: BaseEvent) => void;
108
+ declare class ChunkQueue {
109
+ private readonly items;
110
+ private readonly waiters;
111
+ put(item: QueueItem): void;
112
+ get(): QueueItem | undefined;
113
+ wait(): Promise<QueueItem>;
114
+ }
115
+ export declare class StreamingState {
116
+ readonly current_task_info: TaskInfo;
117
+ readonly currentTaskInfo: TaskInfo;
118
+ readonly result_holder: unknown[];
119
+ readonly resultHolder: unknown[];
120
+ readonly sync_queue: ChunkQueue;
121
+ readonly syncQueue: ChunkQueue;
122
+ readonly async_queue: ChunkQueue | null;
123
+ readonly asyncQueue: ChunkQueue | null;
124
+ readonly loop: null;
125
+ readonly handler: StreamHandler;
126
+ readonly stream_id: string | null;
127
+ readonly streamId: string | null;
128
+ constructor(options: {
129
+ currentTaskInfo: TaskInfo;
130
+ resultHolder: unknown[];
131
+ syncQueue: ChunkQueue;
132
+ asyncQueue?: ChunkQueue | null;
133
+ handler: StreamHandler;
134
+ streamId?: string | null;
135
+ });
136
+ }
137
+ export declare const logger: Readonly<{
138
+ debug: (...args: unknown[]) => void;
139
+ error: (...args: unknown[]) => void;
140
+ }>;
141
+ export declare function createStreamingState(currentTaskInfo: TaskInfo, resultHolder: unknown[], useAsync?: boolean): StreamingState;
142
+ export declare const create_streaming_state: typeof createStreamingState;
143
+ export declare function registerCleanup(streamingOutput: unknown, state: StreamingState): void;
144
+ export declare const register_cleanup: typeof registerCleanup;
145
+ export declare function signalEnd(state: StreamingState, isAsync?: boolean): void;
146
+ export declare const signal_end: typeof signalEnd;
147
+ export declare function signalError(state: StreamingState, error: Error, isAsync?: boolean): void;
148
+ export declare const signal_error: typeof signalError;
149
+ export declare function createChunkGenerator(state: StreamingState, runFunc: () => void, outputHolder?: unknown[]): Generator<StreamChunk>;
150
+ export declare const create_chunk_generator: typeof createChunkGenerator;
151
+ export declare function createAsyncChunkGenerator(state: StreamingState, runCoro: () => unknown, outputHolder?: unknown[]): AsyncGenerator<StreamChunk>;
152
+ export declare const create_async_chunk_generator: typeof createAsyncChunkGenerator;
153
+ export {};
@@ -0,0 +1,12 @@
1
+ export type InterpolationValue = string | number | boolean | null | readonly InterpolationValue[] | {
2
+ readonly [key: string]: InterpolationValue;
3
+ };
4
+ export declare function sanitizeToolName(name: string, maxLength?: number): string;
5
+ export declare const sanitize_tool_name: typeof sanitizeToolName;
6
+ export declare function slugify(text: string, separator?: string): string;
7
+ export declare function _duplicate_separator_pattern(separator: string): RegExp;
8
+ export declare function interpolateOnly(inputString: string | null | undefined, inputs: Record<string, unknown>, options?: {
9
+ strictMissing?: boolean;
10
+ }): string;
11
+ export declare const interpolate_only: typeof interpolateOnly;
12
+ export declare function _validate_type(value: unknown): void;
@@ -0,0 +1,62 @@
1
+ import type { Task } from "./task.js";
2
+ export type StoredTaskOutput = {
3
+ description: string;
4
+ summary?: string;
5
+ raw: string;
6
+ pydantic: unknown;
7
+ jsonDict: Record<string, unknown> | null;
8
+ json_dict?: Record<string, unknown> | null;
9
+ outputFormat: string;
10
+ output_format?: string;
11
+ agent: string;
12
+ messages?: readonly unknown[];
13
+ };
14
+ export type TaskOutputStorageRecord = {
15
+ task_id: string;
16
+ expected_output: string;
17
+ output: StoredTaskOutput;
18
+ task_index: number;
19
+ inputs: Record<string, unknown>;
20
+ was_replayed: boolean;
21
+ timestamp: string;
22
+ };
23
+ export type TaskOutputStorageUpdate = Partial<Omit<TaskOutputStorageRecord, "task_index" | "timestamp">>;
24
+ export interface KickoffTaskOutputsStorage {
25
+ add(task: Task, output: StoredTaskOutput, taskIndex: number, wasReplayed?: boolean, inputs?: Record<string, unknown>): void;
26
+ update(taskIndex: number, fields: TaskOutputStorageUpdate): void;
27
+ load(): TaskOutputStorageRecord[];
28
+ deleteAll(): void;
29
+ }
30
+ export declare class KickoffTaskOutputsSQLiteStorage implements KickoffTaskOutputsStorage {
31
+ readonly dbPath: string;
32
+ readonly db_path: string;
33
+ constructor(dbPath?: string | null);
34
+ add(task: Task, output: StoredTaskOutput, taskIndex: number, wasReplayed?: boolean, inputs?: Record<string, unknown>): void;
35
+ update(taskIndex: number, fields: TaskOutputStorageUpdate): void;
36
+ load(): TaskOutputStorageRecord[];
37
+ deleteAll(): void;
38
+ delete_all(): void;
39
+ private initializeDb;
40
+ _initialize_db(): void;
41
+ private withDb;
42
+ }
43
+ export declare class TaskOutputStorageHandler {
44
+ readonly storage: KickoffTaskOutputsStorage;
45
+ constructor(storage?: KickoffTaskOutputsStorage);
46
+ update(taskIndex: number, log: {
47
+ task: Task;
48
+ output: StoredTaskOutput;
49
+ task_index?: number;
50
+ taskIndex?: number;
51
+ inputs?: Record<string, unknown>;
52
+ was_replayed?: boolean;
53
+ wasReplayed?: boolean;
54
+ }): void;
55
+ add(task: Task, output: StoredTaskOutput, taskIndex: number, inputs?: Record<string, unknown>, wasReplayed?: boolean): void;
56
+ reset(): void;
57
+ load(): TaskOutputStorageRecord[] | null;
58
+ }
59
+ export declare function defaultTaskOutputStoragePath(): string;
60
+ export declare const default_task_output_storage_path: typeof defaultTaskOutputStoragePath;
61
+ export declare const KickoffTaskOutputsSqliteStorage: typeof KickoffTaskOutputsSQLiteStorage;
62
+ export declare const TaskOutputStorageHandlerAlias: typeof TaskOutputStorageHandler;