Skip to content

feat(acp): ACP agents, connection settings and remote containers - #67

Draft
BIackFIame wants to merge 5 commits into
howdeploy:mainfrom
BIackFIame:stack/5-acp-connections
Draft

BIackFIame wants to merge 5 commits into
howdeploy:mainfrom
BIackFIame:stack/5-acp-connections

Conversation

@BIackFIame

@BIackFIame BIackFIame commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Talk to ACP-capable agents natively, manage accounts and servers from Settings, and run API agents in containers on remote servers.

Behavior

  • ACP: local ACP conversations and lifecycle for Kimi, Cursor and MiniMax. Requested model and account choices must be confirmed before prompts are admitted, and a model change that breaks policy cancels the active turn.
  • Settings: account connections, host controls, explicit account launch routing, and responsive navigation.
  • Remote containers: API agents run in containers on a server with host-local credentials. Retained remote output can be reviewed and exported.
  • Capsules retain output, launch only verified selected files in owned containers, apply reviewed snapshots, and run saved checks in isolated snapshots. Orchestration is scoped to live parent authority.
  • Initial tasks are passed as literal startup arguments instead of typed PTY input.

Verification

  • npm run typecheck passed. Full suite: 1221/1221; Even G2 companion tests (npm run test:even): 47/47.
  • ACP is covered by fake-process integration tests. No live vendor ACP session was run.

Series

Each part is one commit on top of the previous one. Please merge them in order. Until #66 is merged, GitHub also shows the earlier parts here; review only the top commit 8b4caea (Commits tab → last commit).

Part PR Scope Lines
1 #63 Providers: Cursor, MiniMax Code, Devin, Antigravity +579/−90
2 #64 API keys, API profiles, agent delegation (MCP) +4275/−63
3 #65 Remote servers, placement, privacy tiers, accounts +6620/−40
4 #66 Isolation: capsules, worktrees, containers +5508/−839
5 #67 ACP, connection settings, remote containers +6827/−563
6 #68 Project context and learning +6148/−370
7 #69 Routing, reasoning effort, server preparation, sign-in +3122/−467
8 #70 Open issues and safe fixes from open PRs +306/−58

Compatibility with open upstream PRs

integration/stack-with-open-prs is this whole stack with #54–#62 merged on top and every conflict resolved. On that branch both TypeScript checks, 1492/1492 tests, npm run test:even (47/47) and electron-vite build pass.

I will rebase this stack onto whichever of these lands first.

🤖 Generated with Claude Code

BIackFIame and others added 5 commits September 23, 2026 17:16
Provider CLI resolution is driven by declarative command definitions
instead of assuming the executable matches the provider id. MiniMax
Code (`mcode`), Antigravity (`agy`) and Cursor resolve through the same
registry, known install directories, recheck and install links that howdeploy#52
introduced. Cursor prefers `cursor-agent`; a generic `agent` is accepted
only when its real path is verified as Cursor, because Grok also
installs an `agent` executable.

Each new agent gets normal and resume launches where the CLI documents
them, its YOLO flag only where one exists, launcher entries with a
settings migration, its provider mark and session restore. MiniMax Code
has no permission-bypass flag, so its YOLO profile launches the stock
CLI and says so. Antigravity restores as a fresh session because it has
no resumable id that CanvasTTY can persist.

Provider ids, labels and launcher order live in a dependency-free
`providerCatalog.ts` that `contracts.ts` re-exports, so the Even G2
companion bundle stays free of URLs outside its network whitelist; its
phone launcher lists the new agents too.

Lifecycle hooks are prepared only for providers that have a hook adapter, so
the new agents never write Grok's shared hook configuration.

ADR: docs/adr/ADR-20260921-provider-cli-command-definitions.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

- Provider API keys are stored in the main process, encrypted with
  Electron safeStorage; the renderer only sees which keys exist.
- API profiles name a model backend (protocol, HTTPS base URL, key
  reference, default model) with built-in presets.
- Sessions carry role and parent metadata; restore drops orphaned
  subagents instead of resurrecting them.
- Per-provider capability descriptors state what CanvasTTY can really do
  with each agent, and agent control (spawn, send, observe, result,
  cancel, children) works over ordinary terminal sessions.
- An orchestration MCP surface rides the existing agent-bridge design:
  authenticated user-local socket, one-use bootstrap capabilities, scoping
  to the caller's own session subtree, and MCP injection for Claude,
  Codex, OpenCode, Kimi and Hermes. Only orchestrator sessions receive it;
  ordinary launches are unchanged.

ADR: docs/adr/ADR-20260921-orchestration-mcp-rides-agent-bridge.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…accounts

- Saved remote hosts use the system OpenSSH client (BatchMode, no stored
  passwords) for connectivity checks, remote terminals, CLI discovery,
  light load/memory metrics and per-host workspace mapping.
- Automatic placement applies hard filters (reachability, provider rules,
  workspace mapping, capacity) before ranking by load and free memory,
  and probes whether each provider's API answers from that host.
- spawn_agent can request a host, so subagents may run remotely.
- Data-handling tiers D0-D3 are enforced at spawn time, with host
  confidentiality ceilings and repository path policies.
- Several accounts per provider with subscription tiers; each account is
  bound to its own computer.
- Security fixes: lease supersession, an authentication hang and SSH
  option injection through host fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bounded task capsules and workspace sandbox plans; protected mounts
  are rejected and hidden edits are retained.
- One live launch policy for create, restart and restore, enforcing
  account host affinity, budgets and privacy before every spawn.
- Bounded host probes that honour account placement.
- Accounts launch their bound model with isolated API credentials;
  Kimi homes and OpenCode API protocols are aligned.
- Durable isolated git worktrees that preserve agent output.
- Configured Docker/Podman containers run with durable owned
  workspaces, a fixed Python bootstrap that verifies limits, capabilities
  and mounts before exec, and cleanup fenced against pending creation.
- A responsive API profile editor and launcher controls for workspaces
  and containers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Local ACP conversations and lifecycle for Kimi, Cursor and MiniMax,
  with model selection confirmed before prompts are admitted.
- Settings gain account connections, host controls, explicit account
  launch routing and responsive navigation.
- Remote API agents run in containers with host-local credentials;
  retained remote output can be reviewed and exported.
- Capsules retain output, launch only verified selected files in owned
  containers, apply reviewed snapshots and run saved checks in isolated
  snapshots; orchestration is scoped to live parent authority.
- Initial tasks are delivered through literal startup arguments instead
  of typed PTY input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BIackFIame
BIackFIame force-pushed the stack/5-acp-connections branch from bfb430b to 8b4caea Compare September 23, 2026 14:26
@howdeploy

Copy link
Copy Markdown
Owner

@BIackFIame @teo-nex, прошу вас совместно посмотреть, что нужно изменить в ядре плагинов CanvasTTY, чтобы ACP и всю эту расширенную цепочку управления можно было подключать опционально через плагины.

Речь не только о переключателе, который скрывает дополнительные настройки. Я хочу, чтобы ACP, сложные схемы подключения и управления агентами, удалённые окружения, капсулы, проверки результатов и маршрутизация развивались как устанавливаемые расширения. В ядре должны оставаться минимальные общие механизмы и необходимые точки расширения.

Пожалуйста, пересмотрите #67 вместе с остальными частями цепочки и предложите, какие изменения плагинного ядра для этого необходимы:

По #66 отдельно прошу начать с переработки основной функции «Сохранять сессии агентов или нет» и строить управление контейнерами как опциональное расширение согласованной модели сохранения и восстановления сессий.

Причина продуктовая: отдельные SSH-сценарии для меня либо слишком ситуативны, либо превращаются в сложные цепочки оркестрации и управления агентами. Я сам как автор не использую это активно в рабочей практике. Я планировал CanvasTTY как максимально свободную и гибкую платформу, с минималистичным фундаментом.

Многое из базовой оркестрации уже принято. Дальнейшее развитие этих идей я хочу вести именно через плагины: для этого я создавал плагинную систему, а сообщество сделало удобный поиск, установку и обновление расширений. Пользователь должен сам выбирать нужные возможности, не получая всю сложную систему управления как обязательную часть приложения.

Следующий шаг здесь — согласовать границу между минимальным ядром и плагинами, затем переработать реализацию цепочки под неё. #62 относится к обновлению самого CanvasTTY и ведётся отдельно: electron-updater, с Developer ID для macOS вместо отдельного Sparkle.

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