Skip to content

refactor(runtime): establish deployment foundation - #1788

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/local-agent-host-tui
Jul 27, 2026
Merged

refactor(runtime): establish deployment foundation#1788
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/local-agent-host-tui

Conversation

@limityan

Copy link
Copy Markdown
Collaborator

Summary

  • replace the user-facing Local Agent Host concept with a deployment-focused architecture: one Agent Runtime with Embedded and future Shared deployment options
  • add an optional workspace/product ownership primitive using shared locks for Embedded owners and an exclusive lock for a future Shared owner
  • add a non-published, crate-internal local IPC pre-integration seam limited to discovery, instance ownership, authenticated initialization, bounded framing, Health, connection limits, idle cleanup, Windows Named Pipes, and Unix Domain Sockets
  • add architecture guards that keep the seam disconnected from CLI/TUI/GUI/Remote/SDK Host, prevent public API growth, reject non-Health operations, and forbid network transports across every private module

Scope boundary

This PR does not add a user-visible Shared mode, --shared, a Host command, or any CLI/TUI/GUI/Remote/SDK Host consumer. It does not define Session, Turn, Tool, MCP, Permission, UserInput, event replay, or controller wire contracts. Existing product entrypoints remain Embedded and unchanged.

The IPC crate currently has no reverse dependency outside itself. It is intentionally removable if the first reviewed consumer chooses another transport or Shared deployment is not activated.

Architecture and product impact

Area Before After
Agent Runtime owners Existing product owners Unchanged; no second Runtime implementation
Default GUI/TUI/CLI behavior Embedded Embedded, unchanged
Default processes/connections/memory Existing baseline Unchanged; no production consumer starts the foundation
Deployment ownership No dedicated primitive Optional shared/exclusive workspace+product lock
Local Shared transport Design-only Private Health-only pre-integration seam
Public SDK / remote protocol Existing contracts Unchanged

Validation

  • cargo test -p bitfun-agent-runtime-ipc — 14 passed
  • cargo clippy -p bitfun-agent-runtime-ipc --all-targets -- -D warnings
  • cargo check -p bitfun-agent-runtime-ipc --tests --target x86_64-unknown-linux-gnu
  • cargo test -p bitfun-services-core --features runtime-ownership --test runtime_ownership_contracts — 2 passed
  • cargo check -p bitfun-services-core --features runtime-ownership --target x86_64-unknown-linux-gnu
  • cargo check --workspace
  • node scripts/core-boundaries/self-test.mjs
  • node scripts/check-core-boundaries.mjs
  • node --test scripts/check-core-boundaries.test.mjs — 16 passed
  • node scripts/check-repo-hygiene.mjs
  • git diff --check
  • adversarial architecture and product reviews — no remaining P0/P1/P2

cargo test --workspace is currently blocked by the upstream gcwing/main Relay Server compatibility fixture: src/apps/relay-server/tests/library_compat.rs initializes AppState without the existing page_browser_auth field. This PR has no diff in that fixture or its AppState owner; the focused tests above and the full workspace check pass.

Review note

This change was AI-assisted and then independently reviewed from architecture and product-scope perspectives. The review specifically rejected exposing a new Host product concept, connecting CLI/TUI to SDK Host, adding Shared business operations, or allowing a future private TCP module to bypass the local-only boundary.

@limityan
limityan merged commit 2fcc017 into GCWing:main Jul 27, 2026
5 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.

1 participant