agl 43.7.0 → 43.9.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 +33 -0
- package/dist_serve/bundle.js +871 -858
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +824 -6
- package/dist_ts/aglapi/interfaces.d.ts +43 -0
- package/dist_ts/aglapi/interfaces.js +11 -1
- package/dist_ts/classes.apnsclient.d.ts +97 -0
- package/dist_ts/classes.apnsclient.js +363 -0
- package/dist_ts/classes.authmodels.js +19 -6
- package/dist_ts/classes.authstore.js +15 -2
- package/dist_ts/classes.cli.js +8 -1
- package/dist_ts/classes.controller.d.ts +30 -3
- package/dist_ts/classes.controller.js +250 -9
- package/dist_ts/classes.controllerdevices.d.ts +35 -7
- package/dist_ts/classes.controllerdevices.js +86 -13
- package/dist_ts/classes.controllerpush.d.ts +111 -0
- package/dist_ts/classes.controllerpush.js +299 -0
- package/dist_ts/classes.fcmclient.d.ts +78 -0
- package/dist_ts/classes.fcmclient.js +278 -0
- package/dist_ts/classes.inbox.d.ts +10 -2
- package/dist_ts/classes.inbox.js +9 -2
- package/dist_ts/classes.mcpclient.d.ts +5 -0
- package/dist_ts/classes.mcpclient.js +20 -8
- package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -0
- package/dist_ts/classes.mcpcontrollerhost.js +21 -2
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.mcpvalidation.js +4 -1
- package/dist_ts/classes.mcpworkercaller.d.ts +6 -0
- package/dist_ts/classes.mcpworkercaller.js +26 -4
- package/dist_ts/classes.pushdelivery.d.ts +115 -0
- package/dist_ts/classes.pushdelivery.js +311 -0
- package/dist_ts/classes.pushhandover.d.ts +46 -0
- package/dist_ts/classes.pushhandover.js +131 -0
- package/dist_ts/classes.pushregistrations.d.ts +96 -0
- package/dist_ts/classes.pushregistrations.js +263 -0
- package/dist_ts/classes.pushsettings.d.ts +125 -0
- package/dist_ts/classes.pushsettings.js +377 -0
- package/dist_ts/classes.ticketstore.d.ts +3 -3
- package/dist_ts/classes.ticketstore.js +23 -4
- package/dist_ts/classes.workercallers.d.ts +73 -2
- package/dist_ts/classes.workercallers.js +354 -43
- package/dist_ts/driver/classes.directreports.d.ts +5 -0
- package/dist_ts/driver/classes.directreports.js +3 -2
- package/dist_ts/fleet/classes.workerlaunches.d.ts +6 -4
- package/dist_ts/fleet/classes.workerlaunches.js +10 -9
- package/dist_ts/fleet/classes.workers.d.ts +12 -2
- package/dist_ts/fleet/classes.workers.js +82 -2
- package/dist_ts/functions.deviceapi.d.ts +23 -3
- package/dist_ts/functions.deviceapi.js +43 -3
- package/dist_ts/functions.mcptickettools.d.ts +60 -0
- package/dist_ts/functions.mcptickettools.js +4 -3
- package/dist_ts/functions.pushcli.d.ts +43 -0
- package/dist_ts/functions.pushcli.js +201 -0
- package/dist_ts/functions.pushcredentials.d.ts +53 -0
- package/dist_ts/functions.pushcredentials.js +111 -0
- package/dist_ts/functions.pushwire.d.ts +8 -0
- package/dist_ts/functions.pushwire.js +83 -0
- package/dist_ts/functions.remotecli.d.ts +2 -2
- package/dist_ts/functions.remotecli.js +4 -4
- package/dist_ts/functions.ticketcli.d.ts +4 -2
- package/dist_ts/functions.ticketcli.js +70 -4
- package/dist_ts/functions.ticketlisting.d.ts +38 -0
- package/dist_ts/functions.ticketlisting.js +211 -0
- package/dist_ts/functions.ticketvalidation.d.ts +62 -0
- package/dist_ts/functions.ticketvalidation.js +41 -3
- package/dist_ts/functions.workercallervalidation.js +3 -2
- package/dist_ts/functions.workerprocessproof.d.ts +12 -0
- package/dist_ts/functions.workerprocessproof.js +32 -1
- package/dist_ts/interfaces.auth.d.ts +27 -3
- package/dist_ts/interfaces.auth.js +9 -1
- package/dist_ts/interfaces.lifecycle.d.ts +7 -1
- package/dist_ts/interfaces.push.d.ts +69 -0
- package/dist_ts/interfaces.push.js +25 -0
- package/dist_ts/plugins.d.ts +3 -1
- package/dist_ts/plugins.js +4 -2
- package/dist_ts_interfaces/devices.d.ts +178 -2
- package/dist_ts_interfaces/devices.js +24 -2
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/mcprequests.d.ts +3 -2
- package/dist_ts_interfaces/mcprequests.js +3 -1
- package/dist_ts_interfaces/push.d.ts +166 -0
- package/dist_ts_interfaces/push.js +24 -0
- package/dist_ts_interfaces/requests.tickets.d.ts +31 -3
- package/dist_ts_interfaces/requests.tickets.js +2 -2
- package/dist_ts_interfaces/tickets.d.ts +174 -2
- package/dist_ts_interfaces/tickets.js +20 -2
- package/dist_ts_interfaces/workercallers.d.ts +43 -3
- package/package.json +2 -2
- package/readme.md +95 -14
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +823 -5
- package/ts/aglapi/interfaces.ts +10 -0
- package/ts/classes.apnsclient.ts +389 -0
- package/ts/classes.authmodels.ts +21 -5
- package/ts/classes.authstore.ts +14 -1
- package/ts/classes.cli.ts +7 -0
- package/ts/classes.controller.ts +273 -7
- package/ts/classes.controllerdevices.ts +94 -12
- package/ts/classes.controllerpush.ts +351 -0
- package/ts/classes.fcmclient.ts +292 -0
- package/ts/classes.inbox.ts +13 -2
- package/ts/classes.mcpclient.ts +22 -7
- package/ts/classes.mcpcontrollerhost.ts +22 -1
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.mcpvalidation.ts +2 -0
- package/ts/classes.mcpworkercaller.ts +24 -2
- package/ts/classes.pushdelivery.ts +378 -0
- package/ts/classes.pushhandover.ts +98 -0
- package/ts/classes.pushregistrations.ts +244 -0
- package/ts/classes.pushsettings.ts +428 -0
- package/ts/classes.ticketstore.ts +21 -3
- package/ts/classes.workercallers.ts +329 -37
- package/ts/driver/classes.directreports.ts +7 -1
- package/ts/fleet/classes.workerlaunches.ts +9 -7
- package/ts/fleet/classes.workers.ts +65 -2
- package/ts/functions.deviceapi.ts +54 -2
- package/ts/functions.mcptickettools.ts +3 -2
- package/ts/functions.pushcli.ts +212 -0
- package/ts/functions.pushcredentials.ts +129 -0
- package/ts/functions.pushwire.ts +106 -0
- package/ts/functions.remotecli.ts +3 -2
- package/ts/functions.ticketcli.ts +70 -5
- package/ts/functions.ticketlisting.ts +214 -0
- package/ts/functions.ticketvalidation.ts +41 -2
- package/ts/functions.workercallervalidation.ts +2 -1
- package/ts/functions.workerprocessproof.ts +34 -0
- package/ts/interfaces.auth.ts +26 -3
- package/ts/interfaces.lifecycle.ts +7 -1
- package/ts/interfaces.push.ts +78 -0
- package/ts/plugins.ts +3 -1
- package/ts_interfaces/devices.schema.json +327 -0
- package/ts_interfaces/devices.ts +206 -1
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/mcprequests.ts +3 -0
- package/ts_interfaces/push.ts +162 -0
- package/ts_interfaces/requests.tickets.ts +32 -2
- package/ts_interfaces/tickets.ts +136 -3
- package/ts_interfaces/workercallers.ts +34 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements.inbox.ts +50 -9
|
@@ -4,7 +4,8 @@ export type TTicketColumn = (typeof ticketColumns)[number];
|
|
|
4
4
|
/** The columns of finished work; the board folds them. */
|
|
5
5
|
export declare const ticketDoneColumns: readonly TTicketColumn[];
|
|
6
6
|
export type TTicketKind = 'epic' | 'task' | 'subtask';
|
|
7
|
-
export
|
|
7
|
+
export declare const ticketPriorities: readonly ['urgent', 'high', 'normal', 'low', 'none'];
|
|
8
|
+
export type TTicketPriority = (typeof ticketPriorities)[number];
|
|
8
9
|
export interface ITicketPerson {
|
|
9
10
|
id: string;
|
|
10
11
|
name: string;
|
|
@@ -262,6 +263,159 @@ export interface ITicketFilters {
|
|
|
262
263
|
label?: string;
|
|
263
264
|
text?: string;
|
|
264
265
|
}
|
|
266
|
+
/** How a page sorts: the board's own order, newest change first, newest ticket first, or urgent first and then the board's order. */
|
|
267
|
+
export declare const ticketPageSorts: readonly ['board', 'updated', 'created', 'priority'];
|
|
268
|
+
export type TTicketPageSort = (typeof ticketPageSorts)[number];
|
|
269
|
+
/**
|
|
270
|
+
* How many tickets one page returns unless it names `limit`, the most it may name, and the bytes a page holds at most
|
|
271
|
+
* (its tickets serialized; a page holds at least one ticket). The budget wins over `limit`.
|
|
272
|
+
*/
|
|
273
|
+
export declare const ticketListPage: {
|
|
274
|
+
readonly default: 50;
|
|
275
|
+
readonly maximum: 200;
|
|
276
|
+
readonly bytes: number;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* One page of the board. Beyond a listing's filters it narrows by several columns (`statuses`), by open work (`open`:
|
|
280
|
+
* true leaves out released and closed tickets, false keeps only those), kind, priorities, a parent's direct children,
|
|
281
|
+
* an assignee (a person id or a session id), tickets without one, named keys and a time of last change.
|
|
282
|
+
*/
|
|
283
|
+
export interface ITicketPageRequest extends ITicketFilters {
|
|
284
|
+
statuses?: TTicketColumn[];
|
|
285
|
+
open?: boolean;
|
|
286
|
+
kind?: TTicketKind;
|
|
287
|
+
priorities?: TTicketPriority[];
|
|
288
|
+
/** A ticket key: its direct children, as the board's epic filter matches them. */
|
|
289
|
+
parent?: string;
|
|
290
|
+
/** A person id or a session id (`harness:nativeId`), as a ticket's assignee holds them; never a display name. */
|
|
291
|
+
assignee?: string;
|
|
292
|
+
unassigned?: boolean;
|
|
293
|
+
/** Up to 200 keys: reads those tickets in one call. */
|
|
294
|
+
keys?: string[];
|
|
295
|
+
/** An ISO 8601 instant: tickets changed at or after it. */
|
|
296
|
+
updatedSince?: string;
|
|
297
|
+
/** `board` when absent. */
|
|
298
|
+
sort?: TTicketPageSort;
|
|
299
|
+
/** `summary` (a ticket without its texts) when absent; `full` returns whole tickets. */
|
|
300
|
+
view?: 'summary' | 'full';
|
|
301
|
+
/** Tickets on the page, 1 to 200 (`ticketListPage.maximum`); 50 when absent. */
|
|
302
|
+
limit?: number;
|
|
303
|
+
/** A page's `nextCursor`, with the same filters, sort and view. */
|
|
304
|
+
cursor?: string;
|
|
305
|
+
}
|
|
306
|
+
/** A ticket without its description, source words and link details. Empty fields are left out. */
|
|
307
|
+
export interface ITicketSummary {
|
|
308
|
+
key: string;
|
|
309
|
+
revision: number;
|
|
310
|
+
project: string;
|
|
311
|
+
kind: TTicketKind;
|
|
312
|
+
title: string;
|
|
313
|
+
columnId: TTicketColumn;
|
|
314
|
+
priority: TTicketPriority;
|
|
315
|
+
updatedAt: string;
|
|
316
|
+
assignee?: Pick<ITicketPerson, 'id' | 'name' | 'sessionId'>;
|
|
317
|
+
parentId?: string;
|
|
318
|
+
labels?: string[];
|
|
319
|
+
autoLabels?: TTicketAutoLabel[];
|
|
320
|
+
/** How many links of each kind the ticket holds. */
|
|
321
|
+
links?: Partial<Record<TTicketLink['kind'], number>>;
|
|
322
|
+
releasePlan?: ITicketReleasePlan;
|
|
323
|
+
deployPlan?: ITicketDeployPlanInput;
|
|
324
|
+
maintenanceWindow?: Pick<ITicketMaintenanceWindow, 'from' | 'to' | 'targets'>;
|
|
325
|
+
/** Unanswered questions on the ticket. */
|
|
326
|
+
openQuestions?: number;
|
|
327
|
+
}
|
|
328
|
+
interface ITicketPageBase {
|
|
329
|
+
/** How many tickets the filters match, on every page. */
|
|
330
|
+
total: number;
|
|
331
|
+
/** How many of them each column holds; a column without any is left out. */
|
|
332
|
+
columns: Partial<Record<TTicketColumn, number>>;
|
|
333
|
+
/** The board revision this page was read at. */
|
|
334
|
+
revision: number;
|
|
335
|
+
/** Present while more tickets follow: pass it as `cursor` with the same filters, sort and view. */
|
|
336
|
+
nextCursor?: string;
|
|
337
|
+
/**
|
|
338
|
+
* The board changed since the first page of this cursor. A page continues after the last ticket shown as the board
|
|
339
|
+
* stands now, so a ticket that changed its place meanwhile may be missing or shown twice; list again for an exact reading.
|
|
340
|
+
*/
|
|
341
|
+
moved?: true;
|
|
342
|
+
}
|
|
343
|
+
export type TTicketPage = (ITicketPageBase & {
|
|
344
|
+
view: 'summary';
|
|
345
|
+
tickets: ITicketSummary[];
|
|
346
|
+
}) | (ITicketPageBase & {
|
|
347
|
+
view: 'full';
|
|
348
|
+
tickets: ITicket[];
|
|
349
|
+
});
|
|
350
|
+
/** The overview's defaults: tickets per list, the days after which active work counts as stale, and the most projects, assignees and epics listed. */
|
|
351
|
+
export declare const ticketOverviewDefaults: {
|
|
352
|
+
readonly limit: 5;
|
|
353
|
+
readonly maximumLimit: 50;
|
|
354
|
+
readonly staleDays: 3;
|
|
355
|
+
readonly groups: 50;
|
|
356
|
+
};
|
|
357
|
+
export interface ITicketOverviewRequest {
|
|
358
|
+
/** Only this project's tickets. */
|
|
359
|
+
project?: string;
|
|
360
|
+
/** Only the tickets assigned to the caller's verified session. */
|
|
361
|
+
mine?: boolean;
|
|
362
|
+
/** Tickets per list, 1 to 50; 5 when absent. */
|
|
363
|
+
limit?: number;
|
|
364
|
+
/** Days without a change after which in_progress, needs_input and review work counts as stale, 1 to 365; 3 when absent. */
|
|
365
|
+
staleDays?: number;
|
|
366
|
+
}
|
|
367
|
+
/** Some tickets of a kind and how many there are in all. */
|
|
368
|
+
export interface ITicketOverviewGroup {
|
|
369
|
+
total: number;
|
|
370
|
+
tickets: ITicketSummary[];
|
|
371
|
+
}
|
|
372
|
+
/** The board at a glance, without any ticket's texts; see `ticketOverview`. */
|
|
373
|
+
export interface ITicketOverview {
|
|
374
|
+
revision: number;
|
|
375
|
+
total: number;
|
|
376
|
+
/** Tickets that are neither released nor closed. */
|
|
377
|
+
open: number;
|
|
378
|
+
columns: Record<TTicketColumn, number>;
|
|
379
|
+
/** Open tickets by priority. */
|
|
380
|
+
priorities: Record<TTicketPriority, number>;
|
|
381
|
+
autoLabels: Record<TTicketAutoLabel, number>;
|
|
382
|
+
/** Most open work first; `projectsTotal` counts all. */
|
|
383
|
+
projects: {
|
|
384
|
+
project: string;
|
|
385
|
+
total: number;
|
|
386
|
+
open: number;
|
|
387
|
+
columns: Partial<Record<TTicketColumn, number>>;
|
|
388
|
+
}[];
|
|
389
|
+
projectsTotal: number;
|
|
390
|
+
/** Who holds open tickets, most first; `assigneesTotal` counts all. */
|
|
391
|
+
assignees: (Pick<ITicketPerson, 'id' | 'name' | 'sessionId'> & {
|
|
392
|
+
open: number;
|
|
393
|
+
columns: Partial<Record<TTicketColumn, number>>;
|
|
394
|
+
})[];
|
|
395
|
+
assigneesTotal: number;
|
|
396
|
+
unassignedOpen: number;
|
|
397
|
+
/** Open epics with their direct children: how many, how many done, and where they stand; `epicsTotal` counts all. */
|
|
398
|
+
epics: {
|
|
399
|
+
key: string;
|
|
400
|
+
title: string;
|
|
401
|
+
project: string;
|
|
402
|
+
columnId: TTicketColumn;
|
|
403
|
+
children: number;
|
|
404
|
+
done: number;
|
|
405
|
+
columns: Partial<Record<TTicketColumn, number>>;
|
|
406
|
+
}[];
|
|
407
|
+
epicsTotal: number;
|
|
408
|
+
attention: {
|
|
409
|
+
urgent: ITicketOverviewGroup;
|
|
410
|
+
needsInput: ITicketOverviewGroup;
|
|
411
|
+
openQuestions: ITicketOverviewGroup;
|
|
412
|
+
review: ITicketOverviewGroup;
|
|
413
|
+
unassignedReady: ITicketOverviewGroup;
|
|
414
|
+
stale: ITicketOverviewGroup;
|
|
415
|
+
};
|
|
416
|
+
/** The tickets changed last, newest first. */
|
|
417
|
+
recent: ITicketSummary[];
|
|
418
|
+
}
|
|
265
419
|
export interface ITicketChanges {
|
|
266
420
|
title?: string;
|
|
267
421
|
description?: string;
|
|
@@ -355,6 +509,15 @@ export interface ITicketOperations {
|
|
|
355
509
|
tickets: ITicket[];
|
|
356
510
|
};
|
|
357
511
|
};
|
|
512
|
+
/** `list` in pages, as summaries unless `view` is `full`, with further filters and a sort. */
|
|
513
|
+
page: {
|
|
514
|
+
request: ITicketPageRequest;
|
|
515
|
+
response: TTicketPage;
|
|
516
|
+
};
|
|
517
|
+
overview: {
|
|
518
|
+
request: ITicketOverviewRequest;
|
|
519
|
+
response: ITicketOverview;
|
|
520
|
+
};
|
|
358
521
|
board: {
|
|
359
522
|
request: ITicketFilters;
|
|
360
523
|
response: ITicketBoard;
|
|
@@ -514,5 +677,14 @@ export declare const ticketErrorMessages: {
|
|
|
514
677
|
readonly ticket_question_answered: 'The question already has a different answer; a second answer is refused. Ask a new question instead.';
|
|
515
678
|
readonly ticket_answer_invalid: 'An answer chooses existing option ids (one unless multiSelect) and/or gives free text where the question allows it.';
|
|
516
679
|
};
|
|
517
|
-
|
|
680
|
+
/**
|
|
681
|
+
* What a page refuses about its cursor. Kept apart from `ticketErrorMessages`, which the device contract lists code by
|
|
682
|
+
* code: a device pages nothing, and is answered `invalid_request` should it ever meet one.
|
|
683
|
+
*/
|
|
684
|
+
export declare const ticketPageErrorMessages: {
|
|
685
|
+
readonly ticket_cursor_invalid: 'The cursor is not the nextCursor of a ticket page; list again without cursor.';
|
|
686
|
+
readonly ticket_cursor_mismatch: 'The cursor pages other filters, another sort or another view; repeat those or list again without cursor.';
|
|
687
|
+
};
|
|
688
|
+
export type TTicketClientErrorCode = Uppercase<keyof typeof ticketErrorMessages | keyof typeof ticketPageErrorMessages>;
|
|
518
689
|
export declare const ticketClientErrorMessages: Record<TTicketClientErrorCode, string>;
|
|
690
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export const ticketColumns = [
|
|
|
4
4
|
];
|
|
5
5
|
/** The columns of finished work; the board folds them. */
|
|
6
6
|
export const ticketDoneColumns = ['released', 'closed'];
|
|
7
|
+
export const ticketPriorities = ['urgent', 'high', 'normal', 'low', 'none'];
|
|
7
8
|
/**
|
|
8
9
|
* The owner's question a deploy plan asks, by option id: `1` deploy now, `2` in the next maintenance window (for the
|
|
9
10
|
* AGL controller: when no session is busy), `3` hold.
|
|
@@ -58,6 +59,15 @@ export const ticketAnswerFromCard = (questionArg, answersArg) => {
|
|
|
58
59
|
return { choices: questionArg.options.filter((optionArg) => choices.includes(optionArg.id)).map((optionArg) => optionArg.id),
|
|
59
60
|
...(texts.length ? { text: texts.join('\n\n') } : {}) };
|
|
60
61
|
};
|
|
62
|
+
/** How a page sorts: the board's own order, newest change first, newest ticket first, or urgent first and then the board's order. */
|
|
63
|
+
export const ticketPageSorts = ['board', 'updated', 'created', 'priority'];
|
|
64
|
+
/**
|
|
65
|
+
* How many tickets one page returns unless it names `limit`, the most it may name, and the bytes a page holds at most
|
|
66
|
+
* (its tickets serialized; a page holds at least one ticket). The budget wins over `limit`.
|
|
67
|
+
*/
|
|
68
|
+
export const ticketListPage = { default: 50, maximum: 200, bytes: 256 * 1024 };
|
|
69
|
+
/** The overview's defaults: tickets per list, the days after which active work counts as stale, and the most projects, assignees and epics listed. */
|
|
70
|
+
export const ticketOverviewDefaults = { limit: 5, maximumLimit: 50, staleDays: 3, groups: 50 };
|
|
61
71
|
/**
|
|
62
72
|
* How many history entries one `get` returns unless it names `limit`, the most it may name, and the bytes a page holds
|
|
63
73
|
* at most (its entries plus the comments they name, serialized; a page holds at least one entry). The budget wins over `limit`.
|
|
@@ -100,6 +110,14 @@ export const ticketErrorMessages = {
|
|
|
100
110
|
ticket_question_answered: 'The question already has a different answer; a second answer is refused. Ask a new question instead.',
|
|
101
111
|
ticket_answer_invalid: 'An answer chooses existing option ids (one unless multiSelect) and/or gives free text where the question allows it.',
|
|
102
112
|
};
|
|
103
|
-
|
|
113
|
+
/**
|
|
114
|
+
* What a page refuses about its cursor. Kept apart from `ticketErrorMessages`, which the device contract lists code by
|
|
115
|
+
* code: a device pages nothing, and is answered `invalid_request` should it ever meet one.
|
|
116
|
+
*/
|
|
117
|
+
export const ticketPageErrorMessages = {
|
|
118
|
+
ticket_cursor_invalid: 'The cursor is not the nextCursor of a ticket page; list again without cursor.',
|
|
119
|
+
ticket_cursor_mismatch: 'The cursor pages other filters, another sort or another view; repeat those or list again without cursor.',
|
|
120
|
+
};
|
|
121
|
+
export const ticketClientErrorMessages = Object.fromEntries(Object.entries({ ...ticketErrorMessages, ...ticketPageErrorMessages })
|
|
104
122
|
.map(([codeArg, mess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UFBRSxDQUFDO0tBQy9ILEdBQUcsQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLFVBQVUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsRUFBRSxVQUFVLENBQUMsQ0FBQyxDQUEyQyxDQUFDIn0=
|
|
@@ -67,8 +67,9 @@ export interface IFleetWorkerCallerHooks {
|
|
|
67
67
|
}>;
|
|
68
68
|
getWorkerCallerStatus(launchId: string): IWorkerCallerReadiness;
|
|
69
69
|
/**
|
|
70
|
-
* Revokes one launch, or the current launch of a worker, also one the controller kept from before a restart
|
|
71
|
-
* reason but `generation_change` revokes it for good: its
|
|
70
|
+
* Revokes one launch, or the current launch of a worker, also one the controller kept from before a restart or
|
|
71
|
+
* recorded for a bridge it identified by its process. Every reason but `generation_change` revokes it for good: its
|
|
72
|
+
* kept binding is deleted with it.
|
|
72
73
|
*/
|
|
73
74
|
revokeWorkerCaller(request: ({
|
|
74
75
|
launchId: string;
|
|
@@ -77,6 +78,11 @@ export interface IFleetWorkerCallerHooks {
|
|
|
77
78
|
}) & {
|
|
78
79
|
reason: 'failure' | 'stop' | 'replacement' | 'generation_change' | 'cancelled';
|
|
79
80
|
}): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* The fleet adopted or re-bound a worker: every process whose bridge the controller refused to identify is
|
|
83
|
+
* identified afresh at its bridge's next call.
|
|
84
|
+
*/
|
|
85
|
+
clearCallerRefusals(): void;
|
|
80
86
|
}
|
|
81
87
|
/** The background job a Claude worker's launch is bound to, as the controller asks the fleet about it. */
|
|
82
88
|
export interface IWorkerClaudeJobRequest {
|
|
@@ -102,6 +108,36 @@ export type TWorkerClaudeJobObservation = {
|
|
|
102
108
|
state: 'unproven';
|
|
103
109
|
reason: string;
|
|
104
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* The process an MCP bridge runs under (its direct parent), which the controller proved to run an installed Claude Code
|
|
113
|
+
* release, and that process's own parent, as the controller asks the fleet whose job it is.
|
|
114
|
+
*/
|
|
115
|
+
export interface IWorkerClaudeProcessRequest {
|
|
116
|
+
pid: number;
|
|
117
|
+
parentPid: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* What the fleet names a process for: `identified` when a fresh inventory of the fleet's Claude homes lists it exactly
|
|
121
|
+
* once, as the process of a background job with an agent id whose session it lists once, and exactly one stored worker
|
|
122
|
+
* of any owner, a live Claude worker without a dispatch in flight or a lost one, binds that session under the home that
|
|
123
|
+
* lists it. Otherwise `refused` by the check that failed: `parent` when the process is not the job's but its own parent
|
|
124
|
+
* is (the bridge runs one level too deep), `inventory` or `worker`; with the worker when one is named, and whether the
|
|
125
|
+
* refusal holds while the process runs (`forGood`) or may pass soon.
|
|
126
|
+
*/
|
|
127
|
+
export type TWorkerClaudeProcessIdentification = {
|
|
128
|
+
state: 'identified';
|
|
129
|
+
workerId: string;
|
|
130
|
+
projectId: string;
|
|
131
|
+
nativeSessionId: string;
|
|
132
|
+
jobId: string;
|
|
133
|
+
} | {
|
|
134
|
+
state: 'refused';
|
|
135
|
+
check: 'parent' | 'inventory' | 'worker';
|
|
136
|
+
reason: string;
|
|
137
|
+
forGood: boolean;
|
|
138
|
+
workerId?: string;
|
|
139
|
+
nativeSessionId?: string;
|
|
140
|
+
};
|
|
105
141
|
export interface IWorkerCallerSubject {
|
|
106
142
|
kind: 'worker_launch';
|
|
107
143
|
launchId: string;
|
|
@@ -115,6 +151,10 @@ export interface IWorkerCallerSubject {
|
|
|
115
151
|
/** The fleet worker's name: what a ticket calls the worker, unless it is an active direct report. */
|
|
116
152
|
workerName: string;
|
|
117
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* A bridge enrolls with the launch its MCP configuration gave it, a Codex challenge or thread, or, holding none, its
|
|
156
|
+
* process id alone: the controller then identifies it by its process chain.
|
|
157
|
+
*/
|
|
118
158
|
export type TWorkerCallerEnrollment = {
|
|
119
159
|
bridgePid: number;
|
|
120
160
|
} & ({
|
|
@@ -125,7 +165,7 @@ export type TWorkerCallerEnrollment = {
|
|
|
125
165
|
nativeThreadId: string;
|
|
126
166
|
} | {
|
|
127
167
|
nativeThreadId: string;
|
|
128
|
-
});
|
|
168
|
+
} | Record<never, never>);
|
|
129
169
|
export interface IWorkerCallerEnrollmentResponse extends IWorkerCallerReadiness {
|
|
130
170
|
credential?: string;
|
|
131
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agl",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.9.0",
|
|
4
4
|
"controllerUpgradeManagementVersion": 2,
|
|
5
5
|
"controllerManagementProtocolVersion": 1,
|
|
6
6
|
"controllerGatewaySourcesVersion": 1,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@api.global/typedopenapi": "^0.10.2",
|
|
96
|
-
"@git.zone/tsrepo": "^2.
|
|
96
|
+
"@git.zone/tsrepo": "^2.2.0",
|
|
97
97
|
"@types/node": "26.6.6",
|
|
98
98
|
"@types/proper-lockfile": "^4.1.4",
|
|
99
99
|
"@types/ws": "8.18.1",
|
package/readme.md
CHANGED
|
@@ -1217,7 +1217,8 @@ Agent messages are attribution and the owner's control, not a security boundary:
|
|
|
1217
1217
|
| `workspace_reveal` | Show one path in a workspace attached to the calling chat: a file opens in the editor, a directory in the file tree. The path is project-relative and must lie inside the workspace's base directory. The reply is an acknowledgement and the entry type; the tool never reads a file. |
|
|
1218
1218
|
| `job_start`, `jobs_list`, `job_status` | Start a host command as a managed job that outlives chats and controller restarts, list a project's newest jobs, or read one job's state, exit code or signal, times and log size. |
|
|
1219
1219
|
| `job_tail`, `job_wait`, `job_stop` | Read a bounded range of a job's log, wait up to four minutes for it to end, or stop its whole process group. |
|
|
1220
|
-
| `
|
|
1220
|
+
| `board_overview`, `tickets_list` | Read the board at a glance (counts by column, priority, project and assignee, epic progress, what needs someone) and list it in pages of ticket summaries with filters and a sort. |
|
|
1221
|
+
| `ticket_get`, `ticket_create`, `ticket_update`, `ticket_move`, `ticket_comment`, `ticket_link` | Capture and progress shared project tickets with verified worker identity, atomic board ordering, comments, activity and branch evidence for Review. |
|
|
1221
1222
|
| `ticket_question_ask` | Ask the owner a question on the caller's own assigned ticket, with optional choices; the answer arrives in the caller's session as a ticket notice. |
|
|
1222
1223
|
|
|
1223
1224
|
To work with resources for an externally launched task, call `context_resolve` with its absolute `directory` and optional `{ harnessId, nativeId }` task ID. A raw Codex thread ID is accepted only if exactly one configured connection matches; an ambiguous ID requires selecting the qualified ID returned by `sessions_list`. Discovery records the verified native task in AGL without resuming it or acquiring its Codex writer. Subsequent operations reuse the normal UI validation, audit, admission, and ownership checks. Targets must belong to the exact project and configured native connection. Adding a project does not connect an arbitrary external harness server.
|
|
@@ -1507,7 +1508,8 @@ id: the `cwd` and name the inventory reports are where the session is now and wh
|
|
|
1507
1508
|
now, and a worker that changes into a worktree or is renamed stays observable and steerable.
|
|
1508
1509
|
|
|
1509
1510
|
Adoption by reference leaves the session's MCP configuration as it was launched, so it holds no
|
|
1510
|
-
fleet caller launch
|
|
1511
|
+
fleet caller launch: from its next tool call on, its MCP bridge is identified by its process
|
|
1512
|
+
instead (below), also after a controller restart, and its ticket writes are admitted as the worker.
|
|
1511
1513
|
`--relaunch-file FILE` adopts a settled Claude session with a verified identity instead: the
|
|
1512
1514
|
fleet resumes it under its own control as a new worker, `claude --bg --resume <id>` with the
|
|
1513
1515
|
worker's profile options, its caller overlay and the file's message after the profile preamble,
|
|
@@ -1540,7 +1542,9 @@ only `named`). It refuses a worker with a pending, unknown or lost dispatch, a r
|
|
|
1540
1542
|
predecessor or successor, a reconfirmation whose ticket comment is not saved, and a session any
|
|
1541
1543
|
worker of any owner is bound to, archived ones included. The re-bind stores `rebound` (resolver,
|
|
1542
1544
|
reason, time and proof, with the previous session and its status), drops a reconfirmation that
|
|
1543
|
-
named the previous session,
|
|
1545
|
+
named the previous session, revokes the worker's MCP caller identity once the worker names the new
|
|
1546
|
+
session (the previous session's process no longer writes as the worker; the new session's bridge
|
|
1547
|
+
is identified at its next call), and becomes an idempotent ticket comment attributed to the resolver
|
|
1544
1548
|
under `fleet:rebound:RESOLUTION_ID`; repeating the same re-bind only synchronizes that comment
|
|
1545
1549
|
from the saved record. Codex workers are not re-bound and fail closed.
|
|
1546
1550
|
|
|
@@ -2401,8 +2405,10 @@ that worker, not as the driver or anonymously:
|
|
|
2401
2405
|
generation reach only the `agl` MCP server's environment, never the Claude process's.
|
|
2402
2406
|
Once the agents listing shows the job's process, the fleet binds the launch to the job and
|
|
2403
2407
|
that process; a job that already settled after a quick turn is bound without a process. A
|
|
2404
|
-
start, wake or relaunch that fails at any step revokes its launch. Stop
|
|
2405
|
-
|
|
2408
|
+
start, wake or relaunch that fails at any step revokes its launch. Stop and archive revoke
|
|
2409
|
+
whatever caller identity the controller holds for the worker, also one the fleet never
|
|
2410
|
+
prepared (kept from before a restart, or recorded for a bridge identified by its process,
|
|
2411
|
+
below), and archive also removes the overlay. A start fails closed before Claude runs when the
|
|
2406
2412
|
Configuration master has no `agl` MCP server.
|
|
2407
2413
|
- Fleet Codex workers prepare the launch on the fleet's own connection before
|
|
2408
2414
|
`thread/start` and bind it before the first `turn/start`. Before steering a thread whose
|
|
@@ -2417,9 +2423,10 @@ that worker, not as the driver or anonymously:
|
|
|
2417
2423
|
credential). When a bridge enrolls under another process than the bound one, or after a
|
|
2418
2424
|
controller restart, the fleet reads a fresh Claude inventory (one read at a time) and the
|
|
2419
2425
|
launch is bound to the bridge's process only when the inventory lists the worker's session,
|
|
2420
|
-
once, as the same background job in exactly that process, the process runs
|
|
2421
|
-
Claude Code
|
|
2422
|
-
|
|
2426
|
+
once, as the same background job in exactly that process, the process runs an installed
|
|
2427
|
+
Claude Code release (a regular file of the controller's user in the directory of the release
|
|
2428
|
+
`claude` resolves to now; a process the launch was proved against keeps the release it runs),
|
|
2429
|
+
and the bridge is its direct child running the recorded command over its own connection. A launch a restarted controller restores is proved the same way
|
|
2423
2430
|
before its first write, also when its process still runs. Every other process stays
|
|
2424
2431
|
unverified, and a refused bridge is not proved again at every call: for the life of that
|
|
2425
2432
|
process image, or for five seconds when the job showed no process yet, the inventory could
|
|
@@ -2436,6 +2443,27 @@ that worker, not as the driver or anonymously:
|
|
|
2436
2443
|
with. Each reason an enrollment stays unverified is written once to the controller log,
|
|
2437
2444
|
naming the worker and its session, never the launch ID or a credential; a bridge refused
|
|
2438
2445
|
under both commands has both reasons, the recorded command's first.
|
|
2446
|
+
- A launch is only a hint. A bridge that presents none (a Claude session adopted by reference,
|
|
2447
|
+
whose saved options lack the overlay) or one the controller does not hold as presented
|
|
2448
|
+
(unknown, replaced, revoked, of another generation) is identified by its process chain when it
|
|
2449
|
+
enrolls before a call. All of these must hold: the bridge holds its own connection and runs the
|
|
2450
|
+
bridge command the controller approves now; the process it runs under directly, never one
|
|
2451
|
+
further up, runs an installed Claude Code release (proved before the fleet is asked, so a shell
|
|
2452
|
+
or terminal costs no inventory read), is listed exactly once by a fresh inventory of the
|
|
2453
|
+
fleet's Claude homes (those of its workers that are not archived) as the process of a
|
|
2454
|
+
background job, whose session the inventory lists once, and is unchanged across that read; and
|
|
2455
|
+
exactly one stored worker of any owner binds that session, a live Claude worker without a
|
|
2456
|
+
dispatch in flight or a lost one, under the profile home that lists it. The bridge
|
|
2457
|
+
then enrolls into the worker's current record, or into one bound to that process when the
|
|
2458
|
+
worker has none or a revoked one; a record a fleet wake prepared answers pending and is never
|
|
2459
|
+
replaced. That record is not kept in the store: after a restart the process proves itself
|
|
2460
|
+
again. A refused bridge is answered from memory for its image and its parent process, for the
|
|
2461
|
+
process's life or five seconds for a reason that may pass (an inventory that does not list that
|
|
2462
|
+
process yet, as after Claude Code moved a job to a new process, an unreadable inventory, a
|
|
2463
|
+
dispatch in flight, a worker that is not live), until the fleet adopts or re-binds a worker. A
|
|
2464
|
+
refusal read while the fleet adopted or re-bound a worker is not remembered.
|
|
2465
|
+
A bridge that gets a credential this way presents only it; without one, or when the controller
|
|
2466
|
+
rejects or fails the enrollment, it calls as before, with a caller credential it inherited, if any.
|
|
2439
2467
|
|
|
2440
2468
|
The bridge exchanges credentials only through the private controller endpoint after Linux
|
|
2441
2469
|
direct-loopback socket-inode ownership, approved executable/argv and current native
|
|
@@ -2450,7 +2478,7 @@ no generated-native-file edit is needed. The master must contain one non-secret
|
|
|
2450
2478
|
entry. Ambiguous entries, wrapper commands, static caller credentials and secret `envFrom`
|
|
2451
2479
|
definitions fail closed. Fleet owns spawning, native observations and hook calls.
|
|
2452
2480
|
|
|
2453
|
-
MCP tools are `tickets_list` (
|
|
2481
|
+
MCP tools are `board_overview` (the board at a glance), `tickets_list` (pages of summaries; filters, sort and cursor below), `ticket_get` (ticket,
|
|
2454
2482
|
questions and one page of history), `ticket_create`, `ticket_update`, `ticket_move`,
|
|
2455
2483
|
`ticket_comment`, `ticket_link` and `ticket_question_ask`. `ticket_comment.body` accepts markdown text or the
|
|
2456
2484
|
kanban's text/reference-content array. A Claude worker's assignment uses
|
|
@@ -2463,6 +2491,10 @@ cannot mutate assigned tickets, but verified callers can still read/create/comme
|
|
|
2463
2491
|
agl ticket create --project agl --title 'Add the shared board' --source 'The owner’s words' --json
|
|
2464
2492
|
agl ticket assign AGL-1 --expected-revision <revision-from-get> --session-id codex:<native-id> --name 'Backend worker' --json
|
|
2465
2493
|
agl ticket move AGL-1 --column ready --json
|
|
2494
|
+
agl ticket overview --json
|
|
2495
|
+
agl ticket page --project agl --open --sort priority --limit 20 --json
|
|
2496
|
+
agl ticket page --project agl --open --sort priority --limit 20 --cursor <nextCursor> --json
|
|
2497
|
+
agl ticket page --parent AGL-7 --json
|
|
2466
2498
|
agl ticket list --project agl --json
|
|
2467
2499
|
agl ticket link AGL-1 --repo modelprofile.com/agl --branch feat/tickets --sha <full-sha> --json
|
|
2468
2500
|
agl ticket move AGL-1 --column review --json
|
|
@@ -2476,6 +2508,29 @@ agl ticket list --label openQuestion --json
|
|
|
2476
2508
|
agl ticket answer AGL-1 --question Q1 --choice 2 --text 'Keep it **small**.' --json
|
|
2477
2509
|
```
|
|
2478
2510
|
|
|
2511
|
+
`board_overview` (`agl ticket overview`, `agl.mcp.ticket.overview`, `controller.ticket.overview`) answers the
|
|
2512
|
+
whole board in one bounded reply without any ticket's texts: `total`, `open`, counts by column, by priority
|
|
2513
|
+
(open tickets) and by AutoLabel, `projects` and `assignees` (most open work first, at most 50 beside
|
|
2514
|
+
`projectsTotal` and `assigneesTotal`), `unassignedOpen`, every open epic with its direct children (`children`,
|
|
2515
|
+
`done`, `columns`), and under `attention` the tickets that need someone: `urgent`, `needsInput`,
|
|
2516
|
+
`openQuestions`, `review`, `unassignedReady` and `stale` (in_progress, needs_input or review work without a
|
|
2517
|
+
change for `staleDays`, default 3, oldest first). `recent` holds the tickets changed last. Each list holds at
|
|
2518
|
+
most `limit` tickets (default 5, at most 50) and its `total` counts all of them. `project` and `mine` narrow it.
|
|
2519
|
+
|
|
2520
|
+
`tickets_list` (`agl ticket page`, `agl.mcp.ticket.page`, `controller.ticket.page`) lists the board in pages of
|
|
2521
|
+
`limit` tickets (default 50, at most 200; a page also ends at 256 KiB). A ticket is a summary: `key`,
|
|
2522
|
+
`revision`, `project`, `kind`, `title`, `columnId`, `priority`, `updatedAt` and, where present, `assignee`,
|
|
2523
|
+
`parentId`, `labels`, `autoLabels`, `links` (a count per kind), `releasePlan`, `deployPlan`,
|
|
2524
|
+
`maintenanceWindow` and `openQuestions`; `view: "full"` returns whole tickets. `total` and `columns` count
|
|
2525
|
+
everything the filters match, on every page. Filters: `mine`, `project`, `status`, `statuses`, `open`
|
|
2526
|
+
(`true` leaves out released and closed tickets, `false` keeps only those), `kind`, `priorities`, `parent`
|
|
2527
|
+
(direct children), `assignee` (a person id or a session id), `unassigned`, `keys` (up to 200), `updatedSince`,
|
|
2528
|
+
`label` and `text`. `sort` is `board` (default), `updated`, `created` or `priority`. `nextCursor` continues
|
|
2529
|
+
with the same filters, sort and view (`TICKET_CURSOR_MISMATCH` otherwise, `TICKET_CURSOR_INVALID` for anything
|
|
2530
|
+
that is no cursor). A cursor is a position, not a snapshot: `moved: true` tells that the board changed since
|
|
2531
|
+
the first page, so a ticket that changed its place meanwhile may be missing or shown twice. The unpaged
|
|
2532
|
+
`agl ticket list` (`agl.mcp.ticket.list`) still returns every matching ticket whole.
|
|
2533
|
+
|
|
2479
2534
|
`ticket_get` (`agl ticket get`, `agl.mcp.ticket.get`, `controller.ticket.get`) returns the
|
|
2480
2535
|
ticket, all its questions and the newest page of its history, oldest first: `activity` holds
|
|
2481
2536
|
up to `limit` entries (default 50, at most 500), cut earlier so that the entries and the comments
|
|
@@ -3486,9 +3541,10 @@ agl restart [--port 4097]
|
|
|
3486
3541
|
agl service install [startup options] | status [--json] | uninstall | protect
|
|
3487
3542
|
agl upgrade [--port 4097] [--registry <url>] [--grace-period-seconds 300] [--continue-sessions] [--json]
|
|
3488
3543
|
agl mcp [--port 4097]
|
|
3489
|
-
agl ticket list|get|create|update|move|comment|link|unlink|assign|ask|answer [options] [--json]
|
|
3544
|
+
agl ticket overview|page|list|get|create|update|move|comment|link|unlink|assign|ask|answer [options] [--json]
|
|
3490
3545
|
agl deploy status [TARGET] | history TARGET | probe TARGET [--json]
|
|
3491
3546
|
agl release status [REPO] [--json]
|
|
3547
|
+
agl push status [--json] | apns set|unset | fcm set|unset | previews on|off | test [--port 4097] [options]
|
|
3492
3548
|
agl feed list [--state failed] [--json] | acknowledge <row-id> --updated-at <ms> [--json]
|
|
3493
3549
|
agl foreground [options]
|
|
3494
3550
|
agl temp-password [--port 4097] [--ttl-hours 24]
|
|
@@ -3865,13 +3921,13 @@ Each connection of a device authenticates on its own: the controller hands it a
|
|
|
3865
3921
|
|
|
3866
3922
|
### Managing devices
|
|
3867
3923
|
|
|
3868
|
-
Settings → Devices lists every paired device with its model, when it paired, whether it is connected now and when it last connected. A device's page shows its key fingerprint and id. **Revoke** deletes the device and closes every connection of it at once with WebSocket close code 4403; the device must pair again with a new code. Moving the controller to another public origin with `agl remote set` or `agl remote unset` removes every device, since each signed the old origin; the devices go in the same transaction as the move, so a move that fails keeps them. Pairing, authentication and revocation are audited (`device.pairing.begin`, `device.pair`, `device.auth`, `device.revoke`), and every request of a device is audited under `device:<id>`.
|
|
3924
|
+
Settings → Devices lists every paired device with its model, when it paired, whether it is connected now and when it last connected. A device's page shows its key fingerprint and id. **Revoke** deletes the device and its notification registration and closes every connection of it at once with WebSocket close code 4403; the device must pair again with a new code. Moving the controller to another public origin with `agl remote set` or `agl remote unset` removes every device, since each signed the old origin; the devices and their registrations go in the same transaction as the move, so a move that fails keeps them. Pairing, authentication and revocation are audited (`device.pairing.begin`, `device.pair`, `device.auth`, `device.revoke`), and every request of a device is audited under `device:<id>`.
|
|
3869
3925
|
|
|
3870
3926
|
### The device protocol
|
|
3871
3927
|
|
|
3872
|
-
The device API is its own contract, separate from the browser's: `ts_interfaces/devices.ts` in the package, and the same contracts as JSON Schema in `ts_interfaces/devices.schema.json` (each contract's request and response,
|
|
3928
|
+
The device API is its own contract, separate from the browser's: `ts_interfaces/devices.ts` in the package, and the same contracts as JSON Schema in `ts_interfaces/devices.schema.json` (each contract's request and response, every named type they reach, the refusal codes and what a push notification carries). A device asks `device.hello` for the device protocol version (`major` 1, `minor` 4) and speaks one major; within it, changes only add. Minor 1 added MCP elicitations: `elicitations` in every `device.session.read` (empty while none is pending; each one a `form` with its `fields`, a `url` or an `unsupported` request with its `reason`) and `device.elicitation.reply`. Minor 2 added the Inbox: `device.inbox.list` and its `inbox.changed` event (the same list as the browser's, without host paths; each item says whether a device answers it: `session`, `child`, `ticket` or `none`), `device.ticket.answer` (a ticket question or a go, as the owner) and `childSessionId` on `device.permission.reply` and `device.question.reply` for a direct child the Inbox names; a client sends `childSessionId` only to a controller that answers `minor` 2 or later. Minor 3 added the driver and the direct reports: `device.driver.get`, `device.driver.seen`, `device.driver.read` and `device.driver.send`, `device.directreports.list` and `device.directreport.message`, and the events `driver.changed` and `directreports.changed`, the host's status, read-only: `device.host.get` and its `host.changed` event, and the shared board: `device.board.list`, `device.ticket.get`, `device.ticket.comment`, `device.ticket.ask` and `device.ticket.move`, and the `tickets.changed` event; a client calls them only on a controller that answers `minor` 3 or later. Minor 4 adds notifications: `device.push.register` and `device.push.unregister`, `push` on `device.host.get`'s `device` while the device is registered for them (whether it asked for direct report results, whether notifications carry previews, whether the host can send now, and the last notification that did not go out; never its token), and what a notification carries (`TDevicePushData`, one set of string values for both platforms: an Inbox item, a summary, a direct report's result and the removal of notifications whose items left the Inbox). A device does not tell the controller its minor, so a client ignores keys it does not know; the iOS (HarnessKit) and Android clients of minor 0 do. Apps generate their clients from these files.
|
|
3873
3929
|
|
|
3874
|
-
- Before it is authenticated a connection reaches `device.hello`, `device.pair`, `device.auth.challenge` and `device.auth.prove`, under the controller's limits for unauthenticated requests: per connection, and in total together with the browser's sign-in requests. After that it reaches `device.sessions.list`, `device.session.read`, `device.session.send`, `device.permission.reply`, `device.question.reply`, `device.elicitation.reply`, `device.inbox.list`, `device.ticket.answer`, `device.driver.get`, `device.driver.seen`, `device.driver.read`, `device.driver.send`, `device.directreports.list`, `device.directreport.message`, `device.host.get`, `device.board.list`, `device.ticket.get`, `device.ticket.comment`, `device.ticket.ask` and `device.ticket.move`, under the limits of the owner's browser. A device never reaches a method of the browser, and the browser never one of a device. A connection is one or the other for its whole life: a connection signed in as the browser cannot authenticate as a device, and one a device authenticated cannot sign in as the browser.
|
|
3930
|
+
- Before it is authenticated a connection reaches `device.hello`, `device.pair`, `device.auth.challenge` and `device.auth.prove`, under the controller's limits for unauthenticated requests: per connection, and in total together with the browser's sign-in requests. After that it reaches `device.sessions.list`, `device.session.read`, `device.session.send`, `device.permission.reply`, `device.question.reply`, `device.elicitation.reply`, `device.inbox.list`, `device.ticket.answer`, `device.driver.get`, `device.driver.seen`, `device.driver.read`, `device.driver.send`, `device.directreports.list`, `device.directreport.message`, `device.host.get`, `device.push.register`, `device.push.unregister`, `device.board.list`, `device.ticket.get`, `device.ticket.comment`, `device.ticket.ask` and `device.ticket.move`, under the limits of the owner's browser. A device never reaches a method of the browser, and the browser never one of a device. A connection is one or the other for its whole life: a connection signed in as the browser cannot authenticate as a device, and one a device authenticated cannot sign in as the browser.
|
|
3875
3931
|
- The feed is the sidebar's session feed without terminal rows, host directories or tickets. A transcript page reduces a tool call to its name, title and status; its input and output stay on the controller. `device.session.read` without `before` returns the newest page, sized by the controller whatever `limit` says; with `before` it returns the next older page of `limit` messages (1 to 50, default 20). A device names a session only by the feed's row id, and reaches only what the feed lists.
|
|
3876
3932
|
- A message from a device is a direct message (it queues behind a running turn), never the browser's shared draft. A native session AGL does not write to (another process runs it, a fleet worker owns it) refuses it, as it refuses the browser.
|
|
3877
3933
|
- A device answers as the owner on its own authenticated connection, audited as the device. Its Inbox lists the driver's turn and the driver's own prompts without an answer (the driver session is no feed row), and a native wait as information. A child's answer is sent only after the controller proved the child a running direct child of the session, as it does for the browser.
|
|
@@ -3879,16 +3935,41 @@ The device API is its own contract, separate from the browser's: `ts_interfaces/
|
|
|
3879
3935
|
- `device.directreports.list` lists the active direct reports as the Driver view does, each by its name, with its session as the feed names it, status, projects, ticket, newest `result:` line, open questions and the fleet workers that report to it (name, harness, status, ticket; no directories or profiles), and whether it takes a message. `device.directreport.message` sends one the owner's message as the Driver view does: a fleet worker report is steered through its ticket and answers `fleet` once the steer succeeded (a steer the fleet refused before its dispatch is refused with `direct_report_failed` and the fleet's own text, such as "Worker is archived.", or "The controller operation failed." with the failure journal's reference where a harness's own text failed it; a steer that failed after its dispatch, or whose job does not prove it sent nothing (`errorOutcome` other than `refused`), may have delivered the message and is `outcome_unknown`, "The request may have taken effect. Read again to learn whether it did before sending it again." with the failure journal's reference, which a client never sends again on its own); a Codex thread takes it as the owner's agent message, `steer` into the turn AGL runs or `next-turn`. A turn another Codex client runs is refused with `direct_report_busy` (nothing was sent), a Claude Code session the fleet does not run with `direct_report_failed`, and messages to a report faster than its agent message rate with `rate_limited`. Messages are audited as `session.message` from `Owner` for the device.
|
|
3880
3936
|
- The Host view is read-only (AGL-824): a device changes nothing on the host (no deploy or deploy probe, account, setting, upgrade or pairing). `device.host.get` answers what runs (`agl`: the AGL release, its start, its public origin, and whether a device reaches it through the gateway AGL keeps its route on, with where that route's sync stands, or through the owner's own reverse proxy; never the gateway's address, the client or the route's target), the device itself as the controller keeps it (`device`: name, model, when it paired and when it last connected; a device neither renames nor unpairs itself), the deploy targets (`deploys`: what each runs and since when, whether its probe answers, its newest release, the released versions it does not run (`undeployed`, newest first), and its planned deploys (`plans`: the ticket, the version, the owner's go and, for one queued into a maintenance window, the window's times); never a probe's address, the owner's notes on how it deploys and what a deploy interrupts, a failed probe's text, a plan's question or who deploys it, and the read runs no probe), the inference proxy's account pools (`pools`: each pool's verdict and room, and its accounts by plan and then the most used first, each only as its plan, state and the usage window it is bound by: no account id, and no order that stands in for one) and the API keys (`apiKeys`: per provider, how many keys are under their monthly spend limit, held at it, without one, or not read, judged by the rule AGL's inference proxy places by; no label, email, id or dollar amount). `deploys`, `pools` and `apiKeys` each answer `ready` or `unavailable` on their own, with the reason (`not_running`, `outdated`, or `failed` with the failure journal's `reference`), and the request still answers the others. `host.changed` (no payload) says when to read it again: the deploy targets, their planned deploys (tickets) or the accounts changed. Usage moves without an event, so a client reads it again when the Host view is opened or refreshed.
|
|
3881
3937
|
- The shared board on a device is the browser's board (AGL-1637). `device.board.list` answers one column at a time, as the browser shows its cards (the tasks; an epic and a subtask open with `device.ticket.get`), in the column's order, `limit` (1 to 100, default 50) from `offset`, filtered as the browser filters: `text` (1 to 200 characters, in the key, title, description and source words), `project`, `epic` (the epic's own tasks), `assignee` (`{ kind: 'owner' }`, `{ kind: 'unassigned' }` or a session as the feed names it) and an AutoLabel (`openQuestion`, `planned`, `undeployed`). Every column's count under the same filters comes from the same read as the page, with `total`, the projects the board's tickets name, the epics a filter may choose and the board's `revision`: when a later page answers another revision, or `tickets.changed` arrives, a client reads the board again from offset 0. `device.ticket.get` answers a ticket with its description, source words, links and parent, one page of its discussion (comments and questions together in the order they were written, newest page first, at most `limit` of 1 to 50 and 256 KiB, `before` for the next older page), where it runs (`placement`, from the deploy monitor, `unavailable` on its own as a section of `device.host.get` is) and what it plans (`plans`: the release plan, the maintenance window and the deploy plan, with where the window stands and the owner's go while the monitor answers); no history of its other changes, no source attachments, no plan's question and nothing that names who deploys it. People appear by name: the owner as `kind: 'owner'`, never the owner's account, a person's id or a session the feed does not list (the driver's own session included). `device.ticket.comment` (Markdown, at most 64 KiB as the store keeps it), `device.ticket.ask` (text alone, at most 16 KiB, answered with text) and `device.ticket.move` (to the end of a column; "Move to…" stands in for the browser's drag) run the browser board's own function as the owner, audited as `ticket.comment`, `ticket.ask` and `ticket.move` for the device; `device.ticket.answer` answers a question. The controller decides every change: a refusal changes nothing and carries the ticket store's own code (`deviceTicketRefusalCodes`, such as `ticket_review_branch_required` for a move to review without a branch) and its reason. The app then keeps the owner's draft, reads the ticket again and shows the reason; it never sends a refused change again on its own. A change whose outcome AGL cannot tell is refused as `outcome_unknown` and stays fenced: the app reads the ticket again to learn whether it happened before the owner decides, and never sends it again on its own. Creating, editing and assigning tickets stay in the browser.
|
|
3938
|
+
- Notifications (AGL-1639): `device.push.register` registers the device itself, never another, with its push service's token (`platform` `apns` with the device token as lowercase hex and its `environment`, `sandbox` or `production`, or `fcm` with the registration token) and whether it wants the direct reports' results too (`reports`). A device holds one registration, which the next one replaces, so the app registers again with its current token on every connect; the same request again changes nothing. It answers the registration as `device.host.get` shows it (`push`: `reports`, `previews`, `available`, `lastFailure`), and is taken also while the host cannot send (`available` `false`: the owner has not set the platform's credential, or Apple or Google refused it; see [Notifications](#notifications)). `device.push.unregister` ends it (`removed` says whether there was one). The token is kept only in the registration (`agl_controller_push_registrations`, one record per device, beside the device record and never in it); no answer, event, audit entry or log repeats it. Revoking the device and an origin move delete its registration with it, in the same transaction, and a start removes every registration whose device is gone.
|
|
3882
3939
|
- Every refusal of every device method carries one code of `TDeviceRefusalCode` as `error.data.code` and a message to show, whatever the controller refused it with (AGL-1670): the set is closed, and within a major it only grows. The pairing and the connection: `device_unknown` (forget the pairing), `device_pairing_invalid`, `device_pairing_unavailable`, `device_limit`, `device_already_paired`, `device_proof_invalid`, `device_challenge_invalid` and `device_authentication_required`. What the request names is gone: `session_not_found` (list the feed again), `driver_absent`, and the ticket store's `ticket_not_found` and `ticket_question_not_found`. Nothing was done because something else changed meanwhile, so read again, then decide: `concurrent_change` (among others an answer to a permission or question the session no longer holds, AGL-1687), `ticket_revision_conflict` and `direct_report_busy`. Refused by a rule, with the reason: `session_read_only` (including a session whose model or stopped message the owner resolves in the browser first), `invalid_request`, `direct_report_failed` and the ticket store's other codes (`deviceTicketRefusalCodes`). Limits: `rate_limited`, final as every refusal, and `operation_limit`. The controller: `controller_unavailable` (not ready: starting, stopping, or a harness or the Flex child not running) and `controller_failed` (a fault, always "The controller operation failed."; `error.data.reference` names the failure journal entry the owner's browser shows, and no message to a device carries a raw cause such as a socket path or a spawn error). `outcome_unknown` means the request may have happened: AGL dispatched it, or may have, and cannot tell whether it took effect. A client never resends it on its own; it keeps the owner's text, reads the session, the driver or the ticket again to learn the outcome, and the owner decides.
|
|
3883
3940
|
- The controller pushes a device an allowlist of events in their own shape: feed changes, a session's change, its streaming text (snapshots and exact deltas), Inbox changes, the driver's changes (`driver.changed` with its status, also when its transcript or prompts changed, never its streaming text), the direct reports' changes (`directreports.changed`, with no payload, also when fleet workers or tickets changed), the host's changes (`host.changed`, with no payload, when the deploy targets or the accounts changed), the board's changes (`tickets.changed`, with no ticket key and with the board's revision when it moved, followed by `directreports.changed` and `host.changed`, since tickets hold the reports' questions and the planned deploys) and a resynchronization request. Every other event, and every event about a session the feed does not list, stays on the controller. A device that falls behind by 256 events or 4 MiB is resynchronized alone: on `sessions.changed` it lists the feed and reads the open session again, an open Driver view included (the driver's own changes may have folded into it).
|
|
3884
3941
|
- Through the gateway, a device's WebSocket upgrade carries the public origin as `Origin`, like a browser's (Admission).
|
|
3885
3942
|
|
|
3943
|
+
### Notifications
|
|
3944
|
+
|
|
3945
|
+
The host sends notifications of what waits in the Inbox itself, straight to Apple's push service (APNs) and to Firebase Cloud Messaging (FCM), to each paired device that registered for them (`device.push.register`); no relay sits between. It sends with the app publisher's own credentials, which the owner gives the running controller with `agl push`, as the local owner (the same owner capability `agl config` and `agl ticket` use); there is no way to upload a key through the browser.
|
|
3946
|
+
|
|
3947
|
+
```sh
|
|
3948
|
+
agl push apns set --key-id ABC123DEFG --team-id DEF123GHIJ < AuthKey_ABC123DEFG.p8 # topic com.modelprofile.harness unless --topic names another
|
|
3949
|
+
agl push fcm set < service-account.json # the Firebase project's service account key file
|
|
3950
|
+
agl push previews on # off by default
|
|
3951
|
+
agl push status [--json]
|
|
3952
|
+
agl push test [--device DEVICE_ID] # the test notification to every registered device, with what Apple or Google answered
|
|
3953
|
+
agl push apns unset
|
|
3954
|
+
agl push fcm unset
|
|
3955
|
+
```
|
|
3956
|
+
|
|
3957
|
+
- What is sent: one notification for each item that comes into the Inbox, to every registered device of this host, also to a device that is connected (the app does not show it in the foreground) and while nobody is connected at all: with a usable credential and a registered device the Inbox is kept current without an open browser. More than four items at once are one notification ("New items wait for you in the Inbox."). An item that leaves the Inbox, answered anywhere, removes its notification from the devices, and one still waiting to be sent is dropped; a changed item sends nothing. The badge is the Inbox's count. A clean stop (`agl stop`, `agl restart`, an upgrade) hands over what was announced, and what the handover before it named that has not come back yet: after it, an item that still waits as it did is not sent again, while one that came meanwhile, or that waits anew (another wait in the same session), is. After a crash or a kill, or when the handover could not be written or read (the failure journal says so), the items still waiting are sent once more under their keys: the notification shown is replaced, and it sounds again. The handover is one document per controller (`agl_controller_push_handover`) that the next start reads and removes; an older controller does not read it. A device that asked for direct reports' results gets a quiet notification, without a badge, for each new `result:` line of a direct report that is a fleet worker.
|
|
3958
|
+
- A key is read from standard input, from a pipe or a file and never from a terminal, and checked before it is kept: an APNs key is the AuthKey .p8 file (one P-256 private key) with its 10-character key id and the team id; an FCM key is the service account's JSON key file (`type` `service_account`, `project_id`, `client_email` and an RSA `private_key` of at least 2048 bits). The file's `token_uri` and its other URLs are ignored: the host asks only Google's own endpoints. A refusal names the field and the rule, never what was given.
|
|
3959
|
+
- Each key is TPM2-sealed in the controller's database (`agl_controller_push_settings`, one document per controller, `{ id, content }`) under a name bound to the controller, the platform and the credential's generation, as the trusted-proxy secret is; it exists in plaintext only in the running controller. No answer, CLI line, log line, audit entry, event or stored byte repeats a key. Setting a credential again replaces it.
|
|
3960
|
+
- `agl push status` shows previews and, for each platform, whether its credential is `ready`, `refused` (Apple or Google refused it: nothing is sent on the platform until the owner sets it again), `unreadable` (this machine cannot unseal it: set it again) or not set, what it is for (key id, team id and topic; project and service account), when it was set and how many devices registered for the platform. Removing a credential leaves the registrations in place.
|
|
3961
|
+
- Previews are one setting for every device of the host, off unless the owner turns them on. Off, a notification says one fixed sentence per kind of item; on, it also says where the item lives, what it asks and its id, which Apple or Google can read.
|
|
3962
|
+
- Sending: APNs over HTTP/2 to `api.push.apple.com`, or `api.sandbox.push.apple.com` for a development build's token, with an ES256 provider token signed with the key (renewed after 50 minutes, within Apple's 20-to-60-minute rule) and the bundle id as topic; FCM through the HTTP v1 API, with an access token the service account's RS256 assertion gets from Google's token endpoint. An iOS notification is an alert push (thread `inbox` or `reports`, interruption level `active` or `passive`, the default sound except for a report's result, the Inbox's count as badge) carrying the payload under `agl`, with the item's key as `apns-collapse-id`; removing notifications is a background push. An Android notification is a data-only message whose values are all strings; the app builds the notification itself. Apple and Google are told a notification expires after an hour.
|
|
3963
|
+
- A send never holds up the Inbox or event delivery. A notification Apple or Google could not take for a reason that passes (they asked the host to wait, failed, or could not be reached) waits in the device's queue, in memory only: the newest per key, sent again after 1 s, doubling up to 5 minutes or as long as the service asked, and dropped once it is an hour old. A notification refused for good is dropped. A token the push service no longer knows ends the device's registration, if the device still holds that token; the app registers again on its next connect. A credential Apple or Google refuses stops its platform until the owner sets it again; Google's bare "not found", which names neither the token nor the credential, drops only that notification. A refusal that does not name the credential waits and is sent again instead: Apple calling a provider token stale that the host signed less than 20 minutes ago (the host's clock is off, or a resumed VM's was), which is signed again once Apple allows it, an answer of Google's token endpoint that names neither the service account nor its key, and Google's `invalid_grant` while the `Date` of its answer is more than 60 seconds from the host's clock (the host's clock is off: `agl push status` and the failure journal say by how much and which clock is behind; set the host's clock right, NTP). A connection to Apple that has been quiet for a minute answers a ping before the next notification goes on it, so one a NAT or firewall dropped without a word is replaced within 3 seconds. `device.host.get` shows the device whether the host can send (`available`) and its last notification that did not go out (`lastFailure`); `agl push status` shows each platform's last failed send with the push service's own code, and how far the host's clock was off when that was why. Nothing of this survives a restart, and stopping the controller ends every request and connection.
|
|
3964
|
+
- `agl push test` sends the test notification ("Push from AGL works.") to every registered device, or to the one `--device` names, and prints for each what its push service answered: `delivered`, `not sent` without a usable credential, the reason it was not delivered with the service's code, that the service no longer knows the token (the registration is then removed), or `no answer in time` when it did not answer within 20 seconds (the notification may still arrive; the command never waits longer than its request may). It names each device by its name and id, never its token.
|
|
3965
|
+
- Every change is audited: `push.apns.set` (with the key id, team id and topic in `details.push`), `push.apns.unset`, `push.fcm.set` (with the project and the service account), `push.fcm.unset` and `push.previews` (with the setting), and every `agl push test` as `push.test` (with how many devices it went to and how many got it), each with the local CLI that made it. An earlier release (41.1.0 on) reads them as audit types it does not know and starts with the collection in place.
|
|
3966
|
+
|
|
3886
3967
|
## Security Boundaries
|
|
3887
3968
|
|
|
3888
3969
|
- Local mode binds the controller to loopback only, and so does TLS-proxy mode without a gateway source. With one, a request from off loopback needs a configured gateway source address and the trusted-proxy secret, and only loopback connects without an `Origin`.
|
|
3889
3970
|
- The trusted-proxy secret is generated and TPM2-sealed in the controller's database; it is never read from the environment, written to a file or logged.
|
|
3890
3971
|
- Only `agl remote`, run by the local OS user against a stopped controller, changes a port's public origin, RP ID, TLS mode or gateway sources, and a changed origin or RP ID removes the passkey (a changed origin every paired device too).
|
|
3891
|
-
- A paired device holds its own key; the controller stores only its public key. A device reaches only the device scope (feed, bounded reads, direct sends, permission, question and elicitation answers, the Inbox and ticket answers, the driver and the direct reports, the host's status, read-only,
|
|
3972
|
+
- A paired device holds its own key; the controller stores only its public key. A device reaches only the device scope (feed, bounded reads, direct sends, permission, question and elicitation answers, the Inbox and ticket answers, the driver and the direct reports, the host's status, read-only, the shared board's comments, questions and moves, as the owner, and its own notification registration, whose push token it never reads back), each connection proves the key over a fresh nonce, and revoking a device closes its connections at once. Pairing codes are single-use, live five minutes in memory only, and pairing is refused in local mode.
|
|
3892
3973
|
- The private OpenCode server always remains on loopback and uses a generated per-process password.
|
|
3893
3974
|
- Application RPC starts only after the exact TypedSocket package-major handshake.
|
|
3894
3975
|
- The management endpoint (`/management/typedrequest`, used by the CLI and the upgrade worker) answers only an HTTP `POST` of `application/json` from a loopback peer (`127.0.0.1` or `::1`), addressed to `127.0.0.1:<port>`, with no `Origin` and no forwarding header (`Forwarded`, `X-Forwarded-*`, `X-Real-IP`, `X-Harness-Controller-Proxy-Secret`), so a browser or a request a proxy forwards is refused, also in proxy mode. It serves only the status read and the upgrade methods; each upgrade method authorises itself against the upgrade token and its one-time grant, as it does over the socket, and every upgrade request counts against the controller's global unauthenticated preflight limit.
|