Unify chat runtimes and execution - #48
Conversation
…ntly Select an available Vite port by default while preserving strict behavior for explicit ports, and let Vite own browser opening in development. Resolve prompt setup through the shared shell configuration so working-directory semantics remain consistent.
… MCP Add request-scoped, authenticated MCP capabilities for Claude and Codex agent providers, including shared tool policy resolution, schema validation, approvals, expiry, and revocation. Propagate structured chat runtimes and agent prompts so new and resumed sessions receive consistent caller-owned tools, while disabled tool sets remain tool-free. Advertise caller-tool support through model capabilities and catalogs. BREAKING CHANGE: NewCodexAppServer now accepts ai.Config instead of a model string.
Add disabled-model filtering to whoami and expose exact backend/model runtime data for prompts. Use canonical run requests for preview and execution, and require explicit Save as for read-only prompts to prevent implicit local forks. BREAKING CHANGE: Updating a read-only prompt now fails; clients must use Save as/create to make an editable copy.
…-tool approvals Persist chat execution identity, prompt runs, credential leases, and tool approval requests so caller tools are bound to the admitted session and can be revoked or revalidated throughout a run. Route live approval resolutions through durable authority, recover approval state from stored thread messages, and propagate provider tool-use IDs through the Claude agent bridge. BREAKING CHANGE: agent-backed caller tools now require an authoritative execution with MCP enabled
Keep runtime model metadata aligned with catalog capability defaults and verify disabled selections remain consistent under concurrent updates.
Expose process diagnostics for cmux surfaces, panes, workspaces, and individual PIDs. Report runtime, resource usage, listeners, process locations, and optional Go stacks for easier local debugging. Claude-Session-Id: 019fc117-12df-7130-a435-2df0841694df
…ripts Unwrap static sh/bash/zsh wrappers so rendered transcripts show the actual command while preserving shell flags and arguments. Centralize streaming and history output on canonical transcript rows, with safer tool-result handling and TTY redraw support. Preserve raw history serialization when explicitly requested.
Preserve one canonical transcript representation across Claude, Codex, and live agent events so wrapped shell commands display and serialize consistently. Use stateful rendering with flush and error propagation for streamed output while avoiding duplicate rows across iterations. BREAKING CHANGE: Message.Raw is no longer serialized in canonical session JSON
Claude-Session-Id: 019fc16e-32f2-7263-aeaa-d7cad6482315
Use the v0.0.54 action revision for lint and test jobs and align with its updated configuration interface.
Align the webapp's React and React DOM type packages with current React 19 declarations while keeping the runtime on React 18.
Expose cmux workspace, pane, and surface inspection through the CLI. Resolve target process trees and present runtime, resource, listener, location, and optional Go stack details for easier debugging.
Replace credential-based approval identity with prompt-run, turn, model-call, and tool-call identity. Backfill only unambiguous legacy approvals, fail loudly on ambiguous or invalid records, and preserve persistence failures through the chat lifecycle. Claude-Session-Id: 019fc6e7-5e07-7282-b87b-26c0d445dd1d
…l selection Adds first-class API availability reporting for adapters, models, and runtime modes so clients can explain why a choice is not selectable and how to remediate it. Propagates a shared refresh path (`--no-cache`) through model probing and OpenRouter pricing so whoami/catalog queries can request fully live state. Introduces runtime probes (including claude-agent dependency/binary checks) and uses them to drive adapter readiness and catalog availability instead of only PATH checks. Adds `/api/chat/runtimes` and enriches chat/model catalog wiring so the web UI and picker can show disabled/unavailable entries with reasons. Tightens stream and persistence handling to terminalize outstanding tool calls consistently on provider errors/interruption so partially rendered tool rows do not linger. Improves session transcript notices by attributing filter exclusion and window truncation separately for clearer user guidance. Adds coverage for new availability, pricing refresh, runtime probe, tool rendering, catalog, resolver, service, and CLI transcript behavior.
Keep `serve` bound to an explicit `--port` (9020 by default) in all modes and reject `0`, replacing the previous dev-only ephemeral-port behavior. Wire captain's HAR/HTTP tracing through the default transport with verbosity-mapped laddering, redaction, and explicit failure flush even when the command returns an error. Make malformed `http.har.level` handling fail fast and surface the error immediately. Surface runtime `-P`/`--no-color`/HAR knobs in root `--help`, and add regression tests for transport wrapping, redaction, and HAR capture. BREAKING CHANGE: `captain serve --dev` can no longer be started on an ephemeral port, so scripts depending on `--port 0` must pass a concrete value.
Remap `captain_session_processes` entries to the surviving session during duplicate-session consolidation so related process records are not left tied to discarded session rows. Add migration test coverage for new contract files and assert verification steps are run, and that the migration lock is always released even when verification fails.
Ensures ProbeAdapters now treats NoCache as a live refresh request for authenticated backends, preventing stale persisted model caches from being reused. Adds a regression test that verifies no-cache flips ResolveOptions.Refresh and still returns resolved models in the response. Registers the Claude tool role "System" in the tool factory so System tool calls resolve to the proper concrete tool.
Add read-only secondary database contexts with per-request selection and route database reads to the active context while keeping monitoring and writes on the default database. Persist provider-reported costs alongside list-price buckets, deduplicate transcript usage, and expose accurate cost breakdowns and context occupancy across CLI, API, and chat surfaces. BREAKING CHANGE: Replace BindDatabaseURLFlag with BindDatabaseFlags, change RunCost to accept context, and update ThreadStore integrations to use request-scoped providers. Claude-Session-Id: fa38bd74-0e81-4302-9a21-90eca363fb5b
Claude-Session-Id: fa38bd74-0e81-4302-9a21-90eca363fb5b
Resolve provider session IDs across all matching source rows so persisted plans take precedence and transcript recovery finds the correct session. Render parentless slices and cyclic session graphs without dropping sessions or recursing indefinitely. Claude-Session-Id: ecda992b-ba22-451e-ac52-736cf1748169
Agent runs can start below a repository root or edit through patches, which previously caused valid work to be rejected or omitted from commits. Genkit tool events now correlate by provider call reference, preventing ambiguous same-name calls from being mismatched. Runtime model rows retain the correct catalog provider, and HAR capture respects configured logging.
Add automatic, agent-selected, and user-defined chat session titles with precedence rules and rename support. Make execution admission transactional, recover incomplete turns, and reject concurrent open turns. Ignore assistant messages that contain only UI metadata so persisted chat history can be replayed safely. BREAKING CHANGE: ThreadStore implementations must implement SetTitle
|
Important Review skippedToo many files! This PR contains 328 files, which is 228 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (328)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Gavel summary
Totals: 0 passed · 0 failed · 0 skipped · - |
Gavel crashed before producing resultsExit code: 1 Last lines of gavel.logFull |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Session surfaces previously derived files and stored metadata through separate paths, causing Claude, Codex, CLI, and database results to diverge. Centralize tool-footprint and overview projection logic, roll descendant files into thread parents, and source approvals from turn-request rows. Remove unused session row and artifact-view projections while retaining migration-safe overview columns. BREAKING CHANGE: remove the unused session row projection API and captain_session_files view Claude-Session-Id: 1a13a7fd-d1e9-41fe-9a43-5d286807a66f
Persist lifecycle hook notices as system messages and stream them with model output so commits remain visible in run transcripts. Reserve negative transcript sequences to prevent later ingestion from overwriting notices, and avoid duplicate commit failures during agent-phase sweeps.
What
Notes
NewCodexAppServer,Message.Raw, database APIs,ThreadStore, andserve --port 0.