@inkeep/agents-cli 0.0.0-dev-20250911192304 → 0.0.0-dev-20250911210702

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 (2) hide show
  1. package/dist/index.js +320 -271
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -115,55 +115,55 @@ async function loadConfigFromFile(configPath) {
115
115
  }
116
116
  try {
117
117
  const module = await importWithTypeScriptSupport(resolvedPath);
118
- const config3 = module.default || module.config;
119
- if (!config3) {
118
+ const config2 = module.default || module.config;
119
+ if (!config2) {
120
120
  throw new Error(`No config exported from ${resolvedPath}`);
121
121
  }
122
- return config3;
122
+ return config2;
123
123
  } catch (error43) {
124
124
  console.warn(`Warning: Failed to load config file ${resolvedPath}:`, error43);
125
125
  return null;
126
126
  }
127
127
  }
128
128
  async function loadConfig(configPath) {
129
- const config3 = {
129
+ const config2 = {
130
130
  agentsManageApiUrl: "http://localhost:3002",
131
131
  agentsRunApiUrl: "http://localhost:3003",
132
132
  manageUiUrl: "http://localhost:3000"
133
133
  };
134
134
  const fileConfig = await loadConfigFromFile(configPath);
135
135
  if (fileConfig) {
136
- Object.assign(config3, fileConfig);
136
+ Object.assign(config2, fileConfig);
137
137
  }
138
138
  if (process.env.INKEEP_AGENTS_MANAGE_API_URL) {
139
- config3.agentsManageApiUrl = process.env.INKEEP_AGENTS_MANAGE_API_URL;
139
+ config2.agentsManageApiUrl = process.env.INKEEP_AGENTS_MANAGE_API_URL;
140
140
  }
141
141
  if (process.env.INKEEP_AGENTS_RUN_API_URL) {
142
- config3.agentsRunApiUrl = process.env.INKEEP_AGENTS_RUN_API_URL;
142
+ config2.agentsRunApiUrl = process.env.INKEEP_AGENTS_RUN_API_URL;
143
143
  }
144
- return config3;
144
+ return config2;
145
145
  }
146
146
  async function getTenantId(configPath) {
147
- const config3 = await loadConfig(configPath);
148
- return config3.tenantId;
147
+ const config2 = await loadConfig(configPath);
148
+ return config2.tenantId;
149
149
  }
150
150
  async function getProjectId(configPath) {
151
- const config3 = await loadConfig(configPath);
152
- return config3.projectId || "default";
151
+ const config2 = await loadConfig(configPath);
152
+ return config2.projectId || "default";
153
153
  }
154
154
  async function getAgentsManageApiUrl(overrideUrl, configPath) {
155
155
  if (overrideUrl) {
156
156
  return overrideUrl;
157
157
  }
158
- const config3 = await loadConfig(configPath);
159
- return config3.agentsManageApiUrl || "http://localhost:3002";
158
+ const config2 = await loadConfig(configPath);
159
+ return config2.agentsManageApiUrl || "http://localhost:3002";
160
160
  }
161
161
  async function getAgentsRunApiUrl(overrideUrl, configPath) {
162
162
  if (overrideUrl) {
163
163
  return overrideUrl;
164
164
  }
165
- const config3 = await loadConfig(configPath);
166
- return config3.agentsRunApiUrl || "http://localhost:3003";
165
+ const config2 = await loadConfig(configPath);
166
+ return config2.agentsRunApiUrl || "http://localhost:3003";
167
167
  }
168
168
  async function validateConfiguration(tenantIdFlag, agentsManageApiUrlFlag, agentsRunApiUrlFlag, configFilePath) {
169
169
  if (configFilePath && tenantIdFlag) {
@@ -172,11 +172,11 @@ async function validateConfiguration(tenantIdFlag, agentsManageApiUrlFlag, agent
172
172
  );
173
173
  }
174
174
  if (configFilePath) {
175
- const config4 = await loadConfig(configFilePath);
176
- const tenantId2 = config4.tenantId;
177
- const projectId2 = config4.projectId || "default";
178
- const agentsManageApiUrl2 = agentsManageApiUrlFlag || config4.agentsManageApiUrl;
179
- const agentsRunApiUrl2 = agentsRunApiUrlFlag || config4.agentsRunApiUrl;
175
+ const config3 = await loadConfig(configFilePath);
176
+ const tenantId2 = config3.tenantId;
177
+ const projectId2 = config3.projectId || "default";
178
+ const agentsManageApiUrl2 = agentsManageApiUrlFlag || config3.agentsManageApiUrl;
179
+ const agentsRunApiUrl2 = agentsRunApiUrlFlag || config3.agentsRunApiUrl;
180
180
  if (!tenantId2) {
181
181
  throw new Error(
182
182
  `Tenant ID is missing from configuration file: ${configFilePath}
@@ -197,7 +197,7 @@ Please ensure your config file exports a valid configuration with agentsRunApiUr
197
197
  }
198
198
  const sources2 = {
199
199
  tenantId: `config file (${configFilePath})`,
200
- projectId: config4.projectId ? `config file (${configFilePath})` : "default",
200
+ projectId: config3.projectId ? `config file (${configFilePath})` : "default",
201
201
  agentsManageApiUrl: agentsManageApiUrlFlag ? "command-line flag (--agents-manage-api-url)" : `config file (${configFilePath})`,
202
202
  agentsRunApiUrl: agentsRunApiUrlFlag ? "command-line flag (--agents-run-api-url)" : `config file (${configFilePath})`,
203
203
  configFile: configFilePath
@@ -207,8 +207,8 @@ Please ensure your config file exports a valid configuration with agentsRunApiUr
207
207
  projectId: projectId2,
208
208
  agentsManageApiUrl: agentsManageApiUrl2,
209
209
  agentsRunApiUrl: agentsRunApiUrl2,
210
- manageUiUrl: config4.manageUiUrl,
211
- modelSettings: config4.modelSettings || void 0,
210
+ manageUiUrl: config3.manageUiUrl,
211
+ modelSettings: config3.modelSettings || void 0,
212
212
  sources: sources2
213
213
  };
214
214
  }
@@ -234,11 +234,11 @@ Please ensure your config file exports a valid configuration with agentsRunApiUr
234
234
  "Invalid configuration:\n--tenant-id requires --agents-manage-api-url and --agents-run-api-url to be provided as well.\nPlease provide both --tenant-id and --agents-manage-api-url and --agents-run-api-url together."
235
235
  );
236
236
  }
237
- const config3 = await loadConfig();
238
- const tenantId = config3.tenantId;
239
- const projectId = config3.projectId || "default";
240
- const agentsManageApiUrl = agentsManageApiUrlFlag || config3.agentsManageApiUrl;
241
- const agentsRunApiUrl = agentsRunApiUrlFlag || config3.agentsRunApiUrl;
237
+ const config2 = await loadConfig();
238
+ const tenantId = config2.tenantId;
239
+ const projectId = config2.projectId || "default";
240
+ const agentsManageApiUrl = agentsManageApiUrlFlag || config2.agentsManageApiUrl;
241
+ const agentsRunApiUrl = agentsRunApiUrlFlag || config2.agentsRunApiUrl;
242
242
  if (!tenantId) {
243
243
  const configFile2 = findConfigFile();
244
244
  if (!configFile2) {
@@ -284,7 +284,7 @@ Please either:
284
284
  }
285
285
  const sources = {
286
286
  tenantId: `config file (${configFile})`,
287
- projectId: config3.projectId ? configFile ? `config file (${configFile})` : "config" : "default",
287
+ projectId: config2.projectId ? configFile ? `config file (${configFile})` : "config" : "default",
288
288
  agentsManageApiUrl: agentsManageApiUrlSource,
289
289
  agentsRunApiUrl: agentsRunApiUrlSource,
290
290
  configFile: configFile || void 0
@@ -294,8 +294,8 @@ Please either:
294
294
  projectId,
295
295
  agentsManageApiUrl,
296
296
  agentsRunApiUrl,
297
- manageUiUrl: config3.manageUiUrl,
298
- modelSettings: config3.modelSettings || void 0,
297
+ manageUiUrl: config2.manageUiUrl,
298
+ modelSettings: config2.modelSettings || void 0,
299
299
  sources
300
300
  };
301
301
  }
@@ -4829,20 +4829,20 @@ var require_compile = __commonJS({
4829
4829
  var util_1 = require_util();
4830
4830
  var validate_1 = require_validate();
4831
4831
  var SchemaEnv = class {
4832
- constructor(env2) {
4832
+ constructor(env) {
4833
4833
  var _a;
4834
4834
  this.refs = {};
4835
4835
  this.dynamicAnchors = {};
4836
4836
  let schema;
4837
- if (typeof env2.schema == "object")
4838
- schema = env2.schema;
4839
- this.schema = env2.schema;
4840
- this.schemaId = env2.schemaId;
4841
- this.root = env2.root || this;
4842
- this.baseId = (_a = env2.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env2.schemaId || "$id"]);
4843
- this.schemaPath = env2.schemaPath;
4844
- this.localRefs = env2.localRefs;
4845
- this.meta = env2.meta;
4837
+ if (typeof env.schema == "object")
4838
+ schema = env.schema;
4839
+ this.schema = env.schema;
4840
+ this.schemaId = env.schemaId;
4841
+ this.root = env.root || this;
4842
+ this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
4843
+ this.schemaPath = env.schemaPath;
4844
+ this.localRefs = env.localRefs;
4845
+ this.meta = env.meta;
4846
4846
  this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
4847
4847
  this.refs = {};
4848
4848
  }
@@ -5026,15 +5026,15 @@ var require_compile = __commonJS({
5026
5026
  baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
5027
5027
  }
5028
5028
  }
5029
- let env2;
5029
+ let env;
5030
5030
  if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
5031
5031
  const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
5032
- env2 = resolveSchema.call(this, root, $ref);
5032
+ env = resolveSchema.call(this, root, $ref);
5033
5033
  }
5034
5034
  const { schemaId } = this.opts;
5035
- env2 = env2 || new SchemaEnv({ schema, schemaId, root, baseId });
5036
- if (env2.schema !== env2.root.schema)
5037
- return env2;
5035
+ env = env || new SchemaEnv({ schema, schemaId, root, baseId });
5036
+ if (env.schema !== env.root.schema)
5037
+ return env;
5038
5038
  return void 0;
5039
5039
  }
5040
5040
  }
@@ -5183,8 +5183,8 @@ var require_utils = __commonJS({
5183
5183
  }
5184
5184
  return ind;
5185
5185
  }
5186
- function removeDotSegments(path4) {
5187
- let input = path4;
5186
+ function removeDotSegments(path3) {
5187
+ let input = path3;
5188
5188
  const output = [];
5189
5189
  let nextSlash = -1;
5190
5190
  let len = 0;
@@ -5384,8 +5384,8 @@ var require_schemes = __commonJS({
5384
5384
  wsComponent.secure = void 0;
5385
5385
  }
5386
5386
  if (wsComponent.resourceName) {
5387
- const [path4, query] = wsComponent.resourceName.split("?");
5388
- wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
5387
+ const [path3, query] = wsComponent.resourceName.split("?");
5388
+ wsComponent.path = path3 && path3 !== "/" ? path3 : void 0;
5389
5389
  wsComponent.query = query;
5390
5390
  wsComponent.resourceName = void 0;
5391
5391
  }
@@ -5538,24 +5538,24 @@ var require_fast_uri = __commonJS({
5538
5538
  function normalize(uri, options) {
5539
5539
  if (typeof uri === "string") {
5540
5540
  uri = /** @type {T} */
5541
- serialize2(parse5(uri, options), options);
5541
+ serialize2(parse4(uri, options), options);
5542
5542
  } else if (typeof uri === "object") {
5543
5543
  uri = /** @type {T} */
5544
- parse5(serialize2(uri, options), options);
5544
+ parse4(serialize2(uri, options), options);
5545
5545
  }
5546
5546
  return uri;
5547
5547
  }
5548
5548
  function resolve5(baseURI, relativeURI, options) {
5549
5549
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
5550
- const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
5550
+ const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
5551
5551
  schemelessOptions.skipEscape = true;
5552
5552
  return serialize2(resolved, schemelessOptions);
5553
5553
  }
5554
5554
  function resolveComponent(base, relative, options, skipNormalization) {
5555
5555
  const target = {};
5556
5556
  if (!skipNormalization) {
5557
- base = parse5(serialize2(base, options), options);
5558
- relative = parse5(serialize2(relative, options), options);
5557
+ base = parse4(serialize2(base, options), options);
5558
+ relative = parse4(serialize2(relative, options), options);
5559
5559
  }
5560
5560
  options = options || {};
5561
5561
  if (!options.tolerant && relative.scheme) {
@@ -5607,13 +5607,13 @@ var require_fast_uri = __commonJS({
5607
5607
  function equal(uriA, uriB, options) {
5608
5608
  if (typeof uriA === "string") {
5609
5609
  uriA = unescape(uriA);
5610
- uriA = serialize2(normalizeComponentEncoding(parse5(uriA, options), true), { ...options, skipEscape: true });
5610
+ uriA = serialize2(normalizeComponentEncoding(parse4(uriA, options), true), { ...options, skipEscape: true });
5611
5611
  } else if (typeof uriA === "object") {
5612
5612
  uriA = serialize2(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
5613
5613
  }
5614
5614
  if (typeof uriB === "string") {
5615
5615
  uriB = unescape(uriB);
5616
- uriB = serialize2(normalizeComponentEncoding(parse5(uriB, options), true), { ...options, skipEscape: true });
5616
+ uriB = serialize2(normalizeComponentEncoding(parse4(uriB, options), true), { ...options, skipEscape: true });
5617
5617
  } else if (typeof uriB === "object") {
5618
5618
  uriB = serialize2(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
5619
5619
  }
@@ -5682,7 +5682,7 @@ var require_fast_uri = __commonJS({
5682
5682
  return uriTokens.join("");
5683
5683
  }
5684
5684
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
5685
- function parse5(uri, opts) {
5685
+ function parse4(uri, opts) {
5686
5686
  const options = Object.assign({}, opts);
5687
5687
  const parsed = {
5688
5688
  scheme: void 0,
@@ -5776,7 +5776,7 @@ var require_fast_uri = __commonJS({
5776
5776
  resolveComponent,
5777
5777
  equal,
5778
5778
  serialize: serialize2,
5779
- parse: parse5
5779
+ parse: parse4
5780
5780
  };
5781
5781
  module.exports = fastUri;
5782
5782
  module.exports.default = fastUri;
@@ -6442,8 +6442,8 @@ var require_ref = __commonJS({
6442
6442
  schemaType: "string",
6443
6443
  code(cxt) {
6444
6444
  const { gen, schema: $ref, it } = cxt;
6445
- const { baseId, schemaEnv: env2, validateName, opts, self } = it;
6446
- const { root } = env2;
6445
+ const { baseId, schemaEnv: env, validateName, opts, self } = it;
6446
+ const { root } = env;
6447
6447
  if (($ref === "#" || $ref === "#/") && baseId === root.baseId)
6448
6448
  return callRootRef();
6449
6449
  const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);
@@ -6453,8 +6453,8 @@ var require_ref = __commonJS({
6453
6453
  return callValidate(schOrEnv);
6454
6454
  return inlineRefSchema(schOrEnv);
6455
6455
  function callRootRef() {
6456
- if (env2 === root)
6457
- return callRef(cxt, validateName, env2, env2.$async);
6456
+ if (env === root)
6457
+ return callRef(cxt, validateName, env, env.$async);
6458
6458
  const rootName = gen.scopeValue("root", { ref: root });
6459
6459
  return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
6460
6460
  }
@@ -6484,14 +6484,14 @@ var require_ref = __commonJS({
6484
6484
  exports.getValidate = getValidate;
6485
6485
  function callRef(cxt, v2, sch, $async) {
6486
6486
  const { gen, it } = cxt;
6487
- const { allErrors, schemaEnv: env2, opts } = it;
6487
+ const { allErrors, schemaEnv: env, opts } = it;
6488
6488
  const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
6489
6489
  if ($async)
6490
6490
  callAsyncRef();
6491
6491
  else
6492
6492
  callSyncRef();
6493
6493
  function callAsyncRef() {
6494
- if (!env2.$async)
6494
+ if (!env.$async)
6495
6495
  throw new Error("async schema referenced by sync schema");
6496
6496
  const valid = gen.let("valid");
6497
6497
  gen.try(() => {
@@ -9002,7 +9002,7 @@ var require_uri_all = __commonJS({
9002
9002
  }
9003
9003
  var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
9004
9004
  var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
9005
- function parse5(uriString) {
9005
+ function parse4(uriString) {
9006
9006
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
9007
9007
  var components = {};
9008
9008
  var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
@@ -9171,8 +9171,8 @@ var require_uri_all = __commonJS({
9171
9171
  var skipNormalization = arguments[3];
9172
9172
  var target = {};
9173
9173
  if (!skipNormalization) {
9174
- base2 = parse5(serialize2(base2, options), options);
9175
- relative = parse5(serialize2(relative, options), options);
9174
+ base2 = parse4(serialize2(base2, options), options);
9175
+ relative = parse4(serialize2(relative, options), options);
9176
9176
  }
9177
9177
  options = options || {};
9178
9178
  if (!options.tolerant && relative.scheme) {
@@ -9223,24 +9223,24 @@ var require_uri_all = __commonJS({
9223
9223
  }
9224
9224
  function resolve5(baseURI, relativeURI, options) {
9225
9225
  var schemelessOptions = assign({ scheme: "null" }, options);
9226
- return serialize2(resolveComponents(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
9226
+ return serialize2(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
9227
9227
  }
9228
9228
  function normalize(uri, options) {
9229
9229
  if (typeof uri === "string") {
9230
- uri = serialize2(parse5(uri, options), options);
9230
+ uri = serialize2(parse4(uri, options), options);
9231
9231
  } else if (typeOf(uri) === "object") {
9232
- uri = parse5(serialize2(uri, options), options);
9232
+ uri = parse4(serialize2(uri, options), options);
9233
9233
  }
9234
9234
  return uri;
9235
9235
  }
9236
9236
  function equal(uriA, uriB, options) {
9237
9237
  if (typeof uriA === "string") {
9238
- uriA = serialize2(parse5(uriA, options), options);
9238
+ uriA = serialize2(parse4(uriA, options), options);
9239
9239
  } else if (typeOf(uriA) === "object") {
9240
9240
  uriA = serialize2(uriA, options);
9241
9241
  }
9242
9242
  if (typeof uriB === "string") {
9243
- uriB = serialize2(parse5(uriB, options), options);
9243
+ uriB = serialize2(parse4(uriB, options), options);
9244
9244
  } else if (typeOf(uriB) === "object") {
9245
9245
  uriB = serialize2(uriB, options);
9246
9246
  }
@@ -9255,7 +9255,7 @@ var require_uri_all = __commonJS({
9255
9255
  var handler = {
9256
9256
  scheme: "http",
9257
9257
  domainHost: true,
9258
- parse: function parse6(components, options) {
9258
+ parse: function parse5(components, options) {
9259
9259
  if (!components.host) {
9260
9260
  components.error = components.error || "HTTP URIs must have a host.";
9261
9261
  }
@@ -9284,7 +9284,7 @@ var require_uri_all = __commonJS({
9284
9284
  var handler$2 = {
9285
9285
  scheme: "ws",
9286
9286
  domainHost: true,
9287
- parse: function parse6(components, options) {
9287
+ parse: function parse5(components, options) {
9288
9288
  var wsComponents = components;
9289
9289
  wsComponents.secure = isSecure(wsComponents);
9290
9290
  wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
@@ -9301,8 +9301,8 @@ var require_uri_all = __commonJS({
9301
9301
  wsComponents.secure = void 0;
9302
9302
  }
9303
9303
  if (wsComponents.resourceName) {
9304
- var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
9305
- wsComponents.path = path4 && path4 !== "/" ? path4 : void 0;
9304
+ var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path3 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
9305
+ wsComponents.path = path3 && path3 !== "/" ? path3 : void 0;
9306
9306
  wsComponents.query = query;
9307
9307
  wsComponents.resourceName = void 0;
9308
9308
  }
@@ -9457,7 +9457,7 @@ var require_uri_all = __commonJS({
9457
9457
  var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
9458
9458
  var handler$6 = {
9459
9459
  scheme: "urn:uuid",
9460
- parse: function parse6(urnComponents, options) {
9460
+ parse: function parse5(urnComponents, options) {
9461
9461
  var uuidComponents = urnComponents;
9462
9462
  uuidComponents.uuid = uuidComponents.nss;
9463
9463
  uuidComponents.nss = void 0;
@@ -9482,7 +9482,7 @@ var require_uri_all = __commonJS({
9482
9482
  exports2.SCHEMES = SCHEMES;
9483
9483
  exports2.pctEncChar = pctEncChar;
9484
9484
  exports2.pctDecChars = pctDecChars;
9485
- exports2.parse = parse5;
9485
+ exports2.parse = parse4;
9486
9486
  exports2.removeDotSegments = removeDotSegments;
9487
9487
  exports2.serialize = serialize2;
9488
9488
  exports2.resolveComponents = resolveComponents;
@@ -9642,12 +9642,12 @@ var require_util2 = __commonJS({
9642
9642
  return "'" + escapeQuotes(str) + "'";
9643
9643
  }
9644
9644
  function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
9645
- var path4 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
9646
- return joinPaths(currentPath, path4);
9645
+ var path3 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
9646
+ return joinPaths(currentPath, path3);
9647
9647
  }
9648
9648
  function getPath2(currentPath, prop, jsonPointers) {
9649
- var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
9650
- return joinPaths(currentPath, path4);
9649
+ var path3 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
9650
+ return joinPaths(currentPath, path3);
9651
9651
  }
9652
9652
  var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
9653
9653
  var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -14712,9 +14712,9 @@ import chalk7 from "chalk";
14712
14712
  import inquirer4 from "inquirer";
14713
14713
  import ora5 from "ora";
14714
14714
  async function chatCommandEnhanced(graphIdInput, options) {
14715
- let config3;
14715
+ let config2;
14716
14716
  try {
14717
- config3 = await validateConfiguration(
14717
+ config2 = await validateConfiguration(
14718
14718
  options?.tenantId,
14719
14719
  options?.agentsManageApiUrl,
14720
14720
  options?.agentsRunApiUrl,
@@ -14725,19 +14725,19 @@ async function chatCommandEnhanced(graphIdInput, options) {
14725
14725
  process.exit(1);
14726
14726
  }
14727
14727
  console.log(chalk7.gray("Using configuration:"));
14728
- console.log(chalk7.gray(` \u2022 Tenant ID: ${config3.sources.tenantId}`));
14729
- console.log(chalk7.gray(` \u2022 Management API: ${config3.sources.agentsManageApiUrl}`));
14730
- console.log(chalk7.gray(` \u2022 Execution API: ${config3.sources.agentsRunApiUrl}`));
14728
+ console.log(chalk7.gray(` \u2022 Tenant ID: ${config2.sources.tenantId}`));
14729
+ console.log(chalk7.gray(` \u2022 Management API: ${config2.sources.agentsManageApiUrl}`));
14730
+ console.log(chalk7.gray(` \u2022 Execution API: ${config2.sources.agentsRunApiUrl}`));
14731
14731
  console.log();
14732
14732
  const managementApi = await ManagementApiClient.create(
14733
- config3.agentsManageApiUrl,
14733
+ config2.agentsManageApiUrl,
14734
14734
  options?.configFilePath,
14735
- config3.tenantId
14735
+ config2.tenantId
14736
14736
  );
14737
14737
  const executionApi = await ExecutionApiClient.create(
14738
- config3.agentsRunApiUrl,
14738
+ config2.agentsRunApiUrl,
14739
14739
  options?.configFilePath,
14740
- config3.tenantId
14740
+ config2.tenantId
14741
14741
  );
14742
14742
  let graphId = graphIdInput;
14743
14743
  if (!graphId) {
@@ -15033,12 +15033,12 @@ async function configGetCommand(key, options) {
15033
15033
  const content = readFileSync(configPath, "utf-8");
15034
15034
  const tenantIdMatch = content.match(/tenantId:\s*['"]([^'"]+)['"]/);
15035
15035
  const apiUrlMatch = content.match(/apiUrl:\s*['"]([^'"]+)['"]/);
15036
- const config3 = {
15036
+ const config2 = {
15037
15037
  tenantId: tenantIdMatch ? tenantIdMatch[1] : void 0,
15038
15038
  apiUrl: apiUrlMatch ? apiUrlMatch[1] : void 0
15039
15039
  };
15040
15040
  if (key) {
15041
- const value = config3[key];
15041
+ const value = config2[key];
15042
15042
  if (value !== void 0) {
15043
15043
  console.log(value);
15044
15044
  } else {
@@ -15049,8 +15049,8 @@ async function configGetCommand(key, options) {
15049
15049
  } else {
15050
15050
  console.log(chalk.cyan("Current configuration:"));
15051
15051
  console.log(chalk.gray(" Config file:"), configPath);
15052
- console.log(chalk.gray(" Tenant ID:"), config3.tenantId || chalk.yellow("(not set)"));
15053
- console.log(chalk.gray(" API URL:"), config3.apiUrl || chalk.yellow("(not set)"));
15052
+ console.log(chalk.gray(" Tenant ID:"), config2.tenantId || chalk.yellow("(not set)"));
15053
+ console.log(chalk.gray(" API URL:"), config2.apiUrl || chalk.yellow("(not set)"));
15054
15054
  }
15055
15055
  } catch (error43) {
15056
15056
  console.error(chalk.red("Failed to read configuration:"), error43);
@@ -15230,7 +15230,7 @@ var createAgents = async (args = {}) => {
15230
15230
  }
15231
15231
  await fs.ensureDir(directoryPath);
15232
15232
  process.chdir(directoryPath);
15233
- const config3 = {
15233
+ const config2 = {
15234
15234
  dirName,
15235
15235
  tenantId,
15236
15236
  projectId,
@@ -15244,11 +15244,11 @@ var createAgents = async (args = {}) => {
15244
15244
  s2.message("Creating package configurations...");
15245
15245
  await setupPackageConfigurations(dirName);
15246
15246
  s2.message("Setting up environment files...");
15247
- await createEnvironmentFiles(config3);
15247
+ await createEnvironmentFiles(config2);
15248
15248
  s2.message("Creating service files...");
15249
- await createServiceFiles(config3);
15249
+ await createServiceFiles(config2);
15250
15250
  s2.message("Creating documentation...");
15251
- await createDocumentation(config3);
15251
+ await createDocumentation(config2);
15252
15252
  s2.message("Setting up Turbo...");
15253
15253
  await createTurboConfig();
15254
15254
  s2.message("Installing dependencies (this may take a while)...");
@@ -15395,7 +15395,7 @@ async function setupPackageConfigurations(dirName) {
15395
15395
  await fs.writeJson("apps/manage-api/tsconfig.json", apiTsConfig, { spaces: 2 });
15396
15396
  await fs.writeJson("apps/run-api/tsconfig.json", apiTsConfig, { spaces: 2 });
15397
15397
  }
15398
- async function createEnvironmentFiles(config3) {
15398
+ async function createEnvironmentFiles(config2) {
15399
15399
  const envContent = `# Environment
15400
15400
  ENVIRONMENT=development
15401
15401
 
@@ -15403,19 +15403,19 @@ ENVIRONMENT=development
15403
15403
  DB_FILE_NAME=file:./local.db
15404
15404
 
15405
15405
  # AI Provider Keys
15406
- ANTHROPIC_API_KEY=${config3.anthropicKey || "your-anthropic-key-here"}
15407
- OPENAI_API_KEY=${config3.openAiKey || "your-openai-key-here"}
15406
+ ANTHROPIC_API_KEY=${config2.anthropicKey || "your-anthropic-key-here"}
15407
+ OPENAI_API_KEY=${config2.openAiKey || "your-openai-key-here"}
15408
15408
 
15409
15409
  # Logging
15410
15410
  LOG_LEVEL=debug
15411
15411
 
15412
15412
  # Service Ports
15413
- MANAGE_API_PORT=${config3.manageApiPort}
15414
- RUN_API_PORT=${config3.runApiPort}
15413
+ MANAGE_API_PORT=${config2.manageApiPort}
15414
+ RUN_API_PORT=${config2.runApiPort}
15415
15415
 
15416
15416
  # UI Configuration (for dashboard)
15417
- NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config3.manageApiPort}
15418
- NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config3.runApiPort}
15417
+ NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config2.manageApiPort}
15418
+ NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config2.runApiPort}
15419
15419
  `;
15420
15420
  await fs.writeFile(".env", envContent);
15421
15421
  const envExample = envContent.replace(/=.+$/gm, "=");
@@ -15427,8 +15427,8 @@ ENVIRONMENT=development
15427
15427
  DB_FILE_NAME=file:../../local.db
15428
15428
 
15429
15429
  # AI Provider Keys
15430
- ANTHROPIC_API_KEY=${config3.anthropicKey || "your-anthropic-key-here"}
15431
- OPENAI_API_KEY=${config3.openAiKey || "your-openai-key-here"}
15430
+ ANTHROPIC_API_KEY=${config2.anthropicKey || "your-anthropic-key-here"}
15431
+ OPENAI_API_KEY=${config2.openAiKey || "your-openai-key-here"}
15432
15432
  `;
15433
15433
  const manageApiEnvContent = `# Environment
15434
15434
  ENVIRONMENT=development
@@ -15514,7 +15514,7 @@ pids/
15514
15514
  };
15515
15515
  await fs.writeJson("biome.json", biomeConfig, { spaces: 2 });
15516
15516
  }
15517
- async function createServiceFiles(config3) {
15517
+ async function createServiceFiles(config2) {
15518
15518
  const agentsGraph = `import { agent, agentGraph } from '@inkeep/agents-sdk';
15519
15519
 
15520
15520
  // Router agent - the entry point that routes users to specialist agents
@@ -15534,18 +15534,18 @@ export const graph = agentGraph({
15534
15534
  defaultAgent: helloAgent,
15535
15535
  agents: () => [helloAgent],
15536
15536
  });`;
15537
- await fs.writeFile(`src/${config3.projectId}/hello.graph.ts`, agentsGraph);
15537
+ await fs.writeFile(`src/${config2.projectId}/hello.graph.ts`, agentsGraph);
15538
15538
  const inkeepConfig = `import { defineConfig } from '@inkeep/agents-cli/config';
15539
15539
 
15540
15540
  const config = defineConfig({
15541
- tenantId: "${config3.tenantId}",
15542
- projectId: "${config3.projectId}",
15541
+ tenantId: "${config2.tenantId}",
15542
+ projectId: "${config2.projectId}",
15543
15543
  agentsManageApiUrl: \`http://localhost:\${process.env.MANAGE_API_PORT || '3002'}\`,
15544
15544
  agentsRunApiUrl: \`http://localhost:\${process.env.RUN_API_PORT || '3003'}\`,
15545
15545
  });
15546
15546
 
15547
15547
  export default config;`;
15548
- await fs.writeFile(`src/${config3.projectId}/inkeep.config.ts`, inkeepConfig);
15548
+ await fs.writeFile(`src/${config2.projectId}/inkeep.config.ts`, inkeepConfig);
15549
15549
  const projectEnvContent = `# Environment
15550
15550
  ENVIRONMENT=development
15551
15551
 
@@ -15553,11 +15553,11 @@ ENVIRONMENT=development
15553
15553
  DB_FILE_NAME=file:../../local.db
15554
15554
 
15555
15555
  # UI Configuration (for dashboard)
15556
- NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config3.manageApiPort}
15557
- NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config3.runApiPort}
15556
+ NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config2.manageApiPort}
15557
+ NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config2.runApiPort}
15558
15558
 
15559
15559
  `;
15560
- await fs.writeFile(`src/${config3.projectId}/.env`, projectEnvContent);
15560
+ await fs.writeFile(`src/${config2.projectId}/.env`, projectEnvContent);
15561
15561
  const credentialStoresFile = `import {
15562
15562
  InMemoryCredentialStore,
15563
15563
  createNangoCredentialStore,
@@ -15698,8 +15698,8 @@ async function createTurboConfig() {
15698
15698
  };
15699
15699
  await fs.writeJson("turbo.json", turboConfig, { spaces: 2 });
15700
15700
  }
15701
- async function createDocumentation(config3) {
15702
- const readme = `# ${config3.dirName}
15701
+ async function createDocumentation(config2) {
15702
+ const readme = `# ${config2.dirName}
15703
15703
 
15704
15704
  An Inkeep Agent Framework project with multi-service architecture.
15705
15705
 
@@ -15728,7 +15728,7 @@ This project follows a workspace structure with the following services:
15728
15728
  3. **Deploy your first agent graph:**
15729
15729
  \`\`\`bash
15730
15730
  # Navigate to your project's graph directory
15731
- cd src/${config3.projectId}/
15731
+ cd src/${config2.projectId}/
15732
15732
 
15733
15733
  # Push the hello graph to create it
15734
15734
  npx inkeep push hello.graph.ts
@@ -15739,9 +15739,9 @@ This project follows a workspace structure with the following services:
15739
15739
  ## Project Structure
15740
15740
 
15741
15741
  \`\`\`
15742
- ${config3.dirName}/
15742
+ ${config2.dirName}/
15743
15743
  \u251C\u2500\u2500 src/
15744
- \u2502 \u251C\u2500\u2500 /${config3.projectId} # Agent configurations
15744
+ \u2502 \u251C\u2500\u2500 /${config2.projectId} # Agent configurations
15745
15745
  \u251C\u2500\u2500 apps/
15746
15746
  \u2502 \u251C\u2500\u2500 manage-api/ # Agents Management API service
15747
15747
  \u2502 \u251C\u2500\u2500 run-api/ # Agents Run API service
@@ -15759,7 +15759,7 @@ Environment variables are defined in the following places:
15759
15759
 
15760
15760
  - \`apps/manage-api/.env\`: Agents Management API environment variables
15761
15761
  - \`apps/run-api/.env\`: Agents Run API environment variables
15762
- - \`src/${config3.projectId}/.env\`: Inkeep CLI environment variables
15762
+ - \`src/${config2.projectId}/.env\`: Inkeep CLI environment variables
15763
15763
  - \`.env\`: Root environment variables
15764
15764
 
15765
15765
  To change the API keys used by your agents modify \`apps/run-api/.env\`. You are required to define at least one LLM provider key.
@@ -15784,17 +15784,17 @@ After changing the API Service ports make sure that you modify the dashboard API
15784
15784
 
15785
15785
  \`\`\`bash
15786
15786
  # UI Configuration (for dashboard)
15787
- NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config3.manageApiPort}
15788
- NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config3.runApiPort}
15787
+ NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://localhost:${config2.manageApiPort}
15788
+ NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://localhost:${config2.runApiPort}
15789
15789
  \`\`\`
15790
15790
 
15791
15791
  ### Agent Configuration
15792
15792
 
15793
- Your agents are defined in \`src/${config3.projectId}/index.ts\`. The default setup includes:
15793
+ Your agents are defined in \`src/${config2.projectId}/index.ts\`. The default setup includes:
15794
15794
 
15795
15795
  - **Hello Agent**: A hello agent that just says hello.
15796
15796
 
15797
- Your inkeep configuration is defined in \`src/${config3.projectId}/inkeep.config.ts\`. The inkeep configuration is used to configure defaults for the inkeep CLI. The configuration includes:
15797
+ Your inkeep configuration is defined in \`src/${config2.projectId}/inkeep.config.ts\`. The inkeep configuration is used to configure defaults for the inkeep CLI. The configuration includes:
15798
15798
 
15799
15799
  - \`tenantId\`: The tenant ID
15800
15800
  - \`projectId\`: The project ID
@@ -15806,15 +15806,15 @@ Your inkeep configuration is defined in \`src/${config3.projectId}/inkeep.config
15806
15806
 
15807
15807
  ### Updating Your Agents
15808
15808
 
15809
- 1. Edit \`src/${config3.projectId}/index.ts\`
15809
+ 1. Edit \`src/${config2.projectId}/index.ts\`
15810
15810
  2. Push the graph to the platform to update: \`npx inkeep push hello.graph.ts\`
15811
15811
 
15812
15812
  ### API Documentation
15813
15813
 
15814
15814
  Once services are running, view the OpenAPI documentation:
15815
15815
 
15816
- - Management API: http://localhost:${config3.manageApiPort}/docs
15817
- - Execution API: http://localhost:${config3.runApiPort}/docs
15816
+ - Management API: http://localhost:${config2.manageApiPort}/docs
15817
+ - Execution API: http://localhost:${config2.runApiPort}/docs
15818
15818
 
15819
15819
  ## Learn More
15820
15820
 
@@ -15824,9 +15824,9 @@ Once services are running, view the OpenAPI documentation:
15824
15824
 
15825
15825
  ## Inkeep CLI commands
15826
15826
 
15827
- - Ensure you are runnning commands from \`cd src/${config3.projectId}\`.
15827
+ - Ensure you are runnning commands from \`cd src/${config2.projectId}\`.
15828
15828
  - Validate the \`inkeep.config.ts\` file has the correct api urls.
15829
- - Validate that the \`.env\` file in \`src/${config3.projectId}\` has the correct \`DB_FILE_NAME\`.
15829
+ - Validate that the \`.env\` file in \`src/${config2.projectId}\` has the correct \`DB_FILE_NAME\`.
15830
15830
 
15831
15831
  ### Services won't start
15832
15832
 
@@ -16190,9 +16190,9 @@ import chalk4 from "chalk";
16190
16190
  import Table from "cli-table3";
16191
16191
  import ora2 from "ora";
16192
16192
  async function listGraphsCommand(options) {
16193
- let config3;
16193
+ let config2;
16194
16194
  try {
16195
- config3 = await validateConfiguration(
16195
+ config2 = await validateConfiguration(
16196
16196
  options.tenantId,
16197
16197
  options.agentsManageApiUrl,
16198
16198
  void 0,
@@ -16204,13 +16204,13 @@ async function listGraphsCommand(options) {
16204
16204
  process.exit(1);
16205
16205
  }
16206
16206
  console.log(chalk4.gray("Using configuration:"));
16207
- console.log(chalk4.gray(` \u2022 Tenant ID: ${config3.sources.tenantId}`));
16208
- console.log(chalk4.gray(` \u2022 API URL: ${config3.sources.agentsManageApiUrl}`));
16207
+ console.log(chalk4.gray(` \u2022 Tenant ID: ${config2.sources.tenantId}`));
16208
+ console.log(chalk4.gray(` \u2022 API URL: ${config2.sources.agentsManageApiUrl}`));
16209
16209
  console.log();
16210
16210
  const api = await ManagementApiClient.create(
16211
- config3.agentsManageApiUrl,
16211
+ config2.agentsManageApiUrl,
16212
16212
  options.configFilePath,
16213
- config3.tenantId
16213
+ config2.tenantId
16214
16214
  );
16215
16215
  const spinner2 = ora2("Fetching graphs...").start();
16216
16216
  try {
@@ -16287,16 +16287,16 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16287
16287
  }
16288
16288
  return value;
16289
16289
  }
16290
- function shouldIgnorePath(path4) {
16290
+ function shouldIgnorePath(path3) {
16291
16291
  return ignorePaths.some((ignorePath) => {
16292
16292
  if (ignorePath.endsWith("*")) {
16293
- return path4.startsWith(ignorePath.slice(0, -1));
16293
+ return path3.startsWith(ignorePath.slice(0, -1));
16294
16294
  }
16295
- return path4 === ignorePath;
16295
+ return path3 === ignorePath;
16296
16296
  });
16297
16297
  }
16298
- function compareValues(value1, value2, path4 = "") {
16299
- if (shouldIgnorePath(path4)) {
16298
+ function compareValues(value1, value2, path3 = "") {
16299
+ if (shouldIgnorePath(path3)) {
16300
16300
  return true;
16301
16301
  }
16302
16302
  if (value1 === null || value1 === void 0) {
@@ -16304,7 +16304,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16304
16304
  return true;
16305
16305
  }
16306
16306
  differences.push({
16307
- path: path4,
16307
+ path: path3,
16308
16308
  type: "different",
16309
16309
  value1,
16310
16310
  value2,
@@ -16314,7 +16314,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16314
16314
  }
16315
16315
  if (value2 === null || value2 === void 0) {
16316
16316
  differences.push({
16317
- path: path4,
16317
+ path: path3,
16318
16318
  type: "different",
16319
16319
  value1,
16320
16320
  value2,
@@ -16324,7 +16324,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16324
16324
  }
16325
16325
  if (typeof value1 !== typeof value2) {
16326
16326
  differences.push({
16327
- path: path4,
16327
+ path: path3,
16328
16328
  type: "type_mismatch",
16329
16329
  value1,
16330
16330
  value2,
@@ -16337,7 +16337,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16337
16337
  const normalized2 = normalizeValue(value2);
16338
16338
  if (normalized1 !== normalized2) {
16339
16339
  differences.push({
16340
- path: path4,
16340
+ path: path3,
16341
16341
  type: "different",
16342
16342
  value1,
16343
16343
  value2,
@@ -16350,7 +16350,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16350
16350
  if (Array.isArray(value1) && Array.isArray(value2)) {
16351
16351
  if (value1.length !== value2.length) {
16352
16352
  differences.push({
16353
- path: path4,
16353
+ path: path3,
16354
16354
  type: "different",
16355
16355
  value1: value1.length,
16356
16356
  value2: value2.length,
@@ -16366,11 +16366,11 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16366
16366
  (a, b2) => JSON.stringify(a).localeCompare(JSON.stringify(b2))
16367
16367
  );
16368
16368
  for (let i2 = 0; i2 < sorted1.length; i2++) {
16369
- compareValues(sorted1[i2], sorted2[i2], `${path4}[${i2}]`);
16369
+ compareValues(sorted1[i2], sorted2[i2], `${path3}[${i2}]`);
16370
16370
  }
16371
16371
  } else {
16372
16372
  for (let i2 = 0; i2 < value1.length; i2++) {
16373
- compareValues(value1[i2], value2[i2], `${path4}[${i2}]`);
16373
+ compareValues(value1[i2], value2[i2], `${path3}[${i2}]`);
16374
16374
  }
16375
16375
  }
16376
16376
  return true;
@@ -16381,7 +16381,7 @@ function compareJsonObjects(obj1, obj2, options = {}) {
16381
16381
  const allKeys = /* @__PURE__ */ new Set([...keys1, ...keys2]);
16382
16382
  stats.totalKeys += allKeys.size;
16383
16383
  for (const key of allKeys) {
16384
- const currentPath = path4 ? `${path4}.${key}` : key;
16384
+ const currentPath = path3 ? `${path3}.${key}` : key;
16385
16385
  if (!keys1.includes(key)) {
16386
16386
  differences.push({
16387
16387
  path: currentPath,
@@ -16449,12 +16449,12 @@ init_esm_shims();
16449
16449
  import { anthropic, createAnthropic } from "@ai-sdk/anthropic";
16450
16450
  import { createOpenAI, openai } from "@ai-sdk/openai";
16451
16451
  import { generateText } from "ai";
16452
- function createModel(config3) {
16453
- if (!config3.model) {
16452
+ function createModel(config2) {
16453
+ if (!config2.model) {
16454
16454
  throw new Error("Model configuration is required for pull command");
16455
16455
  }
16456
- const modelString = config3.model;
16457
- const providerOptions = config3.providerOptions;
16456
+ const modelString = config2.model;
16457
+ const providerOptions = config2.providerOptions;
16458
16458
  const { provider, modelName } = parseModelString(modelString);
16459
16459
  switch (provider) {
16460
16460
  case "anthropic":
@@ -16487,11 +16487,11 @@ function parseModelString(modelString) {
16487
16487
  };
16488
16488
  }
16489
16489
  async function generateTypeScriptFileWithLLM(graphData, graphId, outputFilePath, modelSettings, retryContext) {
16490
- const fs3 = await import("fs");
16490
+ const fs2 = await import("fs");
16491
16491
  let existingContent = "";
16492
16492
  let fileExists = false;
16493
16493
  try {
16494
- existingContent = fs3.readFileSync(outputFilePath, "utf-8");
16494
+ existingContent = fs2.readFileSync(outputFilePath, "utf-8");
16495
16495
  fileExists = true;
16496
16496
  } catch {
16497
16497
  fileExists = false;
@@ -16507,7 +16507,7 @@ async function generateTypeScriptFileWithLLM(graphData, graphId, outputFilePath,
16507
16507
  maxOutputTokens: 16e3
16508
16508
  // Increased to handle large TypeScript files
16509
16509
  });
16510
- fs3.writeFileSync(outputFilePath, text3, "utf-8");
16510
+ fs2.writeFileSync(outputFilePath, text3, "utf-8");
16511
16511
  console.log(`\u2705 Successfully generated TypeScript file: ${outputFilePath}`);
16512
16512
  } catch (error43) {
16513
16513
  console.error("\u274C Error generating TypeScript file with LLM:", error43);
@@ -16671,9 +16671,9 @@ async function convertTypeScriptToJson(graphPath) {
16671
16671
  async function pullCommand(graphId, options) {
16672
16672
  const spinner2 = ora3("Loading configuration...").start();
16673
16673
  try {
16674
- let config3;
16674
+ let config2;
16675
16675
  try {
16676
- config3 = await validateConfiguration(
16676
+ config2 = await validateConfiguration(
16677
16677
  options.tenantId,
16678
16678
  options.apiUrl,
16679
16679
  options.configFilePath
@@ -16691,7 +16691,7 @@ async function pullCommand(graphId, options) {
16691
16691
  );
16692
16692
  spinner2.text = "Fetching graph from API...";
16693
16693
  const response = await fetch(
16694
- `${config3.agentsManageApiUrl}/tenants/${config3.tenantId}/crud/projects/${config3.projectId}/graph/${graphId}`,
16694
+ `${config2.agentsManageApiUrl}/tenants/${config2.tenantId}/crud/projects/${config2.projectId}/graph/${graphId}`,
16695
16695
  {
16696
16696
  method: "GET",
16697
16697
  headers: {
@@ -16720,7 +16720,7 @@ async function pullCommand(graphId, options) {
16720
16720
  console.log(chalk5.gray(` \u2022 View the file: ${outputFilePath}`));
16721
16721
  console.log(chalk5.gray(` \u2022 Use the data in your application`));
16722
16722
  } else {
16723
- if (!config3.modelSettings?.pull) {
16723
+ if (!config2.modelSettings?.pull) {
16724
16724
  spinner2.fail("Pull model configuration is required for TypeScript generation");
16725
16725
  console.error(chalk5.red("Error: No pull model found in configuration."));
16726
16726
  console.error(chalk5.yellow("Please add pull model to your inkeep.config.ts file."));
@@ -16746,7 +16746,7 @@ async function pullCommand(graphId, options) {
16746
16746
  graphData,
16747
16747
  graphId,
16748
16748
  outputFilePath,
16749
- config3.modelSettings.pull,
16749
+ config2.modelSettings.pull,
16750
16750
  {
16751
16751
  attempt,
16752
16752
  maxRetries,
@@ -17613,10 +17613,10 @@ function mergeDefs(...defs) {
17613
17613
  function cloneDef(schema) {
17614
17614
  return mergeDefs(schema._zod.def);
17615
17615
  }
17616
- function getElementAtPath(obj, path4) {
17617
- if (!path4)
17616
+ function getElementAtPath(obj, path3) {
17617
+ if (!path3)
17618
17618
  return obj;
17619
- return path4.reduce((acc, key) => acc?.[key], obj);
17619
+ return path3.reduce((acc, key) => acc?.[key], obj);
17620
17620
  }
17621
17621
  function promiseAllObject(promisesObj) {
17622
17622
  const keys = Object.keys(promisesObj);
@@ -17975,21 +17975,21 @@ function aborted(x2, startIndex = 0) {
17975
17975
  }
17976
17976
  return false;
17977
17977
  }
17978
- function prefixIssues(path4, issues) {
17978
+ function prefixIssues(path3, issues) {
17979
17979
  return issues.map((iss) => {
17980
17980
  var _a;
17981
17981
  (_a = iss).path ?? (_a.path = []);
17982
- iss.path.unshift(path4);
17982
+ iss.path.unshift(path3);
17983
17983
  return iss;
17984
17984
  });
17985
17985
  }
17986
17986
  function unwrapMessage(message) {
17987
17987
  return typeof message === "string" ? message : message?.message;
17988
17988
  }
17989
- function finalizeIssue(iss, ctx, config3) {
17989
+ function finalizeIssue(iss, ctx, config2) {
17990
17990
  const full = { ...iss, path: iss.path ?? [] };
17991
17991
  if (!iss.message) {
17992
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input";
17992
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
17993
17993
  full.message = message;
17994
17994
  }
17995
17995
  delete full.inst;
@@ -18147,7 +18147,7 @@ function treeifyError(error43, _mapper) {
18147
18147
  return issue2.message;
18148
18148
  };
18149
18149
  const result = { errors: [] };
18150
- const processError = (error44, path4 = []) => {
18150
+ const processError = (error44, path3 = []) => {
18151
18151
  var _a, _b;
18152
18152
  for (const issue2 of error44.issues) {
18153
18153
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -18157,7 +18157,7 @@ function treeifyError(error43, _mapper) {
18157
18157
  } else if (issue2.code === "invalid_element") {
18158
18158
  processError({ issues: issue2.issues }, issue2.path);
18159
18159
  } else {
18160
- const fullpath = [...path4, ...issue2.path];
18160
+ const fullpath = [...path3, ...issue2.path];
18161
18161
  if (fullpath.length === 0) {
18162
18162
  result.errors.push(mapper(issue2));
18163
18163
  continue;
@@ -18189,8 +18189,8 @@ function treeifyError(error43, _mapper) {
18189
18189
  }
18190
18190
  function toDotPath(_path) {
18191
18191
  const segs = [];
18192
- const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
18193
- for (const seg of path4) {
18192
+ const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
18193
+ for (const seg of path3) {
18194
18194
  if (typeof seg === "number")
18195
18195
  segs.push(`[${seg}]`);
18196
18196
  else if (typeof seg === "symbol")
@@ -28982,8 +28982,8 @@ var LoggerFactory = class {
28982
28982
  /**
28983
28983
  * Configure the logger factory
28984
28984
  */
28985
- configure(config3) {
28986
- this.config = config3;
28985
+ configure(config2) {
28986
+ this.config = config2;
28987
28987
  this.loggers.clear();
28988
28988
  }
28989
28989
  /**
@@ -29561,9 +29561,9 @@ var HonoRequest = class {
29561
29561
  routeIndex = 0;
29562
29562
  path;
29563
29563
  bodyCache = {};
29564
- constructor(request, path4 = "/", matchResult = [[]]) {
29564
+ constructor(request, path3 = "/", matchResult = [[]]) {
29565
29565
  this.raw = request;
29566
- this.path = path4;
29566
+ this.path = path3;
29567
29567
  this.#matchResult = matchResult;
29568
29568
  this.#validatedData = {};
29569
29569
  }
@@ -30360,6 +30360,7 @@ var agentToolRelations = sqliteTable(
30360
30360
  id: text2("id").notNull(),
30361
30361
  agentId: text2("agent_id").notNull(),
30362
30362
  toolId: text2("tool_id").notNull(),
30363
+ selectedTools: blob("selected_tools", { mode: "json" }).$type(),
30363
30364
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
30364
30365
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
30365
30366
  },
@@ -31226,7 +31227,8 @@ var AgentToolRelationSelectSchema = createSelectSchema(agentToolRelations);
31226
31227
  var AgentToolRelationInsertSchema = createInsertSchema(agentToolRelations).extend({
31227
31228
  id: resourceIdSchema,
31228
31229
  agentId: resourceIdSchema,
31229
- toolId: resourceIdSchema
31230
+ toolId: resourceIdSchema,
31231
+ selectedTools: external_exports.array(external_exports.string()).nullish()
31230
31232
  });
31231
31233
  var AgentToolRelationUpdateSchema = AgentToolRelationInsertSchema.partial();
31232
31234
  var AgentToolRelationApiSelectSchema = createApiSchema(AgentToolRelationSelectSchema);
@@ -31260,6 +31262,7 @@ var StatusUpdateSchema = external_exports.object({
31260
31262
  });
31261
31263
  var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
31262
31264
  tools: external_exports.array(external_exports.string()),
31265
+ selectedTools: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())).optional(),
31263
31266
  dataComponents: external_exports.array(external_exports.string()).optional(),
31264
31267
  artifactComponents: external_exports.array(external_exports.string()).optional(),
31265
31268
  canTransferTo: external_exports.array(external_exports.string()).optional(),
@@ -31401,14 +31404,14 @@ init_esm_shims();
31401
31404
  init_esm_shims();
31402
31405
  import { createClient } from "@libsql/client";
31403
31406
  import { drizzle } from "drizzle-orm/libsql";
31404
- function createDatabaseClient(config3) {
31407
+ function createDatabaseClient(config2) {
31405
31408
  const client = createClient({
31406
- url: config3.url,
31407
- authToken: config3.authToken
31409
+ url: config2.url,
31410
+ authToken: config2.authToken
31408
31411
  });
31409
31412
  return drizzle(client, {
31410
31413
  schema: schema_exports,
31411
- logger: config3.logger
31414
+ logger: config2.logger
31412
31415
  });
31413
31416
  }
31414
31417
 
@@ -32246,18 +32249,18 @@ var ProxyTracer = (
32246
32249
  return this._getTracer().startSpan(name, options, context);
32247
32250
  };
32248
32251
  ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
32249
- var tracer3 = this._getTracer();
32250
- return Reflect.apply(tracer3.startActiveSpan, tracer3, arguments);
32252
+ var tracer2 = this._getTracer();
32253
+ return Reflect.apply(tracer2.startActiveSpan, tracer2, arguments);
32251
32254
  };
32252
32255
  ProxyTracer2.prototype._getTracer = function() {
32253
32256
  if (this._delegate) {
32254
32257
  return this._delegate;
32255
32258
  }
32256
- var tracer3 = this._provider.getDelegateTracer(this.name, this.version, this.options);
32257
- if (!tracer3) {
32259
+ var tracer2 = this._provider.getDelegateTracer(this.name, this.version, this.options);
32260
+ if (!tracer2) {
32258
32261
  return NOOP_TRACER;
32259
32262
  }
32260
- this._delegate = tracer3;
32263
+ this._delegate = tracer2;
32261
32264
  return this._delegate;
32262
32265
  };
32263
32266
  return ProxyTracer2;
@@ -33025,8 +33028,8 @@ function getErrorMap2() {
33025
33028
  // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
33026
33029
  init_esm_shims();
33027
33030
  var makeIssue = (params) => {
33028
- const { data, path: path4, errorMaps, issueData } = params;
33029
- const fullPath = [...path4, ...issueData.path || []];
33031
+ const { data, path: path3, errorMaps, issueData } = params;
33032
+ const fullPath = [...path3, ...issueData.path || []];
33030
33033
  const fullIssue = {
33031
33034
  ...issueData,
33032
33035
  path: fullPath
@@ -33146,11 +33149,11 @@ var errorUtil;
33146
33149
 
33147
33150
  // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
33148
33151
  var ParseInputLazyPath = class {
33149
- constructor(parent, value, path4, key) {
33152
+ constructor(parent, value, path3, key) {
33150
33153
  this._cachedPath = [];
33151
33154
  this.parent = parent;
33152
33155
  this.data = value;
33153
- this._path = path4;
33156
+ this._path = path3;
33154
33157
  this._key = key;
33155
33158
  }
33156
33159
  get path() {
@@ -37910,57 +37913,9 @@ var k = u(p2(function(t2) {
37910
37913
  return null != t2;
37911
37914
  }));
37912
37915
 
37913
- // ../packages/agents-core/src/utils/tracer.ts
37914
- init_esm_shims();
37915
-
37916
- // ../packages/agents-core/src/env.ts
37916
+ // ../packages/agents-core/src/utils/tracer-factory.ts
37917
37917
  init_esm_shims();
37918
- import fs2 from "fs";
37919
- import path3 from "path";
37920
- import * as dotenv2 from "dotenv";
37921
- dotenv2.config({ quiet: true });
37922
- var environmentSchema = external_exports.enum(["development", "pentest", "production", "test"]);
37923
- var criticalEnv = external_exports.object({
37924
- ENVIRONMENT: environmentSchema
37925
- }).parse(process.env);
37926
- var loadEnvFile = () => {
37927
- const envPath = path3.resolve(process.cwd(), `.env.${criticalEnv.ENVIRONMENT}.nonsecret`);
37928
- if (fs2.existsSync(envPath)) {
37929
- const envConfig = dotenv2.parse(fs2.readFileSync(envPath));
37930
- for (const k2 in envConfig) {
37931
- if (!(k2 in process.env)) {
37932
- process.env[k2] = envConfig[k2];
37933
- }
37934
- }
37935
- }
37936
- };
37937
- loadEnvFile();
37938
- var envSchema = external_exports.object({
37939
- ENVIRONMENT: external_exports.enum(["development", "production", "pentest", "test"]).optional(),
37940
- DB_FILE_NAME: external_exports.string().default("file:../../local.db"),
37941
- OTEL_TRACES_FORCE_FLUSH_ENABLED: external_exports.stringbool().optional()
37942
- });
37943
- var parseEnv = () => {
37944
- try {
37945
- const parsedEnv = envSchema.parse(process.env);
37946
- return parsedEnv;
37947
- } catch (error43) {
37948
- if (error43 instanceof external_exports.ZodError) {
37949
- const missingVars = error43.issues.map((issue2) => issue2.path.join("."));
37950
- throw new Error(
37951
- `\u274C Invalid environment variables: ${missingVars.join(", ")}
37952
- ${error43.message}`
37953
- );
37954
- }
37955
- throw error43;
37956
- }
37957
- };
37958
- var env = parseEnv();
37959
-
37960
- // ../packages/agents-core/src/utils/tracer.ts
37961
37918
  var logger4 = getLogger("tracer");
37962
- var SERVICE_NAME = "inkeep-chat";
37963
- var SERVICE_VERSION = "1.0.0";
37964
37919
  var createNoOpSpan = () => ({
37965
37920
  setAttributes: () => ({}),
37966
37921
  recordException: () => ({}),
@@ -37989,29 +37944,124 @@ var noopTracer = {
37989
37944
  return createNoOpSpan();
37990
37945
  }
37991
37946
  };
37992
- var globalTracerInstance = null;
37993
- function getGlobalTracer() {
37994
- if (!globalTracerInstance) {
37995
- try {
37996
- globalTracerInstance = trace.getTracer(SERVICE_NAME, SERVICE_VERSION);
37997
- } catch (error43) {
37998
- logger4.debug(
37999
- { error: error43 instanceof Error ? error43.message : "Unknown error" },
38000
- "OpenTelemetry tracer not available, using no-op tracer"
38001
- );
38002
- globalTracerInstance = noopTracer;
38003
- }
37947
+ function getTracer(serviceName, serviceVersion) {
37948
+ try {
37949
+ return trace.getTracer(serviceName, serviceVersion);
37950
+ } catch (_error) {
37951
+ logger4.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
37952
+ return noopTracer;
38004
37953
  }
38005
- return globalTracerInstance;
38006
37954
  }
38007
37955
 
37956
+ // ../packages/agents-core/src/utils/tracer.ts
37957
+ init_esm_shims();
37958
+
37959
+ // ../packages/agents-core/package.json
37960
+ var package_default = {
37961
+ name: "@inkeep/agents-core",
37962
+ version: "0.1.4",
37963
+ description: "Core database schema, types, and validation schemas for Inkeep Agent Framework",
37964
+ type: "module",
37965
+ license: "SEE LICENSE IN LICENSE.md",
37966
+ main: "./src/index.ts",
37967
+ exports: {
37968
+ ".": "./src/index.ts",
37969
+ "./schema": "./src/db/schema.ts",
37970
+ "./types": "./src/types/index.ts",
37971
+ "./validation": "./src/validation/index.ts",
37972
+ "./client-exports": "./src/client-exports.ts"
37973
+ },
37974
+ scripts: {
37975
+ build: "tsup",
37976
+ prepare: "pnpm build",
37977
+ test: "vitest --run",
37978
+ "test:unit": "vitest --run src/__tests__ --exclude src/__tests__/integration/**",
37979
+ "test:integration": "vitest --run src/__tests__/integration/",
37980
+ "test:coverage": "vitest --run --coverage",
37981
+ "test:watch": "vitest --watch",
37982
+ lint: "biome lint src",
37983
+ "lint:fix": "biome check --write src",
37984
+ format: "biome format --write src",
37985
+ "format:check": "biome format src",
37986
+ typecheck: "tsc --noEmit",
37987
+ "db:generate": "drizzle-kit generate",
37988
+ "db:push": "drizzle-kit push",
37989
+ "db:migrate": "drizzle-kit migrate",
37990
+ "db:clean": "tsx src/db/clean.ts",
37991
+ "db:studio": "drizzle-kit studio",
37992
+ "db:check": "drizzle-kit check",
37993
+ "db:reset-schema": "rm -rf drizzle/* && echo 'All migration files removed, generating new schema' && drizzle-kit generate",
37994
+ prepack: "clean-package",
37995
+ postpack: "clean-package restore"
37996
+ },
37997
+ "clean-package": "./clean-package.config.json",
37998
+ dependencies: {
37999
+ "@hono/node-server": "^1.14.3",
38000
+ "@hono/zod-openapi": "^1.0.2",
38001
+ "@libsql/client": "^0.15.7",
38002
+ "@modelcontextprotocol/sdk": "^1.17.2",
38003
+ "@nangohq/node": "^0.66.0",
38004
+ "@nangohq/types": "^0.66.0",
38005
+ "@opentelemetry/api": "^1.9.0",
38006
+ "@opentelemetry/auto-instrumentations-node": "^0.62.0",
38007
+ "@opentelemetry/baggage-span-processor": "^0.4.0",
38008
+ "@opentelemetry/exporter-jaeger": "^2.0.1",
38009
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0",
38010
+ "@opentelemetry/sdk-metrics": "^2.0.1",
38011
+ "@opentelemetry/sdk-node": "^0.203.0",
38012
+ "@opentelemetry/sdk-trace-node": "^2.0.1",
38013
+ "@opentelemetry/semantic-conventions": "^1.34.0",
38014
+ ai: "5.0.11",
38015
+ ajv: "^8.17.1",
38016
+ "ajv-formats": "^3.0.1",
38017
+ dotenv: "^17.2.1",
38018
+ "drizzle-orm": "^0.44.4",
38019
+ "drizzle-zod": "^0.8.2",
38020
+ "exit-hook": "^4.0.0",
38021
+ hono: "^4.8.10",
38022
+ jmespath: "^0.16.0",
38023
+ keytar: "^7.9.0",
38024
+ nanoid: "^5.0.9",
38025
+ "ts-pattern": "^5.7.1",
38026
+ zod: "^4.1.5"
38027
+ },
38028
+ devDependencies: {
38029
+ "@types/jmespath": "^0.15.2",
38030
+ "@types/node": "^20.11.24",
38031
+ "@vitest/coverage-v8": "^2.0.0",
38032
+ "clean-package": "^2.2.0",
38033
+ "drizzle-kit": "^0.31.4",
38034
+ typescript: "^5.9.2",
38035
+ vitest: "^3.1.4"
38036
+ },
38037
+ engines: {
38038
+ node: ">=22.0.0"
38039
+ },
38040
+ publishConfig: {
38041
+ access: "restricted",
38042
+ registry: "https://registry.npmjs.org/"
38043
+ },
38044
+ files: [
38045
+ "dist",
38046
+ "README.md",
38047
+ "LICENSE.md"
38048
+ ],
38049
+ repository: {
38050
+ type: "git",
38051
+ url: "git+https://github.com/inkeep/agents.git",
38052
+ directory: "packages/agents-core"
38053
+ }
38054
+ };
38055
+
38056
+ // ../packages/agents-core/src/utils/tracer.ts
38057
+ var tracer = getTracer("agents-core", package_default.version);
38058
+
38008
38059
  // ../packages/agents-core/src/context/contextCache.ts
38009
38060
  init_esm_shims();
38010
38061
  var logger5 = getLogger("context-cache");
38011
38062
 
38012
38063
  // ../packages/agents-core/src/context/ContextResolver.ts
38013
38064
  var logger6 = getLogger("context-resolver");
38014
- var tracer = getGlobalTracer();
38015
38065
 
38016
38066
  // ../packages/agents-core/src/middleware/contextValidation.ts
38017
38067
  var logger7 = getLogger("context-validation");
@@ -38023,7 +38073,6 @@ var logger8 = getLogger("context-fetcher");
38023
38073
  // ../packages/agents-core/src/context/context.ts
38024
38074
  init_esm_shims();
38025
38075
  var logger9 = getLogger("context");
38026
- var tracer2 = getGlobalTracer();
38027
38076
 
38028
38077
  // ../packages/agents-core/src/credential-stores/index.ts
38029
38078
  init_esm_shims();
@@ -38138,9 +38187,9 @@ async function pushCommand(graphPath, options) {
38138
38187
  const graphKey = graphExports[0];
38139
38188
  const graph = module[graphKey];
38140
38189
  spinner2.text = "Loading configuration...";
38141
- let config3;
38190
+ let config2;
38142
38191
  try {
38143
- config3 = await validateConfiguration(
38192
+ config2 = await validateConfiguration(
38144
38193
  options.tenantId,
38145
38194
  options.agentsManageApiUrl,
38146
38195
  void 0,
@@ -38154,12 +38203,12 @@ async function pushCommand(graphPath, options) {
38154
38203
  }
38155
38204
  spinner2.succeed("Configuration loaded");
38156
38205
  console.log(chalk6.gray("Configuration sources:"));
38157
- console.log(chalk6.gray(` \u2022 Tenant ID: ${config3.sources.tenantId}`));
38158
- console.log(chalk6.gray(` \u2022 Project ID: ${config3.sources.projectId}`));
38159
- console.log(chalk6.gray(` \u2022 API URL: ${config3.sources.agentsManageApiUrl}`));
38160
- const tenantId = config3.tenantId;
38161
- const projectId = config3.projectId;
38162
- const agentsManageApiUrl = config3.agentsManageApiUrl;
38206
+ console.log(chalk6.gray(` \u2022 Tenant ID: ${config2.sources.tenantId}`));
38207
+ console.log(chalk6.gray(` \u2022 Project ID: ${config2.sources.projectId}`));
38208
+ console.log(chalk6.gray(` \u2022 API URL: ${config2.sources.agentsManageApiUrl}`));
38209
+ const tenantId = config2.tenantId;
38210
+ const projectId = config2.projectId;
38211
+ const agentsManageApiUrl = config2.agentsManageApiUrl;
38163
38212
  spinner2.text = "Validating project...";
38164
38213
  let dbUrl = process.env.DB_FILE_NAME || "local.db";
38165
38214
  if (dbUrl !== ":memory:" && !dbUrl.startsWith("file:") && !dbUrl.startsWith("libsql:") && !dbUrl.startsWith("http")) {
@@ -38214,7 +38263,7 @@ async function pushCommand(graphPath, options) {
38214
38263
  default: ""
38215
38264
  }
38216
38265
  ]);
38217
- let models = config3.modelSettings;
38266
+ let models = config2.modelSettings;
38218
38267
  if (!models || !models.base) {
38219
38268
  spinner2.stop();
38220
38269
  console.log(chalk6.cyan("\nNow let's configure the AI models for this project."));
@@ -38244,9 +38293,9 @@ async function pushCommand(graphPath, options) {
38244
38293
  spinner2.succeed(`Project "${existingProject.name || projectId}" validated`);
38245
38294
  }
38246
38295
  await ManagementApiClient.create(
38247
- config3.agentsManageApiUrl,
38296
+ config2.agentsManageApiUrl,
38248
38297
  options.configFilePath,
38249
- config3.tenantId
38298
+ config2.tenantId
38250
38299
  );
38251
38300
  if (typeof graph.setConfig === "function") {
38252
38301
  graph.setConfig(tenantId, projectId, agentsManageApiUrl);
@@ -38303,7 +38352,7 @@ async function pushCommand(graphPath, options) {
38303
38352
  console.log(chalk6.gray(` \u2022 Relations: ${stats.relationCount}`));
38304
38353
  console.log(chalk6.green("\n\u2728 Next steps:"));
38305
38354
  try {
38306
- const viewGraphUrl = buildGraphViewUrl(config3.manageUiUrl, tenantId, projectId, graphId);
38355
+ const viewGraphUrl = buildGraphViewUrl(config2.manageUiUrl, tenantId, projectId, graphId);
38307
38356
  console.log(chalk6.gray(` \u2022 View graph in UI: ${chalk6.cyan(viewGraphUrl)}`));
38308
38357
  } catch (error43) {
38309
38358
  console.debug("Could not generate UI link:", error43);
@@ -38332,8 +38381,8 @@ program.name("inkeep").description("CLI tool for Inkeep Agent Framework").versio
38332
38381
  program.command("create [directory]").description("Create a new Inkeep Agent Framework Starter Directory").option("--tenant-id <tenant-id>", "Tenant ID").option("--project-id <project-id>", "Project ID").option("--openai-key <openai-key>", "OpenAI API key").option("--anthropic-key <anthropic-key>", "Anthropic API key").option("--manage-api-port <port>", "Management API port", "3002").option("--run-api-port <port>", "Run API port", "3003").action(async (directory, options) => {
38333
38382
  await createCommand(directory, options);
38334
38383
  });
38335
- program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").action(async (path4, options) => {
38336
- await initCommand({ path: path4, ...options });
38384
+ program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").action(async (path3, options) => {
38385
+ await initCommand({ path: path3, ...options });
38337
38386
  });
38338
38387
  var configCommand = program.command("config").description("Manage Inkeep configuration");
38339
38388
  configCommand.command("get [key]").description("Get configuration value(s)").option("--config-file-path <path>", "Path to configuration file").action(async (key, options) => {