development: absorbed openclaw-plugin-dev as a workflow, with reference docs for plugin structure, hooks, tools, state, config. hf-hangman-lab: hf-wakeup workflow — full agent wakeup lifecycle: set busy → check due slots → select & defer → identify task → plan work → create work channel → execute. All branches end with status reset to idle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Development & Debugging
Dev Loop
# 1. Modify code in plugin/
# 2. Reinstall
node scripts/install.mjs --install
# 3. Restart gateway
openclaw gateway restart
# 4. Watch logs
openclaw logs --follow
# 5. Test
Log Keywords
| Keyword | Meaning |
|---|---|
plugin registered |
register() completed |
startSideCar called / already running |
Sidecar status |
must NOT have additional properties |
Schema vs config mismatch |
EADDRINUSE |
Port conflict (sidecar or HTTP server) |
Checklist Before Deploy
General
- All hook handlers have event dedup (globalThis, not module-level)
- Gateway lifecycle events protected by globalThis flag
- Business state on globalThis
openclaw.plugin.jsonschema matches actual config fields- Install script doesn't set schema-absent fields
- Sensitive fields not set by install script
- Install script cleans old dist before copying
Connection-type plugins
- Start flag on globalThis (not module-level
let) - Runtime reference on globalThis
- Shared registries/callbacks on globalThis, init once
- Cross-plugin API object overwritten every register() but runtime started once
- Consumer plugins defend against provider not loaded