fix: replace legacy clawdbot -c RPC with gateway agent calls#402
fix: replace legacy clawdbot -c RPC with gateway agent calls#402HonzysClawdbot wants to merge 3 commits intobuilderz-labs:mainfrom
Conversation
…essions (builderz-labs#395) When assigning a task to an agent, users can now optionally select an existing session to dispatch the task to instead of creating a new one. Changes: - task-dispatch.ts: When target_session is set in task metadata, use gateway chat.send to dispatch to that specific session instead of creating a new one via call agent - task-board-panel.tsx: Add session selector dropdown in both Create and Edit task modals that appears when an agent is selected and has active sessions - store/index.ts: Add agent and channel fields to Session interface Closes builderz-labs#395
The gateways table is created lazily by the gateways API (ensureTable). The health route was querying it directly without CREATE IF NOT EXISTS, causing SqliteError: no such table: gateways in fresh databases (E2E tests, Docker first-boot). Add ensureGatewaysTable() inline to mirror the pattern in route.ts.
…z-labs#401) The `clawdbot` binary no longer exists and `openclaw` does not support the `-c` flag. All `runClawdbot(['-c', rpcFn])` calls now go through a new `runGatewayToolCall()` helper that invokes tools via `openclaw gateway call agent --expect-final`. Affected routes: - POST /api/spawn — sessions_spawn - POST /api/sessions — session_setThinking/setVerbose/setReasoning/setLabel - DELETE /api/sessions — session_delete - POST /api/sessions/[id]/control — sessions_kill/sessions_send - GET /api/status — removed clawdbot --version fallback Closes builderz-labs#401
ReviewThe migration from Must fix
Note (non-blocking)
|
|
Superseded by #407 which was merged. The clawdbot CLI→gateway RPC migration is complete. |
Problem
Spawning an agent fails with:
The
clawdbotbinary no longer exists andopenclawdoesn't support the-cflag.Solution
Added
runGatewayToolCall()helper insrc/lib/command.tsthat invokes agent tools viaopenclaw gateway call agent --expect-final. Replaced allrunClawdbot(['-c', rpcFn])calls across:sessions_spawnsession_setThinking/setVerbose/setReasoning/setLabelsession_deletesessions_kill/sessions_sendclawdbot --versionfallbackCloses #401