@easynet/agent-tool 1.0.102 → 1.0.103

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.
@@ -38,8 +38,22 @@ function normalizeOpenApiConfig(raw) {
38
38
  }
39
39
  function normalizeToolSources(raw) {
40
40
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
41
+ const source = raw;
41
42
  const out = {};
42
- for (const [sourceKey, sourceValue] of Object.entries(raw)) {
43
+ const customized = source.customized;
44
+ if (customized && typeof customized === "object" && !Array.isArray(customized)) {
45
+ for (const [sourceKey, sourceValue] of Object.entries(customized)) {
46
+ if (!sourceValue || typeof sourceValue !== "object" || Array.isArray(sourceValue)) continue;
47
+ const toolMap = {};
48
+ for (const [toolName, toolValue] of Object.entries(sourceValue)) {
49
+ if (!toolValue || typeof toolValue !== "object" || Array.isArray(toolValue)) continue;
50
+ toolMap[toolName] = toolValue;
51
+ }
52
+ out[sourceKey] = toolMap;
53
+ }
54
+ }
55
+ for (const [sourceKey, sourceValue] of Object.entries(source)) {
56
+ if (sourceKey === "customized" || sourceKey === "deepagents") continue;
43
57
  if (!sourceValue || typeof sourceValue !== "object" || Array.isArray(sourceValue)) continue;
44
58
  const toolMap = {};
45
59
  for (const [toolName, toolValue] of Object.entries(sourceValue)) {
@@ -2943,5 +2957,5 @@ async function createHttpService(runtimeOrConfig, options = {}) {
2943
2957
  }
2944
2958
 
2945
2959
  export { createHttpService, createMCPServerStreamableHttp, createRuntimeFromConfig, expandToolDescriptorsToRegistryNames, fileDescriptorToPackagePrefix, findAndLoadToolConfig, getDisplayScope, getToolSourceDescriptors, isBarePackageDescriptor, loadToolConfig, npmDescriptorToPackagePrefix, resolveSandboxedPath, resolveToolDescriptor, runMCPServerOverStdio, toToolObservationText };
2946
- //# sourceMappingURL=chunk-34SBJLFZ.js.map
2947
- //# sourceMappingURL=chunk-34SBJLFZ.js.map
2960
+ //# sourceMappingURL=chunk-3C4VJ4DI.js.map
2961
+ //# sourceMappingURL=chunk-3C4VJ4DI.js.map