@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
package/dist/webmcp-full.dev.js
CHANGED
|
@@ -19136,7 +19136,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19136
19136
|
}
|
|
19137
19137
|
return taskValidationResult.data;
|
|
19138
19138
|
}
|
|
19139
|
-
const
|
|
19139
|
+
const hasTools = params.tools || params.toolChoice;
|
|
19140
|
+
const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
|
|
19141
|
+
const validationResult = safeParse(resultSchema, result);
|
|
19140
19142
|
if (!validationResult.success) {
|
|
19141
19143
|
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
19142
19144
|
throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
|
|
@@ -19132,7 +19132,9 @@ class Client extends Protocol {
|
|
|
19132
19132
|
}
|
|
19133
19133
|
return taskValidationResult.data;
|
|
19134
19134
|
}
|
|
19135
|
-
const
|
|
19135
|
+
const hasTools = params.tools || params.toolChoice;
|
|
19136
|
+
const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
|
|
19137
|
+
const validationResult = safeParse(resultSchema, result);
|
|
19136
19138
|
if (!validationResult.success) {
|
|
19137
19139
|
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
19138
19140
|
throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
|