Enable serde_json's preserve_order feature so Map uses insertion-order
IndexMap instead of sorted BTreeMap. Extract build_event_envelope()
from the on_event closure to deduplicate the envelope construction.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirrors `arc validate` workflow resolution. Shells out to `dot` (graphviz)
with friendly error if not installed. Supports --format svg|png and -o output path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire ProgressUI and EventEmitter into the retro agent so it shows
stage spinners with nested tool calls, matching the look of agent
nodes in the main workflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously, AgentError::Aborted was a bare variant that displayed as
just "Aborted", making it impossible to tell whether a session was
killed by wall clock timeout, user cancellation, or something else.
Now it carries an AbortReason (WallClockTimeout or Cancelled) so
terminal output like the retro agent failure message includes the cause.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Regenerate 2026-03-10 changelog with full commit set (installer, devcontainer
support, arc pr subcommands, --no-dotenv removal). Add 2026-03-11 changelog
for shadow branch run records and arc diff improvements. Update docs: CLI
reference (arc pr list/view/merge/close, --shortstat), devcontainers page
(replace placeholder with full content), run-configuration (devcontainer
field), checkpoints (per-node files on metadata branch), models catalog
(gemini-3.1-pro-preview-customtools). Improve preflight to show per-model
LLM checks instead of a single merged provider line.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remote sandboxes (Daytona, Exe) clone into their own environment, so
creating a local git worktree is unnecessary. The worktree decision
previously only checked worktree_mode and git_clean, ignoring the
sandbox provider entirely.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When workflow prompts tell agents to write results to a file with
embedded JSON status fields, the engine now falls back to reading the
last file the agent wrote if neither the response text nor status.json
contain extractable status fields.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Store execution trace data (prompts, responses, status, diffs, etc.) on
the shadow branch alongside checkpoint/manifest data. This makes the
shadow branch a complete, self-contained record of each run.
- scan_node_files() scans nodes/ for allowlisted files (<512KB)
- Checkpoint commits now include per-node files
- init_run includes sandbox.json
- Finalize commit after workflow writes retro.json + final node files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use std::path::Path::strip_prefix instead of manual string manipulation,
and simplify redundant format! wrapper.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change parallel branch entries from tool-call style (6-space indent,
spinner) to subagent info style (8-space indent, ▸ prefix, dim/static
while running). Keeps ✓/✗ glyphs on completion.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop `HEAD` from the live diff command so `git diff {base_sha}` compares
against the working tree instead of only committed changes. Extracts
`build_live_diff_cmd` for testability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tool output previously showed absolute sandbox paths (e.g.
write_file(/home/daytona/workspace/output/js/physics.js)) because
shorten_path() only checked the host CWD. Now ProgressUI stores the
sandbox working directory and strips it from displayed paths, producing
cleaner output like write_file(output/js/physics.js).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When `arc run` uses a Daytona sandbox, `initialize()` re-detects the
branch from cwd — but by that point the worktree has switched HEAD to
`arc/run/{run_id}`, which was never pushed, causing the clone to fail
with HTTP 400. Pass the already-known base branch (e.g. `main`) from
the caller instead of re-detecting it inside the sandbox.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove `devcontainer_env()` and `resolve_devcontainer()` trivial wrappers,
inline at call sites
- Fix initializeCommand Args quoting: use shlex::try_quote instead of naive join
- Fix initializeCommand silently dropping Parallel commands: now executes them
- Convert three repetitive lifecycle calls to a data-driven loop
- Use crate::millis_u64() in setup command loop for consistency
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When `devcontainer = true` in TOML sandbox config, Arc now resolves
devcontainer.json from the repo, uses its Dockerfile for the Daytona
snapshot, runs lifecycle hooks (on_create, post_create, post_start)
in the sandbox, and merges devcontainer env vars under TOML env.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remote sandboxes clone from origin, so "clean" should mean no uncommitted
changes AND the local branch is pushed. Replaces the hardcoded `false` with
a new `ensure_clean_and_pushed` that reuses `ensure_clean` + `branch_needs_push`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rename PullRequestDetail fields from user_wrapper/head_wrapper/
base_wrapper to user/head/base (serde renames no longer needed)
- Make GITHUB_API_BASE_URL public, replace hardcoded strings in pr.rs
- Replace opaque 5-tuple with PrRow struct in pr_list_from
- Parallelize GitHub API calls in pr_list using futures::join_all
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add PR lifecycle commands that operate on workflow runs via their
pull_request.json records. Each loads the PR record from a run directory
and calls the GitHub API: list scans all runs and fetches live state,
view shows details, merge supports squash/merge/rebase, close sets
state to closed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All git checkpoint, diff, push, worktree, and merge operations now go
through sandbox.exec_command() instead of maintaining parallel Host
(spawn_blocking) and Remote code paths. The enum is replaced by
git_checkpoint_enabled + host_repo_path on RunConfig, and
sandbox.is_remote() is used where behavior still differs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split preflight into Repository (setup commands, git clean) and Workflow
(nodes, edges, goal, model, provider) sections. Merge LLM providers and
Provider checks into a single LLM check. Add terminal-width-aware
truncation for long detail lines. Render "Git clean: false" in red.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract resolve_workflow() in project_config to handle bare name, .toml,
and .dot resolution in one place. Previously validate and parse treated
bare words as literal file paths while run resolved them via arc.toml.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extend conclusion.json with per-stage operational data (cost, duration,
retries) so the Arc Details section of PR descriptions no longer depends
on retro.json. The retro section remains optional and only appears when
the retro agent runs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Project-level arc.toml can now set [pull_request] with enabled/draft
fields, slotting between cli.toml defaults and workflow.toml overrides.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Surfaces existing final.patch and per-node diff.patch files via CLI.
Supports live diffs from in-progress runs by reconnecting to the sandbox.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone subcommand that creates SSH credentials for a run's Daytona
sandbox and connects directly (or prints the command with --print).
Also parameterizes create_ssh_access TTL instead of hardcoding 60 min.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In verbose mode, completed tool call bars accumulated in indicatif's
MultiProgress without limit. After ~80+ bars exceeded the terminal
height, indicatif's cursor repositioning broke and all rendering stopped.
Now in verbose mode, completed tool calls are printed as permanent output
via multi.println() and their bars are removed from MultiProgress. Only
running tool calls remain as live bars with spinner + elapsed time. This
keeps MultiProgress small regardless of how many tool calls execute.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Provides CLI access to preview URLs for ports exposed by Daytona sandboxes.
Supports standard (URL + token + curl), signed (self-contained URL), and
--open (browser launch) modes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per-run data now lives in ~/.arc/runs/ while daily CLI log files
stay in ~/.arc/logs/. Renames: logs_root → run_dir (RunConfig field,
Handler trait param, all handlers), logs_dir → run_dir (CLI arg,
local variables), default_logs_base → default_runs_base (path fn).
Adds DB migration 002 to rename workflow_runs.logs_dir → run_dir.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a switchable tracing layer that writes to ~/.arc/logs/{run-dir}/cli.log,
so all diagnostic info for a run is co-located with its other artifacts instead
of buried in the shared daily log file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Display collected assets in an "=== Assets ===" section after the run
result, so users can see which files were captured without digging
through the logs directory.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Return worktree_path from the match expression instead of mutating
a pre-initialized variable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire MCP server configs from workflow TOML into agent sessions so
MCP tools are available to agent stages during workflow runs.
Changes:
- run_config.rs: add mcp_servers HashMap to WorkflowRunConfig
- backend.rs: AgentApiBackend.with_mcp_servers() passes configs to SessionConfig
- run.rs: extract mcp_servers from RunConfig and pass to backend
- demo/mod.rs: add default mcp_servers field to struct literals
New workflow: arc/workflows/playwright-demo/
- Runs on Daytona with daytona-medium snapshot
- Configures Playwright MCP as a sandbox transport (port 3100)
- Agent browses Hacker News, takes screenshots at each step
- asset_globs captures screenshots/** into logs directory
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Exe sandbox variant, its config field, and all arc_exe usage in
arc-workflows are now behind #[cfg(feature = "exedev")]. Default CLI
builds skip arc-exe and openssh entirely. arc-api enables exedev since
its demo module constructs full SandboxConfig structs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reject negative durations in parse_duration (i64 -> u64) to prevent
future cutoff that would delete everything
- Remove orphans flag from has_explicit_filters since --orphans is
additive, not restrictive, and shouldn't disable the 24h staleness guard
- Use parsed label_filters instead of raw args.filter.label so malformed
labels that get silently dropped don't incorrectly disable staleness
- Replace derived Serialize with custom impl delegating to Display for
RunStatus, fixing JSON serialization (was producing null/tagged objects
instead of flat strings)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show colored "error:" prefix with cause chain for all CLI errors. When a
workflow name isn't found in a project with arc.toml, list available
workflows and suggest the closest match using Levenshtein distance.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users can now set `[arc] retro = false` in arc.toml instead of passing
`--no-retro` on every `arc run` invocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`arc run my-workflow` now resolves to `{arc_root}/workflows/my-workflow/workflow.toml`
when an arc.toml project config exists. Args with file extensions are passed through
unchanged, and missing workflows fall back to the literal arg.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Before worktree creation, compare local and remote ref SHAs to avoid
unnecessary pushes. When already in sync, log at INFO and print nothing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The same timeout(spawn_blocking(git_push)) pattern with a 4-arm match on
Ok(Ok(Ok(()))) appeared in 3 places. Extract a helper that flattens the
triple Result into a single BlockingPushError enum, and extract shared
push error-handling into run_git_push.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When `arc run` creates a worktree, unpushed local commits would appear
in the PR diff even though they didn't originate from the workflow run.
This pushes the user's current branch before worktree setup so the
remote base matches the local HEAD.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>