@steipete/summarize 0.9.0 → 0.11.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 (398) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/LICENSE +1 -1
  3. package/README.md +391 -183
  4. package/dist/cli.js +1 -1
  5. package/dist/esm/cache.js +134 -64
  6. package/dist/esm/cache.js.map +1 -1
  7. package/dist/esm/cli-main.js +27 -27
  8. package/dist/esm/cli-main.js.map +1 -1
  9. package/dist/esm/cli.js +2 -2
  10. package/dist/esm/cli.js.map +1 -1
  11. package/dist/esm/config.js +396 -126
  12. package/dist/esm/config.js.map +1 -1
  13. package/dist/esm/content/asset.js +53 -50
  14. package/dist/esm/content/asset.js.map +1 -1
  15. package/dist/esm/content/index.js +1 -1
  16. package/dist/esm/content/index.js.map +1 -1
  17. package/dist/esm/costs.js +1 -1
  18. package/dist/esm/costs.js.map +1 -1
  19. package/dist/esm/daemon/agent.js +548 -0
  20. package/dist/esm/daemon/agent.js.map +1 -0
  21. package/dist/esm/daemon/auto-mode.js +3 -3
  22. package/dist/esm/daemon/auto-mode.js.map +1 -1
  23. package/dist/esm/daemon/chat.js +88 -178
  24. package/dist/esm/daemon/chat.js.map +1 -1
  25. package/dist/esm/daemon/cli-entrypoint.js +72 -0
  26. package/dist/esm/daemon/cli-entrypoint.js.map +1 -0
  27. package/dist/esm/daemon/cli.js +91 -83
  28. package/dist/esm/daemon/cli.js.map +1 -1
  29. package/dist/esm/daemon/config.js +15 -15
  30. package/dist/esm/daemon/config.js.map +1 -1
  31. package/dist/esm/daemon/constants.js +6 -6
  32. package/dist/esm/daemon/constants.js.map +1 -1
  33. package/dist/esm/daemon/env-merge.js.map +1 -1
  34. package/dist/esm/daemon/env-snapshot.js +36 -28
  35. package/dist/esm/daemon/env-snapshot.js.map +1 -1
  36. package/dist/esm/daemon/flow-context.js +86 -32
  37. package/dist/esm/daemon/flow-context.js.map +1 -1
  38. package/dist/esm/daemon/launchd.js +119 -47
  39. package/dist/esm/daemon/launchd.js.map +1 -1
  40. package/dist/esm/daemon/meta.js +5 -5
  41. package/dist/esm/daemon/meta.js.map +1 -1
  42. package/dist/esm/daemon/models.js +54 -31
  43. package/dist/esm/daemon/models.js.map +1 -1
  44. package/dist/esm/daemon/process-registry.js +206 -0
  45. package/dist/esm/daemon/process-registry.js.map +1 -0
  46. package/dist/esm/daemon/schtasks.js +96 -32
  47. package/dist/esm/daemon/schtasks.js.map +1 -1
  48. package/dist/esm/daemon/server.js +832 -158
  49. package/dist/esm/daemon/server.js.map +1 -1
  50. package/dist/esm/daemon/summarize-progress.js +11 -11
  51. package/dist/esm/daemon/summarize-progress.js.map +1 -1
  52. package/dist/esm/daemon/summarize.js +61 -32
  53. package/dist/esm/daemon/summarize.js.map +1 -1
  54. package/dist/esm/daemon/systemd.js +96 -35
  55. package/dist/esm/daemon/systemd.js.map +1 -1
  56. package/dist/esm/firecrawl.js +12 -12
  57. package/dist/esm/firecrawl.js.map +1 -1
  58. package/dist/esm/flags.js +55 -31
  59. package/dist/esm/flags.js.map +1 -1
  60. package/dist/esm/index.js +3 -3
  61. package/dist/esm/index.js.map +1 -1
  62. package/dist/esm/language.js +1 -1
  63. package/dist/esm/language.js.map +1 -1
  64. package/dist/esm/llm/cli.js +128 -64
  65. package/dist/esm/llm/cli.js.map +1 -1
  66. package/dist/esm/llm/errors.js +1 -1
  67. package/dist/esm/llm/errors.js.map +1 -1
  68. package/dist/esm/llm/generate-text.js +107 -98
  69. package/dist/esm/llm/generate-text.js.map +1 -1
  70. package/dist/esm/llm/google-models.js +17 -17
  71. package/dist/esm/llm/google-models.js.map +1 -1
  72. package/dist/esm/llm/html-to-markdown.js +3 -3
  73. package/dist/esm/llm/html-to-markdown.js.map +1 -1
  74. package/dist/esm/llm/model-id.js +38 -16
  75. package/dist/esm/llm/model-id.js.map +1 -1
  76. package/dist/esm/llm/prompt.js +5 -5
  77. package/dist/esm/llm/prompt.js.map +1 -1
  78. package/dist/esm/llm/providers/anthropic.js +33 -33
  79. package/dist/esm/llm/providers/anthropic.js.map +1 -1
  80. package/dist/esm/llm/providers/google.js +19 -19
  81. package/dist/esm/llm/providers/google.js.map +1 -1
  82. package/dist/esm/llm/providers/models.js +30 -30
  83. package/dist/esm/llm/providers/models.js.map +1 -1
  84. package/dist/esm/llm/providers/openai.js +36 -35
  85. package/dist/esm/llm/providers/openai.js.map +1 -1
  86. package/dist/esm/llm/providers/shared.js +8 -8
  87. package/dist/esm/llm/providers/shared.js.map +1 -1
  88. package/dist/esm/llm/transcript-to-markdown.js +9 -5
  89. package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
  90. package/dist/esm/llm/usage.js +18 -18
  91. package/dist/esm/llm/usage.js.map +1 -1
  92. package/dist/esm/logging/daemon.js +21 -21
  93. package/dist/esm/logging/daemon.js.map +1 -1
  94. package/dist/esm/logging/ring-file.js +5 -5
  95. package/dist/esm/logging/ring-file.js.map +1 -1
  96. package/dist/esm/markitdown.js +21 -19
  97. package/dist/esm/markitdown.js.map +1 -1
  98. package/dist/esm/media-cache.js +251 -0
  99. package/dist/esm/media-cache.js.map +1 -0
  100. package/dist/esm/model-auto.js +175 -106
  101. package/dist/esm/model-auto.js.map +1 -1
  102. package/dist/esm/model-spec.js +52 -42
  103. package/dist/esm/model-spec.js.map +1 -1
  104. package/dist/esm/pricing/litellm.js +4 -4
  105. package/dist/esm/pricing/litellm.js.map +1 -1
  106. package/dist/esm/processes.js +2 -0
  107. package/dist/esm/processes.js.map +1 -0
  108. package/dist/esm/prompts/index.js +1 -1
  109. package/dist/esm/prompts/index.js.map +1 -1
  110. package/dist/esm/refresh-free.js +81 -81
  111. package/dist/esm/refresh-free.js.map +1 -1
  112. package/dist/esm/run/attachments.js +47 -44
  113. package/dist/esm/run/attachments.js.map +1 -1
  114. package/dist/esm/run/bird.js +125 -12
  115. package/dist/esm/run/bird.js.map +1 -1
  116. package/dist/esm/run/cache-state.js +7 -7
  117. package/dist/esm/run/cache-state.js.map +1 -1
  118. package/dist/esm/run/cli-fallback-state.js +45 -0
  119. package/dist/esm/run/cli-fallback-state.js.map +1 -0
  120. package/dist/esm/run/cli-preflight.js +40 -22
  121. package/dist/esm/run/cli-preflight.js.map +1 -1
  122. package/dist/esm/run/constants.js +12 -12
  123. package/dist/esm/run/constants.js.map +1 -1
  124. package/dist/esm/run/cookies/twitter.js +47 -47
  125. package/dist/esm/run/cookies/twitter.js.map +1 -1
  126. package/dist/esm/run/env.js +21 -15
  127. package/dist/esm/run/env.js.map +1 -1
  128. package/dist/esm/run/fetch-with-timeout.js +4 -4
  129. package/dist/esm/run/fetch-with-timeout.js.map +1 -1
  130. package/dist/esm/run/finish-line.js +78 -71
  131. package/dist/esm/run/finish-line.js.map +1 -1
  132. package/dist/esm/run/flows/asset/extract.js +70 -0
  133. package/dist/esm/run/flows/asset/extract.js.map +1 -0
  134. package/dist/esm/run/flows/asset/input.js +202 -37
  135. package/dist/esm/run/flows/asset/input.js.map +1 -1
  136. package/dist/esm/run/flows/asset/media-policy.js +3 -0
  137. package/dist/esm/run/flows/asset/media-policy.js.map +1 -0
  138. package/dist/esm/run/flows/asset/media.js +233 -0
  139. package/dist/esm/run/flows/asset/media.js.map +1 -0
  140. package/dist/esm/run/flows/asset/output.js +98 -0
  141. package/dist/esm/run/flows/asset/output.js.map +1 -0
  142. package/dist/esm/run/flows/asset/preprocess.js +79 -44
  143. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  144. package/dist/esm/run/flows/asset/summary.js +306 -89
  145. package/dist/esm/run/flows/asset/summary.js.map +1 -1
  146. package/dist/esm/run/flows/url/extract.js +31 -31
  147. package/dist/esm/run/flows/url/extract.js.map +1 -1
  148. package/dist/esm/run/flows/url/flow.js +388 -82
  149. package/dist/esm/run/flows/url/flow.js.map +1 -1
  150. package/dist/esm/run/flows/url/markdown.js +61 -56
  151. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  152. package/dist/esm/run/flows/url/slides-output.js +487 -0
  153. package/dist/esm/run/flows/url/slides-output.js.map +1 -0
  154. package/dist/esm/run/flows/url/slides-text.js +628 -0
  155. package/dist/esm/run/flows/url/slides-text.js.map +1 -0
  156. package/dist/esm/run/flows/url/summary.js +493 -152
  157. package/dist/esm/run/flows/url/summary.js.map +1 -1
  158. package/dist/esm/run/format.js +10 -10
  159. package/dist/esm/run/format.js.map +1 -1
  160. package/dist/esm/run/help.js +179 -84
  161. package/dist/esm/run/help.js.map +1 -1
  162. package/dist/esm/run/logging.js +20 -12
  163. package/dist/esm/run/logging.js.map +1 -1
  164. package/dist/esm/run/markdown.js +12 -12
  165. package/dist/esm/run/markdown.js.map +1 -1
  166. package/dist/esm/run/media-cache-state.js +33 -0
  167. package/dist/esm/run/media-cache-state.js.map +1 -0
  168. package/dist/esm/run/model-attempts.js.map +1 -1
  169. package/dist/esm/run/openrouter.js +11 -11
  170. package/dist/esm/run/openrouter.js.map +1 -1
  171. package/dist/esm/run/progress.js +19 -1
  172. package/dist/esm/run/progress.js.map +1 -1
  173. package/dist/esm/run/run-config.js +16 -16
  174. package/dist/esm/run/run-config.js.map +1 -1
  175. package/dist/esm/run/run-context.js +2 -2
  176. package/dist/esm/run/run-context.js.map +1 -1
  177. package/dist/esm/run/run-env.js +55 -54
  178. package/dist/esm/run/run-env.js.map +1 -1
  179. package/dist/esm/run/run-input.js +3 -3
  180. package/dist/esm/run/run-input.js.map +1 -1
  181. package/dist/esm/run/run-metrics.js +16 -16
  182. package/dist/esm/run/run-metrics.js.map +1 -1
  183. package/dist/esm/run/run-models.js +28 -23
  184. package/dist/esm/run/run-models.js.map +1 -1
  185. package/dist/esm/run/run-output.js +3 -3
  186. package/dist/esm/run/run-output.js.map +1 -1
  187. package/dist/esm/run/run-settings.js +108 -21
  188. package/dist/esm/run/run-settings.js.map +1 -1
  189. package/dist/esm/run/run-stream.js +4 -4
  190. package/dist/esm/run/run-stream.js.map +1 -1
  191. package/dist/esm/run/runner.js +327 -100
  192. package/dist/esm/run/runner.js.map +1 -1
  193. package/dist/esm/run/slides-cli.js +226 -0
  194. package/dist/esm/run/slides-cli.js.map +1 -0
  195. package/dist/esm/run/slides-render.js +163 -0
  196. package/dist/esm/run/slides-render.js.map +1 -0
  197. package/dist/esm/run/stdin-temp-file.js +77 -0
  198. package/dist/esm/run/stdin-temp-file.js.map +1 -0
  199. package/dist/esm/run/stream-output.js +17 -10
  200. package/dist/esm/run/stream-output.js.map +1 -1
  201. package/dist/esm/run/streaming.js +16 -16
  202. package/dist/esm/run/streaming.js.map +1 -1
  203. package/dist/esm/run/summary-engine.js +89 -57
  204. package/dist/esm/run/summary-engine.js.map +1 -1
  205. package/dist/esm/run/summary-llm.js +3 -3
  206. package/dist/esm/run/summary-llm.js.map +1 -1
  207. package/dist/esm/run/terminal.js +4 -4
  208. package/dist/esm/run/terminal.js.map +1 -1
  209. package/dist/esm/run/tips.js +2 -2
  210. package/dist/esm/run/tips.js.map +1 -1
  211. package/dist/esm/run/transcriber-cli.js +148 -0
  212. package/dist/esm/run/transcriber-cli.js.map +1 -0
  213. package/dist/esm/run.js +1 -1
  214. package/dist/esm/run.js.map +1 -1
  215. package/dist/esm/shared/contracts.js +1 -1
  216. package/dist/esm/shared/contracts.js.map +1 -1
  217. package/dist/esm/shared/sse-events.js +16 -12
  218. package/dist/esm/shared/sse-events.js.map +1 -1
  219. package/dist/esm/shared/streaming-merge.js +3 -3
  220. package/dist/esm/shared/streaming-merge.js.map +1 -1
  221. package/dist/esm/slides/extract.js +1951 -0
  222. package/dist/esm/slides/extract.js.map +1 -0
  223. package/dist/esm/slides/index.js +4 -0
  224. package/dist/esm/slides/index.js.map +1 -0
  225. package/dist/esm/slides/settings.js +73 -0
  226. package/dist/esm/slides/settings.js.map +1 -0
  227. package/dist/esm/slides/store.js +111 -0
  228. package/dist/esm/slides/store.js.map +1 -0
  229. package/dist/esm/slides/types.js +2 -0
  230. package/dist/esm/slides/types.js.map +1 -0
  231. package/dist/esm/tty/format.js +13 -13
  232. package/dist/esm/tty/format.js.map +1 -1
  233. package/dist/esm/tty/osc-progress.js +22 -2
  234. package/dist/esm/tty/osc-progress.js.map +1 -1
  235. package/dist/esm/tty/progress/fetch-html.js +20 -16
  236. package/dist/esm/tty/progress/fetch-html.js.map +1 -1
  237. package/dist/esm/tty/progress/transcript.js +127 -68
  238. package/dist/esm/tty/progress/transcript.js.map +1 -1
  239. package/dist/esm/tty/spinner.js +21 -10
  240. package/dist/esm/tty/spinner.js.map +1 -1
  241. package/dist/esm/tty/theme.js +189 -0
  242. package/dist/esm/tty/theme.js.map +1 -0
  243. package/dist/esm/tty/website-progress.js +38 -34
  244. package/dist/esm/tty/website-progress.js.map +1 -1
  245. package/dist/esm/version.js +29 -29
  246. package/dist/esm/version.js.map +1 -1
  247. package/dist/types/cache.d.ts +19 -7
  248. package/dist/types/config.d.ts +71 -6
  249. package/dist/types/content/asset.d.ts +8 -6
  250. package/dist/types/content/index.d.ts +1 -1
  251. package/dist/types/costs.d.ts +3 -3
  252. package/dist/types/daemon/agent.d.ts +25 -0
  253. package/dist/types/daemon/auto-mode.d.ts +3 -3
  254. package/dist/types/daemon/chat.d.ts +10 -18
  255. package/dist/types/daemon/cli-entrypoint.d.ts +2 -0
  256. package/dist/types/daemon/config.d.ts +2 -2
  257. package/dist/types/daemon/env-merge.d.ts +1 -1
  258. package/dist/types/daemon/env-snapshot.d.ts +1 -1
  259. package/dist/types/daemon/flow-context.d.ts +24 -4
  260. package/dist/types/daemon/launchd.d.ts +12 -0
  261. package/dist/types/daemon/models.d.ts +6 -2
  262. package/dist/types/daemon/process-registry.d.ts +73 -0
  263. package/dist/types/daemon/schtasks.d.ts +4 -0
  264. package/dist/types/daemon/server.d.ts +2 -2
  265. package/dist/types/daemon/summarize-progress.d.ts +1 -1
  266. package/dist/types/daemon/summarize.d.ts +38 -7
  267. package/dist/types/daemon/systemd.d.ts +4 -0
  268. package/dist/types/firecrawl.d.ts +1 -1
  269. package/dist/types/flags.d.ts +12 -11
  270. package/dist/types/index.d.ts +4 -4
  271. package/dist/types/language.d.ts +1 -1
  272. package/dist/types/llm/attachments.d.ts +1 -1
  273. package/dist/types/llm/cli.d.ts +3 -3
  274. package/dist/types/llm/generate-text.d.ts +7 -7
  275. package/dist/types/llm/html-to-markdown.d.ts +3 -3
  276. package/dist/types/llm/model-id.d.ts +1 -1
  277. package/dist/types/llm/prompt.d.ts +2 -2
  278. package/dist/types/llm/providers/anthropic.d.ts +3 -3
  279. package/dist/types/llm/providers/google.d.ts +3 -3
  280. package/dist/types/llm/providers/models.d.ts +2 -2
  281. package/dist/types/llm/providers/openai.d.ts +4 -4
  282. package/dist/types/llm/providers/shared.d.ts +2 -2
  283. package/dist/types/llm/transcript-to-markdown.d.ts +4 -2
  284. package/dist/types/llm/usage.d.ts +1 -1
  285. package/dist/types/logging/daemon.d.ts +4 -4
  286. package/dist/types/markitdown.d.ts +1 -1
  287. package/dist/types/media-cache.d.ts +22 -0
  288. package/dist/types/model-auto.d.ts +14 -4
  289. package/dist/types/model-spec.d.ts +10 -10
  290. package/dist/types/pricing/litellm.d.ts +1 -1
  291. package/dist/types/processes.d.ts +1 -0
  292. package/dist/types/prompts/index.d.ts +1 -1
  293. package/dist/types/run/attachments.d.ts +7 -7
  294. package/dist/types/run/bird.d.ts +7 -0
  295. package/dist/types/run/cache-state.d.ts +2 -2
  296. package/dist/types/run/cli-fallback-state.d.ts +6 -0
  297. package/dist/types/run/constants.d.ts +1 -1
  298. package/dist/types/run/cookies/twitter.d.ts +1 -1
  299. package/dist/types/run/env.d.ts +1 -1
  300. package/dist/types/run/finish-line.d.ts +7 -6
  301. package/dist/types/run/flows/asset/extract.d.ts +18 -0
  302. package/dist/types/run/flows/asset/input.d.ts +19 -3
  303. package/dist/types/run/flows/asset/media-policy.d.ts +2 -0
  304. package/dist/types/run/flows/asset/media.d.ts +21 -0
  305. package/dist/types/run/flows/asset/output.d.ts +42 -0
  306. package/dist/types/run/flows/asset/preprocess.d.ts +23 -17
  307. package/dist/types/run/flows/asset/summary.d.ts +24 -16
  308. package/dist/types/run/flows/url/extract.d.ts +3 -2
  309. package/dist/types/run/flows/url/flow.d.ts +1 -1
  310. package/dist/types/run/flows/url/markdown.d.ts +6 -6
  311. package/dist/types/run/flows/url/slides-output.d.ts +66 -0
  312. package/dist/types/run/flows/url/slides-text.d.ts +87 -0
  313. package/dist/types/run/flows/url/summary.d.ts +18 -10
  314. package/dist/types/run/flows/url/types.d.ts +52 -21
  315. package/dist/types/run/format.d.ts +3 -3
  316. package/dist/types/run/help.d.ts +4 -1
  317. package/dist/types/run/logging.d.ts +3 -2
  318. package/dist/types/run/media-cache-state.d.ts +7 -0
  319. package/dist/types/run/model-attempts.d.ts +1 -1
  320. package/dist/types/run/progress.d.ts +2 -1
  321. package/dist/types/run/run-config.d.ts +4 -4
  322. package/dist/types/run/run-context.d.ts +3 -1
  323. package/dist/types/run/run-env.d.ts +3 -1
  324. package/dist/types/run/run-input.d.ts +2 -2
  325. package/dist/types/run/run-metrics.d.ts +3 -3
  326. package/dist/types/run/run-models.d.ts +3 -2
  327. package/dist/types/run/run-output.d.ts +1 -1
  328. package/dist/types/run/run-settings.d.ts +20 -5
  329. package/dist/types/run/run-stream.d.ts +2 -2
  330. package/dist/types/run/runner.d.ts +3 -2
  331. package/dist/types/run/slides-cli.d.ts +9 -0
  332. package/dist/types/run/slides-render.d.ts +30 -0
  333. package/dist/types/run/stdin-temp-file.d.ts +9 -0
  334. package/dist/types/run/stream-output.d.ts +3 -2
  335. package/dist/types/run/streaming.d.ts +4 -4
  336. package/dist/types/run/summary-engine.d.ts +22 -12
  337. package/dist/types/run/summary-llm.d.ts +5 -5
  338. package/dist/types/run/transcriber-cli.d.ts +8 -0
  339. package/dist/types/run/types.d.ts +4 -4
  340. package/dist/types/run.d.ts +1 -1
  341. package/dist/types/shared/contracts.d.ts +2 -2
  342. package/dist/types/shared/sse-events.d.ts +26 -6
  343. package/dist/types/slides/extract.d.ts +43 -0
  344. package/dist/types/slides/index.d.ts +5 -0
  345. package/dist/types/slides/settings.d.ts +20 -0
  346. package/dist/types/slides/store.d.ts +15 -0
  347. package/dist/types/slides/types.d.ts +40 -0
  348. package/dist/types/tty/osc-progress.d.ts +5 -5
  349. package/dist/types/tty/progress/fetch-html.d.ts +5 -3
  350. package/dist/types/tty/progress/transcript.d.ts +5 -3
  351. package/dist/types/tty/spinner.d.ts +3 -1
  352. package/dist/types/tty/theme.d.ts +44 -0
  353. package/dist/types/tty/website-progress.d.ts +5 -3
  354. package/dist/types/version.d.ts +1 -1
  355. package/docs/README.md +1 -1
  356. package/docs/_config.yml +26 -0
  357. package/docs/_layouts/default.html +60 -0
  358. package/docs/agent.md +367 -0
  359. package/docs/assets/site.css +748 -0
  360. package/docs/assets/site.js +72 -0
  361. package/docs/assets/summarize-cli.png +0 -0
  362. package/docs/assets/summarize-extension.png +0 -0
  363. package/docs/assets/youtube-slides.png +0 -0
  364. package/docs/cache.md +29 -3
  365. package/docs/chrome-extension.md +72 -16
  366. package/docs/cli.md +59 -13
  367. package/docs/config.md +109 -12
  368. package/docs/extract-only.md +10 -0
  369. package/docs/index.html +224 -0
  370. package/docs/index.md +25 -0
  371. package/docs/llm.md +18 -5
  372. package/docs/manual-tests.md +2 -0
  373. package/docs/media.md +6 -2
  374. package/docs/model-auto.md +3 -2
  375. package/docs/nvidia-onnx-transcription.md +55 -0
  376. package/docs/openai.md +1 -1
  377. package/docs/releasing.md +3 -0
  378. package/docs/site/404.html +4 -1
  379. package/docs/site/assets/site.css +399 -228
  380. package/docs/site/assets/site.js +46 -46
  381. package/docs/site/assets/summarize-cli.png +0 -0
  382. package/docs/site/assets/summarize-extension.png +0 -0
  383. package/docs/site/docs/chrome-extension.html +101 -0
  384. package/docs/site/docs/config.html +30 -8
  385. package/docs/site/docs/extract-only.html +17 -4
  386. package/docs/site/docs/firecrawl.html +13 -3
  387. package/docs/site/docs/index.html +40 -6
  388. package/docs/site/docs/llm.html +20 -5
  389. package/docs/site/docs/openai.html +19 -5
  390. package/docs/site/docs/website.html +30 -9
  391. package/docs/site/docs/youtube.html +13 -3
  392. package/docs/site/index.html +168 -85
  393. package/docs/slides.md +82 -0
  394. package/docs/smoketest.md +29 -20
  395. package/docs/timestamps.md +124 -0
  396. package/docs/website.md +13 -0
  397. package/docs/youtube.md +20 -0
  398. package/package.json +57 -48
@@ -0,0 +1,2 @@
1
+ export declare function resolveCliEntrypointCandidatesFromWindowsShim(shimPath: string): Promise<string[]>;
2
+ export declare function resolveCliEntrypointPathForService(): Promise<string>;
@@ -1,4 +1,4 @@
1
- import type { EnvSnapshot } from './env-snapshot.js';
1
+ import type { EnvSnapshot } from "./env-snapshot.js";
2
2
  export type DaemonConfigV1 = {
3
3
  version: 1;
4
4
  token: string;
@@ -15,5 +15,5 @@ export declare function readDaemonConfig({ env, }: {
15
15
  }): Promise<DaemonConfig | null>;
16
16
  export declare function writeDaemonConfig({ env, config, }: {
17
17
  env: Record<string, string | undefined>;
18
- config: Omit<DaemonConfig, 'version' | 'installedAt'> & Partial<Pick<DaemonConfig, 'installedAt'>>;
18
+ config: Omit<DaemonConfig, "version" | "installedAt"> & Partial<Pick<DaemonConfig, "installedAt">>;
19
19
  }): Promise<string>;
@@ -1,4 +1,4 @@
1
- import type { EnvSnapshot } from './env-snapshot.js';
1
+ import type { EnvSnapshot } from "./env-snapshot.js";
2
2
  export declare function mergeDaemonEnv({ envForRun, snapshot, }: {
3
3
  envForRun: Record<string, string | undefined>;
4
4
  snapshot: EnvSnapshot;
@@ -1,4 +1,4 @@
1
- declare const ENV_KEYS: readonly ["PATH", "XAI_API_KEY", "XAI_BASE_URL", "OPENAI_API_KEY", "OPENAI_BASE_URL", "OPENROUTER_API_KEY", "OPENAI_USE_CHAT_COMPLETIONS", "Z_AI_API_KEY", "ZAI_API_KEY", "Z_AI_BASE_URL", "ZAI_BASE_URL", "GEMINI_API_KEY", "GOOGLE_BASE_URL", "GEMINI_BASE_URL", "GOOGLE_GENERATIVE_AI_API_KEY", "GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL", "FIRECRAWL_API_KEY", "APIFY_API_TOKEN", "YT_DLP_PATH", "FAL_KEY", "SUMMARIZE_MODEL", "CLAUDE_PATH", "CODEX_PATH", "GEMINI_PATH", "UVX_PATH"];
1
+ declare const ENV_KEYS: readonly ["PATH", "XAI_API_KEY", "XAI_BASE_URL", "OPENAI_API_KEY", "OPENAI_WHISPER_BASE_URL", "OPENAI_BASE_URL", "OPENROUTER_API_KEY", "OPENAI_USE_CHAT_COMPLETIONS", "Z_AI_API_KEY", "ZAI_API_KEY", "Z_AI_BASE_URL", "ZAI_BASE_URL", "GEMINI_API_KEY", "GOOGLE_BASE_URL", "GEMINI_BASE_URL", "GOOGLE_GENERATIVE_AI_API_KEY", "GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL", "FIRECRAWL_API_KEY", "APIFY_API_TOKEN", "YT_DLP_PATH", "SUMMARIZE_YT_DLP_COOKIES_FROM_BROWSER", "YT_DLP_COOKIES_FROM_BROWSER", "FAL_KEY", "GROQ_API_KEY", "SUMMARIZE_MODEL", "SUMMARIZE_TRANSCRIBER", "SUMMARIZE_ONNX_PARAKEET_CMD", "SUMMARIZE_ONNX_CANARY_CMD", "CLAUDE_PATH", "CODEX_PATH", "GEMINI_PATH", "AGENT_PATH", "UVX_PATH"];
2
2
  export type EnvSnapshot = Partial<Record<(typeof ENV_KEYS)[number], string>>;
3
3
  export declare function buildEnvSnapshotFromEnv(env: Record<string, string | undefined>): EnvSnapshot;
4
4
  export {};
@@ -1,7 +1,8 @@
1
- import type { CacheState } from '../cache.js';
2
- import type { ExtractedLinkContent, LinkPreviewProgressEvent } from '../content/index.js';
3
- import type { UrlFlowContext } from '../run/flows/url/types.js';
4
- import { type RunOverrides } from '../run/run-settings.js';
1
+ import type { CacheState } from "../cache.js";
2
+ import type { ExtractedLinkContent, LinkPreviewProgressEvent, MediaCache } from "../content/index.js";
3
+ import type { UrlFlowContext } from "../run/flows/url/types.js";
4
+ import type { SlideImage, SlideSettings, SlideSourceKind } from "../slides/index.js";
5
+ import { type RunOverrides } from "../run/run-settings.js";
5
6
  type TextSink = {
6
7
  writeChunk: (text: string) => void;
7
8
  };
@@ -9,16 +10,35 @@ export type DaemonUrlFlowContextArgs = {
9
10
  env: Record<string, string | undefined>;
10
11
  fetchImpl: typeof fetch;
11
12
  cache: CacheState;
13
+ mediaCache?: MediaCache | null;
12
14
  modelOverride: string | null;
13
15
  promptOverride: string | null;
14
16
  lengthRaw: unknown;
15
17
  languageRaw: unknown;
16
18
  maxExtractCharacters: number | null;
19
+ format?: "text" | "markdown";
17
20
  overrides?: RunOverrides | null;
18
21
  extractOnly?: boolean;
22
+ slides?: SlideSettings | null;
19
23
  hooks?: {
20
24
  onModelChosen?: ((modelId: string) => void) | null;
21
25
  onExtracted?: ((extracted: ExtractedLinkContent) => void) | null;
26
+ onSlidesExtracted?: ((slides: Awaited<ReturnType<typeof import("../slides/index.js").extractSlidesForSource>>) => void) | null;
27
+ onSlidesProgress?: ((text: string) => void) | null;
28
+ onSlidesDone?: ((result: {
29
+ ok: boolean;
30
+ error?: string | null;
31
+ }) => void) | null;
32
+ onSlideChunk?: (chunk: {
33
+ slide: SlideImage;
34
+ meta: {
35
+ slidesDir: string;
36
+ sourceUrl: string;
37
+ sourceId: string;
38
+ sourceKind: SlideSourceKind;
39
+ ocrAvailable: boolean;
40
+ };
41
+ }) => void;
22
42
  onLinkPreviewProgress?: ((event: LinkPreviewProgressEvent) => void) | null;
23
43
  onSummaryCached?: ((cached: boolean) => void) | null;
24
44
  } | null;
@@ -4,6 +4,10 @@ export declare function resolveDaemonLogPaths(env: Record<string, string | undef
4
4
  stdoutPath: string;
5
5
  stderrPath: string;
6
6
  };
7
+ export declare function readLaunchAgentProgramArguments(env: Record<string, string | undefined>): Promise<{
8
+ programArguments: string[];
9
+ workingDirectory?: string;
10
+ } | null>;
7
11
  export declare function buildLaunchAgentPlist({ label, programArguments, workingDirectory, stdoutPath, stderrPath, }: {
8
12
  label?: string;
9
13
  programArguments: string[];
@@ -11,6 +15,14 @@ export declare function buildLaunchAgentPlist({ label, programArguments, working
11
15
  stdoutPath: string;
12
16
  stderrPath: string;
13
17
  }): string;
18
+ export declare function resolveLaunchctlTargetUid({ uid, sudoUid, }?: {
19
+ uid?: number;
20
+ sudoUid?: string;
21
+ }): number;
22
+ export declare function resolveLaunchctlDomains({ uid, sudoUid, }?: {
23
+ uid?: number;
24
+ sudoUid?: string;
25
+ }): string[];
14
26
  export declare function isLaunchAgentLoaded(): Promise<boolean>;
15
27
  export declare function uninstallLaunchAgent({ env, stdout, }: {
16
28
  env: Record<string, string | undefined>;
@@ -1,4 +1,4 @@
1
- import type { SummarizeConfig } from '../config.js';
1
+ import type { SummarizeConfig } from "../config.js";
2
2
  export type ModelPickerOption = {
3
3
  id: string;
4
4
  label: string;
@@ -18,10 +18,14 @@ export declare function buildModelPickerOptions({ env, envForRun, configForCli,
18
18
  anthropic: boolean;
19
19
  openrouter: boolean;
20
20
  zai: boolean;
21
+ cliClaude: boolean;
22
+ cliGemini: boolean;
23
+ cliCodex: boolean;
24
+ cliAgent: boolean;
21
25
  };
22
26
  openaiBaseUrl: string | null;
23
27
  localModelsSource: {
24
- kind: 'openai-compatible';
28
+ kind: "openai-compatible";
25
29
  baseUrlHost: string;
26
30
  } | null;
27
31
  }>;
@@ -0,0 +1,73 @@
1
+ import type { ProcessObserver } from "@steipete/summarize-core/processes";
2
+ type ProcessStatus = "running" | "exited" | "error";
3
+ type OutputLine = {
4
+ stream: "stdout" | "stderr";
5
+ line: string;
6
+ };
7
+ type ProcessListItem = {
8
+ id: string;
9
+ label: string | null;
10
+ kind: string | null;
11
+ command: string;
12
+ args: string[];
13
+ runId: string | null;
14
+ source: string | null;
15
+ pid: number | null;
16
+ status: ProcessStatus;
17
+ exitCode: number | null;
18
+ signal: string | null;
19
+ error: string | null;
20
+ startedAt: number;
21
+ endedAt: number | null;
22
+ elapsedMs: number;
23
+ progressPercent: number | null;
24
+ progressDetail: string | null;
25
+ statusText: string | null;
26
+ lastLine: string | null;
27
+ };
28
+ type ProcessLogResult = {
29
+ ok: true;
30
+ id: string;
31
+ lines: OutputLine[];
32
+ truncated: boolean;
33
+ };
34
+ type ProcessListResult = {
35
+ ok: true;
36
+ nowMs: number;
37
+ processes: ProcessListItem[];
38
+ };
39
+ type RegistryOptions = {
40
+ maxRecords?: number;
41
+ maxLines?: number;
42
+ maxLineLength?: number;
43
+ retentionMs?: number;
44
+ };
45
+ export declare class ProcessRegistry {
46
+ private readonly maxRecords;
47
+ private readonly maxLines;
48
+ private readonly maxLineLength;
49
+ private readonly retentionMs;
50
+ private readonly records;
51
+ private readonly order;
52
+ constructor(options?: RegistryOptions);
53
+ createObserver(): ProcessObserver;
54
+ list(opts?: {
55
+ includeCompleted?: boolean;
56
+ limit?: number;
57
+ }): ProcessListResult;
58
+ getLogs(id: string, opts?: {
59
+ tail?: number;
60
+ stream?: "stdout" | "stderr" | "merged";
61
+ }): ProcessLogResult | null;
62
+ private register;
63
+ private prune;
64
+ }
65
+ export declare function buildProcessListResult(registry: ProcessRegistry, opts?: {
66
+ includeCompleted?: boolean;
67
+ limit?: number;
68
+ }): ProcessListResult;
69
+ export declare function buildProcessLogsResult(registry: ProcessRegistry, id: string, opts?: {
70
+ tail?: number;
71
+ stream?: "stdout" | "stderr" | "merged";
72
+ }): ProcessLogResult | null;
73
+ export {};
@@ -1,3 +1,7 @@
1
+ export declare function readScheduledTaskCommand(env: Record<string, string | undefined>): Promise<{
2
+ programArguments: string[];
3
+ workingDirectory?: string;
4
+ } | null>;
1
5
  export declare function installScheduledTask({ env, stdout, programArguments, workingDirectory, }: {
2
6
  env: Record<string, string | undefined>;
3
7
  stdout: NodeJS.WritableStream;
@@ -1,5 +1,5 @@
1
- import { type SseEvent } from '../shared/sse-events.js';
2
- import type { DaemonConfig } from './config.js';
1
+ import type { DaemonConfig } from "./config.js";
2
+ import { type SseEvent } from "../shared/sse-events.js";
3
3
  type SessionEvent = SseEvent;
4
4
  export declare function buildHealthPayload(importMetaUrl?: string): {
5
5
  ok: boolean;
@@ -1,2 +1,2 @@
1
- import { type LinkPreviewProgressEvent } from '@steipete/summarize-core/content';
1
+ import { type LinkPreviewProgressEvent } from "@steipete/summarize-core/content";
2
2
  export declare function formatProgress(event: LinkPreviewProgressEvent): string | null;
@@ -1,6 +1,7 @@
1
- import type { CacheState } from '../cache.js';
2
- import { type ExtractedLinkContent } from '../content/index.js';
3
- import type { RunOverrides } from '../run/run-settings.js';
1
+ import type { CacheState } from "../cache.js";
2
+ import type { RunOverrides } from "../run/run-settings.js";
3
+ import type { SlideExtractionResult, SlideImage, SlideSettings, SlideSourceKind } from "../slides/index.js";
4
+ import { type ExtractedLinkContent, type MediaCache } from "../content/index.js";
4
5
  export type VisiblePageInput = {
5
6
  url: string;
6
7
  title: string | null;
@@ -28,7 +29,7 @@ export type VisiblePageMetrics = {
28
29
  summaryDetailed: string;
29
30
  detailsDetailed: string | null;
30
31
  };
31
- export declare function streamSummaryForVisiblePage({ env, fetchImpl, input, modelOverride, promptOverride, lengthRaw, languageRaw, sink, cache, overrides, }: {
32
+ export declare function streamSummaryForVisiblePage({ env, fetchImpl, input, modelOverride, promptOverride, lengthRaw, languageRaw, format, sink, cache, mediaCache, overrides, }: {
32
33
  env: Record<string, string | undefined>;
33
34
  fetchImpl: typeof fetch;
34
35
  input: VisiblePageInput;
@@ -36,14 +37,16 @@ export declare function streamSummaryForVisiblePage({ env, fetchImpl, input, mod
36
37
  promptOverride: string | null;
37
38
  lengthRaw: unknown;
38
39
  languageRaw: unknown;
40
+ format?: "text" | "markdown";
39
41
  sink: StreamSink;
40
42
  cache: CacheState;
43
+ mediaCache: MediaCache | null;
41
44
  overrides: RunOverrides;
42
45
  }): Promise<{
43
46
  usedModel: string;
44
47
  metrics: VisiblePageMetrics;
45
48
  }>;
46
- export declare function streamSummaryForUrl({ env, fetchImpl, input, modelOverride, promptOverride, lengthRaw, languageRaw, sink, cache, overrides, hooks, }: {
49
+ export declare function streamSummaryForUrl({ env, fetchImpl, input, modelOverride, promptOverride, lengthRaw, languageRaw, format, sink, cache, mediaCache, overrides, slides, hooks, }: {
47
50
  env: Record<string, string | undefined>;
48
51
  fetchImpl: typeof fetch;
49
52
  input: UrlModeInput;
@@ -51,20 +54,48 @@ export declare function streamSummaryForUrl({ env, fetchImpl, input, modelOverri
51
54
  promptOverride: string | null;
52
55
  lengthRaw: unknown;
53
56
  languageRaw: unknown;
57
+ format?: "text" | "markdown";
54
58
  sink: StreamSink;
55
59
  cache: CacheState;
60
+ mediaCache: MediaCache | null;
56
61
  overrides: RunOverrides;
62
+ slides?: SlideSettings | null;
57
63
  hooks?: {
58
64
  onExtracted?: ((extracted: ExtractedLinkContent) => void) | null;
65
+ onSlidesExtracted?: ((slides: SlideExtractionResult) => void) | null;
66
+ onSlidesProgress?: ((text: string) => void) | null;
67
+ onSlidesDone?: ((result: {
68
+ ok: boolean;
69
+ error?: string | null;
70
+ }) => void) | null;
71
+ onSlideChunk?: (chunk: {
72
+ slide: SlideImage;
73
+ meta: {
74
+ slidesDir: string;
75
+ sourceUrl: string;
76
+ sourceId: string;
77
+ sourceKind: SlideSourceKind;
78
+ ocrAvailable: boolean;
79
+ };
80
+ }) => void;
59
81
  } | null;
60
82
  }): Promise<{
61
83
  usedModel: string;
62
84
  metrics: VisiblePageMetrics;
63
85
  }>;
64
- export declare function extractContentForUrl({ env, fetchImpl, input, cache, overrides, }: {
86
+ export declare function extractContentForUrl({ env, fetchImpl, input, cache, mediaCache, overrides, format, slides, hooks, }: {
65
87
  env: Record<string, string | undefined>;
66
88
  fetchImpl: typeof fetch;
67
89
  input: UrlModeInput;
68
90
  cache: CacheState;
91
+ mediaCache: MediaCache | null;
69
92
  overrides: RunOverrides;
70
- }): Promise<ExtractedLinkContent>;
93
+ format?: "text" | "markdown";
94
+ slides?: SlideSettings | null;
95
+ hooks?: {
96
+ onSlidesExtracted?: ((slides: SlideExtractionResult) => void) | null;
97
+ } | null;
98
+ }): Promise<{
99
+ extracted: ExtractedLinkContent;
100
+ slides: SlideExtractionResult | null;
101
+ }>;
@@ -1,3 +1,7 @@
1
+ export declare function readSystemdServiceExecStart(env: Record<string, string | undefined>): Promise<{
2
+ programArguments: string[];
3
+ workingDirectory?: string;
4
+ } | null>;
1
5
  export declare function installSystemdService({ env, stdout, programArguments, workingDirectory, }: {
2
6
  env: Record<string, string | undefined>;
3
7
  stdout: NodeJS.WritableStream;
@@ -1,4 +1,4 @@
1
- import type { ScrapeWithFirecrawl } from '@steipete/summarize-core/content';
1
+ import type { ScrapeWithFirecrawl } from "@steipete/summarize-core/content";
2
2
  export declare function createFirecrawlScraper({ apiKey, fetchImpl, }: {
3
3
  apiKey: string;
4
4
  fetchImpl: typeof fetch;
@@ -1,17 +1,17 @@
1
- import type { SummaryLength } from './shared/contracts.js';
2
- export type YoutubeMode = 'auto' | 'web' | 'apify' | 'yt-dlp' | 'no-auto';
3
- export type FirecrawlMode = 'off' | 'auto' | 'always';
4
- export type MarkdownMode = 'off' | 'auto' | 'llm' | 'readability';
5
- export type ExtractFormat = 'text' | 'markdown';
6
- export type PreprocessMode = 'off' | 'auto' | 'always';
7
- export type StreamMode = 'auto' | 'on' | 'off';
8
- export type MetricsMode = 'off' | 'on' | 'detailed';
9
- export type VideoMode = 'auto' | 'transcript' | 'understand';
1
+ import type { SummaryLength } from "./shared/contracts.js";
2
+ export type YoutubeMode = "auto" | "web" | "apify" | "yt-dlp" | "no-auto";
3
+ export type FirecrawlMode = "off" | "auto" | "always";
4
+ export type MarkdownMode = "off" | "auto" | "llm" | "readability";
5
+ export type ExtractFormat = "text" | "markdown";
6
+ export type PreprocessMode = "off" | "auto" | "always";
7
+ export type StreamMode = "auto" | "on" | "off";
8
+ export type MetricsMode = "off" | "on" | "detailed";
9
+ export type VideoMode = "auto" | "transcript" | "understand";
10
10
  export type LengthArg = {
11
- kind: 'preset';
11
+ kind: "preset";
12
12
  preset: SummaryLength;
13
13
  } | {
14
- kind: 'chars';
14
+ kind: "chars";
15
15
  maxCharacters: number;
16
16
  };
17
17
  export declare function parseYoutubeMode(raw: string): YoutubeMode;
@@ -24,5 +24,6 @@ export declare function parseMetricsMode(raw: string): MetricsMode;
24
24
  export declare function parseVideoMode(raw: string): VideoMode;
25
25
  export declare function parseDurationMs(raw: string): number;
26
26
  export declare function parseLengthArg(raw: string): LengthArg;
27
+ export declare function parseMaxExtractCharactersArg(raw: string | undefined): number | null;
27
28
  export declare function parseMaxOutputTokensArg(raw: string | undefined): number | null;
28
29
  export declare function parseRetriesArg(raw: string): number;
@@ -1,4 +1,4 @@
1
- export * from './content/index.js';
2
- export * from './prompts/index.js';
3
- export type { SummaryLength } from './shared/contracts.js';
4
- export { SUMMARY_LENGTHS } from './shared/contracts.js';
1
+ export * from "./content/index.js";
2
+ export * from "./prompts/index.js";
3
+ export type { SummaryLength } from "./shared/contracts.js";
4
+ export { SUMMARY_LENGTHS } from "./shared/contracts.js";
@@ -1 +1 @@
1
- export * from '@steipete/summarize-core/language';
1
+ export * from "@steipete/summarize-core/language";
@@ -1,5 +1,5 @@
1
1
  export type Attachment = {
2
- kind: 'text' | 'image' | 'document';
2
+ kind: "text" | "image" | "document";
3
3
  mediaType: string;
4
4
  bytes: Uint8Array;
5
5
  filename: string | null;
@@ -1,6 +1,6 @@
1
- import type { CliConfig, CliProvider } from '../config.js';
2
- import type { ExecFileFn } from '../markitdown.js';
3
- import type { LlmTokenUsage } from './generate-text.js';
1
+ import type { CliConfig, CliProvider } from "../config.js";
2
+ import type { ExecFileFn } from "../markitdown.js";
3
+ import type { LlmTokenUsage } from "./generate-text.js";
4
4
  type RunCliModelOptions = {
5
5
  provider: CliProvider;
6
6
  prompt: string;
@@ -1,6 +1,6 @@
1
- import type { Context } from '@mariozechner/pi-ai';
2
- import { type Prompt } from './prompt.js';
3
- import type { LlmTokenUsage } from './types.js';
1
+ import type { Context } from "@mariozechner/pi-ai";
2
+ import type { LlmTokenUsage } from "./types.js";
3
+ import { type Prompt } from "./prompt.js";
4
4
  export type LlmApiKeys = {
5
5
  xaiApiKey: string | null;
6
6
  openaiApiKey: string | null;
@@ -11,7 +11,7 @@ export type LlmApiKeys = {
11
11
  export type OpenRouterOptions = {
12
12
  providers: string[] | null;
13
13
  };
14
- export type { LlmTokenUsage } from './types.js';
14
+ export type { LlmTokenUsage } from "./types.js";
15
15
  type RetryNotice = {
16
16
  attempt: number;
17
17
  maxRetries: number;
@@ -37,7 +37,7 @@ export declare function generateTextWithModelId({ modelId, apiKeys, prompt, temp
37
37
  }): Promise<{
38
38
  text: string;
39
39
  canonicalModelId: string;
40
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
40
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
41
41
  usage: LlmTokenUsage | null;
42
42
  }>;
43
43
  export declare function streamTextWithModelId({ modelId, apiKeys, prompt, temperature, maxOutputTokens, timeoutMs, fetchImpl, forceOpenRouter, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, forceChatCompletions, }: {
@@ -57,7 +57,7 @@ export declare function streamTextWithModelId({ modelId, apiKeys, prompt, temper
57
57
  }): Promise<{
58
58
  textStream: AsyncIterable<string>;
59
59
  canonicalModelId: string;
60
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
60
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
61
61
  usage: Promise<LlmTokenUsage | null>;
62
62
  lastError: () => unknown;
63
63
  }>;
@@ -78,7 +78,7 @@ export declare function streamTextWithContext({ modelId, apiKeys, context, tempe
78
78
  }): Promise<{
79
79
  textStream: AsyncIterable<string>;
80
80
  canonicalModelId: string;
81
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
81
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
82
82
  usage: Promise<LlmTokenUsage | null>;
83
83
  lastError: () => unknown;
84
84
  }>;
@@ -1,5 +1,5 @@
1
- import type { ConvertHtmlToMarkdown } from '@steipete/summarize-core/content';
2
- import type { LlmTokenUsage } from './generate-text.js';
1
+ import type { ConvertHtmlToMarkdown } from "@steipete/summarize-core/content";
2
+ import type { LlmTokenUsage } from "./generate-text.js";
3
3
  export declare function createHtmlToMarkdownConverter({ modelId, forceOpenRouter, xaiApiKey, googleApiKey, openaiApiKey, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, anthropicApiKey, openrouterApiKey, fetchImpl, forceChatCompletions, retries, onRetry, onUsage, }: {
4
4
  modelId: string;
5
5
  forceOpenRouter?: boolean;
@@ -23,7 +23,7 @@ export declare function createHtmlToMarkdownConverter({ modelId, forceOpenRouter
23
23
  }) => void;
24
24
  onUsage?: (usage: {
25
25
  model: string;
26
- provider: 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
26
+ provider: "xai" | "openai" | "google" | "anthropic" | "zai";
27
27
  usage: LlmTokenUsage | null;
28
28
  }) => void;
29
29
  }): ConvertHtmlToMarkdown;
@@ -1,4 +1,4 @@
1
- export type LlmProvider = 'xai' | 'openai' | 'google' | 'anthropic' | 'zai';
1
+ export type LlmProvider = "xai" | "openai" | "google" | "anthropic" | "zai";
2
2
  export type ParsedModelId = {
3
3
  provider: LlmProvider;
4
4
  /**
@@ -1,5 +1,5 @@
1
- import type { UserMessage } from '@mariozechner/pi-ai';
2
- import type { Attachment } from './attachments.js';
1
+ import type { UserMessage } from "@mariozechner/pi-ai";
2
+ import type { Attachment } from "./attachments.js";
3
3
  export type Prompt = {
4
4
  system?: string;
5
5
  userText: string;
@@ -1,6 +1,6 @@
1
- import type { Context } from '@mariozechner/pi-ai';
2
- import type { Attachment } from '../attachments.js';
3
- import type { LlmTokenUsage } from '../types.js';
1
+ import type { Context } from "@mariozechner/pi-ai";
2
+ import type { Attachment } from "../attachments.js";
3
+ import type { LlmTokenUsage } from "../types.js";
4
4
  export declare function normalizeAnthropicModelAccessError(error: unknown, modelId: string): Error | null;
5
5
  export declare function completeAnthropicText({ modelId, apiKey, context, temperature, maxOutputTokens, signal, anthropicBaseUrlOverride, }: {
6
6
  modelId: string;
@@ -1,6 +1,6 @@
1
- import type { Context } from '@mariozechner/pi-ai';
2
- import type { Attachment } from '../attachments.js';
3
- import type { LlmTokenUsage } from '../types.js';
1
+ import type { Context } from "@mariozechner/pi-ai";
2
+ import type { Attachment } from "../attachments.js";
3
+ import type { LlmTokenUsage } from "../types.js";
4
4
  export declare function completeGoogleText({ modelId, apiKey, context, temperature, maxOutputTokens, signal, googleBaseUrlOverride, }: {
5
5
  modelId: string;
6
6
  apiKey: string;
@@ -1,5 +1,5 @@
1
- import type { Api, Context, Model } from '@mariozechner/pi-ai';
2
- import type { OpenAiClientConfig } from './types.js';
1
+ import type { Api, Context, Model } from "@mariozechner/pi-ai";
2
+ import type { OpenAiClientConfig } from "./types.js";
3
3
  export declare function resolveOpenAiModel({ modelId, context, openaiConfig, }: {
4
4
  modelId: string;
5
5
  context: Context;
@@ -1,7 +1,7 @@
1
- import type { Context } from '@mariozechner/pi-ai';
2
- import type { Attachment } from '../attachments.js';
3
- import type { LlmTokenUsage } from '../types.js';
4
- import type { OpenAiClientConfig } from './types.js';
1
+ import type { Context } from "@mariozechner/pi-ai";
2
+ import type { Attachment } from "../attachments.js";
3
+ import type { LlmTokenUsage } from "../types.js";
4
+ import type { OpenAiClientConfig } from "./types.js";
5
5
  export type OpenAiClientConfigInput = {
6
6
  apiKeys: {
7
7
  openaiApiKey: string | null;
@@ -1,4 +1,4 @@
1
- import type { Api, AssistantMessage, Context, KnownProvider, Model } from '@mariozechner/pi-ai';
1
+ import type { Api, AssistantMessage, Context, KnownProvider, Model } from "@mariozechner/pi-ai";
2
2
  export declare function resolveBaseUrlOverride(raw: string | null | undefined): string | null;
3
3
  export declare function bytesToBase64(bytes: Uint8Array): string;
4
4
  export declare function extractText(message: AssistantMessage): string;
@@ -7,7 +7,7 @@ export declare function tryGetModel(provider: KnownProvider, modelId: string): M
7
7
  export declare function createSyntheticModel({ provider, modelId, api, baseUrl, allowImages, headers, }: {
8
8
  provider: KnownProvider;
9
9
  modelId: string;
10
- api: Model<Api>['api'];
10
+ api: Model<Api>["api"];
11
11
  baseUrl: string;
12
12
  allowImages: boolean;
13
13
  headers?: Record<string, string>;
@@ -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;
@@ -0,0 +1,22 @@
1
+ import type { MediaCache } from "./content/index.js";
2
+ export type MediaCacheVerifyMode = "none" | "size" | "hash";
3
+ export type MediaCacheConfig = {
4
+ enabled?: boolean;
5
+ maxMb?: number;
6
+ ttlDays?: number;
7
+ path?: string;
8
+ verify?: MediaCacheVerifyMode;
9
+ };
10
+ export declare const DEFAULT_MEDIA_CACHE_MAX_MB = 2048;
11
+ export declare const DEFAULT_MEDIA_CACHE_TTL_DAYS = 7;
12
+ export declare const DEFAULT_MEDIA_CACHE_VERIFY: MediaCacheVerifyMode;
13
+ export declare function resolveMediaCachePath({ env, cachePath, }: {
14
+ env: Record<string, string | undefined>;
15
+ cachePath: string | null;
16
+ }): string | null;
17
+ export declare function createMediaCache({ path, maxBytes, ttlMs, verify, }: {
18
+ path: string;
19
+ maxBytes: number;
20
+ ttlMs: number;
21
+ verify?: MediaCacheVerifyMode;
22
+ }): Promise<MediaCache>;