Repository navigation
fix: outbound delivery with JSON-RPC, channel status, and config path - #25
Conversation
Adds proper outbound.sendText() implementation that uses the aX MCP messages tool to send messages. This enables: - Heartbeat delivery to ax-platform channel - Cron job delivery with 'Deliver' checkbox - Any agent reply routing to aX spaces Configuration: - outbound.tokenFile: Path to OAuth token JSON file - outbound.mcpEndpoint: MCP server URL (default: https://mcp.paxai.app) - outbound.defaultSpaceId: Default target space for delivery The implementation reads the access token from the configured file (or AX_ACCESS_TOKEN env var) and POSTs to the MCP messages tool. Resolves: empty-heartbeat-file and 'Outbound not configured' errors for cron jobs targeting ax-platform channel.
|
Test comment to verify permissions |
Code ReviewFound 1 issue that needs attention: Type error in
|
- Config now reads from channels.ax-platform.accounts (standard pattern)
- Falls back to plugins.entries.ax-platform.config.agents (legacy)
- Each agent handle becomes an account for multi-agent support
- Added status adapter for health checks (configured, accounts, sessions)
- Enhanced capabilities (media, threads, mentions)
This should fix 'configured: false' in gateway health checks and enable
proper delivery/heartbeat routing.
Gateway config example:
{
channels: {
'ax-platform': {
accounts: {
clawdbot_cipher: { agentId: 'uuid', secret: '...', handle: '@clawdbot_cipher', enabled: true }
}
}
}
}
- Renamed clawdbot.plugin.json -> openclaw.plugin.json (required by OpenClaw) - Added channelConfigSchema for channels.ax-platform.accounts pattern - Added outbound config to plugin schema - Bumped version to 0.3.0 This should fix 'Channel config schema unavailable' in gateway UI.
Clawdbot gateway looks for clawdbot.plugin.json, not openclaw.plugin.json. The schema content added in previous commit is preserved.
- callAxTool now uses MCP JSON-RPC at /mcp instead of broken REST /tools/toolName endpoint. Handles both SSE and JSON responses. - outbound sendText/sendMedia match Clawdbot's standard channel interface (to, text, cfg, replyToId, threadId, deps) - Added status interface (buildAccountSnapshot, buildChannelSummary, probeAccount) so dashboard shows configured/connected status - Fixed config path: api.config is full clawdbot.json, plugin config lives at plugins.entries.ax-platform.config - Probe only hits paxai.app for prod agents, with 60s cache - setup.sh now writes outbound config with auto-detected token file - config.defaultAccountId returns first prod agent instead of first agent in list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
✅ Reviewed by @clawdbot_cipher — LGTM, ship it. This is a major upgrade. Reviewed the full diff (+451/-28 across 6 files). Key observations: What's right:
Minor observations (non-blocking):
Confirmed working: Outbound delivery verified 3x today from my sandbox via mcporter → Merge it. 🚀 |
Summary
callAxTool()now sends proper MCP JSON-RPCtools/callrequests to/mcpinstead of the broken REST/tools/toolNameendpoint. Handles both SSE streaming and plain JSON responses withextractToolResult()for MCP content envelope parsing.sendText/sendMediamatch Clawdbot's standardChannelOutboundContextsignature (to,text,cfg,replyToId,threadId,deps). Returns{ channel: "ax-platform", ...result }.buildAccountSnapshot,buildChannelSummary,probeAccountso the dashboard shows proper Configured/Connected status. Probe only hits paxai.app for prod agents with 60s cache.api.configis the full clawdbot.json — plugin config extracted fromplugins.entries.ax-platform.config.config.defaultAccountIdreturns first prod agent instead of first agent in list..ax-token.jsonfile.Test plan
./setup.sh syncbuilds and restarts without errorsagents=6, outbound=configured🤖 Generated with Claude Code