@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
|
@@ -4,7 +4,7 @@ import { permissionMode, assertPlanMutationAllowed } from './permissions.js';
|
|
|
4
4
|
export function createAutomationTool() {
|
|
5
5
|
return {
|
|
6
6
|
name: 'automations', capability: 'external', executionMode: 'sequential',
|
|
7
|
-
description: 'Manage durable scheduled jobs shown in the desktop Automations page. Create a fresh session in the chosen local project with a saved prompt at each five-field CRON or daily HH:mm local-time schedule (IANA timeZone required). Unlike set_timer, these jobs persist across restarts and start NEW sessions; use set_timer to continue this conversation once. Jobs run while Andorra is open or while the user-enabled background service runs; missed occurrences are skipped and a job never overlaps itself. Call list to inspect jobs, create/update to configure them, delete to remove, or run to start one now.
|
|
7
|
+
description: 'Manage durable scheduled jobs shown in the desktop Automations page. Create a fresh session in the chosen local project with a saved prompt at each five-field CRON or daily HH:mm local-time schedule (IANA timeZone required). Unlike set_timer, these jobs persist across restarts and start NEW sessions; use set_timer to continue this conversation once. Jobs run while Andorra is open or while the user-enabled background service runs; missed occurrences are skipped and a job never overlaps itself. Call list to inspect jobs, create/update to configure them, delete to remove, or run to start one now. Only create an automation when the user explicitly asked for a scheduled or recurring job in this conversation; never create one on your own initiative, as a follow-up, or to finish or check work later (suggest it to the user instead). Creating a job, or re-enabling a paused one, always asks the user, even under Full Access, and is refused when nobody can answer. A run that fails (including a failed model health check) pauses its job; do not re-enable it unless the user asks. Unattended runs cannot answer approval prompts or user questions. Never increase saved execution permissions beyond the current run.',
|
|
8
8
|
parameters: { type: 'object', additionalProperties: false, properties: {
|
|
9
9
|
action: { type: 'string', enum: ['list', 'create', 'update', 'delete', 'run'] },
|
|
10
10
|
id: { type: 'string', description: 'Existing job ID for update/delete/run' },
|
|
@@ -22,7 +22,15 @@ export function createAutomationTool() {
|
|
|
22
22
|
return JSON.stringify({ automations: await store.list() });
|
|
23
23
|
if (!['create', 'update', 'delete', 'run'].includes(String(args.action)))
|
|
24
24
|
throw new Error('Choose list, create, update, delete or run');
|
|
25
|
-
|
|
25
|
+
// New scheduled work, or a paused job starting again, is the user's decision alone: no
|
|
26
|
+
// permission mode answers for them, so an agent cannot schedule work nobody asked for.
|
|
27
|
+
const requireUser = args.action === 'create' || (args.action === 'update' && args.enabled === true);
|
|
28
|
+
await approveOperation(context, 'automations', {
|
|
29
|
+
...args,
|
|
30
|
+
warning: requireUser
|
|
31
|
+
? 'An agent wants to schedule recurring unattended work. Approve only if you asked for this automation.'
|
|
32
|
+
: 'This changes durable future work or starts an unattended session.',
|
|
33
|
+
}, { requireUser });
|
|
26
34
|
context.signal.throwIfAborted();
|
|
27
35
|
// A permission switch can settle an earlier approval; never dispatch a mutation
|
|
28
36
|
// using that stale grant, even if a different operation awaits afterwards.
|
|
@@ -34,6 +34,11 @@ export interface Automation {
|
|
|
34
34
|
runId?: string;
|
|
35
35
|
error?: string;
|
|
36
36
|
};
|
|
37
|
+
/** Set when a failed run paused the job; enabling it again clears it. */
|
|
38
|
+
pausedAfterFailure?: {
|
|
39
|
+
at: string;
|
|
40
|
+
error: string;
|
|
41
|
+
};
|
|
37
42
|
}
|
|
38
43
|
export type AutomationExecutor = (job: Automation, signal: AbortSignal) => Promise<{
|
|
39
44
|
sessionId?: string;
|
package/dist/src/automations.js
CHANGED
|
@@ -173,6 +173,8 @@ export class AutomationStore {
|
|
|
173
173
|
const input = await this.input(value, job);
|
|
174
174
|
const changedSchedule = JSON.stringify(input.schedule) !== JSON.stringify(job.schedule) || (!job.enabled && input.enabled);
|
|
175
175
|
Object.assign(job, input, { updatedAt: new Date().toISOString() }, changedSchedule ? { nextRunAt: nextAutomationRun(input.schedule) } : {});
|
|
176
|
+
if (input.enabled)
|
|
177
|
+
delete job.pausedAfterFailure;
|
|
176
178
|
return publicJob(job);
|
|
177
179
|
});
|
|
178
180
|
}
|
|
@@ -247,6 +249,14 @@ export class AutomationStore {
|
|
|
247
249
|
return;
|
|
248
250
|
job.lastRun = { at: claimed.lastRun.at, status: failure ? (signal.aborted ? 'interrupted' : 'failed') : 'completed', ...result, ...(failure ? { error: failure.slice(0, 4000) } : {}) };
|
|
249
251
|
delete job.claim;
|
|
252
|
+
// A failed run (a failed health check, an engine that never started, a question nobody can
|
|
253
|
+
// answer, a run that did not succeed) would fail the same way at every later occurrence, so
|
|
254
|
+
// the job pauses until the user resumes it. A cancelled or shut-down run is not a failure.
|
|
255
|
+
if (job.lastRun.status === 'failed' && job.enabled) {
|
|
256
|
+
job.enabled = false;
|
|
257
|
+
job.pausedAfterFailure = { at: new Date().toISOString(), error: job.lastRun.error ?? 'Automation run failed.' };
|
|
258
|
+
job.updatedAt = job.pausedAfterFailure.at;
|
|
259
|
+
}
|
|
250
260
|
});
|
|
251
261
|
}
|
|
252
262
|
async tick(executor, signal = new AbortController().signal, now = Date.now()) {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { type GraphNode } from './graphs.js';
|
|
1
|
+
import { type CommandScope, type GraphNode } from './graphs.js';
|
|
2
2
|
import type { Tool, ToolContext } from './types.js';
|
|
3
3
|
/** No command-string heuristics: constrained agents receive structured operations instead of a shell.
|
|
4
4
|
* QA tools are the one self-declared command surface: they are matched by an explicit
|
|
5
5
|
* allowlist, gated by node capability AND their declared capability, and serialized by default. */
|
|
6
|
-
export declare function capabilityTools(node: GraphNode, tools: Tool[], child?:
|
|
7
|
-
|
|
6
|
+
export declare function capabilityTools(node: GraphNode, tools: Tool[], child?: CommandScope): Tool[];
|
|
7
|
+
/**
|
|
8
|
+
* `requireUser` asks a person even under Full Access: the operation stands for something only the
|
|
9
|
+
* user can want, so no permission mode answers it on their behalf. Headless runs still refuse it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function approveOperation(context: ToolContext, name: string, args: Record<string, unknown>, options?: {
|
|
12
|
+
requireUser?: boolean;
|
|
13
|
+
}): Promise<void>;
|
|
8
14
|
/** Fixed Git operations disable diff/textconv, pager and hooks, but remain host processes. */
|
|
9
15
|
export declare function gitReadTool(): Tool;
|
package/dist/src/capabilities.js
CHANGED
|
@@ -14,7 +14,7 @@ export function capabilityTools(node, tools, child = false) {
|
|
|
14
14
|
if (tool.providerVisible === false)
|
|
15
15
|
return false;
|
|
16
16
|
// Task-owned MCP clients keep the parent workspace for their entire lifetime.
|
|
17
|
-
// Delegation cannot rebind them safely, even
|
|
17
|
+
// Delegation cannot rebind them safely, even for a delegated worktree child with a shell.
|
|
18
18
|
if (child && tool.capability === 'external')
|
|
19
19
|
return false;
|
|
20
20
|
if (allowed && !allowed.some(name => toolNameMatches(name, tool.name)))
|
|
@@ -87,14 +87,18 @@ function permits(policy, required) {
|
|
|
87
87
|
return policy.deployment === 'allowed';
|
|
88
88
|
return false;
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
/**
|
|
91
|
+
* `requireUser` asks a person even under Full Access: the operation stands for something only the
|
|
92
|
+
* user can want, so no permission mode answers it on their behalf. Headless runs still refuse it.
|
|
93
|
+
*/
|
|
94
|
+
export async function approveOperation(context, name, args, options = {}) {
|
|
91
95
|
context.signal.throwIfAborted();
|
|
92
96
|
// Structured writes (worktrees, automations, PR changes, etc.) are not covered
|
|
93
97
|
// by the file/shell gate. Only the explicitly read-only Git operations are exempt.
|
|
94
98
|
const assertAllowed = () => { if (name !== 'git_read')
|
|
95
99
|
assertPlanMutationAllowed(context); };
|
|
96
100
|
assertAllowed();
|
|
97
|
-
const liveMode = () => permissionMode(context) === 'full-access' ? 'yolo' : context.approvalMode ?? 'interactive';
|
|
101
|
+
const liveMode = () => permissionMode(context) === 'full-access' && !options.requireUser ? 'yolo' : context.approvalMode ?? 'interactive';
|
|
98
102
|
while (true) {
|
|
99
103
|
context.signal.throwIfAborted();
|
|
100
104
|
assertAllowed();
|
package/dist/src/cli.js
CHANGED
|
@@ -6,6 +6,7 @@ import { hostedDecisionPolicy } from './decision/hostedPolicy.js';
|
|
|
6
6
|
import { parseArgs, stripVTControlCharacters } from 'node:util';
|
|
7
7
|
import { appendFile, mkdir, open, readFile, realpath, rm, stat, writeFile } from 'node:fs/promises';
|
|
8
8
|
import { existsSync } from 'node:fs';
|
|
9
|
+
import { createInterface } from 'node:readline/promises';
|
|
9
10
|
import { isAbsolute, join, relative, resolve } from 'node:path';
|
|
10
11
|
import { fileURLToPath } from 'node:url';
|
|
11
12
|
import { homedir } from 'node:os';
|
|
@@ -251,15 +252,29 @@ export async function main(argv = process.argv.slice(2), dependencies = {}) {
|
|
|
251
252
|
const machineOutput = argv.includes('--json') || argv[0] === 'subagent' || argv[0] === 'automations';
|
|
252
253
|
setAuthSignOutReporter(error => reportSignOut(machineOutput, undefined, error.message));
|
|
253
254
|
if (argv[0] === 'login' || argv[0] === 'logout' || argv[0] === 'auth') {
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
const usage = 'Usage: andorra login [--no-browser] | andorra logout [--all] | andorra auth status';
|
|
256
|
+
const noBrowser = argv[0] === 'login' && argv.length === 2 && argv[1] === '--no-browser';
|
|
257
|
+
const everywhere = argv[0] === 'logout' && argv.length === 2 && argv[1] === '--all';
|
|
258
|
+
if ((argv[0] === 'auth' && (argv.length !== 2 || argv[1] !== 'status')) || (argv[0] !== 'auth' && argv.length !== 1 && !noBrowser && !everywhere))
|
|
259
|
+
throw new Error(usage);
|
|
256
260
|
const controller = new AbortController();
|
|
257
261
|
const cancel = () => controller.abort();
|
|
258
262
|
process.once('SIGINT', cancel);
|
|
259
263
|
process.once('SIGTERM', cancel);
|
|
260
264
|
try {
|
|
261
265
|
const print = (message) => process.stdout.write(safeTerminal(message) + '\n');
|
|
262
|
-
|
|
266
|
+
// Where no browser can open here, the address that finishes the sign-in is pasted back on
|
|
267
|
+
// stdin. Only an interactive terminal is asked: piped input is not someone at a keyboard.
|
|
268
|
+
const lines = argv[0] === 'login' && process.stdin.isTTY ? createInterface({ input: process.stdin, output: process.stdout, terminal: true }) : undefined;
|
|
269
|
+
// readline swallows Ctrl+C while it reads; route it to the same cancellation.
|
|
270
|
+
lines?.on('SIGINT', cancel);
|
|
271
|
+
const readCallback = lines ? (prompt, signal) => lines.question(`${prompt} `, { signal }) : undefined;
|
|
272
|
+
try {
|
|
273
|
+
print(await executeAuthCommand(argv[0] === 'auth' ? 'status' : argv[0], { signal: controller.signal, print, noBrowser, readCallback, everywhere }));
|
|
274
|
+
}
|
|
275
|
+
finally {
|
|
276
|
+
lines?.close();
|
|
277
|
+
}
|
|
263
278
|
}
|
|
264
279
|
finally {
|
|
265
280
|
process.removeListener('SIGINT', cancel);
|
|
@@ -334,7 +349,7 @@ export async function main(argv = process.argv.slice(2), dependencies = {}) {
|
|
|
334
349
|
let terminal;
|
|
335
350
|
const print = (text) => terminal ? terminal.print(text) : process.stdout.write(safeTerminal(text) + '\n');
|
|
336
351
|
if (values.help) {
|
|
337
|
-
print(`Andorra Code\nUsage: andorra [--cwd path] [--provider id] [--model id] [--graph id] [--run-input file.json] [--run-state file.json] [--yolo] [--jev on|off] [--debug]\n andorra --prompt "task" [--json] [--yolo] [--jev on|off] [--debug]\n andorra subagent --prompt "task" [--provider id] [--model id] [--read-only]\n andorra graph [--no-open]\n andorra automations list|run|service|serve\n andorra app-server --stdio\n andorra mcp-server --stdio\n andorra remote serve|status|code|devices|revoke|share|unshare|pair|workspaces|unpair|rotate-cert\n andorra update\n andorra login\n andorra logout\n andorra auth status\n\n${HELP}`);
|
|
352
|
+
print(`Andorra Code\nUsage: andorra [--cwd path] [--provider id] [--model id] [--graph id] [--run-input file.json] [--run-state file.json] [--yolo] [--jev on|off] [--debug]\n andorra --prompt "task" [--json] [--yolo] [--jev on|off] [--debug]\n andorra subagent --prompt "task" [--provider id] [--model id] [--read-only]\n andorra graph [--no-open]\n andorra automations list|run|service|serve\n andorra app-server --stdio\n andorra mcp-server --stdio\n andorra remote serve|status|code|devices|revoke|share|unshare|pair|workspaces|unpair|rotate-cert\n andorra update\n andorra login [--no-browser]\n andorra logout [--all]\n andorra auth status\n\n${HELP}`);
|
|
338
353
|
return 0;
|
|
339
354
|
}
|
|
340
355
|
if (values.version) {
|
|
@@ -492,6 +507,18 @@ export async function main(argv = process.argv.slice(2), dependencies = {}) {
|
|
|
492
507
|
result.text += `\nThis session started with --jev ${jevOverride ? 'on' : 'off'}, which overrides the saved preference until /jev on|off.`;
|
|
493
508
|
};
|
|
494
509
|
const state = await startupGuard(async () => ({ config, workspace, graph: values.graph ?? configuredGraphSelection(config, await currentGraphSubject()), permissions, yolo: permissions === 'full-access', usage: { inputTokens: 0, outputTokens: 0, requests: 0 }, notify: print, history: [],
|
|
510
|
+
// `/login` on a machine without a browser takes the sign-in address pasted back from another device.
|
|
511
|
+
readLine: async (prompt, signal) => {
|
|
512
|
+
if (!terminal)
|
|
513
|
+
throw new Error('No interactive terminal to read from.');
|
|
514
|
+
return terminal.question(prompt, { signal, title: 'Sign in', history: false });
|
|
515
|
+
},
|
|
516
|
+
// Over SSH only the terminal's own clipboard (OSC 52) reaches the machine the user sits at.
|
|
517
|
+
copyText: (text) => {
|
|
518
|
+
if (!terminal)
|
|
519
|
+
throw new Error('No interactive terminal.');
|
|
520
|
+
terminal.copyText(text, { terminalOnly: Boolean(process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY) });
|
|
521
|
+
},
|
|
495
522
|
// Direct /model shares the graph-override question with the /model screen; without a
|
|
496
523
|
// terminal the answer is always "keep", so nothing is ever overridden unobserved.
|
|
497
524
|
confirmModelOverride: async (question) => {
|
|
@@ -101,6 +101,18 @@ export function createCodexAdapter(config, connect = codexConnectFor(config)) {
|
|
|
101
101
|
const config = { ...codexInferenceConfig };
|
|
102
102
|
// Empty maps merge with user configuration; explicitly disable every inherited server.
|
|
103
103
|
config.mcp_servers = Object.fromEntries(Object.keys(settings?.config?.mcp_servers ?? {}).map(name => [name, { enabled: false }]));
|
|
104
|
+
// An auxiliary request (`maxTokens` — a session title, a compaction batch) bounds its own
|
|
105
|
+
// turn: `model_reasoning_effort: 'minimal'` caps the reasoning the auxiliary thread may
|
|
106
|
+
// spend, which is the bulk of what the previous Codex exclusion avoided (the installed
|
|
107
|
+
// Codex CLI exposes no token-level output bound — strict config rejects
|
|
108
|
+
// `model_max_output_tokens` as an unknown field), and the caller's deadline bounds the
|
|
109
|
+
// rest. An ordinary run names no bound and keeps the model's own effort. An unusable
|
|
110
|
+
// allowance is refused before a thread is spent on it.
|
|
111
|
+
if (request.maxTokens !== undefined) {
|
|
112
|
+
if (!Number.isSafeInteger(request.maxTokens) || request.maxTokens < 1)
|
|
113
|
+
throw new Error('Invalid auxiliary output allowance.');
|
|
114
|
+
config.model_reasoning_effort = 'minimal';
|
|
115
|
+
}
|
|
104
116
|
const started = await rpc.request('thread/start', {
|
|
105
117
|
model: request.model, modelProvider: 'openai', ephemeral: true, cwd,
|
|
106
118
|
environments: [], runtimeWorkspaceRoots: [], selectedCapabilityRoots: [], dynamicTools: [],
|
|
@@ -3,6 +3,11 @@ import type { Tool, ToolContext } from './types.js';
|
|
|
3
3
|
export interface CodingToolPolicy {
|
|
4
4
|
safePath(context: ToolContext, name: string, missing?: boolean): Promise<string>;
|
|
5
5
|
read(context: ToolContext, name: string): Promise<string>;
|
|
6
|
+
/** The bytes of a supported image file, by signature; undefined for anything else. */
|
|
7
|
+
readImage?(context: ToolContext, name: string): Promise<{
|
|
8
|
+
mimeType: string;
|
|
9
|
+
bytes: Buffer;
|
|
10
|
+
} | undefined>;
|
|
6
11
|
atomicWrite(context: ToolContext, name: string, content: string, expected?: string): Promise<void>;
|
|
7
12
|
authorize(name: string, args: Record<string, unknown>, context: ToolContext): Promise<void>;
|
|
8
13
|
files(context: ToolContext, directory: string): AsyncIterable<string>;
|
package/dist/src/coding-tools.js
CHANGED
|
@@ -15,6 +15,7 @@ import { matchesFileRead, storeFileRead } from './file-read-state.js';
|
|
|
15
15
|
import { FileReadRequiredError } from './tool-errors.js';
|
|
16
16
|
import { permissionMode, PLAN_MODE_MUTATION_ERROR } from './permissions.js';
|
|
17
17
|
import { withGrepRegex } from './grep-regex.js';
|
|
18
|
+
import { claimReadImages, readImageObservation } from './read-image.js';
|
|
18
19
|
const execFileAsync = promisify(execFile);
|
|
19
20
|
const excluded = new Set(['.git', 'node_modules', '.andorracode']);
|
|
20
21
|
const MAX_MODEL_OUTPUT = 24_000;
|
|
@@ -290,54 +291,59 @@ export function createCodingTools(policy) {
|
|
|
290
291
|
} }),
|
|
291
292
|
};
|
|
292
293
|
}
|
|
293
|
-
const Read = zTool('Read', `Read a UTF-8 workspace file up to 8 MiB with compact line numbers. One call returns at most ${READ_MAX_LINES} lines: for a longer file, continue with the offset the result reports until you have read the whole file. A complete Read — every line, across calls — is remembered so Write/Edit can reject stale or unseen existing files; do not re-read unchanged files after a successful mutation.`, { type: 'object', properties: {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
294
|
+
const Read = { ...zTool('Read', `Read a UTF-8 workspace file up to 8 MiB with compact line numbers. One call returns at most ${READ_MAX_LINES} lines: for a longer file, continue with the offset the result reports until you have read the whole file. A complete Read — every line, across calls — is remembered so Write/Edit can reject stale or unseen existing files; do not re-read unchanged files after a successful mutation. An image file (PNG, JPEG, GIF, WebP or BMP, up to 20 MiB) is returned as an image you can see, downscaled when large; use this to look at a rendered frame, plot or screenshot instead of inferring it from pixel statistics. offset and limit do not apply to images.`, { type: 'object', properties: {
|
|
295
|
+
file_path: { type: 'string', description: 'Workspace-relative or absolute path inside the workspace' },
|
|
296
|
+
offset: { type: 'integer', minimum: 0, description: '1-based starting line; 0 is accepted as line 1' },
|
|
297
|
+
limit: { type: 'integer', minimum: 1, maximum: READ_MAX_LINES, description: `Maximum lines to return, at most ${READ_MAX_LINES}` },
|
|
298
|
+
}, required: ['file_path'], additionalProperties: false }, 'parallel', async (args, context) => {
|
|
299
|
+
if (Object.keys(args).some(key => !['file_path', 'offset', 'limit'].includes(key)))
|
|
300
|
+
throw new Error('Unknown Read argument');
|
|
301
|
+
const filePath = stringArg(args, 'file_path');
|
|
302
|
+
const offset = intArg(args, 'offset', { min: 0, max: Number.MAX_SAFE_INTEGER });
|
|
303
|
+
const limit = intArg(args, 'limit', { min: 1, max: READ_MAX_LINES }) ?? READ_MAX_LINES;
|
|
304
|
+
const resolved = await policy.safePath(context, filePath);
|
|
305
|
+
// An image is recognized by its signature and shown as pixels. It is not recorded as a
|
|
306
|
+
// text read: Write and Edit cannot faithfully rewrite a file they only saw as a picture.
|
|
307
|
+
const image = await policy.readImage?.(context, resolved);
|
|
308
|
+
if (image)
|
|
309
|
+
return readImageObservation(context, filePath, image);
|
|
310
|
+
const content = await policy.read(context, resolved);
|
|
311
|
+
const lines = content.split('\n');
|
|
312
|
+
if (content.endsWith('\n') || content === '')
|
|
313
|
+
lines.pop();
|
|
314
|
+
const first = Math.max(1, offset ?? 1);
|
|
315
|
+
if (!lines.length) {
|
|
316
|
+
await rememberReadRange(context, resolved, content, 1, 0, 0);
|
|
317
|
+
return '[Empty file]';
|
|
318
|
+
}
|
|
319
|
+
if (first > lines.length)
|
|
320
|
+
throw new Error(`Offset ${first} is beyond end of file (${lines.length} lines total)`);
|
|
321
|
+
const lastRequested = Math.min(lines.length, first + limit - 1);
|
|
322
|
+
// The runtime clips every tool result at MAX_MODEL_OUTPUT before the model sees it, so a
|
|
323
|
+
// page that overflows would lose its tail and the continuation footer while still being
|
|
324
|
+
// recorded as read. Stop on the last whole line that fits, and record only that line.
|
|
325
|
+
const budget = MAX_MODEL_OUTPUT - 200;
|
|
326
|
+
let rendered = '';
|
|
327
|
+
let emittedLast = first - 1;
|
|
328
|
+
for (let line = first; line <= lastRequested; line++) {
|
|
329
|
+
const body = lines[line - 1] ?? '';
|
|
330
|
+
const shown = body.length > READ_MAX_LINE_CHARS ? `${body.slice(0, READ_MAX_LINE_CHARS)}... (line truncated to ${READ_MAX_LINE_CHARS} chars)` : body;
|
|
331
|
+
const next = `${line}\t${shown}${line < lastRequested ? '\n' : ''}`;
|
|
332
|
+
if (rendered.length + next.length > budget)
|
|
333
|
+
break;
|
|
334
|
+
rendered += next;
|
|
335
|
+
emittedLast = line;
|
|
336
|
+
}
|
|
337
|
+
if (emittedLast < first) {
|
|
338
|
+
// A truncated line always fits this budget, so this is a defensive guard, not a path.
|
|
339
|
+
rendered = `${first}\t${(lines[first - 1] ?? '').slice(0, READ_MAX_LINE_CHARS)}`;
|
|
340
|
+
emittedLast = first;
|
|
341
|
+
}
|
|
342
|
+
await rememberReadRange(context, resolved, content, first, emittedLast, lines.length);
|
|
343
|
+
if (emittedLast < lines.length)
|
|
344
|
+
rendered += `\n[Showing lines ${first}-${emittedLast} of ${lines.length}. Use offset=${emittedLast + 1} to continue.]`;
|
|
345
|
+
return rendered;
|
|
346
|
+
}), resultImages: claimReadImages };
|
|
341
347
|
const Write = zTool('Write', 'Create a new file or completely replace an existing file. Existing files must first be fully Read (or supplied completely by CodeGraph) and must still match that snapshot. Prefer Edit for partial changes.', { type: 'object', properties: {
|
|
342
348
|
file_path: { type: 'string', description: 'Workspace-relative or absolute path inside the workspace' },
|
|
343
349
|
content: { type: 'string', description: 'Complete replacement file content' },
|
package/dist/src/commands.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Completion, RunResult } from './runtime.js';
|
|
|
6
6
|
import type { Usage } from './types.js';
|
|
7
7
|
import type { CodeIntelligenceManager } from './code-intelligence/CodeIntelligenceManager.js';
|
|
8
8
|
import { logoutCodex } from './codex-auth.js';
|
|
9
|
-
export declare const HELP = "Commands:\n /browser Open the browser workspace (CLI stays available)\n /session Browse and resume saved sessions (newest first)\n /login
|
|
9
|
+
export declare const HELP = "Commands:\n /browser Open the browser workspace (CLI stays available)\n /session Browse and resume saved sessions (newest first)\n /login [--no-browser] Sign in or create an Andorra account (prints the address over SSH)\n /auth logout Remove this machine's saved Andorra account session\n /auth status Show Andorra account session status\n /model [model-id] Open model selection or select a model directly; with a graph that pins node models, asks whether to override them\n /model list Discover models from the active provider\n /providers [id] Choose providers; Right/e edits; Add provider configures\n /subagent [id [model]] Set the provider/model external hosts (Claude/Codex CLI) must use for Andorra subagent runs; off clears it\n /reasoning <level> Set default|none|minimal|low|medium|high|xhigh|max\n /graph [id] Select a graph or open the web graph builder\n /codegraph <action> Code intelligence: status|enable|disable|rebuild; enable|disable --global sets the default for every project\n /dashboard Toggle live dashboard and transcript (TTY only)\n /attach <path> Attach a file or folder to your next task (large pastes and dropped files attach automatically)\n /usage Open session usage (Escape to return)\n /permissions [mode] Choose and remember workspace permissions\n /jev <on|off|status> Turn Jev on or off for nodes that enable it, or show its setting\n /feedback <on|off|status> Show the anonymous-feedback setting; Paid accounts can turn it off\n /yolo <on|off> Turn session-wide Full Access on or off (host files and network)\n /tools List available coding tools\n /skills List, install, enable, disable or remove skills\n /<skillname> [args] Apply an enabled imported skill; qualify duplicate names by catalog ID\n /plugins List, install, enable, disable or remove plugins\n /mcp Add, edit, enable, disable or delete MCP servers\n /logout Sign out of your Andorra account (then /login to switch accounts)\n /logout --all Sign out, and delete every other Andorra sign-in saved on this machine\n /logout codex Sign out of every configured Codex (ChatGPT) account\n /status Show workspace and current settings\n /clear Clear the conversation on screen and the retained context (session usage is retained)\n /compact Compact retained conversation history to free context\n /help Show commands\n /exit Quit\nSelection screens: Up/Down to browse, Enter or Space to select, Escape to return.\nCtrl+B toggles dashboard; Ctrl+G pages its graph; Ctrl+N cycles dashboard model statistics (display only).\nCtrl+T expands/collapses todos; Ctrl+O expands/collapses tool details; Ctrl+Y collapses/expands live thinking.\nShift+Arrow/Home/End selects prompt text; Ctrl+C copies and Ctrl+X cuts a selection. The wheel scrolls; Up/Down recall prompts. Shift+drag selects transcript text.\nCtrl+C stops an interactive run; send direction to resume, or press Ctrl+C again to exit (idle Ctrl+C exits too). /yolo on|off applies immediately, including at approvals. /exit quits. Headless Ctrl+C cancels the run; a second press exits.";
|
|
10
10
|
export interface CommandState {
|
|
11
11
|
config: Config;
|
|
12
12
|
yolo: boolean;
|
|
@@ -26,6 +26,10 @@ export interface CommandState {
|
|
|
26
26
|
graph?: string;
|
|
27
27
|
codeIntel?: CodeIntelligenceManager;
|
|
28
28
|
notify?: (message: string) => void;
|
|
29
|
+
/** Ask for one line of text, such as the sign-in address pasted back from another device. */
|
|
30
|
+
readLine?: (prompt: string, signal: AbortSignal) => Promise<string>;
|
|
31
|
+
/** Put text on the viewer's clipboard: the full-screen terminal wraps a long sign-in address. */
|
|
32
|
+
copyText?: (text: string) => void;
|
|
29
33
|
/** A run is in flight: settings saved now apply to the next run, and the reply says so. */
|
|
30
34
|
running?: boolean;
|
|
31
35
|
/** Ask whether a model change should replace the graph's per-node model selections. */
|
package/dist/src/commands.js
CHANGED
|
@@ -20,7 +20,7 @@ const REASONING_USAGE = 'Usage: /reasoning default|none|minimal|low|medium|high|
|
|
|
20
20
|
export const HELP = `Commands:
|
|
21
21
|
/browser Open the browser workspace (CLI stays available)
|
|
22
22
|
/session Browse and resume saved sessions (newest first)
|
|
23
|
-
/login
|
|
23
|
+
/login [--no-browser] Sign in or create an Andorra account (prints the address over SSH)
|
|
24
24
|
/auth logout Remove this machine's saved Andorra account session
|
|
25
25
|
/auth status Show Andorra account session status
|
|
26
26
|
/model [model-id] Open model selection or select a model directly; with a graph that pins node models, asks whether to override them
|
|
@@ -43,6 +43,7 @@ export const HELP = `Commands:
|
|
|
43
43
|
/plugins List, install, enable, disable or remove plugins
|
|
44
44
|
/mcp Add, edit, enable, disable or delete MCP servers
|
|
45
45
|
/logout Sign out of your Andorra account (then /login to switch accounts)
|
|
46
|
+
/logout --all Sign out, and delete every other Andorra sign-in saved on this machine
|
|
46
47
|
/logout codex Sign out of every configured Codex (ChatGPT) account
|
|
47
48
|
/status Show workspace and current settings
|
|
48
49
|
/clear Clear the conversation on screen and the retained context (session usage is retained)
|
|
@@ -201,9 +202,9 @@ export function subagentClearRequested(line, providers) {
|
|
|
201
202
|
export async function executeCommand(line, state, persist, signal, graphAccess = { load: loadAccessibleGraph, requirePaid: requireGraphMembership }, graphSubject = currentGraphSubject, logout = logoutCodex) {
|
|
202
203
|
// `/logout` is the Andorra account's sign-out, the counterpart of `/login`; a provider's managed
|
|
203
204
|
// sign-in is named explicitly, so signing out of the account never touches provider sessions.
|
|
204
|
-
if (/^\/logout\s+\S/.test(line.trim())) {
|
|
205
|
+
if (/^\/logout\s+\S/.test(line.trim()) && !/^\/logout\s+--all$/.test(line.trim())) {
|
|
205
206
|
if (!/^\/logout\s+codex$/.test(line.trim()))
|
|
206
|
-
return { text: 'Usage: /logout | /logout codex' };
|
|
207
|
+
return { text: 'Usage: /logout [--all] | /logout codex' };
|
|
207
208
|
const codex = state.config.providers.filter(candidate => candidate.type === 'codex');
|
|
208
209
|
if (!codex.length)
|
|
209
210
|
return { text: 'No Codex provider is configured, so there is no Codex sign-in to log out of. Use /logout to sign out of your Andorra account.' };
|
|
@@ -253,9 +254,9 @@ export async function executeCommand(line, state, persist, signal, graphAccess =
|
|
|
253
254
|
const codegraphScope = codegraph?.[2] === undefined ? 'repository' : codegraph[2] === '--global' ? 'global' : undefined;
|
|
254
255
|
let result;
|
|
255
256
|
if (/^\/(login|logout|auth)(?:\s|$)/.test(line.trim())) {
|
|
256
|
-
const command = /^\/(login
|
|
257
|
-
const action = command?.[1] ?? command?.[
|
|
258
|
-
result = { text: command ? await executeAuthCommand(action, { signal, print: state.notify }) : 'Usage: /login | /logout | /auth logout | /auth status' };
|
|
257
|
+
const command = /^\/(login)(?:\s+(--no-browser))?\s*$|^\/(logout)(?:\s+(--all))?\s*$|^\/auth\s+(status|logout)\s*$/.exec(line.trim());
|
|
258
|
+
const action = command?.[1] ?? command?.[3] ?? command?.[5];
|
|
259
|
+
result = { text: command ? await executeAuthCommand(action, { signal, print: state.notify, noBrowser: Boolean(command[2]), everywhere: Boolean(command[4]), readCallback: state.readLine, copyAddress: state.copyText }) : 'Usage: /login [--no-browser] | /logout [--all] | /auth logout | /auth status' };
|
|
259
260
|
if (action === 'logout' || action === 'login') {
|
|
260
261
|
delete draft.graph;
|
|
261
262
|
result.clear = true;
|
package/dist/src/completion.js
CHANGED
|
@@ -134,6 +134,34 @@ function missingClosers(text) {
|
|
|
134
134
|
}
|
|
135
135
|
return inString || !open.length ? undefined : open.reverse().join('');
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* The index just past the object that opens `text`, or undefined when the text does not open with
|
|
139
|
+
* an object or that object never closes. Brackets inside strings are not counted.
|
|
140
|
+
*/
|
|
141
|
+
function envelopeEnd(text) {
|
|
142
|
+
const start = text.search(/\S/);
|
|
143
|
+
if (start < 0 || text[start] !== '{')
|
|
144
|
+
return undefined;
|
|
145
|
+
let depth = 0, inString = false, escaped = false;
|
|
146
|
+
for (let index = start; index < text.length; index += 1) {
|
|
147
|
+
const char = text[index];
|
|
148
|
+
if (inString) {
|
|
149
|
+
if (escaped)
|
|
150
|
+
escaped = false;
|
|
151
|
+
else if (char === '\\')
|
|
152
|
+
escaped = true;
|
|
153
|
+
else if (char === '"')
|
|
154
|
+
inString = false;
|
|
155
|
+
}
|
|
156
|
+
else if (char === '"')
|
|
157
|
+
inString = true;
|
|
158
|
+
else if (char === '{' || char === '[')
|
|
159
|
+
depth += 1;
|
|
160
|
+
else if ((char === '}' || char === ']') && --depth === 0)
|
|
161
|
+
return index + 1;
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
137
165
|
const truncatedStop = (stopReason) => stopReason === 'length' || stopReason === 'max_tokens';
|
|
138
166
|
/** Classify parser failures without echoing model text, paths, or private analysis. */
|
|
139
167
|
function syntaxFailure(error, text) {
|
|
@@ -169,12 +197,30 @@ function syntaxFailure(error, text) {
|
|
|
169
197
|
* and the same omission on every retry. The appended text must parse, and the result then faces
|
|
170
198
|
* every contract and schema check unchanged, so a member closed into the wrong object is still
|
|
171
199
|
* rejected. A response stopped by the output-token limit is never closed by the host.
|
|
200
|
+
*
|
|
201
|
+
* Text after a complete envelope is dropped. A model that misses its end of turn keeps generating
|
|
202
|
+
* past the closing brace: a sign-off, or an invented next task with a second completion for it.
|
|
203
|
+
* The envelope was whole when the turn should have ended, so it is judged alone, by every check
|
|
204
|
+
* that follows. A stray closing bracket there is a misplaced bracket instead, and stays an error.
|
|
172
205
|
*/
|
|
173
206
|
function parseCompletionJson(text, stopReason, notes) {
|
|
174
207
|
try {
|
|
175
208
|
return JSON.parse(text);
|
|
176
209
|
}
|
|
177
210
|
catch (error) {
|
|
211
|
+
const end = envelopeEnd(text);
|
|
212
|
+
const runOn = end === undefined ? '' : text.slice(end).trim();
|
|
213
|
+
if (end !== undefined && runOn && !/^[}\]]/.test(runOn)) {
|
|
214
|
+
let envelope;
|
|
215
|
+
try {
|
|
216
|
+
envelope = JSON.parse(text.slice(0, end));
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
throw error;
|
|
220
|
+
}
|
|
221
|
+
notes?.push(`completion was followed by ${runOn.length} characters of text after its closing brace, dropped by the host`);
|
|
222
|
+
return envelope;
|
|
223
|
+
}
|
|
178
224
|
const closers = truncatedStop(stopReason) ? undefined : missingClosers(text);
|
|
179
225
|
if (!closers || closers.length > MAX_APPENDED_CLOSERS)
|
|
180
226
|
throw error;
|
package/dist/src/config.d.ts
CHANGED
|
@@ -74,6 +74,8 @@ export interface Config {
|
|
|
74
74
|
autoArchiveDays?: number;
|
|
75
75
|
/** Browser tool settings. */
|
|
76
76
|
browser?: BrowserConfig;
|
|
77
|
+
/** The web_search tool's backends and which one it uses. */
|
|
78
|
+
webSearch?: WebSearchConfig;
|
|
77
79
|
}
|
|
78
80
|
/**
|
|
79
81
|
* Browser tool settings.
|
|
@@ -86,6 +88,46 @@ export interface BrowserConfig {
|
|
|
86
88
|
}
|
|
87
89
|
export declare const MAX_CAPSOLVER_API_KEY_LENGTH = 256;
|
|
88
90
|
export declare function validateBrowserConfig(value: unknown): BrowserConfig;
|
|
91
|
+
/** The search services the web_search tool can query, in the order "automatic" tries them. */
|
|
92
|
+
export declare const WEB_SEARCH_PROVIDERS: readonly ["brave", "tavily", "exa", "serper", "google", "searxng"];
|
|
93
|
+
export type WebSearchProviderId = typeof WEB_SEARCH_PROVIDERS[number];
|
|
94
|
+
/** The configuration field that holds each keyed service's API key. SearXNG takes a URL instead. */
|
|
95
|
+
export declare const WEB_SEARCH_KEY_FIELDS: {
|
|
96
|
+
readonly brave: "braveApiKey";
|
|
97
|
+
readonly tavily: "tavilyApiKey";
|
|
98
|
+
readonly exa: "exaApiKey";
|
|
99
|
+
readonly serper: "serperApiKey";
|
|
100
|
+
readonly google: "googleApiKey";
|
|
101
|
+
};
|
|
102
|
+
export type WebSearchKeyField = typeof WEB_SEARCH_KEY_FIELDS[keyof typeof WEB_SEARCH_KEY_FIELDS];
|
|
103
|
+
export declare const WEB_SEARCH_FIELDS: readonly [...("braveApiKey" | "tavilyApiKey" | "exaApiKey" | "serperApiKey" | "googleApiKey")[], "defaultProvider", "googleSearchEngineId", "searxngUrl"];
|
|
104
|
+
/**
|
|
105
|
+
* The web_search tool's settings.
|
|
106
|
+
*
|
|
107
|
+
* The API keys are secrets like a provider's `apiKey`: the engine reports only whether each is
|
|
108
|
+
* present, never its value. `googleSearchEngineId` (the Programmable Search Engine's `cx`) and
|
|
109
|
+
* `searxngUrl` are not secrets and are reported as saved. `defaultProvider` picks the service; unset
|
|
110
|
+
* means the first one in WEB_SEARCH_PROVIDERS that is configured.
|
|
111
|
+
*/
|
|
112
|
+
export interface WebSearchConfig {
|
|
113
|
+
defaultProvider?: WebSearchProviderId;
|
|
114
|
+
braveApiKey?: string;
|
|
115
|
+
tavilyApiKey?: string;
|
|
116
|
+
exaApiKey?: string;
|
|
117
|
+
serperApiKey?: string;
|
|
118
|
+
googleApiKey?: string;
|
|
119
|
+
googleSearchEngineId?: string;
|
|
120
|
+
searxngUrl?: string;
|
|
121
|
+
}
|
|
122
|
+
export declare const MAX_WEB_SEARCH_API_KEY_LENGTH = 256;
|
|
123
|
+
export declare const MAX_WEB_SEARCH_URL_LENGTH = 2048;
|
|
124
|
+
/** A SearXNG base URL: HTTP(S), no credentials, query or fragment. Returns the normalized URL or an error message. */
|
|
125
|
+
export declare function checkSearxngUrl(value: string): {
|
|
126
|
+
url: string;
|
|
127
|
+
} | {
|
|
128
|
+
error: string;
|
|
129
|
+
};
|
|
130
|
+
export declare function validateWebSearchConfig(value: unknown): WebSearchConfig;
|
|
89
131
|
/** The longest override the setting accepts: the same bound the workspace guide is clipped to. */
|
|
90
132
|
export declare const MAX_SYSTEM_PROMPT_OVERRIDE = 16000;
|
|
91
133
|
export declare const AUTO_ARCHIVE_MIN_DAYS = 1;
|
|
@@ -123,6 +165,12 @@ export declare function resolveConfiguredLimits(config: Pick<Config, 'limits'>):
|
|
|
123
165
|
export declare function validateMemoryConfig(memory: unknown): void;
|
|
124
166
|
/** Environment overrides win over config.json; nothing is persisted back. */
|
|
125
167
|
export declare function resolveMemoryConfig(config: Config, env?: NodeJS.ProcessEnv): MemoryConfig;
|
|
168
|
+
/**
|
|
169
|
+
* The installation's configuration, with saved provider API keys read back from the OS credential
|
|
170
|
+
* store. A `config.json` that still holds keys in plaintext (written before keys moved to the
|
|
171
|
+
* store, or edited by hand) has them moved on this load; where that cannot happen, the keys stay in
|
|
172
|
+
* the file and the configuration loads exactly as before.
|
|
173
|
+
*/
|
|
126
174
|
export declare function loadConfig(directory?: string): Promise<Config>;
|
|
127
175
|
/**
|
|
128
176
|
* The anonymous-feedback preference this installation has saved right now.
|