feat(panel): support SSH remote windows with per-endpoint isolation and context window overrides

- Add per-endpoint registry and isolated caches (endpoint-registry.mjs, multi-path trajectory-cache-file.mjs) so local and SSH remote windows maintain independent conversations, telemetry, quotas, and consumption analytics (Antigravity SSH) without remote plugin installation
- Classify local vs. SSH Desktop targets via two-pass hub port and metadata probing in window-bridge.mjs and ls-discovery.mjs, routing HTTP/CDP requests with authoritative X-Usage-Monitor-Endpoint headers and preventing local data leaks or 503-triggered CDP downgrades
- Implement two-tier read-only remote LS RPC transport in ls-rpc.mjs (loopback HTTP/HTTPS with size/wall-clock limits and 60s circuit breaker falling back to stateless same-origin window.fetch / connect-websocket via CDP)
- Enable per-endpoint verified context window overrides in SSH Desktop windows (context-windows.mjs, window-bridge.mjs, api-actions.mjs) without double-wrapping window.fetch
- Surface an SSH badge in TopSessionHeader, cleanly flush stale requests/queues on endpoint rebind, rebuild app.js/styles.css, and add 13 unit/E2E tests in test/ssh-remote-endpoints.test.mjs (157/157 passing)
This commit is contained in:
hejun01
2026-11-20 11:41:39 +08:00
parent d371dc1ed5
commit 253da45607
22 changed files with 4095 additions and 310 deletions
+18
View File
@@ -442,6 +442,23 @@ html[data-standalone="true"] .app-shell {
flex-shrink: 0;
}
.endpoint-ssh-badge {
display: inline-flex;
align-items: center;
padding: 2px 5px;
font-family: var(--font-mono);
font-size: var(--fs-sm);
font-weight: 600;
line-height: 1.2;
letter-spacing: 0.02em;
border-radius: var(--radius-xs);
border: 1px solid var(--accent-primary-border);
background: var(--accent-primary-soft);
color: var(--accent-primary);
white-space: nowrap;
flex-shrink: 0;
}
.status-tag {
display: inline-flex;
align-items: center;
@@ -6149,6 +6166,7 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
[data-modern-ui="true"] .status-tag.state-running,
[data-modern-ui="true"] .status-tag.state-synced,
[data-modern-ui="true"] .status-tag.state-warn,
[data-modern-ui="true"] .endpoint-ssh-badge,
[data-modern-ui="true"] .update-badge-btn,
[data-modern-ui="true"] .wm-update-btn,
[data-modern-ui="true"] .wm-hover-update-bar,