@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
package/dist/crew.d.ts
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import type { PathLike } from "node:fs";
|
|
2
|
+
import { Agent } from "./agent.js";
|
|
3
|
+
import { FlowTrackable, type ExecutionContext } from "./context.js";
|
|
4
|
+
import type { HumanInputProvider } from "./human-input.js";
|
|
5
|
+
import { Knowledge, type KnowledgeSource } from "./knowledge.js";
|
|
6
|
+
import { type UsageMetrics } from "./llm.js";
|
|
7
|
+
import { Memory, MemoryScope } from "./memory.js";
|
|
8
|
+
import { CrewOutput, TaskOutput } from "./outputs.js";
|
|
9
|
+
import { type Fingerprint, type SecurityConfig } from "./security.js";
|
|
10
|
+
import { type CheckpointConfig, type CheckpointOption } from "./state.js";
|
|
11
|
+
import { ConditionalTask, Task, type TaskInputFiles } from "./task.js";
|
|
12
|
+
import { TaskOutputStorageHandler } from "./task-output-storage.js";
|
|
13
|
+
import { Process, type AgentStepCallback, type CrewKickoffCallback, type InputValues, type TaskCallback, type Tool } from "./types.js";
|
|
14
|
+
import type { LLM } from "./types.js";
|
|
15
|
+
import type { EmbedderConfig } from "./rag.js";
|
|
16
|
+
type PathLikeString = PathLike | {
|
|
17
|
+
toString(): string;
|
|
18
|
+
};
|
|
19
|
+
export type KickoffOptions = {
|
|
20
|
+
inputs?: InputValues;
|
|
21
|
+
inputFiles?: TaskInputFiles;
|
|
22
|
+
input_files?: TaskInputFiles;
|
|
23
|
+
};
|
|
24
|
+
export type KickoffInput = KickoffOptions | InputValues;
|
|
25
|
+
export type KickoffForEachOptions = {
|
|
26
|
+
inputs: readonly InputValues[];
|
|
27
|
+
inputFiles?: TaskInputFiles;
|
|
28
|
+
input_files?: TaskInputFiles;
|
|
29
|
+
};
|
|
30
|
+
export type KickoffForEachInput = KickoffForEachOptions | readonly InputValues[];
|
|
31
|
+
export type TaskExecutionLog = {
|
|
32
|
+
task: {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string | null;
|
|
35
|
+
description: string;
|
|
36
|
+
expectedOutput: string;
|
|
37
|
+
};
|
|
38
|
+
output: {
|
|
39
|
+
description: string;
|
|
40
|
+
summary?: string;
|
|
41
|
+
raw: string;
|
|
42
|
+
pydantic: unknown;
|
|
43
|
+
jsonDict: Record<string, unknown> | null;
|
|
44
|
+
outputFormat: string;
|
|
45
|
+
agent: string;
|
|
46
|
+
messages?: readonly unknown[];
|
|
47
|
+
};
|
|
48
|
+
taskIndex: number;
|
|
49
|
+
inputs: InputValues;
|
|
50
|
+
wasReplayed?: boolean;
|
|
51
|
+
};
|
|
52
|
+
type PendingTaskExecution = {
|
|
53
|
+
task: Task;
|
|
54
|
+
taskIndex: number;
|
|
55
|
+
inputs: InputValues;
|
|
56
|
+
promise: Promise<TaskOutput>;
|
|
57
|
+
};
|
|
58
|
+
type PendingTaskTuple = readonly [Task, Promise<TaskOutput>, number];
|
|
59
|
+
export type ReplayTaskRef = string | number | Task;
|
|
60
|
+
export type ReplayOptions = {
|
|
61
|
+
taskId?: ReplayTaskRef;
|
|
62
|
+
task_id?: ReplayTaskRef;
|
|
63
|
+
inputs?: InputValues;
|
|
64
|
+
};
|
|
65
|
+
export type ResetMemoriesCommandType = "memory" | "knowledge" | "agent_knowledge" | "kickoff_outputs" | "all" | "long" | "short" | "entity" | "external";
|
|
66
|
+
type NormalizedResetMemoriesCommandType = Exclude<ReturnType<typeof normalizeResetMemoriesCommandType>, "all">;
|
|
67
|
+
type MemorySystemConfig = {
|
|
68
|
+
system: Memory | MemoryScope | readonly Knowledge[] | Crew | null;
|
|
69
|
+
name: string;
|
|
70
|
+
reset: (system: Memory | MemoryScope | readonly Knowledge[] | Crew) => void;
|
|
71
|
+
};
|
|
72
|
+
export declare function _resolve_agent(value: unknown, _info?: unknown): unknown;
|
|
73
|
+
export declare function _resolve_agents(value: unknown, info?: unknown): unknown;
|
|
74
|
+
export declare function default_reset(memory: {
|
|
75
|
+
reset: () => unknown;
|
|
76
|
+
}): unknown;
|
|
77
|
+
export declare function knowledge_reset(crew: {
|
|
78
|
+
resetKnowledge?: (knowledges: readonly Knowledge[]) => void;
|
|
79
|
+
reset_knowledge?: (knowledges: readonly Knowledge[]) => void;
|
|
80
|
+
}, knowledges: readonly Knowledge[]): void;
|
|
81
|
+
export type CrewOptions = {
|
|
82
|
+
id?: string;
|
|
83
|
+
fromCheckpoint?: boolean;
|
|
84
|
+
from_checkpoint?: boolean;
|
|
85
|
+
name?: string | null;
|
|
86
|
+
config?: string | Record<string, unknown> | null;
|
|
87
|
+
agents?: readonly Agent[];
|
|
88
|
+
tasks?: readonly Task[];
|
|
89
|
+
process?: Process;
|
|
90
|
+
verbose?: boolean;
|
|
91
|
+
cache?: boolean;
|
|
92
|
+
embedder?: EmbedderConfig | null;
|
|
93
|
+
usageMetrics?: UsageMetrics | null;
|
|
94
|
+
usage_metrics?: UsageMetrics | null;
|
|
95
|
+
tokenUsage?: UsageMetrics | null;
|
|
96
|
+
token_usage?: UsageMetrics | null;
|
|
97
|
+
maxRpm?: number | null;
|
|
98
|
+
max_rpm?: number | null;
|
|
99
|
+
outputLogFile?: boolean | string | null;
|
|
100
|
+
output_log_file?: boolean | string | null;
|
|
101
|
+
taskExecutionOutputJsonFiles?: readonly string[] | null;
|
|
102
|
+
task_execution_output_json_files?: readonly string[] | null;
|
|
103
|
+
promptFile?: string | null;
|
|
104
|
+
prompt_file?: string | null;
|
|
105
|
+
shareCrew?: boolean | null;
|
|
106
|
+
share_crew?: boolean | null;
|
|
107
|
+
memory?: boolean | Memory | MemoryScope;
|
|
108
|
+
knowledge?: Knowledge | null;
|
|
109
|
+
knowledgeSources?: readonly KnowledgeSource[];
|
|
110
|
+
knowledge_sources?: readonly KnowledgeSource[];
|
|
111
|
+
managerAgent?: Agent | null;
|
|
112
|
+
manager_agent?: Agent | null;
|
|
113
|
+
managerLlm?: LLM | string | null;
|
|
114
|
+
manager_llm?: LLM | string | null;
|
|
115
|
+
functionCallingLlm?: LLM | string | null;
|
|
116
|
+
function_calling_llm?: LLM | string | null;
|
|
117
|
+
planning?: boolean | null;
|
|
118
|
+
stream?: boolean;
|
|
119
|
+
planningLlm?: LLM | string | null;
|
|
120
|
+
planning_llm?: LLM | string | null;
|
|
121
|
+
chatLlm?: LLM | string | null;
|
|
122
|
+
chat_llm?: LLM | string | null;
|
|
123
|
+
skills?: readonly unknown[];
|
|
124
|
+
humanInputProvider?: HumanInputProvider | null;
|
|
125
|
+
human_input_provider?: HumanInputProvider | null;
|
|
126
|
+
stepCallback?: AgentStepCallback | null;
|
|
127
|
+
step_callback?: AgentStepCallback | null;
|
|
128
|
+
taskCallback?: TaskCallback | null;
|
|
129
|
+
task_callback?: TaskCallback | null;
|
|
130
|
+
beforeKickoffCallbacks?: readonly CrewKickoffCallback<InputValues>[];
|
|
131
|
+
before_kickoff_callbacks?: readonly CrewKickoffCallback<InputValues>[];
|
|
132
|
+
afterKickoffCallbacks?: readonly CrewKickoffCallback<CrewOutput>[];
|
|
133
|
+
after_kickoff_callbacks?: readonly CrewKickoffCallback<CrewOutput>[];
|
|
134
|
+
securityConfig?: SecurityConfig | null;
|
|
135
|
+
security_config?: SecurityConfig | null;
|
|
136
|
+
checkpoint?: CheckpointOption;
|
|
137
|
+
tracing?: boolean | null;
|
|
138
|
+
executionContext?: ExecutionContext | null;
|
|
139
|
+
execution_context?: ExecutionContext | null;
|
|
140
|
+
checkpointInputs?: InputValues | null;
|
|
141
|
+
checkpoint_inputs?: InputValues | null;
|
|
142
|
+
checkpointTrain?: boolean | null;
|
|
143
|
+
checkpoint_train?: boolean | null;
|
|
144
|
+
checkpointKickoffEventId?: string | null;
|
|
145
|
+
checkpoint_kickoff_event_id?: string | null;
|
|
146
|
+
taskOutputStorageHandler?: TaskOutputStorageHandler | null;
|
|
147
|
+
task_output_storage_handler?: TaskOutputStorageHandler | null;
|
|
148
|
+
trainedAgentsFile?: PathLikeString | null;
|
|
149
|
+
trained_agents_file?: PathLikeString | null;
|
|
150
|
+
};
|
|
151
|
+
export declare class Crew extends FlowTrackable {
|
|
152
|
+
readonly entityType = "crew";
|
|
153
|
+
readonly entity_type = "crew";
|
|
154
|
+
readonly id: string;
|
|
155
|
+
name: string | null;
|
|
156
|
+
config: Record<string, unknown> | null;
|
|
157
|
+
agents: Agent[];
|
|
158
|
+
tasks: Task[];
|
|
159
|
+
process: Process;
|
|
160
|
+
verbose: boolean;
|
|
161
|
+
cache: boolean;
|
|
162
|
+
embedder: EmbedderConfig | null;
|
|
163
|
+
maxRpm: number | null;
|
|
164
|
+
outputLogFile: boolean | string | null;
|
|
165
|
+
taskExecutionOutputJsonFiles: readonly string[] | null;
|
|
166
|
+
promptFile: string | null;
|
|
167
|
+
prompt_file: string | null;
|
|
168
|
+
shareCrew: boolean | null;
|
|
169
|
+
share_crew: boolean | null;
|
|
170
|
+
executionLogs: TaskExecutionLog[];
|
|
171
|
+
memory: boolean | Memory | MemoryScope;
|
|
172
|
+
knowledge: Knowledge | null;
|
|
173
|
+
knowledgeSources: readonly KnowledgeSource[];
|
|
174
|
+
managerAgent: Agent | null;
|
|
175
|
+
manager_agent: Agent | null;
|
|
176
|
+
managerLlm: LLM | string | null;
|
|
177
|
+
functionCallingLlm: LLM | string | null;
|
|
178
|
+
function_calling_llm: LLM | string | null;
|
|
179
|
+
planning: boolean;
|
|
180
|
+
stream: boolean;
|
|
181
|
+
planningLlm: LLM | string | null;
|
|
182
|
+
chatLlm: LLM | string | null;
|
|
183
|
+
chat_llm: LLM | string | null;
|
|
184
|
+
skills: readonly unknown[];
|
|
185
|
+
humanInputProvider: HumanInputProvider | null;
|
|
186
|
+
stepCallback: AgentStepCallback | null;
|
|
187
|
+
taskCallback: TaskCallback | null;
|
|
188
|
+
usageMetrics: UsageMetrics;
|
|
189
|
+
usage_metrics: UsageMetrics;
|
|
190
|
+
tokenUsage: UsageMetrics;
|
|
191
|
+
token_usage: UsageMetrics;
|
|
192
|
+
private planningUsageMetrics;
|
|
193
|
+
private readonly rpmController;
|
|
194
|
+
private readonly cacheHandler;
|
|
195
|
+
private readonly fileHandler;
|
|
196
|
+
private readonly resolvedMemory;
|
|
197
|
+
beforeKickoffCallbacks: CrewKickoffCallback<InputValues>[];
|
|
198
|
+
afterKickoffCallbacks: CrewKickoffCallback<CrewOutput>[];
|
|
199
|
+
readonly securityConfig: SecurityConfig;
|
|
200
|
+
readonly security_config: SecurityConfig;
|
|
201
|
+
checkpoint: CheckpointConfig | false | null;
|
|
202
|
+
tracing: boolean | null;
|
|
203
|
+
executionContext: ExecutionContext | null;
|
|
204
|
+
execution_context: ExecutionContext | null;
|
|
205
|
+
checkpointInputs: InputValues | null;
|
|
206
|
+
checkpoint_inputs: InputValues | null;
|
|
207
|
+
checkpointTrain: boolean | null;
|
|
208
|
+
checkpoint_train: boolean | null;
|
|
209
|
+
checkpointKickoffEventId: string | null;
|
|
210
|
+
checkpoint_kickoff_event_id: string | null;
|
|
211
|
+
readonly taskOutputStorageHandler: TaskOutputStorageHandler | null;
|
|
212
|
+
readonly task_output_storage_handler: TaskOutputStorageHandler | null;
|
|
213
|
+
trainedAgentsFile: string | null;
|
|
214
|
+
trained_agents_file: string | null;
|
|
215
|
+
constructor(options?: CrewOptions);
|
|
216
|
+
static fromCheckpoint(config: CheckpointConfig): Promise<Crew>;
|
|
217
|
+
static from_checkpoint(config: CheckpointConfig): Promise<Crew>;
|
|
218
|
+
static fork(config: CheckpointConfig, branch?: string | null): Promise<Crew>;
|
|
219
|
+
static dropUnresolvableCallbacks<T>(value: T[] | T): T[] | T;
|
|
220
|
+
static _drop_unresolvable_callbacks<T>(value: T[] | T): T[] | T;
|
|
221
|
+
static denyUserSetId(value: string | null | undefined, context?: {
|
|
222
|
+
fromCheckpoint?: boolean;
|
|
223
|
+
from_checkpoint?: boolean;
|
|
224
|
+
} | null): string | null | undefined;
|
|
225
|
+
static _deny_user_set_id(value: string | null | undefined, context?: {
|
|
226
|
+
fromCheckpoint?: boolean;
|
|
227
|
+
from_checkpoint?: boolean;
|
|
228
|
+
} | null): string | null | undefined;
|
|
229
|
+
static coerceSkillStrings(skills: unknown): unknown;
|
|
230
|
+
static coerce_skill_strings(skills: unknown): unknown;
|
|
231
|
+
static checkConfigType(value: string | Record<string, unknown> | null): Record<string, unknown> | null;
|
|
232
|
+
static check_config_type(value: string | Record<string, unknown> | null): Record<string, unknown> | null;
|
|
233
|
+
get fingerprint(): Fingerprint;
|
|
234
|
+
get key(): string;
|
|
235
|
+
toJSON(): Record<string, unknown>;
|
|
236
|
+
setPrivateAttrs(): this;
|
|
237
|
+
restoreRuntime(): void;
|
|
238
|
+
_restore_runtime(): void;
|
|
239
|
+
rebindMemoryViews(): void;
|
|
240
|
+
_rebind_memory_views(): void;
|
|
241
|
+
restoreEventScope(): void;
|
|
242
|
+
_restore_event_scope(): void;
|
|
243
|
+
set_private_attrs(): this;
|
|
244
|
+
createCrewMemory(): this;
|
|
245
|
+
create_crew_memory(): this;
|
|
246
|
+
createCrewKnowledge(): this;
|
|
247
|
+
create_crew_knowledge(): this;
|
|
248
|
+
checkManagerLlm(): this;
|
|
249
|
+
check_manager_llm(): this;
|
|
250
|
+
checkConfig(): this;
|
|
251
|
+
check_config(): this;
|
|
252
|
+
validateTasks(): this;
|
|
253
|
+
validate_tasks(): this;
|
|
254
|
+
validateEndWithAtMostOneAsyncTask(): this;
|
|
255
|
+
validate_end_with_at_most_one_async_task(): this;
|
|
256
|
+
validateMustHaveNonConditionalTask(): this;
|
|
257
|
+
validate_must_have_non_conditional_task(): this;
|
|
258
|
+
validateFirstTask(): this;
|
|
259
|
+
validate_first_task(): this;
|
|
260
|
+
validateAsyncTasksNotAsync(): this;
|
|
261
|
+
validate_async_tasks_not_async(): this;
|
|
262
|
+
validateAsyncTaskCannotIncludeSequentialAsyncTasksInContext(): this;
|
|
263
|
+
validate_async_task_cannot_include_sequential_async_tasks_in_context(): this;
|
|
264
|
+
validateContextNoFutureTasks(): this;
|
|
265
|
+
validate_context_no_future_tasks(): this;
|
|
266
|
+
private setUsageMetrics;
|
|
267
|
+
configureAgents(): void;
|
|
268
|
+
kickoff(options?: KickoffInput, inputFiles?: TaskInputFiles | null): Promise<CrewOutput>;
|
|
269
|
+
kickoffAsync(options?: KickoffInput, inputFiles?: TaskInputFiles | null): Promise<CrewOutput>;
|
|
270
|
+
kickoff_async(options?: KickoffInput, inputFiles?: TaskInputFiles | null): Promise<CrewOutput>;
|
|
271
|
+
akickoff(options?: KickoffInput, inputFiles?: TaskInputFiles | null): Promise<CrewOutput>;
|
|
272
|
+
kickoffForEach(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
273
|
+
kickoff_for_each(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
274
|
+
kickoffForEachAsync(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
275
|
+
kickoff_for_each_async(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
276
|
+
akickoffForEach(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
277
|
+
akickoff_for_each(options: KickoffForEachInput): Promise<CrewOutput[]>;
|
|
278
|
+
train(nIterations: number, filename: string, inputs?: InputValues | null): Promise<void>;
|
|
279
|
+
test(nIterations: number, evalLlm: LLM | string | null, inputs?: InputValues | null): Promise<string>;
|
|
280
|
+
replay(taskRef: ReplayTaskRef | ReplayOptions, inputs?: InputValues): Promise<CrewOutput>;
|
|
281
|
+
private restoreReplayTaskOutputs;
|
|
282
|
+
copy(): Crew;
|
|
283
|
+
runSequentialProcessCompat(inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
284
|
+
_run_sequential_process(inputs?: InputValues, input_files?: TaskInputFiles): Promise<CrewOutput>;
|
|
285
|
+
arunSequentialProcess(inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
286
|
+
_arun_sequential_process(inputs?: InputValues, input_files?: TaskInputFiles): Promise<CrewOutput>;
|
|
287
|
+
runHierarchicalProcessCompat(inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
288
|
+
_run_hierarchical_process(inputs?: InputValues, input_files?: TaskInputFiles): Promise<CrewOutput>;
|
|
289
|
+
arunHierarchicalProcess(inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
290
|
+
_arun_hierarchical_process(inputs?: InputValues, input_files?: TaskInputFiles): Promise<CrewOutput>;
|
|
291
|
+
createManagerAgent(): Agent;
|
|
292
|
+
_create_manager_agent(): Agent;
|
|
293
|
+
getExecutionStartIndex(tasks?: readonly Task[]): number | null;
|
|
294
|
+
_get_execution_start_index(tasks?: readonly Task[]): number | null;
|
|
295
|
+
processAsyncTaskResults(pendingTasks: readonly (PendingTaskExecution | PendingTaskTuple)[], wasReplayed?: boolean): Promise<TaskOutput[]>;
|
|
296
|
+
_process_async_tasks(pending_tasks: readonly (PendingTaskExecution | PendingTaskTuple)[], was_replayed?: boolean): Promise<TaskOutput[]>;
|
|
297
|
+
logTaskStartCompat(task: Task, role?: string | Agent | null): void;
|
|
298
|
+
_log_task_start(task: Task, role?: string | Agent | null): Promise<void>;
|
|
299
|
+
storeExecutionLogCompat(task: Task, output: TaskOutput, taskIndex: number, wasReplayed?: boolean, inputs?: InputValues): Promise<void>;
|
|
300
|
+
_store_execution_log(task: Task, output: TaskOutput, task_index: number, was_replayed?: boolean, inputs?: InputValues): Promise<void>;
|
|
301
|
+
private runProcess;
|
|
302
|
+
setupFromConfigCompat(): void;
|
|
303
|
+
_setup_from_config(): void;
|
|
304
|
+
createTask(taskConfig: Record<string, unknown>): Task;
|
|
305
|
+
_create_task(task_config: Record<string, unknown>): Task;
|
|
306
|
+
setupForTraining(filename: string): Promise<void>;
|
|
307
|
+
_setup_for_training(filename: string): Promise<void>;
|
|
308
|
+
postKickoff(result: CrewOutput): CrewOutput;
|
|
309
|
+
_post_kickoff(result: CrewOutput): CrewOutput;
|
|
310
|
+
aexecuteTasks(tasks?: readonly Task[], startIndex?: number | null, wasReplayed?: boolean, inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
311
|
+
_aexecute_tasks(tasks?: readonly Task[], start_index?: number | null, was_replayed?: boolean): Promise<CrewOutput>;
|
|
312
|
+
ahandleConditionalTask(task: ConditionalTask, taskOutputs: TaskOutput[], pendingTasks?: (PendingTaskExecution | PendingTaskTuple)[], taskIndex?: number, wasReplayed?: boolean): Promise<TaskOutput | null>;
|
|
313
|
+
_ahandle_conditional_task(task: ConditionalTask, task_outputs: TaskOutput[], pending_tasks?: (PendingTaskExecution | PendingTaskTuple)[], task_index?: number, was_replayed?: boolean): Promise<TaskOutput | null>;
|
|
314
|
+
aprocessAsyncTasks(pendingTasks: readonly (PendingTaskExecution | PendingTaskTuple)[], wasReplayed?: boolean): Promise<TaskOutput[]>;
|
|
315
|
+
_aprocess_async_tasks(pending_tasks: readonly (PendingTaskExecution | PendingTaskTuple)[], was_replayed?: boolean): Promise<TaskOutput[]>;
|
|
316
|
+
handleCrewPlanningCompat(): Promise<void>;
|
|
317
|
+
_handle_crew_planning(): Promise<void>;
|
|
318
|
+
executeTasks(tasks?: readonly Task[], startIndex?: number | null, wasReplayed?: boolean, inputs?: InputValues, inputFiles?: TaskInputFiles): Promise<CrewOutput>;
|
|
319
|
+
_execute_tasks(tasks?: readonly Task[], start_index?: number | null, was_replayed?: boolean): Promise<CrewOutput>;
|
|
320
|
+
setTasksCallbacks(): void;
|
|
321
|
+
_set_tasks_callbacks(): void;
|
|
322
|
+
interpolateInputs(inputs: InputValues, options?: {
|
|
323
|
+
strictMissing?: boolean;
|
|
324
|
+
}): void;
|
|
325
|
+
_interpolate_inputs(inputs: InputValues): void;
|
|
326
|
+
finishExecution(finalStringOutput?: string): void;
|
|
327
|
+
_finish_execution(final_string_output?: string): void;
|
|
328
|
+
static showTracingDisabledMessage(): void;
|
|
329
|
+
static _show_tracing_disabled_message(): void;
|
|
330
|
+
private setupFromConfig;
|
|
331
|
+
private agentForTaskConfig;
|
|
332
|
+
private withStreamDisabled;
|
|
333
|
+
private createForEachStreamingOutputs;
|
|
334
|
+
private handleCrewPlanning;
|
|
335
|
+
private runSequentialProcess;
|
|
336
|
+
private runHierarchicalProcess;
|
|
337
|
+
private processAsyncTasks;
|
|
338
|
+
private logTaskStart;
|
|
339
|
+
private logTaskResult;
|
|
340
|
+
private storeExecutionLog;
|
|
341
|
+
private validateSequentialTasks;
|
|
342
|
+
private validateConditionalTasks;
|
|
343
|
+
private handleConditionalTask;
|
|
344
|
+
private contextForTask;
|
|
345
|
+
private triggerPayloadForTask;
|
|
346
|
+
private replaySequentialProcess;
|
|
347
|
+
private replayHierarchicalProcess;
|
|
348
|
+
private findReplayStartIndex;
|
|
349
|
+
private validateHierarchicalProcess;
|
|
350
|
+
private getManagerAgent;
|
|
351
|
+
private resolveMemory;
|
|
352
|
+
queryKnowledge(query: string | readonly string[], resultsLimit?: number, scoreThreshold?: number): import("./knowledge.js").KnowledgeSearchResult[] | null;
|
|
353
|
+
query_knowledge(query: string | readonly string[], results_limit?: number, score_threshold?: number): import("./knowledge.js").KnowledgeSearchResult[] | null;
|
|
354
|
+
aqueryKnowledge(query: string | readonly string[], resultsLimit?: number, scoreThreshold?: number): Promise<import("./knowledge.js").KnowledgeSearchResult[] | null>;
|
|
355
|
+
aquery_knowledge(query: string | readonly string[], results_limit?: number, score_threshold?: number): Promise<import("./knowledge.js").KnowledgeSearchResult[] | null>;
|
|
356
|
+
resetMemories(commandType: ResetMemoriesCommandType): void;
|
|
357
|
+
reset_memories(commandType: ResetMemoriesCommandType): void;
|
|
358
|
+
resetMemorySystem(system: Memory | MemoryScope | readonly Knowledge[] | Crew, _name: string, resetFn: (system: Memory | MemoryScope | readonly Knowledge[] | Crew) => void): void;
|
|
359
|
+
_reset_memory_system(system: Memory | MemoryScope | readonly Knowledge[] | Crew, name: string, reset_fn: (system: Memory | MemoryScope | readonly Knowledge[] | Crew) => void): void;
|
|
360
|
+
resetAllMemories(): void;
|
|
361
|
+
_reset_all_memories(): void;
|
|
362
|
+
resetSpecificMemory(memoryType: NormalizedResetMemoriesCommandType): void;
|
|
363
|
+
_reset_specific_memory(memory_type: NormalizedResetMemoriesCommandType): void;
|
|
364
|
+
getMemorySystems(): Record<NormalizedResetMemoriesCommandType, MemorySystemConfig>;
|
|
365
|
+
_get_memory_systems(): Record<NormalizedResetMemoriesCommandType, MemorySystemConfig>;
|
|
366
|
+
fetchInputs(): Set<string>;
|
|
367
|
+
fetch_inputs(): Set<string>;
|
|
368
|
+
resetKnowledge(knowledges: readonly Knowledge[]): void;
|
|
369
|
+
reset_knowledge(knowledges: readonly Knowledge[]): void;
|
|
370
|
+
setAllowCrewaiTriggerContextForFirstTask(inputs?: InputValues | null): void;
|
|
371
|
+
_set_allow_crewai_trigger_context_for_first_task(inputs?: InputValues | null): void;
|
|
372
|
+
getAgentToUse(task: Task): Agent | null;
|
|
373
|
+
_get_agent_to_use(task: Task): Agent | null;
|
|
374
|
+
static mergeTools(existingTools: readonly Tool[], newTools: readonly Tool[]): Tool[];
|
|
375
|
+
static _merge_tools(existing_tools: readonly Tool[], new_tools: readonly Tool[]): Tool[];
|
|
376
|
+
prepareTools(agent: Agent | null, task: Task, tools: readonly Tool[]): Tool[];
|
|
377
|
+
_prepare_tools(agent: Agent | null, task: Task, tools: readonly Tool[]): Tool[];
|
|
378
|
+
injectDelegationTools(tools: readonly Tool[], taskAgent: Agent, agents: readonly Agent[]): Tool[];
|
|
379
|
+
_inject_delegation_tools(tools: readonly Tool[], task_agent: Agent, agents: readonly Agent[]): Tool[];
|
|
380
|
+
injectPlatformTools(tools: readonly Tool[], taskAgent: Agent): Tool[];
|
|
381
|
+
_inject_platform_tools(tools: readonly Tool[], task_agent: Agent): Tool[];
|
|
382
|
+
injectMcpTools(tools: readonly Tool[], taskAgent: Agent): Tool[];
|
|
383
|
+
_inject_mcp_tools(tools: readonly Tool[], task_agent: Agent): Tool[];
|
|
384
|
+
addMultimodalTools(agent: Agent, tools: readonly Tool[]): Tool[];
|
|
385
|
+
_add_multimodal_tools(agent: Agent, tools: readonly Tool[]): Tool[];
|
|
386
|
+
addCodeExecutionTools(agent: Agent, tools: readonly Tool[]): Tool[];
|
|
387
|
+
_add_code_execution_tools(agent: Agent, tools: readonly Tool[]): Tool[];
|
|
388
|
+
addMemoryTools(tools: readonly Tool[], memory: Memory | MemoryScope): Tool[];
|
|
389
|
+
_add_memory_tools(tools: readonly Tool[], memory: Memory | MemoryScope): Tool[];
|
|
390
|
+
addFileTools(tools: readonly Tool[], files: TaskInputFiles): Tool[];
|
|
391
|
+
_add_file_tools(tools: readonly Tool[], files: TaskInputFiles): Tool[];
|
|
392
|
+
addDelegationTools(task: Task, tools: readonly Tool[]): Tool[];
|
|
393
|
+
_add_delegation_tools(task: Task, tools: readonly Tool[]): Tool[];
|
|
394
|
+
addPlatformTools(task: Task, tools: readonly Tool[]): Tool[];
|
|
395
|
+
_add_platform_tools(task: Task, tools: readonly Tool[]): Tool[];
|
|
396
|
+
addMcpTools(task: Task, tools: readonly Tool[]): Tool[];
|
|
397
|
+
_add_mcp_tools(task: Task, tools: readonly Tool[]): Tool[];
|
|
398
|
+
updateManagerTools(task: Task, tools: readonly Tool[]): Tool[];
|
|
399
|
+
_update_manager_tools(task: Task, tools: readonly Tool[]): Tool[];
|
|
400
|
+
getContext(task: Task, taskOutputs: readonly TaskOutput[]): string;
|
|
401
|
+
_get_context(task: Task, task_outputs: readonly TaskOutput[]): string;
|
|
402
|
+
handleConditionalTaskCompat(task: ConditionalTask, taskOutputs: TaskOutput[], pendingTasks?: (PendingTaskExecution | PendingTaskTuple)[], taskIndex?: number, wasReplayed?: boolean): Promise<TaskOutput | null>;
|
|
403
|
+
_handle_conditional_task(task: ConditionalTask, task_outputs: TaskOutput[], pending_tasks?: (PendingTaskExecution | PendingTaskTuple)[], task_index?: number, was_replayed?: boolean): Promise<TaskOutput | null>;
|
|
404
|
+
processTaskResult(task: Task, output: TaskOutput): Promise<void>;
|
|
405
|
+
_process_task_result(task: Task, output: TaskOutput): Promise<void>;
|
|
406
|
+
createCrewOutput(taskOutputs: readonly TaskOutput[]): CrewOutput;
|
|
407
|
+
_create_crew_output(task_outputs: readonly TaskOutput[]): CrewOutput;
|
|
408
|
+
static findTaskIndex(taskId: string, storedOutputs: readonly unknown[]): number | null;
|
|
409
|
+
static _find_task_index(task_id: string, stored_outputs: readonly unknown[]): number | null;
|
|
410
|
+
private toolsForTask;
|
|
411
|
+
private toolsForHierarchicalTask;
|
|
412
|
+
private applyCrewCache;
|
|
413
|
+
private stepCallbacksFor;
|
|
414
|
+
private coworkersFor;
|
|
415
|
+
private resetAvailableMemorySystems;
|
|
416
|
+
private resetSpecificMemorySystem;
|
|
417
|
+
private buildMemorySystems;
|
|
418
|
+
calculateUsageMetrics(): UsageMetrics;
|
|
419
|
+
calculate_usage_metrics(): UsageMetrics;
|
|
420
|
+
toString(): string;
|
|
421
|
+
__repr__(): string;
|
|
422
|
+
}
|
|
423
|
+
declare function normalizeResetMemoriesCommandType(commandType: ResetMemoriesCommandType): "memory" | "all" | "kickoff_outputs" | "knowledge" | "agent_knowledge";
|
|
424
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Crew } from "./crew.js";
|
|
2
|
+
type AnyMethod<This = unknown, Args extends unknown[] = unknown[], Return = unknown> = (this: This, ...args: Args) => Return;
|
|
3
|
+
export declare const agent: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
4
|
+
export declare const task: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
5
|
+
export declare const beforeKickoff: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
6
|
+
export declare const before_kickoff: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
7
|
+
export declare const afterKickoff: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
8
|
+
export declare const after_kickoff: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
9
|
+
export declare const tool: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
10
|
+
export declare const llm: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
11
|
+
export declare const callback: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
12
|
+
export declare const outputJson: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
13
|
+
export declare const output_json: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
14
|
+
export declare const outputPydantic: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
15
|
+
export declare const output_pydantic: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
16
|
+
export declare const cacheHandler: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
17
|
+
export declare const cache_handler: <This extends object, Args extends unknown[], Return>(value: AnyMethod<This, Args, Return>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Return>>) => AnyMethod<This, Args, Return>;
|
|
18
|
+
export declare function crew<This extends object, Args extends unknown[]>(value: AnyMethod<This, Args, Crew>, context: ClassMethodDecoratorContext<This, AnyMethod<This, Args, Crew>>): AnyMethod<This, Args, Crew>;
|
|
19
|
+
export declare function CrewBase<T extends abstract new (...args: never[]) => object>(constructor: T, context: ClassDecoratorContext<T>): T;
|
|
20
|
+
export {};
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const CC_ENV_VAR = "CLAUDECODE";
|
|
2
|
+
export declare const CODEX_ENV_VARS: readonly ["CODEX_CI", "CODEX_MANAGED_BY_NPM", "CODEX_SANDBOX", "CODEX_SANDBOX_NETWORK_DISABLED", "CODEX_THREAD_ID"];
|
|
3
|
+
export declare const CURSOR_ENV_VARS: readonly ["CURSOR_AGENT", "CURSOR_EXTENSION_HOST_ROLE", "CURSOR_SANDBOX", "CURSOR_TRACE_ID", "CURSOR_WORKSPACE_LABEL"];
|
|
4
|
+
export declare function isCodexEnv(env?: NodeJS.ProcessEnv): boolean;
|
|
5
|
+
export declare const is_codex_env: typeof isCodexEnv;
|
|
6
|
+
export declare const _is_codex_env: typeof isCodexEnv;
|
|
7
|
+
export declare function isCursorEnv(env?: NodeJS.ProcessEnv): boolean;
|
|
8
|
+
export declare const is_cursor_env: typeof isCursorEnv;
|
|
9
|
+
export declare const _is_cursor_env: typeof isCursorEnv;
|
|
10
|
+
export declare function getEnvContext(env?: NodeJS.ProcessEnv): void;
|
|
11
|
+
export declare const get_env_context: typeof getEnvContext;
|
|
12
|
+
export declare function resetEnvContextForTesting(): void;
|
|
13
|
+
export declare const reset_env_context_for_testing: typeof resetEnvContextForTesting;
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare class DatabaseOperationError extends Error {
|
|
2
|
+
readonly originalError: Error | null;
|
|
3
|
+
readonly original_error: Error | null;
|
|
4
|
+
constructor(message: string, originalError?: Error | null);
|
|
5
|
+
}
|
|
6
|
+
export declare const DatabaseError: {
|
|
7
|
+
readonly INIT_ERROR: "Database initialization error: {}";
|
|
8
|
+
readonly SAVE_ERROR: "Error saving task outputs: {}";
|
|
9
|
+
readonly UPDATE_ERROR: "Error updating task outputs: {}";
|
|
10
|
+
readonly LOAD_ERROR: "Error loading task outputs: {}";
|
|
11
|
+
readonly DELETE_ERROR: "Error deleting task outputs: {}";
|
|
12
|
+
readonly formatError: (template: string, error: Error) => string;
|
|
13
|
+
readonly format_error: (template: string, error: Error) => string;
|
|
14
|
+
};
|
|
15
|
+
export declare class AgentRepositoryError extends Error {
|
|
16
|
+
constructor(message: string);
|
|
17
|
+
}
|
|
18
|
+
export declare const CONTEXT_LIMIT_ERRORS: readonly ["expected a string with maximum length", "maximum context length", "context length exceeded", "context_length_exceeded", "context window full", "too many tokens", "input is too long", "exceeds token limit"];
|
|
19
|
+
export declare class LLMContextLengthExceededError extends Error {
|
|
20
|
+
readonly originalErrorMessage: string;
|
|
21
|
+
readonly original_error_message: string;
|
|
22
|
+
constructor(errorMessage: string);
|
|
23
|
+
static isContextLimitError(errorMessage: string): boolean;
|
|
24
|
+
static is_context_limit_error(errorMessage: string): boolean;
|
|
25
|
+
static getErrorMessage(errorMessage: string): string;
|
|
26
|
+
static get_error_message(errorMessage: string): string;
|
|
27
|
+
}
|