@steipete/summarize 0.10.0 → 0.11.1

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 (374) hide show
  1. package/CHANGELOG.md +80 -28
  2. package/README.md +115 -30
  3. package/dist/cli.js +1 -1
  4. package/dist/esm/cache.js +67 -65
  5. package/dist/esm/cache.js.map +1 -1
  6. package/dist/esm/cli-main.js +27 -27
  7. package/dist/esm/cli-main.js.map +1 -1
  8. package/dist/esm/cli.js +2 -2
  9. package/dist/esm/cli.js.map +1 -1
  10. package/dist/esm/config.js +310 -166
  11. package/dist/esm/config.js.map +1 -1
  12. package/dist/esm/content/asset.js +53 -50
  13. package/dist/esm/content/asset.js.map +1 -1
  14. package/dist/esm/content/index.js +1 -1
  15. package/dist/esm/content/index.js.map +1 -1
  16. package/dist/esm/costs.js +1 -1
  17. package/dist/esm/costs.js.map +1 -1
  18. package/dist/esm/daemon/agent.js +165 -164
  19. package/dist/esm/daemon/agent.js.map +1 -1
  20. package/dist/esm/daemon/auto-mode.js +3 -3
  21. package/dist/esm/daemon/auto-mode.js.map +1 -1
  22. package/dist/esm/daemon/chat.js +16 -14
  23. package/dist/esm/daemon/chat.js.map +1 -1
  24. package/dist/esm/daemon/cli-entrypoint.js +72 -0
  25. package/dist/esm/daemon/cli-entrypoint.js.map +1 -0
  26. package/dist/esm/daemon/cli.js +63 -87
  27. package/dist/esm/daemon/cli.js.map +1 -1
  28. package/dist/esm/daemon/config.js +15 -15
  29. package/dist/esm/daemon/config.js.map +1 -1
  30. package/dist/esm/daemon/constants.js +6 -6
  31. package/dist/esm/daemon/constants.js.map +1 -1
  32. package/dist/esm/daemon/env-merge.js.map +1 -1
  33. package/dist/esm/daemon/env-snapshot.js +36 -31
  34. package/dist/esm/daemon/env-snapshot.js.map +1 -1
  35. package/dist/esm/daemon/flow-context.js +59 -28
  36. package/dist/esm/daemon/flow-context.js.map +1 -1
  37. package/dist/esm/daemon/launchd.js +100 -55
  38. package/dist/esm/daemon/launchd.js.map +1 -1
  39. package/dist/esm/daemon/meta.js +5 -5
  40. package/dist/esm/daemon/meta.js.map +1 -1
  41. package/dist/esm/daemon/models.js +54 -31
  42. package/dist/esm/daemon/models.js.map +1 -1
  43. package/dist/esm/daemon/process-registry.js +15 -15
  44. package/dist/esm/daemon/process-registry.js.map +1 -1
  45. package/dist/esm/daemon/schtasks.js +42 -42
  46. package/dist/esm/daemon/schtasks.js.map +1 -1
  47. package/dist/esm/daemon/server.js +248 -244
  48. package/dist/esm/daemon/server.js.map +1 -1
  49. package/dist/esm/daemon/summarize-progress.js +11 -11
  50. package/dist/esm/daemon/summarize-progress.js.map +1 -1
  51. package/dist/esm/daemon/summarize.js +29 -29
  52. package/dist/esm/daemon/summarize.js.map +1 -1
  53. package/dist/esm/daemon/systemd.js +47 -47
  54. package/dist/esm/daemon/systemd.js.map +1 -1
  55. package/dist/esm/firecrawl.js +12 -12
  56. package/dist/esm/firecrawl.js.map +1 -1
  57. package/dist/esm/flags.js +32 -32
  58. package/dist/esm/flags.js.map +1 -1
  59. package/dist/esm/index.js +3 -3
  60. package/dist/esm/index.js.map +1 -1
  61. package/dist/esm/language.js +1 -1
  62. package/dist/esm/language.js.map +1 -1
  63. package/dist/esm/llm/cli.js +128 -64
  64. package/dist/esm/llm/cli.js.map +1 -1
  65. package/dist/esm/llm/errors.js +1 -1
  66. package/dist/esm/llm/errors.js.map +1 -1
  67. package/dist/esm/llm/generate-text.js +107 -98
  68. package/dist/esm/llm/generate-text.js.map +1 -1
  69. package/dist/esm/llm/google-models.js +17 -17
  70. package/dist/esm/llm/google-models.js.map +1 -1
  71. package/dist/esm/llm/html-to-markdown.js +3 -3
  72. package/dist/esm/llm/html-to-markdown.js.map +1 -1
  73. package/dist/esm/llm/model-id.js +38 -16
  74. package/dist/esm/llm/model-id.js.map +1 -1
  75. package/dist/esm/llm/prompt.js +5 -5
  76. package/dist/esm/llm/prompt.js.map +1 -1
  77. package/dist/esm/llm/providers/anthropic.js +33 -33
  78. package/dist/esm/llm/providers/anthropic.js.map +1 -1
  79. package/dist/esm/llm/providers/google.js +19 -19
  80. package/dist/esm/llm/providers/google.js.map +1 -1
  81. package/dist/esm/llm/providers/models.js +30 -30
  82. package/dist/esm/llm/providers/models.js.map +1 -1
  83. package/dist/esm/llm/providers/openai.js +35 -34
  84. package/dist/esm/llm/providers/openai.js.map +1 -1
  85. package/dist/esm/llm/providers/shared.js +8 -8
  86. package/dist/esm/llm/providers/shared.js.map +1 -1
  87. package/dist/esm/llm/transcript-to-markdown.js +9 -5
  88. package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
  89. package/dist/esm/llm/usage.js +18 -18
  90. package/dist/esm/llm/usage.js.map +1 -1
  91. package/dist/esm/logging/daemon.js +21 -21
  92. package/dist/esm/logging/daemon.js.map +1 -1
  93. package/dist/esm/logging/ring-file.js +5 -5
  94. package/dist/esm/logging/ring-file.js.map +1 -1
  95. package/dist/esm/markitdown.js +21 -19
  96. package/dist/esm/markitdown.js.map +1 -1
  97. package/dist/esm/media-cache.js +39 -39
  98. package/dist/esm/media-cache.js.map +1 -1
  99. package/dist/esm/model-auto.js +175 -106
  100. package/dist/esm/model-auto.js.map +1 -1
  101. package/dist/esm/model-spec.js +52 -42
  102. package/dist/esm/model-spec.js.map +1 -1
  103. package/dist/esm/pricing/litellm.js +4 -4
  104. package/dist/esm/pricing/litellm.js.map +1 -1
  105. package/dist/esm/processes.js +1 -1
  106. package/dist/esm/processes.js.map +1 -1
  107. package/dist/esm/prompts/index.js +1 -1
  108. package/dist/esm/prompts/index.js.map +1 -1
  109. package/dist/esm/refresh-free.js +81 -81
  110. package/dist/esm/refresh-free.js.map +1 -1
  111. package/dist/esm/run/attachments.js +47 -44
  112. package/dist/esm/run/attachments.js.map +1 -1
  113. package/dist/esm/run/bird.js +26 -26
  114. package/dist/esm/run/bird.js.map +1 -1
  115. package/dist/esm/run/cache-state.js +7 -7
  116. package/dist/esm/run/cache-state.js.map +1 -1
  117. package/dist/esm/run/cli-fallback-state.js +45 -0
  118. package/dist/esm/run/cli-fallback-state.js.map +1 -0
  119. package/dist/esm/run/cli-preflight.js +24 -24
  120. package/dist/esm/run/cli-preflight.js.map +1 -1
  121. package/dist/esm/run/constants.js +12 -12
  122. package/dist/esm/run/constants.js.map +1 -1
  123. package/dist/esm/run/cookies/twitter.js +47 -47
  124. package/dist/esm/run/cookies/twitter.js.map +1 -1
  125. package/dist/esm/run/env.js +21 -15
  126. package/dist/esm/run/env.js.map +1 -1
  127. package/dist/esm/run/fetch-with-timeout.js +4 -4
  128. package/dist/esm/run/fetch-with-timeout.js.map +1 -1
  129. package/dist/esm/run/finish-line.js +68 -68
  130. package/dist/esm/run/finish-line.js.map +1 -1
  131. package/dist/esm/run/flows/asset/extract.js +15 -15
  132. package/dist/esm/run/flows/asset/extract.js.map +1 -1
  133. package/dist/esm/run/flows/asset/input.js +47 -66
  134. package/dist/esm/run/flows/asset/input.js.map +1 -1
  135. package/dist/esm/run/flows/asset/media-policy.js +1 -1
  136. package/dist/esm/run/flows/asset/media-policy.js.map +1 -1
  137. package/dist/esm/run/flows/asset/media.js +49 -40
  138. package/dist/esm/run/flows/asset/media.js.map +1 -1
  139. package/dist/esm/run/flows/asset/output.js +12 -12
  140. package/dist/esm/run/flows/asset/output.js.map +1 -1
  141. package/dist/esm/run/flows/asset/preprocess.js +79 -44
  142. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  143. package/dist/esm/run/flows/asset/summary.js +173 -106
  144. package/dist/esm/run/flows/asset/summary.js.map +1 -1
  145. package/dist/esm/run/flows/url/extract.js +26 -26
  146. package/dist/esm/run/flows/url/extract.js.map +1 -1
  147. package/dist/esm/run/flows/url/flow.js +104 -98
  148. package/dist/esm/run/flows/url/flow.js.map +1 -1
  149. package/dist/esm/run/flows/url/markdown.js +57 -57
  150. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  151. package/dist/esm/run/flows/url/slides-output.js +61 -59
  152. package/dist/esm/run/flows/url/slides-output.js.map +1 -1
  153. package/dist/esm/run/flows/url/slides-text.js +85 -85
  154. package/dist/esm/run/flows/url/slides-text.js.map +1 -1
  155. package/dist/esm/run/flows/url/summary.js +174 -107
  156. package/dist/esm/run/flows/url/summary.js.map +1 -1
  157. package/dist/esm/run/format.js +10 -10
  158. package/dist/esm/run/format.js.map +1 -1
  159. package/dist/esm/run/help.js +141 -135
  160. package/dist/esm/run/help.js.map +1 -1
  161. package/dist/esm/run/logging.js +10 -10
  162. package/dist/esm/run/logging.js.map +1 -1
  163. package/dist/esm/run/markdown.js +12 -12
  164. package/dist/esm/run/markdown.js.map +1 -1
  165. package/dist/esm/run/media-cache-state.js +5 -5
  166. package/dist/esm/run/media-cache-state.js.map +1 -1
  167. package/dist/esm/run/model-attempts.js.map +1 -1
  168. package/dist/esm/run/openrouter.js +11 -11
  169. package/dist/esm/run/openrouter.js.map +1 -1
  170. package/dist/esm/run/progress.js +1 -1
  171. package/dist/esm/run/progress.js.map +1 -1
  172. package/dist/esm/run/run-config.js +16 -16
  173. package/dist/esm/run/run-config.js.map +1 -1
  174. package/dist/esm/run/run-context.js +2 -2
  175. package/dist/esm/run/run-context.js.map +1 -1
  176. package/dist/esm/run/run-env.js +55 -54
  177. package/dist/esm/run/run-env.js.map +1 -1
  178. package/dist/esm/run/run-input.js +3 -3
  179. package/dist/esm/run/run-input.js.map +1 -1
  180. package/dist/esm/run/run-metrics.js +16 -16
  181. package/dist/esm/run/run-metrics.js.map +1 -1
  182. package/dist/esm/run/run-models.js +28 -23
  183. package/dist/esm/run/run-models.js.map +1 -1
  184. package/dist/esm/run/run-output.js +3 -3
  185. package/dist/esm/run/run-output.js.map +1 -1
  186. package/dist/esm/run/run-settings.js +83 -34
  187. package/dist/esm/run/run-settings.js.map +1 -1
  188. package/dist/esm/run/run-stream.js +4 -4
  189. package/dist/esm/run/run-stream.js.map +1 -1
  190. package/dist/esm/run/runner.js +166 -127
  191. package/dist/esm/run/runner.js.map +1 -1
  192. package/dist/esm/run/slides-cli.js +43 -42
  193. package/dist/esm/run/slides-cli.js.map +1 -1
  194. package/dist/esm/run/slides-render.js +36 -36
  195. package/dist/esm/run/slides-render.js.map +1 -1
  196. package/dist/esm/run/stdin-temp-file.js +77 -0
  197. package/dist/esm/run/stdin-temp-file.js.map +1 -0
  198. package/dist/esm/run/stream-output.js +7 -7
  199. package/dist/esm/run/stream-output.js.map +1 -1
  200. package/dist/esm/run/streaming.js +16 -16
  201. package/dist/esm/run/streaming.js.map +1 -1
  202. package/dist/esm/run/summary-engine.js +57 -51
  203. package/dist/esm/run/summary-engine.js.map +1 -1
  204. package/dist/esm/run/summary-llm.js +3 -3
  205. package/dist/esm/run/summary-llm.js.map +1 -1
  206. package/dist/esm/run/terminal.js +4 -4
  207. package/dist/esm/run/terminal.js.map +1 -1
  208. package/dist/esm/run/tips.js +2 -2
  209. package/dist/esm/run/tips.js.map +1 -1
  210. package/dist/esm/run/transcriber-cli.js +49 -49
  211. package/dist/esm/run/transcriber-cli.js.map +1 -1
  212. package/dist/esm/run.js +1 -1
  213. package/dist/esm/run.js.map +1 -1
  214. package/dist/esm/shared/contracts.js +1 -1
  215. package/dist/esm/shared/contracts.js.map +1 -1
  216. package/dist/esm/shared/sse-events.js +16 -16
  217. package/dist/esm/shared/sse-events.js.map +1 -1
  218. package/dist/esm/shared/streaming-merge.js +3 -3
  219. package/dist/esm/shared/streaming-merge.js.map +1 -1
  220. package/dist/esm/slides/extract.js +258 -249
  221. package/dist/esm/slides/extract.js.map +1 -1
  222. package/dist/esm/slides/index.js +3 -3
  223. package/dist/esm/slides/index.js.map +1 -1
  224. package/dist/esm/slides/settings.js +14 -14
  225. package/dist/esm/slides/settings.js.map +1 -1
  226. package/dist/esm/slides/store.js +9 -9
  227. package/dist/esm/slides/store.js.map +1 -1
  228. package/dist/esm/tty/format.js +13 -13
  229. package/dist/esm/tty/format.js.map +1 -1
  230. package/dist/esm/tty/osc-progress.js +1 -1
  231. package/dist/esm/tty/osc-progress.js.map +1 -1
  232. package/dist/esm/tty/progress/fetch-html.js +14 -14
  233. package/dist/esm/tty/progress/fetch-html.js.map +1 -1
  234. package/dist/esm/tty/progress/transcript.js +70 -62
  235. package/dist/esm/tty/progress/transcript.js.map +1 -1
  236. package/dist/esm/tty/spinner.js +20 -9
  237. package/dist/esm/tty/spinner.js.map +1 -1
  238. package/dist/esm/tty/theme.js +92 -92
  239. package/dist/esm/tty/theme.js.map +1 -1
  240. package/dist/esm/tty/website-progress.js +32 -32
  241. package/dist/esm/tty/website-progress.js.map +1 -1
  242. package/dist/esm/version.js +29 -29
  243. package/dist/esm/version.js.map +1 -1
  244. package/dist/types/cache.d.ts +6 -6
  245. package/dist/types/config.d.ts +49 -7
  246. package/dist/types/content/asset.d.ts +8 -6
  247. package/dist/types/content/index.d.ts +1 -1
  248. package/dist/types/costs.d.ts +3 -3
  249. package/dist/types/daemon/agent.d.ts +1 -1
  250. package/dist/types/daemon/auto-mode.d.ts +3 -3
  251. package/dist/types/daemon/chat.d.ts +2 -2
  252. package/dist/types/daemon/cli-entrypoint.d.ts +2 -0
  253. package/dist/types/daemon/config.d.ts +2 -2
  254. package/dist/types/daemon/env-merge.d.ts +1 -1
  255. package/dist/types/daemon/env-snapshot.d.ts +1 -1
  256. package/dist/types/daemon/flow-context.d.ts +7 -7
  257. package/dist/types/daemon/launchd.d.ts +8 -0
  258. package/dist/types/daemon/models.d.ts +6 -2
  259. package/dist/types/daemon/process-registry.d.ts +5 -5
  260. package/dist/types/daemon/server.d.ts +2 -2
  261. package/dist/types/daemon/summarize-progress.d.ts +1 -1
  262. package/dist/types/daemon/summarize.d.ts +7 -7
  263. package/dist/types/firecrawl.d.ts +1 -1
  264. package/dist/types/flags.d.ts +11 -11
  265. package/dist/types/index.d.ts +4 -4
  266. package/dist/types/language.d.ts +1 -1
  267. package/dist/types/llm/attachments.d.ts +1 -1
  268. package/dist/types/llm/cli.d.ts +3 -3
  269. package/dist/types/llm/generate-text.d.ts +7 -7
  270. package/dist/types/llm/html-to-markdown.d.ts +3 -3
  271. package/dist/types/llm/model-id.d.ts +1 -1
  272. package/dist/types/llm/prompt.d.ts +2 -2
  273. package/dist/types/llm/providers/anthropic.d.ts +3 -3
  274. package/dist/types/llm/providers/google.d.ts +3 -3
  275. package/dist/types/llm/providers/models.d.ts +2 -2
  276. package/dist/types/llm/providers/openai.d.ts +4 -4
  277. package/dist/types/llm/providers/shared.d.ts +2 -2
  278. package/dist/types/llm/transcript-to-markdown.d.ts +4 -2
  279. package/dist/types/llm/usage.d.ts +1 -1
  280. package/dist/types/logging/daemon.d.ts +4 -4
  281. package/dist/types/markitdown.d.ts +1 -1
  282. package/dist/types/media-cache.d.ts +2 -2
  283. package/dist/types/model-auto.d.ts +14 -4
  284. package/dist/types/model-spec.d.ts +10 -10
  285. package/dist/types/pricing/litellm.d.ts +1 -1
  286. package/dist/types/processes.d.ts +1 -1
  287. package/dist/types/prompts/index.d.ts +1 -1
  288. package/dist/types/run/attachments.d.ts +7 -7
  289. package/dist/types/run/bird.d.ts +2 -2
  290. package/dist/types/run/cache-state.d.ts +2 -2
  291. package/dist/types/run/cli-fallback-state.d.ts +6 -0
  292. package/dist/types/run/constants.d.ts +1 -1
  293. package/dist/types/run/cookies/twitter.d.ts +1 -1
  294. package/dist/types/run/env.d.ts +1 -1
  295. package/dist/types/run/finish-line.d.ts +5 -5
  296. package/dist/types/run/flows/asset/extract.d.ts +4 -4
  297. package/dist/types/run/flows/asset/input.d.ts +9 -3
  298. package/dist/types/run/flows/asset/media.d.ts +1 -1
  299. package/dist/types/run/flows/asset/output.d.ts +5 -5
  300. package/dist/types/run/flows/asset/preprocess.d.ts +23 -17
  301. package/dist/types/run/flows/asset/summary.d.ts +19 -17
  302. package/dist/types/run/flows/url/extract.d.ts +1 -1
  303. package/dist/types/run/flows/url/flow.d.ts +1 -1
  304. package/dist/types/run/flows/url/markdown.d.ts +6 -6
  305. package/dist/types/run/flows/url/slides-output.d.ts +7 -7
  306. package/dist/types/run/flows/url/slides-text.d.ts +9 -9
  307. package/dist/types/run/flows/url/summary.d.ts +11 -11
  308. package/dist/types/run/flows/url/types.d.ts +26 -22
  309. package/dist/types/run/format.d.ts +3 -3
  310. package/dist/types/run/help.d.ts +1 -1
  311. package/dist/types/run/media-cache-state.d.ts +2 -2
  312. package/dist/types/run/model-attempts.d.ts +1 -1
  313. package/dist/types/run/run-config.d.ts +4 -4
  314. package/dist/types/run/run-context.d.ts +3 -1
  315. package/dist/types/run/run-env.d.ts +3 -1
  316. package/dist/types/run/run-input.d.ts +2 -2
  317. package/dist/types/run/run-metrics.d.ts +3 -3
  318. package/dist/types/run/run-models.d.ts +3 -2
  319. package/dist/types/run/run-output.d.ts +1 -1
  320. package/dist/types/run/run-settings.d.ts +15 -6
  321. package/dist/types/run/run-stream.d.ts +2 -2
  322. package/dist/types/run/runner.d.ts +3 -2
  323. package/dist/types/run/slides-render.d.ts +4 -4
  324. package/dist/types/run/stdin-temp-file.d.ts +9 -0
  325. package/dist/types/run/stream-output.d.ts +1 -1
  326. package/dist/types/run/streaming.d.ts +4 -4
  327. package/dist/types/run/summary-engine.d.ts +11 -11
  328. package/dist/types/run/summary-llm.d.ts +5 -5
  329. package/dist/types/run/types.d.ts +4 -4
  330. package/dist/types/run.d.ts +1 -1
  331. package/dist/types/shared/contracts.d.ts +2 -2
  332. package/dist/types/shared/sse-events.d.ts +9 -9
  333. package/dist/types/slides/extract.d.ts +5 -4
  334. package/dist/types/slides/index.d.ts +5 -5
  335. package/dist/types/slides/store.d.ts +2 -2
  336. package/dist/types/slides/types.d.ts +2 -2
  337. package/dist/types/tty/osc-progress.d.ts +5 -5
  338. package/dist/types/tty/progress/fetch-html.d.ts +3 -3
  339. package/dist/types/tty/progress/transcript.d.ts +3 -3
  340. package/dist/types/tty/spinner.d.ts +2 -2
  341. package/dist/types/tty/theme.d.ts +2 -2
  342. package/dist/types/tty/website-progress.d.ts +3 -3
  343. package/dist/types/version.d.ts +1 -1
  344. package/docs/agent.md +38 -4
  345. package/docs/assets/site.js +46 -46
  346. package/docs/chrome-extension.md +11 -5
  347. package/docs/cli.md +59 -13
  348. package/docs/config.md +59 -10
  349. package/docs/extract-only.md +2 -0
  350. package/docs/index.html +33 -14
  351. package/docs/llm.md +7 -4
  352. package/docs/media.md +5 -4
  353. package/docs/model-auto.md +3 -2
  354. package/docs/nvidia-onnx-transcription.md +3 -3
  355. package/docs/openai.md +1 -1
  356. package/docs/releasing.md +3 -0
  357. package/docs/site/404.html +4 -1
  358. package/docs/site/assets/site.js +46 -46
  359. package/docs/site/docs/chrome-extension.html +18 -6
  360. package/docs/site/docs/config.html +29 -8
  361. package/docs/site/docs/extract-only.html +16 -4
  362. package/docs/site/docs/firecrawl.html +12 -3
  363. package/docs/site/docs/index.html +35 -6
  364. package/docs/site/docs/llm.html +19 -5
  365. package/docs/site/docs/openai.html +18 -5
  366. package/docs/site/docs/website.html +29 -9
  367. package/docs/site/docs/youtube.html +12 -3
  368. package/docs/site/index.html +33 -14
  369. package/docs/slides.md +13 -5
  370. package/docs/smoketest.md +29 -20
  371. package/docs/timestamps.md +21 -0
  372. package/docs/website.md +2 -1
  373. package/docs/youtube.md +4 -0
  374. package/package.json +36 -35
@@ -1,9 +1,11 @@
1
- import type { LlmTokenUsage } from './generate-text.js';
1
+ import type { OutputLanguage } from "../language.js";
2
+ import type { LlmTokenUsage } from "./generate-text.js";
2
3
  export type ConvertTranscriptToMarkdown = (args: {
3
4
  title: string | null;
4
5
  source: string | null;
5
6
  transcript: string;
6
7
  timeoutMs: number;
8
+ outputLanguage?: OutputLanguage | null;
7
9
  }) => Promise<string>;
8
10
  export declare function createTranscriptToMarkdownConverter({ modelId, forceOpenRouter, xaiApiKey, googleApiKey, openaiApiKey, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, anthropicApiKey, openrouterApiKey, fetchImpl, forceChatCompletions, retries, onRetry, onUsage, }: {
9
11
  modelId: string;
@@ -28,7 +30,7 @@ export declare function createTranscriptToMarkdownConverter({ modelId, forceOpen
28
30
  }) => void;
29
31
  onUsage?: (usage: {
30
32
  model: string;
31
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
33
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
32
34
  usage: LlmTokenUsage | null;
33
35
  }) => void;
34
36
  }): ConvertTranscriptToMarkdown;
@@ -1,4 +1,4 @@
1
- import type { LlmTokenUsage } from './types.js';
1
+ import type { LlmTokenUsage } from "./types.js";
2
2
  export declare function normalizeTokenUsage(raw: unknown): LlmTokenUsage | null;
3
3
  export declare function normalizeAnthropicUsage(raw: unknown): LlmTokenUsage | null;
4
4
  export declare function normalizeOpenAiUsage(raw: unknown): LlmTokenUsage | null;
@@ -1,7 +1,7 @@
1
- import { Logger } from 'tslog';
2
- import type { SummarizeConfig } from '../config.js';
3
- export type DaemonLogLevel = 'debug' | 'info' | 'warn' | 'error';
4
- export type DaemonLogFormat = 'json' | 'pretty';
1
+ import { Logger } from "tslog";
2
+ import type { SummarizeConfig } from "../config.js";
3
+ export type DaemonLogLevel = "debug" | "info" | "warn" | "error";
4
+ export type DaemonLogFormat = "json" | "pretty";
5
5
  export type DaemonLoggingConfig = {
6
6
  enabled: true;
7
7
  level: DaemonLogLevel;
@@ -1,4 +1,4 @@
1
- export type ExecFileFn = typeof import('node:child_process').execFile;
1
+ export type ExecFileFn = typeof import("node:child_process").execFile;
2
2
  export declare function convertToMarkdownWithMarkitdown({ bytes, filenameHint, mediaTypeHint, uvxCommand, timeoutMs, env, execFileImpl, }: {
3
3
  bytes: Uint8Array;
4
4
  filenameHint: string | null;
@@ -1,5 +1,5 @@
1
- import type { MediaCache } from './content/index.js';
2
- export type MediaCacheVerifyMode = 'none' | 'size' | 'hash';
1
+ import type { MediaCache } from "./content/index.js";
2
+ export type MediaCacheVerifyMode = "none" | "size" | "hash";
3
3
  export type MediaCacheConfig = {
4
4
  enabled?: boolean;
5
5
  maxMb?: number;
@@ -1,5 +1,5 @@
1
- import type { AutoRuleKind, CliProvider, SummarizeConfig } from './config.js';
2
- import type { LiteLlmCatalog } from './pricing/litellm.js';
1
+ import type { AutoRuleKind, CliProvider, SummarizeConfig } from "./config.js";
2
+ import type { LiteLlmCatalog } from "./pricing/litellm.js";
3
3
  export type AutoSelectionInput = {
4
4
  kind: AutoRuleKind;
5
5
  promptTokens: number | null;
@@ -11,14 +11,24 @@ export type AutoSelectionInput = {
11
11
  openrouterProvidersFromEnv: string[] | null;
12
12
  openrouterModelIds?: string[] | null;
13
13
  cliAvailability?: Partial<Record<CliProvider, boolean>>;
14
+ isImplicitAutoSelection?: boolean;
15
+ allowAutoCliFallback?: boolean;
16
+ lastSuccessfulCliProvider?: CliProvider | null;
14
17
  };
15
18
  export type AutoModelAttempt = {
16
- transport: 'native' | 'openrouter' | 'cli';
19
+ transport: "native" | "openrouter" | "cli";
17
20
  userModelId: string;
18
21
  llmModelId: string | null;
19
22
  openrouterProviders: string[] | null;
20
23
  forceOpenRouter: boolean;
21
- requiredEnv: 'XAI_API_KEY' | 'OPENAI_API_KEY' | 'GEMINI_API_KEY' | 'ANTHROPIC_API_KEY' | 'OPENROUTER_API_KEY' | 'Z_AI_API_KEY' | 'CLI_CLAUDE' | 'CLI_CODEX' | 'CLI_GEMINI';
24
+ requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "OPENROUTER_API_KEY" | "Z_AI_API_KEY" | "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT";
22
25
  debug: string;
23
26
  };
27
+ export type ResolvedCliAutoFallbackConfig = {
28
+ enabled: boolean;
29
+ onlyWhenNoApiKeys: boolean;
30
+ order: CliProvider[];
31
+ };
32
+ export declare function resolveCliAutoFallbackConfig(config: SummarizeConfig | null): ResolvedCliAutoFallbackConfig;
33
+ export declare function envHasKey(env: Record<string, string | undefined>, requiredEnv: AutoModelAttempt["requiredEnv"]): boolean;
24
34
  export declare function buildAutoModelAttempts(input: AutoSelectionInput): AutoModelAttempt[];
@@ -1,35 +1,35 @@
1
- import type { CliProvider } from './config.js';
1
+ import type { CliProvider } from "./config.js";
2
2
  export type FixedModelSpec = {
3
- transport: 'native';
3
+ transport: "native";
4
4
  userModelId: string;
5
5
  llmModelId: string;
6
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
6
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
7
7
  openrouterProviders: string[] | null;
8
8
  forceOpenRouter: false;
9
- requiredEnv: 'XAI_API_KEY' | 'OPENAI_API_KEY' | 'GEMINI_API_KEY' | 'ANTHROPIC_API_KEY' | 'Z_AI_API_KEY';
9
+ requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY";
10
10
  openaiBaseUrlOverride?: string | null;
11
11
  forceChatCompletions?: boolean;
12
12
  } | {
13
- transport: 'openrouter';
13
+ transport: "openrouter";
14
14
  userModelId: string;
15
15
  openrouterModelId: string;
16
16
  llmModelId: string;
17
17
  openrouterProviders: string[] | null;
18
18
  forceOpenRouter: true;
19
- requiredEnv: 'OPENROUTER_API_KEY';
19
+ requiredEnv: "OPENROUTER_API_KEY";
20
20
  } | {
21
- transport: 'cli';
21
+ transport: "cli";
22
22
  userModelId: string;
23
23
  llmModelId: null;
24
24
  openrouterProviders: null;
25
25
  forceOpenRouter: false;
26
- requiredEnv: 'CLI_CLAUDE' | 'CLI_CODEX' | 'CLI_GEMINI';
26
+ requiredEnv: "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT";
27
27
  cliProvider: CliProvider;
28
28
  cliModel: string | null;
29
29
  };
30
30
  export type RequestedModel = {
31
- kind: 'auto';
31
+ kind: "auto";
32
32
  } | ({
33
- kind: 'fixed';
33
+ kind: "fixed";
34
34
  } & FixedModelSpec);
35
35
  export declare function parseRequestedModelId(raw: string): RequestedModel;
@@ -1,4 +1,4 @@
1
- import { type LiteLlmCatalog, type LiteLlmLoadResult } from 'tokentally/node';
1
+ import { type LiteLlmCatalog, type LiteLlmLoadResult } from "tokentally/node";
2
2
  export type { LiteLlmCatalog, LiteLlmLoadResult };
3
3
  export declare function loadLiteLlmCatalog({ env, fetchImpl, nowMs, }: {
4
4
  env: Record<string, string | undefined>;
@@ -1 +1 @@
1
- export * from '@steipete/summarize-core/processes';
1
+ export * from "@steipete/summarize-core/processes";
@@ -1 +1 @@
1
- export * from '@steipete/summarize-core/prompts';
1
+ export * from "@steipete/summarize-core/prompts";
@@ -1,5 +1,5 @@
1
- import type { loadLocalAsset } from '../content/asset.js';
2
- export type AssetAttachment = Awaited<ReturnType<typeof loadLocalAsset>>['attachment'];
1
+ import type { loadLocalAsset } from "../content/asset.js";
2
+ export type AssetAttachment = Awaited<ReturnType<typeof loadLocalAsset>>["attachment"];
3
3
  export declare const MAX_DOCUMENT_BYTES_DEFAULT: number;
4
4
  export declare function isUnsupportedAttachmentError(error: unknown): boolean;
5
5
  export declare function isTextLikeMediaType(mediaType: string): boolean;
@@ -13,23 +13,23 @@ export declare function getTextContentFromAttachment(attachment: AssetAttachment
13
13
  } | null;
14
14
  export declare function getFileBytesFromAttachment(attachment: AssetAttachment): Uint8Array | null;
15
15
  export declare function ensureCliAttachmentPath({ sourceKind, sourceLabel, attachment, }: {
16
- sourceKind: 'file' | 'asset-url';
16
+ sourceKind: "file" | "asset-url";
17
17
  sourceLabel: string;
18
18
  attachment: AssetAttachment;
19
19
  }): Promise<string>;
20
20
  export declare function shouldMarkitdownConvertMediaType(mediaType: string): boolean;
21
21
  export declare function supportsNativeFileAttachment({ provider, attachment, }: {
22
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
22
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
23
23
  attachment: {
24
- kind: 'image' | 'file';
24
+ kind: "image" | "file";
25
25
  mediaType: string;
26
26
  };
27
27
  }): boolean;
28
28
  export declare function assertProviderSupportsAttachment({ provider, modelId, attachment, }: {
29
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
29
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
30
30
  modelId: string;
31
31
  attachment: {
32
- kind: 'image' | 'file';
32
+ kind: "image" | "file";
33
33
  mediaType: string;
34
34
  };
35
35
  }): void;
@@ -9,10 +9,10 @@ type BirdTweetPayload = {
9
9
  media?: BirdTweetMedia | null;
10
10
  };
11
11
  type BirdTweetMedia = {
12
- kind: 'video' | 'audio';
12
+ kind: "video" | "audio";
13
13
  urls: string[];
14
14
  preferredUrl: string | null;
15
- source: 'extended_entities' | 'card' | 'entities';
15
+ source: "extended_entities" | "card" | "entities";
16
16
  };
17
17
  export declare function readTweetWithBird(args: {
18
18
  url: string;
@@ -1,5 +1,5 @@
1
- import { type CacheState } from '../cache.js';
2
- import type { SummarizeConfig } from '../config.js';
1
+ import type { SummarizeConfig } from "../config.js";
2
+ import { type CacheState } from "../cache.js";
3
3
  export declare function createCacheStateFromConfig({ envForRun, config, noCacheFlag, transcriptNamespace, }: {
4
4
  envForRun: Record<string, string | undefined>;
5
5
  config: SummarizeConfig | null;
@@ -0,0 +1,6 @@
1
+ import type { CliProvider } from "../config.js";
2
+ export declare function readLastSuccessfulCliProvider(env: Record<string, string | undefined>): Promise<CliProvider | null>;
3
+ export declare function writeLastSuccessfulCliProvider({ env, provider, }: {
4
+ env: Record<string, string | undefined>;
5
+ provider: CliProvider;
6
+ }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { ModelConfig } from '../config.js';
1
+ import type { ModelConfig } from "../config.js";
2
2
  export declare const BIRD_TIP = "Tip: Install bird\uD83D\uDC26 for better Twitter support: https://github.com/steipete/bird";
3
3
  export declare const UVX_TIP = "Tip: Install uv (uvx) for local Markdown conversion: brew install uv (or set UVX_PATH to your uvx binary).";
4
4
  export declare const SUPPORT_URL = "https://github.com/steipete/summarize";
@@ -1,4 +1,4 @@
1
- export type BrowserName = 'chrome' | 'safari' | 'firefox';
1
+ export type BrowserName = "chrome" | "safari" | "firefox";
2
2
  export type TwitterCookies = {
3
3
  cookiesFromBrowser: string | null;
4
4
  source: string | null;
@@ -1,4 +1,4 @@
1
- import type { CliProvider, SummarizeConfig } from '../config.js';
1
+ import type { CliProvider, SummarizeConfig } from "../config.js";
2
2
  type ConfigForCli = SummarizeConfig | null;
3
3
  export declare function resolveExecutableInPath(binary: string, env: Record<string, string | undefined>): string | null;
4
4
  export declare function hasBirdCli(env: Record<string, string | undefined>): boolean;
@@ -7,13 +7,13 @@ export type FinishLineModel = {
7
7
  detailParts: string[];
8
8
  };
9
9
  export type ExtractDiagnosticsForFinishLine = {
10
- strategy: 'bird' | 'firecrawl' | 'html' | 'nitter';
10
+ strategy: "bird" | "firecrawl" | "html" | "nitter";
11
11
  firecrawl: {
12
12
  used: boolean;
13
13
  };
14
14
  markdown: {
15
15
  used: boolean;
16
- provider: 'firecrawl' | 'llm' | null;
16
+ provider: "firecrawl" | "llm" | null;
17
17
  notes?: string | null;
18
18
  };
19
19
  transcript: {
@@ -33,7 +33,7 @@ export type ExtractedForLengths = {
33
33
  transcriptionProvider: string | null;
34
34
  mediaDurationSeconds: number | null;
35
35
  video: {
36
- kind: 'youtube' | 'direct';
36
+ kind: "youtube" | "direct";
37
37
  url: string;
38
38
  } | null;
39
39
  isVideoOnly: boolean;
@@ -155,8 +155,8 @@ export declare function buildExtractFinishLabel(args: {
155
155
  extracted: {
156
156
  diagnostics: ExtractDiagnosticsForFinishLine;
157
157
  };
158
- format: 'text' | 'markdown';
159
- markdownMode: 'off' | 'auto' | 'llm' | 'readability';
158
+ format: "text" | "markdown";
159
+ markdownMode: "off" | "auto" | "llm" | "readability";
160
160
  hasMarkdownLlmCall: boolean;
161
161
  }): string;
162
162
  export declare function buildSummaryFinishLabel(args: {
@@ -1,12 +1,12 @@
1
- import type { ExecFileFn } from '../../../markitdown.js';
2
- import { type AssetAttachment } from '../../attachments.js';
3
- import type { ExtractDiagnosticsForFinishLine } from '../../finish-line.js';
1
+ import type { ExecFileFn } from "../../../markitdown.js";
2
+ import type { ExtractDiagnosticsForFinishLine } from "../../finish-line.js";
3
+ import { type AssetAttachment } from "../../attachments.js";
4
4
  export type AssetExtractContext = {
5
5
  env: Record<string, string | undefined>;
6
6
  envForRun: Record<string, string | undefined>;
7
7
  execFileImpl: ExecFileFn;
8
8
  timeoutMs: number;
9
- preprocessMode: 'off' | 'auto' | 'always';
9
+ preprocessMode: "off" | "auto" | "always";
10
10
  };
11
11
  export type AssetExtractResult = {
12
12
  content: string;
@@ -1,6 +1,12 @@
1
- import { type InputTarget, loadRemoteAsset } from '../../../content/asset.js';
2
- import { startSpinner } from '../../../tty/spinner.js';
3
- import type { SummarizeAssetArgs } from './summary.js';
1
+ import type { SummarizeAssetArgs } from "./summary.js";
2
+ import { type InputTarget, loadRemoteAsset } from "../../../content/asset.js";
3
+ import { startSpinner } from "../../../tty/spinner.js";
4
+ /**
5
+ * Check if a file extension indicates transcribable media.
6
+ * Used to route large audio/video files directly to the media handler
7
+ * which has a higher size limit (2GB vs 50MB).
8
+ */
9
+ export declare function isTranscribableExtension(filePath: string): boolean;
4
10
  export type AssetInputContext = {
5
11
  env: Record<string, string | undefined>;
6
12
  envForRun: Record<string, string | undefined>;
@@ -3,7 +3,7 @@
3
3
  * Phase 2: Transcript provider integration
4
4
  * Phase 2.2: Local file path handling for transcript caching
5
5
  */
6
- import type { AssetSummaryContext, SummarizeAssetArgs } from './summary.js';
6
+ import type { AssetSummaryContext, SummarizeAssetArgs } from "./summary.js";
7
7
  /**
8
8
  * Handler for local audio/video files.
9
9
  *
@@ -1,6 +1,6 @@
1
- import type { RunMetricsReport } from '../../../costs.js';
2
- import type { AssetAttachment } from '../../attachments.js';
3
- import type { AssetExtractResult } from './extract.js';
1
+ import type { RunMetricsReport } from "../../../costs.js";
2
+ import type { AssetAttachment } from "../../attachments.js";
3
+ import type { AssetExtractResult } from "./extract.js";
4
4
  export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabel, attachment, extracted, apiStatus, }: {
5
5
  io: {
6
6
  env: Record<string, string | undefined>;
@@ -10,8 +10,8 @@ export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabe
10
10
  };
11
11
  flags: {
12
12
  timeoutMs: number;
13
- preprocessMode: 'off' | 'auto' | 'always';
14
- format: 'text' | 'markdown';
13
+ preprocessMode: "off" | "auto" | "always";
14
+ format: "text" | "markdown";
15
15
  plain: boolean;
16
16
  json: boolean;
17
17
  metricsEnabled: boolean;
@@ -1,21 +1,21 @@
1
- import type { OutputLanguage } from '../../../language.js';
2
- import type { Attachment } from '../../../llm/attachments.js';
3
- import { convertToMarkdownWithMarkitdown } from '../../../markitdown.js';
4
- import type { FixedModelSpec } from '../../../model-spec.js';
5
- import type { SummaryLength } from '../../../shared/contracts.js';
6
- import { type AssetAttachment } from '../../attachments.js';
1
+ import type { OutputLanguage } from "../../../language.js";
2
+ import type { Attachment } from "../../../llm/attachments.js";
3
+ import type { FixedModelSpec } from "../../../model-spec.js";
4
+ import type { SummaryLength } from "../../../shared/contracts.js";
5
+ import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
6
+ import { type AssetAttachment } from "../../attachments.js";
7
7
  export type AssetPreprocessContext = {
8
8
  env: Record<string, string | undefined>;
9
9
  envForRun: Record<string, string | undefined>;
10
- execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]['execFileImpl'];
10
+ execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]["execFileImpl"];
11
11
  timeoutMs: number;
12
- preprocessMode: 'off' | 'auto' | 'always';
13
- format: 'text' | 'markdown';
12
+ preprocessMode: "off" | "auto" | "always";
13
+ format: "text" | "markdown";
14
14
  lengthArg: {
15
- kind: 'preset';
15
+ kind: "preset";
16
16
  preset: SummaryLength;
17
17
  } | {
18
- kind: 'chars';
18
+ kind: "chars";
19
19
  maxCharacters: number;
20
20
  };
21
21
  outputLanguage: OutputLanguage;
@@ -23,6 +23,9 @@ export type AssetPreprocessContext = {
23
23
  promptOverride?: string | null;
24
24
  lengthInstruction?: string | null;
25
25
  languageInstruction?: string | null;
26
+ openaiApiKey?: string | null;
27
+ openrouterApiKey?: string | null;
28
+ openaiBaseUrl?: string | null;
26
29
  };
27
30
  export type AssetPreprocessResult = {
28
31
  promptText: string;
@@ -34,24 +37,27 @@ export type AssetPreprocessResult = {
34
37
  } | null;
35
38
  };
36
39
  export type DocumentHandlingDecision = {
37
- mode: 'inline';
40
+ mode: "inline";
38
41
  } | {
39
- mode: 'attach';
42
+ mode: "attach";
40
43
  } | {
41
- mode: 'preprocess';
44
+ mode: "preprocess";
42
45
  } | {
43
- mode: 'error';
46
+ mode: "error";
44
47
  error: Error;
45
48
  };
46
- export declare function resolveDocumentHandling({ attachment, textContent, fileBytes, preprocessMode, fixedModelSpec, }: {
49
+ export declare function resolveDocumentHandling({ attachment, textContent, fileBytes, preprocessMode, fixedModelSpec, openaiApiKey, openrouterApiKey, openaiBaseUrl, }: {
47
50
  attachment: AssetAttachment;
48
51
  textContent: {
49
52
  content: string;
50
53
  bytes: number;
51
54
  } | null;
52
55
  fileBytes: Uint8Array | null;
53
- preprocessMode: 'off' | 'auto' | 'always';
56
+ preprocessMode: "off" | "auto" | "always";
54
57
  fixedModelSpec: FixedModelSpec | null;
58
+ openaiApiKey?: string | null;
59
+ openrouterApiKey?: string | null;
60
+ openaiBaseUrl?: string | null;
55
61
  }): DocumentHandlingDecision;
56
62
  export declare function prepareAssetPrompt({ ctx, attachment, }: {
57
63
  ctx: AssetPreprocessContext;
@@ -1,13 +1,13 @@
1
- import { type CacheState } from '../../../cache.js';
2
- import type { CliProvider, SummarizeConfig } from '../../../config.js';
3
- import type { MediaCache } from '../../../content/index.js';
4
- import type { LlmCall, RunMetricsReport } from '../../../costs.js';
5
- import type { OutputLanguage } from '../../../language.js';
6
- import type { ExecFileFn } from '../../../markitdown.js';
7
- import type { FixedModelSpec, RequestedModel } from '../../../model-spec.js';
8
- import type { SummaryLength } from '../../../shared/contracts.js';
9
- import { type AssetAttachment } from '../../attachments.js';
10
- import type { createSummaryEngine } from '../../summary-engine.js';
1
+ import type { CliProvider, SummarizeConfig } from "../../../config.js";
2
+ import type { MediaCache } from "../../../content/index.js";
3
+ import type { LlmCall, RunMetricsReport } from "../../../costs.js";
4
+ import type { OutputLanguage } from "../../../language.js";
5
+ import type { ExecFileFn } from "../../../markitdown.js";
6
+ import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
7
+ import type { SummaryLength } from "../../../shared/contracts.js";
8
+ import type { createSummaryEngine } from "../../summary-engine.js";
9
+ import { type CacheState } from "../../../cache.js";
10
+ import { type AssetAttachment } from "../../attachments.js";
11
11
  export type AssetSummaryContext = {
12
12
  env: Record<string, string | undefined>;
13
13
  envForRun: Record<string, string | undefined>;
@@ -15,24 +15,26 @@ export type AssetSummaryContext = {
15
15
  stderr: NodeJS.WritableStream;
16
16
  execFileImpl: ExecFileFn;
17
17
  timeoutMs: number;
18
- preprocessMode: 'off' | 'auto' | 'always';
19
- format: 'text' | 'markdown';
18
+ preprocessMode: "off" | "auto" | "always";
19
+ format: "text" | "markdown";
20
20
  extractMode: boolean;
21
21
  lengthArg: {
22
- kind: 'preset';
22
+ kind: "preset";
23
23
  preset: SummaryLength;
24
24
  } | {
25
- kind: 'chars';
25
+ kind: "chars";
26
26
  maxCharacters: number;
27
27
  };
28
28
  forceSummary: boolean;
29
29
  outputLanguage: OutputLanguage;
30
- videoMode: 'auto' | 'transcript' | 'understand';
30
+ videoMode: "auto" | "transcript" | "understand";
31
31
  fixedModelSpec: FixedModelSpec | null;
32
32
  promptOverride?: string | null;
33
33
  lengthInstruction?: string | null;
34
34
  languageInstruction?: string | null;
35
35
  isFallbackModel: boolean;
36
+ isImplicitAutoSelection: boolean;
37
+ allowAutoCliFallback: boolean;
36
38
  desiredOutputTokens: number | null;
37
39
  envForAuto: Record<string, string | undefined>;
38
40
  configForModelSelection: SummarizeConfig | null;
@@ -57,7 +59,7 @@ export type AssetSummaryContext = {
57
59
  writeViaFooter: (parts: string[]) => void;
58
60
  clearProgressForStdout: () => void;
59
61
  restoreProgressAfterStdout?: (() => void) | null;
60
- getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import('../../../pricing/litellm.js').loadLiteLlmCatalog>>['catalog']>;
62
+ getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import("../../../pricing/litellm.js").loadLiteLlmCatalog>>["catalog"]>;
61
63
  buildReport: () => Promise<RunMetricsReport>;
62
64
  estimateCostUsd: () => Promise<number | null>;
63
65
  llmCalls: LlmCall[];
@@ -83,7 +85,7 @@ export type AssetSummaryContext = {
83
85
  };
84
86
  };
85
87
  export type SummarizeAssetArgs = {
86
- sourceKind: 'file' | 'asset-url';
88
+ sourceKind: "file" | "asset-url";
87
89
  sourceLabel: string;
88
90
  attachment: AssetAttachment;
89
91
  onModelChosen?: ((modelId: string) => void) | null;
@@ -1,4 +1,4 @@
1
- import type { ExtractedLinkContent, FetchLinkContentOptions } from '../../../content/index.js';
1
+ import type { ExtractedLinkContent, FetchLinkContentOptions } from "../../../content/index.js";
2
2
  export type UrlExtractionUi = {
3
3
  contentSizeLabel: string;
4
4
  viaSourceLabel: string;
@@ -1,4 +1,4 @@
1
- import type { UrlFlowContext } from './types.js';
1
+ import type { UrlFlowContext } from "./types.js";
2
2
  export declare function runUrlFlow({ ctx, url, isYoutubeUrl, }: {
3
3
  ctx: UrlFlowContext;
4
4
  url: string;
@@ -1,19 +1,19 @@
1
- import { type ConvertTranscriptToMarkdown } from '../../../llm/transcript-to-markdown.js';
2
- import type { ModelAttempt } from '../../types.js';
3
- import type { UrlFlowContext } from './types.js';
1
+ import type { ModelAttempt } from "../../types.js";
2
+ import type { UrlFlowContext } from "./types.js";
3
+ import { type ConvertTranscriptToMarkdown } from "../../../llm/transcript-to-markdown.js";
4
4
  export type MarkdownModel = {
5
5
  llmModelId: string;
6
6
  forceOpenRouter: boolean;
7
7
  openaiApiKeyOverride?: string | null;
8
8
  openaiBaseUrlOverride?: string | null;
9
9
  forceChatCompletions?: boolean;
10
- requiredEnv?: ModelAttempt['requiredEnv'];
10
+ requiredEnv?: ModelAttempt["requiredEnv"];
11
11
  };
12
12
  export type MarkdownConverters = {
13
13
  markdownRequested: boolean;
14
14
  transcriptMarkdownRequested: boolean;
15
- effectiveMarkdownMode: 'off' | 'auto' | 'llm' | 'readability';
16
- markdownProvider: 'none' | 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
15
+ effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
16
+ markdownProvider: "none" | "xai" | "openai" | "google" | "anthropic" | "zai";
17
17
  markdownModel: MarkdownModel | null;
18
18
  convertHtmlToMarkdown: ((args: {
19
19
  url: string;
@@ -1,8 +1,8 @@
1
- import type { ExtractedLinkContent } from '../../../content/index.js';
2
- import type { SummaryLength } from '../../../shared/contracts.js';
3
- import type { SlideExtractionResult, SlideImage, SlideSourceKind } from '../../../slides/index.js';
4
- import { type StreamOutputMode } from '../../stream-output.js';
5
- import type { SummaryStreamHandler } from '../../summary-engine.js';
1
+ import type { ExtractedLinkContent } from "../../../content/index.js";
2
+ import type { SummaryLength } from "../../../shared/contracts.js";
3
+ import type { SlideExtractionResult, SlideImage, SlideSourceKind } from "../../../slides/index.js";
4
+ import type { SummaryStreamHandler } from "../../summary-engine.js";
5
+ import { type StreamOutputMode } from "../../stream-output.js";
6
6
  export type SlidesTerminalOutput = {
7
7
  onSlidesExtracted: (slides: SlideExtractionResult) => void;
8
8
  onSlidesDone: (result: {
@@ -32,10 +32,10 @@ export declare function createSlidesTerminalOutput({ io, flags, extracted, slide
32
32
  flags: {
33
33
  plain: boolean;
34
34
  lengthArg: {
35
- kind: 'preset';
35
+ kind: "preset";
36
36
  preset: SummaryLength;
37
37
  } | {
38
- kind: 'chars';
38
+ kind: "chars";
39
39
  maxCharacters: number;
40
40
  };
41
41
  slidesDebug?: boolean;