agl 43.14.0 → 44.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.
- package/changelog.md +22 -0
- package/dist_serve/bundle.js +4473 -4235
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +29 -29
- package/dist_serve/bundle.js.third-party-notices.txt +29 -29
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/aglapi/aglapisurface.document.js +37 -4
- package/dist_ts/classes.authstore.d.ts +60 -3
- package/dist_ts/classes.authstore.js +161 -13
- package/dist_ts/classes.controller.d.ts +63 -0
- package/dist_ts/classes.controller.js +502 -43
- package/dist_ts/classes.embeddeddb.js +7 -2
- package/dist_ts/classes.flexmodels.private.d.ts +39 -0
- package/dist_ts/classes.flexmodels.private.js +127 -1
- package/dist_ts/classes.flexprojectpreparation.d.ts +21 -0
- package/dist_ts/classes.flexprojectpreparation.js +69 -0
- package/dist_ts/classes.flexpromptqueue.d.ts +21 -1
- package/dist_ts/classes.flexpromptqueue.js +67 -7
- package/dist_ts/classes.flexrequestqueue.d.ts +11 -0
- package/dist_ts/classes.flexrequestqueue.js +40 -0
- package/dist_ts/classes.flexservice.d.ts +46 -14
- package/dist_ts/classes.flexservice.js +179 -55
- package/dist_ts/classes.flexstore.d.ts +68 -3
- package/dist_ts/classes.flexstore.js +277 -11
- package/dist_ts/classes.flexsubmissionmodels.d.ts +58 -0
- package/dist_ts/classes.flexsubmissionmodels.js +162 -0
- package/dist_ts/classes.flexsubmissionstore.d.ts +70 -0
- package/dist_ts/classes.flexsubmissionstore.js +323 -0
- package/dist_ts/classes.flexsupervisor.d.ts +10 -0
- package/dist_ts/classes.flexsupervisor.js +27 -1
- package/dist_ts/classes.harnessoperationmanager.d.ts +31 -0
- package/dist_ts/classes.harnessoperationmanager.js +69 -7
- package/dist_ts/classes.pendingpromptstore.d.ts +11 -3
- package/dist_ts/classes.pendingpromptstore.js +66 -10
- package/dist_ts/classes.sessionidentityservice.d.ts +18 -1
- package/dist_ts/classes.sessionidentityservice.js +34 -4
- package/dist_ts/classes.validation.d.ts +3 -0
- package/dist_ts/classes.validation.js +50 -1
- package/dist_ts/functions.deviceapi.js +3 -1
- package/dist_ts/interfaces.auth.d.ts +3 -1
- package/dist_ts/interfaces.auth.js +1 -1
- package/dist_ts/interfaces.flexipc.d.ts +29 -5
- package/dist_ts/interfaces.flexipc.js +13 -4
- package/dist_ts_authswitch/classes.authoritydatabase.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritydatabase.js +17 -5
- package/dist_ts_interfaces/flexadmission.d.ts +69 -0
- package/dist_ts_interfaces/flexadmission.js +2 -0
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/interfaces.d.ts +10 -1
- package/dist_ts_interfaces/interfaces.js +2 -2
- package/dist_ts_interfaces/requests.d.ts +2 -1
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_migration/v10_flexharnessv3migration.js +4 -1
- package/docs/nosqldb11-migration.md +59 -0
- package/package.json +10 -9
- package/readme.md +5 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +36 -3
- package/ts/classes.authstore.ts +179 -11
- package/ts/classes.controller.ts +498 -40
- package/ts/classes.embeddeddb.ts +6 -1
- package/ts/classes.flexmodels.private.ts +109 -0
- package/ts/classes.flexprojectpreparation.ts +69 -0
- package/ts/classes.flexpromptqueue.ts +69 -6
- package/ts/classes.flexrequestqueue.ts +47 -0
- package/ts/classes.flexservice.ts +187 -51
- package/ts/classes.flexstore.ts +352 -10
- package/ts/classes.flexsubmissionmodels.ts +89 -0
- package/ts/classes.flexsubmissionstore.ts +312 -0
- package/ts/classes.flexsupervisor.ts +26 -0
- package/ts/classes.harnessoperationmanager.ts +79 -6
- package/ts/classes.pendingpromptstore.ts +55 -6
- package/ts/classes.sessionidentityservice.ts +33 -2
- package/ts/classes.validation.ts +42 -0
- package/ts/functions.deviceapi.ts +2 -0
- package/ts/interfaces.auth.ts +3 -1
- package/ts/interfaces.flexipc.ts +38 -4
- package/ts_authswitch/classes.authoritydatabase.ts +19 -5
- package/ts_interfaces/flexadmission.ts +52 -0
- package/ts_interfaces/index.ts +2 -0
- package/ts_interfaces/interfaces.ts +10 -1
- package/ts_interfaces/requests.ts +3 -0
- package/ts_migration/v10_flexharnessv3migration.ts +3 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.browsersubmissions.ts +279 -0
- package/ts_web/classes.sessiondraftsync.ts +64 -1
- package/ts_web/elements.harnesscontrollerapp.ts +340 -5
- package/ts_web/functions.flexsubmissions.ts +88 -0
|
@@ -30,7 +30,28 @@ export interface IFlexStoreOptions {
|
|
|
30
30
|
retiredWriterIds?: readonly string[];
|
|
31
31
|
projectManagementHost: IFlexProjectManagementHost;
|
|
32
32
|
onFatalError?: (errorArg: Error) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Called once each time FlexHarness qualifies a namespace explicitly (`prepareScope` with
|
|
35
|
+
* `qualifyLegacy`), with what the store found when the namespace's provenance first read
|
|
36
|
+
* unqualified. The Flex child writes it to the controller log.
|
|
37
|
+
*/
|
|
38
|
+
onWriteProvenanceQualified?: (qualificationArg: TFlexWriteProvenanceQualification) => void;
|
|
33
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Why a namespace needed explicit qualification: no write witness (`absent`: the first start after
|
|
42
|
+
* the upgrade that added it, or a new project), or writes the witness does not know (`stale`: a
|
|
43
|
+
* writer whose provenance was not activated wrote it; `writeCount` equal to `knownWriteCount` means
|
|
44
|
+
* only the recovery proof was out of date).
|
|
45
|
+
*/
|
|
46
|
+
export type TFlexWriteProvenanceQualification = {
|
|
47
|
+
storageKey: string;
|
|
48
|
+
reason: 'absent';
|
|
49
|
+
} | {
|
|
50
|
+
storageKey: string;
|
|
51
|
+
reason: 'stale';
|
|
52
|
+
writeCount: number;
|
|
53
|
+
knownWriteCount: number;
|
|
54
|
+
};
|
|
34
55
|
/** What a migration may do in its storage key's writer turn; see `FlexStore.runMigrationTurn`. */
|
|
35
56
|
export interface IFlexMigrationTurn {
|
|
36
57
|
readonly controllerId: string;
|
|
@@ -156,9 +177,24 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
|
|
|
156
177
|
readonly projectManagement: plugins.flexharness.IFlexProjectManagementStore;
|
|
157
178
|
readonly agentEvents: plugins.flexharness.IFlexAgentEventStoreProvider;
|
|
158
179
|
readonly jobs: plugins.flexharness.IFlexToolJobStoreProvider;
|
|
180
|
+
/**
|
|
181
|
+
* FlexHarness's recovery sidecar for this storage (`scopes.sessionLocal`): the proof lives in
|
|
182
|
+
* `flex_scope_recovery`, the write provenance in `flex_namespace_writes`, which every write
|
|
183
|
+
* transaction of the namespace counts (`renewLeaseAndCountWrite`).
|
|
184
|
+
*/
|
|
185
|
+
readonly scopeRecovery: plugins.flexharness.IFlexScopeRecoveryStore;
|
|
159
186
|
private readonly database;
|
|
160
187
|
private readonly controllerId;
|
|
161
188
|
private readonly writerId;
|
|
189
|
+
private readonly onWriteProvenanceQualified?;
|
|
190
|
+
/** Storage keys whose writes this store records as known: FlexHarness activated their provenance. */
|
|
191
|
+
private readonly knownWriteKeys;
|
|
192
|
+
/**
|
|
193
|
+
* What the first unqualified provenance read of a storage key found since its last qualification,
|
|
194
|
+
* reported when FlexHarness qualifies it. A qualifying load writes before it qualifies, so a later
|
|
195
|
+
* read would no longer see the state the preparation started from.
|
|
196
|
+
*/
|
|
197
|
+
private readonly unqualifiedProvenance;
|
|
162
198
|
private readonly retiredWriterIds;
|
|
163
199
|
private readonly onFatalError?;
|
|
164
200
|
private readonly manager;
|
|
@@ -237,6 +273,11 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
|
|
|
237
273
|
* committed snapshot, at the same revision, storing the records it lacks again.
|
|
238
274
|
*/
|
|
239
275
|
private repairTranscript;
|
|
276
|
+
/**
|
|
277
|
+
* Takes this store's writer lease for the storage key in its writer turn, or proves it still holds
|
|
278
|
+
* it. The Flex child prepares a project's FlexHarness namespace only after this.
|
|
279
|
+
*/
|
|
280
|
+
holdWriterLease(storageKeyArg: string): Promise<void>;
|
|
240
281
|
purgeScope(storageKeyArg: string): Promise<void>;
|
|
241
282
|
reconcileOrphans(nowArg?: number, abortSignalArg?: AbortSignal): Promise<void>;
|
|
242
283
|
/**
|
|
@@ -367,10 +408,34 @@ export declare class FlexStore implements plugins.flexharness.IFlexHarnessStores
|
|
|
367
408
|
private commitHeadMutation;
|
|
368
409
|
private commitHeadMutationWithLease;
|
|
369
410
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
411
|
+
* The first step of both Flex namespace write transactions (`commitHeadMutationWithLease`,
|
|
412
|
+
* `deleteScopeRecordBatchWithLease`) and of nothing else. It renews the held lease, so the
|
|
413
|
+
* transaction commits only while this store still owns the lease and a concurrent takeover
|
|
414
|
+
* conflicts with it, and counts the write in the namespace's witness (`flex_namespace_writes`):
|
|
415
|
+
* a write of a storage key whose provenance FlexHarness activated (`knownWriteKeys`) requires
|
|
416
|
+
* every earlier write to be known and counts itself as known; any other write counts as unknown.
|
|
417
|
+
* A known write that finds an unknown one fails with `FlexHarnessStoreFormatError`, so the
|
|
418
|
+
* transaction and its data write abort. Acquiring, renewing and taking over a lease never count.
|
|
419
|
+
* Only a purge's last step, which deletes the witness itself, skips the count.
|
|
420
|
+
*/
|
|
421
|
+
private renewLeaseAndCountWrite;
|
|
422
|
+
private readNamespaceWrites;
|
|
423
|
+
private readScopeRecovery;
|
|
424
|
+
/**
|
|
425
|
+
* True only when the namespace's witness exists and knows every write; then this store records
|
|
426
|
+
* its writes of the key as known. An absent witness is unqualified whatever the namespace holds:
|
|
427
|
+
* the store never assumes an empty namespace is new. Reads metadata only.
|
|
428
|
+
*/
|
|
429
|
+
private loadWriteProvenance;
|
|
430
|
+
/**
|
|
431
|
+
* Marks every write so far as known, in the storage key's writer turn under its lease, and records
|
|
432
|
+
* this store's later writes as known. FlexHarness calls it only at the end of an explicit
|
|
433
|
+
* qualification (`prepareScope` with `qualifyLegacy`), after its complete load and repair.
|
|
372
434
|
*/
|
|
373
|
-
private
|
|
435
|
+
private qualifyWriteProvenance;
|
|
436
|
+
private loadScopeRecovery;
|
|
437
|
+
/** A compare-and-swap on the proof's revision through the namespace's head mutation path. */
|
|
438
|
+
private saveScopeRecovery;
|
|
374
439
|
private applyHeadMutation;
|
|
375
440
|
private deleteScopeRecords;
|
|
376
441
|
private deleteScopeRecordBatch;
|