@andorra-labs/code 0.1.15 → 0.1.17
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-definitions.js +29 -6
- package/dist/src/agent-execution.js +15 -10
- package/dist/src/agent-mcp-catalog.js +1 -0
- package/dist/src/agent-mcp.d.ts +4 -1
- package/dist/src/agent-mcp.js +46 -10
- package/dist/src/andorra/entry.d.ts +10 -0
- package/dist/src/andorra/entry.js +18 -4
- 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 +22 -44
- package/dist/src/app-server/protocol.js +5 -1
- package/dist/src/app-server/workspace.d.ts +89 -0
- package/dist/src/app-server/workspace.js +457 -11
- package/dist/src/app-server.d.ts +465 -32
- package/dist/src/app-server.js +3308 -517
- package/dist/src/auth/deployment.js +2 -2
- 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 +347 -0
- package/dist/src/bridge/control.d.ts +68 -0
- package/dist/src/bridge/control.js +233 -0
- package/dist/src/bridge/engines.d.ts +90 -0
- package/dist/src/bridge/engines.js +601 -0
- package/dist/src/bridge/host-ops.d.ts +9 -0
- package/dist/src/bridge/host-ops.js +129 -0
- package/dist/src/bridge/host.d.ts +47 -0
- package/dist/src/bridge/host.js +540 -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-runner.js +1 -0
- package/dist/src/browser-server.js +7 -1
- package/dist/src/browser-ui/style.css +3 -3
- package/dist/src/browser-ui/tokens.css +28 -17
- package/dist/src/change-authors.d.ts +41 -0
- package/dist/src/change-authors.js +146 -0
- package/dist/src/claude-provider.js +3 -1
- package/dist/src/cli.js +202 -38
- package/dist/src/codex-errors.js +4 -1
- package/dist/src/coding-tools.js +15 -15
- package/dist/src/command-screens.d.ts +6 -0
- package/dist/src/command-screens.js +19 -14
- package/dist/src/commands.d.ts +14 -1
- package/dist/src/compaction-phrases.d.ts +4 -0
- package/dist/src/compaction-phrases.js +20 -0
- package/dist/src/completion.js +82 -5
- package/dist/src/config.d.ts +71 -3
- package/dist/src/config.js +202 -77
- package/dist/src/context-compaction.js +2 -1
- package/dist/src/deadline.js +13 -1
- package/dist/src/decision/DecisionManager.js +3 -2
- package/dist/src/decision/checks.js +1 -1
- package/dist/src/decision/requestPhrases.d.ts +4 -0
- package/dist/src/decision/requestPhrases.js +22 -0
- package/dist/src/default-graph.js +1 -1
- 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 +349 -0
- package/dist/src/github-app/client.js +810 -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-inbox.d.ts +55 -0
- package/dist/src/github-inbox.js +153 -0
- package/dist/src/github-names.d.ts +8 -0
- package/dist/src/github-names.js +8 -0
- package/dist/src/glob-search.d.ts +61 -0
- package/dist/src/glob-search.js +180 -0
- package/dist/src/graph-health.js +13 -4
- package/dist/src/graph-manager-chat.js +1 -1
- package/dist/src/graph-preview.d.ts +46 -0
- package/dist/src/graph-preview.js +55 -0
- package/dist/src/graph-provider-portability.js +34 -11
- package/dist/src/graph-quota.d.ts +29 -2
- package/dist/src/graph-quota.js +68 -10
- package/dist/src/graph-runner.js +88 -10
- package/dist/src/graph-server.d.ts +1 -1
- package/dist/src/graph-server.js +11 -9
- package/dist/src/graph-sync.js +3 -3
- package/dist/src/graph-ui/app.js +201 -40
- package/dist/src/graph-ui/controls.css +1 -0
- package/dist/src/graph-ui/embed.js +2 -2
- package/dist/src/graph-ui/icons.js +3 -1
- package/dist/src/graph-ui/index.html +1 -1
- package/dist/src/graph-ui/manager.css +1 -1
- package/dist/src/graph-ui/manager.js +2 -2
- package/dist/src/graph-ui/sidebar.js +30 -0
- package/dist/src/graph-ui/studio-canvas.js +26 -13
- package/dist/src/graph-ui/studio.css +15 -7
- package/dist/src/graph-ui/studio.js +26 -5
- package/dist/src/graph-ui/style.css +77 -45
- package/dist/src/graph-ui/theme.js +3 -36
- package/dist/src/graph-ui/tokens.css +28 -20
- package/dist/src/graphs.d.ts +34 -1
- package/dist/src/graphs.js +162 -17
- package/dist/src/image-input.d.ts +16 -0
- package/dist/src/image-input.js +41 -0
- package/dist/src/membership.d.ts +30 -1
- package/dist/src/membership.js +48 -8
- package/dist/src/model-health-cache.js +1 -1
- package/dist/src/model-metadata.d.ts +7 -1
- package/dist/src/model-metadata.js +39 -17
- 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/plan-pass.d.ts +59 -0
- package/dist/src/plan-pass.js +165 -0
- package/dist/src/project-registry.d.ts +21 -0
- package/dist/src/project-registry.js +74 -0
- package/dist/src/provider-engine.js +3 -0
- package/dist/src/provider-import.d.ts +0 -12
- package/dist/src/provider-import.js +7 -195
- package/dist/src/providers.d.ts +40 -2
- package/dist/src/providers.js +93 -23
- package/dist/src/pull-request-checks.d.ts +26 -0
- package/dist/src/pull-request-checks.js +56 -0
- package/dist/src/pull-request-conversation.d.ts +134 -0
- package/dist/src/pull-request-conversation.js +221 -0
- package/dist/src/pull-request-create.d.ts +175 -0
- package/dist/src/pull-request-create.js +392 -0
- package/dist/src/pull-request-details.d.ts +242 -0
- package/dist/src/pull-request-details.js +614 -0
- package/dist/src/pull-request-edit.d.ts +23 -0
- package/dist/src/pull-request-edit.js +91 -0
- package/dist/src/pull-request-logs.d.ts +87 -0
- package/dist/src/pull-request-logs.js +183 -0
- package/dist/src/pull-request-merge.d.ts +112 -0
- package/dist/src/pull-request-merge.js +258 -0
- package/dist/src/pull-request-review.d.ts +137 -0
- package/dist/src/pull-request-review.js +401 -0
- package/dist/src/pull-requests.d.ts +369 -8
- package/dist/src/pull-requests.js +524 -55
- package/dist/src/react-runtime.js +38 -5
- package/dist/src/remote/engine-pool.d.ts +88 -4
- package/dist/src/remote/engine-pool.js +379 -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 +17 -0
- package/dist/src/run-control.js +47 -0
- package/dist/src/run-progress.d.ts +10 -0
- package/dist/src/run-progress.js +122 -0
- package/dist/src/run-records.d.ts +7 -2
- package/dist/src/run-records.js +71 -6
- package/dist/src/runtime.d.ts +9 -1
- package/dist/src/runtime.js +24 -4
- 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 +11 -1
- package/dist/src/sessions.js +17 -4
- 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 +2 -2
- package/dist/src/skills/runtime-skills.js +1 -1
- package/dist/src/subagent-run.js +1 -0
- package/dist/src/telemetry/capture-core.d.ts +17 -0
- package/dist/src/telemetry/capture-core.js +59 -1
- package/dist/src/telemetry/classify.d.ts +3 -1
- package/dist/src/telemetry/classify.js +37 -0
- package/dist/src/telemetry/emitter.d.ts +17 -0
- package/dist/src/telemetry/emitter.js +76 -5
- package/dist/src/telemetry/schema.d.ts +47 -2
- package/dist/src/telemetry/schema.js +120 -5
- package/dist/src/telemetry/surface.d.ts +3 -1
- package/dist/src/telemetry/surface.js +4 -1
- package/dist/src/telemetry/uploader.d.ts +6 -1
- package/dist/src/telemetry/uploader.js +22 -3
- 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 +7 -0
- package/dist/src/test-edit-guard.js +49 -1
- package/dist/src/timers.d.ts +2 -0
- package/dist/src/tools.js +59 -9
- package/dist/src/transcript.js +8 -2
- package/dist/src/types.d.ts +7 -0
- package/dist/src/usage-analytics.js +18 -10
- 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
package/dist/src/app-server.d.ts
CHANGED
|
@@ -7,17 +7,43 @@ import { OpenCodeSignIn } from './managed-sign-in.js';
|
|
|
7
7
|
import { type SignInProbes } from './sign-in-detection.js';
|
|
8
8
|
import type { CliSignIn } from './cli-sign-in.js';
|
|
9
9
|
import { checkGraphModelHealth } from './graph-health.js';
|
|
10
|
-
import { loadAccessibleGraph } from './membership.js';
|
|
10
|
+
import { loadAccessibleGraph, type Membership } from './membership.js';
|
|
11
11
|
import { type SavedSession } from './sessions.js';
|
|
12
|
+
import { type GitRunner } from './pull-request-create.js';
|
|
12
13
|
import { type GhRunner } from './pull-requests.js';
|
|
13
14
|
import { type Completion, type RunResult } from './runtime.js';
|
|
15
|
+
import { type GitHubAppClient } from './github-app/client.js';
|
|
16
|
+
import { type ReviewLoopDependencies } from './github-app/review-loop.js';
|
|
14
17
|
import { CodeIntelligenceManager } from './code-intelligence/CodeIntelligenceManager.js';
|
|
15
|
-
import {
|
|
18
|
+
import { AppServerError } from './app-server/error.js';
|
|
19
|
+
import { type CloudStatus, type EnvironmentRecord } from './bridge/control.js';
|
|
20
|
+
import { RelayLink } from './bridge/link.js';
|
|
16
21
|
import { type HostedMonitorOptions } from './andorra/monitor.js';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
/** The account calls behind environments.*, each taking the desktop's Andorra access token. */
|
|
23
|
+
export interface EnvironmentControl {
|
|
24
|
+
list(accessToken: string): Promise<EnvironmentRecord[]>;
|
|
25
|
+
claim(accessToken: string, code: string, name: string): Promise<EnvironmentRecord>;
|
|
26
|
+
rename(accessToken: string, id: string, name: string): Promise<EnvironmentRecord>;
|
|
27
|
+
remove(accessToken: string, id: string): Promise<void>;
|
|
28
|
+
cloudGet(accessToken: string): Promise<CloudStatus>;
|
|
29
|
+
cloudStart(accessToken: string, version: string): Promise<CloudStatus>;
|
|
30
|
+
cloudStop(accessToken: string): Promise<CloudStatus>;
|
|
31
|
+
cloudDelete(accessToken: string, environmentId?: string): Promise<CloudStatus>;
|
|
20
32
|
}
|
|
33
|
+
/** What the desktop is told about its Cloud instance. */
|
|
34
|
+
export interface CloudView {
|
|
35
|
+
state: CloudStatus['state'];
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
environmentId?: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
step?: 'machine' | 'bridge';
|
|
40
|
+
deleteAt?: string;
|
|
41
|
+
error?: 'boot_timeout' | 'no_capacity';
|
|
42
|
+
stopReason?: CloudStatus['stopReason'];
|
|
43
|
+
/** True when the instance runs a different version from this engine. */
|
|
44
|
+
outdated: boolean;
|
|
45
|
+
}
|
|
46
|
+
export type RelayLinkPort = Pick<RelayLink, 'open' | 'request' | 'host' | 'close' | 'presence' | 'dispose'>;
|
|
21
47
|
type ManagedSignInService = Pick<CliSignIn, 'start' | 'status' | 'cancel' | 'logout' | 'submitCode' | 'close'>;
|
|
22
48
|
type OpenCodeSignInService = Pick<OpenCodeSignIn, 'start' | 'status' | 'cancel' | 'logout' | 'submitCode' | 'close'>;
|
|
23
49
|
export declare function rekeyProjectExtensions(config: Config, fromKey: string, toKey: string, merged: boolean): Config;
|
|
@@ -33,6 +59,8 @@ export interface AppServerOptions {
|
|
|
33
59
|
modelHealthTtlMs?: number;
|
|
34
60
|
createCodeIntelligence?: typeof CodeIntelligenceManager.create;
|
|
35
61
|
loadGraph?: typeof loadAccessibleGraph;
|
|
62
|
+
/** The clock the model relay's re-announce, claim-silence and away timers use; tests pass a manual one. */
|
|
63
|
+
modelRelayTimers?: typeof globalThis;
|
|
36
64
|
codexAuth?: Pick<CodexAccountAuth, 'start' | 'status' | 'cancel' | 'logout' | 'close'>;
|
|
37
65
|
removeCodexAccount?: typeof removeCodexAccount;
|
|
38
66
|
anthropicAuth?: Pick<AnthropicConsoleAuth, 'start' | 'status' | 'cancel' | 'logout' | 'discard' | 'close'>;
|
|
@@ -44,9 +72,36 @@ export interface AppServerOptions {
|
|
|
44
72
|
};
|
|
45
73
|
signInProbes?: Partial<SignInProbes>;
|
|
46
74
|
gh?: GhRunner;
|
|
75
|
+
/** The git a task's folder answers to, for opening a pull request from it (tests pass a fake). */
|
|
76
|
+
git?: (folder: string) => GitRunner;
|
|
47
77
|
pullRequestPollMs?: number;
|
|
48
78
|
hostedCheck?: HostedMonitorOptions['check'];
|
|
49
79
|
hostedNow?: () => number;
|
|
80
|
+
/** The relay link, account calls and access token behind environments.* and remote.* (tests pass fakes). */
|
|
81
|
+
environments?: {
|
|
82
|
+
relayLink?: () => RelayLinkPort;
|
|
83
|
+
control?: EnvironmentControl;
|
|
84
|
+
accessToken?: () => Promise<string>;
|
|
85
|
+
};
|
|
86
|
+
/** The GitHub App's account routes and the sign-in check behind github.* and the event source (tests pass fakes). */
|
|
87
|
+
/** A review wait's timing, for tests: how often it reads Codex's signals, and how long a head stays quiet before "@codex review". */
|
|
88
|
+
reviewSignals?: {
|
|
89
|
+
intervalMs?: number;
|
|
90
|
+
bumpDelayMs?: number;
|
|
91
|
+
};
|
|
92
|
+
githubApp?: {
|
|
93
|
+
client?: GitHubAppClient;
|
|
94
|
+
signedIn?: (signal?: AbortSignal) => Promise<boolean>;
|
|
95
|
+
subject?: () => Promise<string | undefined>;
|
|
96
|
+
now?: () => number;
|
|
97
|
+
checkNowDelayMs?: number;
|
|
98
|
+
reactionBudgetMs?: number;
|
|
99
|
+
mentionRetryMs?: number[];
|
|
100
|
+
/** The plan read that gates switching the Andorra review loop on (tests answer it without the account service). */
|
|
101
|
+
membership?: (signal?: AbortSignal) => Promise<Membership>;
|
|
102
|
+
/** The review loop's reviewer, worktree, waits and ids (tests run it without a model or a child process). */
|
|
103
|
+
reviewLoop?: Partial<Pick<ReviewLoopDependencies, 'prepareWorkspace' | 'runReviewer' | 'sweep' | 'newRequestId' | 'sleep' | 'now' | 'tickMs' | 'reviewerEnv'>>;
|
|
104
|
+
};
|
|
50
105
|
}
|
|
51
106
|
export declare class AppServer {
|
|
52
107
|
private automationCheck?;
|
|
@@ -72,11 +127,36 @@ export declare class AppServer {
|
|
|
72
127
|
private readonly detectedSignIns;
|
|
73
128
|
private readonly retireCodexAccount;
|
|
74
129
|
private readonly gh;
|
|
130
|
+
private readonly git;
|
|
75
131
|
private readonly pullRequestWatcher;
|
|
132
|
+
private readonly githubClient;
|
|
133
|
+
private readonly githubSignedIn;
|
|
134
|
+
/** The signed-in account's subject, for gating the `github.watch` telemetry on its plan and opt-out. */
|
|
135
|
+
private readonly githubAccount;
|
|
136
|
+
private readonly githubEvents;
|
|
137
|
+
/** "@andorra-code" mentions on a task's PR (phase 3): the access check, the 👀 and the wake. */
|
|
138
|
+
private readonly mentions;
|
|
139
|
+
/** The App's bot login (`bot` from `GET /v1/github`, or `as` from a bot write), for the Auto-fix prompt. */
|
|
140
|
+
private githubBot?;
|
|
141
|
+
private readonly pullRequestReader;
|
|
76
142
|
private readonly sessionChanges;
|
|
77
143
|
private readonly autoFixWakes;
|
|
144
|
+
/** Wakes the PR tab's Fix with Agent armed: delivered as the person's request, not as a timer. */
|
|
145
|
+
private readonly fixWakes;
|
|
146
|
+
/** Wakes a mention of the App's bot on the task's PR armed: delivered as "Mentioned on GitHub", not as a timer. */
|
|
147
|
+
private readonly mentionWakes;
|
|
78
148
|
private readonly reviewWaiters;
|
|
79
149
|
private readonly reviewWaitsStarting;
|
|
150
|
+
/** The Andorra review loop's fixer wakes, beside Auto-fix's: delivered as "Andorra review", routed like Auto-fix's. */
|
|
151
|
+
private readonly reviewWakes;
|
|
152
|
+
/** Each review wait's run, when it started, and the review loop it watches (the one running when it started, or after). */
|
|
153
|
+
private readonly reviewWaitRuns;
|
|
154
|
+
private readonly reviewLoop;
|
|
155
|
+
private readonly githubMembership;
|
|
156
|
+
private readonly reviewSignalMs;
|
|
157
|
+
private readonly reviewBumpDelayMs;
|
|
158
|
+
/** Repositories (lower-case owner/name) where Codex was seen on a recent PR, so the question is asked once. */
|
|
159
|
+
private readonly codexRepositories;
|
|
80
160
|
private readonly graphSync;
|
|
81
161
|
private readonly stopGraphVisibilityWatch;
|
|
82
162
|
private readonly terminals;
|
|
@@ -86,9 +166,39 @@ export declare class AppServer {
|
|
|
86
166
|
private readonly browserViews;
|
|
87
167
|
private readonly browserExtensions;
|
|
88
168
|
private extensionStatus;
|
|
169
|
+
/** The Files tab's search in flight per channel, so a newer query cancels the older one. */
|
|
170
|
+
private readonly workspaceSearches;
|
|
89
171
|
private readonly pending;
|
|
90
172
|
private readonly waiting;
|
|
91
173
|
private readonly panelRelays;
|
|
174
|
+
private readonly modelRelay;
|
|
175
|
+
/** Answers the model calls of relayed runs on linked machines with this computer's providers. */
|
|
176
|
+
private readonly localRelay;
|
|
177
|
+
/** Machines being removed: refused at once, before the config file drops them from `environments.modelRelay`. */
|
|
178
|
+
private readonly modelRelayRevoked;
|
|
179
|
+
/** Machines allowed here whose save to `environments.modelRelay` failed, as `subject\0env`: allowed for this engine's lifetime. */
|
|
180
|
+
private readonly modelRelayUnsaved;
|
|
181
|
+
/** The runs this computer started or resumed on each machine: only their model requests are answered. */
|
|
182
|
+
private readonly modelRelayRuns;
|
|
183
|
+
/** Runs whose record failed to save, as `subject\0env\0runId`: answered for this engine's lifetime, saved again at 30 s. */
|
|
184
|
+
private readonly modelRelayRunsUnsaved;
|
|
185
|
+
/**
|
|
186
|
+
* Allowed machines a fresh account listing did not name, as `subject\0env`, with when that was first seen. Only a
|
|
187
|
+
* machine missing from two fresh listings a refresh apart is forgotten.
|
|
188
|
+
*/
|
|
189
|
+
private readonly modelRelayMissing;
|
|
190
|
+
/** Each provider's resolved context windows for the relay block, by the fields that determine them. */
|
|
191
|
+
private readonly relayWindowsCache;
|
|
192
|
+
/** Reconciliations of the engine's own links in flight; close waits for them. */
|
|
193
|
+
private readonly modelRelayChores;
|
|
194
|
+
/** Machines whose removal is in flight: a run they take meanwhile does not allow them again. */
|
|
195
|
+
private readonly modelRelayRemoving;
|
|
196
|
+
/** This engine's own links to the machines allowed to use this computer's models, apart from the window's. */
|
|
197
|
+
private readonly modelRelayLinks;
|
|
198
|
+
private modelRelayRefresh?;
|
|
199
|
+
private readonly modelRelaySaveRetries;
|
|
200
|
+
/** Bumped by every reconciliation of the engine's links, so only the latest one acts. */
|
|
201
|
+
private modelRelaySync;
|
|
92
202
|
private readonly panelOperations;
|
|
93
203
|
private readonly panelOperationRuns;
|
|
94
204
|
private readonly requests;
|
|
@@ -120,10 +230,17 @@ export declare class AppServer {
|
|
|
120
230
|
private editorTask?;
|
|
121
231
|
private codeIntel?;
|
|
122
232
|
private codeIntelOpening;
|
|
123
|
-
private remoteServe?;
|
|
124
233
|
private readonly engineLinks;
|
|
125
|
-
private readonly
|
|
126
|
-
private
|
|
234
|
+
private readonly environmentOptions;
|
|
235
|
+
private relay?;
|
|
236
|
+
private environmentIds?;
|
|
237
|
+
private environmentIdsLoading?;
|
|
238
|
+
/** The id of the account's Cloud environment, once a list or a Cloud answer has named it. */
|
|
239
|
+
private cloudEnvironmentId?;
|
|
240
|
+
/** The last failed read of the account's list: within ENVIRONMENT_IDS_TTL_MS, reads fail with it without asking again. */
|
|
241
|
+
private environmentIdsFailure?;
|
|
242
|
+
/** Bumped when the account changes, so an answer fetched for the previous account is never cached. */
|
|
243
|
+
private accountGeneration;
|
|
127
244
|
private closed;
|
|
128
245
|
private emitsStopped;
|
|
129
246
|
private readonly hosted;
|
|
@@ -180,6 +297,11 @@ export declare class AppServer {
|
|
|
180
297
|
private skillRead;
|
|
181
298
|
private skillWrite;
|
|
182
299
|
private installExtension;
|
|
300
|
+
/**
|
|
301
|
+
* Whether a task's run is open anywhere on this home. A review loop's reviewer (a hidden session) is not a task: it
|
|
302
|
+
* uses no skill or plugin, so it never holds up an edit or a removal.
|
|
303
|
+
*/
|
|
304
|
+
private taskRunsOpen;
|
|
183
305
|
private removeExtension;
|
|
184
306
|
private setExtensionEnabled;
|
|
185
307
|
private mutateMcp;
|
|
@@ -204,6 +326,14 @@ export declare class AppServer {
|
|
|
204
326
|
private sessionStats;
|
|
205
327
|
private signIn;
|
|
206
328
|
private signOut;
|
|
329
|
+
/** The stored sign-in was rejected and removed: the account is signed out without anyone asking. */
|
|
330
|
+
private accountSignedOut;
|
|
331
|
+
/**
|
|
332
|
+
* The relay socket and every machine link were opened for the signed-in account. When the account changes or
|
|
333
|
+
* signs out they all end: each link with `remote.engine.closed` and `reason` (`login-required` after a sign-out,
|
|
334
|
+
* `account-changed` after a sign-in), and the socket itself, so the next use dials again with the new sign-in.
|
|
335
|
+
*/
|
|
336
|
+
private endAccountLinks;
|
|
207
337
|
/** Signing in or out changes what Andorra offers this account: ask now instead of at the next interval. */
|
|
208
338
|
private checkHostedAfterAccountChange;
|
|
209
339
|
private publishAccount;
|
|
@@ -228,6 +358,8 @@ export declare class AppServer {
|
|
|
228
358
|
private compactSession;
|
|
229
359
|
private saveFinalizedSession;
|
|
230
360
|
private setSessionArchived;
|
|
361
|
+
/** Pins or unpins a task in the rail. The pin is rail-owned like a rename, so this window's own run may be pinned too: the run carries it forward when it saves. */
|
|
362
|
+
private setSessionPinned;
|
|
231
363
|
private deleteSession;
|
|
232
364
|
private startRun;
|
|
233
365
|
private resumeRun;
|
|
@@ -235,6 +367,7 @@ export declare class AppServer {
|
|
|
235
367
|
private assertRunning;
|
|
236
368
|
private prepareRun;
|
|
237
369
|
private graphForRun;
|
|
370
|
+
/** `source`: a relayed run's graph, already read; it is bound to `config` (the run's relayed providers) instead of being loaded. */
|
|
238
371
|
private loadResumeGraph;
|
|
239
372
|
private prepareRunValidated;
|
|
240
373
|
private titleSessionFromPrompt;
|
|
@@ -266,6 +399,15 @@ export declare class AppServer {
|
|
|
266
399
|
private approve;
|
|
267
400
|
private ask;
|
|
268
401
|
private settleApproval;
|
|
402
|
+
/**
|
|
403
|
+
* The adapter a run talks to. A relayed provider's model is on the desktop, so its requests go through the model
|
|
404
|
+
* relay as `runId`'s (the live run's when none is given, read when the request is made).
|
|
405
|
+
*/
|
|
406
|
+
private adapterFor;
|
|
407
|
+
/** The id, run and claimant of a model.relay call; the claimant is the connection the desktop's engine speaks through. */
|
|
408
|
+
private relayCall;
|
|
409
|
+
private relayProgress;
|
|
410
|
+
private relayResult;
|
|
269
411
|
private panelBrowserRelayFor;
|
|
270
412
|
private settlePanelRelay;
|
|
271
413
|
private settleAnswer;
|
|
@@ -285,33 +427,134 @@ export declare class AppServer {
|
|
|
285
427
|
private selectGraph;
|
|
286
428
|
private openEditor;
|
|
287
429
|
private closeEditor;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
private
|
|
291
|
-
private
|
|
292
|
-
private
|
|
293
|
-
private
|
|
294
|
-
private
|
|
295
|
-
private
|
|
296
|
-
private
|
|
297
|
-
private
|
|
298
|
-
private
|
|
299
|
-
private
|
|
300
|
-
|
|
301
|
-
|
|
430
|
+
/** The one relay link this engine uses for every machine, created on first use and disposed in `close`. */
|
|
431
|
+
private relayLink;
|
|
432
|
+
private environmentAccessToken;
|
|
433
|
+
private environmentControl;
|
|
434
|
+
private environmentError;
|
|
435
|
+
private onlineEnvironments;
|
|
436
|
+
private environmentsList;
|
|
437
|
+
private environmentClaim;
|
|
438
|
+
private environmentRename;
|
|
439
|
+
private environmentCloud;
|
|
440
|
+
private cloudView;
|
|
441
|
+
private environmentRemove;
|
|
442
|
+
/**
|
|
443
|
+
* Whether `env` is one of the caller's environments, from the control list cached for 30 s, or the account's Cloud. The relay answers
|
|
444
|
+
* not-found both for a machine whose bridge is away and for one the caller does not own; this tells them apart.
|
|
445
|
+
* 'unknown' when the list could not be read for a reason other than sign-in, which callers treat as offline.
|
|
446
|
+
*/
|
|
447
|
+
private environmentMembership;
|
|
448
|
+
/**
|
|
449
|
+
* The account's environment ids, cached for 30 s. A read that failed is remembered for as long, so callers that run
|
|
450
|
+
* by themselves (answering model requests, retrying links) do not ask the service again on every turn; `fresh`
|
|
451
|
+
* (a person's own action) asks it regardless.
|
|
452
|
+
*/
|
|
453
|
+
private listedEnvironmentIds;
|
|
454
|
+
/** A call for a machine whose link is waiting for it to come back fails now instead of at its deadline. */
|
|
455
|
+
private refuseWhileReconnecting;
|
|
456
|
+
private hostOperation;
|
|
302
457
|
private remoteEngineConnect;
|
|
458
|
+
/** What the machine's `whoami` adds to its host description (grant, capabilities); undefined when it could not be read. */
|
|
459
|
+
private machineIdentity;
|
|
460
|
+
/** A reopen whose `whoami` failed asks again once the link is up, and reports the full host with another `reopened`. */
|
|
461
|
+
private retryMachineIdentity;
|
|
462
|
+
/** Whether `link` is still the one held for `env` in its own map, and not ended. */
|
|
463
|
+
private linkIsCurrent;
|
|
464
|
+
private openEngineLink;
|
|
465
|
+
private emitEngineFrame;
|
|
466
|
+
private engineLinkEnded;
|
|
467
|
+
/** A transient end keeps the link: the desktop keeps its clients and transcript while the engine reopens it. */
|
|
468
|
+
private awaitMachine;
|
|
469
|
+
private retryEngineLink;
|
|
470
|
+
/**
|
|
471
|
+
* Opens `link` again (or, for the engine's own link, the first time); one that fails is retried in 5 s, or for the
|
|
472
|
+
* engine's own link on its backoff.
|
|
473
|
+
*/
|
|
474
|
+
private attemptEngineLink;
|
|
475
|
+
/**
|
|
476
|
+
* Ends `link` for good. The machine's model work stops with it unless the machine is still reachable through its
|
|
477
|
+
* other link; a machine that left the account stops either way.
|
|
478
|
+
*/
|
|
479
|
+
private forgetEngineLink;
|
|
480
|
+
/** Closes `link`. The machine's model work is kept: a new link may replace this one and deliver it. */
|
|
481
|
+
private dropEngineLink;
|
|
303
482
|
private remoteEngineDisconnect;
|
|
304
|
-
|
|
483
|
+
/**
|
|
484
|
+
* Whether a model request from `env` is answered here: allowed here for the signed-in account, not being removed,
|
|
485
|
+
* and on that account's list. Which of its runs are answered is the run store's to say.
|
|
486
|
+
*/
|
|
487
|
+
private modelRelayAnswers;
|
|
488
|
+
/** Whether `subject` started or resumed `runId` on `env` from this computer: recorded, or held in memory after a failed save. */
|
|
489
|
+
private relayRunStartedHere;
|
|
490
|
+
/** Forgets the unsaved runs of `env` (for `subject`, or every account). */
|
|
491
|
+
private forgetUnsavedRuns;
|
|
492
|
+
/**
|
|
493
|
+
* The machines `subject` allowed to use this computer's models: its saved list and any whose save failed, less those
|
|
494
|
+
* removed. Signed out, none.
|
|
495
|
+
*/
|
|
496
|
+
private modelRelayAllowed;
|
|
497
|
+
/** Brings the engine's own links in line with the machines allowed here and on the account's list. */
|
|
498
|
+
private syncModelRelayLinks;
|
|
499
|
+
private reconcileModelRelayLinks;
|
|
500
|
+
/**
|
|
501
|
+
* Drops from `subject`'s entry, and from its recorded runs, the machines no longer on its account's list: those
|
|
502
|
+
* missing from this fresh listing and from one at least a refresh interval earlier. Their links are closed at once by
|
|
503
|
+
* the reconcile; only this forgetting waits. Nothing is written once `stale` says the engine closed or the account changed.
|
|
504
|
+
*/
|
|
505
|
+
private pruneModelRelayList;
|
|
506
|
+
/** Closes the engine's link to a machine that is no longer answered here, and stops its model work. */
|
|
507
|
+
private releaseModelRelayLink;
|
|
508
|
+
private openModelRelayLink;
|
|
509
|
+
private scheduleModelRelayRefresh;
|
|
510
|
+
private stopModelRelayRefresh;
|
|
511
|
+
/** Runs `save` once, MODEL_RELAY_SAVE_RETRY_MS from now; a second failure is logged and left to memory. */
|
|
512
|
+
private retryModelRelaySave;
|
|
305
513
|
private remoteEngineRequest;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
private
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
514
|
+
/**
|
|
515
|
+
* Records the run a relayed start or resume answered with as this computer's on `env` (from the answer's `runId`),
|
|
516
|
+
* lets a request of it that arrived first be taken now, and allows the machine.
|
|
517
|
+
*/
|
|
518
|
+
private adoptRelayedRun;
|
|
519
|
+
/**
|
|
520
|
+
* `params` of a run.start or run.resume for a machine that takes relayed providers, with `relay` added: this
|
|
521
|
+
* computer's providers by id, model, models, context windows and effort only (never an address, a key or a sign-in),
|
|
522
|
+
* and the graph to run when it is one only this computer has. A start always names its graph, so the machine never
|
|
523
|
+
* falls back to one of its own. Undefined when this computer has no provider to offer: the request then goes as it
|
|
524
|
+
* was, and the machine runs it on its own providers if it has any.
|
|
525
|
+
*/
|
|
526
|
+
private withModelRelay;
|
|
527
|
+
/**
|
|
528
|
+
* A run.setModel for a machine that takes relayed providers: a provider of this computer's may be switched only to a
|
|
529
|
+
* model on its list. A provider id this computer does not have is the machine's own and is left to it.
|
|
530
|
+
*/
|
|
531
|
+
private checkRelayedModel;
|
|
532
|
+
/**
|
|
533
|
+
* Each provider as a relay entry, with the effective window of each listed model resolved here within 5 s in all.
|
|
534
|
+
* A provider's windows are reused for 5 minutes while its address and models stay the same.
|
|
535
|
+
*/
|
|
536
|
+
private relayedProviders;
|
|
537
|
+
/** A graph this computer has, loaded under its membership rules; a graph it may not use fails with their message. */
|
|
538
|
+
private desktopGraph;
|
|
539
|
+
/** The graph a relayed run on `env` ran, from the machine's record of it, when it is one this computer has. */
|
|
540
|
+
private relayedResumeGraph;
|
|
541
|
+
/** `graph` with its portable provider ids bound to `providers`; one that cannot be bound is refused as a local start is. */
|
|
542
|
+
private relayBoundGraph;
|
|
543
|
+
/** Lists `env` among the machines `subject` allowed to use this computer's providers, the first time a relayed run starts there. */
|
|
544
|
+
private allowModelRelay;
|
|
545
|
+
/** Withdraws `env`'s permission to use this computer's providers, for every account that allowed it. */
|
|
546
|
+
private forgetModelRelayEnvironment;
|
|
547
|
+
/**
|
|
548
|
+
* Rewrites `environments.modelRelay`, a list per account; `change` answers undefined when there is nothing to change.
|
|
549
|
+
* The list shape from before accounts were told apart is read as empty and replaced.
|
|
550
|
+
*/
|
|
551
|
+
private changeModelRelayList;
|
|
552
|
+
/**
|
|
553
|
+
* A model.relay call to `env`'s engine `engine`. Without `via` it goes through the engine's own link when that is
|
|
554
|
+
* up, else the window's; with `via` only through that link, since the machine takes a claim's later calls only
|
|
555
|
+
* from the connection that claimed. A link that is gone or down answers cancelled or network.
|
|
556
|
+
*/
|
|
557
|
+
private sendModelRelay;
|
|
315
558
|
private remoteRootsList;
|
|
316
559
|
private remoteProjectsFetch;
|
|
317
560
|
private remoteBrowse;
|
|
@@ -332,15 +575,205 @@ export declare class AppServer {
|
|
|
332
575
|
private emitSessionSkills;
|
|
333
576
|
private updateSessionSkill;
|
|
334
577
|
private emitPullRequest;
|
|
578
|
+
/**
|
|
579
|
+
* The end of the review loop a wait watches: the loop running when the wait started, or the first one switched on
|
|
580
|
+
* while it waits. A loop that had already ended before is never answered again.
|
|
581
|
+
*/
|
|
582
|
+
private watchedLoopEnded;
|
|
583
|
+
/** A wait ended: the marker that held the review loop's round for it goes, unless a newer wait wrote its own. */
|
|
584
|
+
private clearReviewWaiting;
|
|
335
585
|
private awaitReview;
|
|
586
|
+
/**
|
|
587
|
+
* One read of Codex's signals on a waiting session's PR; answers how long until the next read.
|
|
588
|
+
*
|
|
589
|
+
* A sign-off on the head commit ends the wait as approved, unless a review comment is still to be handed
|
|
590
|
+
* over: comments come first. Where Codex shows nothing at all for the head (no eyes, no review, no comment,
|
|
591
|
+
* nobody asked yet), the next read comes after the bump delay, and if that one is as quiet the wait posts
|
|
592
|
+
* "@codex review", once per head and only in a repository Codex is known to review.
|
|
593
|
+
*/
|
|
594
|
+
private reviewWaitFromSignals;
|
|
595
|
+
/**
|
|
596
|
+
* One look at the record for a wait, in whichever engine process it runs: how the PR or the review loop ended, the
|
|
597
|
+
* review loop's next round (taken from the record, so a round another process posted reaches this wait), Auto-fix's
|
|
598
|
+
* comments, and the marker that tells the lease holder this run waits.
|
|
599
|
+
*/
|
|
336
600
|
private reviewWaitFromRecord;
|
|
337
601
|
private recordAutoFixDelivered;
|
|
338
602
|
private emitSessionChanges;
|
|
339
603
|
private attachPullRequest;
|
|
604
|
+
/** How many turns a task's history holds, a running turn included, for the review loop's transcript lines. */
|
|
605
|
+
private sessionTurnCount;
|
|
606
|
+
/** The reviewer's model from `reviewModel`: null clears it, undefined leaves it; a provider this engine lacks is refused. */
|
|
607
|
+
private reviewModelChange;
|
|
608
|
+
/** The Andorra review loop's settings on a record (the switch-on checks were made); the gh-backed settings are not here. */
|
|
609
|
+
private applyReviewSettingsTo;
|
|
610
|
+
/** A graph run's Andorra review nodes: rounds on the session's PR through the review loop (design/specs/andorra-review-loop.md, R12). */
|
|
611
|
+
private reviewNodeService;
|
|
612
|
+
/** R18: not on the Free plan, and not while the plan cannot be read. Read outside the PR record's lock (up to 10 s). */
|
|
613
|
+
private checkReviewPlan;
|
|
614
|
+
/**
|
|
615
|
+
* Why the Andorra review loop cannot be switched on for this PR (design/specs/andorra-review-loop.md, R11, R17), if it
|
|
616
|
+
* cannot: the checks on the record as it is now, under its lock. The plan (R18) is read before the lock.
|
|
617
|
+
*/
|
|
618
|
+
private checkReviewSwitchOn;
|
|
619
|
+
/** After a settings write: a switch-off ends the loop's round and wake; anything else is looked at by the loop. */
|
|
620
|
+
private reviewSettingsApplied;
|
|
621
|
+
/** A PR a task's `gh pr create` opened: with `github.app.reviewNewPullRequests`, its review loop starts on. A refusal is logged. */
|
|
622
|
+
private reviewNewPullRequest;
|
|
623
|
+
/** The PR's GitHub App coverage for the review loop: the event source's, or the lease holder's in another process. */
|
|
624
|
+
private reviewCoverage;
|
|
625
|
+
/** Whether a run of the session is open anywhere, leaving out `except`: the run held in await_review. */
|
|
626
|
+
private sessionBusyForReview;
|
|
340
627
|
private updatePullRequest;
|
|
628
|
+
/** With `agentChecked`, the agent's dismiss: the record is removed only while it is still that open PR. */
|
|
341
629
|
private dismissPullRequest;
|
|
630
|
+
/**
|
|
631
|
+
* The agent's own dismiss (the `pull_request` tool). A merged or closed PR stays on the task, where the
|
|
632
|
+
* sidebar and the PR tab show how the work ended; only the person removes that one. GitHub is asked first,
|
|
633
|
+
* because an agent that has just merged calls this before the watcher has recorded the merge.
|
|
634
|
+
*/
|
|
635
|
+
private dismissPullRequestForAgent;
|
|
636
|
+
private githubError;
|
|
637
|
+
/**
|
|
638
|
+
* Settings → GitHub: the account's GitHub connection and installations from the account API, whether this
|
|
639
|
+
* engine is in event mode, and each watched PR's coverage. `not-covered` for a PR this engine reads through
|
|
640
|
+
* gh becomes `not-installed`, with the hint to install the App there: the service never says "not installed".
|
|
641
|
+
*/
|
|
642
|
+
private githubStatus;
|
|
643
|
+
/** Settings → GitHub → "Agent replies on pull requests": `bot` (as the App's bot) or `me` (through gh as the person). Per engine. */
|
|
644
|
+
private githubSetAgentWrites;
|
|
645
|
+
/**
|
|
646
|
+
* Who an agent write on this session's PR goes to first, decided one way for the tool and the Auto-fix prompt:
|
|
647
|
+
* the setting, and the PR's coverage as the event source (or, in another process, the lease holder) last
|
|
648
|
+
* learned it. Events switched off here, or a PR the source has not looked at yet, are not covered.
|
|
649
|
+
*/
|
|
650
|
+
private agentWriteRoute;
|
|
651
|
+
/** The pull_request tool's reply, resolve and comment on the session's tracked PR (design/specs/github-app.md, "Bot replies"). */
|
|
652
|
+
private agentPullRequestWrite;
|
|
653
|
+
/** The App's bot login: `GET /v1/github`'s `bot`, read once (bounded) and kept, or learned from a write's `as`. */
|
|
654
|
+
private githubBotName;
|
|
655
|
+
/** For the Auto-fix prompt: whether this session's replies post as the bot (the tool's own rule), and the bot's name. */
|
|
656
|
+
private autoFixWrites;
|
|
657
|
+
/**
|
|
658
|
+
* For a mention's prompt: who the agent's answer posts as on this session's PR (the pull_request tool's rule),
|
|
659
|
+
* and the bot's login, which also names the mention (`@andorra-code`, `@andorra-code-dev` on staging).
|
|
660
|
+
*/
|
|
661
|
+
private mentionWrites;
|
|
662
|
+
/**
|
|
663
|
+
* Wakes the task for a mention, as Fix with Agent does: into a review wait the agent is in, or as the next
|
|
664
|
+
* turn, shown as "Mentioned on GitHub". Each comment wakes once (`MentionTriggers` keeps the ids).
|
|
665
|
+
*/
|
|
666
|
+
private wakeForMention;
|
|
667
|
+
private githubConnect;
|
|
668
|
+
private githubDisconnect;
|
|
669
|
+
/**
|
|
670
|
+
* The PR tab's read of a task's pull request: branches, author, mergeability, description, commits,
|
|
671
|
+
* checks and reviews, through the account that can read it. Answers come from a short cache (see
|
|
672
|
+
* PullRequestReader); a failed read keeps the last good answer and says why it is not current.
|
|
673
|
+
*/
|
|
674
|
+
private pullRequestDetails;
|
|
675
|
+
private pullRequestFiles;
|
|
676
|
+
private storedPullRequest;
|
|
677
|
+
/**
|
|
678
|
+
* The task's pull request for a write. `url`, when the tab sends it, is the PR the person looked at;
|
|
679
|
+
* a write for a PR the task no longer has is refused rather than applied to its new one.
|
|
680
|
+
*/
|
|
681
|
+
private pullRequestToWrite;
|
|
682
|
+
/** The PR tab's review state: unresolved and resolved threads, which files the person viewed, and who is asked to review. */
|
|
683
|
+
private pullRequestReview;
|
|
684
|
+
/** A write's answer, with the review state read again at once so the tab shows what GitHub now holds. */
|
|
685
|
+
private afterReviewWrite;
|
|
686
|
+
/** Posts a review (comment, approve or request changes) with its line comments, as the account the person confirmed. */
|
|
687
|
+
private submitPullRequestReview;
|
|
688
|
+
/** Replies to a review thread, or resolves or reopens it. */
|
|
689
|
+
private pullRequestThread;
|
|
690
|
+
/** Marks a file viewed or not viewed for the person, as on github.com. Nobody is notified, so the state is not read again. */
|
|
691
|
+
private markPullRequestFileViewed;
|
|
692
|
+
/** Re-runs the failed jobs of GitHub Actions runs behind this PR's failed checks, as read last. */
|
|
693
|
+
private rerunPullRequestChecks;
|
|
694
|
+
/** Asks people to review the PR, or withdraws requests. */
|
|
695
|
+
private requestPullRequestReviewers;
|
|
696
|
+
/** Puts what a merge-side write changed on the stored record at once, so the sidebar and the tab show it; the watcher then confirms it. */
|
|
697
|
+
private recordPullRequestChange;
|
|
698
|
+
/** A merge-side write's answer, with the merge state read again so the tab shows what GitHub now holds. */
|
|
699
|
+
private afterMergeWrite;
|
|
700
|
+
/**
|
|
701
|
+
* Merges the task's PR now, or sets it to merge when ready (GitHub's auto-merge), with the method and
|
|
702
|
+
* commit message the person chose, at the head commit they read. Deleting the head branch afterwards
|
|
703
|
+
* is said separately: the merge has happened even when that fails.
|
|
704
|
+
*/
|
|
705
|
+
private mergeSessionPullRequest;
|
|
706
|
+
/** Brings the PR's branch up to date with its base on GitHub (GitHub's "Update branch"), by a merge commit or a rebase. */
|
|
707
|
+
private updateSessionPullRequestBranch;
|
|
708
|
+
/** Marks a draft ready for review (GitHub then asks its reviewers), or converts the PR back to a draft. */
|
|
709
|
+
private readySessionPullRequest;
|
|
710
|
+
/**
|
|
711
|
+
* What Create Pull Request would open from the task's folder: its branch, commits and repository, the
|
|
712
|
+
* account that can push, and a drafted title and body; or why there is nothing to open (`blocked`).
|
|
713
|
+
*/
|
|
714
|
+
private sessionPullRequestDraft;
|
|
715
|
+
/**
|
|
716
|
+
* Opens a pull request from the task's folder as the account the person confirmed, pushing the branch
|
|
717
|
+
* first when GitHub lacks it, and attaches it to the task (or attaches the one already open for the
|
|
718
|
+
* branch, with `attach`). The watcher then follows it like any other.
|
|
719
|
+
*/
|
|
720
|
+
private createSessionPullRequest;
|
|
721
|
+
/** Where a comment the tab may change sits in the review read: a timeline comment, a review's text, or a comment in a thread. */
|
|
722
|
+
private static commentIn;
|
|
723
|
+
/** Posts a comment on the PR's conversation, or edits or deletes one of the person's comments. */
|
|
724
|
+
private pullRequestComment;
|
|
725
|
+
/** Adds or takes back one of GitHub's reactions on the PR, a comment or a review. Nobody is notified, so it acts at once. */
|
|
726
|
+
private pullRequestReact;
|
|
727
|
+
/**
|
|
728
|
+
* Commits a reviewer's suggestion to the PR's branch on GitHub, as GitHub's "Commit suggestion" does,
|
|
729
|
+
* at the head the person read (GitHub refuses when the file changed since). The task's folder is then
|
|
730
|
+
* brought up to the new commit when it sits on that branch at the old head; otherwise the answer says
|
|
731
|
+
* it is behind.
|
|
732
|
+
*/
|
|
733
|
+
private applyPullRequestSuggestion;
|
|
734
|
+
/**
|
|
735
|
+
* Brings the task's folder up to a commit made on GitHub from the tab, when the folder sits on that
|
|
736
|
+
* branch at the commit before it: a fetch as the confirmed account and a fast-forward, never a merge
|
|
737
|
+
* of anything else. `behind` when it cannot (other commits, or local changes in the way).
|
|
738
|
+
*/
|
|
739
|
+
private catchUpFolder;
|
|
740
|
+
/** An excerpt of a failed GitHub Actions job's log, for a check of this PR's head. */
|
|
741
|
+
private pullRequestCheckLog;
|
|
742
|
+
/**
|
|
743
|
+
* Hands the PR's failed checks to the task's agent ("Fix with Agent"): a prompt naming them and how to
|
|
744
|
+
* read their logs, delivered like a self-wake (into the running turn, or as the next one). The checks
|
|
745
|
+
* come from the engine's own read, never from text the tab sends.
|
|
746
|
+
*/
|
|
747
|
+
private fixPullRequestChecks;
|
|
748
|
+
/** Changes the PR's title, description, labels or assignees, as the account the person confirmed. */
|
|
749
|
+
private editSessionPullRequest;
|
|
750
|
+
/** Closes the PR (with a comment first, when the person wrote one) or reopens it. Its branch stays. */
|
|
751
|
+
private setSessionPullRequestState;
|
|
752
|
+
/** Takes the PR out of its base's merge queue. */
|
|
753
|
+
private dequeueSessionPullRequest;
|
|
754
|
+
/** Attaches a GitHub pull request to a task (Review Requests' "Review in New Task"); the watcher then follows it. */
|
|
755
|
+
private attachSessionPullRequest;
|
|
756
|
+
private reviewRequestsRead;
|
|
757
|
+
/**
|
|
758
|
+
* The open pull requests that ask a signed-in account for its review, each with the task it is attached
|
|
759
|
+
* to, if one. Read at most once a minute (a refresh: every 5 seconds), backed off on a rate limit.
|
|
760
|
+
*/
|
|
761
|
+
private pullRequestReviewRequests;
|
|
762
|
+
/** The open issues of a project folder's GitHub repository (its `origin`), to start a task from one. */
|
|
763
|
+
private listWorkspaceIssues;
|
|
764
|
+
/**
|
|
765
|
+
* Keeps the sidebar's checks mark in step with what the tab just read from GitHub (never a cached
|
|
766
|
+
* answer), and asks the watcher to catch up on a state it has not seen.
|
|
767
|
+
*/
|
|
768
|
+
private syncPullRequestRecord;
|
|
342
769
|
private cancelAutoFixWake;
|
|
343
770
|
private pullRequestControl;
|
|
771
|
+
/**
|
|
772
|
+
* The Andorra review loop's fixer wake: straight into a run of the session waiting in await_review here (which then holds
|
|
773
|
+
* the round), or as the next turn, routed like Auto-fix's to the node that took the PR.
|
|
774
|
+
*/
|
|
775
|
+
private wakeForReview;
|
|
776
|
+
private cancelReviewWake;
|
|
344
777
|
private wakeForPullRequest;
|
|
345
778
|
private emitTimers;
|
|
346
779
|
private settleSessionTimers;
|