@easynet/agent-tool 1.0.77 → 1.0.79
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/api/createAgentTools.d.ts.map +1 -1
- package/dist/api/extension/overrideWithConfig.d.ts +1 -5
- package/dist/api/extension/overrideWithConfig.d.ts.map +1 -1
- package/dist/api/main.cjs +18 -17
- package/dist/api/main.js +3 -2
- package/dist/api/register-tools.d.ts +16 -0
- package/dist/api/register-tools.d.ts.map +1 -0
- package/dist/api/runtimeFromConfig.d.ts +9 -0
- package/dist/api/runtimeFromConfig.d.ts.map +1 -1
- package/dist/{chunk-BMAYX22K.js → chunk-42UNSIZJ.js} +9 -8
- package/dist/chunk-42UNSIZJ.js.map +1 -0
- package/dist/chunk-5QH7YY4Z.cjs +101 -0
- package/dist/chunk-5QH7YY4Z.cjs.map +1 -0
- package/dist/{chunk-OKKBKZWK.cjs → chunk-DGE2AHYT.cjs} +24 -122
- package/dist/chunk-DGE2AHYT.cjs.map +1 -0
- package/dist/{chunk-LUKSY7VK.js → chunk-DVYM6VRD.js} +42 -6
- package/dist/chunk-DVYM6VRD.js.map +1 -0
- package/dist/{chunk-CEVOKZFT.cjs → chunk-EIIHED57.cjs} +11 -9
- package/dist/chunk-EIIHED57.cjs.map +1 -0
- package/dist/{chunk-EZDDKTCF.cjs → chunk-GXFDYM3O.cjs} +59 -23
- package/dist/chunk-GXFDYM3O.cjs.map +1 -0
- package/dist/chunk-JZ6LKSAS.js +92 -0
- package/dist/chunk-JZ6LKSAS.js.map +1 -0
- package/dist/{chunk-GSOJCOKN.js → chunk-S4X4NJIP.js} +19 -116
- package/dist/chunk-S4X4NJIP.js.map +1 -0
- package/dist/extension.cjs +20 -19
- package/dist/extension.js +2 -1
- package/dist/index.cjs +30 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/cli/index.cjs +12 -12
- package/dist/utils/cli/index.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-BMAYX22K.js.map +0 -1
- package/dist/chunk-CEVOKZFT.cjs.map +0 -1
- package/dist/chunk-EZDDKTCF.cjs.map +0 -1
- package/dist/chunk-GSOJCOKN.js.map +0 -1
- package/dist/chunk-LUKSY7VK.js.map +0 -1
- package/dist/chunk-OKKBKZWK.cjs.map +0 -1
|
@@ -1753,7 +1753,7 @@ function buildInputSchemaHint(inputSchema) {
|
|
|
1753
1753
|
if (names.length === 0) return null;
|
|
1754
1754
|
return `This tool expects input property ${names.length === 1 ? `'${names[0]}'` : `one of [${names.map((n) => `'${n}'`).join(", ")}]`}. Use the exact property names from the tool schema.`;
|
|
1755
1755
|
}
|
|
1756
|
-
var requireFromPackage = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
1756
|
+
var requireFromPackage = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-EIIHED57.cjs', document.baseURI).href)));
|
|
1757
1757
|
function getProjectRequire() {
|
|
1758
1758
|
const cwd = process.cwd();
|
|
1759
1759
|
if (fs.existsSync(path.join(cwd, "package.json"))) return module$1.createRequire(path.join(cwd, "package.json"));
|
|
@@ -1919,7 +1919,7 @@ function parseNpmDescriptor(entry) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
1921
1921
|
// src/api/runtimeFromConfig.ts
|
|
1922
|
-
var requireFromPackage2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
1922
|
+
var requireFromPackage2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-EIIHED57.cjs', document.baseURI).href)));
|
|
1923
1923
|
var DEFAULT_EXTENSION_PACKAGES = [];
|
|
1924
1924
|
function resolveFileDescriptorPath(descriptor, configFilePath) {
|
|
1925
1925
|
const parsed = parseToolPath(descriptor.trim());
|
|
@@ -1964,7 +1964,7 @@ function loadExtensionFromFileDescriptorSync(descriptor, configFilePath, stepLog
|
|
|
1964
1964
|
const fn = getRegisterFn(mod);
|
|
1965
1965
|
if (typeof fn === "function") {
|
|
1966
1966
|
if (stepLog) stepLog(`Loaded local extension from ${resolvedPath}`);
|
|
1967
|
-
return { register: fn, descriptor: entryStr, resolvedVersion: "local" };
|
|
1967
|
+
return { register: fn, descriptor: entryStr, resolvedVersion: "local", packageRoot: resolvedPath };
|
|
1968
1968
|
}
|
|
1969
1969
|
} catch {
|
|
1970
1970
|
}
|
|
@@ -1989,7 +1989,8 @@ function loadExtensionForDescriptorSync(descriptor, configFilePath, stepLog) {
|
|
|
1989
1989
|
const resolvedVersion = requested ?? installed ?? npm.resolveLatestVersionFromRegistry(parsed.packageName, { cwd: npmCwd });
|
|
1990
1990
|
if (installed === resolvedVersion) {
|
|
1991
1991
|
if (stepLog) stepLog(`Loaded ${parsed.packageName}@${resolvedVersion} from node_modules`);
|
|
1992
|
-
|
|
1992
|
+
const pkgRoot = path.dirname(configRequire.resolve(`${parsed.packageName}/package.json`));
|
|
1993
|
+
return { register: fn, descriptor: entryStr, resolvedVersion, packageRoot: pkgRoot };
|
|
1993
1994
|
}
|
|
1994
1995
|
}
|
|
1995
1996
|
} catch {
|
|
@@ -2007,7 +2008,7 @@ function loadExtensionForDescriptorSync(descriptor, configFilePath, stepLog) {
|
|
|
2007
2008
|
const fn = getRegisterFn(mod);
|
|
2008
2009
|
if (typeof fn === "function") {
|
|
2009
2010
|
const resolvedVersion = path.basename(cacheDir);
|
|
2010
|
-
return { register: fn, descriptor: entryStr, resolvedVersion };
|
|
2011
|
+
return { register: fn, descriptor: entryStr, resolvedVersion, packageRoot: cacheDir };
|
|
2011
2012
|
}
|
|
2012
2013
|
break;
|
|
2013
2014
|
} catch {
|
|
@@ -2071,7 +2072,7 @@ async function loadExtensionForDescriptorAsync(descriptor, configFilePath, stepL
|
|
|
2071
2072
|
const fn = getRegisterFn(mod);
|
|
2072
2073
|
if (typeof fn === "function") {
|
|
2073
2074
|
if (stepLog) stepLog(`Loaded ${parsed.packageName}@${resolvedVersion} from node_modules (async import)`);
|
|
2074
|
-
return { register: fn, descriptor: entryStr, resolvedVersion };
|
|
2075
|
+
return { register: fn, descriptor: entryStr, resolvedVersion, packageRoot };
|
|
2075
2076
|
}
|
|
2076
2077
|
}
|
|
2077
2078
|
} catch {
|
|
@@ -2087,7 +2088,7 @@ async function loadExtensionForDescriptorAsync(descriptor, configFilePath, stepL
|
|
|
2087
2088
|
const fn = getRegisterFn(mod);
|
|
2088
2089
|
if (typeof fn === "function") {
|
|
2089
2090
|
const resolvedVersion = path.basename(cacheDir);
|
|
2090
|
-
return { register: fn, descriptor: entryStr, resolvedVersion };
|
|
2091
|
+
return { register: fn, descriptor: entryStr, resolvedVersion, packageRoot: cacheDir };
|
|
2091
2092
|
}
|
|
2092
2093
|
break;
|
|
2093
2094
|
} catch {
|
|
@@ -2758,10 +2759,11 @@ exports.fileDescriptorToPackagePrefix = fileDescriptorToPackagePrefix;
|
|
|
2758
2759
|
exports.findAndLoadToolConfig = findAndLoadToolConfig;
|
|
2759
2760
|
exports.getDisplayScope = getDisplayScope;
|
|
2760
2761
|
exports.isBarePackageDescriptor = isBarePackageDescriptor;
|
|
2762
|
+
exports.loadAllExtensionsFromToolYamlSync = loadAllExtensionsFromToolYamlSync;
|
|
2761
2763
|
exports.loadToolConfig = loadToolConfig;
|
|
2762
2764
|
exports.npmDescriptorToPackagePrefixWithVersion = npmDescriptorToPackagePrefixWithVersion;
|
|
2763
2765
|
exports.resolveSandboxedPath = resolveSandboxedPath;
|
|
2764
2766
|
exports.resolveToolDescriptor = resolveToolDescriptor;
|
|
2765
2767
|
exports.runMCPServerOverStdio = runMCPServerOverStdio;
|
|
2766
|
-
//# sourceMappingURL=chunk-
|
|
2767
|
-
//# sourceMappingURL=chunk-
|
|
2768
|
+
//# sourceMappingURL=chunk-EIIHED57.cjs.map
|
|
2769
|
+
//# sourceMappingURL=chunk-EIIHED57.cjs.map
|