@ai-sdk-tool/parser 2.1.7 → 3.0.0-canary.1

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.
@@ -7,7 +7,7 @@ import * as _ai_sdk_provider from '@ai-sdk/provider';
7
7
  * Originally contributed by: sijawara
8
8
  * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376
9
9
  */
10
- declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV2Middleware;
10
+ declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
11
11
  /**
12
12
  * A community-contributed middleware that uses morphXmlProtocol
13
13
  * with a more concise system prompt template for function calling.
@@ -15,6 +15,6 @@ declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV
15
15
  * Originally contributed by: sijawara
16
16
  * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376
17
17
  */
18
- declare const sijawaraConciseXmlToolMiddleware: _ai_sdk_provider.LanguageModelV2Middleware;
18
+ declare const sijawaraConciseXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
19
19
 
20
20
  export { sijawaraConciseXmlToolMiddleware, sijawaraDetailedXmlToolMiddleware };
@@ -7,7 +7,7 @@ import * as _ai_sdk_provider from '@ai-sdk/provider';
7
7
  * Originally contributed by: sijawara
8
8
  * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376
9
9
  */
10
- declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV2Middleware;
10
+ declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
11
11
  /**
12
12
  * A community-contributed middleware that uses morphXmlProtocol
13
13
  * with a more concise system prompt template for function calling.
@@ -15,6 +15,6 @@ declare const sijawaraDetailedXmlToolMiddleware: _ai_sdk_provider.LanguageModelV
15
15
  * Originally contributed by: sijawara
16
16
  * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376
17
17
  */
18
- declare const sijawaraConciseXmlToolMiddleware: _ai_sdk_provider.LanguageModelV2Middleware;
18
+ declare const sijawaraConciseXmlToolMiddleware: _ai_sdk_provider.LanguageModelV3Middleware;
19
19
 
20
20
  export { sijawaraConciseXmlToolMiddleware, sijawaraDetailedXmlToolMiddleware };
package/dist/community.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createToolMiddleware,
3
3
  morphXmlProtocol
4
- } from "./chunk-GSD5HDOQ.js";
4
+ } from "./chunk-L4X363EL.js";
5
5
 
6
- // src/community/index.ts
6
+ // src/community/sijawara.ts
7
7
  var sijawaraDetailedXmlToolMiddleware = createToolMiddleware({
8
8
  protocol: morphXmlProtocol,
9
9
  toolSystemPromptTemplate(tools) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/community/index.ts"],"sourcesContent":["import { createToolMiddleware, morphXmlProtocol } from \"../index\";\n\n/**\n * A community-contributed middleware that uses morphXmlProtocol\n * with a more detailed system prompt template for function calling.\n *\n * Originally contributed by: sijawara\n * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376\n */\nexport const sijawaraDetailedXmlToolMiddleware = createToolMiddleware({\n protocol: morphXmlProtocol,\n toolSystemPromptTemplate(tools: string) {\n return `You have access to callable functions (tools).\n Tool list/context:\n ${tools}\n\n ===============================\n TOOL CALLING FORMAT\n ===============================\n - Use the XML-like format for tool calls:\n <tool_name>\n <parameter_name>\n value\n </parameter_name>\n ...\n </tool_name>\n\n ===============================\n ARRAY PARAMETERS\n ===============================\n - For array/multiple values, repeat the parameter for each value.\n - Example:\n <send_messages>\n <recipient>\n alice@example.com\n </recipient>\n <recipient>\n bob@example.com\n </recipient>\n <message>\n Hello!\n </message>\n </send_messages>\n\n ===============================\n SINGLE VALUE PARAMETERS\n ===============================\n - For single values, use one parameter block.\n - Example:\n <get_weather>\n <location>\n San Francisco\n </location>\n </get_weather>\n\n ===============================\n GENERAL RULES\n ===============================\n - First line: tool (function) name in angle brackets.\n - Parameters: each on their own line, in angle brackets, with name and value.\n - Include all required parameters. If info is missing, ask the user.\n - Do NOT use JSON—use only the specified XML-like format for tool calls.\n - If no call is needed, reply without a tool call.`;\n },\n});\n\n/**\n * A community-contributed middleware that uses morphXmlProtocol\n * with a more concise system prompt template for function calling.\n *\n * Originally contributed by: sijawara\n * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376\n */\nexport const sijawaraConciseXmlToolMiddleware = createToolMiddleware({\n protocol: morphXmlProtocol,\n toolSystemPromptTemplate(tools: string) {\n return `You have access to callable functions (tools).\n Tool list/context:\n ${tools}\n\n STRICT CALLING RULES:\n - Use the XML-like format for tool calls:\n\n <tool_name>\n <parameter_name>\n value\n </parameter_name>\n ...\n </tool_name>\n\n - First line: the tool (function) name in angle brackets.\n - Parameters: each in their own angle brackets with name and value.\n - Include all required parameters. If info is missing, ask the user.\n - Do NOT use JSON. Use only the specified XML-like format.\n - If no call is needed, reply without a tool call.\n\n Example:\n <get_weather>\n <location>\n San Francisco\n </location>\n </get_weather>`;\n },\n});\n"],"mappings":";;;;;;AASO,IAAM,oCAAoC,qBAAqB;AAAA,EACpE,UAAU;AAAA,EACV,yBAAyB,OAAe;AACtC,WAAO;AAAA;AAAA,MAEL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiDT;AACF,CAAC;AASM,IAAM,mCAAmC,qBAAqB;AAAA,EACnE,UAAU;AAAA,EACV,yBAAyB,OAAe;AACtC,WAAO;AAAA;AAAA,MAEL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBT;AACF,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/community/sijawara.ts"],"sourcesContent":["import { createToolMiddleware, morphXmlProtocol } from \"../index\";\n\n/**\n * A community-contributed middleware that uses morphXmlProtocol\n * with a more detailed system prompt template for function calling.\n *\n * Originally contributed by: sijawara\n * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376\n */\nexport const sijawaraDetailedXmlToolMiddleware = createToolMiddleware({\n protocol: morphXmlProtocol,\n toolSystemPromptTemplate(tools: string) {\n return `You have access to callable functions (tools).\n Tool list/context:\n ${tools}\n\n ===============================\n TOOL CALLING FORMAT\n ===============================\n - Use the XML-like format for tool calls:\n <tool_name>\n <parameter_name>\n value\n </parameter_name>\n ...\n </tool_name>\n\n ===============================\n ARRAY PARAMETERS\n ===============================\n - For array/multiple values, repeat the parameter for each value.\n - Example:\n <send_messages>\n <recipient>\n alice@example.com\n </recipient>\n <recipient>\n bob@example.com\n </recipient>\n <message>\n Hello!\n </message>\n </send_messages>\n\n ===============================\n SINGLE VALUE PARAMETERS\n ===============================\n - For single values, use one parameter block.\n - Example:\n <get_weather>\n <location>\n San Francisco\n </location>\n </get_weather>\n\n ===============================\n GENERAL RULES\n ===============================\n - First line: tool (function) name in angle brackets.\n - Parameters: each on their own line, in angle brackets, with name and value.\n - Include all required parameters. If info is missing, ask the user.\n - Do NOT use JSON—use only the specified XML-like format for tool calls.\n - If no call is needed, reply without a tool call.`;\n },\n});\n\n/**\n * A community-contributed middleware that uses morphXmlProtocol\n * with a more concise system prompt template for function calling.\n *\n * Originally contributed by: sijawara\n * Source: https://github.com/minpeter/ai-sdk-tool-call-middleware/issues/51#issuecomment-3234519376\n */\nexport const sijawaraConciseXmlToolMiddleware = createToolMiddleware({\n protocol: morphXmlProtocol,\n toolSystemPromptTemplate(tools: string) {\n return `You have access to callable functions (tools).\n Tool list/context:\n ${tools}\n\n STRICT CALLING RULES:\n - Use the XML-like format for tool calls:\n\n <tool_name>\n <parameter_name>\n value\n </parameter_name>\n ...\n </tool_name>\n\n - First line: the tool (function) name in angle brackets.\n - Parameters: each in their own angle brackets with name and value.\n - Include all required parameters. If info is missing, ask the user.\n - Do NOT use JSON. Use only the specified XML-like format.\n - If no call is needed, reply without a tool call.\n\n Example:\n <get_weather>\n <location>\n San Francisco\n </location>\n </get_weather>`;\n },\n});\n"],"mappings":";;;;;;AASO,IAAM,oCAAoC,qBAAqB;AAAA,EACpE,UAAU;AAAA,EACV,yBAAyB,OAAe;AACtC,WAAO;AAAA;AAAA,MAEL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiDT;AACF,CAAC;AASM,IAAM,mCAAmC,qBAAqB;AAAA,EACnE,UAAU;AAAA,EACV,yBAAyB,OAAe;AACtC,WAAO;AAAA;AAAA,MAEL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBT;AACF,CAAC;","names":[]}