feat(isolation): task capsules, isolated worktrees and container runs - #66
BIackFIame wants to merge 4 commits into
Conversation
e725ad6 to
28ffe99
Compare
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>
28ffe99 to
942166f
Compare
|
@BIackFIame @teo-nex, хочу уточнить направление доработки этого PR. Сначала нужно переработать сохранение и восстановление сессий агентов, отталкиваясь от основной пользовательской функции: «Сохранять сессии агентов или нет». Вместе с этим следует спроектировать управление контейнерами и связанными рабочими окружениями как расширение этой функции. Пользователю нужна согласованная модель: что сохраняется после завершения работы, что восстанавливается при следующем запуске и как этим управлять. Пожалуйста, совместно пересмотрите реализацию #66 с этой точки зрения. В фундаменте CanvasTTY должна остаться простая модель жизненного цикла и восстановления сессии; расширенное управление контейнерами и изолированными окружениями должно подключаться опционально через плагины, используя эту модель. Не хочу, чтобы рядом с основной настройкой сохранения сессий возникала ещё одна самостоятельная система управления со своей логикой восстановления. Общее продуктовое направление касается всей связанной цепочки:
Кейсы с отдельной настройкой SSH для меня либо слишком ситуативны, либо ведут к сложным цепочкам оркестрации и управления агентами. Я сам как автор не использую их активно в повседневной работе. CanvasTTY я задумывал как максимально свободную и гибкую платформу, сохраняя минимализм в фундаменте. Я уже принял много наработок по базовой оркестрации, но дальнейшее развитие этих идей хочу вести именно через систему плагинов — для этого она и создавалась. Сообщество уже сделало удобный поиск, установку и обновление плагинов; давайте использовать этот путь, чтобы каждый пользователь подключал нужную ему сложность самостоятельно. В #67 оставлю отдельный комментарий о необходимых изменениях ядра плагинов. #62 с обновлением самого приложения ведём отдельно: используем electron-updater и планируем Developer ID для macOS; отдельный Sparkle при этом не нужен. |
|
@howdeploy в работе переработка этих PR, баги- проблемы некоторые нашел + поверх добавление jev и аналогичных моделей. Оркестрация — отдельные сервера и тп я думал использовать(из личного опыта) для ситуаций когда основной пк/ноутбук банально не справляется/греетчя максимально и нужно больше мощности, и что бы агенты сами все распределяли по доступности и возможностям сервера |
|
@BIackFIame, понимаю сценарий с разгрузкой основного ПК и использованием более мощных серверов. Но в целом агент, у которого есть доступ к shell и настроены SSH-доступы, уже может подключаться к серверу и выполнять там задачи. Поэтому мне кажется, что описание доступных серверов, правила выбора машины и распределение работы — прежде всего вопрос пользовательских скиллов, хуков и настроек самого агента. Для этого не обязательно делать управление SSH и серверами частью архитектуры ядра CanvasTTY. Если хочется оформить этот сценарий в удобный интерфейс с автоматизацией, я вижу ему место в опциональном плагине. Со стороны CanvasTTY стоит определить минимальные точки расширения, которых для этого действительно не хватает. Это позволит реализовать твой сценарий и сохранить простой фундамент для пользователей, которым такое управление не нужно. |
|
Заменено: функции вынесены в плагины |
Goal
Let an agent work on an isolated copy of the project, in a container if configured, without touching the user's checkout until its output is reviewed.
Behavior
Verification
npm run typecheckpassed. Full suite: 1044/1044; Even G2 companion tests (npm run test:even): 47/47./workspacemounted and no network. The container was removed on exit and the workspace was retained.Series
Each part is one commit on top of the previous one. Please merge them in order. Until #65 is merged, GitHub also shows the earlier parts here; review only the top commit
942166f(Commits tab → last commit).Compatibility with open upstream PRs
integration/stack-with-open-prsis 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) andelectron-vite buildpass.SettingsStore.ts. Keep this stack's store: it already serializes every write and publishes a value only after the disk write succeeds. fix(settings): keep rejected writes out of live settings #58's new tests pass against it unchanged.registerIpcreturns the window observer; keep both sides. This stack's IPC tests stub both window-state helpers, so they pass in either merge order.TerminalManager.ts: keep this stack's launch structure. The answer-capture grant must also reach the prepared and measured-grid first start, because every real agent launch goes through that path.hook-helper.mjs: keep this stack's 512 KiB input read and safe cut, and gate the answer on fix(even-g2): require explicit grant for answer capture #55's grant.64ef294(grant through prepared starts, feat(updates): add GitHub release updates across platforms #62 follow-ups) andc2dd726(hook test under the grant).shutdownForUpdatemust clearshuttingDown. Otherwise no session can start after a failed update; feat(updates): add GitHub release updates across platforms #62's own test fails without this.SettingsLocation.I will rebase this stack onto whichever of these lands first.
🤖 Generated with Claude Code