@acryldev/blends 1.7.0 → 1.7.1

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 (596) hide show
  1. package/dist/index.js +4 -2
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -2
  4. package/docs/framework/LICENSE +0 -23
  5. package/docs/framework/README.md +0 -70
  6. package/docs/framework/agents/index.md +0 -59
  7. package/docs/framework/api/acryl.md +0 -247
  8. package/docs/framework/api/context.md +0 -478
  9. package/docs/framework/api/exception.md +0 -80
  10. package/docs/framework/api/index.md +0 -12
  11. package/docs/framework/api/presets.md +0 -62
  12. package/docs/framework/api/request.md +0 -396
  13. package/docs/framework/api/routing.md +0 -303
  14. package/docs/framework/api/summary.md +0 -143
  15. package/docs/framework/concepts/benchmarks.md +0 -26
  16. package/docs/framework/concepts/developer-experience.md +0 -5
  17. package/docs/framework/concepts/middleware.md +0 -21
  18. package/docs/framework/concepts/motivation.md +0 -14
  19. package/docs/framework/concepts/routers.md +0 -63
  20. package/docs/framework/concepts/stacks.md +0 -235
  21. package/docs/framework/concepts/web-standard.md +0 -27
  22. package/docs/framework/cordis/acryl-in-a-cordis-app.md +0 -160
  23. package/docs/framework/cordis/concepts.md +0 -105
  24. package/docs/framework/cordis/middleware.md +0 -8
  25. package/docs/framework/cordis/migration-from-0-3.md +0 -111
  26. package/docs/framework/cordis/migration-from-0-4.md +0 -14
  27. package/docs/framework/cordis/migration-from-dsh-webserver.md +0 -109
  28. package/docs/framework/cordis/migration-to-1-0.md +0 -46
  29. package/docs/framework/cordis/mounting.md +0 -85
  30. package/docs/framework/cordis/node-server.md +0 -100
  31. package/docs/framework/cordis/plugin-lifecycle.md +0 -111
  32. package/docs/framework/cordis/surfaces.md +0 -71
  33. package/docs/framework/cordis/transport-and-cancellation.md +0 -57
  34. package/docs/framework/cordis/validation.md +0 -135
  35. package/docs/framework/getting-started/basic.md +0 -201
  36. package/docs/framework/getting-started/bun.md +0 -219
  37. package/docs/framework/getting-started/deploy.md +0 -133
  38. package/docs/framework/getting-started/desktop.md +0 -80
  39. package/docs/framework/getting-started/nodejs.md +0 -365
  40. package/docs/framework/getting-started/other-runtimes.md +0 -30
  41. package/docs/framework/guides/best-practices.md +0 -231
  42. package/docs/framework/guides/bring-your-own-tool.md +0 -218
  43. package/docs/framework/guides/client-modules.md +0 -210
  44. package/docs/framework/guides/create-acrylblends.md +0 -143
  45. package/docs/framework/guides/data.md +0 -314
  46. package/docs/framework/guides/examples.md +0 -3
  47. package/docs/framework/guides/faq.md +0 -19
  48. package/docs/framework/guides/forms-and-sessions.md +0 -235
  49. package/docs/framework/guides/helpers.md +0 -33
  50. package/docs/framework/guides/jsx-dom.md +0 -301
  51. package/docs/framework/guides/jsx.md +0 -487
  52. package/docs/framework/guides/middleware.md +0 -253
  53. package/docs/framework/guides/production.md +0 -80
  54. package/docs/framework/guides/rpc.md +0 -878
  55. package/docs/framework/guides/testing.md +0 -133
  56. package/docs/framework/guides/validation.md +0 -470
  57. package/docs/framework/helpers/accepts.md +0 -60
  58. package/docs/framework/helpers/adapter.md +0 -57
  59. package/docs/framework/helpers/conninfo.md +0 -77
  60. package/docs/framework/helpers/cookie.md +0 -232
  61. package/docs/framework/helpers/css.md +0 -282
  62. package/docs/framework/helpers/dev.md +0 -64
  63. package/docs/framework/helpers/factory.md +0 -180
  64. package/docs/framework/helpers/html.md +0 -123
  65. package/docs/framework/helpers/jwt.md +0 -184
  66. package/docs/framework/helpers/proxy.md +0 -115
  67. package/docs/framework/helpers/route.md +0 -143
  68. package/docs/framework/helpers/ssg.md +0 -390
  69. package/docs/framework/helpers/streaming.md +0 -224
  70. package/docs/framework/helpers/testing.md +0 -118
  71. package/docs/framework/helpers/websocket.md +0 -208
  72. package/docs/framework/middleware/builtin/basic-auth.md +0 -165
  73. package/docs/framework/middleware/builtin/bearer-auth.md +0 -138
  74. package/docs/framework/middleware/builtin/body-limit.md +0 -71
  75. package/docs/framework/middleware/builtin/cache.md +0 -99
  76. package/docs/framework/middleware/builtin/combine.md +0 -94
  77. package/docs/framework/middleware/builtin/compress.md +0 -59
  78. package/docs/framework/middleware/builtin/context-storage.md +0 -74
  79. package/docs/framework/middleware/builtin/cors.md +0 -134
  80. package/docs/framework/middleware/builtin/csrf.md +0 -105
  81. package/docs/framework/middleware/builtin/etag.md +0 -54
  82. package/docs/framework/middleware/builtin/ip-restriction.md +0 -69
  83. package/docs/framework/middleware/builtin/jsx-renderer.md +0 -283
  84. package/docs/framework/middleware/builtin/jwk.md +0 -192
  85. package/docs/framework/middleware/builtin/jwt.md +0 -145
  86. package/docs/framework/middleware/builtin/language.md +0 -232
  87. package/docs/framework/middleware/builtin/logger.md +0 -74
  88. package/docs/framework/middleware/builtin/loopback-only.md +0 -31
  89. package/docs/framework/middleware/builtin/method-not-allowed.md +0 -48
  90. package/docs/framework/middleware/builtin/method-override.md +0 -80
  91. package/docs/framework/middleware/builtin/mount.md +0 -103
  92. package/docs/framework/middleware/builtin/pretty-json.md +0 -53
  93. package/docs/framework/middleware/builtin/request-id.md +0 -87
  94. package/docs/framework/middleware/builtin/secure-headers.md +0 -247
  95. package/docs/framework/middleware/builtin/timeout.md +0 -98
  96. package/docs/framework/middleware/builtin/timing.md +0 -100
  97. package/docs/framework/middleware/builtin/trailing-slash.md +0 -74
  98. package/docs/framework/middleware/third-party.md +0 -4
  99. package/docs/framework/workshop/README.md +0 -294
  100. package/docs/framework/workshop/facilitator.md +0 -101
  101. package/plugins/agent/LICENSE +0 -21
  102. package/plugins/agent/agent.ts +0 -229
  103. package/plugins/agent/index.ts +0 -20
  104. package/plugins/agent/memory.ts +0 -24
  105. package/plugins/agent/model.ts +0 -94
  106. package/plugins/agent/package.json +0 -41
  107. package/plugins/agent/plugin.json +0 -13
  108. package/plugins/agent/tools.ts +0 -67
  109. package/plugins/agent-panel/LICENSE +0 -21
  110. package/plugins/agent-panel/client/describe.ts +0 -101
  111. package/plugins/agent-panel/client/driver-pick.ts +0 -22
  112. package/plugins/agent-panel/client/frame.ts +0 -51
  113. package/plugins/agent-panel/client/main.ts +0 -707
  114. package/plugins/agent-panel/client/markdown.ts +0 -219
  115. package/plugins/agent-panel/headless.ts +0 -220
  116. package/plugins/agent-panel/index.ts +0 -523
  117. package/plugins/agent-panel/launch.ts +0 -67
  118. package/plugins/agent-panel/mount.ts +0 -27
  119. package/plugins/agent-panel/package.json +0 -69
  120. package/plugins/agent-panel/plugin.json +0 -28
  121. package/plugins/agent-panel/registry.ts +0 -17
  122. package/plugins/agent-panel/visitors.ts +0 -231
  123. package/plugins/app-settings/LICENSE +0 -21
  124. package/plugins/app-settings/index.ts +0 -270
  125. package/plugins/app-settings/merge.ts +0 -79
  126. package/plugins/app-settings/package.json +0 -45
  127. package/plugins/app-settings/plugin.json +0 -16
  128. package/plugins/builder/LICENSE +0 -21
  129. package/plugins/builder/index.ts +0 -171
  130. package/plugins/builder/package.json +0 -52
  131. package/plugins/builder/plugin.json +0 -17
  132. package/plugins/builder/script.ts +0 -158
  133. package/plugins/db/LICENSE +0 -47
  134. package/plugins/db/package.json +0 -67
  135. package/plugins/db/plugin.json +0 -25
  136. package/plugins/db/src/conformance.ts +0 -224
  137. package/plugins/db/src/cordis.ts +0 -13
  138. package/plugins/db/src/facade/database.ts +0 -41
  139. package/plugins/db/src/facade/migrations.ts +0 -50
  140. package/plugins/db/src/facade/schema.ts +0 -9
  141. package/plugins/db/src/index.ts +0 -19
  142. package/plugins/db/src/migration-files.ts +0 -31
  143. package/plugins/db-sqlite/LICENSE +0 -47
  144. package/plugins/db-sqlite/package.json +0 -89
  145. package/plugins/db-sqlite/plugin.json +0 -29
  146. package/plugins/db-sqlite/src/facade/node.ts +0 -199
  147. package/plugins/db-sqlite/src/index.ts +0 -95
  148. package/plugins/db-sqlite/src/open.ts +0 -61
  149. package/plugins/desktop-shell/LICENSE +0 -21
  150. package/plugins/desktop-shell/app-page.ts +0 -151
  151. package/plugins/desktop-shell/app-root.ts +0 -19
  152. package/plugins/desktop-shell/assets/acrylblends-logo.png +0 -0
  153. package/plugins/desktop-shell/attach.ts +0 -72
  154. package/plugins/desktop-shell/bin.ts +0 -5
  155. package/plugins/desktop-shell/brand.ts +0 -166
  156. package/plugins/desktop-shell/door-shell.ts +0 -385
  157. package/plugins/desktop-shell/frame.ts +0 -317
  158. package/plugins/desktop-shell/git.ts +0 -44
  159. package/plugins/desktop-shell/host-supervisor.ts +0 -63
  160. package/plugins/desktop-shell/launch.ts +0 -106
  161. package/plugins/desktop-shell/main.ts +0 -545
  162. package/plugins/desktop-shell/menu.ts +0 -60
  163. package/plugins/desktop-shell/package.json +0 -58
  164. package/plugins/desktop-shell/plugin.json +0 -20
  165. package/plugins/desktop-shell/preload.cjs +0 -8
  166. package/plugins/desktop-shell/product.ts +0 -164
  167. package/plugins/desktop-shell/shutdown.ts +0 -177
  168. package/plugins/desktop-shell/update-menu.ts +0 -126
  169. package/plugins/desktop-shell/updater.ts +0 -228
  170. package/plugins/desktop-shell/user-data.ts +0 -38
  171. package/plugins/desktop-shell/watch-host.d.mts +0 -10
  172. package/plugins/desktop-shell/watch-host.mjs +0 -130
  173. package/plugins/desktop-shell/window.ts +0 -119
  174. package/plugins/desktop-web/LICENSE +0 -21
  175. package/plugins/desktop-web/app-root.ts +0 -12
  176. package/plugins/desktop-web/launch.ts +0 -54
  177. package/plugins/desktop-web/main.ts +0 -108
  178. package/plugins/desktop-web/package.json +0 -49
  179. package/plugins/desktop-web/plugin.json +0 -21
  180. package/plugins/desktop-web/shutdown.ts +0 -177
  181. package/plugins/desktop-web/user-data.ts +0 -38
  182. package/plugins/desktop-web/window.ts +0 -29
  183. package/plugins/door/LICENSE +0 -47
  184. package/plugins/door/package.json +0 -116
  185. package/plugins/door/plugin.json +0 -39
  186. package/plugins/door/src/cli/acryl.ts +0 -335
  187. package/plugins/door/src/host/api.ts +0 -9
  188. package/plugins/door/src/host/audit.ts +0 -64
  189. package/plugins/door/src/host/channel.ts +0 -407
  190. package/plugins/door/src/host/chat-tools.ts +0 -76
  191. package/plugins/door/src/host/door-file.ts +0 -99
  192. package/plugins/door/src/host/door.ts +0 -492
  193. package/plugins/door/src/host/http.ts +0 -80
  194. package/plugins/door/src/host/mcp-routes.ts +0 -83
  195. package/plugins/door/src/host/operator-routes.ts +0 -58
  196. package/plugins/door/src/host/page-routes.ts +0 -69
  197. package/plugins/door/src/host/page-socket.ts +0 -88
  198. package/plugins/door/src/host/shell.ts +0 -147
  199. package/plugins/door/src/host/shim.ts +0 -125
  200. package/plugins/door/src/host/verbs.ts +0 -160
  201. package/plugins/door/src/index.ts +0 -337
  202. package/plugins/door/src/page/api.ts +0 -9
  203. package/plugins/door/src/page/base.ts +0 -32
  204. package/plugins/door/src/page/channel.ts +0 -209
  205. package/plugins/door/src/page/driver/accessibility.ts +0 -177
  206. package/plugins/door/src/page/driver/actions.ts +0 -207
  207. package/plugins/door/src/page/driver/driver.ts +0 -216
  208. package/plugins/door/src/page/driver/ref-table.ts +0 -78
  209. package/plugins/door/src/page/driver/sensitivity.ts +0 -85
  210. package/plugins/door/src/page/driver/snapshot.ts +0 -135
  211. package/plugins/door/src/page/index.ts +0 -100
  212. package/plugins/door/src/page/indicator.ts +0 -80
  213. package/plugins/door/src/page/main.ts +0 -7
  214. package/plugins/door/src/page/outline.ts +0 -56
  215. package/plugins/door/src/page/protocol.ts +0 -233
  216. package/plugins/door/src/page/snapshot-text.ts +0 -19
  217. package/plugins/door/src/page/socket-source.ts +0 -75
  218. package/plugins/door/src/page/user-input.ts +0 -24
  219. package/plugins/door/src/shell/protocol.ts +0 -133
  220. package/plugins/driver-acp/LICENSE +0 -21
  221. package/plugins/driver-acp/README.md +0 -53
  222. package/plugins/driver-acp/chat.ts +0 -258
  223. package/plugins/driver-acp/connection.ts +0 -239
  224. package/plugins/driver-acp/index.ts +0 -67
  225. package/plugins/driver-acp/package.json +0 -52
  226. package/plugins/driver-acp/plugin.json +0 -15
  227. package/plugins/driver-acp/provenance.json +0 -20
  228. package/plugins/driver-pty/LICENSE +0 -21
  229. package/plugins/driver-pty/client/terminal.ts +0 -191
  230. package/plugins/driver-pty/client/vendor/LICENSE +0 -21
  231. package/plugins/driver-pty/client/vendor/LICENSE-addon-fit +0 -19
  232. package/plugins/driver-pty/client/vendor/VERSION +0 -4
  233. package/plugins/driver-pty/client/vendor/addon-fit.d.mts +0 -6
  234. package/plugins/driver-pty/client/vendor/addon-fit.mjs +0 -18
  235. package/plugins/driver-pty/client/vendor/xterm-css.d.mts +0 -2
  236. package/plugins/driver-pty/client/vendor/xterm-css.mjs +0 -2
  237. package/plugins/driver-pty/client/vendor/xterm.d.mts +0 -17
  238. package/plugins/driver-pty/client/vendor/xterm.mjs +0 -53
  239. package/plugins/driver-pty/index.ts +0 -280
  240. package/plugins/driver-pty/package.json +0 -55
  241. package/plugins/driver-pty/plugin.json +0 -16
  242. package/plugins/driver-pty/spawn.ts +0 -74
  243. package/plugins/driver-pty/terminal.ts +0 -86
  244. package/plugins/drivers/LICENSE +0 -21
  245. package/plugins/drivers/index.ts +0 -75
  246. package/plugins/drivers/package.json +0 -37
  247. package/plugins/drivers/plugin.json +0 -11
  248. package/plugins/extensions/LICENSE +0 -21
  249. package/plugins/extensions/browser.ts +0 -100
  250. package/plugins/extensions/index.ts +0 -991
  251. package/plugins/extensions/ledger.ts +0 -39
  252. package/plugins/extensions/package.json +0 -48
  253. package/plugins/extensions/plugin-store.ts +0 -27
  254. package/plugins/extensions/plugin.json +0 -15
  255. package/plugins/extensions/resolve.ts +0 -169
  256. package/plugins/extensions/routes.ts +0 -92
  257. package/plugins/extensions/stage.ts +0 -82
  258. package/plugins/feedback/LICENSE +0 -21
  259. package/plugins/feedback/client.d.ts +0 -22
  260. package/plugins/feedback/client.js +0 -471
  261. package/plugins/feedback/index.ts +0 -143
  262. package/plugins/feedback/package.json +0 -44
  263. package/plugins/feedback/plugin.json +0 -14
  264. package/plugins/feedback/store.ts +0 -307
  265. package/plugins/home/LICENSE +0 -21
  266. package/plugins/home/index.ts +0 -124
  267. package/plugins/home/package.json +0 -41
  268. package/plugins/home/plugin.json +0 -14
  269. package/plugins/inspect/LICENSE +0 -21
  270. package/plugins/inspect/package.json +0 -84
  271. package/plugins/inspect/plugin.json +0 -24
  272. package/plugins/inspect/src/index.ts +0 -3
  273. package/plugins/inspect/src/report.ts +0 -131
  274. package/plugins/inspect/src/service.ts +0 -68
  275. package/plugins/instance/LICENSE +0 -21
  276. package/plugins/instance/archive.ts +0 -395
  277. package/plugins/instance/bundle-overlay.ts +0 -10
  278. package/plugins/instance/bundle.ts +0 -230
  279. package/plugins/instance/home.ts +0 -395
  280. package/plugins/instance/index.ts +0 -284
  281. package/plugins/instance/package.json +0 -61
  282. package/plugins/instance/plugin.json +0 -16
  283. package/plugins/instance/storage.ts +0 -463
  284. package/plugins/kv/LICENSE +0 -47
  285. package/plugins/kv/package.json +0 -67
  286. package/plugins/kv/plugin.json +0 -26
  287. package/plugins/kv/src/check.ts +0 -58
  288. package/plugins/kv/src/conformance.ts +0 -226
  289. package/plugins/kv/src/copy.ts +0 -39
  290. package/plugins/kv/src/cordis.ts +0 -13
  291. package/plugins/kv/src/index.ts +0 -14
  292. package/plugins/kv/src/kv.ts +0 -37
  293. package/plugins/kv-db/LICENSE +0 -47
  294. package/plugins/kv-db/package.json +0 -91
  295. package/plugins/kv-db/plugin.json +0 -31
  296. package/plugins/kv-db/src/index.ts +0 -37
  297. package/plugins/kv-db/src/open.ts +0 -80
  298. package/plugins/kv-json/LICENSE +0 -47
  299. package/plugins/kv-json/package.json +0 -89
  300. package/plugins/kv-json/plugin.json +0 -29
  301. package/plugins/kv-json/src/index.ts +0 -78
  302. package/plugins/kv-json/src/open.ts +0 -249
  303. package/plugins/manifest/LICENSE +0 -21
  304. package/plugins/manifest/app-plugins.ts +0 -86
  305. package/plugins/manifest/index.ts +0 -645
  306. package/plugins/manifest/lock.ts +0 -115
  307. package/plugins/manifest/package.json +0 -57
  308. package/plugins/manifest/plugin.json +0 -19
  309. package/plugins/manifest/snapshot.ts +0 -275
  310. package/plugins/manifest/upgrade-cli.ts +0 -70
  311. package/plugins/manifest/upgrade.ts +0 -97
  312. package/plugins/node-server/LICENSE +0 -47
  313. package/plugins/node-server/package.json +0 -94
  314. package/plugins/node-server/plugin.json +0 -32
  315. package/plugins/node-server/src/adapter/conninfo.ts +0 -23
  316. package/plugins/node-server/src/adapter/early-hints.ts +0 -55
  317. package/plugins/node-server/src/adapter/error.ts +0 -11
  318. package/plugins/node-server/src/adapter/headers.ts +0 -249
  319. package/plugins/node-server/src/adapter/index.ts +0 -6
  320. package/plugins/node-server/src/adapter/listener.ts +0 -549
  321. package/plugins/node-server/src/adapter/raw.ts +0 -18
  322. package/plugins/node-server/src/adapter/request.ts +0 -798
  323. package/plugins/node-server/src/adapter/response.ts +0 -186
  324. package/plugins/node-server/src/adapter/serve-static.ts +0 -238
  325. package/plugins/node-server/src/adapter/server.ts +0 -59
  326. package/plugins/node-server/src/adapter/types.ts +0 -94
  327. package/plugins/node-server/src/adapter/url.ts +0 -42
  328. package/plugins/node-server/src/adapter/utils/response/constants.ts +0 -1
  329. package/plugins/node-server/src/adapter/utils/response.ts +0 -4
  330. package/plugins/node-server/src/adapter/utils/stream.ts +0 -88
  331. package/plugins/node-server/src/adapter/utils.ts +0 -96
  332. package/plugins/node-server/src/adapter/websocket-types.ts +0 -49
  333. package/plugins/node-server/src/adapter/websocket.ts +0 -409
  334. package/plugins/node-server/src/client-modules.ts +0 -300
  335. package/plugins/node-server/src/index.ts +0 -440
  336. package/plugins/node-server/src/register.ts +0 -65
  337. package/plugins/node-server/src/test-websocket.ts +0 -110
  338. package/plugins/node-server/src/transpile.ts +0 -139
  339. package/plugins/node-server/src/upgrade-hub.ts +0 -152
  340. package/plugins/openai/LICENSE +0 -21
  341. package/plugins/openai/index.ts +0 -218
  342. package/plugins/openai/package.json +0 -43
  343. package/plugins/openai/plugin.json +0 -14
  344. package/plugins/openai/prompt.ts +0 -60
  345. package/plugins/page/package.json +0 -51
  346. package/plugins/page/plugin.json +0 -16
  347. package/plugins/page/src/favicon.ts +0 -19
  348. package/plugins/page/src/index.ts +0 -168
  349. package/plugins/plugin-share/LICENSE +0 -21
  350. package/plugins/plugin-share/README.md +0 -86
  351. package/plugins/plugin-share/index.ts +0 -791
  352. package/plugins/plugin-share/native.ts +0 -290
  353. package/plugins/plugin-share/package.json +0 -54
  354. package/plugins/plugin-share/package.ts +0 -186
  355. package/plugins/plugin-share/plugin.json +0 -19
  356. package/plugins/plugin-share/publish.ts +0 -79
  357. package/plugins/plugin-share/pull-check.ts +0 -142
  358. package/plugins/plugin-share/pull-list.ts +0 -71
  359. package/plugins/plugin-share/pulled-records.ts +0 -70
  360. package/plugins/router/LICENSE +0 -47
  361. package/plugins/router/package.json +0 -118
  362. package/plugins/router/plugin.json +0 -31
  363. package/plugins/router/src/browser/client.ts +0 -3
  364. package/plugins/router/src/browser/jsx-dom.ts +0 -9
  365. package/plugins/router/src/browser/read-sse.ts +0 -3
  366. package/plugins/router/src/client.ts +0 -2
  367. package/plugins/router/src/connection.ts +0 -42
  368. package/plugins/router/src/core/adapter/aws-lambda/conninfo.ts +0 -73
  369. package/plugins/router/src/core/adapter/aws-lambda/handler.ts +0 -682
  370. package/plugins/router/src/core/adapter/aws-lambda/index.ts +0 -14
  371. package/plugins/router/src/core/adapter/aws-lambda/types.ts +0 -173
  372. package/plugins/router/src/core/adapter/bun/conninfo.ts +0 -43
  373. package/plugins/router/src/core/adapter/bun/index.ts +0 -11
  374. package/plugins/router/src/core/adapter/bun/serve-static.ts +0 -32
  375. package/plugins/router/src/core/adapter/bun/server.ts +0 -14
  376. package/plugins/router/src/core/adapter/bun/ssg.ts +0 -26
  377. package/plugins/router/src/core/adapter/bun/websocket.ts +0 -113
  378. package/plugins/router/src/core/adapter/cloudflare-pages/conninfo.ts +0 -26
  379. package/plugins/router/src/core/adapter/cloudflare-pages/handler.ts +0 -122
  380. package/plugins/router/src/core/adapter/cloudflare-pages/index.ts +0 -11
  381. package/plugins/router/src/core/adapter/cloudflare-workers/conninfo.ts +0 -7
  382. package/plugins/router/src/core/adapter/cloudflare-workers/index.ts +0 -8
  383. package/plugins/router/src/core/adapter/cloudflare-workers/serve-static-module.ts +0 -12
  384. package/plugins/router/src/core/adapter/cloudflare-workers/serve-static.ts +0 -41
  385. package/plugins/router/src/core/adapter/cloudflare-workers/utils.ts +0 -50
  386. package/plugins/router/src/core/adapter/cloudflare-workers/websocket.ts +0 -52
  387. package/plugins/router/src/core/adapter/lambda-edge/conninfo.ts +0 -15
  388. package/plugins/router/src/core/adapter/lambda-edge/handler.ts +0 -239
  389. package/plugins/router/src/core/adapter/lambda-edge/index.ts +0 -14
  390. package/plugins/router/src/core/adapter/netlify/conninfo.ts +0 -57
  391. package/plugins/router/src/core/adapter/netlify/handler.ts +0 -10
  392. package/plugins/router/src/core/adapter/netlify/index.ts +0 -6
  393. package/plugins/router/src/core/adapter/netlify/mod.ts +0 -2
  394. package/plugins/router/src/core/adapter/service-worker/handler.ts +0 -37
  395. package/plugins/router/src/core/adapter/service-worker/index.ts +0 -36
  396. package/plugins/router/src/core/adapter/service-worker/types.ts +0 -14
  397. package/plugins/router/src/core/adapter/vercel/conninfo.ts +0 -8
  398. package/plugins/router/src/core/adapter/vercel/handler.ts +0 -8
  399. package/plugins/router/src/core/adapter/vercel/index.ts +0 -7
  400. package/plugins/router/src/core/app-base.ts +0 -544
  401. package/plugins/router/src/core/app.ts +0 -34
  402. package/plugins/router/src/core/client/client.ts +0 -249
  403. package/plugins/router/src/core/client/fetch-result-please.ts +0 -95
  404. package/plugins/router/src/core/client/index.ts +0 -17
  405. package/plugins/router/src/core/client/types.ts +0 -393
  406. package/plugins/router/src/core/client/utils.ts +0 -117
  407. package/plugins/router/src/core/compose.ts +0 -73
  408. package/plugins/router/src/core/context.ts +0 -781
  409. package/plugins/router/src/core/helper/accepts/accepts.ts +0 -96
  410. package/plugins/router/src/core/helper/accepts/index.ts +0 -6
  411. package/plugins/router/src/core/helper/adapter/index.ts +0 -90
  412. package/plugins/router/src/core/helper/conninfo/index.ts +0 -6
  413. package/plugins/router/src/core/helper/conninfo/types.ts +0 -45
  414. package/plugins/router/src/core/helper/cookie/index.ts +0 -146
  415. package/plugins/router/src/core/helper/css/common.ts +0 -337
  416. package/plugins/router/src/core/helper/css/index.ts +0 -262
  417. package/plugins/router/src/core/helper/dev/index.ts +0 -79
  418. package/plugins/router/src/core/helper/factory/index.ts +0 -375
  419. package/plugins/router/src/core/helper/html/index.ts +0 -57
  420. package/plugins/router/src/core/helper/proxy/index.ts +0 -203
  421. package/plugins/router/src/core/helper/route/index.ts +0 -144
  422. package/plugins/router/src/core/helper/ssg/index.ts +0 -14
  423. package/plugins/router/src/core/helper/ssg/middleware.ts +0 -83
  424. package/plugins/router/src/core/helper/ssg/plugins.ts +0 -72
  425. package/plugins/router/src/core/helper/ssg/ssg.ts +0 -471
  426. package/plugins/router/src/core/helper/ssg/utils.ts +0 -118
  427. package/plugins/router/src/core/helper/streaming/index.ts +0 -9
  428. package/plugins/router/src/core/helper/streaming/sse.ts +0 -101
  429. package/plugins/router/src/core/helper/streaming/stream.ts +0 -45
  430. package/plugins/router/src/core/helper/streaming/text.ts +0 -15
  431. package/plugins/router/src/core/helper/streaming/utils.ts +0 -11
  432. package/plugins/router/src/core/helper/testing/index.ts +0 -28
  433. package/plugins/router/src/core/helper/websocket/index.ts +0 -146
  434. package/plugins/router/src/core/http-exception.ts +0 -77
  435. package/plugins/router/src/core/index.ts +0 -53
  436. package/plugins/router/src/core/jsx/base.ts +0 -490
  437. package/plugins/router/src/core/jsx/children.ts +0 -20
  438. package/plugins/router/src/core/jsx/components.ts +0 -257
  439. package/plugins/router/src/core/jsx/constants.ts +0 -6
  440. package/plugins/router/src/core/jsx/context.ts +0 -266
  441. package/plugins/router/src/core/jsx/dom/client.ts +0 -89
  442. package/plugins/router/src/core/jsx/dom/components.ts +0 -39
  443. package/plugins/router/src/core/jsx/dom/context.ts +0 -52
  444. package/plugins/router/src/core/jsx/dom/css.ts +0 -263
  445. package/plugins/router/src/core/jsx/dom/hooks/index.ts +0 -91
  446. package/plugins/router/src/core/jsx/dom/index.ts +0 -170
  447. package/plugins/router/src/core/jsx/dom/intrinsic-element/components.ts +0 -438
  448. package/plugins/router/src/core/jsx/dom/jsx-dev-runtime.ts +0 -23
  449. package/plugins/router/src/core/jsx/dom/jsx-runtime.ts +0 -8
  450. package/plugins/router/src/core/jsx/dom/render.ts +0 -879
  451. package/plugins/router/src/core/jsx/dom/server.ts +0 -76
  452. package/plugins/router/src/core/jsx/dom/utils.ts +0 -7
  453. package/plugins/router/src/core/jsx/hooks/index.ts +0 -437
  454. package/plugins/router/src/core/jsx/index.ts +0 -115
  455. package/plugins/router/src/core/jsx/intrinsic-element/common.ts +0 -23
  456. package/plugins/router/src/core/jsx/intrinsic-element/components.ts +0 -210
  457. package/plugins/router/src/core/jsx/intrinsic-elements.ts +0 -938
  458. package/plugins/router/src/core/jsx/jsx-dev-runtime.ts +0 -26
  459. package/plugins/router/src/core/jsx/jsx-runtime.ts +0 -51
  460. package/plugins/router/src/core/jsx/streaming.ts +0 -231
  461. package/plugins/router/src/core/jsx/types.ts +0 -41
  462. package/plugins/router/src/core/jsx/utils.ts +0 -202
  463. package/plugins/router/src/core/middleware/basic-auth/index.ts +0 -152
  464. package/plugins/router/src/core/middleware/bearer-auth/index.ts +0 -220
  465. package/plugins/router/src/core/middleware/body-limit/index.ts +0 -110
  466. package/plugins/router/src/core/middleware/cache/index.ts +0 -323
  467. package/plugins/router/src/core/middleware/combine/index.ts +0 -171
  468. package/plugins/router/src/core/middleware/compress/index.ts +0 -142
  469. package/plugins/router/src/core/middleware/context-storage/index.ts +0 -58
  470. package/plugins/router/src/core/middleware/cors/index.ts +0 -163
  471. package/plugins/router/src/core/middleware/csrf/index.ts +0 -150
  472. package/plugins/router/src/core/middleware/etag/digest.ts +0 -95
  473. package/plugins/router/src/core/middleware/etag/index.ts +0 -135
  474. package/plugins/router/src/core/middleware/ip-restriction/index.ts +0 -278
  475. package/plugins/router/src/core/middleware/jsx-renderer/index.ts +0 -162
  476. package/plugins/router/src/core/middleware/jwk/index.ts +0 -1
  477. package/plugins/router/src/core/middleware/jwk/jwk.ts +0 -196
  478. package/plugins/router/src/core/middleware/jwt/index.ts +0 -9
  479. package/plugins/router/src/core/middleware/jwt/jwt.ts +0 -190
  480. package/plugins/router/src/core/middleware/language/index.ts +0 -12
  481. package/plugins/router/src/core/middleware/language/language.ts +0 -314
  482. package/plugins/router/src/core/middleware/logger/index.ts +0 -95
  483. package/plugins/router/src/core/middleware/method-not-allowed/index.ts +0 -141
  484. package/plugins/router/src/core/middleware/method-override/index.ts +0 -147
  485. package/plugins/router/src/core/middleware/mount/index.ts +0 -108
  486. package/plugins/router/src/core/middleware/powered-by/index.ts +0 -35
  487. package/plugins/router/src/core/middleware/pretty-json/index.ts +0 -67
  488. package/plugins/router/src/core/middleware/request-id/index.ts +0 -7
  489. package/plugins/router/src/core/middleware/request-id/request-id.ts +0 -59
  490. package/plugins/router/src/core/middleware/secure-headers/index.ts +0 -8
  491. package/plugins/router/src/core/middleware/secure-headers/permissions-policy.ts +0 -101
  492. package/plugins/router/src/core/middleware/secure-headers/secure-headers.ts +0 -340
  493. package/plugins/router/src/core/middleware/serve-static/index.ts +0 -135
  494. package/plugins/router/src/core/middleware/serve-static/path.ts +0 -25
  495. package/plugins/router/src/core/middleware/timeout/index.ts +0 -58
  496. package/plugins/router/src/core/middleware/timing/index.ts +0 -8
  497. package/plugins/router/src/core/middleware/timing/timing.ts +0 -256
  498. package/plugins/router/src/core/middleware/trailing-slash/index.ts +0 -156
  499. package/plugins/router/src/core/preset/quick.ts +0 -24
  500. package/plugins/router/src/core/preset/tiny.ts +0 -20
  501. package/plugins/router/src/core/request/constants.ts +0 -1
  502. package/plugins/router/src/core/request.ts +0 -502
  503. package/plugins/router/src/core/router/linear-router/index.ts +0 -6
  504. package/plugins/router/src/core/router/linear-router/router.ts +0 -152
  505. package/plugins/router/src/core/router/pattern-router/index.ts +0 -6
  506. package/plugins/router/src/core/router/pattern-router/router.ts +0 -54
  507. package/plugins/router/src/core/router/reg-exp-router/index.ts +0 -7
  508. package/plugins/router/src/core/router/reg-exp-router/matcher.ts +0 -33
  509. package/plugins/router/src/core/router/reg-exp-router/node.ts +0 -170
  510. package/plugins/router/src/core/router/reg-exp-router/prepared-router.ts +0 -165
  511. package/plugins/router/src/core/router/reg-exp-router/router.ts +0 -174
  512. package/plugins/router/src/core/router/reg-exp-router/trie.ts +0 -84
  513. package/plugins/router/src/core/router/smart-router/index.ts +0 -6
  514. package/plugins/router/src/core/router/smart-router/router.ts +0 -70
  515. package/plugins/router/src/core/router/trie-router/index.ts +0 -6
  516. package/plugins/router/src/core/router/trie-router/node.ts +0 -221
  517. package/plugins/router/src/core/router/trie-router/router.ts +0 -18
  518. package/plugins/router/src/core/router/utils.ts +0 -1
  519. package/plugins/router/src/core/router.ts +0 -103
  520. package/plugins/router/src/core/types.ts +0 -2782
  521. package/plugins/router/src/core/utils/accept.ts +0 -268
  522. package/plugins/router/src/core/utils/basic-auth.ts +0 -26
  523. package/plugins/router/src/core/utils/body.ts +0 -263
  524. package/plugins/router/src/core/utils/buffer.ts +0 -117
  525. package/plugins/router/src/core/utils/color.ts +0 -56
  526. package/plugins/router/src/core/utils/compress.ts +0 -10
  527. package/plugins/router/src/core/utils/concurrent.ts +0 -55
  528. package/plugins/router/src/core/utils/constants.ts +0 -4
  529. package/plugins/router/src/core/utils/cookie.ts +0 -281
  530. package/plugins/router/src/core/utils/crypto.ts +0 -58
  531. package/plugins/router/src/core/utils/encode.ts +0 -34
  532. package/plugins/router/src/core/utils/filepath.ts +0 -60
  533. package/plugins/router/src/core/utils/handler.ts +0 -15
  534. package/plugins/router/src/core/utils/headers.ts +0 -355
  535. package/plugins/router/src/core/utils/html.ts +0 -182
  536. package/plugins/router/src/core/utils/http-status.ts +0 -72
  537. package/plugins/router/src/core/utils/ipaddr.ts +0 -374
  538. package/plugins/router/src/core/utils/jwt/index.ts +0 -7
  539. package/plugins/router/src/core/utils/jwt/jwa.ts +0 -38
  540. package/plugins/router/src/core/utils/jwt/jws.ts +0 -235
  541. package/plugins/router/src/core/utils/jwt/jwt.ts +0 -292
  542. package/plugins/router/src/core/utils/jwt/types.ts +0 -157
  543. package/plugins/router/src/core/utils/jwt/utf8.ts +0 -7
  544. package/plugins/router/src/core/utils/mime.ts +0 -94
  545. package/plugins/router/src/core/utils/stream.ts +0 -107
  546. package/plugins/router/src/core/utils/types.ts +0 -174
  547. package/plugins/router/src/core/utils/url.ts +0 -337
  548. package/plugins/router/src/core/validator/index.ts +0 -8
  549. package/plugins/router/src/core/validator/utils.ts +0 -69
  550. package/plugins/router/src/core/validator/validator.ts +0 -185
  551. package/plugins/router/src/helpers/index.ts +0 -17
  552. package/plugins/router/src/helpers/read-sse.ts +0 -111
  553. package/plugins/router/src/helpers/schema-validator.ts +0 -62
  554. package/plugins/router/src/index.ts +0 -6
  555. package/plugins/router/src/middleware/index.ts +0 -28
  556. package/plugins/router/src/middleware/loopback-only.ts +0 -183
  557. package/plugins/router/src/service.ts +0 -477
  558. package/plugins/router-http/LICENSE +0 -21
  559. package/plugins/router-http/package.json +0 -87
  560. package/plugins/router-http/plugin.json +0 -23
  561. package/plugins/router-http/src/bridge.ts +0 -54
  562. package/plugins/router-http/src/index.ts +0 -141
  563. package/plugins/router-http/src/serve.ts +0 -55
  564. package/plugins/sandbox/LICENSE +0 -21
  565. package/plugins/sandbox/index.ts +0 -150
  566. package/plugins/sandbox/package.json +0 -41
  567. package/plugins/sandbox/plugin.json +0 -13
  568. package/plugins/sandbox/runner.mjs +0 -18
  569. package/plugins/save/LICENSE +0 -21
  570. package/plugins/save/cli.ts +0 -19
  571. package/plugins/save/index.ts +0 -55
  572. package/plugins/save/package.json +0 -43
  573. package/plugins/save/plugin.json +0 -15
  574. package/plugins/save/share-cli.ts +0 -95
  575. package/plugins/save/share.ts +0 -193
  576. package/plugins/showcase/LICENSE +0 -21
  577. package/plugins/showcase/cards.ts +0 -162
  578. package/plugins/showcase/index.ts +0 -117
  579. package/plugins/showcase/package.json +0 -49
  580. package/plugins/showcase/plugin.json +0 -14
  581. package/plugins/state/LICENSE +0 -21
  582. package/plugins/state/package.json +0 -104
  583. package/plugins/state/plugin.json +0 -27
  584. package/plugins/state/src/cell.ts +0 -67
  585. package/plugins/state/src/client-source.ts +0 -244
  586. package/plugins/state/src/index.ts +0 -3
  587. package/plugins/state/src/service.ts +0 -146
  588. package/plugins/state/src/socket.ts +0 -96
  589. package/plugins/tasks/LICENSE +0 -21
  590. package/plugins/tasks/index.ts +0 -246
  591. package/plugins/tasks/package.json +0 -45
  592. package/plugins/tasks/plugin.json +0 -14
  593. package/plugins/tasks/store.ts +0 -86
  594. package/plugins/web-server/package.json +0 -52
  595. package/plugins/web-server/plugin.json +0 -20
  596. package/plugins/web-server/src/index.ts +0 -164
@@ -1,101 +0,0 @@
1
- # Facilitator notes: building inside the ACRYL frame
2
-
3
- Read the handout first (`docs/framework/workshop/README.md`); this page is the room around it. The workshop changed shape again for the frame: the
4
- app is created, then **opened inside ACRYL's IDE** (projects on the left, the app's page in the canvas, files/changes/terminals on the right), a
5
- chat model works on the app from inside the frame, and coding agents run in terminal tabs in the same folder. The data layer, the desktop window and
6
- the panel-first flow of the previous handout are gone.
7
-
8
- The handout is written for **acrylblends 1.3.0 or newer** (the release whose `create --desktop` makes the framed app). A room on an older release is on the previous handout;
9
- check with `npx acrylblends@latest --version` before the day.
10
-
11
- ## Before the room: put this on every machine
12
-
13
- | What | Why | How |
14
- | --- | --- | --- |
15
- | The preflight passing | it checks Node, npm, git, an agent with its login or key, a free port, and on Windows PowerShell and long paths | `npx acrylblends@latest preflight` ends with `Ready for the workshop.` |
16
- | Node.js 22.19 or newer (24 and 26 tested) | the app runs TypeScript directly | `node -v`; the app's `scripts/check-node.cjs` refuses an older Node with a clear line |
17
- | git, and a GitHub account with `gh auth login` | the first `npm run dev` makes the folder a git repository (Files and Changes need one); the last block forks the registry | `git --version`, `gh auth status` |
18
- | One coding agent, logged in | block 5 starts it in a terminal tab; `claude`, `codex` and `pi` all worked | `codex login` once, or run `claude` once, or pi with `DEEPSEEK_API_KEY` in the terminal that starts `npm run dev` |
19
- | One model key | block 3 adds it in Settings > Models; without it the chat shows a connect card | a DeepSeek key from <https://platform.deepseek.com>, or a Claude/ChatGPT subscription through Sign in with an account |
20
- | A prepared app with `npm install` done | the first install brings the frame and the chat engine (about 500 MB together); a room on one Wi-Fi should not do it 20 times | run the handout's block 1 once per machine and keep the folder as `~/acryl-workshop/prepared/` |
21
- | A warm npm cache | the first install dominates block 1 | the prepared app does it |
22
-
23
- **The agent setting that decides the day.** The agents are configured to act rather than describe. Check on every machine that a plain request
24
- produces files, not a plan: ask the prepared app's chat "add a line to the app's page" and watch the Changes panel. If it only describes, the model
25
- is waiting for permission; the handout's sentence is "do it now".
26
-
27
- **Agent-specific checks.** Codex answering `model_not_found` means the account does not have the default model: pick one it supports (`/model` in
28
- codex, or `model = "..."` in `~/.codex/config.toml`). pi with DeepSeek needs `DEEPSEEK_API_KEY` in the environment of the terminal that runs `npm
29
- run dev` (the terminal tabs inherit it); the preflight reports `PASS agent pi (DeepSeek key found)`. The package is
30
- `@earendil-works/pi-coding-agent`.
31
-
32
- ## Timings, from the rehearsal (this Mac, packed CLI, isolated HOME)
33
-
34
- | Minutes | Block | Measured | If late |
35
- | --- | --- | --- | --- |
36
- | 0-10 | preflight and setup | preflight ~15 s; the prepared app skips create and install | never cut |
37
- | 10-20 | create and open the frame | the first `npm install` dominates (the frame and the chat engine); the frame's first page is up in a few seconds after that | use the prepared app and open its frame |
38
- | 20-25 | the first change at /app | the Files view opens `src/routes.ts`; stop and `npm run dev` reconnects the frame in a few seconds; the page shows the edit | cut `npm test` to the take-home |
39
- | 25-30 | Settings > Models | the key saves with Apply (`Saved DeepSeek (deepseek-official).`); the page uses it after a reload | paste the key in the first-run card instead, Save and continue |
40
- | 30-50 | chat builds the board | the chat writes into the app folder and Changes fills; the restart loop shows it at /app/board | if the model is slow, cut the board to one column |
41
- | 50-65 | a coding agent in a terminal | the agent tab starts in the app folder (its prompt is `my-app`); `.acryl/bin/acryl look` prints the page in the frame's tile | demo one agent and let the room follow |
42
- | 65-80 | upgrade an older app | `npx acrylblends@latest upgrade` reports every file it changed (the `frame` line is the new layout), then `npm install` and `npm run dev` | keep the report, skip the second app |
43
- | 80-90 | publish (take-home) | the registry check merges in about two minutes | leave it as the take-home |
44
-
45
- What the rehearsal verified end to end on this Mac: a packed CLI in an isolated HOME, the app opened by the frame with the app's page in a tab
46
- (the first-run tile), the Preview Notice dismissed once, Settings > Models saving a key and the chat sending with it (against a local mock), a
47
- terminal tab running commands in the app folder, the app's page edited and shown after a restart, the door seeing the page (`acryl look`), and an
48
- app made by the previous release upgraded and opened by the frame.
49
-
50
- ## What to say in the room
51
-
52
- - **The frame is the product.** The point is not "an app with a chat sidebar"; it is that ACRYL's IDE hosts the app you are building: the app is
53
- the page in the middle, its folder is the workspace, and the agents work in that folder.
54
- - **Settings > Models is the key's home.** The key goes to the frame's own credentials store in the app's data folder (`~/.acryl/apps/<id>/data/`), never the app folder. The
55
- first-run card writes the same store; either path is fine.
56
- - **The loop is stop, start, look.** A source change needs `npm run dev` again; the port is stable per app, so the frame reconnects on the same
57
- address and the app's tab is still there. If a chat tab comes to the front after the restart, press the `my-app` tab.
58
- - **Two kinds of agent.** The chat (DSH's own, in the frame) and the coding agents in terminal tabs are different hands on the same folder; show
59
- both and let people pick.
60
- - **The door.** `.acryl/bin/acryl look` prints the page with refs, `act` clicks and types. In the frame the page is the tile, and the door sees
61
- it. This is how an agent checks its own work.
62
- - **Production is unchanged.** The frame, the chat and the agents are development tools; `NODE_ENV=production npm start` serves the app alone.
63
-
64
- ## Windows
65
-
66
- Windows PowerShell 5.1 has no `&&` (two lines, or `;`); PowerShell sets variables with `$env:NAME="value"`; cmd.exe's `Ctrl-C` asks `Terminate
67
- batch job (Y/N)?` (answer `Y`); cmd.exe does not expand `~` (use `%USERPROFILE%`). `npm install` needs the "Desktop development with C++" workload
68
- of Visual Studio Build Tools for the terminal package; the preflight notes it.
69
-
70
- ## The no-network fallback
71
-
72
- 1. Prepared apps with `npm install` done cover blocks 1, 2 and the frame; the models (chat and agents) still need a connection or a demo.
73
- 2. Block 7's registry needs GitHub; if the venue is offline, publish from your machine on a hotspot at the end, or show the recording.
74
- 3. Keep one phone hotspot for the room.
75
-
76
- ## Demo script (five minutes, if the room is behind)
77
-
78
- 1. Prepared app, frame open on the app's page: press `+`, open **AcrylDSH Chat**, ask for a sentence on the page. Narrate the Changes panel and
79
- the restart loop.
80
- 2. Open a **files** tab in the right panel and show the edit the model made.
81
- 3. `+` → **Pi** (or Claude): the agent starts in the app folder; ask it for a route; run `.acryl/bin/acryl look` in that terminal and show the
82
- page's snapshot.
83
- 4. Settings > Models: show where the key lives and that it is not in the app folder.
84
- 5. Show the registry listing with an app already published.
85
-
86
- ## Resetting between sessions
87
-
88
- Everything a person makes lives inside their app folder, its data folder in `~/.acryl/apps/` and `~/acryl-workshop`. To reset a machine, delete the app
89
- folders and their data folders, and copy the prepared one back without its `.acryl/` folder; nothing is installed globally except the agent, `gh` and Node.
90
- An app's data, the model key's credentials store included, lives in `~/.acryl/apps/<id>/data/`, outside the app folder. The `<id>` is written once into
91
- the app folder's `.acryl/app.json` (gitignored): a copy that keeps that file shares the original's data and key, and a copy without it gets its own id
92
- and an empty data folder.
93
-
94
- ## What is still open
95
-
96
- - The frame's chat tab takes the focus when it binds its session after a restart; the app's tab is one click away and the guide says so.
97
- - The frame's address is stable across restarts: the launcher keeps the token in the app home (owner-only, atomic) and reuses it, so an open page
98
- comes back by reloading its URL even if the browser lost its cookie. `npx acrylblends open` prints the address of the running frame;
99
- `npx acrylblends open --new` rotates it (the old address stops working at once and the new one is printed). The frame-side banner that names the
100
- command is still to come (after the 120 gate work).
101
- - The one-click WebBoxes.ai deploy and the browser-only section stay TODO(M9) until that workspace is live.
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 acrylblends
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,229 +0,0 @@
1
- import type { Context } from '@deepseek-ai/cordis'
2
- import type {} from './memory.ts'
3
- import type { Step } from './model.ts'
4
- import type {} from './tools.ts'
5
-
6
- /** One tool call made during a run. */
7
- export interface ToolCall {
8
- readonly tool: string
9
- readonly input: unknown
10
- readonly result?: unknown
11
- readonly error?: string
12
- /** The thinking model's reasoning for this call, kept so the next step can send it back. */
13
- readonly reasoning?: string
14
- }
15
-
16
- /** How a run ended, with every tool call it made. `task` is its durable record's id when the app records tasks. */
17
- export type RunResult = (
18
- | { readonly status: 'completed'; readonly output: string }
19
- | { readonly status: 'budget_exceeded' }
20
- | { readonly status: 'cancelled' }
21
- ) & { readonly steps: number; readonly trace: readonly ToolCall[]; readonly task?: string }
22
-
23
- /** What a caller may pass to one run. */
24
- export interface RunOptions {
25
- /** Aborting it stops the run: the model call or tool in flight is dropped and the run ends `{ status: 'cancelled' }`. */
26
- readonly signal?: AbortSignal
27
- /** The door's id of the page the run was asked from: every tool call carries it, so the page tools drive that page and no other (a production assistant serves many visitors). */
28
- readonly page?: string
29
- }
30
-
31
- export interface Agent {
32
- run(question: string, options?: RunOptions): Promise<RunResult>
33
- }
34
-
35
- /** The step budget of one run, provided inside the run's own fiber. */
36
- export interface Budget {
37
- steps: number
38
- readonly limit: number
39
- }
40
-
41
- export interface AgentConfig {
42
- /** Steps per run before it stops. */
43
- steps?: number
44
- /**
45
- * The only tools a run may see and call; absent: every tool in the registry. A production assistant gets the page tools alone (`door_look`, `door_act`), so whatever
46
- * a visitor asks, the agent can use the app and never change it. A call to any other name fails as an unknown tool would.
47
- */
48
- tools?: readonly string[]
49
- /**
50
- * The tool whose result an answer must come right after. When the model answers after another tool call (it acted and did not look), the agent calls this tool
51
- * itself, once, and asks the model again with what it shows. The production assistant sets `door_look`, so what it tells a visitor is what the page shows now.
52
- */
53
- answerAfter?: string
54
- }
55
-
56
- /**
57
- * The part of a task recorder the agent uses. Optional: when an app mounts the `tasks` plugin, each run is a durable task and each
58
- * tool call a task it owns; without it, runs work the same and leave no record.
59
- */
60
- interface TaskRecorder {
61
- start(
62
- kind: string,
63
- input: unknown,
64
- options?: { parent?: string },
65
- ): {
66
- readonly id: string
67
- readonly signal: AbortSignal
68
- progress(detail: unknown): void
69
- complete(result: unknown, detail?: unknown): void
70
- fail(error: unknown, detail?: unknown): void
71
- }
72
- }
73
-
74
- declare module '@deepseek-ai/cordis' {
75
- interface Context {
76
- agent: Agent
77
- budget: Budget
78
- }
79
- }
80
-
81
- const message = (error: unknown) => (error instanceof Error ? error.message : String(error))
82
-
83
- /** Thrown inside a run when its signal aborts; the run turns it into `cancelled`. */
84
- class Cancelled extends Error {}
85
-
86
- /** The promise, or a rejection with `Cancelled` as soon as the signal aborts (a model or tool that ignores the signal cannot hold the run). */
87
- function until<T>(work: Promise<T>, signal: AbortSignal): Promise<T> {
88
- if (signal.aborted) return Promise.reject(new Cancelled())
89
- return new Promise<T>((resolve, reject) => {
90
- const onAbort = () => reject(new Cancelled())
91
- signal.addEventListener('abort', onAbort, { once: true })
92
- work.then(resolve, reject).finally(() => signal.removeEventListener('abort', onAbort))
93
- })
94
- }
95
-
96
- /**
97
- * The agent. Every run is its own child fiber that holds the run's budget and is disposed when the run ends, however it ends: a
98
- * scope per task, written with plain Cordis plugins. A tool that throws does not end the run: the model sees the error as the result.
99
- * When the app records tasks, the run's record is written before the answer is returned, and cancelling it stops the run.
100
- */
101
- export const agent = {
102
- name: 'agent',
103
- inject: ['model', 'tools', 'memory'],
104
- apply(ctx: Context, config?: AgentConfig) {
105
- const limit = config?.steps ?? 6
106
- const allowed = config?.tools === undefined ? undefined : new Set(config.tools)
107
- const answerAfter = config?.answerAfter
108
- let runs = 0
109
- ctx.provide('agent', {
110
- async run(question, options) {
111
- runs += 1
112
- const trace: ToolCall[] = []
113
- const recorder = (ctx.get as (name: string) => unknown)('tasks') as TaskRecorder | undefined
114
- const record = recorder?.start('agent-run', { question })
115
- // The run stops when its task is cancelled or the caller's signal aborts.
116
- const signal = AbortSignal.any(
117
- [record?.signal, options?.signal].filter((s): s is AbortSignal => s !== undefined),
118
- )
119
- // Assigned inside the run's fiber; `as` keeps TypeScript from narrowing it to this first value.
120
- let result = { status: 'budget_exceeded', steps: 0, trace } as RunResult
121
- // Each run's `budget` is its own: runs may overlap (the production Assistant serves visitors at once), and a service name is shared unless isolated.
122
- const task = ctx.isolate('budget').plugin({
123
- name: `task-${runs}`,
124
- inject: ['model', 'tools', 'memory'],
125
- async apply(scope: Context) {
126
- scope.provide('budget', { steps: 0, limit } satisfies Budget)
127
- const budget = scope.budget
128
- let toolResult: unknown
129
- let looked = false
130
- while (budget.steps < budget.limit) {
131
- if (signal.aborted) {
132
- result = { status: 'cancelled', steps: budget.steps, trace }
133
- return
134
- }
135
- let step: Step
136
- try {
137
- step = await until(
138
- scope.model.complete({
139
- question,
140
- step: budget.steps,
141
- toolResult,
142
- trace: [...trace],
143
- tools: scope.tools.list().filter((tool) => allowed?.has(tool.name) ?? true),
144
- signal,
145
- }),
146
- signal,
147
- )
148
- } catch (error) {
149
- if (!(error instanceof Cancelled)) throw error
150
- result = { status: 'cancelled', steps: budget.steps, trace }
151
- return
152
- }
153
- budget.steps += 1
154
- if (step.tool === undefined) {
155
- const last = trace.at(-1)
156
- const unseen =
157
- answerAfter !== undefined &&
158
- last !== undefined &&
159
- last.tool !== answerAfter &&
160
- !looked
161
- if (!unseen) {
162
- scope.memory.remember(`${question} => ${step.text}`)
163
- result = { status: 'completed', output: step.text, steps: budget.steps, trace }
164
- return
165
- }
166
- step = { tool: answerAfter, input: {} }
167
- looked = true
168
- } else looked = false
169
- const call = record
170
- ? recorder?.start(`tool:${step.tool}`, step.input, { parent: record.id })
171
- : undefined
172
- try {
173
- if (allowed !== undefined && !allowed.has(step.tool))
174
- throw new Error(`no tool named "${step.tool}" is allowed in this run`)
175
- toolResult = await until(
176
- scope.tools.call(step.tool, step.input, {
177
- signal,
178
- ...(options?.page === undefined ? {} : { page: options.page }),
179
- }),
180
- signal,
181
- )
182
- trace.push({
183
- tool: step.tool,
184
- input: step.input,
185
- result: toolResult,
186
- ...(step.reasoning !== undefined ? { reasoning: step.reasoning } : {}),
187
- })
188
- call?.complete(toolResult)
189
- } catch (error) {
190
- if (error instanceof Cancelled) {
191
- trace.push({ tool: step.tool, input: step.input, error: 'cancelled' })
192
- call?.fail('the run was cancelled')
193
- result = { status: 'cancelled', steps: budget.steps, trace }
194
- return
195
- }
196
- toolResult = { error: message(error) }
197
- trace.push({
198
- tool: step.tool,
199
- input: step.input,
200
- error: message(error),
201
- ...(step.reasoning !== undefined ? { reasoning: step.reasoning } : {}),
202
- })
203
- call?.fail(error)
204
- }
205
- record?.progress({ steps: budget.steps, trace })
206
- }
207
- result = { status: 'budget_exceeded', steps: budget.steps, trace }
208
- },
209
- })
210
- try {
211
- await task.await()
212
- } catch (error) {
213
- record?.fail(error, { trace })
214
- throw error
215
- } finally {
216
- await task.dispose()
217
- }
218
- if (result.status === 'completed')
219
- record?.complete(result.output, { steps: result.steps, trace })
220
- else if (result.status === 'cancelled') {
221
- if (!record?.signal.aborted)
222
- record?.fail('the run was cancelled', { steps: result.steps, trace })
223
- } else if (result.status === 'budget_exceeded')
224
- record?.fail('the run used its whole step budget', { steps: result.steps, trace })
225
- return record ? { ...result, task: record.id } : result
226
- },
227
- } satisfies Agent)
228
- },
229
- }
@@ -1,20 +0,0 @@
1
- /** The offline agent: a scripted model, a tool registry, in-process memory, and one child fiber per run. */
2
- export {
3
- type Agent,
4
- type AgentConfig,
5
- agent,
6
- type Budget,
7
- type RunResult,
8
- type ToolCall,
9
- } from './agent.ts'
10
- export { type Memory, memory } from './memory.ts'
11
- export {
12
- type Model,
13
- type ModelInput,
14
- model,
15
- type Rule,
16
- type ScriptedModel,
17
- type Step,
18
- scripted,
19
- } from './model.ts'
20
- export { type CallOptions, type Tool, type Tools, tools } from './tools.ts'
@@ -1,24 +0,0 @@
1
- import type { Context } from '@deepseek-ai/cordis'
2
-
3
- /** Long-term memory for the agent. */
4
- export interface Memory {
5
- remember(text: string): void
6
- recall(): string[]
7
- size(): number
8
- }
9
-
10
- declare module '@deepseek-ai/cordis' {
11
- interface Context {
12
- memory: Memory
13
- }
14
- }
15
-
16
- /** In-process memory. Replace it with a plugin backed by storage when you need persistence. */
17
- export function memory(ctx: Context) {
18
- const items: string[] = []
19
- ctx.provide('memory', {
20
- remember: (text) => void items.push(text),
21
- recall: () => [...items],
22
- size: () => items.length,
23
- } satisfies Memory)
24
- }
@@ -1,94 +0,0 @@
1
- import type { Context } from '@deepseek-ai/cordis'
2
-
3
- /** One model step: final text, or a tool to call with its input. `reasoning` is a thinking model's reasoning for the call; it must be given back on the next step, so the run keeps it. */
4
- export type Step =
5
- | { readonly text: string; readonly tool?: undefined }
6
- | { readonly tool: string; readonly input: unknown; readonly reasoning?: string }
7
-
8
- /** What a model sees at each step of a run. */
9
- export interface ModelInput {
10
- readonly question: string
11
- /** 0 for the first step of a run. */
12
- readonly step: number
13
- /** The previous tool's result, if the previous step called one. */
14
- readonly toolResult?: unknown
15
- /** Every tool call of this run so far, in order: a real model rebuilds the conversation from it. */
16
- readonly trace?: ReadonlyArray<{
17
- readonly tool: string
18
- readonly input: unknown
19
- readonly result?: unknown
20
- readonly error?: string
21
- readonly reasoning?: string
22
- }>
23
- /** The tools the model may call. */
24
- readonly tools?: ReadonlyArray<{
25
- readonly name: string
26
- readonly description: string
27
- /** The JSON Schema of the tool's input, when it has one. */
28
- readonly parameters?: Readonly<Record<string, unknown>>
29
- }>
30
- /** Aborts when the run is cancelled: a provider that can stop its request passes this on. */
31
- readonly signal?: AbortSignal
32
- }
33
-
34
- /** What the agent needs from a model. Replace this plugin with a real provider when you have one. */
35
- export interface Model {
36
- complete(input: ModelInput): Promise<Step>
37
- }
38
-
39
- /** A rule of the scripted model: a step for the input, or `undefined` when it does not apply. */
40
- export type Rule = (input: ModelInput) => Step | undefined
41
-
42
- /** The deterministic model. Other plugins teach it rules for their commands, so whole flows are tested without a network. */
43
- export interface ScriptedModel extends Model {
44
- /** Add a rule, tried before the built-in ones. Returns the function that removes it. */
45
- teach(rule: Rule): () => void
46
- }
47
-
48
- declare module '@deepseek-ai/cordis' {
49
- interface Context {
50
- model: Model
51
- }
52
- }
53
-
54
- const builtIn: Rule[] = [
55
- ({ toolResult, step }) => {
56
- if (step === 0) return undefined
57
- // A failed call comes back as `{ error }`: say what failed, not "[object Object]".
58
- const failed = typeof toolResult === 'object' && toolResult !== null && 'error' in toolResult
59
- return {
60
- text: failed
61
- ? `That did not work: ${String(toolResult.error)}.`
62
- : `The answer is ${String(toolResult)}.`,
63
- }
64
- },
65
- ({ question }) => {
66
- const sum = /^add\s+(-?\d+)\s+(-?\d+)$/.exec(question.trim())
67
- return sum ? { tool: 'add', input: [Number(sum[1]), Number(sum[2])] } : undefined
68
- },
69
- ]
70
-
71
- /** A deterministic model: no keys, no network, the same answer every time. */
72
- export function model(ctx: Context) {
73
- const taught: Rule[] = []
74
- ctx.provide('model', {
75
- teach(rule) {
76
- taught.push(rule)
77
- return () => void taught.splice(taught.indexOf(rule), 1)
78
- },
79
- complete(input) {
80
- for (const rule of [...taught, ...builtIn]) {
81
- const step = rule(input)
82
- if (step) return Promise.resolve(step)
83
- }
84
- return Promise.resolve({ text: `You said: ${input.question}` })
85
- },
86
- } satisfies ScriptedModel)
87
- }
88
-
89
- /** The scripted model, when the app runs one (a real provider has no `teach`). */
90
- export function scripted(model: Model | undefined): ScriptedModel | undefined {
91
- return model && typeof (model as Partial<ScriptedModel>).teach === 'function'
92
- ? (model as ScriptedModel)
93
- : undefined
94
- }
@@ -1,41 +0,0 @@
1
- {
2
- "name": "@acryldev/agent",
3
- "version": "0.1.0",
4
- "description": "An offline agent: deterministic model, tools, memory, and a child fiber per run that holds the run's step budget.",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/acryldev/acryl.git",
9
- "directory": "plugins/agent"
10
- },
11
- "homepage": "https://github.com/acryldev/acryl/tree/main/plugins/agent#readme",
12
- "bugs": {
13
- "url": "https://github.com/acryldev/acryl/issues"
14
- },
15
- "type": "module",
16
- "engines": {
17
- "node": "^22.19.0 || >=24.0.0"
18
- },
19
- "main": "./lib/index.js",
20
- "types": "./lib/types/index.d.ts",
21
- "exports": {
22
- ".": {
23
- "types": "./lib/types/index.d.ts",
24
- "default": "./lib/index.js"
25
- },
26
- "./package.json": "./package.json"
27
- },
28
- "dependencies": {},
29
- "peerDependencies": {
30
- "@deepseek-ai/cordis": "^4.0.2"
31
- },
32
- "devDependencies": {
33
- "@deepseek-ai/cordis": "4.0.4",
34
- "@types/node": "^22.20.0",
35
- "tsdown": "0.22.2",
36
- "typescript": "6.0.3"
37
- },
38
- "scripts": {
39
- "build": "tsdown && tsc -p tsconfig.json --emitDeclarationOnly"
40
- }
41
- }
@@ -1,13 +0,0 @@
1
- {
2
- "name": "agent",
3
- "description": "An offline agent: deterministic model, tools, memory, and a child fiber per run that holds the run's step budget.",
4
- "requires": [],
5
- "inject": ["model", "tools", "memory"],
6
- "provides": ["agent", "model", "tools", "memory"],
7
- "dependencies": {
8
- "@deepseek-ai/cordis": "4.0.4"
9
- },
10
- "entries": {
11
- "": "index.ts"
12
- }
13
- }
@@ -1,67 +0,0 @@
1
- import type { Context } from '@deepseek-ai/cordis'
2
-
3
- /** What a run passes with each call: its signal, and the door's id of the page it was asked from (the page tools drive only that page). */
4
- export interface CallOptions {
5
- readonly signal?: AbortSignal
6
- readonly page?: string
7
- }
8
-
9
- /** One tool: what it does (for the model) and how to run it. */
10
- export interface Tool {
11
- readonly description: string
12
- /** The JSON Schema of the input (an object schema), sent to a real model so it knows which fields the tool takes. A tool without one takes any object. */
13
- readonly parameters?: Readonly<Record<string, unknown>>
14
- /** `options.signal` aborts when the run is cancelled; a tool that can stop its work listens to it. `options.page` is the page the run was asked from, when it was. */
15
- run(input: unknown, options?: CallOptions): unknown | Promise<unknown>
16
- }
17
-
18
- /** The tool registry. A plugin registers its tools inside `ctx.effect`, so they leave with it. */
19
- export interface Tools {
20
- /** Register a tool. Returns the function that removes it. */
21
- register(name: string, tool: Tool): () => void
22
- list(): Array<{
23
- name: string
24
- description: string
25
- parameters?: Readonly<Record<string, unknown>>
26
- }>
27
- call(name: string, input: unknown, options?: CallOptions): Promise<unknown>
28
- }
29
-
30
- declare module '@deepseek-ai/cordis' {
31
- interface Context {
32
- tools: Tools
33
- }
34
- }
35
-
36
- /** Provides the registry, with one example tool (`add`). */
37
- export function tools(ctx: Context) {
38
- const table = new Map<string, Tool>()
39
- const registry: Tools = {
40
- register(name, tool) {
41
- if (table.has(name)) throw new Error(`tool "${name}" is already registered`)
42
- table.set(name, tool)
43
- return () => void table.delete(name)
44
- },
45
- list: () =>
46
- [...table.entries()].map(([name, tool]) => ({
47
- name,
48
- description: tool.description,
49
- ...(tool.parameters === undefined ? {} : { parameters: tool.parameters }),
50
- })),
51
- async call(name, input, options) {
52
- const tool = table.get(name)
53
- if (!tool) throw new Error(`unknown tool "${name}"`)
54
- return await tool.run(input, options)
55
- },
56
- }
57
- ctx.provide('tools', registry)
58
- ctx.effect(() =>
59
- registry.register('add', {
60
- description: 'Add two numbers: input [a, b].',
61
- run: (input) => {
62
- const [a = 0, b = 0] = Array.isArray(input) ? (input as number[]) : []
63
- return a + b
64
- },
65
- }),
66
- )
67
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 acrylblends
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.