Commit Graph

92 Commits

Author SHA1 Message Date
Peter Steinberger
e4514ecad5
style: format with oxfmt 2026-05-04 01:56:15 +01:00
Vincent Koc
0af9ff116f
fix(deps): update vulnerable parser dependencies 2026-04-30 14:58:13 -07:00
Vignesh Natarajan
a95f133c2e fix(workflows): support legacy resume key aliases cleanly (#4) (thanks @brownetw-ai) 2026-04-11 16:42:58 -07:00
Bruce
14e46b388c Fix resume state lookup for workflow key variants 2026-04-11 16:42:58 -07:00
Vignesh Natarajan
595f862d73 docs: document workflow retry feature (#84) (thanks @scottgl9) 2026-04-11 16:40:17 -07:00
scottgl
7d6ecec694 feat: step-level retry with configurable backoff
Adds retry field to workflow steps with exponential/fixed backoff,
jitter, and configurable max attempts. Retry delays are signal-aware
(abort cancels immediately). Abort errors never trigger retries.

- New src/core/retry.ts: withRetry utility with backoff calculation
- Step execution wrapped in retry loop when retry.max > 1
- Retry attempts logged to stderr as [RETRY] messages
- Dry-run renders retry config (attempts, backoff, base delay)
- Comprehensive validation for all retry fields
2026-04-11 16:40:17 -07:00
Vignesh Natarajan
04e01b5027
feat: add approval identity constraints for workflow gates 2026-04-11 16:07:27 -07:00
Vignesh Natarajan
6d397c51c1
test/docs: clarify llm_task workflow stdin usage 2026-04-11 16:02:30 -07:00
Vignesh Natarajan
7d6a22a0c3
feat: add workflow graph visualization command 2026-04-11 15:54:17 -07:00
Vignesh Natarajan
60c976571a
feat: add template filters for template command 2026-04-11 15:44:57 -07:00
Vignesh Natarajan
933fb49f6f
feat: add for_each workflow step type 2026-04-11 15:43:40 -07:00
Vignesh Natarajan
503a2f6053
feat: add parallel workflow step execution 2026-04-11 15:37:35 -07:00
Vignesh Natarajan
373c447e39
feat: add llm cost tracking and spending limits 2026-04-11 15:35:00 -07:00
Vignesh Natarajan
05e34d741f
feat: add comparison operators for workflow conditions 2026-04-11 15:33:39 -07:00
Vignesh Natarajan
425198e09d
test: add on_error workflow coverage 2026-04-11 15:32:52 -07:00
Vignesh Natarajan
47eb7e81b3
feat: add workflow composition and step timeout controls 2026-04-11 15:31:54 -07:00
Peter Steinberger
b9a1b1b2a5
docs: reorder 2026.4.6 release notes 2026-04-06 14:59:55 +01:00
Peter Steinberger
4bd02a21ae
ci: configure npm auth for release publish jobs 2026-04-06 14:53:17 +01:00
Mariano
cccbfad606
ci: fix lobster release changelog validation (#62) 2026-04-06 15:51:55 +02:00
Peter Steinberger
ee2dc74dd5
ci: pass npm token to release publish step 2026-04-06 14:50:48 +01:00
Peter Steinberger
68ce811f0a
ci: export release version for changelog validation 2026-04-06 14:48:08 +01:00
Mariano
0db6755ddc
chore: prepare 2026.4.6 release metadata (#61)
* chore: prepare 2026.4.6 release metadata

* docs: finalize 2026.4.6 release notes
2026-04-06 15:46:19 +02:00
Peter Steinberger
255d3cd56e
test: stream long workflow subjects in truncate test 2026-04-06 14:45:36 +01:00
Mariano
e1519f4926
feat: add workflow condition expressions (#60)
* feat: add workflow condition expressions

* fix: harden workflow condition evaluation
2026-04-06 15:44:53 +02:00
Peter Steinberger
d236381f0d
test: avoid oversized env in long subject resume test 2026-04-06 14:43:24 +01:00
Peter Steinberger
9d0fd5b1e0
test: avoid E2BIG in truncated subject resume test 2026-04-06 14:41:37 +01:00
Peter Steinberger
e38f53982a
chore: bump version to 2026.4.6 2026-04-06 14:35:02 +01:00
Mariano
8e66d155e4
feat: add structured input pauses (#59)
* feat: add structured input pauses

* fix: harden structured input resumes
2026-04-06 15:19:25 +02:00
Onur
a6789c50ff
CI: add npm release workflow (#58) 2026-04-06 15:05:23 +02:00
Mariano
b74d72c401
fix: harden dry-run follow-ups (#57) 2026-04-06 11:52:04 +02:00
Mariano
f6509a6639
fix(approval): prevent short approval ID remaps (#55)
* feat: add short approval IDs for chat-friendly resume

When a workflow or pipeline hits an approval gate in tool mode,
the response now includes an 'approvalId' (8-char hex string)
alongside the existing base64url resumeToken.

Consumers can resume using either:
  lobster resume --token <base64url>  (existing, still works)
  lobster resume --id <8-char-hex>    (new, chat-friendly)

This solves the problem of passing opaque 120+ char base64 tokens
through chat interfaces (Telegram, Discord, etc.) where they get
mangled, truncated, or are painful to copy/paste.

Implementation:
- generateApprovalId() produces 8 hex chars via crypto.randomBytes
- writeApprovalIndex() creates a small reverse-index file mapping
  approvalId → stateKey in the state directory
- resolveApprovalId() looks up the index to reconstruct the token
- Kind detection (workflow-file vs pipeline-resume) uses stateKey
  naming convention
- Index files are cleaned up after resume or cancellation

Fully backward-compatible: resumeToken is always present, approvalId
is additive. No breaking changes to the envelope schema.

5 new tests covering: ID presence, resume-by-ID, cancellation-by-ID,
invalid ID error, and backward compat with --token.

* fix: address review findings — orphan cleanup, multi-step gate, shared helper

Bug fixes:
- CLI multi-step pipeline now generates approvalId on second+ gates
  (was only done in tool_runtime path)
- --token resume now cleans up orphaned approval index files via
  cleanupApprovalIndexByStateKey (scans state dir for matching index)

Code quality:
- Extract kindFromStateKey() shared helper in resume.ts (was duplicated)
- Remove redundant dynamic import of encodeToken in tool_runtime.ts
- Sanitize approvalId in writeApprovalIndex (was only done in read/delete)

Tests:
- Add --token orphan cleanup test (verifies index gone after --token resume)
- Add double-resume test (second --id call returns clean 'not found' error)
- Total: 73/73 passing

* fix: clean up orphan approval index in tool_runtime --token path

Bug: resumeToolRequest cleaned up approval index when using --id
(via deleteApprovalId) but NOT when using --token. The CLI path
had this fix but the API path didn't — orphan index files would
accumulate in ~/.lobster/state/.

Also aligned --id/--token priority: approvalId now wins in both
CLI and API paths (was inconsistent — CLI checked approvalId first,
API checked token first via 'approvalId && !token').

73/73 tests passing.

* fix: defer approval index cleanup until after successful resume

Addresses Codex review feedback on PR #48. Previously, the approval
ID index was deleted before executing the resumed pipeline/workflow.
If execution failed with a transient error, the state was still
resumable by --token but the --id alias was already gone.

Now: index cleanup happens after successful completion or explicit
denial. On runtime_error, the index is preserved so the user can
retry with the same --id.

* fix(approval): prevent short ID remaps

* fix(approval): clean up state on alias allocation failure

---------

Co-authored-by: Sascha Kuhlmann <coolmanns@users.noreply.github.com>
2026-04-06 11:40:55 +02:00
Mariano
5c42b6b5f9
fix(run): keep unresolved step refs visible in dry-run (#56)
* feat(run): add --dry-run flag to preview workflow execution

Add a --dry-run flag to `lobster run` that validates and prints the
execution plan without running anything. Works with both workflow files
and inline pipeline strings.

- Parses and resolves all steps, variables, and conditions
- Prints each step with resolved arguments to stderr
- Annotates approval steps as approved:true so downstream conditions
  evaluate correctly
- Validates pipeline commands against the registry
- Validates stdin template refs (e.g. $step.stdout) between steps
- Annotates unresolvable output refs as [output unknown at plan time]
- Returns exit 0 on valid input, non-zero on validation errors
- Flag is consumed regardless of argv position, consistent with
  --mode/--file/--args-json

Closes #45

* test(dry-run): add comprehensive test coverage

Cover shell steps, approval steps, conditional steps, inline pipelines,
exit codes, pipeline steps, stdin ref validation, unknown command
detection, flag position handling, and flag-after-file regression.

* fix(dry-run): scope --dry-run to lobster-level args only

Copilot P1: parseRunArgs was consuming --dry-run anywhere in argv,
including from unquoted pipeline stage args like:
  lobster run openclaw.invoke --tool t --dry-run

Now only consumes --dry-run when no pipe character has appeared in rest
tokens yet, so:
  lobster run --dry-run file.lobster   (works)
  lobster run file.lobster --dry-run   (works)
  lobster run exec | filter --dry-run  (not stolen)

* fix(dry-run): keep unresolved step refs visible

* fix(dry-run): preserve known approval refs

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coder999999999 <coder999999999@users.noreply.github.com>
2026-04-06 11:39:43 +02:00
Danny Lin
45dc9f0067
fix(parser): preserve JSON escapes in quoted args (#16)
Merged via squash.

Validated in a fresh checkout with:
- pnpm build
- node --test dist/test/parser.test.js
2026-04-06 10:09:54 +02:00
Mathías Barea
b30319cc06
fix(windows): improve CLI startup and build script compatibility (#36)
Merged via squash.

Validated in a fresh checkout with:
- pnpm build
- pnpm test
2026-04-06 10:09:36 +02:00
Vignesh Natarajan
1d2b7ee6be
feat: export embeddable core runtime 2026-03-16 01:04:27 -07:00
Vignesh Natarajan
6b21577846
feat: support native pipeline workflow steps 2026-03-16 00:13:58 -07:00
Vignesh Natarajan
e1947c9414
feat: add generic llm invoke adapters 2026-03-15 22:18:00 -07:00
Vignesh Natarajan
775c32b805
fix: harden resume security and runtime portability 2026-03-15 20:52:03 -07:00
vignesh07
e196a1ca51 test(cli): run --file forwards --args-json into workflow 2026-03-05 18:31:38 -08:00
vignesh07
83e115a8bf fix(workflows): expose args as env vars for shell-safe usage 2026-03-05 17:38:02 -08:00
vignesh07
2707687b63 docs+ux: add openclaw.invoke shim + workflow tool-calling docs 2026-03-05 15:30:52 -08:00
vignesh07
88f36bd3f9 feat: add openclaw.invoke (alias clawd.invoke) 2026-03-05 15:26:18 -08:00
vignesh07
00cedaeba6 docs: rename Clawdbot/Moltbot references to OpenClaw 2026-02-24 11:23:33 -08:00
Prithviraj Billa
61218be567
Use gogcli GitHub URL in gog command help text (#10) 2026-02-17 10:31:49 -06:00
Vignesh
1006798459
rename: updates to refer to moltbot instead of the old name 2026-01-27 12:15:56 -08:00
Vignesh Natarajan
0e1ac4fc03 test: unskip llm_task.invoke state/cache 2026-01-24 13:21:12 -08:00
Vignesh Natarajan
567904265c refactor: lobster llm always via clawd 2026-01-24 13:17:31 -08:00
Vignesh Natarajan
393dc4ba56 fix: llm_task.invoke defaults to clawd when available 2026-01-24 13:03:43 -08:00
Vignesh Natarajan
98776ee84b feat: llm-backed email.triage with draft replies 2026-01-24 12:31:00 -08:00
Vignesh Natarajan
10a789fd91 feat: add llm_task.invoke primitive 2026-01-24 12:22:13 -08:00