@steipete/summarize 0.25.3 → 0.26.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 +30 -1
- package/dist/esm/agy-model.js +7 -0
- package/dist/esm/agy-model.js.map +1 -0
- package/dist/esm/application/model-selection.js +1 -1
- package/dist/esm/application/model-selection.js.map +1 -1
- package/dist/esm/config/sections.js +6 -1
- package/dist/esm/config/sections.js.map +1 -1
- package/dist/esm/daemon/command.js.map +1 -1
- package/dist/esm/daemon/schtasks.js +12 -1
- package/dist/esm/daemon/schtasks.js.map +1 -1
- package/dist/esm/engine/openrouter.js +4 -2
- package/dist/esm/engine/openrouter.js.map +1 -1
- package/dist/esm/llm/cli-exec.js +2 -2
- package/dist/esm/llm/cli-exec.js.map +1 -1
- package/dist/esm/llm/cli-provider-output/codex.js +24 -0
- package/dist/esm/llm/cli-provider-output/codex.js.map +1 -1
- package/dist/esm/llm/cli-provider-output.js +1 -1
- package/dist/esm/llm/cli-provider-output.js.map +1 -1
- package/dist/esm/llm/cli-runners/codex.js +28 -18
- package/dist/esm/llm/cli-runners/codex.js.map +1 -1
- package/dist/esm/llm/cli-runners/plain.js +7 -0
- package/dist/esm/llm/cli-runners/plain.js.map +1 -1
- package/dist/esm/model-auto-cli.js +1 -2
- package/dist/esm/model-auto-cli.js.map +1 -1
- package/dist/esm/model-spec.js +4 -4
- package/dist/esm/model-spec.js.map +1 -1
- package/dist/esm/run/finish-line-labels.js.map +1 -1
- package/dist/esm/run/flows/asset/media.js +29 -3
- package/dist/esm/run/flows/asset/media.js.map +1 -1
- package/dist/esm/run/flows/asset/summary.js +1 -1
- package/dist/esm/run/flows/asset/summary.js.map +1 -1
- package/dist/esm/run/flows/url/markdown.js +3 -3
- package/dist/esm/run/flows/url/markdown.js.map +1 -1
- package/dist/esm/run/status-cli.js +0 -2
- package/dist/esm/run/status-cli.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/agy-model.d.ts +1 -0
- package/dist/types/daemon/command.d.ts +1 -1
- package/dist/types/llm/cli-exec.d.ts +2 -1
- package/dist/types/llm/cli-provider-output/codex.d.ts +1 -0
- package/dist/types/llm/cli-provider-output.d.ts +1 -1
- package/dist/types/llm/markdown-converters.d.ts +1 -1
- package/dist/types/run/finish-line-labels.d.ts +2 -1
- package/dist/types/run/flows/asset/media.d.ts +1 -0
- package/dist/types/run/flows/asset/summary.d.ts +45 -0
- package/dist/types/run/flows/url/markdown.d.ts +2 -7
- package/dist/types/version.d.ts +1 -1
- package/docs/chrome-extension.md +2 -0
- package/docs/cli.md +8 -4
- package/docs/config.md +5 -2
- package/docs/extract-only.md +2 -0
- package/docs/llm.md +17 -1
- package/docs/media.md +1 -1
- package/docs/model-auto.md +2 -0
- package/docs/quickstart.md +1 -1
- package/docs/timestamps.md +2 -2
- package/docs/website.md +2 -0
- package/package.json +15 -15
- package/dist/esm/engine/fetch-with-timeout.js +0 -35
- package/dist/esm/engine/fetch-with-timeout.js.map +0 -1
- package/dist/types/engine/fetch-with-timeout.d.ts +0 -4
|
@@ -1,4 +1,49 @@
|
|
|
1
1
|
import type { AssetSummaryContext, AssetSummaryResult, PresentAssetSummaryArgs, SummarizeAssetArgs } from "./types.js";
|
|
2
|
+
export declare function buildAssetJsonInput(ctx: AssetSummaryContext, args: PresentAssetSummaryArgs): {
|
|
3
|
+
timeoutMs: number;
|
|
4
|
+
length: {
|
|
5
|
+
kind: "preset";
|
|
6
|
+
preset: "long" | "medium" | "short" | "xl" | "xxl";
|
|
7
|
+
maxCharacters?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
preset?: undefined;
|
|
10
|
+
kind: "chars";
|
|
11
|
+
maxCharacters: number;
|
|
12
|
+
};
|
|
13
|
+
maxOutputTokens: number | null;
|
|
14
|
+
model: string;
|
|
15
|
+
language: {
|
|
16
|
+
mode: "auto";
|
|
17
|
+
} | {
|
|
18
|
+
mode: "fixed";
|
|
19
|
+
tag: string;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
kind: "file";
|
|
23
|
+
filePath: string;
|
|
24
|
+
} | {
|
|
25
|
+
timeoutMs: number;
|
|
26
|
+
length: {
|
|
27
|
+
kind: "preset";
|
|
28
|
+
preset: "long" | "medium" | "short" | "xl" | "xxl";
|
|
29
|
+
maxCharacters?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
preset?: undefined;
|
|
32
|
+
kind: "chars";
|
|
33
|
+
maxCharacters: number;
|
|
34
|
+
};
|
|
35
|
+
maxOutputTokens: number | null;
|
|
36
|
+
model: string;
|
|
37
|
+
language: {
|
|
38
|
+
mode: "auto";
|
|
39
|
+
} | {
|
|
40
|
+
mode: "fixed";
|
|
41
|
+
tag: string;
|
|
42
|
+
label: string;
|
|
43
|
+
};
|
|
44
|
+
kind: "asset-url";
|
|
45
|
+
url: string;
|
|
46
|
+
};
|
|
2
47
|
export declare function presentAssetSummary(ctx: AssetSummaryContext, args: PresentAssetSummaryArgs, result: AssetSummaryResult): Promise<void>;
|
|
3
48
|
export declare function executeAssetSummary(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
|
|
4
49
|
export declare function summarizeAsset(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConvertHtmlToMarkdown } from "@steipete/summarize-core/content";
|
|
1
2
|
import type { ModelAttempt } from "../../../engine/types.js";
|
|
2
3
|
import { type ConvertTranscriptToMarkdown } from "../../../llm/markdown-converters.js";
|
|
3
4
|
import type { UrlFlowContext } from "./types.js";
|
|
@@ -11,13 +12,7 @@ export type MarkdownConverters = {
|
|
|
11
12
|
effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
|
|
12
13
|
markdownProvider: "none" | "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia" | "minimax" | "ollama";
|
|
13
14
|
markdownModel: MarkdownModel | null;
|
|
14
|
-
convertHtmlToMarkdown:
|
|
15
|
-
url: string;
|
|
16
|
-
html: string;
|
|
17
|
-
title: string | null;
|
|
18
|
-
siteName: string | null;
|
|
19
|
-
timeoutMs: number;
|
|
20
|
-
}) => Promise<string>) | null;
|
|
15
|
+
convertHtmlToMarkdown: ConvertHtmlToMarkdown | null;
|
|
21
16
|
convertTranscriptToMarkdown: ConvertTranscriptToMarkdown | null;
|
|
22
17
|
};
|
|
23
18
|
export declare function createMarkdownConverters(ctx: UrlFlowContext, options: {
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FALLBACK_VERSION = "0.
|
|
1
|
+
export declare const FALLBACK_VERSION = "0.26.1";
|
|
2
2
|
export declare function resolvePackageVersion(importMetaUrl?: string): string;
|
|
3
3
|
export declare function resolveGitSha(importMetaUrl?: string): string | null;
|
|
4
4
|
export declare function formatVersionLine(importMetaUrl?: string): string;
|
package/docs/chrome-extension.md
CHANGED
|
@@ -168,6 +168,8 @@ See `docs/media.md` for detection and transcript rules.
|
|
|
168
168
|
|
|
169
169
|
## Timestamp Links (Chat)
|
|
170
170
|
|
|
171
|
+
- You can ask questions about an article before generating a summary; chat retrieves its readable page content.
|
|
172
|
+
- In Browser media mode, follow-up chat and chat history reuse the current summary, transcript, and slides without requesting daemon extraction. Generate a summary first if no browser context is available, or select Daemon media mode for fresh server-side extraction.
|
|
171
173
|
- When timed transcripts are available, chat context includes `[mm:ss]` lines.
|
|
172
174
|
- Assistant is prompted to cite timestamps; clicking them seeks the current media (video/audio) while preserving play/pause state.
|
|
173
175
|
|
package/docs/cli.md
CHANGED
|
@@ -22,6 +22,7 @@ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw,
|
|
|
22
22
|
- `cli/opencode` (use the OpenCode runtime default model)
|
|
23
23
|
- `cli/copilot/<model>` (e.g. `cli/copilot/gpt-5.2`)
|
|
24
24
|
- `cli/copilot` (use the Copilot CLI runtime default model)
|
|
25
|
+
- `cli/agy/<model>` (e.g. `cli/agy/gemini-3.8-flash-high`)
|
|
25
26
|
- `cli/agy` (use the Antigravity CLI active session model)
|
|
26
27
|
- `cli/pi/<model>` (e.g. `cli/pi/sonnet`)
|
|
27
28
|
- `cli/pi` (use pi's configured default model)
|
|
@@ -31,10 +32,12 @@ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw,
|
|
|
31
32
|
- `cli/grok` (use the Grok CLI default model)
|
|
32
33
|
|
|
33
34
|
Use `--cli [provider]` (case-insensitive) for the provider default, or `--model cli/<provider>/<model>` to pin a model.
|
|
34
|
-
Bare `cli/codex`
|
|
35
|
-
Antigravity
|
|
35
|
+
Bare `cli/codex` lets the installed Codex CLI choose its supported default model; set `cli.codex.model` or use `cli/codex/<model>` to select one explicitly. The generic `gpt-fast` alias uses that default with the fast service tier; `gpt-5.5-fast` continues to select GPT-5.5 explicitly. Failed Codex turns include the backend reason in the error message.
|
|
36
|
+
Antigravity supports `cli/agy/<model>` or a configured `cli.agy.model` (run `agy models` to list available model slugs), or bare `cli/agy` to use the active session model. pi supports `cli/pi/<model>` or a configured `cli.pi.model`. devin supports `cli/devin/<model>` or a configured `cli.devin.model`; run `devin models list` to see the available model families.
|
|
36
37
|
If `--cli` is provided without a provider, auto selection is used with CLI enabled.
|
|
37
38
|
|
|
39
|
+
Antigravity model selection requires agy 1.1.5 or newer. Existing `cli.agy.model` settings, which older Summarize versions ignored, now control execution (including auto CLI candidates). Remove that setting to keep using the active session model. An explicit `cli/agy/<model>` takes precedence over `cli.agy.model`; a model flag in `cli.agy.extraArgs` overrides both. Invalid settings are rejected, and unknown models fail in agy's print mode with guidance to check `agy models`. Summarize does not silently substitute the session model; auto mode can still try the next configured candidate after a failure.
|
|
40
|
+
|
|
38
41
|
Codex GPT Fast:
|
|
39
42
|
|
|
40
43
|
- `--model codex-fast` maps to `cli/codex/gpt-fast`.
|
|
@@ -172,7 +175,8 @@ Remote image and binary-file URLs are limited to native providers and CLI backen
|
|
|
172
175
|
"binary": "/usr/local/bin/copilot"
|
|
173
176
|
},
|
|
174
177
|
"agy": {
|
|
175
|
-
"binary": "/usr/local/bin/agy"
|
|
178
|
+
"binary": "/usr/local/bin/agy",
|
|
179
|
+
"model": "gemini-3.8-flash-high"
|
|
176
180
|
},
|
|
177
181
|
"pi": {
|
|
178
182
|
"binary": "/usr/local/bin/pi"
|
|
@@ -193,7 +197,7 @@ Notes:
|
|
|
193
197
|
- CLI providers that emit structured output report token usage (and USD cost where the CLI exposes it); plain-output providers such as Copilot report none.
|
|
194
198
|
- If a CLI call fails, auto mode falls back to the next candidate.
|
|
195
199
|
- Cursor Agent CLI uses the `agent` binary and relies on Cursor CLI auth (login or `CURSOR_API_KEY`).
|
|
196
|
-
- Antigravity CLI uses the active agy session model
|
|
200
|
+
- Antigravity CLI uses the active agy session model when no model is specified, or passes `--model <model>` when configured via `cli.agy.model` or `cli/agy/<model>` (run `agy models` to list valid model slugs).
|
|
197
201
|
- Antigravity normal text summaries run `agy --print <prompt>` in a temporary cwd with `--sandbox`. When the prompt or command length exceeds platform argv limits (e.g. 120 KB on Linux/macOS), the document `<content>` payload is automatically offloaded to a temporary file (`document.txt`) with restricted `0o600` permissions and referenced via `file://` in `--print`, preserving instructions before and after the content block in argv while cleaning up the single temporary directory on success, failure, or timeout. Untagged prompts are offloaded as a complete request. Short text prompts retain best-effort no-tools guidance; offloaded prompts permit reading the supplied document while discouraging file edits, local file links, and work-log narration. This is prompt steering, not a hard capability boundary. Attachment prompts keep the caller cwd so agy can inspect the requested path but do not auto-approve tools.
|
|
198
202
|
- pi runs in JSON mode (`--print --mode json`) with `--no-tools`, `--no-context-files`, `--no-extensions`, `--no-skills`, `--no-session` for isolated summarization. It receives the summarize system prompt via `--system-prompt`, the summarize prompt over stdin, and reports usage/cost via JSONL events. Use `PI_PATH` to override the binary path.
|
|
199
203
|
- devin runs `devin --print --prompt-file <file> --export <atif>`. Normal text summaries run isolated by default: a temporary cwd plus fabricated `XDG_CONFIG_HOME`/`XDG_DATA_HOME` that carry only `credentials.toml` and a merged `config.json` (user config preserved but tools denied via `permissions.deny`, plugins/subagents/auto-update disabled, and other-agent rule imports suppressed). Token usage is read from the ATIF export; Devin does not report USD cost. Set `cli.devin.isolated` to `false` only when you intentionally need Devin to inherit your real config/sessions. Attachment prompts keep the caller cwd and real Devin home so read-only tools can inspect the requested path. Auth comes from `devin auth login` credentials or `WINDSURF_API_KEY`; use `DEVIN_PATH` to override the binary path.
|
package/docs/config.md
CHANGED
|
@@ -134,6 +134,8 @@ Example:
|
|
|
134
134
|
|
|
135
135
|
Set any env var in config (process env still wins):
|
|
136
136
|
|
|
137
|
+
The resolved environment also applies to whisper.cpp binary lookup and transcription child processes.
|
|
138
|
+
|
|
137
139
|
```json
|
|
138
140
|
{
|
|
139
141
|
"env": {
|
|
@@ -430,7 +432,7 @@ Examples:
|
|
|
430
432
|
"openclaw": { "binary": "/usr/local/bin/openclaw", "model": "main" },
|
|
431
433
|
"opencode": { "binary": "/usr/local/bin/opencode", "model": "openai/gpt-5.4" },
|
|
432
434
|
"copilot": { "binary": "/usr/local/bin/copilot", "model": "gpt-5.2" },
|
|
433
|
-
"agy": { "binary": "/usr/local/bin/agy" },
|
|
435
|
+
"agy": { "binary": "/usr/local/bin/agy", "model": "gemini-3.8-flash-high" },
|
|
434
436
|
"pi": { "binary": "/usr/local/bin/pi" },
|
|
435
437
|
"devin": { "binary": "/usr/local/bin/devin" },
|
|
436
438
|
"grok": { "binary": "/usr/local/bin/grok", "model": "grok-4.6" }
|
|
@@ -447,7 +449,8 @@ Notes:
|
|
|
447
449
|
- Auto fallback stores the last successful provider in `~/.summarize/cli-state.json` and prioritizes it on the next run.
|
|
448
450
|
- `cli.<provider>.binary` overrides CLI binary discovery.
|
|
449
451
|
- `cli.<provider>.extraArgs` appends extra CLI args.
|
|
450
|
-
- Antigravity CLI uses the active agy session model
|
|
452
|
+
- Antigravity CLI uses the active agy session model by default and accepts configured (`cli.agy.model`) or per-call (`cli/agy/<model>`) models; run `agy models` to list valid model slugs.
|
|
453
|
+
- Upgrade note: `cli.agy.model` was previously ignored and now selects the model. Remove it to retain the session default. Use agy 1.1.5 or newer; invalid settings are rejected and unknown models fail instead of silently using another model. See [CLI models](cli.md) for precedence and auto fallback behavior.
|
|
451
454
|
- pi CLI runs `pi --print --mode json`, passes extracted content over stdin, and accepts configured or per-call models; use `PI_PATH` to override binary.
|
|
452
455
|
- Grok CLI runs `grok --prompt-file <file> --output-format json` in a tool-restricted sandbox for text summaries, accepts configured or per-call models, and reports token usage and cost; use `GROK_PATH` to override binary. Requires `grok login` or `XAI_API_KEY`; run `grok models` to list valid model ids.
|
|
453
456
|
- `cli.grok.isolated` defaults to `true` for normal summaries, adding a temporary cwd, a restricted toolset, `--sandbox strict`, and a temporary `GROK_HOME` that carries `auth.json` only. Set it to `false` only when local Grok config/hooks/sessions are intentional.
|
package/docs/extract-only.md
CHANGED
|
@@ -37,3 +37,5 @@ Deprecated alias: `--extract-only`.
|
|
|
37
37
|
Daemon note:
|
|
38
38
|
|
|
39
39
|
- `/v1/summarize` supports `format: "markdown"` + `markdownMode` for extract-only output (use `extractOnly: true`).
|
|
40
|
+
|
|
41
|
+
Local audio/video extraction also honors `--json`: the transcript is in `.extracted.content`, with null `llm` and `summary` fields. Verbose completion output names the actual transcriber.
|
package/docs/llm.md
CHANGED
|
@@ -55,7 +55,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
|
|
|
55
55
|
- `cli/openclaw/main`
|
|
56
56
|
- `cli/opencode/openai/gpt-5.4`
|
|
57
57
|
- `cli/copilot/gpt-5.2`
|
|
58
|
-
- `cli/agy`
|
|
58
|
+
- `cli/agy` / `cli/agy/gemini-3.8-flash-high`
|
|
59
59
|
- `cli/pi/openai/gpt-5.4`
|
|
60
60
|
- `cli/devin/swe-2-max`
|
|
61
61
|
- `cli/grok` / `cli/grok/grok-4.6`
|
|
@@ -139,6 +139,22 @@ Override the endpoint with `MINIMAX_BASE_URL` or `minimax.baseUrl` in config (e.
|
|
|
139
139
|
endpoint). The model id is passed through verbatim, so use MiniMax’s exact casing (e.g. `MiniMax-M3`).
|
|
140
140
|
Reasoning is requested through MiniMax’s separated response fields and omitted from summary text.
|
|
141
141
|
|
|
142
|
+
## OpenAI-compatible gateways
|
|
143
|
+
|
|
144
|
+
Gateways that support OpenAI Chat Completions can use the OpenAI settings, with no dedicated provider. Point
|
|
145
|
+
`OPENAI_BASE_URL` (or `openai.baseUrl` in config) at the gateway and use the gateway's key as
|
|
146
|
+
`OPENAI_API_KEY`. For example, [Runcrate](https://www.runcrate.ai), an AI cloud with an
|
|
147
|
+
OpenAI-compatible API:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
export OPENAI_BASE_URL=https://api.runcrate.ai/v1
|
|
151
|
+
export OPENAI_API_KEY="your-runcrate-api-key"
|
|
152
|
+
summarize https://example.com --model openai/meta-llama/Llama-3.3-70B-Instruct-Turbo
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Custom hosts use chat completions by default. The model id after `openai/` is passed through
|
|
156
|
+
verbatim.
|
|
157
|
+
|
|
142
158
|
## Ollama
|
|
143
159
|
|
|
144
160
|
Use `--model ollama/<model>` (e.g. `ollama/qwen3:14b`, `ollama/gemma3:12b`) to talk to a local
|
package/docs/media.md
CHANGED
|
@@ -24,7 +24,7 @@ read_when:
|
|
|
24
24
|
- RSS and Atom feed URLs use the podcast/content pipeline rather than raw XML file handling. Published feed transcripts take precedence over media transcription; ordinary XML documents remain file inputs.
|
|
25
25
|
- Podcast episode title matching preserves non-Latin letters and combining marks while ignoring case, punctuation, and Latin accents. Explicit titles without letters or numbers do not select an arbitrary RSS episode; feed requests without an episode title still use the first available transcript.
|
|
26
26
|
- `--video-mode transcript` prefers transcript-first media handling even when a page has text.
|
|
27
|
-
- Direct media URLs (mp4/webm/m4a/etc) skip HTML and transcribe.
|
|
27
|
+
- Direct media URLs (mp4/webm/m4a/etc) skip HTML and transcribe. Unknown codec metadata is allowed as a final download fallback; formats explicitly marked as having no audio are excluded.
|
|
28
28
|
- Local audio/video files are routed through the same transcript-first pipeline.
|
|
29
29
|
- `--diarize [auto|elevenlabs|openai]` adds speaker labels to local files and direct media URLs; `--identify-speakers`, anchors, profiles, and remembered mappings use the same naming pass as YouTube. Local files do not require `yt-dlp`. Local video is converted once to mono 16 kHz MP3 before upload, then reused if diarization falls back between providers.
|
|
30
30
|
- YouTube diarization selects audio-only media. Combined `--slides --diarize` downloads separate video-only and audio-only streams in one yt-dlp run, then shares the video with slide extraction.
|
package/docs/model-auto.md
CHANGED
|
@@ -34,6 +34,8 @@ Behavior:
|
|
|
34
34
|
- If you pass an `openrouter/...` model id, the request uses OpenRouter (and requires `OPENROUTER_API_KEY`).
|
|
35
35
|
- If you pass a native model id, the CLI prefers the native provider SDK when its key is available, and can fall back to OpenRouter when no native key exists (and `OPENROUTER_API_KEY` is set).
|
|
36
36
|
|
|
37
|
+
When a named preset such as `free` fails because no OpenRouter providers are allowed, the CLI prints routing guidance. Each optional provider lookup uses the smaller of `--timeout` and 15 seconds, including response-body reads. Lookup failures leave the routing guidance intact.
|
|
38
|
+
|
|
37
39
|
## How selection works
|
|
38
40
|
|
|
39
41
|
- Uses the order you provide in `model.rules[].candidates[]` (or `bands[].candidates[]`).
|
package/docs/quickstart.md
CHANGED
|
@@ -49,7 +49,7 @@ summarize "https://youtu.be/I845O57ZSy4"
|
|
|
49
49
|
summarize "https://podcasts.apple.com/.../episode-..."
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
YouTube prefers official caption tracks, falls back through `youtubei
|
|
52
|
+
YouTube prefers official caption tracks, falls back through `youtubei`, eligible audio transcription with `yt-dlp`, and then Apify and transcribes with Whisper. Podcasts behave the same way: published transcript first, then `ffmpeg` + Whisper.
|
|
53
53
|
|
|
54
54
|
Add scene-change keyframes for video:
|
|
55
55
|
|
package/docs/timestamps.md
CHANGED
|
@@ -14,7 +14,7 @@ Short scope
|
|
|
14
14
|
- Preserve existing plain transcript text; add structured segments + timed text.
|
|
15
15
|
- Chat mode: include timed transcript + prompt for `[mm:ss]` references.
|
|
16
16
|
- Sidepanel: click timestamp → seek media (video or audio), keep play state.
|
|
17
|
-
- Coverage: YouTube, podcasts, embedded captions, generic media; whisper.cpp
|
|
17
|
+
- Coverage: YouTube, podcasts, embedded captions, generic media; whisper.cpp decodes timestamp tokens to preserve speech at window boundaries, but currently returns plain text without exposed segments.
|
|
18
18
|
|
|
19
19
|
## 1) API / data model
|
|
20
20
|
|
|
@@ -122,5 +122,5 @@ Chrome extension
|
|
|
122
122
|
|
|
123
123
|
## 9) Notes / open
|
|
124
124
|
|
|
125
|
-
- “VisPoR” = whisper.cpp: no
|
|
125
|
+
- “VisPoR” = whisper.cpp: no exposed timestamp segments until a structured output path is added.
|
|
126
126
|
- Decide exact format of `transcriptTimedText` (recommend `[mm:ss] text` per line).
|
package/docs/website.md
CHANGED
|
@@ -62,3 +62,5 @@ Daemon note:
|
|
|
62
62
|
|
|
63
63
|
- Optional: `FIRECRAWL_API_KEY` (for Firecrawl fallback / `--firecrawl always`)
|
|
64
64
|
- Optional: `XAI_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` (also accepts `GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY`) (required only when `--markdown-mode llm` is used, or when `--markdown-mode auto` falls back to LLM conversion)
|
|
65
|
+
|
|
66
|
+
For HTML-to-Markdown extraction, `extracted.diagnostics.markdown.provider` identifies `markitdown` for local conversion and `llm` for model conversion. Library converters may return `{ markdown, provider }`; existing string-returning converters retain the `llm` label.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steipete/summarize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Link → clean text → summary.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,29 +37,29 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@earendil-works/pi-ai": "^1.
|
|
41
|
-
"@steipete/summarize-core": "0.
|
|
40
|
+
"@earendil-works/pi-ai": "^1.5.0",
|
|
41
|
+
"@steipete/summarize-core": "0.26.1",
|
|
42
42
|
"bpe-lite": "^0.5.2",
|
|
43
|
-
"commander": "^15.
|
|
44
|
-
"file-type": "^22.
|
|
43
|
+
"commander": "^15.1.0",
|
|
44
|
+
"file-type": "^22.3.0",
|
|
45
45
|
"json5": "^2.2.3",
|
|
46
|
-
"markdansi": "^0.3.
|
|
47
|
-
"mime": "^4.1.
|
|
46
|
+
"markdansi": "^0.3.8",
|
|
47
|
+
"mime": "^4.1.2",
|
|
48
48
|
"osc-progress": "^0.3.4",
|
|
49
49
|
"tokentally": "^0.1.7",
|
|
50
|
-
"undici": "8.
|
|
50
|
+
"undici": "8.12.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.19.2",
|
|
54
54
|
"@types/sanitize-html": "^2.16.2",
|
|
55
|
-
"@vitest/coverage-v8": "^5.0
|
|
56
|
-
"happy-dom": "^
|
|
57
|
-
"oxc-parser": "^0.
|
|
58
|
-
"oxfmt": "0.
|
|
59
|
-
"oxlint": "^1.
|
|
60
|
-
"oxlint-tsgolint": "^7.0.
|
|
55
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
56
|
+
"happy-dom": "^21.0.4",
|
|
57
|
+
"oxc-parser": "^0.157.0",
|
|
58
|
+
"oxfmt": "0.77.0",
|
|
59
|
+
"oxlint": "^1.92.0",
|
|
60
|
+
"oxlint-tsgolint": "^7.0.2006",
|
|
61
61
|
"typescript": "^7.0.2",
|
|
62
|
-
"vitest": "^5.0
|
|
62
|
+
"vitest": "^5.1.0"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=24"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const DEFAULT_TIMEOUT_MS = 120_000;
|
|
2
|
-
export async function fetchWithTimeout(fetchImpl, input, init, timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
3
|
-
if (init?.signal) {
|
|
4
|
-
return fetchImpl(input, init);
|
|
5
|
-
}
|
|
6
|
-
const controller = new AbortController();
|
|
7
|
-
const normalizedTimeoutMs = Number.isFinite(timeoutMs) ? timeoutMs : DEFAULT_TIMEOUT_MS;
|
|
8
|
-
const clampedTimeoutMs = Math.max(0, normalizedTimeoutMs);
|
|
9
|
-
const timer = setTimeout(() => {
|
|
10
|
-
if (typeof DOMException === "function") {
|
|
11
|
-
controller.abort(new DOMException("Request timed out", "AbortError"));
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
controller.abort();
|
|
15
|
-
}, clampedTimeoutMs);
|
|
16
|
-
try {
|
|
17
|
-
const finalInit = {
|
|
18
|
-
...init,
|
|
19
|
-
signal: controller.signal,
|
|
20
|
-
};
|
|
21
|
-
return await fetchImpl(input, finalInit);
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
if (error instanceof Error && error.name === "AbortError") {
|
|
25
|
-
const timeoutError = new Error(`Fetch aborted after ${clampedTimeoutMs}ms`);
|
|
26
|
-
timeoutError.name = "FetchTimeoutError";
|
|
27
|
-
throw timeoutError;
|
|
28
|
-
}
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
finally {
|
|
32
|
-
clearTimeout(timer);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=fetch-with-timeout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-with-timeout.js","sourceRoot":"","sources":["../../../src/engine/fetch-with-timeout.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAKnC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,SAAoB,EACpB,KAAwB,EACxB,IAAwB,EACxB,SAAS,GAAW,kBAAkB;IAEtC,IAAI,IAAI,EAAE,MAAM,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC;IACxF,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAE1D,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;QAC5B,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE,CAAC;YACvC,UAAU,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC,CAAC;YACtE,OAAO;QACT,CAAC;QACD,UAAU,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAErB,IAAI,CAAC;QACH,MAAM,SAAS,GAAgB;YAC7B,GAAG,IAAI;YACP,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B,CAAC;QACF,OAAO,MAAM,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC1D,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC,uBAAuB,gBAAgB,IAAI,CAAC,CAAC;YAC5E,YAAY,CAAC,IAAI,GAAG,mBAAmB,CAAC;YACxC,MAAM,YAAY,CAAC;QACrB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
|