@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,21 @@
1
+ import { type DropdownMenuProps } from '@hanzo/ui';
2
+ import { type Item } from './api/library.ts';
3
+ type MenuItems = NonNullable<DropdownMenuProps['items']>;
4
+ /** One square: the still, or the kind's mark on a quiet ground. */
5
+ export declare function Thumb({ x, size: n }: {
6
+ x: Item;
7
+ size?: number;
8
+ }): import("react").JSX.Element;
9
+ /** Open the Library at one item: the move leaves its id for the screen to take. */
10
+ export declare function want(id: string): void;
11
+ /** One item, read fresh so its signed URLs are live: the thing itself, then what it is. */
12
+ export declare function Preview({ id, rows }: {
13
+ id: string;
14
+ rows?: (x: Item) => MenuItems;
15
+ }): import("react").JSX.Element;
16
+ /** A run's outputs as small tiles: each opens in the Library. */
17
+ export declare function Outputs({ ids }: {
18
+ ids: string[];
19
+ }): import("react").JSX.Element | null;
20
+ export declare function Library(): import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1,526 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The Library: everything you made — in Chat, in Dev, in Studio and in
4
+ * workflows — in one place, newest first (api/library.ts).
5
+ *
6
+ * -/artifacts the Library; `?item=<id>` opens one item's preview
7
+ * -/artifacts/new the Library under Make something new (make.tsx)
8
+ *
9
+ * A tile opens its item in the side panel (panel.tsx), one tab per item, so a
10
+ * few can be read side by side; on a phone the panel is a sheet. Each item
11
+ * carries what can be done with it: open where it was made, download, share
12
+ * with the org, copy its link, rename, move to a project, use in Studio or in
13
+ * Chat, and delete. What a colleague shared is drawn with their name and offers
14
+ * only what a reader may do with it.
15
+ *
16
+ * Its words are the reader's language (@hanzo/i18n `t`); an item's name, a
17
+ * colleague's, a project's and what an item holds are drawn as given.
18
+ */
19
+ import { SizableText, useMedia, XStack, YStack } from '@hanzo/gui';
20
+ import { AudioLines, Box, Check, Code2, Copy, Download, ExternalLink, FileText, FolderInput, Image as Picture, LayoutGrid, List, MessageSquare, MoreHorizontal, Pencil, Plus, Presentation, Search, Share2, Sparkles, Trash2, Type, Video, X, } from '@hanzogui/lucide-icons-2';
21
+ import { phrase } from '@hanzo/i18n';
22
+ import { useI18n } from '@hanzo/i18n/react';
23
+ import { Button, Dialog, DialogContent, DialogTitle, DropdownMenu, Input, Skeleton, toast } from '@hanzo/ui';
24
+ import { ChipSelect } from '@hanzo/ui/product';
25
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
26
+ import { copy as toClipboard } from './clipboard.js';
27
+ import { ago } from './ago.js';
28
+ import { told } from './api/call.js';
29
+ import { change, days, get, items as list, KINDS, remove, size, SOURCE } from './api/library.js';
30
+ import { Confirm, Rename } from './ask.js';
31
+ import { useKept, useProjects, useRead } from './data.js';
32
+ import { useHost, useTarget } from './host.js';
33
+ import { Make } from './make.js';
34
+ import { KEPT } from './nav.js';
35
+ import { path, route } from './route.js';
36
+ import { Panel } from './panel.js';
37
+ import { gap, pane, RING, RING_INSET } from './pane.js';
38
+ import { Sites } from './shelf.js';
39
+ import { useDeck } from './tabs.js';
40
+ /** Where an item was made: Chat, Dev and Studio by their names, the rest in words, marked (`phrase`) and drawn through `t`. */
41
+ const FROM = [
42
+ { id: '', label: phrase('Anywhere') },
43
+ { id: 'chat', label: 'Chat' },
44
+ { id: 'dev', label: 'Dev' },
45
+ { id: 'studio', label: 'Studio' },
46
+ { id: 'workflow', label: phrase('Workflows') },
47
+ ];
48
+ const WHOSE = [
49
+ { id: 'all', label: phrase('Mine and shared') },
50
+ { id: 'mine', label: phrase('Mine') },
51
+ { id: 'shared', label: phrase('Shared with me') },
52
+ ];
53
+ /** A day's list, named: the days the Library says in words each a sentence, a month as given. */
54
+ const MADE = { Today: phrase('Made today'), Yesterday: phrase('Made yesterday'), Earlier: phrase('Made earlier') };
55
+ const made = (label, t) => (MADE[label] ? t(MADE[label]) : t('Made {month}', { month: label.toLowerCase() }));
56
+ /** How many items a page reads. */
57
+ const PAGE = 60;
58
+ /** The side panel's scope: the items a reader opened, kept as they left them. */
59
+ const DECK = 'library';
60
+ const TAB = 'item:';
61
+ /** A kind's mark. */
62
+ function glyph(kind, n = 18) {
63
+ switch (kind) {
64
+ case 'image':
65
+ return _jsx(Picture, { size: n });
66
+ case 'video':
67
+ return _jsx(Video, { size: n });
68
+ case 'audio':
69
+ return _jsx(AudioLines, { size: n });
70
+ case 'document':
71
+ return _jsx(FileText, { size: n });
72
+ case 'slides':
73
+ return _jsx(Presentation, { size: n });
74
+ case 'type':
75
+ return _jsx(Type, { size: n });
76
+ case 'model':
77
+ return _jsx(Box, { size: n });
78
+ case 'code':
79
+ return _jsx(Code2, { size: n });
80
+ default:
81
+ return _jsx(FileText, { size: n });
82
+ }
83
+ }
84
+ /** Known same-origin agent stills shelved by Dev, used if the signed store URL is unreachable. */
85
+ const AGENT_STILLS = new Set([
86
+ 'antje.jpg', 'art.png', 'biz.png', 'creative.png', 'cyber.png', 'data.png', 'des.png', 'dev.png',
87
+ 'doc.png', 'ed.png', 'edu.png', 'fin.png', 'gov.png', 'huma.png', 'lang.png', 'law.png', 'mana.png',
88
+ 'mark.png', 'mo.png', 'mu.png', 'opera.png', 'rev.png', 'sal.png', 'sci.png', 'su.png', 'vi.png',
89
+ 'vid.png', 'zach.jpg',
90
+ ]);
91
+ function localStill(x) {
92
+ const name = x.name.trim().toLowerCase();
93
+ if (AGENT_STILLS.has(name))
94
+ return `/agents/${name}`;
95
+ return '';
96
+ }
97
+ /** The still a tile shows: the item's preview, or an image's own bytes. */
98
+ const still = (x) => x.preview || (x.kind === 'image' && x.mime !== 'image/svg+xml' ? x.url : '') || localStill(x);
99
+ /** One square: the still, or the kind's mark on a quiet ground. */
100
+ export function Thumb({ x, size: n }) {
101
+ const [fallback, setFallback] = useState(false);
102
+ const [broken, setBroken] = useState(false);
103
+ const primary = still(x);
104
+ const backup = localStill(x);
105
+ const src = fallback && backup ? backup : primary;
106
+ return (_jsx(YStack, { width: n ?? '100%', height: n, aspectRatio: n ? undefined : 1, rounded: "$3", overflow: "hidden", bg: "$raised", items: "center", justify: "center", shrink: 0, "aria-hidden": true, children: src && !broken ? (_jsx(YStack, { render: _jsx("img", { src: src, alt: "", loading: "lazy", onError: () => {
107
+ if (!fallback && backup && backup !== primary)
108
+ setFallback(true);
109
+ else
110
+ setBroken(true);
111
+ } }), width: "100%", height: "100%", "$platform-web": { objectFit: 'cover', display: 'block' } })) : (_jsx(YStack, { opacity: 0.7, children: glyph(x.kind, n ? Math.max(14, Math.round(n / 2.6)) : 28) })) }));
112
+ }
113
+ /** What a tile says under its name: where it came from, whose, and when. */
114
+ function meta(x, t) {
115
+ return [t(SOURCE[x.source]), x.mine ? '' : t('shared by {owner}', { owner: x.owner }), ago(x.created)].filter(Boolean).join(' · ');
116
+ }
117
+ /** An item's link, to paste: this page with the item named. */
118
+ function linkTo(x) {
119
+ const u = new URL(window.location.href);
120
+ u.search = '';
121
+ u.hash = '';
122
+ u.searchParams.set('item', x.id);
123
+ return u.toString();
124
+ }
125
+ const ID = /^lib_[0-9a-f]{32}$/;
126
+ /** Where a move into the Library leaves the item it should open. */
127
+ const WANT = 'hanzo.build.library.item';
128
+ /** Open the Library at one item: the move leaves its id for the screen to take. */
129
+ export function want(id) {
130
+ try {
131
+ sessionStorage.setItem(WANT, id);
132
+ }
133
+ catch {
134
+ // Without storage the Library opens without it.
135
+ }
136
+ }
137
+ /** The item to open on arrival: one a move left, or the one `?item=` names. */
138
+ function named() {
139
+ if (typeof window === 'undefined')
140
+ return '';
141
+ let left = '';
142
+ try {
143
+ left = sessionStorage.getItem(WANT) ?? '';
144
+ sessionStorage.removeItem(WANT);
145
+ }
146
+ catch {
147
+ left = '';
148
+ }
149
+ const id = left || new URLSearchParams(window.location.search).get('item') || '';
150
+ return ID.test(id) ? id : '';
151
+ }
152
+ /** What can be done with one item, as menu rows. */
153
+ function useActs(onChanged, onGone) {
154
+ const { t } = useI18n();
155
+ const host = useHost();
156
+ const target = useTarget();
157
+ const [renaming, setRenaming] = useState(null);
158
+ const [deleting, setDeleting] = useState(null);
159
+ const [moving, setMoving] = useState(null);
160
+ const [note, setNote] = useState('');
161
+ const act = async (work) => {
162
+ setNote('');
163
+ try {
164
+ await work();
165
+ }
166
+ catch (e) {
167
+ setNote(told(e, t));
168
+ }
169
+ };
170
+ const copy = (text, said) => act(async () => {
171
+ if (!(await toClipboard(text)))
172
+ throw new Error(t('This browser would not copy.'));
173
+ toast.success(said);
174
+ });
175
+ const rows = (x) => [
176
+ ...(x.origin ? [{ key: 'open', label: t('Open where it was made'), icon: _jsx(ExternalLink, { size: 16 }), onSelect: () => host.open(x.origin) }] : []),
177
+ ...(x.download ? [{ key: 'download', label: t('Download'), icon: _jsx(Download, { size: 16 }), onSelect: () => window.open(x.download, '_blank', 'noopener,noreferrer') }] : []),
178
+ ...(x.mine
179
+ ? [
180
+ {
181
+ key: 'share',
182
+ label: x.shared ? t('Stop sharing') : t('Share with organization'),
183
+ icon: _jsx(Share2, { size: 16 }),
184
+ description: x.shared ? t('Only you see it') : t('Everyone in it can open it'),
185
+ onSelect: () => void act(async () => {
186
+ const next = await change(target, x.id, { shared: !x.shared });
187
+ onChanged(next);
188
+ setNote(next.shared ? t('{name} is shared with the organization', { name: next.name }) : t('{name} is yours alone', { name: next.name }));
189
+ }),
190
+ },
191
+ ]
192
+ : []),
193
+ { key: 'link', label: t('Copy link'), icon: _jsx(Copy, { size: 16 }), onSelect: () => void copy(linkTo(x), t('Link copied')) },
194
+ ...(x.mine
195
+ ? [
196
+ { key: 'rename', label: t('Rename'), icon: _jsx(Pencil, { size: 16 }), onSelect: () => setRenaming(x) },
197
+ { key: 'move', label: t('Move to project'), icon: _jsx(FolderInput, { size: 16 }), onSelect: () => setMoving(x) },
198
+ ]
199
+ : []),
200
+ { key: 'studio', label: t('Use in Studio'), icon: _jsx(Sparkles, { size: 14 }), onSelect: () => host.open(`/design?asset=${encodeURIComponent(x.id)}`) },
201
+ { key: 'chat', label: t('Use in Chat'), icon: _jsx(MessageSquare, { size: 14 }), onSelect: () => host.open(`/chat?attach=${encodeURIComponent(x.id)}`) },
202
+ ...(x.mine
203
+ ? [
204
+ { type: 'separator' },
205
+ { key: 'delete', label: t('Delete'), icon: _jsx(Trash2, { size: 14 }), destructive: true, onSelect: () => setDeleting(x) },
206
+ ]
207
+ : []),
208
+ ];
209
+ const dialogs = (_jsxs(_Fragment, { children: [_jsx(Rename, { open: Boolean(renaming), onOpenChange: (o) => !o && setRenaming(null), title: t('Rename'), name: renaming?.name ?? '', run: async (name) => {
210
+ const next = await change(target, renaming.id, { name });
211
+ onChanged(next);
212
+ toast.success(t('Renamed to {name}', { name: next.name }));
213
+ } }), _jsx(Confirm, { open: Boolean(deleting), onOpenChange: (o) => !o && setDeleting(null), title: t('Delete {name}?', { name: deleting?.name ?? '' }), says: t('It leaves the Library and its file is deleted. Anyone it was shared with loses it too.'), act: t('Delete'), run: async () => {
214
+ const dead = deleting;
215
+ await remove(target, dead.id);
216
+ onGone(dead.id);
217
+ toast.success(t('{name} deleted', { name: dead.name }));
218
+ } }), _jsx(Move, { item: moving, onClose: () => setMoving(null), onMoved: (next) => {
219
+ onChanged(next);
220
+ setNote(next.project ? t('{name} is in {project}', { name: next.name, project: next.project }) : t('{name} is in no project', { name: next.name }));
221
+ } })] }));
222
+ return { rows, dialogs, note };
223
+ }
224
+ /** Choosing the project an item belongs to, or none. */
225
+ function Move({ item: x, onClose, onMoved }) {
226
+ const { t } = useI18n();
227
+ const host = useHost();
228
+ const target = useTarget();
229
+ const projects = useProjects(target, Boolean(host.person) && Boolean(x));
230
+ const [busy, setBusy] = useState(false);
231
+ const [note, setNote] = useState('');
232
+ const [q, setQ] = useState('');
233
+ useEffect(() => {
234
+ if (!x) {
235
+ setQ('');
236
+ setNote('');
237
+ }
238
+ }, [x]);
239
+ const needle = q.trim().toLowerCase();
240
+ const choices = useMemo(() => [{ slug: '', name: t('No project') }, ...projects.value].filter((p) => !needle || `${p.name} ${p.slug}`.toLowerCase().includes(needle)), [projects.value, needle, t]);
241
+ const pick = async (project) => {
242
+ if (!x)
243
+ return;
244
+ setBusy(true);
245
+ setNote('');
246
+ try {
247
+ onMoved(await change(target, x.id, { project }));
248
+ onClose();
249
+ }
250
+ catch (e) {
251
+ setNote(told(e, t));
252
+ }
253
+ finally {
254
+ setBusy(false);
255
+ }
256
+ };
257
+ return (_jsx(Dialog, { open: Boolean(x), onOpenChange: (o) => !o && !busy && onClose(), children: _jsxs(DialogContent, { maxW: 420, showCloseButton: false, gap: "$3", children: [_jsx(DialogTitle, { children: t('Move to project') }), projects.value.length > 6 ? (_jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Find a project…'), "aria-label": t('Find a project'), startAdornment: _jsx(Search, { size: 14, color: "$soft" }) })) : null, _jsx(YStack, { gap: "$1", maxH: 320, overflow: "scroll", children: projects.loading && !projects.value.length ? (_jsxs(YStack, { gap: "$2", children: [_jsx(SizableText, { size: "$2", color: "$soft", children: t('Reading projects…') }), _jsx(Skeleton, { layout: "block", height: 36, rounded: "$3" }), _jsx(Skeleton, { layout: "block", height: 36, rounded: "$3" }), _jsx(Skeleton, { layout: "block", height: 36, rounded: "$3" })] })) : projects.error ? (_jsx(SizableText, { size: "$2", color: "$soft", children: told(projects.error, t) })) : choices.length === 0 ? (_jsx(SizableText, { size: "$2", color: "$soft", py: "$2", children: t('Nothing matches.') })) : (choices.map((p) => {
258
+ const active = x?.project === p.slug;
259
+ return (_jsxs(XStack, { render: "button", "aria-label": p.slug ? t('Move to {project}', { project: p.name || p.slug }) : t('Move to no project'), "aria-current": active ? 'true' : undefined, disabled: busy, onPress: () => void pick(p.slug), px: "$3", py: "$2", minH: 38, items: "center", justify: "space-between", gap: "$2", "$platform-web": { textAlign: 'start' }, focusVisibleStyle: RING, children: [_jsx(SizableText, { size: "$2", color: "$ink", numberOfLines: 1, flex: 1, children: p.name || p.slug }), active ? _jsx(Check, { size: 14, color: "$ink" }) : null] }, p.slug || 'none'));
260
+ })) }), note ? (_jsx(SizableText, { size: "$1", color: "$soft", role: "status", children: note })) : null, _jsx(XStack, { justify: "flex-end", children: _jsx(Button, { size: "sm", variant: "ghost", disabled: busy, onPress: onClose, children: t('Cancel') }) })] }) }));
261
+ }
262
+ /** One item's menu, as a quiet control. */
263
+ function Acts({ x, rows }) {
264
+ const { t } = useI18n();
265
+ return (_jsx(DropdownMenu, { trigger: _jsx(XStack, { render: "button", "aria-label": t('Actions for {name}', { name: x.name }), width: 30, height: 30, items: "center", justify: "center", rounded: "$2", hoverStyle: { bg: '$hover' }, cursor: "pointer", shrink: 0, children: _jsx(MoreHorizontal, { size: 16 }) }), items: rows }));
266
+ }
267
+ /** One tile of the grid: the still, then its name and where it came from; its menu beside the name. */
268
+ function Tile({ x, onOpen, rows }) {
269
+ const { t } = useI18n();
270
+ return (_jsxs(YStack, { role: "listitem", gap: "$2", minW: 0, children: [_jsx(YStack, { render: "button", "aria-label": t('Open {name}', { name: x.name }), onClick: onOpen, width: "100%", rounded: "$4", overflow: "hidden", cursor: "pointer", focusVisibleStyle: RING, children: _jsx(Thumb, { x: x }) }), _jsxs(XStack, { items: "flex-start", gap: "$1", minW: 0, children: [_jsxs(YStack, { flex: 1, minW: 0, gap: "$0.5", children: [_jsx(SizableText, { size: "$2", color: "$ink", numberOfLines: 1, children: x.name }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: meta(x, t) })] }), _jsx(Acts, { x: x, rows: rows })] })] }));
271
+ }
272
+ /** One row of the list: a small still, its name, where it came from, how large, and its menu. */
273
+ function Row({ x, first, onOpen, rows }) {
274
+ const { t } = useI18n();
275
+ return (_jsxs(XStack, { role: "listitem", items: "center", gap: "$2", pr: "$2", borderTopWidth: first ? 0 : 1, borderColor: "$borderColor", hoverStyle: { bg: '$hover' }, minW: 0, children: [_jsxs(XStack, { render: "button", "aria-label": t('Open {name}', { name: x.name }), onPress: onOpen, flex: 1, minW: 0, minH: 44, px: "$3", py: "$2", items: "center", gap: "$3", "$platform-web": { textAlign: 'start' }, focusVisibleStyle: RING_INSET, children: [_jsx(Thumb, { x: x, size: 40 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$0.5", children: [_jsx(SizableText, { size: "$2", color: "$ink", numberOfLines: 1, children: x.name }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: meta(x, t) })] }), _jsx(SizableText, { size: "$1", color: "$soft", width: 72, text: "end", fontVariant: ['tabular-nums'], "$max-md": { display: 'none' }, children: size(x.bytes) })] }), _jsx(Acts, { x: x, rows: rows })] }));
276
+ }
277
+ /** One item, read fresh so its signed URLs are live: the thing itself, then what it is. */
278
+ export function Preview({ id, rows }) {
279
+ const { t } = useI18n();
280
+ const target = useTarget();
281
+ const host = useHost();
282
+ const one = useRead(host.person ? () => get(target, id) : null, null, [target, id, host.person]);
283
+ const x = one.value;
284
+ if (!x) {
285
+ if (!host.person) {
286
+ return (_jsx(SizableText, { size: "$2", color: "$soft", children: t('Sign in to open it.') }));
287
+ }
288
+ if (one.error) {
289
+ return (_jsxs(YStack, { gap: "$2.5", items: "flex-start", children: [_jsx(SizableText, { size: "$2", color: "var(--state-error)", children: told(one.error, t) }), _jsx(Button, { size: "sm", variant: "outline", onPress: one.reload, children: t('Try again') })] }));
290
+ }
291
+ return (_jsxs(YStack, { gap: "$3", children: [_jsx(Skeleton, { layout: "block", width: "100%", height: 240, rounded: "$4" }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: "65%", height: 18, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "45%", height: 14, rounded: "$2" })] }), _jsx(SizableText, { size: "$1", color: "$soft", children: t('Reading…') })] }));
292
+ }
293
+ return (_jsxs(YStack, { gap: "$3", minH: 0, children: [_jsx(Shown, { x: x }), _jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(SizableText, { size: "$3", color: "$ink", children: x.name }), _jsx(SizableText, { size: "$1", color: "$soft", children: [meta(x, t), size(x.bytes), x.width && x.height ? `${x.width}×${x.height}` : '', x.project ? t('in {project}', { project: x.project }) : '', x.shared ? t('shared with the organization') : '']
294
+ .filter(Boolean)
295
+ .join(' · ') })] }), rows ? _jsx(Acts, { x: x, rows: rows(x) }) : null] }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", rowGap: "$2", children: [x.origin ? (_jsxs(Button, { size: "sm", variant: "outline", onPress: () => host.open(x.origin), children: [_jsx(ExternalLink, { size: 14 }), t('Open where it was made')] })) : null, x.download ? (_jsxs(Button, { size: "sm", variant: "outline", onPress: () => window.open(x.download, '_blank', 'noopener,noreferrer'), children: [_jsx(Download, { size: 14 }), t('Download')] })) : null] })] }));
296
+ }
297
+ /** The thing itself, drawn the way its kind is read. */
298
+ function Shown({ x }) {
299
+ const [fallback, setFallback] = useState(false);
300
+ const backup = localStill(x);
301
+ const imgSrc = fallback && backup ? backup : x.url || backup;
302
+ if (!x.url && !backup)
303
+ return _jsx(Thumb, { x: x });
304
+ if (x.kind === 'image' && x.mime !== 'image/svg+xml')
305
+ return (_jsx(YStack, { render: _jsx("img", { src: imgSrc, alt: x.name, onError: () => {
306
+ if (!fallback && backup && backup !== x.url)
307
+ setFallback(true);
308
+ } }), width: "100%", maxH: "60vh", "$platform-web": { objectFit: 'contain', display: 'block' } }));
309
+ if (!x.url)
310
+ return _jsx(Thumb, { x: x });
311
+ if (x.kind === 'video')
312
+ return (_jsx(YStack, { render: _jsx("video", { src: x.url, poster: x.preview || undefined, controls: true, preload: "metadata", "aria-label": x.name }), width: "100%", maxH: "60vh", "$platform-web": { display: 'block' } }));
313
+ if (x.kind === 'audio')
314
+ return _jsx(YStack, { render: _jsx("audio", { src: x.url, controls: true, preload: "metadata", "aria-label": x.name }), width: "100%" });
315
+ if (x.mime === 'application/pdf')
316
+ return (_jsx(YStack, { render: _jsx("iframe", { src: x.url, title: x.name }), width: "100%", height: "60vh", maxH: "60vh", "$platform-web": { display: 'block' } }));
317
+ if (x.mime.startsWith('text/') || x.kind === 'code' || x.mime === 'application/json')
318
+ return _jsx(Text, { x: x });
319
+ return _jsx(Thumb, { x: x });
320
+ }
321
+ /** A text item's first 200 KB, as written; in a frame where the store does not answer this page's read. */
322
+ function Text({ x }) {
323
+ const { t } = useI18n();
324
+ const read = useRead(async () => {
325
+ const res = await fetch(x.url, { cache: 'no-store' });
326
+ if (!res.ok)
327
+ throw new Error(`The file answered ${res.status}`);
328
+ return (await res.text()).slice(0, 200_000);
329
+ }, '', [x.url]);
330
+ if (read.error)
331
+ return (_jsx(YStack, { render: _jsx("iframe", { src: x.url, title: x.name }), width: "100%", height: "60vh", "$platform-web": { display: 'block' } }));
332
+ return (_jsx(YStack, { rounded: "$3", bg: "$raised", borderWidth: 1, borderColor: "$borderColor", p: "$3", maxH: "60vh", overflow: "scroll", children: read.loading && !read.value ? (_jsxs(YStack, { gap: "$2", children: [_jsx(Skeleton, { layout: "block", width: "90%", height: 13, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "76%", height: 13, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "82%", height: 13, rounded: "$2" }), _jsx(SizableText, { size: "$1", color: "$soft", children: t('Reading…') })] })) : (_jsx(SizableText, { size: "$1", color: "$ink", fontFamily: "$mono", "$platform-web": { whiteSpace: 'pre-wrap' }, children: read.value })) }));
333
+ }
334
+ /** A run's outputs as small tiles: each opens in the Library. */
335
+ export function Outputs({ ids }) {
336
+ const { t } = useI18n();
337
+ const host = useHost();
338
+ const target = useTarget();
339
+ const key = ids.join(',');
340
+ const got = useRead(host.person && ids.length ? () => Promise.all(ids.slice(0, 12).map((id) => get(target, id).catch(() => null))) : null, [], [target, key, host.person]);
341
+ const shown = got.value.filter((x) => x !== null);
342
+ if (!ids.length)
343
+ return null;
344
+ return (_jsxs(XStack, { gap: "$2", flexWrap: "wrap", rowGap: "$2", pt: "$1.5", role: "list", "aria-label": t('What it made'), children: [shown.map((x) => (_jsx(XStack, { role: "listitem", children: _jsxs(XStack, { render: "button", "aria-label": t('Open {name} in the Library', { name: x.name }), onPress: () => {
345
+ want(x.id);
346
+ host.go('-/artifacts');
347
+ }, items: "center", gap: "$2", minH: 38, paddingInlineEnd: "$2.5", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", overflow: "hidden", cursor: "pointer", maxW: 240, focusVisibleStyle: RING, children: [_jsx(Thumb, { x: x, size: 36 }), _jsx(SizableText, { size: "$1", color: "$ink", numberOfLines: 1, children: x.name })] }) }, x.id))), got.loading && !shown.length ? (_jsx(SizableText, { size: "$1", color: "$soft", children: ids.length === 1 ? t('Reading what it made…') : t('Reading the {n} things it made…', { n: ids.length }) })) : null] }));
348
+ }
349
+ /** A list read page by page: the first on every change of filter, the next on reaching its end. */
350
+ function usePages(load, key) {
351
+ const [rows, setRows] = useState([]);
352
+ const [next, setNext] = useState('');
353
+ const [error, setError] = useState(null);
354
+ const [loading, setLoading] = useState(Boolean(load));
355
+ const busy = useRef(null);
356
+ const [tick, setTick] = useState(0);
357
+ const read = useCallback((cursor) => {
358
+ if (!load)
359
+ return;
360
+ busy.current?.abort();
361
+ const ctl = new AbortController();
362
+ busy.current = ctl;
363
+ setLoading(true);
364
+ load(cursor, ctl.signal)
365
+ .then((page) => {
366
+ if (ctl.signal.aborted)
367
+ return;
368
+ setRows((was) => (cursor ? [...was, ...page.data.filter((x) => !was.some((w) => w.id === x.id))] : page.data));
369
+ setNext(page.next);
370
+ setError(null);
371
+ })
372
+ .catch((e) => {
373
+ if (!ctl.signal.aborted)
374
+ setError(e);
375
+ })
376
+ .finally(() => {
377
+ if (!ctl.signal.aborted)
378
+ setLoading(false);
379
+ });
380
+ }, [load]);
381
+ useEffect(() => {
382
+ setRows([]);
383
+ setNext('');
384
+ read('');
385
+ return () => busy.current?.abort();
386
+ // `key` names the filter; `read` follows it.
387
+ // eslint-disable-next-line react-hooks/exhaustive-deps
388
+ }, [key, tick, Boolean(load)]);
389
+ const more = useCallback(() => {
390
+ if (next && !loading)
391
+ read(next);
392
+ }, [next, loading, read]);
393
+ const patch = (x) => setRows((was) => was.map((w) => (w.id === x.id ? x : w)));
394
+ const drop = (id) => setRows((was) => was.filter((w) => w.id !== id));
395
+ return { rows, next, error, loading, more, patch, drop, reload: () => setTick((n) => n + 1) };
396
+ }
397
+ /** Calls `on` when the element it is set on comes into view. */
398
+ function useEnd(on) {
399
+ const seen = useRef(on);
400
+ seen.current = on;
401
+ const [el, setEl] = useState(null);
402
+ useEffect(() => {
403
+ if (!el || typeof IntersectionObserver === 'undefined')
404
+ return;
405
+ const io = new IntersectionObserver((entries) => entries.some((e) => e.isIntersecting) && seen.current(), { rootMargin: '400px' });
406
+ io.observe(el);
407
+ return () => io.disconnect();
408
+ }, [el]);
409
+ return (node) => setEl(node instanceof Element ? node : null);
410
+ }
411
+ export function Library() {
412
+ const { t } = useI18n();
413
+ const host = useHost();
414
+ const target = useTarget();
415
+ const signed = Boolean(host.person);
416
+ const media = useMedia();
417
+ const wide = media.md;
418
+ const desktop = Boolean(media.sm);
419
+ // The kind is the address's (-/artifacts/<kind>), so the sidebar, a link and Back all name it.
420
+ const at = route(host.path);
421
+ const sitesOnly = at.kind === 'screen' && at.of === 'sites';
422
+ const making = at.kind === 'screen' && at.of === 'new';
423
+ const kind = at.kind === 'screen' && at.of && at.of !== 'sites' && at.of !== 'new' ? at.of : '';
424
+ const setKind = (k) => host.go(path({ kind: 'screen', screen: 'artifacts', ...(k ? { of: k } : {}) }));
425
+ const [source, setSource] = useState('');
426
+ const [scope, setScope] = useState('all');
427
+ const [typed, setTyped] = useState('');
428
+ const [q, setQ] = useState('');
429
+ const [siteMatches, setSiteMatches] = useState(0);
430
+ const [moreKinds, setMoreKinds] = useState(false);
431
+ const [view, setView] = useKept('hanzo.build.library.view', 'grid');
432
+ // One org's items are not another's: each org's open tabs are kept apart.
433
+ const side = useDeck(`${DECK}.${host.org ?? ''}`, { tabs: [], at: null });
434
+ const [shown, setShown] = useState(false);
435
+ // A search is sent once the typing settles.
436
+ useEffect(() => {
437
+ const id = setTimeout(() => setQ(typed.trim()), 250);
438
+ return () => clearTimeout(id);
439
+ }, [typed]);
440
+ const load = useMemo(() => (signed && !sitesOnly ? (cursor, signal) => list(target, { kind, source, scope, q, limit: PAGE, cursor }, { signal }) : null), [signed, sitesOnly, target, kind, source, scope, q]);
441
+ const pages = usePages(load, `${kind}|${source}|${scope}|${q}|${target.org}`);
442
+ const end = useEnd(pages.more);
443
+ const reload = pages.reload;
444
+ useEffect(() => {
445
+ window.addEventListener(KEPT, reload);
446
+ return () => window.removeEventListener(KEPT, reload);
447
+ }, [reload]);
448
+ const look = useCallback((x) => {
449
+ side.open({ id: `${TAB}${x.id}`, kind: `${TAB}${x.id}`, title: x.name });
450
+ setShown(true);
451
+ }, [side]);
452
+ // An item a link named opens once, on arrival.
453
+ const arrived = useRef(false);
454
+ useEffect(() => {
455
+ if (arrived.current || !signed)
456
+ return;
457
+ arrived.current = true;
458
+ const id = named();
459
+ if (id)
460
+ get(target, id).then(look, () => look({ id, name: t('Item') }));
461
+ }, [signed, target, look, t]);
462
+ const acts = useActs((x) => {
463
+ pages.patch(x);
464
+ if (side.tabs.some((tab) => tab.kind === `${TAB}${x.id}`))
465
+ side.rename(`${TAB}${x.id}`, x.name);
466
+ }, (id) => {
467
+ pages.drop(id);
468
+ side.shut(`${TAB}${id}`);
469
+ });
470
+ const kinds = side.tabs
471
+ .filter((tab) => tab.kind.startsWith(TAB))
472
+ .map((tab) => ({ id: tab.kind, label: tab.title, render: () => _jsx(Preview, { id: tab.kind.slice(TAB.length), rows: acts.rows }, tab.kind) }));
473
+ const panel = (sheet) => _jsx(Panel, { side: side, kinds: kinds, sheet: sheet, onHide: () => setShown(false), label: t('Item preview') });
474
+ const open = shown && side.tabs.length > 0;
475
+ const groups = days(pages.rows);
476
+ const narrowed = Boolean(kind || source || q || scope !== 'all');
477
+ const showSites = !sitesOnly && signed && !kind && (source === '' || source === 'dev') && scope !== 'shared';
478
+ useEffect(() => {
479
+ if (!showSites)
480
+ setSiteMatches(0);
481
+ }, [showSites]);
482
+ const emptyUnfiltered = signed && !sitesOnly && !pages.loading && !pages.error && !pages.rows.length && !narrowed;
483
+ const clearFilters = () => {
484
+ setTyped('');
485
+ setQ('');
486
+ setSource('');
487
+ setScope('all');
488
+ if (kind || sitesOnly)
489
+ setKind('');
490
+ };
491
+ const make = (primary) => (_jsxs(Button, { size: "sm", variant: primary ? 'primary' : 'outline', shrink: 0, onPress: () => setKind('new'), children: [_jsx(Plus, { size: 14 }), t('Make something new')] }));
492
+ // The choices in the reader's words; Chat, Dev and Studio stay their names.
493
+ const from = FROM.map((f) => ({ ...f, label: t(f.label) }));
494
+ const whose = WHOSE.map((w) => ({ ...w, label: t(w.label) }));
495
+ // Progressive disclosure: cap visible kind pills to 6 on desktop (4 on mobile), keeping the active kind visible.
496
+ const allKindPills = useMemo(() => [
497
+ ...KINDS.map((k) => ({ id: k.id, label: t(k.label) })),
498
+ { id: 'sites', label: t('Sites') },
499
+ ], [t]);
500
+ const activeKindId = sitesOnly ? 'sites' : kind;
501
+ const kindCap = desktop ? 6 : 4;
502
+ const kindOverflow = allKindPills.length > kindCap;
503
+ const visibleKindPills = !moreKinds && kindOverflow
504
+ ? (() => {
505
+ const base = allKindPills.slice(0, kindCap);
506
+ if (base.some((p) => p.id === activeKindId))
507
+ return base;
508
+ const chosen = allKindPills.find((p) => p.id === activeKindId);
509
+ return chosen ? [...base.slice(0, Math.max(1, kindCap - 1)), chosen] : base;
510
+ })()
511
+ : allKindPills;
512
+ const hiddenKindCount = allKindPills.length - visibleKindPills.length;
513
+ return (_jsxs(XStack, { flex: 1, minH: 0, minW: 0, width: "100%", children: [_jsx(YStack, { flex: 1, minH: 0, minW: 0, overflow: "scroll", px: "$6", py: "$6", "$max-md": { px: '$4', py: '$4' }, children: _jsxs(YStack, { width: "100%", maxW: 1120, mx: "auto", gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(SizableText, { render: "h1", size: "$7", fontWeight: "600", color: "$ink", flex: 1, children: sitesOnly ? t('Sites') : KINDS.find((k) => k.id === kind)?.id ? t(KINDS.find((k) => k.id === kind).label) : t('Library') }), _jsxs(XStack, { items: "center", gap: "$2", shrink: 0, children: [host.sections ? null : make(!emptyUnfiltered && signed), sitesOnly ? null : (_jsxs(XStack, { role: "radiogroup", "aria-label": t('View'), p: 2, gap: 2, rounded: "$3", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", children: [_jsx(ViewMark, { label: t('Grid'), on: view === 'grid', onPress: () => setView('grid'), children: _jsx(LayoutGrid, { size: 15, color: view === 'grid' ? '$ink' : '$soft' }) }), _jsx(ViewMark, { label: t('List'), on: view === 'list', onPress: () => setView('list'), children: _jsx(List, { size: 15, color: view === 'list' ? '$ink' : '$soft' }) })] }))] })] }), _jsxs(YStack, { gap: "$2.5", children: [host.sections ? null : (_jsxs(XStack, { role: "radiogroup", "aria-label": t('Kind'), gap: "$1.5", rowGap: "$1.5", flexWrap: "wrap", width: "100%", children: [visibleKindPills.map((k) => (_jsx(KindChip, { label: k.label, on: activeKindId === k.id, onClick: () => setKind(k.id) }, k.id || 'all'))), kindOverflow ? (_jsx(XStack, { render: "button", "aria-expanded": moreKinds, "aria-label": moreKinds ? t('Show fewer kinds') : t('Show {n} more kinds', { n: hiddenKindCount }), onPress: () => setMoreKinds((v) => !v), items: "center", px: "$3", py: "$1", minH: 32, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: moreKinds ? t('Show less') : t('+{n} more', { n: hiddenKindCount }) }) })) : null] })), sitesOnly ? null : (_jsxs(XStack, { gap: "$2", rowGap: "$2", items: "center", flexWrap: "wrap", children: [_jsx(YStack, { flex: 1, minW: 220, maxW: 420, "$max-sm": { minW: '100%', maxW: '100%' }, children: _jsx(Input, { value: typed, onChangeText: setTyped, placeholder: t('Search your library'), "aria-label": t('Search your library'), disabled: !signed, startAdornment: _jsx(Search, { size: 14, color: "$soft" }), endAdornment: typed ? (_jsx(XStack, { render: "button", "aria-label": t('Clear search'), onPress: () => setTyped(''), minW: 24, minH: 24, items: "center", justify: "center", focusVisibleStyle: RING, children: _jsx(X, { size: 13, color: "$soft" }) })) : undefined, onKeyDown: (e) => {
514
+ if (e.key === 'Escape' && typed)
515
+ setTyped('');
516
+ } }) }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", rowGap: "$2", items: "center", children: [_jsx(ChipSelect, { name: t('From'), label: from.find((f) => f.id === source).label, chosen: from.find((f) => f.id === source), items: from, onChange: (f) => setSource(f.id), placement: "bottom-start", width: 200 }), _jsx(ChipSelect, { name: t('Whose'), label: whose.find((w) => w.id === scope).label, chosen: whose.find((w) => w.id === scope), items: whose, onChange: (w) => setScope(w.id), placement: "bottom-start", width: 220 }), narrowed ? (_jsx(Button, { size: "sm", variant: "ghost", onPress: clearFilters, children: t('Clear filters') })) : null] })] }))] }), acts.note ? (_jsx(SizableText, { size: "$2", color: "$soft", role: "status", children: acts.note })) : null, sitesOnly ? (_jsx(Sites, {})) : !signed ? (_jsx(Said, { says: t('Sign in to see your library.'), children: _jsx(Button, { size: "sm", onPress: () => host.signIn?.(), children: t('Sign in') }) })) : pages.error && !pages.rows.length ? (_jsx(Said, { says: told(pages.error, t), error: true, children: _jsx(Button, { size: "sm", variant: "outline", onPress: pages.reload, children: t('Try again') }) })) : pages.loading && !pages.rows.length ? (_jsxs(YStack, { gap: "$3", "aria-busy": true, children: [_jsx(SizableText, { size: "$2", color: "$soft", children: t('Reading…') }), view === 'grid' ? (_jsx(YStack, { gap: 16, "$platform-web": { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(min(46%, 168px), 1fr))' }, children: [0, 1, 2, 3, 4, 5, 6, 7].map((i) => (_jsxs(YStack, { gap: "$2", children: [_jsx(Skeleton, { layout: "block", width: "100%", aspectRatio: 1, rounded: "$4" }), _jsx(Skeleton, { layout: "block", width: "72%", height: 14, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "48%", height: 12, rounded: "$2" })] }, i))) })) : (_jsx(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$3", bg: "$panel", overflow: "hidden", children: [0, 1, 2, 3, 4, 5].map((i) => (_jsxs(XStack, { items: "center", gap: "$3", px: "$3", py: "$2.5", borderTopWidth: i ? 1 : 0, borderColor: "$borderColor", children: [_jsx(Skeleton, { layout: "block", width: 40, height: 40, rounded: "$3", shrink: 0 }), _jsxs(YStack, { flex: 1, gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: "42%", height: 14, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "28%", height: 12, rounded: "$2" })] })] }, i))) }))] })) : !pages.rows.length ? (narrowed ? (_jsxs(YStack, { gap: "$5", children: [showSites ? _jsx(Sites, { q: q, onMatch: setSiteMatches }) : null, !showSites || siteMatches === 0 ? (_jsx(Said, { says: t('Nothing matches.'), children: _jsx(Button, { size: "sm", variant: "outline", onPress: clearFilters, children: t('Clear filters') }) })) : null] })) : (_jsxs(YStack, { gap: "$5", children: [_jsx(Said, { says: t('Nothing here yet. What you make in Chat, Dev and Studio lands here.'), children: make(true) }), showSites ? (_jsx(YStack, { pt: "$6", borderTopWidth: 1, borderColor: "$borderColor", children: _jsx(Sites, { onMatch: setSiteMatches }) })) : null] }))) : (_jsxs(YStack, { gap: "$5", children: [showSites ? (_jsx(YStack, { pb: !q || siteMatches > 0 ? '$4' : 0, borderBottomWidth: !q || siteMatches > 0 ? 1 : 0, borderColor: "$borderColor", children: _jsx(Sites, { q: q, onMatch: setSiteMatches }) })) : null, groups.map((g) => (_jsxs(YStack, { gap: "$3", role: "group", "aria-label": t(g.label), children: [_jsx(SizableText, { size: "$2", color: "$soft", fontWeight: "500", children: t(g.label) }), view === 'grid' ? (_jsx(YStack, { role: "list", "aria-label": made(g.label, t), gap: 16, "$platform-web": { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(min(46%, 168px), 1fr))' }, children: g.rows.map((x) => (_jsx(Tile, { x: x, onOpen: () => look(x), rows: acts.rows(x) }, x.id))) })) : (_jsx(YStack, { role: "list", "aria-label": made(g.label, t), borderWidth: 1, borderColor: "$borderColor", rounded: "$3", bg: "$panel", overflow: "hidden", children: g.rows.map((x, i) => (_jsx(Row, { x: x, first: i === 0, onOpen: () => look(x), rows: acts.rows(x) }, x.id))) }))] }, g.label))), _jsx(YStack, { ref: end, height: 1 }), pages.loading ? (_jsx(SizableText, { size: "$1", color: "$soft", children: t('Reading more…') })) : pages.error ? (_jsx(SizableText, { size: "$1", color: "$soft", role: "status", children: told(pages.error, t) })) : null] }))] }) }), open && !wide ? panel(true) : null, open && wide ? (_jsx(YStack, { "data-slot": "library-side", ...pane, ml: gap, shrink: 0, minH: 0, width: 440, maxW: "45%", children: panel(false) })) : null, acts.dialogs, _jsx(Make, { open: making, onClose: () => host.go(path({ kind: 'screen', screen: 'artifacts' }), { replace: true }) })] }));
517
+ }
518
+ function KindChip({ label, on, onClick }) {
519
+ return (_jsx(XStack, { render: "button", role: "radio", "aria-checked": on, "aria-label": label, onPress: onClick, items: "center", px: "$3", py: "$1", minH: 32, shrink: 0, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", fontWeight: on ? '500' : '400', color: on ? '$background' : '$soft', children: label }) }));
520
+ }
521
+ function ViewMark({ label, on, onPress, children }) {
522
+ return (_jsx(XStack, { render: "button", role: "radio", "aria-checked": on, "aria-label": label, onClick: onPress, minW: 30, minH: 28, items: "center", justify: "center", cursor: "pointer", focusVisibleStyle: RING, children: children }));
523
+ }
524
+ function Said({ says, error = false, children }) {
525
+ return (_jsxs(YStack, { rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", px: "$5", py: "$8", gap: "$3", items: "center", children: [_jsx(SizableText, { size: "$2", color: error ? 'var(--state-error)' : '$soft', text: "center", children: says }), children] }));
526
+ }
@@ -0,0 +1,80 @@
1
+ import type { Say } from '@hanzo/i18n/react';
2
+ /** A folder on this computer, as the host keeps it. */
3
+ export interface Folder {
4
+ /** The absolute path the agent runs in. */
5
+ path: string;
6
+ /** Its last segment, or the name the person gave it. */
7
+ name: string;
8
+ /** When a run last used it (ms since the epoch); 0 when never. */
9
+ used?: number;
10
+ }
11
+ /** What a run on this computer answers with once it has finished. */
12
+ export interface Done {
13
+ ok: boolean;
14
+ /** What the agent said at the end: its answer, and what it changed. What a person reads. */
15
+ output: string;
16
+ /** What it did on the way: its commands and what they printed. Drawn only in Developer mode. */
17
+ process?: string;
18
+ }
19
+ /** How far the coding agent's setup has got, 0 to 100, while the host fetches it for the first run. */
20
+ export type Setup = (percent: number) => void;
21
+ /** What a host with the computer can do with its folders. */
22
+ export interface Local {
23
+ /** The folders this computer has: the ones opened in Hanzo and the project folders found on it (`recent` sorts them). */
24
+ folders: () => readonly Folder[];
25
+ /** Hears when `folders` has changed, as the ones found arrive after the first read; answers how to stop hearing. */
26
+ changed?: (listener: () => void) => () => void;
27
+ /** The computer's own folder dialog; null when the person closes it. The folder chosen is kept. */
28
+ pick: () => Promise<Folder | null>;
29
+ /** Mark a folder as the one used now, so Auto picks it next. */
30
+ use: (path: string) => void;
31
+ /** Run the coding agent in `folder` with `prompt`, and answer once it has finished. `setup` hears the agent being fetched. */
32
+ run: (folder: string, prompt: string, setup?: Setup) => Promise<Done>;
33
+ /** Stop the agent being fetched for the first run, when a person no longer wants it; the run then ends as cancelled (`failed`). */
34
+ cancel?: () => Promise<void> | void;
35
+ /** This computer's hostname, the name `hanzo link` registers it under: how its own machine is found among the org's (settings/shared.tsx). */
36
+ host?: () => Promise<string>;
37
+ }
38
+ /** The place id New keeps for this computer. A machine's is `tgt_…` and the cloud workspace's is ''. */
39
+ export declare const HERE = "here";
40
+ /** The folders, most recently used first; a folder never used goes last, in the order the host gave. */
41
+ export declare function recent(folders: readonly Folder[]): Folder[];
42
+ /** The folder Auto picks: the one used most recently, or null when this computer has opened none. */
43
+ export declare function auto(folders: readonly Folder[]): Folder | null;
44
+ /**
45
+ * The folder an ask is about, else the one used last.
46
+ *
47
+ * A folder is named by its own name first ("shop", "my-shop"; each word of it the ask says counts, and the
48
+ * folder it is all of beats one it is a little of), and then by the folders it sits in (`~/work/acme/web` is
49
+ * about "acme"). The ask is read as words: nothing is guessed from what it means, so the same words always go to
50
+ * the same folder, and a tie goes to the folder used more recently. An ask that names none goes where Auto
51
+ * went before: the folder used last.
52
+ */
53
+ export declare function route(folders: readonly Folder[], ask: string): Folder | null;
54
+ /**
55
+ * The folder a run goes to: the one chosen (`kept`, a path), while this computer still lists it, else the one the
56
+ * ask is about, else the one used last (`route`). A chosen folder the host no longer lists was removed, and is
57
+ * not where the next run goes.
58
+ */
59
+ export declare function where(folders: readonly Folder[], kept: string, ask?: string): {
60
+ folder: Folder | null;
61
+ auto: boolean;
62
+ };
63
+ /** A folder's last segment, for a path the host gave no name. */
64
+ export declare function named(path: string): string;
65
+ /** What the host answers once the first-run setup a person cancelled has stopped. */
66
+ export declare const CANCELLED: RegExp;
67
+ /**
68
+ * Why a run on this computer stopped before it began, in the reader's words. The host fetches the agent itself
69
+ * and words what went wrong in plain sentences (no connection, a download that did not check out, a folder that
70
+ * is gone), so those are said as they came; a host that could not find the agent at all is told to update.
71
+ * What the agent itself printed is its answer, and is shown as it is.
72
+ */
73
+ export declare function failed(e: unknown, say?: Say): string;
74
+ /** Words New marks for the reader's language (`phrase`), drawn through `t`. */
75
+ export declare const WORDS: {
76
+ readonly here: string;
77
+ readonly auto: string;
78
+ readonly choose: string;
79
+ readonly pick: string;
80
+ };