feat: remote access for mobile clients via zcode-acp-hub - #49
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
Opt-in remote access so a mobile client can discover and drive editor-hosted
bridge sessions over a single authenticated entry point, plus the client-facing
APIs and replay hardening that came out of live testing.
What's in here
Remote access core (opt-in via
ZCODE_ACP_REMOTE=1)AgentAppas the stdio editor(
remote/endpoint.ts, ADR-0001: bridge lifetime still follows the editor)zcode-acp-hubmachine-level singleton: token auth, instance discovery,byte-level WS proxying, heartbeat-TTL pruning, idle exit (ADR-0002)
clients; requests are first-response-wins with loser cancellation
from the upgraded install) and on-demand
?probe=1liveness so a clientrefresh gets an immediately-honest instance list
Client-facing APIs
session/loadtail replay with_meta.zcode.limit,replayMeta, andsession/load_earliercursor pagination (Proposal 0001 / ADR-0003)account/usage_statsplan quota (GLM + Opencode Go combined), pull-only,failures degrade gracefully (Proposal 0002)
Hardening from live testing
plain text (fixes path-like
/dirinputs killing the turn)<system-reminder>blocks so clientsnever render them as user input
Verification
backend-death → unregister chain, probe pruning
Docs
docs/REMOTE-CLIENTS.md(client integration contract), ADR-0001/0002/0003,proposals 0001/0002, architecture updates.