@runtypelabs/sdk 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +398 -0
- package/dist/batch-builder.d.ts +106 -0
- package/dist/batch-builder.d.ts.map +1 -0
- package/dist/batch-builder.js +124 -0
- package/dist/batch-builder.js.map +1 -0
- package/dist/batches-namespace.d.ts +132 -0
- package/dist/batches-namespace.d.ts.map +1 -0
- package/dist/batches-namespace.js +128 -0
- package/dist/batches-namespace.js.map +1 -0
- package/dist/client.d.ts +121 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +485 -0
- package/dist/client.js.map +1 -0
- package/dist/endpoints.d.ts +560 -0
- package/dist/endpoints.d.ts.map +1 -0
- package/dist/endpoints.js +725 -0
- package/dist/endpoints.js.map +1 -0
- package/dist/eval-builder.d.ts +216 -0
- package/dist/eval-builder.d.ts.map +1 -0
- package/dist/eval-builder.js +225 -0
- package/dist/eval-builder.js.map +1 -0
- package/dist/evals-namespace.d.ts +205 -0
- package/dist/evals-namespace.d.ts.map +1 -0
- package/dist/evals-namespace.js +208 -0
- package/dist/evals-namespace.js.map +1 -0
- package/dist/flow-builder.d.ts +620 -0
- package/dist/flow-builder.d.ts.map +1 -0
- package/dist/flow-builder.js +565 -0
- package/dist/flow-builder.js.map +1 -0
- package/dist/flow-result.d.ts +117 -0
- package/dist/flow-result.d.ts.map +1 -0
- package/dist/flow-result.js +175 -0
- package/dist/flow-result.js.map +1 -0
- package/dist/flows-namespace.d.ts +430 -0
- package/dist/flows-namespace.d.ts.map +1 -0
- package/dist/flows-namespace.js +679 -0
- package/dist/flows-namespace.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts-namespace.d.ts +236 -0
- package/dist/prompts-namespace.d.ts.map +1 -0
- package/dist/prompts-namespace.js +222 -0
- package/dist/prompts-namespace.js.map +1 -0
- package/dist/runtype.d.ts +232 -0
- package/dist/runtype.d.ts.map +1 -0
- package/dist/runtype.js +367 -0
- package/dist/runtype.js.map +1 -0
- package/dist/stream-utils.d.ts +58 -0
- package/dist/stream-utils.d.ts.map +1 -0
- package/dist/stream-utils.js +348 -0
- package/dist/stream-utils.js.map +1 -0
- package/dist/transform.d.ts +21 -0
- package/dist/transform.d.ts.map +1 -0
- package/dist/transform.js +170 -0
- package/dist/transform.js.map +1 -0
- package/dist/types.d.ts +626 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowBuilder - Fluent builder for constructing dispatch configurations
|
|
3
|
+
*
|
|
4
|
+
* Provides a chainable API for building flows with steps, making flow
|
|
5
|
+
* construction more readable and type-safe.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { FlowBuilder } from '@runtypelabs/sdk'
|
|
10
|
+
*
|
|
11
|
+
* const config = new FlowBuilder()
|
|
12
|
+
* .createFlow({ name: "My Flow" })
|
|
13
|
+
* .withRecord({ name: "Record", type: "data", metadata: { key: "value" } })
|
|
14
|
+
* .fetchUrl({ name: "Fetch", url: "https://api.example.com", outputVariable: "data" })
|
|
15
|
+
* .prompt({ name: "Process", model: "gpt-4", userPrompt: "Analyze: {{data}}" })
|
|
16
|
+
* .withOptions({ streamResponse: true, flowMode: "virtual" })
|
|
17
|
+
* .build()
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import type { DispatchRequest, MessageContent, ToolsConfig, RuntimeTool } from './types';
|
|
21
|
+
import { FlowResult } from './flow-result';
|
|
22
|
+
export interface PromptStepConfig {
|
|
23
|
+
name: string;
|
|
24
|
+
model: string;
|
|
25
|
+
userPrompt: string;
|
|
26
|
+
systemPrompt?: string;
|
|
27
|
+
previousMessages?: string | Array<{
|
|
28
|
+
role: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}>;
|
|
31
|
+
outputVariable?: string;
|
|
32
|
+
responseFormat?: 'text' | 'json';
|
|
33
|
+
temperature?: number;
|
|
34
|
+
maxTokens?: number;
|
|
35
|
+
reasoning?: boolean;
|
|
36
|
+
streamOutput?: boolean;
|
|
37
|
+
/** Tools configuration - supports saved tools (toolIds) and inline runtime tools */
|
|
38
|
+
tools?: ToolsConfig;
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface FetchUrlStepConfig {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
body?: string;
|
|
47
|
+
outputVariable?: string;
|
|
48
|
+
fetchMethod?: 'http' | 'firecrawl';
|
|
49
|
+
firecrawl?: {
|
|
50
|
+
formats?: string[];
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
};
|
|
53
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
54
|
+
streamOutput?: boolean;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface TransformDataStepConfig {
|
|
58
|
+
name: string;
|
|
59
|
+
script: string;
|
|
60
|
+
outputVariable?: string;
|
|
61
|
+
streamOutput?: boolean;
|
|
62
|
+
enabled?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface SetVariableStepConfig {
|
|
65
|
+
name: string;
|
|
66
|
+
variableName: string;
|
|
67
|
+
value: string | number | boolean | object;
|
|
68
|
+
enabled?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface ConditionalStepConfig {
|
|
71
|
+
name: string;
|
|
72
|
+
condition: string;
|
|
73
|
+
trueSteps?: any[];
|
|
74
|
+
falseSteps?: any[];
|
|
75
|
+
enabled?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface SearchStepConfig {
|
|
78
|
+
name: string;
|
|
79
|
+
provider: string;
|
|
80
|
+
query: string;
|
|
81
|
+
maxResults?: number;
|
|
82
|
+
outputVariable?: string;
|
|
83
|
+
returnCitations?: boolean;
|
|
84
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
85
|
+
streamOutput?: boolean;
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface SendEmailStepConfig {
|
|
89
|
+
name: string;
|
|
90
|
+
to: string;
|
|
91
|
+
from?: string;
|
|
92
|
+
subject: string;
|
|
93
|
+
html: string;
|
|
94
|
+
outputVariable?: string;
|
|
95
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
96
|
+
streamOutput?: boolean;
|
|
97
|
+
enabled?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface SendStreamStepConfig {
|
|
100
|
+
name: string;
|
|
101
|
+
message: string;
|
|
102
|
+
enabled?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface RetrieveRecordStepConfig {
|
|
105
|
+
name: string;
|
|
106
|
+
recordType?: string;
|
|
107
|
+
recordName?: string;
|
|
108
|
+
fieldsToInclude?: string[];
|
|
109
|
+
fieldsToExclude?: string[];
|
|
110
|
+
outputVariable?: string;
|
|
111
|
+
streamOutput?: boolean;
|
|
112
|
+
enabled?: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface UpsertRecordStepConfig {
|
|
115
|
+
name: string;
|
|
116
|
+
recordType: string;
|
|
117
|
+
recordName?: string;
|
|
118
|
+
sourceVariable?: string;
|
|
119
|
+
mergeStrategy?: 'merge' | 'replace';
|
|
120
|
+
outputVariable?: string;
|
|
121
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
122
|
+
streamOutput?: boolean;
|
|
123
|
+
enabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface VectorSearchStepConfig {
|
|
126
|
+
name: string;
|
|
127
|
+
query: string;
|
|
128
|
+
recordType?: string;
|
|
129
|
+
embeddingModel?: string;
|
|
130
|
+
limit?: number;
|
|
131
|
+
threshold?: number;
|
|
132
|
+
outputVariable?: string;
|
|
133
|
+
includeDistance?: boolean;
|
|
134
|
+
streamOutput?: boolean;
|
|
135
|
+
enabled?: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface GenerateEmbeddingStepConfig {
|
|
138
|
+
name: string;
|
|
139
|
+
text: string;
|
|
140
|
+
embeddingModel?: string;
|
|
141
|
+
maxLength?: number;
|
|
142
|
+
outputVariable?: string;
|
|
143
|
+
streamOutput?: boolean;
|
|
144
|
+
enabled?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface WaitUntilStepConfig {
|
|
147
|
+
name: string;
|
|
148
|
+
delayMs?: number;
|
|
149
|
+
continueOnTimeout?: boolean;
|
|
150
|
+
poll?: {
|
|
151
|
+
enabled: boolean;
|
|
152
|
+
intervalMs?: number;
|
|
153
|
+
maxAttempts?: number;
|
|
154
|
+
condition?: string;
|
|
155
|
+
};
|
|
156
|
+
outputVariable?: string;
|
|
157
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
158
|
+
streamOutput?: boolean;
|
|
159
|
+
enabled?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface SendEventStepConfig {
|
|
162
|
+
name: string;
|
|
163
|
+
provider: string;
|
|
164
|
+
eventName: string;
|
|
165
|
+
properties?: Record<string, any>;
|
|
166
|
+
outputVariable?: string;
|
|
167
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
168
|
+
streamOutput?: boolean;
|
|
169
|
+
enabled?: boolean;
|
|
170
|
+
}
|
|
171
|
+
export interface SendTextStepConfig {
|
|
172
|
+
name: string;
|
|
173
|
+
to: string;
|
|
174
|
+
from?: string;
|
|
175
|
+
message: string;
|
|
176
|
+
outputVariable?: string;
|
|
177
|
+
errorHandling?: 'fail' | 'continue' | 'retry';
|
|
178
|
+
streamOutput?: boolean;
|
|
179
|
+
enabled?: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface FetchGitHubStepConfig {
|
|
182
|
+
name: string;
|
|
183
|
+
repository: string;
|
|
184
|
+
branch?: string;
|
|
185
|
+
path?: string;
|
|
186
|
+
outputVariable?: string;
|
|
187
|
+
streamOutput?: boolean;
|
|
188
|
+
enabled?: boolean;
|
|
189
|
+
}
|
|
190
|
+
export interface FlowConfig {
|
|
191
|
+
name: string;
|
|
192
|
+
description?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Configuration for upsert flow - includes flow name and upsert behavior options
|
|
196
|
+
*/
|
|
197
|
+
export interface UpsertFlowConfig extends FlowConfig {
|
|
198
|
+
/** Whether to create a version snapshot before updating (default: true) */
|
|
199
|
+
createVersionOnChange?: boolean;
|
|
200
|
+
/** Allow overwriting changes made via dashboard/API (default: false) */
|
|
201
|
+
allowOverwriteExternalChanges?: boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface RecordConfig {
|
|
204
|
+
id?: number | string;
|
|
205
|
+
name?: string;
|
|
206
|
+
type?: string;
|
|
207
|
+
metadata?: Record<string, any>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Options for upsert mode - controls conflict detection and versioning
|
|
211
|
+
*/
|
|
212
|
+
export interface UpsertOptions {
|
|
213
|
+
/** Whether to create a version snapshot before updating (default: true) */
|
|
214
|
+
createVersionOnChange?: boolean;
|
|
215
|
+
/** Allow overwriting changes made via dashboard/API (default: false) */
|
|
216
|
+
allowOverwriteExternalChanges?: boolean;
|
|
217
|
+
}
|
|
218
|
+
export interface DispatchOptions {
|
|
219
|
+
streamResponse?: boolean;
|
|
220
|
+
modelOverride?: string;
|
|
221
|
+
recordMode?: 'existing' | 'create' | 'virtual';
|
|
222
|
+
flowMode?: 'existing' | 'create' | 'virtual' | 'upsert';
|
|
223
|
+
storeResults?: boolean;
|
|
224
|
+
autoAppendMetadata?: boolean;
|
|
225
|
+
debugMode?: boolean;
|
|
226
|
+
createVersion?: boolean;
|
|
227
|
+
versionType?: 'published' | 'draft' | 'test' | 'virtual';
|
|
228
|
+
versionLabel?: string;
|
|
229
|
+
versionNotes?: string;
|
|
230
|
+
flowVersionId?: string;
|
|
231
|
+
/** Options for upsert mode (only used when flowMode is 'upsert') */
|
|
232
|
+
upsertOptions?: UpsertOptions;
|
|
233
|
+
}
|
|
234
|
+
export interface Message {
|
|
235
|
+
role: 'system' | 'user' | 'assistant';
|
|
236
|
+
content: MessageContent;
|
|
237
|
+
}
|
|
238
|
+
export interface FlowPausedEvent {
|
|
239
|
+
type: 'flow_paused';
|
|
240
|
+
executionId: string;
|
|
241
|
+
flowId: string;
|
|
242
|
+
toolId: string;
|
|
243
|
+
toolName: string;
|
|
244
|
+
pausedAt: string;
|
|
245
|
+
}
|
|
246
|
+
export interface StepWaitingLocalEvent {
|
|
247
|
+
type: 'step_waiting_local';
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
index: number;
|
|
251
|
+
executionType: string;
|
|
252
|
+
toolId: string;
|
|
253
|
+
toolName: string;
|
|
254
|
+
executionId: string;
|
|
255
|
+
parameters: any;
|
|
256
|
+
}
|
|
257
|
+
export interface FlowStartEvent {
|
|
258
|
+
type: 'flow_start';
|
|
259
|
+
flowId: string;
|
|
260
|
+
flowName: string;
|
|
261
|
+
totalSteps: number;
|
|
262
|
+
}
|
|
263
|
+
export interface StepStartEvent {
|
|
264
|
+
type: 'step_start';
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
index: number;
|
|
268
|
+
executionType: string;
|
|
269
|
+
}
|
|
270
|
+
export interface StepChunkEvent {
|
|
271
|
+
type: 'step_chunk';
|
|
272
|
+
id: string;
|
|
273
|
+
chunk: string;
|
|
274
|
+
index: number;
|
|
275
|
+
}
|
|
276
|
+
export interface StepCompleteEvent {
|
|
277
|
+
type: 'step_complete';
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
index: number;
|
|
281
|
+
executionType: string;
|
|
282
|
+
result: any;
|
|
283
|
+
executionTime: number;
|
|
284
|
+
}
|
|
285
|
+
export interface FlowCompleteEvent {
|
|
286
|
+
type: 'flow_complete';
|
|
287
|
+
flowId: string;
|
|
288
|
+
totalSteps: number;
|
|
289
|
+
successfulSteps: number;
|
|
290
|
+
failedSteps: number;
|
|
291
|
+
executionTime: number;
|
|
292
|
+
}
|
|
293
|
+
export interface FlowErrorEvent {
|
|
294
|
+
type: 'flow_error';
|
|
295
|
+
error: string;
|
|
296
|
+
stepId?: string;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Union type of all possible SSE events
|
|
300
|
+
*/
|
|
301
|
+
export type StreamEvent = FlowStartEvent | StepStartEvent | StepChunkEvent | StepCompleteEvent | FlowCompleteEvent | FlowErrorEvent | FlowPausedEvent | StepWaitingLocalEvent;
|
|
302
|
+
/**
|
|
303
|
+
* Callbacks for streaming flow execution
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* await flow.run(apiClient, options, {
|
|
308
|
+
* onStepStart: (event) => console.log('Starting:', event.name),
|
|
309
|
+
* onStepChunk: (chunk, event) => process.stdout.write(chunk),
|
|
310
|
+
* onStepComplete: (result, event) => console.log('Done:', event.name),
|
|
311
|
+
* onFlowComplete: (event) => console.log('Flow complete'),
|
|
312
|
+
* onError: (error) => console.error(error),
|
|
313
|
+
* })
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
export interface StreamCallbacks {
|
|
317
|
+
/** Called when flow execution starts */
|
|
318
|
+
onFlowStart?: (event: FlowStartEvent) => void;
|
|
319
|
+
/** Called when a step starts executing */
|
|
320
|
+
onStepStart?: (event: StepStartEvent) => void;
|
|
321
|
+
/** Called for each chunk of streaming output from a step */
|
|
322
|
+
onStepChunk?: (chunk: string, event: StepChunkEvent) => void;
|
|
323
|
+
/** Called when a step completes */
|
|
324
|
+
onStepComplete?: (result: any, event: StepCompleteEvent) => void;
|
|
325
|
+
/** Called when the entire flow completes */
|
|
326
|
+
onFlowComplete?: (event: FlowCompleteEvent) => void;
|
|
327
|
+
/** Called when an error occurs */
|
|
328
|
+
onError?: (error: Error) => void;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Summary returned after flow execution completes
|
|
332
|
+
*/
|
|
333
|
+
export interface FlowSummary {
|
|
334
|
+
flowId: string;
|
|
335
|
+
flowName: string;
|
|
336
|
+
totalSteps: number;
|
|
337
|
+
successfulSteps: number;
|
|
338
|
+
failedSteps: number;
|
|
339
|
+
executionTime: number;
|
|
340
|
+
/** Results from each step, keyed by step name */
|
|
341
|
+
results: Map<string, any>;
|
|
342
|
+
/** Whether the flow completed successfully */
|
|
343
|
+
success: boolean;
|
|
344
|
+
}
|
|
345
|
+
export declare class FlowBuilder {
|
|
346
|
+
private flowConfig;
|
|
347
|
+
private steps;
|
|
348
|
+
private recordConfig;
|
|
349
|
+
private messagesConfig;
|
|
350
|
+
private optionsConfig;
|
|
351
|
+
private stepCounter;
|
|
352
|
+
private existingFlowId;
|
|
353
|
+
/**
|
|
354
|
+
* Initialize the flow with a name and optional description.
|
|
355
|
+
* Use this for virtual/one-off flows or when specifying flowMode in run().
|
|
356
|
+
*/
|
|
357
|
+
createFlow(config: FlowConfig): this;
|
|
358
|
+
/**
|
|
359
|
+
* Define a flow for upsert - creates if it doesn't exist, updates if steps changed.
|
|
360
|
+
* This is the recommended pattern for code-first flow management.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```typescript
|
|
364
|
+
* const result = await new FlowBuilder()
|
|
365
|
+
* .upsertFlow({
|
|
366
|
+
* name: 'My Flow',
|
|
367
|
+
* createVersionOnChange: true
|
|
368
|
+
* })
|
|
369
|
+
* .prompt({ name: 'Analyze', model: 'gpt-4o', userPrompt: '...' })
|
|
370
|
+
* .run(apiClient, { streamResponse: true })
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
upsertFlow(config: UpsertFlowConfig): this;
|
|
374
|
+
/**
|
|
375
|
+
* Use an existing flow by ID instead of defining steps inline
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```typescript
|
|
379
|
+
* const result = await new FlowBuilder()
|
|
380
|
+
* .useExistingFlow('flow_abc123')
|
|
381
|
+
* .withRecord({ name: 'Test', type: 'data' })
|
|
382
|
+
* .run(apiClient, { streamResponse: true })
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
useExistingFlow(flowId: string): this;
|
|
386
|
+
/**
|
|
387
|
+
* Set the record configuration
|
|
388
|
+
*/
|
|
389
|
+
withRecord(config: RecordConfig): this;
|
|
390
|
+
/**
|
|
391
|
+
* Set conversation messages
|
|
392
|
+
*/
|
|
393
|
+
withMessages(messages: Message[]): this;
|
|
394
|
+
/**
|
|
395
|
+
* Set dispatch options
|
|
396
|
+
*/
|
|
397
|
+
withOptions(options: DispatchOptions): this;
|
|
398
|
+
/**
|
|
399
|
+
* Add a prompt step
|
|
400
|
+
*/
|
|
401
|
+
prompt(config: PromptStepConfig): this;
|
|
402
|
+
/**
|
|
403
|
+
* Add a fetch URL step
|
|
404
|
+
*/
|
|
405
|
+
fetchUrl(config: FetchUrlStepConfig): this;
|
|
406
|
+
/**
|
|
407
|
+
* Add a transform data step
|
|
408
|
+
*/
|
|
409
|
+
transformData(config: TransformDataStepConfig): this;
|
|
410
|
+
/**
|
|
411
|
+
* Add a set variable step
|
|
412
|
+
*/
|
|
413
|
+
setVariable(config: SetVariableStepConfig): this;
|
|
414
|
+
/**
|
|
415
|
+
* Add a conditional step
|
|
416
|
+
*/
|
|
417
|
+
conditional(config: ConditionalStepConfig): this;
|
|
418
|
+
/**
|
|
419
|
+
* Add a search step
|
|
420
|
+
*/
|
|
421
|
+
search(config: SearchStepConfig): this;
|
|
422
|
+
/**
|
|
423
|
+
* Add a send email step
|
|
424
|
+
*/
|
|
425
|
+
sendEmail(config: SendEmailStepConfig): this;
|
|
426
|
+
/**
|
|
427
|
+
* Add a send stream step
|
|
428
|
+
*/
|
|
429
|
+
sendStream(config: SendStreamStepConfig): this;
|
|
430
|
+
/**
|
|
431
|
+
* Add a retrieve record step
|
|
432
|
+
*/
|
|
433
|
+
retrieveRecord(config: RetrieveRecordStepConfig): this;
|
|
434
|
+
/**
|
|
435
|
+
* Add an upsert record step
|
|
436
|
+
*/
|
|
437
|
+
upsertRecord(config: UpsertRecordStepConfig): this;
|
|
438
|
+
/**
|
|
439
|
+
* Add a vector search step
|
|
440
|
+
*/
|
|
441
|
+
vectorSearch(config: VectorSearchStepConfig): this;
|
|
442
|
+
/**
|
|
443
|
+
* Add a generate embedding step
|
|
444
|
+
*/
|
|
445
|
+
generateEmbedding(config: GenerateEmbeddingStepConfig): this;
|
|
446
|
+
/**
|
|
447
|
+
* Add a wait until step
|
|
448
|
+
*/
|
|
449
|
+
waitUntil(config: WaitUntilStepConfig): this;
|
|
450
|
+
/**
|
|
451
|
+
* Add a send event step
|
|
452
|
+
*/
|
|
453
|
+
sendEvent(config: SendEventStepConfig): this;
|
|
454
|
+
/**
|
|
455
|
+
* Add a send text step
|
|
456
|
+
*/
|
|
457
|
+
sendText(config: SendTextStepConfig): this;
|
|
458
|
+
/**
|
|
459
|
+
* Add a fetch GitHub step
|
|
460
|
+
*/
|
|
461
|
+
fetchGitHub(config: FetchGitHubStepConfig): this;
|
|
462
|
+
/**
|
|
463
|
+
* Build the final dispatch request configuration
|
|
464
|
+
*/
|
|
465
|
+
build(): DispatchRequest;
|
|
466
|
+
/**
|
|
467
|
+
* Build and execute the flow with the provided client
|
|
468
|
+
*
|
|
469
|
+
* Returns a FlowResult that can be used to:
|
|
470
|
+
* - Process with callbacks via `.stream(callbacks)`
|
|
471
|
+
* - Get a specific step result via `.getResult(stepName)`
|
|
472
|
+
* - Get all results via `.getAllResults()`
|
|
473
|
+
* - Access raw response via `.raw`
|
|
474
|
+
*
|
|
475
|
+
* @param client - Client with dispatch capability
|
|
476
|
+
* @param options - Optional execution options (merged with any .withOptions() settings)
|
|
477
|
+
* @returns FlowResult for processing the streaming response
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```typescript
|
|
481
|
+
* // Simple execution with result extraction
|
|
482
|
+
* const result = await flow.run(apiClient, { streamResponse: true })
|
|
483
|
+
* const analysis = await result.getResult('Analyze Data')
|
|
484
|
+
*
|
|
485
|
+
* // With streaming callbacks
|
|
486
|
+
* const result = await flow.run(apiClient, options)
|
|
487
|
+
* await result.stream({
|
|
488
|
+
* onStepChunk: (chunk) => process.stdout.write(chunk),
|
|
489
|
+
* onFlowComplete: () => console.log('Done!'),
|
|
490
|
+
* })
|
|
491
|
+
* ```
|
|
492
|
+
*/
|
|
493
|
+
run(client: DispatchClient, options?: DispatchOptions): Promise<FlowResult>;
|
|
494
|
+
/**
|
|
495
|
+
* Build and execute the flow with callbacks for streaming events
|
|
496
|
+
*
|
|
497
|
+
* @param client - Client with dispatch capability
|
|
498
|
+
* @param options - Execution options (merged with any .withOptions() settings)
|
|
499
|
+
* @param callbacks - Callbacks for streaming events
|
|
500
|
+
* @returns FlowSummary when execution completes
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
* ```typescript
|
|
504
|
+
* const summary = await flow.run(apiClient, options, {
|
|
505
|
+
* onStepStart: (event) => console.log('Starting:', event.name),
|
|
506
|
+
* onStepChunk: (chunk) => process.stdout.write(chunk),
|
|
507
|
+
* onStepComplete: (result, event) => console.log('Done:', event.name),
|
|
508
|
+
* onFlowComplete: (event) => console.log('Flow complete!'),
|
|
509
|
+
* })
|
|
510
|
+
* ```
|
|
511
|
+
*/
|
|
512
|
+
run(client: DispatchClient, options: DispatchOptions, callbacks: StreamCallbacks): Promise<FlowSummary>;
|
|
513
|
+
private addStep;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Interface for clients that can dispatch flows
|
|
517
|
+
*/
|
|
518
|
+
export interface DispatchClient {
|
|
519
|
+
/**
|
|
520
|
+
* Run a flow with local tools (automatic pause/resume loop)
|
|
521
|
+
*
|
|
522
|
+
* @param config - The dispatch request configuration
|
|
523
|
+
* @param localTools - Map of tool names to async functions that execute the tool logic
|
|
524
|
+
* @param callbacks - Optional callbacks for streaming events
|
|
525
|
+
* @returns The final result of the flow execution or summary if streaming
|
|
526
|
+
*/
|
|
527
|
+
runWithLocalTools(config: DispatchRequest, localTools: Record<string, (args: any) => Promise<any>>, callbacks?: StreamCallbacks): Promise<FlowResult | FlowSummary>;
|
|
528
|
+
dispatch(config: DispatchRequest): Promise<Response>;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* FlowBuilder that is bound to a client for direct execution
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```typescript
|
|
535
|
+
* // Via RuntypeClient.flow()
|
|
536
|
+
* const result = await runtype
|
|
537
|
+
* .flow('My Flow')
|
|
538
|
+
* .fetchUrl({ name: 'Fetch', url: '...', outputVariable: 'data' })
|
|
539
|
+
* .prompt({ name: 'Process', model: 'gpt-4', userPrompt: '...' })
|
|
540
|
+
* .run({ streamResponse: true })
|
|
541
|
+
*
|
|
542
|
+
* const data = await result.getResult('Process')
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
export declare class ClientFlowBuilder extends FlowBuilder {
|
|
546
|
+
private boundClient;
|
|
547
|
+
constructor(client: DispatchClient, name: string);
|
|
548
|
+
/**
|
|
549
|
+
* Build and execute the flow using the bound client
|
|
550
|
+
*
|
|
551
|
+
* For ClientFlowBuilder, you can either:
|
|
552
|
+
* 1. Pass a client (which is ignored, the bound client is used)
|
|
553
|
+
* 2. Pass options directly as the first argument
|
|
554
|
+
*
|
|
555
|
+
* @example
|
|
556
|
+
* ```typescript
|
|
557
|
+
* // Simple execution (no args needed)
|
|
558
|
+
* const result = await builder.run()
|
|
559
|
+
* const data = await result.getResult('Process')
|
|
560
|
+
*
|
|
561
|
+
* // With options only
|
|
562
|
+
* const result = await builder.run({ streamResponse: true, flowMode: 'virtual' })
|
|
563
|
+
*
|
|
564
|
+
* // With options and callbacks
|
|
565
|
+
* const summary = await builder.run({ streamResponse: true }, {
|
|
566
|
+
* onStepChunk: (chunk) => process.stdout.write(chunk),
|
|
567
|
+
* onFlowComplete: () => console.log('Done!'),
|
|
568
|
+
* })
|
|
569
|
+
*
|
|
570
|
+
* // Parent class signature (client ignored)
|
|
571
|
+
* const result = await builder.run(someClient, { streamResponse: true })
|
|
572
|
+
* ```
|
|
573
|
+
*/
|
|
574
|
+
run(): Promise<FlowResult>;
|
|
575
|
+
run(options: DispatchOptions): Promise<FlowResult>;
|
|
576
|
+
run(options: DispatchOptions, callbacks: StreamCallbacks): Promise<FlowSummary>;
|
|
577
|
+
run(localTools: Record<string, (args: any) => Promise<any>>): Promise<FlowResult>;
|
|
578
|
+
run(options: DispatchOptions, localTools: Record<string, (args: any) => Promise<any>>): Promise<FlowResult>;
|
|
579
|
+
run(localTools: Record<string, (args: any) => Promise<any>>, callbacks: StreamCallbacks): Promise<FlowSummary>;
|
|
580
|
+
run(options: DispatchOptions, localTools: Record<string, (args: any) => Promise<any>>, callbacks: StreamCallbacks): Promise<FlowSummary>;
|
|
581
|
+
run(client: DispatchClient, options?: DispatchOptions): Promise<FlowResult>;
|
|
582
|
+
run(client: DispatchClient, options: DispatchOptions, callbacks: StreamCallbacks): Promise<FlowSummary>;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Create an external runtime tool definition.
|
|
586
|
+
*
|
|
587
|
+
* External tools make HTTP requests to external APIs with support for
|
|
588
|
+
* variable substitution in URLs and headers.
|
|
589
|
+
*
|
|
590
|
+
* Special internal variables are available for auth:
|
|
591
|
+
* - `{{_internal.auth_token}}` - Bearer token for Runtype API auth
|
|
592
|
+
* - `{{_internal.user_id}}` - Current user ID
|
|
593
|
+
* - `{{_internal.org_id}}` - Current organization ID
|
|
594
|
+
*
|
|
595
|
+
* @example
|
|
596
|
+
* ```typescript
|
|
597
|
+
* const listFlowsTool = createExternalTool({
|
|
598
|
+
* name: 'list_flows',
|
|
599
|
+
* description: 'List all flows in the workspace',
|
|
600
|
+
* parametersSchema: {
|
|
601
|
+
* type: 'object',
|
|
602
|
+
* properties: {
|
|
603
|
+
* limit: { type: 'number', description: 'Max results', default: 20 }
|
|
604
|
+
* }
|
|
605
|
+
* },
|
|
606
|
+
* url: 'https://api.runtype.com/v1/flows',
|
|
607
|
+
* method: 'GET',
|
|
608
|
+
* headers: { Authorization: '{{_internal.auth_token}}' }
|
|
609
|
+
* })
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
export declare function createExternalTool(config: {
|
|
613
|
+
name: string;
|
|
614
|
+
description: string;
|
|
615
|
+
parametersSchema: any;
|
|
616
|
+
url: string;
|
|
617
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
618
|
+
headers?: Record<string, string>;
|
|
619
|
+
}): RuntimeTool;
|
|
620
|
+
//# sourceMappingURL=flow-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-builder.d.ts","sourceRoot":"","sources":["../src/flow-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAA6B,MAAM,SAAS,CAAA;AACnH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAO1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,C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