Foundation for the Transport-B epic (#110 ).
What
In src/main.rs, before Cli::parse(), detect login-shell invocation and enter gateway mode :
argv0 basename starts with - (OpenSSH login shell), OR args are ["lilbox","-c",<cmd>] (both OpenSSH and Tailscale SSH pass a command this way).
Source the command: -c arg → $SSH_ORIGINAL_COMMAND (preserve feat(gateway): exe.dev-style remote box provisioning over SSH #108 's forced-command path) → else interactive usage.
All paths funnel into the EXISTING authorize() in src/commands/gateway.rs unchanged.
Acceptance
lilbox -c "ls" and a dash-argv0 invocation dispatch through the allowlist; normal lilbox <subcmd> unaffected.
Interactive (no -c, no env command) prints usage — detected by absence of -c, NOT tty (a client can ssh -t host cmd).
feat(gateway): exe.dev-style remote box provisioning over SSH #108 's SSH_ORIGINAL_COMMAND path still works. Unit tests for the arg-detection.
Source-confirmed (spike #109 ): Tailscale SSH runs shell -c "cmd" and never sets $SSH_ORIGINAL_COMMAND.
Depends on: none (foundation).
Parent: #110 (epic). Spike: #109 . Base branch for #108 's gateway code. Integration branch: 110-transport-b-tailnet-gateway — target it, NOT main.
Foundation for the Transport-B epic (#110).
What
In
src/main.rs, beforeCli::parse(), detect login-shell invocation and enter gateway mode:-(OpenSSH login shell), OR args are["lilbox","-c",<cmd>](both OpenSSH and Tailscale SSH pass a command this way).-carg →$SSH_ORIGINAL_COMMAND(preserve feat(gateway): exe.dev-style remote box provisioning over SSH #108's forced-command path) → else interactive usage.authorize()insrc/commands/gateway.rsunchanged.Acceptance
lilbox -c "ls"and a dash-argv0 invocation dispatch through the allowlist; normallilbox <subcmd>unaffected.-c, no env command) prints usage — detected by absence of-c, NOT tty (a client canssh -t host cmd).SSH_ORIGINAL_COMMANDpath still works. Unit tests for the arg-detection.Source-confirmed (spike #109): Tailscale SSH runs
shell -c "cmd"and never sets$SSH_ORIGINAL_COMMAND.Depends on: none (foundation).
Parent: #110 (epic). Spike: #109. Base branch for #108's gateway code. Integration branch:
110-transport-b-tailnet-gateway— target it, NOT main.