@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,680 @@
1
+ /**
2
+ * The local API's surface methods (spec §8.2; design §7.5): what agents reach through their tools
3
+ * and what people reach through the CLI and the TUI, by conversation.
4
+ *
5
+ * - Agent tier (`run/agent.sock`): `contacts.list`, `msg.send`, `item.read`, `conv.read`, `search`.
6
+ * - Human tier (`run/admin.sock`): `conv.list`, `conv.read`, `conv.markRead`, `conv.subscribe`,
7
+ * `person.send`, `people.search`, `people.get`.
8
+ *
9
+ * A conversation is named by a `ConversationRef`: `dm:<person>` (this person's DM with another),
10
+ * `channel:<name>` (a channel this person is in, by its local name) or `agent:<person>/<agent>`
11
+ * (a local session's mail and tasks with that agent, on any of the person's devices).
12
+ */
13
+ import { z } from "zod";
14
+ /** A conversation: `dm:<person>`, `channel:<name>` or `agent:<person>/<agent>`. */
15
+ export declare const ConversationRef: z.ZodString;
16
+ export type ConversationRef = z.infer<typeof ConversationRef>;
17
+ /** A place in a conversation: a line's `seq` in a DM or a channel, an entry's `{at, id}` with an agent. */
18
+ export declare const ConvPlace: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
19
+ at: z.ZodNumber;
20
+ id: z.ZodString;
21
+ }, z.core.$strict>]>;
22
+ export type ConvPlace = z.infer<typeof ConvPlace>;
23
+ /** One conversation this person has (DMs with lines, channels it is in) and this device's read state. */
24
+ export declare const ConvSummary: z.ZodObject<{
25
+ conversation: z.ZodString;
26
+ kind: z.ZodEnum<{
27
+ channel: "channel";
28
+ dm: "dm";
29
+ }>;
30
+ lastAt: z.ZodOptional<z.ZodNumber>;
31
+ name: z.ZodOptional<z.ZodString>;
32
+ lastSeq: z.ZodOptional<z.ZodNumber>;
33
+ readUpTo: z.ZodNumber;
34
+ unread: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ export type ConvSummary = z.infer<typeof ConvSummary>;
37
+ /** A person of the realm, as verified (a roster realm: a team person). */
38
+ export declare const PersonSummary: z.ZodObject<{
39
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
40
+ name: z.ZodString;
41
+ handle: z.ZodString;
42
+ org: z.ZodEnum<{
43
+ other: "other";
44
+ none: "none";
45
+ same: "same";
46
+ }>;
47
+ vouched: z.ZodEnum<{
48
+ admin: "admin";
49
+ device: "device";
50
+ jelly: "jelly";
51
+ service: "service";
52
+ }>;
53
+ }, z.core.$strip>;
54
+ export type PersonSummary = z.infer<typeof PersonSummary>;
55
+ export declare const SURFACE_METHODS: {
56
+ /**
57
+ * Agent tier. Who this session can reach: every known agent session (`entries`, as `directory.list`
58
+ * did in 0.1), and this person's conversations with their read state (`conversations`, as
59
+ * `conv.list` returns them).
60
+ */
61
+ readonly "contacts.list": {
62
+ readonly params: z.ZodObject<{
63
+ person: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
64
+ includeOffline: z.ZodOptional<z.ZodBoolean>;
65
+ }, z.core.$strict>;
66
+ /**
67
+ * `reach`: for each other person among `entries` and the DMs, and each person whose card this device holds, what they may
68
+ * be sent, from their card or the defaults of the relation (spec §6.9, "Contact cards").
69
+ */
70
+ readonly result: z.ZodObject<{
71
+ entries: z.ZodArray<z.ZodObject<{
72
+ address: z.ZodString;
73
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
74
+ agent: z.ZodString;
75
+ device: z.ZodString;
76
+ label: z.ZodString;
77
+ client: z.ZodString;
78
+ repo: z.ZodOptional<z.ZodString>;
79
+ branch: z.ZodOptional<z.ZodString>;
80
+ state: z.ZodEnum<{
81
+ idle: "idle";
82
+ busy: "busy";
83
+ }>;
84
+ doing: z.ZodOptional<z.ZodString>;
85
+ tier: z.ZodEnum<{
86
+ push: "push";
87
+ pull: "pull";
88
+ }>;
89
+ online: z.ZodBoolean;
90
+ lastSeen: z.ZodNumber;
91
+ self: z.ZodBoolean;
92
+ expect: z.ZodOptional<z.ZodEnum<{
93
+ kept: "kept";
94
+ next_turn: "next_turn";
95
+ wake: "wake";
96
+ next_prompt: "next_prompt";
97
+ on_read: "on_read";
98
+ offline: "offline";
99
+ }>>;
100
+ }, z.core.$strip>>;
101
+ conversations: z.ZodArray<z.ZodObject<{
102
+ conversation: z.ZodString;
103
+ kind: z.ZodEnum<{
104
+ channel: "channel";
105
+ dm: "dm";
106
+ }>;
107
+ lastAt: z.ZodOptional<z.ZodNumber>;
108
+ name: z.ZodOptional<z.ZodString>;
109
+ lastSeq: z.ZodOptional<z.ZodNumber>;
110
+ readUpTo: z.ZodNumber;
111
+ unread: z.ZodNumber;
112
+ }, z.core.$strip>>;
113
+ reach: z.ZodArray<z.ZodObject<{
114
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
115
+ can: z.ZodObject<{
116
+ chat: z.ZodBoolean;
117
+ agentMail: z.ZodBoolean;
118
+ ask: z.ZodEnum<{
119
+ open: "open";
120
+ request: "request";
121
+ no: "no";
122
+ }>;
123
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
124
+ }, z.core.$strict>;
125
+ source: z.ZodEnum<{
126
+ default: "default";
127
+ card: "card";
128
+ }>;
129
+ at: z.ZodOptional<z.ZodNumber>;
130
+ devicesChangedAt: z.ZodOptional<z.ZodNumber>;
131
+ }, z.core.$strip>>;
132
+ }, z.core.$strip>;
133
+ };
134
+ /**
135
+ * Agent tier. One send from the session `key` (spec §8.2): mail or a task to an agent
136
+ * (`person/agent[@label]`), a line to a person (`<person>`), or a post to a channel (`#<channel>`).
137
+ * A line or a post is attributed to the session; it takes one text part of at most
138
+ * `LIMITS.chatChars`, `kind: "message"`, and `replyTo` as the thread (the thread's first line),
139
+ * and none of the A2A fields. `idempotencyKey` makes any send idempotent.
140
+ */
141
+ readonly "msg.send": {
142
+ readonly params: z.ZodObject<{
143
+ key: z.ZodString;
144
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
145
+ kind: z.ZodEnum<{
146
+ message: "message";
147
+ task: "task";
148
+ }>;
149
+ parts: z.ZodArray<z.ZodObject<{
150
+ text: z.ZodOptional<z.ZodString>;
151
+ raw: z.ZodOptional<z.ZodString>;
152
+ url: z.ZodOptional<z.ZodString>;
153
+ data: z.ZodOptional<z.ZodUnknown>;
154
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
155
+ filename: z.ZodOptional<z.ZodString>;
156
+ mediaType: z.ZodOptional<z.ZodString>;
157
+ }, z.core.$strip>>;
158
+ contextId: z.ZodOptional<z.ZodString>;
159
+ taskId: z.ZodOptional<z.ZodString>;
160
+ replyTo: z.ZodOptional<z.ZodString>;
161
+ idempotencyKey: z.ZodOptional<z.ZodString>;
162
+ messageId: z.ZodOptional<z.ZodString>;
163
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
164
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
+ wake: z.ZodOptional<z.ZodBoolean>;
167
+ request: z.ZodOptional<z.ZodObject<{
168
+ contact: z.ZodString;
169
+ }, z.core.$strict>>;
170
+ onBehalfOf: z.ZodOptional<z.ZodObject<{
171
+ taskId: z.ZodString;
172
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
173
+ maxDepth: z.ZodOptional<z.ZodNumber>;
174
+ }, z.core.$strict>>;
175
+ }, z.core.$strict>;
176
+ readonly result: z.ZodObject<{
177
+ results: z.ZodArray<z.ZodObject<{
178
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
179
+ envelopeId: z.ZodString;
180
+ messageId: z.ZodString;
181
+ taskId: z.ZodOptional<z.ZodString>;
182
+ contextId: z.ZodString;
183
+ stage: z.ZodEnum<{
184
+ accepted: "accepted";
185
+ relayed: "relayed";
186
+ delivered: "delivered";
187
+ held: "held";
188
+ handed_to_agent: "handed_to_agent";
189
+ read: "read";
190
+ replied: "replied";
191
+ rejected: "rejected";
192
+ expired: "expired";
193
+ }>;
194
+ code: z.ZodOptional<z.ZodEnum<{
195
+ expired: "expired";
196
+ invalid_request: "invalid_request";
197
+ not_member: "not_member";
198
+ bad_signature: "bad_signature";
199
+ unknown_session: "unknown_session";
200
+ ambiguous_address: "ambiguous_address";
201
+ no_recipients: "no_recipients";
202
+ unknown_address: "unknown_address";
203
+ refused: "refused";
204
+ declined: "declined";
205
+ request_required: "request_required";
206
+ rate_limited: "rate_limited";
207
+ loop_guard: "loop_guard";
208
+ too_large: "too_large";
209
+ secret_refused: "secret_refused";
210
+ duplicate: "duplicate";
211
+ relay_unavailable: "relay_unavailable";
212
+ not_found: "not_found";
213
+ invalid_state: "invalid_state";
214
+ forbidden: "forbidden";
215
+ guarded_turn: "guarded_turn";
216
+ roster_conflict: "roster_conflict";
217
+ invite_invalid: "invite_invalid";
218
+ no_identity: "no_identity";
219
+ binding_invalid: "binding_invalid";
220
+ jelly_unavailable: "jelly_unavailable";
221
+ log_conflict: "log_conflict";
222
+ conv_conflict: "conv_conflict";
223
+ stale_epoch: "stale_epoch";
224
+ device_limit: "device_limit";
225
+ admission_required: "admission_required";
226
+ admission_invalid: "admission_invalid";
227
+ directory_inconsistent: "directory_inconsistent";
228
+ unknown_device: "unknown_device";
229
+ directory_unavailable: "directory_unavailable";
230
+ login_unsupported: "login_unsupported";
231
+ login_denied: "login_denied";
232
+ grant_required: "grant_required";
233
+ grant_invalid: "grant_invalid";
234
+ ticket_required: "ticket_required";
235
+ ticket_invalid: "ticket_invalid";
236
+ daemon_unavailable: "daemon_unavailable";
237
+ daemon_mismatch: "daemon_mismatch";
238
+ store_refused: "store_refused";
239
+ internal: "internal";
240
+ }>>;
241
+ expect: z.ZodOptional<z.ZodEnum<{
242
+ kept: "kept";
243
+ next_turn: "next_turn";
244
+ wake: "wake";
245
+ next_prompt: "next_prompt";
246
+ on_read: "on_read";
247
+ offline: "offline";
248
+ }>>;
249
+ }, z.core.$strip>>;
250
+ }, z.core.$strip>;
251
+ };
252
+ /**
253
+ * Agent tier. One item of the session `key` by id: something it received (`received`: returns the
254
+ * full message, marks it read and sends a read receipt, as `inbox.read` did in 0.1), or something
255
+ * it sent to an agent (`sent`: how far it got, as `message.status` did). `not_found` otherwise.
256
+ */
257
+ readonly "item.read": {
258
+ readonly params: z.ZodObject<{
259
+ key: z.ZodString;
260
+ id: z.ZodString;
261
+ }, z.core.$strict>;
262
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
263
+ kind: z.ZodLiteral<"received">;
264
+ item: z.ZodObject<{
265
+ id: z.ZodString;
266
+ key: z.ZodString;
267
+ from: z.ZodObject<{
268
+ address: z.ZodString;
269
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
270
+ agent: z.ZodOptional<z.ZodString>;
271
+ device: z.ZodString;
272
+ label: z.ZodString;
273
+ }, z.core.$strip>;
274
+ kind: z.ZodEnum<{
275
+ message: "message";
276
+ task: "task";
277
+ }>;
278
+ messageId: z.ZodString;
279
+ taskId: z.ZodOptional<z.ZodString>;
280
+ contextId: z.ZodOptional<z.ZodString>;
281
+ replyTo: z.ZodOptional<z.ZodString>;
282
+ receivedAt: z.ZodNumber;
283
+ stage: z.ZodEnum<{
284
+ delivered: "delivered";
285
+ handed_to_agent: "handed_to_agent";
286
+ read: "read";
287
+ }>;
288
+ bytes: z.ZodNumber;
289
+ preview: z.ZodString;
290
+ wake: z.ZodBoolean;
291
+ chain: z.ZodOptional<z.ZodObject<{
292
+ addresses: z.ZodArray<z.ZodString>;
293
+ depth: z.ZodNumber;
294
+ maxDepth: z.ZodNumber;
295
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
296
+ exp: z.ZodNumber;
297
+ }, z.core.$strip>>;
298
+ consent: z.ZodOptional<z.ZodEnum<{
299
+ self: "self";
300
+ guarded: "guarded";
301
+ trusted: "trusted";
302
+ }>>;
303
+ }, z.core.$strip>;
304
+ message: z.ZodObject<{
305
+ messageId: z.ZodString;
306
+ contextId: z.ZodOptional<z.ZodString>;
307
+ taskId: z.ZodOptional<z.ZodString>;
308
+ role: z.ZodEnum<{
309
+ ROLE_USER: "ROLE_USER";
310
+ ROLE_AGENT: "ROLE_AGENT";
311
+ }>;
312
+ parts: z.ZodArray<z.ZodObject<{
313
+ text: z.ZodOptional<z.ZodString>;
314
+ raw: z.ZodOptional<z.ZodString>;
315
+ url: z.ZodOptional<z.ZodString>;
316
+ data: z.ZodOptional<z.ZodUnknown>;
317
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
318
+ filename: z.ZodOptional<z.ZodString>;
319
+ mediaType: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strip>>;
321
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
323
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
324
+ }, z.core.$strip>;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ kind: z.ZodLiteral<"sent">;
327
+ envelopeId: z.ZodString;
328
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
329
+ stage: z.ZodEnum<{
330
+ accepted: "accepted";
331
+ relayed: "relayed";
332
+ delivered: "delivered";
333
+ held: "held";
334
+ handed_to_agent: "handed_to_agent";
335
+ read: "read";
336
+ replied: "replied";
337
+ rejected: "rejected";
338
+ expired: "expired";
339
+ }>;
340
+ history: z.ZodArray<z.ZodObject<{
341
+ stage: z.ZodEnum<{
342
+ accepted: "accepted";
343
+ relayed: "relayed";
344
+ delivered: "delivered";
345
+ held: "held";
346
+ handed_to_agent: "handed_to_agent";
347
+ read: "read";
348
+ replied: "replied";
349
+ rejected: "rejected";
350
+ expired: "expired";
351
+ }>;
352
+ at: z.ZodNumber;
353
+ code: z.ZodOptional<z.ZodEnum<{
354
+ expired: "expired";
355
+ invalid_request: "invalid_request";
356
+ not_member: "not_member";
357
+ bad_signature: "bad_signature";
358
+ unknown_session: "unknown_session";
359
+ ambiguous_address: "ambiguous_address";
360
+ no_recipients: "no_recipients";
361
+ unknown_address: "unknown_address";
362
+ refused: "refused";
363
+ declined: "declined";
364
+ request_required: "request_required";
365
+ rate_limited: "rate_limited";
366
+ loop_guard: "loop_guard";
367
+ too_large: "too_large";
368
+ secret_refused: "secret_refused";
369
+ duplicate: "duplicate";
370
+ relay_unavailable: "relay_unavailable";
371
+ not_found: "not_found";
372
+ invalid_state: "invalid_state";
373
+ forbidden: "forbidden";
374
+ guarded_turn: "guarded_turn";
375
+ roster_conflict: "roster_conflict";
376
+ invite_invalid: "invite_invalid";
377
+ no_identity: "no_identity";
378
+ binding_invalid: "binding_invalid";
379
+ jelly_unavailable: "jelly_unavailable";
380
+ log_conflict: "log_conflict";
381
+ conv_conflict: "conv_conflict";
382
+ stale_epoch: "stale_epoch";
383
+ device_limit: "device_limit";
384
+ admission_required: "admission_required";
385
+ admission_invalid: "admission_invalid";
386
+ directory_inconsistent: "directory_inconsistent";
387
+ unknown_device: "unknown_device";
388
+ directory_unavailable: "directory_unavailable";
389
+ login_unsupported: "login_unsupported";
390
+ login_denied: "login_denied";
391
+ grant_required: "grant_required";
392
+ grant_invalid: "grant_invalid";
393
+ ticket_required: "ticket_required";
394
+ ticket_invalid: "ticket_invalid";
395
+ daemon_unavailable: "daemon_unavailable";
396
+ daemon_mismatch: "daemon_mismatch";
397
+ store_refused: "store_refused";
398
+ internal: "internal";
399
+ }>>;
400
+ note: z.ZodOptional<z.ZodString>;
401
+ }, z.core.$strip>>;
402
+ }, z.core.$strip>], "kind">;
403
+ };
404
+ /**
405
+ * Agent and human tiers. A page of one conversation, oldest first. With no cursor, the latest
406
+ * `limit` (default 30 with an agent, 50 in a DM or a channel); with `before`, the latest `limit`
407
+ * before that place; with `after`, the earliest `limit` after it. `more`: entries remain past the
408
+ * page in the direction read. Changes no stage and sends no receipt.
409
+ * - `dm:` and `channel:` give `lines`; `thread` narrows to a thread's first line and its replies;
410
+ * the cursor is a line's `seq`.
411
+ * - `agent:<person>/<agent>` needs the session `key` and gives `entries`: mail either way and tasks
412
+ * either way between that session and the agent; the cursor is an entry's `{at, id}`.
413
+ */
414
+ readonly "conv.read": {
415
+ readonly params: z.ZodObject<{
416
+ key: z.ZodOptional<z.ZodString>;
417
+ conversation: z.ZodString;
418
+ thread: z.ZodOptional<z.ZodString>;
419
+ before: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
420
+ at: z.ZodNumber;
421
+ id: z.ZodString;
422
+ }, z.core.$strict>]>>;
423
+ after: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
424
+ at: z.ZodNumber;
425
+ id: z.ZodString;
426
+ }, z.core.$strict>]>>;
427
+ limit: z.ZodOptional<z.ZodNumber>;
428
+ }, z.core.$strict>;
429
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
430
+ kind: z.ZodLiteral<"lines">;
431
+ lines: z.ZodArray<z.ZodObject<{
432
+ id: z.ZodString;
433
+ seq: z.ZodNumber;
434
+ at: z.ZodNumber;
435
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
436
+ agent: z.ZodOptional<z.ZodString>;
437
+ direction: z.ZodEnum<{
438
+ out: "out";
439
+ in: "in";
440
+ }>;
441
+ body: z.ZodString;
442
+ thread: z.ZodOptional<z.ZodString>;
443
+ state: z.ZodOptional<z.ZodEnum<{
444
+ delivered: "delivered";
445
+ held: "held";
446
+ refused: "refused";
447
+ sent: "sent";
448
+ }>>;
449
+ refused: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
450
+ notice: z.ZodOptional<z.ZodLiteral<true>>;
451
+ }, z.core.$strip>>;
452
+ more: z.ZodBoolean;
453
+ }, z.core.$strip>, z.ZodObject<{
454
+ kind: z.ZodLiteral<"agent">;
455
+ entries: z.ZodArray<z.ZodObject<{
456
+ id: z.ZodString;
457
+ kind: z.ZodEnum<{
458
+ task: "task";
459
+ mail: "mail";
460
+ }>;
461
+ direction: z.ZodEnum<{
462
+ out: "out";
463
+ in: "in";
464
+ }>;
465
+ peer: z.ZodString;
466
+ at: z.ZodNumber;
467
+ text: z.ZodOptional<z.ZodString>;
468
+ taskId: z.ZodOptional<z.ZodString>;
469
+ stage: z.ZodOptional<z.ZodEnum<{
470
+ accepted: "accepted";
471
+ relayed: "relayed";
472
+ delivered: "delivered";
473
+ held: "held";
474
+ handed_to_agent: "handed_to_agent";
475
+ read: "read";
476
+ replied: "replied";
477
+ rejected: "rejected";
478
+ expired: "expired";
479
+ }>>;
480
+ role: z.ZodOptional<z.ZodEnum<{
481
+ requester: "requester";
482
+ executor: "executor";
483
+ }>>;
484
+ state: z.ZodOptional<z.ZodEnum<{
485
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
486
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
487
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
488
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
489
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
490
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
491
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
492
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
493
+ }>>;
494
+ }, z.core.$strip>>;
495
+ more: z.ZodBoolean;
496
+ }, z.core.$strip>], "kind">;
497
+ };
498
+ /** Agent tier. Full-text search over the DM and channel lines `conv.read` can read, newest first. */
499
+ readonly search: {
500
+ readonly params: z.ZodObject<{
501
+ query: z.ZodString;
502
+ conversation: z.ZodOptional<z.ZodString>;
503
+ limit: z.ZodOptional<z.ZodNumber>;
504
+ }, z.core.$strict>;
505
+ readonly result: z.ZodObject<{
506
+ hits: z.ZodArray<z.ZodObject<{
507
+ id: z.ZodString;
508
+ seq: z.ZodNumber;
509
+ at: z.ZodNumber;
510
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
511
+ agent: z.ZodOptional<z.ZodString>;
512
+ direction: z.ZodEnum<{
513
+ out: "out";
514
+ in: "in";
515
+ }>;
516
+ body: z.ZodString;
517
+ thread: z.ZodOptional<z.ZodString>;
518
+ state: z.ZodOptional<z.ZodEnum<{
519
+ delivered: "delivered";
520
+ held: "held";
521
+ refused: "refused";
522
+ sent: "sent";
523
+ }>>;
524
+ refused: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
525
+ notice: z.ZodOptional<z.ZodLiteral<true>>;
526
+ conversation: z.ZodString;
527
+ }, z.core.$strip>>;
528
+ }, z.core.$strip>;
529
+ };
530
+ /**
531
+ * Human tier. The channels this person is in and the DMs with lines, newest first, at most `limit`
532
+ * (default 100), each with this device's read state.
533
+ */
534
+ readonly "conv.list": {
535
+ readonly params: z.ZodObject<{
536
+ limit: z.ZodOptional<z.ZodNumber>;
537
+ }, z.core.$strict>;
538
+ readonly result: z.ZodObject<{
539
+ conversations: z.ZodArray<z.ZodObject<{
540
+ conversation: z.ZodString;
541
+ kind: z.ZodEnum<{
542
+ channel: "channel";
543
+ dm: "dm";
544
+ }>;
545
+ lastAt: z.ZodOptional<z.ZodNumber>;
546
+ name: z.ZodOptional<z.ZodString>;
547
+ lastSeq: z.ZodOptional<z.ZodNumber>;
548
+ readUpTo: z.ZodNumber;
549
+ unread: z.ZodNumber;
550
+ }, z.core.$strip>>;
551
+ }, z.core.$strip>;
552
+ };
553
+ /**
554
+ * Human tier. Marks a DM or a channel read on this device up to `upTo` (a line's `seq`): the cursor
555
+ * only moves forward, and never past the newest seq here. Returns the cursor and what is still unread.
556
+ */
557
+ readonly "conv.markRead": {
558
+ readonly params: z.ZodObject<{
559
+ conversation: z.ZodString;
560
+ upTo: z.ZodNumber;
561
+ }, z.core.$strict>;
562
+ readonly result: z.ZodObject<{
563
+ readUpTo: z.ZodNumber;
564
+ unread: z.ZodNumber;
565
+ }, z.core.$strip>;
566
+ };
567
+ /**
568
+ * Human tier. `conv` events go only to connections that call this (spec §6.8). With `since` (the
569
+ * `seq` of the last event the client handled), the daemon first replays one event per line changed
570
+ * after it, oldest first, or sends none and answers `gap: true` when it cannot replay them all; the
571
+ * client then reloads with `conv.list` and `conv.read`. `seq` is the newest seq at the call.
572
+ */
573
+ readonly "conv.subscribe": {
574
+ readonly params: z.ZodObject<{
575
+ since: z.ZodOptional<z.ZodNumber>;
576
+ }, z.core.$strict>;
577
+ readonly result: z.ZodObject<{
578
+ seq: z.ZodNumber;
579
+ gap: z.ZodBoolean;
580
+ }, z.core.$strip>;
581
+ };
582
+ /**
583
+ * Human tier. A line from the person (no agent) to a DM or a channel this person is in. `thread` is
584
+ * the `id` of the thread's first line. `clientId` makes the call idempotent: a repeat with the same
585
+ * `clientId` and the same conversation, thread and text returns the first line's result and sends nothing.
586
+ */
587
+ readonly "person.send": {
588
+ readonly params: z.ZodObject<{
589
+ conversation: z.ZodString;
590
+ text: z.ZodString;
591
+ thread: z.ZodOptional<z.ZodString>;
592
+ clientId: z.ZodOptional<z.ZodString>;
593
+ }, z.core.$strict>;
594
+ readonly result: z.ZodObject<{
595
+ id: z.ZodString;
596
+ conversation: z.ZodString;
597
+ }, z.core.$strip>;
598
+ };
599
+ /** Human tier. The persons of the realm whose handle starts with `query` (all with none), at most `limit` (default 50). */
600
+ readonly "people.search": {
601
+ readonly params: z.ZodObject<{
602
+ query: z.ZodOptional<z.ZodString>;
603
+ limit: z.ZodOptional<z.ZodNumber>;
604
+ }, z.core.$strict>;
605
+ readonly result: z.ZodObject<{
606
+ people: z.ZodArray<z.ZodObject<{
607
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
608
+ name: z.ZodString;
609
+ handle: z.ZodString;
610
+ org: z.ZodEnum<{
611
+ other: "other";
612
+ none: "none";
613
+ same: "same";
614
+ }>;
615
+ vouched: z.ZodEnum<{
616
+ admin: "admin";
617
+ device: "device";
618
+ jelly: "jelly";
619
+ service: "service";
620
+ }>;
621
+ }, z.core.$strip>>;
622
+ }, z.core.$strip>;
623
+ };
624
+ /** Human tier. One person and their current devices, as verified. `not_found` for a person this realm does not know. */
625
+ readonly "people.get": {
626
+ readonly params: z.ZodObject<{
627
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
628
+ }, z.core.$strict>;
629
+ /** A device's `away`: its latest presence, still fresh, says no window of the person is visible on it (spec §6.5). */
630
+ readonly result: z.ZodObject<{
631
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
632
+ name: z.ZodString;
633
+ handle: z.ZodString;
634
+ org: z.ZodEnum<{
635
+ other: "other";
636
+ none: "none";
637
+ same: "same";
638
+ }>;
639
+ vouched: z.ZodEnum<{
640
+ admin: "admin";
641
+ device: "device";
642
+ jelly: "jelly";
643
+ service: "service";
644
+ }>;
645
+ devices: z.ZodArray<z.ZodObject<{
646
+ device: z.ZodString;
647
+ label: z.ZodString;
648
+ self: z.ZodBoolean;
649
+ away: z.ZodOptional<z.ZodLiteral<true>>;
650
+ }, z.core.$strip>>;
651
+ deviceChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
652
+ change: z.ZodEnum<{
653
+ removed: "removed";
654
+ replaced: "replaced";
655
+ added: "added";
656
+ vouched: "vouched";
657
+ }>;
658
+ device: z.ZodString;
659
+ label: z.ZodString;
660
+ kind: z.ZodOptional<z.ZodEnum<{
661
+ "jelly-host": "jelly-host";
662
+ laptop: "laptop";
663
+ server: "server";
664
+ other: "other";
665
+ }>>;
666
+ vouch: z.ZodEnum<{
667
+ admin: "admin";
668
+ device: "device";
669
+ jelly: "jelly";
670
+ }>;
671
+ via: z.ZodOptional<z.ZodEnum<{
672
+ host: "host";
673
+ browser: "browser";
674
+ }>>;
675
+ approver: z.ZodOptional<z.ZodString>;
676
+ at: z.ZodNumber;
677
+ }, z.core.$strip>>>;
678
+ }, z.core.$strip>;
679
+ };
680
+ };