agl 43.9.0 → 43.10.1
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 +20 -0
- package/dist_serve/bundle.js +997 -975
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/aglapi/aglapisurface.document.js +3 -3
- package/dist_ts/classes.accountsactions.d.ts +3 -1
- package/dist_ts/classes.accountsactions.js +17 -1
- package/dist_ts/classes.authstore.d.ts +6 -0
- package/dist_ts/classes.authstore.js +8 -1
- package/dist_ts/classes.controller.d.ts +7 -1
- package/dist_ts/classes.controller.js +39 -7
- package/dist_ts/classes.inferencegateway.js +7 -5
- package/dist_ts/classes.inferenceplacement.d.ts +1 -1
- package/dist_ts/classes.inferencerouter.d.ts +20 -3
- package/dist_ts/classes.inferencerouter.js +37 -10
- package/dist_ts/classes.inferenceservice.js +2 -2
- package/dist_ts/classes.mcpcallerregistry.d.ts +19 -1
- package/dist_ts/classes.mcpcallerregistry.js +33 -7
- package/dist_ts/classes.terminalcallers.d.ts +40 -0
- package/dist_ts/classes.terminalcallers.js +90 -0
- package/dist_ts/classes.terminalmanager.d.ts +20 -1
- package/dist_ts/classes.terminalmanager.js +36 -2
- package/dist_ts/classes.ticketnotifier.d.ts +2 -2
- package/dist_ts/classes.ticketnotifier.js +6 -4
- package/dist_ts/classes.ticketorderspread.d.ts +25 -0
- package/dist_ts/classes.ticketorderspread.js +52 -0
- package/dist_ts/classes.ticketstore.d.ts +60 -5
- package/dist_ts/classes.ticketstore.js +176 -40
- package/dist_ts/classes.workercallers.d.ts +40 -2
- package/dist_ts/classes.workercallers.js +156 -30
- package/dist_ts/fleet/classes.boardpump.d.ts +1 -1
- package/dist_ts/fleet/classes.boardpump.js +4 -2
- package/dist_ts/fleet/classes.claudeworkers.d.ts +18 -5
- package/dist_ts/fleet/classes.claudeworkers.js +105 -31
- package/dist_ts/fleet/classes.ticketeffects.d.ts +11 -0
- package/dist_ts/fleet/classes.ticketeffects.js +28 -1
- package/dist_ts/fleet/classes.workers.d.ts +23 -4
- package/dist_ts/fleet/classes.workers.js +65 -18
- package/dist_ts/fleet/functions.workervalidation.js +7 -4
- package/dist_ts/fleet/interfaces.workers.d.ts +16 -2
- package/dist_ts/fleet/interfaces.workers.js +8 -1
- package/dist_ts/functions.fleetworkercli.d.ts +3 -1
- package/dist_ts/functions.fleetworkercli.js +6 -2
- package/dist_ts/functions.inferencecli.js +4 -1
- package/dist_ts/functions.mcpfleetworkertools.js +3 -3
- package/dist_ts/functions.proxycapacity.d.ts +2 -1
- package/dist_ts/functions.proxycapacity.js +6 -3
- package/dist_ts/functions.proxycapacitycli.js +2 -2
- package/dist_ts/functions.workerprocessproof.d.ts +6 -0
- package/dist_ts/functions.workerprocessproof.js +8 -3
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +2 -1
- package/dist_ts/interfaces.flexipc.d.ts +3 -1
- package/dist_ts/interfaces.flexipc.js +1 -1
- package/dist_ts_authswitch/authority-contract.d.ts +25 -0
- package/dist_ts_authswitch/authority-contract.js +1 -1
- package/dist_ts_authswitch/authority-overview.d.ts +7 -0
- package/dist_ts_authswitch/authority-overview.js +10 -6
- package/dist_ts_authswitch/authority-placement.d.ts +5 -2
- package/dist_ts_authswitch/authority-placement.js +6 -3
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +6 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +26 -1
- package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritycli.js +50 -4
- package/dist_ts_authswitch/classes.authorityclient.d.ts +3 -1
- package/dist_ts_authswitch/classes.authorityclient.js +9 -4
- package/dist_ts_authswitch/classes.authoritydaemon.js +7 -1
- package/dist_ts_authswitch/classes.authoritydatabase.js +5 -1
- package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritymodels.js +13 -6
- package/dist_ts_interfaces/fleetworkers.d.ts +26 -1
- package/dist_ts_interfaces/fleetworkers.js +1 -1
- package/dist_ts_interfaces/interfaces.d.ts +4 -2
- package/dist_ts_interfaces/interfaces.js +1 -1
- package/dist_ts_interfaces/mcprequests.d.ts +2 -1
- package/dist_ts_interfaces/mcprequests.js +3 -2
- package/dist_ts_interfaces/proxycapacity.d.ts +1 -1
- package/dist_ts_interfaces/requests.accounts.d.ts +19 -0
- package/dist_ts_interfaces/requests.accounts.js +1 -1
- package/dist_ts_interfaces/requests.d.ts +2 -2
- package/dist_ts_interfaces/requests.fleetworkers.d.ts +3 -1
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_migration/classes.documentmigrationrunner.d.ts +8 -1
- package/dist_ts_migration/classes.documentmigrationrunner.js +11 -2
- package/dist_ts_migration/index.d.ts +1 -0
- package/dist_ts_migration/index.js +2 -1
- package/dist_ts_migration/v41_ticketclosedcolumn.js +7 -3
- package/dist_ts_migration/v43_ticketorderstride.d.ts +54 -0
- package/dist_ts_migration/v43_ticketorderstride.js +161 -0
- package/docs/authswitch.md +22 -0
- package/package.json +1 -1
- package/readme.md +71 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +2 -2
- package/ts/classes.accountsactions.ts +25 -0
- package/ts/classes.authstore.ts +9 -0
- package/ts/classes.controller.ts +37 -3
- package/ts/classes.inferencegateway.ts +6 -4
- package/ts/classes.inferenceplacement.ts +1 -1
- package/ts/classes.inferencerouter.ts +49 -10
- package/ts/classes.inferenceservice.ts +1 -1
- package/ts/classes.mcpcallerregistry.ts +49 -7
- package/ts/classes.terminalcallers.ts +91 -0
- package/ts/classes.terminalmanager.ts +41 -1
- package/ts/classes.ticketnotifier.ts +5 -3
- package/ts/classes.ticketorderspread.ts +50 -0
- package/ts/classes.ticketstore.ts +164 -35
- package/ts/classes.workercallers.ts +183 -30
- package/ts/fleet/classes.boardpump.ts +3 -2
- package/ts/fleet/classes.claudeworkers.ts +101 -29
- package/ts/fleet/classes.ticketeffects.ts +25 -0
- package/ts/fleet/classes.workers.ts +62 -17
- package/ts/fleet/functions.workervalidation.ts +6 -3
- package/ts/fleet/interfaces.workers.ts +16 -2
- package/ts/functions.fleetworkercli.ts +5 -1
- package/ts/functions.inferencecli.ts +2 -0
- package/ts/functions.mcpfleetworkertools.ts +2 -2
- package/ts/functions.proxycapacity.ts +5 -2
- package/ts/functions.proxycapacitycli.ts +1 -1
- package/ts/functions.workerprocessproof.ts +10 -2
- package/ts/interfaces.auth.ts +1 -0
- package/ts/interfaces.flexipc.ts +3 -1
- package/ts_authswitch/authority-contract.ts +20 -0
- package/ts_authswitch/authority-overview.ts +17 -6
- package/ts_authswitch/authority-placement.ts +7 -3
- package/ts_authswitch/classes.authoritybroker.ts +24 -0
- package/ts_authswitch/classes.authoritycli.ts +58 -4
- package/ts_authswitch/classes.authorityclient.ts +11 -4
- package/ts_authswitch/classes.authoritydaemon.ts +8 -1
- package/ts_authswitch/classes.authoritydatabase.ts +3 -0
- package/ts_authswitch/classes.authoritymodels.ts +12 -4
- package/ts_interfaces/fleetworkers.ts +26 -1
- package/ts_interfaces/interfaces.ts +4 -2
- package/ts_interfaces/mcprequests.ts +2 -1
- package/ts_interfaces/proxycapacity.ts +1 -1
- package/ts_interfaces/requests.accounts.ts +17 -0
- package/ts_interfaces/requests.fleetworkers.ts +3 -1
- package/ts_interfaces/requests.ts +2 -0
- package/ts_migration/classes.documentmigrationrunner.ts +12 -1
- package/ts_migration/index.ts +1 -0
- package/ts_migration/v41_ticketclosedcolumn.ts +6 -2
- package/ts_migration/v43_ticketorderstride.ts +156 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/accounts.templates.ts +12 -2
- package/ts_web/classes.accountsreadmodel.ts +42 -6
- package/ts_web/elements.accounts.ts +45 -3
- package/ts_web/elements.harnesscontrollerapp.ts +6 -1
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import * as plugins from './plugins.js';
|
|
1
2
|
import { ticketErrorMessages, type ITicket, type ITicketActor, type ITicketActivity, type ITicketFilters, type ITicketPerson, type ITicketQuestion, type TTicketLink, type TTicketOperation, type TTicketRequest, type TTicketResponse, type TTicketFleetEvent, type ITicketFleetEventResult, type TTicketData, type ITicketOpenQuestion, type TTicketAutoLabel, type ITicketAsk, type ITicketMaintenanceWindow, ticketPageErrorMessages } from '../dist_ts_interfaces/tickets.js';
|
|
3
|
+
type TSession = plugins.nosqldb.SmartdataSession;
|
|
2
4
|
/**
|
|
3
5
|
* Activity records a history page reads at a time, newest first: a page reads at most this many records beyond the
|
|
4
6
|
* entries it returns, whatever its `limit`, so a page cut by the byte budget does not read `limit` records.
|
|
5
7
|
*/
|
|
6
8
|
export declare const ticketHistoryBatch = 16;
|
|
9
|
+
/**
|
|
10
|
+
* The gap a ticket placed at the end of a column leaves after the last one (AGL-1907). A ticket's `order` is a sparse,
|
|
11
|
+
* non-negative integer sort key: only its value relative to the other tickets of its column means anything, never a
|
|
12
|
+
* position or a count. A placement before another ticket takes the integer halfway into the gap before it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ticketOrderStride = 1024;
|
|
7
15
|
/** One change a committed ticket transaction made, or an edit it refused as stale. */
|
|
8
16
|
export interface ITicketChange {
|
|
9
17
|
/** The ticket after the change; for a refused edit, the ticket the edit missed. */
|
|
@@ -147,6 +155,30 @@ export declare class TicketStore {
|
|
|
147
155
|
*/
|
|
148
156
|
driverCommentSessions(nativeIdsArg: string[], signalArg?: AbortSignal): Promise<Set<string>>;
|
|
149
157
|
execute<TMethod extends TTicketOperation>(methodArg: TMethod, requestArg: TTicketRequest<TMethod>, actorArg: ITicketActor | undefined, signalArg?: AbortSignal): Promise<TTicketResponse<TMethod>>;
|
|
158
|
+
/**
|
|
159
|
+
* One transaction of a ticket migration that runs on a live board (AGL-1907's order spread, after the controller is
|
|
160
|
+
* ready). `stepArg` reads and writes in it through the session it is given, and calls `fenceArg` before its first
|
|
161
|
+
* ticket write (a second call does nothing): the board's revision then moves by one through the fence every mutation
|
|
162
|
+
* takes, so the one board document orders the step with every mutation. Whichever of two transactions that read the
|
|
163
|
+
* board writes it second meets a write conflict, which the driver answers by running that transaction again on the
|
|
164
|
+
* new board within the 20 s deadline: a mutation that loses to a step re-runs and succeeds, and so does a step that
|
|
165
|
+
* loses to a mutation. After the commit `onChanged` tells everyone of the new revision and of the tickets the step
|
|
166
|
+
* answers, as after a mutation; a step writes no history, so no observer hears of it. A step that did not fence changed
|
|
167
|
+
* no ticket and tells nobody. Answers the step's result.
|
|
168
|
+
*/
|
|
169
|
+
migrate<TResult>(stepArg: (sessionArg: TSession, fenceArg: () => Promise<void>) => Promise<{
|
|
170
|
+
ticketIds: string[];
|
|
171
|
+
result: TResult;
|
|
172
|
+
}>, signalArg?: AbortSignal): Promise<TResult>;
|
|
173
|
+
/**
|
|
174
|
+
* The board fence, the store's one write of the board's revision: it moves by one (and the sequence too for a create)
|
|
175
|
+
* in the transaction of every mutation and of every migration step on a live board (`migrate`), before any ticket
|
|
176
|
+
* write. The versioned ticket migrations that fence on their own are the exception: v38 owner principal, v41 closed
|
|
177
|
+
* column, v41 link repos (after `ready`, on the live board) and v43 actor names move it with their own `transition`.
|
|
178
|
+
* A race with another transaction surfaces as the database's write conflict, which the driver answers by running the
|
|
179
|
+
* transaction again (`migrate` says how).
|
|
180
|
+
*/
|
|
181
|
+
private fence;
|
|
150
182
|
private observe;
|
|
151
183
|
private track;
|
|
152
184
|
/**
|
|
@@ -155,8 +187,28 @@ export declare class TicketStore {
|
|
|
155
187
|
*/
|
|
156
188
|
private countOpenQuestions;
|
|
157
189
|
private ticket;
|
|
158
|
-
/**
|
|
159
|
-
|
|
190
|
+
/**
|
|
191
|
+
* The ticket last in a column, `excludeArg` (the ticket being placed) left out: one document, `ticket_column_order`
|
|
192
|
+
* read backwards. The store keeps the orders of a column distinct, so the last order is the column's end.
|
|
193
|
+
*/
|
|
194
|
+
private lastInColumn;
|
|
195
|
+
/**
|
|
196
|
+
* The order a ticket placed at the end of a column takes: `ticketOrderStride` after the last one's, or
|
|
197
|
+
* `ticketOrderStride` in an empty column.
|
|
198
|
+
*/
|
|
199
|
+
private columnEnd;
|
|
200
|
+
/**
|
|
201
|
+
* Where a ticket goes before an anchor at order `anchorArg` when the ticket before it holds `previousArg` (−1 for none)
|
|
202
|
+
* and no integer is free between them: the shorter of two runs moves by one. Either the anchor and the tickets right
|
|
203
|
+
* above it move up to the first integer none of them holds, and the ticket takes the anchor's order (`step` 1), or the
|
|
204
|
+
* ticket before the anchor and those right below it move down to the first free integer from 0 on, and the ticket
|
|
205
|
+
* takes that one's order (`step` −1); with every integer from 0 to `previousArg` held, only the first is possible.
|
|
206
|
+
* `excludeArg`, the ticket being placed, is left out of both, so its own order is free on either side. Both runs are
|
|
207
|
+
* read by order range through `ticket_column_order`, nearest the anchor first, one range of each per round, each round
|
|
208
|
+
* twice the last (at most 512 orders). The rounds stop when the first run ends, which is the shorter, so the longer
|
|
209
|
+
* side is read no further than the shorter run needs, never to the column's end. A range holds every ticket of its orders.
|
|
210
|
+
*/
|
|
211
|
+
private orderShift;
|
|
160
212
|
private paged;
|
|
161
213
|
private questions;
|
|
162
214
|
private allTickets;
|
|
@@ -209,9 +261,12 @@ export declare class TicketStore {
|
|
|
209
261
|
history(ticketIdArg: string, signalArg?: AbortSignal): Promise<ITicketHistory>;
|
|
210
262
|
/**
|
|
211
263
|
* Each operation reads what it decides on and nothing more: the listing operations (list, board, search, page, overview) read the whole board and every
|
|
212
|
-
* open question; create the parent and the
|
|
213
|
-
*
|
|
214
|
-
*
|
|
264
|
+
* open question; create the parent and the last ticket of its column; move the ticket and, in the destination, the
|
|
265
|
+
* last ticket or the anchor and the ticket before it, plus, only when no integer is free between them, both sides of
|
|
266
|
+
* them a range at a time until the shorter run ends (never the column it leaves, which it does not write either);
|
|
267
|
+
* update the ticket, its parent and, when the project changes, its children; every other operation one ticket, and get
|
|
268
|
+
* one page of its history or, with `commentId`, that one comment. The board document's revision transition in the caller orders every mutation.
|
|
215
269
|
*/
|
|
216
270
|
private perform;
|
|
217
271
|
}
|
|
272
|
+
export {};
|