@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,7 +1,7 @@
1
- import type { TranscriptCache } from './content/index.js';
2
- import type { LengthArg } from './flags.js';
3
- import type { OutputLanguage } from './language.js';
4
- export type CacheKind = 'extract' | 'summary' | 'transcript' | 'chat' | 'slides';
1
+ import type { TranscriptCache } from "./content/index.js";
2
+ import type { LengthArg } from "./flags.js";
3
+ import type { OutputLanguage } from "./language.js";
4
+ export type CacheKind = "extract" | "summary" | "transcript" | "chat" | "slides";
5
5
  export type CacheConfig = {
6
6
  enabled?: boolean;
7
7
  maxMb?: number;
@@ -21,7 +21,7 @@ export type CacheStore = {
21
21
  transcriptCache: TranscriptCache;
22
22
  };
23
23
  export type CacheState = {
24
- mode: 'default' | 'bypass';
24
+ mode: "default" | "bypass";
25
25
  store: CacheStore | null;
26
26
  ttlMs: number;
27
27
  maxBytes: number;
@@ -46,7 +46,7 @@ export declare function clearCacheFiles(path: string): void;
46
46
  export declare function hashString(value: string): string;
47
47
  export declare function hashJson(value: unknown): string;
48
48
  export declare function normalizeContentForHash(content: string): string;
49
- export declare function extractTaggedBlock(prompt: string, tag: 'instructions' | 'content'): string | null;
49
+ export declare function extractTaggedBlock(prompt: string, tag: "instructions" | "content"): string | null;
50
50
  export declare function buildPromptHash(prompt: string): string;
51
51
  export declare function buildLengthKey(lengthArg: LengthArg): string;
52
52
  export declare function buildLanguageKey(outputLanguage: OutputLanguage): string;
@@ -1,16 +1,29 @@
1
- export type AutoRuleKind = 'text' | 'website' | 'youtube' | 'image' | 'video' | 'file';
2
- export type VideoMode = 'auto' | 'transcript' | 'understand';
3
- export type CliProvider = 'claude' | 'codex' | 'gemini';
1
+ export type AutoRuleKind = "text" | "website" | "youtube" | "image" | "video" | "file";
2
+ export type VideoMode = "auto" | "transcript" | "understand";
3
+ export type CliProvider = "claude" | "codex" | "gemini" | "agent";
4
4
  export type CliProviderConfig = {
5
5
  binary?: string;
6
6
  extraArgs?: string[];
7
7
  model?: string;
8
8
  };
9
+ export type CliAutoFallbackConfig = {
10
+ enabled?: boolean;
11
+ onlyWhenNoApiKeys?: boolean;
12
+ order?: CliProvider[];
13
+ };
14
+ export type CliMagicAutoConfig = CliAutoFallbackConfig;
9
15
  export type CliConfig = {
10
16
  enabled?: CliProvider[];
11
17
  claude?: CliProviderConfig;
12
18
  codex?: CliProviderConfig;
13
19
  gemini?: CliProviderConfig;
20
+ agent?: CliProviderConfig;
21
+ autoFallback?: CliAutoFallbackConfig;
22
+ magicAuto?: CliAutoFallbackConfig;
23
+ promptOverride?: string;
24
+ allowTools?: boolean;
25
+ cwd?: string;
26
+ extraArgs?: string[];
14
27
  };
15
28
  export type OpenAiConfig = {
16
29
  /**
@@ -27,7 +40,7 @@ export type OpenAiConfig = {
27
40
  */
28
41
  whisperUsdPerMinute?: number;
29
42
  };
30
- export type MediaCacheVerifyMode = 'none' | 'size' | 'hash';
43
+ export type MediaCacheVerifyMode = "none" | "size" | "hash";
31
44
  export type MediaCacheConfig = {
32
45
  enabled?: boolean;
33
46
  maxMb?: number;
@@ -51,8 +64,20 @@ export type GoogleConfig = {
51
64
  */
52
65
  baseUrl?: string;
53
66
  };
54
- export type LoggingLevel = 'debug' | 'info' | 'warn' | 'error';
55
- export type LoggingFormat = 'json' | 'pretty';
67
+ export type ApiKeysConfig = {
68
+ openai?: string;
69
+ anthropic?: string;
70
+ google?: string;
71
+ xai?: string;
72
+ openrouter?: string;
73
+ zai?: string;
74
+ apify?: string;
75
+ firecrawl?: string;
76
+ fal?: string;
77
+ };
78
+ export type EnvConfig = Record<string, string>;
79
+ export type LoggingLevel = "debug" | "info" | "warn" | "error";
80
+ export type LoggingFormat = "json" | "pretty";
56
81
  export type LoggingConfig = {
57
82
  enabled?: boolean;
58
83
  level?: LoggingLevel;
@@ -99,7 +124,7 @@ export type AutoRule = {
99
124
  export type ModelConfig = {
100
125
  id: string;
101
126
  } | {
102
- mode: 'auto';
127
+ mode: "auto";
103
128
  rules?: AutoRule[];
104
129
  } | {
105
130
  name: string;
@@ -164,7 +189,24 @@ export type SummarizeConfig = {
164
189
  google?: GoogleConfig;
165
190
  xai?: XaiConfig;
166
191
  logging?: LoggingConfig;
192
+ /**
193
+ * Generic environment variable defaults.
194
+ *
195
+ * Precedence: process env > config file env.
196
+ */
197
+ env?: EnvConfig;
198
+ /**
199
+ * Legacy API key shortcuts. Prefer `env` for new configs.
200
+ *
201
+ * Precedence: environment variables > config file apiKeys.
202
+ */
203
+ apiKeys?: ApiKeysConfig;
167
204
  };
205
+ export declare function resolveConfigEnv(config: SummarizeConfig | null | undefined): EnvConfig;
206
+ export declare function mergeConfigEnv({ env, config, }: {
207
+ env: Record<string, string | undefined>;
208
+ config: SummarizeConfig | null | undefined;
209
+ }): Record<string, string | undefined>;
168
210
  export declare function loadSummarizeConfig({ env }: {
169
211
  env: Record<string, string | undefined>;
170
212
  }): {
@@ -1,20 +1,22 @@
1
- import type { Message } from '@mariozechner/pi-ai';
1
+ import type { Message } from "@mariozechner/pi-ai";
2
2
  export type InputTarget = {
3
- kind: 'url';
3
+ kind: "url";
4
4
  url: string;
5
5
  } | {
6
- kind: 'file';
6
+ kind: "file";
7
7
  filePath: string;
8
+ } | {
9
+ kind: "stdin";
8
10
  };
9
11
  export type UrlKind = {
10
- kind: 'website';
12
+ kind: "website";
11
13
  } | {
12
- kind: 'asset';
14
+ kind: "asset";
13
15
  };
14
16
  export type AssetAttachment = {
15
17
  mediaType: string;
16
18
  filename: string | null;
17
- kind: 'image' | 'file';
19
+ kind: "image" | "file";
18
20
  bytes: Uint8Array;
19
21
  };
20
22
  export declare function resolveInputTarget(raw: string): InputTarget;
@@ -1 +1 @@
1
- export * from '@steipete/summarize-core/content';
1
+ export * from "@steipete/summarize-core/content";
@@ -1,11 +1,11 @@
1
- import type { LlmTokenUsage } from './llm/generate-text.js';
2
- export type LlmProvider = 'xai' | 'openai' | 'google' | 'anthropic' | 'zai' | 'cli';
1
+ import type { LlmTokenUsage } from "./llm/generate-text.js";
2
+ export type LlmProvider = "xai" | "openai" | "google" | "anthropic" | "zai" | "cli";
3
3
  export type LlmCall = {
4
4
  provider: LlmProvider;
5
5
  model: string;
6
6
  usage: LlmTokenUsage | null;
7
7
  costUsd?: number | null;
8
- purpose: 'summary' | 'markdown';
8
+ purpose: "summary" | "markdown";
9
9
  };
10
10
  export type RunMetricsReport = {
11
11
  llm: Array<{
@@ -1,4 +1,4 @@
1
- import type { AssistantMessage } from '@mariozechner/pi-ai';
1
+ import type { AssistantMessage } from "@mariozechner/pi-ai";
2
2
  export declare function buildAgentPromptHash(automationEnabled: boolean): string;
3
3
  export declare function streamAgentResponse({ env, pageUrl, pageTitle, pageContent, messages, modelOverride, tools, automationEnabled, onChunk, onAssistant, signal, }: {
4
4
  env: Record<string, string | undefined>;
@@ -1,8 +1,8 @@
1
- export type DaemonRequestedMode = 'auto' | 'page' | 'url';
1
+ export type DaemonRequestedMode = "auto" | "page" | "url";
2
2
  export declare function resolveAutoDaemonMode({ url, hasText }: {
3
3
  url: string;
4
4
  hasText: boolean;
5
5
  }): {
6
- primary: 'page' | 'url';
7
- fallback: 'page' | 'url' | null;
6
+ primary: "page" | "url";
7
+ fallback: "page" | "url" | null;
8
8
  };
@@ -1,4 +1,4 @@
1
- import type { Message } from '@mariozechner/pi-ai';
1
+ import type { Message } from "@mariozechner/pi-ai";
2
2
  type ChatSession = {
3
3
  id: string;
4
4
  lastMeta: {
@@ -22,6 +22,6 @@ export declare function streamChatResponse({ env, fetchImpl, session: _session,
22
22
  messages: Message[];
23
23
  modelOverride: string | null;
24
24
  pushToSession: (event: ChatEvent) => void;
25
- emitMeta: (patch: Partial<ChatSession['lastMeta']>) => void;
25
+ emitMeta: (patch: Partial<ChatSession["lastMeta"]>) => void;
26
26
  }): Promise<void>;
27
27
  export {};
@@ -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", "SUMMARIZE_TRANSCRIBER", "SUMMARIZE_ONNX_PARAKEET_CMD", "SUMMARIZE_ONNX_CANARY_CMD", "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,8 +1,8 @@
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 RunOverrides } from '../run/run-settings.js';
5
- import type { SlideImage, SlideSettings, SlideSourceKind } from '../slides/index.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";
6
6
  type TextSink = {
7
7
  writeChunk: (text: string) => void;
8
8
  };
@@ -16,14 +16,14 @@ export type DaemonUrlFlowContextArgs = {
16
16
  lengthRaw: unknown;
17
17
  languageRaw: unknown;
18
18
  maxExtractCharacters: number | null;
19
- format?: 'text' | 'markdown';
19
+ format?: "text" | "markdown";
20
20
  overrides?: RunOverrides | null;
21
21
  extractOnly?: boolean;
22
22
  slides?: SlideSettings | null;
23
23
  hooks?: {
24
24
  onModelChosen?: ((modelId: string) => void) | null;
25
25
  onExtracted?: ((extracted: ExtractedLinkContent) => void) | null;
26
- onSlidesExtracted?: ((slides: Awaited<ReturnType<typeof import('../slides/index.js').extractSlidesForSource>>) => void) | null;
26
+ onSlidesExtracted?: ((slides: Awaited<ReturnType<typeof import("../slides/index.js").extractSlidesForSource>>) => void) | null;
27
27
  onSlidesProgress?: ((text: string) => void) | null;
28
28
  onSlidesDone?: ((result: {
29
29
  ok: boolean;
@@ -15,6 +15,14 @@ export declare function buildLaunchAgentPlist({ label, programArguments, working
15
15
  stdoutPath: string;
16
16
  stderrPath: string;
17
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[];
18
26
  export declare function isLaunchAgentLoaded(): Promise<boolean>;
19
27
  export declare function uninstallLaunchAgent({ env, stdout, }: {
20
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
  }>;
@@ -1,7 +1,7 @@
1
- import type { ProcessObserver } from '@steipete/summarize-core/processes';
2
- type ProcessStatus = 'running' | 'exited' | 'error';
1
+ import type { ProcessObserver } from "@steipete/summarize-core/processes";
2
+ type ProcessStatus = "running" | "exited" | "error";
3
3
  type OutputLine = {
4
- stream: 'stdout' | 'stderr';
4
+ stream: "stdout" | "stderr";
5
5
  line: string;
6
6
  };
7
7
  type ProcessListItem = {
@@ -57,7 +57,7 @@ export declare class ProcessRegistry {
57
57
  }): ProcessListResult;
58
58
  getLogs(id: string, opts?: {
59
59
  tail?: number;
60
- stream?: 'stdout' | 'stderr' | 'merged';
60
+ stream?: "stdout" | "stderr" | "merged";
61
61
  }): ProcessLogResult | null;
62
62
  private register;
63
63
  private prune;
@@ -68,6 +68,6 @@ export declare function buildProcessListResult(registry: ProcessRegistry, opts?:
68
68
  }): ProcessListResult;
69
69
  export declare function buildProcessLogsResult(registry: ProcessRegistry, id: string, opts?: {
70
70
  tail?: number;
71
- stream?: 'stdout' | 'stderr' | 'merged';
71
+ stream?: "stdout" | "stderr" | "merged";
72
72
  }): ProcessLogResult | null;
73
73
  export {};
@@ -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,7 +1,7 @@
1
- import type { CacheState } from '../cache.js';
2
- import { type ExtractedLinkContent, type MediaCache } from '../content/index.js';
3
- import type { RunOverrides } from '../run/run-settings.js';
4
- import type { SlideExtractionResult, SlideImage, SlideSettings, SlideSourceKind } from '../slides/index.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";
5
5
  export type VisiblePageInput = {
6
6
  url: string;
7
7
  title: string | null;
@@ -37,7 +37,7 @@ export declare function streamSummaryForVisiblePage({ env, fetchImpl, input, mod
37
37
  promptOverride: string | null;
38
38
  lengthRaw: unknown;
39
39
  languageRaw: unknown;
40
- format?: 'text' | 'markdown';
40
+ format?: "text" | "markdown";
41
41
  sink: StreamSink;
42
42
  cache: CacheState;
43
43
  mediaCache: MediaCache | null;
@@ -54,7 +54,7 @@ export declare function streamSummaryForUrl({ env, fetchImpl, input, modelOverri
54
54
  promptOverride: string | null;
55
55
  lengthRaw: unknown;
56
56
  languageRaw: unknown;
57
- format?: 'text' | 'markdown';
57
+ format?: "text" | "markdown";
58
58
  sink: StreamSink;
59
59
  cache: CacheState;
60
60
  mediaCache: MediaCache | null;
@@ -90,7 +90,7 @@ export declare function extractContentForUrl({ env, fetchImpl, input, cache, med
90
90
  cache: CacheState;
91
91
  mediaCache: MediaCache | null;
92
92
  overrides: RunOverrides;
93
- format?: 'text' | 'markdown';
93
+ format?: "text" | "markdown";
94
94
  slides?: SlideSettings | null;
95
95
  hooks?: {
96
96
  onSlidesExtracted?: ((slides: SlideExtractionResult) => void) | null;
@@ -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;
@@ -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>;