@openclaw/lobster 2026.9.3 → 2026.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/activity.svg +4 -0
- package/assets/icon.png +0 -0
- package/dist/index.js +39 -10
- package/node_modules/@clawdbot/lobster/README.md +112 -1
- package/node_modules/@clawdbot/lobster/bin/clawd.invoke.js +13 -7
- package/node_modules/@clawdbot/lobster/bin/lobster.js +7 -7
- package/node_modules/@clawdbot/lobster/bin/openclaw.invoke.js +16 -10
- package/node_modules/@clawdbot/lobster/dist/src/abortable_process.js +297 -0
- package/node_modules/@clawdbot/lobster/dist/src/abortable_process.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/src/cli.js +96 -248
- package/node_modules/@clawdbot/lobster/dist/src/cli.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/commands_list.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/registry.js +2 -0
- package/node_modules/@clawdbot/lobster/dist/src/commands/registry.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/approve.js +2 -0
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/approve.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/ask.js +3 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/ask.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/dedupe.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/diff_last.js +6 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/diff_last.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/email_triage.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/exec.js +30 -34
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/exec.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/gog_gmail_search.js +12 -25
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/gog_gmail_search.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/gog_gmail_send.js +19 -25
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/gog_gmail_send.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/group_by.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/head.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/json.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/llm_invoke.js +596 -42
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/llm_invoke.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/map.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/openclaw_agent.js +139 -0
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/openclaw_agent.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/openclaw_invoke.js +20 -2
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/openclaw_invoke.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/pick.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/sort.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/state.js +48 -20
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/state.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/table.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/template.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/stdlib/where.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/workflows/workflows_list.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/commands/workflows/workflows_run.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/core/cost_tracker.js +45 -3
- package/node_modules/@clawdbot/lobster/dist/src/core/cost_tracker.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/core/filters.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/core/retry.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/core/tool_runtime.js +147 -21
- package/node_modules/@clawdbot/lobster/dist/src/core/tool_runtime.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/input_request.js +4 -2
- package/node_modules/@clawdbot/lobster/dist/src/input_request.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/parser.js +4 -3
- package/node_modules/@clawdbot/lobster/dist/src/parser.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/pipeline_resume_state.js +241 -74
- package/node_modules/@clawdbot/lobster/dist/src/pipeline_resume_state.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/read_line.js +52 -7
- package/node_modules/@clawdbot/lobster/dist/src/read_line.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/read_response_text.js +86 -0
- package/node_modules/@clawdbot/lobster/dist/src/read_response_text.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/src/recipes/github/pr-monitor.js +4 -2
- package/node_modules/@clawdbot/lobster/dist/src/recipes/github/pr-monitor.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/recipes/github/stages/pr-view.js +20 -34
- package/node_modules/@clawdbot/lobster/dist/src/recipes/github/stages/pr-view.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/recipes/registry.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/renderers/json.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/resume.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/runtime.js +187 -17
- package/node_modules/@clawdbot/lobster/dist/src/runtime.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/Lobster.js +10 -2
- package/node_modules/@clawdbot/lobster/dist/src/sdk/Lobster.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/approve.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/diff.js +13 -82
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/diff.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/exec.js +22 -32
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/exec.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/state.js +9 -101
- package/node_modules/@clawdbot/lobster/dist/src/sdk/primitives/state.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/runtime.js +2 -1
- package/node_modules/@clawdbot/lobster/dist/src/sdk/runtime.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/shell.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/state/store.js +619 -19
- package/node_modules/@clawdbot/lobster/dist/src/state/store.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/token.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/validation.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/workflows/file.js +963 -283
- package/node_modules/@clawdbot/lobster/dist/src/workflows/file.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/workflows/github_pr_monitor.js +27 -28
- package/node_modules/@clawdbot/lobster/dist/src/workflows/github_pr_monitor.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/workflows/graph.js +9 -2
- package/node_modules/@clawdbot/lobster/dist/src/workflows/graph.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/src/workflows/registry.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/approval_id.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/approve_preview.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/bin_smoke.test.js +25 -0
- package/node_modules/@clawdbot/lobster/dist/test/bin_smoke.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/cancellation.test.js +5170 -0
- package/node_modules/@clawdbot/lobster/dist/test/cancellation.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/clawd_invoke.test.js +22 -0
- package/node_modules/@clawdbot/lobster/dist/test/clawd_invoke.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/clawd_invoke_legacy.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/cli_run_file_args_json.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/commands_list.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/condition_comparison.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/core_tool_runtime.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/cost_tracker.test.js +1733 -1
- package/node_modules/@clawdbot/lobster/dist/test/cost_tracker.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/dedupe.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/diff_last.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/doctor.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/dry_run.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/email_triage.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/exec_stdin.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/for_each.test.js +254 -0
- package/node_modules/@clawdbot/lobster/dist/test/for_each.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/github_pr_notify_format.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/github_pr_summary.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/github_pr_view.test.js +176 -0
- package/node_modules/@clawdbot/lobster/dist/test/github_pr_view.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/gog_gmail_send.test.js +100 -0
- package/node_modules/@clawdbot/lobster/dist/test/gog_gmail_send.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/group_by.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/helpers/wait_for_pid.js +19 -0
- package/node_modules/@clawdbot/lobster/dist/test/helpers/wait_for_pid.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/http_response_body_cap.test.js +318 -0
- package/node_modules/@clawdbot/lobster/dist/test/http_response_body_cap.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/llm_invoke.test.js +946 -1
- package/node_modules/@clawdbot/lobster/dist/test/llm_invoke.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/llm_task_invoke.test.js +103 -0
- package/node_modules/@clawdbot/lobster/dist/test/llm_task_invoke.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/map.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/multi_approval_resume.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/on_error.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/openclaw_agent.test.js +169 -0
- package/node_modules/@clawdbot/lobster/dist/test/openclaw_agent.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/openclaw_dispatch_retry.test.js +96 -0
- package/node_modules/@clawdbot/lobster/dist/test/openclaw_dispatch_retry.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/openclaw_invoke_alias.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/parallel.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/parser.test.js +57 -0
- package/node_modules/@clawdbot/lobster/dist/test/parser.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/process_output_limit.test.js +173 -0
- package/node_modules/@clawdbot/lobster/dist/test/process_output_limit.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/read_line.test.js +54 -0
- package/node_modules/@clawdbot/lobster/dist/test/read_line.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/release_changelog.test.js +39 -0
- package/node_modules/@clawdbot/lobster/dist/test/release_changelog.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/request_input.test.js +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/request_input.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/resume.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/sdk_exec.test.js +201 -0
- package/node_modules/@clawdbot/lobster/dist/test/sdk_exec.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/sdk_lobster.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/shell.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/sort.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/state.test.js +584 -1
- package/node_modules/@clawdbot/lobster/dist/test/state.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/step_retry.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/step_stdin_epipe.test.js +44 -0
- package/node_modules/@clawdbot/lobster/dist/test/step_stdin_epipe.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/step_timeout.test.js +67 -1
- package/node_modules/@clawdbot/lobster/dist/test/step_timeout.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/template.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/template_filters.test.js +37 -0
- package/node_modules/@clawdbot/lobster/dist/test/template_filters.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/tool_envelope_version.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/tool_mode.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/validation.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/where.test.js +94 -0
- package/node_modules/@clawdbot/lobster/dist/test/where.test.js.map +1 -0
- package/node_modules/@clawdbot/lobster/dist/test/workflow_args_env.test.js +5 -3
- package/node_modules/@clawdbot/lobster/dist/test/workflow_args_env.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/workflow_composition.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/workflow_file.test.js +647 -1
- package/node_modules/@clawdbot/lobster/dist/test/workflow_file.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/workflow_graph.test.js +12 -2
- package/node_modules/@clawdbot/lobster/dist/test/workflow_graph.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/dist/test/workflows.test.js.map +1 -1
- package/node_modules/@clawdbot/lobster/package.json +74 -73
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/openclaw.plugin.json +1 -0
- package/package.json +10 -7
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<path fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.2 10 A5.2 5.2 0 1 0 8.2 20.4 A5.2 5.2 0 0 0 8.2 10 Z M10.2 20 C14.5 20.8 19 18.6 22.3 13.2 C21 12.9 19.7 12.7 18.4 12.8 L17.5 14.6 L16 12.9 L14.3 14.5 L13.5 13 L11.5 14.2 Z" />
|
|
3
|
+
<path fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" transform="rotate(-10 8.6 11)" d="M5.6 12.2 C5.2 5.6 10.4 1.4 15.6 2 C19.4 2.6 21.8 5.2 22.6 8.2 C20.9 7.7 19.2 7.6 17.6 7.9 L16.9 6.3 L15.2 8.5 C13.6 9.4 12.2 10.9 11.6 12.4 L6.8 13 Z" />
|
|
4
|
+
</svg>
|
package/assets/icon.png
ADDED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -219,18 +219,18 @@ async function executeManagedLobsterFlow(params, flow) {
|
|
|
219
219
|
if (!envelope.ok) return {
|
|
220
220
|
ok: false,
|
|
221
221
|
flow,
|
|
222
|
-
mutation: params.taskFlow.fail(flowMutation),
|
|
222
|
+
mutation: await params.taskFlow.fail(flowMutation),
|
|
223
223
|
error: new Error(envelope.error.message)
|
|
224
224
|
};
|
|
225
225
|
return {
|
|
226
226
|
ok: true,
|
|
227
227
|
envelope,
|
|
228
228
|
flow,
|
|
229
|
-
mutation: envelope.status === "needs_approval" ? params.taskFlow.setWaiting({
|
|
229
|
+
mutation: envelope.status === "needs_approval" ? await params.taskFlow.setWaiting({
|
|
230
230
|
...flowMutation,
|
|
231
231
|
currentStep: params.waitingStep ?? "await_lobster_approval",
|
|
232
232
|
waitJson: buildApprovalWaitState(envelope)
|
|
233
|
-
}) : params.taskFlow.finish(flowMutation)
|
|
233
|
+
}) : await params.taskFlow.finish(flowMutation)
|
|
234
234
|
};
|
|
235
235
|
} catch (error) {
|
|
236
236
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
@@ -238,7 +238,7 @@ async function executeManagedLobsterFlow(params, flow) {
|
|
|
238
238
|
return {
|
|
239
239
|
ok: false,
|
|
240
240
|
flow,
|
|
241
|
-
mutation: params.taskFlow.fail({
|
|
241
|
+
mutation: await params.taskFlow.fail({
|
|
242
242
|
flowId: flow.flowId,
|
|
243
243
|
expectedRevision: flow.revision
|
|
244
244
|
}),
|
|
@@ -260,7 +260,7 @@ async function runManagedLobsterFlow(params) {
|
|
|
260
260
|
currentStep: params.currentStep ?? "run_lobster",
|
|
261
261
|
...params.stateJson !== void 0 ? { stateJson: params.stateJson } : {}
|
|
262
262
|
};
|
|
263
|
-
const flow =
|
|
263
|
+
const flow = await params.taskFlow.tryCreateManaged(createFlowParams);
|
|
264
264
|
if (!flow) return {
|
|
265
265
|
ok: false,
|
|
266
266
|
error: /* @__PURE__ */ new Error("TaskFlow persistence failed.")
|
|
@@ -268,7 +268,31 @@ async function runManagedLobsterFlow(params) {
|
|
|
268
268
|
return await executeManagedLobsterFlow(params, flow);
|
|
269
269
|
}
|
|
270
270
|
async function resumeManagedLobsterFlow(params) {
|
|
271
|
-
const
|
|
271
|
+
const saved = await params.taskFlow.get(params.flowId);
|
|
272
|
+
if (!saved || saved.syncMode !== "managed" || saved.endedAt !== void 0 || saved.cancelRequestedAt !== void 0 || saved.status !== "waiting" && saved.status !== "blocked") return {
|
|
273
|
+
ok: false,
|
|
274
|
+
error: /* @__PURE__ */ new Error("TaskFlow has no resumable Lobster checkpoint.")
|
|
275
|
+
};
|
|
276
|
+
const wait = saved.waitJson;
|
|
277
|
+
if (!wait || typeof wait !== "object" || Array.isArray(wait) || wait.kind !== "lobster_approval") return {
|
|
278
|
+
ok: false,
|
|
279
|
+
error: /* @__PURE__ */ new Error("TaskFlow is not waiting for Lobster approval.")
|
|
280
|
+
};
|
|
281
|
+
const token = typeof wait.resumeToken === "string" ? wait.resumeToken : void 0;
|
|
282
|
+
const approvalId = typeof wait.approvalId === "string" ? wait.approvalId : void 0;
|
|
283
|
+
if (!token && !approvalId || params.runnerParams.token !== void 0 && params.runnerParams.token.trim() !== token || params.runnerParams.approvalId !== void 0 && params.runnerParams.approvalId.trim() !== approvalId) return {
|
|
284
|
+
ok: false,
|
|
285
|
+
error: /* @__PURE__ */ new Error("Lobster checkpoint does not match the selected TaskFlow.")
|
|
286
|
+
};
|
|
287
|
+
const runnerParams = {
|
|
288
|
+
...params.runnerParams,
|
|
289
|
+
...params.runnerParams.token || params.runnerParams.approvalId ? {} : token ? { token } : { approvalId }
|
|
290
|
+
};
|
|
291
|
+
if (saved.revision !== params.expectedRevision) return {
|
|
292
|
+
ok: false,
|
|
293
|
+
error: /* @__PURE__ */ new Error("TaskFlow resume failed: revision_conflict")
|
|
294
|
+
};
|
|
295
|
+
const resumed = await params.taskFlow.resume({
|
|
272
296
|
flowId: params.flowId,
|
|
273
297
|
expectedRevision: params.expectedRevision,
|
|
274
298
|
status: "running",
|
|
@@ -279,7 +303,10 @@ async function resumeManagedLobsterFlow(params) {
|
|
|
279
303
|
mutation: resumed,
|
|
280
304
|
error: /* @__PURE__ */ new Error(`TaskFlow resume failed: ${resumed.code}`)
|
|
281
305
|
};
|
|
282
|
-
return await executeManagedLobsterFlow(
|
|
306
|
+
return await executeManagedLobsterFlow({
|
|
307
|
+
...params,
|
|
308
|
+
runnerParams
|
|
309
|
+
}, resumed.flow);
|
|
283
310
|
}
|
|
284
311
|
//#endregion
|
|
285
312
|
//#region extensions/lobster/src/lobster-tool.ts
|
|
@@ -350,7 +377,6 @@ function parseManagedFlowParams(action, params, runnerParams) {
|
|
|
350
377
|
if (!flowId) throw new Error("flowId required when using managed TaskFlow resume mode");
|
|
351
378
|
if (expectedRevision === void 0) throw new Error("flowExpectedRevision required when using managed TaskFlow resume mode");
|
|
352
379
|
const credentialParams = token ? { token: runnerParams.token ?? token } : approvalId ? { approvalId: runnerParams.approvalId ?? approvalId } : null;
|
|
353
|
-
if (!credentialParams) throw new Error("token or approvalId required when using managed TaskFlow resume mode");
|
|
354
380
|
if (approve === void 0) throw new Error("approve required when using managed TaskFlow resume mode");
|
|
355
381
|
return {
|
|
356
382
|
action,
|
|
@@ -397,7 +423,7 @@ function createLobsterTool(api, options) {
|
|
|
397
423
|
flowControllerId: Type.Optional(Type.String()),
|
|
398
424
|
flowGoal: Type.Optional(Type.String()),
|
|
399
425
|
flowStateJson: Type.Optional(Type.String()),
|
|
400
|
-
flowId: Type.Optional(Type.String()),
|
|
426
|
+
flowId: Type.Optional(Type.String({ description: "Managed flow to resume. Its saved approval checkpoint is used when token and approvalId are omitted." })),
|
|
401
427
|
flowExpectedRevision: optionalNonNegativeIntegerSchema(),
|
|
402
428
|
flowCurrentStep: Type.Optional(Type.String()),
|
|
403
429
|
flowWaitingStep: Type.Optional(Type.String())
|
|
@@ -459,7 +485,10 @@ var lobster_default = definePluginEntry({
|
|
|
459
485
|
register(api) {
|
|
460
486
|
api.registerTool(((ctx) => {
|
|
461
487
|
if (ctx.sandboxed) return null;
|
|
462
|
-
return createLobsterTool(api, { taskFlow: api.runtime
|
|
488
|
+
return createLobsterTool(api, { taskFlow: api.runtime && ctx.sessionKey ? {
|
|
489
|
+
...api.runtime.tasks.async.managedFlows.fromToolContext(ctx),
|
|
490
|
+
cancel: api.runtime.tasks.managedFlows.fromToolContext(ctx).cancel
|
|
491
|
+
} : void 0 });
|
|
463
492
|
}), { optional: true });
|
|
464
493
|
}
|
|
465
494
|
});
|
|
@@ -155,9 +155,43 @@ From this folder:
|
|
|
155
155
|
|
|
156
156
|
- `pnpm test` runs `tsc` and then executes tests against `dist/`.
|
|
157
157
|
- `bin/lobster.js` prefers the compiled entrypoint in `dist/` when present.
|
|
158
|
+
## Process output limits
|
|
159
|
+
|
|
160
|
+
Captured process stdout and stderr remain unlimited by default. Set
|
|
161
|
+
`LOBSTER_MAX_OUTPUT_BYTES` to a positive integer to opt into a byte limit **per
|
|
162
|
+
stream, per process**. Unset or empty means unlimited; zero, negative, fractional,
|
|
163
|
+
and non-numeric values are rejected before a process starts. This applies to
|
|
164
|
+
CLI `exec`, workflow shell steps, SDK `exec`/shell calls, GitHub recipes, and Gog
|
|
165
|
+
commands. The existing `openclaw.agent` 10 MiB limit remains in place; an opted-in
|
|
166
|
+
limit can lower it.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
LOBSTER_MAX_OUTPUT_BYTES=1048576 lobster run --mode tool 'exec my-command'
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Use workflow or step `env` to scope the limit:
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
steps:
|
|
176
|
+
- id: bounded
|
|
177
|
+
env:
|
|
178
|
+
LOBSTER_MAX_OUTPUT_BYTES: "1048576"
|
|
179
|
+
run: my-command
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
SDK callers set the same variable in `new Lobster({ env: { ...process.env,
|
|
183
|
+
LOBSTER_MAX_OUTPUT_BYTES: "1048576" } })`. Values exactly at the limit succeed;
|
|
184
|
+
overflow terminates the process tree and returns an error without partial
|
|
185
|
+
output. POSIX capped calls own a process group so background producers cannot
|
|
186
|
+
keep pipes open after overflow. Calls without an AbortSignal relay terminal
|
|
187
|
+
interrupts to that group and retain the host's existing signal handlers or
|
|
188
|
+
conventional interrupt exit status.
|
|
189
|
+
|
|
190
|
+
|
|
158
191
|
## Commands
|
|
159
192
|
|
|
160
193
|
- `exec`: run OS commands
|
|
194
|
+
- `exec --json <command...>`: parse subprocess stdout as JSON before the next stage
|
|
161
195
|
- `exec --stdin raw|json|jsonl`: feed pipeline input into subprocess stdin
|
|
162
196
|
- `where`, `pick`, `head`: data shaping
|
|
163
197
|
- `json`, `table`: renderers
|
|
@@ -167,6 +201,41 @@ From this folder:
|
|
|
167
201
|
|
|
168
202
|
- OpenClaw integration: ship as an optional OpenClaw plugin tool.
|
|
169
203
|
|
|
204
|
+
## SDK cancellation
|
|
205
|
+
|
|
206
|
+
Pass an `AbortSignal` to `new Lobster({ signal })` to cancel SDK `exec()` stages,
|
|
207
|
+
including `exec(command, { shell: true })`. The signal is retained by `clone()`
|
|
208
|
+
and forwarded when a pipeline resumes. Aborting terminates the running child
|
|
209
|
+
process tree before `run()` or `resume()` returns an error result containing the
|
|
210
|
+
abort reason. A signal that is already aborted prevents the command from starting.
|
|
211
|
+
|
|
212
|
+
```js
|
|
213
|
+
import { Lobster, exec } from '@clawdbot/lobster';
|
|
214
|
+
|
|
215
|
+
const controller = new AbortController();
|
|
216
|
+
const pending = new Lobster({ signal: controller.signal })
|
|
217
|
+
.pipe(exec('node long-task.js', { json: false }))
|
|
218
|
+
.run();
|
|
219
|
+
// When the host needs to stop the command:
|
|
220
|
+
controller.abort(new Error('Host cancelled the command'));
|
|
221
|
+
const result = await pending;
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Custom stages receive the signal as `ctx.signal` and must cooperate with it to
|
|
225
|
+
cancel their own work.
|
|
226
|
+
|
|
227
|
+
## GitHub recipe cancellation
|
|
228
|
+
|
|
229
|
+
The SDK GitHub recipes accept an `AbortSignal` in both
|
|
230
|
+
`prMonitor({ repo, pr, signal })` and `prMonitorNotify({ repo, pr, signal })`.
|
|
231
|
+
Aborting stops the running GitHub CLI child before the recipe returns an error
|
|
232
|
+
result containing the abort reason. A cancelled fetch does not update the saved
|
|
233
|
+
PR snapshot or emit a notification.
|
|
234
|
+
|
|
235
|
+
For a manually composed pipeline, pass the signal to
|
|
236
|
+
`new Lobster({ signal }).pipe(ghPrView({ repo, pr }))`. Custom stages receive
|
|
237
|
+
`ctx.signal` and must cooperate with it to cancel their own work.
|
|
238
|
+
|
|
170
239
|
## Workflow files
|
|
171
240
|
|
|
172
241
|
Lobster workflow files are meant to read like small scripts:
|
|
@@ -211,6 +280,7 @@ Notes:
|
|
|
211
280
|
- If you need a human checkpoint before an LLM call, use a dedicated `approval:` step in the workflow file rather than `approve` inside the nested pipeline.
|
|
212
281
|
- `cwd`, `env`, `stdin`, `when`, and `condition` work for both shell and pipeline steps.
|
|
213
282
|
- Use `retry`, `timeout_ms`, and `on_error` per step to control transient-failure behavior and recovery.
|
|
283
|
+
- On `for_each`, these policies cover the entire loop: each attempt gets one timeout budget (including batch pauses), and retry restarts at the first item. Previously completed children may run again, so only enable loop retries for work that is safe to repeat. A `cost_limit` stop or an attempted OpenClaw dispatch prevents retries; paid LLM usage is checked even when a later pipeline command fails. `on_error: continue` records `$loop.error` and proceeds to the next workflow step; `skip_rest` skips the remaining workflow steps.
|
|
214
284
|
- Approval steps can optionally enforce identity constraints:
|
|
215
285
|
- `approval.required_approver` (or `requiredApprover`) requires an exact approver id.
|
|
216
286
|
- `approval.require_different_approver` (or `requireDifferentApprover`) requires approver id to differ from initiator.
|
|
@@ -218,6 +288,10 @@ Notes:
|
|
|
218
288
|
- `LOBSTER_APPROVAL_INITIATED_BY` can provide a default initiator id at run time.
|
|
219
289
|
- `LOBSTER_APPROVAL_APPROVED_BY` is used at resume/approval time for identity checks.
|
|
220
290
|
|
|
291
|
+
### Retries after OpenClaw dispatch
|
|
292
|
+
|
|
293
|
+
`openclaw.invoke` (including `clawd.invoke`) and `openclaw.agent` suppress automatic workflow-step retries once dispatch is attempted. This applies to timeouts, HTTP or process failures, and errors in later commands of the same pipeline step, even when `retry.max` is greater than one. A failed local request cannot establish whether a remote action already completed. Read-only and dry-run requests use the same conservative rule: Lobster does not know the remote tool’s retry guarantees, and the [OpenClaw gateway currently ignores `dryRun`](https://docs.openclaw.ai/gateway/tools-invoke-http-api#request-body). The flag does not prevent tool execution. Check the remote outcome before manually running the step again. `llm.invoke` retains its existing retry policy.
|
|
294
|
+
|
|
221
295
|
### Command-level input requests
|
|
222
296
|
|
|
223
297
|
Pipeline commands can call `ctx.requestInput({ prompt, responseSchema, defaults, subject, suspendedState })` to pause in tool mode, workflows, or the SDK and resume the same command after a structured response. CLI/tool resume tokens store only a state key; the persisted state validates the suspended request metadata before returning the submitted response to the command. SDK same-command resumes store the command frame in the configured SDK state directory.
|
|
@@ -271,13 +345,28 @@ Built-in providers today:
|
|
|
271
345
|
- `pi` via `LOBSTER_PI_LLM_ADAPTER_URL` (typically supplied by the Pi extension)
|
|
272
346
|
- `http` via `LOBSTER_LLM_ADAPTER_URL`
|
|
273
347
|
|
|
348
|
+
A host embedding Lobster can supply its own adapters through `ctx.llmAdapters`. Step `timeout_ms` and workflow cancellation reach an adapter as `ctx.signal`: Lobster stops waiting as soon as that signal aborts, so the step fails or retries on time either way, but it cannot cancel work an adapter has already started. An injected adapter should observe `ctx.signal` and abort its own request — otherwise a timed-out step can leave a model call running, and billed, in the background.
|
|
349
|
+
|
|
274
350
|
Workflow `_meta.cost` and `cost_limit` use a static pricing table plus optional overrides from `LOBSTER_LLM_PRICING_JSON`, for example `{"my-model":{"input":1.0,"output":2.0}}` in USD per million tokens. Unknown or missing model IDs still record token counts with zero estimated cost, but Lobster warns on stderr so stale or missing pricing does not fail silently.
|
|
275
351
|
|
|
352
|
+
A cached or replayed answer is not billed again: a model call is counted once, in the run that made it, however many later steps re-emit its answer. This holds while the answer stays inside Lobster: through pipelines, renderers, projections, run state, `workflow:` steps and a resume. It does not survive a stage that hands the items to an external process and reads them back — `exec --stdin json --json ...` — because what comes back is whatever that process printed, and Lobster cannot tell a faithful copy of a replay from a fresh claim to have made the call. Such a step is billed as a call, which is what earlier versions did everywhere. A `workflow:` step counts what its sub-workflow spent, and a replay the sub-workflow returned is not billed a second time by the run that composed it. Spend also survives a pause — a workflow that stops at an approval or `input` gate keeps what it has recorded, so `_meta.cost` covers the whole run after a resume and `cost_limit` applies to the whole run rather than to the steps after the last gate.
|
|
353
|
+
|
|
276
354
|
`llm_task.invoke` remains available as a backward-compatible alias for the OpenClaw provider.
|
|
277
355
|
|
|
356
|
+
### Calling configured OpenClaw agents
|
|
357
|
+
|
|
358
|
+
Use `openclaw.agent` when a workflow needs a configured OpenClaw agent rather than a direct model call:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
openclaw.agent --agent ops --prompt 'Summarize these logs'
|
|
362
|
+
openclaw.agent --agent ops --session-key incident-42 --model openai/gpt-5.4 --prompt 'Continue the investigation'
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
The command delegates agent identity, model defaults and overrides, sessions, authentication, and execution to the installed `openclaw agent` CLI. It accepts `--agent`, `--session-key`, `--session-id`, `--model`, `--thinking`, `--timeout`, and `--local`, and returns OpenClaw's structured `--json` response. Pipeline input is appended to the prompt as labeled JSONL.
|
|
366
|
+
|
|
278
367
|
### `pipeline:` vs `run:` for LLM calls
|
|
279
368
|
|
|
280
|
-
- Use `pipeline:` for `llm.invoke
|
|
369
|
+
- Use `pipeline:` for `openclaw.agent`, `llm.invoke`, and `llm_task.invoke` (they are Lobster pipeline stages, not shell executables).
|
|
281
370
|
- Use `run:` only for real binaries in your shell (for example `openclaw.invoke`).
|
|
282
371
|
|
|
283
372
|
Example (`stdin` from a prior step is passed to the LLM as artifacts):
|
|
@@ -351,3 +440,25 @@ steps:
|
|
|
351
440
|
command: |
|
|
352
441
|
jq -n --arg text "$TEXT" '{"result": $text}'
|
|
353
442
|
```
|
|
443
|
+
|
|
444
|
+
## HTTP response limits
|
|
445
|
+
|
|
446
|
+
HTTP response bodies remain unlimited by default. Set
|
|
447
|
+
`LOBSTER_MAX_HTTP_RESPONSE_BYTES` to a positive integer to opt into a per-response
|
|
448
|
+
byte limit for `openclaw.invoke`/`clawd.invoke` and the built-in OpenClaw, HTTP,
|
|
449
|
+
and Pi `llm.invoke` adapters. Unset or empty means unlimited; invalid or non-positive
|
|
450
|
+
values fail before dispatch. Host-injected adapters own their transport limits.
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
LOBSTER_MAX_HTTP_RESPONSE_BYTES=1048576 lobster run --mode tool 'openclaw.invoke --tool example --action read'
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Workflow and step `env` can set the same variable. SDK integrations pass it in
|
|
457
|
+
their environment (`new Lobster({ env: { ...process.env,
|
|
458
|
+
LOBSTER_MAX_HTTP_RESPONSE_BYTES: "1048576" } })` or the tool-runtime context).
|
|
459
|
+
Responses exactly at the limit succeed. Oversized declared or streamed bodies
|
|
460
|
+
are cancelled and rejected before JSON parsing; no partial response is returned.
|
|
461
|
+
The limit counts bytes read from the response stream, including decompressed
|
|
462
|
+
content. A declared Content-Length over the limit is also rejected immediately.
|
|
463
|
+
Tool dispatch remains non-retryable after an overflow, as with other
|
|
464
|
+
post-dispatch errors; `llm.invoke` retains its existing retry policy.
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { spawnSync } from
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
4
6
|
|
|
5
7
|
function shellQuote(arg) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
if (/^[A-Za-z0-9_\-./:=@]+$/.test(arg)) return arg;
|
|
9
|
+
return `'${String(arg).replace(/'/g, `'\\''`)}'`;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
const argv = process.argv.slice(2);
|
|
11
|
-
const pipeline = [
|
|
13
|
+
const pipeline = ["clawd.invoke", ...argv.map(shellQuote)].join(" ");
|
|
14
|
+
const lobsterBin = join(dirname(fileURLToPath(import.meta.url)), "lobster.js");
|
|
12
15
|
|
|
13
|
-
const res = spawnSync(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
const res = spawnSync(process.execPath, [lobsterBin, pipeline], {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
env: process.env,
|
|
16
19
|
});
|
|
20
|
+
if (res.error) {
|
|
21
|
+
console.error(`clawd.invoke failed to spawn lobster: ${res.error.message}`);
|
|
22
|
+
}
|
|
17
23
|
|
|
18
24
|
process.exit(res.status ?? 1);
|
|
@@ -8,17 +8,17 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
8
8
|
const __dirname = dirname(__filename);
|
|
9
9
|
|
|
10
10
|
async function load() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const distEntry = join(__dirname, "../dist/src/cli.js");
|
|
12
|
+
if (existsSync(distEntry)) {
|
|
13
|
+
return import(pathToFileURL(distEntry).href);
|
|
14
|
+
}
|
|
15
|
+
const srcEntry = join(__dirname, "../src/cli.js");
|
|
16
|
+
return import(pathToFileURL(srcEntry).href);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const mod = await load();
|
|
20
20
|
if (typeof mod.runCli !== "function") {
|
|
21
|
-
|
|
21
|
+
throw new Error("lobster CLI entrypoint missing runCli()");
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
await mod.runCli(process.argv.slice(2));
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { spawnSync } from
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
4
6
|
|
|
5
7
|
function shellQuote(arg) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Conservative POSIX-ish quoting for embedding argv into a single pipeline string.
|
|
9
|
+
// Lobster's pipeline parser preserves quoted substrings.
|
|
10
|
+
if (/^[A-Za-z0-9_\-./:=@]+$/.test(arg)) return arg;
|
|
11
|
+
// single-quote, escaping embedded single quotes: ' -> '\''
|
|
12
|
+
return `'${String(arg).replace(/'/g, `'\\''`)}'`;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
const argv = process.argv.slice(2);
|
|
14
|
-
const pipeline = [
|
|
16
|
+
const pipeline = ["openclaw.invoke", ...argv.map(shellQuote)].join(" ");
|
|
17
|
+
const lobsterBin = join(dirname(fileURLToPath(import.meta.url)), "lobster.js");
|
|
15
18
|
|
|
16
|
-
const res = spawnSync(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const res = spawnSync(process.execPath, [lobsterBin, pipeline], {
|
|
20
|
+
stdio: "inherit",
|
|
21
|
+
env: process.env,
|
|
19
22
|
});
|
|
23
|
+
if (res.error) {
|
|
24
|
+
console.error(`openclaw.invoke failed to spawn lobster: ${res.error.message}`);
|
|
25
|
+
}
|
|
20
26
|
|
|
21
27
|
process.exit(res.status ?? 1);
|