@joe-broadhead/messaging 0.0.0-stage → 0.7.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.
Files changed (273) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +12 -0
  4. package/README.md +36 -2
  5. package/dist/bin/messaging-mcp.js +26524 -0
  6. package/dist/bin/messaging-relay.js +19768 -0
  7. package/dist/bin/messaging.js +15465 -0
  8. package/dist/bin/messagingd.js +29449 -0
  9. package/dist/lib/core-testing.js +1 -0
  10. package/dist/lib/core.js +1 -0
  11. package/dist/lib/ipc-testing.js +1 -0
  12. package/dist/lib/ipc.js +1 -0
  13. package/dist/lib/modules/core/address.js +42 -0
  14. package/dist/lib/modules/core/agent/operations.js +595 -0
  15. package/dist/lib/modules/core/agent/present.js +244 -0
  16. package/dist/lib/modules/core/agent/text.js +79 -0
  17. package/dist/lib/modules/core/agent-tools.js +477 -0
  18. package/dist/lib/modules/core/b64u.js +20 -0
  19. package/dist/lib/modules/core/cards.js +55 -0
  20. package/dist/lib/modules/core/check.js +20 -0
  21. package/dist/lib/modules/core/consent.js +199 -0
  22. package/dist/lib/modules/core/contact-card.js +74 -0
  23. package/dist/lib/modules/core/conversation/context.js +80 -0
  24. package/dist/lib/modules/core/conversation/event.js +100 -0
  25. package/dist/lib/modules/core/conversation/ids.js +38 -0
  26. package/dist/lib/modules/core/conversation/link.js +35 -0
  27. package/dist/lib/modules/core/conversation/log.js +766 -0
  28. package/dist/lib/modules/core/conversation/ratchet.js +243 -0
  29. package/dist/lib/modules/core/conversation/seal.js +198 -0
  30. package/dist/lib/modules/core/delegation.js +174 -0
  31. package/dist/lib/modules/core/directory/device-log.js +258 -0
  32. package/dist/lib/modules/core/directory/epoch.js +103 -0
  33. package/dist/lib/modules/core/directory/handle.js +29 -0
  34. package/dist/lib/modules/core/directory/jelly-device.js +204 -0
  35. package/dist/lib/modules/core/directory/jelly-issuer.js +12 -0
  36. package/dist/lib/modules/core/directory/jelly-token.js +305 -0
  37. package/dist/lib/modules/core/directory/keys-statement.js +43 -0
  38. package/dist/lib/modules/core/directory/link.js +81 -0
  39. package/dist/lib/modules/core/directory/merkle-log.js +250 -0
  40. package/dist/lib/modules/core/directory/person-view.js +197 -0
  41. package/dist/lib/modules/core/directory/person.js +40 -0
  42. package/dist/lib/modules/core/directory/realm.js +59 -0
  43. package/dist/lib/modules/core/directory/smt.js +266 -0
  44. package/dist/lib/modules/core/envelope.js +320 -0
  45. package/dist/lib/modules/core/hash.js +5 -0
  46. package/dist/lib/modules/core/head.js +27 -0
  47. package/dist/lib/modules/core/identity.js +71 -0
  48. package/dist/lib/modules/core/index.js +53 -0
  49. package/dist/lib/modules/core/jcs.js +96 -0
  50. package/dist/lib/modules/core/jelly-host-double.js +35 -0
  51. package/dist/lib/modules/core/jelly-host.js +211 -0
  52. package/dist/lib/modules/core/keys.js +79 -0
  53. package/dist/lib/modules/core/peer-text.js +563 -0
  54. package/dist/lib/modules/core/realm.js +1 -0
  55. package/dist/lib/modules/core/roster.js +454 -0
  56. package/dist/lib/modules/core/schema/a2a.js +85 -0
  57. package/dist/lib/modules/core/schema/common.js +310 -0
  58. package/dist/lib/modules/core/schema/consent.js +120 -0
  59. package/dist/lib/modules/core/schema/conversation.js +292 -0
  60. package/dist/lib/modules/core/schema/delegation.js +58 -0
  61. package/dist/lib/modules/core/schema/directory-frames.js +270 -0
  62. package/dist/lib/modules/core/schema/directory.js +169 -0
  63. package/dist/lib/modules/core/schema/envelope.js +211 -0
  64. package/dist/lib/modules/core/schema/errors.js +104 -0
  65. package/dist/lib/modules/core/schema/index.js +16 -0
  66. package/dist/lib/modules/core/schema/ipc/consent.js +181 -0
  67. package/dist/lib/modules/core/schema/ipc/device.js +276 -0
  68. package/dist/lib/modules/core/schema/ipc/jelly.js +189 -0
  69. package/dist/lib/modules/core/schema/ipc/shapes.js +185 -0
  70. package/dist/lib/modules/core/schema/ipc/surfaces.js +223 -0
  71. package/dist/lib/modules/core/schema/ipc.js +451 -0
  72. package/dist/lib/modules/core/schema/jelly.js +122 -0
  73. package/dist/lib/modules/core/schema/realm.js +27 -0
  74. package/dist/lib/modules/core/schema/relay.js +112 -0
  75. package/dist/lib/modules/core/schema/roster.js +126 -0
  76. package/dist/lib/modules/core/sign.js +43 -0
  77. package/dist/lib/modules/core/task.js +37 -0
  78. package/dist/lib/modules/core/testing.js +21 -0
  79. package/dist/lib/modules/core/ulid.js +36 -0
  80. package/dist/lib/modules/core/version.js +6 -0
  81. package/dist/lib/modules/core/wire.js +255 -0
  82. package/dist/lib/modules/ipc/client.js +289 -0
  83. package/dist/lib/modules/ipc/framing.js +33 -0
  84. package/dist/lib/modules/ipc/index.js +6 -0
  85. package/dist/lib/modules/ipc/paths.js +102 -0
  86. package/dist/lib/modules/ipc/pipes.js +65 -0
  87. package/dist/lib/modules/ipc/rpc.js +8 -0
  88. package/dist/lib/modules/ipc/server.js +317 -0
  89. package/dist/lib/modules/ipc/testing.js +145 -0
  90. package/dist/lib/modules/ipc/trust.js +166 -0
  91. package/dist/lib/modules/ipc/windows-acl.js +275 -0
  92. package/dist/lib/modules/vendor/zod/index.js +7 -0
  93. package/dist/lib/modules/vendor/zod/v4/classic/checks.js +1 -0
  94. package/dist/lib/modules/vendor/zod/v4/classic/coerce.js +17 -0
  95. package/dist/lib/modules/vendor/zod/v4/classic/compat.js +31 -0
  96. package/dist/lib/modules/vendor/zod/v4/classic/deep-partial.js +13 -0
  97. package/dist/lib/modules/vendor/zod/v4/classic/errors.js +57 -0
  98. package/dist/lib/modules/vendor/zod/v4/classic/external.js +17 -0
  99. package/dist/lib/modules/vendor/zod/v4/classic/from-json-schema.js +881 -0
  100. package/dist/lib/modules/vendor/zod/v4/classic/in-out.js +36 -0
  101. package/dist/lib/modules/vendor/zod/v4/classic/iso.js +15 -0
  102. package/dist/lib/modules/vendor/zod/v4/classic/parse.js +16 -0
  103. package/dist/lib/modules/vendor/zod/v4/classic/schemas.js +1535 -0
  104. package/dist/lib/modules/vendor/zod/v4/core/api.js +1107 -0
  105. package/dist/lib/modules/vendor/zod/v4/core/checks.js +516 -0
  106. package/dist/lib/modules/vendor/zod/v4/core/compile.js +1866 -0
  107. package/dist/lib/modules/vendor/zod/v4/core/core.js +141 -0
  108. package/dist/lib/modules/vendor/zod/v4/core/doc.js +38 -0
  109. package/dist/lib/modules/vendor/zod/v4/core/errors.js +267 -0
  110. package/dist/lib/modules/vendor/zod/v4/core/index.js +19 -0
  111. package/dist/lib/modules/vendor/zod/v4/core/json-schema-generator.js +99 -0
  112. package/dist/lib/modules/vendor/zod/v4/core/json-schema-processors.js +843 -0
  113. package/dist/lib/modules/vendor/zod/v4/core/json-schema.js +1 -0
  114. package/dist/lib/modules/vendor/zod/v4/core/memoizer.js +311 -0
  115. package/dist/lib/modules/vendor/zod/v4/core/parse.js +175 -0
  116. package/dist/lib/modules/vendor/zod/v4/core/regexes.js +156 -0
  117. package/dist/lib/modules/vendor/zod/v4/core/registries.js +51 -0
  118. package/dist/lib/modules/vendor/zod/v4/core/schemas.js +2636 -0
  119. package/dist/lib/modules/vendor/zod/v4/core/to-json-schema.js +651 -0
  120. package/dist/lib/modules/vendor/zod/v4/core/util.js +873 -0
  121. package/dist/lib/modules/vendor/zod/v4/core/versions.js +5 -0
  122. package/dist/lib/modules/vendor/zod/v4/core/visit.js +169 -0
  123. package/dist/lib/modules/vendor/zod/v4/locales/ar.js +111 -0
  124. package/dist/lib/modules/vendor/zod/v4/locales/az.js +110 -0
  125. package/dist/lib/modules/vendor/zod/v4/locales/be.js +168 -0
  126. package/dist/lib/modules/vendor/zod/v4/locales/bg.js +125 -0
  127. package/dist/lib/modules/vendor/zod/v4/locales/bn.js +113 -0
  128. package/dist/lib/modules/vendor/zod/v4/locales/ca.js +112 -0
  129. package/dist/lib/modules/vendor/zod/v4/locales/ckb.js +133 -0
  130. package/dist/lib/modules/vendor/zod/v4/locales/cs.js +116 -0
  131. package/dist/lib/modules/vendor/zod/v4/locales/da.js +120 -0
  132. package/dist/lib/modules/vendor/zod/v4/locales/de.js +113 -0
  133. package/dist/lib/modules/vendor/zod/v4/locales/el.js +112 -0
  134. package/dist/lib/modules/vendor/zod/v4/locales/en.js +125 -0
  135. package/dist/lib/modules/vendor/zod/v4/locales/eo.js +114 -0
  136. package/dist/lib/modules/vendor/zod/v4/locales/es.js +136 -0
  137. package/dist/lib/modules/vendor/zod/v4/locales/fa.js +119 -0
  138. package/dist/lib/modules/vendor/zod/v4/locales/fi.js +117 -0
  139. package/dist/lib/modules/vendor/zod/v4/locales/fr-CA.js +112 -0
  140. package/dist/lib/modules/vendor/zod/v4/locales/fr.js +129 -0
  141. package/dist/lib/modules/vendor/zod/v4/locales/gu.js +113 -0
  142. package/dist/lib/modules/vendor/zod/v4/locales/he.js +221 -0
  143. package/dist/lib/modules/vendor/zod/v4/locales/hi.js +111 -0
  144. package/dist/lib/modules/vendor/zod/v4/locales/hr.js +126 -0
  145. package/dist/lib/modules/vendor/zod/v4/locales/hu.js +113 -0
  146. package/dist/lib/modules/vendor/zod/v4/locales/hy.js +158 -0
  147. package/dist/lib/modules/vendor/zod/v4/locales/id.js +111 -0
  148. package/dist/lib/modules/vendor/zod/v4/locales/index.js +63 -0
  149. package/dist/lib/modules/vendor/zod/v4/locales/is.js +114 -0
  150. package/dist/lib/modules/vendor/zod/v4/locales/it.js +113 -0
  151. package/dist/lib/modules/vendor/zod/v4/locales/ja.js +112 -0
  152. package/dist/lib/modules/vendor/zod/v4/locales/ka.js +117 -0
  153. package/dist/lib/modules/vendor/zod/v4/locales/kh.js +5 -0
  154. package/dist/lib/modules/vendor/zod/v4/locales/km.js +115 -0
  155. package/dist/lib/modules/vendor/zod/v4/locales/kn.js +116 -0
  156. package/dist/lib/modules/vendor/zod/v4/locales/ko.js +116 -0
  157. package/dist/lib/modules/vendor/zod/v4/locales/lt.js +207 -0
  158. package/dist/lib/modules/vendor/zod/v4/locales/mk.js +114 -0
  159. package/dist/lib/modules/vendor/zod/v4/locales/ms.js +112 -0
  160. package/dist/lib/modules/vendor/zod/v4/locales/ne.js +111 -0
  161. package/dist/lib/modules/vendor/zod/v4/locales/nl.js +115 -0
  162. package/dist/lib/modules/vendor/zod/v4/locales/nn.js +113 -0
  163. package/dist/lib/modules/vendor/zod/v4/locales/no.js +113 -0
  164. package/dist/lib/modules/vendor/zod/v4/locales/ota.js +114 -0
  165. package/dist/lib/modules/vendor/zod/v4/locales/pl.js +114 -0
  166. package/dist/lib/modules/vendor/zod/v4/locales/ps.js +119 -0
  167. package/dist/lib/modules/vendor/zod/v4/locales/pt-BR.js +143 -0
  168. package/dist/lib/modules/vendor/zod/v4/locales/pt.js +142 -0
  169. package/dist/lib/modules/vendor/zod/v4/locales/ro.js +122 -0
  170. package/dist/lib/modules/vendor/zod/v4/locales/ru.js +168 -0
  171. package/dist/lib/modules/vendor/zod/v4/locales/sk.js +116 -0
  172. package/dist/lib/modules/vendor/zod/v4/locales/sl.js +114 -0
  173. package/dist/lib/modules/vendor/zod/v4/locales/sv.js +115 -0
  174. package/dist/lib/modules/vendor/zod/v4/locales/ta.js +115 -0
  175. package/dist/lib/modules/vendor/zod/v4/locales/tg.js +117 -0
  176. package/dist/lib/modules/vendor/zod/v4/locales/th.js +115 -0
  177. package/dist/lib/modules/vendor/zod/v4/locales/tk.js +107 -0
  178. package/dist/lib/modules/vendor/zod/v4/locales/tr.js +110 -0
  179. package/dist/lib/modules/vendor/zod/v4/locales/ua.js +5 -0
  180. package/dist/lib/modules/vendor/zod/v4/locales/uk.js +113 -0
  181. package/dist/lib/modules/vendor/zod/v4/locales/ur.js +115 -0
  182. package/dist/lib/modules/vendor/zod/v4/locales/uz.js +113 -0
  183. package/dist/lib/modules/vendor/zod/v4/locales/vi.js +113 -0
  184. package/dist/lib/modules/vendor/zod/v4/locales/yo.js +112 -0
  185. package/dist/lib/modules/vendor/zod/v4/locales/zh-CN.js +114 -0
  186. package/dist/lib/modules/vendor/zod/v4/locales/zh-TW.js +112 -0
  187. package/dist/lib/testing-jelly-id.js +1219 -0
  188. package/dist/lib/zod.js +1 -0
  189. package/dist/spec/messaging-v1.md +3744 -0
  190. package/dist/third-party-notices.md +239 -0
  191. package/dist/third-party.json +88 -0
  192. package/dist/types/core/address.d.ts +16 -0
  193. package/dist/types/core/agent/operations.d.ts +129 -0
  194. package/dist/types/core/agent/present.d.ts +57 -0
  195. package/dist/types/core/agent/text.d.ts +62 -0
  196. package/dist/types/core/agent-tools.d.ts +966 -0
  197. package/dist/types/core/b64u.d.ts +6 -0
  198. package/dist/types/core/cards.d.ts +21 -0
  199. package/dist/types/core/check.d.ts +10 -0
  200. package/dist/types/core/consent.d.ts +132 -0
  201. package/dist/types/core/contact-card.d.ts +34 -0
  202. package/dist/types/core/conversation/context.d.ts +56 -0
  203. package/dist/types/core/conversation/event.d.ts +36 -0
  204. package/dist/types/core/conversation/ids.d.ts +18 -0
  205. package/dist/types/core/conversation/link.d.ts +16 -0
  206. package/dist/types/core/conversation/log.d.ts +142 -0
  207. package/dist/types/core/conversation/ratchet.d.ts +95 -0
  208. package/dist/types/core/conversation/seal.d.ts +47 -0
  209. package/dist/types/core/delegation.d.ts +71 -0
  210. package/dist/types/core/directory/device-log.d.ts +119 -0
  211. package/dist/types/core/directory/epoch.d.ts +53 -0
  212. package/dist/types/core/directory/handle.d.ts +11 -0
  213. package/dist/types/core/directory/jelly-device.d.ts +88 -0
  214. package/dist/types/core/directory/jelly-issuer.d.ts +8 -0
  215. package/dist/types/core/directory/jelly-token.d.ts +116 -0
  216. package/dist/types/core/directory/keys-statement.d.ts +22 -0
  217. package/dist/types/core/directory/link.d.ts +36 -0
  218. package/dist/types/core/directory/merkle-log.d.ts +40 -0
  219. package/dist/types/core/directory/person-view.d.ts +90 -0
  220. package/dist/types/core/directory/person.d.ts +8 -0
  221. package/dist/types/core/directory/realm.d.ts +23 -0
  222. package/dist/types/core/directory/smt.d.ts +52 -0
  223. package/dist/types/core/envelope.d.ts +68 -0
  224. package/dist/types/core/hash.d.ts +2 -0
  225. package/dist/types/core/head.d.ts +34 -0
  226. package/dist/types/core/identity.d.ts +35 -0
  227. package/dist/types/core/index.d.ts +45 -0
  228. package/dist/types/core/jcs.d.ts +12 -0
  229. package/dist/types/core/jelly-host-double.d.ts +21 -0
  230. package/dist/types/core/jelly-host.d.ts +86 -0
  231. package/dist/types/core/keys.d.ts +16 -0
  232. package/dist/types/core/peer-text.d.ts +87 -0
  233. package/dist/types/core/realm.d.ts +36 -0
  234. package/dist/types/core/roster.d.ts +146 -0
  235. package/dist/types/core/schema/a2a.d.ts +251 -0
  236. package/dist/types/core/schema/common.d.ts +328 -0
  237. package/dist/types/core/schema/consent.d.ts +140 -0
  238. package/dist/types/core/schema/conversation.d.ts +1657 -0
  239. package/dist/types/core/schema/delegation.d.ts +58 -0
  240. package/dist/types/core/schema/directory-frames.d.ts +1301 -0
  241. package/dist/types/core/schema/directory.d.ts +375 -0
  242. package/dist/types/core/schema/envelope.d.ts +756 -0
  243. package/dist/types/core/schema/errors.d.ts +142 -0
  244. package/dist/types/core/schema/index.d.ts +16 -0
  245. package/dist/types/core/schema/ipc/consent.d.ts +555 -0
  246. package/dist/types/core/schema/ipc/device.d.ts +735 -0
  247. package/dist/types/core/schema/ipc/jelly.d.ts +501 -0
  248. package/dist/types/core/schema/ipc/shapes.d.ts +414 -0
  249. package/dist/types/core/schema/ipc/surfaces.d.ts +680 -0
  250. package/dist/types/core/schema/ipc.d.ts +3146 -0
  251. package/dist/types/core/schema/jelly.d.ts +160 -0
  252. package/dist/types/core/schema/realm.d.ts +38 -0
  253. package/dist/types/core/schema/relay.d.ts +1134 -0
  254. package/dist/types/core/schema/roster.d.ts +347 -0
  255. package/dist/types/core/sign.d.ts +13 -0
  256. package/dist/types/core/task.d.ts +6 -0
  257. package/dist/types/core/testing.d.ts +19 -0
  258. package/dist/types/core/ulid.d.ts +5 -0
  259. package/dist/types/core/version.d.ts +6 -0
  260. package/dist/types/core/wire.d.ts +14 -0
  261. package/dist/types/ipc/client.d.ts +85 -0
  262. package/dist/types/ipc/framing.d.ts +12 -0
  263. package/dist/types/ipc/index.d.ts +6 -0
  264. package/dist/types/ipc/paths.d.ts +39 -0
  265. package/dist/types/ipc/pipes.d.ts +16 -0
  266. package/dist/types/ipc/rpc.d.ts +13 -0
  267. package/dist/types/ipc/server.d.ts +94 -0
  268. package/dist/types/ipc/testing.d.ts +89 -0
  269. package/dist/types/ipc/trust.d.ts +49 -0
  270. package/dist/types/ipc/windows-acl.d.ts +56 -0
  271. package/dist/types/testing/jelly-id.d.ts +518 -0
  272. package/dist/types/zod.d.ts +1 -0
  273. package/package.json +77 -4
@@ -0,0 +1,375 @@
1
+ /**
2
+ * Hosted realms: the key directory's signed and hashed objects (spec §15). Every object here is hashed or
3
+ * signed as JCS, so each is strict: an unknown member is refused rather than carried unsigned.
4
+ */
5
+ import { z } from "zod";
6
+ /** A map proof (§15.5): a 256-bit bitmap of the non-empty siblings, and those siblings, bottom up. */
7
+ export declare const MapProof: z.ZodObject<{
8
+ bitmap: z.ZodString;
9
+ siblings: z.ZodArray<z.ZodString>;
10
+ }, z.core.$strict>;
11
+ export type MapProof = z.infer<typeof MapProof>;
12
+ /** What a live person's map leaf commits to (§15.5): their log head, and the hashes of their current keys statements. */
13
+ export declare const MapValue: z.ZodObject<{
14
+ log: z.ZodObject<{
15
+ seq: z.ZodNumber;
16
+ hash: z.ZodString;
17
+ }, z.core.$strict>;
18
+ keys: z.ZodArray<z.ZodString>;
19
+ }, z.core.$strict>;
20
+ export type MapValue = z.infer<typeof MapValue>;
21
+ /** A device's id: its Ed25519 public key, as a machine's (§3). */
22
+ export declare const DeviceId: z.ZodString;
23
+ export type DeviceId = z.infer<typeof DeviceId>;
24
+ /** What kind of device it is; informational. */
25
+ export declare const DeviceKind: z.ZodEnum<{
26
+ "jelly-host": "jelly-host";
27
+ laptop: "laptop";
28
+ server: "server";
29
+ other: "other";
30
+ }>;
31
+ export type DeviceKind = z.infer<typeof DeviceKind>;
32
+ /** Why a device was unbound (§15.3). */
33
+ export declare const UnbindReason: z.ZodEnum<{
34
+ self: "self";
35
+ removed: "removed";
36
+ lost: "lost";
37
+ replaced: "replaced";
38
+ account_deleted: "account_deleted";
39
+ }>;
40
+ export type UnbindReason = z.infer<typeof UnbindReason>;
41
+ /**
42
+ * A new device's request to be approved by one of its person's devices (§15.3): shown as
43
+ * `messaging-link.<base64url(JCS(request))>`. `sig` is the new device's, over JCS(request without sig).
44
+ */
45
+ export declare const LinkRequest: z.ZodObject<{
46
+ v: z.ZodLiteral<"messaging/1">;
47
+ realm: z.ZodString;
48
+ device: z.ZodString;
49
+ enc: z.ZodString;
50
+ label: z.ZodString;
51
+ kind: z.ZodEnum<{
52
+ "jelly-host": "jelly-host";
53
+ laptop: "laptop";
54
+ server: "server";
55
+ other: "other";
56
+ }>;
57
+ nonce: z.ZodString;
58
+ ts: z.ZodNumber;
59
+ sig: z.ZodString;
60
+ }, z.core.$strict>;
61
+ export type LinkRequest = z.infer<typeof LinkRequest>;
62
+ /** Who vouches for a device-log entry (§15.3). */
63
+ export declare const Authority: z.ZodDiscriminatedUnion<[z.ZodObject<{
64
+ kind: z.ZodLiteral<"jelly">;
65
+ token: z.ZodString;
66
+ }, z.core.$strict>, z.ZodObject<{
67
+ kind: z.ZodLiteral<"device">;
68
+ approver: z.ZodString;
69
+ link: z.ZodObject<{
70
+ v: z.ZodLiteral<"messaging/1">;
71
+ realm: z.ZodString;
72
+ device: z.ZodString;
73
+ enc: z.ZodString;
74
+ label: z.ZodString;
75
+ kind: z.ZodEnum<{
76
+ "jelly-host": "jelly-host";
77
+ laptop: "laptop";
78
+ server: "server";
79
+ other: "other";
80
+ }>;
81
+ nonce: z.ZodString;
82
+ ts: z.ZodNumber;
83
+ sig: z.ZodString;
84
+ }, z.core.$strict>;
85
+ }, z.core.$strict>, z.ZodObject<{
86
+ kind: z.ZodLiteral<"service">;
87
+ }, z.core.$strict>, z.ZodObject<{
88
+ kind: z.ZodLiteral<"self">;
89
+ }, z.core.$strict>], "kind">;
90
+ export type Authority = z.infer<typeof Authority>;
91
+ /**
92
+ * One entry of a hosted person's device log (§15.3), hash-chained by `prev` and signed by `by` over
93
+ * JCS(entry without sig) with `DOMAIN.deviceLog`. `bind` names the device's `label` and `kind`; `attest` may
94
+ * change them; `unbind` gives a `reason` and nothing else.
95
+ */
96
+ export declare const LogEntry: z.ZodObject<{
97
+ v: z.ZodLiteral<"messaging/1">;
98
+ realm: z.ZodString;
99
+ person: z.ZodString;
100
+ seq: z.ZodNumber;
101
+ prev: z.ZodNullable<z.ZodString>;
102
+ ts: z.ZodNumber;
103
+ op: z.ZodEnum<{
104
+ bind: "bind";
105
+ attest: "attest";
106
+ unbind: "unbind";
107
+ }>;
108
+ device: z.ZodString;
109
+ label: z.ZodOptional<z.ZodString>;
110
+ kind: z.ZodOptional<z.ZodEnum<{
111
+ "jelly-host": "jelly-host";
112
+ laptop: "laptop";
113
+ server: "server";
114
+ other: "other";
115
+ }>>;
116
+ reason: z.ZodOptional<z.ZodEnum<{
117
+ self: "self";
118
+ removed: "removed";
119
+ lost: "lost";
120
+ replaced: "replaced";
121
+ account_deleted: "account_deleted";
122
+ }>>;
123
+ authority: z.ZodDiscriminatedUnion<[z.ZodObject<{
124
+ kind: z.ZodLiteral<"jelly">;
125
+ token: z.ZodString;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ kind: z.ZodLiteral<"device">;
128
+ approver: z.ZodString;
129
+ link: z.ZodObject<{
130
+ v: z.ZodLiteral<"messaging/1">;
131
+ realm: z.ZodString;
132
+ device: z.ZodString;
133
+ enc: z.ZodString;
134
+ label: z.ZodString;
135
+ kind: z.ZodEnum<{
136
+ "jelly-host": "jelly-host";
137
+ laptop: "laptop";
138
+ server: "server";
139
+ other: "other";
140
+ }>;
141
+ nonce: z.ZodString;
142
+ ts: z.ZodNumber;
143
+ sig: z.ZodString;
144
+ }, z.core.$strict>;
145
+ }, z.core.$strict>, z.ZodObject<{
146
+ kind: z.ZodLiteral<"service">;
147
+ }, z.core.$strict>, z.ZodObject<{
148
+ kind: z.ZodLiteral<"self">;
149
+ }, z.core.$strict>], "kind">;
150
+ by: z.ZodString;
151
+ sig: z.ZodString;
152
+ }, z.core.$strict>;
153
+ export type LogEntry = z.infer<typeof LogEntry>;
154
+ /**
155
+ * A device's self-signed encryption key (§15.4): the directory keeps the latest per device (`seq` strictly
156
+ * increases). `sig` is the device's, over JCS(statement without sig) with `DOMAIN.deviceKeys`.
157
+ */
158
+ export declare const KeysStatement: z.ZodObject<{
159
+ v: z.ZodLiteral<"messaging/1">;
160
+ realm: z.ZodString;
161
+ person: z.ZodString;
162
+ device: z.ZodString;
163
+ enc: z.ZodString;
164
+ seq: z.ZodNumber;
165
+ ts: z.ZodNumber;
166
+ sig: z.ZodString;
167
+ }, z.core.$strict>;
168
+ export type KeysStatement = z.infer<typeof KeysStatement>;
169
+ /**
170
+ * One leaf of the epoch log (§15.6): the map root of epoch `epoch` and of the epoch before it (`E[256]`, the
171
+ * empty map's root, before epoch 0). The leaf's data is UTF-8(JCS(leaf)).
172
+ */
173
+ export declare const EpochLeaf: z.ZodObject<{
174
+ epoch: z.ZodNumber;
175
+ ts: z.ZodNumber;
176
+ mapRoot: z.ZodString;
177
+ prevMapRoot: z.ZodString;
178
+ }, z.core.$strict>;
179
+ export type EpochLeaf = z.infer<typeof EpochLeaf>;
180
+ /** An epoch-log leaf and its RFC 9162 audit path in the tree of the STH it is sent with (§15.6). */
181
+ export declare const EpochProof: z.ZodObject<{
182
+ index: z.ZodNumber;
183
+ leaf: z.ZodObject<{
184
+ epoch: z.ZodNumber;
185
+ ts: z.ZodNumber;
186
+ mapRoot: z.ZodString;
187
+ prevMapRoot: z.ZodString;
188
+ }, z.core.$strict>;
189
+ inclusion: z.ZodArray<z.ZodString>;
190
+ }, z.core.$strict>;
191
+ export type EpochProof = z.infer<typeof EpochProof>;
192
+ /**
193
+ * A signed tree head of the epoch log (§15.6): `size` leaves with root `root`, at `ts`. `sig` is the directory's
194
+ * epoch key's, over JCS(head without sig) with `DOMAIN.epoch`.
195
+ */
196
+ export declare const STH: z.ZodObject<{
197
+ v: z.ZodLiteral<"messaging/1">;
198
+ realm: z.ZodString;
199
+ size: z.ZodNumber;
200
+ root: z.ZodString;
201
+ ts: z.ZodNumber;
202
+ sig: z.ZodString;
203
+ }, z.core.$strict>;
204
+ export type STH = z.infer<typeof STH>;
205
+ /**
206
+ * The directory's epoch key moving from `old` to `new` (§15.6): STHs of `fromSize` leaves and more are signed by
207
+ * `new`. Each key signs JCS(rotation without its two signatures) with `DOMAIN.dirKey`.
208
+ */
209
+ export declare const KeyRotation: z.ZodObject<{
210
+ v: z.ZodLiteral<"messaging/1">;
211
+ realm: z.ZodString;
212
+ old: z.ZodString;
213
+ new: z.ZodString;
214
+ fromSize: z.ZodNumber;
215
+ sigOld: z.ZodString;
216
+ sigNew: z.ZodString;
217
+ }, z.core.$strict>;
218
+ export type KeyRotation = z.infer<typeof KeyRotation>;
219
+ /**
220
+ * Evidence that log entry `seq` was in the directory by an epoch (§15.7): that epoch's leaf in the view's STH,
221
+ * and the person's map value there, which commits to a log head at or after `seq`.
222
+ */
223
+ export declare const EntryEpoch: z.ZodObject<{
224
+ seq: z.ZodNumber;
225
+ epoch: z.ZodObject<{
226
+ index: z.ZodNumber;
227
+ leaf: z.ZodObject<{
228
+ epoch: z.ZodNumber;
229
+ ts: z.ZodNumber;
230
+ mapRoot: z.ZodString;
231
+ prevMapRoot: z.ZodString;
232
+ }, z.core.$strict>;
233
+ inclusion: z.ZodArray<z.ZodString>;
234
+ }, z.core.$strict>;
235
+ value: z.ZodObject<{
236
+ log: z.ZodObject<{
237
+ seq: z.ZodNumber;
238
+ hash: z.ZodString;
239
+ }, z.core.$strict>;
240
+ keys: z.ZodArray<z.ZodString>;
241
+ }, z.core.$strict>;
242
+ mapProof: z.ZodObject<{
243
+ bitmap: z.ZodString;
244
+ siblings: z.ZodArray<z.ZodString>;
245
+ }, z.core.$strict>;
246
+ }, z.core.$strict>;
247
+ export type EntryEpoch = z.infer<typeof EntryEpoch>;
248
+ /**
249
+ * One person's head as the directory serves it at an STH (§7, "Directory frames"; §15.7): the map proof of their value
250
+ * at the STH's last epoch, and that value's preimage (`value`: their log head and the hashes of their current devices'
251
+ * keys statements), or none for a person the map does not hold, or `tombstone: true` for an erased one. It holds no
252
+ * log entry, so no Jelly token and nothing of a profile: what a device about to bind needs, and what anyone may read.
253
+ */
254
+ export declare const PersonHead: z.ZodObject<{
255
+ person: z.ZodString;
256
+ mapProof: z.ZodObject<{
257
+ bitmap: z.ZodString;
258
+ siblings: z.ZodArray<z.ZodString>;
259
+ }, z.core.$strict>;
260
+ value: z.ZodOptional<z.ZodObject<{
261
+ log: z.ZodObject<{
262
+ seq: z.ZodNumber;
263
+ hash: z.ZodString;
264
+ }, z.core.$strict>;
265
+ keys: z.ZodArray<z.ZodString>;
266
+ }, z.core.$strict>>;
267
+ tombstone: z.ZodOptional<z.ZodLiteral<true>>;
268
+ }, z.core.$strict>;
269
+ export type PersonHead = z.infer<typeof PersonHead>;
270
+ /**
271
+ * One person as the directory serves them at an STH (§15.7): their log after the asker's `knownSeq` (all of it
272
+ * without one), the keys statements of their current devices, the map proof of their value at the STH's last
273
+ * epoch, and for every entry of `log` with a `jelly` authority, an `EntryEpoch` (its first epoch, from the
274
+ * directory's records). An erased person is `tombstone: true` with an empty log and no keys.
275
+ */
276
+ export declare const PersonView: z.ZodObject<{
277
+ person: z.ZodString;
278
+ log: z.ZodArray<z.ZodObject<{
279
+ v: z.ZodLiteral<"messaging/1">;
280
+ realm: z.ZodString;
281
+ person: z.ZodString;
282
+ seq: z.ZodNumber;
283
+ prev: z.ZodNullable<z.ZodString>;
284
+ ts: z.ZodNumber;
285
+ op: z.ZodEnum<{
286
+ bind: "bind";
287
+ attest: "attest";
288
+ unbind: "unbind";
289
+ }>;
290
+ device: z.ZodString;
291
+ label: z.ZodOptional<z.ZodString>;
292
+ kind: z.ZodOptional<z.ZodEnum<{
293
+ "jelly-host": "jelly-host";
294
+ laptop: "laptop";
295
+ server: "server";
296
+ other: "other";
297
+ }>>;
298
+ reason: z.ZodOptional<z.ZodEnum<{
299
+ self: "self";
300
+ removed: "removed";
301
+ lost: "lost";
302
+ replaced: "replaced";
303
+ account_deleted: "account_deleted";
304
+ }>>;
305
+ authority: z.ZodDiscriminatedUnion<[z.ZodObject<{
306
+ kind: z.ZodLiteral<"jelly">;
307
+ token: z.ZodString;
308
+ }, z.core.$strict>, z.ZodObject<{
309
+ kind: z.ZodLiteral<"device">;
310
+ approver: z.ZodString;
311
+ link: z.ZodObject<{
312
+ v: z.ZodLiteral<"messaging/1">;
313
+ realm: z.ZodString;
314
+ device: z.ZodString;
315
+ enc: z.ZodString;
316
+ label: z.ZodString;
317
+ kind: z.ZodEnum<{
318
+ "jelly-host": "jelly-host";
319
+ laptop: "laptop";
320
+ server: "server";
321
+ other: "other";
322
+ }>;
323
+ nonce: z.ZodString;
324
+ ts: z.ZodNumber;
325
+ sig: z.ZodString;
326
+ }, z.core.$strict>;
327
+ }, z.core.$strict>, z.ZodObject<{
328
+ kind: z.ZodLiteral<"service">;
329
+ }, z.core.$strict>, z.ZodObject<{
330
+ kind: z.ZodLiteral<"self">;
331
+ }, z.core.$strict>], "kind">;
332
+ by: z.ZodString;
333
+ sig: z.ZodString;
334
+ }, z.core.$strict>>;
335
+ keys: z.ZodArray<z.ZodObject<{
336
+ v: z.ZodLiteral<"messaging/1">;
337
+ realm: z.ZodString;
338
+ person: z.ZodString;
339
+ device: z.ZodString;
340
+ enc: z.ZodString;
341
+ seq: z.ZodNumber;
342
+ ts: z.ZodNumber;
343
+ sig: z.ZodString;
344
+ }, z.core.$strict>>;
345
+ mapProof: z.ZodObject<{
346
+ bitmap: z.ZodString;
347
+ siblings: z.ZodArray<z.ZodString>;
348
+ }, z.core.$strict>;
349
+ epochs: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
+ seq: z.ZodNumber;
351
+ epoch: z.ZodObject<{
352
+ index: z.ZodNumber;
353
+ leaf: z.ZodObject<{
354
+ epoch: z.ZodNumber;
355
+ ts: z.ZodNumber;
356
+ mapRoot: z.ZodString;
357
+ prevMapRoot: z.ZodString;
358
+ }, z.core.$strict>;
359
+ inclusion: z.ZodArray<z.ZodString>;
360
+ }, z.core.$strict>;
361
+ value: z.ZodObject<{
362
+ log: z.ZodObject<{
363
+ seq: z.ZodNumber;
364
+ hash: z.ZodString;
365
+ }, z.core.$strict>;
366
+ keys: z.ZodArray<z.ZodString>;
367
+ }, z.core.$strict>;
368
+ mapProof: z.ZodObject<{
369
+ bitmap: z.ZodString;
370
+ siblings: z.ZodArray<z.ZodString>;
371
+ }, z.core.$strict>;
372
+ }, z.core.$strict>>>;
373
+ tombstone: z.ZodOptional<z.ZodLiteral<true>>;
374
+ }, z.core.$strict>;
375
+ export type PersonView = z.infer<typeof PersonView>;