@steipete/summarize 0.17.3 → 0.18.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 (476) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +21 -2
  3. package/completions/summarize.fish +162 -0
  4. package/dist/esm/application/api-status.js +31 -0
  5. package/dist/esm/application/api-status.js.map +1 -0
  6. package/dist/esm/application/cli-fallback-state.js.map +1 -0
  7. package/dist/esm/{run/run-config.js → application/config-state.js} +32 -23
  8. package/dist/esm/application/config-state.js.map +1 -0
  9. package/dist/esm/application/context.js +15 -0
  10. package/dist/esm/application/context.js.map +1 -0
  11. package/dist/esm/{run/run-env.js → application/environment-state.js} +2 -2
  12. package/dist/esm/application/environment-state.js.map +1 -0
  13. package/dist/esm/application/environment.js +65 -0
  14. package/dist/esm/application/environment.js.map +1 -0
  15. package/dist/esm/application/execute-summarize.js +592 -0
  16. package/dist/esm/application/execute-summarize.js.map +1 -0
  17. package/dist/esm/application/execution-resources.js +159 -0
  18. package/dist/esm/application/execution-resources.js.map +1 -0
  19. package/dist/esm/{run/runner-contexts.js → application/flow-contexts.js} +17 -55
  20. package/dist/esm/application/flow-contexts.js.map +1 -0
  21. package/dist/esm/application/input-acquisition.js +147 -0
  22. package/dist/esm/application/input-acquisition.js.map +1 -0
  23. package/dist/esm/{run/run-metrics.js → application/metrics.js} +3 -3
  24. package/dist/esm/{run/run-metrics.js.map → application/metrics.js.map} +1 -1
  25. package/dist/esm/application/model-attempts.js +52 -0
  26. package/dist/esm/application/model-attempts.js.map +1 -0
  27. package/dist/esm/application/model-catalog.js +34 -0
  28. package/dist/esm/application/model-catalog.js.map +1 -0
  29. package/dist/esm/application/model-runtime.js +77 -0
  30. package/dist/esm/application/model-runtime.js.map +1 -0
  31. package/dist/esm/{run/run-models.js → application/model-selection.js} +2 -2
  32. package/dist/esm/application/model-selection.js.map +1 -0
  33. package/dist/esm/{run/run-output.js → application/output-policy.js} +2 -2
  34. package/dist/esm/application/output-policy.js.map +1 -0
  35. package/dist/esm/application/provider-runtime.js +37 -0
  36. package/dist/esm/application/provider-runtime.js.map +1 -0
  37. package/dist/esm/application/run-spec.js +110 -0
  38. package/dist/esm/application/run-spec.js.map +1 -0
  39. package/dist/esm/{run/stdin-temp-file.js → application/stdin-input.js} +1 -1
  40. package/dist/esm/{run/stdin-temp-file.js.map → application/stdin-input.js.map} +1 -1
  41. package/dist/esm/application/summarize-contracts.js +2 -0
  42. package/dist/esm/application/summarize-contracts.js.map +1 -0
  43. package/dist/esm/application/url-result.js +18 -0
  44. package/dist/esm/application/url-result.js.map +1 -0
  45. package/dist/esm/application/url-runtime.js +86 -0
  46. package/dist/esm/application/url-runtime.js.map +1 -0
  47. package/dist/esm/cache.js +7 -3
  48. package/dist/esm/cache.js.map +1 -1
  49. package/dist/esm/cli-main.js +33 -5
  50. package/dist/esm/cli-main.js.map +1 -1
  51. package/dist/esm/config/sections.js +7 -1
  52. package/dist/esm/config/sections.js.map +1 -1
  53. package/dist/esm/content/asset.js +36 -19
  54. package/dist/esm/content/asset.js.map +1 -1
  55. package/dist/esm/daemon/agent-cache.js +72 -0
  56. package/dist/esm/daemon/agent-cache.js.map +1 -0
  57. package/dist/esm/daemon/agent-model.js +97 -155
  58. package/dist/esm/daemon/agent-model.js.map +1 -1
  59. package/dist/esm/daemon/agent.js +9 -1
  60. package/dist/esm/daemon/agent.js.map +1 -1
  61. package/dist/esm/daemon/chat.js +33 -228
  62. package/dist/esm/daemon/chat.js.map +1 -1
  63. package/dist/esm/daemon/model-discovery.js +50 -0
  64. package/dist/esm/daemon/model-discovery.js.map +1 -0
  65. package/dist/esm/daemon/models.js +123 -190
  66. package/dist/esm/daemon/models.js.map +1 -1
  67. package/dist/esm/daemon/server-agent-route.js +39 -8
  68. package/dist/esm/daemon/server-agent-route.js.map +1 -1
  69. package/dist/esm/daemon/server-auth.js +29 -0
  70. package/dist/esm/daemon/server-auth.js.map +1 -0
  71. package/dist/esm/daemon/server-event-channel.js +30 -0
  72. package/dist/esm/daemon/server-event-channel.js.map +1 -0
  73. package/dist/esm/daemon/server-refresh-route.js +65 -0
  74. package/dist/esm/daemon/server-refresh-route.js.map +1 -0
  75. package/dist/esm/daemon/server-runtime.js +139 -0
  76. package/dist/esm/daemon/server-runtime.js.map +1 -0
  77. package/dist/esm/daemon/server-session-routes.js +16 -13
  78. package/dist/esm/daemon/server-session-routes.js.map +1 -1
  79. package/dist/esm/daemon/server-session.js +16 -55
  80. package/dist/esm/daemon/server-session.js.map +1 -1
  81. package/dist/esm/daemon/server-sse.js +1 -1
  82. package/dist/esm/daemon/server-sse.js.map +1 -1
  83. package/dist/esm/daemon/server-summarize-events.js +235 -0
  84. package/dist/esm/daemon/server-summarize-events.js.map +1 -0
  85. package/dist/esm/daemon/server-summarize-execution.js +94 -264
  86. package/dist/esm/daemon/server-summarize-execution.js.map +1 -1
  87. package/dist/esm/daemon/server-summarize-request.js +1 -17
  88. package/dist/esm/daemon/server-summarize-request.js.map +1 -1
  89. package/dist/esm/daemon/server-summarize-route.js +191 -0
  90. package/dist/esm/daemon/server-summarize-route.js.map +1 -0
  91. package/dist/esm/daemon/server.js +54 -379
  92. package/dist/esm/daemon/server.js.map +1 -1
  93. package/dist/esm/daemon/summarize-presentation.js +74 -0
  94. package/dist/esm/daemon/summarize-presentation.js.map +1 -0
  95. package/dist/esm/daemon/url-fetch-guard.js +12 -226
  96. package/dist/esm/daemon/url-fetch-guard.js.map +1 -1
  97. package/dist/esm/engine/cli-model-id.js +21 -0
  98. package/dist/esm/engine/cli-model-id.js.map +1 -0
  99. package/dist/esm/engine/errors.js +20 -0
  100. package/dist/esm/engine/errors.js.map +1 -0
  101. package/dist/esm/engine/events.js +2 -0
  102. package/dist/esm/engine/events.js.map +1 -0
  103. package/dist/esm/engine/fetch-with-timeout.js.map +1 -0
  104. package/dist/esm/engine/fixed-model-attempt.js +41 -0
  105. package/dist/esm/engine/fixed-model-attempt.js.map +1 -0
  106. package/dist/esm/{run → engine}/model-attempts.js +4 -0
  107. package/dist/esm/engine/model-attempts.js.map +1 -0
  108. package/dist/esm/{run/summary-llm.js → engine/model-call.js} +1 -1
  109. package/dist/esm/engine/model-call.js.map +1 -0
  110. package/dist/esm/engine/model-executor.js +389 -0
  111. package/dist/esm/engine/model-executor.js.map +1 -0
  112. package/dist/esm/engine/model-meta.js +12 -0
  113. package/dist/esm/engine/model-meta.js.map +1 -0
  114. package/dist/esm/engine/openrouter.js.map +1 -0
  115. package/dist/esm/engine/provider-attempt.js +19 -0
  116. package/dist/esm/engine/provider-attempt.js.map +1 -0
  117. package/dist/esm/{run → engine}/streaming.js +1 -1
  118. package/dist/esm/engine/streaming.js.map +1 -0
  119. package/dist/esm/engine/summary-execution.js +152 -0
  120. package/dist/esm/engine/summary-execution.js.map +1 -0
  121. package/dist/esm/engine/summary-timestamps.js.map +1 -0
  122. package/dist/esm/{run → engine}/types.js.map +1 -1
  123. package/dist/esm/{run/flows/url/summary-prompt.js → engine/web-prompt.js} +5 -4
  124. package/dist/esm/engine/web-prompt.js.map +1 -0
  125. package/dist/esm/engine/web-summary.js +175 -0
  126. package/dist/esm/engine/web-summary.js.map +1 -0
  127. package/dist/esm/flags.js +10 -0
  128. package/dist/esm/flags.js.map +1 -1
  129. package/dist/esm/index.js +1 -1
  130. package/dist/esm/index.js.map +1 -1
  131. package/dist/esm/llm/cli-exec.js +36 -1
  132. package/dist/esm/llm/cli-exec.js.map +1 -1
  133. package/dist/esm/llm/cli.js +13 -2
  134. package/dist/esm/llm/cli.js.map +1 -1
  135. package/dist/esm/llm/generate-text-stream.js +58 -21
  136. package/dist/esm/llm/generate-text-stream.js.map +1 -1
  137. package/dist/esm/llm/generate-text-types.js +2 -0
  138. package/dist/esm/llm/generate-text-types.js.map +1 -0
  139. package/dist/esm/llm/generate-text.js +21 -88
  140. package/dist/esm/llm/generate-text.js.map +1 -1
  141. package/dist/esm/llm/openai-client-config.js +47 -0
  142. package/dist/esm/llm/openai-client-config.js.map +1 -0
  143. package/dist/esm/llm/provider-capabilities.js +1 -1
  144. package/dist/esm/llm/provider-capabilities.js.map +1 -1
  145. package/dist/esm/llm/provider-profile.js +139 -49
  146. package/dist/esm/llm/provider-profile.js.map +1 -1
  147. package/dist/esm/llm/providers/models.js +28 -0
  148. package/dist/esm/llm/providers/models.js.map +1 -1
  149. package/dist/esm/llm/providers/openai/chat-completions.js +100 -0
  150. package/dist/esm/llm/providers/openai/chat-completions.js.map +1 -0
  151. package/dist/esm/llm/providers/openai/github-models.js +30 -0
  152. package/dist/esm/llm/providers/openai/github-models.js.map +1 -0
  153. package/dist/esm/llm/providers/openai/request-options.js +42 -0
  154. package/dist/esm/llm/providers/openai/request-options.js.map +1 -0
  155. package/dist/esm/llm/providers/openai/responses.js +166 -0
  156. package/dist/esm/llm/providers/openai/responses.js.map +1 -0
  157. package/dist/esm/llm/providers/openai/sse.js +57 -0
  158. package/dist/esm/llm/providers/openai/sse.js.map +1 -0
  159. package/dist/esm/llm/providers/openai/transport.js +109 -0
  160. package/dist/esm/llm/providers/openai/transport.js.map +1 -0
  161. package/dist/esm/llm/providers/openai/types.js +2 -0
  162. package/dist/esm/llm/providers/openai/types.js.map +1 -0
  163. package/dist/esm/llm/providers/openai.js +8 -549
  164. package/dist/esm/llm/providers/openai.js.map +1 -1
  165. package/dist/esm/logging/daemon.js +9 -1
  166. package/dist/esm/logging/daemon.js.map +1 -1
  167. package/dist/esm/media-cache.js +151 -65
  168. package/dist/esm/media-cache.js.map +1 -1
  169. package/dist/esm/refresh-free/benchmark.js +267 -0
  170. package/dist/esm/refresh-free/benchmark.js.map +1 -0
  171. package/dist/esm/refresh-free/catalog.js +118 -0
  172. package/dist/esm/refresh-free/catalog.js.map +1 -0
  173. package/dist/esm/refresh-free/config.js +110 -0
  174. package/dist/esm/refresh-free/config.js.map +1 -0
  175. package/dist/esm/refresh-free/presentation.js +161 -0
  176. package/dist/esm/refresh-free/presentation.js.map +1 -0
  177. package/dist/esm/refresh-free.js +68 -623
  178. package/dist/esm/refresh-free.js.map +1 -1
  179. package/dist/esm/run/cli-input-progress.js +114 -0
  180. package/dist/esm/run/cli-input-progress.js.map +1 -0
  181. package/dist/esm/run/cli-preflight.js +5 -1
  182. package/dist/esm/run/cli-preflight.js.map +1 -1
  183. package/dist/esm/run/cli-summarize-command.js +285 -0
  184. package/dist/esm/run/cli-summarize-command.js.map +1 -0
  185. package/dist/esm/run/cli-summarize-execution.js +75 -0
  186. package/dist/esm/run/cli-summarize-execution.js.map +1 -0
  187. package/dist/esm/run/cli-summarize-output.js +85 -0
  188. package/dist/esm/run/cli-summarize-output.js.map +1 -0
  189. package/dist/esm/run/cli-summarize-request.js +79 -0
  190. package/dist/esm/run/cli-summarize-request.js.map +1 -0
  191. package/dist/esm/run/constants.js +0 -33
  192. package/dist/esm/run/constants.js.map +1 -1
  193. package/dist/esm/run/env.js +2 -84
  194. package/dist/esm/run/env.js.map +1 -1
  195. package/dist/esm/run/flows/asset/extract.js +8 -3
  196. package/dist/esm/run/flows/asset/extract.js.map +1 -1
  197. package/dist/esm/run/flows/asset/media.js +50 -40
  198. package/dist/esm/run/flows/asset/media.js.map +1 -1
  199. package/dist/esm/run/flows/asset/output.js +8 -19
  200. package/dist/esm/run/flows/asset/output.js.map +1 -1
  201. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  202. package/dist/esm/run/flows/asset/summary-attempts.js +19 -71
  203. package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -1
  204. package/dist/esm/run/flows/asset/summary.js +189 -391
  205. package/dist/esm/run/flows/asset/summary.js.map +1 -1
  206. package/dist/esm/run/flows/asset/types.js +2 -0
  207. package/dist/esm/run/flows/asset/types.js.map +1 -0
  208. package/dist/esm/run/flows/url/extraction-session.js +1 -0
  209. package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
  210. package/dist/esm/run/flows/url/fetch-options.js +3 -0
  211. package/dist/esm/run/flows/url/fetch-options.js.map +1 -1
  212. package/dist/esm/run/flows/url/flow.js +23 -20
  213. package/dist/esm/run/flows/url/flow.js.map +1 -1
  214. package/dist/esm/run/flows/url/markdown.js +54 -201
  215. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  216. package/dist/esm/run/flows/url/slides-output-render.js +1 -1
  217. package/dist/esm/run/flows/url/slides-output-render.js.map +1 -1
  218. package/dist/esm/run/flows/url/slides-output-stream.js +32 -11
  219. package/dist/esm/run/flows/url/slides-output-stream.js.map +1 -1
  220. package/dist/esm/run/flows/url/slides-output.js.map +1 -1
  221. package/dist/esm/run/flows/url/slides-session.js +1 -1
  222. package/dist/esm/run/flows/url/slides-session.js.map +1 -1
  223. package/dist/esm/run/flows/url/summary-finish.js +1 -11
  224. package/dist/esm/run/flows/url/summary-finish.js.map +1 -1
  225. package/dist/esm/run/flows/url/summary-json.js +2 -11
  226. package/dist/esm/run/flows/url/summary-json.js.map +1 -1
  227. package/dist/esm/run/flows/url/summary.js +36 -33
  228. package/dist/esm/run/flows/url/summary.js.map +1 -1
  229. package/dist/esm/run/flows/url/types.js.map +1 -1
  230. package/dist/esm/run/flows/url/video-only.js +14 -9
  231. package/dist/esm/run/flows/url/video-only.js.map +1 -1
  232. package/dist/esm/run/format.js +1 -3
  233. package/dist/esm/run/format.js.map +1 -1
  234. package/dist/esm/run/help.js +18 -1
  235. package/dist/esm/run/help.js.map +1 -1
  236. package/dist/esm/run/run-input.js +1 -1
  237. package/dist/esm/run/run-input.js.map +1 -1
  238. package/dist/esm/run/run-settings.js +23 -3
  239. package/dist/esm/run/run-settings.js.map +1 -1
  240. package/dist/esm/run/runner-flags.js +2 -0
  241. package/dist/esm/run/runner-flags.js.map +1 -1
  242. package/dist/esm/run/runner.js +6 -9
  243. package/dist/esm/run/runner.js.map +1 -1
  244. package/dist/esm/run/slides-cli.js +1 -1
  245. package/dist/esm/run/slides-cli.js.map +1 -1
  246. package/dist/esm/run/status-cli.js +339 -0
  247. package/dist/esm/run/status-cli.js.map +1 -0
  248. package/dist/esm/run/stream-output.js +22 -7
  249. package/dist/esm/run/stream-output.js.map +1 -1
  250. package/dist/esm/run/summary-stream.js +70 -0
  251. package/dist/esm/run/summary-stream.js.map +1 -0
  252. package/dist/esm/shared/format-count.js +19 -0
  253. package/dist/esm/shared/format-count.js.map +1 -0
  254. package/dist/esm/shared/run-api-status.js +12 -0
  255. package/dist/esm/shared/run-api-status.js.map +1 -0
  256. package/dist/esm/shared/summary-length.js +4 -0
  257. package/dist/esm/shared/summary-length.js.map +1 -0
  258. package/dist/esm/slides/extract.js +2 -1
  259. package/dist/esm/slides/extract.js.map +1 -1
  260. package/dist/esm/slides/frame-extraction.js +2 -2
  261. package/dist/esm/slides/frame-extraction.js.map +1 -1
  262. package/dist/esm/slides/settings.js +1 -1
  263. package/dist/esm/slides/settings.js.map +1 -1
  264. package/dist/esm/tty/format.js +1 -18
  265. package/dist/esm/tty/format.js.map +1 -1
  266. package/dist/esm/version.js +1 -1
  267. package/dist/types/application/api-status.d.ts +3 -0
  268. package/dist/types/{run/run-config.d.ts → application/config-state.d.ts} +18 -7
  269. package/dist/types/application/context.d.ts +8 -0
  270. package/dist/types/application/environment.d.ts +7 -0
  271. package/dist/types/application/execute-summarize.d.ts +3 -0
  272. package/dist/types/application/execution-resources.d.ts +65 -0
  273. package/dist/types/application/flow-contexts.d.ts +20 -0
  274. package/dist/types/application/input-acquisition.d.ts +46 -0
  275. package/dist/types/application/model-attempts.d.ts +36 -0
  276. package/dist/types/application/model-catalog.d.ts +4 -0
  277. package/dist/types/application/model-runtime.d.ts +63 -0
  278. package/dist/types/application/provider-runtime.d.ts +12 -0
  279. package/dist/types/application/run-spec.d.ts +49 -0
  280. package/dist/types/application/summarize-contracts.d.ts +201 -0
  281. package/dist/types/application/url-result.d.ts +36 -0
  282. package/dist/types/application/url-runtime.d.ts +18 -0
  283. package/dist/types/cache.d.ts +2 -2
  284. package/dist/types/cli-main.d.ts +1 -0
  285. package/dist/types/config/sections.d.ts +3 -2
  286. package/dist/types/config/types.d.ts +2 -0
  287. package/dist/types/content/asset.d.ts +3 -0
  288. package/dist/types/daemon/agent-cache.d.ts +21 -0
  289. package/dist/types/daemon/agent-model.d.ts +14 -2
  290. package/dist/types/daemon/agent.d.ts +2 -1
  291. package/dist/types/daemon/model-discovery.d.ts +9 -0
  292. package/dist/types/daemon/models.d.ts +22 -20
  293. package/dist/types/daemon/server-agent-route.d.ts +3 -1
  294. package/dist/types/daemon/server-auth.d.ts +11 -0
  295. package/dist/types/daemon/server-event-channel.d.ts +14 -0
  296. package/dist/types/daemon/server-refresh-route.d.ts +15 -0
  297. package/dist/types/daemon/server-runtime.d.ts +34 -0
  298. package/dist/types/daemon/server-session.d.ts +4 -16
  299. package/dist/types/daemon/server-sse.d.ts +1 -1
  300. package/dist/types/daemon/server-summarize-events.d.ts +54 -0
  301. package/dist/types/daemon/server-summarize-execution.d.ts +8 -18
  302. package/dist/types/daemon/server-summarize-request.d.ts +2 -2
  303. package/dist/types/daemon/server-summarize-route.d.ts +24 -0
  304. package/dist/types/daemon/server.d.ts +3 -8
  305. package/dist/types/daemon/summarize-presentation.d.ts +11 -0
  306. package/dist/types/daemon/url-fetch-guard.d.ts +4 -10
  307. package/dist/types/engine/cli-model-id.d.ts +5 -0
  308. package/dist/types/engine/errors.d.ts +6 -0
  309. package/dist/types/engine/events.d.ts +10 -0
  310. package/dist/types/engine/fixed-model-attempt.d.ts +3 -0
  311. package/dist/types/{run/summary-engine.d.ts → engine/model-executor.d.ts} +12 -64
  312. package/dist/types/engine/model-meta.d.ts +8 -0
  313. package/dist/types/engine/provider-attempt.d.ts +6 -0
  314. package/dist/types/{run → engine}/streaming.d.ts +1 -1
  315. package/dist/types/engine/summary-execution.d.ts +46 -0
  316. package/dist/types/{run/flows/url → engine}/summary-timestamps.d.ts +1 -1
  317. package/dist/types/{run → engine}/types.d.ts +5 -9
  318. package/dist/types/{run/flows/url/summary-prompt.d.ts → engine/web-prompt.d.ts} +8 -8
  319. package/dist/types/engine/web-summary.d.ts +82 -0
  320. package/dist/types/flags.d.ts +3 -1
  321. package/dist/types/index.d.ts +2 -2
  322. package/dist/types/llm/cli-exec.d.ts +2 -1
  323. package/dist/types/llm/cli.d.ts +2 -1
  324. package/dist/types/llm/generate-text-stream.d.ts +2 -1
  325. package/dist/types/llm/generate-text-types.d.ts +7 -0
  326. package/dist/types/llm/generate-text.d.ts +3 -7
  327. package/dist/types/llm/openai-client-config.d.ts +13 -0
  328. package/dist/types/llm/provider-capabilities.d.ts +2 -2
  329. package/dist/types/llm/provider-profile.d.ts +37 -1
  330. package/dist/types/llm/providers/models.d.ts +6 -0
  331. package/dist/types/llm/providers/openai/chat-completions.d.ts +3 -0
  332. package/dist/types/llm/providers/openai/github-models.d.ts +2 -0
  333. package/dist/types/llm/providers/openai/request-options.d.ts +5 -0
  334. package/dist/types/llm/providers/openai/responses.d.ts +21 -0
  335. package/dist/types/llm/providers/openai/sse.d.ts +6 -0
  336. package/dist/types/llm/providers/openai/transport.d.ts +23 -0
  337. package/dist/types/llm/providers/openai/types.d.ts +26 -0
  338. package/dist/types/llm/providers/openai.d.ts +4 -42
  339. package/dist/types/refresh-free/benchmark.d.ts +68 -0
  340. package/dist/types/refresh-free/catalog.d.ts +25 -0
  341. package/dist/types/refresh-free/config.d.ts +6 -0
  342. package/dist/types/refresh-free/presentation.d.ts +55 -0
  343. package/dist/types/run/cli-input-progress.d.ts +13 -0
  344. package/dist/types/run/{runner-plan.d.ts → cli-summarize-command.d.ts} +2 -7
  345. package/dist/types/run/cli-summarize-execution.d.ts +13 -0
  346. package/dist/types/run/cli-summarize-output.d.ts +8 -0
  347. package/dist/types/run/cli-summarize-request.d.ts +30 -0
  348. package/dist/types/run/constants.d.ts +0 -4
  349. package/dist/types/run/env.d.ts +2 -13
  350. package/dist/types/run/flows/asset/extract.d.ts +2 -1
  351. package/dist/types/run/flows/asset/media.d.ts +13 -2
  352. package/dist/types/run/flows/asset/output.d.ts +10 -16
  353. package/dist/types/run/flows/asset/preprocess.d.ts +1 -1
  354. package/dist/types/run/flows/asset/summary-attempts.d.ts +3 -3
  355. package/dist/types/run/flows/asset/summary.d.ts +4 -119
  356. package/dist/types/run/flows/asset/types.d.ts +121 -0
  357. package/dist/types/run/flows/url/fetch-options.d.ts +1 -0
  358. package/dist/types/run/flows/url/flow.d.ts +26 -2
  359. package/dist/types/run/flows/url/markdown.d.ts +3 -9
  360. package/dist/types/run/flows/url/slides-output-state.d.ts +1 -1
  361. package/dist/types/run/flows/url/slides-output-stream.d.ts +1 -1
  362. package/dist/types/run/flows/url/slides-output.d.ts +2 -2
  363. package/dist/types/run/flows/url/summary-finish.d.ts +1 -8
  364. package/dist/types/run/flows/url/summary-json.d.ts +3 -18
  365. package/dist/types/run/flows/url/summary.d.ts +13 -13
  366. package/dist/types/run/flows/url/types.d.ts +8 -66
  367. package/dist/types/run/flows/url/video-only.d.ts +4 -0
  368. package/dist/types/run/format.d.ts +1 -8
  369. package/dist/types/run/help.d.ts +1 -0
  370. package/dist/types/run/run-settings.d.ts +5 -2
  371. package/dist/types/run/runner-flags.d.ts +1 -0
  372. package/dist/types/run/status-cli.d.ts +41 -0
  373. package/dist/types/run/stream-output.d.ts +3 -2
  374. package/dist/types/run/summary-stream.d.ts +11 -0
  375. package/dist/types/shared/format-count.d.ts +1 -0
  376. package/dist/types/shared/run-api-status.d.ts +44 -0
  377. package/dist/types/shared/summary-length.d.ts +9 -0
  378. package/dist/types/tty/format.d.ts +1 -1
  379. package/dist/types/version.d.ts +1 -1
  380. package/docs/README.md +1 -0
  381. package/docs/cli.md +7 -2
  382. package/docs/commands/summarize.md +1 -1
  383. package/docs/config.md +24 -3
  384. package/docs/engine.md +109 -0
  385. package/docs/index.md +1 -1
  386. package/docs/llm.md +2 -2
  387. package/docs/quickstart.md +1 -1
  388. package/docs/website.md +3 -0
  389. package/package.json +6 -5
  390. package/dist/esm/daemon/flow-context.js +0 -355
  391. package/dist/esm/daemon/flow-context.js.map +0 -1
  392. package/dist/esm/daemon/summarize.js +0 -314
  393. package/dist/esm/daemon/summarize.js.map +0 -1
  394. package/dist/esm/run/cli-fallback-state.js.map +0 -1
  395. package/dist/esm/run/fetch-with-timeout.js.map +0 -1
  396. package/dist/esm/run/flows/asset/input.js +0 -312
  397. package/dist/esm/run/flows/asset/input.js.map +0 -1
  398. package/dist/esm/run/flows/url/slides-text-markdown.js +0 -550
  399. package/dist/esm/run/flows/url/slides-text-markdown.js.map +0 -1
  400. package/dist/esm/run/flows/url/slides-text-transcript.js +0 -208
  401. package/dist/esm/run/flows/url/slides-text-transcript.js.map +0 -1
  402. package/dist/esm/run/flows/url/slides-text-types.js +0 -2
  403. package/dist/esm/run/flows/url/slides-text-types.js.map +0 -1
  404. package/dist/esm/run/flows/url/slides-text.js +0 -3
  405. package/dist/esm/run/flows/url/slides-text.js.map +0 -1
  406. package/dist/esm/run/flows/url/summary-prompt.js.map +0 -1
  407. package/dist/esm/run/flows/url/summary-resolution.js +0 -349
  408. package/dist/esm/run/flows/url/summary-resolution.js.map +0 -1
  409. package/dist/esm/run/flows/url/summary-timestamps.js.map +0 -1
  410. package/dist/esm/run/model-attempts.js.map +0 -1
  411. package/dist/esm/run/openrouter.js.map +0 -1
  412. package/dist/esm/run/run-config.js.map +0 -1
  413. package/dist/esm/run/run-context.js +0 -19
  414. package/dist/esm/run/run-context.js.map +0 -1
  415. package/dist/esm/run/run-env.js.map +0 -1
  416. package/dist/esm/run/run-models.js.map +0 -1
  417. package/dist/esm/run/run-output.js.map +0 -1
  418. package/dist/esm/run/runner-contexts.js.map +0 -1
  419. package/dist/esm/run/runner-execution.js +0 -164
  420. package/dist/esm/run/runner-execution.js.map +0 -1
  421. package/dist/esm/run/runner-plan.js +0 -419
  422. package/dist/esm/run/runner-plan.js.map +0 -1
  423. package/dist/esm/run/streaming.js.map +0 -1
  424. package/dist/esm/run/summary-engine.js +0 -536
  425. package/dist/esm/run/summary-engine.js.map +0 -1
  426. package/dist/esm/run/summary-llm.js.map +0 -1
  427. package/dist/esm/shared/cache-store.js +0 -68
  428. package/dist/esm/shared/cache-store.js.map +0 -1
  429. package/dist/esm/shared/contracts.js +0 -2
  430. package/dist/esm/shared/contracts.js.map +0 -1
  431. package/dist/esm/shared/dns-pinned-fetch.js +0 -93
  432. package/dist/esm/shared/dns-pinned-fetch.js.map +0 -1
  433. package/dist/esm/shared/fetch-capabilities.js +0 -37
  434. package/dist/esm/shared/fetch-capabilities.js.map +0 -1
  435. package/dist/esm/shared/slides-presentation.js +0 -226
  436. package/dist/esm/shared/slides-presentation.js.map +0 -1
  437. package/dist/esm/shared/slides-text.js +0 -2
  438. package/dist/esm/shared/slides-text.js.map +0 -1
  439. package/dist/esm/shared/sse-events.js +0 -26
  440. package/dist/esm/shared/sse-events.js.map +0 -1
  441. package/dist/esm/shared/streaming-merge.js +0 -44
  442. package/dist/esm/shared/streaming-merge.js.map +0 -1
  443. package/dist/types/daemon/flow-context.d.ts +0 -50
  444. package/dist/types/daemon/summarize.d.ts +0 -104
  445. package/dist/types/run/flows/asset/input.d.ts +0 -34
  446. package/dist/types/run/flows/url/slides-text-markdown.d.ts +0 -47
  447. package/dist/types/run/flows/url/slides-text-transcript.d.ts +0 -36
  448. package/dist/types/run/flows/url/slides-text-types.d.ts +0 -8
  449. package/dist/types/run/flows/url/slides-text.d.ts +0 -3
  450. package/dist/types/run/flows/url/summary-resolution.d.ts +0 -31
  451. package/dist/types/run/run-context.d.ts +0 -57
  452. package/dist/types/run/runner-contexts.d.ts +0 -39
  453. package/dist/types/run/runner-execution.d.ts +0 -59
  454. package/dist/types/shared/cache-store.d.ts +0 -34
  455. package/dist/types/shared/contracts.d.ts +0 -2
  456. package/dist/types/shared/dns-pinned-fetch.d.ts +0 -1
  457. package/dist/types/shared/fetch-capabilities.d.ts +0 -10
  458. package/dist/types/shared/slides-presentation.d.ts +0 -45
  459. package/dist/types/shared/slides-text.d.ts +0 -1
  460. package/dist/types/shared/sse-events.d.ts +0 -66
  461. package/dist/types/shared/streaming-merge.d.ts +0 -4
  462. /package/dist/esm/{run → application}/cli-fallback-state.js +0 -0
  463. /package/dist/esm/{run → engine}/fetch-with-timeout.js +0 -0
  464. /package/dist/esm/{run → engine}/openrouter.js +0 -0
  465. /package/dist/esm/{run/flows/url → engine}/summary-timestamps.js +0 -0
  466. /package/dist/esm/{run → engine}/types.js +0 -0
  467. /package/dist/types/{run → application}/cli-fallback-state.d.ts +0 -0
  468. /package/dist/types/{run/run-env.d.ts → application/environment-state.d.ts} +0 -0
  469. /package/dist/types/{run/run-metrics.d.ts → application/metrics.d.ts} +0 -0
  470. /package/dist/types/{run/run-models.d.ts → application/model-selection.d.ts} +0 -0
  471. /package/dist/types/{run/run-output.d.ts → application/output-policy.d.ts} +0 -0
  472. /package/dist/types/{run/stdin-temp-file.d.ts → application/stdin-input.d.ts} +0 -0
  473. /package/dist/types/{run → engine}/fetch-with-timeout.d.ts +0 -0
  474. /package/dist/types/{run → engine}/model-attempts.d.ts +0 -0
  475. /package/dist/types/{run/summary-llm.d.ts → engine/model-call.d.ts} +0 -0
  476. /package/dist/types/{run → engine}/openrouter.d.ts +0 -0
@@ -1,17 +1,9 @@
1
+ import { type UrlSummaryPresentationResolution } from "../../../application/url-result.js";
1
2
  import type { ExtractedLinkContent } from "../../../content/index.js";
3
+ import { type UrlSummaryResolution } from "../../../engine/web-summary.js";
2
4
  import type { UrlExtractionUi } from "./extract.js";
3
5
  import type { SlidesTerminalOutput } from "./slides-output.js";
4
6
  import type { UrlFlowContext } from "./types.js";
5
- type SlidesResult = Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>>;
6
- export declare function buildUrlPrompt({ extracted, outputLanguage, lengthArg, promptOverride, lengthInstruction, languageInstruction, slides, }: {
7
- extracted: ExtractedLinkContent;
8
- outputLanguage: UrlFlowContext["flags"]["outputLanguage"];
9
- lengthArg: UrlFlowContext["flags"]["lengthArg"];
10
- promptOverride?: string | null;
11
- lengthInstruction?: string | null;
12
- languageInstruction?: string | null;
13
- slides?: SlidesResult | null;
14
- }): string;
15
7
  export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, slides, slidesOutput, }: {
16
8
  ctx: UrlFlowContext;
17
9
  url: string;
@@ -23,7 +15,16 @@ export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi,
23
15
  slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
24
16
  slidesOutput?: SlidesTerminalOutput | null;
25
17
  }): Promise<void>;
26
- export declare function summarizeExtractedUrl({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, onModelChosen, slides, slidesOutput, }: {
18
+ export declare function executeExtractedUrlSummary({ ctx, url, extracted, prompt, onModelChosen, slides, slidesOutput, }: {
19
+ ctx: UrlFlowContext;
20
+ url: string;
21
+ extracted: ExtractedLinkContent;
22
+ prompt: string;
23
+ onModelChosen?: ((modelId: string) => void) | null;
24
+ slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
25
+ slidesOutput?: SlidesTerminalOutput | null;
26
+ }): Promise<UrlSummaryResolution>;
27
+ export declare function presentExtractedUrlSummary({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, resolution, slides, slidesOutput, }: {
27
28
  ctx: UrlFlowContext;
28
29
  url: string;
29
30
  extracted: ExtractedLinkContent;
@@ -31,8 +32,7 @@ export declare function summarizeExtractedUrl({ ctx, url, extracted, extractionU
31
32
  prompt: string;
32
33
  effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
33
34
  transcriptionCostLabel: string | null;
34
- onModelChosen?: ((modelId: string) => void) | null;
35
+ resolution: UrlSummaryPresentationResolution | UrlSummaryResolution;
35
36
  slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
36
37
  slidesOutput?: SlidesTerminalOutput | null;
37
38
  }): Promise<void>;
38
- export {};
@@ -1,18 +1,15 @@
1
+ import type { SummaryLength } from "@steipete/summarize-core";
2
+ import type { ExecutableRunModel } from "../../../application/model-runtime.js";
1
3
  import type { CacheState } from "../../../cache.js";
2
- import type { CliProvider, SummarizeConfig } from "../../../config.js";
3
4
  import type { ExtractedLinkContent, LinkPreviewProgressEvent, MediaCache } from "../../../content/index.js";
4
- import type { LlmCall, RunMetricsReport } from "../../../costs.js";
5
+ import type { RunMetricsReport } from "../../../costs.js";
5
6
  import type { StreamMode } from "../../../flags.js";
6
7
  import type { OutputLanguage } from "../../../language.js";
7
- import type { ModelRequestOptions, OpenAiReasoningEffort } from "../../../llm/model-options.js";
8
8
  import type { ExecFileFn } from "../../../markitdown.js";
9
- import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
10
- import type { SummaryLength } from "../../../shared/contracts.js";
11
9
  import type { SlideExtractionResult, SlideImage, SlideSettings, SlideSourceKind } from "../../../slides/index.js";
12
10
  import type { SpeakerIdentificationSettings } from "../../../speaker-identification/index.js";
13
11
  import type { PerfTrace } from "../../perf-trace.js";
14
- import type { createSummaryEngine } from "../../summary-engine.js";
15
- import type { SummarizeAssetArgs } from "../asset/summary.js";
12
+ import type { AssetSummaryResult, SummarizeAssetArgs } from "../asset/types.js";
16
13
  export type UrlFlowIo = {
17
14
  env: Record<string, string | undefined>;
18
15
  envForRun: Record<string, string | undefined>;
@@ -32,6 +29,7 @@ export type UrlFlowFlags = {
32
29
  youtubeMode: "auto" | "web" | "yt-dlp" | "apify" | "no-auto";
33
30
  firecrawlMode: "off" | "auto" | "always";
34
31
  videoMode: "auto" | "transcript" | "understand";
32
+ embeddedVideoMode: "auto" | "off" | "prefer" | "both";
35
33
  transcriptTimestamps: boolean;
36
34
  transcriptDiarization: "auto" | "elevenlabs" | "openai" | null;
37
35
  speakerIdentification: SpeakerIdentificationSettings | null;
@@ -68,63 +66,7 @@ export type UrlFlowFlags = {
68
66
  slidesOutput?: boolean;
69
67
  throwOnAssetLikeHtmlError?: boolean;
70
68
  };
71
- export type UrlFlowModel = {
72
- requestedModel: RequestedModel;
73
- requestedModelInput: string;
74
- requestedModelLabel: string;
75
- fixedModelSpec: FixedModelSpec | null;
76
- isFallbackModel: boolean;
77
- isImplicitAutoSelection: boolean;
78
- allowAutoCliFallback: boolean;
79
- isNamedModelSelection: boolean;
80
- wantsFreeNamedModel: boolean;
81
- desiredOutputTokens: number | null;
82
- configForModelSelection: SummarizeConfig | null;
83
- envForAuto: Record<string, string | undefined>;
84
- cliAvailability: Partial<Record<CliProvider, boolean>>;
85
- openaiUseChatCompletions: boolean | undefined;
86
- openaiRequestOptions?: ModelRequestOptions;
87
- openaiRequestOptionsOverride?: ModelRequestOptions;
88
- cliReasoningEffortOverride?: OpenAiReasoningEffort;
89
- openaiWhisperUsdPerMinute: number;
90
- apiStatus: {
91
- xaiApiKey: string | null;
92
- apiKey: string | null;
93
- nvidiaApiKey: string | null;
94
- minimaxApiKey: string | null;
95
- openrouterApiKey: string | null;
96
- openrouterConfigured: boolean;
97
- googleApiKey: string | null;
98
- googleConfigured: boolean;
99
- anthropicApiKey: string | null;
100
- anthropicConfigured: boolean;
101
- providerBaseUrls: {
102
- openai: string | null;
103
- nvidia: string | null;
104
- anthropic: string | null;
105
- google: string | null;
106
- xai: string | null;
107
- };
108
- zaiApiKey: string | null;
109
- zaiBaseUrl: string;
110
- nvidiaBaseUrl: string;
111
- minimaxBaseUrl: string;
112
- ollamaBaseUrl: string;
113
- firecrawlConfigured: boolean;
114
- firecrawlApiKey: string | null;
115
- apifyToken: string | null;
116
- ytDlpPath: string | null;
117
- ytDlpCookiesFromBrowser: string | null;
118
- falApiKey: string | null;
119
- groqApiKey: string | null;
120
- assemblyaiApiKey: string | null;
121
- elevenlabsApiKey: string | null;
122
- openaiApiKey: string | null;
123
- };
124
- summaryEngine: ReturnType<typeof createSummaryEngine>;
125
- getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import("../../../pricing/litellm.js").loadLiteLlmCatalog>>["catalog"]>;
126
- llmCalls: LlmCall[];
127
- };
69
+ export type UrlFlowModel = ExecutableRunModel;
128
70
  export type UrlFlowHooks = {
129
71
  onModelChosen?: ((modelId: string) => void) | null;
130
72
  onExtracted?: ((extracted: ExtractedLinkContent) => void) | null;
@@ -147,7 +89,7 @@ export type UrlFlowHooks = {
147
89
  onLinkPreviewProgress?: ((event: LinkPreviewProgressEvent) => void) | null;
148
90
  onSummaryCached?: ((cached: boolean) => void) | null;
149
91
  setTranscriptionCost: (costUsd: number | null, label: string | null) => void;
150
- summarizeAsset: (args: SummarizeAssetArgs) => Promise<void>;
92
+ summarizeAsset: (args: SummarizeAssetArgs) => Promise<AssetSummaryResult>;
151
93
  writeViaFooter: (parts: string[]) => void;
152
94
  clearProgressForStdout: () => void;
153
95
  restoreProgressAfterStdout?: (() => void) | null;
@@ -174,7 +116,7 @@ export declare function createUrlFlowContext(options: {
174
116
  eventHooks?: Partial<UrlFlowEventHooks>;
175
117
  }): UrlFlowContext;
176
118
  /**
177
- * Wiring struct for `runUrlFlow`.
119
+ * Wiring struct for `executeUrlFlow`.
178
120
  * CLI runner populates the full surface; daemon uses a smaller subset (no TTY/progress/footer),
179
121
  * but both share the same extraction/cache/model logic.
180
122
  */
@@ -1,9 +1,13 @@
1
1
  import { type ExtractedLinkContent } from "../../../content/index.js";
2
2
  import type { SlideExtractionResult } from "../../../slides/index.js";
3
+ import type { AssetSummaryResult } from "../asset/types.js";
3
4
  import { type UrlExtractionUi } from "./extract.js";
4
5
  import type { UrlFlowContext } from "./types.js";
5
6
  export type VideoOnlyResult = {
6
7
  handled: true;
8
+ extracted: ExtractedLinkContent;
9
+ slides: SlideExtractionResult | null;
10
+ summary: AssetSummaryResult;
7
11
  } | {
8
12
  handled: false;
9
13
  extracted: ExtractedLinkContent;
@@ -1,4 +1,4 @@
1
- import type { SummaryLength } from "../shared/contracts.js";
1
+ export { resolveTargetCharacters } from "../shared/summary-length.js";
2
2
  export declare function formatOptionalString(value: string | null | undefined): string;
3
3
  export declare function formatOptionalNumber(value: number | null | undefined): string;
4
4
  export declare function sumNumbersOrNull(values: Array<number | null>): number | null;
@@ -9,10 +9,3 @@ export declare function estimateWhisperTranscriptionCostUsd({ transcriptionProvi
9
9
  mediaDurationSeconds: number | null;
10
10
  openaiWhisperUsdPerMinute: number;
11
11
  }): number | null;
12
- export declare function resolveTargetCharacters(lengthArg: {
13
- kind: "preset";
14
- preset: SummaryLength;
15
- } | {
16
- kind: "chars";
17
- maxCharacters: number;
18
- }, maxMap: Record<SummaryLength, number>): number;
@@ -5,5 +5,6 @@ export declare function buildSlidesProgram(): Command;
5
5
  export declare function attachRichHelp(program: Command, env: Record<string, string | undefined>, stdout: NodeJS.WritableStream): void;
6
6
  export declare function buildConciseHelp(): string;
7
7
  export declare function buildRefreshFreeHelp(): string;
8
+ export declare function buildStatusHelp(): string;
8
9
  export declare function buildDaemonHelp(): string;
9
10
  export declare function buildTranscriberHelp(): string;
@@ -1,5 +1,5 @@
1
1
  import type { CliProvider } from "../config.js";
2
- import type { DiarizationMode, FirecrawlMode, LengthArg, MarkdownMode, PreprocessMode, VideoMode, YoutubeMode } from "../flags.js";
2
+ import type { DiarizationMode, EmbeddedVideoMode, FirecrawlMode, LengthArg, MarkdownMode, PreprocessMode, VideoMode, YoutubeMode } from "../flags.js";
3
3
  import type { OutputLanguage } from "../language.js";
4
4
  import { type SummaryLengthTarget } from "../prompts/index.js";
5
5
  export type ResolvedRunSettings = {
@@ -18,6 +18,7 @@ export type RunOverrides = {
18
18
  preprocessMode: PreprocessMode | null;
19
19
  youtubeMode: YoutubeMode | null;
20
20
  videoMode: VideoMode | null;
21
+ embeddedVideoMode: EmbeddedVideoMode | null;
21
22
  transcriptTimestamps: boolean | null;
22
23
  transcriptDiarization: DiarizationMode | null;
23
24
  forceSummary: boolean | null;
@@ -34,6 +35,7 @@ export type RunOverridesInput = {
34
35
  preprocess?: unknown;
35
36
  youtube?: unknown;
36
37
  videoMode?: unknown;
38
+ embeddedVideo?: unknown;
37
39
  timestamps?: unknown;
38
40
  diarize?: unknown;
39
41
  forceSummary?: unknown;
@@ -48,6 +50,7 @@ export type RunOverridesInput = {
48
50
  magicCliOrder?: unknown;
49
51
  magicCliRememberLastSuccess?: unknown;
50
52
  };
53
+ export declare function createEmptyRunOverrides(): RunOverrides;
51
54
  export declare function resolveSummaryLength(raw: unknown, fallback?: string): {
52
55
  lengthArg: LengthArg;
53
56
  summaryLength: SummaryLengthTarget;
@@ -69,6 +72,6 @@ export declare function resolveCliRunSettings({ length, firecrawl, markdownMode,
69
72
  retries: string;
70
73
  maxOutputTokens?: string | undefined;
71
74
  }): ResolvedRunSettings;
72
- export declare function resolveRunOverrides({ firecrawl, markdownMode, preprocess, youtube, videoMode, timestamps, diarize, forceSummary, timeout, retries, maxOutputTokens, transcriber, autoCliFallback, autoCliOrder, autoCliRememberLastSuccess, magicCliAuto, magicCliOrder, magicCliRememberLastSuccess, }: RunOverridesInput, options?: {
75
+ export declare function resolveRunOverrides({ firecrawl, markdownMode, preprocess, youtube, videoMode, embeddedVideo, timestamps, diarize, forceSummary, timeout, retries, maxOutputTokens, transcriber, autoCliFallback, autoCliOrder, autoCliRememberLastSuccess, magicCliAuto, magicCliOrder, magicCliRememberLastSuccess, }: RunOverridesInput, options?: {
73
76
  strict?: boolean;
74
77
  }): RunOverrides;
@@ -2,6 +2,7 @@ import { type FirecrawlMode, type DiarizationMode, type LengthArg, type Markdown
2
2
  type Transcriber = "auto" | "whisper" | "parakeet" | "canary";
3
3
  export type RunnerFlagResolution = {
4
4
  videoModeExplicitlySet: boolean;
5
+ embeddedVideoExplicitlySet: boolean;
5
6
  lengthExplicitlySet: boolean;
6
7
  languageExplicitlySet: boolean;
7
8
  noCacheFlag: boolean;
@@ -0,0 +1,41 @@
1
+ type StatusModel = {
2
+ selection: string;
3
+ source: "config" | "environment" | "default";
4
+ };
5
+ type StatusPreset = {
6
+ name: string;
7
+ model: string;
8
+ candidates?: string[];
9
+ };
10
+ type StatusProvider = {
11
+ id: string;
12
+ label: string;
13
+ kind: "api" | "cli" | "local";
14
+ state: "configured" | "available" | "usable";
15
+ source?: string;
16
+ model?: string;
17
+ path?: string;
18
+ endpoint?: string;
19
+ models?: string[];
20
+ };
21
+ export type StatusReport = {
22
+ model: StatusModel;
23
+ presets: StatusPreset[];
24
+ providers: StatusProvider[];
25
+ probed: boolean;
26
+ config?: {
27
+ path: string;
28
+ };
29
+ };
30
+ export declare function buildStatusReport({ env, fetchImpl, probe, }: {
31
+ env: Record<string, string | undefined>;
32
+ fetchImpl: typeof fetch;
33
+ probe: boolean;
34
+ }): Promise<StatusReport>;
35
+ export declare function handleStatusCliRequest({ normalizedArgv, envForRun, fetchImpl, stdout, }: {
36
+ normalizedArgv: string[];
37
+ envForRun: Record<string, string | undefined>;
38
+ fetchImpl: typeof fetch;
39
+ stdout: NodeJS.WritableStream;
40
+ }): Promise<boolean>;
41
+ export {};
@@ -8,7 +8,8 @@ export declare function createStreamOutputGate({ stdout, clearProgressForStdout,
8
8
  rewriteOnReplacement?: boolean;
9
9
  restoreDuringStream?: boolean;
10
10
  }): {
11
- handleChunk: (streamed: string, prevStreamed: string) => void;
12
- finalize: (finalText: string) => void;
11
+ handleChunk: (streamed: string, prevStreamed: string) => boolean;
12
+ finalize: (finalText: string) => boolean;
13
+ reset: () => void;
13
14
  getFlushedLen: () => number;
14
15
  };
@@ -0,0 +1,11 @@
1
+ import type { SummaryStreamHandler } from "../engine/events.js";
2
+ import { type StreamOutputMode } from "./stream-output.js";
3
+ export declare function createTerminalSummaryStream({ stdout, env, envForRun, plain, outputMode, clearProgressForStdout, restoreProgressAfterStdout, }: {
4
+ stdout: NodeJS.WritableStream;
5
+ env: Record<string, string | undefined>;
6
+ envForRun: Record<string, string | undefined>;
7
+ plain: boolean;
8
+ outputMode?: StreamOutputMode | null;
9
+ clearProgressForStdout: () => void;
10
+ restoreProgressAfterStdout?: (() => void) | null;
11
+ }): SummaryStreamHandler;
@@ -0,0 +1 @@
1
+ export declare function formatCompactCount(value: number): string;
@@ -0,0 +1,44 @@
1
+ export type RunApiStatus = {
2
+ apiKey: string | null;
3
+ openrouterApiKey: string | null;
4
+ openrouterConfigured: boolean;
5
+ groqApiKey: string | null;
6
+ assemblyaiApiKey: string | null;
7
+ elevenlabsApiKey: string | null;
8
+ openaiApiKey: string | null;
9
+ xaiApiKey: string | null;
10
+ googleApiKey: string | null;
11
+ anthropicApiKey: string | null;
12
+ zaiApiKey: string | null;
13
+ zaiBaseUrl: string;
14
+ nvidiaApiKey: string | null;
15
+ nvidiaBaseUrl: string;
16
+ minimaxApiKey: string | null;
17
+ minimaxBaseUrl: string;
18
+ ollamaBaseUrl: string;
19
+ firecrawlApiKey: string | null;
20
+ firecrawlConfigured: boolean;
21
+ googleConfigured: boolean;
22
+ anthropicConfigured: boolean;
23
+ apifyToken: string | null;
24
+ ytDlpPath: string | null;
25
+ ytDlpCookiesFromBrowser: string | null;
26
+ falApiKey: string | null;
27
+ providerBaseUrls: {
28
+ openai: string | null;
29
+ nvidia: string | null;
30
+ anthropic: string | null;
31
+ google: string | null;
32
+ xai: string | null;
33
+ };
34
+ };
35
+ export type RunApiAvailability = Pick<RunApiStatus, "xaiApiKey" | "apiKey" | "openrouterApiKey" | "apifyToken" | "firecrawlConfigured" | "googleConfigured" | "anthropicConfigured">;
36
+ export declare function buildRunJsonEnv(apiStatus: RunApiAvailability): {
37
+ hasXaiKey: boolean;
38
+ hasOpenAIKey: boolean;
39
+ hasOpenRouterKey: boolean;
40
+ hasApifyToken: boolean;
41
+ hasFirecrawlKey: boolean;
42
+ hasGoogleKey: boolean;
43
+ hasAnthropicKey: boolean;
44
+ };
@@ -0,0 +1,9 @@
1
+ import type { SummaryLength } from "@steipete/summarize-core";
2
+ export type SummaryLengthArg = {
3
+ kind: "preset";
4
+ preset: SummaryLength;
5
+ } | {
6
+ kind: "chars";
7
+ maxCharacters: number;
8
+ };
9
+ export declare function resolveTargetCharacters(lengthArg: SummaryLengthArg, maxMap: Record<SummaryLength, number>): number;
@@ -1,6 +1,6 @@
1
1
  export declare function formatElapsedMs(ms: number): string;
2
2
  export declare function formatBytes(bytes: number): string;
3
3
  export declare function formatBytesPerSecond(bytesPerSecond: number): string;
4
- export declare function formatCompactCount(value: number): string;
5
4
  export declare function formatMinutesSmart(valueMinutes: number): string;
6
5
  export declare function formatDurationSecondsSmart(value: number): string;
6
+ export { formatCompactCount } from "../shared/format-count.js";
@@ -1,4 +1,4 @@
1
- export declare const FALLBACK_VERSION = "0.17.3";
1
+ export declare const FALLBACK_VERSION = "0.18.1";
2
2
  export declare function resolvePackageVersion(importMetaUrl?: string): string;
3
3
  export declare function resolveGitSha(importMetaUrl?: string): string | null;
4
4
  export declare function formatVersionLine(importMetaUrl?: string): string;
package/docs/README.md CHANGED
@@ -9,6 +9,7 @@ summary: "Docs index for summarize behaviors and modes."
9
9
  - `docs/cli.md` — CLI models (Claude/Codex/Gemini/Agent/OpenClaw/OpenCode/Copilot/Antigravity/pi)
10
10
  - `docs/config.md` — config file location, precedence, and schema
11
11
  - `docs/extract-only.md` — extract mode (no summary LLM call)
12
+ - `docs/engine.md` — headless execution engine architecture
12
13
  - `docs/firecrawl.md` — Firecrawl mode + API key
13
14
  - `docs/language.md` — output language (`--language` / config `language`)
14
15
  - `docs/llm.md` — LLM summarization + model config (Gateway/OpenAI)
package/docs/cli.md CHANGED
@@ -13,7 +13,7 @@ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw,
13
13
  ## Model ids
14
14
 
15
15
  - `cli/claude/<model>` (e.g. `cli/claude/sonnet`)
16
- - `cli/codex/<model>` (e.g. `cli/codex/gpt-5.2`)
16
+ - `cli/codex/<model>` (e.g. `cli/codex/gpt-5.5`)
17
17
  - `cli/gemini/<model>` (e.g. `cli/gemini/flash`)
18
18
  - `cli/agent/<model>` (e.g. `cli/agent/auto`)
19
19
  - `cli/openclaw/<model>` (e.g. `cli/openclaw/main`)
@@ -27,6 +27,7 @@ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw,
27
27
  - `cli/pi` (use pi's configured default model)
28
28
 
29
29
  Use `--cli [provider]` (case-insensitive) for the provider default, or `--model cli/<provider>/<model>` to pin a model.
30
+ Bare `cli/codex` defaults to GPT-5.5; set `cli.codex.model` to override it.
30
31
  Antigravity does not support per-call model selection in print mode, so use `cli/agy` without a model suffix. pi supports `cli/pi/<model>` or a configured `cli.pi.model`.
31
32
  If `--cli` is provided without a provider, auto selection is used with CLI enabled.
32
33
 
@@ -94,6 +95,10 @@ Binary lookup:
94
95
  - `COPILOT_PATH` (optional override)
95
96
  - Otherwise uses `PATH`
96
97
 
98
+ Run `summarize status` to list enabled CLI providers whose executable is currently available.
99
+ `summarize status --verbose` also prints the resolved executable path and configured CLI model.
100
+ Missing or disabled providers are omitted.
101
+
97
102
  ## Attachments (images/files)
98
103
 
99
104
  When a CLI attempt is used for an image or non-text file, Summarize switches to a
@@ -129,7 +134,7 @@ path-based prompt and enables the required tool flags:
129
134
  "onlyWhenNoApiKeys": true,
130
135
  "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
131
136
  },
132
- "codex": { "model": "gpt-5.2" },
137
+ "codex": { "model": "gpt-5.5" },
133
138
  "gemini": { "model": "flash", "extraArgs": ["--verbose"] },
134
139
  "claude": {
135
140
  "model": "sonnet",
@@ -110,7 +110,7 @@ If `[input]` is omitted, summarize prints concise help and exits.
110
110
  ### Summary control
111
111
 
112
112
  `--length <length>`
113
- : `short`, `medium`, `long`, `xl`, `xxl` (or `s`/`m`/`l`) or a character cap like `20000` or `20k`. Default `xl`. Override globally via `output.length` in [Config](../config.md).
113
+ : `short`, `medium`, `long`, `xl`, `xxl` (or `s`/`m`/`l`) or a character cap like `20000` or `20k`. Default `long`. Override globally via `output.length` in [Config](../config.md).
114
114
 
115
115
  `--force-summary`
116
116
  : Always run the LLM, even when extracted content is shorter than the requested length.
package/docs/config.md CHANGED
@@ -16,6 +16,22 @@ Default path:
16
16
 
17
17
  - `~/.summarize/config.json`
18
18
 
19
+ ## Status
20
+
21
+ Inspect the effective model selection and positive provider setup:
22
+
23
+ ```bash
24
+ summarize status
25
+ summarize status --verbose
26
+ summarize status --probe
27
+ summarize status --json
28
+ ```
29
+
30
+ The command omits missing providers and never prints secret values. API providers appear as
31
+ `configured` when an effective key is present. Enabled CLI providers appear as `available` when
32
+ their executable can be resolved. `--probe` checks supported OpenAI-compatible/local model-list
33
+ endpoints without running inference and marks successful providers as `usable`.
34
+
19
35
  ## Precedence
20
36
 
21
37
  For `model`:
@@ -35,7 +51,7 @@ For output length:
35
51
 
36
52
  1. CLI flag `--length`
37
53
  2. Config file `output.length`
38
- 3. Built-in default (`xl`)
54
+ 3. Built-in default (`long`)
39
55
 
40
56
  See `docs/language.md` for supported values.
41
57
 
@@ -358,10 +374,15 @@ For auto selection with rules:
358
374
  }
359
375
  ]
360
376
  },
361
- "media": { "videoMode": "auto" }
377
+ "media": {
378
+ "videoMode": "auto",
379
+ "embeddedVideo": "auto"
380
+ }
362
381
  }
363
382
  ```
364
383
 
384
+ `media.embeddedVideo` accepts `"auto"`, `"off"`, `"prefer"`, or `"both"`. Automatic mode uses only high-confidence primary YouTube embeds and free captions, combining the transcript with substantial article text.
385
+
365
386
  Notes:
366
387
 
367
388
  - Parsed leniently (JSON5), but **comments are not allowed**.
@@ -398,7 +419,7 @@ Examples:
398
419
  "onlyWhenNoApiKeys": true,
399
420
  "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
400
421
  },
401
- "codex": { "model": "gpt-5.2" },
422
+ "codex": { "model": "gpt-5.5" },
402
423
  "claude": { "binary": "/usr/local/bin/claude", "extraArgs": ["--verbose"] },
403
424
  "agent": { "binary": "/usr/local/bin/agent", "model": "gpt-5.2" },
404
425
  "openclaw": { "binary": "/usr/local/bin/openclaw", "model": "main" },
package/docs/engine.md ADDED
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: "Execution engine"
3
+ summary: "Headless summary execution shared by CLI and daemon adapters."
4
+ ---
5
+
6
+ # Execution engine
7
+
8
+ `src/engine` owns summary policy and execution. It has no terminal, daemon, HTTP transport, or process UI dependencies.
9
+
10
+ CLI and daemon code remain adapters:
11
+
12
+ - CLI resolves command flags, owns progress and terminal rendering, then invokes engine modules.
13
+ - Daemon resolves request/config state, maps engine stream events to response chunks, and owns SSE/HTTP behavior.
14
+ - Browser code continues to depend on `@steipete/summarize-core`, not the Node execution engine.
15
+
16
+ ## Module map
17
+
18
+ | Module | Responsibility |
19
+ | ----------------------- | ------------------------------------------------------------------- |
20
+ | `model-executor.ts` | Provider/CLI calls, retries, streaming, token limits, usage |
21
+ | `summary-execution.ts` | Attempt order, cache reads/writes, fallback outcomes |
22
+ | `web-summary.ts` | URL summary attempts, short-content bypass, timestamp normalization |
23
+ | `web-prompt.ts` | URL prompt construction and slide transcript budgeting |
24
+ | `summary-timestamps.ts` | Timestamp bounds, sanitation, fallback key moments |
25
+ | `events.ts` | Adapter-neutral summary stream contract |
26
+ | `errors.ts` | Stable engine error-code guards |
27
+ | `types.ts` | Model attempts and typed execution results |
28
+ | `model-call.ts` | Provider model resolution and non-streaming calls |
29
+ | `streaming.ts` | Stream capability and chunk normalization |
30
+
31
+ ## Dependency rules
32
+
33
+ `src/engine/**` must not import:
34
+
35
+ - `src/run/**`
36
+ - `src/daemon/**`
37
+ - `src/tty/**`
38
+
39
+ The boundary test enforces this rule.
40
+
41
+ Engine modules may depend on portable domain/config modules, provider clients, cache interfaces, prompts, and injected runtime functions.
42
+
43
+ ## Streaming
44
+
45
+ The engine never writes summary text to stdout.
46
+
47
+ `SummaryStreamHandler` receives normalized chunks:
48
+
49
+ ```ts
50
+ type SummaryStreamChunk = {
51
+ streamed: string;
52
+ prevStreamed: string;
53
+ appended: string;
54
+ };
55
+ ```
56
+
57
+ Adapters decide how to consume them:
58
+
59
+ - CLI: plain/ANSI rendering, line or delta mode, progress coordination
60
+ - daemon: response chunks and final newline
61
+ - slides: interleaved slide presentation
62
+
63
+ `SummaryAttemptResult.summaryEmitted` tells the adapter whether a stream handler already emitted the result. Cache hits and forced non-streaming calls return `false`, so the adapter writes the final summary once.
64
+
65
+ ## Error routing
66
+
67
+ Fallback decisions use stable codes rather than message matching.
68
+
69
+ Asset-like responses discovered during HTML extraction throw `AssetLikeHtmlFetchError` with code `ASSET_LIKE_HTML_FETCH`. Input routing uses that code to retry the URL as an asset and optionally enable Firecrawl fallback.
70
+
71
+ The user-facing error text remains descriptive, but it is not a control-flow contract.
72
+
73
+ ## Adapter ownership
74
+
75
+ Adapters own:
76
+
77
+ - stdout/stderr
78
+ - terminal capability and markdown rendering
79
+ - progress lifecycle and signals
80
+ - request/SSE serialization
81
+ - CLI fallback-state persistence callbacks
82
+ - cache/resource construction and cleanup
83
+
84
+ The engine owns:
85
+
86
+ - prompt policy
87
+ - model attempts and provider overrides
88
+ - summary cache keys and normalization
89
+ - stream normalization
90
+ - timestamp validation
91
+ - retry/fallback outcomes
92
+
93
+ ## Tests
94
+
95
+ Key coverage:
96
+
97
+ - engine import-boundary test
98
+ - model executor streaming with and without handlers
99
+ - terminal stream adapter output
100
+ - daemon cache and visible-page output
101
+ - typed asset-like HTML fallback routing
102
+ - URL prompt and timestamp normalization
103
+ - existing URL, asset, provider, cache, and CLI characterization suites
104
+
105
+ ## Public API
106
+
107
+ `src/engine` is internal. It is not exported from the package root.
108
+
109
+ Any future public engine API needs a separate contract review for cancellation, resource ownership, error stability, and versioning.
package/docs/index.md CHANGED
@@ -71,7 +71,7 @@ Save defaults in `~/.summarize/config.json` and override per-invocation with fla
71
71
  {
72
72
  "model": "auto",
73
73
  "output": {
74
- "length": "xl",
74
+ "length": "long",
75
75
  "language": "auto"
76
76
  },
77
77
  "models": {
package/docs/llm.md CHANGED
@@ -46,7 +46,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
46
46
 
47
47
  - `--model <model>`
48
48
  - Examples:
49
- - `cli/codex/gpt-5.2`
49
+ - `cli/codex/gpt-5.5`
50
50
  - `openai/gpt-5.5`
51
51
  - `codex-fast` (explicit Codex CLI GPT Fast preset)
52
52
  - `cli/claude/sonnet`
@@ -94,7 +94,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
94
94
  - `--length short|medium|long|xl|xxl|<chars>`
95
95
  - This is _soft guidance_ to the model (no hard truncation).
96
96
  - Minimum numeric value: 50 chars.
97
- - Built-in default: `xl`.
97
+ - Built-in default: `long`.
98
98
  - Config default: `output.length` in `~/.summarize/config.json`.
99
99
  - Output format is Markdown; use short paragraphs and only add bullets when they improve scanability.
100
100
  - `--force-summary`
@@ -34,7 +34,7 @@ summarize "https://example.com" --cli codex
34
34
  summarize "https://en.wikipedia.org/wiki/Llama"
35
35
  ```
36
36
 
37
- You'll see streaming Markdown in the terminal. The default length is `xl` (~10k chars); use `--length` to change it:
37
+ You'll see streaming Markdown in the terminal. The default length is `long` (~4k chars); use `--length` to change it:
38
38
 
39
39
  ```bash
40
40
  summarize "https://example.com/long-article" --length short