@unbrained/pm-cli 2026.6.11 → 2026.6.12
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 +28 -0
- package/dist/cli/commands/completion.js +20 -8
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/create.js +6 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +2 -0
- package/dist/cli/commands/docs.js +2 -2
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.d.ts +2 -0
- package/dist/cli/commands/files.js +2 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/health.d.ts +1 -1
- package/dist/cli/commands/health.js +77 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +36 -0
- package/dist/cli/commands/history-repair.js +68 -3
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +3 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +18 -0
- package/dist/cli/commands/linked-artifacts.js +26 -3
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +6 -0
- package/dist/cli/commands/plan.js +93 -32
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +20 -0
- package/dist/cli/commands/validate.js +292 -28
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-mutation.js +47 -16
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +10 -2
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +16 -16
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{chunk-P2PSODAQ.js → chunk-35P4GT6E.js} +110 -9
- package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js → chunk-37CYVF73.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js → chunk-7AMK6DOW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js.map → chunk-7AMK6DOW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js → chunk-AX4GEVQC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js.map → chunk-AX4GEVQC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js +187 -0
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js +217 -0
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PSD7F7DX.js → chunk-KBPQHXWG.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-KBPQHXWG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js → chunk-L5EPZQIC.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js +220 -0
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UOO6BYIA.js → chunk-PNYAAB4S.js} +21 -188
- package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js +190 -0
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCSCXBGT.js → chunk-R4VWYWRN.js} +19 -193
- package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js → chunk-SO55HRA5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FXRU333M.js → chunk-UIG4TW2H.js} +110 -9
- package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E5DUIJA4.js → chunk-WPDMBIX6.js} +16 -3
- package/dist/cli-bundle/chunks/chunk-WPDMBIX6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js → chunk-XWMF3POR.js} +2 -2
- package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js → contracts-2G66IGIA.js} +2 -2
- package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js → contracts-PJCHYSO5.js} +2 -2
- package/dist/cli-bundle/chunks/{create-IFA26O2I.js → create-5433DP3G.js} +2 -2
- package/dist/cli-bundle/chunks/{create-JVXYHYH4.js → create-VWLWS34Z.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-5WMBVQT2.js → docs-I3BAF5WH.js} +4 -4
- package/dist/cli-bundle/chunks/docs-I3BAF5WH.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-MB53UJAJ.js → docs-MXLGZUIT.js} +3 -3
- package/dist/cli-bundle/chunks/docs-MXLGZUIT.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-GVMNVLCB.js → files-FYP3MDPX.js} +3 -3
- package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-DLB5LJEP.js → files-GUXUM2MB.js} +4 -4
- package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-2WEPW6D6.js → gc-FENB2ESG.js} +12 -174
- package/dist/cli-bundle/chunks/gc-FENB2ESG.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-4Z3IKHAZ.js → gc-KGQG66SA.js} +10 -179
- package/dist/cli-bundle/chunks/gc-KGQG66SA.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-YO5LRWN4.js → health-7MTXAVR2.js} +71 -4
- package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-4ZYB3IYQ.js → health-E4D7KGHD.js} +72 -5
- package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-KVPFJKOS.js → history-repair-OSQOKJ3E.js} +61 -3
- package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-RUGKD3YR.js → history-repair-SBK7P34V.js} +62 -4
- package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-VNUG3WZZ.js → plan-2YTQYWGM.js} +52 -12
- package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-FQLMJRLZ.js → plan-7IVSICR6.js} +51 -11
- package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js → register-list-query-4UPMHONX.js} +3 -3
- package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js → register-list-query-7VOW2C3W.js} +3 -3
- package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js → register-mutation-FARSGYRD.js} +43 -26
- package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js.map → register-mutation-FARSGYRD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js → register-mutation-LJDNVREU.js} +44 -27
- package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js.map → register-mutation-LJDNVREU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-AM6KTWB6.js → register-operations-FFTYAL42.js} +17 -13
- package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js → register-operations-HCJKDUA6.js} +16 -12
- package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js.map → register-operations-HCJKDUA6.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-IKX5524L.js → register-setup-6AVIUOCC.js} +19 -19
- package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-G4QYI3RX.js → register-setup-KVNLO5OJ.js} +18 -18
- package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-2EVXOC7V.js → update-36JM7YZT.js} +3 -3
- package/dist/cli-bundle/chunks/{update-5A2B6QYB.js → update-I246PCLO.js} +3 -3
- package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js → update-many-F4IKDWZB.js} +3 -3
- package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js → update-many-NTWZ5YT3.js} +3 -3
- package/dist/cli-bundle/chunks/{validate-EQTT6WVX.js → validate-46KCRHL7.js} +448 -36
- package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-XN4I4DPL.js → validate-CRFMPTYD.js} +468 -35
- package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +7 -0
- package/dist/cli-bundle/main.js +24 -10
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/diagnostics/remediation.js +19 -6
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +31 -0
- package/dist/core/lock/lock-gc.js +120 -62
- package/dist/core/lock/lock-gc.js.map +1 -1
- package/dist/core/telemetry/consent.js +18 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +130 -0
- package/dist/core/validate/fix-planning.js +202 -0
- package/dist/core/validate/fix-planning.js.map +1 -0
- package/dist/core/validate/missing-by-type.d.ts +21 -0
- package/dist/core/validate/missing-by-type.js +39 -0
- package/dist/core/validate/missing-by-type.js.map +1 -0
- package/dist/core/validate/stale-file-classification.d.ts +41 -0
- package/dist/core/validate/stale-file-classification.js +73 -0
- package/dist/core/validate/stale-file-classification.js.map +1 -0
- package/dist/mcp/server.js +41 -8
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +6 -1
- package/dist/sdk/cli-contracts.js +74 -7
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/docs/AGENT_GUIDE.md +6 -1
- package/docs/COMMANDS.md +23 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/chunk-E5DUIJA4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LCSCXBGT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PSD7F7DX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-5WMBVQT2.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-MB53UJAJ.js.map +0 -7
- package/dist/cli-bundle/chunks/files-DLB5LJEP.js.map +0 -1
- package/dist/cli-bundle/chunks/files-GVMNVLCB.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-2WEPW6D6.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-4Z3IKHAZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +0 -1
- package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-KVPFJKOS.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-RUGKD3YR.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-FQLMJRLZ.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-VNUG3WZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-G4QYI3RX.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-IKX5524L.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-EQTT6WVX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-XN4I4DPL.js.map +0 -7
- /package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js.map → chunk-37CYVF73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js.map → chunk-L5EPZQIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js.map → chunk-SO55HRA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js.map → chunk-XWMF3POR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js.map → contracts-2G66IGIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js.map → contracts-PJCHYSO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-IFA26O2I.js.map → create-5433DP3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JVXYHYH4.js.map → create-VWLWS34Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js.map → register-list-query-4UPMHONX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js.map → register-list-query-7VOW2C3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2EVXOC7V.js.map → update-36JM7YZT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-5A2B6QYB.js.map → update-I246PCLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js.map → update-many-F4IKDWZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js.map → update-many-NTWZ5YT3.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-setup.js","sources":["cli/register-setup.ts"],"sourceRoot":"/","sourcesContent":["import type { Command } from \"commander\";\nimport fs from \"node:fs/promises\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport {\n collect,\n getGlobalOptions,\n printError,\n printResult,\n} from \"./registration-helpers.js\";\n\n\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"reload\"\n | \"doctor\"\n | \"catalog\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\ntype LifecycleCommandVocabulary = \"extension\" | \"package\";\n\nfunction normalizeExtensionOptions(\n options: Record<string, unknown>,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Record<string, unknown> {\n const isForcedAction = (action: ExtensionSubcommandAction): boolean => forcedAction === action;\n const readBoolean = (...keys: string[]): boolean => keys.some((key) => options[key] === true);\n const readString = (...keys: string[]): string | undefined => {\n for (const key of keys) {\n if (typeof options[key] === \"string\") {\n return options[key] as string;\n }\n }\n return undefined;\n };\n return {\n init: isForcedAction(\"init\") || readBoolean(\"init\"),\n scaffold: readBoolean(\"scaffold\"),\n install: isForcedAction(\"install\") || readBoolean(\"install\"),\n uninstall: isForcedAction(\"uninstall\") || readBoolean(\"uninstall\"),\n explore: isForcedAction(\"explore\") || readBoolean(\"explore\", \"list\"),\n manage: isForcedAction(\"manage\") || readBoolean(\"manage\"),\n reload: isForcedAction(\"reload\") || readBoolean(\"reload\"),\n doctor: isForcedAction(\"doctor\") || readBoolean(\"doctor\"),\n catalog: isForcedAction(\"catalog\") || readBoolean(\"catalog\"),\n adopt: isForcedAction(\"adopt\") || readBoolean(\"adopt\"),\n adoptAll: isForcedAction(\"adopt-all\") || readBoolean(\"adoptAll\", \"adopt_all\", \"adopt-all\"),\n activate: isForcedAction(\"activate\") || readBoolean(\"activate\"),\n deactivate: isForcedAction(\"deactivate\") || readBoolean(\"deactivate\"),\n project: readBoolean(\"project\"),\n local: readBoolean(\"local\"),\n global: readBoolean(\"global\"),\n gh: readString(\"gh\"),\n github: readString(\"github\"),\n ref: readString(\"ref\"),\n fields: readString(\"fields\"),\n detail: readString(\"detail\"),\n trace: readBoolean(\"trace\"),\n watch: readBoolean(\"watch\"),\n runtimeProbe: readBoolean(\"runtimeProbe\", \"runtime_probe\", \"runtime-probe\"),\n fixManagedState: readBoolean(\"fixManagedState\", \"fix_managed_state\", \"fix-managed-state\"),\n strictExit: readBoolean(\"strictExit\", \"strict_exit\", \"strict-exit\"),\n failOnWarn: readBoolean(\"failOnWarn\", \"fail_on_warn\", \"fail-on-warn\"),\n vocabulary,\n };\n}\n\nasync function looksLikeShellExpandedWildcard(targets: string[]): Promise<boolean> {\n if (targets.length <= 1) {\n return false;\n }\n const visibleEntries = (await fs.readdir(process.cwd()))\n .filter((entry) => !entry.startsWith(\".\"))\n .sort((left, right) => left.localeCompare(right));\n const normalizedTargets = [...targets].sort((left, right) => left.localeCompare(right));\n return (\n visibleEntries.length === normalizedTargets.length &&\n visibleEntries.every((entry, index) => entry === normalizedTargets[index])\n );\n}\n\nasync function normalizeInstallTargets(targets: string[] | string | undefined): Promise<string | undefined> {\n const normalizedTargets = (Array.isArray(targets) ? targets : typeof targets === \"string\" ? [targets] : [])\n .map((target) => target.trim())\n .filter((target) => target.length > 0);\n if (normalizedTargets.length <= 1) {\n return normalizedTargets[0];\n }\n if (await looksLikeShellExpandedWildcard(normalizedTargets)) {\n return \"*\";\n }\n throw new PmCliError(\n `Install accepts one package source at a time. To install bundled first-party packages, quote the wildcard: pm install '*'`,\n EXIT_CODE.USAGE,\n );\n}\n\nasync function executeExtensionCommand(\n target: string | undefined,\n options: Record<string, unknown>,\n command: Command,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Promise<void> {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const normalizedOptions = normalizeExtensionOptions(options, forcedAction, vocabulary);\n const { runExtension } = await import(\"./commands/extension.js\");\n const result = await runExtension(target, normalizedOptions, globalOptions);\n printResult(result, globalOptions);\n const strictExit = Boolean(normalizedOptions.strictExit) || Boolean(normalizedOptions.failOnWarn);\n if (result.action === \"doctor\" && strictExit) {\n const detailsRecord = result.details as Record<string, unknown>;\n const summary = (detailsRecord.summary ?? null) as Record<string, unknown> | null;\n const summaryStatus = summary && typeof summary.status === \"string\" ? summary.status : undefined;\n const shouldFail = summaryStatus ? summaryStatus !== \"ok\" : result.warnings.length > 0;\n if (shouldFail) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n }\n if (globalOptions.profile) {\n printError(`profile:command=extension took_ms=${Date.now() - startedAt}`);\n }\n}\n\nfunction addExtensionScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project extension scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global extension scope\");\n}\n\nfunction addPackageScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project package scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global package scope\");\n}\n\nfunction addLifecycleScopeOptions<T extends Command>(command: T, vocabulary: LifecycleCommandVocabulary): T {\n return vocabulary === \"package\" ? addPackageScopeOptions(command) : addExtensionScopeOptions(command);\n}\n\nfunction registerLifecycleCommand(\n program: Command,\n vocabulary: LifecycleCommandVocabulary,\n): void {\n const noun = vocabulary === \"package\" ? \"package\" : \"extension\";\n const plural = vocabulary === \"package\" ? \"packages\" : \"extensions\";\n const commandName = vocabulary;\n const lifecycleCommand = program\n .command(commandName)\n .argument(\"[target]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source/name or scaffold target path (for --init/--scaffold)`)\n .option(\"--init\", `Generate a starter ${noun} scaffold at target path`)\n .option(\"--scaffold\", \"Alias for --init\")\n .option(\"--install\", `Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source`)\n .option(\"--uninstall\", `Uninstall an installed ${noun}`)\n .option(\"--explore\", `List discovered ${plural} in selected scope`)\n .option(\"--list\", \"Alias for --explore\")\n .option(\"--manage\", `List managed ${plural} with update-check metadata`)\n .option(\"--reload\", `Reload ${plural} with cache-busted module imports`)\n .option(\"--watch\", \"Use watch mode with --reload\")\n .option(\"--doctor\", `Run consolidated ${noun} diagnostics (summary/deep modes)`)\n .option(\"--catalog\", `List bundled first-party ${noun} catalog metadata`)\n .option(\"--adopt\", `Adopt an existing unmanaged ${noun} into managed metadata`)\n .option(\"--adopt-all\", `Adopt all unmanaged ${plural} into managed metadata`)\n .option(\"--activate\", `Activate a ${noun} in selected scope settings`)\n .option(\"--deactivate\", `Deactivate a ${noun} in selected scope settings`)\n .option(\"--project\", `Use project ${noun} scope (default)`)\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", `Use global ${noun} scope`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .option(\"--detail <mode>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} diagnostics detail mode (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(\n vocabulary === \"package\"\n ? \"Manage package lifecycle operations for project or global scope. Backward-compatible with extension packages.\"\n : \"Manage extension lifecycle operations for project or global scope.\",\n )\n .action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, undefined, vocabulary);\n });\n\n if (vocabulary === \"package\") {\n lifecycleCommand.alias(\"packages\");\n }\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"init\")\n .alias(\"scaffold\")\n .argument(\"<target>\", `Scaffold target directory path`)\n .description(\n vocabulary === \"package\"\n ? \"Generate a starter package scaffold with package metadata, manifest, and entrypoint.\"\n : \"Generate a starter extension scaffold with manifest and entrypoint.\",\n ),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"init\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"install\")\n .argument(\"[targets...]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source (local path, bundled alias, npm: source, wildcard, or GitHub source)`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(`Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source.`),\n vocabulary,\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"install\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"uninstall\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Uninstall an installed ${noun}.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"uninstall\", vocabulary);\n });\n\n addLifecycleScopeOptions(lifecycleCommand.command(\"explore\").description(`List discovered ${plural} in selected scope.`), vocabulary).action(\n async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"explore\", vocabulary);\n },\n );\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"manage\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .description(`List managed ${plural} with update-check metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"manage\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"reload\")\n .option(\"--watch\", \"Use watch mode for repeated reload checks\")\n .description(`Reload ${plural} with cache-busted module imports.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"reload\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"doctor\")\n .option(\"--detail <mode>\", `Detail mode for ${noun} diagnostics (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(`Run consolidated ${noun} diagnostics (summary/deep modes).`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"doctor\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"catalog\")\n .alias(\"list\")\n .option(\"--fields <value>\", \"Render compact comma-separated catalog fields, for example: alias,installed,install_command\")\n .description(`List bundled first-party ${noun} catalog metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"catalog\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"adopt\")\n .argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`)\n .option(\"--gh <owner/repo[/path]>\", `GitHub provenance shorthand for adopted ${noun}`)\n .option(\"--github <owner/repo[/path]>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub shorthand source\")\n .description(`Adopt an existing unmanaged ${noun} into managed metadata.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"adopt\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"adopt-all\").description(`Adopt all unmanaged ${plural} into managed metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"adopt-all\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"activate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Activate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"activate\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"deactivate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Deactivate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"deactivate\", vocabulary);\n });\n}\n\nexport function registerSetupCommands(program: Command): void {\n program\n .command(\"init\")\n .argument(\"[prefix]\", \"Optional id prefix\")\n .option(\"--preset <value>\", \"Governance preset for new setups: minimal|default|strict\")\n .option(\"--defaults\", \"Use non-interactive setup defaults without opening the wizard\")\n .option(\"-y, --yes\", \"Alias for --defaults (non-interactive setup)\")\n .option(\"--author <value>\", \"Set the default mutation author for this project\")\n .option(\"--agent-guidance <mode>\", \"Agent guidance mode: ask|add|skip|status\")\n .option(\"--type-preset <name>\", \"Register domain item types during init: agile|ops|research\")\n .option(\"--with-packages\", \"Install all bundled first-party packages during initialization\")\n .option(\"--force\", \"Allow initializing tracker files directly in a directory that looks like a workspace root\")\n .option(\"--verbose\", \"Include the full resolved settings tree in the output (default output is a concise summary)\")\n .description(\"Initialize pm storage and defaults for the current workspace.\")\n .action(async (prefix: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runInit, summarizeInitResult } = await import(\"./commands/init.js\");\n const result = await runInit(\n prefix,\n globalOptions,\n {\n preset: typeof options.preset === \"string\" ? options.preset : undefined,\n defaults: options.defaults === true || options.yes === true,\n author: typeof options.author === \"string\" ? options.author : undefined,\n agentGuidance: typeof options.agentGuidance === \"string\" ? options.agentGuidance : undefined,\n typePreset: typeof options.typePreset === \"string\" ? options.typePreset : undefined,\n withPackages: options.withPackages === true,\n force: options.force === true,\n },\n );\n // Default (toon) output is a concise summary to minimize agent token cost.\n // --json consumers and --verbose both receive the full settings tree.\n const verbose = options.verbose === true;\n const emitFullTree = verbose || globalOptions.json === true;\n printResult(emitFullTree ? result : summarizeInitResult(result), globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=init took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"config\")\n .argument(\"[scope]\", \"Config scope: project|global, or action shorthand list|export|get|set for project scope\")\n .argument(\"[action]\", \"Config action: get|set|list|export\")\n .argument(\n \"[key]\",\n \"Config key for get|set: definition-of-done|item-format|history-missing-stream-policy|sprint-release-format-policy|parent-reference-policy|metadata-validation-profile|metadata-required-fields|lifecycle-stale-blocker-reason-patterns|lifecycle-closure-like-blocked-reason-patterns|lifecycle-closure-like-resolution-patterns|lifecycle-closure-like-actual-result-patterns|governance-preset|governance-ownership-enforcement|governance-create-mode-default|governance-close-validation-default|governance-require-close-reason|governance-parent-reference-policy|governance-metadata-validation-profile|governance-force-required-for-stale-lock|test-result-tracking|telemetry-tracking|context\",\n )\n .argument(\n \"[value]\",\n \"Optional value for set: routed to the right typed flag by key (e.g. config set telemetry-tracking off, config set item-format toon, config set definition-of-done \\\"Tests pass\\\"). Equivalent to --policy/--format/--criterion. context keys still require --default-depth/--section-* flags.\",\n )\n .option(\n \"--criterion <text>\",\n \"Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)\",\n collect,\n )\n .option(\"--clear-criteria\", \"Clear criteria-list keys for config set operations\")\n .option(\"--format <value>\", \"Item format for item-format key: toon\")\n .option(\n \"--policy <value>\",\n \"Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; test-result-tracking=enabled|disabled; telemetry-tracking=enabled|disabled\",\n )\n .option(\n \"--value <value>\",\n \"Value for nested leaf settings keys (search_provider, search_mutation_refresh_policy, search_query_expansion_enabled, search_rerank_enabled, openai_base_url, ollama_model, vector_store_adapter, vector_store_collection_name, qdrant_url, lancedb_path, etc.). Equivalent to the positional value.\",\n )\n .option(\"--default-depth <value>\", \"Context default depth: brief|standard|deep\")\n .option(\"--activity-limit <n>\", \"Context default activity limit\")\n .option(\"--stale-threshold-days <n>\", \"Context staleness cutoff in days\")\n .option(\"--section-hierarchy <value>\", \"Enable/disable context hierarchy section (true|false)\")\n .option(\"--section-activity <value>\", \"Enable/disable context activity section (true|false)\")\n .option(\"--section-progress <value>\", \"Enable/disable context progress section (true|false)\")\n .option(\"--section-blockers <value>\", \"Enable/disable context blockers section (true|false)\")\n .option(\"--section-files <value>\", \"Enable/disable context files section (true|false)\")\n .option(\"--section-workload <value>\", \"Enable/disable context workload section (true|false)\")\n .option(\"--section-staleness <value>\", \"Enable/disable context staleness section (true|false)\")\n .option(\"--section-tests <value>\", \"Enable/disable context tests section (true|false)\")\n .description(\"Read or update pm settings for the current workspace or global profile.\")\n .action(async (scope: string | undefined, action: string | undefined, key: string | undefined, value: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const criteria = Array.isArray(options.criterion) ? (options.criterion as string[]) : [];\n const { runConfig } = await import(\"./commands/config.js\");\n const actionShorthands = new Set([\"get\", \"set\", \"list\", \"export\"]);\n const scopeShorthand = scope !== undefined && actionShorthands.has(scope);\n const resolvedScope = scopeShorthand ? \"project\" : (scope ?? \"project\");\n const resolvedAction = scopeShorthand ? scope : (action ?? \"list\");\n // When scope is an action shorthand, positionals shift left by one:\n // [set] [key] [value] -> action=set, key=key, value=value.\n const resolvedKey = scopeShorthand ? action : key;\n const resolvedValue = scopeShorthand ? key : value;\n const result = await runConfig(\n resolvedScope,\n resolvedAction,\n resolvedKey,\n {\n criterion: criteria,\n format: typeof options.format === \"string\" ? options.format : undefined,\n policy: typeof options.policy === \"string\" ? options.policy : undefined,\n value: typeof options.value === \"string\" ? options.value : undefined,\n clearCriteria: options.clearCriteria === true,\n defaultDepth: typeof options.defaultDepth === \"string\" ? options.defaultDepth : undefined,\n activityLimit: typeof options.activityLimit === \"string\" ? options.activityLimit : undefined,\n staleThresholdDays: typeof options.staleThresholdDays === \"string\" ? options.staleThresholdDays : undefined,\n sectionHierarchy: typeof options.sectionHierarchy === \"string\" ? options.sectionHierarchy : undefined,\n sectionActivity: typeof options.sectionActivity === \"string\" ? options.sectionActivity : undefined,\n sectionProgress: typeof options.sectionProgress === \"string\" ? options.sectionProgress : undefined,\n sectionBlockers: typeof options.sectionBlockers === \"string\" ? options.sectionBlockers : undefined,\n sectionFiles: typeof options.sectionFiles === \"string\" ? options.sectionFiles : undefined,\n sectionWorkload: typeof options.sectionWorkload === \"string\" ? options.sectionWorkload : undefined,\n sectionStaleness: typeof options.sectionStaleness === \"string\" ? options.sectionStaleness : undefined,\n sectionTests: typeof options.sectionTests === \"string\" ? options.sectionTests : undefined,\n },\n globalOptions,\n typeof resolvedValue === \"string\" ? resolvedValue : undefined,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=config took_ms=${Date.now() - startedAt}`);\n }\n });\n\n registerLifecycleCommand(program, \"extension\");\n registerLifecycleCommand(program, \"package\");\n\n addPackageScopeOptions(\n program\n .command(\"install\")\n .argument(\"[targets...]\", \"Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)\")\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(\"Install a pm package into the project package scope by default.\"),\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"install\", \"package\");\n });\n\n addPackageScopeOptions(\n program\n .command(\"upgrade\")\n .argument(\"[target]\", \"Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages\")\n .option(\"--dry-run\", \"Plan CLI/package upgrades without running npm or reinstalling packages\")\n .option(\"--cli-only\", \"Upgrade only the pm CLI/SDK npm package\")\n .option(\"--packages-only\", \"Upgrade only managed pm packages\")\n .option(\"--repair\", \"Force npm global reinstall when upgrading the pm CLI/SDK\")\n .option(\"--tag <value>\", \"npm dist-tag/version for CLI and registry package upgrades\")\n .option(\"--package-name <value>\", \"Override the CLI package name for self-upgrade testing\")\n .description(\"Upgrade the pm CLI/SDK and refresh managed installable pm packages.\"),\n ).action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runUpgrade } = await import(\"./commands/upgrade.js\");\n const result = await runUpgrade(target, command.opts() as Record<string, unknown>, globalOptions);\n printResult(result, globalOptions);\n if (!result.ok) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n if (globalOptions.profile) {\n printError(`profile:command=upgrade took_ms=${Date.now() - startedAt}`);\n }\n });\n}\n"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M,CAAC,WAAW,EAAE,wEAAwE,CAAC;SAC7F,MAAM,CAAC,YAAY,EAAE,yCAAyC,CAAC;SAC/D,MAAM,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;SAC7D,MAAM,CAAC,UAAU,EAAE,0DAA0D,CAAC;SAC9E,MAAM,CAAC,eAAe,EAAE,4DAA4D,CAAC;SACrF,MAAM,CAAC,wBAAwB,EAAE,wDAAwD,CAAC;SAC1F,WAAW,CAAC,qEAAqE,CAAC,CACtF,CAAC,MAAM,CAAC,KAAK,EAAE,MAA0B,EAAE,QAAiC,EAAE,OAAO,EAAE,EAAE;QACxF,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAA6B,EAAE,aAAa,CAAC,CAAC;QAClG,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,eAAe,CAAC;QAC/C,CAAC;QACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;YAC1B,UAAU,CAAC,mCAAmC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","debugId":"61cd745c-79c9-5f28-a919-47449b1def3e"}
|
|
1
|
+
{"version":3,"file":"register-setup.js","sources":["cli/register-setup.ts"],"sourceRoot":"/","sourcesContent":["import type { Command } from \"commander\";\nimport fs from \"node:fs/promises\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport {\n collect,\n getGlobalOptions,\n printError,\n printResult,\n} from \"./registration-helpers.js\";\n\n\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"reload\"\n | \"doctor\"\n | \"catalog\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\ntype LifecycleCommandVocabulary = \"extension\" | \"package\";\n\nfunction normalizeExtensionOptions(\n options: Record<string, unknown>,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Record<string, unknown> {\n const isForcedAction = (action: ExtensionSubcommandAction): boolean => forcedAction === action;\n const readBoolean = (...keys: string[]): boolean => keys.some((key) => options[key] === true);\n const readString = (...keys: string[]): string | undefined => {\n for (const key of keys) {\n if (typeof options[key] === \"string\") {\n return options[key] as string;\n }\n }\n return undefined;\n };\n return {\n init: isForcedAction(\"init\") || readBoolean(\"init\"),\n scaffold: readBoolean(\"scaffold\"),\n install: isForcedAction(\"install\") || readBoolean(\"install\"),\n uninstall: isForcedAction(\"uninstall\") || readBoolean(\"uninstall\"),\n explore: isForcedAction(\"explore\") || readBoolean(\"explore\", \"list\"),\n manage: isForcedAction(\"manage\") || readBoolean(\"manage\"),\n reload: isForcedAction(\"reload\") || readBoolean(\"reload\"),\n doctor: isForcedAction(\"doctor\") || readBoolean(\"doctor\"),\n catalog: isForcedAction(\"catalog\") || readBoolean(\"catalog\"),\n adopt: isForcedAction(\"adopt\") || readBoolean(\"adopt\"),\n adoptAll: isForcedAction(\"adopt-all\") || readBoolean(\"adoptAll\", \"adopt_all\", \"adopt-all\"),\n activate: isForcedAction(\"activate\") || readBoolean(\"activate\"),\n deactivate: isForcedAction(\"deactivate\") || readBoolean(\"deactivate\"),\n project: readBoolean(\"project\"),\n local: readBoolean(\"local\"),\n global: readBoolean(\"global\"),\n gh: readString(\"gh\"),\n github: readString(\"github\"),\n ref: readString(\"ref\"),\n fields: readString(\"fields\"),\n detail: readString(\"detail\"),\n trace: readBoolean(\"trace\"),\n watch: readBoolean(\"watch\"),\n runtimeProbe: readBoolean(\"runtimeProbe\", \"runtime_probe\", \"runtime-probe\"),\n fixManagedState: readBoolean(\"fixManagedState\", \"fix_managed_state\", \"fix-managed-state\"),\n strictExit: readBoolean(\"strictExit\", \"strict_exit\", \"strict-exit\"),\n failOnWarn: readBoolean(\"failOnWarn\", \"fail_on_warn\", \"fail-on-warn\"),\n vocabulary,\n };\n}\n\nasync function looksLikeShellExpandedWildcard(targets: string[]): Promise<boolean> {\n if (targets.length <= 1) {\n return false;\n }\n const visibleEntries = (await fs.readdir(process.cwd()))\n .filter((entry) => !entry.startsWith(\".\"))\n .sort((left, right) => left.localeCompare(right));\n const normalizedTargets = [...targets].sort((left, right) => left.localeCompare(right));\n return (\n visibleEntries.length === normalizedTargets.length &&\n visibleEntries.every((entry, index) => entry === normalizedTargets[index])\n );\n}\n\nasync function normalizeInstallTargets(targets: string[] | string | undefined): Promise<string | undefined> {\n const normalizedTargets = (Array.isArray(targets) ? targets : typeof targets === \"string\" ? [targets] : [])\n .map((target) => target.trim())\n .filter((target) => target.length > 0);\n if (normalizedTargets.length <= 1) {\n return normalizedTargets[0];\n }\n if (await looksLikeShellExpandedWildcard(normalizedTargets)) {\n return \"*\";\n }\n throw new PmCliError(\n `Install accepts one package source at a time. To install bundled first-party packages, quote the wildcard: pm install '*'`,\n EXIT_CODE.USAGE,\n );\n}\n\nasync function executeExtensionCommand(\n target: string | undefined,\n options: Record<string, unknown>,\n command: Command,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Promise<void> {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const normalizedOptions = normalizeExtensionOptions(options, forcedAction, vocabulary);\n const { runExtension } = await import(\"./commands/extension.js\");\n const result = await runExtension(target, normalizedOptions, globalOptions);\n printResult(result, globalOptions);\n const strictExit = Boolean(normalizedOptions.strictExit) || Boolean(normalizedOptions.failOnWarn);\n if (result.action === \"doctor\" && strictExit) {\n const detailsRecord = result.details as Record<string, unknown>;\n const summary = (detailsRecord.summary ?? null) as Record<string, unknown> | null;\n const summaryStatus = summary && typeof summary.status === \"string\" ? summary.status : undefined;\n const shouldFail = summaryStatus ? summaryStatus !== \"ok\" : result.warnings.length > 0;\n if (shouldFail) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n }\n if (globalOptions.profile) {\n printError(`profile:command=extension took_ms=${Date.now() - startedAt}`);\n }\n}\n\nfunction addExtensionScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project extension scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global extension scope\");\n}\n\nfunction addPackageScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project package scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global package scope\");\n}\n\nfunction addLifecycleScopeOptions<T extends Command>(command: T, vocabulary: LifecycleCommandVocabulary): T {\n return vocabulary === \"package\" ? addPackageScopeOptions(command) : addExtensionScopeOptions(command);\n}\n\nfunction registerLifecycleCommand(\n program: Command,\n vocabulary: LifecycleCommandVocabulary,\n): void {\n const noun = vocabulary === \"package\" ? \"package\" : \"extension\";\n const plural = vocabulary === \"package\" ? \"packages\" : \"extensions\";\n const commandName = vocabulary;\n const lifecycleCommand = program\n .command(commandName)\n .argument(\"[target]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source/name or scaffold target path (for --init/--scaffold)`)\n .option(\"--init\", `Generate a starter ${noun} scaffold at target path`)\n .option(\"--scaffold\", \"Alias for --init\")\n .option(\"--install\", `Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source`)\n .option(\"--uninstall\", `Uninstall an installed ${noun}`)\n .option(\"--explore\", `List discovered ${plural} in selected scope`)\n .option(\"--list\", \"Alias for --explore\")\n .option(\"--manage\", `List managed ${plural} with update-check metadata`)\n .option(\"--reload\", `Reload ${plural} with cache-busted module imports`)\n .option(\"--watch\", \"Use watch mode with --reload\")\n .option(\"--doctor\", `Run consolidated ${noun} diagnostics (summary/deep modes)`)\n .option(\"--catalog\", `List bundled first-party ${noun} catalog metadata`)\n .option(\"--adopt\", `Adopt an existing unmanaged ${noun} into managed metadata`)\n .option(\"--adopt-all\", `Adopt all unmanaged ${plural} into managed metadata`)\n .option(\"--activate\", `Activate a ${noun} in selected scope settings`)\n .option(\"--deactivate\", `Deactivate a ${noun} in selected scope settings`)\n .option(\"--project\", `Use project ${noun} scope (default)`)\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", `Use global ${noun} scope`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .option(\"--detail <mode>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} diagnostics detail mode (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(\n vocabulary === \"package\"\n ? \"Manage package lifecycle operations for project or global scope. Backward-compatible with extension packages.\"\n : \"Manage extension lifecycle operations for project or global scope.\",\n )\n .action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, undefined, vocabulary);\n });\n\n if (vocabulary === \"package\") {\n lifecycleCommand.alias(\"packages\");\n }\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"init\")\n .alias(\"scaffold\")\n .argument(\"<target>\", `Scaffold target directory path`)\n .description(\n vocabulary === \"package\"\n ? \"Generate a starter package scaffold with package metadata, manifest, and entrypoint.\"\n : \"Generate a starter extension scaffold with manifest and entrypoint.\",\n ),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"init\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"install\")\n .argument(\"[targets...]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source (local path, bundled alias, npm: source, wildcard, or GitHub source)`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(`Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source.`),\n vocabulary,\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"install\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"uninstall\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Uninstall an installed ${noun}.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"uninstall\", vocabulary);\n });\n\n addLifecycleScopeOptions(lifecycleCommand.command(\"explore\").description(`List discovered ${plural} in selected scope.`), vocabulary).action(\n async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"explore\", vocabulary);\n },\n );\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"manage\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .description(`List managed ${plural} with update-check metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"manage\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"reload\")\n .option(\"--watch\", \"Use watch mode for repeated reload checks\")\n .description(`Reload ${plural} with cache-busted module imports.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"reload\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"doctor\")\n .option(\"--detail <mode>\", `Detail mode for ${noun} diagnostics (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(`Run consolidated ${noun} diagnostics (summary/deep modes).`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"doctor\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"catalog\")\n .alias(\"list\")\n .option(\"--fields <value>\", \"Render compact comma-separated catalog fields, for example: alias,installed,install_command\")\n .description(`List bundled first-party ${noun} catalog metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"catalog\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"adopt\")\n .argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`)\n .option(\"--gh <owner/repo[/path]>\", `GitHub provenance shorthand for adopted ${noun}`)\n .option(\"--github <owner/repo[/path]>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub shorthand source\")\n .description(`Adopt an existing unmanaged ${noun} into managed metadata.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"adopt\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"adopt-all\").description(`Adopt all unmanaged ${plural} into managed metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.optsWithGlobals() as Record<string, unknown>, command, \"adopt-all\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"activate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Activate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"activate\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"deactivate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Deactivate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"deactivate\", vocabulary);\n });\n}\n\nexport function registerSetupCommands(program: Command): void {\n program\n .command(\"init\")\n .argument(\"[prefix]\", \"Optional id prefix\")\n .option(\"--preset <value>\", \"Governance preset for new setups: minimal|default|strict\")\n .option(\"--defaults\", \"Use non-interactive setup defaults without opening the wizard\")\n .option(\"-y, --yes\", \"Alias for --defaults (non-interactive setup)\")\n .option(\"--author <value>\", \"Set the default mutation author for this project\")\n .option(\"--agent-guidance <mode>\", \"Agent guidance mode: ask|add|skip|status\")\n .option(\"--type-preset <name>\", \"Register domain item types during init: agile|ops|research\")\n .option(\"--with-packages\", \"Install all bundled first-party packages during initialization\")\n .option(\"--force\", \"Allow initializing tracker files directly in a directory that looks like a workspace root\")\n .option(\"--verbose\", \"Include the full resolved settings tree in the output (default output is a concise summary)\")\n .description(\"Initialize pm storage and defaults for the current workspace.\")\n .action(async (prefix: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runInit, summarizeInitResult } = await import(\"./commands/init.js\");\n const result = await runInit(\n prefix,\n globalOptions,\n {\n preset: typeof options.preset === \"string\" ? options.preset : undefined,\n defaults: options.defaults === true || options.yes === true,\n author: typeof options.author === \"string\" ? options.author : undefined,\n agentGuidance: typeof options.agentGuidance === \"string\" ? options.agentGuidance : undefined,\n typePreset: typeof options.typePreset === \"string\" ? options.typePreset : undefined,\n withPackages: options.withPackages === true,\n force: options.force === true,\n },\n );\n // Default (toon) output is a concise summary to minimize agent token cost.\n // --json consumers and --verbose both receive the full settings tree.\n const verbose = options.verbose === true;\n const emitFullTree = verbose || globalOptions.json === true;\n printResult(emitFullTree ? result : summarizeInitResult(result), globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=init took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"config\")\n .argument(\"[scope]\", \"Config scope: project|global, or action shorthand list|export|get|set for project scope\")\n .argument(\"[action]\", \"Config action: get|set|list|export\")\n .argument(\n \"[key]\",\n \"Config key for get|set: definition-of-done|item-format|history-missing-stream-policy|sprint-release-format-policy|parent-reference-policy|metadata-validation-profile|metadata-required-fields|lifecycle-stale-blocker-reason-patterns|lifecycle-closure-like-blocked-reason-patterns|lifecycle-closure-like-resolution-patterns|lifecycle-closure-like-actual-result-patterns|governance-preset|governance-ownership-enforcement|governance-create-mode-default|governance-close-validation-default|governance-require-close-reason|governance-parent-reference-policy|governance-metadata-validation-profile|governance-force-required-for-stale-lock|test-result-tracking|telemetry-tracking|context\",\n )\n .argument(\n \"[value]\",\n \"Optional value for set: routed to the right typed flag by key (e.g. config set telemetry-tracking off, config set item-format toon, config set definition-of-done \\\"Tests pass\\\"). Equivalent to --policy/--format/--criterion. context keys still require --default-depth/--section-* flags.\",\n )\n .option(\n \"--criterion <text>\",\n \"Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)\",\n collect,\n )\n .option(\"--clear-criteria\", \"Clear criteria-list keys for config set operations\")\n .option(\"--format <value>\", \"Item format for item-format key: toon\")\n .option(\n \"--policy <value>\",\n \"Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; test-result-tracking=enabled|disabled; telemetry-tracking=enabled|disabled\",\n )\n .option(\n \"--value <value>\",\n \"Value for nested leaf settings keys (search_provider, search_mutation_refresh_policy, search_query_expansion_enabled, search_rerank_enabled, openai_base_url, ollama_model, vector_store_adapter, vector_store_collection_name, qdrant_url, lancedb_path, etc.). Equivalent to the positional value.\",\n )\n .option(\"--default-depth <value>\", \"Context default depth: brief|standard|deep\")\n .option(\"--activity-limit <n>\", \"Context default activity limit\")\n .option(\"--stale-threshold-days <n>\", \"Context staleness cutoff in days\")\n .option(\"--section-hierarchy <value>\", \"Enable/disable context hierarchy section (true|false)\")\n .option(\"--section-activity <value>\", \"Enable/disable context activity section (true|false)\")\n .option(\"--section-progress <value>\", \"Enable/disable context progress section (true|false)\")\n .option(\"--section-blockers <value>\", \"Enable/disable context blockers section (true|false)\")\n .option(\"--section-files <value>\", \"Enable/disable context files section (true|false)\")\n .option(\"--section-workload <value>\", \"Enable/disable context workload section (true|false)\")\n .option(\"--section-staleness <value>\", \"Enable/disable context staleness section (true|false)\")\n .option(\"--section-tests <value>\", \"Enable/disable context tests section (true|false)\")\n .description(\"Read or update pm settings for the current workspace or global profile.\")\n .action(async (scope: string | undefined, action: string | undefined, key: string | undefined, value: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const criteria = Array.isArray(options.criterion) ? (options.criterion as string[]) : [];\n const { runConfig } = await import(\"./commands/config.js\");\n const actionShorthands = new Set([\"get\", \"set\", \"list\", \"export\"]);\n const scopeShorthand = scope !== undefined && actionShorthands.has(scope);\n const resolvedScope = scopeShorthand ? \"project\" : (scope ?? \"project\");\n const resolvedAction = scopeShorthand ? scope : (action ?? \"list\");\n // When scope is an action shorthand, positionals shift left by one:\n // [set] [key] [value] -> action=set, key=key, value=value.\n const resolvedKey = scopeShorthand ? action : key;\n const resolvedValue = scopeShorthand ? key : value;\n const result = await runConfig(\n resolvedScope,\n resolvedAction,\n resolvedKey,\n {\n criterion: criteria,\n format: typeof options.format === \"string\" ? options.format : undefined,\n policy: typeof options.policy === \"string\" ? options.policy : undefined,\n value: typeof options.value === \"string\" ? options.value : undefined,\n clearCriteria: options.clearCriteria === true,\n defaultDepth: typeof options.defaultDepth === \"string\" ? options.defaultDepth : undefined,\n activityLimit: typeof options.activityLimit === \"string\" ? options.activityLimit : undefined,\n staleThresholdDays: typeof options.staleThresholdDays === \"string\" ? options.staleThresholdDays : undefined,\n sectionHierarchy: typeof options.sectionHierarchy === \"string\" ? options.sectionHierarchy : undefined,\n sectionActivity: typeof options.sectionActivity === \"string\" ? options.sectionActivity : undefined,\n sectionProgress: typeof options.sectionProgress === \"string\" ? options.sectionProgress : undefined,\n sectionBlockers: typeof options.sectionBlockers === \"string\" ? options.sectionBlockers : undefined,\n sectionFiles: typeof options.sectionFiles === \"string\" ? options.sectionFiles : undefined,\n sectionWorkload: typeof options.sectionWorkload === \"string\" ? options.sectionWorkload : undefined,\n sectionStaleness: typeof options.sectionStaleness === \"string\" ? options.sectionStaleness : undefined,\n sectionTests: typeof options.sectionTests === \"string\" ? options.sectionTests : undefined,\n },\n globalOptions,\n typeof resolvedValue === \"string\" ? resolvedValue : undefined,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=config took_ms=${Date.now() - startedAt}`);\n }\n });\n\n registerLifecycleCommand(program, \"extension\");\n registerLifecycleCommand(program, \"package\");\n\n addPackageScopeOptions(\n program\n .command(\"install\")\n .argument(\"[targets...]\", \"Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)\")\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(\"Install a pm package into the project package scope by default.\"),\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.optsWithGlobals() as Record<string, unknown>, command, \"install\", \"package\");\n });\n\n addPackageScopeOptions(\n program\n .command(\"upgrade\")\n .argument(\"[target]\", \"Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages\")\n .option(\"--dry-run\", \"Plan CLI/package upgrades without running npm or reinstalling packages\")\n .option(\"--cli-only\", \"Upgrade only the pm CLI/SDK npm package\")\n .option(\"--packages-only\", \"Upgrade only managed pm packages\")\n .option(\"--repair\", \"Force npm global reinstall when upgrading the pm CLI/SDK\")\n .option(\"--tag <value>\", \"npm dist-tag/version for CLI and registry package upgrades\")\n .option(\"--package-name <value>\", \"Override the CLI package name for self-upgrade testing\")\n .description(\"Upgrade the pm CLI/SDK and refresh managed installable pm packages.\"),\n ).action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runUpgrade } = await import(\"./commands/upgrade.js\");\n const result = await runUpgrade(target, command.opts() as Record<string, unknown>, globalOptions);\n printResult(result, globalOptions);\n if (!result.ok) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n if (globalOptions.profile) {\n printError(`profile:command=upgrade took_ms=${Date.now() - startedAt}`);\n }\n });\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AC;SACxH,MAAM,CAAC,WAAW,EAAE,wEAAwE,CAAC;SAC7F,MAAM,CAAC,YAAY,EAAE,yCAAyC,CAAC;SAC/D,MAAM,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;SAC7D,MAAM,CAAC,UAAU,EAAE,0DAA0D,CAAC;SAC9E,MAAM,CAAC,eAAe,EAAE,4DAA4D,CAAC;SACrF,MAAM,CAAC,wBAAwB,EAAE,wDAAwD,CAAC;SAC1F,WAAW,CAAC,qEAAqE,CAAC,CACtF,CAAC,MAAM,CAAC,KAAK,EAAE,MAA0B,EAAE,QAAiC,EAAE,OAAO,EAAE,EAAE;QACxF,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAA6B,EAAE,aAAa,CAAC,CAAC;QAClG,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,eAAe,CAAC;QAC/C,CAAC;QACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;YAC1B,UAAU,CAAC,mCAAmC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","debugId":"b7610d90-d136-582a-a1b9-bbfcc69cec6f"}
|
|
@@ -1094,7 +1094,7 @@ var TOOL_CONTEXT_OPTION_CONTRACTS = [
|
|
|
1094
1094
|
!(function() {
|
|
1095
1095
|
try {
|
|
1096
1096
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1097
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1097
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "94debfc3-fbc8-5417-83a4-05126242aa06");
|
|
1098
1098
|
} catch (e2) {
|
|
1099
1099
|
}
|
|
1100
1100
|
})();
|
|
@@ -1300,6 +1300,9 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1300
1300
|
strictExit: { type: "boolean" },
|
|
1301
1301
|
failOnWarn: { type: "boolean" },
|
|
1302
1302
|
fixHints: { type: "boolean" },
|
|
1303
|
+
autoFix: { type: "boolean" },
|
|
1304
|
+
fixScope: { type: "array", items: { type: "string", enum: ["metadata", "resolution", "lifecycle"] } },
|
|
1305
|
+
pruneMissing: { type: "boolean" },
|
|
1303
1306
|
checkHistoryDrift: { type: "boolean" },
|
|
1304
1307
|
checkCommandReferences: { type: "boolean" },
|
|
1305
1308
|
allowAuditNote: { type: "boolean" },
|
|
@@ -1309,6 +1312,7 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1309
1312
|
allowAuditDepUpdate: { type: "boolean" },
|
|
1310
1313
|
allowAuditRelease: { type: "boolean" },
|
|
1311
1314
|
dryRun: { type: "boolean" },
|
|
1315
|
+
all: { type: "boolean" },
|
|
1312
1316
|
cliOnly: { type: "boolean" },
|
|
1313
1317
|
packagesOnly: { type: "boolean" },
|
|
1314
1318
|
repair: { type: "boolean" },
|
|
@@ -1348,6 +1352,10 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1348
1352
|
discover: { type: "boolean" },
|
|
1349
1353
|
apply: { type: "boolean" },
|
|
1350
1354
|
discoveryNote: { type: "string" },
|
|
1355
|
+
// GH-170 (pm-pfnx): single-string note for files/docs add batches (the shared
|
|
1356
|
+
// `note` key below is the array-typed create/update note seed).
|
|
1357
|
+
addNote: { type: "string" },
|
|
1358
|
+
list: { type: "boolean" },
|
|
1351
1359
|
appendStable: { type: "boolean" },
|
|
1352
1360
|
validatePaths: { type: "boolean" },
|
|
1353
1361
|
audit: { type: "boolean" },
|
|
@@ -1419,6 +1427,9 @@ var PLAN_ACTION_PARAMETER_PROPERTIES = {
|
|
|
1419
1427
|
claim: { type: "boolean" },
|
|
1420
1428
|
fromSearch: { type: "string" },
|
|
1421
1429
|
stepTitle: { type: "string" },
|
|
1430
|
+
// pm-6mit: ordered step titles for create (string or array; values are never
|
|
1431
|
+
// comma-split). On step subcommands a single value aliases stepTitle.
|
|
1432
|
+
step: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
|
|
1422
1433
|
stepBody: { type: "string" },
|
|
1423
1434
|
stepOwner: { type: "string" },
|
|
1424
1435
|
stepStatus: { type: "string", enum: [...PLAN_STEP_STATUS_VALUES] },
|
|
@@ -1470,6 +1481,10 @@ var PLAN_ACTION_PARAMETER_METADATA = {
|
|
|
1470
1481
|
description: "Plan lifecycle mode.",
|
|
1471
1482
|
examples: ["draft", "research", "approved"]
|
|
1472
1483
|
},
|
|
1484
|
+
step: {
|
|
1485
|
+
description: "Ordered initial step titles for create (string or array, never comma-split; stepTitle, when also set, becomes the first step). For step subcommands a single value aliases stepTitle.",
|
|
1486
|
+
examples: [["Read the code", "Write the fix", "Run the tests"]]
|
|
1487
|
+
},
|
|
1473
1488
|
file: {
|
|
1474
1489
|
description: "File link to attach while creating or materializing a Plan.",
|
|
1475
1490
|
examples: ["path=src/cli.ts,note=implementation surface"]
|
|
@@ -1804,6 +1819,9 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
1804
1819
|
dryRun: {
|
|
1805
1820
|
description: "Preview command effects without mutating storage artifacts."
|
|
1806
1821
|
},
|
|
1822
|
+
all: {
|
|
1823
|
+
description: "For history-repair action: scan every stream for drift and repair each drifted stream in one audited pass (mutually exclusive with id)."
|
|
1824
|
+
},
|
|
1807
1825
|
gcScope: {
|
|
1808
1826
|
description: "Repeatable gc scope selector values (index, embeddings, runtime, locks).",
|
|
1809
1827
|
examples: [["index", "embeddings"], ["runtime"], ["locks"]]
|
|
@@ -1918,6 +1936,16 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
1918
1936
|
fixHints: {
|
|
1919
1937
|
description: "For validate action, add a machine-executable fix_hints[] of pm commands to each failing check's details."
|
|
1920
1938
|
},
|
|
1939
|
+
autoFix: {
|
|
1940
|
+
description: "For validate action, apply the safe, deterministic subset of fix-hint remediations (field backfills) automatically; combine with dryRun to preview and fixScope to grant gated scopes."
|
|
1941
|
+
},
|
|
1942
|
+
fixScope: {
|
|
1943
|
+
description: "For validate action, grant --auto-fix scopes (metadata, resolution, lifecycle). Defaults to the safe scopes metadata and resolution; lifecycle must be named explicitly.",
|
|
1944
|
+
examples: [["lifecycle"], ["metadata", "resolution"]]
|
|
1945
|
+
},
|
|
1946
|
+
pruneMissing: {
|
|
1947
|
+
description: "For validate action, remove stale linked-file/doc LINKS whose paths classified as deleted (link removal only \u2014 never touches real files); honors dryRun."
|
|
1948
|
+
},
|
|
1921
1949
|
checkHistoryDrift: {
|
|
1922
1950
|
description: "Run item/history hash drift checks."
|
|
1923
1951
|
},
|
|
@@ -1966,6 +1994,14 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
1966
1994
|
description: "Note attached to file links added by files discovery.",
|
|
1967
1995
|
examples: ["discovered from item text"]
|
|
1968
1996
|
},
|
|
1997
|
+
addNote: {
|
|
1998
|
+
description: "Note attached to every link added by add/addGlob in this call (per-entry embedded note= wins; requires add or addGlob). Maps to the CLI --note flag on pm files/pm docs.",
|
|
1999
|
+
examples: ["command wiring"]
|
|
2000
|
+
},
|
|
2001
|
+
list: {
|
|
2002
|
+
description: "When true for files/docs action, list the current linked paths without mutating them.",
|
|
2003
|
+
examples: [true]
|
|
2004
|
+
},
|
|
1969
2005
|
stream: {
|
|
1970
2006
|
description: "Stream selector: test-runs logs accepts stdout|stderr|both; activity accepts boolean/rows|ndjson|jsonl for line-delimited output.",
|
|
1971
2007
|
examples: ["stderr", "stdout", "both", "rows", "ndjson", "jsonl", true]
|
|
@@ -2097,7 +2133,7 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
2097
2133
|
!(function() {
|
|
2098
2134
|
try {
|
|
2099
2135
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2100
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2136
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0e11d981-3bc2-5584-b783-ee213f7395ba");
|
|
2101
2137
|
} catch (e2) {
|
|
2102
2138
|
}
|
|
2103
2139
|
})();
|
|
@@ -2282,6 +2318,9 @@ var FILES_FLAG_CONTRACTS = [
|
|
|
2282
2318
|
{ flag: "--add-glob" },
|
|
2283
2319
|
{ flag: "--remove" },
|
|
2284
2320
|
{ flag: "--migrate" },
|
|
2321
|
+
// GH-170 (pm-pfnx): single-value note applied to every --add/--add-glob link
|
|
2322
|
+
// in the invocation (embedded note= wins; usage error without an add).
|
|
2323
|
+
{ flag: "--note" },
|
|
2285
2324
|
{ flag: "--list" },
|
|
2286
2325
|
{ flag: "--append-stable" },
|
|
2287
2326
|
{ flag: "--validate-paths" },
|
|
@@ -2295,6 +2334,9 @@ var DOCS_FLAG_CONTRACTS = [
|
|
|
2295
2334
|
{ flag: "--add-glob" },
|
|
2296
2335
|
{ flag: "--remove" },
|
|
2297
2336
|
{ flag: "--migrate" },
|
|
2337
|
+
// GH-170 (pm-pfnx): see FILES_FLAG_CONTRACTS --note.
|
|
2338
|
+
{ flag: "--note" },
|
|
2339
|
+
{ flag: "--list" },
|
|
2298
2340
|
{ flag: "--validate-paths" },
|
|
2299
2341
|
{ flag: "--audit" },
|
|
2300
2342
|
{ flag: "--author" },
|
|
@@ -2319,6 +2361,7 @@ var HISTORY_REDACT_FLAG_CONTRACTS = [
|
|
|
2319
2361
|
{ flag: "--force" }
|
|
2320
2362
|
];
|
|
2321
2363
|
var HISTORY_REPAIR_FLAG_CONTRACTS = [
|
|
2364
|
+
{ flag: "--all" },
|
|
2322
2365
|
{ flag: "--dry-run" },
|
|
2323
2366
|
{ flag: "--author" },
|
|
2324
2367
|
{ flag: "--message" },
|
|
@@ -2360,7 +2403,12 @@ var PLAN_FLAG_CONTRACTS = [
|
|
|
2360
2403
|
{ flag: "--body" },
|
|
2361
2404
|
{ flag: "--claim" },
|
|
2362
2405
|
{ flag: "--from-search", aliases: ["--from_search"] },
|
|
2363
|
-
{ flag: "--step-title", aliases: ["--
|
|
2406
|
+
{ flag: "--step-title", aliases: ["--step_title"] },
|
|
2407
|
+
// pm-6mit: --step is a Commander collect repeatable (ordered step titles on
|
|
2408
|
+
// create; single-value stepTitle alias elsewhere). It must NOT be list:true —
|
|
2409
|
+
// the bootstrap coalescer comma-joins list flags and would corrupt titles
|
|
2410
|
+
// containing commas.
|
|
2411
|
+
{ flag: "--step" },
|
|
2364
2412
|
{ flag: "--step-body", aliases: ["--step_body"] },
|
|
2365
2413
|
{ flag: "--step-owner", aliases: ["--step_owner"] },
|
|
2366
2414
|
{ flag: "--step-status", aliases: ["--step_status"] },
|
|
@@ -2703,6 +2751,13 @@ var VALIDATE_FLAG_CONTRACTS = [
|
|
|
2703
2751
|
{ flag: "--strict-exit" },
|
|
2704
2752
|
{ flag: "--fail-on-warn" },
|
|
2705
2753
|
{ flag: "--fix-hints" },
|
|
2754
|
+
{ flag: "--auto-fix" },
|
|
2755
|
+
{ flag: "--dry-run" },
|
|
2756
|
+
// NOT list:true — repeatable via Commander's collector; the bootstrap
|
|
2757
|
+
// coalescer must not comma-join occurrences (values may also be
|
|
2758
|
+
// comma-separated lists which the resolver splits itself).
|
|
2759
|
+
{ flag: "--fix-scope" },
|
|
2760
|
+
{ flag: "--prune-missing" },
|
|
2706
2761
|
{ flag: "--check-history-drift" },
|
|
2707
2762
|
{ flag: "--check-command-references" }
|
|
2708
2763
|
];
|
|
@@ -3563,8 +3618,9 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3563
3618
|
anyOfRequired: [["literal"], ["regex"]]
|
|
3564
3619
|
},
|
|
3565
3620
|
"history-repair": {
|
|
3566
|
-
|
|
3567
|
-
optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
|
|
3621
|
+
// Exactly one of `id` (single stream) or `all` (bulk drift repair) is required.
|
|
3622
|
+
optional: ["id", "all", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
|
|
3623
|
+
oneOfRequired: [["id"], ["all"]]
|
|
3568
3624
|
},
|
|
3569
3625
|
"history-compact": {
|
|
3570
3626
|
required: ["id"],
|
|
@@ -3606,6 +3662,7 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3606
3662
|
"claim",
|
|
3607
3663
|
"fromSearch",
|
|
3608
3664
|
"stepTitle",
|
|
3665
|
+
"step",
|
|
3609
3666
|
"stepBody",
|
|
3610
3667
|
"stepOwner",
|
|
3611
3668
|
"stepStatus",
|
|
@@ -3685,6 +3742,10 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3685
3742
|
"addGlob",
|
|
3686
3743
|
"remove",
|
|
3687
3744
|
"migrate",
|
|
3745
|
+
// GH-170 (pm-pfnx): `addNote` is the MCP spelling of the CLI --note flag
|
|
3746
|
+
// (the shared `note` parameter is the array-typed create/update note
|
|
3747
|
+
// seed, so files/docs use a distinct single-string key).
|
|
3748
|
+
"addNote",
|
|
3688
3749
|
"discover",
|
|
3689
3750
|
"apply",
|
|
3690
3751
|
"discoveryNote",
|
|
@@ -3692,11 +3753,23 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3692
3753
|
"validatePaths",
|
|
3693
3754
|
"audit",
|
|
3694
3755
|
...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
|
|
3695
|
-
]
|
|
3756
|
+
],
|
|
3757
|
+
dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }]
|
|
3696
3758
|
},
|
|
3697
3759
|
docs: {
|
|
3698
3760
|
required: ["id"],
|
|
3699
|
-
optional: [
|
|
3761
|
+
optional: [
|
|
3762
|
+
"add",
|
|
3763
|
+
"addGlob",
|
|
3764
|
+
"remove",
|
|
3765
|
+
"migrate",
|
|
3766
|
+
"addNote",
|
|
3767
|
+
"list",
|
|
3768
|
+
"validatePaths",
|
|
3769
|
+
"audit",
|
|
3770
|
+
...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
|
|
3771
|
+
],
|
|
3772
|
+
dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }]
|
|
3700
3773
|
},
|
|
3701
3774
|
deps: { required: ["id"], optional: ["format", "maxDepth", "collapse", "summary"] },
|
|
3702
3775
|
test: {
|
|
@@ -3802,6 +3875,10 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3802
3875
|
"strictExit",
|
|
3803
3876
|
"failOnWarn",
|
|
3804
3877
|
"fixHints",
|
|
3878
|
+
"autoFix",
|
|
3879
|
+
"dryRun",
|
|
3880
|
+
"fixScope",
|
|
3881
|
+
"pruneMissing",
|
|
3805
3882
|
"checkHistoryDrift",
|
|
3806
3883
|
"checkCommandReferences"
|
|
3807
3884
|
]
|
|
@@ -3882,6 +3959,16 @@ function buildActionScopedToolSchema(action) {
|
|
|
3882
3959
|
required: [...requiredFields]
|
|
3883
3960
|
}));
|
|
3884
3961
|
}
|
|
3962
|
+
if (contract.oneOfRequired && contract.oneOfRequired.length > 0) {
|
|
3963
|
+
schema.oneOf = contract.oneOfRequired.map((requiredFields) => {
|
|
3964
|
+
const otherFields = contract.oneOfRequired?.flat().filter((field) => !requiredFields.includes(field)) ?? [];
|
|
3965
|
+
return {
|
|
3966
|
+
required: [...requiredFields],
|
|
3967
|
+
...otherFields.length > 0 ? { not: { anyOf: otherFields.map((field) => ({ required: [field] })) } } : {},
|
|
3968
|
+
...action === "history-repair" && requiredFields.includes("all") ? { properties: { all: { const: true } } } : {}
|
|
3969
|
+
};
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3885
3972
|
if (contract.conditionalRequired && contract.conditionalRequired.length > 0) {
|
|
3886
3973
|
schema.allOf = contract.conditionalRequired.map((entry) => ({
|
|
3887
3974
|
if: {
|
|
@@ -3895,6 +3982,20 @@ function buildActionScopedToolSchema(action) {
|
|
|
3895
3982
|
}
|
|
3896
3983
|
}));
|
|
3897
3984
|
}
|
|
3985
|
+
if (contract.dependentAnyOfRequired && contract.dependentAnyOfRequired.length > 0) {
|
|
3986
|
+
const allOf = Array.isArray(schema.allOf) ? [...schema.allOf] : [];
|
|
3987
|
+
for (const entry of contract.dependentAnyOfRequired) {
|
|
3988
|
+
allOf.push({
|
|
3989
|
+
if: { required: [entry.property] },
|
|
3990
|
+
then: {
|
|
3991
|
+
anyOf: entry.anyOfRequired.map((requiredFields) => ({
|
|
3992
|
+
required: [...requiredFields]
|
|
3993
|
+
}))
|
|
3994
|
+
}
|
|
3995
|
+
});
|
|
3996
|
+
}
|
|
3997
|
+
schema.allOf = allOf;
|
|
3998
|
+
}
|
|
3898
3999
|
return schema;
|
|
3899
4000
|
}
|
|
3900
4001
|
function createLazyContractSchema(build) {
|
|
@@ -3913,7 +4014,7 @@ function createLazyContractSchema(build) {
|
|
|
3913
4014
|
}
|
|
3914
4015
|
});
|
|
3915
4016
|
}
|
|
3916
|
-
var PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.
|
|
4017
|
+
var PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.3";
|
|
3917
4018
|
var PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
|
|
3918
4019
|
var PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.0.0";
|
|
3919
4020
|
var PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
|
|
@@ -4062,4 +4163,4 @@ export {
|
|
|
4062
4163
|
resolveSubcommandFlagContractsForCommand,
|
|
4063
4164
|
PM_TOOL_PARAMETERS_SCHEMA
|
|
4064
4165
|
};
|
|
4065
|
-
//# sourceMappingURL=chunk-
|
|
4166
|
+
//# sourceMappingURL=chunk-35P4GT6E.js.map
|