@crewai-ts/core 0.1.12 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +174 -0
  2. package/dist/agent.d.ts +16 -18
  3. package/dist/auth.cjs +598 -0
  4. package/dist/auth.js +40 -0
  5. package/dist/{chunk-3PVW4JKT.js → chunk-C43UEMCX.js} +6712 -7268
  6. package/dist/chunk-CCOE6MLE.js +896 -0
  7. package/dist/chunk-HFQTF332.js +4455 -0
  8. package/dist/{chunk-BE4JYKSG.js → chunk-MM4ROIFG.js} +12 -1490
  9. package/dist/chunk-RH43TNKN.js +238 -0
  10. package/dist/chunk-S477WFUT.js +565 -0
  11. package/dist/chunk-SB7ADUQA.js +110 -0
  12. package/dist/chunk-T32G6KDW.js +40 -0
  13. package/dist/crew.d.ts +24 -26
  14. package/dist/events.cjs +7513 -0
  15. package/dist/events.js +406 -0
  16. package/dist/experimental-conversational.cjs +272 -0
  17. package/dist/experimental-conversational.js +26 -0
  18. package/dist/feature-hooks.cjs +149 -0
  19. package/dist/feature-hooks.d.ts +94 -0
  20. package/dist/feature-hooks.js +36 -0
  21. package/dist/index.cjs +33923 -64381
  22. package/dist/index.d.ts +2 -15
  23. package/dist/index.js +16720 -49562
  24. package/dist/input-provider.d.ts +3 -4
  25. package/dist/lite-agent.d.ts +4 -4
  26. package/dist/llm.cjs +7467 -0
  27. package/dist/llm.d.ts +0 -4
  28. package/dist/llm.js +225 -0
  29. package/dist/optional-yaml.d.ts +8 -0
  30. package/dist/project.d.ts +1 -1
  31. package/dist/schema-utils.cjs +968 -0
  32. package/dist/schema-utils.d.ts +1 -1
  33. package/dist/schema-utils.js +102 -0
  34. package/dist/state-provider-core.js +3 -2
  35. package/dist/task.d.ts +3 -4
  36. package/dist/tools.cjs +6872 -0
  37. package/dist/tools.d.ts +0 -60
  38. package/dist/tools.js +114 -0
  39. package/dist/types.cjs +68 -0
  40. package/dist/types.js +14 -0
  41. package/package.json +52 -111
  42. package/dist/a2a.d.ts +0 -1684
  43. package/dist/a2ui-schemas.d.ts +0 -3312
  44. package/dist/a2ui.d.ts +0 -379
  45. package/dist/flow-conversation.d.ts +0 -90
  46. package/dist/flow-definition.d.ts +0 -195
  47. package/dist/flow-persistence.d.ts +0 -107
  48. package/dist/flow-visualization.d.ts +0 -77
  49. package/dist/flow.d.ts +0 -927
  50. package/dist/knowledge.d.ts +0 -353
  51. package/dist/mcp-DS7UMYAM.js +0 -62
  52. package/dist/mcp.d.ts +0 -315
  53. package/dist/memory.d.ts +0 -915
  54. package/dist/openai-completion.d.ts +0 -327
  55. package/dist/provider-completions.d.ts +0 -596
  56. package/dist/rag.d.ts +0 -1074
@@ -1,107 +0,0 @@
1
- import type { PendingFeedbackContext } from "./flow.js";
2
- import type { DatabaseSync as DatabaseSyncType } from "node:sqlite";
3
- export type PendingFeedbackRecord = {
4
- state: Record<string, unknown>;
5
- context: PendingFeedbackContext;
6
- };
7
- export type FlowPersistence = {
8
- persistenceType?: string;
9
- persistence_type?: string;
10
- saveState?(flowId: string, methodName: string, state: unknown): void | Promise<void>;
11
- save_state?(flowId: string, methodName: string, state: unknown): void | Promise<void>;
12
- loadState?(flowId: string): Promise<Record<string, unknown> | null>;
13
- load_state?(flowId: string): Promise<Record<string, unknown> | null>;
14
- savePendingFeedback(flowId: string, context: PendingFeedbackContext, state: unknown): Promise<void>;
15
- save_pending_feedback(flowId: string, context: PendingFeedbackContext, state: unknown): Promise<void>;
16
- loadPendingFeedback(flowId: string): Promise<PendingFeedbackRecord | null>;
17
- load_pending_feedback(flowId: string): Promise<PendingFeedbackRecord | null>;
18
- clearPendingFeedback(flowId: string): Promise<void>;
19
- clear_pending_feedback(flowId: string): Promise<void>;
20
- };
21
- export declare const FlowPersistence: Readonly<{
22
- kind: "FlowPersistence";
23
- }>;
24
- export declare const LOG_MESSAGES: Readonly<{
25
- SAVE_SKIPPED: "Flow persistence skipped.";
26
- LOAD_SKIPPED: "Flow persistence load skipped.";
27
- }>;
28
- type PersistableFlowInstance = {
29
- state?: unknown;
30
- name?: string | null;
31
- constructor: {
32
- name?: string;
33
- };
34
- };
35
- type FlowClass = new (...args: any[]) => object;
36
- export type PersistDecoratorOptions = {
37
- persistence?: FlowPersistence | null;
38
- verbose?: boolean;
39
- };
40
- type ClassDecoratorFactory = <TClass extends FlowClass>(value: TClass, context: ClassDecoratorContext<TClass>) => TClass | undefined;
41
- type MethodDecoratorFactory = <This extends PersistableFlowInstance, Args extends unknown[], Return>(value: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => ((this: This, ...args: Args) => Return) | undefined;
42
- export type PersistDecoratorMetadata = {
43
- enabled: true;
44
- verbose: boolean;
45
- persistence: FlowPersistence | null;
46
- };
47
- export declare class JsonFlowPersistence implements FlowPersistence {
48
- readonly location: string;
49
- readonly persistenceType = "JsonFlowPersistence";
50
- readonly persistence_type = "JsonFlowPersistence";
51
- constructor(location?: string);
52
- saveState(flowId: string, methodName: string, state: Record<string, unknown>): Promise<void>;
53
- save_state(flowId: string, methodName: string, state: Record<string, unknown>): Promise<void>;
54
- loadState(flowId: string): Promise<Record<string, unknown> | null>;
55
- load_state(flowId: string): Promise<Record<string, unknown> | null>;
56
- savePendingFeedback(flowId: string, context: PendingFeedbackContext, state: Record<string, unknown>): Promise<void>;
57
- save_pending_feedback(flowId: string, context: PendingFeedbackContext, state: Record<string, unknown>): Promise<void>;
58
- loadPendingFeedback(flowId: string): Promise<PendingFeedbackRecord | null>;
59
- load_pending_feedback(flowId: string): Promise<PendingFeedbackRecord | null>;
60
- clearPendingFeedback(flowId: string): Promise<void>;
61
- clear_pending_feedback(flowId: string): Promise<void>;
62
- private ensureDirectory;
63
- private statePath;
64
- private pendingPath;
65
- }
66
- export declare class SQLiteFlowPersistence implements FlowPersistence {
67
- readonly persistenceType = "SQLiteFlowPersistence";
68
- readonly persistence_type = "SQLiteFlowPersistence";
69
- readonly dbPath: string;
70
- readonly db_path: string;
71
- constructor(dbPath?: string | null);
72
- initDb(): void;
73
- init_db(): void;
74
- _setup(): this;
75
- saveState(flowId: string, methodName: string, state: unknown): Promise<void>;
76
- save_state(flowId: string, methodName: string, state: unknown): Promise<void>;
77
- loadState(flowId: string): Promise<Record<string, unknown> | null>;
78
- load_state(flowId: string): Promise<Record<string, unknown> | null>;
79
- savePendingFeedback(flowId: string, context: PendingFeedbackContext, state: unknown): Promise<void>;
80
- save_pending_feedback(flowId: string, context: PendingFeedbackContext, state: unknown): Promise<void>;
81
- loadPendingFeedback(flowId: string): Promise<PendingFeedbackRecord | null>;
82
- load_pending_feedback(flowId: string): Promise<PendingFeedbackRecord | null>;
83
- clearPendingFeedback(flowId: string): Promise<void>;
84
- clear_pending_feedback(flowId: string): Promise<void>;
85
- static _to_state_dict(stateData: unknown): Record<string, unknown>;
86
- _to_state_dict(stateData: unknown): Record<string, unknown>;
87
- _save_state_sql(db: DatabaseSyncType, flowId: string, methodName: string, state: unknown): void;
88
- private withDb;
89
- }
90
- export declare function persistState(flowInstance: PersistableFlowInstance, methodName: string, persistenceInstance: FlowPersistence, verbose?: boolean): Promise<void>;
91
- export declare function persist(persistenceOrOptions?: FlowPersistence | PersistDecoratorOptions | null, verbose?: boolean): ClassDecoratorFactory & MethodDecoratorFactory;
92
- export declare const PersistenceDecorator: {
93
- persistState: typeof persistState;
94
- };
95
- export declare const PersistDecorator: {
96
- persistState: typeof persistState;
97
- };
98
- export declare const persist_state: typeof persistState;
99
- export declare function getPersistDecoratorMetadata(value: object): PersistDecoratorMetadata | null;
100
- export declare function getMethodPersistDecoratorMetadata(value: unknown): PersistDecoratorMetadata | null;
101
- export declare const SQLiteFlowPersistenceAlias: typeof SQLiteFlowPersistence;
102
- export declare const SqliteFlowPersistence: typeof SQLiteFlowPersistence;
103
- export declare const sqliteFlowPersistence: typeof SQLiteFlowPersistence;
104
- export declare const sqlite_flow_persistence: typeof SQLiteFlowPersistence;
105
- export declare function serializePendingFeedbackContext(context: PendingFeedbackContext): Record<string, unknown>;
106
- export declare function deserializePendingFeedbackContext(value: Record<string, unknown>): PendingFeedbackContext;
107
- export {};
@@ -1,77 +0,0 @@
1
- export declare const CREWAI_ORANGE = "#FF5A50";
2
- export declare const DARK_GRAY = "#333333";
3
- export declare const WHITE = "#FFFFFF";
4
- export declare const GRAY = "#666666";
5
- export declare const BG_DARK = "#0d1117";
6
- export declare const BG_CARD = "#161b22";
7
- export declare const BORDER_SUBTLE = "#30363d";
8
- export declare const TEXT_PRIMARY = "#e6edf3";
9
- export declare const TEXT_SECONDARY = "#7d8590";
10
- export declare class CSSExtension {
11
- readonly tags: Set<string>;
12
- parse(parser: ExtensionParserLike): ExtensionParseResult;
13
- renderCss(href: string): string;
14
- _render_css(href: string): string;
15
- }
16
- export declare class JSExtension {
17
- readonly tags: Set<string>;
18
- parse(parser: ExtensionParserLike): ExtensionParseResult;
19
- renderJs(src: string): string;
20
- _render_js(src: string): string;
21
- }
22
- export type ExtensionParserLike = {
23
- stream: Iterator<{
24
- lineno?: number;
25
- }> | Iterable<{
26
- lineno?: number;
27
- }> | readonly {
28
- lineno?: number;
29
- }[];
30
- parse_expression: () => unknown;
31
- };
32
- export type ExtensionParseResult = {
33
- lineno: number;
34
- method: "_render_css" | "_render_js";
35
- args: readonly string[];
36
- html: string;
37
- };
38
- export type FlowVisualizationNodeMetadata = {
39
- type?: string;
40
- condition_type?: string | null;
41
- conditionType?: string | null;
42
- trigger_methods?: readonly string[];
43
- triggerMethods?: readonly string[];
44
- router_paths?: readonly string[];
45
- routerPaths?: readonly string[];
46
- };
47
- export declare const NodeMetadata: Readonly<{
48
- kind: "NodeMetadata";
49
- }>;
50
- export type FlowVisualizationEdge = {
51
- source: string;
52
- target: string;
53
- condition_type?: string | null;
54
- conditionType?: string | null;
55
- is_router_path?: boolean;
56
- isRouterPath?: boolean;
57
- router_path_label?: string | null;
58
- routerPathLabel?: string | null;
59
- };
60
- export declare const StructureEdge: Readonly<{
61
- kind: "StructureEdge";
62
- }>;
63
- export type FlowStructureLike = {
64
- nodes?: Record<string, FlowVisualizationNodeMetadata>;
65
- edges?: readonly FlowVisualizationEdge[];
66
- start_methods?: readonly string[];
67
- startMethods?: readonly string[];
68
- };
69
- export type NodePosition = {
70
- level: number;
71
- x: number;
72
- y: number;
73
- };
74
- export declare function calculateNodePositions(dag: FlowStructureLike): Record<string, NodePosition>;
75
- export declare const calculate_node_positions: typeof calculateNodePositions;
76
- export declare function renderInteractive(dag: FlowStructureLike, filename?: string, show?: boolean): string;
77
- export declare const render_interactive: typeof renderInteractive;