@steipete/summarize 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -28
- package/README.md +115 -30
- package/dist/cli.js +1 -1
- package/dist/esm/cache.js +67 -65
- package/dist/esm/cache.js.map +1 -1
- package/dist/esm/cli-main.js +27 -27
- package/dist/esm/cli-main.js.map +1 -1
- package/dist/esm/cli.js +2 -2
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/config.js +310 -166
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/content/asset.js +53 -50
- package/dist/esm/content/asset.js.map +1 -1
- package/dist/esm/content/index.js +1 -1
- package/dist/esm/content/index.js.map +1 -1
- package/dist/esm/costs.js +1 -1
- package/dist/esm/costs.js.map +1 -1
- package/dist/esm/daemon/agent.js +165 -164
- package/dist/esm/daemon/agent.js.map +1 -1
- package/dist/esm/daemon/auto-mode.js +3 -3
- package/dist/esm/daemon/auto-mode.js.map +1 -1
- package/dist/esm/daemon/chat.js +16 -14
- package/dist/esm/daemon/chat.js.map +1 -1
- package/dist/esm/daemon/cli-entrypoint.js +72 -0
- package/dist/esm/daemon/cli-entrypoint.js.map +1 -0
- package/dist/esm/daemon/cli.js +63 -87
- package/dist/esm/daemon/cli.js.map +1 -1
- package/dist/esm/daemon/config.js +15 -15
- package/dist/esm/daemon/config.js.map +1 -1
- package/dist/esm/daemon/constants.js +6 -6
- package/dist/esm/daemon/constants.js.map +1 -1
- package/dist/esm/daemon/env-merge.js.map +1 -1
- package/dist/esm/daemon/env-snapshot.js +36 -31
- package/dist/esm/daemon/env-snapshot.js.map +1 -1
- package/dist/esm/daemon/flow-context.js +59 -28
- package/dist/esm/daemon/flow-context.js.map +1 -1
- package/dist/esm/daemon/launchd.js +100 -55
- package/dist/esm/daemon/launchd.js.map +1 -1
- package/dist/esm/daemon/meta.js +5 -5
- package/dist/esm/daemon/meta.js.map +1 -1
- package/dist/esm/daemon/models.js +54 -31
- package/dist/esm/daemon/models.js.map +1 -1
- package/dist/esm/daemon/process-registry.js +15 -15
- package/dist/esm/daemon/process-registry.js.map +1 -1
- package/dist/esm/daemon/schtasks.js +42 -42
- package/dist/esm/daemon/schtasks.js.map +1 -1
- package/dist/esm/daemon/server.js +248 -244
- package/dist/esm/daemon/server.js.map +1 -1
- package/dist/esm/daemon/summarize-progress.js +11 -11
- package/dist/esm/daemon/summarize-progress.js.map +1 -1
- package/dist/esm/daemon/summarize.js +29 -29
- package/dist/esm/daemon/summarize.js.map +1 -1
- package/dist/esm/daemon/systemd.js +47 -47
- package/dist/esm/daemon/systemd.js.map +1 -1
- package/dist/esm/firecrawl.js +12 -12
- package/dist/esm/firecrawl.js.map +1 -1
- package/dist/esm/flags.js +32 -32
- package/dist/esm/flags.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/language.js +1 -1
- package/dist/esm/language.js.map +1 -1
- package/dist/esm/llm/cli.js +128 -64
- package/dist/esm/llm/cli.js.map +1 -1
- package/dist/esm/llm/errors.js +1 -1
- package/dist/esm/llm/errors.js.map +1 -1
- package/dist/esm/llm/generate-text.js +107 -98
- package/dist/esm/llm/generate-text.js.map +1 -1
- package/dist/esm/llm/google-models.js +17 -17
- package/dist/esm/llm/google-models.js.map +1 -1
- package/dist/esm/llm/html-to-markdown.js +3 -3
- package/dist/esm/llm/html-to-markdown.js.map +1 -1
- package/dist/esm/llm/model-id.js +38 -16
- package/dist/esm/llm/model-id.js.map +1 -1
- package/dist/esm/llm/prompt.js +5 -5
- package/dist/esm/llm/prompt.js.map +1 -1
- package/dist/esm/llm/providers/anthropic.js +33 -33
- package/dist/esm/llm/providers/anthropic.js.map +1 -1
- package/dist/esm/llm/providers/google.js +19 -19
- package/dist/esm/llm/providers/google.js.map +1 -1
- package/dist/esm/llm/providers/models.js +30 -30
- package/dist/esm/llm/providers/models.js.map +1 -1
- package/dist/esm/llm/providers/openai.js +35 -34
- package/dist/esm/llm/providers/openai.js.map +1 -1
- package/dist/esm/llm/providers/shared.js +8 -8
- package/dist/esm/llm/providers/shared.js.map +1 -1
- package/dist/esm/llm/transcript-to-markdown.js +9 -5
- package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
- package/dist/esm/llm/usage.js +18 -18
- package/dist/esm/llm/usage.js.map +1 -1
- package/dist/esm/logging/daemon.js +21 -21
- package/dist/esm/logging/daemon.js.map +1 -1
- package/dist/esm/logging/ring-file.js +5 -5
- package/dist/esm/logging/ring-file.js.map +1 -1
- package/dist/esm/markitdown.js +21 -19
- package/dist/esm/markitdown.js.map +1 -1
- package/dist/esm/media-cache.js +39 -39
- package/dist/esm/media-cache.js.map +1 -1
- package/dist/esm/model-auto.js +175 -106
- package/dist/esm/model-auto.js.map +1 -1
- package/dist/esm/model-spec.js +52 -42
- package/dist/esm/model-spec.js.map +1 -1
- package/dist/esm/pricing/litellm.js +4 -4
- package/dist/esm/pricing/litellm.js.map +1 -1
- package/dist/esm/processes.js +1 -1
- package/dist/esm/processes.js.map +1 -1
- package/dist/esm/prompts/index.js +1 -1
- package/dist/esm/prompts/index.js.map +1 -1
- package/dist/esm/refresh-free.js +81 -81
- package/dist/esm/refresh-free.js.map +1 -1
- package/dist/esm/run/attachments.js +47 -44
- package/dist/esm/run/attachments.js.map +1 -1
- package/dist/esm/run/bird.js +26 -26
- package/dist/esm/run/bird.js.map +1 -1
- package/dist/esm/run/cache-state.js +7 -7
- package/dist/esm/run/cache-state.js.map +1 -1
- package/dist/esm/run/cli-fallback-state.js +45 -0
- package/dist/esm/run/cli-fallback-state.js.map +1 -0
- package/dist/esm/run/cli-preflight.js +24 -24
- package/dist/esm/run/cli-preflight.js.map +1 -1
- package/dist/esm/run/constants.js +12 -12
- package/dist/esm/run/constants.js.map +1 -1
- package/dist/esm/run/cookies/twitter.js +47 -47
- package/dist/esm/run/cookies/twitter.js.map +1 -1
- package/dist/esm/run/env.js +21 -15
- package/dist/esm/run/env.js.map +1 -1
- package/dist/esm/run/fetch-with-timeout.js +4 -4
- package/dist/esm/run/fetch-with-timeout.js.map +1 -1
- package/dist/esm/run/finish-line.js +68 -68
- package/dist/esm/run/finish-line.js.map +1 -1
- package/dist/esm/run/flows/asset/extract.js +15 -15
- package/dist/esm/run/flows/asset/extract.js.map +1 -1
- package/dist/esm/run/flows/asset/input.js +47 -66
- package/dist/esm/run/flows/asset/input.js.map +1 -1
- package/dist/esm/run/flows/asset/media-policy.js +1 -1
- package/dist/esm/run/flows/asset/media-policy.js.map +1 -1
- package/dist/esm/run/flows/asset/media.js +49 -40
- package/dist/esm/run/flows/asset/media.js.map +1 -1
- package/dist/esm/run/flows/asset/output.js +12 -12
- package/dist/esm/run/flows/asset/output.js.map +1 -1
- package/dist/esm/run/flows/asset/preprocess.js +79 -44
- package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
- package/dist/esm/run/flows/asset/summary.js +173 -106
- package/dist/esm/run/flows/asset/summary.js.map +1 -1
- package/dist/esm/run/flows/url/extract.js +26 -26
- package/dist/esm/run/flows/url/extract.js.map +1 -1
- package/dist/esm/run/flows/url/flow.js +104 -98
- package/dist/esm/run/flows/url/flow.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +57 -57
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/flows/url/slides-output.js +61 -59
- package/dist/esm/run/flows/url/slides-output.js.map +1 -1
- package/dist/esm/run/flows/url/slides-text.js +85 -85
- package/dist/esm/run/flows/url/slides-text.js.map +1 -1
- package/dist/esm/run/flows/url/summary.js +174 -107
- package/dist/esm/run/flows/url/summary.js.map +1 -1
- package/dist/esm/run/format.js +10 -10
- package/dist/esm/run/format.js.map +1 -1
- package/dist/esm/run/help.js +141 -135
- package/dist/esm/run/help.js.map +1 -1
- package/dist/esm/run/logging.js +10 -10
- package/dist/esm/run/logging.js.map +1 -1
- package/dist/esm/run/markdown.js +12 -12
- package/dist/esm/run/markdown.js.map +1 -1
- package/dist/esm/run/media-cache-state.js +5 -5
- package/dist/esm/run/media-cache-state.js.map +1 -1
- package/dist/esm/run/model-attempts.js.map +1 -1
- package/dist/esm/run/openrouter.js +11 -11
- package/dist/esm/run/openrouter.js.map +1 -1
- package/dist/esm/run/progress.js +1 -1
- package/dist/esm/run/progress.js.map +1 -1
- package/dist/esm/run/run-config.js +16 -16
- package/dist/esm/run/run-config.js.map +1 -1
- package/dist/esm/run/run-context.js +2 -2
- package/dist/esm/run/run-context.js.map +1 -1
- package/dist/esm/run/run-env.js +55 -54
- package/dist/esm/run/run-env.js.map +1 -1
- package/dist/esm/run/run-input.js +3 -3
- package/dist/esm/run/run-input.js.map +1 -1
- package/dist/esm/run/run-metrics.js +16 -16
- package/dist/esm/run/run-metrics.js.map +1 -1
- package/dist/esm/run/run-models.js +28 -23
- package/dist/esm/run/run-models.js.map +1 -1
- package/dist/esm/run/run-output.js +3 -3
- package/dist/esm/run/run-output.js.map +1 -1
- package/dist/esm/run/run-settings.js +83 -34
- package/dist/esm/run/run-settings.js.map +1 -1
- package/dist/esm/run/run-stream.js +4 -4
- package/dist/esm/run/run-stream.js.map +1 -1
- package/dist/esm/run/runner.js +166 -127
- package/dist/esm/run/runner.js.map +1 -1
- package/dist/esm/run/slides-cli.js +43 -42
- package/dist/esm/run/slides-cli.js.map +1 -1
- package/dist/esm/run/slides-render.js +36 -36
- package/dist/esm/run/slides-render.js.map +1 -1
- package/dist/esm/run/stdin-temp-file.js +77 -0
- package/dist/esm/run/stdin-temp-file.js.map +1 -0
- package/dist/esm/run/stream-output.js +7 -7
- package/dist/esm/run/stream-output.js.map +1 -1
- package/dist/esm/run/streaming.js +16 -16
- package/dist/esm/run/streaming.js.map +1 -1
- package/dist/esm/run/summary-engine.js +57 -51
- package/dist/esm/run/summary-engine.js.map +1 -1
- package/dist/esm/run/summary-llm.js +3 -3
- package/dist/esm/run/summary-llm.js.map +1 -1
- package/dist/esm/run/terminal.js +4 -4
- package/dist/esm/run/terminal.js.map +1 -1
- package/dist/esm/run/tips.js +2 -2
- package/dist/esm/run/tips.js.map +1 -1
- package/dist/esm/run/transcriber-cli.js +49 -49
- package/dist/esm/run/transcriber-cli.js.map +1 -1
- package/dist/esm/run.js +1 -1
- package/dist/esm/run.js.map +1 -1
- package/dist/esm/shared/contracts.js +1 -1
- package/dist/esm/shared/contracts.js.map +1 -1
- package/dist/esm/shared/sse-events.js +16 -16
- package/dist/esm/shared/sse-events.js.map +1 -1
- package/dist/esm/shared/streaming-merge.js +3 -3
- package/dist/esm/shared/streaming-merge.js.map +1 -1
- package/dist/esm/slides/extract.js +258 -249
- package/dist/esm/slides/extract.js.map +1 -1
- package/dist/esm/slides/index.js +3 -3
- package/dist/esm/slides/index.js.map +1 -1
- package/dist/esm/slides/settings.js +14 -14
- package/dist/esm/slides/settings.js.map +1 -1
- package/dist/esm/slides/store.js +9 -9
- package/dist/esm/slides/store.js.map +1 -1
- package/dist/esm/tty/format.js +13 -13
- package/dist/esm/tty/format.js.map +1 -1
- package/dist/esm/tty/osc-progress.js +1 -1
- package/dist/esm/tty/osc-progress.js.map +1 -1
- package/dist/esm/tty/progress/fetch-html.js +14 -14
- package/dist/esm/tty/progress/fetch-html.js.map +1 -1
- package/dist/esm/tty/progress/transcript.js +70 -62
- package/dist/esm/tty/progress/transcript.js.map +1 -1
- package/dist/esm/tty/spinner.js +20 -9
- package/dist/esm/tty/spinner.js.map +1 -1
- package/dist/esm/tty/theme.js +92 -92
- package/dist/esm/tty/theme.js.map +1 -1
- package/dist/esm/tty/website-progress.js +32 -32
- package/dist/esm/tty/website-progress.js.map +1 -1
- package/dist/esm/version.js +29 -29
- package/dist/esm/version.js.map +1 -1
- package/dist/types/cache.d.ts +6 -6
- package/dist/types/config.d.ts +49 -7
- package/dist/types/content/asset.d.ts +8 -6
- package/dist/types/content/index.d.ts +1 -1
- package/dist/types/costs.d.ts +3 -3
- package/dist/types/daemon/agent.d.ts +1 -1
- package/dist/types/daemon/auto-mode.d.ts +3 -3
- package/dist/types/daemon/chat.d.ts +2 -2
- package/dist/types/daemon/cli-entrypoint.d.ts +2 -0
- package/dist/types/daemon/config.d.ts +2 -2
- package/dist/types/daemon/env-merge.d.ts +1 -1
- package/dist/types/daemon/env-snapshot.d.ts +1 -1
- package/dist/types/daemon/flow-context.d.ts +7 -7
- package/dist/types/daemon/launchd.d.ts +8 -0
- package/dist/types/daemon/models.d.ts +6 -2
- package/dist/types/daemon/process-registry.d.ts +5 -5
- package/dist/types/daemon/server.d.ts +2 -2
- package/dist/types/daemon/summarize-progress.d.ts +1 -1
- package/dist/types/daemon/summarize.d.ts +7 -7
- package/dist/types/firecrawl.d.ts +1 -1
- package/dist/types/flags.d.ts +11 -11
- package/dist/types/index.d.ts +4 -4
- package/dist/types/language.d.ts +1 -1
- package/dist/types/llm/attachments.d.ts +1 -1
- package/dist/types/llm/cli.d.ts +3 -3
- package/dist/types/llm/generate-text.d.ts +7 -7
- package/dist/types/llm/html-to-markdown.d.ts +3 -3
- package/dist/types/llm/model-id.d.ts +1 -1
- package/dist/types/llm/prompt.d.ts +2 -2
- package/dist/types/llm/providers/anthropic.d.ts +3 -3
- package/dist/types/llm/providers/google.d.ts +3 -3
- package/dist/types/llm/providers/models.d.ts +2 -2
- package/dist/types/llm/providers/openai.d.ts +4 -4
- package/dist/types/llm/providers/shared.d.ts +2 -2
- package/dist/types/llm/transcript-to-markdown.d.ts +4 -2
- package/dist/types/llm/usage.d.ts +1 -1
- package/dist/types/logging/daemon.d.ts +4 -4
- package/dist/types/markitdown.d.ts +1 -1
- package/dist/types/media-cache.d.ts +2 -2
- package/dist/types/model-auto.d.ts +14 -4
- package/dist/types/model-spec.d.ts +10 -10
- package/dist/types/pricing/litellm.d.ts +1 -1
- package/dist/types/processes.d.ts +1 -1
- package/dist/types/prompts/index.d.ts +1 -1
- package/dist/types/run/attachments.d.ts +7 -7
- package/dist/types/run/bird.d.ts +2 -2
- package/dist/types/run/cache-state.d.ts +2 -2
- package/dist/types/run/cli-fallback-state.d.ts +6 -0
- package/dist/types/run/constants.d.ts +1 -1
- package/dist/types/run/cookies/twitter.d.ts +1 -1
- package/dist/types/run/env.d.ts +1 -1
- package/dist/types/run/finish-line.d.ts +5 -5
- package/dist/types/run/flows/asset/extract.d.ts +4 -4
- package/dist/types/run/flows/asset/input.d.ts +9 -3
- package/dist/types/run/flows/asset/media.d.ts +1 -1
- package/dist/types/run/flows/asset/output.d.ts +5 -5
- package/dist/types/run/flows/asset/preprocess.d.ts +23 -17
- package/dist/types/run/flows/asset/summary.d.ts +19 -17
- package/dist/types/run/flows/url/extract.d.ts +1 -1
- package/dist/types/run/flows/url/flow.d.ts +1 -1
- package/dist/types/run/flows/url/markdown.d.ts +6 -6
- package/dist/types/run/flows/url/slides-output.d.ts +7 -7
- package/dist/types/run/flows/url/slides-text.d.ts +9 -9
- package/dist/types/run/flows/url/summary.d.ts +11 -11
- package/dist/types/run/flows/url/types.d.ts +26 -22
- package/dist/types/run/format.d.ts +3 -3
- package/dist/types/run/help.d.ts +1 -1
- package/dist/types/run/media-cache-state.d.ts +2 -2
- package/dist/types/run/model-attempts.d.ts +1 -1
- package/dist/types/run/run-config.d.ts +4 -4
- package/dist/types/run/run-context.d.ts +3 -1
- package/dist/types/run/run-env.d.ts +3 -1
- package/dist/types/run/run-input.d.ts +2 -2
- package/dist/types/run/run-metrics.d.ts +3 -3
- package/dist/types/run/run-models.d.ts +3 -2
- package/dist/types/run/run-output.d.ts +1 -1
- package/dist/types/run/run-settings.d.ts +15 -6
- package/dist/types/run/run-stream.d.ts +2 -2
- package/dist/types/run/runner.d.ts +3 -2
- package/dist/types/run/slides-render.d.ts +4 -4
- package/dist/types/run/stdin-temp-file.d.ts +9 -0
- package/dist/types/run/stream-output.d.ts +1 -1
- package/dist/types/run/streaming.d.ts +4 -4
- package/dist/types/run/summary-engine.d.ts +11 -11
- package/dist/types/run/summary-llm.d.ts +5 -5
- package/dist/types/run/types.d.ts +4 -4
- package/dist/types/run.d.ts +1 -1
- package/dist/types/shared/contracts.d.ts +2 -2
- package/dist/types/shared/sse-events.d.ts +9 -9
- package/dist/types/slides/extract.d.ts +5 -4
- package/dist/types/slides/index.d.ts +5 -5
- package/dist/types/slides/store.d.ts +2 -2
- package/dist/types/slides/types.d.ts +2 -2
- package/dist/types/tty/osc-progress.d.ts +5 -5
- package/dist/types/tty/progress/fetch-html.d.ts +3 -3
- package/dist/types/tty/progress/transcript.d.ts +3 -3
- package/dist/types/tty/spinner.d.ts +2 -2
- package/dist/types/tty/theme.d.ts +2 -2
- package/dist/types/tty/website-progress.d.ts +3 -3
- package/dist/types/version.d.ts +1 -1
- package/docs/agent.md +38 -4
- package/docs/assets/site.js +46 -46
- package/docs/chrome-extension.md +11 -5
- package/docs/cli.md +59 -13
- package/docs/config.md +59 -10
- package/docs/extract-only.md +2 -0
- package/docs/index.html +33 -14
- package/docs/llm.md +7 -4
- package/docs/media.md +5 -4
- package/docs/model-auto.md +3 -2
- package/docs/nvidia-onnx-transcription.md +3 -3
- package/docs/openai.md +1 -1
- package/docs/releasing.md +3 -0
- package/docs/site/404.html +4 -1
- package/docs/site/assets/site.js +46 -46
- package/docs/site/docs/chrome-extension.html +18 -6
- package/docs/site/docs/config.html +29 -8
- package/docs/site/docs/extract-only.html +16 -4
- package/docs/site/docs/firecrawl.html +12 -3
- package/docs/site/docs/index.html +35 -6
- package/docs/site/docs/llm.html +19 -5
- package/docs/site/docs/openai.html +18 -5
- package/docs/site/docs/website.html +29 -9
- package/docs/site/docs/youtube.html +12 -3
- package/docs/site/index.html +33 -14
- package/docs/slides.md +13 -5
- package/docs/smoketest.md +29 -20
- package/docs/timestamps.md +21 -0
- package/docs/website.md +2 -1
- package/docs/youtube.md +4 -0
- package/package.json +36 -35
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OutputLanguage } from "../language.js";
|
|
2
|
+
import type { LlmTokenUsage } from "./generate-text.js";
|
|
2
3
|
export type ConvertTranscriptToMarkdown = (args: {
|
|
3
4
|
title: string | null;
|
|
4
5
|
source: string | null;
|
|
5
6
|
transcript: string;
|
|
6
7
|
timeoutMs: number;
|
|
8
|
+
outputLanguage?: OutputLanguage | null;
|
|
7
9
|
}) => Promise<string>;
|
|
8
10
|
export declare function createTranscriptToMarkdownConverter({ modelId, forceOpenRouter, xaiApiKey, googleApiKey, openaiApiKey, openaiBaseUrlOverride, anthropicBaseUrlOverride, googleBaseUrlOverride, xaiBaseUrlOverride, anthropicApiKey, openrouterApiKey, fetchImpl, forceChatCompletions, retries, onRetry, onUsage, }: {
|
|
9
11
|
modelId: string;
|
|
@@ -28,7 +30,7 @@ export declare function createTranscriptToMarkdownConverter({ modelId, forceOpen
|
|
|
28
30
|
}) => void;
|
|
29
31
|
onUsage?: (usage: {
|
|
30
32
|
model: string;
|
|
31
|
-
provider:
|
|
33
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
32
34
|
usage: LlmTokenUsage | null;
|
|
33
35
|
}) => void;
|
|
34
36
|
}): ConvertTranscriptToMarkdown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LlmTokenUsage } from
|
|
1
|
+
import type { LlmTokenUsage } from "./types.js";
|
|
2
2
|
export declare function normalizeTokenUsage(raw: unknown): LlmTokenUsage | null;
|
|
3
3
|
export declare function normalizeAnthropicUsage(raw: unknown): LlmTokenUsage | null;
|
|
4
4
|
export declare function normalizeOpenAiUsage(raw: unknown): LlmTokenUsage | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Logger } from
|
|
2
|
-
import type { SummarizeConfig } from
|
|
3
|
-
export type DaemonLogLevel =
|
|
4
|
-
export type DaemonLogFormat =
|
|
1
|
+
import { Logger } from "tslog";
|
|
2
|
+
import type { SummarizeConfig } from "../config.js";
|
|
3
|
+
export type DaemonLogLevel = "debug" | "info" | "warn" | "error";
|
|
4
|
+
export type DaemonLogFormat = "json" | "pretty";
|
|
5
5
|
export type DaemonLoggingConfig = {
|
|
6
6
|
enabled: true;
|
|
7
7
|
level: DaemonLogLevel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ExecFileFn = typeof import(
|
|
1
|
+
export type ExecFileFn = typeof import("node:child_process").execFile;
|
|
2
2
|
export declare function convertToMarkdownWithMarkitdown({ bytes, filenameHint, mediaTypeHint, uvxCommand, timeoutMs, env, execFileImpl, }: {
|
|
3
3
|
bytes: Uint8Array;
|
|
4
4
|
filenameHint: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MediaCache } from
|
|
2
|
-
export type MediaCacheVerifyMode =
|
|
1
|
+
import type { MediaCache } from "./content/index.js";
|
|
2
|
+
export type MediaCacheVerifyMode = "none" | "size" | "hash";
|
|
3
3
|
export type MediaCacheConfig = {
|
|
4
4
|
enabled?: boolean;
|
|
5
5
|
maxMb?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AutoRuleKind, CliProvider, SummarizeConfig } from
|
|
2
|
-
import type { LiteLlmCatalog } from
|
|
1
|
+
import type { AutoRuleKind, CliProvider, SummarizeConfig } from "./config.js";
|
|
2
|
+
import type { LiteLlmCatalog } from "./pricing/litellm.js";
|
|
3
3
|
export type AutoSelectionInput = {
|
|
4
4
|
kind: AutoRuleKind;
|
|
5
5
|
promptTokens: number | null;
|
|
@@ -11,14 +11,24 @@ export type AutoSelectionInput = {
|
|
|
11
11
|
openrouterProvidersFromEnv: string[] | null;
|
|
12
12
|
openrouterModelIds?: string[] | null;
|
|
13
13
|
cliAvailability?: Partial<Record<CliProvider, boolean>>;
|
|
14
|
+
isImplicitAutoSelection?: boolean;
|
|
15
|
+
allowAutoCliFallback?: boolean;
|
|
16
|
+
lastSuccessfulCliProvider?: CliProvider | null;
|
|
14
17
|
};
|
|
15
18
|
export type AutoModelAttempt = {
|
|
16
|
-
transport:
|
|
19
|
+
transport: "native" | "openrouter" | "cli";
|
|
17
20
|
userModelId: string;
|
|
18
21
|
llmModelId: string | null;
|
|
19
22
|
openrouterProviders: string[] | null;
|
|
20
23
|
forceOpenRouter: boolean;
|
|
21
|
-
requiredEnv:
|
|
24
|
+
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "OPENROUTER_API_KEY" | "Z_AI_API_KEY" | "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT";
|
|
22
25
|
debug: string;
|
|
23
26
|
};
|
|
27
|
+
export type ResolvedCliAutoFallbackConfig = {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
onlyWhenNoApiKeys: boolean;
|
|
30
|
+
order: CliProvider[];
|
|
31
|
+
};
|
|
32
|
+
export declare function resolveCliAutoFallbackConfig(config: SummarizeConfig | null): ResolvedCliAutoFallbackConfig;
|
|
33
|
+
export declare function envHasKey(env: Record<string, string | undefined>, requiredEnv: AutoModelAttempt["requiredEnv"]): boolean;
|
|
24
34
|
export declare function buildAutoModelAttempts(input: AutoSelectionInput): AutoModelAttempt[];
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import type { CliProvider } from
|
|
1
|
+
import type { CliProvider } from "./config.js";
|
|
2
2
|
export type FixedModelSpec = {
|
|
3
|
-
transport:
|
|
3
|
+
transport: "native";
|
|
4
4
|
userModelId: string;
|
|
5
5
|
llmModelId: string;
|
|
6
|
-
provider:
|
|
6
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
7
7
|
openrouterProviders: string[] | null;
|
|
8
8
|
forceOpenRouter: false;
|
|
9
|
-
requiredEnv:
|
|
9
|
+
requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY";
|
|
10
10
|
openaiBaseUrlOverride?: string | null;
|
|
11
11
|
forceChatCompletions?: boolean;
|
|
12
12
|
} | {
|
|
13
|
-
transport:
|
|
13
|
+
transport: "openrouter";
|
|
14
14
|
userModelId: string;
|
|
15
15
|
openrouterModelId: string;
|
|
16
16
|
llmModelId: string;
|
|
17
17
|
openrouterProviders: string[] | null;
|
|
18
18
|
forceOpenRouter: true;
|
|
19
|
-
requiredEnv:
|
|
19
|
+
requiredEnv: "OPENROUTER_API_KEY";
|
|
20
20
|
} | {
|
|
21
|
-
transport:
|
|
21
|
+
transport: "cli";
|
|
22
22
|
userModelId: string;
|
|
23
23
|
llmModelId: null;
|
|
24
24
|
openrouterProviders: null;
|
|
25
25
|
forceOpenRouter: false;
|
|
26
|
-
requiredEnv:
|
|
26
|
+
requiredEnv: "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT";
|
|
27
27
|
cliProvider: CliProvider;
|
|
28
28
|
cliModel: string | null;
|
|
29
29
|
};
|
|
30
30
|
export type RequestedModel = {
|
|
31
|
-
kind:
|
|
31
|
+
kind: "auto";
|
|
32
32
|
} | ({
|
|
33
|
-
kind:
|
|
33
|
+
kind: "fixed";
|
|
34
34
|
} & FixedModelSpec);
|
|
35
35
|
export declare function parseRequestedModelId(raw: string): RequestedModel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LiteLlmCatalog, type LiteLlmLoadResult } from
|
|
1
|
+
import { type LiteLlmCatalog, type LiteLlmLoadResult } from "tokentally/node";
|
|
2
2
|
export type { LiteLlmCatalog, LiteLlmLoadResult };
|
|
3
3
|
export declare function loadLiteLlmCatalog({ env, fetchImpl, nowMs, }: {
|
|
4
4
|
env: Record<string, string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "@steipete/summarize-core/processes";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "@steipete/summarize-core/prompts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { loadLocalAsset } from
|
|
2
|
-
export type AssetAttachment = Awaited<ReturnType<typeof loadLocalAsset>>[
|
|
1
|
+
import type { loadLocalAsset } from "../content/asset.js";
|
|
2
|
+
export type AssetAttachment = Awaited<ReturnType<typeof loadLocalAsset>>["attachment"];
|
|
3
3
|
export declare const MAX_DOCUMENT_BYTES_DEFAULT: number;
|
|
4
4
|
export declare function isUnsupportedAttachmentError(error: unknown): boolean;
|
|
5
5
|
export declare function isTextLikeMediaType(mediaType: string): boolean;
|
|
@@ -13,23 +13,23 @@ export declare function getTextContentFromAttachment(attachment: AssetAttachment
|
|
|
13
13
|
} | null;
|
|
14
14
|
export declare function getFileBytesFromAttachment(attachment: AssetAttachment): Uint8Array | null;
|
|
15
15
|
export declare function ensureCliAttachmentPath({ sourceKind, sourceLabel, attachment, }: {
|
|
16
|
-
sourceKind:
|
|
16
|
+
sourceKind: "file" | "asset-url";
|
|
17
17
|
sourceLabel: string;
|
|
18
18
|
attachment: AssetAttachment;
|
|
19
19
|
}): Promise<string>;
|
|
20
20
|
export declare function shouldMarkitdownConvertMediaType(mediaType: string): boolean;
|
|
21
21
|
export declare function supportsNativeFileAttachment({ provider, attachment, }: {
|
|
22
|
-
provider:
|
|
22
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
23
23
|
attachment: {
|
|
24
|
-
kind:
|
|
24
|
+
kind: "image" | "file";
|
|
25
25
|
mediaType: string;
|
|
26
26
|
};
|
|
27
27
|
}): boolean;
|
|
28
28
|
export declare function assertProviderSupportsAttachment({ provider, modelId, attachment, }: {
|
|
29
|
-
provider:
|
|
29
|
+
provider: "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
30
30
|
modelId: string;
|
|
31
31
|
attachment: {
|
|
32
|
-
kind:
|
|
32
|
+
kind: "image" | "file";
|
|
33
33
|
mediaType: string;
|
|
34
34
|
};
|
|
35
35
|
}): void;
|
package/dist/types/run/bird.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ type BirdTweetPayload = {
|
|
|
9
9
|
media?: BirdTweetMedia | null;
|
|
10
10
|
};
|
|
11
11
|
type BirdTweetMedia = {
|
|
12
|
-
kind:
|
|
12
|
+
kind: "video" | "audio";
|
|
13
13
|
urls: string[];
|
|
14
14
|
preferredUrl: string | null;
|
|
15
|
-
source:
|
|
15
|
+
source: "extended_entities" | "card" | "entities";
|
|
16
16
|
};
|
|
17
17
|
export declare function readTweetWithBird(args: {
|
|
18
18
|
url: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
1
|
+
import type { SummarizeConfig } from "../config.js";
|
|
2
|
+
import { type CacheState } from "../cache.js";
|
|
3
3
|
export declare function createCacheStateFromConfig({ envForRun, config, noCacheFlag, transcriptNamespace, }: {
|
|
4
4
|
envForRun: Record<string, string | undefined>;
|
|
5
5
|
config: SummarizeConfig | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CliProvider } from "../config.js";
|
|
2
|
+
export declare function readLastSuccessfulCliProvider(env: Record<string, string | undefined>): Promise<CliProvider | null>;
|
|
3
|
+
export declare function writeLastSuccessfulCliProvider({ env, provider, }: {
|
|
4
|
+
env: Record<string, string | undefined>;
|
|
5
|
+
provider: CliProvider;
|
|
6
|
+
}): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModelConfig } from
|
|
1
|
+
import type { ModelConfig } from "../config.js";
|
|
2
2
|
export declare const BIRD_TIP = "Tip: Install bird\uD83D\uDC26 for better Twitter support: https://github.com/steipete/bird";
|
|
3
3
|
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
4
|
export declare const SUPPORT_URL = "https://github.com/steipete/summarize";
|
package/dist/types/run/env.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CliProvider, SummarizeConfig } from
|
|
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
4
|
export declare function hasBirdCli(env: Record<string, string | undefined>): boolean;
|
|
@@ -7,13 +7,13 @@ export type FinishLineModel = {
|
|
|
7
7
|
detailParts: string[];
|
|
8
8
|
};
|
|
9
9
|
export type ExtractDiagnosticsForFinishLine = {
|
|
10
|
-
strategy:
|
|
10
|
+
strategy: "bird" | "firecrawl" | "html" | "nitter";
|
|
11
11
|
firecrawl: {
|
|
12
12
|
used: boolean;
|
|
13
13
|
};
|
|
14
14
|
markdown: {
|
|
15
15
|
used: boolean;
|
|
16
|
-
provider:
|
|
16
|
+
provider: "firecrawl" | "llm" | null;
|
|
17
17
|
notes?: string | null;
|
|
18
18
|
};
|
|
19
19
|
transcript: {
|
|
@@ -33,7 +33,7 @@ export type ExtractedForLengths = {
|
|
|
33
33
|
transcriptionProvider: string | null;
|
|
34
34
|
mediaDurationSeconds: number | null;
|
|
35
35
|
video: {
|
|
36
|
-
kind:
|
|
36
|
+
kind: "youtube" | "direct";
|
|
37
37
|
url: string;
|
|
38
38
|
} | null;
|
|
39
39
|
isVideoOnly: boolean;
|
|
@@ -155,8 +155,8 @@ export declare function buildExtractFinishLabel(args: {
|
|
|
155
155
|
extracted: {
|
|
156
156
|
diagnostics: ExtractDiagnosticsForFinishLine;
|
|
157
157
|
};
|
|
158
|
-
format:
|
|
159
|
-
markdownMode:
|
|
158
|
+
format: "text" | "markdown";
|
|
159
|
+
markdownMode: "off" | "auto" | "llm" | "readability";
|
|
160
160
|
hasMarkdownLlmCall: boolean;
|
|
161
161
|
}): string;
|
|
162
162
|
export declare function buildSummaryFinishLabel(args: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ExecFileFn } from
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
1
|
+
import type { ExecFileFn } from "../../../markitdown.js";
|
|
2
|
+
import type { ExtractDiagnosticsForFinishLine } from "../../finish-line.js";
|
|
3
|
+
import { type AssetAttachment } from "../../attachments.js";
|
|
4
4
|
export type AssetExtractContext = {
|
|
5
5
|
env: Record<string, string | undefined>;
|
|
6
6
|
envForRun: Record<string, string | undefined>;
|
|
7
7
|
execFileImpl: ExecFileFn;
|
|
8
8
|
timeoutMs: number;
|
|
9
|
-
preprocessMode:
|
|
9
|
+
preprocessMode: "off" | "auto" | "always";
|
|
10
10
|
};
|
|
11
11
|
export type AssetExtractResult = {
|
|
12
12
|
content: string;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type { SummarizeAssetArgs } from "./summary.js";
|
|
2
|
+
import { type InputTarget, loadRemoteAsset } from "../../../content/asset.js";
|
|
3
|
+
import { startSpinner } from "../../../tty/spinner.js";
|
|
4
|
+
/**
|
|
5
|
+
* Check if a file extension indicates transcribable media.
|
|
6
|
+
* Used to route large audio/video files directly to the media handler
|
|
7
|
+
* which has a higher size limit (2GB vs 50MB).
|
|
8
|
+
*/
|
|
9
|
+
export declare function isTranscribableExtension(filePath: string): boolean;
|
|
4
10
|
export type AssetInputContext = {
|
|
5
11
|
env: Record<string, string | undefined>;
|
|
6
12
|
envForRun: Record<string, string | undefined>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Phase 2: Transcript provider integration
|
|
4
4
|
* Phase 2.2: Local file path handling for transcript caching
|
|
5
5
|
*/
|
|
6
|
-
import type { AssetSummaryContext, SummarizeAssetArgs } from
|
|
6
|
+
import type { AssetSummaryContext, SummarizeAssetArgs } from "./summary.js";
|
|
7
7
|
/**
|
|
8
8
|
* Handler for local audio/video files.
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RunMetricsReport } from
|
|
2
|
-
import type { AssetAttachment } from
|
|
3
|
-
import type { AssetExtractResult } from
|
|
1
|
+
import type { RunMetricsReport } from "../../../costs.js";
|
|
2
|
+
import type { AssetAttachment } from "../../attachments.js";
|
|
3
|
+
import type { AssetExtractResult } from "./extract.js";
|
|
4
4
|
export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabel, attachment, extracted, apiStatus, }: {
|
|
5
5
|
io: {
|
|
6
6
|
env: Record<string, string | undefined>;
|
|
@@ -10,8 +10,8 @@ export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabe
|
|
|
10
10
|
};
|
|
11
11
|
flags: {
|
|
12
12
|
timeoutMs: number;
|
|
13
|
-
preprocessMode:
|
|
14
|
-
format:
|
|
13
|
+
preprocessMode: "off" | "auto" | "always";
|
|
14
|
+
format: "text" | "markdown";
|
|
15
15
|
plain: boolean;
|
|
16
16
|
json: boolean;
|
|
17
17
|
metricsEnabled: boolean;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { OutputLanguage } from
|
|
2
|
-
import type { Attachment } from
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
6
|
-
import { type AssetAttachment } from
|
|
1
|
+
import type { OutputLanguage } from "../../../language.js";
|
|
2
|
+
import type { Attachment } from "../../../llm/attachments.js";
|
|
3
|
+
import type { FixedModelSpec } from "../../../model-spec.js";
|
|
4
|
+
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
5
|
+
import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
|
|
6
|
+
import { type AssetAttachment } from "../../attachments.js";
|
|
7
7
|
export type AssetPreprocessContext = {
|
|
8
8
|
env: Record<string, string | undefined>;
|
|
9
9
|
envForRun: Record<string, string | undefined>;
|
|
10
|
-
execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0][
|
|
10
|
+
execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]["execFileImpl"];
|
|
11
11
|
timeoutMs: number;
|
|
12
|
-
preprocessMode:
|
|
13
|
-
format:
|
|
12
|
+
preprocessMode: "off" | "auto" | "always";
|
|
13
|
+
format: "text" | "markdown";
|
|
14
14
|
lengthArg: {
|
|
15
|
-
kind:
|
|
15
|
+
kind: "preset";
|
|
16
16
|
preset: SummaryLength;
|
|
17
17
|
} | {
|
|
18
|
-
kind:
|
|
18
|
+
kind: "chars";
|
|
19
19
|
maxCharacters: number;
|
|
20
20
|
};
|
|
21
21
|
outputLanguage: OutputLanguage;
|
|
@@ -23,6 +23,9 @@ export type AssetPreprocessContext = {
|
|
|
23
23
|
promptOverride?: string | null;
|
|
24
24
|
lengthInstruction?: string | null;
|
|
25
25
|
languageInstruction?: string | null;
|
|
26
|
+
openaiApiKey?: string | null;
|
|
27
|
+
openrouterApiKey?: string | null;
|
|
28
|
+
openaiBaseUrl?: string | null;
|
|
26
29
|
};
|
|
27
30
|
export type AssetPreprocessResult = {
|
|
28
31
|
promptText: string;
|
|
@@ -34,24 +37,27 @@ export type AssetPreprocessResult = {
|
|
|
34
37
|
} | null;
|
|
35
38
|
};
|
|
36
39
|
export type DocumentHandlingDecision = {
|
|
37
|
-
mode:
|
|
40
|
+
mode: "inline";
|
|
38
41
|
} | {
|
|
39
|
-
mode:
|
|
42
|
+
mode: "attach";
|
|
40
43
|
} | {
|
|
41
|
-
mode:
|
|
44
|
+
mode: "preprocess";
|
|
42
45
|
} | {
|
|
43
|
-
mode:
|
|
46
|
+
mode: "error";
|
|
44
47
|
error: Error;
|
|
45
48
|
};
|
|
46
|
-
export declare function resolveDocumentHandling({ attachment, textContent, fileBytes, preprocessMode, fixedModelSpec, }: {
|
|
49
|
+
export declare function resolveDocumentHandling({ attachment, textContent, fileBytes, preprocessMode, fixedModelSpec, openaiApiKey, openrouterApiKey, openaiBaseUrl, }: {
|
|
47
50
|
attachment: AssetAttachment;
|
|
48
51
|
textContent: {
|
|
49
52
|
content: string;
|
|
50
53
|
bytes: number;
|
|
51
54
|
} | null;
|
|
52
55
|
fileBytes: Uint8Array | null;
|
|
53
|
-
preprocessMode:
|
|
56
|
+
preprocessMode: "off" | "auto" | "always";
|
|
54
57
|
fixedModelSpec: FixedModelSpec | null;
|
|
58
|
+
openaiApiKey?: string | null;
|
|
59
|
+
openrouterApiKey?: string | null;
|
|
60
|
+
openaiBaseUrl?: string | null;
|
|
55
61
|
}): DocumentHandlingDecision;
|
|
56
62
|
export declare function prepareAssetPrompt({ ctx, attachment, }: {
|
|
57
63
|
ctx: AssetPreprocessContext;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import { type
|
|
10
|
-
import type
|
|
1
|
+
import type { CliProvider, SummarizeConfig } from "../../../config.js";
|
|
2
|
+
import type { MediaCache } from "../../../content/index.js";
|
|
3
|
+
import type { LlmCall, RunMetricsReport } from "../../../costs.js";
|
|
4
|
+
import type { OutputLanguage } from "../../../language.js";
|
|
5
|
+
import type { ExecFileFn } from "../../../markitdown.js";
|
|
6
|
+
import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
|
|
7
|
+
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
8
|
+
import type { createSummaryEngine } from "../../summary-engine.js";
|
|
9
|
+
import { type CacheState } from "../../../cache.js";
|
|
10
|
+
import { type AssetAttachment } from "../../attachments.js";
|
|
11
11
|
export type AssetSummaryContext = {
|
|
12
12
|
env: Record<string, string | undefined>;
|
|
13
13
|
envForRun: Record<string, string | undefined>;
|
|
@@ -15,24 +15,26 @@ export type AssetSummaryContext = {
|
|
|
15
15
|
stderr: NodeJS.WritableStream;
|
|
16
16
|
execFileImpl: ExecFileFn;
|
|
17
17
|
timeoutMs: number;
|
|
18
|
-
preprocessMode:
|
|
19
|
-
format:
|
|
18
|
+
preprocessMode: "off" | "auto" | "always";
|
|
19
|
+
format: "text" | "markdown";
|
|
20
20
|
extractMode: boolean;
|
|
21
21
|
lengthArg: {
|
|
22
|
-
kind:
|
|
22
|
+
kind: "preset";
|
|
23
23
|
preset: SummaryLength;
|
|
24
24
|
} | {
|
|
25
|
-
kind:
|
|
25
|
+
kind: "chars";
|
|
26
26
|
maxCharacters: number;
|
|
27
27
|
};
|
|
28
28
|
forceSummary: boolean;
|
|
29
29
|
outputLanguage: OutputLanguage;
|
|
30
|
-
videoMode:
|
|
30
|
+
videoMode: "auto" | "transcript" | "understand";
|
|
31
31
|
fixedModelSpec: FixedModelSpec | null;
|
|
32
32
|
promptOverride?: string | null;
|
|
33
33
|
lengthInstruction?: string | null;
|
|
34
34
|
languageInstruction?: string | null;
|
|
35
35
|
isFallbackModel: boolean;
|
|
36
|
+
isImplicitAutoSelection: boolean;
|
|
37
|
+
allowAutoCliFallback: boolean;
|
|
36
38
|
desiredOutputTokens: number | null;
|
|
37
39
|
envForAuto: Record<string, string | undefined>;
|
|
38
40
|
configForModelSelection: SummarizeConfig | null;
|
|
@@ -57,7 +59,7 @@ export type AssetSummaryContext = {
|
|
|
57
59
|
writeViaFooter: (parts: string[]) => void;
|
|
58
60
|
clearProgressForStdout: () => void;
|
|
59
61
|
restoreProgressAfterStdout?: (() => void) | null;
|
|
60
|
-
getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import(
|
|
62
|
+
getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import("../../../pricing/litellm.js").loadLiteLlmCatalog>>["catalog"]>;
|
|
61
63
|
buildReport: () => Promise<RunMetricsReport>;
|
|
62
64
|
estimateCostUsd: () => Promise<number | null>;
|
|
63
65
|
llmCalls: LlmCall[];
|
|
@@ -83,7 +85,7 @@ export type AssetSummaryContext = {
|
|
|
83
85
|
};
|
|
84
86
|
};
|
|
85
87
|
export type SummarizeAssetArgs = {
|
|
86
|
-
sourceKind:
|
|
88
|
+
sourceKind: "file" | "asset-url";
|
|
87
89
|
sourceLabel: string;
|
|
88
90
|
attachment: AssetAttachment;
|
|
89
91
|
onModelChosen?: ((modelId: string) => void) | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractedLinkContent, FetchLinkContentOptions } from
|
|
1
|
+
import type { ExtractedLinkContent, FetchLinkContentOptions } from "../../../content/index.js";
|
|
2
2
|
export type UrlExtractionUi = {
|
|
3
3
|
contentSizeLabel: string;
|
|
4
4
|
viaSourceLabel: string;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
1
|
+
import type { ModelAttempt } from "../../types.js";
|
|
2
|
+
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;
|
|
7
7
|
openaiApiKeyOverride?: string | null;
|
|
8
8
|
openaiBaseUrlOverride?: string | null;
|
|
9
9
|
forceChatCompletions?: boolean;
|
|
10
|
-
requiredEnv?: ModelAttempt[
|
|
10
|
+
requiredEnv?: ModelAttempt["requiredEnv"];
|
|
11
11
|
};
|
|
12
12
|
export type MarkdownConverters = {
|
|
13
13
|
markdownRequested: boolean;
|
|
14
14
|
transcriptMarkdownRequested: boolean;
|
|
15
|
-
effectiveMarkdownMode:
|
|
16
|
-
markdownProvider:
|
|
15
|
+
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
16
|
+
markdownProvider: "none" | "xai" | "openai" | "google" | "anthropic" | "zai";
|
|
17
17
|
markdownModel: MarkdownModel | null;
|
|
18
18
|
convertHtmlToMarkdown: ((args: {
|
|
19
19
|
url: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ExtractedLinkContent } from
|
|
2
|
-
import type { SummaryLength } from
|
|
3
|
-
import type { SlideExtractionResult, SlideImage, SlideSourceKind } from
|
|
4
|
-
import {
|
|
5
|
-
import type
|
|
1
|
+
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
2
|
+
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
3
|
+
import type { SlideExtractionResult, SlideImage, SlideSourceKind } from "../../../slides/index.js";
|
|
4
|
+
import type { SummaryStreamHandler } from "../../summary-engine.js";
|
|
5
|
+
import { type StreamOutputMode } from "../../stream-output.js";
|
|
6
6
|
export type SlidesTerminalOutput = {
|
|
7
7
|
onSlidesExtracted: (slides: SlideExtractionResult) => void;
|
|
8
8
|
onSlidesDone: (result: {
|
|
@@ -32,10 +32,10 @@ export declare function createSlidesTerminalOutput({ io, flags, extracted, slide
|
|
|
32
32
|
flags: {
|
|
33
33
|
plain: boolean;
|
|
34
34
|
lengthArg: {
|
|
35
|
-
kind:
|
|
35
|
+
kind: "preset";
|
|
36
36
|
preset: SummaryLength;
|
|
37
37
|
} | {
|
|
38
|
-
kind:
|
|
38
|
+
kind: "chars";
|
|
39
39
|
maxCharacters: number;
|
|
40
40
|
};
|
|
41
41
|
slidesDebug?: boolean;
|