Skip to content

design(remote): choose the injection channel for remote sessions #219

Description

@devsuitup

Two candidate channels, both measured to exist.

The CLI messaging socket. Each live session declares
messagingSocketPath in its descriptor — a Unix socket, mode 600, confirmed
present on a declared host. The descriptor also carries peerProtocol: 1 and
peerFeatures (notify_idle, reply_across_default_dirs, artifact_yield),
so a versioned protocol exists. This channel is independent of any multiplexer
and of any PTY.

A Unix socket does not cross ssh on its own, and Unix-socket forwarding is not
dependable on the Windows client. But nc and python3 are present on the
host, so ssh <host> nc -U <socket> carries the conversation over one ordinary
connection. Measured: socket present, nc present.

A trigger file on the host. The existing trigger convention is already
consumed by a watcher running on the declared host, in the same JSON format the
local watcher uses. Writing one over ssh reuses remote-transport.js wholesale.
It requires that watcher to exist, which is not true of an arbitrary host.

The trigger schema carries no host field at all today —
sessionId, command, chain, wait, timeout_ms, expectedCwd — and
getPtyForSession (trigger-context.js:16-21) resolves targets from
activeSessions, a map of locally spawned PTYs. A remote id returns
"session not found" and cannot even be expressed.

Decide: which channel is primary, whether the protocol is documented enough to
speak, and how a result comes back. The socket is the multiplexer-independent
answer and should win unless speaking the protocol proves impractical.

Unverified: that the socket accepts a conversation from outside the session's
own process. That is the first thing to measure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions