@easynet/agent-tool 1.0.49 → 1.0.51
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/extension/dynamicImportAdapter.d.ts.map +1 -1
- package/dist/api/extension/registerFromManifest.d.ts.map +1 -1
- package/dist/api/main.cjs +15 -15
- package/dist/api/main.js +4 -4
- package/dist/{chunk-XHFZEA7L.cjs → chunk-3GK6IK3N.cjs} +28 -28
- package/dist/{chunk-XHFZEA7L.cjs.map → chunk-3GK6IK3N.cjs.map} +1 -1
- package/dist/{chunk-5GXFZ4GF.cjs → chunk-E3JK57SR.cjs} +15 -15
- package/dist/{chunk-5GXFZ4GF.cjs.map → chunk-E3JK57SR.cjs.map} +1 -1
- package/dist/{chunk-ZRHPGW7W.js → chunk-FCYBA7PR.js} +3 -3
- package/dist/{chunk-ZRHPGW7W.js.map → chunk-FCYBA7PR.js.map} +1 -1
- package/dist/{chunk-C6IARXVY.js → chunk-H4RZJVNS.js} +3 -3
- package/dist/{chunk-C6IARXVY.js.map → chunk-H4RZJVNS.js.map} +1 -1
- package/dist/{chunk-FECO5FHB.js → chunk-NYUSA2YV.js} +4 -4
- package/dist/{chunk-FECO5FHB.js.map → chunk-NYUSA2YV.js.map} +1 -1
- package/dist/{chunk-KDB3MY2H.js → chunk-ODEHUAR4.js} +2 -2
- package/dist/chunk-ODEHUAR4.js.map +1 -0
- package/dist/{chunk-DYDNPIV2.cjs → chunk-QEJF3KDV.cjs} +2 -2
- package/dist/chunk-QEJF3KDV.cjs.map +1 -0
- package/dist/{chunk-BCMMIJAQ.cjs → chunk-QEZLUBAL.cjs} +11 -11
- package/dist/{chunk-BCMMIJAQ.cjs.map → chunk-QEZLUBAL.cjs.map} +1 -1
- package/dist/{chunk-TOSPHMYU.cjs → chunk-WQMHMPNC.cjs} +7 -7
- package/dist/{chunk-TOSPHMYU.cjs.map → chunk-WQMHMPNC.cjs.map} +1 -1
- package/dist/{chunk-2S465X6Q.js → chunk-ZWYRMANX.js} +4 -4
- package/dist/{chunk-2S465X6Q.js.map → chunk-ZWYRMANX.js.map} +1 -1
- package/dist/core/index.cjs +4 -4
- package/dist/core/index.js +1 -1
- package/dist/core/runtime.cjs +6 -6
- package/dist/core/runtime.js +2 -2
- package/dist/core/types/ToolSpec.d.ts +2 -0
- package/dist/core/types/ToolSpec.d.ts.map +1 -1
- package/dist/index.cjs +42 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/utils/cli/index.cjs +18 -18
- package/dist/utils/cli/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-DYDNPIV2.cjs.map +0 -1
- package/dist/chunk-KDB3MY2H.js.map +0 -1
|
@@ -29,5 +29,5 @@ function createToolSpec(opts) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { DEFAULT_INPUT_SCHEMA, DEFAULT_OUTPUT_SCHEMA, createToolSpec, normalizeToolName };
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-ODEHUAR4.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-ODEHUAR4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/types/ToolSpec.ts"],"names":[],"mappings":";AAwFO,SAAS,kBAAkB,IAAA,EAAsB;AACtD,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,CAAC,MAAM,OAAO,IAAA;AAC9C,EAAA,OAAO,KACJ,OAAA,CAAQ,eAAA,EAAiB,GAAG,CAAA,CAC5B,OAAA,CAAQ,QAAQ,GAAG,CAAA;AACxB;AAGO,IAAM,oBAAA,GAA+B;AAAA,EAC1C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AAGO,IAAM,qBAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AA2BO,SAAS,eAAe,IAAA,EAAuC;AACpE,EAAA,MAAM,UAAA,GAAa,KAAK,UAAA,IAAc,MAAA;AACtC,EAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AACxC,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,OAAA,EAAS,KAAK,OAAA,IAAW,OAAA;AAAA,IACzB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,WAAA,EAAa,KAAK,WAAA,IAAe,oBAAA;AAAA,IACjC,YAAA,EAAc,KAAK,YAAA,IAAgB,qBAAA;AAAA,IACnC,cAAc,IAAA,CAAK,YAAA;AAAA,IACnB,WAAW,IAAA,CAAK,SAAA;AAAA,IAChB,KAAA,EAAO,EAAE,IAAA,EAAM,EAAE,YAAW;AAAE,GAChC;AACF","file":"chunk-ODEHUAR4.js","sourcesContent":["/**\n * Unified tool kinds supported by the tools package.\n */\nexport type ToolKind = \"mcp\" | \"langchain\" | \"n8n\" | \"comfyui\" | \"skill\" | \"function\" | \"core\" | \"example\";\n\n/**\n * Capability declarations for tools.\n * Used by PolicyEngine for permission gating.\n */\nexport type Capability =\n | \"read:web\"\n | \"read:fs\"\n | \"write:fs\"\n | \"read:db\"\n | \"write:db\"\n | \"network\"\n | \"gpu\"\n | \"workflow\"\n | \"danger:destructive\"\n | \"exec\";\n\n/**\n * HITL (Human-in-the-Loop) side-effect classification.\n * Used to gate execution: external_write / destructive require human approval when onApprovalRequired is set.\n */\nexport type HitlSideEffect = \"none\" | \"local_write\" | \"external_write\" | \"destructive\";\n\n/**\n * Cost hints for tools, used by Budget and routing.\n */\nexport interface CostHints {\n latencyMsP50?: number;\n latencyMsP95?: number;\n isAsync?: boolean;\n}\n\n/**\n * Unified tool specification.\n * All tool types (MCP, LangChain, n8n, SKILL) are described by this interface.\n *\n * Safety: each tool declares capabilities (permission gating) and _meta.hitl.sideEffect\n * (HITL approval for external_write/destructive). Caller uses these to decide handling.\n */\nexport interface ToolSpec {\n /** Globally unique name, recommended format: namespace/name */\n name: string;\n /** Semver version */\n version: string;\n /** Tool kind determines which adapter handles execution */\n kind: ToolKind;\n\n description?: string;\n tags?: string[];\n\n /** JSON Schema for input validation */\n inputSchema: object;\n /** JSON Schema for output validation */\n outputSchema: object;\n\n /** Required capabilities for this tool (safety: PolicyEngine gates by ExecContext.permissions) */\n capabilities: Capability[];\n costHints?: CostHints;\n\n /** HITL and adapter-specific metadata. Adapters may use _meta.sourcePath, _meta.exportName, _meta.projectPath (function), etc. */\n _meta?: {\n hitl?: { sideEffect?: HitlSideEffect };\n /** Function kind: path to source file relative to projectPath */\n sourcePath?: string;\n /** Function kind: export name of the handler */\n exportName?: string;\n /** Function/skill kind: project root for resolving sourcePath */\n projectPath?: string;\n /** Extension kind: package root for resolving sourcePath */\n packageRoot?: string;\n };\n\n /** Adapter-specific: endpoint URL (MCP/n8n) */\n endpoint?: string;\n /** Adapter-specific: resource identifier (workflowId, promptId, etc.) */\n resourceId?: string;\n /** Adapter-specific: implementation reference (LangChain Tool instance, skill handler) */\n impl?: unknown;\n}\n\n/**\n * Normalize tool name: only [a-zA-Z0-9] and \".\" allowed; all other characters become \".\".\n * Consecutive dots are collapsed to one. Used for registry lookup and storage.\n */\nexport function normalizeToolName(name: string): string {\n if (typeof name !== \"string\" || !name) return name;\n return name\n .replace(/[^a-zA-Z0-9]/g, \".\")\n .replace(/\\.+/g, \".\");\n}\n\n/** Default permissive input schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_INPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/** Default permissive output schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_OUTPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/**\n * Minimal options to build a ToolSpec. Use with @effect in JSDoc for HITL sideEffect.\n * Framework fills _meta.hitl.sideEffect from the sideEffect parameter (matches @effect annotation).\n * inputSchema/outputSchema are optional: when omitted, permissive defaults are used (framework supports auto-derived schema at build time in scan/mcp-build).\n */\nexport interface CreateToolSpecOptions {\n name: string;\n version?: string;\n kind: ToolKind;\n description?: string;\n tags?: string[];\n /** Optional: when omitted, DEFAULT_INPUT_SCHEMA is used. Codegen can derive from handler params. */\n inputSchema?: object;\n /** Optional: when omitted, DEFAULT_OUTPUT_SCHEMA is used. Codegen can derive from handler return type. */\n outputSchema?: object;\n capabilities: Capability[];\n costHints?: CostHints;\n /** HITL: from @effect annotation (none | local_write | external_write | destructive). Default \"none\". */\n sideEffect?: HitlSideEffect;\n}\n\n/**\n * Build a ToolSpec from minimal options. Use @effect in handler JSDoc as annotation; pass same value as sideEffect.\n * When inputSchema/outputSchema are omitted, permissive defaults are used (schema can be auto-derived at build time).\n */\nexport function createToolSpec(opts: CreateToolSpecOptions): ToolSpec {\n const sideEffect = opts.sideEffect ?? \"none\";\n const name = normalizeToolName(opts.name);\n return {\n name,\n version: opts.version ?? \"1.0.0\",\n kind: opts.kind,\n description: opts.description,\n tags: opts.tags,\n inputSchema: opts.inputSchema ?? DEFAULT_INPUT_SCHEMA,\n outputSchema: opts.outputSchema ?? DEFAULT_OUTPUT_SCHEMA,\n capabilities: opts.capabilities,\n costHints: opts.costHints,\n _meta: { hitl: { sideEffect } },\n };\n}\n\n/**\n * Unified adapter interface.\n * PTCRuntime looks up adapter by spec.kind and calls adapter.invoke(spec, args, ctx).\n * spec.name is always the single canonical name (the long name); there is no short name.\n */\nexport interface ToolAdapter {\n kind: ToolKind;\n /** Optional: supports dynamic tool discovery */\n listTools?(): Promise<ToolSpec[]>;\n /** Execute the tool with validated args. spec.name is the canonical (long) name. */\n invoke(\n spec: ToolSpec,\n args: unknown,\n ctx: import(\"./ToolIntent.js\").ExecContext,\n ): Promise<{ result: unknown; raw?: unknown }>;\n}\n"]}
|
|
@@ -34,5 +34,5 @@ exports.DEFAULT_INPUT_SCHEMA = DEFAULT_INPUT_SCHEMA;
|
|
|
34
34
|
exports.DEFAULT_OUTPUT_SCHEMA = DEFAULT_OUTPUT_SCHEMA;
|
|
35
35
|
exports.createToolSpec = createToolSpec;
|
|
36
36
|
exports.normalizeToolName = normalizeToolName;
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-QEJF3KDV.cjs.map
|
|
38
|
+
//# sourceMappingURL=chunk-QEJF3KDV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/types/ToolSpec.ts"],"names":[],"mappings":";;;AAwFO,SAAS,kBAAkB,IAAA,EAAsB;AACtD,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,CAAC,MAAM,OAAO,IAAA;AAC9C,EAAA,OAAO,KACJ,OAAA,CAAQ,eAAA,EAAiB,GAAG,CAAA,CAC5B,OAAA,CAAQ,QAAQ,GAAG,CAAA;AACxB;AAGO,IAAM,oBAAA,GAA+B;AAAA,EAC1C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AAGO,IAAM,qBAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AA2BO,SAAS,eAAe,IAAA,EAAuC;AACpE,EAAA,MAAM,UAAA,GAAa,KAAK,UAAA,IAAc,MAAA;AACtC,EAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AACxC,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,OAAA,EAAS,KAAK,OAAA,IAAW,OAAA;AAAA,IACzB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,WAAA,EAAa,KAAK,WAAA,IAAe,oBAAA;AAAA,IACjC,YAAA,EAAc,KAAK,YAAA,IAAgB,qBAAA;AAAA,IACnC,cAAc,IAAA,CAAK,YAAA;AAAA,IACnB,WAAW,IAAA,CAAK,SAAA;AAAA,IAChB,KAAA,EAAO,EAAE,IAAA,EAAM,EAAE,YAAW;AAAE,GAChC;AACF","file":"chunk-QEJF3KDV.cjs","sourcesContent":["/**\n * Unified tool kinds supported by the tools package.\n */\nexport type ToolKind = \"mcp\" | \"langchain\" | \"n8n\" | \"comfyui\" | \"skill\" | \"function\" | \"core\" | \"example\";\n\n/**\n * Capability declarations for tools.\n * Used by PolicyEngine for permission gating.\n */\nexport type Capability =\n | \"read:web\"\n | \"read:fs\"\n | \"write:fs\"\n | \"read:db\"\n | \"write:db\"\n | \"network\"\n | \"gpu\"\n | \"workflow\"\n | \"danger:destructive\"\n | \"exec\";\n\n/**\n * HITL (Human-in-the-Loop) side-effect classification.\n * Used to gate execution: external_write / destructive require human approval when onApprovalRequired is set.\n */\nexport type HitlSideEffect = \"none\" | \"local_write\" | \"external_write\" | \"destructive\";\n\n/**\n * Cost hints for tools, used by Budget and routing.\n */\nexport interface CostHints {\n latencyMsP50?: number;\n latencyMsP95?: number;\n isAsync?: boolean;\n}\n\n/**\n * Unified tool specification.\n * All tool types (MCP, LangChain, n8n, SKILL) are described by this interface.\n *\n * Safety: each tool declares capabilities (permission gating) and _meta.hitl.sideEffect\n * (HITL approval for external_write/destructive). Caller uses these to decide handling.\n */\nexport interface ToolSpec {\n /** Globally unique name, recommended format: namespace/name */\n name: string;\n /** Semver version */\n version: string;\n /** Tool kind determines which adapter handles execution */\n kind: ToolKind;\n\n description?: string;\n tags?: string[];\n\n /** JSON Schema for input validation */\n inputSchema: object;\n /** JSON Schema for output validation */\n outputSchema: object;\n\n /** Required capabilities for this tool (safety: PolicyEngine gates by ExecContext.permissions) */\n capabilities: Capability[];\n costHints?: CostHints;\n\n /** HITL and adapter-specific metadata. Adapters may use _meta.sourcePath, _meta.exportName, _meta.projectPath (function), etc. */\n _meta?: {\n hitl?: { sideEffect?: HitlSideEffect };\n /** Function kind: path to source file relative to projectPath */\n sourcePath?: string;\n /** Function kind: export name of the handler */\n exportName?: string;\n /** Function/skill kind: project root for resolving sourcePath */\n projectPath?: string;\n /** Extension kind: package root for resolving sourcePath */\n packageRoot?: string;\n };\n\n /** Adapter-specific: endpoint URL (MCP/n8n) */\n endpoint?: string;\n /** Adapter-specific: resource identifier (workflowId, promptId, etc.) */\n resourceId?: string;\n /** Adapter-specific: implementation reference (LangChain Tool instance, skill handler) */\n impl?: unknown;\n}\n\n/**\n * Normalize tool name: only [a-zA-Z0-9] and \".\" allowed; all other characters become \".\".\n * Consecutive dots are collapsed to one. Used for registry lookup and storage.\n */\nexport function normalizeToolName(name: string): string {\n if (typeof name !== \"string\" || !name) return name;\n return name\n .replace(/[^a-zA-Z0-9]/g, \".\")\n .replace(/\\.+/g, \".\");\n}\n\n/** Default permissive input schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_INPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/** Default permissive output schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_OUTPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/**\n * Minimal options to build a ToolSpec. Use with @effect in JSDoc for HITL sideEffect.\n * Framework fills _meta.hitl.sideEffect from the sideEffect parameter (matches @effect annotation).\n * inputSchema/outputSchema are optional: when omitted, permissive defaults are used (framework supports auto-derived schema at build time in scan/mcp-build).\n */\nexport interface CreateToolSpecOptions {\n name: string;\n version?: string;\n kind: ToolKind;\n description?: string;\n tags?: string[];\n /** Optional: when omitted, DEFAULT_INPUT_SCHEMA is used. Codegen can derive from handler params. */\n inputSchema?: object;\n /** Optional: when omitted, DEFAULT_OUTPUT_SCHEMA is used. Codegen can derive from handler return type. */\n outputSchema?: object;\n capabilities: Capability[];\n costHints?: CostHints;\n /** HITL: from @effect annotation (none | local_write | external_write | destructive). Default \"none\". */\n sideEffect?: HitlSideEffect;\n}\n\n/**\n * Build a ToolSpec from minimal options. Use @effect in handler JSDoc as annotation; pass same value as sideEffect.\n * When inputSchema/outputSchema are omitted, permissive defaults are used (schema can be auto-derived at build time).\n */\nexport function createToolSpec(opts: CreateToolSpecOptions): ToolSpec {\n const sideEffect = opts.sideEffect ?? \"none\";\n const name = normalizeToolName(opts.name);\n return {\n name,\n version: opts.version ?? \"1.0.0\",\n kind: opts.kind,\n description: opts.description,\n tags: opts.tags,\n inputSchema: opts.inputSchema ?? DEFAULT_INPUT_SCHEMA,\n outputSchema: opts.outputSchema ?? DEFAULT_OUTPUT_SCHEMA,\n capabilities: opts.capabilities,\n costHints: opts.costHints,\n _meta: { hitl: { sideEffect } },\n };\n}\n\n/**\n * Unified adapter interface.\n * PTCRuntime looks up adapter by spec.kind and calls adapter.invoke(spec, args, ctx).\n * spec.name is always the single canonical name (the long name); there is no short name.\n */\nexport interface ToolAdapter {\n kind: ToolKind;\n /** Optional: supports dynamic tool discovery */\n listTools?(): Promise<ToolSpec[]>;\n /** Execute the tool with validated args. spec.name is the canonical (long) name. */\n invoke(\n spec: ToolSpec,\n args: unknown,\n ctx: import(\"./ToolIntent.js\").ExecContext,\n ): Promise<{ result: unknown; raw?: unknown }>;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk3GK6IK3N_cjs = require('./chunk-3GK6IK3N.cjs');
|
|
4
|
+
var chunkQEJF3KDV_cjs = require('./chunk-QEJF3KDV.cjs');
|
|
5
5
|
var fs3 = require('fs/promises');
|
|
6
6
|
var path9 = require('path');
|
|
7
7
|
var fs2 = require('fs');
|
|
@@ -322,7 +322,7 @@ function mcpSpecToToolSpec(spec, projectPath) {
|
|
|
322
322
|
kind: spec.kind,
|
|
323
323
|
description: spec.description,
|
|
324
324
|
inputSchema: spec.inputSchema ?? DEFAULT_OUTPUT,
|
|
325
|
-
outputSchema: "outputSchema" in spec && spec.outputSchema ? spec.outputSchema :
|
|
325
|
+
outputSchema: "outputSchema" in spec && spec.outputSchema ? spec.outputSchema : chunkQEJF3KDV_cjs.DEFAULT_OUTPUT_SCHEMA,
|
|
326
326
|
capabilities: [],
|
|
327
327
|
_meta: spec._meta,
|
|
328
328
|
...spec.kind === N8N_KIND && "webhookUrl" in spec && spec.webhookUrl ? { endpoint: spec.webhookUrl } : {}
|
|
@@ -1021,7 +1021,7 @@ async function scan4(projectPath, options = {}) {
|
|
|
1021
1021
|
});
|
|
1022
1022
|
return { specs: [], errors };
|
|
1023
1023
|
}
|
|
1024
|
-
const filtered = specs.filter((s) => s.kind ===
|
|
1024
|
+
const filtered = specs.filter((s) => s.kind === chunk3GK6IK3N_cjs.MCP_KIND);
|
|
1025
1025
|
return { specs: filtered, errors };
|
|
1026
1026
|
}
|
|
1027
1027
|
async function scan5(projectPath, options = {}) {
|
|
@@ -1047,7 +1047,7 @@ async function scan5(projectPath, options = {}) {
|
|
|
1047
1047
|
});
|
|
1048
1048
|
return { specs: [], errors };
|
|
1049
1049
|
}
|
|
1050
|
-
const filtered = specs.filter((s) => s.kind ===
|
|
1050
|
+
const filtered = specs.filter((s) => s.kind === chunk3GK6IK3N_cjs.LANGCHAIN_KIND);
|
|
1051
1051
|
return { specs: filtered, errors };
|
|
1052
1052
|
}
|
|
1053
1053
|
async function loadLangChainTool(dirPath, manifest, extensions) {
|
|
@@ -1514,7 +1514,7 @@ var DirectoryScanner = class {
|
|
|
1514
1514
|
false,
|
|
1515
1515
|
namespace,
|
|
1516
1516
|
this.extensions,
|
|
1517
|
-
|
|
1517
|
+
chunk3GK6IK3N_cjs.LANGCHAIN_DIR_NAME,
|
|
1518
1518
|
(loaded3, nameHint, dp, ns) => this.toToolSpec(loaded3, nameHint, dp, ns),
|
|
1519
1519
|
this.onError
|
|
1520
1520
|
);
|
|
@@ -1550,7 +1550,7 @@ var DirectoryScanner = class {
|
|
|
1550
1550
|
true,
|
|
1551
1551
|
namespace,
|
|
1552
1552
|
this.extensions,
|
|
1553
|
-
|
|
1553
|
+
chunk3GK6IK3N_cjs.LANGCHAIN_DIR_NAME,
|
|
1554
1554
|
(loaded2, nameHint, dp, ns) => this.toToolSpec(loaded2, nameHint, dp, ns),
|
|
1555
1555
|
this.onError
|
|
1556
1556
|
);
|
|
@@ -1569,7 +1569,7 @@ var DirectoryScanner = class {
|
|
|
1569
1569
|
for (const m of DIRECTORY_KIND_MARKERS) {
|
|
1570
1570
|
if (await this.fileExists(path9.join(dirPath, m.markerFile))) kinds.push(m.kind);
|
|
1571
1571
|
}
|
|
1572
|
-
const isLangchainDir = dirName ===
|
|
1572
|
+
const isLangchainDir = dirName === chunk3GK6IK3N_cjs.LANGCHAIN_DIR_NAME;
|
|
1573
1573
|
const hasLangchain = isLangchainDir ? (await listLangchainEntryFiles(dirPath, this.extensions)).length > 0 : dirName !== SKILL_DIR_NAME && await this.hasEntryPoint(dirPath, "index");
|
|
1574
1574
|
if (hasLangchain) kinds.push("langchain");
|
|
1575
1575
|
if (kinds.length === 0) return null;
|
|
@@ -1658,7 +1658,7 @@ async function scanForAllTools(projectPath, options = {}) {
|
|
|
1658
1658
|
const warnings = results.flatMap((r) => r.warnings ?? []);
|
|
1659
1659
|
return { specs, errors, warnings };
|
|
1660
1660
|
}
|
|
1661
|
-
var __dirname$1 = path9__namespace.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
1661
|
+
var __dirname$1 = path9__namespace.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-QEZLUBAL.cjs', document.baseURI).href))));
|
|
1662
1662
|
async function loadTemplate(name) {
|
|
1663
1663
|
for (const dir of [
|
|
1664
1664
|
path9__namespace.join(__dirname$1, "templates"),
|
|
@@ -1864,5 +1864,5 @@ exports.runGeneratedMCP = runGeneratedMCP;
|
|
|
1864
1864
|
exports.runMcpServer = runMcpServer;
|
|
1865
1865
|
exports.scan = scan;
|
|
1866
1866
|
exports.scanForTools = scanForTools;
|
|
1867
|
-
//# sourceMappingURL=chunk-
|
|
1868
|
-
//# sourceMappingURL=chunk-
|
|
1867
|
+
//# sourceMappingURL=chunk-QEZLUBAL.cjs.map
|
|
1868
|
+
//# sourceMappingURL=chunk-QEZLUBAL.cjs.map
|