Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .agent-zero.example.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,5 +57,11 @@ runner:
maxOutputBytes: 200000

model:
# ai-gateway, anthropic, google, openai, or openai-compatible.
# Credentials are read only from the provider's documented environment variable; they are
# never accepted from repository configuration or persisted with task evidence.
provider: openai-compatible
name: gpt-5
# Optional explicit pricing enables deterministic cost accounting.
# inputCostPerMillionTokens: 1.25
# outputCostPerMillionTokens: 10
1 change: 0 additions & 1 deletion .agents/skills/orpc-server

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ body:
- Agent runtime
- Runner
- CLI
- oRPC server
- Dashboard
- GitHub adapter
- Configuration
- Build or CI
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@ body:
- Agent runtime
- Runner
- CLI
- oRPC server
- Dashboard
- GitHub adapter
- Model provider
- Developer experience
Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,6 @@ Read `/AGENTS.md` before editing and load the relevant skill from `/.agents/skil
- Keep runtime command execution and target-repository mutation inside `packages/runner`.
- Keep `observe` mode read-only.
- Add deterministic tests for behavior, state transitions, and safety-sensitive changes.
- Use oRPC in `apps/server`, `@bomb.sh/args` plus `@clack/prompts` in the CLI, tsdown for builds, and Oxlint/Oxfmt for code quality.
- Keep `apps/dashboard` frontend-only, use `@bomb.sh/args` plus `@clack/prompts` in the CLI, tsdown for package builds, and Oxlint/Oxfmt for code quality.
- Do not introduce Hono, ESLint, Prettier, npm, Yarn, or Bun without an accepted architectural proposal.
- Run `aube run check:repo`, `aube run lint:ci`, `aube run typecheck`, `aube test`, and `aube run build` before handing off a complete change.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -87,4 +87,5 @@ jobs:
run: aube run build

- name: 📦 Verify package version
run: node --input-type=module --eval "import('./packages/shared/dist/index.mjs').then(({ version }) => { if (version !== '0.1.0') process.exit(1) })"
run: |
node --input-type=module --eval "Promise.all([import('./packages/shared/dist/index.mjs'), import('./packages/shared/package.json', { with: { type: 'json' } })]).then(([built, pkg]) => { if (built.version !== pkg.default.version) { console.error('Injected version', built.version, 'does not match package.json version', pkg.default.version); process.exit(1) } })"
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,8 @@ jobs:
run: aube run build

- name: Verify injected version
run: node --input-type=module --eval "import('./packages/shared/dist/index.mjs').then(({ version }) => { if (version !== '0.1.0') process.exit(1) })"
run: |
node --input-type=module --eval "Promise.all([import('./packages/shared/dist/index.mjs'), import('./packages/shared/package.json', { with: { type: 'json' } })]).then(([built, pkg]) => { if (built.version !== pkg.default.version) { console.error('Injected version', built.version, 'does not match package.json version', pkg.default.version); process.exit(1) } })"

# Publishing remains intentionally absent until the @agent-zero package
# scope and npm trusted publishing policy are configured.
8 changes: 5 additions & 3 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,14 +2,16 @@ node_modules/
.turbo/
dist/
.output/
.nuxt/
*.tsbuildinfo
coverage/
playwright-report/
test-results/
test-report.junit.xml
.env
.env.*
!.env.example
.agent-zero/
.data/
*.log
.DS_Store

# Nitro build output
.output/
4 changes: 2 additions & 2 deletions .skills/agent-zero-architecture/SKILL.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ Keep dependency direction explicit while changing the monorepo.
- `runner`: command execution and checkout mutation boundary, plus the policy-to-boundary factory.
- `agent`: orchestration, the lifecycle machine, and the validation policy.
- `cli`: argument parsing and terminal presentation.
- `apps/server`: composition root for webhook ingestion, task execution, and evidence publication.
- `apps/dashboard`: frontend-only Nuxt operational dashboard with no runtime-package dependencies.

## Workflow

Expand All@@ -30,7 +30,7 @@ Keep dependency direction explicit while changing the monorepo.

## Reject these designs

- Shell execution in the server, CLI presentation, GitHub adapter, model adapter, or agent state machine.
- Shell execution in a transport adapter, CLI presentation, GitHub adapter, model adapter, or agent state machine.
- HTTP request/response types inside the runtime.
- GitHub SDK objects passed through shared contracts.
- A generic `utils` package used to bypass ownership decisions.
Expand Down
3 changes: 3 additions & 0 deletions .skills/agent-zero-safety/SKILL.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,9 @@ Safety properties are behavior, not documentation. Back every change with determ
- A failed verification cannot be represented as success. `verified` is derived once, where the terminal result is built.
- A run that cannot verify does not write. No checks means no change.
- Isolation is never approximated. Requesting a sandbox that cannot be provided must fail.
- Remote sandbox credentials stay private to the provider adapter. Requests, leases, snapshots, task state, and logs remain credential-free.
- Runner pools enforce active, per-repository, and lease-duration ceilings before provisioning and stop expired leases.
- Persistent task records omit review input and checkout paths, and recursively redact every string before storage.
- A reviewer's claim is not evidence. Reject what the repository does not support, and keep the reasons.

## Review workflow
Expand Down
27 changes: 0 additions & 27 deletions .skills/orpc-server/SKILL.md

This file was deleted.

2 changes: 1 addition & 1 deletion .skills/tsdown/SKILL.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@ Use this skill when changing build entries, output formats, declarations, packag
## Repository rules

- The base configuration is `scripts/tsdown.config.ts`.
- Every package or app keeps a small `tsdown.config.ts` that imports the shared factory.
- Every workspace built with tsdown keeps a small `tsdown.config.ts` that imports the shared factory. The Nuxt dashboard uses the Nuxt build pipeline and does not keep a tsdown config.
- Publishable packages output ESM and CommonJS with declarations and source maps.
- Apps and the CLI output ESM executables without publishable-library declarations unless explicitly needed.
- Publishable package builds must keep `publint` and `attw` validation enabled.
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ These instructions apply to humans and coding agents working in this repository.
- Use aube for dependencies and scripts. It reads and writes `pnpm-lock.yaml` and `pnpm-workspace.yaml` in place; keep both files and do not create npm, Yarn, or Bun lockfiles.
- `typescript` is overridden to `typescript-native-bridge` in `pnpm-workspace.yaml`, so `tsc` and every Compiler API consumer type-check on tsgo. Keep the pin exact and reinstall after changing it.
- Use Turborepo through the root scripts; do not duplicate orchestration in package scripts.
- Use tsdown through each package's `tsdown.config.ts` and the shared `scripts/tsdown.config.ts`.
- Use tsdown through each tsdown-built package's `tsdown.config.ts` and the shared `scripts/tsdown.config.ts`. The Nuxt dashboard uses the Nuxt build pipeline.
- Use Oxlint with type-aware checks and Oxfmt. Do not add ESLint or Prettier.
- Do not edit `dist/`, `.turbo/`, or generated declaration files.

Expand All@@ -28,7 +28,7 @@ These instructions apply to humans and coding agents working in this repository.
- `packages/config`: configuration parsing and policy.
- `packages/shared`: stable cross-package contracts.
- `packages/cli`: argument parsing and terminal presentation.
- `apps/server`: oRPC transport and control-plane composition.
- `apps/dashboard`: frontend-only Nuxt operational dashboard.

The runtime must remain independent from HTTP, GitHub, terminal UI, and specific model providers. Adapters depend on the runtime; the runtime must not depend on adapters.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,7 @@ aube test
| Configuration and policy | `packages/config` |
| Shared contracts | `packages/shared` |
| CLI parsing and presentation | `packages/cli` |
| HTTP control-plane composition | `apps/server` |
| Dashboard frontend | `apps/dashboard` |

Read [AGENTS.md](AGENTS.md) and the matching files in `.agents/skills/` before making architectural or safety-sensitive changes.

Expand Down
57 changes: 37 additions & 20 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,10 +33,7 @@ Feedback is never treated as truth merely because it came from a human or an AI
## Architecture

```text
GitHub webhook / CLI
Server API ─── task events
GitHub adapter / CLI
Agent state machine
Expand All@@ -46,6 +43,8 @@ GitHub webhook / CLI
Runner boundary ─── repository commands and file operations

Nuxt dashboard ─── frontend-only operational interface
```

| Package | Responsibility |
Expand All@@ -57,7 +56,7 @@ GitHub webhook / CLI
| [`packages/config`](./packages/config) | Configuration parsing and policy |
| [`packages/shared`](./packages/shared) | Stable cross-package contracts |
| [`packages/cli`](./packages/cli) | Argument parsing and terminal presentation |
| [`apps/server`](./apps/server) | oRPC transport and control-plane composition |
| [`apps/dashboard`](./apps/dashboard) | Frontend-only Nuxt operational dashboard |

Adapters depend on the runtime; the runtime never depends on adapters. See [docs/architecture.md](./docs/architecture.md) for the full dependency rules.

Expand DownExpand Up@@ -97,22 +96,40 @@ The CLI parses arguments with [`@bomb.sh/args`](https://github.com/bomb-sh/args)

---

## Control plane
## Dashboard

`aube run dev` starts the frontend-only Nuxt dashboard on `http://localhost:3000`. It is an operational interface shell: it does not expose API or RPC routes, persist task data, import runtime packages, or execute repository work.

`aube run test:e2e` builds the dashboard, starts the production preview on port 5678, and runs the Playwright smoke suite. Use `aube --filter @agent-zero/dashboard run test:e2e:ui` for Playwright UI mode.

Hosted execution is available through the provider-neutral `RunnerPool`: every lease has a maximum lifetime, quota checks run before provisioning, expired sandboxes are stopped, and the agent receives only the ordinary `Runner` contract. See [the sandbox provider evaluation](./docs/sandbox-providers.md).

Agent Zero supports native OpenAI, Anthropic, and Google Generative AI adapters, Vercel AI
Gateway, and arbitrary OpenAI-compatible endpoints. Select the transport in repository policy and
provide its credential through the environment:

The type-safe oRPC API starts on `http://localhost:4040` and exposes `health`, `tasks.list`, `tasks.get`, and `tasks.create`. Call it from a dashboard or another service with `@orpc/client`:
| `model.provider` | Credential environment variable | Model example |
| ------------------- | -------------------------------------------------------- | ----------------------------- |
| `ai-gateway` | `AI_GATEWAY_API_KEY` or Vercel OIDC | `anthropic/claude-sonnet-4.5` |
| `anthropic` | `ANTHROPIC_API_KEY` | `claude-sonnet-4-5` |
| `google` | `GOOGLE_GENERATIVE_AI_API_KEY` | `gemini-2.5-pro` |
| `openai` | `OPENAI_API_KEY` | `gpt-5` |
| `openai-compatible` | `OPENAI_COMPATIBLE_API_KEY` (or legacy `OPENAI_API_KEY`) | provider-specific |

```ts
import { createORPCClient } from '@orpc/client';
import { RPCLink } from '@orpc/client/fetch';
import type { RouterClient } from '@orpc/server';
import type { AppRouter } from '@agent-zero/server/router';
`AGENT_ZERO_MODEL_BASE_URL` is an optional operator environment variable for custom gateways and
self-hosted endpoints. Endpoint URLs and credentials cannot be named or embedded in
`.agent-zero.yml`, so untrusted repository policy cannot redirect a provider secret. The AI Gateway
accepts `provider/model` identifiers and exposes the broader AI SDK provider catalog without adding
provider-specific logic to the Agent Zero runtime.

const zero: RouterClient<AppRouter> = createORPCClient(
new RPCLink({ url: 'http://localhost:4040' }),
);
To record cost, configure explicit rates; Agent Zero never guesses provider pricing:

await zero.tasks.create({ repository: '.', feedback: 'Check error handling', mode: 'observe' });
await zero.tasks.create({ repository: '.', trigger: 'proactive', mode: 'observe' });
```yaml
model:
provider: openai-compatible
name: gpt-5
inputCostPerMillionTokens: 1.25
outputCostPerMillionTokens: 10
```

`observe` is the safe default and never writes files. Proactive pull-request webhooks are ignored until `proactive.enabled` is true. Automatic changes additionally require `mode: fix` or `autonomous`, `autofix.enabled`, sufficient confidence, an allowed change-risk class, repository-native checks, and (by default for proactive/autonomous work) an isolated runner. High-impact changes always require human approval.
Expand All@@ -124,7 +141,7 @@ await zero.tasks.create({ repository: '.', trigger: 'proactive', mode: 'observe'
- **[aube](https://aube.jdx.dev)** &ndash; package manager, pinned through `packageManager`, reusing the pnpm lockfile and workspace files.
- **[typescript-native-bridge](https://github.com/johnsoncodehk/typescript-native-bridge)** &ndash; overrides `typescript` repo-wide, so `tsc` keeps the classic package surface while the checker runs on tsgo in-process. The override lives in `pnpm-workspace.yaml` and is pinned exactly; the fork only publishes prerelease versions.
- **[Turborepo](https://turborepo.dev)** &ndash; schedules workspace tasks in dependency order and caches tsdown build outputs.
- **[tsdown](https://tsdown.dev)** &ndash; builds publishable packages as ESM and CommonJS with matching declarations and source maps, through the shared [tsdown configuration](./scripts/tsdown.config.ts). Apps stay ESM-only.
- **[tsdown](https://tsdown.dev)** &ndash; builds publishable packages as ESM and CommonJS with matching declarations and source maps, through the shared [tsdown configuration](./scripts/tsdown.config.ts). The Nuxt dashboard uses the Nuxt build pipeline instead.
- **[Oxlint](https://oxc.rs) + [Oxfmt](https://oxc.rs)** &ndash; type-aware linting and repository-wide formatting, extended with [`@e18e/eslint-plugin`](https://github.com/e18e/eslint-plugin) for modernization, module-replacement, and performance rules.
- **[Knip](https://knip.dev)** &ndash; detects unused files, exports, and dependencies across the workspace as part of `lint:ci`.
- **[`@arethetypeswrong/cli`](https://github.com/arethetypeswrong/arethetypeswrong.github.io) + [Publint](https://publint.dev)** &ndash; validate every package build.
Expand All@@ -136,15 +153,15 @@ GitHub Actions run typecheck, build/export validation, Oxlint, Oxfmt, tests, and

## Security model

The included `LocalRunner` is intended for trusted local development. Production deployments must place it inside Docker, a microVM, or another ephemeral sandbox with CPU, memory, filesystem, and network policies. The server never invokes shell commands directly.
The included `LocalRunner` is intended for trusted local development. Production deployments must place it inside Docker, a microVM, or another ephemeral sandbox with CPU, memory, filesystem, and network policies. Only `packages/runner` may invoke shell commands.

Report vulnerabilities privately as described in [SECURITY.md](./SECURITY.md). Do not open a public issue.

---

## Agent Skills

Task-specific Agent Skills live in `.skills/` and are exposed to coding agents through `.agents/skills/`. Skilld manages the versioned tsdown skill, and the same portable layout covers architecture, CLI, oRPC, Turborepo, and safety work:
Task-specific Agent Skills live in `.skills/` and are exposed to coding agents through `.agents/skills/`. Skilld manages the versioned tsdown skill, and the same portable layout covers architecture, CLI, Turborepo, and safety work:

```bash
aube run skills:list
Expand Down
7 changes: 7 additions & 0 deletions apps/dashboard/app/app.vue
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
<template>
<NuxtRouteAnnouncer />
<NuxtLoadingIndicator color="var(--az-accent)" />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
Loading
Loading