agl 40.6.0 → 41.0.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.
Files changed (82) hide show
  1. package/changelog.md +33 -0
  2. package/dist_serve/bundle.js +3514 -3357
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +58 -32
  5. package/dist_serve/bundle.js.third-party-notices.txt +108 -33
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/aglapi/aglapisurface.document.js +64 -37
  8. package/dist_ts/classes.controller.d.ts +8 -0
  9. package/dist_ts/classes.controller.js +109 -21
  10. package/dist_ts/classes.controllereventdelivery.d.ts +72 -0
  11. package/dist_ts/classes.controllereventdelivery.js +233 -0
  12. package/dist_ts/classes.flexmodels.public.js +4 -1
  13. package/dist_ts/classes.flexprojectionreader.d.ts +6 -0
  14. package/dist_ts/classes.flexprojectionreader.js +29 -5
  15. package/dist_ts/classes.flexservice.d.ts +2 -1
  16. package/dist_ts/classes.flexservice.js +34 -6
  17. package/dist_ts/classes.flexstore.d.ts +41 -4
  18. package/dist_ts/classes.flexstore.js +266 -203
  19. package/dist_ts/classes.ticketnotifier.js +4 -2
  20. package/dist_ts/classes.ticketstore.d.ts +50 -2
  21. package/dist_ts/classes.ticketstore.js +195 -78
  22. package/dist_ts/driver/classes.drivereventrelay.d.ts +13 -1
  23. package/dist_ts/driver/classes.drivereventrelay.js +99 -6
  24. package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
  25. package/dist_ts/driver/functions.driverinstructions.js +1 -1
  26. package/dist_ts/driver/functions.drivertools.d.ts +11 -2
  27. package/dist_ts/driver/functions.drivertools.js +19 -9
  28. package/dist_ts/fleet/classes.boardpump.d.ts +8 -2
  29. package/dist_ts/fleet/classes.boardpump.js +38 -20
  30. package/dist_ts/fleet/classes.ticketeffects.d.ts +17 -2
  31. package/dist_ts/fleet/classes.ticketeffects.js +16 -10
  32. package/dist_ts/fleet/classes.workers.d.ts +4 -0
  33. package/dist_ts/fleet/classes.workers.js +37 -17
  34. package/dist_ts/fleet/functions.workervalidation.js +2 -2
  35. package/dist_ts/functions.flexprivatesnapshot.d.ts +102 -0
  36. package/dist_ts/functions.flexprivatesnapshot.js +461 -0
  37. package/dist_ts/functions.mcptickettools.d.ts +3 -0
  38. package/dist_ts/functions.mcptickettools.js +2 -2
  39. package/dist_ts/functions.ticketcli.d.ts +1 -1
  40. package/dist_ts/functions.ticketcli.js +8 -4
  41. package/dist_ts/functions.ticketvalidation.d.ts +3 -0
  42. package/dist_ts/functions.ticketvalidation.js +7 -4
  43. package/dist_ts/interfaces.flexipc.d.ts +21 -2
  44. package/dist_ts/interfaces.flexipc.js +33 -16
  45. package/dist_ts_interfaces/fleetworkers.d.ts +6 -0
  46. package/dist_ts_interfaces/interfaces.d.ts +1 -1
  47. package/dist_ts_interfaces/interfaces.js +1 -1
  48. package/dist_ts_interfaces/requests.tickets.d.ts +8 -12
  49. package/dist_ts_interfaces/tickets.d.ts +37 -9
  50. package/dist_ts_interfaces/tickets.js +7 -1
  51. package/package.json +7 -7
  52. package/readme.md +54 -10
  53. package/ts/00_commitinfo_data.ts +1 -1
  54. package/ts/aglapi/aglapisurface.document.ts +63 -36
  55. package/ts/classes.controller.ts +131 -31
  56. package/ts/classes.controllereventdelivery.ts +289 -0
  57. package/ts/classes.flexmodels.public.ts +10 -0
  58. package/ts/classes.flexprojectionreader.ts +30 -3
  59. package/ts/classes.flexservice.ts +33 -5
  60. package/ts/classes.flexstore.ts +381 -246
  61. package/ts/classes.ticketnotifier.ts +3 -1
  62. package/ts/classes.ticketstore.ts +201 -75
  63. package/ts/driver/classes.drivereventrelay.ts +89 -4
  64. package/ts/driver/functions.driverinstructions.ts +1 -1
  65. package/ts/driver/functions.drivertools.ts +22 -8
  66. package/ts/fleet/classes.boardpump.ts +51 -19
  67. package/ts/fleet/classes.ticketeffects.ts +25 -11
  68. package/ts/fleet/classes.workers.ts +28 -16
  69. package/ts/fleet/functions.workervalidation.ts +1 -1
  70. package/ts/functions.flexprivatesnapshot.ts +601 -0
  71. package/ts/functions.mcptickettools.ts +1 -1
  72. package/ts/functions.ticketcli.ts +7 -3
  73. package/ts/functions.ticketvalidation.ts +7 -3
  74. package/ts/interfaces.flexipc.ts +50 -21
  75. package/ts_interfaces/fleetworkers.ts +6 -0
  76. package/ts_interfaces/interfaces.ts +1 -1
  77. package/ts_interfaces/requests.tickets.ts +9 -6
  78. package/ts_interfaces/tickets.ts +32 -1
  79. package/ts_web/00_commitinfo_data.ts +1 -1
  80. package/ts_web/elements.harnesscontrollerapp.ts +19 -8
  81. package/ts_web/elements.ticketboard.ts +16 -4
  82. package/ts_web/settings.general.ts +10 -4
@@ -107,13 +107,26 @@ export interface IFlexTranscriptBuild {
107
107
  /** A record for every message the transcript lists, oldest first. */
108
108
  records: IFlexPublicMessageRecordDocument[];
109
109
  }
110
+ /**
111
+ * What a transcript build asks of each message: the id of its record, the size of its JSON and
112
+ * its stand-in when it is oversized. A store answers from what it cached per stored message.
113
+ */
114
+ export interface IFlexTranscriptMessageRecords {
115
+ /** The id of the public record of `messageArg` at `messageIndexArg`. */
116
+ recordId(messageIndexArg: number, messageArg: TFlexMessage): string;
117
+ /** The UTF-8 bytes of `messageArg`'s JSON. */
118
+ messageBytes(messageArg: TFlexMessage): number;
119
+ /** The public stand-in of an oversized message, within `budgetArg` serialized bytes. */
120
+ placeholder(messageArg: TFlexMessage, budgetArg: number): TFlexMessage;
121
+ }
110
122
  /**
111
123
  * The public transcript of one session: its newest messages within the public bounds, a message
112
124
  * over the single-message bound reduced to a placeholder that keeps its metadata. Records are
113
125
  * addressed by their content, and `storedRecordsArg` names records already stored, so the
114
- * transcript lists the stored copy of every record it shares.
126
+ * transcript lists the stored copy of every record it shares; only the records it adds are
127
+ * serialized, hashed and checked.
115
128
  */
116
- export declare const createProjectionTranscript: (controllerIdArg: string, storageKeyArg: string, sessionIdArg: string, messagesArg: readonly TFlexMessage[], preparationArg: IFlexCandidatePreparation, storedRecordsArg?: ReadonlyMap<string, IFlexRecordManifest>, limitsArg?: IFlexTranscriptLimits) => IFlexTranscriptBuild;
129
+ export declare const createProjectionTranscript: (controllerIdArg: string, storageKeyArg: string, sessionIdArg: string, messagesArg: readonly TFlexMessage[], preparationArg: IFlexCandidatePreparation, storedRecordsArg?: ReadonlyMap<string, IFlexRecordManifest>, limitsArg?: IFlexTranscriptLimits, recordsArg?: IFlexTranscriptMessageRecords) => IFlexTranscriptBuild;
117
130
  /** One retained session's committed projection, as a publication names it. */
118
131
  export interface IFlexPublishedProjection {
119
132
  sessionId: string;
@@ -165,10 +178,16 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
165
178
  /**
166
179
  * The snapshot of each domain head this writer last committed or loaded, keyed by head id and
167
180
  * valid while the head names the same private candidate: a save applies its change to it
168
- * instead of reading the snapshot back. Only heads of storage keys this writer leases enter it.
181
+ * instead of reading the snapshot back, and reuses the chunks of a layout it committed. Only
182
+ * heads of storage keys this writer leases enter it; least recently used entries leave first.
169
183
  */
170
184
  private readonly snapshotCache;
171
185
  private snapshotCacheBytes;
186
+ /** Heads whose snapshot exceeds the whole snapshot cache, logged once each. */
187
+ private readonly uncachedSnapshotHeads;
188
+ private readonly publicMessageRecordIds;
189
+ private readonly publicMessageBytes;
190
+ private readonly publicMessagePlaceholders;
172
191
  /** Transcripts by id; they are addressed by their content, so a cached one never goes stale. */
173
192
  private readonly transcriptCache;
174
193
  private transcriptCacheBytes;
@@ -233,12 +252,20 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
233
252
  private deleteJobSession;
234
253
  private validateScopeSnapshot;
235
254
  private validateProjectionSnapshot;
255
+ /** Checks a projection snapshot in place: FlexHarness owns what a valid projection is. */
256
+ private assertProjectionSnapshot;
236
257
  private validatePermissionSnapshot;
237
258
  private validateAgentEventSnapshot;
238
259
  private validateAgentEventArchive;
239
260
  private validateToolJobSnapshot;
240
261
  private saveDomain;
241
262
  private loadDomainDirect;
263
+ /**
264
+ * The committed snapshot a save changes: taken out of the cache, so the save holds its layout
265
+ * alone, or read when `loadArg` asks for it. Undefined when the domain has no head. The caller
266
+ * releases it once the save ended, whatever its outcome.
267
+ */
268
+ private checkoutDomain;
242
269
  private readMigration;
243
270
  private readDomainHead;
244
271
  private readDomainHeadPage;
@@ -255,7 +282,15 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
255
282
  /** The ids among `idsArg` that `modelArg` stores for the storage key, read without documents. */
256
283
  private storedIds;
257
284
  private cachedSnapshot;
258
- /** Keeps a projection or scope snapshot this writer committed or loaded, never edited after. */
285
+ /**
286
+ * Takes the cached snapshot of `headArg` out of the cache for a save, which then holds its
287
+ * layout until it releases it; a stale entry is dropped.
288
+ */
289
+ private takeCachedSnapshot;
290
+ /**
291
+ * Keeps a projection, scope or Agent event snapshot this writer committed or loaded, never
292
+ * edited after, and the layout this writer stored it in.
293
+ */
259
294
  private cacheSnapshot;
260
295
  private forgetCachedSnapshot;
261
296
  private forgetCachedSnapshots;
@@ -264,6 +299,8 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
264
299
  * `previousArg` or that an earlier write stored, and the records it adds.
265
300
  */
266
301
  private buildTranscript;
302
+ /** The record facts of a scope's messages, from this store's per-message caches. */
303
+ private transcriptMessageRecords;
267
304
  /**
268
305
  * Stores a transcript before the records it adds, so an interrupted write leaves a transcript no
269
306
  * head names that still names everything the write stored, and proves both.