@steipete/summarize 0.21.11 → 0.21.13

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 (193) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +1 -1
  3. package/dist/esm/application/environment-state.js +1 -1
  4. package/dist/esm/application/environment-state.js.map +1 -1
  5. package/dist/esm/application/environment.js +4 -1
  6. package/dist/esm/application/environment.js.map +1 -1
  7. package/dist/esm/application/execution-resources.js +3 -39
  8. package/dist/esm/application/execution-resources.js.map +1 -1
  9. package/dist/esm/application/flow-contexts.js +13 -75
  10. package/dist/esm/application/flow-contexts.js.map +1 -1
  11. package/dist/esm/application/model-runtime.js +10 -33
  12. package/dist/esm/application/model-runtime.js.map +1 -1
  13. package/dist/esm/application/model-selection.js +18 -0
  14. package/dist/esm/application/model-selection.js.map +1 -1
  15. package/dist/esm/application/run-spec.js +1 -1
  16. package/dist/esm/application/run-spec.js.map +1 -1
  17. package/dist/esm/application/url-runtime.js +1 -1
  18. package/dist/esm/application/url-runtime.js.map +1 -1
  19. package/dist/esm/cache.js +2 -16
  20. package/dist/esm/cache.js.map +1 -1
  21. package/dist/esm/config/env.js +1 -16
  22. package/dist/esm/config/env.js.map +1 -1
  23. package/dist/esm/config/legacy-api-keys.js +17 -0
  24. package/dist/esm/config/legacy-api-keys.js.map +1 -0
  25. package/dist/esm/config/model.js +1 -28
  26. package/dist/esm/config/model.js.map +1 -1
  27. package/dist/esm/config/parse-helpers.js +31 -12
  28. package/dist/esm/config/parse-helpers.js.map +1 -1
  29. package/dist/esm/config/sections.js +15 -78
  30. package/dist/esm/config/sections.js.map +1 -1
  31. package/dist/esm/config.js +15 -14
  32. package/dist/esm/config.js.map +1 -1
  33. package/dist/esm/content/asset.js +39 -3
  34. package/dist/esm/content/asset.js.map +1 -1
  35. package/dist/esm/daemon/agent.js +18 -40
  36. package/dist/esm/daemon/agent.js.map +1 -1
  37. package/dist/esm/daemon/command.js +22 -0
  38. package/dist/esm/daemon/command.js.map +1 -0
  39. package/dist/esm/daemon/launchd.js +2 -17
  40. package/dist/esm/daemon/launchd.js.map +1 -1
  41. package/dist/esm/daemon/schtasks.js +3 -26
  42. package/dist/esm/daemon/schtasks.js.map +1 -1
  43. package/dist/esm/daemon/server.js +2 -8
  44. package/dist/esm/daemon/server.js.map +1 -1
  45. package/dist/esm/daemon/systemd.js +2 -17
  46. package/dist/esm/daemon/systemd.js.map +1 -1
  47. package/dist/esm/engine/model-call.js +2 -38
  48. package/dist/esm/engine/model-call.js.map +1 -1
  49. package/dist/esm/engine/model-executor.js +152 -271
  50. package/dist/esm/engine/model-executor.js.map +1 -1
  51. package/dist/esm/engine/summary-timestamps.js +1 -35
  52. package/dist/esm/engine/summary-timestamps.js.map +1 -1
  53. package/dist/esm/engine/web-prompt.js +1 -51
  54. package/dist/esm/engine/web-prompt.js.map +1 -1
  55. package/dist/esm/llm/generate-text-shared.js +15 -0
  56. package/dist/esm/llm/generate-text-shared.js.map +1 -1
  57. package/dist/esm/llm/generate-text-stream.js +29 -96
  58. package/dist/esm/llm/generate-text-stream.js.map +1 -1
  59. package/dist/esm/llm/generate-text.js +12 -79
  60. package/dist/esm/llm/generate-text.js.map +1 -1
  61. package/dist/esm/llm/github-models.js +1 -1
  62. package/dist/esm/llm/github-models.js.map +1 -1
  63. package/dist/esm/llm/markdown-converters.js +90 -0
  64. package/dist/esm/llm/markdown-converters.js.map +1 -0
  65. package/dist/esm/llm/model-id.js +2 -12
  66. package/dist/esm/llm/model-id.js.map +1 -1
  67. package/dist/esm/llm/provider-capabilities.js +2 -1
  68. package/dist/esm/llm/provider-capabilities.js.map +1 -1
  69. package/dist/esm/llm/provider-profile.js +13 -208
  70. package/dist/esm/llm/provider-profile.js.map +1 -1
  71. package/dist/esm/llm/provider-registry.js +174 -0
  72. package/dist/esm/llm/provider-registry.js.map +1 -0
  73. package/dist/esm/llm/providers/models.js +1 -1
  74. package/dist/esm/llm/providers/models.js.map +1 -1
  75. package/dist/esm/llm/providers/openai/chat-completions.js +31 -70
  76. package/dist/esm/llm/providers/openai/chat-completions.js.map +1 -1
  77. package/dist/esm/llm/providers/openai/responses.js +34 -92
  78. package/dist/esm/llm/providers/openai/responses.js.map +1 -1
  79. package/dist/esm/llm/providers/openai/sse.js +25 -1
  80. package/dist/esm/llm/providers/openai/sse.js.map +1 -1
  81. package/dist/esm/llm/providers/openai/transport.js +44 -1
  82. package/dist/esm/llm/providers/openai/transport.js.map +1 -1
  83. package/dist/esm/model-auto-cli.js +1 -17
  84. package/dist/esm/model-auto-cli.js.map +1 -1
  85. package/dist/esm/model-spec.js +28 -108
  86. package/dist/esm/model-spec.js.map +1 -1
  87. package/dist/esm/run/flows/asset/content.js +42 -0
  88. package/dist/esm/run/flows/asset/content.js.map +1 -0
  89. package/dist/esm/run/flows/asset/extract.js +4 -34
  90. package/dist/esm/run/flows/asset/extract.js.map +1 -1
  91. package/dist/esm/run/flows/asset/preprocess.js +66 -141
  92. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  93. package/dist/esm/run/flows/asset/summary.js +0 -11
  94. package/dist/esm/run/flows/asset/summary.js.map +1 -1
  95. package/dist/esm/run/flows/url/markdown.js +7 -7
  96. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  97. package/dist/esm/run/flows/url/summary.js.map +1 -1
  98. package/dist/esm/run/logging.js +2 -13
  99. package/dist/esm/run/logging.js.map +1 -1
  100. package/dist/esm/run/slides-cli.js +1 -12
  101. package/dist/esm/run/slides-cli.js.map +1 -1
  102. package/dist/esm/slides/download.js +115 -145
  103. package/dist/esm/slides/download.js.map +1 -1
  104. package/dist/esm/slides/extract-finalize.js +3 -0
  105. package/dist/esm/slides/extract-finalize.js.map +1 -1
  106. package/dist/esm/slides/extract.js +2 -10
  107. package/dist/esm/slides/extract.js.map +1 -1
  108. package/dist/esm/slides/frame-extraction.js +1 -2
  109. package/dist/esm/slides/frame-extraction.js.map +1 -1
  110. package/dist/esm/slides/ingest.js +38 -129
  111. package/dist/esm/slides/ingest.js.map +1 -1
  112. package/dist/esm/slides/ocr.js +7 -51
  113. package/dist/esm/slides/ocr.js.map +1 -1
  114. package/dist/esm/slides/process.js +65 -162
  115. package/dist/esm/slides/process.js.map +1 -1
  116. package/dist/esm/slides/scene-detection.js +2 -2
  117. package/dist/esm/slides/scene-detection.js.map +1 -1
  118. package/dist/esm/slides/store.js +3 -0
  119. package/dist/esm/slides/store.js.map +1 -1
  120. package/dist/esm/slides/types.js +1 -1
  121. package/dist/esm/slides/types.js.map +1 -1
  122. package/dist/esm/version.js +1 -1
  123. package/dist/types/application/environment-state.d.ts +2 -34
  124. package/dist/types/application/environment.d.ts +1 -1
  125. package/dist/types/application/execution-resources.d.ts +4 -34
  126. package/dist/types/application/flow-contexts.d.ts +3 -3
  127. package/dist/types/application/model-runtime.d.ts +17 -35
  128. package/dist/types/application/model-selection.d.ts +16 -0
  129. package/dist/types/application/run-spec.d.ts +1 -1
  130. package/dist/types/cache.d.ts +1 -1
  131. package/dist/types/config/legacy-api-keys.d.ts +16 -0
  132. package/dist/types/config/parse-helpers.d.ts +2 -0
  133. package/dist/types/config/types.d.ts +6 -34
  134. package/dist/types/daemon/agent-model.d.ts +1 -2
  135. package/dist/types/daemon/agent.d.ts +6 -13
  136. package/dist/types/daemon/command.d.ts +8 -0
  137. package/dist/types/engine/model-call.d.ts +0 -40
  138. package/dist/types/engine/model-executor.d.ts +2 -8
  139. package/dist/types/engine/model-meta.d.ts +1 -1
  140. package/dist/types/llm/generate-text-shared.d.ts +6 -0
  141. package/dist/types/llm/generate-text-stream.d.ts +2 -17
  142. package/dist/types/llm/generate-text-types.d.ts +17 -0
  143. package/dist/types/llm/generate-text.d.ts +7 -41
  144. package/dist/types/llm/github-models.d.ts +1 -1
  145. package/dist/types/llm/markdown-converters.d.ts +24 -0
  146. package/dist/types/llm/model-id.d.ts +2 -1
  147. package/dist/types/llm/provider-capabilities.d.ts +4 -2
  148. package/dist/types/llm/provider-profile.d.ts +3 -32
  149. package/dist/types/llm/provider-registry.d.ts +172 -0
  150. package/dist/types/llm/providers/openai/chat-completions.d.ts +2 -2
  151. package/dist/types/llm/providers/openai/responses.d.ts +5 -3
  152. package/dist/types/llm/providers/openai/sse.d.ts +5 -4
  153. package/dist/types/llm/providers/openai/transport.d.ts +18 -1
  154. package/dist/types/model-spec.d.ts +3 -2
  155. package/dist/types/run/flows/asset/content.d.ts +16 -0
  156. package/dist/types/run/flows/asset/extract.d.ts +2 -6
  157. package/dist/types/run/flows/asset/preprocess.d.ts +2 -6
  158. package/dist/types/run/flows/asset/summary-attempts.d.ts +1 -1
  159. package/dist/types/run/flows/asset/summary.d.ts +1 -2
  160. package/dist/types/run/flows/asset/types.d.ts +0 -9
  161. package/dist/types/run/flows/url/markdown.d.ts +1 -1
  162. package/dist/types/run/flows/url/summary.d.ts +6 -2
  163. package/dist/types/run/logging.d.ts +2 -6
  164. package/dist/types/slides/extract-finalize.d.ts +1 -1
  165. package/dist/types/slides/ingest.d.ts +5 -31
  166. package/dist/types/slides/process.d.ts +11 -16
  167. package/dist/types/slides/store.d.ts +1 -1
  168. package/dist/types/slides/types.d.ts +2 -0
  169. package/dist/types/version.d.ts +1 -1
  170. package/docs/agent.md +7 -1
  171. package/docs/cache.md +1 -0
  172. package/docs/chrome-extension.md +8 -0
  173. package/docs/cli.md +2 -0
  174. package/docs/commands/slides.md +1 -1
  175. package/docs/engine.md +13 -1
  176. package/docs/llm.md +1 -0
  177. package/docs/manual-tests.md +4 -0
  178. package/docs/media.md +3 -0
  179. package/docs/model-provider-resolution.md +7 -3
  180. package/docs/releasing.md +4 -4
  181. package/docs/slides-rendering-flow.md +14 -0
  182. package/docs/slides.md +17 -61
  183. package/docs/transcript-provider-flow.md +6 -0
  184. package/package.json +14 -14
  185. package/dist/esm/daemon/chat.js +0 -127
  186. package/dist/esm/daemon/chat.js.map +0 -1
  187. package/dist/esm/llm/html-to-markdown.js +0 -53
  188. package/dist/esm/llm/html-to-markdown.js.map +0 -1
  189. package/dist/esm/llm/transcript-to-markdown.js +0 -62
  190. package/dist/esm/llm/transcript-to-markdown.js.map +0 -1
  191. package/dist/types/daemon/chat.d.ts +0 -29
  192. package/dist/types/llm/html-to-markdown.d.ts +0 -33
  193. package/dist/types/llm/transcript-to-markdown.d.ts +0 -40
@@ -0,0 +1,172 @@
1
+ export declare const GITHUB_MODELS_BASE_URL = "https://models.github.ai/inference";
2
+ export type ProviderExecution = "simple" | "google" | "anthropic" | "openai-http" | "openai-compatible";
3
+ export type GatewayProviderProfile = {
4
+ requiredEnv: GatewayRequiredModelEnv;
5
+ execution: ProviderExecution;
6
+ supportsDocuments: boolean;
7
+ supportsStreaming: boolean;
8
+ supportsVideoUnderstanding: boolean;
9
+ defaultBaseUrl?: string;
10
+ forceChatCompletions?: boolean;
11
+ };
12
+ export declare const DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434/v1";
13
+ export declare const DEFAULT_MINIMAX_BASE_URL = "https://api.minimax.io/v1";
14
+ export declare const GATEWAY_PROVIDER_PROFILES: {
15
+ readonly xai: {
16
+ readonly requiredEnv: "XAI_API_KEY";
17
+ readonly execution: "simple";
18
+ readonly supportsDocuments: false;
19
+ readonly supportsStreaming: true;
20
+ readonly supportsVideoUnderstanding: false;
21
+ };
22
+ readonly openai: {
23
+ readonly requiredEnv: "OPENAI_API_KEY";
24
+ readonly execution: "openai-http";
25
+ readonly supportsDocuments: true;
26
+ readonly supportsStreaming: true;
27
+ readonly supportsVideoUnderstanding: false;
28
+ };
29
+ readonly google: {
30
+ readonly requiredEnv: "GEMINI_API_KEY";
31
+ readonly execution: "google";
32
+ readonly supportsDocuments: true;
33
+ readonly supportsStreaming: true;
34
+ readonly supportsVideoUnderstanding: true;
35
+ };
36
+ readonly anthropic: {
37
+ readonly requiredEnv: "ANTHROPIC_API_KEY";
38
+ readonly execution: "anthropic";
39
+ readonly supportsDocuments: true;
40
+ readonly supportsStreaming: true;
41
+ readonly supportsVideoUnderstanding: false;
42
+ };
43
+ readonly zai: {
44
+ readonly requiredEnv: "Z_AI_API_KEY";
45
+ readonly execution: "openai-compatible";
46
+ readonly supportsDocuments: false;
47
+ readonly supportsStreaming: true;
48
+ readonly supportsVideoUnderstanding: false;
49
+ readonly defaultBaseUrl: "https://api.z.ai/api/paas/v4";
50
+ readonly forceChatCompletions: true;
51
+ };
52
+ readonly nvidia: {
53
+ readonly requiredEnv: "NVIDIA_API_KEY";
54
+ readonly execution: "openai-compatible";
55
+ readonly supportsDocuments: false;
56
+ readonly supportsStreaming: true;
57
+ readonly supportsVideoUnderstanding: false;
58
+ readonly defaultBaseUrl: "https://integrate.api.nvidia.com/v1";
59
+ readonly forceChatCompletions: true;
60
+ };
61
+ readonly minimax: {
62
+ readonly requiredEnv: "MINIMAX_API_KEY";
63
+ readonly execution: "openai-compatible";
64
+ readonly supportsDocuments: false;
65
+ readonly supportsStreaming: true;
66
+ readonly supportsVideoUnderstanding: false;
67
+ readonly defaultBaseUrl: "https://api.minimax.io/v1";
68
+ readonly forceChatCompletions: true;
69
+ };
70
+ readonly "github-copilot": {
71
+ readonly requiredEnv: "GITHUB_TOKEN";
72
+ readonly execution: "openai-http";
73
+ readonly supportsDocuments: false;
74
+ readonly supportsStreaming: true;
75
+ readonly supportsVideoUnderstanding: false;
76
+ readonly defaultBaseUrl: "https://models.github.ai/inference";
77
+ readonly forceChatCompletions: true;
78
+ };
79
+ readonly ollama: {
80
+ readonly requiredEnv: "OLLAMA_BASE_URL";
81
+ readonly execution: "openai-compatible";
82
+ readonly supportsDocuments: false;
83
+ readonly supportsStreaming: true;
84
+ readonly supportsVideoUnderstanding: false;
85
+ readonly defaultBaseUrl: "http://localhost:11434/v1";
86
+ readonly forceChatCompletions: true;
87
+ };
88
+ };
89
+ export type CliProviderProfile = {
90
+ requiredEnv: CliRequiredModelEnv;
91
+ defaultModel: string | null;
92
+ missingBinaryLabel: string;
93
+ installLabel: string;
94
+ pathEnv: string;
95
+ };
96
+ export declare const CLI_PROVIDER_PROFILES: {
97
+ readonly claude: {
98
+ readonly requiredEnv: "CLI_CLAUDE";
99
+ readonly defaultModel: "sonnet";
100
+ readonly missingBinaryLabel: "Claude CLI";
101
+ readonly installLabel: "Claude CLI";
102
+ readonly pathEnv: "CLAUDE_PATH";
103
+ };
104
+ readonly codex: {
105
+ readonly requiredEnv: "CLI_CODEX";
106
+ readonly defaultModel: null;
107
+ readonly missingBinaryLabel: "Codex CLI";
108
+ readonly installLabel: "Codex CLI";
109
+ readonly pathEnv: "CODEX_PATH";
110
+ };
111
+ readonly gemini: {
112
+ readonly requiredEnv: "CLI_GEMINI";
113
+ readonly defaultModel: "flash";
114
+ readonly missingBinaryLabel: "Gemini CLI";
115
+ readonly installLabel: "Gemini CLI";
116
+ readonly pathEnv: "GEMINI_PATH";
117
+ };
118
+ readonly agent: {
119
+ readonly requiredEnv: "CLI_AGENT";
120
+ readonly defaultModel: "auto";
121
+ readonly missingBinaryLabel: "Cursor Agent CLI";
122
+ readonly installLabel: "Cursor CLI";
123
+ readonly pathEnv: "AGENT_PATH";
124
+ };
125
+ readonly openclaw: {
126
+ readonly requiredEnv: "CLI_OPENCLAW";
127
+ readonly defaultModel: "main";
128
+ readonly missingBinaryLabel: "OpenClaw CLI";
129
+ readonly installLabel: "OpenClaw CLI";
130
+ readonly pathEnv: "OPENCLAW_PATH";
131
+ };
132
+ readonly opencode: {
133
+ readonly requiredEnv: "CLI_OPENCODE";
134
+ readonly defaultModel: null;
135
+ readonly missingBinaryLabel: "OpenCode CLI";
136
+ readonly installLabel: "OpenCode CLI";
137
+ readonly pathEnv: "OPENCODE_PATH";
138
+ };
139
+ readonly copilot: {
140
+ readonly requiredEnv: "CLI_COPILOT";
141
+ readonly defaultModel: null;
142
+ readonly missingBinaryLabel: "GitHub Copilot CLI";
143
+ readonly installLabel: "Copilot CLI";
144
+ readonly pathEnv: "COPILOT_PATH";
145
+ };
146
+ readonly agy: {
147
+ readonly requiredEnv: "CLI_AGY";
148
+ readonly defaultModel: null;
149
+ readonly missingBinaryLabel: "Antigravity CLI";
150
+ readonly installLabel: "agy";
151
+ readonly pathEnv: "AGY_PATH";
152
+ };
153
+ readonly pi: {
154
+ readonly requiredEnv: "CLI_PI";
155
+ readonly defaultModel: null;
156
+ readonly missingBinaryLabel: "pi CLI";
157
+ readonly installLabel: "pi";
158
+ readonly pathEnv: "PI_PATH";
159
+ };
160
+ };
161
+ export type GatewayProvider = keyof typeof GATEWAY_PROVIDER_PROFILES;
162
+ export type CliProvider = keyof typeof CLI_PROVIDER_PROFILES;
163
+ export type GatewayRequiredModelEnv = (typeof GATEWAY_PROVIDER_PROFILES)[GatewayProvider]["requiredEnv"];
164
+ export type CliRequiredModelEnv = (typeof CLI_PROVIDER_PROFILES)[CliProvider]["requiredEnv"];
165
+ export type RequiredModelEnv = GatewayRequiredModelEnv | CliRequiredModelEnv | "OPENROUTER_API_KEY";
166
+ export declare const CLI_PROVIDERS: CliProvider[];
167
+ export declare const DEFAULT_CLI_MODELS: Record<CliProvider, string | null>;
168
+ export declare const DEFAULT_AUTO_CLI_ORDER: CliProvider[];
169
+ export declare function parseCliProviderName(raw: string): CliProvider | null;
170
+ export declare function getCliProviderProfile(provider: CliProvider): CliProviderProfile;
171
+ export declare function isGatewayProvider(provider: string): provider is GatewayProvider;
172
+ export declare function getGatewayProviderProfile(provider: GatewayProvider): GatewayProviderProfile;
@@ -1,3 +1,3 @@
1
1
  import type { OpenAiTextCompletionResult, OpenAiTextRequest, OpenAiTextStreamResult } from "./types.js";
2
- export declare function completeOpenAiChatText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, fetchImpl, }: OpenAiTextRequest): Promise<OpenAiTextCompletionResult>;
3
- export declare function streamOpenAiChatText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, fetchImpl, }: OpenAiTextRequest): Promise<OpenAiTextStreamResult>;
2
+ export declare function completeOpenAiChatText(request: OpenAiTextRequest): Promise<OpenAiTextCompletionResult>;
3
+ export declare function streamOpenAiChatText(request: OpenAiTextRequest): Promise<OpenAiTextStreamResult>;
@@ -2,10 +2,11 @@ import type { Attachment } from "../../attachments.js";
2
2
  import type { LlmTokenUsage } from "../../types.js";
3
3
  import type { OpenAiClientConfig } from "../types.js";
4
4
  import type { OpenAiStructuredOutput, OpenAiTextCompletionResult, OpenAiTextRequest, OpenAiTextStreamResult } from "./types.js";
5
- export declare function completeOpenAiResponsesText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, fetchImpl, structuredOutput, }: OpenAiTextRequest & {
5
+ type ResponsesTextRequest = OpenAiTextRequest & {
6
6
  structuredOutput?: OpenAiStructuredOutput;
7
- }): Promise<OpenAiTextCompletionResult>;
8
- export declare function streamOpenAiResponsesText({ modelId, openaiConfig, context, temperature, maxOutputTokens, signal, fetchImpl, }: OpenAiTextRequest): Promise<OpenAiTextStreamResult>;
7
+ };
8
+ export declare function completeOpenAiResponsesText(request: ResponsesTextRequest): Promise<OpenAiTextCompletionResult>;
9
+ export declare function streamOpenAiResponsesText(request: OpenAiTextRequest): Promise<OpenAiTextStreamResult>;
9
10
  export declare function completeOpenAiDocument({ modelId, openaiConfig, promptText, document, maxOutputTokens, temperature, timeoutMs, fetchImpl, }: {
10
11
  modelId: string;
11
12
  openaiConfig: OpenAiClientConfig;
@@ -19,3 +20,4 @@ export declare function completeOpenAiDocument({ modelId, openaiConfig, promptTe
19
20
  text: string;
20
21
  usage: LlmTokenUsage | null;
21
22
  }>;
23
+ export {};
@@ -1,7 +1,8 @@
1
1
  import type { LlmTokenUsage } from "../../types.js";
2
+ import type { OpenAiTextStreamResult } from "./types.js";
3
+ export declare function createOpenAiTextStream(response: Response, modelId: string, readEvent: (event: Record<string, unknown>) => {
4
+ text?: string;
5
+ usage?: LlmTokenUsage | null;
6
+ } | null): OpenAiTextStreamResult;
2
7
  export declare function parseOpenAiSseJsonStream(body: ReadableStream<Uint8Array>): AsyncGenerator<Record<string, unknown>>;
3
8
  export declare function createOpenAiSseError(event: Record<string, unknown>): Error;
4
- export declare function createDeferredUsage(): {
5
- promise: Promise<LlmTokenUsage | null>;
6
- resolve: (value: LlmTokenUsage | null) => void;
7
- };
@@ -1,18 +1,34 @@
1
1
  import type { Context } from "@earendil-works/pi-ai";
2
2
  import type { OpenAiClientConfig } from "../types.js";
3
+ import type { OpenAiTextCompletionResult, OpenAiTextRequest } from "./types.js";
4
+ export declare function postOpenAiJson({ openaiConfig, fetchImpl, signal, }: Pick<OpenAiTextRequest, "openaiConfig" | "fetchImpl" | "signal">, url: URL, payload: Record<string, unknown>, headers?: Record<string, string>): Promise<Response>;
5
+ export declare function readOpenAiCompletion<Payload>(response: Response, modelId: string, extractText: (payload: Payload) => string): Promise<OpenAiTextCompletionResult>;
3
6
  export declare function isGitHubModelsBaseUrl(baseUrl: string | undefined): boolean;
4
7
  export declare function isApiOpenAiBaseUrl(baseUrl: string | undefined): boolean;
5
8
  export declare function resolveOpenAiResponsesUrl(baseUrl: string): URL;
6
9
  export declare function resolveOpenAiChatCompletionsUrl(baseUrl: string): URL;
10
+ type ChatContentPart = {
11
+ type: "text";
12
+ text: string;
13
+ } | {
14
+ type: "image_url";
15
+ image_url: {
16
+ url: string;
17
+ };
18
+ };
7
19
  export declare function contextToChatCompletionMessages(context: Context): Array<{
8
20
  role: string;
9
- content: string;
21
+ content: string | ChatContentPart[];
10
22
  }>;
11
23
  export declare function contextToResponsesInput(context: Context): Array<{
12
24
  role: string;
13
25
  content: Array<{
14
26
  type: "input_text";
15
27
  text: string;
28
+ } | {
29
+ type: "input_image";
30
+ image_url: string;
31
+ detail: "auto";
16
32
  }>;
17
33
  }>;
18
34
  export declare function buildOpenAiRequestHeaders(openaiConfig: OpenAiClientConfig): Record<string, string>;
@@ -21,3 +37,4 @@ export declare function createOpenAiHttpError({ baseUrl, status, bodyText, }: {
21
37
  status: number;
22
38
  bodyText: string;
23
39
  }): Error;
40
+ export {};
@@ -1,6 +1,7 @@
1
1
  import type { CliProvider } from "./config.js";
2
2
  import type { LlmProvider } from "./llm/model-id.js";
3
3
  import type { ModelRequestOptions } from "./llm/model-options.js";
4
+ import { type CliRequiredModelEnv, type GatewayRequiredModelEnv } from "./llm/provider-registry.js";
4
5
  export type FixedModelSpec = {
5
6
  transport: "native";
6
7
  userModelId: string;
@@ -8,7 +9,7 @@ export type FixedModelSpec = {
8
9
  provider: LlmProvider;
9
10
  openrouterProviders: string[] | null;
10
11
  forceOpenRouter: false;
11
- requiredEnv: "XAI_API_KEY" | "OPENAI_API_KEY" | "GEMINI_API_KEY" | "ANTHROPIC_API_KEY" | "Z_AI_API_KEY" | "NVIDIA_API_KEY" | "MINIMAX_API_KEY" | "GITHUB_TOKEN" | "OLLAMA_BASE_URL";
12
+ requiredEnv: GatewayRequiredModelEnv;
12
13
  openaiBaseUrlOverride?: string | null;
13
14
  forceChatCompletions?: boolean;
14
15
  requestOptions?: ModelRequestOptions;
@@ -27,7 +28,7 @@ export type FixedModelSpec = {
27
28
  llmModelId: null;
28
29
  openrouterProviders: null;
29
30
  forceOpenRouter: false;
30
- requiredEnv: "CLI_CLAUDE" | "CLI_CODEX" | "CLI_GEMINI" | "CLI_AGENT" | "CLI_OPENCLAW" | "CLI_OPENCODE" | "CLI_COPILOT" | "CLI_AGY" | "CLI_PI";
31
+ requiredEnv: CliRequiredModelEnv;
31
32
  cliProvider: CliProvider;
32
33
  cliModel: string | null;
33
34
  };
@@ -0,0 +1,16 @@
1
+ import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
2
+ import { type AssetAttachment } from "../../attachments.js";
3
+ export type AssetConversionContext = {
4
+ env: Record<string, string | undefined>;
5
+ envForRun: Record<string, string | undefined>;
6
+ execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]["execFileImpl"];
7
+ timeoutMs: number;
8
+ };
9
+ export declare function readAssetText(attachment: AssetAttachment): {
10
+ content: string;
11
+ bytes: number;
12
+ } | null;
13
+ export declare function convertAssetToMarkdown(ctx: AssetConversionContext, attachment: AssetAttachment, bytes: Uint8Array): Promise<{
14
+ markdown: string;
15
+ usedOcr: boolean;
16
+ }>;
@@ -1,11 +1,7 @@
1
- import type { ExecFileFn } from "../../../markitdown.js";
2
1
  import { type AssetAttachment } from "../../attachments.js";
3
2
  import type { ExtractDiagnosticsForFinishLine } from "../../finish-line.js";
4
- export type AssetExtractContext = {
5
- env: Record<string, string | undefined>;
6
- envForRun: Record<string, string | undefined>;
7
- execFileImpl: ExecFileFn;
8
- timeoutMs: number;
3
+ import { type AssetConversionContext } from "./content.js";
4
+ export type AssetExtractContext = AssetConversionContext & {
9
5
  preprocessMode: "off" | "auto" | "always";
10
6
  };
11
7
  export type AssetExtractResult = {
@@ -1,14 +1,10 @@
1
1
  import type { SummaryLength } from "@steipete/summarize-core";
2
2
  import type { OutputLanguage } from "../../../language.js";
3
3
  import type { Attachment } from "../../../llm/attachments.js";
4
- import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
5
4
  import type { FixedModelSpec } from "../../../model-spec.js";
6
5
  import { type AssetAttachment } from "../../attachments.js";
7
- export type AssetPreprocessContext = {
8
- env: Record<string, string | undefined>;
9
- envForRun: Record<string, string | undefined>;
10
- execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]["execFileImpl"];
11
- timeoutMs: number;
6
+ import { type AssetConversionContext } from "./content.js";
7
+ export type AssetPreprocessContext = AssetConversionContext & {
12
8
  preprocessMode: "off" | "auto" | "always";
13
9
  format: "text" | "markdown";
14
10
  lengthArg: {
@@ -24,5 +24,5 @@ export declare function buildAssetCliContext({ ctx, args, attempts, attachmentsC
24
24
  promptOverride: string;
25
25
  allowTools: boolean;
26
26
  cwd: string | undefined;
27
- extraArgsByProvider: Partial<Record<CliProvider, string[]>>;
27
+ extraArgsByProvider: Partial<Record<"agent" | "agy" | "claude" | "codex" | "copilot" | "gemini" | "openclaw" | "opencode" | "pi", string[]>>;
28
28
  } | null>;
@@ -1,5 +1,4 @@
1
- import type { AssetSummaryContext, AssetSummaryContextInput, AssetSummaryResult, PresentAssetSummaryArgs, SummarizeAssetArgs } from "./types.js";
1
+ import type { AssetSummaryContext, AssetSummaryResult, PresentAssetSummaryArgs, SummarizeAssetArgs } from "./types.js";
2
2
  export declare function presentAssetSummary(ctx: AssetSummaryContext, args: PresentAssetSummaryArgs, result: AssetSummaryResult): Promise<void>;
3
- export declare function createAssetSummaryContext(input: AssetSummaryContextInput): AssetSummaryContext;
4
3
  export declare function executeAssetSummary(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
5
4
  export declare function summarizeAsset(ctx: AssetSummaryContext, args: SummarizeAssetArgs): Promise<AssetSummaryResult>;
@@ -78,15 +78,6 @@ export type AssetSummaryContext = {
78
78
  mediaCache: MediaCache | null;
79
79
  apiStatus: RunApiStatus;
80
80
  };
81
- export type AssetSummaryContextInput = {
82
- io: Pick<AssetSummaryContext, "env" | "envForRun" | "stdout" | "stderr" | "execFileImpl" | "trackedFetch">;
83
- summary: Pick<AssetSummaryContext, "timeoutMs" | "preprocessMode" | "format" | "extractMode" | "lengthArg" | "forceSummary" | "outputLanguage" | "videoMode" | "transcriptTimestamps" | "transcriptDiarization" | "speakerIdentification" | "configPath" | "promptOverride" | "lengthInstruction" | "languageInstruction" | "maxOutputTokensArg" | "summaryCacheBypass">;
84
- model: Pick<AssetSummaryContext, "fixedModelSpec" | "isFallbackModel" | "isImplicitAutoSelection" | "allowAutoCliFallback" | "desiredOutputTokens" | "envForAuto" | "configForModelSelection" | "cliAvailability" | "requestedModel" | "requestedModelInput" | "requestedModelLabel" | "wantsFreeNamedModel" | "isNamedModelSelection" | "summaryEngine" | "summaryStream" | "getLiteLlmCatalog" | "llmCalls">;
85
- output: Pick<AssetSummaryContext, "json" | "metricsEnabled" | "metricsDetailed" | "shouldComputeReport" | "runStartedAtMs" | "verbose" | "verboseColor" | "streamingEnabled" | "plain">;
86
- hooks: Pick<AssetSummaryContext, "writeViaFooter" | "clearProgressForStdout" | "restoreProgressAfterStdout" | "buildReport" | "estimateCostUsd" | "onSummaryCached">;
87
- cache: Pick<AssetSummaryContext, "cache" | "mediaCache">;
88
- apiStatus: AssetSummaryContext["apiStatus"];
89
- };
90
81
  export type SummarizeAssetArgs = {
91
82
  sourceKind: "file" | "asset-url";
92
83
  sourceLabel: string;
@@ -1,5 +1,5 @@
1
1
  import type { ModelAttempt } from "../../../engine/types.js";
2
- import { type ConvertTranscriptToMarkdown } from "../../../llm/transcript-to-markdown.js";
2
+ import { type ConvertTranscriptToMarkdown } from "../../../llm/markdown-converters.js";
3
3
  import type { UrlFlowContext } from "./types.js";
4
4
  export type MarkdownModel = ModelAttempt & {
5
5
  transport: "native" | "openrouter";
@@ -4,7 +4,8 @@ import { type UrlSummaryResolution } from "../../../engine/web-summary.js";
4
4
  import type { UrlExtractionUi } from "./extract.js";
5
5
  import type { SlidesTerminalOutput } from "./slides-output.js";
6
6
  import type { UrlFlowContext } from "./types.js";
7
- export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, slides, slidesOutput, }: {
7
+ type SlidesResult = Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>>;
8
+ type ExtractedUrlOutputArgs = {
8
9
  ctx: UrlFlowContext;
9
10
  url: string;
10
11
  extracted: ExtractedLinkContent;
@@ -12,7 +13,9 @@ export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi,
12
13
  prompt: string;
13
14
  effectiveMarkdownMode: "off" | "auto" | "llm" | "readability";
14
15
  transcriptionCostLabel: string | null;
15
- slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
16
+ slides?: SlidesResult | null;
17
+ };
18
+ export declare function outputExtractedUrl({ ctx, url, extracted, extractionUi, prompt, effectiveMarkdownMode, transcriptionCostLabel, slides, slidesOutput, }: ExtractedUrlOutputArgs & {
16
19
  slidesOutput?: SlidesTerminalOutput | null;
17
20
  }): Promise<void>;
18
21
  export declare function executeExtractedUrlSummary({ ctx, url, extracted, prompt, onModelChosen, slides, slidesOutput, }: {
@@ -36,3 +39,4 @@ export declare function presentExtractedUrlSummary({ ctx, url, extracted, extrac
36
39
  slides?: Awaited<ReturnType<typeof import("../../../slides/index.js").extractSlidesForSource>> | null;
37
40
  slidesOutput?: SlidesTerminalOutput | null;
38
41
  }): Promise<void>;
42
+ export {};
@@ -1,3 +1,4 @@
1
+ import { formatLlmRetryNotice } from "../llm/generate-text-shared.js";
1
2
  export declare function writeVerbose(stderr: NodeJS.WritableStream, verbose: boolean, message: string, color: boolean, env?: Record<string, string | undefined>): void;
2
3
  export declare function createRetryLogger({ stderr, verbose, color, modelId, env, }: {
3
4
  stderr: NodeJS.WritableStream;
@@ -5,9 +6,4 @@ export declare function createRetryLogger({ stderr, verbose, color, modelId, env
5
6
  color: boolean;
6
7
  modelId: string;
7
8
  env?: Record<string, string | undefined>;
8
- }): (notice: {
9
- attempt: number;
10
- maxRetries: number;
11
- delayMs: number;
12
- error?: unknown;
13
- }) => void;
9
+ }): (notice: Parameters<typeof formatLlmRetryNotice>[1]) => void;
@@ -1,4 +1,4 @@
1
- import type { SlideAutoTune, SlideExtractionResult, SlideImage, SlideSource, SlideSourceKind } from "./types.js";
1
+ import { type SlideAutoTune, type SlideExtractionResult, type SlideImage, type SlideSource, type SlideSourceKind } from "./types.js";
2
2
  export declare const SLIDES_PROGRESS: {
3
3
  readonly PREPARE: 2;
4
4
  readonly FETCH_VIDEO: 6;
@@ -1,7 +1,8 @@
1
1
  import type { MediaCache } from "../content/index.js";
2
+ import type * as downloads from "./download.js";
2
3
  import type { SlideSource } from "./types.js";
3
4
  export type SlidesIngestProgress = (label: string, percent: number, detail?: string) => void;
4
- export declare function prepareSlidesInput({ source, mediaCache, timeoutMs, fetchImpl, ytDlpPath, allowRemoteUrlFallback, ytDlpCookiesFromBrowser, resolveSlidesYtDlpExtractFormat, resolveSlidesStreamFallback, buildSlidesMediaCacheKey, formatBytes, reportSlidesProgress, logSlidesTiming, downloadYoutubeVideo, downloadRemoteVideo, resolveYoutubeStreamUrl, }: {
5
+ export declare function prepareSlidesInput({ source, mediaCache, timeoutMs, fetchImpl, ytDlpPath, allowRemoteUrlFallback, ytDlpCookiesFromBrowser, resolveSlidesYtDlpExtractFormat, resolveSlidesStreamFallback, reportSlidesProgress, logSlidesTiming, downloadYoutubeVideo, downloadRemoteVideo, resolveYoutubeStreamUrl, }: {
5
6
  source: SlideSource;
6
7
  mediaCache: MediaCache | null;
7
8
  timeoutMs: number;
@@ -11,40 +12,13 @@ export declare function prepareSlidesInput({ source, mediaCache, timeoutMs, fetc
11
12
  ytDlpCookiesFromBrowser?: string | null;
12
13
  resolveSlidesYtDlpExtractFormat: () => string;
13
14
  resolveSlidesStreamFallback: () => boolean;
14
- buildSlidesMediaCacheKey: (url: string) => string;
15
- formatBytes: (bytes: number) => string;
16
15
  reportSlidesProgress?: SlidesIngestProgress | null;
17
16
  logSlidesTiming?: ((label: string, startedAt: number) => number) | null;
18
- downloadYoutubeVideo: (args: {
19
- ytDlpPath: string;
20
- url: string;
21
- timeoutMs: number;
22
- format: string;
23
- cookiesFromBrowser?: string | null;
24
- onProgress?: ((percent: number, detail?: string) => void) | null;
25
- }) => Promise<{
26
- filePath: string;
27
- cleanup: () => Promise<void>;
28
- }>;
29
- downloadRemoteVideo: (args: {
30
- url: string;
31
- timeoutMs: number;
32
- fetchImpl?: typeof fetch;
33
- onProgress?: ((percent: number, detail?: string) => void) | null;
34
- }) => Promise<{
35
- filePath: string;
36
- cleanup: () => Promise<void>;
37
- }>;
38
- resolveYoutubeStreamUrl: (args: {
39
- ytDlpPath: string;
40
- url: string;
41
- timeoutMs: number;
42
- format: string;
43
- cookiesFromBrowser?: string | null;
44
- }) => Promise<string>;
17
+ downloadYoutubeVideo: typeof downloads.downloadYoutubeVideo;
18
+ downloadRemoteVideo: typeof downloads.downloadRemoteVideo;
19
+ resolveYoutubeStreamUrl: typeof downloads.resolveYoutubeStreamUrl;
45
20
  }): Promise<{
46
21
  inputPath: string;
47
22
  inputCleanup: (() => Promise<void>) | null;
48
- cachedMedia: Awaited<ReturnType<NonNullable<MediaCache>["get"]>> | null;
49
23
  warnings: string[];
50
24
  }>;
@@ -4,24 +4,19 @@ export type ProcessCommand = string | {
4
4
  argsPrefix?: string[];
5
5
  source?: "wasm";
6
6
  };
7
- export declare function runProcess({ command, args, timeoutMs, errorLabel, onStderrLine, onStdoutLine, }: {
7
+ type ProcessOptions = {
8
8
  command: ProcessCommand;
9
9
  args: string[];
10
10
  timeoutMs: number;
11
11
  errorLabel: string;
12
- onStderrLine?: (line: string, handle: ProcessHandle | null) => void;
13
- onStdoutLine?: (line: string, handle: ProcessHandle | null) => void;
14
- }): Promise<void>;
15
- export declare function runProcessCapture({ command, args, timeoutMs, errorLabel, }: {
16
- command: ProcessCommand;
17
- args: string[];
18
- timeoutMs: number;
19
- errorLabel: string;
20
- }): Promise<string>;
21
- export declare function runProcessCaptureBuffer({ command, args, timeoutMs, errorLabel, }: {
22
- command: ProcessCommand;
23
- args: string[];
24
- timeoutMs: number;
25
- errorLabel: string;
26
- }): Promise<Buffer>;
12
+ };
13
+ type ProcessLineHandler = (line: string, handle: ProcessHandle | null) => void;
14
+ type ProcessLineOptions = ProcessOptions & {
15
+ onStderrLine?: ProcessLineHandler;
16
+ onStdoutLine?: ProcessLineHandler;
17
+ };
18
+ export declare function runProcess(options: ProcessLineOptions): Promise<void>;
19
+ export declare function runProcessCapture(options: ProcessOptions): Promise<string>;
20
+ export declare function runProcessCaptureBuffer(options: ProcessOptions): Promise<Buffer>;
27
21
  export declare function runWithConcurrency<T>(tasks: Array<() => Promise<T>>, workers: number, onProgress?: ((completed: number, total: number) => void) | null): Promise<T[]>;
22
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { SlideSettings } from "./settings.js";
2
- import type { SlideExtractionResult, SlideSource } from "./types.js";
2
+ import { type SlideExtractionResult, type SlideSource } from "./types.js";
3
3
  export declare function resolveSlidesDir(outputDir: string, sourceId: string): string;
4
4
  export declare function buildSlidesDirId(slidesDir: string): string;
5
5
  export declare function resolveSlideImagePath(slidesDir: string, imagePath: string): string | null;
@@ -1,3 +1,4 @@
1
+ export declare const SLIDE_EXTRACTION_VERSION = 1;
1
2
  export type SlideSourceKind = "youtube" | "direct";
2
3
  export type SlideSource = {
3
4
  url: string;
@@ -23,6 +24,7 @@ export type SlideAutoTune = {
23
24
  strategy: "hash" | "none";
24
25
  };
25
26
  export type SlideExtractionResult = {
27
+ extractorVersion?: number;
26
28
  sourceUrl: string;
27
29
  sourceKind: SlideSourceKind;
28
30
  sourceId: string;
@@ -1,4 +1,4 @@
1
- export declare const FALLBACK_VERSION = "0.21.11";
1
+ export declare const FALLBACK_VERSION = "0.21.13";
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/agent.md CHANGED
@@ -15,7 +15,7 @@ Scope:
15
15
  - **Off (default):** chat is Q&A only (no tools).
16
16
  - **On:** chat runs a tool-capable agent for web automation.
17
17
 
18
- Explicit exclusions (per product direction): **no update checker**, **no tutorial/welcome flow**, **no proxy config**, **no API key dialog**. All model calls go through the **local daemon**.
18
+ This document describes **Daemon mode**, where model calls go through the local daemon. In **Direct mode**, a configured provider can also support chat and automation without a daemon; see [the extension guide](chrome-extension.md).
19
19
 
20
20
  ## Architecture (High Level)
21
21
 
@@ -24,6 +24,10 @@ Explicit exclusions (per product direction): **no update checker**, **no tutoria
24
24
  3. **Content scripts** handle element picking and native-input bridge.
25
25
  4. **Daemon** provides `/v1/agent` (SSE stream of chunks + final assistant message).
26
26
 
27
+ Chat-only Q&A and automation use this same endpoint and implementation. The automation flag selects the prompt and available tools; there is no separate chat execution pipeline.
28
+
29
+ The daemon prepares message history, tools, prompts, model selection, and CLI execution once for both SSE and JSON responses. Native completion and streaming retain separate retry policies: streaming may retry the compatibility model only before emitting text.
30
+
27
31
  ### Data Flow (Agent Loop)
28
32
 
29
33
  - User sends a message in the side panel.
@@ -38,6 +42,8 @@ Explicit exclusions (per product direction): **no update checker**, **no tutoria
38
42
 
39
43
  The daemon **never** executes tools. It only returns the next assistant message.
40
44
 
45
+ Service installation keeps launchd, systemd, and Scheduled Task policy in separate adapters. They share command output/error normalization in `src/daemon/command.ts`; only Windows commands request hidden windows. Executable overrides use the application environment resolver, while public JSON environment output retains its explicit whitelist.
46
+
41
47
  ## Settings + Permissions
42
48
 
43
49
  ### Settings
package/docs/cache.md CHANGED
@@ -96,6 +96,7 @@ Media cache eviction:
96
96
 
97
97
  ## Notes
98
98
 
99
+ - Core owns the transcript-source inventory used by both extraction and SQLite reads, including embedded captions and native YouTube media. Cache hits retain their original source diagnostics.
99
100
  - No extension cache (daemon uses CLI cache).
100
101
  - No third-party SQLite deps.
101
102
  - Transcript namespace currently includes the YouTube mode (e.g. `yt:auto`, `yt:web`).
@@ -90,6 +90,12 @@ Dev (repo checkout):
90
90
 
91
91
  ## Architecture
92
92
 
93
+ The sidepanel owns one plain `PanelState` object. Simple fields update directly; phase, run attachment, restoration, and reset use named transitions in `panel-state-store.ts`. Nested-slice updates replace the slice so previously captured navigation/chat/slide snapshots remain unchanged. There is no secondary action bus or optional dispatch path.
94
+
95
+ Summary and slide streams share SSE idle-deadline reads, including keepalive comments, but retain separate rendering, cancellation, and completion policies. Chat runs through the agent loop, not a second mode in the summary stream controller.
96
+
97
+ Picker behavior lives in `ui/select.tsx`; fields and portalled popup markup live in `ui/select-field.tsx`. Shared picker and checkbox defaults live in `ui/controls.css`, imported before page-specific overrides. Options retains inline trigger-width and pointer-event sizing, while side-panel controls retain their CSS-sized popups. The shared Preact mount helper updates component props without remounting hook state.
98
+
93
99
  - **Extension (MV3, WXT)**
94
100
  - Side Panel UI: length + typography controls (font family + size), auto/manual toggle.
95
101
  - Background service worker: tab + navigation tracking, content extraction, starts summarize runs.
@@ -191,6 +197,8 @@ See `docs/media.md` for detection and transcript rules.
191
197
  - Timeout (e.g. `90s`, `2m`), retries, max output tokens (e.g. `2k`).
192
198
  - Process manager: live list of daemon-spawned tools (ffmpeg, yt-dlp, tesseract, etc.) with logs.
193
199
  - Extension includes current settings in request; daemon treats them like CLI flags (`--model`, `--length`, `--language`, `--prompt`).
200
+ - Options and the side panel share model-discovery and selection state in `src/lib/model-presets.ts`; each screen supplies its presets, hints, and presentation behavior.
201
+ - Browser AI keeps reusable Summarizer sessions by request key and length. Prompt API prewarming supplies one session to one request; that request destroys it on completion or cancellation. Replacing a request aborts the previous request for the same key without cancelling the other summary/slide key.
194
202
 
195
203
  ## Token Pairing / Setup Mode
196
204
 
package/docs/cli.md CHANGED
@@ -103,6 +103,8 @@ Missing or disabled providers are omitted.
103
103
 
104
104
  ## Attachments (images/files)
105
105
 
106
+ Asset extraction and summary preparation share text-size validation and Markdown conversion in `src/run/flows/asset/content.ts`. Summary preparation retains provider-specific native attachment selection and returns either an attachment prompt or inline text; extraction applies its character budget after conversion.
107
+
106
108
  When a CLI attempt is used for an image or non-text file, Summarize switches to a
107
109
  path-based prompt and enables the required tool flags:
108
110
 
@@ -58,7 +58,7 @@ If a required tool is missing, summarize prints a clear warning and exits non-ze
58
58
  : Pick a CLI theme.
59
59
 
60
60
  `--timeout <duration>`
61
- : Cap the download + extraction. Default `2m`.
61
+ : Per-operation timeout setting. Default `2m`; not an overall wall-clock deadline. yt-dlp downloads and FFmpeg scene detection allow at least `5m`, and individual extraction/probe steps have their own limits.
62
62
 
63
63
  `--no-cache`
64
64
  : Force re-download and re-extraction (bypasses both caches).