loudmouth-ai 0.1.0 → 0.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 (593) hide show
  1. package/README.md +148 -77
  2. package/dist/build-info.json +3 -3
  3. package/extensions/package.json +6 -0
  4. package/package.json +1 -1
  5. package/skills/autopilot/SKILL.md +179 -0
  6. package/skills/goals/SKILL.md +189 -0
  7. package/skills/wordpress/SKILL.md +232 -0
  8. package/extensions/bluebubbles/clawdbot.plugin.json +0 -11
  9. package/extensions/bluebubbles/index.ts +0 -20
  10. package/extensions/bluebubbles/package.json +0 -33
  11. package/extensions/bluebubbles/src/accounts.ts +0 -80
  12. package/extensions/bluebubbles/src/actions.test.ts +0 -651
  13. package/extensions/bluebubbles/src/actions.ts +0 -403
  14. package/extensions/bluebubbles/src/attachments.test.ts +0 -346
  15. package/extensions/bluebubbles/src/attachments.ts +0 -282
  16. package/extensions/bluebubbles/src/channel.ts +0 -399
  17. package/extensions/bluebubbles/src/chat.test.ts +0 -462
  18. package/extensions/bluebubbles/src/chat.ts +0 -354
  19. package/extensions/bluebubbles/src/config-schema.ts +0 -51
  20. package/extensions/bluebubbles/src/media-send.ts +0 -168
  21. package/extensions/bluebubbles/src/monitor.test.ts +0 -2140
  22. package/extensions/bluebubbles/src/monitor.ts +0 -2101
  23. package/extensions/bluebubbles/src/onboarding.ts +0 -340
  24. package/extensions/bluebubbles/src/probe.ts +0 -127
  25. package/extensions/bluebubbles/src/reactions.test.ts +0 -393
  26. package/extensions/bluebubbles/src/reactions.ts +0 -183
  27. package/extensions/bluebubbles/src/runtime.ts +0 -14
  28. package/extensions/bluebubbles/src/send.test.ts +0 -809
  29. package/extensions/bluebubbles/src/send.ts +0 -418
  30. package/extensions/bluebubbles/src/targets.test.ts +0 -184
  31. package/extensions/bluebubbles/src/targets.ts +0 -323
  32. package/extensions/bluebubbles/src/types.ts +0 -127
  33. package/extensions/copilot-proxy/README.md +0 -24
  34. package/extensions/copilot-proxy/clawdbot.plugin.json +0 -11
  35. package/extensions/copilot-proxy/index.ts +0 -142
  36. package/extensions/copilot-proxy/package.json +0 -11
  37. package/extensions/google-antigravity-auth/README.md +0 -24
  38. package/extensions/google-antigravity-auth/clawdbot.plugin.json +0 -11
  39. package/extensions/google-antigravity-auth/index.ts +0 -437
  40. package/extensions/google-antigravity-auth/package.json +0 -11
  41. package/extensions/google-gemini-cli-auth/README.md +0 -35
  42. package/extensions/google-gemini-cli-auth/clawdbot.plugin.json +0 -11
  43. package/extensions/google-gemini-cli-auth/index.ts +0 -91
  44. package/extensions/google-gemini-cli-auth/oauth.test.ts +0 -228
  45. package/extensions/google-gemini-cli-auth/oauth.ts +0 -580
  46. package/extensions/google-gemini-cli-auth/package.json +0 -11
  47. package/extensions/googlechat/clawdbot.plugin.json +0 -11
  48. package/extensions/googlechat/index.ts +0 -20
  49. package/extensions/googlechat/package.json +0 -39
  50. package/extensions/googlechat/src/accounts.ts +0 -133
  51. package/extensions/googlechat/src/actions.ts +0 -162
  52. package/extensions/googlechat/src/api.test.ts +0 -62
  53. package/extensions/googlechat/src/api.ts +0 -259
  54. package/extensions/googlechat/src/auth.ts +0 -113
  55. package/extensions/googlechat/src/channel.ts +0 -580
  56. package/extensions/googlechat/src/monitor.test.ts +0 -27
  57. package/extensions/googlechat/src/monitor.ts +0 -900
  58. package/extensions/googlechat/src/onboarding.ts +0 -278
  59. package/extensions/googlechat/src/runtime.ts +0 -14
  60. package/extensions/googlechat/src/targets.test.ts +0 -35
  61. package/extensions/googlechat/src/targets.ts +0 -55
  62. package/extensions/googlechat/src/types.config.ts +0 -3
  63. package/extensions/googlechat/src/types.ts +0 -73
  64. package/extensions/imessage/clawdbot.plugin.json +0 -11
  65. package/extensions/imessage/index.ts +0 -18
  66. package/extensions/imessage/package.json +0 -11
  67. package/extensions/imessage/src/channel.ts +0 -294
  68. package/extensions/imessage/src/runtime.ts +0 -14
  69. package/extensions/line/clawdbot.plugin.json +0 -11
  70. package/extensions/line/index.ts +0 -20
  71. package/extensions/line/package.json +0 -29
  72. package/extensions/line/src/card-command.ts +0 -338
  73. package/extensions/line/src/channel.logout.test.ts +0 -96
  74. package/extensions/line/src/channel.sendPayload.test.ts +0 -308
  75. package/extensions/line/src/channel.ts +0 -773
  76. package/extensions/line/src/runtime.ts +0 -14
  77. package/extensions/matrix/CHANGELOG.md +0 -54
  78. package/extensions/matrix/clawdbot.plugin.json +0 -11
  79. package/extensions/matrix/index.ts +0 -18
  80. package/extensions/matrix/package.json +0 -36
  81. package/extensions/matrix/src/actions.ts +0 -185
  82. package/extensions/matrix/src/channel.directory.test.ts +0 -56
  83. package/extensions/matrix/src/channel.ts +0 -417
  84. package/extensions/matrix/src/config-schema.ts +0 -62
  85. package/extensions/matrix/src/directory-live.ts +0 -175
  86. package/extensions/matrix/src/group-mentions.ts +0 -61
  87. package/extensions/matrix/src/matrix/accounts.test.ts +0 -83
  88. package/extensions/matrix/src/matrix/accounts.ts +0 -63
  89. package/extensions/matrix/src/matrix/actions/client.ts +0 -53
  90. package/extensions/matrix/src/matrix/actions/messages.ts +0 -120
  91. package/extensions/matrix/src/matrix/actions/pins.ts +0 -70
  92. package/extensions/matrix/src/matrix/actions/reactions.ts +0 -84
  93. package/extensions/matrix/src/matrix/actions/room.ts +0 -88
  94. package/extensions/matrix/src/matrix/actions/summary.ts +0 -77
  95. package/extensions/matrix/src/matrix/actions/types.ts +0 -84
  96. package/extensions/matrix/src/matrix/actions.ts +0 -15
  97. package/extensions/matrix/src/matrix/active-client.ts +0 -11
  98. package/extensions/matrix/src/matrix/client/config.ts +0 -165
  99. package/extensions/matrix/src/matrix/client/create-client.ts +0 -127
  100. package/extensions/matrix/src/matrix/client/logging.ts +0 -35
  101. package/extensions/matrix/src/matrix/client/runtime.ts +0 -4
  102. package/extensions/matrix/src/matrix/client/shared.ts +0 -169
  103. package/extensions/matrix/src/matrix/client/storage.ts +0 -131
  104. package/extensions/matrix/src/matrix/client/types.ts +0 -34
  105. package/extensions/matrix/src/matrix/client.test.ts +0 -57
  106. package/extensions/matrix/src/matrix/client.ts +0 -9
  107. package/extensions/matrix/src/matrix/credentials.ts +0 -103
  108. package/extensions/matrix/src/matrix/deps.ts +0 -57
  109. package/extensions/matrix/src/matrix/format.test.ts +0 -34
  110. package/extensions/matrix/src/matrix/format.ts +0 -22
  111. package/extensions/matrix/src/matrix/index.ts +0 -11
  112. package/extensions/matrix/src/matrix/monitor/allowlist.ts +0 -58
  113. package/extensions/matrix/src/matrix/monitor/auto-join.ts +0 -68
  114. package/extensions/matrix/src/matrix/monitor/direct.ts +0 -105
  115. package/extensions/matrix/src/matrix/monitor/events.ts +0 -103
  116. package/extensions/matrix/src/matrix/monitor/handler.ts +0 -645
  117. package/extensions/matrix/src/matrix/monitor/index.ts +0 -279
  118. package/extensions/matrix/src/matrix/monitor/location.ts +0 -83
  119. package/extensions/matrix/src/matrix/monitor/media.test.ts +0 -103
  120. package/extensions/matrix/src/matrix/monitor/media.ts +0 -113
  121. package/extensions/matrix/src/matrix/monitor/mentions.ts +0 -31
  122. package/extensions/matrix/src/matrix/monitor/replies.ts +0 -96
  123. package/extensions/matrix/src/matrix/monitor/room-info.ts +0 -58
  124. package/extensions/matrix/src/matrix/monitor/rooms.ts +0 -43
  125. package/extensions/matrix/src/matrix/monitor/threads.ts +0 -64
  126. package/extensions/matrix/src/matrix/monitor/types.ts +0 -39
  127. package/extensions/matrix/src/matrix/poll-types.test.ts +0 -22
  128. package/extensions/matrix/src/matrix/poll-types.ts +0 -157
  129. package/extensions/matrix/src/matrix/probe.ts +0 -70
  130. package/extensions/matrix/src/matrix/send/client.ts +0 -63
  131. package/extensions/matrix/src/matrix/send/formatting.ts +0 -92
  132. package/extensions/matrix/src/matrix/send/media.ts +0 -220
  133. package/extensions/matrix/src/matrix/send/targets.test.ts +0 -102
  134. package/extensions/matrix/src/matrix/send/targets.ts +0 -144
  135. package/extensions/matrix/src/matrix/send/types.ts +0 -109
  136. package/extensions/matrix/src/matrix/send.test.ts +0 -172
  137. package/extensions/matrix/src/matrix/send.ts +0 -255
  138. package/extensions/matrix/src/onboarding.ts +0 -432
  139. package/extensions/matrix/src/outbound.ts +0 -53
  140. package/extensions/matrix/src/resolve-targets.ts +0 -89
  141. package/extensions/matrix/src/runtime.ts +0 -14
  142. package/extensions/matrix/src/tool-actions.ts +0 -160
  143. package/extensions/matrix/src/types.ts +0 -95
  144. package/extensions/mattermost/clawdbot.plugin.json +0 -11
  145. package/extensions/mattermost/index.ts +0 -18
  146. package/extensions/mattermost/package.json +0 -25
  147. package/extensions/mattermost/src/channel.test.ts +0 -43
  148. package/extensions/mattermost/src/channel.ts +0 -339
  149. package/extensions/mattermost/src/config-schema.ts +0 -56
  150. package/extensions/mattermost/src/group-mentions.ts +0 -14
  151. package/extensions/mattermost/src/mattermost/accounts.ts +0 -115
  152. package/extensions/mattermost/src/mattermost/client.ts +0 -208
  153. package/extensions/mattermost/src/mattermost/index.ts +0 -9
  154. package/extensions/mattermost/src/mattermost/monitor-helpers.ts +0 -150
  155. package/extensions/mattermost/src/mattermost/monitor.ts +0 -921
  156. package/extensions/mattermost/src/mattermost/probe.ts +0 -70
  157. package/extensions/mattermost/src/mattermost/send.ts +0 -217
  158. package/extensions/mattermost/src/normalize.ts +0 -38
  159. package/extensions/mattermost/src/onboarding-helpers.ts +0 -42
  160. package/extensions/mattermost/src/onboarding.ts +0 -187
  161. package/extensions/mattermost/src/runtime.ts +0 -14
  162. package/extensions/mattermost/src/types.ts +0 -50
  163. package/extensions/msteams/CHANGELOG.md +0 -51
  164. package/extensions/msteams/clawdbot.plugin.json +0 -11
  165. package/extensions/msteams/index.ts +0 -18
  166. package/extensions/msteams/package.json +0 -36
  167. package/extensions/msteams/src/attachments/download.ts +0 -206
  168. package/extensions/msteams/src/attachments/graph.ts +0 -319
  169. package/extensions/msteams/src/attachments/html.ts +0 -76
  170. package/extensions/msteams/src/attachments/payload.ts +0 -22
  171. package/extensions/msteams/src/attachments/shared.ts +0 -235
  172. package/extensions/msteams/src/attachments/types.ts +0 -37
  173. package/extensions/msteams/src/attachments.test.ts +0 -424
  174. package/extensions/msteams/src/attachments.ts +0 -18
  175. package/extensions/msteams/src/channel.directory.test.ts +0 -46
  176. package/extensions/msteams/src/channel.ts +0 -436
  177. package/extensions/msteams/src/conversation-store-fs.test.ts +0 -88
  178. package/extensions/msteams/src/conversation-store-fs.ts +0 -155
  179. package/extensions/msteams/src/conversation-store-memory.ts +0 -45
  180. package/extensions/msteams/src/conversation-store.ts +0 -41
  181. package/extensions/msteams/src/directory-live.ts +0 -179
  182. package/extensions/msteams/src/errors.test.ts +0 -46
  183. package/extensions/msteams/src/errors.ts +0 -158
  184. package/extensions/msteams/src/file-consent-helpers.test.ts +0 -234
  185. package/extensions/msteams/src/file-consent-helpers.ts +0 -73
  186. package/extensions/msteams/src/file-consent.ts +0 -122
  187. package/extensions/msteams/src/graph-chat.ts +0 -52
  188. package/extensions/msteams/src/graph-upload.ts +0 -445
  189. package/extensions/msteams/src/inbound.test.ts +0 -67
  190. package/extensions/msteams/src/inbound.ts +0 -38
  191. package/extensions/msteams/src/index.ts +0 -4
  192. package/extensions/msteams/src/media-helpers.test.ts +0 -186
  193. package/extensions/msteams/src/media-helpers.ts +0 -77
  194. package/extensions/msteams/src/messenger.test.ts +0 -245
  195. package/extensions/msteams/src/messenger.ts +0 -460
  196. package/extensions/msteams/src/monitor-handler/inbound-media.ts +0 -123
  197. package/extensions/msteams/src/monitor-handler/message-handler.ts +0 -629
  198. package/extensions/msteams/src/monitor-handler.ts +0 -166
  199. package/extensions/msteams/src/monitor-types.ts +0 -5
  200. package/extensions/msteams/src/monitor.ts +0 -290
  201. package/extensions/msteams/src/onboarding.ts +0 -432
  202. package/extensions/msteams/src/outbound.ts +0 -47
  203. package/extensions/msteams/src/pending-uploads.ts +0 -87
  204. package/extensions/msteams/src/policy.test.ts +0 -210
  205. package/extensions/msteams/src/policy.ts +0 -202
  206. package/extensions/msteams/src/polls-store-memory.ts +0 -30
  207. package/extensions/msteams/src/polls-store.test.ts +0 -40
  208. package/extensions/msteams/src/polls.test.ts +0 -72
  209. package/extensions/msteams/src/polls.ts +0 -299
  210. package/extensions/msteams/src/probe.test.ts +0 -57
  211. package/extensions/msteams/src/probe.ts +0 -99
  212. package/extensions/msteams/src/reply-dispatcher.ts +0 -128
  213. package/extensions/msteams/src/resolve-allowlist.ts +0 -277
  214. package/extensions/msteams/src/runtime.ts +0 -14
  215. package/extensions/msteams/src/sdk-types.ts +0 -19
  216. package/extensions/msteams/src/sdk.ts +0 -33
  217. package/extensions/msteams/src/send-context.ts +0 -156
  218. package/extensions/msteams/src/send.ts +0 -489
  219. package/extensions/msteams/src/sent-message-cache.test.ts +0 -16
  220. package/extensions/msteams/src/sent-message-cache.ts +0 -41
  221. package/extensions/msteams/src/storage.ts +0 -22
  222. package/extensions/msteams/src/store-fs.ts +0 -80
  223. package/extensions/msteams/src/token.ts +0 -19
  224. package/extensions/nextcloud-talk/clawdbot.plugin.json +0 -11
  225. package/extensions/nextcloud-talk/index.ts +0 -18
  226. package/extensions/nextcloud-talk/package.json +0 -30
  227. package/extensions/nextcloud-talk/src/accounts.ts +0 -154
  228. package/extensions/nextcloud-talk/src/channel.ts +0 -404
  229. package/extensions/nextcloud-talk/src/config-schema.ts +0 -78
  230. package/extensions/nextcloud-talk/src/format.ts +0 -79
  231. package/extensions/nextcloud-talk/src/inbound.ts +0 -336
  232. package/extensions/nextcloud-talk/src/monitor.ts +0 -246
  233. package/extensions/nextcloud-talk/src/normalize.ts +0 -31
  234. package/extensions/nextcloud-talk/src/onboarding.ts +0 -341
  235. package/extensions/nextcloud-talk/src/policy.ts +0 -175
  236. package/extensions/nextcloud-talk/src/room-info.ts +0 -111
  237. package/extensions/nextcloud-talk/src/runtime.ts +0 -14
  238. package/extensions/nextcloud-talk/src/send.ts +0 -206
  239. package/extensions/nextcloud-talk/src/signature.ts +0 -67
  240. package/extensions/nextcloud-talk/src/types.ts +0 -179
  241. package/extensions/nostr/CHANGELOG.md +0 -46
  242. package/extensions/nostr/README.md +0 -136
  243. package/extensions/nostr/clawdbot.plugin.json +0 -11
  244. package/extensions/nostr/index.ts +0 -69
  245. package/extensions/nostr/package.json +0 -31
  246. package/extensions/nostr/src/channel.test.ts +0 -141
  247. package/extensions/nostr/src/channel.ts +0 -342
  248. package/extensions/nostr/src/config-schema.ts +0 -90
  249. package/extensions/nostr/src/metrics.ts +0 -464
  250. package/extensions/nostr/src/nostr-bus.fuzz.test.ts +0 -544
  251. package/extensions/nostr/src/nostr-bus.integration.test.ts +0 -452
  252. package/extensions/nostr/src/nostr-bus.test.ts +0 -199
  253. package/extensions/nostr/src/nostr-bus.ts +0 -741
  254. package/extensions/nostr/src/nostr-profile-http.test.ts +0 -378
  255. package/extensions/nostr/src/nostr-profile-http.ts +0 -500
  256. package/extensions/nostr/src/nostr-profile-import.test.ts +0 -120
  257. package/extensions/nostr/src/nostr-profile-import.ts +0 -259
  258. package/extensions/nostr/src/nostr-profile.fuzz.test.ts +0 -479
  259. package/extensions/nostr/src/nostr-profile.test.ts +0 -410
  260. package/extensions/nostr/src/nostr-profile.ts +0 -242
  261. package/extensions/nostr/src/nostr-state-store.test.ts +0 -128
  262. package/extensions/nostr/src/nostr-state-store.ts +0 -226
  263. package/extensions/nostr/src/runtime.ts +0 -14
  264. package/extensions/nostr/src/seen-tracker.ts +0 -271
  265. package/extensions/nostr/src/types.test.ts +0 -161
  266. package/extensions/nostr/src/types.ts +0 -99
  267. package/extensions/nostr/test/setup.ts +0 -5
  268. package/extensions/open-prose/README.md +0 -25
  269. package/extensions/open-prose/clawdbot.plugin.json +0 -11
  270. package/extensions/open-prose/index.ts +0 -5
  271. package/extensions/open-prose/package.json +0 -11
  272. package/extensions/open-prose/skills/prose/LICENSE +0 -21
  273. package/extensions/open-prose/skills/prose/SKILL.md +0 -318
  274. package/extensions/open-prose/skills/prose/alt-borges.md +0 -141
  275. package/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -358
  276. package/extensions/open-prose/skills/prose/alts/borges.md +0 -360
  277. package/extensions/open-prose/skills/prose/alts/folk.md +0 -322
  278. package/extensions/open-prose/skills/prose/alts/homer.md +0 -346
  279. package/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
  280. package/extensions/open-prose/skills/prose/compiler.md +0 -2967
  281. package/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
  282. package/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
  283. package/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
  284. package/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
  285. package/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
  286. package/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
  287. package/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
  288. package/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
  289. package/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
  290. package/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
  291. package/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
  292. package/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
  293. package/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
  294. package/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
  295. package/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
  296. package/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
  297. package/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
  298. package/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
  299. package/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
  300. package/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
  301. package/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
  302. package/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
  303. package/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
  304. package/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
  305. package/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
  306. package/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
  307. package/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
  308. package/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
  309. package/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
  310. package/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
  311. package/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
  312. package/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
  313. package/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
  314. package/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
  315. package/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
  316. package/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
  317. package/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
  318. package/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
  319. package/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
  320. package/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
  321. package/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
  322. package/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
  323. package/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
  324. package/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
  325. package/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
  326. package/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
  327. package/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
  328. package/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
  329. package/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
  330. package/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
  331. package/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
  332. package/extensions/open-prose/skills/prose/examples/README.md +0 -391
  333. package/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
  334. package/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
  335. package/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
  336. package/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
  337. package/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
  338. package/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
  339. package/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
  340. package/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
  341. package/extensions/open-prose/skills/prose/help.md +0 -143
  342. package/extensions/open-prose/skills/prose/lib/README.md +0 -105
  343. package/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
  344. package/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
  345. package/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
  346. package/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
  347. package/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
  348. package/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
  349. package/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
  350. package/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
  351. package/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
  352. package/extensions/open-prose/skills/prose/primitives/session.md +0 -587
  353. package/extensions/open-prose/skills/prose/prose.md +0 -1235
  354. package/extensions/open-prose/skills/prose/state/filesystem.md +0 -478
  355. package/extensions/open-prose/skills/prose/state/in-context.md +0 -380
  356. package/extensions/open-prose/skills/prose/state/postgres.md +0 -875
  357. package/extensions/open-prose/skills/prose/state/sqlite.md +0 -572
  358. package/extensions/qwen-portal-auth/README.md +0 -24
  359. package/extensions/qwen-portal-auth/clawdbot.plugin.json +0 -11
  360. package/extensions/qwen-portal-auth/index.ts +0 -127
  361. package/extensions/qwen-portal-auth/oauth.ts +0 -190
  362. package/extensions/signal/clawdbot.plugin.json +0 -11
  363. package/extensions/signal/index.ts +0 -18
  364. package/extensions/signal/package.json +0 -11
  365. package/extensions/signal/src/channel.ts +0 -312
  366. package/extensions/signal/src/runtime.ts +0 -14
  367. package/extensions/telegram/clawdbot.plugin.json +0 -11
  368. package/extensions/telegram/index.ts +0 -18
  369. package/extensions/telegram/package.json +0 -11
  370. package/extensions/telegram/src/channel.ts +0 -478
  371. package/extensions/telegram/src/runtime.ts +0 -14
  372. package/extensions/tlon/README.md +0 -5
  373. package/extensions/tlon/clawdbot.plugin.json +0 -11
  374. package/extensions/tlon/index.ts +0 -18
  375. package/extensions/tlon/package.json +0 -30
  376. package/extensions/tlon/src/channel.ts +0 -379
  377. package/extensions/tlon/src/config-schema.test.ts +0 -32
  378. package/extensions/tlon/src/config-schema.ts +0 -43
  379. package/extensions/tlon/src/monitor/discovery.ts +0 -71
  380. package/extensions/tlon/src/monitor/history.ts +0 -87
  381. package/extensions/tlon/src/monitor/index.ts +0 -501
  382. package/extensions/tlon/src/monitor/processed-messages.test.ts +0 -24
  383. package/extensions/tlon/src/monitor/processed-messages.ts +0 -38
  384. package/extensions/tlon/src/monitor/utils.ts +0 -83
  385. package/extensions/tlon/src/onboarding.ts +0 -213
  386. package/extensions/tlon/src/runtime.ts +0 -14
  387. package/extensions/tlon/src/targets.ts +0 -79
  388. package/extensions/tlon/src/types.ts +0 -85
  389. package/extensions/tlon/src/urbit/auth.ts +0 -18
  390. package/extensions/tlon/src/urbit/http-api.ts +0 -36
  391. package/extensions/tlon/src/urbit/send.test.ts +0 -38
  392. package/extensions/tlon/src/urbit/send.ts +0 -127
  393. package/extensions/tlon/src/urbit/sse-client.test.ts +0 -41
  394. package/extensions/tlon/src/urbit/sse-client.ts +0 -367
  395. package/extensions/twitch/CHANGELOG.md +0 -21
  396. package/extensions/twitch/README.md +0 -89
  397. package/extensions/twitch/clawdbot.plugin.json +0 -9
  398. package/extensions/twitch/index.ts +0 -20
  399. package/extensions/twitch/package.json +0 -20
  400. package/extensions/twitch/src/access-control.test.ts +0 -489
  401. package/extensions/twitch/src/access-control.ts +0 -154
  402. package/extensions/twitch/src/actions.ts +0 -173
  403. package/extensions/twitch/src/client-manager-registry.ts +0 -115
  404. package/extensions/twitch/src/config-schema.ts +0 -82
  405. package/extensions/twitch/src/config.test.ts +0 -88
  406. package/extensions/twitch/src/config.ts +0 -116
  407. package/extensions/twitch/src/monitor.ts +0 -257
  408. package/extensions/twitch/src/onboarding.test.ts +0 -311
  409. package/extensions/twitch/src/onboarding.ts +0 -411
  410. package/extensions/twitch/src/outbound.test.ts +0 -373
  411. package/extensions/twitch/src/outbound.ts +0 -186
  412. package/extensions/twitch/src/plugin.test.ts +0 -39
  413. package/extensions/twitch/src/plugin.ts +0 -274
  414. package/extensions/twitch/src/probe.test.ts +0 -198
  415. package/extensions/twitch/src/probe.ts +0 -118
  416. package/extensions/twitch/src/resolver.ts +0 -137
  417. package/extensions/twitch/src/runtime.ts +0 -14
  418. package/extensions/twitch/src/send.test.ts +0 -289
  419. package/extensions/twitch/src/send.ts +0 -136
  420. package/extensions/twitch/src/status.test.ts +0 -270
  421. package/extensions/twitch/src/status.ts +0 -176
  422. package/extensions/twitch/src/token.test.ts +0 -171
  423. package/extensions/twitch/src/token.ts +0 -87
  424. package/extensions/twitch/src/twitch-client.test.ts +0 -574
  425. package/extensions/twitch/src/twitch-client.ts +0 -277
  426. package/extensions/twitch/src/types.ts +0 -141
  427. package/extensions/twitch/src/utils/markdown.ts +0 -92
  428. package/extensions/twitch/src/utils/twitch.ts +0 -78
  429. package/extensions/twitch/test/setup.ts +0 -7
  430. package/extensions/voice-call/CHANGELOG.md +0 -72
  431. package/extensions/voice-call/README.md +0 -134
  432. package/extensions/voice-call/clawdbot.plugin.json +0 -601
  433. package/extensions/voice-call/index.ts +0 -497
  434. package/extensions/voice-call/package.json +0 -16
  435. package/extensions/voice-call/src/cli.ts +0 -300
  436. package/extensions/voice-call/src/config.test.ts +0 -204
  437. package/extensions/voice-call/src/config.ts +0 -493
  438. package/extensions/voice-call/src/core-bridge.ts +0 -196
  439. package/extensions/voice-call/src/manager/context.ts +0 -21
  440. package/extensions/voice-call/src/manager/events.ts +0 -177
  441. package/extensions/voice-call/src/manager/lookup.ts +0 -33
  442. package/extensions/voice-call/src/manager/outbound.ts +0 -248
  443. package/extensions/voice-call/src/manager/state.ts +0 -50
  444. package/extensions/voice-call/src/manager/store.ts +0 -88
  445. package/extensions/voice-call/src/manager/timers.ts +0 -86
  446. package/extensions/voice-call/src/manager/twiml.ts +0 -9
  447. package/extensions/voice-call/src/manager.test.ts +0 -108
  448. package/extensions/voice-call/src/manager.ts +0 -876
  449. package/extensions/voice-call/src/media-stream.test.ts +0 -97
  450. package/extensions/voice-call/src/media-stream.ts +0 -393
  451. package/extensions/voice-call/src/providers/base.ts +0 -67
  452. package/extensions/voice-call/src/providers/index.ts +0 -10
  453. package/extensions/voice-call/src/providers/mock.ts +0 -168
  454. package/extensions/voice-call/src/providers/plivo.test.ts +0 -28
  455. package/extensions/voice-call/src/providers/plivo.ts +0 -504
  456. package/extensions/voice-call/src/providers/stt-openai-realtime.ts +0 -311
  457. package/extensions/voice-call/src/providers/telnyx.ts +0 -364
  458. package/extensions/voice-call/src/providers/tts-openai.ts +0 -264
  459. package/extensions/voice-call/src/providers/twilio/api.ts +0 -45
  460. package/extensions/voice-call/src/providers/twilio/webhook.ts +0 -29
  461. package/extensions/voice-call/src/providers/twilio.test.ts +0 -64
  462. package/extensions/voice-call/src/providers/twilio.ts +0 -595
  463. package/extensions/voice-call/src/response-generator.ts +0 -171
  464. package/extensions/voice-call/src/runtime.ts +0 -205
  465. package/extensions/voice-call/src/telephony-audio.ts +0 -88
  466. package/extensions/voice-call/src/telephony-tts.ts +0 -95
  467. package/extensions/voice-call/src/tunnel.ts +0 -331
  468. package/extensions/voice-call/src/types.ts +0 -272
  469. package/extensions/voice-call/src/utils.ts +0 -12
  470. package/extensions/voice-call/src/voice-mapping.ts +0 -65
  471. package/extensions/voice-call/src/webhook-security.test.ts +0 -233
  472. package/extensions/voice-call/src/webhook-security.ts +0 -446
  473. package/extensions/voice-call/src/webhook.ts +0 -490
  474. package/extensions/whatsapp/clawdbot.plugin.json +0 -11
  475. package/extensions/whatsapp/index.ts +0 -18
  476. package/extensions/whatsapp/package.json +0 -11
  477. package/extensions/whatsapp/src/channel.ts +0 -500
  478. package/extensions/whatsapp/src/runtime.ts +0 -14
  479. package/extensions/zalo/CHANGELOG.md +0 -55
  480. package/extensions/zalo/README.md +0 -50
  481. package/extensions/zalo/clawdbot.plugin.json +0 -11
  482. package/extensions/zalo/index.ts +0 -20
  483. package/extensions/zalo/package.json +0 -33
  484. package/extensions/zalo/src/accounts.ts +0 -71
  485. package/extensions/zalo/src/actions.ts +0 -62
  486. package/extensions/zalo/src/api.ts +0 -206
  487. package/extensions/zalo/src/channel.directory.test.ts +0 -35
  488. package/extensions/zalo/src/channel.ts +0 -394
  489. package/extensions/zalo/src/config-schema.ts +0 -24
  490. package/extensions/zalo/src/monitor.ts +0 -760
  491. package/extensions/zalo/src/monitor.webhook.test.ts +0 -70
  492. package/extensions/zalo/src/onboarding.ts +0 -405
  493. package/extensions/zalo/src/probe.ts +0 -46
  494. package/extensions/zalo/src/proxy.ts +0 -18
  495. package/extensions/zalo/src/runtime.ts +0 -14
  496. package/extensions/zalo/src/send.ts +0 -117
  497. package/extensions/zalo/src/status-issues.ts +0 -50
  498. package/extensions/zalo/src/token.ts +0 -55
  499. package/extensions/zalo/src/types.ts +0 -42
  500. package/extensions/zalouser/CHANGELOG.md +0 -33
  501. package/extensions/zalouser/README.md +0 -221
  502. package/extensions/zalouser/clawdbot.plugin.json +0 -11
  503. package/extensions/zalouser/index.ts +0 -32
  504. package/extensions/zalouser/package.json +0 -33
  505. package/extensions/zalouser/src/accounts.ts +0 -117
  506. package/extensions/zalouser/src/channel.test.ts +0 -17
  507. package/extensions/zalouser/src/channel.ts +0 -641
  508. package/extensions/zalouser/src/config-schema.ts +0 -27
  509. package/extensions/zalouser/src/monitor.ts +0 -574
  510. package/extensions/zalouser/src/onboarding.ts +0 -488
  511. package/extensions/zalouser/src/probe.ts +0 -28
  512. package/extensions/zalouser/src/runtime.ts +0 -14
  513. package/extensions/zalouser/src/send.ts +0 -150
  514. package/extensions/zalouser/src/status-issues.test.ts +0 -58
  515. package/extensions/zalouser/src/status-issues.ts +0 -81
  516. package/extensions/zalouser/src/tool.ts +0 -156
  517. package/extensions/zalouser/src/types.ts +0 -102
  518. package/extensions/zalouser/src/zca.ts +0 -208
  519. package/skills/1password/SKILL.md +0 -53
  520. package/skills/1password/references/cli-examples.md +0 -29
  521. package/skills/1password/references/get-started.md +0 -17
  522. package/skills/apple-notes/SKILL.md +0 -50
  523. package/skills/apple-reminders/SKILL.md +0 -67
  524. package/skills/bear-notes/SKILL.md +0 -79
  525. package/skills/bird/SKILL.md +0 -197
  526. package/skills/blogwatcher/SKILL.md +0 -46
  527. package/skills/blucli/SKILL.md +0 -27
  528. package/skills/bluebubbles/SKILL.md +0 -39
  529. package/skills/camsnap/SKILL.md +0 -25
  530. package/skills/canvas/SKILL.md +0 -189
  531. package/skills/clawdhub/SKILL.md +0 -53
  532. package/skills/coding-agent/SKILL.md +0 -278
  533. package/skills/discord/SKILL.md +0 -475
  534. package/skills/eightctl/SKILL.md +0 -29
  535. package/skills/food-order/SKILL.md +0 -41
  536. package/skills/gemini/SKILL.md +0 -23
  537. package/skills/gifgrep/SKILL.md +0 -47
  538. package/skills/github/SKILL.md +0 -48
  539. package/skills/gog/SKILL.md +0 -92
  540. package/skills/goplaces/SKILL.md +0 -30
  541. package/skills/himalaya/SKILL.md +0 -217
  542. package/skills/himalaya/references/configuration.md +0 -174
  543. package/skills/himalaya/references/message-composition.md +0 -182
  544. package/skills/imsg/SKILL.md +0 -25
  545. package/skills/local-places/SERVER_README.md +0 -101
  546. package/skills/local-places/SKILL.md +0 -91
  547. package/skills/local-places/pyproject.toml +0 -27
  548. package/skills/local-places/src/local_places/__init__.py +0 -2
  549. package/skills/local-places/src/local_places/google_places.py +0 -314
  550. package/skills/local-places/src/local_places/main.py +0 -65
  551. package/skills/local-places/src/local_places/schemas.py +0 -107
  552. package/skills/mcporter/SKILL.md +0 -38
  553. package/skills/model-usage/SKILL.md +0 -45
  554. package/skills/model-usage/references/codexbar-cli.md +0 -28
  555. package/skills/model-usage/scripts/model_usage.py +0 -310
  556. package/skills/nano-banana-pro/SKILL.md +0 -30
  557. package/skills/nano-banana-pro/scripts/generate_image.py +0 -169
  558. package/skills/nano-pdf/SKILL.md +0 -20
  559. package/skills/notion/SKILL.md +0 -156
  560. package/skills/obsidian/SKILL.md +0 -55
  561. package/skills/openai-image-gen/SKILL.md +0 -71
  562. package/skills/openai-image-gen/scripts/gen.py +0 -240
  563. package/skills/openai-whisper/SKILL.md +0 -19
  564. package/skills/openai-whisper-api/SKILL.md +0 -43
  565. package/skills/openai-whisper-api/scripts/transcribe.sh +0 -85
  566. package/skills/openhue/SKILL.md +0 -30
  567. package/skills/oracle/SKILL.md +0 -105
  568. package/skills/ordercli/SKILL.md +0 -47
  569. package/skills/peekaboo/SKILL.md +0 -153
  570. package/skills/sag/SKILL.md +0 -62
  571. package/skills/session-logs/SKILL.md +0 -105
  572. package/skills/sherpa-onnx-tts/SKILL.md +0 -49
  573. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
  574. package/skills/skill-creator/SKILL.md +0 -371
  575. package/skills/skill-creator/license.txt +0 -202
  576. package/skills/skill-creator/scripts/init_skill.py +0 -378
  577. package/skills/skill-creator/scripts/package_skill.py +0 -111
  578. package/skills/skill-creator/scripts/quick_validate.py +0 -101
  579. package/skills/slack/SKILL.md +0 -144
  580. package/skills/songsee/SKILL.md +0 -29
  581. package/skills/sonoscli/SKILL.md +0 -26
  582. package/skills/spotify-player/SKILL.md +0 -34
  583. package/skills/summarize/SKILL.md +0 -67
  584. package/skills/things-mac/SKILL.md +0 -61
  585. package/skills/tmux/SKILL.md +0 -121
  586. package/skills/tmux/scripts/find-sessions.sh +0 -112
  587. package/skills/tmux/scripts/wait-for-text.sh +0 -83
  588. package/skills/trello/SKILL.md +0 -84
  589. package/skills/video-frames/SKILL.md +0 -29
  590. package/skills/video-frames/scripts/frame.sh +0 -81
  591. package/skills/voice-call/SKILL.md +0 -35
  592. package/skills/wacli/SKILL.md +0 -42
  593. package/skills/weather/SKILL.md +0 -49
@@ -1,1474 +0,0 @@
1
- # The Forge: Browser from Nothing
2
- #
3
- # Watch AI agents forge a working web browser from raw code.
4
- # No frameworks. No shortcuts. Just Rust, a window, and fire.
5
- #
6
- # Target: A browser that can:
7
- # - Fetch web pages over HTTPS
8
- # - Parse HTML and CSS
9
- # - Execute JavaScript
10
- # - Render to a native window
11
- #
12
- # This is a multi-day build. The smith remembers everything.
13
- #
14
- # Usage: Just run it and watch a browser get built.
15
-
16
- input test_url: "https://prose.md"
17
-
18
- # =============================================================================
19
- # THE FORGE: Where Browsers Are Born
20
- # =============================================================================
21
- #
22
- # The Forge is simple: five agents, eight phases, one browser.
23
- #
24
- # The Forge is a straight
25
- # pipeline. The Smith coordinates, specialists execute, tests validate.
26
- # When each phase completes, we have something that works.
27
- #
28
- # The metaphor:
29
- # - Smith: Master craftsman who sees the whole blade
30
- # - Smelter: Extracts designs from specifications
31
- # - Hammer: Shapes raw code into working metal
32
- # - Quench: Tests and hardens (tempers) each piece
33
- # - Crucible: Where the hardest work happens (the JS engine)
34
-
35
- # =============================================================================
36
- # AGENTS
37
- # =============================================================================
38
-
39
- # The Smith: Master craftsman, sees the whole blade
40
- # Persists across the entire multi-day build
41
- agent smith:
42
- model: sonnet
43
- persist: project
44
- prompt: """
45
- You are the Smith, master of The Forge.
46
-
47
- You've built browsers before. You know every component, every tradeoff,
48
- every place where corners can be cut and where they absolutely cannot.
49
-
50
- Your role:
51
- - Maintain the vision: a working browser from scratch
52
- - Coordinate the specialists without micromanaging
53
- - Make technical decisions when the path forks
54
- - Track what's built and what remains
55
- - Remember everything across sessions
56
-
57
- You speak in the language of the forge: heat, metal, shaping, tempering.
58
- But you mean code, architecture, implementation, testing.
59
-
60
- The browser we're building:
61
- - Language: Rust (for performance and safety)
62
- - GUI: winit + softbuffer (minimal dependencies)
63
- - Scope: Static HTML + CSS + JavaScript (no WebGL, no WebRTC)
64
- - Goal: Render {test_url} correctly
65
-
66
- Keep the fire hot. The blade is taking shape.
67
- """
68
-
69
- # The Smelter: Turns specifications into designs
70
- agent smelter:
71
- model: opus
72
- prompt: """
73
- You are the Smelter. You extract pure design from the ore of specifications.
74
-
75
- Your job: Read specs (W3C, ECMA, MDN), understand them deeply, and produce
76
- clear technical designs that the Hammer can implement.
77
-
78
- Your output:
79
- - Data structures with Rust types
80
- - Algorithms in pseudocode
81
- - Interface boundaries
82
- - Key edge cases to handle
83
-
84
- You don't write implementation code. You write blueprints.
85
- Make them precise enough that implementation is mechanical.
86
- """
87
-
88
- # The Hammer: Shapes code into working components
89
- agent hammer:
90
- model: opus
91
- prompt: """
92
- You are the Hammer. You shape raw code into working metal.
93
-
94
- Your job: Take the Smelter's designs and forge them into working Rust code.
95
- Every line must compile. Every function must work. No pseudocode.
96
-
97
- Your standards:
98
- - Clean, idiomatic Rust
99
- - Minimal unsafe blocks (document each one)
100
- - No external dependencies except: winit, softbuffer
101
- - Comprehensive error handling
102
- - Clear module structure
103
-
104
- You don't design. You don't test. You forge.
105
- """
106
-
107
- # The Quench: Tests and hardens each piece
108
- agent quench:
109
- model: sonnet
110
- prompt: """
111
- You are the Quench. You temper the metal so it doesn't shatter.
112
-
113
- Your job: Write tests that prove each component works. Find the edge cases.
114
- Find the bugs. Find the places where the metal is weak.
115
-
116
- Your process:
117
- - Unit tests for each function
118
- - Integration tests for each module
119
- - Regression tests for each bug found
120
- - Document what each test proves
121
-
122
- When you find a flaw, report it clearly. The Hammer will fix it.
123
- A blade that breaks is worse than no blade at all.
124
- """
125
-
126
- # The Crucible: Where the hardest work happens (JS engine)
127
- agent crucible:
128
- model: opus
129
- persist: true
130
- prompt: """
131
- You are the Crucible. The hottest part of The Forge.
132
-
133
- Your domain: The JavaScript engine. The hardest component to build.
134
- This requires understanding that the other agents don't have:
135
- - Lexical scoping and closures
136
- - Prototype chains
137
- - The event loop
138
- - Just enough of the spec to run real-world code
139
-
140
- You work closely with the Smith. The JS engine will take multiple phases.
141
- Your memory persists so you can build on what came before.
142
-
143
- This is where browsers are born or die. Make it work.
144
- """
145
-
146
- # =============================================================================
147
- # PHASE 0: IGNITE THE FORGE
148
- # =============================================================================
149
-
150
- session: smith
151
- prompt: """
152
- The Forge ignites.
153
-
154
- We're building a web browser from nothing. In Rust. With a GUI.
155
- Including a JavaScript engine. This is not a toy - it will actually work.
156
-
157
- Let me take stock of what we're about to create:
158
-
159
- 1. Networking: HTTP/HTTPS client
160
- 2. Parsing: HTML tokenizer, HTML parser, CSS tokenizer, CSS parser, JS lexer, JS parser
161
- 3. DOM: Document object model with all standard interfaces
162
- 4. CSSOM: CSS object model, selector matching, cascade
163
- 5. Style: Computed styles, inheritance, defaulting
164
- 6. Layout: Box model, block layout, inline layout, text layout
165
- 7. Paint: Display lists, rasterization
166
- 8. JavaScript: Lexer, parser, bytecode compiler, virtual machine, builtins
167
- 9. Bindings: DOM API exposed to JavaScript
168
- 10. Shell: Window, event loop, URL bar
169
-
170
- This is months of work for a team. We'll do it in days.
171
-
172
- First: set up the project structure.
173
- """
174
-
175
- # Initialize the Rust project
176
- session: hammer
177
- prompt: """
178
- Create the Rust project structure for the browser.
179
-
180
- Commands to run:
181
- ```bash
182
- cargo new browser --name browser
183
- cd browser
184
- ```
185
-
186
- Create Cargo.toml with dependencies:
187
- - winit = "0.29" (windowing)
188
- - softbuffer = "0.4" (pixel buffer)
189
- - rustls = "0.23" (TLS, for HTTPS)
190
- - url = "2" (URL parsing - this one's okay to use)
191
-
192
- Create the module structure:
193
- ```
194
- src/
195
- main.rs # Entry point
196
- lib.rs # Library root
197
- net/ # Networking
198
- mod.rs
199
- http.rs
200
- tls.rs
201
- html/ # HTML parsing
202
- mod.rs
203
- tokenizer.rs
204
- parser.rs
205
- dom.rs
206
- css/ # CSS parsing
207
- mod.rs
208
- tokenizer.rs
209
- parser.rs
210
- cssom.rs
211
- selector.rs
212
- style/ # Style resolution
213
- mod.rs
214
- cascade.rs
215
- computed.rs
216
- layout/ # Layout engine
217
- mod.rs
218
- box_model.rs
219
- block.rs
220
- inline.rs
221
- text.rs
222
- paint/ # Painting
223
- mod.rs
224
- display_list.rs
225
- rasterizer.rs
226
- js/ # JavaScript engine
227
- mod.rs
228
- lexer.rs
229
- parser.rs
230
- ast.rs
231
- compiler.rs
232
- vm.rs
233
- value.rs
234
- builtins.rs
235
- gc.rs
236
- bindings/ # JS-DOM bindings
237
- mod.rs
238
- document.rs
239
- element.rs
240
- console.rs
241
- shell/ # Browser shell
242
- mod.rs
243
- window.rs
244
- events.rs
245
- ```
246
-
247
- Create stub files for each module. Ensure `cargo build` succeeds.
248
- """
249
-
250
- session: quench
251
- prompt: """
252
- Verify the project is set up correctly:
253
- 1. Run `cargo build` - must succeed
254
- 2. Run `cargo test` - must succeed (even with no tests yet)
255
- 3. Verify all modules are properly linked from lib.rs
256
-
257
- Report any issues.
258
- """
259
-
260
- resume: smith
261
- prompt: "Project structure complete. The forge is lit. Moving to Phase 1."
262
-
263
- # =============================================================================
264
- # PHASE 1: NETWORKING - The Ore
265
- # =============================================================================
266
-
267
- session: smith
268
- prompt: """
269
- Phase 1: Networking
270
-
271
- Before we can render a page, we must fetch it. The networking layer is
272
- the ore we'll smelt into a browser.
273
-
274
- We need:
275
- - HTTP/1.1 client (GET requests, headers, redirects)
276
- - TLS support via rustls
277
- - Chunked transfer encoding
278
- - Basic cookie handling (just enough to work)
279
-
280
- This is the foundation. No browser without bytes from the network.
281
- """
282
-
283
- let http_design = session: smelter
284
- prompt: """
285
- Design the HTTP client.
286
-
287
- Reference: RFC 9110 (HTTP Semantics), RFC 9112 (HTTP/1.1)
288
-
289
- Design:
290
- 1. Connection management (keep-alive, pooling)
291
- 2. Request building (method, URL, headers, body)
292
- 3. Response parsing (status, headers, body)
293
- 4. Redirect following (3xx responses)
294
- 5. Chunked transfer-encoding
295
- 6. TLS via rustls
296
-
297
- Output Rust types for:
298
- - HttpRequest
299
- - HttpResponse
300
- - HttpClient
301
- - Error types
302
-
303
- Keep it minimal but correct. We're not building curl.
304
- """
305
-
306
- session: hammer
307
- prompt: """
308
- Implement the HTTP client.
309
-
310
- Files:
311
- - src/net/mod.rs
312
- - src/net/http.rs
313
- - src/net/tls.rs
314
-
315
- Follow the design. Handle errors properly. Make it work.
316
-
317
- Test manually: fetch https://example.com and print the body.
318
- """
319
- context: http_design
320
-
321
- session: quench
322
- prompt: """
323
- Test the HTTP client:
324
- 1. Fetch http://example.com (no TLS)
325
- 2. Fetch https://example.com (with TLS)
326
- 3. Test redirect following (http → https)
327
- 4. Test chunked encoding
328
- 5. Test error cases (bad host, timeout, etc.)
329
-
330
- Write tests in src/net/tests.rs. Run them.
331
- """
332
-
333
- loop until **all networking tests pass** (max: 5):
334
- if **there are test failures**:
335
- session: hammer
336
- prompt: "Fix the networking bugs found in testing."
337
- session: quench
338
- prompt: "Re-run networking tests."
339
-
340
- resume: smith
341
- prompt: "Phase 1 complete. We can fetch pages. The ore is ready."
342
-
343
- # =============================================================================
344
- # PHASE 2: HTML PARSING - The Smelt
345
- # =============================================================================
346
-
347
- resume: smith
348
- prompt: """
349
- Phase 2: HTML Parsing
350
-
351
- Raw HTML is just text. We need to smelt it into a Document Object Model.
352
-
353
- Two stages:
354
- 1. Tokenizer: HTML text → Tokens (start tag, end tag, text, comment, etc.)
355
- 2. Parser: Tokens → DOM tree
356
-
357
- The HTML5 spec is complex, but we can simplify:
358
- - Handle well-formed HTML (don't worry about error recovery)
359
- - Support common elements: html, head, body, div, span, p, a, img, script, style
360
- - Parse attributes correctly
361
- - Handle self-closing tags
362
- - Handle text content
363
-
364
- This is where the raw ore becomes workable metal.
365
- """
366
-
367
- let html_tokenizer_design = session: smelter
368
- prompt: """
369
- Design the HTML tokenizer.
370
-
371
- Reference: https://html.spec.whatwg.org/multipage/parsing.html#tokenization
372
-
373
- Simplified state machine:
374
- - Data state (default)
375
- - Tag open state
376
- - Tag name state
377
- - Attribute name state
378
- - Attribute value state (quoted and unquoted)
379
- - Self-closing state
380
- - Comment state
381
-
382
- Tokens:
383
- - DOCTYPE
384
- - StartTag { name, attributes, self_closing }
385
- - EndTag { name }
386
- - Character { data }
387
- - Comment { data }
388
- - EndOfFile
389
-
390
- Output Rust types and state machine transitions.
391
- """
392
-
393
- session: hammer
394
- prompt: """
395
- Implement the HTML tokenizer.
396
-
397
- File: src/html/tokenizer.rs
398
-
399
- Create a streaming tokenizer that yields tokens.
400
- Handle:
401
- - Basic tags: <div>, </div>
402
- - Attributes: <div class="foo" id="bar">
403
- - Self-closing: <br/>, <img src="x"/>
404
- - Text content
405
- - Comments: <!-- comment -->
406
- - Script/style raw text mode
407
-
408
- Make it work for real HTML from example.com.
409
- """
410
- context: html_tokenizer_design
411
-
412
- let html_parser_design = session: smelter
413
- prompt: """
414
- Design the HTML parser (tree builder).
415
-
416
- Input: Token stream
417
- Output: DOM tree
418
-
419
- DOM types:
420
- - Document (root)
421
- - Element { tag_name, attributes, children }
422
- - Text { content }
423
- - Comment { content }
424
-
425
- Tree building algorithm (simplified):
426
- - Maintain stack of open elements
427
- - On StartTag: create element, push to stack, append to parent
428
- - On EndTag: pop from stack (with simple matching)
429
- - On Character: create/extend text node, append to current element
430
- - On Comment: create comment, append to current element
431
-
432
- Handle implicit closing (</p> can close <p>).
433
- """
434
-
435
- session: hammer
436
- prompt: """
437
- Implement the HTML parser.
438
-
439
- File: src/html/parser.rs
440
- File: src/html/dom.rs
441
-
442
- DOM types go in dom.rs. Parser goes in parser.rs.
443
-
444
- Create:
445
- - Node enum (Document, Element, Text, Comment)
446
- - Element struct with children, parent references (use indices, not Rc)
447
- - Document struct that owns all nodes
448
- - Parser that builds the tree
449
-
450
- Handle the quirks: <p> closing, void elements, etc.
451
- """
452
- context: html_parser_design
453
-
454
- session: quench
455
- prompt: """
456
- Test HTML parsing:
457
-
458
- Test cases:
459
- 1. Minimal: <html><head></head><body>Hello</body></html>
460
- 2. Nested: <div><div><div>Deep</div></div></div>
461
- 3. Attributes: <a href="https://example.com" class="link">Link</a>
462
- 4. Self-closing: <br/><img src="x"/><input type="text"/>
463
- 5. Comments: <!-- this is a comment -->
464
- 6. Text nodes: <p>Hello <strong>world</strong>!</p>
465
- 7. Real page: parse the HTML from https://example.com
466
-
467
- Write tests. Verify the DOM tree is correct.
468
- """
469
-
470
- loop until **all HTML parsing tests pass** (max: 5):
471
- if **there are test failures**:
472
- session: hammer
473
- prompt: "Fix the HTML parsing bugs."
474
- session: quench
475
- prompt: "Re-run HTML parsing tests."
476
-
477
- resume: smith
478
- prompt: "Phase 2 complete. We can parse HTML into a DOM. The smelt is done."
479
-
480
- # =============================================================================
481
- # PHASE 3: CSS PARSING - The Alloy
482
- # =============================================================================
483
-
484
- resume: smith
485
- prompt: """
486
- Phase 3: CSS Parsing
487
-
488
- A DOM without styles is shapeless metal. CSS gives it form.
489
-
490
- Two stages:
491
- 1. Tokenizer: CSS text → Tokens
492
- 2. Parser: Tokens → Stylesheet (rules, selectors, declarations)
493
-
494
- We need enough CSS to render real pages:
495
- - Type selectors: div, p, a
496
- - Class selectors: .class
497
- - ID selectors: #id
498
- - Combinators: descendant, child, sibling
499
- - Properties: display, color, background, margin, padding, border, width, height, font-size
500
-
501
- This is the alloy that strengthens the blade.
502
- """
503
-
504
- let css_tokenizer_design = session: smelter
505
- prompt: """
506
- Design the CSS tokenizer.
507
-
508
- Reference: https://www.w3.org/TR/css-syntax-3/#tokenization
509
-
510
- Token types:
511
- - Ident
512
- - Function
513
- - AtKeyword
514
- - Hash
515
- - String
516
- - Number
517
- - Dimension
518
- - Percentage
519
- - Whitespace
520
- - Colon, Semicolon, Comma
521
- - Braces, Parens, Brackets
522
- - Delim (any other character)
523
-
524
- Output Rust types and tokenization rules.
525
- """
526
-
527
- session: hammer
528
- prompt: """
529
- Implement the CSS tokenizer.
530
-
531
- File: src/css/tokenizer.rs
532
-
533
- Handle real CSS syntax including:
534
- - Identifiers: color, background-color
535
- - Numbers: 10, 3.14, -5
536
- - Dimensions: 10px, 2em, 100%
537
- - Strings: "hello", 'world'
538
- - Hash: #fff, #header
539
- - Functions: rgb(255, 0, 0)
540
- """
541
- context: css_tokenizer_design
542
-
543
- let css_parser_design = session: smelter
544
- prompt: """
545
- Design the CSS parser.
546
-
547
- CSSOM types:
548
- - Stylesheet { rules }
549
- - Rule { selectors, declarations }
550
- - Selector (type, class, id, combinator)
551
- - Declaration { property, value }
552
- - Value (keyword, length, color, number, etc.)
553
-
554
- Parser produces a Stylesheet from the token stream.
555
-
556
- Selector parsing:
557
- - Simple: div, .class, #id
558
- - Compound: div.class#id
559
- - Complex: div > p, div p, div + p, div ~ p
560
-
561
- Declaration parsing:
562
- - Property: identifier
563
- - Value: sequence of tokens until ; or }
564
- """
565
-
566
- session: hammer
567
- prompt: """
568
- Implement the CSS parser.
569
-
570
- File: src/css/parser.rs
571
- File: src/css/cssom.rs
572
-
573
- Handle:
574
- - Rule sets: selector { declarations }
575
- - Multiple selectors: h1, h2, h3 { ... }
576
- - Various value types: keywords, lengths, colors, functions
577
- - Shorthand properties (margin: 10px = all four sides)
578
- """
579
- context: css_parser_design
580
-
581
- session: quench
582
- prompt: """
583
- Test CSS parsing:
584
-
585
- Test cases:
586
- 1. Simple rule: div { color: red; }
587
- 2. Multiple selectors: h1, h2 { font-size: 24px; }
588
- 3. Class and ID: .class { } #id { }
589
- 4. Combinators: div > p { }, div p { }
590
- 5. Complex values: margin: 10px 20px; background-color: rgb(255, 0, 0);
591
- 6. Real stylesheet: parse a basic CSS file
592
-
593
- Write tests. Verify the CSSOM is correct.
594
- """
595
-
596
- loop until **all CSS parsing tests pass** (max: 5):
597
- if **there are test failures**:
598
- session: hammer
599
- prompt: "Fix the CSS parsing bugs."
600
- session: quench
601
- prompt: "Re-run CSS parsing tests."
602
-
603
- resume: smith
604
- prompt: "Phase 3 complete. We can parse CSS. The alloy is mixed."
605
-
606
- # =============================================================================
607
- # PHASE 4: STYLE RESOLUTION - The Shape
608
- # =============================================================================
609
-
610
- resume: smith
611
- prompt: """
612
- Phase 4: Style Resolution
613
-
614
- We have a DOM. We have styles. Now we must match them.
615
-
616
- For each element in the DOM:
617
- 1. Find all rules whose selectors match this element
618
- 2. Apply the cascade (specificity, order)
619
- 3. Inherit from parent where appropriate
620
- 4. Apply default values for anything unset
621
-
622
- This gives us a "computed style" for every element.
623
- This is where the blade takes its shape.
624
- """
625
-
626
- let style_design = session: smelter
627
- prompt: """
628
- Design the style resolution system.
629
-
630
- Components:
631
- 1. Selector matching: does this selector match this element?
632
- 2. Specificity calculation: (id count, class count, type count)
633
- 3. Cascade: sort matching rules by specificity, then order
634
- 4. Inheritance: some properties inherit (color), some don't (border)
635
- 5. Initial values: defaults for unset properties
636
-
637
- ComputedStyle struct:
638
- - display: DisplayType (block, inline, none)
639
- - position: Position (static, relative, absolute)
640
- - width, height: Dimension (auto, length)
641
- - margin, padding, border: Sides<Dimension>
642
- - color, background_color: Color
643
- - font_size: Length
644
- - (add more as needed)
645
-
646
- The matcher should be efficient - it runs for every element.
647
- """
648
-
649
- session: hammer
650
- prompt: """
651
- Implement style resolution.
652
-
653
- File: src/css/selector.rs (selector matching)
654
- File: src/style/cascade.rs (cascade and specificity)
655
- File: src/style/computed.rs (ComputedStyle and inheritance)
656
-
657
- Create:
658
- - SelectorMatcher that can test if a selector matches an element
659
- - Specificity calculation
660
- - Cascade resolver that takes DOM + Stylesheets → styled DOM
661
- - Inheritance and default values
662
- """
663
- context: style_design
664
-
665
- session: quench
666
- prompt: """
667
- Test style resolution:
668
-
669
- Test cases:
670
- 1. Type selector matches: div matches <div>
671
- 2. Class selector: .foo matches <div class="foo">
672
- 3. ID selector: #bar matches <div id="bar">
673
- 4. Specificity: #id beats .class beats type
674
- 5. Cascade order: later rule wins at equal specificity
675
- 6. Inheritance: color inherits, border doesn't
676
- 7. Defaults: display defaults to inline for span, block for div
677
-
678
- Write tests with DOM + CSS → expected computed styles.
679
- """
680
-
681
- loop until **all style resolution tests pass** (max: 5):
682
- if **there are test failures**:
683
- session: hammer
684
- prompt: "Fix the style resolution bugs."
685
- session: quench
686
- prompt: "Re-run style resolution tests."
687
-
688
- resume: smith
689
- prompt: "Phase 4 complete. Elements have computed styles. The shape emerges."
690
-
691
- # =============================================================================
692
- # PHASE 5: LAYOUT - The Forge
693
- # =============================================================================
694
-
695
- resume: smith
696
- prompt: """
697
- Phase 5: Layout
698
-
699
- The heart of a browser. Where the real forging happens.
700
-
701
- Layout takes a styled DOM and produces a "layout tree" - boxes with
702
- positions and sizes in pixels.
703
-
704
- Components:
705
- 1. Box generation: DOM elements → layout boxes
706
- 2. Block layout: vertical stacking with margins
707
- 3. Inline layout: horizontal flow with line breaking
708
- 4. Text layout: measuring and positioning text
709
-
710
- This is complex. We'll start simple:
711
- - Block layout only (no inline/text initially)
712
- - Then add inline and text
713
-
714
- The blade is taking its final form.
715
- """
716
-
717
- let layout_design = session: smelter
718
- prompt: """
719
- Design the layout engine.
720
-
721
- Box types:
722
- - BlockBox: vertical stacking (div, p, etc.)
723
- - InlineBox: horizontal flow (span, a, etc.)
724
- - TextRun: actual text content
725
- - AnonymousBlock: for mixed block/inline content
726
-
727
- LayoutBox struct:
728
- - box_type: BoxType
729
- - dimensions: Dimensions { content, padding, border, margin }
730
- - position: Point { x, y }
731
- - children: Vec<LayoutBox>
732
-
733
- Layout algorithm (simplified):
734
- 1. Build box tree from styled DOM
735
- 2. Block layout:
736
- - Calculate available width from parent
737
- - Layout children top-to-bottom
738
- - Height is sum of children heights (or specified)
739
- - Handle margin collapsing
740
- 3. Inline layout:
741
- - Flow boxes horizontally
742
- - Break lines when exceeding width
743
- - Vertical alignment within lines
744
-
745
- Output the types and algorithms.
746
- """
747
-
748
- session: hammer
749
- prompt: """
750
- Implement the layout engine.
751
-
752
- File: src/layout/box_model.rs (box types and dimensions)
753
- File: src/layout/block.rs (block layout)
754
- File: src/layout/inline.rs (inline layout)
755
- File: src/layout/text.rs (text measurement)
756
- File: src/layout/mod.rs (main entry point)
757
-
758
- Start with block layout only. Make nested divs work.
759
- Then add inline and text.
760
-
761
- Viewport size: 800x600 for now (we'll make it dynamic later).
762
- """
763
- context: layout_design
764
-
765
- session: quench
766
- prompt: """
767
- Test layout:
768
-
769
- Test cases:
770
- 1. Single div with fixed width/height
771
- 2. Nested divs (parent constrains child)
772
- 3. Auto width (fills parent)
773
- 4. Auto height (fits content)
774
- 5. Margin, padding, border (box model)
775
- 6. Margin collapsing between siblings
776
- 7. Block in inline (anonymous block generation)
777
-
778
- Verify box positions and dimensions are correct.
779
- """
780
-
781
- loop until **all layout tests pass** (max: 5):
782
- if **there are test failures**:
783
- session: hammer
784
- prompt: "Fix the layout bugs."
785
- session: quench
786
- prompt: "Re-run layout tests."
787
-
788
- resume: smith
789
- prompt: "Phase 5 complete. We have a layout tree. The blade is forged."
790
-
791
- # =============================================================================
792
- # PHASE 6: PAINTING - The Polish
793
- # =============================================================================
794
-
795
- resume: smith
796
- prompt: """
797
- Phase 6: Painting
798
-
799
- The blade is forged. Now we polish it to a mirror shine.
800
-
801
- Painting turns a layout tree into pixels:
802
- 1. Build a display list (paint commands)
803
- 2. Rasterize the display list to a pixel buffer
804
- 3. Show the pixel buffer on screen
805
-
806
- We're using softbuffer for direct pixel access. No GPU acceleration.
807
- Simple but it works.
808
- """
809
-
810
- let paint_design = session: smelter
811
- prompt: """
812
- Design the painting system.
813
-
814
- Display list commands:
815
- - FillRect { rect, color }
816
- - DrawBorder { rect, widths, colors }
817
- - DrawText { text, position, font_size, color }
818
- - PushClip { rect }
819
- - PopClip
820
-
821
- Rasterizer:
822
- - Input: display list + viewport size
823
- - Output: pixel buffer (Vec<u32> in ARGB format)
824
-
825
- For text, use a simple bitmap font (8x16 pixels per character).
826
- We don't need fancy fonts for MVP.
827
-
828
- Paint order:
829
- 1. Background
830
- 2. Borders
831
- 3. Text/content
832
- 4. Children (recursive)
833
- """
834
-
835
- session: hammer
836
- prompt: """
837
- Implement the painting system.
838
-
839
- File: src/paint/display_list.rs (display list types)
840
- File: src/paint/rasterizer.rs (pixel buffer rendering)
841
- File: src/paint/font.rs (simple bitmap font)
842
-
843
- Create:
844
- - DisplayList with paint commands
845
- - Build display list from layout tree
846
- - Rasterize display list to ARGB pixel buffer
847
- - Simple 8x16 bitmap font for ASCII text
848
- """
849
- context: paint_design
850
-
851
- session: hammer
852
- prompt: """
853
- Implement the window system.
854
-
855
- File: src/shell/window.rs (winit + softbuffer integration)
856
- File: src/shell/events.rs (event handling)
857
- File: src/main.rs (main entry point)
858
-
859
- Create a window that:
860
- 1. Opens with winit
861
- 2. Gets a pixel buffer with softbuffer
862
- 3. Renders our pixel buffer to the window
863
- 4. Handles close events
864
-
865
- Test: draw a colored rectangle on screen.
866
- """
867
-
868
- session: quench
869
- prompt: """
870
- Test painting:
871
-
872
- Test cases:
873
- 1. Solid color background
874
- 2. Nested boxes with different colors
875
- 3. Borders (all four sides)
876
- 4. Text rendering (basic ASCII)
877
- 5. Full pipeline: HTML → DOM → Style → Layout → Paint → Window
878
-
879
- The window should show something! Verify visually.
880
- """
881
-
882
- loop until **the painting pipeline works** (max: 5):
883
- if **there are issues**:
884
- session: hammer
885
- prompt: "Fix the painting issues."
886
- session: quench
887
- prompt: "Re-test painting."
888
-
889
- resume: smith
890
- prompt: "Phase 6 complete. We can render to a window. The blade shines."
891
-
892
- # =============================================================================
893
- # PHASE 7: JAVASCRIPT - The Fire
894
- # =============================================================================
895
-
896
- resume: smith
897
- prompt: """
898
- Phase 7: JavaScript
899
-
900
- This is where browsers separate from mere HTML viewers.
901
- The JavaScript engine is the fire that brings the blade to life.
902
-
903
- We're not building V8. We're building something that works:
904
- - Lexer: JS source → tokens
905
- - Parser: tokens → AST
906
- - Compiler: AST → bytecode
907
- - VM: execute bytecode
908
- - Builtins: Object, Array, Function, String, Number, console.log
909
-
910
- This is the hottest part of The Forge. The Crucible takes the lead.
911
- """
912
-
913
- # The Crucible handles the JS engine
914
- session: crucible
915
- prompt: """
916
- The Crucible fires up for the JavaScript engine.
917
-
918
- We're building a JS interpreter in Rust. Not a JIT compiler - just
919
- an interpreter. But it needs to run real JavaScript.
920
-
921
- Scope:
922
- - Variables: let, const, var
923
- - Functions: declaration, expression, arrow
924
- - Objects: literals, property access, methods
925
- - Arrays: literals, indexing, methods
926
- - Control flow: if, for, while, switch
927
- - Operators: arithmetic, comparison, logical
928
- - Strings and numbers
929
- - console.log for output
930
- - Basic DOM manipulation (later)
931
-
932
- What we're NOT building:
933
- - Classes (use prototypes directly)
934
- - async/await, generators, promises
935
- - Regular expressions (skip for MVP)
936
- - Modules (single script only)
937
-
938
- Let's start with the lexer.
939
- """
940
-
941
- let js_lexer_design = session: smelter
942
- prompt: """
943
- Design the JavaScript lexer.
944
-
945
- Reference: ECMA-262 (but simplified)
946
-
947
- Token types:
948
- - Identifiers: foo, bar, console
949
- - Keywords: let, const, var, function, if, else, for, while, return, etc.
950
- - Literals: numbers (42, 3.14), strings ("hello"), booleans (true, false), null
951
- - Operators: + - * / % = == === != !== < > <= >= && || ! ++ --
952
- - Punctuation: ( ) { } [ ] ; , . : ?
953
- - Comments: // and /* */
954
-
955
- Handle:
956
- - Unicode identifiers (at least ASCII letters)
957
- - Automatic semicolon insertion (ASI) - track newlines
958
-
959
- Output token types and lexer state machine.
960
- """
961
-
962
- session: hammer
963
- prompt: """
964
- Implement the JavaScript lexer.
965
-
966
- File: src/js/lexer.rs
967
-
968
- Create a lexer that produces tokens from JS source.
969
- Handle all the token types from the design.
970
- Track line/column for error messages.
971
- """
972
- context: js_lexer_design
973
-
974
- let js_parser_design = session: smelter
975
- prompt: """
976
- Design the JavaScript parser.
977
-
978
- Reference: ECMA-262 (simplified)
979
-
980
- AST node types:
981
- - Program { statements }
982
- - Statements: VarDecl, FunctionDecl, ExprStmt, If, For, While, Return, Block
983
- - Expressions: Identifier, Literal, Binary, Unary, Call, Member, Assignment, Object, Array, Function
984
-
985
- Parser approach: recursive descent (Pratt parsing for expressions)
986
-
987
- Handle:
988
- - Operator precedence
989
- - Associativity
990
- - Expression vs statement context
991
- - Function hoisting (not strict mode)
992
-
993
- Output AST types and parser structure.
994
- """
995
-
996
- session: hammer
997
- prompt: """
998
- Implement the JavaScript parser.
999
-
1000
- File: src/js/parser.rs
1001
- File: src/js/ast.rs
1002
-
1003
- Create AST types in ast.rs.
1004
- Create recursive descent parser in parser.rs.
1005
- Use Pratt parsing for expression precedence.
1006
-
1007
- Test: parse console.log("Hello, World!");
1008
- """
1009
- context: js_parser_design
1010
-
1011
- resume: crucible
1012
- prompt: """
1013
- Lexer and parser are done. Now the real work: execution.
1014
-
1015
- We have two choices:
1016
- 1. Tree-walking interpreter (simple but slow)
1017
- 2. Bytecode compiler + VM (more complex but faster)
1018
-
1019
- We'll do bytecode. It's more interesting and teaches more.
1020
-
1021
- Components:
1022
- - Value type: JS values (number, string, object, function, etc.)
1023
- - Compiler: AST → bytecode
1024
- - VM: execute bytecode with a stack
1025
- - Heap: objects live here
1026
- - GC: garbage collection (mark-sweep is fine)
1027
- """
1028
-
1029
- let js_value_design = session: smelter
1030
- prompt: """
1031
- Design JavaScript value representation.
1032
-
1033
- Value enum (NaN-boxed or tagged union):
1034
- - Number(f64)
1035
- - String(StringId)
1036
- - Boolean(bool)
1037
- - Null
1038
- - Undefined
1039
- - Object(ObjectId)
1040
- - Function(FunctionId)
1041
-
1042
- Object representation (property map):
1043
- - properties: HashMap<String, Value>
1044
- - prototype: Option<ObjectId>
1045
-
1046
- Function representation:
1047
- - kind: Native | Bytecode
1048
- - bytecode: Vec<u8> (if bytecode)
1049
- - native: fn pointer (if native)
1050
- - closure: captured variables
1051
-
1052
- String interning for memory efficiency.
1053
- """
1054
-
1055
- session: hammer
1056
- prompt: """
1057
- Implement JavaScript values.
1058
-
1059
- File: src/js/value.rs
1060
- File: src/js/gc.rs (simple mark-sweep GC)
1061
-
1062
- Create:
1063
- - Value enum with all JS types
1064
- - Object struct with properties and prototype
1065
- - Heap that owns all objects
1066
- - Simple mark-sweep garbage collector
1067
-
1068
- The GC doesn't need to be fancy. Just functional.
1069
- """
1070
- context: js_value_design
1071
-
1072
- let js_bytecode_design = session: smelter
1073
- prompt: """
1074
- Design the bytecode instruction set.
1075
-
1076
- Opcodes (stack-based VM):
1077
- - Constants: LoadConst, LoadTrue, LoadFalse, LoadNull, LoadUndefined
1078
- - Variables: GetLocal, SetLocal, GetGlobal, SetGlobal
1079
- - Objects: GetProperty, SetProperty, CreateObject, CreateArray
1080
- - Arithmetic: Add, Sub, Mul, Div, Mod, Neg
1081
- - Comparison: Eq, StrictEq, Lt, Lte, Gt, Gte
1082
- - Logic: Not, And, Or
1083
- - Control: Jump, JumpIfFalse, JumpIfTrue
1084
- - Functions: Call, Return, CreateFunction
1085
- - Stack: Pop, Dup
1086
-
1087
- Bytecode format:
1088
- - 1 byte opcode
1089
- - Variable-length operands
1090
-
1091
- Compiler output:
1092
- - bytecode: Vec<u8>
1093
- - constants: Vec<Value>
1094
- - local_count: usize
1095
- """
1096
-
1097
- session: hammer
1098
- prompt: """
1099
- Implement the bytecode compiler.
1100
-
1101
- File: src/js/compiler.rs
1102
-
1103
- Compile AST to bytecode.
1104
-
1105
- Handle:
1106
- - Variable declarations and scoping
1107
- - Function declarations and expressions
1108
- - Control flow (if, for, while)
1109
- - Operators
1110
- - Function calls
1111
- - Property access
1112
-
1113
- Output: CompiledFunction { bytecode, constants, local_count }
1114
- """
1115
- context: js_bytecode_design
1116
-
1117
- session: hammer
1118
- prompt: """
1119
- Implement the JavaScript VM.
1120
-
1121
- File: src/js/vm.rs
1122
-
1123
- Stack-based virtual machine that executes bytecode.
1124
-
1125
- Components:
1126
- - Value stack
1127
- - Call stack (frames)
1128
- - Global object
1129
- - Heap for objects
1130
-
1131
- Execute each opcode. Handle errors gracefully.
1132
- Test: run console.log("Hello from JS!");
1133
- """
1134
- context: js_bytecode_design
1135
-
1136
- session: hammer
1137
- prompt: """
1138
- Implement JavaScript builtins.
1139
-
1140
- File: src/js/builtins.rs
1141
-
1142
- Essential builtins:
1143
- - Object: Object.keys(), Object.values()
1144
- - Array: push, pop, shift, unshift, map, filter, forEach, length
1145
- - String: length, charAt, substring, indexOf, split
1146
- - Number: toString, toFixed
1147
- - console: log, error, warn
1148
- - Math: floor, ceil, round, random, max, min
1149
-
1150
- Each builtin is a native function. Register them on the global object.
1151
- """
1152
-
1153
- session: quench
1154
- prompt: """
1155
- Test the JavaScript engine:
1156
-
1157
- Test cases:
1158
- 1. Variables: let x = 10; console.log(x);
1159
- 2. Functions: function add(a, b) { return a + b; } console.log(add(2, 3));
1160
- 3. Objects: let o = { x: 1 }; console.log(o.x);
1161
- 4. Arrays: let a = [1, 2, 3]; console.log(a.length);
1162
- 5. Control flow: if (true) { console.log("yes"); }
1163
- 6. Loops: for (let i = 0; i < 3; i++) { console.log(i); }
1164
- 7. Closures: function outer() { let x = 10; return function() { return x; }; }
1165
- 8. Methods: [1,2,3].map(x => x * 2)
1166
-
1167
- Run each test. Verify correct output.
1168
- """
1169
-
1170
- loop until **the JS engine passes all tests** (max: 10):
1171
- if **there are test failures**:
1172
- resume: crucible
1173
- prompt: "Analyze and fix the JS engine bugs."
1174
- session: hammer
1175
- prompt: "Implement the fixes."
1176
- context: crucible
1177
- session: quench
1178
- prompt: "Re-run JS tests."
1179
-
1180
- resume: smith
1181
- prompt: """
1182
- Phase 7 complete. We have a working JavaScript engine.
1183
- The fire burns bright. The blade lives.
1184
- """
1185
-
1186
- # =============================================================================
1187
- # PHASE 8: DOM BINDINGS - The Handle
1188
- # =============================================================================
1189
-
1190
- resume: smith
1191
- prompt: """
1192
- Phase 8: DOM Bindings
1193
-
1194
- JavaScript without DOM access is just a calculator.
1195
- We need to expose the DOM to our JS engine.
1196
-
1197
- Essential APIs:
1198
- - document.getElementById()
1199
- - document.querySelector()
1200
- - element.innerHTML
1201
- - element.style
1202
- - element.addEventListener()
1203
- - element.appendChild()
1204
-
1205
- This connects the fire to the blade. The handle that makes it usable.
1206
- """
1207
-
1208
- let bindings_design = session: smelter
1209
- prompt: """
1210
- Design the DOM bindings.
1211
-
1212
- Bridge between JS values and DOM nodes:
1213
- - Each DOM node gets a corresponding JS object
1214
- - JS object has properties/methods that call back into Rust DOM
1215
- - Changes to DOM trigger re-style/re-layout/re-paint
1216
-
1217
- Key bindings:
1218
- - window object (global)
1219
- - document object
1220
- - Element objects
1221
- - Event objects
1222
-
1223
- document methods:
1224
- - getElementById(id) → Element | null
1225
- - querySelector(selector) → Element | null
1226
- - createElement(tag) → Element
1227
-
1228
- Element properties/methods:
1229
- - innerHTML (get/set)
1230
- - style (get/set)
1231
- - children, parentElement
1232
- - getAttribute, setAttribute
1233
- - appendChild, removeChild
1234
- - addEventListener(event, handler)
1235
-
1236
- Event system:
1237
- - Event object: type, target, preventDefault, stopPropagation
1238
- - Event dispatch: capture → target → bubble
1239
- """
1240
-
1241
- session: hammer
1242
- prompt: """
1243
- Implement DOM bindings.
1244
-
1245
- File: src/bindings/mod.rs
1246
- File: src/bindings/document.rs
1247
- File: src/bindings/element.rs
1248
- File: src/bindings/console.rs
1249
-
1250
- Create JS wrappers for DOM nodes.
1251
- Wire them up to the actual DOM.
1252
- Handle the bidirectional sync.
1253
-
1254
- Test: document.getElementById('test').innerHTML = 'Modified';
1255
- """
1256
- context: bindings_design
1257
-
1258
- session: hammer
1259
- prompt: """
1260
- Implement the event system.
1261
-
1262
- File: src/bindings/events.rs
1263
- File: src/shell/events.rs (update for DOM events)
1264
-
1265
- Handle:
1266
- - addEventListener/removeEventListener
1267
- - Event dispatch (click, etc.)
1268
- - Event object creation
1269
- - Handler invocation through JS VM
1270
-
1271
- Wire window events (from winit) to DOM events.
1272
- """
1273
-
1274
- session: quench
1275
- prompt: """
1276
- Test DOM bindings:
1277
-
1278
- Test cases:
1279
- 1. document.getElementById() returns correct element
1280
- 2. element.innerHTML read/write works
1281
- 3. element.style.color = 'red' changes computed style
1282
- 4. addEventListener + click event handler runs
1283
- 5. appendChild adds child to DOM
1284
- 6. createElement + appendChild creates new elements
1285
-
1286
- Verify DOM mutations trigger re-render.
1287
- """
1288
-
1289
- loop until **DOM bindings work** (max: 5):
1290
- if **there are issues**:
1291
- session: hammer
1292
- prompt: "Fix the DOM binding issues."
1293
- session: quench
1294
- prompt: "Re-test DOM bindings."
1295
-
1296
- resume: smith
1297
- prompt: "Phase 8 complete. JavaScript can manipulate the DOM. The handle is attached."
1298
-
1299
- # =============================================================================
1300
- # PHASE 9: INTEGRATION - The Tempering
1301
- # =============================================================================
1302
-
1303
- resume: smith
1304
- prompt: """
1305
- Phase 9: Integration
1306
-
1307
- All the pieces exist. Now we temper them into one unified blade.
1308
-
1309
- The full pipeline:
1310
- 1. User enters URL
1311
- 2. Fetch HTML over HTTPS
1312
- 3. Parse HTML into DOM
1313
- 4. Find and parse CSS (inline styles, <style> tags)
1314
- 5. Find and execute JS (<script> tags)
1315
- 6. Resolve styles
1316
- 7. Compute layout
1317
- 8. Paint to pixel buffer
1318
- 9. Display in window
1319
- 10. Handle events → JS → DOM changes → re-render
1320
-
1321
- This is the final tempering. The blade becomes a weapon.
1322
- """
1323
-
1324
- session: hammer
1325
- prompt: """
1326
- Implement the browser integration.
1327
-
1328
- File: src/lib.rs (main browser struct)
1329
- File: src/main.rs (entry point)
1330
-
1331
- Create Browser struct that:
1332
- 1. Takes a URL
1333
- 2. Orchestrates the full pipeline
1334
- 3. Maintains state (DOM, styles, layout)
1335
- 4. Handles incremental updates
1336
- 5. Runs the event loop
1337
-
1338
- Create the main loop:
1339
- - Process window events
1340
- - Dispatch DOM events
1341
- - Run pending JS
1342
- - Re-layout if needed
1343
- - Re-paint if needed
1344
- - Present frame
1345
- """
1346
-
1347
- session: hammer
1348
- prompt: """
1349
- Add a URL bar.
1350
-
1351
- File: src/shell/chrome.rs
1352
-
1353
- Simple browser chrome:
1354
- - URL bar at top (text input)
1355
- - Go button
1356
- - Basic keyboard: Enter to navigate
1357
- - Display current URL
1358
-
1359
- Paint the chrome above the page content.
1360
- Handle text input for the URL bar.
1361
- """
1362
-
1363
- session: quench
1364
- prompt: """
1365
- Integration test:
1366
-
1367
- 1. Launch browser with {test_url}
1368
- 2. Page should fetch, parse, render
1369
- 3. Any JS on the page should execute
1370
- 4. Click events should work
1371
- 5. Type new URL and navigate
1372
- 6. Verify no crashes, memory leaks, or visual glitches
1373
-
1374
- This is the moment of truth.
1375
- """
1376
-
1377
- loop until **the browser works end-to-end** (max: 10):
1378
- if **there are issues**:
1379
- resume: smith
1380
- prompt: "Diagnose the integration issues. What's broken?"
1381
-
1382
- session: hammer
1383
- prompt: "Fix the integration issues."
1384
- context: smith
1385
-
1386
- session: quench
1387
- prompt: "Re-run integration tests."
1388
-
1389
- # =============================================================================
1390
- # THE BLADE IS COMPLETE
1391
- # =============================================================================
1392
-
1393
- resume: smith
1394
- prompt: """
1395
- The Forge falls silent.
1396
-
1397
- The blade is complete.
1398
-
1399
- We have built a web browser from nothing:
1400
- - Networking: HTTPS client from scratch
1401
- - Parsing: HTML, CSS, JavaScript parsers
1402
- - DOM: Full document object model
1403
- - Style: CSS cascade and computed styles
1404
- - Layout: Block and inline layout engine
1405
- - Paint: Display list rasterization
1406
- - JavaScript: Lexer, parser, compiler, VM, GC
1407
- - Bindings: DOM API exposed to JS
1408
- - Shell: Native window with event handling
1409
-
1410
- This browser can:
1411
- - Fetch pages over HTTPS
1412
- - Parse and render HTML + CSS
1413
- - Execute JavaScript
1414
- - Handle user interaction
1415
- - Navigate to new URLs
1416
-
1417
- It is not Chrome. It is not Firefox. It is ours.
1418
-
1419
- Forged from nothing. By fire. In The Forge.
1420
-
1421
- Run it: cargo run -- {test_url}
1422
-
1423
- The blade awaits its first cut.
1424
- """
1425
-
1426
- output browser = session: hammer
1427
- prompt: """
1428
- Create a README.md for the browser:
1429
-
1430
- # Browser
1431
-
1432
- A web browser built from scratch in Rust.
1433
-
1434
- ## Features
1435
- - HTTP/HTTPS networking
1436
- - HTML5 parsing
1437
- - CSS parsing and cascade
1438
- - JavaScript engine (interpreter)
1439
- - Layout engine (block + inline)
1440
- - Native window rendering
1441
-
1442
- ## Building
1443
- ```
1444
- cargo build --release
1445
- ```
1446
-
1447
- ## Running
1448
- ```
1449
- cargo run --release -- https://example.com
1450
- ```
1451
-
1452
- ## Architecture
1453
- [Brief description of each module]
1454
-
1455
- ## Limitations
1456
- [What doesn't work yet]
1457
-
1458
- ## Forged in The Forge
1459
- This browser was created by AI agents coordinating through OpenProse.
1460
- """
1461
-
1462
- session: smith
1463
- prompt: """
1464
- Final inventory of The Forge:
1465
-
1466
- Files created: [list all .rs files]
1467
- Lines of code: [count]
1468
- Components: [list all major components]
1469
- Test coverage: [summary]
1470
-
1471
- The forge cools. The blade rests. Ready for use.
1472
-
1473
- 🔥 END TRANSMISSION 🔥
1474
- """