Skip to content

feat(core): edit-based workflow generation and stronger validator typing - #192

Merged
isaacwasserman merged 3 commits into
mainfrom
workflow-edit-tools
Sep 24, 2026
Merged

isaacwasserman merged 3 commits into
mainfrom
workflow-edit-tools

Conversation

@isaacwasserman

Copy link
Copy Markdown
Owner

Workflow generation now keeps a draft that the agent changes with write-workflow, read-workflow (JMESPath), edit-workflow (JSON Patch), and submit-workflow, instead of resending the full definition on each attempt; write and edit return diagnostics without failing, accept submitIfValid, treat replace on a missing field as add, default to the caller's required output schema, repair JSON-string arguments, and mark the instructions as an Anthropic cache breakpoint. switch-case steps now output their selected branch's value, and the validator types loop accumulators from the body output, reports unknown JMESPath functions, and handles unions, tuples, empty arrays, and disjoint types in inference and subset checks. The workflow definition schema builds about twice as fast because the step-type union is now one type.or() call. The e2e generation test now uses @ai-sdk/openai-compatible (so reasoning is parsed), logs tool calls, arguments, and token usage per scenario, and accepts OPENROUTER_REASONING; step-end diagnostics include each tool call's input, status, errors, and reasoning text.

🤖 Generated with Claude Code

isaacwasserman and others added 2 commits September 23, 2026 14:33
Workflow generation now keeps a draft that the agent writes once and then
changes with JSON Patch edits, instead of resubmitting the full definition
on each attempt. write-workflow and edit-workflow return validation
diagnostics without failing the tool call; submit-workflow runs the final
validation.

Also:
- switch-case steps output the value returned by the selected branch, and
  the validator types that output as the union of the branch outputs
- field access on a union no longer warns when every member has the field
- step-end diagnostics include each step's tool calls and reasoning text
- the e2e generation test uses @ai-sdk/openai-compatible so reasoning is
  parsed, and logs each scenario's tool calls

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ma build time

- write-workflow and edit-workflow accept submitIfValid, and edit results
  include the changed workflow; JSON Patch `replace` on a missing field adds it
- the required output schema is used when a draft declares none
- tool calls with JSON-string object/array arguments are repaired
- instructions are marked as an Anthropic cache breakpoint; step-end events
  record each tool call's input and, for failed calls, its error
- the validator reports unknown JMESPath functions, types loop accumulators
  from the body output, and handles unions, tuples, empty arrays, and
  disjoint types in type inference and subset checks
- the step-type union is built with one type.or() call, which halves schema
  build time
- the e2e generation test logs tool calls, arguments, and token usage per
  scenario, and accepts OPENROUTER_REASONING

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
remoraflow Ready Ready Preview Sep 24, 2026 2:27pm UTC

@isaacwasserman
isaacwasserman merged commit 8c82c1c into main Sep 24, 2026
13 checks passed

This branch was successfully deployed

1 active deployment
Preview — 213efb47 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant