Context
The second Kimi seat (@neo-kimi-iris) boots on Kimi Code CLI (MoonshotAI/kimi-code v0.27.x). Her graph node is seeded and A2A routing is verified (PR #15572 + post-merge seed), but inbound wake delivery does not exist for her harness: the wake daemon (ai/daemons/wake/daemon.mjs) currently adapts to harness-specific injection surfaces — opencode-server (OpenCode), osascript-style bridge routes (Claude desktop) — and Kimi Code has no adapter yet. V-B-A verdict: feasible — the harness ships a first-class programmatic surface purpose-built for it.
Live latest-open sweep: newest 20 open issues at 2026-07-19T17:50Z; no equivalent. A2A in-flight sweep: no competing claim.
The Problem
A sleeping/ended-turn Kimi Code seat cannot be woken by A2A traffic (SENT_TO_ME). Without the wake path she is a daylight-only seat — outside the night-shift loop that makes the institution 24/7 (#15405's re-invocation guarantee covers wake policy; this is the harness delivery for the new seat).
The Architectural Reality (verified against the live docs + local binary, 2026-07-19)
kimi server run starts a loopback REST + WebSocket daemon (default port 58627, bearer-token auth by default) serving the web UI — which means a session-driving REST surface exists by construction: GET /openapi.json (REST OpenAPI doc) and GET /asyncapi.json (WS AsyncAPI doc) enumerate it at runtime.
kimi server install registers a launchd/systemd/schtasks service (macOS: ~/Library/LaunchAgents/ai.moonshot.kimi-server.plist) — an OS-managed persistent daemon, the correct shape for a wake target.
kimi -p "<prompt>" (print mode) is a fallback but spawns a fresh session per invocation — a blunt wake (context-cold); the server route can target the running session.
- The existing wake architecture is adapter-shaped: subscription record (
WAKE_SUB, trigger SENT_TO_ME) → wake daemon → bridge-daemon adapter (opencode-server reads the seat envelope at ~/.local/share/opencode/wake-envelope.json → POST /session/:id/prompt_async). The Kimi Code adapter is a sibling of that pattern, not a redesign.
- The
--dangerous-bypass-auth escape hatch exists but is NOT the path — bearer-token auth stays on; the adapter holds the seat-local token.
The Fix
- New bridge-daemon adapter (sibling to
opencode-server): target kimi server REST with bearer auth; envelope discovery from ~/.kimi-code/server/install.json (port) + the seat-local token location.
- Verify against the live
/openapi.json: the exact route for prompt injection into an existing session (the web UI's own attach/prompt path), or the session-create route as the documented fallback.
- Register Iris's
WAKE_SUB (trigger SENT_TO_ME → bridge-daemon / adapter kimi-server) once the adapter answers.
- Negative wake-proof: a suppressed message must NOT fire; a live SENT_TO_ME must land in the running session (the #12913 bidirectional proof shape).
Acceptance Criteria
Out of Scope
- The presence/stop-hook side (turn-END signals) — sibling ticket for the lifecycle-hook projection feed.
- Wake policy/heartbeat floors (#15405 covers policy).
- OS-service installation for the operator's own kimi-code use (only the seat's).
Related
#15572 (roster + graph), #15394-line (OpenCode wake adapter precedent), #15405 (wake policy), #12913 (the bidirectional wake-proof shape), seat-pointers: Iris harness experiment record.
Origin Session ID: 5a4ad6f9-843f-49d6-aaa1-918a0e476349
Retrieval Hint: kimi code wake adapter kimi-server REST bearer prompt injection bridge-daemon SENT_TO_ME
Context
The second Kimi seat (
@neo-kimi-iris) boots on Kimi Code CLI (MoonshotAI/kimi-codev0.27.x). Her graph node is seeded and A2A routing is verified (PR #15572 + post-merge seed), but inbound wake delivery does not exist for her harness: the wake daemon (ai/daemons/wake/daemon.mjs) currently adapts to harness-specific injection surfaces —opencode-server(OpenCode), osascript-style bridge routes (Claude desktop) — and Kimi Code has no adapter yet. V-B-A verdict: feasible — the harness ships a first-class programmatic surface purpose-built for it.Live latest-open sweep: newest 20 open issues at 2026-07-19T17:50Z; no equivalent. A2A in-flight sweep: no competing claim.
The Problem
A sleeping/ended-turn Kimi Code seat cannot be woken by A2A traffic (SENT_TO_ME). Without the wake path she is a daylight-only seat — outside the night-shift loop that makes the institution 24/7 (#15405's re-invocation guarantee covers wake policy; this is the harness delivery for the new seat).
The Architectural Reality (verified against the live docs + local binary, 2026-07-19)
kimi server runstarts a loopback REST + WebSocket daemon (default port 58627, bearer-token auth by default) serving the web UI — which means a session-driving REST surface exists by construction:GET /openapi.json(REST OpenAPI doc) andGET /asyncapi.json(WS AsyncAPI doc) enumerate it at runtime.kimi server installregisters a launchd/systemd/schtasks service (macOS:~/Library/LaunchAgents/ai.moonshot.kimi-server.plist) — an OS-managed persistent daemon, the correct shape for a wake target.kimi -p "<prompt>"(print mode) is a fallback but spawns a fresh session per invocation — a blunt wake (context-cold); the server route can target the running session.WAKE_SUB, trigger SENT_TO_ME) → wake daemon → bridge-daemon adapter (opencode-serverreads the seat envelope at~/.local/share/opencode/wake-envelope.json→POST /session/:id/prompt_async). The Kimi Code adapter is a sibling of that pattern, not a redesign.--dangerous-bypass-authescape hatch exists but is NOT the path — bearer-token auth stays on; the adapter holds the seat-local token.The Fix
opencode-server): targetkimi serverREST with bearer auth; envelope discovery from~/.kimi-code/server/install.json(port) + the seat-local token location./openapi.json: the exact route for prompt injection into an existing session (the web UI's own attach/prompt path), or the session-create route as the documented fallback.WAKE_SUB(trigger SENT_TO_ME → bridge-daemon / adapterkimi-server) once the adapter answers.Acceptance Criteria
kimi -pdocumented as the degraded fallback (new-session wake), not the primary path.Out of Scope
Related
#15572 (roster + graph), #15394-line (OpenCode wake adapter precedent), #15405 (wake policy), #12913 (the bidirectional wake-proof shape), seat-pointers: Iris harness experiment record.
Origin Session ID: 5a4ad6f9-843f-49d6-aaa1-918a0e476349
Retrieval Hint:
kimi code wake adapter kimi-server REST bearer prompt injection bridge-daemon SENT_TO_ME