@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,72 @@
1
+ export type InputValues = Record<string, unknown>;
2
+ export type MaybePromise<T> = T | Promise<T>;
3
+ export type LLMMessage = {
4
+ role: "system" | "user" | "assistant" | "tool";
5
+ content: string;
6
+ files?: import("./input-files.js").InputFiles;
7
+ cache_breakpoint?: boolean;
8
+ };
9
+ export declare const LLMMessage: {
10
+ new (options: {
11
+ readonly role: "system" | "user" | "assistant" | "tool";
12
+ readonly content: string;
13
+ readonly files?: import("./input-files.js").InputFiles;
14
+ readonly cache_breakpoint?: boolean;
15
+ }): {
16
+ readonly role: "system" | "user" | "assistant" | "tool";
17
+ readonly content: string;
18
+ readonly files?: import("./input-files.js").InputFiles;
19
+ readonly cache_breakpoint?: boolean;
20
+ };
21
+ };
22
+ export type LLM = import("./llm.js").LLM;
23
+ export type ToolContext = {
24
+ input: string;
25
+ inputs: InputValues;
26
+ };
27
+ export type Tool = {
28
+ name: string;
29
+ description?: string;
30
+ resultAsAnswer?: boolean;
31
+ run: (context?: ToolContext | Record<string, unknown> | string, hookContext?: {
32
+ agent?: unknown;
33
+ task?: unknown;
34
+ crew?: unknown;
35
+ }) => MaybePromise<unknown>;
36
+ };
37
+ export declare const Tool: ObjectConstructor;
38
+ export declare function create_literals_from_strings<T extends readonly string[]>(values: T): T;
39
+ export type AgentStep = {
40
+ type: "tool";
41
+ agentRole: string;
42
+ iteration: number;
43
+ toolName: string;
44
+ toolArgs: Record<string, unknown>;
45
+ output: string;
46
+ resultAsAnswer: false;
47
+ } | {
48
+ type: "direct_tool";
49
+ agentRole: string;
50
+ iteration: number;
51
+ toolName: string;
52
+ toolArgs: Record<string, unknown>;
53
+ output: string;
54
+ resultAsAnswer: true;
55
+ } | {
56
+ type: "final";
57
+ agentRole: string;
58
+ iteration: number;
59
+ output: string;
60
+ };
61
+ export type AgentStepCallback = (step: AgentStep) => MaybePromise<void>;
62
+ export type TaskCallback = (output: import("./outputs.js").TaskOutput) => MaybePromise<void>;
63
+ export type CrewKickoffCallback<T> = (value: T) => MaybePromise<T>;
64
+ export declare enum Process {
65
+ sequential = "sequential",
66
+ hierarchical = "hierarchical"
67
+ }
68
+ export declare enum OutputFormat {
69
+ RAW = "raw",
70
+ JSON = "json",
71
+ PYDANTIC = "pydantic"
72
+ }
@@ -0,0 +1,130 @@
1
+ export declare class ImportError extends Error {
2
+ constructor(message: string, options?: ErrorOptions);
3
+ }
4
+ export declare class OptionalDependencyError extends ImportError {
5
+ constructor(message: string, options?: ErrorOptions);
6
+ }
7
+ export declare function normalizePathLikeString(value: unknown): string | null;
8
+ export declare const COMPONENTS: readonly ["role_playing", "tools", "no_tools", "native_tools", "task", "native_task", "task_no_tools"];
9
+ export declare const UNACCEPTED_ATTRIBUTES: readonly ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_DEFAULT_REGION"];
10
+ export declare class InternalInstructor {
11
+ readonly content: string;
12
+ readonly model: unknown;
13
+ readonly agent: unknown;
14
+ readonly llm: unknown;
15
+ readonly _client: unknown;
16
+ constructor(content: string, model: unknown, agent?: unknown, llm?: unknown);
17
+ toJson(): string;
18
+ to_json(): string;
19
+ toPydantic(): unknown;
20
+ to_pydantic(): unknown;
21
+ _create_instructor_client(): unknown;
22
+ _extract_provider(): string;
23
+ }
24
+ export declare function _is_valid_llm(llm: unknown): boolean;
25
+ export declare const DEFAULT_TTL = 3600;
26
+ export declare class CrewJSONEncoder {
27
+ default(value: unknown): Serializable;
28
+ _handle_pydantic_model(value: unknown): Serializable;
29
+ }
30
+ export type CrewContextOptions = {
31
+ id?: string;
32
+ key?: string;
33
+ crew?: unknown;
34
+ };
35
+ export declare class CrewContext {
36
+ readonly id: string;
37
+ readonly key: string;
38
+ readonly crew: unknown;
39
+ constructor(options?: CrewContextOptions | string);
40
+ }
41
+ export declare function getCrewContext(): CrewContext | null;
42
+ export declare function get_crew_context(): CrewContext | null;
43
+ export declare function withCrewContext<T>(context: CrewContext | CrewContextOptions, fn: () => T): T;
44
+ export declare const with_crew_context: typeof withCrewContext;
45
+ export declare const console: Console;
46
+ export type ResetMemoriesCommandOptions = {
47
+ crews?: readonly unknown[];
48
+ flows?: readonly unknown[];
49
+ getCrews?: () => readonly unknown[];
50
+ get_crews?: () => readonly unknown[];
51
+ getFlows?: () => readonly unknown[];
52
+ get_flows?: () => readonly unknown[];
53
+ console?: Pick<Console, "log" | "error">;
54
+ };
55
+ export declare function reset_memories_command(memory?: boolean, knowledge?: boolean, agent_knowledge?: boolean, kickoff_outputs?: boolean, all?: boolean, options?: ResetMemoriesCommandOptions): void;
56
+ export declare function _reset_flow_memory(flow: unknown, output?: Pick<Console, "error">): void;
57
+ export type SerializablePrimitive = string | number | boolean | null;
58
+ export declare const SerializablePrimitive: Readonly<{
59
+ kind: "SerializablePrimitive";
60
+ }>;
61
+ export type Serializable = SerializablePrimitive | Serializable[] | {
62
+ [key: string]: Serializable;
63
+ };
64
+ export declare const Serializable: Readonly<{
65
+ kind: "Serializable";
66
+ }>;
67
+ export type ImportedDefinition = unknown;
68
+ export declare const ImportedDefinition: Readonly<{
69
+ kind: "ImportedDefinition";
70
+ }>;
71
+ export declare const adapter: Readonly<{
72
+ validate_python(value: string): Promise<unknown>;
73
+ }>;
74
+ export type ToSerializableOptions = {
75
+ exclude?: ReadonlySet<string> | readonly string[] | null;
76
+ maxDepth?: number;
77
+ max_depth?: number;
78
+ };
79
+ export declare function toSerializable(obj: unknown, options?: ToSerializableOptions, currentDepth?: number, ancestors?: ReadonlySet<object>): Serializable;
80
+ export declare const to_serializable: typeof toSerializable;
81
+ export declare function toString(obj: unknown): string | null;
82
+ export declare const to_string: typeof toString;
83
+ export declare function crewJsonReplacer(_key: string, value: unknown): unknown;
84
+ export declare function crewJsonStringify(value: unknown, space?: number): string;
85
+ export declare const crew_json_stringify: typeof crewJsonStringify;
86
+ export type SerializableCallable = (...args: readonly unknown[]) => unknown;
87
+ export declare const SerializableCallable: FunctionConstructor;
88
+ export declare function _trusted_deserialize(env?: NodeJS.ProcessEnv): boolean;
89
+ export declare function _is_non_roundtrippable(value: unknown): boolean;
90
+ export declare function registerCallable(path: string, callable: SerializableCallable): void;
91
+ export declare const register_callable: typeof registerCallable;
92
+ export declare function unregisterCallable(path: string): void;
93
+ export declare const unregister_callable: typeof unregisterCallable;
94
+ export declare function clearCallableRegistry(): void;
95
+ export declare const clear_callable_registry: typeof clearCallableRegistry;
96
+ export declare function callableToString(callable: SerializableCallable): string | null;
97
+ export declare const callable_to_string: typeof callableToString;
98
+ export declare function stringToCallable(value: unknown): Promise<SerializableCallable>;
99
+ export declare const string_to_callable: typeof stringToCallable;
100
+ export declare function _instance_to_dotted_path(value: unknown): string;
101
+ export declare function _dotted_path_to_instance(value: unknown): Promise<unknown>;
102
+ export declare function readToml(filePath?: string): Record<string, unknown>;
103
+ export declare const read_toml: typeof readToml;
104
+ export declare function parseToml(content: string): Record<string, unknown>;
105
+ export declare const parse_toml: typeof parseToml;
106
+ export declare function getProjectName(pyprojectPath?: string, require?: boolean): string | null;
107
+ export declare const get_project_name: typeof getProjectName;
108
+ export declare function getProjectVersion(pyprojectPath?: string, require?: boolean): string | null;
109
+ export declare const get_project_version: typeof getProjectVersion;
110
+ export declare function getProjectDescription(pyprojectPath?: string, require?: boolean): string | null;
111
+ export declare const get_project_description: typeof getProjectDescription;
112
+ export declare function getCrewaiVersion(): string;
113
+ export declare const get_crewai_version: typeof getCrewaiVersion;
114
+ export declare function getProjectAttribute(pyprojectPath: string, keys: readonly string[], require?: boolean): string | null;
115
+ export declare const get_project_attribute: typeof getProjectAttribute;
116
+ export declare function validateImportPath(path: string): Promise<unknown>;
117
+ export declare const validate_import_path: typeof validateImportPath;
118
+ export declare function importAndValidateDefinition(path: string): Promise<unknown>;
119
+ export declare const import_and_validate_definition: typeof importAndValidateDefinition;
120
+ export declare function requireModule(name: string, options: {
121
+ purpose: string;
122
+ attr?: string | null;
123
+ }): Promise<unknown>;
124
+ export declare const require_module: typeof requireModule;
125
+ export declare const require: typeof requireModule;
126
+ export declare class AttributeError extends Error {
127
+ constructor(message: string);
128
+ }
129
+ export declare function _resolve_dotted_path(path: string): Promise<unknown>;
130
+ export declare function _to_serializable_key(key: unknown): string;
@@ -0,0 +1,10 @@
1
+ import type { InputFiles } from "./input-files.js";
2
+ export type UtilityLLMMessage = {
3
+ role: "user" | "assistant" | "system" | "tool";
4
+ content: string | Array<Record<string, unknown>> | null;
5
+ tool_call_id?: string;
6
+ name?: string;
7
+ tool_calls?: Array<Record<string, unknown>>;
8
+ raw_tool_call_parts?: unknown[];
9
+ files?: InputFiles;
10
+ };
@@ -0,0 +1,12 @@
1
+ export declare const __version__ = "1.14.6";
2
+ export declare const VERSION = "1.14.6";
3
+ export declare function get_crewai_version(): string;
4
+ export declare function get_latest_version_from_pypi(): Promise<string | null>;
5
+ export declare function is_newer_version_available(currentVersion: string, latestVersion: string | null): boolean;
6
+ export declare function is_current_version_yanked(_version?: string): Promise<boolean>;
7
+ export declare function check_version(currentVersion?: string): Promise<{
8
+ current_version: string;
9
+ latest_version: string | null;
10
+ update_available: boolean;
11
+ yanked: boolean;
12
+ }>;