You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
Copy file name to clipboardExpand all lines: docs/content/docs/api-reference/workflow-ai/durable-agent.mdx
+5-17Lines changed: 5 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,6 @@ The `DurableAgent` class enables you to create AI-powered agents that can mainta
17
17
18
18
Tool calls can be implemented as workflow steps for automatic retries, or as regular workflow-level logic utilizing core library features such as [`sleep()`](/docs/api-reference/workflow/sleep) and [Hooks](/docs/foundations/hooks).
19
19
20
-
{/* @skip-typecheck - uses DurableAgentOptions properties not yet in published dist types */}
@@ -814,8 +804,6 @@ async function agentWithContext(userId: string) {
814
804
815
805
Use `collectUIMessages` to accumulate `UIMessage[]` during streaming. This is useful when you need to persist the conversation without re-reading the run's output stream:
816
806
817
-
{/* @skip-typecheck - uses collectUIMessages/uiMessages not yet in published dist types */}
818
-
819
807
```typescript lineNumbers
820
808
import { DurableAgent } from"@workflow/ai/agent";
821
809
import { getWritable } from"workflow";
@@ -858,8 +846,6 @@ The `uiMessages` property is only available when `collectUIMessages` is set to `
858
846
859
847
`stream()` returns structured tool activity you can inspect programmatically. Compare `toolCalls` with `toolResults` to find unresolved tool calls that need client-side handling:
860
848
861
-
{/* @skip-typecheck - uses toolCalls/toolResults not yet in published dist types */}
862
-
863
849
```typescript lineNumbers
864
850
import { DurableAgent } from"@workflow/ai/agent";
865
851
import { getWritable } from"workflow";
@@ -915,9 +901,11 @@ async function agentWithToolInspection(userMessage: string) {
915
901
916
902
### Aborting Long-Running Streams
917
903
918
-
Use `timeout` to abort a stream automatically after a fixed duration. If both `timeout` and `abortSignal` are provided, whichever triggers first will abort the operation:
904
+
Use `timeout` to abort a stream automatically after a fixed duration:
919
905
920
-
{/* @skip-typecheck - uses DurableAgentStreamOptions.timeout not yet in published dist types */}
906
+
<Callouttype="warn">
907
+
`abortSignal` is not yet supported and will be available in a future release. Use `timeout` for now.
If your Next.js app lives in a subdirectory such as `apps/web` and your workflows import code from sibling workspace packages, set `outputFileTracingRoot`to the workspace root. `withWorkflow()` uses this value as the builder project root so workflow transforms can resolve workspace module specifiers correctly.
32
+
By default, Next.js detects the correct workspace root automatically. If your Next.js app lives in a subdirectory such as `apps/web` and workspace resolution is not working correctly, you can set `outputFileTracingRoot` as a workaround:
|`workflows.local.port`|`number`| — | Overrides the `PORT` environment variable for local development. Has no effect when deployed to Vercel. |
74
74
75
75
<Callouttype="info">
76
-
These options only affect local development. When deployed to Vercel, the runtime ignores `local` settings and uses the Vercel world automatically.
76
+
The `workflows.local` options only affect local development. When deployed to Vercel, the runtime ignores `local` settings and uses the Vercel world automatically.
Copy file name to clipboardExpand all lines: docs/content/docs/getting-started/astro.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,6 +235,23 @@ npx astro add vercel
235
235
236
236
Additionally, check the [Deploying](/docs/deploying) section to learn how your workflows can be deployed elsewhere.
237
237
238
+
## Troubleshooting
239
+
240
+
### `start()` says it received an invalid workflow function
241
+
242
+
If you see this error:
243
+
244
+
```
245
+
'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.
246
+
```
247
+
248
+
Check both of these first:
249
+
250
+
1. The workflow function includes `"use workflow"`.
251
+
2. Your `astro.config.mjs` includes the `workflow()` integration.
252
+
253
+
See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function) for full examples and fixes.
254
+
238
255
## Next Steps
239
256
240
257
* Learn more about the [Foundations](/docs/foundations).
Copy file name to clipboardExpand all lines: docs/content/docs/getting-started/express.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,6 +262,23 @@ Workflow DevKit apps currently work best when deployed to [Vercel](https://verce
262
262
263
263
Check the [Deploying](/docs/deploying) section to learn how your workflows can be deployed elsewhere.
264
264
265
+
## Troubleshooting
266
+
267
+
### `start()` says it received an invalid workflow function
268
+
269
+
If you see this error:
270
+
271
+
```
272
+
'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.
273
+
```
274
+
275
+
Check both of these first:
276
+
277
+
1. The workflow function includes `"use workflow"`.
278
+
2. Your Nitro config includes the `workflow/nitro` module.
279
+
280
+
See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function) for full examples and fixes.
281
+
265
282
## Next Steps
266
283
267
284
- Learn more about the [Foundations](/docs/foundations).
Copy file name to clipboardExpand all lines: docs/content/docs/getting-started/fastify.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,6 +249,23 @@ Workflow DevKit apps currently work best when deployed to [Vercel](https://verce
249
249
250
250
Check the [Deploying](/docs/deploying) section to learn how your workflows can be deployed elsewhere.
251
251
252
+
## Troubleshooting
253
+
254
+
### `start()` says it received an invalid workflow function
255
+
256
+
If you see this error:
257
+
258
+
```
259
+
'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.
260
+
```
261
+
262
+
Check both of these first:
263
+
264
+
1. The workflow function includes `"use workflow"`.
265
+
2. Your Nitro config includes the `workflow/nitro` module.
266
+
267
+
See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function) for full examples and fixes.
268
+
252
269
## Next Steps
253
270
254
271
- Learn more about the [Foundations](/docs/foundations).
Copy file name to clipboardExpand all lines: docs/content/docs/getting-started/hono.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,6 +244,23 @@ Workflow DevKit apps currently work best when deployed to [Vercel](https://verce
244
244
245
245
Check the [Deploying](/docs/deploying) section to learn how your workflows can be deployed elsewhere.
246
246
247
+
## Troubleshooting
248
+
249
+
### `start()` says it received an invalid workflow function
250
+
251
+
If you see this error:
252
+
253
+
```
254
+
'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.
255
+
```
256
+
257
+
Check both of these first:
258
+
259
+
1. The workflow function includes `"use workflow"`.
260
+
2. Your Nitro config includes the `workflow/nitro` module.
261
+
262
+
See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function) for full examples and fixes.
263
+
247
264
## Next Steps
248
265
249
266
- Learn more about the [Foundations](/docs/foundations).
Copy file name to clipboardExpand all lines: docs/content/docs/getting-started/nestjs.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,6 +392,23 @@ Workflow DevKit apps currently work best when deployed to [Vercel](https://verce
392
392
393
393
Check the [Deploying](/docs/deploying) section to learn how your workflows can be deployed elsewhere.
394
394
395
+
## Troubleshooting
396
+
397
+
### `start()` says it received an invalid workflow function
398
+
399
+
If you see this error:
400
+
401
+
```
402
+
'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.
403
+
```
404
+
405
+
Check both of these first:
406
+
407
+
1. The workflow function includes `"use workflow"`.
408
+
2. Your NestJS app imports and registers the `WorkflowModule`.
409
+
410
+
See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function) for full examples and fixes.
411
+
395
412
## Next Steps
396
413
397
414
- Learn more about the [Foundations](/docs/foundations).
If your Next.js app lives inside a monorepo and your workflows import code from sibling workspace packages, set `outputFileTracingRoot` to the workspace root. See [`withWorkflow()`](/docs/api-reference/workflow-next/with-workflow#monorepos-and-workspace-imports) for the full example.
53
53
</Callout>
54
54
55
-
<Callouttype="info">
56
-
You can pass a second argument to `withWorkflow()` to control local development behavior, such as enabling lazy workflow discovery or overriding the local port. See [`withWorkflow()` Options](/docs/api-reference/workflow-next/with-workflow#options) for details.
0 commit comments