agl 43.3.1 → 43.4.0
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/changelog.md +22 -0
- package/dist_serve/bundle.js +1377 -1375
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/interfaces.d.ts +5 -0
- package/dist_ts/aglapi/interfaces.js +2 -1
- package/dist_ts/classes.authstore.js +5 -2
- package/dist_ts/classes.claudeharness.js +4 -3
- package/dist_ts/classes.codexclientadapter.d.ts +5 -0
- package/dist_ts/classes.codexclientadapter.js +12 -6
- package/dist_ts/classes.controller.d.ts +33 -9
- package/dist_ts/classes.controller.js +173 -113
- package/dist_ts/classes.flexservice.d.ts +12 -1
- package/dist_ts/classes.flexservice.js +44 -13
- package/dist_ts/classes.flexstore.d.ts +20 -0
- package/dist_ts/classes.flexstore.js +30 -1
- package/dist_ts/classes.mcpclient.d.ts +2 -2
- package/dist_ts/classes.mcpclient.js +14 -9
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.opencodeclient.js +20 -4
- package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
- package/dist_ts/driver/functions.driverinstructions.js +2 -1
- package/dist_ts/fleet/classes.deploymodels.d.ts +58 -1
- package/dist_ts/fleet/classes.deploymodels.js +121 -2
- package/dist_ts/fleet/classes.deploymonitor.d.ts +193 -47
- package/dist_ts/fleet/classes.deploymonitor.js +548 -180
- package/dist_ts/fleet/classes.gitfacts.d.ts +4 -1
- package/dist_ts/fleet/classes.gitfacts.js +13 -10
- package/dist_ts/fleet/classes.service.d.ts +2 -0
- package/dist_ts/fleet/classes.service.js +6 -3
- package/dist_ts/fleet/functions.deployprobes.js +21 -2
- package/dist_ts/fleet/functions.deploystatus.d.ts +26 -0
- package/dist_ts/fleet/functions.deploystatus.js +33 -0
- package/dist_ts/fleet/functions.deployvalidation.d.ts +1 -0
- package/dist_ts/fleet/functions.deployvalidation.js +5 -2
- package/dist_ts/functions.deploycli.js +3 -2
- package/dist_ts/functions.deviceapi.d.ts +7 -6
- package/dist_ts/functions.deviceapi.js +13 -5
- package/dist_ts/functions.mcpdeploytools.js +3 -1
- package/dist_ts/functions.promptreply.d.ts +13 -0
- package/dist_ts/functions.promptreply.js +17 -0
- package/dist_ts/interfaces.flexipc.d.ts +17 -9
- package/dist_ts/interfaces.flexipc.js +19 -20
- package/dist_ts_interfaces/deployments.d.ts +38 -6
- package/dist_ts_interfaces/deployments.js +7 -3
- package/dist_ts_interfaces/devices.d.ts +2 -1
- package/dist_ts_interfaces/devices.js +1 -1
- package/dist_ts_interfaces/inbox.d.ts +10 -1
- package/dist_ts_interfaces/inbox.js +1 -1
- package/dist_ts_interfaces/mcprequests.d.ts +1 -1
- package/package.json +5 -5
- package/readme.md +30 -12
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/interfaces.ts +1 -0
- package/ts/classes.authstore.ts +4 -1
- package/ts/classes.claudeharness.ts +3 -2
- package/ts/classes.codexclientadapter.ts +11 -5
- package/ts/classes.controller.ts +188 -128
- package/ts/classes.flexservice.ts +57 -14
- package/ts/classes.flexstore.ts +40 -0
- package/ts/classes.mcpclient.ts +14 -5
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.opencodeclient.ts +23 -3
- package/ts/driver/functions.driverinstructions.ts +1 -0
- package/ts/fleet/classes.deploymodels.ts +113 -1
- package/ts/fleet/classes.deploymonitor.ts +565 -179
- package/ts/fleet/classes.gitfacts.ts +10 -8
- package/ts/fleet/classes.service.ts +7 -1
- package/ts/fleet/functions.deployprobes.ts +16 -1
- package/ts/fleet/functions.deploystatus.ts +56 -0
- package/ts/fleet/functions.deployvalidation.ts +4 -1
- package/ts/functions.deploycli.ts +2 -1
- package/ts/functions.deviceapi.ts +19 -9
- package/ts/functions.mcpdeploytools.ts +2 -0
- package/ts/functions.promptreply.ts +20 -0
- package/ts/interfaces.flexipc.ts +43 -27
- package/ts_interfaces/deployments.ts +39 -6
- package/ts_interfaces/devices.schema.json +1 -1
- package/ts_interfaces/devices.ts +2 -1
- package/ts_interfaces/inbox.ts +8 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements.deployments.ts +20 -4
- package/ts_web/elements.harnesscontrollerapp.ts +43 -13
- package/ts_web/elements.inbox.ts +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IFleetConfiguration, IFleetDiscoverySkip, IFleetRepository } from '../../dist_ts_interfaces/fleet.js';
|
|
2
2
|
import type { IFleetEvent } from '../../dist_ts_interfaces/fleetworkers.js';
|
|
3
3
|
import { type ITicket, type ITicketActor, type ITicketQuestion } from '../../dist_ts_interfaces/tickets.js';
|
|
4
|
-
import type
|
|
4
|
+
import { type IFleetDeployObservation, type IFleetDeployRefreshResult, type IFleetDeployStatus, type IFleetDeployTarget, type IFleetDeployTargetStatus, type IFleetDeployTicketPlacement, type IFleetReleaseStatus } from '../../dist_ts_interfaces/deployments.js';
|
|
5
5
|
import { type TFleetGitRunner } from './functions.releasefacts.js';
|
|
6
6
|
import { type TicketStore } from '../classes.ticketstore.js';
|
|
7
7
|
import type { FleetTicketEffects } from './classes.ticketeffects.js';
|
|
@@ -14,8 +14,14 @@ export declare const deployMonitorDefaults: {
|
|
|
14
14
|
readonly fetchConcurrency: 4;
|
|
15
15
|
/** Probes in a row that must fail before a target is down, so one lost answer is no outage. */
|
|
16
16
|
readonly downAfterFailures: 2;
|
|
17
|
-
/** How long ticket changes gather before the
|
|
17
|
+
/** How long ticket changes gather before the status is computed again: this long after the last change… */
|
|
18
18
|
readonly ticketsSettleMs: 2000;
|
|
19
|
+
/** …and at most this long after the first change that waits, so a steady stream of board changes holds it off no longer. */
|
|
20
|
+
readonly ticketsMaxWaitMs: 10000;
|
|
21
|
+
/** How long a read waits for the first computation while no status is stored (AGL-1704); then it is refused. */
|
|
22
|
+
readonly firstStatusWaitMs: 20000;
|
|
23
|
+
/** The stored status holds at most this much JSON: a computation over it fails, and nothing is cut. */
|
|
24
|
+
readonly contentLimitBytes: number;
|
|
19
25
|
};
|
|
20
26
|
/** The built-in target: the AGL controller this monitor runs in. */
|
|
21
27
|
export declare const deployControllerTargetId = "agl-controller";
|
|
@@ -34,6 +40,8 @@ export declare const closeDeployPlanTicket: (storeArg: Pick<TicketStore, 'applyF
|
|
|
34
40
|
/** History answers at most this many observations. */
|
|
35
41
|
export declare const deployHistoryMaximum = 200;
|
|
36
42
|
export interface IDeployMonitorHost {
|
|
43
|
+
/** The controller whose status the monitor stores: its one document is `<controllerId>:deployments`. */
|
|
44
|
+
controllerId(): string;
|
|
37
45
|
/** The fleet owner and configuration; undefined while the configuration authority is unavailable. */
|
|
38
46
|
scope(): Promise<{
|
|
39
47
|
owner: string;
|
|
@@ -71,7 +79,11 @@ export interface IDeployMonitorHost {
|
|
|
71
79
|
}, textArg: string): Promise<void>;
|
|
72
80
|
/** The tickets whose `undeployed` AutoLabel changed; the board reads them again. */
|
|
73
81
|
undeployedChanged?(ticketKeysArg: string[]): void;
|
|
74
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The stored status's revision moved (what a target runs, its probe, its releases, plans or windows changed), a
|
|
84
|
+
* computation failed or the first success after a failure cleared it, or the window timer saw a maintenance window
|
|
85
|
+
* open or end; the Deployments view reads again.
|
|
86
|
+
*/
|
|
75
87
|
changed?(): void;
|
|
76
88
|
}
|
|
77
89
|
export interface IDeployMonitorOptions {
|
|
@@ -79,20 +91,40 @@ export interface IDeployMonitorOptions {
|
|
|
79
91
|
fetch?: typeof fetch;
|
|
80
92
|
git?: TFleetGitRunner;
|
|
81
93
|
timeoutMs?: number;
|
|
94
|
+
/** How long a read waits for the first computation; `deployMonitorDefaults.firstStatusWaitMs` unless set. */
|
|
95
|
+
firstStatusWaitMs?: number;
|
|
96
|
+
/** How long `refresh` waits for its check; `fleetDeployRefreshWaitMs` unless set. */
|
|
97
|
+
refreshWaitMs?: number;
|
|
82
98
|
}
|
|
83
99
|
/** The refusals of the deploy views; their messages name only what the caller asked for, so the private channel passes them on. */
|
|
84
100
|
export declare const deployErrorCodes: readonly ['deploy_target_unknown', 'deploy_repository_unknown', 'deploy_ticket_unknown', 'deploy_unavailable'];
|
|
101
|
+
/**
|
|
102
|
+
* Why the deploy views are unavailable (`deploy_unavailable`): the configuration authority, the controller or the monitor
|
|
103
|
+
* is not running; or no status is stored yet because the first computation still runs (`computing`) or failed (`failed`).
|
|
104
|
+
* Only `not_running` is a state of the host a device reads as such.
|
|
105
|
+
*/
|
|
106
|
+
export type TDeployUnavailableReason = 'not_running' | 'computing' | 'failed';
|
|
85
107
|
export declare class DeployError extends Error {
|
|
86
108
|
readonly code: (typeof deployErrorCodes)[number];
|
|
87
|
-
|
|
109
|
+
/** For `deploy_unavailable`: why. */
|
|
110
|
+
readonly unavailable?: TDeployUnavailableReason;
|
|
111
|
+
/** For `deploy_unavailable` `failed`: the failure journal reference the failed computation was recorded under. */
|
|
112
|
+
readonly reference?: string;
|
|
113
|
+
constructor(code: (typeof deployErrorCodes)[number], messageArg: string, unavailableArg?: Exclude<TDeployUnavailableReason, 'not_running'>, referenceArg?: string);
|
|
88
114
|
}
|
|
115
|
+
/** What runs the monitor's work: a pass fetches, releases and probes, then computes; a computation reads only what is held. */
|
|
116
|
+
export type TDeployRun = 'pass' | 'compute';
|
|
89
117
|
/**
|
|
90
|
-
* Observes what each deploy target runs (AGL-911)
|
|
91
|
-
* and the targets name (remote main and the remote's release tags,
|
|
92
|
-
* link and release what each tag holds, probes the configured
|
|
93
|
-
* observation when a target answers another version, commit or
|
|
94
|
-
* `deploy.observed`, `deploy.probe.failed` (after two failures in a row)
|
|
95
|
-
*
|
|
118
|
+
* Observes what each deploy target runs (AGL-911) and keeps the deploy status stored (AGL-1704). Every interval a pass
|
|
119
|
+
* fetches the remotes of the repositories the board and the targets name (remote main and the remote's release tags,
|
|
120
|
+
* which are the releases), lets the release reconciler link and release what each tag holds, probes the configured
|
|
121
|
+
* targets and the built-in AGL controller, records an observation when a target answers another version, commit or
|
|
122
|
+
* artifact set than its newest row, and publishes `deploy.observed`, `deploy.probe.failed` (after two failures in a row)
|
|
123
|
+
* and `deploy.probe.recovered`; then it computes. A computation reads the board, the last walk and the mirrored refs,
|
|
124
|
+
* and stores what it found as the controller's one `DeployStatusModel` document; status and release state answer from
|
|
125
|
+
* it, with the clock and the busy sessions applied when read (`deployStatusAt`). One runner (`request`) runs passes and
|
|
126
|
+
* computations one at a time; `refresh` asks it for a pass and waits for it. History and where a ticket runs are read when asked. Git runs here, never inside a ticket
|
|
127
|
+
* transaction.
|
|
96
128
|
*/
|
|
97
129
|
export declare class DeployMonitor {
|
|
98
130
|
private readonly host;
|
|
@@ -103,47 +135,108 @@ export declare class DeployMonitor {
|
|
|
103
135
|
private readonly reconciler;
|
|
104
136
|
private readonly probes;
|
|
105
137
|
private readonly abort;
|
|
106
|
-
private
|
|
107
|
-
|
|
108
|
-
private
|
|
138
|
+
private started;
|
|
139
|
+
/** The next pass of the loop, armed when a pass ends. */
|
|
140
|
+
private passTimer?;
|
|
141
|
+
private settleTimer?;
|
|
142
|
+
/** When the first board change the settle timer waits for came, so the computation waits at most `ticketsMaxWaitMs`. */
|
|
143
|
+
private settleSince?;
|
|
144
|
+
/** The next boundary of a maintenance window of the status served, where the views hear of it (AGL-1704). */
|
|
145
|
+
private windowTimer?;
|
|
146
|
+
/** The run in progress: its outcome, and when the runner is done with it. */
|
|
147
|
+
private active?;
|
|
148
|
+
/**
|
|
149
|
+
* The one run that follows the active one, for every request made while it runs; a pass if any of them asked for one,
|
|
150
|
+
* and told to the views when it ends if any of them asked for that (`refresh`).
|
|
151
|
+
*/
|
|
152
|
+
private next?;
|
|
153
|
+
/** Reads waiting for the first status, woken whenever a run ends. */
|
|
154
|
+
private readonly runEnded;
|
|
155
|
+
/** The status served, as last stored or loaded; absent until one is (a cold start). */
|
|
156
|
+
private model?;
|
|
157
|
+
/** The stored document's revision, also when its content did not parse, so the computation that overwrites it moves it on. */
|
|
158
|
+
private storedRevision?;
|
|
159
|
+
/** The last computation that failed while no later one succeeded. */
|
|
160
|
+
private failure?;
|
|
109
161
|
/** One probe of a target at a time, so two never record the same change twice; a probe waits for no other target. */
|
|
110
162
|
private readonly probing;
|
|
111
163
|
private discovered?;
|
|
164
|
+
/** The walk in progress and the workspace generation it walks: one at a time, and a read that needs no fresh one takes it while that is current. */
|
|
165
|
+
private walking?;
|
|
166
|
+
/** Moves when the workspace roots may have changed (a standard directory, a project, the configuration): a walk before it is stale. */
|
|
167
|
+
private workspace;
|
|
112
168
|
private board?;
|
|
113
|
-
/** The tickets released in a version some observed target of their repository does not run, as last
|
|
169
|
+
/** The tickets released in a version some observed target of their repository does not run, as last stored. */
|
|
114
170
|
private undeployedKeys;
|
|
115
|
-
/** Where each maintenance window stood
|
|
171
|
+
/** Where each maintenance window stood when the views last heard of the status, so the window timer tells when one opens or ends. */
|
|
116
172
|
private windowStates;
|
|
117
|
-
private refreshing;
|
|
118
|
-
private settleTimer?;
|
|
119
|
-
private settling?;
|
|
120
173
|
/** Deploy plan questions by ticket, question and ticket revision. */
|
|
121
174
|
private readonly questions;
|
|
122
175
|
/** Fetch failures already logged, by repository, so a host offline for a day logs each failure once. */
|
|
123
176
|
private readonly fetchFailures;
|
|
124
177
|
constructor(host: IDeployMonitorHost, options?: IDeployMonitorOptions);
|
|
178
|
+
/**
|
|
179
|
+
* Loads the stored status, before anything reads the board (AGL-1704): the `undeployed` AutoLabel shows the stored set
|
|
180
|
+
* from the first read on, and the views are answered at once. Content that does not parse is a cold start: nothing
|
|
181
|
+
* is served until the next computation, which overwrites it.
|
|
182
|
+
*/
|
|
183
|
+
load(): Promise<void>;
|
|
184
|
+
/** Starts the loop, once: a pass now (after the run in progress, if one runs), and one every interval after each pass. */
|
|
125
185
|
start(): void;
|
|
126
|
-
/** A saved Configuration master may change the targets: probe now and schedule from there. */
|
|
186
|
+
/** A saved Configuration master may change the targets: walk again, probe now and schedule from there. */
|
|
127
187
|
configurationChanged(): void;
|
|
128
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* A fleet release or landing pushed: fetch the remote now, not at the next pass. A release's tag releases what it
|
|
190
|
+
* holds; a landing moves remote main, which says what the next release ships.
|
|
191
|
+
*/
|
|
129
192
|
reconcileSoon(): void;
|
|
130
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* A standard project directory or a project was added or removed: the repositories the last walk found may not be
|
|
195
|
+
* the fleet's any more, so the next run walks again, also when a walk is in progress now. Nothing runs for it.
|
|
196
|
+
*/
|
|
197
|
+
workspaceChanged(): void;
|
|
198
|
+
/**
|
|
199
|
+
* The board changed: the status is computed again once the changes settle, `ticketsSettleMs` after the last change
|
|
200
|
+
* and at most `ticketsMaxWaitMs` after the first one that waits; nothing is fetched or probed.
|
|
201
|
+
*/
|
|
131
202
|
ticketsChanged(): void;
|
|
132
|
-
|
|
203
|
+
/**
|
|
204
|
+
* The one runner (AGL-1704): a pass or a computation now when none runs; while one runs, every request shares the one
|
|
205
|
+
* run that follows it (a pass when any of them asked for one). Each caller resolves with the first run that started
|
|
206
|
+
* after its request, and is refused with its failure. A stopped monitor runs nothing. `announceArg` tells the views
|
|
207
|
+
* when that run stored its status, also when nothing moved (`refresh`, so they show when it was checked).
|
|
208
|
+
*/
|
|
209
|
+
request(kindArg: TDeployRun, announceArg?: boolean): Promise<void>;
|
|
210
|
+
/**
|
|
211
|
+
* One full check now (AGL-1704): a pass, the one after the run in progress when one runs, which every request until
|
|
212
|
+
* it starts shares. It waits for that pass at most `refreshWaitMs` and the caller's signal: `refreshed` once it ended,
|
|
213
|
+
* `refreshing` while it runs on. Its end tells the views (`deployments.changed`) either way, also when nothing moved.
|
|
214
|
+
* A failed pass is refused with the failure it recorded beside the status (`deploy_unavailable` `failed`).
|
|
215
|
+
*/
|
|
216
|
+
refresh(signalArg?: AbortSignal): Promise<IFleetDeployRefreshResult>;
|
|
217
|
+
private begin;
|
|
218
|
+
/** A run ended: the one that waited starts, and the loop's next pass is armed after a pass. */
|
|
219
|
+
private ended;
|
|
220
|
+
/** One run. Without a configuration authority nothing is read; a failure keeps the stored status and is recorded beside it. */
|
|
133
221
|
private run;
|
|
134
222
|
/** The configured targets and the built-in controller, which a configured controller target replaces. */
|
|
135
223
|
targets(configurationArg: IFleetConfiguration): (IFleetDeployTarget & {
|
|
136
224
|
builtIn?: true;
|
|
137
225
|
})[];
|
|
138
226
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
227
|
+
* A pass's network work: fetch the remotes the board and the targets name, release what their tags hold and probe
|
|
228
|
+
* every target. Answers the remotes as fetched, which the computation that follows reads.
|
|
141
229
|
*/
|
|
142
|
-
|
|
230
|
+
private passFetchAndProbe;
|
|
143
231
|
/** The repositories the board names besides its landed tickets: release plans and `affects` links, whose releases matter. */
|
|
144
232
|
private namedRepositories;
|
|
145
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* Fetches each repository's remote, a few at a time; a failed fetch keeps the last mirrored refs and is logged once.
|
|
235
|
+
* A remote whose mirrored refs cannot be read fails the pass, naming the repository, and starts no further fetch.
|
|
236
|
+
*/
|
|
146
237
|
private fetchRemotes;
|
|
238
|
+
/** A remote whose mirrored refs could not be read: the computation fails, naming the repository, and never takes it as one without releases. */
|
|
239
|
+
private unreadRemote;
|
|
147
240
|
/**
|
|
148
241
|
* The tickets the AutoLabel `undeployed` marks: released in a version that some observed target of the repository
|
|
149
242
|
* does not run yet. A ticket holds the label until every target of its repository runs its release. The ticket store
|
|
@@ -151,26 +244,69 @@ export declare class DeployMonitor {
|
|
|
151
244
|
*/
|
|
152
245
|
undeployed(): ReadonlySet<string>;
|
|
153
246
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
247
|
+
* One computation, after each pass, each probe now and each settled board change: every target's status, every
|
|
248
|
+
* maintenance window, the release state and the undeployed set, from the board, the last walk and the mirrored refs.
|
|
249
|
+
* It closes the fulfilled deploy plans and stores what it found; it touches no network.
|
|
250
|
+
*/
|
|
251
|
+
private compute;
|
|
252
|
+
/**
|
|
253
|
+
* Stores a computation's content and serves it from then on. Content over `contentLimitBytes` of JSON fails the
|
|
254
|
+
* computation, and so does content its own schema refuses, since a stored status must load again. The document is
|
|
255
|
+
* written when the content changed and at least once per pass, so its `computedAt` says when the targets were last
|
|
256
|
+
* checked; its revision moves only when more changed than when a probe last answered, and the views hear of it then,
|
|
257
|
+
* when the failure they show clears and when a `refresh` asked (`announceArg`). A window's boundary changes no
|
|
258
|
+
* content: the window timer, armed again after every computation, tells of it.
|
|
157
259
|
*/
|
|
158
|
-
private
|
|
159
|
-
|
|
260
|
+
private store;
|
|
261
|
+
/** Writes the controller's one status document; nothing is written once the monitor stopped. */
|
|
262
|
+
private persist;
|
|
263
|
+
/** A failed computation: logged and journaled under the reference the failure keeps, its words AGL's own. */
|
|
264
|
+
private recordFailure;
|
|
265
|
+
/** Records the last failure beside the stored status, which stands; without a stored status, a cold read names it. */
|
|
266
|
+
private storeFailure;
|
|
267
|
+
/** Where each maintenance window of a status stands now and the owner's go, to tell when one opens or ends. */
|
|
268
|
+
private windowSignature;
|
|
269
|
+
/**
|
|
270
|
+
* Arms the window timer for the next time a maintenance window of the status served opens or ends (AGL-1704), at
|
|
271
|
+
* once when one did since the views last heard of the status. The content does not change at a boundary, so no
|
|
272
|
+
* computation tells of it: the timer does. A boundary further away than a timer holds wakes it early, and it arms
|
|
273
|
+
* itself again.
|
|
274
|
+
*/
|
|
275
|
+
private armWindowTimer;
|
|
276
|
+
/** The window timer fired: tells the views when a window opened or ended, and arms itself for the next boundary. */
|
|
277
|
+
private windowBoundary;
|
|
160
278
|
/**
|
|
161
279
|
* A deploy plan is done once its target is observed running its release or a newer one: AGL closes its ticket and
|
|
162
280
|
* says so, whoever deployed it. A failed close is tried again at the next computation.
|
|
163
281
|
*/
|
|
164
282
|
private closeFulfilledPlans;
|
|
165
|
-
/** Probes one target now, as a deploy path asks after a deploy; it claims nothing, waits for no pass, and answers the target's status. */
|
|
166
|
-
probe(targetIdArg: string): Promise<IFleetDeployTargetStatus>;
|
|
167
|
-
status(targetIdArg?: string): Promise<IFleetDeployStatus>;
|
|
168
283
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
284
|
+
* Probes one target now, as a deploy path asks after a deploy, and computes after it: it claims nothing, and answers
|
|
285
|
+
* the target's status as stored then.
|
|
286
|
+
*/
|
|
287
|
+
probe(targetIdArg: string, signalArg?: AbortSignal): Promise<IFleetDeployTargetStatus>;
|
|
288
|
+
/**
|
|
289
|
+
* The deploy status as stored, at this moment (`deployStatusAt`): it walks nothing and reads no board. While the newest
|
|
290
|
+
* computation failed, its failure goes with it. Without a stored status it waits for the first computation, at most
|
|
291
|
+
* `firstStatusWaitMs`.
|
|
292
|
+
*/
|
|
293
|
+
status(targetIdArg?: string, signalArg?: AbortSignal): Promise<IFleetDeployStatus>;
|
|
294
|
+
/**
|
|
295
|
+
* The status served. A cold start (nothing stored, or content that did not parse) waits for the run in progress and
|
|
296
|
+
* the one after it, bounded by the caller's signal and `firstStatusWaitMs`; then it is refused, saying whether the
|
|
297
|
+
* first computation still runs or failed.
|
|
298
|
+
*/
|
|
299
|
+
private served;
|
|
300
|
+
/**
|
|
301
|
+
* Every maintenance window on a ticket that is not done, with the owner's go, the earliest first; where it stands is
|
|
302
|
+
* the clock's, derived when read (`deployWindowAt`). The owner's own window counts at once; one the driver proposed
|
|
303
|
+
* counts once the owner approves it.
|
|
171
304
|
*/
|
|
172
305
|
private windows;
|
|
173
|
-
/**
|
|
306
|
+
/**
|
|
307
|
+
* A target's deploy plans whose ticket is not done, with the owner's go from the answer to each plan's question; the
|
|
308
|
+
* window a `window` go is queued into is the clock's, derived when read (`deployPlansAt`).
|
|
309
|
+
*/
|
|
174
310
|
private deployPlans;
|
|
175
311
|
/** A deploy plan's or a window's question, read once per ticket revision: an answer moves the ticket's revision. */
|
|
176
312
|
private deployQuestion;
|
|
@@ -180,16 +316,27 @@ export declare class DeployMonitor {
|
|
|
180
316
|
observations: IFleetDeployObservation[];
|
|
181
317
|
}>;
|
|
182
318
|
/**
|
|
183
|
-
* The release state of
|
|
184
|
-
* the newest tag on the remote, the plans and the landed tickets the newest release does not hold.
|
|
319
|
+
* The release state of every repository a target runs, a ticket plans or a landed ticket names, as stored; or of one
|
|
320
|
+
* repository, read now: the newest tag on the remote, the plans and the landed tickets the newest release does not hold.
|
|
321
|
+
*/
|
|
322
|
+
releaseStatus(repoArg?: string, signalArg?: AbortSignal): Promise<IFleetReleaseStatus>;
|
|
323
|
+
/** The release state of the repositories the targets run, landed tickets name and planned tickets plan, by `org/name`. */
|
|
324
|
+
private releaseRepositories;
|
|
325
|
+
private repositoryRelease;
|
|
326
|
+
/**
|
|
327
|
+
* Stops the monitor: its timers are cleared, nothing runs or is written after it, and it waits for the run and the
|
|
328
|
+
* probes in progress; a run that waited is refused.
|
|
185
329
|
*/
|
|
186
|
-
releaseStatus(repoArg?: string): Promise<IFleetReleaseStatus>;
|
|
187
|
-
/** Stops the loop and waits for a pass and the probes in progress. */
|
|
188
330
|
close(): Promise<void>;
|
|
189
331
|
private requireScope;
|
|
190
332
|
private probeSerialized;
|
|
191
333
|
/** Discovery walks the workspace roots; a read within a minute takes the last walk, unless it asks for a fresh one. */
|
|
192
334
|
repositories(freshArg?: boolean): Promise<IFleetRepository[]>;
|
|
335
|
+
/**
|
|
336
|
+
* One walk at a time. A read that needs no fresh walk takes the last walk within the minute or the walk in progress,
|
|
337
|
+
* either only while no workspace change came after it began; any other read walks after the walk in progress, and
|
|
338
|
+
* joins the walk another such read began after it while that one is current.
|
|
339
|
+
*/
|
|
193
340
|
private discovery;
|
|
194
341
|
/**
|
|
195
342
|
* The one repository a caller names (a release plan, an `affects` link): the last walk's, or a fresh walk's when the
|
|
@@ -204,7 +351,7 @@ export declare class DeployMonitor {
|
|
|
204
351
|
* or a standard directory added within the minute is found, not refused. Targets and links take the last walk.
|
|
205
352
|
*/
|
|
206
353
|
private findRepository;
|
|
207
|
-
/** A repository's remote as the last fetch mirrored it, read once per read. */
|
|
354
|
+
/** A repository's remote as the last fetch mirrored it, read once per read; one that cannot be read fails the read, naming it. */
|
|
208
355
|
private remote;
|
|
209
356
|
/**
|
|
210
357
|
* Whether a target running `runningArg` runs the release `versionArg`: its tag holds that release's tag commit, since
|
|
@@ -224,14 +371,13 @@ export declare class DeployMonitor {
|
|
|
224
371
|
private plans;
|
|
225
372
|
/** The landed tickets whose landed commit the newest release does not hold; every landed ticket when there is no release. */
|
|
226
373
|
private landedAfter;
|
|
227
|
-
|
|
228
|
-
/** A target's status, and the key of every ticket that does not run there; the status lists the first hundred. */
|
|
374
|
+
/** A target's status as stored, and the key of every ticket that does not run there; the status lists the first hundred. */
|
|
229
375
|
private targetState;
|
|
230
376
|
/**
|
|
231
|
-
* When a target's deploys may run
|
|
232
|
-
*
|
|
377
|
+
* When a target's deploys may run (AGL-909): any time; inside a maintenance window for a target that needs one; for
|
|
378
|
+
* the AGL controller when no session is busy. Whether they may now is the clock's and the sessions', derived when read.
|
|
233
379
|
*/
|
|
234
|
-
private
|
|
380
|
+
private deployWhen;
|
|
235
381
|
/** What the views show of a target's probe; the failures in a row stay with the monitor. */
|
|
236
382
|
private probeState;
|
|
237
383
|
/** The newest version a ticket was released as in this repository, from its release links. */
|