@steipete/summarize 0.20.1 → 0.21.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 +21 -0
- package/README.md +16 -9
- package/dist/esm/application/api-status.js +1 -0
- package/dist/esm/application/api-status.js.map +1 -1
- package/dist/esm/application/environment-state.js +4 -0
- package/dist/esm/application/environment-state.js.map +1 -1
- package/dist/esm/daemon/cli-service.js +4 -4
- package/dist/esm/daemon/cli-service.js.map +1 -1
- package/dist/esm/daemon/cli.js +40 -1
- package/dist/esm/daemon/cli.js.map +1 -1
- package/dist/esm/daemon/constants.js +3 -0
- package/dist/esm/daemon/constants.js.map +1 -1
- package/dist/esm/daemon/env-snapshot.js +2 -0
- package/dist/esm/daemon/env-snapshot.js.map +1 -1
- package/dist/esm/daemon/native-messaging-install.js +98 -0
- package/dist/esm/daemon/native-messaging-install.js.map +1 -0
- package/dist/esm/daemon/native-messaging.js +163 -0
- package/dist/esm/daemon/native-messaging.js.map +1 -0
- package/dist/esm/llm/providers/anthropic.js +6 -1
- package/dist/esm/llm/providers/anthropic.js.map +1 -1
- package/dist/esm/run/flows/asset/media.js +6 -1
- package/dist/esm/run/flows/asset/media.js.map +1 -1
- package/dist/esm/run/flows/url/extraction-session.js +1 -0
- package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
- package/dist/esm/run/help.js +11 -8
- package/dist/esm/run/help.js.map +1 -1
- package/dist/esm/run/status-cli.js +11 -0
- package/dist/esm/run/status-cli.js.map +1 -1
- package/dist/esm/shared/run-api-status.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/application/environment-state.d.ts +1 -0
- package/dist/types/daemon/cli-service.d.ts +2 -1
- package/dist/types/daemon/constants.d.ts +3 -0
- package/dist/types/daemon/env-snapshot.d.ts +1 -1
- package/dist/types/daemon/native-messaging-install.d.ts +33 -0
- package/dist/types/daemon/native-messaging.d.ts +39 -0
- package/dist/types/shared/run-api-status.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/docs/chrome-enterprise.md +150 -0
- package/docs/chrome-extension.md +19 -15
- package/docs/commands/daemon.md +13 -9
- package/docs/commands/index.md +1 -1
- package/docs/commands/slides.md +4 -3
- package/docs/commands/summarize.md +4 -3
- package/docs/commands/transcriber.md +1 -1
- package/docs/extract-only.md +2 -1
- package/docs/install.md +2 -1
- package/docs/media.md +2 -2
- package/docs/quickstart.md +11 -0
- package/docs/slides.md +3 -3
- package/docs/transcript-provider-flow.md +1 -0
- package/docs/youtube.md +2 -2
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const ENV_KEYS: readonly ["PATH", "XAI_API_KEY", "XAI_BASE_URL", "OPENAI_API_KEY", "OPENAI_WHISPER_BASE_URL", "OPENAI_BASE_URL", "OPENROUTER_API_KEY", "OPENAI_USE_CHAT_COMPLETIONS", "NVIDIA_API_KEY", "NGC_API_KEY", "NVIDIA_BASE_URL", "MINIMAX_API_KEY", "MINIMAX_BASE_URL", "Z_AI_API_KEY", "ZAI_API_KEY", "Z_AI_BASE_URL", "ZAI_BASE_URL", "OLLAMA_BASE_URL", "GEMINI_API_KEY", "GOOGLE_BASE_URL", "GEMINI_BASE_URL", "GOOGLE_GENERATIVE_AI_API_KEY", "GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL", "FIRECRAWL_API_KEY", "APIFY_API_TOKEN", "YT_DLP_PATH", "SUMMARIZE_YT_DLP_COOKIES_FROM_BROWSER", "YT_DLP_COOKIES_FROM_BROWSER", "FAL_KEY", "GROQ_API_KEY", "ASSEMBLYAI_API_KEY", "ELEVENLABS_API_KEY", "SUMMARIZE_MODEL", "SUMMARIZE_TRANSCRIBER", "SUMMARIZE_ONNX_PARAKEET_CMD", "SUMMARIZE_ONNX_CANARY_CMD", "CLAUDE_PATH", "CODEX_PATH", "GEMINI_PATH", "AGENT_PATH", "OPENCLAW_PATH", "OPENCODE_PATH", "COPILOT_PATH", "AGY_PATH", "ANTIGRAVITY_API_KEY", "UVX_PATH"];
|
|
1
|
+
declare const ENV_KEYS: readonly ["PATH", "XAI_API_KEY", "XAI_BASE_URL", "OPENAI_API_KEY", "OPENAI_WHISPER_BASE_URL", "OPENAI_BASE_URL", "OPENROUTER_API_KEY", "OPENAI_USE_CHAT_COMPLETIONS", "NVIDIA_API_KEY", "NGC_API_KEY", "NVIDIA_BASE_URL", "MINIMAX_API_KEY", "MINIMAX_BASE_URL", "Z_AI_API_KEY", "ZAI_API_KEY", "Z_AI_BASE_URL", "ZAI_BASE_URL", "OLLAMA_BASE_URL", "GEMINI_API_KEY", "GOOGLE_BASE_URL", "GEMINI_BASE_URL", "GOOGLE_GENERATIVE_AI_API_KEY", "GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL", "FIRECRAWL_API_KEY", "APIFY_API_TOKEN", "YT_DLP_PATH", "SUMMARIZE_YT_DLP_COOKIES_FROM_BROWSER", "YT_DLP_COOKIES_FROM_BROWSER", "FAL_KEY", "GROQ_API_KEY", "ASSEMBLYAI_API_KEY", "DEEPGRAM_API_KEY", "SUMMARIZE_DEEPGRAM_TRANSCRIPTION_MODEL", "ELEVENLABS_API_KEY", "SUMMARIZE_MODEL", "SUMMARIZE_TRANSCRIBER", "SUMMARIZE_ONNX_PARAKEET_CMD", "SUMMARIZE_ONNX_CANARY_CMD", "CLAUDE_PATH", "CODEX_PATH", "GEMINI_PATH", "AGENT_PATH", "OPENCLAW_PATH", "OPENCODE_PATH", "COPILOT_PATH", "AGY_PATH", "ANTIGRAVITY_API_KEY", "UVX_PATH"];
|
|
2
2
|
export type EnvSnapshot = Partial<Record<(typeof ENV_KEYS)[number], string>>;
|
|
3
3
|
export declare function buildEnvSnapshotFromEnv(env: Record<string, string | undefined>): EnvSnapshot;
|
|
4
4
|
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DaemonProgram } from "./cli-service.js";
|
|
2
|
+
export type NativeMessagingInstallResult = {
|
|
3
|
+
installed: boolean;
|
|
4
|
+
manifestPath: string | null;
|
|
5
|
+
launcherPath: string | null;
|
|
6
|
+
reason?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function resolveChromeNativeMessagingManifestPath(env: Record<string, string | undefined>, platform?: NodeJS.Platform): string | null;
|
|
9
|
+
export declare function buildNativeMessagingLauncher(program: DaemonProgram): string;
|
|
10
|
+
export declare function buildNativeMessagingManifest({ launcherPath, extensionId, }: {
|
|
11
|
+
launcherPath: string;
|
|
12
|
+
extensionId?: string;
|
|
13
|
+
}): {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
path: string;
|
|
17
|
+
type: "stdio";
|
|
18
|
+
allowed_origins: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare function installNativeMessagingHost({ env, program, extensionId, platform, }: {
|
|
21
|
+
env: Record<string, string | undefined>;
|
|
22
|
+
program: DaemonProgram;
|
|
23
|
+
extensionId?: string;
|
|
24
|
+
platform?: NodeJS.Platform;
|
|
25
|
+
}): Promise<NativeMessagingInstallResult>;
|
|
26
|
+
export declare function isNativeMessagingHostInstalled({ env, platform, }: {
|
|
27
|
+
env: Record<string, string | undefined>;
|
|
28
|
+
platform?: NodeJS.Platform;
|
|
29
|
+
}): Promise<boolean>;
|
|
30
|
+
export declare function uninstallNativeMessagingHost({ env, platform, }: {
|
|
31
|
+
env: Record<string, string | undefined>;
|
|
32
|
+
platform?: NodeJS.Platform;
|
|
33
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import type { Readable, Writable } from "node:stream";
|
|
3
|
+
type NativeRequest = {
|
|
4
|
+
type: "request";
|
|
5
|
+
method?: string;
|
|
6
|
+
path: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
body?: string;
|
|
10
|
+
};
|
|
11
|
+
type NativeCancel = {
|
|
12
|
+
type: "cancel";
|
|
13
|
+
};
|
|
14
|
+
export type NativeHostInput = NativeRequest | NativeCancel;
|
|
15
|
+
export type NativeHostOutput = {
|
|
16
|
+
type: "response";
|
|
17
|
+
status: number;
|
|
18
|
+
statusText: string;
|
|
19
|
+
headers: Array<[string, string]>;
|
|
20
|
+
} | {
|
|
21
|
+
type: "chunk";
|
|
22
|
+
data: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "end";
|
|
25
|
+
} | {
|
|
26
|
+
type: "error";
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function encodeNativeMessage(value: NativeHostOutput | NativeHostInput): Buffer;
|
|
30
|
+
export declare function createNativeMessageDecoder(onMessage: (message: unknown) => void): (chunk: Uint8Array) => void;
|
|
31
|
+
export declare function runNativeMessagingHost({ env, argv, stdin, stdout, extensionId, fetchImpl, }: {
|
|
32
|
+
env: Record<string, string | undefined>;
|
|
33
|
+
argv: readonly string[];
|
|
34
|
+
stdin: Readable;
|
|
35
|
+
stdout: Writable;
|
|
36
|
+
extensionId?: string;
|
|
37
|
+
fetchImpl?: typeof fetch;
|
|
38
|
+
}): Promise<void>;
|
|
39
|
+
export {};
|
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.21.0";
|
|
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;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Chrome enterprise: disable the local companion"
|
|
3
|
+
kicker: "apps"
|
|
4
|
+
summary: "Keep Direct and Browser modes available while browser policy blocks the optional native companion."
|
|
5
|
+
read_when:
|
|
6
|
+
- "When deploying the Chrome extension in a managed company."
|
|
7
|
+
- "When local companion communication must be disabled by policy."
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Disable the local companion in managed Chrome
|
|
11
|
+
|
|
12
|
+
The Chrome Web Store extension ID is `cejgnmmhbbpdmjnfppjdfkocebngehfg`. The registered native
|
|
13
|
+
messaging host is `com.steipete.summarize`, and its manifest allows only this exact origin:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"allowed_origins": ["chrome-extension://cejgnmmhbbpdmjnfppjdfkocebngehfg/"]
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The extension declares `nativeMessaging` in `optional_permissions`, not `permissions`. A personal
|
|
22
|
+
install therefore starts without local-companion capability. Chrome asks for the named permission
|
|
23
|
+
only after the user selects a Daemon runtime or clicks **Enable local companion**. Direct AI and
|
|
24
|
+
Browser media modes do not request it.
|
|
25
|
+
|
|
26
|
+
Chrome's current permissions documentation says most named permissions may be optional and lists
|
|
27
|
+
the exceptions; `nativeMessaging` is not an exception. The generated production manifest is also
|
|
28
|
+
tested to keep it optional.
|
|
29
|
+
|
|
30
|
+
## Exact managed policy
|
|
31
|
+
|
|
32
|
+
Use Chrome's browser-enforced permission block as the primary per-extension boundary. Add the host
|
|
33
|
+
block and user-level-host restriction as independent defense in depth, then set the extension's
|
|
34
|
+
managed UX policy so users see why Daemon controls are unavailable.
|
|
35
|
+
|
|
36
|
+
Example Linux managed policy at `/etc/opt/chrome/policies/managed/summarize.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"ExtensionSettings": {
|
|
41
|
+
"cejgnmmhbbpdmjnfppjdfkocebngehfg": {
|
|
42
|
+
"installation_mode": "allowed",
|
|
43
|
+
"blocked_permissions": ["nativeMessaging"],
|
|
44
|
+
"runtime_blocked_hosts": ["http://localhost", "http://127.0.0.1", "http://[::1]"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"NativeMessagingBlocklist": ["com.steipete.summarize"],
|
|
48
|
+
"NativeMessagingUserLevelHosts": false,
|
|
49
|
+
"3rdparty": {
|
|
50
|
+
"extensions": {
|
|
51
|
+
"cejgnmmhbbpdmjnfppjdfkocebngehfg": {
|
|
52
|
+
"daemonAllowed": false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`blocked_permissions` is the decisive per-extension browser control: Chrome prevents this extension
|
|
60
|
+
from acquiring or retaining `nativeMessaging`. `NativeMessagingBlocklist` prevents Chrome from
|
|
61
|
+
launching the named host even for another extension. `NativeMessagingUserLevelHosts=false` allows
|
|
62
|
+
only administrator-installed system hosts; it is not a complete block on its own.
|
|
63
|
+
|
|
64
|
+
`runtime_blocked_hosts` is an independent browser-enforced guard against local HTTP. The production
|
|
65
|
+
manifest retains `http://localhost/*` and `http://127.0.0.1/*` for configured Direct local providers;
|
|
66
|
+
daemon requests never use those grants. The exact-ID policy above blocks this extension from
|
|
67
|
+
interacting with localhost, IPv4 loopback, or IPv6 loopback on any port. Cloud Direct providers and
|
|
68
|
+
Browser mode on ordinary sites continue to work. Chrome policy host patterns omit the path; adding
|
|
69
|
+
`/*` here is not valid for this policy.
|
|
70
|
+
|
|
71
|
+
To disable every native messaging host, use `"NativeMessagingBlocklist": ["*"]`. If the company
|
|
72
|
+
needs selected hosts, combine the wildcard block with `NativeMessagingAllowlist` entries. To
|
|
73
|
+
force-install Summarize, change `installation_mode` to `force_installed` and add:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{ "update_url": "https://clients2.google.com/service/update2/crx" }
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The per-ID `ExtensionSettings` entry is intentional. When a specific extension entry exists, only
|
|
80
|
+
`installation_mode` and `update_url` inherit from the `"*"` defaults; repeat
|
|
81
|
+
`blocked_permissions` on this exact ID.
|
|
82
|
+
|
|
83
|
+
On Windows, configure the equivalent values under:
|
|
84
|
+
|
|
85
|
+
- `HKLM\Software\Policies\Google\Chrome\ExtensionSettings` with the JSON dictionary above.
|
|
86
|
+
- `HKLM\Software\Policies\Google\Chrome\NativeMessagingBlocklist\1` as the string
|
|
87
|
+
`com.steipete.summarize` (or `*`).
|
|
88
|
+
- `HKLM\Software\Policies\Google\Chrome\NativeMessagingUserLevelHosts` as DWORD `0`.
|
|
89
|
+
- `HKLM\Software\Policies\Google\Chrome\3rdparty\extensions\cejgnmmhbbpdmjnfppjdfkocebngehfg\policy`
|
|
90
|
+
with `daemonAllowed` as DWORD `0`.
|
|
91
|
+
|
|
92
|
+
On macOS, deploy the three Chrome policies in the `com.google.Chrome` managed-preferences domain
|
|
93
|
+
and set `daemonAllowed=false` in
|
|
94
|
+
`com.google.Chrome.extensions.cejgnmmhbbpdmjnfppjdfkocebngehfg`.
|
|
95
|
+
|
|
96
|
+
In Google Admin, configure the same per-ID `ExtensionSettings` and native-messaging policies, then
|
|
97
|
+
set this extension's policy JSON to:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{ "daemonAllowed": false }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Verify at `chrome://policy`, restart the extension if policy was applied during an active request,
|
|
104
|
+
and confirm:
|
|
105
|
+
|
|
106
|
+
- Runtime settings show **Disabled by administrator**.
|
|
107
|
+
- Direct remains selected for AI and Browser remains selected for media.
|
|
108
|
+
- Daemon controls are disabled and no permission prompt appears.
|
|
109
|
+
- Chrome rejects `nativeMessaging` for extension ID `cejgnmmhbbpdmjnfppjdfkocebngehfg`.
|
|
110
|
+
- Chrome refuses to launch `com.steipete.summarize` when its host block applies.
|
|
111
|
+
- Chrome blocks the extension from local HTTP origins when `runtime_blocked_hosts` applies.
|
|
112
|
+
|
|
113
|
+
`daemonAllowed=false` is UX and fail-closed application behavior, not a substitute for the Chrome
|
|
114
|
+
policies. The service worker checks managed policy and current permission again immediately before
|
|
115
|
+
every native-host connection.
|
|
116
|
+
|
|
117
|
+
## Transport and remaining limitation
|
|
118
|
+
|
|
119
|
+
The service worker sends daemon requests as bounded framed messages to the exact native host. The
|
|
120
|
+
bridge accepts only `GET`, `POST`, and `DELETE` requests for `/health` and `/v1/*`, requires the
|
|
121
|
+
configured daemon port to match, filters request headers, and chunks responses below Chrome's 1 MiB
|
|
122
|
+
native-message limit. The separate retained loopback host grants preserve configured Direct local
|
|
123
|
+
providers; daemon routing never selects them by URL.
|
|
124
|
+
|
|
125
|
+
The companion daemon itself still exposes its bearer-token-authenticated HTTP API on loopback, and
|
|
126
|
+
the native process proxies to that API. Native Messaging removes the extension's direct network
|
|
127
|
+
capability; it does not give the daemon operating-system peer identity. Another local process—or a
|
|
128
|
+
different extension independently granted loopback access—that obtains the token can still call
|
|
129
|
+
the daemon. Moving the daemon API entirely onto an OS-authenticated local socket would be a separate
|
|
130
|
+
hardening project.
|
|
131
|
+
|
|
132
|
+
Chrome match patterns cannot express “all HTTP hosts except loopback.” The Store manifest removes
|
|
133
|
+
`<all_urls>` while retaining only HTTPS plus localhost and IPv4 loopback for existing Direct local
|
|
134
|
+
provider compatibility. Privileged background fetches of a different plain-HTTP host or media asset
|
|
135
|
+
are no longer guaranteed. Enterprise deployments that prohibit local providers should keep the
|
|
136
|
+
browser-enforced `runtime_blocked_hosts` policy above.
|
|
137
|
+
|
|
138
|
+
The npm-installed Windows CLI currently lacks the standalone `.exe` launcher that Chrome requires
|
|
139
|
+
for a native host path. macOS and Linux install the host end to end; Windows daemon mode is blocked
|
|
140
|
+
until release packaging includes that executable shim. Do not work around this with a `.cmd` host
|
|
141
|
+
or by routing daemon requests through the Direct-provider loopback grants.
|
|
142
|
+
|
|
143
|
+
Chrome references:
|
|
144
|
+
|
|
145
|
+
- [Optional permissions](https://developer.chrome.com/docs/extensions/reference/api/permissions)
|
|
146
|
+
- [Native Messaging](https://developer.chrome.com/docs/extensions/develop/concepts/native-messaging)
|
|
147
|
+
- [ExtensionSettings policy](https://chromeenterprise.google/policies/extension-settings/)
|
|
148
|
+
- [NativeMessagingBlocklist](https://chromeenterprise.google/policies/native-messaging-blocklist/)
|
|
149
|
+
- [NativeMessagingUserLevelHosts](https://chromeenterprise.google/policies/native-messaging-user-level-hosts/)
|
|
150
|
+
- [Managed storage schema](https://developer.chrome.com/docs/extensions/reference/manifest/storage)
|
package/docs/chrome-extension.md
CHANGED
|
@@ -23,6 +23,10 @@ Quickstart:
|
|
|
23
23
|
- Open side panel → copy token install command → run for daemon mode:
|
|
24
24
|
- `summarize daemon install --token <TOKEN> --port 8787` (macOS: LaunchAgent, Linux: systemd user, Windows: Scheduled Task)
|
|
25
25
|
- Non-default port: replace `8787`, then set the same value in **Options → Runtime → Daemon → Port**.
|
|
26
|
+
- Chrome asks for optional Native Messaging access only when the user explicitly enables a Daemon
|
|
27
|
+
runtime. Retained loopback host access serves configured Direct local providers only, not daemon
|
|
28
|
+
traffic. Managed deployments can browser-disable both boundaries; see
|
|
29
|
+
[Chrome enterprise policy](chrome-enterprise.md).
|
|
26
30
|
- Verify:
|
|
27
31
|
- `summarize daemon status`
|
|
28
32
|
- Restart (if needed): `summarize daemon restart`
|
|
@@ -35,7 +39,7 @@ Firefox notes:
|
|
|
35
39
|
|
|
36
40
|
Dev (repo checkout):
|
|
37
41
|
|
|
38
|
-
- Use: `pnpm summarize daemon install --token <TOKEN> --dev`
|
|
42
|
+
- Use: `pnpm summarize daemon install --token <TOKEN> --dev --extension-id <UNPACKED_ID>` (copy the ID from `chrome://extensions`; autostart runs `src/cli.ts` with no `dist/` build required).
|
|
39
43
|
- E2E (Playwright): `pnpm -C apps/chrome-extension test:e2e`
|
|
40
44
|
- First run: `pnpm -C apps/chrome-extension exec playwright install chromium`
|
|
41
45
|
- Chromium runs headless by default.
|
|
@@ -45,6 +49,7 @@ Dev (repo checkout):
|
|
|
45
49
|
|
|
46
50
|
- “Daemon not reachable”:
|
|
47
51
|
- `summarize daemon status`
|
|
52
|
+
- Confirm the native host is reported as installed and Chrome granted the optional companion permission.
|
|
48
53
|
- If the daemon uses a non-default port, confirm **Options → Runtime → Daemon → Port** matches the daemon configuration.
|
|
49
54
|
- Logs: `~/.summarize/logs/daemon.err.log`
|
|
50
55
|
- Windows install:
|
|
@@ -56,10 +61,7 @@ Dev (repo checkout):
|
|
|
56
61
|
- Re-run: `summarize daemon install --token <TOKEN>`.
|
|
57
62
|
- Windows containers:
|
|
58
63
|
- `summarize daemon install --token <TOKEN>` starts the daemon for the current container session but does not create a Scheduled Task.
|
|
59
|
-
-
|
|
60
|
-
`ports: ['8787:8787']`
|
|
61
|
-
`command: ['cmd', '/c', 'summarize daemon install --token <TOKEN>']`
|
|
62
|
-
- Then restart the container and verify `http://127.0.0.1:8787/health`.
|
|
64
|
+
- Chrome Daemon mode also needs the pending packaged Windows native-host executable. Do not expose the daemon port as a substitute; use Direct and Browser modes.
|
|
63
65
|
- “Need extension-side traces”:
|
|
64
66
|
- Options → Logs → `extension.log` (panel/background events).
|
|
65
67
|
- Enable “Extended logging” in Advanced settings for full pipeline traces.
|
|
@@ -73,16 +75,15 @@ Dev (repo checkout):
|
|
|
73
75
|
- Slide strip/gallery missing after a parallel slide run failure:
|
|
74
76
|
- Click the slide notice “Try again” button. If the dedicated slide run never started, the extension now requests a fresh summarize+slides run instead of reusing the summary-only run.
|
|
75
77
|
- Tweet video not transcribing / no progress:
|
|
76
|
-
- Ensure `yt-dlp` is available on your PATH (or set `YT_DLP_PATH`) and you have a transcription provider (`whisper.cpp` installed or `GROQ_API_KEY` / `ASSEMBLYAI_API_KEY` / `GEMINI_API_KEY` / `OPENAI_API_KEY` / `FAL_KEY`).
|
|
78
|
+
- Ensure `yt-dlp` is available on your PATH (or set `YT_DLP_PATH`) and you have a transcription provider (`whisper.cpp` installed or `GROQ_API_KEY` / `ASSEMBLYAI_API_KEY` / `GEMINI_API_KEY` / `OPENAI_API_KEY` / `FAL_KEY` / `DEEPGRAM_API_KEY`).
|
|
77
79
|
- Re-run `summarize daemon install --token <TOKEN>` to refresh the daemon env snapshot (launchd won’t inherit your shell PATH).
|
|
78
80
|
- “Could not establish connection / Receiving end does not exist”:
|
|
79
81
|
- The content script wasn’t injected (yet), or Chrome blocked site access.
|
|
80
82
|
- Chrome → extension details → “Site access” → “On all sites” (or allow the domain), then reload the tab.
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- Repro/dev: `pnpm -C apps/chrome-extension dev` then enable “Hover summaries” and hover a link.
|
|
83
|
+
- “Native messaging host not found”:
|
|
84
|
+
- Re-run `summarize daemon install --token <TOKEN>` so the Chrome host manifest and launcher are refreshed.
|
|
85
|
+
- Verify `summarize daemon status` reports `Chrome native messaging host: installed`.
|
|
86
|
+
- The host is bound to Web Store ID `cejgnmmhbbpdmjnfppjdfkocebngehfg`; a normal unpacked build has a different ID unless a development host manifest explicitly allows it.
|
|
86
87
|
|
|
87
88
|
## Architecture
|
|
88
89
|
|
|
@@ -92,12 +93,13 @@ Dev (repo checkout):
|
|
|
92
93
|
- Chrome offscreen page: runs MediaBunny with native WebCodecs for ranged video slides and chunked local media transcription, plus an idle-evictable Whisper runtime.
|
|
93
94
|
- Content script: extract readable article text from the **rendered DOM** via Readability; also detect SPA URL changes.
|
|
94
95
|
- Direct provider adapters: OpenAI-compatible SSE, Anthropic Messages SSE, and Gemini SSE, normalized to the same summary/chat/tool-call contracts.
|
|
95
|
-
- Panel page
|
|
96
|
+
- Panel page reconstructs daemon SSE streams carried through the service worker's native bridge.
|
|
96
97
|
- **Daemon (local, autostart service)**
|
|
97
98
|
- HTTP server on `127.0.0.1` (default port `8787`).
|
|
98
99
|
- Token-authenticated API.
|
|
99
100
|
- Runs the existing summarize pipeline (env/config-based) and streams tokens to client via SSE.
|
|
100
|
-
-
|
|
101
|
+
- Native host `com.steipete.summarize` proxies only `/health` and `/v1/*` to the configured daemon port and preserves SSE and binary responses.
|
|
102
|
+
- Port is configurable: set **Options → Runtime → Daemon → Port** to match a daemon started with `summarize daemon install --port <n>`.
|
|
101
103
|
|
|
102
104
|
## Data Flow
|
|
103
105
|
|
|
@@ -106,7 +108,7 @@ Dev (repo checkout):
|
|
|
106
108
|
3. On nav/tab change (and auto enabled): background asks the content script to extract `{ url, title, text }` (best-effort).
|
|
107
109
|
4. In Chrome Browser mode, fetchable audio is decoded in bounded chunks through MediaBunny/WebCodecs and transcribed locally. YouTube prefers active-player/watch-page direct audio, then Android VR, buffered direct audio, and captured SABR.
|
|
108
110
|
5. In Direct mode, background uses Gemini Nano for Auto without provider credentials, or calls the selected provider and returns the normalized summary/chat result to the panel.
|
|
109
|
-
6. In Daemon mode,
|
|
111
|
+
6. In Daemon mode, extension contexts send request metadata through the service worker, which checks managed policy and optional permission before connecting to the native host. The host proxies the authenticated `/v1/*` API and streams response chunks back to the caller.
|
|
110
112
|
|
|
111
113
|
## Auto Mode (URL + Page Text)
|
|
112
114
|
|
|
@@ -199,7 +201,9 @@ Problem: daemon must be secured; extension must discover and pair with it.
|
|
|
199
201
|
- “Copy command” button.
|
|
200
202
|
- Daemon stores paired tokens in `~/.summarize/daemon.json`.
|
|
201
203
|
- Extension stores token in `chrome.storage.local`.
|
|
202
|
-
-
|
|
204
|
+
- Chrome declares `nativeMessaging` as an optional named permission. It is requested only when the
|
|
205
|
+
user enables the local companion. The registered host is bound to the exact Web Store extension
|
|
206
|
+
ID, accepts only daemon API paths, and rejects a port that does not match `daemon.json`.
|
|
203
207
|
- If daemon unreachable or 401: show Setup state + troubleshooting.
|
|
204
208
|
|
|
205
209
|
## Daemon Endpoints
|
package/docs/commands/daemon.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: summarize daemon
|
|
3
3
|
permalink: /docs/commands/daemon.html
|
|
4
4
|
kicker: command
|
|
5
|
-
summary: "Manage the local
|
|
5
|
+
summary: "Manage the local daemon and Chrome Native Messaging bridge used by the Side Panel."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# `summarize daemon`
|
|
@@ -11,7 +11,7 @@ summary: "Manage the local HTTP daemon used by the Chrome Side Panel."
|
|
|
11
11
|
summarize daemon <subcommand> [options]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Manages the local HTTP daemon
|
|
14
|
+
Manages the local HTTP daemon and its browser integration. The daemon binds to `127.0.0.1` only and requires a shared bearer token. Chrome reaches it through an optional exact-ID Native Messaging host; Firefox retains its existing loopback integration. The daemon autostarts via the right service manager for your platform.
|
|
15
15
|
|
|
16
16
|
| Platform | Service |
|
|
17
17
|
| -------- | --------------------- |
|
|
@@ -25,15 +25,15 @@ If you only use the CLI, you don't need any of this.
|
|
|
25
25
|
|
|
26
26
|
### `install`
|
|
27
27
|
|
|
28
|
-
Install or upgrade the autostart service
|
|
28
|
+
Install or upgrade the autostart service, write `~/.summarize/daemon.json`, and register Chrome native host `com.steipete.summarize` on macOS/Linux.
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
summarize daemon install --token <TOKEN>
|
|
32
32
|
summarize daemon install --token <TOKEN> --port 8787
|
|
33
|
-
summarize daemon install --token <TOKEN> --dev
|
|
33
|
+
summarize daemon install --token <TOKEN> --dev --extension-id <UNPACKED_ID>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
`--token <token>` is **required** on first install; the extension prints one after pairing. Re-running `install` with a new token adds another paired browser instead of invalidating the old one.
|
|
36
|
+
`--token <token>` is **required** on first install; the extension prints one after pairing. Re-running `install` with a new token adds another paired browser instead of invalidating the old one. The native host manifest allows only Chrome Web Store extension ID `cejgnmmhbbpdmjnfppjdfkocebngehfg`.
|
|
37
37
|
|
|
38
38
|
### `restart`
|
|
39
39
|
|
|
@@ -45,7 +45,7 @@ summarize daemon restart
|
|
|
45
45
|
|
|
46
46
|
### `status`
|
|
47
47
|
|
|
48
|
-
Probe the autostart service and the running daemon's health endpoint.
|
|
48
|
+
Probe the autostart service, Chrome native-host registration, and the running daemon's health endpoint.
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
summarize daemon status
|
|
@@ -53,7 +53,7 @@ summarize daemon status
|
|
|
53
53
|
|
|
54
54
|
### `uninstall`
|
|
55
55
|
|
|
56
|
-
Unload the autostart service. On macOS the plist is moved to Trash so you can undo.
|
|
56
|
+
Unload the autostart service and remove the user-level Chrome native host. On macOS the daemon plist is moved to Trash so you can undo.
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
summarize daemon uninstall
|
|
@@ -70,7 +70,7 @@ summarize daemon run --port 8787
|
|
|
70
70
|
## Options
|
|
71
71
|
|
|
72
72
|
`--port <n>`
|
|
73
|
-
: TCP port. Default `8787`. For a non-default port, set the same value in the extension under **Options → Runtime → Daemon → Port
|
|
73
|
+
: TCP port. Default `8787`. For a non-default port, set the same value in the extension under **Options → Runtime → Daemon → Port**. The native host reads `daemon.json` and rejects mismatched requests.
|
|
74
74
|
|
|
75
75
|
`--token <token>`
|
|
76
76
|
: Bearer token. Required for `install`. Stored in `~/.summarize/daemon.json` (mode `0600`).
|
|
@@ -78,6 +78,9 @@ summarize daemon run --port 8787
|
|
|
78
78
|
`--dev`
|
|
79
79
|
: Install a service that runs `src/cli.ts` via Node's native TypeScript support from the current repo. Useful while hacking on the daemon — don't ship it to users.
|
|
80
80
|
|
|
81
|
+
`--extension-id <id>`
|
|
82
|
+
: With `--dev`, bind the native host to an unpacked Chrome extension ID. Production installs always use the exact Web Store ID.
|
|
83
|
+
|
|
81
84
|
## HTTP endpoints
|
|
82
85
|
|
|
83
86
|
The daemon is documented in detail in [Chrome extension](../chrome-extension.md) and [Agent / daemon](../agent.md). At a glance:
|
|
@@ -96,9 +99,10 @@ The daemon is documented in detail in [Chrome extension](../chrome-extension.md)
|
|
|
96
99
|
|
|
97
100
|
## Notes
|
|
98
101
|
|
|
99
|
-
- **Containers** — `install` starts the daemon for the current container session but does not register a Scheduled Task / unit. Run `summarize daemon run` from your entrypoint
|
|
102
|
+
- **Containers** — `install` starts the daemon for the current container session but does not register a Scheduled Task / unit. Run `summarize daemon run` from your entrypoint. Do not expose the port as a Chrome Native Messaging substitute.
|
|
100
103
|
- **Token rotation** — running `install --token <NEW>` adds a new paired browser; old browsers keep working. Edit `daemon.json` by hand to revoke.
|
|
101
104
|
- **Multiple installs** — only one daemon per user. Reinstall to upgrade; omitting `--port` preserves the configured port.
|
|
105
|
+
- **Windows** — the npm-installed CLI still needs a packaged native-host `.exe`; do not route daemon traffic through the Direct-provider loopback grants as a workaround. Direct and Browser modes continue to work.
|
|
102
106
|
|
|
103
107
|
## See also
|
|
104
108
|
|
package/docs/commands/index.md
CHANGED
|
@@ -12,7 +12,7 @@ summary: "Every summarize subcommand and flag, with examples."
|
|
|
12
12
|
## Subcommands
|
|
13
13
|
|
|
14
14
|
- [`summarize`](summarize.md) — main command. Takes a URL, file, or stdin and produces a summary or extracted content.
|
|
15
|
-
- [`summarize slides`](slides.md) — extract scene-change keyframes from a video URL into PNGs (and optional OCR text). Standalone version of the `--slides` flag.
|
|
15
|
+
- [`summarize slides`](slides.md) — extract scene-change keyframes from a YouTube URL, direct video URL, or local video file into PNGs (and optional OCR text). Standalone version of the `--slides` flag.
|
|
16
16
|
- [`summarize transcriber`](transcriber.md) — set up local ONNX transcription (Parakeet, Canary). Prints the env vars you need.
|
|
17
17
|
- [`summarize daemon`](daemon.md) — manage the local HTTP daemon that the Chrome Side Panel talks to. Subcommands: `install`, `restart`, `status`, `uninstall`, `run`.
|
|
18
18
|
- [`summarize refresh-free`](refresh-free.md) — scan OpenRouter `:free` models, write working candidates to `~/.summarize/config.json`.
|
package/docs/commands/slides.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
title: summarize slides
|
|
3
3
|
permalink: /docs/commands/slides.html
|
|
4
4
|
kicker: command
|
|
5
|
-
summary: "Extract scene-change keyframes from a video
|
|
5
|
+
summary: "Extract scene-change keyframes from a video source into PNG files."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# `summarize slides`
|
|
9
9
|
|
|
10
10
|
```text
|
|
11
|
-
summarize slides <
|
|
11
|
+
summarize slides <source> [flags]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Extracts slide-shaped keyframes from a YouTube
|
|
14
|
+
Extracts slide-shaped keyframes from a YouTube URL, direct video URL, or local video file using FFmpeg scene detection. Native ffmpeg is preferred; bundled FFmpeg WebAssembly is used when native `ffmpeg`/`ffprobe` are unavailable. Output is a directory of PNGs (and optional OCR text). This is the standalone form of the `--slides` flag on the main command — useful when you only want the slides without a summary.
|
|
15
15
|
|
|
16
16
|
## Synopsis
|
|
17
17
|
|
|
@@ -20,6 +20,7 @@ summarize slides "https://youtu.be/..."
|
|
|
20
20
|
summarize slides "https://youtu.be/..." --render auto
|
|
21
21
|
summarize slides "https://youtu.be/..." --slides-ocr -o ./out
|
|
22
22
|
summarize slides "https://example.com/lecture.mp4" --slides-max 12
|
|
23
|
+
summarize slides ./lecture.mp4 --slides-max 12
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
## Requirements
|
|
@@ -11,7 +11,7 @@ summary: "Main command. URL, file, or stdin → clean text → summary."
|
|
|
11
11
|
summarize [input] [flags]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Takes a URL, local file path, or `-` for stdin and produces a summary. With `--extract`, prints cleaned content instead of summarizing.
|
|
14
|
+
Takes a URL, local file path, or `-` for stdin and produces a summary. With `--extract`, prints cleaned content instead of summarizing; stdin is not supported in extract mode.
|
|
15
15
|
|
|
16
16
|
## Synopsis
|
|
17
17
|
|
|
@@ -37,7 +37,8 @@ If `[input]` is omitted, summarize prints concise help and exits.
|
|
|
37
37
|
### Extraction
|
|
38
38
|
|
|
39
39
|
`--extract`
|
|
40
|
-
: Print extracted content and exit. No LLM call. The `--extract-only` alias is hidden but still works.
|
|
40
|
+
: Print extracted content and exit. No LLM call. Supports URLs, YouTube/direct media, local audio/video, and local PDFs; `-` stdin is not supported. The `--extract-only` alias is hidden but still works.
|
|
41
|
+
: Extraction can still use configured remote transcription, OCR, or Markdown providers for media/PDF inputs.
|
|
41
42
|
|
|
42
43
|
`--format <format>`
|
|
43
44
|
: `md` or `text`. Controls website extraction format and whether files are preprocessed to Markdown for model compatibility. Default: `text`. Default in `--extract` mode for URLs: `md`.
|
|
@@ -87,7 +88,7 @@ If `[input]` is omitted, summarize prints concise help and exits.
|
|
|
87
88
|
### Slides
|
|
88
89
|
|
|
89
90
|
`--slides [value]`
|
|
90
|
-
: Extract slides from a video URL and render inline alongside the summary. Combine with `--extract` to interleave slides in the full transcript. See [Slides mode](../slides.md).
|
|
91
|
+
: Extract slides from a YouTube URL, direct video URL, or local video file and render inline alongside the summary. Combine with `--extract` to interleave slides in the full transcript. See [Slides mode](../slides.md).
|
|
91
92
|
|
|
92
93
|
`--slides-ocr`
|
|
93
94
|
: Run OCR on extracted slides. Requires `tesseract`.
|
|
@@ -19,7 +19,7 @@ When `--transcriber auto` is set (default), summarize tries providers in this or
|
|
|
19
19
|
|
|
20
20
|
1. **Groq** — fastest cloud option. Needs `GROQ_API_KEY`.
|
|
21
21
|
2. **Local ONNX** (Parakeet or Canary) or `whisper.cpp` — fully offline. Needs the env vars from this command.
|
|
22
|
-
3. **AssemblyAI / Gemini / OpenAI / FAL** — cloud fallbacks, in that order, gated by their respective API keys.
|
|
22
|
+
3. **AssemblyAI / Gemini / OpenAI / FAL / Deepgram** — cloud fallbacks, in that order, gated by their respective API keys.
|
|
23
23
|
|
|
24
24
|
Skipping all of those falls back to the OpenAI-compatible Whisper endpoint in `OPENAI_WHISPER_BASE_URL`.
|
|
25
25
|
|
package/docs/extract-only.md
CHANGED
|
@@ -15,7 +15,8 @@ Deprecated alias: `--extract-only`.
|
|
|
15
15
|
## Notes
|
|
16
16
|
|
|
17
17
|
- No summarization LLM call happens in this mode.
|
|
18
|
-
-
|
|
18
|
+
- Supported inputs are URLs, YouTube/direct media, local audio/video, and local PDF files (`-` stdin is not supported with `--extract`).
|
|
19
|
+
- Extraction can still use configured remote transcription, OCR, or Markdown providers for media/PDF inputs. For sensitive files, use local transcription/provider settings for media and `--preprocess off` when you need to block PDF/Markdown preprocessing.
|
|
19
20
|
- No extraction cap is applied. Use `--max-extract-characters <count>` to cap output if needed.
|
|
20
21
|
- `--format md` may still convert HTML to Markdown (depending on `--markdown-mode` and available tools).
|
|
21
22
|
- `--length` is intended for summarization guidance; extraction prints full content.
|
package/docs/install.md
CHANGED
|
@@ -86,6 +86,7 @@ export ASSEMBLYAI_API_KEY=...
|
|
|
86
86
|
export GEMINI_API_KEY=...
|
|
87
87
|
export OPENAI_API_KEY=...
|
|
88
88
|
export FAL_KEY=...
|
|
89
|
+
export DEEPGRAM_API_KEY=...
|
|
89
90
|
```
|
|
90
91
|
|
|
91
92
|
If native `ffmpeg`/`ffprobe` are missing, summarize falls back to its bundled LGPL FFmpeg WebAssembly build. Native ffmpeg remains recommended for speed and broader codec/filter support. Automatic YouTube transcription can resolve Android VR direct audio without `yt-dlp`; explicit `--youtube yt-dlp`, diarization, and some slide/media flows still require it.
|
|
@@ -129,7 +130,7 @@ Use `PORT=4001 ./scripts/docs-serve.sh` to pick another port.
|
|
|
129
130
|
## Notes (Windows / containers)
|
|
130
131
|
|
|
131
132
|
- **Windows native:** `summarize` runs under Node 24. The daemon registers a Scheduled Task on first install.
|
|
132
|
-
- **Windows containers:** `summarize daemon install` starts the daemon for the current container session but does not register a Scheduled Task.
|
|
133
|
+
- **Windows containers:** `summarize daemon install` starts the daemon for the current container session but does not register a Scheduled Task. Chrome Daemon mode also needs the pending packaged Windows native-host executable; Direct and Browser modes remain available.
|
|
133
134
|
- **WSL2:** treat as Linux. The daemon installs as a systemd user service if `systemd` is available; otherwise run `summarize daemon run` in a long-lived shell.
|
|
134
135
|
|
|
135
136
|
Next: head to [Quickstart](quickstart.md).
|
package/docs/media.md
CHANGED
|
@@ -16,7 +16,7 @@ read_when:
|
|
|
16
16
|
## Transcript resolution order
|
|
17
17
|
|
|
18
18
|
1. Embedded captions (VTT/JSON) when available.
|
|
19
|
-
2. yt-dlp download + transcription (Groq first; then ONNX/local whisper.cpp; then AssemblyAI/Gemini/OpenAI/FAL fallback).
|
|
19
|
+
2. yt-dlp download + transcription (Groq first; then ONNX/local whisper.cpp; then AssemblyAI/Gemini/OpenAI/FAL/Deepgram fallback).
|
|
20
20
|
3. YouTube only: Android VR direct audio + the same transcription chain when yt-dlp is missing or fails.
|
|
21
21
|
|
|
22
22
|
## CLI behavior
|
|
@@ -31,7 +31,7 @@ read_when:
|
|
|
31
31
|
- X broadcasts (`/i/broadcasts/...`) are treated as media-only and go transcript-first by default.
|
|
32
32
|
- Local media files are capped at 2 GB. Remote podcast/media transcription downloads are capped at 512 MB by default and fail closed with `Remote media too large` even when the server omits or under-reports `Content-Length`; other remote media URLs are best-effort via yt-dlp.
|
|
33
33
|
- Operators who accept the disk/DoS tradeoff for larger remote podcast/media files can opt in with `SUMMARIZE_REMOTE_MEDIA_MAX_BYTES=<positive integer byte limit>`. The override must be a finite positive integer byte count; fractional, sub-byte, or otherwise invalid values are ignored and the default 512 MB cap remains in effect.
|
|
34
|
-
- Remote transcription providers: `ASSEMBLYAI_API_KEY`, `GEMINI_API_KEY` / `GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `FAL_KEY` (plus `GROQ_API_KEY` before local/remote fallback). Diarization uses `ELEVENLABS_API_KEY` or `OPENAI_API_KEY`.
|
|
34
|
+
- Remote transcription providers: `ASSEMBLYAI_API_KEY`, `GEMINI_API_KEY` / `GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `FAL_KEY`, `DEEPGRAM_API_KEY` (plus `GROQ_API_KEY` before local/remote fallback). Deepgram defaults to `nova-3`; override with `SUMMARIZE_DEEPGRAM_TRANSCRIPTION_MODEL`. Diarization uses `ELEVENLABS_API_KEY` or `OPENAI_API_KEY`.
|
|
35
35
|
- Gemini uses the Files API automatically for larger uploads.
|
|
36
36
|
|
|
37
37
|
## Shared helpers
|
package/docs/quickstart.md
CHANGED
|
@@ -58,6 +58,17 @@ summarize "https://youtu.be/..." --slides
|
|
|
58
58
|
summarize "https://youtu.be/..." --slides --slides-ocr
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
### Larger collections via an agent
|
|
62
|
+
|
|
63
|
+
For a conference track, course, or video archive, let an agent orchestrate the collection while
|
|
64
|
+
`summarize` handles each item. With the [canonical Summarize skill](https://github.com/steipete/summarize/blob/main/.agents/skills/summarize/SKILL.md), the prompt can stay focused on the outcome:
|
|
65
|
+
|
|
66
|
+
> Download all videos from the AI Engineer conference and use summarize to transcribe them.
|
|
67
|
+
|
|
68
|
+
Ask for any additional deliverables you want: timestamped diarized transcripts, per-talk takeaways, a
|
|
69
|
+
browsable index, or a best-of list tailored to your interests. The agent can handle discovery,
|
|
70
|
+
downloads, retries, output naming, and verification before building collection-level analysis.
|
|
71
|
+
|
|
61
72
|
## 4. Files and stdin
|
|
62
73
|
|
|
63
74
|
```bash
|
package/docs/slides.md
CHANGED
|
@@ -57,13 +57,13 @@ read_when:
|
|
|
57
57
|
|
|
58
58
|
## CLI
|
|
59
59
|
|
|
60
|
-
- `summarize <
|
|
60
|
+
- `summarize <source> --slides` streams a short intro paragraph and then a continuous narrative with slide images inserted inline where `[slide:N]` markers appear. The source can be a YouTube URL, direct video URL, or local video file.
|
|
61
61
|
- The model is responsible for inserting every slide marker in order; text length is still governed by `--length`.
|
|
62
62
|
- If inline images are unsupported, the CLI prints text-only output and notes how to export slides to disk.
|
|
63
63
|
- Timestamp links use OSC-8 when supported (YouTube/Vimeo/Loom/Dropbox).
|
|
64
64
|
- Progress line reports slide extraction steps (includes slide counts when available).
|
|
65
|
-
- `summarize <
|
|
66
|
-
- `summarize slides <
|
|
65
|
+
- `summarize <source> --slides --extract` prints the full timed transcript and inserts slide images inline at matching timestamps.
|
|
66
|
+
- `summarize slides <source>` extracts slides without summarizing (use `--render auto|kitty|iterm` for inline thumbnails).
|
|
67
67
|
- Defaults to writing images under `./slides/<sourceId>/` (override via `--slides-dir` / `--output`).
|
|
68
68
|
|
|
69
69
|
## Implementation notes
|
package/docs/youtube.md
CHANGED
|
@@ -16,7 +16,7 @@ YouTube URLs use transcript-first extraction.
|
|
|
16
16
|
- `web`: try `youtubei` → `captionTracks` only
|
|
17
17
|
- `no-auto`: try creator captions only (skip auto-generated/ASR) → `yt-dlp` (if configured)
|
|
18
18
|
- `apify`: Apify only
|
|
19
|
-
- `yt-dlp`: download audio + transcribe (Groq first; then local `whisper.cpp`; then AssemblyAI/Gemini/OpenAI/FAL fallback)
|
|
19
|
+
- `yt-dlp`: download audio + transcribe (Groq first; then local `whisper.cpp`; then AssemblyAI/Gemini/OpenAI/FAL/Deepgram fallback)
|
|
20
20
|
|
|
21
21
|
## `youtubei` vs `captionTracks`
|
|
22
22
|
|
|
@@ -34,7 +34,7 @@ YouTube URLs use transcript-first extraction.
|
|
|
34
34
|
- If no transcript is available, we still extract `ytInitialPlayerResponse.videoDetails.shortDescription` so YouTube links can still summarize meaningfully.
|
|
35
35
|
- Apify is an optional fallback (needs `APIFY_API_TOKEN`).
|
|
36
36
|
- By default, we use the actor id `faVsWy9VTSNVIhWpR` (Pinto Studio’s “Youtube Transcript Scraper”).
|
|
37
|
-
- `yt-dlp` requires the `yt-dlp` binary (either set `YT_DLP_PATH` or have it on `PATH`) and either local `whisper.cpp` or one of `GROQ_API_KEY`, `ASSEMBLYAI_API_KEY`, `GEMINI_API_KEY`, `OPENAI_API_KEY`, or `
|
|
37
|
+
- `yt-dlp` requires the `yt-dlp` binary (either set `YT_DLP_PATH` or have it on `PATH`) and either local `whisper.cpp` or one of `GROQ_API_KEY`, `ASSEMBLYAI_API_KEY`, `GEMINI_API_KEY`, `OPENAI_API_KEY`, `FAL_KEY`, or `DEEPGRAM_API_KEY`.
|
|
38
38
|
- AssemblyAI is supported as a dedicated remote transcription provider in the fallback chain.
|
|
39
39
|
- Gemini is used automatically when available after AssemblyAI/local providers, and handles larger uploads via the Files API.
|
|
40
40
|
- If OpenAI transcription fails and `FAL_KEY` is set, we fall back to FAL automatically.
|