@byok-sdk/cloud 0.14.0 → 0.16.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.
@@ -0,0 +1,4 @@
1
+ import type { AgentRef } from '@byok-sdk/protocol';
2
+ export declare function uuidFromSha256(value: string): string;
3
+ export declare function taskOfferMessageId(tenant: string, taskId: string, deviceId: string, agentRef: AgentRef | undefined, sha256: (bytes: Uint8Array) => Promise<string>): Promise<string>;
4
+ export declare function hashOfferBytes(bytes: Uint8Array): Promise<string>;
@@ -1,3 +1,4 @@
1
+ import type { HarnessInfo } from '@byok-sdk/protocol';
1
2
  /**
2
3
  * In-memory {@link DeviceDirectory}.
3
4
  *
@@ -26,6 +27,7 @@ export declare class InMemoryDeviceDirectory implements DeviceDirectory {
26
27
  revoke(tenant: TenantId, deviceId: string): Promise<void>;
27
28
  recordCapabilities(tenant: TenantId, input: {
28
29
  readonly deviceId: string;
30
+ readonly harnesses?: readonly HarnessInfo[];
29
31
  readonly capabilities: readonly string[];
30
32
  }): Promise<DeviceRecord | undefined>;
31
33
  list(tenant: TenantId): Promise<readonly DeviceRecord[]>;
@@ -63,6 +63,7 @@ export declare class InMemoryTaskAttemptStore implements TaskAttemptStore {
63
63
  taskId: string;
64
64
  deviceId: string;
65
65
  runtime?: RuntimeId;
66
+ harnessId?: string;
66
67
  capabilities?: RuntimeCapabilities;
67
68
  }): Promise<TaskAttempt | undefined>;
68
69
  recordStatus(tenant: TenantId, input: {
@@ -1,3 +1,4 @@
1
+ import type { HarnessInfo } from '@byok-sdk/protocol';
1
2
  /**
2
3
  * The cloud-local store ports.
3
4
  *
@@ -68,6 +69,7 @@ export interface DeviceRecord {
68
69
  * lossy/TTL-bounded and cannot authorize Agent dispatch.
69
70
  */
70
71
  readonly capabilities?: readonly string[];
72
+ readonly harnesses?: readonly HarnessInfo[];
71
73
  }
72
74
  /** Everything `POST /byok/pair` knows at registration time. `tenantId` is the store's first parameter; `revoked` is the store's own to set (always `false`). */
73
75
  export interface DeviceRegistration {
@@ -122,6 +124,7 @@ export interface DeviceDirectory {
122
124
  */
123
125
  recordCapabilities(tenant: TenantId, input: {
124
126
  readonly deviceId: string;
127
+ readonly harnesses?: readonly HarnessInfo[];
125
128
  readonly capabilities: readonly string[];
126
129
  }): Promise<DeviceRecord | undefined>;
127
130
  /** Pre-tenant. Two callers only: `POST /byok/challenge` and `POST /byok/token`. Never exposed through the tenant facade. */
@@ -230,6 +233,7 @@ export interface TaskAttempt {
230
233
  * Absent for a daemon whose `task.claim` carried no `runtime` at all.
231
234
  */
232
235
  readonly claimedRuntime?: RuntimeId;
236
+ readonly claimedHarnessId?: string;
233
237
  /**
234
238
  * The capability block the CLAIMING adapter reported for ITSELF on that same
235
239
  * `task.claim` (`TaskClaimPayload.capabilities`), snapshotted under exactly
@@ -366,6 +370,7 @@ export interface TaskAttemptStore {
366
370
  readonly taskId: string;
367
371
  readonly deviceId: string;
368
372
  readonly runtime?: RuntimeId;
373
+ readonly harnessId?: string;
369
374
  readonly capabilities?: RuntimeCapabilities;
370
375
  }): Promise<TaskAttempt | undefined>;
371
376
  /** Record a lifecycle transition. No-op (returns `undefined`) for an unknown task — same shape as the reference server's per-type handlers. */
@@ -1,3 +1,4 @@
1
+ import type { HarnessInfo } from '@byok-sdk/protocol';
1
2
  /**
2
3
  * Layer 2 of the six-layer isolation model (§12.6.2) — the tenant-closed
3
4
  * facade a handler actually receives.
@@ -61,6 +62,7 @@ export interface TenantBoundDevices {
61
62
  revoke(deviceId: string): Promise<void>;
62
63
  /** Persist the authenticated device's own capability snapshot. */
63
64
  recordCapabilities(input: {
65
+ readonly harnesses?: readonly HarnessInfo[];
64
66
  readonly capabilities: readonly string[];
65
67
  }): Promise<DeviceRecord | undefined>;
66
68
  readiness(): Promise<TenantReadiness>;
@@ -105,6 +107,7 @@ export interface TenantBoundTaskAttempts {
105
107
  readonly taskId: string;
106
108
  readonly deviceId: string;
107
109
  readonly runtime?: RuntimeId;
110
+ readonly harnessId?: string;
108
111
  readonly capabilities?: RuntimeCapabilities;
109
112
  }): Promise<TaskAttempt | undefined>;
110
113
  recordStatus(input: {
@@ -1,4 +1,4 @@
1
- import { type AgentRef, type BlobRef, type TerminalInferenceUsage } from '@byok-sdk/protocol';
1
+ import { type AgentRef, type BlobRef, type TerminalInferenceUsage, type TaskFailPayload } from '@byok-sdk/protocol';
2
2
  import type { RequestReceipt } from './stores/ports';
3
3
  /**
4
4
  * The typed terminal read model — the hosted counterpart of the embedded
@@ -9,6 +9,9 @@ import type { RequestReceipt } from './stores/ports';
9
9
  */
10
10
  export interface TerminalResult {
11
11
  readonly taskId: string;
12
+ readonly harnessId?: string;
13
+ /** Local interruption observation; claimed ownership remains on TaskAttempt. */
14
+ readonly recovery?: TaskFailPayload['recovery'];
12
15
  readonly state: 'complete' | 'failed' | 'cancelled';
13
16
  /** Exact Agent identity echoed by the winning terminal, when Agent-bound. */
14
17
  readonly agentRef?: AgentRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/cloud",
3
- "version": "0.14.0",
3
+ "version": "0.16.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.14.0",
48
- "@byok-sdk/protocol": "0.14.0",
47
+ "@byok-sdk/core": "0.16.0",
48
+ "@byok-sdk/protocol": "0.16.0",
49
49
  "hono": "^4.12.30",
50
50
  "zod": "^4.4.3"
51
51
  }