Commit graph

3107 commits

Author SHA1 Message Date
Bryan Helmkamp
169da74f0e Reorder API tags: HIL before Run Internals, Run Outputs before Retros, Projects before Settings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:55:15 -05:00
Bryan Helmkamp
64dd9b925b Move Preview URL to Human-in-the-Loop, Retrieve Run Usage to Run Outputs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:52:38 -05:00
Bryan Helmkamp
8f684e6c48 Reorder OpenAPI tags for Mintlify nav sidebar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:46:26 -05:00
Bryan Helmkamp
5164b73c58 Move List Run Files and Verifications to Run Outputs tag, rename Retrieve Run SVG to Render SVG
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:40:55 -05:00
Bryan Helmkamp
3d27d1fb72 Move preview URL endpoint to new Sandbox tag and shorten summary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:40:12 -05:00
Bryan Helmkamp
4fdcd77dde Auto-copy OpenAPI spec to docs when generating API client
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:38:48 -05:00
Bryan Helmkamp
7df7a1e8de Replace docs OpenAPI spec copy with symlink to source of truth
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:36:08 -05:00
Bryan Helmkamp
4cd601833a Sync Mintlify docs OpenAPI spec with source of truth
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 16:33:44 -05:00
Bryan Helmkamp
10893702eb Move retrieve run checkpoint endpoint to Run Internals tag
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 12:30:48 -05:00
Bryan Helmkamp
effe165f31 Simplify -v flag from two verbosity levels to a single boolean
The `-vv` (full detail) mode was not useful in practice. This collapses
the two-tier `-v`/`-vv` into a single `--verbose` boolean and removes
the now-dead `format_event_detail` function and its tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 12:29:29 -05:00
Bryan Helmkamp
1fa26aa1ec Rename API operationIds and summaries to follow consistent conventions
Use List/Retrieve/Start/Stream/Cancel naming. Add new tags: Run Internals,
Human-in-the-Loop, Usage. Regenerate TypeScript client.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 12:24:32 -05:00
Bryan Helmkamp
47f032e535 Add POST /runs/{id}/preview endpoint and Preview button on Run page
Adds a new API endpoint for generating sandbox preview URLs (stubbed to
return google.com in demo mode). The Run detail page now shows a Preview
button that POSTs to this endpoint and opens the returned URL in a new tab.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 12:16:01 -05:00
Bryan Helmkamp
9e74e6f913 Add --debug global CLI flag to switch log level from INFO to DEBUG
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 12:13:59 -05:00
Bryan Helmkamp
63099b0526 Remove unnecessary clone() calls on Copy types in demo verifications
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:56:17 -05:00
Bryan Helmkamp
095dd5ff3c Add arc llm chat subcommand for interactive multi-turn conversations
Adds a new `chat` subcommand under `arc llm` that reads user input in a
loop, maintains conversation history, streams LLM responses, and supports
`--model` and `--system` options. Includes an e2e test verifying multi-turn
context and system prompt behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:54:47 -05:00
Bryan Helmkamp
6dd422186e Rename progress.ndjson to progress.jsonl
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:46:31 -05:00
Bryan Helmkamp
79d97ebb5c Fix stale labels, grammar, and comments from sandbox rename
- Fix display label `image:` → `name:` for SnapshotPulling/SnapshotPulled
  in format_event_detail
- Fix grammar: "an Sandbox" → "a Sandbox" in README and parallel.rs
- Fix typo: "sandboxs" → "sandboxes" in parallel.rs
- Update remaining "execution environment" comments to "sandbox"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:43:34 -05:00
Bryan Helmkamp
d0c8bd3eed Rename ExecutionEnvironment to Sandbox across the codebase
Adopt cleaner terminology: Sandbox (resource providing disk + execution),
SandboxProvider (Local/Docker/Daytona), SandboxEvent (lifecycle events),
and Snapshot (pre-built environment images). Flatten DaytonaSandboxConfig
into DaytonaConfig, rename CLI flag to --sandbox, and update TOML config
sections from [execution] to [sandbox].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:33:21 -05:00
Bryan Helmkamp
ffa9d1d505 Rename docs site from Mint Starter Kit to Arc
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:21:33 -05:00
Bryan Helmkamp
e938d3395a Throw Response from apiJson so API 404s render as 404 pages
apiJson was throwing a plain Error on non-ok responses, which React
Router always treated as a 500. Now throws a Response with the actual
status code so API 404s surface as proper 404 error pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:05:34 -05:00
Bryan Helmkamp
fcba787cd5 Add styled 404 and 500 error pages matching Arc design system
Replace the unstyled error boundary with themed pages: teal gradient
number for 404, coral for 500, centered on the atmospheric background
with action buttons and a collapsible stack trace in dev mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 11:04:04 -05:00
Bryan Helmkamp
802727ac07 docs 2026-03-02 11:01:38 -05:00
Bryan Helmkamp
6fc2c1dcb0 Fill in all demo data gaps to match original React mock data
- Verifications: all 8 categories with 31 controls, all slugs return detail
  with 10 evaluations, 5 recent results, full checks, and sibling controls
- Run verifications: all 8 categories with correct pass/fail/na statuses
- Retros: per-run-ID retro detail for all 5 runs with full stages, learnings,
  friction points, open items, and correct field names
- Sessions: all 8 sessions in list, detail for s1/s2/s3, s1 expanded to 7
  turns with rich tool use data
- Runs: run-8 checks expanded to 12, run-9 to 6
- Settings: all 24 fields with full select options and descriptions
- Retro list files_touched expanded to full arrays

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 10:03:09 -05:00
Bryan Helmkamp
5c54f37a7c Add mintlify docs 2026-03-02 09:59:44 -05:00
Bryan Helmkamp
a456672959 move docs -> docs-internal 2026-03-02 09:59:00 -05:00
Bryan Helmkamp
4849dd8488 draft-api-design.md 2026-03-02 09:41:01 -05:00
Bryan Helmkamp
49364b0843 Add demo API server and wire React app to fetch from API
Expand the OpenAPI spec from 11 to 39 endpoints covering Runs, Workflows,
Verifications, Retros, Sessions, Insights, Settings, and Projects with ~45
schemas. Add `--demo` flag to `arc serve` that serves static demo data for
all endpoints (auth disabled, read-only). Non-demo mode returns 501 for new
endpoints while existing run handlers continue working.

Regenerate the TypeScript API client and add `apiJson` helper. Wire all 19
React route files with server-side loaders that fetch from the API and map
snake_case responses to camelCase UI types. Mock data kept as fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 09:39:53 -05:00
Bryan Helmkamp
331dad98ec Rename Pipeline to Workflow in frontend
- routes/pipelines.tsx → routes/runs.tsx, component Pipelines → Runs
- Update route config to point to runs.tsx
- Retro.pipeline_name → workflow_name in data and all display components
- Table header "Pipeline" → "Workflow" in retros list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 00:09:15 -05:00
Bryan Helmkamp
46af8e6887 Rename Pipeline to Workflow in CLI help text and test assertions
Update command descriptions and test event name strings to use
workflow/run terminology instead of pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 00:07:35 -05:00
Bryan Helmkamp
a566aa0352 Rename Pipeline to Run in arc-api server
- ManagedPipeline → ManagedRun, AppState.pipelines → AppState.runs
- All route paths: /pipelines/* → /runs/*
- Handler fns: list_pipelines → list_runs, start_pipeline → start_run,
  get_pipeline_status → get_run_status, cancel_pipeline → cancel_run
- Import renamed types: RunStatus, RunStatusResponse, StartRunRequest,
  StartRunResponse, WorkflowRunEngine, WorkflowRunEvent
- All test URIs, variable names, and test names updated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 00:06:16 -05:00
Bryan Helmkamp
212de7a7ea Rename Pipeline to Workflow/Run in arc-workflows engine internals
- pipeline.rs → workflow.rs: PipelineBuilder → WorkflowBuilder,
  prepare_pipeline() → prepare_workflow()
- event.rs: PipelineEvent → WorkflowRunEvent, variant renames
  PipelineStarted/Completed/Failed → WorkflowRunStarted/Completed/Failed
- engine.rs: PipelineEngine → WorkflowRunEngine, pipeline_name → workflow_name
- retro.rs: pipeline_name → workflow_name, pipeline_failed → run_failed
- All handler, CLI, and test files updated to match

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:58:42 -05:00
Bryan Helmkamp
4c971d81b1 Rename Pipeline to Run in OpenAPI spec and generated types
Rename all API paths from /pipelines/* to /runs/*, schemas from
Pipeline* to Run*, and operation IDs accordingly. Regenerate both
the Rust types (arc-types) and TypeScript client (arc-api-client).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:48:07 -05:00
Bryan Helmkamp
7002f0638a Rename ManagerLoopHandler to SubWorkflowHandler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:39:58 -05:00
Bryan Helmkamp
f45c1b1e2d Remove unused SubPipelineHandler
No DOT pipelines reference the sub_pipeline handler type. The manager
loop handler now covers the child pipeline spawning use case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:38:53 -05:00
Bryan Helmkamp
47e16d4c0d Replace ChildObserver mock with real child engine spawning in ManagerLoopHandler
The manager loop (house node) now parses a child DOT pipeline, spawns a
real PipelineEngine, and monitors it via a tokio::select poll loop. Context
is cloned into the child and diffed on completion to propagate updates back
to the parent.

- Add PipelineEngine::from_services() to share parent's Arc services
- Add PipelineEngine::run_with_context() returning (Outcome, Context)
- Rewrite ManagerLoopHandler as unit struct with real child engine spawning
- Support both inline DOT (stack.child_dot_source) and file (stack.child_dotfile)
- Delete ChildObserver trait entirely
- Update all existing tests and add new e2e tests for context flow and dotfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:35:47 -05:00
Bryan Helmkamp
1aca8231bc Add Terminal dropdown button to run detail page
Adds a sandboxId field to RunItem and a Terminal dropdown on the run
detail page with "Web Terminal" (links to Daytona proxy) and
"Connect with SSH" options. Uses existing Headless UI Menu pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:01:15 -05:00
Bryan Helmkamp
726ab184dc Add cursor: pointer to all click targets site-wide
Add a global CSS base rule for interactive elements (buttons, links,
selects, summary, ARIA roles) and add cursor-pointer to clickable
table rows. Remove now-redundant per-element cursor-pointer classes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:36:21 -05:00
Bryan Helmkamp
f6bc346663 Fix remote parallel worktree path to mirror host structure
Replace hardcoded /home/daytona/workspace/.arc-parallel path with
{working_directory}/.arc/logs/{run_id}/parallel/{node_id}/{branch_key},
matching the host worktree layout and scoping worktrees per-run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:27:56 -05:00
Bryan Helmkamp
ae72cd059d Add verification control detail page with clickable catalog rows
Adds /verifications/:slug route with detail page showing control
description, stat cards, evaluation history, recent runs, checks/examples,
and sibling navigation. Makes verification catalog rows fully clickable.
Fixes dark mode hydration mismatch with suppressHydrationWarning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:25:00 -05:00
Bryan Helmkamp
bda63295ed Fix model test: increase timeout to 30s and min tokens to 16
OpenAI requires max_output_tokens >= 16, and slower providers like
Gemini Pro need more than 10s to respond.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:14:50 -05:00
Bryan Helmkamp
4b3a450071 Fix CLI integration tests and clippy warnings
- Update CLI tests for restructured commands (models → top-level, run → run start)
- Remove sync-related tests (command was removed)
- Fix clone_on_copy clippy warnings in arc-api server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:07:12 -05:00
Bryan Helmkamp
b2b64dcc64 Restructure CLI: nest runs under arc run, promote models to top-level
- `arc run <pipeline>` → `arc run start <pipeline>`
- `arc runs list/prune` → `arc run list/prune`
- `arc llm models list` → `arc models list`
- Remove `arc llm models sync`
- Add `arc models test [--provider, --model]` for connectivity testing
- Clean up dead code (RunsArgs, RunsCommand, runs_command)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:04:32 -05:00
Bryan Helmkamp
4a0fc63d5a Add generated Axios API client package (@qltysh/arc-api-client)
Replace openapi-typescript types-only output with a full TypeScript Axios
client generated by openapi-generator-cli. The generated code is committed
so IDE support works without running codegen. arc-web consumes the client
via bun workspaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:03:38 -05:00
Bryan Helmkamp
1334a952af Add spec-first OpenAPI for arc-api with generated types
- Create openapi/arc-api.yaml as source of truth for all API endpoints
- Add arc-types crate with build.rs using typify to generate Rust structs
  from the spec's component schemas
- Refactor server.rs to use generated types instead of hand-written ones
- Add route coverage conformance test validating router matches spec
- Add openapi-typescript to arc-web for TypeScript type generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:43:49 -05:00
Bryan Helmkamp
95864ab788 Add run labels and arc runs list/prune CLI
- Add `labels: HashMap<String, String>` to RunConfig, written to manifest.json
- Add `--label KEY=VALUE` flag to `arc run` (repeatable)
- New `arc runs` command: list pipeline runs with table or --json output
- New `arc runs prune` command: delete old runs with --before, --pipeline,
  --label, --orphans filters (dry-run by default, --yes to confirm)
- 13 new tests covering scan_runs, filter_runs, prune, and manifest labels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 20:23:26 -05:00
Bryan Helmkamp
c860bc3e35 Suppress clippy::too_many_arguments on derive_retro
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:47:08 -05:00
Bryan Helmkamp
d7d2294b7c Add structured tracing across 7 crates per logging audit plan
Implements all 47 gaps and fixes all 7 violations identified in
docs/agent/logging-audit-plan.md:

- arc-llm: Add tracing dep + 18 log statements (requests, responses,
  retries, timeouts, tool execution)
- arc-api: Add tracing dep + 6 log statements (server lifecycle,
  pipeline start/complete/fail), replace eprintln with warn
- arc-mcp: Fix 3 violations (string interpolation, secret leakage),
  add 7 log statements (client creation, handshake, tool calls)
- arc-workflows: Fix 3 eprintln violations, add 9 log statements
  (git checkpoints, Daytona sandbox, worktrees, node visit limit)
- arc-git-storage: Add tracing dep + 9 log statements (branch ops,
  snapshot write/delete/rename)
- arc-db: Add 3 log statements (connection, migrations)
- arc-agent: Add 4 debug statements (session init, compaction)
- arc-cli: Add 1 debug statement (command dispatch)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:43:19 -05:00
Bryan Helmkamp
b15a526b0a Add darker logotype variant for light mode
The existing gradient logo (#c4dede-#495669) was designed for dark
backgrounds. Adds logotype-light.svg with the same paths but a
deeper gradient (#2a6b6b-#1c2a3a) for better contrast on white,
and swaps the src based on the current theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:37:15 -05:00
Bryan Helmkamp
38da286130 Add stall watchdog to detect hung pipeline handlers
A background tokio task polls EventEmitter.last_event_at(). When idle
time exceeds the graph-level stall_timeout (default 600s), it cancels
a CancellationToken that races against execute_with_retry via
tokio::select!, dropping the hung handler future.

- EventEmitter: AtomicI64 last_event_at field, touch() to seed, emit()
  auto-updates
- Graph::stall_timeout(): reads Duration attr, defaults 600s, None for 0
- StallWatchdogTimeout event variant with warn-level trace()
- Engine: watchdog spawn before main loop, select! at handler call,
  shutdown after loop
- CLI: format arms for summary and detail views
- Unit tests for emitter, graph accessor, event serialization, and
  engine watchdog behavior (hung, keepalive, disabled)
- E2e integration tests: DOT-parsed pipelines with 100-200ms stall
  timeouts verifying trigger, keepalive, disable, and timing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:36:58 -05:00
Bryan Helmkamp
e515368838 Link ARC logo to /start instead of /workflows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:33:02 -05:00