@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/index.d.ts CHANGED
@@ -6,18 +6,22 @@ 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_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, } from './agent-egress';
10
- export type { AgentEgressPolicy, AgentEgressActivityPolicy, AgentReliableQuotaPolicy, ContentReadPolicy, AgentEgressLane, AgentEgressDropReason, AgentContentReadSurface, AgentContentActorKind, AgentContentActor, AgentContentDecodeAs, AgentContentReadDecision, AgentContentReadDenialReason, } from './agent-egress';
9
+ export { AgentEgressPolicySchema, AgentEgressActivityPolicySchema, AgentReliableQuotaPolicySchema, ContentReadPolicySchema, AgentEgressLaneSchema, AgentEgressDropReasonSchema, AgentContentReadSurfaceSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentEgressContentHashSchema, AgentEgressPolicyRevisionSchema, AgentMessageContractSchema, AgentMessageContentTypeSchema, AgentMessageDestinationBindingSchema, AgentMessageFreshnessCursorSchema, AgentMessageServerContextSchema, AgentMessageEgressRequirementSchema, AGENT_MESSAGE_MAX_BYTES, AGENT_MESSAGE_EGRESS_CAPABILITY, 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
+ export type { AgentEgressPolicy, AgentEgressActivityPolicy, AgentReliableQuotaPolicy, ContentReadPolicy, AgentEgressLane, AgentEgressDropReason, AgentMessageContentType, AgentMessageEgressRequirement, AgentMessageServerContext, AgentContentReadSurface, AgentContentActorKind, AgentContentActor, AgentContentDecodeAs, AgentContentReadDecision, AgentContentReadDenialReason, } from './agent-egress';
11
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
12
  export type { AgentHomeProjectionProfileRevision, AgentHomeProjectionHash, AgentHomeProjectionOutcome, AgentHomeProjectionValue, } from './agent-home-projection';
13
+ export { AGENT_MEMORY_PROJECTION_CAPABILITY, AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES, AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE, AgentMemoryProjectionGrantRefSchema, AgentMemoryProjectionSessionRefSchema, AgentMemoryProjectionWriterEpochSchema, AgentMemoryProjectionSourceSeqSchema, AgentMemoryProjectionSnapshotSchema, AgentMemoryProjectionMeteringReceiptSchema, AgentMemoryProjectionMutationSchema, AgentMemoryProjectionReceiptSchema, AgentMemoryProjectionEraseResultSchema, agentMemoryProjectionBase64UrlByteLength, } from './agent-memory-projection';
14
+ export type { AgentMemoryProjectionGrantRef, AgentMemoryProjectionSessionRef, AgentMemoryProjectionWriterEpoch, AgentMemoryProjectionSourceSeq, AgentMemoryProjectionSnapshot, AgentMemoryProjectionMeteringReceipt, AgentMemoryProjectionMutation, AgentMemoryProjectionReceipt, AgentMemoryProjectionEraseResult, } from './agent-memory-projection';
15
+ export { TERMINAL_PROJECTION_SELECTION_CAPABILITY, TerminalProjectionContractSchema, TerminalProjectionSelectionSchema, } from './terminal-projection';
16
+ export type { TerminalProjectionSelection } from './terminal-projection';
13
17
  export { TASK_STATES, TASK_TRANSITIONS, canTransition } from './task-state';
14
18
  export type { TaskState } from './task-state';
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';
19
+ 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, AgentMessagePublishPayloadSchema, AgentMessageDispositionPayloadSchema, 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';
20
+ export type { ResultDocumentCheck, MessageType, RuntimeId, RuntimeInfo, RuntimeCapabilities, AgentRef, AgentHomeProjectionAgentRef, DispatchSelection, ToolsetId, ConnHelloPayload, ConnAckPayload, TaskOfferPayload, TaskOfferWithToolsetsPayload, TaskOfferForAgentPayload, TaskOfferForAgentWithEgressPayload, TaskOfferForAgentWithEgressFreshPayload, AgentEgressReliablePayload, AgentEgressAckPayload, AgentMessagePublishPayload, AgentMessageDispositionPayload, AgentContentReadPayload, AgentContentReceiptPayload, AgentHomeProjectionPayload, TaskApprovePayload, TaskRejectPayload, TaskCancelPayload, TaskSteerPayload, TaskClaimPayload, TaskStartedPayload, TaskDeclinePayload, TaskProgressPayload, TaskArtifactPayload, TaskAwaitApprovalPayload, TaskCompletePayload, TaskFailPayload, TaskCancelledPayload, TaskApprovalResolvedPayload, TerminalInferenceUsage, } from './messages';
17
21
  export { EnvelopeSchema, isServerToDaemonType } from './envelope';
18
22
  export type { Envelope } from './envelope';
19
23
  export { ProtocolError, EnvelopeParseError, UnknownMessageTypeError, EnvelopeValidationError, } from './errors';
20
24
  export { encodeEnvelope, decodeEnvelope, createEnvelope, parseMessage } from './codec';
21
25
  export type { CreateEnvelopeOptions } from './codec';
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';
26
+ 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, AgentMemoryProjectionCommitRequestSchema, AgentMemoryProjectionCommitResponseSchema, 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_AGENT_MEMORY_PROJECTIONS_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';
27
+ export type { PairRequest, PairResponse, ChallengeRequest, ChallengeResponse, TokenRequest, TokenResponse, PresencePublishRequest, CreateBlobRequest, CreateBlobResponse, BlobDownloadUrlResponse, EventsPollQuery, EventsPollResponse, MessagesSendRequest, MessagesSendResponse, AgentHomeProjectionCompletionRequest, AgentHomeProjectionStatus, AgentHomeProjectionReadback, AgentMemoryProjectionCommitRequest, AgentMemoryProjectionCommitResponse, } from './http-api';
package/dist/index.js CHANGED
@@ -4,11 +4,27 @@ import { z } from 'zod';
4
4
  var AGENT_EGRESS_POLICY_CAPABILITY = "agent-egress-policy";
5
5
  var AGENT_EGRESS_RELIABLE_ACK_CAPABILITY = "agent-egress-reliable-ack";
6
6
  var AGENT_EGRESS_FRESH_SESSION_CAPABILITY = "agent-egress-fresh-session";
7
+ var AGENT_MESSAGE_EGRESS_CAPABILITY = "agent-message-egress";
7
8
  var AGENT_CONTENT_WORKSPACE_READ_CAPABILITY = "agent-content-workspace-read";
8
9
  var AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY = "agent-content-transcript-read";
9
10
  var AGENT_CONTENT_ARTIFACT_READ_CAPABILITY = "agent-content-artifact-read";
10
11
  var POLICY_REVISION = z.string().min(1).max(160).regex(/^[^\u0000-\u001f\u007f\r\n]+$/u, "policyRevision must not contain control characters");
11
12
  var POSITIVE_LIMIT = z.number().int().positive().max(2147483647);
13
+ var AGENT_MESSAGE_MAX_BYTES = 256 * 1024;
14
+ var AgentMessageContractSchema = z.string().min(1).max(160).regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/u, "message contract must be an opaque portable identifier");
15
+ var AgentMessageContentTypeSchema = z.enum(["text/plain", "text/markdown"]);
16
+ var AgentMessageDestinationBindingSchema = z.string().min(1).max(2048).regex(/^[^\u0000-\u001f\u007f\r\n]+$/u, "destination binding must not contain control characters");
17
+ var AgentMessageFreshnessCursorSchema = z.string().min(1).max(512).regex(/^[^\u0000-\u001f\u007f\r\n]+$/u, "freshness cursor must not contain control characters");
18
+ var AgentMessageServerContextSchema = z.object({
19
+ destinationBinding: AgentMessageDestinationBindingSchema,
20
+ freshnessCursor: AgentMessageFreshnessCursorSchema.optional()
21
+ }).strict();
22
+ var AgentMessageEgressRequirementSchema = z.object({
23
+ mode: z.literal("required"),
24
+ contract: AgentMessageContractSchema,
25
+ contentType: AgentMessageContentTypeSchema,
26
+ maxBytes: z.number().int().positive().max(AGENT_MESSAGE_MAX_BYTES)
27
+ }).strict();
12
28
  var AgentContentMimeTypeSchema = z.string().min(3).max(255).regex(/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/iu, "MIME types must be explicit type/subtype values");
13
29
  var ContentReadPolicySchema = z.object({
14
30
  maxBytes: POSITIVE_LIMIT,
@@ -97,6 +113,15 @@ var AgentHomeProjectionValueSchema = z.json().refine(
97
113
  (value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= AGENT_HOME_PROJECTION_MAX_BYTES,
98
114
  `projection must not exceed ${AGENT_HOME_PROJECTION_MAX_BYTES} UTF-8 JSON bytes`
99
115
  );
116
+ var TERMINAL_PROJECTION_SELECTION_CAPABILITY = "terminal-projection-selection";
117
+ var TerminalProjectionContractSchema = z.string().min(1).max(128).regex(/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/u, "terminal projection contracts must be opaque lowercase ids");
118
+ var TerminalProjectionSelectionSchema = z.discriminatedUnion("mode", [
119
+ z.object({ mode: z.literal("none") }).strict(),
120
+ z.object({
121
+ mode: z.literal("result-document"),
122
+ contract: TerminalProjectionContractSchema
123
+ }).strict()
124
+ ]);
100
125
 
101
126
  // src/version.ts
102
127
  var PROTOCOL_VERSION = 1;
@@ -114,11 +139,13 @@ var CAPABILITY_FLAGS = [
114
139
  STRICT_AGENT_ONLY_CAPABILITY,
115
140
  AGENT_EGRESS_POLICY_CAPABILITY,
116
141
  AGENT_EGRESS_RELIABLE_ACK_CAPABILITY,
142
+ AGENT_MESSAGE_EGRESS_CAPABILITY,
117
143
  AGENT_EGRESS_FRESH_SESSION_CAPABILITY,
118
144
  AGENT_CONTENT_WORKSPACE_READ_CAPABILITY,
119
145
  AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY,
120
146
  AGENT_CONTENT_ARTIFACT_READ_CAPABILITY,
121
- AGENT_HOME_PROJECTION_CAPABILITY
147
+ AGENT_HOME_PROJECTION_CAPABILITY,
148
+ TERMINAL_PROJECTION_SELECTION_CAPABILITY
122
149
  ];
123
150
  var CONTENT_HASH_RE = /^sha256:[0-9a-f]{64}$/;
124
151
  var BlobRefSchema = z.object({
@@ -191,29 +218,6 @@ function partitionAgentEvents(events) {
191
218
  }
192
219
  return { known, unknown };
193
220
  }
194
-
195
- // src/task-state.ts
196
- var TASK_STATES = [
197
- "Offered",
198
- "Claimed",
199
- "Running",
200
- "AwaitApproval",
201
- "Complete",
202
- "Failed",
203
- "Cancelled"
204
- ];
205
- var TASK_TRANSITIONS = {
206
- Offered: ["Claimed", "Cancelled", "Failed"],
207
- Claimed: ["Running", "Failed", "Cancelled"],
208
- Running: ["AwaitApproval", "Complete", "Failed", "Cancelled"],
209
- AwaitApproval: ["Running", "Failed", "Cancelled"],
210
- Complete: [],
211
- Failed: [],
212
- Cancelled: []
213
- };
214
- function canTransition(from, to) {
215
- return TASK_TRANSITIONS[from].includes(to);
216
- }
217
221
  var MAX_INLINE_BYTES = 64 * 1024;
218
222
  function isWithinInlineByteLimit(value) {
219
223
  return new TextEncoder().encode(value).length <= MAX_INLINE_BYTES;
@@ -328,6 +332,7 @@ var TaskOfferForAgentPayloadSchema = z.object({
328
332
  requiredToolsets: RequiredToolsetsSchema.optional(),
329
333
  runtime: RuntimeIdSchema.optional(),
330
334
  dispatchSelection: DispatchSelectionSchema.optional(),
335
+ terminalProjection: TerminalProjectionSelectionSchema.optional(),
331
336
  sessionRef: z.string().optional(),
332
337
  limits: z.object({
333
338
  maxDurationMs: z.number().int().positive().optional(),
@@ -336,11 +341,15 @@ var TaskOfferForAgentPayloadSchema = z.object({
336
341
  }).strict();
337
342
  var TaskOfferForAgentWithEgressPayloadSchema = TaskOfferForAgentPayloadSchema.extend({
338
343
  sessionRef: z.string().min(1).max(512),
339
- egressPolicy: AgentEgressPolicySchema
344
+ egressPolicy: AgentEgressPolicySchema,
345
+ messageEgress: AgentMessageEgressRequirementSchema.optional()
340
346
  }).strict();
341
347
  var TaskOfferForAgentWithEgressFreshPayloadSchema = TaskOfferForAgentPayloadSchema.omit({
342
348
  sessionRef: true
343
- }).extend({ egressPolicy: AgentEgressPolicySchema }).strict();
349
+ }).extend({
350
+ egressPolicy: AgentEgressPolicySchema,
351
+ messageEgress: AgentMessageEgressRequirementSchema.optional()
352
+ }).strict();
344
353
  var EGRESS_SAFE_VALUE = z.json().refine(
345
354
  (value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= 256 * 1024,
346
355
  "sanitized egress payload exceeds 256KiB"
@@ -364,6 +373,37 @@ var AgentEgressAckPayloadSchema = z.object({
364
373
  cursor: z.number().int().positive(),
365
374
  receiptId: z.uuid()
366
375
  }).strict();
376
+ var AGENT_MESSAGE_BODY = z.string().min(1).refine(
377
+ (value) => new TextEncoder().encode(value).byteLength <= AGENT_MESSAGE_MAX_BYTES,
378
+ `Agent message body exceeds ${AGENT_MESSAGE_MAX_BYTES} bytes`
379
+ );
380
+ var AgentMessagePublishPayloadSchema = z.object({
381
+ agentRef: AgentRefSchema,
382
+ sessionRef: EGRESS_SESSION_REF,
383
+ contract: AgentMessageContractSchema,
384
+ messageId: z.uuid(),
385
+ cursor: z.number().int().positive(),
386
+ contentType: AgentMessageContentTypeSchema,
387
+ body: AGENT_MESSAGE_BODY,
388
+ contentHash: AgentEgressContentHashSchema,
389
+ byteCount: z.number().int().positive().max(AGENT_MESSAGE_MAX_BYTES)
390
+ }).strict().superRefine((value, context) => {
391
+ const actual = new TextEncoder().encode(value.body).byteLength;
392
+ if (actual !== value.byteCount) {
393
+ context.addIssue({ code: "custom", path: ["byteCount"], message: "byteCount must equal UTF-8 body bytes" });
394
+ }
395
+ });
396
+ var AgentMessageDispositionPayloadSchema = z.object({
397
+ agentRef: AgentRefSchema,
398
+ sessionRef: EGRESS_SESSION_REF,
399
+ contract: AgentMessageContractSchema,
400
+ messageId: z.uuid(),
401
+ cursor: z.number().int().positive(),
402
+ contentHash: AgentEgressContentHashSchema,
403
+ outcome: z.enum(["accepted", "held", "refused"]),
404
+ receiptId: z.uuid(),
405
+ reasonCode: z.string().min(1).max(160).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/u).optional()
406
+ }).strict();
367
407
  var AGENT_CONTENT_TARGET = z.string().min(1).max(1024).regex(/^[^\u0000-\u001f\u007f]+$/u, "content target must not contain control characters").refine(
368
408
  (value) => !value.startsWith("/") && !value.includes("\\") && value.split("/").every((segment) => segment.length > 0 && segment !== "." && segment !== ".."),
369
409
  "content target must be a portable relative path without dot segments"
@@ -594,6 +634,8 @@ var MESSAGE_PAYLOAD_SCHEMAS = {
594
634
  "task.offer_for_agent_with_egress_fresh": TaskOfferForAgentWithEgressFreshPayloadSchema,
595
635
  "agent.egress.reliable": AgentEgressReliablePayloadSchema,
596
636
  "agent.egress.ack": AgentEgressAckPayloadSchema,
637
+ "agent.message.publish": AgentMessagePublishPayloadSchema,
638
+ "agent.message.disposition": AgentMessageDispositionPayloadSchema,
597
639
  "agent.content.read": AgentContentReadPayloadSchema,
598
640
  "agent.content.receipt": AgentContentReceiptPayloadSchema,
599
641
  "agent.home.projection": AgentHomeProjectionPayloadSchema,
@@ -621,6 +663,7 @@ var SERVER_TO_DAEMON_TYPES = [
621
663
  "task.offer_for_agent_with_egress",
622
664
  "task.offer_for_agent_with_egress_fresh",
623
665
  "agent.egress.ack",
666
+ "agent.message.disposition",
624
667
  "agent.content.read",
625
668
  "agent.home.projection",
626
669
  "task.approve",
@@ -640,8 +683,104 @@ var DAEMON_TO_SERVER_TYPES = [
640
683
  "task.cancelled",
641
684
  "task.approval_resolved",
642
685
  "agent.egress.reliable",
686
+ "agent.message.publish",
643
687
  "agent.content.receipt"
644
688
  ];
689
+
690
+ // src/agent-memory-projection.ts
691
+ var AGENT_MEMORY_PROJECTION_CAPABILITY = "agent.memory.projection";
692
+ var AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES = 512 * 1024;
693
+ var AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE = 2147483647;
694
+ var OPAQUE_REFERENCE_MAX_BYTES = 512;
695
+ var opaqueReference = (field) => z.string().min(1).max(OPAQUE_REFERENCE_MAX_BYTES).refine((value) => new TextEncoder().encode(value).byteLength <= OPAQUE_REFERENCE_MAX_BYTES, {
696
+ message: `${field} must not exceed ${OPAQUE_REFERENCE_MAX_BYTES} UTF-8 bytes`
697
+ }).regex(/^[^\u0000-\u001f\u007f\r\n]+$/u, `${field} must not contain control characters`);
698
+ var AgentMemoryProjectionGrantRefSchema = opaqueReference("grantRef");
699
+ var AgentMemoryProjectionSessionRefSchema = opaqueReference("sessionRef");
700
+ var AgentMemoryProjectionWriterEpochSchema = z.number().int().positive().max(AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE);
701
+ var AgentMemoryProjectionSourceSeqSchema = z.number().int().positive().max(AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE);
702
+ function agentMemoryProjectionBase64UrlByteLength(value) {
703
+ if (!/^[A-Za-z0-9_-]*$/u.test(value) || value.length % 4 === 1) return void 0;
704
+ const complete = Math.floor(value.length / 4) * 3;
705
+ const tail = value.length % 4;
706
+ return complete + (tail === 0 ? 0 : tail - 1);
707
+ }
708
+ var AgentMemoryProjectionSnapshotSchema = z.object({
709
+ redactedHash: AgentEgressContentHashSchema,
710
+ redactedByteCount: z.number().int().nonnegative().max(AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES),
711
+ redactedBytes: z.string().max(Math.ceil(AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES / 3) * 4)
712
+ }).strict().superRefine((snapshot, ctx) => {
713
+ const actual = agentMemoryProjectionBase64UrlByteLength(snapshot.redactedBytes);
714
+ if (actual === void 0) {
715
+ ctx.addIssue({ code: "custom", path: ["redactedBytes"], message: "redactedBytes must be unpadded base64url" });
716
+ return;
717
+ }
718
+ if (actual !== snapshot.redactedByteCount) {
719
+ ctx.addIssue({
720
+ code: "custom",
721
+ path: ["redactedByteCount"],
722
+ message: "redactedByteCount must equal the decoded redactedBytes length"
723
+ });
724
+ }
725
+ });
726
+ var AgentMemoryProjectionMutationSchema = z.object({
727
+ taskId: z.string().min(1).max(512),
728
+ agentRef: AgentRefSchema,
729
+ sessionRef: AgentMemoryProjectionSessionRefSchema,
730
+ runtimeId: RuntimeIdSchema,
731
+ grantRef: AgentMemoryProjectionGrantRefSchema,
732
+ writerEpoch: AgentMemoryProjectionWriterEpochSchema,
733
+ sourceSeq: AgentMemoryProjectionSourceSeqSchema,
734
+ mutationId: z.uuid(),
735
+ policyRevision: AgentEgressPolicyRevisionSchema,
736
+ snapshot: AgentMemoryProjectionSnapshotSchema
737
+ }).strict();
738
+ var AgentMemoryProjectionMeteringReceiptSchema = z.object({
739
+ meteringReceiptId: z.uuid(),
740
+ acceptedRedactedBytes: z.number().int().nonnegative().max(AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES),
741
+ recordedAt: z.iso.datetime({ offset: true })
742
+ }).strict();
743
+ var AgentMemoryProjectionReceiptSchema = z.object({
744
+ outcome: z.enum(["accepted", "idempotent"]),
745
+ tenantId: z.string().min(1),
746
+ deviceId: z.string().min(1),
747
+ taskId: z.string().min(1).max(512),
748
+ agentRef: AgentRefSchema,
749
+ sessionRef: AgentMemoryProjectionSessionRefSchema,
750
+ runtimeId: RuntimeIdSchema,
751
+ grantRef: AgentMemoryProjectionGrantRefSchema,
752
+ writerEpoch: AgentMemoryProjectionWriterEpochSchema,
753
+ sourceSeq: AgentMemoryProjectionSourceSeqSchema,
754
+ mutationId: z.uuid(),
755
+ policyRevision: AgentEgressPolicyRevisionSchema,
756
+ redactedHash: AgentEgressContentHashSchema,
757
+ redactedByteCount: z.number().int().nonnegative().max(AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES),
758
+ metering: AgentMemoryProjectionMeteringReceiptSchema
759
+ }).strict();
760
+ var AgentMemoryProjectionEraseResultSchema = z.object({ nextWriterEpoch: AgentMemoryProjectionWriterEpochSchema }).strict();
761
+
762
+ // src/task-state.ts
763
+ var TASK_STATES = [
764
+ "Offered",
765
+ "Claimed",
766
+ "Running",
767
+ "AwaitApproval",
768
+ "Complete",
769
+ "Failed",
770
+ "Cancelled"
771
+ ];
772
+ var TASK_TRANSITIONS = {
773
+ Offered: ["Claimed", "Cancelled", "Failed"],
774
+ Claimed: ["Running", "Failed", "Cancelled"],
775
+ Running: ["AwaitApproval", "Complete", "Failed", "Cancelled"],
776
+ AwaitApproval: ["Running", "Failed", "Cancelled"],
777
+ Complete: [],
778
+ Failed: [],
779
+ Cancelled: []
780
+ };
781
+ function canTransition(from, to) {
782
+ return TASK_TRANSITIONS[from].includes(to);
783
+ }
645
784
  var REQUIRED_TASK_ID = z.string().min(1);
646
785
  var OPTIONAL_TASK_ID = REQUIRED_TASK_ID.optional();
647
786
  var FORBIDDEN_TASK_ID = z.never().optional();
@@ -673,6 +812,7 @@ var EnvelopeSchema = z.discriminatedUnion("type", [
673
812
  envelopeShape("task.offer_for_agent_with_egress", REQUIRED_TASK_ID, REQUIRED_SEQ),
674
813
  envelopeShape("task.offer_for_agent_with_egress_fresh", REQUIRED_TASK_ID, REQUIRED_SEQ),
675
814
  envelopeShape("agent.egress.ack", OPTIONAL_TASK_ID, REQUIRED_SEQ),
815
+ envelopeShape("agent.message.disposition", REQUIRED_TASK_ID, REQUIRED_SEQ),
676
816
  envelopeShape("agent.content.read", OPTIONAL_TASK_ID, REQUIRED_SEQ),
677
817
  envelopeShape("agent.home.projection", FORBIDDEN_TASK_ID, REQUIRED_SEQ),
678
818
  envelopeShape("task.approve", REQUIRED_TASK_ID, REQUIRED_SEQ),
@@ -693,6 +833,7 @@ var EnvelopeSchema = z.discriminatedUnion("type", [
693
833
  envelopeShape("task.cancelled", REQUIRED_TASK_ID, OPTIONAL_SEQ),
694
834
  envelopeShape("task.approval_resolved", REQUIRED_TASK_ID, OPTIONAL_SEQ),
695
835
  envelopeShape("agent.egress.reliable", OPTIONAL_TASK_ID, OPTIONAL_SEQ),
836
+ envelopeShape("agent.message.publish", REQUIRED_TASK_ID, OPTIONAL_SEQ),
696
837
  envelopeShape("agent.content.receipt", OPTIONAL_TASK_ID, OPTIONAL_SEQ)
697
838
  ]);
698
839
  function isServerToDaemonType(type) {
@@ -892,6 +1033,8 @@ var AgentHomeProjectionReadbackSchema = z.object({
892
1033
  status: AgentHomeProjectionStatusSchema,
893
1034
  completedAt: z.iso.datetime({ offset: true }).optional()
894
1035
  }).strict();
1036
+ var AgentMemoryProjectionCommitRequestSchema = AgentMemoryProjectionMutationSchema;
1037
+ var AgentMemoryProjectionCommitResponseSchema = AgentMemoryProjectionReceiptSchema;
895
1038
  var BYOK_WS_PATH = "/byok/ws";
896
1039
  var BYOK_PAIR_PATH = "/byok/pair";
897
1040
  var BYOK_CHALLENGE_PATH = "/byok/challenge";
@@ -904,6 +1047,7 @@ var BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE = "/byok/agent-home-projections/
904
1047
  function byokAgentHomeProjectionCompletionPath(requestId) {
905
1048
  return `${BYOK_AGENT_HOME_PROJECTIONS_PATH}/${encodeURIComponent(requestId)}/completion`;
906
1049
  }
1050
+ var BYOK_AGENT_MEMORY_PROJECTIONS_PATH = "/byok/agent-memory-projections";
907
1051
  var BYOK_PRESENCE_PATH = "/byok/presence";
908
1052
  var BYOK_ACTIVITY_PATH = "/byok/activity";
909
1053
  var BYOK_BOARD_PATH = "/byok/board";
@@ -935,6 +1079,6 @@ function byokBlobContentPath(blobId) {
935
1079
  return `/byok/blobs/${blobId}/content`;
936
1080
  }
937
1081
 
938
- export { AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AGENT_REF_MAX_BYTES, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentContentReadPayloadSchema, AgentContentReadSurfaceSchema, AgentContentReceiptPayloadSchema, AgentEgressAckPayloadSchema, AgentEgressActivityPolicySchema, AgentEgressContentHashSchema, AgentEgressDropReasonSchema, AgentEgressLaneSchema, AgentEgressPolicyRevisionSchema, AgentEgressPolicySchema, AgentEgressReliablePayloadSchema, AgentEventOrUnknownSchema, AgentEventSchema, AgentHomeProjectionAgentRefSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionPayloadSchema, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionReadbackSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionValueSchema, AgentRefSchema, AgentReliableQuotaPolicySchema, BYOK_ACTIVITY_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, BYOK_BLOBS_PATH, BYOK_BLOB_CONTENT_ROUTE, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_PATH, BYOK_BOARD_STATUS_ROUTE, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_CAPABILITIES_PATH, BYOK_CHALLENGE_PATH, BYOK_EVENTS_PATH, BYOK_MESSAGES_PATH, BYOK_PAIR_PATH, BYOK_PRESENCE_PATH, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, BYOK_TOKEN_PATH, BYOK_WS_PATH, BlobDownloadUrlResponseSchema, BlobRefSchema, CAPABILITY_FLAGS, CONFIGURED_TOOLSETS_MAX_ITEMS, CONTENT_HASH_RE, ChallengeRequestSchema, ChallengeResponseSchema, ConfiguredToolsetsSchema, ConnAckPayloadSchema, ConnHelloPayloadSchema, ContentReadPolicySchema, CreateBlobRequestSchema, CreateBlobResponseSchema, DAEMON_TO_SERVER_TYPES, DispatchSelectionSchema, EnvelopeParseError, EnvelopeSchema, EnvelopeValidationError, EventsPollQuerySchema, EventsPollResponseSchema, KNOWN_AGENT_EVENT_TYPES, MAX_MESSAGES_PER_BATCH, MESSAGE_PAYLOAD_SCHEMAS, MESSAGE_TYPES, MessagesSendRequestSchema, MessagesSendResponseSchema, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PERMISSION_MODES, PROTOCOL_VERSION, PairRequestSchema, PairResponseSchema, PairResponseTenantIdSchema, PermissionPolicySchema, PresencePublishRequestSchema, ProtocolError, ProtocolVersionNumberSchema, RESULT_DOCUMENT_MAX_BYTES, RequiredToolsetsSchema, RuntimeCapabilitiesSchema, RuntimeIdSchema, RuntimeInfoSchema, SERVER_TO_DAEMON_TYPES, STRICT_AGENT_ONLY_CAPABILITY, TASK_STATES, TASK_TRANSITIONS, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TaskApprovalResolvedPayloadSchema, TaskApprovePayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCancelPayloadSchema, TaskCancelledPayloadSchema, TaskClaimPayloadSchema, TaskCompletePayloadSchema, TaskDeclinePayloadSchema, TaskFailPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskProgressPayloadSchema, TaskRejectPayloadSchema, TaskStartedPayloadSchema, TaskSteerPayloadSchema, TerminalInferenceUsageSchema, TokenRequestSchema, TokenResponseSchema, ToolsetIdSchema, UnknownAgentEventSchema, UnknownMessageTypeError, byokAgentHomeProjectionCompletionPath, byokBlobContentPath, byokBlobFinalizePath, byokBlobUrlPath, byokRecordPath, byokSkillPackFilePath, canTransition, checkResultDocument, createEnvelope, decodeEnvelope, encodeEnvelope, isKnownAgentEvent, isServerToDaemonType, parseMessage, partitionAgentEvents };
1082
+ export { AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AGENT_MEMORY_PROJECTION_CAPABILITY, AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE, AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES, AGENT_MESSAGE_EGRESS_CAPABILITY, AGENT_MESSAGE_MAX_BYTES, AGENT_REF_MAX_BYTES, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentContentReadPayloadSchema, AgentContentReadSurfaceSchema, AgentContentReceiptPayloadSchema, AgentEgressAckPayloadSchema, AgentEgressActivityPolicySchema, AgentEgressContentHashSchema, AgentEgressDropReasonSchema, AgentEgressLaneSchema, AgentEgressPolicyRevisionSchema, AgentEgressPolicySchema, AgentEgressReliablePayloadSchema, AgentEventOrUnknownSchema, AgentEventSchema, AgentHomeProjectionAgentRefSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionPayloadSchema, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionReadbackSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionValueSchema, AgentMemoryProjectionCommitRequestSchema, AgentMemoryProjectionCommitResponseSchema, AgentMemoryProjectionEraseResultSchema, AgentMemoryProjectionGrantRefSchema, AgentMemoryProjectionMeteringReceiptSchema, AgentMemoryProjectionMutationSchema, AgentMemoryProjectionReceiptSchema, AgentMemoryProjectionSessionRefSchema, AgentMemoryProjectionSnapshotSchema, AgentMemoryProjectionSourceSeqSchema, AgentMemoryProjectionWriterEpochSchema, AgentMessageContentTypeSchema, AgentMessageContractSchema, AgentMessageDestinationBindingSchema, AgentMessageDispositionPayloadSchema, AgentMessageEgressRequirementSchema, AgentMessageFreshnessCursorSchema, AgentMessagePublishPayloadSchema, AgentMessageServerContextSchema, AgentRefSchema, AgentReliableQuotaPolicySchema, BYOK_ACTIVITY_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, BYOK_AGENT_MEMORY_PROJECTIONS_PATH, BYOK_BLOBS_PATH, BYOK_BLOB_CONTENT_ROUTE, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_PATH, BYOK_BOARD_STATUS_ROUTE, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_CAPABILITIES_PATH, BYOK_CHALLENGE_PATH, BYOK_EVENTS_PATH, BYOK_MESSAGES_PATH, BYOK_PAIR_PATH, BYOK_PRESENCE_PATH, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, BYOK_TOKEN_PATH, BYOK_WS_PATH, BlobDownloadUrlResponseSchema, BlobRefSchema, CAPABILITY_FLAGS, CONFIGURED_TOOLSETS_MAX_ITEMS, CONTENT_HASH_RE, ChallengeRequestSchema, ChallengeResponseSchema, ConfiguredToolsetsSchema, ConnAckPayloadSchema, ConnHelloPayloadSchema, ContentReadPolicySchema, CreateBlobRequestSchema, CreateBlobResponseSchema, DAEMON_TO_SERVER_TYPES, DispatchSelectionSchema, EnvelopeParseError, EnvelopeSchema, EnvelopeValidationError, EventsPollQuerySchema, EventsPollResponseSchema, KNOWN_AGENT_EVENT_TYPES, MAX_MESSAGES_PER_BATCH, MESSAGE_PAYLOAD_SCHEMAS, MESSAGE_TYPES, MessagesSendRequestSchema, MessagesSendResponseSchema, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PERMISSION_MODES, PROTOCOL_VERSION, PairRequestSchema, PairResponseSchema, PairResponseTenantIdSchema, PermissionPolicySchema, PresencePublishRequestSchema, ProtocolError, ProtocolVersionNumberSchema, RESULT_DOCUMENT_MAX_BYTES, RequiredToolsetsSchema, RuntimeCapabilitiesSchema, RuntimeIdSchema, RuntimeInfoSchema, SERVER_TO_DAEMON_TYPES, STRICT_AGENT_ONLY_CAPABILITY, TASK_STATES, TASK_TRANSITIONS, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_PROJECTION_SELECTION_CAPABILITY, TaskApprovalResolvedPayloadSchema, TaskApprovePayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCancelPayloadSchema, TaskCancelledPayloadSchema, TaskClaimPayloadSchema, TaskCompletePayloadSchema, TaskDeclinePayloadSchema, TaskFailPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskProgressPayloadSchema, TaskRejectPayloadSchema, TaskStartedPayloadSchema, TaskSteerPayloadSchema, TerminalInferenceUsageSchema, TerminalProjectionContractSchema, TerminalProjectionSelectionSchema, TokenRequestSchema, TokenResponseSchema, ToolsetIdSchema, UnknownAgentEventSchema, UnknownMessageTypeError, agentMemoryProjectionBase64UrlByteLength, byokAgentHomeProjectionCompletionPath, byokBlobContentPath, byokBlobFinalizePath, byokBlobUrlPath, byokRecordPath, byokSkillPackFilePath, canTransition, checkResultDocument, createEnvelope, decodeEnvelope, encodeEnvelope, isKnownAgentEvent, isServerToDaemonType, parseMessage, partitionAgentEvents };
939
1083
  //# sourceMappingURL=index.js.map
940
1084
  //# sourceMappingURL=index.js.map