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
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## What RustCode is

RustCode is the orchestrator: the app and the `rc` CLI that own threads,
projects, settings and usage data, and run each thread on a harness (Codex,
Claude Code, Gemini CLI, OpenCode, Pi, or the optional standalone `rustcode`
TUI/harness in `harness/`). Query it from an agent with the
RustCode is an agentic development environment (ADE): the app and the `rc`
CLI that own threads, projects, settings and usage data, and run each thread
on a harness (Codex, Claude Code, Gemini CLI, OpenCode, Pi, or the optional
standalone `rustcode` TUI/harness in `harness/`). Query it from an agent with the
`mcp__rustcode__*` tools, `rc threads list --all`, `rc threads path <id>`,
`rc usage` (tokens and the cost each harness reported) and
`rc data query "<sql>"` (the local data store, `docs/data-store.md`).
Expand Down Expand Up @@ -91,7 +91,7 @@ failure. Fix from the CI log and push again.
seconds; it runs `bun install --frozen-lockfile` first when a new
worktree has no `node_modules`), and `cargo fmt --check` and `cargo clippy --all-targets --
-D warnings` in `apps/desktop/src-tauri` (its own Cargo workspace; CI runs
its tests). This is the product: the RustCode orchestrator app. Start from
its tests). This is the product: the RustCode app. Start from
`docs/desktop.md` › "Status and roadmap" and follow `docs/design.md`.
- Size caps: a Rust file may not pass 2,000 lines (`scripts/check-rust-size.py`,
run in CI's lint job) nor a TypeScript one 1,500 (`apps/desktop/src/fileSize.test.ts`).
Expand Down Expand Up @@ -212,7 +212,7 @@ profile and stale dependency version leaves artifacts behind.
long-lived: restart the server (`close`, then `open`) for a fresh check.
After an edit, HMR serves the module under a `?t=` URL and the import
returns a second, empty copy. `?updatePreview` stages the update row.
- To test an engine change in the app, rebuild the orchestrator binary with
- To test an engine change in the app, rebuild the `rc` binary with
`cargo build -p rustcode-cli --bin rc`, then run `bun tauri dev` (it uses
`target/debug/rc`). A plain `cargo build` does not rebuild that binary, and
the app then talks to the old engine.
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You need a recent stable Rust (1.85 or newer).
```bash
git clone https://github.com/LHagfoss/rustcode.git
cd rustcode
cargo run -p rustcode-cli -- --help # run the `rc` orchestrator CLI from source
cargo run -p rustcode-cli -- --help # run the `rc` CLI from source
cargo run -p rustcode-harness # run the standalone `rustcode` TUI harness from source
```

Expand All @@ -29,8 +29,8 @@ The repo has a few parts:

| Path | What it is |
| --- | --- |
| `rustcode/engine` | The orchestrator & agent core: ACP server, harness manager, tools, sessions |
| `rustcode/cli` | The lean `rc` orchestrator CLI and desktop app sidecar (no TUI deps) |
| `rustcode/engine` | The app engine & agent core: ACP server, harness manager, tools, sessions |
| `rustcode/cli` | The lean `rc` CLI and desktop app sidecar (no TUI deps) |
| `harness/` | The standalone `rustcode` terminal harness (TUI and headless runner) |
| `rustcode/core` | Shared crates |
| `apps/desktop` | The RustCode app (Tauri + React) |
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<h1 align="center">RustCode</h1>

<p align="center">
One app for your coding agents.<br/>
The agentic development environment (ADE) for your coding agents.<br/>
<a href="https://rustcode.lhagfoss.com">rustcode.lhagfoss.com</a>
</p>

<p align="center">
<img src="./images/readme-desktop.png" alt="The RustCode app showing a new thread" width="100%"/>
</p>

RustCode is the orchestrator for your coding agents: one app and one `rustcode`
command that run Claude Code, Codex, Gemini CLI, OpenCode, Pi or RustCode's
RustCode is an agentic development environment (ADE) for the coding agents you
already use: one app and one `rustcode` command that run Claude Code, Codex, Gemini CLI, OpenCode, Pi or RustCode's
built-in harness, and keep every thread, project, setting and usage figure in
one place. Each thread picks its agent, model and effort, can run in its own git
worktree, and an agent can start and message other threads.
Expand All @@ -26,7 +26,7 @@ curl -fsSL https://rustcode.lhagfoss.com/install.sh | bash # macOS, Linux
irm https://rustcode.lhagfoss.com/install.ps1 | iex # Windows
```

This installs two things: the **RustCode app**, the orchestrator, and the
This installs two things: the **RustCode app**, the ADE, and the
**`rustcode` command**: the terminal UI and the built-in harness it runs.
Details and other options are in the [install guide](docs/install.md).

Expand All @@ -35,7 +35,7 @@ Details and other options are in the [install guide](docs/install.md).
- **Every agent, one place.** Sign in to each agent once; switch harness,
model and effort per thread ([harnesses](docs/harnesses.md)).
- **Work in parallel.** Worktree threads, a live sidebar of what runs and
what waits for you, fan-out and compare ([orchestrator](docs/orchestrator.md)).
what waits for you, fan-out and compare ([delegation](docs/orchestrator.md)).
- **Stay in control.** Approvals, per-turn checkpoints, review of every
change before it lands.
- **A local agent too.** `rustcode` runs on any model, including local ones
Expand All @@ -53,7 +53,7 @@ rustcode --acp # serve ACP over stdio (the app uses this)

[Desktop app](docs/desktop.md) ·
[Harnesses](docs/harnesses.md) ·
[Orchestrator](docs/orchestrator.md) ·
[Delegation](docs/orchestrator.md) ·
[Workflows](docs/workflows.md) ·
[Computer use](docs/computer-use.md) ·
[Configuration](docs/configuration.md) ·
Expand Down
8 changes: 4 additions & 4 deletions apps/desktop/src/state/appState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ export interface AppState {
/** A second, less prominent action (e.g. "Files and conversation"). */
alt?: { action: string; run: () => void };
} | null;
/** Threads can start and message other threads (Settings › Orchestration); the engine learns it at initialize. */
/** Threads can start and message other threads (Settings › Delegation); the engine learns it at initialize. */
orchestration: boolean;
/** How many delegates one thread may run at once (Settings › Orchestration). */
/** How many delegates one thread may run at once (Settings › Delegation). */
threadLimit: number;
/** How many delegates may run at once across this app (Settings › Orchestration). */
/** How many delegates may run at once across this app (Settings › Delegation). */
totalLimit: number;
/** Trust this computer's named logins for delegation (default off). */
trustDelegateAccounts: boolean;
/** Agents may read threads of every project, not only the calling thread's (Settings › Orchestration). */
/** Agents may read threads of every project, not only the calling thread's (Settings › Delegation). */
readAcrossProjects: boolean;
/**
* A delegate that stops on a usage limit goes on at once on the table's model of the other
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/state/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export function forgetThreadGrant(caller: string, key: string) {
setBook((b) => revokeThreadGrant(b, caller, key));
}

/** The two delegate limits (Settings › Orchestration): one thread's own, and the machine's total. */
/** The two delegate limits (Settings › Delegation): one thread's own, and the machine's total. */
export const delegateLimits = (): DelegateLimits => ({
perThread: useApp.getState().threadLimit,
total: useApp.getState().totalLimit,
Expand Down Expand Up @@ -770,7 +770,7 @@ export function reachRefused(): JsonObject {
return failureJson(
failure(
"not_allowed",
"reading across projects is off; turn on “Let agents read threads in other projects” in Settings › Orchestration",
"reading across projects is off; turn on “Let agents read threads in other projects” in Settings › Delegation",
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/state/hostProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function projectRefusal(caller: RuleThread, path: string): Failure | null {
if (useApp.getState().readAcrossProjects) return null;
return failure(
"not_allowed",
"that project is outside this thread's; turn on “Let agents read threads in other projects” in Settings › Orchestration",
"that project is outside this thread's; turn on “Let agents read threads in other projects” in Settings › Delegation",
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/state/limitFallback.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Switching a delegate at a limit (issue 3392): with the setting on, a delegate
// that stops on a Claude or Codex usage limit goes on at once on the other
// provider's model of the same tier, instead of waiting for the reset. The
// tiers are a table the user keeps (`limit-fallback-map`, Settings › Orchestration);
// tiers are a table the user keeps (`limit-fallback-map`, Settings › Delegation);
// this module only reads, checks and edits that table and picks a row. The move
// itself is `switchOnLimit` in state/store.ts, which uses the same
// `_rustcode/session/harness` request as `transfer_session`.
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/state/orchestration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ export const READ_BYTES = 16 * 1024;
export const MAILBOX = 32;
/**
* The default number of delegates one thread may have working for it at once
* (Settings › Orchestration). A message to a thread it already has a link to is a
* (Settings › Delegation). A message to a thread it already has a link to is a
* follow-up, not another slot.
*/
export const DEFAULT_DELEGATES_PER_THREAD = 8;
export const MIN_DELEGATES_PER_THREAD = 2;
export const MAX_DELEGATES_PER_THREAD = 32;
/**
* The default number of delegates that may run at once across this app
* instance (Settings › Orchestration), whichever thread started them. A delegate
* instance (Settings › Delegation), whichever thread started them. A delegate
* takes one slot whether it is a child this thread started or a thread it
* messaged.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/state/orchestrationWake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface WakeContext {
/** Each link target's last activity, for the stall notice and `wait_session`'s idle time. */
activity?: Readonly<Record<string, LinkActivity>>;
/**
* The batch window in ms (Settings › Orchestration, `wake-batch-seconds`). With one, a parent
* The batch window in ms (Settings › Delegation, `wake-batch-seconds`). With one, a parent
* hears about its delegates when the oldest unreported finish or stall is that old, all in one
* wake; a question for the user goes at once and takes whatever else is waiting along. Without
* one (0 or unset) a settled child waits {@link WAKE_COALESCE_MS} for its siblings only while
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/state/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const ALWAYS_ASKS: { title: string; why: string }[] = [
},
{
title: "A delegate on a named account",
why: "Starting a thread on a signed-in account spends that account's usage. Trusted across your machines by default; turn off Settings › Orchestration › Let delegates use my named accounts without asking to approve each account per thread.",
why: "Starting a thread on a signed-in account spends that account's usage. Trusted across your machines by default; turn off Settings › Delegation › Let delegates use my named accounts without asking to approve each account per thread.",
},
{
title: "Outside apps",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const SETTINGS: Record<SettingsSection, string> = {
chat: "Chat",
permissions: "Permissions: default access and remembered approvals",
agents: "Harnesses: install, sign in, models and text generation",
orchestration: "Orchestration: delegates, workflows and presets",
orchestration: "Delegation: delegates, workflows and presets",
voice: "Voice & computer use: dictation and browser tools",
connections: "Connections",
capabilities: "Capabilities: skills and MCP servers",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/DelegatePresets.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Settings › Orchestration › Delegate presets (issue 3391): named sets of harness,
// Settings › Delegation › Delegate presets (issue 3391): named sets of harness,
// model, effort, account, access, worktree and instructions an agent passes to
// `start_session` or a `fan_out` entry as `preset`. They are the
// `delegate-presets` server setting; the engine expands them
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/LimitFallback.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Settings › Orchestration › Switch a delegate at a limit (issue 3392): with the
// Settings › Delegation › Switch a delegate at a limit (issue 3392): with the
// switch on, a delegate that stops on a usage limit goes on at once on the other
// provider's model of the same tier, from a table kept here, instead of waiting
// for the reset. Both are server settings (`limit-fallback`,
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/PermissionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function RememberedGroup() {
className="text-accent hover:underline"
onClick={() => openSettings("orchestration")}
>
“Let delegates use my named accounts without asking” in Orchestration
“Let delegates use my named accounts without asking” in Delegation
</button>
</>
}
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const NAV: { heading?: string; pages: Page[] }[] = [
heading: "Agents",
pages: [
{ id: "agents", label: "Harnesses", icon: Layers },
{ id: "orchestration", label: "Orchestration", icon: Network },
{ id: "orchestration", label: "Delegation", icon: Network },
{ id: "capabilities", label: "Capabilities", icon: Blocks },
{ id: "connections", label: "Connections", icon: KeyRound },
{ id: "voice", label: "Voice & computer use", icon: Mic },
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/paletteSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const PAGE_NAMES: Record<SettingsSection, string> = {
appearance: "Appearance",
keyboard: "Keyboard",
agents: "Harnesses",
orchestration: "Orchestration",
orchestration: "Delegation",
capabilities: "Capabilities",
connections: "Connections",
voice: "Voice & computer use",
Expand Down
14 changes: 7 additions & 7 deletions apps/desktop/src/ui/settingsIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const SETTINGS_INDEX: SettingEntry[] = [
keywords: "titles commit message git drafts generator openai anthropic custom endpoint model key",
},

// ------------------------------------------------------------ Orchestration
// --------------------------------------------------------------- Delegation
{
section: "orchestration",
title: "Let delegates use my named accounts without asking",
Expand All @@ -184,32 +184,32 @@ export const SETTINGS_INDEX: SettingEntry[] = [
{
section: "orchestration",
title: "Threads can start and message other threads",
keywords: "orchestration subagents spawn compare message agents",
keywords: "delegation orchestration subagents spawn compare message agents",
},
{
section: "orchestration",
title: "Delegation",
keywords: "orchestration delegates delegate slots limit concurrent children total",
keywords: "delegation orchestration delegates delegate slots limit concurrent children total",
},
{
section: "orchestration",
title: "Delegates across all threads",
keywords: "orchestration delegation total machine wide global slots limit concurrent running at once",
keywords: "delegation orchestration total machine wide global slots limit concurrent running at once",
},
{
section: "orchestration",
title: "Delegates one thread can run at once",
keywords: "orchestration delegation per thread parallel slots limit concurrent children",
keywords: "delegation orchestration per thread parallel slots limit concurrent children",
},
{
section: "orchestration",
title: "Merge delegate wakes within",
keywords: "orchestration delegation wake batch window finished stalled orchestrator turn cost seconds",
keywords: "delegation orchestration wake batch window finished stalled orchestrator turn cost seconds",
},
{
section: "orchestration",
title: "Let agents read threads in other projects",
keywords: "orchestration read search across all projects privacy agents",
keywords: "delegation orchestration read search across all projects privacy agents",
},
{
section: "orchestration",
Expand Down
2 changes: 1 addition & 1 deletion docs/data-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ for an agent in a thread, forwarded through the app like `list_sessions`:
| `read_activity` | `{ session_id, after?, limit?, order? }` — `limit` 1..200 (default 50); `order` is `oldest` (default) or `newest`; pass `next` as `after` with the same order | `{ session_id, items, next, has_more, last_provider_error }`, one merged time-ordered list: `{ source: "event", at, type, fields }`, `{ source: "provider_request", at, provider, model, status_code, latency_ms, error_kind, input_tokens, output_tokens, cached_tokens, attempt }` and `{ source: "rpc_message", at, direction, kind, method, latency_ms, byte_size }`. Items are ordered by `(at, source, row id)`; `next` encodes the last one, so pages join with no gap and no repeat. Payload columns (`request_payload_json`, `response_summary_json`, `payload_json`) are never selected |

They are reads, so none asks the user. They follow **Let agents read threads
in other projects** (Settings › Orchestration, on by default), because the store
in other projects** (Settings › Delegation, on by default), because the store
crosses projects and holds thread titles and paths:

- With it on, `thread_usage` covers every project, or the one `project` names.
Expand Down
4 changes: 2 additions & 2 deletions docs/desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ thread here can list the paired computers (`list_machines`), start, message,
read, wait on and stop threads there, and be woken when a remote delegate
finishes — the delegate is nested under its caller and its stack mark names the
machine. The app executes those calls over the machine's own connection; see
`docs/orchestrator.md` › Orchestration tools v12 for the tool set, the approval
`docs/orchestrator.md` › Delegation tools v12 for the tool set, the approval
card and what v1 leaves out (this app must be running, and a remote delegate
keeps the title its first message gives it there).

Expand Down Expand Up @@ -1535,7 +1535,7 @@ composer's keys stay outside the table.
- **Threads working for threads** ([orchestrator.md](orchestrator.md),
M1 rules from
[cross-session-orchestration.md](architecture/cross-session-orchestration.md)).
On by default (Settings › Orchestration turns it off). The app answers `_rustcode/orchestration`
On by default (Settings › Delegation turns it off). The app answers `_rustcode/orchestration`
(`src/state/host.ts`, rules in `src/state/orchestration.ts`):
`list_sessions`, `read_session`, `message_session`, `wait_session`,
`start_session` and `fan_out`. Same project only — the repository, so a main
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The one-line installers and Homebrew are covered in the [README](../README.md#in
This page covers supported platforms, building from source, the desktop app and
updating.

The installers put the `rc` orchestrator CLI on your machine and, unless you
The installers put the `rc` CLI on your machine and, unless you
pass `--no-app` (`-NoApp` on Windows), the RustCode desktop app as well: see
[Native desktop app](#native-desktop-app). Pass `--with-harness` (`-WithHarness`
on Windows) to also install the standalone `rustcode` TUI/harness binary.
Expand All @@ -20,7 +20,7 @@ targets, but those targets are not covered by release CI.

## From Source (Rust / Cargo)

The `rc` orchestrator CLI lives in `rustcode/cli` (`rustcode-cli`) and the
The `rc` CLI lives in `rustcode/cli` (`rustcode-cli`) and the
standalone `rustcode` TUI/harness lives in `harness` (`rustcode-harness`); the
repository root is the engine library and has no binary target.

Expand Down
2 changes: 1 addition & 1 deletion docs/mcp-outside-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ for its own threads, and each one takes the thread's `thread_id` (there is no
Work an outside agent starts is the ceiling of its level: threads are
standalone threads of yours (not delegates of a thread), and run at Auto-edit
under Delegate (files can change; a command that needs approval is declined)
and at Full only under Manage. Reads follow Settings › Orchestration › "Let agents
and at Full only under Manage. Reads follow Settings › Delegation › "Let agents
read threads in other projects": with it off, outside agents cannot read across
projects, `thread_usage` or `query_data`.

Expand Down
Loading
Loading