@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,194 @@
1
+ import { Settings } from "./settings.js";
2
+ export type HttpMethod = "GET" | "POST" | "PATCH" | "DELETE";
3
+ export type AvailableExport = {
4
+ name: string;
5
+ };
6
+ export type EnvVarEntry = {
7
+ name: string;
8
+ description: string;
9
+ required: boolean;
10
+ default: string | null;
11
+ };
12
+ export type ToolMetadata = {
13
+ name: string;
14
+ module: string;
15
+ humanized_name: string;
16
+ description: string;
17
+ run_params_schema: Record<string, unknown>;
18
+ init_params_schema: Record<string, unknown>;
19
+ env_vars: readonly EnvVarEntry[];
20
+ };
21
+ export type ToolsMetadataPayload = {
22
+ package: string;
23
+ tools: readonly ToolMetadata[] | null;
24
+ };
25
+ export type PublishToolPayload = {
26
+ handle: string;
27
+ public: boolean;
28
+ version: string;
29
+ file: string;
30
+ description: string | null;
31
+ available_exports: readonly AvailableExport[] | null;
32
+ tools_metadata: ToolsMetadataPayload | null;
33
+ };
34
+ export type CrewDeploymentSpec = {
35
+ name: string;
36
+ repo_clone_url: string;
37
+ env: Record<string, string>;
38
+ };
39
+ export type CreateCrewPayload = {
40
+ deploy: CrewDeploymentSpec;
41
+ };
42
+ export type TraceExecutionContext = {
43
+ crew_fingerprint: string | null;
44
+ crew_name: string | null;
45
+ flow_name: string | null;
46
+ crewai_version: string;
47
+ privacy_level: string;
48
+ };
49
+ export type TraceExecutionMetadata = {
50
+ expected_duration_estimate: number;
51
+ agent_count: number;
52
+ task_count: number;
53
+ flow_method_count: number;
54
+ execution_started_at: string;
55
+ };
56
+ export type TraceBatchInitPayload = {
57
+ user_identifier?: string;
58
+ trace_id: string;
59
+ execution_type: string;
60
+ execution_context: TraceExecutionContext;
61
+ execution_metadata: TraceExecutionMetadata;
62
+ ephemeral_trace_id?: string;
63
+ };
64
+ export type TraceBatchMetadata = {
65
+ events_count: number;
66
+ batch_sequence: number;
67
+ is_final_batch: boolean;
68
+ };
69
+ export type TraceEventsPayload = {
70
+ events: readonly Record<string, unknown>[];
71
+ batch_metadata: TraceBatchMetadata;
72
+ };
73
+ export type TraceFinalizePayload = {
74
+ status: "completed";
75
+ duration_ms: number | null;
76
+ final_event_count: number;
77
+ };
78
+ export type TraceFailedPayload = {
79
+ status: "failed";
80
+ failure_reason: string;
81
+ };
82
+ export type PlusApiResponse<T = unknown> = {
83
+ status: number;
84
+ ok: boolean;
85
+ headers: Headers;
86
+ json(): Promise<T>;
87
+ text(): Promise<string>;
88
+ };
89
+ export type PlusAPIOptions = {
90
+ apiKey?: string | null;
91
+ api_key?: string | null;
92
+ baseUrl?: string | null;
93
+ base_url?: string | null;
94
+ settings?: Settings;
95
+ fetch?: typeof fetch;
96
+ version?: string;
97
+ };
98
+ type MakeRequestOptions = {
99
+ json?: unknown;
100
+ params?: Record<string, string> | null;
101
+ timeout?: number | null;
102
+ verify?: boolean;
103
+ };
104
+ export declare class PlusAPI {
105
+ static readonly TOOLS_RESOURCE = "/crewai_plus/api/v1/tools";
106
+ static readonly SKILLS_RESOURCE = "/crewai_plus/api/v1/skills";
107
+ static readonly ORGANIZATIONS_RESOURCE = "/crewai_plus/api/v1/me/organizations";
108
+ static readonly CREWS_RESOURCE = "/crewai_plus/api/v1/crews";
109
+ static readonly AGENTS_RESOURCE = "/crewai_plus/api/v1/agents";
110
+ static readonly TRACING_RESOURCE = "/crewai_plus/api/v1/tracing";
111
+ static readonly EPHEMERAL_TRACING_RESOURCE = "/crewai_plus/api/v1/tracing/ephemeral";
112
+ static readonly INTEGRATIONS_RESOURCE = "/crewai_plus/api/v1/integrations";
113
+ readonly apiKey: string | null;
114
+ readonly api_key: string | null;
115
+ readonly headers: Record<string, string>;
116
+ readonly baseUrl: string;
117
+ readonly base_url: string;
118
+ private readonly fetchImpl;
119
+ constructor(options?: PlusAPIOptions | string | null);
120
+ makeRequest<T = unknown>(method: HttpMethod, endpoint: string, options?: MakeRequestOptions): Promise<PlusApiResponse<T>>;
121
+ _make_request<T = unknown>(method: HttpMethod, endpoint: string, options?: MakeRequestOptions): Promise<PlusApiResponse<T>>;
122
+ loginToToolRepository(userIdentifier?: string | null): Promise<PlusApiResponse<unknown>>;
123
+ login_to_tool_repository(userIdentifier?: string | null): Promise<PlusApiResponse<unknown>>;
124
+ getTool(handle: string): Promise<PlusApiResponse<unknown>>;
125
+ get_tool(handle: string): Promise<PlusApiResponse<unknown>>;
126
+ getAgent(handle: string): Promise<PlusApiResponse<unknown>>;
127
+ get_agent(handle: string): Promise<PlusApiResponse<unknown>>;
128
+ publishTool(handle: string, isPublic: boolean, version: string, description: string | null, encodedFile: string, availableExports?: readonly AvailableExport[] | null, toolsMetadata?: readonly ToolMetadata[] | null): Promise<PlusApiResponse<unknown>>;
129
+ publish_tool(handle: string, isPublic: boolean, version: string, description: string | null, encodedFile: string, availableExports?: readonly AvailableExport[] | null, toolsMetadata?: readonly ToolMetadata[] | null): Promise<PlusApiResponse<unknown>>;
130
+ getSkill(org: string, name: string, version?: string | null): Promise<PlusApiResponse<unknown>>;
131
+ get_skill(org: string, name: string, version?: string | null): Promise<PlusApiResponse<unknown>>;
132
+ publishSkill(org: string, name: string, version: string, isPublic: boolean, description: string | null, encodedFile: string): Promise<PlusApiResponse<unknown>>;
133
+ publish_skill(org: string, name: string, version: string, isPublic: boolean, description: string | null, encodedFile: string): Promise<PlusApiResponse<unknown>>;
134
+ listSkills(org?: string | null): Promise<PlusApiResponse<unknown>>;
135
+ list_skills(org?: string | null): Promise<PlusApiResponse<unknown>>;
136
+ deployByName(projectName: string): Promise<PlusApiResponse<unknown>>;
137
+ deploy_by_name(projectName: string): Promise<PlusApiResponse<unknown>>;
138
+ deployByUuid(uuid: string): Promise<PlusApiResponse<unknown>>;
139
+ deploy_by_uuid(uuid: string): Promise<PlusApiResponse<unknown>>;
140
+ crewStatusByName(projectName: string): Promise<PlusApiResponse<unknown>>;
141
+ crew_status_by_name(projectName: string): Promise<PlusApiResponse<unknown>>;
142
+ crewStatusByUuid(uuid: string): Promise<PlusApiResponse<unknown>>;
143
+ crew_status_by_uuid(uuid: string): Promise<PlusApiResponse<unknown>>;
144
+ crewByName(projectName: string, logType?: string): Promise<PlusApiResponse<unknown>>;
145
+ crew_by_name(projectName: string, logType?: string): Promise<PlusApiResponse<unknown>>;
146
+ crewByUuid(uuid: string, logType?: string): Promise<PlusApiResponse<unknown>>;
147
+ crew_by_uuid(uuid: string, logType?: string): Promise<PlusApiResponse<unknown>>;
148
+ deleteCrewByName(projectName: string): Promise<PlusApiResponse<unknown>>;
149
+ delete_crew_by_name(projectName: string): Promise<PlusApiResponse<unknown>>;
150
+ deleteCrewByUuid(uuid: string): Promise<PlusApiResponse<unknown>>;
151
+ delete_crew_by_uuid(uuid: string): Promise<PlusApiResponse<unknown>>;
152
+ listCrews(): Promise<PlusApiResponse<unknown>>;
153
+ list_crews(): Promise<PlusApiResponse<unknown>>;
154
+ createCrew(payload: CreateCrewPayload): Promise<PlusApiResponse<unknown>>;
155
+ create_crew(payload: CreateCrewPayload): Promise<PlusApiResponse<unknown>>;
156
+ getOrganizations(): Promise<PlusApiResponse<unknown>>;
157
+ get_organizations(): Promise<PlusApiResponse<unknown>>;
158
+ initializeTraceBatch(payload: TraceBatchInitPayload): Promise<PlusApiResponse<unknown>>;
159
+ initialize_trace_batch(payload: TraceBatchInitPayload): Promise<PlusApiResponse<unknown>>;
160
+ initializeEphemeralTraceBatch(payload: TraceBatchInitPayload): Promise<PlusApiResponse<unknown>>;
161
+ initialize_ephemeral_trace_batch(payload: TraceBatchInitPayload): Promise<PlusApiResponse<unknown>>;
162
+ sendTraceEvents(traceBatchId: string, payload: TraceEventsPayload): Promise<PlusApiResponse<unknown>>;
163
+ send_trace_events(traceBatchId: string, payload: TraceEventsPayload): Promise<PlusApiResponse<unknown>>;
164
+ sendEphemeralTraceEvents(traceBatchId: string, payload: TraceEventsPayload): Promise<PlusApiResponse<unknown>>;
165
+ send_ephemeral_trace_events(traceBatchId: string, payload: TraceEventsPayload): Promise<PlusApiResponse<unknown>>;
166
+ finalizeTraceBatch(traceBatchId: string, payload: TraceFinalizePayload): Promise<PlusApiResponse<unknown>>;
167
+ finalize_trace_batch(traceBatchId: string, payload: TraceFinalizePayload): Promise<PlusApiResponse<unknown>>;
168
+ finalizeEphemeralTraceBatch(traceBatchId: string, payload: TraceFinalizePayload): Promise<PlusApiResponse<unknown>>;
169
+ finalize_ephemeral_trace_batch(traceBatchId: string, payload: TraceFinalizePayload): Promise<PlusApiResponse<unknown>>;
170
+ markTraceBatchAsFailed(traceBatchId: string, errorMessage: string): Promise<PlusApiResponse<unknown>>;
171
+ mark_trace_batch_as_failed(traceBatchId: string, errorMessage: string): Promise<PlusApiResponse<unknown>>;
172
+ markEphemeralTraceBatchAsFailed(traceBatchId: string, errorMessage: string): Promise<PlusApiResponse<unknown>>;
173
+ mark_ephemeral_trace_batch_as_failed(traceBatchId: string, errorMessage: string): Promise<PlusApiResponse<unknown>>;
174
+ getMcpConfigs(slugs: readonly string[]): Promise<PlusApiResponse<unknown>>;
175
+ get_mcp_configs(slugs: readonly string[]): Promise<PlusApiResponse<unknown>>;
176
+ getTriggers(): Promise<PlusApiResponse<unknown>>;
177
+ get_triggers(): Promise<PlusApiResponse<unknown>>;
178
+ getTriggerPayload(appSlug: string, triggerSlug: string): Promise<PlusApiResponse<unknown>>;
179
+ get_trigger_payload(appSlug: string, triggerSlug: string): Promise<PlusApiResponse<unknown>>;
180
+ }
181
+ export declare function createAuthenticatedPlusApi(options?: Omit<PlusAPIOptions, "apiKey" | "api_key">): PlusAPI;
182
+ export declare const create_authenticated_plus_api: typeof createAuthenticatedPlusApi;
183
+ export type ToolCredentialOptions = {
184
+ settings?: Settings;
185
+ env?: NodeJS.ProcessEnv;
186
+ };
187
+ export declare function buildEnvWithToolRepositoryCredentials(repositoryHandle: string, options?: ToolCredentialOptions): Record<string, string>;
188
+ export declare const build_env_with_tool_repository_credentials: typeof buildEnvWithToolRepositoryCredentials;
189
+ export declare function buildEnvWithAllToolCredentials(options?: ToolCredentialOptions & {
190
+ pyprojectPath?: string;
191
+ pyproject_path?: string;
192
+ }): Record<string, string>;
193
+ export declare const build_env_with_all_tool_credentials: typeof buildEnvWithAllToolCredentials;
194
+ export {};
@@ -0,0 +1,133 @@
1
+ export declare const P: Readonly<{
2
+ kind: "ParamSpec";
3
+ }>;
4
+ export declare const P2: Readonly<{
5
+ kind: "ParamSpec";
6
+ }>;
7
+ export declare const R: Readonly<{
8
+ kind: "TypeVar";
9
+ }>;
10
+ export declare const R2: Readonly<{
11
+ kind: "TypeVar";
12
+ }>;
13
+ export declare const T: Readonly<{
14
+ kind: "TypeVar";
15
+ }>;
16
+ export declare const SelfT: Readonly<{
17
+ kind: "TypeVar";
18
+ }>;
19
+ export declare const TaskResultT: Readonly<{
20
+ kind: "TypeVar";
21
+ }>;
22
+ export declare const CallableT: Readonly<{
23
+ kind: "TypeVar";
24
+ }>;
25
+ export declare const AgentConfig: Readonly<{
26
+ kind: "AgentConfig";
27
+ }>;
28
+ export declare const TaskConfig: Readonly<{
29
+ kind: "TaskConfig";
30
+ }>;
31
+ export declare const CrewMetadata: Readonly<{
32
+ kind: "CrewMetadata";
33
+ }>;
34
+ export declare const CrewInstance: Readonly<{
35
+ kind: "CrewInstance";
36
+ }>;
37
+ export declare const CrewClass: Readonly<{
38
+ kind: "CrewClass";
39
+ }>;
40
+ export declare const TaskResult: Readonly<{
41
+ kind: "TaskResult";
42
+ }>;
43
+ export declare const OutputClass: Readonly<{
44
+ kind: "OutputClass";
45
+ }>;
46
+ export declare const OutputJsonClass: Readonly<{
47
+ kind: "OutputJsonClass";
48
+ }>;
49
+ export declare const OutputPydanticClass: Readonly<{
50
+ kind: "OutputPydanticClass";
51
+ }>;
52
+ type AnyFunction = (...args: readonly unknown[]) => unknown;
53
+ export declare class DecoratedMethod {
54
+ readonly _meth: AnyFunction;
55
+ readonly __name__: string;
56
+ readonly __doc__: string | null;
57
+ constructor(method: AnyFunction);
58
+ call(thisArg: unknown, ...args: readonly unknown[]): unknown;
59
+ invoke(...args: readonly unknown[]): unknown;
60
+ __call__(...args: readonly unknown[]): unknown;
61
+ unwrap(): AnyFunction;
62
+ }
63
+ export declare class BeforeKickoffMethod extends DecoratedMethod {
64
+ readonly is_before_kickoff = true;
65
+ }
66
+ export declare class AfterKickoffMethod extends DecoratedMethod {
67
+ readonly is_after_kickoff = true;
68
+ }
69
+ export declare class AgentMethod extends DecoratedMethod {
70
+ readonly is_agent = true;
71
+ }
72
+ export declare class TaskMethod extends DecoratedMethod {
73
+ readonly is_task = true;
74
+ ensureTaskName<TResult>(result: TResult): TResult;
75
+ ensure_task_name<TResult>(result: TResult): TResult;
76
+ unwrap(): AnyFunction;
77
+ call(thisArg: unknown, ...args: readonly unknown[]): unknown;
78
+ invoke(...args: readonly unknown[]): unknown;
79
+ }
80
+ export declare class CrewMethod extends DecoratedMethod {
81
+ readonly is_crew = true;
82
+ }
83
+ export declare class ToolMethod extends DecoratedMethod {
84
+ readonly is_tool = true;
85
+ }
86
+ export declare class LLMMethod extends DecoratedMethod {
87
+ readonly is_llm = true;
88
+ }
89
+ export declare class CallbackMethod extends DecoratedMethod {
90
+ readonly is_callback = true;
91
+ }
92
+ export declare class CacheHandlerMethod extends DecoratedMethod {
93
+ readonly is_cache_handler = true;
94
+ }
95
+ export declare class OutputJsonMethod extends DecoratedMethod {
96
+ readonly is_output_json = true;
97
+ }
98
+ export declare class OutputPydanticMethod extends DecoratedMethod {
99
+ readonly is_output_pydantic = true;
100
+ }
101
+ export declare class BoundTaskMethod {
102
+ readonly is_task = true;
103
+ private readonly taskMethod;
104
+ private readonly instance;
105
+ constructor(taskMethod: TaskMethod, instance: unknown);
106
+ call(...args: readonly unknown[]): unknown;
107
+ __call__(...args: readonly unknown[]): unknown;
108
+ }
109
+ export declare const CrewBaseMeta: {
110
+ initialize(instance: object): object;
111
+ };
112
+ export declare function loadYaml(configPath: string): Record<string, unknown>;
113
+ export declare const load_yaml: typeof loadYaml;
114
+ export declare function loadConfigurations(instance: object): void;
115
+ export declare const load_configurations: typeof loadConfigurations;
116
+ export declare function mapAllAgentVariables(instance: object): void;
117
+ export declare const map_all_agent_variables: typeof mapAllAgentVariables;
118
+ export declare function mapAllTaskVariables(instance: object): void;
119
+ export declare const map_all_task_variables: typeof mapAllTaskVariables;
120
+ export declare function closeMcpServer<TOutput>(instance: object, output: TOutput): TOutput;
121
+ export declare const close_mcp_server: typeof closeMcpServer;
122
+ export declare const cache: Map<string, unknown>;
123
+ export declare function getMcpTools(instance: object, ...toolNames: readonly string[]): unknown[];
124
+ export declare const get_mcp_tools: typeof getMcpTools;
125
+ export declare function memoize<TFunction extends AnyFunction>(method: TFunction): TFunction;
126
+ export declare function _memoize_sync<TFunction extends AnyFunction>(method: TFunction): TFunction;
127
+ export declare function _memoize_async<TFunction extends AnyFunction>(method: TFunction): TFunction;
128
+ export declare function _make_hashable(arg: unknown): unknown;
129
+ export declare function getAllMethods(instance: object): Record<string, unknown>;
130
+ export declare const get_all_methods: typeof getAllMethods;
131
+ export declare function crewMetadataFor(instance: object): Record<string, unknown>;
132
+ export declare function loadProjectConfig(path: string): Record<string, unknown>;
133
+ export {};
@@ -0,0 +1,221 @@
1
+ import { Agent, type AgentGuardrail, type AgentOptions, type CodeExecutionMode } from "./agent.js";
2
+ import { Crew } from "./crew.js";
3
+ import type { PlanningConfig, PlanningConfigOptions } from "./agent-planning.js";
4
+ import { Task, type TaskInputFiles, type TaskOptions, type TaskOutputConverter } from "./task.js";
5
+ import type { AgentStepCallback, LLM, TaskCallback, Tool } from "./types.js";
6
+ import { type CacheHandler } from "./tools.js";
7
+ import type { EmbedderConfig } from "./rag.js";
8
+ import type { AvailableExport, EnvVarEntry } from "./plus-api.js";
9
+ export type ConfigRecord = Record<string, unknown>;
10
+ export type ProjectConfig = Record<string, ConfigRecord>;
11
+ export type ConfigSource = string | ProjectConfig | null | undefined;
12
+ export type AgentConfig = {
13
+ role?: string;
14
+ goal?: string;
15
+ backstory?: string;
16
+ llm?: string | LLM | null;
17
+ function_calling_llm?: string | LLM | null;
18
+ functionCallingLlm?: string | LLM | null;
19
+ crew?: unknown;
20
+ tools?: readonly string[] | readonly Tool[];
21
+ cache?: boolean;
22
+ cache_handler?: string | CacheHandler;
23
+ cacheHandler?: string | CacheHandler;
24
+ tools_results?: readonly Record<string, unknown>[];
25
+ toolsResults?: readonly Record<string, unknown>[];
26
+ callbacks?: readonly string[] | readonly TaskCallback[];
27
+ step_callback?: string | AgentStepCallback;
28
+ stepCallback?: string | AgentStepCallback;
29
+ verbose?: boolean;
30
+ allow_delegation?: boolean;
31
+ allowDelegation?: boolean;
32
+ allow_code_execution?: boolean | null;
33
+ allowCodeExecution?: boolean | null;
34
+ code_execution_mode?: CodeExecutionMode;
35
+ codeExecutionMode?: CodeExecutionMode;
36
+ respect_context_window?: boolean;
37
+ respectContextWindow?: boolean;
38
+ multimodal?: boolean;
39
+ max_iter?: number;
40
+ maxIter?: number;
41
+ max_retry_limit?: number;
42
+ maxRetryLimit?: number;
43
+ max_execution_time?: number | null;
44
+ maxExecutionTime?: number | null;
45
+ max_rpm?: number | null;
46
+ maxRpm?: number | null;
47
+ max_tokens?: number | null;
48
+ maxTokens?: number | null;
49
+ use_system_prompt?: boolean | null;
50
+ useSystemPrompt?: boolean | null;
51
+ system_template?: string | null;
52
+ systemTemplate?: string | null;
53
+ prompt_template?: string | null;
54
+ promptTemplate?: string | null;
55
+ response_template?: string | null;
56
+ responseTemplate?: string | null;
57
+ inject_date?: boolean;
58
+ injectDate?: boolean;
59
+ date_format?: string;
60
+ dateFormat?: string;
61
+ guardrail?: AgentGuardrail | string | null;
62
+ guardrail_max_retries?: number;
63
+ guardrailMaxRetries?: number;
64
+ knowledge_storage?: unknown;
65
+ knowledgeStorage?: unknown;
66
+ knowledge_config?: Record<string, unknown> | null;
67
+ knowledgeConfig?: Record<string, unknown> | null;
68
+ embedder?: EmbedderConfig | null;
69
+ agent_knowledge_context?: string | null;
70
+ agentKnowledgeContext?: string | null;
71
+ crew_knowledge_context?: string | null;
72
+ crewKnowledgeContext?: string | null;
73
+ knowledge_search_query?: string | null;
74
+ knowledgeSearchQuery?: string | null;
75
+ apps?: readonly unknown[] | null;
76
+ mcps?: readonly unknown[] | null;
77
+ a2a?: unknown;
78
+ adapted_agent?: boolean;
79
+ adaptedAgent?: boolean;
80
+ from_repository?: string | null;
81
+ fromRepository?: string | null;
82
+ agent_executor?: unknown;
83
+ agentExecutor?: unknown;
84
+ executor_class?: unknown;
85
+ executorClass?: unknown;
86
+ planning?: boolean;
87
+ planning_config?: PlanningConfig | PlanningConfigOptions | null;
88
+ planningConfig?: PlanningConfig | PlanningConfigOptions | null;
89
+ reasoning?: boolean;
90
+ max_reasoning_attempts?: number | null;
91
+ maxReasoningAttempts?: number | null;
92
+ [key: string]: unknown;
93
+ };
94
+ export type TaskConfig = {
95
+ name?: string | null;
96
+ description?: string;
97
+ expected_output?: string;
98
+ expectedOutput?: string;
99
+ config?: Record<string, unknown> | null;
100
+ prompt_context?: string | null;
101
+ promptContext?: string | null;
102
+ agent?: string | Agent | null;
103
+ context?: readonly string[] | readonly Task[] | null;
104
+ tools?: readonly string[] | readonly Tool[];
105
+ callback?: string | TaskCallback | null;
106
+ callbacks?: readonly string[] | readonly TaskCallback[];
107
+ output_json?: boolean | string | TaskOutputConverter | null;
108
+ outputJson?: boolean | string | TaskOutputConverter | null;
109
+ output_pydantic?: string | TaskOutputConverter | null;
110
+ outputPydantic?: string | TaskOutputConverter | null;
111
+ output_converter?: string | TaskOutputConverter | null;
112
+ outputConverter?: string | TaskOutputConverter | null;
113
+ converter_cls?: string | TaskOutputConverter | null;
114
+ converterCls?: string | TaskOutputConverter | null;
115
+ output_file?: string | null;
116
+ outputFile?: string | null;
117
+ input_files?: TaskInputFiles;
118
+ inputFiles?: TaskInputFiles;
119
+ create_directory?: boolean;
120
+ createDirectory?: boolean;
121
+ response_model?: unknown;
122
+ responseModel?: unknown;
123
+ async_execution?: boolean;
124
+ asyncExecution?: boolean;
125
+ human_input?: boolean;
126
+ humanInput?: boolean;
127
+ markdown?: boolean;
128
+ allow_crewai_trigger_context?: boolean | null;
129
+ allowCrewaiTriggerContext?: boolean | null;
130
+ guardrail?: TaskOptions["guardrail"] | string | null;
131
+ guardrails?: TaskOptions["guardrails"] | readonly string[] | string | null;
132
+ guardrail_max_retries?: number;
133
+ guardrailMaxRetries?: number;
134
+ max_retries?: number;
135
+ retry_count?: number;
136
+ retryCount?: number;
137
+ used_tools?: number;
138
+ usedTools?: number;
139
+ tools_errors?: number;
140
+ toolsErrors?: number;
141
+ delegations?: number;
142
+ processed_by_agents?: Iterable<string>;
143
+ processedByAgents?: Iterable<string>;
144
+ start_time?: Date | string | null;
145
+ startTime?: Date | string | null;
146
+ end_time?: Date | string | null;
147
+ endTime?: Date | string | null;
148
+ checkpoint_original_description?: string | null;
149
+ checkpointOriginalDescription?: string | null;
150
+ checkpoint_original_expected_output?: string | null;
151
+ checkpointOriginalExpectedOutput?: string | null;
152
+ checkpoint_original_output_file?: string | null;
153
+ checkpointOriginalOutputFile?: string | null;
154
+ [key: string]: unknown;
155
+ };
156
+ export type CrewProjectState = {
157
+ baseDirectory: string;
158
+ agentsConfig: Record<string, AgentConfig>;
159
+ tasksConfig: Record<string, TaskConfig>;
160
+ };
161
+ export type CrewProjectLike = {
162
+ baseDirectory?: string;
163
+ agentsConfig?: ConfigSource;
164
+ tasksConfig?: ConfigSource;
165
+ agents_config?: ConfigSource;
166
+ tasks_config?: ConfigSource;
167
+ __crewProjectState__?: CrewProjectState;
168
+ };
169
+ export declare class CrewProject {
170
+ baseDirectory: string;
171
+ agentsConfig: ConfigSource;
172
+ tasksConfig: ConfigSource;
173
+ agentConfig(name: string): AgentConfig;
174
+ taskConfig(name: string): TaskConfig;
175
+ }
176
+ export declare function ensureCrewProject(instance: object): CrewProjectState;
177
+ export declare function loadConfig(source: ConfigSource, baseDirectory?: string): ProjectConfig;
178
+ export declare function mapAgentVariables(instance: object, state: CrewProjectState): void;
179
+ export declare function mapTaskVariables(instance: object, state: CrewProjectState): void;
180
+ export declare function agentOptionsFromConfig(config: AgentConfig): AgentOptions;
181
+ export declare function taskOptionsFromConfig(config: TaskConfig): TaskOptions;
182
+ export type ProjectModuleLike = object | Record<string, unknown>;
183
+ export declare function getCrewInstance(value: unknown): Crew | null;
184
+ export declare const get_crew_instance: typeof getCrewInstance;
185
+ export declare function fetchCrews(moduleLike: ProjectModuleLike): Crew[];
186
+ export declare const fetch_crews: typeof fetchCrews;
187
+ export declare const getCrews: typeof fetchCrews;
188
+ export declare const get_crews: typeof fetchCrews;
189
+ export declare function getFlowInstance(value: unknown): unknown;
190
+ export declare const get_flow_instance: typeof getFlowInstance;
191
+ export declare function getFlows(moduleLike: ProjectModuleLike): unknown[];
192
+ export declare const get_flows: typeof getFlows;
193
+ export declare function isValidTool(value: unknown): value is Tool;
194
+ export declare const is_valid_tool: typeof isValidTool;
195
+ export declare function extractAvailableExports(moduleLike: ProjectModuleLike): AvailableExport[];
196
+ export declare const extract_available_exports: typeof extractAvailableExports;
197
+ export type ToolMetadata = {
198
+ name: string;
199
+ module: string;
200
+ humanized_name: string;
201
+ description: string;
202
+ run_params_schema: Record<string, unknown>;
203
+ init_params_schema: Record<string, unknown>;
204
+ env_vars: readonly EnvVarEntry[];
205
+ argsSchema?: unknown;
206
+ args_schema?: unknown;
207
+ };
208
+ export declare class SchemaGenerator {
209
+ handleInvalidForJsonSchema(schema: unknown, errorInfo: unknown): never;
210
+ handle_invalid_for_json_schema(schema: unknown, errorInfo: unknown): never;
211
+ }
212
+ export declare function handleInvalidForJsonSchema(schema: unknown, errorInfo: unknown): never;
213
+ export declare const handle_invalid_for_json_schema: typeof handleInvalidForJsonSchema;
214
+ export declare function _get_schema_generator(): typeof SchemaGenerator;
215
+ export declare function _unwrap_schema(schema: unknown): Record<string, unknown>;
216
+ export declare function _extract_field_default(field: unknown, fallback?: string | readonly unknown[] | number): string | readonly unknown[] | number;
217
+ export declare function _extract_run_params_schema(argsSchemaField: unknown): Record<string, unknown>;
218
+ export declare function _extract_init_params_schema(toolClassOrInstance: unknown): Record<string, unknown>;
219
+ export declare function _extract_env_vars(envVarsField: unknown): EnvVarEntry[];
220
+ export declare function extractToolsMetadata(tools: readonly unknown[] | ProjectModuleLike): ToolMetadata[];
221
+ export declare const extract_tools_metadata: typeof extractToolsMetadata;
@@ -0,0 +1,66 @@
1
+ import { type I18N } from "./i18n.js";
2
+ export type PromptComponent = "role_playing" | "tools" | "no_tools" | "native_tools" | "task" | "native_task" | "task_no_tools";
3
+ export interface StandardPromptResultOptions {
4
+ prompt?: string;
5
+ }
6
+ export declare class StandardPromptResult {
7
+ readonly prompt: string;
8
+ constructor(options?: StandardPromptResultOptions);
9
+ get(key: string, defaultValue?: unknown): unknown;
10
+ item(key: string): unknown;
11
+ __getitem__(key: string): unknown;
12
+ contains(key: string): boolean;
13
+ __contains__(key: string): boolean;
14
+ }
15
+ export interface SystemPromptResultOptions extends StandardPromptResultOptions {
16
+ system?: string;
17
+ user?: string;
18
+ }
19
+ export declare class SystemPromptResult extends StandardPromptResult {
20
+ readonly system: string;
21
+ readonly user: string;
22
+ constructor(options?: SystemPromptResultOptions);
23
+ }
24
+ export interface PromptAgentLike {
25
+ role: string;
26
+ goal: string;
27
+ backstory: string;
28
+ skills?: readonly unknown[] | null;
29
+ }
30
+ export interface PromptsOptions {
31
+ hasTools?: boolean;
32
+ has_tools?: boolean;
33
+ useNativeToolCalling?: boolean;
34
+ use_native_tool_calling?: boolean;
35
+ systemTemplate?: string | null;
36
+ system_template?: string | null;
37
+ promptTemplate?: string | null;
38
+ prompt_template?: string | null;
39
+ responseTemplate?: string | null;
40
+ response_template?: string | null;
41
+ useSystemPrompt?: boolean;
42
+ use_system_prompt?: boolean;
43
+ agent: PromptAgentLike;
44
+ i18n?: I18N;
45
+ }
46
+ export declare class Prompts {
47
+ readonly hasTools: boolean;
48
+ readonly has_tools: boolean;
49
+ readonly useNativeToolCalling: boolean;
50
+ readonly use_native_tool_calling: boolean;
51
+ readonly systemTemplate: string | null;
52
+ readonly system_template: string | null;
53
+ readonly promptTemplate: string | null;
54
+ readonly prompt_template: string | null;
55
+ readonly responseTemplate: string | null;
56
+ readonly response_template: string | null;
57
+ readonly useSystemPrompt: boolean;
58
+ readonly use_system_prompt: boolean;
59
+ readonly agent: PromptAgentLike;
60
+ readonly i18n: I18N;
61
+ constructor(options: PromptsOptions);
62
+ taskExecution(): SystemPromptResult | StandardPromptResult;
63
+ task_execution(): SystemPromptResult | StandardPromptResult;
64
+ private buildPrompt;
65
+ private buildSkillBlock;
66
+ }