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.
Files changed (147) hide show
  1. package/changelog.md +20 -0
  2. package/dist_serve/bundle.js +997 -975
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_ts/00_commitinfo_data.js +2 -2
  5. package/dist_ts/aglapi/aglapisurface.document.js +3 -3
  6. package/dist_ts/classes.accountsactions.d.ts +3 -1
  7. package/dist_ts/classes.accountsactions.js +17 -1
  8. package/dist_ts/classes.authstore.d.ts +6 -0
  9. package/dist_ts/classes.authstore.js +8 -1
  10. package/dist_ts/classes.controller.d.ts +7 -1
  11. package/dist_ts/classes.controller.js +39 -7
  12. package/dist_ts/classes.inferencegateway.js +7 -5
  13. package/dist_ts/classes.inferenceplacement.d.ts +1 -1
  14. package/dist_ts/classes.inferencerouter.d.ts +20 -3
  15. package/dist_ts/classes.inferencerouter.js +37 -10
  16. package/dist_ts/classes.inferenceservice.js +2 -2
  17. package/dist_ts/classes.mcpcallerregistry.d.ts +19 -1
  18. package/dist_ts/classes.mcpcallerregistry.js +33 -7
  19. package/dist_ts/classes.terminalcallers.d.ts +40 -0
  20. package/dist_ts/classes.terminalcallers.js +90 -0
  21. package/dist_ts/classes.terminalmanager.d.ts +20 -1
  22. package/dist_ts/classes.terminalmanager.js +36 -2
  23. package/dist_ts/classes.ticketnotifier.d.ts +2 -2
  24. package/dist_ts/classes.ticketnotifier.js +6 -4
  25. package/dist_ts/classes.ticketorderspread.d.ts +25 -0
  26. package/dist_ts/classes.ticketorderspread.js +52 -0
  27. package/dist_ts/classes.ticketstore.d.ts +60 -5
  28. package/dist_ts/classes.ticketstore.js +176 -40
  29. package/dist_ts/classes.workercallers.d.ts +40 -2
  30. package/dist_ts/classes.workercallers.js +156 -30
  31. package/dist_ts/fleet/classes.boardpump.d.ts +1 -1
  32. package/dist_ts/fleet/classes.boardpump.js +4 -2
  33. package/dist_ts/fleet/classes.claudeworkers.d.ts +18 -5
  34. package/dist_ts/fleet/classes.claudeworkers.js +105 -31
  35. package/dist_ts/fleet/classes.ticketeffects.d.ts +11 -0
  36. package/dist_ts/fleet/classes.ticketeffects.js +28 -1
  37. package/dist_ts/fleet/classes.workers.d.ts +23 -4
  38. package/dist_ts/fleet/classes.workers.js +65 -18
  39. package/dist_ts/fleet/functions.workervalidation.js +7 -4
  40. package/dist_ts/fleet/interfaces.workers.d.ts +16 -2
  41. package/dist_ts/fleet/interfaces.workers.js +8 -1
  42. package/dist_ts/functions.fleetworkercli.d.ts +3 -1
  43. package/dist_ts/functions.fleetworkercli.js +6 -2
  44. package/dist_ts/functions.inferencecli.js +4 -1
  45. package/dist_ts/functions.mcpfleetworkertools.js +3 -3
  46. package/dist_ts/functions.proxycapacity.d.ts +2 -1
  47. package/dist_ts/functions.proxycapacity.js +6 -3
  48. package/dist_ts/functions.proxycapacitycli.js +2 -2
  49. package/dist_ts/functions.workerprocessproof.d.ts +6 -0
  50. package/dist_ts/functions.workerprocessproof.js +8 -3
  51. package/dist_ts/interfaces.auth.d.ts +1 -1
  52. package/dist_ts/interfaces.auth.js +2 -1
  53. package/dist_ts/interfaces.flexipc.d.ts +3 -1
  54. package/dist_ts/interfaces.flexipc.js +1 -1
  55. package/dist_ts_authswitch/authority-contract.d.ts +25 -0
  56. package/dist_ts_authswitch/authority-contract.js +1 -1
  57. package/dist_ts_authswitch/authority-overview.d.ts +7 -0
  58. package/dist_ts_authswitch/authority-overview.js +10 -6
  59. package/dist_ts_authswitch/authority-placement.d.ts +5 -2
  60. package/dist_ts_authswitch/authority-placement.js +6 -3
  61. package/dist_ts_authswitch/classes.authoritybroker.d.ts +6 -0
  62. package/dist_ts_authswitch/classes.authoritybroker.js +26 -1
  63. package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
  64. package/dist_ts_authswitch/classes.authoritycli.js +50 -4
  65. package/dist_ts_authswitch/classes.authorityclient.d.ts +3 -1
  66. package/dist_ts_authswitch/classes.authorityclient.js +9 -4
  67. package/dist_ts_authswitch/classes.authoritydaemon.js +7 -1
  68. package/dist_ts_authswitch/classes.authoritydatabase.js +5 -1
  69. package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
  70. package/dist_ts_authswitch/classes.authoritymodels.js +13 -6
  71. package/dist_ts_interfaces/fleetworkers.d.ts +26 -1
  72. package/dist_ts_interfaces/fleetworkers.js +1 -1
  73. package/dist_ts_interfaces/interfaces.d.ts +4 -2
  74. package/dist_ts_interfaces/interfaces.js +1 -1
  75. package/dist_ts_interfaces/mcprequests.d.ts +2 -1
  76. package/dist_ts_interfaces/mcprequests.js +3 -2
  77. package/dist_ts_interfaces/proxycapacity.d.ts +1 -1
  78. package/dist_ts_interfaces/requests.accounts.d.ts +19 -0
  79. package/dist_ts_interfaces/requests.accounts.js +1 -1
  80. package/dist_ts_interfaces/requests.d.ts +2 -2
  81. package/dist_ts_interfaces/requests.fleetworkers.d.ts +3 -1
  82. package/dist_ts_interfaces/requests.js +1 -1
  83. package/dist_ts_migration/classes.documentmigrationrunner.d.ts +8 -1
  84. package/dist_ts_migration/classes.documentmigrationrunner.js +11 -2
  85. package/dist_ts_migration/index.d.ts +1 -0
  86. package/dist_ts_migration/index.js +2 -1
  87. package/dist_ts_migration/v41_ticketclosedcolumn.js +7 -3
  88. package/dist_ts_migration/v43_ticketorderstride.d.ts +54 -0
  89. package/dist_ts_migration/v43_ticketorderstride.js +161 -0
  90. package/docs/authswitch.md +22 -0
  91. package/package.json +1 -1
  92. package/readme.md +71 -4
  93. package/ts/00_commitinfo_data.ts +1 -1
  94. package/ts/aglapi/aglapisurface.document.ts +2 -2
  95. package/ts/classes.accountsactions.ts +25 -0
  96. package/ts/classes.authstore.ts +9 -0
  97. package/ts/classes.controller.ts +37 -3
  98. package/ts/classes.inferencegateway.ts +6 -4
  99. package/ts/classes.inferenceplacement.ts +1 -1
  100. package/ts/classes.inferencerouter.ts +49 -10
  101. package/ts/classes.inferenceservice.ts +1 -1
  102. package/ts/classes.mcpcallerregistry.ts +49 -7
  103. package/ts/classes.terminalcallers.ts +91 -0
  104. package/ts/classes.terminalmanager.ts +41 -1
  105. package/ts/classes.ticketnotifier.ts +5 -3
  106. package/ts/classes.ticketorderspread.ts +50 -0
  107. package/ts/classes.ticketstore.ts +164 -35
  108. package/ts/classes.workercallers.ts +183 -30
  109. package/ts/fleet/classes.boardpump.ts +3 -2
  110. package/ts/fleet/classes.claudeworkers.ts +101 -29
  111. package/ts/fleet/classes.ticketeffects.ts +25 -0
  112. package/ts/fleet/classes.workers.ts +62 -17
  113. package/ts/fleet/functions.workervalidation.ts +6 -3
  114. package/ts/fleet/interfaces.workers.ts +16 -2
  115. package/ts/functions.fleetworkercli.ts +5 -1
  116. package/ts/functions.inferencecli.ts +2 -0
  117. package/ts/functions.mcpfleetworkertools.ts +2 -2
  118. package/ts/functions.proxycapacity.ts +5 -2
  119. package/ts/functions.proxycapacitycli.ts +1 -1
  120. package/ts/functions.workerprocessproof.ts +10 -2
  121. package/ts/interfaces.auth.ts +1 -0
  122. package/ts/interfaces.flexipc.ts +3 -1
  123. package/ts_authswitch/authority-contract.ts +20 -0
  124. package/ts_authswitch/authority-overview.ts +17 -6
  125. package/ts_authswitch/authority-placement.ts +7 -3
  126. package/ts_authswitch/classes.authoritybroker.ts +24 -0
  127. package/ts_authswitch/classes.authoritycli.ts +58 -4
  128. package/ts_authswitch/classes.authorityclient.ts +11 -4
  129. package/ts_authswitch/classes.authoritydaemon.ts +8 -1
  130. package/ts_authswitch/classes.authoritydatabase.ts +3 -0
  131. package/ts_authswitch/classes.authoritymodels.ts +12 -4
  132. package/ts_interfaces/fleetworkers.ts +26 -1
  133. package/ts_interfaces/interfaces.ts +4 -2
  134. package/ts_interfaces/mcprequests.ts +2 -1
  135. package/ts_interfaces/proxycapacity.ts +1 -1
  136. package/ts_interfaces/requests.accounts.ts +17 -0
  137. package/ts_interfaces/requests.fleetworkers.ts +3 -1
  138. package/ts_interfaces/requests.ts +2 -0
  139. package/ts_migration/classes.documentmigrationrunner.ts +12 -1
  140. package/ts_migration/index.ts +1 -0
  141. package/ts_migration/v41_ticketclosedcolumn.ts +6 -2
  142. package/ts_migration/v43_ticketorderstride.ts +156 -0
  143. package/ts_web/00_commitinfo_data.ts +1 -1
  144. package/ts_web/accounts.templates.ts +12 -2
  145. package/ts_web/classes.accountsreadmodel.ts +42 -6
  146. package/ts_web/elements.accounts.ts +45 -3
  147. 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
- /** The tickets of one column, by id; the board's `ticket_column_order` index serves it. */
159
- private columnTickets;
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 destination column's count; move the source and destination columns;
213
- * update the ticket, its parent and, when the project changes, its children; every other operation one ticket, and
214
- * get one page of its history or, with `commentId`, that one comment. The board document's revision transition in the caller orders every mutation.
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 {};