agent-protocols 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -100
- package/dist/mail-client.d.ts +1 -1
- package/dist/mail-client.d.ts.map +1 -1
- package/dist/mail-client.js +3 -3
- package/dist/mail-client.js.map +1 -1
- package/dist/mail-schema.d.ts +57 -55
- package/dist/mail-schema.d.ts.map +1 -1
- package/dist/mail-schema.js +66 -59
- package/dist/mail-schema.js.map +1 -1
- package/dist/mail.d.ts +37 -25
- package/dist/mail.d.ts.map +1 -1
- package/dist/mail.js +154 -89
- package/dist/mail.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ TypeScript SDK for the draft Agent Identity, Agent Profile, Agent Delegation, Ag
|
|
|
9
9
|
- `delegation`: principal documents and resolution, Controller records with `supersedes` lineage, grant/revoke payloads, credentials, query shapes, authority, acceptance, historical, and use checks, `verifyDelegationCredential` over the latest grant record, and `auditDelegationHistory` for auditors.
|
|
10
10
|
- `discourse`: the ADP kernel — twelve built-in event types, freshness classes, room policy (`invites`, `open_roles`), signed join requests and reviews, the type system with the portable type schema profile, redacted records, server records, and archive verification.
|
|
11
11
|
- `knowledge`: signed research contributions, validation, in-memory retrieval and state.
|
|
12
|
-
- `mail`: signed mailbox cards
|
|
13
|
-
- `mail-client`:
|
|
12
|
+
- `mail`: signed mailbox cards, sender-signed HPKE packets, card pins, key retention, inbox deduplication, and relay state.
|
|
13
|
+
- `mail-client`: sender-signed Mail delivery and owner-authenticated retrieval with strict HTTP response checks.
|
|
14
14
|
- `http-client`: fetch-based Profile, Delegation, Discourse, and Knowledge clients. Lists use `{ result, next_cursor }`; non-2xx responses throw `HttpResponseError` with the protocol `code`, `data`, and `Max-Seen-Nonce`.
|
|
15
15
|
- `local-connector`: the Local Agent Protocols MCP connector: 23 standard tools, resource URIs, structured views, and the connector engine.
|
|
16
16
|
|
|
@@ -131,112 +131,84 @@ additional HTTP, isolation, pruning, and pagination regressions.
|
|
|
131
131
|
|
|
132
132
|
## Agent Mail
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
Messages have no inner signature. A packet is the sender-signed `mail.submit`
|
|
135
|
+
envelope around the HPKE ciphertext. HPKE AAD binds its protocol, type, actor,
|
|
136
|
+
creation time, nonce and header. Relays can verify the sender without reading
|
|
137
|
+
the subject or body; this format does not hide the communication graph. A
|
|
138
|
+
plaintext message alone is not a transferable author-signed artifact.
|
|
139
|
+
|
|
140
|
+
`message_id` is a random 32-byte base64url identifier retained across retries;
|
|
141
|
+
`from`, original `created_at`, recipient, expiration, thread and parts are also
|
|
142
|
+
immutable. The outer hash is the packet ID, not the logical message ID. Retries
|
|
143
|
+
reuse the same packet on every route until it expires; only a card change needs
|
|
144
|
+
a fresh packet (new HPKE randomness, time and nonce) around the same message. Replies refer to the parent's `message_id` and must
|
|
145
|
+
bind both participants and the thread. Content is inert and never executes tools.
|
|
146
|
+
|
|
147
|
+
Packets are asynchronous signed objects, not live writes: relays and recipients
|
|
148
|
+
reject only future-dated packets and apply no nonce maximum, so offline and
|
|
149
|
+
out-of-order messages remain usable. Relays deduplicate packet IDs with
|
|
150
|
+
tombstones; only card publishes use the live-write nonce store. Inbox
|
|
151
|
+
deduplication is scoped to the recipient, sender and message ID; different
|
|
152
|
+
content under an accepted identity is rejected, not overwritten. Sender policy
|
|
153
|
+
is checked before decryption.
|
|
154
|
+
|
|
155
|
+
The state helpers are **in memory**, not hosted or durable services. Persist
|
|
156
|
+
snapshots atomically before acknowledging storage/deletion or acting. Relay
|
|
157
|
+
snapshots include sender policies but not the short-lived nonce cache.
|
|
158
|
+
Keyring snapshots contain raw private keys and need protected storage. Pruning
|
|
159
|
+
keys cannot erase copies in backups. Production HPKE always uses fresh randomness.
|
|
160
|
+
|
|
161
|
+
Mailbox addressing uses `did:agent:<key>/mail/<mailbox_id>` and optional
|
|
162
|
+
`?route=<origin>` hints. Parse/format helpers reuse Agent Identity's Agent URLs.
|
|
163
|
+
Hints do not authorize a route; verified, pinned cards supply current routes.
|
|
164
|
+
The local MCP connector does not yet expose Mail tools.
|
|
138
165
|
|
|
139
166
|
```ts
|
|
140
167
|
import {
|
|
141
168
|
AgentSigner, ClientNonceManager, MailEncryptionKey, MailCardCache,
|
|
142
|
-
MailKeyring, MailInbox,
|
|
169
|
+
MailKeyring, MailInbox, createMailMessage, mailboxPublishEvent,
|
|
143
170
|
mailTextPart, newMailId,
|
|
144
171
|
} from "agent-protocols";
|
|
145
172
|
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const bobEncryption = MailEncryptionKey.generate(); // Independent X25519 key.
|
|
149
|
-
const aliceNonces = new ClientNonceManager();
|
|
150
|
-
const bobNonces = new ClientNonceManager();
|
|
173
|
+
const sender = AgentSigner.generate(), owner = AgentSigner.generate();
|
|
174
|
+
const key = MailEncryptionKey.generate(), nonces = new ClientNonceManager();
|
|
151
175
|
const now = Date.now();
|
|
152
|
-
const card =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
));
|
|
166
|
-
const cards = new MailCardCache();
|
|
167
|
-
const packet = await cards.seal(letter, card, now);
|
|
168
|
-
// Persist cards.snapshot() and the original outgoing letter before delivery.
|
|
169
|
-
|
|
170
|
-
const keys = new MailKeyring(bob.agentId());
|
|
171
|
-
keys.add(card, bobEncryption);
|
|
176
|
+
const card = owner.signEvent(mailboxPublishEvent(owner.agentId(), now, now, {
|
|
177
|
+
mailbox_id: newMailId(), expires_at: now + 86400000,
|
|
178
|
+
receive_until: now + 172800000, public_key: key.publicKey(),
|
|
179
|
+
routes: ["https://relay.example"], max_packet_bytes: 65536,
|
|
180
|
+
}));
|
|
181
|
+
const message = createMailMessage(sender.agentId(), now, {
|
|
182
|
+
to: owner.agentId(), expires_at: now + 86400000, thread_id: newMailId(),
|
|
183
|
+
parts: [mailTextPart("A private question")],
|
|
184
|
+
});
|
|
185
|
+
const pins = new MailCardCache();
|
|
186
|
+
const packet = await pins.seal(message, card, sender, nonces.nextNonce(now), now);
|
|
187
|
+
const keys = new MailKeyring(owner.agentId());
|
|
188
|
+
keys.add(card, key);
|
|
172
189
|
const inbox = new MailInbox(keys);
|
|
173
|
-
const
|
|
174
|
-
//
|
|
175
|
-
// result.kind is "accepted" or "duplicate"; no reply or action is automatic.
|
|
190
|
+
const { kind, message: received } = await inbox.accept(packet, now);
|
|
191
|
+
// Persist pins.snapshot(), keys.exportSnapshot() and inbox.snapshot() before ack.
|
|
176
192
|
```
|
|
177
193
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
`
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
| `validateMailboxCard`, `validateMailSenderCard`, `validateMailLetter`, `validateMailPacket` | Structural, signature, origin, lifetime, media, and encryption-key checks. A sender card must be unexpired and have routes. Historical letters never advance live nonce state. |
|
|
200
|
-
| `mailboxPublishEvent`, `mailMessageEvent` | Build Identity events for signing with an `AgentSigner`. |
|
|
201
|
-
| `parseMailAddress`, `formatMailAddress` | The stable address `did:agent:<key>/mail/<mailbox_id>` and the contact address with `?route=<origin>` hints (Mail Section 3.3), built on Identity's `parseAgentUrl` / `formatAgentUrl`. Routes in an address are unauthenticated hints; the pinned card's routes win. |
|
|
202
|
-
| `MailEncryptionKey.generate/fromBytes/publicKey/exportSecret/destroy` | Independently generate or restore X25519 keys, export explicit sensitive backups, and clear owned secret bytes. |
|
|
203
|
-
| `sealMailPacket`, `openMailPacket` | Stateless, fixed-suite HPKE with canonical framing and authenticated recipient/card/header binding. Use a `MailCardCache` for rollback protection and `MailInbox` for acceptance/deduplication. |
|
|
204
|
-
| `MailCardCache.observe/seal/prune/snapshot` | Pins the greatest-nonce card per mailbox; an older or conflicting card fails with `stale_card`. A newer closed/expired card still updates the pin although sending fails, so persist the snapshot on these outcomes. `prune` drops pins once every earlier card has expired. |
|
|
205
|
-
| `MailKeyring.add/open/prune/exportSnapshot/restore` | Retain old verified cards and secrets through their `receive_until`. Snapshots include secrets and require protected storage. |
|
|
206
|
-
| `MailInbox.accept/has/prune/snapshot` | Cross-route, cross-encryption deduplication by letter ID, with concurrent receive protection. The application stores accepted letters. Restore with `new MailInbox(keyring, snapshot)`. |
|
|
207
|
-
| `MailRelayStore` | Live card publication, injectable Identity nonce store, route checks, opaque packets, per-mailbox quotas, tombstones, owner JWT authorization, and `seq` cursors. `prune` drops expired packets and tombstones and forgets mailboxes whose current card's `receive_until` passed. |
|
|
208
|
-
| `validateMailReply`, `mailTextPart`, `mailPartText` | Bind a reply to its parent's participants, letter ID, and thread; encode/decode inert UTF-8 content without rendering or executing it. |
|
|
209
|
-
|
|
210
|
-
`MailRelayStore(origin, { clock?, nonceStore?, maxPackets?, maxBytes?, snapshot? })`
|
|
211
|
-
provides `publish`, `card`, `deliver`, `list`, `delete`, `prune`, `discovery`, and
|
|
212
|
-
`snapshot`. `publishJson` and `deliverJson` enforce a raw UTF-8 body bound before
|
|
213
|
-
strict parsing. Default per-mailbox quotas are 10,000 packets and 64 MiB and
|
|
214
|
-
fail with `rate_limited`; a real HTTP server must also bound raw request
|
|
215
|
-
streams, registration, concurrency, and rate. Delivery results never include the
|
|
216
|
-
mailbox `seq`. An injected nonce store can be shared with other protocol services
|
|
217
|
-
at the same origin; the short-lived nonce cache is not part of the Mail snapshot.
|
|
218
|
-
|
|
219
|
-
These stores are in-memory building blocks, not durable services. Persist relay
|
|
220
|
-
state before acknowledging a write, and persist recipient acceptance before
|
|
221
|
-
transport deletion or executing anything. Snapshots and returned objects are
|
|
222
|
-
detached copies; restore assumes an authenticated, current local backup and
|
|
223
|
-
checks only its version and shape. No API automatically authorizes actions,
|
|
224
|
-
sends replies, fetches attachments, or renders active content.
|
|
225
|
-
|
|
226
|
-
Encryption uses the maintained [hpke-js](https://github.com/dajiaji/hpke-js)
|
|
227
|
-
packages `@hpke/core`, `@hpke/dhkem-x25519`, and `@hpke/chacha20poly1305` with
|
|
228
|
-
RFC 9180 Base mode, X25519/HKDF-SHA256/ChaCha20Poly1305. Production sealing always
|
|
229
|
-
uses fresh randomness and a new context for one message; deterministic material
|
|
230
|
-
is confined to tests. The portable build uses Web Crypto-compatible runtimes
|
|
231
|
-
(Node.js, secure browser contexts, and Workers), without Node `Buffer` APIs in
|
|
232
|
-
production code. The SDK clears its owned temporary plaintext/raw key buffers;
|
|
233
|
-
JavaScript garbage collection and library-owned `CryptoKey` copies prevent a
|
|
234
|
-
guarantee that every secret copy is immediately erased. Base HPKE supplies no
|
|
235
|
-
ratchet, recipient-compromise forward secrecy, post-quantum security, or network
|
|
236
|
-
anonymity.
|
|
237
|
-
|
|
238
|
-
Mail tests execute all shared structural/rejection/lifecycle cases, exact signing
|
|
239
|
-
and encryption fixtures, and an independent RFC 9180 known-answer vector.
|
|
240
|
-
Additional tests cover random round trips, concurrent delivery, snapshots,
|
|
241
|
-
rollback, route changes and key rotation, JWT boundaries, HTTP redirects,
|
|
242
|
-
credentials, malformed responses, authorization, pagination, and quotas.
|
|
194
|
+
`agent-protocols/mail` exports `MailMessagePayload` for plaintext and
|
|
195
|
+
`MailPacket = Envelope<MailPacketPayload>` for the signed wire object.
|
|
196
|
+
`sealMailPacket(message, card, signer, nonce, now)` returns a packet;
|
|
197
|
+
`openMailPacket` verifies and decrypts it. `validateMailMessage` checks
|
|
198
|
+
plaintext, `validateMailPacket` checks the packet, and `mailPacketId` returns its
|
|
199
|
+
event hash. `validateMailReply` checks parent bindings. `MailInbox.accept`
|
|
200
|
+
returns `{ kind, message }`. `MailInbox.setSenderBlocked(sender, blocked)`
|
|
201
|
+
controls local pre-decryption policy. `MailRelayStore.setSenderBlocked(mailboxId,
|
|
202
|
+
sender, blocked)` is relay-side policy: Mail defines no management endpoint, so
|
|
203
|
+
the host authenticates the mailbox owner first. Exact retries return historical
|
|
204
|
+
status without new admission. The injected `nonceStore` applies to card publishes.
|
|
205
|
+
|
|
206
|
+
`MailClient` is exported from the root and `agent-protocols/mail-client`.
|
|
207
|
+
It uses fixed HTTPS paths for `publish`, `card`, `deliver`, `list`, `pages` and
|
|
208
|
+
`delete`. Pass a shared `cardCache` and persist it even when a read reports an
|
|
209
|
+
unusable newer card. Delivery exposes the signed actor but never sends ambient
|
|
210
|
+
credentials. Fetch uses `credentials: "omit"` and `redirect: "error"`; owner
|
|
211
|
+
reads/deletes validate their JWT first. Responses have size, strict JSON and
|
|
212
|
+
binding checks. Supply `allowUrl` and transport-level DNS/egress policy for the
|
|
213
|
+
deployment. Production code runs in Node, browsers and Workers, with no Node-only
|
|
214
|
+
crypto or Buffer. JS cannot guarantee erasure of provider-owned or GC copies.
|
package/dist/mail-client.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class MailClient {
|
|
|
24
24
|
/** Read and pin the current card, even a closed or expired one. Rollback throws `stale_card`. */
|
|
25
25
|
card(mailboxId: string, owner: string): Promise<MailCardRecord>;
|
|
26
26
|
publish(card: MailboxCard): Promise<MailCardRecord>;
|
|
27
|
-
/**
|
|
27
|
+
/** Sender-signed delivery or exact retransmission of a completed packet. */
|
|
28
28
|
deliver(packet: MailPacket): Promise<MailDeliveryResult>;
|
|
29
29
|
list(mailboxId: string, owner: string, jwt: string, options?: {
|
|
30
30
|
limit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-client.d.ts","sourceRoot":"","sources":["../src/mail-client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC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IAAI,CACR,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAChD,OAAO,CAAC,cAAc,CAAC,CAkBzB;IACD,8EAA8E;IACvE,KAAK,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,MAAM,EACjB,KAAK,SAAM,GACV,cAAc,CAAC,cAAc,CAAC,CAahC;IACK,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAWf;YACa,OAAO;CAoHtB"}
|
package/dist/mail-client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Same-origin Mail HTTP client. Packet delivery is
|
|
1
|
+
/** Same-origin Mail HTTP client. Packet delivery is sender-signed; read/delete require owner-bound JWTs. */
|
|
2
2
|
import { parseStrictJson, validateOrigin } from "./identity.js";
|
|
3
3
|
import { protocolError } from "./errors.js";
|
|
4
4
|
import { HttpResponseError } from "./http-client.js";
|
|
@@ -46,10 +46,10 @@ export class MailClient {
|
|
|
46
46
|
validateMailCardRecord(r, card.event.actor, card.event.payload.mailbox_id, card.hash);
|
|
47
47
|
return r;
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
49
|
+
/** Sender-signed delivery or exact retransmission of a completed packet. */
|
|
50
50
|
async deliver(packet) {
|
|
51
51
|
validateMailPacket(packet);
|
|
52
|
-
const r = await this.request(`${this.base}/${packet.header.mailbox_id}/packets`, "POST", 202, packet);
|
|
52
|
+
const r = await this.request(`${this.base}/${packet.event.payload.header.mailbox_id}/packets`, "POST", 202, packet);
|
|
53
53
|
validateMailDeliveryResult(r, packet);
|
|
54
54
|
return r;
|
|
55
55
|
}
|
package/dist/mail-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-client.js","sourceRoot":"","sources":["../src/mail-client.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"mail-client.js","sourceRoot":"","sources":["../src/mail-client.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAkB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GAOvB,MAAM,WAAW,CAAC;AAUnB,sFAAsF;AACtF,MAAM,OAAO,UAAU;IAOV,OAAO;IACC,OAAO;IAPjB,SAAS,CAAgB;IACjB,SAAS,CAAY;IACrB,IAAI,CAAS;IACb,KAAK,CAAe;IACpB,gBAAgB,CAAS;IAC1C,YACW,OAAe,EACP,OAAO,GAAsB,EAAE;uBADvC,OAAO;uBACC,OAAO;QAExB,cAAc,CAAC,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,aAAa,EAAE,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC;QACvC,IAAI,CAAC,gBAAgB;YACnB,OAAO,CAAC,gBAAgB,IAAI,GAAG,GAAG,qBAAqB,CAAC;QAC1D,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAC5C,IAAI,CAAC,gBA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ACJ,CAAC;IACH,CAAC;CACF"}
|
package/dist/mail-schema.d.ts
CHANGED
|
@@ -2,12 +2,7 @@ export declare const MAIL_SCHEMA: {
|
|
|
2
2
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
3
|
readonly $id: "https://agent-protocols.dev/schemas/agent-mail/1.0.schema.json";
|
|
4
4
|
readonly title: "Agent Mail Protocol 1.0";
|
|
5
|
-
readonly description: "Structural definitions
|
|
6
|
-
readonly oneOf: readonly [{
|
|
7
|
-
readonly $ref: "#/$defs/envelope";
|
|
8
|
-
}, {
|
|
9
|
-
readonly $ref: "#/$defs/packet";
|
|
10
|
-
}];
|
|
5
|
+
readonly description: "Structural definitions for owner-signed cards, sender-signed encrypted packets, plaintext messages and HTTP records. Signatures, sender/recipient/AAD binding, canonical encoding, time, size, sender policy and logical message deduplication require semantic validation.";
|
|
11
6
|
readonly $defs: {
|
|
12
7
|
readonly agentId: {
|
|
13
8
|
readonly type: "string";
|
|
@@ -102,8 +97,17 @@ export declare const MAIL_SCHEMA: {
|
|
|
102
97
|
};
|
|
103
98
|
readonly messagePayload: {
|
|
104
99
|
readonly type: "object";
|
|
105
|
-
readonly required: readonly ["to", "expires_at", "thread_id", "parts"];
|
|
100
|
+
readonly required: readonly ["message_id", "from", "created_at", "to", "expires_at", "thread_id", "parts"];
|
|
106
101
|
readonly properties: {
|
|
102
|
+
readonly message_id: {
|
|
103
|
+
readonly $ref: "#/$defs/hash32";
|
|
104
|
+
};
|
|
105
|
+
readonly from: {
|
|
106
|
+
readonly $ref: "#/$defs/agentId";
|
|
107
|
+
};
|
|
108
|
+
readonly created_at: {
|
|
109
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
110
|
+
};
|
|
107
111
|
readonly to: {
|
|
108
112
|
readonly $ref: "#/$defs/agentId";
|
|
109
113
|
};
|
|
@@ -175,61 +179,17 @@ export declare const MAIL_SCHEMA: {
|
|
|
175
179
|
};
|
|
176
180
|
readonly additionalProperties: false;
|
|
177
181
|
};
|
|
178
|
-
readonly messageEvent: {
|
|
179
|
-
readonly type: "object";
|
|
180
|
-
readonly required: readonly ["protocol", "type", "actor", "created_at", "nonce", "payload"];
|
|
181
|
-
readonly properties: {
|
|
182
|
-
readonly protocol: {
|
|
183
|
-
readonly const: "agent-mail/1.0";
|
|
184
|
-
};
|
|
185
|
-
readonly type: {
|
|
186
|
-
readonly const: "mail.message";
|
|
187
|
-
};
|
|
188
|
-
readonly actor: {
|
|
189
|
-
readonly $ref: "#/$defs/agentId";
|
|
190
|
-
};
|
|
191
|
-
readonly created_at: {
|
|
192
|
-
readonly $ref: "#/$defs/timestampMs";
|
|
193
|
-
};
|
|
194
|
-
readonly nonce: {
|
|
195
|
-
readonly $ref: "#/$defs/positiveSafeInteger";
|
|
196
|
-
};
|
|
197
|
-
readonly payload: {
|
|
198
|
-
readonly $ref: "#/$defs/messagePayload";
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
readonly additionalProperties: false;
|
|
202
|
-
};
|
|
203
|
-
readonly messageEnvelope: {
|
|
204
|
-
readonly type: "object";
|
|
205
|
-
readonly required: readonly ["event", "hash", "signature"];
|
|
206
|
-
readonly properties: {
|
|
207
|
-
readonly event: {
|
|
208
|
-
readonly $ref: "#/$defs/messageEvent";
|
|
209
|
-
};
|
|
210
|
-
readonly hash: {
|
|
211
|
-
readonly $ref: "#/$defs/hash32";
|
|
212
|
-
};
|
|
213
|
-
readonly signature: {
|
|
214
|
-
readonly $ref: "#/$defs/signature";
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
readonly additionalProperties: false;
|
|
218
|
-
};
|
|
219
182
|
readonly envelope: {
|
|
220
183
|
readonly oneOf: readonly [{
|
|
221
184
|
readonly $ref: "#/$defs/mailboxCardEnvelope";
|
|
222
185
|
}, {
|
|
223
|
-
readonly $ref: "#/$defs/
|
|
186
|
+
readonly $ref: "#/$defs/packetEnvelope";
|
|
224
187
|
}];
|
|
225
188
|
};
|
|
226
189
|
readonly packetHeader: {
|
|
227
190
|
readonly type: "object";
|
|
228
|
-
readonly required: readonly ["
|
|
191
|
+
readonly required: readonly ["mailbox_id", "card_hash", "expires_at"];
|
|
229
192
|
readonly properties: {
|
|
230
|
-
readonly protocol: {
|
|
231
|
-
readonly const: "agent-mail/1.0";
|
|
232
|
-
};
|
|
233
193
|
readonly mailbox_id: {
|
|
234
194
|
readonly $ref: "#/$defs/id16";
|
|
235
195
|
};
|
|
@@ -242,7 +202,7 @@ export declare const MAIL_SCHEMA: {
|
|
|
242
202
|
};
|
|
243
203
|
readonly additionalProperties: false;
|
|
244
204
|
};
|
|
245
|
-
readonly
|
|
205
|
+
readonly packetPayload: {
|
|
246
206
|
readonly type: "object";
|
|
247
207
|
readonly required: readonly ["header", "enc", "ciphertext"];
|
|
248
208
|
readonly properties: {
|
|
@@ -297,7 +257,7 @@ export declare const MAIL_SCHEMA: {
|
|
|
297
257
|
readonly $ref: "#/$defs/hash32";
|
|
298
258
|
};
|
|
299
259
|
readonly packet: {
|
|
300
|
-
readonly $ref: "#/$defs/
|
|
260
|
+
readonly $ref: "#/$defs/packetEnvelope";
|
|
301
261
|
};
|
|
302
262
|
readonly accepted_at: {
|
|
303
263
|
readonly $ref: "#/$defs/timestampMs";
|
|
@@ -348,6 +308,48 @@ export declare const MAIL_SCHEMA: {
|
|
|
348
308
|
readonly additionalProperties: true;
|
|
349
309
|
readonly description: "Mail defines no endpoint names; delivery paths are fixed at each card route. Other members are inert extensions.";
|
|
350
310
|
};
|
|
311
|
+
readonly packetEvent: {
|
|
312
|
+
readonly type: "object";
|
|
313
|
+
readonly required: readonly ["protocol", "type", "actor", "created_at", "nonce", "payload"];
|
|
314
|
+
readonly properties: {
|
|
315
|
+
readonly protocol: {
|
|
316
|
+
readonly const: "agent-mail/1.0";
|
|
317
|
+
};
|
|
318
|
+
readonly type: {
|
|
319
|
+
readonly const: "mail.submit";
|
|
320
|
+
};
|
|
321
|
+
readonly actor: {
|
|
322
|
+
readonly $ref: "#/$defs/agentId";
|
|
323
|
+
};
|
|
324
|
+
readonly created_at: {
|
|
325
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
326
|
+
};
|
|
327
|
+
readonly nonce: {
|
|
328
|
+
readonly $ref: "#/$defs/positiveSafeInteger";
|
|
329
|
+
};
|
|
330
|
+
readonly payload: {
|
|
331
|
+
readonly $ref: "#/$defs/packetPayload";
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
readonly additionalProperties: false;
|
|
335
|
+
};
|
|
336
|
+
readonly packetEnvelope: {
|
|
337
|
+
readonly type: "object";
|
|
338
|
+
readonly required: readonly ["event", "hash", "signature"];
|
|
339
|
+
readonly properties: {
|
|
340
|
+
readonly event: {
|
|
341
|
+
readonly $ref: "#/$defs/packetEvent";
|
|
342
|
+
};
|
|
343
|
+
readonly hash: {
|
|
344
|
+
readonly $ref: "#/$defs/hash32";
|
|
345
|
+
};
|
|
346
|
+
readonly signature: {
|
|
347
|
+
readonly $ref: "#/$defs/signature";
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
readonly additionalProperties: false;
|
|
351
|
+
};
|
|
351
352
|
};
|
|
353
|
+
readonly $ref: "#/$defs/envelope";
|
|
352
354
|
};
|
|
353
355
|
//# sourceMappingURL=mail-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-schema.d.ts","sourceRoot":"","sources":["../src/mail-schema.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW;aACtB,OAAO,EAAE,8CAA8C;aACvD,GAAG,EAAE,gEAAgE;aACrE,KAAK,EAAE,yBAAyB;aAChC,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"mail-schema.d.ts","sourceRoot":"","sources":["../src/mail-schema.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW;aACtB,OAAO,EAAE,8CAA8C;aACvD,GAAG,EAAE,gEAAgE;aACrE,KAAK,EAAE,yBAAyB;aAChC,WAAW,EACT,6QAA6Q;aAC/Q,K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