@skilder-ai/runtime 0.7.1 → 0.7.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/dist/index.js +936 -851
- package/dist/index.js.map +4 -4
- package/dist/script-sdk-bundle.cjs +11 -2
- package/package.json +2 -2
|
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/script-sdk/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
callTool: () => callTool
|
|
23
|
+
callTool: () => callTool,
|
|
24
|
+
delegate: () => delegate
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(index_exports);
|
|
26
27
|
|
|
@@ -86,7 +87,15 @@ async function callTool(name, args = {}) {
|
|
|
86
87
|
}
|
|
87
88
|
return result;
|
|
88
89
|
}
|
|
90
|
+
async function delegate(context, options) {
|
|
91
|
+
const result = await sendRequest("delegate", { context, ...options });
|
|
92
|
+
if (!result || typeof result !== "object" || !Array.isArray(result.content)) {
|
|
93
|
+
throw new Error("Invalid CallToolResult received from host");
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
89
97
|
// Annotate the CommonJS export names for ESM import in node:
|
|
90
98
|
0 && (module.exports = {
|
|
91
|
-
callTool
|
|
99
|
+
callTool,
|
|
100
|
+
delegate
|
|
92
101
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skilder-ai/runtime",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Skilder Runtime - NodeJS processes for edge execution connected to backend orchestrator via NATS",
|
|
5
5
|
"author": "Skilder AI",
|
|
6
6
|
"license": "See license in LICENSE",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"esbuild-plugin-tsc": "^0.5.0",
|
|
62
62
|
"inversify": "^7.0.0-alpha.5",
|
|
63
63
|
"reflect-metadata": "^0.2.2",
|
|
64
|
-
"@skilder-ai/common": "0.7.
|
|
64
|
+
"@skilder-ai/common": "0.7.3"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsx tooling/esbuild.build.ts",
|