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.
- package/README.md +4 -0
- package/docs/00-design-specification.md +36 -0
- package/docs/01-open-questions.md +0 -5
- package/docs/02-wire-protocol.md +1 -1
- package/docs/07-federation.md +81 -5
- package/docs/09-authentication.md +748 -0
- package/docs/10-environment-awareness.md +242 -0
- package/docs/10-mail-protocol.md +553 -0
- package/docs/11-anp-inspired-improvements.md +1079 -0
- package/docs/12-anp-implementation-plan.md +641 -0
- package/docs/agent-iam-integration.md +877 -0
- package/docs/agentic-mesh-integration-draft.md +459 -0
- package/docs/git-transport-draft.md +251 -0
- package/package.json +5 -4
- package/schema/meta.json +200 -2
- package/schema/schema.json +1252 -13
package/README.md
CHANGED
|
@@ -155,6 +155,16 @@ interface MAPParticipantCapabilities {
|
|
|
155
155
|
// Scope management
|
|
156
156
|
canCreateScopes: boolean;
|
|
157
157
|
canManageScopes: boolean;
|
|
158
|
+
|
|
159
|
+
// Mail (conversations/turns) - extension
|
|
160
|
+
mail?: {
|
|
161
|
+
enabled?: boolean; // Server supports mail (response only)
|
|
162
|
+
canCreate?: boolean; // Can create conversations
|
|
163
|
+
canJoin?: boolean; // Can join conversations
|
|
164
|
+
canInvite?: boolean; // Can invite participants
|
|
165
|
+
canViewHistory?: boolean; // Can view conversation history
|
|
166
|
+
canCreateThreads?: boolean; // Can create threads
|
|
167
|
+
};
|
|
158
168
|
}
|
|
159
169
|
```
|
|
160
170
|
|
|
@@ -318,6 +328,14 @@ interface MAPMessage {
|
|
|
318
328
|
isResult?: boolean;
|
|
319
329
|
priority?: "urgent" | "high" | "normal" | "low";
|
|
320
330
|
delivery?: "fire-and-forget" | "acknowledged" | "guaranteed";
|
|
331
|
+
|
|
332
|
+
// Mail turn tracking (optional extension)
|
|
333
|
+
mail?: {
|
|
334
|
+
conversationId: string; // Record as turn in this conversation
|
|
335
|
+
threadId?: string; // Optionally assign to thread
|
|
336
|
+
inReplyTo?: string; // Turn ID this is replying to
|
|
337
|
+
visibility?: TurnVisibility; // Who can see this turn
|
|
338
|
+
};
|
|
321
339
|
};
|
|
322
340
|
}
|
|
323
341
|
```
|
|
@@ -421,8 +439,25 @@ type MAPAddress =
|
|
|
421
439
|
// FEDERATION
|
|
422
440
|
"map/federation/connect" // Connect to peer MAP system
|
|
423
441
|
"map/federation/route" // Route message to peer system
|
|
442
|
+
|
|
443
|
+
// MAIL (Conversations, Turns, Threads)
|
|
444
|
+
"mail/create" // Create a conversation
|
|
445
|
+
"mail/get" // Get conversation details with optional includes
|
|
446
|
+
"mail/list" // List conversations with filtering
|
|
447
|
+
"mail/close" // Close a conversation
|
|
448
|
+
"mail/join" // Join a conversation with optional catch-up
|
|
449
|
+
"mail/leave" // Leave a conversation
|
|
450
|
+
"mail/invite" // Invite a participant to a conversation
|
|
451
|
+
"mail/turn" // Record a turn in a conversation
|
|
452
|
+
"mail/turns/list" // List turns with filtering and pagination
|
|
453
|
+
"mail/thread/create" // Create a thread within a conversation
|
|
454
|
+
"mail/thread/list" // List threads in a conversation
|
|
455
|
+
"mail/summary" // Get or generate a conversation summary
|
|
456
|
+
"mail/replay" // Replay conversation turns from a point
|
|
424
457
|
```
|
|
425
458
|
|
|
459
|
+
> See [10-mail-protocol.md](10-mail-protocol.md) for the full Mail Protocol specification.
|
|
460
|
+
|
|
426
461
|
---
|
|
427
462
|
|
|
428
463
|
## Design Decisions Summary
|
|
@@ -450,6 +485,7 @@ type MAPAddress =
|
|
|
450
485
|
- [06-visibility-permissions.md](06-visibility-permissions.md): Visibility & Permission Model
|
|
451
486
|
- [07-federation.md](07-federation.md): Federation & System-to-System Communication
|
|
452
487
|
- [08-macro-agent-migration.md](08-macro-agent-migration.md): macro-agent Migration Example
|
|
488
|
+
- [10-mail-protocol.md](10-mail-protocol.md): Mail Protocol (Conversations, Turns, Threads)
|
|
453
489
|
|
|
454
490
|
---
|
|
455
491
|
|
|
@@ -1048,8 +1048,3 @@ Child specs where these questions originated:
|
|
|
1048
1048
|
- Connection Model & Client Patterns (05-connection-model.md)
|
|
1049
1049
|
- Visibility & Permission Model (06-visibility-permissions.md)
|
|
1050
1050
|
- Federation & System-to-System Communication (07-federation.md)
|
|
1051
|
-
|
|
1052
|
-
External references:
|
|
1053
|
-
- [A2A Protocol Specification](https://google.github.io/A2A/specification/) - Artifacts and task model
|
|
1054
|
-
- [ACP SDK](https://github.com/anthropics/acp) - Capability negotiation patterns
|
|
1055
|
-
- [Agent Interoperability Survey](https://arxiv.org/html/2505.02279v1) - Protocol comparison
|
package/docs/02-wire-protocol.md
CHANGED
package/docs/07-federation.md
CHANGED
|
@@ -206,18 +206,94 @@ Sensitive computation isolated in secure system, federated for I/O.
|
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
209
|
+
## Single-Request Federation Auth
|
|
210
|
+
|
|
211
|
+
Federation connection can be completed in a single round-trip by including auth credentials in the initial `map/federation/connect` request. When the server can validate the credentials immediately, it returns a fully authenticated response — reducing setup from 2 RTT to 1 RTT.
|
|
212
|
+
|
|
213
|
+
### Flow: Single-Request Auth (Optimized)
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
System A System B
|
|
217
|
+
│ │
|
|
218
|
+
│──── map/federation/connect ─────────────────►│
|
|
219
|
+
│ { systemId, endpoint, auth: { ... } } │
|
|
220
|
+
│ │ ← Validates auth inline
|
|
221
|
+
│◄─── response ────────────────────────────────│
|
|
222
|
+
│ { connected: true, sessionId, principal } │
|
|
223
|
+
│ │
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Flow: Auth Negotiation Fallback
|
|
227
|
+
|
|
228
|
+
If no credentials are provided, or validation fails recoverably, the server returns auth requirements:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
System A System B
|
|
232
|
+
│ │
|
|
233
|
+
│──── map/federation/connect ─────────────────►│
|
|
234
|
+
│ { systemId, endpoint } │
|
|
235
|
+
│ │
|
|
236
|
+
│◄─── response ────────────────────────────────│
|
|
237
|
+
│ { connected: false, │
|
|
238
|
+
│ authRequired: { methods, challenge } } │
|
|
239
|
+
│ │
|
|
240
|
+
│──── map/federation/connect ─────────────────►│
|
|
241
|
+
│ { systemId, endpoint, auth: { ... }, │
|
|
242
|
+
│ authContext: { challenge } } │
|
|
243
|
+
│ │
|
|
244
|
+
│◄─── response ────────────────────────────────│
|
|
245
|
+
│ { connected: true, sessionId, principal } │
|
|
246
|
+
│ │
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
209
251
|
## Security Considerations
|
|
210
252
|
|
|
211
253
|
### Authentication
|
|
212
254
|
|
|
213
255
|
```typescript
|
|
256
|
+
type FederationAuthMethod =
|
|
257
|
+
| "bearer" | "api-key" | "mtls" | "none"
|
|
258
|
+
| "did:wba" | "oauth2" | `x-${string}`;
|
|
259
|
+
|
|
214
260
|
type MAPFederationAuth =
|
|
215
|
-
| { method:
|
|
216
|
-
|
|
|
217
|
-
|
|
218
|
-
|
|
261
|
+
| { method: FederationAuthMethod; credentials?: string; metadata?: Record<string, unknown> }
|
|
262
|
+
| DIDWBACredentials;
|
|
263
|
+
|
|
264
|
+
interface DIDWBACredentials {
|
|
265
|
+
method: "did:wba";
|
|
266
|
+
metadata: { did: string; proof: DIDWBAProof };
|
|
267
|
+
}
|
|
219
268
|
```
|
|
220
269
|
|
|
270
|
+
#### `did:wba` — Decentralized Identity for Federation
|
|
271
|
+
|
|
272
|
+
The `did:wba` method enables domain-anchored decentralized identity for federation. An identity like `did:wba:agents.example.com:gateway` resolves to a DID document at `https://agents.example.com/gateway/did.json` containing public keys and MAP service endpoints.
|
|
273
|
+
|
|
274
|
+
**Authentication flow:**
|
|
275
|
+
1. Connecting system provides its DID and a cryptographic proof (ECDSA P-256 over challenge nonce)
|
|
276
|
+
2. Receiving system resolves the DID document via HTTPS
|
|
277
|
+
3. Receiving system verifies the proof against the public key in the DID document
|
|
278
|
+
4. On success, the connecting system is authenticated as the DID principal
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"method": "did:wba",
|
|
283
|
+
"metadata": {
|
|
284
|
+
"did": "did:wba:agents.example.com:gateway",
|
|
285
|
+
"proof": {
|
|
286
|
+
"type": "JsonWebSignature2020",
|
|
287
|
+
"created": "2026-02-10T12:00:00.000Z",
|
|
288
|
+
"challenge": "map_chal_01ABCDEFGHJ0123456789AB",
|
|
289
|
+
"jws": "eyJhbGciOi..."
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
See `docs/09-authentication.md` for full details on all auth methods including `did:wba`, and `docs/11-anp-inspired-improvements.md` Proposal 1 for the design rationale.
|
|
296
|
+
|
|
221
297
|
### Message Signing
|
|
222
298
|
|
|
223
299
|
```typescript
|
|
@@ -253,7 +329,7 @@ interface MAPFederationQueueConfig {
|
|
|
253
329
|
## Open Questions
|
|
254
330
|
|
|
255
331
|
1. **Transitive federation**: If A↔B and B↔C, can A route to C via B?
|
|
256
|
-
2.
|
|
332
|
+
2. ~~**Federation discovery**: Should there be a discovery mechanism for finding peers?~~ — Partially addressed by `did:wba` (DID document service endpoints) and proposed `.well-known` discovery (see `docs/11-anp-inspired-improvements.md` Proposal 2).
|
|
257
333
|
3. **Consistency**: How to handle concurrent updates across federated systems?
|
|
258
334
|
4. **Schema versioning**: What if peers have different protocol versions?
|
|
259
335
|
5. **Audit requirements**: What federation activity must be logged?
|