@hanzo/dev 4.0.1 → 4.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 (371) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{BinaryViewer-qn8xfPZp.js → BinaryViewer-CmFUK4zZ.js} +2 -2
  3. package/dist/{ChatMarkdown-Cyujn3JJ.js → ChatMarkdown-nvEI7iCv.js} +4 -4
  4. package/dist/{DiffCommentAnnotation-BZu1TP6E.js → DiffCommentAnnotation-BPTN_2a6.js} +1 -1
  5. package/dist/{DiffFileTree-CcJ91zOM.js → DiffFileTree-B_br90vY.js} +2 -2
  6. package/dist/{DiffPanel-BXC88NMs.js → DiffPanel-V5R5TPuK.js} +5 -5
  7. package/dist/{ExpandedImageDialog-BZnGRBJR.js → ExpandedImageDialog-CAorLacL.js} +1 -1
  8. package/dist/{FileExplorerPane-vBJS6V75.js → FileExplorerPane-CeHulcPz.js} +1 -1
  9. package/dist/{FilePreviewPanel-jJHWsMzm.js → FilePreviewPanel-BVNLvWOc.js} +8 -8
  10. package/dist/{MermaidDiagram-paNwQY33.js → MermaidDiagram-CTolIzQD.js} +1 -1
  11. package/dist/{MermaidFilePreview-B9KxfnIN.js → MermaidFilePreview-CP2zP4FU.js} +1 -1
  12. package/dist/{MermaidViewer-CAEGpLyD.js → MermaidViewer-BDfYkS9E.js} +2 -2
  13. package/dist/{NotebookPreview-D01mMCpR.js → NotebookPreview-Cybs5uM0.js} +1 -1
  14. package/dist/{OfficeFilePreview-DWaRgfQU.js → OfficeFilePreview-7JsmSoKU.js} +1 -1
  15. package/dist/{OfficeViewer-BudrZbBA.js → OfficeViewer-CJoojlJK.js} +1 -1
  16. package/dist/{OpenInPicker-Dd3ifHa1.js → OpenInPicker-BIMWUxBP.js} +7 -7
  17. package/dist/{OpenXmlOfficeViewer-CXcKdq7k.js → OpenXmlOfficeViewer-C24Kj8DM.js} +1 -1
  18. package/dist/{PreviewImage-C4Ku4z7v.js → PreviewImage-oY5YnuTr.js} +1 -1
  19. package/dist/{PreviewImageContent-BwOB9Lyd.js → PreviewImageContent-n6eLzY99.js} +1 -1
  20. package/dist/{PullRequestCodeTab-BcwyMk7d.js → PullRequestCodeTab-Dv_0kVad.js} +7 -7
  21. package/dist/{PullRequestReviewAnnotation-BU5t_1fC.js → PullRequestReviewAnnotation-LeuwO-iH.js} +4 -4
  22. package/dist/builder/activity.d.ts +16 -0
  23. package/dist/builder/activity.js +51 -0
  24. package/dist/builder/address.d.ts +11 -0
  25. package/dist/builder/address.js +50 -0
  26. package/dist/builder/ago.d.ts +2 -0
  27. package/dist/builder/ago.js +18 -0
  28. package/dist/builder/api/agents.d.ts +139 -0
  29. package/dist/builder/api/agents.js +253 -0
  30. package/dist/builder/api/auto.d.ts +166 -0
  31. package/dist/builder/api/auto.js +300 -0
  32. package/dist/builder/api/billing.d.ts +263 -0
  33. package/dist/builder/api/billing.js +401 -0
  34. package/dist/builder/api/call.d.ts +53 -0
  35. package/dist/builder/api/call.js +123 -0
  36. package/dist/builder/api/capabilities.d.ts +14 -0
  37. package/dist/builder/api/capabilities.js +41 -0
  38. package/dist/builder/api/changes.d.ts +74 -0
  39. package/dist/builder/api/changes.js +75 -0
  40. package/dist/builder/api/chat.d.ts +12 -0
  41. package/dist/builder/api/chat.js +28 -0
  42. package/dist/builder/api/cli.d.ts +59 -0
  43. package/dist/builder/api/cli.js +133 -0
  44. package/dist/builder/api/codebases.d.ts +46 -0
  45. package/dist/builder/api/codebases.js +100 -0
  46. package/dist/builder/api/coding.d.ts +117 -0
  47. package/dist/builder/api/coding.js +222 -0
  48. package/dist/builder/api/connectors.d.ts +76 -0
  49. package/dist/builder/api/connectors.js +111 -0
  50. package/dist/builder/api/consent.d.ts +22 -0
  51. package/dist/builder/api/consent.js +28 -0
  52. package/dist/builder/api/conversations.d.ts +20 -0
  53. package/dist/builder/api/conversations.js +23 -0
  54. package/dist/builder/api/draft.d.ts +38 -0
  55. package/dist/builder/api/draft.js +87 -0
  56. package/dist/builder/api/environment.d.ts +55 -0
  57. package/dist/builder/api/environment.js +126 -0
  58. package/dist/builder/api/gallery.d.ts +32 -0
  59. package/dist/builder/api/gallery.js +85 -0
  60. package/dist/builder/api/git.d.ts +59 -0
  61. package/dist/builder/api/git.js +117 -0
  62. package/dist/builder/api/github.d.ts +230 -0
  63. package/dist/builder/api/github.js +373 -0
  64. package/dist/builder/api/keys.d.ts +35 -0
  65. package/dist/builder/api/keys.js +72 -0
  66. package/dist/builder/api/library.d.ts +116 -0
  67. package/dist/builder/api/library.js +214 -0
  68. package/dist/builder/api/limits.d.ts +69 -0
  69. package/dist/builder/api/limits.js +86 -0
  70. package/dist/builder/api/links.d.ts +51 -0
  71. package/dist/builder/api/links.js +75 -0
  72. package/dist/builder/api/machines.d.ts +122 -0
  73. package/dist/builder/api/machines.js +238 -0
  74. package/dist/builder/api/mcp.d.ts +10 -0
  75. package/dist/builder/api/mcp.js +47 -0
  76. package/dist/builder/api/members.d.ts +35 -0
  77. package/dist/builder/api/members.js +95 -0
  78. package/dist/builder/api/memory.d.ts +14 -0
  79. package/dist/builder/api/memory.js +35 -0
  80. package/dist/builder/api/models.d.ts +17 -0
  81. package/dist/builder/api/models.js +20 -0
  82. package/dist/builder/api/places.d.ts +32 -0
  83. package/dist/builder/api/places.js +29 -0
  84. package/dist/builder/api/platform.d.ts +68 -0
  85. package/dist/builder/api/platform.js +87 -0
  86. package/dist/builder/api/plugins.d.ts +42 -0
  87. package/dist/builder/api/plugins.js +175 -0
  88. package/dist/builder/api/pref.d.ts +77 -0
  89. package/dist/builder/api/pref.js +93 -0
  90. package/dist/builder/api/profile.d.ts +11 -0
  91. package/dist/builder/api/profile.js +41 -0
  92. package/dist/builder/api/projects.d.ts +99 -0
  93. package/dist/builder/api/projects.js +166 -0
  94. package/dist/builder/api/provider.d.ts +49 -0
  95. package/dist/builder/api/provider.js +96 -0
  96. package/dist/builder/api/sandbox.d.ts +90 -0
  97. package/dist/builder/api/sandbox.js +223 -0
  98. package/dist/builder/api/sessions.d.ts +123 -0
  99. package/dist/builder/api/sessions.js +255 -0
  100. package/dist/builder/api/skills.d.ts +82 -0
  101. package/dist/builder/api/skills.js +117 -0
  102. package/dist/builder/api/sse.d.ts +24 -0
  103. package/dist/builder/api/sse.js +68 -0
  104. package/dist/builder/api/studio.d.ts +59 -0
  105. package/dist/builder/api/studio.js +91 -0
  106. package/dist/builder/api/talk.d.ts +48 -0
  107. package/dist/builder/api/talk.js +81 -0
  108. package/dist/builder/api/tools.d.ts +34 -0
  109. package/dist/builder/api/tools.js +37 -0
  110. package/dist/builder/api/turn.d.ts +202 -0
  111. package/dist/builder/api/turn.js +772 -0
  112. package/dist/builder/api/verdict.d.ts +3 -0
  113. package/dist/builder/api/verdict.js +21 -0
  114. package/dist/builder/api/webhooks.d.ts +47 -0
  115. package/dist/builder/api/webhooks.js +82 -0
  116. package/dist/builder/api/work.d.ts +110 -0
  117. package/dist/builder/api/work.js +218 -0
  118. package/dist/builder/ask.d.ts +51 -0
  119. package/dist/builder/ask.js +147 -0
  120. package/dist/builder/automations.d.ts +33 -0
  121. package/dist/builder/automations.js +453 -0
  122. package/dist/builder/awake.d.ts +24 -0
  123. package/dist/builder/awake.js +68 -0
  124. package/dist/builder/back.d.ts +30 -0
  125. package/dist/builder/back.js +105 -0
  126. package/dist/builder/builder.d.ts +12 -0
  127. package/dist/builder/builder.js +162 -0
  128. package/dist/builder/carry.d.ts +48 -0
  129. package/dist/builder/carry.js +278 -0
  130. package/dist/builder/choice.d.ts +134 -0
  131. package/dist/builder/choice.js +152 -0
  132. package/dist/builder/claims.d.ts +13 -0
  133. package/dist/builder/claims.js +35 -0
  134. package/dist/builder/clipboard.d.ts +2 -0
  135. package/dist/builder/clipboard.js +10 -0
  136. package/dist/builder/customize/agents.d.ts +11 -0
  137. package/dist/builder/customize/agents.js +513 -0
  138. package/dist/builder/customize/connectors.d.ts +2 -0
  139. package/dist/builder/customize/connectors.js +319 -0
  140. package/dist/builder/customize/drafted.d.ts +4 -0
  141. package/dist/builder/customize/drafted.js +92 -0
  142. package/dist/builder/customize/index.d.ts +8 -0
  143. package/dist/builder/customize/index.js +127 -0
  144. package/dist/builder/customize/inventory.d.ts +14 -0
  145. package/dist/builder/customize/inventory.js +127 -0
  146. package/dist/builder/customize/load.d.ts +9 -0
  147. package/dist/builder/customize/load.js +22 -0
  148. package/dist/builder/customize/ocean.d.ts +41 -0
  149. package/dist/builder/customize/ocean.js +332 -0
  150. package/dist/builder/customize/plugins.d.ts +2 -0
  151. package/dist/builder/customize/plugins.js +136 -0
  152. package/dist/builder/customize/roles.d.ts +4 -0
  153. package/dist/builder/customize/roles.js +105 -0
  154. package/dist/builder/customize/say.d.ts +13 -0
  155. package/dist/builder/customize/say.js +32 -0
  156. package/dist/builder/customize/skills.d.ts +2 -0
  157. package/dist/builder/customize/skills.js +208 -0
  158. package/dist/builder/customize/ui.d.ts +152 -0
  159. package/dist/builder/customize/ui.js +208 -0
  160. package/dist/builder/data.d.ts +57 -0
  161. package/dist/builder/data.js +322 -0
  162. package/dist/builder/design.d.ts +140 -0
  163. package/dist/builder/design.js +175 -0
  164. package/dist/builder/desk.d.ts +48 -0
  165. package/dist/builder/desk.js +449 -0
  166. package/dist/builder/dev-mode.d.ts +43 -0
  167. package/dist/builder/dev-mode.js +120 -0
  168. package/dist/builder/door.d.ts +11 -0
  169. package/dist/builder/door.js +126 -0
  170. package/dist/builder/environment.d.ts +23 -0
  171. package/dist/builder/environment.js +193 -0
  172. package/dist/builder/files.d.ts +23 -0
  173. package/dist/builder/files.js +175 -0
  174. package/dist/builder/find.d.ts +7 -0
  175. package/dist/builder/find.js +80 -0
  176. package/dist/builder/foot.d.ts +30 -0
  177. package/dist/builder/foot.js +79 -0
  178. package/dist/builder/forge.d.ts +4 -0
  179. package/dist/builder/forge.js +639 -0
  180. package/dist/builder/gear.d.ts +60 -0
  181. package/dist/builder/gear.js +180 -0
  182. package/dist/builder/git.d.ts +21 -0
  183. package/dist/builder/git.js +118 -0
  184. package/dist/builder/github-sync.d.ts +70 -0
  185. package/dist/builder/github-sync.js +435 -0
  186. package/dist/builder/gutter.d.ts +17 -0
  187. package/dist/builder/gutter.js +25 -0
  188. package/dist/builder/handoff.d.ts +8 -0
  189. package/dist/builder/handoff.js +22 -0
  190. package/dist/builder/host.d.ts +189 -0
  191. package/dist/builder/host.js +46 -0
  192. package/dist/builder/index.d.ts +108 -0
  193. package/dist/builder/index.js +99 -0
  194. package/dist/builder/landing.d.ts +34 -0
  195. package/dist/builder/landing.js +725 -0
  196. package/dist/builder/library.d.ts +21 -0
  197. package/dist/builder/library.js +526 -0
  198. package/dist/builder/local.d.ts +80 -0
  199. package/dist/builder/local.js +124 -0
  200. package/dist/builder/make.d.ts +10 -0
  201. package/dist/builder/make.js +120 -0
  202. package/dist/builder/markdown.d.ts +49 -0
  203. package/dist/builder/markdown.js +125 -0
  204. package/dist/builder/marks.d.ts +15 -0
  205. package/dist/builder/marks.js +18 -0
  206. package/dist/builder/merge.d.ts +223 -0
  207. package/dist/builder/merge.js +380 -0
  208. package/dist/builder/meter.d.ts +31 -0
  209. package/dist/builder/meter.js +54 -0
  210. package/dist/builder/mind.d.ts +107 -0
  211. package/dist/builder/mind.js +335 -0
  212. package/dist/builder/names.d.ts +40 -0
  213. package/dist/builder/names.js +189 -0
  214. package/dist/builder/nav.d.ts +28 -0
  215. package/dist/builder/nav.js +218 -0
  216. package/dist/builder/out.d.ts +16 -0
  217. package/dist/builder/out.js +24 -0
  218. package/dist/builder/page.d.ts +55 -0
  219. package/dist/builder/page.js +217 -0
  220. package/dist/builder/pane.d.ts +30 -0
  221. package/dist/builder/pane.js +21 -0
  222. package/dist/builder/panel.d.ts +101 -0
  223. package/dist/builder/panel.js +408 -0
  224. package/dist/builder/pdf.d.ts +139 -0
  225. package/dist/builder/pdf.js +847 -0
  226. package/dist/builder/pick.d.ts +10 -0
  227. package/dist/builder/pick.js +38 -0
  228. package/dist/builder/plain.d.ts +59 -0
  229. package/dist/builder/plain.js +209 -0
  230. package/dist/builder/plan.d.ts +63 -0
  231. package/dist/builder/plan.js +155 -0
  232. package/dist/builder/plans.d.ts +1 -0
  233. package/dist/builder/plans.js +157 -0
  234. package/dist/builder/plugin.d.ts +60 -0
  235. package/dist/builder/plugin.js +1 -0
  236. package/dist/builder/plugins/design.d.ts +8 -0
  237. package/dist/builder/plugins/design.js +71 -0
  238. package/dist/builder/plugins/index.d.ts +46 -0
  239. package/dist/builder/plugins/index.js +117 -0
  240. package/dist/builder/plugins/pdf.d.ts +18 -0
  241. package/dist/builder/plugins/pdf.js +83 -0
  242. package/dist/builder/plugins/project.d.ts +5 -0
  243. package/dist/builder/plugins/project.js +68 -0
  244. package/dist/builder/plugins/research.d.ts +24 -0
  245. package/dist/builder/plugins/research.js +147 -0
  246. package/dist/builder/plugins/sketch.d.ts +9 -0
  247. package/dist/builder/plugins/sketch.js +101 -0
  248. package/dist/builder/plugins/slides.d.ts +14 -0
  249. package/dist/builder/plugins/slides.js +55 -0
  250. package/dist/builder/plugins/template.d.ts +13 -0
  251. package/dist/builder/plugins/template.js +95 -0
  252. package/dist/builder/prefs.d.ts +29 -0
  253. package/dist/builder/prefs.js +91 -0
  254. package/dist/builder/preview-url.d.ts +47 -0
  255. package/dist/builder/preview-url.js +107 -0
  256. package/dist/builder/project.d.ts +18 -0
  257. package/dist/builder/project.js +604 -0
  258. package/dist/builder/prose.d.ts +4 -0
  259. package/dist/builder/prose.js +57 -0
  260. package/dist/builder/publish.d.ts +18 -0
  261. package/dist/builder/publish.js +141 -0
  262. package/dist/builder/question.d.ts +33 -0
  263. package/dist/builder/question.js +64 -0
  264. package/dist/builder/redesign.d.ts +32 -0
  265. package/dist/builder/redesign.js +117 -0
  266. package/dist/builder/removal.d.ts +71 -0
  267. package/dist/builder/removal.js +73 -0
  268. package/dist/builder/reply.d.ts +50 -0
  269. package/dist/builder/reply.js +196 -0
  270. package/dist/builder/roles.d.ts +10 -0
  271. package/dist/builder/roles.js +28 -0
  272. package/dist/builder/route.d.ts +85 -0
  273. package/dist/builder/route.js +126 -0
  274. package/dist/builder/run.d.ts +4 -0
  275. package/dist/builder/run.js +804 -0
  276. package/dist/builder/runmeta.d.ts +16 -0
  277. package/dist/builder/runmeta.js +69 -0
  278. package/dist/builder/say.d.ts +2 -0
  279. package/dist/builder/say.js +7 -0
  280. package/dist/builder/scheduled.d.ts +3 -0
  281. package/dist/builder/scheduled.js +328 -0
  282. package/dist/builder/section.d.ts +27 -0
  283. package/dist/builder/section.js +60 -0
  284. package/dist/builder/settings/account.d.ts +1 -0
  285. package/dist/builder/settings/account.js +111 -0
  286. package/dist/builder/settings/billing.d.ts +1 -0
  287. package/dist/builder/settings/billing.js +210 -0
  288. package/dist/builder/settings/capabilities.d.ts +1 -0
  289. package/dist/builder/settings/capabilities.js +66 -0
  290. package/dist/builder/settings/card.d.ts +31 -0
  291. package/dist/builder/settings/card.js +140 -0
  292. package/dist/builder/settings/code.d.ts +1 -0
  293. package/dist/builder/settings/code.js +70 -0
  294. package/dist/builder/settings/credits.d.ts +10 -0
  295. package/dist/builder/settings/credits.js +123 -0
  296. package/dist/builder/settings/environments.d.ts +1 -0
  297. package/dist/builder/settings/environments.js +60 -0
  298. package/dist/builder/settings/general.d.ts +1 -0
  299. package/dist/builder/settings/general.js +58 -0
  300. package/dist/builder/settings/index.d.ts +4 -0
  301. package/dist/builder/settings/index.js +25 -0
  302. package/dist/builder/settings/integrations.d.ts +8 -0
  303. package/dist/builder/settings/integrations.js +138 -0
  304. package/dist/builder/settings/keys.d.ts +1 -0
  305. package/dist/builder/settings/keys.js +114 -0
  306. package/dist/builder/settings/list.d.ts +10 -0
  307. package/dist/builder/settings/list.js +28 -0
  308. package/dist/builder/settings/machines.d.ts +4 -0
  309. package/dist/builder/settings/machines.js +243 -0
  310. package/dist/builder/settings/members.d.ts +1 -0
  311. package/dist/builder/settings/members.js +77 -0
  312. package/dist/builder/settings/memory.d.ts +1 -0
  313. package/dist/builder/settings/memory.js +62 -0
  314. package/dist/builder/settings/notifications.d.ts +1 -0
  315. package/dist/builder/settings/notifications.js +111 -0
  316. package/dist/builder/settings/plan.d.ts +17 -0
  317. package/dist/builder/settings/plan.js +131 -0
  318. package/dist/builder/settings/privacy.d.ts +1 -0
  319. package/dist/builder/settings/privacy.js +76 -0
  320. package/dist/builder/settings/sections.d.ts +16 -0
  321. package/dist/builder/settings/sections.js +34 -0
  322. package/dist/builder/settings/shared.d.ts +6 -0
  323. package/dist/builder/settings/shared.js +58 -0
  324. package/dist/builder/settings/ui.d.ts +50 -0
  325. package/dist/builder/settings/ui.js +53 -0
  326. package/dist/builder/settings/usage.d.ts +1 -0
  327. package/dist/builder/settings/usage.js +24 -0
  328. package/dist/builder/shared.d.ts +26 -0
  329. package/dist/builder/shared.js +15 -0
  330. package/dist/builder/shelf.d.ts +16 -0
  331. package/dist/builder/shelf.js +219 -0
  332. package/dist/builder/side.d.ts +40 -0
  333. package/dist/builder/side.js +208 -0
  334. package/dist/builder/site.d.ts +75 -0
  335. package/dist/builder/site.js +138 -0
  336. package/dist/builder/spend.d.ts +21 -0
  337. package/dist/builder/spend.js +80 -0
  338. package/dist/builder/standing.d.ts +36 -0
  339. package/dist/builder/standing.js +66 -0
  340. package/dist/builder/suggest.d.ts +238 -0
  341. package/dist/builder/suggest.js +463 -0
  342. package/dist/builder/suggestions.d.ts +49 -0
  343. package/dist/builder/suggestions.js +260 -0
  344. package/dist/builder/summary.d.ts +60 -0
  345. package/dist/builder/summary.js +81 -0
  346. package/dist/builder/sync.d.ts +1 -0
  347. package/dist/builder/sync.js +187 -0
  348. package/dist/builder/tabs.d.ts +85 -0
  349. package/dist/builder/tabs.js +288 -0
  350. package/dist/builder/talk.d.ts +5 -0
  351. package/dist/builder/talk.js +108 -0
  352. package/dist/builder/thread.d.ts +60 -0
  353. package/dist/builder/thread.js +302 -0
  354. package/dist/builder/tools.d.ts +22 -0
  355. package/dist/builder/tools.js +52 -0
  356. package/dist/builder/transcript.d.ts +47 -0
  357. package/dist/builder/transcript.js +108 -0
  358. package/dist/builder/voice.d.ts +8 -0
  359. package/dist/builder/voice.js +24 -0
  360. package/dist/{changedFileKind-DqgCCDUs.js → changedFileKind-D6QYvIez.js} +1 -1
  361. package/dist/core.js +1 -0
  362. package/dist/{decodeImagePreview-CesVZYP4.js → decodeImagePreview-DnfFEjhw.js} +1 -1
  363. package/dist/{embed-DYP-OUlb.js → embed-c030vUqM.js} +11 -11
  364. package/dist/index.d.ts +2 -0
  365. package/dist/index.js +2 -1
  366. package/dist/{micromark-util-decode-string-NQjVkmZH.js → micromark-util-decode-string-C-5AXkOV.js} +5 -3
  367. package/dist/{readBinaryPreview-D2X4Uahu.js → readBinaryPreview-BAQ4fFjm.js} +1 -1
  368. package/dist/{useTextFieldSpeech-CyOZZPrV.js → useTextFieldSpeech-COa9XcRx.js} +1 -1
  369. package/package.json +101 -11
  370. /package/{index.d.ts → dist/core.d.ts} +0 -0
  371. /package/{keymap.d.ts → dist/keymap.d.ts} +0 -0
@@ -0,0 +1,189 @@
1
+ /**
2
+ * What a person calls a device or a shell (hanzo-inc/app issue 311).
3
+ *
4
+ * A machine reports its hostname: `Alexs-MacBook-Pro.local`, and its hardware
5
+ * beside it. A person reads a name: "Alex's MacBook Pro". `friendly` turns the
6
+ * hostname into that name. The hardware, the hostname and the chip stay in the
7
+ * detail (`formatDeviceLabel`).
8
+ *
9
+ * A person can also rename a device or a shell. Their name wins everywhere the
10
+ * device is drawn: Dev's "where to run", Settings → Machines, Tabs and the
11
+ * sidebar. It is kept per person on the account (`/v1/pref`, key
12
+ * `deviceNames`), so it follows them to every surface. It is not kept on the
13
+ * machine's record: `hanzo beat` re-registers the record under its hostname on
14
+ * every heartbeat, which would undo the rename within a minute. A copy is also
15
+ * kept in this browser, so the first frame already has it.
16
+ *
17
+ * A name is kept under the device's key (`deviceKey`). That key is the same
18
+ * string whichever surface draws the device: its hostname without the
19
+ * local-network suffix, lowercased, else its label, else its id. Tabs keys a
20
+ * machine by `host || label || id` too. A shell is kept under
21
+ * `<device key>/<shell name>` (`shellKey`).
22
+ */
23
+ import { useEffect, useSyncExternalStore } from 'react';
24
+ import { deviceNames, NAME_MAX, read, save, tidyName } from './api/pref.js';
25
+ export { NAME_MAX, tidyName };
26
+ /** Where this browser keeps its copy of the names. */
27
+ export const NAMES_KEY = 'hanzo.device.names';
28
+ const SUFFIX = /\.(local|lan|home|internal|localdomain)$/i;
29
+ /** The key a device's name is kept under: the first of its hostname, label and id that says something, without a local-network suffix, lowercased. */
30
+ export function deviceKey(...parts) {
31
+ const first = parts.map((p) => (p ?? '').trim()).find(Boolean) ?? '';
32
+ return first.replace(SUFFIX, '').toLowerCase();
33
+ }
34
+ /** The key a shell's name is kept under: its device's key, then its own name. */
35
+ export function shellKey(device, shell) {
36
+ return `${deviceKey(device)}/${shell.trim().toLowerCase()}`;
37
+ }
38
+ /** The names from a stored value, dropping what is not a name. */
39
+ export function names(raw) {
40
+ return deviceNames(raw) ?? {};
41
+ }
42
+ /** Apple's models, as the tail of a hostname spells them and as a person says them. */
43
+ const MODELS = [
44
+ [/^(macbook-?pro|mbp)$/i, 'MacBook Pro'],
45
+ [/^(macbook-?air|mba)$/i, 'MacBook Air'],
46
+ [/^macbook$/i, 'MacBook'],
47
+ [/^imac(-?pro)?$/i, 'iMac'],
48
+ [/^mac-?mini$/i, 'Mac mini'],
49
+ [/^mac-?studio$/i, 'Mac Studio'],
50
+ [/^mac-?pro$/i, 'Mac Pro'],
51
+ ];
52
+ const model = (tail) => MODELS.find(([re]) => re.test(tail))?.[1];
53
+ const capital = (word) => (word ? word.charAt(0).toUpperCase() + word.slice(1) : word);
54
+ /**
55
+ * A hostname as a person says it.
56
+ *
57
+ * Alexs-MacBook-Pro.local → Alex's MacBook Pro (macOS drops the apostrophe from "Alex's MacBook Pro")
58
+ * alexs-mbp-2.local → Alex's MacBook Pro (a "-2" is macOS avoiding a name already on the network)
59
+ * MacBook-Air.local → MacBook Air
60
+ * studio-Mac-mini → Studio Mac mini
61
+ * DESKTOP-4F7K2QX → Windows PC (Windows' own made-up name)
62
+ * spark-dgx.lan → spark-dgx (a name someone chose stays theirs)
63
+ */
64
+ export function friendly(host) {
65
+ const tidy = host.trim().replace(SUFFIX, '');
66
+ if (!tidy)
67
+ return '';
68
+ if (/^desktop-[a-z0-9]{5,}$/i.test(tidy))
69
+ return 'Windows PC';
70
+ if (/^laptop-[a-z0-9]{5,}$/i.test(tidy))
71
+ return 'Windows laptop';
72
+ const words = tidy.replace(/-\d+$/, '').split(/[-_\s]+/).filter(Boolean);
73
+ for (const take of [2, 1]) {
74
+ if (words.length < take)
75
+ continue;
76
+ const name = model(words.slice(-take).join('-'));
77
+ if (!name)
78
+ continue;
79
+ const owner = words.slice(0, -take);
80
+ if (!owner.length)
81
+ return name;
82
+ const last = owner[owner.length - 1];
83
+ // "Alexs" is "Alex's" with the apostrophe macOS could not keep.
84
+ if (last.length > 2 && /s$/i.test(last))
85
+ owner[owner.length - 1] = `${last.slice(0, -1)}'s`;
86
+ return `${owner.map(capital).join(' ')} ${name}`;
87
+ }
88
+ return tidy;
89
+ }
90
+ let kept = {};
91
+ let loaded = false;
92
+ const listeners = new Set();
93
+ function load() {
94
+ if (loaded)
95
+ return;
96
+ loaded = true;
97
+ if (typeof window === 'undefined')
98
+ return;
99
+ try {
100
+ kept = names(JSON.parse(window.localStorage.getItem(NAMES_KEY) ?? '{}'));
101
+ }
102
+ catch {
103
+ kept = {};
104
+ }
105
+ window.addEventListener('storage', (e) => {
106
+ if (e.key !== NAMES_KEY)
107
+ return;
108
+ try {
109
+ set(names(JSON.parse(e.newValue ?? '{}')), false);
110
+ }
111
+ catch {
112
+ /* a bad copy is not a name */
113
+ }
114
+ });
115
+ }
116
+ function set(next, store = true) {
117
+ kept = next;
118
+ if (store && typeof window !== 'undefined') {
119
+ try {
120
+ window.localStorage.setItem(NAMES_KEY, JSON.stringify(next));
121
+ }
122
+ catch {
123
+ /* kept for this page only */
124
+ }
125
+ }
126
+ for (const l of listeners)
127
+ l();
128
+ }
129
+ /** The names as this page holds them now. */
130
+ export function heldNames() {
131
+ load();
132
+ return kept;
133
+ }
134
+ /** The name a person gave the device or shell under `key`, if any. */
135
+ export function nameOf(key) {
136
+ return heldNames()[key];
137
+ }
138
+ /**
139
+ * Name the device or shell under `key` (an empty name clears it, back to its own).
140
+ * With a `target`, the names are saved on the account too; that save failing
141
+ * keeps the name in this browser.
142
+ */
143
+ export async function rename(key, name, target) {
144
+ if (!key)
145
+ return;
146
+ const next = { ...heldNames() };
147
+ const clean = tidyName(name);
148
+ if (clean)
149
+ next[key] = clean;
150
+ else
151
+ delete next[key];
152
+ set(next);
153
+ if (target?.token())
154
+ await save(target, { deviceNames: Object.keys(next).length ? next : null });
155
+ }
156
+ /** The account documents read this page, per credential: the names are adopted once from each. */
157
+ const adopted = new Set();
158
+ function subscribe(onChange) {
159
+ listeners.add(onChange);
160
+ return () => listeners.delete(onChange);
161
+ }
162
+ const EMPTY = {};
163
+ /**
164
+ * The names a person gave their devices and shells, kept current: a rename on
165
+ * any surface of this page redraws every one that reads them. With a signed-in
166
+ * `target`, the account's names are read once per page and win over this
167
+ * browser's copy.
168
+ */
169
+ export function useDeviceNames(target) {
170
+ const held = useSyncExternalStore(subscribe, heldNames, () => EMPTY);
171
+ const token = target?.token() ?? null;
172
+ useEffect(() => {
173
+ if (!target || !token)
174
+ return;
175
+ const key = `${target.api} ${target.org ?? ''} ${token}`;
176
+ if (adopted.has(key))
177
+ return;
178
+ adopted.add(key);
179
+ read(target)
180
+ .then((p) => {
181
+ if (p.deviceNames)
182
+ set({ ...p.deviceNames });
183
+ })
184
+ .catch(() => adopted.delete(key));
185
+ // The target's identity is its api, org and bearer.
186
+ // eslint-disable-next-line react-hooks/exhaustive-deps
187
+ }, [target?.api, target?.org, token]);
188
+ return held;
189
+ }
@@ -0,0 +1,28 @@
1
+ import { type Say } from '@hanzo/i18n/react';
2
+ import type { RailLink } from '@hanzo/ui/chat';
3
+ import type { Host } from './host.tsx';
4
+ /** A run of places under one quiet label; '' draws none. */
5
+ export interface Group {
6
+ id: string;
7
+ label: string;
8
+ links: RailLink[];
9
+ }
10
+ /** The id of the row that starts a new run: a rail with a New control of its own draws that instead. */
11
+ export declare const NEW = "new";
12
+ export declare function nav(host: Host, go: (path: string) => void, t?: Say): Group[];
13
+ /** Dev's own places: what a host whose rail holds the rest (Library, Scheduled tasks, Customize) lists in Dev's sidebar. */
14
+ export declare const own: (host: Host, go: (path: string) => void, t?: Say) => Group[];
15
+ /**
16
+ * Settings' sections as a host's sidebar lists them: one group per part, a
17
+ * part's label drawn only where it is not its first row's name (Code leads
18
+ * Code's part, so the part is not labelled twice).
19
+ */
20
+ export declare function sections(host: Host, go: (path: string) => void, t?: Say): Group[];
21
+ /** Customize's tabs as a host's sidebar lists them, Agents first; an agent's profile lights Agents. */
22
+ export declare function tabs(host: Host, go: (path: string) => void, t?: Say): Group[];
23
+ /** Fired on `window` once the sidebar's Upload has kept its files, for the Library to read again. */
24
+ export declare const KEPT = "hanzo:library:kept";
25
+ /** The Library's sidebar: Make something new and Upload, then every kind it narrows to, the one in the address lit. */
26
+ export declare function library(host: Host, go: (path: string) => void, t?: Say): Group[];
27
+ /** Scheduled tasks' sidebar: New task, then each of the person's tasks, the one open lit. Read only while `on`. */
28
+ export declare function useScheduled(host: Host, go: (path: string) => void, on: boolean): Group[];
@@ -0,0 +1,218 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * The builder's places, once, for every rail that lists them: the builder's own
4
+ * rail (builder.tsx), `DevSection` (section.tsx) and a host's column (the Hanzo
5
+ * app's, @hanzo/rooms Column). Each place is a first-class row — nothing hides
6
+ * behind a disclosure — grouped in the order a first-time customer asks:
7
+ * what do I do, what did it make, where does it run, how do I set it up.
8
+ *
9
+ * Every row moves the builder through `go` with the address `path` writes, so
10
+ * where a place lives is said here and in route.ts and nowhere else.
11
+ *
12
+ * The rows' words are the reader's language when the caller hands in its
13
+ * @hanzo/i18n `t` (English without one); a task's name is the person's own.
14
+ */
15
+ import { AudioLines, Bell, BookOpen, Bot, Box, Brain, CircleDot, Code, Container, Cpu, CreditCard, File, FileText, FolderGit2, Gauge, Globe, Image, Key, LayoutTemplate, Library, Plug, Plus, Presentation, Puzzle, Settings, Shield, Sparkles, Upload, User, Users, Video } from '@hanzogui/lucide-icons-2';
16
+ import { MARKS } from './marks.js';
17
+ import { phrase } from '@hanzo/i18n';
18
+ import { useI18n } from '@hanzo/i18n/react';
19
+ import { useMemo } from 'react';
20
+ import { automations } from './api/auto.js';
21
+ import { KINDS, upload } from './api/library.js';
22
+ import { pinBoard } from './choice.js';
23
+ import { useRead } from './data.js';
24
+ import { DOCS } from './foot.js';
25
+ import { path, route, TABS } from './route.js';
26
+ import { english } from './say.js';
27
+ import { GROUPS, heading, LIST } from './settings/list.js';
28
+ /** The id of the row that starts a new run: a rail with a New control of its own draws that instead. */
29
+ export const NEW = 'new';
30
+ export function nav(host, go, t = english) {
31
+ const r = route(host.path);
32
+ const screen = r.kind === 'screen' ? r.screen : '';
33
+ const section = r.kind === 'settings' ? r.section : '';
34
+ const to = (p) => () => go(p);
35
+ return [
36
+ {
37
+ id: 'work',
38
+ label: t('Work'),
39
+ links: [
40
+ { id: NEW, label: t('New session'), icon: _jsx(MARKS.dev.make, { size: 16 }), onPress: to(''), active: r.kind === 'new' },
41
+ // A project is a repository: its list, linking one from GitHub, and one's workspace.
42
+ {
43
+ id: 'projects',
44
+ label: t('Projects'),
45
+ icon: _jsx(FolderGit2, { size: 16 }),
46
+ onPress: to(path({ kind: 'screen', screen: 'projects' })),
47
+ active: screen === 'projects' || screen === 'sync' || r.kind === 'repo',
48
+ },
49
+ {
50
+ id: 'issues',
51
+ label: t('Issues'),
52
+ icon: _jsx(CircleDot, { size: 16 }),
53
+ onPress: () => {
54
+ pinBoard(host.org, '');
55
+ go(path({ kind: 'screen', screen: 'issues' }));
56
+ },
57
+ active: screen === 'issues',
58
+ },
59
+ { id: 'templates', label: t('Templates'), icon: _jsx(LayoutTemplate, { size: 16 }), onPress: to(path({ kind: 'screen', screen: 'templates' })), active: screen === 'templates' },
60
+ ],
61
+ },
62
+ {
63
+ id: 'make',
64
+ label: t('Make'),
65
+ links: [
66
+ { id: 'artifacts', label: t('Library'), icon: _jsx(MARKS.library.icon, { size: 16 }), onPress: to(path({ kind: 'screen', screen: 'artifacts' })), active: screen === 'artifacts' },
67
+ { id: 'automations', label: t('Scheduled tasks'), icon: _jsx(MARKS.scheduled.icon, { size: 16 }), onPress: to(path({ kind: 'screen', screen: 'automations' })), active: screen === 'automations' || r.kind === 'automation' },
68
+ ],
69
+ },
70
+ {
71
+ id: 'run',
72
+ label: t('Run'),
73
+ links: [
74
+ { id: 'machines', label: t('Machines'), icon: _jsx(Cpu, { size: 16 }), onPress: to(path({ kind: 'settings', section: 'machines' })), active: section === 'machines' },
75
+ { id: 'environments', label: t('Environments'), icon: _jsx(Container, { size: 16 }), onPress: to(path({ kind: 'settings', section: 'environments' })), active: section === 'environments' },
76
+ ],
77
+ },
78
+ {
79
+ id: 'setup',
80
+ label: t('Setup'),
81
+ links: [
82
+ { id: 'customize', label: t('Customize'), icon: _jsx(MARKS.customize.icon, { size: 16 }), onPress: to(path({ kind: 'customize', tab: 'agents' })), active: r.kind === 'customize' || r.kind === 'agent' || screen === 'mcp' },
83
+ { id: 'docs', label: t('Docs'), icon: _jsx(BookOpen, { size: 16 }), onPress: () => window.open(DOCS, '_blank', 'noopener,noreferrer') },
84
+ ],
85
+ },
86
+ ];
87
+ }
88
+ /** Dev's own places: what a host whose rail holds the rest (Library, Scheduled tasks, Customize) lists in Dev's sidebar. */
89
+ export const own = (host, go, t = english) => nav(host, go, t).filter((g) => g.id === 'work');
90
+ /**
91
+ * Settings' sections as a host's sidebar lists them: one group per part, a
92
+ * part's label drawn only where it is not its first row's name (Code leads
93
+ * Code's part, so the part is not labelled twice).
94
+ */
95
+ export function sections(host, go, t = english) {
96
+ const r = route(host.path);
97
+ const at = r.kind === 'settings' ? r.section : '';
98
+ return GROUPS.map((g) => {
99
+ const rows = LIST.filter((e) => e.group === g);
100
+ return {
101
+ id: g,
102
+ label: t(heading(g)),
103
+ links: rows.map((e) => ({ id: e.id, label: t(e.label), icon: SECTION_ICON[e.id], onPress: () => go(path({ kind: 'settings', section: e.id })), active: e.id === at })),
104
+ };
105
+ });
106
+ }
107
+ /** Customize's tabs as a host's sidebar lists them, Agents first; an agent's profile lights Agents. */
108
+ export function tabs(host, go, t = english) {
109
+ const r = route(host.path);
110
+ const at = r.kind === 'customize' ? r.tab : r.kind === 'agent' ? 'agents' : '';
111
+ return [{ id: 'customize', label: '', links: TABS.map((tab) => ({ id: tab, label: t(TAB_LABEL[tab]), icon: TAB_ICON[tab], onPress: () => go(path({ kind: 'customize', tab })), active: tab === at })) }];
112
+ }
113
+ const TAB_LABEL = { agents: phrase('Agents'), bots: phrase('Bots'), skills: phrase('Skills'), connectors: phrase('Connectors'), plugins: phrase('Plugins') };
114
+ const TAB_ICON = { agents: _jsx(Users, { size: 16 }), bots: _jsx(Bot, { size: 16 }), skills: _jsx(BookOpen, { size: 16 }), connectors: _jsx(Plug, { size: 16 }), plugins: _jsx(Puzzle, { size: 16 }) };
115
+ const SECTION_ICON = {
116
+ general: _jsx(Settings, { size: 16 }),
117
+ account: _jsx(User, { size: 16 }),
118
+ privacy: _jsx(Shield, { size: 16 }),
119
+ billing: _jsx(CreditCard, { size: 16 }),
120
+ usage: _jsx(Gauge, { size: 16 }),
121
+ capabilities: _jsx(Sparkles, { size: 16 }),
122
+ memory: _jsx(Brain, { size: 16 }),
123
+ code: _jsx(Code, { size: 16 }),
124
+ environments: _jsx(Container, { size: 16 }),
125
+ machines: _jsx(Cpu, { size: 16 }),
126
+ keys: _jsx(Key, { size: 16 }),
127
+ members: _jsx(Users, { size: 16 }),
128
+ integrations: _jsx(Plug, { size: 16 }),
129
+ notifications: _jsx(Bell, { size: 16 }),
130
+ };
131
+ const KIND_ICON = {
132
+ '': _jsx(Library, { size: 16 }),
133
+ image: _jsx(Image, { size: 16 }),
134
+ video: _jsx(Video, { size: 16 }),
135
+ audio: _jsx(AudioLines, { size: 16 }),
136
+ document: _jsx(FileText, { size: 16 }),
137
+ slides: _jsx(Presentation, { size: 16 }),
138
+ model: _jsx(Box, { size: 16 }),
139
+ code: _jsx(Code, { size: 16 }),
140
+ file: _jsx(File, { size: 16 }),
141
+ sites: _jsx(Globe, { size: 16 }),
142
+ };
143
+ /** Fired on `window` once the sidebar's Upload has kept its files, for the Library to read again. */
144
+ export const KEPT = 'hanzo:library:kept';
145
+ /** Asks for files and keeps each in the Library; a refusal is said in the page's own words. */
146
+ function keep(host, say) {
147
+ const input = document.createElement('input');
148
+ input.type = 'file';
149
+ input.multiple = true;
150
+ input.onchange = async () => {
151
+ const t = { api: host.api, token: host.token, org: host.org };
152
+ for (const f of Array.from(input.files ?? [])) {
153
+ try {
154
+ await upload(t, { name: f.name, type: f.type, blob: f }, { source: 'chat' });
155
+ }
156
+ catch (e) {
157
+ window.alert(e instanceof Error ? e.message : say('{file} was not kept', { file: f.name }));
158
+ }
159
+ }
160
+ window.dispatchEvent(new Event(KEPT));
161
+ };
162
+ input.click();
163
+ }
164
+ /** The Library's sidebar: Make something new and Upload, then every kind it narrows to, the one in the address lit. */
165
+ export function library(host, go, t = english) {
166
+ const r = route(host.path);
167
+ const at = r.kind === 'screen' && r.screen === 'artifacts' ? (r.of ?? '') : null;
168
+ return [
169
+ {
170
+ id: 'library-do',
171
+ label: '',
172
+ links: [
173
+ { id: 'make', label: t('Make something new'), icon: _jsx(Plus, { size: 16 }), onPress: () => go(path({ kind: 'screen', screen: 'artifacts', of: 'new' })), active: at === 'new' },
174
+ { id: 'upload', label: t('Upload'), icon: _jsx(Upload, { size: 16 }), onPress: () => keep(host, t) },
175
+ ],
176
+ },
177
+ {
178
+ id: 'library-kinds',
179
+ label: '',
180
+ links: [
181
+ ...KINDS.map((k) => ({
182
+ id: `kind-${k.id || 'all'}`,
183
+ label: t(k.label),
184
+ icon: KIND_ICON[k.id],
185
+ onPress: () => go(path({ kind: 'screen', screen: 'artifacts', ...(k.id ? { of: k.id } : {}) })),
186
+ active: at === k.id,
187
+ })),
188
+ {
189
+ id: 'kind-sites',
190
+ label: t('Sites'),
191
+ icon: KIND_ICON.sites,
192
+ onPress: () => go(path({ kind: 'screen', screen: 'artifacts', of: 'sites' })),
193
+ active: at === 'sites',
194
+ },
195
+ ],
196
+ },
197
+ ];
198
+ }
199
+ /** Scheduled tasks' sidebar: New task, then each of the person's tasks, the one open lit. Read only while `on`. */
200
+ export function useScheduled(host, go, on) {
201
+ const { t: say } = useI18n();
202
+ const t = useMemo(() => ({ api: host.api, token: host.token, org: host.org }), [host.api, host.token, host.org]);
203
+ const list = useRead(on && host.person ? () => automations(t) : null, [], [t, on, host.path]);
204
+ const r = route(host.path);
205
+ const at = r.kind === 'automation' ? r.id : '';
206
+ return [
207
+ {
208
+ id: 'scheduled-do',
209
+ label: '',
210
+ links: [{ id: 'new-task', label: say('New task'), icon: _jsx(Plus, { size: 16 }), onPress: () => go(path({ kind: 'automation', id: 'new' })), active: at === 'new' }],
211
+ },
212
+ {
213
+ id: 'scheduled-tasks',
214
+ label: list.value.length ? say('Tasks') : '',
215
+ links: list.value.map((a) => ({ id: a.id, label: a.name || say('Untitled task'), icon: _jsx(MARKS.scheduled.icon, { size: 16 }), onPress: () => go(path({ kind: 'automation', id: a.id })), active: at === a.id })),
216
+ },
217
+ ];
218
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A link out of the builder: a new tab, no handle back to this page, no
3
+ * referrer. Only ever handed an https address the caller has already checked.
4
+ * `away` is the same for an address that has to be minted first.
5
+ */
6
+ import type { ReactNode } from 'react';
7
+ export declare function Out({ href, label, children }: {
8
+ href: string;
9
+ label?: string;
10
+ children: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ /**
13
+ * Opens a tab for an address that takes a moment to mint: the tab opens now, while
14
+ * the press still counts, and goes to the address once it comes. A refusal closes it.
15
+ */
16
+ export declare function away(url: Promise<string>): Promise<void>;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function Out({ href, label, children }) {
3
+ return (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, title: label, style: { color: 'inherit', textDecoration: 'none', display: 'inline-flex', alignItems: 'center', gap: 6, minWidth: 0, maxWidth: '100%' }, children: children }));
4
+ }
5
+ /**
6
+ * Opens a tab for an address that takes a moment to mint: the tab opens now, while
7
+ * the press still counts, and goes to the address once it comes. A refusal closes it.
8
+ */
9
+ export async function away(url) {
10
+ const w = window.open('about:blank', '_blank');
11
+ if (w)
12
+ w.opener = null;
13
+ try {
14
+ const to = await url;
15
+ if (w)
16
+ w.location.replace(to);
17
+ else
18
+ window.open(to, '_blank', 'noopener');
19
+ }
20
+ catch (e) {
21
+ w?.close();
22
+ throw e;
23
+ }
24
+ }
@@ -0,0 +1,55 @@
1
+ import { Sentence, type Target } from './api/call.ts';
2
+ import type { Attached } from './tools.tsx';
3
+ /** A page as read. */
4
+ export interface Page {
5
+ /** The address actually read, after redirects. */
6
+ url: string;
7
+ title: string;
8
+ description: string;
9
+ /** Its host, without www. */
10
+ site: string;
11
+ /** Its readable text, as markdown, capped at `KEPT`. */
12
+ text: string;
13
+ }
14
+ /** The most of a page's text that rides an ask: well inside the attachments' cap. */
15
+ export declare const KEPT = 40000;
16
+ /** Pages one ask may name. */
17
+ export declare const NAMED = 2;
18
+ /** An address as a person reads it: host and path, no scheme, no www. */
19
+ export declare function shown(url: string): string;
20
+ /** Whether a host is this computer or a private network: no public page lives there. */
21
+ export declare function local(hostname: string): boolean;
22
+ /** The public web address `raw` names, or the sentence saying why it names none. */
23
+ export declare function address(raw: string): {
24
+ url: string;
25
+ } | {
26
+ why: Sentence;
27
+ };
28
+ /** The web addresses an ask names, in order, at most `NAMED`. */
29
+ export declare function named(text: string): string[];
30
+ /** The reader's refusal (`error` from /v1/crawl), said to a person: which page, what happened, what to do. */
31
+ export declare function refusal(error: string, url: string): Sentence;
32
+ /** Reads one page through the platform's reader: the page, or a `Sentence` saying why not. */
33
+ export declare function read(t: Target, raw: string, signal?: AbortSignal): Promise<Page>;
34
+ /** Reads every page an ask names. Throws the first page's refusal: a run never starts on a page it could not read. */
35
+ export declare function readAll(t: Target, ask: string, signal?: AbortSignal): Promise<Page[]>;
36
+ /**
37
+ * A page as one more file on the ask: its address, what it says of itself, and
38
+ * its text, said to be data so words on a page are never taken as the ask.
39
+ */
40
+ export declare function attach(p: Page): Attached;
41
+ /**
42
+ * The ask New offers for a page: critique it, redesign it, and keep a dev
43
+ * server running so the redesign is live in the Preview. In English, like
44
+ * every ask a person writes; the run answers in the person's language.
45
+ */
46
+ export declare function critique(url: string): string;
47
+ /** Whether a draft already is the critique for its page. */
48
+ export declare const asked: (draft: string) => boolean;
49
+ /**
50
+ * Whether an ask is about the pages it names, so they are read before the run: the Critique and redesign ask, an
51
+ * address alone, or words that ask something of the page (`INTENT`). Any other link stays words for the agent: a
52
+ * page is never read, metered and attached because an ask happened to mention it, and a site that turns readers
53
+ * away never stops a run that did not need it.
54
+ */
55
+ export declare function about(ask: string): boolean;