{"name":"ncoder","version":"0.1.0","instructions":"You are talking to ncoder: clone a GitHub repo, implement a prompt with OpenCode + DeepSeek, then open a pull request.\n\nStatus machine: queued → cloning → coding → committing → opening_pr → succeeded | failed\n- The coding step is done when status leaves coding.\n- The job is done when status is succeeded (prUrl) or failed (error).\n- Jobs live in memory only. They vanish if the process restarts.\n\nPick a path:\n\n## MCP (this session)\n\ninitialize → read these instructions → use tools.\n\n- If you can hold Streamable HTTP SSE: after initialize, GET /mcp with Mcp-Session-Id and Accept: text/event-stream. Call implement_and_pr with _meta.progressToken. Live notifications look like [status] coding and [opencode] …. The tool result is the finish signal: succeeded + prUrl, or failed + error.\n- If you cannot hold a long tool call: start_job (returns id, status, jobUrl, eventsUrl immediately), then poll get_job until terminal is true.\n\nDo not wrap implement_and_pr in a short-timeout HTTP client.\n\n## REST / http_request + listen_sse\n\nShort HTTP timeouts (about 15s) cannot wait for a PR. Do not block on MCP implement_and_pr.\n\n1. GET / (this document plus links). Send Authorization: Bearer if auth.required is true on later /v1 and /mcp calls.\n2. POST /v1/jobs with JSON { \"repo\", \"prompt\" } (optional baseBranch, branchName, title). 202 returns id, status, jobUrl, eventsUrl.\n3. listen_sse on eventsUrl (already has types=status,done). Pass the same Bearer header. Skip ping / empty data / heartbeat.\n4. SILENCE unless event is done, or status is succeeded or failed. Then post prUrl or error. Do not narrate every status line.\n5. If SSE drops: GET jobUrl until succeeded or failed. Reconnect SSE with Last-Event-ID.\n\nUse ?types=status,done so noisy opencode events cannot starve done (hubs that cap fires per minute). Omit types only if you want the full admin stream (status, stage, opencode, done).\n\n## Network\n\nRemote REST/SSE and MCP HTTP need a public https origin. Clients that block localhost/RFC1918 cannot use 127.0.0.1. Bind HOST=0.0.0.0 behind TLS. Never put API keys in this document.\n","auth":{"type":"bearer","header":"Authorization","required":true},"statusMachine":["queued","cloning","coding","committing","opening_pr","succeeded","failed"],"links":{"health":"https://ncoder.os.wellplay.io/health","openapi":"https://ncoder.os.wellplay.io/openapi.json","jobs":"https://ncoder.os.wellplay.io/v1/jobs","mcp":"https://ncoder.os.wellplay.io/mcp","docs":"https://ncoder.os.wellplay.io/docs"}}