copilotz 0.0.0-stage → 1.0.0-rc.2

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 (1261) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/LICENSE +21 -0
  3. package/README.md +876 -2
  4. package/exporters/mod.d.ts +27 -0
  5. package/exporters/mod.js +27 -0
  6. package/exporters/otlp.d.ts +257 -0
  7. package/exporters/otlp.js +71 -0
  8. package/exporters/prometheus.d.ts +12 -0
  9. package/exporters/prometheus.js +40 -0
  10. package/hosts/orgs/mod.d.ts +82 -0
  11. package/hosts/orgs/mod.js +519 -0
  12. package/hosts/terminal/composer.d.ts +22 -0
  13. package/hosts/terminal/composer.js +25 -0
  14. package/hosts/terminal/contract.d.ts +84 -0
  15. package/hosts/terminal/contract.js +10 -0
  16. package/hosts/terminal/host.d.ts +45 -0
  17. package/hosts/terminal/host.js +203 -0
  18. package/hosts/terminal/mod.d.ts +18 -0
  19. package/hosts/terminal/mod.js +18 -0
  20. package/hosts/terminal/part.d.ts +8 -0
  21. package/hosts/terminal/part.js +24 -0
  22. package/hosts/terminal/scrollback.d.ts +13 -0
  23. package/hosts/terminal/scrollback.js +32 -0
  24. package/hosts/web/assets.d.ts +45 -0
  25. package/hosts/web/assets.js +125 -0
  26. package/hosts/web/base.d.ts +6 -0
  27. package/hosts/web/base.js +16 -0
  28. package/hosts/web/files.d.ts +24 -0
  29. package/hosts/web/files.js +83 -0
  30. package/hosts/web/host.d.ts +31 -0
  31. package/hosts/web/host.js +163 -0
  32. package/hosts/web/install.d.ts +8 -0
  33. package/hosts/web/install.js +75 -0
  34. package/hosts/web/lazy.d.ts +21 -0
  35. package/hosts/web/lazy.js +50 -0
  36. package/hosts/web/mod.d.ts +69 -0
  37. package/hosts/web/mod.js +76 -0
  38. package/hosts/web/node/bundle.d.ts +7 -0
  39. package/hosts/web/node/bundle.js +46 -0
  40. package/hosts/web/node/mod.d.ts +29 -0
  41. package/hosts/web/node/mod.js +29 -0
  42. package/hosts/web/node/serve.d.ts +52 -0
  43. package/hosts/web/node/serve.js +33 -0
  44. package/hosts/web/orgs.d.ts +112 -0
  45. package/hosts/web/orgs.js +225 -0
  46. package/hosts/web/palette/list.d.ts +22 -0
  47. package/hosts/web/palette/list.js +51 -0
  48. package/hosts/web/palette/palette.d.ts +35 -0
  49. package/hosts/web/palette/palette.js +295 -0
  50. package/hosts/web/palette/rank.d.ts +16 -0
  51. package/hosts/web/palette/rank.js +110 -0
  52. package/hosts/web/palette/row.d.ts +19 -0
  53. package/hosts/web/palette/row.js +37 -0
  54. package/hosts/web/palette/sources.d.ts +10 -0
  55. package/hosts/web/palette/sources.js +67 -0
  56. package/hosts/web/palette/state.d.ts +108 -0
  57. package/hosts/web/palette/state.js +23 -0
  58. package/hosts/web/part.d.ts +17 -0
  59. package/hosts/web/part.js +55 -0
  60. package/hosts/web/pwa.d.ts +71 -0
  61. package/hosts/web/pwa.js +189 -0
  62. package/hosts/web/routes.d.ts +89 -0
  63. package/hosts/web/routes.js +132 -0
  64. package/hosts/web/server.d.ts +121 -0
  65. package/hosts/web/server.js +255 -0
  66. package/hosts/web/session.d.ts +10 -0
  67. package/hosts/web/session.js +1 -0
  68. package/hosts/web/signin.d.ts +21 -0
  69. package/hosts/web/signin.js +184 -0
  70. package/hosts/web/style.d.ts +8 -0
  71. package/hosts/web/style.js +34 -0
  72. package/hosts/web/theme/context.d.ts +2 -0
  73. package/hosts/web/theme/context.js +8 -0
  74. package/hosts/web/theme/copilotz.d.ts +13 -0
  75. package/hosts/web/theme/copilotz.js +69 -0
  76. package/hosts/web/theme/css.d.ts +35 -0
  77. package/hosts/web/theme/css.js +116 -0
  78. package/hosts/web/theme/default.d.ts +63 -0
  79. package/hosts/web/theme/default.js +179 -0
  80. package/hosts/web/theme/files/OFL-Manrope.txt +93 -0
  81. package/hosts/web/theme/files/OFL-SpaceGrotesk.txt +93 -0
  82. package/hosts/web/theme/files/faces.d.ts +2 -0
  83. package/hosts/web/theme/files/faces.js +28 -0
  84. package/hosts/web/theme/files/icon-png.d.ts +2 -0
  85. package/hosts/web/theme/files/icon-png.js +2 -0
  86. package/hosts/web/theme/files/manrope-v23-latin-ext.d.ts +2 -0
  87. package/hosts/web/theme/files/manrope-v23-latin-ext.js +2 -0
  88. package/hosts/web/theme/files/manrope-v23-latin.d.ts +2 -0
  89. package/hosts/web/theme/files/manrope-v23-latin.js +2 -0
  90. package/hosts/web/theme/files/mod.d.ts +21 -0
  91. package/hosts/web/theme/files/mod.js +35 -0
  92. package/hosts/web/theme/files/space-grotesk-v22-latin-ext.d.ts +2 -0
  93. package/hosts/web/theme/files/space-grotesk-v22-latin-ext.js +2 -0
  94. package/hosts/web/theme/files/space-grotesk-v22-latin.d.ts +2 -0
  95. package/hosts/web/theme/files/space-grotesk-v22-latin.js +2 -0
  96. package/hosts/web/theme/files/temml-v0140.d.ts +2 -0
  97. package/hosts/web/theme/files/temml-v0140.js +2 -0
  98. package/hosts/web/theme/icon.d.ts +3 -0
  99. package/hosts/web/theme/icon.js +26 -0
  100. package/hosts/web/theme/own-path.d.ts +8 -0
  101. package/hosts/web/theme/own-path.js +14 -0
  102. package/hosts/web/theme/picture.d.ts +14 -0
  103. package/hosts/web/theme/picture.js +70 -0
  104. package/hosts/web/theme/png.d.ts +19 -0
  105. package/hosts/web/theme/png.js +387 -0
  106. package/hosts/web/tickets.d.ts +20 -0
  107. package/hosts/web/tickets.js +21 -0
  108. package/hosts/web/toolkit/ago.d.ts +6 -0
  109. package/hosts/web/toolkit/ago.js +56 -0
  110. package/hosts/web/toolkit/anchor.d.ts +9 -0
  111. package/hosts/web/toolkit/anchor.js +39 -0
  112. package/hosts/web/toolkit/audio-player.d.ts +29 -0
  113. package/hosts/web/toolkit/audio-player.js +159 -0
  114. package/hosts/web/toolkit/autocomplete.d.ts +48 -0
  115. package/hosts/web/toolkit/autocomplete.js +74 -0
  116. package/hosts/web/toolkit/avatar.d.ts +25 -0
  117. package/hosts/web/toolkit/avatar.js +70 -0
  118. package/hosts/web/toolkit/badge.d.ts +15 -0
  119. package/hosts/web/toolkit/badge.js +26 -0
  120. package/hosts/web/toolkit/button.d.ts +30 -0
  121. package/hosts/web/toolkit/button.js +49 -0
  122. package/hosts/web/toolkit/bytes.d.ts +2 -0
  123. package/hosts/web/toolkit/bytes.js +13 -0
  124. package/hosts/web/toolkit/card.d.ts +18 -0
  125. package/hosts/web/toolkit/card.js +16 -0
  126. package/hosts/web/toolkit/checkbox.d.ts +13 -0
  127. package/hosts/web/toolkit/checkbox.js +22 -0
  128. package/hosts/web/toolkit/chip.d.ts +24 -0
  129. package/hosts/web/toolkit/chip.js +33 -0
  130. package/hosts/web/toolkit/clock.d.ts +6 -0
  131. package/hosts/web/toolkit/clock.js +12 -0
  132. package/hosts/web/toolkit/code-block.d.ts +45 -0
  133. package/hosts/web/toolkit/code-block.js +110 -0
  134. package/hosts/web/toolkit/code-lines.d.ts +15 -0
  135. package/hosts/web/toolkit/code-lines.js +33 -0
  136. package/hosts/web/toolkit/copy-button.d.ts +6 -0
  137. package/hosts/web/toolkit/copy-button.js +22 -0
  138. package/hosts/web/toolkit/cx.d.ts +2 -0
  139. package/hosts/web/toolkit/cx.js +2 -0
  140. package/hosts/web/toolkit/detail-list.d.ts +39 -0
  141. package/hosts/web/toolkit/detail-list.js +39 -0
  142. package/hosts/web/toolkit/detail-value.d.ts +22 -0
  143. package/hosts/web/toolkit/detail-value.js +131 -0
  144. package/hosts/web/toolkit/dialog.d.ts +29 -0
  145. package/hosts/web/toolkit/dialog.js +51 -0
  146. package/hosts/web/toolkit/drawer.d.ts +21 -0
  147. package/hosts/web/toolkit/drawer.js +34 -0
  148. package/hosts/web/toolkit/empty-state.d.ts +25 -0
  149. package/hosts/web/toolkit/empty-state.js +24 -0
  150. package/hosts/web/toolkit/field.d.ts +25 -0
  151. package/hosts/web/toolkit/field.js +32 -0
  152. package/hosts/web/toolkit/formula-style.d.ts +7 -0
  153. package/hosts/web/toolkit/formula-style.js +309 -0
  154. package/hosts/web/toolkit/formula.d.ts +17 -0
  155. package/hosts/web/toolkit/formula.js +36 -0
  156. package/hosts/web/toolkit/humanize.d.ts +13 -0
  157. package/hosts/web/toolkit/humanize.js +41 -0
  158. package/hosts/web/toolkit/icon-button.d.ts +30 -0
  159. package/hosts/web/toolkit/icon-button.js +38 -0
  160. package/hosts/web/toolkit/icon.d.ts +87 -0
  161. package/hosts/web/toolkit/icon.js +74 -0
  162. package/hosts/web/toolkit/inline-edit.d.ts +23 -0
  163. package/hosts/web/toolkit/inline-edit.js +57 -0
  164. package/hosts/web/toolkit/input.d.ts +19 -0
  165. package/hosts/web/toolkit/input.js +33 -0
  166. package/hosts/web/toolkit/kbd.d.ts +6 -0
  167. package/hosts/web/toolkit/kbd.js +12 -0
  168. package/hosts/web/toolkit/kept.d.ts +16 -0
  169. package/hosts/web/toolkit/kept.js +28 -0
  170. package/hosts/web/toolkit/line-editor.d.ts +44 -0
  171. package/hosts/web/toolkit/line-editor.js +167 -0
  172. package/hosts/web/toolkit/logo.d.ts +25 -0
  173. package/hosts/web/toolkit/logo.js +47 -0
  174. package/hosts/web/toolkit/long-text.d.ts +15 -0
  175. package/hosts/web/toolkit/long-text.js +30 -0
  176. package/hosts/web/toolkit/markdown/blocks.d.ts +46 -0
  177. package/hosts/web/toolkit/markdown/blocks.js +184 -0
  178. package/hosts/web/toolkit/markdown/markdown.d.ts +15 -0
  179. package/hosts/web/toolkit/markdown/markdown.js +122 -0
  180. package/hosts/web/toolkit/markdown/spans.d.ts +34 -0
  181. package/hosts/web/toolkit/markdown/spans.js +91 -0
  182. package/hosts/web/toolkit/mathml.d.ts +14 -0
  183. package/hosts/web/toolkit/mathml.js +18 -0
  184. package/hosts/web/toolkit/menu.d.ts +57 -0
  185. package/hosts/web/toolkit/menu.js +147 -0
  186. package/hosts/web/toolkit/modal.d.ts +19 -0
  187. package/hosts/web/toolkit/modal.js +41 -0
  188. package/hosts/web/toolkit/nav-item.d.ts +33 -0
  189. package/hosts/web/toolkit/nav-item.js +41 -0
  190. package/hosts/web/toolkit/notice.d.ts +24 -0
  191. package/hosts/web/toolkit/notice.js +36 -0
  192. package/hosts/web/toolkit/page.d.ts +54 -0
  193. package/hosts/web/toolkit/page.js +86 -0
  194. package/hosts/web/toolkit/popover.d.ts +40 -0
  195. package/hosts/web/toolkit/popover.js +95 -0
  196. package/hosts/web/toolkit/resample.d.ts +10 -0
  197. package/hosts/web/toolkit/resample.js +31 -0
  198. package/hosts/web/toolkit/resize-handle.d.ts +26 -0
  199. package/hosts/web/toolkit/resize-handle.js +67 -0
  200. package/hosts/web/toolkit/select.d.ts +14 -0
  201. package/hosts/web/toolkit/select.js +19 -0
  202. package/hosts/web/toolkit/sheet.d.ts +13 -0
  203. package/hosts/web/toolkit/sheet.js +2 -0
  204. package/hosts/web/toolkit/skeleton.d.ts +17 -0
  205. package/hosts/web/toolkit/skeleton.js +13 -0
  206. package/hosts/web/toolkit/spinner.d.ts +13 -0
  207. package/hosts/web/toolkit/spinner.js +23 -0
  208. package/hosts/web/toolkit/tabs.d.ts +37 -0
  209. package/hosts/web/toolkit/tabs.js +90 -0
  210. package/hosts/web/toolkit/temml.d.ts +8 -0
  211. package/hosts/web/toolkit/temml.js +29 -0
  212. package/hosts/web/toolkit/terminal-theme.d.ts +18 -0
  213. package/hosts/web/toolkit/terminal-theme.js +83 -0
  214. package/hosts/web/toolkit/terminal.d.ts +58 -0
  215. package/hosts/web/toolkit/terminal.js +260 -0
  216. package/hosts/web/toolkit/textarea.d.ts +13 -0
  217. package/hosts/web/toolkit/textarea.js +43 -0
  218. package/hosts/web/toolkit/time.d.ts +12 -0
  219. package/hosts/web/toolkit/time.js +37 -0
  220. package/hosts/web/toolkit/title.d.ts +3 -0
  221. package/hosts/web/toolkit/title.js +10 -0
  222. package/hosts/web/toolkit/tooltip.d.ts +20 -0
  223. package/hosts/web/toolkit/tooltip.js +71 -0
  224. package/hosts/web/toolkit/waveform.d.ts +33 -0
  225. package/hosts/web/toolkit/waveform.js +107 -0
  226. package/hosts/web/toolkit/xterm-style.d.ts +3 -0
  227. package/hosts/web/toolkit/xterm-style.js +67 -0
  228. package/hosts/web/toolkit/xterm.d.ts +23 -0
  229. package/hosts/web/toolkit/xterm.js +44 -0
  230. package/hosts/web/update.d.ts +8 -0
  231. package/hosts/web/update.js +28 -0
  232. package/package.json +203 -4
  233. package/plugins/access/accounts/actions/callback.d.ts +2 -0
  234. package/plugins/access/accounts/actions/callback.js +52 -0
  235. package/plugins/access/accounts/actions/complete.d.ts +1 -0
  236. package/plugins/access/accounts/actions/complete.js +42 -0
  237. package/plugins/access/accounts/actions/connect.d.ts +1 -0
  238. package/plugins/access/accounts/actions/connect.js +23 -0
  239. package/plugins/access/accounts/actions/disconnect.d.ts +1 -0
  240. package/plugins/access/accounts/actions/disconnect.js +48 -0
  241. package/plugins/access/accounts/actions/refresh.d.ts +1 -0
  242. package/plugins/access/accounts/actions/refresh.js +48 -0
  243. package/plugins/access/accounts/actions/token.d.ts +1 -0
  244. package/plugins/access/accounts/actions/token.js +54 -0
  245. package/plugins/access/accounts/collections/account.d.ts +115 -0
  246. package/plugins/access/accounts/collections/account.js +59 -0
  247. package/plugins/access/accounts/collections/flow.d.ts +72 -0
  248. package/plugins/access/accounts/collections/flow.js +20 -0
  249. package/plugins/access/accounts/contract.d.ts +149 -0
  250. package/plugins/access/accounts/contract.js +1 -0
  251. package/plugins/access/accounts/events/changed.d.ts +8 -0
  252. package/plugins/access/accounts/events/changed.js +14 -0
  253. package/plugins/access/accounts/mod.d.ts +52 -0
  254. package/plugins/access/accounts/mod.js +116 -0
  255. package/plugins/access/accounts/resources/chatgpt.d.ts +17 -0
  256. package/plugins/access/accounts/resources/chatgpt.js +52 -0
  257. package/plugins/access/accounts/resources/models.d.ts +24 -0
  258. package/plugins/access/accounts/resources/models.js +17 -0
  259. package/plugins/access/accounts/shared/errors.d.ts +19 -0
  260. package/plugins/access/accounts/shared/errors.js +19 -0
  261. package/plugins/access/accounts/shared/flow.d.ts +28 -0
  262. package/plugins/access/accounts/shared/flow.js +141 -0
  263. package/plugins/access/accounts/shared/oauth.d.ts +50 -0
  264. package/plugins/access/accounts/shared/oauth.js +144 -0
  265. package/plugins/access/accounts/shared/renew.d.ts +20 -0
  266. package/plugins/access/accounts/shared/renew.js +101 -0
  267. package/plugins/access/accounts/shared/rules.d.ts +9 -0
  268. package/plugins/access/accounts/shared/rules.js +6 -0
  269. package/plugins/access/accounts/shared/seal.d.ts +11 -0
  270. package/plugins/access/accounts/shared/seal.js +55 -0
  271. package/plugins/access/accounts/shared/settings.d.ts +37 -0
  272. package/plugins/access/accounts/shared/settings.js +31 -0
  273. package/plugins/access/accounts/shared/uses.d.ts +15 -0
  274. package/plugins/access/accounts/shared/uses.js +48 -0
  275. package/plugins/access/accounts/views/web/accounts.d.ts +12 -0
  276. package/plugins/access/accounts/views/web/accounts.js +67 -0
  277. package/plugins/access/accounts/views/web/card.d.ts +14 -0
  278. package/plugins/access/accounts/views/web/card.js +19 -0
  279. package/plugins/access/accounts/views/web/connect.d.ts +29 -0
  280. package/plugins/access/accounts/views/web/connect.js +142 -0
  281. package/plugins/access/accounts/views/web/disconnect.d.ts +16 -0
  282. package/plugins/access/accounts/views/web/disconnect.js +31 -0
  283. package/plugins/access/accounts/views/web/palette.d.ts +11 -0
  284. package/plugins/access/accounts/views/web/palette.js +71 -0
  285. package/plugins/access/accounts/views/web/style.d.ts +6 -0
  286. package/plugins/access/accounts/views/web/style.js +66 -0
  287. package/plugins/access/accounts/views/web/uses.d.ts +12 -0
  288. package/plugins/access/accounts/views/web/uses.js +36 -0
  289. package/plugins/access/accounts/views/web/words.d.ts +34 -0
  290. package/plugins/access/accounts/views/web/words.js +85 -0
  291. package/plugins/access/accounts/web.d.ts +20 -0
  292. package/plugins/access/accounts/web.js +38 -0
  293. package/plugins/access/directory/actions/invite.d.ts +5 -0
  294. package/plugins/access/directory/actions/invite.js +130 -0
  295. package/plugins/access/directory/actions/org.d.ts +11 -0
  296. package/plugins/access/directory/actions/org.js +279 -0
  297. package/plugins/access/directory/collections/invite.d.ts +81 -0
  298. package/plugins/access/directory/collections/invite.js +20 -0
  299. package/plugins/access/directory/collections/membership.d.ts +72 -0
  300. package/plugins/access/directory/collections/membership.js +22 -0
  301. package/plugins/access/directory/collections/org.d.ts +141 -0
  302. package/plugins/access/directory/collections/org.js +36 -0
  303. package/plugins/access/directory/collections/staff.d.ts +42 -0
  304. package/plugins/access/directory/collections/staff.js +12 -0
  305. package/plugins/access/directory/mod.d.ts +21 -0
  306. package/plugins/access/directory/mod.js +45 -0
  307. package/plugins/access/directory/shared/settings.d.ts +21 -0
  308. package/plugins/access/directory/shared/settings.js +16 -0
  309. package/plugins/access/google/actions/sign-in.d.ts +1 -0
  310. package/plugins/access/google/actions/sign-in.js +39 -0
  311. package/plugins/access/google/adapters/keys.d.ts +10 -0
  312. package/plugins/access/google/adapters/keys.js +17 -0
  313. package/plugins/access/google/mod.d.ts +20 -0
  314. package/plugins/access/google/mod.js +30 -0
  315. package/plugins/access/google/shared/jwt.d.ts +19 -0
  316. package/plugins/access/google/shared/jwt.js +29 -0
  317. package/plugins/access/google/shared/settings.d.ts +9 -0
  318. package/plugins/access/google/shared/settings.js +1 -0
  319. package/plugins/access/identity/actions/key.d.ts +2 -0
  320. package/plugins/access/identity/actions/key.js +48 -0
  321. package/plugins/access/identity/actions/person.d.ts +2 -0
  322. package/plugins/access/identity/actions/person.js +48 -0
  323. package/plugins/access/identity/actions/session.d.ts +3 -0
  324. package/plugins/access/identity/actions/session.js +67 -0
  325. package/plugins/access/identity/collections/credential.d.ts +99 -0
  326. package/plugins/access/identity/collections/credential.js +60 -0
  327. package/plugins/access/identity/collections/person.d.ts +76 -0
  328. package/plugins/access/identity/collections/person.js +31 -0
  329. package/plugins/access/identity/contract.d.ts +7 -0
  330. package/plugins/access/identity/contract.js +1 -0
  331. package/plugins/access/identity/mod.d.ts +23 -0
  332. package/plugins/access/identity/mod.js +46 -0
  333. package/plugins/access/mod.d.ts +24 -0
  334. package/plugins/access/mod.js +9 -0
  335. package/plugins/access/spaces/actions/agents.d.ts +2 -0
  336. package/plugins/access/spaces/actions/agents.js +54 -0
  337. package/plugins/access/spaces/actions/archive.d.ts +1 -0
  338. package/plugins/access/spaces/actions/archive.js +35 -0
  339. package/plugins/access/spaces/actions/can.d.ts +1 -0
  340. package/plugins/access/spaces/actions/can.js +26 -0
  341. package/plugins/access/spaces/actions/create.d.ts +1 -0
  342. package/plugins/access/spaces/actions/create.js +42 -0
  343. package/plugins/access/spaces/actions/invitation.d.ts +3 -0
  344. package/plugins/access/spaces/actions/invitation.js +123 -0
  345. package/plugins/access/spaces/actions/leave.d.ts +1 -0
  346. package/plugins/access/spaces/actions/leave.js +37 -0
  347. package/plugins/access/spaces/actions/member.d.ts +2 -0
  348. package/plugins/access/spaces/actions/member.js +110 -0
  349. package/plugins/access/spaces/actions/org.d.ts +31 -0
  350. package/plugins/access/spaces/actions/org.js +252 -0
  351. package/plugins/access/spaces/actions/personal.d.ts +1 -0
  352. package/plugins/access/spaces/actions/personal.js +34 -0
  353. package/plugins/access/spaces/actions/rename.d.ts +1 -0
  354. package/plugins/access/spaces/actions/rename.js +36 -0
  355. package/plugins/access/spaces/actions/request.d.ts +2 -0
  356. package/plugins/access/spaces/actions/request.js +51 -0
  357. package/plugins/access/spaces/actions/share.d.ts +1 -0
  358. package/plugins/access/spaces/actions/share.js +37 -0
  359. package/plugins/access/spaces/collections/invitation.d.ts +87 -0
  360. package/plugins/access/spaces/collections/invitation.js +41 -0
  361. package/plugins/access/spaces/collections/member.d.ts +68 -0
  362. package/plugins/access/spaces/collections/member.js +23 -0
  363. package/plugins/access/spaces/collections/request.d.ts +73 -0
  364. package/plugins/access/spaces/collections/request.js +29 -0
  365. package/plugins/access/spaces/collections/space.d.ts +83 -0
  366. package/plugins/access/spaces/collections/space.js +42 -0
  367. package/plugins/access/spaces/contract.d.ts +71 -0
  368. package/plugins/access/spaces/contract.js +2 -0
  369. package/plugins/access/spaces/mod.d.ts +53 -0
  370. package/plugins/access/spaces/mod.js +116 -0
  371. package/plugins/access/spaces/processors/agent-gone.d.ts +7 -0
  372. package/plugins/access/spaces/processors/agent-gone.js +13 -0
  373. package/plugins/access/spaces/resources/commands.d.ts +11 -0
  374. package/plugins/access/spaces/resources/commands.js +202 -0
  375. package/plugins/access/spaces/resources/tools.d.ts +7 -0
  376. package/plugins/access/spaces/resources/tools.js +38 -0
  377. package/plugins/access/spaces/shared/agents.d.ts +41 -0
  378. package/plugins/access/spaces/shared/agents.js +84 -0
  379. package/plugins/access/spaces/shared/labels.d.ts +14 -0
  380. package/plugins/access/spaces/shared/labels.js +36 -0
  381. package/plugins/access/spaces/shared/managers.d.ts +8 -0
  382. package/plugins/access/spaces/shared/managers.js +15 -0
  383. package/plugins/access/spaces/shared/personal.d.ts +7 -0
  384. package/plugins/access/spaces/shared/personal.js +11 -0
  385. package/plugins/access/spaces/shared/reach.d.ts +35 -0
  386. package/plugins/access/spaces/shared/reach.js +101 -0
  387. package/plugins/access/spaces/shared/rules.d.ts +28 -0
  388. package/plugins/access/spaces/shared/rules.js +43 -0
  389. package/plugins/access/spaces/terminal.d.ts +7 -0
  390. package/plugins/access/spaces/terminal.js +14 -0
  391. package/plugins/access/spaces/views/elsewhere.d.ts +11 -0
  392. package/plugins/access/spaces/views/elsewhere.js +29 -0
  393. package/plugins/access/spaces/views/terminal/spaces.d.ts +10 -0
  394. package/plugins/access/spaces/views/terminal/spaces.js +3 -0
  395. package/plugins/access/spaces/views/web/agents.d.ts +39 -0
  396. package/plugins/access/spaces/views/web/agents.js +93 -0
  397. package/plugins/access/spaces/views/web/header.d.ts +20 -0
  398. package/plugins/access/spaces/views/web/header.js +91 -0
  399. package/plugins/access/spaces/views/web/invitation.d.ts +15 -0
  400. package/plugins/access/spaces/views/web/invitation.js +38 -0
  401. package/plugins/access/spaces/views/web/invitations.d.ts +10 -0
  402. package/plugins/access/spaces/views/web/invitations.js +15 -0
  403. package/plugins/access/spaces/views/web/invite-dialog.d.ts +21 -0
  404. package/plugins/access/spaces/views/web/invite-dialog.js +16 -0
  405. package/plugins/access/spaces/views/web/invite.d.ts +18 -0
  406. package/plugins/access/spaces/views/web/invite.js +58 -0
  407. package/plugins/access/spaces/views/web/invited.d.ts +9 -0
  408. package/plugins/access/spaces/views/web/invited.js +9 -0
  409. package/plugins/access/spaces/views/web/inviting.d.ts +15 -0
  410. package/plugins/access/spaces/views/web/inviting.js +49 -0
  411. package/plugins/access/spaces/views/web/members.d.ts +16 -0
  412. package/plugins/access/spaces/views/web/members.js +118 -0
  413. package/plugins/access/spaces/views/web/new-space.d.ts +5 -0
  414. package/plugins/access/spaces/views/web/new-space.js +41 -0
  415. package/plugins/access/spaces/views/web/not-here.d.ts +14 -0
  416. package/plugins/access/spaces/views/web/not-here.js +93 -0
  417. package/plugins/access/spaces/views/web/org-about.d.ts +12 -0
  418. package/plugins/access/spaces/views/web/org-about.js +86 -0
  419. package/plugins/access/spaces/views/web/org-members.d.ts +16 -0
  420. package/plugins/access/spaces/views/web/org-members.js +237 -0
  421. package/plugins/access/spaces/views/web/palette.d.ts +17 -0
  422. package/plugins/access/spaces/views/web/palette.js +145 -0
  423. package/plugins/access/spaces/views/web/panel.d.ts +13 -0
  424. package/plugins/access/spaces/views/web/panel.js +53 -0
  425. package/plugins/access/spaces/views/web/pending.d.ts +15 -0
  426. package/plugins/access/spaces/views/web/pending.js +31 -0
  427. package/plugins/access/spaces/views/web/pick.d.ts +21 -0
  428. package/plugins/access/spaces/views/web/pick.js +59 -0
  429. package/plugins/access/spaces/views/web/settings.d.ts +13 -0
  430. package/plugins/access/spaces/views/web/settings.js +188 -0
  431. package/plugins/access/spaces/views/web/space.d.ts +15 -0
  432. package/plugins/access/spaces/views/web/space.js +67 -0
  433. package/plugins/access/spaces/views/web/spaces.d.ts +14 -0
  434. package/plugins/access/spaces/views/web/spaces.js +24 -0
  435. package/plugins/access/spaces/views/web/steps.d.ts +19 -0
  436. package/plugins/access/spaces/views/web/steps.js +123 -0
  437. package/plugins/access/spaces/views/web/style.d.ts +9 -0
  438. package/plugins/access/spaces/views/web/style.js +232 -0
  439. package/plugins/access/spaces/views/web/tabs.d.ts +27 -0
  440. package/plugins/access/spaces/views/web/tabs.js +24 -0
  441. package/plugins/access/spaces/views/web/tree.d.ts +29 -0
  442. package/plugins/access/spaces/views/web/tree.js +88 -0
  443. package/plugins/access/spaces/views/web/who.d.ts +86 -0
  444. package/plugins/access/spaces/views/web/who.js +98 -0
  445. package/plugins/access/spaces/views/where.d.ts +9 -0
  446. package/plugins/access/spaces/views/where.js +33 -0
  447. package/plugins/access/spaces/web.d.ts +32 -0
  448. package/plugins/access/spaces/web.js +87 -0
  449. package/plugins/access/terminal.d.ts +2 -0
  450. package/plugins/access/terminal.js +2 -0
  451. package/plugins/access/web.d.ts +3 -0
  452. package/plugins/access/web.js +3 -0
  453. package/plugins/agents/chat/actions/fork.d.ts +1 -0
  454. package/plugins/agents/chat/actions/fork.js +47 -0
  455. package/plugins/agents/chat/actions/move.d.ts +1 -0
  456. package/plugins/agents/chat/actions/move.js +58 -0
  457. package/plugins/agents/chat/actions/send.d.ts +1 -0
  458. package/plugins/agents/chat/actions/send.js +171 -0
  459. package/plugins/agents/chat/actions/stop.d.ts +1 -0
  460. package/plugins/agents/chat/actions/stop.js +74 -0
  461. package/plugins/agents/chat/collections/file.d.ts +144 -0
  462. package/plugins/agents/chat/collections/file.js +48 -0
  463. package/plugins/agents/chat/collections/live.d.ts +124 -0
  464. package/plugins/agents/chat/collections/live.js +51 -0
  465. package/plugins/agents/chat/collections/message.d.ts +289 -0
  466. package/plugins/agents/chat/collections/message.js +134 -0
  467. package/plugins/agents/chat/collections/thread.d.ts +137 -0
  468. package/plugins/agents/chat/collections/thread.js +82 -0
  469. package/plugins/agents/chat/collections/wait.d.ts +96 -0
  470. package/plugins/agents/chat/collections/wait.js +21 -0
  471. package/plugins/agents/chat/contract.d.ts +28 -0
  472. package/plugins/agents/chat/contract.js +8 -0
  473. package/plugins/agents/chat/events/turn-requested.d.ts +3 -0
  474. package/plugins/agents/chat/events/turn-requested.js +15 -0
  475. package/plugins/agents/chat/mod.d.ts +45 -0
  476. package/plugins/agents/chat/mod.js +98 -0
  477. package/plugins/agents/chat/processors/failed.d.ts +3 -0
  478. package/plugins/agents/chat/processors/failed.js +26 -0
  479. package/plugins/agents/chat/processors/turn.d.ts +3 -0
  480. package/plugins/agents/chat/processors/turn.js +222 -0
  481. package/plugins/agents/chat/resources/commands.d.ts +9 -0
  482. package/plugins/agents/chat/resources/commands.js +255 -0
  483. package/plugins/agents/chat/shared/agents.d.ts +70 -0
  484. package/plugins/agents/chat/shared/agents.js +100 -0
  485. package/plugins/agents/chat/shared/delivery.d.ts +36 -0
  486. package/plugins/agents/chat/shared/delivery.js +79 -0
  487. package/plugins/agents/chat/shared/lineage.d.ts +18 -0
  488. package/plugins/agents/chat/shared/lineage.js +44 -0
  489. package/plugins/agents/chat/shared/live.d.ts +33 -0
  490. package/plugins/agents/chat/shared/live.js +73 -0
  491. package/plugins/agents/chat/shared/send.d.ts +22 -0
  492. package/plugins/agents/chat/shared/send.js +104 -0
  493. package/plugins/agents/chat/shared/summary.d.ts +44 -0
  494. package/plugins/agents/chat/shared/summary.js +23 -0
  495. package/plugins/agents/chat/shared/types.d.ts +164 -0
  496. package/plugins/agents/chat/shared/types.js +4 -0
  497. package/plugins/agents/chat/terminal.d.ts +11 -0
  498. package/plugins/agents/chat/terminal.js +30 -0
  499. package/plugins/agents/chat/views/context.d.ts +9 -0
  500. package/plugins/agents/chat/views/context.js +5 -0
  501. package/plugins/agents/chat/views/history.d.ts +12 -0
  502. package/plugins/agents/chat/views/history.js +3 -0
  503. package/plugins/agents/chat/views/message.d.ts +5 -0
  504. package/plugins/agents/chat/views/message.js +65 -0
  505. package/plugins/agents/chat/views/participants.d.ts +8 -0
  506. package/plugins/agents/chat/views/participants.js +20 -0
  507. package/plugins/agents/chat/views/prompt.d.ts +10 -0
  508. package/plugins/agents/chat/views/prompt.js +59 -0
  509. package/plugins/agents/chat/views/terminal/agent-prompt.d.ts +7 -0
  510. package/plugins/agents/chat/views/terminal/agent-prompt.js +18 -0
  511. package/plugins/agents/chat/views/terminal/author.d.ts +7 -0
  512. package/plugins/agents/chat/views/terminal/author.js +7 -0
  513. package/plugins/agents/chat/views/terminal/conversation.d.ts +5 -0
  514. package/plugins/agents/chat/views/terminal/conversation.js +24 -0
  515. package/plugins/agents/chat/views/terminal/live.d.ts +4 -0
  516. package/plugins/agents/chat/views/terminal/live.js +15 -0
  517. package/plugins/agents/chat/views/terminal/message.d.ts +4 -0
  518. package/plugins/agents/chat/views/terminal/message.js +34 -0
  519. package/plugins/agents/chat/views/terminal/retrying.d.ts +7 -0
  520. package/plugins/agents/chat/views/terminal/retrying.js +22 -0
  521. package/plugins/agents/chat/views/terminal/threads.d.ts +13 -0
  522. package/plugins/agents/chat/views/terminal/threads.js +2 -0
  523. package/plugins/agents/chat/views/web/agents.d.ts +61 -0
  524. package/plugins/agents/chat/views/web/agents.js +64 -0
  525. package/plugins/agents/chat/views/web/attach.d.ts +22 -0
  526. package/plugins/agents/chat/views/web/attach.js +26 -0
  527. package/plugins/agents/chat/views/web/chats.d.ts +13 -0
  528. package/plugins/agents/chat/views/web/chats.js +52 -0
  529. package/plugins/agents/chat/views/web/composer.d.ts +58 -0
  530. package/plugins/agents/chat/views/web/composer.js +346 -0
  531. package/plugins/agents/chat/views/web/conversation.d.ts +22 -0
  532. package/plugins/agents/chat/views/web/conversation.js +116 -0
  533. package/plugins/agents/chat/views/web/download.d.ts +8 -0
  534. package/plugins/agents/chat/views/web/download.js +7 -0
  535. package/plugins/agents/chat/views/web/file.d.ts +23 -0
  536. package/plugins/agents/chat/views/web/file.js +15 -0
  537. package/plugins/agents/chat/views/web/header.d.ts +30 -0
  538. package/plugins/agents/chat/views/web/header.js +21 -0
  539. package/plugins/agents/chat/views/web/held.d.ts +16 -0
  540. package/plugins/agents/chat/views/web/held.js +44 -0
  541. package/plugins/agents/chat/views/web/home.d.ts +16 -0
  542. package/plugins/agents/chat/views/web/home.js +47 -0
  543. package/plugins/agents/chat/views/web/listed.d.ts +25 -0
  544. package/plugins/agents/chat/views/web/listed.js +53 -0
  545. package/plugins/agents/chat/views/web/live.d.ts +13 -0
  546. package/plugins/agents/chat/views/web/live.js +33 -0
  547. package/plugins/agents/chat/views/web/message.d.ts +21 -0
  548. package/plugins/agents/chat/views/web/message.js +58 -0
  549. package/plugins/agents/chat/views/web/missing.d.ts +5 -0
  550. package/plugins/agents/chat/views/web/missing.js +5 -0
  551. package/plugins/agents/chat/views/web/move.d.ts +18 -0
  552. package/plugins/agents/chat/views/web/move.js +23 -0
  553. package/plugins/agents/chat/views/web/new-thread.d.ts +4 -0
  554. package/plugins/agents/chat/views/web/new-thread.js +7 -0
  555. package/plugins/agents/chat/views/web/over.d.ts +18 -0
  556. package/plugins/agents/chat/views/web/over.js +20 -0
  557. package/plugins/agents/chat/views/web/palette.d.ts +15 -0
  558. package/plugins/agents/chat/views/web/palette.js +76 -0
  559. package/plugins/agents/chat/views/web/picture.d.ts +12 -0
  560. package/plugins/agents/chat/views/web/picture.js +16 -0
  561. package/plugins/agents/chat/views/web/plain.d.ts +8 -0
  562. package/plugins/agents/chat/views/web/plain.js +15 -0
  563. package/plugins/agents/chat/views/web/queued.d.ts +19 -0
  564. package/plugins/agents/chat/views/web/queued.js +28 -0
  565. package/plugins/agents/chat/views/web/recent.d.ts +11 -0
  566. package/plugins/agents/chat/views/web/recent.js +24 -0
  567. package/plugins/agents/chat/views/web/record.d.ts +37 -0
  568. package/plugins/agents/chat/views/web/record.js +232 -0
  569. package/plugins/agents/chat/views/web/recorder.d.ts +23 -0
  570. package/plugins/agents/chat/views/web/recorder.js +50 -0
  571. package/plugins/agents/chat/views/web/retrying.d.ts +12 -0
  572. package/plugins/agents/chat/views/web/retrying.js +28 -0
  573. package/plugins/agents/chat/views/web/steps.d.ts +29 -0
  574. package/plugins/agents/chat/views/web/steps.js +42 -0
  575. package/plugins/agents/chat/views/web/style.d.ts +6 -0
  576. package/plugins/agents/chat/views/web/style.js +340 -0
  577. package/plugins/agents/chat/views/web/tool-view.d.ts +15 -0
  578. package/plugins/agents/chat/views/web/tool-view.js +15 -0
  579. package/plugins/agents/chat/views/web/transcript.d.ts +13 -0
  580. package/plugins/agents/chat/views/web/transcript.js +57 -0
  581. package/plugins/agents/chat/views/web/voice-failed.d.ts +15 -0
  582. package/plugins/agents/chat/views/web/voice-failed.js +5 -0
  583. package/plugins/agents/chat/views/web/voice-note.d.ts +20 -0
  584. package/plugins/agents/chat/views/web/voice-note.js +19 -0
  585. package/plugins/agents/chat/views/web/waiting.d.ts +10 -0
  586. package/plugins/agents/chat/views/web/waiting.js +9 -0
  587. package/plugins/agents/chat/views/web/who.d.ts +15 -0
  588. package/plugins/agents/chat/views/web/who.js +15 -0
  589. package/plugins/agents/chat/web.d.ts +39 -0
  590. package/plugins/agents/chat/web.js +74 -0
  591. package/plugins/agents/history/collections/outline.d.ts +109 -0
  592. package/plugins/agents/history/collections/outline.js +22 -0
  593. package/plugins/agents/history/collections/summary.d.ts +84 -0
  594. package/plugins/agents/history/collections/summary.js +24 -0
  595. package/plugins/agents/history/mod.d.ts +26 -0
  596. package/plugins/agents/history/mod.js +48 -0
  597. package/plugins/agents/history/processors/compact.d.ts +3 -0
  598. package/plugins/agents/history/processors/compact.js +185 -0
  599. package/plugins/agents/history/resources/tools.d.ts +1 -0
  600. package/plugins/agents/history/resources/tools.js +45 -0
  601. package/plugins/agents/history/shared/lines.d.ts +12 -0
  602. package/plugins/agents/history/shared/lines.js +12 -0
  603. package/plugins/agents/history/shared/settings.d.ts +19 -0
  604. package/plugins/agents/history/shared/settings.js +8 -0
  605. package/plugins/agents/history/shared/summarized.d.ts +5 -0
  606. package/plugins/agents/history/shared/summarized.js +7 -0
  607. package/plugins/agents/history/views/history.d.ts +12 -0
  608. package/plugins/agents/history/views/history.js +32 -0
  609. package/plugins/agents/history/views/since.d.ts +7 -0
  610. package/plugins/agents/history/views/since.js +2 -0
  611. package/plugins/agents/history/views/summary.d.ts +3 -0
  612. package/plugins/agents/history/views/summary.js +5 -0
  613. package/plugins/agents/memory/collections/memory.d.ts +141 -0
  614. package/plugins/agents/memory/collections/memory.js +51 -0
  615. package/plugins/agents/memory/collections/progress.d.ts +26 -0
  616. package/plugins/agents/memory/collections/progress.js +8 -0
  617. package/plugins/agents/memory/mod.d.ts +35 -0
  618. package/plugins/agents/memory/mod.js +79 -0
  619. package/plugins/agents/memory/processors/extract.d.ts +3 -0
  620. package/plugins/agents/memory/processors/extract.js +81 -0
  621. package/plugins/agents/memory/resources/commands.d.ts +3 -0
  622. package/plugins/agents/memory/resources/commands.js +13 -0
  623. package/plugins/agents/memory/resources/context.d.ts +9 -0
  624. package/plugins/agents/memory/resources/context.js +5 -0
  625. package/plugins/agents/memory/resources/tools.d.ts +5 -0
  626. package/plugins/agents/memory/resources/tools.js +93 -0
  627. package/plugins/agents/memory/shared/scope.d.ts +53 -0
  628. package/plugins/agents/memory/shared/scope.js +107 -0
  629. package/plugins/agents/memory/shared/search.d.ts +29 -0
  630. package/plugins/agents/memory/shared/search.js +82 -0
  631. package/plugins/agents/memory/shared/settings.d.ts +28 -0
  632. package/plugins/agents/memory/shared/settings.js +35 -0
  633. package/plugins/agents/memory/terminal.d.ts +6 -0
  634. package/plugins/agents/memory/terminal.js +13 -0
  635. package/plugins/agents/memory/views/context.d.ts +11 -0
  636. package/plugins/agents/memory/views/context.js +49 -0
  637. package/plugins/agents/memory/views/memory.d.ts +4 -0
  638. package/plugins/agents/memory/views/memory.js +2 -0
  639. package/plugins/agents/memory/views/terminal/memory.d.ts +2 -0
  640. package/plugins/agents/memory/views/terminal/memory.js +3 -0
  641. package/plugins/agents/memory/views/web/card.d.ts +17 -0
  642. package/plugins/agents/memory/views/web/card.js +21 -0
  643. package/plugins/agents/memory/views/web/list.d.ts +26 -0
  644. package/plugins/agents/memory/views/web/list.js +75 -0
  645. package/plugins/agents/memory/views/web/memories.d.ts +15 -0
  646. package/plugins/agents/memory/views/web/memories.js +34 -0
  647. package/plugins/agents/memory/views/web/move.d.ts +13 -0
  648. package/plugins/agents/memory/views/web/move.js +12 -0
  649. package/plugins/agents/memory/views/web/palette.d.ts +11 -0
  650. package/plugins/agents/memory/views/web/palette.js +39 -0
  651. package/plugins/agents/memory/views/web/pick.d.ts +10 -0
  652. package/plugins/agents/memory/views/web/pick.js +37 -0
  653. package/plugins/agents/memory/views/web/style.d.ts +6 -0
  654. package/plugins/agents/memory/views/web/style.js +41 -0
  655. package/plugins/agents/memory/web.d.ts +11 -0
  656. package/plugins/agents/memory/web.js +26 -0
  657. package/plugins/agents/mod.d.ts +20 -0
  658. package/plugins/agents/mod.js +20 -0
  659. package/plugins/agents/routines/actions/create.d.ts +1 -0
  660. package/plugins/agents/routines/actions/create.js +60 -0
  661. package/plugins/agents/routines/actions/delete.d.ts +1 -0
  662. package/plugins/agents/routines/actions/delete.js +20 -0
  663. package/plugins/agents/routines/actions/fire.d.ts +1 -0
  664. package/plugins/agents/routines/actions/fire.js +26 -0
  665. package/plugins/agents/routines/actions/pause.d.ts +1 -0
  666. package/plugins/agents/routines/actions/pause.js +23 -0
  667. package/plugins/agents/routines/actions/resume.d.ts +1 -0
  668. package/plugins/agents/routines/actions/resume.js +26 -0
  669. package/plugins/agents/routines/actions/run.d.ts +1 -0
  670. package/plugins/agents/routines/actions/run.js +21 -0
  671. package/plugins/agents/routines/actions/update.d.ts +1 -0
  672. package/plugins/agents/routines/actions/update.js +80 -0
  673. package/plugins/agents/routines/collections/routine.d.ts +144 -0
  674. package/plugins/agents/routines/collections/routine.js +89 -0
  675. package/plugins/agents/routines/collections/run.d.ts +106 -0
  676. package/plugins/agents/routines/collections/run.js +29 -0
  677. package/plugins/agents/routines/contract.d.ts +11 -0
  678. package/plugins/agents/routines/contract.js +1 -0
  679. package/plugins/agents/routines/mod.d.ts +30 -0
  680. package/plugins/agents/routines/mod.js +59 -0
  681. package/plugins/agents/routines/resources/tools.d.ts +2 -0
  682. package/plugins/agents/routines/resources/tools.js +133 -0
  683. package/plugins/agents/routines/shared/fire.d.ts +21 -0
  684. package/plugins/agents/routines/shared/fire.js +83 -0
  685. package/plugins/agents/routines/shared/routines.d.ts +109 -0
  686. package/plugins/agents/routines/shared/routines.js +77 -0
  687. package/plugins/agents/routines/shared/schedule.d.ts +143 -0
  688. package/plugins/agents/routines/shared/schedule.js +336 -0
  689. package/plugins/agents/routines/views/web/delete.d.ts +16 -0
  690. package/plugins/agents/routines/views/web/delete.js +26 -0
  691. package/plugins/agents/routines/views/web/form.d.ts +30 -0
  692. package/plugins/agents/routines/views/web/form.js +80 -0
  693. package/plugins/agents/routines/views/web/list.d.ts +16 -0
  694. package/plugins/agents/routines/views/web/list.js +145 -0
  695. package/plugins/agents/routines/views/web/new.d.ts +26 -0
  696. package/plugins/agents/routines/views/web/new.js +37 -0
  697. package/plugins/agents/routines/views/web/page.d.ts +14 -0
  698. package/plugins/agents/routines/views/web/page.js +152 -0
  699. package/plugins/agents/routines/views/web/palette.d.ts +16 -0
  700. package/plugins/agents/routines/views/web/palette.js +145 -0
  701. package/plugins/agents/routines/views/web/picker.d.ts +19 -0
  702. package/plugins/agents/routines/views/web/picker.js +57 -0
  703. package/plugins/agents/routines/views/web/routines.d.ts +65 -0
  704. package/plugins/agents/routines/views/web/routines.js +110 -0
  705. package/plugins/agents/routines/views/web/step.d.ts +12 -0
  706. package/plugins/agents/routines/views/web/step.js +22 -0
  707. package/plugins/agents/routines/views/web/style.d.ts +8 -0
  708. package/plugins/agents/routines/views/web/style.js +195 -0
  709. package/plugins/agents/routines/web.d.ts +17 -0
  710. package/plugins/agents/routines/web.js +37 -0
  711. package/plugins/agents/skills/actions/create.d.ts +1 -0
  712. package/plugins/agents/skills/actions/create.js +43 -0
  713. package/plugins/agents/skills/actions/delete.d.ts +1 -0
  714. package/plugins/agents/skills/actions/delete.js +29 -0
  715. package/plugins/agents/skills/actions/update.d.ts +1 -0
  716. package/plugins/agents/skills/actions/update.js +58 -0
  717. package/plugins/agents/skills/collections/skill-file.d.ts +69 -0
  718. package/plugins/agents/skills/collections/skill-file.js +20 -0
  719. package/plugins/agents/skills/collections/skill.d.ts +140 -0
  720. package/plugins/agents/skills/collections/skill.js +105 -0
  721. package/plugins/agents/skills/contract.d.ts +11 -0
  722. package/plugins/agents/skills/contract.js +1 -0
  723. package/plugins/agents/skills/mod.d.ts +31 -0
  724. package/plugins/agents/skills/mod.js +71 -0
  725. package/plugins/agents/skills/resources/planning.d.ts +11 -0
  726. package/plugins/agents/skills/resources/planning.js +114 -0
  727. package/plugins/agents/skills/resources/tools.d.ts +7 -0
  728. package/plugins/agents/skills/resources/tools.js +57 -0
  729. package/plugins/agents/skills/shared/check.d.ts +37 -0
  730. package/plugins/agents/skills/shared/check.js +92 -0
  731. package/plugins/agents/skills/shared/skill-md.d.ts +18 -0
  732. package/plugins/agents/skills/shared/skill-md.js +63 -0
  733. package/plugins/agents/skills/shared/skills.d.ts +53 -0
  734. package/plugins/agents/skills/shared/skills.js +56 -0
  735. package/plugins/agents/skills/shared/write.d.ts +73 -0
  736. package/plugins/agents/skills/shared/write.js +53 -0
  737. package/plugins/agents/skills/views/context.d.ts +10 -0
  738. package/plugins/agents/skills/views/context.js +12 -0
  739. package/plugins/agents/skills/views/web/delete.d.ts +19 -0
  740. package/plugins/agents/skills/views/web/delete.js +27 -0
  741. package/plugins/agents/skills/views/web/form.d.ts +28 -0
  742. package/plugins/agents/skills/views/web/form.js +190 -0
  743. package/plugins/agents/skills/views/web/list.d.ts +13 -0
  744. package/plugins/agents/skills/views/web/list.js +88 -0
  745. package/plugins/agents/skills/views/web/page.d.ts +13 -0
  746. package/plugins/agents/skills/views/web/page.js +113 -0
  747. package/plugins/agents/skills/views/web/palette.d.ts +21 -0
  748. package/plugins/agents/skills/views/web/palette.js +133 -0
  749. package/plugins/agents/skills/views/web/skills.d.ts +42 -0
  750. package/plugins/agents/skills/views/web/skills.js +97 -0
  751. package/plugins/agents/skills/views/web/step.d.ts +10 -0
  752. package/plugins/agents/skills/views/web/step.js +26 -0
  753. package/plugins/agents/skills/views/web/style.d.ts +8 -0
  754. package/plugins/agents/skills/views/web/style.js +155 -0
  755. package/plugins/agents/skills/web.d.ts +16 -0
  756. package/plugins/agents/skills/web.js +35 -0
  757. package/plugins/agents/team/actions/agent.d.ts +4 -0
  758. package/plugins/agents/team/actions/agent.js +180 -0
  759. package/plugins/agents/team/actions/define.d.ts +1 -0
  760. package/plugins/agents/team/actions/define.js +27 -0
  761. package/plugins/agents/team/collections/agent.d.ts +132 -0
  762. package/plugins/agents/team/collections/agent.js +75 -0
  763. package/plugins/agents/team/contract.d.ts +7 -0
  764. package/plugins/agents/team/contract.js +1 -0
  765. package/plugins/agents/team/mod.d.ts +21 -0
  766. package/plugins/agents/team/mod.js +42 -0
  767. package/plugins/agents/team/shared/definition.d.ts +3 -0
  768. package/plugins/agents/team/shared/definition.js +10 -0
  769. package/plugins/agents/team/views/web/agent-add.d.ts +14 -0
  770. package/plugins/agents/team/views/web/agent-add.js +47 -0
  771. package/plugins/agents/team/views/web/agent-fields.d.ts +33 -0
  772. package/plugins/agents/team/views/web/agent-fields.js +84 -0
  773. package/plugins/agents/team/views/web/agent-known.d.ts +22 -0
  774. package/plugins/agents/team/views/web/agent-known.js +60 -0
  775. package/plugins/agents/team/views/web/agent-new.d.ts +24 -0
  776. package/plugins/agents/team/views/web/agent-new.js +124 -0
  777. package/plugins/agents/team/views/web/agent-palette.d.ts +19 -0
  778. package/plugins/agents/team/views/web/agent-palette.js +200 -0
  779. package/plugins/agents/team/views/web/agent-steps.d.ts +23 -0
  780. package/plugins/agents/team/views/web/agent-steps.js +52 -0
  781. package/plugins/agents/team/views/web/agent.d.ts +17 -0
  782. package/plugins/agents/team/views/web/agent.js +247 -0
  783. package/plugins/agents/team/views/web/agents.d.ts +48 -0
  784. package/plugins/agents/team/views/web/agents.js +55 -0
  785. package/plugins/agents/team/views/web/places.d.ts +24 -0
  786. package/plugins/agents/team/views/web/places.js +15 -0
  787. package/plugins/agents/team/views/web/style.d.ts +9 -0
  788. package/plugins/agents/team/views/web/style.js +195 -0
  789. package/plugins/agents/team/web.d.ts +20 -0
  790. package/plugins/agents/team/web.js +37 -0
  791. package/plugins/agents/terminal.d.ts +3 -0
  792. package/plugins/agents/terminal.js +3 -0
  793. package/plugins/agents/web.d.ts +6 -0
  794. package/plugins/agents/web.js +6 -0
  795. package/plugins/billing/mod.d.ts +9 -0
  796. package/plugins/billing/mod.js +9 -0
  797. package/plugins/billing/terminal.d.ts +2 -0
  798. package/plugins/billing/terminal.js +2 -0
  799. package/plugins/billing/usage/actions/close.d.ts +1 -0
  800. package/plugins/billing/usage/actions/close.js +141 -0
  801. package/plugins/billing/usage/actions/org.d.ts +2 -0
  802. package/plugins/billing/usage/actions/org.js +94 -0
  803. package/plugins/billing/usage/actions/record.d.ts +1 -0
  804. package/plugins/billing/usage/actions/record.js +25 -0
  805. package/plugins/billing/usage/actions/rerate.d.ts +1 -0
  806. package/plugins/billing/usage/actions/rerate.js +48 -0
  807. package/plugins/billing/usage/collections/closed.d.ts +62 -0
  808. package/plugins/billing/usage/collections/closed.js +19 -0
  809. package/plugins/billing/usage/collections/rollup.d.ts +131 -0
  810. package/plugins/billing/usage/collections/rollup.js +38 -0
  811. package/plugins/billing/usage/collections/usage.d.ts +155 -0
  812. package/plugins/billing/usage/collections/usage.js +55 -0
  813. package/plugins/billing/usage/mod.d.ts +41 -0
  814. package/plugins/billing/usage/mod.js +66 -0
  815. package/plugins/billing/usage/resources/commands.d.ts +3 -0
  816. package/plugins/billing/usage/resources/commands.js +21 -0
  817. package/plugins/billing/usage/resources/ledger.d.ts +3 -0
  818. package/plugins/billing/usage/resources/ledger.js +2 -0
  819. package/plugins/billing/usage/shared/days.d.ts +17 -0
  820. package/plugins/billing/usage/shared/days.js +28 -0
  821. package/plugins/billing/usage/shared/rate.d.ts +51 -0
  822. package/plugins/billing/usage/shared/rate.js +99 -0
  823. package/plugins/billing/usage/shared/settings.d.ts +17 -0
  824. package/plugins/billing/usage/shared/settings.js +9 -0
  825. package/plugins/billing/usage/shared/totals.d.ts +50 -0
  826. package/plugins/billing/usage/shared/totals.js +128 -0
  827. package/plugins/billing/usage/shared/use.d.ts +31 -0
  828. package/plugins/billing/usage/shared/use.js +44 -0
  829. package/plugins/billing/usage/terminal.d.ts +6 -0
  830. package/plugins/billing/usage/terminal.js +13 -0
  831. package/plugins/billing/usage/views/terminal/totals.d.ts +5 -0
  832. package/plugins/billing/usage/views/terminal/totals.js +16 -0
  833. package/plugins/billing/usage/views/web/chart.d.ts +16 -0
  834. package/plugins/billing/usage/views/web/chart.js +92 -0
  835. package/plugins/billing/usage/views/web/numbers.d.ts +70 -0
  836. package/plugins/billing/usage/views/web/numbers.js +105 -0
  837. package/plugins/billing/usage/views/web/org.d.ts +12 -0
  838. package/plugins/billing/usage/views/web/org.js +187 -0
  839. package/plugins/billing/usage/views/web/style.d.ts +8 -0
  840. package/plugins/billing/usage/views/web/style.js +116 -0
  841. package/plugins/billing/usage/web.d.ts +11 -0
  842. package/plugins/billing/usage/web.js +19 -0
  843. package/plugins/compute/computers/actions/admit.d.ts +1 -0
  844. package/plugins/compute/computers/actions/admit.js +60 -0
  845. package/plugins/compute/computers/actions/approve.d.ts +1 -0
  846. package/plugins/compute/computers/actions/approve.js +57 -0
  847. package/plugins/compute/computers/actions/code.d.ts +1 -0
  848. package/plugins/compute/computers/actions/code.js +50 -0
  849. package/plugins/compute/computers/actions/default.d.ts +1 -0
  850. package/plugins/compute/computers/actions/default.js +27 -0
  851. package/plugins/compute/computers/actions/forget.d.ts +1 -0
  852. package/plugins/compute/computers/actions/forget.js +27 -0
  853. package/plugins/compute/computers/actions/gone.d.ts +1 -0
  854. package/plugins/compute/computers/actions/gone.js +12 -0
  855. package/plugins/compute/computers/actions/move.d.ts +1 -0
  856. package/plugins/compute/computers/actions/move.js +34 -0
  857. package/plugins/compute/computers/actions/ready.d.ts +1 -0
  858. package/plugins/compute/computers/actions/ready.js +55 -0
  859. package/plugins/compute/computers/actions/rename.d.ts +1 -0
  860. package/plugins/compute/computers/actions/rename.js +22 -0
  861. package/plugins/compute/computers/actions/share.d.ts +1 -0
  862. package/plugins/compute/computers/actions/share.js +39 -0
  863. package/plugins/compute/computers/actions/unshare.d.ts +1 -0
  864. package/plugins/compute/computers/actions/unshare.js +30 -0
  865. package/plugins/compute/computers/actions/work.d.ts +1 -0
  866. package/plugins/compute/computers/actions/work.js +56 -0
  867. package/plugins/compute/computers/collections/approval.d.ts +162 -0
  868. package/plugins/compute/computers/collections/approval.js +59 -0
  869. package/plugins/compute/computers/collections/computer.d.ts +104 -0
  870. package/plugins/compute/computers/collections/computer.js +37 -0
  871. package/plugins/compute/computers/collections/desk.d.ts +136 -0
  872. package/plugins/compute/computers/collections/desk.js +55 -0
  873. package/plugins/compute/computers/collections/enrollment.d.ts +71 -0
  874. package/plugins/compute/computers/collections/enrollment.js +22 -0
  875. package/plugins/compute/computers/collections/grant.d.ts +100 -0
  876. package/plugins/compute/computers/collections/grant.js +29 -0
  877. package/plugins/compute/computers/mod.d.ts +27 -0
  878. package/plugins/compute/computers/mod.js +90 -0
  879. package/plugins/compute/computers/program/release.d.ts +85 -0
  880. package/plugins/compute/computers/program/release.js +88 -0
  881. package/plugins/compute/computers/program/version.d.ts +2 -0
  882. package/plugins/compute/computers/program/version.js +2 -0
  883. package/plugins/compute/computers/resources/commands.d.ts +12 -0
  884. package/plugins/compute/computers/resources/commands.js +159 -0
  885. package/plugins/compute/computers/resources/downloads.d.ts +21 -0
  886. package/plugins/compute/computers/resources/downloads.js +114 -0
  887. package/plugins/compute/computers/resources/tools.d.ts +10 -0
  888. package/plugins/compute/computers/resources/tools.js +192 -0
  889. package/plugins/compute/computers/shared/ask.d.ts +28 -0
  890. package/plugins/compute/computers/shared/ask.js +44 -0
  891. package/plugins/compute/computers/shared/asks.d.ts +5 -0
  892. package/plugins/compute/computers/shared/asks.js +3 -0
  893. package/plugins/compute/computers/shared/browser.d.ts +106 -0
  894. package/plugins/compute/computers/shared/browser.js +89 -0
  895. package/plugins/compute/computers/shared/desks.d.ts +19 -0
  896. package/plugins/compute/computers/shared/desks.js +60 -0
  897. package/plugins/compute/computers/shared/failed.d.ts +3 -0
  898. package/plugins/compute/computers/shared/failed.js +6 -0
  899. package/plugins/compute/computers/shared/folder.d.ts +4 -0
  900. package/plugins/compute/computers/shared/folder.js +13 -0
  901. package/plugins/compute/computers/shared/person.d.ts +3 -0
  902. package/plugins/compute/computers/shared/person.js +8 -0
  903. package/plugins/compute/computers/shared/secret.d.ts +8 -0
  904. package/plugins/compute/computers/shared/secret.js +24 -0
  905. package/plugins/compute/computers/shared/settings.d.ts +23 -0
  906. package/plugins/compute/computers/shared/settings.js +10 -0
  907. package/plugins/compute/computers/shared/where.d.ts +22 -0
  908. package/plugins/compute/computers/shared/where.js +39 -0
  909. package/plugins/compute/computers/shared/workloads.d.ts +228 -0
  910. package/plugins/compute/computers/shared/workloads.js +37 -0
  911. package/plugins/compute/computers/terminal.d.ts +7 -0
  912. package/plugins/compute/computers/terminal.js +14 -0
  913. package/plugins/compute/computers/views/context.d.ts +13 -0
  914. package/plugins/compute/computers/views/context.js +61 -0
  915. package/plugins/compute/computers/views/terminal/approvals.d.ts +9 -0
  916. package/plugins/compute/computers/views/terminal/approvals.js +14 -0
  917. package/plugins/compute/computers/views/web/asked.d.ts +38 -0
  918. package/plugins/compute/computers/views/web/asked.js +56 -0
  919. package/plugins/compute/computers/views/web/asks.d.ts +15 -0
  920. package/plugins/compute/computers/views/web/asks.js +55 -0
  921. package/plugins/compute/computers/views/web/calls.d.ts +38 -0
  922. package/plugins/compute/computers/views/web/calls.js +57 -0
  923. package/plugins/compute/computers/views/web/computer.d.ts +14 -0
  924. package/plugins/compute/computers/views/web/computer.js +26 -0
  925. package/plugins/compute/computers/views/web/connect.d.ts +29 -0
  926. package/plugins/compute/computers/views/web/connect.js +188 -0
  927. package/plugins/compute/computers/views/web/desks.d.ts +34 -0
  928. package/plugins/compute/computers/views/web/desks.js +190 -0
  929. package/plugins/compute/computers/views/web/diff.d.ts +15 -0
  930. package/plugins/compute/computers/views/web/diff.js +66 -0
  931. package/plugins/compute/computers/views/web/file-view.d.ts +23 -0
  932. package/plugins/compute/computers/views/web/file-view.js +145 -0
  933. package/plugins/compute/computers/views/web/files.d.ts +20 -0
  934. package/plugins/compute/computers/views/web/files.js +122 -0
  935. package/plugins/compute/computers/views/web/jobs.d.ts +27 -0
  936. package/plugins/compute/computers/views/web/jobs.js +180 -0
  937. package/plugins/compute/computers/views/web/mark.d.ts +6 -0
  938. package/plugins/compute/computers/views/web/mark.js +5 -0
  939. package/plugins/compute/computers/views/web/move.d.ts +16 -0
  940. package/plugins/compute/computers/views/web/move.js +10 -0
  941. package/plugins/compute/computers/views/web/names.d.ts +38 -0
  942. package/plugins/compute/computers/views/web/names.js +47 -0
  943. package/plugins/compute/computers/views/web/page.d.ts +26 -0
  944. package/plugins/compute/computers/views/web/page.js +69 -0
  945. package/plugins/compute/computers/views/web/palette.d.ts +11 -0
  946. package/plugins/compute/computers/views/web/palette.js +33 -0
  947. package/plugins/compute/computers/views/web/platform.d.ts +8 -0
  948. package/plugins/compute/computers/views/web/platform.js +58 -0
  949. package/plugins/compute/computers/views/web/shell.d.ts +34 -0
  950. package/plugins/compute/computers/views/web/shell.js +87 -0
  951. package/plugins/compute/computers/views/web/space-tab.d.ts +16 -0
  952. package/plugins/compute/computers/views/web/space-tab.js +57 -0
  953. package/plugins/compute/computers/views/web/step.d.ts +14 -0
  954. package/plugins/compute/computers/views/web/step.js +228 -0
  955. package/plugins/compute/computers/views/web/style.d.ts +8 -0
  956. package/plugins/compute/computers/views/web/style.js +336 -0
  957. package/plugins/compute/computers/views/web/terminal-tab.d.ts +21 -0
  958. package/plugins/compute/computers/views/web/terminal-tab.js +18 -0
  959. package/plugins/compute/computers/views/web/transfer.d.ts +18 -0
  960. package/plugins/compute/computers/views/web/transfer.js +42 -0
  961. package/plugins/compute/computers/views/web/waiting.d.ts +10 -0
  962. package/plugins/compute/computers/views/web/waiting.js +34 -0
  963. package/plugins/compute/computers/views/web/workspace.d.ts +33 -0
  964. package/plugins/compute/computers/views/web/workspace.js +97 -0
  965. package/plugins/compute/computers/web.d.ts +24 -0
  966. package/plugins/compute/computers/web.js +65 -0
  967. package/plugins/compute/mod.d.ts +2 -0
  968. package/plugins/compute/mod.js +2 -0
  969. package/plugins/interfaces/api/actions/create.d.ts +1 -0
  970. package/plugins/interfaces/api/actions/create.js +64 -0
  971. package/plugins/interfaces/api/actions/revoke.d.ts +2 -0
  972. package/plugins/interfaces/api/actions/revoke.js +35 -0
  973. package/plugins/interfaces/api/collections/key.d.ts +139 -0
  974. package/plugins/interfaces/api/collections/key.js +70 -0
  975. package/plugins/interfaces/api/contract.d.ts +33 -0
  976. package/plugins/interfaces/api/contract.js +1 -0
  977. package/plugins/interfaces/api/mod.d.ts +27 -0
  978. package/plugins/interfaces/api/mod.js +46 -0
  979. package/plugins/interfaces/api/resources/presets.d.ts +8 -0
  980. package/plugins/interfaces/api/resources/presets.js +15 -0
  981. package/plugins/interfaces/api/shared/actor.d.ts +23 -0
  982. package/plugins/interfaces/api/shared/actor.js +24 -0
  983. package/plugins/interfaces/api/shared/events.d.ts +26 -0
  984. package/plugins/interfaces/api/shared/events.js +142 -0
  985. package/plugins/interfaces/api/shared/http.d.ts +28 -0
  986. package/plugins/interfaces/api/shared/http.js +93 -0
  987. package/plugins/interfaces/api/shared/reference.d.ts +48 -0
  988. package/plugins/interfaces/api/shared/reference.js +37 -0
  989. package/plugins/interfaces/api/shared/rules.d.ts +14 -0
  990. package/plugins/interfaces/api/shared/rules.js +28 -0
  991. package/plugins/interfaces/api/shared/secret.d.ts +7 -0
  992. package/plugins/interfaces/api/shared/secret.js +11 -0
  993. package/plugins/interfaces/api/shared/server.d.ts +34 -0
  994. package/plugins/interfaces/api/shared/server.js +177 -0
  995. package/plugins/interfaces/api/views/web/catalog.d.ts +24 -0
  996. package/plugins/interfaces/api/views/web/catalog.js +43 -0
  997. package/plugins/interfaces/api/views/web/create.d.ts +21 -0
  998. package/plugins/interfaces/api/views/web/create.js +133 -0
  999. package/plugins/interfaces/api/views/web/keys.d.ts +13 -0
  1000. package/plugins/interfaces/api/views/web/keys.js +85 -0
  1001. package/plugins/interfaces/api/views/web/palette.d.ts +9 -0
  1002. package/plugins/interfaces/api/views/web/palette.js +17 -0
  1003. package/plugins/interfaces/api/views/web/reference.d.ts +11 -0
  1004. package/plugins/interfaces/api/views/web/reference.js +26 -0
  1005. package/plugins/interfaces/api/views/web/snippet.d.ts +26 -0
  1006. package/plugins/interfaces/api/views/web/snippet.js +55 -0
  1007. package/plugins/interfaces/api/views/web/style.d.ts +7 -0
  1008. package/plugins/interfaces/api/views/web/style.js +105 -0
  1009. package/plugins/interfaces/api/web.d.ts +16 -0
  1010. package/plugins/interfaces/api/web.js +28 -0
  1011. package/plugins/interfaces/mod.d.ts +7 -0
  1012. package/plugins/interfaces/mod.js +7 -0
  1013. package/plugins/interfaces/terminal/actions/print.d.ts +1 -0
  1014. package/plugins/interfaces/terminal/actions/print.js +30 -0
  1015. package/plugins/interfaces/terminal/actions/set.d.ts +1 -0
  1016. package/plugins/interfaces/terminal/actions/set.js +38 -0
  1017. package/plugins/interfaces/terminal/collections/output.d.ts +43 -0
  1018. package/plugins/interfaces/terminal/collections/output.js +21 -0
  1019. package/plugins/interfaces/terminal/collections/shell.d.ts +49 -0
  1020. package/plugins/interfaces/terminal/collections/shell.js +30 -0
  1021. package/plugins/interfaces/terminal/mod.d.ts +13 -0
  1022. package/plugins/interfaces/terminal/mod.js +21 -0
  1023. package/plugins/interfaces/terminal/terminal.d.ts +18 -0
  1024. package/plugins/interfaces/terminal/terminal.js +30 -0
  1025. package/plugins/interfaces/terminal/views/default.d.ts +1 -0
  1026. package/plugins/interfaces/terminal/views/default.js +23 -0
  1027. package/plugins/interfaces/terminal/views/prompt.d.ts +7 -0
  1028. package/plugins/interfaces/terminal/views/prompt.js +5 -0
  1029. package/plugins/interfaces/terminal/views/shell.d.ts +5 -0
  1030. package/plugins/interfaces/terminal/views/shell.js +27 -0
  1031. package/plugins/interfaces/web/contract.d.ts +20 -0
  1032. package/plugins/interfaces/web/contract.js +1 -0
  1033. package/plugins/interfaces/web/mod.d.ts +64 -0
  1034. package/plugins/interfaces/web/mod.js +71 -0
  1035. package/plugins/interfaces/web/shared/menu.d.ts +14 -0
  1036. package/plugins/interfaces/web/shared/menu.js +4 -0
  1037. package/plugins/interfaces/web/shared/orgs.d.ts +88 -0
  1038. package/plugins/interfaces/web/shared/orgs.js +63 -0
  1039. package/plugins/interfaces/web/shared/palette.d.ts +36 -0
  1040. package/plugins/interfaces/web/shared/palette.js +30 -0
  1041. package/plugins/interfaces/web/shared/panel.d.ts +33 -0
  1042. package/plugins/interfaces/web/shared/panel.js +25 -0
  1043. package/plugins/interfaces/web/shared/standing.d.ts +7 -0
  1044. package/plugins/interfaces/web/shared/standing.js +35 -0
  1045. package/plugins/interfaces/web/shared/style.d.ts +13 -0
  1046. package/plugins/interfaces/web/shared/style.js +269 -0
  1047. package/plugins/interfaces/web/views/console.d.ts +13 -0
  1048. package/plugins/interfaces/web/views/console.js +212 -0
  1049. package/plugins/interfaces/web/views/default.d.ts +10 -0
  1050. package/plugins/interfaces/web/views/default.js +26 -0
  1051. package/plugins/interfaces/web/views/frame.d.ts +47 -0
  1052. package/plugins/interfaces/web/views/frame.js +122 -0
  1053. package/plugins/interfaces/web/views/me.d.ts +23 -0
  1054. package/plugins/interfaces/web/views/me.js +37 -0
  1055. package/plugins/interfaces/web/views/org.d.ts +12 -0
  1056. package/plugins/interfaces/web/views/org.js +54 -0
  1057. package/plugins/interfaces/web/views/orgs.d.ts +44 -0
  1058. package/plugins/interfaces/web/views/orgs.js +256 -0
  1059. package/plugins/interfaces/web/views/panel.d.ts +42 -0
  1060. package/plugins/interfaces/web/views/panel.js +61 -0
  1061. package/plugins/interfaces/web/views/shell.d.ts +23 -0
  1062. package/plugins/interfaces/web/views/shell.js +32 -0
  1063. package/plugins/interfaces/web.d.ts +4 -0
  1064. package/plugins/interfaces/web.js +4 -0
  1065. package/plugins/interfaces/whatsapp/actions/connect.d.ts +17 -0
  1066. package/plugins/interfaces/whatsapp/actions/connect.js +122 -0
  1067. package/plugins/interfaces/whatsapp/actions/disconnect.d.ts +2 -0
  1068. package/plugins/interfaces/whatsapp/actions/disconnect.js +55 -0
  1069. package/plugins/interfaces/whatsapp/actions/hook.d.ts +3 -0
  1070. package/plugins/interfaces/whatsapp/actions/hook.js +88 -0
  1071. package/plugins/interfaces/whatsapp/actions/link.d.ts +3 -0
  1072. package/plugins/interfaces/whatsapp/actions/link.js +93 -0
  1073. package/plugins/interfaces/whatsapp/collections/code.d.ts +78 -0
  1074. package/plugins/interfaces/whatsapp/collections/code.js +27 -0
  1075. package/plugins/interfaces/whatsapp/collections/number.d.ts +108 -0
  1076. package/plugins/interfaces/whatsapp/collections/number.js +31 -0
  1077. package/plugins/interfaces/whatsapp/collections/phone.d.ts +132 -0
  1078. package/plugins/interfaces/whatsapp/collections/phone.js +36 -0
  1079. package/plugins/interfaces/whatsapp/collections/secret.d.ts +64 -0
  1080. package/plugins/interfaces/whatsapp/collections/secret.js +25 -0
  1081. package/plugins/interfaces/whatsapp/collections/sent.d.ts +68 -0
  1082. package/plugins/interfaces/whatsapp/collections/sent.js +24 -0
  1083. package/plugins/interfaces/whatsapp/collections/thread.d.ts +66 -0
  1084. package/plugins/interfaces/whatsapp/collections/thread.js +19 -0
  1085. package/plugins/interfaces/whatsapp/contract.d.ts +15 -0
  1086. package/plugins/interfaces/whatsapp/contract.js +1 -0
  1087. package/plugins/interfaces/whatsapp/events/received.d.ts +7 -0
  1088. package/plugins/interfaces/whatsapp/events/received.js +17 -0
  1089. package/plugins/interfaces/whatsapp/mod.d.ts +31 -0
  1090. package/plugins/interfaces/whatsapp/mod.js +78 -0
  1091. package/plugins/interfaces/whatsapp/processors/receive.d.ts +24 -0
  1092. package/plugins/interfaces/whatsapp/processors/receive.js +238 -0
  1093. package/plugins/interfaces/whatsapp/processors/reply.d.ts +14 -0
  1094. package/plugins/interfaces/whatsapp/processors/reply.js +40 -0
  1095. package/plugins/interfaces/whatsapp/shared/commands.d.ts +27 -0
  1096. package/plugins/interfaces/whatsapp/shared/commands.js +43 -0
  1097. package/plugins/interfaces/whatsapp/shared/graph.d.ts +36 -0
  1098. package/plugins/interfaces/whatsapp/shared/graph.js +74 -0
  1099. package/plugins/interfaces/whatsapp/shared/http.d.ts +47 -0
  1100. package/plugins/interfaces/whatsapp/shared/http.js +22 -0
  1101. package/plugins/interfaces/whatsapp/shared/number.d.ts +17 -0
  1102. package/plugins/interfaces/whatsapp/shared/number.js +40 -0
  1103. package/plugins/interfaces/whatsapp/shared/payload.d.ts +76 -0
  1104. package/plugins/interfaces/whatsapp/shared/payload.js +94 -0
  1105. package/plugins/interfaces/whatsapp/shared/rules.d.ts +11 -0
  1106. package/plugins/interfaces/whatsapp/shared/rules.js +18 -0
  1107. package/plugins/interfaces/whatsapp/shared/settings.d.ts +18 -0
  1108. package/plugins/interfaces/whatsapp/shared/settings.js +9 -0
  1109. package/plugins/interfaces/whatsapp/shared/signature.d.ts +11 -0
  1110. package/plugins/interfaces/whatsapp/shared/signature.js +28 -0
  1111. package/plugins/interfaces/whatsapp/shared/text.d.ts +16 -0
  1112. package/plugins/interfaces/whatsapp/shared/text.js +88 -0
  1113. package/plugins/interfaces/whatsapp/views/web/connect.d.ts +45 -0
  1114. package/plugins/interfaces/whatsapp/views/web/connect.js +136 -0
  1115. package/plugins/interfaces/whatsapp/views/web/palette.d.ts +10 -0
  1116. package/plugins/interfaces/whatsapp/views/web/palette.js +26 -0
  1117. package/plugins/interfaces/whatsapp/views/web/phone.d.ts +25 -0
  1118. package/plugins/interfaces/whatsapp/views/web/phone.js +60 -0
  1119. package/plugins/interfaces/whatsapp/views/web/space.d.ts +15 -0
  1120. package/plugins/interfaces/whatsapp/views/web/space.js +91 -0
  1121. package/plugins/interfaces/whatsapp/views/web/style.d.ts +7 -0
  1122. package/plugins/interfaces/whatsapp/views/web/style.js +76 -0
  1123. package/plugins/interfaces/whatsapp/views/web/words.d.ts +15 -0
  1124. package/plugins/interfaces/whatsapp/views/web/words.js +26 -0
  1125. package/plugins/interfaces/whatsapp/web.d.ts +15 -0
  1126. package/plugins/interfaces/whatsapp/web.js +30 -0
  1127. package/plugins/models/actions/check.d.ts +1 -0
  1128. package/plugins/models/actions/check.js +32 -0
  1129. package/plugins/models/actions/embed.d.ts +1 -0
  1130. package/plugins/models/actions/embed.js +22 -0
  1131. package/plugins/models/actions/generate.d.ts +1 -0
  1132. package/plugins/models/actions/generate.js +28 -0
  1133. package/plugins/models/actions/price.d.ts +3 -0
  1134. package/plugins/models/actions/price.js +23 -0
  1135. package/plugins/models/actions/stream.d.ts +1 -0
  1136. package/plugins/models/actions/stream.js +27 -0
  1137. package/plugins/models/actions/transcribe.d.ts +1 -0
  1138. package/plugins/models/actions/transcribe.js +27 -0
  1139. package/plugins/models/adapters/embeddings/hash.d.ts +7 -0
  1140. package/plugins/models/adapters/embeddings/hash.js +24 -0
  1141. package/plugins/models/adapters/embeddings/openai.d.ts +2 -0
  1142. package/plugins/models/adapters/embeddings/openai.js +21 -0
  1143. package/plugins/models/adapters/llm/anthropic.d.ts +12 -0
  1144. package/plugins/models/adapters/llm/anthropic.js +219 -0
  1145. package/plugins/models/adapters/llm/fake.d.ts +10 -0
  1146. package/plugins/models/adapters/llm/fake.js +30 -0
  1147. package/plugins/models/adapters/llm/gemini.d.ts +11 -0
  1148. package/plugins/models/adapters/llm/gemini.js +186 -0
  1149. package/plugins/models/adapters/llm/openai-compatible.d.ts +9 -0
  1150. package/plugins/models/adapters/llm/openai-compatible.js +118 -0
  1151. package/plugins/models/adapters/llm/openai.d.ts +2 -0
  1152. package/plugins/models/adapters/llm/openai.js +94 -0
  1153. package/plugins/models/adapters/transcription/fake.d.ts +3 -0
  1154. package/plugins/models/adapters/transcription/fake.js +3 -0
  1155. package/plugins/models/adapters/transcription/openai.d.ts +2 -0
  1156. package/plugins/models/adapters/transcription/openai.js +44 -0
  1157. package/plugins/models/contract.d.ts +27 -0
  1158. package/plugins/models/contract.js +1 -0
  1159. package/plugins/models/mod.d.ts +40 -0
  1160. package/plugins/models/mod.js +83 -0
  1161. package/plugins/models/resources/providers.d.ts +15 -0
  1162. package/plugins/models/resources/providers.js +9 -0
  1163. package/plugins/models/shared/catalog.json +10252 -0
  1164. package/plugins/models/shared/choice.d.ts +112 -0
  1165. package/plugins/models/shared/choice.js +107 -0
  1166. package/plugins/models/shared/embed.d.ts +46 -0
  1167. package/plugins/models/shared/embed.js +50 -0
  1168. package/plugins/models/shared/files.d.ts +18 -0
  1169. package/plugins/models/shared/files.js +47 -0
  1170. package/plugins/models/shared/generate.d.ts +48 -0
  1171. package/plugins/models/shared/generate.js +180 -0
  1172. package/plugins/models/shared/provider.d.ts +59 -0
  1173. package/plugins/models/shared/provider.js +66 -0
  1174. package/plugins/models/shared/request.d.ts +58 -0
  1175. package/plugins/models/shared/request.js +19 -0
  1176. package/plugins/models/shared/retry.d.ts +22 -0
  1177. package/plugins/models/shared/retry.js +66 -0
  1178. package/plugins/models/shared/telemetry.d.ts +16 -0
  1179. package/plugins/models/shared/telemetry.js +66 -0
  1180. package/plugins/models/shared/transcribe.d.ts +51 -0
  1181. package/plugins/models/shared/transcribe.js +47 -0
  1182. package/plugins/models/shared/types.d.ts +114 -0
  1183. package/plugins/models/shared/types.js +1 -0
  1184. package/plugins/models/shared/use.d.ts +39 -0
  1185. package/plugins/models/shared/use.js +6 -0
  1186. package/runtime/aggregate.d.ts +57 -0
  1187. package/runtime/aggregate.js +196 -0
  1188. package/runtime/blobs.d.ts +42 -0
  1189. package/runtime/blobs.js +67 -0
  1190. package/runtime/browsers.d.ts +103 -0
  1191. package/runtime/browsers.js +220 -0
  1192. package/runtime/cache.d.ts +18 -0
  1193. package/runtime/cache.js +205 -0
  1194. package/runtime/client.d.ts +37 -0
  1195. package/runtime/client.js +222 -0
  1196. package/runtime/collection.d.ts +118 -0
  1197. package/runtime/collection.js +91 -0
  1198. package/runtime/define.d.ts +479 -0
  1199. package/runtime/define.js +6 -0
  1200. package/runtime/executor.d.ts +22 -0
  1201. package/runtime/executor.js +465 -0
  1202. package/runtime/memory.d.ts +2 -0
  1203. package/runtime/memory.js +238 -0
  1204. package/runtime/metrics.d.ts +83 -0
  1205. package/runtime/metrics.js +167 -0
  1206. package/runtime/mod.d.ts +13 -0
  1207. package/runtime/mod.js +8 -0
  1208. package/runtime/mongo.d.ts +24 -0
  1209. package/runtime/mongo.js +248 -0
  1210. package/runtime/observe.d.ts +57 -0
  1211. package/runtime/observe.js +369 -0
  1212. package/runtime/ops.d.ts +155 -0
  1213. package/runtime/ops.js +183 -0
  1214. package/runtime/owner.d.ts +133 -0
  1215. package/runtime/owner.js +1429 -0
  1216. package/runtime/reads.d.ts +21 -0
  1217. package/runtime/reads.js +56 -0
  1218. package/runtime/registry.d.ts +69 -0
  1219. package/runtime/registry.js +228 -0
  1220. package/runtime/runtime.d.ts +35 -0
  1221. package/runtime/runtime.js +44 -0
  1222. package/runtime/schedules.d.ts +142 -0
  1223. package/runtime/schedules.js +149 -0
  1224. package/runtime/store.d.ts +236 -0
  1225. package/runtime/store.js +22 -0
  1226. package/runtime/timers.d.ts +41 -0
  1227. package/runtime/timers.js +282 -0
  1228. package/runtime/views.d.ts +34 -0
  1229. package/runtime/views.js +84 -0
  1230. package/runtime/wire.d.ts +113 -0
  1231. package/runtime/wire.js +70 -0
  1232. package/stores/blobs/files/mod.d.ts +4 -0
  1233. package/stores/blobs/files/mod.js +37 -0
  1234. package/stores/blobs/http/mod.d.ts +15 -0
  1235. package/stores/blobs/http/mod.js +32 -0
  1236. package/stores/latency/mod.d.ts +7 -0
  1237. package/stores/latency/mod.js +42 -0
  1238. package/stores/memory/mod.d.ts +7 -0
  1239. package/stores/memory/mod.js +7 -0
  1240. package/stores/sql/postgres/dialect.d.ts +12 -0
  1241. package/stores/sql/postgres/dialect.js +99 -0
  1242. package/stores/sql/postgres/layout.d.ts +53 -0
  1243. package/stores/sql/postgres/layout.js +241 -0
  1244. package/stores/sql/postgres/mod.d.ts +48 -0
  1245. package/stores/sql/postgres/mod.js +1005 -0
  1246. package/stores/sql/postgres/pool.d.ts +35 -0
  1247. package/stores/sql/postgres/pool.js +47 -0
  1248. package/stores/sql/postgres/tenants.d.ts +60 -0
  1249. package/stores/sql/postgres/tenants.js +308 -0
  1250. package/stores/sql/postgres/update.d.ts +13 -0
  1251. package/stores/sql/postgres/update.js +62 -0
  1252. package/stores/sql/shared/aggregate.d.ts +32 -0
  1253. package/stores/sql/shared/aggregate.js +80 -0
  1254. package/stores/sql/shared/filter.d.ts +63 -0
  1255. package/stores/sql/shared/filter.js +114 -0
  1256. package/stores/sql/sqlite/dialect.d.ts +11 -0
  1257. package/stores/sql/sqlite/dialect.js +109 -0
  1258. package/stores/sql/sqlite/mod.d.ts +47 -0
  1259. package/stores/sql/sqlite/mod.js +465 -0
  1260. package/testing/mod.d.ts +46 -0
  1261. package/testing/mod.js +144 -0
package/README.md CHANGED
@@ -1,3 +1,877 @@
1
- # Temporary Holding Version
1
+ # Copilotz
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/copilotz?label=npm)](https://www.npmjs.com/package/copilotz)
4
+ [![JSR](https://jsr.io/badges/@copilotz/copilotz)](https://jsr.io/@copilotz/copilotz)
5
+
6
+ One runtime for agents and the apps around them, on Node, Deno, Bun, Cloudflare Workers and the
7
+ browser.
8
+
9
+ An app is plugins: agents that answer with tools and talk to each other and to people, conversations
10
+ in shared spaces, memory, skills and routines, a usage ledger, people's computers, sign-in and
11
+ connected accounts, a developer API, WhatsApp. Each is a plain object built from the same few
12
+ primitives (collections, Actions, Processors, Views, resources and adapters), and the runtime knows
13
+ nothing else. Everything durable is an event, a document, an edge, a vector or a blob, written by
14
+ one owner to one store (memory, SQLite or PostgreSQL), so every change is on the record and every
15
+ screen follows it live: in a terminal, in a browser, or in an agent's prompt.
16
+
17
+ ## Install
18
+
19
+ ```sh
20
+ npm install copilotz # Node 24+ (npm, pnpm, yarn)
21
+ bun add copilotz # Bun
22
+ deno add jsr:@copilotz/copilotz # Deno (or `deno add npm:copilotz`)
23
+ ```
24
+
25
+ On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.2"`), and
26
+ the imports below are the same everywhere. Some pieces need a package of their own, installed beside
27
+ it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the process,
28
+ and `@types/react` for the front ends' types.
29
+
30
+ ## A first app
31
+
32
+ ```ts
33
+ import { createRuntime, definePlugin } from "copilotz";
34
+ import { memoryStore } from "copilotz/stores/memory";
35
+ import { models } from "copilotz/plugins/models";
36
+ import { chat, type Message, tool } from "copilotz/plugins/agents";
37
+
38
+ // An app's own plugin is plain objects: a provider, an agent, a tool.
39
+ const app = definePlugin({
40
+ name: "app",
41
+ resources: {
42
+ provider: { openai: { apiKey: process.env.OPENAI_API_KEY } },
43
+ // "fake/echo" runs offline (it calls a tool you name); "openai/gpt-5.4-mini" with the key.
44
+ agents: { assistant: { instructions: "Be brief.", model: "fake/echo", tools: ["clock"] } },
45
+ tools: { clock: tool({ description: "The time now.", run: () => new Date().toString() }) },
46
+ },
47
+ });
48
+
49
+ const runtime = await createRuntime({ store: memoryStore(), plugins: [models, chat, app] });
50
+ const { thread } = await runtime.call<{ thread: string }>("chat.send", {
51
+ text: "What does the clock say?",
52
+ });
53
+ await runtime.idle();
54
+ for (const { from, text } of await runtime.query<Message[]>("message.history", { thread })) {
55
+ if (text) console.log(`${from}: ${text}`);
56
+ }
57
+ await runtime.close();
58
+ ```
59
+
60
+ `node app.ts` (or `bun app.ts`, `deno run -A app.ts`) prints the question and the agent's answer.
61
+ Swap `memoryStore()` for `sqliteStore({ path })` or `postgresStore({ url })` to keep it, add
62
+ `history` and `memory` to the plugins for long conversations and recall across them, `access` for
63
+ people and spaces, and serve it to browsers with the web host (below).
64
+
65
+ ## The primitives
66
+
67
+ The runtime knows only these, and plugins are made of them:
68
+
69
+ - **Collections:** documents with a JSON Schema, read and written with the MongoDB collection API
70
+ (`ctx.db.collection("note").insertOne(…)`, `find`, `updateOne` with `$set`…), with named queries,
71
+ vector fields and indexes. Every write records an event in the same commit.
72
+ - **Actions:** what can be done, with a JSON Schema input and an `allow(actor, input)` saying who
73
+ may call them. Every call is on the record (`action.started`, `action.completed`), retryable by
74
+ id, and everything it causes is its caller's.
75
+ - **Processors:** what happens when events happen: ordered per key, at least once, from a durable
76
+ cursor, idempotent by deterministic ids.
77
+ - **Views:** a plugin's front end, per medium: text for `llm` (the agents' prompt is a View), Ink
78
+ elements for `terminal`, React for `web`. Observed Views run again when what they read changes.
79
+ - **Resources:** configuration as named plain objects, by kind (`agents`, `tools`, `provider`,
80
+ `theme`…): a later plugin patches an earlier one's (JSON Merge Patch), so an app changes one
81
+ agent's `effort` without redefining it.
82
+ - **Adapters:** implementations of a port, by name: a model provider's protocol (`openai`,
83
+ `anthropic`…), an embeddings or transcription service.
84
+
85
+ Plugins reach each other only through the runtime, by name: Actions, resource kinds and declared
86
+ events. Time is a caller too: schedules call Actions (see Schedules).
87
+
88
+ ## Using it
89
+
90
+ The package's entry points, the same names on npm (`copilotz/…`) and JSR (`@copilotz/copilotz/…`):
91
+
92
+ | Import | What it has |
93
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
94
+ | `copilotz` | the runtime: `createRuntime`, `definePlugin`, `defineCollection`, `defineAction`… |
95
+ | `copilotz/stores/memory` | `memoryStore()`: in memory, the reference |
96
+ | `copilotz/stores/sqlite` | `sqliteStore({ path })`: `node:sqlite` or `bun:sqlite`, one file |
97
+ | `copilotz/stores/postgres` | `postgresStore({ url, schema, tenant })` (a server, or PGlite in the process), `postgresPool`, `copyTenant`… |
98
+ | `copilotz/stores/latency` | `withLatency(store, ms)`: a store with round trips, to measure |
99
+ | `copilotz/blobs/files` | `fileBlobs({ dir })`: blobs as files |
100
+ | `copilotz/blobs/http` | `httpBlobs({ url, headers })`: blobs in a bucket (S3, GCS, R2…) |
101
+ | `copilotz/plugins/models` | `models`: llm, embeddings, transcription, the models.dev catalog |
102
+ | `copilotz/plugins/agents` | `chat`, `history`, `memory`, `memoryExtraction`, `team`, `skills`, `routines`, `tool` |
103
+ | `copilotz/plugins/agents/web` | their web front ends: `chatWeb`, `teamWeb`, `memoryWeb`, `skillsWeb`, `routinesWeb` |
104
+ | `copilotz/plugins/agents/terminal` | their terminal front ends: `chatTerminal`, `memoryTerminal` |
105
+ | `copilotz/plugins/access` | `access` (`spaces`, `identity`), `accounts`, `directory`, `googleSignIn` |
106
+ | `copilotz/plugins/access/web` | `spacesWeb`, `accountsWeb` |
107
+ | `copilotz/plugins/access/terminal` | `accessTerminal` |
108
+ | `copilotz/plugins/billing` | `usage`: the ledger |
109
+ | `copilotz/plugins/billing/web` | `usageWeb` |
110
+ | `copilotz/plugins/billing/terminal` | `usageTerminal` |
111
+ | `copilotz/plugins/compute` | `computers`: people's computers, where agents work |
112
+ | `copilotz/plugins/compute/web` | `computersWeb` |
113
+ | `copilotz/plugins/compute/terminal` | `computersTerminal` |
114
+ | `copilotz/plugins/compute/downloads` | `computerDownloads`: the computer program's release, served by the app (Node) |
115
+ | `copilotz/plugins/interfaces` | `terminalPlugin` (the terminal's data), `api`, `whatsapp` |
116
+ | `copilotz/plugins/interfaces/web` | `webShell` (the web's root View), `apiWeb`, `whatsappWeb` |
117
+ | `copilotz/plugins/interfaces/terminal` | `terminalShell`: the terminal's root View |
118
+ | `copilotz/web` | the web host in the browser (`web`), and its toolkit (`Button`, `Markdown`…) |
119
+ | `copilotz/web/server` | its server half: `webServer`, `socket` |
120
+ | `copilotz/web/tickets` | `createTickets`: sessions traded for one-time tickets |
121
+ | `copilotz/web/theme` | `themeOf(plugins)`: the app's theme, for the page's first paint |
122
+ | `copilotz/web/node` | `bundle` (the browser's code, with esbuild), `serve`, `listen` (HTTP, sockets) |
123
+ | `copilotz/orgs` | `orgsHost`: many orgs behind one address, each a runtime of its own |
124
+ | `copilotz/terminal` | the terminal host: `terminal({ runtime, me })`, and its toolkit |
125
+ | `copilotz/exporters` | `otlp`, `exposition`: metrics out, the OpenTelemetry way |
126
+ | `copilotz/testing` | one test API for Deno, Node and Bun (`test`, `tempDir`, `serve`…) |
127
+
128
+ The browser loads only `copilotz/web`, the `…/web` front ends and what they import; every other
129
+ entry point is for the process that runs the runtime (or the terminal). The npm package is
130
+ JavaScript with its types beside it, so an app's bundler takes the front ends as they are.
131
+
132
+ ## Serve it on the web
133
+
134
+ The web host runs the app's front ends in the browser, as the person signed in: their reads go to
135
+ the owner under the access rules, and every change is pushed to them as it commits. The server half
136
+ answers `Request`s with `Response`s and nothing else, so it runs on any runtime; the page's code is
137
+ the app's own (its front ends), bundled. On Node:
138
+
139
+ ```ts
140
+ // server.ts
141
+ import { createRuntime } from "copilotz";
142
+ import { memoryStore } from "copilotz/stores/memory";
143
+ import { socket } from "copilotz/web/server";
144
+ import { createTickets } from "copilotz/web/tickets";
145
+ import { themeOf } from "copilotz/web/theme";
146
+ import { bundle, serve } from "copilotz/web/node";
147
+ import { plugins } from "./app.ts"; // models, chat, access, … and the app's own
148
+
149
+ const tickets = createTickets();
150
+ const runtime = await createRuntime({
151
+ store: memoryStore(),
152
+ plugins,
153
+ transports: [socket], // browsers connect to the owner here
154
+ admit: tickets.admit,
155
+ });
156
+ const server = await serve({
157
+ runtime,
158
+ tickets,
159
+ code: await bundle(new URL("./browser.tsx", import.meta.url)),
160
+ theme: themeOf([]), // Copilotz's look; a brand passes its theme plugins
161
+ port: 8080,
162
+ dev: true, // sign in by name, from this machine only
163
+ });
164
+ console.log(`${server.url}`);
165
+ ```
166
+
167
+ ```tsx
168
+ // browser.tsx
169
+ import { web } from "copilotz/web";
170
+ import { webShell } from "copilotz/plugins/interfaces/web";
171
+ import { chatWeb, memoryWeb, teamWeb } from "copilotz/plugins/agents/web";
172
+ import { spacesWeb } from "copilotz/plugins/access/web";
173
+
174
+ await web({
175
+ root: document.getElementById("app")!,
176
+ plugins: [webShell, chatWeb, spacesWeb, teamWeb, memoryWeb],
177
+ start: async (client) => ({
178
+ space: (await client.call<{ space: string }>("space.personal", {})).space,
179
+ }),
180
+ });
181
+ ```
182
+
183
+ `bundle` splits the code where it imports lazily (math, a terminal), and `serve` takes browsers'
184
+ sockets through Oxian's Node adapter; Bun and Deno run it too. On Deno,
185
+ `Deno.serve(webServer({ …, upgrade: handler(runtime.hypervisor) }))` with Oxian's Deno adapter, and
186
+ `deno bundle` for the code (`examples/terminal-agent/web.ts`). The whole example is in
187
+ `examples/web-node/` (`node examples/web-node/server.ts`).
188
+
189
+ Many orgs behind one address (`copilotz/orgs`, see [design/tenancy.md](design/tenancy.md)): a
190
+ directory signs people in and knows their orgs, and each org is a runtime of its own, opened when
191
+ first used. Node takes a socket before any handler runs, so `listen` serves the orgs host and hands
192
+ each socket to the runtime of the org its request is for:
193
+ `listen({ fetch: host.serve, hypervisor: (request) => host.openRuntime(request)?.hypervisor })`
194
+ (`examples/web-node/orgs.ts`).
195
+
196
+ ## Installing a computer
197
+
198
+ People's computers run the computer program (`plugins/compute/computers/program/`), a single
199
+ executable for macOS, Linux and Windows. Each Copilotz release on GitHub has it (`v<version>`: a
200
+ binary per platform, `install.sh`, `install.ps1`, and `manifest.json` with their sizes and SHA-256),
201
+ and an app serves it from there by default:
202
+
203
+ ```ts
204
+ import { computerDownloads } from "copilotz/plugins/compute/downloads";
205
+
206
+ plugins: [...plugins, await computerDownloads()], // this Copilotz's release
207
+ plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.2" })], // its own: /computer/download/
208
+ plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
209
+ ```
210
+
211
+ The publish workflow makes it when a `v1.*` tag is pushed, on a Mac (the macOS binaries are signed
212
+ there). A release whose program is the same as the last one's (`source` in the manifest: a hash of
213
+ its code, without its version, its install scripts and the Bun that builds it) has that release's
214
+ binaries, version and all, so computers don't update to what they have. To build one yourself:
215
+
216
+ ```sh
217
+ node scripts/computer/build.ts # dist/computer/<version>/
218
+ node scripts/computer/build.ts --reuse <url> # that release's, when it's the same program
219
+ ```
220
+
221
+ A space's Computer tab (or `/computer connect`) then gives the one line to run on the machine, for
222
+ its system, with a one-time code in it (and the binaries, to download instead):
223
+
224
+ ```sh
225
+ curl -fsSL https://app.example.com/computer/download/install.sh | sh -s -- https://app.example.com --code K7Q-4MZ
226
+ ```
227
+
228
+ ```powershell
229
+ & ([scriptblock]::Create((irm https://app.example.com/computer/download/install.ps1))) https://app.example.com -Code K7Q-4MZ
230
+ ```
231
+
232
+ It downloads that machine's binary, checks its SHA-256 against the release's manifest, puts it in
233
+ `~/.copilotz/bin` (`%LOCALAPPDATA%\Copilotz\bin`) on the PATH, connects it with the code, and keeps
234
+ it running from login on: a launchd agent on macOS, a systemd user unit on Linux, a scheduled task
235
+ on Windows. On that machine, `computer uninstall` stops it (`computer install` starts it again),
236
+ `computer forget` forgets it, and `computer run` runs it in the foreground instead. Its commands run
237
+ in bash, or on Windows in PowerShell (7 when it's there, else 5.1); agents are told which. A
238
+ computer older than the app's release updates itself as it connects: the app tells it the version,
239
+ and its binary's URL, size and SHA-256; it checks them, and that the new one runs, swaps it in and
240
+ starts again. The binaries aren't signed yet, so macOS and Windows warn about one downloaded with a
241
+ browser; the line doesn't need that.
242
+
243
+ One machine can serve several apps, or several orgs of one: run the line from each, and each is a
244
+ computer of its own there, in one program. Each one's spaces go in a folder of its own under
245
+ `~/Copilotz`, named for the org (the line from an org says it: `--folder acme`), else for the app's
246
+ host. `computer list` says which and where; `computer disconnect <app-url>` leaves one.
247
+
248
+ ## Plugins
249
+
250
+ Plugins come in themes. Every plugin is a plain object, and its settings are a resource under its
251
+ own name, which the app patches like any resource:
252
+
253
+ ```ts
254
+ plugins: [
255
+ models,
256
+ chat,
257
+ history,
258
+ memory,
259
+ usage,
260
+ definePlugin({
261
+ name: "app",
262
+ resources: { history: { summarizer: "cheap" }, memory: { embedder: "small" }, agents: { … } },
263
+ }),
264
+ ];
265
+ ```
266
+
267
+ Inside a theme, each plugin is laid out by primitive: `collections/`, `actions/`, `events/`,
268
+ `processors/`, `views/`, `resources/`, `adapters/`, one file per declaration, with `shared/` for
269
+ what several use; its `mod.ts` only assembles them. Its front ends are its own (`web.tsx`,
270
+ `terminal.ts`), loaded only where they draw, and the theme gathers them (`plugins/agents/web.tsx`).
271
+ Tests sit next to their theme (`plugins/<theme>/tests/`).
272
+
273
+ **A plugin reaches another only through the runtime, by name**, in three ways:
274
+
275
+ - **ask it to do something:** its Actions (`ctx.call("llm.stream", …)`);
276
+ - **plug into it:** the resource kinds it reads (chat's `tools` and `context`, models' `modelUse`,
277
+ the terminal's `commands`, the web host's `routes`);
278
+ - **hear what it announces:** its declared events, with Processors (`message.created`,
279
+ `turn.requested`).
280
+
281
+ A plugin that builds on another (memory and history on chat, chat on models, Google sign-in on
282
+ identity) says so (`requires: ["chat"]`), and imports from it only its `contract.ts`: the shapes of
283
+ its documents and resource kinds, its Actions' inputs and outputs, and declaration helpers such as
284
+ chat's `tool()`. Never its code. Plugins that would share code are one plugin (`models`).
285
+
286
+ **`models/`**: talking to models, one plugin (`models`) for three kinds. Other plugins call it by
287
+ name, never by importing its code.
288
+
289
+ - **`llm`**: `llm.stream` (chunks as they come, for a job in the same process: an agent's turn) or
290
+ `llm.generate` (the whole answer; from outside, its `stream` names a channel for live text).
291
+ Adapters, named by protocol: `openai` (Responses), `openai-compatible` (Chat Completions),
292
+ `anthropic`, `gemini`, and `fake` for offline runs (`"fake/echo"`).
293
+ - **`embeddings`**: `embeddings.embed`, from jobs, queries and Views. Adapters: `openai`,
294
+ `openai-compatible`, and `hash` (offline, word overlap: `"hash/words"`). One model per embedder:
295
+ vectors from different models don't compare.
296
+ - **`transcription`**: `transcription.transcribe`, with base64 audio. Adapters: `openai`,
297
+ `openai-compatible`.
298
+ - **`models.check`** says what's wrong with a model for a port (other plugins' startup checks ask
299
+ it); **`models.price`** says what the catalog says a model costs (the usage ledger asks it).
300
+ - These are unrecorded Actions: called from a job they run inline (no events, no commit of their
301
+ own), and queries, Views and startup checks may call them too, read-only.
302
+
303
+ **`agents/`**: conversations and the agents in them.
304
+
305
+ - **`chat`**: threads, messages, and agents
306
+ (`{ instructions, model, effort?, maxTokens?, temperature?, tools? }`) that answer with tools,
307
+ calling models through `llm`. A reasoning model's thinking (its provider state) is kept on the
308
+ agent's tool steps and goes back to that model while its turn goes on.
309
+ - **Several agents** take turns in parallel. With `send_message` an agent messages another agent
310
+ or a person, and waits for the replies before it continues.
311
+ - **Subthreads are forks:** whoever works in one sees the conversation up to the message it hangs
312
+ from, through every level, without anything being copied. A new thread starts from its first
313
+ message and records the thread it came from.
314
+ - **The prompt is a View:** the thread's `llm` View returns the agent's tools, its system text
315
+ (instructions, who's in the conversation, `system` contexts) and the conversation, then `turn`
316
+ contexts. Plugins add context with `resources.context.<name> = { place }` and a `context:<name>`
317
+ View, and change how anything reads to a model with Views (`views: { "tool:<name>": { llm } }`).
318
+ `runtime.query("thread.prompt", { thread, agent })` and `/prompt` show exactly what an agent
319
+ gets.
320
+ - **Files:** a message's files ride on it by name, type and size; their content is a `file`
321
+ document whose data the owner keeps as a blob. Agents read a text file's content, are shown
322
+ images and PDFs when their model reads them (the latest 8; the catalog says which models do, or
323
+ the model choice's `input: ["image"]`, and the others are told what they can't see), and see
324
+ anything else by name.
325
+ - **Audio:** `chat.send` transcribes audio before anything is sent (`chat.transcriber`, by default
326
+ the `transcribe` model alias), and agents read the transcript. If it fails nothing is sent
327
+ (`transcription_failed`); `transcribe: false` sends audio as it is. A voice message may say
328
+ nothing else; its file carries `voice` (duration, peaks) for its player.
329
+ - **`history`** keeps chat history from outgrowing the prompt
330
+ (`resources: { history: { summarizer: "openai/gpt-5.4-mini" } }`): every message stays whole, a
331
+ cheap model writes a line for each and merges pairs up a binary tree, and an agent gets recent
332
+ messages whole after one line per older part (fine when recent, coarse when old). The `zoom` tool,
333
+ offered once a thread is summarized, opens any line back down to the message. The tail and the
334
+ lines grow at their end and shrink in batches, so prompts keep hitting the provider's cache. Chat
335
+ knows nothing of it: it replaces chat's `history` View and tells chat where whole messages start
336
+ (a `history.since` View).
337
+ - **`memory`** gives agents memory across conversations (`resources: { memory: { embedder } }`; with
338
+ `memoryExtraction` beside it and an `extractor`, memories also arrive on their own).
339
+ - **Memories** are statements about a person, the agent itself, a thread, or everyone, stored with
340
+ an embedding, so recall works by meaning and by words.
341
+ - **Always in mind:** core memories about whoever is in the conversation go in the stable system
342
+ text; the other memories most relevant to what was just said come after the conversation, each
343
+ turn.
344
+ - **Tools for every agent:** `remember` (which updates what it repeats instead of duplicating it),
345
+ `recall` and `forget`.
346
+ - **On its own:** with an `extractor` model, every few messages it writes down what's worth
347
+ keeping (who people are, preferences, decisions), updating what it already knew.
348
+ - **`team`**: agents people make in a space, beside the app's, each a member of the spaces it works
349
+ in, with a page of its own on the web.
350
+ - **`skills`**: know-how an agent reads only when a task calls for it (a SKILL.md: a name, when it's
351
+ for, instructions, files beside). The app's are a `skills` resource; a space's managers make their
352
+ own. Each turn lists the names and purposes of the skills an agent has there, and `read_skill`
353
+ reads one. Built on chat's `context` and tools, so chat pays nothing without it.
354
+ - **`routines`**: a message sent to an agent on a schedule, in a space ("every weekday at 9:00, ask
355
+ @researcher for the news"), as whoever made it, reaching only what they reach; each run's chat and
356
+ outcome are kept. Agents make them from a conversation too (`schedule_routine`).
357
+
358
+ **`access/`**: who can see and do what (see [design/access.md](design/access.md)).
359
+
360
+ - **`spaces`**: shared spaces, Personal spaces and single shared documents, with members (people,
361
+ agents, other spaces) and roles; collections named in the `shared` resource keep to what each
362
+ actor reaches. People join by accepting an invitation to the email they signed in with; sending
363
+ one never says whether the address has an account. Agents are members too, each working only where
364
+ it's one; a new space has the app's default agents. An answer drawn from a space not everyone in
365
+ the conversation can see shows only to those who see both, marked, until someone shares it.
366
+ - **`identity`**: people, sessions and keys, and who a secret proves.
367
+ - **`googleSignIn`**: sign-in with a Google ID token (the `google` resource names your client).
368
+ - **`accounts`**: outside accounts a person connects once, for their agents to use: first their
369
+ ChatGPT plan, as a model provider, instead of the app's API key. Tokens are a private field only
370
+ the plugin's Actions read, renewed before they run out.
371
+ - **`directory`**: for an app serving many orgs (`copilotz/orgs`, see
372
+ [design/tenancy.md](design/tenancy.md)): who signs in, which orgs each belongs to, invitations to
373
+ orgs, where each org lives, and platform staff. It runs in a runtime of its own.
374
+
375
+ **`billing/`**: what was used, what it cost, what to charge.
376
+
377
+ - **`usage`** keeps a ledger of what was used, what it cost and what to charge for it.
378
+ - **Every model call is recorded:** the models plugin tells whoever plugs into its `modelUse`
379
+ resource what each call used, in the job that made it, and the ledger plugs in: it records the
380
+ use (`ctx.record`, so no round trip of its own, kept even if the job fails), tagged with what it
381
+ was for (thread, agent, turn, purpose) and the person it was for. Models know nothing of
382
+ billing; billing builds on models. An app records its own uses with `usage.record`.
383
+ - **Rated as recorded,** so a record keeps what applied. Cost comes from `resources.cost` (the
384
+ app's rates: negotiated, a subscription at 0, compute by the second), else from the catalog's
385
+ prices; price comes from `resources.price` only (rates of its own, or a `markup` on cost). Rates
386
+ are keyed by subject, then `provider/*`, then the catalog, then `*`, and dated lists apply each
387
+ rate from its `since`. A use nothing prices is kept and flagged `unpriced`.
388
+ - **Totals** by any field or tag, summed by the store (`aggregate`) over indexed fields (time,
389
+ meter, subject, thread; more from the app:
390
+ `collections: { usage: { indexes: [["tags.tenant", "at"]] } }`):
391
+ `runtime.query("usage.totals", { filter, by: ["day", "tags.agent"] })`. A person asking gets
392
+ their own usage only; the system, everyone's.
393
+ - **Rollups:** a schedule closes each UTC day at 00:10 (`usage.close`), rolling its records up
394
+ into one document per group of meter, subject and the dimensions (`tags.agent`, `tags.purpose`;
395
+ more with `resources: { usage: { rollups: { dimensions } } }`). Totals then read whole closed
396
+ days from the rollups and only the rest from the records. Each close counts the last 7 closed
397
+ days again and closes again any whose records came late; `usage.close { from }` closes again
398
+ from an older day. `schedules: { "usage.close": null }` turns them off.
399
+ - **Re-rating** (`usage.rerate`) never changes a record: it appends adjustments, dated when made,
400
+ and totals follow.
401
+ - **On the web** (`usageWeb`): an org's Usage page, day by day and against the period before, by
402
+ person, agent and model; owners and admins see everyone's, anyone else their own.
403
+
404
+ **`compute/`**: **`computers`**, machines people connect (the computer program in
405
+ `computers/program/`, a worker of the plugin's `computer` kind) and their desks, one per space
406
+ they're in, shared with its members. Agents there get a terminal, background jobs, files, a browser
407
+ (hidden, or shown on its screen for you to watch or step in) and web search, each agent with its own
408
+ shell, jobs and browser, in a folder of the space under `~/Copilotz`. A computer is its owner's;
409
+ shared into another space, every member's agents use it too (it runs their commands as its owner, on
410
+ that machine: share one you mean to). Commands, jobs and writes wait for a yes, from the person the
411
+ agent works for (or, if its owner says so, from the owner).
412
+
413
+ **`interfaces/`**: how people reach the runtime. The terminal's data (`terminalPlugin`: where each
414
+ person is, what their commands printed) and its shell (`terminalShell`), and the web shell
415
+ (`webShell`: the sidebar, the main area by address, the side panel and the command palette, each
416
+ filled by the front ends through resources).
417
+
418
+ - **`api`**: the developer API. A person makes a key in a space, for the Actions, queries and Views
419
+ it may use there; code then calls them over HTTP under `/api/`, and follows what happens as
420
+ server-sent events, as that person, in that space only.
421
+ - **`whatsapp`**: people talk to their agents from WhatsApp, through Meta's Cloud API. A space's
422
+ managers connect a number; a person links their phone with a code; what they send becomes their
423
+ messages, and what agents say to them goes back, a long answer in several messages.
424
+
425
+ **Metrics** (`copilotz/exporters`): what the runtime and plugins do, measured. There's no plugin to
426
+ add: each plugin instruments itself.
427
+
428
+ - In OpenTelemetry's model: counters, histograms and gauges, aggregated in the process
429
+ (`createMetrics`, web standards only) and exported as OTLP/HTTP JSON (`otlp({ url })`) or
430
+ Prometheus text (serve `exposition(meter)` at `/metrics`). The host makes the meter and passes it
431
+ to `createRuntime({ metrics })` (and to remote executors); plugin code records with `ctx.metrics`.
432
+ Recorded:
433
+ - the runtime: `copilotz.job.duration` (by kind, name, outcome), `copilotz.op.duration` and
434
+ `copilotz.op.roundtrip`, `copilotz.commit.duration`, `copilotz.events`,
435
+ `copilotz.processor.lag`, `copilotz.executors`, `copilotz.cache.reads`;
436
+ - model calls, by OpenTelemetry's GenAI conventions: `gen_ai.client.operation.duration`,
437
+ `gen_ai.client.token.usage`, and `copilotz.llm.time_to_first_token`;
438
+ - the ledger: `copilotz.usage.cost` and `copilotz.usage.price`.
439
+ - Metrics are for dashboards and alerts; the ledger stays the record for billing. A collector that's
440
+ down is logged and never fails the runtime.
441
+
442
+ ### Models and providers
443
+
444
+ A model is `"provider/model"`, with the settings to call it with next to it:
445
+
446
+ ```ts
447
+ resources: {
448
+ provider: {
449
+ openai: { apiKey }, // the catalog knows its protocol and URL
450
+ deepseek: { apiKey }, // OpenAI-compatible, at api.deepseek.com
451
+ local: { adapter: "openai-compatible", baseURL: "http://localhost:11434/v1" },
452
+ chatgpt: { adapter: "openai", catalog: "openai", headers: () => oauthHeaders() },
453
+ },
454
+ model: { cheap: { model: "openai/gpt-5.4-mini", effort: "low" } }, // optional aliases
455
+ agents: {
456
+ lead: { instructions, model: "openai/gpt-6.1-sol", effort: "low" },
457
+ // A list is tried in order when a model fails before writing anything.
458
+ north: { instructions, model: ["chatgpt/gpt-6.1-sol", "anthropic/claude-opus-5-5"], effort: "low" },
459
+ },
460
+ history: { summarizer: "cheap" },
461
+ memory: { embedder: { model: "openai/text-embedding-3-small", dimensions: 512 }, extractor: "cheap" },
462
+ }
463
+ ```
464
+
465
+ - **A `provider` resource** is an account or an endpoint: `baseURL` (where), `apiKey` (the
466
+ provider's usual auth header), `headers` (added last, so they can replace the auth; a function
467
+ computes them per request, for OAuth), `adapter` (the protocol) and `catalog` (whose catalog
468
+ entries its models use; its own name by default, `false` for none).
469
+ - **The catalog** (`plugins/models/shared/catalog.json`, from [models.dev](https://models.dev),
470
+ refreshed weekly) fills in what a provider leaves out: its protocol and URL for 232 providers, and
471
+ for 8,947 models their prices, how their reasoning is controlled and their limits.
472
+ - **Settings** sit next to a model, per port: `effort`, `maxTokens`, `temperature` for llm,
473
+ `dimensions` for embeddings, and `options` (into the request as they are) for all. Settings where
474
+ a model is used win over an alias's; a list entry's win over its list's.
475
+ - **`effort`** is one scale for every provider (`none`, `minimal`, `low`, `medium`, `high`, `xhigh`,
476
+ `max`), mapped to OpenAI's `reasoning.effort`, Anthropic's adaptive thinking or thinking budget,
477
+ Gemini's thinking level or budget. A level a model doesn't take stops the runtime from starting,
478
+ with the levels it does take; a model the catalog doesn't know is left to its provider.
479
+ - **Checked at startup:** chat checks every agent's model, memory its embedder and extractor, so a
480
+ missing provider, an unknown protocol or a wrong effort fails `createRuntime`, not a turn.
481
+
482
+ Action inputs name models and never carry keys, because Action inputs are recorded in events. Any
483
+ plugin can add its own adapter under `adapters.llm`, `adapters.embeddings` or
484
+ `adapters.transcription`, named by the protocol it speaks.
485
+
486
+ `plugins/models/tests/providers.test.ts` checks each adapter against a local server speaking that
487
+ provider's API; `plugins/models/tests/live.test.ts` runs against the real APIs when
488
+ `COPILOTZ_LIVE=1` and the provider's key are set.
489
+
490
+ ## Stores
491
+
492
+ `memory` (the reference), `sqlite` and `postgres`, with the same MongoDB semantics in all three and
493
+ one conformance suite (`stores/tests/`). [`stores/README.md`](stores/README.md) describes each one
494
+ and lists exactly which parts of the MongoDB collection API they support, and how. A PostgreSQL
495
+ store holds one tenant (an org): many share a schema, each kept apart by the store itself, and an
496
+ org's rows copy elsewhere unchanged (`copyTenant`). Blobs (strings over 16 KiB, files people send)
497
+ live in the store by default, or as files (`fileBlobs`) or in a bucket (`httpBlobs`).
498
+
499
+ ## The example app
500
+
501
+ `examples/terminal-agent` is an app on all of it: an assistant and a researcher, notes in spaces,
502
+ computers, in the terminal or in a browser. From a clone of this repository:
503
+
504
+ ```sh
505
+ deno task chat # fake model, in-memory store
506
+ deno task chat --screen # the whole screen; same Views
507
+ OPENAI_API_KEY=… deno task chat # real model (MODEL=… to pick one)
508
+ deno task chat --rtt=1.74 # simulate production DB round trips (ms)
509
+ deno task chat --sqlite # persist to .data/copilotz.sqlite (or --sqlite=path)
510
+ deno task chat --postgres=postgres://… # persist to PostgreSQL (schema "copilotz")
511
+ deno task chat --executors=4 # more executors in this process
512
+
513
+ deno task chat --listen=8787 --executors=0 # owner only; executors connect remotely…
514
+ deno task executor --port=8787 # …from other terminals (as many as you like)
515
+
516
+ deno task bench [--rtt=1.74] [--remote] [--sqlite | --postgres=URL] # overhead per turn
517
+
518
+ deno task web [--sqlite] # the same app in a browser: http://localhost:8790
519
+ BRAND=harbor deno task web # …rebranded by one theme resource (/gallery: the toolkit)
520
+ node examples/web-node/server.ts # a web app on Node: http://localhost:8080
521
+ ```
522
+
523
+ You are a person to the runtime (`--as=ana`; `/as bob` hands the terminal to someone else): your
524
+ conversations live in your Personal space; `/space <name>` makes a shared space (new conversations
525
+ go there), `/invite <email> [role]` invites someone (`/invite agent:researcher viewer` lets an agent
526
+ in at once), `/spaces` and `/work <n>` move between them. `/agents` lists who works in a space (●
527
+ answers new chats), `/agent Maya: writes launch copy` makes one there (`@maya`), `/default maya` has
528
+ it answer new chats, `/remove agent:maya` takes it out. People join by accepting an invitation
529
+ (`/invitations`, `/accept <n>`; `--as=bob@example.com` is a person with that email).
530
+ `/file <path>
531
+ [message]` sends a file. `/computer connect` in a space gives the command that
532
+ connects a computer to it; `/approve once|thread|always|no` answers what agents wait on.
533
+
534
+ Inside the chat: `/new`, `/threads`, `/open <n>`, `/history`, `/memories`, `/usage [all]`,
535
+ `/metrics [name]` (with `OTEL_EXPORTER_OTLP_ENDPOINT` set, metrics also go to that collector),
536
+ `/prompt [agent]`, `/fork`, `/retry`, `/events [n]`, `/stats`, `/sql <query>` (SQLite only),
537
+ `/quit`. Every turn prints its time, its database round trips, the jobs sent to executors and the
538
+ calls they made back to the owner.
539
+
540
+ In the browser, you sign in by name or email (this machine only), or with Google when
541
+ `GOOGLE_CLIENT_ID` is set. Where you are is the address (`/thread/<id>`, `?in=<space>`), so links,
542
+ back and forward, and two tabs work. ⌘K (Ctrl+K) opens the command palette: go to any space, chat or
543
+ agent, make a space, a chat or an agent, invite someone, move this chat (or a memory, a note, a
544
+ computer) to another space, rename, archive or leave a space, each from the plugin it belongs to.
545
+ The composer also records voice messages.
546
+
547
+ ### Developing Copilotz
548
+
549
+ ```sh
550
+ deno task check # types, everywhere
551
+ deno task test # the suite (COPILOTZ_TEST_POSTGRES_URL adds PostgreSQL)
552
+ npm install && npm test # the same on Node 24 (the TypeScript as it is, not .tsx)
553
+ bun test --timeout 60000 # and on Bun
554
+ npm run build # the npm package, in dist/npm/
555
+ node scripts/npm/smoke.ts # …packed, installed in a new project, and used
556
+ deno publish --dry-run # the JSR package
557
+ ```
558
+
559
+ Releases are tags: `v1.2.3` publishes to JSR and npm once the suite passes on every runtime
560
+ (`.github/workflows/publish.yml`). [CHANGELOG.md](CHANGELOG.md) says what each one changed.
561
+
562
+ ## Events
563
+
564
+ The log records what happened, with no bookkeeping tables beside it:
565
+
566
+ - **Collection writes.** Every change to a declared collection records `<collection>.created`,
567
+ `.updated` or `.deleted` in the same commit, with `{ _id, doc }` (the document after the write;
568
+ the last version for a delete); updates also list the `changed` and `removed` fields. A write that
569
+ changes nothing records nothing. A collection opts out with `events: false`; `sys.*` collections
570
+ never record.
571
+ - **Action calls.** Each call records `action.started` `{ action, input }`, then `action.completed`
572
+ `{ action, result }` or `action.failed` `{ action, error }`.
573
+ - `started` costs no commit of its own: every write carries it until one commits, and the store
574
+ keeps the first copy, so it lands in the action's earliest commit, ahead of all its effects. The
575
+ completion is the only extra commit.
576
+ - `started` records the call's own `startedAt`; `completed` and `failed` record its duration in
577
+ `ms`. An event's `at` is its commit time. An action opts out with `record: false`.
578
+ - **Retries.** The log is the receipt store; no other table holds them.
579
+ - `runtime.call(action, input, { id })` makes a call retryable. If that id already completed, the
580
+ call returns its recorded result without running; if it's still running, the call joins it;
581
+ otherwise it runs again as the next attempt, recording `action.retried`
582
+ `{ attempt, after: "failed" | "lost" }`. Every action event carries its `attempt`.
583
+ - **Id conflicts:** an id reused for a different action or input is refused with `id_conflict`.
584
+ Calls are compared by `inputHash` (action + input with keys sorted), recorded in
585
+ `action.started`. A call with an id reads the log once before running, to find its receipt.
586
+ - **Executor loss:** if an executor dies mid-call, the owner records `action.failed`
587
+ `{ code: "executor_lost" }`, with the call's start if that never committed.
588
+ - **Nested calls:** a nested call's id comes from its cause, its place among the calls made under
589
+ it, and its `inputHash`. When a delivery or call is retried, the calls it already completed
590
+ answer from the log instead of running again; if the code now calls something different, that
591
+ makes a new call.
592
+ - **Processor deliveries:** every failed attempt records `processor.retried`
593
+ `{ attempt, after, error }` before the next one. After the last attempt, `processor.failed`
594
+ `{ attempts, error }` is the dead letter.
595
+ - **Outside effects (payments, emails, outside APIs):** write the intent first, call out with its
596
+ id as the idempotency key, then write the result. The intent's commit carries the call's start,
597
+ so the attempt is on record before anything leaves the system.
598
+ - **Timers.** An occurrence is a call like any other, with an id of its own: `<timer>@<due time>`
599
+ (see Schedules). A failed one runs again as that same call, recording `action.retried`.
600
+ - **Causes.** Every event names its cause: an action's writes, its `action.started`; a nested call,
601
+ the outer call; a processor's writes, the event it handles. The log is a tree you can walk from
602
+ any event back to the request that started it.
603
+ - **Blobs.** Strings over 16 KiB (configurable) are stored once, named by the hash of their content
604
+ (`sha256-…`). Documents and events hold `{ $blob, size, type }` in their place. The owner moves
605
+ values out on write and back in on read, so plugin code never sees a reference.
606
+
607
+ ## Schedules
608
+
609
+ Time is a caller of Actions. There is no scheduler plugin and no job table: a timer is a document in
610
+ `sys.timers` naming an Action, its input and when to call it.
611
+
612
+ - **Declared:** a plugin declares recurring timers by name, by a cron expression (in a timezone, UTC
613
+ by default) or every so long:
614
+
615
+ ```ts
616
+ schedules: {
617
+ "usage.close": { cron: "10 0 * * *", call: "usage.close", input: {} },
618
+ heartbeat: { every: "5m", call: "health.check" },
619
+ }
620
+ ```
621
+
622
+ They merge like resources: a later plugin patches an entry (`{ every: null, cron: "0 * * * *" }`)
623
+ or removes it with `null`. At start the owner makes the timers what the plugins declare: a changed
624
+ one is reset, a removed one goes, and an unchanged one keeps its next time. A schedule calling an
625
+ unknown Action, with input its Action refuses or a bad cron expression stops the runtime from
626
+ starting.
627
+ - **From code:** `ctx.schedule(action, input, { at | cron | every, id?, retries? })` sets a timer
628
+ with the call's writes (in a transaction, `tx.schedule` commits with the rest) and returns its id;
629
+ `ctx.unschedule(id)` removes it. Scheduling an id again replaces its timer. Without an `id`, one
630
+ comes from the call and its place among the timers it sets, so a retried call sets the same timers
631
+ again rather than more. A declared timer can't be taken over from code.
632
+ - **One clock:** the owner keeps one wake armed for the earliest timer, re-armed as timer writes
633
+ commit. When it rings, the owner claims what's due in one commit (a recurring timer moves to its
634
+ next time, a one-off loses its time) and calls each occurrence's Action as the call
635
+ `<timer>@<due time>`, so an occurrence called twice runs once.
636
+ - **Late, not twice:** a recurring timer that missed several times while nothing ran fires once,
637
+ then keeps its beat (`every`) or its next match (`cron`).
638
+ - **Retries:** a failed occurrence comes back as a timer of its own, calling as the same occurrence
639
+ after 10 s, 30 s, 90 s… up to `retries` (2) further attempts. A one-off goes once it succeeds or
640
+ runs out of attempts; `action.failed` stays on record for Processors to answer.
641
+ - **Restarts:** occurrences a stop cut short run again as themselves when the owner starts (a
642
+ finished one answers from the log), unless a retry is already waiting for them.
643
+ - **The clock is a port:** `createRuntime({ clock })`. The default uses the process's timers;
644
+ `manualClock(start)` moves only when a test says so (`advance`, `set`); a host whose clock only
645
+ rings, like a Durable Object's alarm, sets the alarm in `wake(at)` and calls `runtime.wake()` when
646
+ it rings. `copilotz.timer.lateness` measures how late occurrences were called.
647
+
648
+ ## Owner cache
649
+
650
+ The owner is the only writer, so every change passes through it, and what it caches is never stale:
651
+ documents by `_id` (filled by reads and by every committed write) and query results (`find` with
652
+ filter, sort and limit, and `count`). Each committed change updates the cached results with the
653
+ reference semantics, the same ones the store conformance suite holds every store to. When a change
654
+ can't be applied exactly, the query is dropped and the next read fetches it again: a sort key
655
+ changed, a limited result lost a member, or an existing document newly matched among ties.
656
+
657
+ - **Not cached:** queries with `skip`; queries that compare whole objects or arrays (key order
658
+ differs between stores); reads inside a transaction, which see the transaction's own writes.
659
+ - **Freshness:** a read that raced a commit to its collection doesn't fill the cache, and a
660
+ transaction's changes reach the cache only once committed, before its events go out.
661
+
662
+ `runtime/tests/cache.test.ts` checks every cached query against a direct store read after each of
663
+ 900 random writes, on every store. `createRuntime({ cache: false })` turns the cache off; `stats()`
664
+ reports `hits` and `misses`.
665
+
666
+ ## Topology
667
+
668
+ A runtime is one **owner** and its **executors**, composed with Oxian:
669
+
670
+ - **The owner** is the only holder of its store: it commits every write and sequences events,
671
+ publishes events and live frames to subscribers, and schedules Processors (per-key lanes, cursors,
672
+ retries).
673
+ - **Executors** run plugin code (Actions, Processor deliveries and queries) as Oxian work. They hold
674
+ no store: each storage call is one op they send to the owner, and live frames ride the job's
675
+ output stream back to it.
676
+ - **Same code, any placement.** By default both share one process over Oxian's in-process transport.
677
+ Executors in other processes or machines connect over Oxian's WebSocket transport and present the
678
+ owner's executor key.
679
+ - **Workers of a plugin's kind:** a plugin declares a kind of worker, a program that does its work
680
+ but isn't plugin code (a computer running commands), as
681
+ `workers: { computer: { admit, ready, gone, workloads } }`. It connects to the owner as executors
682
+ do, presenting `<kind>:<secret>`; `admit` says who it is, and `ready` and `gone` hear it come and
683
+ go. Plugin code sends it jobs with `ctx.workers.dispatch(kind, id, workload, input)` and reads its
684
+ output as it comes (`ctx.workers.call` for one JSON answer); one that isn't connected fails with
685
+ `offline`.
686
+ - **Browsers** connect the same way, as untrusted workers bound to the person signed in: they ask
687
+ the owner for reads under the rules, and Actions.
688
+
689
+ Per turn with an instant model (`deno task bench`), a plain turn costs 4 database round trips, 2
690
+ jobs and 7 calls. Each in-process hop costs about 0.2 ms, and a loopback WebSocket hop about 0.4 ms.
691
+
692
+ ## Runtimes
693
+
694
+ Copilotz runs on Node (first), Deno and Bun, and is built for Cloudflare Workers and the browser:
695
+
696
+ - **Library code uses web standards only:** fetch, streams, Web Crypto, `URL`, `AbortSignal`. What
697
+ differs by runtime sits behind the runtime's ports: stores (`stores/`), blobs (`stores/blobs/`),
698
+ and the transport and listener (Oxian, whose apps are fetch handlers and whose Hypervisor takes
699
+ fetch-style upgrades; `copilotz/web/node` is the listener on Node).
700
+ - **Stores pick what the runtime has:** SQLite opens `node:sqlite` on Node and Deno, `bun:sqlite` on
701
+ Bun, or any database with the same small API (`sqliteStore({ path, open })`, such as a Durable
702
+ Object's); Postgres runs on Ominipg (a server, or PGlite); file blobs use `node:fs`.
703
+ - **Nothing reads the environment:** a host passes configuration in (`postgresStore({ trace })`).
704
+ - **One suite, three runners:** tests use `testing/mod.ts` (test, temp files, a local server, child
705
+ processes, serving a Hypervisor) instead of a runtime's own APIs, and CI runs them on Deno, Node
706
+ and Bun against PostgreSQL, and on Node on macOS and Windows. Front ends are `.tsx` (Ink, React):
707
+ Deno and Bun run them as they are, Node from the npm package's JavaScript.
708
+ - **Published twice, from the same sources:** JSR takes the TypeScript; npm takes JavaScript with
709
+ `.d.ts` beside it (`scripts/npm/build.ts`), with relative imports as `.js` and JSX compiled.
710
+
711
+ ## Shape
712
+
713
+ - **The runtime knows only primitives:** plugins (`definePlugin`); Collections (JSON Schema, with
714
+ named queries), Actions, Processors and Views; opaque Resources (named declarations by kind) and
715
+ Adapters (port implementations). It never knows what a plugin is for.
716
+ - **Plugins merge in order.** Collections, Actions and Processors are unique. Resources are
717
+ configuration: a later plugin patches an earlier one's entries (JSON Merge Patch: objects merge,
718
+ `null` removes, the rest replaces). A later View or adapter replaces an earlier one of its name.
719
+ Then each plugin's `check` validates what it understands of the result.
720
+ - **Five things persist:** events, nodes (documents), edges, vectors and blobs. That's the storage
721
+ port (`runtime/store.ts`).
722
+ - **Collections speak MongoDB:** `ctx.db.collection("x").insertOne/find/updateOne(...)`, with the
723
+ usual filter and update operators. The runtime translates each call into one store operation,
724
+ which the memory store runs in JavaScript and the SQL stores translate to SQL.
725
+ - **Queries** are named reads declared on a collection
726
+ (`queries: { history: (messages, params,
727
+ ctx) => … }`). Clients call
728
+ `runtime.query("message.history", params)`; plugin code calls
729
+ `ctx.db.collection("message").query("history", params)`. They never write. An actor calling from
730
+ outside runs only those that let them (`{ allow, run }`, as Actions); a bare function is the
731
+ system's.
732
+ - **Views** are each plugin's front end, per medium (see [design/views.md](design/views.md)): text
733
+ for `llm`, Ink elements for `terminal`, React for `web`. A View for kind `"*"` is a medium's
734
+ default for kinds without one. `runtime.render(medium, kind, item)` renders one once (an agent's
735
+ prompt); `runtime.observe(medium, kind, item, { part })` keeps one live: it runs again when a
736
+ commit changes a document it read, and each View it shows (`ctx.show`) is a part that runs again
737
+ on its own. Views call Actions from their handlers (`ctx.call`, `ctx.emit`).
738
+ - **A feature's front end is its own:** chat, memory and usage each have a `terminal.ts`
739
+ (`chatTerminal`…) with their terminal Views and commands, added only where the terminal draws;
740
+ chat, team, memory, spaces and computers a `web.tsx` (`chatWeb`…), loaded only by the browser. The
741
+ features themselves (in every process) stay free of UI code.
742
+ - **The terminal** (`plugins/interfaces/terminal`) is built from the same primitives. Its data
743
+ (`terminalPlugin`, every process): where each person is (`shell`, changed by `shell.set`) and what
744
+ their commands printed (`output`, kept in memory). Its front end (`terminalShell`): the root
745
+ `shell` View composes what's open, the scrollback (what's done prints once, in order, into the
746
+ terminal's own history) and where you type (commands complete as you type). The host
747
+ (`hosts/terminal`: `terminal({ runtime, me })`) draws it with Ink: a reply being written grows in
748
+ place, as its own part.
749
+ - **The web** (see [design/views.md](design/views.md), "The web") runs Views in the browser. The
750
+ page signs in (an httpOnly session cookie), trades the cookie for a one-time ticket (`/connect`),
751
+ and connects to the owner over Oxian as an untrusted worker bound to that person
752
+ (`web({ plugins,
753
+ root })` in the browser, `webServer({ runtime, tickets, code, upgrade })`
754
+ beside the runtime, which declares the `socket` transport). A browser reads a collection directly
755
+ only when a rule speaks for it; anything else, through queries that let its person. Writes are
756
+ Actions. Plugins answer their own HTTP through the `routes` resource (a webhook, an OAuth
757
+ callback, an API, a download), and files people sent are served at `/files/<id>` to whoever may
758
+ read them, with ranges.
759
+ - **The design system** (`design/views.md`, "The design system"): the web host owns a token
760
+ vocabulary (shadcn's names) and its defaults, which are Copilotz's look (navy, the logo's cyan and
761
+ blue, Manrope and Space Grotesk, its logo and icon), and an app rebrands with a `theme` resource
762
+ (`{ radius, font, logo, light: { primary }, dark }`), merged like any resource and applied from
763
+ the first paint on (`webServer({ theme })` puts it in the page). Front ends compose the host's
764
+ toolkit (`Button`, `Menu`, `Dialog`, `Markdown`, `Logo`, `Page`, `DetailList`…), and their own CSS
765
+ is only layout, on the theme's variables (`testing/styles.test.ts` fails otherwise). The default
766
+ fonts are the host's own, served under `/assets/copilotz/` with no configuration; a theme's own
767
+ come from Google Fonts (convenient, but every visitor's browser tells Google its IP address: a
768
+ GDPR concern) or from the app itself
769
+ (`webServer({ assets: { "/assets/fonts/brand.css": bytes,
770
+ … } })`, served under `/assets/` only,
771
+ by exact path, with known types, `nosniff` and caching).
772
+ - **Live state is data:** a collection declared `durable: false` lives in the owner's memory, not
773
+ the store, with no events. Chat's `live` collection is what agents are writing right now; it goes
774
+ in the commit that writes the step or reply it became, so a screen never shows both, or neither.
775
+ - **Vectors:** a collection declares vector fields (`vectors: ["embedding"]`), written like any
776
+ field and searched with `collection.nearest(vector, { filter, limit })` (pgvector on Postgres).
777
+ - **Aggregates and indexes:** `collection.aggregate([{ $match }, { $group }, { $sort }, …])` groups
778
+ and totals in the store (SQL `GROUP BY`), and `indexes: [["at"], ["tags.tenant", "at"]]` on a
779
+ collection makes filters on those fields use an index.
780
+ - **Records:** a collection declared `records: true` is a ledger: documents are appended, never
781
+ changed or deleted, and are their own record. `ctx.record(collection, doc)` appends one from any
782
+ job, a read included; it goes first in the job's next write that commits on its own, or when the
783
+ job ends, so it costs no round trip, and it is kept even when the job fails. An `_id` sent again
784
+ is the record already kept, so sending twice is safe.
785
+ - **One writer per store:** each write auto-commits as one short transaction, and
786
+ `ctx.transaction(tx => …)` makes several writes and their events atomic. Slow I/O, such as model
787
+ calls, never holds the writer.
788
+ - **Stream-first:** committed events and live frames go to subscribers immediately, and observed
789
+ Views run again as soon as what they read commits.
790
+ - **Who acts:** an outside call may bind an actor (`runtime.call(action, input, { actor })`, and
791
+ `query`, `emit`, `observe` likewise). Everything it causes is theirs: nested calls, writes, the
792
+ events they record (`event.actor`: the log is the audit trail), Processors handling those events,
793
+ and timers it sets. Without one, the system acts.
794
+ - **Actions say whom they let call them** (`allow(actor, input)`); without `allow`, actors can't.
795
+ - **Rules are filters** (a plugin's `guard(actor, { collection, filter }, ctx)`): reads, updates
796
+ and deletes reach only what matches; inserts, and what updates leave, must match. The owner
797
+ applies them to every op an actor's work makes; the access plugin declares them for the
798
+ collections it shares.
799
+ - **Trusted code acts as someone else, on the record:** `ctx.as(person)`, or `ctx.as()` for the
800
+ system, which no rule restricts; its events say `via` whom.
801
+ - Remote executors prove the deployment key, compared in constant time.
802
+ - **Private fields** (`private: ["token"]` on a collection): what an actor's queries and Views
803
+ read comes without them; Actions and Processors acting for them still read them.
804
+ - **Processors:** per-key ordering, a durable cursor, at-least-once delivery, made idempotent by
805
+ deterministic ids. A `where` MongoDB filter on event data keeps unwanted events from being
806
+ dispatched at all.
807
+ - **Style:** factories and plain data, no classes.
808
+
809
+ ## Invariants (the only spec)
810
+
811
+ 1. A fenced owner cannot commit.
812
+ 2. An event commits atomically with the writes that caused it (`ctx.transaction`).
813
+ 3. External effects run outside the writer, and their results are written with ids derived from
814
+ their cause, so retries rewrite instead of duplicating.
815
+ 4. Everything durable can be replayed from the log; Processors resume from their cursors.
816
+
817
+ ## Layout
818
+
819
+ ```
820
+ runtime/ the engine and its ports (Store, Blobs, Exporter, Transport, Clock): define, owner,
821
+ executor, ops, wire, collection, mongo, the in-memory store; tests/
822
+ stores/ where the runtime keeps things: the Store port's implementations (memory, sql/
823
+ sqlite and postgres with a shared translation, the latency wrapper) and Blobs'
824
+ (blobs/files, blobs/http); tests/ (conformance)
825
+ exporters/ where measurements go: the Exporter port's implementations (OTLP, Prometheus)
826
+ plugins/ the features, by theme
827
+ models/ one plugin: llm, embeddings, transcription; shared/ (providers, model choice,
828
+ models.dev catalog)
829
+ agents/ chat, history, memory, team, skills, routines
830
+ billing/ usage (the ledger)
831
+ access/ spaces (members, reach, rules), identity, Google sign-in, connected accounts, the
832
+ directory of orgs
833
+ compute/ computers: desks per space, agents' tools, approvals; program/, the computer program
834
+ interfaces/ terminal (where each person is, the shell View), web (the web shell), the developer
835
+ API and WhatsApp; features'
836
+ own front ends live with them (chat/terminal.ts, chat/web.tsx…), gathered by theme
837
+ hosts/ the media the app is used through: terminal (the Ink host and its toolkit); web
838
+ (the React host in the browser: theme/, the tokens and their defaults, Copilotz's
839
+ look and logo, and its fonts and icon, as data the server serves; toolkit/, the
840
+ components; its server half: sign-in, tickets, the socket, the app's assets; and
841
+ node/, serving it on Node); orgs (many orgs behind one address, a runtime each)
842
+ testing/ one test API for Deno, Node and Bun; the layers' import rules (boundaries.test.ts);
843
+ plugins' CSS keeps to the theme (styles.test.ts)
844
+ design/ agreed designs
845
+ scripts/ catalog (refreshes the models.dev snapshot); npm/ (builds the npm package, and
846
+ smoke-tests it installed)
847
+ examples/ terminal-agent (an app: its plugins and resources, run in the terminal host, or in a
848
+ browser: web.ts serves it on Deno, harbor.tsx and brands.ts the same app as another
849
+ brand, gallery.tsx the logo, type and toolkit); web-node (a web app on Node, and
850
+ orgs.ts, many orgs behind one address)
851
+ ```
852
+
853
+ Each layer imports only what it may (`testing/boundaries.test.ts` fails otherwise): the runtime
854
+ nothing outside it; stores, exporters and hosts the runtime; a plugin the runtime, the hosts'
855
+ toolkits (the web's through `hosts/web/mod.ts` only), its own files and other plugins'
856
+ `contract.ts`. A **host** runs the app in a medium and uses the runtime's public API only; a
857
+ **shell** is the medium's root View, a plugin; a feature's **front end** for a medium is its own
858
+ Views and commands there.
859
+
860
+ ## Designs
861
+
862
+ The decisions behind the pieces, as agreed:
863
+
864
+ - [design/views.md](design/views.md): queries and Views, the web, the design system, fonts;
865
+ - [design/access.md](design/access.md): spaces, members, reach and rules;
866
+ - [design/memory.md](design/memory.md): memory and chat history;
867
+ - [design/tenancy.md](design/tenancy.md): orgs, the directory, and running many of them;
868
+ - [stores/README.md](stores/README.md): the stores, and the MongoDB API they speak.
869
+
870
+ ## Copilotz 0.x
871
+
872
+ 1.0 is a new runtime, and doesn't read 0.x data. Copilotz 0.x lives on the
873
+ [`v0`](https://github.com/copilotzhq/copilotz/tree/v0) branch.
874
+
875
+ ## License
876
+
877
+ MIT