@openclaw-china/shared 0.1.31 → 0.1.32

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.
@@ -1,65 +1,65 @@
1
- /**
2
- * 媒体处理模块
3
- *
4
- * 提供统一的媒体解析、路径处理和文件读取功能
5
- *
6
- * @module @openclaw-china/shared/media
7
- */
8
-
9
- // 媒体解析
10
- export {
11
- // 类型
12
- type MediaType,
13
- type ExtractedMedia,
14
- type MediaParseResult,
15
- type MediaParseOptions,
16
- // 常量
17
- IMAGE_EXTENSIONS,
18
- AUDIO_EXTENSIONS,
19
- VIDEO_EXTENSIONS,
20
- NON_IMAGE_EXTENSIONS,
21
- // 路径处理函数
22
- isHttpUrl,
23
- isFileUrl,
24
- isLocalReference,
25
- normalizeLocalPath,
26
- stripTitleFromUrl,
27
- getExtension,
28
- isImagePath,
29
- isNonImageFilePath,
30
- detectMediaType,
31
- // 媒体提取函数
32
- extractMediaFromText,
33
- extractImagesFromText,
34
- extractFilesFromText,
35
- } from "./media-parser.js";
36
-
37
- // 媒体 IO
38
- export {
39
- // 类型
40
- type MediaReadResult,
41
- type MediaReadOptions,
42
- type DownloadToTempFileResult,
43
- type DownloadToTempFileOptions,
44
- type FinalizeInboundMediaOptions,
45
- type PruneInboundMediaDirOptions,
46
- type PathSecurityOptions,
47
- // 错误类
48
- FileSizeLimitError,
49
- MediaTimeoutError,
50
- PathSecurityError,
51
- // 路径安全
52
- validatePathSecurity,
53
- getDefaultAllowedPrefixes,
54
- // MIME 类型
55
- getMimeType,
56
- // 媒体读取函数
57
- fetchMediaFromUrl,
58
- readMediaFromLocal,
59
- readMedia,
60
- readMediaBatch,
61
- downloadToTempFile,
62
- finalizeInboundMediaFile,
63
- pruneInboundMediaDir,
64
- cleanupFileSafe,
65
- } from "./media-io.js";
1
+ /**
2
+ * 媒体处理模块
3
+ *
4
+ * 提供统一的媒体解析、路径处理和文件读取功能
5
+ *
6
+ * @module @openclaw-china/shared/media
7
+ */
8
+
9
+ // 媒体解析
10
+ export {
11
+ // 类型
12
+ type MediaType,
13
+ type ExtractedMedia,
14
+ type MediaParseResult,
15
+ type MediaParseOptions,
16
+ // 常量
17
+ IMAGE_EXTENSIONS,
18
+ AUDIO_EXTENSIONS,
19
+ VIDEO_EXTENSIONS,
20
+ NON_IMAGE_EXTENSIONS,
21
+ // 路径处理函数
22
+ isHttpUrl,
23
+ isFileUrl,
24
+ isLocalReference,
25
+ normalizeLocalPath,
26
+ stripTitleFromUrl,
27
+ getExtension,
28
+ isImagePath,
29
+ isNonImageFilePath,
30
+ detectMediaType,
31
+ // 媒体提取函数
32
+ extractMediaFromText,
33
+ extractImagesFromText,
34
+ extractFilesFromText,
35
+ } from "./media-parser.js";
36
+
37
+ // 媒体 IO
38
+ export {
39
+ // 类型
40
+ type MediaReadResult,
41
+ type MediaReadOptions,
42
+ type DownloadToTempFileResult,
43
+ type DownloadToTempFileOptions,
44
+ type FinalizeInboundMediaOptions,
45
+ type PruneInboundMediaDirOptions,
46
+ type PathSecurityOptions,
47
+ // 错误类
48
+ FileSizeLimitError,
49
+ MediaTimeoutError,
50
+ PathSecurityError,
51
+ // 路径安全
52
+ validatePathSecurity,
53
+ getDefaultAllowedPrefixes,
54
+ // MIME 类型
55
+ getMimeType,
56
+ // 媒体读取函数
57
+ fetchMediaFromUrl,
58
+ readMediaFromLocal,
59
+ readMedia,
60
+ readMediaBatch,
61
+ downloadToTempFile,
62
+ finalizeInboundMediaFile,
63
+ pruneInboundMediaDir,
64
+ cleanupFileSafe,
65
+ } from "./media-io.js";