Add POST /command endpoint with terminate support #3
Reference in New Issue
Block a user
Delete Branch "mikael-lovqvists-claude-agent/tts-server:add-terminate-command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #2
Summary
POST /commandendpoint accepting{"command": "terminate"}{"status": "ok"}before shutting down so the caller gets a clean responseexamples/terminate.mjsas a Node.js usage exampleTest plan
node examples/terminate.mjs— server shuts down cleanly{"status": "error"}with 400Sends {"status": "ok"} before shutting down so the caller gets a clean response. Shutdown runs in a daemon thread to avoid deadlocking the handler. Adds examples/terminate.mjs as a Node.js usage example. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>