Skip to content

feat(cloud-agent): add workspace terminal support#3291

Merged
eshurakov merged 1 commit into
mainfrom
delicious-filament
May 19, 2026
Merged

feat(cloud-agent): add workspace terminal support#3291
eshurakov merged 1 commit into
mainfrom
delicious-filament

Conversation

@eshurakov
Copy link
Copy Markdown
Contributor

@eshurakov eshurakov commented May 18, 2026

Summary

  • Adds workspace terminal tabs and a terminal dock to cloud-agent chat sessions.
  • Adds web, tRPC, cloud-agent service, and wrapper routes for creating and proxying PTY terminal sessions.
  • Adds access checks, terminal error handling, and regression coverage for wrapper/client/session behavior.

Verification

  • Manual verification

Visual Changes

Screenshot 2026-05-18 at 16 02 03

Reviewer Notes

  • Main review areas: WebSocket close/retry behavior, session access checks, and wrapper PTY proxying.
  • The branch is ready for review.

@eshurakov eshurakov force-pushed the delicious-filament branch from fa92752 to 2f1d736 Compare May 18, 2026 12:46
Comment thread services/cloud-agent-next/wrapper/src/kilo-api.ts Outdated
Comment thread services/cloud-agent-next/wrapper/src/kilo-api.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 18, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental diff adds slash-command support (discriminated payload union through tRPC → orchestrator → wrapper), devcontainer session routing with secure env-file injection for secrets, and devcontainer admin guard — all reviewed with no new issues found.

Changes Reviewed in This Update

New code reviewed:

  • services/cloud-agent-next/src/execution/wrapper-call.ts: New dispatch module branches prompt vs command payload to the correct wrapper API (✅)
  • services/cloud-agent-next/src/execution/types.ts: ExecutionPayload discriminated union (PromptExecutionPayload | CommandExecutionPayload), ExistingSessionMetadata.devcontainer shape (✅)
  • services/cloud-agent-next/src/execution/orchestrator.ts: ensureDevContainerHandleIfNeeded, buildRuntimeEnv plumbing, dispatchToWrapper integration (✅)
  • services/cloud-agent-next/src/kilo/wrapper-client.ts: Devcontainer exec command builder, env-file injection with cleanup on failure, shellQuote migration, WrapperNotReadyError.cause propagation, fixedPort port-retry skip (✅)
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts: kiloCommands, devcontainer, initialPayload fields; setAvailableCommands/getAvailableCommands; command-payload mode/model validation bypass; stopWrapper devcontainer aware (✅)
  • services/cloud-agent-next/src/router/schemas.ts: SendMessageV2Payload discriminated union, PrepareSessionInput.devcontainer + initialPayload + kiloCommands, UpdateSessionInput.kiloCommands (✅)
  • services/cloud-agent-next/wrapper/src/server.ts: Command handler mirrors prompt handler's connection-open + setActive lifecycle (✅)
  • services/cloud-agent-next/wrapper/src/kilo-api.ts: listCommands (filters out skill source), sendCommand now forwards messageId (✅)
  • apps/web/src/routers/cloud-agent-next-schemas.ts: sendMessageNextPayloadSchema discriminated union, devcontainer field (✅)
  • apps/web/src/routers/cloud-agent-next-router.ts: devcontainer admin guard (✅)
  • apps/web/src/routers/organizations/organization-cloud-agent-next-router.ts: same guard + payload forwarding (✅)
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx: handleSendSlashCommand callback (✅)
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts: devcontainer field on PrepareSessionInput type (✅)
Files Reviewed (33 files)
  • apps/web/src/components/cloud-agent-next/CloudAgentTerminalDock.tsx
  • apps/web/src/components/cloud-agent-next/CloudAgentWorkspaceTabs.tsx
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/terminal-tabs.ts
  • apps/web/src/components/cloud-agent-next/terminal-utils.ts
  • apps/web/src/components/cloud-agent-next/useCloudAgentTerminal.ts
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts
  • apps/web/src/lib/cloud-agent-next/terminal-errors.ts
  • apps/web/src/lib/cloud-agent/stream-ticket.ts
  • apps/web/src/routers/cloud-agent-next-schemas.ts
  • apps/web/src/routers/cloud-agent-next-router.ts
  • apps/web/src/routers/cloud-agent-router.test.ts
  • apps/web/src/routers/organizations/organization-cloud-agent-next-router.ts
  • apps/web/src/routers/organizations/organization-cloud-agent-router.test.ts
  • services/cloud-agent-next/src/auth.ts
  • services/cloud-agent-next/src/execution/orchestrator.ts
  • services/cloud-agent-next/src/execution/types.ts
  • services/cloud-agent-next/src/execution/wrapper-call.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.test.ts
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts
  • services/cloud-agent-next/src/router.ts
  • services/cloud-agent-next/src/router.test.ts
  • services/cloud-agent-next/src/router/handlers/session-terminal.ts
  • services/cloud-agent-next/src/router/schemas.ts
  • services/cloud-agent-next/src/server.ts
  • services/cloud-agent-next/src/server.test.ts
  • services/cloud-agent-next/src/terminal/access.ts
  • services/cloud-agent-next/src/terminal/access.test.ts
  • services/cloud-agent-next/test/unit/wrapper/kilo-api.test.ts
  • services/cloud-agent-next/wrapper/src/kilo-api.ts
  • services/cloud-agent-next/wrapper/src/server.ts
  • services/cloud-agent-next/wrapper/src/main.ts

Reviewed by claude-4.6-sonnet-20260217 · 4,625,502 tokens

Review guidance: REVIEW.md from base branch main

@eshurakov eshurakov force-pushed the delicious-filament branch 2 times, most recently from e78d915 to 4fe5323 Compare May 18, 2026 20:40
@eshurakov eshurakov force-pushed the delicious-filament branch from 4fe5323 to a56d5b1 Compare May 19, 2026 11:31
@eshurakov eshurakov merged commit 29abfaf into main May 19, 2026
17 checks passed
@eshurakov eshurakov deleted the delicious-filament branch May 19, 2026 12:14
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