@inkeep/agents-cli 0.0.0-dev-20251124234228 → 0.0.0-dev-20251125022835

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 +100 -105
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1572,7 +1572,7 @@ var init_dist4 = __esm({
1572
1572
  });
1573
1573
 
1574
1574
  // ../packages/agents-core/src/auth/auth-schema.ts
1575
- import { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core";
1575
+ import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
1576
1576
  var user, session, account, verification, ssoProvider, organization, member, invitation;
1577
1577
  var init_auth_schema = __esm({
1578
1578
  "../packages/agents-core/src/auth/auth-schema.ts"() {
@@ -251932,15 +251932,14 @@ function normalizeConfig(config) {
251932
251932
  manageUiUrl: config.manageUiUrl,
251933
251933
  outputDirectory: config.outputDirectory
251934
251934
  };
251935
- } else {
251936
- return {
251937
- tenantId: config.tenantId,
251938
- agentsManageApiUrl: config.agentsManageApiUrl,
251939
- agentsRunApiUrl: config.agentsRunApiUrl,
251940
- manageUiUrl: config.manageUiUrl,
251941
- outputDirectory: config.outputDirectory
251942
- };
251943
251935
  }
251936
+ return {
251937
+ tenantId: config.tenantId,
251938
+ agentsManageApiUrl: config.agentsManageApiUrl,
251939
+ agentsRunApiUrl: config.agentsRunApiUrl,
251940
+ manageUiUrl: config.manageUiUrl,
251941
+ outputDirectory: config.outputDirectory
251942
+ };
251944
251943
  }
251945
251944
  function findConfigFile(startPath = process.cwd()) {
251946
251945
  let currentPath = resolve3(startPath);
@@ -252021,11 +252020,10 @@ async function validateConfiguration(configPath) {
252021
252020
  `Tenant ID is missing from configuration file: ${actualConfigFile}
252022
252021
  Please ensure your config file exports a valid configuration with tenantId.`
252023
252022
  );
252024
- } else {
252025
- throw new Error(
252026
- 'No configuration found. Please:\n 1. Create "inkeep.config.ts" by running "inkeep init"\n 2. Or provide --config to specify a config file path'
252027
- );
252028
252023
  }
252024
+ throw new Error(
252025
+ 'No configuration found. Please:\n 1. Create "inkeep.config.ts" by running "inkeep init"\n 2. Or provide --config to specify a config file path'
252026
+ );
252029
252027
  }
252030
252028
  if (!config.agentsManageApiUrl) {
252031
252029
  throw new Error(
@@ -252594,11 +252592,11 @@ function formatPromptWithContext(str2, contextVarName, headersVarName, contextCo
252594
252592
  const convertedStr = str2.replace(/\{\{([^}]+)\}\}/g, (match2, variablePath) => {
252595
252593
  if (isContextVariable(variablePath, contextConfigData)) {
252596
252594
  return `\${${contextVarName}.toTemplate("${variablePath}")}`;
252597
- } else if (isHeadersVariable(variablePath, contextConfigData)) {
252595
+ }
252596
+ if (isHeadersVariable(variablePath, contextConfigData)) {
252598
252597
  return `\${${headersVarName}.toTemplate("${variablePath}")}`;
252599
- } else {
252600
- return `\${${contextVarName}.toTemplate("${variablePath}")}`;
252601
252598
  }
252599
+ return `\${${contextVarName}.toTemplate("${variablePath}")}`;
252602
252600
  });
252603
252601
  return `\`${convertedStr.replace(/`/g, "\\`")}\``;
252604
252602
  }
@@ -252642,9 +252640,8 @@ function generateImport(imports, from, style) {
252642
252640
  const semi = semicolons ? ";" : "";
252643
252641
  if (imports.length === 1) {
252644
252642
  return `import { ${imports[0]} } from ${q3}${from}${q3}${semi}`;
252645
- } else {
252646
- return `import { ${imports.join(", ")} } from ${q3}${from}${q3}${semi}`;
252647
252643
  }
252644
+ return `import { ${imports.join(", ")} } from ${q3}${from}${q3}${semi}`;
252648
252645
  }
252649
252646
  function shouldInclude(value) {
252650
252647
  if (value === null || value === void 0) return false;
@@ -252699,7 +252696,8 @@ function formatStatusUpdates(statusUpdatesConfig, style, indentLevel, registry2,
252699
252696
  const statusComponentIds = statusUpdatesConfig.statusComponents.map((comp) => {
252700
252697
  if (typeof comp === "string") {
252701
252698
  return comp;
252702
- } else if (typeof comp === "object" && comp) {
252699
+ }
252700
+ if (typeof comp === "object" && comp) {
252703
252701
  return comp.id || comp.type || comp.name;
252704
252702
  }
252705
252703
  return null;
@@ -253148,19 +253146,17 @@ function processFetchConfigTemplates(fetchConfig, headersVarName) {
253148
253146
  `\${${headersVarName}.toTemplate("$1")}`
253149
253147
  );
253150
253148
  return `\`${convertedStr.replace(/`/g, "\\`")}\``;
253151
- } else {
253152
- const isMultiline = value.includes("\n") || value.length > 80;
253153
- if (isMultiline) {
253154
- return `\`${value.replace(/`/g, "\\`")}\``;
253155
- } else {
253156
- return `'${value.replace(/'/g, "\\'")}'`;
253157
- }
253158
253149
  }
253159
- } else if (typeof value === "object" && value !== null) {
253150
+ const isMultiline = value.includes("\n") || value.length > 80;
253151
+ if (isMultiline) {
253152
+ return `\`${value.replace(/`/g, "\\`")}\``;
253153
+ }
253154
+ return `'${value.replace(/'/g, "\\'")}'`;
253155
+ }
253156
+ if (typeof value === "object" && value !== null) {
253160
253157
  return processObject(value);
253161
- } else {
253162
- return JSON.stringify(value);
253163
253158
  }
253159
+ return JSON.stringify(value);
253164
253160
  };
253165
253161
  const processObject = (obj) => {
253166
253162
  if (Array.isArray(obj)) {
@@ -254909,7 +254905,7 @@ function createTargetedTypeScriptPlaceholders(content, debug = false) {
254909
254905
  const propertyAssignment = node;
254910
254906
  const propertyEnd = propertyAssignment.getEnd();
254911
254907
  if (propertyName === "inputSchema" || propertyName === "render") {
254912
- let searchStart = start2;
254908
+ const searchStart = start2;
254913
254909
  let braceCount = 0;
254914
254910
  let correctEnd = -1;
254915
254911
  let inString = false;
@@ -255591,7 +255587,8 @@ var init_component_registry = __esm({
255591
255587
  extractIdFromReference(ref) {
255592
255588
  if (typeof ref === "string") {
255593
255589
  return ref;
255594
- } else if (typeof ref === "object" && ref) {
255590
+ }
255591
+ if (typeof ref === "object" && ref) {
255595
255592
  if (ref.toolId) return ref.toolId;
255596
255593
  if (ref.agentId) return ref.agentId;
255597
255594
  if (ref.externalAgentId) return ref.externalAgentId;
@@ -255713,9 +255710,8 @@ var init_component_registry = __esm({
255713
255710
  relativePath += remainingPath;
255714
255711
  if (relativePath.startsWith("../")) {
255715
255712
  return relativePath;
255716
- } else {
255717
- return "./" + relativePath;
255718
255713
  }
255714
+ return "./" + relativePath;
255719
255715
  }
255720
255716
  /**
255721
255717
  * Get all components for debugging
@@ -255780,8 +255776,8 @@ import {
255780
255776
  writeFileSync as writeFileSync3
255781
255777
  } from "fs";
255782
255778
  import { basename as basename2, dirname as dirname6, extname as extname2, join as join9 } from "path";
255783
- import chalk11 from "chalk";
255784
255779
  import { generateText as generateText2 } from "ai";
255780
+ import chalk11 from "chalk";
255785
255781
  function copyProjectToTemp(projectRoot, tempDirName) {
255786
255782
  const tempDir = join9(projectRoot, tempDirName);
255787
255783
  function copyRecursively(sourceDir, targetDir) {
@@ -256623,8 +256619,8 @@ var init_component_updater = __esm({
256623
256619
  init_status_component_generator();
256624
256620
  init_sub_agent_generator();
256625
256621
  init_llm_content_merger();
256626
- init_model_provider_detector();
256627
256622
  init_component_registry();
256623
+ init_model_provider_detector();
256628
256624
  }
256629
256625
  });
256630
256626
 
@@ -257174,15 +257170,17 @@ function generateSubAgentChangeSummary(fieldChanges) {
257174
257170
  const fieldNames = fieldChanges.map((c2) => c2.field.split(".")[0]).filter((value, index2, self2) => self2.indexOf(value) === index2);
257175
257171
  if (changeTypes.has("modified") && fieldNames.length === 1) {
257176
257172
  return `Modified ${fieldNames[0]}`;
257177
- } else if (changeTypes.has("added") && changeTypes.has("deleted")) {
257173
+ }
257174
+ if (changeTypes.has("added") && changeTypes.has("deleted")) {
257178
257175
  return `Updated configuration (${fieldChanges.length} changes)`;
257179
- } else if (changeTypes.has("added")) {
257176
+ }
257177
+ if (changeTypes.has("added")) {
257180
257178
  return `Added ${fieldNames.join(", ")}`;
257181
- } else if (changeTypes.has("deleted")) {
257179
+ }
257180
+ if (changeTypes.has("deleted")) {
257182
257181
  return `Removed ${fieldNames.join(", ")}`;
257183
- } else {
257184
- return `Modified ${fieldNames.join(", ")}`;
257185
257182
  }
257183
+ return `Modified ${fieldNames.join(", ")}`;
257186
257184
  }
257187
257185
  function compareTools(localTools, remoteTools, debug) {
257188
257186
  return compareComponentMaps("tools", localTools, remoteTools, debug);
@@ -257617,11 +257615,11 @@ function formatValue(value) {
257617
257615
  const val = value[key];
257618
257616
  if (typeof val === "string") {
257619
257617
  return `${key}: "${val.length > 15 ? val.substring(0, 12) + "..." : val}"`;
257620
- } else if (typeof val === "object" && val !== null) {
257618
+ }
257619
+ if (typeof val === "object" && val !== null) {
257621
257620
  return `${key}: {...}`;
257622
- } else {
257623
- return `${key}: ${val}`;
257624
257621
  }
257622
+ return `${key}: ${val}`;
257625
257623
  });
257626
257624
  return `{${pairs.join(", ")}}`;
257627
257625
  }
@@ -258668,9 +258666,8 @@ function getObjectPreview(obj) {
258668
258666
  try {
258669
258667
  if (typeof obj === "object") {
258670
258668
  return JSON.stringify(obj, null, 2);
258671
- } else {
258672
- return String(obj);
258673
258669
  }
258670
+ return String(obj);
258674
258671
  } catch (error) {
258675
258672
  return `[Error stringifying: ${typeof obj}]`;
258676
258673
  }
@@ -258849,56 +258846,55 @@ async function validateProjectEquivalence(tempDir, remoteProject) {
258849
258846
  const hasChanges = comparison.hasChanges;
258850
258847
  if (!hasChanges) {
258851
258848
  return true;
258852
- } else {
258853
- console.log(chalk15.yellow(` \u{1F504} Found differences:`));
258854
- for (const [componentType, changes] of Object.entries(comparison.componentChanges)) {
258855
- const totalChanges = changes.added.length + changes.modified.length + changes.deleted.length;
258856
- if (totalChanges > 0) {
258857
- console.log(chalk15.cyan(` ${componentType}: ${totalChanges} changes`));
258858
- if (changes.added.length > 0) {
258859
- console.log(chalk15.green(` \u2795 Added: ${changes.added.join(", ")}`));
258860
- }
258861
- if (changes.modified.length > 0) {
258862
- console.log(chalk15.yellow(` \u{1F4DD} Modified: ${changes.modified.join(", ")}`));
258863
- for (const modifiedId of changes.modified) {
258864
- console.log(chalk15.gray(` ${modifiedId} detailed differences:`));
258865
- const generatedComponent = getComponentFromProject(
258866
- tempProjectDefinition,
258867
- componentType,
258868
- modifiedId
258869
- );
258870
- const remoteComponent = getComponentFromProject(
258871
- remoteProject,
258872
- componentType,
258849
+ }
258850
+ console.log(chalk15.yellow(` \u{1F504} Found differences:`));
258851
+ for (const [componentType, changes] of Object.entries(comparison.componentChanges)) {
258852
+ const totalChanges = changes.added.length + changes.modified.length + changes.deleted.length;
258853
+ if (totalChanges > 0) {
258854
+ console.log(chalk15.cyan(` ${componentType}: ${totalChanges} changes`));
258855
+ if (changes.added.length > 0) {
258856
+ console.log(chalk15.green(` \u2795 Added: ${changes.added.join(", ")}`));
258857
+ }
258858
+ if (changes.modified.length > 0) {
258859
+ console.log(chalk15.yellow(` \u{1F4DD} Modified: ${changes.modified.join(", ")}`));
258860
+ for (const modifiedId of changes.modified) {
258861
+ console.log(chalk15.gray(` ${modifiedId} detailed differences:`));
258862
+ const generatedComponent = getComponentFromProject(
258863
+ tempProjectDefinition,
258864
+ componentType,
258865
+ modifiedId
258866
+ );
258867
+ const remoteComponent = getComponentFromProject(
258868
+ remoteProject,
258869
+ componentType,
258870
+ modifiedId
258871
+ );
258872
+ if (generatedComponent && remoteComponent) {
258873
+ const differences = findKeyDifferences(
258874
+ generatedComponent,
258875
+ remoteComponent,
258873
258876
  modifiedId
258874
258877
  );
258875
- if (generatedComponent && remoteComponent) {
258876
- const differences = findKeyDifferences(
258877
- generatedComponent,
258878
- remoteComponent,
258879
- modifiedId
258880
- );
258881
- if (differences.length > 0) {
258882
- differences.forEach((diff) => {
258883
- console.log(chalk15.gray(` ${diff}`));
258884
- });
258885
- } else {
258886
- console.log(chalk15.gray(` No key-level differences detected`));
258887
- }
258888
- } else if (!generatedComponent) {
258889
- console.log(chalk15.red(` Component missing in generated project`));
258890
- } else if (!remoteComponent) {
258891
- console.log(chalk15.red(` Component missing in remote project`));
258878
+ if (differences.length > 0) {
258879
+ differences.forEach((diff) => {
258880
+ console.log(chalk15.gray(` ${diff}`));
258881
+ });
258882
+ } else {
258883
+ console.log(chalk15.gray(` No key-level differences detected`));
258892
258884
  }
258885
+ } else if (!generatedComponent) {
258886
+ console.log(chalk15.red(` Component missing in generated project`));
258887
+ } else if (!remoteComponent) {
258888
+ console.log(chalk15.red(` Component missing in remote project`));
258893
258889
  }
258894
258890
  }
258895
- if (changes.deleted.length > 0) {
258896
- console.log(chalk15.red(` \u2796 Deleted: ${changes.deleted.join(", ")}`));
258897
- }
258891
+ }
258892
+ if (changes.deleted.length > 0) {
258893
+ console.log(chalk15.red(` \u2796 Deleted: ${changes.deleted.join(", ")}`));
258898
258894
  }
258899
258895
  }
258900
- return false;
258901
258896
  }
258897
+ return false;
258902
258898
  } catch (error) {
258903
258899
  const errorMsg = error instanceof Error ? error.message : String(error);
258904
258900
  console.log(chalk15.red(` \u274C Project validation failed: ${errorMsg}`));
@@ -258974,27 +258970,26 @@ async function validateTempDirectory(originalProjectRoot, tempDirName, remotePro
258974
258970
  process.stdin.once("data", onKeypress);
258975
258971
  process.stdout.write(chalk15.cyan("\nPress [Y] for Yes or [N] for No: "));
258976
258972
  });
258977
- } else {
258978
- console.log(chalk15.yellow(` \u26A0\uFE0F Generated project differs from remote project`));
258979
- console.log(chalk15.gray(` \u{1F4A1} This might be expected if there are structural changes`));
258980
- console.log(chalk15.gray(` \u{1F4C2} Generated files available in: ${tempDirName} for manual review`));
258981
- if (compilationSuccess) {
258982
- console.log(chalk15.yellow(`
258973
+ }
258974
+ console.log(chalk15.yellow(` \u26A0\uFE0F Generated project differs from remote project`));
258975
+ console.log(chalk15.gray(` \u{1F4A1} This might be expected if there are structural changes`));
258976
+ console.log(chalk15.gray(` \u{1F4C2} Generated files available in: ${tempDirName} for manual review`));
258977
+ if (compilationSuccess) {
258978
+ console.log(chalk15.yellow(`
258983
258979
  \u2705 Compilation successful, but project structure differs.`));
258984
- console.log(
258985
- chalk15.cyan(`
258980
+ console.log(
258981
+ chalk15.cyan(`
258986
258982
  \u2705 Pull completed - please review generated files in temp directory.`)
258987
- );
258988
- process.exit(0);
258989
- } else {
258990
- console.log(chalk15.red(`
258983
+ );
258984
+ process.exit(0);
258985
+ } else {
258986
+ console.log(chalk15.red(`
258991
258987
  \u274C Validation failed - please check the generated files.`));
258992
- console.log(
258993
- chalk15.yellow(`
258988
+ console.log(
258989
+ chalk15.yellow(`
258994
258990
  \u26A0\uFE0F Pull completed with validation errors - temp directory preserved.`)
258995
- );
258996
- process.exit(1);
258997
- }
258991
+ );
258992
+ process.exit(1);
258998
258993
  }
258999
258994
  }
259000
258995
  function overwriteProjectFiles(originalProjectRoot, tempDirName, tempDir) {
@@ -259044,9 +259039,9 @@ var init_project_validator = __esm({
259044
259039
  "src/commands/pull-v3/project-validator.ts"() {
259045
259040
  "use strict";
259046
259041
  init_esm_shims();
259042
+ init_component_parser();
259047
259043
  init_pull_v3();
259048
259044
  init_project_comparator();
259049
- init_component_parser();
259050
259045
  isWaitingForInput = false;
259051
259046
  currentKeypressHandler = null;
259052
259047
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20251124234228",
3
+ "version": "0.0.0-dev-20251125022835",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -50,8 +50,8 @@
50
50
  "ts-morph": "^26.0.0",
51
51
  "tsx": "^4.20.5",
52
52
  "open": "^10.2.0",
53
- "@inkeep/agents-core": "^0.0.0-dev-20251124234228",
54
- "@inkeep/agents-sdk": "^0.0.0-dev-20251124234228"
53
+ "@inkeep/agents-core": "^0.0.0-dev-20251125022835",
54
+ "@inkeep/agents-sdk": "^0.0.0-dev-20251125022835"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/degit": "^2.8.6",
@@ -64,7 +64,7 @@
64
64
  "vitest": "^3.2.4"
65
65
  },
66
66
  "peerDependencies": {
67
- "@inkeep/agents-manage-ui": "0.0.0-dev-20251124234228",
67
+ "@inkeep/agents-manage-ui": "0.0.0-dev-20251125022835",
68
68
  "zod": "^4.1.11"
69
69
  },
70
70
  "engines": {