acrylblends 1.1.0 → 1.2.0

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 (241) hide show
  1. package/README.md +9 -0
  2. package/dist/index.d.ts +45 -1
  3. package/dist/index.js +1980 -27
  4. package/dist/index.js.map +1 -1
  5. package/docs/framework/agents/index.md +1 -1
  6. package/docs/framework/getting-started/desktop.md +23 -4
  7. package/docs/framework/guides/create-acrylblends.md +1 -1
  8. package/docs/framework/workshop/README.md +138 -152
  9. package/docs/framework/workshop/facilitator.md +69 -101
  10. package/legacy/README.md +9 -0
  11. package/legacy/agent/157ce3db1112/src/app.ts +98 -0
  12. package/legacy/agent/157ce3db1112/src/routes.ts +63 -0
  13. package/legacy/agent/24c681a00fca/src/app.ts +160 -0
  14. package/legacy/agent/24c681a00fca/src/routes.ts +83 -0
  15. package/legacy/agent/2e790da977b2/src/app.ts +98 -0
  16. package/legacy/agent/2e790da977b2/src/routes.ts +63 -0
  17. package/legacy/agent/6307045545dc/src/app.ts +168 -0
  18. package/legacy/agent/6307045545dc/src/routes.ts +83 -0
  19. package/legacy/agent/6a5fb9c15c53/src/app.ts +158 -0
  20. package/legacy/agent/6a5fb9c15c53/src/routes.ts +83 -0
  21. package/legacy/agent/71fb54a5a942/src/app.ts +111 -0
  22. package/legacy/agent/71fb54a5a942/src/routes.ts +63 -0
  23. package/legacy/agent/74ece148269c/src/app.ts +168 -0
  24. package/legacy/agent/74ece148269c/src/routes.ts +93 -0
  25. package/legacy/agent/855359304707/src/app.ts +168 -0
  26. package/legacy/agent/855359304707/src/routes.ts +126 -0
  27. package/legacy/agent/b5ef3c786ae4/src/app.ts +127 -0
  28. package/legacy/agent/b5ef3c786ae4/src/routes.ts +76 -0
  29. package/legacy/agent/c2f30958043b/src/app.ts +98 -0
  30. package/legacy/agent/c2f30958043b/src/routes.ts +53 -0
  31. package/legacy/blank/5a91c558af22/src/routes.ts +18 -0
  32. package/legacy/blank/9c650cf52bf3/src/routes.ts +14 -0
  33. package/legacy/blank/aea589283445/src/routes.ts +16 -0
  34. package/legacy/blank/b2cbb759c889/src/routes.ts +16 -0
  35. package/legacy/blank/d6d371c9a65e/src/routes.ts +18 -0
  36. package/legacy/chat/7076cc821e2c/src/app.ts +72 -0
  37. package/legacy/chat/7076cc821e2c/src/routes.ts +13 -0
  38. package/legacy/chat/7dbe6d5170df/src/app.ts +107 -0
  39. package/legacy/chat/7dbe6d5170df/src/routes.ts +19 -0
  40. package/legacy/chat/a9a9ab44c58e/src/app.ts +107 -0
  41. package/legacy/chat/a9a9ab44c58e/src/routes.ts +15 -0
  42. package/legacy/chat/f20ad9a51b06/src/app.ts +106 -0
  43. package/legacy/chat/f20ad9a51b06/src/routes.ts +15 -0
  44. package/legacy/layouts.json +524 -0
  45. package/legacy/nodejs/1d477f37aaf4/src/app.ts +92 -0
  46. package/legacy/nodejs/1d477f37aaf4/src/routes.ts +40 -0
  47. package/legacy/nodejs/b1bd9462496c/src/app.ts +61 -0
  48. package/legacy/nodejs/b1bd9462496c/src/routes.ts +37 -0
  49. package/legacy/nodejs/d5bab75076ef/src/app.ts +95 -0
  50. package/legacy/nodejs/d5bab75076ef/src/routes.ts +40 -0
  51. package/legacy/notes/4edc36949c15/src/app.ts +107 -0
  52. package/legacy/notes/4edc36949c15/src/routes.ts +14 -0
  53. package/legacy/notes/6cab2d09747c/src/app.ts +72 -0
  54. package/legacy/notes/6cab2d09747c/src/routes.ts +12 -0
  55. package/legacy/notes/7ca2dfed623a/src/app.ts +106 -0
  56. package/legacy/notes/7ca2dfed623a/src/routes.ts +14 -0
  57. package/legacy/todo/02e613b3625c/src/app.ts +71 -0
  58. package/legacy/todo/02e613b3625c/src/todo.ts +123 -0
  59. package/legacy/todo/45694a8d9e15/src/app.ts +71 -0
  60. package/legacy/todo/45694a8d9e15/src/todo.ts +96 -0
  61. package/legacy/todo/5923d3a6099f/src/app.ts +71 -0
  62. package/legacy/todo/5923d3a6099f/src/todo.ts +125 -0
  63. package/legacy/todo/849a18d66dc1/src/app.ts +91 -0
  64. package/legacy/todo/849a18d66dc1/src/todo.ts +125 -0
  65. package/legacy/todo/8e64211312f3/src/app.ts +71 -0
  66. package/legacy/todo/8e64211312f3/src/todo.ts +125 -0
  67. package/legacy/todo/b79078a87565/src/app.ts +71 -0
  68. package/legacy/todo/b79078a87565/src/todo.ts +125 -0
  69. package/lib/{audit-BFpULBCj.d.ts → audit-Bok_UNCn.d.ts} +26 -3
  70. package/lib/{client-modules-drj4mjhj.js → client-modules-Bkdr83jO.js} +1 -1
  71. package/lib/cordis/door.d.ts +42 -7
  72. package/lib/cordis/door.js +204 -60
  73. package/lib/cordis/inspect.js +1 -1
  74. package/lib/cordis/node-server.d.ts +101 -3
  75. package/lib/cordis/node-server.js +3 -3
  76. package/lib/cordis/router-http.d.ts +7 -1
  77. package/lib/cordis/router-http.js +44 -3
  78. package/lib/cordis/router.d.ts +1 -1
  79. package/lib/cordis/router.js +1 -1
  80. package/lib/cordis/state.js +1 -1
  81. package/lib/door/host.d.ts +2 -2
  82. package/lib/door/host.js +1 -1
  83. package/lib/door/page.d.ts +10 -1
  84. package/lib/door/page.js +46 -7
  85. package/lib/door/protocol.d.ts +1 -1
  86. package/lib/drivers.d.ts +10 -1
  87. package/lib/{index-DMOtA-NJ.d.ts → index-DGq7H0lb.d.ts} +11 -1
  88. package/lib/node-server.d.ts +7 -1
  89. package/lib/node-server.js +2 -2
  90. package/lib/{protocol-a2aqrp2X.d.ts → protocol-BeIYCgTo.d.ts} +4 -0
  91. package/lib/{snapshot-text-BwM6T2nG.js → snapshot-text-CXTnjxGx.js} +87 -7
  92. package/lib/src-CtkIX_Gg.js +427 -0
  93. package/lib/{src-BTBm4OPD.js → src-iBJ2ysV9.js} +77 -14
  94. package/lib/{test-websocket-BLeEvybj.js → test-websocket-CQOSvBth.js} +17 -7
  95. package/lib/{test-websocket-DyeS50Tr.d.ts → test-websocket-GUTAkFQT.d.ts} +3 -1
  96. package/package.json +2 -1
  97. package/plugins/acryl-door/src/host/channel.ts +86 -9
  98. package/plugins/acryl-door/src/host/chat-tools.ts +8 -6
  99. package/plugins/acryl-door/src/host/door-file.ts +7 -2
  100. package/plugins/acryl-door/src/host/door.ts +53 -23
  101. package/plugins/acryl-door/src/host/page-routes.ts +3 -1
  102. package/plugins/acryl-door/src/host/page-socket.ts +18 -8
  103. package/plugins/acryl-door/src/host/verbs.ts +3 -0
  104. package/plugins/acryl-door/src/index.ts +166 -29
  105. package/plugins/acryl-door/src/page/base.ts +32 -0
  106. package/plugins/acryl-door/src/page/channel.ts +3 -1
  107. package/plugins/acryl-door/src/page/driver/accessibility.ts +11 -0
  108. package/plugins/acryl-door/src/page/driver/actions.ts +4 -0
  109. package/plugins/acryl-door/src/page/driver/driver.ts +32 -4
  110. package/plugins/acryl-door/src/page/driver/snapshot.ts +5 -2
  111. package/plugins/acryl-door/src/page/index.ts +41 -2
  112. package/plugins/acryl-door/src/page/outline.ts +56 -0
  113. package/plugins/acryl-door/src/page/protocol.ts +4 -0
  114. package/plugins/acryl-door/src/page/snapshot-text.ts +2 -1
  115. package/plugins/acryl-node-server/src/adapter/listener.ts +4 -0
  116. package/plugins/acryl-node-server/src/adapter/raw.ts +18 -0
  117. package/plugins/acryl-node-server/src/adapter/websocket.ts +15 -9
  118. package/plugins/acryl-node-server/src/client-modules.ts +7 -1
  119. package/plugins/acryl-node-server/src/index.ts +304 -16
  120. package/plugins/acryl-node-server/src/upgrade-hub.ts +2 -2
  121. package/plugins/acryl-page/plugin.json +12 -0
  122. package/plugins/acryl-page/src/index.ts +163 -0
  123. package/plugins/acryl-router/src/service.ts +77 -14
  124. package/plugins/acryl-router-http/src/index.ts +15 -1
  125. package/plugins/acryl-router-http/src/serve.ts +31 -0
  126. package/plugins/acryl-web-server/plugin.json +14 -0
  127. package/plugins/acryl-web-server/src/index.ts +164 -0
  128. package/plugins/agent/agent.ts +38 -7
  129. package/plugins/agent/index.ts +1 -1
  130. package/plugins/agent/model.ts +10 -2
  131. package/plugins/agent/tools.ts +9 -3
  132. package/plugins/agent-panel/client/describe.ts +57 -0
  133. package/plugins/agent-panel/client/driver-pick.ts +22 -0
  134. package/plugins/agent-panel/client/frame.ts +51 -0
  135. package/plugins/agent-panel/client/main.ts +238 -26
  136. package/plugins/agent-panel/drivers.ts +7 -2
  137. package/plugins/agent-panel/headless.ts +5 -2
  138. package/plugins/agent-panel/index.ts +146 -57
  139. package/plugins/agent-panel/mount.ts +27 -0
  140. package/plugins/agent-panel/visitors.ts +231 -0
  141. package/plugins/desktop/frame.ts +231 -0
  142. package/plugins/desktop/launch.ts +44 -9
  143. package/plugins/desktop/main.ts +100 -32
  144. package/plugins/desktop/window.ts +21 -4
  145. package/plugins/driver-pty/client/terminal.ts +4 -1
  146. package/plugins/driver-pty/index.ts +38 -11
  147. package/plugins/driver-pty/spawn.ts +38 -0
  148. package/plugins/driver-pty/terminal.ts +2 -0
  149. package/plugins/extensions/index.ts +26 -1
  150. package/plugins/extensions/resolve.ts +13 -0
  151. package/plugins/feedback/client.d.ts +22 -0
  152. package/plugins/feedback/client.js +471 -0
  153. package/plugins/feedback/index.ts +143 -0
  154. package/plugins/feedback/plugin.json +11 -0
  155. package/plugins/feedback/store.ts +307 -0
  156. package/plugins/home/index.ts +122 -0
  157. package/plugins/home/plugin.json +11 -0
  158. package/plugins/instance/index.ts +6 -0
  159. package/plugins/manifest/app-plugins.ts +86 -0
  160. package/plugins/manifest/index.ts +12 -2
  161. package/plugins/manifest/snapshot.ts +275 -0
  162. package/plugins/openai/index.ts +64 -5
  163. package/plugins/openai/prompt.ts +23 -0
  164. package/shared/AGENTS.core.md +36 -16
  165. package/shared/skills/acryl-add-ui/SKILL.md +19 -0
  166. package/shared/skills/acryl-app/SKILL.md +13 -0
  167. package/shared/skills/acryl-build-plugin/SKILL.md +22 -0
  168. package/shared/skills/acryl-change-plugin/SKILL.md +14 -0
  169. package/shared/skills/acryl-diagnose-plugin/SKILL.md +13 -0
  170. package/shared/skills/acryl-fix-plugin/SKILL.md +13 -0
  171. package/shared/skills/acryl-remove-plugin/SKILL.md +12 -0
  172. package/shared/skills/acryl-share-plugin/SKILL.md +16 -0
  173. package/shared/skills/cordis-plugin/SKILL.md +26 -0
  174. package/templates/agent/AGENTS.md +1 -1
  175. package/templates/agent/blend.yaml +4 -0
  176. package/templates/agent/gitignore +1 -0
  177. package/templates/agent/package.json +1 -0
  178. package/templates/agent/src/app.ts +150 -33
  179. package/templates/agent/src/frame.ts +17 -0
  180. package/templates/agent/src/main.ts +5 -3
  181. package/templates/agent/src/routes.ts +38 -19
  182. package/templates/agent/template.json +2 -0
  183. package/templates/agent/test/app.test.ts +45 -3
  184. package/templates/blank/AGENTS.md +3 -2
  185. package/templates/blank/blend.yaml +11 -0
  186. package/templates/blank/gitignore +1 -0
  187. package/templates/blank/package.json +1 -0
  188. package/templates/blank/src/app.ts +100 -29
  189. package/templates/blank/src/door.ts +7 -0
  190. package/templates/blank/src/first-page.ts +5 -0
  191. package/templates/blank/src/frame.ts +17 -0
  192. package/templates/blank/src/routes.ts +65 -8
  193. package/templates/blank/template.json +14 -1
  194. package/templates/blank/test/app.test.ts +103 -16
  195. package/templates/chat/blend.yaml +2 -1
  196. package/templates/chat/gitignore +1 -0
  197. package/templates/chat/package.json +1 -0
  198. package/templates/chat/src/app.ts +72 -22
  199. package/templates/chat/src/chat-app.ts +11 -2
  200. package/templates/chat/src/client/chat.tsx +4 -2
  201. package/templates/chat/src/frame.ts +17 -0
  202. package/templates/chat/src/page.tsx +6 -4
  203. package/templates/chat/src/routes.ts +14 -4
  204. package/templates/chat/src/runtime.ts +9 -3
  205. package/templates/chat/template.json +3 -1
  206. package/templates/chat/test/chat.test.ts +46 -1
  207. package/templates/chat/test/server.test.ts +17 -3
  208. package/templates/nodejs/blend.yaml +2 -1
  209. package/templates/nodejs/gitignore +1 -0
  210. package/templates/nodejs/package.json +1 -0
  211. package/templates/nodejs/src/app.ts +76 -21
  212. package/templates/nodejs/src/frame.ts +17 -0
  213. package/templates/nodejs/src/page.tsx +3 -3
  214. package/templates/nodejs/src/routes.ts +32 -13
  215. package/templates/nodejs/template.json +3 -1
  216. package/templates/nodejs/test/app.test.ts +38 -3
  217. package/templates/nodejs/test/server.test.ts +17 -3
  218. package/templates/notes/blend.yaml +2 -1
  219. package/templates/notes/gitignore +1 -0
  220. package/templates/notes/package.json +1 -0
  221. package/templates/notes/src/app.ts +72 -22
  222. package/templates/notes/src/frame.ts +17 -0
  223. package/templates/notes/src/notes-app.ts +24 -17
  224. package/templates/notes/src/routes.ts +11 -4
  225. package/templates/notes/src/runtime.ts +9 -3
  226. package/templates/notes/src/views.tsx +26 -17
  227. package/templates/notes/template.json +3 -1
  228. package/templates/notes/test/notes.test.ts +39 -1
  229. package/templates/notes/test/server.test.ts +17 -3
  230. package/templates/todo/blend.yaml +3 -0
  231. package/templates/todo/gitignore +1 -0
  232. package/templates/todo/package.json +1 -0
  233. package/templates/todo/src/app.ts +81 -27
  234. package/templates/todo/src/door.ts +7 -0
  235. package/templates/todo/src/frame.ts +17 -0
  236. package/templates/todo/src/page.ts +13 -6
  237. package/templates/todo/src/todo.ts +18 -6
  238. package/templates/todo/template.json +11 -1
  239. package/templates/todo/test/todo.test.ts +67 -9
  240. package/lib/src-LX0E4ec4.js +0 -117
  241. package/shared/SKILL.md +0 -14
@@ -0,0 +1,524 @@
1
+ {
2
+ "generatedBy": "scripts/build-legacy-layouts.mjs",
3
+ "releases": [
4
+ {
5
+ "version": "0.3.0",
6
+ "layouts": {
7
+ "agent": "c2f30958043b",
8
+ "blank": "9c650cf52bf3",
9
+ "todo": "45694a8d9e15"
10
+ }
11
+ },
12
+ {
13
+ "version": "0.4.0",
14
+ "layouts": {
15
+ "agent": "2e790da977b2",
16
+ "blank": "aea589283445",
17
+ "todo": "02e613b3625c"
18
+ }
19
+ },
20
+ {
21
+ "version": "0.4.1",
22
+ "layouts": {
23
+ "agent": "2e790da977b2",
24
+ "blank": "aea589283445",
25
+ "todo": "5923d3a6099f"
26
+ }
27
+ },
28
+ {
29
+ "version": "0.5.0",
30
+ "layouts": {
31
+ "agent": "157ce3db1112",
32
+ "blank": "b2cbb759c889",
33
+ "todo": "8e64211312f3"
34
+ }
35
+ },
36
+ {
37
+ "version": "0.5.1",
38
+ "layouts": {
39
+ "agent": "157ce3db1112",
40
+ "blank": "b2cbb759c889",
41
+ "todo": "8e64211312f3"
42
+ }
43
+ },
44
+ {
45
+ "version": "0.6.0",
46
+ "layouts": {
47
+ "agent": "157ce3db1112",
48
+ "blank": "b2cbb759c889",
49
+ "todo": "8e64211312f3"
50
+ }
51
+ },
52
+ {
53
+ "version": "0.6.1",
54
+ "layouts": {
55
+ "agent": "157ce3db1112",
56
+ "blank": "b2cbb759c889",
57
+ "todo": "8e64211312f3"
58
+ }
59
+ },
60
+ {
61
+ "version": "0.6.2",
62
+ "layouts": {
63
+ "agent": "157ce3db1112",
64
+ "blank": "b2cbb759c889",
65
+ "todo": "8e64211312f3"
66
+ }
67
+ },
68
+ {
69
+ "version": "0.6.3",
70
+ "layouts": {
71
+ "agent": "157ce3db1112",
72
+ "blank": "b2cbb759c889",
73
+ "todo": "8e64211312f3"
74
+ }
75
+ },
76
+ {
77
+ "version": "0.6.4",
78
+ "layouts": {
79
+ "agent": "157ce3db1112",
80
+ "blank": "b2cbb759c889",
81
+ "todo": "8e64211312f3"
82
+ }
83
+ },
84
+ {
85
+ "version": "0.7.0",
86
+ "layouts": {
87
+ "agent": "157ce3db1112",
88
+ "blank": "d6d371c9a65e",
89
+ "todo": "8e64211312f3"
90
+ }
91
+ },
92
+ {
93
+ "version": "0.7.1",
94
+ "layouts": {
95
+ "agent": "157ce3db1112",
96
+ "blank": "d6d371c9a65e",
97
+ "todo": "8e64211312f3"
98
+ }
99
+ },
100
+ {
101
+ "version": "0.7.2",
102
+ "layouts": {
103
+ "agent": "157ce3db1112",
104
+ "blank": "d6d371c9a65e",
105
+ "todo": "8e64211312f3"
106
+ }
107
+ },
108
+ {
109
+ "version": "0.7.3",
110
+ "layouts": {
111
+ "agent": "157ce3db1112",
112
+ "blank": "d6d371c9a65e",
113
+ "todo": "8e64211312f3"
114
+ }
115
+ },
116
+ {
117
+ "version": "0.7.4",
118
+ "layouts": {
119
+ "agent": "157ce3db1112",
120
+ "blank": "d6d371c9a65e",
121
+ "todo": "8e64211312f3"
122
+ }
123
+ },
124
+ {
125
+ "version": "0.7.5",
126
+ "layouts": {
127
+ "agent": "157ce3db1112",
128
+ "blank": "d6d371c9a65e",
129
+ "todo": "8e64211312f3"
130
+ }
131
+ },
132
+ {
133
+ "version": "0.7.6",
134
+ "layouts": {
135
+ "agent": "157ce3db1112",
136
+ "blank": "d6d371c9a65e",
137
+ "todo": "8e64211312f3"
138
+ }
139
+ },
140
+ {
141
+ "version": "0.7.7",
142
+ "layouts": {
143
+ "agent": "157ce3db1112",
144
+ "blank": "d6d371c9a65e",
145
+ "todo": "8e64211312f3"
146
+ }
147
+ },
148
+ {
149
+ "version": "0.7.8",
150
+ "layouts": {
151
+ "agent": "71fb54a5a942",
152
+ "blank": "5a91c558af22",
153
+ "chat": "7076cc821e2c",
154
+ "nodejs": "b1bd9462496c",
155
+ "notes": "6cab2d09747c",
156
+ "todo": "b79078a87565"
157
+ }
158
+ },
159
+ {
160
+ "version": "0.8.0",
161
+ "layouts": {
162
+ "agent": "b5ef3c786ae4",
163
+ "blank": "5a91c558af22",
164
+ "chat": "f20ad9a51b06",
165
+ "nodejs": "1d477f37aaf4",
166
+ "notes": "7ca2dfed623a",
167
+ "todo": "849a18d66dc1"
168
+ }
169
+ },
170
+ {
171
+ "version": "0.8.1",
172
+ "layouts": {
173
+ "agent": "b5ef3c786ae4",
174
+ "blank": "5a91c558af22",
175
+ "chat": "a9a9ab44c58e",
176
+ "nodejs": "d5bab75076ef",
177
+ "notes": "4edc36949c15",
178
+ "todo": "849a18d66dc1"
179
+ }
180
+ },
181
+ {
182
+ "version": "0.9.0",
183
+ "layouts": {
184
+ "agent": "b5ef3c786ae4",
185
+ "blank": "5a91c558af22",
186
+ "chat": "a9a9ab44c58e",
187
+ "nodejs": "d5bab75076ef",
188
+ "notes": "4edc36949c15",
189
+ "todo": "849a18d66dc1"
190
+ }
191
+ },
192
+ {
193
+ "version": "0.9.0-next.1",
194
+ "layouts": {
195
+ "agent": "b5ef3c786ae4",
196
+ "blank": "5a91c558af22",
197
+ "chat": "a9a9ab44c58e",
198
+ "nodejs": "d5bab75076ef",
199
+ "notes": "4edc36949c15",
200
+ "todo": "849a18d66dc1"
201
+ }
202
+ },
203
+ {
204
+ "version": "0.9.1",
205
+ "layouts": {
206
+ "agent": "b5ef3c786ae4",
207
+ "blank": "5a91c558af22",
208
+ "chat": "a9a9ab44c58e",
209
+ "nodejs": "d5bab75076ef",
210
+ "notes": "4edc36949c15",
211
+ "todo": "849a18d66dc1"
212
+ }
213
+ },
214
+ {
215
+ "version": "0.9.2",
216
+ "layouts": {
217
+ "agent": "b5ef3c786ae4",
218
+ "blank": "5a91c558af22",
219
+ "chat": "a9a9ab44c58e",
220
+ "nodejs": "d5bab75076ef",
221
+ "notes": "4edc36949c15",
222
+ "todo": "849a18d66dc1"
223
+ }
224
+ },
225
+ {
226
+ "version": "0.10.0",
227
+ "layouts": {
228
+ "agent": "b5ef3c786ae4",
229
+ "blank": "5a91c558af22",
230
+ "chat": "a9a9ab44c58e",
231
+ "nodejs": "d5bab75076ef",
232
+ "notes": "4edc36949c15",
233
+ "todo": "849a18d66dc1"
234
+ }
235
+ },
236
+ {
237
+ "version": "0.11.0",
238
+ "layouts": {
239
+ "agent": "b5ef3c786ae4",
240
+ "blank": "5a91c558af22",
241
+ "chat": "a9a9ab44c58e",
242
+ "nodejs": "d5bab75076ef",
243
+ "notes": "4edc36949c15",
244
+ "todo": "849a18d66dc1"
245
+ }
246
+ },
247
+ {
248
+ "version": "1.0.0",
249
+ "layouts": {
250
+ "agent": "b5ef3c786ae4",
251
+ "blank": "5a91c558af22",
252
+ "chat": "a9a9ab44c58e",
253
+ "nodejs": "d5bab75076ef",
254
+ "notes": "4edc36949c15",
255
+ "todo": "849a18d66dc1"
256
+ }
257
+ },
258
+ {
259
+ "version": "1.0.0-rc.1",
260
+ "layouts": {
261
+ "agent": "b5ef3c786ae4",
262
+ "blank": "5a91c558af22",
263
+ "chat": "a9a9ab44c58e",
264
+ "nodejs": "d5bab75076ef",
265
+ "notes": "4edc36949c15",
266
+ "todo": "849a18d66dc1"
267
+ }
268
+ },
269
+ {
270
+ "version": "1.0.1",
271
+ "layouts": {
272
+ "agent": "6a5fb9c15c53",
273
+ "blank": "5a91c558af22",
274
+ "chat": "a9a9ab44c58e",
275
+ "nodejs": "d5bab75076ef",
276
+ "notes": "4edc36949c15",
277
+ "todo": "849a18d66dc1"
278
+ }
279
+ },
280
+ {
281
+ "version": "1.0.2",
282
+ "layouts": {
283
+ "agent": "6a5fb9c15c53",
284
+ "blank": "5a91c558af22",
285
+ "chat": "7dbe6d5170df",
286
+ "nodejs": "d5bab75076ef",
287
+ "notes": "4edc36949c15",
288
+ "todo": "849a18d66dc1"
289
+ }
290
+ },
291
+ {
292
+ "version": "1.0.3",
293
+ "layouts": {
294
+ "agent": "6a5fb9c15c53",
295
+ "blank": "5a91c558af22",
296
+ "chat": "7dbe6d5170df",
297
+ "nodejs": "d5bab75076ef",
298
+ "notes": "4edc36949c15",
299
+ "todo": "849a18d66dc1"
300
+ }
301
+ },
302
+ {
303
+ "version": "1.0.4",
304
+ "layouts": {
305
+ "agent": "6a5fb9c15c53",
306
+ "blank": "5a91c558af22",
307
+ "chat": "7dbe6d5170df",
308
+ "nodejs": "d5bab75076ef",
309
+ "notes": "4edc36949c15",
310
+ "todo": "849a18d66dc1"
311
+ }
312
+ },
313
+ {
314
+ "version": "1.0.5",
315
+ "layouts": {
316
+ "agent": "24c681a00fca",
317
+ "blank": "5a91c558af22",
318
+ "chat": "7dbe6d5170df",
319
+ "nodejs": "d5bab75076ef",
320
+ "notes": "4edc36949c15",
321
+ "todo": "849a18d66dc1"
322
+ }
323
+ },
324
+ {
325
+ "version": "1.0.6",
326
+ "layouts": {
327
+ "agent": "24c681a00fca",
328
+ "blank": "5a91c558af22",
329
+ "chat": "7dbe6d5170df",
330
+ "nodejs": "d5bab75076ef",
331
+ "notes": "4edc36949c15",
332
+ "todo": "849a18d66dc1"
333
+ }
334
+ },
335
+ {
336
+ "version": "1.0.7",
337
+ "layouts": {
338
+ "agent": "6307045545dc",
339
+ "blank": "5a91c558af22",
340
+ "chat": "7dbe6d5170df",
341
+ "nodejs": "d5bab75076ef",
342
+ "notes": "4edc36949c15",
343
+ "todo": "849a18d66dc1"
344
+ }
345
+ },
346
+ {
347
+ "version": "1.0.8",
348
+ "layouts": {
349
+ "agent": "74ece148269c",
350
+ "blank": "5a91c558af22",
351
+ "chat": "7dbe6d5170df",
352
+ "nodejs": "d5bab75076ef",
353
+ "notes": "4edc36949c15",
354
+ "todo": "849a18d66dc1"
355
+ }
356
+ },
357
+ {
358
+ "version": "1.0.9",
359
+ "layouts": {
360
+ "agent": "74ece148269c",
361
+ "blank": "5a91c558af22",
362
+ "chat": "7dbe6d5170df",
363
+ "nodejs": "d5bab75076ef",
364
+ "notes": "4edc36949c15",
365
+ "todo": "849a18d66dc1"
366
+ }
367
+ },
368
+ {
369
+ "version": "1.0.10",
370
+ "layouts": {
371
+ "agent": "74ece148269c",
372
+ "blank": "5a91c558af22",
373
+ "chat": "7dbe6d5170df",
374
+ "nodejs": "d5bab75076ef",
375
+ "notes": "4edc36949c15",
376
+ "todo": "849a18d66dc1"
377
+ }
378
+ },
379
+ {
380
+ "version": "1.1.0",
381
+ "layouts": {
382
+ "agent": "855359304707",
383
+ "blank": "5a91c558af22",
384
+ "chat": "7dbe6d5170df",
385
+ "nodejs": "d5bab75076ef",
386
+ "notes": "4edc36949c15",
387
+ "todo": "849a18d66dc1"
388
+ }
389
+ }
390
+ ],
391
+ "templates": {
392
+ "agent": {
393
+ "c2f30958043b": [
394
+ "src/app.ts",
395
+ "src/routes.ts"
396
+ ],
397
+ "2e790da977b2": [
398
+ "src/app.ts",
399
+ "src/routes.ts"
400
+ ],
401
+ "157ce3db1112": [
402
+ "src/app.ts",
403
+ "src/routes.ts"
404
+ ],
405
+ "71fb54a5a942": [
406
+ "src/app.ts",
407
+ "src/routes.ts"
408
+ ],
409
+ "b5ef3c786ae4": [
410
+ "src/app.ts",
411
+ "src/routes.ts"
412
+ ],
413
+ "6a5fb9c15c53": [
414
+ "src/app.ts",
415
+ "src/routes.ts"
416
+ ],
417
+ "24c681a00fca": [
418
+ "src/app.ts",
419
+ "src/routes.ts"
420
+ ],
421
+ "6307045545dc": [
422
+ "src/app.ts",
423
+ "src/routes.ts"
424
+ ],
425
+ "74ece148269c": [
426
+ "src/app.ts",
427
+ "src/routes.ts"
428
+ ],
429
+ "855359304707": [
430
+ "src/app.ts",
431
+ "src/routes.ts"
432
+ ]
433
+ },
434
+ "blank": {
435
+ "9c650cf52bf3": [
436
+ "src/routes.ts"
437
+ ],
438
+ "aea589283445": [
439
+ "src/routes.ts"
440
+ ],
441
+ "b2cbb759c889": [
442
+ "src/routes.ts"
443
+ ],
444
+ "d6d371c9a65e": [
445
+ "src/routes.ts"
446
+ ],
447
+ "5a91c558af22": [
448
+ "src/routes.ts"
449
+ ]
450
+ },
451
+ "chat": {
452
+ "7076cc821e2c": [
453
+ "src/app.ts",
454
+ "src/routes.ts"
455
+ ],
456
+ "f20ad9a51b06": [
457
+ "src/app.ts",
458
+ "src/routes.ts"
459
+ ],
460
+ "a9a9ab44c58e": [
461
+ "src/app.ts",
462
+ "src/routes.ts"
463
+ ],
464
+ "7dbe6d5170df": [
465
+ "src/app.ts",
466
+ "src/routes.ts"
467
+ ]
468
+ },
469
+ "nodejs": {
470
+ "b1bd9462496c": [
471
+ "src/app.ts",
472
+ "src/routes.ts"
473
+ ],
474
+ "1d477f37aaf4": [
475
+ "src/app.ts",
476
+ "src/routes.ts"
477
+ ],
478
+ "d5bab75076ef": [
479
+ "src/app.ts",
480
+ "src/routes.ts"
481
+ ]
482
+ },
483
+ "notes": {
484
+ "6cab2d09747c": [
485
+ "src/app.ts",
486
+ "src/routes.ts"
487
+ ],
488
+ "7ca2dfed623a": [
489
+ "src/app.ts",
490
+ "src/routes.ts"
491
+ ],
492
+ "4edc36949c15": [
493
+ "src/app.ts",
494
+ "src/routes.ts"
495
+ ]
496
+ },
497
+ "todo": {
498
+ "45694a8d9e15": [
499
+ "src/app.ts",
500
+ "src/todo.ts"
501
+ ],
502
+ "02e613b3625c": [
503
+ "src/app.ts",
504
+ "src/todo.ts"
505
+ ],
506
+ "5923d3a6099f": [
507
+ "src/app.ts",
508
+ "src/todo.ts"
509
+ ],
510
+ "8e64211312f3": [
511
+ "src/app.ts",
512
+ "src/todo.ts"
513
+ ],
514
+ "b79078a87565": [
515
+ "src/app.ts",
516
+ "src/todo.ts"
517
+ ],
518
+ "849a18d66dc1": [
519
+ "src/app.ts",
520
+ "src/todo.ts"
521
+ ]
522
+ }
523
+ }
524
+ }
@@ -0,0 +1,92 @@
1
+ import { join } from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { Context, type Fiber } from '@deepseek-ai/cordis'
4
+ import * as door from '../plugins/acryl-door/src/index.ts'
5
+ import * as nodeServer from '../plugins/acryl-node-server/src/index.ts'
6
+ import * as router from '../plugins/acryl-router/src/index.ts'
7
+ import { type AppInstance, instance } from '../plugins/instance/index.ts'
8
+ import {
9
+ blueprintsIn,
10
+ compose,
11
+ loadManifest,
12
+ type ParameterValue,
13
+ } from '../plugins/manifest/index.ts'
14
+ import { doorEnabled } from './door.ts'
15
+ import { routes } from './routes.ts'
16
+
17
+ /** The plugins this app's code provides. `blend.yaml` chooses, orders and configures them. */
18
+ export const registry = {
19
+ 'acryl-router': router,
20
+ 'acryl-node-server': nodeServer,
21
+ 'acryl-door': door,
22
+ routes,
23
+ }
24
+
25
+ /** The manifest next to this app's source. */
26
+ export const MANIFEST = join(fileURLToPath(new URL('..', import.meta.url)), 'blend.yaml')
27
+
28
+ /**
29
+ * The app's manifest, resolved. A Blend finds its Blueprint in `blueprints/<id>.yaml`; an app that is itself a Blueprint never looks.
30
+ * `createApp` and the tests read it the same way.
31
+ */
32
+ export function readManifest(values?: Readonly<Record<string, ParameterValue>>) {
33
+ return loadManifest(MANIFEST, {
34
+ known: Object.keys(registry),
35
+ getBlueprint: blueprintsIn(join(fileURLToPath(new URL('..', import.meta.url)), 'blueprints')),
36
+ ...(values ? { values } : {}),
37
+ })
38
+ }
39
+
40
+ /** The manifest without some rows: without its server (and so its door) the app is reached in process, through `root.router.request`; the door is also left out in production. */
41
+ function without<M extends { plugins: readonly { use: string }[] }>(
42
+ manifest: M,
43
+ ...uses: string[]
44
+ ): M {
45
+ return {
46
+ ...manifest,
47
+ plugins: manifest.plugins.map((row) =>
48
+ uses.includes(row.use) ? { ...row, disabled: true } : row,
49
+ ),
50
+ }
51
+ }
52
+
53
+ export interface App {
54
+ readonly root: Context
55
+ /** The address the server listens on; empty when the app was made with `listen: false`. */
56
+ readonly url: string
57
+ stop(): Promise<void>
58
+ }
59
+
60
+ /** The app: `instance` first (where it lives, chosen at run time), then the manifest's rows in order. */
61
+ export async function createApp(
62
+ chosen: AppInstance,
63
+ options: { values?: Readonly<Record<string, ParameterValue>>; listen?: boolean } = {},
64
+ ): Promise<App> {
65
+ const manifest = readManifest(options.values)
66
+ const listen = options.listen
67
+ const root = new Context()
68
+ const first = root.plugin(instance, chosen)
69
+ await first.await()
70
+ const fibers: Fiber[] = [
71
+ first,
72
+ ...(await compose(
73
+ root,
74
+ listen === false
75
+ ? without(manifest, 'acryl-node-server', 'acryl-door')
76
+ : doorEnabled()
77
+ ? manifest
78
+ : without(manifest, 'acryl-door'),
79
+ registry,
80
+ {
81
+ server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
82
+ },
83
+ )),
84
+ ]
85
+ return {
86
+ root,
87
+ url: listen === false ? '' : root.nodeServer.url,
88
+ async stop() {
89
+ for (const fiber of [...fibers].reverse()) await fiber.dispose()
90
+ },
91
+ }
92
+ }
@@ -0,0 +1,40 @@
1
+ import { createRequire } from 'node:module'
2
+ import { dirname, join } from 'node:path'
3
+ import type { Context } from '@deepseek-ai/cordis'
4
+ import { clientModules } from '../plugins/acryl-node-server/src/client-modules.ts'
5
+ import { Acryl } from '../plugins/acryl-router/src/index.ts'
6
+ import { aboutPage, counterPage } from './page.tsx'
7
+
8
+ /** The browser builds of the DOM renderer and the typed client, shipped by the `acrylblends` package this app depends on. */
9
+ const runtimeDir = join(
10
+ dirname(createRequire(import.meta.url).resolve('acrylblends/package.json')),
11
+ 'lib',
12
+ 'browser',
13
+ )
14
+
15
+ export const APP_NAME = '__APP_NAME__'
16
+
17
+ /** The routes, in a file that does not import the Node adapter's server, so browser code can import the type: `import type { AppType } from '../routes.ts'`. */
18
+ export const pages = new Acryl()
19
+ .get('/', (c) => c.json({ app: APP_NAME, ok: true }))
20
+ .get('/health', (c) => c.json({ ok: true }))
21
+ .get('/about', (c) => c.html(aboutPage()))
22
+ .get('/counter', (c) => c.html(counterPage()))
23
+
24
+ export type AppType = typeof pages
25
+
26
+ /**
27
+ * The app's own plugin: the routes above, and the client components without a bundler (`src/client` is compiled when the browser asks; `npm run build`
28
+ * compiles it once for production, and `NODE_ENV=production` then serves only `dist/client`). The mounts are removed when the plugin is disposed.
29
+ */
30
+ export const routes = {
31
+ name: 'routes',
32
+ inject: ['router'],
33
+ apply(ctx: Context) {
34
+ ctx.router.route('/', pages)
35
+ ctx.router.route(
36
+ '/client',
37
+ clientModules({ root: 'src/client', compiled: 'dist/client', runtimeDir }),
38
+ )
39
+ },
40
+ }