@agentorg/cli 0.0.5 → 0.0.7

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 (260) hide show
  1. package/README.md +23 -104
  2. package/dist/node_modules/@agentorg/computer/LICENSE +201 -0
  3. package/dist/node_modules/@agentorg/computer/NOTICE +2 -0
  4. package/dist/node_modules/@agentorg/computer/dist/THIRD_PARTY_LICENSES.txt +1321 -0
  5. package/dist/node_modules/@agentorg/computer/dist/sdk.js +24909 -0
  6. package/dist/node_modules/@agentorg/computer/dist/types/generated/schema.d.ts +860 -0
  7. package/dist/node_modules/@agentorg/computer/dist/types/sdk.d.ts +242 -0
  8. package/dist/node_modules/@agentorg/computer/package.json +12 -0
  9. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.d.ts +1 -0
  10. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.js +1 -0
  11. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.d.ts +24 -0
  12. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.js +482 -0
  13. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.d.ts +19 -0
  14. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.js +149 -0
  15. package/dist/node_modules/@agentorg/computer-connector/package.json +33 -0
  16. package/dist/node_modules/@agentorg/computer-connector/skills/browser/SKILL.md +31 -0
  17. package/dist/node_modules/@agentorg/computer-connector/skills/computer/SKILL.md +30 -0
  18. package/dist/node_modules/@agentorg/computer-connector/skills/files/SKILL.md +28 -0
  19. package/dist/node_modules/@agentorg/computer-connector/skills/terminal/SKILL.md +39 -0
  20. package/dist/node_modules/@agentorg/computer-connector/skills/web-research/SKILL.md +29 -0
  21. package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.d.ts +2 -7
  22. package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.js +4 -144
  23. package/dist/node_modules/@agentorg/hub/dist/src/index.d.ts +1 -3
  24. package/dist/node_modules/@agentorg/hub/dist/src/index.js +1 -3
  25. package/dist/node_modules/@agentorg/hub/dist/src/router.d.ts +9 -58
  26. package/dist/node_modules/@agentorg/hub/dist/src/router.js +41 -414
  27. package/dist/node_modules/@agentorg/hub/dist/src/state.d.ts +17 -317
  28. package/dist/node_modules/@agentorg/hub/dist/src/state.js +42 -536
  29. package/dist/node_modules/@agentorg/hub/dist/src/validate.d.ts +1 -3
  30. package/dist/node_modules/@agentorg/hub/dist/src/validate.js +19 -17
  31. package/dist/node_modules/@agentorg/hub/package.json +0 -3
  32. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.d.ts +119 -0
  33. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.js +96 -0
  34. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.d.ts +42 -0
  35. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.js +53 -0
  36. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.d.ts +93 -38
  37. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.js +71 -22
  38. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.d.ts +36 -0
  39. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.js +31 -0
  40. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.d.ts +19 -0
  41. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.js +25 -0
  42. package/dist/node_modules/@agentorg/interfaces/dist/src/hub.d.ts +16 -286
  43. package/dist/node_modules/@agentorg/interfaces/dist/src/hub.js +17 -159
  44. package/dist/node_modules/@agentorg/interfaces/dist/src/index.d.ts +9 -9
  45. package/dist/node_modules/@agentorg/interfaces/dist/src/index.js +9 -9
  46. package/dist/node_modules/@agentorg/interfaces/dist/src/kv.d.ts +2 -2
  47. package/dist/node_modules/@agentorg/interfaces/dist/src/kv.js +2 -2
  48. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.d.ts +2 -0
  49. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.js +2 -1
  50. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.d.ts +626 -0
  51. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.js +349 -0
  52. package/dist/node_modules/@agentorg/interfaces/dist/src/tools.d.ts +39 -0
  53. package/dist/node_modules/@agentorg/interfaces/dist/src/tools.js +43 -0
  54. package/dist/node_modules/@agentorg/interfaces/dist/src/units.d.ts +460 -0
  55. package/dist/node_modules/@agentorg/interfaces/dist/src/units.js +204 -0
  56. package/dist/node_modules/@agentorg/looper/dist/src/index.d.ts +5 -0
  57. package/dist/node_modules/@agentorg/looper/dist/src/index.js +5 -0
  58. package/dist/node_modules/@agentorg/looper/dist/src/loop.d.ts +75 -0
  59. package/dist/node_modules/@agentorg/looper/dist/src/loop.js +332 -0
  60. package/dist/node_modules/@agentorg/looper/dist/src/looper.d.ts +71 -0
  61. package/dist/node_modules/@agentorg/looper/dist/src/looper.js +282 -0
  62. package/dist/node_modules/@agentorg/looper/dist/src/record.d.ts +99 -0
  63. package/dist/node_modules/@agentorg/looper/dist/src/record.js +278 -0
  64. package/dist/node_modules/@agentorg/looper/dist/src/tools.d.ts +11 -0
  65. package/dist/node_modules/@agentorg/looper/dist/src/tools.js +42 -0
  66. package/dist/node_modules/@agentorg/looper/dist/src/types.d.ts +147 -0
  67. package/dist/node_modules/@agentorg/looper/dist/src/types.js +32 -0
  68. package/dist/node_modules/@agentorg/looper/package.json +24 -0
  69. package/dist/node_modules/@agentorg/manager/dist/src/activity.d.ts +18 -0
  70. package/dist/node_modules/@agentorg/manager/dist/src/activity.js +65 -0
  71. package/dist/node_modules/@agentorg/manager/dist/src/control.d.ts +134 -0
  72. package/dist/node_modules/@agentorg/manager/dist/src/control.js +1115 -0
  73. package/dist/node_modules/@agentorg/manager/dist/src/form.d.ts +40 -0
  74. package/dist/node_modules/@agentorg/manager/dist/src/form.js +191 -0
  75. package/dist/node_modules/@agentorg/manager/dist/src/index.d.ts +1 -0
  76. package/dist/node_modules/@agentorg/manager/dist/src/index.js +1 -0
  77. package/dist/node_modules/@agentorg/manager/dist/src/manager.d.ts +25 -0
  78. package/dist/node_modules/@agentorg/manager/dist/src/manager.js +680 -0
  79. package/dist/node_modules/@agentorg/manager/dist/src/skills.d.ts +27 -0
  80. package/dist/node_modules/@agentorg/manager/dist/src/skills.js +152 -0
  81. package/dist/node_modules/@agentorg/manager/dist/src/stack.d.ts +454 -0
  82. package/dist/node_modules/@agentorg/manager/dist/src/stack.js +917 -0
  83. package/dist/node_modules/@agentorg/manager/package.json +30 -0
  84. package/dist/node_modules/@agentorg/mcp/dist/src/connection.d.ts +34 -0
  85. package/dist/node_modules/@agentorg/mcp/dist/src/connection.js +296 -0
  86. package/dist/node_modules/@agentorg/mcp/dist/src/index.d.ts +4 -0
  87. package/dist/node_modules/@agentorg/mcp/dist/src/index.js +4 -0
  88. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.d.ts +158 -0
  89. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.js +164 -0
  90. package/dist/node_modules/@agentorg/mcp/dist/src/provider.d.ts +22 -0
  91. package/dist/node_modules/@agentorg/mcp/dist/src/provider.js +197 -0
  92. package/dist/node_modules/@agentorg/mcp/dist/src/public.d.ts +6 -0
  93. package/dist/node_modules/@agentorg/mcp/dist/src/public.js +72 -0
  94. package/dist/node_modules/@agentorg/mcp/package.json +31 -0
  95. package/dist/node_modules/@agentorg/sdk/dist/src/cli.js +3 -23
  96. package/dist/node_modules/@agentorg/sdk/dist/src/client.d.ts +4 -25
  97. package/dist/node_modules/@agentorg/sdk/dist/src/client.js +5 -55
  98. package/dist/node_modules/@agentorg/sdk/dist/src/errors.d.ts +1 -1
  99. package/dist/node_modules/@agentorg/sdk/dist/src/errors.js +3 -3
  100. package/dist/node_modules/@agentorg/sdk/dist/src/filled.d.ts +21 -0
  101. package/dist/node_modules/@agentorg/sdk/dist/src/filled.js +24 -0
  102. package/dist/node_modules/@agentorg/sdk/dist/src/index.d.ts +3 -2
  103. package/dist/node_modules/@agentorg/sdk/dist/src/index.js +2 -1
  104. package/dist/node_modules/@agentorg/sdk/dist/src/interface.d.ts +6 -34
  105. package/dist/node_modules/@agentorg/sdk/dist/src/interface.js +3 -24
  106. package/dist/node_modules/@agentorg/sdk/dist/src/module-host.d.ts +8 -17
  107. package/dist/node_modules/@agentorg/sdk/dist/src/module-host.js +15 -87
  108. package/dist/node_modules/@agentorg/sdk/dist/src/module.d.ts +10 -76
  109. package/dist/node_modules/@agentorg/sdk/dist/src/module.js +3 -23
  110. package/dist/node_modules/@agentorg/sdk/dist/src/person-commands.js +0 -5
  111. package/dist/node_modules/@agentorg/sdk/dist/src/runtime.d.ts +3 -27
  112. package/dist/node_modules/@agentorg/sdk/dist/src/runtime.js +5 -100
  113. package/dist/node_modules/@agentorg/sdk/dist/src/testing.d.ts +7 -8
  114. package/dist/node_modules/@agentorg/sdk/dist/src/testing.js +12 -24
  115. package/dist/node_modules/@agentorg/sdk/package.json +4 -37
  116. package/dist/node_modules/@agentorg/shell/dist/app.css +4624 -739
  117. package/dist/node_modules/@agentorg/shell/dist/app.js +245 -202
  118. package/dist/node_modules/@agentorg/shell/package.json +23 -10
  119. package/dist/node_modules/@agentorg/wire/dist/src/frames.d.ts +2 -3
  120. package/dist/node_modules/@agentorg/wire/dist/src/frames.js +2 -3
  121. package/dist/node_modules/@agentorg/wire/dist/src/ops.d.ts +5 -34
  122. package/dist/node_modules/@agentorg/wire/dist/src/ops.js +2 -17
  123. package/dist/node_modules/assistant/dist/src/chats.d.ts +92 -0
  124. package/dist/node_modules/assistant/dist/src/chats.js +357 -0
  125. package/dist/node_modules/assistant/dist/src/engine.d.ts +42 -0
  126. package/dist/node_modules/assistant/dist/src/engine.js +160 -0
  127. package/dist/node_modules/assistant/dist/src/local-store.d.ts +3 -0
  128. package/dist/node_modules/assistant/dist/src/local-store.js +58 -0
  129. package/dist/node_modules/assistant/dist/src/provider.d.ts +21 -0
  130. package/dist/node_modules/assistant/dist/src/provider.js +259 -0
  131. package/dist/node_modules/assistant/dist/src/settings.d.ts +17 -0
  132. package/dist/node_modules/assistant/dist/src/settings.js +43 -0
  133. package/dist/node_modules/assistant/dist/src/tools.d.ts +57 -0
  134. package/dist/node_modules/assistant/dist/src/tools.js +102 -0
  135. package/dist/node_modules/assistant/package.json +30 -0
  136. package/dist/node_modules/chatgpt/dist/src/account.d.ts +52 -0
  137. package/dist/node_modules/chatgpt/dist/src/account.js +270 -0
  138. package/dist/node_modules/chatgpt/dist/src/encoding.d.ts +7 -0
  139. package/dist/node_modules/chatgpt/dist/src/encoding.js +20 -0
  140. package/dist/node_modules/chatgpt/dist/src/file-store.d.ts +9 -0
  141. package/dist/node_modules/chatgpt/dist/src/file-store.js +68 -0
  142. package/dist/node_modules/chatgpt/dist/src/index.d.ts +1 -0
  143. package/dist/node_modules/chatgpt/dist/src/index.js +1 -0
  144. package/dist/node_modules/chatgpt/dist/src/jwt.d.ts +15 -0
  145. package/dist/node_modules/chatgpt/dist/src/jwt.js +37 -0
  146. package/dist/node_modules/chatgpt/dist/src/oauth.d.ts +43 -0
  147. package/dist/node_modules/chatgpt/dist/src/oauth.js +104 -0
  148. package/dist/node_modules/chatgpt/dist/src/program.d.ts +23 -0
  149. package/dist/node_modules/chatgpt/dist/src/program.js +41 -0
  150. package/dist/node_modules/chatgpt/dist/src/responses.d.ts +54 -0
  151. package/dist/node_modules/chatgpt/dist/src/responses.js +300 -0
  152. package/dist/node_modules/chatgpt/dist/src/serve.d.ts +65 -0
  153. package/dist/node_modules/chatgpt/dist/src/serve.js +46 -0
  154. package/dist/node_modules/chatgpt/package.json +33 -0
  155. package/dist/src/api.d.ts +5 -34
  156. package/dist/src/api.js +10 -68
  157. package/dist/src/cli.js +3 -7
  158. package/dist/src/folders.d.ts +2 -0
  159. package/dist/src/folders.js +45 -0
  160. package/dist/src/gateway.d.ts +13 -8
  161. package/dist/src/gateway.js +119 -296
  162. package/dist/src/index.d.ts +4 -5
  163. package/dist/src/index.js +3 -4
  164. package/dist/src/live.d.ts +17 -0
  165. package/dist/src/live.js +109 -0
  166. package/dist/src/notes.d.ts +11 -0
  167. package/dist/src/notes.js +64 -0
  168. package/dist/src/oauth.d.ts +16 -0
  169. package/dist/src/oauth.js +46 -0
  170. package/dist/src/programs.d.ts +36 -0
  171. package/dist/src/programs.js +198 -0
  172. package/dist/src/signin.d.ts +12 -3
  173. package/dist/src/signin.js +30 -6
  174. package/package.json +4 -11
  175. package/dist/bundled/index.json +0 -6
  176. package/dist/bundled/sha256-0e91cc3d0e9762b81abc2427b5496b20f383abcd6fb97d928a8d50e956b54d1f.agentorg +0 -0
  177. package/dist/bundled/sha256-1f64ca62a0209d767d6aa6c4feb50b0653d60f10bebbc301f79bd3a37e0153c1.agentorg +0 -0
  178. package/dist/bundled/sha256-4055f8fddf6b90f3d356543f554b2a9e9a2c4a8827a8774f8f87952dc1692331.agentorg +0 -0
  179. package/dist/bundled/sha256-e356ea3c1899138a8494baf521556831006f38534fa9e92ae873e7e6956c3a46.agentorg +0 -0
  180. package/dist/node_modules/@agentorg/hub/dist/src/build.d.ts +0 -17
  181. package/dist/node_modules/@agentorg/hub/dist/src/build.js +0 -120
  182. package/dist/node_modules/@agentorg/hub/dist/src/logs.d.ts +0 -33
  183. package/dist/node_modules/@agentorg/hub/dist/src/logs.js +0 -162
  184. package/dist/node_modules/@agentorg/hub/dist/src/net.d.ts +0 -41
  185. package/dist/node_modules/@agentorg/hub/dist/src/net.js +0 -265
  186. package/dist/node_modules/@agentorg/hub/dist/src/processes.d.ts +0 -78
  187. package/dist/node_modules/@agentorg/hub/dist/src/processes.js +0 -485
  188. package/dist/node_modules/@agentorg/hub/dist/src/storage.d.ts +0 -38
  189. package/dist/node_modules/@agentorg/hub/dist/src/storage.js +0 -194
  190. package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.d.ts +0 -6
  191. package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.js +0 -7
  192. package/dist/node_modules/@agentorg/interfaces/dist/src/installer.d.ts +0 -191
  193. package/dist/node_modules/@agentorg/interfaces/dist/src/installer.js +0 -136
  194. package/dist/node_modules/@agentorg/interfaces/dist/src/layout.d.ts +0 -47
  195. package/dist/node_modules/@agentorg/interfaces/dist/src/layout.js +0 -52
  196. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.d.ts +0 -35
  197. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.js +0 -37
  198. package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.d.ts +0 -23
  199. package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.js +0 -31
  200. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.d.ts +0 -14
  201. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.js +0 -26
  202. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.d.ts +0 -27
  203. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.js +0 -26
  204. package/dist/node_modules/@agentorg/kit/dist/src/chat.d.ts +0 -37
  205. package/dist/node_modules/@agentorg/kit/dist/src/chat.js +0 -131
  206. package/dist/node_modules/@agentorg/kit/dist/src/components.d.ts +0 -94
  207. package/dist/node_modules/@agentorg/kit/dist/src/components.js +0 -66
  208. package/dist/node_modules/@agentorg/kit/dist/src/icons.d.ts +0 -17
  209. package/dist/node_modules/@agentorg/kit/dist/src/icons.js +0 -30
  210. package/dist/node_modules/@agentorg/kit/dist/src/index.d.ts +0 -6
  211. package/dist/node_modules/@agentorg/kit/dist/src/index.js +0 -10
  212. package/dist/node_modules/@agentorg/kit/dist/src/markdown.d.ts +0 -9
  213. package/dist/node_modules/@agentorg/kit/dist/src/markdown.js +0 -14
  214. package/dist/node_modules/@agentorg/kit/dist/src/resizable.d.ts +0 -5
  215. package/dist/node_modules/@agentorg/kit/dist/src/resizable.js +0 -8
  216. package/dist/node_modules/@agentorg/kit/dist/src/styles.d.ts +0 -11
  217. package/dist/node_modules/@agentorg/kit/dist/src/styles.js +0 -166
  218. package/dist/node_modules/@agentorg/kit/package.json +0 -44
  219. package/dist/node_modules/@agentorg/sdk/dist/frame/runtime.js +0 -753
  220. package/dist/node_modules/@agentorg/sdk/dist/host/runner.js +0 -21963
  221. package/dist/node_modules/@agentorg/sdk/dist/src/build.d.ts +0 -2
  222. package/dist/node_modules/@agentorg/sdk/dist/src/build.js +0 -2
  223. package/dist/node_modules/@agentorg/sdk/dist/src/client-http.d.ts +0 -24
  224. package/dist/node_modules/@agentorg/sdk/dist/src/client-http.js +0 -247
  225. package/dist/node_modules/@agentorg/sdk/dist/src/describe.d.ts +0 -13
  226. package/dist/node_modules/@agentorg/sdk/dist/src/describe.js +0 -16
  227. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.d.ts +0 -8
  228. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.js +0 -64
  229. package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.d.ts +0 -1
  230. package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.js +0 -35
  231. package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.d.ts +0 -57
  232. package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.js +0 -293
  233. package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.d.ts +0 -124
  234. package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.js +0 -16
  235. package/dist/node_modules/@agentorg/sdk/dist/src/frame.d.ts +0 -25
  236. package/dist/node_modules/@agentorg/sdk/dist/src/frame.js +0 -248
  237. package/dist/node_modules/@agentorg/sdk/dist/src/host-main.d.ts +0 -1
  238. package/dist/node_modules/@agentorg/sdk/dist/src/host-main.js +0 -60
  239. package/dist/node_modules/@agentorg/sdk/dist/src/host.d.ts +0 -25
  240. package/dist/node_modules/@agentorg/sdk/dist/src/host.js +0 -92
  241. package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.d.ts +0 -2
  242. package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.js +0 -2
  243. package/dist/node_modules/@agentorg/sdk/dist/src/manifest.d.ts +0 -56
  244. package/dist/node_modules/@agentorg/sdk/dist/src/manifest.js +0 -165
  245. package/dist/node_modules/@agentorg/sdk/dist/src/package.d.ts +0 -60
  246. package/dist/node_modules/@agentorg/sdk/dist/src/package.js +0 -538
  247. package/dist/node_modules/@agentorg/sdk/dist/src/tar.d.ts +0 -7
  248. package/dist/node_modules/@agentorg/sdk/dist/src/tar.js +0 -71
  249. package/dist/node_modules/@agentorg/shell/dist/agent-bindings.js +0 -59
  250. package/dist/node_modules/@agentorg/shell/src/agent-bindings.ts +0 -107
  251. package/dist/src/frames.d.ts +0 -23
  252. package/dist/src/frames.js +0 -78
  253. package/dist/src/layout.d.ts +0 -44
  254. package/dist/src/layout.js +0 -90
  255. package/dist/src/model.d.ts +0 -54
  256. package/dist/src/model.js +0 -299
  257. package/dist/src/rules.d.ts +0 -71
  258. package/dist/src/rules.js +0 -157
  259. package/dist/src/transfer.d.ts +0 -30
  260. package/dist/src/transfer.js +0 -110
@@ -1,12 +1,10 @@
1
1
  import type { DescribedInterface } from "@agentorg/sdk";
2
- /** A part of an interface with its own schema: a method's input or output, an event, or `open`. */
2
+ /** A part of an interface with its own schema: a method's input or output, or an event. */
3
3
  export type Part = {
4
4
  method: string;
5
5
  side: "input" | "output";
6
6
  } | {
7
7
  event: string;
8
- } | {
9
- open: true;
10
8
  };
11
9
  /** How long checking one value may take, once compiled, before it is refused and its worker replaced. */
12
10
  export declare const CHECK_BUDGET_MS = 250;
@@ -1,28 +1,16 @@
1
1
  import { availableParallelism } from "node:os";
2
2
  import { Worker } from "node:worker_threads";
3
3
  import { Refused } from "@agentorg/sdk";
4
- const describe = (part) => "method" in part
5
- ? `${part.method} ${part.side}`
6
- : "event" in part
7
- ? `${part.event} event`
8
- : "open";
4
+ const describe = (part) => "method" in part ? `${part.method} ${part.side}` : `${part.event} event`;
9
5
  function schemaOf(iface, part) {
10
6
  if ("method" in part)
11
- return iface.kind === "rpc" && Object.hasOwn(iface.methods, part.method)
7
+ return Object.hasOwn(iface.methods, part.method)
12
8
  ? iface.methods[part.method]?.[part.side]
13
9
  : undefined;
14
- if ("event" in part)
15
- return iface.kind === "rpc" && Object.hasOwn(iface.events, part.event)
16
- ? iface.events[part.event]
17
- : undefined;
18
- return iface.kind === "stream" ? iface.open : undefined;
10
+ return Object.hasOwn(iface.events, part.event) ? iface.events[part.event] : undefined;
19
11
  }
20
12
  const keyOf = (iface, part) => `${iface.hash} ${describe(part)}`;
21
13
  function partsOf(iface) {
22
- if (iface.kind === "stream")
23
- return [{ open: true }];
24
- if (iface.kind !== "rpc")
25
- return [];
26
14
  return [
27
15
  ...Object.keys(iface.methods).flatMap((method) => [
28
16
  { method, side: "input" },
@@ -87,7 +75,7 @@ export class Validators {
87
75
  // Compiled: from here the check's own, shorter budget runs.
88
76
  clearTimeout(busy.timer);
89
77
  busy.phase = "check";
90
- busy.timer = setTimeout(() => this.#replace(slot), this.#budgetMs);
78
+ busy.timer = this.#lateAfter(slot, this.#budgetMs);
91
79
  return;
92
80
  }
93
81
  clearTimeout(busy.timer);
@@ -113,6 +101,20 @@ export class Validators {
113
101
  this.#broken = error;
114
102
  this.close(error);
115
103
  }
104
+ /**
105
+ * Start a budget for the job a worker has: a job still on it when it runs out is late, and its
106
+ * worker is replaced. The timer can fire late because this thread was busy, with the worker's
107
+ * reply already delivered, so messages are read once more (setImmediate runs after them) before
108
+ * the job is judged.
109
+ */
110
+ #lateAfter(slot, ms) {
111
+ const timer = setTimeout(() => setImmediate(() => {
112
+ // Still this budget's job: no reply ended it or moved it on to the check's budget.
113
+ if (slot.busy?.timer === timer)
114
+ this.#replace(slot);
115
+ }), ms);
116
+ return timer;
117
+ }
116
118
  #replace(slot) {
117
119
  const index = this.#slots.indexOf(slot);
118
120
  if (index < 0)
@@ -138,7 +140,7 @@ export class Validators {
138
140
  // The budget runs from when a ready worker takes the job, not while it waits. Compiling gets
139
141
  // its own budget, per schema; the check's starts when the worker says it has compiled.
140
142
  const budget = this.#compileBudgetMs * Math.max(1, next.job.parts.length);
141
- const timer = setTimeout(() => this.#replace(slot), budget);
143
+ const timer = this.#lateAfter(slot, budget);
142
144
  slot.busy = { ...next, timer, phase: "compile" };
143
145
  slot.worker.ref();
144
146
  try {
@@ -23,12 +23,9 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@agentorg/interfaces": "0.0.0",
26
- "@agentorg/kit": "0.0.0",
27
26
  "@agentorg/sdk": "0.0.0",
28
27
  "@agentorg/wire": "0.0.0",
29
28
  "ajv": "^8.20.0",
30
- "react": "^19.3.1",
31
- "react-dom": "^19.3.1",
32
29
  "ws": "^8.22.1",
33
30
  "zod": "^4.6.7"
34
31
  },
@@ -0,0 +1,119 @@
1
+ import { z } from "zod";
2
+ /** A creatable's id, unique within its provider. */
3
+ export declare const CreatableId: z.ZodString;
4
+ /** What the person gives at creation, by the id of each ask. Never a secret. */
5
+ export declare const Answers: z.ZodRecord<z.ZodString, z.ZodString>;
6
+ /** What an agent is made on: the execution layer's instructions and what it asks the person. */
7
+ export declare const Creatable: z.ZodObject<{
8
+ id: z.ZodString;
9
+ title: z.ZodString;
10
+ description: z.ZodString;
11
+ instructions: z.ZodString;
12
+ asks: z.ZodArray<z.ZodObject<{
13
+ id: z.ZodString;
14
+ title: z.ZodString;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ optional: z.ZodOptional<z.ZodLiteral<true>>;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
19
+ /**
20
+ * How an agent stands now, as what runs it knows: `starting`, `running`, `stopped` by the person,
21
+ * or `down`, which it didn't ask for. `detail` says why it is down.
22
+ */
23
+ export declare const AgentStatus: z.ZodObject<{
24
+ state: z.ZodEnum<{
25
+ down: "down";
26
+ running: "running";
27
+ starting: "starting";
28
+ stopped: "stopped";
29
+ }>;
30
+ detail: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ /** The models an agent can use, and the one chosen; none chosen means the provider's default. */
33
+ export declare const AgentModels: z.ZodObject<{
34
+ models: z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ name: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ current: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ /**
41
+ * `agent.provider@1`: a program that makes agents: an execution system and its way of running one.
42
+ * It says what it can create, and makes, starts, stops and removes the agents it made, and keeps
43
+ * the model chosen for each; each is an Actor. A call naming an agent it didn't make is refused
44
+ * `unknown`.
45
+ */
46
+ export declare const agentProvider: import("@agentorg/sdk").RpcInterface<"agent.provider", {
47
+ creatable: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
48
+ creatables: z.ZodArray<z.ZodObject<{
49
+ id: z.ZodString;
50
+ title: z.ZodString;
51
+ description: z.ZodString;
52
+ instructions: z.ZodString;
53
+ asks: z.ZodArray<z.ZodObject<{
54
+ id: z.ZodString;
55
+ title: z.ZodString;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ optional: z.ZodOptional<z.ZodLiteral<true>>;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>>;
61
+ /**
62
+ * Make and start an agent of a creatable, named `name`. `settings` is the agent's slot typed
63
+ * `agent.settings@1`, for whoever serves it to bind, and `chat` its export typed `chat@1`.
64
+ * Refused `unknown` for a creatable it doesn't offer, and `invalid` when an ask with no
65
+ * `optional` has no answer.
66
+ */
67
+ create: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
68
+ creatable: z.ZodString;
69
+ name: z.ZodString;
70
+ answers: z.ZodRecord<z.ZodString, z.ZodString>;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ agent: z.ZodString;
73
+ settings: z.ZodString;
74
+ chat: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ status: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
77
+ agent: z.ZodString;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ state: z.ZodEnum<{
80
+ down: "down";
81
+ running: "running";
82
+ starting: "starting";
83
+ stopped: "stopped";
84
+ }>;
85
+ detail: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strip>>;
87
+ start: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
88
+ agent: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
90
+ /**
91
+ * Stop an agent, keeping it: it does nothing until it is started. Its record, bindings and
92
+ * connections stay. Whether its chats can be read meanwhile is the provider's to say.
93
+ */
94
+ stop: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
95
+ agent: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
97
+ /** The models an agent can use, and the one chosen. */
98
+ models: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
99
+ agent: z.ZodString;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ models: z.ZodArray<z.ZodObject<{
102
+ id: z.ZodString;
103
+ name: z.ZodString;
104
+ }, z.core.$strip>>;
105
+ current: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strip>>;
107
+ /**
108
+ * Choose the model for an agent's next requests, kept with the agent; with no `model`, go back
109
+ * to the provider's default. Refused `unknown` when the model isn't one of `models`.
110
+ */
111
+ setModel: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
112
+ agent: z.ZodString;
113
+ model: z.ZodOptional<z.ZodString>;
114
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
115
+ /** Final: the agent's Actor is closed. */
116
+ remove: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
117
+ agent: z.ZodString;
118
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
119
+ }, {}, 1>;
@@ -0,0 +1,96 @@
1
+ import { defineInterface, method } from "@agentorg/sdk";
2
+ import { z } from "zod";
3
+ import { Id, Name } from "./hub.js";
4
+ import { ModelId } from "./llm-session.js";
5
+ const Title = z.string().min(1).max(128);
6
+ const Description = z.string().max(2000);
7
+ /** A creatable's id, unique within its provider. */
8
+ export const CreatableId = z
9
+ .string()
10
+ .regex(/^[a-z][a-z0-9-]*$/)
11
+ .max(64);
12
+ const AskId = z
13
+ .string()
14
+ .regex(/^[a-z][A-Za-z0-9_]*$/)
15
+ .max(64);
16
+ /** What the person gives at creation, by the id of each ask. Never a secret. */
17
+ export const Answers = z.record(AskId, z.string().max(4096));
18
+ /** One thing a creatable asks the person when an agent is made from it. */
19
+ const Ask = z.object({
20
+ id: AskId,
21
+ title: Title,
22
+ description: Description.optional(),
23
+ optional: z.literal(true).optional(),
24
+ });
25
+ /** What an agent is made on: the execution layer's instructions and what it asks the person. */
26
+ export const Creatable = z.object({
27
+ id: CreatableId,
28
+ title: Title,
29
+ description: Description,
30
+ instructions: z.string().max(200_000),
31
+ asks: z.array(Ask).max(32),
32
+ });
33
+ const OnAgent = z.object({ agent: Id });
34
+ /**
35
+ * How an agent stands now, as what runs it knows: `starting`, `running`, `stopped` by the person,
36
+ * or `down`, which it didn't ask for. `detail` says why it is down.
37
+ */
38
+ export const AgentStatus = z.object({
39
+ state: z.enum(["starting", "running", "stopped", "down"]),
40
+ detail: z.string().max(2000).optional(),
41
+ });
42
+ /** The models an agent can use, and the one chosen; none chosen means the provider's default. */
43
+ export const AgentModels = z.object({
44
+ models: z.array(z.object({ id: ModelId, name: z.string().max(256) })),
45
+ current: ModelId.optional(),
46
+ });
47
+ /**
48
+ * `agent.provider@1`: a program that makes agents: an execution system and its way of running one.
49
+ * It says what it can create, and makes, starts, stops and removes the agents it made, and keeps
50
+ * the model chosen for each; each is an Actor. A call naming an agent it didn't make is refused
51
+ * `unknown`.
52
+ */
53
+ export const agentProvider = defineInterface({
54
+ name: "agent.provider",
55
+ major: 1,
56
+ kind: "rpc",
57
+ methods: {
58
+ creatable: method({
59
+ input: z.object({}),
60
+ output: z.object({ creatables: z.array(Creatable) }),
61
+ }),
62
+ /**
63
+ * Make and start an agent of a creatable, named `name`. `settings` is the agent's slot typed
64
+ * `agent.settings@1`, for whoever serves it to bind, and `chat` its export typed `chat@1`.
65
+ * Refused `unknown` for a creatable it doesn't offer, and `invalid` when an ask with no
66
+ * `optional` has no answer.
67
+ */
68
+ create: method({
69
+ input: z.object({
70
+ creatable: CreatableId,
71
+ name: Title,
72
+ answers: Answers,
73
+ }),
74
+ output: z.object({ agent: Id, settings: Name, chat: Name }),
75
+ }),
76
+ status: method({ input: OnAgent, output: AgentStatus }),
77
+ start: method({ input: OnAgent, output: z.object({}) }),
78
+ /**
79
+ * Stop an agent, keeping it: it does nothing until it is started. Its record, bindings and
80
+ * connections stay. Whether its chats can be read meanwhile is the provider's to say.
81
+ */
82
+ stop: method({ input: OnAgent, output: z.object({}) }),
83
+ /** The models an agent can use, and the one chosen. */
84
+ models: method({ input: OnAgent, output: AgentModels }),
85
+ /**
86
+ * Choose the model for an agent's next requests, kept with the agent; with no `model`, go back
87
+ * to the provider's default. Refused `unknown` when the model isn't one of `models`.
88
+ */
89
+ setModel: method({
90
+ input: OnAgent.extend({ model: ModelId.optional() }),
91
+ output: z.object({}),
92
+ }),
93
+ /** Final: the agent's Actor is closed. */
94
+ remove: method({ input: OnAgent, output: z.object({}) }),
95
+ },
96
+ });
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ /** A skill's name, as the Agent Skills convention writes it. */
3
+ export declare const SkillName: z.ZodString;
4
+ /**
5
+ * A file of a skill: a relative path inside its folder, of plain segments, never `.` or `..`, with
6
+ * no backslash or control character.
7
+ */
8
+ export declare const SkillPath: z.ZodString;
9
+ /** The most one file of a skill holds, as text. */
10
+ export declare const SKILL_FILE_MAX: number;
11
+ /** What a list says of a skill, from its `SKILL.md` front matter. */
12
+ export declare const SkillEntry: z.ZodObject<{
13
+ name: z.ZodString;
14
+ description: z.ZodString;
15
+ }, z.core.$strip>;
16
+ /**
17
+ * `agent.settings@1`: what an agent is run with, read by the program that runs it. Each caller is
18
+ * answered with its own: the instructions it was given and the skills exposed to it, so an agent
19
+ * sees nothing of another's. It is read at each model request.
20
+ */
21
+ export declare const agentSettings: import("@agentorg/sdk").RpcInterface<"agent.settings", {
22
+ get: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
23
+ instructions: z.ZodString;
24
+ skills: z.ZodArray<z.ZodObject<{
25
+ name: z.ZodString;
26
+ description: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ }, z.core.$strip>>;
29
+ /**
30
+ * A file of a skill exposed to the caller, `SKILL.md` if no `path`. Refused `unknown` when the
31
+ * skill isn't exposed to it or has no such file.
32
+ */
33
+ skill: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
34
+ name: z.ZodString;
35
+ path: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ text: z.ZodString;
38
+ }, z.core.$strip>>;
39
+ }, {
40
+ /** The caller's instructions or skills changed: read them again at the next request. */
41
+ changed: import("@agentorg/sdk").EventSpec<z.ZodObject<{}, z.core.$strip>>;
42
+ }, 1>;
@@ -0,0 +1,53 @@
1
+ import { defineInterface, event, method } from "@agentorg/sdk";
2
+ import { z } from "zod";
3
+ /** A skill's name, as the Agent Skills convention writes it. */
4
+ export const SkillName = z
5
+ .string()
6
+ .regex(/^[a-z0-9]+(-[a-z0-9]+)*$/)
7
+ .max(64);
8
+ /**
9
+ * A file of a skill: a relative path inside its folder, of plain segments, never `.` or `..`, with
10
+ * no backslash or control character.
11
+ */
12
+ export const SkillPath = z
13
+ .string()
14
+ .regex(/^(?!\.\.?(\/|$))(?!.*\/\.\.?(\/|$))([^/\\\p{Cc}\p{Zl}\p{Zp}]+\/)*[^/\\\p{Cc}\p{Zl}\p{Zp}]+$/u)
15
+ .max(1024);
16
+ /** The most one file of a skill holds, as text. */
17
+ export const SKILL_FILE_MAX = 256 * 1024;
18
+ /** What a list says of a skill, from its `SKILL.md` front matter. */
19
+ export const SkillEntry = z.object({
20
+ name: SkillName,
21
+ description: z.string().max(1024),
22
+ });
23
+ /**
24
+ * `agent.settings@1`: what an agent is run with, read by the program that runs it. Each caller is
25
+ * answered with its own: the instructions it was given and the skills exposed to it, so an agent
26
+ * sees nothing of another's. It is read at each model request.
27
+ */
28
+ export const agentSettings = defineInterface({
29
+ name: "agent.settings",
30
+ major: 1,
31
+ kind: "rpc",
32
+ methods: {
33
+ get: method({
34
+ input: z.object({}),
35
+ output: z.object({
36
+ instructions: z.string().max(200_000),
37
+ skills: z.array(SkillEntry),
38
+ }),
39
+ }),
40
+ /**
41
+ * A file of a skill exposed to the caller, `SKILL.md` if no `path`. Refused `unknown` when the
42
+ * skill isn't exposed to it or has no such file.
43
+ */
44
+ skill: method({
45
+ input: z.object({ name: SkillName, path: SkillPath.optional() }),
46
+ output: z.object({ text: z.string().max(SKILL_FILE_MAX) }),
47
+ }),
48
+ },
49
+ events: {
50
+ /** The caller's instructions or skills changed: read them again at the next request. */
51
+ changed: event(z.object({})),
52
+ },
53
+ });
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ /** The longest title a chat has. */
3
+ export declare const CHAT_TITLE_MAX = 200;
2
4
  /**
3
5
  * A tool call a `tool` message stands for: its name, whether it is `running` or ended `done` or
4
6
  * `refused`, and its input (the call's JSON arguments) and output (its JSON result, or the
@@ -39,44 +41,60 @@ export declare const ChatMessage: z.ZodObject<{
39
41
  output: z.ZodOptional<z.ZodString>;
40
42
  }, z.core.$strip>>;
41
43
  }, z.core.$strip>;
42
- export declare const ChatState: z.ZodEnum<{
43
- error: "error";
44
- idle: "idle";
45
- thinking: "thinking";
46
- tool: "tool";
47
- }>;
48
- /**
49
- * What the agent is doing. On `error`, `detail.code` is the refusal's code, such as the model's
50
- * `usage_limit` or `not_signed_in`, so a view can offer the right action.
51
- */
44
+ /** What the agent is doing: `working` while it answers anything, in any chat. */
52
45
  export declare const ChatStatus: z.ZodObject<{
53
46
  state: z.ZodEnum<{
54
- error: "error";
55
47
  idle: "idle";
56
- thinking: "thinking";
57
- tool: "tool";
48
+ working: "working";
58
49
  }>;
59
- detail: z.ZodOptional<z.ZodObject<{
50
+ }, z.core.$strip>;
51
+ /**
52
+ * One of an agent's chats, as a list shows it. Its `title` is its first message's first line until
53
+ * it is renamed. `latest` is its newest reply, so a view can tell what is new without reading the
54
+ * chat. `problem` is there while a message in it got no answer, until its next reply.
55
+ */
56
+ export declare const ChatEntry: z.ZodObject<{
57
+ id: z.ZodString;
58
+ title: z.ZodString;
59
+ at: z.ZodString;
60
+ latest: z.ZodOptional<z.ZodObject<{
61
+ id: z.ZodString;
62
+ at: z.ZodString;
63
+ }, z.core.$strip>>;
64
+ problem: z.ZodOptional<z.ZodObject<{
60
65
  code: z.ZodString;
61
66
  message: z.ZodString;
62
67
  }, z.core.$strip>>;
68
+ archived: z.ZodBoolean;
63
69
  }, z.core.$strip>;
64
70
  /**
65
- * `chat@1`: a conversation with an agent. `send` starts a turn, whose messages, streaming text and
66
- * status arrive as events. Events are live only: `history` is the record, and `state` the status
67
- * now.
71
+ * `chat@1`: an agent's chats. A chat is the messages sent in it and nothing more: `send` with no
72
+ * `chat` starts one, and with one, goes on in it. Messages and streaming text arrive as events,
73
+ * each naming its chat. What works is the agent, not a chat: `status` says when it starts and
74
+ * when it is done. Events are live only: `history` is a chat's record, `state` the agent's status
75
+ * now, and `list` the chats. A provider that can't take
76
+ * a message now refuses it `busy`. A call naming a chat the agent doesn't have is refused
77
+ * `unknown`.
68
78
  */
69
79
  export declare const chat: import("@agentorg/sdk").RpcInterface<"chat", {
80
+ /**
81
+ * Send this message in `chat`, or in a new chat; the result says which. The agent answers it
82
+ * in that chat. An archived chat takes a message like any other, and stays archived. Refused
83
+ * `busy` when the provider can't take it now.
84
+ */
70
85
  send: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
86
+ chat: z.ZodOptional<z.ZodString>;
71
87
  text: z.ZodString;
72
88
  }, z.core.$strip>, z.ZodObject<{
89
+ chat: z.ZodString;
73
90
  messageId: z.ZodString;
74
91
  }, z.core.$strip>>;
75
92
  /**
76
- * Messages before `before` (or the newest), oldest first; `more` when older ones remain. A
77
- * provider returns fewer than `limit` when a page would not fit one frame.
93
+ * A chat's messages before `before` (or the newest), oldest first; `more` when older ones
94
+ * remain. A provider returns fewer than `limit` when a page would not fit one frame.
78
95
  */
79
96
  history: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
97
+ chat: z.ZodString;
80
98
  before: z.ZodOptional<z.ZodString>;
81
99
  limit: z.ZodOptional<z.ZodNumber>;
82
100
  }, z.core.$strip>, z.ZodObject<{
@@ -102,29 +120,51 @@ export declare const chat: import("@agentorg/sdk").RpcInterface<"chat", {
102
120
  }, z.core.$strip>>;
103
121
  more: z.ZodBoolean;
104
122
  }, z.core.$strip>>;
105
- /** Stop the current turn, if any. */
106
- cancel: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
107
- /** The status now, as the latest `status` event said; for a view opened mid-turn. */
123
+ /** The agent's status now, as its latest `status` event said; for a view opened late. */
108
124
  state: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
109
125
  state: z.ZodEnum<{
110
- error: "error";
111
126
  idle: "idle";
112
- thinking: "thinking";
113
- tool: "tool";
127
+ working: "working";
114
128
  }>;
115
- detail: z.ZodOptional<z.ZodObject<{
116
- code: z.ZodString;
117
- message: z.ZodString;
118
- }, z.core.$strip>>;
119
129
  }, z.core.$strip>>;
120
130
  /**
121
- * Run the last turn again from the record, without recording the person's message again;
122
- * `messageId` is that message's. Refused `busy` during a turn, and `nothing_to_retry` when no
123
- * message has been sent.
131
+ * The chats after `before` in the list (or from its start), newest first by their last
132
+ * message; `more` when others follow. Those not archived, or with `archived`, those that are.
133
+ * A message sent in a chat moves it to the front, so a later page may repeat a chat that
134
+ * moved, and never leaves out one that didn't: the `chat` event says each that did. A `before`
135
+ * the agent doesn't have gives an empty page.
124
136
  */
125
- retry: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
126
- messageId: z.ZodString;
137
+ list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
138
+ archived: z.ZodOptional<z.ZodBoolean>;
139
+ before: z.ZodOptional<z.ZodString>;
140
+ limit: z.ZodOptional<z.ZodNumber>;
141
+ }, z.core.$strip>, z.ZodObject<{
142
+ chats: z.ZodArray<z.ZodObject<{
143
+ id: z.ZodString;
144
+ title: z.ZodString;
145
+ at: z.ZodString;
146
+ latest: z.ZodOptional<z.ZodObject<{
147
+ id: z.ZodString;
148
+ at: z.ZodString;
149
+ }, z.core.$strip>>;
150
+ problem: z.ZodOptional<z.ZodObject<{
151
+ code: z.ZodString;
152
+ message: z.ZodString;
153
+ }, z.core.$strip>>;
154
+ archived: z.ZodBoolean;
155
+ }, z.core.$strip>>;
156
+ more: z.ZodBoolean;
127
157
  }, z.core.$strip>>;
158
+ /** Give a chat another title: one line, so only the first line of `title` is kept. */
159
+ rename: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
160
+ chat: z.ZodString;
161
+ title: z.ZodString;
162
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
163
+ /** Put a chat among the archived ones, or back. It stays readable either way. */
164
+ archive: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
165
+ chat: z.ZodString;
166
+ archived: z.ZodBoolean;
167
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
128
168
  }, {
129
169
  message: import("@agentorg/sdk").EventSpec<z.ZodObject<{
130
170
  id: z.ZodString;
@@ -145,22 +185,37 @@ export declare const chat: import("@agentorg/sdk").RpcInterface<"chat", {
145
185
  input: z.ZodOptional<z.ZodString>;
146
186
  output: z.ZodOptional<z.ZodString>;
147
187
  }, z.core.$strip>>;
188
+ chat: z.ZodString;
148
189
  }, z.core.$strip>>;
149
190
  /** Text of the assistant message `id`, as it streams; its `message` event follows. */
150
191
  delta: import("@agentorg/sdk").EventSpec<z.ZodObject<{
192
+ chat: z.ZodString;
151
193
  id: z.ZodString;
152
194
  text: z.ZodString;
153
195
  }, z.core.$strip>>;
196
+ /** The agent's status, when it changes. */
154
197
  status: import("@agentorg/sdk").EventSpec<z.ZodObject<{
155
198
  state: z.ZodEnum<{
156
- error: "error";
157
199
  idle: "idle";
158
- thinking: "thinking";
159
- tool: "tool";
200
+ working: "working";
160
201
  }>;
161
- detail: z.ZodOptional<z.ZodObject<{
202
+ }, z.core.$strip>>;
203
+ /**
204
+ * A chat as it now is: it was started, renamed or archived, a message was sent in it, or one
205
+ * got no answer.
206
+ */
207
+ chat: import("@agentorg/sdk").EventSpec<z.ZodObject<{
208
+ id: z.ZodString;
209
+ title: z.ZodString;
210
+ at: z.ZodString;
211
+ latest: z.ZodOptional<z.ZodObject<{
212
+ id: z.ZodString;
213
+ at: z.ZodString;
214
+ }, z.core.$strip>>;
215
+ problem: z.ZodOptional<z.ZodObject<{
162
216
  code: z.ZodString;
163
217
  message: z.ZodString;
164
218
  }, z.core.$strip>>;
219
+ archived: z.ZodBoolean;
165
220
  }, z.core.$strip>>;
166
221
  }, 1>;