@joe-broadhead/messaging 0.8.0 → 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.
Files changed (50) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/dist/bin/messaging-mcp.js +202 -31
  3. package/dist/bin/messaging-relay.js +291 -43
  4. package/dist/bin/messaging.js +290 -32
  5. package/dist/bin/messagingd.js +1158 -138
  6. package/dist/lib/modules/core/agent/present.js +5 -0
  7. package/dist/lib/modules/core/agent-tools.js +12 -0
  8. package/dist/lib/modules/core/consent.js +54 -14
  9. package/dist/lib/modules/core/contact-card.js +3 -3
  10. package/dist/lib/modules/core/index.js +1 -1
  11. package/dist/lib/modules/core/jelly-host.js +3 -0
  12. package/dist/lib/modules/core/schema/common.js +2 -0
  13. package/dist/lib/modules/core/schema/consent.js +20 -3
  14. package/dist/lib/modules/core/schema/conv-frames.js +10 -3
  15. package/dist/lib/modules/core/schema/directory-frames.js +8 -3
  16. package/dist/lib/modules/core/schema/errors.js +3 -2
  17. package/dist/lib/modules/core/schema/ipc/consent.js +85 -10
  18. package/dist/lib/modules/core/schema/ipc/conversation-views.js +8 -1
  19. package/dist/lib/modules/core/schema/ipc/conversations.js +5 -1
  20. package/dist/lib/modules/core/schema/ipc/device.js +7 -0
  21. package/dist/lib/modules/core/schema/ipc/jelly.js +14 -7
  22. package/dist/lib/modules/core/schema/ipc/shapes.js +60 -1
  23. package/dist/lib/modules/core/schema/ipc.js +51 -3
  24. package/dist/lib/modules/core/version.js +1 -1
  25. package/dist/spec/messaging-v1.md +321 -49
  26. package/dist/types/core/agent/present.d.ts +1 -1
  27. package/dist/types/core/agent-tools.d.ts +32 -0
  28. package/dist/types/core/consent.d.ts +30 -7
  29. package/dist/types/core/contact-card.d.ts +3 -3
  30. package/dist/types/core/conversation-agent-tools.d.ts +21 -0
  31. package/dist/types/core/index.d.ts +1 -1
  32. package/dist/types/core/schema/common.d.ts +2 -0
  33. package/dist/types/core/schema/consent.d.ts +23 -2
  34. package/dist/types/core/schema/conv-frames.d.ts +6 -2
  35. package/dist/types/core/schema/directory-frames.d.ts +8 -3
  36. package/dist/types/core/schema/envelope.d.ts +2 -0
  37. package/dist/types/core/schema/errors.d.ts +2 -0
  38. package/dist/types/core/schema/ipc/consent.d.ts +377 -15
  39. package/dist/types/core/schema/ipc/conversation-views.d.ts +176 -0
  40. package/dist/types/core/schema/ipc/conversations.d.ts +368 -0
  41. package/dist/types/core/schema/ipc/device.d.ts +6 -0
  42. package/dist/types/core/schema/ipc/jelly.d.ts +14 -6
  43. package/dist/types/core/schema/ipc/shapes.d.ts +198 -0
  44. package/dist/types/core/schema/ipc/surfaces.d.ts +1 -0
  45. package/dist/types/core/schema/ipc/tasks.d.ts +2 -0
  46. package/dist/types/core/schema/ipc.d.ts +826 -3
  47. package/dist/types/core/schema/relay.d.ts +4 -0
  48. package/dist/types/core/version.d.ts +1 -1
  49. package/dist/types/ipc/server.d.ts +6 -0
  50. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { type TaskReadOutput, type ToolConsent, type ToolOutput, type ToolTask } from "../agent-tools.js";
2
2
  import type { ConversationToolOutput } from "../conversation-agent-tools.js";
3
- import type { DirectoryEntry, InboxItem, IpcResult, TaskFollowUp, TaskRecord } from "../schema/ipc.js";
3
+ import { type DirectoryEntry, type InboxItem, type IpcResult, type TaskFollowUp, type TaskRecord } from "../schema/ipc.js";
4
4
  import { type ToolFramer as Framer } from "./text.js";
5
5
  /**
6
6
  * Daemon results → agent tool outputs (`AgentTool`, spec §11). Pure. Every string another person
@@ -101,6 +101,7 @@ export declare const ToolErrorBody: z.ZodObject<{
101
101
  jelly_unavailable: "jelly_unavailable";
102
102
  log_conflict: "log_conflict";
103
103
  conv_conflict: "conv_conflict";
104
+ conflict: "conflict";
104
105
  stale_epoch: "stale_epoch";
105
106
  device_limit: "device_limit";
106
107
  admission_required: "admission_required";
@@ -252,6 +253,7 @@ export declare const TaskSendOutput: z.ZodObject<{
252
253
  jelly_unavailable: "jelly_unavailable";
253
254
  log_conflict: "log_conflict";
254
255
  conv_conflict: "conv_conflict";
256
+ conflict: "conflict";
255
257
  stale_epoch: "stale_epoch";
256
258
  device_limit: "device_limit";
257
259
  admission_required: "admission_required";
@@ -309,6 +311,16 @@ declare const Task: z.ZodObject<{
309
311
  peer: "peer";
310
312
  ours: "ours";
311
313
  }>>;
314
+ signIn: z.ZodOptional<z.ZodObject<{
315
+ tool: z.ZodOptional<z.ZodString>;
316
+ by: z.ZodEnum<{
317
+ you: "you";
318
+ them: "them";
319
+ }>;
320
+ }, z.core.$strip>>;
321
+ refusal: z.ZodOptional<z.ZodObject<{
322
+ reason: z.ZodString;
323
+ }, z.core.$strip>>;
312
324
  createdAt: z.ZodString;
313
325
  updatedAt: z.ZodString;
314
326
  consent: z.ZodOptional<z.ZodEnum<{
@@ -455,6 +467,16 @@ export declare const TaskReadOutput: z.ZodObject<{
455
467
  peer: "peer";
456
468
  ours: "ours";
457
469
  }>>;
470
+ signIn: z.ZodOptional<z.ZodObject<{
471
+ tool: z.ZodOptional<z.ZodString>;
472
+ by: z.ZodEnum<{
473
+ you: "you";
474
+ them: "them";
475
+ }>;
476
+ }, z.core.$strip>>;
477
+ refusal: z.ZodOptional<z.ZodObject<{
478
+ reason: z.ZodString;
479
+ }, z.core.$strip>>;
458
480
  createdAt: z.ZodString;
459
481
  updatedAt: z.ZodString;
460
482
  consent: z.ZodOptional<z.ZodEnum<{
@@ -691,6 +713,16 @@ export declare const AgentTool: {
691
713
  trusted: "trusted";
692
714
  }>>;
693
715
  updatedAt: z.ZodString;
716
+ signIn: z.ZodOptional<z.ZodObject<{
717
+ tool: z.ZodOptional<z.ZodString>;
718
+ by: z.ZodEnum<{
719
+ you: "you";
720
+ them: "them";
721
+ }>;
722
+ }, z.core.$strip>>;
723
+ refusal: z.ZodOptional<z.ZodObject<{
724
+ reason: z.ZodString;
725
+ }, z.core.$strip>>;
694
726
  title: z.ZodOptional<z.ZodString>;
695
727
  counterpart: z.ZodString;
696
728
  titleAuthor: z.ZodOptional<z.ZodEnum<{
@@ -1,6 +1,7 @@
1
1
  import type { Identity } from "./identity.js";
2
2
  import { type MachineId, type PersonId, type Ulid } from "./schema/common.js";
3
3
  import { type AgentMailLevel, type AskLevel, type ChatLevel, ConsentGrant, type GrantLevels, type GrantSubject } from "./schema/consent.js";
4
+ import type { ReachValue } from "./schema/ipc/consent.js";
4
5
  import type { RealmId } from "./schema/realm.js";
5
6
  export interface ConsentGrantArgs {
6
7
  realm: RealmId;
@@ -25,6 +26,22 @@ export declare function verifyConsentGrant(raw: unknown, ctx: {
25
26
  }): ConsentGrant;
26
27
  /** The key one grant is stored under: its subject. One grant per subject. */
27
28
  export declare function grantSubjectKey(subject: GrantSubject): string;
29
+ /**
30
+ * The person's two reach choices, from their relation grants. `message` ("Who can message you") is the `outside`
31
+ * grant's `chat`: `open`, `blocked` (Never), or a grant with no level (Ask me first). `ask` ("How agents may ask
32
+ * yours") is the `org` grant's `ask`: `open`, `request` (Ask me first), `no` (Never). Absent: no grant, the defaults.
33
+ */
34
+ export interface ReachChoices {
35
+ message?: ReachValue;
36
+ ask?: ReachValue;
37
+ }
38
+ /** The choices a person's two relation grants make; a grant absent (or not current) leaves its choice unset. */
39
+ export declare function reachChoices(outside: GrantLevels | undefined, org: GrantLevels | undefined): ReachChoices;
40
+ /** The relation grant subject and levels that record one choice: the inverse of `reachChoices`. */
41
+ export declare function reachGrant(group: keyof ReachChoices, value: ReachValue): {
42
+ subject: GrantSubject;
43
+ levels: GrantLevels;
44
+ };
28
45
  /**
29
46
  * Of two copies of the grant for one subject, the one that counts (spec §6.9, "Merging"): the newer by `ts`, then
30
47
  * by `id`. Copies that tie on both are one grant signed twice: a copy whose signer is current beats one whose
@@ -67,10 +84,11 @@ export interface EffectivePolicy {
67
84
  }
68
85
  /**
69
86
  * Spec §6.9, "Effective policy": each level is the person grant's when it sets one; otherwise, for `ask` and
70
- * `agentMail`, the most permissive among the grants of channels the sender is in; otherwise the relation's
71
- * default. An expired `trustedUntil` reads as absent. The caller passes only grants whose signer is current.
87
+ * `agentMail`, the most permissive among the grants of channels the sender is in; otherwise the relation's level
88
+ * under the person's reach choices (`baseLevels`). An expired `trustedUntil` reads as absent. The caller passes only
89
+ * grants whose signer is current.
72
90
  */
73
- export declare function effectivePolicy(relation: Exclude<Relation, "self">, person: GrantLevels | undefined, channels: readonly GrantLevels[], now: number): EffectivePolicy;
91
+ export declare function effectivePolicy(relation: Exclude<Relation, "self">, person: GrantLevels | undefined, channels: readonly GrantLevels[], now: number, reach?: ReachChoices): EffectivePolicy;
74
92
  /**
75
93
  * What arrived, classified by the receiver (spec §6.9, "Enforcement"):
76
94
  * - `answer`: a receipt, a task update or cancel, or a message the counterpart binding ties to this person's own
@@ -114,6 +132,8 @@ export interface DecideArgs {
114
132
  grant?: GrantLevels;
115
133
  /** Grants of channels the sender is in, in the receiver's own view, each with a current signer. */
116
134
  channels: readonly GrantLevels[];
135
+ /** The receiving person's reach choices (their current relation grants); absent, the relation defaults. */
136
+ reach?: ReachChoices;
117
137
  inbound: Inbound;
118
138
  now: number;
119
139
  }
@@ -121,12 +141,15 @@ export interface DecideArgs {
121
141
  * Spec §6.9, "Enforcement": step 10 of the receiver order (§5), before the inbound policy of §8.3.
122
142
  * - The person's own traffic is delivered as `self`.
123
143
  * - Answers to the person's own traffic are delivered whatever the grants, so a change never strands a task.
124
- * - A `blocked` chat level refuses every other class from the sender.
125
- * - A `stranger` reaches the person only through a level a grant opened; otherwise `request_required`.
144
+ * - A `blocked` chat level from the person grant refuses every other class from the sender.
145
+ * - A `blocked` chat level from the reach choice Never refuses the sender's lines, message requests and channel
146
+ * changes, `refused`; agent mail and asks follow their own levels, so a grant that opened them still counts.
147
+ * - A `stranger` reaches the person only through a level a grant or a choice opened; otherwise `request_required`.
126
148
  * - Lines follow `chat` (person) or `agentMail` (agent); `muted` delivers silently.
127
149
  * - Asks follow `ask`: `open` delivers guarded, or trusted while the person grant trusts the sender and every person
128
150
  * in the delegation chain is the sender or the receiver; `request` holds; `no` refuses, `request_required` when
129
- * it is the default of a `contact` or a `stranger`.
130
- * - A message request from a `stranger` is held for the person to accept; from anyone else it is a DM line.
151
+ * it is the default of a `contact` or a `stranger` and the person has not chosen Never for messages.
152
+ * - A message request is held for the person while `chat` is `request_required` (a `stranger` under Ask me first);
153
+ * otherwise it is a DM line.
131
154
  */
132
155
  export declare function decide(args: DecideArgs): ConsentDecision;
@@ -1,4 +1,4 @@
1
- import { type Relation } from "./consent.js";
1
+ import { type ReachChoices, type Relation } from "./consent.js";
2
2
  import type { Identity } from "./identity.js";
3
3
  import { type PersonId, type Ulid } from "./schema/common.js";
4
4
  import { type CardCan, ContactCard, type GrantLevels } from "./schema/consent.js";
@@ -29,6 +29,6 @@ export declare function verifyContactCard(raw: unknown, ctx: {
29
29
  }): ContactCard;
30
30
  /**
31
31
  * What a card says for a sender of `relation` with the person grant `grant` (spec §6.9, "Contact cards"): the
32
- * person grant over the relation's defaults. Channel grants are not on a card: the sender knows its own channels.
32
+ * person grant over the relation's level under the person's reach choices. Channel grants are not on a card: the sender knows its own channels.
33
33
  */
34
- export declare function cardCan(relation: Exclude<Relation, "self">, grant: GrantLevels | undefined, now: number): CardCan;
34
+ export declare function cardCan(relation: Exclude<Relation, "self">, grant: GrantLevels | undefined, now: number, reach?: ReachChoices): CardCan;
@@ -260,6 +260,7 @@ export declare const ConversationTools: {
260
260
  jelly_unavailable: "jelly_unavailable";
261
261
  log_conflict: "log_conflict";
262
262
  conv_conflict: "conv_conflict";
263
+ conflict: "conflict";
263
264
  stale_epoch: "stale_epoch";
264
265
  device_limit: "device_limit";
265
266
  admission_required: "admission_required";
@@ -496,6 +497,16 @@ export declare const ConversationTools: {
496
497
  peer: "peer";
497
498
  ours: "ours";
498
499
  }>>;
500
+ signIn: z.ZodOptional<z.ZodObject<{
501
+ tool: z.ZodOptional<z.ZodString>;
502
+ by: z.ZodEnum<{
503
+ you: "you";
504
+ them: "them";
505
+ }>;
506
+ }, z.core.$strip>>;
507
+ refusal: z.ZodOptional<z.ZodObject<{
508
+ reason: z.ZodString;
509
+ }, z.core.$strip>>;
499
510
  createdAt: z.ZodString;
500
511
  updatedAt: z.ZodString;
501
512
  consent: z.ZodOptional<z.ZodEnum<{
@@ -832,6 +843,16 @@ export declare const ConversationTools: {
832
843
  trusted: "trusted";
833
844
  }>>;
834
845
  updatedAt: z.ZodString;
846
+ signIn: z.ZodOptional<z.ZodObject<{
847
+ tool: z.ZodOptional<z.ZodString>;
848
+ by: z.ZodEnum<{
849
+ you: "you";
850
+ them: "them";
851
+ }>;
852
+ }, z.core.$strip>>;
853
+ refusal: z.ZodOptional<z.ZodObject<{
854
+ reason: z.ZodString;
855
+ }, z.core.$strip>>;
835
856
  title: z.ZodOptional<z.ZodString>;
836
857
  counterpart: z.ZodString;
837
858
  titleAuthor: z.ZodOptional<z.ZodEnum<{
@@ -31,7 +31,7 @@ export { MerkleLog, merkleLeafHash, verifyConsistency, verifyInclusion } from ".
31
31
  export { MAP_DEPTH, SparseMerkleTree, TOMBSTONE, emptyMapHash, mapKey, mapRootFromProof, mapValue, verifyMapProof } from "./directory/smt.js";
32
32
  export { parseAddress, formatAddress, type ParsedAddress } from "./address.js";
33
33
  export { decodeAdmitCard, decodeTeamCard, encodeAdmitCard, encodeTeamCard, type AdmitCard, type TeamCard, } from "./cards.js";
34
- export { decide, effectivePolicy, grantSubjectKey, levelsOf, preferGrant, resignGrant, restrictingLevels, signConsentGrant, verifyConsentGrant, wideningLevels, type ConsentClass, type ConsentDecision, type ConsentGrantArgs, type DecideArgs, type EffectivePolicy, type Inbound, type Relation, } from "./consent.js";
34
+ export { decide, effectivePolicy, grantSubjectKey, levelsOf, preferGrant, reachChoices, reachGrant, resignGrant, restrictingLevels, signConsentGrant, verifyConsentGrant, wideningLevels, type ConsentClass, type ConsentDecision, type ConsentGrantArgs, type DecideArgs, type EffectivePolicy, type Inbound, type ReachChoices, type Relation, } from "./consent.js";
35
35
  export { cardCan, signContactCard, verifyContactCard, type ContactCardArgs } from "./contact-card.js";
36
36
  export { createGrant, verifyChain, type GrantArgs, type ChainHop, type ChainContext, type VerifiedChain } from "./delegation.js";
37
37
  export { canTransition, isTerminal, isInterrupted } from "./task.js";
@@ -66,6 +66,8 @@ export declare const URI: {
66
66
  readonly binding: "urn:messaging:binding:relay:v1";
67
67
  readonly provenance: "urn:messaging:ext:provenance:v1";
68
68
  readonly presence: "urn:messaging:ext:presence:v1";
69
+ /** An `AUTH_REQUIRED` status message's `metadata[URI.signIn]`: `{tool}`, the tool whose sign-in the task waits on (spec §6.2). */
70
+ readonly signIn: "urn:messaging:ext:sign-in:v1";
69
71
  };
70
72
  export declare const Base64Url: z.ZodString;
71
73
  /** Any 32-byte value in base64url, e.g. a raw public key. */
@@ -24,18 +24,34 @@ export declare const AskLevel: z.ZodEnum<{
24
24
  no: "no";
25
25
  }>;
26
26
  export type AskLevel = z.infer<typeof AskLevel>;
27
- /** Whom a grant is about: one person, or the verified participants of one conversation. */
27
+ /**
28
+ * The relations a reach choice is about (spec §6.9, "Reach choices"): `outside`, the people of other orgs (`contact`
29
+ * and `stranger`), whose `chat` the person's "Who can message you" sets; `org`, the person's teammates, whose `ask`
30
+ * their "How agents may ask yours" sets.
31
+ */
32
+ export declare const GrantRelation: z.ZodEnum<{
33
+ org: "org";
34
+ outside: "outside";
35
+ }>;
36
+ export type GrantRelation = z.infer<typeof GrantRelation>;
37
+ /** Whom a grant is about: one person, the verified participants of one conversation, or one relation (a reach choice). */
28
38
  export declare const GrantSubject: z.ZodUnion<readonly [z.ZodObject<{
29
39
  person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
30
40
  }, z.core.$strict>, z.ZodObject<{
31
41
  conv: z.ZodString;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ relation: z.ZodEnum<{
44
+ org: "org";
45
+ outside: "outside";
46
+ }>;
32
47
  }, z.core.$strict>]>;
33
48
  export type GrantSubject = z.infer<typeof GrantSubject>;
34
49
  /**
35
50
  * A grant, signed by `by`, a device of `person`: `sig = Ed25519(by, "messaging/1/grant\n" || JCS(grant without sig))`.
36
51
  * Every level is optional: an absent level is the default for the relation (spec §6.9, "Effective policy"), and a
37
52
  * grant with none is a clear. `trustedUntil` needs `ask: "open"` and is at most `ts + LIMITS.trustMaxMs`. A channel
38
- * grant sets only `ask` and `agentMail`. A grant about the person themself sets only `discoverable`.
53
+ * grant sets only `ask` and `agentMail`. A grant about the person themself sets only `discoverable`. A relation
54
+ * grant (a reach choice) sets only `chat` (`open` or `blocked`) for `outside`, and only `ask` for `org`.
39
55
  * `resignedAt` marks a grant re-signed by another device of the person (spec §6.9, "Signers"); it keeps `id` and
40
56
  * `ts`.
41
57
  */
@@ -50,6 +66,11 @@ export declare const ConsentGrant: z.ZodObject<{
50
66
  person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
51
67
  }, z.core.$strict>, z.ZodObject<{
52
68
  conv: z.ZodString;
69
+ }, z.core.$strict>, z.ZodObject<{
70
+ relation: z.ZodEnum<{
71
+ org: "org";
72
+ outside: "outside";
73
+ }>;
53
74
  }, z.core.$strict>]>;
54
75
  chat: z.ZodOptional<z.ZodEnum<{
55
76
  open: "open";
@@ -8,7 +8,7 @@
8
8
  * conv.share {req, events} → conv.shared {req, cid, count} key shares, one recipient each
9
9
  * conv.fetch {req, cid, after, limit?, sharesAfter?} → conv.entries {req, cid, head, entries, shares, more}
10
10
  * conv.head {req, cids? | after?} → conv.heads {req, heads, more}
11
- * conv.caps {req, persons} → conv.capabilities {req, outdated} who cannot read conversations yet
11
+ * conv.caps {req, persons} → conv.capabilities {req, outdated, unknown?} who cannot read conversations yet
12
12
  * relay → conv.push {cid, entry} | {cid, share} a new entry to the members' online devices; a share to its recipient
13
13
  *
14
14
  * The relay sequences and filters; members verify everything (spec §16.4, §16.7). It never signs an entry.
@@ -828,11 +828,15 @@ export declare const ConvHeadsFrame: z.ZodObject<{
828
828
  more: z.ZodBoolean;
829
829
  }, z.core.$strict>;
830
830
  export type ConvHeadsFrame = z.infer<typeof ConvHeadsFrame>;
831
- /** `conv.caps`'s answer: the named persons that cannot read conversations yet. */
831
+ /**
832
+ * `conv.caps`'s answer: the named persons that cannot read conversations yet, and, only when there are any, the
833
+ * persons it says nothing about (`unknown`: unrelated persons past the asker's daily budget).
834
+ */
832
835
  export declare const ConvCapabilitiesFrame: z.ZodObject<{
833
836
  t: z.ZodLiteral<"conv.capabilities">;
834
837
  req: z.ZodString;
835
838
  outdated: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
839
+ unknown: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
836
840
  }, z.core.$strict>;
837
841
  export type ConvCapabilitiesFrame = z.infer<typeof ConvCapabilitiesFrame>;
838
842
  /** A new entry, to the online devices of the conversation's participant persons; or a new share, to its recipient. */
@@ -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. A new
376
- * arm replaces the device's previous one.
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;
@@ -392,6 +392,7 @@ export declare const ReceiptPayload: z.ZodObject<{
392
392
  jelly_unavailable: "jelly_unavailable";
393
393
  log_conflict: "log_conflict";
394
394
  conv_conflict: "conv_conflict";
395
+ conflict: "conflict";
395
396
  stale_epoch: "stale_epoch";
396
397
  device_limit: "device_limit";
397
398
  admission_required: "admission_required";
@@ -639,6 +640,7 @@ export declare const PAYLOAD_BY_TYPE: {
639
640
  jelly_unavailable: "jelly_unavailable";
640
641
  log_conflict: "log_conflict";
641
642
  conv_conflict: "conv_conflict";
643
+ conflict: "conflict";
642
644
  stale_epoch: "stale_epoch";
643
645
  device_limit: "device_limit";
644
646
  admission_required: "admission_required";
@@ -30,6 +30,7 @@ export declare const ErrorCode: z.ZodEnum<{
30
30
  jelly_unavailable: "jelly_unavailable";
31
31
  log_conflict: "log_conflict";
32
32
  conv_conflict: "conv_conflict";
33
+ conflict: "conflict";
33
34
  stale_epoch: "stale_epoch";
34
35
  device_limit: "device_limit";
35
36
  admission_required: "admission_required";
@@ -98,6 +99,7 @@ export declare const ErrorBody: z.ZodObject<{
98
99
  jelly_unavailable: "jelly_unavailable";
99
100
  log_conflict: "log_conflict";
100
101
  conv_conflict: "conv_conflict";
102
+ conflict: "conflict";
101
103
  stale_epoch: "stale_epoch";
102
104
  device_limit: "device_limit";
103
105
  admission_required: "admission_required";