refactor(media): hide MCP media helper types · openclaw/openclaw@7758f5e
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ import { getChannelMcpCapabilities, registerChannelMcpTools } from "./channel-to
|
16 | 16 | export { OpenClawChannelBridge } from "./channel-bridge.js"; |
17 | 17 | |
18 | 18 | /** Options accepted by the channel MCP server factory and stdio entry point. */ |
19 | | -export type OpenClawMcpServeOptions = { |
| 19 | +type OpenClawMcpServeOptions = { |
20 | 20 | gatewayUrl?: string; |
21 | 21 | gatewayToken?: string; |
22 | 22 | gatewayPassword?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -128,7 +128,7 @@ export type QueueEvent =
|
128 | 128 | }; |
129 | 129 | |
130 | 130 | /** Claude channel permission notification payload before it is assigned an event cursor. */ |
131 | | -export type ClaudePermissionRequest = { |
| 131 | +type ClaudePermissionRequest = { |
132 | 132 | toolName: string; |
133 | 133 | description: string; |
134 | 134 | inputPreview: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,17 +15,17 @@ import { convertHeicToJpeg } from "./media-services.js";
|
15 | 15 | import { extractPdfContent, type PdfExtractedImage } from "./pdf-extract.js"; |
16 | 16 | |
17 | 17 | /** Image payload shape reused for extracted PDF images and normalized input images. */ |
18 | | -export type InputImageContent = PdfExtractedImage; |
| 18 | +type InputImageContent = PdfExtractedImage; |
19 | 19 | |
20 | 20 | /** Text/images extracted from an input_file source after MIME-specific processing. */ |
21 | | -export type InputFileExtractResult = { |
| 21 | +type InputFileExtractResult = { |
22 | 22 | filename: string; |
23 | 23 | text?: string; |
24 | 24 | images?: InputImageContent[]; |
25 | 25 | }; |
26 | 26 | |
27 | 27 | /** PDF extraction limits applied before model-visible input_file content is produced. */ |
28 | | -export type InputPdfLimits = { |
| 28 | +type InputPdfLimits = { |
29 | 29 | maxPages: number; |
30 | 30 | maxPixels: number; |
31 | 31 | minTextChars: number; |
@@ -82,7 +82,7 @@ export type InputImageSource =
|
82 | 82 | }; |
83 | 83 | |
84 | 84 | /** Supported input_file source variants before text/PDF extraction. */ |
85 | | -export type InputFileSource = |
| 85 | +type InputFileSource = |
86 | 86 | | { |
87 | 87 | type: "base64"; |
88 | 88 | data: string; |
@@ -97,7 +97,7 @@ export type InputFileSource =
|
97 | 97 | }; |
98 | 98 | |
99 | 99 | /** Guarded URL fetch result before final MIME allowlist validation. */ |
100 | | -export type InputFetchResult = { |
| 100 | +type InputFetchResult = { |
101 | 101 | buffer: Buffer; |
102 | 102 | mimeType: string; |
103 | 103 | contentType?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ import { parseAudioTag } from "./audio-tags.js";
|
16 | 16 | export const MEDIA_TOKEN_RE = /\bMEDIA:\s*`?([^\n]+)`?/gi; |
17 | 17 | |
18 | 18 | /** Ordered output segment emitted after visible text and extracted media are separated. */ |
19 | | -export type ParsedMediaOutputSegment = |
| 19 | +type ParsedMediaOutputSegment = |
20 | 20 | | { |
21 | 21 | type: "text"; |
22 | 22 | text: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。