Files
SynthesisAgent.OpenclawPlugin/package.json
zhi 0324a47d13 feat: HTTP /v1/chat/completions + WS bridge + process manager
Real first cut. OpenClaw routes agent turns via /v1/chat/completions
(OpenAI-compatible SSE) into our bridge. Bridge ensures a long-lived
claude process per session-key, pushes the user message as
notifications/claude/channel into the running Claude Code, awaits a
reply via the WS connection, streams the reply back as SSE deltas.

- core/process-manager: spawn / track / reap claude processes, auto-confirm
  the --dangerously-load-development-channels dev-mode prompt by piping
  "1\n" to stdin shortly after spawn
- web/bridge-server: unified HTTP + WS server, per-session FIFO queue,
  SSE heartbeat (empty content delta — SSE comments don't reset OpenClaw's
  idle watchdog), reply buffering for streaming progress chunks
- index.ts: definePluginEntry for OpenClaw runtime + standalone-mode main
  for laptop smoke testing (just `bun index.ts`)

Same-machine simplifications: no bridge token, no permission_request
reverse channel. Session key = agent_id::chat_id (contractor-agent
convention).
2026-05-14 13:28:00 +00:00

20 lines
459 B
JSON

{
"name": "synthesis-agent-openclaw-plugin",
"version": "0.0.1",
"license": "Apache-2.0",
"description": "OpenClaw plugin: routes agent turns through long-lived interactive Claude Code processes",
"type": "module",
"main": "index.ts",
"scripts": {
"standalone": "bun index.ts"
},
"dependencies": {
"ws": "^8.18.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/ws": "^8.5.10",
"typescript": "^5.0.0"
}
}