Commit Graph
71 Commits
Author SHA1 Message Date
Brennan BensonandOrca cdc0ca5e53 Add read-only orca linear CLI with trusted launch-prompt pointer (V1) (#5126)
Co-authored-by: Orca <help@stably.ai>
2026-06-10 20:20:50 -07:00
Jinwoo Hong 1ef273c018 fix: make windows ssh relay deploy survive session teardown (#5136) 2026-06-10 23:12:26 -04:00
98d02bca47 fix: support windows ssh hosts (#5004)
* feat: add windows ssh relay base support

* feat: support windows ssh relay runtime services

* fix: default windows ssh pty cwd to user profile

* fix: support windows hosts over system ssh

* fix: preserve degraded windows relay native deps

* fix: gate windows shell args by relay platform

* fix: preserve windows relay fallback pipes

* test: align windows native deps relay fixture

* fix: build valid windows install lock command

* fix: address windows SSH relay review findings

Resolve correctness, efficiency, and reuse issues found reviewing the
Windows SSH native-host support:

- GC liveness on Windows now probes the actual named pipe (via node
  net.connect against markers + deterministic candidates) instead of
  substring-matching Win32_Process command lines, which could remove a
  live relay dir. Reports ALIVE conservatively only when there is no
  liveness signal at all (no markers and no seed pipes).
- Resolve the remote node path once per deploy and thread it through
  install/repair/launch instead of re-resolving 3-7x.
- Replace the 200ms node -e poll loop with a single long-lived remote
  wait process during Windows relay startup.
- Skip the no-op executable command on Windows in uploadRelay.
- Make the Windows fallback pipe name deterministic and recoverable
  (drop the global counter), with an extra reconnect attempt.
- Normalize the prepended node bin dir to backslashes on Windows PATH.
- Batch the system-SSH Windows directory upload into a single streamed
  JSON package instead of one ssh process per file.
- Extract relay endpoint/marker helpers into ssh-relay-endpoints.ts and
  consolidate the PowerShell EncodedCommand encoding into the shared
  powershell-command-encoding module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Support cancellation and timeouts in Windows port scanning

- Propagate the request AbortSignal and a 5-second timeout to both
  PowerShell and netstat child processes during Windows port scanning.
- Avoid spawning the netstat fallback process if the port scan has
  already been aborted.
- Wrap the .NET OSArchitecture check in a try/catch block during SSH
  Windows platform detection to robustly fall back to environment
  variables if needed.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
2026-06-09 01:17:34 -07:00
2338c42ef9 fix(ssh): sync ~/.ssh/config on import and Manage open (#4899)
* fix(ssh): sync ~/.ssh/config on import and Manage open

importFromSshConfig only inserted unknown hosts and never updated an
existing target, so a rotated port (or any changed config field) was
silently ignored on re-import. Make it an upsert: config-sourced targets
are refreshed in place, genuinely new hosts are inserted, and the SSH
Manage pane auto-syncs when it opens so changes appear without a manual
Import click.

A new optional SshTarget.source ('ssh-config' | 'manual') protects
user-created and user-edited targets from being overwritten by sync —
editing a target in the UI detaches it from config-sync. Unchanged
targets are skipped so a repeat sync performs no disk write. Editing a
target now also carries cleared optional fields (identity file, proxy
command, jump host) so removing a config-derived value actually deletes
it instead of silently keeping the stale value through the partial merge.

Resolves item #1 of #4684 (item #2 was fixed in #4860).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(ssh): preserve legacy manual targets during config sync

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-08 18:15:55 -04:00
Jinwoo HongandOrca 9c2cec3d6c Use system ssh for proxy-based targets (#4911)
Co-authored-by: Orca <help@stably.ai>
2026-06-08 14:43:25 -07:00
Jinwoo HongandOrca 3ef63c972a Persist agent session metadata for workspace resume (#4706)
Co-authored-by: Orca <help@stably.ai>
2026-06-07 19:41:25 -07:00
Jinwoo Hong 4b904a4e4d Revert "perf: pause hidden terminal renderer output" (#4314)
This reverts commit c608e65d00.
2026-05-31 16:24:35 -04:00
Jinwoo Hong 4cc0147005 Fix orchestration mail from WSL and SSH terminals (#3918) 2026-05-31 15:13:15 -04:00
Neil 6f40c6ceed fix: release ssh mux handlers on dispose (#4212) 2026-05-31 08:29:42 -07:00
Neil 0e645692b4 fix: clean up failed ssh directory imports (#4202) 2026-05-31 08:11:17 -07:00
Neil c7c2330723 fix: close late ssh channel callbacks (#4116) 2026-05-31 04:48:28 -07:00
Neil 2cb1d6657b fix: parse quoted ssh config values 2026-05-31 02:29:24 -07:00
Jinjing 28e2ce929f Improve SSH config target handling (#3899) 2026-05-30 13:10:39 -07:00
Neil 41c26634ed Clean up SSH proxy command listeners 2026-05-30 12:33:45 -07:00
Jinwoo Hong 55a33c5b68 fix: expand backslash SSH home paths (#3861)
* fix: tighten GitHub submit shortcut handling

* fix: expand backslash ssh home paths
2026-05-30 12:32:11 -07:00
Jinwoo Hong c1a24d8447 test: make ssh sftp tests windows-safe (#3844) 2026-05-30 12:07:17 -07:00
Neil 3afebb7b4c fix: settle system ssh aborts (#3842) 2026-05-30 12:05:25 -07:00
f470168cba fix: allow dot-dot-prefixed sftp upload paths (#3706)
* fix: allow dot-dot-prefixed sftp upload paths

* test: cover sftp upload root sibling rejection

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-05-30 12:04:29 -07:00
Neil ecb623d8d3 Clean up SSH relay exec listeners (#3843) 2026-05-30 12:02:15 -07:00
Neil 6fc8b134b8 Clean up system SSH command listeners (#3841) 2026-05-30 11:58:25 -07:00
Neil 114c7df0c0 perf: handle large ssh include files (#3838) 2026-05-30 11:54:48 -07:00
29ed4f8069 fix: cap relay startup stdout buffer (#3728)
* fix: cap relay startup stdout buffer

* fix: preserve relay startup payload after sentinel

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-05-30 11:53:39 -07:00
Neil a89388f059 Clean up SFTP upload stream listeners (#3837) 2026-05-30 11:53:34 -07:00
ccfc1a9b97 fix: time out ssh channel opens (#3742)
* fix: time out ssh channel opens

* test: cover ssh channel-open timeout edge cases

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-05-30 11:43:40 -07:00
Neil 8044be7cc7 fix: clean up system ssh probe listeners (#3824) 2026-05-30 11:32:49 -07:00
Neil c608e65d00 perf: pause hidden terminal renderer output
Pause hidden snapshot-capable terminal panes at the main-process renderer output boundary so background PTY traffic no longer wakes the renderer, while preserving main-owned snapshots for restore.
2026-05-30 11:24:31 -07:00
Neil 6d076e5350 fix: time out ssh config resolution (#3815) 2026-05-30 11:20:11 -07:00
Neil c99eb29bb0 chore: remove unused code 2026-05-30 11:05:58 -07:00
Neil 662ebcbbd1 perf: handle large ssh config alias lists (#3792) 2026-05-30 10:26:37 -07:00
Brennan BensonandOrca 423a6d11e3 Track agent prompt sent from agent hooks (#3033)
Co-authored-by: Orca <help@stably.ai>
2026-05-29 12:45:34 -07:00
Jinjing 41f0bc6394 test: preserve ssh mock event listeners (#3015)
* test: preserve ssh mock event listeners

* test: reuse runtime file command helper
2026-05-28 18:30:35 -07:00
Jinjing 186327af08 fix: guard ssh startup destroy errors (#3013) 2026-05-28 16:13:09 -07:00
a1a362700f fix: reject short SSH stream chunks instead of zero-filling reads (#2930) (#2948)
* fix: reject short SSH stream chunks instead of zero-filling reads

The stream reader validated chunk COUNT but not chunk byte length, so a
short chunk (e.g. a 1-byte final chunk for a 2-chunk file) passed the
count check and resolved with the pre-allocated buffer's tail left
zero-filled — silent corruption of remote file reads. Validate each
chunk's exact length, and add a last-line bytesReceived === totalSize
invariant guard before resolving.

Closes #2930

* review: harden SSH stream byte validation

- fill relay protocol chunks across short fs.read returns before emitting streamChunk
- cover short final and non-final client chunks
- add relay pump coverage for short reads before EOF
- verified lint, typecheck, targeted stream tests, relay round-trip, and Electron boot smoke

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-05-28 03:51:36 -04:00
Jinwoo HongandOrca c21fdf8fb2 Fix SSH handler re-registration port forwards (#2963)
Co-authored-by: Orca <help@stably.ai>
2026-05-27 21:04:30 -07:00
Neil 9d396e115c fix: remove SSH startup listeners after connect (#2882) 2026-05-26 20:24:36 -07:00
Neil e896dd3eb7 Recover hidden terminal output from main-owned state (#2848)
* fix: avoid renderer stalls on terminal backlogs

* Recover hidden terminal output from main state
2026-05-26 16:01:56 -07:00
Neil eb579a0e54 Fix SSH sessions after host sleep 2026-05-26 14:53:16 -07:00
Neil 6b51b85519 Fix OMP agent status routing (#2815) 2026-05-25 19:32:15 -07:00
Neil d4703bd1ab Restore agent hook opt-out controls (#2778) 2026-05-25 10:37:22 -07:00
Neil 28ba9151a5 Revert "Add agent hook opt-out controls" (#2739) 2026-05-23 23:04:57 -07:00
Neil 4f81953d10 feat: add agent hook opt-out controls (#2714) 2026-05-23 21:16:49 -07:00
Jinjing ffec74c7ba Fix SSH agent and identity file auth ordering (#2681)
* fix: address review findings

* fix: address CI failures
2026-05-23 01:56:15 -07:00
Phil Denhoff 2dcaa78960 Support OpenSSH Include expansion for SSH config imports
Closes #2647
2026-05-23 00:27:20 -07:00
Jinwoo HongandOrca 77daf71386 Fix SSH PTY routing after restoring multiple workspaces (#2555)
* Fix SSH PTY id collisions across targets

* review: harden SSH PTY scoped-id routing

- dedupe SSH terminate-session cleanup by raw relay id
- normalize scoped SSH PTY ids at Store lease write boundaries
- add scoped-id regression coverage for provider, IPC, persistence, and lifecycle paths
- verify duplicate relay pty-1 restore over a live SSH relay

Co-authored-by: Orca <help@stably.ai>

* test: expect scoped SSH relay PTY ids

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-21 17:26:16 -04:00
Jinwoo HongandOrca dac61b84db Improve SSH relay grace period settings (#2549)
Co-authored-by: Orca <help@stably.ai>
2026-05-21 13:46:09 -07:00
Jinwoo HongandOrca 75f7510b1f fix(ssh): contain relay notification handler failures (#2463)
Co-authored-by: Orca <help@stably.ai>
2026-05-20 17:49:08 -07:00
Brennan BensonandOrca 7d71131bb4 Infer interrupted agent status from terminal input (#2263)
Co-authored-by: Orca <help@stably.ai>
2026-05-19 15:19:38 -07:00
Jinwoo HongandOrca 9c67557a0c Support system SSH transport for fdpass proxies (#2279)
Co-authored-by: Orca <help@stably.ai>
2026-05-18 16:03:34 -07:00
Jinwoo HongandOrca c3bfc796af Fix SSH relay persistence and reset controls (#2274)
Co-authored-by: Orca <help@stably.ai>
2026-05-18 18:19:22 -04:00
Neil fdc38bfc33 Fix SSH relay connect when default shell is fish (#2239) 2026-05-18 01:31:45 -07:00