Reach teammates' terminals through the gateway
iamnbutler opened ·
Terminals are owner-only and don't reach peers' or hosted channels' workspaces through another gateway. The owner already gets terminals by connecting directly to the host that runs a channel's workspace, including a hosted channel's workspace host. What's missing is forwarding through another gateway to that workspace, plus terminal session discovery and rights for teammates ([scope audit](https://github.com/githubnext/ace2/issues/11#issuecomment-6026214068)).
Tracked by #58. Migrated from [TODO.md — During dogfooding](https://github.com/githubnext/ace2/blob/21ac3df5cf6c963cf20e33b0d470ba45eac40150/TODO.md#during-dogfooding).
iamnbutlerparent-issue-addedlast month on GitHub
iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub
iamnbutlerreferenced this in Pasted command gets a stray 1R prefix after returning to a terminal #48last month on GitHub
iamnbutlerreferenced this in Let agents discover and message channels on peer hosts #57last month on GitHub
iamnbutlerreferenced this in [Meta] Extend work across hosts and devices #58last month on GitHub
iamnbutlerparent-issue-removedlast month on GitHub
iamnbutlerparent-issue-addedlast month on GitHub
- IA
Read-only scope audit at main `6dc0f1c`, linked to dogfooding #5 and distributed-work meta #58. These are code-path findings, not new runtime acceptance.
**Missing path:** all four terminal operations are owner-only ([gateway.ts](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/host/src/gateway.ts#L193-L213)); terminal open requires a local catalog record and has no peer/workspace forwarding ([handler](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/host/src/gateway.ts#L352-L368)). The existing code does permit the owner's direct tailnet browser and hosted channels opened on their workspace host. Another gateway reaching that workspace remains unsupported; the hosted cell itself has no shell.
**Design required before implementation:**
- Creating a new shell in a teammate's checkout differs from discovering/attaching to their existing terminal. IDs currently live in client layouts; there is no session-discovery protocol. - Direct PTY access runs as the host OS user. Read, input, resize, and close rights are not defined by the existing switch, which controls only new agent invocations ([team semantics](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/docs/architecture.md#L359-L367)). Preserve the tailnet trust model; don't silently broaden that flag. - Reattach and continuation operations currently trust terminal IDs. Peer exposure needs channel/participant binding and explicit existing-session semantics ([terminal manager](https://github.com/githubnext/ace2/blob/6dc0f1c881983718d00b042f4018f3ad6e535bdd/apps/host/src/terminals.ts#L48-L69)). - Define output/exit forwarding, reconnect/replay, simultaneous input/resize, close versus detach, orphan timeout, and kill/archive/delete behavior.
Recommendation: no straight-proxy patch. An owner-only route through their other machines is a smaller possible first slice; teammate session access needs the decisions above. Validate the owner route on two machines and teammate rights with two people. #159 addresses transcript watches, while #53 addresses agent jobs; neither implements this terminal feature.
iamnbutlerreferenced this in Verify a deployed hosted channel with a local workspace #176last month on GitHub
iamnbutlerreferenced this in Keep hosted channels available when their workspace is offline #179last month on GitHub
iamnbutlerreferenced this in Reach hosted channels from a browser without a host gateway #182last month on GitHub
iamnbutlerreferenced this in [Meta] Run hosted channels in the cloud with local workspaces #13last month on GitHub