@lovable.dev/workflows-sdk 0.0.0-dev.4 → 0.0.0-dev.40
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 +153 -252
- package/dist/branch-metadata-7KoYCvVR.js +111 -0
- package/dist/context-escapes-5F9gQw59.js +78 -0
- package/dist/duplicate-ids-CJTxhI0b.js +103 -0
- package/dist/durable-ids-Cx341nJQ.js +17 -0
- package/dist/generate-Bv_Ep6yM.js +6943 -0
- package/dist/graph-oG4uFJ0o.js +656 -0
- package/dist/index.d.ts +934 -100
- package/dist/index.js +677 -14
- package/dist/nested-operations-CiJJpl5w.js +54 -0
- package/dist/operation-descriptions-CARt7Myx.js +46 -0
- package/dist/step-metadata-CdZSDCpP.js +101 -0
- package/dist/vite.d.ts +17 -4
- package/dist/vite.js +293 -9
- package/dist/wait-deadlines-DTUJbmVC.js +63 -0
- package/dist/wait-deadlines-DpK-Fgnd.js +4 -0
- package/package.json +3 -1
- package/dist/generate-IXn3QGVb.js +0 -333
- package/dist/graph-BgdiEUHq.js +0 -201
package/dist/index.d.ts
CHANGED
|
@@ -1,44 +1,27 @@
|
|
|
1
|
-
import { AnyWorkflowDefinition, AnyWorkflowDefinition as AnyWorkflowDefinition$1, Ctx, StepContext, StepOptions, WorkflowDefinition, WorkflowInput, WorkflowInput as WorkflowInput$1, WorkflowOutput, WorkflowState, createMiddleware
|
|
1
|
+
import { AccumulateExtensions, AnyMiddleware, AnyWorkflowDefinition, AnyWorkflowDefinition as AnyWorkflowDefinition$1, ApprovalResult, ApproveOptions as ApproveOptions$1, CreateWorkflowConfig, Ctx as Ctx$1, InferSchema, RunStore, SchemaInput, StepContext, StepOptions, WaitForEventOptions as WaitForEventOptions$1, WorkflowBuilder, WorkflowDefinition, WorkflowDefinition as WorkflowDefinition$1, WorkflowEvent, WorkflowInput, WorkflowInput as WorkflowInput$1, WorkflowMetadata, WorkflowOutput, WorkflowState, createMiddleware } from "@tanstack/workflow-core";
|
|
2
2
|
//#region src/core/cadence.d.ts
|
|
3
3
|
type Weekday = "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
4
4
|
type Cadence = {
|
|
5
|
-
readonly kind: "every";
|
|
6
|
-
readonly seconds: number;
|
|
7
|
-
} | {
|
|
8
5
|
readonly kind: "hourly";
|
|
9
|
-
readonly minute: number | null;
|
|
10
6
|
} | {
|
|
11
7
|
readonly kind: "daily";
|
|
12
|
-
readonly at:
|
|
13
|
-
|
|
8
|
+
readonly at: readonly number[];
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "weekly";
|
|
11
|
+
readonly on: readonly Weekday[];
|
|
12
|
+
readonly at: readonly number[];
|
|
14
13
|
};
|
|
15
|
-
declare function
|
|
16
|
-
declare function
|
|
17
|
-
at
|
|
18
|
-
}): Cadence;
|
|
19
|
-
declare function daily(options?: {
|
|
20
|
-
at?: string;
|
|
21
|
-
days?: readonly string[];
|
|
14
|
+
declare function hourly(options?: never): Cadence;
|
|
15
|
+
declare function daily(options: {
|
|
16
|
+
at: number[];
|
|
22
17
|
}): Cadence;
|
|
23
18
|
declare function weekly(options: {
|
|
24
|
-
on: string;
|
|
25
|
-
at
|
|
19
|
+
on: string[];
|
|
20
|
+
at: number[];
|
|
26
21
|
}): Cadence;
|
|
27
22
|
//#endregion
|
|
28
|
-
//#region src/core/smear.d.ts
|
|
29
|
-
type SmearPolicy = {
|
|
30
|
-
readonly strategy: "none";
|
|
31
|
-
} | {
|
|
32
|
-
readonly strategy: "hash";
|
|
33
|
-
readonly windowSeconds: number;
|
|
34
|
-
};
|
|
35
|
-
declare function smearOffsetSeconds(projectId: string, scheduleId: string, windowSeconds: number): number;
|
|
36
|
-
//#endregion
|
|
37
23
|
//#region src/core/schedule.d.ts
|
|
38
|
-
type OverlapPolicy = "skip" | "
|
|
39
|
-
type SmearOption = false | {
|
|
40
|
-
readonly window: string;
|
|
41
|
-
} | SmearPolicy;
|
|
24
|
+
type OverlapPolicy = "skip" | "allow" | "buffer-one";
|
|
42
25
|
interface ScheduleDefinition<TWorkflow extends AnyWorkflowDefinition$1 = AnyWorkflowDefinition$1> {
|
|
43
26
|
readonly id: string;
|
|
44
27
|
readonly workflow: TWorkflow;
|
|
@@ -46,15 +29,12 @@ interface ScheduleDefinition<TWorkflow extends AnyWorkflowDefinition$1 = AnyWork
|
|
|
46
29
|
readonly timeZone: string;
|
|
47
30
|
readonly overlapPolicy?: OverlapPolicy;
|
|
48
31
|
readonly enabled?: boolean;
|
|
49
|
-
readonly smear?: SmearOption;
|
|
50
32
|
readonly input: WorkflowInput$1<NoInfer<TWorkflow>>;
|
|
51
33
|
}
|
|
52
34
|
interface ResolvedSchedule<TWorkflow extends AnyWorkflowDefinition$1 = AnyWorkflowDefinition$1> extends ScheduleDefinition<TWorkflow> {
|
|
53
35
|
readonly type: "schedule";
|
|
54
|
-
readonly cron: string;
|
|
55
36
|
readonly overlapPolicy: OverlapPolicy;
|
|
56
37
|
readonly enabled: boolean;
|
|
57
|
-
readonly smear: SmearPolicy;
|
|
58
38
|
}
|
|
59
39
|
declare function defineSchedule<TWorkflow extends AnyWorkflowDefinition$1>(schedule: ScheduleDefinition<TWorkflow>): ResolvedSchedule<TWorkflow>;
|
|
60
40
|
//#endregion
|
|
@@ -63,90 +43,944 @@ type TriggerDefinition = ScheduleDefinition;
|
|
|
63
43
|
type ResolvedTrigger = ResolvedSchedule;
|
|
64
44
|
//#endregion
|
|
65
45
|
//#region src/core/workflow.d.ts
|
|
46
|
+
declare function createWorkflow<TInputSchema extends SchemaInput | undefined = undefined, TOutputSchema extends SchemaInput | undefined = undefined, TStateSchema extends SchemaInput | undefined = undefined>(config: CreateWorkflowConfig<TInputSchema, TOutputSchema, TStateSchema> & {
|
|
47
|
+
version: string;
|
|
48
|
+
}): WorkflowBuilder$1<TInputSchema, TOutputSchema, TStateSchema>;
|
|
49
|
+
type ApproveOptions = ApproveOptions$1 & {
|
|
50
|
+
timeoutMs: number;
|
|
51
|
+
deadline?: never;
|
|
52
|
+
};
|
|
53
|
+
type WaitForEventOptions<TPayload = unknown> = Omit<WaitForEventOptions$1<TPayload>, "deadline"> & {
|
|
54
|
+
timeoutMs: number;
|
|
55
|
+
deadline?: never;
|
|
56
|
+
};
|
|
57
|
+
type Ctx<TInput = unknown, TState = Record<string, unknown>, TExtensions = unknown> = Omit<Ctx$1<TInput, TState>, "approve" | "waitForEvent"> & {
|
|
58
|
+
approve: (options: ApproveOptions) => Promise<ApprovalResult>;
|
|
59
|
+
waitForEvent: <TPayload = unknown>(name: string, options: WaitForEventOptions<TPayload>) => Promise<TPayload>;
|
|
60
|
+
} & TExtensions;
|
|
61
|
+
type InferValue<T extends SchemaInput | undefined, TFallback> = T extends SchemaInput ? InferSchema<T> : TFallback;
|
|
62
|
+
interface WorkflowBuilder$1<TInputSchema extends SchemaInput | undefined, TOutputSchema extends SchemaInput | undefined, TStateSchema extends SchemaInput | undefined, TExtensions = unknown> extends Omit<WorkflowBuilder<TInputSchema, TOutputSchema, TStateSchema, TExtensions>, "handler" | "middleware" | "previousVersions"> {
|
|
63
|
+
middleware: <const TMiddlewares extends readonly AnyMiddleware[]>(middlewares: TMiddlewares) => WorkflowBuilder$1<TInputSchema, TOutputSchema, TStateSchema, TExtensions & AccumulateExtensions<TMiddlewares>>;
|
|
64
|
+
previousVersions: (versions: readonly AnyWorkflowDefinition$1[]) => WorkflowBuilder$1<TInputSchema, TOutputSchema, TStateSchema, TExtensions>;
|
|
65
|
+
handler: <TOutput extends InferValue<TOutputSchema, unknown>>(fn: (ctx: Ctx<InferValue<TInputSchema, unknown>, InferValue<TStateSchema, Record<string, unknown>>, TExtensions>) => Promise<TOutput>) => WorkflowDefinition$1<InferValue<TInputSchema, unknown>, TOutput, InferValue<TStateSchema, Record<string, unknown>>>;
|
|
66
|
+
}
|
|
66
67
|
interface WorkflowsDefinition<TWorkflow extends AnyWorkflowDefinition$1 = AnyWorkflowDefinition$1> {
|
|
67
68
|
readonly workflows: readonly TWorkflow[];
|
|
68
69
|
readonly triggers: readonly ResolvedTrigger[];
|
|
69
70
|
}
|
|
70
|
-
declare function registerWorkflows<const TWorkflows extends readonly AnyWorkflowDefinition$1[]>(
|
|
71
|
+
declare function registerWorkflows<const TWorkflows extends readonly AnyWorkflowDefinition$1[]>(definition: {
|
|
71
72
|
workflows: TWorkflows;
|
|
72
73
|
triggers?: readonly TriggerDefinition[];
|
|
73
74
|
}): WorkflowsDefinition<TWorkflows[number]>;
|
|
74
75
|
//#endregion
|
|
75
|
-
//#region src/
|
|
76
|
-
|
|
77
|
-
kind: "step";
|
|
78
|
-
stepId: string;
|
|
79
|
-
} | {
|
|
80
|
-
kind: "approve";
|
|
81
|
-
config: {
|
|
82
|
-
title: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
};
|
|
85
|
-
} | {
|
|
86
|
-
kind: "wait-for-event";
|
|
87
|
-
config: {
|
|
88
|
-
event: string;
|
|
89
|
-
deadline?: number;
|
|
90
|
-
};
|
|
91
|
-
} | {
|
|
92
|
-
kind: "sleep";
|
|
93
|
-
config: {
|
|
94
|
-
ms: number;
|
|
95
|
-
};
|
|
96
|
-
} | {
|
|
97
|
-
kind: "sleep-until";
|
|
98
|
-
config: {
|
|
99
|
-
timestamp: number;
|
|
100
|
-
};
|
|
101
|
-
} | {
|
|
102
|
-
kind: "unknown";
|
|
103
|
-
};
|
|
104
|
-
type WorkflowGraphNode = {
|
|
76
|
+
//#region src/core/step-metadata.d.ts
|
|
77
|
+
interface WorkflowStepGroup {
|
|
105
78
|
id: string;
|
|
106
79
|
label: string;
|
|
107
|
-
}
|
|
108
|
-
interface
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
}
|
|
81
|
+
interface WorkflowBranchMetadata {
|
|
82
|
+
id: string;
|
|
83
|
+
description: string;
|
|
84
|
+
}
|
|
85
|
+
type WorkflowOperationMetadata = Record<string, unknown> & {
|
|
86
|
+
description: string;
|
|
87
|
+
branches?: WorkflowBranchMetadata[];
|
|
88
|
+
};
|
|
89
|
+
type WorkflowStepMetadata = WorkflowOperationMetadata & {
|
|
90
|
+
group?: WorkflowStepGroup;
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/core/llm.d.ts
|
|
94
|
+
type LlmRequest = {
|
|
95
|
+
model: string;
|
|
96
|
+
system?: string;
|
|
97
|
+
maxTokens?: number;
|
|
98
|
+
} & ({
|
|
99
|
+
prompt: string;
|
|
100
|
+
messages?: never;
|
|
101
|
+
} | {
|
|
102
|
+
prompt?: never;
|
|
103
|
+
messages: {
|
|
104
|
+
role: "user" | "assistant";
|
|
105
|
+
content: string;
|
|
117
106
|
}[];
|
|
118
|
-
|
|
107
|
+
});
|
|
108
|
+
interface LlmStepOptions {
|
|
109
|
+
id: string;
|
|
110
|
+
meta: WorkflowStepMetadata;
|
|
111
|
+
timeout?: number;
|
|
112
|
+
retry?: {
|
|
113
|
+
maxAttempts: number;
|
|
114
|
+
backoff?: "fixed" | "exponential";
|
|
115
|
+
baseMs?: number;
|
|
116
|
+
shouldRetry?: never;
|
|
117
|
+
};
|
|
119
118
|
}
|
|
119
|
+
type LlmStep = (request: LlmRequest, options: LlmStepOptions) => Promise<string>;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@bufbuild/protobuf/2.10.1/b0955b226816adda68977638196f96a6e65cec2605734621338f49f7ea29042e/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts
|
|
122
|
+
/**
|
|
123
|
+
* Represents any possible JSON value:
|
|
124
|
+
* - number
|
|
125
|
+
* - string
|
|
126
|
+
* - boolean
|
|
127
|
+
* - null
|
|
128
|
+
* - object (with any JSON value as property)
|
|
129
|
+
* - array (with any JSON value as element)
|
|
130
|
+
*/
|
|
131
|
+
type JsonValue = number | string | boolean | null | JsonObject | JsonValue[];
|
|
132
|
+
/**
|
|
133
|
+
* Represents a JSON object.
|
|
134
|
+
*/
|
|
135
|
+
type JsonObject = {
|
|
136
|
+
[k: string]: JsonValue;
|
|
137
|
+
};
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@bufbuild/protobuf/2.10.1/b0955b226816adda68977638196f96a6e65cec2605734621338f49f7ea29042e/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts
|
|
140
|
+
/**
|
|
141
|
+
* `Value` represents a dynamically typed value which can be either
|
|
142
|
+
* null, a number, a string, a boolean, a recursive struct value, or a
|
|
143
|
+
* list of values. A producer of value is expected to set one of these
|
|
144
|
+
* variants. Absence of any variant indicates an error.
|
|
145
|
+
*
|
|
146
|
+
* The JSON representation for `Value` is JSON value.
|
|
147
|
+
*
|
|
148
|
+
* @generated from message google.protobuf.Value
|
|
149
|
+
*/
|
|
150
|
+
type ValueJson = JsonValue;
|
|
120
151
|
//#endregion
|
|
121
|
-
//#region src/
|
|
122
|
-
|
|
123
|
-
|
|
152
|
+
//#region src/proto/lovable/appworkflows/v1/workflow_manifest_pb.d.ts
|
|
153
|
+
/**
|
|
154
|
+
* Describes the static SDK-produced manifest for one workflow.
|
|
155
|
+
*
|
|
156
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestV1
|
|
157
|
+
*/
|
|
158
|
+
type WorkflowManifestV1Json = {
|
|
159
|
+
/**
|
|
160
|
+
* Identifies the manifest schema; V1 emitters set this to 1.
|
|
161
|
+
*
|
|
162
|
+
* @generated from field: uint32 manifest_version = 1;
|
|
163
|
+
*/
|
|
164
|
+
manifestVersion?: number;
|
|
165
|
+
/**
|
|
166
|
+
* Records the exact @lovable.dev/workflows-sdk version that emitted the manifest.
|
|
167
|
+
*
|
|
168
|
+
* @generated from field: string sdk_version = 2;
|
|
169
|
+
*/
|
|
170
|
+
sdkVersion?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Identifies the workflow within its app.
|
|
173
|
+
*
|
|
174
|
+
* @generated from field: string workflow_id = 3;
|
|
175
|
+
*/
|
|
176
|
+
workflowId?: string;
|
|
177
|
+
/**
|
|
178
|
+
* @generated from field: optional string description = 4;
|
|
179
|
+
*/
|
|
180
|
+
description?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Carries the author-supplied workflow version, not a content digest.
|
|
183
|
+
*
|
|
184
|
+
* @generated from field: optional string workflow_version = 5;
|
|
185
|
+
*/
|
|
186
|
+
workflowVersion?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Carries the workflow input JSON Schema when the workflow declares one.
|
|
189
|
+
*
|
|
190
|
+
* @generated from field: google.protobuf.Value input_schema = 6;
|
|
191
|
+
*/
|
|
192
|
+
inputSchema?: ValueJson;
|
|
193
|
+
/**
|
|
194
|
+
* Carries the workflow output JSON Schema when the workflow declares one.
|
|
195
|
+
*
|
|
196
|
+
* @generated from field: google.protobuf.Value output_schema = 7;
|
|
197
|
+
*/
|
|
198
|
+
outputSchema?: ValueJson;
|
|
199
|
+
/**
|
|
200
|
+
* Carries the workflow state JSON Schema when the workflow declares one.
|
|
201
|
+
*
|
|
202
|
+
* @generated from field: google.protobuf.Value state_schema = 8;
|
|
203
|
+
*/
|
|
204
|
+
stateSchema?: ValueJson;
|
|
205
|
+
/**
|
|
206
|
+
* Lists the workflow's statically declared triggers.
|
|
207
|
+
*
|
|
208
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestTriggerV1 triggers = 9;
|
|
209
|
+
*/
|
|
210
|
+
triggers?: WorkflowManifestTriggerV1Json[];
|
|
211
|
+
/**
|
|
212
|
+
* Describes the durable-operation graph inferred from the workflow handler.
|
|
213
|
+
*
|
|
214
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestGraphV1 graph = 10;
|
|
215
|
+
*/
|
|
216
|
+
graph?: WorkflowManifestGraphV1Json;
|
|
217
|
+
/**
|
|
218
|
+
* Deployment selection metadata, excluded from the immutable manifest digest.
|
|
219
|
+
*
|
|
220
|
+
* @generated from field: optional bool current = 11;
|
|
221
|
+
*/
|
|
222
|
+
current?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* URL prefix the workflow ID is appended to, from the app's workflowsPlugin
|
|
225
|
+
* path option. No host or manifest field otherwise reveals it.
|
|
226
|
+
*
|
|
227
|
+
* @generated from field: optional string route_path = 12;
|
|
228
|
+
*/
|
|
229
|
+
routePath?: string;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Identifies a trigger and exactly one trigger-specific configuration.
|
|
233
|
+
*
|
|
234
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestTriggerV1
|
|
235
|
+
*/
|
|
236
|
+
type WorkflowManifestTriggerV1Json = {
|
|
237
|
+
/**
|
|
238
|
+
* Identifies the trigger within its app.
|
|
239
|
+
*
|
|
240
|
+
* @generated from field: string id = 1;
|
|
241
|
+
*/
|
|
242
|
+
id?: string;
|
|
243
|
+
/**
|
|
244
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestScheduleTriggerV1 schedule = 2;
|
|
245
|
+
*/
|
|
246
|
+
schedule?: WorkflowManifestScheduleTriggerV1Json;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Configures a clock-based trigger.
|
|
250
|
+
*
|
|
251
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestScheduleTriggerV1
|
|
252
|
+
*/
|
|
253
|
+
type WorkflowManifestScheduleTriggerV1Json = {
|
|
254
|
+
/**
|
|
255
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestCadenceV1 cadence = 1;
|
|
256
|
+
*/
|
|
257
|
+
cadence?: WorkflowManifestCadenceV1Json;
|
|
258
|
+
/**
|
|
259
|
+
* Uses a canonical IANA time-zone name or UTC.
|
|
260
|
+
*
|
|
261
|
+
* @generated from field: string time_zone = 2;
|
|
262
|
+
*/
|
|
263
|
+
timeZone?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Pauses the schedule when false; SDK emitters always resolve this value.
|
|
266
|
+
*
|
|
267
|
+
* @generated from field: optional bool enabled = 3;
|
|
268
|
+
*/
|
|
269
|
+
enabled?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Controls concurrent runs: "skip", "allow", or "buffer-one".
|
|
272
|
+
*
|
|
273
|
+
* @generated from field: string overlap_policy = 4;
|
|
274
|
+
*/
|
|
275
|
+
overlapPolicy?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Supplies the workflow input for every run started by this schedule.
|
|
278
|
+
*
|
|
279
|
+
* @generated from field: google.protobuf.Value input = 5;
|
|
280
|
+
*/
|
|
281
|
+
input?: ValueJson;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Selects exactly one clock cadence.
|
|
285
|
+
*
|
|
286
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestCadenceV1
|
|
287
|
+
*/
|
|
288
|
+
type WorkflowManifestCadenceV1Json = {
|
|
289
|
+
/**
|
|
290
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestHourlyCadenceV1 hourly = 1;
|
|
291
|
+
*/
|
|
292
|
+
hourly?: WorkflowManifestHourlyCadenceV1Json;
|
|
293
|
+
/**
|
|
294
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestDailyCadenceV1 daily = 2;
|
|
295
|
+
*/
|
|
296
|
+
daily?: WorkflowManifestDailyCadenceV1Json;
|
|
297
|
+
/**
|
|
298
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestWeeklyCadenceV1 weekly = 3;
|
|
299
|
+
*/
|
|
300
|
+
weekly?: WorkflowManifestWeeklyCadenceV1Json;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Runs once per hour at a platform-selected offset within the hour.
|
|
304
|
+
*
|
|
305
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestHourlyCadenceV1
|
|
306
|
+
*/
|
|
307
|
+
type WorkflowManifestHourlyCadenceV1Json = {};
|
|
308
|
+
/**
|
|
309
|
+
* Runs daily during the selected hours in the schedule's time zone.
|
|
310
|
+
*
|
|
311
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestDailyCadenceV1
|
|
312
|
+
*/
|
|
313
|
+
type WorkflowManifestDailyCadenceV1Json = {
|
|
314
|
+
/**
|
|
315
|
+
* Contains at least one unique whole hour from 0 through 23 in ascending order.
|
|
316
|
+
*
|
|
317
|
+
* @generated from field: repeated uint32 hours = 1;
|
|
318
|
+
*/
|
|
319
|
+
hours?: number[];
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Runs at every selected hour on every selected weekday in the schedule's time zone.
|
|
323
|
+
*
|
|
324
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestWeeklyCadenceV1
|
|
325
|
+
*/
|
|
326
|
+
type WorkflowManifestWeeklyCadenceV1Json = {
|
|
327
|
+
/**
|
|
328
|
+
* Contains at least one unique weekday in Monday-to-Sunday order and never UNSPECIFIED.
|
|
329
|
+
*
|
|
330
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestWeekdayV1 days = 1;
|
|
331
|
+
*/
|
|
332
|
+
days?: WorkflowManifestWeekdayV1Json[];
|
|
333
|
+
/**
|
|
334
|
+
* Contains at least one unique whole hour from 0 through 23 in ascending order.
|
|
335
|
+
*
|
|
336
|
+
* @generated from field: repeated uint32 hours = 2;
|
|
337
|
+
*/
|
|
338
|
+
hours?: number[];
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Describes the workflow handler's statically inferred durable-operation graph.
|
|
342
|
+
*
|
|
343
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphV1
|
|
344
|
+
*/
|
|
345
|
+
type WorkflowManifestGraphV1Json = {
|
|
346
|
+
/**
|
|
347
|
+
* Identifies how the graph was produced; SDK emitters currently use "inferred".
|
|
348
|
+
*
|
|
349
|
+
* @generated from field: string source = 1;
|
|
350
|
+
*/
|
|
351
|
+
source?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Identifies the analyzed source region; SDK emitters currently use "handler".
|
|
354
|
+
*
|
|
355
|
+
* @generated from field: string scope = 2;
|
|
356
|
+
*/
|
|
357
|
+
scope?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Is false when unsupported or dynamic source prevents complete inference.
|
|
360
|
+
*
|
|
361
|
+
* @generated from field: optional bool complete = 3;
|
|
362
|
+
*/
|
|
363
|
+
complete?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestGraphNodeV1 nodes = 4;
|
|
366
|
+
*/
|
|
367
|
+
nodes?: WorkflowManifestGraphNodeV1Json[];
|
|
368
|
+
/**
|
|
369
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowManifestGraphEdgeV1 edges = 5;
|
|
370
|
+
*/
|
|
371
|
+
edges?: WorkflowManifestGraphEdgeV1Json[];
|
|
372
|
+
/**
|
|
373
|
+
* Explains each reason complete is false.
|
|
374
|
+
*
|
|
375
|
+
* @generated from field: repeated string diagnostics = 6;
|
|
376
|
+
*/
|
|
377
|
+
diagnostics?: string[];
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Describes one durable operation, repeated group, branch, or inference gap.
|
|
381
|
+
*
|
|
382
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphNodeV1
|
|
383
|
+
*/
|
|
384
|
+
type WorkflowManifestGraphNodeV1Json = {
|
|
385
|
+
/**
|
|
386
|
+
* Identifies the node within this graph.
|
|
387
|
+
*
|
|
388
|
+
* @generated from field: string id = 1;
|
|
389
|
+
*/
|
|
390
|
+
id?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Supplies the display label used by graph consumers.
|
|
393
|
+
*
|
|
394
|
+
* @generated from field: string label = 2;
|
|
395
|
+
*/
|
|
396
|
+
label?: string;
|
|
397
|
+
/**
|
|
398
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepNodeV1 step = 3;
|
|
399
|
+
*/
|
|
400
|
+
step?: WorkflowManifestStepNodeV1Json;
|
|
401
|
+
/**
|
|
402
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestParallelNodeV1 parallel = 4;
|
|
403
|
+
*/
|
|
404
|
+
parallel?: WorkflowManifestParallelNodeV1Json;
|
|
405
|
+
/**
|
|
406
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestLoopNodeV1 loop = 5;
|
|
407
|
+
*/
|
|
408
|
+
loop?: WorkflowManifestLoopNodeV1Json;
|
|
409
|
+
/**
|
|
410
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestApproveNodeV1 approve = 6;
|
|
411
|
+
*/
|
|
412
|
+
approve?: WorkflowManifestApproveNodeV1Json;
|
|
413
|
+
/**
|
|
414
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestWaitForEventNodeV1 wait_for_event = 7;
|
|
415
|
+
*/
|
|
416
|
+
waitForEvent?: WorkflowManifestWaitForEventNodeV1Json;
|
|
417
|
+
/**
|
|
418
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestSleepNodeV1 sleep = 8;
|
|
419
|
+
*/
|
|
420
|
+
sleep?: WorkflowManifestSleepNodeV1Json;
|
|
421
|
+
/**
|
|
422
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestSleepUntilNodeV1 sleep_until = 9;
|
|
423
|
+
*/
|
|
424
|
+
sleepUntil?: WorkflowManifestSleepUntilNodeV1Json;
|
|
425
|
+
/**
|
|
426
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestNowNodeV1 now = 10;
|
|
427
|
+
*/
|
|
428
|
+
now?: WorkflowManifestNowNodeV1Json;
|
|
429
|
+
/**
|
|
430
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestUuidNodeV1 uuid = 11;
|
|
431
|
+
*/
|
|
432
|
+
uuid?: WorkflowManifestUuidNodeV1Json;
|
|
433
|
+
/**
|
|
434
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestBranchNodeV1 branch = 12;
|
|
435
|
+
*/
|
|
436
|
+
branch?: WorkflowManifestBranchNodeV1Json;
|
|
437
|
+
/**
|
|
438
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestUnknownNodeV1 unknown = 13;
|
|
439
|
+
*/
|
|
440
|
+
unknown?: WorkflowManifestUnknownNodeV1Json;
|
|
441
|
+
/**
|
|
442
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestLlmNodeV1 llm = 14;
|
|
443
|
+
*/
|
|
444
|
+
llm?: WorkflowManifestLlmNodeV1Json;
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* Appears for a statically described ctx.step call.
|
|
448
|
+
*
|
|
449
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestStepNodeV1
|
|
450
|
+
*/
|
|
451
|
+
type WorkflowManifestStepNodeV1Json = {
|
|
452
|
+
/**
|
|
453
|
+
* @generated from field: string step_id = 1;
|
|
454
|
+
*/
|
|
455
|
+
stepId?: string;
|
|
456
|
+
/**
|
|
457
|
+
* @generated from field: string description = 2;
|
|
458
|
+
*/
|
|
459
|
+
description?: string;
|
|
460
|
+
/**
|
|
461
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1 execution_policy = 3;
|
|
462
|
+
*/
|
|
463
|
+
executionPolicy?: WorkflowManifestStepExecutionPolicyV1Json;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Appears for Promise.all over mapped ctx.step calls with static group metadata.
|
|
467
|
+
*
|
|
468
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestParallelNodeV1
|
|
469
|
+
*/
|
|
470
|
+
type WorkflowManifestParallelNodeV1Json = {
|
|
471
|
+
/**
|
|
472
|
+
* @generated from field: string group_id = 1;
|
|
473
|
+
*/
|
|
474
|
+
groupId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1 step = 2;
|
|
477
|
+
*/
|
|
478
|
+
step?: WorkflowManifestRepeatedStepV1Json;
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* Appears for a directly awaited ctx.step in a for-of loop with static group metadata.
|
|
482
|
+
*
|
|
483
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestLoopNodeV1
|
|
484
|
+
*/
|
|
485
|
+
type WorkflowManifestLoopNodeV1Json = {
|
|
486
|
+
/**
|
|
487
|
+
* @generated from field: string group_id = 1;
|
|
488
|
+
*/
|
|
489
|
+
groupId?: string;
|
|
490
|
+
/**
|
|
491
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1 step = 2;
|
|
492
|
+
*/
|
|
493
|
+
step?: WorkflowManifestRepeatedStepV1Json;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Describes the step repeated by a dynamic loop or parallel group.
|
|
497
|
+
*
|
|
498
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestRepeatedStepV1
|
|
499
|
+
*/
|
|
500
|
+
type WorkflowManifestRepeatedStepV1Json = {
|
|
501
|
+
/**
|
|
502
|
+
* Preserves the source-level step ID expression as a display template.
|
|
503
|
+
*
|
|
504
|
+
* @generated from field: string step_id_template = 1;
|
|
505
|
+
*/
|
|
506
|
+
stepIdTemplate?: string;
|
|
507
|
+
/**
|
|
508
|
+
* @generated from field: string description = 2;
|
|
509
|
+
*/
|
|
510
|
+
description?: string;
|
|
511
|
+
/**
|
|
512
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1 execution_policy = 3;
|
|
513
|
+
*/
|
|
514
|
+
executionPolicy?: WorkflowManifestStepExecutionPolicyV1Json;
|
|
124
515
|
};
|
|
516
|
+
/**
|
|
517
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1
|
|
518
|
+
*/
|
|
519
|
+
type WorkflowManifestStepExecutionPolicyV1Json = {
|
|
520
|
+
/**
|
|
521
|
+
* Includes the first attempt.
|
|
522
|
+
*
|
|
523
|
+
* @generated from field: uint32 max_attempts = 1;
|
|
524
|
+
*/
|
|
525
|
+
maxAttempts?: number;
|
|
526
|
+
/**
|
|
527
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestRetryBackoffStrategyV1 retry_backoff_strategy = 2;
|
|
528
|
+
*/
|
|
529
|
+
retryBackoffStrategy?: WorkflowManifestRetryBackoffStrategyV1Json;
|
|
530
|
+
/**
|
|
531
|
+
* @generated from field: double retry_base_ms = 3;
|
|
532
|
+
*/
|
|
533
|
+
retryBaseMs?: number | "NaN" | "Infinity" | "-Infinity";
|
|
534
|
+
/**
|
|
535
|
+
* @generated from field: bool has_custom_should_retry = 4;
|
|
536
|
+
*/
|
|
537
|
+
hasCustomShouldRetry?: boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Applies independently to each attempt when present.
|
|
540
|
+
*
|
|
541
|
+
* @generated from field: optional double timeout_ms = 5;
|
|
542
|
+
*/
|
|
543
|
+
timeoutMs?: number | "NaN" | "Infinity" | "-Infinity";
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Appears for a statically described ctx.approve call.
|
|
547
|
+
*
|
|
548
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestApproveNodeV1
|
|
549
|
+
*/
|
|
550
|
+
type WorkflowManifestApproveNodeV1Json = {
|
|
551
|
+
/**
|
|
552
|
+
* @generated from field: string step_id = 1;
|
|
553
|
+
*/
|
|
554
|
+
stepId?: string;
|
|
555
|
+
/**
|
|
556
|
+
* @generated from field: string description = 2;
|
|
557
|
+
*/
|
|
558
|
+
description?: string;
|
|
559
|
+
/**
|
|
560
|
+
* @generated from field: string title = 3;
|
|
561
|
+
*/
|
|
562
|
+
title?: string;
|
|
563
|
+
/**
|
|
564
|
+
* Milliseconds the approval may stay open, from the round that parks it.
|
|
565
|
+
* The SDK requires one, so a run cannot park for ever.
|
|
566
|
+
*
|
|
567
|
+
* @generated from field: optional double deadline = 4;
|
|
568
|
+
*/
|
|
569
|
+
deadline?: number | "NaN" | "Infinity" | "-Infinity";
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Appears for a statically described ctx.waitForEvent call.
|
|
573
|
+
*
|
|
574
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestWaitForEventNodeV1
|
|
575
|
+
*/
|
|
576
|
+
type WorkflowManifestWaitForEventNodeV1Json = {
|
|
577
|
+
/**
|
|
578
|
+
* @generated from field: string step_id = 1;
|
|
579
|
+
*/
|
|
580
|
+
stepId?: string;
|
|
581
|
+
/**
|
|
582
|
+
* @generated from field: string description = 2;
|
|
583
|
+
*/
|
|
584
|
+
description?: string;
|
|
585
|
+
/**
|
|
586
|
+
* @generated from field: string event = 3;
|
|
587
|
+
*/
|
|
588
|
+
event?: string;
|
|
589
|
+
/**
|
|
590
|
+
* @generated from field: optional double deadline = 4;
|
|
591
|
+
*/
|
|
592
|
+
deadline?: number | "NaN" | "Infinity" | "-Infinity";
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* Appears for a ctx.sleep call with a static duration and description.
|
|
596
|
+
*
|
|
597
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestSleepNodeV1
|
|
598
|
+
*/
|
|
599
|
+
type WorkflowManifestSleepNodeV1Json = {
|
|
600
|
+
/**
|
|
601
|
+
* @generated from field: string step_id = 1;
|
|
602
|
+
*/
|
|
603
|
+
stepId?: string;
|
|
604
|
+
/**
|
|
605
|
+
* @generated from field: string description = 2;
|
|
606
|
+
*/
|
|
607
|
+
description?: string;
|
|
608
|
+
/**
|
|
609
|
+
* @generated from field: double ms = 3;
|
|
610
|
+
*/
|
|
611
|
+
ms?: number | "NaN" | "Infinity" | "-Infinity";
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Appears for a ctx.sleepUntil call with a static timestamp and description.
|
|
615
|
+
*
|
|
616
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestSleepUntilNodeV1
|
|
617
|
+
*/
|
|
618
|
+
type WorkflowManifestSleepUntilNodeV1Json = {
|
|
619
|
+
/**
|
|
620
|
+
* @generated from field: string step_id = 1;
|
|
621
|
+
*/
|
|
622
|
+
stepId?: string;
|
|
623
|
+
/**
|
|
624
|
+
* @generated from field: string description = 2;
|
|
625
|
+
*/
|
|
626
|
+
description?: string;
|
|
627
|
+
/**
|
|
628
|
+
* @generated from field: double timestamp = 3;
|
|
629
|
+
*/
|
|
630
|
+
timestamp?: number | "NaN" | "Infinity" | "-Infinity";
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* Appears for a statically described ctx.now call.
|
|
634
|
+
*
|
|
635
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestNowNodeV1
|
|
636
|
+
*/
|
|
637
|
+
type WorkflowManifestNowNodeV1Json = {
|
|
638
|
+
/**
|
|
639
|
+
* @generated from field: string step_id = 1;
|
|
640
|
+
*/
|
|
641
|
+
stepId?: string;
|
|
642
|
+
/**
|
|
643
|
+
* @generated from field: string description = 2;
|
|
644
|
+
*/
|
|
645
|
+
description?: string;
|
|
646
|
+
};
|
|
647
|
+
/**
|
|
648
|
+
* Appears for a statically described ctx.uuid call.
|
|
649
|
+
*
|
|
650
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestUuidNodeV1
|
|
651
|
+
*/
|
|
652
|
+
type WorkflowManifestUuidNodeV1Json = {
|
|
653
|
+
/**
|
|
654
|
+
* @generated from field: string step_id = 1;
|
|
655
|
+
*/
|
|
656
|
+
stepId?: string;
|
|
657
|
+
/**
|
|
658
|
+
* @generated from field: string description = 2;
|
|
659
|
+
*/
|
|
660
|
+
description?: string;
|
|
661
|
+
};
|
|
662
|
+
/**
|
|
663
|
+
* Appears for an if statement carrying static branch metadata.
|
|
664
|
+
*
|
|
665
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestBranchNodeV1
|
|
666
|
+
*/
|
|
667
|
+
type WorkflowManifestBranchNodeV1Json = {
|
|
668
|
+
/**
|
|
669
|
+
* @generated from field: string branch_id = 1;
|
|
670
|
+
*/
|
|
671
|
+
branchId?: string;
|
|
672
|
+
/**
|
|
673
|
+
* @generated from field: string condition = 2;
|
|
674
|
+
*/
|
|
675
|
+
condition?: string;
|
|
676
|
+
/**
|
|
677
|
+
* @generated from field: string description = 3;
|
|
678
|
+
*/
|
|
679
|
+
description?: string;
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* Appears where static inference cannot follow the workflow source; label contains the reason.
|
|
683
|
+
*
|
|
684
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestUnknownNodeV1
|
|
685
|
+
*/
|
|
686
|
+
type WorkflowManifestUnknownNodeV1Json = {};
|
|
687
|
+
/**
|
|
688
|
+
* Connects two graph nodes in execution or branch order.
|
|
689
|
+
*
|
|
690
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestGraphEdgeV1
|
|
691
|
+
*/
|
|
692
|
+
type WorkflowManifestGraphEdgeV1Json = {
|
|
693
|
+
/**
|
|
694
|
+
* @generated from field: string source = 1;
|
|
695
|
+
*/
|
|
696
|
+
source?: string;
|
|
697
|
+
/**
|
|
698
|
+
* @generated from field: string target = 2;
|
|
699
|
+
*/
|
|
700
|
+
target?: string;
|
|
701
|
+
/**
|
|
702
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestOrderEdgeV1 order = 3;
|
|
703
|
+
*/
|
|
704
|
+
order?: WorkflowManifestOrderEdgeV1Json;
|
|
705
|
+
/**
|
|
706
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestBranchEdgeV1 branch = 4;
|
|
707
|
+
*/
|
|
708
|
+
branch?: WorkflowManifestBranchEdgeV1Json;
|
|
709
|
+
};
|
|
710
|
+
/**
|
|
711
|
+
* Connects operations that execute sequentially.
|
|
712
|
+
*
|
|
713
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestOrderEdgeV1
|
|
714
|
+
*/
|
|
715
|
+
type WorkflowManifestOrderEdgeV1Json = {};
|
|
716
|
+
/**
|
|
717
|
+
* Connects a condition to its true or false path.
|
|
718
|
+
*
|
|
719
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestBranchEdgeV1
|
|
720
|
+
*/
|
|
721
|
+
type WorkflowManifestBranchEdgeV1Json = {
|
|
722
|
+
/**
|
|
723
|
+
* Is true for the then-path and false for the else-path.
|
|
724
|
+
*
|
|
725
|
+
* @generated from field: bool outcome = 1;
|
|
726
|
+
*/
|
|
727
|
+
outcome?: boolean;
|
|
728
|
+
};
|
|
729
|
+
/**
|
|
730
|
+
* @generated from message lovable.appworkflows.v1.WorkflowManifestLlmNodeV1
|
|
731
|
+
*/
|
|
732
|
+
type WorkflowManifestLlmNodeV1Json = {
|
|
733
|
+
/**
|
|
734
|
+
* @generated from field: string step_id = 1;
|
|
735
|
+
*/
|
|
736
|
+
stepId?: string;
|
|
737
|
+
/**
|
|
738
|
+
* @generated from field: string description = 2;
|
|
739
|
+
*/
|
|
740
|
+
description?: string;
|
|
741
|
+
/**
|
|
742
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowManifestStepExecutionPolicyV1 execution_policy = 3;
|
|
743
|
+
*/
|
|
744
|
+
executionPolicy?: WorkflowManifestStepExecutionPolicyV1Json;
|
|
745
|
+
/**
|
|
746
|
+
* Omitted when static inference cannot determine the model.
|
|
747
|
+
*
|
|
748
|
+
* @generated from field: optional string model = 4;
|
|
749
|
+
*/
|
|
750
|
+
model?: string;
|
|
751
|
+
};
|
|
752
|
+
/**
|
|
753
|
+
* Names a weekday independently of locale.
|
|
754
|
+
*
|
|
755
|
+
* @generated from enum lovable.appworkflows.v1.WorkflowManifestWeekdayV1
|
|
756
|
+
*/
|
|
757
|
+
type WorkflowManifestWeekdayV1Json = "WORKFLOW_MANIFEST_WEEKDAY_V1_UNSPECIFIED" | "WORKFLOW_MANIFEST_WEEKDAY_V1_MONDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_TUESDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_WEDNESDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_THURSDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_FRIDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_SATURDAY" | "WORKFLOW_MANIFEST_WEEKDAY_V1_SUNDAY";
|
|
758
|
+
/**
|
|
759
|
+
* Selects the delay calculation between step attempts.
|
|
760
|
+
*
|
|
761
|
+
* @generated from enum lovable.appworkflows.v1.WorkflowManifestRetryBackoffStrategyV1
|
|
762
|
+
*/
|
|
763
|
+
type WorkflowManifestRetryBackoffStrategyV1Json = "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_UNSPECIFIED" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_EXPONENTIAL" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_FIXED" | "WORKFLOW_MANIFEST_RETRY_BACKOFF_STRATEGY_V1_CUSTOM";
|
|
125
764
|
//#endregion
|
|
126
765
|
//#region src/manifests/generate.d.ts
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
766
|
+
type WorkflowManifest = WorkflowManifestV1Json & {
|
|
767
|
+
manifestVersion: 1;
|
|
768
|
+
sdkVersion: string;
|
|
769
|
+
workflowId: string;
|
|
770
|
+
workflowVersion: string;
|
|
771
|
+
current: boolean;
|
|
772
|
+
triggers: NonNullable<WorkflowManifestV1Json["triggers"]>;
|
|
773
|
+
graph: NonNullable<WorkflowManifestV1Json["graph"]>;
|
|
774
|
+
};
|
|
775
|
+
interface GenerateManifestsOptions {
|
|
776
|
+
/** URL prefix the workflow ID is appended to; the plugin's path option. */
|
|
777
|
+
routePath?: string;
|
|
778
|
+
}
|
|
779
|
+
declare function generateManifests(definition: WorkflowsDefinition, options?: GenerateManifestsOptions): Promise<WorkflowManifest[]>;
|
|
780
|
+
//#endregion
|
|
781
|
+
//#region src/stacks/tanstack/handlers.d.ts
|
|
782
|
+
/** The shape `registerWorkflows()` returns; only the list is needed to dispatch. */
|
|
783
|
+
interface WorkflowCollection {
|
|
784
|
+
readonly workflows: readonly AnyWorkflowDefinition$1[];
|
|
785
|
+
}
|
|
786
|
+
interface TanStackWorkflowHandlerOptions {
|
|
787
|
+
/** @default a process-local `inMemoryRunStore()`, lost on restart */
|
|
788
|
+
runStore?: RunStore;
|
|
789
|
+
/**
|
|
790
|
+
* Route parameter carrying the workflow ID.
|
|
791
|
+
* @default "workflowId"
|
|
792
|
+
*/
|
|
793
|
+
workflowIdParam?: string;
|
|
794
|
+
}
|
|
795
|
+
interface TanStackRouteCtx {
|
|
796
|
+
request: Request;
|
|
797
|
+
params?: Record<string, string | undefined>;
|
|
798
|
+
}
|
|
799
|
+
type TanStackWorkflowHandler = (ctx: TanStackRouteCtx) => Promise<Response>;
|
|
800
|
+
/** Build a TanStack Start `POST` handler serving every workflow in the collection. */
|
|
801
|
+
declare function createTanStackWorkflowHandler(collection: WorkflowCollection, options?: TanStackWorkflowHandlerOptions): TanStackWorkflowHandler;
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region src/proto/lovable/appworkflows/v1/external_operation_pb.d.ts
|
|
804
|
+
/**
|
|
805
|
+
* @generated from message lovable.appworkflows.v1.WorkflowExternalOperationV1
|
|
806
|
+
*/
|
|
807
|
+
type WorkflowExternalOperationV1Json = {
|
|
808
|
+
/**
|
|
809
|
+
* @generated from field: lovable.appworkflows.v1.WorkflowAiGatewayParamsV1 ai_gateway = 1;
|
|
810
|
+
*/
|
|
811
|
+
aiGateway?: WorkflowAiGatewayParamsV1Json;
|
|
812
|
+
};
|
|
813
|
+
/**
|
|
814
|
+
* @generated from message lovable.appworkflows.v1.WorkflowAiGatewayParamsV1
|
|
815
|
+
*/
|
|
816
|
+
type WorkflowAiGatewayParamsV1Json = {
|
|
817
|
+
/**
|
|
818
|
+
* @generated from field: string model = 1;
|
|
819
|
+
*/
|
|
820
|
+
model?: string;
|
|
821
|
+
/**
|
|
822
|
+
* LlmRequest requires prompt XOR nonempty messages; repeated fields cannot be in a oneof.
|
|
823
|
+
*
|
|
824
|
+
* @generated from field: optional string prompt = 2;
|
|
825
|
+
*/
|
|
826
|
+
prompt?: string;
|
|
827
|
+
/**
|
|
828
|
+
* @generated from field: repeated lovable.appworkflows.v1.WorkflowAiGatewayMessageV1 messages = 3;
|
|
829
|
+
*/
|
|
830
|
+
messages?: WorkflowAiGatewayMessageV1Json[];
|
|
831
|
+
/**
|
|
832
|
+
* @generated from field: optional string system = 4;
|
|
833
|
+
*/
|
|
834
|
+
system?: string;
|
|
835
|
+
/**
|
|
836
|
+
* @generated from field: optional uint32 max_tokens = 5;
|
|
837
|
+
*/
|
|
838
|
+
maxTokens?: number;
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* @generated from message lovable.appworkflows.v1.WorkflowAiGatewayMessageV1
|
|
842
|
+
*/
|
|
843
|
+
type WorkflowAiGatewayMessageV1Json = {
|
|
844
|
+
/**
|
|
845
|
+
* LlmRequest permits only "user" and "assistant"; system instructions use the separate system field.
|
|
846
|
+
*
|
|
847
|
+
* @generated from field: string role = 1;
|
|
848
|
+
*/
|
|
849
|
+
role?: string;
|
|
850
|
+
/**
|
|
851
|
+
* @generated from field: string content = 2;
|
|
852
|
+
*/
|
|
853
|
+
content?: string;
|
|
854
|
+
};
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region src/runtime/types.d.ts
|
|
857
|
+
/** Durable operations a replay can answer from the memo. */
|
|
858
|
+
type StepKind = "step" | "llm" | "sleep" | "waitForEvent" | "approve" | "now" | "uuid";
|
|
859
|
+
/**
|
|
860
|
+
* One settled durable operation. The memo is the whole run state: the caller
|
|
861
|
+
* carries it between calls, so no run store is involved.
|
|
862
|
+
*/
|
|
863
|
+
interface MemoEntry {
|
|
864
|
+
/** Call order within the pass that recorded it. Reporting only: racing
|
|
865
|
+
* branches can order differently on a later pass, so it is not the key. */
|
|
866
|
+
seq: number;
|
|
867
|
+
stepId: string;
|
|
868
|
+
/** Key of the step whose body recorded this, if any; a memoized parent hides it. */
|
|
869
|
+
parent?: string;
|
|
870
|
+
kind: StepKind;
|
|
871
|
+
meta?: WorkflowMetadata;
|
|
872
|
+
status: "completed" | "failed";
|
|
873
|
+
result?: unknown;
|
|
874
|
+
error?: string;
|
|
875
|
+
}
|
|
876
|
+
interface StepIntentBase {
|
|
877
|
+
seq: number;
|
|
878
|
+
stepId: string;
|
|
879
|
+
/** Kind-specific detail: sleep `ms`, `waitForEvent` name, approval title. */
|
|
880
|
+
config?: Record<string, unknown>;
|
|
881
|
+
meta?: WorkflowMetadata;
|
|
882
|
+
}
|
|
883
|
+
/** A durable operation the replay reached but could not answer. */
|
|
884
|
+
type StepIntent = StepIntentBase & {
|
|
885
|
+
kind: Exclude<StepKind, "llm">;
|
|
886
|
+
disposition?: never;
|
|
887
|
+
external?: never;
|
|
888
|
+
};
|
|
889
|
+
type ExternalOperation = Required<WorkflowExternalOperationV1Json> & {
|
|
890
|
+
aiGateway: LlmRequest;
|
|
891
|
+
};
|
|
892
|
+
type ExternalStep = Pick<StepIntentBase, "seq" | "stepId" | "meta"> & {
|
|
893
|
+
kind: "llm";
|
|
894
|
+
disposition: "external";
|
|
895
|
+
external: ExternalOperation;
|
|
896
|
+
};
|
|
897
|
+
type NextStep = StepIntent | ExternalStep;
|
|
898
|
+
interface StepResult<K extends StepKind = StepKind> {
|
|
899
|
+
seq: number;
|
|
900
|
+
stepId: string;
|
|
901
|
+
kind: K;
|
|
902
|
+
meta?: WorkflowMetadata;
|
|
903
|
+
status: "completed" | "failed";
|
|
904
|
+
result?: unknown;
|
|
905
|
+
error?: string;
|
|
906
|
+
}
|
|
907
|
+
type ReplayStatus = "completed" | "failed" | "pending";
|
|
908
|
+
interface ReplayOutcome {
|
|
909
|
+
status: ReplayStatus;
|
|
910
|
+
/** The memo the next call should send back, including entries this pass settled. */
|
|
911
|
+
memo: MemoEntry[];
|
|
912
|
+
/** Operations that still need an answer; empty unless `status` is `pending`. */
|
|
913
|
+
steps: StepIntent[];
|
|
914
|
+
/** Operations this pass executed, in execution order. */
|
|
915
|
+
results: StepResult[];
|
|
916
|
+
/** `ctx.emit` payloads; diagnostic only, never part of replay. */
|
|
917
|
+
emitted: {
|
|
918
|
+
name: string;
|
|
919
|
+
value: Record<string, unknown>;
|
|
920
|
+
}[];
|
|
921
|
+
output?: unknown;
|
|
922
|
+
error?: string;
|
|
923
|
+
}
|
|
924
|
+
interface StepReference {
|
|
925
|
+
kind: "step";
|
|
926
|
+
stepId: string;
|
|
927
|
+
}
|
|
928
|
+
//#endregion
|
|
929
|
+
//#region src/stacks/tanstack/project-auth.d.ts
|
|
930
|
+
type ProjectSecretResolver = () => string | undefined | Promise<string | undefined>;
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region src/stacks/tanstack/steps.d.ts
|
|
933
|
+
interface StepsHandlerOptions {
|
|
934
|
+
/** Route parameter carrying the workflow ID. @default "workflowId" */
|
|
935
|
+
workflowIdParam?: string;
|
|
936
|
+
/** @default Resolves `LOVABLE_WORKFLOWS_KEY` from the server runtime. */
|
|
937
|
+
getProjectSecret?: ProjectSecretResolver;
|
|
938
|
+
}
|
|
939
|
+
interface RouteCtx {
|
|
940
|
+
request: Request;
|
|
941
|
+
params?: Record<string, string | undefined>;
|
|
942
|
+
}
|
|
943
|
+
type StepsHandler = (ctx: RouteCtx) => Promise<Response>;
|
|
944
|
+
interface StepsRequestBase {
|
|
945
|
+
workflowVersion?: string;
|
|
946
|
+
input?: unknown;
|
|
947
|
+
memo?: MemoEntry[];
|
|
948
|
+
runId?: string;
|
|
949
|
+
inputHash?: string;
|
|
950
|
+
}
|
|
951
|
+
type StepsRequest = StepsRequestBase & ({
|
|
952
|
+
action?: "advance";
|
|
953
|
+
step?: never;
|
|
954
|
+
} | {
|
|
955
|
+
action: "execute";
|
|
956
|
+
step: StepReference;
|
|
957
|
+
});
|
|
958
|
+
type StepsDisposition = "advanced" | "external" | "fork" | "waiting" | "completed" | "failed";
|
|
959
|
+
interface StepsResponseBase {
|
|
960
|
+
workflowVersion: string;
|
|
961
|
+
runId: string;
|
|
962
|
+
inputHash: string;
|
|
963
|
+
memoDelta: MemoEntry[];
|
|
964
|
+
next: NextStep[];
|
|
965
|
+
executed?: StepResult<"step">;
|
|
966
|
+
emitted?: {
|
|
967
|
+
name: string;
|
|
968
|
+
value: Record<string, unknown>;
|
|
147
969
|
}[];
|
|
148
|
-
|
|
970
|
+
output?: unknown;
|
|
971
|
+
error?: string;
|
|
149
972
|
}
|
|
150
|
-
|
|
973
|
+
type StepsResponse = StepsResponseBase & ({
|
|
974
|
+
disposition: Exclude<StepsDisposition, "external">;
|
|
975
|
+
external?: never;
|
|
976
|
+
} | ExternalStep);
|
|
977
|
+
declare function createStepsHandler(collection: WorkflowCollection, options?: StepsHandlerOptions): StepsHandler;
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region src/stacks/tanstack/sse.d.ts
|
|
980
|
+
/**
|
|
981
|
+
* Encode a workflow event stream as `text/event-stream`. Each event keeps its
|
|
982
|
+
* engine `type` as the SSE event name and its whole JSON as the data line.
|
|
983
|
+
*/
|
|
984
|
+
declare function toServerSentEventsResponse(events: AsyncIterable<WorkflowEvent>): Response;
|
|
151
985
|
//#endregion
|
|
152
|
-
export { type AnyWorkflowDefinition, type Cadence, type Ctx, type OverlapPolicy, type ResolvedSchedule, type ResolvedTrigger, type ScheduleDefinition, type
|
|
986
|
+
export { type AnyWorkflowDefinition, type ApproveOptions, type Cadence, type Ctx, type ExternalOperation, type ExternalStep, type LlmRequest, type LlmStep, type LlmStepOptions, type MemoEntry, type NextStep, type OverlapPolicy, type ReplayOutcome, type ResolvedSchedule, type ResolvedTrigger, type ScheduleDefinition, type StepContext, type StepIntent, type StepKind, type StepOptions, type StepReference, type StepResult, type StepsDisposition, type StepsHandler, type StepsHandlerOptions, type StepsRequest, type StepsResponse, type TanStackWorkflowHandler, type TanStackWorkflowHandlerOptions, type TriggerDefinition, type WaitForEventOptions, type Weekday, type WorkflowBranchMetadata, type WorkflowCollection, type WorkflowDefinition, type WorkflowInput, type WorkflowManifest, type WorkflowOperationMetadata, type WorkflowOutput, type WorkflowState, type WorkflowStepGroup, type WorkflowStepMetadata, type WorkflowsDefinition, createMiddleware, createStepsHandler, createTanStackWorkflowHandler, createWorkflow, daily, defineSchedule, generateManifests, hourly, registerWorkflows, toServerSentEventsResponse, weekly };
|