Skip to content

feat(cloud-agent-next): add interactive control-plane terminals - #5508

Merged
eshurakov merged 2 commits into
mainfrom
eshurakov/silver-atlas
Aug 27, 2026
Merged

feat(cloud-agent-next): add interactive control-plane terminals#5508
eshurakov merged 2 commits into
mainfrom
eshurakov/silver-atlas

Conversation

@eshurakov

@eshurakov eshurakov commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Add interactive terminals for workspace_* sessions on the existing call-home control plane. Shared control messages negotiate terminal lifecycle; authenticated single-use reverse WebSockets relay raw PTY frames through SandboxSession. Legacy agent_* terminals are unchanged.

PTYs are bound to owner, session, root Kilo session, workspace directory, sandbox, wrapper runtime, and bridge generation. Credentials are scrubbed from the attach environment. Vercel billing stays fail-closed.

@eshurakov
eshurakov force-pushed the eshurakov/silver-atlas branch from dee12fe to 7aa468b Compare August 26, 2026 09:45
@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the retryable close fix confirms wrapper deletion is required before markEnded, and no new changed-code issues were found.

Files Reviewed (4 files)
  • services/cloud-agent-next/src/router.test.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-lifecycle.ts
  • services/cloud-agent-next/test/integration/sandbox-terminal.test.ts
Previous Review Summaries (2 snapshots, latest commit 89b34be)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 89b34be)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • services/cloud-agent-next/src/agent-sandbox/vercel/vercel-agent-sandbox.test.ts
  • services/cloud-agent-next/src/agent-sandbox/vercel/vercel-agent-sandbox.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/types.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/sandbox-terminal.test.ts

Previous review (commit 7aa468b)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/src/agent-sandbox/vercel/vercel-agent-sandbox.ts 442 Duplicate observeWrappersWithoutWaking implementation

SUGGESTION

File Line Issue
services/cloud-agent-next/wrapper/src/restore-session.ts 771 emptySnapshot marker is unreachable
Files Reviewed (48 files)
  • services/cloud-agent-next/src/agent-sandbox/capabilities.ts
  • services/cloud-agent-next/src/agent-sandbox/vercel/vercel-agent-sandbox.test.ts
  • services/cloud-agent-next/src/agent-sandbox/vercel/vercel-agent-sandbox.ts - 1 issue
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/router.test.ts
  • services/cloud-agent-next/src/router/handlers/session-terminal.ts
  • services/cloud-agent-next/src/sandbox-control/frames.test.ts
  • services/cloud-agent-next/src/sandbox-control/frames.ts
  • services/cloud-agent-next/src/sandbox-control/socket.test.ts
  • services/cloud-agent-next/src/sandbox-control/socket.ts
  • services/cloud-agent-next/src/sandbox-control/terminal-billing.test.ts
  • services/cloud-agent-next/src/sandbox-control/terminal-billing.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/attach-payload.test.ts
  • services/cloud-agent-next/src/sandbox-session/attach-payload.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-bridge.test.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-bridge.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/terminal-lifecycle.ts
  • services/cloud-agent-next/src/server-stream-ticket.test.ts
  • services/cloud-agent-next/src/server.test.ts
  • services/cloud-agent-next/src/server.ts
  • services/cloud-agent-next/src/session-plane.test.ts
  • services/cloud-agent-next/src/session-plane.ts
  • services/cloud-agent-next/src/shared/runtime-environment.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/src/types.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/sandbox-terminal.test.ts
  • services/cloud-agent-next/test/test-worker.ts
  • services/cloud-agent-next/test/unit/wrapper/kilo-api.test.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.test.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.ts
  • services/cloud-agent-next/wrapper/src/control/main.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-client.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-client.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-runtime.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-runtime.ts
  • services/cloud-agent-next/wrapper/src/control/session-directories.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-directories.ts
  • services/cloud-agent-next/wrapper/src/control/terminal-runtime.test.ts
  • services/cloud-agent-next/wrapper/src/control/terminal-runtime.ts
  • services/cloud-agent-next/wrapper/src/kilo-api.ts
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts
  • services/cloud-agent-next/wrapper/src/restore-session.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by grok-4.6 · Input: 66.1K · Output: 11.5K · Cached: 548.6K

Review guidance: REVIEW.md from base branch main

Base automatically changed from sticky-slider to main August 26, 2026 12:49
Relay workspace_* PTYs through SandboxSession over reverse WebSockets
while keeping terminal bytes off the JSON control socket. Bind runtime
identity, scrub credentials, and fail Vercel billing closed.
@eshurakov
eshurakov force-pushed the eshurakov/silver-atlas branch from 7aa468b to 89b34be Compare August 26, 2026 13:02
@eshurakov
eshurakov requested a review from pandemicsyn August 26, 2026 18:35

@pandemicsyn pandemicsyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, one from the bot inline

Comment thread services/cloud-agent-next/src/sandbox-session/terminal-lifecycle.ts Outdated
@eshurakov
eshurakov merged commit ecfef26 into main Aug 27, 2026
13 checks passed
@eshurakov
eshurakov deleted the eshurakov/silver-atlas branch August 27, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants