Scope
Structural rename and stub creation — no new functionality. The current cmd/charon binary embeds both the Charon storage/resolution service and an optional proxy layer in a single binary controlled by --proxy. This issue splits that into three purpose-named binaries:
| Binary |
Description |
cmd/responsed |
Current Charon behaviour: internal storage/resolution service (/responses, /staging, /healthz, /readyz) |
cmd/proxyd |
Current cmd/proxy: client-facing Responses API proxy |
cmd/conversationd |
Stub only — compiles and starts, returns 501 Not Implemented on all /conversations routes |
The combined single-binary mode (proxy + charon in one process for testing) is preserved by building cmd/responsed with an embedded cmd/proxyd handler, gated by a --proxy flag, matching the existing --proxy behavior in the current binary.
Changes required
- Rename
cmd/charon/ → cmd/responsed/; update all internal import paths and package names
- Extract
cmd/proxy/ handler registration logic and wire it as a standalone main in cmd/proxyd/
- Create
cmd/conversationd/ stub: compiles, logs startup, returns 501 on POST /conversations, GET /conversations/{id}, DELETE /conversations/{id}, PUT /conversations/{id}/messages
- Update
Makefile: add targets build-responsed, build-proxyd, build-conversationd, build-all; preserve existing build target pointing at cmd/responsed
- Add stub
Dockerfile.responsed, Dockerfile.proxyd, Dockerfile.conversationd (copy from existing Dockerfile, adjust binary names)
- Update
cmd/responsed/main.go to embed cmd/proxyd handler in combined mode
Acceptance criteria
Scope
Structural rename and stub creation — no new functionality. The current
cmd/charonbinary embeds both the Charon storage/resolution service and an optional proxy layer in a single binary controlled by--proxy. This issue splits that into three purpose-named binaries:cmd/responsed/responses,/staging,/healthz,/readyz)cmd/proxydcmd/proxy: client-facing Responses API proxycmd/conversationd501 Not Implementedon all/conversationsroutesThe combined single-binary mode (proxy + charon in one process for testing) is preserved by building
cmd/responsedwith an embeddedcmd/proxydhandler, gated by a--proxyflag, matching the existing--proxybehavior in the current binary.Changes required
cmd/charon/→cmd/responsed/; update all internal import paths and package namescmd/proxy/handler registration logic and wire it as a standalonemainincmd/proxyd/cmd/conversationd/stub: compiles, logs startup, returns501onPOST /conversations,GET /conversations/{id},DELETE /conversations/{id},PUT /conversations/{id}/messagesMakefile: add targetsbuild-responsed,build-proxyd,build-conversationd,build-all; preserve existingbuildtarget pointing atcmd/responsedDockerfile.responsed,Dockerfile.proxyd,Dockerfile.conversationd(copy from existingDockerfile, adjust binary names)cmd/responsed/main.goto embedcmd/proxydhandler in combined modeAcceptance criteria
go build ./cmd/responsed/...produces a binary that behaves identically to today'scmd/charongo build ./cmd/proxyd/...produces a binary that behaves identically to today'scmd/proxygo build ./cmd/conversationd/...compiles; all/conversationsroutes return501make presubmitpasses