@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
@@ -0,0 +1,349 @@
1
+ import { defineInterface, method } from "@agentorg/sdk";
2
+ import { z } from "zod";
3
+ import { AgentModels, AgentStatus, Answers, Creatable, CreatableId } from "./agent-provider.js";
4
+ import { SKILL_FILE_MAX, SkillEntry, SkillName, SkillPath } from "./agent-settings.js";
5
+ import { ConnectionKind, ConnectionParams, ConnectionSecrets, ConnectionState, ConnectionStatus, ConnectionTarget, } from "./connection.js";
6
+ import { Id, SlotName } from "./hub.js";
7
+ import { ModelId } from "./llm-session.js";
8
+ import { FieldValues, LiveMode, LiveSurface, LiveTicket, Problem, ResultKind, Unit, UnitId, } from "./units.js";
9
+ const Time = z.string().max(64);
10
+ const ActorName = z.string().min(1).max(128);
11
+ const OnAgent = z.object({ agent: Id });
12
+ const OnConnection = z.object({ connection: Id });
13
+ const OnSkill = z.object({ name: SkillName });
14
+ const Purpose = z.string().max(2000);
15
+ /** A template's id. */
16
+ export const TemplateId = z
17
+ .string()
18
+ .regex(/^[a-z][a-z0-9-]*$/)
19
+ .max(64);
20
+ /** What a stack starts on: one base from an agent provider, with what it asks. */
21
+ export const StackBase = z.strictObject({
22
+ provider: Id,
23
+ creatable: CreatableId,
24
+ answers: Answers.optional(),
25
+ });
26
+ /**
27
+ * One unit of a stack, top to bottom. `needs` picks, by kind, which earlier unit (its position in
28
+ * `units`) gives what this one needs; a kind exactly one earlier unit gives needs no pick.
29
+ */
30
+ export const StackUnit = z.strictObject({
31
+ provider: Id,
32
+ unit: UnitId,
33
+ values: FieldValues.optional(),
34
+ needs: z.record(ResultKind, z.number().int().min(0)).optional(),
35
+ });
36
+ /** A stack as it is created: each unit may also carry secrets, used once and never saved. */
37
+ const FilledUnit = StackUnit.extend({ secrets: ConnectionSecrets.optional() });
38
+ /** `template` notes the template it started from, for display only. */
39
+ export const Stack = z.strictObject({
40
+ base: StackBase,
41
+ units: z.array(FilledUnit).max(64),
42
+ template: TemplateId.optional(),
43
+ });
44
+ /** A provider in a template: by its Actor's name, so a template works on another home. */
45
+ const ProviderName = z.string().min(1).max(128);
46
+ /**
47
+ * A saved stack of prefills: nothing in it is locked, and no secret is in it; management refuses a
48
+ * value for a secret field. A required field with no value must still be filled at creation.
49
+ * `from` notes the template it was copied from, for display only: later changes to that one don't
50
+ * reach this one.
51
+ */
52
+ export const Template = z.strictObject({
53
+ id: TemplateId,
54
+ title: z.string().min(1).max(128),
55
+ description: z.string().max(2000),
56
+ from: TemplateId.optional(),
57
+ base: StackBase.extend({ provider: ProviderName }),
58
+ units: z.array(StackUnit.extend({ provider: ProviderName })).max(64),
59
+ });
60
+ /** What is filled in for one unit of a template, by its position: prefills it replaces, and secrets. */
61
+ const Fill = z.strictObject({
62
+ values: FieldValues.optional(),
63
+ secrets: ConnectionSecrets.optional(),
64
+ });
65
+ /** A unit to add to a living agent: `needs` names, by kind, the instance to take each result from. */
66
+ const AddUnit = {
67
+ agent: Id,
68
+ unit: FilledUnit.omit({ needs: true }),
69
+ needs: z.record(ResultKind, Id).optional(),
70
+ };
71
+ /** A problem with a stack: on one unit (its position), or, with neither, on the whole. */
72
+ const StackProblem = Problem.extend({ unit: z.number().int().min(0).optional() });
73
+ /**
74
+ * One unit as an agent has it: what was filled in, never a secret. `instance` is management's own
75
+ * id for it, and `needs` names, by kind, the instance it took each result from.
76
+ */
77
+ const AppliedUnit = z.object({
78
+ instance: Id,
79
+ provider: Id,
80
+ unit: UnitId,
81
+ title: z.string().min(1).max(128),
82
+ values: FieldValues,
83
+ needs: z.record(ResultKind, Id),
84
+ status: z.object({
85
+ state: ConnectionState,
86
+ detail: z.string().max(2000).optional(),
87
+ /** What of it can be opened live, through `agents.live`. */
88
+ surfaces: z.array(LiveSurface).max(16).optional(),
89
+ }),
90
+ });
91
+ /** Where a connection came from, written once when it was made. */
92
+ export const ConnectionOrigin = z.object({
93
+ provider: Id,
94
+ kind: ConnectionKind,
95
+ target: ConnectionTarget,
96
+ /** The Actor that asked for it. */
97
+ madeBy: Id,
98
+ /** The agent it was made for, which it goes with; none when the person connected it. */
99
+ madeFor: Id.optional(),
100
+ at: Time,
101
+ });
102
+ /** One call an agent made through its control unit that changed something, or was refused. */
103
+ const ActivityEntry = z.object({
104
+ /** Its place in the log, newest highest. */
105
+ seq: z.number().int().min(0),
106
+ at: Time,
107
+ /** The agent that called. */
108
+ caller: Id,
109
+ tool: z.string().min(1).max(128),
110
+ /** What it was about: an agent, a connection, a skill or a unit's instance. */
111
+ target: z.string().max(256).optional(),
112
+ outcome: z.enum(["done", "refused"]),
113
+ /** Why it was refused. Never a message an agent sent, or a secret. */
114
+ reason: z.string().max(2000).optional(),
115
+ });
116
+ /** An agent as the list shows it: its status is its provider's. */
117
+ const AgentEntry = z.object({
118
+ agent: Id,
119
+ name: ActorName,
120
+ status: AgentStatus,
121
+ provider: Id,
122
+ creatable: CreatableId,
123
+ /** What it's for, as whoever made it said. */
124
+ purpose: Purpose.optional(),
125
+ /** The template it started from, for display only. */
126
+ template: TemplateId.optional(),
127
+ /** The agent that made it; `gone` once that agent has been removed. It is the person's either way. */
128
+ parent: z.object({ agent: Id, name: ActorName, gone: z.literal(true).optional() }).optional(),
129
+ });
130
+ /**
131
+ * `agents@1`: the agents the person has, each made from a creatable a connected agent provider
132
+ * offers. What each agent is doing is read from the agent's own `chat@1`.
133
+ */
134
+ export const agents = defineInterface({
135
+ name: "agents",
136
+ major: 1,
137
+ kind: "rpc",
138
+ methods: {
139
+ /** What every connected agent provider offers. */
140
+ creatable: method({
141
+ input: z.object({}),
142
+ output: z.object({ creatables: z.array(Creatable.extend({ provider: Id })) }),
143
+ }),
144
+ /** The agent providers connected now. */
145
+ providers: method({
146
+ input: z.object({}),
147
+ output: z.object({ providers: z.array(z.object({ provider: Id, name: ActorName })) }),
148
+ }),
149
+ /** Every base and unit the connected providers offer, each naming its provider. */
150
+ units: method({
151
+ input: z.object({}),
152
+ output: z.object({
153
+ bases: z.array(Creatable.extend({ provider: Id, providerName: ActorName })),
154
+ units: z.array(Unit.extend({ provider: Id, providerName: ActorName })),
155
+ }),
156
+ }),
157
+ /** The templates: what the app ships and what the person saved. */
158
+ templates: method({
159
+ input: z.object({}),
160
+ output: z.object({ templates: z.array(Template) }),
161
+ }),
162
+ /** Save a template, replacing the one of its id. A saved template holds no secret. */
163
+ saveTemplate: method({ input: Template, output: z.object({}) }),
164
+ removeTemplate: method({ input: z.object({ id: TemplateId }), output: z.object({}) }),
165
+ /** Check a stack, or a unit to add to a living agent, before anything runs. It changes nothing. */
166
+ check: method({
167
+ input: z.union([z.strictObject({ stack: Stack }), z.strictObject(AddUnit)]),
168
+ output: z.object({ problems: z.array(StackProblem).max(256) }),
169
+ }),
170
+ /**
171
+ * Make an agent, from a stack, or from a template with what is filled in for each of its units
172
+ * by position; nothing in a template is locked, so a caller changing more sends the stack. All
173
+ * or none: if any step fails, what this creation made is removed, last first.
174
+ */
175
+ create: method({
176
+ input: z.union([
177
+ z.strictObject({ stack: Stack, name: ActorName, purpose: Purpose.optional() }),
178
+ z.strictObject({
179
+ template: TemplateId,
180
+ fill: z.array(Fill).max(64).optional(),
181
+ answers: Answers.optional(),
182
+ name: ActorName,
183
+ purpose: Purpose.optional(),
184
+ }),
185
+ ]),
186
+ output: OnAgent,
187
+ }),
188
+ list: method({ input: z.object({}), output: z.object({ agents: z.array(AgentEntry) }) }),
189
+ /** What the agent is made of, in one read. */
190
+ get: method({
191
+ input: OnAgent,
192
+ output: AgentEntry.extend({
193
+ instructions: z.string().max(200_000),
194
+ /** Which unit gave each is its `instance`. */
195
+ skills: z.array(SkillEntry.extend({ instance: Id.optional() })),
196
+ mcp: z.array(z.object({
197
+ slot: SlotName,
198
+ connection: Id,
199
+ origin: ConnectionOrigin.optional(),
200
+ status: ConnectionStatus,
201
+ instance: Id.optional(),
202
+ })),
203
+ /** Its stack, top to bottom. */
204
+ units: z.array(AppliedUnit),
205
+ }),
206
+ }),
207
+ start: method({ input: OnAgent, output: z.object({}) }),
208
+ /**
209
+ * Stops the agent: whatever it was doing ends, and it does nothing until started; all else
210
+ * stays. This is the one way to stop an agent's work.
211
+ */
212
+ stop: method({ input: OnAgent, output: z.object({}) }),
213
+ /** The models the agent can use, and the one chosen, as its provider says. */
214
+ models: method({ input: OnAgent, output: AgentModels }),
215
+ /**
216
+ * Choose the model for the agent's next requests; with no `model`, go back to its provider's
217
+ * default. Refused `unknown` when the model isn't one of `models`.
218
+ */
219
+ setModel: method({
220
+ input: OnAgent.extend({ model: ModelId.optional() }),
221
+ output: z.object({}),
222
+ }),
223
+ /** Expose a skill or a connection to the agent; `as` names a connection's slot. */
224
+ expose: method({
225
+ input: z.union([
226
+ z.strictObject({ agent: Id, skill: SkillName }),
227
+ z.strictObject({ agent: Id, connection: Id, as: SlotName.optional() }),
228
+ ]),
229
+ output: z.object({ slot: SlotName.optional() }),
230
+ }),
231
+ unexpose: method({
232
+ input: z.union([
233
+ z.strictObject({ agent: Id, skill: SkillName }),
234
+ z.strictObject({ agent: Id, slot: SlotName }),
235
+ ]),
236
+ output: z.object({}),
237
+ }),
238
+ /** Add a unit to a living agent, below those it has; it takes effect at the next request. */
239
+ addUnit: method({ input: z.strictObject(AddUnit), output: z.object({ instance: Id }) }),
240
+ /** Remove a unit from a living agent: what it made goes. Refused `state` while another needs it. */
241
+ removeUnit: method({ input: z.object({ agent: Id, instance: Id }), output: z.object({}) }),
242
+ /**
243
+ * What agents did through their control units, newest first: each call that changed something,
244
+ * and each refusal. With `agent`, those it made or that were about it.
245
+ */
246
+ activity: method({
247
+ input: z.object({
248
+ agent: Id.optional(),
249
+ before: z.number().int().min(0).optional(),
250
+ limit: z.number().int().min(1).max(200).optional(),
251
+ }),
252
+ output: z.object({ entries: z.array(ActivityEntry), more: z.boolean() }),
253
+ }),
254
+ /**
255
+ * A one-time ticket to open one of a unit's surfaces live. For the person's gateway, which dials
256
+ * it and pipes the bytes to a page; it never reaches a page itself. No agent can ask for one.
257
+ */
258
+ live: method({
259
+ input: z.object({ agent: Id, instance: Id, surface: UnitId, mode: LiveMode }),
260
+ output: LiveTicket,
261
+ }),
262
+ /** Final: removes the units, last first, then the agent, and the connections made for it. */
263
+ remove: method({ input: OnAgent, output: z.object({}) }),
264
+ },
265
+ });
266
+ /** A connection as the list shows it. */
267
+ const ConnectionEntry = z.object({
268
+ connection: Id,
269
+ name: ActorName,
270
+ state: ConnectionState,
271
+ origin: ConnectionOrigin.optional(),
272
+ });
273
+ /** `connections@1`: the person's connections to MCP servers, through the connected providers. */
274
+ export const connections = defineInterface({
275
+ name: "connections",
276
+ major: 1,
277
+ kind: "rpc",
278
+ methods: {
279
+ /** The MCP providers connected now, each with the kinds it offers. */
280
+ providers: method({
281
+ input: z.object({}),
282
+ output: z.object({
283
+ providers: z.array(z.object({
284
+ provider: Id,
285
+ name: ActorName,
286
+ kinds: z.array(z.object({
287
+ kind: ConnectionKind,
288
+ title: z.string().min(1).max(128),
289
+ params: z.record(z.string(), z.json()),
290
+ secrets: z.record(z.string(), z.json()),
291
+ })),
292
+ })),
293
+ }),
294
+ }),
295
+ /** `secrets` go to the provider and nowhere else: they are never read back. */
296
+ create: method({
297
+ input: z.object({
298
+ provider: Id,
299
+ kind: ConnectionKind,
300
+ params: ConnectionParams,
301
+ secrets: ConnectionSecrets.optional(),
302
+ name: ActorName,
303
+ }),
304
+ output: OnConnection,
305
+ }),
306
+ list: method({
307
+ input: z.object({}),
308
+ output: z.object({ connections: z.array(ConnectionEntry) }),
309
+ }),
310
+ get: method({
311
+ input: OnConnection,
312
+ output: ConnectionEntry.omit({ state: true }).extend({ status: ConnectionStatus }),
313
+ }),
314
+ /** Final: every exposure of it goes with it. */
315
+ remove: method({ input: OnConnection, output: z.object({}) }),
316
+ },
317
+ });
318
+ const SkillFiles = z.record(SkillPath, z.string().max(SKILL_FILE_MAX));
319
+ /** `skills@1`: the person's skills, each a `SKILL.md` folder. */
320
+ export const skills = defineInterface({
321
+ name: "skills",
322
+ major: 1,
323
+ kind: "rpc",
324
+ methods: {
325
+ /**
326
+ * Add a skill from a folder on the Hub's machine or as files; its name and description come
327
+ * from `SKILL.md`. The same name replaces the skill, for every agent it's exposed to.
328
+ */
329
+ add: method({
330
+ input: z.union([
331
+ z.strictObject({ path: z.string().min(1).max(4096) }),
332
+ z.strictObject({ files: SkillFiles }),
333
+ ]),
334
+ output: SkillEntry,
335
+ }),
336
+ list: method({ input: z.object({}), output: z.object({ skills: z.array(SkillEntry) }) }),
337
+ /** The skill: its `SKILL.md`, the paths of its files, and the agents it's exposed to. */
338
+ get: method({
339
+ input: OnSkill,
340
+ output: SkillEntry.extend({
341
+ text: z.string().max(SKILL_FILE_MAX),
342
+ files: z.array(SkillPath),
343
+ agents: z.array(Id),
344
+ }),
345
+ }),
346
+ /** Final: it is taken off every agent it's exposed to. */
347
+ remove: method({ input: OnSkill, output: z.object({}) }),
348
+ },
349
+ });
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ /** One tool: `inputSchema` is the JSON Schema of its arguments, as its server states it. */
3
+ export declare const ToolEntry: z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
7
+ }, z.core.$strip>;
8
+ /**
9
+ * `tools@1`: a set of tools whose names and arguments are known only at run time. It is one fixed
10
+ * contract however the tools change, so a binding to it holds while they do: the Hub checks a
11
+ * call's envelope, and whoever runs the tool checks its arguments.
12
+ *
13
+ * A call is refused `unknown` when no tool has that name and `not_connected` when what runs the
14
+ * tools can't be reached now. A tool that ran and failed isn't a refusal: it answers with
15
+ * `failed`, and its `output` says why, for the caller's model to read.
16
+ *
17
+ * A provider fits what it has to these limits: it leaves out a tool whose name is too long or that
18
+ * won't fit one frame, cuts a long description, and cuts an output, saying that it did.
19
+ */
20
+ export declare const tools: import("@agentorg/sdk").RpcInterface<"tools", {
21
+ list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
22
+ tools: z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ description: z.ZodOptional<z.ZodString>;
25
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
26
+ }, z.core.$strip>>;
27
+ }, z.core.$strip>>;
28
+ /** Run one tool. `output` is its result as text. */
29
+ call: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
30
+ name: z.ZodString;
31
+ arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ output: z.ZodString;
34
+ failed: z.ZodOptional<z.ZodLiteral<true>>;
35
+ }, z.core.$strip>>;
36
+ }, {
37
+ /** The tools changed: `list` again. */
38
+ changed: import("@agentorg/sdk").EventSpec<z.ZodObject<{}, z.core.$strip>>;
39
+ }, 1>;
@@ -0,0 +1,43 @@
1
+ import { defineInterface, event, method } from "@agentorg/sdk";
2
+ import { z } from "zod";
3
+ const ToolName = z.string().min(1).max(128);
4
+ /** The most a call's output carries: what a model's function output can take. */
5
+ const OUTPUT_MAX = 200_000;
6
+ /** One tool: `inputSchema` is the JSON Schema of its arguments, as its server states it. */
7
+ export const ToolEntry = z.object({
8
+ name: ToolName,
9
+ description: z.string().max(16_384).optional(),
10
+ inputSchema: z.record(z.string(), z.json()),
11
+ });
12
+ /**
13
+ * `tools@1`: a set of tools whose names and arguments are known only at run time. It is one fixed
14
+ * contract however the tools change, so a binding to it holds while they do: the Hub checks a
15
+ * call's envelope, and whoever runs the tool checks its arguments.
16
+ *
17
+ * A call is refused `unknown` when no tool has that name and `not_connected` when what runs the
18
+ * tools can't be reached now. A tool that ran and failed isn't a refusal: it answers with
19
+ * `failed`, and its `output` says why, for the caller's model to read.
20
+ *
21
+ * A provider fits what it has to these limits: it leaves out a tool whose name is too long or that
22
+ * won't fit one frame, cuts a long description, and cuts an output, saying that it did.
23
+ */
24
+ export const tools = defineInterface({
25
+ name: "tools",
26
+ major: 1,
27
+ kind: "rpc",
28
+ methods: {
29
+ list: method({ input: z.object({}), output: z.object({ tools: z.array(ToolEntry) }) }),
30
+ /** Run one tool. `output` is its result as text. */
31
+ call: method({
32
+ input: z.object({ name: ToolName, arguments: z.record(z.string(), z.json()) }),
33
+ output: z.object({
34
+ output: z.string().max(OUTPUT_MAX),
35
+ failed: z.literal(true).optional(),
36
+ }),
37
+ }),
38
+ },
39
+ events: {
40
+ /** The tools changed: `list` again. */
41
+ changed: event(z.object({})),
42
+ },
43
+ });