@framers/agentos-ext-account-sources 0.7.2 → 0.8.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/README.md +12 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sync/AccountSourceSync.d.ts +17 -8
- package/dist/sync/AccountSourceSync.d.ts.map +1 -1
- package/dist/sync/AccountSourceSync.js +43 -14
- package/dist/sync/AccountSourceSync.js.map +1 -1
- package/dist/sync/SourceRevocations.d.ts +37 -3
- package/dist/sync/SourceRevocations.d.ts.map +1 -1
- package/dist/sync/SourceRevocations.js +86 -2
- package/dist/sync/SourceRevocations.js.map +1 -1
- package/dist/sync/SqlAccountSourceSyncStore.d.ts +105 -16
- package/dist/sync/SqlAccountSourceSyncStore.d.ts.map +1 -1
- package/dist/sync/SqlAccountSourceSyncStore.js +257 -45
- package/dist/sync/SqlAccountSourceSyncStore.js.map +1 -1
- package/dist/sync/schema.d.ts +4 -3
- package/dist/sync/schema.d.ts.map +1 -1
- package/dist/sync/schema.js +4 -3
- package/dist/sync/schema.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ const handle = await store.claim(scope, 'scheduled'); // null unless the connect
|
|
|
206
206
|
|
|
207
207
|
`SqlAccountSourceSyncStore` keeps each connection's state, policy, open checkpoint, lease and barrier, the cycle's work rows, the provenance of retained sources and the connection's exclusions in the tables `sourceSyncSchema(prefix)` creates: six statements, with a prefix of a lower-case letter and at most 31 lower-case letters, digits or underscores (`agentos_source_sync` unless given). It needs a PostgreSQL adapter with transactions and runs no DDL. Its `fence` is the core `SqlSourceDerivationStore` on the same adapter, over the tables of `sourceDerivationSchema(derivationPrefix)`: every change to an owner's sources runs under that owner's fence, the one that also commits and delivers results derived from them.
|
|
208
208
|
|
|
209
|
-
The host supplies seven bindings
|
|
209
|
+
The host supplies seven bindings, and may supply an eighth, `refresh`. The store calls each inside its own transaction, on the transaction adapter it passes:
|
|
210
210
|
|
|
211
211
|
| Binding | What it does |
|
|
212
212
|
|---|---|
|
|
@@ -217,16 +217,17 @@ The host supplies seven bindings. The store calls each inside its own transactio
|
|
|
217
217
|
| `purge(tx, owner, affected)` | Deletes the host's text, passages and vectors in the affected scope |
|
|
218
218
|
| `purgeResults(tx, owner, ids)` | Deletes the host's rows for these derived results |
|
|
219
219
|
| `rebind(tx, scope, generation)` | Moves the connection's host rows to a new generation without changing their content, version or expiry |
|
|
220
|
+
| `refresh(tx, scope, dependency, document)` | Optional. Moves one source's host rows to the dependency's generation and expiry and the document's message windows, without changing their text, passages or version |
|
|
220
221
|
|
|
221
222
|
Provider reads, embedding and model calls run between store calls, never inside a binding.
|
|
222
223
|
|
|
223
224
|
A sync holds a lease. `claim(scope, trigger)` answers a handle only when the owner is active, the `active` binding agrees, no barrier or live lease is set and `sourceSyncDue` holds; `renew(handle)` extends the lease by `leaseMs`; `release(handle, event?)` gives it up, records a deferral or a fixed failure when one is given, and keeps the checkpoint and work for the next claim. `openCycle` opens a checkpoint or answers the one already open, `page` records a page and queues its ids in one transaction (the same page sent again right after answers the same checkpoint; any other stale revision answers null), and `takeWork` marks the next due item attempted before the read; an item that reached five attempts without a recorded result is not taken but waits `pollMs` as a `storage_unavailable` retry. Every call made with a handle checks the owner fence, the lease token and expiry, the generation and the `active` binding in the same transaction; once any of them has moved on, `release(handle)` answers false and every other call answers null.
|
|
224
225
|
|
|
225
|
-
`applyResult(handle, work, result, prepared)` keeps a `retry` result unresolved.
|
|
226
|
+
`applyResult(handle, work, result, prepared)` keeps a `retry` result unresolved. A `document` result is weighed first: the store ranks this connection's retained sources and the new one by activity time, newest first with ties broken by source id, and keeps those inside `maxRetainedDocuments`, `maxHeldCharacters` and the allowance. A document that does not fit is recorded as skipped with `document_limit`, `held_limit` or `indexing_limit`, and an excluded one with `excluded`. A document that fits replaces the source's previous copy in the same transaction (host write, indexing charge and provenance), after that copy and every derived result that depends on it are removed through the fence, and this connection's other sources the limits no longer admit are removed with it, never another connection's. A read that repeats the text and message spans of a copy the store still holds, within its expiry and window, adds nothing to index: it is charged nothing and is not weighed against the indexing allowance, so neither a reconcile that reads every retained source again nor a change to a source's labels or history spends any of it. When the read also repeats the copy's version and content hash, the `refresh` binding keeps the copy in place, with every result derived from it, and gives it the read's expiry and message windows; otherwise, and for a host without the binding, the copy is written again from a fresh preparation. A `gone` result, a skip and an excluded document remove the source's previous copy, except an `indexing_limit` skip whose previous copy is within its expiry and window, still admitted as it is by the retained limits, and where the new read begins: the read's text starts with the copy's text, by the hash the store keeps of it, and holds every message of it at the same span. That copy, admitted and charged under an earlier read, stays with the shorter of its own and the read's expiry and message windows until a later read of the source finds room in the allowance (a change to it, or a reconcile) or the copy expires; a read that lost or changed one of its messages removes it. A copy past its expiry or window counts as not held, whether or not `expire` has removed it yet. Given `prepared` as null, a document the store has to write answers `pending` with the same handle and records nothing; apply it again with its prepared value. Such a document reaches the `allowance` binding in both calls, so keep that binding to reads. A failing binding rolls the whole application back. The answer carries a new handle whenever a removal advanced the owner's fence; later calls use it. `finish` commits the cycle's target cursor once every work item is terminal, counting from the stored work, and `progress` records the counts so far.
|
|
226
227
|
|
|
227
|
-
Controls run with the owner blocked. `control(scope, event, policy?)` applies `connect_started`, `grant_ready`, `pause`, `resume`, `use_changed`, `policy_changed` (with the new policy), `grant_lost` or `disconnect`: it records a content-free barrier and drops the open cycle in one transaction, then completes the barrier and reactivates the owner. Connecting, grant loss and disconnecting remove the connection's sources, their derived results and its exclusions. Pause, resume, a use change and a policy change move retained content to the new generation with its version kept and its expiry never extended, so no result derived before the change can be delivered again; a policy change also removes the sources the new limits leave out and shortens the expiry of the rest to the new window. `exclude(scope, sourceId)` removes one source and keeps a content-free exclusion; `resetExclusions(scope)` clears them. Both raise the generation and keep the committed cursor, and make a reconcile the next cycle: a fresh bounded scan, then history replayed from that cursor, so a change made since it reaches the store even for an item the scan does not list. A control other than disconnecting throws `stale_source_sync` while the `active` binding refuses the owner. A barrier left by a failure blocks claims and reactivation until `recoverControl(scope)` completes it, and a lifecycle worker calls it even for a paused connection. `expire(scope, limit)` removes retained sources whose expiry has passed, also while the connection is paused, then the owner's expired derived results; reads refuse an expired source either way.
|
|
228
|
+
Controls run with the owner blocked. `control(scope, event, policy?)` applies `connect_started`, `grant_ready`, `pause`, `resume`, `use_changed`, `policy_changed` (with the new policy), `grant_lost` or `disconnect`: it records a content-free barrier and drops the open cycle in one transaction, then completes the barrier and reactivates the owner. Connecting, grant loss and disconnecting remove the connection's sources, their derived results and its exclusions. Pause, resume, a use change and a policy change move retained content to the new generation with its version kept and its expiry never extended, so no result derived before the change can be delivered again; a policy change also removes the sources the new limits leave out and shortens the expiry of the rest to the new window. `exclude(scope, sourceId)` removes one source and keeps a content-free exclusion; `resetExclusions(scope)` clears them. Both raise the generation and keep the committed cursor, and make a reconcile the next cycle: a fresh bounded scan, then history replayed from that cursor, so a change made since it reaches the store even for an item the scan does not list. A control other than disconnecting throws `stale_source_sync` while the `active` binding refuses the owner. A barrier left by a failure blocks claims and reactivation until `recoverControl(scope)` completes it, and a lifecycle worker calls it even for a paused connection. `expire(scope, limit)` removes retained sources whose expiry has passed, also while the connection is paused or the owner's fence is inactive, as for a suspended account, which stays inactive, then the owner's expired derived results; reads refuse an expired source either way. Each source goes in a transaction of its own. When a removal or the results' expiry fails, `expire` throws the failure; once it had removed a source, it throws a `SourceSyncExpiryError` with the failure's message and `cause`, whose `partial` counts the removals made before it. `sweepExpired(limit?, owner?)` does the same across every connection, or one owner's, the earliest expiry first and by the store's own expiry, however far a maintenance walk is from them, and answers `{ removed, failed }`: an owner whose removal fails, as when its host purge keeps failing, is counted and left out of the call's later reads, so a call with up to `limit` such owners never holds back another owner's copies. An owner whose derived results then fail to expire is counted too, once; the call still answers every source it removed, and the other owners' results still expire. `removeOwner(owner, remove?)` removes a stopped owner's rows in one transaction: each of its connections, with its work rows, provenance and exclusions, once every one is disconnected with no barrier, lease, work or retained source, after running the lifecycle's own `remove` in the same transaction; the core fence's owner row and deletion records stay, since they hold no content and a restore replays the deletion from them.
|
|
228
229
|
|
|
229
|
-
`readCurrent(tx, derivation)` answers the current state of a derivation's sources for the fence's commit and delivery checks, and a connection with a barrier or pending revalidation reads as disconnected. `snapshot(scope)` answers metadata for authenticated controls and `documents(scope)` the retained provenance; neither authorizes delivery. Work rows and barriers hold ids and fixed values only. The documents table holds provenance, message timing and
|
|
230
|
+
`readCurrent(tx, derivation)` answers the current state of a derivation's sources for the fence's commit and delivery checks, and a connection with a barrier or pending revalidation reads as disconnected. The store's provenance decides a source's expiry: a policy change's prune and an `indexing_limit` skip that keeps a copy shorten it there without calling a binding, so a host that reads its own rows takes the earlier of its row's expiry and the one `readCurrent` answers. `snapshot(scope)` answers metadata for authenticated controls and `documents(scope)` the retained provenance; neither authorizes delivery. Work rows and barriers hold ids and fixed values only. The documents table holds provenance, message timing, counts and hashes, never text. A text hash or a connector's content hash confirms a guessed text, a short templated message most easily, so treat the table as content, like the host's own tables, for access, retention and backups.
|
|
230
231
|
|
|
231
232
|
### Request quotas
|
|
232
233
|
|
|
@@ -310,11 +311,11 @@ do after = (await sync.maintain(after, 100)).next; while (after !== null);
|
|
|
310
311
|
|
|
311
312
|
`AccountSourceSync` runs a connection's sync on the SQL store and keeps nothing of its own between calls: the checkpoint, the queued reads, the attempt counts and the retry times are in the store, so any coordinator on the same tables, in this process or another, resumes a run that yielded or stopped. `sourceSyncCoordinatorSchema(prefix)` answers one statement, which adds the nullable JSONB column `operation` to the connections table under the prefix given to `sourceSyncSchema`; run it after that schema, on a new database or an existing one. The store never runs it.
|
|
312
313
|
|
|
313
|
-
The provider factory receives `currentHandle`, which answers the handle the run holds when it is called; the handle changes after each applied result. The factory builds a provider bound to the lease and sends no request. `prepare` turns a document into the host's prepared value, such as its passages and vectors, outside any transaction, and the store commits that value with the document. `lifecycle.recover(scope)` completes the host's committed purges; `lifecycle.loseGrant(handle, reason)` receives the run's exact handle, compares it atomically before it fences the grant, so a stale run cannot revoke a newer grant, and answers whether it acted. `runBudgetMs` (90,000 unless given, at most 90,000) bounds one run and `operationTimeoutMs` (30,000 unless given, at most 60,000) one provider call or preparation; another value throws `invalid_source_coordinator_policy`. `clock` and `random` (the retry jitter, from 0 to 1) default to `Date.now` and `Math.random`.
|
|
314
|
+
The provider factory receives `currentHandle`, which answers the handle the run holds when it is called; the handle changes after each applied result. The factory builds a provider bound to the lease and sends no request. `prepare` turns a document into the host's prepared value, such as its passages and vectors, outside any transaction, and the store commits that value with the document. The run calls it only for a document the store has to write, so a read the store skips is never prepared, and with the `refresh` binding neither is a read of the copy it already holds. `lifecycle.recover(scope)` completes the host's committed purges; `lifecycle.loseGrant(handle, reason)` receives the run's exact handle, compares it atomically before it fences the grant, so a stale run cannot revoke a newer grant, and answers whether it acted. `runBudgetMs` (90,000 unless given, at most 90,000) bounds one run and `operationTimeoutMs` (30,000 unless given, at most 60,000) one provider call or preparation; another value throws `invalid_source_coordinator_policy`. `clock` and `random` (the retry jitter, from 0 to 1) default to `Date.now` and `Math.random`.
|
|
314
315
|
|
|
315
|
-
`run(scope, trigger, signal?)` calls `lifecycle.recover` and the store's `recoverControl` for the scope, then claims the lease; a run that claims nothing answers `idle`. With no open cycle it opens one: `bootstrap` when no cursor is committed, `reconcile` once `reconcileMs` has passed since the last cycle that was not incremental or after a change to the exclusions, otherwise `incremental`. A bootstrap, a reconcile and a recovery call the provider's `begin` for an anchor before their scan. A bootstrap and a recovery replay history from that anchor. A reconcile replays it from the committed cursor: history ids only increase, so that replay also covers the changes made between the cursor and the anchor, and a change to an item the bounded scan does not list still reaches the store. Before its scan, a reconcile asks the provider for the first history page from the committed cursor; when that answers `history_expired`, nothing before the anchor can be replayed, so the reconcile replays from its anchor instead, with one scan and one read pass. An incremental cycle replays history from the committed cursor without a scan.
|
|
316
|
+
`run(scope, trigger, signal?)` calls `lifecycle.recover` and the store's `recoverControl` for the scope, then claims the lease; a run that claims nothing answers `idle`. With no open cycle it opens one: `bootstrap` when no cursor is committed, `reconcile` once `reconcileMs` has passed since the last cycle that was not incremental or after a change to the exclusions, otherwise `incremental`. A bootstrap, a reconcile and a recovery call the provider's `begin` for an anchor before their scan. A bootstrap and a recovery replay history from that anchor. A reconcile replays it from the committed cursor: history ids only increase, so that replay also covers the changes made between the cursor and the anchor, and a change to an item the bounded scan does not list still reaches the store. Before its scan, a reconcile asks the provider for the first history page from the committed cursor; when that answers `history_expired`, nothing before the anchor can be replayed, so the reconcile replays from its anchor instead, with one scan and one read pass. An incremental cycle replays history from the committed cursor without a scan. A reconcile is also what keeps an unchanged source: it reads every listed source again, and the store charges nothing for the copy it holds, refreshing it in place with the `refresh` binding, but only while it still holds that copy. Set `reconcileMs` below the cache lifetime the connector's reads carry, by more than one poll and the time a reconcile takes; otherwise each copy expires, and `expire` removes it, before the next reconcile reads it again, and it returns as a new admission, charged again.
|
|
316
317
|
|
|
317
|
-
The run drains the queued reads before it asks for the next page. Each item is read, unless it is excluded, which records it as skipped
|
|
318
|
+
The run drains the queued reads before it asks for the next page. Each item is read, unless it is excluded, which records it as skipped. The read goes to `applyResult` before any preparation: the store records a skip, or with the `refresh` binding applies a read of the copy it holds, and answers `pending` for a document it has to write, which the run then prepares and applies again. The run goes on with the handle the application answers. When no read is due, a read waiting for its retry time ends the run as `deferred` until then; otherwise the run records the next page, and once the last history page is recorded and every item is terminal, `finish` commits the cursor and the run answers `completed`. A run yields, keeping its checkpoint and reads for the next claim, after `maxChangedPerLease` reads, after `maxHistoryPagesPerLease` history pages, when `runBudgetMs` has passed or when `signal` aborts; a signal aborted before the run starts answers `yielded` at once. It never waits out a retry.
|
|
318
319
|
|
|
319
320
|
Before each provider call and each preparation the run renews its lease, and the call gets a signal that aborts after `operationTimeoutMs`, at the end of the run budget or a second before the lease expires, whichever comes first. A provider call cut off by that signal counts as a `network` failure and a preparation as `storage_unavailable`; one cut off by the caller's signal yields. The store refuses a result that arrives after the lease, the generation or the owner's fence has moved on, as after a disconnect, and the run then answers `stale`. A failed request is never an empty page, and a bounded scan never proves that an item it did not list is gone.
|
|
320
321
|
|
|
@@ -333,7 +334,7 @@ A `grant_rejected` or `insufficient_scope` failure goes to `lifecycle.loseGrant`
|
|
|
333
334
|
| `stale` | The lease, the generation or the owner's fence moved on; the run committed nothing more |
|
|
334
335
|
| `unavailable` | The store could not be reached; no retry time was recorded, and a lease the run held expires on its own |
|
|
335
336
|
|
|
336
|
-
`maintain(after?, limit?)` is a maintenance batch: for up to `limit` connections after `after`, in key order and in every state, paused, blocked and disconnected included, it calls `lifecycle.recover`, the store's `recoverControl` and `expire(scope, 100)`. A failure is counted in `failed` and the next connection still runs
|
|
337
|
+
`maintain(after?, limit?)` is a maintenance batch: for up to `limit` connections after `after`, in key order and in every state, paused, blocked and disconnected included, it calls `lifecycle.recover`, the store's `recoverControl` and `expire(scope, 100)`, after a sweep of up to `limit` sources whose expiry has passed from any connection (`sweepExpired`), so no expired copy waits for the walk to reach its connection; each owner the sweep could not clear, and a sweep that could not read, count in `failed`. A failure is counted in `failed` and the next connection still runs, and the sources an `expire` removed before it failed count in `expired`; no provider is called. It answers `scanned`, `expired`, `failed` and `next`: pass `next` as `after` to the next batch, and start again from null once it is null. Schedule it at least once a minute; reads refuse expired content whether or not it runs.
|
|
337
338
|
|
|
338
339
|
With an `events` sink the coordinator reports `started` at the claim, `progress` with the count of retained sources after each read, `yielded` and `retry` with the reads made, `succeeded` with the count of retained sources, `reconnect`, and `purged` with the sources a maintenance batch expired. Each event carries `kind`, `state` and `n`, and `yielded`, `retry`, `succeeded` and `reconnect` also the run's duration as `ms`. A sink that throws is ignored.
|
|
339
340
|
|
|
@@ -367,11 +368,11 @@ await revocations.revokeBatch();
|
|
|
367
368
|
|
|
368
369
|
The host wires it in four places. The store's `active` binding answers true only when the account is live and `permits(tx, owner)` holds, so an owner whose stop is still purging, or who was deleted, has no sources. Authorization start and grant installation check `canConnect(tx, owner)` under the owner fence. The grant is saved with `new SealedTokenStore(values(tx, scope), keys, { namespace: sourceGrantNamespace(scope) })` under `SOURCE_GRANT_KEY`, the row every lifecycle step reads. A grant operation such as a refresh runs through `withGrant`.
|
|
369
370
|
|
|
370
|
-
`disconnect(scope, generation)`, `loseGrant(handle, reason)` and `deleteOwner(owner)` each commit in one short transaction the owner's fence, the connection's stop (`disconnected`, or `needs_reconnecting` for a lost grant), a purge barrier, a content-free stop intent, the grant's refresh token moved into the revoke-only queue, sealed under the current key and bound to its queue row, and the deletion of the active grant and its lease. `disconnect` takes the generation the authenticated request saw and answers null for another one; `loseGrant` takes the coordinator's exact current handle and answers false for a stale one; `deleteOwner` stops every connection of the owner, also when there is none, and keeps the owner blocked for good. Call it before the host removes any source, credential or account row. A grant that cannot be opened is deleted all the same, and its queue row records it as unreadable. The purge then runs in a transaction of its own; when it fails, the committed stop keeps the owner blocked, and `recover(scope)` completes it. The coordinator's `maintain` calls `recover` for every connection, paused ones included. None of these methods calls the provider.
|
|
371
|
+
`disconnect(scope, generation)`, `loseGrant(handle, reason)` and `deleteOwner(owner)` each commit in one short transaction the owner's fence, the connection's stop (`disconnected`, or `needs_reconnecting` for a lost grant), a purge barrier, a content-free stop intent, the grant's refresh token moved into the revoke-only queue, sealed under the current key and bound to its queue row, and the deletion of the active grant and its lease. `disconnect` takes the generation the authenticated request saw and answers null for another one; `loseGrant` takes the coordinator's exact current handle and answers false for a stale one; `deleteOwner` stops every connection of the owner, also when there is none, and keeps the owner blocked for good: its block marker stays, recorded as deleted and no longer pending, when `removeOwner` later removes the owner's rows, so `permits` stays false. Call it before the host removes any source, credential or account row. A grant that cannot be opened is deleted all the same, and its queue row records it as unreadable. The purge then runs in a transaction of its own; when it fails, the committed stop keeps the owner blocked, and `recover(scope)` completes it. The coordinator's `maintain` calls `recover` for every connection, paused ones included. None of these methods calls the provider.
|
|
371
372
|
|
|
372
373
|
`revokeBatch(limit?, signal?)` is the account-independent worker. It claims due queue rows, one worker per row, opens each token and revokes it with the revoker's `revoke` outside any transaction, within 15 seconds. A success confirms the row and erases its ciphertext. A failure is retried after 1, 2, 4, 8 and then 15 minutes, whatever status the provider answered. Each token's deadline is 23 hours and 59 minutes after it was queued, and neither a retry, a restart nor a repeated disconnect or deletion moves it: at the deadline the ciphertext is erased and the row records that the permission must be removed at the provider. A token that does not open, because its ciphertext was moved to another row or its key is gone, is erased the same way and never sent. A worker whose claim expired cannot settle a row another worker claimed since. The batch answers `{ attempted, confirmed, deferred, expired, unreadable }`. The database erases nothing on its own when a deadline passes: reads and dispatch stop at the deadline, and erasure needs the worker to run, so schedule it at least once a minute.
|
|
373
374
|
|
|
374
|
-
`status(scope)` answers `{ localPending, revocation }`, with `revocation` one of `not_needed`, `pending`, `confirmed` and `permission_removal_required`; the local purge completes whatever the revocation's outcome. A provider can revoke a whole grant rather than one connection's, so `canConnect` stays false while a revocation of the owner's is pending, or expired or unreadable and not yet acknowledged. `acknowledgeRemoval(scope)` records the account owner's statement that the permission was removed at the provider, after which a new grant may begin; it is an attestation, never a confirmation. `compact()` removes, a day after their deadline, terminal rows that nothing refers to.
|
|
375
|
+
`status(scope)` answers `{ localPending, revocation }`, with `revocation` one of `not_needed`, `pending`, `confirmed` and `permission_removal_required`; the local purge completes whatever the revocation's outcome. A provider can revoke a whole grant rather than one connection's, so `canConnect` stays false while a revocation of the owner's is pending, or expired or unreadable and not yet acknowledged. `acknowledgeRemoval(scope)` records the account owner's statement that the permission was removed at the provider, after which a new grant may begin; it is an attestation, never a confirmation. `compact()` removes, a day after their deadline, terminal rows that nothing refers to. `removeOwner(owner)` removes a deleted owner's rows in one transaction once nothing about them is pending: its connections and their work, provenance and exclusions in the store, and its stop intents, the queue rows they and its exchanges refer to, its grant leases and its exchanges here. It answers `pending`, changing nothing, while the deletion's purge or a revocation of its grants is pending and until a day after its last exchange ended, since a grant can still return for that exchange and must find its record to be queued for revocation; it answers `not_deleted` for an owner whose deletion is not recorded, and `removed` again for an owner already removed. The block marker stays, recording the deletion, so `permits` and `canConnect` stay false and the owner is refused for good, even while the host's account row still reads active; the core fence's owner row and deletion records stay too. `removeDeletedOwners(limit?)` runs it for at most `limit` deleted owners a call, those with rows left to remove and nothing pending, for a host whose own records of a deleted account are gone; run it on a schedule beside `revokeBatch` and `compact`. An owner already removed is not taken again.
|
|
375
376
|
|
|
376
377
|
`withGrant(handle, work, signal?)` runs one grant operation under a durable 30-second grant lease, without holding a transaction over the network; another worker gets `rate_limited` until the lease expires, and the lease is never renewed. `work` receives a `SealedTokenStore` and a signal that aborts after 15 seconds. Every load and save through that store, and the final return, recheck the sync handle and the lease, so after a disconnect or once the lease has expired a held token can be neither saved nor returned (`grant_rejected`).
|
|
377
378
|
|
|
@@ -401,7 +402,7 @@ An authorization code exchange returns a grant before anything is installed, and
|
|
|
401
402
|
|
|
402
403
|
`endExchange(exchange, outcome)` records an exchange that returned no grant: `not_dispatched` when the request never left the process, `revoked` when the provider flow revoked a grant it refused and the provider confirmed it, and `unconfirmed` otherwise, as after a timeout, an aborted connection or an unreadable answer. An open exchange whose end passes with nothing recorded, because its worker stopped, becomes unconfirmed at the next `revokeBatch`, counted in `expired`. A recorded outcome is never weakened. An unconfirmed exchange, or a returned grant whose revocation expired or could not be opened, makes `status` answer `permission_removal_required` and keeps `canConnect` false until `acknowledgeRemoval`. Exchange rows survive the account's deletion only to settle their attempt. `compact` removes an exchange a day after its end once it installed, ended or was acknowledged, or its returned grant's revocation was confirmed. A deleted owner can never acknowledge, so once the deletion is recorded `compact` also removes the owner's unconfirmed exchanges and those whose returned grant's revocation expired or could not be opened, and their queue rows a day after the rows' own deadline; an exchange still in flight or with a revocation pending stays, and so does the owner's block marker, which keeps `permits` false.
|
|
403
404
|
|
|
404
|
-
With an `events` sink the service reports `fenced` after a stop's transaction, `purged` after its purge,
|
|
405
|
+
With an `events` sink the service reports `fenced` after a stop's transaction, `purged` after its purge, `confirmed`, `deferred`, `expired` and `unreadable` from `revokeBatch`, and `removed` after `removeOwner` removes a deleted owner's rows, each as `{ kind: 'source_revocation', state, n }`, with no scope, token or provider text. A sink that throws is ignored.
|
|
405
406
|
|
|
406
407
|
The service uses five store methods besides those above. `stageStop(scope, event, stage, expected)` and `stageOwnerStop(owner, stage)` commit a stop and run the service's writes in its transaction; `completeStop(scope, generation, complete)` runs the purge's completion once the barrier is gone; `withCurrentHandle(handle, work)` runs grant storage work with the handle checked; and `lockState(tx, scope)` reads the connection's state in a host transaction after taking the owner fence's lock and then the connection's.
|
|
407
408
|
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,12 @@ export * from './sync/types.js';
|
|
|
13
13
|
export * from './sync/state.js';
|
|
14
14
|
/** The migration-owned schema and the SQL store that persists synchronization under the owner fence. */
|
|
15
15
|
export { sourceSyncSchema } from './sync/schema.js';
|
|
16
|
-
export { SqlAccountSourceSyncStore, type SourceSyncStoredDocument, type SourceSyncAllowance, type SourceSyncStorageBindings, type SourceSyncStoreOptions, type SourceSyncHandle, type SourceSyncSnapshot, type SourceSyncControl, type SourceSyncApplication, type SourceSyncBarrier, } from './sync/SqlAccountSourceSyncStore.js';
|
|
16
|
+
export { SqlAccountSourceSyncStore, type SourceSyncStoredDocument, type SourceSyncAllowance, type SourceSyncStorageBindings, type SourceSyncStoreOptions, type SourceSyncHandle, type SourceSyncSnapshot, type SourceSyncControl, type SourceSyncApplication, type SourceSyncBarrier, type SourceSyncSweep, SourceSyncExpiryError, } from './sync/SqlAccountSourceSyncStore.js';
|
|
17
17
|
/** Weighted request budgets, request slots and provider retry times shared by every worker through SQL. */
|
|
18
18
|
export { SourceQuota, sourceQuotaSchema, sourceRetryAt, type SourceQuotaMethod, type SourceQuotaPolicy, type SourceQuotaRequest, type SourceQuotaReason, type SourceQuotaResult, type SourceQuotaOptions, type SourceQuotaCompaction, } from './sync/SourceQuota.js';
|
|
19
19
|
/** The resumable synchronization coordinator, its lifecycle binding and the migration of its control state. */
|
|
20
20
|
export { AccountSourceSync, type AccountSourceSyncOptions, type SourceSyncLifecycle, type SourceSyncRunResult, type SourceSyncMaintenanceResult, } from './sync/AccountSourceSync.js';
|
|
21
21
|
export { sourceSyncCoordinatorSchema, type SourceSyncOperationAttempt, type SourceSyncOperationState, } from './sync/coordinatorState.js';
|
|
22
22
|
/** Fenced purge, the grant lease, the bounded revoke-only queue and the cleanup of grants that exchanges return. */
|
|
23
|
-
export { SourceRevocations, sourceRevocationSchema, sourceGrantNamespace, SOURCE_GRANT_KEY, type SourceRevocationOptions, type SourceRevocationReason, type SourceRevocationNotice, type SourceRevocationBatch, type SourceRevocationEvent, type SourceGrantExchange, type SourceGrantExchangeOutcome, type SourceUninstalledGrantLifecycle, } from './sync/SourceRevocations.js';
|
|
23
|
+
export { SourceRevocations, sourceRevocationSchema, sourceGrantNamespace, SOURCE_GRANT_KEY, type SourceRevocationOptions, type SourceRevocationReason, type SourceRevocationNotice, type SourceRevocationBatch, type SourceRevocationEvent, type SourceOwnerRemoval, type SourceGrantExchange, type SourceGrantExchangeOutcome, type SourceUninstalledGrantLifecycle, } from './sync/SourceRevocations.js';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAC3B,yDAAyD;AACzD,cAAc,gBAAgB,CAAC;AAC/B,8DAA8D;AAC9D,cAAc,iBAAiB,CAAC;AAChC,oEAAoE;AACpE,cAAc,cAAc,CAAC;AAC7B,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,yEAAyE;AACzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,wGAAwG;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAE,KAAK,yBAAyB,EACvF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BAA0B,EAAE,KAAK,wBAAwB,GAC/D,MAAM,4BAA4B,CAAC;AACpC,oHAAoH;AACpH,OAAO,EACL,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,gBAAgB,EACjF,KAAK,uBAAuB,EAAE,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EACtF,KAAK,qBAAqB,EAAE,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,EAC/E,KAAK,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,KAAK,+BAA+B,GAChG,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export * from './sync/types.js';
|
|
|
13
13
|
export * from './sync/state.js';
|
|
14
14
|
/** The migration-owned schema and the SQL store that persists synchronization under the owner fence. */
|
|
15
15
|
export { sourceSyncSchema } from './sync/schema.js';
|
|
16
|
-
export { SqlAccountSourceSyncStore, } from './sync/SqlAccountSourceSyncStore.js';
|
|
16
|
+
export { SqlAccountSourceSyncStore, SourceSyncExpiryError, } from './sync/SqlAccountSourceSyncStore.js';
|
|
17
17
|
/** Weighted request budgets, request slots and provider retry times shared by every worker through SQL. */
|
|
18
18
|
export { SourceQuota, sourceQuotaSchema, sourceRetryAt, } from './sync/SourceQuota.js';
|
|
19
19
|
/** The resumable synchronization coordinator, its lifecycle binding and the migration of its control state. */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAC3B,yDAAyD;AACzD,cAAc,gBAAgB,CAAC;AAC/B,8DAA8D;AAC9D,cAAc,iBAAiB,CAAC;AAChC,oEAAoE;AACpE,cAAc,cAAc,CAAC;AAC7B,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,yEAAyE;AACzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,wGAAwG;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAC3B,yDAAyD;AACzD,cAAc,gBAAgB,CAAC;AAC/B,8DAA8D;AAC9D,cAAc,iBAAiB,CAAC;AAChC,oEAAoE;AACpE,cAAc,cAAc,CAAC;AAC7B,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,yEAAyE;AACzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,wGAAwG;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,yBAAyB,EAIzB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,2GAA2G;AAC3G,OAAO,EACL,WAAW,EAAE,iBAAiB,EAAE,aAAa,GAG9C,MAAM,uBAAuB,CAAC;AAC/B,+GAA+G;AAC/G,OAAO,EACL,iBAAiB,GAGlB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC;AACpC,oHAAoH;AACpH,OAAO,EACL,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,gBAAgB,GAIlF,MAAM,6BAA6B,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @module account-sources/sync/AccountSourceSync
|
|
6
6
|
*/
|
|
7
7
|
import type { AccountSourceSyncProvider, SourceSyncScope, SourceSyncTrigger, SourceSyncRequest, SourceSyncDocument, SourceSyncRetryReason, SourceSyncEventSink } from './types.js';
|
|
8
|
-
import type
|
|
8
|
+
import { type SqlAccountSourceSyncStore, type SourceSyncHandle } from './SqlAccountSourceSyncStore.js';
|
|
9
9
|
/**
|
|
10
10
|
* The host's lifecycle binding: recovery of its committed purges and the fenced handoff of a lost grant. The
|
|
11
11
|
* coordinator calls it; it never calls a provider for content.
|
|
@@ -35,7 +35,11 @@ export interface AccountSourceSyncOptions<Prepared> {
|
|
|
35
35
|
* `currentHandle` answers the handle the run holds now: it changes after every applied result.
|
|
36
36
|
*/
|
|
37
37
|
readonly provider: (currentHandle: () => SourceSyncHandle) => Promise<AccountSourceSyncProvider>;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Sanitized input only. No storage writes; output remains in memory until applyResult. The run calls it only for a
|
|
40
|
+
* document the store has to write: a new or changed one that fits the limits, or the copy the store already holds
|
|
41
|
+
* when the host has no `refresh` binding. A read the store skips is never prepared.
|
|
42
|
+
*/
|
|
39
43
|
readonly prepare: (request: SourceSyncRequest, document: SourceSyncDocument) => Promise<Prepared>;
|
|
40
44
|
/** The host's purge recovery and grant-loss handoff. */
|
|
41
45
|
readonly lifecycle: SourceSyncLifecycle;
|
|
@@ -72,8 +76,10 @@ export type SourceSyncRunResult = {
|
|
|
72
76
|
readonly reason: 'domain_policy' | 'invalid_response';
|
|
73
77
|
};
|
|
74
78
|
/**
|
|
75
|
-
* One maintenance batch: the connections visited, the sources expired
|
|
76
|
-
*
|
|
79
|
+
* One maintenance batch: the connections visited, the sources expired by the batch's sweep and its visits (also those
|
|
80
|
+
* an expiry removed before it failed), the failures (each connection whose maintenance failed, each owner the sweep
|
|
81
|
+
* could not clear, and a sweep that could not read), and the scope to pass as `after` to the next batch, null once the
|
|
82
|
+
* last batch is done.
|
|
77
83
|
*/
|
|
78
84
|
export interface SourceSyncMaintenanceResult {
|
|
79
85
|
readonly scanned: number;
|
|
@@ -123,12 +129,15 @@ export declare class AccountSourceSync<Prepared = unknown> {
|
|
|
123
129
|
/**
|
|
124
130
|
* A bounded scheduler batch. The host persists next between ticks to avoid starving high keys.
|
|
125
131
|
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
132
|
+
* First removes up to `limit` sources whose expiry has passed from any connection, the earliest first, however far
|
|
133
|
+
* the walk is from them (`sweepExpired`). Then visits up to `limit` connections after `after` in key order, paused,
|
|
134
|
+
* blocked and disconnected ones included, and for each runs the lifecycle's recovery, the store's control recovery
|
|
135
|
+
* and the expiry of up to 100 sources. A failure is counted and the next connection still runs, and the sources an
|
|
136
|
+
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired. No provider is called.
|
|
129
137
|
*
|
|
130
138
|
* @param after - The `next` of the previous batch, or null to start from the first connection.
|
|
131
|
-
* @param limit - At most this many connections, an integer from 1 to
|
|
139
|
+
* @param limit - At most this many connections visited, and this many expired sources swept, an integer from 1 to
|
|
140
|
+
* 1,000.
|
|
132
141
|
* @throws {SourceSyncFault} `storage_unavailable` when the connections cannot be listed, a `limit` outside that
|
|
133
142
|
* range included.
|
|
134
143
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSourceSync.d.ts","sourceRoot":"","sources":["../../src/sync/AccountSourceSync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,yBAAyB,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAChF,kBAAkB,EACF,qBAAqB,EAAmB,mBAAmB,EAC5E,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"AccountSourceSync.d.ts","sourceRoot":"","sources":["../../src/sync/AccountSourceSync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,yBAAyB,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAChF,kBAAkB,EACF,qBAAqB,EAAmB,mBAAmB,EAC5E,MAAM,YAAY,CAAC;AACpB,OAAO,EACkB,KAAK,yBAAyB,EAAE,KAAK,gBAAgB,EAC7E,MAAM,gCAAgC,CAAC;AAIxC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC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AM,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAuBxG"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module account-sources/sync/AccountSourceSync
|
|
6
6
|
*/
|
|
7
7
|
import { createHash, randomUUID } from 'node:crypto';
|
|
8
|
+
import { SourceSyncExpiryError, } from './SqlAccountSourceSyncStore.js';
|
|
8
9
|
import { SourceSyncFault } from './state.js';
|
|
9
10
|
import { sourceRetryAt } from './SourceQuota.js';
|
|
10
11
|
class SyncStale extends Error {
|
|
@@ -270,18 +271,28 @@ export class AccountSourceSync {
|
|
|
270
271
|
throw new SourceSyncFault('invalid_response');
|
|
271
272
|
throw new SourceSyncFault(result.reason, result.retryAt);
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
// The store weighs a read before it is prepared: it records a skip, or with the host's `refresh` binding
|
|
275
|
+
// applies a read of the copy it holds, with no preparation, and answers `pending` for a document it has to
|
|
276
|
+
// write, which alone is prepared and applied again.
|
|
277
|
+
let applied = await this.stored(() => this.store.applyResult(needHandle(), work, result, null));
|
|
278
|
+
if (!applied)
|
|
279
|
+
throw new SyncStale();
|
|
280
|
+
handle = applied.handle;
|
|
281
|
+
if (applied.disposition.kind === 'pending') {
|
|
282
|
+
if (result.kind !== 'document')
|
|
283
|
+
throw new SourceSyncFault('invalid_response');
|
|
275
284
|
const cp = checkpoint;
|
|
276
285
|
const document = result.document;
|
|
277
|
-
prepared = await external((child) => this.options.prepare(context(cp.cycleId, cp.cutoff, child), document), 'storage_unavailable');
|
|
286
|
+
const prepared = await external((child) => this.options.prepare(context(cp.cycleId, cp.cutoff, child), document), 'storage_unavailable');
|
|
278
287
|
if (prepared === null)
|
|
279
288
|
throw new SourceSyncFault('invalid_response');
|
|
289
|
+
applied = await this.stored(() => this.store.applyResult(needHandle(), work, result, prepared));
|
|
290
|
+
if (!applied)
|
|
291
|
+
throw new SyncStale();
|
|
292
|
+
if (applied.disposition.kind === 'pending')
|
|
293
|
+
throw new SourceSyncFault('invalid_response');
|
|
294
|
+
handle = applied.handle;
|
|
280
295
|
}
|
|
281
|
-
const applied = await this.stored(() => this.store.applyResult(needHandle(), work, result, prepared));
|
|
282
|
-
if (!applied)
|
|
283
|
-
throw new SyncStale();
|
|
284
|
-
handle = applied.handle;
|
|
285
296
|
}
|
|
286
297
|
catch (error) {
|
|
287
298
|
if (error instanceof SourceSyncFault && retriable(error))
|
|
@@ -377,12 +388,15 @@ export class AccountSourceSync {
|
|
|
377
388
|
/**
|
|
378
389
|
* A bounded scheduler batch. The host persists next between ticks to avoid starving high keys.
|
|
379
390
|
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
391
|
+
* First removes up to `limit` sources whose expiry has passed from any connection, the earliest first, however far
|
|
392
|
+
* the walk is from them (`sweepExpired`). Then visits up to `limit` connections after `after` in key order, paused,
|
|
393
|
+
* blocked and disconnected ones included, and for each runs the lifecycle's recovery, the store's control recovery
|
|
394
|
+
* and the expiry of up to 100 sources. A failure is counted and the next connection still runs, and the sources an
|
|
395
|
+
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired. No provider is called.
|
|
383
396
|
*
|
|
384
397
|
* @param after - The `next` of the previous batch, or null to start from the first connection.
|
|
385
|
-
* @param limit - At most this many connections, an integer from 1 to
|
|
398
|
+
* @param limit - At most this many connections visited, and this many expired sources swept, an integer from 1 to
|
|
399
|
+
* 1,000.
|
|
386
400
|
* @throws {SourceSyncFault} `storage_unavailable` when the connections cannot be listed, a `limit` outside that
|
|
387
401
|
* range included.
|
|
388
402
|
*/
|
|
@@ -390,14 +404,29 @@ export class AccountSourceSync {
|
|
|
390
404
|
const scopes = await this.stored(() => this.store.scopes(after, limit));
|
|
391
405
|
let expired = 0;
|
|
392
406
|
let failed = 0;
|
|
407
|
+
// A copy past its expiry goes in this pass whichever page of connections the walk below visits.
|
|
408
|
+
try {
|
|
409
|
+
const sweep = await this.stored(() => this.store.sweepExpired(limit));
|
|
410
|
+
expired += sweep.removed;
|
|
411
|
+
failed += sweep.failed;
|
|
412
|
+
}
|
|
413
|
+
catch {
|
|
414
|
+
failed++;
|
|
415
|
+
}
|
|
393
416
|
for (const scope of scopes) {
|
|
394
417
|
try {
|
|
395
418
|
await this.stored(() => this.options.lifecycle.recover(scope));
|
|
396
419
|
await this.stored(() => this.store.recoverControl(scope));
|
|
397
|
-
expired += await this.
|
|
420
|
+
expired += await this.store.expire(scope, 100);
|
|
398
421
|
}
|
|
399
|
-
catch {
|
|
400
|
-
failed
|
|
422
|
+
catch (error) {
|
|
423
|
+
// An expiry that failed after removing copies removed them all the same.
|
|
424
|
+
if (error instanceof SourceSyncExpiryError) {
|
|
425
|
+
expired += error.partial.removed;
|
|
426
|
+
failed += error.partial.failed;
|
|
427
|
+
}
|
|
428
|
+
else
|
|
429
|
+
failed++;
|
|
401
430
|
}
|
|
402
431
|
}
|
|
403
432
|
if (expired > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSourceSync.js","sourceRoot":"","sources":["../../src/sync/AccountSourceSync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AASrD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmEjD,MAAM,SAAU,SAAQ,KAAK;IAAG,gBAAgB,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAAE;AAC/E,MAAM,SAAU,SAAQ,KAAK;IAAG,gBAAgB,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAAE;AAC/E,MAAM,YAAa,SAAQ,KAAK;IACT;IAAwC;IAA7D,YAAqB,MAA6B,EAAW,OAAe;QAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAAzF,WAAM,GAAN,MAAM,CAAuB;QAAW,YAAO,GAAP,OAAO,CAAQ;IAAmC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face SourceRevocationBatch {
|
|
|
48
48
|
/** A content-free lifecycle event: a fixed state and a count, never a scope, a token or a provider's text. */
|
|
49
49
|
export interface SourceRevocationEvent {
|
|
50
50
|
readonly kind: 'source_revocation';
|
|
51
|
-
readonly state: 'fenced' | 'purged' | 'confirmed' | 'deferred' | 'expired' | 'unreadable';
|
|
51
|
+
readonly state: 'fenced' | 'purged' | 'confirmed' | 'deferred' | 'expired' | 'unreadable' | 'removed';
|
|
52
52
|
readonly n: number;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* What `removeOwner` did: `removed` once the owner's rows are gone but for its block marker, also for an owner already
|
|
56
|
+
* removed; `pending`, changing nothing, while its deletion's purge, a revocation of one of its grants or an exchange
|
|
57
|
+
* of its own is not over; `not_deleted`, changing nothing, for an owner whose deletion is not recorded.
|
|
58
|
+
*/
|
|
59
|
+
export type SourceOwnerRemoval = 'removed' | 'pending' | 'not_deleted';
|
|
54
60
|
/**
|
|
55
61
|
* What the lifecycle runs with: the synchronization store, the sealing keys, the host's sealed-value binding and a
|
|
56
62
|
* revocation-only provider flow, with an optional table prefix, clock and event sink.
|
|
@@ -154,7 +160,9 @@ export declare class SourceRevocations<Prepared = unknown> implements SourceSync
|
|
|
154
160
|
private context;
|
|
155
161
|
/**
|
|
156
162
|
* Combine with fresh host account liveness in the sync store's active binding. False while a stop's purge is
|
|
157
|
-
* pending for the owner and, for good, once the owner was deleted
|
|
163
|
+
* pending for the owner and, for good, once the owner was deleted: `removeOwner` keeps the owner's block marker,
|
|
164
|
+
* recorded as deleted and no longer pending, so it stays false after the owner's rows are removed. It does not
|
|
165
|
+
* authenticate an account.
|
|
158
166
|
*/
|
|
159
167
|
permits(tx: StorageAdapter, scope: SourceOwnerScope): Promise<boolean>;
|
|
160
168
|
/**
|
|
@@ -198,7 +206,8 @@ export declare class SourceRevocations<Prepared = unknown> implements SourceSync
|
|
|
198
206
|
/**
|
|
199
207
|
* Account deletion: blocks the owner for good and stops every connection of the owner, queueing each grant for
|
|
200
208
|
* revocation, in one transaction, also when the owner has no connection; then purges them. Call it before the host
|
|
201
|
-
* removes any source, credential or account row. Queued revocations outlive the account
|
|
209
|
+
* removes any source, credential or account row. Queued revocations outlive the account, and the block marker
|
|
210
|
+
* outlives `removeOwner`: it stays recorded as deleted, no longer pending, so `permits` stays false.
|
|
202
211
|
*/
|
|
203
212
|
deleteOwner(scope: SourceOwnerScope): Promise<void>;
|
|
204
213
|
/** Recover every pending intent for the owner. No grant or account row is required. */
|
|
@@ -255,6 +264,31 @@ export declare class SourceRevocations<Prepared = unknown> implements SourceSync
|
|
|
255
264
|
* @returns How many rows were removed.
|
|
256
265
|
*/
|
|
257
266
|
compact(): Promise<number>;
|
|
267
|
+
/**
|
|
268
|
+
* Removes a deleted owner's rows in one transaction once nothing about them is pending: from the store, each of its
|
|
269
|
+
* connections with their work rows, retained-source provenance and exclusions (`SqlAccountSourceSyncStore.removeOwner`),
|
|
270
|
+
* and from these tables its stop intents, the revoke-only queue rows they and its exchanges refer to, its grant leases
|
|
271
|
+
* and its exchanges. It waits while the deletion's purge is pending, while a revocation of one of its grants is
|
|
272
|
+
* pending, and until a day after its last exchange ended: a grant can still come back for that exchange and must find
|
|
273
|
+
* its record to be queued for revocation. The owner's block marker stays, recording the deletion, so `permits` and
|
|
274
|
+
* `canConnect` stay false and the owner is refused for good, even while the host's account row still reads active.
|
|
275
|
+
* The core fence's owner row and its deletion records stay too.
|
|
276
|
+
*
|
|
277
|
+
* @returns `removed`, `pending` or `not_deleted`, as `SourceOwnerRemoval` describes.
|
|
278
|
+
* @throws {SourceSyncFault} `storage_unavailable` when the store fails.
|
|
279
|
+
*/
|
|
280
|
+
removeOwner(scope: SourceOwnerScope): Promise<SourceOwnerRemoval>;
|
|
281
|
+
/**
|
|
282
|
+
* Removes, as `removeOwner` does, the rows of at most `limit` deleted owners a call: those with rows left to remove
|
|
283
|
+
* and nothing pending, the first by key, for a host whose own records of a deleted account are gone. Run it on a
|
|
284
|
+
* schedule beside `revokeBatch` and `compact`; an owner whose purge, revocation or exchange is not over waits for a
|
|
285
|
+
* later call, and an owner already removed is not taken again.
|
|
286
|
+
*
|
|
287
|
+
* @param limit - At most this many owners, an integer from 1 to 1,000.
|
|
288
|
+
* @returns How many owners' rows were removed.
|
|
289
|
+
* @throws {SourceSyncFault} `invalid_response` for another limit and `storage_unavailable` when the store fails.
|
|
290
|
+
*/
|
|
291
|
+
removeDeletedOwners(limit?: number): Promise<number>;
|
|
258
292
|
/** Records exchanges whose deadline passed with no grant returned as unconfirmed: their outcome is unknown. */
|
|
259
293
|
private lapseExchanges;
|
|
260
294
|
/** Takes the owner's lifecycle row lock, creating the row unblocked when missing; exchange changes take it first. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceRevocations.d.ts","sourceRoot":"","sources":["../../src/sync/SourceRevocations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EACpF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,qHAAqH;AACrH,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAEnE;AACD,oHAAoH;AACpH,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,oBAAoB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