@joe-broadhead/messaging 0.0.0-stage → 0.7.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 (257) hide show
  1. package/CHANGELOG.md +175 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +12 -0
  4. package/README.md +36 -2
  5. package/dist/bin/messaging-mcp.js +25887 -0
  6. package/dist/bin/messaging-relay.js +19014 -0
  7. package/dist/bin/messaging.js +14732 -0
  8. package/dist/bin/messagingd.js +28682 -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 +458 -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/delegation.js +174 -0
  24. package/dist/lib/modules/core/directory/device-log.js +258 -0
  25. package/dist/lib/modules/core/directory/epoch.js +103 -0
  26. package/dist/lib/modules/core/directory/handle.js +29 -0
  27. package/dist/lib/modules/core/directory/jelly-device.js +204 -0
  28. package/dist/lib/modules/core/directory/jelly-issuer.js +12 -0
  29. package/dist/lib/modules/core/directory/jelly-token.js +305 -0
  30. package/dist/lib/modules/core/directory/keys-statement.js +43 -0
  31. package/dist/lib/modules/core/directory/link.js +81 -0
  32. package/dist/lib/modules/core/directory/merkle-log.js +250 -0
  33. package/dist/lib/modules/core/directory/person-view.js +197 -0
  34. package/dist/lib/modules/core/directory/person.js +40 -0
  35. package/dist/lib/modules/core/directory/realm.js +59 -0
  36. package/dist/lib/modules/core/directory/smt.js +266 -0
  37. package/dist/lib/modules/core/envelope.js +320 -0
  38. package/dist/lib/modules/core/hash.js +5 -0
  39. package/dist/lib/modules/core/head.js +27 -0
  40. package/dist/lib/modules/core/identity.js +71 -0
  41. package/dist/lib/modules/core/index.js +44 -0
  42. package/dist/lib/modules/core/jcs.js +96 -0
  43. package/dist/lib/modules/core/jelly-host-double.js +35 -0
  44. package/dist/lib/modules/core/jelly-host.js +211 -0
  45. package/dist/lib/modules/core/keys.js +79 -0
  46. package/dist/lib/modules/core/peer-text.js +563 -0
  47. package/dist/lib/modules/core/realm.js +1 -0
  48. package/dist/lib/modules/core/roster.js +454 -0
  49. package/dist/lib/modules/core/schema/a2a.js +85 -0
  50. package/dist/lib/modules/core/schema/common.js +254 -0
  51. package/dist/lib/modules/core/schema/consent.js +120 -0
  52. package/dist/lib/modules/core/schema/delegation.js +58 -0
  53. package/dist/lib/modules/core/schema/directory-frames.js +270 -0
  54. package/dist/lib/modules/core/schema/directory.js +169 -0
  55. package/dist/lib/modules/core/schema/envelope.js +211 -0
  56. package/dist/lib/modules/core/schema/errors.js +65 -0
  57. package/dist/lib/modules/core/schema/index.js +15 -0
  58. package/dist/lib/modules/core/schema/ipc/consent.js +181 -0
  59. package/dist/lib/modules/core/schema/ipc/device.js +276 -0
  60. package/dist/lib/modules/core/schema/ipc/jelly.js +189 -0
  61. package/dist/lib/modules/core/schema/ipc/shapes.js +185 -0
  62. package/dist/lib/modules/core/schema/ipc/surfaces.js +223 -0
  63. package/dist/lib/modules/core/schema/ipc.js +451 -0
  64. package/dist/lib/modules/core/schema/jelly.js +122 -0
  65. package/dist/lib/modules/core/schema/realm.js +27 -0
  66. package/dist/lib/modules/core/schema/relay.js +112 -0
  67. package/dist/lib/modules/core/schema/roster.js +126 -0
  68. package/dist/lib/modules/core/sign.js +43 -0
  69. package/dist/lib/modules/core/task.js +37 -0
  70. package/dist/lib/modules/core/testing.js +20 -0
  71. package/dist/lib/modules/core/ulid.js +36 -0
  72. package/dist/lib/modules/core/version.js +6 -0
  73. package/dist/lib/modules/core/wire.js +255 -0
  74. package/dist/lib/modules/ipc/client.js +289 -0
  75. package/dist/lib/modules/ipc/framing.js +33 -0
  76. package/dist/lib/modules/ipc/index.js +6 -0
  77. package/dist/lib/modules/ipc/paths.js +102 -0
  78. package/dist/lib/modules/ipc/pipes.js +65 -0
  79. package/dist/lib/modules/ipc/rpc.js +8 -0
  80. package/dist/lib/modules/ipc/server.js +317 -0
  81. package/dist/lib/modules/ipc/testing.js +145 -0
  82. package/dist/lib/modules/ipc/trust.js +166 -0
  83. package/dist/lib/modules/ipc/windows-acl.js +275 -0
  84. package/dist/lib/modules/vendor/zod/index.js +7 -0
  85. package/dist/lib/modules/vendor/zod/v4/classic/checks.js +1 -0
  86. package/dist/lib/modules/vendor/zod/v4/classic/coerce.js +17 -0
  87. package/dist/lib/modules/vendor/zod/v4/classic/compat.js +31 -0
  88. package/dist/lib/modules/vendor/zod/v4/classic/deep-partial.js +13 -0
  89. package/dist/lib/modules/vendor/zod/v4/classic/errors.js +57 -0
  90. package/dist/lib/modules/vendor/zod/v4/classic/external.js +17 -0
  91. package/dist/lib/modules/vendor/zod/v4/classic/from-json-schema.js +881 -0
  92. package/dist/lib/modules/vendor/zod/v4/classic/in-out.js +36 -0
  93. package/dist/lib/modules/vendor/zod/v4/classic/iso.js +15 -0
  94. package/dist/lib/modules/vendor/zod/v4/classic/parse.js +16 -0
  95. package/dist/lib/modules/vendor/zod/v4/classic/schemas.js +1535 -0
  96. package/dist/lib/modules/vendor/zod/v4/core/api.js +1107 -0
  97. package/dist/lib/modules/vendor/zod/v4/core/checks.js +516 -0
  98. package/dist/lib/modules/vendor/zod/v4/core/compile.js +1866 -0
  99. package/dist/lib/modules/vendor/zod/v4/core/core.js +141 -0
  100. package/dist/lib/modules/vendor/zod/v4/core/doc.js +38 -0
  101. package/dist/lib/modules/vendor/zod/v4/core/errors.js +267 -0
  102. package/dist/lib/modules/vendor/zod/v4/core/index.js +19 -0
  103. package/dist/lib/modules/vendor/zod/v4/core/json-schema-generator.js +99 -0
  104. package/dist/lib/modules/vendor/zod/v4/core/json-schema-processors.js +843 -0
  105. package/dist/lib/modules/vendor/zod/v4/core/json-schema.js +1 -0
  106. package/dist/lib/modules/vendor/zod/v4/core/memoizer.js +311 -0
  107. package/dist/lib/modules/vendor/zod/v4/core/parse.js +175 -0
  108. package/dist/lib/modules/vendor/zod/v4/core/regexes.js +156 -0
  109. package/dist/lib/modules/vendor/zod/v4/core/registries.js +51 -0
  110. package/dist/lib/modules/vendor/zod/v4/core/schemas.js +2636 -0
  111. package/dist/lib/modules/vendor/zod/v4/core/to-json-schema.js +651 -0
  112. package/dist/lib/modules/vendor/zod/v4/core/util.js +873 -0
  113. package/dist/lib/modules/vendor/zod/v4/core/versions.js +5 -0
  114. package/dist/lib/modules/vendor/zod/v4/core/visit.js +169 -0
  115. package/dist/lib/modules/vendor/zod/v4/locales/ar.js +111 -0
  116. package/dist/lib/modules/vendor/zod/v4/locales/az.js +110 -0
  117. package/dist/lib/modules/vendor/zod/v4/locales/be.js +168 -0
  118. package/dist/lib/modules/vendor/zod/v4/locales/bg.js +125 -0
  119. package/dist/lib/modules/vendor/zod/v4/locales/bn.js +113 -0
  120. package/dist/lib/modules/vendor/zod/v4/locales/ca.js +112 -0
  121. package/dist/lib/modules/vendor/zod/v4/locales/ckb.js +133 -0
  122. package/dist/lib/modules/vendor/zod/v4/locales/cs.js +116 -0
  123. package/dist/lib/modules/vendor/zod/v4/locales/da.js +120 -0
  124. package/dist/lib/modules/vendor/zod/v4/locales/de.js +113 -0
  125. package/dist/lib/modules/vendor/zod/v4/locales/el.js +112 -0
  126. package/dist/lib/modules/vendor/zod/v4/locales/en.js +125 -0
  127. package/dist/lib/modules/vendor/zod/v4/locales/eo.js +114 -0
  128. package/dist/lib/modules/vendor/zod/v4/locales/es.js +136 -0
  129. package/dist/lib/modules/vendor/zod/v4/locales/fa.js +119 -0
  130. package/dist/lib/modules/vendor/zod/v4/locales/fi.js +117 -0
  131. package/dist/lib/modules/vendor/zod/v4/locales/fr-CA.js +112 -0
  132. package/dist/lib/modules/vendor/zod/v4/locales/fr.js +129 -0
  133. package/dist/lib/modules/vendor/zod/v4/locales/gu.js +113 -0
  134. package/dist/lib/modules/vendor/zod/v4/locales/he.js +221 -0
  135. package/dist/lib/modules/vendor/zod/v4/locales/hi.js +111 -0
  136. package/dist/lib/modules/vendor/zod/v4/locales/hr.js +126 -0
  137. package/dist/lib/modules/vendor/zod/v4/locales/hu.js +113 -0
  138. package/dist/lib/modules/vendor/zod/v4/locales/hy.js +158 -0
  139. package/dist/lib/modules/vendor/zod/v4/locales/id.js +111 -0
  140. package/dist/lib/modules/vendor/zod/v4/locales/index.js +63 -0
  141. package/dist/lib/modules/vendor/zod/v4/locales/is.js +114 -0
  142. package/dist/lib/modules/vendor/zod/v4/locales/it.js +113 -0
  143. package/dist/lib/modules/vendor/zod/v4/locales/ja.js +112 -0
  144. package/dist/lib/modules/vendor/zod/v4/locales/ka.js +117 -0
  145. package/dist/lib/modules/vendor/zod/v4/locales/kh.js +5 -0
  146. package/dist/lib/modules/vendor/zod/v4/locales/km.js +115 -0
  147. package/dist/lib/modules/vendor/zod/v4/locales/kn.js +116 -0
  148. package/dist/lib/modules/vendor/zod/v4/locales/ko.js +116 -0
  149. package/dist/lib/modules/vendor/zod/v4/locales/lt.js +207 -0
  150. package/dist/lib/modules/vendor/zod/v4/locales/mk.js +114 -0
  151. package/dist/lib/modules/vendor/zod/v4/locales/ms.js +112 -0
  152. package/dist/lib/modules/vendor/zod/v4/locales/ne.js +111 -0
  153. package/dist/lib/modules/vendor/zod/v4/locales/nl.js +115 -0
  154. package/dist/lib/modules/vendor/zod/v4/locales/nn.js +113 -0
  155. package/dist/lib/modules/vendor/zod/v4/locales/no.js +113 -0
  156. package/dist/lib/modules/vendor/zod/v4/locales/ota.js +114 -0
  157. package/dist/lib/modules/vendor/zod/v4/locales/pl.js +114 -0
  158. package/dist/lib/modules/vendor/zod/v4/locales/ps.js +119 -0
  159. package/dist/lib/modules/vendor/zod/v4/locales/pt-BR.js +143 -0
  160. package/dist/lib/modules/vendor/zod/v4/locales/pt.js +142 -0
  161. package/dist/lib/modules/vendor/zod/v4/locales/ro.js +122 -0
  162. package/dist/lib/modules/vendor/zod/v4/locales/ru.js +168 -0
  163. package/dist/lib/modules/vendor/zod/v4/locales/sk.js +116 -0
  164. package/dist/lib/modules/vendor/zod/v4/locales/sl.js +114 -0
  165. package/dist/lib/modules/vendor/zod/v4/locales/sv.js +115 -0
  166. package/dist/lib/modules/vendor/zod/v4/locales/ta.js +115 -0
  167. package/dist/lib/modules/vendor/zod/v4/locales/tg.js +117 -0
  168. package/dist/lib/modules/vendor/zod/v4/locales/th.js +115 -0
  169. package/dist/lib/modules/vendor/zod/v4/locales/tk.js +107 -0
  170. package/dist/lib/modules/vendor/zod/v4/locales/tr.js +110 -0
  171. package/dist/lib/modules/vendor/zod/v4/locales/ua.js +5 -0
  172. package/dist/lib/modules/vendor/zod/v4/locales/uk.js +113 -0
  173. package/dist/lib/modules/vendor/zod/v4/locales/ur.js +115 -0
  174. package/dist/lib/modules/vendor/zod/v4/locales/uz.js +113 -0
  175. package/dist/lib/modules/vendor/zod/v4/locales/vi.js +113 -0
  176. package/dist/lib/modules/vendor/zod/v4/locales/yo.js +112 -0
  177. package/dist/lib/modules/vendor/zod/v4/locales/zh-CN.js +114 -0
  178. package/dist/lib/modules/vendor/zod/v4/locales/zh-TW.js +112 -0
  179. package/dist/lib/testing-jelly-id.js +1219 -0
  180. package/dist/lib/zod.js +1 -0
  181. package/dist/spec/messaging-v1.md +3426 -0
  182. package/dist/third-party-notices.md +239 -0
  183. package/dist/third-party.json +88 -0
  184. package/dist/types/core/address.d.ts +16 -0
  185. package/dist/types/core/agent/operations.d.ts +129 -0
  186. package/dist/types/core/agent/present.d.ts +57 -0
  187. package/dist/types/core/agent/text.d.ts +62 -0
  188. package/dist/types/core/agent-tools.d.ts +948 -0
  189. package/dist/types/core/b64u.d.ts +6 -0
  190. package/dist/types/core/cards.d.ts +21 -0
  191. package/dist/types/core/check.d.ts +10 -0
  192. package/dist/types/core/consent.d.ts +132 -0
  193. package/dist/types/core/contact-card.d.ts +34 -0
  194. package/dist/types/core/delegation.d.ts +71 -0
  195. package/dist/types/core/directory/device-log.d.ts +119 -0
  196. package/dist/types/core/directory/epoch.d.ts +53 -0
  197. package/dist/types/core/directory/handle.d.ts +11 -0
  198. package/dist/types/core/directory/jelly-device.d.ts +88 -0
  199. package/dist/types/core/directory/jelly-issuer.d.ts +8 -0
  200. package/dist/types/core/directory/jelly-token.d.ts +116 -0
  201. package/dist/types/core/directory/keys-statement.d.ts +22 -0
  202. package/dist/types/core/directory/link.d.ts +36 -0
  203. package/dist/types/core/directory/merkle-log.d.ts +40 -0
  204. package/dist/types/core/directory/person-view.d.ts +90 -0
  205. package/dist/types/core/directory/person.d.ts +8 -0
  206. package/dist/types/core/directory/realm.d.ts +23 -0
  207. package/dist/types/core/directory/smt.d.ts +52 -0
  208. package/dist/types/core/envelope.d.ts +68 -0
  209. package/dist/types/core/hash.d.ts +2 -0
  210. package/dist/types/core/head.d.ts +34 -0
  211. package/dist/types/core/identity.d.ts +35 -0
  212. package/dist/types/core/index.d.ts +38 -0
  213. package/dist/types/core/jcs.d.ts +12 -0
  214. package/dist/types/core/jelly-host-double.d.ts +21 -0
  215. package/dist/types/core/jelly-host.d.ts +86 -0
  216. package/dist/types/core/keys.d.ts +16 -0
  217. package/dist/types/core/peer-text.d.ts +87 -0
  218. package/dist/types/core/realm.d.ts +36 -0
  219. package/dist/types/core/roster.d.ts +146 -0
  220. package/dist/types/core/schema/a2a.d.ts +251 -0
  221. package/dist/types/core/schema/common.d.ts +272 -0
  222. package/dist/types/core/schema/consent.d.ts +140 -0
  223. package/dist/types/core/schema/delegation.d.ts +58 -0
  224. package/dist/types/core/schema/directory-frames.d.ts +1301 -0
  225. package/dist/types/core/schema/directory.d.ts +375 -0
  226. package/dist/types/core/schema/envelope.d.ts +750 -0
  227. package/dist/types/core/schema/errors.d.ts +104 -0
  228. package/dist/types/core/schema/index.d.ts +15 -0
  229. package/dist/types/core/schema/ipc/consent.d.ts +555 -0
  230. package/dist/types/core/schema/ipc/device.d.ts +729 -0
  231. package/dist/types/core/schema/ipc/jelly.d.ts +501 -0
  232. package/dist/types/core/schema/ipc/shapes.d.ts +411 -0
  233. package/dist/types/core/schema/ipc/surfaces.d.ts +674 -0
  234. package/dist/types/core/schema/ipc.d.ts +3131 -0
  235. package/dist/types/core/schema/jelly.d.ts +160 -0
  236. package/dist/types/core/schema/realm.d.ts +38 -0
  237. package/dist/types/core/schema/relay.d.ts +1122 -0
  238. package/dist/types/core/schema/roster.d.ts +347 -0
  239. package/dist/types/core/sign.d.ts +13 -0
  240. package/dist/types/core/task.d.ts +6 -0
  241. package/dist/types/core/testing.d.ts +18 -0
  242. package/dist/types/core/ulid.d.ts +5 -0
  243. package/dist/types/core/version.d.ts +6 -0
  244. package/dist/types/core/wire.d.ts +14 -0
  245. package/dist/types/ipc/client.d.ts +85 -0
  246. package/dist/types/ipc/framing.d.ts +12 -0
  247. package/dist/types/ipc/index.d.ts +6 -0
  248. package/dist/types/ipc/paths.d.ts +39 -0
  249. package/dist/types/ipc/pipes.d.ts +16 -0
  250. package/dist/types/ipc/rpc.d.ts +13 -0
  251. package/dist/types/ipc/server.d.ts +94 -0
  252. package/dist/types/ipc/testing.d.ts +89 -0
  253. package/dist/types/ipc/trust.d.ts +49 -0
  254. package/dist/types/ipc/windows-acl.d.ts +56 -0
  255. package/dist/types/testing/jelly-id.d.ts +518 -0
  256. package/dist/types/zod.d.ts +1 -0
  257. package/package.json +77 -4
@@ -0,0 +1,3131 @@
1
+ /**
2
+ * Local daemon API. JSON-RPC 2.0, one JSON object per line (NDJSON), over two Unix sockets in
3
+ * `$MESSAGING_HOME/run/` (spec §8.2, "Two sockets"), each 0600 (the agent socket 0660 to
4
+ * `ipc.agentGroup` when set):
5
+ *
6
+ * - `run/agent.sock` serves only `AGENT_METHODS` (the agent tier): the session, contacts, send,
7
+ * inbox, item, conversation, search, task and events methods. The daemon refuses anything else with
8
+ * `forbidden`. Agent-facing clients (OpenCode plugin tools, MCP server) connect here.
9
+ * - `run/admin.sock` serves every method: the agent tier, `HUMAN_METHODS` (acting as the person:
10
+ * conversations, the person's own lines, people, channels) and `ADMIN_METHODS` (this device and the
11
+ * team). Human clients (the `messaging` CLI and the `/messaging` TUI) connect here; agent-facing
12
+ * clients never expose these methods.
13
+ *
14
+ * Params are strict: a key a method does not define is refused (-32602), never dropped.
15
+ *
16
+ * Errors: standard JSON-RPC codes for transport/schema problems (-32700, -32600, -32601, -32602,
17
+ * -32603); every Messaging error uses code -32000 with `data: { code: ErrorCode }`.
18
+ * The daemon pushes notifications `{"jsonrpc":"2.0","method":"event","params":Event}`: `conv` events
19
+ * to connections that called `conv.subscribe`, every other event to connections that called
20
+ * `events.subscribe` for its key (or to all of them, for events without a key).
21
+ */
22
+ import { z } from "zod";
23
+ export * from "./ipc/shapes.js";
24
+ export * from "./ipc/surfaces.js";
25
+ export * from "./ipc/jelly.js";
26
+ export declare const MESSAGING_ERROR_RPC_CODE = -32000;
27
+ /**
28
+ * Where the daemon can reach a session's host to wake it while no connection holds the session's
29
+ * key (spec §8.6). Local only: the daemon never publishes it.
30
+ *
31
+ * `opencode`: the OpenCode session `sessionID` lives in the location (directory) `location` of the
32
+ * OpenCode server process `pid`. `location` is absolute: a POSIX path (`/…`), or a Windows drive path
33
+ * (`C:\…` or `C:/…`) below the drive's root. The daemon may call that server's `messaging.opencode/wake` RPC at
34
+ * `location`, and nothing else, while OpenCode's service registration names the same `pid`.
35
+ */
36
+ export declare const SessionHost: z.ZodObject<{
37
+ kind: z.ZodLiteral<"opencode">;
38
+ location: z.ZodString;
39
+ sessionID: z.ZodString;
40
+ pid: z.ZodNumber;
41
+ }, z.core.$strict>;
42
+ export type SessionHost = z.infer<typeof SessionHost>;
43
+ /**
44
+ * The local API's protocol number. A client and a daemon must speak the same one, and be the same
45
+ * release (`VERSION`): there is no compatibility across versions (spec §8.2).
46
+ */
47
+ export declare const IPC_PROTOCOL = 1;
48
+ /**
49
+ * The daemon's first line on every connection, before any request: a JSON-RPC notification
50
+ * `{"jsonrpc":"2.0","method":"hello","params":IpcHello}` (spec §8.2). A client reads it before it
51
+ * sends anything, and refuses a daemon of another `version` or `protocol` with `daemon_mismatch`.
52
+ * Every release keeps this shape, so any client can say which daemon it found and `messaging daemon
53
+ * stop` can stop it by `pid`. Unknown fields are ignored.
54
+ */
55
+ export declare const IpcHello: z.ZodObject<{
56
+ daemon: z.ZodLiteral<"messagingd">;
57
+ version: z.ZodString;
58
+ protocol: z.ZodNumber;
59
+ pid: z.ZodNumber;
60
+ deployment: z.ZodOptional<z.ZodLiteral<"jelly">>;
61
+ }, z.core.$strip>;
62
+ export type IpcHello = z.infer<typeof IpcHello>;
63
+ export declare const DaemonStatus: z.ZodObject<{
64
+ version: z.ZodString;
65
+ pid: z.ZodNumber;
66
+ home: z.ZodString;
67
+ identity: z.ZodOptional<z.ZodObject<{
68
+ device: z.ZodString;
69
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
70
+ label: z.ZodString;
71
+ }, z.core.$strip>>;
72
+ team: z.ZodOptional<z.ZodObject<{
73
+ id: z.ZodString;
74
+ name: z.ZodString;
75
+ role: z.ZodEnum<{
76
+ admin: "admin";
77
+ member: "member";
78
+ }>;
79
+ head: z.ZodObject<{
80
+ seq: z.ZodNumber;
81
+ hash: z.ZodString;
82
+ }, z.core.$strip>;
83
+ }, z.core.$strip>>;
84
+ relay: z.ZodObject<{
85
+ url: z.ZodOptional<z.ZodString>;
86
+ connected: z.ZodBoolean;
87
+ lastError: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>;
89
+ sessions: z.ZodNumber;
90
+ divergence: z.ZodOptional<z.ZodObject<{
91
+ device: z.ZodString;
92
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
93
+ seq: z.ZodNumber;
94
+ ours: z.ZodString;
95
+ theirs: z.ZodString;
96
+ at: z.ZodNumber;
97
+ id: z.ZodString;
98
+ }, z.core.$strip>>;
99
+ alarm: z.ZodOptional<z.ZodEnum<{
100
+ restored: "restored";
101
+ keys_missing: "keys_missing";
102
+ }>>;
103
+ directory: z.ZodOptional<z.ZodObject<{
104
+ realm: z.ZodEnum<{
105
+ roster: "roster";
106
+ directory: "directory";
107
+ }>;
108
+ device: z.ZodOptional<z.ZodString>;
109
+ binding: z.ZodEnum<{
110
+ removed: "removed";
111
+ none: "none";
112
+ bound: "bound";
113
+ "attest-due": "attest-due";
114
+ replace: "replace";
115
+ }>;
116
+ person: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
117
+ label: z.ZodOptional<z.ZodString>;
118
+ sth: z.ZodOptional<z.ZodObject<{
119
+ size: z.ZodNumber;
120
+ root: z.ZodString;
121
+ ts: z.ZodNumber;
122
+ }, z.core.$strip>>;
123
+ alarm: z.ZodOptional<z.ZodObject<{
124
+ kind: z.ZodEnum<{
125
+ directory: "directory";
126
+ restored: "restored";
127
+ }>;
128
+ reason: z.ZodString;
129
+ at: z.ZodNumber;
130
+ }, z.core.$strip>>;
131
+ }, z.core.$strip>>;
132
+ }, z.core.$strip>;
133
+ export type DaemonStatus = z.infer<typeof DaemonStatus>;
134
+ export declare const InviteSummary: z.ZodObject<{
135
+ inviteId: z.ZodString;
136
+ person: z.ZodString;
137
+ expires: z.ZodNumber;
138
+ state: z.ZodEnum<{
139
+ expired: "expired";
140
+ open: "open";
141
+ redeemed: "redeemed";
142
+ revoked: "revoked";
143
+ }>;
144
+ }, z.core.$strip>;
145
+ /** Method table: name → params/result schemas. The daemon validates params; clients validate results. */
146
+ export declare const IPC_METHODS: {
147
+ readonly "contacts.list": {
148
+ readonly params: z.ZodObject<{
149
+ person: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
150
+ includeOffline: z.ZodOptional<z.ZodBoolean>;
151
+ }, z.core.$strict>;
152
+ readonly result: z.ZodObject<{
153
+ entries: z.ZodArray<z.ZodObject<{
154
+ address: z.ZodString;
155
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
156
+ agent: z.ZodString;
157
+ device: z.ZodString;
158
+ label: z.ZodString;
159
+ client: z.ZodString;
160
+ repo: z.ZodOptional<z.ZodString>;
161
+ branch: z.ZodOptional<z.ZodString>;
162
+ state: z.ZodEnum<{
163
+ idle: "idle";
164
+ busy: "busy";
165
+ }>;
166
+ doing: z.ZodOptional<z.ZodString>;
167
+ tier: z.ZodEnum<{
168
+ push: "push";
169
+ pull: "pull";
170
+ }>;
171
+ online: z.ZodBoolean;
172
+ lastSeen: z.ZodNumber;
173
+ self: z.ZodBoolean;
174
+ expect: z.ZodOptional<z.ZodEnum<{
175
+ kept: "kept";
176
+ next_turn: "next_turn";
177
+ wake: "wake";
178
+ next_prompt: "next_prompt";
179
+ on_read: "on_read";
180
+ offline: "offline";
181
+ }>>;
182
+ }, z.core.$strip>>;
183
+ conversations: z.ZodArray<z.ZodObject<{
184
+ conversation: z.ZodString;
185
+ kind: z.ZodEnum<{
186
+ channel: "channel";
187
+ dm: "dm";
188
+ }>;
189
+ lastAt: z.ZodOptional<z.ZodNumber>;
190
+ name: z.ZodOptional<z.ZodString>;
191
+ lastSeq: z.ZodOptional<z.ZodNumber>;
192
+ readUpTo: z.ZodNumber;
193
+ unread: z.ZodNumber;
194
+ }, z.core.$strip>>;
195
+ reach: z.ZodArray<z.ZodObject<{
196
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
197
+ can: z.ZodObject<{
198
+ chat: z.ZodBoolean;
199
+ agentMail: z.ZodBoolean;
200
+ ask: z.ZodEnum<{
201
+ open: "open";
202
+ request: "request";
203
+ no: "no";
204
+ }>;
205
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
206
+ }, z.core.$strict>;
207
+ source: z.ZodEnum<{
208
+ default: "default";
209
+ card: "card";
210
+ }>;
211
+ at: z.ZodOptional<z.ZodNumber>;
212
+ devicesChangedAt: z.ZodOptional<z.ZodNumber>;
213
+ }, z.core.$strip>>;
214
+ }, z.core.$strip>;
215
+ };
216
+ readonly "msg.send": {
217
+ readonly params: z.ZodObject<{
218
+ key: z.ZodString;
219
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
220
+ kind: z.ZodEnum<{
221
+ message: "message";
222
+ task: "task";
223
+ }>;
224
+ parts: z.ZodArray<z.ZodObject<{
225
+ text: z.ZodOptional<z.ZodString>;
226
+ raw: z.ZodOptional<z.ZodString>;
227
+ url: z.ZodOptional<z.ZodString>;
228
+ data: z.ZodOptional<z.ZodUnknown>;
229
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
230
+ filename: z.ZodOptional<z.ZodString>;
231
+ mediaType: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strip>>;
233
+ contextId: z.ZodOptional<z.ZodString>;
234
+ taskId: z.ZodOptional<z.ZodString>;
235
+ replyTo: z.ZodOptional<z.ZodString>;
236
+ idempotencyKey: z.ZodOptional<z.ZodString>;
237
+ messageId: z.ZodOptional<z.ZodString>;
238
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
239
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
240
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
241
+ wake: z.ZodOptional<z.ZodBoolean>;
242
+ request: z.ZodOptional<z.ZodObject<{
243
+ contact: z.ZodString;
244
+ }, z.core.$strict>>;
245
+ onBehalfOf: z.ZodOptional<z.ZodObject<{
246
+ taskId: z.ZodString;
247
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
248
+ maxDepth: z.ZodOptional<z.ZodNumber>;
249
+ }, z.core.$strict>>;
250
+ }, z.core.$strict>;
251
+ readonly result: z.ZodObject<{
252
+ results: z.ZodArray<z.ZodObject<{
253
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
254
+ envelopeId: z.ZodString;
255
+ messageId: z.ZodString;
256
+ taskId: z.ZodOptional<z.ZodString>;
257
+ contextId: z.ZodString;
258
+ stage: z.ZodEnum<{
259
+ accepted: "accepted";
260
+ relayed: "relayed";
261
+ delivered: "delivered";
262
+ held: "held";
263
+ handed_to_agent: "handed_to_agent";
264
+ read: "read";
265
+ replied: "replied";
266
+ rejected: "rejected";
267
+ expired: "expired";
268
+ }>;
269
+ code: z.ZodOptional<z.ZodEnum<{
270
+ expired: "expired";
271
+ invalid_request: "invalid_request";
272
+ not_member: "not_member";
273
+ bad_signature: "bad_signature";
274
+ unknown_session: "unknown_session";
275
+ ambiguous_address: "ambiguous_address";
276
+ no_recipients: "no_recipients";
277
+ unknown_address: "unknown_address";
278
+ refused: "refused";
279
+ declined: "declined";
280
+ request_required: "request_required";
281
+ rate_limited: "rate_limited";
282
+ loop_guard: "loop_guard";
283
+ too_large: "too_large";
284
+ secret_refused: "secret_refused";
285
+ duplicate: "duplicate";
286
+ relay_unavailable: "relay_unavailable";
287
+ not_found: "not_found";
288
+ invalid_state: "invalid_state";
289
+ forbidden: "forbidden";
290
+ guarded_turn: "guarded_turn";
291
+ roster_conflict: "roster_conflict";
292
+ invite_invalid: "invite_invalid";
293
+ no_identity: "no_identity";
294
+ binding_invalid: "binding_invalid";
295
+ jelly_unavailable: "jelly_unavailable";
296
+ log_conflict: "log_conflict";
297
+ device_limit: "device_limit";
298
+ admission_required: "admission_required";
299
+ admission_invalid: "admission_invalid";
300
+ directory_inconsistent: "directory_inconsistent";
301
+ unknown_device: "unknown_device";
302
+ directory_unavailable: "directory_unavailable";
303
+ login_unsupported: "login_unsupported";
304
+ login_denied: "login_denied";
305
+ grant_required: "grant_required";
306
+ grant_invalid: "grant_invalid";
307
+ ticket_required: "ticket_required";
308
+ ticket_invalid: "ticket_invalid";
309
+ daemon_unavailable: "daemon_unavailable";
310
+ daemon_mismatch: "daemon_mismatch";
311
+ internal: "internal";
312
+ }>>;
313
+ expect: z.ZodOptional<z.ZodEnum<{
314
+ kept: "kept";
315
+ next_turn: "next_turn";
316
+ wake: "wake";
317
+ next_prompt: "next_prompt";
318
+ on_read: "on_read";
319
+ offline: "offline";
320
+ }>>;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>;
323
+ };
324
+ readonly "item.read": {
325
+ readonly params: z.ZodObject<{
326
+ key: z.ZodString;
327
+ id: z.ZodString;
328
+ }, z.core.$strict>;
329
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
330
+ kind: z.ZodLiteral<"received">;
331
+ item: z.ZodObject<{
332
+ id: z.ZodString;
333
+ key: z.ZodString;
334
+ from: z.ZodObject<{
335
+ address: z.ZodString;
336
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
337
+ agent: z.ZodOptional<z.ZodString>;
338
+ device: z.ZodString;
339
+ label: z.ZodString;
340
+ }, z.core.$strip>;
341
+ kind: z.ZodEnum<{
342
+ message: "message";
343
+ task: "task";
344
+ }>;
345
+ messageId: z.ZodString;
346
+ taskId: z.ZodOptional<z.ZodString>;
347
+ contextId: z.ZodOptional<z.ZodString>;
348
+ replyTo: z.ZodOptional<z.ZodString>;
349
+ receivedAt: z.ZodNumber;
350
+ stage: z.ZodEnum<{
351
+ delivered: "delivered";
352
+ handed_to_agent: "handed_to_agent";
353
+ read: "read";
354
+ }>;
355
+ bytes: z.ZodNumber;
356
+ preview: z.ZodString;
357
+ wake: z.ZodBoolean;
358
+ chain: z.ZodOptional<z.ZodObject<{
359
+ addresses: z.ZodArray<z.ZodString>;
360
+ depth: z.ZodNumber;
361
+ maxDepth: z.ZodNumber;
362
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
363
+ exp: z.ZodNumber;
364
+ }, z.core.$strip>>;
365
+ consent: z.ZodOptional<z.ZodEnum<{
366
+ self: "self";
367
+ guarded: "guarded";
368
+ trusted: "trusted";
369
+ }>>;
370
+ }, z.core.$strip>;
371
+ message: z.ZodObject<{
372
+ messageId: z.ZodString;
373
+ contextId: z.ZodOptional<z.ZodString>;
374
+ taskId: z.ZodOptional<z.ZodString>;
375
+ role: z.ZodEnum<{
376
+ ROLE_USER: "ROLE_USER";
377
+ ROLE_AGENT: "ROLE_AGENT";
378
+ }>;
379
+ parts: z.ZodArray<z.ZodObject<{
380
+ text: z.ZodOptional<z.ZodString>;
381
+ raw: z.ZodOptional<z.ZodString>;
382
+ url: z.ZodOptional<z.ZodString>;
383
+ data: z.ZodOptional<z.ZodUnknown>;
384
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
385
+ filename: z.ZodOptional<z.ZodString>;
386
+ mediaType: z.ZodOptional<z.ZodString>;
387
+ }, z.core.$strip>>;
388
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
389
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
390
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
391
+ }, z.core.$strip>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ kind: z.ZodLiteral<"sent">;
394
+ envelopeId: z.ZodString;
395
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
396
+ stage: z.ZodEnum<{
397
+ accepted: "accepted";
398
+ relayed: "relayed";
399
+ delivered: "delivered";
400
+ held: "held";
401
+ handed_to_agent: "handed_to_agent";
402
+ read: "read";
403
+ replied: "replied";
404
+ rejected: "rejected";
405
+ expired: "expired";
406
+ }>;
407
+ history: z.ZodArray<z.ZodObject<{
408
+ stage: z.ZodEnum<{
409
+ accepted: "accepted";
410
+ relayed: "relayed";
411
+ delivered: "delivered";
412
+ held: "held";
413
+ handed_to_agent: "handed_to_agent";
414
+ read: "read";
415
+ replied: "replied";
416
+ rejected: "rejected";
417
+ expired: "expired";
418
+ }>;
419
+ at: z.ZodNumber;
420
+ code: z.ZodOptional<z.ZodEnum<{
421
+ expired: "expired";
422
+ invalid_request: "invalid_request";
423
+ not_member: "not_member";
424
+ bad_signature: "bad_signature";
425
+ unknown_session: "unknown_session";
426
+ ambiguous_address: "ambiguous_address";
427
+ no_recipients: "no_recipients";
428
+ unknown_address: "unknown_address";
429
+ refused: "refused";
430
+ declined: "declined";
431
+ request_required: "request_required";
432
+ rate_limited: "rate_limited";
433
+ loop_guard: "loop_guard";
434
+ too_large: "too_large";
435
+ secret_refused: "secret_refused";
436
+ duplicate: "duplicate";
437
+ relay_unavailable: "relay_unavailable";
438
+ not_found: "not_found";
439
+ invalid_state: "invalid_state";
440
+ forbidden: "forbidden";
441
+ guarded_turn: "guarded_turn";
442
+ roster_conflict: "roster_conflict";
443
+ invite_invalid: "invite_invalid";
444
+ no_identity: "no_identity";
445
+ binding_invalid: "binding_invalid";
446
+ jelly_unavailable: "jelly_unavailable";
447
+ log_conflict: "log_conflict";
448
+ device_limit: "device_limit";
449
+ admission_required: "admission_required";
450
+ admission_invalid: "admission_invalid";
451
+ directory_inconsistent: "directory_inconsistent";
452
+ unknown_device: "unknown_device";
453
+ directory_unavailable: "directory_unavailable";
454
+ login_unsupported: "login_unsupported";
455
+ login_denied: "login_denied";
456
+ grant_required: "grant_required";
457
+ grant_invalid: "grant_invalid";
458
+ ticket_required: "ticket_required";
459
+ ticket_invalid: "ticket_invalid";
460
+ daemon_unavailable: "daemon_unavailable";
461
+ daemon_mismatch: "daemon_mismatch";
462
+ internal: "internal";
463
+ }>>;
464
+ note: z.ZodOptional<z.ZodString>;
465
+ }, z.core.$strip>>;
466
+ }, z.core.$strip>], "kind">;
467
+ };
468
+ readonly "conv.read": {
469
+ readonly params: z.ZodObject<{
470
+ key: z.ZodOptional<z.ZodString>;
471
+ conversation: z.ZodString;
472
+ thread: z.ZodOptional<z.ZodString>;
473
+ before: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
474
+ at: z.ZodNumber;
475
+ id: z.ZodString;
476
+ }, z.core.$strict>]>>;
477
+ after: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
478
+ at: z.ZodNumber;
479
+ id: z.ZodString;
480
+ }, z.core.$strict>]>>;
481
+ limit: z.ZodOptional<z.ZodNumber>;
482
+ }, z.core.$strict>;
483
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
484
+ kind: z.ZodLiteral<"lines">;
485
+ lines: z.ZodArray<z.ZodObject<{
486
+ id: z.ZodString;
487
+ seq: z.ZodNumber;
488
+ at: z.ZodNumber;
489
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
490
+ agent: z.ZodOptional<z.ZodString>;
491
+ direction: z.ZodEnum<{
492
+ out: "out";
493
+ in: "in";
494
+ }>;
495
+ body: z.ZodString;
496
+ thread: z.ZodOptional<z.ZodString>;
497
+ state: z.ZodOptional<z.ZodEnum<{
498
+ delivered: "delivered";
499
+ held: "held";
500
+ refused: "refused";
501
+ sent: "sent";
502
+ }>>;
503
+ refused: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
504
+ notice: z.ZodOptional<z.ZodLiteral<true>>;
505
+ }, z.core.$strip>>;
506
+ more: z.ZodBoolean;
507
+ }, z.core.$strip>, z.ZodObject<{
508
+ kind: z.ZodLiteral<"agent">;
509
+ entries: z.ZodArray<z.ZodObject<{
510
+ id: z.ZodString;
511
+ kind: z.ZodEnum<{
512
+ task: "task";
513
+ mail: "mail";
514
+ }>;
515
+ direction: z.ZodEnum<{
516
+ out: "out";
517
+ in: "in";
518
+ }>;
519
+ peer: z.ZodString;
520
+ at: z.ZodNumber;
521
+ text: z.ZodOptional<z.ZodString>;
522
+ taskId: z.ZodOptional<z.ZodString>;
523
+ stage: z.ZodOptional<z.ZodEnum<{
524
+ accepted: "accepted";
525
+ relayed: "relayed";
526
+ delivered: "delivered";
527
+ held: "held";
528
+ handed_to_agent: "handed_to_agent";
529
+ read: "read";
530
+ replied: "replied";
531
+ rejected: "rejected";
532
+ expired: "expired";
533
+ }>>;
534
+ role: z.ZodOptional<z.ZodEnum<{
535
+ requester: "requester";
536
+ executor: "executor";
537
+ }>>;
538
+ state: z.ZodOptional<z.ZodEnum<{
539
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
540
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
541
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
542
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
543
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
544
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
545
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
546
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
547
+ }>>;
548
+ }, z.core.$strip>>;
549
+ more: z.ZodBoolean;
550
+ }, z.core.$strip>], "kind">;
551
+ };
552
+ readonly search: {
553
+ readonly params: z.ZodObject<{
554
+ query: z.ZodString;
555
+ conversation: z.ZodOptional<z.ZodString>;
556
+ limit: z.ZodOptional<z.ZodNumber>;
557
+ }, z.core.$strict>;
558
+ readonly result: z.ZodObject<{
559
+ hits: z.ZodArray<z.ZodObject<{
560
+ id: z.ZodString;
561
+ seq: z.ZodNumber;
562
+ at: z.ZodNumber;
563
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
564
+ agent: z.ZodOptional<z.ZodString>;
565
+ direction: z.ZodEnum<{
566
+ out: "out";
567
+ in: "in";
568
+ }>;
569
+ body: z.ZodString;
570
+ thread: z.ZodOptional<z.ZodString>;
571
+ state: z.ZodOptional<z.ZodEnum<{
572
+ delivered: "delivered";
573
+ held: "held";
574
+ refused: "refused";
575
+ sent: "sent";
576
+ }>>;
577
+ refused: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
578
+ notice: z.ZodOptional<z.ZodLiteral<true>>;
579
+ conversation: z.ZodString;
580
+ }, z.core.$strip>>;
581
+ }, z.core.$strip>;
582
+ };
583
+ readonly "conv.list": {
584
+ readonly params: z.ZodObject<{
585
+ limit: z.ZodOptional<z.ZodNumber>;
586
+ }, z.core.$strict>;
587
+ readonly result: z.ZodObject<{
588
+ conversations: z.ZodArray<z.ZodObject<{
589
+ conversation: z.ZodString;
590
+ kind: z.ZodEnum<{
591
+ channel: "channel";
592
+ dm: "dm";
593
+ }>;
594
+ lastAt: z.ZodOptional<z.ZodNumber>;
595
+ name: z.ZodOptional<z.ZodString>;
596
+ lastSeq: z.ZodOptional<z.ZodNumber>;
597
+ readUpTo: z.ZodNumber;
598
+ unread: z.ZodNumber;
599
+ }, z.core.$strip>>;
600
+ }, z.core.$strip>;
601
+ };
602
+ readonly "conv.markRead": {
603
+ readonly params: z.ZodObject<{
604
+ conversation: z.ZodString;
605
+ upTo: z.ZodNumber;
606
+ }, z.core.$strict>;
607
+ readonly result: z.ZodObject<{
608
+ readUpTo: z.ZodNumber;
609
+ unread: z.ZodNumber;
610
+ }, z.core.$strip>;
611
+ };
612
+ readonly "conv.subscribe": {
613
+ readonly params: z.ZodObject<{
614
+ since: z.ZodOptional<z.ZodNumber>;
615
+ }, z.core.$strict>;
616
+ readonly result: z.ZodObject<{
617
+ seq: z.ZodNumber;
618
+ gap: z.ZodBoolean;
619
+ }, z.core.$strip>;
620
+ };
621
+ readonly "person.send": {
622
+ readonly params: z.ZodObject<{
623
+ conversation: z.ZodString;
624
+ text: z.ZodString;
625
+ thread: z.ZodOptional<z.ZodString>;
626
+ clientId: z.ZodOptional<z.ZodString>;
627
+ }, z.core.$strict>;
628
+ readonly result: z.ZodObject<{
629
+ id: z.ZodString;
630
+ conversation: z.ZodString;
631
+ }, z.core.$strip>;
632
+ };
633
+ readonly "people.search": {
634
+ readonly params: z.ZodObject<{
635
+ query: z.ZodOptional<z.ZodString>;
636
+ limit: z.ZodOptional<z.ZodNumber>;
637
+ }, z.core.$strict>;
638
+ readonly result: z.ZodObject<{
639
+ people: z.ZodArray<z.ZodObject<{
640
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
641
+ name: z.ZodString;
642
+ handle: z.ZodString;
643
+ org: z.ZodEnum<{
644
+ other: "other";
645
+ none: "none";
646
+ same: "same";
647
+ }>;
648
+ vouched: z.ZodEnum<{
649
+ admin: "admin";
650
+ device: "device";
651
+ jelly: "jelly";
652
+ service: "service";
653
+ }>;
654
+ }, z.core.$strip>>;
655
+ }, z.core.$strip>;
656
+ };
657
+ readonly "people.get": {
658
+ readonly params: z.ZodObject<{
659
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
660
+ }, z.core.$strict>;
661
+ readonly result: z.ZodObject<{
662
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
663
+ name: z.ZodString;
664
+ handle: z.ZodString;
665
+ org: z.ZodEnum<{
666
+ other: "other";
667
+ none: "none";
668
+ same: "same";
669
+ }>;
670
+ vouched: z.ZodEnum<{
671
+ admin: "admin";
672
+ device: "device";
673
+ jelly: "jelly";
674
+ service: "service";
675
+ }>;
676
+ devices: z.ZodArray<z.ZodObject<{
677
+ device: z.ZodString;
678
+ label: z.ZodString;
679
+ self: z.ZodBoolean;
680
+ away: z.ZodOptional<z.ZodLiteral<true>>;
681
+ }, z.core.$strip>>;
682
+ deviceChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
683
+ change: z.ZodEnum<{
684
+ removed: "removed";
685
+ replaced: "replaced";
686
+ added: "added";
687
+ vouched: "vouched";
688
+ }>;
689
+ device: z.ZodString;
690
+ label: z.ZodString;
691
+ kind: z.ZodOptional<z.ZodEnum<{
692
+ "jelly-host": "jelly-host";
693
+ laptop: "laptop";
694
+ server: "server";
695
+ other: "other";
696
+ }>>;
697
+ vouch: z.ZodEnum<{
698
+ admin: "admin";
699
+ device: "device";
700
+ jelly: "jelly";
701
+ }>;
702
+ via: z.ZodOptional<z.ZodEnum<{
703
+ host: "host";
704
+ browser: "browser";
705
+ }>>;
706
+ approver: z.ZodOptional<z.ZodString>;
707
+ at: z.ZodNumber;
708
+ }, z.core.$strip>>>;
709
+ }, z.core.$strip>;
710
+ };
711
+ readonly "daemon.health": {
712
+ readonly params: z.ZodObject<{}, z.core.$strict>;
713
+ readonly result: z.ZodObject<{
714
+ state: z.ZodEnum<{
715
+ starting: "starting";
716
+ running: "running";
717
+ stopping: "stopping";
718
+ }>;
719
+ relay: z.ZodEnum<{
720
+ offline: "offline";
721
+ connected: "connected";
722
+ connecting: "connecting";
723
+ }>;
724
+ directory: z.ZodEnum<{
725
+ alarm: "alarm";
726
+ ok: "ok";
727
+ unavailable: "unavailable";
728
+ }>;
729
+ alarm: z.ZodNullable<z.ZodEnum<{
730
+ directory: "directory";
731
+ restored: "restored";
732
+ keys_missing: "keys_missing";
733
+ }>>;
734
+ busy: z.ZodBoolean;
735
+ version: z.ZodString;
736
+ storeSchema: z.ZodNumber;
737
+ }, z.core.$strip>;
738
+ };
739
+ readonly "agents.list": {
740
+ readonly params: z.ZodObject<{}, z.core.$strict>;
741
+ readonly result: z.ZodObject<{
742
+ agents: z.ZodArray<z.ZodObject<{
743
+ agent: z.ZodString;
744
+ conversations: z.ZodNumber;
745
+ unread: z.ZodNumber;
746
+ lastAt: z.ZodOptional<z.ZodNumber>;
747
+ state: z.ZodEnum<{
748
+ idle: "idle";
749
+ busy: "busy";
750
+ kept: "kept";
751
+ }>;
752
+ }, z.core.$strip>>;
753
+ }, z.core.$strip>;
754
+ };
755
+ readonly "agents.read": {
756
+ readonly params: z.ZodObject<{
757
+ agent: z.ZodString;
758
+ conversation: z.ZodOptional<z.ZodString>;
759
+ before: z.ZodOptional<z.ZodObject<{
760
+ at: z.ZodNumber;
761
+ id: z.ZodString;
762
+ }, z.core.$strict>>;
763
+ limit: z.ZodOptional<z.ZodNumber>;
764
+ }, z.core.$strict>;
765
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
766
+ kind: z.ZodLiteral<"conversations">;
767
+ conversations: z.ZodArray<z.ZodObject<{
768
+ conversation: z.ZodString;
769
+ unread: z.ZodNumber;
770
+ lastAt: z.ZodNumber;
771
+ }, z.core.$strip>>;
772
+ }, z.core.$strip>, z.ZodObject<{
773
+ kind: z.ZodLiteral<"entries">;
774
+ conversation: z.ZodString;
775
+ entries: z.ZodArray<z.ZodObject<{
776
+ id: z.ZodString;
777
+ kind: z.ZodEnum<{
778
+ task: "task";
779
+ mail: "mail";
780
+ }>;
781
+ direction: z.ZodEnum<{
782
+ out: "out";
783
+ in: "in";
784
+ }>;
785
+ peer: z.ZodString;
786
+ at: z.ZodNumber;
787
+ text: z.ZodOptional<z.ZodString>;
788
+ taskId: z.ZodOptional<z.ZodString>;
789
+ stage: z.ZodOptional<z.ZodEnum<{
790
+ accepted: "accepted";
791
+ relayed: "relayed";
792
+ delivered: "delivered";
793
+ held: "held";
794
+ handed_to_agent: "handed_to_agent";
795
+ read: "read";
796
+ replied: "replied";
797
+ rejected: "rejected";
798
+ expired: "expired";
799
+ }>>;
800
+ role: z.ZodOptional<z.ZodEnum<{
801
+ requester: "requester";
802
+ executor: "executor";
803
+ }>>;
804
+ state: z.ZodOptional<z.ZodEnum<{
805
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
806
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
807
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
808
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
809
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
810
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
811
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
812
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
813
+ }>>;
814
+ }, z.core.$strip>>;
815
+ more: z.ZodBoolean;
816
+ }, z.core.$strip>], "kind">;
817
+ };
818
+ readonly "notice.subscribe": {
819
+ readonly params: z.ZodObject<{
820
+ after: z.ZodOptional<z.ZodString>;
821
+ lines: z.ZodOptional<z.ZodBoolean>;
822
+ }, z.core.$strict>;
823
+ readonly result: z.ZodObject<{
824
+ replayed: z.ZodNumber;
825
+ }, z.core.$strip>;
826
+ };
827
+ readonly "notice.list": {
828
+ readonly params: z.ZodObject<{
829
+ lines: z.ZodOptional<z.ZodBoolean>;
830
+ limit: z.ZodOptional<z.ZodNumber>;
831
+ }, z.core.$strict>;
832
+ readonly result: z.ZodObject<{
833
+ notices: z.ZodArray<z.ZodObject<{
834
+ id: z.ZodString;
835
+ category: z.ZodEnum<{
836
+ message: "message";
837
+ request: "request";
838
+ alert: "alert";
839
+ }>;
840
+ conversation: z.ZodOptional<z.ZodString>;
841
+ from: z.ZodOptional<z.ZodObject<{
842
+ name: z.ZodString;
843
+ email: z.ZodOptional<z.ZodString>;
844
+ org: z.ZodEnum<{
845
+ other: "other";
846
+ none: "none";
847
+ same: "same";
848
+ }>;
849
+ }, z.core.$strip>>;
850
+ line: z.ZodOptional<z.ZodString>;
851
+ device: z.ZodOptional<z.ZodObject<{
852
+ change: z.ZodEnum<{
853
+ removed: "removed";
854
+ replaced: "replaced";
855
+ added: "added";
856
+ vouched: "vouched";
857
+ }>;
858
+ device: z.ZodString;
859
+ label: z.ZodString;
860
+ kind: z.ZodOptional<z.ZodEnum<{
861
+ "jelly-host": "jelly-host";
862
+ laptop: "laptop";
863
+ server: "server";
864
+ other: "other";
865
+ }>>;
866
+ vouch: z.ZodEnum<{
867
+ admin: "admin";
868
+ device: "device";
869
+ jelly: "jelly";
870
+ }>;
871
+ via: z.ZodOptional<z.ZodEnum<{
872
+ host: "host";
873
+ browser: "browser";
874
+ }>>;
875
+ approver: z.ZodOptional<z.ZodString>;
876
+ at: z.ZodNumber;
877
+ replaces: z.ZodOptional<z.ZodObject<{
878
+ device: z.ZodString;
879
+ label: z.ZodString;
880
+ }, z.core.$strip>>;
881
+ current: z.ZodBoolean;
882
+ remove: z.ZodOptional<z.ZodEnum<{
883
+ token: "token";
884
+ "sign-in": "sign-in";
885
+ team: "team";
886
+ }>>;
887
+ }, z.core.$strip>>;
888
+ at: z.ZodNumber;
889
+ }, z.core.$strip>>;
890
+ counts: z.ZodObject<{
891
+ unread: z.ZodNumber;
892
+ requests: z.ZodNumber;
893
+ }, z.core.$strip>;
894
+ }, z.core.$strip>;
895
+ };
896
+ readonly "notice.ack": {
897
+ readonly params: z.ZodObject<{
898
+ ids: z.ZodArray<z.ZodString>;
899
+ }, z.core.$strict>;
900
+ readonly result: z.ZodObject<{
901
+ ok: z.ZodLiteral<true>;
902
+ }, z.core.$strip>;
903
+ };
904
+ readonly "daemon.woke": {
905
+ readonly params: z.ZodObject<{}, z.core.$strict>;
906
+ readonly result: z.ZodObject<{
907
+ ok: z.ZodLiteral<true>;
908
+ }, z.core.$strip>;
909
+ };
910
+ readonly "person.attached": {
911
+ readonly params: z.ZodObject<{
912
+ attached: z.ZodBoolean;
913
+ }, z.core.$strict>;
914
+ readonly result: z.ZodObject<{
915
+ ok: z.ZodLiteral<true>;
916
+ }, z.core.$strip>;
917
+ };
918
+ readonly "wake.arm": {
919
+ readonly params: z.ZodObject<{
920
+ url: z.ZodString;
921
+ ticket: z.ZodString;
922
+ agents: z.ZodArray<z.ZodString>;
923
+ }, z.core.$strict>;
924
+ readonly result: z.ZodObject<{
925
+ relay: z.ZodEnum<{
926
+ pending: "pending";
927
+ armed: "armed";
928
+ }>;
929
+ awaiting: z.ZodNumber;
930
+ }, z.core.$strip>;
931
+ };
932
+ readonly "wake.disarm": {
933
+ readonly params: z.ZodObject<{}, z.core.$strict>;
934
+ readonly result: z.ZodObject<{
935
+ relay: z.ZodEnum<{
936
+ pending: "pending";
937
+ disarmed: "disarmed";
938
+ }>;
939
+ }, z.core.$strip>;
940
+ };
941
+ readonly "daemon.snapshot": {
942
+ readonly params: z.ZodObject<{
943
+ done: z.ZodOptional<z.ZodLiteral<true>>;
944
+ }, z.core.$strict>;
945
+ readonly result: z.ZodUnion<readonly [z.ZodObject<{
946
+ folder: z.ZodString;
947
+ files: z.ZodArray<z.ZodObject<{
948
+ name: z.ZodString;
949
+ bytes: z.ZodNumber;
950
+ sha256: z.ZodString;
951
+ }, z.core.$strip>>;
952
+ storeSchema: z.ZodNumber;
953
+ at: z.ZodNumber;
954
+ until: z.ZodNumber;
955
+ }, z.core.$strip>, z.ZodObject<{
956
+ released: z.ZodBoolean;
957
+ }, z.core.$strip>]>;
958
+ };
959
+ readonly "device.remove.preview": {
960
+ readonly params: z.ZodObject<{
961
+ device: z.ZodString;
962
+ reason: z.ZodOptional<z.ZodEnum<{
963
+ self: "self";
964
+ removed: "removed";
965
+ lost: "lost";
966
+ }>>;
967
+ token: z.ZodOptional<z.ZodString>;
968
+ }, z.core.$strict>;
969
+ readonly result: z.ZodObject<{
970
+ label: z.ZodString;
971
+ kind: z.ZodOptional<z.ZodEnum<{
972
+ "jelly-host": "jelly-host";
973
+ laptop: "laptop";
974
+ server: "server";
975
+ other: "other";
976
+ }>>;
977
+ vouch: z.ZodEnum<{
978
+ admin: "admin";
979
+ device: "device";
980
+ jelly: "jelly";
981
+ }>;
982
+ current: z.ZodBoolean;
983
+ self: z.ZodBoolean;
984
+ since: z.ZodOptional<z.ZodNumber>;
985
+ }, z.core.$strip>;
986
+ };
987
+ readonly "grant.list": {
988
+ readonly params: z.ZodObject<{
989
+ subject: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
990
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
991
+ }, z.core.$strict>, z.ZodObject<{
992
+ channel: z.ZodString;
993
+ }, z.core.$strict>]>>;
994
+ }, z.core.$strict>;
995
+ readonly result: z.ZodObject<{
996
+ grants: z.ZodArray<z.ZodObject<{
997
+ id: z.ZodString;
998
+ ts: z.ZodNumber;
999
+ by: z.ZodString;
1000
+ resignedAt: z.ZodOptional<z.ZodNumber>;
1001
+ chat: z.ZodOptional<z.ZodEnum<{
1002
+ open: "open";
1003
+ muted: "muted";
1004
+ blocked: "blocked";
1005
+ }>>;
1006
+ agentMail: z.ZodOptional<z.ZodEnum<{
1007
+ open: "open";
1008
+ blocked: "blocked";
1009
+ }>>;
1010
+ ask: z.ZodOptional<z.ZodEnum<{
1011
+ open: "open";
1012
+ request: "request";
1013
+ no: "no";
1014
+ }>>;
1015
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
1016
+ discoverable: z.ZodOptional<z.ZodBoolean>;
1017
+ subject: z.ZodUnion<readonly [z.ZodObject<{
1018
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1019
+ }, z.core.$strip>, z.ZodObject<{
1020
+ channel: z.ZodString;
1021
+ name: z.ZodOptional<z.ZodString>;
1022
+ }, z.core.$strip>]>;
1023
+ }, z.core.$strip>>;
1024
+ review: z.ZodArray<z.ZodObject<{
1025
+ subject: z.ZodUnion<readonly [z.ZodObject<{
1026
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1027
+ }, z.core.$strip>, z.ZodObject<{
1028
+ channel: z.ZodString;
1029
+ name: z.ZodOptional<z.ZodString>;
1030
+ }, z.core.$strip>]>;
1031
+ chat: z.ZodOptional<z.ZodLiteral<"open">>;
1032
+ agentMail: z.ZodOptional<z.ZodLiteral<"open">>;
1033
+ ask: z.ZodOptional<z.ZodEnum<{
1034
+ open: "open";
1035
+ request: "request";
1036
+ }>>;
1037
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
1038
+ discoverable: z.ZodOptional<z.ZodLiteral<true>>;
1039
+ at: z.ZodNumber;
1040
+ }, z.core.$strip>>;
1041
+ }, z.core.$strip>;
1042
+ };
1043
+ readonly "grant.set": {
1044
+ readonly params: z.ZodObject<{
1045
+ trust: z.ZodOptional<z.ZodLiteral<true>>;
1046
+ chat: z.ZodOptional<z.ZodEnum<{
1047
+ open: "open";
1048
+ muted: "muted";
1049
+ blocked: "blocked";
1050
+ }>>;
1051
+ agentMail: z.ZodOptional<z.ZodEnum<{
1052
+ open: "open";
1053
+ blocked: "blocked";
1054
+ }>>;
1055
+ ask: z.ZodOptional<z.ZodEnum<{
1056
+ open: "open";
1057
+ request: "request";
1058
+ no: "no";
1059
+ }>>;
1060
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
1061
+ discoverable: z.ZodOptional<z.ZodBoolean>;
1062
+ subject: z.ZodUnion<readonly [z.ZodObject<{
1063
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1064
+ }, z.core.$strict>, z.ZodObject<{
1065
+ channel: z.ZodString;
1066
+ }, z.core.$strict>]>;
1067
+ }, z.core.$strict>;
1068
+ readonly result: z.ZodObject<{
1069
+ grant: z.ZodObject<{
1070
+ id: z.ZodString;
1071
+ ts: z.ZodNumber;
1072
+ by: z.ZodString;
1073
+ resignedAt: z.ZodOptional<z.ZodNumber>;
1074
+ chat: z.ZodOptional<z.ZodEnum<{
1075
+ open: "open";
1076
+ muted: "muted";
1077
+ blocked: "blocked";
1078
+ }>>;
1079
+ agentMail: z.ZodOptional<z.ZodEnum<{
1080
+ open: "open";
1081
+ blocked: "blocked";
1082
+ }>>;
1083
+ ask: z.ZodOptional<z.ZodEnum<{
1084
+ open: "open";
1085
+ request: "request";
1086
+ no: "no";
1087
+ }>>;
1088
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
1089
+ discoverable: z.ZodOptional<z.ZodBoolean>;
1090
+ subject: z.ZodUnion<readonly [z.ZodObject<{
1091
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1092
+ }, z.core.$strip>, z.ZodObject<{
1093
+ channel: z.ZodString;
1094
+ name: z.ZodOptional<z.ZodString>;
1095
+ }, z.core.$strip>]>;
1096
+ }, z.core.$strip>;
1097
+ }, z.core.$strip>;
1098
+ };
1099
+ readonly "grant.set.preview": {
1100
+ readonly params: z.ZodObject<{
1101
+ trust: z.ZodOptional<z.ZodLiteral<true>>;
1102
+ chat: z.ZodOptional<z.ZodEnum<{
1103
+ open: "open";
1104
+ muted: "muted";
1105
+ blocked: "blocked";
1106
+ }>>;
1107
+ agentMail: z.ZodOptional<z.ZodEnum<{
1108
+ open: "open";
1109
+ blocked: "blocked";
1110
+ }>>;
1111
+ ask: z.ZodOptional<z.ZodEnum<{
1112
+ open: "open";
1113
+ request: "request";
1114
+ no: "no";
1115
+ }>>;
1116
+ trustedUntil: z.ZodOptional<z.ZodNumber>;
1117
+ discoverable: z.ZodOptional<z.ZodBoolean>;
1118
+ subject: z.ZodUnion<readonly [z.ZodObject<{
1119
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1120
+ }, z.core.$strict>, z.ZodObject<{
1121
+ channel: z.ZodString;
1122
+ }, z.core.$strict>]>;
1123
+ }, z.core.$strict>;
1124
+ readonly result: z.ZodObject<{
1125
+ sentence: z.ZodString;
1126
+ }, z.core.$strip>;
1127
+ };
1128
+ readonly "request.list": {
1129
+ readonly params: z.ZodObject<{}, z.core.$strict>;
1130
+ readonly result: z.ZodObject<{
1131
+ requests: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1132
+ id: z.ZodString;
1133
+ kind: z.ZodEnum<{
1134
+ message: "message";
1135
+ task: "task";
1136
+ }>;
1137
+ from: z.ZodObject<{
1138
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1139
+ device: z.ZodString;
1140
+ label: z.ZodString;
1141
+ agent: z.ZodString;
1142
+ address: z.ZodString;
1143
+ }, z.core.$strip>;
1144
+ to: z.ZodString;
1145
+ preview: z.ZodString;
1146
+ at: z.ZodNumber;
1147
+ exp: z.ZodNumber;
1148
+ }, z.core.$strip>, z.ZodObject<{
1149
+ id: z.ZodString;
1150
+ kind: z.ZodLiteral<"contact">;
1151
+ from: z.ZodObject<{
1152
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1153
+ device: z.ZodString;
1154
+ label: z.ZodString;
1155
+ name: z.ZodString;
1156
+ email: z.ZodOptional<z.ZodString>;
1157
+ org: z.ZodEnum<{
1158
+ other: "other";
1159
+ none: "none";
1160
+ same: "same";
1161
+ }>;
1162
+ }, z.core.$strip>;
1163
+ text: z.ZodString;
1164
+ at: z.ZodNumber;
1165
+ exp: z.ZodNumber;
1166
+ }, z.core.$strip>, z.ZodObject<{
1167
+ id: z.ZodString;
1168
+ kind: z.ZodLiteral<"suggestion">;
1169
+ agent: z.ZodString;
1170
+ email: z.ZodString;
1171
+ at: z.ZodNumber;
1172
+ }, z.core.$strip>]>>;
1173
+ }, z.core.$strip>;
1174
+ };
1175
+ readonly "request.answer": {
1176
+ readonly params: z.ZodObject<{
1177
+ id: z.ZodString;
1178
+ answer: z.ZodEnum<{
1179
+ once: "once";
1180
+ always: "always";
1181
+ accept: "accept";
1182
+ decline: "decline";
1183
+ block: "block";
1184
+ }>;
1185
+ all: z.ZodOptional<z.ZodBoolean>;
1186
+ }, z.core.$strict>;
1187
+ readonly result: z.ZodObject<{
1188
+ answered: z.ZodArray<z.ZodString>;
1189
+ }, z.core.$strip>;
1190
+ };
1191
+ readonly "request.answer.preview": {
1192
+ readonly params: z.ZodObject<{
1193
+ id: z.ZodString;
1194
+ answer: z.ZodEnum<{
1195
+ once: "once";
1196
+ always: "always";
1197
+ accept: "accept";
1198
+ decline: "decline";
1199
+ block: "block";
1200
+ }>;
1201
+ all: z.ZodOptional<z.ZodBoolean>;
1202
+ }, z.core.$strict>;
1203
+ readonly result: z.ZodObject<{
1204
+ kind: z.ZodEnum<{
1205
+ message: "message";
1206
+ task: "task";
1207
+ contact: "contact";
1208
+ suggestion: "suggestion";
1209
+ }>;
1210
+ from: z.ZodObject<{
1211
+ name: z.ZodString;
1212
+ email: z.ZodOptional<z.ZodString>;
1213
+ org: z.ZodEnum<{
1214
+ other: "other";
1215
+ none: "none";
1216
+ same: "same";
1217
+ }>;
1218
+ }, z.core.$strip>;
1219
+ agent: z.ZodOptional<z.ZodString>;
1220
+ to: z.ZodOptional<z.ZodString>;
1221
+ count: z.ZodNumber;
1222
+ sentence: z.ZodString;
1223
+ }, z.core.$strip>;
1224
+ };
1225
+ readonly "contact.request": {
1226
+ readonly params: z.ZodObject<{
1227
+ email: z.ZodString;
1228
+ text: z.ZodString;
1229
+ suggestion: z.ZodOptional<z.ZodString>;
1230
+ }, z.core.$strict>;
1231
+ readonly result: z.ZodObject<{
1232
+ id: z.ZodString;
1233
+ conversation: z.ZodString;
1234
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1235
+ }, z.core.$strip>;
1236
+ };
1237
+ readonly "contact.request.preview": {
1238
+ readonly params: z.ZodObject<{
1239
+ email: z.ZodString;
1240
+ text: z.ZodOptional<z.ZodString>;
1241
+ suggestion: z.ZodOptional<z.ZodString>;
1242
+ }, z.core.$strict>;
1243
+ readonly result: z.ZodObject<{
1244
+ found: z.ZodBoolean;
1245
+ }, z.core.$strip>;
1246
+ };
1247
+ readonly "card.get": {
1248
+ readonly params: z.ZodObject<{
1249
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1250
+ }, z.core.$strict>;
1251
+ readonly result: z.ZodObject<{
1252
+ sent: z.ZodBoolean;
1253
+ }, z.core.$strip>;
1254
+ };
1255
+ readonly "daemon.status": {
1256
+ readonly params: z.ZodObject<{}, z.core.$strict>;
1257
+ readonly result: z.ZodObject<{
1258
+ version: z.ZodString;
1259
+ pid: z.ZodNumber;
1260
+ home: z.ZodString;
1261
+ identity: z.ZodOptional<z.ZodObject<{
1262
+ device: z.ZodString;
1263
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1264
+ label: z.ZodString;
1265
+ }, z.core.$strip>>;
1266
+ team: z.ZodOptional<z.ZodObject<{
1267
+ id: z.ZodString;
1268
+ name: z.ZodString;
1269
+ role: z.ZodEnum<{
1270
+ admin: "admin";
1271
+ member: "member";
1272
+ }>;
1273
+ head: z.ZodObject<{
1274
+ seq: z.ZodNumber;
1275
+ hash: z.ZodString;
1276
+ }, z.core.$strip>;
1277
+ }, z.core.$strip>>;
1278
+ relay: z.ZodObject<{
1279
+ url: z.ZodOptional<z.ZodString>;
1280
+ connected: z.ZodBoolean;
1281
+ lastError: z.ZodOptional<z.ZodString>;
1282
+ }, z.core.$strip>;
1283
+ sessions: z.ZodNumber;
1284
+ divergence: z.ZodOptional<z.ZodObject<{
1285
+ device: z.ZodString;
1286
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1287
+ seq: z.ZodNumber;
1288
+ ours: z.ZodString;
1289
+ theirs: z.ZodString;
1290
+ at: z.ZodNumber;
1291
+ id: z.ZodString;
1292
+ }, z.core.$strip>>;
1293
+ alarm: z.ZodOptional<z.ZodEnum<{
1294
+ restored: "restored";
1295
+ keys_missing: "keys_missing";
1296
+ }>>;
1297
+ directory: z.ZodOptional<z.ZodObject<{
1298
+ realm: z.ZodEnum<{
1299
+ roster: "roster";
1300
+ directory: "directory";
1301
+ }>;
1302
+ device: z.ZodOptional<z.ZodString>;
1303
+ binding: z.ZodEnum<{
1304
+ removed: "removed";
1305
+ none: "none";
1306
+ bound: "bound";
1307
+ "attest-due": "attest-due";
1308
+ replace: "replace";
1309
+ }>;
1310
+ person: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
1311
+ label: z.ZodOptional<z.ZodString>;
1312
+ sth: z.ZodOptional<z.ZodObject<{
1313
+ size: z.ZodNumber;
1314
+ root: z.ZodString;
1315
+ ts: z.ZodNumber;
1316
+ }, z.core.$strip>>;
1317
+ alarm: z.ZodOptional<z.ZodObject<{
1318
+ kind: z.ZodEnum<{
1319
+ directory: "directory";
1320
+ restored: "restored";
1321
+ }>;
1322
+ reason: z.ZodString;
1323
+ at: z.ZodNumber;
1324
+ }, z.core.$strip>>;
1325
+ }, z.core.$strip>>;
1326
+ }, z.core.$strip>;
1327
+ };
1328
+ /** Human CLI only: replies, then shuts the daemon down cleanly. */
1329
+ readonly "daemon.stop": {
1330
+ readonly params: z.ZodObject<{}, z.core.$strict>;
1331
+ readonly result: z.ZodObject<{
1332
+ ok: z.ZodLiteral<true>;
1333
+ }, z.core.$strip>;
1334
+ };
1335
+ readonly "session.register": {
1336
+ readonly params: z.ZodObject<{
1337
+ key: z.ZodString;
1338
+ agent: z.ZodString;
1339
+ name: z.ZodOptional<z.ZodString>;
1340
+ cwd: z.ZodOptional<z.ZodString>;
1341
+ repo: z.ZodOptional<z.ZodString>;
1342
+ branch: z.ZodOptional<z.ZodString>;
1343
+ tier: z.ZodEnum<{
1344
+ push: "push";
1345
+ pull: "pull";
1346
+ }>;
1347
+ state: z.ZodEnum<{
1348
+ idle: "idle";
1349
+ busy: "busy";
1350
+ }>;
1351
+ doing: z.ZodOptional<z.ZodString>;
1352
+ host: z.ZodOptional<z.ZodObject<{
1353
+ kind: z.ZodLiteral<"opencode">;
1354
+ location: z.ZodString;
1355
+ sessionID: z.ZodString;
1356
+ pid: z.ZodNumber;
1357
+ }, z.core.$strict>>;
1358
+ ticket: z.ZodOptional<z.ZodString>;
1359
+ }, z.core.$strict>;
1360
+ readonly result: z.ZodObject<{
1361
+ session: z.ZodString;
1362
+ address: z.ZodString;
1363
+ }, z.core.$strip>;
1364
+ };
1365
+ readonly "session.update": {
1366
+ readonly params: z.ZodObject<{
1367
+ key: z.ZodString;
1368
+ state: z.ZodOptional<z.ZodEnum<{
1369
+ idle: "idle";
1370
+ busy: "busy";
1371
+ }>>;
1372
+ doing: z.ZodOptional<z.ZodString>;
1373
+ branch: z.ZodOptional<z.ZodString>;
1374
+ tier: z.ZodOptional<z.ZodEnum<{
1375
+ push: "push";
1376
+ pull: "pull";
1377
+ }>>;
1378
+ }, z.core.$strict>;
1379
+ readonly result: z.ZodObject<{
1380
+ ok: z.ZodLiteral<true>;
1381
+ }, z.core.$strip>;
1382
+ };
1383
+ readonly "session.unregister": {
1384
+ readonly params: z.ZodObject<{
1385
+ key: z.ZodString;
1386
+ }, z.core.$strict>;
1387
+ readonly result: z.ZodObject<{
1388
+ ok: z.ZodLiteral<true>;
1389
+ }, z.core.$strip>;
1390
+ };
1391
+ /** Newest first; default limit 50. */
1392
+ readonly "inbox.list": {
1393
+ readonly params: z.ZodObject<{
1394
+ key: z.ZodString;
1395
+ unreadOnly: z.ZodOptional<z.ZodBoolean>;
1396
+ limit: z.ZodOptional<z.ZodNumber>;
1397
+ }, z.core.$strict>;
1398
+ readonly result: z.ZodObject<{
1399
+ items: z.ZodArray<z.ZodObject<{
1400
+ id: z.ZodString;
1401
+ key: z.ZodString;
1402
+ from: z.ZodObject<{
1403
+ address: z.ZodString;
1404
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1405
+ agent: z.ZodOptional<z.ZodString>;
1406
+ device: z.ZodString;
1407
+ label: z.ZodString;
1408
+ }, z.core.$strip>;
1409
+ kind: z.ZodEnum<{
1410
+ message: "message";
1411
+ task: "task";
1412
+ }>;
1413
+ messageId: z.ZodString;
1414
+ taskId: z.ZodOptional<z.ZodString>;
1415
+ contextId: z.ZodOptional<z.ZodString>;
1416
+ replyTo: z.ZodOptional<z.ZodString>;
1417
+ receivedAt: z.ZodNumber;
1418
+ stage: z.ZodEnum<{
1419
+ delivered: "delivered";
1420
+ handed_to_agent: "handed_to_agent";
1421
+ read: "read";
1422
+ }>;
1423
+ bytes: z.ZodNumber;
1424
+ preview: z.ZodString;
1425
+ wake: z.ZodBoolean;
1426
+ chain: z.ZodOptional<z.ZodObject<{
1427
+ addresses: z.ZodArray<z.ZodString>;
1428
+ depth: z.ZodNumber;
1429
+ maxDepth: z.ZodNumber;
1430
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1431
+ exp: z.ZodNumber;
1432
+ }, z.core.$strip>>;
1433
+ consent: z.ZodOptional<z.ZodEnum<{
1434
+ self: "self";
1435
+ guarded: "guarded";
1436
+ trusted: "trusted";
1437
+ }>>;
1438
+ }, z.core.$strip>>;
1439
+ }, z.core.$strip>;
1440
+ };
1441
+ /**
1442
+ * Looks up one item without changing its stage or sending a receipt. With `message: true` it
1443
+ * also returns the full message, still with no stage change: a client can show the message first
1444
+ * and ack after (`inbox.ack`), so a crash in between leaves the item unread.
1445
+ */
1446
+ readonly "inbox.get": {
1447
+ readonly params: z.ZodObject<{
1448
+ key: z.ZodString;
1449
+ id: z.ZodString;
1450
+ message: z.ZodOptional<z.ZodBoolean>;
1451
+ }, z.core.$strict>;
1452
+ readonly result: z.ZodObject<{
1453
+ item: z.ZodObject<{
1454
+ id: z.ZodString;
1455
+ key: z.ZodString;
1456
+ from: z.ZodObject<{
1457
+ address: z.ZodString;
1458
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1459
+ agent: z.ZodOptional<z.ZodString>;
1460
+ device: z.ZodString;
1461
+ label: z.ZodString;
1462
+ }, z.core.$strip>;
1463
+ kind: z.ZodEnum<{
1464
+ message: "message";
1465
+ task: "task";
1466
+ }>;
1467
+ messageId: z.ZodString;
1468
+ taskId: z.ZodOptional<z.ZodString>;
1469
+ contextId: z.ZodOptional<z.ZodString>;
1470
+ replyTo: z.ZodOptional<z.ZodString>;
1471
+ receivedAt: z.ZodNumber;
1472
+ stage: z.ZodEnum<{
1473
+ delivered: "delivered";
1474
+ handed_to_agent: "handed_to_agent";
1475
+ read: "read";
1476
+ }>;
1477
+ bytes: z.ZodNumber;
1478
+ preview: z.ZodString;
1479
+ wake: z.ZodBoolean;
1480
+ chain: z.ZodOptional<z.ZodObject<{
1481
+ addresses: z.ZodArray<z.ZodString>;
1482
+ depth: z.ZodNumber;
1483
+ maxDepth: z.ZodNumber;
1484
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1485
+ exp: z.ZodNumber;
1486
+ }, z.core.$strip>>;
1487
+ consent: z.ZodOptional<z.ZodEnum<{
1488
+ self: "self";
1489
+ guarded: "guarded";
1490
+ trusted: "trusted";
1491
+ }>>;
1492
+ }, z.core.$strip>;
1493
+ message: z.ZodOptional<z.ZodObject<{
1494
+ messageId: z.ZodString;
1495
+ contextId: z.ZodOptional<z.ZodString>;
1496
+ taskId: z.ZodOptional<z.ZodString>;
1497
+ role: z.ZodEnum<{
1498
+ ROLE_USER: "ROLE_USER";
1499
+ ROLE_AGENT: "ROLE_AGENT";
1500
+ }>;
1501
+ parts: z.ZodArray<z.ZodObject<{
1502
+ text: z.ZodOptional<z.ZodString>;
1503
+ raw: z.ZodOptional<z.ZodString>;
1504
+ url: z.ZodOptional<z.ZodString>;
1505
+ data: z.ZodOptional<z.ZodUnknown>;
1506
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1507
+ filename: z.ZodOptional<z.ZodString>;
1508
+ mediaType: z.ZodOptional<z.ZodString>;
1509
+ }, z.core.$strip>>;
1510
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1511
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1512
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1513
+ }, z.core.$strip>>;
1514
+ }, z.core.$strip>;
1515
+ };
1516
+ readonly "inbox.ack": {
1517
+ readonly params: z.ZodObject<{
1518
+ key: z.ZodString;
1519
+ id: z.ZodString;
1520
+ stage: z.ZodEnum<{
1521
+ handed_to_agent: "handed_to_agent";
1522
+ read: "read";
1523
+ }>;
1524
+ }, z.core.$strict>;
1525
+ readonly result: z.ZodObject<{
1526
+ ok: z.ZodLiteral<true>;
1527
+ }, z.core.$strip>;
1528
+ };
1529
+ readonly "task.list": {
1530
+ readonly params: z.ZodObject<{
1531
+ key: z.ZodString;
1532
+ role: z.ZodOptional<z.ZodEnum<{
1533
+ requester: "requester";
1534
+ executor: "executor";
1535
+ }>>;
1536
+ state: z.ZodOptional<z.ZodEnum<{
1537
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1538
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1539
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1540
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1541
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1542
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1543
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1544
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1545
+ }>>;
1546
+ contextId: z.ZodOptional<z.ZodString>;
1547
+ peer: z.ZodOptional<z.ZodString>;
1548
+ updatedAfter: z.ZodOptional<z.ZodNumber>;
1549
+ cursor: z.ZodOptional<z.ZodString>;
1550
+ limit: z.ZodOptional<z.ZodNumber>;
1551
+ }, z.core.$strict>;
1552
+ /** Most recently updated first. */
1553
+ readonly result: z.ZodObject<{
1554
+ tasks: z.ZodArray<z.ZodObject<{
1555
+ task: z.ZodObject<{
1556
+ contextId: z.ZodOptional<z.ZodString>;
1557
+ status: z.ZodObject<{
1558
+ state: z.ZodEnum<{
1559
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1560
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1561
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1562
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1563
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1564
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1565
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1566
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1567
+ }>;
1568
+ message: z.ZodOptional<z.ZodObject<{
1569
+ messageId: z.ZodString;
1570
+ contextId: z.ZodOptional<z.ZodString>;
1571
+ taskId: z.ZodOptional<z.ZodString>;
1572
+ role: z.ZodEnum<{
1573
+ ROLE_USER: "ROLE_USER";
1574
+ ROLE_AGENT: "ROLE_AGENT";
1575
+ }>;
1576
+ parts: z.ZodArray<z.ZodObject<{
1577
+ text: z.ZodOptional<z.ZodString>;
1578
+ raw: z.ZodOptional<z.ZodString>;
1579
+ url: z.ZodOptional<z.ZodString>;
1580
+ data: z.ZodOptional<z.ZodUnknown>;
1581
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1582
+ filename: z.ZodOptional<z.ZodString>;
1583
+ mediaType: z.ZodOptional<z.ZodString>;
1584
+ }, z.core.$strip>>;
1585
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1586
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1587
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1588
+ }, z.core.$strip>>;
1589
+ timestamp: z.ZodOptional<z.ZodString>;
1590
+ }, z.core.$strip>;
1591
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1592
+ artifactId: z.ZodString;
1593
+ name: z.ZodOptional<z.ZodString>;
1594
+ description: z.ZodOptional<z.ZodString>;
1595
+ parts: z.ZodArray<z.ZodObject<{
1596
+ text: z.ZodOptional<z.ZodString>;
1597
+ raw: z.ZodOptional<z.ZodString>;
1598
+ url: z.ZodOptional<z.ZodString>;
1599
+ data: z.ZodOptional<z.ZodUnknown>;
1600
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1601
+ filename: z.ZodOptional<z.ZodString>;
1602
+ mediaType: z.ZodOptional<z.ZodString>;
1603
+ }, z.core.$strip>>;
1604
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1605
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1606
+ }, z.core.$strip>>>;
1607
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1608
+ messageId: z.ZodString;
1609
+ contextId: z.ZodOptional<z.ZodString>;
1610
+ taskId: z.ZodOptional<z.ZodString>;
1611
+ role: z.ZodEnum<{
1612
+ ROLE_USER: "ROLE_USER";
1613
+ ROLE_AGENT: "ROLE_AGENT";
1614
+ }>;
1615
+ parts: z.ZodArray<z.ZodObject<{
1616
+ text: z.ZodOptional<z.ZodString>;
1617
+ raw: z.ZodOptional<z.ZodString>;
1618
+ url: z.ZodOptional<z.ZodString>;
1619
+ data: z.ZodOptional<z.ZodUnknown>;
1620
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1621
+ filename: z.ZodOptional<z.ZodString>;
1622
+ mediaType: z.ZodOptional<z.ZodString>;
1623
+ }, z.core.$strip>>;
1624
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1625
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1626
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1627
+ }, z.core.$strip>>>;
1628
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1629
+ id: z.ZodString;
1630
+ }, z.core.$strip>;
1631
+ role: z.ZodEnum<{
1632
+ requester: "requester";
1633
+ executor: "executor";
1634
+ }>;
1635
+ key: z.ZodString;
1636
+ peer: z.ZodObject<{
1637
+ address: z.ZodString;
1638
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1639
+ agent: z.ZodOptional<z.ZodString>;
1640
+ device: z.ZodString;
1641
+ label: z.ZodString;
1642
+ }, z.core.$strip>;
1643
+ createdAt: z.ZodNumber;
1644
+ updatedAt: z.ZodNumber;
1645
+ chain: z.ZodOptional<z.ZodObject<{
1646
+ addresses: z.ZodArray<z.ZodString>;
1647
+ depth: z.ZodNumber;
1648
+ maxDepth: z.ZodNumber;
1649
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1650
+ exp: z.ZodNumber;
1651
+ }, z.core.$strip>>;
1652
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1653
+ envelopeId: z.ZodString;
1654
+ messageId: z.ZodString;
1655
+ sentAt: z.ZodNumber;
1656
+ stage: z.ZodEnum<{
1657
+ accepted: "accepted";
1658
+ relayed: "relayed";
1659
+ delivered: "delivered";
1660
+ held: "held";
1661
+ handed_to_agent: "handed_to_agent";
1662
+ read: "read";
1663
+ replied: "replied";
1664
+ rejected: "rejected";
1665
+ expired: "expired";
1666
+ }>;
1667
+ at: z.ZodNumber;
1668
+ }, z.core.$strip>>>;
1669
+ }, z.core.$strip>>;
1670
+ nextCursor: z.ZodOptional<z.ZodString>;
1671
+ total: z.ZodNumber;
1672
+ }, z.core.$strip>;
1673
+ };
1674
+ readonly "task.get": {
1675
+ readonly params: z.ZodObject<{
1676
+ key: z.ZodString;
1677
+ taskId: z.ZodString;
1678
+ }, z.core.$strict>;
1679
+ readonly result: z.ZodObject<{
1680
+ task: z.ZodObject<{
1681
+ contextId: z.ZodOptional<z.ZodString>;
1682
+ status: z.ZodObject<{
1683
+ state: z.ZodEnum<{
1684
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1685
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1686
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1687
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1688
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1689
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1690
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1691
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1692
+ }>;
1693
+ message: z.ZodOptional<z.ZodObject<{
1694
+ messageId: z.ZodString;
1695
+ contextId: z.ZodOptional<z.ZodString>;
1696
+ taskId: z.ZodOptional<z.ZodString>;
1697
+ role: z.ZodEnum<{
1698
+ ROLE_USER: "ROLE_USER";
1699
+ ROLE_AGENT: "ROLE_AGENT";
1700
+ }>;
1701
+ parts: z.ZodArray<z.ZodObject<{
1702
+ text: z.ZodOptional<z.ZodString>;
1703
+ raw: z.ZodOptional<z.ZodString>;
1704
+ url: z.ZodOptional<z.ZodString>;
1705
+ data: z.ZodOptional<z.ZodUnknown>;
1706
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1707
+ filename: z.ZodOptional<z.ZodString>;
1708
+ mediaType: z.ZodOptional<z.ZodString>;
1709
+ }, z.core.$strip>>;
1710
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1711
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1712
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1713
+ }, z.core.$strip>>;
1714
+ timestamp: z.ZodOptional<z.ZodString>;
1715
+ }, z.core.$strip>;
1716
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1717
+ artifactId: z.ZodString;
1718
+ name: z.ZodOptional<z.ZodString>;
1719
+ description: z.ZodOptional<z.ZodString>;
1720
+ parts: z.ZodArray<z.ZodObject<{
1721
+ text: z.ZodOptional<z.ZodString>;
1722
+ raw: z.ZodOptional<z.ZodString>;
1723
+ url: z.ZodOptional<z.ZodString>;
1724
+ data: z.ZodOptional<z.ZodUnknown>;
1725
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1726
+ filename: z.ZodOptional<z.ZodString>;
1727
+ mediaType: z.ZodOptional<z.ZodString>;
1728
+ }, z.core.$strip>>;
1729
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1730
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1731
+ }, z.core.$strip>>>;
1732
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1733
+ messageId: z.ZodString;
1734
+ contextId: z.ZodOptional<z.ZodString>;
1735
+ taskId: z.ZodOptional<z.ZodString>;
1736
+ role: z.ZodEnum<{
1737
+ ROLE_USER: "ROLE_USER";
1738
+ ROLE_AGENT: "ROLE_AGENT";
1739
+ }>;
1740
+ parts: z.ZodArray<z.ZodObject<{
1741
+ text: z.ZodOptional<z.ZodString>;
1742
+ raw: z.ZodOptional<z.ZodString>;
1743
+ url: z.ZodOptional<z.ZodString>;
1744
+ data: z.ZodOptional<z.ZodUnknown>;
1745
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1746
+ filename: z.ZodOptional<z.ZodString>;
1747
+ mediaType: z.ZodOptional<z.ZodString>;
1748
+ }, z.core.$strip>>;
1749
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1750
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1751
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1752
+ }, z.core.$strip>>>;
1753
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1754
+ id: z.ZodString;
1755
+ }, z.core.$strip>;
1756
+ role: z.ZodEnum<{
1757
+ requester: "requester";
1758
+ executor: "executor";
1759
+ }>;
1760
+ key: z.ZodString;
1761
+ peer: z.ZodObject<{
1762
+ address: z.ZodString;
1763
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1764
+ agent: z.ZodOptional<z.ZodString>;
1765
+ device: z.ZodString;
1766
+ label: z.ZodString;
1767
+ }, z.core.$strip>;
1768
+ createdAt: z.ZodNumber;
1769
+ updatedAt: z.ZodNumber;
1770
+ chain: z.ZodOptional<z.ZodObject<{
1771
+ addresses: z.ZodArray<z.ZodString>;
1772
+ depth: z.ZodNumber;
1773
+ maxDepth: z.ZodNumber;
1774
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1775
+ exp: z.ZodNumber;
1776
+ }, z.core.$strip>>;
1777
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1778
+ envelopeId: z.ZodString;
1779
+ messageId: z.ZodString;
1780
+ sentAt: z.ZodNumber;
1781
+ stage: z.ZodEnum<{
1782
+ accepted: "accepted";
1783
+ relayed: "relayed";
1784
+ delivered: "delivered";
1785
+ held: "held";
1786
+ handed_to_agent: "handed_to_agent";
1787
+ read: "read";
1788
+ replied: "replied";
1789
+ rejected: "rejected";
1790
+ expired: "expired";
1791
+ }>;
1792
+ at: z.ZodNumber;
1793
+ }, z.core.$strip>>>;
1794
+ }, z.core.$strip>;
1795
+ };
1796
+ readonly "task.update": {
1797
+ readonly params: z.ZodObject<{
1798
+ key: z.ZodString;
1799
+ taskId: z.ZodString;
1800
+ state: z.ZodEnum<{
1801
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1802
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1803
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1804
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1805
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1806
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1807
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1808
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1809
+ }>;
1810
+ message: z.ZodOptional<z.ZodObject<{
1811
+ parts: z.ZodArray<z.ZodObject<{
1812
+ text: z.ZodOptional<z.ZodString>;
1813
+ raw: z.ZodOptional<z.ZodString>;
1814
+ url: z.ZodOptional<z.ZodString>;
1815
+ data: z.ZodOptional<z.ZodUnknown>;
1816
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1817
+ filename: z.ZodOptional<z.ZodString>;
1818
+ mediaType: z.ZodOptional<z.ZodString>;
1819
+ }, z.core.$strip>>;
1820
+ }, z.core.$strict>>;
1821
+ artifact: z.ZodOptional<z.ZodObject<{
1822
+ artifactId: z.ZodString;
1823
+ name: z.ZodOptional<z.ZodString>;
1824
+ description: z.ZodOptional<z.ZodString>;
1825
+ parts: z.ZodArray<z.ZodObject<{
1826
+ text: z.ZodOptional<z.ZodString>;
1827
+ raw: z.ZodOptional<z.ZodString>;
1828
+ url: z.ZodOptional<z.ZodString>;
1829
+ data: z.ZodOptional<z.ZodUnknown>;
1830
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1831
+ filename: z.ZodOptional<z.ZodString>;
1832
+ mediaType: z.ZodOptional<z.ZodString>;
1833
+ }, z.core.$strip>>;
1834
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1835
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1836
+ }, z.core.$strip>>;
1837
+ append: z.ZodOptional<z.ZodBoolean>;
1838
+ lastChunk: z.ZodOptional<z.ZodBoolean>;
1839
+ }, z.core.$strict>;
1840
+ readonly result: z.ZodObject<{
1841
+ task: z.ZodObject<{
1842
+ contextId: z.ZodOptional<z.ZodString>;
1843
+ status: z.ZodObject<{
1844
+ state: z.ZodEnum<{
1845
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1846
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1847
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1848
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1849
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1850
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1851
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1852
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1853
+ }>;
1854
+ message: z.ZodOptional<z.ZodObject<{
1855
+ messageId: z.ZodString;
1856
+ contextId: z.ZodOptional<z.ZodString>;
1857
+ taskId: z.ZodOptional<z.ZodString>;
1858
+ role: z.ZodEnum<{
1859
+ ROLE_USER: "ROLE_USER";
1860
+ ROLE_AGENT: "ROLE_AGENT";
1861
+ }>;
1862
+ parts: z.ZodArray<z.ZodObject<{
1863
+ text: z.ZodOptional<z.ZodString>;
1864
+ raw: z.ZodOptional<z.ZodString>;
1865
+ url: z.ZodOptional<z.ZodString>;
1866
+ data: z.ZodOptional<z.ZodUnknown>;
1867
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1868
+ filename: z.ZodOptional<z.ZodString>;
1869
+ mediaType: z.ZodOptional<z.ZodString>;
1870
+ }, z.core.$strip>>;
1871
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1872
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1873
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1874
+ }, z.core.$strip>>;
1875
+ timestamp: z.ZodOptional<z.ZodString>;
1876
+ }, z.core.$strip>;
1877
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1878
+ artifactId: z.ZodString;
1879
+ name: z.ZodOptional<z.ZodString>;
1880
+ description: z.ZodOptional<z.ZodString>;
1881
+ parts: z.ZodArray<z.ZodObject<{
1882
+ text: z.ZodOptional<z.ZodString>;
1883
+ raw: z.ZodOptional<z.ZodString>;
1884
+ url: z.ZodOptional<z.ZodString>;
1885
+ data: z.ZodOptional<z.ZodUnknown>;
1886
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1887
+ filename: z.ZodOptional<z.ZodString>;
1888
+ mediaType: z.ZodOptional<z.ZodString>;
1889
+ }, z.core.$strip>>;
1890
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1891
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1892
+ }, z.core.$strip>>>;
1893
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1894
+ messageId: z.ZodString;
1895
+ contextId: z.ZodOptional<z.ZodString>;
1896
+ taskId: z.ZodOptional<z.ZodString>;
1897
+ role: z.ZodEnum<{
1898
+ ROLE_USER: "ROLE_USER";
1899
+ ROLE_AGENT: "ROLE_AGENT";
1900
+ }>;
1901
+ parts: z.ZodArray<z.ZodObject<{
1902
+ text: z.ZodOptional<z.ZodString>;
1903
+ raw: z.ZodOptional<z.ZodString>;
1904
+ url: z.ZodOptional<z.ZodString>;
1905
+ data: z.ZodOptional<z.ZodUnknown>;
1906
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1907
+ filename: z.ZodOptional<z.ZodString>;
1908
+ mediaType: z.ZodOptional<z.ZodString>;
1909
+ }, z.core.$strip>>;
1910
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1911
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1912
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1913
+ }, z.core.$strip>>>;
1914
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1915
+ id: z.ZodString;
1916
+ }, z.core.$strip>;
1917
+ role: z.ZodEnum<{
1918
+ requester: "requester";
1919
+ executor: "executor";
1920
+ }>;
1921
+ key: z.ZodString;
1922
+ peer: z.ZodObject<{
1923
+ address: z.ZodString;
1924
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1925
+ agent: z.ZodOptional<z.ZodString>;
1926
+ device: z.ZodString;
1927
+ label: z.ZodString;
1928
+ }, z.core.$strip>;
1929
+ createdAt: z.ZodNumber;
1930
+ updatedAt: z.ZodNumber;
1931
+ chain: z.ZodOptional<z.ZodObject<{
1932
+ addresses: z.ZodArray<z.ZodString>;
1933
+ depth: z.ZodNumber;
1934
+ maxDepth: z.ZodNumber;
1935
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1936
+ exp: z.ZodNumber;
1937
+ }, z.core.$strip>>;
1938
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1939
+ envelopeId: z.ZodString;
1940
+ messageId: z.ZodString;
1941
+ sentAt: z.ZodNumber;
1942
+ stage: z.ZodEnum<{
1943
+ accepted: "accepted";
1944
+ relayed: "relayed";
1945
+ delivered: "delivered";
1946
+ held: "held";
1947
+ handed_to_agent: "handed_to_agent";
1948
+ read: "read";
1949
+ replied: "replied";
1950
+ rejected: "rejected";
1951
+ expired: "expired";
1952
+ }>;
1953
+ at: z.ZodNumber;
1954
+ }, z.core.$strip>>>;
1955
+ }, z.core.$strip>;
1956
+ };
1957
+ readonly "task.cancel": {
1958
+ readonly params: z.ZodObject<{
1959
+ key: z.ZodString;
1960
+ taskId: z.ZodString;
1961
+ reason: z.ZodOptional<z.ZodString>;
1962
+ }, z.core.$strict>;
1963
+ readonly result: z.ZodObject<{
1964
+ task: z.ZodObject<{
1965
+ contextId: z.ZodOptional<z.ZodString>;
1966
+ status: z.ZodObject<{
1967
+ state: z.ZodEnum<{
1968
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1969
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1970
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1971
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1972
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1973
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1974
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1975
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1976
+ }>;
1977
+ message: z.ZodOptional<z.ZodObject<{
1978
+ messageId: z.ZodString;
1979
+ contextId: z.ZodOptional<z.ZodString>;
1980
+ taskId: z.ZodOptional<z.ZodString>;
1981
+ role: z.ZodEnum<{
1982
+ ROLE_USER: "ROLE_USER";
1983
+ ROLE_AGENT: "ROLE_AGENT";
1984
+ }>;
1985
+ parts: z.ZodArray<z.ZodObject<{
1986
+ text: z.ZodOptional<z.ZodString>;
1987
+ raw: z.ZodOptional<z.ZodString>;
1988
+ url: z.ZodOptional<z.ZodString>;
1989
+ data: z.ZodOptional<z.ZodUnknown>;
1990
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1991
+ filename: z.ZodOptional<z.ZodString>;
1992
+ mediaType: z.ZodOptional<z.ZodString>;
1993
+ }, z.core.$strip>>;
1994
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1995
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1996
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1997
+ }, z.core.$strip>>;
1998
+ timestamp: z.ZodOptional<z.ZodString>;
1999
+ }, z.core.$strip>;
2000
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2001
+ artifactId: z.ZodString;
2002
+ name: z.ZodOptional<z.ZodString>;
2003
+ description: z.ZodOptional<z.ZodString>;
2004
+ parts: z.ZodArray<z.ZodObject<{
2005
+ text: z.ZodOptional<z.ZodString>;
2006
+ raw: z.ZodOptional<z.ZodString>;
2007
+ url: z.ZodOptional<z.ZodString>;
2008
+ data: z.ZodOptional<z.ZodUnknown>;
2009
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2010
+ filename: z.ZodOptional<z.ZodString>;
2011
+ mediaType: z.ZodOptional<z.ZodString>;
2012
+ }, z.core.$strip>>;
2013
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2014
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2015
+ }, z.core.$strip>>>;
2016
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
2017
+ messageId: z.ZodString;
2018
+ contextId: z.ZodOptional<z.ZodString>;
2019
+ taskId: z.ZodOptional<z.ZodString>;
2020
+ role: z.ZodEnum<{
2021
+ ROLE_USER: "ROLE_USER";
2022
+ ROLE_AGENT: "ROLE_AGENT";
2023
+ }>;
2024
+ parts: z.ZodArray<z.ZodObject<{
2025
+ text: z.ZodOptional<z.ZodString>;
2026
+ raw: z.ZodOptional<z.ZodString>;
2027
+ url: z.ZodOptional<z.ZodString>;
2028
+ data: z.ZodOptional<z.ZodUnknown>;
2029
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2030
+ filename: z.ZodOptional<z.ZodString>;
2031
+ mediaType: z.ZodOptional<z.ZodString>;
2032
+ }, z.core.$strip>>;
2033
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2034
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2035
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2036
+ }, z.core.$strip>>>;
2037
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2038
+ id: z.ZodString;
2039
+ }, z.core.$strip>;
2040
+ role: z.ZodEnum<{
2041
+ requester: "requester";
2042
+ executor: "executor";
2043
+ }>;
2044
+ key: z.ZodString;
2045
+ peer: z.ZodObject<{
2046
+ address: z.ZodString;
2047
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2048
+ agent: z.ZodOptional<z.ZodString>;
2049
+ device: z.ZodString;
2050
+ label: z.ZodString;
2051
+ }, z.core.$strip>;
2052
+ createdAt: z.ZodNumber;
2053
+ updatedAt: z.ZodNumber;
2054
+ chain: z.ZodOptional<z.ZodObject<{
2055
+ addresses: z.ZodArray<z.ZodString>;
2056
+ depth: z.ZodNumber;
2057
+ maxDepth: z.ZodNumber;
2058
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
2059
+ exp: z.ZodNumber;
2060
+ }, z.core.$strip>>;
2061
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
2062
+ envelopeId: z.ZodString;
2063
+ messageId: z.ZodString;
2064
+ sentAt: z.ZodNumber;
2065
+ stage: z.ZodEnum<{
2066
+ accepted: "accepted";
2067
+ relayed: "relayed";
2068
+ delivered: "delivered";
2069
+ held: "held";
2070
+ handed_to_agent: "handed_to_agent";
2071
+ read: "read";
2072
+ replied: "replied";
2073
+ rejected: "rejected";
2074
+ expired: "expired";
2075
+ }>;
2076
+ at: z.ZodNumber;
2077
+ }, z.core.$strip>>>;
2078
+ }, z.core.$strip>;
2079
+ };
2080
+ readonly "events.subscribe": {
2081
+ readonly params: z.ZodObject<{
2082
+ keys: z.ZodArray<z.ZodString>;
2083
+ }, z.core.$strict>;
2084
+ readonly result: z.ZodObject<{
2085
+ ok: z.ZodLiteral<true>;
2086
+ }, z.core.$strip>;
2087
+ };
2088
+ readonly "team.create": {
2089
+ readonly params: z.ZodObject<{
2090
+ name: z.ZodString;
2091
+ person: z.ZodString;
2092
+ label: z.ZodString;
2093
+ relay: z.ZodString;
2094
+ }, z.core.$strict>;
2095
+ readonly result: z.ZodObject<{
2096
+ team: z.ZodString;
2097
+ name: z.ZodString;
2098
+ machine: z.ZodString;
2099
+ }, z.core.$strip>;
2100
+ };
2101
+ readonly "team.invite": {
2102
+ readonly params: z.ZodObject<{
2103
+ person: z.ZodString;
2104
+ ttlMs: z.ZodOptional<z.ZodNumber>;
2105
+ }, z.core.$strict>;
2106
+ readonly result: z.ZodObject<{
2107
+ ticket: z.ZodString;
2108
+ inviteId: z.ZodString;
2109
+ expires: z.ZodNumber;
2110
+ }, z.core.$strip>;
2111
+ };
2112
+ readonly "team.join": {
2113
+ readonly params: z.ZodObject<{
2114
+ ticket: z.ZodString;
2115
+ label: z.ZodString;
2116
+ }, z.core.$strict>;
2117
+ readonly result: z.ZodObject<{
2118
+ team: z.ZodString;
2119
+ name: z.ZodString;
2120
+ machine: z.ZodString;
2121
+ person: z.ZodString;
2122
+ }, z.core.$strip>;
2123
+ };
2124
+ readonly "team.members": {
2125
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2126
+ readonly result: z.ZodObject<{
2127
+ team: z.ZodObject<{
2128
+ id: z.ZodString;
2129
+ name: z.ZodString;
2130
+ }, z.core.$strip>;
2131
+ members: z.ZodArray<z.ZodObject<{
2132
+ machine: z.ZodString;
2133
+ enc: z.ZodString;
2134
+ person: z.ZodString;
2135
+ role: z.ZodEnum<{
2136
+ admin: "admin";
2137
+ member: "member";
2138
+ }>;
2139
+ label: z.ZodString;
2140
+ self: z.ZodBoolean;
2141
+ online: z.ZodBoolean;
2142
+ }, z.core.$strip>>;
2143
+ invites: z.ZodArray<z.ZodObject<{
2144
+ inviteId: z.ZodString;
2145
+ person: z.ZodString;
2146
+ expires: z.ZodNumber;
2147
+ state: z.ZodEnum<{
2148
+ expired: "expired";
2149
+ open: "open";
2150
+ redeemed: "redeemed";
2151
+ revoked: "revoked";
2152
+ }>;
2153
+ }, z.core.$strip>>;
2154
+ }, z.core.$strip>;
2155
+ };
2156
+ readonly "team.remove": {
2157
+ readonly params: z.ZodObject<{
2158
+ machine: z.ZodString;
2159
+ reason: z.ZodOptional<z.ZodString>;
2160
+ }, z.core.$strict>;
2161
+ readonly result: z.ZodObject<{
2162
+ ok: z.ZodLiteral<true>;
2163
+ }, z.core.$strip>;
2164
+ };
2165
+ readonly "team.role": {
2166
+ readonly params: z.ZodObject<{
2167
+ machine: z.ZodString;
2168
+ role: z.ZodEnum<{
2169
+ admin: "admin";
2170
+ member: "member";
2171
+ }>;
2172
+ }, z.core.$strict>;
2173
+ readonly result: z.ZodObject<{
2174
+ ok: z.ZodLiteral<true>;
2175
+ }, z.core.$strip>;
2176
+ };
2177
+ readonly "team.revokeInvite": {
2178
+ readonly params: z.ZodObject<{
2179
+ inviteId: z.ZodString;
2180
+ }, z.core.$strict>;
2181
+ readonly result: z.ZodObject<{
2182
+ ok: z.ZodLiteral<true>;
2183
+ }, z.core.$strip>;
2184
+ };
2185
+ /**
2186
+ * Rotates this machine's encryption key (spec §4 `member.rekey`, §8.2). Returns the new public key
2187
+ * and when the previous one is dropped. Never a private key.
2188
+ */
2189
+ readonly "identity.rotateEnc": {
2190
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2191
+ readonly result: z.ZodObject<{
2192
+ enc: z.ZodString;
2193
+ until: z.ZodNumber;
2194
+ }, z.core.$strip>;
2195
+ };
2196
+ /**
2197
+ * Admin admits a machine by the public keys it showed. No invite seed. The joiner connects only after
2198
+ * this entry is on the roster (spec §4 `member.add`, §8.2).
2199
+ */
2200
+ readonly "team.add": {
2201
+ readonly params: z.ZodObject<{
2202
+ machine: z.ZodString;
2203
+ enc: z.ZodString;
2204
+ person: z.ZodString;
2205
+ label: z.ZodString;
2206
+ }, z.core.$strict>;
2207
+ readonly result: z.ZodObject<{
2208
+ ok: z.ZodLiteral<true>;
2209
+ }, z.core.$strip>;
2210
+ };
2211
+ /**
2212
+ * Joiner: generate keys and store them aside from `identity.json`, so the plugin does not treat the
2213
+ * machine as joined. Returns the public admit card. Private keys stay in the daemon.
2214
+ */
2215
+ readonly "team.pair": {
2216
+ readonly params: z.ZodObject<{
2217
+ relay: z.ZodString;
2218
+ team: z.ZodString;
2219
+ person: z.ZodString;
2220
+ label: z.ZodString;
2221
+ }, z.core.$strict>;
2222
+ readonly result: z.ZodObject<{
2223
+ machine: z.ZodString;
2224
+ enc: z.ZodString;
2225
+ person: z.ZodString;
2226
+ label: z.ZodString;
2227
+ admit: z.ZodString;
2228
+ }, z.core.$strip>;
2229
+ };
2230
+ /**
2231
+ * Joiner: try hello with the paired keys. `waiting` means the admin has not admitted this machine yet.
2232
+ * `joined` means the roster names these exact keys, person and label, and the daemon has adopted them.
2233
+ */
2234
+ readonly "team.claim": {
2235
+ readonly params: z.ZodObject<{
2236
+ waitMs: z.ZodOptional<z.ZodNumber>;
2237
+ }, z.core.$strict>;
2238
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2239
+ state: z.ZodLiteral<"waiting">;
2240
+ }, z.core.$strip>, z.ZodObject<{
2241
+ state: z.ZodLiteral<"joined">;
2242
+ team: z.ZodString;
2243
+ name: z.ZodString;
2244
+ machine: z.ZodString;
2245
+ person: z.ZodString;
2246
+ label: z.ZodString;
2247
+ }, z.core.$strip>], "state">;
2248
+ };
2249
+ /** Discard pending keys (a pairing or founding keys), including their private keys. */
2250
+ readonly "team.pairCancel": {
2251
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2252
+ readonly result: z.ZodObject<{
2253
+ ok: z.ZodLiteral<true>;
2254
+ }, z.core.$strip>;
2255
+ };
2256
+ /**
2257
+ * Founder: generate the keys `team.create` will use and store them aside from `identity.json`, so a
2258
+ * relay operator can list the machine id in `--allow-team-create` first. Returns the same public keys
2259
+ * while they are pending. Private keys stay in the daemon.
2260
+ */
2261
+ readonly "team.prepare": {
2262
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2263
+ readonly result: z.ZodObject<{
2264
+ machine: z.ZodString;
2265
+ enc: z.ZodString;
2266
+ }, z.core.$strip>;
2267
+ };
2268
+ /** Creates a channel with this person and `persons` (at most `LIMITS.channelPersons` together). */
2269
+ readonly "channel.create": {
2270
+ readonly params: z.ZodObject<{
2271
+ name: z.ZodString;
2272
+ persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
2273
+ }, z.core.$strict>;
2274
+ readonly result: z.ZodObject<{
2275
+ id: z.ZodString;
2276
+ name: z.ZodString;
2277
+ }, z.core.$strip>;
2278
+ };
2279
+ readonly "channel.invite": {
2280
+ readonly params: z.ZodObject<{
2281
+ name: z.ZodString;
2282
+ persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
2283
+ }, z.core.$strict>;
2284
+ readonly result: z.ZodObject<{
2285
+ ok: z.ZodLiteral<true>;
2286
+ }, z.core.$strip>;
2287
+ };
2288
+ readonly "channel.leave": {
2289
+ readonly params: z.ZodObject<{
2290
+ name: z.ZodString;
2291
+ }, z.core.$strict>;
2292
+ readonly result: z.ZodObject<{
2293
+ ok: z.ZodLiteral<true>;
2294
+ }, z.core.$strip>;
2295
+ };
2296
+ /** Removes other persons from a channel; only its creator or a team admin may (spec §6.8). */
2297
+ readonly "channel.remove": {
2298
+ readonly params: z.ZodObject<{
2299
+ name: z.ZodString;
2300
+ persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
2301
+ }, z.core.$strict>;
2302
+ readonly result: z.ZodObject<{
2303
+ ok: z.ZodLiteral<true>;
2304
+ }, z.core.$strip>;
2305
+ };
2306
+ readonly "device.status": {
2307
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2308
+ readonly result: z.ZodObject<{
2309
+ realm: z.ZodEnum<{
2310
+ roster: "roster";
2311
+ directory: "directory";
2312
+ }>;
2313
+ device: z.ZodOptional<z.ZodString>;
2314
+ binding: z.ZodEnum<{
2315
+ removed: "removed";
2316
+ none: "none";
2317
+ bound: "bound";
2318
+ "attest-due": "attest-due";
2319
+ replace: "replace";
2320
+ }>;
2321
+ person: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
2322
+ label: z.ZodOptional<z.ZodString>;
2323
+ sth: z.ZodOptional<z.ZodObject<{
2324
+ size: z.ZodNumber;
2325
+ root: z.ZodString;
2326
+ ts: z.ZodNumber;
2327
+ }, z.core.$strip>>;
2328
+ alarm: z.ZodOptional<z.ZodObject<{
2329
+ kind: z.ZodEnum<{
2330
+ directory: "directory";
2331
+ restored: "restored";
2332
+ }>;
2333
+ reason: z.ZodString;
2334
+ at: z.ZodNumber;
2335
+ }, z.core.$strip>>;
2336
+ }, z.core.$strip>;
2337
+ };
2338
+ readonly "device.bind": {
2339
+ readonly params: z.ZodObject<{
2340
+ token: z.ZodString;
2341
+ label: z.ZodOptional<z.ZodString>;
2342
+ kind: z.ZodOptional<z.ZodEnum<{
2343
+ "jelly-host": "jelly-host";
2344
+ laptop: "laptop";
2345
+ server: "server";
2346
+ other: "other";
2347
+ }>>;
2348
+ }, z.core.$strict>;
2349
+ readonly result: z.ZodObject<{
2350
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2351
+ device: z.ZodString;
2352
+ seq: z.ZodNumber;
2353
+ }, z.core.$strip>;
2354
+ };
2355
+ readonly "device.list": {
2356
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2357
+ readonly result: z.ZodObject<{
2358
+ devices: z.ZodArray<z.ZodObject<{
2359
+ device: z.ZodString;
2360
+ label: z.ZodString;
2361
+ kind: z.ZodOptional<z.ZodEnum<{
2362
+ "jelly-host": "jelly-host";
2363
+ laptop: "laptop";
2364
+ server: "server";
2365
+ other: "other";
2366
+ }>>;
2367
+ vouched: z.ZodEnum<{
2368
+ admin: "admin";
2369
+ device: "device";
2370
+ jelly: "jelly";
2371
+ }>;
2372
+ via: z.ZodOptional<z.ZodEnum<{
2373
+ host: "host";
2374
+ browser: "browser";
2375
+ }>>;
2376
+ current: z.ZodBoolean;
2377
+ self: z.ZodBoolean;
2378
+ since: z.ZodOptional<z.ZodNumber>;
2379
+ unbound: z.ZodOptional<z.ZodObject<{
2380
+ at: z.ZodNumber;
2381
+ reason: z.ZodEnum<{
2382
+ self: "self";
2383
+ removed: "removed";
2384
+ lost: "lost";
2385
+ replaced: "replaced";
2386
+ account_deleted: "account_deleted";
2387
+ }>;
2388
+ by: z.ZodString;
2389
+ }, z.core.$strip>>;
2390
+ }, z.core.$strip>>;
2391
+ }, z.core.$strip>;
2392
+ };
2393
+ readonly "device.remove": {
2394
+ readonly params: z.ZodObject<{
2395
+ device: z.ZodString;
2396
+ reason: z.ZodOptional<z.ZodEnum<{
2397
+ self: "self";
2398
+ removed: "removed";
2399
+ lost: "lost";
2400
+ }>>;
2401
+ token: z.ZodOptional<z.ZodString>;
2402
+ }, z.core.$strict>;
2403
+ readonly result: z.ZodObject<{
2404
+ seq: z.ZodNumber;
2405
+ }, z.core.$strip>;
2406
+ };
2407
+ readonly "device.link": {
2408
+ readonly params: z.ZodObject<{
2409
+ label: z.ZodOptional<z.ZodString>;
2410
+ kind: z.ZodOptional<z.ZodEnum<{
2411
+ "jelly-host": "jelly-host";
2412
+ laptop: "laptop";
2413
+ server: "server";
2414
+ other: "other";
2415
+ }>>;
2416
+ }, z.core.$strict>;
2417
+ readonly result: z.ZodObject<{
2418
+ link: z.ZodString;
2419
+ sas: z.ZodString;
2420
+ expires: z.ZodNumber;
2421
+ }, z.core.$strip>;
2422
+ };
2423
+ readonly "device.login": {
2424
+ readonly params: z.ZodObject<{
2425
+ label: z.ZodOptional<z.ZodString>;
2426
+ kind: z.ZodOptional<z.ZodEnum<{
2427
+ laptop: "laptop";
2428
+ server: "server";
2429
+ other: "other";
2430
+ }>>;
2431
+ remove: z.ZodOptional<z.ZodObject<{
2432
+ device: z.ZodString;
2433
+ reason: z.ZodOptional<z.ZodEnum<{
2434
+ removed: "removed";
2435
+ lost: "lost";
2436
+ }>>;
2437
+ }, z.core.$strict>>;
2438
+ }, z.core.$strict>;
2439
+ readonly result: z.ZodObject<{
2440
+ verificationUri: z.ZodString;
2441
+ userCode: z.ZodString;
2442
+ fingerprint: z.ZodString;
2443
+ expires: z.ZodNumber;
2444
+ purpose: z.ZodEnum<{
2445
+ bind: "bind";
2446
+ replace: "replace";
2447
+ remove: "remove";
2448
+ erase: "erase";
2449
+ }>;
2450
+ interval: z.ZodNumber;
2451
+ }, z.core.$strip>;
2452
+ };
2453
+ readonly "device.login.status": {
2454
+ readonly params: z.ZodObject<{
2455
+ waitMs: z.ZodOptional<z.ZodNumber>;
2456
+ }, z.core.$strict>;
2457
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2458
+ state: z.ZodLiteral<"idle">;
2459
+ }, z.core.$strip>, z.ZodObject<{
2460
+ verificationUri: z.ZodString;
2461
+ userCode: z.ZodString;
2462
+ fingerprint: z.ZodString;
2463
+ expires: z.ZodNumber;
2464
+ state: z.ZodLiteral<"pending">;
2465
+ purpose: z.ZodEnum<{
2466
+ bind: "bind";
2467
+ replace: "replace";
2468
+ remove: "remove";
2469
+ erase: "erase";
2470
+ }>;
2471
+ }, z.core.$strip>, z.ZodObject<{
2472
+ state: z.ZodLiteral<"done">;
2473
+ purpose: z.ZodEnum<{
2474
+ bind: "bind";
2475
+ replace: "replace";
2476
+ remove: "remove";
2477
+ erase: "erase";
2478
+ }>;
2479
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2480
+ device: z.ZodString;
2481
+ seq: z.ZodNumber;
2482
+ }, z.core.$strip>, z.ZodObject<{
2483
+ state: z.ZodLiteral<"failed">;
2484
+ purpose: z.ZodEnum<{
2485
+ bind: "bind";
2486
+ replace: "replace";
2487
+ remove: "remove";
2488
+ erase: "erase";
2489
+ }>;
2490
+ code: z.ZodEnum<{
2491
+ expired: "expired";
2492
+ invalid_request: "invalid_request";
2493
+ not_member: "not_member";
2494
+ bad_signature: "bad_signature";
2495
+ unknown_session: "unknown_session";
2496
+ ambiguous_address: "ambiguous_address";
2497
+ no_recipients: "no_recipients";
2498
+ unknown_address: "unknown_address";
2499
+ refused: "refused";
2500
+ declined: "declined";
2501
+ request_required: "request_required";
2502
+ rate_limited: "rate_limited";
2503
+ loop_guard: "loop_guard";
2504
+ too_large: "too_large";
2505
+ secret_refused: "secret_refused";
2506
+ duplicate: "duplicate";
2507
+ relay_unavailable: "relay_unavailable";
2508
+ not_found: "not_found";
2509
+ invalid_state: "invalid_state";
2510
+ forbidden: "forbidden";
2511
+ guarded_turn: "guarded_turn";
2512
+ roster_conflict: "roster_conflict";
2513
+ invite_invalid: "invite_invalid";
2514
+ no_identity: "no_identity";
2515
+ binding_invalid: "binding_invalid";
2516
+ jelly_unavailable: "jelly_unavailable";
2517
+ log_conflict: "log_conflict";
2518
+ device_limit: "device_limit";
2519
+ admission_required: "admission_required";
2520
+ admission_invalid: "admission_invalid";
2521
+ directory_inconsistent: "directory_inconsistent";
2522
+ unknown_device: "unknown_device";
2523
+ directory_unavailable: "directory_unavailable";
2524
+ login_unsupported: "login_unsupported";
2525
+ login_denied: "login_denied";
2526
+ grant_required: "grant_required";
2527
+ grant_invalid: "grant_invalid";
2528
+ ticket_required: "ticket_required";
2529
+ ticket_invalid: "ticket_invalid";
2530
+ daemon_unavailable: "daemon_unavailable";
2531
+ daemon_mismatch: "daemon_mismatch";
2532
+ internal: "internal";
2533
+ }>;
2534
+ message: z.ZodString;
2535
+ }, z.core.$strip>, z.ZodObject<{
2536
+ state: z.ZodLiteral<"cancelled">;
2537
+ purpose: z.ZodEnum<{
2538
+ bind: "bind";
2539
+ replace: "replace";
2540
+ remove: "remove";
2541
+ erase: "erase";
2542
+ }>;
2543
+ }, z.core.$strip>], "state">;
2544
+ };
2545
+ readonly "device.login.cancel": {
2546
+ readonly params: z.ZodObject<{}, z.core.$strict>;
2547
+ readonly result: z.ZodObject<{
2548
+ ok: z.ZodLiteral<true>;
2549
+ }, z.core.$strip>;
2550
+ };
2551
+ readonly "device.approve.preview": {
2552
+ readonly params: z.ZodObject<{
2553
+ link: z.ZodString;
2554
+ sas: z.ZodOptional<z.ZodString>;
2555
+ }, z.core.$strict>;
2556
+ readonly result: z.ZodObject<{
2557
+ device: z.ZodString;
2558
+ label: z.ZodString;
2559
+ kind: z.ZodEnum<{
2560
+ "jelly-host": "jelly-host";
2561
+ laptop: "laptop";
2562
+ server: "server";
2563
+ other: "other";
2564
+ }>;
2565
+ sas: z.ZodString;
2566
+ }, z.core.$strip>;
2567
+ };
2568
+ readonly "device.approve": {
2569
+ readonly params: z.ZodObject<{
2570
+ link: z.ZodString;
2571
+ sas: z.ZodString;
2572
+ }, z.core.$strict>;
2573
+ readonly result: z.ZodObject<{
2574
+ device: z.ZodString;
2575
+ seq: z.ZodNumber;
2576
+ }, z.core.$strip>;
2577
+ };
2578
+ readonly "identity.replace": {
2579
+ readonly params: z.ZodObject<{
2580
+ token: z.ZodOptional<z.ZodString>;
2581
+ label: z.ZodOptional<z.ZodString>;
2582
+ }, z.core.$strict>;
2583
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2584
+ state: z.ZodLiteral<"done">;
2585
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2586
+ device: z.ZodString;
2587
+ predecessor: z.ZodString;
2588
+ seq: z.ZodNumber;
2589
+ }, z.core.$strip>, z.ZodObject<{
2590
+ state: z.ZodLiteral<"token">;
2591
+ device: z.ZodString;
2592
+ }, z.core.$strip>, z.ZodObject<{
2593
+ verificationUri: z.ZodString;
2594
+ userCode: z.ZodString;
2595
+ fingerprint: z.ZodString;
2596
+ expires: z.ZodNumber;
2597
+ state: z.ZodLiteral<"sign-in">;
2598
+ purpose: z.ZodEnum<{
2599
+ bind: "bind";
2600
+ replace: "replace";
2601
+ remove: "remove";
2602
+ erase: "erase";
2603
+ }>;
2604
+ interval: z.ZodNumber;
2605
+ device: z.ZodString;
2606
+ }, z.core.$strip>], "state">;
2607
+ };
2608
+ readonly "identity.replace.preview": {
2609
+ readonly params: z.ZodObject<{
2610
+ token: z.ZodOptional<z.ZodString>;
2611
+ label: z.ZodOptional<z.ZodString>;
2612
+ }, z.core.$strict>;
2613
+ readonly result: z.ZodObject<{
2614
+ predecessor: z.ZodObject<{
2615
+ device: z.ZodString;
2616
+ label: z.ZodString;
2617
+ kind: z.ZodOptional<z.ZodEnum<{
2618
+ "jelly-host": "jelly-host";
2619
+ laptop: "laptop";
2620
+ server: "server";
2621
+ other: "other";
2622
+ }>>;
2623
+ vouch: z.ZodEnum<{
2624
+ device: "device";
2625
+ jelly: "jelly";
2626
+ }>;
2627
+ via: z.ZodOptional<z.ZodEnum<{
2628
+ host: "host";
2629
+ browser: "browser";
2630
+ }>>;
2631
+ since: z.ZodOptional<z.ZodNumber>;
2632
+ current: z.ZodBoolean;
2633
+ }, z.core.$strip>;
2634
+ alarm: z.ZodNullable<z.ZodEnum<{
2635
+ restored: "restored";
2636
+ keys_missing: "keys_missing";
2637
+ }>>;
2638
+ device: z.ZodOptional<z.ZodString>;
2639
+ signIns: z.ZodNumber;
2640
+ sentence: z.ZodString;
2641
+ }, z.core.$strip>;
2642
+ };
2643
+ readonly "directory.erase": {
2644
+ readonly params: z.ZodObject<{
2645
+ token: z.ZodOptional<z.ZodString>;
2646
+ }, z.core.$strict>;
2647
+ readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2648
+ state: z.ZodLiteral<"done">;
2649
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2650
+ devices: z.ZodNumber;
2651
+ }, z.core.$strip>, z.ZodObject<{
2652
+ verificationUri: z.ZodString;
2653
+ userCode: z.ZodString;
2654
+ fingerprint: z.ZodString;
2655
+ expires: z.ZodNumber;
2656
+ state: z.ZodLiteral<"sign-in">;
2657
+ purpose: z.ZodEnum<{
2658
+ bind: "bind";
2659
+ replace: "replace";
2660
+ remove: "remove";
2661
+ erase: "erase";
2662
+ }>;
2663
+ interval: z.ZodNumber;
2664
+ }, z.core.$strip>], "state">;
2665
+ };
2666
+ readonly "directory.erase.preview": {
2667
+ readonly params: z.ZodObject<{
2668
+ token: z.ZodOptional<z.ZodString>;
2669
+ }, z.core.$strict>;
2670
+ readonly result: z.ZodObject<{
2671
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2672
+ devices: z.ZodArray<z.ZodObject<{
2673
+ device: z.ZodString;
2674
+ label: z.ZodString;
2675
+ kind: z.ZodOptional<z.ZodEnum<{
2676
+ "jelly-host": "jelly-host";
2677
+ laptop: "laptop";
2678
+ server: "server";
2679
+ other: "other";
2680
+ }>>;
2681
+ self: z.ZodBoolean;
2682
+ }, z.core.$strip>>;
2683
+ signIns: z.ZodNumber;
2684
+ perDay: z.ZodNumber;
2685
+ lost: z.ZodArray<z.ZodString>;
2686
+ kept: z.ZodArray<z.ZodString>;
2687
+ }, z.core.$strip>;
2688
+ };
2689
+ };
2690
+ export type IpcMethods = typeof IPC_METHODS;
2691
+ export type IpcMethod = keyof IpcMethods;
2692
+ export type IpcParams<M extends IpcMethod> = z.input<IpcMethods[M]["params"]>;
2693
+ export type IpcResult<M extends IpcMethod> = z.infer<IpcMethods[M]["result"]>;
2694
+ /**
2695
+ * The agent tier (design §7.5): the methods an agent-facing client may call, and exactly what the
2696
+ * daemon serves on `run/agent.sock` (spec §8.2). Anything else is for human clients, on
2697
+ * `run/admin.sock`: the `messaging` CLI and the `/messaging` TUI.
2698
+ */
2699
+ export declare const AGENT_METHODS: readonly ["daemon.status", "daemon.health", "device.status", "device.bind", "session.register", "session.update", "session.unregister", "events.subscribe", "contacts.list", "msg.send", "inbox.list", "inbox.get", "inbox.ack", "item.read", "conv.read", "search", "task.list", "task.get", "task.update", "task.cancel"];
2700
+ export type AgentMethod = (typeof AGENT_METHODS)[number];
2701
+ /**
2702
+ * The human tier (design §7.5): methods that act as the person, on `run/admin.sock` only: their
2703
+ * conversations and own lines, the people of the realm, their grants and held requests (spec §6.9), and channels.
2704
+ * `conv.read` is in both tiers.
2705
+ */
2706
+ export declare const HUMAN_METHODS: readonly ["conv.list", "conv.read", "conv.markRead", "conv.subscribe", "person.send", "people.search", "people.get", "grant.list", "grant.set", "grant.set.preview", "request.list", "request.answer", "request.answer.preview", "contact.request", "contact.request.preview", "card.get", "agents.list", "agents.read", "notice.subscribe", "notice.list", "notice.ack", "device.approve.preview", "device.remove.preview", "identity.replace.preview", "directory.erase.preview", "channel.create", "channel.invite", "channel.leave", "channel.remove"];
2707
+ export type HumanMethod = (typeof HUMAN_METHODS)[number];
2708
+ /**
2709
+ * The admin tier (design §7.5): this device and the daemon, and in a roster realm the team, on
2710
+ * `run/admin.sock` only.
2711
+ */
2712
+ export declare const ADMIN_METHODS: readonly ["daemon.stop", "daemon.woke", "person.attached", "daemon.snapshot", "wake.arm", "wake.disarm", "device.list", "device.remove", "device.link", "device.login", "device.login.status", "device.login.cancel", "device.approve", "identity.rotateEnc", "identity.replace", "directory.erase", "team.create", "team.invite", "team.join", "team.members", "team.remove", "team.role", "team.revokeInvite", "team.add", "team.pair", "team.claim", "team.pairCancel", "team.prepare"];
2713
+ export type AdminMethod = (typeof ADMIN_METHODS)[number];
2714
+ /**
2715
+ * What a host-scope action grant (`act: "host"`) allows in `deployment: "jelly"` (spec §8.11), and nothing else: the
2716
+ * notice stream and its counts, `conv.list` with counts only, stopping the daemon, and telling it the host woke
2717
+ * (`daemon.woke`) and whether the person is at it (`person.attached`), a backup of the home (`daemon.snapshot`), and its
2718
+ * wake ticket (`wake.arm`, `wake.disarm`).
2719
+ */
2720
+ export declare const HOST_SCOPE_METHODS: readonly ["notice.subscribe", "notice.list", "conv.list", "daemon.stop", "daemon.woke", "person.attached", "daemon.snapshot", "wake.arm", "wake.disarm"];
2721
+ export declare const IpcEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2722
+ type: z.ZodLiteral<"inbox">;
2723
+ key: z.ZodString;
2724
+ item: z.ZodObject<{
2725
+ id: z.ZodString;
2726
+ key: z.ZodString;
2727
+ from: z.ZodObject<{
2728
+ address: z.ZodString;
2729
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2730
+ agent: z.ZodOptional<z.ZodString>;
2731
+ device: z.ZodString;
2732
+ label: z.ZodString;
2733
+ }, z.core.$strip>;
2734
+ kind: z.ZodEnum<{
2735
+ message: "message";
2736
+ task: "task";
2737
+ }>;
2738
+ messageId: z.ZodString;
2739
+ taskId: z.ZodOptional<z.ZodString>;
2740
+ contextId: z.ZodOptional<z.ZodString>;
2741
+ replyTo: z.ZodOptional<z.ZodString>;
2742
+ receivedAt: z.ZodNumber;
2743
+ stage: z.ZodEnum<{
2744
+ delivered: "delivered";
2745
+ handed_to_agent: "handed_to_agent";
2746
+ read: "read";
2747
+ }>;
2748
+ bytes: z.ZodNumber;
2749
+ preview: z.ZodString;
2750
+ wake: z.ZodBoolean;
2751
+ chain: z.ZodOptional<z.ZodObject<{
2752
+ addresses: z.ZodArray<z.ZodString>;
2753
+ depth: z.ZodNumber;
2754
+ maxDepth: z.ZodNumber;
2755
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
2756
+ exp: z.ZodNumber;
2757
+ }, z.core.$strip>>;
2758
+ consent: z.ZodOptional<z.ZodEnum<{
2759
+ self: "self";
2760
+ guarded: "guarded";
2761
+ trusted: "trusted";
2762
+ }>>;
2763
+ }, z.core.$strip>;
2764
+ }, z.core.$strip>, z.ZodObject<{
2765
+ type: z.ZodLiteral<"receipt">;
2766
+ key: z.ZodString;
2767
+ envelopeId: z.ZodString;
2768
+ to: z.ZodString;
2769
+ stage: z.ZodEnum<{
2770
+ accepted: "accepted";
2771
+ relayed: "relayed";
2772
+ delivered: "delivered";
2773
+ held: "held";
2774
+ handed_to_agent: "handed_to_agent";
2775
+ read: "read";
2776
+ replied: "replied";
2777
+ rejected: "rejected";
2778
+ expired: "expired";
2779
+ }>;
2780
+ code: z.ZodOptional<z.ZodEnum<{
2781
+ expired: "expired";
2782
+ invalid_request: "invalid_request";
2783
+ not_member: "not_member";
2784
+ bad_signature: "bad_signature";
2785
+ unknown_session: "unknown_session";
2786
+ ambiguous_address: "ambiguous_address";
2787
+ no_recipients: "no_recipients";
2788
+ unknown_address: "unknown_address";
2789
+ refused: "refused";
2790
+ declined: "declined";
2791
+ request_required: "request_required";
2792
+ rate_limited: "rate_limited";
2793
+ loop_guard: "loop_guard";
2794
+ too_large: "too_large";
2795
+ secret_refused: "secret_refused";
2796
+ duplicate: "duplicate";
2797
+ relay_unavailable: "relay_unavailable";
2798
+ not_found: "not_found";
2799
+ invalid_state: "invalid_state";
2800
+ forbidden: "forbidden";
2801
+ guarded_turn: "guarded_turn";
2802
+ roster_conflict: "roster_conflict";
2803
+ invite_invalid: "invite_invalid";
2804
+ no_identity: "no_identity";
2805
+ binding_invalid: "binding_invalid";
2806
+ jelly_unavailable: "jelly_unavailable";
2807
+ log_conflict: "log_conflict";
2808
+ device_limit: "device_limit";
2809
+ admission_required: "admission_required";
2810
+ admission_invalid: "admission_invalid";
2811
+ directory_inconsistent: "directory_inconsistent";
2812
+ unknown_device: "unknown_device";
2813
+ directory_unavailable: "directory_unavailable";
2814
+ login_unsupported: "login_unsupported";
2815
+ login_denied: "login_denied";
2816
+ grant_required: "grant_required";
2817
+ grant_invalid: "grant_invalid";
2818
+ ticket_required: "ticket_required";
2819
+ ticket_invalid: "ticket_invalid";
2820
+ daemon_unavailable: "daemon_unavailable";
2821
+ daemon_mismatch: "daemon_mismatch";
2822
+ internal: "internal";
2823
+ }>>;
2824
+ }, z.core.$strip>, z.ZodObject<{
2825
+ type: z.ZodLiteral<"task">;
2826
+ key: z.ZodString;
2827
+ record: z.ZodObject<{
2828
+ task: z.ZodObject<{
2829
+ contextId: z.ZodOptional<z.ZodString>;
2830
+ status: z.ZodObject<{
2831
+ state: z.ZodEnum<{
2832
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2833
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2834
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2835
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2836
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2837
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2838
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2839
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2840
+ }>;
2841
+ message: z.ZodOptional<z.ZodObject<{
2842
+ messageId: z.ZodString;
2843
+ contextId: z.ZodOptional<z.ZodString>;
2844
+ taskId: z.ZodOptional<z.ZodString>;
2845
+ role: z.ZodEnum<{
2846
+ ROLE_USER: "ROLE_USER";
2847
+ ROLE_AGENT: "ROLE_AGENT";
2848
+ }>;
2849
+ parts: z.ZodArray<z.ZodObject<{
2850
+ text: z.ZodOptional<z.ZodString>;
2851
+ raw: z.ZodOptional<z.ZodString>;
2852
+ url: z.ZodOptional<z.ZodString>;
2853
+ data: z.ZodOptional<z.ZodUnknown>;
2854
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2855
+ filename: z.ZodOptional<z.ZodString>;
2856
+ mediaType: z.ZodOptional<z.ZodString>;
2857
+ }, z.core.$strip>>;
2858
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2859
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2860
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2861
+ }, z.core.$strip>>;
2862
+ timestamp: z.ZodOptional<z.ZodString>;
2863
+ }, z.core.$strip>;
2864
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2865
+ artifactId: z.ZodString;
2866
+ name: z.ZodOptional<z.ZodString>;
2867
+ description: z.ZodOptional<z.ZodString>;
2868
+ parts: z.ZodArray<z.ZodObject<{
2869
+ text: z.ZodOptional<z.ZodString>;
2870
+ raw: z.ZodOptional<z.ZodString>;
2871
+ url: z.ZodOptional<z.ZodString>;
2872
+ data: z.ZodOptional<z.ZodUnknown>;
2873
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2874
+ filename: z.ZodOptional<z.ZodString>;
2875
+ mediaType: z.ZodOptional<z.ZodString>;
2876
+ }, z.core.$strip>>;
2877
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2878
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2879
+ }, z.core.$strip>>>;
2880
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
2881
+ messageId: z.ZodString;
2882
+ contextId: z.ZodOptional<z.ZodString>;
2883
+ taskId: z.ZodOptional<z.ZodString>;
2884
+ role: z.ZodEnum<{
2885
+ ROLE_USER: "ROLE_USER";
2886
+ ROLE_AGENT: "ROLE_AGENT";
2887
+ }>;
2888
+ parts: z.ZodArray<z.ZodObject<{
2889
+ text: z.ZodOptional<z.ZodString>;
2890
+ raw: z.ZodOptional<z.ZodString>;
2891
+ url: z.ZodOptional<z.ZodString>;
2892
+ data: z.ZodOptional<z.ZodUnknown>;
2893
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2894
+ filename: z.ZodOptional<z.ZodString>;
2895
+ mediaType: z.ZodOptional<z.ZodString>;
2896
+ }, z.core.$strip>>;
2897
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2898
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2899
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2900
+ }, z.core.$strip>>>;
2901
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2902
+ id: z.ZodString;
2903
+ }, z.core.$strip>;
2904
+ role: z.ZodEnum<{
2905
+ requester: "requester";
2906
+ executor: "executor";
2907
+ }>;
2908
+ key: z.ZodString;
2909
+ peer: z.ZodObject<{
2910
+ address: z.ZodString;
2911
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
2912
+ agent: z.ZodOptional<z.ZodString>;
2913
+ device: z.ZodString;
2914
+ label: z.ZodString;
2915
+ }, z.core.$strip>;
2916
+ createdAt: z.ZodNumber;
2917
+ updatedAt: z.ZodNumber;
2918
+ chain: z.ZodOptional<z.ZodObject<{
2919
+ addresses: z.ZodArray<z.ZodString>;
2920
+ depth: z.ZodNumber;
2921
+ maxDepth: z.ZodNumber;
2922
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
2923
+ exp: z.ZodNumber;
2924
+ }, z.core.$strip>>;
2925
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
2926
+ envelopeId: z.ZodString;
2927
+ messageId: z.ZodString;
2928
+ sentAt: z.ZodNumber;
2929
+ stage: z.ZodEnum<{
2930
+ accepted: "accepted";
2931
+ relayed: "relayed";
2932
+ delivered: "delivered";
2933
+ held: "held";
2934
+ handed_to_agent: "handed_to_agent";
2935
+ read: "read";
2936
+ replied: "replied";
2937
+ rejected: "rejected";
2938
+ expired: "expired";
2939
+ }>;
2940
+ at: z.ZodNumber;
2941
+ }, z.core.$strip>>>;
2942
+ }, z.core.$strip>;
2943
+ origin: z.ZodEnum<{
2944
+ peer: "peer";
2945
+ local: "local";
2946
+ }>;
2947
+ update: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2948
+ status: z.ZodObject<{
2949
+ state: z.ZodEnum<{
2950
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2951
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2952
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2953
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2954
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2955
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2956
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2957
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2958
+ }>;
2959
+ message: z.ZodOptional<z.ZodObject<{
2960
+ messageId: z.ZodString;
2961
+ contextId: z.ZodOptional<z.ZodString>;
2962
+ taskId: z.ZodOptional<z.ZodString>;
2963
+ role: z.ZodEnum<{
2964
+ ROLE_USER: "ROLE_USER";
2965
+ ROLE_AGENT: "ROLE_AGENT";
2966
+ }>;
2967
+ parts: z.ZodArray<z.ZodObject<{
2968
+ text: z.ZodOptional<z.ZodString>;
2969
+ raw: z.ZodOptional<z.ZodString>;
2970
+ url: z.ZodOptional<z.ZodString>;
2971
+ data: z.ZodOptional<z.ZodUnknown>;
2972
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2973
+ filename: z.ZodOptional<z.ZodString>;
2974
+ mediaType: z.ZodOptional<z.ZodString>;
2975
+ }, z.core.$strip>>;
2976
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2977
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2978
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2979
+ }, z.core.$strip>>;
2980
+ timestamp: z.ZodOptional<z.ZodString>;
2981
+ }, z.core.$strip>;
2982
+ }, z.core.$strip>, z.ZodObject<{
2983
+ artifact: z.ZodObject<{
2984
+ artifactId: z.ZodString;
2985
+ name: z.ZodOptional<z.ZodString>;
2986
+ description: z.ZodOptional<z.ZodString>;
2987
+ parts: z.ZodArray<z.ZodObject<{
2988
+ text: z.ZodOptional<z.ZodString>;
2989
+ raw: z.ZodOptional<z.ZodString>;
2990
+ url: z.ZodOptional<z.ZodString>;
2991
+ data: z.ZodOptional<z.ZodUnknown>;
2992
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2993
+ filename: z.ZodOptional<z.ZodString>;
2994
+ mediaType: z.ZodOptional<z.ZodString>;
2995
+ }, z.core.$strip>>;
2996
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2997
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2998
+ }, z.core.$strip>;
2999
+ append: z.ZodOptional<z.ZodBoolean>;
3000
+ lastChunk: z.ZodOptional<z.ZodBoolean>;
3001
+ }, z.core.$strip>]>>;
3002
+ }, z.core.$strip>, z.ZodObject<{
3003
+ type: z.ZodLiteral<"contacts">;
3004
+ }, z.core.$strip>, z.ZodObject<{
3005
+ type: z.ZodLiteral<"relay">;
3006
+ connected: z.ZodBoolean;
3007
+ }, z.core.$strip>, z.ZodObject<{
3008
+ type: z.ZodLiteral<"conv">;
3009
+ conversation: z.ZodString;
3010
+ id: z.ZodString;
3011
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
3012
+ seq: z.ZodNumber;
3013
+ }, z.core.$strip>, z.ZodObject<{
3014
+ type: z.ZodLiteral<"login">;
3015
+ state: z.ZodEnum<{
3016
+ pending: "pending";
3017
+ done: "done";
3018
+ failed: "failed";
3019
+ cancelled: "cancelled";
3020
+ }>;
3021
+ purpose: z.ZodEnum<{
3022
+ bind: "bind";
3023
+ replace: "replace";
3024
+ remove: "remove";
3025
+ erase: "erase";
3026
+ }>;
3027
+ code: z.ZodOptional<z.ZodEnum<{
3028
+ expired: "expired";
3029
+ invalid_request: "invalid_request";
3030
+ not_member: "not_member";
3031
+ bad_signature: "bad_signature";
3032
+ unknown_session: "unknown_session";
3033
+ ambiguous_address: "ambiguous_address";
3034
+ no_recipients: "no_recipients";
3035
+ unknown_address: "unknown_address";
3036
+ refused: "refused";
3037
+ declined: "declined";
3038
+ request_required: "request_required";
3039
+ rate_limited: "rate_limited";
3040
+ loop_guard: "loop_guard";
3041
+ too_large: "too_large";
3042
+ secret_refused: "secret_refused";
3043
+ duplicate: "duplicate";
3044
+ relay_unavailable: "relay_unavailable";
3045
+ not_found: "not_found";
3046
+ invalid_state: "invalid_state";
3047
+ forbidden: "forbidden";
3048
+ guarded_turn: "guarded_turn";
3049
+ roster_conflict: "roster_conflict";
3050
+ invite_invalid: "invite_invalid";
3051
+ no_identity: "no_identity";
3052
+ binding_invalid: "binding_invalid";
3053
+ jelly_unavailable: "jelly_unavailable";
3054
+ log_conflict: "log_conflict";
3055
+ device_limit: "device_limit";
3056
+ admission_required: "admission_required";
3057
+ admission_invalid: "admission_invalid";
3058
+ directory_inconsistent: "directory_inconsistent";
3059
+ unknown_device: "unknown_device";
3060
+ directory_unavailable: "directory_unavailable";
3061
+ login_unsupported: "login_unsupported";
3062
+ login_denied: "login_denied";
3063
+ grant_required: "grant_required";
3064
+ grant_invalid: "grant_invalid";
3065
+ ticket_required: "ticket_required";
3066
+ ticket_invalid: "ticket_invalid";
3067
+ daemon_unavailable: "daemon_unavailable";
3068
+ daemon_mismatch: "daemon_mismatch";
3069
+ internal: "internal";
3070
+ }>>;
3071
+ }, z.core.$strip>, z.ZodObject<{
3072
+ type: z.ZodLiteral<"notice">;
3073
+ notice: z.ZodObject<{
3074
+ id: z.ZodString;
3075
+ category: z.ZodEnum<{
3076
+ message: "message";
3077
+ request: "request";
3078
+ alert: "alert";
3079
+ }>;
3080
+ conversation: z.ZodOptional<z.ZodString>;
3081
+ from: z.ZodOptional<z.ZodObject<{
3082
+ name: z.ZodString;
3083
+ email: z.ZodOptional<z.ZodString>;
3084
+ org: z.ZodEnum<{
3085
+ other: "other";
3086
+ none: "none";
3087
+ same: "same";
3088
+ }>;
3089
+ }, z.core.$strip>>;
3090
+ line: z.ZodOptional<z.ZodString>;
3091
+ device: z.ZodOptional<z.ZodObject<{
3092
+ change: z.ZodEnum<{
3093
+ removed: "removed";
3094
+ replaced: "replaced";
3095
+ added: "added";
3096
+ vouched: "vouched";
3097
+ }>;
3098
+ device: z.ZodString;
3099
+ label: z.ZodString;
3100
+ kind: z.ZodOptional<z.ZodEnum<{
3101
+ "jelly-host": "jelly-host";
3102
+ laptop: "laptop";
3103
+ server: "server";
3104
+ other: "other";
3105
+ }>>;
3106
+ vouch: z.ZodEnum<{
3107
+ admin: "admin";
3108
+ device: "device";
3109
+ jelly: "jelly";
3110
+ }>;
3111
+ via: z.ZodOptional<z.ZodEnum<{
3112
+ host: "host";
3113
+ browser: "browser";
3114
+ }>>;
3115
+ approver: z.ZodOptional<z.ZodString>;
3116
+ at: z.ZodNumber;
3117
+ replaces: z.ZodOptional<z.ZodObject<{
3118
+ device: z.ZodString;
3119
+ label: z.ZodString;
3120
+ }, z.core.$strip>>;
3121
+ current: z.ZodBoolean;
3122
+ remove: z.ZodOptional<z.ZodEnum<{
3123
+ token: "token";
3124
+ "sign-in": "sign-in";
3125
+ team: "team";
3126
+ }>>;
3127
+ }, z.core.$strip>>;
3128
+ at: z.ZodNumber;
3129
+ }, z.core.$strip>;
3130
+ }, z.core.$strip>], "type">;
3131
+ export type IpcEvent = z.infer<typeof IpcEvent>;