@bubblelab/shared-schemas 0.1.8 → 0.1.9

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 (47) hide show
  1. package/dist/ai-models.d.ts +4 -0
  2. package/dist/ai-models.d.ts.map +1 -0
  3. package/dist/ai-models.js +20 -0
  4. package/dist/ai-models.js.map +1 -0
  5. package/dist/bubble-definition-schema.d.ts +127 -19
  6. package/dist/bubble-definition-schema.d.ts.map +1 -1
  7. package/dist/bubble-definition-schema.js +7 -0
  8. package/dist/bubble-definition-schema.js.map +1 -1
  9. package/dist/bubbleflow-execution-schema.d.ts +99 -47
  10. package/dist/bubbleflow-execution-schema.d.ts.map +1 -1
  11. package/dist/bubbleflow-schema.d.ts +388 -119
  12. package/dist/bubbleflow-schema.d.ts.map +1 -1
  13. package/dist/bubbleflow-schema.js +19 -0
  14. package/dist/bubbleflow-schema.js.map +1 -1
  15. package/dist/credential-schema.d.ts +46 -46
  16. package/dist/credential-schema.d.ts.map +1 -1
  17. package/dist/credential-schema.js +7 -0
  18. package/dist/credential-schema.js.map +1 -1
  19. package/dist/cron-utils.d.ts +47 -0
  20. package/dist/cron-utils.d.ts.map +1 -0
  21. package/dist/cron-utils.js +228 -0
  22. package/dist/cron-utils.js.map +1 -0
  23. package/dist/general-chat.d.ts +81 -0
  24. package/dist/general-chat.d.ts.map +1 -0
  25. package/dist/general-chat.js +58 -0
  26. package/dist/general-chat.js.map +1 -0
  27. package/dist/generate-bubbleflow-schema.d.ts +106 -54
  28. package/dist/generate-bubbleflow-schema.d.ts.map +1 -1
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +3 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/milk-tea.d.ts +108 -0
  34. package/dist/milk-tea.d.ts.map +1 -0
  35. package/dist/milk-tea.js +74 -0
  36. package/dist/milk-tea.js.map +1 -0
  37. package/dist/pearl.d.ts +276 -0
  38. package/dist/pearl.d.ts.map +1 -0
  39. package/dist/pearl.js +75 -0
  40. package/dist/pearl.js.map +1 -0
  41. package/dist/streaming-events.d.ts +70 -0
  42. package/dist/streaming-events.d.ts.map +1 -1
  43. package/dist/types.d.ts +2 -1
  44. package/dist/types.d.ts.map +1 -1
  45. package/dist/types.js +2 -0
  46. package/dist/types.js.map +1 -1
  47. package/package.json +1 -1
@@ -0,0 +1,276 @@
1
+ import { z } from 'zod';
2
+ import { CredentialType } from './types.js';
3
+ /**
4
+ * Request schema for Pearl agent
5
+ * Pearl helps users build complete workflows without requiring specific bubbles
6
+ */
7
+ export declare const PearlRequestSchema: z.ZodObject<{
8
+ userRequest: z.ZodString;
9
+ currentCode: z.ZodOptional<z.ZodString>;
10
+ userName: z.ZodString;
11
+ availableVariables: z.ZodArray<z.ZodAny, "many">;
12
+ conversationHistory: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
13
+ role: z.ZodEnum<["user", "assistant"]>;
14
+ content: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ content: string;
17
+ role: "user" | "assistant";
18
+ }, {
19
+ content: string;
20
+ role: "user" | "assistant";
21
+ }>, "many">>>;
22
+ model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-o4-mini", "openai/gpt-4o", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "anthropic/claude-sonnet-4-5-20250929", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6"]>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ model: "google/gemini-2.5-flash" | "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-o4-mini" | "openai/gpt-4o" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5-20250929" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6";
25
+ userRequest: string;
26
+ userName: string;
27
+ availableVariables: any[];
28
+ conversationHistory: {
29
+ content: string;
30
+ role: "user" | "assistant";
31
+ }[];
32
+ currentCode?: string | undefined;
33
+ }, {
34
+ userRequest: string;
35
+ userName: string;
36
+ availableVariables: any[];
37
+ model?: "google/gemini-2.5-flash" | "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-o4-mini" | "openai/gpt-4o" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5-20250929" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | undefined;
38
+ currentCode?: string | undefined;
39
+ conversationHistory?: {
40
+ content: string;
41
+ role: "user" | "assistant";
42
+ }[] | undefined;
43
+ }>;
44
+ /**
45
+ * Response schema for Pearl agent
46
+ */
47
+ export declare const PearlResponseSchema: z.ZodObject<{
48
+ type: z.ZodEnum<["code", "question", "reject"]>;
49
+ message: z.ZodString;
50
+ snippet: z.ZodOptional<z.ZodString>;
51
+ bubbleParameters: z.ZodOptional<z.ZodRecord<z.ZodNumber, z.ZodObject<{
52
+ variableName: z.ZodString;
53
+ bubbleName: z.ZodString;
54
+ className: z.ZodString;
55
+ parameters: z.ZodArray<z.ZodObject<{
56
+ location: z.ZodOptional<z.ZodObject<{
57
+ startLine: z.ZodNumber;
58
+ startCol: z.ZodNumber;
59
+ endLine: z.ZodNumber;
60
+ endCol: z.ZodNumber;
61
+ }, "strip", z.ZodTypeAny, {
62
+ startLine: number;
63
+ startCol: number;
64
+ endLine: number;
65
+ endCol: number;
66
+ }, {
67
+ startLine: number;
68
+ startCol: number;
69
+ endLine: number;
70
+ endCol: number;
71
+ }>>;
72
+ variableId: z.ZodOptional<z.ZodNumber>;
73
+ name: z.ZodString;
74
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
75
+ type: z.ZodNativeEnum<typeof import("./bubble-definition-schema.js").BubbleParameterType>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
78
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
79
+ name: string;
80
+ location?: {
81
+ startLine: number;
82
+ startCol: number;
83
+ endLine: number;
84
+ endCol: number;
85
+ } | undefined;
86
+ variableId?: number | undefined;
87
+ }, {
88
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
89
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
90
+ name: string;
91
+ location?: {
92
+ startLine: number;
93
+ startCol: number;
94
+ endLine: number;
95
+ endCol: number;
96
+ } | undefined;
97
+ variableId?: number | undefined;
98
+ }>, "many">;
99
+ hasAwait: z.ZodBoolean;
100
+ hasActionCall: z.ZodBoolean;
101
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodType<import("./types.js").BubbleName, z.ZodTypeDef, import("./types.js").BubbleName>, "many">>;
102
+ dependencyGraph: z.ZodOptional<z.ZodType<import("./bubble-definition-schema.js").DependencyGraphNode, z.ZodTypeDef, import("./bubble-definition-schema.js").DependencyGraphNode>>;
103
+ variableId: z.ZodNumber;
104
+ nodeType: z.ZodEnum<["service", "tool", "workflow", "unknown"]>;
105
+ location: z.ZodObject<{
106
+ startLine: z.ZodNumber;
107
+ startCol: z.ZodNumber;
108
+ endLine: z.ZodNumber;
109
+ endCol: z.ZodNumber;
110
+ }, "strip", z.ZodTypeAny, {
111
+ startLine: number;
112
+ startCol: number;
113
+ endLine: number;
114
+ endCol: number;
115
+ }, {
116
+ startLine: number;
117
+ startCol: number;
118
+ endLine: number;
119
+ endCol: number;
120
+ }>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ location: {
123
+ startLine: number;
124
+ startCol: number;
125
+ endLine: number;
126
+ endCol: number;
127
+ };
128
+ variableId: number;
129
+ variableName: string;
130
+ bubbleName: string;
131
+ className: string;
132
+ parameters: {
133
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
134
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
135
+ name: string;
136
+ location?: {
137
+ startLine: number;
138
+ startCol: number;
139
+ endLine: number;
140
+ endCol: number;
141
+ } | undefined;
142
+ variableId?: number | undefined;
143
+ }[];
144
+ hasAwait: boolean;
145
+ hasActionCall: boolean;
146
+ nodeType: "unknown" | "service" | "tool" | "workflow";
147
+ dependencies?: import("./types.js").BubbleName[] | undefined;
148
+ dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
149
+ }, {
150
+ location: {
151
+ startLine: number;
152
+ startCol: number;
153
+ endLine: number;
154
+ endCol: number;
155
+ };
156
+ variableId: number;
157
+ variableName: string;
158
+ bubbleName: string;
159
+ className: string;
160
+ parameters: {
161
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
162
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
163
+ name: string;
164
+ location?: {
165
+ startLine: number;
166
+ startCol: number;
167
+ endLine: number;
168
+ endCol: number;
169
+ } | undefined;
170
+ variableId?: number | undefined;
171
+ }[];
172
+ hasAwait: boolean;
173
+ hasActionCall: boolean;
174
+ nodeType: "unknown" | "service" | "tool" | "workflow";
175
+ dependencies?: import("./types.js").BubbleName[] | undefined;
176
+ dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
177
+ }>>>;
178
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
179
+ requiredCredentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">>>;
180
+ success: z.ZodBoolean;
181
+ error: z.ZodOptional<z.ZodString>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ message: string;
184
+ type: "code" | "question" | "reject";
185
+ success: boolean;
186
+ error?: string | undefined;
187
+ inputSchema?: Record<string, unknown> | undefined;
188
+ requiredCredentials?: Record<string, CredentialType[]> | undefined;
189
+ bubbleParameters?: Record<number, {
190
+ location: {
191
+ startLine: number;
192
+ startCol: number;
193
+ endLine: number;
194
+ endCol: number;
195
+ };
196
+ variableId: number;
197
+ variableName: string;
198
+ bubbleName: string;
199
+ className: string;
200
+ parameters: {
201
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
202
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
203
+ name: string;
204
+ location?: {
205
+ startLine: number;
206
+ startCol: number;
207
+ endLine: number;
208
+ endCol: number;
209
+ } | undefined;
210
+ variableId?: number | undefined;
211
+ }[];
212
+ hasAwait: boolean;
213
+ hasActionCall: boolean;
214
+ nodeType: "unknown" | "service" | "tool" | "workflow";
215
+ dependencies?: import("./types.js").BubbleName[] | undefined;
216
+ dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
217
+ }> | undefined;
218
+ snippet?: string | undefined;
219
+ }, {
220
+ message: string;
221
+ type: "code" | "question" | "reject";
222
+ success: boolean;
223
+ error?: string | undefined;
224
+ inputSchema?: Record<string, unknown> | undefined;
225
+ requiredCredentials?: Record<string, CredentialType[]> | undefined;
226
+ bubbleParameters?: Record<number, {
227
+ location: {
228
+ startLine: number;
229
+ startCol: number;
230
+ endLine: number;
231
+ endCol: number;
232
+ };
233
+ variableId: number;
234
+ variableName: string;
235
+ bubbleName: string;
236
+ className: string;
237
+ parameters: {
238
+ value: string | number | boolean | unknown[] | Record<string, unknown>;
239
+ type: import("./bubble-definition-schema.js").BubbleParameterType;
240
+ name: string;
241
+ location?: {
242
+ startLine: number;
243
+ startCol: number;
244
+ endLine: number;
245
+ endCol: number;
246
+ } | undefined;
247
+ variableId?: number | undefined;
248
+ }[];
249
+ hasAwait: boolean;
250
+ hasActionCall: boolean;
251
+ nodeType: "unknown" | "service" | "tool" | "workflow";
252
+ dependencies?: import("./types.js").BubbleName[] | undefined;
253
+ dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
254
+ }> | undefined;
255
+ snippet?: string | undefined;
256
+ }>;
257
+ /**
258
+ * Internal agent response format (JSON mode output from AI)
259
+ */
260
+ export declare const PearlAgentOutputSchema: z.ZodObject<{
261
+ type: z.ZodEnum<["code", "question", "reject"]>;
262
+ message: z.ZodString;
263
+ snippet: z.ZodOptional<z.ZodString>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ message: string;
266
+ type: "code" | "question" | "reject";
267
+ snippet?: string | undefined;
268
+ }, {
269
+ message: string;
270
+ type: "code" | "question" | "reject";
271
+ snippet?: string | undefined;
272
+ }>;
273
+ export type PearlRequest = z.infer<typeof PearlRequestSchema>;
274
+ export type PearlResponse = z.infer<typeof PearlResponseSchema>;
275
+ export type PearlAgentOutput = z.infer<typeof PearlAgentOutputSchema>;
276
+ //# sourceMappingURL=pearl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pearl.d.ts","sourceRoot":"","sources":["../src/pearl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAQ5C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+C9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAGH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/dist/pearl.js ADDED
@@ -0,0 +1,75 @@
1
+ import { z } from 'zod';
2
+ import { AvailableModels } from './ai-models.js';
3
+ import { ParsedBubbleWithInfoSchema } from './bubble-definition-schema.js';
4
+ import { CredentialType } from './types.js';
5
+ // Reuse the ConversationMessageSchema from milk-tea to avoid duplication
6
+ const ConversationMessageSchema = z.object({
7
+ role: z.enum(['user', 'assistant']),
8
+ content: z.string(),
9
+ });
10
+ /**
11
+ * Request schema for Pearl agent
12
+ * Pearl helps users build complete workflows without requiring specific bubbles
13
+ */
14
+ export const PearlRequestSchema = z.object({
15
+ userRequest: z
16
+ .string()
17
+ .min(1, 'User request is required')
18
+ .describe('The user request or question about building a workflow'),
19
+ currentCode: z
20
+ .string()
21
+ .optional()
22
+ .describe('The current workflow code for context and modification'),
23
+ userName: z.string().describe('Name of the user making the request'),
24
+ availableVariables: z
25
+ .array(z.any())
26
+ .describe('List of available variables in the current code'),
27
+ conversationHistory: z
28
+ .array(ConversationMessageSchema)
29
+ .optional()
30
+ .default([])
31
+ .describe('Previous conversation messages for multi-turn interactions (frontend manages state)'),
32
+ model: AvailableModels.default('google/gemini-2.5-pro').describe('AI model to use for Pearl agent'),
33
+ });
34
+ /**
35
+ * Response schema for Pearl agent
36
+ */
37
+ export const PearlResponseSchema = z.object({
38
+ type: z
39
+ .enum(['code', 'question', 'reject'])
40
+ .describe('Type of response: code (generated workflow), question (needs clarification), reject (infeasible request)'),
41
+ message: z
42
+ .string()
43
+ .describe('Human-readable message: explanation for code, question text, or rejection reason'),
44
+ snippet: z
45
+ .string()
46
+ .optional()
47
+ .describe('Generated TypeScript code for complete workflow (only present when type is "code")'),
48
+ bubbleParameters: z
49
+ .record(z.number(), ParsedBubbleWithInfoSchema)
50
+ .optional()
51
+ .describe('Parsed bubble parameters from the generated workflow (only present when type is "code")'),
52
+ inputSchema: z
53
+ .record(z.unknown())
54
+ .optional()
55
+ .describe('Input schema for the generated workflow (only present when type is "code")'),
56
+ requiredCredentials: z
57
+ .record(z.string(), z.array(z.nativeEnum(CredentialType)))
58
+ .optional()
59
+ .describe('Required credentials for the bubbles in the workflow (only present when type is "code")'),
60
+ success: z.boolean().describe('Whether the operation completed successfully'),
61
+ error: z
62
+ .string()
63
+ .optional()
64
+ .describe('Error message if the operation failed'),
65
+ });
66
+ /**
67
+ * Internal agent response format (JSON mode output from AI)
68
+ */
69
+ export const PearlAgentOutputSchema = z.object({
70
+ type: z.enum(['code', 'question', 'reject']),
71
+ message: z.string(),
72
+ snippet: z.string().optional(),
73
+ });
74
+ // Note: ConversationMessage type is exported from milk-tea.ts to avoid duplication
75
+ //# sourceMappingURL=pearl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pearl.js","sourceRoot":"","sources":["../src/pearl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,yEAAyE;AACzE,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;SAClC,QAAQ,CAAC,wDAAwD,CAAC;IAErE,WAAW,EAAE,CA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AC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;SACzD,QAAQ,EAAE;SACV,QAAQ,CACP,yFAAyF,CAC1F;IAEH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAE7E,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;CACrD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAMH,mFAAmF"}
@@ -31,5 +31,75 @@ export interface StreamingLogEvent {
31
31
  totalTokens: number;
32
32
  };
33
33
  }
34
+ export type StreamingEvent = {
35
+ type: 'start';
36
+ data: {
37
+ message: string;
38
+ maxIterations: number;
39
+ timestamp: string;
40
+ };
41
+ } | {
42
+ type: 'llm_start';
43
+ data: {
44
+ model: string;
45
+ temperature: number;
46
+ };
47
+ } | {
48
+ type: 'token';
49
+ data: {
50
+ content: string;
51
+ messageId: string;
52
+ };
53
+ } | {
54
+ type: 'think';
55
+ data: {
56
+ content: string;
57
+ messageId: string;
58
+ };
59
+ } | {
60
+ type: 'llm_complete';
61
+ data: {
62
+ messageId: string;
63
+ totalTokens?: number;
64
+ };
65
+ } | {
66
+ type: 'tool_start';
67
+ data: {
68
+ tool: string;
69
+ input: unknown;
70
+ callId: string;
71
+ };
72
+ } | {
73
+ type: 'tool_complete';
74
+ data: {
75
+ callId: string;
76
+ tool: string;
77
+ output: unknown;
78
+ duration: number;
79
+ };
80
+ } | {
81
+ type: 'iteration_start';
82
+ data: {
83
+ iteration: number;
84
+ };
85
+ } | {
86
+ type: 'iteration_complete';
87
+ data: {
88
+ iteration: number;
89
+ hasToolCalls: boolean;
90
+ };
91
+ } | {
92
+ type: 'error';
93
+ data: {
94
+ error: string;
95
+ recoverable: boolean;
96
+ };
97
+ } | {
98
+ type: 'complete';
99
+ data: {
100
+ result: unknown;
101
+ totalDuration: number;
102
+ };
103
+ };
34
104
  export type StreamCallback = (event: StreamingLogEvent) => void | Promise<void>;
35
105
  //# sourceMappingURL=streaming-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streaming-events.d.ts","sourceRoot":"","sources":["../src/streaming-events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EACA,UAAU,GACV,sBAAsB,GACtB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,oBAAoB,GACpB,OAAO,GACP,iBAAiB,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,2BAA2B,GAC3B,OAAO,GACP,OAAO,GACP,0BAA0B,GAC1B,iBAAiB,GACjB,oBAAoB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,gBAAgB,CAAC,EAAE,MAAM,CACvB,MAAM,EACN,OAAO,4BAA4B,EAAE,oBAAoB,CAC1D,CAAC;IAEF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,oBAAoB,CAAC,EAAE;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"streaming-events.d.ts","sourceRoot":"","sources":["../src/streaming-events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EACA,UAAU,GACV,sBAAsB,GACtB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,oBAAoB,GACpB,OAAO,GACP,iBAAiB,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,2BAA2B,GAC3B,OAAO,GACP,OAAO,GACP,0BAA0B,GAC1B,iBAAiB,GACjB,oBAAoB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,M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_R2_ACCOUNT_ID = "CLOUDFLARE_R2_ACCOUNT_ID",
13
+ APIFY_CRED = "APIFY_CRED",
13
14
  GOOGLE_DRIVE_CRED = "GOOGLE_DRIVE_CRED",
14
15
  GMAIL_CRED = "GMAIL_CRED",
15
16
  GOOGLE_SHEETS_CRED = "GOOGLE_SHEETS_CRED",
16
17
  GOOGLE_CALENDAR_CRED = "GOOGLE_CALENDAR_CRED"
17
18
  }
18
- export type BubbleName = 'hello-world' | 'ai-agent' | 'postgresql' | 'slack' | 'resend' | 'http' | 'slack-formatter-agent' | 'database-analyzer' | 'slack-notifier' | 'get-bubble-details-tool' | 'list-bubbles-tool' | 'sql-query-tool' | 'chart-js-tool' | 'web-search-tool' | 'web-scrape-tool' | 'web-crawl-tool' | 'web-extract-tool' | 'research-agent-tool' | 'reddit-scrape-tool' | 'slack-data-assistant' | 'bubbleflow-code-generator' | 'bubbleflow-generator' | 'pdf-form-operations' | 'pdf-ocr-workflow' | 'generate-document-workflow' | 'parse-document-workflow' | 'bubbleflow-validation-tool' | 'storage' | 'google-drive' | 'gmail' | 'google-sheets' | 'google-calendar';
19
+ export type BubbleName = 'hello-world' | 'ai-agent' | 'postgresql' | 'slack' | 'resend' | 'http' | 'slack-formatter-agent' | 'database-analyzer' | 'slack-notifier' | 'get-bubble-details-tool' | 'list-bubbles-tool' | 'sql-query-tool' | 'chart-js-tool' | 'web-search-tool' | 'web-scrape-tool' | 'web-crawl-tool' | 'web-extract-tool' | 'research-agent-tool' | 'reddit-scrape-tool' | 'slack-data-assistant' | 'bubbleflow-code-generator' | 'bubbleflow-generator' | 'pdf-form-operations' | 'pdf-ocr-workflow' | 'generate-document-workflow' | 'parse-document-workflow' | 'bubbleflow-validation-tool' | 'storage' | 'google-drive' | 'gmail' | 'google-sheets' | 'google-calendar' | 'apify' | 'instagram-tool' | 'linkedin-tool';
19
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IAExB,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAEnC,iBAAiB,sBAAsB;IAEvC,aAAa,kBAAkB;IAE/B,UAAU,eAAe;IAEzB,WAAW,gBAAgB;IAE3B,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;IAGrD,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;CAC9C;AAGD,MAAM,MAAM,UAAU,GAClB,aAAa,GACb,UAAU,GACV,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,MAAM,GACN,uBAAuB,GACvB,mBAAmB,GACnB,gBAAgB,GAChB,yBAAyB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,2BAA2B,GAC3B,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,4BAA4B,GAC5B,yBAAyB,GACzB,4BAA4B,GAC5B,SAAS,GACT,cAAc,GACd,OAAO,GACP,eAAe,GACf,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IAExB,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAEnC,iBAAiB,sBAAsB;IAEvC,aAAa,kBAAkB;IAE/B,UAAU,eAAe;IAEzB,WAAW,gBAAgB;IAE3B,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;IAErD,UAAU,eAAe;IAGzB,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;CAC9C;AAGD,MAAM,MAAM,UAAU,GAClB,aAAa,GACb,UAAU,GACV,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,MAAM,GACN,uBAAuB,GACvB,mBAAmB,GACnB,gBAAgB,GAChB,yBAAyB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,2BAA2B,GAC3B,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,4BAA4B,GAC5B,yBAAyB,GACzB,4BAA4B,GAC5B,SAAS,GACT,cAAc,GACd,OAAO,GACP,eAAe,GACf,iBAAiB,GACjB,OAAO,GACP,gBAAgB,GAChB,eAAe,CAAC"}
package/dist/types.js CHANGED
@@ -18,6 +18,8 @@ export var CredentialType;
18
18
  CredentialType["CLOUDFLARE_R2_ACCESS_KEY"] = "CLOUDFLARE_R2_ACCESS_KEY";
19
19
  CredentialType["CLOUDFLARE_R2_SECRET_KEY"] = "CLOUDFLARE_R2_SECRET_KEY";
20
20
  CredentialType["CLOUDFLARE_R2_ACCOUNT_ID"] = "CLOUDFLARE_R2_ACCOUNT_ID";
21
+ // Scraping Credentials
22
+ CredentialType["APIFY_CRED"] = "APIFY_CRED";
21
23
  // OAuth Credentials
22
24
  CredentialType["GOOGLE_DRIVE_CRED"] = "GOOGLE_DRIVE_CRED";
23
25
  CredentialType["GMAIL_CRED"] = "GMAIL_CRED";
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,MAAM,CAAN,IAAY,cAwBX;AAxBD,WAAY,cAAc;IACxB,iBAAiB;IACjB,6CAA2B,CAAA;IAC3B,2DAAyC,CAAA;IACzC,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qBAAqB;IACrB,yDAAuC,CAAA;IACvC,uBAAuB;IACvB,iDAA+B,CAAA;IAC/B,4BAA4B;IAC5B,2CAAyB,CAAA;IACzB,oBAAoB;IACpB,6CAA2B,CAAA;IAC3B,sBAAsB;IACtB,uEAAqD,CAAA;IACrD,uEAAqD,CAAA;IACrD,uEAAqD,CAAA;IAErD,oBAAoB;IACpB,yDAAuC,CAAA;IACvC,2CAAyB,CAAA;IACzB,2DAAyC,CAAA;IACzC,+DAA6C,CAAA;AAC/C,CAAC,EAxBW,cAAc,KAAd,cAAc,QAwBzB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,MAAM,CAAN,IAAY,cA0BX;AA1BD,WAAY,cAAc;IACxB,iBAAiB;IACjB,6CAA2B,CAAA;IAC3B,2DAAyC,CAAA;IACzC,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qBAAqB;IACrB,yDAAuC,CAAA;IACvC,uBAAuB;IACvB,iDAA+B,CAAA;IAC/B,4BAA4B;IAC5B,2CAAyB,CAAA;IACzB,oBAAoB;IACpB,6CAA2B,CAAA;IAC3B,sBAAsB;IACtB,uEAAqD,CAAA;IACrD,uEAAqD,CAAA;IACrD,uEAAqD,CAAA;IACrD,uBAAuB;IACvB,2CAAyB,CAAA;IAEzB,oBAAoB;IACpB,yDAAuC,CAAA;IACvC,2CAAyB,CAAA;IACzB,2DAAyC,CAAA;IACzC,+DAA6C,CAAA;AAC/C,CAAC,EA1BW,cAAc,KAAd,cAAc,QA0BzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblelab/shared-schemas",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",