@acosmi/sdk-ts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +247 -0
  3. package/dist/browser/index.js +3950 -0
  4. package/dist/browser/index.js.map +1 -0
  5. package/dist/index.js +3950 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/node/adapters/anthropic.cjs +257 -0
  8. package/dist/node/adapters/anthropic.cjs.map +1 -0
  9. package/dist/node/adapters/anthropic.d.cts +39 -0
  10. package/dist/node/adapters/anthropic.d.ts +39 -0
  11. package/dist/node/adapters/anthropic.js +254 -0
  12. package/dist/node/adapters/anthropic.js.map +1 -0
  13. package/dist/node/adapters/openai.cjs +472 -0
  14. package/dist/node/adapters/openai.cjs.map +1 -0
  15. package/dist/node/adapters/openai.d.cts +64 -0
  16. package/dist/node/adapters/openai.d.ts +64 -0
  17. package/dist/node/adapters/openai.js +465 -0
  18. package/dist/node/adapters/openai.js.map +1 -0
  19. package/dist/node/index-C3Z_84Bv.d.cts +992 -0
  20. package/dist/node/index-C3Z_84Bv.d.ts +992 -0
  21. package/dist/node/index-nvLKgCm9.d.cts +147 -0
  22. package/dist/node/index-nvLKgCm9.d.ts +147 -0
  23. package/dist/node/index.cjs +4024 -0
  24. package/dist/node/index.cjs.map +1 -0
  25. package/dist/node/index.d.cts +791 -0
  26. package/dist/node/index.d.ts +791 -0
  27. package/dist/node/index.js +3950 -0
  28. package/dist/node/index.js.map +1 -0
  29. package/dist/node/sanitize/index.cjs +248 -0
  30. package/dist/node/sanitize/index.cjs.map +1 -0
  31. package/dist/node/sanitize/index.d.cts +1 -0
  32. package/dist/node/sanitize/index.d.ts +1 -0
  33. package/dist/node/sanitize/index.js +217 -0
  34. package/dist/node/sanitize/index.js.map +1 -0
  35. package/package.json +84 -0
@@ -0,0 +1,147 @@
1
+ /** Anthropic content block 类型 (请求 + 响应 + ephemeral) */
2
+ type BlockType = 'text' | 'image' | 'video' | 'document' | 'search_result' | 'thinking' | 'redacted_thinking' | 'tool_use' | 'tool_result' | 'tool_reference' | 'server_tool_use' | 'web_search_tool_result' | 'code_execution_tool_result' | 'mcp_tool_use' | 'mcp_tool_result' | 'container_upload';
3
+ declare const BlockText: BlockType;
4
+ declare const BlockImage: BlockType;
5
+ declare const BlockVideo: BlockType;
6
+ declare const BlockDocument: BlockType;
7
+ declare const BlockSearchResult: BlockType;
8
+ declare const BlockThinking: BlockType;
9
+ declare const BlockRedactedThinking: BlockType;
10
+ declare const BlockToolUse: BlockType;
11
+ declare const BlockToolResult: BlockType;
12
+ declare const BlockToolReference: BlockType;
13
+ declare const BlockServerToolUse: BlockType;
14
+ declare const BlockWebSearchToolResult: BlockType;
15
+ declare const BlockCodeExecutionToolResult: BlockType;
16
+ declare const BlockMCPToolUse: BlockType;
17
+ declare const BlockMCPToolResult: BlockType;
18
+ declare const BlockContainerUpload: BlockType;
19
+ /** 流式响应 delta 类型 (与 BlockType 正交) */
20
+ type DeltaType = 'text_delta' | 'input_json_delta' | 'thinking_delta' | 'signature_delta' | 'citations_delta';
21
+ declare const DeltaText: DeltaType;
22
+ declare const DeltaInputJSON: DeltaType;
23
+ declare const DeltaThinking: DeltaType;
24
+ declare const DeltaSignature: DeltaType;
25
+ declare const DeltaCitations: DeltaType;
26
+ /**
27
+ * 网关在 block JSON 中注入的 in-band 标记字段名。
28
+ * 存在且值为 true 时代表该 block 不应回传下一轮。
29
+ *
30
+ * 选择 in-band 标记而非独立 SSE 事件的理由:
31
+ * - 零缓冲 / 零顺序依赖 / 零延迟
32
+ * - history 剥离天然可做
33
+ */
34
+ declare const EphemeralMarkerField = "acosmi_ephemeral";
35
+
36
+ /**
37
+ * SDK 层防御性配置。只做所有下游 provider 都不可能接受的底线剥除;
38
+ * 具体 provider 适配由网关承担。
39
+ *
40
+ * 零值 = 不校验 / 不剥除, 等价于未启用。
41
+ */
42
+ interface MinimalSanitizeConfig {
43
+ /** 体积上限 (字节, 仅对 base64 内联媒体生效; URL 版交网关把关). 0 = 不校验. */
44
+ maxImageBytes?: number;
45
+ maxVideoBytes?: number;
46
+ maxPDFBytes?: number;
47
+ /** history 轮次硬上限 (防止内存爆炸 / 上行带宽). 0 = 不校验. 超限抛 ErrHistoryTooDeep. */
48
+ maxMessagesTurns?: number;
49
+ /** 公共黑名单 (所有 provider 均拒绝的 block 类型). 默认空. */
50
+ permanentDenyBlocks?: BlockType[];
51
+ }
52
+ declare class HistoryTooDeepError extends Error {
53
+ constructor();
54
+ }
55
+ declare class BlockDeniedError extends Error {
56
+ constructor();
57
+ }
58
+ /** 体积超限错误, 携带实际/上限字节数以便上游展示。 */
59
+ declare class SizeError extends Error {
60
+ blockType: BlockType;
61
+ actual: number;
62
+ limit: number;
63
+ constructor(blockType: BlockType, actual: number, limit: number);
64
+ }
65
+ declare const ErrHistoryTooDeep: HistoryTooDeepError;
66
+ declare const ErrBlockDenied: BlockDeniedError;
67
+
68
+ /**
69
+ * 对已经解析为 unknown[] 的 messages 做底线防御: 深度校验 +
70
+ * 体积校验 + deny-list 剥除 + tool_use_id 联动剥除 tool_result。
71
+ *
72
+ * 入参形态: messages 的每个元素预期是 object (含 role / content); content 为 string (plain text)
73
+ * 或 unknown[] (block 数组)。形态异常的元素原样透传, 不抛错。
74
+ *
75
+ * 通过返回新 messages (可能 block 数组被缩减); 早失败抛错 (调用方应放弃本次请求)。
76
+ */
77
+ declare function sanitize(messages: unknown[], cfg: MinimalSanitizeConfig): unknown[];
78
+
79
+ /** 判定一个 block 是否应被剥除 */
80
+ type BlockPredicate = (block: Record<string, unknown>) => boolean;
81
+ /**
82
+ * 按 pred 从 messages 中剥除 block, 并联动剥除对应的 tool_result (user 轮)。
83
+ *
84
+ * 收敛两步: 先扫收集 droppedToolUseIDs, 再整体剥; 这样顺序不影响正确性
85
+ * (即使 tool_result 在 tool_use 之前出现也能捕获)。
86
+ *
87
+ * 不修改入参 messages 中任何 map 的 key, 只重构数组。
88
+ * 未被修改的 message 保持原引用 (零拷贝优化)。
89
+ */
90
+ declare function dropBlocks(messages: unknown[], pred: BlockPredicate): unknown[];
91
+ /**
92
+ * 从 messages 中剥除带 acosmi_ephemeral:true 标记的 block, 以及对应的 tool_result。
93
+ *
94
+ * 硬豁免: thinking / redacted_thinking 块永不剥, 即使携带 ephemeral 标记。
95
+ *
96
+ * 理由: Anthropic extended thinking + tool_use 续轮场景下, 上游强制要求
97
+ * assistant 历史中保留原始 thinking 块, 否则返回:
98
+ * "The content[].thinking in the thinking mode must be passed back to the API."
99
+ *
100
+ * 历史污染防御: 即使旧版网关 / 历史响应里 thinking 块带了 ephemeral=true,
101
+ * 客户端在调用 stripEphemeral 时也不应剥除。网关侧 anthropic preset 已停止注入此标记,
102
+ * 本豁免兜底历史会话与第三方调用方两类已污染场景。
103
+ */
104
+ declare function stripEphemeral(messages: unknown[]): unknown[];
105
+
106
+ declare const index_BlockCodeExecutionToolResult: typeof BlockCodeExecutionToolResult;
107
+ declare const index_BlockContainerUpload: typeof BlockContainerUpload;
108
+ type index_BlockDeniedError = BlockDeniedError;
109
+ declare const index_BlockDeniedError: typeof BlockDeniedError;
110
+ declare const index_BlockDocument: typeof BlockDocument;
111
+ declare const index_BlockImage: typeof BlockImage;
112
+ declare const index_BlockMCPToolResult: typeof BlockMCPToolResult;
113
+ declare const index_BlockMCPToolUse: typeof BlockMCPToolUse;
114
+ type index_BlockPredicate = BlockPredicate;
115
+ declare const index_BlockRedactedThinking: typeof BlockRedactedThinking;
116
+ declare const index_BlockSearchResult: typeof BlockSearchResult;
117
+ declare const index_BlockServerToolUse: typeof BlockServerToolUse;
118
+ declare const index_BlockText: typeof BlockText;
119
+ declare const index_BlockThinking: typeof BlockThinking;
120
+ declare const index_BlockToolReference: typeof BlockToolReference;
121
+ declare const index_BlockToolResult: typeof BlockToolResult;
122
+ declare const index_BlockToolUse: typeof BlockToolUse;
123
+ type index_BlockType = BlockType;
124
+ declare const index_BlockVideo: typeof BlockVideo;
125
+ declare const index_BlockWebSearchToolResult: typeof BlockWebSearchToolResult;
126
+ declare const index_DeltaCitations: typeof DeltaCitations;
127
+ declare const index_DeltaInputJSON: typeof DeltaInputJSON;
128
+ declare const index_DeltaSignature: typeof DeltaSignature;
129
+ declare const index_DeltaText: typeof DeltaText;
130
+ declare const index_DeltaThinking: typeof DeltaThinking;
131
+ type index_DeltaType = DeltaType;
132
+ declare const index_EphemeralMarkerField: typeof EphemeralMarkerField;
133
+ declare const index_ErrBlockDenied: typeof ErrBlockDenied;
134
+ declare const index_ErrHistoryTooDeep: typeof ErrHistoryTooDeep;
135
+ type index_HistoryTooDeepError = HistoryTooDeepError;
136
+ declare const index_HistoryTooDeepError: typeof HistoryTooDeepError;
137
+ type index_MinimalSanitizeConfig = MinimalSanitizeConfig;
138
+ type index_SizeError = SizeError;
139
+ declare const index_SizeError: typeof SizeError;
140
+ declare const index_dropBlocks: typeof dropBlocks;
141
+ declare const index_sanitize: typeof sanitize;
142
+ declare const index_stripEphemeral: typeof stripEphemeral;
143
+ declare namespace index {
144
+ export { index_BlockCodeExecutionToolResult as BlockCodeExecutionToolResult, index_BlockContainerUpload as BlockContainerUpload, index_BlockDeniedError as BlockDeniedError, index_BlockDocument as BlockDocument, index_BlockImage as BlockImage, index_BlockMCPToolResult as BlockMCPToolResult, index_BlockMCPToolUse as BlockMCPToolUse, type index_BlockPredicate as BlockPredicate, index_BlockRedactedThinking as BlockRedactedThinking, index_BlockSearchResult as BlockSearchResult, index_BlockServerToolUse as BlockServerToolUse, index_BlockText as BlockText, index_BlockThinking as BlockThinking, index_BlockToolReference as BlockToolReference, index_BlockToolResult as BlockToolResult, index_BlockToolUse as BlockToolUse, type index_BlockType as BlockType, index_BlockVideo as BlockVideo, index_BlockWebSearchToolResult as BlockWebSearchToolResult, index_DeltaCitations as DeltaCitations, index_DeltaInputJSON as DeltaInputJSON, index_DeltaSignature as DeltaSignature, index_DeltaText as DeltaText, index_DeltaThinking as DeltaThinking, type index_DeltaType as DeltaType, index_EphemeralMarkerField as EphemeralMarkerField, index_ErrBlockDenied as ErrBlockDenied, index_ErrHistoryTooDeep as ErrHistoryTooDeep, index_HistoryTooDeepError as HistoryTooDeepError, type index_MinimalSanitizeConfig as MinimalSanitizeConfig, index_SizeError as SizeError, index_dropBlocks as dropBlocks, index_sanitize as sanitize, index_stripEphemeral as stripEphemeral };
145
+ }
146
+
147
+ export { dropBlocks as A, BlockCodeExecutionToolResult as B, sanitize as C, DeltaCitations as D, EphemeralMarkerField as E, stripEphemeral as F, HistoryTooDeepError as H, type MinimalSanitizeConfig as M, SizeError as S, BlockContainerUpload as a, BlockDeniedError as b, BlockDocument as c, BlockImage as d, BlockMCPToolResult as e, BlockMCPToolUse as f, type BlockPredicate as g, BlockRedactedThinking as h, index as i, BlockSearchResult as j, BlockServerToolUse as k, BlockText as l, BlockThinking as m, BlockToolReference as n, BlockToolResult as o, BlockToolUse as p, type BlockType as q, BlockVideo as r, BlockWebSearchToolResult as s, DeltaInputJSON as t, DeltaSignature as u, DeltaText as v, DeltaThinking as w, type DeltaType as x, ErrBlockDenied as y, ErrHistoryTooDeep as z };
@@ -0,0 +1,147 @@
1
+ /** Anthropic content block 类型 (请求 + 响应 + ephemeral) */
2
+ type BlockType = 'text' | 'image' | 'video' | 'document' | 'search_result' | 'thinking' | 'redacted_thinking' | 'tool_use' | 'tool_result' | 'tool_reference' | 'server_tool_use' | 'web_search_tool_result' | 'code_execution_tool_result' | 'mcp_tool_use' | 'mcp_tool_result' | 'container_upload';
3
+ declare const BlockText: BlockType;
4
+ declare const BlockImage: BlockType;
5
+ declare const BlockVideo: BlockType;
6
+ declare const BlockDocument: BlockType;
7
+ declare const BlockSearchResult: BlockType;
8
+ declare const BlockThinking: BlockType;
9
+ declare const BlockRedactedThinking: BlockType;
10
+ declare const BlockToolUse: BlockType;
11
+ declare const BlockToolResult: BlockType;
12
+ declare const BlockToolReference: BlockType;
13
+ declare const BlockServerToolUse: BlockType;
14
+ declare const BlockWebSearchToolResult: BlockType;
15
+ declare const BlockCodeExecutionToolResult: BlockType;
16
+ declare const BlockMCPToolUse: BlockType;
17
+ declare const BlockMCPToolResult: BlockType;
18
+ declare const BlockContainerUpload: BlockType;
19
+ /** 流式响应 delta 类型 (与 BlockType 正交) */
20
+ type DeltaType = 'text_delta' | 'input_json_delta' | 'thinking_delta' | 'signature_delta' | 'citations_delta';
21
+ declare const DeltaText: DeltaType;
22
+ declare const DeltaInputJSON: DeltaType;
23
+ declare const DeltaThinking: DeltaType;
24
+ declare const DeltaSignature: DeltaType;
25
+ declare const DeltaCitations: DeltaType;
26
+ /**
27
+ * 网关在 block JSON 中注入的 in-band 标记字段名。
28
+ * 存在且值为 true 时代表该 block 不应回传下一轮。
29
+ *
30
+ * 选择 in-band 标记而非独立 SSE 事件的理由:
31
+ * - 零缓冲 / 零顺序依赖 / 零延迟
32
+ * - history 剥离天然可做
33
+ */
34
+ declare const EphemeralMarkerField = "acosmi_ephemeral";
35
+
36
+ /**
37
+ * SDK 层防御性配置。只做所有下游 provider 都不可能接受的底线剥除;
38
+ * 具体 provider 适配由网关承担。
39
+ *
40
+ * 零值 = 不校验 / 不剥除, 等价于未启用。
41
+ */
42
+ interface MinimalSanitizeConfig {
43
+ /** 体积上限 (字节, 仅对 base64 内联媒体生效; URL 版交网关把关). 0 = 不校验. */
44
+ maxImageBytes?: number;
45
+ maxVideoBytes?: number;
46
+ maxPDFBytes?: number;
47
+ /** history 轮次硬上限 (防止内存爆炸 / 上行带宽). 0 = 不校验. 超限抛 ErrHistoryTooDeep. */
48
+ maxMessagesTurns?: number;
49
+ /** 公共黑名单 (所有 provider 均拒绝的 block 类型). 默认空. */
50
+ permanentDenyBlocks?: BlockType[];
51
+ }
52
+ declare class HistoryTooDeepError extends Error {
53
+ constructor();
54
+ }
55
+ declare class BlockDeniedError extends Error {
56
+ constructor();
57
+ }
58
+ /** 体积超限错误, 携带实际/上限字节数以便上游展示。 */
59
+ declare class SizeError extends Error {
60
+ blockType: BlockType;
61
+ actual: number;
62
+ limit: number;
63
+ constructor(blockType: BlockType, actual: number, limit: number);
64
+ }
65
+ declare const ErrHistoryTooDeep: HistoryTooDeepError;
66
+ declare const ErrBlockDenied: BlockDeniedError;
67
+
68
+ /**
69
+ * 对已经解析为 unknown[] 的 messages 做底线防御: 深度校验 +
70
+ * 体积校验 + deny-list 剥除 + tool_use_id 联动剥除 tool_result。
71
+ *
72
+ * 入参形态: messages 的每个元素预期是 object (含 role / content); content 为 string (plain text)
73
+ * 或 unknown[] (block 数组)。形态异常的元素原样透传, 不抛错。
74
+ *
75
+ * 通过返回新 messages (可能 block 数组被缩减); 早失败抛错 (调用方应放弃本次请求)。
76
+ */
77
+ declare function sanitize(messages: unknown[], cfg: MinimalSanitizeConfig): unknown[];
78
+
79
+ /** 判定一个 block 是否应被剥除 */
80
+ type BlockPredicate = (block: Record<string, unknown>) => boolean;
81
+ /**
82
+ * 按 pred 从 messages 中剥除 block, 并联动剥除对应的 tool_result (user 轮)。
83
+ *
84
+ * 收敛两步: 先扫收集 droppedToolUseIDs, 再整体剥; 这样顺序不影响正确性
85
+ * (即使 tool_result 在 tool_use 之前出现也能捕获)。
86
+ *
87
+ * 不修改入参 messages 中任何 map 的 key, 只重构数组。
88
+ * 未被修改的 message 保持原引用 (零拷贝优化)。
89
+ */
90
+ declare function dropBlocks(messages: unknown[], pred: BlockPredicate): unknown[];
91
+ /**
92
+ * 从 messages 中剥除带 acosmi_ephemeral:true 标记的 block, 以及对应的 tool_result。
93
+ *
94
+ * 硬豁免: thinking / redacted_thinking 块永不剥, 即使携带 ephemeral 标记。
95
+ *
96
+ * 理由: Anthropic extended thinking + tool_use 续轮场景下, 上游强制要求
97
+ * assistant 历史中保留原始 thinking 块, 否则返回:
98
+ * "The content[].thinking in the thinking mode must be passed back to the API."
99
+ *
100
+ * 历史污染防御: 即使旧版网关 / 历史响应里 thinking 块带了 ephemeral=true,
101
+ * 客户端在调用 stripEphemeral 时也不应剥除。网关侧 anthropic preset 已停止注入此标记,
102
+ * 本豁免兜底历史会话与第三方调用方两类已污染场景。
103
+ */
104
+ declare function stripEphemeral(messages: unknown[]): unknown[];
105
+
106
+ declare const index_BlockCodeExecutionToolResult: typeof BlockCodeExecutionToolResult;
107
+ declare const index_BlockContainerUpload: typeof BlockContainerUpload;
108
+ type index_BlockDeniedError = BlockDeniedError;
109
+ declare const index_BlockDeniedError: typeof BlockDeniedError;
110
+ declare const index_BlockDocument: typeof BlockDocument;
111
+ declare const index_BlockImage: typeof BlockImage;
112
+ declare const index_BlockMCPToolResult: typeof BlockMCPToolResult;
113
+ declare const index_BlockMCPToolUse: typeof BlockMCPToolUse;
114
+ type index_BlockPredicate = BlockPredicate;
115
+ declare const index_BlockRedactedThinking: typeof BlockRedactedThinking;
116
+ declare const index_BlockSearchResult: typeof BlockSearchResult;
117
+ declare const index_BlockServerToolUse: typeof BlockServerToolUse;
118
+ declare const index_BlockText: typeof BlockText;
119
+ declare const index_BlockThinking: typeof BlockThinking;
120
+ declare const index_BlockToolReference: typeof BlockToolReference;
121
+ declare const index_BlockToolResult: typeof BlockToolResult;
122
+ declare const index_BlockToolUse: typeof BlockToolUse;
123
+ type index_BlockType = BlockType;
124
+ declare const index_BlockVideo: typeof BlockVideo;
125
+ declare const index_BlockWebSearchToolResult: typeof BlockWebSearchToolResult;
126
+ declare const index_DeltaCitations: typeof DeltaCitations;
127
+ declare const index_DeltaInputJSON: typeof DeltaInputJSON;
128
+ declare const index_DeltaSignature: typeof DeltaSignature;
129
+ declare const index_DeltaText: typeof DeltaText;
130
+ declare const index_DeltaThinking: typeof DeltaThinking;
131
+ type index_DeltaType = DeltaType;
132
+ declare const index_EphemeralMarkerField: typeof EphemeralMarkerField;
133
+ declare const index_ErrBlockDenied: typeof ErrBlockDenied;
134
+ declare const index_ErrHistoryTooDeep: typeof ErrHistoryTooDeep;
135
+ type index_HistoryTooDeepError = HistoryTooDeepError;
136
+ declare const index_HistoryTooDeepError: typeof HistoryTooDeepError;
137
+ type index_MinimalSanitizeConfig = MinimalSanitizeConfig;
138
+ type index_SizeError = SizeError;
139
+ declare const index_SizeError: typeof SizeError;
140
+ declare const index_dropBlocks: typeof dropBlocks;
141
+ declare const index_sanitize: typeof sanitize;
142
+ declare const index_stripEphemeral: typeof stripEphemeral;
143
+ declare namespace index {
144
+ export { index_BlockCodeExecutionToolResult as BlockCodeExecutionToolResult, index_BlockContainerUpload as BlockContainerUpload, index_BlockDeniedError as BlockDeniedError, index_BlockDocument as BlockDocument, index_BlockImage as BlockImage, index_BlockMCPToolResult as BlockMCPToolResult, index_BlockMCPToolUse as BlockMCPToolUse, type index_BlockPredicate as BlockPredicate, index_BlockRedactedThinking as BlockRedactedThinking, index_BlockSearchResult as BlockSearchResult, index_BlockServerToolUse as BlockServerToolUse, index_BlockText as BlockText, index_BlockThinking as BlockThinking, index_BlockToolReference as BlockToolReference, index_BlockToolResult as BlockToolResult, index_BlockToolUse as BlockToolUse, type index_BlockType as BlockType, index_BlockVideo as BlockVideo, index_BlockWebSearchToolResult as BlockWebSearchToolResult, index_DeltaCitations as DeltaCitations, index_DeltaInputJSON as DeltaInputJSON, index_DeltaSignature as DeltaSignature, index_DeltaText as DeltaText, index_DeltaThinking as DeltaThinking, type index_DeltaType as DeltaType, index_EphemeralMarkerField as EphemeralMarkerField, index_ErrBlockDenied as ErrBlockDenied, index_ErrHistoryTooDeep as ErrHistoryTooDeep, index_HistoryTooDeepError as HistoryTooDeepError, type index_MinimalSanitizeConfig as MinimalSanitizeConfig, index_SizeError as SizeError, index_dropBlocks as dropBlocks, index_sanitize as sanitize, index_stripEphemeral as stripEphemeral };
145
+ }
146
+
147
+ export { dropBlocks as A, BlockCodeExecutionToolResult as B, sanitize as C, DeltaCitations as D, EphemeralMarkerField as E, stripEphemeral as F, HistoryTooDeepError as H, type MinimalSanitizeConfig as M, SizeError as S, BlockContainerUpload as a, BlockDeniedError as b, BlockDocument as c, BlockImage as d, BlockMCPToolResult as e, BlockMCPToolUse as f, type BlockPredicate as g, BlockRedactedThinking as h, index as i, BlockSearchResult as j, BlockServerToolUse as k, BlockText as l, BlockThinking as m, BlockToolReference as n, BlockToolResult as o, BlockToolUse as p, type BlockType as q, BlockVideo as r, BlockWebSearchToolResult as s, DeltaInputJSON as t, DeltaSignature as u, DeltaText as v, DeltaThinking as w, type DeltaType as x, ErrBlockDenied as y, ErrHistoryTooDeep as z };