Skip to content

feat: OpenClaw integration runner (structured callback + state + docs)#910

Closed
sqrtqiezi wants to merge 1 commit intosansan0:masterfrom
sqrtqiezi:feat/openclaw-integration-mvp
Closed

feat: OpenClaw integration runner (structured callback + state + docs)#910
sqrtqiezi wants to merge 1 commit intosansan0:masterfrom
sqrtqiezi:feat/openclaw-integration-mvp

Conversation

@sqrtqiezi
Copy link
Copy Markdown

Summary

This PR implements an MVP for issue #909 (OpenClaw integration):

  • Add tools/openclaw_runner.py as a stable OpenClaw execution entrypoint
  • Add structured JSON callback result for each run (status/duration/error_type/summary/latest_db/checksum/state_file/log_file)
  • Add state persistence (output/openclaw/openclaw_state.json) with idempotency hints:
    • last_sent_at
    • latest_db
    • latest_db_mtime
    • latest_db_checksum
    • changed_since_last
  • Add failure classification (fetch_failed, db_missing, notify_failed, etc.) and fallback hint support (--fallback-last-on-failure) to avoid silent failure
  • Add integration doc: docs/openclaw-integration.md

Why

OpenClaw-side automation needs a stable entrypoint and machine-readable run callback for scheduling, observability and degraded alerting.

Usage

python tools/openclaw_runner.py --run-mode scheduled
python tools/openclaw_runner.py --run-mode manual
python tools/openclaw_runner.py --run-mode scheduled --fallback-last-on-failure

Verification

  • Dry-run output validates structured callback and state transitions:
    • first run: changed_since_last=true
    • subsequent run with same DB: changed_since_last=false

Related: #909

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.

2 participants