@byok-sdk/protocol 0.8.1 → 0.9.0-rc.1
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/dist/agent-egress.d.ts +27 -0
- package/dist/agent-memory-projection.d.ts +110 -0
- package/dist/codec.d.ts +8 -0
- package/dist/envelope.d.ts +87 -0
- package/dist/http-api.d.ts +232 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.js +171 -27
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +147 -2
- package/dist/terminal-projection.d.ts +12 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/agent-egress.d.ts
CHANGED
|
@@ -4,9 +4,36 @@ 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
5
|
/** Admits the distinct offer whose runtime mints its session only after start. */
|
|
6
6
|
export declare const AGENT_EGRESS_FRESH_SESSION_CAPABILITY: 'agent-egress-fresh-session';
|
|
7
|
+
/** Admits the distinct Agent-authored message lane; activity policy remains independent. */
|
|
8
|
+
export declare const AGENT_MESSAGE_EGRESS_CAPABILITY: 'agent-message-egress';
|
|
7
9
|
export declare const AGENT_CONTENT_WORKSPACE_READ_CAPABILITY: 'agent-content-workspace-read';
|
|
8
10
|
export declare const AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY: 'agent-content-transcript-read';
|
|
9
11
|
export declare const AGENT_CONTENT_ARTIFACT_READ_CAPABILITY: 'agent-content-artifact-read';
|
|
12
|
+
export declare const AGENT_MESSAGE_MAX_BYTES: number;
|
|
13
|
+
export declare const AgentMessageContractSchema: z.ZodString;
|
|
14
|
+
export declare const AgentMessageContentTypeSchema: z.ZodEnum<{
|
|
15
|
+
"text/markdown": "text/markdown";
|
|
16
|
+
"text/plain": "text/plain";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const AgentMessageDestinationBindingSchema: z.ZodString;
|
|
19
|
+
export declare const AgentMessageFreshnessCursorSchema: z.ZodString;
|
|
20
|
+
/** Host-only product authority. It is never serialized into an Agent offer or message envelope. */
|
|
21
|
+
export declare const AgentMessageServerContextSchema: z.ZodObject<{
|
|
22
|
+
destinationBinding: z.ZodString;
|
|
23
|
+
freshnessCursor: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const AgentMessageEgressRequirementSchema: z.ZodObject<{
|
|
26
|
+
mode: z.ZodLiteral<"required">;
|
|
27
|
+
contract: z.ZodString;
|
|
28
|
+
contentType: z.ZodEnum<{
|
|
29
|
+
"text/markdown": "text/markdown";
|
|
30
|
+
"text/plain": "text/plain";
|
|
31
|
+
}>;
|
|
32
|
+
maxBytes: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type AgentMessageEgressRequirement = z.infer<typeof AgentMessageEgressRequirementSchema>;
|
|
35
|
+
export type AgentMessageContentType = z.infer<typeof AgentMessageContentTypeSchema>;
|
|
36
|
+
export type AgentMessageServerContext = z.infer<typeof AgentMessageServerContextSchema>;
|
|
10
37
|
export declare const AgentContentMimeTypeSchema: z.ZodString;
|
|
11
38
|
/** Explicit MIME and byte policy for one independently-authorized content surface. */
|
|
12
39
|
export declare const ContentReadPolicySchema: z.ZodObject<{
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Capability required before the optional hosted Agent-memory projection can be used. */
|
|
3
|
+
export declare const AGENT_MEMORY_PROJECTION_CAPABILITY: 'agent.memory.projection';
|
|
4
|
+
/** One hosted projection is bounded before it enters the redaction or storage seam. */
|
|
5
|
+
export declare const AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES: number;
|
|
6
|
+
/** PostgreSQL `integer` ceiling shared by writer epochs and source sequences. */
|
|
7
|
+
export declare const AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE = 2147483647;
|
|
8
|
+
/** Opaque, embedder-issued authorization grant. It is never interpreted as a consent boolean. */
|
|
9
|
+
export declare const AgentMemoryProjectionGrantRefSchema: z.ZodString;
|
|
10
|
+
export type AgentMemoryProjectionGrantRef = z.infer<typeof AgentMemoryProjectionGrantRefSchema>;
|
|
11
|
+
/** Exact local runtime session identity. No cwd or local source path is portable. */
|
|
12
|
+
export declare const AgentMemoryProjectionSessionRefSchema: z.ZodString;
|
|
13
|
+
export type AgentMemoryProjectionSessionRef = z.infer<typeof AgentMemoryProjectionSessionRefSchema>;
|
|
14
|
+
/** Positive epoch that changes only when the local single-writer authority changes. */
|
|
15
|
+
export declare const AgentMemoryProjectionWriterEpochSchema: z.ZodNumber;
|
|
16
|
+
export type AgentMemoryProjectionWriterEpoch = z.infer<typeof AgentMemoryProjectionWriterEpochSchema>;
|
|
17
|
+
/** Positive sequence within one writer epoch. A new epoch starts at one. */
|
|
18
|
+
export declare const AgentMemoryProjectionSourceSeqSchema: z.ZodNumber;
|
|
19
|
+
export type AgentMemoryProjectionSourceSeq = z.infer<typeof AgentMemoryProjectionSourceSeqSchema>;
|
|
20
|
+
/** Byte length implied by the unpadded base64url transport string. */
|
|
21
|
+
export declare function agentMemoryProjectionBase64UrlByteLength(value: string): number | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The only body-bearing field in the hosted contract. It is already redacted
|
|
24
|
+
* by the embedder; source bytes, raw-source hashes, cwd, and local paths never
|
|
25
|
+
* cross this boundary. The hosted store re-hashes these bytes before commit.
|
|
26
|
+
*/
|
|
27
|
+
export declare const AgentMemoryProjectionSnapshotSchema: z.ZodObject<{
|
|
28
|
+
redactedHash: z.ZodString;
|
|
29
|
+
redactedByteCount: z.ZodNumber;
|
|
30
|
+
redactedBytes: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type AgentMemoryProjectionSnapshot = z.infer<typeof AgentMemoryProjectionSnapshotSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* Device -> hosted mutation for one redacted full snapshot. It intentionally
|
|
35
|
+
* contains no tenant/device identity: authenticated transport supplies both.
|
|
36
|
+
* The snapshot is a one-way copy of local `MEMORY.md` plus local `notes/`, not
|
|
37
|
+
* a remote authoring, merge, import, history, or RAG contract.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AgentMemoryProjectionMutationSchema: z.ZodObject<{
|
|
40
|
+
taskId: z.ZodString;
|
|
41
|
+
agentRef: z.ZodObject<{
|
|
42
|
+
agentId: z.ZodString;
|
|
43
|
+
profileRevision: z.ZodString;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
sessionRef: z.ZodString;
|
|
46
|
+
runtimeId: z.ZodEnum<{
|
|
47
|
+
claude: "claude";
|
|
48
|
+
codex: "codex";
|
|
49
|
+
pi: "pi";
|
|
50
|
+
}>;
|
|
51
|
+
grantRef: z.ZodString;
|
|
52
|
+
writerEpoch: z.ZodNumber;
|
|
53
|
+
sourceSeq: z.ZodNumber;
|
|
54
|
+
mutationId: z.ZodUUID;
|
|
55
|
+
policyRevision: z.ZodString;
|
|
56
|
+
snapshot: z.ZodObject<{
|
|
57
|
+
redactedHash: z.ZodString;
|
|
58
|
+
redactedByteCount: z.ZodNumber;
|
|
59
|
+
redactedBytes: z.ZodString;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type AgentMemoryProjectionMutation = z.infer<typeof AgentMemoryProjectionMutationSchema>;
|
|
63
|
+
/** Stable meter receipt for one accepted redacted snapshot; it never carries the snapshot body. */
|
|
64
|
+
export declare const AgentMemoryProjectionMeteringReceiptSchema: z.ZodObject<{
|
|
65
|
+
meteringReceiptId: z.ZodUUID;
|
|
66
|
+
acceptedRedactedBytes: z.ZodNumber;
|
|
67
|
+
recordedAt: z.ZodISODateTime;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export type AgentMemoryProjectionMeteringReceipt = z.infer<typeof AgentMemoryProjectionMeteringReceiptSchema>;
|
|
70
|
+
/** Immutable commit readback. It repeats identity and redacted metadata, never redacted bytes. */
|
|
71
|
+
export declare const AgentMemoryProjectionReceiptSchema: z.ZodObject<{
|
|
72
|
+
outcome: z.ZodEnum<{
|
|
73
|
+
accepted: "accepted";
|
|
74
|
+
idempotent: "idempotent";
|
|
75
|
+
}>;
|
|
76
|
+
tenantId: z.ZodString;
|
|
77
|
+
deviceId: z.ZodString;
|
|
78
|
+
taskId: z.ZodString;
|
|
79
|
+
agentRef: z.ZodObject<{
|
|
80
|
+
agentId: z.ZodString;
|
|
81
|
+
profileRevision: z.ZodString;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
sessionRef: z.ZodString;
|
|
84
|
+
runtimeId: z.ZodEnum<{
|
|
85
|
+
claude: "claude";
|
|
86
|
+
codex: "codex";
|
|
87
|
+
pi: "pi";
|
|
88
|
+
}>;
|
|
89
|
+
grantRef: z.ZodString;
|
|
90
|
+
writerEpoch: z.ZodNumber;
|
|
91
|
+
sourceSeq: z.ZodNumber;
|
|
92
|
+
mutationId: z.ZodUUID;
|
|
93
|
+
policyRevision: z.ZodString;
|
|
94
|
+
redactedHash: z.ZodString;
|
|
95
|
+
redactedByteCount: z.ZodNumber;
|
|
96
|
+
metering: z.ZodObject<{
|
|
97
|
+
meteringReceiptId: z.ZodUUID;
|
|
98
|
+
acceptedRedactedBytes: z.ZodNumber;
|
|
99
|
+
recordedAt: z.ZodISODateTime;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
export type AgentMemoryProjectionReceipt = z.infer<typeof AgentMemoryProjectionReceiptSchema>;
|
|
103
|
+
/**
|
|
104
|
+
* Server-side erase result. The returned epoch is the minimum legal epoch for
|
|
105
|
+
* a later host-issued writer grant; erased source epochs can never re-enter.
|
|
106
|
+
*/
|
|
107
|
+
export declare const AgentMemoryProjectionEraseResultSchema: z.ZodObject<{
|
|
108
|
+
nextWriterEpoch: z.ZodNumber;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
export type AgentMemoryProjectionEraseResult = z.infer<typeof AgentMemoryProjectionEraseResultSchema>;
|
package/dist/codec.d.ts
CHANGED
|
@@ -54,6 +54,14 @@ interface EnvelopeShapeOptions {
|
|
|
54
54
|
taskId?: string;
|
|
55
55
|
seq: number;
|
|
56
56
|
};
|
|
57
|
+
'agent.message.publish': {
|
|
58
|
+
taskId: string;
|
|
59
|
+
seq?: number;
|
|
60
|
+
};
|
|
61
|
+
'agent.message.disposition': {
|
|
62
|
+
taskId: string;
|
|
63
|
+
seq: number;
|
|
64
|
+
};
|
|
57
65
|
'agent.content.read': {
|
|
58
66
|
taskId?: string;
|
|
59
67
|
seq: number;
|
package/dist/envelope.d.ts
CHANGED
|
@@ -229,6 +229,12 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
229
229
|
providerId: z.ZodString;
|
|
230
230
|
modelId: z.ZodString;
|
|
231
231
|
}, z.core.$strict>], "lane">>;
|
|
232
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
233
|
+
mode: z.ZodLiteral<"none">;
|
|
234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
235
|
+
mode: z.ZodLiteral<"result-document">;
|
|
236
|
+
contract: z.ZodString;
|
|
237
|
+
}, z.core.$strict>], "mode">>;
|
|
232
238
|
sessionRef: z.ZodOptional<z.ZodString>;
|
|
233
239
|
limits: z.ZodOptional<z.ZodObject<{
|
|
234
240
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -289,6 +295,12 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
289
295
|
providerId: z.ZodString;
|
|
290
296
|
modelId: z.ZodString;
|
|
291
297
|
}, z.core.$strict>], "lane">>;
|
|
298
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
299
|
+
mode: z.ZodLiteral<"none">;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
mode: z.ZodLiteral<"result-document">;
|
|
302
|
+
contract: z.ZodString;
|
|
303
|
+
}, z.core.$strict>], "mode">>;
|
|
292
304
|
limits: z.ZodOptional<z.ZodObject<{
|
|
293
305
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
294
306
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -325,6 +337,15 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
325
337
|
}, z.core.$strict>]>;
|
|
326
338
|
}, z.core.$strict>;
|
|
327
339
|
}, z.core.$strict>;
|
|
340
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
mode: z.ZodLiteral<"required">;
|
|
342
|
+
contract: z.ZodString;
|
|
343
|
+
contentType: z.ZodEnum<{
|
|
344
|
+
"text/markdown": "text/markdown";
|
|
345
|
+
"text/plain": "text/plain";
|
|
346
|
+
}>;
|
|
347
|
+
maxBytes: z.ZodNumber;
|
|
348
|
+
}, z.core.$strict>>;
|
|
328
349
|
}, z.core.$strict>;
|
|
329
350
|
}, z.core.$strip>, z.ZodObject<{
|
|
330
351
|
v: z.ZodNumber;
|
|
@@ -380,6 +401,12 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
401
|
providerId: z.ZodString;
|
|
381
402
|
modelId: z.ZodString;
|
|
382
403
|
}, z.core.$strict>], "lane">>;
|
|
404
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
405
|
+
mode: z.ZodLiteral<"none">;
|
|
406
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
407
|
+
mode: z.ZodLiteral<"result-document">;
|
|
408
|
+
contract: z.ZodString;
|
|
409
|
+
}, z.core.$strict>], "mode">>;
|
|
383
410
|
limits: z.ZodOptional<z.ZodObject<{
|
|
384
411
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
385
412
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -415,6 +442,15 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
415
442
|
}, z.core.$strict>]>;
|
|
416
443
|
}, z.core.$strict>;
|
|
417
444
|
}, z.core.$strict>;
|
|
445
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
446
|
+
mode: z.ZodLiteral<"required">;
|
|
447
|
+
contract: z.ZodString;
|
|
448
|
+
contentType: z.ZodEnum<{
|
|
449
|
+
"text/markdown": "text/markdown";
|
|
450
|
+
"text/plain": "text/plain";
|
|
451
|
+
}>;
|
|
452
|
+
maxBytes: z.ZodNumber;
|
|
453
|
+
}, z.core.$strict>>;
|
|
418
454
|
}, z.core.$strict>;
|
|
419
455
|
}, z.core.$strip>, z.ZodObject<{
|
|
420
456
|
v: z.ZodNumber;
|
|
@@ -435,6 +471,32 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
435
471
|
cursor: z.ZodNumber;
|
|
436
472
|
receiptId: z.ZodUUID;
|
|
437
473
|
}, z.core.$strict>;
|
|
474
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
475
|
+
v: z.ZodNumber;
|
|
476
|
+
id: z.ZodUUID;
|
|
477
|
+
ts: z.ZodISODateTime;
|
|
478
|
+
type: z.ZodLiteral<"agent.message.disposition">;
|
|
479
|
+
task_id: z.ZodString;
|
|
480
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
481
|
+
seq: z.ZodNumber;
|
|
482
|
+
payload: z.ZodObject<{
|
|
483
|
+
agentRef: z.ZodObject<{
|
|
484
|
+
agentId: z.ZodString;
|
|
485
|
+
profileRevision: z.ZodString;
|
|
486
|
+
}, z.core.$strict>;
|
|
487
|
+
sessionRef: z.ZodString;
|
|
488
|
+
contract: z.ZodString;
|
|
489
|
+
messageId: z.ZodUUID;
|
|
490
|
+
cursor: z.ZodNumber;
|
|
491
|
+
contentHash: z.ZodString;
|
|
492
|
+
outcome: z.ZodEnum<{
|
|
493
|
+
accepted: "accepted";
|
|
494
|
+
held: "held";
|
|
495
|
+
refused: "refused";
|
|
496
|
+
}>;
|
|
497
|
+
receiptId: z.ZodUUID;
|
|
498
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
499
|
+
}, z.core.$strict>;
|
|
438
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
439
501
|
v: z.ZodNumber;
|
|
440
502
|
id: z.ZodUUID;
|
|
@@ -812,6 +874,31 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
812
874
|
contentHash: z.ZodString;
|
|
813
875
|
byteCount: z.ZodNumber;
|
|
814
876
|
}, z.core.$strict>;
|
|
877
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
878
|
+
v: z.ZodNumber;
|
|
879
|
+
id: z.ZodUUID;
|
|
880
|
+
ts: z.ZodISODateTime;
|
|
881
|
+
type: z.ZodLiteral<"agent.message.publish">;
|
|
882
|
+
task_id: z.ZodString;
|
|
883
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
884
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
885
|
+
payload: z.ZodObject<{
|
|
886
|
+
agentRef: z.ZodObject<{
|
|
887
|
+
agentId: z.ZodString;
|
|
888
|
+
profileRevision: z.ZodString;
|
|
889
|
+
}, z.core.$strict>;
|
|
890
|
+
sessionRef: z.ZodString;
|
|
891
|
+
contract: z.ZodString;
|
|
892
|
+
messageId: z.ZodUUID;
|
|
893
|
+
cursor: z.ZodNumber;
|
|
894
|
+
contentType: z.ZodEnum<{
|
|
895
|
+
"text/markdown": "text/markdown";
|
|
896
|
+
"text/plain": "text/plain";
|
|
897
|
+
}>;
|
|
898
|
+
body: z.ZodString;
|
|
899
|
+
contentHash: z.ZodString;
|
|
900
|
+
byteCount: z.ZodNumber;
|
|
901
|
+
}, z.core.$strict>;
|
|
815
902
|
}, z.core.$strip>, z.ZodObject<{
|
|
816
903
|
v: z.ZodNumber;
|
|
817
904
|
id: z.ZodUUID;
|
package/dist/http-api.d.ts
CHANGED
|
@@ -321,6 +321,12 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
321
321
|
providerId: z.ZodString;
|
|
322
322
|
modelId: z.ZodString;
|
|
323
323
|
}, z.core.$strict>], "lane">>;
|
|
324
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
325
|
+
mode: z.ZodLiteral<"none">;
|
|
326
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
327
|
+
mode: z.ZodLiteral<"result-document">;
|
|
328
|
+
contract: z.ZodString;
|
|
329
|
+
}, z.core.$strict>], "mode">>;
|
|
324
330
|
sessionRef: z.ZodOptional<z.ZodString>;
|
|
325
331
|
limits: z.ZodOptional<z.ZodObject<{
|
|
326
332
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -381,6 +387,12 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
381
387
|
providerId: z.ZodString;
|
|
382
388
|
modelId: z.ZodString;
|
|
383
389
|
}, z.core.$strict>], "lane">>;
|
|
390
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
mode: z.ZodLiteral<"none">;
|
|
392
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
393
|
+
mode: z.ZodLiteral<"result-document">;
|
|
394
|
+
contract: z.ZodString;
|
|
395
|
+
}, z.core.$strict>], "mode">>;
|
|
384
396
|
limits: z.ZodOptional<z.ZodObject<{
|
|
385
397
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
386
398
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -417,6 +429,15 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
417
429
|
}, z.core.$strict>]>;
|
|
418
430
|
}, z.core.$strict>;
|
|
419
431
|
}, z.core.$strict>;
|
|
432
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
433
|
+
mode: z.ZodLiteral<"required">;
|
|
434
|
+
contract: z.ZodString;
|
|
435
|
+
contentType: z.ZodEnum<{
|
|
436
|
+
"text/markdown": "text/markdown";
|
|
437
|
+
"text/plain": "text/plain";
|
|
438
|
+
}>;
|
|
439
|
+
maxBytes: z.ZodNumber;
|
|
440
|
+
}, z.core.$strict>>;
|
|
420
441
|
}, z.core.$strict>;
|
|
421
442
|
}, z.core.$strip>, z.ZodObject<{
|
|
422
443
|
v: z.ZodNumber;
|
|
@@ -472,6 +493,12 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
472
493
|
providerId: z.ZodString;
|
|
473
494
|
modelId: z.ZodString;
|
|
474
495
|
}, z.core.$strict>], "lane">>;
|
|
496
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
497
|
+
mode: z.ZodLiteral<"none">;
|
|
498
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
499
|
+
mode: z.ZodLiteral<"result-document">;
|
|
500
|
+
contract: z.ZodString;
|
|
501
|
+
}, z.core.$strict>], "mode">>;
|
|
475
502
|
limits: z.ZodOptional<z.ZodObject<{
|
|
476
503
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
477
504
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -507,6 +534,15 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
507
534
|
}, z.core.$strict>]>;
|
|
508
535
|
}, z.core.$strict>;
|
|
509
536
|
}, z.core.$strict>;
|
|
537
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
538
|
+
mode: z.ZodLiteral<"required">;
|
|
539
|
+
contract: z.ZodString;
|
|
540
|
+
contentType: z.ZodEnum<{
|
|
541
|
+
"text/markdown": "text/markdown";
|
|
542
|
+
"text/plain": "text/plain";
|
|
543
|
+
}>;
|
|
544
|
+
maxBytes: z.ZodNumber;
|
|
545
|
+
}, z.core.$strict>>;
|
|
510
546
|
}, z.core.$strict>;
|
|
511
547
|
}, z.core.$strip>, z.ZodObject<{
|
|
512
548
|
v: z.ZodNumber;
|
|
@@ -527,6 +563,32 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
527
563
|
cursor: z.ZodNumber;
|
|
528
564
|
receiptId: z.ZodUUID;
|
|
529
565
|
}, z.core.$strict>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
v: z.ZodNumber;
|
|
568
|
+
id: z.ZodUUID;
|
|
569
|
+
ts: z.ZodISODateTime;
|
|
570
|
+
type: z.ZodLiteral<"agent.message.disposition">;
|
|
571
|
+
task_id: z.ZodString;
|
|
572
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
573
|
+
seq: z.ZodNumber;
|
|
574
|
+
payload: z.ZodObject<{
|
|
575
|
+
agentRef: z.ZodObject<{
|
|
576
|
+
agentId: z.ZodString;
|
|
577
|
+
profileRevision: z.ZodString;
|
|
578
|
+
}, z.core.$strict>;
|
|
579
|
+
sessionRef: z.ZodString;
|
|
580
|
+
contract: z.ZodString;
|
|
581
|
+
messageId: z.ZodUUID;
|
|
582
|
+
cursor: z.ZodNumber;
|
|
583
|
+
contentHash: z.ZodString;
|
|
584
|
+
outcome: z.ZodEnum<{
|
|
585
|
+
accepted: "accepted";
|
|
586
|
+
held: "held";
|
|
587
|
+
refused: "refused";
|
|
588
|
+
}>;
|
|
589
|
+
receiptId: z.ZodUUID;
|
|
590
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
591
|
+
}, z.core.$strict>;
|
|
530
592
|
}, z.core.$strip>, z.ZodObject<{
|
|
531
593
|
v: z.ZodNumber;
|
|
532
594
|
id: z.ZodUUID;
|
|
@@ -904,6 +966,31 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
904
966
|
contentHash: z.ZodString;
|
|
905
967
|
byteCount: z.ZodNumber;
|
|
906
968
|
}, z.core.$strict>;
|
|
969
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
970
|
+
v: z.ZodNumber;
|
|
971
|
+
id: z.ZodUUID;
|
|
972
|
+
ts: z.ZodISODateTime;
|
|
973
|
+
type: z.ZodLiteral<"agent.message.publish">;
|
|
974
|
+
task_id: z.ZodString;
|
|
975
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
976
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
977
|
+
payload: z.ZodObject<{
|
|
978
|
+
agentRef: z.ZodObject<{
|
|
979
|
+
agentId: z.ZodString;
|
|
980
|
+
profileRevision: z.ZodString;
|
|
981
|
+
}, z.core.$strict>;
|
|
982
|
+
sessionRef: z.ZodString;
|
|
983
|
+
contract: z.ZodString;
|
|
984
|
+
messageId: z.ZodUUID;
|
|
985
|
+
cursor: z.ZodNumber;
|
|
986
|
+
contentType: z.ZodEnum<{
|
|
987
|
+
"text/markdown": "text/markdown";
|
|
988
|
+
"text/plain": "text/plain";
|
|
989
|
+
}>;
|
|
990
|
+
body: z.ZodString;
|
|
991
|
+
contentHash: z.ZodString;
|
|
992
|
+
byteCount: z.ZodNumber;
|
|
993
|
+
}, z.core.$strict>;
|
|
907
994
|
}, z.core.$strip>, z.ZodObject<{
|
|
908
995
|
v: z.ZodNumber;
|
|
909
996
|
id: z.ZodUUID;
|
|
@@ -1244,6 +1331,12 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1244
1331
|
providerId: z.ZodString;
|
|
1245
1332
|
modelId: z.ZodString;
|
|
1246
1333
|
}, z.core.$strict>], "lane">>;
|
|
1334
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1335
|
+
mode: z.ZodLiteral<"none">;
|
|
1336
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1337
|
+
mode: z.ZodLiteral<"result-document">;
|
|
1338
|
+
contract: z.ZodString;
|
|
1339
|
+
}, z.core.$strict>], "mode">>;
|
|
1247
1340
|
sessionRef: z.ZodOptional<z.ZodString>;
|
|
1248
1341
|
limits: z.ZodOptional<z.ZodObject<{
|
|
1249
1342
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1304,6 +1397,12 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1304
1397
|
providerId: z.ZodString;
|
|
1305
1398
|
modelId: z.ZodString;
|
|
1306
1399
|
}, z.core.$strict>], "lane">>;
|
|
1400
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1401
|
+
mode: z.ZodLiteral<"none">;
|
|
1402
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1403
|
+
mode: z.ZodLiteral<"result-document">;
|
|
1404
|
+
contract: z.ZodString;
|
|
1405
|
+
}, z.core.$strict>], "mode">>;
|
|
1307
1406
|
limits: z.ZodOptional<z.ZodObject<{
|
|
1308
1407
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
1309
1408
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1340,6 +1439,15 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1340
1439
|
}, z.core.$strict>]>;
|
|
1341
1440
|
}, z.core.$strict>;
|
|
1342
1441
|
}, z.core.$strict>;
|
|
1442
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
1443
|
+
mode: z.ZodLiteral<"required">;
|
|
1444
|
+
contract: z.ZodString;
|
|
1445
|
+
contentType: z.ZodEnum<{
|
|
1446
|
+
"text/markdown": "text/markdown";
|
|
1447
|
+
"text/plain": "text/plain";
|
|
1448
|
+
}>;
|
|
1449
|
+
maxBytes: z.ZodNumber;
|
|
1450
|
+
}, z.core.$strict>>;
|
|
1343
1451
|
}, z.core.$strict>;
|
|
1344
1452
|
}, z.core.$strip>, z.ZodObject<{
|
|
1345
1453
|
v: z.ZodNumber;
|
|
@@ -1395,6 +1503,12 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1395
1503
|
providerId: z.ZodString;
|
|
1396
1504
|
modelId: z.ZodString;
|
|
1397
1505
|
}, z.core.$strict>], "lane">>;
|
|
1506
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1507
|
+
mode: z.ZodLiteral<"none">;
|
|
1508
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1509
|
+
mode: z.ZodLiteral<"result-document">;
|
|
1510
|
+
contract: z.ZodString;
|
|
1511
|
+
}, z.core.$strict>], "mode">>;
|
|
1398
1512
|
limits: z.ZodOptional<z.ZodObject<{
|
|
1399
1513
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
1400
1514
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1430,6 +1544,15 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1430
1544
|
}, z.core.$strict>]>;
|
|
1431
1545
|
}, z.core.$strict>;
|
|
1432
1546
|
}, z.core.$strict>;
|
|
1547
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
1548
|
+
mode: z.ZodLiteral<"required">;
|
|
1549
|
+
contract: z.ZodString;
|
|
1550
|
+
contentType: z.ZodEnum<{
|
|
1551
|
+
"text/markdown": "text/markdown";
|
|
1552
|
+
"text/plain": "text/plain";
|
|
1553
|
+
}>;
|
|
1554
|
+
maxBytes: z.ZodNumber;
|
|
1555
|
+
}, z.core.$strict>>;
|
|
1433
1556
|
}, z.core.$strict>;
|
|
1434
1557
|
}, z.core.$strip>, z.ZodObject<{
|
|
1435
1558
|
v: z.ZodNumber;
|
|
@@ -1450,6 +1573,32 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1450
1573
|
cursor: z.ZodNumber;
|
|
1451
1574
|
receiptId: z.ZodUUID;
|
|
1452
1575
|
}, z.core.$strict>;
|
|
1576
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1577
|
+
v: z.ZodNumber;
|
|
1578
|
+
id: z.ZodUUID;
|
|
1579
|
+
ts: z.ZodISODateTime;
|
|
1580
|
+
type: z.ZodLiteral<"agent.message.disposition">;
|
|
1581
|
+
task_id: z.ZodString;
|
|
1582
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
1583
|
+
seq: z.ZodNumber;
|
|
1584
|
+
payload: z.ZodObject<{
|
|
1585
|
+
agentRef: z.ZodObject<{
|
|
1586
|
+
agentId: z.ZodString;
|
|
1587
|
+
profileRevision: z.ZodString;
|
|
1588
|
+
}, z.core.$strict>;
|
|
1589
|
+
sessionRef: z.ZodString;
|
|
1590
|
+
contract: z.ZodString;
|
|
1591
|
+
messageId: z.ZodUUID;
|
|
1592
|
+
cursor: z.ZodNumber;
|
|
1593
|
+
contentHash: z.ZodString;
|
|
1594
|
+
outcome: z.ZodEnum<{
|
|
1595
|
+
accepted: "accepted";
|
|
1596
|
+
held: "held";
|
|
1597
|
+
refused: "refused";
|
|
1598
|
+
}>;
|
|
1599
|
+
receiptId: z.ZodUUID;
|
|
1600
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
1601
|
+
}, z.core.$strict>;
|
|
1453
1602
|
}, z.core.$strip>, z.ZodObject<{
|
|
1454
1603
|
v: z.ZodNumber;
|
|
1455
1604
|
id: z.ZodUUID;
|
|
@@ -1827,6 +1976,31 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
1827
1976
|
contentHash: z.ZodString;
|
|
1828
1977
|
byteCount: z.ZodNumber;
|
|
1829
1978
|
}, z.core.$strict>;
|
|
1979
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1980
|
+
v: z.ZodNumber;
|
|
1981
|
+
id: z.ZodUUID;
|
|
1982
|
+
ts: z.ZodISODateTime;
|
|
1983
|
+
type: z.ZodLiteral<"agent.message.publish">;
|
|
1984
|
+
task_id: z.ZodString;
|
|
1985
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
1986
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
1987
|
+
payload: z.ZodObject<{
|
|
1988
|
+
agentRef: z.ZodObject<{
|
|
1989
|
+
agentId: z.ZodString;
|
|
1990
|
+
profileRevision: z.ZodString;
|
|
1991
|
+
}, z.core.$strict>;
|
|
1992
|
+
sessionRef: z.ZodString;
|
|
1993
|
+
contract: z.ZodString;
|
|
1994
|
+
messageId: z.ZodUUID;
|
|
1995
|
+
cursor: z.ZodNumber;
|
|
1996
|
+
contentType: z.ZodEnum<{
|
|
1997
|
+
"text/markdown": "text/markdown";
|
|
1998
|
+
"text/plain": "text/plain";
|
|
1999
|
+
}>;
|
|
2000
|
+
body: z.ZodString;
|
|
2001
|
+
contentHash: z.ZodString;
|
|
2002
|
+
byteCount: z.ZodNumber;
|
|
2003
|
+
}, z.core.$strict>;
|
|
1830
2004
|
}, z.core.$strip>, z.ZodObject<{
|
|
1831
2005
|
v: z.ZodNumber;
|
|
1832
2006
|
id: z.ZodUUID;
|
|
@@ -1998,6 +2172,62 @@ export declare const AgentHomeProjectionReadbackSchema: z.ZodObject<{
|
|
|
1998
2172
|
completedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1999
2173
|
}, z.core.$strict>;
|
|
2000
2174
|
export type AgentHomeProjectionReadback = z.infer<typeof AgentHomeProjectionReadbackSchema>;
|
|
2175
|
+
export declare const AgentMemoryProjectionCommitRequestSchema: z.ZodObject<{
|
|
2176
|
+
taskId: z.ZodString;
|
|
2177
|
+
agentRef: z.ZodObject<{
|
|
2178
|
+
agentId: z.ZodString;
|
|
2179
|
+
profileRevision: z.ZodString;
|
|
2180
|
+
}, z.core.$strict>;
|
|
2181
|
+
sessionRef: z.ZodString;
|
|
2182
|
+
runtimeId: z.ZodEnum<{
|
|
2183
|
+
claude: "claude";
|
|
2184
|
+
codex: "codex";
|
|
2185
|
+
pi: "pi";
|
|
2186
|
+
}>;
|
|
2187
|
+
grantRef: z.ZodString;
|
|
2188
|
+
writerEpoch: z.ZodNumber;
|
|
2189
|
+
sourceSeq: z.ZodNumber;
|
|
2190
|
+
mutationId: z.ZodUUID;
|
|
2191
|
+
policyRevision: z.ZodString;
|
|
2192
|
+
snapshot: z.ZodObject<{
|
|
2193
|
+
redactedHash: z.ZodString;
|
|
2194
|
+
redactedByteCount: z.ZodNumber;
|
|
2195
|
+
redactedBytes: z.ZodString;
|
|
2196
|
+
}, z.core.$strict>;
|
|
2197
|
+
}, z.core.$strict>;
|
|
2198
|
+
export type AgentMemoryProjectionCommitRequest = z.infer<typeof AgentMemoryProjectionCommitRequestSchema>;
|
|
2199
|
+
export declare const AgentMemoryProjectionCommitResponseSchema: z.ZodObject<{
|
|
2200
|
+
outcome: z.ZodEnum<{
|
|
2201
|
+
accepted: "accepted";
|
|
2202
|
+
idempotent: "idempotent";
|
|
2203
|
+
}>;
|
|
2204
|
+
tenantId: z.ZodString;
|
|
2205
|
+
deviceId: z.ZodString;
|
|
2206
|
+
taskId: z.ZodString;
|
|
2207
|
+
agentRef: z.ZodObject<{
|
|
2208
|
+
agentId: z.ZodString;
|
|
2209
|
+
profileRevision: z.ZodString;
|
|
2210
|
+
}, z.core.$strict>;
|
|
2211
|
+
sessionRef: z.ZodString;
|
|
2212
|
+
runtimeId: z.ZodEnum<{
|
|
2213
|
+
claude: "claude";
|
|
2214
|
+
codex: "codex";
|
|
2215
|
+
pi: "pi";
|
|
2216
|
+
}>;
|
|
2217
|
+
grantRef: z.ZodString;
|
|
2218
|
+
writerEpoch: z.ZodNumber;
|
|
2219
|
+
sourceSeq: z.ZodNumber;
|
|
2220
|
+
mutationId: z.ZodUUID;
|
|
2221
|
+
policyRevision: z.ZodString;
|
|
2222
|
+
redactedHash: z.ZodString;
|
|
2223
|
+
redactedByteCount: z.ZodNumber;
|
|
2224
|
+
metering: z.ZodObject<{
|
|
2225
|
+
meteringReceiptId: z.ZodUUID;
|
|
2226
|
+
acceptedRedactedBytes: z.ZodNumber;
|
|
2227
|
+
recordedAt: z.ZodISODateTime;
|
|
2228
|
+
}, z.core.$strict>;
|
|
2229
|
+
}, z.core.$strict>;
|
|
2230
|
+
export type AgentMemoryProjectionCommitResponse = z.infer<typeof AgentMemoryProjectionCommitResponseSchema>;
|
|
2001
2231
|
/** `GET /byok/ws` — WebSocket upgrade path. */
|
|
2002
2232
|
export declare const BYOK_WS_PATH = "/byok/ws";
|
|
2003
2233
|
/** `POST /byok/pair` — one-time device pairing (§6). */
|
|
@@ -2016,6 +2246,8 @@ export declare const BYOK_MESSAGES_PATH = "/byok/messages";
|
|
|
2016
2246
|
export declare const BYOK_AGENT_HOME_PROJECTIONS_PATH = "/byok/agent-home-projections";
|
|
2017
2247
|
export declare const BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE = "/byok/agent-home-projections/:requestId/completion";
|
|
2018
2248
|
export declare function byokAgentHomeProjectionCompletionPath(requestId: string): string;
|
|
2249
|
+
/** `POST /byok/agent-memory-projections` — optional local-to-hosted redacted snapshot commit. */
|
|
2250
|
+
export declare const BYOK_AGENT_MEMORY_PROJECTIONS_PATH = "/byok/agent-memory-projections";
|
|
2019
2251
|
/** `PUT /byok/presence` — presence heartbeat. */
|
|
2020
2252
|
export declare const BYOK_PRESENCE_PATH = "/byok/presence";
|
|
2021
2253
|
/** `POST /byok/activity` — activity-tail append. */
|