@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
@@ -6,144 +6,57 @@ import { z } from "zod";
6
6
  */
7
7
  const Hash = z.string().regex(/^sha256-[0-9a-f]{64}$/);
8
8
  export const Id = z.string().min(1).max(128);
9
- /** A slot or export: `name` for an external Actor, `module.name` for a package Actor. */
9
+ /** A slot or export: `name`, or `module.name`. */
10
10
  export const Name = z
11
11
  .string()
12
12
  .regex(/^[a-z][A-Za-z0-9_]*(\.[a-z][A-Za-z0-9_]*)?$/)
13
13
  .max(129);
14
14
  const Empty = z.object({});
15
- export const Package = z.object({ hash: Hash, name: z.string(), version: z.string() });
16
- /** `hub.packages@1`: the content-addressed package store. */
17
- export const hubPackages = defineInterface({
18
- name: "hub.packages",
19
- major: 1,
20
- kind: "rpc",
21
- methods: {
22
- /** Add a `.agentorg` archive from a path on the Hub's machine; it is verified first. */
23
- add: method({
24
- input: z.object({ path: z.string().min(1).max(4096) }),
25
- output: z.object({ hash: Hash, manifest: z.record(z.string(), z.json()) }),
26
- }),
27
- list: method({ input: Empty, output: z.object({ packages: z.array(Package) }) }),
28
- get: method({
29
- input: z.object({ hash: Hash }),
30
- output: z.object({ hash: Hash, manifest: z.record(z.string(), z.json()) }),
31
- }),
32
- /** Refused while an Actor runs the package. */
33
- remove: method({ input: z.object({ hash: Hash }), output: Empty }),
34
- /**
35
- * Build a package from its source, given as data (`package.json` and files under `src/`, up to
36
- * 768 KiB), and add it as `add` does. It's `agentorg build`'s build, reading no tsconfig; its
37
- * files import only `@agentorg/sdk`, `@agentorg/interfaces`, `zod`, `react`, `react-dom` and
38
- * `@agentorg/kit` by name, and nothing outside the package's folder, never by a pattern. A build that fails is
39
- * `Refused("build")` with the build's message, so the source can be fixed and built again.
40
- */
41
- build: method({
42
- input: z.object({ files: z.record(z.string().min(1).max(256), z.string()) }),
43
- output: z.object({ hash: Hash, manifest: z.record(z.string(), z.json()) }),
44
- }),
45
- },
46
- });
47
15
  export const ActorState = z.enum(["created", "running", "stopped", "closed"]);
48
16
  export const Actor = z.object({
49
17
  actorId: Id,
50
18
  name: z.string(),
51
19
  /**
52
- * The package it runs, by hash; `external` for a program that connects itself; `builtin` for
53
- * the `hub` Actor, which is the core itself.
20
+ * `external` for a program that connects itself; `builtin` for the `hub` Actor, which is the
21
+ * core itself. An Actor an earlier release ran from a package keeps that package's hash.
54
22
  */
55
23
  package: z.union([Hash, z.literal("external"), z.literal("builtin")]),
56
24
  state: ActorState,
57
25
  /**
58
- * Whether it has a channel to the Hub now: an external Actor while its program is connected (the
59
- * person while the app runs: its gateway holds the person's channel), a package Actor while its
60
- * process is. The built-in Actors are the Hub itself and have none. `state` is what was asked
61
- * for and this is what is: a running package Actor isn't connected while its process starts or
62
- * restarts, and a stopping one stays connected until its process has gone.
26
+ * Whether it has a channel to the Hub now: while its program is connected (the person while the
27
+ * app runs: its gateway holds the person's channel). The hub is the core itself and has none.
63
28
  */
64
29
  connected: z.boolean(),
65
- /** Times the Hub restarted its process after a crash; 0 for Actors without one. */
66
- restarts: z.number().int().min(0),
67
- /** How its process last ended on its own, if it has: an exit code or a signal, and when. */
68
- lastExit: z
69
- .object({ code: z.number().int().nullable(), signal: z.string().nullable(), at: z.string() })
70
- .optional(),
71
- /**
72
- * For a package Actor: whether this machine can run its host process now, and if not, why and
73
- * what to do about it.
74
- */
75
- host: z.object({ available: z.boolean(), reason: z.string().optional() }).optional(),
76
- /** For a package Actor: its view modules, which the person's shell can place. */
77
- views: z.array(z.string()).optional(),
78
- /**
79
- * The Actor it was created for, when a manager created it on another's behalf (the installer
80
- * names its caller). Provenance only: the Hub grants nothing from it; only a rule the person
81
- * turned on may act on it.
82
- */
83
- installedFor: Id.optional(),
84
30
  });
85
- /** One line of an Actor's log, from its `ctx.log` or its process's own output. */
86
- export const LogLine = z.object({
87
- level: z.enum(["info", "warn", "error"]),
88
- message: z.string(),
89
- data: z.record(z.string(), z.json()).optional(),
90
- module: z.string().optional(),
91
- at: z.string(),
92
- });
93
- /** `hub.actors@1`: Actors and their lifecycle. */
31
+ /** `hub.actors@1`: Actors: who may join the Hub. */
94
32
  export const hubActors = defineInterface({
95
33
  name: "hub.actors",
96
34
  major: 1,
97
35
  kind: "rpc",
98
36
  methods: {
99
37
  /**
100
- * With a package, an Actor that runs it; without, an external one, whose credential is returned
101
- * once. `bindings` wire the new Actor's slots at once, with the caller's export-side authority
102
- * (the creation is the slot side's yes), for example to its own `hub.grants@1`. `for` names
103
- * the Actor it is made for, recorded as `installedFor`; only a manager may give it.
38
+ * An Actor for a program that connects itself, with a credential returned once. `bindings` wire the new Actor's slots at once, with the caller's export-side authority
39
+ * (the creation is the slot side's yes), for example to its own `hub.grants@1`.
104
40
  */
105
41
  create: method({
106
42
  input: z.object({
107
43
  name: z.string().min(1).max(128),
108
- package: Hash.optional(),
109
- for: Id.optional(),
110
44
  bindings: z
111
45
  .array(z.object({ slot: Name, provider: Id, export: Name }))
112
46
  .max(64)
113
47
  .optional(),
114
48
  }),
115
- output: z.object({ actorId: Id, credential: z.string().optional() }),
49
+ output: z.object({ actorId: Id, credential: z.string() }),
116
50
  }),
117
51
  list: method({ input: Empty, output: z.object({ actors: z.array(Actor) }) }),
118
52
  get: method({ input: z.object({ actorId: Id }), output: Actor }),
119
- start: method({ input: z.object({ actorId: Id }), output: Empty }),
120
- stop: method({ input: z.object({ actorId: Id }), output: Empty }),
121
53
  /** Final: its bindings, both ways, are removed. */
122
54
  close: method({ input: z.object({ actorId: Id }), output: Empty }),
123
- /**
124
- * Run another package as the same package Actor: its id, its stores and every binding whose
125
- * interfaces still match stay. A binding through a slot or export the new package drops, or
126
- * declares as another interface, is dropped and listed in `dropped`; the new package's own
127
- * wiring is made where its slot is unbound. A running Actor restarts on the new package.
128
- * Only a manager may upgrade: the new package runs as the Actor and keeps what it was granted
129
- * (its bindings and its store), which only a manager could grant anyway.
130
- */
131
- upgrade: method({
132
- input: z.object({ actorId: Id, package: Hash }),
133
- output: z.object({
134
- dropped: z.array(z.object({ consumer: Id, slot: Name, provider: Id, export: Name })),
135
- }),
136
- }),
137
- /** Its newest log lines, oldest first. */
138
- logs: method({
139
- input: z.object({ actorId: Id, limit: z.number().int().min(1).max(1000).optional() }),
140
- output: z.object({ lines: z.array(LogLine) }),
141
- }),
142
55
  },
143
56
  events: {
144
57
  /**
145
- * An Actor's record may differ: it was made, started, stopped or closed, its process exited,
146
- * or it connected or went (`connected`). Read it again with `get` or `list`.
58
+ * An Actor's record may differ: it was made or closed, or it connected or went (`connected`).
59
+ * Read it again with `get` or `list`.
147
60
  */
148
61
  changed: event(z.object({ actor: Id })),
149
62
  },
@@ -162,90 +75,36 @@ export const Binding = z.object({
162
75
  /** A slot made at run time by `hub.grants.expose`: it goes with this binding. */
163
76
  exposed: z.literal(true).optional(),
164
77
  });
165
- export const BindingRequest = z.object({
166
- requestId: Id,
167
- ...Wiring,
168
- /** The end the requester lacks: `export` (provider, holders, managers) or `slot` (consumer, managers). */
169
- needs: z.enum(["export", "slot"]),
170
- reason: z.string(),
171
- requestedBy: Id,
172
- at: z.string(),
173
- /**
174
- * A request to expose: `slot` is the name the slot will have on `consumer`, made when it is
175
- * approved. Approve it with `expose({provider, export, to: consumer, as: slot})`.
176
- */
177
- exposed: z.literal(true).optional(),
178
- });
179
78
  /**
180
79
  * `hub.grants@1`: binding with the caller's own authority, so it is safe to give any Actor. A
181
80
  * binding needs both ends: the export side (the provider, an Actor already bound to that export,
182
- * or a manager) and the slot side (the consumer itself, or a manager). With both, `bind` binds.
183
- * With one, it approves an open request from the other end, or becomes a request to that end's
184
- * approvers. With neither it is refused.
81
+ * or a manager) and the slot side (the consumer itself, or a manager). Without both it is refused.
185
82
  */
186
83
  export const hubGrants = defineInterface({
187
84
  name: "hub.grants",
188
85
  major: 1,
189
86
  kind: "rpc",
190
87
  methods: {
191
- /** A request made by `bind` has an empty reason; `request` gives one. */
192
- bind: method({
193
- input: z.object(Wiring),
194
- output: z.union([
195
- z.object({ bound: z.literal(true) }),
196
- z.object({ bound: z.literal(false), requestId: Id }),
197
- ]),
198
- }),
88
+ bind: method({ input: z.object(Wiring), output: z.object({ bound: z.literal(true) }) }),
199
89
  /** The consumer, the provider or a manager may unbind. */
200
90
  unbind: method({ input: z.object({ consumer: Id, slot: Name }), output: Empty }),
201
91
  /**
202
92
  * Expose an `rpc` export to one Actor: a slot made on `to`, typed by the export's interface,
203
93
  * named `as` (by default the provider's name camelCased, `_`, and the export's last part, made
204
- * unique on `to`), and bound to the export, in one step. Its authority is a binding's: with
205
- * both ends it is made; with one, it is a request to the other end's approvers, who approve it
206
- * by calling `expose` with the request's fields. The same export already exposed to `to`
207
- * gives that slot back.
94
+ * unique on `to`), and bound to the export, in one step. Its authority is a binding's. The same export already
95
+ * exposed to `to` gives that slot back.
208
96
  */
209
97
  expose: method({
210
98
  input: z.object({ provider: Id, export: Name, to: Id, as: SlotName.optional() }),
211
- output: z.union([
212
- z.object({ exposed: z.literal(true), slot: SlotName }),
213
- z.object({ exposed: z.literal(false), slot: SlotName, requestId: Id }),
214
- ]),
99
+ output: z.object({ exposed: z.literal(true), slot: SlotName }),
215
100
  }),
216
101
  /** Remove a slot made by `expose`, with its binding: as `unbind`, the consumer, the provider or a manager may. */
217
102
  unexpose: method({ input: z.object({ to: Id, slot: SlotName }), output: Empty }),
218
- request: method({
219
- input: z.object({ ...Wiring, reason: z.string().min(1).max(1000) }),
220
- output: z.object({ requestId: Id }),
221
- }),
222
- /** The open requests the caller could approve. */
223
- requests: method({ input: Empty, output: z.object({ requests: z.array(BindingRequest) }) }),
224
- decline: method({ input: z.object({ requestId: Id }), output: Empty }),
225
- /**
226
- * The caller's own requests and how each stands, newest first: how a requester that missed
227
- * `decided` learns the outcome.
228
- */
229
- mine: method({
230
- input: z.object({ limit: z.number().int().min(1).max(1000).optional() }),
231
- output: z.object({
232
- requests: z.array(BindingRequest.extend({ status: z.enum(["open", "approved", "declined", "closed"]) })),
233
- }),
234
- }),
235
- },
236
- events: {
237
- /** A request the subscriber could approve. */
238
- requested: event(BindingRequest),
239
- /**
240
- * A request the subscriber could approve, or made, was approved (its binding made), declined,
241
- * or closed (its slot was bound to something else, or one end went away).
242
- */
243
- decided: event(z.object({ request: BindingRequest, status: z.enum(["approved", "declined", "closed"]) })),
244
103
  },
245
104
  });
246
105
  /**
247
106
  * `hub.bindings@1`: management scope. An Actor bound to it is a manager: it holds both ends of
248
- * every binding and is an approver of every request, acting through `hub.grants@1`, which it needs
107
+ * every binding, acting through `hub.grants@1`, which it needs
249
108
  * as well. Here, the manager-wide reads.
250
109
  */
251
110
  export const hubBindings = defineInterface({
@@ -264,7 +123,6 @@ export const ExportEntry = z.object({
264
123
  export: Name,
265
124
  interface: z.string(),
266
125
  hash: Hash,
267
- dynamic: z.boolean(),
268
126
  });
269
127
  /** `hub.exports@1`: what each Actor offers right now. */
270
128
  export const hubExports = defineInterface({
@@ -1,12 +1,12 @@
1
1
  export { Account, accountLogin, LoginState } from "./account-login.js";
2
- export { ChatMessage, ChatState, ChatStatus, ChatTool, chat } from "./chat.js";
3
- export { httpEgress } from "./http-egress.js";
4
- export { Actor, ActorState, AuditEntry, Binding, BindingRequest, ExportEntry, hubActors, hubAudit, hubBindings, hubExports, hubGrants, hubPackages, LogLine, Package, } from "./hub.js";
5
- export { Composition, installer } from "./installer.js";
2
+ export { AgentStatus, Answers, agentProvider, Creatable, CreatableId, } from "./agent-provider.js";
3
+ export { agentSettings, SKILL_FILE_MAX, SkillEntry, SkillName, SkillPath, } from "./agent-settings.js";
4
+ export { CHAT_TITLE_MAX, ChatEntry, ChatMessage, ChatStatus, ChatTool, chat, } from "./chat.js";
5
+ export { ConnectionKind, ConnectionParams, ConnectionSecrets, ConnectionState, ConnectionStatus, ConnectionTarget, ConnectionTool, } from "./connection.js";
6
+ export { FOLDERS_MAX, folders } from "./folders.js";
7
+ export { Actor, ActorState, AuditEntry, Binding, ExportEntry, hubActors, hubAudit, hubBindings, hubExports, hubGrants, SlotName, } from "./hub.js";
6
8
  export { kv } from "./kv.js";
7
- export { layout, Placement } from "./layout.js";
8
9
  export { Item, llmSession, OutputItem, Tool } from "./llm-session.js";
9
- export { appRules, Rule } from "./rules.js";
10
- export { storageAdmin } from "./storage-admin.js";
11
- export { uiShell } from "./ui-shell.js";
12
- export { uiView } from "./ui-view.js";
10
+ export { agents, ConnectionOrigin, connections, Stack, StackBase, StackUnit, skills, Template, TemplateId, } from "./manager.js";
11
+ export { ToolEntry, tools } from "./tools.js";
12
+ export { Field, FieldId, FieldValue, FieldValues, Form, LiveMode, LiveSurface, LiveTicket, Problem, ResultKind, Unit, UnitId, UnitResult, unitProvider, } from "./units.js";
@@ -1,12 +1,12 @@
1
1
  export { Account, accountLogin, LoginState } from "./account-login.js";
2
- export { ChatMessage, ChatState, ChatStatus, ChatTool, chat } from "./chat.js";
3
- export { httpEgress } from "./http-egress.js";
4
- export { Actor, ActorState, AuditEntry, Binding, BindingRequest, ExportEntry, hubActors, hubAudit, hubBindings, hubExports, hubGrants, hubPackages, LogLine, Package, } from "./hub.js";
5
- export { Composition, installer } from "./installer.js";
2
+ export { AgentStatus, Answers, agentProvider, Creatable, CreatableId, } from "./agent-provider.js";
3
+ export { agentSettings, SKILL_FILE_MAX, SkillEntry, SkillName, SkillPath, } from "./agent-settings.js";
4
+ export { CHAT_TITLE_MAX, ChatEntry, ChatMessage, ChatStatus, ChatTool, chat, } from "./chat.js";
5
+ export { ConnectionKind, ConnectionParams, ConnectionSecrets, ConnectionState, ConnectionStatus, ConnectionTarget, ConnectionTool, } from "./connection.js";
6
+ export { FOLDERS_MAX, folders } from "./folders.js";
7
+ export { Actor, ActorState, AuditEntry, Binding, ExportEntry, hubActors, hubAudit, hubBindings, hubExports, hubGrants, SlotName, } from "./hub.js";
6
8
  export { kv } from "./kv.js";
7
- export { layout, Placement } from "./layout.js";
8
9
  export { Item, llmSession, OutputItem, Tool } from "./llm-session.js";
9
- export { appRules, Rule } from "./rules.js";
10
- export { storageAdmin } from "./storage-admin.js";
11
- export { uiShell } from "./ui-shell.js";
12
- export { uiView } from "./ui-view.js";
10
+ export { agents, ConnectionOrigin, connections, Stack, StackBase, StackUnit, skills, Template, TemplateId, } from "./manager.js";
11
+ export { ToolEntry, tools } from "./tools.js";
12
+ export { Field, FieldId, FieldValue, FieldValues, Form, LiveMode, LiveSurface, LiveTicket, Problem, ResultKind, Unit, UnitId, UnitResult, unitProvider, } from "./units.js";
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * `kv@1`: a key-value store of JSON values, the state slot a host module uses. A storage provider
4
- * keeps one store per consumer slot, so the store is the slot's own; `list` pages through its keys.
3
+ * `kv@1`: a key-value store of JSON values, the shape of the engine's and the app's local stores;
4
+ * `list` pages through its keys.
5
5
  */
6
6
  export declare const kv: import("@agentorg/sdk").RpcInterface<"kv", {
7
7
  /** The value under `key`; `value` is absent when there is none, and a stored `null` is `null`. */
@@ -2,8 +2,8 @@ import { defineInterface, method } from "@agentorg/sdk";
2
2
  import { z } from "zod";
3
3
  const Key = z.string().min(1).max(1024);
4
4
  /**
5
- * `kv@1`: a key-value store of JSON values, the state slot a host module uses. A storage provider
6
- * keeps one store per consumer slot, so the store is the slot's own; `list` pages through its keys.
5
+ * `kv@1`: a key-value store of JSON values, the shape of the engine's and the app's local stores;
6
+ * `list` pages through its keys.
7
7
  */
8
8
  export const kv = defineInterface({
9
9
  name: "kv",
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ /** A model's id, as whoever offers the model names it. */
3
+ export declare const ModelId: z.ZodString;
2
4
  /** One item of a conversation: what was said, a function the model called, and its output. */
3
5
  export declare const Item: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
6
  type: z.ZodLiteral<"message">;
@@ -1,7 +1,8 @@
1
1
  import { defineInterface, event, method } from "@agentorg/sdk";
2
2
  import { z } from "zod";
3
3
  const RequestId = z.string().min(1).max(128);
4
- const ModelId = z.string().min(1).max(128);
4
+ /** A model's id, as whoever offers the model names it. */
5
+ export const ModelId = z.string().min(1).max(128);
5
6
  const CallId = z.string().min(1).max(256);
6
7
  /** A function tool's name, as the Responses API takes it. */
7
8
  const ToolName = z.string().regex(/^[A-Za-z0-9_-]{1,64}$/);