Skip to content

feat(bridge): add bounded host context integration - #9

Merged
HayronHgh merged 2 commits into
mainfrom
agent/mcp-capability-server
Aug 10, 2026
Merged

feat(bridge): add bounded host context integration#9
HayronHgh merged 2 commits into
mainfrom
agent/mcp-capability-server

Conversation

@HayronHgh

@HayronHgh HayronHgh commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What changed

  • add a loopback-only Host Context Bridge that prepares browser completion requests before llama.cpp inference
  • add bounded Coding State Transfer for oversized first-use histories without mutating browser-owned transcript storage
  • add an anchor-checked llama.cpp b10295 Web UI overlay and integrated UI marker
  • add one-click Bridge -> llama.cpp -> ContextOS MCP -> health/tool validation startup and exact-PID shutdown
  • add explicit trusted-local write/edit configuration while keeping command execution separately controlled
  • add the reproducible llama.cpp b10295 Windows MCP named-pipe compatibility patch, private-runtime build script, rollback guidance, and bilingual documentation
  • update the tested local profile to 64K active context with a 16K reserved/output budget

Why

The stdio MCP capability server from dev.6 does not own the llama.cpp browser transcript or the request lifecycle. Context pressure therefore still needed a narrow host integration point before inference. Large MCP tool requests also exposed a separate Windows compatibility defect in llama.cpp b10295: its nonblocking named-pipe path repeatedly attempted to write an entire oversized JSON-RPC frame, causing the host request to wait until timeout_ms expired.

The bridge keeps llama.cpp as the inference and interaction plane, keeps the browser transcript authoritative, and prepares only the copied request. The compatibility patch chunks Windows pipe writes while retaining the existing completion, cancellation, backpressure, and error-handling loop.

User impact

  • START.bat and STOP.bat manage the complete local stack
  • browser requests are pressure-checked before inference
  • large UTF-8/multiline MCP writes no longer alternate between success and timeout when the patched private runtime is used
  • models, CUDA binaries, local configuration, runtime state, logs, and workspace contents remain outside Git

Validation

  • npm test: 188 tests, 187 passed, 1 skipped because symbolic links are unavailable in the sandbox, 0 failed
  • PowerShell syntax validation for the patched llama.cpp build script
  • patch reverse-check against the applied b10295 source
  • git diff --check
  • binary/model repository scan
  • live server and Host Bridge health checks
  • live MCP command call (node --version)
  • three consecutive 4,243-byte UTF-8/multiline write_file calls completed in 63 ms, 62 ms, and 56 ms with exact SHA-256 matches

@HayronHgh HayronHgh changed the title feat(mcp): add Context OS capability server feat(bridge): add bounded host context integration Aug 10, 2026
@HayronHgh
HayronHgh marked this pull request as ready for review August 10, 2026 20:14
@HayronHgh
HayronHgh merged commit 07d8081 into main Aug 10, 2026
4 checks passed
@HayronHgh
HayronHgh deleted the agent/mcp-capability-server branch August 10, 2026 20:15
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