@steipete/summarize 0.17.2 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/README.md +31 -4
- package/completions/summarize.fish +162 -0
- package/dist/esm/application/api-status.js +31 -0
- package/dist/esm/application/api-status.js.map +1 -0
- package/dist/esm/application/cli-fallback-state.js.map +1 -0
- package/dist/esm/{run/run-config.js → application/config-state.js} +32 -23
- package/dist/esm/application/config-state.js.map +1 -0
- package/dist/esm/application/context.js +15 -0
- package/dist/esm/application/context.js.map +1 -0
- package/dist/esm/{run/run-env.js → application/environment-state.js} +2 -2
- package/dist/esm/application/environment-state.js.map +1 -0
- package/dist/esm/application/environment.js +65 -0
- package/dist/esm/application/environment.js.map +1 -0
- package/dist/esm/application/execute-summarize.js +592 -0
- package/dist/esm/application/execute-summarize.js.map +1 -0
- package/dist/esm/application/execution-resources.js +159 -0
- package/dist/esm/application/execution-resources.js.map +1 -0
- package/dist/esm/{run/runner-contexts.js → application/flow-contexts.js} +17 -55
- package/dist/esm/application/flow-contexts.js.map +1 -0
- package/dist/esm/application/input-acquisition.js +147 -0
- package/dist/esm/application/input-acquisition.js.map +1 -0
- package/dist/esm/{run/run-metrics.js → application/metrics.js} +26 -13
- package/dist/esm/application/metrics.js.map +1 -0
- package/dist/esm/application/model-attempts.js +52 -0
- package/dist/esm/application/model-attempts.js.map +1 -0
- package/dist/esm/application/model-catalog.js +34 -0
- package/dist/esm/application/model-catalog.js.map +1 -0
- package/dist/esm/application/model-runtime.js +77 -0
- package/dist/esm/application/model-runtime.js.map +1 -0
- package/dist/esm/{run/run-models.js → application/model-selection.js} +2 -2
- package/dist/esm/application/model-selection.js.map +1 -0
- package/dist/esm/{run/run-output.js → application/output-policy.js} +2 -2
- package/dist/esm/application/output-policy.js.map +1 -0
- package/dist/esm/application/provider-runtime.js +37 -0
- package/dist/esm/application/provider-runtime.js.map +1 -0
- package/dist/esm/application/run-spec.js +110 -0
- package/dist/esm/application/run-spec.js.map +1 -0
- package/dist/esm/{run/stdin-temp-file.js → application/stdin-input.js} +1 -1
- package/dist/esm/{run/stdin-temp-file.js.map → application/stdin-input.js.map} +1 -1
- package/dist/esm/application/summarize-contracts.js +2 -0
- package/dist/esm/application/summarize-contracts.js.map +1 -0
- package/dist/esm/application/url-result.js +18 -0
- package/dist/esm/application/url-result.js.map +1 -0
- package/dist/esm/application/url-runtime.js +86 -0
- package/dist/esm/application/url-runtime.js.map +1 -0
- package/dist/esm/cache.js +7 -3
- package/dist/esm/cache.js.map +1 -1
- package/dist/esm/cli-main.js +33 -5
- package/dist/esm/cli-main.js.map +1 -1
- package/dist/esm/config/sections.js +7 -1
- package/dist/esm/config/sections.js.map +1 -1
- package/dist/esm/content/asset.js +36 -19
- package/dist/esm/content/asset.js.map +1 -1
- package/dist/esm/daemon/agent-cache.js +72 -0
- package/dist/esm/daemon/agent-cache.js.map +1 -0
- package/dist/esm/daemon/agent-model.js +97 -155
- package/dist/esm/daemon/agent-model.js.map +1 -1
- package/dist/esm/daemon/agent.js +9 -1
- package/dist/esm/daemon/agent.js.map +1 -1
- package/dist/esm/daemon/chat.js +33 -228
- package/dist/esm/daemon/chat.js.map +1 -1
- package/dist/esm/daemon/model-discovery.js +50 -0
- package/dist/esm/daemon/model-discovery.js.map +1 -0
- package/dist/esm/daemon/models.js +123 -190
- package/dist/esm/daemon/models.js.map +1 -1
- package/dist/esm/daemon/server-agent-route.js +39 -8
- package/dist/esm/daemon/server-agent-route.js.map +1 -1
- package/dist/esm/daemon/server-auth.js +29 -0
- package/dist/esm/daemon/server-auth.js.map +1 -0
- package/dist/esm/daemon/server-event-channel.js +30 -0
- package/dist/esm/daemon/server-event-channel.js.map +1 -0
- package/dist/esm/daemon/server-refresh-route.js +65 -0
- package/dist/esm/daemon/server-refresh-route.js.map +1 -0
- package/dist/esm/daemon/server-runtime.js +139 -0
- package/dist/esm/daemon/server-runtime.js.map +1 -0
- package/dist/esm/daemon/server-session-routes.js +16 -13
- package/dist/esm/daemon/server-session-routes.js.map +1 -1
- package/dist/esm/daemon/server-session.js +16 -55
- package/dist/esm/daemon/server-session.js.map +1 -1
- package/dist/esm/daemon/server-sse.js +1 -1
- package/dist/esm/daemon/server-sse.js.map +1 -1
- package/dist/esm/daemon/server-summarize-events.js +235 -0
- package/dist/esm/daemon/server-summarize-events.js.map +1 -0
- package/dist/esm/daemon/server-summarize-execution.js +94 -264
- package/dist/esm/daemon/server-summarize-execution.js.map +1 -1
- package/dist/esm/daemon/server-summarize-request.js +1 -17
- package/dist/esm/daemon/server-summarize-request.js.map +1 -1
- package/dist/esm/daemon/server-summarize-route.js +191 -0
- package/dist/esm/daemon/server-summarize-route.js.map +1 -0
- package/dist/esm/daemon/server.js +54 -379
- package/dist/esm/daemon/server.js.map +1 -1
- package/dist/esm/daemon/summarize-presentation.js +74 -0
- package/dist/esm/daemon/summarize-presentation.js.map +1 -0
- package/dist/esm/daemon/url-fetch-guard.js +12 -226
- package/dist/esm/daemon/url-fetch-guard.js.map +1 -1
- package/dist/esm/engine/cli-model-id.js +21 -0
- package/dist/esm/engine/cli-model-id.js.map +1 -0
- package/dist/esm/engine/errors.js +20 -0
- package/dist/esm/engine/errors.js.map +1 -0
- package/dist/esm/engine/events.js +2 -0
- package/dist/esm/engine/events.js.map +1 -0
- package/dist/esm/engine/fetch-with-timeout.js.map +1 -0
- package/dist/esm/engine/fixed-model-attempt.js +41 -0
- package/dist/esm/engine/fixed-model-attempt.js.map +1 -0
- package/dist/esm/{run → engine}/model-attempts.js +4 -0
- package/dist/esm/engine/model-attempts.js.map +1 -0
- package/dist/esm/{run/summary-llm.js → engine/model-call.js} +1 -1
- package/dist/esm/engine/model-call.js.map +1 -0
- package/dist/esm/engine/model-executor.js +389 -0
- package/dist/esm/engine/model-executor.js.map +1 -0
- package/dist/esm/engine/model-meta.js +12 -0
- package/dist/esm/engine/model-meta.js.map +1 -0
- package/dist/esm/engine/openrouter.js.map +1 -0
- package/dist/esm/engine/provider-attempt.js +19 -0
- package/dist/esm/engine/provider-attempt.js.map +1 -0
- package/dist/esm/{run → engine}/streaming.js +1 -1
- package/dist/esm/engine/streaming.js.map +1 -0
- package/dist/esm/engine/summary-execution.js +152 -0
- package/dist/esm/engine/summary-execution.js.map +1 -0
- package/dist/esm/engine/summary-timestamps.js.map +1 -0
- package/dist/esm/{run → engine}/types.js.map +1 -1
- package/dist/esm/{run/flows/url/summary-prompt.js → engine/web-prompt.js} +5 -4
- package/dist/esm/engine/web-prompt.js.map +1 -0
- package/dist/esm/engine/web-summary.js +175 -0
- package/dist/esm/engine/web-summary.js.map +1 -0
- package/dist/esm/flags.js +10 -0
- package/dist/esm/flags.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/llm/cli-exec.js +36 -1
- package/dist/esm/llm/cli-exec.js.map +1 -1
- package/dist/esm/llm/cli.js +13 -2
- package/dist/esm/llm/cli.js.map +1 -1
- package/dist/esm/llm/generate-text-stream.js +58 -21
- package/dist/esm/llm/generate-text-stream.js.map +1 -1
- package/dist/esm/llm/generate-text-types.js +2 -0
- package/dist/esm/llm/generate-text-types.js.map +1 -0
- package/dist/esm/llm/generate-text.js +21 -88
- package/dist/esm/llm/generate-text.js.map +1 -1
- package/dist/esm/llm/openai-client-config.js +47 -0
- package/dist/esm/llm/openai-client-config.js.map +1 -0
- package/dist/esm/llm/provider-capabilities.js +1 -1
- package/dist/esm/llm/provider-capabilities.js.map +1 -1
- package/dist/esm/llm/provider-profile.js +139 -49
- package/dist/esm/llm/provider-profile.js.map +1 -1
- package/dist/esm/llm/providers/models.js +28 -0
- package/dist/esm/llm/providers/models.js.map +1 -1
- package/dist/esm/llm/providers/openai/chat-completions.js +100 -0
- package/dist/esm/llm/providers/openai/chat-completions.js.map +1 -0
- package/dist/esm/llm/providers/openai/github-models.js +30 -0
- package/dist/esm/llm/providers/openai/github-models.js.map +1 -0
- package/dist/esm/llm/providers/openai/request-options.js +42 -0
- package/dist/esm/llm/providers/openai/request-options.js.map +1 -0
- package/dist/esm/llm/providers/openai/responses.js +166 -0
- package/dist/esm/llm/providers/openai/responses.js.map +1 -0
- package/dist/esm/llm/providers/openai/sse.js +57 -0
- package/dist/esm/llm/providers/openai/sse.js.map +1 -0
- package/dist/esm/llm/providers/openai/transport.js +109 -0
- package/dist/esm/llm/providers/openai/transport.js.map +1 -0
- package/dist/esm/llm/providers/openai/types.js +2 -0
- package/dist/esm/llm/providers/openai/types.js.map +1 -0
- package/dist/esm/llm/providers/openai.js +8 -549
- package/dist/esm/llm/providers/openai.js.map +1 -1
- package/dist/esm/logging/daemon.js +9 -1
- package/dist/esm/logging/daemon.js.map +1 -1
- package/dist/esm/media-cache.js +151 -65
- package/dist/esm/media-cache.js.map +1 -1
- package/dist/esm/refresh-free/benchmark.js +267 -0
- package/dist/esm/refresh-free/benchmark.js.map +1 -0
- package/dist/esm/refresh-free/catalog.js +118 -0
- package/dist/esm/refresh-free/catalog.js.map +1 -0
- package/dist/esm/refresh-free/config.js +110 -0
- package/dist/esm/refresh-free/config.js.map +1 -0
- package/dist/esm/refresh-free/presentation.js +161 -0
- package/dist/esm/refresh-free/presentation.js.map +1 -0
- package/dist/esm/refresh-free.js +68 -623
- package/dist/esm/refresh-free.js.map +1 -1
- package/dist/esm/run/cli-input-progress.js +114 -0
- package/dist/esm/run/cli-input-progress.js.map +1 -0
- package/dist/esm/run/cli-preflight.js +5 -1
- package/dist/esm/run/cli-preflight.js.map +1 -1
- package/dist/esm/run/cli-summarize-command.js +285 -0
- package/dist/esm/run/cli-summarize-command.js.map +1 -0
- package/dist/esm/run/cli-summarize-execution.js +75 -0
- package/dist/esm/run/cli-summarize-execution.js.map +1 -0
- package/dist/esm/run/cli-summarize-output.js +85 -0
- package/dist/esm/run/cli-summarize-output.js.map +1 -0
- package/dist/esm/run/cli-summarize-request.js +79 -0
- package/dist/esm/run/cli-summarize-request.js.map +1 -0
- package/dist/esm/run/constants.js +0 -33
- package/dist/esm/run/constants.js.map +1 -1
- package/dist/esm/run/env.js +2 -84
- package/dist/esm/run/env.js.map +1 -1
- package/dist/esm/run/flows/asset/extract.js +8 -3
- package/dist/esm/run/flows/asset/extract.js.map +1 -1
- package/dist/esm/run/flows/asset/media.js +50 -40
- package/dist/esm/run/flows/asset/media.js.map +1 -1
- package/dist/esm/run/flows/asset/output.js +8 -19
- 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 +19 -71
- package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -1
- package/dist/esm/run/flows/asset/summary.js +189 -391
- package/dist/esm/run/flows/asset/summary.js.map +1 -1
- package/dist/esm/run/flows/asset/types.js +2 -0
- package/dist/esm/run/flows/asset/types.js.map +1 -0
- package/dist/esm/run/flows/url/extraction-session.js +68 -6
- package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
- package/dist/esm/run/flows/url/fetch-options.js +4 -0
- package/dist/esm/run/flows/url/fetch-options.js.map +1 -1
- package/dist/esm/run/flows/url/flow.js +31 -22
- package/dist/esm/run/flows/url/flow.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +54 -201
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/flows/url/slides-output-render.js +1 -1
- package/dist/esm/run/flows/url/slides-output-render.js.map +1 -1
- package/dist/esm/run/flows/url/slides-output-stream.js +32 -11
- package/dist/esm/run/flows/url/slides-output-stream.js.map +1 -1
- package/dist/esm/run/flows/url/slides-output.js.map +1 -1
- package/dist/esm/run/flows/url/slides-session.js +1 -1
- package/dist/esm/run/flows/url/slides-session.js.map +1 -1
- package/dist/esm/run/flows/url/source-metrics.js +8 -0
- package/dist/esm/run/flows/url/source-metrics.js.map +1 -0
- package/dist/esm/run/flows/url/summary-finish.js +1 -11
- package/dist/esm/run/flows/url/summary-finish.js.map +1 -1
- package/dist/esm/run/flows/url/summary-json.js +2 -11
- package/dist/esm/run/flows/url/summary-json.js.map +1 -1
- package/dist/esm/run/flows/url/summary.js +48 -37
- package/dist/esm/run/flows/url/summary.js.map +1 -1
- package/dist/esm/run/flows/url/types.js.map +1 -1
- package/dist/esm/run/flows/url/video-only.js +14 -9
- package/dist/esm/run/flows/url/video-only.js.map +1 -1
- package/dist/esm/run/format.js +1 -3
- package/dist/esm/run/format.js.map +1 -1
- package/dist/esm/run/help.js +18 -1
- package/dist/esm/run/help.js.map +1 -1
- package/dist/esm/run/run-input.js +1 -1
- package/dist/esm/run/run-input.js.map +1 -1
- package/dist/esm/run/run-media-cache.js +63 -0
- package/dist/esm/run/run-media-cache.js.map +1 -0
- package/dist/esm/run/run-settings.js +23 -3
- package/dist/esm/run/run-settings.js.map +1 -1
- package/dist/esm/run/runner-flags.js +2 -0
- package/dist/esm/run/runner-flags.js.map +1 -1
- package/dist/esm/run/runner.js +6 -9
- package/dist/esm/run/runner.js.map +1 -1
- package/dist/esm/run/slides-cli.js +1 -1
- package/dist/esm/run/slides-cli.js.map +1 -1
- package/dist/esm/run/status-cli.js +339 -0
- package/dist/esm/run/status-cli.js.map +1 -0
- package/dist/esm/run/stream-output.js +22 -7
- package/dist/esm/run/stream-output.js.map +1 -1
- package/dist/esm/run/summary-stream.js +70 -0
- package/dist/esm/run/summary-stream.js.map +1 -0
- package/dist/esm/shared/format-count.js +19 -0
- package/dist/esm/shared/format-count.js.map +1 -0
- package/dist/esm/shared/run-api-status.js +12 -0
- package/dist/esm/shared/run-api-status.js.map +1 -0
- package/dist/esm/shared/summary-length.js +4 -0
- package/dist/esm/shared/summary-length.js.map +1 -0
- package/dist/esm/slides/download.js +2 -1
- package/dist/esm/slides/download.js.map +1 -1
- package/dist/esm/slides/extract.js +2 -1
- package/dist/esm/slides/extract.js.map +1 -1
- package/dist/esm/slides/frame-extraction.js +2 -2
- package/dist/esm/slides/frame-extraction.js.map +1 -1
- package/dist/esm/slides/settings.js +1 -1
- package/dist/esm/slides/settings.js.map +1 -1
- package/dist/esm/speaker-identification/identify.js +4 -0
- package/dist/esm/speaker-identification/identify.js.map +1 -1
- package/dist/esm/speaker-identification/openai.js +138 -14
- package/dist/esm/speaker-identification/openai.js.map +1 -1
- package/dist/esm/tty/format.js +1 -18
- package/dist/esm/tty/format.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/application/api-status.d.ts +3 -0
- package/dist/types/{run/run-config.d.ts → application/config-state.d.ts} +18 -7
- package/dist/types/application/context.d.ts +8 -0
- package/dist/types/application/environment.d.ts +7 -0
- package/dist/types/application/execute-summarize.d.ts +3 -0
- package/dist/types/application/execution-resources.d.ts +65 -0
- package/dist/types/application/flow-contexts.d.ts +20 -0
- package/dist/types/application/input-acquisition.d.ts +46 -0
- package/dist/types/application/model-attempts.d.ts +36 -0
- package/dist/types/application/model-catalog.d.ts +4 -0
- package/dist/types/application/model-runtime.d.ts +63 -0
- package/dist/types/application/provider-runtime.d.ts +12 -0
- package/dist/types/application/run-spec.d.ts +49 -0
- package/dist/types/application/summarize-contracts.d.ts +201 -0
- package/dist/types/application/url-result.d.ts +36 -0
- package/dist/types/application/url-runtime.d.ts +18 -0
- package/dist/types/cache.d.ts +2 -2
- package/dist/types/cli-main.d.ts +1 -0
- package/dist/types/config/sections.d.ts +3 -2
- package/dist/types/config/types.d.ts +2 -0
- package/dist/types/content/asset.d.ts +3 -0
- package/dist/types/daemon/agent-cache.d.ts +21 -0
- package/dist/types/daemon/agent-model.d.ts +14 -2
- package/dist/types/daemon/agent.d.ts +2 -1
- package/dist/types/daemon/model-discovery.d.ts +9 -0
- package/dist/types/daemon/models.d.ts +22 -20
- package/dist/types/daemon/server-agent-route.d.ts +3 -1
- package/dist/types/daemon/server-auth.d.ts +11 -0
- package/dist/types/daemon/server-event-channel.d.ts +14 -0
- package/dist/types/daemon/server-refresh-route.d.ts +15 -0
- package/dist/types/daemon/server-runtime.d.ts +34 -0
- package/dist/types/daemon/server-session.d.ts +4 -16
- package/dist/types/daemon/server-sse.d.ts +1 -1
- package/dist/types/daemon/server-summarize-events.d.ts +54 -0
- package/dist/types/daemon/server-summarize-execution.d.ts +8 -18
- package/dist/types/daemon/server-summarize-request.d.ts +2 -2
- package/dist/types/daemon/server-summarize-route.d.ts +24 -0
- package/dist/types/daemon/server.d.ts +3 -8
- package/dist/types/daemon/summarize-presentation.d.ts +11 -0
- package/dist/types/daemon/url-fetch-guard.d.ts +4 -10
- package/dist/types/engine/cli-model-id.d.ts +5 -0
- package/dist/types/engine/errors.d.ts +6 -0
- package/dist/types/engine/events.d.ts +10 -0
- package/dist/types/engine/fixed-model-attempt.d.ts +3 -0
- package/dist/types/{run/summary-engine.d.ts → engine/model-executor.d.ts} +12 -64
- package/dist/types/engine/model-meta.d.ts +8 -0
- package/dist/types/engine/provider-attempt.d.ts +6 -0
- package/dist/types/{run → engine}/streaming.d.ts +1 -1
- package/dist/types/engine/summary-execution.d.ts +46 -0
- package/dist/types/{run/flows/url → engine}/summary-timestamps.d.ts +1 -1
- package/dist/types/{run → engine}/types.d.ts +5 -9
- package/dist/types/{run/flows/url/summary-prompt.d.ts → engine/web-prompt.d.ts} +8 -8
- package/dist/types/engine/web-summary.d.ts +82 -0
- package/dist/types/flags.d.ts +3 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/llm/cli-exec.d.ts +2 -1
- package/dist/types/llm/cli.d.ts +2 -1
- package/dist/types/llm/generate-text-stream.d.ts +2 -1
- package/dist/types/llm/generate-text-types.d.ts +7 -0
- package/dist/types/llm/generate-text.d.ts +3 -7
- package/dist/types/llm/openai-client-config.d.ts +13 -0
- package/dist/types/llm/provider-capabilities.d.ts +2 -2
- package/dist/types/llm/provider-profile.d.ts +37 -1
- package/dist/types/llm/providers/models.d.ts +6 -0
- package/dist/types/llm/providers/openai/chat-completions.d.ts +3 -0
- package/dist/types/llm/providers/openai/github-models.d.ts +2 -0
- package/dist/types/llm/providers/openai/request-options.d.ts +5 -0
- package/dist/types/llm/providers/openai/responses.d.ts +21 -0
- package/dist/types/llm/providers/openai/sse.d.ts +6 -0
- package/dist/types/llm/providers/openai/transport.d.ts +23 -0
- package/dist/types/llm/providers/openai/types.d.ts +26 -0
- package/dist/types/llm/providers/openai.d.ts +4 -42
- package/dist/types/refresh-free/benchmark.d.ts +68 -0
- package/dist/types/refresh-free/catalog.d.ts +25 -0
- package/dist/types/refresh-free/config.d.ts +6 -0
- package/dist/types/refresh-free/presentation.d.ts +55 -0
- package/dist/types/run/cli-input-progress.d.ts +13 -0
- package/dist/types/run/{runner-plan.d.ts → cli-summarize-command.d.ts} +2 -7
- package/dist/types/run/cli-summarize-execution.d.ts +13 -0
- package/dist/types/run/cli-summarize-output.d.ts +8 -0
- package/dist/types/run/cli-summarize-request.d.ts +30 -0
- package/dist/types/run/constants.d.ts +0 -4
- package/dist/types/run/env.d.ts +2 -13
- package/dist/types/run/flows/asset/extract.d.ts +2 -1
- package/dist/types/run/flows/asset/media.d.ts +13 -2
- package/dist/types/run/flows/asset/output.d.ts +10 -16
- package/dist/types/run/flows/asset/preprocess.d.ts +1 -1
- package/dist/types/run/flows/asset/summary-attempts.d.ts +3 -3
- package/dist/types/run/flows/asset/summary.d.ts +4 -119
- package/dist/types/run/flows/asset/types.d.ts +121 -0
- package/dist/types/run/flows/url/fetch-options.d.ts +1 -0
- package/dist/types/run/flows/url/flow.d.ts +26 -2
- package/dist/types/run/flows/url/markdown.d.ts +3 -9
- package/dist/types/run/flows/url/slides-output-state.d.ts +1 -1
- package/dist/types/run/flows/url/slides-output-stream.d.ts +1 -1
- package/dist/types/run/flows/url/slides-output.d.ts +2 -2
- package/dist/types/run/flows/url/source-metrics.d.ts +2 -0
- package/dist/types/run/flows/url/summary-finish.d.ts +1 -8
- package/dist/types/run/flows/url/summary-json.d.ts +3 -18
- package/dist/types/run/flows/url/summary.d.ts +13 -13
- package/dist/types/run/flows/url/types.d.ts +8 -66
- package/dist/types/run/flows/url/video-only.d.ts +4 -0
- package/dist/types/run/format.d.ts +1 -8
- package/dist/types/run/help.d.ts +1 -0
- package/dist/types/run/run-media-cache.d.ts +5 -0
- package/dist/types/run/run-settings.d.ts +5 -2
- package/dist/types/run/runner-flags.d.ts +1 -0
- package/dist/types/run/status-cli.d.ts +41 -0
- package/dist/types/run/stream-output.d.ts +3 -2
- package/dist/types/run/summary-stream.d.ts +11 -0
- package/dist/types/shared/format-count.d.ts +1 -0
- package/dist/types/shared/run-api-status.d.ts +44 -0
- package/dist/types/shared/summary-length.d.ts +9 -0
- package/dist/types/speaker-identification/identify.d.ts +1 -0
- package/dist/types/tty/format.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/docs/README.md +1 -0
- package/docs/cli.md +7 -2
- package/docs/commands/summarize.md +1 -1
- package/docs/config.md +24 -3
- package/docs/engine.md +109 -0
- package/docs/extract-only.md +1 -0
- package/docs/index.md +1 -1
- package/docs/llm.md +2 -2
- package/docs/media.md +2 -1
- package/docs/quickstart.md +1 -1
- package/docs/transcript-provider-flow.md +4 -0
- package/docs/website.md +3 -0
- package/docs/youtube.md +1 -1
- package/package.json +6 -5
- package/dist/esm/daemon/flow-context.js +0 -355
- package/dist/esm/daemon/flow-context.js.map +0 -1
- package/dist/esm/daemon/summarize.js +0 -314
- package/dist/esm/daemon/summarize.js.map +0 -1
- package/dist/esm/run/cli-fallback-state.js.map +0 -1
- package/dist/esm/run/fetch-with-timeout.js.map +0 -1
- package/dist/esm/run/flows/asset/input.js +0 -312
- package/dist/esm/run/flows/asset/input.js.map +0 -1
- package/dist/esm/run/flows/url/slides-text-markdown.js +0 -550
- package/dist/esm/run/flows/url/slides-text-markdown.js.map +0 -1
- package/dist/esm/run/flows/url/slides-text-transcript.js +0 -208
- package/dist/esm/run/flows/url/slides-text-transcript.js.map +0 -1
- package/dist/esm/run/flows/url/slides-text-types.js +0 -2
- package/dist/esm/run/flows/url/slides-text-types.js.map +0 -1
- package/dist/esm/run/flows/url/slides-text.js +0 -3
- package/dist/esm/run/flows/url/slides-text.js.map +0 -1
- package/dist/esm/run/flows/url/summary-prompt.js.map +0 -1
- package/dist/esm/run/flows/url/summary-resolution.js +0 -349
- package/dist/esm/run/flows/url/summary-resolution.js.map +0 -1
- package/dist/esm/run/flows/url/summary-timestamps.js.map +0 -1
- package/dist/esm/run/model-attempts.js.map +0 -1
- package/dist/esm/run/openrouter.js.map +0 -1
- package/dist/esm/run/run-config.js.map +0 -1
- package/dist/esm/run/run-context.js +0 -19
- package/dist/esm/run/run-context.js.map +0 -1
- package/dist/esm/run/run-env.js.map +0 -1
- package/dist/esm/run/run-metrics.js.map +0 -1
- package/dist/esm/run/run-models.js.map +0 -1
- package/dist/esm/run/run-output.js.map +0 -1
- package/dist/esm/run/runner-contexts.js.map +0 -1
- package/dist/esm/run/runner-execution.js +0 -164
- package/dist/esm/run/runner-execution.js.map +0 -1
- package/dist/esm/run/runner-plan.js +0 -419
- package/dist/esm/run/runner-plan.js.map +0 -1
- package/dist/esm/run/streaming.js.map +0 -1
- package/dist/esm/run/summary-engine.js +0 -536
- package/dist/esm/run/summary-engine.js.map +0 -1
- package/dist/esm/run/summary-llm.js.map +0 -1
- package/dist/esm/shared/cache-store.js +0 -68
- package/dist/esm/shared/cache-store.js.map +0 -1
- package/dist/esm/shared/contracts.js +0 -2
- package/dist/esm/shared/contracts.js.map +0 -1
- package/dist/esm/shared/dns-pinned-fetch.js +0 -93
- package/dist/esm/shared/dns-pinned-fetch.js.map +0 -1
- package/dist/esm/shared/fetch-capabilities.js +0 -37
- package/dist/esm/shared/fetch-capabilities.js.map +0 -1
- package/dist/esm/shared/slides-presentation.js +0 -226
- package/dist/esm/shared/slides-presentation.js.map +0 -1
- package/dist/esm/shared/slides-text.js +0 -2
- package/dist/esm/shared/slides-text.js.map +0 -1
- package/dist/esm/shared/sse-events.js +0 -26
- package/dist/esm/shared/sse-events.js.map +0 -1
- package/dist/esm/shared/streaming-merge.js +0 -44
- package/dist/esm/shared/streaming-merge.js.map +0 -1
- package/dist/types/daemon/flow-context.d.ts +0 -50
- package/dist/types/daemon/summarize.d.ts +0 -104
- package/dist/types/run/flows/asset/input.d.ts +0 -34
- package/dist/types/run/flows/url/slides-text-markdown.d.ts +0 -47
- package/dist/types/run/flows/url/slides-text-transcript.d.ts +0 -36
- package/dist/types/run/flows/url/slides-text-types.d.ts +0 -8
- package/dist/types/run/flows/url/slides-text.d.ts +0 -3
- package/dist/types/run/flows/url/summary-resolution.d.ts +0 -31
- package/dist/types/run/run-context.d.ts +0 -57
- package/dist/types/run/runner-contexts.d.ts +0 -39
- package/dist/types/run/runner-execution.d.ts +0 -59
- package/dist/types/shared/cache-store.d.ts +0 -34
- package/dist/types/shared/contracts.d.ts +0 -2
- package/dist/types/shared/dns-pinned-fetch.d.ts +0 -1
- package/dist/types/shared/fetch-capabilities.d.ts +0 -10
- package/dist/types/shared/slides-presentation.d.ts +0 -45
- package/dist/types/shared/slides-text.d.ts +0 -1
- package/dist/types/shared/sse-events.d.ts +0 -66
- package/dist/types/shared/streaming-merge.d.ts +0 -4
- /package/dist/esm/{run → application}/cli-fallback-state.js +0 -0
- /package/dist/esm/{run → engine}/fetch-with-timeout.js +0 -0
- /package/dist/esm/{run → engine}/openrouter.js +0 -0
- /package/dist/esm/{run/flows/url → engine}/summary-timestamps.js +0 -0
- /package/dist/esm/{run → engine}/types.js +0 -0
- /package/dist/types/{run → application}/cli-fallback-state.d.ts +0 -0
- /package/dist/types/{run/run-env.d.ts → application/environment-state.d.ts} +0 -0
- /package/dist/types/{run/run-metrics.d.ts → application/metrics.d.ts} +0 -0
- /package/dist/types/{run/run-models.d.ts → application/model-selection.d.ts} +0 -0
- /package/dist/types/{run/run-output.d.ts → application/output-policy.d.ts} +0 -0
- /package/dist/types/{run/stdin-temp-file.d.ts → application/stdin-input.d.ts} +0 -0
- /package/dist/types/{run → engine}/fetch-with-timeout.d.ts +0 -0
- /package/dist/types/{run → engine}/model-attempts.d.ts +0 -0
- /package/dist/types/{run/summary-llm.d.ts → engine/model-call.d.ts} +0 -0
- /package/dist/types/{run → engine}/openrouter.d.ts +0 -0
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
* Phase 2: Transcript provider integration
|
|
4
4
|
* Phase 2.2: Local file path handling for transcript caching
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { type ExtractedLinkContent } from "../../../content/index.js";
|
|
7
|
+
import type { AssetSummaryContext, AssetSummaryResult, PresentAssetSummaryArgs, SummarizeAssetArgs } from "./types.js";
|
|
8
|
+
export type MediaFileExecutionResult = {
|
|
9
|
+
kind: "extraction";
|
|
10
|
+
extracted: ExtractedLinkContent;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "summary";
|
|
13
|
+
extracted: ExtractedLinkContent;
|
|
14
|
+
summaryArgs: PresentAssetSummaryArgs;
|
|
15
|
+
summary: AssetSummaryResult;
|
|
16
|
+
};
|
|
7
17
|
/**
|
|
8
18
|
* Handler for local audio/video files.
|
|
9
19
|
*
|
|
@@ -18,4 +28,5 @@ import type { AssetSummaryContext, SummarizeAssetArgs } from "./summary.js";
|
|
|
18
28
|
* - Captures file modification time for cache invalidation
|
|
19
29
|
* - Passes fileMtime to transcript cache for local file support
|
|
20
30
|
*/
|
|
21
|
-
export declare function
|
|
31
|
+
export declare function executeMediaFile(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<MediaFileExecutionResult>;
|
|
32
|
+
export declare function presentMediaFileResult(ctx: AssetSummaryContext, result: MediaFileExecutionResult): Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RunMetricsReport } from "../../../costs.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type RunApiAvailability } from "../../../shared/run-api-status.js";
|
|
3
3
|
import type { AssetExtractResult } from "./extract.js";
|
|
4
|
-
export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabel, attachment, extracted, apiStatus, }: {
|
|
4
|
+
export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabel, attachment, extracted, elapsedMs, report, costUsd, apiStatus, }: {
|
|
5
5
|
io: {
|
|
6
6
|
env: Record<string, string | undefined>;
|
|
7
7
|
envForRun: Record<string, string | undefined>;
|
|
@@ -16,27 +16,21 @@ export declare function outputExtractedAsset({ io, flags, hooks, url, sourceLabe
|
|
|
16
16
|
json: boolean;
|
|
17
17
|
metricsEnabled: boolean;
|
|
18
18
|
metricsDetailed: boolean;
|
|
19
|
-
shouldComputeReport: boolean;
|
|
20
|
-
runStartedAtMs: number;
|
|
21
19
|
verboseColor: boolean;
|
|
22
20
|
};
|
|
23
21
|
hooks: {
|
|
24
22
|
clearProgressForStdout: () => void;
|
|
25
23
|
restoreProgressAfterStdout?: (() => void) | null;
|
|
26
|
-
buildReport: () => Promise<RunMetricsReport>;
|
|
27
|
-
estimateCostUsd: () => Promise<number | null>;
|
|
28
24
|
};
|
|
29
25
|
url: string;
|
|
30
26
|
sourceLabel: string;
|
|
31
|
-
attachment:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
xaiApiKey: string | null;
|
|
35
|
-
apiKey: string | null;
|
|
36
|
-
openrouterApiKey: string | null;
|
|
37
|
-
apifyToken: string | null;
|
|
38
|
-
firecrawlConfigured: boolean;
|
|
39
|
-
googleConfigured: boolean;
|
|
40
|
-
anthropicConfigured: boolean;
|
|
27
|
+
attachment: {
|
|
28
|
+
mediaType: string;
|
|
29
|
+
filename: string | null;
|
|
41
30
|
};
|
|
31
|
+
extracted: AssetExtractResult;
|
|
32
|
+
elapsedMs: number;
|
|
33
|
+
report: RunMetricsReport | null;
|
|
34
|
+
costUsd: number | null;
|
|
35
|
+
apiStatus: RunApiAvailability;
|
|
42
36
|
}): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { SummaryLength } from "@steipete/summarize-core";
|
|
1
2
|
import type { OutputLanguage } from "../../../language.js";
|
|
2
3
|
import type { Attachment } from "../../../llm/attachments.js";
|
|
3
4
|
import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
|
|
4
5
|
import type { FixedModelSpec } from "../../../model-spec.js";
|
|
5
|
-
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
6
6
|
import { type AssetAttachment } from "../../attachments.js";
|
|
7
7
|
export type AssetPreprocessContext = {
|
|
8
8
|
env: Record<string, string | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CliProvider } from "../../../config.js";
|
|
2
|
-
import type { ModelAttempt } from "
|
|
3
|
-
import type { AssetSummaryContext, SummarizeAssetArgs } from "./
|
|
2
|
+
import type { ModelAttempt } from "../../../engine/types.js";
|
|
3
|
+
import type { AssetSummaryContext, SummarizeAssetArgs } from "./types.js";
|
|
4
4
|
export declare function buildAssetModelAttempts({ ctx, kind, promptTokensForAuto, requiresVideoUnderstanding, lastSuccessfulCliProvider, }: {
|
|
5
5
|
ctx: AssetSummaryContext;
|
|
6
6
|
kind: "video" | "image" | "text" | "file";
|
|
@@ -13,7 +13,7 @@ export declare function buildAssetCliContext({ ctx, args, attempts, attachmentsC
|
|
|
13
13
|
args: SummarizeAssetArgs;
|
|
14
14
|
attempts: ModelAttempt[];
|
|
15
15
|
attachmentsCount: number;
|
|
16
|
-
summaryLengthTarget: import("
|
|
16
|
+
summaryLengthTarget: import("@steipete/summarize-core").SummaryLength | {
|
|
17
17
|
maxCharacters: number;
|
|
18
18
|
};
|
|
19
19
|
}): Promise<{
|
|
@@ -1,120 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import type { MediaCache } from "../../../content/index.js";
|
|
4
|
-
import type { LlmCall, RunMetricsReport } from "../../../costs.js";
|
|
5
|
-
import type { OutputLanguage } from "../../../language.js";
|
|
6
|
-
import type { ExecFileFn } from "../../../markitdown.js";
|
|
7
|
-
import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
|
|
8
|
-
import type { SummaryLength } from "../../../shared/contracts.js";
|
|
9
|
-
import type { SpeakerIdentificationSettings } from "../../../speaker-identification/index.js";
|
|
10
|
-
import { type AssetAttachment } from "../../attachments.js";
|
|
11
|
-
import type { createSummaryEngine } from "../../summary-engine.js";
|
|
12
|
-
export type AssetSummaryContext = {
|
|
13
|
-
env: Record<string, string | undefined>;
|
|
14
|
-
envForRun: Record<string, string | undefined>;
|
|
15
|
-
stdout: NodeJS.WritableStream;
|
|
16
|
-
stderr: NodeJS.WritableStream;
|
|
17
|
-
execFileImpl: ExecFileFn;
|
|
18
|
-
timeoutMs: number;
|
|
19
|
-
preprocessMode: "off" | "auto" | "always";
|
|
20
|
-
format: "text" | "markdown";
|
|
21
|
-
extractMode: boolean;
|
|
22
|
-
lengthArg: {
|
|
23
|
-
kind: "preset";
|
|
24
|
-
preset: SummaryLength;
|
|
25
|
-
} | {
|
|
26
|
-
kind: "chars";
|
|
27
|
-
maxCharacters: number;
|
|
28
|
-
};
|
|
29
|
-
forceSummary: boolean;
|
|
30
|
-
outputLanguage: OutputLanguage;
|
|
31
|
-
videoMode: "auto" | "transcript" | "understand";
|
|
32
|
-
transcriptTimestamps: boolean;
|
|
33
|
-
transcriptDiarization: "auto" | "elevenlabs" | "openai" | null;
|
|
34
|
-
speakerIdentification: SpeakerIdentificationSettings | null;
|
|
35
|
-
configPath: string | null;
|
|
36
|
-
fixedModelSpec: FixedModelSpec | null;
|
|
37
|
-
promptOverride?: string | null;
|
|
38
|
-
lengthInstruction?: string | null;
|
|
39
|
-
languageInstruction?: string | null;
|
|
40
|
-
isFallbackModel: boolean;
|
|
41
|
-
isImplicitAutoSelection: boolean;
|
|
42
|
-
allowAutoCliFallback: boolean;
|
|
43
|
-
desiredOutputTokens: number | null;
|
|
44
|
-
envForAuto: Record<string, string | undefined>;
|
|
45
|
-
configForModelSelection: SummarizeConfig | null;
|
|
46
|
-
cliAvailability: Partial<Record<CliProvider, boolean>>;
|
|
47
|
-
requestedModel: RequestedModel;
|
|
48
|
-
requestedModelInput: string;
|
|
49
|
-
requestedModelLabel: string;
|
|
50
|
-
wantsFreeNamedModel: boolean;
|
|
51
|
-
isNamedModelSelection: boolean;
|
|
52
|
-
maxOutputTokensArg: number | null;
|
|
53
|
-
json: boolean;
|
|
54
|
-
metricsEnabled: boolean;
|
|
55
|
-
metricsDetailed: boolean;
|
|
56
|
-
shouldComputeReport: boolean;
|
|
57
|
-
runStartedAtMs: number;
|
|
58
|
-
verbose: boolean;
|
|
59
|
-
verboseColor: boolean;
|
|
60
|
-
streamingEnabled: boolean;
|
|
61
|
-
plain: boolean;
|
|
62
|
-
summaryEngine: ReturnType<typeof createSummaryEngine>;
|
|
63
|
-
trackedFetch: typeof fetch;
|
|
64
|
-
writeViaFooter: (parts: string[]) => void;
|
|
65
|
-
clearProgressForStdout: () => void;
|
|
66
|
-
restoreProgressAfterStdout?: (() => void) | null;
|
|
67
|
-
getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import("../../../pricing/litellm.js").loadLiteLlmCatalog>>["catalog"]>;
|
|
68
|
-
buildReport: () => Promise<RunMetricsReport>;
|
|
69
|
-
estimateCostUsd: () => Promise<number | null>;
|
|
70
|
-
llmCalls: LlmCall[];
|
|
71
|
-
cache: CacheState;
|
|
72
|
-
summaryCacheBypass: boolean;
|
|
73
|
-
mediaCache: MediaCache | null;
|
|
74
|
-
apiStatus: {
|
|
75
|
-
xaiApiKey: string | null;
|
|
76
|
-
apiKey: string | null;
|
|
77
|
-
nvidiaApiKey: string | null;
|
|
78
|
-
minimaxApiKey: string | null;
|
|
79
|
-
openrouterApiKey: string | null;
|
|
80
|
-
apifyToken: string | null;
|
|
81
|
-
firecrawlConfigured: boolean;
|
|
82
|
-
googleConfigured: boolean;
|
|
83
|
-
anthropicConfigured: boolean;
|
|
84
|
-
providerBaseUrls: {
|
|
85
|
-
openai: string | null;
|
|
86
|
-
nvidia: string | null;
|
|
87
|
-
anthropic: string | null;
|
|
88
|
-
google: string | null;
|
|
89
|
-
xai: string | null;
|
|
90
|
-
};
|
|
91
|
-
zaiApiKey: string | null;
|
|
92
|
-
zaiBaseUrl: string;
|
|
93
|
-
nvidiaBaseUrl: string;
|
|
94
|
-
minimaxBaseUrl: string;
|
|
95
|
-
ollamaBaseUrl: string;
|
|
96
|
-
falApiKey: string | null;
|
|
97
|
-
groqApiKey: string | null;
|
|
98
|
-
assemblyaiApiKey: string | null;
|
|
99
|
-
elevenlabsApiKey: string | null;
|
|
100
|
-
googleApiKey: string | null;
|
|
101
|
-
openaiApiKey: string | null;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
export type AssetSummaryContextInput = {
|
|
105
|
-
io: Pick<AssetSummaryContext, "env" | "envForRun" | "stdout" | "stderr" | "execFileImpl" | "trackedFetch">;
|
|
106
|
-
summary: Pick<AssetSummaryContext, "timeoutMs" | "preprocessMode" | "format" | "extractMode" | "lengthArg" | "forceSummary" | "outputLanguage" | "videoMode" | "transcriptTimestamps" | "transcriptDiarization" | "speakerIdentification" | "configPath" | "promptOverride" | "lengthInstruction" | "languageInstruction" | "maxOutputTokensArg" | "summaryCacheBypass">;
|
|
107
|
-
model: Pick<AssetSummaryContext, "fixedModelSpec" | "isFallbackModel" | "isImplicitAutoSelection" | "allowAutoCliFallback" | "desiredOutputTokens" | "envForAuto" | "configForModelSelection" | "cliAvailability" | "requestedModel" | "requestedModelInput" | "requestedModelLabel" | "wantsFreeNamedModel" | "isNamedModelSelection" | "summaryEngine" | "getLiteLlmCatalog" | "llmCalls">;
|
|
108
|
-
output: Pick<AssetSummaryContext, "json" | "metricsEnabled" | "metricsDetailed" | "shouldComputeReport" | "runStartedAtMs" | "verbose" | "verboseColor" | "streamingEnabled" | "plain">;
|
|
109
|
-
hooks: Pick<AssetSummaryContext, "writeViaFooter" | "clearProgressForStdout" | "restoreProgressAfterStdout" | "buildReport" | "estimateCostUsd">;
|
|
110
|
-
cache: Pick<AssetSummaryContext, "cache" | "mediaCache">;
|
|
111
|
-
apiStatus: AssetSummaryContext["apiStatus"];
|
|
112
|
-
};
|
|
1
|
+
import type { AssetSummaryContext, AssetSummaryContextInput, AssetSummaryResult, PresentAssetSummaryArgs, SummarizeAssetArgs } from "./types.js";
|
|
2
|
+
export declare function presentAssetSummary(ctx: AssetSummaryContext, args: PresentAssetSummaryArgs, result: AssetSummaryResult): Promise<void>;
|
|
113
3
|
export declare function createAssetSummaryContext(input: AssetSummaryContextInput): AssetSummaryContext;
|
|
114
|
-
export
|
|
115
|
-
|
|
116
|
-
sourceLabel: string;
|
|
117
|
-
attachment: AssetAttachment;
|
|
118
|
-
onModelChosen?: ((modelId: string) => void) | null;
|
|
119
|
-
};
|
|
120
|
-
export declare function summarizeAsset(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<void>;
|
|
4
|
+
export declare function executeAssetSummary(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
|
|
5
|
+
export declare function summarizeAsset(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { SummaryLength } from "@steipete/summarize-core";
|
|
2
|
+
import type { CacheState } from "../../../cache.js";
|
|
3
|
+
import type { CliProvider, SummarizeConfig } from "../../../config.js";
|
|
4
|
+
import type { MediaCache } from "../../../content/index.js";
|
|
5
|
+
import type { LlmCall, RunMetricsReport } from "../../../costs.js";
|
|
6
|
+
import type { SummaryStreamHandler } from "../../../engine/events.js";
|
|
7
|
+
import type { createModelExecutor } from "../../../engine/model-executor.js";
|
|
8
|
+
import type { ModelMeta } from "../../../engine/types.js";
|
|
9
|
+
import type { OutputLanguage } from "../../../language.js";
|
|
10
|
+
import type { ExecFileFn } from "../../../markitdown.js";
|
|
11
|
+
import type { FixedModelSpec, RequestedModel } from "../../../model-spec.js";
|
|
12
|
+
import type { RunApiStatus } from "../../../shared/run-api-status.js";
|
|
13
|
+
import type { SpeakerIdentificationSettings } from "../../../speaker-identification/index.js";
|
|
14
|
+
import type { AssetAttachment } from "../../attachments.js";
|
|
15
|
+
export type AssetSummaryContext = {
|
|
16
|
+
env: Record<string, string | undefined>;
|
|
17
|
+
envForRun: Record<string, string | undefined>;
|
|
18
|
+
stdout: NodeJS.WritableStream;
|
|
19
|
+
stderr: NodeJS.WritableStream;
|
|
20
|
+
execFileImpl: ExecFileFn;
|
|
21
|
+
timeoutMs: number;
|
|
22
|
+
preprocessMode: "off" | "auto" | "always";
|
|
23
|
+
format: "text" | "markdown";
|
|
24
|
+
extractMode: boolean;
|
|
25
|
+
lengthArg: {
|
|
26
|
+
kind: "preset";
|
|
27
|
+
preset: SummaryLength;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "chars";
|
|
30
|
+
maxCharacters: number;
|
|
31
|
+
};
|
|
32
|
+
forceSummary: boolean;
|
|
33
|
+
outputLanguage: OutputLanguage;
|
|
34
|
+
videoMode: "auto" | "transcript" | "understand";
|
|
35
|
+
transcriptTimestamps: boolean;
|
|
36
|
+
transcriptDiarization: "auto" | "elevenlabs" | "openai" | null;
|
|
37
|
+
speakerIdentification: SpeakerIdentificationSettings | null;
|
|
38
|
+
configPath: string | null;
|
|
39
|
+
fixedModelSpec: FixedModelSpec | null;
|
|
40
|
+
promptOverride?: string | null;
|
|
41
|
+
lengthInstruction?: string | null;
|
|
42
|
+
languageInstruction?: string | null;
|
|
43
|
+
isFallbackModel: boolean;
|
|
44
|
+
isImplicitAutoSelection: boolean;
|
|
45
|
+
allowAutoCliFallback: boolean;
|
|
46
|
+
desiredOutputTokens: number | null;
|
|
47
|
+
envForAuto: Record<string, string | undefined>;
|
|
48
|
+
configForModelSelection: SummarizeConfig | null;
|
|
49
|
+
cliAvailability: Partial<Record<CliProvider, boolean>>;
|
|
50
|
+
requestedModel: RequestedModel;
|
|
51
|
+
requestedModelInput: string;
|
|
52
|
+
requestedModelLabel: string;
|
|
53
|
+
wantsFreeNamedModel: boolean;
|
|
54
|
+
isNamedModelSelection: boolean;
|
|
55
|
+
maxOutputTokensArg: number | null;
|
|
56
|
+
json: boolean;
|
|
57
|
+
metricsEnabled: boolean;
|
|
58
|
+
metricsDetailed: boolean;
|
|
59
|
+
shouldComputeReport: boolean;
|
|
60
|
+
runStartedAtMs: number;
|
|
61
|
+
verbose: boolean;
|
|
62
|
+
verboseColor: boolean;
|
|
63
|
+
streamingEnabled: boolean;
|
|
64
|
+
plain: boolean;
|
|
65
|
+
summaryEngine: ReturnType<typeof createModelExecutor>;
|
|
66
|
+
summaryStream: SummaryStreamHandler | null;
|
|
67
|
+
onSummaryCached?: ((cached: boolean) => void) | null;
|
|
68
|
+
trackedFetch: typeof fetch;
|
|
69
|
+
writeViaFooter: (parts: string[]) => void;
|
|
70
|
+
clearProgressForStdout: () => void;
|
|
71
|
+
restoreProgressAfterStdout?: (() => void) | null;
|
|
72
|
+
getLiteLlmCatalog: () => Promise<Awaited<ReturnType<typeof import("../../../pricing/litellm.js").loadLiteLlmCatalog>>["catalog"]>;
|
|
73
|
+
buildReport: () => Promise<RunMetricsReport>;
|
|
74
|
+
estimateCostUsd: () => Promise<number | null>;
|
|
75
|
+
llmCalls: LlmCall[];
|
|
76
|
+
cache: CacheState;
|
|
77
|
+
summaryCacheBypass: boolean;
|
|
78
|
+
mediaCache: MediaCache | null;
|
|
79
|
+
apiStatus: RunApiStatus;
|
|
80
|
+
};
|
|
81
|
+
export type AssetSummaryContextInput = {
|
|
82
|
+
io: Pick<AssetSummaryContext, "env" | "envForRun" | "stdout" | "stderr" | "execFileImpl" | "trackedFetch">;
|
|
83
|
+
summary: Pick<AssetSummaryContext, "timeoutMs" | "preprocessMode" | "format" | "extractMode" | "lengthArg" | "forceSummary" | "outputLanguage" | "videoMode" | "transcriptTimestamps" | "transcriptDiarization" | "speakerIdentification" | "configPath" | "promptOverride" | "lengthInstruction" | "languageInstruction" | "maxOutputTokensArg" | "summaryCacheBypass">;
|
|
84
|
+
model: Pick<AssetSummaryContext, "fixedModelSpec" | "isFallbackModel" | "isImplicitAutoSelection" | "allowAutoCliFallback" | "desiredOutputTokens" | "envForAuto" | "configForModelSelection" | "cliAvailability" | "requestedModel" | "requestedModelInput" | "requestedModelLabel" | "wantsFreeNamedModel" | "isNamedModelSelection" | "summaryEngine" | "summaryStream" | "getLiteLlmCatalog" | "llmCalls">;
|
|
85
|
+
output: Pick<AssetSummaryContext, "json" | "metricsEnabled" | "metricsDetailed" | "shouldComputeReport" | "runStartedAtMs" | "verbose" | "verboseColor" | "streamingEnabled" | "plain">;
|
|
86
|
+
hooks: Pick<AssetSummaryContext, "writeViaFooter" | "clearProgressForStdout" | "restoreProgressAfterStdout" | "buildReport" | "estimateCostUsd" | "onSummaryCached">;
|
|
87
|
+
cache: Pick<AssetSummaryContext, "cache" | "mediaCache">;
|
|
88
|
+
apiStatus: AssetSummaryContext["apiStatus"];
|
|
89
|
+
};
|
|
90
|
+
export type SummarizeAssetArgs = {
|
|
91
|
+
sourceKind: "file" | "asset-url";
|
|
92
|
+
sourceLabel: string;
|
|
93
|
+
attachment: AssetAttachment;
|
|
94
|
+
onModelChosen?: ((modelId: string) => void) | null;
|
|
95
|
+
};
|
|
96
|
+
export type PresentAssetSummaryArgs = {
|
|
97
|
+
sourceKind: "file" | "asset-url";
|
|
98
|
+
sourceLabel: string;
|
|
99
|
+
attachment: Pick<AssetAttachment, "kind" | "mediaType" | "filename">;
|
|
100
|
+
};
|
|
101
|
+
export type AssetSummaryResult = {
|
|
102
|
+
kind: "summary";
|
|
103
|
+
outcome: "model" | "short-content" | "token-fit" | "attempts-exhausted";
|
|
104
|
+
summary: string;
|
|
105
|
+
summaryEmitted: boolean;
|
|
106
|
+
summaryFromCache: boolean;
|
|
107
|
+
prompt: string;
|
|
108
|
+
extracted: {
|
|
109
|
+
kind: "asset";
|
|
110
|
+
source: string;
|
|
111
|
+
mediaType: string;
|
|
112
|
+
filename: string | null;
|
|
113
|
+
};
|
|
114
|
+
footerParts: string[];
|
|
115
|
+
llm: {
|
|
116
|
+
provider: ModelMeta["provider"];
|
|
117
|
+
model: string;
|
|
118
|
+
maxCompletionTokens: number | null;
|
|
119
|
+
strategy: "single";
|
|
120
|
+
} | null;
|
|
121
|
+
};
|
|
@@ -4,6 +4,7 @@ type UrlFetchFlags = {
|
|
|
4
4
|
maxExtractCharacters?: number | null;
|
|
5
5
|
youtubeMode: "auto" | "web" | "apify" | "yt-dlp" | "no-auto";
|
|
6
6
|
videoMode: "auto" | "transcript" | "understand";
|
|
7
|
+
embeddedVideoMode: "auto" | "off" | "prefer" | "both";
|
|
7
8
|
transcriptTimestamps: boolean;
|
|
8
9
|
transcriptDiarization: "auto" | "elevenlabs" | "openai" | null;
|
|
9
10
|
firecrawlMode: "off" | "auto" | "always";
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
2
|
+
import type { UrlSummaryResolution } from "../../../engine/web-summary.js";
|
|
3
|
+
import { type SlideExtractionResult } from "../../../slides/index.js";
|
|
4
|
+
import type { AssetSummaryResult } from "../asset/types.js";
|
|
1
5
|
import type { UrlFlowContext } from "./types.js";
|
|
2
|
-
|
|
6
|
+
type UrlFlowResultBase = {
|
|
7
|
+
extracted: ExtractedLinkContent;
|
|
8
|
+
slides: SlideExtractionResult | null;
|
|
9
|
+
};
|
|
10
|
+
export type UrlFlowResult = (UrlFlowResultBase & {
|
|
11
|
+
kind: "delegated-summary";
|
|
12
|
+
summary: AssetSummaryResult;
|
|
13
|
+
}) | (UrlFlowResultBase & {
|
|
14
|
+
kind: "extraction";
|
|
15
|
+
url: string;
|
|
16
|
+
prompt: string;
|
|
17
|
+
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
18
|
+
}) | (UrlFlowResultBase & {
|
|
19
|
+
kind: "summary";
|
|
20
|
+
url: string;
|
|
21
|
+
prompt: string;
|
|
22
|
+
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
23
|
+
resolution: UrlSummaryResolution;
|
|
24
|
+
});
|
|
25
|
+
export declare function executeUrlFlow({ ctx, url, isYoutubeUrl, }: {
|
|
3
26
|
ctx: UrlFlowContext;
|
|
4
27
|
url: string;
|
|
5
28
|
isYoutubeUrl: boolean;
|
|
6
|
-
}): Promise<
|
|
29
|
+
}): Promise<UrlFlowResult>;
|
|
30
|
+
export {};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import type { ModelAttempt } from "../../../engine/types.js";
|
|
1
2
|
import { type ConvertTranscriptToMarkdown } from "../../../llm/transcript-to-markdown.js";
|
|
2
|
-
import type { ModelAttempt } from "../../types.js";
|
|
3
3
|
import type { UrlFlowContext } from "./types.js";
|
|
4
|
-
export type MarkdownModel = {
|
|
4
|
+
export type MarkdownModel = ModelAttempt & {
|
|
5
|
+
transport: "native" | "openrouter";
|
|
5
6
|
llmModelId: string;
|
|
6
|
-
forceOpenRouter: boolean;
|
|
7
|
-
openaiApiKeyOverride?: string | null;
|
|
8
|
-
openaiBaseUrlOverride?: string | null;
|
|
9
|
-
ollamaBaseUrlOverride?: string | null;
|
|
10
|
-
forceChatCompletions?: boolean;
|
|
11
|
-
requestOptions?: ModelAttempt["requestOptions"];
|
|
12
|
-
requiredEnv?: ModelAttempt["requiredEnv"];
|
|
13
7
|
};
|
|
14
8
|
export type MarkdownConverters = {
|
|
15
9
|
markdownRequested: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { SlideTimelineEntry } from "@steipete/summarize-core/slides";
|
|
1
2
|
import type { SlideImage, SlideExtractionResult } from "../../../slides/index.js";
|
|
2
|
-
import type { SlideTimelineEntry } from "./slides-text.js";
|
|
3
3
|
export type SlideState = SlideTimelineEntry & {
|
|
4
4
|
imagePath: string | null;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { SummaryStreamHandler } from "../../../engine/events.js";
|
|
1
2
|
import { type StreamOutputMode } from "../../stream-output.js";
|
|
2
|
-
import type { SummaryStreamHandler } from "../../summary-engine.js";
|
|
3
3
|
export declare function createSlidesSummaryStreamHandler({ stdout, env, envForRun, plain, outputMode, clearProgressForStdout, restoreProgressAfterStdout, renderSlide, getSlideIndexOrder, getSlideMeta, debugWrite, }: {
|
|
4
4
|
stdout: NodeJS.WritableStream;
|
|
5
5
|
env: Record<string, string | undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { SummaryLength } from "@steipete/summarize-core";
|
|
1
2
|
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
2
|
-
import type {
|
|
3
|
+
import type { SummaryStreamHandler } from "../../../engine/events.js";
|
|
3
4
|
import type { SlideExtractionResult, SlideImage, SlideSourceKind } from "../../../slides/index.js";
|
|
4
5
|
import type { StreamOutputMode } from "../../stream-output.js";
|
|
5
|
-
import type { SummaryStreamHandler } from "../../summary-engine.js";
|
|
6
6
|
export { createSlidesSummaryStreamHandler } from "./slides-output-stream.js";
|
|
7
7
|
export type SlidesTerminalOutput = {
|
|
8
8
|
onSlidesExtracted: (slides: SlideExtractionResult) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
2
|
-
|
|
2
|
+
export { buildModelMetaFromAttempt } from "../../../engine/model-meta.js";
|
|
3
3
|
import type { UrlFlowContext } from "./types.js";
|
|
4
4
|
export declare function buildFinishExtras({ extracted, metricsDetailed, transcriptionCostLabel, }: {
|
|
5
5
|
extracted: ExtractedLinkContent;
|
|
@@ -7,10 +7,3 @@ export declare function buildFinishExtras({ extracted, metricsDetailed, transcri
|
|
|
7
7
|
transcriptionCostLabel: string | null;
|
|
8
8
|
}): string[] | null;
|
|
9
9
|
export declare function pickModelForFinishLine(llmCalls: UrlFlowContext["model"]["llmCalls"], fallback: string | null): string | null;
|
|
10
|
-
export declare function buildModelMetaFromAttempt(attempt: ModelAttempt): {
|
|
11
|
-
provider: "cli";
|
|
12
|
-
canonical: string;
|
|
13
|
-
} | {
|
|
14
|
-
provider: import("../../../llm/model-id.js").LlmProvider;
|
|
15
|
-
canonical: string;
|
|
16
|
-
};
|
|
@@ -9,14 +9,16 @@ export declare function buildUrlJsonInput(options: {
|
|
|
9
9
|
url: string;
|
|
10
10
|
timeoutMs: number;
|
|
11
11
|
youtube: "apify" | "auto" | "no-auto" | "web" | "yt-dlp";
|
|
12
|
+
videoMode: "auto" | "transcript" | "understand";
|
|
13
|
+
embeddedVideo: "auto" | "both" | "off" | "prefer";
|
|
12
14
|
firecrawl: "always" | "auto" | "off";
|
|
13
15
|
format: "markdown" | "text";
|
|
14
16
|
markdown: "auto" | "llm" | "off" | "readability";
|
|
15
17
|
timestamps: boolean;
|
|
16
18
|
length: {
|
|
19
|
+
maxCharacters?: undefined;
|
|
17
20
|
kind: "preset";
|
|
18
21
|
preset: "long" | "medium" | "short" | "xl" | "xxl";
|
|
19
|
-
maxCharacters?: undefined;
|
|
20
22
|
} | {
|
|
21
23
|
preset?: undefined;
|
|
22
24
|
kind: "chars";
|
|
@@ -32,20 +34,3 @@ export declare function buildUrlJsonInput(options: {
|
|
|
32
34
|
label: string;
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
|
-
export declare function buildUrlJsonEnv(apiStatus: {
|
|
36
|
-
xaiApiKey: string | null;
|
|
37
|
-
apiKey: string | null;
|
|
38
|
-
openrouterApiKey: string | null;
|
|
39
|
-
apifyToken: string | null;
|
|
40
|
-
firecrawlConfigured: boolean;
|
|
41
|
-
googleConfigured: boolean;
|
|
42
|
-
anthropicConfigured: boolean;
|
|
43
|
-
}): {
|
|
44
|
-
hasXaiKey: boolean;
|
|
45
|
-
hasOpenAIKey: boolean;
|
|
46
|
-
hasOpenRouterKey: boolean;
|
|
47
|
-
hasApifyToken: boolean;
|
|
48
|
-
hasFirecrawlKey: boolean;
|
|
49
|
-
hasGoogleKey: boolean;
|
|
50
|
-
hasAnthropicKey: boolean;
|
|
51
|
-
};
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
+
import { type UrlSummaryPresentationResolution } from "../../../application/url-result.js";
|
|
1
2
|
import type { ExtractedLinkContent } from "../../../content/index.js";
|
|
3
|
+
import { type UrlSummaryResolution } from "../../../engine/web-summary.js";
|
|
2
4
|
import type { UrlExtractionUi } from "./extract.js";
|
|
3
5
|
import type { SlidesTerminalOutput } from "./slides-output.js";
|
|
4
6
|
import type { UrlFlowContext } from "./types.js";
|
|
5
|
-
type SlidesResult = Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>>;
|
|
6
|
-
export declare function buildUrlPrompt({ extracted, outputLanguage, lengthArg, promptOverride, lengthInstruction, languageInstruction, slides, }: {
|
|
7
|
-
extracted: ExtractedLinkContent;
|
|
8
|
-
outputLanguage: UrlFlowContext["flags"]["outputLanguage"];
|
|
9
|
-
lengthArg: UrlFlowContext["flags"]["lengthArg"];
|
|
10
|
-
promptOverride?: string | null;
|
|
11
|
-
lengthInstruction?: string | null;
|
|
12
|
-
languageInstruction?: string | null;
|
|
13
|
-
slides?: SlidesResult | null;
|
|
14
|
-
}): string;
|
|
15
7
|
export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, slides, slidesOutput, }: {
|
|
16
8
|
ctx: UrlFlowContext;
|
|
17
9
|
url: string;
|
|
@@ -23,7 +15,16 @@ export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi,
|
|
|
23
15
|
slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
|
|
24
16
|
slidesOutput?: SlidesTerminalOutput | null;
|
|
25
17
|
}): Promise<void>;
|
|
26
|
-
export declare function
|
|
18
|
+
export declare function executeExtractedUrlSummary({ ctx, url, extracted, prompt, onModelChosen, slides, slidesOutput, }: {
|
|
19
|
+
ctx: UrlFlowContext;
|
|
20
|
+
url: string;
|
|
21
|
+
extracted: ExtractedLinkContent;
|
|
22
|
+
prompt: string;
|
|
23
|
+
onModelChosen?: ((modelId: string) => void) | null;
|
|
24
|
+
slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
|
|
25
|
+
slidesOutput?: SlidesTerminalOutput | null;
|
|
26
|
+
}): Promise<UrlSummaryResolution>;
|
|
27
|
+
export declare function presentExtractedUrlSummary({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, resolution, slides, slidesOutput, }: {
|
|
27
28
|
ctx: UrlFlowContext;
|
|
28
29
|
url: string;
|
|
29
30
|
extracted: ExtractedLinkContent;
|
|
@@ -31,8 +32,7 @@ export declare function summarizeExtractedUrl({ ctx, url, extracted, extractionU
|
|
|
31
32
|
prompt: string;
|
|
32
33
|
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
33
34
|
transcriptionCostLabel: string | null;
|
|
34
|
-
|
|
35
|
+
resolution: UrlSummaryPresentationResolution | UrlSummaryResolution;
|
|
35
36
|
slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
|
|
36
37
|
slidesOutput?: SlidesTerminalOutput | null;
|
|
37
38
|
}): Promise<void>;
|
|
38
|
-
export {};
|