linkque-cli-v2 1.0.2-beta.1 → 1.0.2-beta.3
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/package.json +1 -1
- package/worker.js +0 -16
package/package.json
CHANGED
package/worker.js
CHANGED
|
@@ -15836,14 +15836,6 @@ async function executeHomeData(input) {
|
|
|
15836
15836
|
if (!handle) {
|
|
15837
15837
|
return failure("TOOL_NOT_ALLOWED", "MCP \u5DE5\u5177\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528", false);
|
|
15838
15838
|
}
|
|
15839
|
-
if (handle.readOnly !== true) {
|
|
15840
|
-
return failure("TOOL_NOT_READ_ONLY", "\u9996\u9875\u5361\u7247\u53EA\u80FD\u8C03\u7528\u660E\u786E\u58F0\u660E\u4E3A\u53EA\u8BFB\u7684\u5DE5\u5177", false);
|
|
15841
|
-
}
|
|
15842
|
-
const inputSchema = cloneJsonObject(handle.inputSchema);
|
|
15843
|
-
const outputSchema = cloneJsonObject(handle.outputSchema);
|
|
15844
|
-
if (!inputSchema || !outputSchema) {
|
|
15845
|
-
return failure("INVALID_OUTPUT", "\u9996\u9875\u5361\u7247\u8981\u6C42 MCP \u5DE5\u5177\u58F0\u660E\u5B8C\u6574\u7684\u8F93\u5165\u548C\u8F93\u51FA Schema", false);
|
|
15846
|
-
}
|
|
15847
15839
|
const toolInput = {};
|
|
15848
15840
|
for (const mapping of request.binding.input) {
|
|
15849
15841
|
let value;
|
|
@@ -15862,10 +15854,6 @@ async function executeHomeData(input) {
|
|
|
15862
15854
|
return failure("INVALID_INPUT", `\u65E0\u6CD5\u751F\u6210 MCP \u5165\u53C2 ${mapping.target}`, false);
|
|
15863
15855
|
}
|
|
15864
15856
|
}
|
|
15865
|
-
const inputIssues = validateJsonSchemaValue(inputSchema, toolInput);
|
|
15866
|
-
if (inputIssues.length > 0) {
|
|
15867
|
-
return failure("INVALID_INPUT", inputIssues[0].message, false);
|
|
15868
|
-
}
|
|
15869
15857
|
let result;
|
|
15870
15858
|
try {
|
|
15871
15859
|
result = await handle.execute(toolInput, input.signal);
|
|
@@ -15873,10 +15861,6 @@ async function executeHomeData(input) {
|
|
|
15873
15861
|
return failure("EXECUTION_FAILED", error40 instanceof Error ? error40.message : "MCP \u5DE5\u5177\u8C03\u7528\u5931\u8D25", true);
|
|
15874
15862
|
}
|
|
15875
15863
|
const structured = readStructuredContent2(result);
|
|
15876
|
-
const outputIssues = validateJsonSchemaValue(outputSchema, structured);
|
|
15877
|
-
if (outputIssues.length > 0) {
|
|
15878
|
-
return failure("INVALID_OUTPUT", outputIssues[0].message, false);
|
|
15879
|
-
}
|
|
15880
15864
|
let cardData = structured;
|
|
15881
15865
|
if (request.binding.transform) {
|
|
15882
15866
|
try {
|