@multi-agent-protocol/sdk 0.0.8 → 0.0.10

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.
@@ -46,10 +46,104 @@ type ProtocolVersion = 1;
46
46
  type Timestamp = number;
47
47
  /** Vendor extension metadata */
48
48
  type Meta = Record<string, unknown>;
49
+ /**
50
+ * Compute environment information for an agent.
51
+ * Category names are normative; field conventions within categories are documented separately.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const environment: AgentEnvironment = {
56
+ * schemaVersion: '1.0',
57
+ * os: { type: 'linux', version: '22.04' },
58
+ * process: { cwd: '/home/user/project' },
59
+ * network: { connectivity: 'full' },
60
+ * tools: { installed: { python: '3.11', node: '20.0' } }
61
+ * };
62
+ * ```
63
+ */
64
+ interface AgentEnvironment {
65
+ /** Schema version for evolution (e.g., '1.0') */
66
+ schemaVersion?: string;
67
+ /** Self-declared profile compliance (e.g., ['cloud-native', 'ml-ready']) */
68
+ profiles?: string[];
69
+ /** Host/machine info (arch, cpu, memory, gpu) */
70
+ host?: Record<string, unknown>;
71
+ /** Operating system info (type, version) */
72
+ os?: Record<string, unknown>;
73
+ /** Process/runtime info (pid, cwd, runtime) */
74
+ process?: Record<string, unknown>;
75
+ /** Container info if containerized */
76
+ container?: Record<string, unknown>;
77
+ /** Cloud provider info (provider, region) */
78
+ cloud?: Record<string, unknown>;
79
+ /** Kubernetes info if in k8s */
80
+ k8s?: Record<string, unknown>;
81
+ /** Filesystem/workspace info (cwd, mounts, workspace) */
82
+ filesystem?: Record<string, unknown>;
83
+ /** Network info (connectivity, addresses) */
84
+ network?: Record<string, unknown>;
85
+ /** Available tools and runtimes */
86
+ tools?: Record<string, unknown>;
87
+ /** Resource limits and constraints */
88
+ resources?: Record<string, unknown>;
89
+ /** Security/isolation context */
90
+ security?: Record<string, unknown>;
91
+ /** External services and APIs (aiProviders, mcp) */
92
+ services?: Record<string, unknown>;
93
+ /** Allow additional categories */
94
+ [key: string]: unknown;
95
+ }
96
+ /**
97
+ * Structured capability descriptor for an agent.
98
+ * Published at registration time via the `capabilityDescriptor` field on Agent.
99
+ * Optional — agents without descriptors still work via role/metadata.
100
+ */
101
+ interface MAPAgentCapabilityDescriptor {
102
+ /** Globally unique capability descriptor ID (e.g., "urn:map:cap:code-review") */
103
+ id?: string;
104
+ /** Semantic version of the capability descriptor */
105
+ version?: string;
106
+ /** Human-readable name */
107
+ name?: string;
108
+ /** Human-readable summary of what this agent does */
109
+ description?: string;
110
+ /** Capability categories this agent supports */
111
+ capabilities?: MAPCapabilityDeclaration[];
112
+ /** Input types this agent can accept */
113
+ accepts?: MAPInterfaceSpec[];
114
+ /** Output types this agent can provide */
115
+ provides?: MAPInterfaceSpec[];
116
+ /** Semantic tags for discovery (searchable) */
117
+ tags?: string[];
118
+ }
119
+ /**
120
+ * A single capability declaration within an agent's descriptor.
121
+ */
122
+ interface MAPCapabilityDeclaration {
123
+ /** Machine-readable capability identifier (namespaced, e.g., "doc:summarize") */
124
+ id: string;
125
+ /** Capability version */
126
+ version?: string;
127
+ /** What this capability does */
128
+ description?: string;
129
+ /** Interfaces for this specific capability */
130
+ interfaces?: MAPInterfaceSpec[];
131
+ }
132
+ /**
133
+ * Interface specification for capability inputs/outputs.
134
+ */
135
+ interface MAPInterfaceSpec {
136
+ /** Content type (e.g., "application/json", "text/plain") */
137
+ contentType: string;
138
+ /** JSON Schema URI for the expected payload structure */
139
+ schema?: string;
140
+ /** Description of this interface */
141
+ description?: string;
142
+ }
49
143
  /** Type of participant in the protocol */
50
- type ParticipantType = 'agent' | 'client' | 'system' | 'gateway';
144
+ type ParticipantType = "agent" | "client" | "system" | "gateway";
51
145
  /** Transport binding type */
52
- type TransportType = 'websocket' | 'stdio' | 'inprocess' | 'http-sse';
146
+ type TransportType = "websocket" | "stdio" | "inprocess" | "http-sse";
53
147
  /**
54
148
  * Streaming capabilities for backpressure and flow control.
55
149
  * Servers advertise these to indicate what features they support.
@@ -115,6 +209,17 @@ interface ParticipantCapabilities {
115
209
  /** Can create threads within conversations */
116
210
  canCreateThreads?: boolean;
117
211
  };
212
+ /** Workspace file access capabilities */
213
+ workspace?: {
214
+ /** Whether workspace is enabled (server response only) */
215
+ enabled?: boolean;
216
+ /** Can search files by pattern */
217
+ canSearch?: boolean;
218
+ /** Can list files in a directory */
219
+ canList?: boolean;
220
+ /** Can read file contents */
221
+ canRead?: boolean;
222
+ };
118
223
  /** Streaming/backpressure capabilities */
119
224
  streaming?: StreamingCapabilities;
120
225
  /**
@@ -157,9 +262,9 @@ interface Participant {
157
262
  * State of an agent.
158
263
  * Standard states are enumerated; custom states use 'x-' prefix.
159
264
  */
160
- type AgentState = 'registered' | 'active' | 'busy' | 'idle' | 'suspended' | 'stopping' | 'stopped' | 'failed' | 'orphaned' | `x-${string}`;
265
+ type AgentState = "registered" | "active" | "busy" | "idle" | "suspended" | "stopping" | "stopped" | "failed" | "orphaned" | `x-${string}`;
161
266
  /** Type of relationship between agents */
162
- type AgentRelationshipType = 'peer' | 'supervisor' | 'supervised' | 'collaborator';
267
+ type AgentRelationshipType = "peer" | "supervisor" | "supervised" | "collaborator";
163
268
  /** A relationship between agents */
164
269
  interface AgentRelationship {
165
270
  type: AgentRelationshipType;
@@ -179,7 +284,7 @@ interface AgentLifecycle {
179
284
  _meta?: Meta;
180
285
  }
181
286
  /** Who can see this agent */
182
- type AgentVisibility = 'public' | 'parent-only' | 'scope' | 'system';
287
+ type AgentVisibility = "public" | "parent-only" | "scope" | "system";
183
288
  /** An agent in the multi-agent system */
184
289
  interface Agent {
185
290
  id: AgentId;
@@ -222,6 +327,10 @@ interface Agent {
222
327
  permissionOverrides?: Partial<AgentPermissions>;
223
328
  lifecycle?: AgentLifecycle;
224
329
  capabilities?: ParticipantCapabilities;
330
+ /** Compute environment where this agent runs */
331
+ environment?: AgentEnvironment;
332
+ /** Structured capability descriptor for rich agent discovery */
333
+ capabilityDescriptor?: MAPAgentCapabilityDescriptor;
225
334
  metadata?: Record<string, unknown>;
226
335
  _meta?: Meta;
227
336
  }
@@ -238,7 +347,7 @@ declare function isOrphanedAgent(agent: Agent): boolean;
238
347
  * - 'direct': Can only see explicitly included agents
239
348
  * - { include: [...] }: Explicit allowlist of agent IDs
240
349
  */
241
- type AgentVisibilityRule = 'all' | 'hierarchy' | 'scoped' | 'direct' | {
350
+ type AgentVisibilityRule = "all" | "hierarchy" | "scoped" | "direct" | {
242
351
  include: AgentId[];
243
352
  };
244
353
  /**
@@ -247,7 +356,7 @@ type AgentVisibilityRule = 'all' | 'hierarchy' | 'scoped' | 'direct' | {
247
356
  * - 'member': Can only see scopes they're a member of
248
357
  * - { include: [...] }: Explicit allowlist of scope IDs
249
358
  */
250
- type ScopeVisibilityRule = 'all' | 'member' | {
359
+ type ScopeVisibilityRule = "all" | "member" | {
251
360
  include: ScopeId[];
252
361
  };
253
362
  /**
@@ -256,7 +365,7 @@ type ScopeVisibilityRule = 'all' | 'member' | {
256
365
  * - 'local': Can see immediate parent and children only
257
366
  * - 'none': Cannot see hierarchy relationships
258
367
  */
259
- type StructureVisibilityRule = 'full' | 'local' | 'none';
368
+ type StructureVisibilityRule = "full" | "local" | "none";
260
369
  /**
261
370
  * Rule for which agents this agent can send messages to.
262
371
  * - 'all': Can message any agent
@@ -264,7 +373,7 @@ type StructureVisibilityRule = 'full' | 'local' | 'none';
264
373
  * - 'scoped': Can message agents in the same scopes
265
374
  * - { include: [...] }: Explicit allowlist of agent IDs
266
375
  */
267
- type AgentMessagingRule = 'all' | 'hierarchy' | 'scoped' | {
376
+ type AgentMessagingRule = "all" | "hierarchy" | "scoped" | {
268
377
  include: AgentId[];
269
378
  };
270
379
  /**
@@ -273,7 +382,7 @@ type AgentMessagingRule = 'all' | 'hierarchy' | 'scoped' | {
273
382
  * - 'member': Can only send to scopes they're a member of
274
383
  * - { include: [...] }: Explicit allowlist of scope IDs
275
384
  */
276
- type ScopeMessagingRule = 'all' | 'member' | {
385
+ type ScopeMessagingRule = "all" | "member" | {
277
386
  include: ScopeId[];
278
387
  };
279
388
  /**
@@ -283,7 +392,7 @@ type ScopeMessagingRule = 'all' | 'member' | {
283
392
  * - 'scoped': Accepts from agents in the same scopes
284
393
  * - { include: [...] }: Explicit allowlist of agent IDs
285
394
  */
286
- type AgentAcceptanceRule = 'all' | 'hierarchy' | 'scoped' | {
395
+ type AgentAcceptanceRule = "all" | "hierarchy" | "scoped" | {
287
396
  include: AgentId[];
288
397
  };
289
398
  /**
@@ -292,7 +401,7 @@ type AgentAcceptanceRule = 'all' | 'hierarchy' | 'scoped' | {
292
401
  * - 'none': Does not accept from any client
293
402
  * - { include: [...] }: Explicit allowlist of participant IDs
294
403
  */
295
- type ClientAcceptanceRule = 'all' | 'none' | {
404
+ type ClientAcceptanceRule = "all" | "none" | {
296
405
  include: ParticipantId[];
297
406
  };
298
407
  /**
@@ -301,7 +410,7 @@ type ClientAcceptanceRule = 'all' | 'none' | {
301
410
  * - 'none': Does not accept from any federated system
302
411
  * - { include: [...] }: Explicit allowlist of system IDs
303
412
  */
304
- type SystemAcceptanceRule = 'all' | 'none' | {
413
+ type SystemAcceptanceRule = "all" | "none" | {
305
414
  include: string[];
306
415
  };
307
416
  /**
@@ -429,7 +538,7 @@ interface SystemAddress {
429
538
  /** Address any participant by ID or category */
430
539
  interface ParticipantAddress {
431
540
  participant?: ParticipantId;
432
- participants?: 'all' | 'agents' | 'clients';
541
+ participants?: "all" | "agents" | "clients";
433
542
  }
434
543
  /** Address an agent in a federated system */
435
544
  interface FederatedAddress {
@@ -439,11 +548,11 @@ interface FederatedAddress {
439
548
  /** Flexible addressing for any topology */
440
549
  type Address = string | DirectAddress | MultiAddress | ScopeAddress | RoleAddress | HierarchicalAddress | BroadcastAddress | SystemAddress | ParticipantAddress | FederatedAddress;
441
550
  /** Message priority */
442
- type MessagePriority = 'urgent' | 'high' | 'normal' | 'low';
551
+ type MessagePriority = "urgent" | "high" | "normal" | "low";
443
552
  /** Message delivery guarantees */
444
- type DeliverySemantics = 'fire-and-forget' | 'acknowledged' | 'guaranteed';
553
+ type DeliverySemantics = "fire-and-forget" | "acknowledged" | "guaranteed";
445
554
  /** Relationship context for the message */
446
- type MessageRelationship = 'parent-to-child' | 'child-to-parent' | 'peer' | 'broadcast';
555
+ type MessageRelationship = "parent-to-child" | "child-to-parent" | "peer" | "broadcast";
447
556
  /** Metadata for a message */
448
557
  interface MessageMeta {
449
558
  timestamp?: Timestamp;
@@ -478,13 +587,13 @@ interface Message<T = unknown> {
478
587
  _meta?: Meta;
479
588
  }
480
589
  /** Policy for joining a scope */
481
- type JoinPolicy = 'open' | 'invite' | 'role' | 'system';
590
+ type JoinPolicy = "open" | "invite" | "role" | "system";
482
591
  /** Who can see the scope exists and its members */
483
- type ScopeVisibility = 'public' | 'members' | 'system';
592
+ type ScopeVisibility = "public" | "members" | "system";
484
593
  /** Who can see messages sent to this scope */
485
- type MessageVisibility = 'public' | 'members' | 'system';
594
+ type MessageVisibility = "public" | "members" | "system";
486
595
  /** Who can send messages to this scope */
487
- type SendPolicy = 'members' | 'any';
596
+ type SendPolicy = "members" | "any";
488
597
  /** A scope for grouping agents */
489
598
  interface Scope {
490
599
  id: ScopeId;
@@ -509,6 +618,7 @@ declare const EVENT_TYPES: {
509
618
  readonly AGENT_REGISTERED: "agent_registered";
510
619
  readonly AGENT_UNREGISTERED: "agent_unregistered";
511
620
  readonly AGENT_STATE_CHANGED: "agent_state_changed";
621
+ readonly AGENT_ENVIRONMENT_CHANGED: "agent_environment_changed";
512
622
  readonly AGENT_ORPHANED: "agent_orphaned";
513
623
  readonly PARTICIPANT_CONNECTED: "participant_connected";
514
624
  readonly PARTICIPANT_DISCONNECTED: "participant_disconnected";
@@ -646,6 +756,20 @@ interface SubscriptionFilter {
646
756
  * Checks event.data.metadata for matching values.
647
757
  */
648
758
  metadataMatch?: Record<string, unknown>;
759
+ /**
760
+ * Filter by agent environment attributes.
761
+ * Matches events from agents whose environment contains matching values.
762
+ * Uses dot notation for nested fields (e.g., 'os.type', 'cloud.region').
763
+ *
764
+ * @example
765
+ * ```typescript
766
+ * environmentMatch: {
767
+ * 'os.type': 'linux',
768
+ * 'cloud.provider': 'aws'
769
+ * }
770
+ * ```
771
+ */
772
+ environmentMatch?: Record<string, unknown>;
649
773
  /**
650
774
  * Mail-specific filter for conversation events.
651
775
  * Matches mail events related to a specific conversation, thread,
@@ -667,7 +791,7 @@ interface SubscriptionOptions$1 {
667
791
  * - 'paused': Events are buffered but not delivered to the iterator
668
792
  * - 'closed': Subscription is terminated
669
793
  */
670
- type SubscriptionState = 'active' | 'paused' | 'closed';
794
+ type SubscriptionState = "active" | "paused" | "closed";
671
795
  /**
672
796
  * Information about events dropped due to buffer overflow.
673
797
  * Passed to overflow handlers when events cannot be buffered.
@@ -700,7 +824,7 @@ interface SubscriptionAckParams {
700
824
  }
701
825
  /** Notification for subscription acknowledgment */
702
826
  interface SubscriptionAckNotification extends MAPNotificationBase<SubscriptionAckParams> {
703
- method: 'map/subscribe.ack';
827
+ method: "map/subscribe.ack";
704
828
  params: SubscriptionAckParams;
705
829
  }
706
830
  /** Data for message_sent events (no payload for privacy) */
@@ -729,7 +853,7 @@ interface MessageFailedEventData {
729
853
  code?: number;
730
854
  }
731
855
  /** Category of error for handling decisions */
732
- type ErrorCategory = 'protocol' | 'auth' | 'routing' | 'agent' | 'resource' | 'federation' | 'mail' | 'internal';
856
+ type ErrorCategory = "protocol" | "auth" | "routing" | "agent" | "resource" | "federation" | "mail" | "internal";
733
857
  /** Structured error data */
734
858
  interface MAPErrorData {
735
859
  category?: ErrorCategory;
@@ -748,20 +872,20 @@ interface MAPError {
748
872
  declare const JSONRPC_VERSION: "2.0";
749
873
  /** Base JSON-RPC request */
750
874
  interface MAPRequestBase<TParams = unknown> {
751
- jsonrpc: '2.0';
875
+ jsonrpc: "2.0";
752
876
  id: RequestId;
753
877
  method: string;
754
878
  params?: TParams;
755
879
  }
756
880
  /** Base JSON-RPC response (success) */
757
881
  interface MAPResponseSuccess<T = unknown> {
758
- jsonrpc: '2.0';
882
+ jsonrpc: "2.0";
759
883
  id: RequestId;
760
884
  result: T;
761
885
  }
762
886
  /** Base JSON-RPC response (error) */
763
887
  interface MAPResponseError {
764
- jsonrpc: '2.0';
888
+ jsonrpc: "2.0";
765
889
  id: RequestId;
766
890
  error: MAPError;
767
891
  }
@@ -769,7 +893,7 @@ interface MAPResponseError {
769
893
  type MAPResponse<T = unknown> = MAPResponseSuccess<T> | MAPResponseError;
770
894
  /** Base JSON-RPC notification */
771
895
  interface MAPNotificationBase<TParams = unknown> {
772
- jsonrpc: '2.0';
896
+ jsonrpc: "2.0";
773
897
  method: string;
774
898
  params?: TParams;
775
899
  }
@@ -780,11 +904,11 @@ interface SessionInfo {
780
904
  closedAt?: Timestamp;
781
905
  }
782
906
  /** Standard authentication methods defined by the protocol */
783
- type StandardAuthMethod = 'bearer' | 'api-key' | 'mtls' | 'none';
907
+ type StandardAuthMethod = "bearer" | "api-key" | "mtls" | "none" | "did:wba";
784
908
  /** Authentication method - standard or custom (x- prefixed) */
785
909
  type AuthMethod = StandardAuthMethod | `x-${string}`;
786
910
  /** Authentication error codes */
787
- type AuthErrorCode = 'invalid_credentials' | 'expired' | 'insufficient_scope' | 'method_not_supported' | 'auth_required';
911
+ type AuthErrorCode = "invalid_credentials" | "expired" | "insufficient_scope" | "method_not_supported" | "auth_required";
788
912
  /**
789
913
  * Client-provided authentication credentials.
790
914
  * Used in connect requests and authenticate calls.
@@ -846,18 +970,89 @@ interface AuthResult {
846
970
  principal?: AuthPrincipal;
847
971
  /** Error details (if failure) */
848
972
  error?: AuthError;
973
+ /** Provider-specific data to store on session (e.g., verified AgentToken) */
974
+ providerData?: unknown;
849
975
  }
976
+ /**
977
+ * Supported federation authentication methods.
978
+ */
979
+ type FederationAuthMethod = "bearer" | "api-key" | "mtls" | "none" | "did:wba" | "oauth2" | `x-${string}`;
850
980
  /**
851
981
  * Authentication for federated connections.
852
982
  */
853
983
  interface FederationAuth {
854
- method: 'bearer' | 'api-key' | 'mtls';
984
+ method: FederationAuthMethod;
855
985
  credentials?: string;
986
+ /** Method-specific additional data (e.g., DID proof, OAuth2 config) */
987
+ metadata?: Record<string, unknown>;
988
+ }
989
+ /**
990
+ * DID:WBA authentication credentials for federation.
991
+ * Used for domain-anchored decentralized identity.
992
+ */
993
+ interface DIDWBACredentials {
994
+ method: "did:wba";
995
+ /** DID and proof nested in metadata (matches wire format) */
996
+ metadata: {
997
+ /** The DID of the connecting system/agent (e.g., "did:wba:agents.example.com:gateway") */
998
+ did: string;
999
+ /** Cryptographic proof of DID ownership */
1000
+ proof: DIDWBAProof;
1001
+ };
856
1002
  }
1003
+ /**
1004
+ * Cryptographic proof for DID:WBA authentication.
1005
+ */
1006
+ interface DIDWBAProof {
1007
+ /** Proof type (e.g., "JsonWebSignature2020", "Ed25519Signature2020") */
1008
+ type: string;
1009
+ /** ISO 8601 timestamp of proof creation */
1010
+ created: string;
1011
+ /** Server-provided nonce (prevents replay) */
1012
+ challenge: string;
1013
+ /** JWS signature over (challenge + did + created) */
1014
+ jws: string;
1015
+ }
1016
+ /**
1017
+ * DID Document structure for MAP federation.
1018
+ * Resolved from `did:wba:<domain>:<path>` → `https://<domain>/<path>/did.json`
1019
+ */
1020
+ interface DIDDocument {
1021
+ "@context"?: string | string[];
1022
+ id: string;
1023
+ verificationMethod?: DIDVerificationMethod[];
1024
+ authentication?: string[];
1025
+ service?: DIDService[];
1026
+ }
1027
+ /**
1028
+ * A verification method within a DID Document.
1029
+ */
1030
+ interface DIDVerificationMethod {
1031
+ id: string;
1032
+ type: string;
1033
+ controller: string;
1034
+ publicKeyJwk?: Record<string, unknown>;
1035
+ }
1036
+ /**
1037
+ * A service endpoint within a DID Document.
1038
+ */
1039
+ interface DIDService {
1040
+ id: string;
1041
+ type: string;
1042
+ serviceEndpoint: string | Record<string, unknown>;
1043
+ /** MAP protocol version (for MAPFederationEndpoint services) */
1044
+ mapProtocolVersion?: number;
1045
+ /** MAP capabilities advertised by this endpoint */
1046
+ mapCapabilities?: Record<string, boolean>;
1047
+ }
1048
+ /**
1049
+ * Union type for all supported federation auth credentials.
1050
+ */
1051
+ type MAPFederationAuth = FederationAuth | DIDWBACredentials;
857
1052
  /** Policy for handling unexpected disconnection */
858
1053
  interface DisconnectPolicy {
859
1054
  /** What happens to agents on disconnect */
860
- agentBehavior: 'unregister' | 'orphan' | 'grace-period';
1055
+ agentBehavior: "unregister" | "orphan" | "grace-period";
861
1056
  /** Grace period before unregistering (ms) */
862
1057
  gracePeriodMs?: number;
863
1058
  /** Emit events to subscribers */
@@ -881,7 +1076,7 @@ interface ConnectRequestParams {
881
1076
  _meta?: Meta;
882
1077
  }
883
1078
  interface ConnectRequest extends MAPRequestBase<ConnectRequestParams> {
884
- method: 'map/connect';
1079
+ method: "map/connect";
885
1080
  params: ConnectRequestParams;
886
1081
  }
887
1082
  interface ConnectResponseResult {
@@ -912,7 +1107,7 @@ interface DisconnectRequestParams {
912
1107
  _meta?: Meta;
913
1108
  }
914
1109
  interface DisconnectRequest extends MAPRequestBase<DisconnectRequestParams> {
915
- method: 'map/disconnect';
1110
+ method: "map/disconnect";
916
1111
  params?: DisconnectRequestParams;
917
1112
  }
918
1113
  interface DisconnectResponseResult {
@@ -925,7 +1120,7 @@ interface SessionListRequestParams {
925
1120
  _meta?: Meta;
926
1121
  }
927
1122
  interface SessionListRequest extends MAPRequestBase<SessionListRequestParams> {
928
- method: 'map/session/list';
1123
+ method: "map/session/list";
929
1124
  params?: SessionListRequestParams;
930
1125
  }
931
1126
  interface SessionListResponseResult {
@@ -937,7 +1132,7 @@ interface SessionLoadRequestParams {
937
1132
  _meta?: Meta;
938
1133
  }
939
1134
  interface SessionLoadRequest extends MAPRequestBase<SessionLoadRequestParams> {
940
- method: 'map/session/load';
1135
+ method: "map/session/load";
941
1136
  params: SessionLoadRequestParams;
942
1137
  }
943
1138
  interface SessionLoadResponseResult {
@@ -950,7 +1145,7 @@ interface SessionCloseRequestParams {
950
1145
  _meta?: Meta;
951
1146
  }
952
1147
  interface SessionCloseRequest extends MAPRequestBase<SessionCloseRequestParams> {
953
- method: 'map/session/close';
1148
+ method: "map/session/close";
954
1149
  params?: SessionCloseRequestParams;
955
1150
  }
956
1151
  interface SessionCloseResponseResult {
@@ -964,6 +1159,12 @@ interface AgentsListFilter {
964
1159
  parent?: AgentId;
965
1160
  hasChildren?: boolean;
966
1161
  ownerId?: ParticipantId;
1162
+ /** Filter by structured capability ID (e.g., "doc:summarize") */
1163
+ capabilityId?: string;
1164
+ /** Filter by semantic tags from capability descriptor */
1165
+ tags?: string[];
1166
+ /** Filter by accepted content type */
1167
+ accepts?: string;
967
1168
  }
968
1169
  interface AgentsListRequestParams {
969
1170
  filter?: AgentsListFilter;
@@ -972,7 +1173,7 @@ interface AgentsListRequestParams {
972
1173
  _meta?: Meta;
973
1174
  }
974
1175
  interface AgentsListRequest extends MAPRequestBase<AgentsListRequestParams> {
975
- method: 'map/agents/list';
1176
+ method: "map/agents/list";
976
1177
  params?: AgentsListRequestParams;
977
1178
  }
978
1179
  interface AgentsListResponseResult {
@@ -995,7 +1196,7 @@ interface AgentsGetRequestParams {
995
1196
  _meta?: Meta;
996
1197
  }
997
1198
  interface AgentsGetRequest extends MAPRequestBase<AgentsGetRequestParams> {
998
- method: 'map/agents/get';
1199
+ method: "map/agents/get";
999
1200
  params: AgentsGetRequestParams;
1000
1201
  }
1001
1202
  interface AgentsGetResponseResult {
@@ -1016,13 +1217,17 @@ interface AgentsRegisterRequestParams {
1016
1217
  scopes?: ScopeId[];
1017
1218
  visibility?: AgentVisibility;
1018
1219
  capabilities?: ParticipantCapabilities;
1220
+ /** Compute environment where this agent runs */
1221
+ environment?: AgentEnvironment;
1222
+ /** Structured capability descriptor for rich agent discovery */
1223
+ capabilityDescriptor?: MAPAgentCapabilityDescriptor;
1019
1224
  metadata?: Record<string, unknown>;
1020
1225
  /** Permission overrides merged on top of role-based defaults */
1021
1226
  permissionOverrides?: Partial<AgentPermissions>;
1022
1227
  _meta?: Meta;
1023
1228
  }
1024
1229
  interface AgentsRegisterRequest extends MAPRequestBase<AgentsRegisterRequestParams> {
1025
- method: 'map/agents/register';
1230
+ method: "map/agents/register";
1026
1231
  params?: AgentsRegisterRequestParams;
1027
1232
  }
1028
1233
  interface AgentsRegisterResponseResult {
@@ -1035,7 +1240,7 @@ interface AgentsUnregisterRequestParams {
1035
1240
  _meta?: Meta;
1036
1241
  }
1037
1242
  interface AgentsUnregisterRequest extends MAPRequestBase<AgentsUnregisterRequestParams> {
1038
- method: 'map/agents/unregister';
1243
+ method: "map/agents/unregister";
1039
1244
  params: AgentsUnregisterRequestParams;
1040
1245
  }
1041
1246
  interface AgentsUnregisterResponseResult {
@@ -1045,6 +1250,8 @@ interface AgentsUnregisterResponseResult {
1045
1250
  interface AgentsUpdateRequestParams {
1046
1251
  agentId: AgentId;
1047
1252
  state?: AgentState;
1253
+ /** Update agent's compute environment */
1254
+ environment?: AgentEnvironment;
1048
1255
  metadata?: Record<string, unknown>;
1049
1256
  /**
1050
1257
  * Permission overrides to apply to the agent.
@@ -1054,7 +1261,7 @@ interface AgentsUpdateRequestParams {
1054
1261
  _meta?: Meta;
1055
1262
  }
1056
1263
  interface AgentsUpdateRequest extends MAPRequestBase<AgentsUpdateRequestParams> {
1057
- method: 'map/agents/update';
1264
+ method: "map/agents/update";
1058
1265
  params: AgentsUpdateRequestParams;
1059
1266
  }
1060
1267
  interface AgentsUpdateResponseResult {
@@ -1070,12 +1277,16 @@ interface AgentsSpawnRequestParams {
1070
1277
  scopes?: ScopeId[];
1071
1278
  visibility?: AgentVisibility;
1072
1279
  capabilities?: ParticipantCapabilities;
1280
+ /** Compute environment where this agent runs */
1281
+ environment?: AgentEnvironment;
1282
+ /** Structured capability descriptor for rich agent discovery */
1283
+ capabilityDescriptor?: MAPAgentCapabilityDescriptor;
1073
1284
  initialMessage?: Message;
1074
1285
  metadata?: Record<string, unknown>;
1075
1286
  _meta?: Meta;
1076
1287
  }
1077
1288
  interface AgentsSpawnRequest extends MAPRequestBase<AgentsSpawnRequestParams> {
1078
- method: 'map/agents/spawn';
1289
+ method: "map/agents/spawn";
1079
1290
  params?: AgentsSpawnRequestParams;
1080
1291
  }
1081
1292
  interface AgentsSpawnResponseResult {
@@ -1090,7 +1301,7 @@ interface AgentsStopRequestParams {
1090
1301
  _meta?: Meta;
1091
1302
  }
1092
1303
  interface AgentsStopRequest extends MAPRequestBase<AgentsStopRequestParams> {
1093
- method: 'map/agents/stop';
1304
+ method: "map/agents/stop";
1094
1305
  params: AgentsStopRequestParams;
1095
1306
  }
1096
1307
  interface AgentsStopResponseResult {
@@ -1103,7 +1314,7 @@ interface AgentsSuspendRequestParams {
1103
1314
  _meta?: Meta;
1104
1315
  }
1105
1316
  interface AgentsSuspendRequest extends MAPRequestBase<AgentsSuspendRequestParams> {
1106
- method: 'map/agents/suspend';
1317
+ method: "map/agents/suspend";
1107
1318
  params: AgentsSuspendRequestParams;
1108
1319
  }
1109
1320
  interface AgentsSuspendResponseResult {
@@ -1115,7 +1326,7 @@ interface AgentsResumeRequestParams {
1115
1326
  _meta?: Meta;
1116
1327
  }
1117
1328
  interface AgentsResumeRequest extends MAPRequestBase<AgentsResumeRequestParams> {
1118
- method: 'map/agents/resume';
1329
+ method: "map/agents/resume";
1119
1330
  params: AgentsResumeRequestParams;
1120
1331
  }
1121
1332
  interface AgentsResumeResponseResult {
@@ -1129,7 +1340,7 @@ interface SendRequestParams {
1129
1340
  _meta?: Meta;
1130
1341
  }
1131
1342
  interface SendRequest extends MAPRequestBase<SendRequestParams> {
1132
- method: 'map/send';
1343
+ method: "map/send";
1133
1344
  params: SendRequestParams;
1134
1345
  }
1135
1346
  interface SendResponseResult {
@@ -1144,7 +1355,7 @@ interface SubscribeRequestParams {
1144
1355
  _meta?: Meta;
1145
1356
  }
1146
1357
  interface SubscribeRequest extends MAPRequestBase<SubscribeRequestParams> {
1147
- method: 'map/subscribe';
1358
+ method: "map/subscribe";
1148
1359
  params?: SubscribeRequestParams;
1149
1360
  }
1150
1361
  interface SubscribeResponseResult {
@@ -1156,7 +1367,7 @@ interface UnsubscribeRequestParams {
1156
1367
  _meta?: Meta;
1157
1368
  }
1158
1369
  interface UnsubscribeRequest extends MAPRequestBase<UnsubscribeRequestParams> {
1159
- method: 'map/unsubscribe';
1370
+ method: "map/unsubscribe";
1160
1371
  params: UnsubscribeRequestParams;
1161
1372
  }
1162
1373
  interface UnsubscribeResponseResult {
@@ -1223,7 +1434,7 @@ interface ReplayRequestParams {
1223
1434
  _meta?: Meta;
1224
1435
  }
1225
1436
  interface ReplayRequest extends MAPRequestBase<ReplayRequestParams> {
1226
- method: 'map/replay';
1437
+ method: "map/replay";
1227
1438
  params?: ReplayRequestParams;
1228
1439
  }
1229
1440
  interface ReplayResponseResult {
@@ -1243,7 +1454,7 @@ interface AuthRefreshRequestParams {
1243
1454
  _meta?: Meta;
1244
1455
  }
1245
1456
  interface AuthRefreshRequest extends MAPRequestBase<AuthRefreshRequestParams> {
1246
- method: 'map/auth/refresh';
1457
+ method: "map/auth/refresh";
1247
1458
  params: AuthRefreshRequestParams;
1248
1459
  }
1249
1460
  interface AuthRefreshResponseResult {
@@ -1266,7 +1477,7 @@ interface AuthenticateRequestParams {
1266
1477
  _meta?: Meta;
1267
1478
  }
1268
1479
  interface AuthenticateRequest extends MAPRequestBase<AuthenticateRequestParams> {
1269
- method: 'map/authenticate';
1480
+ method: "map/authenticate";
1270
1481
  params: AuthenticateRequestParams;
1271
1482
  }
1272
1483
  /**
@@ -1290,7 +1501,7 @@ interface ScopesListRequestParams {
1290
1501
  _meta?: Meta;
1291
1502
  }
1292
1503
  interface ScopesListRequest extends MAPRequestBase<ScopesListRequestParams> {
1293
- method: 'map/scopes/list';
1504
+ method: "map/scopes/list";
1294
1505
  params?: ScopesListRequestParams;
1295
1506
  }
1296
1507
  interface ScopesListResponseResult {
@@ -1302,7 +1513,7 @@ interface ScopesGetRequestParams {
1302
1513
  _meta?: Meta;
1303
1514
  }
1304
1515
  interface ScopesGetRequest extends MAPRequestBase<ScopesGetRequestParams> {
1305
- method: 'map/scopes/get';
1516
+ method: "map/scopes/get";
1306
1517
  params: ScopesGetRequestParams;
1307
1518
  }
1308
1519
  interface ScopesGetResponseResult {
@@ -1325,7 +1536,7 @@ interface ScopesCreateRequestParams {
1325
1536
  _meta?: Meta;
1326
1537
  }
1327
1538
  interface ScopesCreateRequest extends MAPRequestBase<ScopesCreateRequestParams> {
1328
- method: 'map/scopes/create';
1539
+ method: "map/scopes/create";
1329
1540
  params?: ScopesCreateRequestParams;
1330
1541
  }
1331
1542
  interface ScopesCreateResponseResult {
@@ -1337,7 +1548,7 @@ interface ScopesDeleteRequestParams {
1337
1548
  _meta?: Meta;
1338
1549
  }
1339
1550
  interface ScopesDeleteRequest extends MAPRequestBase<ScopesDeleteRequestParams> {
1340
- method: 'map/scopes/delete';
1551
+ method: "map/scopes/delete";
1341
1552
  params: ScopesDeleteRequestParams;
1342
1553
  }
1343
1554
  interface ScopesDeleteResponseResult {
@@ -1350,7 +1561,7 @@ interface ScopesJoinRequestParams {
1350
1561
  _meta?: Meta;
1351
1562
  }
1352
1563
  interface ScopesJoinRequest extends MAPRequestBase<ScopesJoinRequestParams> {
1353
- method: 'map/scopes/join';
1564
+ method: "map/scopes/join";
1354
1565
  params: ScopesJoinRequestParams;
1355
1566
  }
1356
1567
  interface ScopesJoinResponseResult {
@@ -1364,7 +1575,7 @@ interface ScopesLeaveRequestParams {
1364
1575
  _meta?: Meta;
1365
1576
  }
1366
1577
  interface ScopesLeaveRequest extends MAPRequestBase<ScopesLeaveRequestParams> {
1367
- method: 'map/scopes/leave';
1578
+ method: "map/scopes/leave";
1368
1579
  params: ScopesLeaveRequestParams;
1369
1580
  }
1370
1581
  interface ScopesLeaveResponseResult {
@@ -1379,7 +1590,7 @@ interface ScopesMembersRequestParams {
1379
1590
  _meta?: Meta;
1380
1591
  }
1381
1592
  interface ScopesMembersRequest extends MAPRequestBase<ScopesMembersRequestParams> {
1382
- method: 'map/scopes/members';
1593
+ method: "map/scopes/members";
1383
1594
  params: ScopesMembersRequestParams;
1384
1595
  }
1385
1596
  interface ScopesMembersResponseResult {
@@ -1394,21 +1605,21 @@ interface StructureGraphRequestParams {
1394
1605
  _meta?: Meta;
1395
1606
  }
1396
1607
  interface StructureGraphRequest extends MAPRequestBase<StructureGraphRequestParams> {
1397
- method: 'map/structure/graph';
1608
+ method: "map/structure/graph";
1398
1609
  params?: StructureGraphRequestParams;
1399
1610
  }
1400
1611
  interface GraphEdge {
1401
1612
  from: AgentId;
1402
1613
  to: AgentId;
1403
- type: 'parent-child' | 'peer' | 'supervisor' | 'collaborator';
1614
+ type: "parent-child" | "peer" | "supervisor" | "collaborator";
1404
1615
  }
1405
1616
  interface StructureGraphResponseResult {
1406
1617
  nodes: Agent[];
1407
1618
  edges: GraphEdge[];
1408
1619
  _meta?: Meta;
1409
1620
  }
1410
- type InjectDelivery = 'interrupt' | 'queue' | 'best-effort';
1411
- type InjectDeliveryResult = 'interrupt' | 'queue' | 'message';
1621
+ type InjectDelivery = "interrupt" | "queue" | "best-effort";
1622
+ type InjectDeliveryResult = "interrupt" | "queue" | "message";
1412
1623
  interface InjectRequestParams {
1413
1624
  agentId: AgentId;
1414
1625
  content: unknown;
@@ -1416,7 +1627,7 @@ interface InjectRequestParams {
1416
1627
  _meta?: Meta;
1417
1628
  }
1418
1629
  interface InjectRequest extends MAPRequestBase<InjectRequestParams> {
1419
- method: 'map/inject';
1630
+ method: "map/inject";
1420
1631
  params: InjectRequestParams;
1421
1632
  }
1422
1633
  interface InjectResponseResult {
@@ -1436,7 +1647,7 @@ interface PermissionsUpdateRequestParams {
1436
1647
  _meta?: Meta;
1437
1648
  }
1438
1649
  interface PermissionsUpdateRequest extends MAPRequestBase<PermissionsUpdateRequestParams> {
1439
- method: 'map/permissions/update';
1650
+ method: "map/permissions/update";
1440
1651
  params: PermissionsUpdateRequestParams;
1441
1652
  }
1442
1653
  interface PermissionsUpdateResponseResult {
@@ -1554,7 +1765,7 @@ interface FederationBufferConfig {
1554
1765
  /** Time to retain buffered messages in ms (default: 1 hour) */
1555
1766
  retentionMs?: number;
1556
1767
  /** Strategy when buffer is full */
1557
- overflowStrategy?: 'drop-oldest' | 'drop-newest' | 'reject';
1768
+ overflowStrategy?: "drop-oldest" | "drop-newest" | "reject";
1558
1769
  }
1559
1770
  /**
1560
1771
  * Configuration for replaying events from event store on reconnection.
@@ -1573,7 +1784,7 @@ interface FederationReplayConfig {
1573
1784
  /**
1574
1785
  * Type of gateway reconnection event.
1575
1786
  */
1576
- type GatewayReconnectionEventType = 'connecting' | 'connected' | 'disconnected' | 'reconnecting' | 'reconnect_failed' | 'buffer_overflow' | 'replay_started' | 'replay_completed';
1787
+ type GatewayReconnectionEventType = "connecting" | "connected" | "disconnected" | "reconnecting" | "reconnect_failed" | "buffer_overflow" | "replay_started" | "replay_completed";
1577
1788
  /**
1578
1789
  * Event emitted during gateway reconnection lifecycle.
1579
1790
  */
@@ -1625,10 +1836,27 @@ interface FederationConnectRequestParams {
1625
1836
  systemId: string;
1626
1837
  endpoint: string;
1627
1838
  auth?: FederationAuth;
1839
+ /** Pre-fetched server auth context (e.g., from .well-known discovery) */
1840
+ authContext?: {
1841
+ /** How the client learned the server's auth requirements */
1842
+ source: "well-known" | "cached" | "configured";
1843
+ /** Server's nonce/challenge (if pre-fetched, e.g., for did:wba) */
1844
+ challenge?: string;
1845
+ };
1846
+ /** System info about the connecting peer */
1847
+ systemInfo?: {
1848
+ name: string;
1849
+ version: string;
1850
+ endpoint: string;
1851
+ };
1852
+ /** MAP protocol version (default: 1) */
1853
+ protocolVersion?: number;
1854
+ /** What this peer exposes to the other side */
1855
+ exposure?: Record<string, unknown>;
1628
1856
  _meta?: Meta;
1629
1857
  }
1630
1858
  interface FederationConnectRequest extends MAPRequestBase<FederationConnectRequestParams> {
1631
- method: 'map/federation/connect';
1859
+ method: "map/federation/connect";
1632
1860
  params: FederationConnectRequestParams;
1633
1861
  }
1634
1862
  interface FederationConnectResponseResult {
@@ -1638,6 +1866,17 @@ interface FederationConnectResponseResult {
1638
1866
  version?: string;
1639
1867
  capabilities?: ParticipantCapabilities;
1640
1868
  };
1869
+ /** Federation session ID (when single-request auth succeeds) */
1870
+ sessionId?: string;
1871
+ /** Authenticated principal (when single-request auth succeeds) */
1872
+ principal?: AuthPrincipal;
1873
+ /** Auth negotiation fallback (when auth not provided or failed recoverably) */
1874
+ authRequired?: {
1875
+ methods: string[];
1876
+ /** Server-generated challenge nonce (e.g., for did:wba) */
1877
+ challenge?: string;
1878
+ required: boolean;
1879
+ };
1641
1880
  _meta?: Meta;
1642
1881
  }
1643
1882
  interface FederationRouteRequestParams {
@@ -1656,7 +1895,7 @@ interface FederationRouteRequestParams {
1656
1895
  _meta?: Meta;
1657
1896
  }
1658
1897
  interface FederationRouteRequest extends MAPRequestBase<FederationRouteRequestParams> {
1659
- method: 'map/federation/route';
1898
+ method: "map/federation/route";
1660
1899
  params: FederationRouteRequestParams;
1661
1900
  }
1662
1901
  interface FederationRouteResponseResult {
@@ -1667,11 +1906,11 @@ interface FederationRouteResponseResult {
1667
1906
  /**
1668
1907
  * Type of conversation.
1669
1908
  */
1670
- type ConversationType = 'user-session' | 'agent-task' | 'multi-agent' | 'mixed';
1909
+ type ConversationType = "user-session" | "agent-task" | "multi-agent" | "mixed";
1671
1910
  /**
1672
1911
  * Status of a conversation.
1673
1912
  */
1674
- type ConversationStatus = 'active' | 'paused' | 'completed' | 'failed' | 'archived';
1913
+ type ConversationStatus = "active" | "paused" | "completed" | "failed" | "archived";
1675
1914
  /**
1676
1915
  * A conversation - a container for tracking related interactions.
1677
1916
  */
@@ -1693,7 +1932,7 @@ interface Conversation {
1693
1932
  /**
1694
1933
  * Role of a participant within a conversation.
1695
1934
  */
1696
- type ParticipantRole = 'initiator' | 'assistant' | 'worker' | 'observer' | 'moderator';
1935
+ type ParticipantRole = "initiator" | "assistant" | "worker" | "observer" | "moderator";
1697
1936
  /**
1698
1937
  * Permissions for a participant within a conversation.
1699
1938
  */
@@ -1703,7 +1942,7 @@ interface ConversationPermissions {
1703
1942
  canInvite: boolean;
1704
1943
  canRemove: boolean;
1705
1944
  canCreateThreads: boolean;
1706
- historyAccess: 'none' | 'from-join' | 'full';
1945
+ historyAccess: "none" | "from-join" | "full";
1707
1946
  canSeeInternal: boolean;
1708
1947
  _meta?: Meta;
1709
1948
  }
@@ -1712,7 +1951,7 @@ interface ConversationPermissions {
1712
1951
  */
1713
1952
  interface ConversationParticipant {
1714
1953
  id: ParticipantId;
1715
- type: 'user' | 'agent' | 'system';
1954
+ type: "user" | "agent" | "system";
1716
1955
  role: ParticipantRole;
1717
1956
  joinedAt: Timestamp;
1718
1957
  leftAt?: Timestamp;
@@ -1746,30 +1985,30 @@ interface Thread {
1746
1985
  * - 'intercepted': Auto-recorded from map/send with mail meta
1747
1986
  */
1748
1987
  type TurnSource = {
1749
- type: 'explicit';
1750
- method: 'mail/turn';
1988
+ type: "explicit";
1989
+ method: "mail/turn";
1751
1990
  } | {
1752
- type: 'intercepted';
1991
+ type: "intercepted";
1753
1992
  messageId: MessageId;
1754
1993
  };
1755
1994
  /**
1756
1995
  * Visibility of a turn within a conversation.
1757
1996
  */
1758
1997
  type TurnVisibility = {
1759
- type: 'all';
1998
+ type: "all";
1760
1999
  } | {
1761
- type: 'participants';
2000
+ type: "participants";
1762
2001
  ids: ParticipantId[];
1763
2002
  } | {
1764
- type: 'role';
2003
+ type: "role";
1765
2004
  roles: ParticipantRole[];
1766
2005
  } | {
1767
- type: 'private';
2006
+ type: "private";
1768
2007
  };
1769
2008
  /**
1770
2009
  * Status of a turn's content lifecycle.
1771
2010
  */
1772
- type TurnStatus = 'pending' | 'streaming' | 'complete' | 'failed';
2011
+ type TurnStatus = "pending" | "streaming" | "complete" | "failed";
1773
2012
  /**
1774
2013
  * A turn - the atomic unit of conversation.
1775
2014
  * Records what a participant intentionally communicates.
@@ -1884,7 +2123,7 @@ interface MailCreateRequestParams {
1884
2123
  _meta?: Meta;
1885
2124
  }
1886
2125
  interface MailCreateRequest extends MAPRequestBase<MailCreateRequestParams> {
1887
- method: 'mail/create';
2126
+ method: "mail/create";
1888
2127
  params: MailCreateRequestParams;
1889
2128
  }
1890
2129
  interface MailCreateResponseResult {
@@ -1904,7 +2143,7 @@ interface MailGetRequestParams {
1904
2143
  _meta?: Meta;
1905
2144
  }
1906
2145
  interface MailGetRequest extends MAPRequestBase<MailGetRequestParams> {
1907
- method: 'mail/get';
2146
+ method: "mail/get";
1908
2147
  params: MailGetRequestParams;
1909
2148
  }
1910
2149
  interface MailGetResponseResult {
@@ -1934,7 +2173,7 @@ interface MailListRequestParams {
1934
2173
  _meta?: Meta;
1935
2174
  }
1936
2175
  interface MailListRequest extends MAPRequestBase<MailListRequestParams> {
1937
- method: 'mail/list';
2176
+ method: "mail/list";
1938
2177
  params?: MailListRequestParams;
1939
2178
  }
1940
2179
  interface MailListResponseResult {
@@ -1949,7 +2188,7 @@ interface MailCloseRequestParams {
1949
2188
  _meta?: Meta;
1950
2189
  }
1951
2190
  interface MailCloseRequest extends MAPRequestBase<MailCloseRequestParams> {
1952
- method: 'mail/close';
2191
+ method: "mail/close";
1953
2192
  params: MailCloseRequestParams;
1954
2193
  }
1955
2194
  interface MailCloseResponseResult {
@@ -1967,7 +2206,7 @@ interface MailJoinRequestParams {
1967
2206
  _meta?: Meta;
1968
2207
  }
1969
2208
  interface MailJoinRequest extends MAPRequestBase<MailJoinRequestParams> {
1970
- method: 'mail/join';
2209
+ method: "mail/join";
1971
2210
  params: MailJoinRequestParams;
1972
2211
  }
1973
2212
  interface MailJoinResponseResult {
@@ -1984,7 +2223,7 @@ interface MailLeaveRequestParams {
1984
2223
  _meta?: Meta;
1985
2224
  }
1986
2225
  interface MailLeaveRequest extends MAPRequestBase<MailLeaveRequestParams> {
1987
- method: 'mail/leave';
2226
+ method: "mail/leave";
1988
2227
  params: MailLeaveRequestParams;
1989
2228
  }
1990
2229
  interface MailLeaveResponseResult {
@@ -2003,7 +2242,7 @@ interface MailInviteRequestParams {
2003
2242
  _meta?: Meta;
2004
2243
  }
2005
2244
  interface MailInviteRequest extends MAPRequestBase<MailInviteRequestParams> {
2006
- method: 'mail/invite';
2245
+ method: "mail/invite";
2007
2246
  params: MailInviteRequestParams;
2008
2247
  }
2009
2248
  interface MailInviteResponseResult {
@@ -2024,7 +2263,7 @@ interface MailTurnRequestParams {
2024
2263
  _meta?: Meta;
2025
2264
  }
2026
2265
  interface MailTurnRequest extends MAPRequestBase<MailTurnRequestParams> {
2027
- method: 'mail/turn';
2266
+ method: "mail/turn";
2028
2267
  params: MailTurnRequestParams;
2029
2268
  }
2030
2269
  interface MailTurnResponseResult {
@@ -2044,11 +2283,11 @@ interface MailTurnsListRequestParams {
2044
2283
  beforeTimestamp?: Timestamp;
2045
2284
  };
2046
2285
  limit?: number;
2047
- order?: 'asc' | 'desc';
2286
+ order?: "asc" | "desc";
2048
2287
  _meta?: Meta;
2049
2288
  }
2050
2289
  interface MailTurnsListRequest extends MAPRequestBase<MailTurnsListRequestParams> {
2051
- method: 'mail/turns/list';
2290
+ method: "mail/turns/list";
2052
2291
  params: MailTurnsListRequestParams;
2053
2292
  }
2054
2293
  interface MailTurnsListResponseResult {
@@ -2065,7 +2304,7 @@ interface MailThreadCreateRequestParams {
2065
2304
  _meta?: Meta;
2066
2305
  }
2067
2306
  interface MailThreadCreateRequest extends MAPRequestBase<MailThreadCreateRequestParams> {
2068
- method: 'mail/thread/create';
2307
+ method: "mail/thread/create";
2069
2308
  params: MailThreadCreateRequestParams;
2070
2309
  }
2071
2310
  interface MailThreadCreateResponseResult {
@@ -2080,7 +2319,7 @@ interface MailThreadListRequestParams {
2080
2319
  _meta?: Meta;
2081
2320
  }
2082
2321
  interface MailThreadListRequest extends MAPRequestBase<MailThreadListRequestParams> {
2083
- method: 'mail/thread/list';
2322
+ method: "mail/thread/list";
2084
2323
  params?: MailThreadListRequestParams;
2085
2324
  }
2086
2325
  interface MailThreadListResponseResult {
@@ -2106,7 +2345,7 @@ interface MailSummaryRequestParams {
2106
2345
  _meta?: Meta;
2107
2346
  }
2108
2347
  interface MailSummaryRequest extends MAPRequestBase<MailSummaryRequestParams> {
2109
- method: 'mail/summary';
2348
+ method: "mail/summary";
2110
2349
  params: MailSummaryRequestParams;
2111
2350
  }
2112
2351
  interface MailSummaryResponseResult {
@@ -2128,7 +2367,7 @@ interface MailReplayRequestParams {
2128
2367
  _meta?: Meta;
2129
2368
  }
2130
2369
  interface MailReplayRequest extends MAPRequestBase<MailReplayRequestParams> {
2131
- method: 'mail/replay';
2370
+ method: "mail/replay";
2132
2371
  params: MailReplayRequestParams;
2133
2372
  }
2134
2373
  interface MailReplayResponseResult {
@@ -2138,6 +2377,63 @@ interface MailReplayResponseResult {
2138
2377
  missedCount: number;
2139
2378
  _meta?: Meta;
2140
2379
  }
2380
+ interface WorkspaceSearchRequestParams {
2381
+ /** Agent whose workspace to search */
2382
+ agentId: AgentId;
2383
+ /** Search query (matched against filenames) */
2384
+ query: string;
2385
+ /** Subdirectory to search within (relative to workspace root) */
2386
+ cwd?: string;
2387
+ /** Max results to return (default 50) */
2388
+ limit?: number;
2389
+ _meta?: Meta;
2390
+ }
2391
+ interface WorkspaceFileResult {
2392
+ /** Relative path from workspace root */
2393
+ path: string;
2394
+ /** Whether this is a directory */
2395
+ isDirectory: boolean;
2396
+ /** File size in bytes (undefined for directories) */
2397
+ size?: number;
2398
+ /** MIME type guess based on extension */
2399
+ mime?: string;
2400
+ }
2401
+ interface WorkspaceSearchResponseResult {
2402
+ files: WorkspaceFileResult[];
2403
+ _meta?: Meta;
2404
+ }
2405
+ interface WorkspaceListRequestParams {
2406
+ /** Agent whose workspace to list */
2407
+ agentId: AgentId;
2408
+ /** Directory to list (relative to workspace root, default ".") */
2409
+ directory?: string;
2410
+ _meta?: Meta;
2411
+ }
2412
+ interface WorkspaceListResponseResult {
2413
+ files: WorkspaceFileResult[];
2414
+ _meta?: Meta;
2415
+ }
2416
+ interface WorkspaceReadRequestParams {
2417
+ /** Agent whose workspace to read from */
2418
+ agentId: AgentId;
2419
+ /** File path relative to workspace root */
2420
+ path: string;
2421
+ /** Optional line range */
2422
+ lineRange?: {
2423
+ start: number;
2424
+ end: number;
2425
+ };
2426
+ _meta?: Meta;
2427
+ }
2428
+ interface WorkspaceReadResponseResult {
2429
+ /** File text content */
2430
+ text: string;
2431
+ /** MIME type */
2432
+ mime: string;
2433
+ /** File size in bytes */
2434
+ size: number;
2435
+ _meta?: Meta;
2436
+ }
2141
2437
  /**
2142
2438
  * Parameters for event notifications delivered to subscribers.
2143
2439
  *
@@ -2186,7 +2482,7 @@ interface EventNotificationParams {
2186
2482
  _meta?: Meta;
2187
2483
  }
2188
2484
  interface EventNotification extends MAPNotificationBase<EventNotificationParams> {
2189
- method: 'map/event';
2485
+ method: "map/event";
2190
2486
  params: EventNotificationParams;
2191
2487
  }
2192
2488
  interface MessageNotificationParams {
@@ -2194,7 +2490,7 @@ interface MessageNotificationParams {
2194
2490
  _meta?: Meta;
2195
2491
  }
2196
2492
  interface MessageNotification extends MAPNotificationBase<MessageNotificationParams> {
2197
- method: 'map/message';
2493
+ method: "map/message";
2198
2494
  params: MessageNotificationParams;
2199
2495
  }
2200
2496
  /** All MAP request types */
@@ -2279,6 +2575,12 @@ declare const MAIL_METHODS: {
2279
2575
  readonly MAIL_SUMMARY: "mail/summary";
2280
2576
  readonly MAIL_REPLAY: "mail/replay";
2281
2577
  };
2578
+ /** Workspace methods */
2579
+ declare const WORKSPACE_METHODS: {
2580
+ readonly WORKSPACE_SEARCH: "workspace/search";
2581
+ readonly WORKSPACE_LIST: "workspace/list";
2582
+ readonly WORKSPACE_READ: "workspace/read";
2583
+ };
2282
2584
  /** Notification methods */
2283
2585
  declare const NOTIFICATION_METHODS: {
2284
2586
  readonly EVENT: "map/event";
@@ -2290,6 +2592,9 @@ declare const NOTIFICATION_METHODS: {
2290
2592
  };
2291
2593
  /** All MAP methods */
2292
2594
  declare const MAP_METHODS: {
2595
+ readonly WORKSPACE_SEARCH: "workspace/search";
2596
+ readonly WORKSPACE_LIST: "workspace/list";
2597
+ readonly WORKSPACE_READ: "workspace/read";
2293
2598
  readonly MAIL_CREATE: "mail/create";
2294
2599
  readonly MAIL_GET: "mail/get";
2295
2600
  readonly MAIL_LIST: "mail/list";
@@ -2405,6 +2710,10 @@ declare const FEDERATION_ERROR_CODES: {
2405
2710
  readonly FEDERATION_LOOP_DETECTED: 5010;
2406
2711
  /** Message exceeded maximum hop count */
2407
2712
  readonly FEDERATION_MAX_HOPS_EXCEEDED: 5011;
2713
+ /** DID document resolution failed (network error, invalid document, etc.) */
2714
+ readonly FEDERATION_DID_RESOLUTION_FAILED: 5004;
2715
+ /** DID proof verification failed (bad signature, expired, wrong challenge, etc.) */
2716
+ readonly FEDERATION_DID_PROOF_INVALID: 5005;
2408
2717
  };
2409
2718
  /** Mail error codes - prefixed to avoid collision with PERMISSION_DENIED */
2410
2719
  declare const MAIL_ERROR_CODES: {
@@ -2441,6 +2750,10 @@ declare const ERROR_CODES: {
2441
2750
  readonly FEDERATION_LOOP_DETECTED: 5010;
2442
2751
  /** Message exceeded maximum hop count */
2443
2752
  readonly FEDERATION_MAX_HOPS_EXCEEDED: 5011;
2753
+ /** DID document resolution failed (network error, invalid document, etc.) */
2754
+ readonly FEDERATION_DID_RESOLUTION_FAILED: 5004;
2755
+ /** DID proof verification failed (bad signature, expired, wrong challenge, etc.) */
2756
+ readonly FEDERATION_DID_PROOF_INVALID: 5005;
2444
2757
  readonly EXHAUSTED: 4000;
2445
2758
  readonly RATE_LIMITED: 4001;
2446
2759
  readonly QUOTA_EXCEEDED: 4002;
@@ -4620,6 +4933,27 @@ declare class ClientConnection {
4620
4933
  resumed: boolean;
4621
4934
  agent?: Agent;
4622
4935
  }>;
4936
+ /**
4937
+ * Call a server extension method directly via JSON-RPC.
4938
+ *
4939
+ * Extension methods (prefixed with `_macro/` or similar) are registered on the
4940
+ * server's RPC handler and callable as standard JSON-RPC methods. This bypasses
4941
+ * ACP-over-MAP messaging — use this for simple request/response operations that
4942
+ * don't need ACP session semantics.
4943
+ *
4944
+ * @param method - The extension method name (e.g., "_macro/workspace/files/search")
4945
+ * @param params - Parameters to pass to the extension method
4946
+ * @returns The result from the extension method
4947
+ *
4948
+ * @example
4949
+ * ```typescript
4950
+ * const result = await client.callExtension('_macro/workspace/files/search', {
4951
+ * agentId: 'agent-1',
4952
+ * query: 'app.tsx',
4953
+ * });
4954
+ * ```
4955
+ */
4956
+ callExtension<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
4623
4957
  /**
4624
4958
  * Create a new mail conversation.
4625
4959
  *
@@ -5724,4 +6058,4 @@ declare function canAgentMessageAgent(senderAgent: Agent, targetAgentId: AgentId
5724
6058
  sharedScopes?: ScopeId[];
5725
6059
  }, config?: AgentPermissionConfig): boolean;
5726
6060
 
5727
- export { type ACPReadTextFileRequest as $, type AgentId as A, type BaseConnectionOptions as B, type ConnectResponseResult as C, type DisconnectResponseResult as D, type ErrorCategory as E, type FederationBufferConfig as F, type ScopesJoinResponseResult as G, type ScopesLeaveResponseResult as H, type ScopesListResponseResult as I, type MessageId as J, type SendResponseResult as K, type SubscriptionId as L, type MAPError as M, type SubscribeResponseResult as N, type AgentVisibility as O, type ParticipantCapabilities as P, type ScopeVisibility as Q, type RequestId as R, type Stream as S, type AgentState as T, type UnsubscribeResponseResult as U, type MessageMeta as V, AgentConnection as W, type ACPAgentHandler as X, type ACPSessionNotification as Y, type ACPRequestPermissionRequest as Z, type ACPRequestPermissionResponse as _, type MAPErrorData as a, type ACPPlan as a$, type ACPReadTextFileResponse as a0, type ACPWriteTextFileRequest as a1, type ACPWriteTextFileResponse as a2, type ACPCreateTerminalRequest as a3, type ACPCreateTerminalResponse as a4, type ACPTerminalOutputRequest as a5, type ACPTerminalOutputResponse as a6, type ACPReleaseTerminalRequest as a7, type ACPReleaseTerminalResponse as a8, type ACPWaitForTerminalExitRequest as a9, type ACPEnvVariable as aA, type ACPEnvelope as aB, ACPError as aC, type ACPErrorCode as aD, type ACPErrorObject as aE, type ACPErrorResponse as aF, type ACPFileSystemCapability as aG, type ACPHttpHeader as aH, type ACPImageContent as aI, type ACPImplementation as aJ, type ACPInitializeRequest as aK, type ACPInitializeResponse as aL, type ACPLoadSessionRequest as aM, type ACPLoadSessionResponse as aN, type ACPMcpCapabilities as aO, type ACPMcpServer as aP, type ACPMcpServerHttp as aQ, type ACPMcpServerSse as aR, type ACPMcpServerStdio as aS, type ACPMessage as aT, type ACPMeta as aU, type ACPNewSessionRequest as aV, type ACPNewSessionResponse as aW, type ACPNotification as aX, type ACPPermissionOption as aY, type ACPPermissionOptionId as aZ, type ACPPermissionOptionKind as a_, type ACPWaitForTerminalExitResponse as aa, type ACPKillTerminalCommandRequest as ab, type ACPKillTerminalCommandResponse as ac, type ACPSessionId as ad, type ACPAgentCapabilities as ae, type ACPAgentContext as af, type ACPAnnotations as ag, type ACPAudioContent as ah, type ACPAuthMethod as ai, type ACPAuthenticateRequest as aj, type ACPAuthenticateResponse as ak, type ACPAvailableCommand as al, type ACPAvailableCommandsUpdate as am, type ACPBlobResourceContents as an, type ACPCancelNotification as ao, type ACPCancelledPermissionOutcome as ap, type ACPCapability as aq, type ACPClientCapabilities as ar, type ACPClientHandlers as as, type ACPContent as at, type ACPContentBlock as au, type ACPContentChunk as av, type ACPContext as aw, type ACPCurrentModeUpdate as ax, type ACPDiff as ay, type ACPEmbeddedResource as az, type FederationEnvelope as b, type AgentsListFilter as b$, type ACPPlanEntry as b0, type ACPPlanEntryPriority as b1, type ACPPlanEntryStatus as b2, type ACPPromptCapabilities as b3, type ACPPromptRequest as b4, type ACPPromptResponse as b5, type ACPProtocolVersion as b6, type ACPRequest as b7, type ACPRequestId as b8, type ACPRequestPermissionOutcome as b9, type ACPToolCallUpdate as bA, type ACPToolKind as bB, ACP_ERROR_CODES as bC, ACP_METHODS as bD, ACP_PROTOCOL_VERSION as bE, AGENT_ERROR_CODES as bF, AUTH_ERROR_CODES as bG, AUTH_METHODS as bH, type AcceptanceContext as bI, type AgentAcceptanceRule as bJ, type AgentConnectOptions as bK, type AgentConnectionOptions as bL, type AgentIncludeOptions as bM, type AgentLifecycle as bN, type AgentMeshConnectOptions as bO, type AgentMessagingRule as bP, type AgentPermissionConfig as bQ, type AgentPermissions as bR, type AgentReconnectionEventHandler as bS, type AgentReconnectionEventType as bT, type AgentReconnectionOptions as bU, type AgentRelationship as bV, type AgentRelationshipType as bW, type AgentVisibilityRule as bX, type AgenticMeshStreamConfig as bY, type AgentsGetRequest as bZ, type AgentsGetRequestParams as b_, type ACPResourceLink as ba, type ACPResponse as bb, type ACPRole as bc, type ACPSelectedPermissionOutcome as bd, type ACPSessionCapabilities as be, type ACPSessionInfoUpdate as bf, type ACPSessionMode as bg, type ACPSessionModeId as bh, type ACPSessionModeState as bi, type ACPSessionUpdate as bj, type ACPSetSessionModeRequest as bk, type ACPSetSessionModeResponse as bl, type ACPStopReason as bm, ACPStreamConnection as bn, type ACPStreamEvents as bo, type ACPStreamOptions as bp, type ACPSuccessResponse as bq, type ACPTerminal as br, type ACPTerminalExitStatus as bs, type ACPTextContent as bt, type ACPTextResourceContents as bu, type ACPToolCall as bv, type ACPToolCallContent as bw, type ACPToolCallId as bx, type ACPToolCallLocation as by, type ACPToolCallStatus as bz, type Message as c, type FederatedAddress as c$, type AgentsListRequest as c0, type AgentsListRequestParams as c1, type AgentsRegisterRequest as c2, type AgentsRegisterRequestParams as c3, type AgentsResumeRequest as c4, type AgentsResumeRequestParams as c5, type AgentsResumeResponseResult as c6, type AgentsSpawnRequest as c7, type AgentsSpawnRequestParams as c8, type AgentsStopRequest as c9, type ClientAcceptanceRule as cA, type ClientConnectOptions as cB, ClientConnection as cC, type ClientConnectionOptions as cD, type ConnectRequest as cE, type ConnectRequestParams as cF, type Conversation as cG, type ConversationId as cH, type ConversationParticipant as cI, type ConversationPermissions as cJ, type ConversationStatus as cK, type ConversationType as cL, type CorrelationId as cM, DEFAULT_AGENT_PERMISSION_CONFIG as cN, type DeliverySemantics as cO, type DirectAddress as cP, type DisconnectPolicy as cQ, type DisconnectRequest as cR, type DisconnectRequestParams as cS, ERROR_CODES as cT, EVENT_TYPES as cU, EXTENSION_METHODS as cV, type EventInput as cW, type EventNotification as cX, type EventNotificationParams as cY, FEDERATION_ERROR_CODES as cZ, FEDERATION_METHODS as c_, type AgentsStopRequestParams as ca, type AgentsStopResponseResult as cb, type AgentsSuspendRequest as cc, type AgentsSuspendRequestParams as cd, type AgentsSuspendResponseResult as ce, type AgentsUnregisterRequest as cf, type AgentsUnregisterRequestParams as cg, type AgentsUpdateRequest as ch, type AgentsUpdateRequestParams as ci, type AnyMessage as cj, type AuthCredentials as ck, type AuthError as cl, type AuthErrorCode as cm, type AuthMethod as cn, type AuthPrincipal as co, type AuthRefreshRequest as cp, type AuthRefreshRequestParams as cq, type AuthRefreshResponseResult as cr, type AuthResult as cs, type AuthenticateRequest as ct, type AuthenticateRequestParams as cu, type AuthenticateResponseResult as cv, BaseConnection as cw, type BroadcastAddress as cx, CAPABILITY_REQUIREMENTS as cy, CORE_METHODS as cz, type FederationRoutingConfig as d, type MailSummaryRequest as d$, type FederationAuth as d0, type FederationConnectRequest as d1, type FederationConnectRequestParams as d2, type FederationMetadata as d3, type FederationReplayConfig as d4, type FederationRouteRequest as d5, type FederationRouteRequestParams as d6, type GatewayReconnectionEvent as d7, type GatewayReconnectionEventHandler as d8, type GatewayReconnectionEventType as d9, type MailCreateRequest as dA, type MailCreateRequestParams as dB, type MailCreateResponseResult as dC, type MailCreatedEventData as dD, type MailGetRequest as dE, type MailGetRequestParams as dF, type MailGetResponseResult as dG, type MailInviteRequest as dH, type MailInviteRequestParams as dI, type MailInviteResponseResult as dJ, type MailJoinRequest as dK, type MailJoinRequestParams as dL, type MailJoinResponseResult as dM, type MailLeaveRequest as dN, type MailLeaveRequestParams as dO, type MailLeaveResponseResult as dP, type MailListRequest as dQ, type MailListRequestParams as dR, type MailListResponseResult as dS, type MailMessageMeta as dT, type MailParticipantJoinedEventData as dU, type MailParticipantLeftEventData as dV, type MailReplayRequest as dW, type MailReplayRequestParams as dX, type MailReplayResponseResult as dY, type MailSubscriptionFilter as dZ, type MailSummaryGeneratedEventData as d_, type GatewayReconnectionOptions as da, type GraphEdge as db, type HierarchicalAddress as dc, type InjectDelivery as dd, type InjectDeliveryResult as de, type InjectRequest as df, type InjectRequestParams as dg, type InjectResponseResult as dh, JSONRPC_VERSION as di, type JoinPolicy as dj, LIFECYCLE_METHODS as dk, MAIL_ERROR_CODES as dl, MAIL_METHODS as dm, type MAPNotification as dn, type MAPNotificationBase as dp, type MAPRequest as dq, type MAPRequestBase as dr, type MAPResponse as ds, type MAPResponseError as dt, type MAPResponseSuccess as du, MAP_METHODS as dv, type MailCloseRequest as dw, type MailCloseRequestParams as dx, type MailCloseResponseResult as dy, type MailClosedEventData as dz, type EventType as e, SCOPE_METHODS as e$, type MailSummaryRequestParams as e0, type MailSummaryResponseResult as e1, type MailThreadCreateRequest as e2, type MailThreadCreateRequestParams as e3, type MailThreadCreateResponseResult as e4, type MailThreadCreatedEventData as e5, type MailThreadListRequest as e6, type MailThreadListRequestParams as e7, type MailThreadListResponseResult as e8, type MailTurnAddedEventData as e9, PERMISSION_METHODS as eA, PROTOCOL_ERROR_CODES as eB, PROTOCOL_VERSION as eC, type Participant as eD, type ParticipantAddress as eE, type ParticipantRole as eF, type PermissionAction as eG, type PermissionContext as eH, type PermissionParticipant as eI, type PermissionResult as eJ, type PermissionSystemConfig as eK, type PermissionsAgentUpdatedEventData as eL, type PermissionsClientUpdatedEventData as eM, type PermissionsUpdateRequest as eN, type PermissionsUpdateRequestParams as eO, type PermissionsUpdateResponseResult as eP, RESOURCE_ERROR_CODES as eQ, ROUTING_ERROR_CODES as eR, type ReconnectionEventHandler as eS, type ReconnectionEventType as eT, type ReconnectionOptions as eU, type ReplayRequest as eV, type ReplayRequestParams as eW, type ReplayResponseResult as eX, type ReplayedEvent as eY, type RequestHandler as eZ, type RoleAddress as e_, type MailTurnRequest as ea, type MailTurnRequestParams as eb, type MailTurnResponseResult as ec, type MailTurnUpdatedEventData as ed, type MailTurnsListRequest as ee, type MailTurnsListRequestParams as ef, type MailTurnsListResponseResult as eg, type MeshConnectOptions as eh, type MeshPeerEndpoint as ei, type MeshTransportAdapter as ej, type MessageDeliveredEventData as ek, type MessageFailedEventData as el, type MessageHandler as em, type MessageNotification as en, type MessageNotificationParams as eo, type MessagePriority as ep, type MessageRelationship as eq, type MessageSentEventData as er, type MessageVisibility as es, type Meta as et, type MultiAddress as eu, NOTIFICATION_METHODS as ev, type NotificationHandler as ew, OBSERVATION_METHODS as ex, type OverflowHandler as ey, type OverflowInfo as ez, type SessionId as f, type UnsubscribeRequestParams as f$, SESSION_METHODS as f0, STATE_METHODS as f1, STEERING_METHODS as f2, STRUCTURE_METHODS as f3, type ScopeAddress as f4, type ScopeMessagingRule as f5, type ScopeVisibilityRule as f6, type ScopesCreateRequest as f7, type ScopesCreateRequestParams as f8, type ScopesDeleteRequest as f9, type SessionLoadResponseResult as fA, type StandardAuthMethod as fB, type StateChangeHandler as fC, type StreamingCapabilities as fD, type StructureGraphRequest as fE, type StructureGraphRequestParams as fF, type StructureGraphResponseResult as fG, type StructureVisibilityRule as fH, type SubscribeRequest as fI, type SubscribeRequestParams as fJ, Subscription as fK, type SubscriptionAckNotification as fL, type SubscriptionAckParams as fM, type SubscriptionOptions$1 as fN, type SubscriptionState as fO, type SystemAcceptanceRule as fP, type SystemAddress as fQ, type Thread as fR, type ThreadId as fS, type Timestamp as fT, type TransportType as fU, type Turn as fV, type TurnId as fW, type TurnSource as fX, type TurnStatus as fY, type TurnVisibility as fZ, type UnsubscribeRequest as f_, type ScopesDeleteRequestParams as fa, type ScopesDeleteResponseResult as fb, type ScopesGetRequest as fc, type ScopesGetRequestParams as fd, type ScopesGetResponseResult as fe, type ScopesJoinRequest as ff, type ScopesJoinRequestParams as fg, type ScopesLeaveRequest as fh, type ScopesLeaveRequestParams as fi, type ScopesListRequest as fj, type ScopesListRequestParams as fk, type ScopesMembersRequest as fl, type ScopesMembersRequestParams as fm, type ScopesMembersResponseResult as fn, type SendPolicy as fo, type SendRequest as fp, type SendRequestParams as fq, type ServerAuthCapabilities as fr, type SessionCloseRequest as fs, type SessionCloseRequestParams as ft, type SessionCloseResponseResult as fu, type SessionListRequest as fv, type SessionListRequestParams as fw, type SessionListResponseResult as fx, type SessionLoadRequest as fy, type SessionLoadRequestParams as fz, type FederationConnectResponseResult as g, agenticMeshStream as g0, canAgentAcceptMessage as g1, canAgentMessageAgent as g2, canAgentSeeAgent as g3, canControlAgent as g4, canJoinScope as g5, canMessageAgent as g6, canPerformAction as g7, canPerformMethod as g8, canSeeAgent as g9, mapVisibilityToRule as gA, ndJsonStream as gB, resolveAgentPermissions as gC, waitForOpen as gD, websocketStream as gE, type SystemExposure as gF, canSeeScope as ga, canSendToScope as gb, createACPStream as gc, createEvent as gd, createStreamPair as ge, createSubscription as gf, deepMergePermissions as gg, filterVisibleAgents as gh, filterVisibleEvents as gi, filterVisibleScopes as gj, hasCapability as gk, isACPEnvelope as gl, isACPErrorResponse as gm, isACPNotification as gn, isACPRequest as go, isACPResponse as gp, isACPSuccessResponse as gq, isAgentExposed as gr, isBroadcastAddress as gs, isDirectAddress as gt, isEventTypeExposed as gu, isFederatedAddress as gv, isHierarchicalAddress as gw, isOrphanedAgent as gx, isScopeExposed as gy, isSuccessResponse as gz, type FederationRouteResponseResult as h, type ConnectionState as i, type ParticipantId as j, type ParticipantType as k, type ScopeId as l, type Agent as m, type Scope as n, type Address as o, type SubscriptionFilter as p, type Event as q, type AgentsGetResponseResult as r, type AgentsListResponseResult as s, type AgentsRegisterResponseResult as t, type AgentsSpawnResponseResult as u, type AgentsUnregisterResponseResult as v, type AgentsUpdateResponseResult as w, type ProtocolVersion as x, type SessionInfo as y, type ScopesCreateResponseResult as z };
6061
+ export { type ACPRequestPermissionResponse as $, type AgentId as A, type BaseConnectionOptions as B, type ConnectResponseResult as C, type DisconnectResponseResult as D, type ErrorCategory as E, type FederationBufferConfig as F, type ScopesCreateResponseResult as G, type ScopesJoinResponseResult as H, type ScopesLeaveResponseResult as I, type ScopesListResponseResult as J, type MessageId as K, type SendResponseResult as L, type MAPError as M, type SubscriptionId as N, type SubscribeResponseResult as O, type ParticipantCapabilities as P, type AgentVisibility as Q, type RequestId as R, type Stream as S, type ScopeVisibility as T, type UnsubscribeResponseResult as U, type AgentState as V, type MessageMeta as W, AgentConnection as X, type ACPAgentHandler as Y, type ACPSessionNotification as Z, type ACPRequestPermissionRequest as _, type MAPErrorData as a, type ACPPermissionOptionKind as a$, type ACPReadTextFileRequest as a0, type ACPReadTextFileResponse as a1, type ACPWriteTextFileRequest as a2, type ACPWriteTextFileResponse as a3, type ACPCreateTerminalRequest as a4, type ACPCreateTerminalResponse as a5, type ACPTerminalOutputRequest as a6, type ACPTerminalOutputResponse as a7, type ACPReleaseTerminalRequest as a8, type ACPReleaseTerminalResponse as a9, type ACPEmbeddedResource as aA, type ACPEnvVariable as aB, type ACPEnvelope as aC, ACPError as aD, type ACPErrorCode as aE, type ACPErrorObject as aF, type ACPErrorResponse as aG, type ACPFileSystemCapability as aH, type ACPHttpHeader as aI, type ACPImageContent as aJ, type ACPImplementation as aK, type ACPInitializeRequest as aL, type ACPInitializeResponse as aM, type ACPLoadSessionRequest as aN, type ACPLoadSessionResponse as aO, type ACPMcpCapabilities as aP, type ACPMcpServer as aQ, type ACPMcpServerHttp as aR, type ACPMcpServerSse as aS, type ACPMcpServerStdio as aT, type ACPMessage as aU, type ACPMeta as aV, type ACPNewSessionRequest as aW, type ACPNewSessionResponse as aX, type ACPNotification as aY, type ACPPermissionOption as aZ, type ACPPermissionOptionId as a_, type ACPWaitForTerminalExitRequest as aa, type ACPWaitForTerminalExitResponse as ab, type ACPKillTerminalCommandRequest as ac, type ACPKillTerminalCommandResponse as ad, type ACPSessionId as ae, type ACPAgentCapabilities as af, type ACPAgentContext as ag, type ACPAnnotations as ah, type ACPAudioContent as ai, type ACPAuthMethod as aj, type ACPAuthenticateRequest as ak, type ACPAuthenticateResponse as al, type ACPAvailableCommand as am, type ACPAvailableCommandsUpdate as an, type ACPBlobResourceContents as ao, type ACPCancelNotification as ap, type ACPCancelledPermissionOutcome as aq, type ACPCapability as ar, type ACPClientCapabilities as as, type ACPClientHandlers as at, type ACPContent as au, type ACPContentBlock as av, type ACPContentChunk as aw, type ACPContext as ax, type ACPCurrentModeUpdate as ay, type ACPDiff as az, type FederationEnvelope as b, type AgentsGetRequest as b$, type ACPPlan as b0, type ACPPlanEntry as b1, type ACPPlanEntryPriority as b2, type ACPPlanEntryStatus as b3, type ACPPromptCapabilities as b4, type ACPPromptRequest as b5, type ACPPromptResponse as b6, type ACPProtocolVersion as b7, type ACPRequest as b8, type ACPRequestId as b9, type ACPToolCallStatus as bA, type ACPToolCallUpdate as bB, type ACPToolKind as bC, ACP_ERROR_CODES as bD, ACP_METHODS as bE, ACP_PROTOCOL_VERSION as bF, AGENT_ERROR_CODES as bG, AUTH_ERROR_CODES as bH, AUTH_METHODS as bI, type AcceptanceContext as bJ, type AgentAcceptanceRule as bK, type AgentConnectOptions as bL, type AgentConnectionOptions as bM, type AgentEnvironment as bN, type AgentIncludeOptions as bO, type AgentLifecycle as bP, type AgentMeshConnectOptions as bQ, type AgentMessagingRule as bR, type AgentPermissionConfig as bS, type AgentPermissions as bT, type AgentReconnectionEventHandler as bU, type AgentReconnectionEventType as bV, type AgentReconnectionOptions as bW, type AgentRelationship as bX, type AgentRelationshipType as bY, type AgentVisibilityRule as bZ, type AgenticMeshStreamConfig as b_, type ACPRequestPermissionOutcome as ba, type ACPResourceLink as bb, type ACPResponse as bc, type ACPRole as bd, type ACPSelectedPermissionOutcome as be, type ACPSessionCapabilities as bf, type ACPSessionInfoUpdate as bg, type ACPSessionMode as bh, type ACPSessionModeId as bi, type ACPSessionModeState as bj, type ACPSessionUpdate as bk, type ACPSetSessionModeRequest as bl, type ACPSetSessionModeResponse as bm, type ACPStopReason as bn, ACPStreamConnection as bo, type ACPStreamEvents as bp, type ACPStreamOptions as bq, type ACPSuccessResponse as br, type ACPTerminal as bs, type ACPTerminalExitStatus as bt, type ACPTextContent as bu, type ACPTextResourceContents as bv, type ACPToolCall as bw, type ACPToolCallContent as bx, type ACPToolCallId as by, type ACPToolCallLocation as bz, type Message as c, EVENT_TYPES as c$, type AgentsGetRequestParams as c0, type AgentsListFilter as c1, type AgentsListRequest as c2, type AgentsListRequestParams as c3, type AgentsRegisterRequest as c4, type AgentsRegisterRequestParams as c5, type AgentsResumeRequest as c6, type AgentsResumeRequestParams as c7, type AgentsResumeResponseResult as c8, type AgentsSpawnRequest as c9, CAPABILITY_REQUIREMENTS as cA, CORE_METHODS as cB, type ClientAcceptanceRule as cC, type ClientConnectOptions as cD, ClientConnection as cE, type ClientConnectionOptions as cF, type ConnectRequest as cG, type ConnectRequestParams as cH, type Conversation as cI, type ConversationId as cJ, type ConversationParticipant as cK, type ConversationPermissions as cL, type ConversationStatus as cM, type ConversationType as cN, type CorrelationId as cO, DEFAULT_AGENT_PERMISSION_CONFIG as cP, type DIDDocument as cQ, type DIDService as cR, type DIDVerificationMethod as cS, type DIDWBACredentials as cT, type DIDWBAProof as cU, type DeliverySemantics as cV, type DirectAddress as cW, type DisconnectPolicy as cX, type DisconnectRequest as cY, type DisconnectRequestParams as cZ, ERROR_CODES as c_, type AgentsSpawnRequestParams as ca, type AgentsStopRequest as cb, type AgentsStopRequestParams as cc, type AgentsStopResponseResult as cd, type AgentsSuspendRequest as ce, type AgentsSuspendRequestParams as cf, type AgentsSuspendResponseResult as cg, type AgentsUnregisterRequest as ch, type AgentsUnregisterRequestParams as ci, type AgentsUpdateRequest as cj, type AgentsUpdateRequestParams as ck, type AnyMessage as cl, type AuthCredentials as cm, type AuthError as cn, type AuthErrorCode as co, type AuthMethod as cp, type AuthPrincipal as cq, type AuthRefreshRequest as cr, type AuthRefreshRequestParams as cs, type AuthRefreshResponseResult as ct, type AuthResult as cu, type AuthenticateRequest as cv, type AuthenticateRequestParams as cw, type AuthenticateResponseResult as cx, BaseConnection as cy, type BroadcastAddress as cz, type FederationRoutingConfig as d, type MailListRequest as d$, EXTENSION_METHODS as d0, type EventInput as d1, type EventNotification as d2, type EventNotificationParams as d3, FEDERATION_ERROR_CODES as d4, FEDERATION_METHODS as d5, type FederatedAddress as d6, type FederationAuthMethod as d7, type FederationConnectRequest as d8, type FederationConnectRequestParams as d9, type MAPNotificationBase as dA, type MAPRequest as dB, type MAPRequestBase as dC, type MAPResponse as dD, type MAPResponseError as dE, type MAPResponseSuccess as dF, MAP_METHODS as dG, type MailCloseRequest as dH, type MailCloseRequestParams as dI, type MailCloseResponseResult as dJ, type MailClosedEventData as dK, type MailCreateRequest as dL, type MailCreateRequestParams as dM, type MailCreateResponseResult as dN, type MailCreatedEventData as dO, type MailGetRequest as dP, type MailGetRequestParams as dQ, type MailGetResponseResult as dR, type MailInviteRequest as dS, type MailInviteRequestParams as dT, type MailInviteResponseResult as dU, type MailJoinRequest as dV, type MailJoinRequestParams as dW, type MailJoinResponseResult as dX, type MailLeaveRequest as dY, type MailLeaveRequestParams as dZ, type MailLeaveResponseResult as d_, type FederationMetadata as da, type FederationReplayConfig as db, type FederationRouteRequest as dc, type FederationRouteRequestParams as dd, type GatewayReconnectionEvent as de, type GatewayReconnectionEventHandler as df, type GatewayReconnectionEventType as dg, type GatewayReconnectionOptions as dh, type GraphEdge as di, type HierarchicalAddress as dj, type InjectDelivery as dk, type InjectDeliveryResult as dl, type InjectRequest as dm, type InjectRequestParams as dn, type InjectResponseResult as dp, JSONRPC_VERSION as dq, type JoinPolicy as dr, LIFECYCLE_METHODS as ds, MAIL_ERROR_CODES as dt, MAIL_METHODS as du, type MAPAgentCapabilityDescriptor as dv, type MAPCapabilityDeclaration as dw, type MAPFederationAuth as dx, type MAPInterfaceSpec as dy, type MAPNotification as dz, type EventType as e, RESOURCE_ERROR_CODES as e$, type MailListRequestParams as e0, type MailListResponseResult as e1, type MailMessageMeta as e2, type MailParticipantJoinedEventData as e3, type MailParticipantLeftEventData as e4, type MailReplayRequest as e5, type MailReplayRequestParams as e6, type MailReplayResponseResult as e7, type MailSubscriptionFilter as e8, type MailSummaryGeneratedEventData as e9, type MessagePriority as eA, type MessageRelationship as eB, type MessageSentEventData as eC, type MessageVisibility as eD, type Meta as eE, type MultiAddress as eF, NOTIFICATION_METHODS as eG, type NotificationHandler as eH, OBSERVATION_METHODS as eI, type OverflowHandler as eJ, type OverflowInfo as eK, PERMISSION_METHODS as eL, PROTOCOL_ERROR_CODES as eM, PROTOCOL_VERSION as eN, type Participant as eO, type ParticipantAddress as eP, type ParticipantRole as eQ, type PermissionAction as eR, type PermissionContext as eS, type PermissionParticipant as eT, type PermissionResult as eU, type PermissionSystemConfig as eV, type PermissionsAgentUpdatedEventData as eW, type PermissionsClientUpdatedEventData as eX, type PermissionsUpdateRequest as eY, type PermissionsUpdateRequestParams as eZ, type PermissionsUpdateResponseResult as e_, type MailSummaryRequest as ea, type MailSummaryRequestParams as eb, type MailSummaryResponseResult as ec, type MailThreadCreateRequest as ed, type MailThreadCreateRequestParams as ee, type MailThreadCreateResponseResult as ef, type MailThreadCreatedEventData as eg, type MailThreadListRequest as eh, type MailThreadListRequestParams as ei, type MailThreadListResponseResult as ej, type MailTurnAddedEventData as ek, type MailTurnRequest as el, type MailTurnRequestParams as em, type MailTurnResponseResult as en, type MailTurnUpdatedEventData as eo, type MailTurnsListRequest as ep, type MailTurnsListRequestParams as eq, type MailTurnsListResponseResult as er, type MeshConnectOptions as es, type MeshPeerEndpoint as et, type MeshTransportAdapter as eu, type MessageDeliveredEventData as ev, type MessageFailedEventData as ew, type MessageHandler as ex, type MessageNotification as ey, type MessageNotificationParams as ez, type SessionId as f, type SystemAddress as f$, ROUTING_ERROR_CODES as f0, type ReconnectionEventHandler as f1, type ReconnectionEventType as f2, type ReconnectionOptions as f3, type ReplayRequest as f4, type ReplayRequestParams as f5, type ReplayResponseResult as f6, type ReplayedEvent as f7, type RequestHandler as f8, type RoleAddress as f9, type SendRequest as fA, type SendRequestParams as fB, type ServerAuthCapabilities as fC, type SessionCloseRequest as fD, type SessionCloseRequestParams as fE, type SessionCloseResponseResult as fF, type SessionListRequest as fG, type SessionListRequestParams as fH, type SessionListResponseResult as fI, type SessionLoadRequest as fJ, type SessionLoadRequestParams as fK, type SessionLoadResponseResult as fL, type StandardAuthMethod as fM, type StateChangeHandler as fN, type StreamingCapabilities as fO, type StructureGraphRequest as fP, type StructureGraphRequestParams as fQ, type StructureGraphResponseResult as fR, type StructureVisibilityRule as fS, type SubscribeRequest as fT, type SubscribeRequestParams as fU, Subscription as fV, type SubscriptionAckNotification as fW, type SubscriptionAckParams as fX, type SubscriptionOptions$1 as fY, type SubscriptionState as fZ, type SystemAcceptanceRule as f_, SCOPE_METHODS as fa, SESSION_METHODS as fb, STATE_METHODS as fc, STEERING_METHODS as fd, STRUCTURE_METHODS as fe, type ScopeAddress as ff, type ScopeMessagingRule as fg, type ScopeVisibilityRule as fh, type ScopesCreateRequest as fi, type ScopesCreateRequestParams as fj, type ScopesDeleteRequest as fk, type ScopesDeleteRequestParams as fl, type ScopesDeleteResponseResult as fm, type ScopesGetRequest as fn, type ScopesGetRequestParams as fo, type ScopesGetResponseResult as fp, type ScopesJoinRequest as fq, type ScopesJoinRequestParams as fr, type ScopesLeaveRequest as fs, type ScopesLeaveRequestParams as ft, type ScopesListRequest as fu, type ScopesListRequestParams as fv, type ScopesMembersRequest as fw, type ScopesMembersRequestParams as fx, type ScopesMembersResponseResult as fy, type SendPolicy as fz, type FederationAuth as g, type Thread as g0, type ThreadId as g1, type Timestamp as g2, type TransportType as g3, type Turn as g4, type TurnId as g5, type TurnSource as g6, type TurnStatus as g7, type TurnVisibility as g8, type UnsubscribeRequest as g9, filterVisibleAgents as gA, filterVisibleEvents as gB, filterVisibleScopes as gC, hasCapability as gD, isACPEnvelope as gE, isACPErrorResponse as gF, isACPNotification as gG, isACPRequest as gH, isACPResponse as gI, isACPSuccessResponse as gJ, isAgentExposed as gK, isBroadcastAddress as gL, isDirectAddress as gM, isEventTypeExposed as gN, isFederatedAddress as gO, isHierarchicalAddress as gP, isOrphanedAgent as gQ, isScopeExposed as gR, isSuccessResponse as gS, mapVisibilityToRule as gT, ndJsonStream as gU, resolveAgentPermissions as gV, waitForOpen as gW, websocketStream as gX, type SystemExposure as gY, type UnsubscribeRequestParams as ga, WORKSPACE_METHODS as gb, type WorkspaceFileResult as gc, type WorkspaceListRequestParams as gd, type WorkspaceListResponseResult as ge, type WorkspaceReadRequestParams as gf, type WorkspaceReadResponseResult as gg, type WorkspaceSearchRequestParams as gh, type WorkspaceSearchResponseResult as gi, agenticMeshStream as gj, canAgentAcceptMessage as gk, canAgentMessageAgent as gl, canAgentSeeAgent as gm, canControlAgent as gn, canJoinScope as go, canMessageAgent as gp, canPerformAction as gq, canPerformMethod as gr, canSeeAgent as gs, canSeeScope as gt, canSendToScope as gu, createACPStream as gv, createEvent as gw, createStreamPair as gx, createSubscription as gy, deepMergePermissions as gz, type FederationConnectResponseResult as h, type FederationRouteResponseResult as i, type ConnectionState as j, type ParticipantId as k, type ParticipantType as l, type ScopeId as m, type Agent as n, type Scope as o, type Address as p, type SubscriptionFilter as q, type Event as r, type AgentsGetResponseResult as s, type AgentsListResponseResult as t, type AgentsRegisterResponseResult as u, type AgentsSpawnResponseResult as v, type AgentsUnregisterResponseResult as w, type AgentsUpdateResponseResult as x, type ProtocolVersion as y, type SessionInfo as z };