@byok-sdk/protocol 0.7.0 → 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.
@@ -2,6 +2,8 @@ import { z } from 'zod';
2
2
  /** Additive daemon capability names. Server/cloud admission consumes these exactly. */
3
3
  export declare const AGENT_EGRESS_POLICY_CAPABILITY: 'agent-egress-policy';
4
4
  export declare const AGENT_EGRESS_RELIABLE_ACK_CAPABILITY: 'agent-egress-reliable-ack';
5
+ /** Admits the distinct offer whose runtime mints its session only after start. */
6
+ export declare const AGENT_EGRESS_FRESH_SESSION_CAPABILITY: 'agent-egress-fresh-session';
5
7
  export declare const AGENT_CONTENT_WORKSPACE_READ_CAPABILITY: 'agent-content-workspace-read';
6
8
  export declare const AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY: 'agent-content-transcript-read';
7
9
  export declare const AGENT_CONTENT_ARTIFACT_READ_CAPABILITY: 'agent-content-artifact-read';
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ /** Capability required before a task-free Agent-home projection is admitted. */
3
+ export declare const AGENT_HOME_PROJECTION_CAPABILITY: 'agent-home-projection';
4
+ /** Maximum UTF-8 encoded JSON bytes carried by one projection payload. */
5
+ export declare const AGENT_HOME_PROJECTION_MAX_BYTES: number;
6
+ /** PostgreSQL BIGINT maximum, kept as decimal text to avoid JavaScript precision loss. */
7
+ export declare const AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM: '9223372036854775807';
8
+ /**
9
+ * Canonical positive decimal Profile revision for this projection contract.
10
+ *
11
+ * This deliberately stays local to the projection contract: the generic
12
+ * AgentRef used by existing task and egress messages remains opaque. Values
13
+ * cross the JavaScript/PostgreSQL boundary as text and are compared
14
+ * lexically after canonical syntax validation.
15
+ */
16
+ export declare const AgentHomeProjectionProfileRevisionSchema: z.ZodString;
17
+ export type AgentHomeProjectionProfileRevision = z.infer<typeof AgentHomeProjectionProfileRevisionSchema>;
18
+ /** The projection hash uses the package-wide lowercase SHA-256 transport form. */
19
+ export declare const AgentHomeProjectionHashSchema: z.ZodString;
20
+ export type AgentHomeProjectionHash = z.infer<typeof AgentHomeProjectionHashSchema>;
21
+ /** Terminal local-apply outcome carried by the exact completion request. */
22
+ export declare const AgentHomeProjectionOutcomeSchema: z.ZodEnum<{
23
+ applied: "applied";
24
+ conflict: "conflict";
25
+ idempotent: "idempotent";
26
+ stale: "stale";
27
+ }>;
28
+ export type AgentHomeProjectionOutcome = z.infer<typeof AgentHomeProjectionOutcomeSchema>;
29
+ /**
30
+ * Bounded opaque JSON. The SDK enforces only byte size and does not interpret
31
+ * Salesko or any other product's fields. Credential custody remains outside
32
+ * this protocol surface; this schema intentionally defines no credential
33
+ * fields and is not a DLP scanner.
34
+ */
35
+ export type AgentHomeProjectionValue = string | number | boolean | null | AgentHomeProjectionValue[] | {
36
+ [key: string]: AgentHomeProjectionValue;
37
+ };
38
+ export declare const AgentHomeProjectionValueSchema: z.ZodType<AgentHomeProjectionValue>;
package/dist/codec.d.ts CHANGED
@@ -42,6 +42,10 @@ interface EnvelopeShapeOptions {
42
42
  taskId: string;
43
43
  seq: number;
44
44
  };
45
+ 'task.offer_for_agent_with_egress_fresh': {
46
+ taskId: string;
47
+ seq: number;
48
+ };
45
49
  'agent.egress.reliable': {
46
50
  taskId?: string;
47
51
  seq?: number;
@@ -54,6 +58,10 @@ interface EnvelopeShapeOptions {
54
58
  taskId?: string;
55
59
  seq: number;
56
60
  };
61
+ 'agent.home.projection': {
62
+ taskId?: never;
63
+ seq: number;
64
+ };
57
65
  'agent.content.receipt': {
58
66
  taskId?: string;
59
67
  seq?: number;
@@ -326,6 +326,96 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
326
326
  }, z.core.$strict>;
327
327
  }, z.core.$strict>;
328
328
  }, z.core.$strict>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ v: z.ZodNumber;
331
+ id: z.ZodUUID;
332
+ ts: z.ZodISODateTime;
333
+ type: z.ZodLiteral<"task.offer_for_agent_with_egress_fresh">;
334
+ task_id: z.ZodString;
335
+ session_ref: z.ZodOptional<z.ZodString>;
336
+ seq: z.ZodNumber;
337
+ payload: z.ZodObject<{
338
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
339
+ blobRef: z.ZodObject<{
340
+ blobId: z.ZodString;
341
+ contentHash: z.ZodString;
342
+ size: z.ZodNumber;
343
+ contentType: z.ZodString;
344
+ url: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strip>;
346
+ }, z.core.$strict>]>;
347
+ policy: z.ZodObject<{
348
+ mode: z.ZodEnum<{
349
+ auto: "auto";
350
+ confirm: "confirm";
351
+ plan: "plan";
352
+ readonly: "readonly";
353
+ }>;
354
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
355
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
356
+ workspaceRoot: z.ZodOptional<z.ZodString>;
357
+ network: z.ZodOptional<z.ZodBoolean>;
358
+ }, z.core.$strict>;
359
+ agentRef: z.ZodObject<{
360
+ agentId: z.ZodString;
361
+ profileRevision: z.ZodString;
362
+ }, z.core.$strict>;
363
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
364
+ runtime: z.ZodOptional<z.ZodEnum<{
365
+ claude: "claude";
366
+ codex: "codex";
367
+ pi: "pi";
368
+ }>>;
369
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
370
+ lane: z.ZodLiteral<"subscription">;
371
+ runtimeId: z.ZodEnum<{
372
+ claude: "claude";
373
+ codex: "codex";
374
+ }>;
375
+ providerId: z.ZodNull;
376
+ modelId: z.ZodString;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ lane: z.ZodLiteral<"byok">;
379
+ runtimeId: z.ZodLiteral<"pi">;
380
+ providerId: z.ZodString;
381
+ modelId: z.ZodString;
382
+ }, z.core.$strict>], "lane">>;
383
+ limits: z.ZodOptional<z.ZodObject<{
384
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
385
+ maxTokens: z.ZodOptional<z.ZodNumber>;
386
+ }, z.core.$strip>>;
387
+ egressPolicy: z.ZodObject<{
388
+ policyRevision: z.ZodString;
389
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
390
+ mode: z.ZodLiteral<"metadata-status">;
391
+ delivery: z.ZodLiteral<"latest-value">;
392
+ }, z.core.$strict>, z.ZodObject<{
393
+ mode: z.ZodLiteral<"contentful-trajectory">;
394
+ delivery: z.ZodLiteral<"latest-value">;
395
+ maxCoalesceMs: z.ZodNumber;
396
+ maxEventBytes: z.ZodNumber;
397
+ }, z.core.$strict>], "mode">;
398
+ reliable: z.ZodObject<{
399
+ maxPendingEventsPerAgent: z.ZodNumber;
400
+ maxPendingBytesPerAgent: z.ZodNumber;
401
+ maxPendingBytesPerTenant: z.ZodNumber;
402
+ }, z.core.$strict>;
403
+ transfers: z.ZodObject<{
404
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
405
+ maxBytes: z.ZodNumber;
406
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
407
+ }, z.core.$strict>]>;
408
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
409
+ maxBytes: z.ZodNumber;
410
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
411
+ }, z.core.$strict>]>;
412
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
413
+ maxBytes: z.ZodNumber;
414
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
415
+ }, z.core.$strict>]>;
416
+ }, z.core.$strict>;
417
+ }, z.core.$strict>;
418
+ }, z.core.$strict>;
329
419
  }, z.core.$strip>, z.ZodObject<{
330
420
  v: z.ZodNumber;
331
421
  id: z.ZodUUID;
@@ -391,6 +481,23 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
391
481
  allowedMimeTypes: z.ZodArray<z.ZodString>;
392
482
  }, z.core.$strict>;
393
483
  }, z.core.$strict>;
484
+ }, z.core.$strip>, z.ZodObject<{
485
+ v: z.ZodNumber;
486
+ id: z.ZodUUID;
487
+ ts: z.ZodISODateTime;
488
+ type: z.ZodLiteral<"agent.home.projection">;
489
+ task_id: z.ZodOptional<z.ZodNever>;
490
+ session_ref: z.ZodOptional<z.ZodString>;
491
+ seq: z.ZodNumber;
492
+ payload: z.ZodObject<{
493
+ requestId: z.ZodUUID;
494
+ agentRef: z.ZodObject<{
495
+ agentId: z.ZodString;
496
+ profileRevision: z.ZodString;
497
+ }, z.core.$strict>;
498
+ projectionHash: z.ZodString;
499
+ projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
500
+ }, z.core.$strict>;
394
501
  }, z.core.$strip>, z.ZodObject<{
395
502
  v: z.ZodNumber;
396
503
  id: z.ZodUUID;
@@ -418,6 +418,96 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
418
418
  }, z.core.$strict>;
419
419
  }, z.core.$strict>;
420
420
  }, z.core.$strict>;
421
+ }, z.core.$strip>, z.ZodObject<{
422
+ v: z.ZodNumber;
423
+ id: z.ZodUUID;
424
+ ts: z.ZodISODateTime;
425
+ type: z.ZodLiteral<"task.offer_for_agent_with_egress_fresh">;
426
+ task_id: z.ZodString;
427
+ session_ref: z.ZodOptional<z.ZodString>;
428
+ seq: z.ZodNumber;
429
+ payload: z.ZodObject<{
430
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
431
+ blobRef: z.ZodObject<{
432
+ blobId: z.ZodString;
433
+ contentHash: z.ZodString;
434
+ size: z.ZodNumber;
435
+ contentType: z.ZodString;
436
+ url: z.ZodOptional<z.ZodString>;
437
+ }, z.core.$strip>;
438
+ }, z.core.$strict>]>;
439
+ policy: z.ZodObject<{
440
+ mode: z.ZodEnum<{
441
+ auto: "auto";
442
+ confirm: "confirm";
443
+ plan: "plan";
444
+ readonly: "readonly";
445
+ }>;
446
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
447
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
448
+ workspaceRoot: z.ZodOptional<z.ZodString>;
449
+ network: z.ZodOptional<z.ZodBoolean>;
450
+ }, z.core.$strict>;
451
+ agentRef: z.ZodObject<{
452
+ agentId: z.ZodString;
453
+ profileRevision: z.ZodString;
454
+ }, z.core.$strict>;
455
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
456
+ runtime: z.ZodOptional<z.ZodEnum<{
457
+ claude: "claude";
458
+ codex: "codex";
459
+ pi: "pi";
460
+ }>>;
461
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
462
+ lane: z.ZodLiteral<"subscription">;
463
+ runtimeId: z.ZodEnum<{
464
+ claude: "claude";
465
+ codex: "codex";
466
+ }>;
467
+ providerId: z.ZodNull;
468
+ modelId: z.ZodString;
469
+ }, z.core.$strict>, z.ZodObject<{
470
+ lane: z.ZodLiteral<"byok">;
471
+ runtimeId: z.ZodLiteral<"pi">;
472
+ providerId: z.ZodString;
473
+ modelId: z.ZodString;
474
+ }, z.core.$strict>], "lane">>;
475
+ limits: z.ZodOptional<z.ZodObject<{
476
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
477
+ maxTokens: z.ZodOptional<z.ZodNumber>;
478
+ }, z.core.$strip>>;
479
+ egressPolicy: z.ZodObject<{
480
+ policyRevision: z.ZodString;
481
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
482
+ mode: z.ZodLiteral<"metadata-status">;
483
+ delivery: z.ZodLiteral<"latest-value">;
484
+ }, z.core.$strict>, z.ZodObject<{
485
+ mode: z.ZodLiteral<"contentful-trajectory">;
486
+ delivery: z.ZodLiteral<"latest-value">;
487
+ maxCoalesceMs: z.ZodNumber;
488
+ maxEventBytes: z.ZodNumber;
489
+ }, z.core.$strict>], "mode">;
490
+ reliable: z.ZodObject<{
491
+ maxPendingEventsPerAgent: z.ZodNumber;
492
+ maxPendingBytesPerAgent: z.ZodNumber;
493
+ maxPendingBytesPerTenant: z.ZodNumber;
494
+ }, z.core.$strict>;
495
+ transfers: z.ZodObject<{
496
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
497
+ maxBytes: z.ZodNumber;
498
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
499
+ }, z.core.$strict>]>;
500
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
501
+ maxBytes: z.ZodNumber;
502
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
503
+ }, z.core.$strict>]>;
504
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
505
+ maxBytes: z.ZodNumber;
506
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
507
+ }, z.core.$strict>]>;
508
+ }, z.core.$strict>;
509
+ }, z.core.$strict>;
510
+ }, z.core.$strict>;
421
511
  }, z.core.$strip>, z.ZodObject<{
422
512
  v: z.ZodNumber;
423
513
  id: z.ZodUUID;
@@ -483,6 +573,23 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
483
573
  allowedMimeTypes: z.ZodArray<z.ZodString>;
484
574
  }, z.core.$strict>;
485
575
  }, z.core.$strict>;
576
+ }, z.core.$strip>, z.ZodObject<{
577
+ v: z.ZodNumber;
578
+ id: z.ZodUUID;
579
+ ts: z.ZodISODateTime;
580
+ type: z.ZodLiteral<"agent.home.projection">;
581
+ task_id: z.ZodOptional<z.ZodNever>;
582
+ session_ref: z.ZodOptional<z.ZodString>;
583
+ seq: z.ZodNumber;
584
+ payload: z.ZodObject<{
585
+ requestId: z.ZodUUID;
586
+ agentRef: z.ZodObject<{
587
+ agentId: z.ZodString;
588
+ profileRevision: z.ZodString;
589
+ }, z.core.$strict>;
590
+ projectionHash: z.ZodString;
591
+ projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
592
+ }, z.core.$strict>;
486
593
  }, z.core.$strip>, z.ZodObject<{
487
594
  v: z.ZodNumber;
488
595
  id: z.ZodUUID;
@@ -1234,6 +1341,96 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
1234
1341
  }, z.core.$strict>;
1235
1342
  }, z.core.$strict>;
1236
1343
  }, z.core.$strict>;
1344
+ }, z.core.$strip>, z.ZodObject<{
1345
+ v: z.ZodNumber;
1346
+ id: z.ZodUUID;
1347
+ ts: z.ZodISODateTime;
1348
+ type: z.ZodLiteral<"task.offer_for_agent_with_egress_fresh">;
1349
+ task_id: z.ZodString;
1350
+ session_ref: z.ZodOptional<z.ZodString>;
1351
+ seq: z.ZodNumber;
1352
+ payload: z.ZodObject<{
1353
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1354
+ blobRef: z.ZodObject<{
1355
+ blobId: z.ZodString;
1356
+ contentHash: z.ZodString;
1357
+ size: z.ZodNumber;
1358
+ contentType: z.ZodString;
1359
+ url: z.ZodOptional<z.ZodString>;
1360
+ }, z.core.$strip>;
1361
+ }, z.core.$strict>]>;
1362
+ policy: z.ZodObject<{
1363
+ mode: z.ZodEnum<{
1364
+ auto: "auto";
1365
+ confirm: "confirm";
1366
+ plan: "plan";
1367
+ readonly: "readonly";
1368
+ }>;
1369
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1370
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1371
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1372
+ network: z.ZodOptional<z.ZodBoolean>;
1373
+ }, z.core.$strict>;
1374
+ agentRef: z.ZodObject<{
1375
+ agentId: z.ZodString;
1376
+ profileRevision: z.ZodString;
1377
+ }, z.core.$strict>;
1378
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1379
+ runtime: z.ZodOptional<z.ZodEnum<{
1380
+ claude: "claude";
1381
+ codex: "codex";
1382
+ pi: "pi";
1383
+ }>>;
1384
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1385
+ lane: z.ZodLiteral<"subscription">;
1386
+ runtimeId: z.ZodEnum<{
1387
+ claude: "claude";
1388
+ codex: "codex";
1389
+ }>;
1390
+ providerId: z.ZodNull;
1391
+ modelId: z.ZodString;
1392
+ }, z.core.$strict>, z.ZodObject<{
1393
+ lane: z.ZodLiteral<"byok">;
1394
+ runtimeId: z.ZodLiteral<"pi">;
1395
+ providerId: z.ZodString;
1396
+ modelId: z.ZodString;
1397
+ }, z.core.$strict>], "lane">>;
1398
+ limits: z.ZodOptional<z.ZodObject<{
1399
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1400
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1401
+ }, z.core.$strip>>;
1402
+ egressPolicy: z.ZodObject<{
1403
+ policyRevision: z.ZodString;
1404
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1405
+ mode: z.ZodLiteral<"metadata-status">;
1406
+ delivery: z.ZodLiteral<"latest-value">;
1407
+ }, z.core.$strict>, z.ZodObject<{
1408
+ mode: z.ZodLiteral<"contentful-trajectory">;
1409
+ delivery: z.ZodLiteral<"latest-value">;
1410
+ maxCoalesceMs: z.ZodNumber;
1411
+ maxEventBytes: z.ZodNumber;
1412
+ }, z.core.$strict>], "mode">;
1413
+ reliable: z.ZodObject<{
1414
+ maxPendingEventsPerAgent: z.ZodNumber;
1415
+ maxPendingBytesPerAgent: z.ZodNumber;
1416
+ maxPendingBytesPerTenant: z.ZodNumber;
1417
+ }, z.core.$strict>;
1418
+ transfers: z.ZodObject<{
1419
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1420
+ maxBytes: z.ZodNumber;
1421
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1422
+ }, z.core.$strict>]>;
1423
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1424
+ maxBytes: z.ZodNumber;
1425
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1426
+ }, z.core.$strict>]>;
1427
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1428
+ maxBytes: z.ZodNumber;
1429
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1430
+ }, z.core.$strict>]>;
1431
+ }, z.core.$strict>;
1432
+ }, z.core.$strict>;
1433
+ }, z.core.$strict>;
1237
1434
  }, z.core.$strip>, z.ZodObject<{
1238
1435
  v: z.ZodNumber;
1239
1436
  id: z.ZodUUID;
@@ -1299,6 +1496,23 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
1299
1496
  allowedMimeTypes: z.ZodArray<z.ZodString>;
1300
1497
  }, z.core.$strict>;
1301
1498
  }, z.core.$strict>;
1499
+ }, z.core.$strip>, z.ZodObject<{
1500
+ v: z.ZodNumber;
1501
+ id: z.ZodUUID;
1502
+ ts: z.ZodISODateTime;
1503
+ type: z.ZodLiteral<"agent.home.projection">;
1504
+ task_id: z.ZodOptional<z.ZodNever>;
1505
+ session_ref: z.ZodOptional<z.ZodString>;
1506
+ seq: z.ZodNumber;
1507
+ payload: z.ZodObject<{
1508
+ requestId: z.ZodUUID;
1509
+ agentRef: z.ZodObject<{
1510
+ agentId: z.ZodString;
1511
+ profileRevision: z.ZodString;
1512
+ }, z.core.$strict>;
1513
+ projectionHash: z.ZodString;
1514
+ projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
1515
+ }, z.core.$strict>;
1302
1516
  }, z.core.$strip>, z.ZodObject<{
1303
1517
  v: z.ZodNumber;
1304
1518
  id: z.ZodUUID;
@@ -1742,6 +1956,48 @@ export declare const MessagesSendResponseSchema: z.ZodObject<{
1742
1956
  rejected: z.ZodOptional<z.ZodNumber>;
1743
1957
  }, z.core.$strip>;
1744
1958
  export type MessagesSendResponse = z.infer<typeof MessagesSendResponseSchema>;
1959
+ export declare const AgentHomeProjectionCompletionRequestSchema: z.ZodObject<{
1960
+ requestId: z.ZodUUID;
1961
+ agentRef: z.ZodObject<{
1962
+ agentId: z.ZodString;
1963
+ profileRevision: z.ZodString;
1964
+ }, z.core.$strict>;
1965
+ projectionHash: z.ZodString;
1966
+ outcome: z.ZodEnum<{
1967
+ applied: "applied";
1968
+ conflict: "conflict";
1969
+ idempotent: "idempotent";
1970
+ stale: "stale";
1971
+ }>;
1972
+ }, z.core.$strict>;
1973
+ export type AgentHomeProjectionCompletionRequest = z.infer<typeof AgentHomeProjectionCompletionRequestSchema>;
1974
+ export declare const AgentHomeProjectionStatusSchema: z.ZodEnum<{
1975
+ applied: "applied";
1976
+ conflict: "conflict";
1977
+ idempotent: "idempotent";
1978
+ pending: "pending";
1979
+ stale: "stale";
1980
+ }>;
1981
+ export type AgentHomeProjectionStatus = z.infer<typeof AgentHomeProjectionStatusSchema>;
1982
+ export declare const AgentHomeProjectionReadbackSchema: z.ZodObject<{
1983
+ tenantId: z.ZodString;
1984
+ deviceId: z.ZodString;
1985
+ requestId: z.ZodUUID;
1986
+ agentRef: z.ZodObject<{
1987
+ agentId: z.ZodString;
1988
+ profileRevision: z.ZodString;
1989
+ }, z.core.$strict>;
1990
+ projectionHash: z.ZodString;
1991
+ status: z.ZodEnum<{
1992
+ applied: "applied";
1993
+ conflict: "conflict";
1994
+ idempotent: "idempotent";
1995
+ pending: "pending";
1996
+ stale: "stale";
1997
+ }>;
1998
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
1999
+ }, z.core.$strict>;
2000
+ export type AgentHomeProjectionReadback = z.infer<typeof AgentHomeProjectionReadbackSchema>;
1745
2001
  /** `GET /byok/ws` — WebSocket upgrade path. */
1746
2002
  export declare const BYOK_WS_PATH = "/byok/ws";
1747
2003
  /** `POST /byok/pair` — one-time device pairing (§6). */
@@ -1756,6 +2012,10 @@ export declare const BYOK_CAPABILITIES_PATH = "/byok/capabilities";
1756
2012
  export declare const BYOK_EVENTS_PATH = "/byok/events";
1757
2013
  /** `POST /byok/messages` — long-poll batched send (§8.2). */
1758
2014
  export declare const BYOK_MESSAGES_PATH = "/byok/messages";
2015
+ /** `PUT /byok/agent-home-projections/:requestId/completion`. */
2016
+ export declare const BYOK_AGENT_HOME_PROJECTIONS_PATH = "/byok/agent-home-projections";
2017
+ export declare const BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE = "/byok/agent-home-projections/:requestId/completion";
2018
+ export declare function byokAgentHomeProjectionCompletionPath(requestId: string): string;
1759
2019
  /** `PUT /byok/presence` — presence heartbeat. */
1760
2020
  export declare const BYOK_PRESENCE_PATH = "/byok/presence";
1761
2021
  /** `POST /byok/activity` — activity-tail append. */
package/dist/index.d.ts CHANGED
@@ -6,16 +6,18 @@ export { PermissionPolicySchema, PERMISSION_MODES } from './permission';
6
6
  export type { PermissionPolicy, PermissionMode } from './permission';
7
7
  export { AgentEventSchema, UnknownAgentEventSchema, AgentEventOrUnknownSchema, KNOWN_AGENT_EVENT_TYPES, isKnownAgentEvent, partitionAgentEvents, } from './agent-event';
8
8
  export type { AgentEvent, UnknownAgentEvent, AgentEventOrUnknown } from './agent-event';
9
- export { AgentEgressPolicySchema, AgentEgressActivityPolicySchema, AgentReliableQuotaPolicySchema, ContentReadPolicySchema, AgentEgressLaneSchema, AgentEgressDropReasonSchema, AgentContentReadSurfaceSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentEgressContentHashSchema, AgentEgressPolicyRevisionSchema, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, } from './agent-egress';
9
+ export { AgentEgressPolicySchema, AgentEgressActivityPolicySchema, AgentReliableQuotaPolicySchema, ContentReadPolicySchema, AgentEgressLaneSchema, AgentEgressDropReasonSchema, AgentContentReadSurfaceSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentEgressContentHashSchema, AgentEgressPolicyRevisionSchema, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, } from './agent-egress';
10
10
  export type { AgentEgressPolicy, AgentEgressActivityPolicy, AgentReliableQuotaPolicy, ContentReadPolicy, AgentEgressLane, AgentEgressDropReason, AgentContentReadSurface, AgentContentActorKind, AgentContentActor, AgentContentDecodeAs, AgentContentReadDecision, AgentContentReadDenialReason, } from './agent-egress';
11
+ export { AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionValueSchema, } from './agent-home-projection';
12
+ export type { AgentHomeProjectionProfileRevision, AgentHomeProjectionHash, AgentHomeProjectionOutcome, AgentHomeProjectionValue, } from './agent-home-projection';
11
13
  export { TASK_STATES, TASK_TRANSITIONS, canTransition } from './task-state';
12
14
  export type { TaskState } from './task-state';
13
- export { MESSAGE_TYPES, MESSAGE_PAYLOAD_SCHEMAS, SERVER_TO_DAEMON_TYPES, DAEMON_TO_SERVER_TYPES, RuntimeIdSchema, ProtocolVersionNumberSchema, RuntimeInfoSchema, RuntimeCapabilitiesSchema, AgentRefSchema, AGENT_REF_MAX_BYTES, DispatchSelectionSchema, ToolsetIdSchema, ConfiguredToolsetsSchema, RequiredToolsetsSchema, CONFIGURED_TOOLSETS_MAX_ITEMS, ConnHelloPayloadSchema, ConnAckPayloadSchema, TaskOfferPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, AgentEgressReliablePayloadSchema, AgentEgressAckPayloadSchema, AgentContentReadPayloadSchema, AgentContentReceiptPayloadSchema, TaskApprovePayloadSchema, TaskRejectPayloadSchema, TaskCancelPayloadSchema, TaskSteerPayloadSchema, TaskClaimPayloadSchema, TaskStartedPayloadSchema, TaskDeclinePayloadSchema, TaskProgressPayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCompletePayloadSchema, TaskFailPayloadSchema, TaskCancelledPayloadSchema, TaskApprovalResolvedPayloadSchema, RESULT_DOCUMENT_MAX_BYTES, checkResultDocument, TerminalInferenceUsageSchema, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, } from './messages';
14
- export type { ResultDocumentCheck, MessageType, RuntimeId, RuntimeInfo, RuntimeCapabilities, AgentRef, DispatchSelection, ToolsetId, ConnHelloPayload, ConnAckPayload, TaskOfferPayload, TaskOfferWithToolsetsPayload, TaskOfferForAgentPayload, TaskOfferForAgentWithEgressPayload, AgentEgressReliablePayload, AgentEgressAckPayload, AgentContentReadPayload, AgentContentReceiptPayload, TaskApprovePayload, TaskRejectPayload, TaskCancelPayload, TaskSteerPayload, TaskClaimPayload, TaskStartedPayload, TaskDeclinePayload, TaskProgressPayload, TaskArtifactPayload, TaskAwaitApprovalPayload, TaskCompletePayload, TaskFailPayload, TaskCancelledPayload, TaskApprovalResolvedPayload, TerminalInferenceUsage, } from './messages';
15
+ export { MESSAGE_TYPES, MESSAGE_PAYLOAD_SCHEMAS, SERVER_TO_DAEMON_TYPES, DAEMON_TO_SERVER_TYPES, RuntimeIdSchema, ProtocolVersionNumberSchema, RuntimeInfoSchema, RuntimeCapabilitiesSchema, AgentRefSchema, AgentHomeProjectionAgentRefSchema, AGENT_REF_MAX_BYTES, DispatchSelectionSchema, ToolsetIdSchema, ConfiguredToolsetsSchema, RequiredToolsetsSchema, CONFIGURED_TOOLSETS_MAX_ITEMS, ConnHelloPayloadSchema, ConnAckPayloadSchema, TaskOfferPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, AgentEgressReliablePayloadSchema, AgentEgressAckPayloadSchema, AgentContentReadPayloadSchema, AgentContentReceiptPayloadSchema, AgentHomeProjectionPayloadSchema, TaskApprovePayloadSchema, TaskRejectPayloadSchema, TaskCancelPayloadSchema, TaskSteerPayloadSchema, TaskClaimPayloadSchema, TaskStartedPayloadSchema, TaskDeclinePayloadSchema, TaskProgressPayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCompletePayloadSchema, TaskFailPayloadSchema, TaskCancelledPayloadSchema, TaskApprovalResolvedPayloadSchema, RESULT_DOCUMENT_MAX_BYTES, checkResultDocument, TerminalInferenceUsageSchema, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, } from './messages';
16
+ export type { ResultDocumentCheck, MessageType, RuntimeId, RuntimeInfo, RuntimeCapabilities, AgentRef, AgentHomeProjectionAgentRef, DispatchSelection, ToolsetId, ConnHelloPayload, ConnAckPayload, TaskOfferPayload, TaskOfferWithToolsetsPayload, TaskOfferForAgentPayload, TaskOfferForAgentWithEgressPayload, TaskOfferForAgentWithEgressFreshPayload, AgentEgressReliablePayload, AgentEgressAckPayload, AgentContentReadPayload, AgentContentReceiptPayload, AgentHomeProjectionPayload, TaskApprovePayload, TaskRejectPayload, TaskCancelPayload, TaskSteerPayload, TaskClaimPayload, TaskStartedPayload, TaskDeclinePayload, TaskProgressPayload, TaskArtifactPayload, TaskAwaitApprovalPayload, TaskCompletePayload, TaskFailPayload, TaskCancelledPayload, TaskApprovalResolvedPayload, TerminalInferenceUsage, } from './messages';
15
17
  export { EnvelopeSchema, isServerToDaemonType } from './envelope';
16
18
  export type { Envelope } from './envelope';
17
19
  export { ProtocolError, EnvelopeParseError, UnknownMessageTypeError, EnvelopeValidationError, } from './errors';
18
20
  export { encodeEnvelope, decodeEnvelope, createEnvelope, parseMessage } from './codec';
19
21
  export type { CreateEnvelopeOptions } from './codec';
20
- export { PairRequestSchema, PairResponseTenantIdSchema, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PairResponseSchema, ChallengeRequestSchema, ChallengeResponseSchema, TokenRequestSchema, TokenResponseSchema, PresencePublishRequestSchema, CreateBlobRequestSchema, CreateBlobResponseSchema, BlobDownloadUrlResponseSchema, EventsPollQuerySchema, EventsPollResponseSchema, MessagesSendRequestSchema, MessagesSendResponseSchema, MAX_MESSAGES_PER_BATCH, BYOK_WS_PATH, BYOK_PAIR_PATH, BYOK_CHALLENGE_PATH, BYOK_TOKEN_PATH, BYOK_CAPABILITIES_PATH, BYOK_EVENTS_PATH, BYOK_MESSAGES_PATH, BYOK_PRESENCE_PATH, BYOK_ACTIVITY_PATH, BYOK_BOARD_PATH, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_BOARD_STATUS_ROUTE, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, byokRecordPath, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, byokSkillPackFilePath, BYOK_BLOBS_PATH, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BLOB_CONTENT_ROUTE, byokBlobFinalizePath, byokBlobUrlPath, byokBlobContentPath, } from './http-api';
21
- export type { PairRequest, PairResponse, ChallengeRequest, ChallengeResponse, TokenRequest, TokenResponse, PresencePublishRequest, CreateBlobRequest, CreateBlobResponse, BlobDownloadUrlResponse, EventsPollQuery, EventsPollResponse, MessagesSendRequest, MessagesSendResponse, } from './http-api';
22
+ export { PairRequestSchema, PairResponseTenantIdSchema, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PairResponseSchema, ChallengeRequestSchema, ChallengeResponseSchema, TokenRequestSchema, TokenResponseSchema, PresencePublishRequestSchema, CreateBlobRequestSchema, CreateBlobResponseSchema, BlobDownloadUrlResponseSchema, EventsPollQuerySchema, EventsPollResponseSchema, MessagesSendRequestSchema, MessagesSendResponseSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionReadbackSchema, MAX_MESSAGES_PER_BATCH, BYOK_WS_PATH, BYOK_PAIR_PATH, BYOK_CHALLENGE_PATH, BYOK_TOKEN_PATH, BYOK_CAPABILITIES_PATH, BYOK_EVENTS_PATH, BYOK_MESSAGES_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, byokAgentHomeProjectionCompletionPath, BYOK_PRESENCE_PATH, BYOK_ACTIVITY_PATH, BYOK_BOARD_PATH, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_BOARD_STATUS_ROUTE, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, byokRecordPath, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, byokSkillPackFilePath, BYOK_BLOBS_PATH, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BLOB_CONTENT_ROUTE, byokBlobFinalizePath, byokBlobUrlPath, byokBlobContentPath, } from './http-api';
23
+ export type { PairRequest, PairResponse, ChallengeRequest, ChallengeResponse, TokenRequest, TokenResponse, PresencePublishRequest, CreateBlobRequest, CreateBlobResponse, BlobDownloadUrlResponse, EventsPollQuery, EventsPollResponse, MessagesSendRequest, MessagesSendResponse, AgentHomeProjectionCompletionRequest, AgentHomeProjectionStatus, AgentHomeProjectionReadback, } from './http-api';