@lovable.dev/sdk 1.4.0 → 1.6.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 CHANGED
@@ -53,6 +53,26 @@ const published = await client.waitForProjectPublished(project.id);
53
53
  console.log(published.url); // Live public URL
54
54
  ```
55
55
 
56
+ ### Code-first workflows
57
+
58
+ Use the `workflows` subpath to define compute-only durable workflows for the Cloudflare runtime:
59
+
60
+ ```typescript
61
+ import { defineWorkflow, toWorker } from "@lovable.dev/sdk/workflows";
62
+
63
+ const workflow = defineWorkflow<{ message: string }, { message: string; runId: string }>(
64
+ "project-showcase",
65
+ async (ctx) => {
66
+ const message = await ctx.step.run("normalize", () => ctx.input.message.trim());
67
+ return { message, runId: await ctx.uuid("run") };
68
+ },
69
+ );
70
+
71
+ export default toWorker(workflow);
72
+ ```
73
+
74
+ Bundle the static ESM module and register it through the workflow service. Connector and internal-service access remain disabled until workflow workload identity and platform egress are available.
75
+
56
76
  ### Remixing a project at a specific message
57
77
 
58
78
  ```typescript
@@ -162,7 +182,6 @@ Send a chat message to a project's AI agent.
162
182
  Options:
163
183
 
164
184
  - `message` (required): The message to send
165
- - `variantId` (optional): Variant ID from `createVariant()`. Omit to send the message to the project's main agent
166
185
  - `files` (optional): Array of files to attach (browser `File` objects or `FileInput` objects)
167
186
  - `continuation` (optional): Override prompt cache continuation behavior (`"force"` | `"fresh_build"` | `"allow_expired_cache"`). API-key auth only. See [Continuation override](#continuation-override)
168
187
 
@@ -187,7 +206,7 @@ Options:
187
206
 
188
207
  Returns:
189
208
 
190
- - `variant_id` (string): The variant ID to pass to `chat()`
209
+ - `variant_id` (string): The variant's identifier
191
210
  - `label` (string): The variant's display name
192
211
  - `branch` (string): The git branch attached to the variant
193
212
  - `thread_id` (string): The trajectory thread driving the variant