@joe-broadhead/messaging 0.7.1 → 0.9.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/CHANGELOG.md +364 -2
- package/dist/bin/messaging-mcp.js +5498 -4338
- package/dist/bin/messaging-relay.js +8626 -5540
- package/dist/bin/messaging.js +4492 -3158
- package/dist/bin/messagingd.js +19672 -12412
- package/dist/lib/modules/core/agent/operations.js +19 -327
- package/dist/lib/modules/core/agent/present.js +20 -55
- package/dist/lib/modules/core/agent-tools.js +35 -139
- package/dist/lib/modules/core/consent.js +54 -14
- package/dist/lib/modules/core/contact-card.js +3 -3
- package/dist/lib/modules/core/conversation/event.js +29 -4
- package/dist/lib/modules/core/conversation/guest-invitation.js +42 -0
- package/dist/lib/modules/core/conversation/log.js +287 -65
- package/dist/lib/modules/core/conversation/request-log.js +158 -0
- package/dist/lib/modules/core/conversation/request-seal.js +41 -0
- package/dist/lib/modules/core/conversation/requests.js +87 -0
- package/dist/lib/modules/core/conversation/seal.js +90 -37
- package/dist/lib/modules/core/conversation-agent-tools.js +69 -0
- package/dist/lib/modules/core/federation/directory-proof.js +83 -0
- package/dist/lib/modules/core/federation/proof-state.js +167 -0
- package/dist/lib/modules/core/federation/roster-proof.js +74 -0
- package/dist/lib/modules/core/index.js +9 -4
- package/dist/lib/modules/core/jelly-host.js +8 -5
- package/dist/lib/modules/core/schema/common.js +33 -5
- package/dist/lib/modules/core/schema/consent.js +23 -5
- package/dist/lib/modules/core/schema/contact-request.js +22 -0
- package/dist/lib/modules/core/schema/conv-frames.js +101 -0
- package/dist/lib/modules/core/schema/conversation.js +67 -33
- package/dist/lib/modules/core/schema/directory-frames.js +8 -3
- package/dist/lib/modules/core/schema/envelope.js +8 -24
- package/dist/lib/modules/core/schema/errors.js +7 -5
- package/dist/lib/modules/core/schema/guest-invitation.js +13 -0
- package/dist/lib/modules/core/schema/index.js +5 -0
- package/dist/lib/modules/core/schema/ipc/consent.js +97 -18
- package/dist/lib/modules/core/schema/ipc/conversation-views.js +87 -0
- package/dist/lib/modules/core/schema/ipc/conversations.js +132 -0
- package/dist/lib/modules/core/schema/ipc/device.js +9 -0
- package/dist/lib/modules/core/schema/ipc/jelly.js +17 -45
- package/dist/lib/modules/core/schema/ipc/shapes.js +74 -73
- package/dist/lib/modules/core/schema/ipc/surfaces.js +12 -195
- package/dist/lib/modules/core/schema/ipc/tasks.js +31 -0
- package/dist/lib/modules/core/schema/ipc.js +68 -46
- package/dist/lib/modules/core/testing.js +1 -1
- package/dist/lib/modules/core/version.js +1 -1
- package/dist/lib/modules/ipc/client.js +10 -2
- package/dist/lib/modules/ipc/server.js +14 -5
- package/dist/lib/modules/ipc/testing.js +13 -23
- package/dist/spec/messaging-v1.md +854 -445
- package/dist/third-party-notices.md +1 -1
- package/dist/third-party.json +1 -1
- package/dist/types/core/agent/operations.d.ts +5 -52
- package/dist/types/core/agent/present.d.ts +6 -21
- package/dist/types/core/agent-tools.d.ts +295 -442
- package/dist/types/core/consent.d.ts +30 -7
- package/dist/types/core/contact-card.d.ts +3 -3
- package/dist/types/core/conversation/event.d.ts +6 -6
- package/dist/types/core/conversation/guest-invitation.d.ts +8 -0
- package/dist/types/core/conversation/log.d.ts +28 -13
- package/dist/types/core/conversation/request-log.d.ts +24 -0
- package/dist/types/core/conversation/request-seal.d.ts +6 -0
- package/dist/types/core/conversation/requests.d.ts +14 -0
- package/dist/types/core/conversation/seal.d.ts +32 -9
- package/dist/types/core/conversation-agent-tools.d.ts +939 -0
- package/dist/types/core/federation/directory-proof.d.ts +8 -0
- package/dist/types/core/federation/proof-state.d.ts +114 -0
- package/dist/types/core/federation/roster-proof.d.ts +7 -0
- package/dist/types/core/index.d.ts +11 -6
- package/dist/types/core/jelly-host.d.ts +1 -1
- package/dist/types/core/schema/common.d.ts +33 -6
- package/dist/types/core/schema/consent.d.ts +29 -8
- package/dist/types/core/schema/contact-request.d.ts +264 -0
- package/dist/types/core/schema/conv-frames.d.ts +1204 -0
- package/dist/types/core/schema/conversation.d.ts +1410 -264
- package/dist/types/core/schema/directory-frames.d.ts +8 -3
- package/dist/types/core/schema/envelope.d.ts +85 -130
- package/dist/types/core/schema/errors.d.ts +5 -1
- package/dist/types/core/schema/guest-invitation.d.ts +51 -0
- package/dist/types/core/schema/index.d.ts +5 -0
- package/dist/types/core/schema/ipc/consent.d.ts +464 -62
- package/dist/types/core/schema/ipc/conversation-views.d.ts +1199 -0
- package/dist/types/core/schema/ipc/conversations.d.ts +4355 -0
- package/dist/types/core/schema/ipc/device.d.ts +10 -0
- package/dist/types/core/schema/ipc/jelly.d.ts +16 -111
- package/dist/types/core/schema/ipc/shapes.d.ts +211 -95
- package/dist/types/core/schema/ipc/surfaces.d.ts +26 -427
- package/dist/types/core/schema/ipc/tasks.d.ts +210 -0
- package/dist/types/core/schema/ipc.d.ts +3859 -890
- package/dist/types/core/schema/relay.d.ts +12 -4
- package/dist/types/core/testing.d.ts +1 -1
- package/dist/types/core/version.d.ts +1 -1
- package/dist/types/ipc/client.d.ts +4 -1
- package/dist/types/ipc/server.d.ts +16 -1
- package/dist/types/ipc/testing.d.ts +21 -8
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* dir.watch {req, persons} → dir.ok {req}; then dir.changed {persons, sth} pushes
|
|
24
24
|
* presence.watch {req, persons} → dir.ok {req}
|
|
25
25
|
* dir.erase {req, entries, token} → dir.ok {req}
|
|
26
|
-
* wake.arm {req, url, ticket, agents, awaiting} → dir.ok {req} a Jelly host's device, before it sleeps (§7, "Wake tickets")
|
|
26
|
+
* wake.arm {req, url, ticket, agents, awaiting, dms?} → dir.ok {req} a Jelly host's device, before it sleeps (§7, "Wake tickets")
|
|
27
27
|
* wake.disarm {req} → dir.ok {req}
|
|
28
28
|
* relay → dir.unbound {entry, sth} this device's own unbind, just before close 4003
|
|
29
29
|
*
|
|
@@ -363,6 +363,8 @@ export declare const DirEraseFrame: z.ZodObject<{
|
|
|
363
363
|
/** Most agents a wake ticket's filter names, and most awaited task requests (spec §7, "Wake tickets"). */
|
|
364
364
|
export declare const WAKE_AGENTS = 64;
|
|
365
365
|
export declare const WAKE_AWAITING = 500;
|
|
366
|
+
/** Most dm conversations a wake ticket's filter names (spec §7, "Wake tickets", "a peer's dm"). */
|
|
367
|
+
export declare const WAKE_DMS = 256;
|
|
366
368
|
/** Most bytes of a wake ticket, and its longest life: Jelly's `jelly-wake+jwt` lives at most seven days. */
|
|
367
369
|
export declare const WAKE_TICKET_BYTES = 4096;
|
|
368
370
|
export declare const WAKE_TICKET_MAX_S: number;
|
|
@@ -372,8 +374,9 @@ export declare const WakeUrl: z.ZodString;
|
|
|
372
374
|
* A Jelly host's device arms a wake ticket before the host sleeps (spec §7, "Wake tickets"). `url` is Jelly ID's wake
|
|
373
375
|
* endpoint for this device's host; `ticket` the host's single-use `jelly-wake+jwt`, which the relay never verifies
|
|
374
376
|
* (Jelly ID does) and reads only for its `exp`; `agents` the local sessions whose own person's mail may wake the host;
|
|
375
|
-
* `awaiting` the request envelope ids of the tasks those agents wait on, whose updates (`replyTo`) may wake it
|
|
376
|
-
*
|
|
377
|
+
* `awaiting` the request envelope ids of the tasks those agents wait on, whose updates (`replyTo`) may wake it; `dms`
|
|
378
|
+
* the dm conversations whose other participant's events may wake it (absent: none), which the host's daemon chose. A
|
|
379
|
+
* new arm replaces the device's previous one.
|
|
377
380
|
*/
|
|
378
381
|
export declare const WakeArmFrame: z.ZodObject<{
|
|
379
382
|
t: z.ZodLiteral<"wake.arm">;
|
|
@@ -382,6 +385,7 @@ export declare const WakeArmFrame: z.ZodObject<{
|
|
|
382
385
|
ticket: z.ZodString;
|
|
383
386
|
agents: z.ZodArray<z.ZodString>;
|
|
384
387
|
awaiting: z.ZodArray<z.ZodString>;
|
|
388
|
+
dms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
385
389
|
}, z.core.$strip>;
|
|
386
390
|
export type WakeArmFrame = z.infer<typeof WakeArmFrame>;
|
|
387
391
|
/** The relay forgets this device's wake ticket. */
|
|
@@ -643,6 +647,7 @@ export declare const DirectoryClientFrame: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
643
647
|
ticket: z.ZodString;
|
|
644
648
|
agents: z.ZodArray<z.ZodString>;
|
|
645
649
|
awaiting: z.ZodArray<z.ZodString>;
|
|
650
|
+
dms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
646
651
|
}, z.core.$strip>, z.ZodObject<{
|
|
647
652
|
t: z.ZodLiteral<"wake.disarm">;
|
|
648
653
|
req: z.ZodString;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
export declare const EnvelopeType: z.ZodEnum<{
|
|
8
8
|
message: "message";
|
|
9
|
-
"task.cancel": "task.cancel";
|
|
10
9
|
receipt: "receipt";
|
|
11
10
|
presence: "presence";
|
|
11
|
+
"task.cancel": "task.cancel";
|
|
12
12
|
"task.status": "task.status";
|
|
13
13
|
"task.artifact": "task.artifact";
|
|
14
14
|
}>;
|
|
@@ -66,9 +66,9 @@ export declare const Envelope: z.ZodObject<{
|
|
|
66
66
|
realm: z.ZodString;
|
|
67
67
|
type: z.ZodEnum<{
|
|
68
68
|
message: "message";
|
|
69
|
-
"task.cancel": "task.cancel";
|
|
70
69
|
receipt: "receipt";
|
|
71
70
|
presence: "presence";
|
|
71
|
+
"task.cancel": "task.cancel";
|
|
72
72
|
"task.status": "task.status";
|
|
73
73
|
"task.artifact": "task.artifact";
|
|
74
74
|
}>;
|
|
@@ -111,44 +111,6 @@ export declare const Envelope: z.ZodObject<{
|
|
|
111
111
|
sig: z.ZodString;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
export type Envelope = z.infer<typeof Envelope>;
|
|
114
|
-
/**
|
|
115
|
-
* A channel change or post (spec §6.8), on a `kind: "message"` envelope sealed to a device with no recipient agent.
|
|
116
|
-
* `create`: the full channel record with the person who created it, to every member device and to each later
|
|
117
|
-
* invitee. `invite`: persons added, to the existing members. `leave`: the sender left. `remove`: persons removed by
|
|
118
|
-
* the creator or an admin, to every member device. `post`: a line in the channel. `name` is always the channel's own
|
|
119
|
-
* name. A DM line has no `conv` (spec §5, "Meaning").
|
|
120
|
-
*/
|
|
121
|
-
export declare const ChannelConv: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
-
kind: z.ZodLiteral<"channel">;
|
|
123
|
-
op: z.ZodLiteral<"create">;
|
|
124
|
-
id: z.ZodString;
|
|
125
|
-
name: z.ZodString;
|
|
126
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
127
|
-
creator: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
128
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
-
kind: z.ZodLiteral<"channel">;
|
|
130
|
-
op: z.ZodLiteral<"invite">;
|
|
131
|
-
id: z.ZodString;
|
|
132
|
-
name: z.ZodString;
|
|
133
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
134
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
-
kind: z.ZodLiteral<"channel">;
|
|
136
|
-
op: z.ZodLiteral<"leave">;
|
|
137
|
-
id: z.ZodString;
|
|
138
|
-
name: z.ZodString;
|
|
139
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
-
kind: z.ZodLiteral<"channel">;
|
|
141
|
-
op: z.ZodLiteral<"remove">;
|
|
142
|
-
id: z.ZodString;
|
|
143
|
-
name: z.ZodString;
|
|
144
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
145
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
-
kind: z.ZodLiteral<"channel">;
|
|
147
|
-
op: z.ZodLiteral<"post">;
|
|
148
|
-
id: z.ZodString;
|
|
149
|
-
name: z.ZodString;
|
|
150
|
-
}, z.core.$strip>], "op">;
|
|
151
|
-
export type ChannelConv = z.infer<typeof ChannelConv>;
|
|
152
114
|
/**
|
|
153
115
|
* Sync between two devices of one person (spec §6.9, "Sync"): `grant` carries grants the person set or re-signed,
|
|
154
116
|
* `snapshot` every current grant, for a device of the person that is new to the sender. The message carries exactly
|
|
@@ -168,6 +130,25 @@ export type SelfConv = z.infer<typeof SelfConv>;
|
|
|
168
130
|
*/
|
|
169
131
|
export declare const RequestConv: z.ZodObject<{
|
|
170
132
|
kind: z.ZodLiteral<"request">;
|
|
133
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
descriptor: z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
issuedAt: z.ZodNumber;
|
|
137
|
+
expiresAt: z.ZodNumber;
|
|
138
|
+
commitment: z.ZodString;
|
|
139
|
+
by: z.ZodString;
|
|
140
|
+
sig: z.ZodString;
|
|
141
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
142
|
+
realm: z.ZodString;
|
|
143
|
+
cid: z.ZodString;
|
|
144
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
145
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
opening: z.ZodObject<{
|
|
148
|
+
salt: z.ZodString;
|
|
149
|
+
text: z.ZodString;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
}, z.core.$strict>>;
|
|
171
152
|
}, z.core.$strip>;
|
|
172
153
|
export type RequestConv = z.infer<typeof RequestConv>;
|
|
173
154
|
/**
|
|
@@ -183,36 +164,7 @@ export declare const CardConv: z.ZodObject<{
|
|
|
183
164
|
}, z.core.$strip>;
|
|
184
165
|
export type CardConv = z.infer<typeof CardConv>;
|
|
185
166
|
/** The conversation a `message` belongs to when its ends alone do not say (spec §5, "Meaning"). */
|
|
186
|
-
export declare const Conv: z.ZodDiscriminatedUnion<[z.
|
|
187
|
-
kind: z.ZodLiteral<"channel">;
|
|
188
|
-
op: z.ZodLiteral<"create">;
|
|
189
|
-
id: z.ZodString;
|
|
190
|
-
name: z.ZodString;
|
|
191
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
192
|
-
creator: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
193
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
194
|
-
kind: z.ZodLiteral<"channel">;
|
|
195
|
-
op: z.ZodLiteral<"invite">;
|
|
196
|
-
id: z.ZodString;
|
|
197
|
-
name: z.ZodString;
|
|
198
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
199
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
-
kind: z.ZodLiteral<"channel">;
|
|
201
|
-
op: z.ZodLiteral<"leave">;
|
|
202
|
-
id: z.ZodString;
|
|
203
|
-
name: z.ZodString;
|
|
204
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
-
kind: z.ZodLiteral<"channel">;
|
|
206
|
-
op: z.ZodLiteral<"remove">;
|
|
207
|
-
id: z.ZodString;
|
|
208
|
-
name: z.ZodString;
|
|
209
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
210
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
-
kind: z.ZodLiteral<"channel">;
|
|
212
|
-
op: z.ZodLiteral<"post">;
|
|
213
|
-
id: z.ZodString;
|
|
214
|
-
name: z.ZodString;
|
|
215
|
-
}, z.core.$strip>], "op">, z.ZodObject<{
|
|
167
|
+
export declare const Conv: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
216
168
|
kind: z.ZodLiteral<"self">;
|
|
217
169
|
what: z.ZodEnum<{
|
|
218
170
|
grant: "grant";
|
|
@@ -220,6 +172,25 @@ export declare const Conv: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Z
|
|
|
220
172
|
}>;
|
|
221
173
|
}, z.core.$strip>, z.ZodObject<{
|
|
222
174
|
kind: z.ZodLiteral<"request">;
|
|
175
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
descriptor: z.ZodObject<{
|
|
177
|
+
id: z.ZodString;
|
|
178
|
+
issuedAt: z.ZodNumber;
|
|
179
|
+
expiresAt: z.ZodNumber;
|
|
180
|
+
commitment: z.ZodString;
|
|
181
|
+
by: z.ZodString;
|
|
182
|
+
sig: z.ZodString;
|
|
183
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
184
|
+
realm: z.ZodString;
|
|
185
|
+
cid: z.ZodString;
|
|
186
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
187
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
opening: z.ZodObject<{
|
|
190
|
+
salt: z.ZodString;
|
|
191
|
+
text: z.ZodString;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
}, z.core.$strict>>;
|
|
223
194
|
}, z.core.$strip>, z.ZodObject<{
|
|
224
195
|
kind: z.ZodLiteral<"card">;
|
|
225
196
|
what: z.ZodEnum<{
|
|
@@ -273,36 +244,7 @@ export declare const MessagePayload: z.ZodObject<{
|
|
|
273
244
|
parent: z.ZodOptional<z.ZodString>;
|
|
274
245
|
sig: z.ZodString;
|
|
275
246
|
}, z.core.$loose>>>;
|
|
276
|
-
conv: z.ZodOptional<z.ZodDiscriminatedUnion<[z.
|
|
277
|
-
kind: z.ZodLiteral<"channel">;
|
|
278
|
-
op: z.ZodLiteral<"create">;
|
|
279
|
-
id: z.ZodString;
|
|
280
|
-
name: z.ZodString;
|
|
281
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
282
|
-
creator: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
283
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
-
kind: z.ZodLiteral<"channel">;
|
|
285
|
-
op: z.ZodLiteral<"invite">;
|
|
286
|
-
id: z.ZodString;
|
|
287
|
-
name: z.ZodString;
|
|
288
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
289
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
290
|
-
kind: z.ZodLiteral<"channel">;
|
|
291
|
-
op: z.ZodLiteral<"leave">;
|
|
292
|
-
id: z.ZodString;
|
|
293
|
-
name: z.ZodString;
|
|
294
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
295
|
-
kind: z.ZodLiteral<"channel">;
|
|
296
|
-
op: z.ZodLiteral<"remove">;
|
|
297
|
-
id: z.ZodString;
|
|
298
|
-
name: z.ZodString;
|
|
299
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
300
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
301
|
-
kind: z.ZodLiteral<"channel">;
|
|
302
|
-
op: z.ZodLiteral<"post">;
|
|
303
|
-
id: z.ZodString;
|
|
304
|
-
name: z.ZodString;
|
|
305
|
-
}, z.core.$strip>], "op">, z.ZodObject<{
|
|
247
|
+
conv: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
306
248
|
kind: z.ZodLiteral<"self">;
|
|
307
249
|
what: z.ZodEnum<{
|
|
308
250
|
grant: "grant";
|
|
@@ -310,6 +252,25 @@ export declare const MessagePayload: z.ZodObject<{
|
|
|
310
252
|
}>;
|
|
311
253
|
}, z.core.$strip>, z.ZodObject<{
|
|
312
254
|
kind: z.ZodLiteral<"request">;
|
|
255
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
256
|
+
descriptor: z.ZodObject<{
|
|
257
|
+
id: z.ZodString;
|
|
258
|
+
issuedAt: z.ZodNumber;
|
|
259
|
+
expiresAt: z.ZodNumber;
|
|
260
|
+
commitment: z.ZodString;
|
|
261
|
+
by: z.ZodString;
|
|
262
|
+
sig: z.ZodString;
|
|
263
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
264
|
+
realm: z.ZodString;
|
|
265
|
+
cid: z.ZodString;
|
|
266
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
267
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
268
|
+
}, z.core.$strict>;
|
|
269
|
+
opening: z.ZodObject<{
|
|
270
|
+
salt: z.ZodString;
|
|
271
|
+
text: z.ZodString;
|
|
272
|
+
}, z.core.$strict>;
|
|
273
|
+
}, z.core.$strict>>;
|
|
313
274
|
}, z.core.$strip>, z.ZodObject<{
|
|
314
275
|
kind: z.ZodLiteral<"card">;
|
|
315
276
|
what: z.ZodEnum<{
|
|
@@ -413,6 +374,7 @@ export declare const ReceiptPayload: z.ZodObject<{
|
|
|
413
374
|
refused: "refused";
|
|
414
375
|
declined: "declined";
|
|
415
376
|
request_required: "request_required";
|
|
377
|
+
peer_outdated: "peer_outdated";
|
|
416
378
|
rate_limited: "rate_limited";
|
|
417
379
|
loop_guard: "loop_guard";
|
|
418
380
|
too_large: "too_large";
|
|
@@ -430,6 +392,7 @@ export declare const ReceiptPayload: z.ZodObject<{
|
|
|
430
392
|
jelly_unavailable: "jelly_unavailable";
|
|
431
393
|
log_conflict: "log_conflict";
|
|
432
394
|
conv_conflict: "conv_conflict";
|
|
395
|
+
conflict: "conflict";
|
|
433
396
|
stale_epoch: "stale_epoch";
|
|
434
397
|
device_limit: "device_limit";
|
|
435
398
|
admission_required: "admission_required";
|
|
@@ -537,36 +500,7 @@ export declare const PAYLOAD_BY_TYPE: {
|
|
|
537
500
|
parent: z.ZodOptional<z.ZodString>;
|
|
538
501
|
sig: z.ZodString;
|
|
539
502
|
}, z.core.$loose>>>;
|
|
540
|
-
conv: z.ZodOptional<z.ZodDiscriminatedUnion<[z.
|
|
541
|
-
kind: z.ZodLiteral<"channel">;
|
|
542
|
-
op: z.ZodLiteral<"create">;
|
|
543
|
-
id: z.ZodString;
|
|
544
|
-
name: z.ZodString;
|
|
545
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
546
|
-
creator: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
547
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
548
|
-
kind: z.ZodLiteral<"channel">;
|
|
549
|
-
op: z.ZodLiteral<"invite">;
|
|
550
|
-
id: z.ZodString;
|
|
551
|
-
name: z.ZodString;
|
|
552
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
553
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
554
|
-
kind: z.ZodLiteral<"channel">;
|
|
555
|
-
op: z.ZodLiteral<"leave">;
|
|
556
|
-
id: z.ZodString;
|
|
557
|
-
name: z.ZodString;
|
|
558
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
559
|
-
kind: z.ZodLiteral<"channel">;
|
|
560
|
-
op: z.ZodLiteral<"remove">;
|
|
561
|
-
id: z.ZodString;
|
|
562
|
-
name: z.ZodString;
|
|
563
|
-
persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
564
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
565
|
-
kind: z.ZodLiteral<"channel">;
|
|
566
|
-
op: z.ZodLiteral<"post">;
|
|
567
|
-
id: z.ZodString;
|
|
568
|
-
name: z.ZodString;
|
|
569
|
-
}, z.core.$strip>], "op">, z.ZodObject<{
|
|
503
|
+
conv: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
570
504
|
kind: z.ZodLiteral<"self">;
|
|
571
505
|
what: z.ZodEnum<{
|
|
572
506
|
grant: "grant";
|
|
@@ -574,6 +508,25 @@ export declare const PAYLOAD_BY_TYPE: {
|
|
|
574
508
|
}>;
|
|
575
509
|
}, z.core.$strip>, z.ZodObject<{
|
|
576
510
|
kind: z.ZodLiteral<"request">;
|
|
511
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
512
|
+
descriptor: z.ZodObject<{
|
|
513
|
+
id: z.ZodString;
|
|
514
|
+
issuedAt: z.ZodNumber;
|
|
515
|
+
expiresAt: z.ZodNumber;
|
|
516
|
+
commitment: z.ZodString;
|
|
517
|
+
by: z.ZodString;
|
|
518
|
+
sig: z.ZodString;
|
|
519
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
520
|
+
realm: z.ZodString;
|
|
521
|
+
cid: z.ZodString;
|
|
522
|
+
from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
523
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
524
|
+
}, z.core.$strict>;
|
|
525
|
+
opening: z.ZodObject<{
|
|
526
|
+
salt: z.ZodString;
|
|
527
|
+
text: z.ZodString;
|
|
528
|
+
}, z.core.$strict>;
|
|
529
|
+
}, z.core.$strict>>;
|
|
577
530
|
}, z.core.$strip>, z.ZodObject<{
|
|
578
531
|
kind: z.ZodLiteral<"card">;
|
|
579
532
|
what: z.ZodEnum<{
|
|
@@ -669,6 +622,7 @@ export declare const PAYLOAD_BY_TYPE: {
|
|
|
669
622
|
refused: "refused";
|
|
670
623
|
declined: "declined";
|
|
671
624
|
request_required: "request_required";
|
|
625
|
+
peer_outdated: "peer_outdated";
|
|
672
626
|
rate_limited: "rate_limited";
|
|
673
627
|
loop_guard: "loop_guard";
|
|
674
628
|
too_large: "too_large";
|
|
@@ -686,6 +640,7 @@ export declare const PAYLOAD_BY_TYPE: {
|
|
|
686
640
|
jelly_unavailable: "jelly_unavailable";
|
|
687
641
|
log_conflict: "log_conflict";
|
|
688
642
|
conv_conflict: "conv_conflict";
|
|
643
|
+
conflict: "conflict";
|
|
689
644
|
stale_epoch: "stale_epoch";
|
|
690
645
|
device_limit: "device_limit";
|
|
691
646
|
admission_required: "admission_required";
|
|
@@ -12,6 +12,7 @@ export declare const ErrorCode: z.ZodEnum<{
|
|
|
12
12
|
refused: "refused";
|
|
13
13
|
declined: "declined";
|
|
14
14
|
request_required: "request_required";
|
|
15
|
+
peer_outdated: "peer_outdated";
|
|
15
16
|
rate_limited: "rate_limited";
|
|
16
17
|
loop_guard: "loop_guard";
|
|
17
18
|
too_large: "too_large";
|
|
@@ -29,6 +30,7 @@ export declare const ErrorCode: z.ZodEnum<{
|
|
|
29
30
|
jelly_unavailable: "jelly_unavailable";
|
|
30
31
|
log_conflict: "log_conflict";
|
|
31
32
|
conv_conflict: "conv_conflict";
|
|
33
|
+
conflict: "conflict";
|
|
32
34
|
stale_epoch: "stale_epoch";
|
|
33
35
|
device_limit: "device_limit";
|
|
34
36
|
admission_required: "admission_required";
|
|
@@ -51,7 +53,7 @@ export type ErrorCode = z.infer<typeof ErrorCode>;
|
|
|
51
53
|
/**
|
|
52
54
|
* The exit status of a messagingd or messaging-relay that refuses its store and changes nothing (spec §8.8): `EX_CONFIG`
|
|
53
55
|
* of sysexits(3), for either reason. messagingd also prints one stderr line,
|
|
54
|
-
* `messagingd: store_refused: <reason>: <why and
|
|
56
|
+
* `messagingd: store_refused: <reason>: <why and the remedy>`. A client matches this status, the code and the
|
|
55
57
|
* reason, never the wording.
|
|
56
58
|
*/
|
|
57
59
|
export declare const STORE_REFUSED_EXIT = 78;
|
|
@@ -79,6 +81,7 @@ export declare const ErrorBody: z.ZodObject<{
|
|
|
79
81
|
refused: "refused";
|
|
80
82
|
declined: "declined";
|
|
81
83
|
request_required: "request_required";
|
|
84
|
+
peer_outdated: "peer_outdated";
|
|
82
85
|
rate_limited: "rate_limited";
|
|
83
86
|
loop_guard: "loop_guard";
|
|
84
87
|
too_large: "too_large";
|
|
@@ -96,6 +99,7 @@ export declare const ErrorBody: z.ZodObject<{
|
|
|
96
99
|
jelly_unavailable: "jelly_unavailable";
|
|
97
100
|
log_conflict: "log_conflict";
|
|
98
101
|
conv_conflict: "conv_conflict";
|
|
102
|
+
conflict: "conflict";
|
|
99
103
|
stale_epoch: "stale_epoch";
|
|
100
104
|
device_limit: "device_limit";
|
|
101
105
|
admission_required: "admission_required";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** A bounded, sealed preview. Its signature is portable; the guest accepts exactly this op head and exposure. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const GuestInvitation: z.ZodObject<{
|
|
4
|
+
v: z.ZodLiteral<"messaging/1">;
|
|
5
|
+
realm: z.ZodString;
|
|
6
|
+
cid: z.ZodString;
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
9
|
+
inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
10
|
+
by: z.ZodString;
|
|
11
|
+
head: z.ZodObject<{
|
|
12
|
+
seq: z.ZodNumber;
|
|
13
|
+
hash: z.ZodString;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
issuedAt: z.ZodNumber;
|
|
16
|
+
expiresAt: z.ZodNumber;
|
|
17
|
+
kind: z.ZodEnum<{
|
|
18
|
+
channel: "channel";
|
|
19
|
+
group: "group";
|
|
20
|
+
}>;
|
|
21
|
+
history: z.ZodEnum<{
|
|
22
|
+
none: "none";
|
|
23
|
+
shared: "shared";
|
|
24
|
+
}>;
|
|
25
|
+
agentContext: z.ZodEnum<{
|
|
26
|
+
none: "none";
|
|
27
|
+
members: "members";
|
|
28
|
+
seats: "seats";
|
|
29
|
+
}>;
|
|
30
|
+
bridges: z.ZodEnum<{
|
|
31
|
+
none: "none";
|
|
32
|
+
members: "members";
|
|
33
|
+
admins: "admins";
|
|
34
|
+
}>;
|
|
35
|
+
audience: z.ZodArray<z.ZodObject<{
|
|
36
|
+
p: z.ZodString;
|
|
37
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
38
|
+
role: z.ZodEnum<{
|
|
39
|
+
admin: "admin";
|
|
40
|
+
member: "member";
|
|
41
|
+
owner: "owner";
|
|
42
|
+
guest: "guest";
|
|
43
|
+
}>;
|
|
44
|
+
state: z.ZodEnum<{
|
|
45
|
+
member: "member";
|
|
46
|
+
invited: "invited";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
sig: z.ZodString;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type GuestInvitation = z.infer<typeof GuestInvitation>;
|
|
@@ -14,3 +14,8 @@ export * from "./ipc.js";
|
|
|
14
14
|
export * from "./ipc/device.js";
|
|
15
15
|
export * from "./ipc/consent.js";
|
|
16
16
|
export * from "./conversation.js";
|
|
17
|
+
export * from "./conv-frames.js";
|
|
18
|
+
export * from "./contact-request.js";
|
|
19
|
+
export * from "./guest-invitation.js";
|
|
20
|
+
export * from "./ipc/conversation-views.js";
|
|
21
|
+
export * from "./ipc/conversations.js";
|