@hanzo/dev 4.0.1 → 4.1.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 (369) 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 +31 -0
  61. package/dist/builder/api/git.js +47 -0
  62. package/dist/builder/api/github.d.ts +176 -0
  63. package/dist/builder/api/github.js +271 -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 +570 -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/gutter.d.ts +17 -0
  185. package/dist/builder/gutter.js +25 -0
  186. package/dist/builder/handoff.d.ts +8 -0
  187. package/dist/builder/handoff.js +22 -0
  188. package/dist/builder/host.d.ts +189 -0
  189. package/dist/builder/host.js +46 -0
  190. package/dist/builder/index.d.ts +108 -0
  191. package/dist/builder/index.js +99 -0
  192. package/dist/builder/landing.d.ts +34 -0
  193. package/dist/builder/landing.js +725 -0
  194. package/dist/builder/library.d.ts +21 -0
  195. package/dist/builder/library.js +526 -0
  196. package/dist/builder/local.d.ts +80 -0
  197. package/dist/builder/local.js +124 -0
  198. package/dist/builder/make.d.ts +10 -0
  199. package/dist/builder/make.js +120 -0
  200. package/dist/builder/markdown.d.ts +49 -0
  201. package/dist/builder/markdown.js +125 -0
  202. package/dist/builder/marks.d.ts +15 -0
  203. package/dist/builder/marks.js +18 -0
  204. package/dist/builder/merge.d.ts +223 -0
  205. package/dist/builder/merge.js +380 -0
  206. package/dist/builder/meter.d.ts +31 -0
  207. package/dist/builder/meter.js +54 -0
  208. package/dist/builder/mind.d.ts +107 -0
  209. package/dist/builder/mind.js +335 -0
  210. package/dist/builder/names.d.ts +40 -0
  211. package/dist/builder/names.js +189 -0
  212. package/dist/builder/nav.d.ts +28 -0
  213. package/dist/builder/nav.js +218 -0
  214. package/dist/builder/out.d.ts +16 -0
  215. package/dist/builder/out.js +24 -0
  216. package/dist/builder/page.d.ts +55 -0
  217. package/dist/builder/page.js +217 -0
  218. package/dist/builder/pane.d.ts +30 -0
  219. package/dist/builder/pane.js +21 -0
  220. package/dist/builder/panel.d.ts +101 -0
  221. package/dist/builder/panel.js +408 -0
  222. package/dist/builder/pdf.d.ts +139 -0
  223. package/dist/builder/pdf.js +847 -0
  224. package/dist/builder/pick.d.ts +10 -0
  225. package/dist/builder/pick.js +38 -0
  226. package/dist/builder/plain.d.ts +59 -0
  227. package/dist/builder/plain.js +209 -0
  228. package/dist/builder/plan.d.ts +63 -0
  229. package/dist/builder/plan.js +155 -0
  230. package/dist/builder/plans.d.ts +1 -0
  231. package/dist/builder/plans.js +157 -0
  232. package/dist/builder/plugin.d.ts +60 -0
  233. package/dist/builder/plugin.js +1 -0
  234. package/dist/builder/plugins/design.d.ts +8 -0
  235. package/dist/builder/plugins/design.js +71 -0
  236. package/dist/builder/plugins/index.d.ts +46 -0
  237. package/dist/builder/plugins/index.js +117 -0
  238. package/dist/builder/plugins/pdf.d.ts +18 -0
  239. package/dist/builder/plugins/pdf.js +83 -0
  240. package/dist/builder/plugins/project.d.ts +5 -0
  241. package/dist/builder/plugins/project.js +68 -0
  242. package/dist/builder/plugins/research.d.ts +24 -0
  243. package/dist/builder/plugins/research.js +147 -0
  244. package/dist/builder/plugins/sketch.d.ts +9 -0
  245. package/dist/builder/plugins/sketch.js +101 -0
  246. package/dist/builder/plugins/slides.d.ts +14 -0
  247. package/dist/builder/plugins/slides.js +55 -0
  248. package/dist/builder/plugins/template.d.ts +13 -0
  249. package/dist/builder/plugins/template.js +95 -0
  250. package/dist/builder/prefs.d.ts +29 -0
  251. package/dist/builder/prefs.js +91 -0
  252. package/dist/builder/preview-url.d.ts +47 -0
  253. package/dist/builder/preview-url.js +107 -0
  254. package/dist/builder/project.d.ts +18 -0
  255. package/dist/builder/project.js +591 -0
  256. package/dist/builder/prose.d.ts +4 -0
  257. package/dist/builder/prose.js +57 -0
  258. package/dist/builder/publish.d.ts +18 -0
  259. package/dist/builder/publish.js +141 -0
  260. package/dist/builder/question.d.ts +33 -0
  261. package/dist/builder/question.js +64 -0
  262. package/dist/builder/redesign.d.ts +32 -0
  263. package/dist/builder/redesign.js +117 -0
  264. package/dist/builder/removal.d.ts +71 -0
  265. package/dist/builder/removal.js +73 -0
  266. package/dist/builder/reply.d.ts +50 -0
  267. package/dist/builder/reply.js +196 -0
  268. package/dist/builder/roles.d.ts +10 -0
  269. package/dist/builder/roles.js +28 -0
  270. package/dist/builder/route.d.ts +85 -0
  271. package/dist/builder/route.js +126 -0
  272. package/dist/builder/run.d.ts +4 -0
  273. package/dist/builder/run.js +804 -0
  274. package/dist/builder/runmeta.d.ts +16 -0
  275. package/dist/builder/runmeta.js +69 -0
  276. package/dist/builder/say.d.ts +2 -0
  277. package/dist/builder/say.js +7 -0
  278. package/dist/builder/scheduled.d.ts +3 -0
  279. package/dist/builder/scheduled.js +328 -0
  280. package/dist/builder/section.d.ts +27 -0
  281. package/dist/builder/section.js +60 -0
  282. package/dist/builder/settings/account.d.ts +1 -0
  283. package/dist/builder/settings/account.js +111 -0
  284. package/dist/builder/settings/billing.d.ts +1 -0
  285. package/dist/builder/settings/billing.js +210 -0
  286. package/dist/builder/settings/capabilities.d.ts +1 -0
  287. package/dist/builder/settings/capabilities.js +66 -0
  288. package/dist/builder/settings/card.d.ts +31 -0
  289. package/dist/builder/settings/card.js +140 -0
  290. package/dist/builder/settings/code.d.ts +1 -0
  291. package/dist/builder/settings/code.js +70 -0
  292. package/dist/builder/settings/credits.d.ts +10 -0
  293. package/dist/builder/settings/credits.js +123 -0
  294. package/dist/builder/settings/environments.d.ts +1 -0
  295. package/dist/builder/settings/environments.js +60 -0
  296. package/dist/builder/settings/general.d.ts +1 -0
  297. package/dist/builder/settings/general.js +58 -0
  298. package/dist/builder/settings/index.d.ts +4 -0
  299. package/dist/builder/settings/index.js +25 -0
  300. package/dist/builder/settings/integrations.d.ts +8 -0
  301. package/dist/builder/settings/integrations.js +138 -0
  302. package/dist/builder/settings/keys.d.ts +1 -0
  303. package/dist/builder/settings/keys.js +114 -0
  304. package/dist/builder/settings/list.d.ts +10 -0
  305. package/dist/builder/settings/list.js +28 -0
  306. package/dist/builder/settings/machines.d.ts +4 -0
  307. package/dist/builder/settings/machines.js +243 -0
  308. package/dist/builder/settings/members.d.ts +1 -0
  309. package/dist/builder/settings/members.js +77 -0
  310. package/dist/builder/settings/memory.d.ts +1 -0
  311. package/dist/builder/settings/memory.js +62 -0
  312. package/dist/builder/settings/notifications.d.ts +1 -0
  313. package/dist/builder/settings/notifications.js +111 -0
  314. package/dist/builder/settings/plan.d.ts +17 -0
  315. package/dist/builder/settings/plan.js +131 -0
  316. package/dist/builder/settings/privacy.d.ts +1 -0
  317. package/dist/builder/settings/privacy.js +76 -0
  318. package/dist/builder/settings/sections.d.ts +16 -0
  319. package/dist/builder/settings/sections.js +34 -0
  320. package/dist/builder/settings/shared.d.ts +6 -0
  321. package/dist/builder/settings/shared.js +58 -0
  322. package/dist/builder/settings/ui.d.ts +50 -0
  323. package/dist/builder/settings/ui.js +53 -0
  324. package/dist/builder/settings/usage.d.ts +1 -0
  325. package/dist/builder/settings/usage.js +24 -0
  326. package/dist/builder/shared.d.ts +26 -0
  327. package/dist/builder/shared.js +15 -0
  328. package/dist/builder/shelf.d.ts +16 -0
  329. package/dist/builder/shelf.js +219 -0
  330. package/dist/builder/side.d.ts +40 -0
  331. package/dist/builder/side.js +208 -0
  332. package/dist/builder/site.d.ts +75 -0
  333. package/dist/builder/site.js +138 -0
  334. package/dist/builder/spend.d.ts +21 -0
  335. package/dist/builder/spend.js +80 -0
  336. package/dist/builder/standing.d.ts +36 -0
  337. package/dist/builder/standing.js +66 -0
  338. package/dist/builder/suggest.d.ts +238 -0
  339. package/dist/builder/suggest.js +463 -0
  340. package/dist/builder/suggestions.d.ts +49 -0
  341. package/dist/builder/suggestions.js +260 -0
  342. package/dist/builder/summary.d.ts +60 -0
  343. package/dist/builder/summary.js +81 -0
  344. package/dist/builder/sync.d.ts +1 -0
  345. package/dist/builder/sync.js +164 -0
  346. package/dist/builder/tabs.d.ts +85 -0
  347. package/dist/builder/tabs.js +288 -0
  348. package/dist/builder/talk.d.ts +5 -0
  349. package/dist/builder/talk.js +108 -0
  350. package/dist/builder/thread.d.ts +60 -0
  351. package/dist/builder/thread.js +302 -0
  352. package/dist/builder/tools.d.ts +22 -0
  353. package/dist/builder/tools.js +52 -0
  354. package/dist/builder/transcript.d.ts +47 -0
  355. package/dist/builder/transcript.js +108 -0
  356. package/dist/builder/voice.d.ts +8 -0
  357. package/dist/builder/voice.js +24 -0
  358. package/dist/{changedFileKind-DqgCCDUs.js → changedFileKind-D6QYvIez.js} +1 -1
  359. package/dist/core.js +1 -0
  360. package/dist/{decodeImagePreview-CesVZYP4.js → decodeImagePreview-DnfFEjhw.js} +1 -1
  361. package/dist/{embed-DYP-OUlb.js → embed-c030vUqM.js} +11 -11
  362. package/dist/index.d.ts +2 -0
  363. package/dist/index.js +2 -1
  364. package/dist/{micromark-util-decode-string-NQjVkmZH.js → micromark-util-decode-string-C-5AXkOV.js} +5 -3
  365. package/dist/{readBinaryPreview-D2X4Uahu.js → readBinaryPreview-BAQ4fFjm.js} +1 -1
  366. package/dist/{useTextFieldSpeech-CyOZZPrV.js → useTextFieldSpeech-COa9XcRx.js} +1 -1
  367. package/package.json +101 -11
  368. /package/{index.d.ts → dist/core.d.ts} +0 -0
  369. /package/{keymap.d.ts → dist/keymap.d.ts} +0 -0
@@ -0,0 +1,59 @@
1
+ import { type Target } from './call.ts';
2
+ import { type Item } from './library.ts';
3
+ export interface Run {
4
+ id: string;
5
+ /** queued, running, succeeded, failed or cancelled. */
6
+ status: string;
7
+ title: string;
8
+ /** What the run's writing step said, when its product is words. */
9
+ text: string;
10
+ outputs: Item[];
11
+ /** Why it failed, in the platform's words, or ''. */
12
+ error: string;
13
+ }
14
+ export interface Start {
15
+ template: string;
16
+ input: Record<string, unknown>;
17
+ title?: string;
18
+ parent?: string;
19
+ /** A brand (design system) the run reads as brand.* — its palette, type and voice. */
20
+ brand?: string;
21
+ }
22
+ /**
23
+ * A design system: one of Studio's brands, the one store for them. Its tokens
24
+ * are CSS custom properties (--background, --primary, --font-sans, --radius-md,
25
+ * …, the form Studio's renderer reads), with `--component-*` and `--voice-*` as
26
+ * quoted lines a model follows (design.ts `tokensOf`).
27
+ *
28
+ * GET /v1/studio/brands {data: [brand]} the ones you may read
29
+ * GET /v1/studio/brands/{id} one
30
+ * POST /v1/studio/brands {name, tokens, shared?} → brand
31
+ */
32
+ export interface Brand {
33
+ id: string;
34
+ name: string;
35
+ tokens: Record<string, unknown>;
36
+ }
37
+ export declare function brandOf(raw: unknown): Brand;
38
+ export declare function brands(t: Target, init?: {
39
+ signal?: AbortSignal;
40
+ }): Promise<Brand[]>;
41
+ export declare function brand(t: Target, id: string, init?: {
42
+ signal?: AbortSignal;
43
+ }): Promise<Brand>;
44
+ export declare function keepBrand(t: Target, b: {
45
+ name: string;
46
+ tokens: Record<string, unknown>;
47
+ }, signal?: AbortSignal): Promise<Brand>;
48
+ export declare function run(raw: unknown): Run;
49
+ /** A run that has ended, one way or the other. */
50
+ export declare const ended: (r: Run) => boolean;
51
+ /** The ids of the templates this org may run. */
52
+ export declare function templates(t: Target, init?: {
53
+ signal?: AbortSignal;
54
+ }): Promise<string[]>;
55
+ /**
56
+ * Start a run and wait for it to end. Aborted, the run is cancelled so its
57
+ * reservation is released; a run that fails is thrown with its reason.
58
+ */
59
+ export declare function make(t: Target, s: Start, signal?: AbortSignal): Promise<Run>;
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Hanzo Studio: a creation is a run of a template, its files kept in the Library.
3
+ *
4
+ * GET /v1/studio/templates {data: [template]} the public catalog, then the org's own
5
+ * POST /v1/studio/runs {template, input, title?, parent?} → 201 run, queued
6
+ * GET /v1/studio/runs/{id} the run: status, text, outputs
7
+ * POST /v1/studio/runs/{id}/cancel stop it; what it reserved is released
8
+ *
9
+ * A run is priced and its estimate reserved against the org's wallet before it
10
+ * is queued (402 when the wallet cannot cover it). `parent` makes the run the
11
+ * next version of that one. Its outputs are Library items: their `url` is
12
+ * signed and expires, their `origin` is the app path that opens the run in
13
+ * Studio and does not.
14
+ */
15
+ import { phrase } from '@hanzo/i18n';
16
+ import { call, Refusal, seg, Sentence } from './call.js';
17
+ import { item } from './library.js';
18
+ export function brandOf(raw) {
19
+ const o = obj(raw);
20
+ return { id: str(o.id), name: str(o.name), tokens: obj(o.tokens) };
21
+ }
22
+ export async function brands(t, init) {
23
+ const raw = obj(await call(t, 'GET', '/v1/studio/brands', undefined, init));
24
+ return (Array.isArray(raw.data) ? raw.data : []).map(brandOf).filter((b) => b.id);
25
+ }
26
+ export async function brand(t, id, init) {
27
+ return brandOf(await call(t, 'GET', `/v1/studio/brands/${seg(id)}`, undefined, init));
28
+ }
29
+ export async function keepBrand(t, b, signal) {
30
+ return brandOf(await call(t, 'POST', '/v1/studio/brands', { name: b.name, tokens: b.tokens }, { signal }));
31
+ }
32
+ const str = (v) => (typeof v === 'string' ? v : '');
33
+ const obj = (v) => (v && typeof v === 'object' ? v : {});
34
+ export function run(raw) {
35
+ const o = obj(raw);
36
+ const e = obj(o.error);
37
+ return {
38
+ id: str(o.id),
39
+ status: str(o.status),
40
+ title: str(o.title),
41
+ text: str(o.text),
42
+ outputs: (Array.isArray(o.outputs) ? o.outputs : []).map(item).filter((x) => x !== null),
43
+ error: str(e.detail) || str(e.title),
44
+ };
45
+ }
46
+ /** A run that has ended, one way or the other. */
47
+ export const ended = (r) => r.status !== 'queued' && r.status !== 'running' && r.status !== '';
48
+ /** The ids of the templates this org may run. */
49
+ export async function templates(t, init) {
50
+ const raw = obj(await call(t, 'GET', '/v1/studio/templates', undefined, init));
51
+ return (Array.isArray(raw.data) ? raw.data : []).map((x) => str(obj(x).id)).filter(Boolean);
52
+ }
53
+ /** How often a run is read while it works, and the longest it is waited for. */
54
+ const EVERY = 2_000;
55
+ const LONGEST = 5 * 60_000;
56
+ const pause = (ms, signal) => new Promise((done, fail) => {
57
+ const id = setTimeout(done, ms);
58
+ signal?.addEventListener('abort', () => {
59
+ clearTimeout(id);
60
+ fail(signal.reason);
61
+ }, { once: true });
62
+ });
63
+ /**
64
+ * Start a run and wait for it to end. Aborted, the run is cancelled so its
65
+ * reservation is released; a run that fails is thrown with its reason.
66
+ */
67
+ export async function make(t, s, signal) {
68
+ let r = run(await call(t, 'POST', '/v1/studio/runs', s, { signal }).catch((e) => {
69
+ throw e instanceof Refusal && e.status === 402 ? new Error(phrase('Your balance does not cover it. Add credit in Settings › Billing.')) : e;
70
+ }));
71
+ if (!r.id)
72
+ throw new Error(phrase('Studio started the run and named no id'));
73
+ const id = r.id;
74
+ const stop = () => void call(t, 'POST', `/v1/studio/runs/${seg(id)}/cancel`, {}).catch(() => undefined);
75
+ signal?.addEventListener('abort', stop, { once: true });
76
+ try {
77
+ const until = Date.now() + LONGEST;
78
+ while (!ended(r)) {
79
+ if (Date.now() > until)
80
+ throw new Error(phrase('Studio is still making it. It will be in your Library when it is done.'));
81
+ await pause(EVERY, signal);
82
+ r = run(await call(t, 'GET', `/v1/studio/runs/${seg(id)}`, undefined, { signal }));
83
+ }
84
+ }
85
+ finally {
86
+ signal?.removeEventListener('abort', stop);
87
+ }
88
+ if (r.status !== 'succeeded')
89
+ throw r.error ? new Error(r.error) : new Sentence(phrase('Studio could not make it ({status})'), { status: r.status });
90
+ return r;
91
+ }
@@ -0,0 +1,48 @@
1
+ import { type Target } from './call.ts';
2
+ import type { Event, Session } from './sessions.ts';
3
+ /** The channel a conversation's session is on. */
4
+ export declare const TALK = "app";
5
+ /**
6
+ * Whether a session is a conversation, rather than one run. A conversation's runs
7
+ * are on its channel too — born in its tree, its person's alone — and are told
8
+ * from it by having a parent: the conversation is the root.
9
+ */
10
+ export declare const talks: (s: Pick<Session, 'channel' | 'parent'> | null | undefined) => boolean;
11
+ export interface Say {
12
+ /** The conversation to continue. Absent starts one. */
13
+ session?: string;
14
+ /** What the person said. */
15
+ input: string;
16
+ /** The model, by the id GET /v1/models lists. */
17
+ model?: string;
18
+ /** The repository: its name in the org, or owner/name on GitHub. */
19
+ repo?: string;
20
+ /** The branch a coding run starts from. */
21
+ base?: string;
22
+ /** One of the org's machines. Absent is the sandbox. */
23
+ target?: string;
24
+ /** How the conversation's coding runs go: on their own, asked for first, or plans only. */
25
+ mode?: 'auto' | 'manual' | 'plan';
26
+ /** How hard a coding run thinks: low, medium or high. */
27
+ effort?: string;
28
+ /** The issue on `repo` a coding run resolves. */
29
+ issue?: number;
30
+ /** Out-of-band instructions (skills, memories) kept separate from `input`. */
31
+ instructions?: string;
32
+ /** Explicit alias for `instructions` forwarded to turns and coding runs. */
33
+ developerInstructions?: string;
34
+ }
35
+ export interface Said {
36
+ /** The conversation: the same id on every turn. */
37
+ session: string;
38
+ /** This turn's run within it. */
39
+ run: string;
40
+ }
41
+ /** The request body: only what was said, with no empty values sent. */
42
+ export declare function body(s: Say): Record<string, string | number | boolean>;
43
+ /** Say one thing in a conversation: a new one without `session`, that one with it. */
44
+ export declare function say(t: Target, s: Say): Promise<Said>;
45
+ /** What a conversation's turn is doing now: its latest progress line, or ''. */
46
+ export declare function now(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): string;
47
+ /** Answer a question a session's run asked: an option pressed, or the person's own words. */
48
+ export declare function answer(t: Target, session: string, question: string, text: string, chosen: boolean): Promise<void>;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Dev's conversation, as the platform keeps it (apps/agents talk.go): one
3
+ * session, every turn.
4
+ *
5
+ * POST /v1/agent/turns {session?, input, model?, effort?, repo?, base?, target?, mode?, issue?}
6
+ * → {sessionId, runId}
7
+ * POST /v1/agent/sessions/{id}/answer {question, text, chosen} answer what a turn asked
8
+ *
9
+ * The first thing said opens the conversation; everything said after continues
10
+ * the SAME session under a new run, once its last turn has answered — what is said
11
+ * while a turn still works is that turn's next input (sessions.ts `message`). The
12
+ * agent answers, and decides for itself when a turn needs a sandbox (leased on its
13
+ * first use, kept for the conversation) or a coding run (which carries on the
14
+ * conversation's last, in its sandbox and on its branch). A turn that only talks
15
+ * uses neither, and a turn ends when its answer does: a build it started is
16
+ * followed after, and its outcome is said into the conversation when it ends.
17
+ *
18
+ * The repository, branch, machine and mode are kept on the conversation from the
19
+ * first message: every coding run its turns start works on them, auto starts it,
20
+ * manual asks first (a question answered here), plan only reads and plans. The
21
+ * model and effort ride each turn. Between turns the session rests `paused`.
22
+ */
23
+ import { phrase } from '@hanzo/i18n';
24
+ import { call, Refusal, seg } from './call.js';
25
+ import { decode } from './turn.js';
26
+ /** The channel a conversation's session is on. */
27
+ export const TALK = 'app';
28
+ /**
29
+ * Whether a session is a conversation, rather than one run. A conversation's runs
30
+ * are on its channel too — born in its tree, its person's alone — and are told
31
+ * from it by having a parent: the conversation is the root.
32
+ */
33
+ export const talks = (s) => s?.channel === TALK && !s.parent;
34
+ /** The request body: only what was said, with no empty values sent. */
35
+ export function body(s) {
36
+ const out = { input: s.input.trim() };
37
+ for (const k of [
38
+ 'session',
39
+ 'model',
40
+ 'effort',
41
+ 'repo',
42
+ 'base',
43
+ 'target',
44
+ 'mode',
45
+ 'instructions',
46
+ 'developerInstructions',
47
+ ]) {
48
+ const v = s[k]?.trim();
49
+ if (v)
50
+ out[k] = v;
51
+ }
52
+ if (s.issue && Number.isInteger(s.issue) && s.issue > 0)
53
+ out.issue = s.issue;
54
+ return out;
55
+ }
56
+ /** Say one thing in a conversation: a new one without `session`, that one with it. */
57
+ export async function say(t, s) {
58
+ if (!s.input.trim())
59
+ throw new Refusal(400, phrase('Say something'));
60
+ const r = await call(t, 'POST', '/v1/agent/turns', body(s));
61
+ const session = typeof r?.sessionId === 'string' ? r.sessionId : '';
62
+ if (!session)
63
+ throw new Refusal(502, phrase('The conversation answered with no session'));
64
+ return { session, run: typeof r?.runId === 'string' ? r.runId : '' };
65
+ }
66
+ /** What a conversation's turn is doing now: its latest progress line, or ''. */
67
+ export function now(events) {
68
+ let doing = '';
69
+ for (const e of [...events].sort((a, b) => a.seq - b.seq)) {
70
+ const b = decode(e.payload);
71
+ if (e.kind === 'progress' && b && typeof b !== 'string' && typeof b.activity === 'string')
72
+ doing = b.activity;
73
+ }
74
+ return doing;
75
+ }
76
+ /** Answer a question a session's run asked: an option pressed, or the person's own words. */
77
+ export async function answer(t, session, question, text, chosen) {
78
+ if (!text.trim())
79
+ throw new Refusal(400, phrase('Say an answer'));
80
+ await call(t, 'POST', `/v1/agent/sessions/${seg(session)}/answer`, { question, text: text.trim(), chosen });
81
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The org's tool plane: every tool it can reach, and which of them are on.
3
+ *
4
+ * GET /v1/tool?source=&activated=true {tools: [{name, source, description, activated, dispatchable}]}
5
+ * GET /v1/tool/activation {enabled: [name]}
6
+ * PUT /v1/tool/activation {activate: [name], deactivate: [name]} → {enabled: [name]}
7
+ *
8
+ * A tool is on per org. On is what puts a skill's SKILL.md in an agent's prompt
9
+ * and what lets an MCP server's tool be called; a tool that is off is listed and
10
+ * refused at call time. Any member of the org may switch one — the handler asks
11
+ * for the org and nothing more.
12
+ */
13
+ import { type Target } from './call.ts';
14
+ export interface Tool {
15
+ /** The flat, fleet-wide name: `skill_<name>`, `<server id>_<tool>`, `agent_<name>`… */
16
+ name: string;
17
+ /** connector, function, zap-service, agent, skill or mcp. */
18
+ source: string;
19
+ description: string;
20
+ activated: boolean;
21
+ }
22
+ export declare const names: (v: unknown) => string[];
23
+ export declare function tool(raw: unknown): Tool;
24
+ /** The tools in one listing, whichever of the plane's two envelopes it came in. */
25
+ export declare function toolsOf(raw: unknown): Tool[];
26
+ /** Every tool the org reaches, narrowed to one source and to the ones that are on when asked. */
27
+ export declare function tools(t: Target, q?: {
28
+ source?: string;
29
+ activated?: boolean;
30
+ }): Promise<Tool[]>;
31
+ /** The names that are on. */
32
+ export declare function enabled(t: Target): Promise<string[]>;
33
+ /** Switch names on and off; answers every name that is on afterwards. */
34
+ export declare function toggle(t: Target, on: string[], off?: string[]): Promise<string[]>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The org's tool plane: every tool it can reach, and which of them are on.
3
+ *
4
+ * GET /v1/tool?source=&activated=true {tools: [{name, source, description, activated, dispatchable}]}
5
+ * GET /v1/tool/activation {enabled: [name]}
6
+ * PUT /v1/tool/activation {activate: [name], deactivate: [name]} → {enabled: [name]}
7
+ *
8
+ * A tool is on per org. On is what puts a skill's SKILL.md in an agent's prompt
9
+ * and what lets an MCP server's tool be called; a tool that is off is listed and
10
+ * refused at call time. Any member of the org may switch one — the handler asks
11
+ * for the org and nothing more.
12
+ */
13
+ import { call, query } from './call.js';
14
+ const str = (v) => (typeof v === 'string' ? v : '');
15
+ const obj = (v) => (v && typeof v === 'object' ? v : {});
16
+ export const names = (v) => (Array.isArray(v) ? v.filter((n) => typeof n === 'string' && n !== '') : []);
17
+ export function tool(raw) {
18
+ const o = obj(raw);
19
+ return { name: str(o.name), source: str(o.source), description: str(o.description), activated: o.activated === true };
20
+ }
21
+ /** The tools in one listing, whichever of the plane's two envelopes it came in. */
22
+ export function toolsOf(raw) {
23
+ const list = obj(raw).tools;
24
+ return (Array.isArray(list) ? list : []).map(tool).filter((x) => x.name);
25
+ }
26
+ /** Every tool the org reaches, narrowed to one source and to the ones that are on when asked. */
27
+ export async function tools(t, q = {}) {
28
+ return toolsOf(await call(t, 'GET', `/v1/tool${query({ source: q.source, activated: q.activated ? 'true' : undefined })}`));
29
+ }
30
+ /** The names that are on. */
31
+ export async function enabled(t) {
32
+ return names(obj(await call(t, 'GET', '/v1/tool/activation')).enabled);
33
+ }
34
+ /** Switch names on and off; answers every name that is on afterwards. */
35
+ export async function toggle(t, on, off = []) {
36
+ return names(obj(await call(t, 'PUT', '/v1/tool/activation', { activate: on, deactivate: off })).enabled);
37
+ }
@@ -0,0 +1,202 @@
1
+ import type { Say } from '@hanzo/i18n/react';
2
+ import { type Changed, type Explore } from './cli.ts';
3
+ import type { Event } from './sessions.ts';
4
+ /** The payload as an object. A live frame may carry it as a JSON string. */
5
+ export declare function decode(payload: unknown): Record<string, unknown> | string | null;
6
+ /**
7
+ * Whether an error is a model vendor's own words: a provider's name, its rate
8
+ * headers, a key, or the JSON body it answers with. Those never reach the run
9
+ * page — they say whose model it was and nothing a person can act on — so the
10
+ * run says its plain line alone.
11
+ */
12
+ export declare function vendor(error: string): boolean;
13
+ /** An error as the run page may show it: its own words, or the plain line when they are a vendor's. */
14
+ export declare const scrub: (error: string, t?: Say) => string;
15
+ /** Whether an error message indicates insufficient balance / credit / free-sandbox exhaustion (#363/#364). */
16
+ export declare function needsFunds(error: string): boolean;
17
+ /**
18
+ * A run's error as one plain line with what to do, never the log it came from:
19
+ * that goes in the Error step beside it (cards), unless it is a vendor's.
20
+ */
21
+ export declare function plain(error: string, t?: Say): string;
22
+ /**
23
+ * One event's sentence, or '' when it says nothing a person needs. `mode` is
24
+ * the run's, from its record: a plan run's final status says the plan.
25
+ */
26
+ export declare function said(e: Pick<Event, 'kind' | 'payload'>, mode?: string, t?: Say): string;
27
+ /** One line of the shell: a command the run started, or output that followed it. */
28
+ export interface ShellLine {
29
+ role: 'cmd' | 'out';
30
+ text: string;
31
+ }
32
+ /**
33
+ * The shell beside the transcript. A tool call is the command; a log line, and
34
+ * any stdout or stderr the payload carried, is the output. Status stays in the
35
+ * transcript. Each line is capped so a payload that carried a file body cannot
36
+ * fill the pane.
37
+ */
38
+ export declare function shell(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): ShellLine[];
39
+ /** A step the run named. Done is a step whose status has settled. */
40
+ export interface StepLine {
41
+ name: string;
42
+ done: boolean;
43
+ }
44
+ /**
45
+ * Tool calls, in the order they were first named. A later status for the same
46
+ * step wins, and a run's steps follow one another, so a step another has
47
+ * followed is over. `exit` is not a step: it is how the sandbox says one command
48
+ * in it ended (apps/sandbox work.go).
49
+ */
50
+ export declare function steps(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): StepLine[];
51
+ export interface Outcome {
52
+ /** The last lifecycle status the run narrated, or ''. */
53
+ status: string;
54
+ /**
55
+ * That the pull request could not be opened, as narrated, or ''. Shown as a
56
+ * fact only — its text comes from an event any member can write, so it is
57
+ * never put on screen as the reason.
58
+ */
59
+ problem: string;
60
+ /**
61
+ * The place in the run (its `seq`) of the latest status that said its work
62
+ * went live on its project's site, or 0. It is the cue to read the project
63
+ * again; the address shown is the project's own, never one an event names.
64
+ */
65
+ published: number;
66
+ }
67
+ export declare function outcome(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): Outcome;
68
+ /** Why the run failed, as its last status or error log says it, or '' when that status is not a failure. */
69
+ export declare function failure(events: Pick<Event, 'kind' | 'payload' | 'seq'>[], t?: Say): string;
70
+ /** The turns, ordered and deduped: a recorded read and the live feed overlap. */
71
+ export declare function merge<T extends Pick<Event, 'id' | 'seq'>>(...lists: T[][]): T[];
72
+ /** The actor, short enough to label a block: `hanzo/2d4d67ab`, not the whole subject. */
73
+ export declare function who(actor: string): string;
74
+ /**
75
+ * A pull request address the builder will draw as a link: https, on GitHub or
76
+ * the platform's own git, shaped like a pull request, and IN THE RUN'S OWN
77
+ * REPOSITORY (`repo`, `owner/name`). Anything else is ''. Read from the run's
78
+ * record, which the coding service writes — never from an event, which any
79
+ * member of the org can append — and bound to the repository, because a record
80
+ * can be moved into a project it did not work on.
81
+ */
82
+ export declare function pull(url: string, repo: string): {
83
+ href: string;
84
+ label: string;
85
+ };
86
+ /** How a card's work went. One still running once the run has ended was cut off. */
87
+ export type Ran = 'running' | 'done' | 'error' | 'cancelled';
88
+ /**
89
+ * One piece of the transcript, drawn by what it is.
90
+ *
91
+ * said prose: the agent's messages (markdown), or a person's steering words
92
+ * think the agent's reasoning, folded until opened
93
+ * shell a command the agent ran, and what it printed: the CLI's "Ran"
94
+ * explore reads, listings and searches, consecutive ones together: the CLI's "Explored"
95
+ * edit files the agent changed, with the lines each adds and removes; the diff is the run's Git tab
96
+ * step a step of the run itself (lease, clone, install, push), or a tool the agent called
97
+ * todo the agent's plan, as a checklist it ticks
98
+ * note a lifecycle line: started, pushed, stopped
99
+ * plan a plan run's answer, which can be approved into a build
100
+ * run a coding run a conversation's turn started (talk.ts), opened on its own page
101
+ * ask a question the run asked its person, with its options, and the answer once given
102
+ */
103
+ export type Card = {
104
+ kind: 'said';
105
+ key: string;
106
+ who: 'person' | 'agent';
107
+ text: string;
108
+ } | {
109
+ kind: 'think';
110
+ key: string;
111
+ text: string;
112
+ } | {
113
+ kind: 'shell';
114
+ key: string;
115
+ command: string;
116
+ output: string;
117
+ ran: Ran;
118
+ } | {
119
+ kind: 'explore';
120
+ key: string;
121
+ calls: Explore[];
122
+ ran: Ran;
123
+ } | {
124
+ kind: 'edit';
125
+ key: string;
126
+ files: Changed[];
127
+ ran: Ran;
128
+ } | {
129
+ kind: 'step';
130
+ key: string;
131
+ name: string;
132
+ detail: string;
133
+ output: string;
134
+ ran: Ran;
135
+ } | {
136
+ kind: 'todo';
137
+ key: string;
138
+ items: {
139
+ text: string;
140
+ done: boolean;
141
+ }[];
142
+ }
143
+ /** `step`: a line about the run getting going (started, sent to a machine), the process rather than its end. */
144
+ | {
145
+ kind: 'note';
146
+ key: string;
147
+ text: string;
148
+ step?: true;
149
+ funds?: true;
150
+ } | {
151
+ kind: 'plan';
152
+ key: string;
153
+ text: string;
154
+ } | {
155
+ kind: 'run';
156
+ key: string;
157
+ session: string;
158
+ } | {
159
+ kind: 'ask';
160
+ key: string;
161
+ question: string;
162
+ text: string;
163
+ options: string[];
164
+ answer: string;
165
+ };
166
+ /**
167
+ * A run's events, as the cards its transcript draws. `mode` is the run's, from
168
+ * its record: a plan's final status is its plan, and nothing else draws a plan.
169
+ *
170
+ * The run's own steps arrive as `tool-call` {step, message, status}. The agent
171
+ * narrates itself as `event` lines: an item is started, updated and completed
172
+ * under one id, and its card is drawn once and kept current. Ids count from zero
173
+ * in each agent process, so an id is the agent's within the thread it started. A
174
+ * turn that fails is one plain line with the detail folded beneath it, drawn once
175
+ * however many times it is said; an `error` on its own is the agent retrying and
176
+ * is drawn only if the turn then fails. The final status carries the agent's
177
+ * answer, drawn once. `log` is never drawn here.
178
+ */
179
+ export declare function cards(events: Pick<Event, 'kind' | 'payload' | 'seq'>[], mode?: string, t?: Say): Card[];
180
+ /**
181
+ * Cards as the CLI prints them, line for line: what a run's transcript reads as in
182
+ * `dev`'s terminal. The transcript draws the same words (transcript.tsx); this is
183
+ * them as text, which the parity tests hold to the CLI's own.
184
+ */
185
+ export declare function printed(cards: Card[], live?: boolean): string;
186
+ /** The plan a plan run answered with, from its final status, or ''. */
187
+ export declare function answer(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): string;
188
+ export interface Settled {
189
+ /** The run has said how it ended, or that it paused: its work is where it will stay. */
190
+ settled: boolean;
191
+ /** That work is on the run's own branch, which a follow-up can start from. */
192
+ pushed: boolean;
193
+ }
194
+ /**
195
+ * Whether the run has kept its work yet, and whether that work is on its
196
+ * branch. A stop or a pause commits and pushes AFTER it is asked, and says so
197
+ * in its status (apps/coding coding.go interrupted): until then a follow-up
198
+ * would clone a branch the push has not reached.
199
+ */
200
+ export declare function settled(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): Settled;
201
+ /** The session of the run that carried this one on (its `followed` status), or ''. */
202
+ export declare function followed(events: Pick<Event, 'kind' | 'payload' | 'seq'>[]): string;