@byok-sdk/cloud 0.9.0 → 0.10.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.
@@ -51,6 +51,13 @@ export interface DeviceRecord {
51
51
  /** Current proof signing-key rotation generation. */
52
52
  readonly proofKeyEpoch: number;
53
53
  readonly revoked: boolean;
54
+ /**
55
+ * Client-hashed physical machine identity (lowercase hex SHA-256), when the
56
+ * pairing carried one. Absent for every device paired without it — an
57
+ * absent value supersedes nothing, so it is never a filter that silently
58
+ * groups unidentified machines together.
59
+ */
60
+ readonly machineId?: string;
54
61
  /**
55
62
  * The latest capability snapshot written by an authenticated device
56
63
  * handshake. This is deliberately separate from core presence: presence is
@@ -66,8 +73,18 @@ export interface DeviceRegistration {
66
73
  readonly devicePublicKey: string;
67
74
  readonly proofKeyId: string;
68
75
  readonly proofKeyEpoch: number;
76
+ /**
77
+ * Optional client-hashed physical machine identity from `PairRequest`. When
78
+ * present, `register` revokes this tenant/product's prior non-revoked rows
79
+ * carrying the same value before inserting, so one physical machine holds
80
+ * one active device row per product. It names no tenant and no product of
81
+ * its own — both still come from the redeemed pairing code's claims — so it
82
+ * can only ever supersede rows the caller already addressed.
83
+ */
84
+ readonly machineId?: string;
69
85
  }
70
86
  export interface DeviceDirectory {
87
+ /** Registers the device. With `input.machineId` set this ALSO revokes this tenant/product's prior non-revoked rows carrying that same machine identity — one physical machine, one active row. */
71
88
  register(tenant: TenantId, input: DeviceRegistration): Promise<DeviceRecord>;
72
89
  /** The row `tenant` owns under `deviceId` — `undefined` including when the device exists under a DIFFERENT tenant. */
73
90
  get(tenant: TenantId, deviceId: string): Promise<DeviceRecord | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/cloud",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "BYOK SDK hosted device surface: stateless frozen-v1 HTTP handlers over tenant-first @byok-sdk/core ports",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "clean": "rm -rf dist"
45
45
  },
46
46
  "dependencies": {
47
- "@byok-sdk/core": "0.9.0",
48
- "@byok-sdk/protocol": "0.9.0",
47
+ "@byok-sdk/core": "0.10.0",
48
+ "@byok-sdk/protocol": "0.10.0",
49
49
  "hono": "^4.12.30",
50
50
  "zod": "^4.4.3"
51
51
  }