@easynet/agent-tool 1.0.94 → 1.0.95
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/agent-context.d.ts +1 -1
- package/dist/agent-context.d.ts.map +1 -1
- package/dist/build.cjs +5 -5
- package/dist/build.js +2 -2
- package/dist/{chunk-BMU5SD2G.cjs → chunk-2TFGOUXN.cjs} +10 -10
- package/dist/chunk-2TFGOUXN.cjs.map +1 -0
- package/dist/{chunk-2YP4Q4BW.js → chunk-34SG3EMW.js} +3 -3
- package/dist/{chunk-2YP4Q4BW.js.map → chunk-34SG3EMW.js.map} +1 -1
- package/dist/{chunk-QYY6PNIB.cjs → chunk-HMC5G5FQ.cjs} +4 -4
- package/dist/chunk-HMC5G5FQ.cjs.map +1 -0
- package/dist/{chunk-IJVVH4JN.js → chunk-JEOBJ37J.js} +3 -3
- package/dist/chunk-JEOBJ37J.js.map +1 -0
- package/dist/{chunk-SNN4QJ5Z.js → chunk-POUTZDWB.js} +3 -3
- package/dist/chunk-POUTZDWB.js.map +1 -0
- package/dist/{chunk-LKE7PMRB.cjs → chunk-VLV5F6HX.cjs} +4 -4
- package/dist/chunk-VLV5F6HX.cjs.map +1 -0
- package/dist/{chunk-Z6FD2GKB.js → chunk-WCMZLN3F.js} +4 -4
- package/dist/chunk-WCMZLN3F.js.map +1 -0
- package/dist/{chunk-ZDEQREVL.cjs → chunk-XUIGSBWG.cjs} +7 -7
- package/dist/{chunk-ZDEQREVL.cjs.map → chunk-XUIGSBWG.cjs.map} +1 -1
- package/dist/index.cjs +21 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +6 -6
- package/dist/sdk.js +2 -2
- package/dist/utils/cli/index.cjs +17 -17
- package/dist/utils/cli/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-BMU5SD2G.cjs.map +0 -1
- package/dist/chunk-IJVVH4JN.js.map +0 -1
- package/dist/chunk-LKE7PMRB.cjs.map +0 -1
- package/dist/chunk-QYY6PNIB.cjs.map +0 -1
- package/dist/chunk-SNN4QJ5Z.js.map +0 -1
- package/dist/chunk-Z6FD2GKB.js.map +0 -1
package/dist/agent-context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-context.d.ts","sourceRoot":"","sources":["../src/agent-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-context.d.ts","sourceRoot":"","sources":["../src/agent-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AActF,wBAAgB,sBAAsB,IAAI,YAAY,CAQrD"}
|
package/dist/build.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkXUIGSBWG_cjs = require('./chunk-XUIGSBWG.cjs');
|
|
4
|
+
require('./chunk-VLV5F6HX.cjs');
|
|
5
5
|
var chunkJW4EMVTE_cjs = require('./chunk-JW4EMVTE.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "buildMCPPackage", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkXUIGSBWG_cjs.buildMCPPackage; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "initProject", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkXUIGSBWG_cjs.initProject; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "runMCPServer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkXUIGSBWG_cjs.runMCPServer; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "scan", {
|
|
22
22
|
enumerable: true,
|
package/dist/build.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { buildMCPPackage, initProject, runMCPServer } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { buildMCPPackage, initProject, runMCPServer } from './chunk-34SG3EMW.js';
|
|
2
|
+
import './chunk-POUTZDWB.js';
|
|
3
3
|
export { scan, scanForTools } from './chunk-BDUSB6GT.js';
|
|
4
4
|
//# sourceMappingURL=build.js.map
|
|
5
5
|
//# sourceMappingURL=build.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVLV5F6HX_cjs = require('./chunk-VLV5F6HX.cjs');
|
|
4
4
|
var chunkAGLGFQUW_cjs = require('./chunk-AGLGFQUW.cjs');
|
|
5
5
|
var chunkJW4EMVTE_cjs = require('./chunk-JW4EMVTE.cjs');
|
|
6
6
|
var chunkUUNG3GL3_cjs = require('./chunk-UUNG3GL3.cjs');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
var path = require('path');
|
|
9
|
-
var
|
|
9
|
+
var config = require('@easynet/agent-common/config');
|
|
10
10
|
var module$1 = require('module');
|
|
11
11
|
var url = require('url');
|
|
12
12
|
var Ajv = require('ajv');
|
|
@@ -49,7 +49,7 @@ function normalizeOpenApiConfig(raw) {
|
|
|
49
49
|
function loadToolConfig(toolYamlPath) {
|
|
50
50
|
const abs = path.resolve(toolYamlPath);
|
|
51
51
|
const raw = fs.readFileSync(abs, "utf8");
|
|
52
|
-
const parsed =
|
|
52
|
+
const parsed = config.parseYamlContent(raw, {
|
|
53
53
|
substituteEnv: false
|
|
54
54
|
});
|
|
55
55
|
if (!parsed || typeof parsed !== "object") return {};
|
|
@@ -91,7 +91,7 @@ function loadToolConfig(toolYamlPath) {
|
|
|
91
91
|
}
|
|
92
92
|
function resolveSandboxedPath(toolYamlPath, sandboxedPath) {
|
|
93
93
|
const configDir = path.dirname(path.resolve(toolYamlPath));
|
|
94
|
-
return
|
|
94
|
+
return config.resolveConfigPath(sandboxedPath, configDir, {
|
|
95
95
|
expandHome: true
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -1909,7 +1909,7 @@ async function importFromCache(packageRoot) {
|
|
|
1909
1909
|
fileUrl
|
|
1910
1910
|
);
|
|
1911
1911
|
}
|
|
1912
|
-
var requireFromPackage = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
1912
|
+
var requireFromPackage = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-2TFGOUXN.cjs', document.baseURI).href)));
|
|
1913
1913
|
function getProjectRequire() {
|
|
1914
1914
|
const cwd = process.cwd();
|
|
1915
1915
|
if (fs.existsSync(path.join(cwd, "package.json"))) return module$1.createRequire(path.join(cwd, "package.json"));
|
|
@@ -2075,7 +2075,7 @@ function parseNpmDescriptor(entry) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
|
|
2077
2077
|
// src/api/runtimeFromConfig.ts
|
|
2078
|
-
var requireFromPackage2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
2078
|
+
var requireFromPackage2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-2TFGOUXN.cjs', document.baseURI).href)));
|
|
2079
2079
|
var DEFAULT_EXTENSION_PACKAGES = [];
|
|
2080
2080
|
function resolveFileDescriptorPath(descriptor, configFilePath) {
|
|
2081
2081
|
const parsed = parseToolPath(descriptor.trim());
|
|
@@ -2259,7 +2259,7 @@ async function loadLocalDirectoryForFileDescriptor(descriptor, configFilePath, s
|
|
|
2259
2259
|
if (!resolvedPath || !fs.existsSync(resolvedPath) || !fs.statSync(resolvedPath).isDirectory()) return null;
|
|
2260
2260
|
if (fs.existsSync(path.join(resolvedPath, "package.json"))) return null;
|
|
2261
2261
|
const scanErrors = [];
|
|
2262
|
-
const scanner = new
|
|
2262
|
+
const scanner = new chunkVLV5F6HX_cjs.DirectoryScanner({
|
|
2263
2263
|
roots: [{ path: resolvedPath, namespace: "local" }],
|
|
2264
2264
|
onError: (toolDir, error) => scanErrors.push(`${toolDir}: ${error.message}`)
|
|
2265
2265
|
});
|
|
@@ -2465,7 +2465,7 @@ async function createMcpServerWithTools(runtime, options) {
|
|
|
2465
2465
|
async (args) => {
|
|
2466
2466
|
const ctx = ctxFactory();
|
|
2467
2467
|
const result = await runtime.invoke(
|
|
2468
|
-
{ tool: spec.name, args: args ?? {}, purpose:
|
|
2468
|
+
{ tool: spec.name, args: args ?? {}, purpose: chunkVLV5F6HX_cjs.MCP_KIND },
|
|
2469
2469
|
ctx
|
|
2470
2470
|
);
|
|
2471
2471
|
if (result.ok) {
|
|
@@ -2957,5 +2957,5 @@ exports.resolveSandboxedPath = resolveSandboxedPath;
|
|
|
2957
2957
|
exports.resolveToolDescriptor = resolveToolDescriptor;
|
|
2958
2958
|
exports.runMCPServerOverStdio = runMCPServerOverStdio;
|
|
2959
2959
|
exports.toToolObservationText = toToolObservationText;
|
|
2960
|
-
//# sourceMappingURL=chunk-
|
|
2961
|
-
//# sourceMappingURL=chunk-
|
|
2960
|
+
//# sourceMappingURL=chunk-2TFGOUXN.cjs.map
|
|
2961
|
+
//# sourceMappingURL=chunk-2TFGOUXN.cjs.map
|