Files
synapbus/specs/006-admin-cli-docker-fixes/contracts/admin-socket.md
T
Algis DumbrisandClaude Opus 4.6 9dd27c4b9b feat: admin CLI & Docker fixes — alpine base, channels create/join, absolute socket path
Switch Docker runtime from scratch to alpine:3.19 so kubectl exec works
for admin CLI operations. Add `synapbus channels create` and
`synapbus channels join` CLI commands with corresponding admin socket
handlers. Change default socket path to /data/synapbus.sock (absolute).
Also add Helm envFrom support and NodePort configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 14:54:13 +02:00

2.3 KiB

Admin Socket Contract: Channel Commands

Feature: 006-admin-cli-docker-fixes Date: 2026-03-15

Protocol

Unix domain socket at /data/synapbus.sock (default). JSON-RPC style, newline-delimited.

New Commands

channels.create

Request:

{
  "command": "channels.create",
  "args": {
    "name": "news-feed",
    "description": "News feed channel"
  }
}
  • name (string, required): Channel name. Must pass ValidateChannelName rules.
  • description (string, optional): Channel description. Defaults to empty.

Success Response:

{
  "ok": true,
  "data": {
    "id": 42,
    "name": "news-feed",
    "description": "News feed channel",
    "type": "standard",
    "is_private": false,
    "created_by": "system",
    "created_at": "2026-03-15T10:00:00Z"
  }
}

Error Response (duplicate name):

{
  "ok": false,
  "error": "channel already exists"
}

Error Response (invalid name):

{
  "ok": false,
  "error": "invalid channel name: ..."
}

channels.join

Request:

{
  "command": "channels.join",
  "args": {
    "channel": "news-feed",
    "agent": "my-agent"
  }
}
  • channel (string, required): Channel name to join.
  • agent (string, required): Agent name to add as member.

Success Response:

{
  "ok": true,
  "data": {
    "channel": "news-feed",
    "agent": "my-agent",
    "status": "joined"
  }
}

Success Response (already member, idempotent):

{
  "ok": true,
  "data": {
    "channel": "news-feed",
    "agent": "my-agent",
    "status": "already_member"
  }
}

Error Response (channel not found):

{
  "ok": false,
  "error": "channel not found: news-feed"
}

CLI Commands

synapbus channels create

Usage:
  synapbus channels create [flags]

Flags:
      --name string          Channel name (required)
      --description string   Channel description

Global Flags:
      --socket string   Path to admin Unix socket (default "/data/synapbus.sock")

synapbus channels join

Usage:
  synapbus channels join [flags]

Flags:
      --channel string   Channel name (required)
      --agent string     Agent name (required)

Global Flags:
      --socket string   Path to admin Unix socket (default "/data/synapbus.sock")