@bubblelab/shared-schemas 0.1.12 → 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 -29
- package/dist/index.js +3328 -30
- 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 -299
- package/dist/bubble-definition-schema.js.map +0 -1
- package/dist/bubbleflow-execution-schema.d.ts +0 -1297
- package/dist/bubbleflow-execution-schema.d.ts.map +0 -1
- package/dist/bubbleflow-execution-schema.js +0 -360
- package/dist/bubbleflow-execution-schema.js.map +0 -1
- package/dist/bubbleflow-generation-prompts.d.ts +0 -8
- package/dist/bubbleflow-generation-prompts.d.ts.map +0 -1
- package/dist/bubbleflow-generation-prompts.js +0 -17
- 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 -257
- package/dist/coffee.js.map +0 -1
- package/dist/credential-schema.d.ts +0 -574
- package/dist/credential-schema.d.ts.map +0 -1
- package/dist/credential-schema.js +0 -829
- 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/rice.d.ts +0 -100
- package/dist/rice.d.ts.map +0 -1
- package/dist/rice.js +0 -65
- package/dist/rice.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 -140
- 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 -31
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -47
- 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
package/dist/pearl.d.ts
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type AvailableModel } from './ai-models.js';
|
|
3
|
-
import { CredentialType } from './types.js';
|
|
4
|
-
export declare const PEARL_DEFAULT_MODEL: AvailableModel;
|
|
5
|
-
/**
|
|
6
|
-
* Request schema for Pearl agent
|
|
7
|
-
* Pearl helps users build complete workflows without requiring specific bubbles
|
|
8
|
-
*/
|
|
9
|
-
export declare const PearlRequestSchema: z.ZodObject<{
|
|
10
|
-
userRequest: z.ZodString;
|
|
11
|
-
currentCode: z.ZodOptional<z.ZodString>;
|
|
12
|
-
userName: z.ZodString;
|
|
13
|
-
availableVariables: z.ZodArray<z.ZodAny, "many">;
|
|
14
|
-
conversationHistory: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
-
role: z.ZodEnum<["user", "assistant", "tool"]>;
|
|
16
|
-
content: z.ZodString;
|
|
17
|
-
toolCallId: z.ZodOptional<z.ZodString>;
|
|
18
|
-
name: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
content: string;
|
|
21
|
-
role: "user" | "assistant" | "tool";
|
|
22
|
-
name?: string | undefined;
|
|
23
|
-
toolCallId?: string | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
content: string;
|
|
26
|
-
role: "user" | "assistant" | "tool";
|
|
27
|
-
name?: string | undefined;
|
|
28
|
-
toolCallId?: string | undefined;
|
|
29
|
-
}>, "many">>>;
|
|
30
|
-
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"]>>;
|
|
31
|
-
additionalContext: z.ZodOptional<z.ZodString>;
|
|
32
|
-
uploadedFiles: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
-
name: z.ZodString;
|
|
34
|
-
content: z.ZodString;
|
|
35
|
-
fileType: z.ZodEnum<["image", "text"]>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
name: string;
|
|
38
|
-
content: string;
|
|
39
|
-
fileType: "text" | "image";
|
|
40
|
-
}, {
|
|
41
|
-
name: string;
|
|
42
|
-
content: string;
|
|
43
|
-
fileType: "text" | "image";
|
|
44
|
-
}>, "many">>>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
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";
|
|
47
|
-
userRequest: string;
|
|
48
|
-
userName: string;
|
|
49
|
-
conversationHistory: {
|
|
50
|
-
content: string;
|
|
51
|
-
role: "user" | "assistant" | "tool";
|
|
52
|
-
name?: string | undefined;
|
|
53
|
-
toolCallId?: string | undefined;
|
|
54
|
-
}[];
|
|
55
|
-
availableVariables: any[];
|
|
56
|
-
uploadedFiles: {
|
|
57
|
-
name: string;
|
|
58
|
-
content: string;
|
|
59
|
-
fileType: "text" | "image";
|
|
60
|
-
}[];
|
|
61
|
-
currentCode?: string | undefined;
|
|
62
|
-
additionalContext?: string | undefined;
|
|
63
|
-
}, {
|
|
64
|
-
userRequest: string;
|
|
65
|
-
userName: string;
|
|
66
|
-
availableVariables: any[];
|
|
67
|
-
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;
|
|
68
|
-
currentCode?: string | undefined;
|
|
69
|
-
conversationHistory?: {
|
|
70
|
-
content: string;
|
|
71
|
-
role: "user" | "assistant" | "tool";
|
|
72
|
-
name?: string | undefined;
|
|
73
|
-
toolCallId?: string | undefined;
|
|
74
|
-
}[] | undefined;
|
|
75
|
-
additionalContext?: string | undefined;
|
|
76
|
-
uploadedFiles?: {
|
|
77
|
-
name: string;
|
|
78
|
-
content: string;
|
|
79
|
-
fileType: "text" | "image";
|
|
80
|
-
}[] | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
/**
|
|
83
|
-
* Response schema for Pearl agent
|
|
84
|
-
*/
|
|
85
|
-
export declare const PearlResponseSchema: z.ZodObject<{
|
|
86
|
-
type: z.ZodEnum<["code", "question", "answer", "reject"]>;
|
|
87
|
-
message: z.ZodString;
|
|
88
|
-
snippet: z.ZodOptional<z.ZodString>;
|
|
89
|
-
bubbleParameters: z.ZodOptional<z.ZodRecord<z.ZodNumber, z.ZodObject<{
|
|
90
|
-
variableName: z.ZodString;
|
|
91
|
-
bubbleName: z.ZodType<import("./types.js").BubbleName>;
|
|
92
|
-
className: z.ZodString;
|
|
93
|
-
parameters: z.ZodArray<z.ZodObject<{
|
|
94
|
-
location: z.ZodOptional<z.ZodObject<{
|
|
95
|
-
startLine: z.ZodNumber;
|
|
96
|
-
startCol: z.ZodNumber;
|
|
97
|
-
endLine: z.ZodNumber;
|
|
98
|
-
endCol: z.ZodNumber;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
startLine: number;
|
|
101
|
-
startCol: number;
|
|
102
|
-
endLine: number;
|
|
103
|
-
endCol: number;
|
|
104
|
-
}, {
|
|
105
|
-
startLine: number;
|
|
106
|
-
startCol: number;
|
|
107
|
-
endLine: number;
|
|
108
|
-
endCol: number;
|
|
109
|
-
}>>;
|
|
110
|
-
variableId: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
name: z.ZodString;
|
|
112
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
|
|
113
|
-
type: z.ZodNativeEnum<typeof import("./bubble-definition-schema.js").BubbleParameterType>;
|
|
114
|
-
source: z.ZodOptional<z.ZodEnum<["object-property", "first-arg", "spread"]>>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
117
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
118
|
-
name: string;
|
|
119
|
-
location?: {
|
|
120
|
-
startLine: number;
|
|
121
|
-
startCol: number;
|
|
122
|
-
endLine: number;
|
|
123
|
-
endCol: number;
|
|
124
|
-
} | undefined;
|
|
125
|
-
variableId?: number | undefined;
|
|
126
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
127
|
-
}, {
|
|
128
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
129
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
130
|
-
name: string;
|
|
131
|
-
location?: {
|
|
132
|
-
startLine: number;
|
|
133
|
-
startCol: number;
|
|
134
|
-
endLine: number;
|
|
135
|
-
endCol: number;
|
|
136
|
-
} | undefined;
|
|
137
|
-
variableId?: number | undefined;
|
|
138
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
139
|
-
}>, "many">;
|
|
140
|
-
hasAwait: z.ZodBoolean;
|
|
141
|
-
hasActionCall: z.ZodBoolean;
|
|
142
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodType<import("./types.js").BubbleName, z.ZodTypeDef, import("./types.js").BubbleName>, "many">>;
|
|
143
|
-
dependencyGraph: z.ZodOptional<z.ZodType<import("./bubble-definition-schema.js").DependencyGraphNode, z.ZodTypeDef, import("./bubble-definition-schema.js").DependencyGraphNode>>;
|
|
144
|
-
variableId: z.ZodNumber;
|
|
145
|
-
nodeType: z.ZodEnum<["service", "tool", "workflow", "unknown"]>;
|
|
146
|
-
location: z.ZodObject<{
|
|
147
|
-
startLine: z.ZodNumber;
|
|
148
|
-
startCol: z.ZodNumber;
|
|
149
|
-
endLine: z.ZodNumber;
|
|
150
|
-
endCol: z.ZodNumber;
|
|
151
|
-
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
startLine: number;
|
|
153
|
-
startCol: number;
|
|
154
|
-
endLine: number;
|
|
155
|
-
endCol: number;
|
|
156
|
-
}, {
|
|
157
|
-
startLine: number;
|
|
158
|
-
startCol: number;
|
|
159
|
-
endLine: number;
|
|
160
|
-
endCol: number;
|
|
161
|
-
}>;
|
|
162
|
-
description: z.ZodOptional<z.ZodString>;
|
|
163
|
-
invocationCallSiteKey: z.ZodOptional<z.ZodString>;
|
|
164
|
-
clonedFromVariableId: z.ZodOptional<z.ZodNumber>;
|
|
165
|
-
isInsideCustomTool: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
containingCustomToolId: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
location: {
|
|
169
|
-
startLine: number;
|
|
170
|
-
startCol: number;
|
|
171
|
-
endLine: number;
|
|
172
|
-
endCol: number;
|
|
173
|
-
};
|
|
174
|
-
variableId: number;
|
|
175
|
-
variableName: string;
|
|
176
|
-
nodeType: "unknown" | "tool" | "service" | "workflow";
|
|
177
|
-
className: string;
|
|
178
|
-
parameters: {
|
|
179
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
180
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
181
|
-
name: string;
|
|
182
|
-
location?: {
|
|
183
|
-
startLine: number;
|
|
184
|
-
startCol: number;
|
|
185
|
-
endLine: number;
|
|
186
|
-
endCol: number;
|
|
187
|
-
} | undefined;
|
|
188
|
-
variableId?: number | undefined;
|
|
189
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
190
|
-
}[];
|
|
191
|
-
hasAwait: boolean;
|
|
192
|
-
hasActionCall: boolean;
|
|
193
|
-
bubbleName: import("./types.js").BubbleName;
|
|
194
|
-
description?: string | undefined;
|
|
195
|
-
dependencies?: import("./types.js").BubbleName[] | undefined;
|
|
196
|
-
dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
|
|
197
|
-
invocationCallSiteKey?: string | undefined;
|
|
198
|
-
clonedFromVariableId?: number | undefined;
|
|
199
|
-
isInsideCustomTool?: boolean | undefined;
|
|
200
|
-
containingCustomToolId?: string | undefined;
|
|
201
|
-
}, {
|
|
202
|
-
location: {
|
|
203
|
-
startLine: number;
|
|
204
|
-
startCol: number;
|
|
205
|
-
endLine: number;
|
|
206
|
-
endCol: number;
|
|
207
|
-
};
|
|
208
|
-
variableId: number;
|
|
209
|
-
variableName: string;
|
|
210
|
-
nodeType: "unknown" | "tool" | "service" | "workflow";
|
|
211
|
-
className: string;
|
|
212
|
-
parameters: {
|
|
213
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
214
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
215
|
-
name: string;
|
|
216
|
-
location?: {
|
|
217
|
-
startLine: number;
|
|
218
|
-
startCol: number;
|
|
219
|
-
endLine: number;
|
|
220
|
-
endCol: number;
|
|
221
|
-
} | undefined;
|
|
222
|
-
variableId?: number | undefined;
|
|
223
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
224
|
-
}[];
|
|
225
|
-
hasAwait: boolean;
|
|
226
|
-
hasActionCall: boolean;
|
|
227
|
-
bubbleName: import("./types.js").BubbleName;
|
|
228
|
-
description?: string | undefined;
|
|
229
|
-
dependencies?: import("./types.js").BubbleName[] | undefined;
|
|
230
|
-
dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
|
|
231
|
-
invocationCallSiteKey?: string | undefined;
|
|
232
|
-
clonedFromVariableId?: number | undefined;
|
|
233
|
-
isInsideCustomTool?: boolean | undefined;
|
|
234
|
-
containingCustomToolId?: string | undefined;
|
|
235
|
-
}>>>;
|
|
236
|
-
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
237
|
-
requiredCredentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">>>;
|
|
238
|
-
success: z.ZodBoolean;
|
|
239
|
-
error: z.ZodOptional<z.ZodString>;
|
|
240
|
-
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
type: "code" | "question" | "answer" | "reject";
|
|
242
|
-
message: string;
|
|
243
|
-
success: boolean;
|
|
244
|
-
error?: string | undefined;
|
|
245
|
-
inputSchema?: Record<string, unknown> | undefined;
|
|
246
|
-
requiredCredentials?: Record<string, CredentialType[]> | undefined;
|
|
247
|
-
bubbleParameters?: Record<number, {
|
|
248
|
-
location: {
|
|
249
|
-
startLine: number;
|
|
250
|
-
startCol: number;
|
|
251
|
-
endLine: number;
|
|
252
|
-
endCol: number;
|
|
253
|
-
};
|
|
254
|
-
variableId: number;
|
|
255
|
-
variableName: string;
|
|
256
|
-
nodeType: "unknown" | "tool" | "service" | "workflow";
|
|
257
|
-
className: string;
|
|
258
|
-
parameters: {
|
|
259
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
260
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
261
|
-
name: string;
|
|
262
|
-
location?: {
|
|
263
|
-
startLine: number;
|
|
264
|
-
startCol: number;
|
|
265
|
-
endLine: number;
|
|
266
|
-
endCol: number;
|
|
267
|
-
} | undefined;
|
|
268
|
-
variableId?: number | undefined;
|
|
269
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
270
|
-
}[];
|
|
271
|
-
hasAwait: boolean;
|
|
272
|
-
hasActionCall: boolean;
|
|
273
|
-
bubbleName: import("./types.js").BubbleName;
|
|
274
|
-
description?: string | undefined;
|
|
275
|
-
dependencies?: import("./types.js").BubbleName[] | undefined;
|
|
276
|
-
dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
|
|
277
|
-
invocationCallSiteKey?: string | undefined;
|
|
278
|
-
clonedFromVariableId?: number | undefined;
|
|
279
|
-
isInsideCustomTool?: boolean | undefined;
|
|
280
|
-
containingCustomToolId?: string | undefined;
|
|
281
|
-
}> | undefined;
|
|
282
|
-
snippet?: string | undefined;
|
|
283
|
-
}, {
|
|
284
|
-
type: "code" | "question" | "answer" | "reject";
|
|
285
|
-
message: string;
|
|
286
|
-
success: boolean;
|
|
287
|
-
error?: string | undefined;
|
|
288
|
-
inputSchema?: Record<string, unknown> | undefined;
|
|
289
|
-
requiredCredentials?: Record<string, CredentialType[]> | undefined;
|
|
290
|
-
bubbleParameters?: Record<number, {
|
|
291
|
-
location: {
|
|
292
|
-
startLine: number;
|
|
293
|
-
startCol: number;
|
|
294
|
-
endLine: number;
|
|
295
|
-
endCol: number;
|
|
296
|
-
};
|
|
297
|
-
variableId: number;
|
|
298
|
-
variableName: string;
|
|
299
|
-
nodeType: "unknown" | "tool" | "service" | "workflow";
|
|
300
|
-
className: string;
|
|
301
|
-
parameters: {
|
|
302
|
-
type: import("./bubble-definition-schema.js").BubbleParameterType;
|
|
303
|
-
value: string | number | boolean | unknown[] | Record<string, unknown>;
|
|
304
|
-
name: string;
|
|
305
|
-
location?: {
|
|
306
|
-
startLine: number;
|
|
307
|
-
startCol: number;
|
|
308
|
-
endLine: number;
|
|
309
|
-
endCol: number;
|
|
310
|
-
} | undefined;
|
|
311
|
-
variableId?: number | undefined;
|
|
312
|
-
source?: "object-property" | "first-arg" | "spread" | undefined;
|
|
313
|
-
}[];
|
|
314
|
-
hasAwait: boolean;
|
|
315
|
-
hasActionCall: boolean;
|
|
316
|
-
bubbleName: import("./types.js").BubbleName;
|
|
317
|
-
description?: string | undefined;
|
|
318
|
-
dependencies?: import("./types.js").BubbleName[] | undefined;
|
|
319
|
-
dependencyGraph?: import("./bubble-definition-schema.js").DependencyGraphNode | undefined;
|
|
320
|
-
invocationCallSiteKey?: string | undefined;
|
|
321
|
-
clonedFromVariableId?: number | undefined;
|
|
322
|
-
isInsideCustomTool?: boolean | undefined;
|
|
323
|
-
containingCustomToolId?: string | undefined;
|
|
324
|
-
}> | undefined;
|
|
325
|
-
snippet?: string | undefined;
|
|
326
|
-
}>;
|
|
327
|
-
/**
|
|
328
|
-
* Internal agent response format (JSON mode output from AI)
|
|
329
|
-
*/
|
|
330
|
-
export declare const PearlAgentOutputSchema: z.ZodObject<{
|
|
331
|
-
type: z.ZodEnum<["code", "question", "answer", "reject", "text"]>;
|
|
332
|
-
message: z.ZodString;
|
|
333
|
-
snippet: z.ZodOptional<z.ZodString>;
|
|
334
|
-
}, "strip", z.ZodTypeAny, {
|
|
335
|
-
type: "code" | "text" | "question" | "answer" | "reject";
|
|
336
|
-
message: string;
|
|
337
|
-
snippet?: string | undefined;
|
|
338
|
-
}, {
|
|
339
|
-
type: "code" | "text" | "question" | "answer" | "reject";
|
|
340
|
-
message: string;
|
|
341
|
-
snippet?: string | undefined;
|
|
342
|
-
}>;
|
|
343
|
-
export type PearlRequest = z.infer<typeof PearlRequestSchema>;
|
|
344
|
-
export type PearlResponse = z.infer<typeof PearlResponseSchema>;
|
|
345
|
-
export type PearlAgentOutput = z.infer<typeof PearlAgentOutputSchema>;
|
|
346
|
-
//# sourceMappingURL=pearl.d.ts.map
|
package/dist/pearl.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pearl.d.ts","sourceRoot":"","sources":["../src/pearl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C,eAAO,MAAM,mBAAmB,EAAE,cACQ,CAAC;AAC3C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqD7B,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
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
import { ConversationMessageSchema } from './agent-memory.js';
|
|
6
|
-
// Default model for Pearl AI agent
|
|
7
|
-
export const PEARL_DEFAULT_MODEL = 'openrouter/anthropic/claude-sonnet-4.5';
|
|
8
|
-
/**
|
|
9
|
-
* Request schema for Pearl agent
|
|
10
|
-
* Pearl helps users build complete workflows without requiring specific bubbles
|
|
11
|
-
*/
|
|
12
|
-
export const PearlRequestSchema = z.object({
|
|
13
|
-
userRequest: z
|
|
14
|
-
.string()
|
|
15
|
-
.min(1, 'User request is required')
|
|
16
|
-
.describe('The user request or question about building a workflow'),
|
|
17
|
-
currentCode: z
|
|
18
|
-
.string()
|
|
19
|
-
.optional()
|
|
20
|
-
.describe('The current workflow code for context and modification'),
|
|
21
|
-
userName: z.string().describe('Name of the user making the request'),
|
|
22
|
-
availableVariables: z
|
|
23
|
-
.array(z.any())
|
|
24
|
-
.describe('List of available variables in the current code'),
|
|
25
|
-
conversationHistory: z
|
|
26
|
-
.array(ConversationMessageSchema)
|
|
27
|
-
.optional()
|
|
28
|
-
.default([])
|
|
29
|
-
.describe('Previous conversation messages for multi-turn interactions (frontend manages state)'),
|
|
30
|
-
model: AvailableModels.default(PEARL_DEFAULT_MODEL).describe('AI model to use for Pearl agent'),
|
|
31
|
-
additionalContext: z
|
|
32
|
-
.string()
|
|
33
|
-
.optional()
|
|
34
|
-
.describe('Additional context information like timezone, user preferences, etc.'),
|
|
35
|
-
uploadedFiles: z
|
|
36
|
-
.array(z.object({
|
|
37
|
-
name: z.string().describe('File name'),
|
|
38
|
-
content: z
|
|
39
|
-
.string()
|
|
40
|
-
.describe('File content: base64 for images, plain text for text files'),
|
|
41
|
-
fileType: z
|
|
42
|
-
.enum(['image', 'text'])
|
|
43
|
-
.describe('Type of file: image (base64) or text (plain text)'),
|
|
44
|
-
}))
|
|
45
|
-
.optional()
|
|
46
|
-
.default([])
|
|
47
|
-
.describe('Files uploaded by the user: images as base64, text files as plain text'),
|
|
48
|
-
});
|
|
49
|
-
/**
|
|
50
|
-
* Response schema for Pearl agent
|
|
51
|
-
*/
|
|
52
|
-
export const PearlResponseSchema = z.object({
|
|
53
|
-
type: z
|
|
54
|
-
.enum(['code', 'question', 'answer', 'reject'])
|
|
55
|
-
.describe('Type of response: code (generated workflow), question (needs clarification), answer (provides information/guidance), reject (infeasible request)'),
|
|
56
|
-
message: z
|
|
57
|
-
.string()
|
|
58
|
-
.describe('Human-readable message: explanation for code, question text, or rejection reason'),
|
|
59
|
-
snippet: z
|
|
60
|
-
.string()
|
|
61
|
-
.optional()
|
|
62
|
-
.describe('Generated TypeScript code for complete workflow (only present when type is "code")'),
|
|
63
|
-
bubbleParameters: z
|
|
64
|
-
.record(z.number(), ParsedBubbleWithInfoSchema)
|
|
65
|
-
.optional()
|
|
66
|
-
.describe('Parsed bubble parameters from the generated workflow (only present when type is "code")'),
|
|
67
|
-
inputSchema: z
|
|
68
|
-
.record(z.unknown())
|
|
69
|
-
.optional()
|
|
70
|
-
.describe('Input schema for the generated workflow (only present when type is "code")'),
|
|
71
|
-
requiredCredentials: z
|
|
72
|
-
.record(z.string(), z.array(z.nativeEnum(CredentialType)))
|
|
73
|
-
.optional()
|
|
74
|
-
.describe('Required credentials for the bubbles in the workflow (only present when type is "code")'),
|
|
75
|
-
success: z.boolean().describe('Whether the operation completed successfully'),
|
|
76
|
-
error: z
|
|
77
|
-
.string()
|
|
78
|
-
.optional()
|
|
79
|
-
.describe('Error message if the operation failed'),
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* Internal agent response format (JSON mode output from AI)
|
|
83
|
-
*/
|
|
84
|
-
export const PearlAgentOutputSchema = z.object({
|
|
85
|
-
type: z.enum(['code', 'question', 'answer', 'reject', 'text']),
|
|
86
|
-
message: z.string(),
|
|
87
|
-
snippet: z.string().optional(),
|
|
88
|
-
});
|
|
89
|
-
// Note: ConversationMessage type is exported from milk-tea.ts to avoid duplication
|
|
90
|
-
//# sourceMappingURL=pearl.js.map
|
package/dist/pearl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pearl.js","sourceRoot":"","sources":["../src/pearl.ts"],"names":[],"mappings":"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"}
|
package/dist/rice.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type AvailableModel } from './ai-models.js';
|
|
3
|
-
export declare const RICE_DEFAULT_MODEL: AvailableModel;
|
|
4
|
-
/**
|
|
5
|
-
* Issue type categories for Rice evaluation
|
|
6
|
-
* - setup: Configuration/credential issues (user can fix in settings, not workflow code)
|
|
7
|
-
* - workflow: Logic/code issues in the workflow itself (fixable with Pearl)
|
|
8
|
-
* - input: Issues with input data (user needs to provide different input)
|
|
9
|
-
* - null: No issues (working=true)
|
|
10
|
-
*/
|
|
11
|
-
export declare const RiceIssueTypeSchema: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
12
|
-
export type RiceIssueType = z.infer<typeof RiceIssueTypeSchema>;
|
|
13
|
-
/**
|
|
14
|
-
* Evaluation result schema from Rice agent
|
|
15
|
-
* This represents the AI's assessment of workflow execution quality
|
|
16
|
-
*/
|
|
17
|
-
export declare const RiceEvaluationResultSchema: z.ZodObject<{
|
|
18
|
-
working: z.ZodBoolean;
|
|
19
|
-
issueType: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
20
|
-
summary: z.ZodString;
|
|
21
|
-
rating: z.ZodNumber;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
working: boolean;
|
|
24
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
25
|
-
summary: string;
|
|
26
|
-
rating: number;
|
|
27
|
-
}, {
|
|
28
|
-
working: boolean;
|
|
29
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
30
|
-
summary: string;
|
|
31
|
-
rating: number;
|
|
32
|
-
}>;
|
|
33
|
-
/**
|
|
34
|
-
* Request schema for Rice evaluation agent
|
|
35
|
-
* Rice evaluates workflow execution quality based on logs and code
|
|
36
|
-
*/
|
|
37
|
-
export declare const RiceRequestSchema: z.ZodObject<{
|
|
38
|
-
executionLogs: z.ZodArray<z.ZodUnknown, "many">;
|
|
39
|
-
workflowCode: z.ZodString;
|
|
40
|
-
executionId: z.ZodNumber;
|
|
41
|
-
bubbleFlowId: z.ZodNumber;
|
|
42
|
-
model: z.ZodDefault<z.ZodOptional<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"]>>>;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
executionLogs: unknown[];
|
|
45
|
-
workflowCode: string;
|
|
46
|
-
executionId: number;
|
|
47
|
-
bubbleFlowId: number;
|
|
48
|
-
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";
|
|
49
|
-
}, {
|
|
50
|
-
executionLogs: unknown[];
|
|
51
|
-
workflowCode: string;
|
|
52
|
-
executionId: number;
|
|
53
|
-
bubbleFlowId: number;
|
|
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
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Response schema for Rice evaluation agent
|
|
58
|
-
*/
|
|
59
|
-
export declare const RiceResponseSchema: z.ZodObject<{
|
|
60
|
-
success: z.ZodBoolean;
|
|
61
|
-
evaluation: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
working: z.ZodBoolean;
|
|
63
|
-
issueType: z.ZodNullable<z.ZodEnum<["setup", "workflow", "input"]>>;
|
|
64
|
-
summary: z.ZodString;
|
|
65
|
-
rating: z.ZodNumber;
|
|
66
|
-
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
working: boolean;
|
|
68
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
69
|
-
summary: string;
|
|
70
|
-
rating: number;
|
|
71
|
-
}, {
|
|
72
|
-
working: boolean;
|
|
73
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
74
|
-
summary: string;
|
|
75
|
-
rating: number;
|
|
76
|
-
}>>;
|
|
77
|
-
error: z.ZodOptional<z.ZodString>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
success: boolean;
|
|
80
|
-
evaluation?: {
|
|
81
|
-
working: boolean;
|
|
82
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
83
|
-
summary: string;
|
|
84
|
-
rating: number;
|
|
85
|
-
} | undefined;
|
|
86
|
-
error?: string | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
success: boolean;
|
|
89
|
-
evaluation?: {
|
|
90
|
-
working: boolean;
|
|
91
|
-
issueType: "setup" | "workflow" | "input" | null;
|
|
92
|
-
summary: string;
|
|
93
|
-
rating: number;
|
|
94
|
-
} | undefined;
|
|
95
|
-
error?: string | undefined;
|
|
96
|
-
}>;
|
|
97
|
-
export type RiceEvaluationResult = z.infer<typeof RiceEvaluationResultSchema>;
|
|
98
|
-
export type RiceRequest = z.input<typeof RiceRequestSchema>;
|
|
99
|
-
export type RiceResponse = z.infer<typeof RiceResponseSchema>;
|
|
100
|
-
//# sourceMappingURL=rice.d.ts.map
|
package/dist/rice.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rice.d.ts","sourceRoot":"","sources":["../src/rice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAItE,eAAO,MAAM,kBAAkB,EAAE,cAAwC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0DAEnB,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAyBrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAgB5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAGH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAK9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/rice.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AvailableModels } from './ai-models.js';
|
|
3
|
-
import { RECOMMENDED_MODELS } from './bubbleflow-generation-prompts.js';
|
|
4
|
-
// Default model for Rice evaluation agent
|
|
5
|
-
export const RICE_DEFAULT_MODEL = RECOMMENDED_MODELS.FAST;
|
|
6
|
-
/**
|
|
7
|
-
* Issue type categories for Rice evaluation
|
|
8
|
-
* - setup: Configuration/credential issues (user can fix in settings, not workflow code)
|
|
9
|
-
* - workflow: Logic/code issues in the workflow itself (fixable with Pearl)
|
|
10
|
-
* - input: Issues with input data (user needs to provide different input)
|
|
11
|
-
* - null: No issues (working=true)
|
|
12
|
-
*/
|
|
13
|
-
export const RiceIssueTypeSchema = z
|
|
14
|
-
.enum(['setup', 'workflow', 'input'])
|
|
15
|
-
.nullable();
|
|
16
|
-
/**
|
|
17
|
-
* Evaluation result schema from Rice agent
|
|
18
|
-
* This represents the AI's assessment of workflow execution quality
|
|
19
|
-
*/
|
|
20
|
-
export const RiceEvaluationResultSchema = z.object({
|
|
21
|
-
working: z
|
|
22
|
-
.boolean()
|
|
23
|
-
.describe('Whether the workflow is functioning correctly (true if no errors and expected behavior)'),
|
|
24
|
-
issueType: RiceIssueTypeSchema.describe('Category of issue: "setup" (config/credentials), "workflow" (code logic), "input" (bad input data), or null if working'),
|
|
25
|
-
summary: z
|
|
26
|
-
.string()
|
|
27
|
-
.describe('Brief summary of the execution. If working: what happened and any external changes made. If not working: description of the issue.'),
|
|
28
|
-
rating: z
|
|
29
|
-
.number()
|
|
30
|
-
.int()
|
|
31
|
-
.min(1)
|
|
32
|
-
.max(10)
|
|
33
|
-
.describe('Quality rating 1-10: 1-3=severe issues, 4-6=partial functionality, 7-8=working with minor issues, 9-10=excellent'),
|
|
34
|
-
});
|
|
35
|
-
/**
|
|
36
|
-
* Request schema for Rice evaluation agent
|
|
37
|
-
* Rice evaluates workflow execution quality based on logs and code
|
|
38
|
-
*/
|
|
39
|
-
export const RiceRequestSchema = z.object({
|
|
40
|
-
executionLogs: z
|
|
41
|
-
.array(z.unknown())
|
|
42
|
-
.describe('StreamingLogEvent[] from execution'),
|
|
43
|
-
workflowCode: z
|
|
44
|
-
.string()
|
|
45
|
-
.describe('The original workflow code that was executed'),
|
|
46
|
-
executionId: z.number().describe('ID of the execution being evaluated'),
|
|
47
|
-
bubbleFlowId: z.number().describe('ID of the BubbleFlow being evaluated'),
|
|
48
|
-
model: AvailableModels.optional()
|
|
49
|
-
.default(RICE_DEFAULT_MODEL)
|
|
50
|
-
.describe('AI model to use for Rice evaluation'),
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Response schema for Rice evaluation agent
|
|
54
|
-
*/
|
|
55
|
-
export const RiceResponseSchema = z.object({
|
|
56
|
-
success: z
|
|
57
|
-
.boolean()
|
|
58
|
-
.describe('Whether the evaluation completed successfully'),
|
|
59
|
-
evaluation: RiceEvaluationResultSchema.optional().describe('Evaluation result (only present if success=true)'),
|
|
60
|
-
error: z
|
|
61
|
-
.string()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe('Error message if the evaluation failed'),
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=rice.js.map
|
package/dist/rice.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rice.js","sourceRoot":"","sources":["../src/rice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAuB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,0CAA0C;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAmB,kBAAkB,CAAC,IAAI,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KACpC,QAAQ,EAAE,CAAC;AAId;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC;SACP,OAAO,EAAE;SACT,QAAQ,CACP,yFAAyF,CAC1F;IAEH,SAAS,EAAE,mBAAmB,CAAC,QAAQ,CACrC,wHAAwH,CACzH;IAED,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,oIAAoI,CACrI;IAEH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,CACP,kHAAkH,CACnH;CACJ,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,CAAC;SACb,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAClB,QAAQ,CAAC,oCAAoC,CAAC;IAEjD,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,CAAC,8CAA8C,CAAC;IAE3D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAEvE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAEzE,KAAK,EAAE,eAAe,CAAC,QAAQ,EAAE;SAC9B,OAAO,CAAC,kBAAkB,CAAC;SAC3B,QAAQ,CAAC,qCAAqC,CAAC;CACnD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC;SACP,OAAO,EAAE;SACT,QAAQ,CAAC,+CAA+C,CAAC;IAE5D,UAAU,EAAE,0BAA0B,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxD,kDAAkD,CACnD;IAED,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wCAAwC,CAAC;CACtD,CAAC,CAAC"}
|
package/dist/storage-utils.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type StorableValue = {
|
|
2
|
-
truncated: boolean;
|
|
3
|
-
preview: string | unknown;
|
|
4
|
-
sizeBytes: number;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Prepare an object for storage with a size cap. If the JSON stringified
|
|
8
|
-
* representation exceeds maxBytes, return a preview marker with metadata.
|
|
9
|
-
* Also logs a warning when truncation happens.
|
|
10
|
-
*
|
|
11
|
-
* Returns a consistent object structure when truncated to ensure compatibility
|
|
12
|
-
* with database schemas expecting JSON objects (jsonb/text with mode: 'json').
|
|
13
|
-
*/
|
|
14
|
-
export declare function prepareForStorage(value: unknown, options?: {
|
|
15
|
-
maxBytes?: number;
|
|
16
|
-
previewBytes?: number;
|
|
17
|
-
}): StorableValue;
|
|
18
|
-
export declare function cleanUpObjectForDisplayAndStorage(obj: unknown, maxBytes?: number): unknown;
|
|
19
|
-
//# sourceMappingURL=storage-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-utils.d.ts","sourceRoot":"","sources":["../src/storage-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GACrD,aAAa,CA2Cf;AAED,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,OAAO,EACZ,QAAQ,GAAE,MAAoB,GAC7B,OAAO,CAMT"}
|