@dexto/agent-management 1.5.8 → 1.6.1

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.
Files changed (139) hide show
  1. package/dist/AgentFactory.cjs +5 -9
  2. package/dist/AgentFactory.d.ts +6 -5
  3. package/dist/AgentFactory.d.ts.map +1 -1
  4. package/dist/AgentFactory.js +5 -9
  5. package/dist/AgentManager.cjs +2 -2
  6. package/dist/AgentManager.d.ts +1 -1
  7. package/dist/AgentManager.d.ts.map +1 -1
  8. package/dist/AgentManager.js +4 -4
  9. package/dist/agent-creation.cjs +95 -0
  10. package/dist/agent-creation.d.ts +15 -0
  11. package/dist/agent-creation.d.ts.map +1 -0
  12. package/dist/agent-creation.js +78 -0
  13. package/dist/config/config-enrichment.cjs +8 -14
  14. package/dist/config/config-enrichment.d.ts +7 -1
  15. package/dist/config/config-enrichment.d.ts.map +1 -1
  16. package/dist/config/config-enrichment.js +8 -14
  17. package/dist/config/config-manager.cjs +4 -4
  18. package/dist/config/config-manager.d.ts +1 -1
  19. package/dist/config/config-manager.d.ts.map +1 -1
  20. package/dist/config/config-manager.js +3 -1
  21. package/dist/config/loader.d.ts +3 -3
  22. package/dist/config/loader.d.ts.map +1 -1
  23. package/dist/images/image-store.cjs +256 -0
  24. package/dist/images/image-store.d.ts +70 -0
  25. package/dist/images/image-store.d.ts.map +1 -0
  26. package/dist/images/image-store.js +210 -0
  27. package/dist/index.cjs +32 -2
  28. package/dist/index.d.ts +3 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +31 -1
  31. package/dist/plugins/discover-plugins.cjs +15 -31
  32. package/dist/plugins/discover-plugins.d.ts.map +1 -1
  33. package/dist/plugins/discover-plugins.js +15 -31
  34. package/dist/plugins/index.cjs +0 -2
  35. package/dist/plugins/index.d.ts +5 -6
  36. package/dist/plugins/index.d.ts.map +1 -1
  37. package/dist/plugins/index.js +0 -2
  38. package/dist/plugins/list-plugins.cjs +3 -1
  39. package/dist/plugins/list-plugins.d.ts.map +1 -1
  40. package/dist/plugins/list-plugins.js +3 -1
  41. package/dist/plugins/load-plugin.cjs +0 -13
  42. package/dist/plugins/load-plugin.d.ts +3 -5
  43. package/dist/plugins/load-plugin.d.ts.map +1 -1
  44. package/dist/plugins/load-plugin.js +0 -13
  45. package/dist/plugins/schemas.cjs +1 -11
  46. package/dist/plugins/schemas.d.ts +14 -69
  47. package/dist/plugins/schemas.d.ts.map +1 -1
  48. package/dist/plugins/schemas.js +1 -10
  49. package/dist/plugins/types.d.ts +2 -20
  50. package/dist/plugins/types.d.ts.map +1 -1
  51. package/dist/plugins/validate-plugin.cjs +7 -37
  52. package/dist/plugins/validate-plugin.d.ts +6 -24
  53. package/dist/plugins/validate-plugin.d.ts.map +1 -1
  54. package/dist/plugins/validate-plugin.js +8 -38
  55. package/dist/preferences/loader.cjs +21 -6
  56. package/dist/preferences/loader.d.ts +4 -0
  57. package/dist/preferences/loader.d.ts.map +1 -1
  58. package/dist/preferences/loader.js +21 -6
  59. package/dist/preferences/schemas.cjs +5 -1
  60. package/dist/preferences/schemas.d.ts +32 -0
  61. package/dist/preferences/schemas.d.ts.map +1 -1
  62. package/dist/preferences/schemas.js +5 -1
  63. package/dist/registry/registry.d.ts +4 -44
  64. package/dist/registry/registry.d.ts.map +1 -1
  65. package/dist/registry/types.cjs +4 -0
  66. package/dist/registry/types.d.ts +8 -0
  67. package/dist/registry/types.d.ts.map +1 -1
  68. package/dist/registry/types.js +4 -0
  69. package/dist/runtime/AgentPool.d.ts +2 -2
  70. package/dist/runtime/AgentPool.d.ts.map +1 -1
  71. package/dist/runtime/AgentRuntime.cjs +32 -19
  72. package/dist/runtime/AgentRuntime.d.ts +2 -2
  73. package/dist/runtime/AgentRuntime.d.ts.map +1 -1
  74. package/dist/runtime/AgentRuntime.js +32 -19
  75. package/dist/runtime/approval-delegation.cjs +6 -3
  76. package/dist/runtime/approval-delegation.d.ts +3 -2
  77. package/dist/runtime/approval-delegation.d.ts.map +1 -1
  78. package/dist/runtime/approval-delegation.js +6 -3
  79. package/dist/runtime/schemas.cjs +1 -1
  80. package/dist/runtime/schemas.d.ts +1 -1
  81. package/dist/runtime/schemas.js +1 -1
  82. package/dist/runtime/types.d.ts +3 -2
  83. package/dist/runtime/types.d.ts.map +1 -1
  84. package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.d.ts +1 -1
  85. package/dist/tool-factories/agent-spawner/error-codes.d.ts.map +1 -0
  86. package/dist/{tool-provider → tool-factories/agent-spawner}/errors.d.ts +1 -1
  87. package/dist/tool-factories/agent-spawner/errors.d.ts.map +1 -0
  88. package/dist/tool-factories/agent-spawner/factory.cjs +327 -0
  89. package/dist/tool-factories/agent-spawner/factory.d.ts +4 -0
  90. package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -0
  91. package/dist/tool-factories/agent-spawner/factory.js +316 -0
  92. package/dist/{tool-provider → tool-factories/agent-spawner}/index.cjs +9 -9
  93. package/dist/{tool-provider → tool-factories/agent-spawner}/index.d.ts +3 -3
  94. package/dist/tool-factories/agent-spawner/index.d.ts.map +1 -0
  95. package/dist/{tool-provider → tool-factories/agent-spawner}/index.js +4 -4
  96. package/dist/tool-factories/agent-spawner/llm-resolution.d.ts.map +1 -0
  97. package/dist/{tool-provider/runtime-service.cjs → tool-factories/agent-spawner/runtime.cjs} +149 -83
  98. package/dist/{tool-provider/runtime-service.d.ts → tool-factories/agent-spawner/runtime.d.ts} +11 -6
  99. package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -0
  100. package/dist/{tool-provider/runtime-service.js → tool-factories/agent-spawner/runtime.js} +145 -79
  101. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.cjs +4 -4
  102. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.d.ts +5 -5
  103. package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -0
  104. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.js +4 -4
  105. package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.cjs +17 -7
  106. package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts +11 -0
  107. package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -0
  108. package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.js +17 -7
  109. package/dist/tool-factories/agent-spawner/types.d.ts.map +1 -0
  110. package/dist/utils/path.cjs +10 -1
  111. package/dist/utils/path.d.ts +5 -2
  112. package/dist/utils/path.d.ts.map +1 -1
  113. package/dist/utils/path.js +10 -1
  114. package/dist/writer.d.ts +2 -1
  115. package/dist/writer.d.ts.map +1 -1
  116. package/package.json +6 -4
  117. package/dist/tool-provider/error-codes.d.ts.map +0 -1
  118. package/dist/tool-provider/errors.d.ts.map +0 -1
  119. package/dist/tool-provider/index.d.ts.map +0 -1
  120. package/dist/tool-provider/llm-resolution.d.ts.map +0 -1
  121. package/dist/tool-provider/runtime-service.d.ts.map +0 -1
  122. package/dist/tool-provider/schemas.d.ts.map +0 -1
  123. package/dist/tool-provider/spawn-agent-tool.d.ts +0 -10
  124. package/dist/tool-provider/spawn-agent-tool.d.ts.map +0 -1
  125. package/dist/tool-provider/tool-provider.cjs +0 -197
  126. package/dist/tool-provider/tool-provider.d.ts +0 -30
  127. package/dist/tool-provider/tool-provider.d.ts.map +0 -1
  128. package/dist/tool-provider/tool-provider.js +0 -180
  129. package/dist/tool-provider/types.d.ts.map +0 -1
  130. /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.cjs +0 -0
  131. /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.js +0 -0
  132. /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.cjs +0 -0
  133. /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.js +0 -0
  134. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.cjs +0 -0
  135. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.d.ts +0 -0
  136. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.js +0 -0
  137. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.cjs +0 -0
  138. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.d.ts +0 -0
  139. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.js +0 -0
@@ -22,12 +22,11 @@ __export(AgentFactory_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(AgentFactory_exports);
24
24
  var import_fs = require("fs");
25
- var import_core = require("@dexto/core");
26
25
  var import_path = require("./utils/path.js");
27
26
  var import_types = require("./registry/types.js");
28
27
  var import_registry = require("./registry/registry.js");
29
- var import_config = require("./config/index.js");
30
28
  var import_installation = require("./installation.js");
29
+ var import_agent_creation = require("./agent-creation.js");
31
30
  const AgentFactory = {
32
31
  /**
33
32
  * List all agents (installed and available from bundled registry)
@@ -125,13 +124,10 @@ const AgentFactory = {
125
124
  }
126
125
  };
127
126
  }
128
- const enrichedConfig = (0, import_config.enrichAgentConfig)(
129
- configToEnrich,
130
- void 0,
131
- // No config path for inline configs
132
- options?.isInteractiveCli ?? false
133
- );
134
- return new import_core.DextoAgent(enrichedConfig);
127
+ return await (0, import_agent_creation.createDextoAgentFromConfig)({
128
+ config: configToEnrich,
129
+ enrichOptions: { isInteractiveCli: options?.isInteractiveCli ?? false }
130
+ });
135
131
  }
136
132
  };
137
133
  async function listInstalledAgents() {
@@ -23,7 +23,8 @@
23
23
  * @see AgentManager for registry-based agent management
24
24
  * @see https://docs.dexto.ai/api/sdk/agent-factory for full documentation
25
25
  */
26
- import { DextoAgent, type AgentConfig } from '@dexto/core';
26
+ import type { AgentConfig } from '@dexto/agent-config';
27
+ import type { DextoAgent } from '@dexto/core';
27
28
  import { type InstallOptions } from './installation.js';
28
29
  import type { AgentMetadata } from './AgentManager.js';
29
30
  /**
@@ -64,10 +65,10 @@ export declare const AgentFactory: {
64
65
  }[];
65
66
  available: {
66
67
  id: string;
67
- name: any;
68
- description: any;
69
- author: any;
70
- tags: any;
68
+ name: string;
69
+ description: string;
70
+ author: string;
71
+ tags: string[];
71
72
  type: "builtin";
72
73
  }[];
73
74
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"AgentFactory.d.ts","sourceRoot":"","sources":["../src/AgentFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAK3D,OAAO,EAIH,KAAK,cAAc,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,8BAA8B,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY;IACrB;;;OAGG;yBACwB,iBAAiB;;;;;;;;;;;;;;;;;;IAyC5C;;OAEG;0BACyB,MAAM,YAAY,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAI9E;;OAEG;gCAEU,MAAM,cACH,MAAM,YACR,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC,YAC/D,cAAc,GACzB,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;OAIG;4BAC2B,MAAM,WAAW,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAItE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;wBACuB,WAAW,YAAY,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;CAwB5F,CAAC"}
1
+ {"version":3,"file":"AgentFactory.d.ts","sourceRoot":"","sources":["../src/AgentFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,EAIH,KAAK,cAAc,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,8BAA8B,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY;IACrB;;;OAGG;yBACwB,iBAAiB;;;;;;;;;;;;;;;;;;IAyC5C;;OAEG;0BACyB,MAAM,YAAY,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAI9E;;OAEG;gCAEU,MAAM,cACH,MAAM,YACR,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC,YAC/D,cAAc,GACzB,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;OAIG;4BAC2B,MAAM,WAAW,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAItE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;wBACuB,WAAW,YAAY,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;CAmB5F,CAAC"}
@@ -1,14 +1,13 @@
1
1
  import { promises as fs } from "fs";
2
- import { DextoAgent } from "@dexto/core";
3
2
  import { getDextoGlobalPath } from "./utils/path.js";
4
3
  import { deriveDisplayName } from "./registry/types.js";
5
4
  import { loadBundledRegistryAgents } from "./registry/registry.js";
6
- import { enrichAgentConfig } from "./config/index.js";
7
5
  import {
8
6
  installBundledAgent,
9
7
  installCustomAgent,
10
8
  uninstallAgent
11
9
  } from "./installation.js";
10
+ import { createDextoAgentFromConfig } from "./agent-creation.js";
12
11
  const AgentFactory = {
13
12
  /**
14
13
  * List all agents (installed and available from bundled registry)
@@ -106,13 +105,10 @@ const AgentFactory = {
106
105
  }
107
106
  };
108
107
  }
109
- const enrichedConfig = enrichAgentConfig(
110
- configToEnrich,
111
- void 0,
112
- // No config path for inline configs
113
- options?.isInteractiveCli ?? false
114
- );
115
- return new DextoAgent(enrichedConfig);
108
+ return await createDextoAgentFromConfig({
109
+ config: configToEnrich,
110
+ enrichOptions: { isInteractiveCli: options?.isInteractiveCli ?? false }
111
+ });
116
112
  }
117
113
  };
118
114
  async function listInstalledAgents() {
@@ -37,6 +37,7 @@ var import_core = require("@dexto/core");
37
37
  var import_config = require("./config/index.js");
38
38
  var import_errors = require("./registry/errors.js");
39
39
  var import_zod = require("zod");
40
+ var import_agent_creation = require("./agent-creation.js");
40
41
  const RegistrySchema = import_zod.z.object({
41
42
  agents: import_zod.z.array(
42
43
  import_zod.z.object({
@@ -177,9 +178,8 @@ class AgentManager {
177
178
  const configPath = import_path.default.resolve(this.basePath, entry.configPath);
178
179
  try {
179
180
  const config = await (0, import_config.loadAgentConfig)(configPath);
180
- const enrichedConfig = (0, import_config.enrichAgentConfig)(config, configPath);
181
181
  import_core.logger.debug(`Loading agent: ${id} from ${configPath}`);
182
- return new import_core.DextoAgent(enrichedConfig, configPath);
182
+ return await (0, import_agent_creation.createDextoAgentFromConfig)({ config, configPath });
183
183
  } catch (error) {
184
184
  if (error instanceof import_zod.ZodError) {
185
185
  const issues = (0, import_core.zodToIssues)(error, "error");
@@ -15,7 +15,7 @@
15
15
  * @see AgentFactory.createAgent() for inline config creation
16
16
  * @see https://docs.dexto.ai/api/sdk/agent-manager for full documentation
17
17
  */
18
- import { DextoAgent } from '@dexto/core';
18
+ import type { DextoAgent } from '@dexto/core';
19
19
  import { z } from 'zod';
20
20
  /**
21
21
  * Agent metadata - describes an agent in the registry
@@ -1 +1 @@
1
- {"version":3,"file":"AgentManager.d.ts","sourceRoot":"","sources":["../src/AgentManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAU,UAAU,EAAqC,MAAM,aAAa,CAAC;AAGpF,OAAO,EAAE,CAAC,EAAY,MAAM,KAAK,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC/B;AAED;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeP,CAAC;AAEd,KAAK,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;;;;;;;;;;;OAaG;gBACS,YAAY,EAAE,MAAM;IAKhC;;;;;;;;;;;;;;;;OAgBG;IACG,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC;IA8BvC;;;;;;;;;;;;;;;OAeG;IACH,UAAU,IAAI,aAAa,EAAE;IAiB7B;;;;;;;;;;;;;;;;;;;OAmBG;IACG,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAuChD;;;;;;;;;;;;;;;OAeG;I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} from "fs";
2
2
  import path from "path";
3
- import { logger, DextoAgent, DextoValidationError, zodToIssues } from "@dexto/core";
4
- import { loadAgentConfig, enrichAgentConfig } from "./config/index.js";
3
+ import { logger, DextoValidationError, zodToIssues } from "@dexto/core";
4
+ import { loadAgentConfig } from "./config/index.js";
5
5
  import { RegistryError } from "./registry/errors.js";
6
6
  import { z, ZodError } from "zod";
7
+ import { createDextoAgentFromConfig } from "./agent-creation.js";
7
8
  const RegistrySchema = z.object({
8
9
  agents: z.array(
9
10
  z.object({
@@ -144,9 +145,8 @@ class AgentManager {
144
145
  const configPath = path.resolve(this.basePath, entry.configPath);
145
146
  try {
146
147
  const config = await loadAgentConfig(configPath);
147
- const enrichedConfig = enrichAgentConfig(config, configPath);
148
148
  logger.debug(`Loading agent: ${id} from ${configPath}`);
149
- return new DextoAgent(enrichedConfig, configPath);
149
+ return await createDextoAgentFromConfig({ config, configPath });
150
150
  } catch (error) {
151
151
  if (error instanceof ZodError) {
152
152
  const issues = zodToIssues(error, "error");
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var agent_creation_exports = {};
20
+ __export(agent_creation_exports, {
21
+ createDextoAgentFromConfig: () => createDextoAgentFromConfig
22
+ });
23
+ module.exports = __toCommonJS(agent_creation_exports);
24
+ var import_agent_config = require("@dexto/agent-config");
25
+ var import_core = require("@dexto/core");
26
+ var import_config = require("./config/index.js");
27
+ var import_tools_builtins = require("@dexto/tools-builtins");
28
+ async function loadImageForConfig(options) {
29
+ const { config, imageNameOverride } = options;
30
+ const imageName = imageNameOverride ?? config.image ?? process.env.DEXTO_IMAGE ?? "@dexto/image-local";
31
+ try {
32
+ const image = await (0, import_agent_config.loadImage)(imageName);
33
+ import_core.logger.debug(`Loaded image: ${imageName}`);
34
+ return { imageName, image };
35
+ } catch (err) {
36
+ const message = err instanceof Error ? err.message : String(err);
37
+ throw new Error(`Failed to load image '${imageName}': ${message}`);
38
+ }
39
+ }
40
+ function applySubAgentToolConstraints(config) {
41
+ const tools = config.tools;
42
+ if (!Array.isArray(tools)) {
43
+ return config;
44
+ }
45
+ const disabledBuiltinTools = /* @__PURE__ */ new Set(["ask_user", "invoke_skill"]);
46
+ const constrainedTools = tools.filter((entry) => entry.type !== "agent-spawner").map((entry) => {
47
+ if (entry.type !== "builtin-tools" || entry.enabled === false) {
48
+ return entry;
49
+ }
50
+ const maybeEnabledTools = entry.enabledTools;
51
+ const enabledTools = Array.isArray(maybeEnabledTools) ? maybeEnabledTools : [...import_tools_builtins.BUILTIN_TOOL_NAMES];
52
+ const filteredEnabledTools = enabledTools.filter((t) => !disabledBuiltinTools.has(t));
53
+ return { ...entry, enabledTools: filteredEnabledTools };
54
+ }).filter((entry) => {
55
+ if (entry.type !== "builtin-tools") {
56
+ return true;
57
+ }
58
+ const maybeEnabledTools = entry.enabledTools;
59
+ return !Array.isArray(maybeEnabledTools) || maybeEnabledTools.length > 0;
60
+ });
61
+ return { ...config, tools: constrainedTools };
62
+ }
63
+ async function createDextoAgentFromConfig(options) {
64
+ const { configPath, enrichOptions, agentIdOverride, overrides } = options;
65
+ const cleanedConfig = (0, import_agent_config.cleanNullValues)(options.config);
66
+ const { image } = await loadImageForConfig({
67
+ config: cleanedConfig,
68
+ imageNameOverride: options.imageNameOverride
69
+ });
70
+ let configWithImageDefaults = (0, import_agent_config.applyImageDefaults)(cleanedConfig, image.defaults);
71
+ if (options.agentContext === "subagent") {
72
+ configWithImageDefaults = applySubAgentToolConstraints(configWithImageDefaults);
73
+ }
74
+ const enrichedConfig = (0, import_config.enrichAgentConfig)(
75
+ configWithImageDefaults,
76
+ configPath,
77
+ enrichOptions ?? {}
78
+ );
79
+ if (agentIdOverride !== void 0) {
80
+ enrichedConfig.agentId = agentIdOverride;
81
+ }
82
+ const validatedConfig = import_agent_config.AgentConfigSchema.parse(enrichedConfig);
83
+ const services = await (0, import_agent_config.resolveServicesFromConfig)(validatedConfig, image);
84
+ return new import_core.DextoAgent(
85
+ (0, import_agent_config.toDextoAgentOptions)({
86
+ config: validatedConfig,
87
+ services,
88
+ overrides
89
+ })
90
+ );
91
+ }
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ createDextoAgentFromConfig
95
+ });
@@ -0,0 +1,15 @@
1
+ import type { AgentConfig } from '@dexto/agent-config';
2
+ import { DextoAgent, type InitializeServicesOptions } from '@dexto/core';
3
+ import { type EnrichAgentConfigOptions } from './config/index.js';
4
+ type CreateDextoAgentFromConfigOptions = {
5
+ config: AgentConfig;
6
+ configPath?: string | undefined;
7
+ enrichOptions?: EnrichAgentConfigOptions | undefined;
8
+ agentIdOverride?: string | undefined;
9
+ imageNameOverride?: string | undefined;
10
+ agentContext?: 'subagent' | undefined;
11
+ overrides?: InitializeServicesOptions | undefined;
12
+ };
13
+ export declare function createDextoAgentFromConfig(options: CreateDextoAgentFromConfigOptions): Promise<DextoAgent>;
14
+ export {};
15
+ //# sourceMappingURL=agent-creation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-creation.d.ts","sourceRoot":"","sources":["../src/agent-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AASnE,OAAO,EAAE,UAAU,EAAU,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGrF,KAAK,iCAAiC,GAAG;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACrD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,SAAS,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACrD,CAAC;AA0DF,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,iCAAiC,GAC3C,OAAO,CAAC,UAAU,CAAC,CAmCrB"}
@@ -0,0 +1,78 @@
1
+ import {
2
+ AgentConfigSchema,
3
+ applyImageDefaults,
4
+ cleanNullValues,
5
+ loadImage,
6
+ resolveServicesFromConfig,
7
+ toDextoAgentOptions
8
+ } from "@dexto/agent-config";
9
+ import { DextoAgent, logger } from "@dexto/core";
10
+ import { enrichAgentConfig } from "./config/index.js";
11
+ import { BUILTIN_TOOL_NAMES } from "@dexto/tools-builtins";
12
+ async function loadImageForConfig(options) {
13
+ const { config, imageNameOverride } = options;
14
+ const imageName = imageNameOverride ?? config.image ?? process.env.DEXTO_IMAGE ?? "@dexto/image-local";
15
+ try {
16
+ const image = await loadImage(imageName);
17
+ logger.debug(`Loaded image: ${imageName}`);
18
+ return { imageName, image };
19
+ } catch (err) {
20
+ const message = err instanceof Error ? err.message : String(err);
21
+ throw new Error(`Failed to load image '${imageName}': ${message}`);
22
+ }
23
+ }
24
+ function applySubAgentToolConstraints(config) {
25
+ const tools = config.tools;
26
+ if (!Array.isArray(tools)) {
27
+ return config;
28
+ }
29
+ const disabledBuiltinTools = /* @__PURE__ */ new Set(["ask_user", "invoke_skill"]);
30
+ const constrainedTools = tools.filter((entry) => entry.type !== "agent-spawner").map((entry) => {
31
+ if (entry.type !== "builtin-tools" || entry.enabled === false) {
32
+ return entry;
33
+ }
34
+ const maybeEnabledTools = entry.enabledTools;
35
+ const enabledTools = Array.isArray(maybeEnabledTools) ? maybeEnabledTools : [...BUILTIN_TOOL_NAMES];
36
+ const filteredEnabledTools = enabledTools.filter((t) => !disabledBuiltinTools.has(t));
37
+ return { ...entry, enabledTools: filteredEnabledTools };
38
+ }).filter((entry) => {
39
+ if (entry.type !== "builtin-tools") {
40
+ return true;
41
+ }
42
+ const maybeEnabledTools = entry.enabledTools;
43
+ return !Array.isArray(maybeEnabledTools) || maybeEnabledTools.length > 0;
44
+ });
45
+ return { ...config, tools: constrainedTools };
46
+ }
47
+ async function createDextoAgentFromConfig(options) {
48
+ const { configPath, enrichOptions, agentIdOverride, overrides } = options;
49
+ const cleanedConfig = cleanNullValues(options.config);
50
+ const { image } = await loadImageForConfig({
51
+ config: cleanedConfig,
52
+ imageNameOverride: options.imageNameOverride
53
+ });
54
+ let configWithImageDefaults = applyImageDefaults(cleanedConfig, image.defaults);
55
+ if (options.agentContext === "subagent") {
56
+ configWithImageDefaults = applySubAgentToolConstraints(configWithImageDefaults);
57
+ }
58
+ const enrichedConfig = enrichAgentConfig(
59
+ configWithImageDefaults,
60
+ configPath,
61
+ enrichOptions ?? {}
62
+ );
63
+ if (agentIdOverride !== void 0) {
64
+ enrichedConfig.agentId = agentIdOverride;
65
+ }
66
+ const validatedConfig = AgentConfigSchema.parse(enrichedConfig);
67
+ const services = await resolveServicesFromConfig(validatedConfig, image);
68
+ return new DextoAgent(
69
+ toDextoAgentOptions({
70
+ config: validatedConfig,
71
+ services,
72
+ overrides
73
+ })
74
+ );
75
+ }
76
+ export {
77
+ createDextoAgentFromConfig
78
+ };
@@ -64,7 +64,8 @@ function enrichAgentConfig(config, configPath, options = {}) {
64
64
  isInteractiveCli = false,
65
65
  logLevel = "error",
66
66
  skipPluginDiscovery = false,
67
- bundledPlugins = []
67
+ bundledPlugins = [],
68
+ forceStoragePaths = false
68
69
  } = opts;
69
70
  const agentId = deriveAgentId(config, configPath);
70
71
  const dbPath = (0, import_path.getDextoPath)("database", `${agentId}.db`);
@@ -94,15 +95,19 @@ function enrichAgentConfig(config, configPath, options = {}) {
94
95
  ...config.storage
95
96
  };
96
97
  if (config.storage.database?.type === "sqlite") {
98
+ const databasePath = typeof config.storage.database.path === "string" ? config.storage.database.path : void 0;
99
+ const shouldOverride = !databasePath || forceStoragePaths && !path.isAbsolute(databasePath);
97
100
  enriched.storage.database = {
98
101
  ...config.storage.database,
99
- path: config.storage.database.path || dbPath
102
+ path: shouldOverride ? dbPath : databasePath
100
103
  };
101
104
  }
102
105
  if (config.storage.blob?.type === "local") {
106
+ const blobStorePath = typeof config.storage.blob.storePath === "string" ? config.storage.blob.storePath : void 0;
107
+ const shouldOverride = !blobStorePath || forceStoragePaths && !path.isAbsolute(blobStorePath);
103
108
  enriched.storage.blob = {
104
109
  ...config.storage.blob,
105
- storePath: config.storage.blob.storePath || blobPath
110
+ storePath: shouldOverride ? blobPath : blobStorePath
106
111
  };
107
112
  }
108
113
  }
@@ -153,17 +158,6 @@ function enrichAgentConfig(config, configPath, options = {}) {
153
158
  ...loaded.mcpConfig.mcpServers
154
159
  };
155
160
  }
156
- if (loaded.customToolProviders.length > 0) {
157
- for (const providerType of loaded.customToolProviders) {
158
- const alreadyConfigured = enriched.customTools?.some(
159
- (tool) => typeof tool === "object" && tool !== null && tool.type === providerType
160
- );
161
- if (!alreadyConfigured) {
162
- enriched.customTools = enriched.customTools ?? [];
163
- enriched.customTools.push({ type: providerType });
164
- }
165
- }
166
- }
167
161
  }
168
162
  const standaloneSkills = (0, import_plugins.discoverStandaloneSkills)();
169
163
  for (const skill of standaloneSkills) {
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * Core services now require explicit paths - this enrichment layer provides them.
14
14
  */
15
- import type { AgentConfig } from '@dexto/core';
15
+ import type { AgentConfig } from '@dexto/agent-config';
16
16
  export { discoverCommandPrompts, discoverAgentInstructionFile } from './discover-prompts.js';
17
17
  /**
18
18
  * Derives an agent ID from config or file path for per-agent isolation.
@@ -35,6 +35,12 @@ export interface EnrichAgentConfigOptions {
35
35
  * user/project plugins.
36
36
  */
37
37
  bundledPlugins?: string[];
38
+ /**
39
+ * When true, normalize relative storage paths (database/blob) to per-agent
40
+ * locations.
41
+ * Useful when configs may be loaded from varying working directories.
42
+ */
43
+ forceStoragePaths?: boolean;
38
44
  }
39
45
  /**
40
46
  * Enriches agent configuration with per-agent file paths and discovered commands.
@@ -1 +1 @@
1
- {"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU/C,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAoC9E;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CAgQb"}
1
+ {"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAUvD,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAoC9E;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CAwPb"}
@@ -32,7 +32,8 @@ function enrichAgentConfig(config, configPath, options = {}) {
32
32
  isInteractiveCli = false,
33
33
  logLevel = "error",
34
34
  skipPluginDiscovery = false,
35
- bundledPlugins = []
35
+ bundledPlugins = [],
36
+ forceStoragePaths = false
36
37
  } = opts;
37
38
  const agentId = deriveAgentId(config, configPath);
38
39
  const dbPath = getDextoPath("database", `${agentId}.db`);
@@ -62,15 +63,19 @@ function enrichAgentConfig(config, configPath, options = {}) {
62
63
  ...config.storage
63
64
  };
64
65
  if (config.storage.database?.type === "sqlite") {
66
+ const databasePath = typeof config.storage.database.path === "string" ? config.storage.database.path : void 0;
67
+ const shouldOverride = !databasePath || forceStoragePaths && !path.isAbsolute(databasePath);
65
68
  enriched.storage.database = {
66
69
  ...config.storage.database,
67
- path: config.storage.database.path || dbPath
70
+ path: shouldOverride ? dbPath : databasePath
68
71
  };
69
72
  }
70
73
  if (config.storage.blob?.type === "local") {
74
+ const blobStorePath = typeof config.storage.blob.storePath === "string" ? config.storage.blob.storePath : void 0;
75
+ const shouldOverride = !blobStorePath || forceStoragePaths && !path.isAbsolute(blobStorePath);
71
76
  enriched.storage.blob = {
72
77
  ...config.storage.blob,
73
- storePath: config.storage.blob.storePath || blobPath
78
+ storePath: shouldOverride ? blobPath : blobStorePath
74
79
  };
75
80
  }
76
81
  }
@@ -121,17 +126,6 @@ function enrichAgentConfig(config, configPath, options = {}) {
121
126
  ...loaded.mcpConfig.mcpServers
122
127
  };
123
128
  }
124
- if (loaded.customToolProviders.length > 0) {
125
- for (const providerType of loaded.customToolProviders) {
126
- const alreadyConfigured = enriched.customTools?.some(
127
- (tool) => typeof tool === "object" && tool !== null && tool.type === providerType
128
- );
129
- if (!alreadyConfigured) {
130
- enriched.customTools = enriched.customTools ?? [];
131
- enriched.customTools.push({ type: providerType });
132
- }
133
- }
134
- }
135
129
  }
136
130
  const standaloneSkills = discoverStandaloneSkills();
137
131
  for (const skill of standaloneSkills) {
@@ -42,19 +42,19 @@ var path = __toESM(require("path"), 1);
42
42
  var import_yaml = require("yaml");
43
43
  var import_loader = require("./loader.js");
44
44
  var import_config_enrichment = require("./config-enrichment.js");
45
+ var import_agent_config = require("@dexto/agent-config");
45
46
  var import_core = require("@dexto/core");
46
47
  var import_core2 = require("@dexto/core");
47
- var import_core3 = require("@dexto/core");
48
48
  async function updateAgentConfigFile(configPath, updates) {
49
49
  const rawYaml = await import_fs.promises.readFile(configPath, "utf-8");
50
50
  const doc = (0, import_yaml.parseDocument)(rawYaml);
51
51
  const rawConfig = doc.toJSON();
52
52
  const updatedRawConfig = { ...rawConfig, ...updates };
53
53
  const enrichedConfig = (0, import_config_enrichment.enrichAgentConfig)(updatedRawConfig, configPath);
54
- const parsed = import_core.AgentConfigSchema.safeParse(enrichedConfig);
54
+ const parsed = import_agent_config.AgentConfigSchema.safeParse(enrichedConfig);
55
55
  if (!parsed.success) {
56
- const result = (0, import_core3.fail)((0, import_core3.zodToIssues)(parsed.error, "error"));
57
- throw new import_core2.DextoValidationError(result.issues);
56
+ const result = (0, import_core2.fail)((0, import_core2.zodToIssues)(parsed.error, "error"));
57
+ throw new import_core.DextoValidationError(result.issues);
58
58
  }
59
59
  for (const [key, value] of Object.entries(updates)) {
60
60
  doc.set(key, value);
@@ -1,4 +1,4 @@
1
- import type { AgentConfig, ValidatedAgentConfig } from '@dexto/core';
1
+ import { type AgentConfig, type ValidatedAgentConfig } from '@dexto/agent-config';
2
2
  /**
3
3
  * Input type for adding a file-based prompt
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../src/config/config-manager.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKrE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;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AE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,sBAAsB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,yBAAyB,EACjC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAyB,GACzD,OAAO,CAAC,oBAAoB,CAAC,CAsD/B"}
@@ -3,7 +3,9 @@ import * as path from "path";
3
3
  import { parseDocument, stringify } from "yaml";
4
4
  import { loadAgentConfig } from "./loader.js";
5
5
  import { enrichAgentConfig } from "./config-enrichment.js";
6
- import { AgentConfigSchema } from "@dexto/core";
6
+ import {
7
+ AgentConfigSchema
8
+ } from "@dexto/agent-config";
7
9
  import { DextoValidationError } from "@dexto/core";
8
10
  import { fail, zodToIssues } from "@dexto/core";
9
11
  async function updateAgentConfigFile(configPath, updates) {
@@ -1,5 +1,5 @@
1
- import type { AgentConfig } from '@dexto/core';
2
- import type { IDextoLogger } from '@dexto/core';
1
+ import type { AgentConfig } from '@dexto/agent-config';
2
+ import type { Logger } from '@dexto/core';
3
3
  /**
4
4
  * Asynchronously loads and processes an agent configuration file.
5
5
  * This function handles file reading, YAML parsing, and template variable expansion.
@@ -14,5 +14,5 @@ import type { IDextoLogger } from '@dexto/core';
14
14
  * @throws {ConfigError} with FILE_READ_ERROR if file read fails (e.g., permissions issues)
15
15
  * @throws {ConfigError} with PARSE_ERROR if the content is not valid YAML or template expansion fails
16
16
  */
17
- export declare function loadAgentConfig(configPath: string, logger?: IDextoLogger): Promise<AgentConfig>;
17
+ export declare function loadAgentConfig(configPath: string, logger?: Logger): Promise<AgentConfig>;
18
18
  //# sourceMappingURL=loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsGhD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CACjC,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,YAAY,GACtB,OAAO,CAAC,WAAW,CAAC,CA6DtB"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAsG1C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6D/F"}