@bubblelab/shared-schemas 0.1.11 → 0.1.13
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.
- package/dist/index.d.ts +10076 -28
- package/dist/index.js +3328 -29
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/agent-memory.d.ts +0 -21
- package/dist/agent-memory.d.ts.map +0 -1
- package/dist/agent-memory.js +0 -11
- package/dist/agent-memory.js.map +0 -1
- package/dist/ai-models.d.ts +0 -4
- package/dist/ai-models.d.ts.map +0 -1
- package/dist/ai-models.js +0 -31
- package/dist/ai-models.js.map +0 -1
- package/dist/api-schema.d.ts +0 -38
- package/dist/api-schema.d.ts.map +0 -1
- package/dist/api-schema.js +0 -26
- package/dist/api-schema.js.map +0 -1
- package/dist/bubble-definition-schema.d.ts +0 -840
- package/dist/bubble-definition-schema.d.ts.map +0 -1
- package/dist/bubble-definition-schema.js +0 -297
- package/dist/bubble-definition-schema.js.map +0 -1
- package/dist/bubbleflow-execution-schema.d.ts +0 -1261
- package/dist/bubbleflow-execution-schema.d.ts.map +0 -1
- package/dist/bubbleflow-execution-schema.js +0 -354
- package/dist/bubbleflow-execution-schema.js.map +0 -1
- package/dist/bubbleflow-generation-prompts.d.ts +0 -25
- package/dist/bubbleflow-generation-prompts.d.ts.map +0 -1
- package/dist/bubbleflow-generation-prompts.js +0 -426
- package/dist/bubbleflow-generation-prompts.js.map +0 -1
- package/dist/bubbleflow-schema.d.ts +0 -2071
- package/dist/bubbleflow-schema.d.ts.map +0 -1
- package/dist/bubbleflow-schema.js +0 -336
- package/dist/bubbleflow-schema.js.map +0 -1
- package/dist/coffee.d.ts +0 -2201
- package/dist/coffee.d.ts.map +0 -1
- package/dist/coffee.js +0 -258
- package/dist/coffee.js.map +0 -1
- package/dist/credential-schema.d.ts +0 -419
- package/dist/credential-schema.d.ts.map +0 -1
- package/dist/credential-schema.js +0 -458
- package/dist/credential-schema.js.map +0 -1
- package/dist/cron-utils.d.ts +0 -47
- package/dist/cron-utils.d.ts.map +0 -1
- package/dist/cron-utils.js +0 -228
- package/dist/cron-utils.js.map +0 -1
- package/dist/database-definition-schema.d.ts +0 -97
- package/dist/database-definition-schema.d.ts.map +0 -1
- package/dist/database-definition-schema.js +0 -36
- package/dist/database-definition-schema.js.map +0 -1
- package/dist/error-enhancer.d.ts +0 -6
- package/dist/error-enhancer.d.ts.map +0 -1
- package/dist/error-enhancer.js +0 -88
- package/dist/error-enhancer.js.map +0 -1
- package/dist/generate-bubbleflow-schema.d.ts +0 -1525
- package/dist/generate-bubbleflow-schema.d.ts.map +0 -1
- package/dist/generate-bubbleflow-schema.js +0 -304
- package/dist/generate-bubbleflow-schema.js.map +0 -1
- package/dist/hash-utils.d.ts +0 -26
- package/dist/hash-utils.d.ts.map +0 -1
- package/dist/hash-utils.js +0 -37
- package/dist/hash-utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/milk-tea.d.ts +0 -106
- package/dist/milk-tea.d.ts.map +0 -1
- package/dist/milk-tea.js +0 -71
- package/dist/milk-tea.js.map +0 -1
- package/dist/mock-data-generator.d.ts +0 -51
- package/dist/mock-data-generator.d.ts.map +0 -1
- package/dist/mock-data-generator.js +0 -335
- package/dist/mock-data-generator.js.map +0 -1
- package/dist/oauth-schema.d.ts +0 -61
- package/dist/oauth-schema.d.ts.map +0 -1
- package/dist/oauth-schema.js +0 -75
- package/dist/oauth-schema.js.map +0 -1
- package/dist/param-utils.d.ts +0 -10
- package/dist/param-utils.d.ts.map +0 -1
- package/dist/param-utils.js +0 -13
- package/dist/param-utils.js.map +0 -1
- package/dist/pearl.d.ts +0 -346
- package/dist/pearl.d.ts.map +0 -1
- package/dist/pearl.js +0 -90
- package/dist/pearl.js.map +0 -1
- package/dist/storage-utils.d.ts +0 -19
- package/dist/storage-utils.d.ts.map +0 -1
- package/dist/storage-utils.js +0 -54
- package/dist/storage-utils.js.map +0 -1
- package/dist/streaming-events.d.ts +0 -132
- package/dist/streaming-events.d.ts.map +0 -1
- package/dist/streaming-events.js +0 -5
- package/dist/streaming-events.js.map +0 -1
- package/dist/subscription-status-schema.d.ts +0 -250
- package/dist/subscription-status-schema.d.ts.map +0 -1
- package/dist/subscription-status-schema.js +0 -144
- package/dist/subscription-status-schema.js.map +0 -1
- package/dist/trigger.d.ts +0 -113
- package/dist/trigger.d.ts.map +0 -1
- package/dist/trigger.js +0 -12
- package/dist/trigger.js.map +0 -1
- package/dist/types.d.ts +0 -29
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -43
- package/dist/types.js.map +0 -1
- package/dist/waitlist-schema.d.ts +0 -30
- package/dist/waitlist-schema.d.ts.map +0 -1
- package/dist/waitlist-schema.js +0 -39
- package/dist/waitlist-schema.js.map +0 -1
- package/dist/webhook-schema.d.ts +0 -95
- package/dist/webhook-schema.d.ts.map +0 -1
- package/dist/webhook-schema.js +0 -50
- package/dist/webhook-schema.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-bubbleflow-schema.d.ts","sourceRoot":"","sources":["../src/generate-bubbleflow-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;EA2CE,CAAC;AAGhD,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FE,CAAC;AAGxD,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGL,CAAC;AACzC,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAC7D,OAAO,wCAAwC,CAChD,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { ParsedBubbleWithInfoSchema } from './bubble-definition-schema';
|
|
2
|
-
import { z } from '@hono/zod-openapi';
|
|
3
|
-
import { BubbleParameterType } from './bubble-definition-schema';
|
|
4
|
-
import { CredentialType } from './types';
|
|
5
|
-
import { ServiceUsageSchema } from './bubbleflow-execution-schema';
|
|
6
|
-
import { CoffeeMessageSchema } from './coffee';
|
|
7
|
-
// BubbleFlow generation schemas
|
|
8
|
-
export const generateBubbleFlowCodeSchema = z.object({
|
|
9
|
-
prompt: z.string().min(1).openapi({
|
|
10
|
-
description: 'Natural language description of the desired BubbleFlow',
|
|
11
|
-
example: 'Create a flow that queries my database and sends results to Slack',
|
|
12
|
-
}),
|
|
13
|
-
flowId: z.number().optional().openapi({
|
|
14
|
-
description: 'Optional flow ID to update with generated code (for async generation)',
|
|
15
|
-
example: 123,
|
|
16
|
-
}),
|
|
17
|
-
// Coffee agent unified messages (for planning phase)
|
|
18
|
-
messages: z.array(CoffeeMessageSchema).optional().openapi({
|
|
19
|
-
description: 'Full conversation history including clarification Q&A, context results, plan approvals',
|
|
20
|
-
}),
|
|
21
|
-
// Plan context (passed to Boba for enriched code generation)
|
|
22
|
-
planContext: z.string().optional().openapi({
|
|
23
|
-
description: 'Plan context from Coffee agent (passed to Boba for enriched generation)',
|
|
24
|
-
example: 'Plan: 1. Fetch data from API 2. Process with AI 3. Send to Slack',
|
|
25
|
-
}),
|
|
26
|
-
});
|
|
27
|
-
export const generateBubbleFlowCodeResponseSchema = z.object({
|
|
28
|
-
generatedCode: z.string().openapi({
|
|
29
|
-
description: 'The generated BubbleFlow TypeScript code',
|
|
30
|
-
}),
|
|
31
|
-
isValid: z.boolean().openapi({
|
|
32
|
-
description: 'Whether the generated code is valid',
|
|
33
|
-
}),
|
|
34
|
-
success: z.boolean(),
|
|
35
|
-
error: z.string(),
|
|
36
|
-
bubbleParameters: z.record(z.string(), ParsedBubbleWithInfoSchema).openapi({
|
|
37
|
-
description: 'Parsed bubble parameters from the generated code',
|
|
38
|
-
}),
|
|
39
|
-
requiredCredentials: z.record(z.string(), z.array(z.string())).openapi({
|
|
40
|
-
description: 'Required credentials for the bubbles in the generated code',
|
|
41
|
-
}),
|
|
42
|
-
});
|
|
43
|
-
/**
|
|
44
|
-
* Schema for the result of BubbleFlow generation
|
|
45
|
-
* Used by the BubbleFlowGeneratorWorkflow
|
|
46
|
-
*/
|
|
47
|
-
export const GenerationResultSchema = z.object({
|
|
48
|
-
generatedCode: z
|
|
49
|
-
.string()
|
|
50
|
-
.describe('The generated BubbleFlow TypeScript code'),
|
|
51
|
-
isValid: z.boolean().describe('Whether the generated code is valid'),
|
|
52
|
-
success: z.boolean(),
|
|
53
|
-
error: z.string(),
|
|
54
|
-
flowId: z.number().optional().openapi({
|
|
55
|
-
description: 'ID of the generated BubbleFlow',
|
|
56
|
-
example: 123,
|
|
57
|
-
}),
|
|
58
|
-
toolCalls: z
|
|
59
|
-
.array(z.unknown())
|
|
60
|
-
.describe('The tool calls made by the AI agent'),
|
|
61
|
-
summary: z
|
|
62
|
-
.string()
|
|
63
|
-
.default('')
|
|
64
|
-
.describe('High-level instructions for using the validated flow'),
|
|
65
|
-
inputsSchema: z
|
|
66
|
-
.string()
|
|
67
|
-
.default('')
|
|
68
|
-
.describe('JSON Schema (string) representing the inputs of the flow'),
|
|
69
|
-
serviceUsage: z.array(ServiceUsageSchema).optional().openapi({
|
|
70
|
-
description: 'Service usage statistics for the generation (array of services used)',
|
|
71
|
-
}),
|
|
72
|
-
bubbleCount: z.number().optional().openapi({
|
|
73
|
-
description: 'Number of bubbles used in the generated flow',
|
|
74
|
-
}),
|
|
75
|
-
codeLength: z.number().optional().openapi({
|
|
76
|
-
description: 'Length of the generated code in characters',
|
|
77
|
-
}),
|
|
78
|
-
bubbleParameters: z
|
|
79
|
-
.record(z.union([z.string(), z.number()]), ParsedBubbleWithInfoSchema)
|
|
80
|
-
.optional()
|
|
81
|
-
.openapi({
|
|
82
|
-
description: 'Parsed bubble parameters with descriptions from AI generation',
|
|
83
|
-
}),
|
|
84
|
-
});
|
|
85
|
-
// POST /bubbleflow-template/data-analyst - Generate template from description
|
|
86
|
-
export const generateBubbleFlowTemplateSchema = z
|
|
87
|
-
.object({
|
|
88
|
-
name: z.string().min(1).max(100).openapi({
|
|
89
|
-
description: 'Name for the workflow',
|
|
90
|
-
example: 'Sam Dix Data Scientist Bot',
|
|
91
|
-
}),
|
|
92
|
-
description: z.string().min(10).max(500).openapi({
|
|
93
|
-
description: 'Description of what the workflow should do',
|
|
94
|
-
example: 'A Slack bot that helps analyze user engagement data and provides insights',
|
|
95
|
-
}),
|
|
96
|
-
roles: z.string().min(10).max(1000).openapi({
|
|
97
|
-
description: "Detailed description of the bot's roles and responsibilities",
|
|
98
|
-
example: 'Be prepared to answer any question on user engagement and come up with proactive insights...',
|
|
99
|
-
}),
|
|
100
|
-
useCase: z.literal('slack-data-scientist').openapi({
|
|
101
|
-
description: 'The specific use case template to generate',
|
|
102
|
-
example: 'slack-data-scientist',
|
|
103
|
-
}),
|
|
104
|
-
// Optional configuration parameters
|
|
105
|
-
verbosity: z.enum(['1', '2', '3', '4', '5']).optional().openapi({
|
|
106
|
-
description: 'Response verbosity level (1=concise, 5=comprehensive)',
|
|
107
|
-
example: '3',
|
|
108
|
-
}),
|
|
109
|
-
technicality: z.enum(['1', '2', '3', '4', '5']).optional().openapi({
|
|
110
|
-
description: 'Technical complexity level (1=plain English, 5=expert)',
|
|
111
|
-
example: '2',
|
|
112
|
-
}),
|
|
113
|
-
includeQuery: z.boolean().optional().openapi({
|
|
114
|
-
description: 'Include the SQL query in the response',
|
|
115
|
-
example: true,
|
|
116
|
-
}),
|
|
117
|
-
includeExplanation: z.boolean().optional().openapi({
|
|
118
|
-
description: 'Include query explanation in the response',
|
|
119
|
-
example: true,
|
|
120
|
-
}),
|
|
121
|
-
maxQueries: z.number().optional().openapi({
|
|
122
|
-
description: 'Maximum number of queries to run',
|
|
123
|
-
example: 10,
|
|
124
|
-
}),
|
|
125
|
-
})
|
|
126
|
-
.openapi('GenerateBubbleFlowTemplateRequest');
|
|
127
|
-
// POST /bubbleflow-template/document-generation - Generate document processing template
|
|
128
|
-
export const generateDocumentGenerationTemplateSchema = z
|
|
129
|
-
.object({
|
|
130
|
-
name: z.string().min(1).max(100).openapi({
|
|
131
|
-
description: 'Name for the document processing workflow',
|
|
132
|
-
example: 'Expense Report Generator',
|
|
133
|
-
}),
|
|
134
|
-
description: z
|
|
135
|
-
.string()
|
|
136
|
-
.max(500)
|
|
137
|
-
.default('Document processing workflow')
|
|
138
|
-
.openapi({
|
|
139
|
-
description: 'Description of what the document processing workflow should do (optional)',
|
|
140
|
-
example: 'Process receipts and invoices to generate structured expense reports',
|
|
141
|
-
}),
|
|
142
|
-
outputDescription: z.string().min(1).max(1000).openapi({
|
|
143
|
-
description: 'Detailed description of the desired output format and data extraction',
|
|
144
|
-
example: 'Extract expense tracking data with vendor name, transaction date, amount, category, and description',
|
|
145
|
-
}),
|
|
146
|
-
// Optional configuration parameters
|
|
147
|
-
outputFormat: z.enum(['html', 'csv', 'json']).optional().openapi({
|
|
148
|
-
description: 'Default output format for generated documents',
|
|
149
|
-
example: 'html',
|
|
150
|
-
}),
|
|
151
|
-
conversionOptions: z
|
|
152
|
-
.object({
|
|
153
|
-
preserveStructure: z.boolean().optional().openapi({
|
|
154
|
-
description: 'Preserve document structure during parsing',
|
|
155
|
-
example: true,
|
|
156
|
-
}),
|
|
157
|
-
includeVisualDescriptions: z.boolean().optional().openapi({
|
|
158
|
-
description: 'Include descriptions of visual elements',
|
|
159
|
-
example: true,
|
|
160
|
-
}),
|
|
161
|
-
extractNumericalData: z.boolean().optional().openapi({
|
|
162
|
-
description: 'Extract and process numerical data',
|
|
163
|
-
example: true,
|
|
164
|
-
}),
|
|
165
|
-
combinePages: z.boolean().optional().openapi({
|
|
166
|
-
description: 'Combine multiple pages into single output',
|
|
167
|
-
example: true,
|
|
168
|
-
}),
|
|
169
|
-
})
|
|
170
|
-
.optional(),
|
|
171
|
-
imageOptions: z
|
|
172
|
-
.object({
|
|
173
|
-
format: z.enum(['png', 'jpg', 'jpeg']).optional().openapi({
|
|
174
|
-
description: 'Image format for document conversion',
|
|
175
|
-
example: 'png',
|
|
176
|
-
}),
|
|
177
|
-
quality: z.number().min(0.1).max(1.0).optional().openapi({
|
|
178
|
-
description: 'Image quality (0.1 to 1.0)',
|
|
179
|
-
example: 0.9,
|
|
180
|
-
}),
|
|
181
|
-
dpi: z.number().min(72).max(300).optional().openapi({
|
|
182
|
-
description: 'Image DPI for conversion',
|
|
183
|
-
example: 200,
|
|
184
|
-
}),
|
|
185
|
-
})
|
|
186
|
-
.optional(),
|
|
187
|
-
aiOptions: z
|
|
188
|
-
.object({
|
|
189
|
-
model: z.string().optional().openapi({
|
|
190
|
-
description: 'AI model to use for processing',
|
|
191
|
-
example: 'google/gemini-2.5-flash',
|
|
192
|
-
}),
|
|
193
|
-
temperature: z.number().min(0).max(2).optional().openapi({
|
|
194
|
-
description: 'AI model temperature (0 to 2)',
|
|
195
|
-
example: 0.2,
|
|
196
|
-
}),
|
|
197
|
-
maxTokens: z.number().min(1000).max(200000).optional().openapi({
|
|
198
|
-
description: 'Maximum tokens for AI processing',
|
|
199
|
-
example: 90000,
|
|
200
|
-
}),
|
|
201
|
-
jsonMode: z.boolean().optional().openapi({
|
|
202
|
-
description: 'Enable JSON mode for structured output',
|
|
203
|
-
example: false,
|
|
204
|
-
}),
|
|
205
|
-
})
|
|
206
|
-
.optional(),
|
|
207
|
-
metadata: z
|
|
208
|
-
.record(z.string(), z.unknown())
|
|
209
|
-
.optional()
|
|
210
|
-
.openapi({
|
|
211
|
-
description: 'Additional metadata for the workflow (e.g., outputDescription)',
|
|
212
|
-
example: { outputDescription: 'Extract expense data from receipts' },
|
|
213
|
-
}),
|
|
214
|
-
})
|
|
215
|
-
.openapi('GenerateDocumentGenerationTemplateRequest');
|
|
216
|
-
// Response for template generation (extends the regular create response)
|
|
217
|
-
export const bubbleFlowTemplateResponseSchema = z
|
|
218
|
-
.object({
|
|
219
|
-
id: z.number().openapi({
|
|
220
|
-
description: 'ID of the created BubbleFlow template',
|
|
221
|
-
example: 123,
|
|
222
|
-
}),
|
|
223
|
-
name: z.string().openapi({
|
|
224
|
-
description: 'Name of the BubbleFlow',
|
|
225
|
-
example: 'Sam Dix Data Scientist Bot',
|
|
226
|
-
}),
|
|
227
|
-
description: z.string().openapi({
|
|
228
|
-
description: 'Description of the BubbleFlow',
|
|
229
|
-
example: 'A Slack bot that helps analyze user engagement data',
|
|
230
|
-
}),
|
|
231
|
-
eventType: z.string().openapi({
|
|
232
|
-
description: 'Event type this BubbleFlow responds to',
|
|
233
|
-
example: 'slack/bot_mentioned',
|
|
234
|
-
}),
|
|
235
|
-
displayedBubbleParameters: z.record(z.string(), z.object({
|
|
236
|
-
variableName: z.string(),
|
|
237
|
-
bubbleName: z.string(),
|
|
238
|
-
className: z.string(),
|
|
239
|
-
parameters: z.array(z.object({
|
|
240
|
-
name: z.string(),
|
|
241
|
-
value: z.unknown(),
|
|
242
|
-
type: z.nativeEnum(BubbleParameterType),
|
|
243
|
-
})),
|
|
244
|
-
hasAwait: z.boolean(),
|
|
245
|
-
hasActionCall: z.boolean(),
|
|
246
|
-
})),
|
|
247
|
-
bubbleParameters: z
|
|
248
|
-
.record(z.string(), z.object({
|
|
249
|
-
variableName: z.string(),
|
|
250
|
-
bubbleName: z.string(),
|
|
251
|
-
className: z.string(),
|
|
252
|
-
parameters: z.array(z.object({
|
|
253
|
-
name: z.string(),
|
|
254
|
-
value: z.unknown(),
|
|
255
|
-
type: z.nativeEnum(BubbleParameterType),
|
|
256
|
-
})),
|
|
257
|
-
hasAwait: z.boolean(),
|
|
258
|
-
hasActionCall: z.boolean(),
|
|
259
|
-
}))
|
|
260
|
-
.openapi({
|
|
261
|
-
description: 'Parsed bubble parameters from the BubbleFlow code',
|
|
262
|
-
}),
|
|
263
|
-
requiredCredentials: z
|
|
264
|
-
.record(z.string(), z.array(z.nativeEnum(CredentialType)))
|
|
265
|
-
.optional()
|
|
266
|
-
.openapi({
|
|
267
|
-
description: 'Mapping of bubble names to their required credential types',
|
|
268
|
-
example: {
|
|
269
|
-
'database-connection': [CredentialType.DATABASE_CRED],
|
|
270
|
-
'slack-notification': [CredentialType.SLACK_CRED],
|
|
271
|
-
'ai-analysis': [CredentialType.GOOGLE_GEMINI_CRED],
|
|
272
|
-
},
|
|
273
|
-
}),
|
|
274
|
-
createdAt: z.string().openapi({
|
|
275
|
-
description: 'ISO timestamp when the template was created',
|
|
276
|
-
example: '2025-01-15T10:30:00.000Z',
|
|
277
|
-
}),
|
|
278
|
-
updatedAt: z.string().openapi({
|
|
279
|
-
description: 'ISO timestamp when the template was last updated',
|
|
280
|
-
example: '2025-01-15T10:30:00.000Z',
|
|
281
|
-
}),
|
|
282
|
-
webhook: z
|
|
283
|
-
.object({
|
|
284
|
-
id: z.number().openapi({ description: 'Webhook ID', example: 456 }),
|
|
285
|
-
url: z.string().openapi({
|
|
286
|
-
description: 'Full webhook URL',
|
|
287
|
-
example: 'http://localhost:3001/webhook/user123/my-webhook',
|
|
288
|
-
}),
|
|
289
|
-
path: z.string().openapi({
|
|
290
|
-
description: 'Webhook path',
|
|
291
|
-
example: 'my-webhook',
|
|
292
|
-
}),
|
|
293
|
-
active: z.boolean().openapi({
|
|
294
|
-
description: 'Whether webhook is active',
|
|
295
|
-
example: true,
|
|
296
|
-
}),
|
|
297
|
-
})
|
|
298
|
-
.optional()
|
|
299
|
-
.openapi({
|
|
300
|
-
description: 'Webhook information (if webhook was created)',
|
|
301
|
-
}),
|
|
302
|
-
})
|
|
303
|
-
.openapi('BubbleFlowTemplateResponse');
|
|
304
|
-
//# sourceMappingURL=generate-bubbleflow-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-bubbleflow-schema.js","sourceRoot":"","sources":["../src/generate-bubbleflow-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,gCAAgC;AAChC,MAAM,CAAC,MAAM,4BAA4B,GAAG,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AAC;QAC5B,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,0BAA0B;KACpC,CAAC;IAEF,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QACnE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;YACtB,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,kDAAkD;SAC5D,CAAC;QACF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,OAAO,EAAE,YAAY;SACtB,CAAC;QACF,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;YAC1B,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE,IAAI;SACd,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,8CAA8C;KAC5D,CAAC;CACL,CAAC;KACD,OAAO,CAAC,4BAA4B,CAAC,CAAC"}
|
package/dist/hash-utils.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared hashing utilities for generating deterministic variable IDs
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Generate a deterministic non-negative integer ID from a string input.
|
|
6
|
-
* Uses FNV-1a hash algorithm for better distribution and fewer collisions.
|
|
7
|
-
*
|
|
8
|
-
* This is used to generate variableIds that remain consistent across:
|
|
9
|
-
* - Bubble parsing (BubbleParser)
|
|
10
|
-
* - Logger injection (LoggerInjector)
|
|
11
|
-
*
|
|
12
|
-
* @param input - String to hash (e.g., method name, uniqueId)
|
|
13
|
-
* @returns A 6-digit integer in the range [100000, 999999]
|
|
14
|
-
*/
|
|
15
|
-
export declare function hashToVariableId(input: string): number;
|
|
16
|
-
/**
|
|
17
|
-
* Build a call site key from method name and invocation order.
|
|
18
|
-
* Using the ordinal position of the invocation within the method keeps the key
|
|
19
|
-
* stable even if lines shift after instrumentation.
|
|
20
|
-
*
|
|
21
|
-
* @param methodName - Name of the instance method being called
|
|
22
|
-
* @param invocationIndex - 1-based invocation index within that method
|
|
23
|
-
* @returns A string key in the format "methodName#invocationIndex"
|
|
24
|
-
*/
|
|
25
|
-
export declare function buildCallSiteKey(methodName: string, invocationIndex: number): string;
|
|
26
|
-
//# sourceMappingURL=hash-utils.d.ts.map
|
package/dist/hash-utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hash-utils.d.ts","sourceRoot":"","sources":["../src/hash-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAStD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GACtB,MAAM,CAER"}
|
package/dist/hash-utils.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared hashing utilities for generating deterministic variable IDs
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Generate a deterministic non-negative integer ID from a string input.
|
|
6
|
-
* Uses FNV-1a hash algorithm for better distribution and fewer collisions.
|
|
7
|
-
*
|
|
8
|
-
* This is used to generate variableIds that remain consistent across:
|
|
9
|
-
* - Bubble parsing (BubbleParser)
|
|
10
|
-
* - Logger injection (LoggerInjector)
|
|
11
|
-
*
|
|
12
|
-
* @param input - String to hash (e.g., method name, uniqueId)
|
|
13
|
-
* @returns A 6-digit integer in the range [100000, 999999]
|
|
14
|
-
*/
|
|
15
|
-
export function hashToVariableId(input) {
|
|
16
|
-
let hash = 2166136261; // FNV-1a 32-bit offset basis
|
|
17
|
-
for (let i = 0; i < input.length; i++) {
|
|
18
|
-
hash ^= input.charCodeAt(i);
|
|
19
|
-
hash = (hash * 16777619) >>> 0; // unsigned 32-bit
|
|
20
|
-
}
|
|
21
|
-
// Map to 6-digit range to avoid colliding with small AST ids while readable
|
|
22
|
-
const mapped = 100000 + (hash % 900000);
|
|
23
|
-
return mapped;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Build a call site key from method name and invocation order.
|
|
27
|
-
* Using the ordinal position of the invocation within the method keeps the key
|
|
28
|
-
* stable even if lines shift after instrumentation.
|
|
29
|
-
*
|
|
30
|
-
* @param methodName - Name of the instance method being called
|
|
31
|
-
* @param invocationIndex - 1-based invocation index within that method
|
|
32
|
-
* @returns A string key in the format "methodName#invocationIndex"
|
|
33
|
-
*/
|
|
34
|
-
export function buildCallSiteKey(methodName, invocationIndex) {
|
|
35
|
-
return `${methodName}#${invocationIndex}`;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=hash-utils.js.map
|
package/dist/hash-utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hash-utils.js","sourceRoot":"","sources":["../src/hash-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,IAAI,GAAG,UAAU,CAAC,CAAC,6BAA6B;IACpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB;IACpD,CAAC;IACD,4EAA4E;IAC5E,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAkB,EAClB,eAAuB;IAEvB,OAAO,GAAG,UAAU,IAAI,eAAe,EAAE,CAAC;AAC5C,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
package/dist/milk-tea.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Conversation message schema for milk tea multi-turn conversations
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Request schema for Milk Tea agent
|
|
7
|
-
* Milk Tea helps users configure bubble parameters through conversation
|
|
8
|
-
*/
|
|
9
|
-
export declare const MilkTeaRequestSchema: z.ZodObject<{
|
|
10
|
-
userRequest: z.ZodString;
|
|
11
|
-
bubbleName: z.ZodString;
|
|
12
|
-
bubbleSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
13
|
-
currentCode: z.ZodOptional<z.ZodString>;
|
|
14
|
-
availableCredentials: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
-
userName: z.ZodString;
|
|
16
|
-
insertLocation: z.ZodOptional<z.ZodString>;
|
|
17
|
-
conversationHistory: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
-
role: z.ZodEnum<["user", "assistant", "tool"]>;
|
|
19
|
-
content: z.ZodString;
|
|
20
|
-
toolCallId: z.ZodOptional<z.ZodString>;
|
|
21
|
-
name: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
role: "user" | "assistant" | "tool";
|
|
24
|
-
content: string;
|
|
25
|
-
toolCallId?: string | undefined;
|
|
26
|
-
name?: string | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
role: "user" | "assistant" | "tool";
|
|
29
|
-
content: string;
|
|
30
|
-
toolCallId?: string | undefined;
|
|
31
|
-
name?: string | undefined;
|
|
32
|
-
}>, "many">>>;
|
|
33
|
-
model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-5.1", "openai/gpt-5.2", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "google/gemini-3-pro-preview", "google/gemini-3-pro-image-preview", "google/gemini-3-flash-preview", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "anthropic/claude-haiku-4-5", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6", "openrouter/anthropic/claude-sonnet-4.5", "openrouter/google/gemini-3-pro-preview", "openrouter/morph/morph-v3-large", "openrouter/x-ai/grok-4.1-fast", "openrouter/openai/gpt-oss-120b", "openrouter/deepseek/deepseek-chat-v3.1"]>>;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
bubbleName: string;
|
|
36
|
-
model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/x-ai/grok-4.1-fast" | "openrouter/openai/gpt-oss-120b" | "openrouter/deepseek/deepseek-chat-v3.1";
|
|
37
|
-
userRequest: string;
|
|
38
|
-
bubbleSchema: Record<string, unknown>;
|
|
39
|
-
availableCredentials: string[];
|
|
40
|
-
userName: string;
|
|
41
|
-
conversationHistory: {
|
|
42
|
-
role: "user" | "assistant" | "tool";
|
|
43
|
-
content: string;
|
|
44
|
-
toolCallId?: string | undefined;
|
|
45
|
-
name?: string | undefined;
|
|
46
|
-
}[];
|
|
47
|
-
currentCode?: string | undefined;
|
|
48
|
-
insertLocation?: string | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
bubbleName: string;
|
|
51
|
-
userRequest: string;
|
|
52
|
-
bubbleSchema: Record<string, unknown>;
|
|
53
|
-
userName: string;
|
|
54
|
-
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/x-ai/grok-4.1-fast" | "openrouter/openai/gpt-oss-120b" | "openrouter/deepseek/deepseek-chat-v3.1" | undefined;
|
|
55
|
-
currentCode?: string | undefined;
|
|
56
|
-
availableCredentials?: string[] | undefined;
|
|
57
|
-
insertLocation?: string | undefined;
|
|
58
|
-
conversationHistory?: {
|
|
59
|
-
role: "user" | "assistant" | "tool";
|
|
60
|
-
content: string;
|
|
61
|
-
toolCallId?: string | undefined;
|
|
62
|
-
name?: string | undefined;
|
|
63
|
-
}[] | undefined;
|
|
64
|
-
}>;
|
|
65
|
-
/**
|
|
66
|
-
* Response schema for Milk Tea agent
|
|
67
|
-
*/
|
|
68
|
-
export declare const MilkTeaResponseSchema: z.ZodObject<{
|
|
69
|
-
type: z.ZodEnum<["code", "question", "reject"]>;
|
|
70
|
-
message: z.ZodString;
|
|
71
|
-
snippet: z.ZodOptional<z.ZodString>;
|
|
72
|
-
success: z.ZodBoolean;
|
|
73
|
-
error: z.ZodOptional<z.ZodString>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
message: string;
|
|
76
|
-
type: "code" | "question" | "reject";
|
|
77
|
-
success: boolean;
|
|
78
|
-
error?: string | undefined;
|
|
79
|
-
snippet?: string | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
message: string;
|
|
82
|
-
type: "code" | "question" | "reject";
|
|
83
|
-
success: boolean;
|
|
84
|
-
error?: string | undefined;
|
|
85
|
-
snippet?: string | undefined;
|
|
86
|
-
}>;
|
|
87
|
-
/**
|
|
88
|
-
* Internal agent response format (JSON mode output from AI)
|
|
89
|
-
*/
|
|
90
|
-
export declare const MilkTeaAgentOutputSchema: z.ZodObject<{
|
|
91
|
-
type: z.ZodEnum<["code", "question", "reject"]>;
|
|
92
|
-
message: z.ZodString;
|
|
93
|
-
snippet: z.ZodOptional<z.ZodString>;
|
|
94
|
-
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
message: string;
|
|
96
|
-
type: "code" | "question" | "reject";
|
|
97
|
-
snippet?: string | undefined;
|
|
98
|
-
}, {
|
|
99
|
-
message: string;
|
|
100
|
-
type: "code" | "question" | "reject";
|
|
101
|
-
snippet?: string | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
export type MilkTeaRequest = z.infer<typeof MilkTeaRequestSchema>;
|
|
104
|
-
export type MilkTeaResponse = z.infer<typeof MilkTeaResponseSchema>;
|
|
105
|
-
export type MilkTeaAgentOutput = z.infer<typeof MilkTeaAgentOutputSchema>;
|
|
106
|
-
//# sourceMappingURL=milk-tea.d.ts.map
|
package/dist/milk-tea.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"milk-tea.d.ts","sourceRoot":"","sources":["../src/milk-tea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EA0BhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/milk-tea.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AvailableModels } from './ai-models.js';
|
|
3
|
-
import { ConversationMessageSchema } from './agent-memory.js';
|
|
4
|
-
/**
|
|
5
|
-
* Conversation message schema for milk tea multi-turn conversations
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Request schema for Milk Tea agent
|
|
9
|
-
* Milk Tea helps users configure bubble parameters through conversation
|
|
10
|
-
*/
|
|
11
|
-
export const MilkTeaRequestSchema = z.object({
|
|
12
|
-
userRequest: z
|
|
13
|
-
.string()
|
|
14
|
-
.min(1, 'User request is required')
|
|
15
|
-
.describe('The user request or question about configuring the bubble'),
|
|
16
|
-
bubbleName: z
|
|
17
|
-
.string()
|
|
18
|
-
.min(1, 'Bubble name is required')
|
|
19
|
-
.describe('The name of the bubble to configure (e.g., "email-tool")'),
|
|
20
|
-
bubbleSchema: z
|
|
21
|
-
.record(z.unknown())
|
|
22
|
-
.describe('The full schema/interface definition of the bubble including parameters and types'),
|
|
23
|
-
currentCode: z
|
|
24
|
-
.string()
|
|
25
|
-
.optional()
|
|
26
|
-
.describe('The current workflow code context for validation'),
|
|
27
|
-
availableCredentials: z
|
|
28
|
-
.array(z.string())
|
|
29
|
-
.default([])
|
|
30
|
-
.describe('List of credential types available to the user'),
|
|
31
|
-
userName: z.string().describe('Name of the user making the request'),
|
|
32
|
-
insertLocation: z
|
|
33
|
-
.string()
|
|
34
|
-
.optional()
|
|
35
|
-
.describe('Location in code where the snippet should be inserted'),
|
|
36
|
-
conversationHistory: z
|
|
37
|
-
.array(ConversationMessageSchema)
|
|
38
|
-
.optional()
|
|
39
|
-
.default([])
|
|
40
|
-
.describe('Previous conversation messages for multi-turn interactions (frontend manages state)'),
|
|
41
|
-
model: AvailableModels.default('google/gemini-2.5-pro').describe('AI model to use for Milk Tea agent'),
|
|
42
|
-
});
|
|
43
|
-
/**
|
|
44
|
-
* Response schema for Milk Tea agent
|
|
45
|
-
*/
|
|
46
|
-
export const MilkTeaResponseSchema = z.object({
|
|
47
|
-
type: z
|
|
48
|
-
.enum(['code', 'question', 'reject'])
|
|
49
|
-
.describe('Type of response: code (generated snippet), question (needs clarification), reject (infeasible request)'),
|
|
50
|
-
message: z
|
|
51
|
-
.string()
|
|
52
|
-
.describe('Human-readable message: explanation for code, question text, or rejection reason'),
|
|
53
|
-
snippet: z
|
|
54
|
-
.string()
|
|
55
|
-
.optional()
|
|
56
|
-
.describe('Generated TypeScript code snippet (only present when type is "code")'),
|
|
57
|
-
success: z.boolean().describe('Whether the operation completed successfully'),
|
|
58
|
-
error: z
|
|
59
|
-
.string()
|
|
60
|
-
.optional()
|
|
61
|
-
.describe('Error message if the operation failed'),
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* Internal agent response format (JSON mode output from AI)
|
|
65
|
-
*/
|
|
66
|
-
export const MilkTeaAgentOutputSchema = z.object({
|
|
67
|
-
type: z.enum(['code', 'question', 'reject']),
|
|
68
|
-
message: z.string(),
|
|
69
|
-
snippet: z.string().optional(),
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=milk-tea.js.map
|
package/dist/milk-tea.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"milk-tea.js","sourceRoot":"","sources":["../src/milk-tea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;SAClC,QAAQ,CAAC,2DAA2D,C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E,CACvE;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,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,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"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export interface BubbleOperationResult {
|
|
3
|
-
success: boolean;
|
|
4
|
-
error: string;
|
|
5
|
-
}
|
|
6
|
-
export interface BubbleResult<T> extends BubbleOperationResult {
|
|
7
|
-
data: T;
|
|
8
|
-
executionId: string;
|
|
9
|
-
timestamp: Date;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Utility class for generating mock data from Zod schemas
|
|
13
|
-
* Useful for testing, development, and creating sample data
|
|
14
|
-
*/
|
|
15
|
-
export declare class MockDataGenerator {
|
|
16
|
-
/**
|
|
17
|
-
* Generate a complete mock BubbleResult from a result schema
|
|
18
|
-
*/
|
|
19
|
-
static generateMockResult<TResult extends BubbleOperationResult>(resultSchema: z.ZodObject<z.ZodRawShape>): BubbleResult<TResult>;
|
|
20
|
-
/**
|
|
21
|
-
* Generate mock data from JSON Schema
|
|
22
|
-
* Converts JSON Schema to mock data with realistic values
|
|
23
|
-
*/
|
|
24
|
-
static generateMockFromJsonSchema(jsonSchema: Record<string, unknown>): Record<string, unknown>;
|
|
25
|
-
/**
|
|
26
|
-
* Generate a mock value for a specific JSON Schema property
|
|
27
|
-
*/
|
|
28
|
-
static generateMockValueFromJsonSchema(schema: Record<string, unknown>): unknown;
|
|
29
|
-
/**
|
|
30
|
-
* Generate mock data object from a Zod schema
|
|
31
|
-
* Recursively handles nested objects, arrays, and primitive types
|
|
32
|
-
*/
|
|
33
|
-
static generateMockFromSchema(schema: z.ZodObject<z.ZodRawShape>): Record<string, unknown>;
|
|
34
|
-
/**
|
|
35
|
-
* Generate a mock value for a specific Zod type
|
|
36
|
-
*/
|
|
37
|
-
static generateMockValue(zodType: z.ZodTypeAny): unknown;
|
|
38
|
-
/**
|
|
39
|
-
* Generate mock string values with format-specific handling
|
|
40
|
-
*/
|
|
41
|
-
private static generateMockString;
|
|
42
|
-
/**
|
|
43
|
-
* Generate mock number values respecting constraints
|
|
44
|
-
*/
|
|
45
|
-
private static generateMockNumber;
|
|
46
|
-
/**
|
|
47
|
-
* Generate mock data with custom seed for reproducible results
|
|
48
|
-
*/
|
|
49
|
-
static generateMockWithSeed<TResult extends BubbleOperationResult>(resultSchema: z.ZodObject<z.ZodRawShape>, seed: number): BubbleResult<TResult>;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=mock-data-generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mock-data-generator.d.ts","sourceRoot":"","sources":["../src/mock-data-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC5D,IAAI,EAAE,CAAC,CAAC;IACR,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAO,S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