refactor(runtimeapi): replace TCP HTTP ports with Unix domain sockets…#222
Merged
Conversation
- Enhanced the `/clear` command description in both English and Chinese documentation to clarify its effects on backend session binding for private and group chats. - Updated the response messages in the command processor to reflect the new terminology regarding backend sessions. - Added a new test case to verify the `/clear` command's behavior in private chat sessions. - Updated `.gitignore` to include `.vscode` directory.
… for runtime API
Switch the internal runtime API transport from TCP loopback ports to Unix
domain sockets. Each bot uses its own socket at $ALICE_HOME/runtime.sock,
eliminating port conflicts on multi-instance machines. The HTTP protocol
stay; only the transport layer changes.
- Config: runtime_http_addr → runtime_socket, default "runtime.sock"
- Server: net.Listen("unix", path) + os.Chmod 0700; stale socket cleanup
- Client: unified Unix socket transport via DialContext (no HTTP fallback)
- Remove port auto-increment logic (incrementHostPort, etc.)
- Add 13 socket-specific tests (healthz, auth, permissions, cleanup, etc.)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat: support /clear in DM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… for runtime API
Switch the internal runtime API transport from TCP loopback ports to Unix domain sockets. Each bot uses its own socket at $ALICE_HOME/runtime.sock, eliminating port conflicts on multi-instance machines. The HTTP protocol stay; only the transport layer changes.
Summary
Checklist
make checkpasses locallybook/(bothen/andzh/if applicable)Related Issues