@amalgm/shell 0.1.164-main.39180777929 → 0.1.164-main.39182422024
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/dist/user-ground-host.d.ts +11 -0
- package/dist/user-ground-host.js +7 -0
- package/dist/user-ground-host.js.map +1 -1
- package/dist/watching/host.d.ts +27 -1
- package/dist/watching/host.js +58 -5
- package/dist/watching/host.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
|
@@ -125,6 +125,13 @@ export interface UserGroundHostOptions {
|
|
|
125
125
|
* the type's own lane reports an unselected product and no other type is
|
|
126
126
|
* affected. */
|
|
127
127
|
readonly constructProduct?: EntityApplyHostOptions["constructProduct"];
|
|
128
|
+
/** How much Files work this runtime still holds: records the cloud has not
|
|
129
|
+
* accepted, and disk changes not yet recorded. Each reaches zero only when
|
|
130
|
+
* nothing of its kind could be lost if the disk were destroyed now. */
|
|
131
|
+
readonly activity?: {
|
|
132
|
+
readonly unsent: (count: number) => void;
|
|
133
|
+
readonly unsettled: (count: number) => void;
|
|
134
|
+
};
|
|
128
135
|
/** A failed background pass (a Send or Receive attempt, an Apply lane, a
|
|
129
136
|
* resumed Add intent, or granted-channel following) remains durable and
|
|
130
137
|
* retries after this report; it never blocks readiness. */
|
|
@@ -284,6 +291,10 @@ export declare class UserGroundHost {
|
|
|
284
291
|
databasePath(): string;
|
|
285
292
|
rows(identity: UserGroundIdentity): GroundRow[];
|
|
286
293
|
watchHealth(): WatchHealth;
|
|
294
|
+
/** Resolves once what the OS has handed Watch has reached it, already
|
|
295
|
+
* counted in `activity.unsettled`. On Linux that is every change made
|
|
296
|
+
* before the call. */
|
|
297
|
+
flushWatch(): Promise<void>;
|
|
287
298
|
/** Read-only reasons owned by the running Apply coordinator. */
|
|
288
299
|
applyWaiting(): ReturnType<EntityApplyRail["waiting"]>;
|
|
289
300
|
private wakeObservedApply;
|
package/dist/user-ground-host.js
CHANGED
|
@@ -341,6 +341,7 @@ export class UserGroundHost {
|
|
|
341
341
|
} : {}),
|
|
342
342
|
},
|
|
343
343
|
}) } : {}),
|
|
344
|
+
...(options.activity ? { onUnsettled: options.activity.unsettled } : {}),
|
|
344
345
|
onHealth: (health) => {
|
|
345
346
|
options.onWatchHealth?.(health);
|
|
346
347
|
this.stage({
|
|
@@ -515,6 +516,12 @@ export class UserGroundHost {
|
|
|
515
516
|
watchHealth() {
|
|
516
517
|
return this.watchHost.health();
|
|
517
518
|
}
|
|
519
|
+
/** Resolves once what the OS has handed Watch has reached it, already
|
|
520
|
+
* counted in `activity.unsettled`. On Linux that is every change made
|
|
521
|
+
* before the call. */
|
|
522
|
+
flushWatch() {
|
|
523
|
+
return this.watchHost.flush();
|
|
524
|
+
}
|
|
518
525
|
/** Read-only reasons owned by the running Apply coordinator. */
|
|
519
526
|
applyWaiting() {
|
|
520
527
|
return this.applyRail?.waiting() ?? [];
|