@steipete/summarize 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +121 -0
- package/LICENSE +1 -1
- package/README.md +391 -183
- package/dist/cli.js +1 -1
- package/dist/esm/cache.js +134 -64
- 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 +396 -126
- 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 +548 -0
- package/dist/esm/daemon/agent.js.map +1 -0
- 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 +88 -178
- 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 +91 -83
- 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 -28
- package/dist/esm/daemon/env-snapshot.js.map +1 -1
- package/dist/esm/daemon/flow-context.js +86 -32
- package/dist/esm/daemon/flow-context.js.map +1 -1
- package/dist/esm/daemon/launchd.js +119 -47
- 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 +206 -0
- package/dist/esm/daemon/process-registry.js.map +1 -0
- package/dist/esm/daemon/schtasks.js +96 -32
- package/dist/esm/daemon/schtasks.js.map +1 -1
- package/dist/esm/daemon/server.js +832 -158
- 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 +61 -32
- package/dist/esm/daemon/summarize.js.map +1 -1
- package/dist/esm/daemon/systemd.js +96 -35
- 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 +55 -31
- 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 +36 -35
- 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 +251 -0
- package/dist/esm/media-cache.js.map +1 -0
- 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 +2 -0
- package/dist/esm/processes.js.map +1 -0
- 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 +125 -12
- 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 +40 -22
- 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 +78 -71
- package/dist/esm/run/finish-line.js.map +1 -1
- package/dist/esm/run/flows/asset/extract.js +70 -0
- package/dist/esm/run/flows/asset/extract.js.map +1 -0
- package/dist/esm/run/flows/asset/input.js +202 -37
- package/dist/esm/run/flows/asset/input.js.map +1 -1
- package/dist/esm/run/flows/asset/media-policy.js +3 -0
- package/dist/esm/run/flows/asset/media-policy.js.map +1 -0
- package/dist/esm/run/flows/asset/media.js +233 -0
- package/dist/esm/run/flows/asset/media.js.map +1 -0
- package/dist/esm/run/flows/asset/output.js +98 -0
- package/dist/esm/run/flows/asset/output.js.map +1 -0
- 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 +306 -89
- package/dist/esm/run/flows/asset/summary.js.map +1 -1
- package/dist/esm/run/flows/url/extract.js +31 -31
- package/dist/esm/run/flows/url/extract.js.map +1 -1
- package/dist/esm/run/flows/url/flow.js +388 -82
- package/dist/esm/run/flows/url/flow.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +61 -56
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/flows/url/slides-output.js +487 -0
- package/dist/esm/run/flows/url/slides-output.js.map +1 -0
- package/dist/esm/run/flows/url/slides-text.js +628 -0
- package/dist/esm/run/flows/url/slides-text.js.map +1 -0
- package/dist/esm/run/flows/url/summary.js +493 -152
- 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 +179 -84
- package/dist/esm/run/help.js.map +1 -1
- package/dist/esm/run/logging.js +20 -12
- 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 +33 -0
- package/dist/esm/run/media-cache-state.js.map +1 -0
- 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 +19 -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 +108 -21
- 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 +327 -100
- package/dist/esm/run/runner.js.map +1 -1
- package/dist/esm/run/slides-cli.js +226 -0
- package/dist/esm/run/slides-cli.js.map +1 -0
- package/dist/esm/run/slides-render.js +163 -0
- package/dist/esm/run/slides-render.js.map +1 -0
- 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 +17 -10
- 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 +89 -57
- 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 +148 -0
- package/dist/esm/run/transcriber-cli.js.map +1 -0
- 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 -12
- 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 +1951 -0
- package/dist/esm/slides/extract.js.map +1 -0
- package/dist/esm/slides/index.js +4 -0
- package/dist/esm/slides/index.js.map +1 -0
- package/dist/esm/slides/settings.js +73 -0
- package/dist/esm/slides/settings.js.map +1 -0
- package/dist/esm/slides/store.js +111 -0
- package/dist/esm/slides/store.js.map +1 -0
- package/dist/esm/slides/types.js +2 -0
- package/dist/esm/slides/types.js.map +1 -0
- package/dist/esm/tty/format.js +13 -13
- package/dist/esm/tty/format.js.map +1 -1
- package/dist/esm/tty/osc-progress.js +22 -2
- package/dist/esm/tty/osc-progress.js.map +1 -1
- package/dist/esm/tty/progress/fetch-html.js +20 -16
- package/dist/esm/tty/progress/fetch-html.js.map +1 -1
- package/dist/esm/tty/progress/transcript.js +127 -68
- package/dist/esm/tty/progress/transcript.js.map +1 -1
- package/dist/esm/tty/spinner.js +21 -10
- package/dist/esm/tty/spinner.js.map +1 -1
- package/dist/esm/tty/theme.js +189 -0
- package/dist/esm/tty/theme.js.map +1 -0
- package/dist/esm/tty/website-progress.js +38 -34
- 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 +19 -7
- package/dist/types/config.d.ts +71 -6
- 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 +25 -0
- package/dist/types/daemon/auto-mode.d.ts +3 -3
- package/dist/types/daemon/chat.d.ts +10 -18
- 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 +24 -4
- package/dist/types/daemon/launchd.d.ts +12 -0
- package/dist/types/daemon/models.d.ts +6 -2
- package/dist/types/daemon/process-registry.d.ts +73 -0
- package/dist/types/daemon/schtasks.d.ts +4 -0
- 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 +38 -7
- package/dist/types/daemon/systemd.d.ts +4 -0
- package/dist/types/firecrawl.d.ts +1 -1
- package/dist/types/flags.d.ts +12 -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 +22 -0
- 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 -0
- 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 +7 -0
- 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 +7 -6
- package/dist/types/run/flows/asset/extract.d.ts +18 -0
- package/dist/types/run/flows/asset/input.d.ts +19 -3
- package/dist/types/run/flows/asset/media-policy.d.ts +2 -0
- package/dist/types/run/flows/asset/media.d.ts +21 -0
- package/dist/types/run/flows/asset/output.d.ts +42 -0
- package/dist/types/run/flows/asset/preprocess.d.ts +23 -17
- package/dist/types/run/flows/asset/summary.d.ts +24 -16
- package/dist/types/run/flows/url/extract.d.ts +3 -2
- 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 +66 -0
- package/dist/types/run/flows/url/slides-text.d.ts +87 -0
- package/dist/types/run/flows/url/summary.d.ts +18 -10
- package/dist/types/run/flows/url/types.d.ts +52 -21
- package/dist/types/run/format.d.ts +3 -3
- package/dist/types/run/help.d.ts +4 -1
- package/dist/types/run/logging.d.ts +3 -2
- package/dist/types/run/media-cache-state.d.ts +7 -0
- package/dist/types/run/model-attempts.d.ts +1 -1
- package/dist/types/run/progress.d.ts +2 -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 +20 -5
- package/dist/types/run/run-stream.d.ts +2 -2
- package/dist/types/run/runner.d.ts +3 -2
- package/dist/types/run/slides-cli.d.ts +9 -0
- package/dist/types/run/slides-render.d.ts +30 -0
- package/dist/types/run/stdin-temp-file.d.ts +9 -0
- package/dist/types/run/stream-output.d.ts +3 -2
- package/dist/types/run/streaming.d.ts +4 -4
- package/dist/types/run/summary-engine.d.ts +22 -12
- package/dist/types/run/summary-llm.d.ts +5 -5
- package/dist/types/run/transcriber-cli.d.ts +8 -0
- 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 +26 -6
- package/dist/types/slides/extract.d.ts +43 -0
- package/dist/types/slides/index.d.ts +5 -0
- package/dist/types/slides/settings.d.ts +20 -0
- package/dist/types/slides/store.d.ts +15 -0
- package/dist/types/slides/types.d.ts +40 -0
- package/dist/types/tty/osc-progress.d.ts +5 -5
- package/dist/types/tty/progress/fetch-html.d.ts +5 -3
- package/dist/types/tty/progress/transcript.d.ts +5 -3
- package/dist/types/tty/spinner.d.ts +3 -1
- package/dist/types/tty/theme.d.ts +44 -0
- package/dist/types/tty/website-progress.d.ts +5 -3
- package/dist/types/version.d.ts +1 -1
- package/docs/README.md +1 -1
- package/docs/_config.yml +26 -0
- package/docs/_layouts/default.html +60 -0
- package/docs/agent.md +367 -0
- package/docs/assets/site.css +748 -0
- package/docs/assets/site.js +72 -0
- package/docs/assets/summarize-cli.png +0 -0
- package/docs/assets/summarize-extension.png +0 -0
- package/docs/assets/youtube-slides.png +0 -0
- package/docs/cache.md +29 -3
- package/docs/chrome-extension.md +72 -16
- package/docs/cli.md +59 -13
- package/docs/config.md +109 -12
- package/docs/extract-only.md +10 -0
- package/docs/index.html +224 -0
- package/docs/index.md +25 -0
- package/docs/llm.md +18 -5
- package/docs/manual-tests.md +2 -0
- package/docs/media.md +6 -2
- package/docs/model-auto.md +3 -2
- package/docs/nvidia-onnx-transcription.md +55 -0
- package/docs/openai.md +1 -1
- package/docs/releasing.md +3 -0
- package/docs/site/404.html +4 -1
- package/docs/site/assets/site.css +399 -228
- package/docs/site/assets/site.js +46 -46
- package/docs/site/assets/summarize-cli.png +0 -0
- package/docs/site/assets/summarize-extension.png +0 -0
- package/docs/site/docs/chrome-extension.html +101 -0
- package/docs/site/docs/config.html +30 -8
- package/docs/site/docs/extract-only.html +17 -4
- package/docs/site/docs/firecrawl.html +13 -3
- package/docs/site/docs/index.html +40 -6
- package/docs/site/docs/llm.html +20 -5
- package/docs/site/docs/openai.html +19 -5
- package/docs/site/docs/website.html +30 -9
- package/docs/site/docs/youtube.html +13 -3
- package/docs/site/index.html +168 -85
- package/docs/slides.md +82 -0
- package/docs/smoketest.md +29 -20
- package/docs/timestamps.md +124 -0
- package/docs/website.md +13 -0
- package/docs/youtube.md +20 -0
- package/package.json +57 -48
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const canonicalHost = "summarize.sh";
|
|
2
|
+
const redirectHostnames = new Set(["summarize.is", "www.summarize.is"]);
|
|
3
|
+
|
|
4
|
+
const maybeRedirect = () => {
|
|
5
|
+
try {
|
|
6
|
+
const { hostname, pathname, search, hash } = window.location;
|
|
7
|
+
if (!redirectHostnames.has(hostname)) return;
|
|
8
|
+
const target = `https://${canonicalHost}${pathname}${search}${hash}`;
|
|
9
|
+
window.location.replace(target);
|
|
10
|
+
} catch {
|
|
11
|
+
// ignore
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const highlightNav = () => {
|
|
16
|
+
const path = window.location.pathname;
|
|
17
|
+
const isDocs = path.includes("/docs/");
|
|
18
|
+
const navDocs = document.querySelector('a[data-nav="docs"]');
|
|
19
|
+
const navHome = document.querySelector('a[data-nav="home"]');
|
|
20
|
+
if (navDocs && isDocs) navDocs.setAttribute("aria-current", "page");
|
|
21
|
+
if (navHome && !isDocs) navHome.setAttribute("aria-current", "page");
|
|
22
|
+
|
|
23
|
+
const sideLinks = document.querySelectorAll(".side a[href]");
|
|
24
|
+
for (const a of sideLinks) {
|
|
25
|
+
const href = a.getAttribute("href") ?? "";
|
|
26
|
+
if (!href) continue;
|
|
27
|
+
const normalized = href.replace(/^\.\//, "");
|
|
28
|
+
if (path.endsWith(normalized)) a.setAttribute("aria-current", "page");
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const wireCopyButtons = () => {
|
|
33
|
+
const buttons = document.querySelectorAll("[data-copy]");
|
|
34
|
+
const handleCopyClick = async (button) => {
|
|
35
|
+
const selector = button.getAttribute("data-copy");
|
|
36
|
+
const target = selector ? document.querySelector(selector) : null;
|
|
37
|
+
const text = target?.textContent?.trim() ?? "";
|
|
38
|
+
if (!text) return;
|
|
39
|
+
try {
|
|
40
|
+
await navigator.clipboard.writeText(text);
|
|
41
|
+
const prev = button.textContent ?? "";
|
|
42
|
+
button.textContent = "Copied";
|
|
43
|
+
button.setAttribute("data-copied", "1");
|
|
44
|
+
window.setTimeout(() => {
|
|
45
|
+
button.textContent = prev;
|
|
46
|
+
button.removeAttribute("data-copied");
|
|
47
|
+
}, 900);
|
|
48
|
+
} catch {
|
|
49
|
+
// ignore
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
for (const button of buttons) {
|
|
53
|
+
button.addEventListener("click", () => {
|
|
54
|
+
void handleCopyClick(button);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const reveal = () => {
|
|
60
|
+
const items = document.querySelectorAll(".reveal");
|
|
61
|
+
let i = 0;
|
|
62
|
+
for (const el of items) {
|
|
63
|
+
const delay = Math.min(380, i * 70);
|
|
64
|
+
window.setTimeout(() => el.classList.add("is-on"), delay);
|
|
65
|
+
i++;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
maybeRedirect();
|
|
70
|
+
highlightNav();
|
|
71
|
+
wireCopyButtons();
|
|
72
|
+
reveal();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/cache.md
CHANGED
|
@@ -21,15 +21,28 @@ Lightweight, CLI-only SQLite cache. Single DB file.
|
|
|
21
21
|
- Override: `cache.path` in config.
|
|
22
22
|
- SQLite pragmas: WAL, NORMAL sync, busy timeout, incremental vacuum.
|
|
23
23
|
|
|
24
|
+
## Media cache (downloads)
|
|
25
|
+
|
|
26
|
+
Separate file cache for downloaded media (yt-dlp, direct media URLs). This is **not** the SQLite DB.
|
|
27
|
+
|
|
28
|
+
- Default path: `~/.summarize/cache/media`
|
|
29
|
+
- TTL: 7 days
|
|
30
|
+
- Size cap: 2048 MB
|
|
31
|
+
- Config: `cache.media` (see below)
|
|
32
|
+
- CLI: `--no-media-cache` disables media caching only
|
|
33
|
+
- Note: `--no-cache` **does not** disable the media cache
|
|
34
|
+
|
|
24
35
|
## What we cache
|
|
25
36
|
|
|
26
37
|
- **Transcripts**
|
|
27
|
-
- key: `sha256({url, namespace, formatVersion})`
|
|
38
|
+
- key: `sha256({url, namespace, fileMtime?, formatVersion})` (local file paths include `fileMtime` for invalidation)
|
|
28
39
|
- **Extracted content** (URL → text/markdown)
|
|
29
40
|
- key: `sha256({url, extractSettings, formatVersion})`
|
|
30
41
|
- **Summaries**
|
|
31
42
|
- key: `sha256({contentHash, promptHash, model, length, language, formatVersion})`
|
|
32
43
|
- cache hit even if URL differs (content hash wins).
|
|
44
|
+
- **Slides** (manifest + on-disk images in the slides output dir)
|
|
45
|
+
- key: `sha256({url, slideSettings, formatVersion})`
|
|
33
46
|
|
|
34
47
|
## Keys / hashes
|
|
35
48
|
|
|
@@ -46,7 +59,14 @@ Lightweight, CLI-only SQLite cache. Single DB file.
|
|
|
46
59
|
"enabled": true,
|
|
47
60
|
"maxMb": 512,
|
|
48
61
|
"ttlDays": 30,
|
|
49
|
-
"path": "~/.summarize/cache.sqlite"
|
|
62
|
+
"path": "~/.summarize/cache.sqlite",
|
|
63
|
+
"media": {
|
|
64
|
+
"enabled": true,
|
|
65
|
+
"maxMb": 2048,
|
|
66
|
+
"ttlDays": 7,
|
|
67
|
+
"path": "~/.summarize/cache/media",
|
|
68
|
+
"verify": "size"
|
|
69
|
+
}
|
|
50
70
|
}
|
|
51
71
|
}
|
|
52
72
|
```
|
|
@@ -55,7 +75,7 @@ Defaults: `enabled=true`, `maxMb=512`, `ttlDays=30`, `path` unset.
|
|
|
55
75
|
|
|
56
76
|
## CLI flags
|
|
57
77
|
|
|
58
|
-
- `--no-cache`: bypass
|
|
78
|
+
- `--no-cache`: bypass summary cache reads + writes (LLM output). Extract/transcript caches still apply.
|
|
59
79
|
- `--cache-stats`: print cache stats and exit.
|
|
60
80
|
- `--clear-cache`: delete cache DB (and WAL/SHM); must be used alone.
|
|
61
81
|
|
|
@@ -65,6 +85,12 @@ Defaults: `enabled=true`, `maxMb=512`, `ttlDays=30`, `path` unset.
|
|
|
65
85
|
- Size cap: if DB > `maxMb`, delete oldest entries by `last_accessed_at` until under cap.
|
|
66
86
|
- Optional count cap if needed later.
|
|
67
87
|
|
|
88
|
+
Media cache eviction:
|
|
89
|
+
|
|
90
|
+
- TTL sweep on read/write.
|
|
91
|
+
- Size cap: evict least-recently-used files until under cap.
|
|
92
|
+
- `verify` controls integrity checks: `size` (default), `hash`, or `none`.
|
|
93
|
+
|
|
68
94
|
## Notes
|
|
69
95
|
|
|
70
96
|
- No extension cache (daemon uses CLI cache).
|
package/docs/chrome-extension.md
CHANGED
|
@@ -4,7 +4,7 @@ read_when:
|
|
|
4
4
|
- "When working on the extension, daemon, or side panel UX."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Browser Side Panel (Chrome + Firefox Extension + Daemon)
|
|
8
8
|
|
|
9
9
|
Goal: Chrome **Side Panel** (“real sidebar”) summarizes **what you see** on the current tab. Panel open → navigation → auto summarize (optional) → **streaming** Markdown rendered in-panel.
|
|
10
10
|
|
|
@@ -14,12 +14,19 @@ Quickstart:
|
|
|
14
14
|
- `npm i -g @steipete/summarize`
|
|
15
15
|
- `brew install steipete/tap/summarize` (macOS arm64)
|
|
16
16
|
- Build/load extension: `apps/chrome-extension/README.md`
|
|
17
|
+
- Firefox sidebar build: `pnpm -C apps/chrome-extension build:firefox` (load via `about:debugging` → temporary add-on)
|
|
17
18
|
- Open side panel → copy token install command → run:
|
|
18
19
|
- `summarize daemon install --token <TOKEN>` (macOS: LaunchAgent, Linux: systemd user, Windows: Scheduled Task)
|
|
19
20
|
- Verify:
|
|
20
21
|
- `summarize daemon status`
|
|
21
22
|
- Restart (if needed): `summarize daemon restart`
|
|
22
23
|
|
|
24
|
+
Firefox notes:
|
|
25
|
+
|
|
26
|
+
- Sidebar UX differs from Chrome’s side panel (persistent sidebar instead of slide-in panel).
|
|
27
|
+
- Firefox testing is limited in Playwright; see `apps/chrome-extension/tests/README-firefox.md`.
|
|
28
|
+
- Compatibility details: `apps/chrome-extension/docs/firefox.md`.
|
|
29
|
+
|
|
23
30
|
Dev (repo checkout):
|
|
24
31
|
|
|
25
32
|
- Use: `pnpm summarize daemon install --token <TOKEN> --dev` (autostart service runs `src/cli.ts` via `tsx`, no `dist/` build required).
|
|
@@ -32,6 +39,13 @@ Dev (repo checkout):
|
|
|
32
39
|
- “Daemon not reachable”:
|
|
33
40
|
- `summarize daemon status`
|
|
34
41
|
- Logs: `~/.summarize/logs/daemon.err.log`
|
|
42
|
+
- macOS `launchctl bootstrap` errors (`Input/output error`, `Domain does not support specified action`):
|
|
43
|
+
- `summarize daemon install` now tries both launchd domains (`gui/<uid>` then `user/<uid>`).
|
|
44
|
+
- Install as your normal user (not root) so HOME + launchd domain match.
|
|
45
|
+
- Re-run: `summarize daemon install --token <TOKEN>`.
|
|
46
|
+
- “Need extension-side traces”:
|
|
47
|
+
- Options → Logs → `extension.log` (panel/background events).
|
|
48
|
+
- Enable “Extended logging” in Advanced settings for full pipeline traces.
|
|
35
49
|
- “Stream ended unexpectedly” / empty chat response:
|
|
36
50
|
- The daemon likely stopped mid-stream. Restart it, then click “Try again”.
|
|
37
51
|
- `summarize daemon restart`
|
|
@@ -61,11 +75,11 @@ Dev (repo checkout):
|
|
|
61
75
|
|
|
62
76
|
## Data Flow
|
|
63
77
|
|
|
64
|
-
1
|
|
65
|
-
2
|
|
66
|
-
3
|
|
67
|
-
4
|
|
68
|
-
5
|
|
78
|
+
1. User opens side panel (click extension icon).
|
|
79
|
+
2. Panel sends a “ready” message to the background (plus periodic “ping” heartbeats while open).
|
|
80
|
+
3. On nav/tab change (and auto enabled): background asks the content script to extract `{ url, title, text }` (best-effort).
|
|
81
|
+
4. Background `POST`s payload to daemon `/v1/summarize` with `Authorization: Bearer <token>`.
|
|
82
|
+
5. Panel opens `/v1/summarize/<id>/events` (SSE) and renders streamed Markdown.
|
|
69
83
|
|
|
70
84
|
## Auto Mode (URL + Page Text)
|
|
71
85
|
|
|
@@ -87,6 +101,12 @@ When the page contains embedded audio/video, the Summarize button gains a dropdo
|
|
|
87
101
|
|
|
88
102
|
See `docs/media.md` for detection and transcript rules.
|
|
89
103
|
|
|
104
|
+
## Slides (Side Panel)
|
|
105
|
+
|
|
106
|
+
- The slides toggle lights up on media-friendly URLs (YouTube/watch|shorts, youtu.be, direct media) or when the page reports video/audio. Defaults to Video on those pages.
|
|
107
|
+
- Turning slides **on** refreshes the current summary and requests slide extraction (`yt-dlp`, `ffmpeg`). OCR text is opt-in (Advanced setting) and requires `tesseract`. Missing tools surface a footer notice with install instructions; restart the daemon after installing.
|
|
108
|
+
- Slides stay off elsewhere and the toggle is disabled on non-media pages.
|
|
109
|
+
|
|
90
110
|
## SPA Navigation
|
|
91
111
|
|
|
92
112
|
- Background listens to `chrome.webNavigation.onHistoryStateUpdated` (SPA route changes) and `tabs.onUpdated` (page loads).
|
|
@@ -99,6 +119,11 @@ See `docs/media.md` for detection and transcript rules.
|
|
|
99
119
|
- `linkify: true`.
|
|
100
120
|
- Render links with `target=_blank` + `rel=noopener noreferrer`.
|
|
101
121
|
|
|
122
|
+
## Timestamp Links (Chat)
|
|
123
|
+
|
|
124
|
+
- When timed transcripts are available, chat context includes `[mm:ss]` lines.
|
|
125
|
+
- Assistant is prompted to cite timestamps; clicking them seeks the current media (video/audio) while preserving play/pause state.
|
|
126
|
+
|
|
102
127
|
## Model Selection UX
|
|
103
128
|
|
|
104
129
|
- Settings:
|
|
@@ -109,17 +134,21 @@ See `docs/media.md` for detection and transcript rules.
|
|
|
109
134
|
- Auto summarize: on/off.
|
|
110
135
|
- Hover summaries: on/off (side panel drawer, default off).
|
|
111
136
|
- Typography: font family (dropdown + custom), font size (slider).
|
|
112
|
-
- Advanced overrides (
|
|
137
|
+
- Advanced overrides (Options → Advanced tab).
|
|
113
138
|
- Leave blank to use daemon config/defaults; set a value to override.
|
|
114
139
|
- Chat (advanced): enable/disable the side panel chat input (default on; summary is the first message).
|
|
140
|
+
- Summary timestamps (advanced): include `[mm:ss]` links in summaries for media when available (default on).
|
|
141
|
+
- Slides parallel (advanced): show summary first and extract slides in parallel (default on).
|
|
142
|
+
- Slides OCR text (advanced): allow OCR text as a slide text source (default off).
|
|
115
143
|
- Extended logging: send full input/output to daemon logs (requires daemon logging enabled).
|
|
116
144
|
- Hover summary prompt: customize the prompt used for link hover summaries (prefilled; reset to default).
|
|
117
145
|
- Pipeline mode: `page|url` (default auto).
|
|
118
146
|
- Firecrawl: `off|auto|always`.
|
|
119
147
|
- Markdown mode: `readability|llm|auto|off`.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
148
|
+
- Preprocess: `off|auto|always`.
|
|
149
|
+
- YouTube mode: `no-auto|yt-dlp|web|apify` (default auto).
|
|
150
|
+
- Timeout (e.g. `90s`, `2m`), retries, max output tokens (e.g. `2k`).
|
|
151
|
+
- Process manager: live list of daemon-spawned tools (ffmpeg, yt-dlp, tesseract, etc.) with logs.
|
|
123
152
|
- Extension includes current settings in request; daemon treats them like CLI flags (`--model`, `--length`, `--language`, `--prompt`).
|
|
124
153
|
|
|
125
154
|
## Token Pairing / Setup Mode
|
|
@@ -152,20 +181,46 @@ Problem: daemon must be secured; extension must discover and pair with it.
|
|
|
152
181
|
- `language?: string` (e.g. `auto`, `en`, `de`, `pt-BR`)
|
|
153
182
|
- `prompt?: string` (custom instruction prefix)
|
|
154
183
|
- `mode?: "auto" | "page" | "url"` (default: `"auto"`)
|
|
155
|
-
- `maxCharacters?: number | null` (caps URL-mode extraction before summarization)
|
|
184
|
+
- `maxCharacters?: number | null` (caps URL-mode extraction before summarization; ignored for extract-only unless explicitly provided)
|
|
185
|
+
- `format?: "text" | "markdown"` (default: `"text"`)
|
|
186
|
+
- `markdownMode?: "readability" | "auto" | "llm" | "off"` (only when `format: "markdown"`)
|
|
187
|
+
- `preprocess?: "off" | "auto" | "always"` (markitdown/HTML preprocess)
|
|
156
188
|
- `extractOnly?: boolean` (when `true`, returns extracted content without summarizing; requires `mode: "url"`)
|
|
157
189
|
- `text?: string` (required for `mode: "page"`; optional for `auto`)
|
|
158
190
|
- `truncated?: boolean` (optional; indicates extracted `text` was shortened)
|
|
159
191
|
- 200 JSON: `{ ok: true, id }`
|
|
160
|
-
- `
|
|
192
|
+
- `GET /v1/summarize/<id>/slides/events`
|
|
193
|
+
- Headers: `Authorization: Bearer <token>`
|
|
194
|
+
- SSE stream of slide updates (`slides`, `status`, `done`, `error`) independent of summary stream.
|
|
195
|
+
- `POST /v1/agent` (SSE by default; JSON via `Accept: application/json` or `?format=json`)
|
|
161
196
|
- Headers: `Authorization: Bearer <token>`
|
|
162
197
|
- Body:
|
|
163
198
|
- `url: string` (required)
|
|
164
199
|
- `title?: string | null`
|
|
165
|
-
- `pageContent: string`
|
|
166
|
-
- `
|
|
167
|
-
- `
|
|
168
|
-
|
|
200
|
+
- `pageContent: string`
|
|
201
|
+
- `cacheContent?: string` (used for cache key; defaults to `pageContent`)
|
|
202
|
+
- `messages: Array<Message>` (pi-ai format)
|
|
203
|
+
- `model?: string`
|
|
204
|
+
- `length?: string` (e.g. `short`, `xl`, `20k`)
|
|
205
|
+
- `language?: string` (e.g. `auto`, `en`, `de`)
|
|
206
|
+
- `tools?: string[]`
|
|
207
|
+
- `automationEnabled?: boolean`
|
|
208
|
+
- SSE events:
|
|
209
|
+
- `event: chunk` `data: { text }`
|
|
210
|
+
- `event: assistant` `data: { ...assistant }`
|
|
211
|
+
- `event: done` `data: {}`
|
|
212
|
+
- `event: error` `data: { message }`
|
|
213
|
+
- `POST /v1/agent/history`
|
|
214
|
+
- Headers: `Authorization: Bearer <token>`
|
|
215
|
+
- Body:
|
|
216
|
+
- `url: string` (required)
|
|
217
|
+
- `pageContent: string`
|
|
218
|
+
- `cacheContent?: string` (used for cache key; defaults to `pageContent`)
|
|
219
|
+
- `model?: string`
|
|
220
|
+
- `length?: string`
|
|
221
|
+
- `language?: string`
|
|
222
|
+
- `automationEnabled?: boolean`
|
|
223
|
+
- 200 JSON: `{ ok: true, messages }`
|
|
169
224
|
- `GET /v1/summarize/:id/events` (SSE)
|
|
170
225
|
- `event: chunk` `data: { text }`
|
|
171
226
|
- `event: meta` `data: { model }`
|
|
@@ -175,6 +230,7 @@ Problem: daemon must be secured; extension must discover and pair with it.
|
|
|
175
230
|
- `event: error` `data: { message }`
|
|
176
231
|
|
|
177
232
|
Notes:
|
|
233
|
+
|
|
178
234
|
- SSE keeps the extension simple + streaming-friendly.
|
|
179
235
|
- Requests keyed by `id`; daemon keeps a small in-memory map while streaming.
|
|
180
236
|
|
package/docs/cli.md
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
---
|
|
2
|
-
summary: "CLI model providers and config for Claude, Codex, and
|
|
2
|
+
summary: "CLI model providers and config for Claude, Codex, Gemini, and Cursor Agent."
|
|
3
3
|
read_when:
|
|
4
4
|
- "When changing CLI model integration."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# CLI models
|
|
8
8
|
|
|
9
|
-
Summarize can use installed CLIs (Claude, Codex, Gemini) as local model backends.
|
|
9
|
+
Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent) as local model backends.
|
|
10
10
|
|
|
11
11
|
## Model ids
|
|
12
12
|
|
|
13
13
|
- `cli/claude/<model>` (e.g. `cli/claude/sonnet`)
|
|
14
14
|
- `cli/codex/<model>` (e.g. `cli/codex/gpt-5.2`)
|
|
15
15
|
- `cli/gemini/<model>` (e.g. `cli/gemini/gemini-3-flash-preview`)
|
|
16
|
+
- `cli/agent/<model>` (e.g. `cli/agent/gpt-5.2`)
|
|
16
17
|
|
|
17
18
|
Use `--cli [provider]` (case-insensitive) for the provider default, or `--model cli/<provider>/<model>` to pin a model.
|
|
18
19
|
If `--cli` is provided without a provider, auto selection is used with CLI enabled.
|
|
19
20
|
|
|
20
21
|
## Auto mode
|
|
21
22
|
|
|
22
|
-
Auto mode
|
|
23
|
+
Auto mode can prepend CLI attempts in two ways:
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
- `cli.enabled` set in config:
|
|
26
|
+
- Auto always uses this list order.
|
|
27
|
+
- Also acts as an allowlist for explicit `--cli` / `--model cli/...`.
|
|
28
|
+
- Auto CLI fallback (`cli.autoFallback`, default enabled):
|
|
29
|
+
- Applies only to **implicit** auto (when no model is set via flag/env/config).
|
|
30
|
+
- Default behavior: only when no API key is configured.
|
|
31
|
+
- Default order: `claude, gemini, codex, agent`.
|
|
32
|
+
- Remembers + prioritizes the last successful CLI provider (`~/.summarize/cli-state.json`).
|
|
26
33
|
|
|
27
34
|
Gemini CLI performance: summarize sets `GEMINI_CLI_NO_RELAUNCH=true` for Gemini CLI runs to avoid a costly self-relaunch (can be overridden by setting it yourself).
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
(recommended: `["gemini"]`).
|
|
31
|
-
|
|
32
|
-
Enable CLI attempts:
|
|
36
|
+
Set explicit CLI allowlist:
|
|
33
37
|
|
|
34
38
|
```json
|
|
35
39
|
{
|
|
@@ -37,21 +41,36 @@ Enable CLI attempts:
|
|
|
37
41
|
}
|
|
38
42
|
```
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
Configure auto CLI fallback:
|
|
41
45
|
|
|
42
46
|
```json
|
|
43
47
|
{
|
|
44
|
-
"cli": {
|
|
48
|
+
"cli": {
|
|
49
|
+
"autoFallback": {
|
|
50
|
+
"enabled": true,
|
|
51
|
+
"onlyWhenNoApiKeys": true,
|
|
52
|
+
"order": ["claude", "gemini", "codex", "agent"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
45
55
|
}
|
|
46
56
|
```
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
Disable auto CLI fallback:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"cli": { "autoFallback": { "enabled": false } }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Note: `--model auto` (explicit) does not trigger auto CLI fallback unless `cli.enabled` is set.
|
|
49
67
|
|
|
50
68
|
## CLI discovery
|
|
51
69
|
|
|
52
70
|
Binary lookup:
|
|
53
71
|
|
|
54
72
|
- `CLAUDE_PATH`, `CODEX_PATH`, `GEMINI_PATH` (optional overrides)
|
|
73
|
+
- `AGENT_PATH` (optional override)
|
|
55
74
|
- Otherwise uses `PATH`
|
|
56
75
|
|
|
57
76
|
## Attachments (images/files)
|
|
@@ -62,19 +81,29 @@ path-based prompt and enables the required tool flags:
|
|
|
62
81
|
- Claude: `--tools Read --dangerously-skip-permissions`
|
|
63
82
|
- Gemini: `--yolo` and `--include-directories <dir>`
|
|
64
83
|
- Codex: `codex exec --output-last-message ...` and `-i <image>` for images
|
|
84
|
+
- Agent: uses built-in file tools in `agent --print` mode (no extra flags)
|
|
65
85
|
|
|
66
86
|
## Config
|
|
67
87
|
|
|
68
88
|
```json
|
|
69
89
|
{
|
|
70
90
|
"cli": {
|
|
71
|
-
"enabled": ["claude", "gemini", "codex"],
|
|
91
|
+
"enabled": ["claude", "gemini", "codex", "agent"],
|
|
92
|
+
"autoFallback": {
|
|
93
|
+
"enabled": true,
|
|
94
|
+
"onlyWhenNoApiKeys": true,
|
|
95
|
+
"order": ["claude", "gemini", "codex", "agent"]
|
|
96
|
+
},
|
|
72
97
|
"codex": { "model": "gpt-5.2" },
|
|
73
98
|
"gemini": { "model": "gemini-3-flash-preview", "extraArgs": ["--verbose"] },
|
|
74
99
|
"claude": {
|
|
75
100
|
"model": "sonnet",
|
|
76
101
|
"binary": "/usr/local/bin/claude",
|
|
77
102
|
"extraArgs": ["--verbose"]
|
|
103
|
+
},
|
|
104
|
+
"agent": {
|
|
105
|
+
"model": "gpt-5.2",
|
|
106
|
+
"binary": "/usr/local/bin/agent"
|
|
78
107
|
}
|
|
79
108
|
}
|
|
80
109
|
}
|
|
@@ -84,6 +113,23 @@ Notes:
|
|
|
84
113
|
|
|
85
114
|
- CLI output is treated as text only (no token accounting).
|
|
86
115
|
- If a CLI call fails, auto mode falls back to the next candidate.
|
|
116
|
+
- Cursor Agent CLI uses the `agent` binary and relies on Cursor CLI auth (login or `CURSOR_API_KEY`).
|
|
117
|
+
- Gemini CLI is invoked in headless mode with `--prompt` for compatibility with current Gemini CLI releases.
|
|
118
|
+
|
|
119
|
+
## Quick smoke test (all CLI providers)
|
|
120
|
+
|
|
121
|
+
Use a tiny local text file and run each provider with a longer timeout (Gemini can be slower):
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
printf "Summarize CLI smoke input.\nOne short paragraph. Reply can be brief.\n" >/tmp/summarize-cli-smoke.txt
|
|
125
|
+
|
|
126
|
+
summarize --cli codex --plain --timeout 2m /tmp/summarize-cli-smoke.txt
|
|
127
|
+
summarize --cli claude --plain --timeout 2m /tmp/summarize-cli-smoke.txt
|
|
128
|
+
summarize --cli gemini --plain --timeout 2m /tmp/summarize-cli-smoke.txt
|
|
129
|
+
summarize --cli agent --plain --timeout 2m /tmp/summarize-cli-smoke.txt
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If Agent fails with auth, run `agent login` (interactive) or set `CURSOR_API_KEY`.
|
|
87
133
|
|
|
88
134
|
## Generate free preset (OpenRouter)
|
|
89
135
|
|
package/docs/config.md
CHANGED
|
@@ -36,6 +36,20 @@ For prompt:
|
|
|
36
36
|
1. CLI flag `--prompt` / `--prompt-file`
|
|
37
37
|
2. Config file `prompt`
|
|
38
38
|
3. Built-in default prompt
|
|
39
|
+
|
|
40
|
+
For environment variables:
|
|
41
|
+
|
|
42
|
+
1. Process environment variables
|
|
43
|
+
2. Config file `env`
|
|
44
|
+
3. Legacy config file `apiKeys` (mapped to env names)
|
|
45
|
+
|
|
46
|
+
For UI theme:
|
|
47
|
+
|
|
48
|
+
1. CLI flag `--theme`
|
|
49
|
+
2. Env `SUMMARIZE_THEME`
|
|
50
|
+
3. Config file `ui.theme`
|
|
51
|
+
4. Built-in default (`aurora`)
|
|
52
|
+
|
|
39
53
|
## Format
|
|
40
54
|
|
|
41
55
|
`~/.summarize/config.json`:
|
|
@@ -43,8 +57,10 @@ For prompt:
|
|
|
43
57
|
```json
|
|
44
58
|
{
|
|
45
59
|
"model": { "id": "google/gemini-3-flash-preview" },
|
|
60
|
+
"env": { "OPENAI_API_KEY": "sk-..." },
|
|
46
61
|
"output": { "language": "auto" },
|
|
47
|
-
"prompt": "Explain like I am five."
|
|
62
|
+
"prompt": "Explain like I am five.",
|
|
63
|
+
"ui": { "theme": "ember" }
|
|
48
64
|
}
|
|
49
65
|
```
|
|
50
66
|
|
|
@@ -84,6 +100,39 @@ Example:
|
|
|
84
100
|
}
|
|
85
101
|
```
|
|
86
102
|
|
|
103
|
+
## Environment defaults
|
|
104
|
+
|
|
105
|
+
Set any env var in config (process env still wins):
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"env": {
|
|
110
|
+
"OPENAI_API_KEY": "sk-...",
|
|
111
|
+
"OPENROUTER_API_KEY": "sk-or-...",
|
|
112
|
+
"FIRECRAWL_API_KEY": "...",
|
|
113
|
+
"CUSTOM_FLAG": "1"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Legacy shortcut (still supported):
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"apiKeys": {
|
|
123
|
+
"openai": "sk-...",
|
|
124
|
+
"anthropic": "sk-ant-...",
|
|
125
|
+
"google": "...",
|
|
126
|
+
"openrouter": "sk-or-...",
|
|
127
|
+
"xai": "...",
|
|
128
|
+
"zai": "...",
|
|
129
|
+
"apify": "...",
|
|
130
|
+
"firecrawl": "...",
|
|
131
|
+
"fal": "..."
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
87
136
|
## Cache
|
|
88
137
|
|
|
89
138
|
Configure the on-disk SQLite cache (extracted content, transcripts, summaries).
|
|
@@ -94,7 +143,47 @@ Configure the on-disk SQLite cache (extracted content, transcripts, summaries).
|
|
|
94
143
|
"enabled": true,
|
|
95
144
|
"maxMb": 512,
|
|
96
145
|
"ttlDays": 30,
|
|
97
|
-
"path": "~/.summarize/cache.sqlite"
|
|
146
|
+
"path": "~/.summarize/cache.sqlite",
|
|
147
|
+
"media": {
|
|
148
|
+
"enabled": true,
|
|
149
|
+
"maxMb": 2048,
|
|
150
|
+
"ttlDays": 7,
|
|
151
|
+
"path": "~/.summarize/cache/media",
|
|
152
|
+
"verify": "size"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Notes:
|
|
159
|
+
|
|
160
|
+
- `cache.media` controls the **media file** cache (yt-dlp downloads).
|
|
161
|
+
- `--no-cache` bypasses summary caching only (LLM output); extract/transcript caches still apply. Use `--no-media-cache` for media.
|
|
162
|
+
- `verify`: `size` (default), `hash`, or `none`.
|
|
163
|
+
|
|
164
|
+
## UI theme
|
|
165
|
+
|
|
166
|
+
Set a default CLI theme:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"ui": { "theme": "moss" }
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Slides defaults
|
|
175
|
+
|
|
176
|
+
Enable slides by default and tune extraction parameters:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"slides": {
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"ocr": false,
|
|
183
|
+
"dir": "slides",
|
|
184
|
+
"sceneThreshold": 0.3,
|
|
185
|
+
"max": 20,
|
|
186
|
+
"minDuration": 2
|
|
98
187
|
}
|
|
99
188
|
}
|
|
100
189
|
```
|
|
@@ -224,17 +313,25 @@ Examples:
|
|
|
224
313
|
```json
|
|
225
314
|
{
|
|
226
315
|
"cli": {
|
|
227
|
-
"enabled": ["gemini"],
|
|
316
|
+
"enabled": ["gemini", "agent"],
|
|
317
|
+
"autoFallback": {
|
|
318
|
+
"enabled": true,
|
|
319
|
+
"onlyWhenNoApiKeys": true,
|
|
320
|
+
"order": ["claude", "gemini", "codex", "agent"]
|
|
321
|
+
},
|
|
228
322
|
"codex": { "model": "gpt-5.2" },
|
|
229
|
-
"claude": { "binary": "/usr/local/bin/claude", "extraArgs": ["--verbose"] }
|
|
323
|
+
"claude": { "binary": "/usr/local/bin/claude", "extraArgs": ["--verbose"] },
|
|
324
|
+
"agent": { "binary": "/usr/local/bin/agent", "model": "gpt-5.2" }
|
|
230
325
|
}
|
|
231
326
|
}
|
|
232
327
|
```
|
|
233
328
|
|
|
234
329
|
Notes:
|
|
235
330
|
|
|
236
|
-
- `cli.enabled` is an allowlist (
|
|
237
|
-
-
|
|
331
|
+
- `cli.enabled` is an allowlist (and order) for auto + explicit CLI model ids.
|
|
332
|
+
- `cli.autoFallback` controls implicit-auto CLI fallback when `cli.enabled` is not set.
|
|
333
|
+
- Default auto fallback order: `claude, gemini, codex, agent`.
|
|
334
|
+
- Auto fallback stores the last successful provider in `~/.summarize/cli-state.json` and prioritizes it on the next run.
|
|
238
335
|
- `cli.<provider>.binary` overrides CLI binary discovery.
|
|
239
336
|
- `cli.<provider>.extraArgs` appends extra CLI args.
|
|
240
337
|
|
|
@@ -270,9 +367,9 @@ Override API endpoints for any provider to use proxies, gateways, or compatible
|
|
|
270
367
|
|
|
271
368
|
Or via environment variables (which take precedence over config):
|
|
272
369
|
|
|
273
|
-
| Provider
|
|
274
|
-
|
|
|
275
|
-
| OpenAI
|
|
276
|
-
| Anthropic
|
|
277
|
-
| Google
|
|
278
|
-
| xAI
|
|
370
|
+
| Provider | Environment Variable(s) |
|
|
371
|
+
| --------- | -------------------------------------------- |
|
|
372
|
+
| OpenAI | `OPENAI_BASE_URL` |
|
|
373
|
+
| Anthropic | `ANTHROPIC_BASE_URL` |
|
|
374
|
+
| Google | `GOOGLE_BASE_URL` (alias: `GEMINI_BASE_URL`) |
|
|
375
|
+
| xAI | `XAI_BASE_URL` |
|
package/docs/extract-only.md
CHANGED
|
@@ -13,8 +13,14 @@ Deprecated alias: `--extract-only`.
|
|
|
13
13
|
## Notes
|
|
14
14
|
|
|
15
15
|
- No summarization LLM call happens in this mode.
|
|
16
|
+
- Input must be a URL (`-` stdin is not supported with `--extract`).
|
|
17
|
+
- No extraction cap is applied. Use `--max-extract-characters <count>` to cap output if needed.
|
|
16
18
|
- `--format md` may still convert HTML to Markdown (depending on `--markdown-mode` and available tools).
|
|
17
19
|
- `--length` is intended for summarization guidance; extraction prints full content.
|
|
20
|
+
- `--timestamps` keeps the plain transcript text but also exposes `transcriptSegments` and `transcriptTimedText` (JSON) and prints a timed transcript block when available.
|
|
21
|
+
- `--slides` runs slide detection (YouTube/direct video URLs). Slide metadata is included in JSON output and written to `slides.json` in the slide directory.
|
|
22
|
+
- When combined with `--extract` for videos that have timed transcripts, the CLI interleaves slide images inline at matching timestamps.
|
|
23
|
+
- Scene detection auto-tunes using sampled frame hashes.
|
|
18
24
|
- For non-YouTube URLs with `--format md`, the CLI uses Readability article HTML as the default Markdown input (`--markdown-mode readability`).
|
|
19
25
|
- Use `--markdown-mode auto` to prefer LLM/markitdown conversion without Readability preprocessing.
|
|
20
26
|
- Use `--markdown-mode llm` to force an LLM conversion.
|
|
@@ -23,3 +29,7 @@ Deprecated alias: `--extract-only`.
|
|
|
23
29
|
- Force it with `--markdown-mode llm`.
|
|
24
30
|
- If no LLM is configured, `--markdown-mode auto` may fall back to `uvx markitdown` when available.
|
|
25
31
|
- `--markdown-mode readability` uses Readability to extract article HTML before Markdown conversion.
|
|
32
|
+
|
|
33
|
+
Daemon note:
|
|
34
|
+
|
|
35
|
+
- `/v1/summarize` supports `format: "markdown"` + `markdownMode` for extract-only output (use `extractOnly: true`).
|