@andorra-labs/code 0.1.16 → 0.1.18
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/acp-agent.d.ts +6 -0
- package/dist/src/acp-agent.js +15 -4
- package/dist/src/agent-execution.js +108 -19
- package/dist/src/agent-mcp-catalog.js +1 -0
- package/dist/src/agent-mcp.d.ts +3 -0
- package/dist/src/agent-mcp.js +33 -1
- package/dist/src/andorra/entry.d.ts +10 -0
- package/dist/src/andorra/entry.js +18 -4
- package/dist/src/andorra/errors.js +3 -0
- package/dist/src/andorra/hosted.d.ts +2 -1
- package/dist/src/andorra/hosted.js +2 -1
- package/dist/src/andorra/notices.d.ts +5 -0
- package/dist/src/andorra/notices.js +7 -0
- package/dist/src/andorra/state.d.ts +3 -2
- package/dist/src/andorra/state.js +4 -4
- package/dist/src/andorra/terminal.js +7 -2
- package/dist/src/anthropic-credentials.js +2 -0
- package/dist/src/app-server/error.d.ts +5 -0
- package/dist/src/app-server/error.js +7 -0
- package/dist/src/app-server/protocol.d.ts +30 -44
- package/dist/src/app-server/protocol.js +5 -1
- package/dist/src/app-server/workspace.d.ts +108 -0
- package/dist/src/app-server/workspace.js +608 -11
- package/dist/src/app-server.d.ts +390 -33
- package/dist/src/app-server.js +3033 -565
- package/dist/src/attachments.d.ts +10 -0
- package/dist/src/attachments.js +102 -7
- package/dist/src/automation-tool.js +2 -1
- package/dist/src/bridge/cloud.d.ts +27 -0
- package/dist/src/bridge/cloud.js +187 -0
- package/dist/src/bridge/command.d.ts +30 -0
- package/dist/src/bridge/command.js +359 -0
- package/dist/src/bridge/control.d.ts +70 -0
- package/dist/src/bridge/control.js +238 -0
- package/dist/src/bridge/engines.d.ts +90 -0
- package/dist/src/bridge/engines.js +601 -0
- package/dist/src/bridge/github.d.ts +108 -0
- package/dist/src/bridge/github.js +378 -0
- package/dist/src/bridge/host-ops.d.ts +9 -0
- package/dist/src/bridge/host-ops.js +139 -0
- package/dist/src/bridge/host.d.ts +47 -0
- package/dist/src/bridge/host.js +543 -0
- package/dist/src/bridge/link.d.ts +38 -0
- package/dist/src/bridge/link.js +508 -0
- package/dist/src/bridge/login-link.d.ts +29 -0
- package/dist/src/bridge/login-link.js +54 -0
- package/dist/src/bridge/protocol.d.ts +136 -0
- package/dist/src/bridge/protocol.js +11 -0
- package/dist/src/bridge/store.d.ts +12 -0
- package/dist/src/bridge/store.js +61 -0
- package/dist/src/bridge/wording.d.ts +6 -0
- package/dist/src/bridge/wording.js +10 -0
- package/dist/src/browser-server.js +7 -1
- package/dist/src/browser-ui/tokens.css +1 -1
- package/dist/src/bug-report-attachments.d.ts +48 -0
- package/dist/src/bug-report-attachments.js +327 -0
- package/dist/src/bug-report.d.ts +23 -3
- package/dist/src/bug-report.js +72 -9
- package/dist/src/change-authors.d.ts +41 -0
- package/dist/src/change-authors.js +146 -0
- package/dist/src/cli.d.ts +1 -3
- package/dist/src/cli.js +191 -35
- package/dist/src/codex-provider.js +1 -1
- package/dist/src/coding-tools.js +24 -17
- package/dist/src/command-screens.d.ts +6 -0
- package/dist/src/command-screens.js +14 -11
- package/dist/src/commands.d.ts +15 -3
- package/dist/src/commands.js +2 -1
- package/dist/src/compaction-phrases.js +1 -1
- package/dist/src/completion.js +89 -8
- package/dist/src/config.d.ts +71 -3
- package/dist/src/config.js +205 -78
- package/dist/src/context-budget.js +15 -2
- package/dist/src/deadline.js +13 -1
- package/dist/src/decision/DecisionEngine.d.ts +2 -0
- package/dist/src/decision/DecisionManager.d.ts +11 -0
- package/dist/src/decision/DecisionManager.js +36 -0
- package/dist/src/decision/applyTaskKind.d.ts +8 -0
- package/dist/src/decision/applyTaskKind.js +53 -0
- package/dist/src/decision/checks.js +1 -1
- package/dist/src/decision/hostedPolicy.js +2 -1
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +2 -0
- package/dist/src/decision/providers/AndorraDecisionProvider.js +12 -0
- package/dist/src/decision/requestPhrases.js +0 -1
- package/dist/src/decision/taskKind.d.ts +52 -0
- package/dist/src/decision/taskKind.js +76 -0
- package/dist/src/decision/types.d.ts +1 -1
- package/dist/src/default-graph.js +1 -1
- package/dist/src/efficiency.d.ts +5 -0
- package/dist/src/efficiency.js +5 -1
- package/dist/src/effort-routing.d.ts +27 -0
- package/dist/src/effort-routing.js +34 -0
- package/dist/src/evidence.d.ts +110 -0
- package/dist/src/evidence.js +195 -0
- package/dist/src/file-diff.d.ts +4 -0
- package/dist/src/file-diff.js +2 -1
- package/dist/src/github-app/agent-writes.d.ts +102 -0
- package/dist/src/github-app/agent-writes.js +320 -0
- package/dist/src/github-app/client.d.ts +368 -0
- package/dist/src/github-app/client.js +830 -0
- package/dist/src/github-app/event-source.d.ts +208 -0
- package/dist/src/github-app/event-source.js +684 -0
- package/dist/src/github-app/metrics.d.ts +32 -0
- package/dist/src/github-app/metrics.js +49 -0
- package/dist/src/github-app/review-loop.d.ts +274 -0
- package/dist/src/github-app/review-loop.js +1177 -0
- package/dist/src/github-app/review-node.d.ts +81 -0
- package/dist/src/github-app/review-node.js +205 -0
- package/dist/src/github-app/review-post.d.ts +73 -0
- package/dist/src/github-app/review-post.js +139 -0
- package/dist/src/github-app/review-text.d.ts +107 -0
- package/dist/src/github-app/review-text.js +1133 -0
- package/dist/src/github-app/review-threads.d.ts +47 -0
- package/dist/src/github-app/review-threads.js +107 -0
- package/dist/src/github-app/reviewer.d.ts +121 -0
- package/dist/src/github-app/reviewer.js +598 -0
- package/dist/src/github-app/store.d.ts +59 -0
- package/dist/src/github-app/store.js +148 -0
- package/dist/src/github-app/triggers.d.ts +141 -0
- package/dist/src/github-app/triggers.js +441 -0
- package/dist/src/github-names.d.ts +15 -0
- package/dist/src/github-names.js +15 -0
- package/dist/src/glob-search.d.ts +61 -0
- package/dist/src/glob-search.js +180 -0
- package/dist/src/graph-health.js +6 -1
- package/dist/src/graph-manager-chat.js +1 -1
- package/dist/src/graph-preview.d.ts +48 -0
- package/dist/src/graph-preview.js +56 -0
- package/dist/src/graph-provider-portability.js +2 -1
- package/dist/src/graph-runner.js +65 -4
- package/dist/src/graph-server.js +7 -5
- package/dist/src/graph-sync.js +3 -3
- package/dist/src/graph-ui/app.js +121 -7
- package/dist/src/graph-ui/icons.js +2 -1
- package/dist/src/graph-ui/studio.js +15 -1
- package/dist/src/graph-ui/tokens.css +1 -1
- package/dist/src/graphs.d.ts +40 -1
- package/dist/src/graphs.js +164 -15
- package/dist/src/hardened-runtime.js +32 -21
- package/dist/src/image-input.d.ts +16 -0
- package/dist/src/image-input.js +41 -0
- package/dist/src/membership.d.ts +10 -0
- package/dist/src/membership.js +19 -4
- package/dist/src/model-health-cache.js +1 -1
- package/dist/src/model-metadata.d.ts +6 -0
- package/dist/src/model-metadata.js +35 -15
- package/dist/src/model-override.d.ts +2 -1
- package/dist/src/model-override.js +9 -0
- package/dist/src/model-relay/local.d.ts +116 -0
- package/dist/src/model-relay/local.js +468 -0
- package/dist/src/model-relay/remote.d.ts +129 -0
- package/dist/src/model-relay/remote.js +252 -0
- package/dist/src/model-relay/runs.d.ts +34 -0
- package/dist/src/model-relay/runs.js +146 -0
- package/dist/src/model-relay/wire.d.ts +5 -0
- package/dist/src/model-relay/wire.js +5 -0
- package/dist/src/model-tiers.d.ts +3 -0
- package/dist/src/model-tiers.js +3 -3
- package/dist/src/project-registry.d.ts +21 -0
- package/dist/src/project-registry.js +74 -0
- package/dist/src/provider-engine.d.ts +13 -1
- package/dist/src/provider-engine.js +74 -0
- package/dist/src/provider-import.d.ts +0 -12
- package/dist/src/provider-import.js +7 -195
- package/dist/src/providers.d.ts +28 -2
- package/dist/src/providers.js +59 -12
- package/dist/src/pull-request-logs.d.ts +12 -1
- package/dist/src/pull-request-logs.js +14 -3
- package/dist/src/pull-requests.d.ts +338 -8
- package/dist/src/pull-requests.js +482 -53
- package/dist/src/react-runtime.js +99 -16
- package/dist/src/remote/engine-pool.d.ts +88 -4
- package/dist/src/remote/engine-pool.js +367 -90
- package/dist/src/remote/roots.d.ts +19 -0
- package/dist/src/remote/roots.js +45 -7
- package/dist/src/remote/types.d.ts +0 -44
- package/dist/src/run-control.d.ts +7 -0
- package/dist/src/run-control.js +23 -0
- package/dist/src/run-records.d.ts +7 -2
- package/dist/src/run-records.js +71 -6
- package/dist/src/runtime.d.ts +34 -2
- package/dist/src/runtime.js +18 -2
- package/dist/src/session-changes.d.ts +35 -0
- package/dist/src/session-changes.js +194 -6
- package/dist/src/session-monitor.js +2 -1
- package/dist/src/session-reaper.d.ts +1 -1
- package/dist/src/session-reaper.js +6 -1
- package/dist/src/session-summary.d.ts +2 -1
- package/dist/src/session-summary.js +2 -1
- package/dist/src/sessions.d.ts +35 -1
- package/dist/src/sessions.js +70 -4
- package/dist/src/skills/bundled/bug-report/SKILL.md +51 -7
- package/dist/src/skills/bundled/diagram/SKILL.md +5 -3
- package/dist/src/skills/bundled/graph-manager/SKILL.md +7 -4
- package/dist/src/skills/bundled/provenance.json +3 -3
- package/dist/src/skills/runtime-skills.js +1 -1
- package/dist/src/task-checkout.d.ts +141 -0
- package/dist/src/task-checkout.js +558 -0
- package/dist/src/telemetry/emitter.d.ts +15 -0
- package/dist/src/telemetry/emitter.js +35 -1
- package/dist/src/telemetry/schema.d.ts +25 -2
- package/dist/src/telemetry/schema.js +52 -4
- package/dist/src/telemetry/surface.d.ts +2 -1
- package/dist/src/telemetry/surface.js +4 -1
- package/dist/src/terminal-ui.d.ts +1 -0
- package/dist/src/terminal-ui.js +10 -3
- package/dist/src/test-edit-guard.d.ts +37 -0
- package/dist/src/test-edit-guard.js +216 -3
- package/dist/src/thinking-level-detect.d.ts +11 -0
- package/dist/src/thinking-level-detect.js +47 -0
- package/dist/src/thinking-levels.d.ts +30 -0
- package/dist/src/thinking-levels.js +124 -0
- package/dist/src/timers.d.ts +3 -0
- package/dist/src/tool-catalog.js +1 -1
- package/dist/src/tools.js +59 -9
- package/dist/src/transcript.js +1 -1
- package/dist/src/types.d.ts +34 -0
- package/package.json +6 -1
- package/dist/src/remote/cert.d.ts +0 -11
- package/dist/src/remote/cert.js +0 -87
- package/dist/src/remote/client.d.ts +0 -119
- package/dist/src/remote/client.js +0 -544
- package/dist/src/remote/command.d.ts +0 -4
- package/dist/src/remote/command.js +0 -194
- package/dist/src/remote/errors.d.ts +0 -11
- package/dist/src/remote/errors.js +0 -14
- package/dist/src/remote/network.d.ts +0 -22
- package/dist/src/remote/network.js +0 -102
- package/dist/src/remote/pairing.d.ts +0 -63
- package/dist/src/remote/pairing.js +0 -299
- package/dist/src/remote/pem.d.ts +0 -2
- package/dist/src/remote/pem.js +0 -7
- package/dist/src/remote/serve.d.ts +0 -68
- package/dist/src/remote/serve.js +0 -244
- package/dist/src/remote/server.d.ts +0 -21
- package/dist/src/remote/server.js +0 -406
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { changeConfigFile, loadConfig, reconcileSubagentPair } from '../config.js';
|
|
2
2
|
import { ANDORRA_CHANGED_MESSAGE } from './endpoint.js';
|
|
3
|
-
import { fallbackProviderId, hasAndorraEntry, virtualAndorraEntry } from './entry.js';
|
|
3
|
+
import { andorraModelSwitch, fallbackProviderId, hasAndorraEntry, virtualAndorraEntry } from './entry.js';
|
|
4
4
|
import { HostedMonitor } from './monitor.js';
|
|
5
|
-
import { ANDORRA_ADD_HINT, andorraAnnouncement, speechBubble } from './notices.js';
|
|
5
|
+
import { ANDORRA_ADD_HINT, andorraAnnouncement, andorraModelSwitched, speechBubble } from './notices.js';
|
|
6
6
|
import { addAndorraEntry, saveAndorraAnswer } from './opt-in.js';
|
|
7
7
|
import { readHostedState, recordAndorraRemoved } from './state.js';
|
|
8
8
|
/** The ids of the providers that serve Andorra's hosted models: the footer shows the usage while one of them is in play. */
|
|
@@ -81,7 +81,12 @@ export function createTerminalAndorra(options) {
|
|
|
81
81
|
// Written or not, take the entry as the file has it, so one another client added or removed shows here.
|
|
82
82
|
const saved = await saveAndorraAnswer(directory, answer) ?? await loadConfig(directory);
|
|
83
83
|
const before = JSON.stringify([config.providers.find(provider => provider.type === 'andorra'), config.provider]);
|
|
84
|
+
const held = { providers: structuredClone(config.providers.filter(provider => provider.type === 'andorra')) };
|
|
84
85
|
adoptAndorraEntry(config, saved);
|
|
86
|
+
// The model this terminal was on left the offer, whichever client saved the move: say which one it is on now.
|
|
87
|
+
const moved = andorraModelSwitch(held, config);
|
|
88
|
+
if (moved !== undefined && config.provider === moved.id)
|
|
89
|
+
options.print(andorraModelSwitched(moved.from, moved.to));
|
|
85
90
|
if (JSON.stringify([config.providers.find(provider => provider.type === 'andorra'), config.provider]) !== before)
|
|
86
91
|
options.refreshStatus();
|
|
87
92
|
},
|
|
@@ -40,6 +40,8 @@ export function signInRequired(providerId) {
|
|
|
40
40
|
}
|
|
41
41
|
const REFRESH_FAILED = 'Your Claude Console sign-in expired or could not be refreshed. Sign in again.';
|
|
42
42
|
export async function providerAuthHeaders(provider, options = {}) {
|
|
43
|
+
if (provider.type === 'relayed')
|
|
44
|
+
throw new Error('A relayed provider needs a run.');
|
|
43
45
|
if (provider.type === 'andorra') {
|
|
44
46
|
assertProviderCredentials(provider);
|
|
45
47
|
const token = await andorraAccessToken(options.signal);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import type { SessionCheckout } from '../task-checkout.js';
|
|
1
2
|
export declare const APP_SERVER_PROTOCOL_VERSION = 2;
|
|
2
|
-
export declare const APP_SERVER_CAPABILITIES: readonly ["run.start.runPermissions", "automations", "providers.models", "providers.test", "providers.test.model", "providers.streamIdleTimeout", "providers.modelContextWindows", "providers.name", "providers.claude", "providers.claudeAuth", "providers.grok", "providers.google", "providers.opencode", "providers.auth.submit", "providers.opencodeGo", "providers.discover.draft", "providers.detectSignIns", "providers.codexAuth", "providers.codexAuth.logout", "providers.codexAccounts", "providers.anthropicConsole", "run.resume.direction", "run.resume.model", "run.resume.compact", "run.steer", "run.overrideAllNodes", "run.setModel", "run.setModel.node", "run.setPermissions", "run.start.continueSession", "run.start.entryHistory", "remote.owner.projects", "remote.
|
|
3
|
+
export declare const APP_SERVER_CAPABILITIES: readonly ["run.start.runPermissions", "model.relay", "automations", "providers.models", "providers.test", "providers.test.model", "providers.thinkingLevels", "providers.streamIdleTimeout", "providers.modelContextWindows", "providers.textOnlyModels", "providers.name", "providers.claude", "providers.claudeAuth", "providers.grok", "providers.google", "providers.opencode", "providers.auth.submit", "providers.opencodeGo", "providers.discover.draft", "providers.detectSignIns", "providers.codexAuth", "providers.codexAuth.logout", "providers.codexAccounts", "providers.anthropicConsole", "run.resume.direction", "run.resume.model", "run.resume.compact", "run.steer", "run.overrideAllNodes", "run.setModel", "run.setModel.node", "run.setPermissions", "run.start.continueSession", "run.start.entryHistory", "remote.owner.projects", "remote.engine.relay", "environments.bridge", "environments.cloud", "extensions.manage", "extensions.resources", "skills.invoke", "mcp.manage", "mcp.edit", "mcp.status", "runs.files", "sessions.files", "account.profile", "sessions.stats", "sessions.usage", "sessions.usage.hourly", "config.analytics", "config.analytics.planGate", "sessions.trajectory", "config.externalSubagent", "config.codeIntel", "config.decisions", "browser.view", "attachments.read", "config.general", "sessions.pullRequest", "sessions.pullRequest.details", "sessions.pullRequest.review", "sessions.pullRequest.review.teams", "sessions.pullRequest.merge", "sessions.pullRequest.create", "sessions.pullRequest.conversation", "sessions.pullRequest.suggestions", "sessions.pullRequest.checkLogs", "sessions.pullRequest.edit", "sessions.pullRequest.mergeQueue", "sessions.pullRequest.merge.bypass", "sessions.pullRequest.create.fork", "sessions.pullRequest.attach", "pullRequests.reviewRequests", "issues.list", "browser.view.go", "config.browser", "config.webSearch", "background.tasks", "workspace.warm", "browser.cookies.firefox", "browser.extensions", "sessions.compact", "sessions.goal", "sessions.changes", "run.current", "sessions.jev", "providers.andorra", "graphs.visibility", "github.app", "github.app.agentWrites", "github.app.triggers", "github.app.reviews", "github.app.repositories", "sessions.pin", "workspace.files", "workspace.search", "workspace.linkBase", "workspace.write", "sessions.changes.authors", "run.note", "workspace.image", "workspace.taskCheckout", "sessions.review"];
|
|
4
|
+
/** Remote engine events about the engine version a desktop runs, sent to every connection of that version. */
|
|
5
|
+
export declare const REMOTE_ENGINE_INSTALLING_EVENT = "remote.engine.installing";
|
|
6
|
+
export declare const REMOTE_ENGINE_READY_EVENT = "remote.engine.ready";
|
|
7
|
+
export declare const REMOTE_ENGINE_INSTALL_FAILED_EVENT = "remote.engine.install-failed";
|
|
3
8
|
export interface AppServerRequest {
|
|
4
9
|
id: number | string;
|
|
5
10
|
method: string;
|
|
@@ -33,7 +38,7 @@ export interface AppServerHostInfo {
|
|
|
33
38
|
running?: boolean;
|
|
34
39
|
capabilities: readonly string[];
|
|
35
40
|
}
|
|
36
|
-
export type AppServerErrorCode = 'invalid-request' | 'unknown-method' | 'invalid-params' | 'busy' | 'engine-busy' | 'not-found' | 'login-required' | 'auth' | 'storage' | 'network' | 'cancelled' | 'internal' | 'remote' | 'nothing-to-continue';
|
|
41
|
+
export type AppServerErrorCode = 'invalid-request' | 'unknown-method' | 'invalid-params' | 'busy' | 'engine-busy' | 'not-found' | 'login-required' | 'auth' | 'storage' | 'network' | 'cancelled' | 'internal' | 'remote' | 'nothing-to-continue' | 'forbidden' | 'checkout-missing';
|
|
37
42
|
export type AppServerPermissionMode = 'read-only' | 'plan' | 'ask-for-approval' | 'approve-for-me' | 'full-access';
|
|
38
43
|
export interface AppServerProviderAuth {
|
|
39
44
|
state: 'signedOut' | 'starting' | 'waiting' | 'signedIn' | 'cancelled' | 'error';
|
|
@@ -67,7 +72,7 @@ export interface AppServerProviderAuth {
|
|
|
67
72
|
}
|
|
68
73
|
export interface AppServerProvider {
|
|
69
74
|
id: string;
|
|
70
|
-
type: 'openai-compatible' | 'anthropic' | 'codex' | 'claude' | 'opencode-go' | 'grok' | 'opencode' | 'google' | 'andorra';
|
|
75
|
+
type: 'openai-compatible' | 'anthropic' | 'codex' | 'claude' | 'opencode-go' | 'grok' | 'opencode' | 'google' | 'andorra' | 'relayed';
|
|
71
76
|
baseUrl: string;
|
|
72
77
|
model: string;
|
|
73
78
|
apiKeyEnv?: string;
|
|
@@ -241,6 +246,7 @@ export interface AppServerUsageAnalytics {
|
|
|
241
246
|
/** 1 is the rolling last 24 hours, whose `days` rows are UTC hours keyed "YYYY-MM-DDTHH"; otherwise UTC dates. */
|
|
242
247
|
windowDays: number;
|
|
243
248
|
}
|
|
249
|
+
/** `author` marks an added or removed line of a file the person also edited: `user` for theirs, `agent` for the agent's. */
|
|
244
250
|
export interface AppServerFileDiffLine {
|
|
245
251
|
kind: 'context' | 'add' | 'del';
|
|
246
252
|
text: string;
|
|
@@ -248,6 +254,7 @@ export interface AppServerFileDiffLine {
|
|
|
248
254
|
newLine?: number;
|
|
249
255
|
noNewline?: true;
|
|
250
256
|
clipped?: true;
|
|
257
|
+
author?: 'agent' | 'user';
|
|
251
258
|
}
|
|
252
259
|
export interface AppServerFileDiffHunk {
|
|
253
260
|
oldStart: number;
|
|
@@ -276,6 +283,8 @@ export interface AppServerSessionFileChange {
|
|
|
276
283
|
to: 'lf' | 'crlf' | 'mixed';
|
|
277
284
|
};
|
|
278
285
|
changedOnDisk?: true;
|
|
286
|
+
/** Saved from the Files tab: `only` when the person alone changed the file, `also` when the agent changed it too. */
|
|
287
|
+
editedByUser?: 'only' | 'also';
|
|
279
288
|
undoable: boolean;
|
|
280
289
|
version: number;
|
|
281
290
|
firstChangedAt: string;
|
|
@@ -287,10 +296,12 @@ export interface AppServerSessionChanges {
|
|
|
287
296
|
revision: number;
|
|
288
297
|
changes: AppServerSessionFileChange[];
|
|
289
298
|
}
|
|
299
|
+
/** `userLines`, on a `user-edited` conflict, are the person's lines in the file now, as inclusive ranges. */
|
|
290
300
|
export interface AppServerSessionChangeConflict {
|
|
291
301
|
path: string;
|
|
292
|
-
reason: 'changed-on-disk' | 'no-baseline';
|
|
302
|
+
reason: 'changed-on-disk' | 'no-baseline' | 'user-edited';
|
|
293
303
|
message: string;
|
|
304
|
+
userLines?: [number, number][];
|
|
294
305
|
}
|
|
295
306
|
export interface AppServerSessionChangesKept extends AppServerSessionChanges {
|
|
296
307
|
kept: string[];
|
|
@@ -313,7 +324,18 @@ export interface AppServerSessionSummary {
|
|
|
313
324
|
turns: number;
|
|
314
325
|
lastTask?: string;
|
|
315
326
|
archived?: boolean;
|
|
327
|
+
pinned?: boolean;
|
|
316
328
|
jevEnabled?: boolean;
|
|
329
|
+
/** Where the task works: its own worktree, or the project folder. */
|
|
330
|
+
checkout?: SessionCheckout;
|
|
331
|
+
/** The newest completed turn waiting for review in Needs you, and when it was marked reviewed. */
|
|
332
|
+
review?: {
|
|
333
|
+
runId: string;
|
|
334
|
+
finishedAt: string;
|
|
335
|
+
reviewedAt?: string;
|
|
336
|
+
headline?: string;
|
|
337
|
+
unverified?: string[];
|
|
338
|
+
};
|
|
317
339
|
lastTurnStatus?: AppServerTurnStatus;
|
|
318
340
|
timers?: AppServerTimerState[];
|
|
319
341
|
usage: {
|
|
@@ -360,22 +382,26 @@ export interface AppServerGraphSummary {
|
|
|
360
382
|
locked?: boolean;
|
|
361
383
|
updatedAt?: string;
|
|
362
384
|
}
|
|
385
|
+
/** `ignored`: Git ignores the entry, or it sits inside a folder Git ignores. Absent outside a repository or when Git could not say. */
|
|
363
386
|
export interface AppServerTreeEntry {
|
|
364
387
|
name: string;
|
|
365
388
|
path: string;
|
|
366
389
|
type: 'file' | 'directory';
|
|
367
390
|
size?: number;
|
|
391
|
+
ignored?: boolean;
|
|
368
392
|
}
|
|
369
393
|
export interface AppServerGitFile {
|
|
370
394
|
path: string;
|
|
371
395
|
index: string;
|
|
372
396
|
worktree: string;
|
|
373
397
|
}
|
|
398
|
+
/** `prefix`: where the project folder sits in its repository (`app/`), when it is not the repository's top; `files` are named from the top. */
|
|
374
399
|
export interface AppServerGitStatus {
|
|
375
400
|
repository: boolean;
|
|
376
401
|
branch?: string;
|
|
377
402
|
files: AppServerGitFile[];
|
|
378
403
|
truncated?: boolean;
|
|
404
|
+
prefix?: string;
|
|
379
405
|
}
|
|
380
406
|
export interface AppServerBranchList {
|
|
381
407
|
repository: boolean;
|
|
@@ -398,51 +424,11 @@ export interface AppServerBundle {
|
|
|
398
424
|
relativePath?: string;
|
|
399
425
|
command?: string;
|
|
400
426
|
}
|
|
401
|
-
export type AppServerRemoteTransport = 'https' | 'http';
|
|
402
427
|
export interface AppServerProject {
|
|
403
428
|
path: string;
|
|
404
429
|
name?: string;
|
|
405
430
|
addedAt: string;
|
|
406
431
|
}
|
|
407
|
-
export interface AppServerRemoteHostingStatus {
|
|
408
|
-
serving: boolean;
|
|
409
|
-
port: number;
|
|
410
|
-
transport: AppServerRemoteTransport;
|
|
411
|
-
hostname: string;
|
|
412
|
-
fingerprint: string;
|
|
413
|
-
code: string | null;
|
|
414
|
-
invitationExpiresAt: string | null;
|
|
415
|
-
invitationGrant?: 'browse' | 'full';
|
|
416
|
-
devices: {
|
|
417
|
-
id: string;
|
|
418
|
-
label?: string;
|
|
419
|
-
addedAt: string;
|
|
420
|
-
lastSeenAt?: string;
|
|
421
|
-
grant?: 'browse' | 'full';
|
|
422
|
-
}[];
|
|
423
|
-
shares: {
|
|
424
|
-
id: string;
|
|
425
|
-
path: string;
|
|
426
|
-
label?: string;
|
|
427
|
-
}[];
|
|
428
|
-
}
|
|
429
|
-
export interface AppServerRemoteWorkspace {
|
|
430
|
-
id: string;
|
|
431
|
-
nickname: string;
|
|
432
|
-
host: string;
|
|
433
|
-
hosts: string[];
|
|
434
|
-
port: number;
|
|
435
|
-
transport: AppServerRemoteTransport;
|
|
436
|
-
fingerprint: string;
|
|
437
|
-
hostname?: string;
|
|
438
|
-
platform?: string;
|
|
439
|
-
version?: string;
|
|
440
|
-
addedAt: string;
|
|
441
|
-
status: 'online' | 'offline' | 'identity-changed' | 'unauthorized' | 'unknown';
|
|
442
|
-
grant?: 'browse' | 'full';
|
|
443
|
-
relay?: boolean;
|
|
444
|
-
statusDetail?: string;
|
|
445
|
-
}
|
|
446
432
|
export interface AppServerRemoteProject {
|
|
447
433
|
rootId: string;
|
|
448
434
|
name: string;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export const APP_SERVER_PROTOCOL_VERSION = 2;
|
|
2
|
-
export const APP_SERVER_CAPABILITIES = ['run.start.runPermissions', 'automations', 'providers.models', 'providers.test', 'providers.test.model', 'providers.streamIdleTimeout', 'providers.modelContextWindows', 'providers.name', 'providers.claude', 'providers.claudeAuth', 'providers.grok', 'providers.google', 'providers.opencode', 'providers.auth.submit', 'providers.opencodeGo', 'providers.discover.draft', 'providers.detectSignIns', 'providers.codexAuth', 'providers.codexAuth.logout', 'providers.codexAccounts', 'providers.anthropicConsole', 'run.resume.direction', 'run.resume.model', 'run.resume.compact', 'run.steer', 'run.overrideAllNodes', 'run.setModel', 'run.setModel.node', 'run.setPermissions', 'run.start.continueSession', 'run.start.entryHistory', 'remote.owner.projects', 'remote.
|
|
2
|
+
export const APP_SERVER_CAPABILITIES = ['run.start.runPermissions', 'model.relay', 'automations', 'providers.models', 'providers.test', 'providers.test.model', 'providers.thinkingLevels', 'providers.streamIdleTimeout', 'providers.modelContextWindows', 'providers.textOnlyModels', 'providers.name', 'providers.claude', 'providers.claudeAuth', 'providers.grok', 'providers.google', 'providers.opencode', 'providers.auth.submit', 'providers.opencodeGo', 'providers.discover.draft', 'providers.detectSignIns', 'providers.codexAuth', 'providers.codexAuth.logout', 'providers.codexAccounts', 'providers.anthropicConsole', 'run.resume.direction', 'run.resume.model', 'run.resume.compact', 'run.steer', 'run.overrideAllNodes', 'run.setModel', 'run.setModel.node', 'run.setPermissions', 'run.start.continueSession', 'run.start.entryHistory', 'remote.owner.projects', 'remote.engine.relay', 'environments.bridge', 'environments.cloud', 'extensions.manage', 'extensions.resources', 'skills.invoke', 'mcp.manage', 'mcp.edit', 'mcp.status', 'runs.files', 'sessions.files', 'account.profile', 'sessions.stats', 'sessions.usage', 'sessions.usage.hourly', 'config.analytics', 'config.analytics.planGate', 'sessions.trajectory', 'config.externalSubagent', 'config.codeIntel', 'config.decisions', 'browser.view', 'attachments.read', 'config.general', 'sessions.pullRequest', 'sessions.pullRequest.details', 'sessions.pullRequest.review', 'sessions.pullRequest.review.teams', 'sessions.pullRequest.merge', 'sessions.pullRequest.create', 'sessions.pullRequest.conversation', 'sessions.pullRequest.suggestions', 'sessions.pullRequest.checkLogs', 'sessions.pullRequest.edit', 'sessions.pullRequest.mergeQueue', 'sessions.pullRequest.merge.bypass', 'sessions.pullRequest.create.fork', 'sessions.pullRequest.attach', 'pullRequests.reviewRequests', 'issues.list', 'browser.view.go', 'config.browser', 'config.webSearch', 'background.tasks', 'workspace.warm', 'browser.cookies.firefox', 'browser.extensions', 'sessions.compact', 'sessions.goal', 'sessions.changes', 'run.current', 'sessions.jev', 'providers.andorra', 'graphs.visibility', 'github.app', 'github.app.agentWrites', 'github.app.triggers', 'github.app.reviews', 'github.app.repositories', 'sessions.pin', 'workspace.files', 'workspace.search', 'workspace.linkBase', 'workspace.write', 'sessions.changes.authors', 'run.note', 'workspace.image', 'workspace.taskCheckout', 'sessions.review'];
|
|
3
|
+
/** Remote engine events about the engine version a desktop runs, sent to every connection of that version. */
|
|
4
|
+
export const REMOTE_ENGINE_INSTALLING_EVENT = 'remote.engine.installing';
|
|
5
|
+
export const REMOTE_ENGINE_READY_EVENT = 'remote.engine.ready';
|
|
6
|
+
export const REMOTE_ENGINE_INSTALL_FAILED_EVENT = 'remote.engine.install-failed';
|
|
@@ -11,11 +11,45 @@ export declare function readTree(root: string, options?: {
|
|
|
11
11
|
entries: AppServerTreeEntry[];
|
|
12
12
|
truncated: boolean;
|
|
13
13
|
}>;
|
|
14
|
+
/**
|
|
15
|
+
* A project file's text, capped at 512 KB. A whole text file also carries `hash`, the SHA-256 of its bytes, which
|
|
16
|
+
* `workspace.write` checks before it saves; `notUtf8` marks one whose bytes are not UTF-8, so saving the decoded text
|
|
17
|
+
* would change them.
|
|
18
|
+
*/
|
|
14
19
|
export declare function readWorkspaceFile(root: string, name: unknown): Promise<{
|
|
15
20
|
content: string;
|
|
16
21
|
truncated: boolean;
|
|
17
22
|
binary: boolean;
|
|
18
23
|
size: number;
|
|
24
|
+
hash?: string;
|
|
25
|
+
notUtf8?: true;
|
|
26
|
+
}>;
|
|
27
|
+
/** The largest image the Files tab previews; a larger one keeps the binary note. */
|
|
28
|
+
export declare const MAX_IMAGE_BYTES: number;
|
|
29
|
+
export declare function imageTypeOf(path: string): string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* A project image's bytes, base64, for the Files tab's preview (`workspace.image`). `tooLarge` past 10 MB, with no
|
|
32
|
+
* bytes. The type comes from the extension only: the desktop draws it in an <img>, which never runs an SVG's script.
|
|
33
|
+
*/
|
|
34
|
+
export declare function readWorkspaceImage(root: string, name: unknown): Promise<{
|
|
35
|
+
mimeType: string;
|
|
36
|
+
size: number;
|
|
37
|
+
dataBase64?: string;
|
|
38
|
+
tooLarge?: true;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function globMatches(path: string, glob: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* A glob list's problems ripgrep would refuse, said before a search: an unclosed `{`, or so many alternatives or
|
|
43
|
+
* `**` that matching could take seconds.
|
|
44
|
+
*/
|
|
45
|
+
export declare function globProblem(glob: string): string | undefined;
|
|
46
|
+
/** The most a save from the Files tab may write. */
|
|
47
|
+
export declare const MAX_WRITE_BYTES: number;
|
|
48
|
+
/** `workspace.write`'s checked parameters: the file, as a project-relative path with `/`, and the bytes to save. */
|
|
49
|
+
export declare function writeTarget(root: string, params: Record<string, unknown>): Promise<{
|
|
50
|
+
relative: string;
|
|
51
|
+
bytes: Buffer;
|
|
52
|
+
expectedHash: string;
|
|
19
53
|
}>;
|
|
20
54
|
export declare function gitStatus(root: string, options?: {
|
|
21
55
|
maxBytes?: number;
|
|
@@ -87,3 +121,77 @@ export declare function listExtensions(config: Config, signal?: AbortSignal, dir
|
|
|
87
121
|
}[];
|
|
88
122
|
notices: string[];
|
|
89
123
|
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Every file in the project for quick open, `/`-separated and relative to `root`, capped at 50,000. `.git` and
|
|
126
|
+
* `.andorracode` are skipped, `node_modules` is not walked into (as the tree), symbolic links are not followed, and
|
|
127
|
+
* files Git ignores are marked.
|
|
128
|
+
*/
|
|
129
|
+
export declare function listWorkspaceFiles(root: string): Promise<{
|
|
130
|
+
files: {
|
|
131
|
+
path: string;
|
|
132
|
+
ignored?: true;
|
|
133
|
+
}[];
|
|
134
|
+
truncated: boolean;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const SEARCH_MAX_FILES = 200;
|
|
137
|
+
export declare const SEARCH_MAX_MATCHES = 2000;
|
|
138
|
+
export interface WorkspaceSearchOptions {
|
|
139
|
+
query: string;
|
|
140
|
+
regex?: boolean;
|
|
141
|
+
caseSensitive?: boolean;
|
|
142
|
+
wholeWord?: boolean;
|
|
143
|
+
/** Comma-separated globs a file must match (any), and must not match (none). */
|
|
144
|
+
include?: string;
|
|
145
|
+
exclude?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface WorkspaceSearchMatch {
|
|
148
|
+
line: number;
|
|
149
|
+
text: string;
|
|
150
|
+
ranges: {
|
|
151
|
+
start: number;
|
|
152
|
+
end: number;
|
|
153
|
+
}[];
|
|
154
|
+
}
|
|
155
|
+
export interface WorkspaceSearchResult {
|
|
156
|
+
files: {
|
|
157
|
+
path: string;
|
|
158
|
+
matches: WorkspaceSearchMatch[];
|
|
159
|
+
}[];
|
|
160
|
+
matchCount: number;
|
|
161
|
+
/** Why the results stop short of every match, when they do. */
|
|
162
|
+
incomplete?: string;
|
|
163
|
+
engine: 'ripgrep' | 'built-in';
|
|
164
|
+
}
|
|
165
|
+
/** Comma-separated globs; a comma inside `{…}` or `[…]` belongs to its glob (`*.{ts,tsx}`). */
|
|
166
|
+
export declare function globList(value: unknown): string[];
|
|
167
|
+
export declare function searchOptions(params: Record<string, unknown>): WorkspaceSearchOptions;
|
|
168
|
+
/**
|
|
169
|
+
* Ripgrep's byte offsets (ordered) as string offsets, walking the line once; a plain ASCII line needs no walk. A
|
|
170
|
+
* minified line of a megabyte with thousands of matches stays linear.
|
|
171
|
+
*/
|
|
172
|
+
export declare function charRanges(text: string, submatches: readonly {
|
|
173
|
+
start: number;
|
|
174
|
+
end: number;
|
|
175
|
+
}[]): {
|
|
176
|
+
start: number;
|
|
177
|
+
end: number;
|
|
178
|
+
}[];
|
|
179
|
+
/**
|
|
180
|
+
* Searches the project's files for `options.query`, with ripgrep when it is installed (it skips what Git ignores) and
|
|
181
|
+
* a built-in scan otherwise. Results stop at 200 files, 2,000 matches or 10 seconds, and say so (`incomplete`).
|
|
182
|
+
*/
|
|
183
|
+
export declare function searchWorkspace(root: string, options: WorkspaceSearchOptions, signal?: AbortSignal, rg?: string | null): Promise<WorkspaceSearchResult>;
|
|
184
|
+
/** A GitHub remote URL (https, ssh or git@) as its web address, or undefined for any other host. */
|
|
185
|
+
export declare function githubWebUrl(remote: string): string | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* What a GitHub link to lines needs: the repository's web address, the commit checked out, whether that commit is on
|
|
188
|
+
* a remote branch (so the link resolves), and where the project sits in the repository. Fields are left out where Git
|
|
189
|
+
* cannot say.
|
|
190
|
+
*/
|
|
191
|
+
export declare function gitLinkBase(root: string): Promise<{
|
|
192
|
+
repository: boolean;
|
|
193
|
+
webUrl?: string;
|
|
194
|
+
head?: string;
|
|
195
|
+
pushed?: boolean;
|
|
196
|
+
prefix?: string;
|
|
197
|
+
}>;
|