feat(core): edit-based workflow generation and stronger validator typing - #192
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workflow generation now keeps a draft that the agent changes with
write-workflow,read-workflow(JMESPath),edit-workflow(JSON Patch), andsubmit-workflow, instead of resending the full definition on each attempt; write and edit return diagnostics without failing, acceptsubmitIfValid, treatreplaceon a missing field asadd, default to the caller's required output schema, repair JSON-string arguments, and mark the instructions as an Anthropic cache breakpoint.switch-casesteps 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 onetype.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 acceptsOPENROUTER_REASONING;step-enddiagnostics include each tool call's input, status, errors, and reasoning text.🤖 Generated with Claude Code