@crewai-ts/core 0.1.12 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +174 -0
  2. package/dist/agent.d.ts +16 -18
  3. package/dist/auth.cjs +598 -0
  4. package/dist/auth.js +40 -0
  5. package/dist/{chunk-3PVW4JKT.js → chunk-C43UEMCX.js} +6712 -7268
  6. package/dist/chunk-CCOE6MLE.js +896 -0
  7. package/dist/chunk-HFQTF332.js +4455 -0
  8. package/dist/{chunk-BE4JYKSG.js → chunk-MM4ROIFG.js} +12 -1490
  9. package/dist/chunk-RH43TNKN.js +238 -0
  10. package/dist/chunk-S477WFUT.js +565 -0
  11. package/dist/chunk-SB7ADUQA.js +110 -0
  12. package/dist/chunk-T32G6KDW.js +40 -0
  13. package/dist/crew.d.ts +24 -26
  14. package/dist/events.cjs +7513 -0
  15. package/dist/events.js +406 -0
  16. package/dist/experimental-conversational.cjs +272 -0
  17. package/dist/experimental-conversational.js +26 -0
  18. package/dist/feature-hooks.cjs +149 -0
  19. package/dist/feature-hooks.d.ts +94 -0
  20. package/dist/feature-hooks.js +36 -0
  21. package/dist/index.cjs +33923 -64381
  22. package/dist/index.d.ts +2 -15
  23. package/dist/index.js +16720 -49562
  24. package/dist/input-provider.d.ts +3 -4
  25. package/dist/lite-agent.d.ts +4 -4
  26. package/dist/llm.cjs +7467 -0
  27. package/dist/llm.d.ts +0 -4
  28. package/dist/llm.js +225 -0
  29. package/dist/optional-yaml.d.ts +8 -0
  30. package/dist/project.d.ts +1 -1
  31. package/dist/schema-utils.cjs +968 -0
  32. package/dist/schema-utils.d.ts +1 -1
  33. package/dist/schema-utils.js +102 -0
  34. package/dist/state-provider-core.js +3 -2
  35. package/dist/task.d.ts +3 -4
  36. package/dist/tools.cjs +6872 -0
  37. package/dist/tools.d.ts +0 -60
  38. package/dist/tools.js +114 -0
  39. package/dist/types.cjs +68 -0
  40. package/dist/types.js +14 -0
  41. package/package.json +52 -111
  42. package/dist/a2a.d.ts +0 -1684
  43. package/dist/a2ui-schemas.d.ts +0 -3312
  44. package/dist/a2ui.d.ts +0 -379
  45. package/dist/flow-conversation.d.ts +0 -90
  46. package/dist/flow-definition.d.ts +0 -195
  47. package/dist/flow-persistence.d.ts +0 -107
  48. package/dist/flow-visualization.d.ts +0 -77
  49. package/dist/flow.d.ts +0 -927
  50. package/dist/knowledge.d.ts +0 -353
  51. package/dist/mcp-DS7UMYAM.js +0 -62
  52. package/dist/mcp.d.ts +0 -315
  53. package/dist/memory.d.ts +0 -915
  54. package/dist/openai-completion.d.ts +0 -327
  55. package/dist/provider-completions.d.ts +0 -596
  56. package/dist/rag.d.ts +0 -1074
@@ -1,327 +0,0 @@
1
- import { ConfiguredLLM, LocalFileUploader, type BaseLLMOptions, type LLMCallOptions, type LLMMessageInput, type LLMResponse } from "./llm.js";
2
- import type { LLMMessage, Tool } from "./types.js";
3
- export declare const WebSearchResult: Readonly<{
4
- kind: "WebSearchResult";
5
- }>;
6
- export type WebSearchResult = {
7
- id?: string | null;
8
- status?: string | null;
9
- type: string;
10
- };
11
- export declare const FileSearchResultItem: Readonly<{
12
- kind: "FileSearchResultItem";
13
- }>;
14
- export type FileSearchResultItem = {
15
- file_id?: string | null;
16
- fileId?: string | null;
17
- filename?: string | null;
18
- text?: string | null;
19
- score?: number | null;
20
- attributes?: Record<string, string | number | boolean> | null;
21
- };
22
- export declare const FileSearchResult: Readonly<{
23
- kind: "FileSearchResult";
24
- }>;
25
- export type FileSearchResult = {
26
- id?: string | null;
27
- status?: string | null;
28
- type: string;
29
- queries?: string[];
30
- results?: FileSearchResultItem[];
31
- };
32
- export declare const CodeInterpreterLogResult: Readonly<{
33
- kind: "CodeInterpreterLogResult";
34
- }>;
35
- export type CodeInterpreterLogResult = {
36
- type: string;
37
- logs: string;
38
- };
39
- export declare const CodeInterpreterFileResult: Readonly<{
40
- kind: "CodeInterpreterFileResult";
41
- }>;
42
- export type CodeInterpreterFileResult = {
43
- type: string;
44
- files: Array<Record<string, unknown>>;
45
- };
46
- export declare const CodeInterpreterResult: Readonly<{
47
- kind: "CodeInterpreterResult";
48
- }>;
49
- export type CodeInterpreterResult = {
50
- id?: string | null;
51
- status?: string | null;
52
- type: string;
53
- code?: string | null;
54
- container_id?: string | null;
55
- containerId?: string | null;
56
- results?: Array<CodeInterpreterLogResult | CodeInterpreterFileResult>;
57
- };
58
- export declare const ComputerUseResult: Readonly<{
59
- kind: "ComputerUseResult";
60
- }>;
61
- export type ComputerUseResult = {
62
- id?: string | null;
63
- status?: string | null;
64
- type: string;
65
- call_id?: string | null;
66
- callId?: string | null;
67
- action?: Record<string, unknown>;
68
- pending_safety_checks?: Array<Record<string, unknown>>;
69
- pendingSafetyChecks?: Array<Record<string, unknown>>;
70
- };
71
- export declare const ReasoningSummary: Readonly<{
72
- kind: "ReasoningSummary";
73
- }>;
74
- export type ReasoningSummary = {
75
- id?: string | null;
76
- status?: string | null;
77
- type: string;
78
- summary?: Array<Record<string, unknown>>;
79
- encrypted_content?: string | null;
80
- encryptedContent?: string | null;
81
- };
82
- export type ResponsesAPIResultOptions = {
83
- text?: string;
84
- web_search_results?: WebSearchResult[];
85
- webSearchResults?: WebSearchResult[];
86
- file_search_results?: FileSearchResult[];
87
- fileSearchResults?: FileSearchResult[];
88
- code_interpreter_results?: CodeInterpreterResult[];
89
- codeInterpreterResults?: CodeInterpreterResult[];
90
- computer_use_results?: ComputerUseResult[];
91
- computerUseResults?: ComputerUseResult[];
92
- reasoning_summaries?: ReasoningSummary[];
93
- reasoningSummaries?: ReasoningSummary[];
94
- function_calls?: Array<Record<string, unknown>>;
95
- functionCalls?: Array<Record<string, unknown>>;
96
- response_id?: string | null;
97
- responseId?: string | null;
98
- };
99
- export declare class ResponsesAPIResult {
100
- text: string;
101
- web_search_results: WebSearchResult[];
102
- webSearchResults: WebSearchResult[];
103
- file_search_results: FileSearchResult[];
104
- fileSearchResults: FileSearchResult[];
105
- code_interpreter_results: CodeInterpreterResult[];
106
- codeInterpreterResults: CodeInterpreterResult[];
107
- computer_use_results: ComputerUseResult[];
108
- computerUseResults: ComputerUseResult[];
109
- reasoning_summaries: ReasoningSummary[];
110
- reasoningSummaries: ReasoningSummary[];
111
- function_calls: Array<Record<string, unknown>>;
112
- functionCalls: Array<Record<string, unknown>>;
113
- response_id: string | null;
114
- responseId: string | null;
115
- constructor(options?: ResponsesAPIResultOptions);
116
- hasToolOutputs(): boolean;
117
- has_tool_outputs(): boolean;
118
- hasReasoning(): boolean;
119
- has_reasoning(): boolean;
120
- }
121
- export type OpenAICompletionOptions = BaseLLMOptions & {
122
- organization?: string | null;
123
- project?: string | null;
124
- timeout?: number | null;
125
- max_retries?: number;
126
- maxRetries?: number;
127
- default_headers?: Record<string, string> | null;
128
- defaultHeaders?: Record<string, string> | null;
129
- default_query?: Record<string, unknown> | null;
130
- defaultQuery?: Record<string, unknown> | null;
131
- client_params?: Record<string, unknown> | null;
132
- clientParams?: Record<string, unknown> | null;
133
- top_p?: number | null;
134
- topP?: number | null;
135
- frequency_penalty?: number | null;
136
- frequencyPenalty?: number | null;
137
- presence_penalty?: number | null;
138
- presencePenalty?: number | null;
139
- max_tokens?: number | null;
140
- maxTokens?: number | null;
141
- max_completion_tokens?: number | null;
142
- maxCompletionTokens?: number | null;
143
- seed?: number | null;
144
- stream?: boolean;
145
- response_format?: unknown;
146
- responseFormat?: unknown;
147
- logprobs?: boolean | null;
148
- top_logprobs?: number | null;
149
- topLogprobs?: number | null;
150
- reasoning_effort?: string | null;
151
- reasoningEffort?: string | null;
152
- interceptor?: unknown;
153
- api?: "completions" | "responses";
154
- instructions?: string | null;
155
- store?: boolean | null;
156
- previous_response_id?: string | null;
157
- previousResponseId?: string | null;
158
- include?: string[] | null;
159
- builtin_tools?: string[] | null;
160
- builtinTools?: string[] | null;
161
- parse_tool_outputs?: boolean;
162
- parseToolOutputs?: boolean;
163
- auto_chain?: boolean;
164
- autoChain?: boolean;
165
- auto_chain_reasoning?: boolean;
166
- autoChainReasoning?: boolean;
167
- api_base?: string | null;
168
- apiBase?: string | null;
169
- };
170
- export declare class OpenAICompletion extends ConfiguredLLM {
171
- static readonly BUILTIN_TOOL_TYPES: Readonly<Record<string, string>>;
172
- readonly organization: string | null;
173
- readonly project: string | null;
174
- readonly maxRetries: number;
175
- readonly max_retries: number;
176
- readonly defaultHeaders: Record<string, string> | null;
177
- readonly default_headers: Record<string, string> | null;
178
- readonly defaultQuery: Record<string, unknown> | null;
179
- readonly default_query: Record<string, unknown> | null;
180
- readonly clientParams: Record<string, unknown> | null;
181
- readonly client_params: Record<string, unknown> | null;
182
- readonly topP: number | null;
183
- readonly top_p: number | null;
184
- readonly frequencyPenalty: number | null;
185
- readonly frequency_penalty: number | null;
186
- readonly presencePenalty: number | null;
187
- readonly presence_penalty: number | null;
188
- readonly seed: number | null;
189
- readonly stream: boolean;
190
- readonly topLogprobs: number | null;
191
- readonly top_logprobs: number | null;
192
- readonly reasoningEffort: string | null;
193
- readonly reasoning_effort: string | null;
194
- readonly interceptor: unknown;
195
- readonly api: "completions" | "responses";
196
- readonly instructions: string | null;
197
- readonly store: boolean | null;
198
- readonly previousResponseId: string | null;
199
- readonly previous_response_id: string | null;
200
- readonly include: string[] | null;
201
- readonly builtinTools: string[] | null;
202
- readonly builtin_tools: string[] | null;
203
- readonly parseToolOutputs: boolean;
204
- readonly parse_tool_outputs: boolean;
205
- readonly autoChain: boolean;
206
- readonly auto_chain: boolean;
207
- readonly autoChainReasoning: boolean;
208
- readonly auto_chain_reasoning: boolean;
209
- readonly isO1Model: boolean;
210
- readonly is_o1_model: boolean;
211
- readonly isGpt4Model: boolean;
212
- readonly is_gpt4_model: boolean;
213
- private responseChainId;
214
- private reasoningChainItems;
215
- constructor(options?: OpenAICompletionOptions);
216
- call(messages: readonly LLMMessage[], options?: LLMCallOptions): Promise<LLMResponse>;
217
- acall(messages: LLMMessageInput, options?: LLMCallOptions): Promise<LLMResponse>;
218
- prepareCompletionParams(messages: readonly LLMMessage[], tools?: readonly Tool[] | null): Record<string, unknown>;
219
- _prepare_completion_params(messages: readonly LLMMessage[], tools?: readonly Tool[] | null): Record<string, unknown>;
220
- prepareResponsesParams(messages: readonly LLMMessage[], tools?: readonly Tool[] | null, responseModel?: unknown): Record<string, unknown>;
221
- _prepare_responses_params(messages: readonly LLMMessage[], tools?: readonly Tool[] | null, responseModel?: unknown): Record<string, unknown>;
222
- private callChatCompletions;
223
- private callResponses;
224
- private fetchOpenAI;
225
- convertToolsForInterference(tools: readonly Tool[]): Record<string, unknown>[];
226
- _convert_tools_for_interference(tools: readonly Tool[]): Record<string, unknown>[];
227
- convertToolsForResponses(tools: readonly Tool[]): Record<string, unknown>[];
228
- _convert_tools_for_responses(tools: readonly Tool[]): Record<string, unknown>[];
229
- getClientParams(env?: NodeJS.ProcessEnv): Record<string, unknown>;
230
- _get_client_params(env?: NodeJS.ProcessEnv): Record<string, unknown>;
231
- extractOpenAITokenUsage(response: unknown): Record<string, number>;
232
- _extract_openai_token_usage(response: unknown): Record<string, number>;
233
- static extractOpenAITokenUsage(response: unknown): Record<string, number>;
234
- static extract_openai_token_usage(response: unknown): Record<string, number>;
235
- extractResponsesTokenUsage(response: unknown): Record<string, number>;
236
- _extract_responses_token_usage(response: unknown): Record<string, number>;
237
- extractFunctionCallsFromResponse(response: unknown): Record<string, unknown>[];
238
- _extract_function_calls_from_response(response: unknown): Record<string, unknown>[];
239
- extractReasoningItems(response: unknown): unknown[];
240
- _extract_reasoning_items(response: unknown): unknown[];
241
- extractBuiltinToolOutputs(response: unknown): ResponsesAPIResult;
242
- _extract_builtin_tool_outputs(response: unknown): ResponsesAPIResult;
243
- accumulateResponsesStreamEvents(events: readonly unknown[]): {
244
- text: string;
245
- response_id: string | null;
246
- function_calls: Record<string, unknown>[];
247
- usage: Record<string, number> | null;
248
- final_response: unknown;
249
- reasoning_items: unknown[];
250
- };
251
- _accumulate_responses_stream_events(events: readonly unknown[]): {
252
- text: string;
253
- response_id: string | null;
254
- function_calls: Record<string, unknown>[];
255
- usage: Record<string, number> | null;
256
- final_response: unknown;
257
- reasoning_items: unknown[];
258
- };
259
- supportsFunctionCalling(): boolean;
260
- supports_function_calling(): boolean;
261
- supportsStopWords(): boolean;
262
- supports_stop_words(): boolean;
263
- supportsMultimodal(): boolean;
264
- supports_multimodal(): boolean;
265
- getFileUploader(): LocalFileUploader;
266
- get_file_uploader(): LocalFileUploader;
267
- getContextWindowSize(): number;
268
- get_context_window_size(): number;
269
- get lastResponseId(): string | null;
270
- get last_response_id(): string | null;
271
- get lastReasoningItems(): readonly unknown[] | null;
272
- get last_reasoning_items(): readonly unknown[] | null;
273
- resetChain(): void;
274
- reset_chain(): void;
275
- resetReasoningChain(): void;
276
- reset_reasoning_chain(): void;
277
- toConfigDict(): Record<string, unknown>;
278
- to_config_dict(): Record<string, unknown>;
279
- }
280
- export type ProviderConfigOptions = {
281
- base_url?: string;
282
- baseUrl?: string;
283
- api_key_env?: string;
284
- apiKeyEnv?: string;
285
- base_url_env?: string | null;
286
- baseUrlEnv?: string | null;
287
- default_headers?: Record<string, string>;
288
- defaultHeaders?: Record<string, string>;
289
- api_key_required?: boolean;
290
- apiKeyRequired?: boolean;
291
- default_api_key?: string | null;
292
- defaultApiKey?: string | null;
293
- };
294
- export declare class ProviderConfig {
295
- readonly base_url: string;
296
- readonly baseUrl: string;
297
- readonly api_key_env: string;
298
- readonly apiKeyEnv: string;
299
- readonly base_url_env: string | null;
300
- readonly baseUrlEnv: string | null;
301
- readonly default_headers: Record<string, string>;
302
- readonly defaultHeaders: Record<string, string>;
303
- readonly api_key_required: boolean;
304
- readonly apiKeyRequired: boolean;
305
- readonly default_api_key: string | null;
306
- readonly defaultApiKey: string | null;
307
- constructor(options: ProviderConfigOptions);
308
- }
309
- export declare const OPENAI_COMPATIBLE_PROVIDERS: Readonly<Record<string, ProviderConfig>>;
310
- export declare class OpenAICompatibleCompletion extends OpenAICompletion {
311
- constructor(options?: OpenAICompletionOptions & {
312
- provider?: string | null;
313
- });
314
- static _resolveProviderConfig<TOptions extends OpenAICompletionOptions & {
315
- provider?: string | null;
316
- }>(data: TOptions): TOptions;
317
- static _resolve_provider_config<TOptions extends OpenAICompletionOptions & {
318
- provider?: string | null;
319
- }>(data: TOptions): TOptions;
320
- supports_function_calling(): boolean;
321
- static resolveApiKey(apiKey: string | null, config: ProviderConfig, provider: string): string | null;
322
- static _resolve_api_key(apiKey: string | null, config: ProviderConfig, provider: string): string | null;
323
- static resolveBaseUrl(baseUrl: string | null, config: ProviderConfig, provider: string): string;
324
- static _resolve_base_url(baseUrl: string | null, config: ProviderConfig, provider: string): string;
325
- static resolveHeaders(headers: Record<string, string> | null, config: ProviderConfig): Record<string, string> | null;
326
- static _resolve_headers(headers: Record<string, string> | null, config: ProviderConfig): Record<string, string> | null;
327
- }