Repository navigation
feat: add hosted Pi runtime server - #112
Merged
Merged
Conversation
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.
Summary
Adds a hosted server for the current Pi-based Diffex coding agent and carries the existing native protocol over authenticated WebSockets.
The server persists a stable cloud session immediately, supports prompt, steer, abort, transcript, model, and thinking operations, and durably reports token usage without importing any archived
diffex-legacycode.This is the first PR in the
diffexrepository stack and establishes the runtime thatdiffex-cloudwill start inside each Daytona sandbox.Reasoning
The Pi harness is now the product runtime, so hosted sessions should execute that same implementation rather than translate requests through a legacy command API.
Reusing
@earendil-works/diffex-protocolpreserves one wire contract for local and hosted execution and keeps transport concerns out of agent behavior.The runtime is intentionally locked to the provider and model selected by the control plane.
It persists the session before accepting work, authenticates the WebSocket upgrade, deletes the injected model-key placeholder before child processes can inherit it, and keeps a durable usage outbox so temporary cloud failures do not lose billing data.
Changes
@earendil-works/diffex-coding-agent-serverpackage and CLITesting
npm run hydrate:model-datanpm run build:offlinenpm run checknpm run test --workspace @earendil-works/diffex-coding-agent-server- 4 testsnpm run test --workspace @earendil-works/diffex-client- 36 testsnpm run test --workspace @earendil-works/diffex-server- 50 testsnpm audit --audit-level=high- zero vulnerabilities