multi-agent-protocol 0.0.4 → 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.
- package/docs/07-federation.md +81 -5
- package/docs/09-authentication.md +68 -0
- package/docs/10-environment-awareness.md +242 -0
- package/docs/11-anp-inspired-improvements.md +1079 -0
- package/docs/12-anp-implementation-plan.md +641 -0
- package/package.json +1 -1
- package/schema/meta.json +70 -2
- package/schema/schema.json +521 -12
package/schema/schema.json
CHANGED
|
@@ -74,7 +74,13 @@
|
|
|
74
74
|
{ "$ref": "#/$defs/MailThreadCreateRequest" },
|
|
75
75
|
{ "$ref": "#/$defs/MailThreadListRequest" },
|
|
76
76
|
{ "$ref": "#/$defs/MailSummaryRequest" },
|
|
77
|
-
{ "$ref": "#/$defs/MailReplayRequest" }
|
|
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" }
|
|
78
84
|
]
|
|
79
85
|
},
|
|
80
86
|
"MAPResponse": {
|
|
@@ -307,6 +313,17 @@
|
|
|
307
313
|
},
|
|
308
314
|
"additionalProperties": false
|
|
309
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
|
+
},
|
|
310
327
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
311
328
|
},
|
|
312
329
|
"additionalProperties": false
|
|
@@ -412,6 +429,8 @@
|
|
|
412
429
|
"visibility": { "$ref": "#/$defs/AgentVisibility" },
|
|
413
430
|
"lifecycle": { "$ref": "#/$defs/AgentLifecycle" },
|
|
414
431
|
"capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
|
|
432
|
+
"capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
|
|
433
|
+
"environment": { "$ref": "#/$defs/AgentEnvironment" },
|
|
415
434
|
"metadata": { "type": "object" },
|
|
416
435
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
417
436
|
},
|
|
@@ -419,6 +438,28 @@
|
|
|
419
438
|
"additionalProperties": false
|
|
420
439
|
},
|
|
421
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
|
+
|
|
422
463
|
"Address": {
|
|
423
464
|
"description": "Flexible addressing for any topology",
|
|
424
465
|
"oneOf": [
|
|
@@ -691,6 +732,7 @@
|
|
|
691
732
|
"enum": [
|
|
692
733
|
"agent_registered",
|
|
693
734
|
"agent_state_changed",
|
|
735
|
+
"agent_environment_changed",
|
|
694
736
|
"agent_unregistered",
|
|
695
737
|
"message_sent",
|
|
696
738
|
"message_delivered",
|
|
@@ -768,6 +810,11 @@
|
|
|
768
810
|
"$ref": "#/$defs/MailSubscriptionFilter",
|
|
769
811
|
"description": "Mail-specific filter for conversation events"
|
|
770
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
|
+
},
|
|
771
818
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
772
819
|
},
|
|
773
820
|
"additionalProperties": false
|
|
@@ -818,7 +865,10 @@
|
|
|
818
865
|
"properties": {
|
|
819
866
|
"method": {
|
|
820
867
|
"type": "string",
|
|
821
|
-
"
|
|
868
|
+
"oneOf": [
|
|
869
|
+
{ "enum": ["bearer", "api-key", "mtls", "none"] },
|
|
870
|
+
{ "type": "string", "pattern": "^x-" }
|
|
871
|
+
]
|
|
822
872
|
},
|
|
823
873
|
"token": { "type": "string" }
|
|
824
874
|
}
|
|
@@ -845,6 +895,10 @@
|
|
|
845
895
|
"version": { "type": "string" }
|
|
846
896
|
}
|
|
847
897
|
},
|
|
898
|
+
"serverEnvironment": {
|
|
899
|
+
"$ref": "#/$defs/AgentEnvironment",
|
|
900
|
+
"description": "Server's compute environment (if relevant)"
|
|
901
|
+
},
|
|
848
902
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
849
903
|
},
|
|
850
904
|
"required": ["protocolVersion", "sessionId", "participantId", "capabilities"]
|
|
@@ -1003,7 +1057,20 @@
|
|
|
1003
1057
|
"items": { "$ref": "#/$defs/ScopeId" }
|
|
1004
1058
|
},
|
|
1005
1059
|
"parent": { "$ref": "#/$defs/AgentId" },
|
|
1006
|
-
"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
|
+
}
|
|
1007
1074
|
}
|
|
1008
1075
|
},
|
|
1009
1076
|
"limit": { "type": "integer", "minimum": 1 },
|
|
@@ -1213,6 +1280,8 @@
|
|
|
1213
1280
|
},
|
|
1214
1281
|
"visibility": { "$ref": "#/$defs/AgentVisibility" },
|
|
1215
1282
|
"capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
|
|
1283
|
+
"capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
|
|
1284
|
+
"environment": { "$ref": "#/$defs/AgentEnvironment" },
|
|
1216
1285
|
"metadata": { "type": "object" },
|
|
1217
1286
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
1218
1287
|
}
|
|
@@ -1252,8 +1321,20 @@
|
|
|
1252
1321
|
},
|
|
1253
1322
|
"visibility": { "$ref": "#/$defs/AgentVisibility" },
|
|
1254
1323
|
"capabilities": { "$ref": "#/$defs/ParticipantCapabilities" },
|
|
1324
|
+
"capabilityDescriptor": { "$ref": "#/$defs/MAPAgentCapabilityDescriptor" },
|
|
1325
|
+
"environment": { "$ref": "#/$defs/AgentEnvironment" },
|
|
1255
1326
|
"initialMessage": { "$ref": "#/$defs/Message" },
|
|
1256
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
|
+
},
|
|
1257
1338
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
1258
1339
|
}
|
|
1259
1340
|
}
|
|
@@ -1266,6 +1347,20 @@
|
|
|
1266
1347
|
"properties": {
|
|
1267
1348
|
"agent": { "$ref": "#/$defs/Agent" },
|
|
1268
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
|
+
},
|
|
1269
1364
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
1270
1365
|
},
|
|
1271
1366
|
"required": ["agent"]
|
|
@@ -1749,7 +1844,7 @@
|
|
|
1749
1844
|
"type": "object",
|
|
1750
1845
|
"x-method": "map/federation/connect",
|
|
1751
1846
|
"x-tier": "extension",
|
|
1752
|
-
"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.",
|
|
1753
1848
|
"properties": {
|
|
1754
1849
|
"jsonrpc": { "$ref": "#/$defs/JsonRpcVersion" },
|
|
1755
1850
|
"id": { "$ref": "#/$defs/RequestId" },
|
|
@@ -1760,15 +1855,49 @@
|
|
|
1760
1855
|
"systemId": { "type": "string" },
|
|
1761
1856
|
"endpoint": { "type": "string", "format": "uri" },
|
|
1762
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": {
|
|
1763
1878
|
"type": "object",
|
|
1879
|
+
"description": "Additional auth context for single-request federation auth",
|
|
1764
1880
|
"properties": {
|
|
1765
|
-
"
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
"
|
|
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
|
+
}
|
|
1772
1901
|
},
|
|
1773
1902
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
1774
1903
|
},
|
|
@@ -1779,9 +1908,33 @@
|
|
|
1779
1908
|
},
|
|
1780
1909
|
"FederationConnectResponse": {
|
|
1781
1910
|
"type": "object",
|
|
1782
|
-
"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.",
|
|
1783
1912
|
"properties": {
|
|
1784
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
|
+
},
|
|
1785
1938
|
"systemInfo": {
|
|
1786
1939
|
"type": "object",
|
|
1787
1940
|
"properties": {
|
|
@@ -2553,6 +2706,362 @@
|
|
|
2553
2706
|
"_meta": { "$ref": "#/$defs/Meta" }
|
|
2554
2707
|
},
|
|
2555
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"]
|
|
2556
3065
|
}
|
|
2557
3066
|
}
|
|
2558
3067
|
}
|