@crewai-ts/core 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a.d.ts +1684 -0
- package/dist/a2ui-schemas.d.ts +3312 -0
- package/dist/a2ui.d.ts +379 -0
- package/dist/agent-adapters.d.ts +178 -0
- package/dist/agent-executors.d.ts +508 -0
- package/dist/agent-parser.d.ts +44 -0
- package/dist/agent-planning.d.ts +358 -0
- package/dist/agent-utils.d.ts +210 -0
- package/dist/agent.d.ts +444 -0
- package/dist/auth.d.ts +179 -0
- package/dist/config-utils.d.ts +5 -0
- package/dist/content-processor.d.ts +12 -0
- package/dist/context.d.ts +157 -0
- package/dist/converter.d.ts +97 -0
- package/dist/crew-chat.d.ts +97 -0
- package/dist/crew.d.ts +424 -0
- package/dist/decorators.d.ts +20 -0
- package/dist/env.d.ts +13 -0
- package/dist/errors.d.ts +27 -0
- package/dist/evaluators.d.ts +477 -0
- package/dist/events.d.ts +2657 -0
- package/dist/execution-utils.d.ts +85 -0
- package/dist/experimental-conversational.d.ts +181 -0
- package/dist/file-handler.d.ts +36 -0
- package/dist/file-store.d.ts +37 -0
- package/dist/files.d.ts +554 -0
- package/dist/flow-conversation.d.ts +90 -0
- package/dist/flow-definition.d.ts +195 -0
- package/dist/flow-persistence.d.ts +107 -0
- package/dist/flow-visualization.d.ts +77 -0
- package/dist/flow.d.ts +927 -0
- package/dist/formatter.d.ts +7 -0
- package/dist/guardrail.d.ts +95 -0
- package/dist/hooks.d.ts +241 -0
- package/dist/human-input.d.ts +74 -0
- package/dist/i18n.d.ts +26 -0
- package/dist/index.cjs +83 -36
- package/dist/index.d.ts +99 -13004
- package/dist/index.js +82 -36
- package/dist/input-files.d.ts +24 -0
- package/dist/input-provider.d.ts +22 -0
- package/dist/knowledge.d.ts +353 -0
- package/dist/lite-agent-output.d.ts +69 -0
- package/dist/lite-agent.d.ts +154 -0
- package/dist/llm.d.ts +630 -0
- package/dist/llms-hooks-transport.d.ts +1 -2
- package/dist/lock-store.d.ts +14 -0
- package/dist/logger.d.ts +55 -0
- package/dist/mcp.d.ts +315 -0
- package/dist/memory.d.ts +915 -0
- package/dist/metadata.d.ts +9 -0
- package/dist/misc-compat.d.ts +125 -0
- package/dist/openai-completion.d.ts +324 -0
- package/dist/outputs.d.ts +69 -0
- package/dist/planning.d.ts +60 -0
- package/dist/plus-api.d.ts +194 -0
- package/dist/project-compat.d.ts +133 -0
- package/dist/project.d.ts +221 -0
- package/dist/prompts.d.ts +66 -0
- package/dist/provider-completions.d.ts +593 -0
- package/dist/rag.d.ts +1074 -0
- package/dist/rpm.d.ts +27 -0
- package/dist/rw-lock.d.ts +21 -0
- package/dist/schema-utils.d.ts +121 -0
- package/dist/security.d.ts +66 -0
- package/dist/settings.d.ts +103 -0
- package/dist/skills.d.ts +145 -0
- package/dist/state-provider-core.d.ts +1 -1
- package/dist/state.d.ts +204 -0
- package/dist/step-execution-context.d.ts +36 -0
- package/dist/streaming.d.ts +153 -0
- package/dist/string-utils.d.ts +12 -0
- package/dist/task-output-storage.d.ts +62 -0
- package/dist/task.d.ts +305 -0
- package/dist/telemetry.d.ts +91 -0
- package/dist/token-counter-callback.d.ts +36 -0
- package/dist/tools.d.ts +563 -0
- package/dist/tracing-utils.d.ts +56 -0
- package/dist/training-converter.d.ts +36 -0
- package/dist/training-handler.d.ts +10 -0
- package/dist/types.d.ts +72 -0
- package/dist/utilities.d.ts +130 -0
- package/dist/utility-types.d.ts +10 -0
- package/dist/version.d.ts +12 -0
- package/package.json +326 -4904
- package/dist/index.d.cts +0 -13068
- package/dist/llms-hooks-transport-ChGiFBiU.d.ts +0 -233
- package/dist/llms-hooks-transport-DZlurMUQ.d.cts +0 -233
- package/dist/llms-hooks-transport.d.cts +0 -2
- package/dist/state-provider-core-Be9RKRAm.d.cts +0 -4876
- package/dist/state-provider-core-Be9RKRAm.d.ts +0 -4876
- package/dist/state-provider-core.d.cts +0 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Agent, type CodeExecutionMode } from "./agent.js";
|
|
2
|
+
import { type AfterLLMCallHook, type BeforeLLMCallHook } from "./hooks.js";
|
|
3
|
+
import { type InputFiles } from "./input-files.js";
|
|
4
|
+
import { type LLM, type LLMClient, type UsageMetrics } from "./llm.js";
|
|
5
|
+
import { LiteAgentOutput } from "./lite-agent-output.js";
|
|
6
|
+
import { Memory, type MemoryScope } from "./memory.js";
|
|
7
|
+
import { AgentFinish } from "./agent-parser.js";
|
|
8
|
+
import type { AgentStepCallback, LLMMessage, Tool } from "./types.js";
|
|
9
|
+
export type LiteAgentGuardrailResult = readonly [boolean, unknown] | {
|
|
10
|
+
success: boolean;
|
|
11
|
+
result?: unknown;
|
|
12
|
+
error?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export type LiteAgentGuardrail = (output: LiteAgentOutput) => LiteAgentGuardrailResult | Promise<LiteAgentGuardrailResult>;
|
|
15
|
+
type ModelDumpOptions = {
|
|
16
|
+
mode?: string;
|
|
17
|
+
exclude?: ReadonlySet<string> | readonly string[] | Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
export type LiteAgentKickoffOptions = {
|
|
20
|
+
responseFormat?: unknown;
|
|
21
|
+
response_format?: unknown;
|
|
22
|
+
inputFiles?: InputFiles;
|
|
23
|
+
input_files?: InputFiles;
|
|
24
|
+
};
|
|
25
|
+
export type LiteAgentOptions = {
|
|
26
|
+
id?: string;
|
|
27
|
+
role: string;
|
|
28
|
+
goal: string;
|
|
29
|
+
backstory: string;
|
|
30
|
+
llm?: LLM | string | null;
|
|
31
|
+
tools?: readonly Tool[];
|
|
32
|
+
verbose?: boolean;
|
|
33
|
+
maxIterations?: number;
|
|
34
|
+
max_iterations?: number;
|
|
35
|
+
maxExecutionTime?: number | null;
|
|
36
|
+
max_execution_time?: number | null;
|
|
37
|
+
respectContextWindow?: boolean;
|
|
38
|
+
respect_context_window?: boolean;
|
|
39
|
+
useStopWords?: boolean;
|
|
40
|
+
use_stop_words?: boolean;
|
|
41
|
+
requestWithinRpmLimit?: (() => boolean) | null;
|
|
42
|
+
request_within_rpm_limit?: (() => boolean) | null;
|
|
43
|
+
responseFormat?: unknown;
|
|
44
|
+
response_format?: unknown;
|
|
45
|
+
guardrail?: LiteAgentGuardrail | null;
|
|
46
|
+
guardrailMaxRetries?: number;
|
|
47
|
+
guardrail_max_retries?: number;
|
|
48
|
+
memory?: Memory | MemoryScope | boolean | null;
|
|
49
|
+
stepCallback?: AgentStepCallback | null;
|
|
50
|
+
step_callback?: AgentStepCallback | null;
|
|
51
|
+
codeExecutionMode?: CodeExecutionMode;
|
|
52
|
+
code_execution_mode?: CodeExecutionMode;
|
|
53
|
+
a2a?: unknown;
|
|
54
|
+
};
|
|
55
|
+
export type LiteAgentKickoffInput = string | readonly LLMMessage[];
|
|
56
|
+
export type LiteAgentKickoffFunction = (messages: LiteAgentKickoffInput, responseFormatOrOptions?: unknown, inputFiles?: InputFiles) => LiteAgentOutput | Promise<LiteAgentOutput>;
|
|
57
|
+
export declare function _kickoff_with_a2a_support(agent: LiteAgent, original_kickoff: LiteAgentKickoffFunction, messages: LiteAgentKickoffInput, response_format?: unknown, input_files?: InputFiles | null, extension_registry?: import("./a2a.js").ExtensionRegistry): Promise<LiteAgentOutput>;
|
|
58
|
+
export declare function task_to_kickoff_adapter(original_kickoff: LiteAgentKickoffFunction, messages: LiteAgentKickoffInput, response_format?: unknown, input_files?: InputFiles | null): (...args: unknown[]) => Promise<string>;
|
|
59
|
+
export declare class LiteAgent {
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly role: string;
|
|
62
|
+
readonly goal: string;
|
|
63
|
+
readonly backstory: string;
|
|
64
|
+
llm: LLM | LLMClient | string | null;
|
|
65
|
+
readonly tools: readonly Tool[];
|
|
66
|
+
readonly verbose: boolean;
|
|
67
|
+
readonly maxIterations: number;
|
|
68
|
+
readonly max_iterations: number;
|
|
69
|
+
readonly maxExecutionTime: number | null;
|
|
70
|
+
readonly max_execution_time: number | null;
|
|
71
|
+
readonly respectContextWindow: boolean;
|
|
72
|
+
readonly respect_context_window: boolean;
|
|
73
|
+
readonly useStopWords: boolean;
|
|
74
|
+
readonly use_stop_words: boolean;
|
|
75
|
+
readonly requestWithinRpmLimit: (() => boolean) | null;
|
|
76
|
+
readonly request_within_rpm_limit: (() => boolean) | null;
|
|
77
|
+
readonly responseFormat: unknown;
|
|
78
|
+
readonly response_format: unknown;
|
|
79
|
+
readonly guardrail: LiteAgentGuardrail | null;
|
|
80
|
+
readonly guardrailMaxRetries: number;
|
|
81
|
+
readonly guardrail_max_retries: number;
|
|
82
|
+
memory: Memory | MemoryScope | null;
|
|
83
|
+
readonly stepCallback: AgentStepCallback | null;
|
|
84
|
+
readonly codeExecutionMode: CodeExecutionMode;
|
|
85
|
+
readonly code_execution_mode: CodeExecutionMode;
|
|
86
|
+
readonly a2a: unknown;
|
|
87
|
+
readonly originalAgent: Agent | null;
|
|
88
|
+
readonly original_agent: Agent | null;
|
|
89
|
+
toolsResults: Record<string, unknown>[];
|
|
90
|
+
tools_results: Record<string, unknown>[];
|
|
91
|
+
private readonly _key;
|
|
92
|
+
private currentMessages;
|
|
93
|
+
private currentIterations;
|
|
94
|
+
private usageMetrics;
|
|
95
|
+
constructor(options: LiteAgentOptions);
|
|
96
|
+
get key(): string;
|
|
97
|
+
get messages(): readonly LLMMessage[];
|
|
98
|
+
get iterations(): number;
|
|
99
|
+
get _original_role(): string;
|
|
100
|
+
get beforeLlmCallHooks(): BeforeLLMCallHook[];
|
|
101
|
+
get before_llm_call_hooks(): BeforeLLMCallHook[];
|
|
102
|
+
get afterLlmCallHooks(): AfterLLMCallHook[];
|
|
103
|
+
get after_llm_call_hooks(): AfterLLMCallHook[];
|
|
104
|
+
setupLlm(): this;
|
|
105
|
+
setup_llm(): this;
|
|
106
|
+
parseTools(): this;
|
|
107
|
+
parse_tools(): this;
|
|
108
|
+
setupA2aSupport(): this;
|
|
109
|
+
setup_a2a_support(): this;
|
|
110
|
+
ensureGuardrailIsCallable(): this;
|
|
111
|
+
ensure_guardrail_is_callable(): this;
|
|
112
|
+
resolveMemory(): this;
|
|
113
|
+
resolve_memory(): this;
|
|
114
|
+
static validateGuardrailFunction(value: LiteAgentGuardrail | string | null | undefined): LiteAgentGuardrail | string | null | undefined;
|
|
115
|
+
static validate_guardrail_function(value: LiteAgentGuardrail | string | null | undefined): LiteAgentGuardrail | string | null | undefined;
|
|
116
|
+
modelDump(options?: ModelDumpOptions): Record<string, unknown>;
|
|
117
|
+
model_dump(options?: ModelDumpOptions): Record<string, unknown>;
|
|
118
|
+
kickoff(messages: LiteAgentKickoffInput, responseFormatOrOptions?: unknown, inputFiles?: InputFiles): Promise<LiteAgentOutput>;
|
|
119
|
+
kickoffAsync(messages: LiteAgentKickoffInput, responseFormatOrOptions?: unknown, inputFiles?: InputFiles): Promise<LiteAgentOutput>;
|
|
120
|
+
kickoff_async(messages: LiteAgentKickoffInput, responseFormatOrOptions?: unknown, inputFiles?: InputFiles): Promise<LiteAgentOutput>;
|
|
121
|
+
akickoff(messages: LiteAgentKickoffInput, responseFormatOrOptions?: unknown, inputFiles?: InputFiles): Promise<LiteAgentOutput>;
|
|
122
|
+
_invokeLoop(responseModel?: unknown): Promise<AgentFinish>;
|
|
123
|
+
_invoke_loop(response_model?: unknown): Promise<AgentFinish>;
|
|
124
|
+
_executeCore(agentInfo?: Record<string, unknown> | null): Promise<LiteAgentOutput>;
|
|
125
|
+
_execute_core(agent_info?: Record<string, unknown> | null): Promise<LiteAgentOutput>;
|
|
126
|
+
getUsageMetrics(): UsageMetrics;
|
|
127
|
+
get_usage_metrics(): UsageMetrics;
|
|
128
|
+
getTokenUsageSummary(): UsageMetrics;
|
|
129
|
+
get_token_usage_summary(): UsageMetrics;
|
|
130
|
+
resetUsageMetrics(): void;
|
|
131
|
+
reset_usage_metrics(): void;
|
|
132
|
+
_formatMessages(messages: LiteAgentKickoffInput, responseFormat?: unknown, inputFiles?: InputFiles): LLMMessage[];
|
|
133
|
+
_format_messages(messages: LiteAgentKickoffInput, response_format?: unknown, input_files?: InputFiles): LLMMessage[];
|
|
134
|
+
_getDefaultSystemPrompt(responseFormat?: unknown): string;
|
|
135
|
+
_get_default_system_prompt(response_format?: unknown): string;
|
|
136
|
+
_serializeResponseFormat(value: unknown): unknown;
|
|
137
|
+
_serialize_response_format(value: unknown): unknown;
|
|
138
|
+
_showLogs(formattedAnswer: unknown): void;
|
|
139
|
+
_show_logs(formatted_answer: unknown): void;
|
|
140
|
+
_getLastUserContent(): string;
|
|
141
|
+
_get_last_user_content(): string;
|
|
142
|
+
_appendMessage(message: LLMMessage): void;
|
|
143
|
+
_append_message(message: LLMMessage): void;
|
|
144
|
+
_injectMemoryContext(): void;
|
|
145
|
+
_inject_memory_context(): void;
|
|
146
|
+
_saveToMemory(outputText: string): void;
|
|
147
|
+
_save_to_memory(output_text: string): void;
|
|
148
|
+
private toolsWithMemoryTools;
|
|
149
|
+
private toAgent;
|
|
150
|
+
private agentInfo;
|
|
151
|
+
private captureStepCallback;
|
|
152
|
+
private applyGuardrail;
|
|
153
|
+
}
|
|
154
|
+
export {};
|