@steipete/summarize 0.11.1 → 0.12.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 +38 -1
- package/README.md +63 -17
- package/dist/cli.js +1 -1
- package/dist/esm/cache-keys.js +75 -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 +14 -91
- 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 +50 -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 +438 -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/daemon/agent-model.js +235 -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 +69 -8
- package/dist/esm/daemon/chat.js.map +1 -1
- package/dist/esm/daemon/cli.js +21 -4
- 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 +4 -0
- package/dist/esm/daemon/env-snapshot.js.map +1 -1
- package/dist/esm/daemon/flow-context.js +8 -1
- package/dist/esm/daemon/flow-context.js.map +1 -1
- package/dist/esm/daemon/models.js +16 -0
- package/dist/esm/daemon/models.js.map +1 -1
- package/dist/esm/daemon/process-registry.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 +72 -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/llm/cli-exec.js +75 -0
- package/dist/esm/llm/cli-exec.js.map +1 -0
- package/dist/esm/llm/cli-provider-output.js +191 -0
- package/dist/esm/llm/cli-provider-output.js.map +1 -0
- package/dist/esm/llm/cli.js +3 -212
- 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 +102 -0
- package/dist/esm/llm/generate-text-shared.js.map +1 -0
- package/dist/esm/llm/generate-text-stream.js +258 -0
- package/dist/esm/llm/generate-text-stream.js.map +1 -0
- package/dist/esm/llm/generate-text.js +145 -480
- package/dist/esm/llm/generate-text.js.map +1 -1
- package/dist/esm/llm/model-id.js +21 -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 +142 -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 +13 -0
- package/dist/esm/llm/providers/models.js.map +1 -1
- package/dist/esm/llm/providers/openai.js.map +1 -1
- package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
- package/dist/esm/model-auto-cli.js +89 -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 +23 -17
- 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/constants.js +2 -1
- package/dist/esm/run/constants.js.map +1 -1
- package/dist/esm/run/env.js +3 -0
- 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 +109 -0
- package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -0
- package/dist/esm/run/flows/asset/summary.js +19 -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/flow-progress.js +119 -0
- package/dist/esm/run/flows/url/flow-progress.js.map +1 -0
- package/dist/esm/run/flows/url/flow.js +22 -93
- package/dist/esm/run/flows/url/flow.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +21 -3
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/flows/url/progress-status.js +56 -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-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 +34 -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 +320 -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 +49 -543
- package/dist/esm/run/flows/url/summary.js.map +1 -1
- package/dist/esm/run/help.js +9 -3
- 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-env.js +28 -7
- package/dist/esm/run/run-env.js.map +1 -1
- package/dist/esm/run/run-settings-parse.js +73 -0
- package/dist/esm/run/run-settings-parse.js.map +1 -0
- package/dist/esm/run/run-settings.js +1 -72
- package/dist/esm/run/run-settings.js.map +1 -1
- package/dist/esm/run/runner-contexts.js +116 -0
- package/dist/esm/run/runner-contexts.js.map +1 -0
- package/dist/esm/run/runner-execution.js +62 -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-setup.js +109 -0
- package/dist/esm/run/runner-setup.js.map +1 -0
- package/dist/esm/run/runner-slides.js +38 -0
- package/dist/esm/run/runner-slides.js.map +1 -0
- package/dist/esm/run/runner.js +99 -390
- package/dist/esm/run/runner.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 +1 -0
- package/dist/esm/run/streaming.js.map +1 -1
- package/dist/esm/run/summary-engine.js +26 -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/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 +64 -1621
- 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/ingest.js +167 -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/tty/progress/fetch-html.js.map +1 -1
- package/dist/esm/tty/progress/transcript.js +21 -8
- package/dist/esm/tty/progress/transcript.js.map +1 -1
- package/dist/esm/tty/spinner.js +8 -2
- package/dist/esm/tty/spinner.js.map +1 -1
- package/dist/esm/tty/website-progress.js +5 -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 +1 -9
- 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 +33 -0
- package/dist/types/config/types.d.ts +230 -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 +1 -1
- package/dist/types/daemon/models.d.ts +1 -0
- 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 +3 -4
- package/dist/types/daemon/summarize.d.ts +1 -1
- package/dist/types/llm/cli-exec.d.ts +13 -0
- package/dist/types/llm/cli-provider-output.d.ts +16 -0
- package/dist/types/llm/generate-text-document.d.ts +34 -0
- package/dist/types/llm/generate-text-shared.d.ts +25 -0
- package/dist/types/llm/generate-text-stream.d.ts +26 -0
- package/dist/types/llm/generate-text.d.ts +6 -26
- package/dist/types/llm/html-to-markdown.d.ts +1 -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/transcript-to-markdown.d.ts +1 -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 +2 -2
- package/dist/types/run/attachments.d.ts +2 -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 +1 -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 +6 -2
- package/dist/types/run/flows/url/flow-progress.d.ts +41 -0
- package/dist/types/run/flows/url/markdown.d.ts +2 -2
- package/dist/types/run/flows/url/progress-status.d.ts +16 -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-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 +4 -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/runner-contexts.d.ts +62 -0
- package/dist/types/run/runner-execution.d.ts +57 -0
- package/dist/types/run/runner-flags.d.ts +41 -0
- package/dist/types/run/runner-setup.d.ts +21 -0
- package/dist/types/run/runner-slides.d.ts +8 -0
- package/dist/types/run/streaming.d.ts +1 -1
- package/dist/types/run/summary-engine.d.ts +8 -4
- package/dist/types/run/summary-llm.d.ts +4 -3
- package/dist/types/run/terminal.d.ts +2 -0
- package/dist/types/run/types.d.ts +2 -2
- 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 +1 -7
- package/dist/types/slides/frame-extraction.d.ts +38 -0
- 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/version.d.ts +1 -1
- package/docs/_config.yml +1 -0
- package/docs/agent.md +3 -2
- package/docs/assets/site.css +134 -2
- package/docs/cache.md +2 -1
- package/docs/chrome-extension.md +12 -4
- package/docs/cli.md +2 -2
- package/docs/config.md +11 -4
- package/docs/index.html +5 -0
- package/docs/llm.md +5 -2
- package/docs/manual-tests.md +3 -0
- package/docs/media.md +3 -1
- package/docs/model-auto.md +2 -2
- package/docs/model-provider-resolution.md +57 -0
- 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 +66 -0
- package/docs/website.md +1 -0
- package/docs/youtube.md +4 -2
- package/package.json +11 -11
|
@@ -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[];
|
|
@@ -3,10 +3,10 @@ export type FixedModelSpec = {
|
|
|
3
3
|
transport: "native";
|
|
4
4
|
userModelId: string;
|
|
5
5
|
llmModelId: string;
|
|
6
|
-
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
6
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia";
|
|
7
7
|
openrouterProviders: string[] | null;
|
|
8
8
|
forceOpenRouter: false;
|
|
9
|
-
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY";
|
|
9
|
+
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY" | "NVIDIA_API_KEY";
|
|
10
10
|
openaiBaseUrlOverride?: string | null;
|
|
11
11
|
forceChatCompletions?: boolean;
|
|
12
12
|
} | {
|
|
@@ -19,14 +19,14 @@ export declare function ensureCliAttachmentPath({ sourceKind, sourceLabel, attac
|
|
|
19
19
|
}): Promise<string>;
|
|
20
20
|
export declare function shouldMarkitdownConvertMediaType(mediaType: string): boolean;
|
|
21
21
|
export declare function supportsNativeFileAttachment({ provider, attachment, }: {
|
|
22
|
-
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
22
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia";
|
|
23
23
|
attachment: {
|
|
24
24
|
kind: "image" | "file";
|
|
25
25
|
mediaType: string;
|
|
26
26
|
};
|
|
27
27
|
}): boolean;
|
|
28
28
|
export declare function assertProviderSupportsAttachment({ provider, modelId, attachment, }: {
|
|
29
|
-
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
29
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia";
|
|
30
30
|
modelId: string;
|
|
31
31
|
attachment: {
|
|
32
32
|
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
|
@@ -2,6 +2,7 @@ import type { CliProvider, SummarizeConfig } from "../config.js";
|
|
|
2
2
|
type ConfigForCli = SummarizeConfig | null;
|
|
3
3
|
export declare function resolveExecutableInPath(binary: string, env: Record<string, string | undefined>): string | null;
|
|
4
4
|
export declare function hasBirdCli(env: Record<string, string | undefined>): boolean;
|
|
5
|
+
export declare function hasXurlCli(env: Record<string, string | undefined>): boolean;
|
|
5
6
|
export declare function hasUvxCli(env: Record<string, string | undefined>): boolean;
|
|
6
7
|
export declare function resolveCliAvailability({ env, config, }: {
|
|
7
8
|
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,12 +77,15 @@ 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
|
};
|
|
87
91
|
export type SummarizeAssetArgs = {
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
pauseProgress: () => () => void;
|
|
21
|
+
renderStatus: (label: string, detail?: string) => string;
|
|
22
|
+
renderStatusFromText: (text: string) => string;
|
|
23
|
+
renderStatusWithMeta: (label: string, meta: string, suffix?: string) => string;
|
|
24
|
+
spinner: {
|
|
25
|
+
stop: () => void;
|
|
26
|
+
clear: () => void;
|
|
27
|
+
pause: () => void;
|
|
28
|
+
resume: () => void;
|
|
29
|
+
stopAndClear: () => void;
|
|
30
|
+
setText: (next: string) => void;
|
|
31
|
+
};
|
|
32
|
+
styleDim: (text: string) => string;
|
|
33
|
+
styleLabel: (text: string) => string;
|
|
34
|
+
handleSigint: () => never;
|
|
35
|
+
handleSigterm: () => never;
|
|
36
|
+
stopProgress: () => void;
|
|
37
|
+
websiteProgress: {
|
|
38
|
+
stop: () => void;
|
|
39
|
+
onProgress: (event: import("@steipete/summarize-core").LinkPreviewProgressEvent) => void;
|
|
40
|
+
} | null;
|
|
41
|
+
};
|
|
@@ -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";
|
|
17
17
|
markdownModel: MarkdownModel | null;
|
|
18
18
|
convertHtmlToMarkdown: ((args: {
|
|
19
19
|
url: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OscProgressController } from "../../../tty/osc-progress.js";
|
|
2
|
+
export declare function createUrlProgressStatus({ enabled, spinner, oscProgress, now, }: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
spinner: {
|
|
5
|
+
setText: (text: string) => void;
|
|
6
|
+
};
|
|
7
|
+
oscProgress: OscProgressController;
|
|
8
|
+
now?: () => number;
|
|
9
|
+
}): {
|
|
10
|
+
setSummary(text: string, oscLabel?: string | null): void;
|
|
11
|
+
setSlides(text: string, percent?: number | null): void;
|
|
12
|
+
clearSlides(): void;
|
|
13
|
+
isSlidesActive(): boolean;
|
|
14
|
+
getSummaryText(): string | null;
|
|
15
|
+
getSlidesText(): string | null;
|
|
16
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SlideExtractionResult } from "../../../slides/index.js";
|
|
2
|
+
import type { SlideState } from "./slides-output-state.js";
|
|
3
|
+
export declare function createInlineSlidesUnsupportedNotifier({ inlineNoticeEnabled, flags, io, richTty, clearProgressForStdout, restoreProgressAfterStdout, }: {
|
|
4
|
+
inlineNoticeEnabled: boolean;
|
|
5
|
+
flags: {
|
|
6
|
+
plain: boolean;
|
|
7
|
+
};
|
|
8
|
+
io: {
|
|
9
|
+
stderr: NodeJS.WritableStream;
|
|
10
|
+
};
|
|
11
|
+
richTty: boolean;
|
|
12
|
+
clearProgressForStdout: () => void;
|
|
13
|
+
restoreProgressAfterStdout?: (() => void) | null;
|
|
14
|
+
}): (nextSlides: SlideExtractionResult) => void;
|
|
15
|
+
export declare function createSlidesTerminalRenderer({ io, flags, inlineEnabled, richTty, inlineRenderer, labelTheme, clearProgressForStdout, restoreProgressAfterStdout, onProgressText, getOrder, getSlide, getSourceUrl, waitForSlide, initialSlides, }: {
|
|
16
|
+
io: {
|
|
17
|
+
stdout: NodeJS.WritableStream;
|
|
18
|
+
};
|
|
19
|
+
flags: {
|
|
20
|
+
slidesDebug?: boolean;
|
|
21
|
+
};
|
|
22
|
+
inlineEnabled: boolean;
|
|
23
|
+
richTty: boolean;
|
|
24
|
+
inlineRenderer: {
|
|
25
|
+
renderSlide: (slide: {
|
|
26
|
+
index: number;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
imagePath: string;
|
|
29
|
+
}, title?: string | null) => Promise<boolean>;
|
|
30
|
+
} | null;
|
|
31
|
+
labelTheme: {
|
|
32
|
+
dim: (text: string) => string;
|
|
33
|
+
heading: (text: string) => string;
|
|
34
|
+
};
|
|
35
|
+
clearProgressForStdout: () => void;
|
|
36
|
+
restoreProgressAfterStdout?: (() => void) | null;
|
|
37
|
+
onProgressText?: ((text: string) => void) | null;
|
|
38
|
+
getOrder: () => number[];
|
|
39
|
+
getSlide: (index: number) => SlideState | null;
|
|
40
|
+
getSourceUrl: () => string;
|
|
41
|
+
waitForSlide: (index: number) => Promise<SlideState | null>;
|
|
42
|
+
initialSlides: SlideExtractionResult | null | undefined;
|
|
43
|
+
}): (index: number, title?: string | null) => Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SlideImage, SlideExtractionResult } from "../../../slides/index.js";
|
|
2
|
+
import type { SlideTimelineEntry } from "./slides-text.js";
|
|
3
|
+
export type SlideState = SlideTimelineEntry & {
|
|
4
|
+
imagePath: string | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function createSlideOutputState(initialSlides: SlideExtractionResult | null | undefined): {
|
|
7
|
+
setMeta: (meta: {
|
|
8
|
+
slidesDir?: string | null;
|
|
9
|
+
sourceUrl?: string | null;
|
|
10
|
+
}) => void;
|
|
11
|
+
updateFromSlides: (slides: SlideExtractionResult) => void;
|
|
12
|
+
updateSlideEntry: (slide: SlideImage) => void;
|
|
13
|
+
waitForSlide: (index: number) => Promise<SlideState | null>;
|
|
14
|
+
markDone: () => void;
|
|
15
|
+
getSlides: () => SlideState[];
|
|
16
|
+
getSlide: (index: number) => SlideState | null;
|
|
17
|
+
getOrder: () => number[];
|
|
18
|
+
getSlidesDir: () => string;
|
|
19
|
+
getSourceUrl: () => string;
|
|
20
|
+
isDone: () => boolean;
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type StreamOutputMode } from "../../stream-output.js";
|
|
2
|
+
import type { SummaryStreamHandler } from "../../summary-engine.js";
|
|
3
|
+
export declare function createSlidesSummaryStreamHandler({ stdout, env, envForRun, plain, outputMode, clearProgressForStdout, restoreProgressAfterStdout, renderSlide, getSlideIndexOrder, getSlideMeta, debugWrite, }: {
|
|
4
|
+
stdout: NodeJS.WritableStream;
|
|
5
|
+
env: Record<string, string | undefined>;
|
|
6
|
+
envForRun: Record<string, string | undefined>;
|
|
7
|
+
plain: boolean;
|
|
8
|
+
outputMode: StreamOutputMode;
|
|
9
|
+
clearProgressForStdout: () => void;
|
|
10
|
+
restoreProgressAfterStdout?: (() => void) | null;
|
|
11
|
+
renderSlide: (index: number, title?: string | null) => Promise<void>;
|
|
12
|
+
getSlideIndexOrder: () => number[];
|
|
13
|
+
getSlideMeta?: ((index: number) => {
|
|
14
|
+
total: number;
|
|
15
|
+
timestamp: number | null;
|
|
16
|
+
}) | null;
|
|
17
|
+
debugWrite?: ((text: string) => void) | null;
|
|
18
|
+
}): SummaryStreamHandler;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
2
2
|
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
3
3
|
import type { SlideExtractionResult, SlideImage, SlideSourceKind } from "../../../slides/index.js";
|
|
4
|
+
import type { StreamOutputMode } from "../../stream-output.js";
|
|
4
5
|
import type { SummaryStreamHandler } from "../../summary-engine.js";
|
|
5
|
-
|
|
6
|
+
export { createSlidesSummaryStreamHandler } from "./slides-output-stream.js";
|
|
6
7
|
export type SlidesTerminalOutput = {
|
|
7
8
|
onSlidesExtracted: (slides: SlideExtractionResult) => void;
|
|
8
9
|
onSlidesDone: (result: {
|
|
@@ -48,19 +49,3 @@ export declare function createSlidesTerminalOutput({ io, flags, extracted, slide
|
|
|
48
49
|
restoreProgressAfterStdout?: (() => void) | null;
|
|
49
50
|
onProgressText?: ((text: string) => void) | null;
|
|
50
51
|
}): SlidesTerminalOutput | null;
|
|
51
|
-
export declare function createSlidesSummaryStreamHandler({ stdout, env, envForRun, plain, outputMode, clearProgressForStdout, restoreProgressAfterStdout, renderSlide, getSlideIndexOrder, getSlideMeta, debugWrite, }: {
|
|
52
|
-
stdout: NodeJS.WritableStream;
|
|
53
|
-
env: Record<string, string | undefined>;
|
|
54
|
-
envForRun: Record<string, string | undefined>;
|
|
55
|
-
plain: boolean;
|
|
56
|
-
outputMode: StreamOutputMode;
|
|
57
|
-
clearProgressForStdout: () => void;
|
|
58
|
-
restoreProgressAfterStdout?: (() => void) | null;
|
|
59
|
-
renderSlide: (index: number, title?: string | null) => Promise<void>;
|
|
60
|
-
getSlideIndexOrder: () => number[];
|
|
61
|
-
getSlideMeta?: ((index: number) => {
|
|
62
|
-
total: number;
|
|
63
|
-
timestamp: number | null;
|
|
64
|
-
}) | null;
|
|
65
|
-
debugWrite?: ((text: string) => void) | null;
|
|
66
|
-
}): SummaryStreamHandler;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
2
|
+
import type { SlideTimelineEntry } from "./slides-text-types.js";
|
|
3
|
+
export declare const splitSlideTitleFromText: ({ text, }: {
|
|
4
|
+
text: string;
|
|
5
|
+
slideIndex: number;
|
|
6
|
+
total: number;
|
|
7
|
+
}) => {
|
|
8
|
+
title: string | null;
|
|
9
|
+
body: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const ensureSlideTitleLine: ({ text, slide, total, }: {
|
|
12
|
+
text: string;
|
|
13
|
+
slide: SlideTimelineEntry;
|
|
14
|
+
total: number;
|
|
15
|
+
}) => string;
|
|
16
|
+
export declare function findSlidesSectionStart(markdown: string): number | null;
|
|
17
|
+
export declare function splitSummaryFromSlides(markdown: string): {
|
|
18
|
+
summary: string;
|
|
19
|
+
slidesSection: string | null;
|
|
20
|
+
};
|
|
21
|
+
export declare function parseSlideSummariesFromMarkdown(markdown: string): Map<number, string>;
|
|
22
|
+
export declare function extractSlideMarkers(markdown: string): number[];
|
|
23
|
+
export declare function normalizeSummarySlideHeadings(markdown: string): string;
|
|
24
|
+
export declare function buildSlideTextFallback({ slides, transcriptTimedText, lengthArg, }: {
|
|
25
|
+
slides: SlideTimelineEntry[];
|
|
26
|
+
transcriptTimedText: string | null | undefined;
|
|
27
|
+
lengthArg: {
|
|
28
|
+
kind: "preset";
|
|
29
|
+
preset: SummaryLength;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "chars";
|
|
32
|
+
maxCharacters: number;
|
|
33
|
+
};
|
|
34
|
+
}): Map<number, string>;
|
|
35
|
+
export declare function coerceSummaryWithSlides({ markdown, slides, transcriptTimedText, lengthArg, }: {
|
|
36
|
+
markdown: string;
|
|
37
|
+
slides: SlideTimelineEntry[];
|
|
38
|
+
transcriptTimedText?: string | null;
|
|
39
|
+
lengthArg: {
|
|
40
|
+
kind: "preset";
|
|
41
|
+
preset: SummaryLength;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "chars";
|
|
44
|
+
maxCharacters: number;
|
|
45
|
+
};
|
|
46
|
+
}): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
2
|
+
import type { SlideTimelineEntry, TranscriptSegment } from "./slides-text-types.js";
|
|
3
|
+
export declare function interleaveSlidesIntoTranscript({ transcriptTimedText, slides, }: {
|
|
4
|
+
transcriptTimedText: string;
|
|
5
|
+
slides: SlideTimelineEntry[];
|
|
6
|
+
}): string;
|
|
7
|
+
export declare function parseTranscriptTimedText(input: string | null | undefined): TranscriptSegment[];
|
|
8
|
+
export declare function formatTimestamp(seconds: number): string;
|
|
9
|
+
export declare function resolveSlideTextBudget({ lengthArg, slideCount, }: {
|
|
10
|
+
lengthArg: {
|
|
11
|
+
kind: "preset";
|
|
12
|
+
preset: SummaryLength;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "chars";
|
|
15
|
+
maxCharacters: number;
|
|
16
|
+
};
|
|
17
|
+
slideCount: number;
|
|
18
|
+
}): number;
|
|
19
|
+
export declare function resolveSlideWindowSeconds({ lengthArg, }: {
|
|
20
|
+
lengthArg: {
|
|
21
|
+
kind: "preset";
|
|
22
|
+
preset: SummaryLength;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "chars";
|
|
25
|
+
maxCharacters: number;
|
|
26
|
+
};
|
|
27
|
+
}): number;
|
|
28
|
+
export declare function getTranscriptTextForSlide({ slide, nextSlide, segments, budget, windowSeconds, }: {
|
|
29
|
+
slide: SlideTimelineEntry;
|
|
30
|
+
nextSlide: SlideTimelineEntry | null;
|
|
31
|
+
segments: TranscriptSegment[];
|
|
32
|
+
budget: number;
|
|
33
|
+
windowSeconds: number;
|
|
34
|
+
}): string;
|
|
35
|
+
export declare function formatOsc8Link(label: string, url: string | null, enabled: boolean): string;
|
|
36
|
+
export declare function buildTimestampUrl(sourceUrl: string, seconds: number): string | null;
|