Skip to content

Comments

fix: rename clawd.invoke → openclaw.invoke + fix stdin merge (--merge-stdin, --spread)#19

Open
theclawdaddy wants to merge 1 commit intoopenclaw:mainfrom
theclawdaddy:fix/openclaw-invoke-rename-and-stdin
Open

fix: rename clawd.invoke → openclaw.invoke + fix stdin merge (--merge-stdin, --spread)#19
theclawdaddy wants to merge 1 commit intoopenclaw:mainfrom
theclawdaddy:fix/openclaw-invoke-rename-and-stdin

Conversation

@theclawdaddy
Copy link

What

Two fixes for clawd.invoke:

1. Rename to openclaw.invoke

The project was renamed from Clawd to OpenClaw. This renames the command to openclaw.invoke with:

  • clawd.invoke kept as a deprecated alias (backward compat)
  • Env vars: OPENCLAW_URL / OPENCLAW_TOKEN (old CLAWD_* still work as fallback)

2. Fix stdin handling (--merge-stdin + --spread)

Bug: Without --each, stdin from previous pipeline steps is completely drained and ignored. This makes it impossible to pipe JSON output from one step into tool args.

Fix:

  • --merge-stdin: Collects the first stdin JSON object and merges its fields into toolArgs before invoking
  • --spread (for --each mode): Spreads item fields into args instead of nesting under itemKey

Tested

# Full pipeline: script → merge stdin → send to Telegram  
lobster run --mode tool 'exec --json --shell "python3 btc_json.py" | openclaw.invoke --merge-stdin --tool message --action send'
# ✅ Works — message delivered directly to Telegram, zero LLM calls

- Rename clawd_invoke.ts to openclaw_invoke.ts
- Change primary command name from 'clawd.invoke' to 'openclaw.invoke'
- Keep 'clawd.invoke' as deprecated alias for backward compatibility
- Update env vars: CLAWD_URL → OPENCLAW_URL, CLAWD_TOKEN → OPENCLAW_TOKEN (with fallbacks)
- Add --merge-stdin flag: merge first stdin JSON object fields into tool args (non-each mode)
- Add --spread flag: spread item fields into args instead of nesting (each mode)
- Update help text and error messages to reflect OpenClaw branding
- All existing tests pass, maintaining backward compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant