Repository navigation
Commit 7074816
docs(relayflows): define the agent's CLI inline in the intro example
The intro's 'A whole flow' example called f.agent('greeter', {...}) /
had an agent step named greeter without ever showing which CLI or
model it actually runs on, which read as if 'greeter' had to be
declared somewhere else.
Fixed by showing the real, verified mechanism for each dialect:
- YAML: AgentStepSpec has its own cli?/model? fields (packages/sdk/src/spec.ts
lines 184/191) — added cli: claude / model: claude-sonnet-4-6 directly
on the greeter step. Confirmed real via packages/sdk/src/preflight.ts's
CLI resolution order (step > named > flow > project).
- TypeScript: Ctx.agent's AgentOptions is only { task, workspace? }
(packages/surface/src/context.ts) — there is no cli/model field to add.
What actually happens, per packages/sdk/src/authored-flow-executor.ts's
comments ('The kernel never resolves a cli on its own... searching for
the nearest flows.json from flowPath'), is that CLI/model resolve from
the project's flows.json. Added that file's real shape
({ cli, models }, validated in packages/sdk/src/cli/check.ts) and the
real refusal code (agent_cli_unresolved) it produces when missing.
No fabricated TypeScript API added — verified both mechanisms by reading
the actual source before writing the docs.
Verified: cd web && npx tsc --noEmit -p . -> exit 0
cd web && npx vitest run -> 11 files, 32 passed
cd web && npm run build -> exit 0
grep against .next/server/app/docs/relayflows/introduction.html
confirms 'flows.json', 'claude-sonnet-4-6', and 'agent_cli_unresolved'
all render on the built page.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 2352509 commit 7074816
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
0 commit comments