@andorra-labs/code 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -208
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/src/agent-execution.js +36 -0
- package/dist/src/app-server/protocol.d.ts +1 -0
- package/dist/src/app-server.d.ts +34 -1
- package/dist/src/app-server.js +264 -54
- package/dist/src/automation-service.js +1 -1
- package/dist/src/browser-session.d.ts +8 -0
- package/dist/src/browser-session.js +27 -1
- package/dist/src/browser-ui/app.js +237 -15
- package/dist/src/browser-ui/index.html +5 -5
- package/dist/src/browser-ui/style.css +110 -65
- package/dist/src/browser-ui/tokens.css +27 -26
- package/dist/src/coding-tools.d.ts +24 -0
- package/dist/src/coding-tools.js +71 -8
- package/dist/src/command-screens.js +1 -1
- package/dist/src/commands.js +1 -1
- package/dist/src/completion-gates.d.ts +42 -7
- package/dist/src/completion-gates.js +55 -9
- package/dist/src/completion.d.ts +8 -0
- package/dist/src/completion.js +19 -1
- package/dist/src/dashboard-view.js +2 -2
- package/dist/src/deadline.js +4 -0
- package/dist/src/graph-manager-chat.js +13 -13
- package/dist/src/graph-runner.js +39 -2
- package/dist/src/graph-server.js +9 -9
- package/dist/src/graph-sync.d.ts +8 -0
- package/dist/src/graph-sync.js +54 -3
- package/dist/src/graph-tool.js +1 -1
- package/dist/src/graph-ui/app.js +262 -93
- package/dist/src/graph-ui/controls.css +43 -22
- package/dist/src/graph-ui/controls.js +31 -1
- package/dist/src/graph-ui/embed.js +62 -13
- package/dist/src/graph-ui/icons.js +4 -0
- package/dist/src/graph-ui/index.html +3 -3
- package/dist/src/graph-ui/manager-state.js +2 -2
- package/dist/src/graph-ui/manager.css +19 -18
- package/dist/src/graph-ui/manager.js +11 -11
- package/dist/src/graph-ui/skill-picker.js +1 -1
- package/dist/src/graph-ui/studio-canvas.js +8 -8
- package/dist/src/graph-ui/studio.css +18 -15
- package/dist/src/graph-ui/studio.js +92 -35
- package/dist/src/graph-ui/style.css +122 -79
- package/dist/src/graph-ui/theme.js +2 -2
- package/dist/src/graph-ui/tokens.css +33 -29
- package/dist/src/graphs.d.ts +3 -2
- package/dist/src/graphs.js +3 -2
- package/dist/src/membership-errors.d.ts +7 -1
- package/dist/src/membership-errors.js +9 -3
- package/dist/src/pull-requests.d.ts +42 -6
- package/dist/src/pull-requests.js +11 -3
- package/dist/src/react-runtime.js +121 -14
- package/dist/src/read-document-doc.d.ts +20 -0
- package/dist/src/read-document-doc.js +524 -0
- package/dist/src/read-document-docx.d.ts +21 -0
- package/dist/src/read-document-docx.js +584 -0
- package/dist/src/read-document-text.d.ts +29 -0
- package/dist/src/read-document-text.js +67 -0
- package/dist/src/read-document-tool.d.ts +48 -0
- package/dist/src/read-document-tool.js +162 -0
- package/dist/src/read-document.d.ts +78 -0
- package/dist/src/read-document.js +353 -0
- package/dist/src/read-image.d.ts +29 -2
- package/dist/src/read-image.js +42 -17
- package/dist/src/runtime.d.ts +19 -0
- package/dist/src/runtime.js +10 -1
- package/dist/src/session-changes.d.ts +6 -1
- package/dist/src/session-changes.js +13 -5
- package/dist/src/side-panel.d.ts +6 -1
- package/dist/src/side-panel.js +12 -10
- package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
- package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +37 -3
- package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
- package/dist/src/skills/bundled/provenance.json +4 -4
- package/dist/src/skills/runtime-skills.js +3 -3
- package/dist/src/stall-recovery.d.ts +6 -2
- package/dist/src/stall-recovery.js +7 -2
- package/dist/src/terminal-ui.js +2 -2
- package/dist/src/time-limit.d.ts +53 -0
- package/dist/src/time-limit.js +79 -0
- package/dist/src/tools.js +92 -7
- package/dist/src/transcript.js +1 -1
- package/dist/src/types.d.ts +6 -0
- package/dist/src/usage-analytics.d.ts +3 -1
- package/dist/src/usage-analytics.js +16 -2
- package/package.json +6 -26
- package/docs/README.md +0 -36
- package/docs/agents/README.md +0 -62
- package/docs/agents/install-for-agents.md +0 -56
- package/docs/agents/mcp-server.md +0 -212
- package/docs/agents/subagent-mode.md +0 -149
- package/docs/concepts/README.md +0 -47
- package/docs/concepts/jev-actionable-routing.md +0 -113
- package/docs/concepts/jev-decision-thresholds.md +0 -412
- package/docs/concepts/jev-efficiency.md +0 -217
- package/docs/concepts/jev-eval-2026-11-01.md +0 -78
- package/docs/concepts/limits.md +0 -52
- package/docs/concepts/memory.md +0 -10
- package/docs/concepts/security.md +0 -50
- package/docs/concepts/workspace-instructions.md +0 -29
- package/docs/getting-started/README.md +0 -82
- package/docs/getting-started/accounts.md +0 -78
- package/docs/getting-started/configure-providers.md +0 -132
- package/docs/guides/README.md +0 -13
- package/docs/guides/browser.md +0 -39
- package/docs/guides/desktop-app.md +0 -414
- package/docs/guides/extensions.md +0 -102
- package/docs/guides/graph-builder.md +0 -116
- package/docs/guides/headless.md +0 -46
- package/docs/guides/tui.md +0 -75
- package/docs/guides/update.md +0 -70
- package/docs/guides/web-search.md +0 -51
- package/docs/guides/windows-code-signing.md +0 -319
- package/docs/llms.txt +0 -45
- package/docs/reference/README.md +0 -7
- package/docs/reference/cli.md +0 -76
- package/docs/reference/config.md +0 -91
- package/docs/reference/slash-commands.md +0 -59
- package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
- package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
- package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
- package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
- package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
- package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
- package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
- package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
- package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
- package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
- package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
- package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
- package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
- package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
- package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
- package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
- package/scripts/jev-efficiency-eval.mjs +0 -187
- package/scripts/jev-efficiency-live.mjs +0 -193
- package/scripts/zcode-engine-replay.mjs +0 -223
- package/tests/agent-centric-mcp-test-plan.md +0 -208
- package/tests/analytics-settings-test-plan.md +0 -165
- package/tests/browser-cli-smoke.mjs +0 -276
- package/tests/browser-test-plan.md +0 -280
- package/tests/chat-side-panel-test-plan.md +0 -309
- package/tests/decision-engine-test-plan.md +0 -163
- package/tests/default-active-jev-test-plan.md +0 -85
- package/tests/harness-extensions-test-plan.md +0 -113
- package/tests/jev-all-decisions-test-plan.md +0 -156
- package/tests/jev-efficiency/criteria.json +0 -158
- package/tests/jev-efficiency/workloads.mjs +0 -242
- package/tests/jev-efficiency-test-plan.md +0 -198
- package/tests/permissions-sandbox-probe.mjs +0 -74
- package/tests/permissions-test-plan.md +0 -191
- package/tests/product-telemetry-test-plan.md +0 -536
- package/tests/thinking-stream-preview-test-plan.md +0 -136
- package/tests/zcode-react-engine-test-plan.md +0 -396
package/README.md
CHANGED
|
@@ -1,231 +1,51 @@
|
|
|
1
1
|
# Andorra Code
|
|
2
2
|
|
|
3
|
-
Andorra Code is a
|
|
3
|
+
Andorra Code is a terminal-first coding agent from Andorra Labs. Run `andorra` in a project folder, describe the work, and watch the agent read the repository, run tools, and make the change, with approvals for anything risky.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Work runs on a **graph**: visible stages, decisions and handoffs that you can inspect, edit and rerun, instead of one fixed agent loop. You bring your own models.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Requires Node.js 22.19 or newer.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
From a project directory:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
andorra
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
This opens the Andorra Code TUI and loads the currently selected graph for that project/user context. If no custom selection exists, Andorra Code can start with a bundled default software-engineering graph.
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
┌ Andorra Code · Software Engineer ───────────────────────────────────────────┐
|
|
23
|
-
│ cwd ~/code/portal branch feature/auth runtime local · connected │
|
|
24
|
-
├───────────────────────┬─────────────────────────────────────────────────────┤
|
|
25
|
-
│ GRAPH │ RUN │
|
|
26
|
-
│ │ │
|
|
27
|
-
│ ✓ Understand task │ Andorra │
|
|
28
|
-
│ ✓ Repository analyst │ I found the authentication flow in src/auth/. │
|
|
29
|
-
│ ● Software engineer │ │
|
|
30
|
-
│ ○ Tests │ ● shell pnpm test auth │
|
|
31
|
-
│ ○ Browser QA │ ● edit src/auth/session.ts │
|
|
32
|
-
│ ○ Security review │ │
|
|
33
|
-
│ ○ Code review │ │
|
|
34
|
-
│ │ │
|
|
35
|
-
├───────────────────────┴─────────────────────────────────────────────────────┤
|
|
36
|
-
│ > Add coverage for expired refresh tokens too. │
|
|
37
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
38
|
-
│ /graph /node /state /logs /artifacts /pause /help ctrl+c │
|
|
39
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Manage harness extensions and sign-in
|
|
43
|
-
|
|
44
|
-
Use `/skills` to list, install, enable, disable or remove local/GitHub skills; `/mcp` to add, edit, enable, disable or delete stdio and HTTP servers; and `/plugins` to manage bundles of skills and MCP servers. Files live under `~/.andorracode` (or `ANDORRACODE_HOME`), and changes apply to the next task. `/logout` signs out of your Andorra account (then `/login` to switch accounts); `/logout codex` signs out of Codex and exits while retaining configuration and API-key settings. See [extension management](docs/guides/extensions.md) for formats, authentication, permissions and examples.
|
|
45
|
-
|
|
46
|
-
### Track the task plan
|
|
47
|
-
|
|
48
|
-
`/dashboard` opens persistent cards for per-model session tokens, current/latest task timing, todos, and the active graph neighbourhood. Ctrl+B returns to the preserved transcript; Ctrl+N cycles displayed model statistics, and Ctrl+G pages the ASCII graph. Steering, clarification and approvals use the same bottom composer. See [Dashboard](docs/guides/tui.md#dashboard).
|
|
49
|
-
|
|
50
|
-
`/browser` opens a local GUI with projects and sessions in a sidebar, conversation and tool activity, and progress. Send prompts, steer or cancel runs, and answer runtime questions and approvals while the CLI remains available. Sessions retain history; settings control the age filter and light/dark appearance. See [Browser workspace](docs/guides/browser.md).
|
|
51
|
-
|
|
52
|
-
The Orchestrator creates a shared Todo list at the start of a run. Agent stages update it with `?` pending, `?` in progress, and `?` completed items. Press **Ctrl+T** to expand or collapse the list; **Ctrl+O** toggles tool and approval details. See [Todo progress](docs/guides/tui.md#todo-progress).
|
|
53
|
-
|
|
54
|
-
### Switch harness graphs inside the TUI
|
|
55
|
-
|
|
56
|
-
The `/graph` command opens the graph selector:
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
/graph
|
|
60
|
-
|
|
61
|
-
Graphs
|
|
62
|
-
● Software Engineer preset
|
|
63
|
-
Fast Fix custom
|
|
64
|
-
Full SDLC custom
|
|
65
|
-
Review Only custom
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
The user can switch between bundled presets and graphs they created in the configuration application. A run is always pinned to one immutable graph revision. If work is already executing, changing graphs starts or prepares a new run rather than silently mutating the graph underneath the active run.
|
|
69
|
-
|
|
70
|
-
### Graph editor (implemented)
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
andorra # Use /providers to add or edit a provider first
|
|
74
|
-
andorra graph # Open the bundled browser editor
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
The editor ships inside the npm package and runs on localhost. `andorracode --configure` also opens it. Use the searchable Node Library to add your own Agents, import Agents others shared, or insert the built-in Orchestrator, Software Engineer and QA Tester presets. Right-click an Agent to Use, Clone, Share (export as JSON) or Delete it; built-in Agents cannot be deleted. Configure models, capabilities, completion ports, typed inputs/outputs and internal subagent roles in the Inspector. Connect one outcome to several destinations, edit each edge's input mappings, and use Join all/any for explicit synchronization.
|
|
78
|
-
|
|
79
|
-
New graphs begin with an optional Orchestrator that researches the codebase and clarifies requirements and design choices with you before routing to Engineering, QA or another configured stage. Delete it to start directly at the first connected successor, falling back to the first remaining node when no successor remains. Saved version 3 graphs retain that start without restoring intake. Its optional subagent maximum is a ceiling, not a target. Ctrl-click matching node types to route a shared outcome to one destination in bulk. See [Graph Builder](docs/guides/graph-builder.md) for editing behavior and [Orchestrator intake and bulk routing](design/decisions/0011-orchestrator-entry-and-bulk-routing.md) for the original design.
|
|
80
|
-
|
|
81
|
-
Save immutable revision snapshots, then select a graph with `/graph` in the TUI or `andorra --graph <id>`. Headless `--prompt` runs cannot answer Orchestrator questions and return `needs_clarification`. Existing graphs load without destructive migration. The current top-level scheduler runs ready nodes serially; bounded subagents can run inside an Agent invocation. `andorra graph --no-open` prints the URL without opening a browser; Ctrl+C stops the server. Missing providers produce guidance to run `andorra` and open `/providers`.
|
|
82
|
-
|
|
83
|
-
### Agent MCP server (graph automation and session monitoring)
|
|
84
|
-
|
|
85
|
-
Trusted external agents such as Hermes and OpenClaw can launch `andorra mcp-server --stdio` and use MCP tools to create graph drafts, upsert Agent/Condition/Loop/Join nodes, connect outcome ports, configure prompts/providers, validate actionable errors, and publish immutable revisions. The MCP resource `andorra://graph/architecture` teaches agents the graph structure before editing. Other tools query saved sessions by project, status, and last X minutes or identify work needing human feedback. See [agent MCP setup, tool contract and examples](docs/agents/mcp-server.md) and the [QA plan](tests/agent-centric-mcp-test-plan.md). The same server also runs Andorra as a subagent for a host that wants the work done rather than the graph authored; see [subagent mode](docs/agents/subagent-mode.md).
|
|
86
|
-
|
|
87
|
-
### Session debug log
|
|
88
|
-
|
|
89
|
-
Every conversation already keeps a trajectory journal (shown with `/status` in the interactive TUI, or at startup with `--debug`) with each model request and response — including per-call token usage and duration — plus every runtime event such as tool calls with arguments, outputs and timings. Add `--debug` (`andorra --debug` or `andorra --prompt "task" --debug`) to also record the conversation layer around them: a `session.started` banner with the invocation details (created before the first fallible startup step, so failed invocations still explain themselves), a `session.context` record with the resolved providers and workspace; `command.started` / `command.completed` entries with the wall-clock cost of every prompt and slash command, including commands issued while a run is active (steering messages are marked `command.steer`); `command.error` entries for CLI-level failures that never reach the runtime; and a closing `session.ended` summary with session-wide token totals, written even when startup or a run crashes. Credentials (stored keys and the values of provider-named environment variables, including ones added mid-session through `/providers`) and provider reasoning content are redacted from every record, and in `--json` mode the trajectory path is announced on stderr so stdout stays machine-readable.
|
|
90
|
-
|
|
91
|
-
This browser delivery replaces the earlier Electron plan. See [manual Agents, routing and handoffs](design/decisions/0010-manual-agents-routing-handoffs.md) for schema version 2, explicit data mapping, subagent authority/workspace rules and current limitations. The visual editor follows the [AndorraBot V3 baseline](design/gui-design/). Alongside manual editing, Graph Studio offers an AI edit proposal route, and the agent MCP server supports external agent-driven graph authoring.
|
|
92
|
-
|
|
93
|
-
## How the harness works
|
|
94
|
-
|
|
95
|
-
A graph is not merely a sequence of LLM calls. Agent nodes are full autonomous tool-using loops that can inspect repositories, run shell commands, edit files, use Git, browse, test, and iterate until their assigned responsibility is complete.
|
|
96
|
-
|
|
97
|
-
The default Agent-node executor is a shared **basic ReAct loop**. Each Agent-node invocation has its own role, tools, permissions, and execution counters. Direct handoffs can reuse conversation history with the same provider profile and model; isolation is configurable:
|
|
98
|
-
|
|
99
|
-
```text
|
|
100
|
-
model
|
|
101
|
-
↓
|
|
102
|
-
tool call → tool result
|
|
103
|
-
↑ ↓
|
|
104
|
-
└──── model ──┘
|
|
105
|
-
...
|
|
106
|
-
↓
|
|
107
|
-
validated node completion
|
|
108
|
-
↓
|
|
109
|
-
graph chooses the next edge/node
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
The same `react-basic` executor can power an Orchestrator, Implementer, PR Review Fixer, QA Agent, or Deployment Troubleshooter while each node has its own model, system prompt, tools, permissions, context, and completion contract.
|
|
113
|
-
|
|
114
|
-
Edges never own ReAct loops. Deterministic operations such as running a known test command, evaluating a condition, waiting for CI, or deploying a known artifact should normally use deterministic nodes rather than an LLM loop.
|
|
115
|
-
|
|
116
|
-
See [`design/architecture/react-agent-loop.md`](design/architecture/react-agent-loop.md) for the implementation contract.
|
|
117
|
-
|
|
118
|
-
A full software-development graph may look like:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
Task
|
|
122
|
-
↓
|
|
123
|
-
Understand / Requirements
|
|
124
|
-
↓
|
|
125
|
-
Repository Analysis
|
|
126
|
-
↓
|
|
127
|
-
Plan
|
|
128
|
-
↓
|
|
129
|
-
Software Engineer
|
|
130
|
-
↓
|
|
131
|
-
Automated Tests ─────────── fail ─────┐
|
|
132
|
-
↓ pass │
|
|
133
|
-
Browser QA ───────────────── fail ────┤
|
|
134
|
-
↓ pass │
|
|
135
|
-
Security Review ──────────── fail ────┤
|
|
136
|
-
↓ pass │
|
|
137
|
-
Code Review / PR Review ─── issues ───┘
|
|
138
|
-
↓ pass
|
|
139
|
-
Deploy / Final Verification
|
|
140
|
-
↓
|
|
141
|
-
Done
|
|
11
|
+
```sh
|
|
12
|
+
npm install -g @andorra-labs/code
|
|
142
13
|
```
|
|
143
14
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## One harness, multiple interfaces
|
|
15
|
+
This installs `andorra` and the alias `andorracode`. Keep it current with `andorra update`.
|
|
147
16
|
|
|
148
|
-
|
|
17
|
+
## First run
|
|
149
18
|
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Browser Configure app ──────┼──► Andorra Code Runtime ───► Harness revision
|
|
154
|
-
Desktop client (app-server) ─┤
|
|
155
|
-
│
|
|
156
|
-
Headless CLI / SDK (future) ─┘
|
|
19
|
+
```sh
|
|
20
|
+
cd /path/to/your/project
|
|
21
|
+
andorra
|
|
157
22
|
```
|
|
158
23
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
This allows a graph created visually to be selected immediately with `/graph` in the TUI without export or translation.
|
|
24
|
+
On first launch, type `/providers` to add a model provider: an OpenAI-compatible or Anthropic API key, a ChatGPT subscription (Codex), or a local server such as LM Studio. Keys are stored in your operating system's credential store.
|
|
162
25
|
|
|
163
|
-
|
|
164
|
-
line-delimited JSON protocol, so its sessions, run records, configuration, and account are the CLI's own.
|
|
165
|
-
See [`docs/guides/desktop-app.md`](docs/guides/desktop-app.md) and [ADR 0014](design/decisions/0014-tauri-desktop-client-and-app-server.md).
|
|
26
|
+
Useful commands inside the TUI:
|
|
166
27
|
|
|
167
|
-
|
|
28
|
+
| Command | What it does |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `/providers`, `/model` | Add providers and pick the model |
|
|
31
|
+
| `/graph` | Choose the graph (harness) a task runs on |
|
|
32
|
+
| `/permissions` | Read Only, Ask for approval (default), Approve for me, or Full Access |
|
|
33
|
+
| `/skills`, `/mcp`, `/plugins` | Manage skills, MCP servers and plugins |
|
|
34
|
+
| `/login`, `/logout` | Sign in to an Andorra account |
|
|
35
|
+
| `/help` | Everything else |
|
|
168
36
|
|
|
169
|
-
|
|
170
|
-
- **Graph selector** — `/graph` switches between preset and custom harness graphs.
|
|
171
|
-
- **Configure application** — bundled local browser UI launched with `andorra graph` or `andorra --configure`.
|
|
172
|
-
- **Graph Builder** — Shopify Flow-like canvas for creating and wiring harness graphs.
|
|
173
|
-
- **Node Library** — built-in primitives and reusable user-created nodes.
|
|
174
|
-
- **Manual Agent configuration** - editable shared-executor presets, typed handoffs, reusable custom definitions and optional internal subagents.
|
|
175
|
-
- **Settings / Providers** — configure hosted providers, provider-supported authentication, and OpenAI-compatible local endpoints; configured models become selectable per Agent node.
|
|
176
|
-
- **Headless execution** — machine-readable execution for scripting/CI without requiring the TUI.
|
|
177
|
-
- **Subagent mode** — run Andorra from another agent (Claude CLI, Codex CLI) over MCP or the CLI; the host names a provider/model and gets one Software Engineer run back. See [`docs/agents/subagent-mode.md`](docs/agents/subagent-mode.md).
|
|
178
|
-
- **Session debug log** — `--debug` adds per-command timing, CLI error records and session token totals to the always-on trajectory journal.
|
|
179
|
-
- **Command lessons** — recognizable shell failures leave a short local lesson per repository that later runs receive; see [`docs/concepts/memory.md`](docs/concepts/memory.md).
|
|
180
|
-
|
|
181
|
-
## Key principles
|
|
182
|
-
|
|
183
|
-
1. **Andorra Code is CLI-first.** `andorra` opens the coding-agent TUI; the browser editor is opened explicitly for configuration.
|
|
184
|
-
2. **The graph is the harness.** The selected graph defines how the coding agent behaves.
|
|
185
|
-
3. **Agent nodes use a shared basic ReAct executor.** One Agent-node attempt owns one independent ReAct loop; graph edges route only after the node returns.
|
|
186
|
-
4. **Agent nodes remain full agents.** Graph orchestration does not replace their inner model/tool autonomy.
|
|
187
|
-
5. **Graphs are swappable.** `/graph` lets users choose preset or custom harnesses without rebuilding the application.
|
|
188
|
-
6. **Runs are revision-pinned.** Switching graphs never silently changes an already-running execution plan.
|
|
189
|
-
7. **Models are configuration, not node identity.** Each Agent node references a configured model profile and can use a different provider/model.
|
|
190
|
-
8. **Verification is independent.** Workers are not trusted simply because they claim success; QA/review/security stages can prove completion.
|
|
191
|
-
9. **State is explicit and durable.** Requirements, findings, diffs, tests, artifacts, approvals, and checkpoints are inspectable and survive client disconnects where configured.
|
|
192
|
-
10. **Permissions follow capabilities.** Nodes receive only the tools, secrets, and destructive permissions they require.
|
|
193
|
-
11. **One runtime, multiple clients.** TUI, browser configuration, headless CLI, and future SDK/API clients use the same harness semantics.
|
|
194
|
-
|
|
195
|
-
## Documentation
|
|
196
|
-
|
|
197
|
-
Start at [`docs/README.md`](docs/README.md).
|
|
198
|
-
|
|
199
|
-
The CLI uses [hosted Jev decisions](design/decision-engine.md) by default for signed-in free and paid users to select eligible CodeGraph context. Runs using the enabled hosted service send a compact, question-scoped routing snapshot to that service: bounded task/node-instruction excerpts plus only the capability metadata needed by the current Jev questions. Retrieved source and conversation history are excluded. Use `/jev off` before submitting work you do not want sent to Jev, `/jev on` to re-enable it, and `/jev status` to inspect the persisted preference (enabled when omitted). Paid users can also disable Jev per Agent in the graph builder. The shared Jev key stays in AWS; no personal Jev key is required.
|
|
200
|
-
|
|
201
|
-
The coding model still implements the task. Authentication, quota, capability restrictions and safe fallback remain enforced; Jev does not change tool permissions or graph edges. Signed-out users retain ordinary retrieval routing unless they configure a local decision service. [QA evidence](tests/default-active-jev-test-plan.md) records a successful live hosted CLI run; prediction quality and token savings have not been measured. Configure a local model under **Settings > Runtime > Jev decisions > Configure decisions**, with its structured decision API URL, model name and optional authentication environment-variable name. CLI, desktop and browser honor the saved `decisions` configuration; global `/jev off` disables both local and hosted calls. Direct Jev supports shadow evaluation and Laya supports shadow/active CodeGraph and memory routing; ordinary OpenAI-compatible chat models are insufficient. Explicit embedded runtimes retain off/none library defaults.
|
|
202
|
-
|
|
203
|
-
See [`design/product/tui-design.md`](design/product/tui-design.md) for the primary terminal UX, [`design/product/graph-builder.md`](design/product/graph-builder.md) for the `--configure` graph editor, [`design/architecture/react-agent-loop.md`](design/architecture/react-agent-loop.md) for the default Agent executor, [`design/gui-design/`](design/gui-design/) for the AndorraBot-derived desktop design baseline, and [`design/architecture/overview.md`](design/architecture/overview.md) for the shared runtime architecture.
|
|
204
|
-
|
|
205
|
-
## Status
|
|
206
|
-
|
|
207
|
-
Initial executable CLI/runtime is available. See [Getting started](docs/getting-started/README.md) for installation, provider setup, slash commands, headless use and current limitations.
|
|
37
|
+
Run a single task without the TUI:
|
|
208
38
|
|
|
209
39
|
```sh
|
|
210
|
-
|
|
211
|
-
npm run build
|
|
212
|
-
npm start
|
|
40
|
+
andorra --prompt "Add a test for the date parser" --json
|
|
213
41
|
```
|
|
214
42
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
### Workspace permissions
|
|
218
|
-
|
|
219
|
-
Use `/permissions` to choose **Read Only**, **Ask for approval** (default), **Approve for me**, or **Full Access**. Selections persist per canonical workspace directory in your global Andorra configuration. The selector marks the current mode; Escape cancels. `/permissions read-only|ask-for-approval|approve-for-me|full-access` also selects directly.
|
|
220
|
-
|
|
221
|
-
Workspace writes are automatic in Ask for approval and Approve for me; Read Only asks before native writes. Native file operations require per-operation approval outside the workspace or for protected repository/runtime metadata, including a custom `CODEX_HOME`. Graph capability limits remain in force.
|
|
222
|
-
|
|
223
|
-
Read Only suspends CodeGraph because indexing writes its workspace cache. Switching to Read Only stops active cache writers before saving the mode; if they cannot stop, the change reports an error. Switching back to a writable mode resumes CodeGraph when enabled. Native reads and searches remain available while indexing is suspended.
|
|
43
|
+
`andorra graph` opens the visual graph builder in your browser.
|
|
224
44
|
|
|
225
|
-
|
|
45
|
+
## Accounts
|
|
226
46
|
|
|
227
|
-
|
|
47
|
+
The coding agent runs on your machine with your providers, and it works signed out. Signing in (`andorra login`) adds custom graphs, and an Andorra membership unlocks larger graphs and the Orchestrator. See [andorracode.com](https://andorracode.com).
|
|
228
48
|
|
|
229
|
-
|
|
49
|
+
## License
|
|
230
50
|
|
|
231
|
-
|
|
51
|
+
Proprietary; free to use under the terms in `LICENSE.md`. Third-party notices are in `THIRD_PARTY_NOTICES.md`.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -55,3 +55,18 @@ files from its own origin. The font files are the unmodified `latin` subsets of
|
|
|
55
55
|
- Copyright: Copyright 2023 Vercel, made in collaboration with basement.studio
|
|
56
56
|
- License: SIL Open Font License 1.1
|
|
57
57
|
- License copy: `licenses/GEIST-OFL-1.1.txt`
|
|
58
|
+
|
|
59
|
+
## PDFium
|
|
60
|
+
|
|
61
|
+
Read opens PDF files, for the text of each page and for page images, with PDFium compiled to
|
|
62
|
+
WebAssembly (`src/read-document.ts`). It is installed as the npm dependency `@hyzyla/pdfium`
|
|
63
|
+
version 3.0.0; no source from either project is copied into this repository.
|
|
64
|
+
|
|
65
|
+
- Wrapper: https://github.com/hyzyla/pdfium, by Yevhenii Hyzyla
|
|
66
|
+
- Wrapper license: MIT, as shipped in the package's `LICENSE.md`
|
|
67
|
+
- Engine: https://pdfium.googlesource.com/pdfium
|
|
68
|
+
- Engine copyright: Copyright 2014 The PDFium Authors
|
|
69
|
+
- Engine license: BSD 3-Clause and Apache License 2.0, as stated in PDFium's `LICENSE`
|
|
70
|
+
|
|
71
|
+
The WebAssembly build links the libraries PDFium vendors under `third_party`, among them FreeType
|
|
72
|
+
and OpenJPEG, each under its own permissive license recorded in the PDFium source tree.
|
|
@@ -504,6 +504,42 @@ export async function executeAgentNode(node, options) {
|
|
|
504
504
|
await emit('agent.clarification.answered', { answered: true });
|
|
505
505
|
return JSON.stringify({ answer, proposedDesign: args.proposedDesign });
|
|
506
506
|
} });
|
|
507
|
+
// A top-level execution agent asks through the same prompt the Orchestrator's intake uses.
|
|
508
|
+
// Without the tool its only way to ask is prose: a question written beside a tool call pauses
|
|
509
|
+
// nothing, and a reply that is only a question is a stalled turn the runtime sends back, so
|
|
510
|
+
// the user watches the question scroll past while the run keeps working. It is offered only
|
|
511
|
+
// where a person can answer; a headless run keeps the complete_agent handoff, and a delegated
|
|
512
|
+
// child reports to its parent rather than to the user.
|
|
513
|
+
if (!orchestrator && depth === 0 && options.context.approvalMode !== 'headless' && options.context.askUser)
|
|
514
|
+
tools.push({ name: 'ask_user', executionMode: 'sequential', description: 'Ask the user a question only they can answer and wait for the answer. Use it whenever a choice is theirs to make: a skill or instruction that says to ask, a preference, a missing requirement. A question written in your reply does not pause the run and may go unseen, so never ask that way. Ask one short question per call in plain language; when the options are known give 2-4 short choices, the recommended one first and labelled (Recommended). Do not ask what your tools can find out or what you can reasonably decide yourself.',
|
|
515
|
+
parameters: { type: 'object', properties: { question: { type: 'string', minLength: 1, maxLength: 500, description: 'One plain-language question.' }, choices: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 200 }, minItems: 2, maxItems: 8, description: 'Short answers the user can pick from; they can always type their own.' } }, required: ['question'], additionalProperties: false },
|
|
516
|
+
execute: async (args, ctx) => {
|
|
517
|
+
ctx.signal.throwIfAborted();
|
|
518
|
+
if (Object.keys(args).some(key => !['question', 'choices'].includes(key)) || typeof args.question !== 'string' || !args.question.trim() || args.question.length > 500)
|
|
519
|
+
throw new Error('Ask one simple question of at most 500 characters in question; put the possible answers in choices.');
|
|
520
|
+
if (args.choices !== undefined && (!Array.isArray(args.choices) || args.choices.length < 2 || args.choices.length > 8 || args.choices.some(item => typeof item !== 'string' || !item.trim() || item.length > 200)))
|
|
521
|
+
throw new Error('Optional choices must be an array of 2-8 nonempty strings, each at most 200 characters.');
|
|
522
|
+
const choices = args.choices === undefined ? undefined : [...args.choices];
|
|
523
|
+
if (ctx.approvalMode === 'headless' || !ctx.askUser)
|
|
524
|
+
throw new Error('No user can answer on this surface. Decide with the recommended option and say so, or hand off with complete_agent and put the question first in the summary.');
|
|
525
|
+
const question = args.question.trim();
|
|
526
|
+
await emit('agent.clarification.requested', { question, ...(choices ? { choices } : {}) });
|
|
527
|
+
const answer = await ctx.askUser(question, ctx.userSignal ?? ctx.signal, choices);
|
|
528
|
+
ctx.signal.throwIfAborted();
|
|
529
|
+
const answered = typeof answer === 'string' && !!answer.trim() && answer.trim().toLowerCase() !== '/cancel';
|
|
530
|
+
await emit('agent.clarification.answered', { answered });
|
|
531
|
+
// The surfaces report two different refusals. No answer at all, or /cancel, is the user
|
|
532
|
+
// cancelling: the terminal's choice is labelled "Cancel this task", so the run stops as it
|
|
533
|
+
// does for an Orchestrator question. An empty answer is the desktop's Skip, which declines
|
|
534
|
+
// this one question and lets the work go on.
|
|
535
|
+
if (typeof answer !== 'string' || answer.trim().toLowerCase() === '/cancel')
|
|
536
|
+
throw new ClarificationRequiredError('Needs clarification: the user cancelled the task at a question. Nothing further was done.');
|
|
537
|
+
if (!answered)
|
|
538
|
+
return JSON.stringify({ answered: false, note: 'The user skipped the question without answering. Do not ask it again: continue with the recommended option and say which one you chose, or hand off with complete_agent if the work cannot continue without their decision.' });
|
|
539
|
+
if (answer.length > 16000)
|
|
540
|
+
throw new Error('The answer exceeds 16000 characters; ask for a shorter decision.');
|
|
541
|
+
return JSON.stringify({ answered: true, answer });
|
|
542
|
+
} });
|
|
507
543
|
// Plan mode is offered at the run's top level regardless of the mode this attempt composed
|
|
508
544
|
// under: the mode is the user's pick and can change while the task runs (the live picker or
|
|
509
545
|
// /permissions plan), and a catalog keyed to the starting mode would leave a switched-in run
|
package/dist/src/app-server.d.ts
CHANGED
|
@@ -148,6 +148,14 @@ export declare class AppServer {
|
|
|
148
148
|
private readonly sessionChanges;
|
|
149
149
|
/** The wakes this engine armed for Auto-fix, checked against the PR record again before delivery. */
|
|
150
150
|
private readonly autoFixWakes;
|
|
151
|
+
/**
|
|
152
|
+
* A run of the session waiting inside the `pull_request` tool's `await_review` for its PR's next review, by
|
|
153
|
+
* session: the review comments the watcher finds go to it instead of to a wake, and it hears when the PR is
|
|
154
|
+
* merged, closed, dismissed or has Auto-fix switched off.
|
|
155
|
+
*/
|
|
156
|
+
private readonly reviewWaiters;
|
|
157
|
+
/** Sessions whose review wait is reserved and still being prepared (`awaitReview`). */
|
|
158
|
+
private readonly reviewWaitsStarting;
|
|
151
159
|
/**
|
|
152
160
|
* The account's graph sync, so a graph saved on another machine is listed here too. A first pass that
|
|
153
161
|
* outlasts the listing's bounded wait publishes `graphs.changed`: that listing already answered from
|
|
@@ -1061,6 +1069,21 @@ export declare class AppServer {
|
|
|
1061
1069
|
private updateSessionSkill;
|
|
1062
1070
|
/** Say what a session is waiting on. An empty list is a real answer: it is what ends a wait. */
|
|
1063
1071
|
private emitPullRequest;
|
|
1072
|
+
/**
|
|
1073
|
+
* Hold the calling run until its PR's next review: the comments the watcher finds are handed to it as the Auto-fix
|
|
1074
|
+
* prompt would be, instead of being armed as a wake. A wake already armed for comments it has not delivered is
|
|
1075
|
+
* taken at once. `origin` (the waiting node) becomes the node later Auto-fix wakes go to, since it owns the loop.
|
|
1076
|
+
*/
|
|
1077
|
+
private awaitReview;
|
|
1078
|
+
/**
|
|
1079
|
+
* What the session's PR record says a review wait should end with, handed to `deliver`: the PR is gone, finished or
|
|
1080
|
+
* has Auto-fix off, or it holds comments found and not yet carried by a run. Those are taken under the lock, handed
|
|
1081
|
+
* over first and only then marked handled, so a wait that ended meanwhile never loses them. A wake this engine is
|
|
1082
|
+
* delivering now is left to that delivery.
|
|
1083
|
+
*/
|
|
1084
|
+
private reviewWaitFromRecord;
|
|
1085
|
+
/** A run now carries the Auto-fix prompt behind `wakeId`: its comments are handled. */
|
|
1086
|
+
private recordAutoFixDelivered;
|
|
1064
1087
|
/** The pending set as a change left it, without diffs: a client reads those with `sessions.changes.list`. */
|
|
1065
1088
|
private emitSessionChanges;
|
|
1066
1089
|
/**
|
|
@@ -1080,7 +1103,8 @@ export declare class AppServer {
|
|
|
1080
1103
|
/**
|
|
1081
1104
|
* Hand an Auto-fix prompt to the session through the same wake a `set_timer` arms, under the selections the
|
|
1082
1105
|
* session's PR was configured from: without them the continuation would run under whatever graph and model
|
|
1083
|
-
* the configuration names today, with different tools than the work it is fixing.
|
|
1106
|
+
* the configuration names today, with different tools than the work it is fixing. `origin` addresses the prompt to
|
|
1107
|
+
* the graph node that switched Auto-fix on (`deliverDueTimers`), rather than to the graph's entry node.
|
|
1084
1108
|
*/
|
|
1085
1109
|
private wakeForPullRequest;
|
|
1086
1110
|
private emitTimers;
|
|
@@ -1112,6 +1136,15 @@ export declare class AppServer {
|
|
|
1112
1136
|
* so the reason goes out with `timers.spent` - which a window shows as a notice - and into the log.
|
|
1113
1137
|
*/
|
|
1114
1138
|
private spendWake;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether a wake is a `set_timer` reminder a graph node set about the work it was doing. Those belong to that work:
|
|
1141
|
+
* they are read by the node while its attempt runs, and spent once the node or the attempt is done with it.
|
|
1142
|
+
*
|
|
1143
|
+
* An Auto-fix wake also names a node (the one that switched Auto-fix on), but only as its address: review comments
|
|
1144
|
+
* are new work that outlives the attempt that turned Auto-fix on, so they are never spent with it and always wait
|
|
1145
|
+
* for the engine to be free (`deliverDueTimers`).
|
|
1146
|
+
*/
|
|
1147
|
+
private nodeReminder;
|
|
1115
1148
|
/**
|
|
1116
1149
|
* Spend the session's node-armed wakes that belong to an attempt in `attempts` and satisfy `spent`.
|
|
1117
1150
|
*
|