agenttwin 0.3.21 → 0.3.23

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 (411) hide show
  1. package/dist/api.js +2113 -609
  2. package/dist/dashboard/assets/dashboard/agent-home.css +7 -7
  3. package/dist/dashboard/assets/dashboard/bay-morning.webp +0 -0
  4. package/dist/dashboard/assets/dashboard/golden-gate-afternoon.webp +0 -0
  5. package/dist/dashboard/assets/dashboard/golden-gate-portrait.webp +0 -0
  6. package/dist/dashboard/assets/dashboard/moonlit-coast.webp +0 -0
  7. package/dist/dashboard/assets/next/static/chunks/{1250-7571b1a697f6bb4a.js → 1250-a3c859fd20517500.js} +1 -1
  8. package/dist/dashboard/assets/next/static/chunks/{2743-a0efd6f4aeb11cc5.js → 2743-72610a5d5a3f8462.js} +1 -1
  9. package/dist/dashboard/assets/next/static/chunks/5663-403316746afad10e.js +1 -0
  10. package/dist/dashboard/assets/next/static/chunks/app/dashboard/{page-9c11295678539a5f.js → page-0e0392368e0a891e.js} +1 -1
  11. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-4981ea4966b19e3e.js +1 -0
  12. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-dd4ac0f5f36e6bfa.js +1 -0
  13. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/{page-34574448d210c775.js → page-de0fe6d84be21e6a.js} +1 -1
  14. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-360cbffc57981f6b.js +1 -0
  15. package/dist/dashboard/assets/next/static/chunks/app/v2/page-fc4df4912ce3af44.js +1 -0
  16. package/dist/dashboard/assets/next/static/chunks/{webpack-40324749d289e4a5.js → webpack-9e40ef55e5f2fb53.js} +1 -1
  17. package/dist/dashboard/assets/next/static/css/{42045de5f39b50ca.css → 37d81e1d2804cc5f.css} +1 -1
  18. package/dist/dashboard/assets/next/static/css/69ec1bae997c3bb0.css +1 -0
  19. package/dist/dashboard/assets/next/static/css/ad85402a1595e56e.css +1 -0
  20. package/dist/dashboard/assets/next/static/css/{4bbe78c2fe206b92.css → da981fb878a02b8c.css} +1 -1
  21. package/dist/dashboard/assets/next/static/media/bay-morning.82669113.webp +0 -0
  22. package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.0aa49492.webp +0 -0
  23. package/dist/dashboard/assets/next/static/media/golden-gate-portrait.89fc667a.webp +0 -0
  24. package/dist/dashboard/assets/next/static/media/moonlit-coast.09739ef4.webp +0 -0
  25. package/dist/dashboard/index.html +2 -2
  26. package/dist/engine.js +6386 -4974
  27. package/dist/gateway.js +2194 -604
  28. package/dist/twins/catalog.json +6020 -0
  29. package/dist/twins/engine/v2/THIRD-PARTY.txt +25 -0
  30. package/dist/twins/engine/v2/chunks/2CHBP57N.mjs +8 -0
  31. package/dist/twins/engine/v2/chunks/4CPL6MPF.mjs +30 -0
  32. package/dist/twins/engine/v2/chunks/OYLYKZGD.mjs +2 -0
  33. package/dist/twins/engine/v2/chunks/SQSP35HM.mjs +38 -0
  34. package/dist/twins/engine/v2/chunks/YSJQQVUM.mjs +2 -0
  35. package/dist/twins/engine/v2/react-dom_client.mjs +272 -0
  36. package/dist/twins/engine/v2/react-dom_server.mjs +263 -0
  37. package/dist/twins/engine/v2/react.mjs +2 -0
  38. package/dist/twins/engine/v2/react_jsx-runtime.mjs +31 -0
  39. package/dist/twins/engine/v2/volter_world-core.mjs +195 -0
  40. package/dist/twins/engine/v2/volter_world-core_app-route.mjs +2 -0
  41. package/dist/twins/engine/v2/volter_world-core_network-policy.mjs +2 -0
  42. package/dist/twins/engine/v3/THIRD-PARTY.txt +65 -0
  43. package/dist/twins/engine/v3/chunks/2CHBP57N.mjs +8 -0
  44. package/dist/twins/engine/v3/chunks/2YSSPA5O.mjs +65 -0
  45. package/dist/twins/engine/v3/chunks/5PWRY4UK.mjs +154 -0
  46. package/dist/twins/engine/v3/chunks/7XRKSFFJ.mjs +2 -0
  47. package/dist/twins/engine/v3/chunks/AWOWH2H5.mjs +2 -0
  48. package/dist/twins/engine/v3/chunks/C46M5U3Q.mjs +2 -0
  49. package/dist/twins/engine/v3/chunks/MFH2VZPP.mjs +2 -0
  50. package/dist/twins/engine/v3/chunks/MWCO5UV3.mjs +2 -0
  51. package/dist/twins/engine/v3/chunks/N5BL5RDF.mjs +313 -0
  52. package/dist/twins/engine/v3/chunks/O7HGPMXG.mjs +2 -0
  53. package/dist/twins/engine/v3/chunks/OYLYKZGD.mjs +2 -0
  54. package/dist/twins/engine/v3/chunks/PLB7HTON.mjs +8 -0
  55. package/dist/twins/engine/v3/chunks/TY4LDBVH.mjs +7 -0
  56. package/dist/twins/engine/v3/chunks/VDIRUSCM.mjs +2 -0
  57. package/dist/twins/engine/v3/chunks/WGUCFQK6.mjs +2 -0
  58. package/dist/twins/engine/v3/chunks/WPATONSC.mjs +2 -0
  59. package/dist/twins/engine/v3/react_jsx-runtime.mjs +2 -0
  60. package/dist/twins/engine/v3/volter_world-core.mjs +2 -0
  61. package/dist/twins/engine/v3/volter_world-ui.mjs +559 -0
  62. package/dist/twins/packs/ahrefs/LICENSE +202 -0
  63. package/dist/twins/packs/ahrefs/NOTICE +7 -0
  64. package/dist/twins/packs/ahrefs/index.mjs +2 -0
  65. package/dist/twins/packs/ai-gateway/LICENSE +202 -0
  66. package/dist/twins/packs/ai-gateway/NOTICE +7 -0
  67. package/dist/twins/packs/ai-gateway/index.mjs +14 -0
  68. package/dist/twins/packs/airtable/LICENSE +202 -0
  69. package/dist/twins/packs/airtable/NOTICE +7 -0
  70. package/dist/twins/packs/airtable/index.mjs +2 -0
  71. package/dist/twins/packs/algolia/LICENSE +202 -0
  72. package/dist/twins/packs/algolia/NOTICE +7 -0
  73. package/dist/twins/packs/algolia/index.mjs +2 -0
  74. package/dist/twins/packs/ambientcg/LICENSE +202 -0
  75. package/dist/twins/packs/ambientcg/NOTICE +7 -0
  76. package/dist/twins/packs/ambientcg/index.mjs +2 -0
  77. package/dist/twins/packs/anthropic/LICENSE +202 -0
  78. package/dist/twins/packs/anthropic/NOTICE +7 -0
  79. package/dist/twins/packs/anthropic/index.mjs +18 -0
  80. package/dist/twins/packs/assemblyai/LICENSE +202 -0
  81. package/dist/twins/packs/assemblyai/NOTICE +7 -0
  82. package/dist/twins/packs/assemblyai/index.mjs +11 -0
  83. package/dist/twins/packs/aws/LICENSE +202 -0
  84. package/dist/twins/packs/aws/NOTICE +7 -0
  85. package/dist/twins/packs/aws/index.mjs +2 -0
  86. package/dist/twins/packs/azure/LICENSE +202 -0
  87. package/dist/twins/packs/azure/NOTICE +7 -0
  88. package/dist/twins/packs/azure/index.mjs +38 -0
  89. package/dist/twins/packs/azureformrecognizer/LICENSE +202 -0
  90. package/dist/twins/packs/azureformrecognizer/NOTICE +7 -0
  91. package/dist/twins/packs/azureformrecognizer/index.mjs +3 -0
  92. package/dist/twins/packs/bitly/LICENSE +202 -0
  93. package/dist/twins/packs/bitly/NOTICE +7 -0
  94. package/dist/twins/packs/bitly/index.mjs +2 -0
  95. package/dist/twins/packs/bluesky/LICENSE +202 -0
  96. package/dist/twins/packs/bluesky/NOTICE +7 -0
  97. package/dist/twins/packs/bluesky/index.mjs +30 -0
  98. package/dist/twins/packs/calcom/LICENSE +202 -0
  99. package/dist/twins/packs/calcom/NOTICE +7 -0
  100. package/dist/twins/packs/calcom/index.mjs +2 -0
  101. package/dist/twins/packs/clerk/LICENSE +202 -0
  102. package/dist/twins/packs/clerk/NOTICE +7 -0
  103. package/dist/twins/packs/clerk/index.mjs +5 -0
  104. package/dist/twins/packs/cloudflare/LICENSE +202 -0
  105. package/dist/twins/packs/cloudflare/NOTICE +7 -0
  106. package/dist/twins/packs/cloudflare/index.mjs +79 -0
  107. package/dist/twins/packs/cohere/LICENSE +202 -0
  108. package/dist/twins/packs/cohere/NOTICE +7 -0
  109. package/dist/twins/packs/cohere/index.mjs +2 -0
  110. package/dist/twins/packs/datadog/LICENSE +202 -0
  111. package/dist/twins/packs/datadog/NOTICE +7 -0
  112. package/dist/twins/packs/datadog/index.mjs +3 -0
  113. package/dist/twins/packs/deepinfra/LICENSE +202 -0
  114. package/dist/twins/packs/deepinfra/NOTICE +7 -0
  115. package/dist/twins/packs/deepinfra/index.mjs +13 -0
  116. package/dist/twins/packs/deepseek/LICENSE +202 -0
  117. package/dist/twins/packs/deepseek/NOTICE +7 -0
  118. package/dist/twins/packs/deepseek/index.mjs +12 -0
  119. package/dist/twins/packs/discord/LICENSE +202 -0
  120. package/dist/twins/packs/discord/NOTICE +7 -0
  121. package/dist/twins/packs/discord/index.mjs +2 -0
  122. package/dist/twins/packs/duckduckgo/LICENSE +202 -0
  123. package/dist/twins/packs/duckduckgo/NOTICE +7 -0
  124. package/dist/twins/packs/duckduckgo/index.mjs +532 -0
  125. package/dist/twins/packs/dynadot/LICENSE +202 -0
  126. package/dist/twins/packs/dynadot/NOTICE +7 -0
  127. package/dist/twins/packs/dynadot/index.mjs +2 -0
  128. package/dist/twins/packs/e2b/LICENSE +202 -0
  129. package/dist/twins/packs/e2b/NOTICE +7 -0
  130. package/dist/twins/packs/e2b/index.mjs +2 -0
  131. package/dist/twins/packs/elevenlabs/LICENSE +202 -0
  132. package/dist/twins/packs/elevenlabs/NOTICE +7 -0
  133. package/dist/twins/packs/elevenlabs/index.mjs +4 -0
  134. package/dist/twins/packs/expo/LICENSE +202 -0
  135. package/dist/twins/packs/expo/NOTICE +7 -0
  136. package/dist/twins/packs/expo/index.mjs +2 -0
  137. package/dist/twins/packs/fal/LICENSE +202 -0
  138. package/dist/twins/packs/fal/NOTICE +7 -0
  139. package/dist/twins/packs/fal/index.mjs +2 -0
  140. package/dist/twins/packs/figma/LICENSE +202 -0
  141. package/dist/twins/packs/figma/NOTICE +7 -0
  142. package/dist/twins/packs/figma/index.mjs +2 -0
  143. package/dist/twins/packs/firecrawl/LICENSE +202 -0
  144. package/dist/twins/packs/firecrawl/NOTICE +7 -0
  145. package/dist/twins/packs/firecrawl/index.mjs +9 -0
  146. package/dist/twins/packs/fireworks/LICENSE +202 -0
  147. package/dist/twins/packs/fireworks/NOTICE +7 -0
  148. package/dist/twins/packs/fireworks/index.mjs +13 -0
  149. package/dist/twins/packs/fly/LICENSE +202 -0
  150. package/dist/twins/packs/fly/NOTICE +7 -0
  151. package/dist/twins/packs/fly/index.mjs +2 -0
  152. package/dist/twins/packs/gcs/LICENSE +202 -0
  153. package/dist/twins/packs/gcs/NOTICE +7 -0
  154. package/dist/twins/packs/gcs/index.mjs +8 -0
  155. package/dist/twins/packs/gemini/LICENSE +202 -0
  156. package/dist/twins/packs/gemini/NOTICE +7 -0
  157. package/dist/twins/packs/gemini/index.mjs +7 -0
  158. package/dist/twins/packs/github/LICENSE +202 -0
  159. package/dist/twins/packs/github/NOTICE +7 -0
  160. package/dist/twins/packs/github/index.mjs +75153 -0
  161. package/dist/twins/packs/googleads/LICENSE +202 -0
  162. package/dist/twins/packs/googleads/NOTICE +7 -0
  163. package/dist/twins/packs/googleads/index.mjs +3 -0
  164. package/dist/twins/packs/googlemaps/LICENSE +202 -0
  165. package/dist/twins/packs/googlemaps/NOTICE +7 -0
  166. package/dist/twins/packs/googlemaps/index.mjs +2 -0
  167. package/dist/twins/packs/googleoauth/LICENSE +202 -0
  168. package/dist/twins/packs/googleoauth/NOTICE +7 -0
  169. package/dist/twins/packs/googleoauth/index.mjs +2 -0
  170. package/dist/twins/packs/hackernews/LICENSE +202 -0
  171. package/dist/twins/packs/hackernews/NOTICE +7 -0
  172. package/dist/twins/packs/hackernews/index.mjs +35 -0
  173. package/dist/twins/packs/huggingface/LICENSE +202 -0
  174. package/dist/twins/packs/huggingface/NOTICE +7 -0
  175. package/dist/twins/packs/huggingface/index.mjs +9 -0
  176. package/dist/twins/packs/inngest/LICENSE +202 -0
  177. package/dist/twins/packs/inngest/NOTICE +7 -0
  178. package/dist/twins/packs/inngest/index.mjs +2 -0
  179. package/dist/twins/packs/instagram/LICENSE +202 -0
  180. package/dist/twins/packs/instagram/NOTICE +7 -0
  181. package/dist/twins/packs/instagram/index.mjs +2 -0
  182. package/dist/twins/packs/jira/LICENSE +202 -0
  183. package/dist/twins/packs/jira/NOTICE +7 -0
  184. package/dist/twins/packs/jira/index.mjs +2 -0
  185. package/dist/twins/packs/langfuse/LICENSE +202 -0
  186. package/dist/twins/packs/langfuse/NOTICE +7 -0
  187. package/dist/twins/packs/langfuse/index.mjs +2 -0
  188. package/dist/twins/packs/linear/LICENSE +202 -0
  189. package/dist/twins/packs/linear/NOTICE +7 -0
  190. package/dist/twins/packs/linear/index.mjs +52866 -0
  191. package/dist/twins/packs/linkedin/LICENSE +202 -0
  192. package/dist/twins/packs/linkedin/NOTICE +7 -0
  193. package/dist/twins/packs/linkedin/index.mjs +78 -0
  194. package/dist/twins/packs/livekit/LICENSE +202 -0
  195. package/dist/twins/packs/livekit/NOTICE +7 -0
  196. package/dist/twins/packs/livekit/index.mjs +2 -0
  197. package/dist/twins/packs/mailgun/LICENSE +202 -0
  198. package/dist/twins/packs/mailgun/NOTICE +7 -0
  199. package/dist/twins/packs/mailgun/index.mjs +13 -0
  200. package/dist/twins/packs/mapbox/LICENSE +202 -0
  201. package/dist/twins/packs/mapbox/NOTICE +7 -0
  202. package/dist/twins/packs/mapbox/index.mjs +2 -0
  203. package/dist/twins/packs/merge/LICENSE +202 -0
  204. package/dist/twins/packs/merge/NOTICE +7 -0
  205. package/dist/twins/packs/merge/index.mjs +4 -0
  206. package/dist/twins/packs/mistral/LICENSE +202 -0
  207. package/dist/twins/packs/mistral/NOTICE +7 -0
  208. package/dist/twins/packs/mistral/index.mjs +6 -0
  209. package/dist/twins/packs/mixpanel/LICENSE +202 -0
  210. package/dist/twins/packs/mixpanel/NOTICE +8 -0
  211. package/dist/twins/packs/mixpanel/index.mjs +2 -0
  212. package/dist/twins/packs/mongodb/LICENSE +202 -0
  213. package/dist/twins/packs/mongodb/NOTICE +7 -0
  214. package/dist/twins/packs/mongodb/index.mjs +8 -0
  215. package/dist/twins/packs/moonshot/LICENSE +202 -0
  216. package/dist/twins/packs/moonshot/NOTICE +7 -0
  217. package/dist/twins/packs/moonshot/index.mjs +18 -0
  218. package/dist/twins/packs/notion/LICENSE +202 -0
  219. package/dist/twins/packs/notion/NOTICE +7 -0
  220. package/dist/twins/packs/notion/index.mjs +2 -0
  221. package/dist/twins/packs/npm-registry/LICENSE +202 -0
  222. package/dist/twins/packs/npm-registry/NOTICE +7 -0
  223. package/dist/twins/packs/npm-registry/index.mjs +2 -0
  224. package/dist/twins/packs/oa-treasury/LICENSE +202 -0
  225. package/dist/twins/packs/oa-treasury/NOTICE +8 -0
  226. package/dist/twins/packs/oa-treasury/index.mjs +16 -0
  227. package/dist/twins/packs/openai/LICENSE +202 -0
  228. package/dist/twins/packs/openai/NOTICE +7 -0
  229. package/dist/twins/packs/openai/index.mjs +3473 -0
  230. package/dist/twins/packs/openrouter/LICENSE +202 -0
  231. package/dist/twins/packs/openrouter/NOTICE +7 -0
  232. package/dist/twins/packs/openrouter/index.mjs +2 -0
  233. package/dist/twins/packs/openweather/LICENSE +202 -0
  234. package/dist/twins/packs/openweather/NOTICE +7 -0
  235. package/dist/twins/packs/openweather/index.mjs +2 -0
  236. package/dist/twins/packs/paypal/LICENSE +202 -0
  237. package/dist/twins/packs/paypal/NOTICE +7 -0
  238. package/dist/twins/packs/paypal/index.mjs +51 -0
  239. package/dist/twins/packs/pinecone/LICENSE +202 -0
  240. package/dist/twins/packs/pinecone/NOTICE +7 -0
  241. package/dist/twins/packs/pinecone/index.mjs +2 -0
  242. package/dist/twins/packs/plain/LICENSE +202 -0
  243. package/dist/twins/packs/plain/NOTICE +8 -0
  244. package/dist/twins/packs/plain/index.mjs +18426 -0
  245. package/dist/twins/packs/planetscale/LICENSE +202 -0
  246. package/dist/twins/packs/planetscale/NOTICE +7 -0
  247. package/dist/twins/packs/planetscale/index.mjs +18 -0
  248. package/dist/twins/packs/polar/LICENSE +202 -0
  249. package/dist/twins/packs/polar/NOTICE +7 -0
  250. package/dist/twins/packs/polar/index.mjs +2 -0
  251. package/dist/twins/packs/polyhaven/LICENSE +202 -0
  252. package/dist/twins/packs/polyhaven/NOTICE +7 -0
  253. package/dist/twins/packs/polyhaven/index.mjs +3 -0
  254. package/dist/twins/packs/postmark/LICENSE +202 -0
  255. package/dist/twins/packs/postmark/NOTICE +7 -0
  256. package/dist/twins/packs/postmark/index.mjs +12 -0
  257. package/dist/twins/packs/reddit/LICENSE +202 -0
  258. package/dist/twins/packs/reddit/NOTICE +7 -0
  259. package/dist/twins/packs/reddit/index.mjs +324 -0
  260. package/dist/twins/packs/redis/LICENSE +202 -0
  261. package/dist/twins/packs/redis/NOTICE +7 -0
  262. package/dist/twins/packs/redis/index.mjs +2 -0
  263. package/dist/twins/packs/replicate/LICENSE +202 -0
  264. package/dist/twins/packs/replicate/NOTICE +7 -0
  265. package/dist/twins/packs/replicate/index.mjs +2 -0
  266. package/dist/twins/packs/resend/LICENSE +202 -0
  267. package/dist/twins/packs/resend/NOTICE +7 -0
  268. package/dist/twins/packs/resend/index.mjs +139 -0
  269. package/dist/twins/packs/runhuman/LICENSE +202 -0
  270. package/dist/twins/packs/runhuman/NOTICE +7 -0
  271. package/dist/twins/packs/runhuman/index.mjs +3 -0
  272. package/dist/twins/packs/scrapecreators/LICENSE +202 -0
  273. package/dist/twins/packs/scrapecreators/NOTICE +7 -0
  274. package/dist/twins/packs/scrapecreators/index.mjs +2 -0
  275. package/dist/twins/packs/segment/LICENSE +202 -0
  276. package/dist/twins/packs/segment/NOTICE +8 -0
  277. package/dist/twins/packs/segment/index.mjs +2 -0
  278. package/dist/twins/packs/sendblue/LICENSE +202 -0
  279. package/dist/twins/packs/sendblue/NOTICE +7 -0
  280. package/dist/twins/packs/sendblue/index.mjs +2 -0
  281. package/dist/twins/packs/sendgrid/LICENSE +202 -0
  282. package/dist/twins/packs/sendgrid/NOTICE +8 -0
  283. package/dist/twins/packs/sendgrid/index.mjs +4 -0
  284. package/dist/twins/packs/sentry/LICENSE +202 -0
  285. package/dist/twins/packs/sentry/NOTICE +7 -0
  286. package/dist/twins/packs/sentry/index.mjs +5 -0
  287. package/dist/twins/packs/sigstore/LICENSE +202 -0
  288. package/dist/twins/packs/sigstore/NOTICE +7 -0
  289. package/dist/twins/packs/sigstore/index.mjs +12 -0
  290. package/dist/twins/packs/slack/LICENSE +202 -0
  291. package/dist/twins/packs/slack/NOTICE +7 -0
  292. package/dist/twins/packs/slack/index.mjs +66 -0
  293. package/dist/twins/packs/smtp/LICENSE +202 -0
  294. package/dist/twins/packs/smtp/NOTICE +7 -0
  295. package/dist/twins/packs/smtp/index.mjs +3 -0
  296. package/dist/twins/packs/snowflake/LICENSE +202 -0
  297. package/dist/twins/packs/snowflake/NOTICE +8 -0
  298. package/dist/twins/packs/snowflake/index.mjs +30 -0
  299. package/dist/twins/packs/stigg/LICENSE +202 -0
  300. package/dist/twins/packs/stigg/NOTICE +8 -0
  301. package/dist/twins/packs/stigg/index.mjs +22194 -0
  302. package/dist/twins/packs/stream/LICENSE +202 -0
  303. package/dist/twins/packs/stream/NOTICE +7 -0
  304. package/dist/twins/packs/stream/index.mjs +2 -0
  305. package/dist/twins/packs/stripe/LICENSE +202 -0
  306. package/dist/twins/packs/stripe/NOTICE +7 -0
  307. package/dist/twins/packs/stripe/index.mjs +211 -0
  308. package/dist/twins/packs/supabase/LICENSE +202 -0
  309. package/dist/twins/packs/supabase/NOTICE +7 -0
  310. package/dist/twins/packs/supabase/index.mjs +2 -0
  311. package/dist/twins/packs/supermemory/LICENSE +202 -0
  312. package/dist/twins/packs/supermemory/NOTICE +7 -0
  313. package/dist/twins/packs/supermemory/index.mjs +2 -0
  314. package/dist/twins/packs/svix/LICENSE +202 -0
  315. package/dist/twins/packs/svix/NOTICE +7 -0
  316. package/dist/twins/packs/svix/index.mjs +2 -0
  317. package/dist/twins/packs/tavily/LICENSE +202 -0
  318. package/dist/twins/packs/tavily/NOTICE +7 -0
  319. package/dist/twins/packs/tavily/index.mjs +2 -0
  320. package/dist/twins/packs/telegram/LICENSE +202 -0
  321. package/dist/twins/packs/telegram/NOTICE +7 -0
  322. package/dist/twins/packs/telegram/index.mjs +11 -0
  323. package/dist/twins/packs/temporal/LICENSE +202 -0
  324. package/dist/twins/packs/temporal/NOTICE +7 -0
  325. package/dist/twins/packs/temporal/index.mjs +44 -0
  326. package/dist/twins/packs/tiktok/LICENSE +202 -0
  327. package/dist/twins/packs/tiktok/NOTICE +7 -0
  328. package/dist/twins/packs/tiktok/index.mjs +2 -0
  329. package/dist/twins/packs/tinybird/LICENSE +202 -0
  330. package/dist/twins/packs/tinybird/NOTICE +7 -0
  331. package/dist/twins/packs/tinybird/index.mjs +50 -0
  332. package/dist/twins/packs/togetherai/LICENSE +202 -0
  333. package/dist/twins/packs/togetherai/NOTICE +7 -0
  334. package/dist/twins/packs/togetherai/index.mjs +11 -0
  335. package/dist/twins/packs/tremendous/LICENSE +202 -0
  336. package/dist/twins/packs/tremendous/NOTICE +7 -0
  337. package/dist/twins/packs/tremendous/index.mjs +2 -0
  338. package/dist/twins/packs/tripo/LICENSE +202 -0
  339. package/dist/twins/packs/tripo/NOTICE +7 -0
  340. package/dist/twins/packs/tripo/index.mjs +9 -0
  341. package/dist/twins/packs/tunnel/LICENSE +202 -0
  342. package/dist/twins/packs/tunnel/NOTICE +7 -0
  343. package/dist/twins/packs/tunnel/index.mjs +2 -0
  344. package/dist/twins/packs/twelvelabs/LICENSE +202 -0
  345. package/dist/twins/packs/twelvelabs/NOTICE +7 -0
  346. package/dist/twins/packs/twelvelabs/index.mjs +5 -0
  347. package/dist/twins/packs/twilio/LICENSE +202 -0
  348. package/dist/twins/packs/twilio/NOTICE +7 -0
  349. package/dist/twins/packs/twilio/index.mjs +2 -0
  350. package/dist/twins/packs/twitch/LICENSE +202 -0
  351. package/dist/twins/packs/twitch/NOTICE +7 -0
  352. package/dist/twins/packs/twitch/index.mjs +68 -0
  353. package/dist/twins/packs/upstash/LICENSE +202 -0
  354. package/dist/twins/packs/upstash/NOTICE +7 -0
  355. package/dist/twins/packs/upstash/index.mjs +14 -0
  356. package/dist/twins/packs/upstashvector/LICENSE +202 -0
  357. package/dist/twins/packs/upstashvector/NOTICE +7 -0
  358. package/dist/twins/packs/upstashvector/index.mjs +3 -0
  359. package/dist/twins/packs/vercel/LICENSE +202 -0
  360. package/dist/twins/packs/vercel/NOTICE +7 -0
  361. package/dist/twins/packs/vercel/index.mjs +10 -0
  362. package/dist/twins/packs/veriff/LICENSE +202 -0
  363. package/dist/twins/packs/veriff/NOTICE +7 -0
  364. package/dist/twins/packs/veriff/index.mjs +2 -0
  365. package/dist/twins/packs/vgauth/LICENSE +202 -0
  366. package/dist/twins/packs/vgauth/NOTICE +7 -0
  367. package/dist/twins/packs/vgauth/index.mjs +2 -0
  368. package/dist/twins/packs/vital/LICENSE +202 -0
  369. package/dist/twins/packs/vital/NOTICE +7 -0
  370. package/dist/twins/packs/vital/index.mjs +2 -0
  371. package/dist/twins/packs/volteridentity/LICENSE +202 -0
  372. package/dist/twins/packs/volteridentity/NOTICE +7 -0
  373. package/dist/twins/packs/volteridentity/index.mjs +2 -0
  374. package/dist/twins/packs/webrisk/LICENSE +202 -0
  375. package/dist/twins/packs/webrisk/NOTICE +7 -0
  376. package/dist/twins/packs/webrisk/index.mjs +2 -0
  377. package/dist/twins/packs/worldlabs/LICENSE +202 -0
  378. package/dist/twins/packs/worldlabs/NOTICE +7 -0
  379. package/dist/twins/packs/worldlabs/index.mjs +2 -0
  380. package/dist/twins/packs/x/LICENSE +202 -0
  381. package/dist/twins/packs/x/NOTICE +7 -0
  382. package/dist/twins/packs/x/index.mjs +63 -0
  383. package/dist/twins/packs/xai/LICENSE +202 -0
  384. package/dist/twins/packs/xai/NOTICE +7 -0
  385. package/dist/twins/packs/xai/index.mjs +4 -0
  386. package/dist/twins/packs/xidentity/LICENSE +202 -0
  387. package/dist/twins/packs/xidentity/NOTICE +8 -0
  388. package/dist/twins/packs/xidentity/index.mjs +209 -0
  389. package/dist/twins/packs/youtube/LICENSE +202 -0
  390. package/dist/twins/packs/youtube/NOTICE +7 -0
  391. package/dist/twins/packs/youtube/index.mjs +5 -0
  392. package/dist/worker.js +442 -18
  393. package/dist/world-host.js +928 -91
  394. package/package.json +6 -5
  395. package/dist/dashboard/assets/dashboard/bay-morning.png +0 -0
  396. package/dist/dashboard/assets/dashboard/golden-gate-afternoon.png +0 -0
  397. package/dist/dashboard/assets/dashboard/golden-gate-portrait.png +0 -0
  398. package/dist/dashboard/assets/dashboard/moonlit-coast.png +0 -0
  399. package/dist/dashboard/assets/next/static/chunks/2868-424d32cfc8ae81c9.js +0 -1
  400. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-f9fca2c08f779fa0.js +0 -1
  401. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-bc480c9258e5cc4d.js +0 -1
  402. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-f04c0b236abaead3.js +0 -1
  403. package/dist/dashboard/assets/next/static/chunks/app/v2/page-07c8054d57c9089b.js +0 -1
  404. package/dist/dashboard/assets/next/static/css/4af3c8ca0da0f48b.css +0 -1
  405. package/dist/dashboard/assets/next/static/css/6b8edde77e493a51.css +0 -1
  406. package/dist/dashboard/assets/next/static/media/bay-morning.1a9f358c.png +0 -0
  407. package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.3e7cea58.png +0 -0
  408. package/dist/dashboard/assets/next/static/media/golden-gate-portrait.7941528f.png +0 -0
  409. package/dist/dashboard/assets/next/static/media/moonlit-coast.bbe901a1.png +0 -0
  410. /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → GTd0IQ6HYyhE_2HqcgFno}/_buildManifest.js +0 -0
  411. /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → GTd0IQ6HYyhE_2HqcgFno}/_ssgManifest.js +0 -0
@@ -0,0 +1,35 @@
1
+ import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
+ var Zt=Object.defineProperty;var Qt=(e,t)=>{for(var n in t)Zt(e,n,{get:t[n],enumerable:!0})};import{packOf as Vn,registerPack as Yn}from"../../engine/v3/volter_world-core.mjs";var ce={vendor:"hackernews",discovery:{twinOf:"Hacker News: the site a person posts on (news.ycombinator.com: login and create account, submit a link, a question or a Show HN, comment and reply, upvote, logout; the front page, newest, show, shownew, item, reply and user pages, ranked on the World's clock) and its public read API (hacker-news.firebaseio.com/v0: items, users, the largest id, the top, new, best, Ask HN and Show HN lists, the changes)",stores:"items (stories and comments) and users in the read API's shapes, votes, and the people who sign in with their sign-ins"},vendorBacked:{none:`Hacker News's read API takes no write, and its site asks that posting never be automated (newsguidelines.html: "please don't automate posting"): a World's posts stay in the World, and a real one is made by a person on the real site`},lanes:{routes:[{lane:"api",host:"^hacker-news\\.firebaseio\\.com$"},{lane:"site",host:"^news\\.ycombinator\\.com$"},{lane:"api",path:"/v0"}],default:"site"},descriptor:{protocol:"3",transport:"rest",archetype:"crud",bin:"world-hackernews",resources:["item","user","_vote","_person","_web_session","_web_session_issue"],specSource:"api/spec: Hacker News's API README (github.com/HackerNews/API at 8a0528f), written as OpenAPI from it; site/spec: the site's forms, written from its pages (newsguidelines, newsfaq, showhn, security, formatdoc) and the forms as a person sees them",description:"Hacker News twin \u2014 the site as a person posts on it (log in, submit a Show HN, comment, reply, upvote; the front page, newest, show and item pages ranked on the World's clock) and the public Firebase read API, over one store, so a post made on a page is at /v0/item/<id>.json and in newstories.",adoption:{sdks:[],envStems:["HN","HACKERNEWS"]},hosts:[{host:"hacker-news.firebaseio.com"},{host:"news.ycombinator.com"}],endpointEnvNone:"Hacker News publishes no SDK: clients fetch https://hacker-news.firebaseio.com/v0 directly and people use news.ycombinator.com in a browser, both reached by host",credentialDoor:{path:"/_twin/app-credentials",body:{},fill:{HN_USERNAME:"acct",HN_PASSWORD:"pw"}}}};var Ye={Item:{notState:["type"]}};var R={vendor:"hackernews",service:"hackernews",body:{},ids:{template:"{n}"},time:"unix",error:{error:"{message}"},readOnly:{status:401,message:"Permission denied"},notFound:{status:404,message:"Not Found"},list:{style:"envelope",envelope:"{data}",limit:{param:"limitToFirst",default:500,max:500}},deleted:null,hosts:[{host:"hacker-news.firebaseio.com"}],vendorBacked:{none:`the read API takes no write: Hacker News's items and users are made by people on its site, which it asks never be automated (newsguidelines.html: "please don't automate posting"), so no World's write is performed against it`},resources:{Item:{storedAs:"item",idPrefix:"",...Ye.Item,refresh:{none:"no write of a World is performed against Hacker News (vendorBacked)"}},User:{storedAs:"user",idPrefix:"",refresh:{none:"no write of a World is performed against Hacker News (vendorBacked)"}}},discovery:{twinOf:"Hacker News's public read API (hacker-news.firebaseio.com/v0): items, users, the largest id, the top, new, best, Ask HN and Show HN lists, and the changes (jobstories, which no page fills, answers the gap)",stores:"the items and users the site lane writes"}};var me={generatedBy:"scripts/derive-pack.ts",spec:"openapi.json",format:"openapi",version:"v0",resources:[{name:"Item",schema:"Item",fields:[{name:"by",type:"string",nullable:!1},{name:"dead",type:"boolean",nullable:!1},{name:"deleted",type:"boolean",nullable:!1},{name:"descendants",type:"integer",nullable:!1},{name:"id",type:"integer",nullable:!1,required:!0},{name:"kids",type:"array",nullable:!1},{name:"parent",type:"integer",nullable:!1},{name:"parts",type:"array",nullable:!1},{name:"poll",type:"integer",nullable:!1},{name:"score",type:"integer",nullable:!1},{name:"text",type:"string",nullable:!1},{name:"time",type:"integer",nullable:!1},{name:"title",type:"string",nullable:!1},{name:"type",type:"string",nullable:!1,enum:["job","story","comment","poll","pollopt"]},{name:"url",type:"string",nullable:!1}],stateCandidates:[{field:"type",values:["comment","job","poll","pollopt","story"]}],expandable:[]},{name:"User",schema:"User",fields:[{name:"about",type:"string",nullable:!1},{name:"created",type:"integer",nullable:!1,required:!0},{name:"id",type:"string",nullable:!1,required:!0},{name:"karma",type:"integer",nullable:!1,required:!0},{name:"submitted",type:"array",nullable:!1}],stateCandidates:[],expandable:[]}],operations:[{id:"getAskStories",method:"get",path:"/v0/askstories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getBestStories",method:"get",path:"/v0/beststories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getItem",method:"get",path:"/v0/item/{id}.json",pathParams:["id"],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,answers:{resource:"Item",list:!1},class:"retrieve",resource:"Item",family:"items"},{id:"getJobStories",method:"get",path:"/v0/jobstories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getMaxItem",method:"get",path:"/v0/maxitem.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getNewStories",method:"get",path:"/v0/newstories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getShowStories",method:"get",path:"/v0/showstories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getTopStories",method:"get",path:"/v0/topstories.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getUpdates",method:"get",path:"/v0/updates.json",pathParams:[],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed",family:"live-data"},{id:"getUser",method:"get",path:"/v0/user/{id}.json",pathParams:["id"],query:[{name:"print",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,answers:{resource:"User",list:!1},class:"retrieve",resource:"User",family:"users"}]};var $e={item:{},user:{}};var k="news.ycombinator.com",C={vendor:"hackernews",service:"hackernews",body:{},ids:{template:"{n}"},time:"unix",error:"{message}",readOnly:{status:403,message:"This World is read-only."},notFound:{status:404,message:"Unknown."},gap:{status:404,message:"Unknown."},list:{style:"envelope",envelope:"{data}",limit:{param:"n",default:30,max:30}},deleted:null,hosts:[{host:k}],vendorBacked:{none:`Hacker News asks that posting never be automated (newsguidelines.html: "please don't automate posting"): a World's posts stay in the World, and a real one is made by a person on the real site`},resources:{item:{idPrefix:"",...$e.item,refresh:{none:"no write of a World is performed against Hacker News (vendorBacked)"}},user:{idPrefix:"",...$e.user,refresh:{none:"no write of a World is performed against Hacker News (vendorBacked)"}}},doors:[{id:"appCredentials",method:"POST",path:"/_twin/app-credentials",note:"the World's own account (Volter's), as the runtime issues it: its username and password"}],screens:[{id:"login",kind:"workspace",host:k,path:"/login",status:"done",yieldsToApi:!0,controls:["username:","password:","login","create account"],demand:"the launcher signs in as the World's Volter account; every page's login link and every form posted signed out lead here",source:"https://news.ycombinator.com/login (its two forms: acct and pw, login; creating, acct and pw, create account)"},{id:"submit",kind:"workspace",host:k,path:"/submit",status:"done",yieldsToApi:!0,controls:["title","url","text","submit"],demand:"the launcher submits the Show HN: a title beginning Show HN, the home page url and the text explaining it",source:"https://news.ycombinator.com/showhn.html and https://news.ycombinator.com/newsfaq.html (submitting a question: leave url blank)"},{id:"item",kind:"workspace",host:k,path:"/item",status:"done",yieldsToApi:!0,controls:["upvote","add comment","reply"],demand:"the launch thread: the story, its text, its comments ranked, a new comment, the reply link and the upvote arrow",source:"https://news.ycombinator.com/item (a story and its thread; the add comment form: parent, goto, hmac, text)"},{id:"reply",kind:"workspace",host:k,path:"/reply",status:"done",yieldsToApi:!0,controls:["reply"],demand:"the launcher answers a reader's comment from its reply link",source:"https://news.ycombinator.com/reply (the comment replied to, and the reply form posting to comment)"},{id:"newest",kind:"workspace",host:k,path:"/newest",status:"done",yieldsToApi:!0,controls:["upvote"],demand:"where a fresh submission appears first, newest first",source:"https://news.ycombinator.com/newsfaq.html (All Ask HNs appear on newest and asknew, and all Show HNs on newest and shownew)"},{id:"shownew",kind:"workspace",host:k,path:"/shownew",status:"done",yieldsToApi:!0,controls:["upvote"],demand:"every Show HN, newest first, before it clears the show page threshold",source:"https://news.ycombinator.com/showhn.html (Every Show HN appears on shownew)"},{id:"show",kind:"workspace",host:k,path:"/show",status:"done",yieldsToApi:!0,controls:["upvote"],demand:"the show page in the top bar, where the launch appears once it clears the points threshold",source:"https://news.ycombinator.com/showhn.html (Once it clears a small points threshold, it will appear on the show page)"},{id:"news",kind:"workspace",host:k,path:"/news",status:"done",yieldsToApi:!0,controls:["upvote"],demand:"the front page, ranked by points and age on the World's clock",source:"https://news.ycombinator.com/newsfaq.html (How are stories ranked?)"},{id:"user",kind:"workspace",host:k,path:"/user",status:"done",yieldsToApi:!0,demand:"an account's page: its username, when it was created and its karma",source:"https://news.ycombinator.com/newsfaq.html (How is a user's karma calculated?)"},{id:"front",kind:"workspace",host:k,path:"/",status:"done",yieldsToApi:!0,controls:["upvote"],demand:"the site's address itself: the front page, and Unknown. for a path the site does not have",source:"https://news.ycombinator.com/ (the front page; an unknown path answers Unknown.)"}],discovery:{twinOf:"Hacker News (news.ycombinator.com) as a person uses it: login and create account, submit (a link, a question, a Show HN), comment and reply, upvote, logout, and the front page, newest, show, shownew, item, reply, and user pages",stores:"items, users, votes, people and their sign-ins",identity:"Sign in on the login page as the World's account (the credential door's acct and pw) or an account made on it; the user cookie names you to every page after."}};var le={generatedBy:"scripts/derive-pack.ts",spec:"openapi.json",format:"openapi",version:"2026-10-02",resources:[],operations:[{id:"comment",method:"post",path:"/comment",pathParams:[],query:[],body:[{name:"acct",type:"string",required:!1},{name:"creating",type:"string",required:!1},{name:"goto",type:"string",required:!1},{name:"hmac",type:"string",required:!0},{name:"parent",type:"integer",required:!0},{name:"pw",type:"string",required:!1},{name:"text",type:"string",required:!1}],bodyEncoding:"form",scalars:{parent:"integer"},successStatus:200,class:"non-resource"},{id:"login",method:"post",path:"/login",pathParams:[],query:[{name:"goto",type:"string",required:!1}],body:[{name:"acct",type:"string",required:!0},{name:"creating",type:"string",required:!1},{name:"pw",type:"string",required:!0}],bodyEncoding:"form",successStatus:200,class:"non-resource"},{id:"logout",method:"get",path:"/logout",pathParams:[],query:[{name:"auth",type:"string",required:!1},{name:"goto",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,class:"computed"},{id:"submit",method:"post",path:"/r",pathParams:[],query:[],body:[{name:"fnid",type:"string",required:!0},{name:"fnop",type:"string",required:!1},{name:"text",type:"string",required:!1},{name:"title",type:"string",required:!0},{name:"url",type:"string",required:!1}],bodyEncoding:"form",successStatus:200,class:"non-resource"},{id:"replyLogin",method:"post",path:"/reply",pathParams:[],query:[{name:"goto",type:"string",required:!1},{name:"id",type:"integer",required:!0}],body:[{name:"acct",type:"string",required:!0},{name:"creating",type:"string",required:!1},{name:"pw",type:"string",required:!0}],bodyEncoding:"form",scalars:{id:"integer"},successStatus:200,class:"non-resource"},{id:"submitLogin",method:"post",path:"/submit",pathParams:[],query:[],body:[{name:"acct",type:"string",required:!0},{name:"creating",type:"string",required:!1},{name:"pw",type:"string",required:!0}],bodyEncoding:"form",successStatus:200,class:"non-resource"},{id:"vote",method:"get",path:"/vote",pathParams:[],query:[{name:"auth",type:"string",required:!1},{name:"goto",type:"string",required:!1},{name:"how",type:"string",required:!0},{name:"id",type:"integer",required:!0}],body:[],bodyEncoding:"none",successStatus:200,class:"computed"},{id:"voteLogin",method:"post",path:"/vote",pathParams:[],query:[{name:"goto",type:"string",required:!1},{name:"how",type:"string",required:!0},{name:"id",type:"integer",required:!0}],body:[{name:"acct",type:"string",required:!0},{name:"creating",type:"string",required:!1},{name:"pw",type:"string",required:!0}],bodyEncoding:"form",scalars:{id:"integer"},successStatus:200,class:"non-resource"}]};import{createVendorFetch as Dn}from"../../engine/v3/volter_world-core.mjs";import{createPackFetch as An}from"../../engine/v3/volter_world-core.mjs";import{startBrowserSession as tn,endBrowserSession as nn,personOf as Ke,personWith as rn,recordPerson as on}from"../../engine/v3/volter_world-core.mjs";var w="item",E="user",Je="_vote",Q="user",X="yuerany",pe="https://news.ycombinator.com",S=e=>Math.floor(Date.parse(e)/1e3);function W(e,t){let n=e.own(t);return Object.fromEntries(Object.entries({...n.id===void 0?{id:t.id}:{},...n}).filter(([r])=>!r.startsWith("_")&&r!=="deleted"&&r!=="updatedAt"))}var Ae=(e,t)=>/^\d+$/.test(String(t))?e.row(w,String(t)):void 0,qe=(e,t)=>e.row(E,t),_=e=>e.rowsRaw(w).map(t=>W(e,t)),v=(e,t)=>{let n=Ae(e,t);return n?W(e,n):void 0},M=(e,t)=>{let n=qe(e,t);return n?W(e,n):void 0},D=e=>e.type==="story"&&e.dead!==!0,He=e=>D(e)&&String(e.title??"").startsWith("Show HN"),sn=e=>D(e)&&!e.url&&!He(e);function ue(e,t,n){let r=t-1,o=Math.max(0,n-Number(e.time))/60,i=e.type!=="story"&&e.type!=="poll"?.5:e.url?1:.4;return(r>0?r**.8:r)/((o+120)/60)**1.8*i}var Ge=e=>(t,n)=>ue(n,Number(n.score??1),e)-ue(t,Number(t.score??1),e)||Number(n.id)-Number(t.id),ee=(e,t)=>Number(t.time)-Number(e.time)||Number(t.id)-Number(e.id),j=(e,t)=>_(e).filter(D).sort(Ge(t)),he=e=>_(e).filter(D).sort(ee),fe=e=>_(e).filter(He).sort(ee),Ze=(e,t)=>_(e).filter(n=>He(n)&&Number(n.score??1)>1).sort(Ge(t)),Qe=e=>_(e).filter(sn).sort(ee),Xe=e=>_(e).filter(D).sort((t,n)=>Number(n.score??1)-Number(t.score??1)||ee(t,n)),V=(e,t)=>e.slice(0,t).map(n=>Number(n.id));function an(e,t){for(let n of(e.headers.get("cookie")??"").split(";")){let r=n.indexOf("=");if(r>0&&n.slice(0,r).trim()===t)return decodeURIComponent(n.slice(r+1).trim())}}function L(e){let t=an(e.call.request,Q),n=t?e.rowsRaw("_web_session").find(o=>o.token===t):void 0,r=n?Ke(e,String(n.email)):void 0;return r?String(r.acct):void 0}async function dn(e,t,n){return new Response(null,{status:302,headers:{location:Le(e,n),"set-cookie":await et(e,t)}})}async function et(e,t){let n=t.toLowerCase();return tn(e,n,Q)}var _e=(e,t,n)=>{let r=rn(e,t,n);return r?String(r.acct):void 0};function cn(e,t,n){if(!/^[A-Za-z0-9_-]{2,15}$/.test(t))return mn();if(Ke(e,t))return ln();if(n.length<4)return un()}function mn(){return"Usernames can only contain letters, digits, dashes and underscores, and should be between 2 and 15 characters long. Please choose another."}function ln(){return"That username is taken. Please choose another."}function un(){return"Passwords should be a least 4 characters long. Please choose another."}async function Oe(e,t,n){await on(e,t,n,{acct:t}),await e.write(E,t,{id:t,created:S(e.occurredAt),karma:1},"user.create")}var b=(e,t="news")=>{let n=String(e??"");return/^[a-z][a-z0-9._-]*(?:\?[^\s:]*)?$/i.test(n)?n:t},te=async(e,t)=>e.crypto.digest("sha256",await e.secret(t),"hex").slice(0,40),ge=(e,t,n)=>te(e,`vote:${t}:${n}`),T=(e,t,n)=>te(e,`comment:${t}:${n}`),ne=async(e,t)=>(await te(e,`submit:${t}`)).slice(0,22),we=(e,t)=>t.type==="story"?t:v(e,(Ae(e,t.id)??{})._story);async function tt(e,t,n){let r=qe(e,t);await e.write(E,t,{submitted:[n,...r?.submitted??[]]},"user.submitted")}function pn(e,t){let n=s=>s!==void 0&&".,;:!?".includes(s),r=s=>s!==void 0&&`
3
+ \r`.includes(s),o=s=>s!==void 0&&"<([{".includes(s),i=s=>s!==void 0&&">)]}".includes(s),a=!1;for(let s=t;;s++){let m=e[s];if(s>e.length-2)return m===void 0||n(m)||r(m)||o(m)?s:i(m)?a?s+1:s:s+1;let l=e[s+1];if(r(m)||n(m)&&r(l)||(r(l)||n(l))&&(o(m)||i(m)&&!a))return s;a=o(m)||a&&!i(m)}}function hn(e,t,n){let r=0;for(let o=t;;o++){let i=e[o];if(i!==void 0&&!/\s/.test(i))return n>1&&r>1?[o,r]:void 0;if(o>e.length-2)return;i===`
4
+ `?(n++,r=0):r++}}function fn(e,t){let n="";for(;;){let r=e.length-t-1;if(r<=0||r>2&&e[t+1]===`
5
+ `&&!/\s/.test(e[t+2]))return n;n+=e[++t]}}function nt(e,t){let n=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"),r=s=>s!==void 0&&/\s/.test(s),o=e.replace(/\r/g,"").replace(/\s+$/,""),i="",a=!1;for(let s=0;s<o.length;s++){let m=o[s],l=hn(o,s,s===0?2:0);if(l){let f=fn(o,l[0]-l[1]-1);i+=`<p><pre><code>${n(f)}</code></pre>`,s=l[0]-l[1]-1+f.length;continue}if(r(m)){let f=s,d=s===0?1:0;for(;f<o.length&&r(o[f]);)o[f]===`
6
+ `&&d++,f++;if(d>1&&f<o.length){s>0&&(i+="<p>"),s=f-1;continue}}if(m==="*"&&(a||s===o.length-1||!r(o[s+1])&&o.indexOf("*",s+1)>=0)){i+=a?"</i>":"<i>",a=!a;continue}if(t&&(o.startsWith("http://",s)||o.startsWith("https://",s))){let f=pn(o,s),d=o.slice(s,f);i+=`<a href="${n(d)}" rel="nofollow">${n(d.length<=60?d:`${d.slice(0,60)}...`)}</a>`,s=f-1;continue}i+=n(m)}return i}async function rt(e,t,n){let r=Number(e.mint(w));return await e.write(w,String(r),{id:r,type:"story",by:t,time:S(e.occurredAt),title:n.title,...n.url?{url:n.url}:{},...n.text?{text:nt(n.text,!1)}:{},score:1,descendants:0},"item.story"),await tt(e,t,r),r}function ot(e,t,n){return e.rowsRaw(w).filter(r=>Number(r.parent)===Number(t)&&r.dead!==!0).map(r=>({r,w:W(e,r)})).sort((r,o)=>ue(o.w,Number(o.r._points??1),n)-ue(r.w,Number(r.r._points??1),n)||Number(o.w.time)-Number(r.w.time)||Number(o.w.id)-Number(r.w.id)).map(r=>Number(r.w.id))}function re(e,t,n){let r=v(e,t);return!r||!Array.isArray(r.kids)?r:{...r,kids:ot(e,r.id,n)}}async function gn(e,t,n,r){let o=Number(e.mint(w)),i=S(e.occurredAt),a=we(e,n);return await e.write(w,String(o),{id:o,type:"comment",by:t,time:i,parent:Number(n.id),text:nt(r,!0),_points:1,_story:Number(a.id)},"item.comment"),await e.write(w,String(n.id),{kids:ot(e,Number(n.id),i)},"item.kids"),await e.write(w,String(a.id),{descendants:Number(a.descendants??0)+1},"item.descendants"),await tt(e,t,o),o}async function st(e,t,n,r,o){if(!je(we(e,n),S(e.occurredAt)))return J(e,"Hacker News","<p>Threads are closed to new comments after two weeks.</p>",t);if(!r)return wn(e,t,n,o);await gn(e,t,n,r)}function wn(e,t,n,r){return ae(e,t,n,r,"",dt())}function ye(e,t){return J(e,"Hacker News","<p>Unknown or expired link.</p>",t)}function Y(e,t){return J(e,"Hacker News","<p>No such item.</p>",t)}function Pe(e,t){return J(e,"Hacker News","<p>Can't make that vote.</p>",t)}async function yn(e,t,n){await e.record(Je,{user:t,item:Number(n.id),at:e.occurredAt},`${t}:${n.id}`);let r=Ae(e,n.id);n.type==="story"?await e.write(w,String(n.id),{score:Number(n.score??1)+1},"item.vote"):await e.write(w,String(n.id),{_points:Number(r._points??1)+1},"item.vote");let o=qe(e,String(n.by));o&&await e.write(E,String(n.by),{karma:Number(o.karma??1)+1},"user.karma")}async function oe(e,t,n){n.by!==t&&!Ie(e,t,String(n.id))&&await yn(e,t,n)}var Ie=(e,t,n)=>!!e.row(Je,`${t}:${n}`);function it(e,t){return _(e).filter(n=>D(n)&&n.url===t).sort(ee)[0]}function at(e,t,n){if(!((t===""||vn(t))&&e!==""))return bn();if(e.length>80)return Sn();if(t===""&&n==="")return kn()}function dt(){return"Please try again."}function bn(){return dt()}function Sn(){return"Please make title < 80 characters."}function kn(){return"The url and text fields can't both be blank. Please either supply a url, or if you're asking a question, put it in the text field."}var vn=e=>e.length>10&&/^https?:\/\//.test(e)&&!/[<>"']/.test(e),je=(e,t)=>e.dead!==!0&&t-Number(e.time)<336*3600,K=e=>e.call.request.headers.has("x-forwarded-prefix")?new URL(e.publicBase).pathname.replace(/\/+$/,""):void 0,Le=(e,t)=>{let n=K(e);return n===void 0?t:`${n}/${t.replace(/^\/+/,"")}`};function se(e,t){return t===void 0?e:e.replace(/(href|action)="(?!https?:|\/\/|#|mailto:|javascript:)\/?([^"]*)"/g,(n,r,o)=>`${r}="${t}/${o}"`)}var U=(e,t)=>new Response(null,{status:302,headers:{location:Le(e,t)}}),p=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),ie=`
7
+ body { margin: 0; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: #000; background: #fff; }
8
+ .hn { width: 85%; margin: 8px auto 0; background: #f6f6ef; }
9
+ .hn-top { background: #ff6600; padding: 2px; display: flex; align-items: center; gap: 4px; line-height: 12pt; }
10
+ .hn-top a { color: #000; text-decoration: none; }
11
+ .hn-logo { border: 1px solid #fff; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; font-size: 10pt; }
12
+ .hn-name { font-weight: bold; margin-right: 6px; }
13
+ .hn-right { margin-left: auto; padding-right: 4px; }
14
+ .hn-body { padding: 10px 8px 16px; }
15
+ .hn-body a { color: #000; text-decoration: none; }
16
+ .hn-sub, .hn-sub a { color: #828282; font-size: 7pt; }
17
+ .hn-rank { color: #828282; text-align: right; vertical-align: top; padding-right: 2px; }
18
+ .hn-arrow { vertical-align: top; width: 14px; text-align: center; }
19
+ .hn-arrow a { color: #9a9a9a; font-size: 9pt; }
20
+ .hn-title { font-size: 10pt; }
21
+ .hn-site, .hn-site a { color: #828282; font-size: 8pt; }
22
+ .hn-message { margin: 0 0 12px; }
23
+ .hn-comment { margin: 0 0 14px; }
24
+ .hn-comment .hn-text { font-size: 9pt; margin-top: 4px; }
25
+ .hn-reply { font-size: 7pt; text-decoration: underline; color: #000; }
26
+ textarea { font-family: monospace; font-size: 10pt; }
27
+ .hn table { border-collapse: collapse; }
28
+ `,Te=async(e,t,n)=>`logout?auth=${await te(e,`logout:${t}`)}&goto=${encodeURIComponent(n)}`,ct=(e,t)=>te(e,`logout:${t}`);async function J(e,t,n,r,o="news",i=200){let a=r?M(e,r)?.karma:void 0,m=`<div class="hn-top"><a class="hn-logo" href="news">Y</a><b class="hn-name"><a href="news">Hacker News</a></b><a href="newest">new</a> | <a href="show">show</a> | <a href="submit">submit</a><span class="hn-right">${r?`<a href="user?id=${p(r)}">${p(r)}</a>&nbsp;(${p(a??1)})&nbsp;|&nbsp;<a href="${p(await Te(e,r,o))}">logout</a>`:`<a href="login?goto=${p(encodeURIComponent(o))}">login</a>`}</span></div>`,l=`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${p(t)}</title><style>${ie}</style></head><body><div class="hn">${m}<div class="hn-body">${n}</div></div></body></html>`;return new Response(se(l,K(e)),{status:i,headers:{"content-type":"text/html; charset=utf-8"}})}function Ue(e,t){return U(e,t)}async function mt(e,t){return new Response(null,{status:302,headers:{location:Le(e,t),"set-cookie":await nn(e,Q)}})}function I(e,t,n,r={}){let o=Object.entries(r).map(([s,m])=>`<input type="hidden" name="${p(s)}" value="${p(m)}">`).join(""),i=(s,m,l)=>`<b>${s}</b><br><br><form method="post"${n===void 0?"":` action="${p(n)}"`}>${o}${m?'<input type="hidden" name="creating" value="t">':""}<table><tr><td><label for="acct${m?"-new":""}">username:</label></td><td><input type="text" id="acct${m?"-new":""}" name="acct" size="20" autocomplete="username"></td></tr><tr><td><label for="pw${m?"-new":""}">password:</label></td><td><input type="password" id="pw${m?"-new":""}" name="pw" size="20" autocomplete="${m?"new-password":"current-password"}"></td></tr></table><br><input type="submit" value="${l}"></form>`,a=`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Login</title><style>${ie}</style></head><body><div class="hn-body">${t?`<p class="hn-message">${p(t)}</p>`:""}${i("Login",!1,"login")}<br><br>${i("Create Account",!0,"create account")}</div></body></html>`;return new Response(se(a,K(e)),{status:200,headers:{"content-type":"text/html; charset=utf-8"}})}async function be(e,t,n,r={title:"",url:"",text:""}){let o=await ne(e,t);return J(e,"Submit | Hacker News",`${n?`<p class="hn-message">${p(n)}</p>`:""}<form method="post" action="r"><input type="hidden" name="fnid" value="${p(o)}"><input type="hidden" name="fnop" value="submit-page"><table><tr><td><label for="title">title</label></td><td><input type="text" id="title" name="title" size="50" value="${p(r.title)}"></td></tr><tr><td><label for="url">url</label></td><td><input type="url" id="url" name="url" size="50" value="${p(r.url)}"></td></tr><tr><td><label for="text">text</label></td><td><textarea id="text" name="text" rows="4" cols="49">${p(r.text)}</textarea></td></tr><tr><td></td><td><input type="submit" value="submit"></td></tr></table></form>`,t)}async function ae(e,t,n,r,o,i=""){let a=await T(e,t,String(n.id)),s=n.type==="story"?`<a href="item?id=${p(n.id)}">${p(n.title)}</a>`:`<div>${String(n.text??"")}</div>`;return J(e,"Add Comment | Hacker News",`${i?`<p class="hn-message">${p(i)}</p>`:""}<div class="hn-comment">${s}</div><form method="post" action="comment"><input type="hidden" name="parent" value="${p(n.id)}"><input type="hidden" name="goto" value="${p(r)}"><input type="hidden" name="hmac" value="${p(a)}"><textarea name="text" rows="8" cols="80">${p(o)}</textarea><br><br><input type="submit" value="${n.type==="comment"?"reply":"add comment"}"></form>`,t)}async function $(e,t,n,r={}){let o=String(e.params.acct??""),i=String(e.params.pw??""),a;if(e.params.creating==="t"){let l=cn(e,o,i);if(l)return I(e,l,void 0,r.carried);await Oe(e,o,i),a=o}else if(a=_e(e,o,i),!a)return I(e,"Bad login.",void 0,r.carried);if(n&&await n(a),!r.answer)return dn(e,a,t);let s=await r.answer(a),m=new Headers(s.headers);return m.append("set-cookie",await et(e,a)),new Response(s.body,{status:s.status,headers:m})}function y(e,t){let n=String(e.params.print??"")==="pretty";return e.raw(n?JSON.stringify(t??null,null,2):JSON.stringify(t??null),{status:200,headers:{"content-type":"application/json; charset=utf-8"}})}function lt(e){return e.call.request.method!=="GET"&&e.call.request.method!=="HEAD"?e.raw(JSON.stringify({error:"Permission denied"}),{status:401,headers:{"content-type":"application/json; charset=utf-8"}}):y(e,null)}async function ut(e){return y(e,re(e,e.call.params.id,S(e.occurredAt))??null)}async function pt(e){let t=_(e).reduce((n,r)=>Math.max(n,Number(r.id)),0);return y(e,t||null)}async function ht(e){return y(e,V(j(e,S(e.occurredAt)),500))}async function ft(e){return y(e,V(he(e),500))}async function gt(e){return y(e,V(Xe(e),500))}async function wt(e){return y(e,V(Qe(e),200))}async function yt(e){return y(e,V(fe(e),200))}async function bt(e){let t=n=>e.rowsRaw(n).slice().sort((r,o)=>String(o.updatedAt).localeCompare(String(r.updatedAt))||String(o.id).localeCompare(String(r.id))).slice(0,30);return y(e,{items:t("item").map(n=>Number(W(e,n).id)),profiles:t("user").filter(n=>Array.isArray(n.submitted)&&n.submitted.length>0).map(n=>String(W(e,n).id))})}async function St(e){let t=M(e,String(e.call.params.id)),n=t&&Array.isArray(t.submitted)&&t.submitted.length>0;return y(e,n?t:null)}var kt={getAskStories:wt,getBestStories:gt,getItem:ut,getMaxItem:pt,getNewStories:ft,getShowStories:yt,getTopStories:ht,getUpdates:bt,getUser:St};function Fe(e={}){return An({manifest:R,surface:me,handlers:kt,gap:lt},e)}import{createPackFetch as zn}from"../../engine/v3/volter_world-core.mjs";function vt(e){let t=new Set(e.rowsRaw("_person").map(d=>String(d.acct??"")).filter(Boolean)),n=d=>d?{ours:!0}:{},r=e.rowsRaw(w).sort((d,H)=>Number(H.id)-Number(d.id)),o=new Map;for(let d of r){if(d.parent===void 0)continue;let H=o.get(String(d.parent));H?H.push(d):o.set(String(d.parent),[d])}let i=new Map,a=d=>{let H=i.get(String(d.id));if(H)return H;let xe=[{type:w,id:String(d.id)}];for(let Jt of o.get(String(d.id))??[])for(let Gt of a(Jt))xe.push(Gt);return i.set(String(d.id),xe),xe},s={id:"news",title:"Hacker News"},m={id:"front",kind:"front page",title:"Hacker News",section:s,url:`${pe}/`,covers:j(e,S(e.occurredAt)).slice(0,30).map(d=>({type:w,id:String(d.id)}))},l=r.map(d=>({id:`item:${String(d.id)}`,kind:String(d.type??"item"),title:qn(d),section:s,url:`${pe}/item?id=${String(d.id)}`,covers:a(d),parent:d.parent!==void 0?`item:${String(d.parent)}`:"front",...n(t.has(String(d.by)))})),f=e.rowsRaw(E).sort((d,H)=>String(d.id).localeCompare(String(H.id))).map(d=>({id:`user:${String(d.id)}`,kind:"user",title:String(d.id),section:{id:"users",title:"Users"},url:`${pe}/user?id=${encodeURIComponent(String(d.id))}`,covers:[{type:E,id:String(d.id)}],...n(t.has(String(d.id)))}));return[m,...l,...f]}function qn(e){return e.title?String(e.title):String(e.text??"").replace(/<[^>]*>/g," ").replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\s+/g," ").trim().slice(0,60)||`Comment by ${String(e.by)}`}var Re={};Qt(Re,{appCredentials:()=>Hn});async function Hn(e){let t=(await e.secret(`hn-password:${X}`)).slice(0,20);return _e(e,X,t)||await Oe(e,X,t),Response.json({acct:X,pw:t},{status:201})}async function Nt(e){let t=v(e,e.params.parent),n=b(e.params.goto,t?`item?id=${String(t.id)}`:"news"),r=L(e);if(!t)return Y(e,r);let o=String(e.params.text??"").trim();if(!r){let i=await T(e,"",String(t.id)),a={parent:String(t.id),goto:n,hmac:i,text:o};return e.params.acct!==void 0&&String(e.params.hmac??"")===i?$(e,n,void 0,{carried:a,answer:s=>ae(e,s,t,n,o)}):I(e,"You have to be logged in to comment.","comment",a)}return String(e.params.hmac??"")!==await T(e,r,String(t.id))?ye(e,r):await st(e,r,t,o,n)??U(e,n)}async function xt(e){return $(e,b(e.params.goto))}async function $t(e){let t=b(e.params.goto,"/"),n=L(e);return n?String(e.params.auth??"")!==await ct(e,n)?Ue(e,t):mt(e,t):Ue(e,t)}async function At(e){let t=L(e);if(!t)return I(e,"You have to be logged in to submit.","submit");if(String(e.params.fnid??"")!==await ne(e,t))return ye(e,t);let n=String(e.params.title??"").trim(),r=String(e.params.url??"").trim(),o=String(e.params.text??"").trim(),i=r?it(e,r):void 0;if(i)return await oe(e,t,i),U(e,`item?id=${String(i.id)}`);let a=at(n,r,o);return a?be(e,t,a,{title:n,url:r,text:o}):(await rt(e,t,{title:n,...r?{url:r}:{},...o?{text:o}:{}}),U(e,"newest"))}async function qt(e){let t=v(e,e.params.id);if(!t)return Y(e,void 0);let n=b(e.params.goto,`item?id=${String(t.id)}`);return $(e,n,void 0,{answer:r=>ae(e,r,t,n,"")})}async function Ht(e){return $(e,"submit",void 0,{answer:t=>be(e,t,"")})}async function _t(e){let t=b(e.params.goto),n=L(e);if(!n)return I(e,"You have to be logged in to vote.");let r=v(e,e.params.id);return r?String(e.params.how??"")!=="up"?Pe(e,n):String(e.params.auth??"")!==await ge(e,n,String(r.id))?Pe(e,n):(await oe(e,n,r),U(e,t)):Y(e,n)}async function Ot(e){let t=v(e,e.params.id);return $(e,b(e.params.goto),async n=>{t&&String(e.params.how??"")==="up"&&await oe(e,n,t)})}var Pt={comment:Nt,login:xt,logout:$t,replyLogin:qt,submit:At,submitLogin:Ht,vote:_t,voteLogin:Ot};import{jsx as c,Fragment as Ce,jsxs as g}from"../../engine/v3/react_jsx-runtime.mjs";import{flowPage as jt,SIGN_IN_CSS as Un,signedIn as Fn}from"../../engine/v3/volter_world-ui.mjs";function F(e){let t=Fn(e,Q);return t?String(t.acct):void 0}var N=e=>S(e.occurredAt),B=(e,t)=>new URL(e.call.request.url).searchParams.get(t)??"";function Se(e,t){let n=Math.floor(Math.max(0,t-Number(e))/60),[r,o]=n<60?[n,"minute"]:n<1440?[Math.floor(n/60),"hour"]:[Math.floor(n/1440),"day"];return`${r} ${o}${r===1?"":"s"} ago`}var Lt=e=>new Date(Number(e)*1e3).toISOString().slice(0,19);function Rn(e){try{return new URL(String(e)).hostname.replace(/^www\./,"")}catch{return""}}var Tt=`${Un}
29
+ .sign-in { max-width: none; margin: 0; padding: 0 0 16px; }
30
+ .sign-in-mark { display: none; }
31
+ .sign-in-heading { text-align: left; font-weight: bold; font-size: 10pt; margin: 0 0 8px; }
32
+ .sign-in-box { border: 0; padding: 0; align-items: flex-start; gap: 2px; }
33
+ .sign-in-box input[type=text], .sign-in-box input[type=password] { border: 1px solid #767676; border-radius: 0; padding: 1px 2px; margin-bottom: 4px; font-family: inherit; }
34
+ .sign-in-submit { border-radius: 0; padding: 1px 6px; background: #efefef; border-color: #767676; font-weight: normal; font-family: inherit; }
35
+ `;async function O(e,t,n,r=200){let o=F(e),i=o?M(e,o)?.karma:void 0,a=o?await Te(e,o,It(e)):"",s=g("div",{className:"hn-top",children:[c("a",{className:"hn-logo",href:"news",children:"Y"}),c("b",{className:"hn-name",children:c("a",{href:"news",children:"Hacker News"})}),c("a",{href:"newest",children:"new"}),"\xA0|\xA0",c("a",{href:"show",children:"show"}),"\xA0|\xA0",c("a",{href:"submit",children:"submit"}),c("span",{className:"hn-right",children:o?g(Ce,{children:[c("a",{href:`user?id=${o}`,children:o}),"\xA0(",String(i??1),")\xA0|\xA0",c("a",{href:a,children:"logout"})]}):c("a",{href:`login?goto=${encodeURIComponent(It(e))}`,children:"login"})})]}),m=jt({title:t,css:[ie,Tt],body:g("div",{className:"hn",children:[s,c("div",{className:"hn-body",children:n})]}),status:r});return new Response(se(await m.text(),K(e)),{status:r,headers:m.headers})}function It(e){let t=new URL(e.call.request.url);return t.pathname.replace(/\/+$/,"")==="/login"?t.searchParams.get("goto")||"news":`${t.pathname.replace(/^\/+/,"")||"news"}${t.search}`}var Ee=(e,t=200)=>new Response(e,{status:t,headers:{"content-type":"text/plain; charset=utf-8"}});function ke(){return Ee("No such item.")}function Ut(){return Ee("No such user.")}function Ft(){return Ee("Unknown.",404)}async function G(e,t,n){let r=(i,a,s)=>{let m=a?"-new":"";return g("div",{className:"sign-in",children:[c("h1",{className:"sign-in-heading",children:i}),g("form",{method:"post",className:"sign-in-box",children:[a?c("input",{type:"hidden",name:"creating",value:"t"}):null,c("label",{htmlFor:`acct${m}`,children:"username:"}),c("input",{id:`acct${m}`,name:"acct",type:"text",autoComplete:"username"}),c("label",{htmlFor:`pw${m}`,children:"password:"}),c("input",{id:`pw${m}`,name:"pw",type:"password",autoComplete:a?"new-password":"current-password"}),c("button",{type:"submit",className:"sign-in-submit",children:s})]})]})},o=jt({title:t,css:[ie,Tt],body:g("div",{className:"hn-body",children:[n?c("p",{className:"hn-message",children:n}):null,r("Login",!1,"login"),r("Create Account",!0,"create account")]})});return new Response(se(await o.text(),K(e)),{status:200,headers:o.headers})}async function We(e,t,n){let r=new Map;for(let o of n)t&&(o.by===t||Ie(e,t,String(o.id)))||r.set(Number(o.id),t?await ge(e,t,String(o.id)):"");return r}function ve(e){let t=Number(e.post.id);if(e.user&&e.post.by===e.user)return c("span",{className:"hn-arrow",style:{color:"#ff6600"},children:"*"});if(!e.links.has(t))return c("span",{className:"hn-arrow"});let n=e.links.get(t);return c("a",{className:"hn-arrow",id:`up_${t}`,"aria-label":"upvote",title:"upvote",href:`vote?id=${t}&how=up${n?`&auth=${n}`:""}&goto=${encodeURIComponent(e.goto)}`,children:"\u25B2"})}function Me(e){let t=e.story,n=Number(t.descendants??0);return g("span",{className:"hn-sub",children:[g("span",{className:"score",id:`score_${String(t.id)}`,children:[String(t.score??1)," point",Number(t.score??1)===1?"":"s"]})," by ",c("a",{href:`user?id=${String(t.by)}`,children:String(t.by)})," ",c("span",{className:"age",title:Lt(t.time),children:c("a",{href:`item?id=${String(t.id)}`,children:Se(t.time,e.now)})})," | ",c("a",{href:`item?id=${String(t.id)}`,children:n===0?"discuss":`${n}\xA0comment${n===1?"":"s"}`})]})}function Be(e){let t=e.story;return g("span",{className:"hn-title",children:[c("a",{href:t.url?String(t.url):`item?id=${String(t.id)}`,children:String(t.title??"")}),t.url?g("span",{className:"hn-site",children:[" (",c("span",{children:Rn(t.url)}),")"]}):null]})}async function A(e,t,n,r,o){let i=F(e),a=N(e),s=n.slice(0,30),m=await We(e,i,s);return O(e,t,g(Ce,{children:[o?c("p",{className:"hn-message",children:o}):null,c("table",{children:c("tbody",{children:s.flatMap((l,f)=>[g("tr",{id:String(l.id),children:[g("td",{className:"hn-rank",children:[f+1,"."]}),c("td",{className:"hn-arrow",children:c(ve,{post:l,user:i,links:m,goto:r})}),c("td",{children:c(Be,{story:l})})]},`t${String(l.id)}`),g("tr",{children:[c("td",{colSpan:2}),c("td",{children:c(Me,{story:l,now:a})})]},`s${String(l.id)}`),c("tr",{style:{height:"5px"}},`g${String(l.id)}`)])})})]}))}function ze(e){let t=e.comment,n=`item?id=${String(e.story.id)}`;return g(Ce,{children:[g("div",{className:"hn-comment",id:String(t.id),style:{marginLeft:`${e.depth*40}px`},children:[c(ve,{post:t,user:e.user,links:e.links,goto:n})," ",g("span",{className:"hn-sub",children:[c("a",{href:`user?id=${String(t.by)}`,children:String(t.by)})," ",c("span",{className:"age",title:Lt(t.time),children:c("a",{href:`item?id=${String(t.id)}`,children:Se(t.time,e.now)})})]}),c("div",{className:"hn-text",dangerouslySetInnerHTML:{__html:String(t.text??"")}}),c("a",{className:"hn-reply",href:`reply?id=${String(t.id)}&goto=${encodeURIComponent(`${n}#${String(t.id)}`)}`,children:"reply"})]}),(t.kids??[]).map(r=>e.read(r)).filter(r=>!!r).map(r=>c(ze,{comment:r,depth:e.depth+1,story:e.story,user:e.user,links:e.links,now:e.now,read:e.read},String(r.id)))]})}function Rt(e,t){let n=[],r=o=>{for(let i of o.kids??[]){let a=t(i);a&&(n.push(a),r(a))}};return r(e),n}async function Ct(e){return new URL(e.call.request.url).pathname.replace(/\/+$/,"")===""?A(e,"Hacker News",j(e,N(e)),"news"):Ft()}import{jsx as u,jsxs as P,Fragment as Cn}from"../../engine/v3/react_jsx-runtime.mjs";async function Et(e){let t=N(e),n=re(e,B(e,"id"),t);if(!n)return ke();let r=F(e),o=we(e,n)??n,i=`item?id=${String(n.id)}`,a=d=>re(e,d,t),s=Rt(n,a),m=await We(e,r,[n,...s]),l=await T(e,r??"",String(n.id)),f=n.type==="story"?`${String(n.title??"")} | Hacker News`:`${String(n.by)} comment | Hacker News`;return O(e,f,P(Cn,{children:[u("table",{children:P("tbody",{children:[P("tr",{id:String(n.id),children:[u("td",{className:"hn-arrow",children:u(ve,{post:n,user:r,links:m,goto:i})}),u("td",{children:n.type==="story"?u(Be,{story:n}):P("span",{className:"hn-sub",children:[u("a",{href:`user?id=${String(n.by)}`,children:String(n.by)})," | on: ",u("a",{href:`item?id=${String(o.id)}`,children:String(o.title??"")})]})})]}),n.type==="story"?P("tr",{children:[u("td",{}),u("td",{children:u(Me,{story:n,now:t})})]}):null,n.text?P("tr",{children:[u("td",{}),u("td",{children:u("div",{className:"hn-text",dangerouslySetInnerHTML:{__html:String(n.text)}})})]}):null,je(o,t)?P("tr",{children:[u("td",{}),P("td",{children:[u("br",{}),P("form",{method:"post",action:"comment",children:[u("input",{type:"hidden",name:"parent",value:String(n.id)}),u("input",{type:"hidden",name:"goto",value:i}),u("input",{type:"hidden",name:"hmac",value:l}),u("textarea",{name:"text",rows:8,cols:80,"aria-label":"comment"}),u("br",{}),u("br",{}),u("input",{type:"submit",value:"add comment"})]})]})]}):null]})}),u("br",{}),(n.kids??[]).map(d=>a(d)).filter(d=>!!d).map(d=>u(ze,{comment:d,depth:0,story:o,user:r,links:m,now:t,read:a},String(d.id)))]}))}async function Wt(e){return G(e,"Login")}async function Mt(e){return A(e,"New Links | Hacker News",he(e),"newest")}async function Bt(e){return A(e,"Hacker News",j(e,N(e)),"news")}import{jsx as x,jsxs as Ne,Fragment as En}from"../../engine/v3/react_jsx-runtime.mjs";async function zt(e){let t=v(e,B(e,"id"));if(!t)return ke();let n=F(e),r=b(B(e,"goto"),`item?id=${String(t.id)}`);if(!n)return G(e,"Add Comment | Hacker News","You have to be logged in to reply.");let o=await T(e,n,String(t.id));return O(e,"Add Comment | Hacker News",Ne(En,{children:[Ne("div",{className:"hn-comment",children:[Ne("span",{className:"hn-sub",children:[x("a",{href:`user?id=${String(t.by)}`,children:String(t.by)})," ",x("a",{href:`item?id=${String(t.id)}`,children:Se(t.time,N(e))})]}),t.type==="comment"?x("div",{className:"hn-text",dangerouslySetInnerHTML:{__html:String(t.text??"")}}):x("div",{className:"hn-text",children:String(t.title??"")})]}),Ne("form",{method:"post",action:"comment",children:[x("input",{type:"hidden",name:"parent",value:String(t.id)}),x("input",{type:"hidden",name:"goto",value:r}),x("input",{type:"hidden",name:"hmac",value:o}),x("textarea",{name:"text",rows:8,cols:80,"aria-label":"reply",autoFocus:!0}),x("br",{}),x("br",{}),x("input",{type:"submit",value:t.type==="comment"?"reply":"add comment"})]})]}))}import{jsx as Z,Fragment as Wn,jsxs as Mn}from"../../engine/v3/react_jsx-runtime.mjs";async function Dt(e){let t=Mn(Wn,{children:["Please read the Show HN ",Z("a",{href:"https://news.ycombinator.com/showhn.html",target:"_blank",rel:"noopener noreferrer",children:Z("u",{children:"rules"})})," and ",Z("a",{href:"https://news.ycombinator.com/item?id=22336638",target:"_blank",rel:"noopener noreferrer",children:Z("u",{children:"tips"})})," before posting. You can browse the newest Show HNs ",Z("a",{href:"shownew",children:Z("u",{children:"here"})}),"."]});return A(e,"Show | Hacker News",Ze(e,N(e)),"show",t)}async function Vt(e){return A(e,"New Show | Hacker News",fe(e),"shownew")}import{jsx as h,jsxs as z}from"../../engine/v3/react_jsx-runtime.mjs";async function Yt(e){let t=F(e);if(!t)return G(e,"Submit | Hacker News","You have to be logged in to submit.");let n=await ne(e,t);return O(e,"Submit | Hacker News",z("form",{method:"post",action:"r",children:[h("input",{type:"hidden",name:"fnid",value:n}),h("input",{type:"hidden",name:"fnop",value:"submit-page"}),h("table",{children:z("tbody",{children:[z("tr",{children:[h("td",{children:h("label",{htmlFor:"title",children:"title"})}),h("td",{children:h("input",{type:"text",id:"title",name:"title",size:50,autoFocus:!0})})]}),z("tr",{children:[h("td",{children:h("label",{htmlFor:"url",children:"url"})}),h("td",{children:h("input",{type:"url",id:"url",name:"url",size:50})})]}),z("tr",{children:[h("td",{children:h("label",{htmlFor:"text",children:"text"})}),h("td",{children:h("textarea",{id:"text",name:"text",rows:4,cols:49})})]}),z("tr",{children:[h("td",{}),h("td",{children:h("input",{type:"submit",value:"submit"})})]}),z("tr",{children:[h("td",{}),h("td",{className:"hn-sub",children:"Leave url blank to submit a question for discussion. To share something you made, begin the title with Show HN."})]})]})})]}))}import{jsx as q,jsxs as de}from"../../engine/v3/react_jsx-runtime.mjs";var Bn=e=>new Date(Number(e)*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"});async function Kt(e){let t=M(e,B(e,"id"));return t?O(e,`Profile: ${String(t.id)} | Hacker News`,q("table",{children:de("tbody",{children:[de("tr",{children:[q("td",{children:"user:"}),q("td",{children:q("a",{className:"hnuser",href:`user?id=${String(t.id)}`,children:String(t.id)})})]}),de("tr",{children:[q("td",{children:"created:"}),q("td",{children:Bn(t.created)})]}),de("tr",{children:[q("td",{children:"karma:"}),q("td",{children:String(t.karma??1)})]}),de("tr",{children:[q("td",{children:"about:"}),q("td",{dangerouslySetInnerHTML:{__html:String(t.about??"")}})]})]})})):Ut()}function De(e={}){return zn({manifest:C,surface:le,handlers:Pt,doors:Re,board:vt,screens:{front:Ct,item:Et,login:Wt,newest:Mt,news:Bt,reply:zt,show:Dt,shownew:Vt,submit:Yt,user:Kt}},e)}function Ve(e={}){return Dn(ce,{api:{fetch:Fe(e),manifest:R},site:{fetch:De(e),manifest:C}})}import{serveHttp as Vo}from"../../engine/v3/volter_world-core.mjs";var ns=Yn(Vn(ce,{api:{manifest:R,surface:me},site:{manifest:C,surface:le}}));export{Ve as createTwinFetch};
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ @agenttwin/twin-huggingface
2
+
3
+ Contains @volter/twin-huggingface 1.0.0 by Volter (https://github.com/volter-ai),
4
+ licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ Modified by AgentTwin: bundled and minified into one file; only code reachable from the pack's
7
+ fetch factory is included; shared modules are imported from the AgentTwin twin engine.