Modernize coding CLI integrations and live status - #222
Conversation
Add protocol-aware session and live status handling, attachment input, ACP permission mediation, and updated coding CLI adapters. Remove Kiro and Gemini support and expand deterministic integration coverage.
…ocols # Conflicts: # packages/ims/discord/client.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 729d02ab5b
ℹ️ 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".
| pendingOpenCodePermissions.set(requestId, { | ||
| session, | ||
| subscriptionSessionId: sessionId, | ||
| interactionSessionId, | ||
| directory, | ||
| }); | ||
| session.awaitingInteractionSessionIds.add(interactionSessionId); | ||
| eventsToDispatch.push({ directory, payload: permissionQuestion }); |
There was a problem hiding this comment.
Route scheduled OpenCode permissions before waiting
When an OpenCode task or cron turn requests a protected tool, this path leaves the provider request unresolved after publishing the question. The task and cron schedulers await agent.sendMessage directly (packages/core/tasks/scheduler.ts and packages/core/cron/scheduler.ts) without subscribing to session events or replying to questions, so no user ever sees this prompt and the run hangs until its two-hour timeout. Scheduled turns need a permission-aware event loop or an explicit noninteractive policy.
AGENTS.md reference: AGENTS.md:L26-L26
Useful? React with 👍 / 👎.
| if (process.env.ODE_CLAUDE_LEGACY_CLI === "1") { | ||
| return sendMessageViaCli(channelId, sessionId, input, workingPath, options, context); | ||
| } | ||
| return sendMessageViaSdk(channelId, sessionId, input, workingPath, options, context); |
There was a problem hiding this comment.
Fall back when the Claude SDK cannot start
In the default Claude path, any SDK startup or protocol-initialization failure propagates directly from sendMessageViaSdk, even when the existing claude CLI transport is usable; the CLI fallback is only reachable through a manually configured environment variable. Catch startup-specific SDK failures here and invoke sendMessageViaCli so a local SDK incompatibility does not disable Claude entirely.
AGENTS.md reference: AGENTS.md:L35-L36
Useful? React with 👍 / 👎.
| await this.request("initialize", { | ||
| clientInfo: { name: "ode", title: "Ode", version: "0.2.0" }, | ||
| capabilities: { experimentalApi: true, requestAttestation: false }, | ||
| }); |
There was a problem hiding this comment.
Bound Codex app-server initialization
If the spawned Codex app-server remains alive but never answers initialize—for example because its protocol surface is incompatible or startup stalls—this request never settles, so the catch that classifies app-server unavailability and the CLI fallback in codex/client.ts are never reached. Add a startup timeout that closes the connection and throws CodexAppServerUnavailableError.
AGENTS.md reference: AGENTS.md:L35-L36
Useful? React with 👍 / 👎.
|
|
||
| const parentId = message.channel.id; | ||
| if (configuredChannels && !configuredChannels.includes(parentId)) return; | ||
| const attachments = await downloadDiscordMessageAttachments(message); |
There was a problem hiding this comment.
Check Discord routing before downloading attachments
For every top-level message in a configured Discord channel, attachments are downloaded and retained before the later topLevelMentioned check drops messages that did not mention the bot. Unrelated channel traffic can therefore make Ode fetch and store up to the configured per-message limit even though the message will never be processed; determine whether the message is eligible first, then download its attachments.
Useful? React with 👍 / 👎.
Summary
Validation
bun test: 438 passed, 1 skipped, 0 failedbun run typecheck