feat: introduces "Sub-lobsters": nested lobster workflows with optional loop#20
Open
ggondim wants to merge 7 commits intoopenclaw:mainfrom
Open
feat: introduces "Sub-lobsters": nested lobster workflows with optional loop#20ggondim wants to merge 7 commits intoopenclaw:mainfrom
ggondim wants to merge 7 commits intoopenclaw:mainfrom
Conversation
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
Add `lobster` sub-workflow step with optional loop
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
docs: document `lobster` sub-workflow step in README
Collaborator
|
The primary upside of lobster is visibility and approval gating. Having an invisible sub loop running - especially compared to a Ralph loop concerns me. I don't think this is the intended direction for lobster. |
Author
|
@vignesh07 Should Lobster be so opinionated and make the experience with deterministic workflows more challenging by imposing single-level-only workflows? The arguments to merge it:
I understand if this doesn’t align with the team’s vision. Please let me know, and I’ll create a custom plugin for myself. Thank you for your time. |
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.
🚀 Sub-workflow step support
lobster,args, andloopfields to theWorkflowSteptype, enabling steps to reference and run sub-workflows, pass arguments, and repeat execution with optional conditions. (src/workflows/file.tssrc/workflows/file.tsR19-R31)src/workflows/file.ts[1] [2]🔰 Validation improvements
lobstersteps require a non-empty file path and that step IDs are unique. (src/workflows/file.tssrc/workflows/file.tsR111-L105)📝 Documentation updates
README.md:Step fields
id$id.stdoutor$id.json.commandlobster.lobster.lobsterfile to run as a sub-workflow (resolved relative to the parent workflow). Mutually exclusive withcommand.args${arg}and$stepId.stdout/$stepId.jsontemplate syntax. Only valid whenlobsteris set.looplobsteris set.loop.maxIterationsloopis set)loop.conditionLOBSTER_LOOP_STDOUT,LOBSTER_LOOP_JSON, andLOBSTER_LOOP_ITERATIONas environment variables.stdinapprovalrequiredto insert an approval gate before the step runs.conditionSub-workflow step example
Use the
lobsterfield to embed another.lobsterfile as a step in your workflow, optionally passing arguments and looping until a condition is met:The sub-workflow's last step result (stdout/json) is stored as the step result and is accessible via
$process.stdout/$process.jsonin subsequent steps.134 changes: 129 additions & 5 deletions134
src/workflows/file.ts
✅ Testing
test/lobster_sub_step.test.tstest/lobster_sub_step.test.tsR1-R186)