@ivotoby/postgram-cli 1.32.0 → 1.33.0

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/pgm.js +7 -4
  2. package/package.json +1 -1
package/dist/pgm.js CHANGED
@@ -345,7 +345,7 @@ memoryCommand
345
345
  .description('Preview or archive stale session-context memories for the authenticated client')
346
346
  .option('--dry-run', 'preview without mutating')
347
347
  .option('--older-than <duration>', 'only include memories older than this (e.g. 15m, 2h, 7d)', '7d')
348
- .option('--limit <limit>', 'maximum candidates', '50')
348
+ .option('--limit <limit>', 'maximum candidates')
349
349
  .option('--topic <topic>', 'filter by topic')
350
350
  .option('--session-id <sessionId>', 'filter by session id')
351
351
  .option('--tag <tag>', 'filter by tag (repeatable)', (value, previous = []) => {
@@ -355,9 +355,12 @@ memoryCommand
355
355
  .option('--yes', 'confirm archive mutation')
356
356
  .action(async (options, command) => {
357
357
  await runWithClient(command, async (client, json) => {
358
- const limit = Number.parseInt(options.limit, 10);
359
- if (!Number.isInteger(limit) || limit <= 0) {
360
- throw new AppError(ErrorCode.VALIDATION, '--limit must be a positive integer');
358
+ let limit;
359
+ if (options.limit !== undefined) {
360
+ limit = Number.parseInt(options.limit, 10);
361
+ if (!Number.isInteger(limit) || limit <= 0) {
362
+ throw new AppError(ErrorCode.VALIDATION, '--limit must be a positive integer');
363
+ }
361
364
  }
362
365
  if (options.dryRun !== true && options.yes !== true) {
363
366
  throw new AppError(ErrorCode.VALIDATION, '--yes is required outside dry-run');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivotoby/postgram-cli",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
4
4
  "description": "Postgram CLI — store, search, and manage entities from the command line",
5
5
  "type": "module",
6
6
  "bin": {