Replace opaque (i64, i64, i64, f64) tuple with ModelUsageTotals struct
for readable field access. Remove redundant top-level token/cost fields
that duplicated by_model sums — derive them at read time instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tracks total runs, input/output tokens, cost, and runtime in-memory
(resets on server restart). Accumulates from checkpoint node_outcomes
when runs complete. Includes per-model breakdown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All API errors now return a consistent JSON shape:
{"errors": [{"status": "4xx", "title": "...", "detail": "..."}]}
Introduces ApiError type with IntoResponse impl, replaces bare
StatusCode returns and ad-hoc {"error": "..."} responses in all
handlers and auth extractors. Updates OpenAPI spec and regenerates
TypeScript client.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Maps the Graphviz "insulator" shape to a new wait.timer handler that
reads a duration attribute and sleeps before proceeding with success.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Google's most cost-efficient model ($0.25/M input, $1.50/M output) with
1M context, 65K output, and full tool/vision/reasoning support.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add discovery, health check, OpenAPI spec, and current user endpoints.
The first three are public; /user requires authentication and returns
the login extracted from JWT sub claim, mTLS CN, or "demo" in demo mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move CheckReport, CheckResult, CheckDetail, and CheckStatus types from
arc-cli doctor into arc-util so they can be reused. Refactor the workflow
run_preflight to render a styled check report instead of ad-hoc key=value
output and separate stderr errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install ring CryptoProvider at CLI startup to prevent rustls panic
- Skip TLS in demo mode so the server uses plain HTTP
- Add ARC_DEMO=1 env var to web app config to bypass GitHub OAuth
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Anthropic API returns HTTP 529 for overload conditions, but this
status code was falling through to the catch-all which classified it as
InvalidRequest (non-retryable). This meant neither LLM-level nor
node-level retries would trigger, causing workflow nodes to fail
immediately on transient overload errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Checks llm_model and llm_provider values in model_stylesheet against the
built-in catalog during `arc validate`. Unknown models or providers emit
warnings (not errors) since the catalog is advisory, not restrictive.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Multi-line arguments (e.g. spawn_agent task descriptions) were breaking
the single-line progress output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LLM responses were printing raw Markdown (bold markers, table pipes,
heading hashes). Use termimad to render with proper ANSI formatting
when color is enabled, falling back to plain text when NO_COLOR is set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both verbose and normal modes now use the same indicatif-based ProgressUI
renderer with the same visual hierarchy (indentation, glyphs, colors).
In verbose mode: tool calls persist after stage completion, no 5-call cap,
stage completion shows stats (turns, tool calls, tokens), and additional
events are rendered (edge transitions, loop restarts, setup commands,
retries, context warnings, compaction, subagents).
Remove the old format_event_summary function and its ~70 tests, the
verbose stderr printing from AgentApiBackend, and the verbose/styles
fields that are no longer needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New demo 11-ensemble.dot fans out to Opus (Anthropic), Gemini (Google),
Codex (OpenAI), and Mercury (Inception) in parallel, then synthesizes
results. Also generates PNG and SVG renderings for all existing demo
dot files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a `--preserve-sandbox` CLI flag and `sandbox.preserve` TOML config
option that skips sandbox cleanup after a run. Cascade order:
CLI flag > run TOML > server.toml defaults > false.
When preserving, prints sandbox identity (container ID or Daytona
sandbox name) so users can reconnect for debugging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Simplify create_ssh_access to return String directly
- Add jump_to_node field to Outcome for parallel handler fan-in
- Find convergence node from branch outgoing edges
- Use ..Outcome::success() spread in tests and error paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return just the SSH command string instead of the full SshAccessDto,
and hardcode the 60-minute expiration internally.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show smoothness rating, outcome, friction/open item counts, and file
path after retro completes instead of just the file path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Creates SSH access after sandbox init and displays the connection
command in the progress output, aligned under the sandbox detail line.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handle ParallelBranchStarted/Completed events as nested entries under
the fork stage, using the same indented spinner styling as tool calls.
Branch bars persist after the stage completes so they remain visible
in the final output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use insert_after instead of add so the detail bar renders directly
below the sandbox bar, not at the bottom of the multi-progress.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show sandbox name, CPU, and memory on a second indented detail line
beneath the "Sandbox: provider" line. Hyperlink the provider name to
its dashboard URL using OSC 8 terminal escape sequences (TTY only).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sandbox cleanup was spawned fire-and-forget in a scopeguard, causing DNS
resolution to be cancelled when the tokio runtime shut down before the
HTTP request completed. Now cleanup is awaited explicitly before
returning, with the scopeguard kept only as a safety net for panics.
Also: add blank line before the warning and color-code it yellow to
match other warnings. Update daytona-sdk to include full error source
chain in error messages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
apply_defaults() previously did whole-struct replacement for llm, setup,
and sandbox sections. If run.toml specified only [llm] model, the entire
server.toml [llm] block (including provider) was lost. Now each field
merges individually: task values win per-field, with map-merge for labels
(like vars) and whole-struct semantics for snapshot.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a shared floor_char_boundary() utility that rounds byte indices down
to the nearest char boundary, preventing panics on multi-byte UTF-8
characters like emoji. Applied to all 9 unsafe slice sites across
arc-agent and arc-workflows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display the LLM model ID (dim, bracketed) next to stage names as soon as
the first AssistantMessage arrives, and show the script command (dim,
truncated to 60 chars) for parallelogram/script stages from stage start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reads the checkpoint to find the last stage with a response and
prints it under an "=== Output ===" header so users can see what
the workflow produced without digging into log files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Show tool args in dim parenthetical: read_file(CLAUDE.md)
- Shorten CWD-relative paths in tool call display
- Show elapsed time on completed tool calls
- Emit StageStarted/StageCompleted for terminal (exit) nodes
- Add --no-retro flag to skip retro generation
- Add demo/02-tool-use.dot, renumber existing demos 03-07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Shorten paths with ~ instead of full home directory
- Show retro duration right-aligned like stage lines
- Add "Running retro..." indicator before retro agent runs
- Dim the Cost/Tokens summary line
- Add blank line after Goal before progress section
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap cost and duration order so cost appears first and duration
stays consistently on the far right edge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Insert a separator bar through indicatif before hiding progress bars
for interactive prompts, ensuring a visual gap between the spinner
and the dialoguer prompt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Increase indent from 2 to 4 spaces for progress UI lines
- Add blank line separators after Sandbox/Setup and before Retro output
- Dim Sandbox/Setup and workflow metadata lines
- Rename "Parsed workflow:" to "Workflow:"
- Remove redundant inform() calls for run/stage start/complete
- Remove Notes: and Logs: lines from end-of-run summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rust workflow runs fmt, clippy, and test on crate/cargo/openapi changes.
TypeScript workflow runs typecheck, test, and build on apps/packages changes.
Both use path filters so changes don't cross-trigger.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- redirect-home: only check GitHub app config when provider is "github"
- app-shell: hide sign-out button when provider is "tailscale"
- auth-logout: skip session destroy and redirect to /start for Tailscale
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Cache ProgressStyle and glyph strings with OnceLock (avoid repeated
template parsing and allocations on every event)
- Fix unsafe byte-based string slicing in tool_display_name (use chars)
- Parse status via StageStatus enum instead of raw string comparison
- Remove unused started_at and logs_bar fields
- Extract shared finish_stage method from duplicate completed/failed logic
- Simplify match arms to if-let where only TTY branch has work
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain dimmed text output with cargo/BuildKit-style progress bars
using indicatif MultiProgress. Shows spinners during active stages and
tool calls, right-aligned timers, green/red glyphs for completion status,
and stage costs. Falls back to simple eprintln for non-TTY. Verbose mode
is unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read Tailscale-User-Login/Name/Profile-Pic headers when web.auth.provider
is "tailscale", checking login against required allowed_usernames list.
Rename githubLogin → login across session/callback/shell for provider
neutrality. Update app-shell loader and auth-login page to handle the
new provider.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover format_cost, format_tokens_human, compute_stage_cost, all
format_event_summary variants, validate_command, context_diff, and
parse_label_filters with fast unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These tests only assert that section headings appear in stdout, which is
fully covered by unit tests in src/doctor.rs (check_llm_*, check_api_*,
check_web_*, and render tests). Removing them saves ~2.4s of parallel
nextest wall time from cold binary loads.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>