@ai-sdk-tool/parser 4.0.0 → 4.1.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.
- package/README.md +109 -20
- package/dist/{chunk-2KK5BDZF.js → chunk-GMTE7BY5.js} +23 -6
- package/dist/chunk-GMTE7BY5.js.map +1 -0
- package/dist/{chunk-CXWS24JX.js → chunk-MHZC45AC.js} +5 -2
- package/dist/{chunk-CXWS24JX.js.map → chunk-MHZC45AC.js.map} +1 -1
- package/dist/{chunk-ERJKQKCR.js → chunk-O6NWVXQD.js} +2578 -379
- package/dist/chunk-O6NWVXQD.js.map +1 -0
- package/dist/{chunk-IX4FJELL.js → chunk-QBZNMO5C.js} +1 -1
- package/dist/chunk-QBZNMO5C.js.map +1 -0
- package/dist/community.cjs +7873 -5545
- package/dist/community.cjs.map +1 -1
- package/dist/community.d.cts +7 -1
- package/dist/community.d.ts +7 -1
- package/dist/community.js +128 -8
- package/dist/community.js.map +1 -1
- package/dist/index.cjs +2600 -384
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -24
- package/dist/index.d.ts +33 -24
- package/dist/index.js +22 -14
- package/dist/rjson.cjs.map +1 -1
- package/dist/rjson.d.cts +15 -15
- package/dist/rjson.d.ts +15 -15
- package/dist/rjson.js +1 -1
- package/dist/rxml.cjs +22 -5
- package/dist/rxml.cjs.map +1 -1
- package/dist/rxml.d.cts +23 -23
- package/dist/rxml.d.ts +23 -23
- package/dist/rxml.js +2 -2
- package/dist/schema-coerce.cjs +22 -5
- package/dist/schema-coerce.cjs.map +1 -1
- package/dist/schema-coerce.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-2KK5BDZF.js.map +0 -1
- package/dist/chunk-ERJKQKCR.js.map +0 -1
- package/dist/chunk-IX4FJELL.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
2
|
-
import { LanguageModelV3FunctionTool, LanguageModelV3ToolCall, LanguageModelV3Content,
|
|
2
|
+
import { LanguageModelV3FunctionTool, LanguageModelV3StreamPart, LanguageModelV3ToolCall, LanguageModelV3Content, LanguageModelV3ProviderTool, JSONSchema7, LanguageModelV3, LanguageModelV3TextPart, LanguageModelV3FilePart, LanguageModelV3Middleware, LanguageModelV3Prompt, SharedV3ProviderOptions } from '@ai-sdk/provider';
|
|
3
3
|
import { ToolResultPart } from '@ai-sdk/provider-utils';
|
|
4
4
|
export { ParseOptions, parse, stringify, transform } from './rjson.cjs';
|
|
5
5
|
|
|
@@ -7,45 +7,45 @@ export { ParseOptions, parse, stringify, transform } from './rjson.cjs';
|
|
|
7
7
|
* Options for parsing tool calls and handling errors
|
|
8
8
|
*/
|
|
9
9
|
interface ParserOptions {
|
|
10
|
-
onError?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
11
10
|
/**
|
|
12
11
|
* When true, stream parsers may emit malformed raw tool-call text as
|
|
13
12
|
* `text-delta` fallback on parse failure. Defaults to false to avoid leaking
|
|
14
13
|
* protocol/internal markup to end users.
|
|
15
14
|
*/
|
|
16
15
|
emitRawToolCallTextOnError?: boolean;
|
|
16
|
+
onError?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
17
17
|
}
|
|
18
18
|
interface TCMProtocol {
|
|
19
|
+
createStreamParser({ tools, options, }: {
|
|
20
|
+
tools: LanguageModelV3FunctionTool[];
|
|
21
|
+
options?: ParserOptions;
|
|
22
|
+
}): TransformStream<LanguageModelV3StreamPart, LanguageModelV3StreamPart>;
|
|
23
|
+
extractToolCallSegments?: ({ text, tools, }: {
|
|
24
|
+
text: string;
|
|
25
|
+
tools: LanguageModelV3FunctionTool[];
|
|
26
|
+
}) => string[];
|
|
27
|
+
formatToolCall(toolCall: LanguageModelV3ToolCall): string;
|
|
19
28
|
formatTools({ tools, toolSystemPromptTemplate, }: {
|
|
20
29
|
tools: LanguageModelV3FunctionTool[];
|
|
21
30
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
22
31
|
}): string;
|
|
23
|
-
formatToolCall(toolCall: LanguageModelV3ToolCall): string;
|
|
24
32
|
parseGeneratedText({ text, tools, options, }: {
|
|
25
33
|
text: string;
|
|
26
34
|
tools: LanguageModelV3FunctionTool[];
|
|
27
35
|
options?: ParserOptions;
|
|
28
36
|
}): LanguageModelV3Content[];
|
|
29
|
-
createStreamParser({ tools, options, }: {
|
|
30
|
-
tools: LanguageModelV3FunctionTool[];
|
|
31
|
-
options?: ParserOptions;
|
|
32
|
-
}): TransformStream<LanguageModelV3StreamPart, LanguageModelV3StreamPart>;
|
|
33
|
-
extractToolCallSegments?: ({ text, tools, }: {
|
|
34
|
-
text: string;
|
|
35
|
-
tools: LanguageModelV3FunctionTool[];
|
|
36
|
-
}) => string[];
|
|
37
37
|
}
|
|
38
38
|
type TCMCoreProtocol = TCMProtocol;
|
|
39
39
|
declare function isProtocolFactory(protocol: TCMProtocol | (() => TCMProtocol)): protocol is () => TCMProtocol;
|
|
40
40
|
declare function isTCMProtocolFactory(protocol: TCMProtocol | (() => TCMProtocol)): protocol is () => TCMProtocol;
|
|
41
41
|
|
|
42
|
-
interface
|
|
43
|
-
toolCallStart?: string;
|
|
42
|
+
interface HermesProtocolOptions {
|
|
44
43
|
toolCallEnd?: string;
|
|
44
|
+
toolCallStart?: string;
|
|
45
45
|
}
|
|
46
|
-
declare const
|
|
46
|
+
declare const hermesProtocol: ({ toolCallStart, toolCallEnd, }?: HermesProtocolOptions) => TCMProtocol;
|
|
47
47
|
|
|
48
|
-
interface
|
|
48
|
+
interface MorphXmlProtocolOptions {
|
|
49
49
|
parseOptions?: {
|
|
50
50
|
repair?: boolean;
|
|
51
51
|
maxReparses?: number;
|
|
@@ -54,16 +54,20 @@ interface XmlProtocolOptions {
|
|
|
54
54
|
[key: string]: unknown;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
declare const
|
|
57
|
+
declare const morphXmlProtocol: (protocolOptions?: MorphXmlProtocolOptions) => TCMCoreProtocol;
|
|
58
|
+
|
|
59
|
+
declare const qwen3CoderProtocol: () => TCMProtocol;
|
|
60
|
+
declare const uiTarsXmlProtocol: () => TCMProtocol;
|
|
61
|
+
declare const Qwen3CoderToolParser: () => TCMProtocol;
|
|
58
62
|
|
|
59
|
-
interface
|
|
63
|
+
interface YamlXmlProtocolOptions {
|
|
60
64
|
/**
|
|
61
65
|
* Whether to include a system prompt example showing YAML multiline syntax.
|
|
62
66
|
* @default true
|
|
63
67
|
*/
|
|
64
68
|
includeMultilineExample?: boolean;
|
|
65
69
|
}
|
|
66
|
-
declare const
|
|
70
|
+
declare const yamlXmlProtocol: (_protocolOptions?: YamlXmlProtocolOptions) => TCMCoreProtocol;
|
|
67
71
|
|
|
68
72
|
type DebugLevel = "off" | "stream" | "parse";
|
|
69
73
|
declare function getDebugLevel(): DebugLevel;
|
|
@@ -129,8 +133,8 @@ declare const originalToolsSchema: {
|
|
|
129
133
|
decode: typeof decodeOriginalTools;
|
|
130
134
|
};
|
|
131
135
|
interface EncodedOriginalTool {
|
|
132
|
-
name: string;
|
|
133
136
|
inputSchema: string;
|
|
137
|
+
name: string;
|
|
134
138
|
}
|
|
135
139
|
interface DecodeOriginalToolsOptions {
|
|
136
140
|
onError?: OnErrorFn;
|
|
@@ -170,8 +174,9 @@ declare function wrapGenerate({ protocol, doGenerate, params, }: {
|
|
|
170
174
|
}): Promise<_ai_sdk_provider.LanguageModelV3GenerateResult>;
|
|
171
175
|
|
|
172
176
|
declare const hermesToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
173
|
-
declare const
|
|
174
|
-
declare const
|
|
177
|
+
declare const qwen3CoderToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
178
|
+
declare const morphXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
179
|
+
declare const yamlXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
175
180
|
|
|
176
181
|
declare function wrapStream({ protocol, doStream, doGenerate, params, }: {
|
|
177
182
|
protocol: TCMCoreProtocol;
|
|
@@ -206,10 +211,14 @@ declare function toolChoiceStream({ doGenerate, tools, options, }: {
|
|
|
206
211
|
stream: ReadableStream<LanguageModelV3StreamPart>;
|
|
207
212
|
}>;
|
|
208
213
|
|
|
214
|
+
type ToolResponseUserContentPart = LanguageModelV3TextPart | LanguageModelV3FilePart;
|
|
215
|
+
|
|
216
|
+
type ToolResponsePromptTemplateResult = string | ToolResponseUserContentPart[];
|
|
217
|
+
|
|
209
218
|
declare function createToolMiddleware({ protocol, toolSystemPromptTemplate, toolResponsePromptTemplate, placement, }: {
|
|
210
219
|
protocol: TCMCoreProtocol | (() => TCMCoreProtocol);
|
|
211
220
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
212
|
-
toolResponsePromptTemplate?: (toolResult: ToolResultPart) =>
|
|
221
|
+
toolResponsePromptTemplate?: (toolResult: ToolResultPart) => ToolResponsePromptTemplateResult;
|
|
213
222
|
placement?: "first" | "last";
|
|
214
223
|
}): LanguageModelV3Middleware;
|
|
215
224
|
|
|
@@ -233,7 +242,7 @@ declare function transformParams({ params, protocol, toolSystemPromptTemplate, t
|
|
|
233
242
|
};
|
|
234
243
|
protocol: TCMCoreProtocol | (() => TCMCoreProtocol);
|
|
235
244
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
236
|
-
toolResponsePromptTemplate?: (toolResult: ToolResultPart) =>
|
|
245
|
+
toolResponsePromptTemplate?: (toolResult: ToolResultPart) => ToolResponsePromptTemplateResult;
|
|
237
246
|
placement?: "first" | "last";
|
|
238
247
|
}): {
|
|
239
248
|
prompt: LanguageModelV3Prompt;
|
|
@@ -275,4 +284,4 @@ declare function transformParams({ params, protocol, toolSystemPromptTemplate, t
|
|
|
275
284
|
toolChoice: undefined;
|
|
276
285
|
};
|
|
277
286
|
|
|
278
|
-
export { type DebugLevel, type OnErrorFn$1 as OnErrorFn, type ParserOptions, type TCMCoreProtocol, type TCMProtocol, type ToolCallMiddlewareProviderOptions, type
|
|
287
|
+
export { type DebugLevel, type MorphXmlProtocolOptions, type OnErrorFn$1 as OnErrorFn, type ParserOptions, Qwen3CoderToolParser, type TCMCoreProtocol, type TCMProtocol, type ToolCallMiddlewareProviderOptions, type YamlXmlProtocolOptions, createDynamicIfThenElseSchema, createToolMiddleware, decodeOriginalTools, encodeOriginalTools, escapeRegExp, extractOnErrorOption, extractToolNamesFromOriginalTools, getDebugLevel, getPotentialStartIndex, hasInputProperty, hermesProtocol, hermesToolMiddleware, isProtocolFactory, isTCMProtocolFactory, isToolChoiceActive, isToolResultPart, logParseFailure, logParsedChunk, logParsedSummary, logRawChunk, morphXmlProtocol, morphXmlToolMiddleware, originalToolsSchema, qwen3CoderProtocol, qwen3CoderToolMiddleware, toolChoiceStream, transformParams, uiTarsXmlProtocol, wrapGenerate, wrapStream, yamlXmlProtocol, yamlXmlToolMiddleware };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
2
|
-
import { LanguageModelV3FunctionTool, LanguageModelV3ToolCall, LanguageModelV3Content,
|
|
2
|
+
import { LanguageModelV3FunctionTool, LanguageModelV3StreamPart, LanguageModelV3ToolCall, LanguageModelV3Content, LanguageModelV3ProviderTool, JSONSchema7, LanguageModelV3, LanguageModelV3TextPart, LanguageModelV3FilePart, LanguageModelV3Middleware, LanguageModelV3Prompt, SharedV3ProviderOptions } from '@ai-sdk/provider';
|
|
3
3
|
import { ToolResultPart } from '@ai-sdk/provider-utils';
|
|
4
4
|
export { ParseOptions, parse, stringify, transform } from './rjson.js';
|
|
5
5
|
|
|
@@ -7,45 +7,45 @@ export { ParseOptions, parse, stringify, transform } from './rjson.js';
|
|
|
7
7
|
* Options for parsing tool calls and handling errors
|
|
8
8
|
*/
|
|
9
9
|
interface ParserOptions {
|
|
10
|
-
onError?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
11
10
|
/**
|
|
12
11
|
* When true, stream parsers may emit malformed raw tool-call text as
|
|
13
12
|
* `text-delta` fallback on parse failure. Defaults to false to avoid leaking
|
|
14
13
|
* protocol/internal markup to end users.
|
|
15
14
|
*/
|
|
16
15
|
emitRawToolCallTextOnError?: boolean;
|
|
16
|
+
onError?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
17
17
|
}
|
|
18
18
|
interface TCMProtocol {
|
|
19
|
+
createStreamParser({ tools, options, }: {
|
|
20
|
+
tools: LanguageModelV3FunctionTool[];
|
|
21
|
+
options?: ParserOptions;
|
|
22
|
+
}): TransformStream<LanguageModelV3StreamPart, LanguageModelV3StreamPart>;
|
|
23
|
+
extractToolCallSegments?: ({ text, tools, }: {
|
|
24
|
+
text: string;
|
|
25
|
+
tools: LanguageModelV3FunctionTool[];
|
|
26
|
+
}) => string[];
|
|
27
|
+
formatToolCall(toolCall: LanguageModelV3ToolCall): string;
|
|
19
28
|
formatTools({ tools, toolSystemPromptTemplate, }: {
|
|
20
29
|
tools: LanguageModelV3FunctionTool[];
|
|
21
30
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
22
31
|
}): string;
|
|
23
|
-
formatToolCall(toolCall: LanguageModelV3ToolCall): string;
|
|
24
32
|
parseGeneratedText({ text, tools, options, }: {
|
|
25
33
|
text: string;
|
|
26
34
|
tools: LanguageModelV3FunctionTool[];
|
|
27
35
|
options?: ParserOptions;
|
|
28
36
|
}): LanguageModelV3Content[];
|
|
29
|
-
createStreamParser({ tools, options, }: {
|
|
30
|
-
tools: LanguageModelV3FunctionTool[];
|
|
31
|
-
options?: ParserOptions;
|
|
32
|
-
}): TransformStream<LanguageModelV3StreamPart, LanguageModelV3StreamPart>;
|
|
33
|
-
extractToolCallSegments?: ({ text, tools, }: {
|
|
34
|
-
text: string;
|
|
35
|
-
tools: LanguageModelV3FunctionTool[];
|
|
36
|
-
}) => string[];
|
|
37
37
|
}
|
|
38
38
|
type TCMCoreProtocol = TCMProtocol;
|
|
39
39
|
declare function isProtocolFactory(protocol: TCMProtocol | (() => TCMProtocol)): protocol is () => TCMProtocol;
|
|
40
40
|
declare function isTCMProtocolFactory(protocol: TCMProtocol | (() => TCMProtocol)): protocol is () => TCMProtocol;
|
|
41
41
|
|
|
42
|
-
interface
|
|
43
|
-
toolCallStart?: string;
|
|
42
|
+
interface HermesProtocolOptions {
|
|
44
43
|
toolCallEnd?: string;
|
|
44
|
+
toolCallStart?: string;
|
|
45
45
|
}
|
|
46
|
-
declare const
|
|
46
|
+
declare const hermesProtocol: ({ toolCallStart, toolCallEnd, }?: HermesProtocolOptions) => TCMProtocol;
|
|
47
47
|
|
|
48
|
-
interface
|
|
48
|
+
interface MorphXmlProtocolOptions {
|
|
49
49
|
parseOptions?: {
|
|
50
50
|
repair?: boolean;
|
|
51
51
|
maxReparses?: number;
|
|
@@ -54,16 +54,20 @@ interface XmlProtocolOptions {
|
|
|
54
54
|
[key: string]: unknown;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
declare const
|
|
57
|
+
declare const morphXmlProtocol: (protocolOptions?: MorphXmlProtocolOptions) => TCMCoreProtocol;
|
|
58
|
+
|
|
59
|
+
declare const qwen3CoderProtocol: () => TCMProtocol;
|
|
60
|
+
declare const uiTarsXmlProtocol: () => TCMProtocol;
|
|
61
|
+
declare const Qwen3CoderToolParser: () => TCMProtocol;
|
|
58
62
|
|
|
59
|
-
interface
|
|
63
|
+
interface YamlXmlProtocolOptions {
|
|
60
64
|
/**
|
|
61
65
|
* Whether to include a system prompt example showing YAML multiline syntax.
|
|
62
66
|
* @default true
|
|
63
67
|
*/
|
|
64
68
|
includeMultilineExample?: boolean;
|
|
65
69
|
}
|
|
66
|
-
declare const
|
|
70
|
+
declare const yamlXmlProtocol: (_protocolOptions?: YamlXmlProtocolOptions) => TCMCoreProtocol;
|
|
67
71
|
|
|
68
72
|
type DebugLevel = "off" | "stream" | "parse";
|
|
69
73
|
declare function getDebugLevel(): DebugLevel;
|
|
@@ -129,8 +133,8 @@ declare const originalToolsSchema: {
|
|
|
129
133
|
decode: typeof decodeOriginalTools;
|
|
130
134
|
};
|
|
131
135
|
interface EncodedOriginalTool {
|
|
132
|
-
name: string;
|
|
133
136
|
inputSchema: string;
|
|
137
|
+
name: string;
|
|
134
138
|
}
|
|
135
139
|
interface DecodeOriginalToolsOptions {
|
|
136
140
|
onError?: OnErrorFn;
|
|
@@ -170,8 +174,9 @@ declare function wrapGenerate({ protocol, doGenerate, params, }: {
|
|
|
170
174
|
}): Promise<_ai_sdk_provider.LanguageModelV3GenerateResult>;
|
|
171
175
|
|
|
172
176
|
declare const hermesToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
173
|
-
declare const
|
|
174
|
-
declare const
|
|
177
|
+
declare const qwen3CoderToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
178
|
+
declare const morphXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
179
|
+
declare const yamlXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
|
|
175
180
|
|
|
176
181
|
declare function wrapStream({ protocol, doStream, doGenerate, params, }: {
|
|
177
182
|
protocol: TCMCoreProtocol;
|
|
@@ -206,10 +211,14 @@ declare function toolChoiceStream({ doGenerate, tools, options, }: {
|
|
|
206
211
|
stream: ReadableStream<LanguageModelV3StreamPart>;
|
|
207
212
|
}>;
|
|
208
213
|
|
|
214
|
+
type ToolResponseUserContentPart = LanguageModelV3TextPart | LanguageModelV3FilePart;
|
|
215
|
+
|
|
216
|
+
type ToolResponsePromptTemplateResult = string | ToolResponseUserContentPart[];
|
|
217
|
+
|
|
209
218
|
declare function createToolMiddleware({ protocol, toolSystemPromptTemplate, toolResponsePromptTemplate, placement, }: {
|
|
210
219
|
protocol: TCMCoreProtocol | (() => TCMCoreProtocol);
|
|
211
220
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
212
|
-
toolResponsePromptTemplate?: (toolResult: ToolResultPart) =>
|
|
221
|
+
toolResponsePromptTemplate?: (toolResult: ToolResultPart) => ToolResponsePromptTemplateResult;
|
|
213
222
|
placement?: "first" | "last";
|
|
214
223
|
}): LanguageModelV3Middleware;
|
|
215
224
|
|
|
@@ -233,7 +242,7 @@ declare function transformParams({ params, protocol, toolSystemPromptTemplate, t
|
|
|
233
242
|
};
|
|
234
243
|
protocol: TCMCoreProtocol | (() => TCMCoreProtocol);
|
|
235
244
|
toolSystemPromptTemplate: (tools: LanguageModelV3FunctionTool[]) => string;
|
|
236
|
-
toolResponsePromptTemplate?: (toolResult: ToolResultPart) =>
|
|
245
|
+
toolResponsePromptTemplate?: (toolResult: ToolResultPart) => ToolResponsePromptTemplateResult;
|
|
237
246
|
placement?: "first" | "last";
|
|
238
247
|
}): {
|
|
239
248
|
prompt: LanguageModelV3Prompt;
|
|
@@ -275,4 +284,4 @@ declare function transformParams({ params, protocol, toolSystemPromptTemplate, t
|
|
|
275
284
|
toolChoice: undefined;
|
|
276
285
|
};
|
|
277
286
|
|
|
278
|
-
export { type DebugLevel, type OnErrorFn$1 as OnErrorFn, type ParserOptions, type TCMCoreProtocol, type TCMProtocol, type ToolCallMiddlewareProviderOptions, type
|
|
287
|
+
export { type DebugLevel, type MorphXmlProtocolOptions, type OnErrorFn$1 as OnErrorFn, type ParserOptions, Qwen3CoderToolParser, type TCMCoreProtocol, type TCMProtocol, type ToolCallMiddlewareProviderOptions, type YamlXmlProtocolOptions, createDynamicIfThenElseSchema, createToolMiddleware, decodeOriginalTools, encodeOriginalTools, escapeRegExp, extractOnErrorOption, extractToolNamesFromOriginalTools, getDebugLevel, getPotentialStartIndex, hasInputProperty, hermesProtocol, hermesToolMiddleware, isProtocolFactory, isTCMProtocolFactory, isToolChoiceActive, isToolResultPart, logParseFailure, logParsedChunk, logParsedSummary, logRawChunk, morphXmlProtocol, morphXmlToolMiddleware, originalToolsSchema, qwen3CoderProtocol, qwen3CoderToolMiddleware, toolChoiceStream, transformParams, uiTarsXmlProtocol, wrapGenerate, wrapStream, yamlXmlProtocol, yamlXmlToolMiddleware };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Qwen3CoderToolParser,
|
|
2
3
|
createDynamicIfThenElseSchema,
|
|
3
4
|
createToolMiddleware,
|
|
4
5
|
decodeOriginalTools,
|
|
@@ -8,36 +9,40 @@ import {
|
|
|
8
9
|
getDebugLevel,
|
|
9
10
|
getPotentialStartIndex,
|
|
10
11
|
hasInputProperty,
|
|
12
|
+
hermesProtocol,
|
|
11
13
|
hermesToolMiddleware,
|
|
12
14
|
isProtocolFactory,
|
|
13
15
|
isTCMProtocolFactory,
|
|
14
16
|
isToolChoiceActive,
|
|
15
17
|
isToolResultPart,
|
|
16
|
-
jsonProtocol,
|
|
17
18
|
logParseFailure,
|
|
18
19
|
logParsedChunk,
|
|
19
20
|
logParsedSummary,
|
|
20
21
|
logRawChunk,
|
|
22
|
+
morphXmlProtocol,
|
|
23
|
+
morphXmlToolMiddleware,
|
|
21
24
|
originalToolsSchema,
|
|
25
|
+
qwen3CoderProtocol,
|
|
26
|
+
qwen3CoderToolMiddleware,
|
|
22
27
|
toolChoiceStream,
|
|
23
28
|
transformParams,
|
|
29
|
+
uiTarsXmlProtocol,
|
|
24
30
|
wrapGenerate,
|
|
25
31
|
wrapStream,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
yamlToolMiddleware
|
|
30
|
-
} from "./chunk-ERJKQKCR.js";
|
|
32
|
+
yamlXmlProtocol,
|
|
33
|
+
yamlXmlToolMiddleware
|
|
34
|
+
} from "./chunk-O6NWVXQD.js";
|
|
31
35
|
import {
|
|
32
36
|
escapeRegExp
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MHZC45AC.js";
|
|
34
38
|
import {
|
|
35
39
|
parse,
|
|
36
40
|
stringify,
|
|
37
41
|
transform
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-QBZNMO5C.js";
|
|
43
|
+
import "./chunk-GMTE7BY5.js";
|
|
40
44
|
export {
|
|
45
|
+
Qwen3CoderToolParser,
|
|
41
46
|
createDynamicIfThenElseSchema,
|
|
42
47
|
createToolMiddleware,
|
|
43
48
|
decodeOriginalTools,
|
|
@@ -48,27 +53,30 @@ export {
|
|
|
48
53
|
getDebugLevel,
|
|
49
54
|
getPotentialStartIndex,
|
|
50
55
|
hasInputProperty,
|
|
56
|
+
hermesProtocol,
|
|
51
57
|
hermesToolMiddleware,
|
|
52
58
|
isProtocolFactory,
|
|
53
59
|
isTCMProtocolFactory,
|
|
54
60
|
isToolChoiceActive,
|
|
55
61
|
isToolResultPart,
|
|
56
|
-
jsonProtocol,
|
|
57
62
|
logParseFailure,
|
|
58
63
|
logParsedChunk,
|
|
59
64
|
logParsedSummary,
|
|
60
65
|
logRawChunk,
|
|
66
|
+
morphXmlProtocol,
|
|
67
|
+
morphXmlToolMiddleware,
|
|
61
68
|
originalToolsSchema,
|
|
62
69
|
parse,
|
|
70
|
+
qwen3CoderProtocol,
|
|
71
|
+
qwen3CoderToolMiddleware,
|
|
63
72
|
stringify,
|
|
64
73
|
toolChoiceStream,
|
|
65
74
|
transform,
|
|
66
75
|
transformParams,
|
|
76
|
+
uiTarsXmlProtocol,
|
|
67
77
|
wrapGenerate,
|
|
68
78
|
wrapStream,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
yamlProtocol,
|
|
72
|
-
yamlToolMiddleware
|
|
79
|
+
yamlXmlProtocol,
|
|
80
|
+
yamlXmlToolMiddleware
|
|
73
81
|
};
|
|
74
82
|
//# sourceMappingURL=index.js.map
|