@steipete/summarize 0.16.3 → 0.17.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.
Files changed (210) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +58 -13
  3. package/dist/esm/cache-keys.js +15 -0
  4. package/dist/esm/cache-keys.js.map +1 -1
  5. package/dist/esm/cache.js +12 -31
  6. package/dist/esm/cache.js.map +1 -1
  7. package/dist/esm/cli.js +1 -1
  8. package/dist/esm/cli.js.map +1 -1
  9. package/dist/esm/config/env.js +2 -0
  10. package/dist/esm/config/env.js.map +1 -1
  11. package/dist/esm/config/parse-helpers.js +3 -1
  12. package/dist/esm/config/parse-helpers.js.map +1 -1
  13. package/dist/esm/config/sections.js +8 -0
  14. package/dist/esm/config/sections.js.map +1 -1
  15. package/dist/esm/config/speakers.js +173 -0
  16. package/dist/esm/config/speakers.js.map +1 -0
  17. package/dist/esm/config.js +5 -0
  18. package/dist/esm/config.js.map +1 -1
  19. package/dist/esm/costs.js.map +1 -1
  20. package/dist/esm/daemon/agent-model.js +44 -8
  21. package/dist/esm/daemon/agent-model.js.map +1 -1
  22. package/dist/esm/daemon/agent.js +6 -0
  23. package/dist/esm/daemon/agent.js.map +1 -1
  24. package/dist/esm/daemon/chat.js +109 -18
  25. package/dist/esm/daemon/chat.js.map +1 -1
  26. package/dist/esm/daemon/env-snapshot.js +5 -0
  27. package/dist/esm/daemon/env-snapshot.js.map +1 -1
  28. package/dist/esm/daemon/flow-context.js +13 -2
  29. package/dist/esm/daemon/flow-context.js.map +1 -1
  30. package/dist/esm/daemon/models.js +26 -0
  31. package/dist/esm/daemon/models.js.map +1 -1
  32. package/dist/esm/daemon/server-admin-routes.js +10 -1
  33. package/dist/esm/daemon/server-admin-routes.js.map +1 -1
  34. package/dist/esm/daemon/server-summarize-request.js +1 -0
  35. package/dist/esm/daemon/server-summarize-request.js.map +1 -1
  36. package/dist/esm/daemon/url-fetch-guard.js +36 -11
  37. package/dist/esm/daemon/url-fetch-guard.js.map +1 -1
  38. package/dist/esm/flags.js +7 -0
  39. package/dist/esm/flags.js.map +1 -1
  40. package/dist/esm/llm/cli-provider-output.js +111 -1
  41. package/dist/esm/llm/cli-provider-output.js.map +1 -1
  42. package/dist/esm/llm/cli.js +95 -6
  43. package/dist/esm/llm/cli.js.map +1 -1
  44. package/dist/esm/llm/generate-text-stream.js +40 -22
  45. package/dist/esm/llm/generate-text-stream.js.map +1 -1
  46. package/dist/esm/llm/generate-text.js +31 -2
  47. package/dist/esm/llm/generate-text.js.map +1 -1
  48. package/dist/esm/llm/model-id.js +2 -1
  49. package/dist/esm/llm/model-id.js.map +1 -1
  50. package/dist/esm/llm/model-options.js +22 -0
  51. package/dist/esm/llm/model-options.js.map +1 -1
  52. package/dist/esm/llm/provider-profile.js +30 -4
  53. package/dist/esm/llm/provider-profile.js.map +1 -1
  54. package/dist/esm/llm/providers/anthropic.js +41 -3
  55. package/dist/esm/llm/providers/anthropic.js.map +1 -1
  56. package/dist/esm/llm/providers/minimax.js +6 -0
  57. package/dist/esm/llm/providers/minimax.js.map +1 -0
  58. package/dist/esm/llm/providers/models.js +30 -1
  59. package/dist/esm/llm/providers/models.js.map +1 -1
  60. package/dist/esm/llm/providers/openai.js +40 -10
  61. package/dist/esm/llm/providers/openai.js.map +1 -1
  62. package/dist/esm/model-auto-cli.js +5 -1
  63. package/dist/esm/model-auto-cli.js.map +1 -1
  64. package/dist/esm/model-spec.js +26 -2
  65. package/dist/esm/model-spec.js.map +1 -1
  66. package/dist/esm/run/cli-fallback-state.js +3 -1
  67. package/dist/esm/run/cli-fallback-state.js.map +1 -1
  68. package/dist/esm/run/env.js +8 -2
  69. package/dist/esm/run/env.js.map +1 -1
  70. package/dist/esm/run/flows/asset/summary-attempts.js +12 -6
  71. package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -1
  72. package/dist/esm/run/flows/asset/summary.js +6 -3
  73. package/dist/esm/run/flows/asset/summary.js.map +1 -1
  74. package/dist/esm/run/flows/url/extraction-session.js +65 -3
  75. package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
  76. package/dist/esm/run/flows/url/fetch-options.js +1 -0
  77. package/dist/esm/run/flows/url/fetch-options.js.map +1 -1
  78. package/dist/esm/run/flows/url/flow.js +1 -1
  79. package/dist/esm/run/flows/url/flow.js.map +1 -1
  80. package/dist/esm/run/flows/url/markdown.js +38 -7
  81. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  82. package/dist/esm/run/flows/url/slides-text-markdown.js +57 -9
  83. package/dist/esm/run/flows/url/slides-text-markdown.js.map +1 -1
  84. package/dist/esm/run/flows/url/summary-resolution.js +13 -7
  85. package/dist/esm/run/flows/url/summary-resolution.js.map +1 -1
  86. package/dist/esm/run/flows/url/types.js.map +1 -1
  87. package/dist/esm/run/help.js +17 -2
  88. package/dist/esm/run/help.js.map +1 -1
  89. package/dist/esm/run/run-config.js +8 -5
  90. package/dist/esm/run/run-config.js.map +1 -1
  91. package/dist/esm/run/run-env.js +14 -1
  92. package/dist/esm/run/run-env.js.map +1 -1
  93. package/dist/esm/run/run-metrics.js +25 -2
  94. package/dist/esm/run/run-metrics.js.map +1 -1
  95. package/dist/esm/run/run-models.js +4 -0
  96. package/dist/esm/run/run-models.js.map +1 -1
  97. package/dist/esm/run/run-settings-parse.js +4 -0
  98. package/dist/esm/run/run-settings-parse.js.map +1 -1
  99. package/dist/esm/run/run-settings.js +3 -2
  100. package/dist/esm/run/run-settings.js.map +1 -1
  101. package/dist/esm/run/runner-contexts.js +2 -0
  102. package/dist/esm/run/runner-contexts.js.map +1 -1
  103. package/dist/esm/run/runner-flags.js +27 -1
  104. package/dist/esm/run/runner-flags.js.map +1 -1
  105. package/dist/esm/run/runner-plan.js +29 -3
  106. package/dist/esm/run/runner-plan.js.map +1 -1
  107. package/dist/esm/run/runner-setup.js +9 -1
  108. package/dist/esm/run/runner-setup.js.map +1 -1
  109. package/dist/esm/run/streaming.js +1 -0
  110. package/dist/esm/run/streaming.js.map +1 -1
  111. package/dist/esm/run/summary-engine.js +40 -5
  112. package/dist/esm/run/summary-engine.js.map +1 -1
  113. package/dist/esm/shared/cache-store.js +68 -0
  114. package/dist/esm/shared/cache-store.js.map +1 -0
  115. package/dist/esm/shared/dns-pinned-fetch.js +93 -0
  116. package/dist/esm/shared/dns-pinned-fetch.js.map +1 -0
  117. package/dist/esm/shared/fetch-capabilities.js +37 -0
  118. package/dist/esm/shared/fetch-capabilities.js.map +1 -0
  119. package/dist/esm/shared/slides-presentation.js +3 -2
  120. package/dist/esm/shared/slides-presentation.js.map +1 -1
  121. package/dist/esm/shared/sse-events.js.map +1 -1
  122. package/dist/esm/shared/transcript-diarization-cache-scope.js +71 -0
  123. package/dist/esm/shared/transcript-diarization-cache-scope.js.map +1 -0
  124. package/dist/esm/slides/extract.js +11 -3
  125. package/dist/esm/slides/extract.js.map +1 -1
  126. package/dist/esm/slides/frame-extraction.js.map +1 -1
  127. package/dist/esm/slides/process.js +14 -3
  128. package/dist/esm/slides/process.js.map +1 -1
  129. package/dist/esm/slides/scene-detection.js +1 -1
  130. package/dist/esm/slides/scene-detection.js.map +1 -1
  131. package/dist/esm/speaker-identification/identify.js +274 -0
  132. package/dist/esm/speaker-identification/identify.js.map +1 -0
  133. package/dist/esm/speaker-identification/index.js +5 -0
  134. package/dist/esm/speaker-identification/index.js.map +1 -0
  135. package/dist/esm/speaker-identification/openai.js +110 -0
  136. package/dist/esm/speaker-identification/openai.js.map +1 -0
  137. package/dist/esm/speaker-identification/remember.js +181 -0
  138. package/dist/esm/speaker-identification/remember.js.map +1 -0
  139. package/dist/esm/speaker-identification/settings.js +110 -0
  140. package/dist/esm/speaker-identification/settings.js.map +1 -0
  141. package/dist/esm/speaker-identification/types.js +2 -0
  142. package/dist/esm/speaker-identification/types.js.map +1 -0
  143. package/dist/esm/tokenizer.js +25 -0
  144. package/dist/esm/tokenizer.js.map +1 -0
  145. package/dist/esm/version.js +1 -1
  146. package/dist/types/cache-keys.d.ts +8 -0
  147. package/dist/types/cache.d.ts +3 -11
  148. package/dist/types/config/speakers.d.ts +2 -0
  149. package/dist/types/config/types.d.ts +43 -1
  150. package/dist/types/config.d.ts +1 -1
  151. package/dist/types/costs.d.ts +2 -2
  152. package/dist/types/daemon/agent-model.d.ts +1 -0
  153. package/dist/types/daemon/env-snapshot.d.ts +1 -1
  154. package/dist/types/daemon/models.d.ts +3 -0
  155. package/dist/types/daemon/url-fetch-guard.d.ts +2 -1
  156. package/dist/types/flags.d.ts +2 -0
  157. package/dist/types/llm/cli-provider-output.d.ts +6 -1
  158. package/dist/types/llm/cli.d.ts +2 -1
  159. package/dist/types/llm/model-id.d.ts +1 -1
  160. package/dist/types/llm/model-options.d.ts +20 -0
  161. package/dist/types/llm/provider-profile.d.ts +4 -3
  162. package/dist/types/llm/providers/anthropic.d.ts +29 -2
  163. package/dist/types/llm/providers/minimax.d.ts +1 -0
  164. package/dist/types/llm/providers/models.d.ts +5 -0
  165. package/dist/types/llm/providers/openai.d.ts +6 -1
  166. package/dist/types/model-spec.d.ts +2 -2
  167. package/dist/types/run/flows/asset/summary.d.ts +2 -0
  168. package/dist/types/run/flows/url/fetch-options.d.ts +1 -0
  169. package/dist/types/run/flows/url/markdown.d.ts +1 -1
  170. package/dist/types/run/flows/url/slides-text-markdown.d.ts +2 -1
  171. package/dist/types/run/flows/url/types.d.ts +9 -2
  172. package/dist/types/run/run-config.d.ts +3 -2
  173. package/dist/types/run/run-context.d.ts +5 -1
  174. package/dist/types/run/run-env.d.ts +3 -0
  175. package/dist/types/run/run-settings.d.ts +4 -2
  176. package/dist/types/run/runner-flags.d.ts +6 -1
  177. package/dist/types/run/runner-setup.d.ts +1 -0
  178. package/dist/types/run/summary-engine.d.ts +9 -4
  179. package/dist/types/run/types.d.ts +1 -1
  180. package/dist/types/shared/cache-store.d.ts +34 -0
  181. package/dist/types/shared/dns-pinned-fetch.d.ts +1 -0
  182. package/dist/types/shared/fetch-capabilities.d.ts +10 -0
  183. package/dist/types/shared/slides-presentation.d.ts +2 -1
  184. package/dist/types/shared/sse-events.d.ts +1 -0
  185. package/dist/types/shared/transcript-diarization-cache-scope.d.ts +11 -0
  186. package/dist/types/slides/frame-extraction.d.ts +4 -3
  187. package/dist/types/slides/process.d.ts +8 -3
  188. package/dist/types/slides/scene-detection.d.ts +4 -3
  189. package/dist/types/speaker-identification/identify.d.ts +40 -0
  190. package/dist/types/speaker-identification/index.d.ts +5 -0
  191. package/dist/types/speaker-identification/openai.d.ts +27 -0
  192. package/dist/types/speaker-identification/remember.d.ts +7 -0
  193. package/dist/types/speaker-identification/settings.d.ts +6 -0
  194. package/dist/types/speaker-identification/types.d.ts +38 -0
  195. package/dist/types/tokenizer.d.ts +1 -0
  196. package/dist/types/version.d.ts +1 -1
  197. package/docs/README.md +1 -1
  198. package/docs/cache.md +1 -1
  199. package/docs/chrome-extension.md +6 -4
  200. package/docs/cli.md +30 -3
  201. package/docs/commands/slides.md +3 -3
  202. package/docs/commands/summarize.md +22 -2
  203. package/docs/config.md +40 -2
  204. package/docs/index.md +1 -1
  205. package/docs/install.md +11 -9
  206. package/docs/llm.md +15 -2
  207. package/docs/media.md +2 -1
  208. package/docs/transcript-provider-flow.md +10 -0
  209. package/docs/youtube.md +45 -1
  210. package/package.json +17 -17
@@ -21,12 +21,13 @@ export type SlidePresentation = {
21
21
  finalSummaryIndexes: Set<number>;
22
22
  };
23
23
  export type SlidePresentationTextKind = "intro" | "slide-body";
24
- export declare function buildSlidePresentation({ markdown, slides, transcriptTimedText, lengthArg, coerce, includeTranscriptFallback, }: {
24
+ export declare function buildSlidePresentation({ markdown, slides, transcriptTimedText, lengthArg, coerce, coerceReserveIntro, includeTranscriptFallback, }: {
25
25
  markdown: string;
26
26
  slides: SlideTimelineEntry[];
27
27
  transcriptTimedText?: string | null;
28
28
  lengthArg: SlidePresentationLength;
29
29
  coerce?: boolean;
30
+ coerceReserveIntro?: boolean;
30
31
  includeTranscriptFallback?: boolean;
31
32
  }): SlidePresentation;
32
33
  export declare function createSlidesPresentationStream({ getSlideIndexOrder, getSlideMeta, onText, onSlide, debugWrite, }: {
@@ -9,6 +9,7 @@ export type SseSlidesData = {
9
9
  sourceUrl: string;
10
10
  sourceId: string;
11
11
  sourceKind: string;
12
+ slideRuntime?: "browser" | "daemon";
12
13
  ocrAvailable: boolean;
13
14
  transcriptTimedText?: string | null;
14
15
  slides: Array<{
@@ -0,0 +1,11 @@
1
+ import type { CacheState } from "../cache.js";
2
+ type TranscriptDiarizationPreference = "auto" | "elevenlabs" | "openai";
3
+ type TranscriptDiarizationProvider = Exclude<TranscriptDiarizationPreference, "auto">;
4
+ type TranscriptDiarizationCacheScope = TranscriptDiarizationProvider | "auto";
5
+ export declare function resolveTranscriptDiarizationCacheReadScopes(preference: TranscriptDiarizationPreference | null | undefined): readonly TranscriptDiarizationCacheScope[] | null;
6
+ export declare function resolveTranscriptDiarizationCacheWriteScope({ preference, metadata, }: {
7
+ preference: TranscriptDiarizationPreference | null | undefined;
8
+ metadata: Record<string, unknown> | null | undefined;
9
+ }): TranscriptDiarizationCacheScope | null;
10
+ export declare function scopeTranscriptCacheForDiarization(cache: CacheState, preference: TranscriptDiarizationPreference | null): CacheState;
11
+ export {};
@@ -1,7 +1,8 @@
1
+ import { type ProcessCommand } from "./process.js";
1
2
  import type { SlideAutoTune, SlideImage } from "./types.js";
2
3
  export declare function detectSlideTimestamps({ ffmpegPath, ffprobePath, inputPath, sceneThreshold, autoTuneThreshold, env, timeoutMs, warnings, workers, sampleCount, onSegmentProgress, logSlides, logSlidesTiming, }: {
3
- ffmpegPath: string;
4
- ffprobePath: string | null;
4
+ ffmpegPath: ProcessCommand;
5
+ ffprobePath: ProcessCommand | null;
5
6
  inputPath: string;
6
7
  sceneThreshold: number;
7
8
  autoTuneThreshold: boolean;
@@ -19,7 +20,7 @@ export declare function detectSlideTimestamps({ ffmpegPath, ffprobePath, inputPa
19
20
  durationSeconds: number | null;
20
21
  }>;
21
22
  export declare function extractFramesAtTimestamps({ ffmpegPath, inputPath, outputDir, timestamps, segments, durationSeconds, timeoutMs, workers, onProgress, onStatus, onSlide, logSlides, logSlidesTiming, }: {
22
- ffmpegPath: string;
23
+ ffmpegPath: ProcessCommand;
23
24
  inputPath: string;
24
25
  outputDir: string;
25
26
  timestamps: number[];
@@ -1,6 +1,11 @@
1
1
  import type { ProcessHandle } from "../processes.js";
2
- export declare function runProcess({ command, args, timeoutMs, errorLabel, onStderrLine, onStdoutLine, }: {
2
+ export type ProcessCommand = string | {
3
3
  command: string;
4
+ argsPrefix?: string[];
5
+ source?: "wasm";
6
+ };
7
+ export declare function runProcess({ command, args, timeoutMs, errorLabel, onStderrLine, onStdoutLine, }: {
8
+ command: ProcessCommand;
4
9
  args: string[];
5
10
  timeoutMs: number;
6
11
  errorLabel: string;
@@ -8,13 +13,13 @@ export declare function runProcess({ command, args, timeoutMs, errorLabel, onStd
8
13
  onStdoutLine?: (line: string, handle: ProcessHandle | null) => void;
9
14
  }): Promise<void>;
10
15
  export declare function runProcessCapture({ command, args, timeoutMs, errorLabel, }: {
11
- command: string;
16
+ command: ProcessCommand;
12
17
  args: string[];
13
18
  timeoutMs: number;
14
19
  errorLabel: string;
15
20
  }): Promise<string>;
16
21
  export declare function runProcessCaptureBuffer({ command, args, timeoutMs, errorLabel, }: {
17
- command: string;
22
+ command: ProcessCommand;
18
23
  args: string[];
19
24
  timeoutMs: number;
20
25
  errorLabel: string;
@@ -1,3 +1,4 @@
1
+ import { type ProcessCommand } from "./process.js";
1
2
  import type { SlideImage } from "./types.js";
2
3
  export type SceneSegment = {
3
4
  start: number;
@@ -12,7 +13,7 @@ export declare function resolveExtractedTimestamp({ requested, actual, seekBase,
12
13
  }): number;
13
14
  export declare function roundThreshold(value: number): number;
14
15
  export declare function calibrateSceneThreshold({ ffmpegPath, inputPath, durationSeconds, sampleCount, timeoutMs, logSlides, }: {
15
- ffmpegPath: string;
16
+ ffmpegPath: ProcessCommand;
16
17
  inputPath: string;
17
18
  durationSeconds: number | null;
18
19
  sampleCount: number;
@@ -27,7 +28,7 @@ export declare function buildSegments(durationSeconds: number | null, workers: n
27
28
  duration: number;
28
29
  }>;
29
30
  export declare function detectSceneTimestamps({ ffmpegPath, inputPath, threshold, timeoutMs, segments, workers, onSegmentProgress, runWithConcurrency, }: {
30
- ffmpegPath: string;
31
+ ffmpegPath: ProcessCommand;
31
32
  inputPath: string;
32
33
  threshold: number;
33
34
  timeoutMs: number;
@@ -60,7 +61,7 @@ export declare function buildIntervalTimestamps({ durationSeconds, minDurationSe
60
61
  intervalSeconds: number;
61
62
  } | null;
62
63
  export declare function probeVideoInfo({ ffprobePath, inputPath, timeoutMs, }: {
63
- ffprobePath: string;
64
+ ffprobePath: ProcessCommand;
64
65
  inputPath: string;
65
66
  timeoutMs: number;
66
67
  }): Promise<{
@@ -0,0 +1,40 @@
1
+ import type { ExtractedLinkContent, TranscriptSegment } from "@steipete/summarize-core/content";
2
+ import type { LlmTokenUsage } from "../llm/types.js";
3
+ import { type InferSpeakerMappingsResult } from "./openai.js";
4
+ import type { SpeakerIdentificationSettings, SpeakerIdentityMapping } from "./types.js";
5
+ export declare class SpeakerIdentificationError extends Error {
6
+ name: string;
7
+ }
8
+ export type SpeakerIdentificationResult = {
9
+ extracted: ExtractedLinkContent;
10
+ mappings: SpeakerIdentityMapping[];
11
+ transcriptHash: string | null;
12
+ usage: LlmTokenUsage | null;
13
+ warning: string | null;
14
+ cacheable: boolean;
15
+ };
16
+ type InferMappings = (args: {
17
+ segments: TranscriptSegment[];
18
+ unresolvedSpeakers: string[];
19
+ anchoredMappings: Record<string, string>;
20
+ title: string | null;
21
+ description: string | null;
22
+ sourceUrl: string;
23
+ settings: SpeakerIdentificationSettings;
24
+ apiKey: string;
25
+ baseUrl: string | null;
26
+ timeoutMs: number;
27
+ fetchImpl: typeof fetch;
28
+ }) => Promise<InferSpeakerMappingsResult>;
29
+ export declare function identifySpeakersInExtractedContent({ extracted, sourceUrl, settings, openaiApiKey, openaiBaseUrl, timeoutMs, maxContentCharacters, fetchImpl, inferMappings, }: {
30
+ extracted: ExtractedLinkContent;
31
+ sourceUrl: string;
32
+ settings: SpeakerIdentificationSettings;
33
+ openaiApiKey: string | null;
34
+ openaiBaseUrl: string | null;
35
+ timeoutMs: number;
36
+ maxContentCharacters: number | null;
37
+ fetchImpl: typeof fetch;
38
+ inferMappings?: InferMappings;
39
+ }): Promise<SpeakerIdentificationResult>;
40
+ export {};
@@ -0,0 +1,5 @@
1
+ export { buildSpeakerSourceKey, DEFAULT_SPEAKER_IDENTIFICATION_CONFIDENCE, DEFAULT_SPEAKER_IDENTIFICATION_MODEL, parseSpeakerAnchor, resolveSpeakerIdentificationSettings, } from "./settings.js";
2
+ export { identifySpeakersInExtractedContent, SpeakerIdentificationError, type SpeakerIdentificationResult, } from "./identify.js";
3
+ export { buildSpeakerEvidence, inferSpeakerMappingsWithOpenAi, type InferSpeakerMappingsResult, type OpenAiSpeakerMapping, } from "./openai.js";
4
+ export { rememberSpeakerMappings } from "./remember.js";
5
+ export type { RememberedSpeakerMapping, ResolveSpeakerIdentificationInput, SpeakerAnchor, SpeakerIdentificationSettings, SpeakerIdentityMapping, } from "./types.js";
@@ -0,0 +1,27 @@
1
+ import { type TranscriptSegment } from "@steipete/summarize-core/content";
2
+ import type { LlmTokenUsage } from "../llm/types.js";
3
+ import type { SpeakerIdentificationSettings } from "./types.js";
4
+ export type OpenAiSpeakerMapping = {
5
+ speaker: string;
6
+ name: string;
7
+ confidence: number;
8
+ evidence: string;
9
+ };
10
+ export type InferSpeakerMappingsResult = {
11
+ mappings: OpenAiSpeakerMapping[];
12
+ usage: LlmTokenUsage | null;
13
+ };
14
+ export declare function buildSpeakerEvidence(segments: TranscriptSegment[]): string[];
15
+ export declare function inferSpeakerMappingsWithOpenAi({ segments, unresolvedSpeakers, anchoredMappings, title, description, sourceUrl, settings, apiKey, baseUrl, timeoutMs, fetchImpl, }: {
16
+ segments: TranscriptSegment[];
17
+ unresolvedSpeakers: string[];
18
+ anchoredMappings: Record<string, string>;
19
+ title: string | null;
20
+ description: string | null;
21
+ sourceUrl: string;
22
+ settings: SpeakerIdentificationSettings;
23
+ apiKey: string;
24
+ baseUrl: string | null;
25
+ timeoutMs: number;
26
+ fetchImpl: typeof fetch;
27
+ }): Promise<InferSpeakerMappingsResult>;
@@ -0,0 +1,7 @@
1
+ import type { SpeakerIdentificationSettings, SpeakerIdentityMapping } from "./types.js";
2
+ export declare function rememberSpeakerMappings({ configPath, settings, mappings, transcriptHash, }: {
3
+ configPath: string;
4
+ settings: SpeakerIdentificationSettings;
5
+ mappings: SpeakerIdentityMapping[];
6
+ transcriptHash: string;
7
+ }): Promise<void>;
@@ -0,0 +1,6 @@
1
+ import type { ResolveSpeakerIdentificationInput, SpeakerAnchor, SpeakerIdentificationSettings } from "./types.js";
2
+ export declare const DEFAULT_SPEAKER_IDENTIFICATION_MODEL = "openai/gpt-5.5";
3
+ export declare const DEFAULT_SPEAKER_IDENTIFICATION_CONFIDENCE = 0.85;
4
+ export declare function buildSpeakerSourceKey(sourceUrl: string): string;
5
+ export declare function parseSpeakerAnchor(raw: string, flag?: string): SpeakerAnchor;
6
+ export declare function resolveSpeakerIdentificationSettings({ config, sourceUrl, diarization, profileArg, anchorArgs, identifyOverride, remember, }: ResolveSpeakerIdentificationInput): SpeakerIdentificationSettings | null;
@@ -0,0 +1,38 @@
1
+ import type { SpeakersConfig } from "../config.js";
2
+ export type SpeakerAnchor = {
3
+ atMs: number;
4
+ name: string;
5
+ };
6
+ export type SpeakerIdentityMapping = {
7
+ speaker: string;
8
+ name: string;
9
+ confidence: number;
10
+ source: "anchor" | "remembered" | "openai";
11
+ evidence?: string | null;
12
+ };
13
+ export type RememberedSpeakerMapping = {
14
+ transcriptHash: string;
15
+ mappings: Record<string, string>;
16
+ };
17
+ export type SpeakerIdentificationSettings = {
18
+ sourceKey: string;
19
+ profileName: string | null;
20
+ host: string | null;
21
+ knownSpeakers: string[];
22
+ context: string | null;
23
+ model: string;
24
+ minimumConfidence: number;
25
+ anchors: SpeakerAnchor[];
26
+ remembered: RememberedSpeakerMapping | null;
27
+ remember: boolean;
28
+ explicit: boolean;
29
+ };
30
+ export type ResolveSpeakerIdentificationInput = {
31
+ config: SpeakersConfig | null | undefined;
32
+ sourceUrl: string;
33
+ diarization: "auto" | "elevenlabs" | "openai" | null;
34
+ profileArg: string | null;
35
+ anchorArgs: readonly string[];
36
+ identifyOverride: boolean | null;
37
+ remember: boolean;
38
+ };
@@ -0,0 +1 @@
1
+ export declare function countTokens(text: string): number;
@@ -1,4 +1,4 @@
1
- export declare const FALLBACK_VERSION = "0.16.3";
1
+ export declare const FALLBACK_VERSION = "0.17.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/README.md CHANGED
@@ -6,7 +6,7 @@ summary: "Docs index for summarize behaviors and modes."
6
6
 
7
7
  - `docs/chrome-extension.md` — Chrome side panel extension + daemon setup/troubleshooting
8
8
  - `docs/cache.md` — cache design + config (SQLite)
9
- - `docs/cli.md` — CLI models (Claude/Codex/Gemini/Agent/OpenClaw/OpenCode/Copilot)
9
+ - `docs/cli.md` — CLI models (Claude/Codex/Gemini/Agent/OpenClaw/OpenCode/Copilot/Antigravity/pi)
10
10
  - `docs/config.md` — config file location, precedence, and schema
11
11
  - `docs/extract-only.md` — extract mode (no summary LLM call)
12
12
  - `docs/firecrawl.md` — Firecrawl mode + API key
package/docs/cache.md CHANGED
@@ -43,7 +43,7 @@ Separate file cache for downloaded media (yt-dlp, direct media URLs). This is **
43
43
  - **Summaries**
44
44
  - key: `sha256({contentHash, promptHash, model, length, language, formatVersion})`
45
45
  - cache hit even if URL differs (content hash wins).
46
- - `contentHash` comes from the `<content>` block actually sent to the model (so slide timelines / transcript extras affect the key).
46
+ - `contentHash` comes from the `<content>` block actually sent to the model (so slide timelines / transcript extras affect the key), or from attached binary bytes when the prompt content is empty.
47
47
  - **Slides** (manifest + on-disk images in the slides output dir)
48
48
  - key: `sha256({url, slideSettings, formatVersion})`
49
49
 
@@ -12,12 +12,13 @@ Goal: Chrome **Side Panel** (“real sidebar”) summarizes **what you see** on
12
12
 
13
13
  Quickstart:
14
14
 
15
- - Install summarize (choose one):
15
+ - Build/load extension: `apps/chrome-extension/README.md`
16
+ - Chrome Browser mode works immediately without a daemon for page summaries and fetchable video slides.
17
+ - Optional: install summarize for daemon-backed media support:
16
18
  - `npm i -g @steipete/summarize`
17
19
  - `brew install summarize` (macOS, Linux)
18
- - Build/load extension: `apps/chrome-extension/README.md`
19
20
  - Firefox sidebar build: `pnpm -C apps/chrome-extension build:firefox` (load via `about:debugging` → temporary add-on)
20
- - Open side panel → copy token install command → run:
21
+ - Open side panel → copy token install command → run for daemon mode:
21
22
  - `summarize daemon install --token <TOKEN>` (macOS: LaunchAgent, Linux: systemd user, Windows: Scheduled Task)
22
23
  - Verify:
23
24
  - `summarize daemon status`
@@ -80,6 +81,7 @@ Dev (repo checkout):
80
81
  - **Extension (MV3, WXT)**
81
82
  - Side Panel UI: length + typography controls (font family + size), auto/manual toggle.
82
83
  - Background service worker: tab + navigation tracking, content extraction, starts summarize runs.
84
+ - Chrome offscreen page: runs bundled FFmpeg WebAssembly workers for daemonless video slides.
83
85
  - Content script: extract readable article text from the **rendered DOM** via Readability; also detect SPA URL changes.
84
86
  - Panel page streams SSE directly (MV3 service workers can be flaky for long-lived streams).
85
87
  - **Daemon (local, autostart service)**
@@ -118,7 +120,7 @@ See `docs/media.md` for detection and transcript rules.
118
120
  ## Slides (Side Panel)
119
121
 
120
122
  - 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.
121
- - 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.
123
+ - Turning slides **on** refreshes the current summary and requests slide extraction. Chrome Browser mode uses bundled FFmpeg WebAssembly for fetchable videos up to 128 MB and falls back to visible-tab capture. Daemon mode adds `yt-dlp`, native ffmpeg, and optional `tesseract` OCR.
122
124
  - Active slide mode is slide-first:
123
125
  - vertical image/text cards
124
126
  - transcript-first text; OCR fallback
package/docs/cli.md CHANGED
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  title: "CLI providers"
3
3
  kicker: "models"
4
- summary: "CLI model providers and config for Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, and GitHub Copilot."
4
+ summary: "CLI model providers and config for Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot, Antigravity, and pi."
5
5
  read_when:
6
6
  - "When changing CLI model integration."
7
7
  ---
8
8
 
9
9
  # CLI models
10
10
 
11
- Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot) as local model backends.
11
+ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot, Antigravity, pi) as local model backends.
12
12
 
13
13
  ## Model ids
14
14
 
@@ -22,8 +22,12 @@ 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` (use the Antigravity CLI active session model)
26
+ - `cli/pi/<model>` (e.g. `cli/pi/sonnet`)
27
+ - `cli/pi` (use pi's configured default model)
25
28
 
26
29
  Use `--cli [provider]` (case-insensitive) for the provider default, or `--model cli/<provider>/<model>` to pin a model.
30
+ Antigravity does not support per-call model selection in print mode, so use `cli/agy` without a model suffix. pi supports `cli/pi/<model>` or a configured `cli.pi.model`.
27
31
  If `--cli` is provided without a provider, auto selection is used with CLI enabled.
28
32
 
29
33
  Codex GPT Fast:
@@ -42,6 +46,7 @@ Auto mode can prepend CLI attempts in two ways:
42
46
  - Applies only to **implicit** auto (when no model is set via flag/env/config).
43
47
  - Default behavior: only when no API key is configured.
44
48
  - Default order: `claude, gemini, codex, agent, openclaw, opencode, copilot`.
49
+ - Antigravity and pi are opt-in unless added to `cli.autoFallback.order`.
45
50
  - Remembers + prioritizes the last successful CLI provider (`~/.summarize/cli-state.json`).
46
51
 
47
52
  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).
@@ -100,13 +105,25 @@ path-based prompt and enables the required tool flags:
100
105
  - Agent: uses built-in file tools in `agent --print` mode (no extra flags)
101
106
  - OpenCode: `opencode run --format json ... --file <path>` when a file/image path is required
102
107
  - Copilot: `copilot -p <prompt>`; passes `--model <model>` when one is configured
108
+ - Antigravity: `agy --print`; does not auto-approve tools for attachment prompts
109
+ - pi: `pi --print --mode json`; passes `--system-prompt`, sends prompt over stdin, and uses `--no-tools` for isolated summaries
103
110
 
104
111
  ## Config
105
112
 
106
113
  ```json
107
114
  {
108
115
  "cli": {
109
- "enabled": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"],
116
+ "enabled": [
117
+ "claude",
118
+ "gemini",
119
+ "codex",
120
+ "agent",
121
+ "openclaw",
122
+ "opencode",
123
+ "copilot",
124
+ "agy",
125
+ "pi"
126
+ ],
110
127
  "autoFallback": {
111
128
  "enabled": true,
112
129
  "onlyWhenNoApiKeys": true,
@@ -132,6 +149,12 @@ path-based prompt and enables the required tool flags:
132
149
  },
133
150
  "copilot": {
134
151
  "binary": "/usr/local/bin/copilot"
152
+ },
153
+ "agy": {
154
+ "binary": "/usr/local/bin/agy"
155
+ },
156
+ "pi": {
157
+ "binary": "/usr/local/bin/pi"
135
158
  }
136
159
  }
137
160
  }
@@ -142,6 +165,9 @@ Notes:
142
165
  - CLI output is treated as text only (no token accounting).
143
166
  - If a CLI call fails, auto mode falls back to the next candidate.
144
167
  - Cursor Agent CLI uses the `agent` binary and relies on Cursor CLI auth (login or `CURSOR_API_KEY`).
168
+ - Antigravity CLI uses the active agy session model; `cli.agy.model` is ignored by runtime selection.
169
+ - Antigravity normal text summaries run `agy --print` with no prompt argument in a temporary cwd with `--sandbox`, streaming the prompt over stdin so extracted content is not exposed in argv. Attachment prompts keep the caller cwd so agy can inspect the requested path but do not auto-approve tools.
170
+ - 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.
145
171
  - Codex CLI normal text summaries run isolated by default: `codex exec --ephemeral --ignore-user-config --ignore-rules -C <temp-dir> ...` with a sanitized temporary `CODEX_HOME` that carries auth only. Set `cli.codex.isolated` to `false` only when you intentionally need Codex to inherit local config/rules.
146
172
  - Gemini CLI is invoked in headless mode with `--prompt` for compatibility with current Gemini CLI releases.
147
173
  - OpenClaw uses `openclaw agent --agent <model> --message <prompt> --json` because current OpenClaw requires `-m/--message`; very large extracted inputs are rejected before launch to avoid argv limits.
@@ -162,6 +188,7 @@ summarize --cli agent --plain --timeout 2m /tmp/summarize-cli-smoke.txt
162
188
  summarize --cli openclaw --plain --timeout 2m /tmp/summarize-cli-smoke.txt
163
189
  summarize --cli opencode --plain --timeout 2m /tmp/summarize-cli-smoke.txt
164
190
  summarize --cli copilot --plain --timeout 2m /tmp/summarize-cli-smoke.txt
191
+ summarize --cli pi --plain --timeout 2m /tmp/summarize-cli-smoke.txt
165
192
  ```
166
193
 
167
194
  If Agent fails with auth, run `agent login` (interactive) or set `CURSOR_API_KEY`.
@@ -11,7 +11,7 @@ summary: "Extract scene-change keyframes from a video URL into PNG files."
11
11
  summarize slides <url> [flags]
12
12
  ```
13
13
 
14
- Extracts slide-shaped keyframes from a YouTube or direct video URL using `ffmpeg` scene detection. 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.
14
+ Extracts slide-shaped keyframes from a YouTube or direct video URL 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
 
@@ -24,11 +24,11 @@ summarize slides "https://example.com/lecture.mp4" --slides-max 12
24
24
 
25
25
  ## Requirements
26
26
 
27
- - `ffmpeg` on PATH (scene detection + frame extraction).
27
+ - Bundled FFmpeg WebAssembly, or native `ffmpeg` on PATH for faster extraction and broader codec support.
28
28
  - `yt-dlp` on PATH for YouTube URLs.
29
29
  - `tesseract` on PATH for `--slides-ocr`.
30
30
 
31
- If a tool is missing, summarize prints a clear warning and exits non-zero.
31
+ If a required tool is missing, summarize prints a clear warning and exits non-zero.
32
32
 
33
33
  ## Flags
34
34
 
@@ -69,6 +69,21 @@ If `[input]` is omitted, summarize prints concise help and exits.
69
69
  `--timestamps`
70
70
  : Include timestamps in transcripts when available.
71
71
 
72
+ `--diarize [provider]`
73
+ : Force speaker-labelled YouTube audio transcription. Provider: `auto`, `elevenlabs`, or `openai`.
74
+
75
+ `--identify-speakers` / `--no-identify-speakers`
76
+ : Resolve generic diarization labels to names, or disable configured resolution for one run. Uses authoritative anchors and OpenAI GPT-5.5 context inference.
77
+
78
+ `--speaker-profile <name>`
79
+ : Select a reusable profile from `speakers.profiles` in the config file.
80
+
81
+ `--speaker-at <timestamp=name>`
82
+ : Name the speaker active at a timestamp. Repeat the flag for multiple speakers.
83
+
84
+ `--remember-speakers`
85
+ : Atomically persist resolved names, anchors, and a transcript-hash-guarded source mapping under the selected profile.
86
+
72
87
  ### Slides
73
88
 
74
89
  `--slides [value]`
@@ -109,10 +124,10 @@ If `[input]` is omitted, summarize prints concise help and exits.
109
124
  ### Models
110
125
 
111
126
  `--model <model>`
112
- : Model id. `auto`, `<config-preset>`, `cli/<provider>/<model>`, `xai/...`, `openai/...`, `nvidia/...`, `google/...`, `anthropic/...`, `zai/...`, `github-copilot/...`, or `openrouter/<author>/<slug>`. Default `auto`. See [LLM overview](../llm.md).
127
+ : Model id. `auto`, `<config-preset>`, `cli/<provider>/<model>`, `xai/...`, `openai/...`, `nvidia/...`, `minimax/...`, `google/...`, `anthropic/...`, `zai/...`, `github-copilot/...`, or `openrouter/<author>/<slug>`. Default `auto`. See [LLM overview](../llm.md).
113
128
 
114
129
  `--cli [provider]`
115
- : Use a logged-in CLI provider: `claude`, `gemini`, `codex`, `agent`, `openclaw`, `opencode`, `copilot`. Equivalent to `--model cli/<provider>`. Without a value: enable CLI providers in auto-selection.
130
+ : Use a logged-in CLI provider: `claude`, `gemini`, `codex`, `agent`, `openclaw`, `opencode`, `copilot`, `agy`, `pi`. Equivalent to `--model cli/<provider>`. Without a value: enable CLI providers in auto-selection.
116
131
 
117
132
  `--thinking <effort>`
118
133
  : OpenAI reasoning effort. `none`, `low`, `medium`, `high`, `xhigh`. Aliases: `off`, `min`, `mid`. Only affects reasoning-capable OpenAI models.
@@ -195,6 +210,11 @@ summarize "https://example.com" --extract --format md
195
210
  summarize "https://www.youtube.com/watch?v=..." \
196
211
  --extract --format md --markdown-mode llm
197
212
 
213
+ # ElevenLabs diarization with verified speaker names.
214
+ summarize "https://www.youtube.com/watch?v=..." --extract \
215
+ --diarize elevenlabs --identify-speakers \
216
+ --speaker-profile my-podcast --speaker-at "0:12=Host Name" --remember-speakers
217
+
198
218
  # Inline slides + summary.
199
219
  summarize "https://www.youtube.com/watch?v=..." --slides
200
220
 
package/docs/config.md CHANGED
@@ -138,6 +138,7 @@ Legacy shortcut (still supported):
138
138
  "openai": "sk-...",
139
139
  "groq": "gsk-...",
140
140
  "assemblyai": "...",
141
+ "elevenlabs": "...",
141
142
  "anthropic": "sk-ant-...",
142
143
  "google": "...",
143
144
  "openrouter": "sk-or-...",
@@ -205,6 +206,36 @@ Enable slides by default and tune extraction parameters:
205
206
  }
206
207
  ```
207
208
 
209
+ ## Speaker identification
210
+
211
+ Define reusable names and context for diarized YouTube transcripts:
212
+
213
+ ```json
214
+ {
215
+ "speakers": {
216
+ "defaultProfile": "modern-wisdom",
217
+ "autoIdentify": true,
218
+ "model": "openai/gpt-5.5",
219
+ "minimumConfidence": 0.85,
220
+ "profiles": {
221
+ "modern-wisdom": {
222
+ "host": "Chris Williamson",
223
+ "knownSpeakers": ["Chris Williamson"],
224
+ "context": "Modern Wisdom podcast. Chris Williamson is the host."
225
+ }
226
+ }
227
+ }
228
+ }
229
+ ```
230
+
231
+ Run with `--diarize`, then use `--speaker-profile`, repeatable `--speaker-at <timestamp=name>`, and
232
+ `--remember-speakers` to verify and persist a video's label mapping. `autoIdentify` enables identity
233
+ resolution whenever diarization is requested. `--no-identify-speakers` disables it for one run.
234
+
235
+ Remembered mappings live under `speakers.sources["youtube:<video-id>"]`. They include a transcript hash
236
+ and are ignored if provider output changes. Profile-level `model`, `minimumConfidence`, and `autoIdentify`
237
+ override the corresponding top-level speaker settings.
238
+
208
239
  ## Logging (daemon)
209
240
 
210
241
  Enable JSON log files for the daemon:
@@ -361,7 +392,7 @@ Examples:
361
392
  ```json
362
393
  {
363
394
  "cli": {
364
- "enabled": ["gemini", "agent", "openclaw", "opencode", "copilot"],
395
+ "enabled": ["gemini", "agent", "openclaw", "opencode", "copilot", "agy", "pi"],
365
396
  "autoFallback": {
366
397
  "enabled": true,
367
398
  "onlyWhenNoApiKeys": true,
@@ -372,7 +403,9 @@ Examples:
372
403
  "agent": { "binary": "/usr/local/bin/agent", "model": "gpt-5.2" },
373
404
  "openclaw": { "binary": "/usr/local/bin/openclaw", "model": "main" },
374
405
  "opencode": { "binary": "/usr/local/bin/opencode", "model": "openai/gpt-5.4" },
375
- "copilot": { "binary": "/usr/local/bin/copilot", "model": "gpt-5.2" }
406
+ "copilot": { "binary": "/usr/local/bin/copilot", "model": "gpt-5.2" },
407
+ "agy": { "binary": "/usr/local/bin/agy" },
408
+ "pi": { "binary": "/usr/local/bin/pi" }
376
409
  }
377
410
  }
378
411
  ```
@@ -382,9 +415,12 @@ Notes:
382
415
  - `cli.enabled` is an allowlist (and order) for auto + explicit CLI model ids.
383
416
  - `cli.autoFallback` controls implicit-auto CLI fallback when `cli.enabled` is not set.
384
417
  - Default auto fallback order: `claude, gemini, codex, agent, openclaw, opencode, copilot`.
418
+ - Antigravity and pi are opt-in unless added to `cli.autoFallback.order`.
385
419
  - Auto fallback stores the last successful provider in `~/.summarize/cli-state.json` and prioritizes it on the next run.
386
420
  - `cli.<provider>.binary` overrides CLI binary discovery.
387
421
  - `cli.<provider>.extraArgs` appends extra CLI args.
422
+ - Antigravity CLI uses the active agy session model; `cli.agy.model` is ignored by runtime selection.
423
+ - 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.
388
424
  - `cli.codex.isolated` defaults to `true` for normal summaries, adding Codex ephemeral/no-user-config/no-rules flags, a temporary cwd, and a sanitized temporary `CODEX_HOME` that carries auth only. Set it to `false` only when local Codex config/rules are intentional.
389
425
 
390
426
  ## OpenAI config
@@ -416,6 +452,7 @@ Override API endpoints for any provider to use proxies, gateways, or compatible
416
452
  "google": { "baseUrl": "https://my-google-proxy.example.com" },
417
453
  "xai": { "baseUrl": "https://my-xai-proxy.example.com" },
418
454
  "zai": { "baseUrl": "https://api.zhipuai.cn/paas/v4" },
455
+ "minimax": { "baseUrl": "https://api.minimax.io/v1" },
419
456
  "ollama": { "baseUrl": "http://localhost:11434/v1" }
420
457
  }
421
458
  ```
@@ -430,4 +467,5 @@ Or via environment variables (which take precedence over config):
430
467
  | Google | `GOOGLE_BASE_URL` (alias: `GEMINI_BASE_URL`) |
431
468
  | xAI | `XAI_BASE_URL` |
432
469
  | Z.AI | `Z_AI_BASE_URL` (alias: `ZAI_BASE_URL`) |
470
+ | MiniMax | `MINIMAX_BASE_URL` |
433
471
  | Ollama | `OLLAMA_BASE_URL` |
package/docs/index.md CHANGED
@@ -48,7 +48,7 @@ summarize "https://example.com" --json --metrics detailed
48
48
 
49
49
  - **Real extraction.** Readability for articles, `markitdown` for files, Firecrawl as a fallback when sites fight back.
50
50
  - **Media-aware.** YouTube and podcast pages prefer published transcripts, then `yt-dlp` + Whisper, then optional ONNX models (Parakeet/Canary).
51
- - **Provider-agnostic models.** xAI, OpenAI, Google, Anthropic, NVIDIA, Z.AI, OpenRouter, GitHub Copilot, Ollama (local) — plus local CLI providers (Claude Code, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, Copilot CLI).
51
+ - **Provider-agnostic models.** xAI, OpenAI, Google, Anthropic, NVIDIA, Z.AI, OpenRouter, GitHub Copilot, Ollama (local) — plus local CLI providers (Claude Code, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, Copilot CLI, Antigravity, pi).
52
52
  - **Shaped output.** Streamed ANSI Markdown for terminals, plain text for pipes, JSON envelope for scripts, ANSI-stripped under `--no-color`.
53
53
  - **Slides for video.** `--slides` extracts scene-change keyframes and renders them inline (Kitty / iTerm) or saves them to disk.
54
54
  - **Stays local.** Optional daemon + Chrome Side Panel pair the CLI with the active tab. The daemon binds to `127.0.0.1` only and uses a shared bearer token.
package/docs/install.md CHANGED
@@ -6,13 +6,13 @@ summary: "Install the summarize CLI and optional media dependencies."
6
6
 
7
7
  # Install
8
8
 
9
- `summarize` ships as a single npm package and a Homebrew formula. The CLI works on its own; the Chrome Side Panel needs the local daemon (covered in [Chrome extension](chrome-extension.md)).
9
+ `summarize` ships as a single npm package and a Homebrew formula. The CLI works on its own. Chrome Browser mode also works without the local daemon; the daemon adds faster and broader media support.
10
10
 
11
11
  ## Requirements
12
12
 
13
13
  - Node **24 or newer**.
14
14
  - macOS, Linux, or Windows. Containers work too — see [Notes](#notes-windows-containers) below.
15
- - Optional: `ffmpeg`, `yt-dlp`, `tesseract` for media-heavy features.
15
+ - Optional: native `ffmpeg`, `yt-dlp`, `tesseract` for expanded media support.
16
16
 
17
17
  ## CLI
18
18
 
@@ -54,12 +54,12 @@ import { createLinkPreviewClient } from "@steipete/summarize-core/content";
54
54
 
55
55
  These unlock media features but are not required for plain web pages.
56
56
 
57
- | Tool | Required for |
58
- | ------------------------------ | ------------------------------------------------------------------------ |
59
- | `ffmpeg` | `--slides` extraction; many local media + transcription flows |
60
- | `yt-dlp` | YouTube slide extraction and some remote media flows |
61
- | `tesseract` | OCR text on extracted slides via `--slides-ocr` |
62
- | `whisper.cpp` (binary on PATH) | Local audio transcription fallback (preferred over cloud when available) |
57
+ | Tool | Required for |
58
+ | ------------------------------ | ------------------------------------------------------------------------- |
59
+ | `ffmpeg` | Faster extraction/transcoding and broader codecs than bundled WebAssembly |
60
+ | `yt-dlp` | YouTube slide extraction and some remote media flows |
61
+ | `tesseract` | OCR text on extracted slides via `--slides-ocr` |
62
+ | `whisper.cpp` (binary on PATH) | Local audio transcription fallback (preferred over cloud when available) |
63
63
 
64
64
  ### macOS
65
65
 
@@ -88,7 +88,9 @@ export OPENAI_API_KEY=...
88
88
  export FAL_KEY=...
89
89
  ```
90
90
 
91
- If `--slides` is enabled and `ffmpeg`/`yt-dlp` are missing, summarize logs a warning and continues without slides — it never fails the run.
91
+ 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. YouTube downloads still require `yt-dlp`.
92
+
93
+ Set `SUMMARIZE_DISABLE_FFMPEG_WASM=1` to disable the bundled fallback.
92
94
 
93
95
  ## Provider keys
94
96