Skip to content

feat(cli): Add runtime profiles - #108

Open
moshloop wants to merge 26 commits into
mainfrom
feat/cli-runtime-profiles-vite-proxy
Open

feat(cli): Add runtime profiles#108
moshloop wants to merge 26 commits into
mainfrom
feat/cli-runtime-profiles-vite-proxy

Conversation

@moshloop

@moshloop moshloop commented Sep 2, 2026

Copy link
Copy Markdown
Member

What

  • Add catalog-backed runtime presets and profiles across CLI, API, MCP, prompt rendering, and chat defaults.
  • Expose layered resolution traces and live model metadata.
  • Proxy Captain development UI requests through Vite.

Notes

  • Extend CI timeout for expanded test coverage.

Claude-Session-Id: 01a04225-f4a8-7490-b9e7-6db50c066bbb
…n to sessions

Split composite `backend` column that conflated provider, mode, and adapter ID into explicit columns. Add `parent_relation` to distinguish agent vs transcript parent relationships. Views expose new columns via aliasing for compatibility. Backfill handles divergent vocabularies from multiple sources idempotently. Add migration safety test for co-tenant enum preservation.
Migrate from backend-prefixed model names (claude-agent-opus) to explicit `mode:` field combined with normalized model names (claude-opus-5). Centralizes runtime resolution via ai.Resolve() to consider both model family and authored mode together.

Authored mode is now validated — cannot be silently dropped. Updates all test fixtures and adds contract validation that mode selection pins the runtime choice.
Rename Backend to Mode and introduce Provider field in the Runtime
abstraction, separating execution mode (API, CLI, Agent) from LLM
provider (Anthropic, OpenAI, etc.). GetBackend() method replaced with
GetRuntime() returning a Runtime struct.

BREAKING CHANGE: GetBackend() removed; Backend field replaced with Mode
and Provider fields in Model struct.
…irs resolved upfront

Split the ambiguous Backend enum—which meant adapter outbound, mode inbound—into Provider (family) and RuntimeMode (mechanism), resolved once at the boundary before any factory runs.

Key changes:
- Model.Backend deleted; Model now carries Provider + Mode fields set by Resolve
- All provider factories receive pre-resolved models; no re-normalization
- RuntimeOf(provider, mode) creates the pair; ProviderFor(name) derives only family
- GetBackend() → GetRuntime() throughout; update all adapter interfaces
- Wire format: `backend` key becomes `mode`; provider lives off-wire
- Sandbox: SandboxNone→SandboxOff, SandboxSRT→SandboxSRTInternal, introduce SandboxNative
- Remove composite mode tokens from claim table; mode comes from selector or default

Impact: Model captain records and model the CLI receives are now identical. Sandbox policy translates uniformly across all providers via api.TranslateClaudeSandbox and api.TranslateCodexSandbox.
…mposite adapters

Replace the flat Backend identifier ("claude-agent", "codex-cli") with an explicit (provider, mode) pair. Provider names the family (anthropic, openai, google, deepseek); mode names the mechanism (api, agent, cli, cmux).

Separate permission mode from sandbox isolation. Whether an agent asks before acting is now independent of what it can reach, fixing the confusing equivalence where `sandbox: off` forced `bypassPermissions`.

Sandbox refactoring: rename SandboxNone→Off, SandboxSRT→Native, SandboxContainer→Docker. SandboxRef.Backend becomes SandboxRef.Mode. Add provider-neutral NativeSandboxPolicy with per-provider translators.

Config changes: remove global ai.backend/model/reasoningEffort; move under ai.providers.<provider>. Add agent_resources.go to declare what each CLI sees, runtime_arguments.go to map native flags to Spec paths.

BREAKING CHANGE: Backend type removed; use Runtime{Provider, Mode}. Config format changed; old files rejected with migration guidance.
Replace the monolithic Backend enum with a two-axis Runtime system: Provider
(the model family: Anthropic, OpenAI, Google, DeepSeek) and Mode (the execution
mechanism: api, agent, cli, cmux). This decouples family selection from runtime
selection so each can be configured independently.

- ModelProvider replaces Backend as the family descriptor
- RuntimeMode replaces the mode suffix in backend names
- All adapter, model, and schema operations now take (Provider, Mode) instead of Backend
- Model definitions now carry Provider+Mode fields instead of Backend
- Runtime selection logic restructured to select along independent axes
- Updates signature of ResolveAPIKey, ListModels, RegistryModelDefs, and other
  model discovery functions to reflect the two-axis design
- Keeps all external APIs and behavior unchanged; internal refactoring only
BREAKING CHANGE: Wire format for runtime selection changes from {"backend":"adapter-name"} to {"mode":"api|agent|cli"}; provider is inferred from model name. Thread.Runtime type changes from *api.Model to *api.RuntimeIdentity.

The monolithic Backend enum conflated provider identity (Anthropic, OpenAI) with execution mode (API, Agent, CLI), making invalid runtime states constructible and confusing credentials (per-provider) with runtime choices (per-turn). This split separates concerns: Provider is a ModelProvider struct identifying API endpoints and agent binaries; Mode is the runtime mechanism chosen at execution time. Credentials belong to a provider; mode is a per-turn choice that does not affect authentication.

Thread locking now uses RuntimeIdentity (model/provider/mode) to avoid earlier bugs where hand-built identities omitted Mode, allowing clients to post a different runtime than the one they read. Also adds history recovery for incomplete terminal sessions, terminal execution atomicity, and improved HTTP error status codes for concurrency conflicts.
…te management

Refactor the prompt workbench into modular components and improve state management to support concurrent editing of multiple prompts:

- Extract `PromptDetailPane`, `PromptSidebar`, `PromptWorkbenchActions`, `PromptCatalogView`, `PromptDeleteDialog` into separate components for maintainability
- Move state management to per-prompt slots, enabling drafts to survive navigation between prompts
- Implement conflict detection via `baseVersion` on save
- Add duplicate and delete confirmation UX
- Support repair mode for prompts with parse errors
- Refetch permission catalog when runtime selection changes (keyed by resolved adapter)
- Show file destination preview before creating/saving a prompt
- Extract API utilities to `promptWorkbenchApi`, `promptDetailState`, `promptWriteDestination`, `promptAgentTools`
- Update documentation terminology: `backend` → `mode` (runtime mechanism: api/agent/cli/cmux)
…gent sessions

Replaces bufio.Scanner with a custom jsonl.Reader that has no hardcoded line
size limit, avoiding silent truncation of large JSONL entries (e.g., Codex
compaction records). Refactors Codex session building to properly handle
forked/subagent threads as separate sessions linked to their parent,
preventing duplicate turn records on (session_id, provider_turn_id). Clarifies
Provider, ModelMode, and ExecutionMode fields in the session model.
…d mode

Replace the composite Backend enum (e.g., BackendClaudeAgent, BackendCodexCLI) with independent Provider (*api.ModelProvider) and Mode (api.RuntimeMode) fields throughout the CLI. This allows independent reasoning about provider families and execution mechanisms, enabling clearer expression of which providers support which modes and stricter validation.

BREAKING CHANGE: Configuration field "backend" becomes "mode" and "provider"; JSON output changes from {"backend":"..."} to {"provider":"...","mode":"..."}. Migration required for saved configurations and external tools depending on the old contract.
The "backend" concept was overloaded: it named both the adapter identity (anthropic, openai) and the composite runtime mechanism (api, cli, agent, cmux). This conflation made it impossible to derive one axis from the other.

Split into two explicit concepts:
- **provider**: the LLM family (derived from model name or explicitly chosen)
- **mode**: the execution mechanism (api|cli|agent|cmux), explicit from model prefix or CLI flag

Updates database schema via migrations 79–80, which recover both axes from composite values recorded in metadata and transcripts. Adds session hierarchy tracking (agent vs transcript children) to exclude provider mirrors from thread views. Improves prompt run error reporting and conflict detection.

All APIs, CLI flags, and test fixtures updated. Backward compatibility for task.json payloads validated at runtime. Sandbox kind names aligned with actual behavior (docker, off, native, srt).
Replace monolithic Backend enum with separate ModelProvider and RuntimeMode
types to clarify the distinction between "which provider" and "how it's invoked".

This improves type safety and enables flexible runtime combinations. Update all
provider registration, configuration, and observation code to use the new
Provider+Mode pair. Remove Backend field from runtime observations.

BREAKING CHANGE: Backend-keyed API surface replaced with Provider+Mode pair;
callers must update RegisterProvider(), ResolveRuntimeSelectors(), and related
function signatures.
Claude-Session-Id: 01a05ce8-8352-7740-ac44-d48f1b792cb4
Claude-Session-Id: 01a05ce8-8352-7740-ac44-d48f1b792cb4
Claude-Session-Id: 01a05ce8-8352-7740-ac44-d48f1b792cb4
Claude-Session-Id: 01a05ce8-8352-7740-ac44-d48f1b792cb4
Claude-Session-Id: 01a05ce8-8352-7740-ac44-d48f1b792cb4
Update shared backend and UI dependencies to stable releases for reproducible builds.
Add a consolidated runtime catalog and profiles workspace for selecting, configuring, and resolving provider/mode/model combinations. Replace backend-oriented prompt and session metadata with provider and mode fields, and improve runtime availability controls and error diagnostics.
Share one runtime-profile selection across chat and catalog endpoints, project live adapter readiness into model/runtime pickers, and preserve provider-specific CLI models. Validate profile pins and return client errors for rejected selections while retaining deployment tool-policy capability gaps for UI inspection.
Add reusable runtime presets and profiles backed by database and YAML catalogs, with layered resolution, canonical IDs, name validation, and reference protection. Enforce model, fallback, quota, and input-token constraints while correcting provider catalog keys and runtime binary validation order.
Add catalog-backed runtime presets and profiles across CLI, API, MCP, prompt rendering, and chat defaults. Expose layered resolution traces and live model metadata, and proxy Captain development UI requests through Vite. Extend CI timeout to accommodate the expanded test coverage.
@moshloop
moshloop enabled auto-merge (rebase) September 2, 2026 11:15
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration

Totals: 0 passed · 0 failed · 0 skipped · -

View full results

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 534 files, which is 434 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4fb9c9bb-b610-4c4a-9761-31b59253f831

📥 Commits

Reviewing files that changed from the base of the PR and between b87b5bc and e0165f8.

⛔ Files ignored due to path filters (4)
  • go.sum is excluded by !**/*.sum
  • pkg/cli/webapp/dist/.gitkeep is excluded by !**/dist/**
  • pkg/cli/webapp/dist/index.html is excluded by !**/dist/**
  • pkg/cli/webapp/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (534)
  • .gavel.yaml
  • .github/workflows/test.yml
  • .gitignore
  • cmd/captain/main.go
  • cmd/captain/runtime_entities_routes_test.go
  • docs/src/components/PromptApiShapes.tsx
  • docs/src/components/RuntimeSpecDemo.tsx
  • docs/src/pages/prompts/format.mdx
  • docs/src/pages/prompts/runtime.mdx
  • docs/src/pages/prompts/sources-api.mdx
  • docs/src/pages/todos/execution.mdx
  • docs/src/pages/todos/index.mdx
  • go.mod
  • migrations/00_types.pg.hcl
  • migrations/10_sessions.pg.hcl
  • migrations/20_prompt_runs_and_plans.pg.hcl
  • migrations/30_execution.pg.hcl
  • migrations/32_execution_approvals.pg.hcl
  • migrations/41_runtime_profiles.pg.hcl
  • migrations/60_view_session_overview.sql
  • migrations/61_view_session_transcript.sql
  • migrations/62_view_session_turns.sql
  • migrations/63_view_session_agents.sql
  • migrations/67_view_session_costs.sql
  • migrations/78_session_parent_relation.sql
  • migrations/79_runtime_provider_mode.sql
  • migrations/80_runtime_metadata_mode.sql
  • migrations/approval_identity_upgrade_integration_test.go
  • migrations/enum_upgrade_integration_test.go
  • migrations/index_pruning_integration_test.go
  • migrations/migrations_test.go
  • pkg/ai/adapter_models.go
  • pkg/ai/adapters.go
  • pkg/ai/adapters_cache_test.go
  • pkg/ai/adapters_test.go
  • pkg/ai/agent.go
  • pkg/ai/agent/commit/notice_test.go
  • pkg/ai/agent/runner_test.go
  • pkg/ai/agent/runner_timeout_test.go
  • pkg/ai/agent/verify/prompt_hooks_test.go
  • pkg/ai/agent_close_ginkgo_test.go
  • pkg/ai/agent_test.go
  • pkg/ai/attachment_capabilities.go
  • pkg/ai/attachment_capabilities_ginkgo_test.go
  • pkg/ai/availability.go
  • pkg/ai/availability_test.go
  • pkg/ai/catalog.go
  • pkg/ai/catalog_disabled_ginkgo_test.go
  • pkg/ai/catalog_info.go
  • pkg/ai/catalog_info_test.go
  • pkg/ai/catalog_resolve.go
  • pkg/ai/catalog_resolve_test.go
  • pkg/ai/catalog_test.go
  • pkg/ai/client.go
  • pkg/ai/fallback.go
  • pkg/ai/fallback_test.go
  • pkg/ai/generation_config.go
  • pkg/ai/generation_config_test.go
  • pkg/ai/history/codex_fork_ginkgo_test.go
  • pkg/ai/history/codex_parser.go
  • pkg/ai/history/codex_types.go
  • pkg/ai/history/parser.go
  • pkg/ai/internal/gen-model-registry/main.go
  • pkg/ai/live_catalog.go
  • pkg/ai/live_catalog_test.go
  • pkg/ai/log_identity.go
  • pkg/ai/loop.go
  • pkg/ai/loop_test.go
  • pkg/ai/middleware/caching.go
  • pkg/ai/middleware/logging.go
  • pkg/ai/middleware/logging_test.go
  • pkg/ai/middleware/retry.go
  • pkg/ai/middleware/schema_repair.go
  • pkg/ai/middleware/validation.go
  • pkg/ai/middleware/validation_test.go
  • pkg/ai/model_effort.go
  • pkg/ai/model_effort_ginkgo_test.go
  • pkg/ai/model_effort_test.go
  • pkg/ai/model_error.go
  • pkg/ai/model_error_test.go
  • pkg/ai/model_lists.go
  • pkg/ai/model_parse_conformance_test.go
  • pkg/ai/model_registry.go
  • pkg/ai/model_registry_test.go
  • pkg/ai/models_codex.go
  • pkg/ai/models_remote.go
  • pkg/ai/models_remote_test.go
  • pkg/ai/price_usage_ginkgo_test.go
  • pkg/ai/pricing_coverage_test.go
  • pkg/ai/prompt/document.go
  • pkg/ai/prompt/document_test.go
  • pkg/ai/prompt/prompt.go
  • pkg/ai/prompt/prompt_test.go
  • pkg/ai/prompt/testdata/fixtures/anthropic-claude-opus.prompt
  • pkg/ai/prompt/testdata/fixtures/anthropic-claude-sonnet.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-agent-opus.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-agent-sonnet.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-cli-opus.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-cli-sonnet.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-cmux-opus.prompt
  • pkg/ai/prompt/testdata/fixtures/claude-cmux-sonnet.prompt
  • pkg/ai/prompt/testdata/fixtures/codex-agent.prompt
  • pkg/ai/prompt/testdata/fixtures/codex-cli.prompt
  • pkg/ai/prompt/testdata/fixtures/codex-cmux.prompt
  • pkg/ai/prompt/testdata/fixtures/deepseek.prompt
  • pkg/ai/prompt/testdata/fixtures/gemini-api.prompt
  • pkg/ai/prompt/testdata/fixtures/gemini-cli.prompt
  • pkg/ai/prompt/testdata/fixtures/openai-gpt.prompt
  • pkg/ai/prompt/testdata/options.prompt
  • pkg/ai/provider.go
  • pkg/ai/provider/caller_tools_ginkgo_test.go
  • pkg/ai/provider/claude_cli.go
  • pkg/ai/provider/claude_cli_test.go
  • pkg/ai/provider/claudeagent/agent.ts
  • pkg/ai/provider/claudeagent/bridge_params.go
  • pkg/ai/provider/claudeagent/caller_tools_ginkgo_test.go
  • pkg/ai/provider/claudeagent/mapping_test.go
  • pkg/ai/provider/claudeagent/permission_capabilities_test.go
  • pkg/ai/provider/claudeagent/permissions_test.go
  • pkg/ai/provider/claudeagent/provider.go
  • pkg/ai/provider/claudeagent/provider_test.go
  • pkg/ai/provider/claudeagent/runner.go
  • pkg/ai/provider/claudeagent/turn.go
  • pkg/ai/provider/cli.go
  • pkg/ai/provider/cli_test.go
  • pkg/ai/provider/cmux/executor.go
  • pkg/ai/provider/cmux/executor_test.go
  • pkg/ai/provider/cmux/permission_capabilities_test.go
  • pkg/ai/provider/cmux/provider.go
  • pkg/ai/provider/cmux/provider_test.go
  • pkg/ai/provider/coalesce.go
  • pkg/ai/provider/codex_appserver.go
  • pkg/ai/provider/codex_appserver_approval.go
  • pkg/ai/provider/codex_appserver_params_test.go
  • pkg/ai/provider/codex_appserver_protocol.go
  • pkg/ai/provider/codex_appserver_test.go
  • pkg/ai/provider/codex_cli.go
  • pkg/ai/provider/codex_cli_test.go
  • pkg/ai/provider/gemini_cli.go
  • pkg/ai/provider/gemini_cli_test.go
  • pkg/ai/provider/genkit/gemini_transport_ginkgo_test.go
  • pkg/ai/provider/genkit/genkit.go
  • pkg/ai/provider/genkit/genkit_test.go
  • pkg/ai/provider/genkit/instance.go
  • pkg/ai/provider/genkit/instance_test.go
  • pkg/ai/provider/genkit/mapping.go
  • pkg/ai/provider/genkit/options.go
  • pkg/ai/provider/genkit/tool_approval_ginkgo_test.go
  • pkg/ai/provider/genkit/tool_lifecycle_ginkgo_test.go
  • pkg/ai/provider/genkit/tools.go
  • pkg/ai/provider/init.go
  • pkg/ai/provider/monitor_hooks.go
  • pkg/ai/provider/openai/input.go
  • pkg/ai/provider/openai/observation_test.go
  • pkg/ai/provider/openai/provider.go
  • pkg/ai/provider/permission_capabilities_test.go
  • pkg/ai/provider/sandbox_seam_test.go
  • pkg/ai/provider/sandbox_translation.go
  • pkg/ai/provider/sandbox_translation_ginkgo_test.go
  • pkg/ai/provider_test.go
  • pkg/ai/runtime_probe.go
  • pkg/ai/runtime_selection_ginkgo_test.go
  • pkg/ai/runtime_selector.go
  • pkg/ai/runtime_selector_test.go
  • pkg/ai/schema.go
  • pkg/ai/schema_claude_cli_ginkgo_test.go
  • pkg/ai/schema_test.go
  • pkg/ai/tools/strategies_ginkgo_test.go
  • pkg/ai/tools/tools.go
  • pkg/aichat/aimock_lifecycle_integration_test.go
  • pkg/aichat/approval_execution.go
  • pkg/aichat/approval_http.go
  • pkg/aichat/database_thread_recovery.go
  • pkg/aichat/database_thread_recovery_integration_test.go
  • pkg/aichat/database_threads.go
  • pkg/aichat/database_threads_integration_test.go
  • pkg/aichat/execution.go
  • pkg/aichat/execution_authority_ginkgo_test.go
  • pkg/aichat/execution_database.go
  • pkg/aichat/execution_database_authority.go
  • pkg/aichat/execution_database_integration_test.go
  • pkg/aichat/execution_database_terminal.go
  • pkg/aichat/execution_terminal_integration_test.go
  • pkg/aichat/layered_runtime_profile.go
  • pkg/aichat/messages.go
  • pkg/aichat/messages_ginkgo_test.go
  • pkg/aichat/messages_model_ginkgo_test.go
  • pkg/aichat/persistence.go
  • pkg/aichat/provider_config.go
  • pkg/aichat/resolver.go
  • pkg/aichat/runtime_profile.go
  • pkg/aichat/runtime_profile_ginkgo_test.go
  • pkg/aichat/runtime_profile_selection_ginkgo_test.go
  • pkg/aichat/runtime_profiles_http.go
  • pkg/aichat/runtime_profiles_http_ginkgo_test.go
  • pkg/aichat/service.go
  • pkg/aichat/service_ginkgo_test.go
  • pkg/aichat/session_title_ginkgo_test.go
  • pkg/aichat/sse.go
  • pkg/aichat/testdata/recovery-claude.jsonl
  • pkg/aichat/thread_identity_ginkgo_test.go
  • pkg/aichat/threads.go
  • pkg/aichat/threads_http.go
  • pkg/aichat/tools_http.go
  • pkg/aichat/tools_http_ginkgo_test.go
  • pkg/aichat/wire.go
  • pkg/aichat/wire_ginkgo_test.go
  • pkg/aichat/with_caps_ginkgo_test.go
  • pkg/aiflags/defaults.go
  • pkg/aiflags/flags.go
  • pkg/aimock/e2e_claude_agent_test.go
  • pkg/aimock/e2e_codex_cli_test.go
  • pkg/aimock/e2e_surfaces_test.go
  • pkg/aimock/genkit_test.go
  • pkg/aimock/wire_scenarios_test.go
  • pkg/api/agent_resources.go
  • pkg/api/aliases.go
  • pkg/api/budget.go
  • pkg/api/cli_options.go
  • pkg/api/cli_options_test.go
  • pkg/api/cost.go
  • pkg/api/is_empty_test.go
  • pkg/api/message_ginkgo_test.go
  • pkg/api/permission_capabilities.go
  • pkg/api/permission_capabilities_ginkgo_test.go
  • pkg/api/permissions.go
  • pkg/api/permissions_schema.go
  • pkg/api/pretty.go
  • pkg/api/pretty_test.go
  • pkg/api/prompt.go
  • pkg/api/registry/backend.go
  • pkg/api/registry/backend_test.go
  • pkg/api/registry/cost.go
  • pkg/api/registry/disabled.go
  • pkg/api/registry/disabled_ginkgo_test.go
  • pkg/api/registry/doc.go
  • pkg/api/registry/effort_disabled_ginkgo_test.go
  • pkg/api/registry/effort_support.go
  • pkg/api/registry/identity.go
  • pkg/api/registry/mode.go
  • pkg/api/registry/model.go
  • pkg/api/registry/model_compact.go
  • pkg/api/registry/model_compact_test.go
  • pkg/api/registry/model_disabled_ginkgo_test.go
  • pkg/api/registry/models.json
  • pkg/api/registry/parse.go
  • pkg/api/registry/provider.go
  • pkg/api/registry/providers.go
  • pkg/api/registry/runtime.go
  • pkg/api/registry/runtime_mode_ginkgo_test.go
  • pkg/api/registry/runtime_test.go
  • pkg/api/registry/sandbox.go
  • pkg/api/registry/sandboxes.go
  • pkg/api/registry/supported_models.go
  • pkg/api/runtime_arguments.go
  • pkg/api/runtime_arguments_ginkgo_test.go
  • pkg/api/runtime_catalog.go
  • pkg/api/runtime_catalog_ginkgo_test.go
  • pkg/api/runtime_config.go
  • pkg/api/runtime_constraints.go
  • pkg/api/runtime_event.go
  • pkg/api/runtime_field_presentation.go
  • pkg/api/runtime_observation.go
  • pkg/api/runtime_observation_test.go
  • pkg/api/runtime_profiles.go
  • pkg/api/runtime_profiles_ginkgo_test.go
  • pkg/api/runtime_provider.go
  • pkg/api/runtime_provider_ginkgo_test.go
  • pkg/api/runtime_registry.go
  • pkg/api/runtime_sandbox_schema.go
  • pkg/api/sandbox.go
  • pkg/api/sandbox_capabilities.go
  • pkg/api/sandbox_claude.go
  • pkg/api/sandbox_codex.go
  • pkg/api/sandbox_ginkgo_test.go
  • pkg/api/sandbox_policy.go
  • pkg/api/sandbox_ref.go
  • pkg/api/sandbox_ref_ginkgo_test.go
  • pkg/api/sandbox_registry.go
  • pkg/api/sandbox_unified_ginkgo_test.go
  • pkg/api/spec_layers.go
  • pkg/api/spec_merge.go
  • pkg/api/spec_merge_differential_test.go
  • pkg/api/spec_test.go
  • pkg/api/tool_approval_ginkgo_test.go
  • pkg/api/tool_policy_support_test.go
  • pkg/api/tool_preferences_ginkgo_test.go
  • pkg/api/toolcatalog.go
  • pkg/api/toolpolicy_ginkgo_test.go
  • pkg/captainconfig/config.go
  • pkg/captainconfig/config_test.go
  • pkg/captainconfig/removed.go
  • pkg/captainconfig/sandbox_test.go
  • pkg/claude/reader.go
  • pkg/cli/ai.go
  • pkg/cli/ai_agent.go
  • pkg/cli/ai_catalog.go
  • pkg/cli/ai_catalog_test.go
  • pkg/cli/ai_filters.go
  • pkg/cli/ai_filters_test.go
  • pkg/cli/ai_models.go
  • pkg/cli/ai_models_ginkgo_test.go
  • pkg/cli/ai_models_test.go
  • pkg/cli/ai_prompt_file.go
  • pkg/cli/ai_prompt_file_test.go
  • pkg/cli/ai_sandbox.go
  • pkg/cli/ai_sandbox_remote.go
  • pkg/cli/ai_sandbox_remote_test.go
  • pkg/cli/ai_sandbox_test.go
  • pkg/cli/ai_test.go
  • pkg/cli/attachments_ginkgo_test.go
  • pkg/cli/configure.go
  • pkg/cli/configure_provider.go
  • pkg/cli/configure_test.go
  • pkg/cli/gitagent_agent_api_ginkgo_test.go
  • pkg/cli/gitagent_runtask.go
  • pkg/cli/gitagent_runtask_test.go
  • pkg/cli/gitagent_serve_https.go
  • pkg/cli/history_cost_test.go
  • pkg/cli/main_test.go
  • pkg/cli/model_selection_ginkgo_test.go
  • pkg/cli/permission_catalog.go
  • pkg/cli/permission_catalog_test.go
  • pkg/cli/permissions_matrix.go
  • pkg/cli/permissions_matrix_test.go
  • pkg/cli/prompt_batch_run.go
  • pkg/cli/prompt_batch_session.go
  • pkg/cli/prompt_batch_session_ginkgo_test.go
  • pkg/cli/prompt_chat.go
  • pkg/cli/prompt_chat_ginkgo_test.go
  • pkg/cli/prompt_chat_http.go
  • pkg/cli/prompt_chat_types.go
  • pkg/cli/prompt_entity.go
  • pkg/cli/prompt_entity_test.go
  • pkg/cli/prompt_entity_write_ginkgo_test.go
  • pkg/cli/prompt_help_content.go
  • pkg/cli/prompt_layers.go
  • pkg/cli/prompt_layers_ginkgo_test.go
  • pkg/cli/prompt_observe.go
  • pkg/cli/prompt_observe_capture.go
  • pkg/cli/prompt_observe_test.go
  • pkg/cli/prompt_records.go
  • pkg/cli/prompt_render.go
  • pkg/cli/prompt_render_test.go
  • pkg/cli/prompt_run.go
  • pkg/cli/prompt_run_failure_ginkgo_test.go
  • pkg/cli/prompt_run_history.go
  • pkg/cli/prompt_run_live.go
  • pkg/cli/prompt_run_persist.go
  • pkg/cli/prompt_run_persist_test.go
  • pkg/cli/prompt_run_pretty_ginkgo_test.go
  • pkg/cli/prompt_run_result.go
  • pkg/cli/prompt_run_stream.go
  • pkg/cli/prompt_run_test.go
  • pkg/cli/prompt_run_workflow_test.go
  • pkg/cli/prompt_runtimes_ginkgo_test.go
  • pkg/cli/prompt_schema.go
  • pkg/cli/prompt_schema_build.go
  • pkg/cli/prompt_schema_http.go
  • pkg/cli/prompt_schema_http_test.go
  • pkg/cli/prompt_schema_sandboxes.go
  • pkg/cli/prompt_schema_sandboxes_test.go
  • pkg/cli/prompt_schema_test.go
  • pkg/cli/prompt_source.go
  • pkg/cli/prompt_source_test.go
  • pkg/cli/prompt_sources.go
  • pkg/cli/prompt_spec.go
  • pkg/cli/prompt_write.go
  • pkg/cli/provider_defaults.go
  • pkg/cli/provider_defaults_test.go
  • pkg/cli/runtime_entity_common.go
  • pkg/cli/runtime_entity_db_ginkgo_test.go
  • pkg/cli/runtime_entity_ginkgo_test.go
  • pkg/cli/runtime_preset_entity.go
  • pkg/cli/runtime_profile_catalog.go
  • pkg/cli/runtime_profile_entity.go
  • pkg/cli/serve.go
  • pkg/cli/serve_chat.go
  • pkg/cli/serve_chat_profile.go
  • pkg/cli/serve_chat_profile_ginkgo_test.go
  • pkg/cli/serve_disabled.go
  • pkg/cli/serve_disabled_test.go
  • pkg/cli/serve_openapi.go
  • pkg/cli/serve_port.go
  • pkg/cli/serve_port_ginkgo_test.go
  • pkg/cli/serve_provider_defaults.go
  • pkg/cli/serve_provider_defaults_test.go
  • pkg/cli/serve_provider_tokens.go
  • pkg/cli/serve_provider_tokens_test.go
  • pkg/cli/serve_sandbox_test.go
  • pkg/cli/serve_vite.go
  • pkg/cli/serve_vite_ginkgo_test.go
  • pkg/cli/session_get.go
  • pkg/cli/session_get_multi_test.go
  • pkg/cli/session_live_render.go
  • pkg/cli/session_live_render_test.go
  • pkg/cli/session_record_db.go
  • pkg/cli/sessions.go
  • pkg/cli/webapp/embed.go
  • pkg/cli/webapp/package.json
  • pkg/cli/webapp/src/App.tsx
  • pkg/cli/webapp/src/ChatLayer.tsx
  • pkg/cli/webapp/src/DisabledControls.tsx
  • pkg/cli/webapp/src/PromptBatchInspector.tsx
  • pkg/cli/webapp/src/PromptCatalogView.tsx
  • pkg/cli/webapp/src/PromptDeleteDialog.tsx
  • pkg/cli/webapp/src/PromptDetailPane.tsx
  • pkg/cli/webapp/src/PromptRunStream.test.tsx
  • pkg/cli/webapp/src/PromptRunStream.tsx
  • pkg/cli/webapp/src/PromptSidebar.tsx
  • pkg/cli/webapp/src/PromptWorkbench.test.ts
  • pkg/cli/webapp/src/PromptWorkbench.tsx
  • pkg/cli/webapp/src/PromptWorkbenchActions.tsx
  • pkg/cli/webapp/src/PromptWriteModal.test.tsx
  • pkg/cli/webapp/src/PromptWriteModal.tsx
  • pkg/cli/webapp/src/ProviderDefaultsControls.tsx
  • pkg/cli/webapp/src/RuntimeProfilesPage.test.tsx
  • pkg/cli/webapp/src/RuntimeProfilesPage.tsx
  • pkg/cli/webapp/src/StateMessage.tsx
  • pkg/cli/webapp/src/WhoamiModel.ts
  • pkg/cli/webapp/src/WhoamiPage.test.tsx
  • pkg/cli/webapp/src/WhoamiPage.tsx
  • pkg/cli/webapp/src/WhoamiPicker.tsx
  • pkg/cli/webapp/src/WhoamiPolicy.ts
  • pkg/cli/webapp/src/WhoamiProviderToken.tsx
  • pkg/cli/webapp/src/WhoamiTopology.tsx
  • pkg/cli/webapp/src/WhoamiTree.tsx
  • pkg/cli/webapp/src/hooks/usePromptRunStream.test.tsx
  • pkg/cli/webapp/src/hooks/usePromptRunStream.ts
  • pkg/cli/webapp/src/main.test.tsx
  • pkg/cli/webapp/src/main.tsx
  • pkg/cli/webapp/src/promptAgentTools.ts
  • pkg/cli/webapp/src/promptCatalogEntries.test.ts
  • pkg/cli/webapp/src/promptCatalogEntries.ts
  • pkg/cli/webapp/src/promptData.ts
  • pkg/cli/webapp/src/promptDetailState.test.ts
  • pkg/cli/webapp/src/promptDetailState.ts
  • pkg/cli/webapp/src/promptWorkbenchApi.test.ts
  • pkg/cli/webapp/src/promptWorkbenchApi.ts
  • pkg/cli/webapp/src/promptWorkbenchHelpers.ts
  • pkg/cli/webapp/src/promptWriteDestination.test.ts
  • pkg/cli/webapp/src/promptWriteDestination.ts
  • pkg/cli/webapp/src/runtimeProfilesApi.test.ts
  • pkg/cli/webapp/src/runtimeProfilesApi.ts
  • pkg/cli/webapp/src/runtimeProfilesData.test.tsx
  • pkg/cli/webapp/src/runtimeProfilesData.ts
  • pkg/cli/webapp/src/runtimeProfilesRoute.test.ts
  • pkg/cli/webapp/src/runtimeProfilesRoute.ts
  • pkg/cli/webapp/src/sandboxData.ts
  • pkg/cli/webapp/src/sessionCollection.test.ts
  • pkg/cli/webapp/src/sessionCollection.ts
  • pkg/cli/webapp/src/sessionData.ts
  • pkg/cli/webapp/src/shellHelpers.test.ts
  • pkg/cli/webapp/src/shellHelpers.ts
  • pkg/cli/webapp/src/test-setup.ts
  • pkg/cli/webapp/src/viteBrowserDefines.test.ts
  • pkg/cli/webapp/src/whoamiCatalog.test.ts
  • pkg/cli/webapp/src/whoamiCatalog.ts
  • pkg/cli/webapp/vite.config.ts
  • pkg/cli/webapp/viteBrowserDefines.ts
  • pkg/cli/webapp/vitest.config.ts
  • pkg/cli/whoami.go
  • pkg/cli/whoami_ginkgo_test.go
  • pkg/cli/whoami_render.go
  • pkg/cli/whoami_test.go
  • pkg/cli/with_caps_ginkgo_test.go
  • pkg/database/caller_tool_legacy_policy_test.go
  • pkg/database/caller_tool_store.go
  • pkg/database/caller_tool_store_integration_test.go
  • pkg/database/model_usage.go
  • pkg/database/model_usage_integration_test.go
  • pkg/database/prompt_run_operations.go
  • pkg/database/prompt_run_overview.go
  • pkg/database/prompt_run_overview_test.go
  • pkg/database/prompt_run_store_integration_test.go
  • pkg/database/runtime_profile_store.go
  • pkg/database/runtime_profile_store_integration_test.go
  • pkg/database/runtime_profile_store_profiles.go
  • pkg/database/runtime_vocabulary_migration_integration_test.go
  • pkg/database/schema_scoped_integration_test.go
  • pkg/database/session_chat_completion.go
  • pkg/database/session_chat_store.go
  • pkg/database/session_hierarchy.go
  • pkg/database/session_hierarchy_ginkgo_test.go
  • pkg/database/session_ingest_store.go
  • pkg/database/session_ingest_store_integration_test.go
  • pkg/database/session_list_store.go
  • pkg/database/session_list_store_ginkgo_test.go
  • pkg/database/session_message_ingest.go
  • pkg/database/session_metadata_store_integration_test.go
  • pkg/database/session_overview_ginkgo_test.go
  • pkg/database/session_prompt_store.go
  • pkg/database/session_read_store.go
  • pkg/database/session_thread_store.go
  • pkg/database/session_thread_store_ginkgo_test.go
  • pkg/database/session_transcript_source.go
  • pkg/database/store_integration_test.go
  • pkg/gitagent/dispatch.go
  • pkg/gitagent/hookmain.go
  • pkg/gitagent/hookset_ginkgo_test.go
  • pkg/gitagent/workspace_test.go
  • pkg/jsonl/lines.go
  • pkg/jsonl/lines_ginkgo_test.go
  • pkg/monitor/codex_fork_integration_test.go
  • pkg/monitor/ingest.go
  • pkg/runtimeprofiles/catalog.go
  • pkg/runtimeprofiles/catalog_ginkgo_test.go
  • pkg/runtimeprofiles/db_source.go
  • pkg/runtimeprofiles/db_source_integration_test.go
  • pkg/runtimeprofiles/doc.go
  • pkg/runtimeprofiles/file_codec.go
  • pkg/runtimeprofiles/file_source.go
  • pkg/runtimeprofiles/file_source_ginkgo_test.go
  • pkg/runtimeprofiles/file_write.go
  • pkg/runtimeprofiles/ids.go
  • pkg/runtimeprofiles/ids_ginkgo_test.go
  • pkg/runtimeprofiles/references.go
  • pkg/runtimeprofiles/resolve.go
  • pkg/runtimeprofiles/resolver.go
  • pkg/runtimeprofiles/source.go
  • pkg/runtimeprofiles/suite_test.go
  • pkg/runtimeprofiles/types.go
  • pkg/sandbox/adapter/container.go
  • pkg/sandbox/adapter/container_test.go
  • pkg/sandbox/adapter/gitagent.go
  • pkg/sandbox/adapter/none.go
  • pkg/sandbox/adapter/none_test.go
  • pkg/sandbox/adapter/srt.go
  • pkg/sandbox/adapter/srt_test.go
  • pkg/session/build_codex.go
  • pkg/session/build_codex_fork_ginkgo_test.go
  • pkg/session/project.go
  • pkg/session/project_ginkgo_test.go
  • pkg/session/session.go

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​flanksource/​commons-db@​v0.1.28 ⏵ v0.1.3174 +2100100100100
Addednpm/​@​flanksource/​clicky-ui@​0.3.29751009996100
Updatedgolang/​gorm.io/​gorm@​v1.31.1 ⏵ v1.31.282 +1100100100100

View full report

@socket-security

socket-security Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: golang modernc.org/libc is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?golang/github.com/flanksource/clicky@v1.21.57golang/github.com/flanksource/commons-db@v0.1.31golang/modernc.org/libc@v1.74.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/modernc.org/libc@v1.74.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: golang modernc.org/libc is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?golang/github.com/flanksource/clicky@v1.21.57golang/github.com/flanksource/commons-db@v0.1.31golang/modernc.org/libc@v1.74.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/modernc.org/libc@v1.74.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
ai 89 1 0 71ms
github.com/flanksource/captain/pkg/cli 795 3 1 9m33s
agentcreds 11 0 0 939.927µs
aichat 151 0 2 46.1s
anthropicmock 1 0 0 1ms
api 256 0 0 155ms
attachments 5 0 0 8ms
bash 4 0 0 160.798µs
callertools 10 0 0 78ms
captain 30 0 0 35.1s
claude 22 0 0 13ms
claudeagent 13 0 0 370ms
cli 304 0 0 9.6s
cmux 4 0 0 173.642µs
collections 12 0 0 330.456µs
credentials 5 0 0 38ms
credsync 11 0 0 489ms
database 22 0 0 24.6s
deploy 110 0 0 831ms
genkit 25 0 0 144ms
gitagent 122 0 0 36.0s
github.com/flanksource/captain/migrations 11 0 0 3.6s
github.com/flanksource/captain/pkg/ai 245 0 0 480ms
github.com/flanksource/captain/pkg/ai/agent 26 0 0 450ms
github.com/flanksource/captain/pkg/ai/agent/commit 56 0 0 4.0s
github.com/flanksource/captain/pkg/ai/agent/setup 16 0 0 50ms
github.com/flanksource/captain/pkg/ai/agent/verify 21 0 0 400ms
github.com/flanksource/captain/pkg/ai/agent/worktree 6 0 0 -
github.com/flanksource/captain/pkg/ai/assistanttags 15 0 0 -
github.com/flanksource/captain/pkg/ai/fixture 43 0 0 150ms
github.com/flanksource/captain/pkg/ai/fixture/kubeproxy 2 0 0 30ms
github.com/flanksource/captain/pkg/ai/fixture/mcpproxy 6 0 0 -
github.com/flanksource/captain/pkg/ai/history 54 0 0 -
github.com/flanksource/captain/pkg/ai/internal/gen-model-registry 12 0 0 -
github.com/flanksource/captain/pkg/ai/middleware 25 0 0 -
github.com/flanksource/captain/pkg/ai/observation 2 0 0 -
github.com/flanksource/captain/pkg/ai/pricing 9 0 0 10ms
github.com/flanksource/captain/pkg/ai/prompt 24 0 0 20ms
github.com/flanksource/captain/pkg/ai/provider 177 0 1 10ms
github.com/flanksource/captain/pkg/ai/provider/claudeagent 54 0 0 1.4s
github.com/flanksource/captain/pkg/ai/provider/cmux 128 0 0 870ms
github.com/flanksource/captain/pkg/ai/provider/genkit 39 0 0 -
github.com/flanksource/captain/pkg/ai/provider/jsonrpc 6 0 0 50ms
github.com/flanksource/captain/pkg/ai/provider/openai 8 0 0 10ms
github.com/flanksource/captain/pkg/aichat 9 0 0 130ms
github.com/flanksource/captain/pkg/aimock 50 0 7 260ms
github.com/flanksource/captain/pkg/aimock/anthropicmock 14 0 0 30ms
github.com/flanksource/captain/pkg/aimock/openaimock 18 0 0 20ms
github.com/flanksource/captain/pkg/api 138 0 0 530ms
github.com/flanksource/captain/pkg/api/registry 127 0 0 -
github.com/flanksource/captain/pkg/bash 348 0 0 10ms
github.com/flanksource/captain/pkg/captainconfig 28 0 0 -
github.com/flanksource/captain/pkg/captaintoken 23 0 0 1.4s
github.com/flanksource/captain/pkg/claude 138 0 0 -
github.com/flanksource/captain/pkg/claude/tools 18 0 0 -
github.com/flanksource/captain/pkg/cmux 1 0 0 -
github.com/flanksource/captain/pkg/codexconfig 10 0 0 10ms
github.com/flanksource/captain/pkg/container 72 0 1 10ms
github.com/flanksource/captain/pkg/database 138 0 0 31.4s
github.com/flanksource/captain/pkg/dod 11 0 0 1m0s
github.com/flanksource/captain/pkg/gitagent 31 0 0 360ms
github.com/flanksource/captain/pkg/gitagent/proxy 12 0 0 30ms
github.com/flanksource/captain/pkg/monitor 61 0 0 9.0s
github.com/flanksource/captain/pkg/sandbox 13 0 0 -
github.com/flanksource/captain/pkg/sandbox/adapter 39 0 0 110ms
github.com/flanksource/captain/pkg/sandbox/presets 13 0 0 -
github.com/flanksource/captain/pkg/session 70 0 0 40ms
history 72 0 0 202ms
jsonl 6 0 0 141ms
migrations 13 0 0 20.9s
openaimock 2 0 0 152.905µs
provider 15 0 0 19ms
registry 52 0 0 29ms
runtimeprofiles 27 0 0 7.0s
session 31 0 0 18ms
tools 58 0 0 19ms

Totals: 4645 passed · 4 failed · 12 skipped · 14m30s

Failing tests

github.com/flanksource/captain/pkg/cli — TestExecuteSyncRun_CLIRunsVerifyHooks

prompt_run_workflow_test.go:138: err = anthropic cli needs "claude" on PATH, which is not installed; install it, pass --mode api to use anthropic's API instead, or run `captain whoami` to see every...

github.com/flanksource/captain/pkg/cli — TestExecuteSyncRun_MissingJudgePromptFailsLoud

prompt_run_workflow_test.go:167: err = anthropic cli needs "claude" on PATH, which is not installed; install it, pass --mode api to use anthropic's API instead, or run `captain whoami` to see every...

github.com/flanksource/captain/pkg/cli — TestExecuteSyncRun_CLIVerifyHooksPass

prompt_run_workflow_test.go:150: anthropic cli needs "claude" on PATH, which is not installed; install it, pass --mode api to use anthropic's API instead, or run `captain whoami` to see every runti...

ai — runtime availability > projects picker models from the supplied whoami adapters

Expected
    <bool>: false
to be true

View full results

v0.1.30 suppressed only table drops in a partial schema bundle, which left
the DROP TYPE in the plan where it failed against the very column it had
just preserved. v0.1.31 suppresses object drops alongside table drops, so a
co-tenant undeclared enum and the table typing a column with it both
survive Apply.

Claude-Session-Id: 332d73d3-dadc-48f2-8be1-48cd6cabec90
pkg/ai/fixture drives real agent subprocesses and exceeded gavel test-timeout
default of 5m on a loaded runner. A suite stopped that way writes no ginkgo
report, so one slow package surfaced as three separate failures.

Set the deadlines in .gavel.yaml as well as on the action, so a local run and
the SSH git-push backend agree with CI.

Claude-Session-Id: 332d73d3-dadc-48f2-8be1-48cd6cabec90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant