@steipete/summarize 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -1
- package/README.md +102 -32
- package/dist/cli.js +1 -1
- package/dist/esm/cache-keys.js +83 -0
- package/dist/esm/cache-keys.js.map +1 -0
- package/dist/esm/cache-slides-cleanup.js +47 -0
- package/dist/esm/cache-slides-cleanup.js.map +1 -0
- package/dist/esm/cache.js +15 -92
- package/dist/esm/cache.js.map +1 -1
- package/dist/esm/config/env.js +49 -0
- package/dist/esm/config/env.js.map +1 -0
- package/dist/esm/config/model.js +193 -0
- package/dist/esm/config/model.js.map +1 -0
- package/dist/esm/config/parse-helpers.js +55 -0
- package/dist/esm/config/parse-helpers.js.map +1 -0
- package/dist/esm/config/read.js +83 -0
- package/dist/esm/config/read.js.map +1 -0
- package/dist/esm/config/sections.js +472 -0
- package/dist/esm/config/sections.js.map +1 -0
- package/dist/esm/config/types.js +2 -0
- package/dist/esm/config/types.js.map +1 -0
- package/dist/esm/config.js +24 -807
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/content/asset.js +2 -2
- package/dist/esm/content/asset.js.map +1 -1
- package/dist/esm/costs.js.map +1 -1
- package/dist/esm/daemon/agent-model.js +283 -0
- package/dist/esm/daemon/agent-model.js.map +1 -0
- package/dist/esm/daemon/agent-request.js +87 -0
- package/dist/esm/daemon/agent-request.js.map +1 -0
- package/dist/esm/daemon/agent.js +42 -243
- package/dist/esm/daemon/agent.js.map +1 -1
- package/dist/esm/daemon/chat.js +118 -9
- package/dist/esm/daemon/chat.js.map +1 -1
- package/dist/esm/daemon/cli.js +121 -9
- package/dist/esm/daemon/cli.js.map +1 -1
- package/dist/esm/daemon/config.js +65 -9
- package/dist/esm/daemon/config.js.map +1 -1
- package/dist/esm/daemon/env-snapshot.js +6 -0
- package/dist/esm/daemon/env-snapshot.js.map +1 -1
- package/dist/esm/daemon/flow-context.js +84 -74
- package/dist/esm/daemon/flow-context.js.map +1 -1
- package/dist/esm/daemon/models.js +26 -0
- package/dist/esm/daemon/models.js.map +1 -1
- package/dist/esm/daemon/process-registry.js.map +1 -1
- package/dist/esm/daemon/schtasks.js +101 -5
- package/dist/esm/daemon/schtasks.js.map +1 -1
- package/dist/esm/daemon/server-admin-routes.js +134 -0
- package/dist/esm/daemon/server-admin-routes.js.map +1 -0
- package/dist/esm/daemon/server-agent-route.js +104 -0
- package/dist/esm/daemon/server-agent-route.js.map +1 -0
- package/dist/esm/daemon/server-http.js +89 -0
- package/dist/esm/daemon/server-http.js.map +1 -0
- package/dist/esm/daemon/server-session-routes.js +209 -0
- package/dist/esm/daemon/server-session-routes.js.map +1 -0
- package/dist/esm/daemon/server-session.js +118 -0
- package/dist/esm/daemon/server-session.js.map +1 -0
- package/dist/esm/daemon/server-sse.js +28 -0
- package/dist/esm/daemon/server-sse.js.map +1 -0
- package/dist/esm/daemon/server-summarize-execution.js +357 -0
- package/dist/esm/daemon/server-summarize-execution.js.map +1 -0
- package/dist/esm/daemon/server-summarize-request.js +119 -0
- package/dist/esm/daemon/server-summarize-request.js.map +1 -0
- package/dist/esm/daemon/server.js +79 -1121
- package/dist/esm/daemon/server.js.map +1 -1
- package/dist/esm/daemon/summarize-progress.js +1 -1
- package/dist/esm/daemon/summarize-progress.js.map +1 -1
- package/dist/esm/daemon/summarize.js.map +1 -1
- package/dist/esm/daemon/windows-container.js +21 -0
- package/dist/esm/daemon/windows-container.js.map +1 -0
- package/dist/esm/llm/cli-exec.js +75 -0
- package/dist/esm/llm/cli-exec.js.map +1 -0
- package/dist/esm/llm/cli-provider-output.js +415 -0
- package/dist/esm/llm/cli-provider-output.js.map +1 -0
- package/dist/esm/llm/cli.js +97 -218
- package/dist/esm/llm/cli.js.map +1 -1
- package/dist/esm/llm/generate-text-document.js +109 -0
- package/dist/esm/llm/generate-text-document.js.map +1 -0
- package/dist/esm/llm/generate-text-shared.js +121 -0
- package/dist/esm/llm/generate-text-shared.js.map +1 -0
- package/dist/esm/llm/generate-text-stream.js +291 -0
- package/dist/esm/llm/generate-text-stream.js.map +1 -0
- package/dist/esm/llm/generate-text.js +172 -480
- package/dist/esm/llm/generate-text.js.map +1 -1
- package/dist/esm/llm/github-models.js +45 -0
- package/dist/esm/llm/github-models.js.map +1 -0
- package/dist/esm/llm/html-to-markdown.js.map +1 -1
- package/dist/esm/llm/model-id.js +37 -20
- package/dist/esm/llm/model-id.js.map +1 -1
- package/dist/esm/llm/provider-capabilities.js +2 -0
- package/dist/esm/llm/provider-capabilities.js.map +1 -0
- package/dist/esm/llm/provider-profile.js +184 -0
- package/dist/esm/llm/provider-profile.js.map +1 -0
- package/dist/esm/llm/providers/google.js +42 -5
- package/dist/esm/llm/providers/google.js.map +1 -1
- package/dist/esm/llm/providers/models.js +19 -1
- package/dist/esm/llm/providers/models.js.map +1 -1
- package/dist/esm/llm/providers/openai.js +243 -5
- package/dist/esm/llm/providers/openai.js.map +1 -1
- package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
- package/dist/esm/media-cache.js +3 -0
- package/dist/esm/media-cache.js.map +1 -1
- package/dist/esm/model-auto-cli.js +91 -0
- package/dist/esm/model-auto-cli.js.map +1 -0
- package/dist/esm/model-auto-rules.js +86 -0
- package/dist/esm/model-auto-rules.js.map +1 -0
- package/dist/esm/model-auto.js +10 -245
- package/dist/esm/model-auto.js.map +1 -1
- package/dist/esm/model-spec.js +62 -19
- package/dist/esm/model-spec.js.map +1 -1
- package/dist/esm/refresh-free.js +1 -1
- package/dist/esm/refresh-free.js.map +1 -1
- package/dist/esm/run/attachments.js +1 -1
- package/dist/esm/run/attachments.js.map +1 -1
- package/dist/esm/run/bird/exec.js +23 -0
- package/dist/esm/run/bird/exec.js.map +1 -0
- package/dist/esm/run/bird/media.js +171 -0
- package/dist/esm/run/bird/media.js.map +1 -0
- package/dist/esm/run/bird/parse.js +82 -0
- package/dist/esm/run/bird/parse.js.map +1 -0
- package/dist/esm/run/bird/types.js +2 -0
- package/dist/esm/run/bird/types.js.map +1 -0
- package/dist/esm/run/bird.js +86 -144
- package/dist/esm/run/bird.js.map +1 -1
- package/dist/esm/run/cache-state.js.map +1 -1
- package/dist/esm/run/cli-fallback-state.js +6 -1
- package/dist/esm/run/cli-fallback-state.js.map +1 -1
- package/dist/esm/run/constants.js +2 -1
- package/dist/esm/run/constants.js.map +1 -1
- package/dist/esm/run/env.js +24 -3
- package/dist/esm/run/env.js.map +1 -1
- package/dist/esm/run/finish-line-labels.js +76 -0
- package/dist/esm/run/finish-line-labels.js.map +1 -0
- package/dist/esm/run/finish-line-lengths.js +96 -0
- package/dist/esm/run/finish-line-lengths.js.map +1 -0
- package/dist/esm/run/finish-line.js +3 -169
- package/dist/esm/run/finish-line.js.map +1 -1
- package/dist/esm/run/flows/asset/extract.js.map +1 -1
- package/dist/esm/run/flows/asset/input.js +1 -1
- package/dist/esm/run/flows/asset/input.js.map +1 -1
- package/dist/esm/run/flows/asset/media.js +19 -10
- package/dist/esm/run/flows/asset/media.js.map +1 -1
- package/dist/esm/run/flows/asset/output.js.map +1 -1
- package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
- package/dist/esm/run/flows/asset/summary-attempts.js +117 -0
- package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -0
- package/dist/esm/run/flows/asset/summary.js +30 -107
- package/dist/esm/run/flows/asset/summary.js.map +1 -1
- package/dist/esm/run/flows/url/extract.js +7 -4
- package/dist/esm/run/flows/url/extract.js.map +1 -1
- package/dist/esm/run/flows/url/extraction-session.js +174 -0
- package/dist/esm/run/flows/url/extraction-session.js.map +1 -0
- package/dist/esm/run/flows/url/fetch-options.js +32 -0
- package/dist/esm/run/flows/url/fetch-options.js.map +1 -0
- package/dist/esm/run/flows/url/flow-progress.js +123 -0
- package/dist/esm/run/flows/url/flow-progress.js.map +1 -0
- package/dist/esm/run/flows/url/flow.js +70 -462
- package/dist/esm/run/flows/url/flow.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +38 -3
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/flows/url/progress-status-state.js +28 -0
- package/dist/esm/run/flows/url/progress-status-state.js.map +1 -0
- package/dist/esm/run/flows/url/progress-status.js +51 -0
- package/dist/esm/run/flows/url/progress-status.js.map +1 -0
- package/dist/esm/run/flows/url/slides-output-render.js +78 -0
- package/dist/esm/run/flows/url/slides-output-render.js.map +1 -0
- package/dist/esm/run/flows/url/slides-output-state.js +86 -0
- package/dist/esm/run/flows/url/slides-output-state.js.map +1 -0
- package/dist/esm/run/flows/url/slides-output-stream.js +271 -0
- package/dist/esm/run/flows/url/slides-output-stream.js.map +1 -0
- package/dist/esm/run/flows/url/slides-output.js +29 -422
- package/dist/esm/run/flows/url/slides-output.js.map +1 -1
- package/dist/esm/run/flows/url/slides-session.js +159 -0
- package/dist/esm/run/flows/url/slides-session.js.map +1 -0
- package/dist/esm/run/flows/url/slides-text-markdown.js +431 -0
- package/dist/esm/run/flows/url/slides-text-markdown.js.map +1 -0
- package/dist/esm/run/flows/url/slides-text-transcript.js +199 -0
- package/dist/esm/run/flows/url/slides-text-transcript.js.map +1 -0
- package/dist/esm/run/flows/url/slides-text-types.js +2 -0
- package/dist/esm/run/flows/url/slides-text-types.js.map +1 -0
- package/dist/esm/run/flows/url/slides-text.js +2 -627
- package/dist/esm/run/flows/url/slides-text.js.map +1 -1
- package/dist/esm/run/flows/url/summary-finish.js +40 -0
- package/dist/esm/run/flows/url/summary-finish.js.map +1 -0
- package/dist/esm/run/flows/url/summary-json.js +32 -0
- package/dist/esm/run/flows/url/summary-json.js.map +1 -0
- package/dist/esm/run/flows/url/summary-prompt.js +147 -0
- package/dist/esm/run/flows/url/summary-prompt.js.map +1 -0
- package/dist/esm/run/flows/url/summary-resolution.js +327 -0
- package/dist/esm/run/flows/url/summary-resolution.js.map +1 -0
- package/dist/esm/run/flows/url/summary-timestamps.js +136 -0
- package/dist/esm/run/flows/url/summary-timestamps.js.map +1 -0
- package/dist/esm/run/flows/url/summary.js +139 -667
- package/dist/esm/run/flows/url/summary.js.map +1 -1
- package/dist/esm/run/flows/url/types.js +31 -1
- package/dist/esm/run/flows/url/types.js.map +1 -1
- package/dist/esm/run/flows/url/video-only.js +68 -0
- package/dist/esm/run/flows/url/video-only.js.map +1 -0
- package/dist/esm/run/help.js +15 -5
- package/dist/esm/run/help.js.map +1 -1
- package/dist/esm/run/markdown-transforms.js +89 -0
- package/dist/esm/run/markdown-transforms.js.map +1 -0
- package/dist/esm/run/markdown.js +1 -96
- package/dist/esm/run/markdown.js.map +1 -1
- package/dist/esm/run/run-config.js +1 -1
- package/dist/esm/run/run-config.js.map +1 -1
- package/dist/esm/run/run-env.js +28 -7
- package/dist/esm/run/run-env.js.map +1 -1
- package/dist/esm/run/run-models.js +35 -5
- package/dist/esm/run/run-models.js.map +1 -1
- package/dist/esm/run/run-settings-parse.js +77 -0
- package/dist/esm/run/run-settings-parse.js.map +1 -0
- package/dist/esm/run/run-settings.js +7 -72
- package/dist/esm/run/run-settings.js.map +1 -1
- package/dist/esm/run/runner-contexts.js +122 -0
- package/dist/esm/run/runner-contexts.js.map +1 -0
- package/dist/esm/run/runner-execution.js +82 -0
- package/dist/esm/run/runner-execution.js.map +1 -0
- package/dist/esm/run/runner-flags.js +97 -0
- package/dist/esm/run/runner-flags.js.map +1 -0
- package/dist/esm/run/runner-plan.js +369 -0
- package/dist/esm/run/runner-plan.js.map +1 -0
- package/dist/esm/run/runner-setup.js +109 -0
- package/dist/esm/run/runner-setup.js.map +1 -0
- package/dist/esm/run/runner-slides.js +49 -0
- package/dist/esm/run/runner-slides.js.map +1 -0
- package/dist/esm/run/runner.js +53 -692
- package/dist/esm/run/runner.js.map +1 -1
- package/dist/esm/run/slides-cli.js +3 -2
- package/dist/esm/run/slides-cli.js.map +1 -1
- package/dist/esm/run/slides-render.js +5 -2
- package/dist/esm/run/slides-render.js.map +1 -1
- package/dist/esm/run/stdin-temp-file.js +1 -1
- package/dist/esm/run/stdin-temp-file.js.map +1 -1
- package/dist/esm/run/streaming.js +2 -0
- package/dist/esm/run/streaming.js.map +1 -1
- package/dist/esm/run/summary-engine.js +50 -10
- package/dist/esm/run/summary-engine.js.map +1 -1
- package/dist/esm/run/summary-llm.js +2 -1
- package/dist/esm/run/summary-llm.js.map +1 -1
- package/dist/esm/run/terminal.js +4 -1
- package/dist/esm/run/terminal.js.map +1 -1
- package/dist/esm/run/transcriber-cli.js +1 -1
- package/dist/esm/run/transcriber-cli.js.map +1 -1
- package/dist/esm/shared/slides-text.js +2 -0
- package/dist/esm/shared/slides-text.js.map +1 -0
- package/dist/esm/slides/download.js +242 -0
- package/dist/esm/slides/download.js.map +1 -0
- package/dist/esm/slides/extract-finalize.js +98 -0
- package/dist/esm/slides/extract-finalize.js.map +1 -0
- package/dist/esm/slides/extract.js +105 -1685
- package/dist/esm/slides/extract.js.map +1 -1
- package/dist/esm/slides/frame-extraction.js +372 -0
- package/dist/esm/slides/frame-extraction.js.map +1 -0
- package/dist/esm/slides/index.js +2 -1
- package/dist/esm/slides/index.js.map +1 -1
- package/dist/esm/slides/ingest.js +194 -0
- package/dist/esm/slides/ingest.js.map +1 -0
- package/dist/esm/slides/ocr.js +91 -0
- package/dist/esm/slides/ocr.js.map +1 -0
- package/dist/esm/slides/process.js +218 -0
- package/dist/esm/slides/process.js.map +1 -0
- package/dist/esm/slides/scene-detection.js +387 -0
- package/dist/esm/slides/scene-detection.js.map +1 -0
- package/dist/esm/slides/source-id.js +42 -0
- package/dist/esm/slides/source-id.js.map +1 -0
- package/dist/esm/slides/source.js +80 -0
- package/dist/esm/slides/source.js.map +1 -0
- package/dist/esm/tty/progress/fetch-html.js +6 -0
- package/dist/esm/tty/progress/fetch-html.js.map +1 -1
- package/dist/esm/tty/progress/transcript-state.js +202 -0
- package/dist/esm/tty/progress/transcript-state.js.map +1 -0
- package/dist/esm/tty/progress/transcript.js +43 -194
- package/dist/esm/tty/progress/transcript.js.map +1 -1
- package/dist/esm/tty/spinner.js +17 -3
- package/dist/esm/tty/spinner.js.map +1 -1
- package/dist/esm/tty/website-progress.js +16 -3
- package/dist/esm/tty/website-progress.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/cache-keys.d.ts +44 -0
- package/dist/types/cache-slides-cleanup.d.ts +1 -0
- package/dist/types/cache.d.ts +2 -10
- package/dist/types/config/env.d.ts +6 -0
- package/dist/types/config/model.d.ts +3 -0
- package/dist/types/config/parse-helpers.d.ts +7 -0
- package/dist/types/config/read.d.ts +2 -0
- package/dist/types/config/sections.d.ts +34 -0
- package/dist/types/config/types.d.ts +238 -0
- package/dist/types/config.d.ts +3 -209
- package/dist/types/costs.d.ts +1 -1
- package/dist/types/daemon/agent-model.d.ts +40 -0
- package/dist/types/daemon/agent-request.d.ts +14 -0
- package/dist/types/daemon/chat.d.ts +3 -1
- package/dist/types/daemon/config.d.ts +13 -2
- package/dist/types/daemon/env-snapshot.d.ts +1 -1
- package/dist/types/daemon/flow-context.d.ts +2 -2
- package/dist/types/daemon/models.d.ts +3 -0
- package/dist/types/daemon/schtasks.d.ts +2 -1
- package/dist/types/daemon/server-admin-routes.d.ts +22 -0
- package/dist/types/daemon/server-agent-route.d.ts +9 -0
- package/dist/types/daemon/server-http.d.ts +10 -0
- package/dist/types/daemon/server-session-routes.d.ts +11 -0
- package/dist/types/daemon/server-session.d.ts +52 -0
- package/dist/types/daemon/server-sse.d.ts +12 -0
- package/dist/types/daemon/server-summarize-execution.d.ts +70 -0
- package/dist/types/daemon/server-summarize-request.d.ts +36 -0
- package/dist/types/daemon/server.d.ts +4 -4
- package/dist/types/daemon/summarize.d.ts +1 -1
- package/dist/types/daemon/windows-container.d.ts +1 -0
- package/dist/types/llm/cli-exec.d.ts +13 -0
- package/dist/types/llm/cli-provider-output.d.ts +25 -0
- package/dist/types/llm/generate-text-document.d.ts +35 -0
- package/dist/types/llm/generate-text-shared.d.ts +32 -0
- package/dist/types/llm/generate-text-stream.d.ts +27 -0
- package/dist/types/llm/generate-text.d.ts +7 -26
- package/dist/types/llm/github-models.d.ts +5 -0
- package/dist/types/llm/html-to-markdown.d.ts +2 -1
- package/dist/types/llm/model-id.d.ts +1 -1
- package/dist/types/llm/provider-capabilities.d.ts +2 -0
- package/dist/types/llm/provider-profile.d.ts +31 -0
- package/dist/types/llm/providers/google.d.ts +6 -0
- package/dist/types/llm/providers/models.d.ts +5 -0
- package/dist/types/llm/providers/openai.d.ts +9 -5
- package/dist/types/llm/providers/types.d.ts +1 -0
- package/dist/types/llm/transcript-to-markdown.d.ts +2 -1
- package/dist/types/model-auto-cli.d.ts +15 -0
- package/dist/types/model-auto-rules.d.ts +7 -0
- package/dist/types/model-auto.d.ts +5 -7
- package/dist/types/model-spec.d.ts +4 -3
- package/dist/types/run/attachments.d.ts +3 -2
- package/dist/types/run/bird/exec.d.ts +1 -0
- package/dist/types/run/bird/media.d.ts +3 -0
- package/dist/types/run/bird/parse.d.ts +3 -0
- package/dist/types/run/bird/types.d.ts +18 -0
- package/dist/types/run/bird.d.ts +12 -17
- package/dist/types/run/cache-state.d.ts +1 -1
- package/dist/types/run/constants.d.ts +2 -1
- package/dist/types/run/env.d.ts +6 -0
- package/dist/types/run/finish-line-labels.d.ts +29 -0
- package/dist/types/run/finish-line-lengths.d.ts +23 -0
- package/dist/types/run/finish-line.d.ts +2 -52
- package/dist/types/run/flows/asset/extract.d.ts +1 -1
- package/dist/types/run/flows/asset/input.d.ts +1 -1
- package/dist/types/run/flows/asset/preprocess.d.ts +1 -1
- package/dist/types/run/flows/asset/summary-attempts.d.ts +24 -0
- package/dist/types/run/flows/asset/summary.d.ts +16 -2
- package/dist/types/run/flows/url/extraction-session.d.ts +22 -0
- package/dist/types/run/flows/url/fetch-options.d.ts +29 -0
- package/dist/types/run/flows/url/flow-progress.d.ts +43 -0
- package/dist/types/run/flows/url/markdown.d.ts +2 -2
- package/dist/types/run/flows/url/progress-status-state.d.ts +17 -0
- package/dist/types/run/flows/url/progress-status.d.ts +17 -0
- package/dist/types/run/flows/url/slides-output-render.d.ts +43 -0
- package/dist/types/run/flows/url/slides-output-state.d.ts +21 -0
- package/dist/types/run/flows/url/slides-output-stream.d.ts +18 -0
- package/dist/types/run/flows/url/slides-output.d.ts +2 -17
- package/dist/types/run/flows/url/slides-session.d.ts +26 -0
- package/dist/types/run/flows/url/slides-text-markdown.d.ts +46 -0
- package/dist/types/run/flows/url/slides-text-transcript.d.ts +36 -0
- package/dist/types/run/flows/url/slides-text-types.d.ts +8 -0
- package/dist/types/run/flows/url/slides-text.d.ts +3 -87
- package/dist/types/run/flows/url/summary-finish.d.ts +16 -0
- package/dist/types/run/flows/url/summary-json.d.ts +51 -0
- package/dist/types/run/flows/url/summary-prompt.d.ts +22 -0
- package/dist/types/run/flows/url/summary-resolution.d.ts +31 -0
- package/dist/types/run/flows/url/summary-timestamps.d.ts +11 -0
- package/dist/types/run/flows/url/types.d.ts +20 -0
- package/dist/types/run/flows/url/video-only.d.ts +27 -0
- package/dist/types/run/markdown-transforms.d.ts +3 -0
- package/dist/types/run/run-context.d.ts +4 -0
- package/dist/types/run/run-env.d.ts +4 -0
- package/dist/types/run/run-settings-parse.d.ts +5 -0
- package/dist/types/run/run-settings.d.ts +2 -1
- package/dist/types/run/runner-contexts.d.ts +37 -0
- package/dist/types/run/runner-execution.d.ts +58 -0
- package/dist/types/run/runner-flags.d.ts +41 -0
- package/dist/types/run/runner-plan.d.ts +19 -0
- package/dist/types/run/runner-setup.d.ts +21 -0
- package/dist/types/run/runner-slides.d.ts +9 -0
- package/dist/types/run/streaming.d.ts +2 -1
- package/dist/types/run/summary-engine.d.ts +8 -4
- package/dist/types/run/summary-llm.d.ts +5 -3
- package/dist/types/run/terminal.d.ts +2 -0
- package/dist/types/run/types.d.ts +3 -2
- package/dist/types/shared/slides-text.d.ts +1 -0
- package/dist/types/slides/download.d.ts +29 -0
- package/dist/types/slides/extract-finalize.d.ts +57 -0
- package/dist/types/slides/extract.d.ts +2 -13
- package/dist/types/slides/frame-extraction.d.ts +38 -0
- package/dist/types/slides/index.d.ts +2 -1
- package/dist/types/slides/ingest.d.ts +47 -0
- package/dist/types/slides/ocr.d.ts +5 -0
- package/dist/types/slides/process.d.ts +22 -0
- package/dist/types/slides/scene-detection.d.ts +75 -0
- package/dist/types/slides/source-id.d.ts +2 -0
- package/dist/types/slides/source.d.ts +8 -0
- package/dist/types/tty/progress/fetch-html.d.ts +1 -0
- package/dist/types/tty/progress/transcript-state.d.ts +27 -0
- package/dist/types/tty/progress/transcript.d.ts +1 -0
- package/dist/types/tty/spinner.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/docs/README.md +1 -1
- package/docs/_config.yml +1 -0
- package/docs/agent.md +3 -2
- package/docs/assets/site.css +145 -2
- package/docs/cache.md +2 -1
- package/docs/chrome-extension.md +19 -5
- package/docs/cli.md +26 -8
- package/docs/config.md +30 -9
- package/docs/extract-only.md +2 -2
- package/docs/firecrawl.md +2 -1
- package/docs/index.html +5 -0
- package/docs/llm.md +34 -5
- package/docs/manual-tests.md +3 -0
- package/docs/media.md +9 -1
- package/docs/model-auto.md +2 -2
- package/docs/model-provider-resolution.md +57 -0
- package/docs/releasing.md +9 -12
- package/docs/site/docs/chrome-extension.html +1 -1
- package/docs/site/index.html +5 -0
- package/docs/slides-rendering-flow.md +46 -0
- package/docs/slides.md +5 -5
- package/docs/smoketest.md +1 -1
- package/docs/transcript-provider-flow.md +73 -0
- package/docs/website.md +3 -1
- package/docs/youtube.md +4 -2
- package/package.json +17 -16
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Context } from "@mariozechner/pi-ai";
|
|
2
2
|
import type { Attachment } from "../attachments.js";
|
|
3
3
|
import type { LlmTokenUsage } from "../types.js";
|
|
4
|
+
type GoogleAssistantLike = {
|
|
5
|
+
stopReason?: string;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function normalizeGoogleAssistantError(response: GoogleAssistantLike | null | undefined, modelId: string): Error | null;
|
|
4
9
|
export declare function completeGoogleText({ modelId, apiKey, context, temperature, maxOutputTokens, signal, googleBaseUrlOverride, }: {
|
|
5
10
|
modelId: string;
|
|
6
11
|
apiKey: string;
|
|
@@ -27,3 +32,4 @@ export declare function completeGoogleDocument({ modelId, apiKey, promptText, do
|
|
|
27
32
|
text: string;
|
|
28
33
|
usage: LlmTokenUsage | null;
|
|
29
34
|
}>;
|
|
35
|
+
export {};
|
|
@@ -10,6 +10,11 @@ export declare function resolveZaiModel({ modelId, context, openaiBaseUrlOverrid
|
|
|
10
10
|
context: Context;
|
|
11
11
|
openaiBaseUrlOverride?: string | null;
|
|
12
12
|
}): Model<Api>;
|
|
13
|
+
export declare function resolveNvidiaModel({ modelId, context, openaiBaseUrlOverride, }: {
|
|
14
|
+
modelId: string;
|
|
15
|
+
context: Context;
|
|
16
|
+
openaiBaseUrlOverride?: string | null;
|
|
17
|
+
}): Model<Api>;
|
|
13
18
|
export declare function resolveXaiModel({ modelId, context, xaiBaseUrlOverride, }: {
|
|
14
19
|
modelId: string;
|
|
15
20
|
context: Context;
|
|
@@ -11,18 +11,21 @@ export type OpenAiClientConfigInput = {
|
|
|
11
11
|
openaiBaseUrlOverride?: string | null;
|
|
12
12
|
forceChatCompletions?: boolean;
|
|
13
13
|
};
|
|
14
|
+
type OpenAiTextCompletionResult = {
|
|
15
|
+
text: string;
|
|
16
|
+
usage: LlmTokenUsage | null;
|
|
17
|
+
resolvedModelId?: string;
|
|
18
|
+
};
|
|
14
19
|
export declare function resolveOpenAiClientConfig({ apiKeys, forceOpenRouter, openaiBaseUrlOverride, forceChatCompletions, }: OpenAiClientConfigInput): OpenAiClientConfig;
|
|
15
|
-
export declare function completeOpenAiText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, }: {
|
|
20
|
+
export declare function completeOpenAiText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, fetchImpl, }: {
|
|
16
21
|
modelId: string;
|
|
17
22
|
openaiConfig: OpenAiClientConfig;
|
|
18
23
|
context: Context;
|
|
19
24
|
temperature?: number;
|
|
20
25
|
maxOutputTokens?: number;
|
|
21
26
|
signal: AbortSignal;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
usage: LlmTokenUsage | null;
|
|
25
|
-
}>;
|
|
27
|
+
fetchImpl?: typeof fetch;
|
|
28
|
+
}): Promise<OpenAiTextCompletionResult>;
|
|
26
29
|
export declare function completeOpenAiDocument({ modelId, openaiConfig, promptText, document, maxOutputTokens, temperature, timeoutMs, fetchImpl, }: {
|
|
27
30
|
modelId: string;
|
|
28
31
|
openaiConfig: OpenAiClientConfig;
|
|
@@ -36,3 +39,4 @@ export declare function completeOpenAiDocument({ modelId, openaiConfig, promptTe
|
|
|
36
39
|
text: string;
|
|
37
40
|
usage: LlmTokenUsage | null;
|
|
38
41
|
}>;
|
|
42
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OutputLanguage } from "../language.js";
|
|
2
2
|
import type { LlmTokenUsage } from "./generate-text.js";
|
|
3
|
+
import type { LlmProvider } from "./model-id.js";
|
|
3
4
|
export type ConvertTranscriptToMarkdown = (args: {
|
|
4
5
|
title: string | null;
|
|
5
6
|
source: string | null;
|
|
@@ -30,7 +31,7 @@ export declare function createTranscriptToMarkdownConverter({ modelId, forceOpen
|
|
|
30
31
|
}) => void;
|
|
31
32
|
onUsage?: (usage: {
|
|
32
33
|
model: string;
|
|
33
|
-
provider:
|
|
34
|
+
provider: LlmProvider;
|
|
34
35
|
usage: LlmTokenUsage | null;
|
|
35
36
|
}) => void;
|
|
36
37
|
}): ConvertTranscriptToMarkdown;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CliProvider, SummarizeConfig } from "./config.js";
|
|
2
|
+
export type ResolvedCliAutoFallbackConfig = {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
onlyWhenNoApiKeys: boolean;
|
|
5
|
+
order: CliProvider[];
|
|
6
|
+
};
|
|
7
|
+
export declare function resolveCliAutoFallbackConfig(config: SummarizeConfig | null): ResolvedCliAutoFallbackConfig;
|
|
8
|
+
export declare function prependCliCandidates({ candidates, config, env, isImplicitAutoSelection, allowAutoCliFallback, lastSuccessfulCliProvider, }: {
|
|
9
|
+
candidates: string[];
|
|
10
|
+
config: SummarizeConfig | null;
|
|
11
|
+
env: Record<string, string | undefined>;
|
|
12
|
+
isImplicitAutoSelection: boolean;
|
|
13
|
+
allowAutoCliFallback: boolean;
|
|
14
|
+
lastSuccessfulCliProvider: CliProvider | null;
|
|
15
|
+
}): string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AutoRule, AutoRuleKind, SummarizeConfig } from "./config.js";
|
|
2
|
+
export declare const DEFAULT_RULES: AutoRule[];
|
|
3
|
+
export declare function resolveRuleCandidates({ kind, promptTokens, config, }: {
|
|
4
|
+
kind: AutoRuleKind;
|
|
5
|
+
promptTokens: number | null;
|
|
6
|
+
config: SummarizeConfig | null;
|
|
7
|
+
}): string[];
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { AutoRuleKind, CliProvider, SummarizeConfig } from "./config.js";
|
|
2
|
+
import { type RequiredModelEnv } from "./llm/provider-capabilities.js";
|
|
3
|
+
import { resolveCliAutoFallbackConfig, type ResolvedCliAutoFallbackConfig } from "./model-auto-cli.js";
|
|
2
4
|
import type { LiteLlmCatalog } from "./pricing/litellm.js";
|
|
5
|
+
export { resolveCliAutoFallbackConfig };
|
|
6
|
+
export type { ResolvedCliAutoFallbackConfig };
|
|
3
7
|
export type AutoSelectionInput = {
|
|
4
8
|
kind: AutoRuleKind;
|
|
5
9
|
promptTokens: number | null;
|
|
@@ -21,14 +25,8 @@ export type AutoModelAttempt = {
|
|
|
21
25
|
llmModelId: string | null;
|
|
22
26
|
openrouterProviders: string[] | null;
|
|
23
27
|
forceOpenRouter: boolean;
|
|
24
|
-
requiredEnv:
|
|
28
|
+
requiredEnv: RequiredModelEnv;
|
|
25
29
|
debug: string;
|
|
26
30
|
};
|
|
27
|
-
export type ResolvedCliAutoFallbackConfig = {
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
onlyWhenNoApiKeys: boolean;
|
|
30
|
-
order: CliProvider[];
|
|
31
|
-
};
|
|
32
|
-
export declare function resolveCliAutoFallbackConfig(config: SummarizeConfig | null): ResolvedCliAutoFallbackConfig;
|
|
33
31
|
export declare function envHasKey(env: Record<string, string | undefined>, requiredEnv: AutoModelAttempt["requiredEnv"]): boolean;
|
|
34
32
|
export declare function buildAutoModelAttempts(input: AutoSelectionInput): AutoModelAttempt[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { CliProvider } from "./config.js";
|
|
2
|
+
import type { LlmProvider } from "./llm/model-id.js";
|
|
2
3
|
export type FixedModelSpec = {
|
|
3
4
|
transport: "native";
|
|
4
5
|
userModelId: string;
|
|
5
6
|
llmModelId: string;
|
|
6
|
-
provider:
|
|
7
|
+
provider: LlmProvider;
|
|
7
8
|
openrouterProviders: string[] | null;
|
|
8
9
|
forceOpenRouter: false;
|
|
9
|
-
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY";
|
|
10
|
+
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY" | "NVIDIA_API_KEY" | "GITHUB_TOKEN";
|
|
10
11
|
openaiBaseUrlOverride?: string | null;
|
|
11
12
|
forceChatCompletions?: boolean;
|
|
12
13
|
} | {
|
|
@@ -23,7 +24,7 @@ export type FixedModelSpec = {
|
|
|
23
24
|
llmModelId: null;
|
|
24
25
|
openrouterProviders: null;
|
|
25
26
|
forceOpenRouter: false;
|
|
26
|
-
requiredEnv: "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT";
|
|
27
|
+
requiredEnv: "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT" | "CLI_OPENCLAW" | "CLI_OPENCODE";
|
|
27
28
|
cliProvider: CliProvider;
|
|
28
29
|
cliModel: string | null;
|
|
29
30
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { loadLocalAsset } from "../content/asset.js";
|
|
2
|
+
import type { LlmProvider } from "../llm/model-id.js";
|
|
2
3
|
export type AssetAttachment = Awaited<ReturnType<typeof loadLocalAsset>>["attachment"];
|
|
3
4
|
export declare const MAX_DOCUMENT_BYTES_DEFAULT: number;
|
|
4
5
|
export declare function isUnsupportedAttachmentError(error: unknown): boolean;
|
|
@@ -19,14 +20,14 @@ export declare function ensureCliAttachmentPath({ sourceKind, sourceLabel, attac
|
|
|
19
20
|
}): Promise<string>;
|
|
20
21
|
export declare function shouldMarkitdownConvertMediaType(mediaType: string): boolean;
|
|
21
22
|
export declare function supportsNativeFileAttachment({ provider, attachment, }: {
|
|
22
|
-
provider:
|
|
23
|
+
provider: LlmProvider;
|
|
23
24
|
attachment: {
|
|
24
25
|
kind: "image" | "file";
|
|
25
26
|
mediaType: string;
|
|
26
27
|
};
|
|
27
28
|
}): boolean;
|
|
28
29
|
export declare function assertProviderSupportsAttachment({ provider, modelId, attachment, }: {
|
|
29
|
-
provider:
|
|
30
|
+
provider: LlmProvider;
|
|
30
31
|
modelId: string;
|
|
31
32
|
attachment: {
|
|
32
33
|
kind: "image" | "file";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function execTweetCli(binary: string, args: string[], timeoutMs: number, env: Record<string, string | undefined>): Promise<string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type TweetCliClient = "xurl" | "bird";
|
|
2
|
+
export type BirdTweetMedia = {
|
|
3
|
+
kind: "video" | "audio";
|
|
4
|
+
urls: string[];
|
|
5
|
+
preferredUrl: string | null;
|
|
6
|
+
source: "extended_entities" | "card" | "entities" | "xurl";
|
|
7
|
+
};
|
|
8
|
+
export type BirdTweetPayload = {
|
|
9
|
+
id?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
author?: {
|
|
12
|
+
username?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
};
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
media?: BirdTweetMedia | null;
|
|
17
|
+
client?: TweetCliClient;
|
|
18
|
+
};
|
package/dist/types/run/bird.d.ts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
type BirdTweetPayload
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
createdAt?: string;
|
|
9
|
-
media?: BirdTweetMedia | null;
|
|
10
|
-
};
|
|
11
|
-
type BirdTweetMedia = {
|
|
12
|
-
kind: "video" | "audio";
|
|
13
|
-
urls: string[];
|
|
14
|
-
preferredUrl: string | null;
|
|
15
|
-
source: "extended_entities" | "card" | "entities";
|
|
16
|
-
};
|
|
1
|
+
import type { BirdTweetPayload } from "./bird/types.js";
|
|
2
|
+
export type { TweetCliClient } from "./bird/types.js";
|
|
3
|
+
export declare function readTweetWithXurl(args: {
|
|
4
|
+
url: string;
|
|
5
|
+
timeoutMs: number;
|
|
6
|
+
env: Record<string, string | undefined>;
|
|
7
|
+
}): Promise<BirdTweetPayload>;
|
|
17
8
|
export declare function readTweetWithBird(args: {
|
|
18
9
|
url: string;
|
|
19
10
|
timeoutMs: number;
|
|
20
11
|
env: Record<string, string | undefined>;
|
|
21
12
|
}): Promise<BirdTweetPayload>;
|
|
13
|
+
export declare function readTweetWithPreferredClient(args: {
|
|
14
|
+
url: string;
|
|
15
|
+
timeoutMs: number;
|
|
16
|
+
env: Record<string, string | undefined>;
|
|
17
|
+
}): Promise<BirdTweetPayload>;
|
|
22
18
|
export declare function withBirdTip(error: unknown, url: string | null, env: Record<string, string | undefined>): Error;
|
|
23
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SummarizeConfig } from "../config.js";
|
|
2
1
|
import { type CacheState } from "../cache.js";
|
|
2
|
+
import type { SummarizeConfig } from "../config.js";
|
|
3
3
|
export declare function createCacheStateFromConfig({ envForRun, config, noCacheFlag, transcriptNamespace, }: {
|
|
4
4
|
envForRun: Record<string, string | undefined>;
|
|
5
5
|
config: SummarizeConfig | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ModelConfig } from "../config.js";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const TWITTER_CLI_TIP = "Tip: Install xurl (preferred) or bird for better X support: brew install --cask xdevplatform/tap/xurl";
|
|
3
|
+
export declare const BIRD_TIP = "Tip: Install xurl (preferred) or bird for better X support: brew install --cask xdevplatform/tap/xurl";
|
|
3
4
|
export declare const UVX_TIP = "Tip: Install uv (uvx) for local Markdown conversion: brew install uv (or set UVX_PATH to your uvx binary).";
|
|
4
5
|
export declare const SUPPORT_URL = "https://github.com/steipete/summarize";
|
|
5
6
|
export declare const TWITTER_HOSTS: Set<string>;
|
package/dist/types/run/env.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { CliProvider, SummarizeConfig } from "../config.js";
|
|
2
2
|
type ConfigForCli = SummarizeConfig | null;
|
|
3
3
|
export declare function resolveExecutableInPath(binary: string, env: Record<string, string | undefined>): string | null;
|
|
4
|
+
export declare function canSpawnCommand({ command, args, env, }: {
|
|
5
|
+
command: string;
|
|
6
|
+
args?: string[];
|
|
7
|
+
env: Record<string, string | undefined>;
|
|
8
|
+
}): Promise<boolean>;
|
|
4
9
|
export declare function hasBirdCli(env: Record<string, string | undefined>): boolean;
|
|
10
|
+
export declare function hasXurlCli(env: Record<string, string | undefined>): boolean;
|
|
5
11
|
export declare function hasUvxCli(env: Record<string, string | undefined>): boolean;
|
|
6
12
|
export declare function resolveCliAvailability({ env, config, }: {
|
|
7
13
|
env: Record<string, string | undefined>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ExtractDiagnosticsForFinishLine = {
|
|
2
|
+
strategy: "bird" | "xurl" | "firecrawl" | "html" | "nitter";
|
|
3
|
+
firecrawl: {
|
|
4
|
+
used: boolean;
|
|
5
|
+
};
|
|
6
|
+
markdown: {
|
|
7
|
+
used: boolean;
|
|
8
|
+
provider: "firecrawl" | "llm" | null;
|
|
9
|
+
notes?: string | null;
|
|
10
|
+
};
|
|
11
|
+
transcript: {
|
|
12
|
+
textProvided: boolean;
|
|
13
|
+
provider: string | null;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function buildExtractFinishLabel(args: {
|
|
17
|
+
extracted: {
|
|
18
|
+
diagnostics: ExtractDiagnosticsForFinishLine;
|
|
19
|
+
};
|
|
20
|
+
format: "text" | "markdown";
|
|
21
|
+
markdownMode: "off" | "auto" | "llm" | "readability";
|
|
22
|
+
hasMarkdownLlmCall: boolean;
|
|
23
|
+
}): string;
|
|
24
|
+
export declare function buildSummaryFinishLabel(args: {
|
|
25
|
+
extracted: {
|
|
26
|
+
diagnostics: ExtractDiagnosticsForFinishLine;
|
|
27
|
+
wordCount: number;
|
|
28
|
+
};
|
|
29
|
+
}): string | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ExtractedForLengths = {
|
|
2
|
+
url: string;
|
|
3
|
+
siteName: string | null;
|
|
4
|
+
totalCharacters: number;
|
|
5
|
+
wordCount: number;
|
|
6
|
+
transcriptCharacters: number | null;
|
|
7
|
+
transcriptLines: number | null;
|
|
8
|
+
transcriptWordCount: number | null;
|
|
9
|
+
transcriptSource: string | null;
|
|
10
|
+
transcriptionProvider: string | null;
|
|
11
|
+
mediaDurationSeconds: number | null;
|
|
12
|
+
video: {
|
|
13
|
+
kind: "youtube" | "direct";
|
|
14
|
+
url: string;
|
|
15
|
+
} | null;
|
|
16
|
+
isVideoOnly: boolean;
|
|
17
|
+
diagnostics: {
|
|
18
|
+
transcript: {
|
|
19
|
+
cacheStatus: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare function buildLengthPartsForFinishLine(extracted: ExtractedForLengths, detailed: boolean): string[] | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { buildExtractFinishLabel, buildSummaryFinishLabel, type ExtractDiagnosticsForFinishLine, } from "./finish-line-labels.js";
|
|
2
|
+
export { buildLengthPartsForFinishLine, type ExtractedForLengths } from "./finish-line-lengths.js";
|
|
1
3
|
export type FinishLineText = {
|
|
2
4
|
line: string;
|
|
3
5
|
details: string | null;
|
|
@@ -6,45 +8,7 @@ export type FinishLineModel = {
|
|
|
6
8
|
lineParts: string[];
|
|
7
9
|
detailParts: string[];
|
|
8
10
|
};
|
|
9
|
-
export type ExtractDiagnosticsForFinishLine = {
|
|
10
|
-
strategy: "bird" | "firecrawl" | "html" | "nitter";
|
|
11
|
-
firecrawl: {
|
|
12
|
-
used: boolean;
|
|
13
|
-
};
|
|
14
|
-
markdown: {
|
|
15
|
-
used: boolean;
|
|
16
|
-
provider: "firecrawl" | "llm" | null;
|
|
17
|
-
notes?: string | null;
|
|
18
|
-
};
|
|
19
|
-
transcript: {
|
|
20
|
-
textProvided: boolean;
|
|
21
|
-
provider: string | null;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type ExtractedForLengths = {
|
|
25
|
-
url: string;
|
|
26
|
-
siteName: string | null;
|
|
27
|
-
totalCharacters: number;
|
|
28
|
-
wordCount: number;
|
|
29
|
-
transcriptCharacters: number | null;
|
|
30
|
-
transcriptLines: number | null;
|
|
31
|
-
transcriptWordCount: number | null;
|
|
32
|
-
transcriptSource: string | null;
|
|
33
|
-
transcriptionProvider: string | null;
|
|
34
|
-
mediaDurationSeconds: number | null;
|
|
35
|
-
video: {
|
|
36
|
-
kind: "youtube" | "direct";
|
|
37
|
-
url: string;
|
|
38
|
-
} | null;
|
|
39
|
-
isVideoOnly: boolean;
|
|
40
|
-
diagnostics: {
|
|
41
|
-
transcript: {
|
|
42
|
-
cacheStatus: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
11
|
export declare function formatModelLabelForDisplay(model: string): string;
|
|
47
|
-
export declare function buildLengthPartsForFinishLine(extracted: ExtractedForLengths, detailed: boolean): string[] | null;
|
|
48
12
|
export declare function writeFinishLine({ stderr, elapsedMs, elapsedLabel, label, model, report, costUsd, detailed, extraParts, color, env, }: {
|
|
49
13
|
stderr: NodeJS.WritableStream;
|
|
50
14
|
elapsedMs: number;
|
|
@@ -151,17 +115,3 @@ export declare function buildFinishLineModel({ elapsedMs, elapsedLabel, label, m
|
|
|
151
115
|
costUsd: number | null;
|
|
152
116
|
extraParts?: string[] | null;
|
|
153
117
|
}): FinishLineModel;
|
|
154
|
-
export declare function buildExtractFinishLabel(args: {
|
|
155
|
-
extracted: {
|
|
156
|
-
diagnostics: ExtractDiagnosticsForFinishLine;
|
|
157
|
-
};
|
|
158
|
-
format: "text" | "markdown";
|
|
159
|
-
markdownMode: "off" | "auto" | "llm" | "readability";
|
|
160
|
-
hasMarkdownLlmCall: boolean;
|
|
161
|
-
}): string;
|
|
162
|
-
export declare function buildSummaryFinishLabel(args: {
|
|
163
|
-
extracted: {
|
|
164
|
-
diagnostics: ExtractDiagnosticsForFinishLine;
|
|
165
|
-
wordCount: number;
|
|
166
|
-
};
|
|
167
|
-
}): string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExecFileFn } from "../../../markitdown.js";
|
|
2
|
-
import type { ExtractDiagnosticsForFinishLine } from "../../finish-line.js";
|
|
3
2
|
import { type AssetAttachment } from "../../attachments.js";
|
|
3
|
+
import type { ExtractDiagnosticsForFinishLine } from "../../finish-line.js";
|
|
4
4
|
export type AssetExtractContext = {
|
|
5
5
|
env: Record<string, string | undefined>;
|
|
6
6
|
envForRun: Record<string, string | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SummarizeAssetArgs } from "./summary.js";
|
|
2
1
|
import { type InputTarget, loadRemoteAsset } from "../../../content/asset.js";
|
|
3
2
|
import { startSpinner } from "../../../tty/spinner.js";
|
|
3
|
+
import type { SummarizeAssetArgs } from "./summary.js";
|
|
4
4
|
/**
|
|
5
5
|
* Check if a file extension indicates transcribable media.
|
|
6
6
|
* Used to route large audio/video files directly to the media handler
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OutputLanguage } from "../../../language.js";
|
|
2
2
|
import type { Attachment } from "../../../llm/attachments.js";
|
|
3
|
+
import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
|
|
3
4
|
import type { FixedModelSpec } from "../../../model-spec.js";
|
|
4
5
|
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
5
|
-
import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
|
|
6
6
|
import { type AssetAttachment } from "../../attachments.js";
|
|
7
7
|
export type AssetPreprocessContext = {
|
|
8
8
|
env: Record<string, string | undefined>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CliProvider } from "../../../config.js";
|
|
2
|
+
import type { ModelAttempt } from "../../types.js";
|
|
3
|
+
import type { AssetSummaryContext, SummarizeAssetArgs } from "./summary.js";
|
|
4
|
+
export declare function buildAssetModelAttempts({ ctx, kind, promptTokensForAuto, requiresVideoUnderstanding, lastSuccessfulCliProvider, }: {
|
|
5
|
+
ctx: AssetSummaryContext;
|
|
6
|
+
kind: "video" | "image" | "text" | "file";
|
|
7
|
+
promptTokensForAuto: number | null;
|
|
8
|
+
requiresVideoUnderstanding: boolean;
|
|
9
|
+
lastSuccessfulCliProvider: CliProvider | null;
|
|
10
|
+
}): Promise<ModelAttempt[]>;
|
|
11
|
+
export declare function buildAssetCliContext({ ctx, args, attempts, attachmentsCount, summaryLengthTarget, }: {
|
|
12
|
+
ctx: AssetSummaryContext;
|
|
13
|
+
args: SummarizeAssetArgs;
|
|
14
|
+
attempts: ModelAttempt[];
|
|
15
|
+
attachmentsCount: number;
|
|
16
|
+
summaryLengthTarget: import("../../../shared/contracts.js").SummaryLength | {
|
|
17
|
+
maxCharacters: number;
|
|
18
|
+
};
|
|
19
|
+
}): Promise<{
|
|
20
|
+
promptOverride: string;
|
|
21
|
+
allowTools: boolean;
|
|
22
|
+
cwd: string;
|
|
23
|
+
extraArgsByProvider: Partial<Record<CliProvider, string[]>>;
|
|
24
|
+
} | null>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CacheState } from "../../../cache.js";
|
|
1
2
|
import type { CliProvider, SummarizeConfig } from "../../../config.js";
|
|
2
3
|
import type { MediaCache } from "../../../content/index.js";
|
|
3
4
|
import type { LlmCall, RunMetricsReport } from "../../../costs.js";
|
|
@@ -5,9 +6,8 @@ import type { OutputLanguage } from "../../../language.js";
|
|
|
5
6
|
import type { ExecFileFn } from "../../../markitdown.js";
|
|
6
7
|
import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
|
|
7
8
|
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
8
|
-
import type { createSummaryEngine } from "../../summary-engine.js";
|
|
9
|
-
import { type CacheState } from "../../../cache.js";
|
|
10
9
|
import { type AssetAttachment } from "../../attachments.js";
|
|
10
|
+
import type { createSummaryEngine } from "../../summary-engine.js";
|
|
11
11
|
export type AssetSummaryContext = {
|
|
12
12
|
env: Record<string, string | undefined>;
|
|
13
13
|
envForRun: Record<string, string | undefined>;
|
|
@@ -69,6 +69,7 @@ export type AssetSummaryContext = {
|
|
|
69
69
|
apiStatus: {
|
|
70
70
|
xaiApiKey: string | null;
|
|
71
71
|
apiKey: string | null;
|
|
72
|
+
nvidiaApiKey: string | null;
|
|
72
73
|
openrouterApiKey: string | null;
|
|
73
74
|
apifyToken: string | null;
|
|
74
75
|
firecrawlConfigured: boolean;
|
|
@@ -76,14 +77,27 @@ export type AssetSummaryContext = {
|
|
|
76
77
|
anthropicConfigured: boolean;
|
|
77
78
|
providerBaseUrls: {
|
|
78
79
|
openai: string | null;
|
|
80
|
+
nvidia: string | null;
|
|
79
81
|
anthropic: string | null;
|
|
80
82
|
google: string | null;
|
|
81
83
|
xai: string | null;
|
|
82
84
|
};
|
|
83
85
|
zaiApiKey: string | null;
|
|
84
86
|
zaiBaseUrl: string;
|
|
87
|
+
nvidiaBaseUrl: string;
|
|
88
|
+
assemblyaiApiKey: string | null;
|
|
85
89
|
};
|
|
86
90
|
};
|
|
91
|
+
export type AssetSummaryContextInput = {
|
|
92
|
+
io: Pick<AssetSummaryContext, "env" | "envForRun" | "stdout" | "stderr" | "execFileImpl" | "trackedFetch">;
|
|
93
|
+
summary: Pick<AssetSummaryContext, "timeoutMs" | "preprocessMode" | "format" | "extractMode" | "lengthArg" | "forceSummary" | "outputLanguage" | "videoMode" | "promptOverride" | "lengthInstruction" | "languageInstruction" | "maxOutputTokensArg" | "summaryCacheBypass">;
|
|
94
|
+
model: Pick<AssetSummaryContext, "fixedModelSpec" | "isFallbackModel" | "isImplicitAutoSelection" | "allowAutoCliFallback" | "desiredOutputTokens" | "envForAuto" | "configForModelSelection" | "cliAvailability" | "requestedModel" | "requestedModelInput" | "requestedModelLabel" | "wantsFreeNamedModel" | "isNamedModelSelection" | "summaryEngine" | "getLiteLlmCatalog" | "llmCalls">;
|
|
95
|
+
output: Pick<AssetSummaryContext, "json" | "metricsEnabled" | "metricsDetailed" | "shouldComputeReport" | "runStartedAtMs" | "verbose" | "verboseColor" | "streamingEnabled" | "plain">;
|
|
96
|
+
hooks: Pick<AssetSummaryContext, "writeViaFooter" | "clearProgressForStdout" | "restoreProgressAfterStdout" | "buildReport" | "estimateCostUsd">;
|
|
97
|
+
cache: Pick<AssetSummaryContext, "cache" | "mediaCache">;
|
|
98
|
+
apiStatus: AssetSummaryContext["apiStatus"];
|
|
99
|
+
};
|
|
100
|
+
export declare function createAssetSummaryContext(input: AssetSummaryContextInput): AssetSummaryContext;
|
|
87
101
|
export type SummarizeAssetArgs = {
|
|
88
102
|
sourceKind: "file" | "asset-url";
|
|
89
103
|
sourceLabel: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createLinkPreviewClient, type ExtractedLinkContent, type LinkPreviewProgressEvent } from "../../../content/index.js";
|
|
2
|
+
import type { UrlFlowContext } from "./types.js";
|
|
3
|
+
type LinkPreviewClientOptions = NonNullable<Parameters<typeof createLinkPreviewClient>[0]>;
|
|
4
|
+
type ConvertHtmlToMarkdown = LinkPreviewClientOptions["convertHtmlToMarkdown"];
|
|
5
|
+
type LinkPreviewProgressHandler = ((event: LinkPreviewProgressEvent) => void) | null;
|
|
6
|
+
export type UrlExtractionSession = {
|
|
7
|
+
cacheStore: UrlFlowContext["cache"]["store"] | null;
|
|
8
|
+
fetchInitialExtract: (url: string) => Promise<ExtractedLinkContent>;
|
|
9
|
+
fetchWithCache: (targetUrl: string, options?: {
|
|
10
|
+
bypassExtractCache?: boolean;
|
|
11
|
+
}) => Promise<ExtractedLinkContent>;
|
|
12
|
+
};
|
|
13
|
+
export declare function createUrlExtractionSession({ ctx, markdown, onProgress, }: {
|
|
14
|
+
ctx: UrlFlowContext;
|
|
15
|
+
markdown: {
|
|
16
|
+
convertHtmlToMarkdown: ConvertHtmlToMarkdown;
|
|
17
|
+
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
18
|
+
markdownRequested: boolean;
|
|
19
|
+
};
|
|
20
|
+
onProgress: LinkPreviewProgressHandler;
|
|
21
|
+
}): UrlExtractionSession;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CacheMode, FetchLinkContentOptions } from "../../../content/index.js";
|
|
2
|
+
type UrlFetchFlags = {
|
|
3
|
+
timeoutMs: number;
|
|
4
|
+
maxExtractCharacters?: number | null;
|
|
5
|
+
youtubeMode: "auto" | "web" | "apify" | "yt-dlp" | "no-auto";
|
|
6
|
+
videoMode: "auto" | "transcript" | "understand";
|
|
7
|
+
transcriptTimestamps: boolean;
|
|
8
|
+
firecrawlMode: "off" | "auto" | "always";
|
|
9
|
+
slides: object | null;
|
|
10
|
+
};
|
|
11
|
+
type UrlMarkdownOptions = {
|
|
12
|
+
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
13
|
+
markdownRequested: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function shouldPreferTranscriptForTarget({ targetUrl, videoMode, slides, }: {
|
|
16
|
+
targetUrl: string;
|
|
17
|
+
videoMode: UrlFetchFlags["videoMode"];
|
|
18
|
+
slides: UrlFetchFlags["slides"];
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function resolveUrlFetchOptions({ targetUrl, flags, markdown, cacheMode, }: {
|
|
21
|
+
targetUrl: string;
|
|
22
|
+
flags: UrlFetchFlags;
|
|
23
|
+
markdown: UrlMarkdownOptions;
|
|
24
|
+
cacheMode: CacheMode;
|
|
25
|
+
}): {
|
|
26
|
+
localFile: boolean;
|
|
27
|
+
options: FetchLinkContentOptions;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { createThemeRenderer } from "../../../tty/theme.js";
|
|
2
|
+
import { type UrlFlowContext } from "./types.js";
|
|
3
|
+
export declare function writeSlidesBackgroundFailureWarning({ ctx, theme, message, }: {
|
|
4
|
+
ctx: Pick<UrlFlowContext, "io" | "flags" | "hooks">;
|
|
5
|
+
theme: ReturnType<typeof createThemeRenderer>;
|
|
6
|
+
message: string;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function createUrlFlowProgress({ ctx, theme, }: {
|
|
9
|
+
ctx: UrlFlowContext;
|
|
10
|
+
theme: ReturnType<typeof createThemeRenderer>;
|
|
11
|
+
}): {
|
|
12
|
+
progressStatus: {
|
|
13
|
+
setSummary(text: string, oscLabel?: string | null): void;
|
|
14
|
+
setSlides(text: string, percent?: number | null): void;
|
|
15
|
+
clearSlides(): void;
|
|
16
|
+
isSlidesActive(): boolean;
|
|
17
|
+
getSummaryText(): string | null;
|
|
18
|
+
getSlidesText(): string | null;
|
|
19
|
+
};
|
|
20
|
+
hooks: import("./types.js").UrlFlowHooks;
|
|
21
|
+
pauseProgress: () => () => void;
|
|
22
|
+
renderStatus: (label: string, detail?: string) => string;
|
|
23
|
+
renderStatusFromText: (text: string) => string;
|
|
24
|
+
renderStatusWithMeta: (label: string, meta: string, suffix?: string) => string;
|
|
25
|
+
spinner: {
|
|
26
|
+
stop: () => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
pause: () => void;
|
|
29
|
+
refresh: () => void;
|
|
30
|
+
resume: () => void;
|
|
31
|
+
stopAndClear: () => void;
|
|
32
|
+
setText: (next: string) => void;
|
|
33
|
+
};
|
|
34
|
+
styleDim: (text: string) => string;
|
|
35
|
+
styleLabel: (text: string) => string;
|
|
36
|
+
handleSigint: () => never;
|
|
37
|
+
handleSigterm: () => never;
|
|
38
|
+
stopProgress: () => void;
|
|
39
|
+
websiteProgress: {
|
|
40
|
+
stop: () => void;
|
|
41
|
+
onProgress: (event: import("@steipete/summarize-core").LinkPreviewProgressEvent) => void;
|
|
42
|
+
} | null;
|
|
43
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type ConvertTranscriptToMarkdown } from "../../../llm/transcript-to-markdown.js";
|
|
1
2
|
import type { ModelAttempt } from "../../types.js";
|
|
2
3
|
import type { UrlFlowContext } from "./types.js";
|
|
3
|
-
import { type ConvertTranscriptToMarkdown } from "../../../llm/transcript-to-markdown.js";
|
|
4
4
|
export type MarkdownModel = {
|
|
5
5
|
llmModelId: string;
|
|
6
6
|
forceOpenRouter: boolean;
|
|
@@ -13,7 +13,7 @@ export type MarkdownConverters = {
|
|
|
13
13
|
markdownRequested: boolean;
|
|
14
14
|
transcriptMarkdownRequested: boolean;
|
|
15
15
|
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
16
|
-
markdownProvider: "none" | "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
16
|
+
markdownProvider: "none" | "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia" | "github-copilot";
|
|
17
17
|
markdownModel: MarkdownModel | null;
|
|
18
18
|
convertHtmlToMarkdown: ((args: {
|
|
19
19
|
url: string;
|