@easynet/agent-tool 1.0.97 → 1.0.98
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 +16 -13
- package/config/tool.yaml +4 -5
- package/dist/agent-context.d.ts +1 -1
- package/dist/agent-context.d.ts.map +1 -1
- package/dist/api/createAgentTools.d.ts.map +1 -1
- package/dist/api/expose/extension-init/initExtension.d.ts.map +1 -1
- package/dist/api/extension/registerExtension.d.ts +1 -0
- package/dist/api/extension/registerExtension.d.ts.map +1 -1
- package/dist/{chunk-2TFGOUXN.cjs → chunk-GNYBAJZZ.cjs} +30 -52
- package/dist/chunk-GNYBAJZZ.cjs.map +1 -0
- package/dist/{chunk-WCMZLN3F.js → chunk-ODML7BYU.js} +27 -50
- package/dist/chunk-ODML7BYU.js.map +1 -0
- package/dist/index.cjs +111 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +102 -42
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +15 -5
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.js +15 -5
- package/dist/sdk.js.map +1 -1
- package/dist/tools/util/toolConfig.d.ts +5 -41
- package/dist/tools/util/toolConfig.d.ts.map +1 -1
- package/dist/tools/util/toolDescriptor.d.ts +1 -1
- package/dist/utils/cli/index.cjs +16 -17
- package/dist/utils/cli/index.cjs.map +1 -1
- package/dist/utils/cli/index.js +5 -6
- package/dist/utils/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2TFGOUXN.cjs.map +0 -1
- package/dist/chunk-WCMZLN3F.js.map +0 -1
package/README.md
CHANGED
|
@@ -15,12 +15,16 @@
|
|
|
15
15
|
Create `tool.yaml`:
|
|
16
16
|
|
|
17
17
|
```yaml
|
|
18
|
-
|
|
18
|
+
apiVersion: easynet.world/v1
|
|
19
|
+
kind: ToolConfig
|
|
20
|
+
metadata:
|
|
21
|
+
name: agent-tool-default
|
|
22
|
+
spec:
|
|
19
23
|
sandboxedPath: .
|
|
20
24
|
allowedHosts: []
|
|
21
25
|
blockedHosts: []
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
tools:
|
|
27
|
+
npm:@easynet/agent-tool-buildin: {}
|
|
24
28
|
```
|
|
25
29
|
|
|
26
30
|
Load tools:
|
|
@@ -45,18 +49,17 @@ kind: ToolConfig
|
|
|
45
49
|
metadata:
|
|
46
50
|
name: agent-tool-default
|
|
47
51
|
spec:
|
|
52
|
+
sandboxedPath: .
|
|
53
|
+
allowedHosts: []
|
|
54
|
+
blockedHosts: []
|
|
48
55
|
tools:
|
|
49
|
-
|
|
50
|
-
allowedHosts: []
|
|
51
|
-
blockedHosts: []
|
|
52
|
-
list:
|
|
53
|
-
- npm:@easynet/agent-tool-buildin
|
|
56
|
+
npm:@easynet/agent-tool-buildin: {}
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
Explanation:
|
|
57
60
|
|
|
58
|
-
- `spec.
|
|
59
|
-
- `spec.
|
|
60
|
-
- `spec.
|
|
61
|
-
- `spec.tools
|
|
62
|
-
- `npm:@easynet/agent-tool-buildin`: load the built-in tool extension package.
|
|
61
|
+
- `spec.sandboxedPath`: root directory allowed for filesystem tools.
|
|
62
|
+
- `spec.allowedHosts`: allowlist for outbound HTTP tools.
|
|
63
|
+
- `spec.blockedHosts`: denylist for outbound HTTP tools.
|
|
64
|
+
- `spec.tools`: keyed by tool source descriptor.
|
|
65
|
+
- `npm:@easynet/agent-tool-buildin: {}`: load the built-in tool extension package with default config.
|
package/config/tool.yaml
CHANGED
|
@@ -3,9 +3,8 @@ kind: ToolConfig
|
|
|
3
3
|
metadata:
|
|
4
4
|
name: agent-tool-default
|
|
5
5
|
spec:
|
|
6
|
+
sandboxedPath: .
|
|
7
|
+
allowedHosts: []
|
|
8
|
+
blockedHosts: []
|
|
6
9
|
tools:
|
|
7
|
-
|
|
8
|
-
allowedHosts: []
|
|
9
|
-
blockedHosts: []
|
|
10
|
-
list:
|
|
11
|
-
- npm:@easynet/agent-tool-buildin
|
|
10
|
+
npm:@easynet/agent-tool-buildin: {}
|
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,uBAAuB,CAAC;AAc9E,wBAAgB,sBAAsB,IAAI,YAAY,CAQrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAgentTools.d.ts","sourceRoot":"","sources":["../../src/api/createAgentTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,wBAAwB,CAAC;AAEpF,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"createAgentTools.d.ts","sourceRoot":"","sources":["../../src/api/createAgentTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,wBAAwB,CAAC;AAEpF,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAOrE,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,2GAA2G;IAC3G,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoRD;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,CAAC,EAAE,uBAAuB,GAAG,MAAM,GACzC,uBAAuB,EAAE,CAa3B;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CACnC,OAAO,CAAC,EAAE,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,GAAG,MAAM,GAC9D,OAAO,CAAC,SAAS,CAAC,CAWpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,CAAC,EAAE,CAAC,uBAAuB,GAAG,wBAAwB,CAAC,GAAG,MAAM,GACtE,OAAO,CAAC,iBAAiB,CAAC,CAW5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initExtension.d.ts","sourceRoot":"","sources":["../../../../src/api/expose/extension-init/initExtension.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"initExtension.d.ts","sourceRoot":"","sources":["../../../../src/api/expose/extension-init/initExtension.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8KD;;;GAGG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAuBzD"}
|
|
@@ -21,6 +21,7 @@ export interface RegisterExtensionOptions<TContext> {
|
|
|
21
21
|
/** Filter: only register tools whose name starts with one of these prefixes. */
|
|
22
22
|
namePrefixes?: string[];
|
|
23
23
|
}
|
|
24
|
+
export declare function deriveConfigPrefixCandidates(prefixWithVersion: string): string[];
|
|
24
25
|
/**
|
|
25
26
|
* Load manifest from package (pre-built JSON; no @tool scanning). Register all specs, create and return adapter.
|
|
26
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerExtension.d.ts","sourceRoot":"","sources":["../../../src/api/extension/registerExtension.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,MAAM,WAAW,wBAAwB,CAAC,QAAQ;IAChD,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+IAA+I;IAC/I,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,EAC1F,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GAC1C,WAAW,
|
|
1
|
+
{"version":3,"file":"registerExtension.d.ts","sourceRoot":"","sources":["../../../src/api/extension/registerExtension.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,MAAM,WAAW,wBAAwB,CAAC,QAAQ;IAChD,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+IAA+I;IAC/I,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAgB,4BAA4B,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,CAUhF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,EAC1F,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GAC1C,WAAW,CA8Db"}
|
|
@@ -46,6 +46,20 @@ function normalizeOpenApiConfig(raw) {
|
|
|
46
46
|
if (typeof source.port === "number" && Number.isFinite(source.port)) out.port = source.port;
|
|
47
47
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
48
48
|
}
|
|
49
|
+
function normalizeToolSources(raw) {
|
|
50
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
|
|
51
|
+
const out = {};
|
|
52
|
+
for (const [sourceKey, sourceValue] of Object.entries(raw)) {
|
|
53
|
+
if (!sourceValue || typeof sourceValue !== "object" || Array.isArray(sourceValue)) continue;
|
|
54
|
+
const toolMap = {};
|
|
55
|
+
for (const [toolName, toolValue] of Object.entries(sourceValue)) {
|
|
56
|
+
if (!toolValue || typeof toolValue !== "object" || Array.isArray(toolValue)) continue;
|
|
57
|
+
toolMap[toolName] = toolValue;
|
|
58
|
+
}
|
|
59
|
+
out[sourceKey] = toolMap;
|
|
60
|
+
}
|
|
61
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
62
|
+
}
|
|
49
63
|
function loadToolConfig(toolYamlPath) {
|
|
50
64
|
const abs = path.resolve(toolYamlPath);
|
|
51
65
|
const raw = fs.readFileSync(abs, "utf8");
|
|
@@ -54,41 +68,21 @@ function loadToolConfig(toolYamlPath) {
|
|
|
54
68
|
});
|
|
55
69
|
if (!parsed || typeof parsed !== "object") return {};
|
|
56
70
|
const source = parsed.spec && typeof parsed.spec === "object" && !Array.isArray(parsed.spec) ? parsed.spec : parsed;
|
|
57
|
-
const mcpConfig = normalizeMcpConfig(source.expose?.mcp ?? source.mcp);
|
|
58
|
-
const openApiConfig = normalizeOpenApiConfig(source.expose?.openapi ?? source.openapi);
|
|
59
|
-
const toolsBlock = source.tools;
|
|
60
|
-
if (toolsBlock != null && typeof toolsBlock === "object" && !Array.isArray(toolsBlock)) {
|
|
61
|
-
const toolDefaults = toolsBlock.defaults != null && typeof toolsBlock.defaults === "object" && !Array.isArray(toolsBlock.defaults) ? toolsBlock.defaults : void 0;
|
|
62
|
-
const packageToolDefaults2 = toolsBlock.packages != null && typeof toolsBlock.packages === "object" && !Array.isArray(toolsBlock.packages) ? toolsBlock.packages : void 0;
|
|
63
|
-
const list2 = Array.isArray(toolsBlock.list) && toolsBlock.list.length > 0 ? toolsBlock.list : void 0;
|
|
64
|
-
return {
|
|
65
|
-
tools: list2 ?? (packageToolDefaults2 ? Object.keys(packageToolDefaults2) : void 0),
|
|
66
|
-
sandboxedPath: typeof toolsBlock.sandboxedPath === "string" ? toolsBlock.sandboxedPath : source.sandboxedPath,
|
|
67
|
-
enableSandboxValidation: typeof toolsBlock.enableSandboxValidation === "boolean" ? toolsBlock.enableSandboxValidation : source.enableSandboxValidation,
|
|
68
|
-
allowedHosts: Array.isArray(toolsBlock.allowedHosts) ? toolsBlock.allowedHosts : source.allowedHosts,
|
|
69
|
-
blockedHosts: Array.isArray(toolsBlock.blockedHosts) ? toolsBlock.blockedHosts : source.blockedHosts,
|
|
70
|
-
blockedCidrs: Array.isArray(toolsBlock.blockedCidrs) ? toolsBlock.blockedCidrs : source.blockedCidrs,
|
|
71
|
-
toolDefaults,
|
|
72
|
-
packageToolDefaults: packageToolDefaults2,
|
|
73
|
-
mcp: mcpConfig,
|
|
74
|
-
openapi: openApiConfig
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const packageToolDefaults = typeof source.packageToolDefaults === "object" && !Array.isArray(source.packageToolDefaults) ? source.packageToolDefaults : void 0;
|
|
78
|
-
const list = Array.isArray(source.tools) && source.tools.length > 0 ? source.tools : void 0;
|
|
79
71
|
return {
|
|
80
|
-
|
|
81
|
-
sandboxedPath: source.sandboxedPath,
|
|
72
|
+
sandboxedPath: typeof source.sandboxedPath === "string" ? source.sandboxedPath : void 0,
|
|
82
73
|
enableSandboxValidation: typeof source.enableSandboxValidation === "boolean" ? source.enableSandboxValidation : void 0,
|
|
83
74
|
allowedHosts: Array.isArray(source.allowedHosts) ? source.allowedHosts : void 0,
|
|
84
75
|
blockedHosts: Array.isArray(source.blockedHosts) ? source.blockedHosts : void 0,
|
|
85
76
|
blockedCidrs: Array.isArray(source.blockedCidrs) ? source.blockedCidrs : void 0,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
openapi: openApiConfig
|
|
77
|
+
tools: normalizeToolSources(source.tools),
|
|
78
|
+
mcp: normalizeMcpConfig(source.expose?.mcp ?? source.mcp),
|
|
79
|
+
openapi: normalizeOpenApiConfig(source.expose?.openapi ?? source.openapi)
|
|
90
80
|
};
|
|
91
81
|
}
|
|
82
|
+
function getToolSourceDescriptors(config, options) {
|
|
83
|
+
const includeSelf = options?.includeSelf ?? false;
|
|
84
|
+
return Object.keys(config.tools ?? {}).filter((key) => includeSelf || key !== "self");
|
|
85
|
+
}
|
|
92
86
|
function resolveSandboxedPath(toolYamlPath, sandboxedPath) {
|
|
93
87
|
const configDir = path.dirname(path.resolve(toolYamlPath));
|
|
94
88
|
return config.resolveConfigPath(sandboxedPath, configDir, {
|
|
@@ -182,23 +176,6 @@ function npmDescriptorToPackagePrefix(descriptor) {
|
|
|
182
176
|
if (!normalized) return "";
|
|
183
177
|
return "npm." + normalized;
|
|
184
178
|
}
|
|
185
|
-
function npmDescriptorToPackagePrefixWithVersion(descriptor) {
|
|
186
|
-
const s = descriptor.trim();
|
|
187
|
-
if (typeof s !== "string" || !s.startsWith("npm:")) return "";
|
|
188
|
-
const rest = s.slice(4).trim();
|
|
189
|
-
const hashIdx = rest.indexOf("#");
|
|
190
|
-
const beforeHash = hashIdx < 0 ? rest : rest.slice(0, hashIdx);
|
|
191
|
-
const lastAt = beforeHash.lastIndexOf("@");
|
|
192
|
-
const scopeAndPackage = lastAt <= 0 ? beforeHash : beforeHash.slice(0, lastAt);
|
|
193
|
-
const version = lastAt <= 0 ? "" : beforeHash.slice(lastAt + 1).trim();
|
|
194
|
-
const slashIdx = scopeAndPackage.indexOf("/");
|
|
195
|
-
const scope = slashIdx < 0 ? scopeAndPackage : scopeAndPackage.slice(0, slashIdx).replace(/^@/, "");
|
|
196
|
-
const pkg = slashIdx < 0 ? "" : scopeAndPackage.slice(slashIdx + 1);
|
|
197
|
-
const segment = [scope, pkg, version].filter(Boolean).join(".");
|
|
198
|
-
const normalized = chunkJW4EMVTE_cjs.normalizeToolName(segment);
|
|
199
|
-
if (!normalized) return "";
|
|
200
|
-
return "npm." + normalized;
|
|
201
|
-
}
|
|
202
179
|
function getDisplayScope(registryName, _kind, _toolVersion) {
|
|
203
180
|
const i = registryName.indexOf(".");
|
|
204
181
|
return i < 0 ? registryName : registryName.slice(0, i);
|
|
@@ -1909,7 +1886,7 @@ async function importFromCache(packageRoot) {
|
|
|
1909
1886
|
fileUrl
|
|
1910
1887
|
);
|
|
1911
1888
|
}
|
|
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-
|
|
1889
|
+
var requireFromPackage = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-GNYBAJZZ.cjs', document.baseURI).href)));
|
|
1913
1890
|
function getProjectRequire() {
|
|
1914
1891
|
const cwd = process.cwd();
|
|
1915
1892
|
if (fs.existsSync(path.join(cwd, "package.json"))) return module$1.createRequire(path.join(cwd, "package.json"));
|
|
@@ -2075,7 +2052,7 @@ function parseNpmDescriptor(entry) {
|
|
|
2075
2052
|
}
|
|
2076
2053
|
|
|
2077
2054
|
// 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-
|
|
2055
|
+
var requireFromPackage2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-GNYBAJZZ.cjs', document.baseURI).href)));
|
|
2079
2056
|
var DEFAULT_EXTENSION_PACKAGES = [];
|
|
2080
2057
|
function resolveFileDescriptorPath(descriptor, configFilePath) {
|
|
2081
2058
|
const parsed = parseToolPath(descriptor.trim());
|
|
@@ -2178,7 +2155,7 @@ function loadAllExtensionsFromToolYamlSync(configFilePath, stepLog) {
|
|
|
2178
2155
|
const localPath = path.isAbsolute(configFilePath) ? configFilePath : path.resolve(process.cwd(), configFilePath);
|
|
2179
2156
|
if (!fs.existsSync(localPath)) return [];
|
|
2180
2157
|
const config = loadToolConfig(localPath);
|
|
2181
|
-
const tools = config
|
|
2158
|
+
const tools = getToolSourceDescriptors(config);
|
|
2182
2159
|
if (!Array.isArray(tools) || tools.length === 0) return [];
|
|
2183
2160
|
if (stepLog) stepLog("Loading extensions from tool.yaml (npm + file)");
|
|
2184
2161
|
const loaded = [];
|
|
@@ -2281,7 +2258,7 @@ async function loadAllExtensionsFromToolYamlAsync(configFilePath, stepLog) {
|
|
|
2281
2258
|
const localPath = path.isAbsolute(configFilePath) ? configFilePath : path.resolve(process.cwd(), configFilePath);
|
|
2282
2259
|
if (!fs.existsSync(localPath)) return [];
|
|
2283
2260
|
const config = loadToolConfig(localPath);
|
|
2284
|
-
const tools = config
|
|
2261
|
+
const tools = getToolSourceDescriptors(config);
|
|
2285
2262
|
if (!Array.isArray(tools) || tools.length === 0) return [];
|
|
2286
2263
|
if (stepLog) stepLog("Loading extensions from tool.yaml (async)");
|
|
2287
2264
|
const loaded = [];
|
|
@@ -2949,13 +2926,14 @@ exports.expandToolDescriptorsToRegistryNames = expandToolDescriptorsToRegistryNa
|
|
|
2949
2926
|
exports.fileDescriptorToPackagePrefix = fileDescriptorToPackagePrefix;
|
|
2950
2927
|
exports.findAndLoadToolConfig = findAndLoadToolConfig;
|
|
2951
2928
|
exports.getDisplayScope = getDisplayScope;
|
|
2929
|
+
exports.getToolSourceDescriptors = getToolSourceDescriptors;
|
|
2952
2930
|
exports.isBarePackageDescriptor = isBarePackageDescriptor;
|
|
2953
2931
|
exports.loadAllExtensionsFromToolYamlSync = loadAllExtensionsFromToolYamlSync;
|
|
2954
2932
|
exports.loadToolConfig = loadToolConfig;
|
|
2955
|
-
exports.
|
|
2933
|
+
exports.npmDescriptorToPackagePrefix = npmDescriptorToPackagePrefix;
|
|
2956
2934
|
exports.resolveSandboxedPath = resolveSandboxedPath;
|
|
2957
2935
|
exports.resolveToolDescriptor = resolveToolDescriptor;
|
|
2958
2936
|
exports.runMCPServerOverStdio = runMCPServerOverStdio;
|
|
2959
2937
|
exports.toToolObservationText = toToolObservationText;
|
|
2960
|
-
//# sourceMappingURL=chunk-
|
|
2961
|
-
//# sourceMappingURL=chunk-
|
|
2938
|
+
//# sourceMappingURL=chunk-GNYBAJZZ.cjs.map
|
|
2939
|
+
//# sourceMappingURL=chunk-GNYBAJZZ.cjs.map
|