multi-agent-protocol 0.0.3 → 0.0.6

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.
@@ -61,7 +61,26 @@
61
61
  { "$ref": "#/$defs/AuthRefreshRequest" },
62
62
  { "$ref": "#/$defs/InjectRequest" },
63
63
  { "$ref": "#/$defs/FederationConnectRequest" },
64
- { "$ref": "#/$defs/FederationRouteRequest" }
64
+ { "$ref": "#/$defs/FederationRouteRequest" },
65
+ { "$ref": "#/$defs/MailCreateRequest" },
66
+ { "$ref": "#/$defs/MailGetRequest" },
67
+ { "$ref": "#/$defs/MailListRequest" },
68
+ { "$ref": "#/$defs/MailCloseRequest" },
69
+ { "$ref": "#/$defs/MailJoinRequest" },
70
+ { "$ref": "#/$defs/MailLeaveRequest" },
71
+ { "$ref": "#/$defs/MailInviteRequest" },
72
+ { "$ref": "#/$defs/MailTurnRequest" },
73
+ { "$ref": "#/$defs/MailTurnsListRequest" },
74
+ { "$ref": "#/$defs/MailThreadCreateRequest" },
75
+ { "$ref": "#/$defs/MailThreadListRequest" },
76
+ { "$ref": "#/$defs/MailSummaryRequest" },
77
+ { "$ref": "#/$defs/MailReplayRequest" },
78
+ { "$ref": "#/$defs/CredGetRequest" },
79
+ { "$ref": "#/$defs/CredListRequest" },
80
+ { "$ref": "#/$defs/CredStatusRequest" },
81
+ { "$ref": "#/$defs/WorkspaceSearchRequest" },
82
+ { "$ref": "#/$defs/WorkspaceListRequest" },
83
+ { "$ref": "#/$defs/WorkspaceReadRequest" }
65
84
  ]
66
85
  },
67
86
  "MAPResponse": {
@@ -151,6 +170,7 @@
151
170
  "agent",
152
171
  "resource",
153
172
  "federation",
173
+ "mail",
154
174
  "internal"
155
175
  ],
156
176
  "description": "Category of error for handling decisions"
@@ -280,6 +300,30 @@
280
300
  },
281
301
  "additionalProperties": false
282
302
  },
303
+ "mail": {
304
+ "type": "object",
305
+ "description": "Mail protocol capabilities for conversation/turn tracking",
306
+ "properties": {
307
+ "enabled": { "type": "boolean", "description": "Whether mail is enabled (server response only)" },
308
+ "canCreate": { "type": "boolean", "description": "Can create new conversations" },
309
+ "canJoin": { "type": "boolean", "description": "Can join existing conversations" },
310
+ "canInvite": { "type": "boolean", "description": "Can invite participants to conversations" },
311
+ "canViewHistory": { "type": "boolean", "description": "Can view conversation history" },
312
+ "canCreateThreads": { "type": "boolean", "description": "Can create threads within conversations" }
313
+ },
314
+ "additionalProperties": false
315
+ },
316
+ "credentials": {
317
+ "type": "object",
318
+ "description": "Credential brokering capabilities",
319
+ "properties": {
320
+ "enabled": { "type": "boolean", "description": "Whether credential brokering is enabled (server response only)" },
321
+ "canGet": { "type": "boolean", "description": "Can request credentials via cred/get" },
322
+ "canList": { "type": "boolean", "description": "Can list available scopes via cred/list" },
323
+ "canStatus": { "type": "boolean", "description": "Can check broker status via cred/status" }
324
+ },
325
+ "additionalProperties": false
326
+ },
283
327
  "_meta": { "$ref": "#/$defs/Meta" }
284
328
  },
285
329
  "additionalProperties": false
@@ -385,6 +429,8 @@
385
429
  "visibility": { "$ref": "#/$defs/AgentVisibility" },
386
430
  "lifecycle": { "$ref": "#/$defs/AgentLifecycle" },
387
431
  "capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
432
+ "capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
433
+ "environment": { "$ref": "#/$defs/AgentEnvironment" },
388
434
  "metadata": { "type": "object" },
389
435
  "_meta": { "$ref": "#/$defs/Meta" }
390
436
  },
@@ -392,6 +438,28 @@
392
438
  "additionalProperties": false
393
439
  },
394
440
 
441
+ "AgentEnvironment": {
442
+ "type": "object",
443
+ "description": "Compute environment information for an agent. Category names are normative; field conventions within categories are documented separately.",
444
+ "properties": {
445
+ "schemaVersion": { "type": "string", "description": "Schema version (e.g., '1.0')" },
446
+ "profiles": { "type": "array", "items": { "type": "string" }, "description": "Self-declared profile compliance" },
447
+ "host": { "type": "object", "additionalProperties": true, "description": "Host/machine info (arch, cpu, memory, gpu)" },
448
+ "os": { "type": "object", "additionalProperties": true, "description": "Operating system info (type, version)" },
449
+ "process": { "type": "object", "additionalProperties": true, "description": "Process/runtime info (pid, cwd, runtime)" },
450
+ "container": { "type": "object", "additionalProperties": true, "description": "Container info if containerized" },
451
+ "cloud": { "type": "object", "additionalProperties": true, "description": "Cloud provider info (provider, region)" },
452
+ "k8s": { "type": "object", "additionalProperties": true, "description": "Kubernetes info if in k8s" },
453
+ "filesystem": { "type": "object", "additionalProperties": true, "description": "Filesystem/workspace info (cwd, mounts, workspace)" },
454
+ "network": { "type": "object", "additionalProperties": true, "description": "Network info (connectivity, addresses)" },
455
+ "tools": { "type": "object", "additionalProperties": true, "description": "Available tools and runtimes" },
456
+ "resources": { "type": "object", "additionalProperties": true, "description": "Resource limits and constraints" },
457
+ "security": { "type": "object", "additionalProperties": true, "description": "Security/isolation context" },
458
+ "services": { "type": "object", "additionalProperties": true, "description": "External services and APIs (aiProviders, mcp)" }
459
+ },
460
+ "additionalProperties": true
461
+ },
462
+
395
463
  "Address": {
396
464
  "description": "Flexible addressing for any topology",
397
465
  "oneOf": [
@@ -580,6 +648,10 @@
580
648
  "type": "integer",
581
649
  "description": "Time-to-live in milliseconds"
582
650
  },
651
+ "mail": {
652
+ "$ref": "#/$defs/MailMessageMeta",
653
+ "description": "Mail turn tracking metadata. When present on map/send, an intercepted turn is recorded."
654
+ },
583
655
  "_meta": { "$ref": "#/$defs/Meta" }
584
656
  },
585
657
  "additionalProperties": false
@@ -660,6 +732,7 @@
660
732
  "enum": [
661
733
  "agent_registered",
662
734
  "agent_state_changed",
735
+ "agent_environment_changed",
663
736
  "agent_unregistered",
664
737
  "message_sent",
665
738
  "message_delivered",
@@ -670,7 +743,15 @@
670
743
  "scope_member_left",
671
744
  "system_error",
672
745
  "federation_connected",
673
- "federation_disconnected"
746
+ "federation_disconnected",
747
+ "mail.created",
748
+ "mail.closed",
749
+ "mail.participant.joined",
750
+ "mail.participant.left",
751
+ "mail.turn.added",
752
+ "mail.turn.updated",
753
+ "mail.thread.created",
754
+ "mail.summary.generated"
674
755
  ],
675
756
  "description": "Type of system event"
676
757
  },
@@ -725,6 +806,15 @@
725
806
  "items": { "$ref": "#/$defs/MessagePriority" },
726
807
  "description": "Only events with these priorities"
727
808
  },
809
+ "mail": {
810
+ "$ref": "#/$defs/MailSubscriptionFilter",
811
+ "description": "Mail-specific filter for conversation events"
812
+ },
813
+ "environmentMatch": {
814
+ "type": "object",
815
+ "description": "Filter by agent environment attributes (e.g., 'os.type', 'cloud.region', 'network.connectivity')",
816
+ "additionalProperties": true
817
+ },
728
818
  "_meta": { "$ref": "#/$defs/Meta" }
729
819
  },
730
820
  "additionalProperties": false
@@ -775,7 +865,10 @@
775
865
  "properties": {
776
866
  "method": {
777
867
  "type": "string",
778
- "enum": ["bearer", "api-key", "mtls", "none"]
868
+ "oneOf": [
869
+ { "enum": ["bearer", "api-key", "mtls", "none"] },
870
+ { "type": "string", "pattern": "^x-" }
871
+ ]
779
872
  },
780
873
  "token": { "type": "string" }
781
874
  }
@@ -802,6 +895,10 @@
802
895
  "version": { "type": "string" }
803
896
  }
804
897
  },
898
+ "serverEnvironment": {
899
+ "$ref": "#/$defs/AgentEnvironment",
900
+ "description": "Server's compute environment (if relevant)"
901
+ },
805
902
  "_meta": { "$ref": "#/$defs/Meta" }
806
903
  },
807
904
  "required": ["protocolVersion", "sessionId", "participantId", "capabilities"]
@@ -960,7 +1057,20 @@
960
1057
  "items": { "$ref": "#/$defs/ScopeId" }
961
1058
  },
962
1059
  "parent": { "$ref": "#/$defs/AgentId" },
963
- "hasChildren": { "type": "boolean" }
1060
+ "hasChildren": { "type": "boolean" },
1061
+ "capabilityId": {
1062
+ "type": "string",
1063
+ "description": "Filter by structured capability ID from capabilityDescriptor"
1064
+ },
1065
+ "tags": {
1066
+ "type": "array",
1067
+ "items": { "type": "string" },
1068
+ "description": "Filter by semantic tags from capabilityDescriptor"
1069
+ },
1070
+ "accepts": {
1071
+ "type": "string",
1072
+ "description": "Filter by accepted content type from capabilityDescriptor (MIME type)"
1073
+ }
964
1074
  }
965
1075
  },
966
1076
  "limit": { "type": "integer", "minimum": 1 },
@@ -1170,6 +1280,8 @@
1170
1280
  },
1171
1281
  "visibility": { "$ref": "#/$defs/AgentVisibility" },
1172
1282
  "capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
1283
+ "capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
1284
+ "environment": { "$ref": "#/$defs/AgentEnvironment" },
1173
1285
  "metadata": { "type": "object" },
1174
1286
  "_meta": { "$ref": "#/$defs/Meta" }
1175
1287
  }
@@ -1209,8 +1321,20 @@
1209
1321
  },
1210
1322
  "visibility": { "$ref": "#/$defs/AgentVisibility" },
1211
1323
  "capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
1324
+ "capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
1325
+ "environment": { "$ref": "#/$defs/AgentEnvironment" },
1212
1326
  "initialMessage": { "$ref": "#/$defs/Message" },
1213
1327
  "metadata": { "type": "object" },
1328
+ "requestedScopes": {
1329
+ "type": "array",
1330
+ "items": { "type": "string" },
1331
+ "description": "Scopes to request for the delegated credential (defaults to parent's scopes)"
1332
+ },
1333
+ "ttlMinutes": {
1334
+ "type": "integer",
1335
+ "minimum": 1,
1336
+ "description": "TTL in minutes for the delegated credential"
1337
+ },
1214
1338
  "_meta": { "$ref": "#/$defs/Meta" }
1215
1339
  }
1216
1340
  }
@@ -1223,6 +1347,20 @@
1223
1347
  "properties": {
1224
1348
  "agent": { "$ref": "#/$defs/Agent" },
1225
1349
  "messageId": { "$ref": "#/$defs/MessageId" },
1350
+ "delegatedCredentials": {
1351
+ "type": "object",
1352
+ "description": "Credentials delegated to the spawned child agent (when auth provider supports delegation)",
1353
+ "properties": {
1354
+ "method": { "type": "string", "description": "Auth method for the delegated credential" },
1355
+ "credentials": { "type": "object", "description": "The delegated credential data" },
1356
+ "env": {
1357
+ "type": "object",
1358
+ "additionalProperties": { "type": "string" },
1359
+ "description": "Environment variables for the child agent"
1360
+ }
1361
+ },
1362
+ "required": ["method", "credentials"]
1363
+ },
1226
1364
  "_meta": { "$ref": "#/$defs/Meta" }
1227
1365
  },
1228
1366
  "required": ["agent"]
@@ -1706,7 +1844,7 @@
1706
1844
  "type": "object",
1707
1845
  "x-method": "map/federation/connect",
1708
1846
  "x-tier": "extension",
1709
- "description": "Connect to a peer MAP system",
1847
+ "description": "Connect to a peer MAP system. Supports single-request auth: include auth inline to complete federation handshake in one round-trip.",
1710
1848
  "properties": {
1711
1849
  "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
1712
1850
  "id": { "$ref": "#/$defs/RequestId" },
@@ -1717,15 +1855,49 @@
1717
1855
  "systemId": { "type": "string" },
1718
1856
  "endpoint": { "type": "string", "format": "uri" },
1719
1857
  "auth": {
1858
+ "oneOf": [
1859
+ {
1860
+ "type": "object",
1861
+ "description": "Standard federation auth (bearer, api-key, mtls, etc.)",
1862
+ "properties": {
1863
+ "method": {
1864
+ "type": "string",
1865
+ "oneOf": [
1866
+ { "enum": ["bearer", "api-key", "mtls", "none", "did:wba", "oauth2"] },
1867
+ { "type": "string", "pattern": "^x-" }
1868
+ ]
1869
+ },
1870
+ "credentials": { "type": "string" }
1871
+ },
1872
+ "required": ["method"]
1873
+ },
1874
+ { "$ref": "#/$defs/DIDWBACredentials" }
1875
+ ]
1876
+ },
1877
+ "authContext": {
1720
1878
  "type": "object",
1879
+ "description": "Additional auth context for single-request federation auth",
1721
1880
  "properties": {
1722
- "method": {
1723
- "type": "string",
1724
- "enum": ["bearer", "api-key", "mtls"]
1725
- },
1726
- "credentials": { "type": "string" }
1727
- },
1728
- "required": ["method"]
1881
+ "challenge": { "type": "string", "description": "Challenge nonce for proof-based auth" }
1882
+ }
1883
+ },
1884
+ "systemInfo": {
1885
+ "type": "object",
1886
+ "description": "Connecting system's self-description",
1887
+ "properties": {
1888
+ "name": { "type": "string" },
1889
+ "version": { "type": "string" }
1890
+ }
1891
+ },
1892
+ "protocolVersion": { "type": "integer", "description": "MAP protocol version (default: 1)" },
1893
+ "exposure": {
1894
+ "type": "object",
1895
+ "description": "Which resources the connecting system exposes",
1896
+ "properties": {
1897
+ "agents": { "type": "boolean" },
1898
+ "scopes": { "type": "boolean" },
1899
+ "events": { "type": "boolean" }
1900
+ }
1729
1901
  },
1730
1902
  "_meta": { "$ref": "#/$defs/Meta" }
1731
1903
  },
@@ -1736,9 +1908,33 @@
1736
1908
  },
1737
1909
  "FederationConnectResponse": {
1738
1910
  "type": "object",
1739
- "description": "Response to map/federation/connect",
1911
+ "description": "Response to map/federation/connect. When single-request auth succeeds, includes sessionId and principal. When auth fails or is required, includes authRequired with supported methods and challenge.",
1740
1912
  "properties": {
1741
1913
  "connected": { "type": "boolean" },
1914
+ "sessionId": { "type": "string", "description": "Session ID assigned on successful auth" },
1915
+ "principal": {
1916
+ "type": "object",
1917
+ "description": "Authenticated principal (on successful auth)",
1918
+ "properties": {
1919
+ "id": { "type": "string" },
1920
+ "issuer": { "type": "string" },
1921
+ "claims": { "type": "object" }
1922
+ }
1923
+ },
1924
+ "authRequired": {
1925
+ "type": "object",
1926
+ "description": "Auth negotiation data (when auth is required or failed)",
1927
+ "properties": {
1928
+ "methods": {
1929
+ "type": "array",
1930
+ "items": { "type": "string" },
1931
+ "description": "Supported auth methods"
1932
+ },
1933
+ "challenge": { "type": "string", "description": "Challenge nonce for proof-based auth methods" },
1934
+ "required": { "type": "boolean", "description": "Whether authentication is required to proceed" }
1935
+ },
1936
+ "required": ["methods", "challenge"]
1937
+ },
1742
1938
  "systemInfo": {
1743
1939
  "type": "object",
1744
1940
  "properties": {
@@ -1823,6 +2019,1049 @@
1823
2019
  }
1824
2020
  },
1825
2021
  "required": ["jsonrpc", "method", "params"]
2022
+ },
2023
+
2024
+ "ConversationId": {
2025
+ "type": "string",
2026
+ "description": "Unique identifier for a conversation"
2027
+ },
2028
+ "TurnId": {
2029
+ "type": "string",
2030
+ "description": "Unique identifier for a turn"
2031
+ },
2032
+ "ThreadId": {
2033
+ "type": "string",
2034
+ "description": "Unique identifier for a thread"
2035
+ },
2036
+ "ConversationType": {
2037
+ "type": "string",
2038
+ "enum": ["user-session", "agent-task", "multi-agent", "mixed"],
2039
+ "description": "Type of conversation"
2040
+ },
2041
+ "ConversationStatus": {
2042
+ "type": "string",
2043
+ "enum": ["active", "paused", "completed", "failed", "archived"],
2044
+ "description": "Status of a conversation"
2045
+ },
2046
+ "ParticipantRole": {
2047
+ "type": "string",
2048
+ "enum": ["initiator", "assistant", "worker", "observer", "moderator"],
2049
+ "description": "Role of a participant within a conversation"
2050
+ },
2051
+ "TurnStatus": {
2052
+ "type": "string",
2053
+ "enum": ["pending", "streaming", "complete", "failed"],
2054
+ "description": "Status of a turn's content lifecycle"
2055
+ },
2056
+ "TurnVisibility": {
2057
+ "description": "Visibility of a turn within a conversation",
2058
+ "oneOf": [
2059
+ { "type": "object", "properties": { "type": { "const": "all" } }, "required": ["type"] },
2060
+ { "type": "object", "properties": { "type": { "const": "participants" }, "ids": { "type": "array", "items": { "$ref": "#/$defs/ParticipantId" } } }, "required": ["type", "ids"] },
2061
+ { "type": "object", "properties": { "type": { "const": "role" }, "roles": { "type": "array", "items": { "$ref": "#/$defs/ParticipantRole" } } }, "required": ["type", "roles"] },
2062
+ { "type": "object", "properties": { "type": { "const": "private" } }, "required": ["type"] }
2063
+ ]
2064
+ },
2065
+ "TurnSource": {
2066
+ "description": "How a turn was created",
2067
+ "oneOf": [
2068
+ { "type": "object", "properties": { "type": { "const": "explicit" }, "method": { "const": "mail/turn" } }, "required": ["type", "method"] },
2069
+ { "type": "object", "properties": { "type": { "const": "intercepted" }, "messageId": { "$ref": "#/$defs/MessageId" } }, "required": ["type", "messageId"] }
2070
+ ]
2071
+ },
2072
+ "ConversationPermissions": {
2073
+ "type": "object",
2074
+ "description": "Permissions for a participant within a conversation",
2075
+ "properties": {
2076
+ "canSend": { "type": "boolean" },
2077
+ "canObserve": { "type": "boolean" },
2078
+ "canInvite": { "type": "boolean" },
2079
+ "canRemove": { "type": "boolean" },
2080
+ "canCreateThreads": { "type": "boolean" },
2081
+ "historyAccess": { "type": "string", "enum": ["none", "from-join", "full"] },
2082
+ "canSeeInternal": { "type": "boolean" }
2083
+ },
2084
+ "additionalProperties": false
2085
+ },
2086
+ "Conversation": {
2087
+ "type": "object",
2088
+ "description": "A conversation - container for tracking related interactions",
2089
+ "properties": {
2090
+ "id": { "$ref": "#/$defs/ConversationId" },
2091
+ "type": { "$ref": "#/$defs/ConversationType" },
2092
+ "status": { "$ref": "#/$defs/ConversationStatus" },
2093
+ "subject": { "type": "string" },
2094
+ "participantCount": { "type": "integer" },
2095
+ "parentConversationId": { "$ref": "#/$defs/ConversationId" },
2096
+ "parentTurnId": { "$ref": "#/$defs/TurnId" },
2097
+ "createdAt": { "$ref": "#/$defs/Timestamp" },
2098
+ "updatedAt": { "$ref": "#/$defs/Timestamp" },
2099
+ "closedAt": { "$ref": "#/$defs/Timestamp" },
2100
+ "createdBy": { "$ref": "#/$defs/ParticipantId" },
2101
+ "metadata": { "type": "object" },
2102
+ "_meta": { "$ref": "#/$defs/Meta" }
2103
+ },
2104
+ "required": ["id", "type", "status", "participantCount", "createdAt", "updatedAt", "createdBy"],
2105
+ "additionalProperties": false
2106
+ },
2107
+ "ConversationParticipant": {
2108
+ "type": "object",
2109
+ "description": "A participant in a conversation with role and permissions",
2110
+ "properties": {
2111
+ "id": { "$ref": "#/$defs/ParticipantId" },
2112
+ "type": { "type": "string", "enum": ["user", "agent", "system"] },
2113
+ "role": { "$ref": "#/$defs/ParticipantRole" },
2114
+ "joinedAt": { "$ref": "#/$defs/Timestamp" },
2115
+ "leftAt": { "$ref": "#/$defs/Timestamp" },
2116
+ "permissions": { "$ref": "#/$defs/ConversationPermissions" },
2117
+ "agentInfo": {
2118
+ "type": "object",
2119
+ "properties": {
2120
+ "agentId": { "$ref": "#/$defs/AgentId" },
2121
+ "name": { "type": "string" },
2122
+ "role": { "type": "string" }
2123
+ },
2124
+ "required": ["agentId"]
2125
+ },
2126
+ "_meta": { "$ref": "#/$defs/Meta" }
2127
+ },
2128
+ "required": ["id", "type", "role", "joinedAt", "permissions"],
2129
+ "additionalProperties": false
2130
+ },
2131
+ "Turn": {
2132
+ "type": "object",
2133
+ "description": "A turn - the atomic unit of conversation",
2134
+ "properties": {
2135
+ "id": { "$ref": "#/$defs/TurnId" },
2136
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2137
+ "participant": { "$ref": "#/$defs/ParticipantId" },
2138
+ "timestamp": { "$ref": "#/$defs/Timestamp" },
2139
+ "contentType": { "type": "string", "description": "Content type: text, data, event, reference, or x-* custom" },
2140
+ "content": { "description": "Content payload - shape determined by contentType" },
2141
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2142
+ "inReplyTo": { "$ref": "#/$defs/TurnId" },
2143
+ "source": { "$ref": "#/$defs/TurnSource" },
2144
+ "visibility": { "$ref": "#/$defs/TurnVisibility" },
2145
+ "status": { "$ref": "#/$defs/TurnStatus" },
2146
+ "metadata": { "type": "object" },
2147
+ "_meta": { "$ref": "#/$defs/Meta" }
2148
+ },
2149
+ "required": ["id", "conversationId", "participant", "timestamp", "contentType", "content", "source"],
2150
+ "additionalProperties": false
2151
+ },
2152
+ "Thread": {
2153
+ "type": "object",
2154
+ "description": "A thread within a conversation for focused discussion",
2155
+ "properties": {
2156
+ "id": { "$ref": "#/$defs/ThreadId" },
2157
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2158
+ "parentThreadId": { "$ref": "#/$defs/ThreadId" },
2159
+ "subject": { "type": "string" },
2160
+ "rootTurnId": { "$ref": "#/$defs/TurnId" },
2161
+ "turnCount": { "type": "integer" },
2162
+ "participantCount": { "type": "integer" },
2163
+ "createdAt": { "$ref": "#/$defs/Timestamp" },
2164
+ "updatedAt": { "$ref": "#/$defs/Timestamp" },
2165
+ "createdBy": { "$ref": "#/$defs/ParticipantId" },
2166
+ "_meta": { "$ref": "#/$defs/Meta" }
2167
+ },
2168
+ "required": ["id", "conversationId", "rootTurnId", "turnCount", "participantCount", "createdAt", "updatedAt", "createdBy"],
2169
+ "additionalProperties": false
2170
+ },
2171
+ "MailMessageMeta": {
2172
+ "type": "object",
2173
+ "description": "Mail metadata for map/send turn tracking",
2174
+ "properties": {
2175
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2176
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2177
+ "inReplyTo": { "$ref": "#/$defs/TurnId" },
2178
+ "visibility": { "$ref": "#/$defs/TurnVisibility" }
2179
+ },
2180
+ "required": ["conversationId"],
2181
+ "additionalProperties": false
2182
+ },
2183
+ "MailSubscriptionFilter": {
2184
+ "type": "object",
2185
+ "description": "Mail-specific subscription filter for conversation events",
2186
+ "properties": {
2187
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2188
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2189
+ "participantId": { "$ref": "#/$defs/ParticipantId" },
2190
+ "contentType": { "type": "string" }
2191
+ },
2192
+ "additionalProperties": false
2193
+ },
2194
+
2195
+ "MailCreateRequest": {
2196
+ "type": "object",
2197
+ "x-method": "mail/create",
2198
+ "x-tier": "extension",
2199
+ "description": "Create a new conversation",
2200
+ "properties": {
2201
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2202
+ "id": { "$ref": "#/$defs/RequestId" },
2203
+ "method": { "const": "mail/create" },
2204
+ "params": {
2205
+ "type": "object",
2206
+ "properties": {
2207
+ "type": { "$ref": "#/$defs/ConversationType" },
2208
+ "subject": { "type": "string" },
2209
+ "parentConversationId": { "$ref": "#/$defs/ConversationId" },
2210
+ "parentTurnId": { "$ref": "#/$defs/TurnId" },
2211
+ "initialParticipants": {
2212
+ "type": "array",
2213
+ "items": {
2214
+ "type": "object",
2215
+ "properties": {
2216
+ "id": { "$ref": "#/$defs/ParticipantId" },
2217
+ "role": { "$ref": "#/$defs/ParticipantRole" },
2218
+ "permissions": { "$ref": "#/$defs/ConversationPermissions" }
2219
+ },
2220
+ "required": ["id"]
2221
+ }
2222
+ },
2223
+ "initialTurn": {
2224
+ "type": "object",
2225
+ "properties": {
2226
+ "contentType": { "type": "string" },
2227
+ "content": {},
2228
+ "visibility": { "$ref": "#/$defs/TurnVisibility" }
2229
+ },
2230
+ "required": ["contentType", "content"]
2231
+ },
2232
+ "metadata": { "type": "object" },
2233
+ "_meta": { "$ref": "#/$defs/Meta" }
2234
+ }
2235
+ }
2236
+ },
2237
+ "required": ["jsonrpc", "id", "method"]
2238
+ },
2239
+ "MailCreateResponse": {
2240
+ "type": "object",
2241
+ "properties": {
2242
+ "conversation": { "$ref": "#/$defs/Conversation" },
2243
+ "participant": { "$ref": "#/$defs/ConversationParticipant" },
2244
+ "initialTurn": { "$ref": "#/$defs/Turn" },
2245
+ "_meta": { "$ref": "#/$defs/Meta" }
2246
+ },
2247
+ "required": ["conversation", "participant"]
2248
+ },
2249
+ "MailGetRequest": {
2250
+ "type": "object",
2251
+ "x-method": "mail/get",
2252
+ "x-tier": "extension",
2253
+ "description": "Get conversation details",
2254
+ "properties": {
2255
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2256
+ "id": { "$ref": "#/$defs/RequestId" },
2257
+ "method": { "const": "mail/get" },
2258
+ "params": {
2259
+ "type": "object",
2260
+ "properties": {
2261
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2262
+ "include": {
2263
+ "type": "object",
2264
+ "properties": {
2265
+ "participants": { "type": "boolean" },
2266
+ "threads": { "type": "boolean" },
2267
+ "recentTurns": { "type": "integer" },
2268
+ "stats": { "type": "boolean" }
2269
+ }
2270
+ },
2271
+ "_meta": { "$ref": "#/$defs/Meta" }
2272
+ },
2273
+ "required": ["conversationId"]
2274
+ }
2275
+ },
2276
+ "required": ["jsonrpc", "id", "method", "params"]
2277
+ },
2278
+ "MailGetResponse": {
2279
+ "type": "object",
2280
+ "properties": {
2281
+ "conversation": { "$ref": "#/$defs/Conversation" },
2282
+ "participants": { "type": "array", "items": { "$ref": "#/$defs/ConversationParticipant" } },
2283
+ "threads": { "type": "array", "items": { "$ref": "#/$defs/Thread" } },
2284
+ "recentTurns": { "type": "array", "items": { "$ref": "#/$defs/Turn" } },
2285
+ "stats": {
2286
+ "type": "object",
2287
+ "properties": {
2288
+ "totalTurns": { "type": "integer" },
2289
+ "turnsByContentType": { "type": "object" },
2290
+ "activeParticipants": { "type": "integer" },
2291
+ "threadCount": { "type": "integer" }
2292
+ }
2293
+ },
2294
+ "_meta": { "$ref": "#/$defs/Meta" }
2295
+ },
2296
+ "required": ["conversation"]
2297
+ },
2298
+ "MailListRequest": {
2299
+ "type": "object",
2300
+ "x-method": "mail/list",
2301
+ "x-tier": "extension",
2302
+ "description": "List conversations with filtering",
2303
+ "properties": {
2304
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2305
+ "id": { "$ref": "#/$defs/RequestId" },
2306
+ "method": { "const": "mail/list" },
2307
+ "params": {
2308
+ "type": "object",
2309
+ "properties": {
2310
+ "filter": {
2311
+ "type": "object",
2312
+ "properties": {
2313
+ "type": { "type": "array", "items": { "$ref": "#/$defs/ConversationType" } },
2314
+ "status": { "type": "array", "items": { "$ref": "#/$defs/ConversationStatus" } },
2315
+ "participantId": { "$ref": "#/$defs/ParticipantId" },
2316
+ "createdAfter": { "$ref": "#/$defs/Timestamp" },
2317
+ "createdBefore": { "$ref": "#/$defs/Timestamp" },
2318
+ "parentConversationId": { "$ref": "#/$defs/ConversationId" }
2319
+ }
2320
+ },
2321
+ "limit": { "type": "integer", "minimum": 1 },
2322
+ "cursor": { "type": "string" },
2323
+ "_meta": { "$ref": "#/$defs/Meta" }
2324
+ }
2325
+ }
2326
+ },
2327
+ "required": ["jsonrpc", "id", "method"]
2328
+ },
2329
+ "MailListResponse": {
2330
+ "type": "object",
2331
+ "properties": {
2332
+ "conversations": { "type": "array", "items": { "$ref": "#/$defs/Conversation" } },
2333
+ "nextCursor": { "type": "string" },
2334
+ "hasMore": { "type": "boolean" },
2335
+ "_meta": { "$ref": "#/$defs/Meta" }
2336
+ },
2337
+ "required": ["conversations", "hasMore"]
2338
+ },
2339
+ "MailCloseRequest": {
2340
+ "type": "object",
2341
+ "x-method": "mail/close",
2342
+ "x-tier": "extension",
2343
+ "description": "Close a conversation",
2344
+ "properties": {
2345
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2346
+ "id": { "$ref": "#/$defs/RequestId" },
2347
+ "method": { "const": "mail/close" },
2348
+ "params": {
2349
+ "type": "object",
2350
+ "properties": {
2351
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2352
+ "reason": { "type": "string" },
2353
+ "_meta": { "$ref": "#/$defs/Meta" }
2354
+ },
2355
+ "required": ["conversationId"]
2356
+ }
2357
+ },
2358
+ "required": ["jsonrpc", "id", "method", "params"]
2359
+ },
2360
+ "MailCloseResponse": {
2361
+ "type": "object",
2362
+ "properties": {
2363
+ "conversation": { "$ref": "#/$defs/Conversation" },
2364
+ "_meta": { "$ref": "#/$defs/Meta" }
2365
+ },
2366
+ "required": ["conversation"]
2367
+ },
2368
+ "MailJoinRequest": {
2369
+ "type": "object",
2370
+ "x-method": "mail/join",
2371
+ "x-tier": "extension",
2372
+ "description": "Join a conversation",
2373
+ "properties": {
2374
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2375
+ "id": { "$ref": "#/$defs/RequestId" },
2376
+ "method": { "const": "mail/join" },
2377
+ "params": {
2378
+ "type": "object",
2379
+ "properties": {
2380
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2381
+ "role": { "$ref": "#/$defs/ParticipantRole" },
2382
+ "catchUp": {
2383
+ "type": "object",
2384
+ "properties": {
2385
+ "from": { "oneOf": [{ "type": "string" }, { "type": "number" }] },
2386
+ "limit": { "type": "integer" },
2387
+ "includeSummary": { "type": "boolean" }
2388
+ }
2389
+ },
2390
+ "_meta": { "$ref": "#/$defs/Meta" }
2391
+ },
2392
+ "required": ["conversationId"]
2393
+ }
2394
+ },
2395
+ "required": ["jsonrpc", "id", "method", "params"]
2396
+ },
2397
+ "MailJoinResponse": {
2398
+ "type": "object",
2399
+ "properties": {
2400
+ "conversation": { "$ref": "#/$defs/Conversation" },
2401
+ "participant": { "$ref": "#/$defs/ConversationParticipant" },
2402
+ "history": { "type": "array", "items": { "$ref": "#/$defs/Turn" } },
2403
+ "historyCursor": { "type": "string" },
2404
+ "summary": { "type": "string" },
2405
+ "_meta": { "$ref": "#/$defs/Meta" }
2406
+ },
2407
+ "required": ["conversation", "participant"]
2408
+ },
2409
+ "MailLeaveRequest": {
2410
+ "type": "object",
2411
+ "x-method": "mail/leave",
2412
+ "x-tier": "extension",
2413
+ "description": "Leave a conversation",
2414
+ "properties": {
2415
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2416
+ "id": { "$ref": "#/$defs/RequestId" },
2417
+ "method": { "const": "mail/leave" },
2418
+ "params": {
2419
+ "type": "object",
2420
+ "properties": {
2421
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2422
+ "reason": { "type": "string" },
2423
+ "_meta": { "$ref": "#/$defs/Meta" }
2424
+ },
2425
+ "required": ["conversationId"]
2426
+ }
2427
+ },
2428
+ "required": ["jsonrpc", "id", "method", "params"]
2429
+ },
2430
+ "MailLeaveResponse": {
2431
+ "type": "object",
2432
+ "properties": {
2433
+ "success": { "type": "boolean" },
2434
+ "leftAt": { "$ref": "#/$defs/Timestamp" },
2435
+ "_meta": { "$ref": "#/$defs/Meta" }
2436
+ },
2437
+ "required": ["success", "leftAt"]
2438
+ },
2439
+ "MailInviteRequest": {
2440
+ "type": "object",
2441
+ "x-method": "mail/invite",
2442
+ "x-tier": "extension",
2443
+ "description": "Invite a participant to a conversation",
2444
+ "properties": {
2445
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2446
+ "id": { "$ref": "#/$defs/RequestId" },
2447
+ "method": { "const": "mail/invite" },
2448
+ "params": {
2449
+ "type": "object",
2450
+ "properties": {
2451
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2452
+ "participant": {
2453
+ "type": "object",
2454
+ "properties": {
2455
+ "id": { "$ref": "#/$defs/ParticipantId" },
2456
+ "role": { "$ref": "#/$defs/ParticipantRole" },
2457
+ "permissions": { "$ref": "#/$defs/ConversationPermissions" }
2458
+ },
2459
+ "required": ["id"]
2460
+ },
2461
+ "message": { "type": "string" },
2462
+ "_meta": { "$ref": "#/$defs/Meta" }
2463
+ },
2464
+ "required": ["conversationId", "participant"]
2465
+ }
2466
+ },
2467
+ "required": ["jsonrpc", "id", "method", "params"]
2468
+ },
2469
+ "MailInviteResponse": {
2470
+ "type": "object",
2471
+ "properties": {
2472
+ "invited": { "type": "boolean" },
2473
+ "participant": { "$ref": "#/$defs/ConversationParticipant" },
2474
+ "invitationId": { "type": "string" },
2475
+ "pending": { "type": "boolean" },
2476
+ "_meta": { "$ref": "#/$defs/Meta" }
2477
+ },
2478
+ "required": ["invited"]
2479
+ },
2480
+ "MailTurnRequest": {
2481
+ "type": "object",
2482
+ "x-method": "mail/turn",
2483
+ "x-tier": "extension",
2484
+ "description": "Record a turn in a conversation",
2485
+ "properties": {
2486
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2487
+ "id": { "$ref": "#/$defs/RequestId" },
2488
+ "method": { "const": "mail/turn" },
2489
+ "params": {
2490
+ "type": "object",
2491
+ "properties": {
2492
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2493
+ "contentType": { "type": "string" },
2494
+ "content": {},
2495
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2496
+ "inReplyTo": { "$ref": "#/$defs/TurnId" },
2497
+ "visibility": { "$ref": "#/$defs/TurnVisibility" },
2498
+ "metadata": { "type": "object" },
2499
+ "_meta": { "$ref": "#/$defs/Meta" }
2500
+ },
2501
+ "required": ["conversationId", "contentType", "content"]
2502
+ }
2503
+ },
2504
+ "required": ["jsonrpc", "id", "method", "params"]
2505
+ },
2506
+ "MailTurnResponse": {
2507
+ "type": "object",
2508
+ "properties": {
2509
+ "turn": { "$ref": "#/$defs/Turn" },
2510
+ "_meta": { "$ref": "#/$defs/Meta" }
2511
+ },
2512
+ "required": ["turn"]
2513
+ },
2514
+ "MailTurnsListRequest": {
2515
+ "type": "object",
2516
+ "x-method": "mail/turns/list",
2517
+ "x-tier": "extension",
2518
+ "description": "List turns in a conversation",
2519
+ "properties": {
2520
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2521
+ "id": { "$ref": "#/$defs/RequestId" },
2522
+ "method": { "const": "mail/turns/list" },
2523
+ "params": {
2524
+ "type": "object",
2525
+ "properties": {
2526
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2527
+ "filter": {
2528
+ "type": "object",
2529
+ "properties": {
2530
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2531
+ "includeAllThreads": { "type": "boolean" },
2532
+ "contentTypes": { "type": "array", "items": { "type": "string" } },
2533
+ "participantId": { "$ref": "#/$defs/ParticipantId" },
2534
+ "afterTurnId": { "$ref": "#/$defs/TurnId" },
2535
+ "beforeTurnId": { "$ref": "#/$defs/TurnId" },
2536
+ "afterTimestamp": { "$ref": "#/$defs/Timestamp" },
2537
+ "beforeTimestamp": { "$ref": "#/$defs/Timestamp" }
2538
+ }
2539
+ },
2540
+ "limit": { "type": "integer", "minimum": 1 },
2541
+ "order": { "type": "string", "enum": ["asc", "desc"] },
2542
+ "_meta": { "$ref": "#/$defs/Meta" }
2543
+ },
2544
+ "required": ["conversationId"]
2545
+ }
2546
+ },
2547
+ "required": ["jsonrpc", "id", "method", "params"]
2548
+ },
2549
+ "MailTurnsListResponse": {
2550
+ "type": "object",
2551
+ "properties": {
2552
+ "turns": { "type": "array", "items": { "$ref": "#/$defs/Turn" } },
2553
+ "hasMore": { "type": "boolean" },
2554
+ "nextCursor": { "type": "string" },
2555
+ "_meta": { "$ref": "#/$defs/Meta" }
2556
+ },
2557
+ "required": ["turns", "hasMore"]
2558
+ },
2559
+ "MailThreadCreateRequest": {
2560
+ "type": "object",
2561
+ "x-method": "mail/thread/create",
2562
+ "x-tier": "extension",
2563
+ "description": "Create a thread within a conversation",
2564
+ "properties": {
2565
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2566
+ "id": { "$ref": "#/$defs/RequestId" },
2567
+ "method": { "const": "mail/thread/create" },
2568
+ "params": {
2569
+ "type": "object",
2570
+ "properties": {
2571
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2572
+ "rootTurnId": { "$ref": "#/$defs/TurnId" },
2573
+ "subject": { "type": "string" },
2574
+ "parentThreadId": { "$ref": "#/$defs/ThreadId" },
2575
+ "_meta": { "$ref": "#/$defs/Meta" }
2576
+ },
2577
+ "required": ["conversationId", "rootTurnId"]
2578
+ }
2579
+ },
2580
+ "required": ["jsonrpc", "id", "method", "params"]
2581
+ },
2582
+ "MailThreadCreateResponse": {
2583
+ "type": "object",
2584
+ "properties": {
2585
+ "thread": { "$ref": "#/$defs/Thread" },
2586
+ "_meta": { "$ref": "#/$defs/Meta" }
2587
+ },
2588
+ "required": ["thread"]
2589
+ },
2590
+ "MailThreadListRequest": {
2591
+ "type": "object",
2592
+ "x-method": "mail/thread/list",
2593
+ "x-tier": "extension",
2594
+ "description": "List threads in a conversation",
2595
+ "properties": {
2596
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2597
+ "id": { "$ref": "#/$defs/RequestId" },
2598
+ "method": { "const": "mail/thread/list" },
2599
+ "params": {
2600
+ "type": "object",
2601
+ "properties": {
2602
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2603
+ "parentThreadId": { "$ref": "#/$defs/ThreadId" },
2604
+ "limit": { "type": "integer", "minimum": 1 },
2605
+ "cursor": { "type": "string" },
2606
+ "_meta": { "$ref": "#/$defs/Meta" }
2607
+ },
2608
+ "required": ["conversationId"]
2609
+ }
2610
+ },
2611
+ "required": ["jsonrpc", "id", "method", "params"]
2612
+ },
2613
+ "MailThreadListResponse": {
2614
+ "type": "object",
2615
+ "properties": {
2616
+ "threads": { "type": "array", "items": { "$ref": "#/$defs/Thread" } },
2617
+ "hasMore": { "type": "boolean" },
2618
+ "nextCursor": { "type": "string" },
2619
+ "_meta": { "$ref": "#/$defs/Meta" }
2620
+ },
2621
+ "required": ["threads", "hasMore"]
2622
+ },
2623
+ "MailSummaryRequest": {
2624
+ "type": "object",
2625
+ "x-method": "mail/summary",
2626
+ "x-tier": "extension",
2627
+ "description": "Get or generate a conversation summary",
2628
+ "properties": {
2629
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2630
+ "id": { "$ref": "#/$defs/RequestId" },
2631
+ "method": { "const": "mail/summary" },
2632
+ "params": {
2633
+ "type": "object",
2634
+ "properties": {
2635
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2636
+ "scope": {
2637
+ "type": "object",
2638
+ "properties": {
2639
+ "fromTurnId": { "$ref": "#/$defs/TurnId" },
2640
+ "toTurnId": { "$ref": "#/$defs/TurnId" },
2641
+ "threadId": { "$ref": "#/$defs/ThreadId" }
2642
+ }
2643
+ },
2644
+ "regenerate": { "type": "boolean" },
2645
+ "include": {
2646
+ "type": "object",
2647
+ "properties": {
2648
+ "keyPoints": { "type": "boolean" },
2649
+ "keyDecisions": { "type": "boolean" },
2650
+ "openQuestions": { "type": "boolean" },
2651
+ "participants": { "type": "boolean" }
2652
+ }
2653
+ },
2654
+ "_meta": { "$ref": "#/$defs/Meta" }
2655
+ },
2656
+ "required": ["conversationId"]
2657
+ }
2658
+ },
2659
+ "required": ["jsonrpc", "id", "method", "params"]
2660
+ },
2661
+ "MailSummaryResponse": {
2662
+ "type": "object",
2663
+ "properties": {
2664
+ "summary": { "type": "string" },
2665
+ "keyPoints": { "type": "array", "items": { "type": "string" } },
2666
+ "keyDecisions": { "type": "array", "items": { "type": "string" } },
2667
+ "openQuestions": { "type": "array", "items": { "type": "string" } },
2668
+ "generated": { "type": "boolean" },
2669
+ "cachedAt": { "$ref": "#/$defs/Timestamp" },
2670
+ "_meta": { "$ref": "#/$defs/Meta" }
2671
+ },
2672
+ "required": ["summary", "generated"]
2673
+ },
2674
+ "MailReplayRequest": {
2675
+ "type": "object",
2676
+ "x-method": "mail/replay",
2677
+ "x-tier": "extension",
2678
+ "description": "Replay conversation turns from a point",
2679
+ "properties": {
2680
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2681
+ "id": { "$ref": "#/$defs/RequestId" },
2682
+ "method": { "const": "mail/replay" },
2683
+ "params": {
2684
+ "type": "object",
2685
+ "properties": {
2686
+ "conversationId": { "$ref": "#/$defs/ConversationId" },
2687
+ "fromTurnId": { "$ref": "#/$defs/TurnId" },
2688
+ "fromTimestamp": { "$ref": "#/$defs/Timestamp" },
2689
+ "threadId": { "$ref": "#/$defs/ThreadId" },
2690
+ "limit": { "type": "integer", "minimum": 1 },
2691
+ "contentTypes": { "type": "array", "items": { "type": "string" } },
2692
+ "_meta": { "$ref": "#/$defs/Meta" }
2693
+ },
2694
+ "required": ["conversationId"]
2695
+ }
2696
+ },
2697
+ "required": ["jsonrpc", "id", "method", "params"]
2698
+ },
2699
+ "MailReplayResponse": {
2700
+ "type": "object",
2701
+ "properties": {
2702
+ "turns": { "type": "array", "items": { "$ref": "#/$defs/Turn" } },
2703
+ "hasMore": { "type": "boolean" },
2704
+ "nextCursor": { "type": "string" },
2705
+ "missedCount": { "type": "integer" },
2706
+ "_meta": { "$ref": "#/$defs/Meta" }
2707
+ },
2708
+ "required": ["turns", "hasMore", "missedCount"]
2709
+ },
2710
+
2711
+ "CredGetRequest": {
2712
+ "type": "object",
2713
+ "x-method": "cred/get",
2714
+ "x-tier": "extension",
2715
+ "description": "Request a short-lived credential for a scope and resource",
2716
+ "properties": {
2717
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2718
+ "id": { "$ref": "#/$defs/RequestId" },
2719
+ "method": { "const": "cred/get" },
2720
+ "params": {
2721
+ "type": "object",
2722
+ "properties": {
2723
+ "scope": { "type": "string", "description": "Scope to request (e.g. 'github:repo:write')" },
2724
+ "resource": { "type": "string", "description": "Resource to access (e.g. 'acme-corp/frontend')" },
2725
+ "_meta": { "$ref": "#/$defs/Meta" }
2726
+ },
2727
+ "required": ["scope", "resource"]
2728
+ }
2729
+ },
2730
+ "required": ["jsonrpc", "id", "method", "params"]
2731
+ },
2732
+ "CredGetResponse": {
2733
+ "type": "object",
2734
+ "description": "Response to cred/get",
2735
+ "properties": {
2736
+ "credentialType": {
2737
+ "type": "string",
2738
+ "enum": ["bearer_token", "aws_credentials", "api_key"],
2739
+ "description": "Type of credential returned"
2740
+ },
2741
+ "credential": { "type": "object", "description": "Provider-specific credential data" },
2742
+ "expiresAt": { "type": "string", "format": "date-time", "description": "When the credential expires (ISO 8601)" },
2743
+ "_meta": { "$ref": "#/$defs/Meta" }
2744
+ },
2745
+ "required": ["credentialType", "credential"]
2746
+ },
2747
+ "CredListRequest": {
2748
+ "type": "object",
2749
+ "x-method": "cred/list",
2750
+ "x-tier": "extension",
2751
+ "description": "List available scopes for the authenticated token",
2752
+ "properties": {
2753
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2754
+ "id": { "$ref": "#/$defs/RequestId" },
2755
+ "method": { "const": "cred/list" },
2756
+ "params": {
2757
+ "type": "object",
2758
+ "properties": {
2759
+ "_meta": { "$ref": "#/$defs/Meta" }
2760
+ }
2761
+ }
2762
+ },
2763
+ "required": ["jsonrpc", "id", "method"]
2764
+ },
2765
+ "CredListResponse": {
2766
+ "type": "object",
2767
+ "description": "Response to cred/list",
2768
+ "properties": {
2769
+ "agentId": { "type": "string", "description": "Agent ID from the authenticated token" },
2770
+ "scopes": { "type": "array", "items": { "type": "string" }, "description": "Available scopes" },
2771
+ "constraints": { "type": "object", "description": "Token constraints" },
2772
+ "expiresAt": { "type": "string", "format": "date-time", "description": "Token expiration" },
2773
+ "_meta": { "$ref": "#/$defs/Meta" }
2774
+ },
2775
+ "required": ["agentId", "scopes"]
2776
+ },
2777
+ "CredStatusRequest": {
2778
+ "type": "object",
2779
+ "x-method": "cred/status",
2780
+ "x-tier": "extension",
2781
+ "description": "Check credential broker status and available providers",
2782
+ "properties": {
2783
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2784
+ "id": { "$ref": "#/$defs/RequestId" },
2785
+ "method": { "const": "cred/status" },
2786
+ "params": {
2787
+ "type": "object",
2788
+ "properties": {
2789
+ "_meta": { "$ref": "#/$defs/Meta" }
2790
+ }
2791
+ }
2792
+ },
2793
+ "required": ["jsonrpc", "id", "method"]
2794
+ },
2795
+ "CredStatusResponse": {
2796
+ "type": "object",
2797
+ "description": "Response to cred/status",
2798
+ "properties": {
2799
+ "providers": { "type": "array", "items": { "type": "string" }, "description": "Available credential providers" },
2800
+ "_meta": { "$ref": "#/$defs/Meta" }
2801
+ },
2802
+ "required": ["providers"]
2803
+ },
2804
+
2805
+ "WorkspaceSearchRequest": {
2806
+ "type": "object",
2807
+ "x-method": "workspace/search",
2808
+ "x-tier": "extension",
2809
+ "description": "Search for files matching a query in an agent's workspace",
2810
+ "properties": {
2811
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2812
+ "id": { "$ref": "#/$defs/RequestId" },
2813
+ "method": { "const": "workspace/search" },
2814
+ "params": {
2815
+ "type": "object",
2816
+ "properties": {
2817
+ "agentId": { "type": "string", "description": "Agent whose workspace to search" },
2818
+ "query": { "type": "string", "description": "Search query (matched against filenames)" },
2819
+ "cwd": { "type": "string", "description": "Subdirectory to search within (relative to workspace root)" },
2820
+ "limit": { "type": "integer", "description": "Max results to return (default 50)" },
2821
+ "_meta": { "$ref": "#/$defs/Meta" }
2822
+ },
2823
+ "required": ["agentId", "query"]
2824
+ }
2825
+ },
2826
+ "required": ["jsonrpc", "id", "method", "params"]
2827
+ },
2828
+ "WorkspaceSearchResponse": {
2829
+ "type": "object",
2830
+ "description": "Response to workspace/search",
2831
+ "properties": {
2832
+ "files": {
2833
+ "type": "array",
2834
+ "items": { "$ref": "#/$defs/WorkspaceFileResult" },
2835
+ "description": "Matching files"
2836
+ },
2837
+ "_meta": { "$ref": "#/$defs/Meta" }
2838
+ },
2839
+ "required": ["files"]
2840
+ },
2841
+ "WorkspaceListRequest": {
2842
+ "type": "object",
2843
+ "x-method": "workspace/list",
2844
+ "x-tier": "extension",
2845
+ "description": "List files in a directory of an agent's workspace",
2846
+ "properties": {
2847
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2848
+ "id": { "$ref": "#/$defs/RequestId" },
2849
+ "method": { "const": "workspace/list" },
2850
+ "params": {
2851
+ "type": "object",
2852
+ "properties": {
2853
+ "agentId": { "type": "string", "description": "Agent whose workspace to list" },
2854
+ "directory": { "type": "string", "description": "Directory to list (relative to workspace root, default '.')" },
2855
+ "_meta": { "$ref": "#/$defs/Meta" }
2856
+ },
2857
+ "required": ["agentId"]
2858
+ }
2859
+ },
2860
+ "required": ["jsonrpc", "id", "method", "params"]
2861
+ },
2862
+ "WorkspaceListResponse": {
2863
+ "type": "object",
2864
+ "description": "Response to workspace/list",
2865
+ "properties": {
2866
+ "files": {
2867
+ "type": "array",
2868
+ "items": { "$ref": "#/$defs/WorkspaceFileResult" },
2869
+ "description": "Files in the directory"
2870
+ },
2871
+ "_meta": { "$ref": "#/$defs/Meta" }
2872
+ },
2873
+ "required": ["files"]
2874
+ },
2875
+ "WorkspaceReadRequest": {
2876
+ "type": "object",
2877
+ "x-method": "workspace/read",
2878
+ "x-tier": "extension",
2879
+ "description": "Read file contents from an agent's workspace",
2880
+ "properties": {
2881
+ "jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
2882
+ "id": { "$ref": "#/$defs/RequestId" },
2883
+ "method": { "const": "workspace/read" },
2884
+ "params": {
2885
+ "type": "object",
2886
+ "properties": {
2887
+ "agentId": { "type": "string", "description": "Agent whose workspace to read from" },
2888
+ "path": { "type": "string", "description": "File path relative to workspace root" },
2889
+ "lineRange": {
2890
+ "type": "object",
2891
+ "description": "Optional line range to read (1-indexed)",
2892
+ "properties": {
2893
+ "start": { "type": "integer", "description": "Start line (1-indexed, inclusive)" },
2894
+ "end": { "type": "integer", "description": "End line (1-indexed, inclusive)" }
2895
+ },
2896
+ "required": ["start", "end"]
2897
+ },
2898
+ "_meta": { "$ref": "#/$defs/Meta" }
2899
+ },
2900
+ "required": ["agentId", "path"]
2901
+ }
2902
+ },
2903
+ "required": ["jsonrpc", "id", "method", "params"]
2904
+ },
2905
+ "WorkspaceReadResponse": {
2906
+ "type": "object",
2907
+ "description": "Response to workspace/read",
2908
+ "properties": {
2909
+ "text": { "type": "string", "description": "File text content" },
2910
+ "mime": { "type": "string", "description": "MIME type" },
2911
+ "size": { "type": "integer", "description": "File size in bytes" },
2912
+ "_meta": { "$ref": "#/$defs/Meta" }
2913
+ },
2914
+ "required": ["text", "mime", "size"]
2915
+ },
2916
+ "WorkspaceFileResult": {
2917
+ "type": "object",
2918
+ "description": "A file or directory entry in a workspace",
2919
+ "properties": {
2920
+ "path": { "type": "string", "description": "Relative path from workspace root" },
2921
+ "isDirectory": { "type": "boolean", "description": "Whether this is a directory" },
2922
+ "size": { "type": "integer", "description": "File size in bytes (undefined for directories)" },
2923
+ "mime": { "type": "string", "description": "MIME type guess based on extension" }
2924
+ },
2925
+ "required": ["path", "isDirectory"]
2926
+ },
2927
+
2928
+ "MAPAgentCapabilityDescriptor": {
2929
+ "type": "object",
2930
+ "description": "Structured capability descriptor for rich agent discovery",
2931
+ "properties": {
2932
+ "id": { "type": "string", "description": "Globally unique capability descriptor ID (e.g., 'urn:map:cap:code-review')" },
2933
+ "version": { "type": "string", "description": "Semantic version of the capability descriptor" },
2934
+ "name": { "type": "string", "description": "Human-readable name" },
2935
+ "description": { "type": "string", "description": "Human-readable description" },
2936
+ "capabilities": {
2937
+ "type": "array",
2938
+ "items": { "$ref": "#/$defs/MAPCapabilityDeclaration" },
2939
+ "description": "Individual capabilities this agent provides"
2940
+ },
2941
+ "tags": {
2942
+ "type": "array",
2943
+ "items": { "type": "string" },
2944
+ "description": "Semantic tags for categorization (e.g., 'code', 'review', 'testing')"
2945
+ },
2946
+ "accepts": {
2947
+ "type": "array",
2948
+ "items": { "$ref": "#/$defs/MAPInterfaceSpec" },
2949
+ "description": "Input interfaces this agent accepts"
2950
+ },
2951
+ "provides": {
2952
+ "type": "array",
2953
+ "items": { "$ref": "#/$defs/MAPInterfaceSpec" },
2954
+ "description": "Output interfaces this agent provides"
2955
+ }
2956
+ }
2957
+ },
2958
+ "MAPCapabilityDeclaration": {
2959
+ "type": "object",
2960
+ "description": "A single capability declared by an agent",
2961
+ "properties": {
2962
+ "id": { "type": "string", "description": "Capability identifier (e.g., 'code-review', 'translation')" },
2963
+ "version": { "type": "string", "description": "Capability version" },
2964
+ "description": { "type": "string" },
2965
+ "interfaces": {
2966
+ "type": "array",
2967
+ "items": { "$ref": "#/$defs/MAPInterfaceSpec" },
2968
+ "description": "Interfaces for this specific capability"
2969
+ }
2970
+ },
2971
+ "required": ["id"]
2972
+ },
2973
+ "MAPInterfaceSpec": {
2974
+ "type": "object",
2975
+ "description": "Content type interface specification",
2976
+ "properties": {
2977
+ "contentType": { "type": "string", "description": "MIME type (e.g., 'application/json', 'text/plain')" },
2978
+ "schema": { "type": "string", "description": "Optional JSON Schema URI for the content" },
2979
+ "description": { "type": "string" }
2980
+ },
2981
+ "required": ["contentType"]
2982
+ },
2983
+
2984
+ "DIDDocument": {
2985
+ "type": "object",
2986
+ "description": "W3C DID Document for did:wba method",
2987
+ "properties": {
2988
+ "@context": {
2989
+ "oneOf": [
2990
+ { "type": "string" },
2991
+ { "type": "array", "items": { "type": "string" } }
2992
+ ]
2993
+ },
2994
+ "id": { "type": "string", "description": "The DID (e.g., 'did:wba:agents.example.com:gateway')" },
2995
+ "verificationMethod": {
2996
+ "type": "array",
2997
+ "items": { "$ref": "#/$defs/DIDVerificationMethod" }
2998
+ },
2999
+ "authentication": {
3000
+ "type": "array",
3001
+ "items": { "type": "string" },
3002
+ "description": "Key references for authentication (e.g., 'did:wba:...#key-1')"
3003
+ },
3004
+ "service": {
3005
+ "type": "array",
3006
+ "items": { "$ref": "#/$defs/DIDService" }
3007
+ }
3008
+ },
3009
+ "required": ["id"]
3010
+ },
3011
+ "DIDVerificationMethod": {
3012
+ "type": "object",
3013
+ "description": "A verification method in a DID Document",
3014
+ "properties": {
3015
+ "id": { "type": "string" },
3016
+ "type": { "type": "string", "description": "Key type (e.g., 'JsonWebKey2020')" },
3017
+ "controller": { "type": "string" },
3018
+ "publicKeyJwk": { "type": "object", "description": "Public key in JWK format" }
3019
+ },
3020
+ "required": ["id", "type", "controller"]
3021
+ },
3022
+ "DIDService": {
3023
+ "type": "object",
3024
+ "description": "A service endpoint in a DID Document",
3025
+ "properties": {
3026
+ "id": { "type": "string" },
3027
+ "type": { "type": "string", "description": "Service type (e.g., 'MAPFederationEndpoint')" },
3028
+ "serviceEndpoint": {
3029
+ "oneOf": [
3030
+ { "type": "string" },
3031
+ { "type": "object" }
3032
+ ]
3033
+ },
3034
+ "mapProtocolVersion": { "type": "integer" },
3035
+ "mapCapabilities": { "type": "object" }
3036
+ },
3037
+ "required": ["id", "type", "serviceEndpoint"]
3038
+ },
3039
+ "DIDWBAProof": {
3040
+ "type": "object",
3041
+ "description": "Cryptographic proof for DID:WBA authentication",
3042
+ "properties": {
3043
+ "type": { "type": "string", "description": "Proof type (e.g., 'JsonWebSignature2020')" },
3044
+ "created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp" },
3045
+ "challenge": { "type": "string", "description": "Server-provided challenge nonce" },
3046
+ "jws": { "type": "string", "description": "JWS compact serialization of the proof signature" }
3047
+ },
3048
+ "required": ["type", "created", "challenge", "jws"]
3049
+ },
3050
+ "DIDWBACredentials": {
3051
+ "type": "object",
3052
+ "description": "Federation auth credentials using did:wba",
3053
+ "properties": {
3054
+ "method": { "const": "did:wba" },
3055
+ "metadata": {
3056
+ "type": "object",
3057
+ "properties": {
3058
+ "did": { "type": "string", "description": "The DID of the authenticating system" },
3059
+ "proof": { "$ref": "#/$defs/DIDWBAProof" }
3060
+ },
3061
+ "required": ["did", "proof"]
3062
+ }
3063
+ },
3064
+ "required": ["method", "metadata"]
1826
3065
  }
1827
3066
  }
1828
3067
  }