The server was emitting Anthropic-style SSE events (content_block_delta,
message_delta, etc.) but both consumers — the arc_server provider and
run_prompt_via_server CLI — expect `event: stream_event` with serialized
StreamEvent JSON payloads. This caused streaming to silently produce no
output in server mode.
Now forwards all StreamEvent variants directly (text, tool calls,
reasoning, etc.) instead of manually mapping a subset.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generate the run ULID early and display it before the logs directory,
then pass it into setup_worktree and setup_daytona_git instead of each
generating their own.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Five new CLI-level tests covering file creation, shell execution,
read-only permission enforcement, JSON output format, and read+edit
multi-step tool use. All gated with #[ignore = "requires API key"].
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests the full production path: execute_and_emit_one_tool → real tool executor
→ ReadBeforeWriteSandbox guard, covering write-blocked, read-then-write,
grep-then-write, edit-blocked, and new-file-allowed scenarios.
Also updates MutableMockSandbox::grep to do substring matching against
in-memory files so the grep integration test works end-to-end.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Claude CLI native binary install was getting OOM-killed (exit 137)
in the default 1 GiB sandbox. Using the daytona-medium default snapshot
also pre-includes Node, making the prereq install step a no-op.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex CLI no longer reads OPENAI_API_KEY from the environment at
runtime. It requires `codex login --with-api-key` to store credentials
via its auth system. Add a login step after ensure_cli for codex.
Also pass API keys via exec_command's env_vars parameter as belt-and-
suspenders alongside the env file, to avoid fs-to-process race conditions
in the Daytona sandbox.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use `cat file | command` instead of `command < file` for stdin piping
to avoid redirect issues in nested shell wrappers
- Include both stdout and stderr in error messages when CLI exits non-zero
(previously only showed stderr, hiding API errors in stdout)
- Install Node 20 via nodesource + bash/curl as prerequisites for CLI tests
- Use bash instead of sh for Claude CLI install script
The codex test still fails with 401 Unauthorized — the OPENAI_API_KEY
env var isn't reaching the codex process in the sandbox despite the env
file being sourced correctly (gemini works with the same mechanism).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pass GitHub App credentials in create_env() and daytona_snapshot_sandbox
so private repo clones succeed
- Install git in sandbox before running git CLI in clone_private_repo test
- Use brynary/arc (where app is installed) instead of rust-lang/rust for
clone_public_repo_gets_credentials test
- Fix git_checkpoint_remote_emits_events assertion: expect 1 event (work
node only) since start is skipped and exit breaks before checkpoint
- Install Node 20 via nodesource and bash/curl in CLI test prerequisites
- Use bash instead of sh for Claude CLI install script
- Shorten toolbox_idle_diagnostic sleep durations to finish in ~12s
- Add nextest config with 120s per-test timeout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Provider implicit caching (Gemini, OpenAI) is non-deterministic — cache
hits can occur on some turns but not others. Checking only the final turn
caused intermittent failures. Track the best cache ratio across all turns
instead, which still validates the adapter surfaces cached token counts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Anthropic max_tokens: use model catalog limit instead of hardcoded 65536,
fixing claude-sonnet-4-5 (max_output=64000) API errors
- OCI feature tgz: detect actual filename from registry instead of
assuming devcontainer-feature.tgz (registries use suffixed names)
- Test LlmCodergenBackend: implement one_shot() for prompt handler support
- Quarantine all Inception/mercury-2 parity matrix tests (unreliable provider)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- hooks.mdx: add pre_tool_use/post_tool_use/post_tool_use_failure events,
tool-specific context fields, matcher support for tool names
- cli.mdx: add --mode and --server-url flags to arc exec
- run-configuration.mdx: add [pull_request] section
- github.mdx: add auto-PR to features table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerate the changelog entry to cover all commits since the last
watermark. Add changelog writing guideline to use user-facing language
instead of internal Rust names.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The pattern of filtering Error-severity diagnostics, collecting messages,
and returning ArcError::Validation appeared in three places. Extract it
into validation::raise_on_errors and use prepare_from_file in run_from_branch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Recursively compares serialized ServerConfig keys against the
OpenAPI ServerConfiguration schema properties. Also fixes 7 fields
that were missing from the spec: log, checkpoint, git.slug,
git.author, git.webhooks, sandbox.exe, sandbox.env.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FileInliningTransform was treated as a "custom" transform that every
caller had to remember to register manually. This caused arc validate
to break and left latent bugs in run_from_branch and SubWorkflowHandler.
Add prepare_with_file_inlining() and prepare_from_file() to WorkflowBuilder
so file inlining is a built-in concern. Rename prepare_workflow to
prepare_from_source for clarity. Fix the SubWorkflowHandler to use
prepare_from_file when reading from stack.child_dotfile paths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the RunCompare envelope (checkpoints + files + stats) with a
standard PaginatedRunFileList response containing FileDiff items,
matching the existing pagination pattern used by other endpoints.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add POST /runs/{id}/pause and POST /runs/{id}/unpause endpoints
following the cancel endpoint conventions, with paused RunStatus variant,
demo stubs, and regenerated TypeScript client.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove Verification, Insights, and Retros groups. Move Sessions, Models,
and Administration as sub-groups under More. Add unlisted Test Model
endpoint. Hide Run Verification endpoint.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Register FileInliningTransform in validate_command so @file references
(e.g. @prompts/simplify.md) are resolved during validation, matching
the behavior in run.rs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The missing_required_fields test was not updated when goal was changed
from String to Option<String> in c143d2c8.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reuse jwt_auth::decode_pem_env in read_github_private_key instead of duplicating base64/PEM logic
- Extract delivery_id once at top of webhook_handler instead of 3 separate times
- Remove redundant funnel_port field from WebhookManager (derive from listener.port())
- Gate parse_event_metadata behind debug log level to avoid full JSON parse on every webhook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a webhook subsystem that receives GitHub App webhooks when configured
in server.toml with [git.webhooks] strategy = "tailscale_funnel". On startup,
it binds a local HTTP listener on a random port, exposes it via `tailscale funnel`,
and patches the GitHub App webhook URL. Incoming webhooks are verified with
HMAC-SHA256 before processing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a top-level `verbose` bool to CliConfig so `arc run start` and
`arc doctor` pick it up without requiring `-v` every invocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Precedence: CLI --goal > TOML goal > DOT graph attribute. Previously
the TOML goal field was required but never applied to the graph.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove .claude from .gitignore and commit the docs skill watermark
so future /docs runs know where to start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerate March 7 changelog with sandbox.env, CLI renames, and missing
accordion items. Add March 8 changelog for sandbox reliability and @file
validation. Update reference docs for --goal, --mode flags, sandbox.env,
checkpoint exclude globs, [log] config, [git.author], and project_memory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bake the imagegen script into a Daytona snapshot so the agent
can just run `imagegen <prompt> <output>` instead of manually
calling the Gemini API with curl/jq.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rust 1.94.0 introduced new clippy lints and rustls now rejects X.509 v1
certificates. This fixes all three CI jobs:
- Format: cargo fmt across the workspace
- Clippy: unnecessary_unwrap, useless_format, derivable_impls,
type_complexity, too_many_arguments, redundant_closure, map_or
simplification, and other new lints
- Tests: generate v3 certs (with extensions) for mTLS tests so newer
rustls accepts them
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Collapse nested if statements in heredoc stripping (v4a_patch.rs)
- Pass ToolCall directly to execute_one_tool to reduce argument count (tool_execution.rs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>