Repository navigation
docs: propose remote App Server targets for the native terminal - #2278
Conversation
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Problem and scope: This PR proposes a two-computer Dim Alpha flow. The native terminal selects a remote App Server, authenticates with a shared token, and gets the protected POSIX entry's Session and management access. It adds a 251 line research proposal, one INDEX entry, and one note in the Session boundary contract. Three open issues (#2275, #2276, #2277) track delivery.
Verification: node scripts/adr-check.mjs --base 1997683c0 passes and no ADR changes. Local links and anchors resolve. The external rutis-network links resolve at 558af188 and confirm the mTLS dial/listen plugins, the five control methods, the loopback TCP example, macOS/Linux mDNS publish support, and Tailscale tag and name/IP dialing. The code claims match: running and attachedClients exist (crates/dim-app-server/src/protocol.rs:1292-1305, crates/dim-app-server/src/connection.rs:1205-1206), submissionId is the input identity (docs/design/contracts/session-access.md:307), --cwd, --resume and --server exist (crates/dim-cli/src/args.rs:220-225), the POSIX socket is private (crates/dim-cli/src/session_host.rs:6138-6140), and the UI leaf rules are as cited (docs/design/plugins/Tui.md:287-305). CI at 82c92f9: changes and ci-ok succeeded; code jobs were skipped for a docs-only diff. Mergeable, with the merge state blocked only by the required review. #2273 adds a separate INDEX line, and #2274's gate would pass because #2269 carries P2. No prior threads. The two-computer LAN/Tailscale flows and the tmux interaction runs are implementation acceptance and were not run for this docs-only change.
Optional findings (P3), none blocking:
-
UI leaf return path. Problem: Tui.md:287-305 says the leaf binds the private address and
ui.open {peer, address}makes the daemon dial it, while native-terminal-targets.md:229 has the target side allocate the address. Failure: an implementation that follows the existing contract has the remote leaf pass its localui-<8 hex>address, which the target daemon cannot dial across the network, so the remote UI never attaches. Evidence: docs/design/plugins/Tui.md:287-305 and docs/design/research/native-terminal-targets.md:229. Fix: say the client passes the target-side address returned byterminalTransporttoui.open, the target-side relay forwards the dial to the leaf, and the TUI owner updates Tui.md section 3.6 in #2275. -
Directory picker. Problem: native-terminal-targets.md:188 links
workspace.files.searchfor the root-based picker, but that method is a query over a walked index (crates/dim-app-server/src/workspace_files.rs:1-3, 69-80; crates/dim-agent-capabilities/src/workspace_tools/mentions.rs:31-42), not a one-level directory listing. Failure: a picker built on it cannot list immediate children from/and skips directories such astargetandvendor. Evidence: docs/design/research/native-terminal-targets.md:188 and the two files above. Fix: name #2277 as the owner of the new target-side listing and validation, and present the link as a related search. -
Active Session scope. Problem: native-terminal-targets.md:170 uses
runningto decide the list, butrunningfollows the default branch only (docs/design/appserver/session-catalog.md:115; crates/dim-app-server/src/agents.rs:1371). Failure: a Session whose work runs on another line and has no attached client is not listed, so the user cannot find it. Evidence: docs/design/research/native-terminal-targets.md:170, docs/design/appserver/session-catalog.md:115, and crates/dim-app-server/src/agents.rs:1371. Fix: state that the list covers the default line, or define active to include any running line. -
Alpha packaging. Problem: native-terminal-targets.md:155 says the Alpha package provides the connection components, but the package ships the native CLI and App Server only (npm/README.alpha.md:1-30), and #2275 does not scope a Go rutis host or the rutis-network link plugins. Failure: two fresh Alpha installs cannot start discovery or sharing, so acceptance item 4 cannot run. Evidence: docs/design/research/native-terminal-targets.md:155, npm/README.alpha.md:1-30, and the #2275 scope. Fix: add packaging and loader wiring to #2275 or a release follow-up.
The contract note at docs/design/contracts/session-boundary.md:356 is consistent with A.3: the token client reaches the local protected entry, so management methods follow from that entry, not from RemoteGateway. The proposal states that the sharing user enables the entry, the token holder gets full capability, and a reset disconnects all clients. No change required.
No P0-P2 findings. APPROVE.
Refs #2269
Summary
A person with Dim Alpha on two computers can launch
dimalocally, open/devices, then resume an active Session on the other computer or start one in a chosen remote directory. The proposal illustrates sharing, token entry and reuse, discovery, Session selection, the root-based directory picker, the device name before the composer path, and reconnection. Read the design and terminal sketches · Network topology · Module architectureThree issues track delivery:
Design rule checklist
Documentation
Verification
Checked the staged diff, the ADR freeze against
origin/main, local Markdown links and anchors in the proposal, pinned rutis-network source paths, and alignment in the eleven ASCII diagrams. Two-computer LAN/Tailscale flows, protocol parity, and local tmux interaction runs are implementation acceptance criteria.