@inkeep/agents-cli 0.33.1 → 0.33.2

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 +34 -12
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -238,7 +238,8 @@ var init_defaults = __esm({
238
238
  // CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
239
239
  // to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
240
240
  // Messages exceeding this limit are truncated from the beginning of the conversation.
241
- CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4e3
241
+ // Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
242
+ CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
242
243
  };
243
244
  }
244
245
  });
@@ -1693,9 +1694,13 @@ var init_schema = __esm({
1693
1694
  ...agentScoped,
1694
1695
  ...uiProperties,
1695
1696
  prompt: text("prompt").notNull(),
1696
- conversationHistoryConfig: jsonb(
1697
- "conversation_history_config"
1698
- ).$type(),
1697
+ conversationHistoryConfig: jsonb("conversation_history_config").$type().notNull().default({
1698
+ mode: "full",
1699
+ limit: 50,
1700
+ maxOutputTokens: 4e3,
1701
+ includeInternal: false,
1702
+ messageTypes: ["chat", "tool-result"]
1703
+ }),
1699
1704
  models: jsonb("models").$type(),
1700
1705
  stopWhen: jsonb("stop_when").$type(),
1701
1706
  ...timestamps
@@ -226103,7 +226108,7 @@ var init_error = __esm({
226103
226108
  // description: "A URI reference that identifies the problem type.",
226104
226109
  // example: `${ERROR_DOCS_BASE_URL}#${code}`,
226105
226110
  // }),
226106
- status: z5.literal(errorCodeToHttpStatus[code]).openapi({
226111
+ status: z5.number().int().openapi({
226107
226112
  description: "The HTTP status code.",
226108
226113
  example: errorCodeToHttpStatus[code]
226109
226114
  }),
@@ -234174,6 +234179,7 @@ var init_dataComponents = __esm({
234174
234179
  "use strict";
234175
234180
  init_esm_shims();
234176
234181
  init_schema();
234182
+ init_utils();
234177
234183
  init_conversations();
234178
234184
  init_props_validation();
234179
234185
  init_render_validation();
@@ -234226,7 +234232,7 @@ var init_contextCache = __esm({
234226
234232
  });
234227
234233
 
234228
234234
  // ../packages/agents-core/src/data-access/conversations.ts
234229
- import { and as and17, count as count14, desc as desc14, eq as eq17 } from "drizzle-orm";
234235
+ import { and as and17, count as count14, desc as desc14, eq as eq17, inArray as inArray4 } from "drizzle-orm";
234230
234236
  var init_conversations2 = __esm({
234231
234237
  "../packages/agents-core/src/data-access/conversations.ts"() {
234232
234238
  "use strict";
@@ -234248,7 +234254,7 @@ var init_ledgerArtifacts = __esm({
234248
234254
  });
234249
234255
 
234250
234256
  // ../packages/agents-core/src/data-access/messages.ts
234251
- import { and as and19, asc as asc2, count as count16, desc as desc15, eq as eq19, inArray as inArray4 } from "drizzle-orm";
234257
+ import { and as and19, asc as asc2, count as count16, desc as desc15, eq as eq19, inArray as inArray5 } from "drizzle-orm";
234252
234258
  var init_messages = __esm({
234253
234259
  "../packages/agents-core/src/data-access/messages.ts"() {
234254
234260
  "use strict";
@@ -240489,15 +240495,26 @@ async function validateTempDirectory(originalProjectRoot, tempDirName, remotePro
240489
240495
  console.log(chalk11.green(` [Y] Yes - Replace files and clean up temp directory`));
240490
240496
  console.log(chalk11.red(` [N] No - Keep temp directory for manual review`));
240491
240497
  return new Promise((resolve6) => {
240498
+ if (isWaitingForInput && currentKeypressHandler) {
240499
+ process.stdin.removeListener("data", currentKeypressHandler);
240500
+ }
240492
240501
  process.stdin.removeAllListeners("data");
240493
- process.stdin.setMaxListeners(15);
240494
- process.stdin.setRawMode(true);
240495
- process.stdin.resume();
240502
+ if (!process.stdin.isRaw) {
240503
+ process.stdin.setRawMode(true);
240504
+ }
240505
+ if (process.stdin.isPaused()) {
240506
+ process.stdin.resume();
240507
+ }
240496
240508
  process.stdin.setEncoding("utf8");
240497
240509
  const onKeypress = (key) => {
240510
+ if (!isWaitingForInput) {
240511
+ return;
240512
+ }
240513
+ isWaitingForInput = false;
240514
+ currentKeypressHandler = null;
240515
+ process.stdin.removeAllListeners("data");
240498
240516
  process.stdin.setRawMode(false);
240499
240517
  process.stdin.pause();
240500
- process.stdin.removeAllListeners("data");
240501
240518
  const normalizedKey = key.toLowerCase();
240502
240519
  if (normalizedKey === "y") {
240503
240520
  console.log(chalk11.green(`
@@ -240527,7 +240544,9 @@ async function validateTempDirectory(originalProjectRoot, tempDirName, remotePro
240527
240544
  process.exit(0);
240528
240545
  }
240529
240546
  };
240530
- process.stdin.on("data", onKeypress);
240547
+ currentKeypressHandler = onKeypress;
240548
+ isWaitingForInput = true;
240549
+ process.stdin.once("data", onKeypress);
240531
240550
  process.stdout.write(chalk11.cyan("\nPress [Y] for Yes or [N] for No: "));
240532
240551
  });
240533
240552
  } else {
@@ -240595,6 +240614,7 @@ function overwriteProjectFiles(originalProjectRoot, tempDirName, tempDir) {
240595
240614
  console.log(chalk11.yellow(` Generated files remain in: ${tempDirName} for manual review`));
240596
240615
  }
240597
240616
  }
240617
+ var isWaitingForInput, currentKeypressHandler;
240598
240618
  var init_project_validator = __esm({
240599
240619
  "src/commands/pull-v3/project-validator.ts"() {
240600
240620
  "use strict";
@@ -240602,6 +240622,8 @@ var init_project_validator = __esm({
240602
240622
  init_pull_v3();
240603
240623
  init_project_comparator();
240604
240624
  init_component_registry();
240625
+ isWaitingForInput = false;
240626
+ currentKeypressHandler = null;
240605
240627
  }
240606
240628
  });
240607
240629
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.33.1",
3
+ "version": "0.33.2",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,8 +49,8 @@
49
49
  "ts-morph": "^26.0.0",
50
50
  "tsx": "^4.20.5",
51
51
  "open": "^10.2.0",
52
- "@inkeep/agents-core": "^0.33.1",
53
- "@inkeep/agents-sdk": "^0.33.1"
52
+ "@inkeep/agents-core": "^0.33.2",
53
+ "@inkeep/agents-sdk": "^0.33.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/degit": "^2.8.6",