@andorra-labs/code 0.1.6 → 0.1.7
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/dist/src/agent-execution.js +404 -25
- package/dist/src/agent-mcp-catalog.d.ts +21 -0
- package/dist/src/agent-mcp-catalog.js +40 -0
- package/dist/src/agent-mcp.d.ts +19 -3
- package/dist/src/agent-mcp.js +18 -44
- package/dist/src/app-server/protocol.d.ts +25 -3
- package/dist/src/app-server/protocol.js +5 -1
- package/dist/src/app-server/workspace.d.ts +8 -1
- package/dist/src/app-server/workspace.js +43 -2
- package/dist/src/app-server.js +88 -3
- package/dist/src/auth/AuthManager.d.ts +33 -1
- package/dist/src/auth/AuthManager.js +138 -10
- package/dist/src/auth/callback-page.d.ts +4 -0
- package/dist/src/auth/callback-page.js +70 -0
- package/dist/src/auth/callback.d.ts +39 -0
- package/dist/src/auth/callback.js +146 -22
- package/dist/src/auth/index.d.ts +10 -6
- package/dist/src/auth/index.js +2 -2
- package/dist/src/auth/store.d.ts +142 -3
- package/dist/src/auth/store.js +334 -13
- package/dist/src/auth/types.d.ts +17 -1
- package/dist/src/auth-commands.d.ts +11 -2
- package/dist/src/auth-commands.js +14 -7
- package/dist/src/automation-tool.js +10 -2
- package/dist/src/automations.d.ts +5 -0
- package/dist/src/automations.js +10 -0
- package/dist/src/capabilities.d.ts +9 -3
- package/dist/src/capabilities.js +7 -3
- package/dist/src/cli.js +31 -4
- package/dist/src/codex-provider.js +12 -0
- package/dist/src/coding-tools.d.ts +5 -0
- package/dist/src/coding-tools.js +54 -48
- package/dist/src/commands.d.ts +5 -1
- package/dist/src/commands.js +7 -6
- package/dist/src/completion.js +46 -0
- package/dist/src/config.d.ts +48 -0
- package/dist/src/config.js +248 -10
- package/dist/src/context-budget.d.ts +7 -0
- package/dist/src/context-budget.js +18 -1
- package/dist/src/decision/FactContinuations.d.ts +41 -6
- package/dist/src/decision/FactContinuations.js +211 -64
- package/dist/src/decision/PreparedSteps.js +3 -1
- package/dist/src/decision/checks.d.ts +25 -0
- package/dist/src/decision/checks.js +77 -6
- package/dist/src/delegation-changes.d.ts +109 -0
- package/dist/src/delegation-changes.js +431 -0
- package/dist/src/graph-server.d.ts +1 -0
- package/dist/src/graph-server.js +15 -3
- package/dist/src/graph-sync.d.ts +15 -0
- package/dist/src/graph-sync.js +50 -1
- package/dist/src/graph-tool.d.ts +52 -0
- package/dist/src/graph-tool.js +136 -0
- package/dist/src/graph-ui/app.js +212 -43
- package/dist/src/graph-ui/controls.js +6 -0
- package/dist/src/graph-ui/drafts.js +39 -0
- package/dist/src/graph-ui/embed.js +1 -1
- package/dist/src/graph-ui/index.html +2 -2
- package/dist/src/graph-ui/studio.css +7 -5
- package/dist/src/graph-ui/style.css +46 -12
- package/dist/src/graphs.d.ts +15 -2
- package/dist/src/graphs.js +42 -13
- package/dist/src/hardened-runtime.d.ts +4 -4
- package/dist/src/hardened-runtime.js +109 -9
- package/dist/src/powershell-pool.d.ts +9 -0
- package/dist/src/powershell-pool.js +16 -0
- package/dist/src/provider-keys.d.ts +48 -0
- package/dist/src/provider-keys.js +121 -0
- package/dist/src/pull-requests.d.ts +14 -5
- package/dist/src/pull-requests.js +28 -10
- package/dist/src/qa/runtime/ProcessManager.d.ts +6 -0
- package/dist/src/qa/runtime/ProcessManager.js +16 -0
- package/dist/src/react-runtime.js +30 -2
- package/dist/src/read-image.d.ts +30 -0
- package/dist/src/read-image.js +97 -0
- package/dist/src/secret-redaction.d.ts +13 -0
- package/dist/src/secret-redaction.js +71 -0
- package/dist/src/session-summary.d.ts +10 -4
- package/dist/src/session-summary.js +14 -7
- package/dist/src/sessions.js +4 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +14 -11
- package/dist/src/skills/bundled/provenance.json +1 -1
- package/dist/src/telemetry/schema.d.ts +1 -1
- package/dist/src/telemetry/schema.js +1 -1
- package/dist/src/terminal-ui.d.ts +9 -0
- package/dist/src/terminal-ui.js +14 -0
- package/dist/src/tool-dependencies.js +4 -0
- package/dist/src/tools.d.ts +9 -0
- package/dist/src/tools.js +116 -11
- package/dist/src/transcript.js +5 -0
- package/dist/src/types.d.ts +13 -0
- package/dist/src/web-search.d.ts +59 -0
- package/dist/src/web-search.js +216 -0
- package/docs/agents/README.md +2 -2
- package/docs/agents/mcp-server.md +15 -2
- package/docs/concepts/README.md +1 -1
- package/docs/concepts/security.md +2 -2
- package/docs/getting-started/accounts.md +15 -4
- package/docs/getting-started/configure-providers.md +1 -1
- package/docs/guides/README.md +1 -0
- package/docs/guides/desktop-app.md +1 -1
- package/docs/guides/graph-builder.md +1 -1
- package/docs/guides/web-search.md +47 -0
- package/docs/reference/cli.md +4 -3
- package/docs/reference/config.md +3 -3
- package/docs/reference/slash-commands.md +2 -1
- package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +295 -0
- package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +291 -0
- package/package.json +1 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { checkSearxngUrl, loadConfig, WEB_SEARCH_KEY_FIELDS, WEB_SEARCH_PROVIDERS } from './config.js';
|
|
2
|
+
/**
|
|
3
|
+
* The native web_search tool and the search services behind it.
|
|
4
|
+
*
|
|
5
|
+
* Each service is one HTTPS request: the API key goes only in that request's header or body, never
|
|
6
|
+
* in an error message or the tool's output. SearXNG is the one keyless backend; it takes the address
|
|
7
|
+
* of an instance the user runs or trusts, and that instance must have the JSON output format enabled.
|
|
8
|
+
*/
|
|
9
|
+
export const WEB_SEARCH_TOOL = 'web_search';
|
|
10
|
+
export const WEB_SEARCH_LABELS = {
|
|
11
|
+
brave: 'Brave Search', tavily: 'Tavily', exa: 'Exa', serper: 'Serper', google: 'Google Programmable Search', searxng: 'SearXNG',
|
|
12
|
+
};
|
|
13
|
+
/** Environment fallbacks, used when the configuration holds no value for that field. */
|
|
14
|
+
export const WEB_SEARCH_ENV = {
|
|
15
|
+
brave: 'BRAVE_API_KEY', tavily: 'TAVILY_API_KEY', exa: 'EXA_API_KEY', serper: 'SERPER_API_KEY',
|
|
16
|
+
google: 'GOOGLE_SEARCH_API_KEY', googleSearchEngineId: 'GOOGLE_SEARCH_ENGINE_ID', searxng: 'SEARXNG_URL',
|
|
17
|
+
};
|
|
18
|
+
const REQUEST_TIMEOUT_MS = 20_000;
|
|
19
|
+
const MAX_QUERY_LENGTH = 400;
|
|
20
|
+
const MAX_RESULTS = 10;
|
|
21
|
+
const DEFAULT_RESULTS = 5;
|
|
22
|
+
const SNIPPET_CHARS = 300;
|
|
23
|
+
const envValue = (env, name) => env[name]?.trim() || undefined;
|
|
24
|
+
/** The provider's credentials when it has everything it needs, otherwise undefined. */
|
|
25
|
+
export function resolveWebSearchProvider(id, config, env = process.env) {
|
|
26
|
+
const saved = config?.webSearch;
|
|
27
|
+
if (id === 'searxng') {
|
|
28
|
+
if (saved?.searxngUrl)
|
|
29
|
+
return { id, source: 'config', url: saved.searxngUrl };
|
|
30
|
+
const fromEnv = envValue(env, WEB_SEARCH_ENV.searxng);
|
|
31
|
+
if (!fromEnv)
|
|
32
|
+
return undefined;
|
|
33
|
+
const checked = checkSearxngUrl(fromEnv);
|
|
34
|
+
return 'url' in checked ? { id, source: 'env', url: checked.url } : undefined;
|
|
35
|
+
}
|
|
36
|
+
const savedKey = saved?.[WEB_SEARCH_KEY_FIELDS[id]];
|
|
37
|
+
const key = savedKey || envValue(env, WEB_SEARCH_ENV[id]);
|
|
38
|
+
if (!key)
|
|
39
|
+
return undefined;
|
|
40
|
+
const source = savedKey ? 'config' : 'env';
|
|
41
|
+
if (id !== 'google')
|
|
42
|
+
return { id, source, key };
|
|
43
|
+
const engineId = saved?.googleSearchEngineId || envValue(env, WEB_SEARCH_ENV.googleSearchEngineId);
|
|
44
|
+
return engineId ? { id, source, key, engineId } : undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The backend a search uses: the default provider when one is chosen, otherwise the first configured
|
|
48
|
+
* one. A chosen default that is not configured is an error rather than a silent switch, so the user
|
|
49
|
+
* learns their choice is not in effect.
|
|
50
|
+
*/
|
|
51
|
+
export function chooseWebSearchProvider(config, env = process.env) {
|
|
52
|
+
const chosen = config?.webSearch?.defaultProvider;
|
|
53
|
+
if (chosen) {
|
|
54
|
+
const provider = resolveWebSearchProvider(chosen, config, env);
|
|
55
|
+
if (provider)
|
|
56
|
+
return provider;
|
|
57
|
+
const missing = chosen === 'searxng' ? `an instance URL (or ${WEB_SEARCH_ENV.searxng})`
|
|
58
|
+
: chosen === 'google' ? `an API key and a search engine ID (or ${WEB_SEARCH_ENV.google} and ${WEB_SEARCH_ENV.googleSearchEngineId})`
|
|
59
|
+
: `an API key (or ${WEB_SEARCH_ENV[chosen]})`;
|
|
60
|
+
throw new Error(`The default web search provider, ${WEB_SEARCH_LABELS[chosen]}, needs ${missing}. Add it in Settings → Web Search, or choose another default.`);
|
|
61
|
+
}
|
|
62
|
+
for (const id of WEB_SEARCH_PROVIDERS) {
|
|
63
|
+
const provider = resolveWebSearchProvider(id, config, env);
|
|
64
|
+
if (provider)
|
|
65
|
+
return provider;
|
|
66
|
+
}
|
|
67
|
+
throw new Error('Web search is not configured. Add a search API key or a SearXNG URL in Settings → Web Search, then retry.');
|
|
68
|
+
}
|
|
69
|
+
/** Text a model can read: tags removed, the common entities decoded, whitespace collapsed, clipped. */
|
|
70
|
+
export function plainSnippet(value, limit = SNIPPET_CHARS) {
|
|
71
|
+
if (typeof value !== 'string')
|
|
72
|
+
return '';
|
|
73
|
+
const text = value.replace(/<[^>]*>/g, '')
|
|
74
|
+
.replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/g, (_, name) => ({ amp: '&', lt: '<', gt: '>', quot: '"', '#39': "'", apos: "'", nbsp: ' ' })[name] ?? '')
|
|
75
|
+
.replace(/\s+/g, ' ').trim();
|
|
76
|
+
return text.length > limit ? `${text.slice(0, limit - 1)}…` : text;
|
|
77
|
+
}
|
|
78
|
+
function results(items, map, count) {
|
|
79
|
+
if (!Array.isArray(items))
|
|
80
|
+
return [];
|
|
81
|
+
const found = [];
|
|
82
|
+
for (const item of items) {
|
|
83
|
+
if (!item || typeof item !== 'object')
|
|
84
|
+
continue;
|
|
85
|
+
const mapped = map(item);
|
|
86
|
+
if (typeof mapped.url !== 'string' || !/^https?:\/\//i.test(mapped.url))
|
|
87
|
+
continue;
|
|
88
|
+
found.push({ title: plainSnippet(mapped.title, 200) || mapped.url, url: mapped.url, snippet: plainSnippet(mapped.snippet) });
|
|
89
|
+
if (found.length >= count)
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
return found;
|
|
93
|
+
}
|
|
94
|
+
/** A service may echo the request back; the key never reaches a message. */
|
|
95
|
+
const redact = (text, secret) => secret ? text.split(secret).join('[key]') : text;
|
|
96
|
+
/** Send one request and parse its JSON, with errors that name the service and status but never the key. */
|
|
97
|
+
async function requestJson(label, url, init, request, hint) {
|
|
98
|
+
let response;
|
|
99
|
+
try {
|
|
100
|
+
response = await request.fetch(url, { ...init, signal: request.signal });
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
request.signal.throwIfAborted();
|
|
104
|
+
throw new Error(redact(`${label} request failed: ${error instanceof Error ? error.message : String(error)}`, request.secret).slice(0, 500));
|
|
105
|
+
}
|
|
106
|
+
const raw = await response.text();
|
|
107
|
+
if (!response.ok) {
|
|
108
|
+
const advice = hint?.(response.status) ?? (response.status === 401 || response.status === 403 ? 'Check the API key in Settings → Web Search.'
|
|
109
|
+
: response.status === 429 ? 'The service is rate limiting this key or its quota is used up; wait or switch the default provider.' : '');
|
|
110
|
+
const detail = plainSnippet(redact(raw, request.secret), 200);
|
|
111
|
+
throw new Error(`${label} answered HTTP ${response.status}${detail ? `: ${detail}` : ''}${advice ? ` ${advice}` : ''}`);
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const data = JSON.parse(raw);
|
|
115
|
+
if (data && typeof data === 'object' && !Array.isArray(data))
|
|
116
|
+
return data;
|
|
117
|
+
}
|
|
118
|
+
catch { /* reported below */ }
|
|
119
|
+
throw new Error(`${label} answered HTTP ${response.status} without a JSON object`);
|
|
120
|
+
}
|
|
121
|
+
const json = { 'content-type': 'application/json', accept: 'application/json' };
|
|
122
|
+
/** One function per service: build its request, then map its result list onto title, url and snippet. */
|
|
123
|
+
const BACKENDS = {
|
|
124
|
+
async brave(provider, request) {
|
|
125
|
+
const url = new URL('https://api.search.brave.com/res/v1/web/search');
|
|
126
|
+
url.searchParams.set('q', request.query);
|
|
127
|
+
url.searchParams.set('count', String(request.count));
|
|
128
|
+
const data = await requestJson('Brave Search', url.href, { headers: { accept: 'application/json', 'x-subscription-token': provider.key } }, request);
|
|
129
|
+
const web = data.web;
|
|
130
|
+
return results(web?.results, item => ({ title: item.title, url: item.url, snippet: item.description }), request.count);
|
|
131
|
+
},
|
|
132
|
+
async tavily(provider, request) {
|
|
133
|
+
const data = await requestJson('Tavily', 'https://api.tavily.com/search', {
|
|
134
|
+
method: 'POST', headers: { ...json, authorization: `Bearer ${provider.key}` },
|
|
135
|
+
body: JSON.stringify({ query: request.query, max_results: request.count, search_depth: 'basic' }),
|
|
136
|
+
}, request);
|
|
137
|
+
return results(data.results, item => ({ title: item.title, url: item.url, snippet: item.content }), request.count);
|
|
138
|
+
},
|
|
139
|
+
async exa(provider, request) {
|
|
140
|
+
const data = await requestJson('Exa', 'https://api.exa.ai/search', {
|
|
141
|
+
method: 'POST', headers: { ...json, 'x-api-key': provider.key },
|
|
142
|
+
body: JSON.stringify({ query: request.query, numResults: request.count, contents: { text: { maxCharacters: SNIPPET_CHARS * 2 } } }),
|
|
143
|
+
}, request);
|
|
144
|
+
return results(data.results, item => ({ title: item.title, url: item.url, snippet: item.text ?? item.summary }), request.count);
|
|
145
|
+
},
|
|
146
|
+
async serper(provider, request) {
|
|
147
|
+
const data = await requestJson('Serper', 'https://google.serper.dev/search', {
|
|
148
|
+
method: 'POST', headers: { ...json, 'x-api-key': provider.key },
|
|
149
|
+
body: JSON.stringify({ q: request.query, num: request.count }),
|
|
150
|
+
}, request);
|
|
151
|
+
return results(data.organic, item => ({ title: item.title, url: item.link, snippet: item.snippet }), request.count);
|
|
152
|
+
},
|
|
153
|
+
async google(provider, request) {
|
|
154
|
+
const url = new URL('https://www.googleapis.com/customsearch/v1');
|
|
155
|
+
url.searchParams.set('key', provider.key);
|
|
156
|
+
url.searchParams.set('cx', provider.engineId);
|
|
157
|
+
url.searchParams.set('q', request.query);
|
|
158
|
+
url.searchParams.set('num', String(request.count));
|
|
159
|
+
const data = await requestJson('Google Programmable Search', url.href, { headers: { accept: 'application/json' } }, request, status => status === 400 || status === 403 ? 'Check the API key and search engine ID in Settings → Web Search, and that the Custom Search API is enabled for the key\'s project.' : undefined);
|
|
160
|
+
return results(data.items, item => ({ title: item.title, url: item.link, snippet: item.snippet }), request.count);
|
|
161
|
+
},
|
|
162
|
+
async searxng(provider, request) {
|
|
163
|
+
const url = new URL(`${provider.url}/search`);
|
|
164
|
+
url.searchParams.set('q', request.query);
|
|
165
|
+
url.searchParams.set('format', 'json');
|
|
166
|
+
const data = await requestJson('SearXNG', url.href, { headers: { accept: 'application/json' } }, request, status => status === 403 ? 'The instance refuses JSON output: add "json" to search.formats in its settings.yml.' : undefined);
|
|
167
|
+
return results(data.results, item => ({ title: item.title, url: item.url, snippet: item.content }), request.count);
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
/** Run one search with the chosen backend. */
|
|
171
|
+
export async function webSearch(query, count, signal, dependencies = {}) {
|
|
172
|
+
const config = await (dependencies.loadConfig ?? (() => loadConfig().catch(() => undefined)))();
|
|
173
|
+
signal.throwIfAborted();
|
|
174
|
+
const provider = chooseWebSearchProvider(config, dependencies.env ?? process.env);
|
|
175
|
+
const bounded = AbortSignal.any([signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)]);
|
|
176
|
+
try {
|
|
177
|
+
return { provider, results: await BACKENDS[provider.id](provider, { query, count, signal: bounded, fetch: dependencies.fetch ?? fetch, secret: provider.key }) };
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
signal.throwIfAborted();
|
|
181
|
+
if (bounded.aborted)
|
|
182
|
+
throw new Error(`${WEB_SEARCH_LABELS[provider.id]} did not answer within ${REQUEST_TIMEOUT_MS / 1000} seconds`);
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/** The tool's text: a numbered list a model reads and the desktop scans for the sites it found. */
|
|
187
|
+
export function formatWebSearchResults(query, label, found) {
|
|
188
|
+
if (!found.length)
|
|
189
|
+
return `${label} found no results for "${query}".`;
|
|
190
|
+
return [`${label} results for "${query}":`, '', ...found.map((result, index) => [`${index + 1}. ${result.title}`, ` ${result.url}`, ...(result.snippet ? [` ${result.snippet}`] : [])].join('\n'))].join('\n');
|
|
191
|
+
}
|
|
192
|
+
export function createWebSearchTool(dependencies = {}) {
|
|
193
|
+
return {
|
|
194
|
+
name: WEB_SEARCH_TOOL, family: 'web', capability: 'browser', executionMode: 'parallel',
|
|
195
|
+
description: 'Search the web and get a list of results: title, URL and a short snippet for each. Use it for current information, documentation, release notes, error messages and anything outside the workspace; open a result with a browser tool when the snippet is not enough. The search service is the one chosen in Settings → Web Search (Brave, Tavily, Exa, Serper, Google Programmable Search or a SearXNG instance).',
|
|
196
|
+
parameters: { type: 'object', properties: {
|
|
197
|
+
query: { type: 'string', description: 'What to search for, as you would type it into a search engine' },
|
|
198
|
+
count: { type: 'integer', minimum: 1, maximum: MAX_RESULTS, description: `How many results to return; default ${DEFAULT_RESULTS}` },
|
|
199
|
+
}, required: ['query'], additionalProperties: false },
|
|
200
|
+
execute: async (args, context) => {
|
|
201
|
+
if (Object.keys(args).some(key => key !== 'query' && key !== 'count'))
|
|
202
|
+
throw new Error(`Invalid argument; ${WEB_SEARCH_TOOL} accepts query and count`);
|
|
203
|
+
const query = typeof args.query === 'string' ? args.query.replace(/\s+/g, ' ').trim() : '';
|
|
204
|
+
if (!query)
|
|
205
|
+
throw new Error('query must be nonempty text');
|
|
206
|
+
if (query.length > MAX_QUERY_LENGTH)
|
|
207
|
+
throw new Error(`query must be at most ${MAX_QUERY_LENGTH} characters`);
|
|
208
|
+
const count = args.count === undefined ? DEFAULT_RESULTS : args.count;
|
|
209
|
+
if (!Number.isInteger(count) || count < 1 || count > MAX_RESULTS)
|
|
210
|
+
throw new Error(`count must be a whole number from 1 to ${MAX_RESULTS}`);
|
|
211
|
+
context.signal.throwIfAborted();
|
|
212
|
+
const { provider, results: found } = await webSearch(query, count, context.signal, dependencies);
|
|
213
|
+
return formatWebSearchResults(query, WEB_SEARCH_LABELS[provider.id], found);
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
}
|
package/docs/agents/README.md
CHANGED
|
@@ -40,13 +40,13 @@ andorra mcp-server --stdio
|
|
|
40
40
|
- **CLI surface** — [Reference: CLI](../reference/cli.md) lists every subcommand and flag; [Reference: slash commands](../reference/slash-commands.md) covers the in-TUI commands.
|
|
41
41
|
- **Headless automation** — `andorra --prompt "..." --json --no-tui` runs one task and prints a machine-readable result object with status, run ID, usage, and tool count. Exit codes: `0` success, `1` failure/exhaustion, `130` cancellation. See [Headless mode](../guides/headless.md).
|
|
42
42
|
- **Workspace instructions** — Andorra reads project-root `ANDORRA.md`, falling back to `AGENTS.md`, then lowercase `agents.md`, only when the preferred file is absent. If you are preparing a repository for Andorra, put workspace instructions in `ANDORRA.md`. See [Workspace instructions](../concepts/workspace-instructions.md).
|
|
43
|
-
- **Driving Andorra over MCP** — The same local stdio MCP server (`andorra mcp-server --stdio`) is how an agent authors and inspects graphs and reports on sessions
|
|
43
|
+
- **Driving Andorra over MCP** — The same local stdio MCP server (`andorra mcp-server --stdio`) is how an agent outside Andorra authors and inspects graphs and reports on sessions. An agent inside one of Andorra's own nodes uses the built-in `graphs` tool, which offers the same graph operations without a server. See [Agent MCP server](mcp-server.md).
|
|
44
44
|
|
|
45
45
|
### Choosing a surface
|
|
46
46
|
|
|
47
47
|
| The task | Use |
|
|
48
48
|
| --- | --- |
|
|
49
|
-
| Create or edit a graph | MCP server (`andorra_graph_*` tools) |
|
|
49
|
+
| Create or edit a graph | MCP server (`andorra_graph_*` tools); inside Andorra, the built-in `graphs` tool |
|
|
50
50
|
| Run one task and read a machine-readable result | `andorra --prompt "..." --json` |
|
|
51
51
|
| Watch sessions, find a run that needs input | MCP session tools |
|
|
52
52
|
| Edit a graph by hand, or show one to a person | Graph Builder (`andorra graph`) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## How it works
|
|
4
4
|
|
|
5
|
-
Andorra Code ships a **local stdio MCP server** for agents that author and inspect graphs
|
|
5
|
+
Andorra Code ships a **local stdio MCP server** for agents that author and inspect graphs from outside Andorra, such as Claude Code, Codex, Hermes and OpenClaw. **This is the supported surface for an outside agent to create or edit a graph.** Agents running inside one of Andorra's own graph nodes do not need it: the engine gives them the same graph operations as its built-in `graphs` tool (see [Inside Andorra](#inside-andorra-the-built-in-graphs-tool)). The [Graph Builder](../guides/graph-builder.md) is the same authoring capability for people, and both write to the same graph store; an agent should not drive that browser UI to author a graph. The server does **not** execute an arbitrary authored graph, and it opens no network listener. It
|
|
6
6
|
does run one fixed graph — the bundled Software Engineer harness — for hosts that want Andorra as
|
|
7
7
|
a subagent (see [Subagent mode](subagent-mode.md)). That fixed harness is the only execution the
|
|
8
8
|
server does: no surface of it selects a graph, and the run it does make permits writes by
|
|
@@ -17,7 +17,7 @@ the workspace it names.
|
|
|
17
17
|
|
|
18
18
|
### Installation and MCP clients
|
|
19
19
|
|
|
20
|
-
Build/install Andorra Code, sign into your paid account to edit graphs, and configure providers from Andorra's /providers screen.
|
|
20
|
+
Build/install Andorra Code, sign into your paid account to edit graphs, and configure providers from Andorra's /providers screen. Then connect the server from the agent host:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm install
|
|
@@ -57,6 +57,19 @@ A provider/model is mandatory. Without one the start is refused with `PROVIDER_N
|
|
|
57
57
|
error carries every configured provider with its models, so the calling agent can show the list to
|
|
58
58
|
its user and retry with the choice. The full contract is in [Subagent mode](subagent-mode.md).
|
|
59
59
|
|
|
60
|
+
## Inside Andorra: the built-in `graphs` tool
|
|
61
|
+
|
|
62
|
+
An agent running in an Andorra graph node gets every graph operation below as one built-in tool, `graphs`, with no server to configure and no `andorra` command needed on PATH. It calls `graphs` with `action` set to the operation's name and the operation's arguments in `args`:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{ "action": "andorra_graph_begin", "args": { "mode": "create", "id": "qa-flow", "name": "QA Flow" } }
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- The tool runs the same backend as this server, in the engine's own process. It is loaded the first time a graph action runs, shared by every task in that process, and closed after an hour without graph actions; tasks that never touch graphs pay nothing beyond its one schema.
|
|
69
|
+
- Like other external tools it needs a node with shell permission and is not given to delegated subagents.
|
|
70
|
+
- `andorra_graph_publish`, `andorra_graph_delete` and `andorra_graph_restore` ask for permission like an automation change, and are refused in plan mode. Drafts and reads do not ask.
|
|
71
|
+
- The session, project and subagent tools stay MCP-only.
|
|
72
|
+
|
|
60
73
|
## MCP graph tools
|
|
61
74
|
|
|
62
75
|
| Tool | Purpose |
|
package/docs/concepts/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Saved graphs are immutable revisions. A published revision is never rewritten: a
|
|
|
40
40
|
|
|
41
41
|
## How a task actually runs
|
|
42
42
|
|
|
43
|
-
- **Tools.** Provider-visible coding tools are `Read`, `Write`, `Edit`, `Glob`, `Grep`, `Bash`, and `PowerShell`. CodeGraph/`repo_explore` is attempted before `Grep` for source-discovery tasks; native text search is the fallback. Shell handles Git, package managers, and tests.
|
|
43
|
+
- **Tools.** Provider-visible coding tools are `Read`, `Write`, `Edit`, `Glob`, `Grep`, `Bash`, and `PowerShell`. CodeGraph/`repo_explore` is attempted before `Grep` for source-discovery tasks; native text search is the fallback. Shell handles Git, package managers, and tests. `Read` shows an image file (PNG, JPEG, GIF, WebP, BMP) to the model as a picture, downscaled to 1568 px on its longest edge; when the model endpoint refuses image input, the run drops the images, says so in the transcript and continues on text.
|
|
44
44
|
- **Approvals.** Writes and shell calls ask for approval unless YOLO is enabled for the session. See [Security and permissions](security.md).
|
|
45
45
|
- **Context.** Reads, searches, and output are bounded; stale discovery output shrinks deterministically; older exchanges compact semantically under context pressure. Every ReAct iteration resends the whole conversation, so cumulative token totals measure repeated context, not one giant prompt.
|
|
46
46
|
- **Memory.** Optional persistent project memory (Graphiti) survives across runs; CodeGraph indexes current code structure. See [Memory](memory.md).
|
|
@@ -24,8 +24,8 @@ A mode changed while a task runs applies to that task from its next decision on.
|
|
|
24
24
|
|
|
25
25
|
## Secrets
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
- Andorra account tokens live in the operating system credential store
|
|
27
|
+
- Saved provider API keys live in the operating system credential store (service `Andorra Code provider keys`, one entry per provider in each Andorra home); `config.json` records only `"providerKeys": "keyring"` in their place. A `config.json` from an older version that still holds keys has them moved on the next load. Where Linux or another Unix system has no credential store, or `ANDORRA_CREDENTIAL_STORE=file` is set, keys stay in the owner-only `config.json` as before; on macOS and Windows a locked or failing store is an error rather than a reason to write them there. Keys can also be referenced by environment-variable name. They are never added to command history or displayed in provider summaries.
|
|
28
|
+
- Andorra account tokens live in the operating system credential store. On macOS and Windows a missing or locked credential store is an error and there is no fallback. On Linux and other Unix machines with no credential store at all (a VPS, a container: no Secret Service or no D-Bus session), tokens go to an owner-only file (0600) in the Andorra home instead; a locked or failing store is an error, never a reason to write the file, and login says so; `ANDORRA_CREDENTIAL_STORE=keyring` forbids that file.
|
|
29
29
|
- Codex provider sign-in is delegated to the official Codex CLI app-server; subscription tokens are never copied into Andorra configuration.
|
|
30
30
|
- Do not put credentials in handoff data, graph JSON, `--run-input`/`--run-state` files, or workspace instruction files.
|
|
31
31
|
|
|
@@ -6,17 +6,28 @@ Andorra runs the agent loop and tools on your machine. Your configured LLM provi
|
|
|
6
6
|
|
|
7
7
|
Passwords require at least 8 characters, including uppercase, lowercase, a number, and a symbol. MFA is disabled. Email verification is still required for new accounts.
|
|
8
8
|
|
|
9
|
-
Run `andorra login` before starting the harness, or enter `/login` in an interactive session. Your browser opens the Andorra sign-in page; choose **Sign up** to create an account and verify your email. After successful login the browser returns to a loopback callback on your machine. You can close that browser tab.
|
|
9
|
+
Run `andorra login` before starting the harness, or enter `/login` in an interactive session. On a remote machine, see [Sign in on a remote machine or VPS](#sign-in-on-a-remote-machine-or-vps). Your browser opens the Andorra sign-in page; choose **Sign up** to create an account and verify your email. After successful login the browser returns to a loopback callback on your machine. You can close that browser tab.
|
|
10
10
|
|
|
11
11
|
After login, the account label shows `Signed in | Free | your@email.com` (or `Legacy`, or `Paid`) using your verified email address. The same identity appears in the welcome screen, the persistent account label, and the output of the account commands. If the service cannot supply an email, the label still shows the verified membership status. Logout removes the email from the displayed account status.
|
|
12
12
|
|
|
13
|
-
Run `andorra auth status` or `/auth status` to inspect your saved session. Run `andorra logout`, `/logout` or `/auth logout` to remove it from this machine and revoke its refresh token. These standalone commands do not require an LLM provider, and none of them signs out of an LLM provider; `/logout codex` does that for Codex.
|
|
13
|
+
Run `andorra auth status` or `/auth status` to inspect your saved session. Run `andorra logout`, `/logout` or `/auth logout` to remove it from this machine and revoke its refresh token; nothing of it is left in the credential store. Each Andorra home (`ANDORRACODE_HOME`) signs in separately, and a plain logout only knows its own; `andorra logout --all` (or `/logout --all`) also deletes every other Andorra sign-in the OS credential store holds on this machine. These standalone commands do not require an LLM provider, and none of them signs out of an LLM provider; `/logout codex` does that for Codex.
|
|
14
14
|
|
|
15
15
|
To switch accounts, run `/logout`, then `/login`. Sign-in always asks for credentials, even when the browser still has a session for the previous account, so you can enter another account's email or create a new one.
|
|
16
16
|
|
|
17
|
-
The harness stores tokens in the operating system credential store, not in `config.json`. It renews access tokens automatically. Sessions have no application idle timeout. Expiration, administrative revocation, disabled accounts, or credential-store removal require signing in again. Other machines have separate sessions.
|
|
17
|
+
The harness stores tokens in the operating system credential store, not in `config.json`. It renews access tokens automatically. Sessions have no application idle timeout. Expiration, administrative revocation, disabled accounts, or credential-store removal require signing in again. Other machines have separate sessions.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
On macOS and Windows a missing or locked credential store is an error, and the harness never writes a token file. On Linux and other Unix machines with no credential store at all (no Secret Service, or no D-Bus session), which is what a VPS or container usually is, the session is saved instead to `credentials-<id>.json` in the Andorra home (`~/.andorracode`, or `ANDORRACODE_HOME`), created readable only by your user (mode 0600, in a 0700 directory). `andorra login` names the file when it does this. A credential store that exists but is locked or failing is still an error, because it may hold your session: unlock it, or set `ANDORRA_CREDENTIAL_STORE=file`. Once that file exists it stays the store for that home; `andorra logout` overwrites it with a token-free record, and also revokes and clears a session left in the other store (the keyring, or a file from an earlier fallback), so switching `ANDORRA_CREDENTIAL_STORE` never brings an old login back. Set `ANDORRA_CREDENTIAL_STORE=file` to use the file even where a credential store works, or `ANDORRA_CREDENTIAL_STORE=keyring` to forbid the file and get the old error instead.
|
|
20
|
+
|
|
21
|
+
Login needs an available local callback port 43187 and HTTPS access to the hosted account service.
|
|
22
|
+
|
|
23
|
+
## Sign in on a remote machine or VPS
|
|
24
|
+
|
|
25
|
+
Over SSH, or on a Unix machine without a graphical display, `andorra login` does not try to open a browser. It prints the sign-in address so you can open it in a browser on any device, such as your laptop. Pass `--no-browser` (`andorra login --no-browser`, or `/login --no-browser`) to get the same behavior anywhere. Either of these finishes the sign-in:
|
|
26
|
+
|
|
27
|
+
- **Paste the address back.** After you sign in, the browser goes to `http://localhost:43187/callback?code=…`. That page will not load on your laptop, which is expected. Copy the whole address from the address bar and paste it at the prompt in the remote terminal. Only an address carrying this login's own state is accepted.
|
|
28
|
+
- **Forward the port.** Connect with `ssh -L 43187:localhost:43187 <host>` before running `andorra login`. The browser's redirect then reaches the remote listener through the tunnel, and the sign-in completes on its own.
|
|
29
|
+
|
|
30
|
+
A login waiting on another device times out after 10 minutes (2 minutes when a browser opened locally). Press Ctrl+C to cancel it.
|
|
20
31
|
|
|
21
32
|
## Plans
|
|
22
33
|
|
|
@@ -10,7 +10,7 @@ Use **Add provider** to configure your first provider or add another. Select a p
|
|
|
10
10
|
|
|
11
11
|
## Credentials
|
|
12
12
|
|
|
13
|
-
For hosted APIs, choose **API key** and paste the **actual API key** into the masked field. The key is saved locally with the provider and reused after restarting Andorra. It is not added to command history or displayed in provider summaries. Configuration is stored in `config.json` under `ANDORRACODE_HOME` (default `~/.andorracode`); saved API keys are
|
|
13
|
+
For hosted APIs, choose **API key** and paste the **actual API key** into the masked field. The key is saved locally with the provider and reused after restarting Andorra. It is not added to command history or displayed in provider summaries. Configuration is stored in `config.json` under `ANDORRACODE_HOME` (default `~/.andorracode`); saved API keys are kept in the operating system credential store, not in that file. On Linux without a credential store (or with `ANDORRA_CREDENTIAL_STORE=file`) they stay in the owner-only `config.json`, so keep it private and do not commit or share it. The separate **Environment fallback** field accepts a variable name. A saved key takes precedence; **Remove authentication** clears both.
|
|
14
14
|
|
|
15
15
|
Preset endpoints: DeepSeek uses `https://api.deepseek.com`; Kimi uses `https://api.moonshot.ai/v1`; Kimi For Coding (Global) uses `https://api.kimi.ai/coding/v1` and Kimi For Coding (China) uses `https://api.kimi.com/coding/v1`; GLM Coding Plan (Z.ai) uses `https://api.z.ai/api/coding/paas/v4`. The coding-plan presets come pre-filled with the plan's default model (`kimi-for-coding`, `glm-5.3`) and take the API key from that plan's console — the Kimi Code Console or the Z.ai coding-plan page — not the standard platform key. Codex uses the installed Codex CLI's managed ChatGPT sign-in; subscription tokens are not copied into provider configuration.
|
|
16
16
|
|
package/docs/guides/README.md
CHANGED
|
@@ -7,6 +7,7 @@ Task-oriented how-tos for every client and mode.
|
|
|
7
7
|
- [Headless mode](headless.md) — one-shot runs with `--prompt`, `--json`, exit codes, and `needs_clarification`.
|
|
8
8
|
- [Extensions](extensions.md) — skills, MCP servers, and plugins.
|
|
9
9
|
- [Browser workspace](browser.md) — the `/browser` local web client.
|
|
10
|
+
- [Web search](web-search.md) — the `web_search` tool and its search services.
|
|
10
11
|
- [Desktop client](desktop-app.md) — the Tauri desktop application.
|
|
11
12
|
- [Windows code signing](windows-code-signing.md) — Authenticode signing of the desktop bundles with Azure Artifact Signing, and how to verify a signature.
|
|
12
13
|
- [Update](update.md) — keeping the npm installation current with `andorra update`.
|
|
@@ -300,7 +300,7 @@ missing is dropped whole rather than printed as a zero. Sources:
|
|
|
300
300
|
| Turns, steps | Assistant turns in the session record; iteration events for the run in flight. |
|
|
301
301
|
| LLM time | Measured between an iteration starting and its model completion arriving. |
|
|
302
302
|
| Tool time | Summed from each tool completion's own `durationMs`. |
|
|
303
|
-
| Cache hit | Cache-read over prompt tokens, never rounded up to 100% while a miss exists; omitted entirely when
|
|
303
|
+
| Cache hit | Cache-read over prompt tokens across the session's local-model requests, never rounded up to 100% while a miss exists; omitted entirely when no local request reported cache traffic. The context ring's panel shows this same figure. |
|
|
304
304
|
| Input / output | Session totals; the engine's saved usage is authoritative after each run. |
|
|
305
305
|
|
|
306
306
|
Context occupancy lives on the ring beside the send button, and one fact has one home: the ring
|
|
@@ -92,7 +92,7 @@ Schema versions 1/2 remain executable with their original semantics; opening the
|
|
|
92
92
|
|
|
93
93
|
For paid accounts, the graph builder saves revisions and drafts locally, then automatically synchronizes them to your Andorra account. The sidebar reports cloud status separately from local save success; connection failures retain the local queue and retry every 30 seconds while the builder is open. Open the Graph Builder to refresh cloud graphs on another installation; in the desktop app, opening a task's graph list does the same, so a graph saved on another machine is listed there without opening the builder first.
|
|
94
94
|
|
|
95
|
-
Incomplete graphs are autosaved as drafts after a short pause, even when validation prevents saving an executable revision. Open a draft from the sidebar, or choose **Show draft history** for earlier and conflicting versions. Remote revisions keep their original IDs and history; a conflicting revision is preserved as a separate graph — existing files are never silently overwritten.
|
|
95
|
+
Incomplete graphs are autosaved as drafts after a short pause, even when validation prevents saving an executable revision. A new or duplicated graph is not drafted until you change it. Drafts are listed under **Unsaved drafts** below your saved graphs: the newest one for each graph, and only while it holds work its saved revision does not. Right-click a draft and choose **Clear draft**, or use **Clear** beside the heading, to take drafts off the list; saved graphs and revisions are unaffected. Open a draft from the sidebar, or choose **Show draft history** for earlier and conflicting versions. Remote revisions keep their original IDs and history; a conflicting revision is preserved as a separate graph — existing files are never silently overwritten.
|
|
96
96
|
|
|
97
97
|
The first paid graph refresh assigns existing local graphs to the current account. Later accounts on the same installation use separate graph directories. Cloud storage is private to the verified account. Agent-library definitions and model credentials are not synchronized; configure the required model profiles on each installation. Starting the builder requires an online paid-membership check.
|
|
98
98
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Web search
|
|
2
|
+
|
|
3
|
+
Agents can search the web with the built-in `web_search` tool. It sends one query to a search service you choose and returns up to 10 results: the title, the URL and a short snippet for each. To read a page in full, the agent then opens the result with a browser tool.
|
|
4
|
+
|
|
5
|
+
Andorra does not run a search index of its own, so the tool needs one of these services:
|
|
6
|
+
|
|
7
|
+
| Service | What you enter | Environment fallback |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| [Brave Search](https://brave.com/search/api/) | API key | `BRAVE_API_KEY` |
|
|
10
|
+
| [Tavily](https://tavily.com/) | API key (`tvly-…`) | `TAVILY_API_KEY` |
|
|
11
|
+
| [Exa](https://exa.ai/) | API key | `EXA_API_KEY` |
|
|
12
|
+
| [Serper](https://serper.dev/) (Google results) | API key | `SERPER_API_KEY` |
|
|
13
|
+
| [Google Programmable Search](https://developers.google.com/custom-search/v1/overview) | API key and search engine ID (`cx`) | `GOOGLE_SEARCH_API_KEY`, `GOOGLE_SEARCH_ENGINE_ID` |
|
|
14
|
+
| [SearXNG](https://docs.searxng.org/) | Instance URL, such as `http://localhost:8080` | `SEARXNG_URL` |
|
|
15
|
+
|
|
16
|
+
The keyed services have their own sign-up, free allowance and pricing. SearXNG is free and needs no key, but you have to run an instance yourself, for example with the `searxng/searxng` Docker image. It also has to allow JSON output: add `json` to `search.formats` in its `settings.yml`. Otherwise it answers HTTP 403, and the tool says so.
|
|
17
|
+
|
|
18
|
+
## Configure it
|
|
19
|
+
|
|
20
|
+
In the desktop app, open **Settings → Web Search**:
|
|
21
|
+
|
|
22
|
+
- **Search with** picks the default service. **Automatic** uses the first configured service, in the order of the table above. If you choose a service that is not configured, searches fail with a message saying so. They do not quietly switch to another service.
|
|
23
|
+
- Under **Search services**, paste a key and choose **Save**. A saved key is never shown again. To change it, paste a new one and choose **Replace**; to delete it, choose **Remove**. The Google search engine ID and the SearXNG URL are not secrets, so they stay visible and you can edit them.
|
|
24
|
+
|
|
25
|
+
Each row shows which value is in use: the saved one, or the environment variable when nothing is saved. A saved value always wins over the environment.
|
|
26
|
+
|
|
27
|
+
Without the desktop app, edit `~/.andorracode/config.json` (or `$ANDORRACODE_HOME/config.json`):
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"webSearch": {
|
|
32
|
+
"defaultProvider": "brave",
|
|
33
|
+
"braveApiKey": "<key>",
|
|
34
|
+
"searxngUrl": "http://localhost:8080"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The fields are `defaultProvider` (`brave`, `tavily`, `exa`, `serper`, `google` or `searxng`), `braveApiKey`, `tavilyApiKey`, `exaApiKey`, `serperApiKey`, `googleApiKey`, `googleSearchEngineId` and `searxngUrl`. Keys are kept in the configuration file, like the CapSolver key and provider keys.
|
|
40
|
+
|
|
41
|
+
## Who can use it
|
|
42
|
+
|
|
43
|
+
`web_search` is in the `web` tool family and follows the node's **browser** capability: an agent or subagent role with the browser disabled does not get it. It is read-only, so it needs no approval, and it also works in Plan mode. With Jev on, the tool catalog offers it only to tasks that mention the web, documentation, URLs or looking something up.
|
|
44
|
+
|
|
45
|
+
## Privacy
|
|
46
|
+
|
|
47
|
+
Every query goes to the service you configured, under that service's privacy policy. The key goes only in the request to that service. It never appears in the tool's output, in error messages, or in what the engine reports to the desktop app.
|
package/docs/reference/cli.md
CHANGED
|
@@ -20,8 +20,8 @@ andorra remote serve [--port N] [--insecure-http] [--rotate-cert]
|
|
|
20
20
|
andorra remote workspaces | andorra remote unpair <workspace-id>
|
|
21
21
|
andorra remote rotate-cert
|
|
22
22
|
andorra update [--break-lock]
|
|
23
|
-
andorra login
|
|
24
|
-
andorra logout
|
|
23
|
+
andorra login [--no-browser]
|
|
24
|
+
andorra logout [--all]
|
|
25
25
|
andorra auth status
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -55,8 +55,9 @@ andorra auth status
|
|
|
55
55
|
| `andorra app-server --stdio` | Run the JSON-lines app server that drives the desktop client. Not for humans; see [Desktop client](../guides/desktop-app.md). |
|
|
56
56
|
| `andorra remote <subcommand>` | Remote workspace pairing and sharing — `serve`, `status`, `code`, `devices`, `revoke <device-id>`, `share <path>`, `unshare <share-id>`, `pair <pairing-code>`, `workspaces`, `unpair <workspace-id>`, `rotate-cert`, with the flags shown in the usage above. See [Remote workspace](../guides/desktop-app.md#remote-workspace). |
|
|
57
57
|
| `andorra update [--break-lock]` | Install the latest npm release of `@andorra-labs/code` into the global npm installation; a source checkout is refused. `--break-lock` replaces a leftover updater lock; see [Update](../guides/update.md#an-interrupted-update). |
|
|
58
|
-
| `andorra login` | Open the browser to sign in to (or create) an Andorra account. |
|
|
58
|
+
| `andorra login [--no-browser]` | Open the browser to sign in to (or create) an Andorra account. Over SSH, without a display, or with `--no-browser`, it prints the address to open on another device and accepts the callback address pasted back (or an `ssh -L 43187:localhost:43187` forward). |
|
|
59
59
|
| `andorra logout` | Remove this machine's saved Andorra account session and revoke its refresh token. |
|
|
60
|
+
| `andorra logout --all` | Also delete every other Andorra sign-in saved in this machine's OS credential store (other `ANDORRACODE_HOME`s, other deployments), revoking their refresh tokens where the account service accepts it. Saved provider API keys are not touched. |
|
|
60
61
|
| `andorra auth status` | Show the saved Andorra account session and membership. |
|
|
61
62
|
|
|
62
63
|
## Headless exit codes
|
package/docs/reference/config.md
CHANGED
|
@@ -41,7 +41,7 @@ One exception to the configuration home: **trajectory journals** — the detaile
|
|
|
41
41
|
}
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Provider entries support `id`, `type` (`openai-compatible` \| `anthropic` \| `codex` \| `claude` \| `grok` \| `opencode` \| `opencode-go`), `baseUrl`, `apiKey` (
|
|
44
|
+
Provider entries support `id`, `type` (`openai-compatible` \| `anthropic` \| `codex` \| `claude` \| `grok` \| `opencode` \| `opencode-go`), `baseUrl`, `apiKey` (kept in the OS credential store, with `"providerKeys": "keyring"` in the file; plaintext in the file only without a credential store or with `ANDORRA_CREDENTIAL_STORE=file`), `apiKeyEnv` (a saved key takes precedence), `model`, `models[]`, and `modelContextWindows` (a map from model id to its token limit, used when the endpoint does not report one), plus per-provider HTTP request bounds `requestTimeoutMs` and `streamIdleTimeoutMs`.
|
|
45
45
|
|
|
46
46
|
An `anthropic` provider may set `anthropicAuth: "console"` to authenticate with the Claude Console login that `ant auth login` stored in `<config home>/anthropic-accounts/<provider id>` instead of an API key. Such a provider must use `baseUrl: "https://api.anthropic.com/v1"` and may not carry `apiKey` or `apiKeyEnv`; two signed-in providers may not have ids that differ only by case. See [Configure providers](../getting-started/configure-providers.md#claude-console-sign-in).
|
|
47
47
|
|
|
@@ -80,6 +80,6 @@ On Windows, automatic Codex provider discovery checks `%LOCALAPPDATA%\Programs\O
|
|
|
80
80
|
|
|
81
81
|
## Security notes
|
|
82
82
|
|
|
83
|
-
- Saved API keys are
|
|
83
|
+
- Saved API keys are kept in the operating system credential store, one entry per provider in each Andorra home, and read back when the configuration loads; `config.json` holds `"providerKeys": "keyring"` in their place. Moving or copying the Andorra home does not carry the keys: save them again there. When a removed key cannot be deleted from the store (it is locked), `config.json` lists its provider in `providerKeysPendingDeletion` and the next save deletes it. Without a credential store (Linux without Secret Service) or with `ANDORRA_CREDENTIAL_STORE=file`, keys stay in `config.json`; keep the file private and do not commit or share it.
|
|
84
84
|
- Shell tools execute as your OS user with an allowlisted environment that excludes provider credential variables — but shell commands can still access credential files on disk.
|
|
85
|
-
- Andorra account tokens are stored in the operating system credential store, never in `config.json
|
|
85
|
+
- Andorra account tokens are stored in the operating system credential store, never in `config.json`. Where Linux or another Unix system has no usable credential store, they go to an owner-only `credentials-<id>.json` in the Andorra home instead. `ANDORRA_CREDENTIAL_STORE=file|keyring` forces one store.
|
|
@@ -6,7 +6,7 @@ Slash commands run inside the interactive TUI. Type `/` as the first character t
|
|
|
6
6
|
| --- | --- |
|
|
7
7
|
| `/browser` | Open the browser workspace (CLI stays available). See [Browser workspace](../guides/browser.md). |
|
|
8
8
|
| `/session` | Browse and resume saved sessions (newest first). |
|
|
9
|
-
| `/login` | Open browser sign-in or create an Andorra account. |
|
|
9
|
+
| `/login [--no-browser]` | Open browser sign-in or create an Andorra account. Over SSH or with `--no-browser`, prints the address to open on another device and asks for the callback address. |
|
|
10
10
|
| `/auth logout` | Remove this machine's saved Andorra account session. |
|
|
11
11
|
| `/auth status` | Show Andorra account session status and membership. |
|
|
12
12
|
| `/model [model-id]` | Open model selection or select a model directly; with a graph that pins node models, asks whether to override them. |
|
|
@@ -27,6 +27,7 @@ Slash commands run inside the interactive TUI. Type `/` as the first character t
|
|
|
27
27
|
| `/plugins` | List, install, enable, disable or remove plugins. See [Extensions](../guides/extensions.md). |
|
|
28
28
|
| `/mcp` | Add, edit, enable, disable or delete MCP servers. See [Extensions](../guides/extensions.md). |
|
|
29
29
|
| `/logout` | Sign out of your Andorra account on this machine (same as `/auth logout`). Run `/login` afterwards to sign in, or to switch to another account. |
|
|
30
|
+
| `/logout --all` | Sign out, and delete every other Andorra sign-in saved in this machine's OS credential store (other Andorra homes or deployments). |
|
|
30
31
|
| `/logout codex` | Sign out of every configured Codex (ChatGPT) account and exit. Provider settings are kept. |
|
|
31
32
|
| `/status` | Show workspace and current settings. |
|
|
32
33
|
| `/clear` | Clear the conversation on screen and the retained context (session usage is retained). |
|