feat: unify ai runtime authority - #47
Conversation
|
Important Review skippedToo many files! This PR contains 298 files, which is 198 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. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (298)
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…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
73a32f1 to
f583d68
Compare
Gavel crashed before producing resultsExit code: 1 Last lines of gavel.logFull |
Gavel summary
Totals: 0 passed · 0 failed · 0 skipped · - |
Gavel-Issue-Id: 4b68a029-3baf-4dd1-89cf-0c1e06bb91a0 Claude-Session-Id: 019fd638-2969-7603-97cd-7314383b273c
Gavel-Issue-Id: 8e6a99ca-be32-4781-a4d2-17b2895e555f Claude-Session-Id: 019fd638-2969-7603-97cd-7314383b273c
Gavel-Issue-Id: 4b68a029-3baf-4dd1-89cf-0c1e06bb91a0 Claude-Session-Id: 019fd638-2969-7603-97cd-7314383b273c
Gavel-Issue-Id: 8e6a99ca-be32-4781-a4d2-17b2895e555f Claude-Session-Id: 019fd638-2969-7603-97cd-7314383b273c
Gavel-Issue-Id: 8e6a99ca-be32-4781-a4d2-17b2895e555f Claude-Session-Id: 019fd638-2969-7603-97cd-7314383b273c
What
/api/chat/runtimes), live refresh behavior, and prompt-runtime filtering/metadata consistency so clients show accurate selectable/unavailable entries.--devbehavior.Why
Notes
captain serve --devno longer supports--port 0,NewCodexAppServerconfig shape changed, and canonical session JSON no longer serializesMessage.Raw.