feat: structured input requests, step flow control, and error recovery#39
feat: structured input requests, step flow control, and error recovery#39miguelbranco80 wants to merge 13 commits intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84da0b2900
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd0f37e52e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ef7170124
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26e79acd8e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 650e4ca515
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d976c94e8a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (step.input && (!step.input.responseSchema || typeof step.input.responseSchema !== 'object')) { | ||
| throw new Error(`Workflow step ${step.id} input.responseSchema must be an object`); |
There was a problem hiding this comment.
Allow boolean schemas in workflow input steps
true and false are valid JSON Schema documents, but this guard rejects every non-object schema up front. That means a workflow author cannot use permissive/deny-all input.responseSchema values even though the resume-time validator already compiles schemas directly and the rest of the new input machinery handles boolean schemas.
Useful? React with 👍 / 👎.
| haltType: 'input_request', | ||
| inputSchema: inputRequest.responseSchema, | ||
| prompt: inputRequest.prompt, | ||
| createdAt: new Date().toISOString(), |
There was a problem hiding this comment.
Validate custom input_request schemas before issuing tokens
For registry/custom pipeline commands that halt with type: 'input_request', this path persists the pause and returns needs_input without ever compiling responseSchema. If a plugin emits an Ajv-invalid schema such as {"type":"wat"}, the initial run succeeds but every later resume fails in validatePipelineInputResponse(), leaving callers with an unusable resume token.
Useful? React with 👍 / 👎.
Implements #38
This PR adds the Lobster-side changes from the design doc:
• input: step type with needs_input pause/resume and schema validation
• $step.response / $step.subject deep field access
• Extended when conditions: comparisons, negation, AND/OR
• next: step flow control with max_iterations loop guard
• retry , retry_delay , on_error for step-level error recovery
• SDK updated to recognize input_request halts and resume({ response })
All changes are additive. Existing workflows, tokens, and conditionals are unchanged.