Commit graph

77 commits

Author SHA1 Message Date
Bryan Helmkamp
c192c106f6 Rename fabro-types to fabro-api-types
Better reflects that this crate contains auto-generated types scoped
to the API layer. Pure rename with no behavior change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:08 -04:00
Bryan Helmkamp
defcf9c746 Clean up resolved settings interfaces 2026-03-29 13:47:07 -04:00
Bryan Helmkamp
aec2d5b437 Rename --run-dir to --storage-dir, unify with data_dir
Replace the per-run `--run-dir` CLI flag with `--storage-dir` which sets
the base storage directory (default ~/.fabro). Runs are now created under
`<storage-dir>/runs/` automatically. This unifies the server's `data_dir`
config with the CLI by renaming `FabroConfig.data_dir` to `storage_dir`
and adding a `storage_dir()` convenience method.

Key changes:
- FabroConfig: `data_dir` → `storage_dir` (serde alias preserves compat)
- CLI: `--run-dir` → `--storage-dir` on `fabro run`
- `__detached`: now takes `--storage-dir` + `--run-id` instead of `--run-dir`
- All ~20 CLI commands derive runs base from config instead of hardcoded default
- Added parameterized `runs_base(storage_dir)` and `make_run_dir()` helpers
- Updated OpenAPI spec, docs, and all tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:07 -04:00
Bryan Helmkamp
190bbf4e34 Remove Context logs, replace with RunNotice events + tracing
Context::append_log / logs_snapshot was a write-only audit trail that
was never surfaced — not in events, CLI output, or tracing. Errors like
"checkpoint save failed" were silently swallowed.

Replace all append_log call sites with RunNotice events (which are
automatically traced and visible in progress.jsonl / CLI). Remove the
logs field from both Context types, the Checkpoint struct, the OpenAPI
spec, and the TS client. Old checkpoints containing a logs field are
silently ignored during deserialization.

Also make git_diff return Result<String, String> with structured error
info (exit code + stderr) instead of Option<String>.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:05 -04:00
Bryan Helmkamp
22ef5ec916 Fix stale comments referencing deleted config type names
Update references to WorkflowRunConfig, ServerConfig, apply_defaults,
and deny_unknown_fields in comments and docs to reflect the FabroConfig
unification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:05 -04:00
Bryan Helmkamp
8072b271a3 Fix missing skip_clone field in OpenAPI spec and conformance test
The DaytonaConfig struct had a skip_clone field that was missing from
both the OpenAPI spec and the conformance test initializer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:36:49 -04:00
Bryan Helmkamp
359306569a Update roadmap and standardize on Graphviz terminology
Roadmap: replace placeholder items with current shipped/building/planned
features. Use real dates for sorting instead of manual sortOrder. Fix
UTC timezone rendering for date display.

Terminology: replace all standalone "DOT" references with "Graphviz" or
"Graphviz DOT" across docs, marketing, README, AGENTS.md, and OpenAPI
spec. Changelogs left unchanged as historical records.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 20:01:33 -04:00
Bryan Helmkamp
8716d235d1 Add auto-merge support for pull requests via GitHub GraphQL API
When `auto_merge = true` is set in `[pull_request]` config, Fabro enables
GitHub's auto-merge on created PRs using the `enablePullRequestAutoMerge`
GraphQL mutation. Auto-merge implies `draft = false` since GitHub doesn't
allow auto-merge on draft PRs. A `merge_strategy` field (squash/merge/rebase,
default squash) controls the merge method. Failures to enable auto-merge
(e.g. repo doesn't have the setting enabled) warn but don't fail the run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 08:37:24 -04:00
Bryan Helmkamp
0e0c45d05c Designate retros as experimental, disable by default via [features] flag
Move retro control from [fabro] retro to [features] retros in project
config. Default changes from true to false — retros are now opt-in.
Add retros field to server config Features struct, OpenAPI spec,
TypeScript client, and web app config. Update docs with experimental
warning and new enablement instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 20:36:32 -04:00
brynary-fabro[bot]
a7faf32e01 Rename [feature_flags] to [features] (#11)
This PR renames the `[feature_flags]` configuration section to
`[features]` and the corresponding `FeatureFlags` type to `Features`
across the entire stack. The change touches the OpenAPI spec (source of
truth), Rust config/API crates, the generated TypeScript API client, the
web application, and the demo config file to ensure consistency.

On the Rust side, the `FeatureFlags` struct becomes `Features` in
`fabro-config`, and all field references (`config.feature_flags` →
`config.features`) are updated in `fabro-api` demo/test code along with
the relevant unit tests. On the TypeScript side, the generated client
reflects the OpenAPI rename (`feature-flags.ts` → `features.ts`,
`FeatureFlags` → `Features`), and manual edits in `fabro-web` update the
`AppConfig` interface, defaults constant (`FEATURES_DEFAULTS`), loader
data destructuring, and template usage throughout `config.server.ts`,
`app-shell.tsx`, and `start.tsx`.

The regeneration also picked up an unrelated new `GitHubConfiguration`
schema that was already present in the OpenAPI spec but hadn't been
generated yet, resulting in the new `git-hub-configuration.ts` file and
its addition to the server configuration type.

### Fabro Details

<details>
<summary>Ran 7 stages in 15m 4s for $3.08</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 0s | – | 0 |
| preflight_lint | 0s | – | 0 |
| implement | 0s | $2.18 | 0 |
| simplify | 0s | $0.90 | 0 |
| verify | 0s | – | 0 |
| **Total** | **15m 4s** | **$3.08** | **0** |

</details>

<details>
<summary>Ran <code>ImplementAndSimplify.fabro</code> (10 nodes and 13
edges)</summary>

```dot
digraph ImplementAndSimplify {
    graph [
        goal="Implement and simplify",
        model_stylesheet="
            * { backend: api; model: claude-opus-4-6;}
        "
    ]
    rankdir=LR

    start [shape=Mdiamond, label="Start"]
    exit  [shape=Msquare, label="Exit"]

    toolchain         [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
    preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check 2>&1", max_retries=0]
    preflight_lint    [label="Preflight Lint", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1", max_retries=0]
    fix_lints         [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
    implement         [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan."]
    simplify          [label="Simplify", prompt="@prompts/simplify.md"]
    verify            [label="Verify", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1 && cargo test 2>&1", goal_gate=true, retry_target="fixup"]
    fixup             [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]

    start -> toolchain
    toolchain -> preflight_compile [condition="outcome=success"]
    toolchain -> exit
    preflight_compile -> preflight_lint [condition="outcome=success"]
    preflight_compile -> exit
    preflight_lint -> implement [condition="outcome=success"]
    preflight_lint -> fix_lints
    fix_lints -> preflight_lint
    implement -> simplify -> verify
    verify -> exit  [condition="outcome=success"]
    verify -> fixup
    fixup -> verify
}

```

</details>

⚒️ Generated with [Fabro](https://fabro.sh)

---------

Co-authored-by: Fabro <noreply@fabro.sh>
Co-authored-by: Bryan Helmkamp <bryan@brynary.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 19:54:40 -04:00
arc-1e68f1[bot]
508a865183 Inject GitHub App IAT into Sandbox as GITHUB_TOKEN (#7)
This PR adds GitHub App Installation Access Token (IAT) injection into
sandboxes, allowing `gh` CLI and other GitHub-authenticated tools to
work seamlessly inside workflow sandboxes. Workflow authors can declare
required GitHub permissions in `workflow.toml` under a `[github]`
section (e.g., `permissions = { contents = "write", pull_requests =
"read" }`), with project-wide defaults available in `fabro.toml`.
Workflow-level config fully replaces project-level defaults, consistent
with existing `[pull_request]` behavior.

The implementation introduces a `GitHubConfig` struct wired through
`WorkflowRunConfig`, `RunDefaults`, and `ProjectConfig`, with proper
`apply_defaults` (inherit if unset) and `merge_overlay` (replace if
present) semantics. At runtime, a new `mint_github_token()` helper signs
a JWT, resolves the repo's owner/repo from the origin URL, and requests
a scoped IAT which is injected as `GITHUB_TOKEN` into the sandbox
environment. The previously private
`create_installation_access_token_with_permissions` in `fabro-github` is
made public to support this. A preflight check also mints a token during
validation to surface credential or permission issues early.

Comprehensive tests cover TOML parsing with and without `[github]`,
default inheritance, workflow-over-default precedence, and overlay merge
semantics for `RunDefaults`.

### Fabro Details

<details>
<summary>Ran 7 stages in 27m 15s for $5.88</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 0s | – | 0 |
| preflight_lint | 0s | – | 0 |
| implement | 0s | $3.79 | 0 |
| simplify | 0s | $2.09 | 0 |
| verify | 0s | – | 0 |
| **Total** | **27m 15s** | **$5.88** | **0** |

</details>

<details>
<summary>Ran <code>ImplementAndSimplify.fabro</code> (10 nodes and 13
edges)</summary>

```dot
digraph ImplementAndSimplify {
    graph [
        goal="Implement and simplify",
        model_stylesheet="
            * { backend: api; model: claude-opus-4-6;}
        "
    ]
    rankdir=LR

    start [shape=Mdiamond, label="Start"]
    exit  [shape=Msquare, label="Exit"]

    toolchain         [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
    preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check 2>&1", max_retries=0]
    preflight_lint    [label="Preflight Lint", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1", max_retries=0]
    fix_lints         [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
    implement         [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan."]
    simplify          [label="Simplify", prompt="@prompts/simplify.md"]
    verify            [label="Verify", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1 && cargo test 2>&1", goal_gate=true, retry_target="fixup"]
    fixup             [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]

    start -> toolchain
    toolchain -> preflight_compile [condition="outcome=success"]
    toolchain -> exit
    preflight_compile -> preflight_lint [condition="outcome=success"]
    preflight_compile -> exit
    preflight_lint -> implement [condition="outcome=success"]
    preflight_lint -> fix_lints
    fix_lints -> preflight_lint
    implement -> simplify -> verify
    verify -> exit  [condition="outcome=success"]
    verify -> fixup
    fixup -> verify
}

```

</details>

⚒️ Generated with [Fabro](https://fabro.sh)

---------

Co-authored-by: Fabro <noreply@fabro.sh>
Co-authored-by: Claude <claude@anthropic.com>
2026-03-15 18:24:30 -04:00
Bryan Helmkamp
c0b4a2dc83 Extend fabro.toml with project-level run defaults
Add project-level run defaults to fabro.toml so sandbox, LLM, hooks,
MCP servers, and other settings can be shared across workflows instead
of duplicated in each workflow.toml. Precedence: workflow.toml >
fabro.toml > cli.toml/server.toml.

- Rename `directory` → `work_dir` with backwards-compat serde alias
- Add `hooks` and `mcp_servers` to `RunDefaults` with merge logic
- Extend `ProjectConfig` with all run-defaults fields + `into_run_defaults()`
- Remove duplicate `McpServerEntry` from fabro-config (use run_config's)
- Move `hook_config` from ServerConfig into `run_defaults.hooks`
- Wire project config merge and hooks/mcp fallbacks in run_command()
- Update OpenAPI spec and regenerate TypeScript client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 14:11:16 -04:00
Bryan Helmkamp
21aff5431c Update docs, frontend, marketing, and skills for .fabro extension
Update 47 MDX doc pages, OpenAPI spec, SVG diagram, language
grammar, frontend demo data, marketing page, skills, and README
to use .fabro extension. Add "fabro" to fileTypes in language
grammars. Document stack.child_workflow alongside stack.child_dotfile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 22:38:25 -04:00
Bryan Helmkamp
28884ae093 rename Arc to Fabro in all Rust crates, symbols, env vars, and supporting files
- Rename 20 crate directories lib/crates/arc-* → fabro-*
- Update all Cargo.toml: crate names, dep paths, feature flags, bin name
- Rename arc_server module → fabro_server in fabro-llm
- ArcError → FabroError across 30+ files
- ARC_VERSION/ARC_GIT_SHA/ARC_BUILD_DATE → FABRO_* constants
- All use/qualified paths: arc_agent:: → fabro_agent::, etc. (~1500 occurrences)
- Env vars ARC_* → FABRO_* in string literals and shell scripts
- String literals: X-Arc-Demo, arc-bot, arc@local, arc-web, arc-mcp, etc.
- Path strings: .arc/ → .fabro/, arc.toml → fabro.toml, refs/arc/ → refs/fabro/
- arc-api.yaml → fabro-api.yaml (OpenAPI spec)
- skills/arc-create-workflow → fabro-create-workflow
- trycmd fixtures: $ arc → $ fabro
- Inline snapshots (insta) updated
- CI, Docker, install.sh, scripts, CLAUDE.md, AGENTS.md
- TypeScript app: env vars, headers, JWT issuer
- Docs: page slugs, git refs, config paths, sandbox names, repo URLs
- Repo references: brynary/arc → fabro-sh/fabro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:58 -04:00
Bryan Helmkamp
d4fe6b72e0 docs: rename Arc to Fabro throughout docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:53:44 -04:00
Bryan Helmkamp
e0b3c4cde4 Add SSH sandbox provider (arc-ssh) for user-provided hosts
Adds a generic SSH sandbox that connects to any user-provided host via
openssh, without VM lifecycle management. Supports git clone with GitHub
App credentials, configurable working directory, and arc cp reconnection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 22:29:51 -04:00
Bryan Helmkamp
fb7994b8da Add devcontainer field to SandboxConfiguration OpenAPI schema
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 01:18:12 -04:00
Bryan Helmkamp
7ad187a78f Add signoff resource to verification system
Signoffs are stamps of approval for (control, repository, commit SHA)
tuples, enabling external tools and humans to mark a control as
pass/fail/pending for a specific commit. Adds OpenAPI spec, demo
handlers with 5 fixtures, route registration, and regenerated TS client.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 19:32:33 -04:00
Bryan Helmkamp
281beb9528 Simplify quick start to standalone mode and add server deployment stub
Remove API server and web frontend instructions from quick start, replacing
them with a note about standalone vs. server mode. Add under-development
warning to API overview. Add server deployment stub page to Guides.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 00:29:47 -04:00
arc-1e68f1[bot]
61c7541fd5 Add Draft PR Mode Support (#13)
* arc(01KK9VW7TXZQQZPHBC08935H0C): toolchain (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 2
Arc-Checkpoint: 477c304d4b72cb390186195c5357c79d0c62a9bc

* arc(01KK9VW7TXZQQZPHBC08935H0C): preflight_compile (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 3
Arc-Checkpoint: 535652db567b6a31f1a9ae2f2aef8de306c5f447

* arc(01KK9VW7TXZQQZPHBC08935H0C): preflight_lint (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 4
Arc-Checkpoint: dae88bf9dd1765d3753691c73985b21d39841c5a

* arc(01KK9VW7TXZQQZPHBC08935H0C): implement (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 5
Arc-Checkpoint: a7d72489ba62fb15a971ff209d4713aa77892064

* arc(01KK9VW7TXZQQZPHBC08935H0C): simplify (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 6
Arc-Checkpoint: 1c1e8fa045e6d116a1dbdc83ac4677d693e0a4b2

* arc(01KK9VW7TXZQQZPHBC08935H0C): verify (fail)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 7
Arc-Checkpoint: deb4e29bc1e7b5a16a25c0b65733ba65d63875ba

* arc(01KK9VW7TXZQQZPHBC08935H0C): fixup (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 8
Arc-Checkpoint: bace62da4526e4c129766324b7263bf16ca58d57

* arc(01KK9VW7TXZQQZPHBC08935H0C): verify (success)

Arc-Run: 01KK9VW7TXZQQZPHBC08935H0C
Arc-Completed: 9
Arc-Checkpoint: a2cccac34d826070d4d861e6b598e831bea7f9fd

* Default pull request draft to true

PRs are now created as drafts by default. Users can opt out with
`draft = false` in the TOML [pull_request] config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: arc <arc@local>
Co-authored-by: Bryan Helmkamp <bryan@brynary.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:20:45 -04:00
Bryan Helmkamp
107bf743e6 Add LocalSandboxConfiguration to OpenAPI spec
The Rust SandboxConfig struct has a `local` field that was missing from
the OpenAPI spec, causing server_config_keys_match_openapi_spec to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:35:15 -04:00
Bryan Helmkamp
c2b40b4cfc Move packages/ to lib/packages/ and update all references
Updated: package.json workspaces, tsconfig path alias, CI workflow
paths, Dockerfile COPY, AGENTS.md, and doc references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:13:56 -04:00
Bryan Helmkamp
9e3b73dbe4 Move crates/ to lib/crates/ and update all references
Updated: Cargo.toml workspace members, CI workflow paths, Dockerfile
COPY, AGENTS.md, skill mapping, and doc references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:12:35 -04:00
Bryan Helmkamp
d3b7cf4a47 Close 3 exe.dev gaps: OpenAPI ExeConfig schema, preflight clone, run-branch resume
- Add `image` property to OpenAPI `ExeConfiguration` schema so the
  generated TS client gets a typed interface instead of bare `object`
- Extract `resolve_exe_clone_params()` helper and wire it into preflight
  so `--preflight --sandbox exe` tests the git clone path
- Expand `run_from_branch()` to support exe.dev: resolve sandbox provider,
  connect SSH, initialize VM, fetch+checkout the run branch, wrap with
  GitCredentialSandbox + ReadBeforeWriteSandbox, and clean up on exit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 09:59:08 -04:00
Bryan Helmkamp
3100fd3a62 Add assets schema to OpenAPI spec for ServerConfiguration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:50:57 -04:00
Bryan Helmkamp
e5cfeaacaa Update OpenAPI spec and TS client for stream_event SSE format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:50:51 -04:00
Bryan Helmkamp
7f264e44c1 arc exec server mode via /completions proxy (#4)
* arc(01KK6WHKW0XB829BBCXH5N5G03): implement (success)

Arc-Run: 01KK6WHKW0XB829BBCXH5N5G03
Arc-Completed: 2
Arc-Checkpoint: b394706ae5111891bed4c3c20290464410a8ff23

* arc(01KK6WHKW0XB829BBCXH5N5G03): simplify (success)

Arc-Run: 01KK6WHKW0XB829BBCXH5N5G03
Arc-Completed: 3
Arc-Checkpoint: fa9fabbe6016dd6bb795a4a1711792320aa4e1b2

---------

Co-authored-by: arc <arc@local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:36:33 -04:00
Bryan Helmkamp
80fbeb5fcd Auto-PR on Successful Workflow Run (#3)
* arc(01KK6WHJ904CXGN0MCQFGWKMKS): implement (success)

Arc-Run: 01KK6WHJ904CXGN0MCQFGWKMKS
Arc-Completed: 2
Arc-Checkpoint: 4c3a9115be9074c7e23792c0ef9b1f0525ffc10d

* arc(01KK6WHJ904CXGN0MCQFGWKMKS): simplify (success)

Arc-Run: 01KK6WHJ904CXGN0MCQFGWKMKS
Arc-Completed: 3
Arc-Checkpoint: 7d8e8413e70eb198e14fcb676903dcc91bd21b76

* Fix merge conflicts: add pull_request to OpenAPI spec, fix clippy warning, cargo fmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: arc <arc@local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:32:55 -04:00
Bryan Helmkamp
8ee27278dd Add conformance test to detect ServerConfig ↔ OpenAPI spec drift
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>
2026-03-08 14:44:59 -04:00
Bryan Helmkamp
e73f2ab00e Add pause/unpause run endpoints
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>
2026-03-08 14:36:36 -04:00
Bryan Helmkamp
f0c97a2739 Add server-mode support for arc llm chat via session endpoints
Implement the server-side session handlers (create, retrieve, send message,
stream events, list) with in-memory storage and LLM generation, wire them
into the router replacing not_implemented stubs, add run_chat_via_server
CLI function with SSE streaming, and add mode dispatch so `arc llm chat
--mode server` delegates to the API server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:34:15 -05:00
Bryan Helmkamp
21f94f48de Add POST /completions endpoint with Anthropic-style SSE streaming
Adds a completions API endpoint that supports both streaming (SSE) and
non-streaming (JSON) modes, with structured output via JSON Schema.
Wires up the CLI `arc llm prompt` command to use the server when
`--mode server` is specified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:06:58 -05:00
Bryan Helmkamp
ac535b925b Remove Start Workflow Run endpoint (duplicates Start Run)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:06:58 -05:00
Bryan Helmkamp
add14c63ee Remove List Projects and List Branches API endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:06:58 -05:00
Bryan Helmkamp
130339ee87 Add filename titles to TOML code blocks in docs
Every TOML example now shows which config file it belongs to
(server.toml, cli.toml, or run.toml) via Mintlify's title annotation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:06:57 -05:00
Bryan Helmkamp
d2c6b50c90 Add POST /models/{id}/test endpoint for server-mode model testing
Enables `arc models test` to work in server mode by adding an API
endpoint that sends "Say OK" (max_tokens=16, 30s timeout) to a model
and reports pass/fail. Dry-run mode returns synthetic "ok" status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:17:10 -05:00
Bryan Helmkamp
c1630b5a21 Restructure ModelInfo into nested shape with new fields
Replaces flat ModelInfo fields with nested sub-structs (ModelLimits,
ModelFeatures, ModelCosts) and adds family, training, and
cache_input_cost_per_mtok fields to enrich the model catalog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:44:25 -05:00
Bryan Helmkamp
a4764adb4e Simplify JWT auth description in OpenAPI spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:21:34 -05:00
Bryan Helmkamp
116046502c Add GET /models endpoint returning paginated LLM catalog
Exposes the embedded model catalog (same data as `arc models list`) via
a new authenticated API endpoint so the web UI can display available models.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:12:21 -05:00
Bryan Helmkamp
72c1e0759f Rename verification API: categories → criteria, separate controls endpoints
Restructure the verification API from a flat `/verifications` namespace to
`/verification/criteria` and `/verification/controls` as distinct resources.
Singularize the run sub-resource path to `/runs/{id}/verification`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 09:49:18 -05:00
Bryan Helmkamp
36ab4c6992 Add typed RetroDetail schema and filtering to retros API
Replace untyped JSON blob on /runs/{id}/retro with a structured RetroDetail
schema mirroring the Rust Retro type. Add workflow and smoothness filter
parameters to /retros. Document optionality of smoothness and total_cost fields.
Convert demo handler from inline JSON to typed structs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 15:54:17 -05:00
Bryan Helmkamp
a58bebff8b Fix 9 OpenAPI review items for run internals, workflows, and configuration
- Define typed RunCheckpoint schema replacing untyped object on checkpoint endpoint
- Rename WorkflowDetail.title to name for consistency with WorkflowListItem
- Make RunConfiguration.goal optional (only version and graph required)
- Add optional requestBody (StartWorkflowRunRequest) to startWorkflowRun
- Remove dead tools field from SystemStageTurn and AssistantStageTurn
- Add cancelled to StageStatus enum
- Document HookDefinition field-to-type mapping
- Add oneOf type to DaytonaConfiguration.network (string enum or allow_list object)
- Document stages pagination cardinality (bounded by graph size, typically <20)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 15:31:54 -05:00
Bryan Helmkamp
72c0c8e257 Fix 10 OpenAPI review items for HITL, run outputs, and verifications
Addresses agreed items from the openapi-hitl-and-run-outputs review:
rename retrieveRunDiff operationId, add 409s to steer/preview, bound
expires_in_secs, add selected_option_keys for multi-select end-to-end,
document skip/na semantics, add slug and require type on
RunVerificationControl, require file on CodeLocation, and remove the
checkpoint "all" sentinel in favor of omitting the parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 15:13:06 -05:00
Bryan Helmkamp
ec598c4abb Fix 8 OpenAPI review items for verifications and insights
- Add pagination params to /verifications endpoint
- Rename operationIds: listVerificationCategories, retrieveVerificationControl
- Merge VerificationStatus and EvaluationResult into unified VerificationResult enum
- Rename ControlDetail.description to rationale to avoid ambiguity
- Add 400 error response to POST /insights/execute
- Add GET /insights/queries/{id} endpoint with 404 handling
- Type ExecuteQueryResponse.rows items with oneOf instead of empty schema
- Make SavedQuery.updated_at required, default to created_at for unmodified queries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 14:56:07 -05:00
Bryan Helmkamp
c61aafcde6 Return structured JSON for run config and server config
Replace raw TOML / UI-oriented SettingGroup responses with structured
JSON that mirrors the Rust config types (WorkflowRunConfig, ServerConfig).

- Add Serialize derives to all config types in arc-workflows and arc-api
- Add manual Serialize impl for DaytonaNetwork enum
- Update OpenAPI spec: /runs/{id}/configuration returns RunConfiguration,
  /settings returns ServerConfiguration, WorkflowDetail.config is now
  RunConfiguration object instead of TOML string
- Remove SettingGroup/SettingField/SettingFieldType schemas
- Update demo handlers to construct and serialize real config structs
- Regenerate TypeScript client
- Simplify settings page to JSON display, update run-configuration and
  workflow-definition pages to show JSON

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 14:04:57 -05:00
Bryan Helmkamp
4976358260 Replace fake relative time strings with ISO 8601 timestamps in API
The API was returning human-readable strings like "2h ago" and "in 4 hours"
instead of real timestamps. The frontend now formats these for display using
timeAgo() and a new timeUntil() helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 13:35:36 -05:00
Bryan Helmkamp
736d4f8ba6 Restructure API schemas: nest flat fields into typed sub-objects
Add 17 new sub-schemas (ModelReference, WorkflowReference, RunReference,
RepositoryReference, CategoryReference, TokenUsage, CodeLocation, RunError,
RunPullRequest, RunTimings, SandboxResources, RunSandbox, RunQuestion,
AggregateUsageTotals, WorkflowSchedule, WorkflowLastRun, UsageStageRef)
and restructure 11 existing schemas to use them, improving evolvability
by grouping related fields into nested objects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 13:11:17 -05:00
Bryan Helmkamp
566bef0220 Clean up API spec: remove redundant response types, add pagination, fix naming
- Delete StartRunResponse, CancelRunResponse, SteerRunResponse, SubmitAnswerResponse;
  reuse RunStatusResponse for startRun/cancelRun, empty 202 for steerRun, 204/409 for
  submitRunAnswer
- Make SubmitAnswerRequest.value and SteerRequest file/line optional
- Type untyped schemas (checkpoint, retro, context) with oneOf/additionalProperties
- Add pagination params to listRunQuestions, listRunStages, listRunVerifications
- Rename retrieveRunSvg→retrieveRunGraph, listRunCompare→retrieveRunDiff,
  RunListItemStatus→BoardColumn
- Preview URL response: 200→201
- Regenerate Rust types and TypeScript client

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:44:39 -05:00
Bryan Helmkamp
b2b25fbe6c Apply API design guidelines to all non-Session endpoints
Enrich the entire OpenAPI spec with descriptions, examples, format
annotations, extracted parameters, discriminated unions, and richer
response schemas — matching the patterns already established for
Sessions.

Structural changes:
- Extract CancelRunResponse and SteerRunResponse from inline schemas
- Change POST /runs/{id}/steer from 200 to 202 (async fire-and-forget)
- Split StageTurn into discriminated union (SystemStageTurn,
  AssistantStageTurn, ToolStageTurn) with oneOf + discriminator
- Add status + created_at to StartRunResponse
- Add created_at to RunListItem and RunStatusResponse
- Add created_at + updated_at to SavedQuery
- Add format: date-time on RetroListItem.timestamp
- Extract 7 new reusable parameters (StageId, QuestionId, WorkflowName,
  VerificationSlug, InsightQueryId, ProjectId, CheckpointFilter)
- Enrich existing RunId, PageLimit, PageOffset parameters
- Add descriptions + examples to all ~66 schemas and ~200+ properties
- Add operation descriptions to all ~35 endpoints

Rust handler updates:
- Change ManagedRun.created_at from Instant to chrono::DateTime<Utc>
- Populate new fields in StartRunResponse, RunStatusResponse
- Use new StageTurn discriminated union variants in demo data
- Update demo data timestamps to use DateTime<Utc>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:30:33 -05:00
Bryan Helmkamp
a9645132fc Add Last-Event-ID support to Sessions SSE endpoint
Each SSE frame now includes a sequential numeric id: field. Clients can
reconnect with the Last-Event-ID header to resume the stream after the
last received event, skipping already-processed events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:00:07 -05:00