@opentiny/next-sdk 0.2.2 → 0.2.4
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 +635 -5
- package/agent/AgentModelProvider.ts +108 -65
- package/agent/type.ts +1 -1
- package/agent/utils/getAISDKTools.ts +2 -2
- package/dist/agent/AgentModelProvider.d.ts +5 -5
- package/dist/agent/type.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.dev.js +12181 -9736
- package/dist/index.es.js +22179 -20013
- package/dist/index.js +2176 -923
- package/dist/index.umd.dev.js +12210 -9766
- package/dist/index.umd.js +92 -79
- package/dist/{mcpsdk@1.25.2.dev.js → mcpsdk@1.25.3.dev.js} +3 -1
- package/dist/{mcpsdk@1.25.2.es.dev.js → mcpsdk@1.25.3.es.dev.js} +3 -1
- package/dist/{mcpsdk@1.25.2.es.js → mcpsdk@1.25.3.es.js} +1855 -1855
- package/dist/{mcpsdk@1.25.2.js → mcpsdk@1.25.3.js} +13 -13
- package/dist/remoter/createRemoter.d.ts +7 -2
- package/dist/skills/index.d.ts +54 -0
- package/dist/webagent.dev.js +22244 -16351
- package/dist/webagent.es.dev.js +21932 -16038
- package/dist/webagent.es.js +24792 -20100
- package/dist/webagent.js +73 -65
- package/dist/webmcp-full.dev.js +3 -1
- package/dist/webmcp-full.es.dev.js +3 -1
- package/dist/webmcp-full.es.js +523 -523
- package/dist/webmcp-full.js +9 -9
- package/index.ts +14 -0
- package/package.json +21 -6
- package/remoter/createRemoter.ts +75 -40
- package/skills/index.ts +141 -0
|
@@ -18934,7 +18934,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18934
18934
|
}
|
|
18935
18935
|
return taskValidationResult.data;
|
|
18936
18936
|
}
|
|
18937
|
-
const
|
|
18937
|
+
const hasTools = params.tools || params.toolChoice;
|
|
18938
|
+
const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
|
|
18939
|
+
const validationResult = safeParse(resultSchema, result);
|
|
18938
18940
|
if (!validationResult.success) {
|
|
18939
18941
|
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
18940
18942
|
throw new McpError(exports2.ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
|
|
@@ -18930,7 +18930,9 @@ class Client extends Protocol {
|
|
|
18930
18930
|
}
|
|
18931
18931
|
return taskValidationResult.data;
|
|
18932
18932
|
}
|
|
18933
|
-
const
|
|
18933
|
+
const hasTools = params.tools || params.toolChoice;
|
|
18934
|
+
const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
|
|
18935
|
+
const validationResult = safeParse(resultSchema, result);
|
|
18934
18936
|
if (!validationResult.success) {
|
|
18935
18937
|
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
18936
18938
|
throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
|