agent-protocols 0.10.1 → 0.11.0
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 +117 -2
- package/dist/identity.d.ts +14 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +79 -2
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mail-client.d.ts +38 -0
- package/dist/mail-client.d.ts.map +1 -0
- package/dist/mail-client.js +176 -0
- package/dist/mail-client.js.map +1 -0
- package/dist/mail-schema.d.ts +353 -0
- package/dist/mail-schema.d.ts.map +1 -0
- package/dist/mail-schema.js +369 -0
- package/dist/mail-schema.js.map +1 -0
- package/dist/mail.d.ts +232 -0
- package/dist/mail.d.ts.map +1 -0
- package/dist/mail.js +752 -0
- package/dist/mail.js.map +1 -0
- package/package.json +14 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/** Same-origin Mail HTTP client. Packet delivery is anonymous; read/delete require owner-bound JWTs. */
|
|
2
|
+
import { parseStrictJson, validateOrigin } from "./identity.js";
|
|
3
|
+
import { protocolError } from "./errors.js";
|
|
4
|
+
import { HttpResponseError } from "./http-client.js";
|
|
5
|
+
import { MAIL_MAX_PACKET_BYTES, MailCardCache, decodeMailBytes, mailCanonicalBytes, validateMailboxCard, validateMailCardRecord, validateMailDeliveryResult, validateMailDiscovery, validateMailOwnerJwt, validateMailPacket, validateMailPacketList, } from "./mail.js";
|
|
6
|
+
/** Client for one relay origin (a card route). Paths are fixed at `/v1/mailboxes`. */
|
|
7
|
+
export class MailClient {
|
|
8
|
+
service;
|
|
9
|
+
options;
|
|
10
|
+
cardCache;
|
|
11
|
+
fetchImpl;
|
|
12
|
+
base;
|
|
13
|
+
clock;
|
|
14
|
+
maxResponseBytes;
|
|
15
|
+
constructor(service, options = {}) {
|
|
16
|
+
this.service = service;
|
|
17
|
+
this.options = options;
|
|
18
|
+
validateOrigin(service);
|
|
19
|
+
this.cardCache = options.cardCache ?? new MailCardCache();
|
|
20
|
+
this.fetchImpl = options.fetch ?? fetch;
|
|
21
|
+
this.clock = options.clock ?? Date.now;
|
|
22
|
+
this.maxResponseBytes =
|
|
23
|
+
options.maxResponseBytes ?? 128 * MAIL_MAX_PACKET_BYTES;
|
|
24
|
+
if (!Number.isSafeInteger(this.maxResponseBytes) ||
|
|
25
|
+
this.maxResponseBytes < 1)
|
|
26
|
+
throw protocolError("invalid_request", "invalid response limit");
|
|
27
|
+
this.base = service + "/v1/mailboxes";
|
|
28
|
+
}
|
|
29
|
+
/** Informational discovery document; it never changes delivery paths. */
|
|
30
|
+
async protocol() {
|
|
31
|
+
const d = await this.request(this.service + "/.well-known/agent-mail", "GET", 200);
|
|
32
|
+
validateMailDiscovery(d, this.service);
|
|
33
|
+
return d;
|
|
34
|
+
}
|
|
35
|
+
/** Read and pin the current card, even a closed or expired one. Rollback throws `stale_card`. */
|
|
36
|
+
async card(mailboxId, owner) {
|
|
37
|
+
decodeMailBytes(mailboxId, 16);
|
|
38
|
+
const r = await this.request(`${this.base}/${mailboxId}/card`, "GET", 200);
|
|
39
|
+
validateMailCardRecord(r, owner, mailboxId);
|
|
40
|
+
this.cardCache.observe(r.envelope, owner, this.clock(), false);
|
|
41
|
+
return r;
|
|
42
|
+
}
|
|
43
|
+
async publish(card) {
|
|
44
|
+
validateMailboxCard(card);
|
|
45
|
+
const r = await this.request(this.base, "POST", 200, card);
|
|
46
|
+
validateMailCardRecord(r, card.event.actor, card.event.payload.mailbox_id, card.hash);
|
|
47
|
+
return r;
|
|
48
|
+
}
|
|
49
|
+
/** Anonymous delivery or exact retransmission of a completed packet. */
|
|
50
|
+
async deliver(packet) {
|
|
51
|
+
validateMailPacket(packet);
|
|
52
|
+
const r = await this.request(`${this.base}/${packet.header.mailbox_id}/packets`, "POST", 202, packet);
|
|
53
|
+
validateMailDeliveryResult(r, packet);
|
|
54
|
+
return r;
|
|
55
|
+
}
|
|
56
|
+
async list(mailboxId, owner, jwt, options = {}) {
|
|
57
|
+
decodeMailBytes(mailboxId, 16);
|
|
58
|
+
validateMailOwnerJwt(jwt, this.service, owner, this.clock());
|
|
59
|
+
const limit = options.limit ?? 100;
|
|
60
|
+
if (!Number.isSafeInteger(limit) ||
|
|
61
|
+
limit < 1 ||
|
|
62
|
+
limit > 1000 ||
|
|
63
|
+
options.cursor === "")
|
|
64
|
+
throw protocolError("invalid_request", "invalid pagination");
|
|
65
|
+
const u = new URL(`${this.base}/${mailboxId}/packets`);
|
|
66
|
+
u.searchParams.set("limit", String(limit));
|
|
67
|
+
if (options.cursor !== undefined)
|
|
68
|
+
u.searchParams.set("cursor", options.cursor);
|
|
69
|
+
const r = await this.request(u.href, "GET", 200, undefined, jwt);
|
|
70
|
+
validateMailPacketList(r, mailboxId, limit);
|
|
71
|
+
return r;
|
|
72
|
+
}
|
|
73
|
+
/** Every page of one enumeration; `seq` must keep increasing across pages. */
|
|
74
|
+
async *pages(mailboxId, owner, jwt, limit = 100) {
|
|
75
|
+
let cursor, seq = 0;
|
|
76
|
+
do {
|
|
77
|
+
const page = await this.list(mailboxId, owner, jwt(), { limit, cursor });
|
|
78
|
+
for (const r of page.result) {
|
|
79
|
+
if (r.seq <= seq)
|
|
80
|
+
throw protocolError("invalid_response", "reordered or repeated page");
|
|
81
|
+
seq = r.seq;
|
|
82
|
+
}
|
|
83
|
+
cursor = page.next_cursor;
|
|
84
|
+
yield page;
|
|
85
|
+
} while (cursor !== undefined);
|
|
86
|
+
}
|
|
87
|
+
async delete(mailboxId, packetId, owner, jwt) {
|
|
88
|
+
decodeMailBytes(mailboxId, 16);
|
|
89
|
+
decodeMailBytes(packetId, 32);
|
|
90
|
+
validateMailOwnerJwt(jwt, this.service, owner, this.clock());
|
|
91
|
+
await this.request(`${this.base}/${mailboxId}/packets/${packetId}`, "DELETE", 204, undefined, jwt);
|
|
92
|
+
}
|
|
93
|
+
async request(url, method, status, body, jwt) {
|
|
94
|
+
const target = new URL(url);
|
|
95
|
+
if (target.origin !== this.service ||
|
|
96
|
+
target.username ||
|
|
97
|
+
target.password ||
|
|
98
|
+
target.hash)
|
|
99
|
+
throw protocolError("invalid_request", "unsafe Mail URL");
|
|
100
|
+
if (this.options.allowUrl && !(await this.options.allowUrl(url)))
|
|
101
|
+
throw protocolError("permission_denied", "URL denied by local network policy");
|
|
102
|
+
const response = await this.fetchImpl(url, {
|
|
103
|
+
method,
|
|
104
|
+
redirect: "error",
|
|
105
|
+
credentials: "omit",
|
|
106
|
+
referrerPolicy: "no-referrer",
|
|
107
|
+
headers: {
|
|
108
|
+
accept: "application/json",
|
|
109
|
+
...(body === undefined ? {} : { "content-type": "application/json" }),
|
|
110
|
+
...(jwt === undefined ? {} : { authorization: `Bearer ${jwt}` }),
|
|
111
|
+
},
|
|
112
|
+
...(body === undefined
|
|
113
|
+
? {}
|
|
114
|
+
: { body: new TextDecoder().decode(mailCanonicalBytes(body)) }),
|
|
115
|
+
});
|
|
116
|
+
if (response.redirected ||
|
|
117
|
+
(response.status >= 300 && response.status < 400) ||
|
|
118
|
+
(response.url && response.url !== url))
|
|
119
|
+
throw protocolError("invalid_response", "redirect or response URL mismatch");
|
|
120
|
+
const declared = response.headers.get("content-length");
|
|
121
|
+
if (declared !== null && Number(declared) > this.maxResponseBytes)
|
|
122
|
+
throw protocolError("invalid_response", "response too large");
|
|
123
|
+
const reader = response.body?.getReader();
|
|
124
|
+
const chunks = [];
|
|
125
|
+
let count = 0;
|
|
126
|
+
if (reader) {
|
|
127
|
+
try {
|
|
128
|
+
for (;;) {
|
|
129
|
+
const r = await reader.read();
|
|
130
|
+
if (r.done)
|
|
131
|
+
break;
|
|
132
|
+
count += r.value.length;
|
|
133
|
+
if (count > this.maxResponseBytes) {
|
|
134
|
+
await reader.cancel();
|
|
135
|
+
throw protocolError("invalid_response", "response too large");
|
|
136
|
+
}
|
|
137
|
+
chunks.push(r.value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
reader.releaseLock();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const bytes = new Uint8Array(count);
|
|
145
|
+
let at = 0;
|
|
146
|
+
for (const c of chunks) {
|
|
147
|
+
bytes.set(c, at);
|
|
148
|
+
at += c.length;
|
|
149
|
+
}
|
|
150
|
+
let text;
|
|
151
|
+
try {
|
|
152
|
+
text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(bytes);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
throw protocolError("invalid_response", "response is not UTF-8");
|
|
156
|
+
}
|
|
157
|
+
if (!response.ok)
|
|
158
|
+
throw new HttpResponseError(response.status, text, response.headers.get("Max-Seen-Nonce") ?? undefined);
|
|
159
|
+
if (response.status !== status)
|
|
160
|
+
throw protocolError("invalid_response", `Mail response requires HTTP ${status}`);
|
|
161
|
+
if (status === 204) {
|
|
162
|
+
if (text)
|
|
163
|
+
throw protocolError("invalid_response", "DELETE response must be empty");
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
if (!/^application\/json(?:\s*;|$)/i.test(response.headers.get("content-type") ?? ""))
|
|
167
|
+
throw protocolError("invalid_response", "response must be application/json");
|
|
168
|
+
try {
|
|
169
|
+
return parseStrictJson(text);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
throw protocolError("invalid_response", "response violates strict I-JSON");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=mail-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-client.js","sourceRoot":"","sources":["../src/mail-client.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EA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MAAM,CAAC;YACP,MAAM,aAAa,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,EAAE;YACd,MAAM,IAAI,iBAAiB,CACzB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,SAAS,CACpD,CAAC;QACJ,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM;YAC5B,MAAM,aAAa,CACjB,kBAAkB,EAClB,+BAA+B,MAAM,EAAE,CACxC,CAAC;QACJ,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,IAAI,IAAI;gBACN,MAAM,aAAa,CACjB,kBAAkB,EAClB,+BAA+B,CAChC,CAAC;YACJ,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IACE,CAAC,+BAA+B,CAAC,IAAI,CACnC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAC3C;YAED,MAAM,aAAa,CACjB,kBAAkB,EAClB,mCAAmC,CACpC,CAAC;QACJ,IAAI,CAAC;YACH,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,aAAa,CACjB,kBAAkB,EAClB,iCAAiC,CAClC,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
export declare const MAIL_SCHEMA: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly $id: "https://agent-protocols.dev/schemas/agent-mail/1.0.schema.json";
|
|
4
|
+
readonly title: "Agent Mail Protocol 1.0";
|
|
5
|
+
readonly description: "Structural definitions; signed objects and packets are closed, while Identity list/discovery extensions are retained. Strict I-JSON, Unicode scalar validity, canonical JCS, parsed URL origins, Ed25519 signatures, HPKE and all-zero X25519 checks, byte lengths, cross-field equality, lifetime bounds, reply binding, authorization, and stateful lifecycle requirements need semantic validation; passing this schema is not protocol conformance. Select a named definition for HTTP response objects.";
|
|
6
|
+
readonly oneOf: readonly [{
|
|
7
|
+
readonly $ref: "#/$defs/envelope";
|
|
8
|
+
}, {
|
|
9
|
+
readonly $ref: "#/$defs/packet";
|
|
10
|
+
}];
|
|
11
|
+
readonly $defs: {
|
|
12
|
+
readonly agentId: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly pattern: "^did:agent:[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$(?![\\s\\S])";
|
|
15
|
+
};
|
|
16
|
+
readonly hash32: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly pattern: "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$(?![\\s\\S])";
|
|
19
|
+
};
|
|
20
|
+
readonly id16: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly pattern: "^[A-Za-z0-9_-]{21}[AQgw]$(?![\\s\\S])";
|
|
23
|
+
};
|
|
24
|
+
readonly signature: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly pattern: "^[A-Za-z0-9_-]{85}[AQgw]$(?![\\s\\S])";
|
|
27
|
+
};
|
|
28
|
+
readonly base64url: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly pattern: "^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-][AQgw]|[A-Za-z0-9_-]{2}[AEIMQUYcgkosw048])?$(?![\\s\\S])";
|
|
31
|
+
};
|
|
32
|
+
readonly timestampMs: {
|
|
33
|
+
readonly type: "integer";
|
|
34
|
+
readonly minimum: 0;
|
|
35
|
+
readonly maximum: 9007199254740991;
|
|
36
|
+
};
|
|
37
|
+
readonly positiveSafeInteger: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly minimum: 1;
|
|
40
|
+
readonly maximum: 9007199254740991;
|
|
41
|
+
};
|
|
42
|
+
readonly httpsOrigin: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly pattern: "^https://[^/?#@\\s]+$(?![\\s\\S])";
|
|
45
|
+
readonly not: {
|
|
46
|
+
readonly pattern: ":443$(?![\\s\\S])";
|
|
47
|
+
};
|
|
48
|
+
readonly description: "Approximate syntax only. Identity canonical HTTPS origin parsing and serialization are a semantic requirement.";
|
|
49
|
+
};
|
|
50
|
+
readonly mailboxCardPayload: {
|
|
51
|
+
readonly type: "object";
|
|
52
|
+
readonly required: readonly ["mailbox_id", "expires_at", "receive_until", "public_key", "routes", "max_packet_bytes"];
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly mailbox_id: {
|
|
55
|
+
readonly $ref: "#/$defs/id16";
|
|
56
|
+
};
|
|
57
|
+
readonly expires_at: {
|
|
58
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
59
|
+
};
|
|
60
|
+
readonly receive_until: {
|
|
61
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
62
|
+
};
|
|
63
|
+
readonly public_key: {
|
|
64
|
+
readonly $ref: "#/$defs/hash32";
|
|
65
|
+
};
|
|
66
|
+
readonly routes: {
|
|
67
|
+
readonly type: "array";
|
|
68
|
+
readonly items: {
|
|
69
|
+
readonly $ref: "#/$defs/httpsOrigin";
|
|
70
|
+
};
|
|
71
|
+
readonly minItems: 0;
|
|
72
|
+
readonly maxItems: 8;
|
|
73
|
+
readonly uniqueItems: true;
|
|
74
|
+
};
|
|
75
|
+
readonly max_packet_bytes: {
|
|
76
|
+
readonly type: "integer";
|
|
77
|
+
readonly minimum: 4096;
|
|
78
|
+
readonly maximum: 1048576;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly additionalProperties: false;
|
|
82
|
+
};
|
|
83
|
+
readonly part: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly required: readonly ["media_type", "data"];
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly media_type: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly maxLength: 127;
|
|
90
|
+
readonly pattern: "^[a-z0-9][a-z0-9!#$&^_.+\\-]*/[a-z0-9][a-z0-9!#$&^_.+\\-]*$(?![\\s\\S])";
|
|
91
|
+
};
|
|
92
|
+
readonly data: {
|
|
93
|
+
readonly $ref: "#/$defs/base64url";
|
|
94
|
+
};
|
|
95
|
+
readonly name: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly minLength: 1;
|
|
98
|
+
readonly maxLength: 255;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly additionalProperties: false;
|
|
102
|
+
};
|
|
103
|
+
readonly messagePayload: {
|
|
104
|
+
readonly type: "object";
|
|
105
|
+
readonly required: readonly ["to", "expires_at", "thread_id", "parts"];
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly to: {
|
|
108
|
+
readonly $ref: "#/$defs/agentId";
|
|
109
|
+
};
|
|
110
|
+
readonly expires_at: {
|
|
111
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
112
|
+
};
|
|
113
|
+
readonly thread_id: {
|
|
114
|
+
readonly $ref: "#/$defs/id16";
|
|
115
|
+
};
|
|
116
|
+
readonly parts: {
|
|
117
|
+
readonly type: "array";
|
|
118
|
+
readonly items: {
|
|
119
|
+
readonly $ref: "#/$defs/part";
|
|
120
|
+
};
|
|
121
|
+
readonly minItems: 1;
|
|
122
|
+
readonly maxItems: 32;
|
|
123
|
+
};
|
|
124
|
+
readonly subject: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly maxLength: 1024;
|
|
127
|
+
};
|
|
128
|
+
readonly in_reply_to: {
|
|
129
|
+
readonly $ref: "#/$defs/hash32";
|
|
130
|
+
};
|
|
131
|
+
readonly reply_card: {
|
|
132
|
+
readonly $ref: "#/$defs/mailboxCardEnvelope";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
};
|
|
137
|
+
readonly mailboxCardEvent: {
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly required: readonly ["protocol", "type", "actor", "created_at", "nonce", "payload"];
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly protocol: {
|
|
142
|
+
readonly const: "agent-mail/1.0";
|
|
143
|
+
};
|
|
144
|
+
readonly type: {
|
|
145
|
+
readonly const: "mailbox.publish";
|
|
146
|
+
};
|
|
147
|
+
readonly actor: {
|
|
148
|
+
readonly $ref: "#/$defs/agentId";
|
|
149
|
+
};
|
|
150
|
+
readonly created_at: {
|
|
151
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
152
|
+
};
|
|
153
|
+
readonly nonce: {
|
|
154
|
+
readonly $ref: "#/$defs/positiveSafeInteger";
|
|
155
|
+
};
|
|
156
|
+
readonly payload: {
|
|
157
|
+
readonly $ref: "#/$defs/mailboxCardPayload";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly additionalProperties: false;
|
|
161
|
+
};
|
|
162
|
+
readonly mailboxCardEnvelope: {
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly required: readonly ["event", "hash", "signature"];
|
|
165
|
+
readonly properties: {
|
|
166
|
+
readonly event: {
|
|
167
|
+
readonly $ref: "#/$defs/mailboxCardEvent";
|
|
168
|
+
};
|
|
169
|
+
readonly hash: {
|
|
170
|
+
readonly $ref: "#/$defs/hash32";
|
|
171
|
+
};
|
|
172
|
+
readonly signature: {
|
|
173
|
+
readonly $ref: "#/$defs/signature";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly additionalProperties: false;
|
|
177
|
+
};
|
|
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
|
+
readonly envelope: {
|
|
220
|
+
readonly oneOf: readonly [{
|
|
221
|
+
readonly $ref: "#/$defs/mailboxCardEnvelope";
|
|
222
|
+
}, {
|
|
223
|
+
readonly $ref: "#/$defs/messageEnvelope";
|
|
224
|
+
}];
|
|
225
|
+
};
|
|
226
|
+
readonly packetHeader: {
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly required: readonly ["protocol", "mailbox_id", "card_hash", "expires_at"];
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly protocol: {
|
|
231
|
+
readonly const: "agent-mail/1.0";
|
|
232
|
+
};
|
|
233
|
+
readonly mailbox_id: {
|
|
234
|
+
readonly $ref: "#/$defs/id16";
|
|
235
|
+
};
|
|
236
|
+
readonly card_hash: {
|
|
237
|
+
readonly $ref: "#/$defs/hash32";
|
|
238
|
+
};
|
|
239
|
+
readonly expires_at: {
|
|
240
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly additionalProperties: false;
|
|
244
|
+
};
|
|
245
|
+
readonly packet: {
|
|
246
|
+
readonly type: "object";
|
|
247
|
+
readonly required: readonly ["header", "enc", "ciphertext"];
|
|
248
|
+
readonly properties: {
|
|
249
|
+
readonly header: {
|
|
250
|
+
readonly $ref: "#/$defs/packetHeader";
|
|
251
|
+
};
|
|
252
|
+
readonly enc: {
|
|
253
|
+
readonly $ref: "#/$defs/hash32";
|
|
254
|
+
};
|
|
255
|
+
readonly ciphertext: {
|
|
256
|
+
readonly allOf: readonly [{
|
|
257
|
+
readonly $ref: "#/$defs/base64url";
|
|
258
|
+
}];
|
|
259
|
+
readonly minLength: 1387;
|
|
260
|
+
readonly maxLength: 1048576;
|
|
261
|
+
readonly description: "Decoded length must be >= 1040 and 16 modulo 1024. Total JCS(packet) length must fit the card and protocol limits; these are semantic checks.";
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
readonly additionalProperties: false;
|
|
265
|
+
};
|
|
266
|
+
readonly cardAcceptedRecord: {
|
|
267
|
+
readonly type: "object";
|
|
268
|
+
readonly required: readonly ["envelope", "accepted_at"];
|
|
269
|
+
readonly properties: {
|
|
270
|
+
readonly envelope: {
|
|
271
|
+
readonly $ref: "#/$defs/mailboxCardEnvelope";
|
|
272
|
+
};
|
|
273
|
+
readonly accepted_at: {
|
|
274
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
readonly additionalProperties: false;
|
|
278
|
+
};
|
|
279
|
+
readonly deliveryResult: {
|
|
280
|
+
readonly type: "object";
|
|
281
|
+
readonly required: readonly ["packet_id", "accepted_at"];
|
|
282
|
+
readonly properties: {
|
|
283
|
+
readonly packet_id: {
|
|
284
|
+
readonly $ref: "#/$defs/hash32";
|
|
285
|
+
};
|
|
286
|
+
readonly accepted_at: {
|
|
287
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
readonly additionalProperties: false;
|
|
291
|
+
};
|
|
292
|
+
readonly packetRecord: {
|
|
293
|
+
readonly type: "object";
|
|
294
|
+
readonly required: readonly ["packet_id", "packet", "accepted_at", "seq"];
|
|
295
|
+
readonly properties: {
|
|
296
|
+
readonly packet_id: {
|
|
297
|
+
readonly $ref: "#/$defs/hash32";
|
|
298
|
+
};
|
|
299
|
+
readonly packet: {
|
|
300
|
+
readonly $ref: "#/$defs/packet";
|
|
301
|
+
};
|
|
302
|
+
readonly accepted_at: {
|
|
303
|
+
readonly $ref: "#/$defs/timestampMs";
|
|
304
|
+
};
|
|
305
|
+
readonly seq: {
|
|
306
|
+
readonly $ref: "#/$defs/positiveSafeInteger";
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
readonly additionalProperties: false;
|
|
310
|
+
};
|
|
311
|
+
readonly packetList: {
|
|
312
|
+
readonly type: "object";
|
|
313
|
+
readonly required: readonly ["result"];
|
|
314
|
+
readonly properties: {
|
|
315
|
+
readonly result: {
|
|
316
|
+
readonly type: "array";
|
|
317
|
+
readonly items: {
|
|
318
|
+
readonly $ref: "#/$defs/packetRecord";
|
|
319
|
+
};
|
|
320
|
+
readonly minItems: 0;
|
|
321
|
+
readonly maxItems: 1000;
|
|
322
|
+
};
|
|
323
|
+
readonly next_cursor: {
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
readonly minLength: 1;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly additionalProperties: true;
|
|
329
|
+
};
|
|
330
|
+
readonly discoveryDocument: {
|
|
331
|
+
readonly type: "object";
|
|
332
|
+
readonly required: readonly ["protocol", "service"];
|
|
333
|
+
readonly properties: {
|
|
334
|
+
readonly protocol: {
|
|
335
|
+
readonly const: "agent-mail/1.0";
|
|
336
|
+
};
|
|
337
|
+
readonly service: {
|
|
338
|
+
readonly $ref: "#/$defs/httpsOrigin";
|
|
339
|
+
};
|
|
340
|
+
readonly features: {
|
|
341
|
+
readonly type: "array";
|
|
342
|
+
readonly items: {
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
};
|
|
345
|
+
readonly uniqueItems: true;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
readonly additionalProperties: true;
|
|
349
|
+
readonly description: "Mail defines no endpoint names; delivery paths are fixed at each card route. Other members are inert extensions.";
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
//# sourceMappingURL=mail-schema.d.ts.map
|
|
@@ -0,0 +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,8eAA8e;aAChf,KAAK;iBAED,IAAI,EAAE,kBAAkB;;iBAGxB,IAAI,EAAE,gBAAgB;;aAG1B,KAAK;iBACH,OAAO;qBACL,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,6DAA6D;;iBAExE,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,mDAAmD;;iBAE9D,IAAI;qBACF,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,uCAAuC;;iBAElD,SAAS;qBACP,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,uCAAuC;;iBAElD,SAAS;qBACP,IAAI,EAAE,QAAQ;qBACd,OAAO,EACL,gGAAgG;;iBAEpG,WAAW;qBACT,IAAI,EAAE,SAAS;qBACf,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,gBAAgB;;iBAE3B,mBAAmB;qBACjB,IAAI,EAAE,SAAS;qBACf,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,gBAAgB;;iBAE3B,WAAW;qBACT,IAAI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