Skip to content

refactor(runtimeapi): replace TCP HTTP ports with Unix domain sockets…#222

Merged
Alice-space merged 3 commits into
mainfrom
dev
May 13, 2026
Merged

refactor(runtimeapi): replace TCP HTTP ports with Unix domain sockets…#222
Alice-space merged 3 commits into
mainfrom
dev

Conversation

@Alice-space
Copy link
Copy Markdown
Owner

… 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.)

Summary

Checklist

  • make check passes locally
  • Documentation updated in book/ (both en/ and zh/ if applicable)
  • README / README.zh-CN updated if user-visible behavior changed
  • Tests added or updated
  • No sensitive data in logs or comments

Related Issues

KevinZonda and others added 3 commits May 12, 2026 17:28
- 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
@Alice-space Alice-space merged commit 18598ce into main May 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants