Repository navigation
feat(standalone-cli): add cursor and kiro standalone cli tabs - #519
Conversation
Widen the CLI session contract from ManagedExecutionProviderId to ProviderId so every provider can run as a standalone CLI tab, and extract provider launch specs into cli-session-launch.ts with an assertNever guard so adding a provider fails typecheck until the standalone CLI wiring is updated. Kiro sessions resume via `chat --resume-id`, discovered by polling `kiro-cli chat --list-sessions --format json`. Cursor chat ids are pre-issued through a new `terminal:create-cursor-chat-id` IPC and passed as `--resume <chatId>`, falling back to a non-resumable session when issuance fails. Also adds docs/developer/adding-a-provider.md as the provider addition checklist, plus AGENTS.md and provider-runtime-symmetry skill guardrails pointing at it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
b92f152 |
2026-09-10 00:33 UTC | 0 | -7 | -7 |
9dc844b < |
2026-09-10 01:20 UTC | 0 | 0 | 0 |
Last scanned: 9dc844b · 2026-09-10 01:20 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
b92f152 |
2026-09-10 00:33 UTC | 0 | 0 | 0 |
9dc844b < |
2026-09-10 01:20 UTC | 0 | 0 | 0 |
Last scanned: 9dc844b · 2026-09-10 01:20 UTC
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b92f152680
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ( | ||
| summary.updatedAtMs < | ||
| args.startedAtMs - KIRO_SESSION_DISCOVERY_LOOKBACK_MS | ||
| ) { |
There was a problem hiding this comment.
Exclude pre-spawn Kiro sessions
When a Kiro tab is restarted shortly after activity, the immediate discovery scan accepts the just-closed session because its updatedAtMs can be up to 15 seconds before this PTY's start and its claim was released during close. If the new CLI has not created its own list entry yet, that old session becomes bestMatch and is persisted as the new PTY's native ID, so the next app launch resumes the conversation that Restart was supposed to discard. Snapshot and exclude preexisting IDs before spawning, or otherwise require evidence that the candidate belongs to this launch.
Useful? React with 👍 / 👎.
| const launchTab = await resolveStandaloneCliLaunchTab({ | ||
| tab: args.tab, | ||
| folderPath: props.folderPath, | ||
| cursorBinaryPath, | ||
| createCursorChatId: window.api?.terminal?.createCursorChatId, |
There was a problem hiding this comment.
Cancel superseded Cursor prelaunch work
When the Cursor chat-ID request is still pending and the user presses Restart or changes the standalone folder, the session-manager effect is replaced but this asynchronous prelaunch continues. The stale completion can still create a PTY in the shared slot and return an ID that the manager records before checking its cancelled flag; it can then close a slot already adopted by the newer effect or repopulate the cleared store with the old folder's chat ID. Make this prelaunch generation-aware or abortable so superseded work is discarded before spawning.
AGENTS.md reference: AGENTS.md:L185-L185
Useful? React with 👍 / 👎.
terminal-runtime.ts grew past its max-lines ratchet after the Kiro session discovery poller landed. Move both the Codex and Kiro discovery pollers, their constants, and the native-id claim maps into native-session-discovery.ts, which the runtime now instantiates with its sessions map. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # docs/providers/provider-runtimes.md Co-authored-by: heath-s <5037055+heath-s@users.noreply.github.com>
Head branch was pushed to by a user without write access
Resolved by merging |
Summary
Standalone CLI 탭에서 Cursor와 Kiro를 지원하고, 앞으로 새 AI provider가 추가될 때 대응하는 standalone CLI도 함께 추가되도록 강제 장치와 가이드를 넣었습니다.
Changes
Features
kiro-cli chat --list-sessions --format json폴링으로 세션 id를 발견하고chat --resume-id <id>로 재개terminal:create-cursor-chat-idIPC로 chatId를 사전 발급해--resume <chatId>로 실행. 발급 실패 시 id 없이 정상 시작(해당 대화만 재개 불가)Refactors / Chores
CliSessionCreateSessionArgs.providerId와 IPC 스키마를ManagedExecutionProviderId→ProviderId로 확장electron/host-service/cli-session-launch.ts로 분리하고assertNever적용.terminal-runtime.ts의 인라인 분기(Claude 외 전부 Codex 취급)를 제거docs/developer/adding-a-provider.mdprovider 추가 체크리스트.AGENTS.md와the-provider-runtime-symmetry스킬에 standalone CLI parity 가드레일 추가새
ProviderId가 추가되면STANDALONE_CLI_TAB_TITLE(Record<ProviderId, string>), launch spec의assertNever, runtime optionsswitch3곳에서 typecheck가 깨집니다. 문서는 왜 깨졌는지를 안내하는 역할입니다.Test Evidence
bun run typecheck통과Notes