@crewai-ts/core 0.1.13 → 0.2.1

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 (55) hide show
  1. package/dist/agent.d.ts +16 -18
  2. package/dist/auth.cjs +598 -0
  3. package/dist/auth.js +40 -0
  4. package/dist/{chunk-3PVW4JKT.js → chunk-C43UEMCX.js} +6712 -7268
  5. package/dist/chunk-CCOE6MLE.js +896 -0
  6. package/dist/chunk-HFQTF332.js +4455 -0
  7. package/dist/{chunk-BE4JYKSG.js → chunk-MM4ROIFG.js} +12 -1490
  8. package/dist/chunk-RH43TNKN.js +238 -0
  9. package/dist/chunk-S477WFUT.js +565 -0
  10. package/dist/chunk-SB7ADUQA.js +110 -0
  11. package/dist/chunk-T32G6KDW.js +40 -0
  12. package/dist/crew.d.ts +24 -26
  13. package/dist/events.cjs +7513 -0
  14. package/dist/events.js +406 -0
  15. package/dist/experimental-conversational.cjs +272 -0
  16. package/dist/experimental-conversational.js +26 -0
  17. package/dist/feature-hooks.cjs +149 -0
  18. package/dist/feature-hooks.d.ts +94 -0
  19. package/dist/feature-hooks.js +36 -0
  20. package/dist/index.cjs +33923 -64381
  21. package/dist/index.d.ts +2 -15
  22. package/dist/index.js +16720 -49562
  23. package/dist/input-provider.d.ts +3 -4
  24. package/dist/lite-agent.d.ts +4 -4
  25. package/dist/llm.cjs +7467 -0
  26. package/dist/llm.d.ts +0 -4
  27. package/dist/llm.js +225 -0
  28. package/dist/optional-yaml.d.ts +8 -0
  29. package/dist/project.d.ts +1 -1
  30. package/dist/schema-utils.cjs +968 -0
  31. package/dist/schema-utils.d.ts +1 -1
  32. package/dist/schema-utils.js +102 -0
  33. package/dist/state-provider-core.js +3 -2
  34. package/dist/task.d.ts +3 -4
  35. package/dist/tools.cjs +6872 -0
  36. package/dist/tools.d.ts +0 -60
  37. package/dist/tools.js +114 -0
  38. package/dist/types.cjs +68 -0
  39. package/dist/types.js +14 -0
  40. package/package.json +52 -111
  41. package/dist/a2a.d.ts +0 -1684
  42. package/dist/a2ui-schemas.d.ts +0 -3312
  43. package/dist/a2ui.d.ts +0 -379
  44. package/dist/flow-conversation.d.ts +0 -90
  45. package/dist/flow-definition.d.ts +0 -195
  46. package/dist/flow-persistence.d.ts +0 -107
  47. package/dist/flow-visualization.d.ts +0 -77
  48. package/dist/flow.d.ts +0 -927
  49. package/dist/knowledge.d.ts +0 -353
  50. package/dist/mcp-DS7UMYAM.js +0 -62
  51. package/dist/mcp.d.ts +0 -315
  52. package/dist/memory.d.ts +0 -915
  53. package/dist/openai-completion.d.ts +0 -327
  54. package/dist/provider-completions.d.ts +0 -596
  55. package/dist/rag.d.ts +0 -1074
package/dist/a2ui.d.ts DELETED
@@ -1,379 +0,0 @@
1
- export type A2UIRecord = Record<string, unknown>;
2
- export declare const SCHEMA_NAMES: ReadonlySet<string>;
3
- export declare const V09_SCHEMA_NAMES: ReadonlySet<string>;
4
- export declare function load_schema(name: string, options?: {
5
- version?: string;
6
- }): A2UIRecord;
7
- export declare const loadSchema: typeof load_schema;
8
- export declare class A2UIModel {
9
- constructor(options?: A2UIRecord);
10
- modelDump(): A2UIRecord;
11
- model_dump(): A2UIRecord;
12
- static modelValidate<T extends A2UIModel>(this: new (options?: A2UIRecord) => T, value: unknown): T;
13
- static model_validate<T extends A2UIModel>(this: new (options?: A2UIRecord) => T, value: unknown): T;
14
- }
15
- export declare const StylesDict: Readonly<{
16
- kind: "StylesDict";
17
- }>;
18
- export declare const ComponentEntryDict: Readonly<{
19
- kind: "ComponentEntryDict";
20
- }>;
21
- export declare const BeginRenderingDict: Readonly<{
22
- kind: "BeginRenderingDict";
23
- }>;
24
- export declare const SurfaceUpdateDict: Readonly<{
25
- kind: "SurfaceUpdateDict";
26
- }>;
27
- export declare const DataEntryDict: Readonly<{
28
- kind: "DataEntryDict";
29
- }>;
30
- export declare const DataModelUpdateDict: Readonly<{
31
- kind: "DataModelUpdateDict";
32
- }>;
33
- export declare const DeleteSurfaceDict: Readonly<{
34
- kind: "DeleteSurfaceDict";
35
- }>;
36
- export declare const A2UIMessageDict: Readonly<{
37
- kind: "A2UIMessageDict";
38
- }>;
39
- export declare const ThemeDict: Readonly<{
40
- kind: "ThemeDict";
41
- }>;
42
- export declare const CreateSurfaceDict: Readonly<{
43
- kind: "CreateSurfaceDict";
44
- }>;
45
- export declare const UpdateComponentsDict: Readonly<{
46
- kind: "UpdateComponentsDict";
47
- }>;
48
- export declare const UpdateDataModelDict: Readonly<{
49
- kind: "UpdateDataModelDict";
50
- }>;
51
- export declare const DeleteSurfaceV09Dict: Readonly<{
52
- kind: "DeleteSurfaceV09Dict";
53
- }>;
54
- export declare const A2UIMessageV09Dict: Readonly<{
55
- kind: "A2UIMessageV09Dict";
56
- }>;
57
- export declare const A2UIAnyMessageDict: Readonly<{
58
- kind: "A2UIAnyMessageDict";
59
- }>;
60
- export declare const IconName: readonly ["accountCircle", "add", "arrowBack", "arrowForward", "attachFile", "calendarToday", "call", "camera", "check", "close", "delete", "download", "edit", "event", "error", "favorite", "favoriteOff", "folder", "help", "home", "info", "locationOn", "lock", "lockOpen", "mail", "menu", "moreVert", "moreHoriz", "notificationsOff", "notifications", "payment", "person", "phone", "photo", "print", "refresh", "search", "send", "settings", "share", "shoppingCart", "star", "starHalf", "starOff", "upload", "visibility", "visibilityOff", "warning"];
61
- export declare const IconNameV09: readonly ["accountCircle", "add", "arrowBack", "arrowForward", "attachFile", "calendarToday", "call", "camera", "check", "close", "delete", "download", "edit", "event", "error", "favorite", "favoriteOff", "folder", "help", "home", "info", "locationOn", "lock", "lockOpen", "mail", "menu", "moreVert", "moreHoriz", "notificationsOff", "notifications", "payment", "person", "phone", "photo", "print", "refresh", "search", "send", "settings", "share", "shoppingCart", "star", "starHalf", "starOff", "upload", "visibility", "visibilityOff", "warning", "fastForward", "pause", "play", "rewind", "skipNext", "skipPrevious", "stop", "volumeDown", "volumeMute", "volumeOff", "volumeUp"];
62
- export declare const ComponentName: readonly ["Text", "Image", "Icon", "Video", "AudioPlayer", "Row", "Column", "List", "Card", "Tabs", "Modal", "Divider", "Button", "TextField", "CheckBox", "ChoicePicker", "Slider", "DateTimeInput"];
63
- export declare const FunctionName: readonly ["required", "regex", "length", "numeric", "email", "formatString", "formatNumber", "formatCurrency", "formatDate", "pluralize", "openUrl", "and", "or", "not"];
64
- export declare const STANDARD_CATALOG_COMPONENTS: Set<string>;
65
- export declare const BASIC_CATALOG_COMPONENTS: Set<"Image" | "Video" | "Text" | "Icon" | "AudioPlayer" | "Row" | "Column" | "List" | "Card" | "Tabs" | "Modal" | "Divider" | "Button" | "TextField" | "CheckBox" | "ChoicePicker" | "Slider" | "DateTimeInput">;
66
- export declare const BASIC_CATALOG_FUNCTIONS: Set<"length" | "email" | "required" | "regex" | "numeric" | "formatString" | "formatNumber" | "formatCurrency" | "formatDate" | "pluralize" | "openUrl" | "and" | "or" | "not">;
67
- export declare const V09_ICON_NAMES: Set<"search" | "error" | "share" | "event" | "call" | "info" | "add" | "delete" | "warning" | "close" | "stop" | "upload" | "settings" | "accountCircle" | "arrowBack" | "arrowForward" | "attachFile" | "calendarToday" | "camera" | "check" | "download" | "edit" | "favorite" | "favoriteOff" | "folder" | "help" | "home" | "locationOn" | "lock" | "lockOpen" | "mail" | "menu" | "moreVert" | "moreHoriz" | "notificationsOff" | "notifications" | "payment" | "person" | "phone" | "photo" | "print" | "refresh" | "send" | "shoppingCart" | "star" | "starHalf" | "starOff" | "visibility" | "visibilityOff" | "fastForward" | "pause" | "play" | "rewind" | "skipNext" | "skipPrevious" | "volumeDown" | "volumeMute" | "volumeOff" | "volumeUp">;
68
- export declare class StringBinding extends A2UIModel {
69
- }
70
- export declare class NumberBinding extends A2UIModel {
71
- }
72
- export declare class BooleanBinding extends A2UIModel {
73
- }
74
- export declare class ArrayBinding extends A2UIModel {
75
- }
76
- export declare class ChildrenDef extends A2UIModel {
77
- }
78
- export declare class ChildTemplate extends A2UIModel {
79
- }
80
- export declare class ActionContextEntry extends A2UIModel {
81
- }
82
- export declare class ActionBoundValue extends A2UIModel {
83
- }
84
- export declare class Action extends A2UIModel {
85
- }
86
- export declare class TabItem extends A2UIModel {
87
- }
88
- export declare class MultipleChoiceOption extends A2UIModel {
89
- }
90
- export declare class Text extends A2UIModel {
91
- }
92
- export declare class Image extends A2UIModel {
93
- }
94
- export declare class IconBinding extends A2UIModel {
95
- }
96
- export declare class Icon extends A2UIModel {
97
- }
98
- export declare class Video extends A2UIModel {
99
- }
100
- export declare class AudioPlayer extends A2UIModel {
101
- }
102
- export declare class Row extends A2UIModel {
103
- }
104
- export declare class Column extends A2UIModel {
105
- }
106
- export declare class List extends A2UIModel {
107
- }
108
- export declare class Card extends A2UIModel {
109
- }
110
- export declare class Tabs extends A2UIModel {
111
- }
112
- export declare class Divider extends A2UIModel {
113
- }
114
- export declare class Modal extends A2UIModel {
115
- }
116
- export declare class Button extends A2UIModel {
117
- }
118
- export declare class CheckBox extends A2UIModel {
119
- }
120
- export declare class TextField extends A2UIModel {
121
- }
122
- export declare class DateTimeInput extends A2UIModel {
123
- }
124
- export declare class MultipleChoice extends A2UIModel {
125
- }
126
- export declare class Slider extends A2UIModel {
127
- }
128
- export declare class BoundValue extends A2UIModel {
129
- }
130
- export declare class MapEntry extends A2UIModel {
131
- }
132
- export declare class DataEntry extends A2UIModel {
133
- }
134
- export declare class Styles extends A2UIModel {
135
- }
136
- export declare class ComponentEntry extends A2UIModel {
137
- }
138
- export declare class BeginRendering extends A2UIModel {
139
- }
140
- export declare class SurfaceUpdate extends A2UIModel {
141
- }
142
- export declare class DataModelUpdate extends A2UIModel {
143
- }
144
- export declare class DeleteSurface extends A2UIModel {
145
- }
146
- export declare class UserAction extends A2UIModel {
147
- }
148
- export declare class ClientError extends A2UIModel {
149
- }
150
- export declare class A2UIResponse extends A2UIModel {
151
- }
152
- export declare class A2UIMessage extends A2UIModel {
153
- constructor(options?: A2UIRecord);
154
- checkExactlyOne(): this;
155
- _check_exactly_one(): this;
156
- }
157
- export declare class A2UIEvent extends A2UIModel {
158
- constructor(options?: A2UIRecord);
159
- checkExactlyOne(): this;
160
- _check_exactly_one(): this;
161
- }
162
- export declare class DataBinding extends A2UIModel {
163
- }
164
- export declare class FunctionCall extends A2UIModel {
165
- }
166
- export declare const DynamicValue: Readonly<{
167
- kind: "DynamicValue";
168
- }>;
169
- export declare const DynamicString: Readonly<{
170
- kind: "DynamicString";
171
- }>;
172
- export declare const DynamicNumber: Readonly<{
173
- kind: "DynamicNumber";
174
- }>;
175
- export declare const DynamicBoolean: Readonly<{
176
- kind: "DynamicBoolean";
177
- }>;
178
- export declare const DynamicStringList: Readonly<{
179
- kind: "DynamicStringList";
180
- }>;
181
- export declare class CheckRule extends A2UIModel {
182
- }
183
- export declare class AccessibilityAttributes extends A2UIModel {
184
- }
185
- export declare const ChildListV09: Readonly<{
186
- kind: "ChildListV09";
187
- }>;
188
- export declare class EventAction extends A2UIModel {
189
- }
190
- export declare class ActionV09 extends A2UIModel {
191
- constructor(options?: A2UIRecord);
192
- checkExactlyOne(): this;
193
- _check_exactly_one(): this;
194
- }
195
- export declare class TextV09 extends A2UIModel {
196
- }
197
- export declare class ImageV09 extends A2UIModel {
198
- }
199
- export declare class IconV09 extends A2UIModel {
200
- }
201
- export declare class VideoV09 extends A2UIModel {
202
- }
203
- export declare class AudioPlayerV09 extends A2UIModel {
204
- }
205
- export declare class RowV09 extends A2UIModel {
206
- }
207
- export declare class ColumnV09 extends A2UIModel {
208
- }
209
- export declare class ListV09 extends A2UIModel {
210
- }
211
- export declare class CardV09 extends A2UIModel {
212
- }
213
- export declare class TabItemV09 extends A2UIModel {
214
- }
215
- export declare class TabsV09 extends A2UIModel {
216
- }
217
- export declare class ModalV09 extends A2UIModel {
218
- }
219
- export declare class DividerV09 extends A2UIModel {
220
- }
221
- export declare class ButtonV09 extends A2UIModel {
222
- }
223
- export declare class TextFieldV09 extends A2UIModel {
224
- }
225
- export declare class CheckBoxV09 extends A2UIModel {
226
- }
227
- export declare class ChoicePickerOption extends A2UIModel {
228
- }
229
- export declare class ChoicePickerV09 extends A2UIModel {
230
- }
231
- export declare class SliderV09 extends A2UIModel {
232
- }
233
- export declare class DateTimeInputV09 extends A2UIModel {
234
- }
235
- export declare class Theme extends A2UIModel {
236
- }
237
- export declare class CreateSurface extends A2UIModel {
238
- }
239
- export declare class UpdateComponents extends A2UIModel {
240
- }
241
- export declare class UpdateDataModel extends A2UIModel {
242
- }
243
- export declare class DeleteSurfaceV09 extends A2UIModel {
244
- }
245
- export declare class ActionEvent extends A2UIModel {
246
- }
247
- export declare class ClientErrorV09 extends A2UIModel {
248
- }
249
- export declare class ClientDataModel extends A2UIModel {
250
- }
251
- export declare class A2UIMessageV09 extends A2UIModel {
252
- readonly version: "v0.9";
253
- constructor(options?: A2UIRecord);
254
- checkExactlyOne(): this;
255
- _check_exactly_one(): this;
256
- }
257
- export declare class A2UIEventV09 extends A2UIModel {
258
- readonly version: "v0.9";
259
- constructor(options?: A2UIRecord);
260
- checkExactlyOne(): this;
261
- _check_exactly_one(): this;
262
- }
263
- export declare function extractA2UIJsonObjects(text: string): A2UIRecord[];
264
- export declare const extract_a2ui_json_objects: typeof extractA2UIJsonObjects;
265
- export declare function extractA2UIV09JsonObjects(text: string): A2UIRecord[];
266
- export declare const extract_a2ui_v09_json_objects: typeof extractA2UIV09JsonObjects;
267
- export declare const A2UI_MIME_TYPE = "application/json+a2ui";
268
- export declare const A2UI_EXTENSION_URI = "https://a2ui.org/a2a-extension/a2ui/v0.8";
269
- export declare const A2UI_STANDARD_CATALOG_ID = "https://a2ui.org/specification/v0_8/standard_catalog_definition.json";
270
- export declare const A2UI_V09_EXTENSION_URI = "https://a2ui.org/a2a-extension/a2ui/v0.9";
271
- export declare const A2UI_V09_BASIC_CATALOG_ID = "https://a2ui.org/specification/v0_9/basic_catalog.json";
272
- export declare function isV09Message(message: A2UIRecord): boolean;
273
- export declare const is_v09_message: typeof isV09Message;
274
- export declare function isV08Message(message: A2UIRecord): boolean;
275
- export declare const is_v08_message: typeof isV08Message;
276
- export declare class A2UIConversationState {
277
- activeSurfaces: Record<string, A2UIRecord>;
278
- active_surfaces: Record<string, A2UIRecord>;
279
- dataModels: Record<string, A2UIRecord[]>;
280
- data_models: Record<string, A2UIRecord[]>;
281
- lastA2uiMessages: A2UIRecord[];
282
- last_a2ui_messages: A2UIRecord[];
283
- initializedSurfaces: Set<string>;
284
- initialized_surfaces: Set<string>;
285
- constructor(options?: {
286
- activeSurfaces?: Record<string, A2UIRecord>;
287
- active_surfaces?: Record<string, A2UIRecord>;
288
- dataModels?: Record<string, A2UIRecord[]>;
289
- data_models?: Record<string, A2UIRecord[]>;
290
- lastA2uiMessages?: A2UIRecord[];
291
- last_a2ui_messages?: A2UIRecord[];
292
- initializedSurfaces?: Iterable<string>;
293
- initialized_surfaces?: Iterable<string>;
294
- });
295
- isReady(): boolean;
296
- is_ready(): boolean;
297
- }
298
- export declare class A2UIValidationError extends Error {
299
- readonly errors: readonly unknown[];
300
- constructor(message: string, errors?: readonly unknown[]);
301
- }
302
- export declare function validateA2UIMessage(data: A2UIRecord, options?: {
303
- validateCatalog?: boolean;
304
- validate_catalog?: boolean;
305
- }): A2UIMessage;
306
- export declare const validate_a2ui_message: typeof validateA2UIMessage;
307
- export declare function validateA2UIEvent(data: A2UIRecord): A2UIEvent;
308
- export declare const validate_a2ui_event: typeof validateA2UIEvent;
309
- export declare function validateA2UIMessageV09(data: A2UIRecord): A2UIMessageV09;
310
- export declare const validate_a2ui_message_v09: typeof validateA2UIMessageV09;
311
- export declare function validateA2UIEventV09(data: A2UIRecord): A2UIEventV09;
312
- export declare const validate_a2ui_event_v09: typeof validateA2UIEventV09;
313
- export declare function validateCatalogComponents(message: A2UIMessage): void;
314
- export declare const validate_catalog_components: typeof validateCatalogComponents;
315
- export declare function validateCatalogComponentsV09(message: A2UIMessageV09): void;
316
- export declare const validate_catalog_components_v09: typeof validateCatalogComponentsV09;
317
- export declare class A2UIClientExtension {
318
- private readonly catalogId;
319
- private readonly allowedComponents;
320
- private readonly version;
321
- constructor(catalogId?: string | null, allowedComponents?: readonly string[] | null, version?: string);
322
- injectTools(_agent: unknown): void;
323
- inject_tools(agent: unknown): void;
324
- extractStateFromHistory(conversationHistory: readonly {
325
- parts?: readonly {
326
- root?: {
327
- kind?: string;
328
- metadata?: A2UIRecord | null;
329
- data?: unknown;
330
- };
331
- }[];
332
- }[]): A2UIConversationState | null;
333
- extract_state_from_history(conversationHistory: readonly {
334
- parts?: readonly {
335
- root?: {
336
- kind?: string;
337
- metadata?: A2UIRecord | null;
338
- data?: unknown;
339
- };
340
- }[];
341
- }[]): A2UIConversationState | null;
342
- augmentPrompt(basePrompt: string, _conversationState?: A2UIConversationState | null): string;
343
- augment_prompt(basePrompt: string, conversationState?: A2UIConversationState | null): string;
344
- processResponse(agentResponse: unknown, conversationState?: A2UIConversationState | null): unknown;
345
- process_response(agentResponse: unknown, conversationState?: A2UIConversationState | null): unknown;
346
- prepareMessageMetadata(_conversationState?: A2UIConversationState | null): A2UIRecord;
347
- prepare_message_metadata(conversationState?: A2UIConversationState | null): A2UIRecord;
348
- private applyMessageToState;
349
- private shouldTrackCatalog;
350
- }
351
- export declare class A2UIServerExtension {
352
- uri: string;
353
- readonly required = false;
354
- readonly description = "A2UI declarative UI generation";
355
- private readonly catalogIds;
356
- private readonly acceptInlineCatalogs;
357
- private readonly version;
358
- constructor(catalogIds?: readonly string[] | null, acceptInlineCatalogs?: boolean, version?: string);
359
- get params(): A2UIRecord;
360
- isActive(context?: {
361
- activeExtensions?: readonly string[];
362
- active_extensions?: readonly string[];
363
- clientExtensions?: readonly string[] | Set<string>;
364
- client_extensions?: readonly string[] | Set<string>;
365
- }): boolean;
366
- is_active(context?: Parameters<typeof this.isActive>[0]): boolean;
367
- onRequest(context: Parameters<typeof this.isActive>[0] & {
368
- state?: A2UIRecord;
369
- getExtensionMetadata?: (uri: string, key: string) => unknown;
370
- get_extension_metadata?: (uri: string, key: string) => unknown;
371
- }): Promise<void>;
372
- on_request(context: Parameters<typeof this.onRequest>[0]): Promise<void>;
373
- onResponse(context: {
374
- state?: A2UIRecord;
375
- }, result: unknown): Promise<unknown>;
376
- on_response(context: {
377
- state?: A2UIRecord;
378
- }, result: unknown): Promise<unknown>;
379
- }
@@ -1,90 +0,0 @@
1
- import type { LLM } from "./llm.js";
2
- import type { LLMMessage } from "./types.js";
3
- export type ConversationalInputs = {
4
- id?: string;
5
- user_message?: string | Record<string, unknown>;
6
- last_intent?: string;
7
- };
8
- export declare const ConversationalInputs: Readonly<{
9
- kind: "ConversationalInputs";
10
- }>;
11
- export type ConversationalConfigOptions = {
12
- defaultIntents?: readonly string[] | null;
13
- default_intents?: readonly string[] | null;
14
- intentLlm?: string | null;
15
- intent_llm?: string | null;
16
- interactivePrompt?: string;
17
- interactive_prompt?: string;
18
- interactiveTimeout?: number | null;
19
- interactive_timeout?: number | null;
20
- exitCommands?: readonly string[];
21
- exit_commands?: readonly string[];
22
- deferTraceFinalization?: boolean;
23
- defer_trace_finalization?: boolean;
24
- };
25
- export declare class ConversationalConfig {
26
- readonly defaultIntents: readonly string[] | null;
27
- readonly default_intents: readonly string[] | null;
28
- readonly intentLlm: string | null;
29
- readonly intent_llm: string | null;
30
- readonly interactivePrompt: string;
31
- readonly interactive_prompt: string;
32
- readonly interactiveTimeout: number | null;
33
- readonly interactive_timeout: number | null;
34
- readonly exitCommands: readonly string[];
35
- readonly exit_commands: readonly string[];
36
- readonly deferTraceFinalization: boolean;
37
- readonly defer_trace_finalization: boolean;
38
- constructor(options?: ConversationalConfigOptions);
39
- }
40
- export declare class ChatState {
41
- id: string;
42
- messages: LLMMessage[];
43
- last_user_message: string | null;
44
- lastUserMessage: string | null;
45
- last_intent: string | null;
46
- lastIntent: string | null;
47
- session_ready: boolean;
48
- sessionReady: boolean;
49
- constructor(options?: {
50
- id?: string;
51
- messages?: readonly LLMMessage[];
52
- last_user_message?: string | null;
53
- lastUserMessage?: string | null;
54
- last_intent?: string | null;
55
- lastIntent?: string | null;
56
- session_ready?: boolean;
57
- sessionReady?: boolean;
58
- });
59
- }
60
- export declare function normalizeKickoffInputs(inputs: Record<string, unknown> | null | undefined, options?: {
61
- userMessage?: string | Record<string, unknown> | null;
62
- user_message?: string | Record<string, unknown> | null;
63
- sessionId?: string | null;
64
- session_id?: string | null;
65
- }): Record<string, unknown> | null;
66
- export declare const normalize_kickoff_inputs: typeof normalizeKickoffInputs;
67
- export declare function getConversationMessages(flow: unknown): LLMMessage[];
68
- export declare const get_conversation_messages: typeof getConversationMessages;
69
- export declare function appendMessage(flow: unknown, role: LLMMessage["role"], content: string, extra?: Record<string, unknown>): void;
70
- export declare const append_message: typeof appendMessage;
71
- export declare function setStateField(flow: unknown, name: string, value: unknown): void;
72
- export declare const set_state_field: typeof setStateField;
73
- export declare function receiveUserMessage(flow: unknown, text: string, options?: {
74
- outcomes?: readonly string[] | null;
75
- llm?: string | LLM | null;
76
- }): string;
77
- export declare const receive_user_message: typeof receiveUserMessage;
78
- export declare function prepareConversationalTurn(flow: unknown, options?: {
79
- userMessage?: string | Record<string, unknown> | null;
80
- user_message?: string | Record<string, unknown> | null;
81
- intents?: readonly string[] | null;
82
- intentLlm?: string | LLM | null;
83
- intent_llm?: string | LLM | null;
84
- config?: ConversationalConfig | null;
85
- }): void;
86
- export declare const prepare_conversational_turn: typeof prepareConversationalTurn;
87
- export declare function inputHistoryToMessages(entries: readonly unknown[]): LLMMessage[];
88
- export declare const input_history_to_messages: typeof inputHistoryToMessages;
89
- export declare function getConversationalConfig(flow: unknown): ConversationalConfig | null;
90
- export declare const get_conversational_config: typeof getConversationalConfig;
@@ -1,195 +0,0 @@
1
- export type FlowDefinitionCondition = string | Record<string, unknown>;
2
- export declare const FlowDefinitionCondition: Readonly<{
3
- kind: "FlowDefinitionCondition";
4
- }>;
5
- export type FlowDefinitionDiagnosticOptions = {
6
- code: string;
7
- message: string;
8
- severity?: "warning" | "error";
9
- path?: string | null;
10
- };
11
- export declare class FlowDefinitionDiagnostic {
12
- readonly code: string;
13
- readonly message: string;
14
- readonly severity: "warning" | "error";
15
- readonly path: string | null;
16
- constructor(options: FlowDefinitionDiagnosticOptions);
17
- toDict(excludeNone?: boolean): Record<string, unknown>;
18
- to_dict(options?: {
19
- exclude_none?: boolean;
20
- }): Record<string, unknown>;
21
- }
22
- export type FlowStateDefinitionOptions = {
23
- type?: "dict" | "pydantic" | "unknown";
24
- ref?: string | null;
25
- default?: unknown;
26
- };
27
- export declare class FlowStateDefinition {
28
- readonly type: "dict" | "pydantic" | "unknown";
29
- readonly ref: string | null;
30
- readonly default: unknown;
31
- constructor(options?: FlowStateDefinitionOptions);
32
- toDict(excludeNone?: boolean): Record<string, unknown>;
33
- to_dict(options?: {
34
- exclude_none?: boolean;
35
- }): Record<string, unknown>;
36
- }
37
- export type FlowConfigDefinitionOptions = {
38
- tracing?: boolean | null;
39
- stream?: boolean;
40
- memory?: unknown;
41
- inputProvider?: unknown;
42
- input_provider?: unknown;
43
- suppressFlowEvents?: boolean;
44
- suppress_flow_events?: boolean;
45
- maxMethodCalls?: number;
46
- max_method_calls?: number;
47
- };
48
- export declare class FlowConfigDefinition {
49
- readonly tracing: boolean | null;
50
- readonly stream: boolean;
51
- readonly memory: unknown;
52
- readonly inputProvider: unknown;
53
- readonly input_provider: unknown;
54
- readonly suppressFlowEvents: boolean;
55
- readonly suppress_flow_events: boolean;
56
- readonly maxMethodCalls: number;
57
- readonly max_method_calls: number;
58
- constructor(options?: FlowConfigDefinitionOptions);
59
- toDict(excludeNone?: boolean): Record<string, unknown>;
60
- to_dict(options?: {
61
- exclude_none?: boolean;
62
- }): Record<string, unknown>;
63
- }
64
- export type FlowPersistenceDefinitionOptions = {
65
- enabled?: boolean;
66
- verbose?: boolean;
67
- persistence?: unknown;
68
- };
69
- export declare class FlowPersistenceDefinition {
70
- readonly enabled: boolean;
71
- readonly verbose: boolean;
72
- readonly persistence: unknown;
73
- constructor(options?: FlowPersistenceDefinitionOptions);
74
- toDict(excludeNone?: boolean): Record<string, unknown>;
75
- to_dict(options?: {
76
- exclude_none?: boolean;
77
- }): Record<string, unknown>;
78
- }
79
- export type FlowHumanFeedbackDefinitionOptions = {
80
- message: string;
81
- emit?: readonly string[] | null;
82
- llm?: unknown;
83
- defaultOutcome?: string | null;
84
- default_outcome?: string | null;
85
- metadata?: Record<string, unknown> | null;
86
- provider?: unknown;
87
- learn?: boolean;
88
- learnSource?: string;
89
- learn_source?: string;
90
- learnStrict?: boolean;
91
- learn_strict?: boolean;
92
- };
93
- export declare class FlowHumanFeedbackDefinition {
94
- readonly message: string;
95
- readonly emit: readonly string[] | null;
96
- readonly llm: unknown;
97
- readonly defaultOutcome: string | null;
98
- readonly default_outcome: string | null;
99
- readonly metadata: Record<string, unknown> | null;
100
- readonly provider: unknown;
101
- readonly learn: boolean;
102
- readonly learnSource: string;
103
- readonly learn_source: string;
104
- readonly learnStrict: boolean;
105
- readonly learn_strict: boolean;
106
- constructor(options: FlowHumanFeedbackDefinitionOptions);
107
- toDict(excludeNone?: boolean): Record<string, unknown>;
108
- to_dict(options?: {
109
- exclude_none?: boolean;
110
- }): Record<string, unknown>;
111
- }
112
- export type FlowMethodDefinitionOptions = {
113
- start?: boolean | FlowDefinitionCondition | null;
114
- listen?: FlowDefinitionCondition | null;
115
- router?: boolean;
116
- emit?: readonly string[] | null;
117
- humanFeedback?: FlowHumanFeedbackDefinition | FlowHumanFeedbackDefinitionOptions | null;
118
- human_feedback?: FlowHumanFeedbackDefinition | FlowHumanFeedbackDefinitionOptions | null;
119
- persist?: FlowPersistenceDefinition | FlowPersistenceDefinitionOptions | null;
120
- };
121
- export declare class FlowMethodDefinition {
122
- readonly start: boolean | FlowDefinitionCondition | null;
123
- readonly listen: FlowDefinitionCondition | null;
124
- readonly router: boolean;
125
- readonly emit: readonly string[] | null;
126
- readonly humanFeedback: FlowHumanFeedbackDefinition | null;
127
- readonly human_feedback: FlowHumanFeedbackDefinition | null;
128
- readonly persist: FlowPersistenceDefinition | null;
129
- constructor(options?: FlowMethodDefinitionOptions);
130
- get isStart(): boolean;
131
- get is_start(): boolean;
132
- toDict(excludeNone?: boolean): Record<string, unknown>;
133
- to_dict(options?: {
134
- exclude_none?: boolean;
135
- }): Record<string, unknown>;
136
- }
137
- export type FlowDefinitionOptions = {
138
- schema?: string;
139
- schema_?: string;
140
- name: string;
141
- description?: string | null;
142
- state?: FlowStateDefinition | FlowStateDefinitionOptions | null;
143
- config?: FlowConfigDefinition | FlowConfigDefinitionOptions;
144
- persist?: FlowPersistenceDefinition | FlowPersistenceDefinitionOptions | null;
145
- methods?: Record<string, FlowMethodDefinition | FlowMethodDefinitionOptions>;
146
- diagnostics?: readonly (FlowDefinitionDiagnostic | FlowDefinitionDiagnosticOptions)[];
147
- };
148
- export declare class FlowDefinition {
149
- readonly schema_: string;
150
- readonly name: string;
151
- readonly description: string | null;
152
- readonly state: FlowStateDefinition | null;
153
- readonly config: FlowConfigDefinition;
154
- readonly persist: FlowPersistenceDefinition | null;
155
- readonly methods: Record<string, FlowMethodDefinition>;
156
- diagnostics: FlowDefinitionDiagnostic[];
157
- constructor(options: FlowDefinitionOptions);
158
- toDict(options?: {
159
- excludeNone?: boolean;
160
- exclude_none?: boolean;
161
- }): Record<string, unknown>;
162
- to_dict(options?: {
163
- exclude_none?: boolean;
164
- }): Record<string, unknown>;
165
- toJson(options?: {
166
- indent?: number | null;
167
- excludeNone?: boolean;
168
- exclude_none?: boolean;
169
- }): string;
170
- to_json(options?: {
171
- indent?: number | null;
172
- exclude_none?: boolean;
173
- }): string;
174
- toYaml(options?: {
175
- excludeNone?: boolean;
176
- exclude_none?: boolean;
177
- }): string;
178
- to_yaml(options?: {
179
- exclude_none?: boolean;
180
- }): string;
181
- static fromDict(data: Record<string, unknown>): FlowDefinition;
182
- static from_dict(data: Record<string, unknown>): FlowDefinition;
183
- static fromJson(data: string): FlowDefinition;
184
- static from_json(data: string): FlowDefinition;
185
- static fromYaml(data: string): FlowDefinition;
186
- static from_yaml(data: string): FlowDefinition;
187
- static jsonSchema(): Record<string, unknown>;
188
- static json_schema(): Record<string, unknown>;
189
- validateContract(): FlowDefinitionDiagnostic[];
190
- validate_contract(): FlowDefinitionDiagnostic[];
191
- withDiagnostics(): this;
192
- with_diagnostics(): this;
193
- logDiagnostics(): void;
194
- log_diagnostics(): void;
195
- }