@byok-sdk/cloud-dataplane 0.10.0 → 0.10.2

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.
@@ -8,6 +8,14 @@
8
8
  * tenant, so the caller never compares a tenant it was handed against one it
9
9
  * guessed. One row, two access paths, never two copies to keep in sync — a
10
10
  * stale pre-tenant index would be a revoked device that can still get a token.
11
+ *
12
+ * Revocation DELETES. The `revoked` column and {@link DeviceRecord.revoked}
13
+ * survive because every auth path reads them, but nothing in this module ever
14
+ * writes `true` any more: `revoke` and machine supersession remove the row and
15
+ * its device-scoped state, so a revoked device is byte-for-byte a device that
16
+ * was never registered. `device_active_machine_key` (0015) is still the
17
+ * invariant — its `NOT revoked` predicate simply never has a false row left to
18
+ * exclude.
11
19
  */
12
20
  import { type Clock, type PresenceStore, type TenantId, type TenantReadiness } from '@byok-sdk/core';
13
21
  import type { DeviceDirectory, DeviceRecord, DeviceRegistration } from '@byok-sdk/cloud';
@@ -17,6 +25,15 @@ export declare class PostgresDeviceDirectory implements DeviceDirectory {
17
25
  constructor(pool: Pool, clock?: Clock);
18
26
  register(tenant: TenantId, input: DeviceRegistration): Promise<DeviceRecord>;
19
27
  get(tenant: TenantId, deviceId: string): Promise<DeviceRecord | undefined>;
28
+ /**
29
+ * Revocation removes the registration and the device-scoped state that only
30
+ * existed to serve it, in one transaction: a half-applied revoke that left
31
+ * live presence or an unspent challenge nonce behind would be state for a
32
+ * device the directory can no longer name.
33
+ *
34
+ * A no-op for a device this tenant does not own: revoking what you cannot
35
+ * address deletes nothing and reports nothing back.
36
+ */
20
37
  revoke(tenant: TenantId, deviceId: string): Promise<void>;
21
38
  recordCapabilities(tenant: TenantId, input: {
22
39
  readonly deviceId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/cloud-dataplane",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "BYOK SDK hosted data plane: canonical Postgres + R2 stores, migrations, truth transactions, and maintenance",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,9 +49,9 @@
49
49
  "clean": "rm -rf dist"
50
50
  },
51
51
  "dependencies": {
52
- "@byok-sdk/cloud": "0.10.0",
53
- "@byok-sdk/core": "0.10.0",
54
- "@byok-sdk/protocol": "0.10.0",
52
+ "@byok-sdk/cloud": "0.10.2",
53
+ "@byok-sdk/core": "0.10.2",
54
+ "@byok-sdk/protocol": "0.10.2",
55
55
  "aws4fetch": "1.0.20",
56
56
  "fast-xml-parser": "^5.10.1",
57
57
  "pg": "^8.22.0"