@unbrained/pm-cli 2026.5.30 → 2026.5.31
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.
- package/CHANGELOG.md +25 -0
- package/dist/cli/commands/calendar.js +81 -9
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/create.js +34 -4
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +2 -0
- package/dist/cli/commands/extension/install-sources.js +11 -4
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/reindex.js +3 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.d.ts +17 -0
- package/dist/cli/commands/search.js +40 -10
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/register-list-query.js +9 -11
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +20 -22
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +32 -25
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +6 -8
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +6 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/search-refresh.d.ts +2 -0
- package/dist/cli/search-refresh.js +13 -0
- package/dist/cli/search-refresh.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +17 -0
- package/dist/cli-bundle/chunks/activity-OWYSUZOY.js.map +7 -0
- package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js +209 -0
- package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js.map +7 -0
- package/dist/cli-bundle/chunks/append-JD2DETU7.js +73 -0
- package/dist/cli-bundle/chunks/append-JD2DETU7.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3M73P3G6.js +1636 -0
- package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +189 -0
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5HSEP75M.js +330 -0
- package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js +1770 -0
- package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js +552 -0
- package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js +202 -0
- package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js +157 -0
- package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js +90 -0
- package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js +950 -0
- package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js +79 -0
- package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js +349 -0
- package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +47 -0
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +56 -0
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js +435 -0
- package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-G57E5D7T.js +185 -0
- package/dist/cli-bundle/chunks/chunk-G57E5D7T.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js +3621 -0
- package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js +233 -0
- package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js +1861 -0
- package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js +648 -0
- package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-KBQY3YG5.js} +28 -70
- package/dist/cli-bundle/chunks/chunk-KBQY3YG5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js +185 -0
- package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js +189 -0
- package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js +5153 -0
- package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js +1345 -0
- package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js +341 -0
- package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js +2929 -0
- package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-P53TN6IA.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js +176 -0
- package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js +1680 -0
- package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js +60 -0
- package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js +362 -0
- package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +141 -0
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js +632 -0
- package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js +252 -0
- package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js.map +7 -0
- package/dist/cli-bundle/chunks/claim-EE4TKKCV.js +133 -0
- package/dist/cli-bundle/chunks/claim-EE4TKKCV.js.map +7 -0
- package/dist/cli-bundle/chunks/close-XY4CSAYF.js +14 -0
- package/dist/cli-bundle/chunks/close-XY4CSAYF.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js +104 -0
- package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js.map +7 -0
- package/dist/cli-bundle/chunks/config-V3FZOKLI.js +1577 -0
- package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +7 -0
- package/dist/cli-bundle/chunks/context-RZ5QPNJB.js +1458 -0
- package/dist/cli-bundle/chunks/context-RZ5QPNJB.js.map +7 -0
- package/dist/cli-bundle/chunks/contracts-YLMH33VU.js +1245 -0
- package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +7 -0
- package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +28 -0
- package/dist/cli-bundle/chunks/create-PZVHRIZQ.js.map +7 -0
- package/dist/cli-bundle/chunks/delete-RHCTEORS.js +59 -0
- package/dist/cli-bundle/chunks/delete-RHCTEORS.js.map +7 -0
- package/dist/cli-bundle/chunks/deps-MZYCMLAO.js +229 -0
- package/dist/cli-bundle/chunks/deps-MZYCMLAO.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-FXXUCZYU.js +35 -0
- package/dist/cli-bundle/chunks/docs-FXXUCZYU.js.map +7 -0
- package/dist/cli-bundle/chunks/extension-B4WL7BQU.js +25 -0
- package/dist/cli-bundle/chunks/extension-B4WL7BQU.js.map +7 -0
- package/dist/cli-bundle/chunks/files-WVOX67PE.js +286 -0
- package/dist/cli-bundle/chunks/files-WVOX67PE.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js +181 -0
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +7 -0
- package/dist/cli-bundle/chunks/get-LTK3HOCQ.js +198 -0
- package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +7 -0
- package/dist/cli-bundle/chunks/health-TCWL55KM.js +1233 -0
- package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +7 -0
- package/dist/cli-bundle/chunks/history-A2JUDXUE.js +21 -0
- package/dist/cli-bundle/chunks/history-A2JUDXUE.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +20 -0
- package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js +198 -0
- package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js.map +7 -0
- package/dist/cli-bundle/chunks/init-M2WUB4YH.js +16 -0
- package/dist/cli-bundle/chunks/init-M2WUB4YH.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js +48 -0
- package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js.map +7 -0
- package/dist/cli-bundle/chunks/list-OGWQPC26.js +20 -0
- package/dist/cli-bundle/chunks/list-OGWQPC26.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js +48 -0
- package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-67AB2PLM.js +1175 -0
- package/dist/cli-bundle/chunks/plan-67AB2PLM.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-UP3VRUFS.js} +24 -15
- package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-YWSBF545.js} +38 -28
- package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-3BDTGSDH.js} +49 -30
- package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-V56GDRUS.js} +21 -12
- package/dist/cli-bundle/chunks/register-setup-V56GDRUS.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-MB2ISME7.js +18 -0
- package/dist/cli-bundle/chunks/restore-MB2ISME7.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-Q622KC46.js +119 -0
- package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +7 -0
- package/dist/cli-bundle/chunks/search-HENBL456.js +1135 -0
- package/dist/cli-bundle/chunks/search-HENBL456.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +124 -0
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +7 -0
- package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +32 -0
- package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js +332 -0
- package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js.map +7 -0
- package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js +939 -0
- package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-H6SCWNMA.js +22 -0
- package/dist/cli-bundle/chunks/update-H6SCWNMA.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js +676 -0
- package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js +271 -0
- package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js.map +7 -0
- package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js +1110 -0
- package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +7 -0
- package/dist/cli-bundle/main.js +146 -90
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/item/item-type-definition.js +6 -2
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +4 -0
- package/dist/core/item/type-registry.js +10 -2
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/search/background-refresh.d.ts +53 -0
- package/dist/core/search/background-refresh.js +286 -0
- package/dist/core/search/background-refresh.js.map +1 -0
- package/dist/core/search/cache.d.ts +20 -1
- package/dist/core/search/cache.js +33 -4
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/vector-stores.js +7 -3
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/shared/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +2 -3
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/item-format-migration.js +25 -15
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/settings-validator.js +6 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +10 -0
- package/dist/core/telemetry/runtime.js +86 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +4 -4
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.js +26 -5
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/RELEASING.md +1 -1
- package/package.json +1 -2
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
|
@@ -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|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,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,8BAA8B,CAAC,WAAmB,EAAE,aAA2B;IACtF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAgB,EAAE,OAA0C;IACpG,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;IAC7C,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAW,EAAE,CAAC,8BAA8B,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC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":["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\";\n\n\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 import(\"./commands/list.js\");\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 import(\"./commands/aggregate.js\");\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 import(\"./commands/context.js\");\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 import(\"./commands/search.js\");\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 import(\"./commands/get.js\");\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 import(\"./commands/history.js\");\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 import(\"./commands/activity.js\");\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;AAQnC,SAAS,8BAA8B,CAAC,WAAmB,EAAE,aAA2B;IACtF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAgB,EAAE,OAA0C;IACpG,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;IAC7C,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAW,EAAE,CAAC,8BAA8B,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACpH,8EAA8E;IAC9E,4EAA4E;IAC5E,yEAAyE;I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}
|
|
@@ -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]="
|
|
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]="b543912f-51ff-52d3-8834-ad927ad85fe4")}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";
|
|
@@ -12,8 +12,6 @@ import { BUILTIN_ITEM_TYPE_VALUES } from "../types/index.js";
|
|
|
12
12
|
// instead of silently creating a Task titled with the type name.
|
|
13
13
|
const BUILTIN_TYPE_NAME_LOOKUP = new Set(BUILTIN_ITEM_TYPE_VALUES.map((value) => value.toLowerCase()));
|
|
14
14
|
import { collect, extractUpdateManyMutationOptionSource, formatHookWarnings, getGlobalOptions, invalidateSearchCachesForMutation, normalizeCreateOptions, normalizeUpdateOptions, printError, printResult, writeStdout, } from "./registration-helpers.js";
|
|
15
|
-
import { createLazyModule } from "../core/shared/lazy-module.js";
|
|
16
|
-
const loadMutationCommandsModule = createLazyModule(() => import("./commands/index.js"));
|
|
17
15
|
/**
|
|
18
16
|
* Register a flag and hide it from `--help` text while keeping it fully
|
|
19
17
|
* functional as a parse-time alias. The option still appears in
|
|
@@ -120,7 +118,7 @@ export function registerMutationCommands(program) {
|
|
|
120
118
|
options.title = positionalTitle;
|
|
121
119
|
}
|
|
122
120
|
const normalized = normalizeCreateOptions(options, { requireType: false });
|
|
123
|
-
const { runCreate } = await
|
|
121
|
+
const { runCreate } = await import("./commands/create.js");
|
|
124
122
|
const result = await runCreate(normalized, globalOptions);
|
|
125
123
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
126
124
|
printResult(result, globalOptions);
|
|
@@ -155,7 +153,7 @@ export function registerMutationCommands(program) {
|
|
|
155
153
|
.action(async (id, options, command) => {
|
|
156
154
|
const globalOptions = getGlobalOptions(command);
|
|
157
155
|
const startedAt = Date.now();
|
|
158
|
-
const { runUpdate } = await
|
|
156
|
+
const { runUpdate } = await import("./commands/update.js");
|
|
159
157
|
const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
|
|
160
158
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
161
159
|
printResult(result, globalOptions);
|
|
@@ -291,7 +289,7 @@ export function registerMutationCommands(program) {
|
|
|
291
289
|
.action(async (options, command) => {
|
|
292
290
|
const globalOptions = getGlobalOptions(command);
|
|
293
291
|
const startedAt = Date.now();
|
|
294
|
-
const { runUpdateMany } = await
|
|
292
|
+
const { runUpdateMany } = await import("./commands/update-many.js");
|
|
295
293
|
const result = await runUpdateMany({
|
|
296
294
|
status: typeof options.filterStatus === "string" ? options.filterStatus : undefined,
|
|
297
295
|
list: {
|
|
@@ -349,7 +347,7 @@ export function registerMutationCommands(program) {
|
|
|
349
347
|
.action(async (id, text, options, command) => {
|
|
350
348
|
const globalOptions = getGlobalOptions(command);
|
|
351
349
|
const startedAt = Date.now();
|
|
352
|
-
const { runClose } = await
|
|
350
|
+
const { runClose } = await import("./commands/close.js");
|
|
353
351
|
const reasonFromOption = (typeof options.reason === "string" && options.reason.trim().length > 0 && options.reason) ||
|
|
354
352
|
(typeof options.closeReason === "string" && options.closeReason.trim().length > 0 && options.closeReason) ||
|
|
355
353
|
undefined;
|
|
@@ -405,7 +403,7 @@ export function registerMutationCommands(program) {
|
|
|
405
403
|
.action(async (id, options, command) => {
|
|
406
404
|
const globalOptions = getGlobalOptions(command);
|
|
407
405
|
const startedAt = Date.now();
|
|
408
|
-
const { runDelete } = await
|
|
406
|
+
const { runDelete } = await import("./commands/delete.js");
|
|
409
407
|
const result = await runDelete(id, {
|
|
410
408
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
411
409
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -444,7 +442,7 @@ export function registerMutationCommands(program) {
|
|
|
444
442
|
if (resolvedBody === undefined) {
|
|
445
443
|
throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
|
|
446
444
|
}
|
|
447
|
-
const { runAppend } = await
|
|
445
|
+
const { runAppend } = await import("./commands/append.js");
|
|
448
446
|
const result = await runAppend(id, {
|
|
449
447
|
body: resolvedBody,
|
|
450
448
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
@@ -468,7 +466,7 @@ export function registerMutationCommands(program) {
|
|
|
468
466
|
.action(async (id, target, options, command) => {
|
|
469
467
|
const globalOptions = getGlobalOptions(command);
|
|
470
468
|
const startedAt = Date.now();
|
|
471
|
-
const { runRestore } = await
|
|
469
|
+
const { runRestore } = await import("./commands/restore.js");
|
|
472
470
|
const result = await runRestore(id, target, {
|
|
473
471
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
474
472
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -577,7 +575,7 @@ export function registerMutationCommands(program) {
|
|
|
577
575
|
.action(async (subcommand, id, stepRef, reorderToken, options, command) => {
|
|
578
576
|
const globalOptions = getGlobalOptions(command);
|
|
579
577
|
const startedAt = Date.now();
|
|
580
|
-
const { runPlan, PLAN_SUBCOMMANDS } = await
|
|
578
|
+
const { runPlan, PLAN_SUBCOMMANDS } = await import("./commands/plan.js");
|
|
581
579
|
const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
|
|
582
580
|
if (!normalizedSubcommand) {
|
|
583
581
|
throw new PmCliError(`pm plan requires a subcommand. Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
|
|
@@ -674,7 +672,7 @@ export function registerMutationCommands(program) {
|
|
|
674
672
|
.action(async (id, options, command) => {
|
|
675
673
|
const globalOptions = getGlobalOptions(command);
|
|
676
674
|
const startedAt = Date.now();
|
|
677
|
-
const { runHistoryRedact } = await
|
|
675
|
+
const { runHistoryRedact } = await import("./commands/history-redact.js");
|
|
678
676
|
const literal = Array.isArray(options.literal) ? options.literal : undefined;
|
|
679
677
|
const regex = Array.isArray(options.regex) ? options.regex : undefined;
|
|
680
678
|
const result = await runHistoryRedact(id, {
|
|
@@ -705,7 +703,7 @@ export function registerMutationCommands(program) {
|
|
|
705
703
|
.action(async (id, options, command) => {
|
|
706
704
|
const globalOptions = getGlobalOptions(command);
|
|
707
705
|
const startedAt = Date.now();
|
|
708
|
-
const { runHistoryRepair } = await
|
|
706
|
+
const { runHistoryRepair } = await import("./commands/history-repair.js");
|
|
709
707
|
const result = await runHistoryRepair(id, {
|
|
710
708
|
dryRun: options.dryRun === true,
|
|
711
709
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
@@ -736,7 +734,7 @@ export function registerMutationCommands(program) {
|
|
|
736
734
|
.action(async (subcommand, name, options, command) => {
|
|
737
735
|
const globalOptions = getGlobalOptions(command);
|
|
738
736
|
const startedAt = Date.now();
|
|
739
|
-
const { runSchemaAddType, formatSchemaAddTypeHuman, SCHEMA_SUBCOMMANDS } = await
|
|
737
|
+
const { runSchemaAddType, formatSchemaAddTypeHuman, SCHEMA_SUBCOMMANDS } = await import("./commands/schema.js");
|
|
740
738
|
let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
|
|
741
739
|
let typeName = name;
|
|
742
740
|
if (!normalizedSubcommand) {
|
|
@@ -826,7 +824,7 @@ export function registerMutationCommands(program) {
|
|
|
826
824
|
throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
|
|
827
825
|
}
|
|
828
826
|
const add = addFromOption ?? addFromPositional;
|
|
829
|
-
const { runComments } = await
|
|
827
|
+
const { runComments } = await import("./commands/comments.js");
|
|
830
828
|
const result = await runComments(id, {
|
|
831
829
|
add,
|
|
832
830
|
stdin: readFromStdin,
|
|
@@ -866,7 +864,7 @@ export function registerMutationCommands(program) {
|
|
|
866
864
|
throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
867
865
|
}
|
|
868
866
|
const add = addFromOption ?? addFromPositional;
|
|
869
|
-
const { runNotes } = await
|
|
867
|
+
const { runNotes } = await import("./commands/notes.js");
|
|
870
868
|
const result = await runNotes(id, {
|
|
871
869
|
add,
|
|
872
870
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -904,7 +902,7 @@ export function registerMutationCommands(program) {
|
|
|
904
902
|
throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
905
903
|
}
|
|
906
904
|
const add = addFromOption ?? addFromPositional;
|
|
907
|
-
const { runLearnings } = await
|
|
905
|
+
const { runLearnings } = await import("./commands/learnings.js");
|
|
908
906
|
const result = await runLearnings(id, {
|
|
909
907
|
add,
|
|
910
908
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -944,7 +942,7 @@ export function registerMutationCommands(program) {
|
|
|
944
942
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
945
943
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
946
944
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
947
|
-
const { runFiles } = await
|
|
945
|
+
const { runFiles } = await import("./commands/files.js");
|
|
948
946
|
const result = await runFiles(id, {
|
|
949
947
|
add: addValues,
|
|
950
948
|
addGlob: addGlobValues,
|
|
@@ -979,7 +977,7 @@ export function registerMutationCommands(program) {
|
|
|
979
977
|
.action(async (id, options, command) => {
|
|
980
978
|
const globalOptions = getGlobalOptions(command);
|
|
981
979
|
const startedAt = Date.now();
|
|
982
|
-
const { runFilesDiscover } = await
|
|
980
|
+
const { runFilesDiscover } = await import("./commands/files.js");
|
|
983
981
|
const result = await runFilesDiscover(id, {
|
|
984
982
|
apply: Boolean(options.apply),
|
|
985
983
|
note: typeof options.note === "string" ? options.note : undefined,
|
|
@@ -1017,7 +1015,7 @@ export function registerMutationCommands(program) {
|
|
|
1017
1015
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
1018
1016
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
1019
1017
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
1020
|
-
const { runDocs } = await
|
|
1018
|
+
const { runDocs } = await import("./commands/docs.js");
|
|
1021
1019
|
const result = await runDocs(id, {
|
|
1022
1020
|
add: addValues,
|
|
1023
1021
|
addGlob: addGlobValues,
|
|
@@ -1049,7 +1047,7 @@ export function registerMutationCommands(program) {
|
|
|
1049
1047
|
.action(async (id, options, command) => {
|
|
1050
1048
|
const globalOptions = getGlobalOptions(command);
|
|
1051
1049
|
const startedAt = Date.now();
|
|
1052
|
-
const { runDeps } = await
|
|
1050
|
+
const { runDeps } = await import("./commands/deps.js");
|
|
1053
1051
|
const result = await runDeps(id, {
|
|
1054
1052
|
format: typeof options.format === "string" ? options.format : undefined,
|
|
1055
1053
|
maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : undefined,
|
|
@@ -1063,4 +1061,4 @@ export function registerMutationCommands(program) {
|
|
|
1063
1061
|
});
|
|
1064
1062
|
}
|
|
1065
1063
|
//# sourceMappingURL=register-mutation.js.map
|
|
1066
|
-
//# debugId=
|
|
1064
|
+
//# debugId=b543912f-51ff-52d3-8834-ad927ad85fe4
|