@unbrained/pm-cli 2026.5.28 → 2026.5.30

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 (160) hide show
  1. package/CHANGELOG.md +127 -93
  2. package/dist/cli/bootstrap-args.d.ts +1 -1
  3. package/dist/cli/bootstrap-args.js +59 -9
  4. package/dist/cli/bootstrap-args.js.map +1 -1
  5. package/dist/cli/commander-usage.js +8 -8
  6. package/dist/cli/commander-usage.js.map +1 -1
  7. package/dist/cli/commands/activity.js +4 -4
  8. package/dist/cli/commands/activity.js.map +1 -1
  9. package/dist/cli/commands/aggregate.js +4 -3
  10. package/dist/cli/commands/aggregate.js.map +1 -1
  11. package/dist/cli/commands/calendar.d.ts +8 -0
  12. package/dist/cli/commands/calendar.js +15 -4
  13. package/dist/cli/commands/calendar.js.map +1 -1
  14. package/dist/cli/commands/close.js +4 -4
  15. package/dist/cli/commands/close.js.map +1 -1
  16. package/dist/cli/commands/completion.js +36 -4
  17. package/dist/cli/commands/completion.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +11 -1
  19. package/dist/cli/commands/config.js +68 -6
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/create.d.ts +1 -0
  22. package/dist/cli/commands/create.js +55 -6
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/deps.js +4 -4
  25. package/dist/cli/commands/deps.js.map +1 -1
  26. package/dist/cli/commands/extension/bundled-catalog.js +4 -3
  27. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  28. package/dist/cli/commands/extension/install-sources.d.ts +1 -0
  29. package/dist/cli/commands/extension/install-sources.js +20 -2
  30. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  31. package/dist/cli/commands/extension.js +26 -5
  32. package/dist/cli/commands/extension.js.map +1 -1
  33. package/dist/cli/commands/get.js +6 -3
  34. package/dist/cli/commands/get.js.map +1 -1
  35. package/dist/cli/commands/health.js +3 -11
  36. package/dist/cli/commands/health.js.map +1 -1
  37. package/dist/cli/commands/linked-test-parsers.js +5 -4
  38. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  39. package/dist/cli/commands/list.js +25 -6
  40. package/dist/cli/commands/list.js.map +1 -1
  41. package/dist/cli/commands/plan.js +5 -4
  42. package/dist/cli/commands/plan.js.map +1 -1
  43. package/dist/cli/commands/search.js +45 -2
  44. package/dist/cli/commands/search.js.map +1 -1
  45. package/dist/cli/commands/stats.js +4 -4
  46. package/dist/cli/commands/stats.js.map +1 -1
  47. package/dist/cli/commands/test-all.js +4 -4
  48. package/dist/cli/commands/test-all.js.map +1 -1
  49. package/dist/cli/commands/update-many.js +35 -6
  50. package/dist/cli/commands/update-many.js.map +1 -1
  51. package/dist/cli/commands/update.d.ts +2 -0
  52. package/dist/cli/commands/update.js +38 -6
  53. package/dist/cli/commands/update.js.map +1 -1
  54. package/dist/cli/help-json-payload.d.ts +1 -11
  55. package/dist/cli/help-json-payload.js +12 -12
  56. package/dist/cli/help-json-payload.js.map +1 -1
  57. package/dist/cli/main.d.ts +2 -0
  58. package/dist/cli/main.js +39 -11
  59. package/dist/cli/main.js.map +1 -1
  60. package/dist/cli/register-list-query.js +3 -3
  61. package/dist/cli/register-list-query.js.map +1 -1
  62. package/dist/cli/register-mutation.js +20 -8
  63. package/dist/cli/register-mutation.js.map +1 -1
  64. package/dist/cli/register-setup.js +4 -2
  65. package/dist/cli/register-setup.js.map +1 -1
  66. package/dist/cli/registration-helpers.d.ts +2 -6
  67. package/dist/cli/registration-helpers.js +9 -6
  68. package/dist/cli/registration-helpers.js.map +1 -1
  69. package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js +164 -0
  70. package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +7 -0
  71. package/dist/cli-bundle/chunks/chunk-RJONRNXN.js +682 -0
  72. package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +7 -0
  73. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +13864 -0
  74. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +7 -0
  75. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +24225 -0
  76. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +7 -0
  77. package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js +223 -0
  78. package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +7 -0
  79. package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js +702 -0
  80. package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +7 -0
  81. package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js +355 -0
  82. package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +7 -0
  83. package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js +237 -0
  84. package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +7 -0
  85. package/dist/cli-bundle/main.js +6896 -0
  86. package/dist/cli-bundle/main.js.map +7 -0
  87. package/dist/cli.js +1 -1
  88. package/dist/core/config/nested-settings.d.ts +88 -0
  89. package/dist/core/config/nested-settings.js +273 -0
  90. package/dist/core/config/nested-settings.js.map +1 -0
  91. package/dist/core/item/parse.d.ts +19 -0
  92. package/dist/core/item/parse.js +76 -2
  93. package/dist/core/item/parse.js.map +1 -1
  94. package/dist/core/item/priority.d.ts +2 -1
  95. package/dist/core/item/priority.js +12 -2
  96. package/dist/core/item/priority.js.map +1 -1
  97. package/dist/core/item/type-synonyms.d.ts +20 -0
  98. package/dist/core/item/type-synonyms.js +42 -0
  99. package/dist/core/item/type-synonyms.js.map +1 -0
  100. package/dist/core/search/cache.js +46 -4
  101. package/dist/core/search/cache.js.map +1 -1
  102. package/dist/core/search/providers.js +25 -5
  103. package/dist/core/search/providers.js.map +1 -1
  104. package/dist/core/search/semantic-defaults.js +73 -32
  105. package/dist/core/search/semantic-defaults.js.map +1 -1
  106. package/dist/core/search/staleness.d.ts +23 -0
  107. package/dist/core/search/staleness.js +34 -0
  108. package/dist/core/search/staleness.js.map +1 -0
  109. package/dist/core/search/vector-stores.js +12 -3
  110. package/dist/core/search/vector-stores.js.map +1 -1
  111. package/dist/core/sentry/helpers.d.ts +1 -1
  112. package/dist/core/sentry/helpers.js +4 -4
  113. package/dist/core/sentry/helpers.js.map +1 -1
  114. package/dist/core/shared/constants.js +3 -2
  115. package/dist/core/shared/constants.js.map +1 -1
  116. package/dist/core/shared/html-entity-decode.d.ts +22 -0
  117. package/dist/core/shared/html-entity-decode.js +127 -0
  118. package/dist/core/shared/html-entity-decode.js.map +1 -0
  119. package/dist/core/shared/split-comma-list.d.ts +20 -0
  120. package/dist/core/shared/split-comma-list.js +29 -0
  121. package/dist/core/shared/split-comma-list.js.map +1 -0
  122. package/dist/core/shared/time.js +52 -2
  123. package/dist/core/shared/time.js.map +1 -1
  124. package/dist/core/store/front-matter-cache.d.ts +24 -0
  125. package/dist/core/store/front-matter-cache.js +119 -8
  126. package/dist/core/store/front-matter-cache.js.map +1 -1
  127. package/dist/core/store/item-store.d.ts +7 -0
  128. package/dist/core/store/item-store.js +13 -3
  129. package/dist/core/store/item-store.js.map +1 -1
  130. package/dist/core/store/settings-validator.d.ts +1 -0
  131. package/dist/core/store/settings-validator.js +3 -2
  132. package/dist/core/store/settings-validator.js.map +1 -1
  133. package/dist/core/store/settings.js +19 -3
  134. package/dist/core/store/settings.js.map +1 -1
  135. package/dist/mcp/server.js +11 -4
  136. package/dist/mcp/server.js.map +1 -1
  137. package/dist/sdk/cli-contracts/commander-mutation-options.js +47 -11
  138. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  139. package/dist/sdk/cli-contracts/tool-option-contracts.js +5 -2
  140. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  141. package/dist/sdk/cli-contracts/tool-parameter-tables.js +12 -2
  142. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  143. package/dist/sdk/cli-contracts.js +28 -7
  144. package/dist/sdk/cli-contracts.js.map +1 -1
  145. package/dist/sdk/runtime.d.ts +1 -1
  146. package/dist/sdk/runtime.js +3 -3
  147. package/dist/sdk/runtime.js.map +1 -1
  148. package/dist/types.d.ts +2 -0
  149. package/dist/types.js +2 -2
  150. package/dist/types.js.map +1 -1
  151. package/docs/AGENT_GUIDE.md +7 -0
  152. package/docs/COMMANDS.md +17 -0
  153. package/docs/CONFIGURATION.md +66 -0
  154. package/docs/QUICKSTART.md +3 -0
  155. package/package.json +7 -4
  156. package/packages/pm-calendar/extensions/calendar/index.js +27 -2
  157. package/packages/pm-calendar/extensions/calendar/index.ts +28 -2
  158. package/packages/pm-calendar/extensions/calendar/runtime.js +5 -0
  159. package/packages/pm-calendar/extensions/calendar/runtime.ts +6 -0
  160. package/scripts/bundle-cli.mjs +39 -0
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79117409-1ffd-53b1-948a-0ac6ac8d878a")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2bf175c5-e4a0-59d7-a9ac-41b6dd354d6d")}catch(e){}}();
3
3
  import { Option } from "commander";
4
4
  import { EXIT_CODE } from "../core/shared/constants.js";
5
5
  import { PmCliError } from "../core/shared/errors.js";
@@ -231,7 +231,7 @@ export function registerListQueryCommands(program, options) {
231
231
  program
232
232
  .command("get")
233
233
  .argument("<id>", "Item id")
234
- .option("--depth <value>", "Detail depth: brief|standard|deep (default: deep)")
234
+ .option("--depth <value>", "Detail depth: brief|standard|deep|full (full aliases deep; default: deep)")
235
235
  .option("--full", "Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)")
236
236
  .option("--fields <value>", "Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)")
237
237
  .description("Show item details by ID.")
@@ -318,4 +318,4 @@ export function registerListQueryCommands(program, options) {
318
318
  }
319
319
  }
320
320
  //# sourceMappingURL=register-list-query.js.map
321
- //# debugId=79117409-1ffd-53b1-948a-0ac6ac8d878a
321
+ //# debugId=2bf175c5-e4a0-59d7-a9ac-41b6dd354d6d
@@ -1 +1 @@
1
- {"version":3,"file":"register-list-query.js","sources":["cli/register-list-query.ts"],"sourceRoot":"/","sourcesContent":["import { Option, type Command } from \"commander\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n getGlobalOptions,\n normalizeAggregateOptions,\n normalizeActivityOptions,\n normalizeContextOptions,\n normalizeListOptions,\n normalizeSearchKeywordsInput,\n normalizeSearchOptions,\n printActivityJsonStream,\n printError,\n printListJsonStream,\n printResult,\n resolveActivityStreamMode,\n writeStdout,\n} from \"./registration-helpers.js\";\nimport { createLazyModule } from \"../core/shared/lazy-module.js\";\n\ntype ListQueryCommandsModule = typeof import(\"./commands/index.js\");\n\nconst loadListQueryCommandsModule = createLazyModule<ListQueryCommandsModule>(() => import(\"./commands/index.js\"));\n\nexport interface RegisterListQueryCommandsOptions {\n commandFilter?: Set<string>;\n}\n\nfunction shouldRegisterListQueryCommand(commandName: string, commandFilter?: Set<string>): boolean {\n if (!commandFilter || commandFilter.size === 0) {\n return true;\n }\n if (commandName === \"context\") {\n return commandFilter.has(\"context\") || commandFilter.has(\"ctx\");\n }\n return commandFilter.has(commandName);\n}\n\nexport function registerListQueryCommands(program: Command, options?: RegisterListQueryCommandsOptions): void {\n const commandFilter = options?.commandFilter;\n const shouldRegister = (commandName: string): boolean => shouldRegisterListQueryCommand(commandName, commandFilter);\n // Register a flag and hide it from --help text while keeping it functional as\n // a parse-time alias. Used for pure snake_case underscore-duplicate aliases\n // (e.g. --assignee_filter for --assignee-filter) so they no longer bloat\n // --help output. The option still appears in command.options, so JSON help\n // and completion are unchanged.\n function addHiddenOption(command: Command, flags: string, description: string): void {\n command.addOption(new Option(flags, description).hideHelp());\n }\n\n function registerListCommand(\n name: string,\n description: string,\n status?: ItemStatus,\n excludeTerminal?: boolean,\n allowStatusFilter?: boolean,\n defaultBrief?: boolean,\n ): void {\n const command = program.command(name).description(description);\n if (allowStatusFilter) {\n command.option(\"--status <value>\", \"Filter by status\");\n }\n command\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit returned item count\")\n .option(\"--offset <n>\", \"Skip the first n matching rows before limit is applied\")\n .option(\"--include-body\", \"Include item body in each returned list row\")\n .option(\"--compact\", \"Render compact list projection fields (mutually exclusive with --brief/--full/--fields)\")\n .option(\"--brief\", \"Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)\")\n .option(\"--full\", \"Render full list projection fields (mutually exclusive with --compact/--brief/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full; valid: --fields id,title)\",\n )\n .option(\"--sort <value>\", \"Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)\")\n .option(\"--order <value>\", \"Sort order: asc|desc (requires --sort)\")\n .option(\"--stream\", \"Emit line-delimited JSON rows (requires --json)\")\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const listOptions = normalizeListOptions(options);\n if (\n defaultBrief === true &&\n listOptions.includeBody !== true &&\n listOptions.compact !== true &&\n listOptions.brief !== true &&\n listOptions.full !== true &&\n listOptions.fields === undefined\n ) {\n listOptions.brief = true;\n }\n if (excludeTerminal) listOptions.excludeTerminal = true;\n const { runList } = await loadListQueryCommandsModule();\n const result = await runList(status, listOptions, globalOptions);\n const streamMode = options.stream === true;\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printListJsonStream(name, result, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=${name} took_ms=${Date.now() - startedAt}`);\n }\n });\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(command, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n }\n\n if (shouldRegister(\"list\")) {\n registerListCommand(\"list\", \"List active items with optional filters.\", undefined, true, true, true);\n }\n if (shouldRegister(\"list-all\")) {\n registerListCommand(\"list-all\", \"List all items with optional filters.\", undefined, false, true);\n }\n if (shouldRegister(\"list-draft\")) {\n registerListCommand(\"list-draft\", \"List draft items with optional filters.\", \"draft\");\n }\n if (shouldRegister(\"list-open\")) {\n registerListCommand(\"list-open\", \"List open items with optional filters.\", \"open\", false, false, true);\n }\n if (shouldRegister(\"list-in-progress\")) {\n registerListCommand(\"list-in-progress\", \"List in-progress items with optional filters.\", \"in_progress\", false, false, true);\n }\n if (shouldRegister(\"list-blocked\")) {\n registerListCommand(\"list-blocked\", \"List blocked items with optional filters.\", \"blocked\");\n }\n if (shouldRegister(\"list-closed\")) {\n registerListCommand(\"list-closed\", \"List closed items with optional filters.\", \"closed\");\n }\n if (shouldRegister(\"list-canceled\")) {\n registerListCommand(\"list-canceled\", \"List canceled items with optional filters.\", \"canceled\");\n }\n\n if (shouldRegister(\"aggregate\")) {\n const aggregateCommand = program\n .command(\"aggregate\")\n .description(\"Aggregate grouped item counts for governance queries.\")\n .option(\n \"--group-by <value>\",\n \"Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)\",\n )\n .option(\"--count\", \"Return grouped counts (default behavior)\")\n .option(\"--include-unparented\", \"Include unparented rows when grouping by parent\")\n .option(\"--status <value>\", \"Filter by item status\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\");\n // Hidden pure snake_case underscore-duplicate aliases (kept parse-functional).\n addHiddenOption(aggregateCommand, \"--include_unparented\", \"Alias for --include-unparented\");\n addHiddenOption(aggregateCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n aggregateCommand\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runAggregate } = await loadListQueryCommandsModule();\n const result = await runAggregate(normalizeAggregateOptions(options), globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=aggregate took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"context\")) {\n const contextCommand = program\n .command(\"context\")\n .alias(\"ctx\")\n .description(\"Show a token-efficient project context snapshot for next-work decisions.\")\n .option(\"--date <value>\", \"Anchor date/time for agenda window calculations (ISO/date string or relative)\")\n .option(\"--from <value>\", \"Agenda lower bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Agenda upper bound (ISO/date string or relative)\")\n .option(\"--past\", \"Include past agenda entries in bounded windows\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit focus and agenda rows per section\")\n .option(\"--format <value>\", \"Context output format override: markdown|toon|json\")\n .option(\"--depth <value>\", \"Context depth: brief|standard|deep (default: settings or brief)\")\n .option(\"--section <value...>\", \"Include specific sections (repeatable; overrides --depth)\")\n .option(\"--activity-limit <n>\", \"Limit recent activity entries (default: settings or 10)\")\n .option(\"--stale-threshold <value>\", \"Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)\");\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(contextCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n contextCommand\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const normalized = normalizeContextOptions(options);\n const commands = await loadListQueryCommandsModule();\n const result = await commands.runContext(normalized, globalOptions);\n const outputFormat = commands.resolveContextOutputFormat(normalized, globalOptions);\n if (outputFormat === \"markdown\") {\n if (!globalOptions.quiet) {\n writeStdout(`${commands.renderContextMarkdown(result)}\\n`);\n }\n } else {\n printResult(result, {\n ...globalOptions,\n json: outputFormat === \"json\",\n });\n }\n if (globalOptions.profile) {\n printError(`profile:command=context took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"search\")) {\n program\n .command(\"search\")\n .argument(\"<keywords...>\", \"Keyword query tokens\")\n .description(\"Search items with keyword, semantic, or hybrid retrieval.\")\n .option(\"--mode <value>\", \"Search mode: keyword|semantic|hybrid (default: keyword)\")\n .option(\"--semantic\", \"Shorthand for --mode semantic\")\n .option(\"--hybrid\", \"Shorthand for --mode hybrid\")\n .option(\"--include-linked\", \"Include linked files, docs, and tests in the searchable corpus\")\n .option(\"--title-exact\", \"Require exact normalized title match for the full query string\")\n .option(\"--phrase-exact\", \"Require exact normalized phrase match in searchable text\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--compact\", \"Render compact search hits (default; mutually exclusive with --full/--fields)\")\n .option(\"--full\", \"Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated search hit fields (mutually exclusive with --compact/--full; valid: --fields id,title,score; invalid: --full --fields id,title)\",\n )\n .option(\"--limit <n>\", \"Limit returned item count\")\n .action(async (keywords: string[], options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runSearch } = await loadListQueryCommandsModule();\n const searchOptions = normalizeSearchOptions(options);\n const result = await runSearch(\n normalizeSearchKeywordsInput(keywords),\n {\n ...searchOptions,\n mode:\n typeof searchOptions.mode === \"string\" && searchOptions.mode.trim().length > 0\n ? searchOptions.mode\n : \"keyword\",\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=search took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"get\")) {\n program\n .command(\"get\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--depth <value>\", \"Detail depth: brief|standard|deep (default: deep)\")\n .option(\"--full\", \"Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)\")\n .option(\"--fields <value>\", \"Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)\")\n .description(\"Show item details by ID.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runGet } = await loadListQueryCommandsModule();\n const result = await runGet(\n id,\n globalOptions,\n {\n depth: typeof options.depth === \"string\" ? options.depth : undefined,\n fields: typeof options.fields === \"string\" ? options.fields : undefined,\n full: Boolean(options.full),\n },\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=get took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"history\")) {\n program\n .command(\"history\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--limit <n>\", \"Return only the latest n history entries\")\n .option(\"--compact\", \"Condensed output: show entry index, timestamp, op, author, patch count, and changed fields\")\n .option(\"--full\", \"Show full history entries with JSON Patch payloads\")\n .option(\"--diff\", \"Include per-entry changed field summaries from history patches\")\n .option(\"--verify\", \"Verify hash chain and replay integrity for the full history stream\")\n .description(\"Show item history entries.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"History projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const { runHistory } = await loadListQueryCommandsModule();\n const result = await runHistory(\n id,\n {\n limit: typeof options.limit === \"string\" ? options.limit : undefined,\n compact: options.full === true ? false : true,\n diff: Boolean(options.diff),\n verify: Boolean(options.verify),\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=history took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"activity\")) {\n program\n .command(\"activity\")\n .option(\"--id <value>\", \"Filter by item ID\")\n .option(\"--op <value>\", \"Filter by history operation\")\n .option(\"--author <value>\", \"Filter by history author\")\n .option(\"--from <value>\", \"Lower timestamp bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Upper timestamp bound (ISO/date string or relative)\")\n .option(\"--limit <n>\", \"Return only the latest n activity entries\")\n .option(\"--compact\", \"Condensed output: show only id, op, ts, author, msg per entry\")\n .option(\"--full\", \"Show full activity entries with JSON Patch payloads\")\n .option(\"--stream [mode]\", \"Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl\")\n .description(\"Show recent activity across items.\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"Activity projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const normalized = normalizeActivityOptions(options);\n const { runActivity } = await loadListQueryCommandsModule();\n const result = await runActivity(normalized, globalOptions);\n const streamMode = resolveActivityStreamMode(options.stream);\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printActivityJsonStream(result, normalized, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=activity took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,yBAAyB,EACzB,WAAW,GACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,MAAM,2BAA2B,GAAG,gBAAgB,CAA0B,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAMnH,SAAS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AAC,aAAa,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,IAAI,UAAU,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;YACjF,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACf,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;gBAC1B,UAAU,CAAC,oCAAoC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC","debugId":"79117409-1ffd-53b1-948a-0ac6ac8d878a"}
1
+ {"version":3,"file":"register-list-query.js","sources":["cli/register-list-query.ts"],"sourceRoot":"/","sourcesContent":["import { Option, type Command } from \"commander\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n getGlobalOptions,\n normalizeAggregateOptions,\n normalizeActivityOptions,\n normalizeContextOptions,\n normalizeListOptions,\n normalizeSearchKeywordsInput,\n normalizeSearchOptions,\n printActivityJsonStream,\n printError,\n printListJsonStream,\n printResult,\n resolveActivityStreamMode,\n writeStdout,\n} from \"./registration-helpers.js\";\nimport { createLazyModule } from \"../core/shared/lazy-module.js\";\n\ntype ListQueryCommandsModule = typeof import(\"./commands/index.js\");\n\nconst loadListQueryCommandsModule = createLazyModule<ListQueryCommandsModule>(() => import(\"./commands/index.js\"));\n\nexport interface RegisterListQueryCommandsOptions {\n commandFilter?: Set<string>;\n}\n\nfunction shouldRegisterListQueryCommand(commandName: string, commandFilter?: Set<string>): boolean {\n if (!commandFilter || commandFilter.size === 0) {\n return true;\n }\n if (commandName === \"context\") {\n return commandFilter.has(\"context\") || commandFilter.has(\"ctx\");\n }\n return commandFilter.has(commandName);\n}\n\nexport function registerListQueryCommands(program: Command, options?: RegisterListQueryCommandsOptions): void {\n const commandFilter = options?.commandFilter;\n const shouldRegister = (commandName: string): boolean => shouldRegisterListQueryCommand(commandName, commandFilter);\n // Register a flag and hide it from --help text while keeping it functional as\n // a parse-time alias. Used for pure snake_case underscore-duplicate aliases\n // (e.g. --assignee_filter for --assignee-filter) so they no longer bloat\n // --help output. The option still appears in command.options, so JSON help\n // and completion are unchanged.\n function addHiddenOption(command: Command, flags: string, description: string): void {\n command.addOption(new Option(flags, description).hideHelp());\n }\n\n function registerListCommand(\n name: string,\n description: string,\n status?: ItemStatus,\n excludeTerminal?: boolean,\n allowStatusFilter?: boolean,\n defaultBrief?: boolean,\n ): void {\n const command = program.command(name).description(description);\n if (allowStatusFilter) {\n command.option(\"--status <value>\", \"Filter by status\");\n }\n command\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit returned item count\")\n .option(\"--offset <n>\", \"Skip the first n matching rows before limit is applied\")\n .option(\"--include-body\", \"Include item body in each returned list row\")\n .option(\"--compact\", \"Render compact list projection fields (mutually exclusive with --brief/--full/--fields)\")\n .option(\"--brief\", \"Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)\")\n .option(\"--full\", \"Render full list projection fields (mutually exclusive with --compact/--brief/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full; valid: --fields id,title)\",\n )\n .option(\"--sort <value>\", \"Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)\")\n .option(\"--order <value>\", \"Sort order: asc|desc (requires --sort)\")\n .option(\"--stream\", \"Emit line-delimited JSON rows (requires --json)\")\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const listOptions = normalizeListOptions(options);\n if (\n defaultBrief === true &&\n listOptions.includeBody !== true &&\n listOptions.compact !== true &&\n listOptions.brief !== true &&\n listOptions.full !== true &&\n listOptions.fields === undefined\n ) {\n listOptions.brief = true;\n }\n if (excludeTerminal) listOptions.excludeTerminal = true;\n const { runList } = await loadListQueryCommandsModule();\n const result = await runList(status, listOptions, globalOptions);\n const streamMode = options.stream === true;\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printListJsonStream(name, result, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=${name} took_ms=${Date.now() - startedAt}`);\n }\n });\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(command, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n }\n\n if (shouldRegister(\"list\")) {\n registerListCommand(\"list\", \"List active items with optional filters.\", undefined, true, true, true);\n }\n if (shouldRegister(\"list-all\")) {\n registerListCommand(\"list-all\", \"List all items with optional filters.\", undefined, false, true);\n }\n if (shouldRegister(\"list-draft\")) {\n registerListCommand(\"list-draft\", \"List draft items with optional filters.\", \"draft\");\n }\n if (shouldRegister(\"list-open\")) {\n registerListCommand(\"list-open\", \"List open items with optional filters.\", \"open\", false, false, true);\n }\n if (shouldRegister(\"list-in-progress\")) {\n registerListCommand(\"list-in-progress\", \"List in-progress items with optional filters.\", \"in_progress\", false, false, true);\n }\n if (shouldRegister(\"list-blocked\")) {\n registerListCommand(\"list-blocked\", \"List blocked items with optional filters.\", \"blocked\");\n }\n if (shouldRegister(\"list-closed\")) {\n registerListCommand(\"list-closed\", \"List closed items with optional filters.\", \"closed\");\n }\n if (shouldRegister(\"list-canceled\")) {\n registerListCommand(\"list-canceled\", \"List canceled items with optional filters.\", \"canceled\");\n }\n\n if (shouldRegister(\"aggregate\")) {\n const aggregateCommand = program\n .command(\"aggregate\")\n .description(\"Aggregate grouped item counts for governance queries.\")\n .option(\n \"--group-by <value>\",\n \"Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)\",\n )\n .option(\"--count\", \"Return grouped counts (default behavior)\")\n .option(\"--include-unparented\", \"Include unparented rows when grouping by parent\")\n .option(\"--status <value>\", \"Filter by item status\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\");\n // Hidden pure snake_case underscore-duplicate aliases (kept parse-functional).\n addHiddenOption(aggregateCommand, \"--include_unparented\", \"Alias for --include-unparented\");\n addHiddenOption(aggregateCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n aggregateCommand\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runAggregate } = await loadListQueryCommandsModule();\n const result = await runAggregate(normalizeAggregateOptions(options), globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=aggregate took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"context\")) {\n const contextCommand = program\n .command(\"context\")\n .alias(\"ctx\")\n .description(\"Show a token-efficient project context snapshot for next-work decisions.\")\n .option(\"--date <value>\", \"Anchor date/time for agenda window calculations (ISO/date string or relative)\")\n .option(\"--from <value>\", \"Agenda lower bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Agenda upper bound (ISO/date string or relative)\")\n .option(\"--past\", \"Include past agenda entries in bounded windows\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit focus and agenda rows per section\")\n .option(\"--format <value>\", \"Context output format override: markdown|toon|json\")\n .option(\"--depth <value>\", \"Context depth: brief|standard|deep (default: settings or brief)\")\n .option(\"--section <value...>\", \"Include specific sections (repeatable; overrides --depth)\")\n .option(\"--activity-limit <n>\", \"Limit recent activity entries (default: settings or 10)\")\n .option(\"--stale-threshold <value>\", \"Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)\");\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(contextCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n contextCommand\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const normalized = normalizeContextOptions(options);\n const commands = await loadListQueryCommandsModule();\n const result = await commands.runContext(normalized, globalOptions);\n const outputFormat = commands.resolveContextOutputFormat(normalized, globalOptions);\n if (outputFormat === \"markdown\") {\n if (!globalOptions.quiet) {\n writeStdout(`${commands.renderContextMarkdown(result)}\\n`);\n }\n } else {\n printResult(result, {\n ...globalOptions,\n json: outputFormat === \"json\",\n });\n }\n if (globalOptions.profile) {\n printError(`profile:command=context took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"search\")) {\n program\n .command(\"search\")\n .argument(\"<keywords...>\", \"Keyword query tokens\")\n .description(\"Search items with keyword, semantic, or hybrid retrieval.\")\n .option(\"--mode <value>\", \"Search mode: keyword|semantic|hybrid (default: keyword)\")\n .option(\"--semantic\", \"Shorthand for --mode semantic\")\n .option(\"--hybrid\", \"Shorthand for --mode hybrid\")\n .option(\"--include-linked\", \"Include linked files, docs, and tests in the searchable corpus\")\n .option(\"--title-exact\", \"Require exact normalized title match for the full query string\")\n .option(\"--phrase-exact\", \"Require exact normalized phrase match in searchable text\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--compact\", \"Render compact search hits (default; mutually exclusive with --full/--fields)\")\n .option(\"--full\", \"Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated search hit fields (mutually exclusive with --compact/--full; valid: --fields id,title,score; invalid: --full --fields id,title)\",\n )\n .option(\"--limit <n>\", \"Limit returned item count\")\n .action(async (keywords: string[], options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runSearch } = await loadListQueryCommandsModule();\n const searchOptions = normalizeSearchOptions(options);\n const result = await runSearch(\n normalizeSearchKeywordsInput(keywords),\n {\n ...searchOptions,\n mode:\n typeof searchOptions.mode === \"string\" && searchOptions.mode.trim().length > 0\n ? searchOptions.mode\n : \"keyword\",\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=search took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"get\")) {\n program\n .command(\"get\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--depth <value>\", \"Detail depth: brief|standard|deep|full (full aliases deep; default: deep)\")\n .option(\"--full\", \"Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)\")\n .option(\"--fields <value>\", \"Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)\")\n .description(\"Show item details by ID.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runGet } = await loadListQueryCommandsModule();\n const result = await runGet(\n id,\n globalOptions,\n {\n depth: typeof options.depth === \"string\" ? options.depth : undefined,\n fields: typeof options.fields === \"string\" ? options.fields : undefined,\n full: Boolean(options.full),\n },\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=get took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"history\")) {\n program\n .command(\"history\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--limit <n>\", \"Return only the latest n history entries\")\n .option(\"--compact\", \"Condensed output: show entry index, timestamp, op, author, patch count, and changed fields\")\n .option(\"--full\", \"Show full history entries with JSON Patch payloads\")\n .option(\"--diff\", \"Include per-entry changed field summaries from history patches\")\n .option(\"--verify\", \"Verify hash chain and replay integrity for the full history stream\")\n .description(\"Show item history entries.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"History projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const { runHistory } = await loadListQueryCommandsModule();\n const result = await runHistory(\n id,\n {\n limit: typeof options.limit === \"string\" ? options.limit : undefined,\n compact: options.full === true ? false : true,\n diff: Boolean(options.diff),\n verify: Boolean(options.verify),\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=history took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"activity\")) {\n program\n .command(\"activity\")\n .option(\"--id <value>\", \"Filter by item ID\")\n .option(\"--op <value>\", \"Filter by history operation\")\n .option(\"--author <value>\", \"Filter by history author\")\n .option(\"--from <value>\", \"Lower timestamp bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Upper timestamp bound (ISO/date string or relative)\")\n .option(\"--limit <n>\", \"Return only the latest n activity entries\")\n .option(\"--compact\", \"Condensed output: show only id, op, ts, author, msg per entry\")\n .option(\"--full\", \"Show full activity entries with JSON Patch payloads\")\n .option(\"--stream [mode]\", \"Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl\")\n .description(\"Show recent activity across items.\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"Activity projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const normalized = normalizeActivityOptions(options);\n const { runActivity } = await loadListQueryCommandsModule();\n const result = await runActivity(normalized, globalOptions);\n const streamMode = resolveActivityStreamMode(options.stream);\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printActivityJsonStream(result, normalized, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=activity took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,mBAAm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rD,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,2BAA2B,EAAE,CAAC;YAC5D,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;YAC5D,MAAM,UAAU,GAAG,yBAAyB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC7D,IAAI,UAAU,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,IAAI,UAAU,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;YACjF,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACf,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;gBAC1B,UAAU,CAAC,oCAAoC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC","debugId":"2bf175c5-e4a0-59d7-a9ac-41b6dd354d6d"}
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4547acbc-0dcb-5ccd-9900-5384c6a1e956")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1c5454e2-e849-5b5f-b7a1-2681e8a90eac")}catch(e){}}();
3
3
  import { Option } from "commander";
4
4
  import { EXIT_CODE } from "../core/shared/constants.js";
5
5
  import { PmCliError } from "../core/shared/errors.js";
@@ -188,7 +188,9 @@ export function registerMutationCommands(program) {
188
188
  .option("--status, -s <value>", "Set status (use close command for closed)")
189
189
  .option("--priority, -p <value>", "Set priority")
190
190
  .option("--type <value>", "Set type")
191
- .option("--tags <value>", "Set comma-separated tags")
191
+ .option("--tags <value>", "Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively.")
192
+ .option("--add-tags <value>", "Add tags additively without replacing existing (repeatable; CSV accepted)", collect)
193
+ .option("--remove-tags <value>", "Remove tags from the existing list (repeatable; CSV accepted)", collect)
192
194
  .option("--deadline <value>", "Set deadline (ISO/date string or relative)")
193
195
  .option("--estimate, --estimated-minutes <value>", "Set estimated minutes")
194
196
  .option("--acceptance-criteria <value>", "Set acceptance criteria")
@@ -218,7 +220,9 @@ export function registerMutationCommands(program) {
218
220
  .option("--repro-steps <value>", "Set issue reproduction steps")
219
221
  .option("--resolution <value>", "Set issue resolution summary")
220
222
  .option("--expected-result <value>", "Set issue expected behavior")
223
+ .option("--expected <value>", "Short alias for --expected-result")
221
224
  .option("--actual-result <value>", "Set issue observed behavior")
225
+ .option("--actual <value>", "Short alias for --actual-result")
222
226
  .option("--affected-version <value>", "Set affected version identifier")
223
227
  .option("--fixed-version <value>", "Set fixed version identifier")
224
228
  .option("--component <value>", "Set issue component ownership")
@@ -278,6 +282,8 @@ export function registerMutationCommands(program) {
278
282
  for (const [flags, description] of [
279
283
  ["--dep_remove <value>", "Alias for --dep-remove"],
280
284
  ["--type_option <value>", "Alias for --type-option"],
285
+ ["--add_tags <value>", "Alias for --add-tags"],
286
+ ["--remove_tags <value>", "Alias for --remove-tags"],
281
287
  ]) {
282
288
  addHiddenOption(updateManyCommand, flags, description, true);
283
289
  }
@@ -329,7 +335,9 @@ export function registerMutationCommands(program) {
329
335
  .option("--validate-close [mode]", 'Validate closure metadata before close: "off", "warn", or "strict" (default: settings governance preset)')
330
336
  .option("--resolution <value>", "Set the closure resolution summary inline (same field --validate-close strict checks; previously required a prior pm update)")
331
337
  .option("--expected-result <value>", "Set the expected-result note inline (closure validation field)")
338
+ .option("--expected <value>", "Short alias for --expected-result")
332
339
  .option("--actual-result <value>", "Set the actual-result note inline (closure validation field)")
340
+ .option("--actual <value>", "Short alias for --actual-result")
333
341
  .option("--force", "Force ownership override")
334
342
  .description("Close an item with a required reason.");
335
343
  // pm-fl0c #11 (2026-05-28): expose snake_case aliases alongside the canonical
@@ -359,9 +367,13 @@ export function registerMutationCommands(program) {
359
367
  ],
360
368
  });
361
369
  }
362
- const pickInlineString = (canonical, snake) => {
363
- const value = typeof canonical === "string" ? canonical : typeof snake === "string" ? snake : undefined;
364
- return value !== undefined ? value : undefined;
370
+ const pickInlineString = (...candidates) => {
371
+ for (const candidate of candidates) {
372
+ if (typeof candidate === "string") {
373
+ return candidate;
374
+ }
375
+ }
376
+ return undefined;
365
377
  };
366
378
  const result = await runClose(id, resolvedText, {
367
379
  author: typeof options.author === "string" ? options.author : undefined,
@@ -373,8 +385,8 @@ export function registerMutationCommands(program) {
373
385
  : undefined,
374
386
  force: Boolean(options.force),
375
387
  resolution: typeof options.resolution === "string" ? options.resolution : undefined,
376
- expectedResult: pickInlineString(options.expectedResult, options.expected_result),
377
- actualResult: pickInlineString(options.actualResult, options.actual_result),
388
+ expectedResult: pickInlineString(options.expectedResult, options.expected_result, options.expected),
389
+ actualResult: pickInlineString(options.actualResult, options.actual_result, options.actual),
378
390
  }, globalOptions);
379
391
  await invalidateSearchCachesForMutation(globalOptions, result);
380
392
  printResult(result, globalOptions);
@@ -1051,4 +1063,4 @@ export function registerMutationCommands(program) {
1051
1063
  });
1052
1064
  }
1053
1065
  //# sourceMappingURL=register-mutation.js.map
1054
- //# debugId=4547acbc-0dcb-5ccd-9900-5384c6a1e956
1066
+ //# debugId=1c5454e2-e849-5b5f-b7a1-2681e8a90eac