@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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type RelayEngines } from '../remote/engine-pool.js';
|
|
2
|
+
export declare const PACKAGE_NAME = "@andorra-labs/code";
|
|
3
|
+
/** The first release that starts engines matching the desktop's version; it is fixed when the feature ships and never follows later releases. */
|
|
4
|
+
export declare const MIN_ENGINE_VERSION = "0.1.16";
|
|
5
|
+
export declare const MAX_ENGINE_VERSIONS = 3;
|
|
6
|
+
export declare const ENGINE_INSTALL_TIMEOUT_MS = 300000;
|
|
7
|
+
/** The exit code with which a host asks the launcher to start it again as the version in next-host-version. */
|
|
8
|
+
export declare const HOST_RESTART_EXIT_CODE = 75;
|
|
9
|
+
export declare const MAX_CONCURRENT_INSTALLS = 2;
|
|
10
|
+
/** Installs that may wait for a slot; a version asked for past that is answered busy, so made-up versions cannot pile up. */
|
|
11
|
+
export declare const MAX_QUEUED_INSTALLS = 8;
|
|
12
|
+
/** How long a failed version is not installed again: connections that open meanwhile are told the failure. */
|
|
13
|
+
export declare const INSTALL_RETRY_COOLDOWN_MS = 60000;
|
|
14
|
+
/** How long close() waits for installs to settle before returning anyway. */
|
|
15
|
+
export declare const STORE_CLOSE_BOUND_MS = 5000;
|
|
16
|
+
/** Why an install failed, as the desktop is told it: never npm's own output. */
|
|
17
|
+
export declare const INSTALL_FAILURES: {
|
|
18
|
+
readonly npm: "npm did not answer.";
|
|
19
|
+
readonly timeout: "the installation took too long.";
|
|
20
|
+
readonly mismatch: "npm installed a different version than asked for.";
|
|
21
|
+
readonly disk: "the disk is full.";
|
|
22
|
+
};
|
|
23
|
+
export type InstallFailure = typeof INSTALL_FAILURES[keyof typeof INSTALL_FAILURES];
|
|
24
|
+
export type EngineStoreErrorCode = 'invalid-params' | 'busy' | 'remote';
|
|
25
|
+
export declare class EngineStoreError extends Error {
|
|
26
|
+
readonly code: EngineStoreErrorCode;
|
|
27
|
+
constructor(code: EngineStoreErrorCode, message: string);
|
|
28
|
+
}
|
|
29
|
+
export type EngineInstallEvent = {
|
|
30
|
+
version: string;
|
|
31
|
+
state: 'installing';
|
|
32
|
+
} | {
|
|
33
|
+
version: string;
|
|
34
|
+
state: 'ready';
|
|
35
|
+
} | {
|
|
36
|
+
version: string;
|
|
37
|
+
state: 'failed';
|
|
38
|
+
reason: InstallFailure;
|
|
39
|
+
};
|
|
40
|
+
export interface EngineStore extends RelayEngines {
|
|
41
|
+
prepare(version: string | undefined): Promise<'started' | 'underway' | 'none' | 'failed'>;
|
|
42
|
+
watch(listener: (event: EngineInstallEvent) => void): () => void;
|
|
43
|
+
installState(version: string): {
|
|
44
|
+
state: 'installing';
|
|
45
|
+
} | {
|
|
46
|
+
state: 'failed';
|
|
47
|
+
reason: InstallFailure;
|
|
48
|
+
} | undefined;
|
|
49
|
+
/** Whether that version is installed and ready to start. */
|
|
50
|
+
installed(version: string): Promise<boolean>;
|
|
51
|
+
/** Installs under way or waiting for a slot in this process. */
|
|
52
|
+
installing(): number;
|
|
53
|
+
/** Names the version the launcher should start as the next host, and records when it was asked for in last-host-request. */
|
|
54
|
+
requestHostVersion(version: string, at: number): Promise<void>;
|
|
55
|
+
/** Takes back a request that was not acted on: removes next-host-version and last-host-request. */
|
|
56
|
+
withdrawHostVersion(): Promise<void>;
|
|
57
|
+
/** The last version a host asked to be restarted as, and when; it survives the restart, which in-memory state does not. */
|
|
58
|
+
lastHostRequest(): Promise<{
|
|
59
|
+
version: string;
|
|
60
|
+
at: number;
|
|
61
|
+
} | undefined>;
|
|
62
|
+
close(): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
/** Schedules `run` after `ms` and returns what cancels it; tests replace the clock with their own. */
|
|
65
|
+
export type Schedule = (run: () => void, ms: number) => () => void;
|
|
66
|
+
export interface EngineStoreOptions {
|
|
67
|
+
/** <Andorra home>/bridge/engines */
|
|
68
|
+
root: string;
|
|
69
|
+
hostVersion: string;
|
|
70
|
+
/** The command that starts this host's own engine. */
|
|
71
|
+
hostCommand?: () => string[];
|
|
72
|
+
/** An npm to run instead of the one beside this Node: a script (.mjs, .cjs, .js) is run with this Node. */
|
|
73
|
+
npm?: string;
|
|
74
|
+
installTimeoutMs?: number;
|
|
75
|
+
schedule?: Schedule;
|
|
76
|
+
/** The clock of the retry cool-down. */
|
|
77
|
+
now?: () => number;
|
|
78
|
+
/** How long an install waits on another process's live lock before giving up as taking too long. */
|
|
79
|
+
lockWaitMs?: number;
|
|
80
|
+
log?: (line: string) => void;
|
|
81
|
+
}
|
|
82
|
+
export declare const validVersion: (text: unknown) => text is string;
|
|
83
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
84
|
+
export declare function engineEntry(root: string, version: string): string;
|
|
85
|
+
export declare function installedVersions(root: string): Promise<string[]>;
|
|
86
|
+
/** Removes the least recently used versions beyond MAX_ENGINE_VERSIONS, never one in `keep`. */
|
|
87
|
+
export declare function pruneEngines(root: string, keep: readonly string[]): Promise<string[]>;
|
|
88
|
+
export declare function createEngineStore(options: EngineStoreOptions): EngineStore;
|
|
89
|
+
/** The store a host uses under the bridge launcher, which names it with ANDORRA_BRIDGE_ENGINES; none otherwise, or when the engine command is overridden. */
|
|
90
|
+
export declare function engineStoreFromEnvironment(env: NodeJS.ProcessEnv, deps: Omit<EngineStoreOptions, 'root' | 'npm'>): EngineStore | undefined;
|