@unbrained/pm-cli 2026.10.24 → 2026.10.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/dist/cli/error-guidance.js +2 -2
  4. package/dist/cli/extension-command-help.js +2 -2
  5. package/dist/cli/register-history-activity.js +1 -1
  6. package/dist/cli-bundle/bundle-manifest.json +1 -1
  7. package/dist/cli-bundle/chunks/{chunk-R7KWBFM2.js → chunk-3CYXE6BV.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-444VPGQT.js +20 -0
  9. package/dist/cli-bundle/chunks/{chunk-YEI4N4A6.js → chunk-4GD6QOP6.js} +21 -21
  10. package/dist/cli-bundle/chunks/{chunk-HZNFNETE.js → chunk-5ZPT67NJ.js} +6 -6
  11. package/dist/cli-bundle/chunks/{chunk-KGZGXC7T.js → chunk-7C3GCLOO.js} +29 -29
  12. package/dist/cli-bundle/chunks/{chunk-3VI4XDP2.js → chunk-7T3H24HN.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-MA7SNKYK.js → chunk-EYCVAAIP.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-CDR5ES7Q.js → chunk-FNZT4BTE.js} +38 -34
  15. package/dist/cli-bundle/chunks/{chunk-CNEUJHA4.js → chunk-HMJSFWHK.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-ZDVTXLA6.js → chunk-LNKPH2DD.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-Z62RXNHW.js → chunk-MVJGGCGQ.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-3S5FLCG7.js → chunk-O3ZTGRIH.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-FASDGYQC.js → chunk-RD6UW3MW.js} +3 -3
  20. package/dist/cli-bundle/chunks/{chunk-UY5UHI4I.js → chunk-RLXK2S7P.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-URZB3USE.js → chunk-RQKDANP7.js} +42 -42
  22. package/dist/cli-bundle/chunks/chunk-TLMXSYJA.js +2 -0
  23. package/dist/cli-bundle/chunks/{chunk-4PNAUT2E.js → chunk-UI3FD3DW.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-VSSHB6XI.js → chunk-VAEB6IUQ.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-TZYQ4JDZ.js → chunk-XYLBOXSH.js} +6 -6
  26. package/dist/cli-bundle/chunks/{chunk-CSE47ZAN.js → chunk-YCCGZHOR.js} +2 -2
  27. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-XANVELIV.js → indexed-receipt-blobs-47I6KKDO.js} +2 -2
  28. package/dist/cli-bundle/chunks/{mutation-admission-NVTBZ7DH.js → mutation-admission-747C6IUR.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-list-query-2FE6K7FQ.js → register-list-query-COST6KRV.js} +3 -3
  30. package/dist/cli-bundle/chunks/{register-mutation-KZXQUZUH.js → register-mutation-JZVVJUHY.js} +2 -2
  31. package/dist/cli-bundle/chunks/register-operations-S4LKLUBJ.js +2 -0
  32. package/dist/cli-bundle/chunks/{register-setup-P3VLCTDY.js → register-setup-3ITZXPOL.js} +2 -2
  33. package/dist/cli-bundle/chunks/{settlement-hook-YUVCO65H.js → settlement-hook-5IVCF6ZY.js} +2 -2
  34. package/dist/cli-bundle/chunks/stage-3UUIYROS.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-JYXA4JIP.js → chunk-22727JYL.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-RVUGTIIU.js → chunk-3FM75SBJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-RSEGFZTY.js → chunk-3M5FZCMC.js} +54 -54
  38. package/dist/cli-bundle/focused-chunks/{chunk-BUZ2Z4P3.js → chunk-46KDJH3K.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-5LBZR6YW.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-SHUPX6G2.js → chunk-74KC7FUQ.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-77NU7NPN.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-NX7TVNUM.js → chunk-7DEZT4JN.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-ES2NGVHZ.js → chunk-B5JOVH5F.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-HMYDUEQK.js +8 -0
  45. package/dist/cli-bundle/focused-chunks/chunk-IVLIUPVV.js +12 -0
  46. package/dist/cli-bundle/focused-chunks/{chunk-X5YRJMAY.js → chunk-KIIGME23.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-IUAYTD2S.js → chunk-LWJ2X75I.js} +24 -24
  48. package/dist/cli-bundle/focused-chunks/{chunk-SBJ2IKTH.js → chunk-MT5TYMEU.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-7RQOFHMH.js → chunk-NC5HUGHU.js} +3 -3
  50. package/dist/cli-bundle/focused-chunks/chunk-NI5SG2M2.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-ZMWLV2CE.js → chunk-QH5KMIYZ.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-POLMFGPQ.js → chunk-U6HXIF6G.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-6HJCSHBG.js → chunk-URWYYJ7K.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-5MKNVJCM.js → chunk-W7MCCFYV.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-AGCEWJ27.js → chunk-WMPDY5ZU.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-R536272H.js → chunk-Y4JHHY24.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-TAHSXKAT.js → chunk-ZYCOMRFT.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-FVOA3XMI.js → indexed-receipt-blobs-YCLN2ZZG.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{mutation-admission-PB6YFY7S.js → mutation-admission-BQBQXILV.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{settlement-hook-2VXEB6PP.js → settlement-hook-XVS6P2XI.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/stage-VSIL4MTZ.js +2 -0
  62. package/dist/cli-bundle/main.js +19 -19
  63. package/dist/cli-bundle/sdk-authoring.js +1 -1
  64. package/dist/cli-bundle/sdk-contracts.js +2 -2
  65. package/dist/cli-bundle/sdk-core.js +15 -15
  66. package/dist/cli-bundle/sdk-governance.js +1 -1
  67. package/dist/cli-bundle/sdk-graph.js +1 -1
  68. package/dist/cli-bundle/sdk-merge.js +55 -56
  69. package/dist/cli-bundle/sdk-query.js +1 -1
  70. package/dist/cli-bundle/sdk-runtime.js +1 -1
  71. package/dist/cli-bundle/sdk-testing.js +1 -1
  72. package/dist/cli-bundle/sdk.js +3 -3
  73. package/dist/core/diagnostics/remediation.js +1 -1
  74. package/dist/core/shared/errors.d.ts +13 -0
  75. package/dist/core/shared/errors.js +1 -1
  76. package/dist/core/store/settings.js +2 -2
  77. package/dist/sdk/agent/command-recovery.js +1 -1
  78. package/dist/sdk/cli-contracts/commander-types.js +1 -1
  79. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  80. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  81. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  82. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
  83. package/dist/sdk/cli-contracts/registration-helpers.d.ts +2 -0
  84. package/dist/sdk/cli-contracts/registration-helpers.js +2 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  86. package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
  87. package/dist/sdk/completion/fish.js +3 -1
  88. package/dist/sdk/completion/zsh.js +3 -1
  89. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  90. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  91. package/dist/sdk/governance/health-merge-evidence.d.ts +5 -0
  92. package/dist/sdk/governance/health-merge-evidence.js +1 -1
  93. package/dist/sdk/governance/health.js +1 -1
  94. package/dist/sdk/index.d.ts +1 -1
  95. package/dist/sdk/index.js +1 -1
  96. package/dist/sdk/merge/history-scalar-rebase.d.ts +9 -0
  97. package/dist/sdk/merge/history-scalar-rebase.js +2 -0
  98. package/dist/sdk/merge/ignored-artifacts.d.ts +13 -0
  99. package/dist/sdk/merge/ignored-artifacts.js +2 -0
  100. package/dist/sdk/merge/stage.js +1 -1
  101. package/dist/sdk/merge/three-way.js +1 -1
  102. package/dist/sdk/public-surface.json +1 -1
  103. package/dist/sdk/query/activity.d.ts +14 -2
  104. package/dist/sdk/query/activity.js +1 -1
  105. package/dist/sdk/query/calendar.d.ts +16 -0
  106. package/dist/sdk/query/calendar.js +3 -3
  107. package/dist/sdk/query/context.js +2 -2
  108. package/dist/sdk/query/get.js +1 -1
  109. package/dist/sdk/query/list.js +1 -1
  110. package/dist/sdk/query/search-contracts.js +1 -1
  111. package/dist/sdk/query/window-pagination.d.ts +20 -0
  112. package/dist/sdk/query/window-pagination.js +2 -0
  113. package/dist/sdk/read-output-contracts.js +1 -1
  114. package/dist/sdk/runtime.d.ts +1 -1
  115. package/dist/sdk/runtime.js +1 -1
  116. package/dist/sdk/schema-migration.js +2 -2
  117. package/dist/sdk/templates.d.ts +7 -1
  118. package/dist/sdk/templates.js +2 -2
  119. package/docs/COMMANDS.md +19 -1
  120. package/docs/EXTENSIONS.md +1 -1
  121. package/docs/MERGE_SAFETY.md +28 -0
  122. package/docs/SDK.md +85 -6
  123. package/docs/generated/FLAG_LEXICON_BUDGETS.md +2 -2
  124. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +5 -3
  125. package/marketplace.json +1 -1
  126. package/package.json +1 -1
  127. package/packages/pm-beads/package.json +1 -1
  128. package/packages/pm-calendar/extensions/calendar/index.ts +6 -0
  129. package/packages/pm-calendar/package.json +1 -1
  130. package/packages/pm-command-kit/package.json +1 -1
  131. package/packages/pm-digital-twin/package.json +1 -1
  132. package/packages/pm-governance-audit/package.json +1 -1
  133. package/packages/pm-guide-shell/package.json +1 -1
  134. package/packages/pm-kanban/package.json +1 -1
  135. package/packages/pm-lifecycle-hooks/package.json +1 -1
  136. package/packages/pm-linked-test-adapters/package.json +1 -1
  137. package/packages/pm-search-advanced/package.json +1 -1
  138. package/packages/pm-templates/extensions/templates/runtime.ts +3 -1
  139. package/packages/pm-templates/package.json +1 -1
  140. package/packages/pm-todos/package.json +1 -1
  141. package/packages/pm-vcs/package.json +1 -1
  142. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  143. package/plugins/pm-claude/package.json +1 -1
  144. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  145. package/plugins/pm-codex/package.json +1 -1
  146. package/plugins/pm-codex/plugin.json +1 -1
  147. package/runtime-dependencies.json +1 -1
  148. package/dist/cli-bundle/chunks/chunk-VPMQEVU6.js +0 -20
  149. package/dist/cli-bundle/chunks/register-operations-BOCBWNKJ.js +0 -2
  150. package/dist/cli-bundle/chunks/stage-WRDTMCCF.js +0 -2
  151. package/dist/cli-bundle/focused-chunks/chunk-3QYTS4OY.js +0 -12
  152. package/dist/cli-bundle/focused-chunks/chunk-CEEOWDB7.js +0 -8
  153. package/dist/cli-bundle/focused-chunks/chunk-GXAXDPD4.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-NFFPNMTH.js +0 -2
  155. package/dist/cli-bundle/focused-chunks/chunk-XTYEASIY.js +0 -2
  156. package/dist/cli-bundle/focused-chunks/stage-MQE4PFWT.js +0 -2
@@ -1,4 +1,4 @@
1
- (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ac2020a4-78bf-5aa3-a5c4-88d3196dfb1f")}catch{}})();import{assertInitializedTracker}from"./environment/tracker-preflight.js";import fs from"node:fs/promises";import path from"node:path";import{pathExists,readFileIfExists}from"../core/fs/fs-utils.js";import{writeWorkspaceJsonWithHistory}from"../core/history/workspace-history.js";import{resolveAuthor}from"../core/shared/author.js";import{EXIT_CODE}from"../core/shared/constants.js";import{PmCliError}from"../core/shared/errors.js";import{nowIso}from"../core/shared/time.js";import{resolvePmRoot}from"../core/store/paths.js";import{readSettings}from"../core/store/settings.js";import{CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS}from"./cli-contracts.js";const TEMPLATE_DIRECTORY_NAME="templates",TEMPLATE_FILE_EXTENSION=".json",TEMPLATE_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,TEMPLATE_OPTION_REPEATABLE_KEYS=CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.map(entry=>entry.target).filter(target=>target!=="acceptanceCriteria"),TEMPLATE_OPTION_REPEATABLE_KEY_SET=new Set(TEMPLATE_OPTION_REPEATABLE_KEYS),BUILTIN_TEMPLATE_TIMESTAMP="1970-01-01T00:00:00.000Z",BUILTIN_TEMPLATES={bug:{type:"Issue",priority:"1",tags:"bug",acceptanceCriteria:"Bug no longer reproduces with the steps below and a regression test guards it.",expectedResult:"Describe the correct behavior.",actualResult:"Describe the observed (buggy) behavior.",body:`## Repro steps
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e476a2f-8735-53e9-88c3-b43bfc34e1f5")}catch{}})();import{assertInitializedTracker}from"./environment/tracker-preflight.js";import fs from"node:fs/promises";import path from"node:path";import{pathExists,readFileIfExists}from"../core/fs/fs-utils.js";import{writeWorkspaceJsonWithHistory}from"../core/history/workspace-history.js";import{resolveAuthor}from"../core/shared/author.js";import{EXIT_CODE}from"../core/shared/constants.js";import{PmCliError}from"../core/shared/errors.js";import{nowIso}from"../core/shared/time.js";import{resolvePriority}from"../core/item/priority.js";import{resolvePmRoot}from"../core/store/paths.js";import{readSettings}from"../core/store/settings.js";import{CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS}from"./cli-contracts.js";const TEMPLATE_DIRECTORY_NAME="templates",TEMPLATE_FILE_EXTENSION=".json",TEMPLATE_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,TEMPLATE_OPTION_REPEATABLE_KEYS=CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.map(entry=>entry.target).filter(target=>target!=="acceptanceCriteria"),TEMPLATE_OPTION_REPEATABLE_KEY_SET=new Set(TEMPLATE_OPTION_REPEATABLE_KEYS),BUILTIN_TEMPLATE_TIMESTAMP="1970-01-01T00:00:00.000Z",BUILTIN_TEMPLATES={bug:{type:"Issue",priority:"1",tags:"bug",acceptanceCriteria:"Bug no longer reproduces with the steps below and a regression test guards it.",expectedResult:"Describe the correct behavior.",actualResult:"Describe the observed (buggy) behavior.",body:`## Repro steps
2
2
  1.
3
3
  2.
4
4
  3.
@@ -22,6 +22,6 @@
22
22
  `},chore:{type:"Chore",priority:"3",tags:"chore",acceptanceCriteria:"Maintenance task done with no behavior change and green checks.",body:`## What
23
23
 
24
24
  ## Why
25
- `}},_testOnly={normalizeTemplateName,extractTemplateOptions,parseStoredTemplateDocument,builtinTemplateDocument,readStoredTemplateDocument};function normalizeTemplateName(rawName){const name=rawName.trim();if(!TEMPLATE_NAME_PATTERN.test(name))throw new PmCliError(`Invalid template name "${rawName}". Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._-]*.`,EXIT_CODE.USAGE);return name}function templatesDirectory(pmRoot){return path.join(pmRoot,TEMPLATE_DIRECTORY_NAME)}function templatePath(pmRoot,normalizedName){return path.join(templatesDirectory(pmRoot),`${normalizedName}${TEMPLATE_FILE_EXTENSION}`)}async function ensureTrackerInitialized(pmRoot){await assertInitializedTracker(pmRoot)}function sortTemplateOptions(options){return Object.fromEntries(Object.entries(options).sort(([left],[right])=>left.localeCompare(right)))}function extractTemplateOptions(rawOptions){const next={};for(const[key,value]of Object.entries(rawOptions))if(value!==void 0){if(TEMPLATE_OPTION_REPEATABLE_KEY_SET.has(key)){if(typeof value=="string"){next[key]=[value];continue}if(!Array.isArray(value))continue;const values=value.filter(entry=>typeof entry=="string");values.length>0&&(next[key]=values);continue}if(typeof value=="string"){next[key]=value;continue}Array.isArray(value)&&value.every(entry=>typeof entry=="string")&&(next[key]=[...value])}return sortTemplateOptions(next)}function parseStoredTemplateOptions(rawOptions,templateName){if(typeof rawOptions!="object"||rawOptions===null||Array.isArray(rawOptions))throw new PmCliError(`Template "${templateName}" has invalid options payload.`,EXIT_CODE.GENERIC_FAILURE);const optionsRecord=rawOptions,normalized={};for(const[key,value]of Object.entries(optionsRecord)){const normalizedKey=key.trim();if(normalizedKey.length===0)throw new PmCliError(`Template "${templateName}" contains an empty option key.`,EXIT_CODE.GENERIC_FAILURE);if(typeof value=="string"){normalized[normalizedKey]=value;continue}if(Array.isArray(value)&&value.every(entry=>typeof entry=="string")){normalized[normalizedKey]=[...value];continue}throw new PmCliError(`Template "${templateName}" contains invalid value for option "${normalizedKey}".`,EXIT_CODE.GENERIC_FAILURE)}return sortTemplateOptions(normalized)}function parseStoredTemplateDocument(raw,normalizedName){let parsed;try{parsed=JSON.parse(raw)}catch{throw new PmCliError(`Template "${normalizedName}" contains invalid JSON.`,EXIT_CODE.GENERIC_FAILURE)}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new PmCliError(`Template "${normalizedName}" has invalid document shape.`,EXIT_CODE.GENERIC_FAILURE);const record=parsed,options=parseStoredTemplateOptions(record.options,normalizedName),now=nowIso();return{name:typeof record.name=="string"&&record.name.trim().length>0?record.name.trim():normalizedName,created_at:typeof record.created_at=="string"?record.created_at:now,updated_at:typeof record.updated_at=="string"?record.updated_at:now,options}}function builtinTemplateDocument(normalizedName){const options=BUILTIN_TEMPLATES[normalizedName];return options?{name:normalizedName,created_at:BUILTIN_TEMPLATE_TIMESTAMP,updated_at:BUILTIN_TEMPLATE_TIMESTAMP,options:sortTemplateOptions({...options})}:null}async function resolveTemplateDocument(pmRoot,normalizedName){const raw=await readFileIfExists(templatePath(pmRoot,normalizedName));if(raw!==null)return{document:parseStoredTemplateDocument(raw,normalizedName),source:"user"};const builtin=builtinTemplateDocument(normalizedName);if(builtin)return{document:builtin,source:"builtin"};throw new PmCliError(`Template "${normalizedName}" not found`,EXIT_CODE.NOT_FOUND)}async function readStoredTemplateDocument(pmRoot,normalizedName){const raw=await readFileIfExists(templatePath(pmRoot,normalizedName));if(raw===null)throw new PmCliError(`Template "${normalizedName}" not found`,EXIT_CODE.NOT_FOUND);return parseStoredTemplateDocument(raw,normalizedName)}async function loadCreateTemplateOptions(pmRoot,rawTemplateName){const normalizedName=normalizeTemplateName(rawTemplateName),{document}=await resolveTemplateDocument(pmRoot,normalizedName);return document.options}async function runTemplatesSave(rawTemplateName,options,global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);await ensureTrackerInitialized(pmRoot);const normalizedName=normalizeTemplateName(rawTemplateName),nextOptions=extractTemplateOptions(options);if(Object.keys(nextOptions).length===0)throw new PmCliError("templates save requires at least one create option flag",EXIT_CODE.USAGE);const now=nowIso(),storedPath=templatePath(pmRoot,normalizedName);let createdAt=now;await pathExists(storedPath)&&(createdAt=(await readStoredTemplateDocument(pmRoot,normalizedName)).created_at);const document={name:normalizedName,created_at:createdAt,updated_at:now,options:nextOptions},settings=await readSettings(pmRoot);return await fs.mkdir(templatesDirectory(pmRoot),{recursive:!0}),await writeWorkspaceJsonWithHistory({pmRoot,filePath:storedPath,raw:`${JSON.stringify(document,null,2)}
25
+ `}},_testOnly={normalizeTemplateName,extractTemplateOptions,parseStoredTemplateDocument,builtinTemplateDocument,readStoredTemplateDocument};function normalizeTemplateName(rawName){const name=rawName.trim();if(!TEMPLATE_NAME_PATTERN.test(name))throw new PmCliError(`Invalid template name "${rawName}". Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._-]*.`,EXIT_CODE.USAGE);return name}function templatesDirectory(pmRoot){return path.join(pmRoot,TEMPLATE_DIRECTORY_NAME)}function templatePath(pmRoot,normalizedName){return path.join(templatesDirectory(pmRoot),`${normalizedName}${TEMPLATE_FILE_EXTENSION}`)}async function ensureTrackerInitialized(pmRoot){await assertInitializedTracker(pmRoot)}function sortTemplateOptions(options){return Object.fromEntries(Object.entries(options).sort(([left],[right])=>left.localeCompare(right)))}function extractTemplateOptions(rawOptions){const next={};for(const[key,value]of Object.entries(rawOptions))if(value!==void 0){if(key==="priority"){next[key]=String(resolvePriority(value));continue}if(TEMPLATE_OPTION_REPEATABLE_KEY_SET.has(key)){if(typeof value=="string"){next[key]=[value];continue}if(!Array.isArray(value))continue;const values=value.filter(entry=>typeof entry=="string");values.length>0&&(next[key]=values);continue}if(typeof value=="string"){next[key]=value;continue}Array.isArray(value)&&value.every(entry=>typeof entry=="string")&&(next[key]=[...value])}return sortTemplateOptions(next)}function parseStoredTemplateOptions(rawOptions,templateName){if(typeof rawOptions!="object"||rawOptions===null||Array.isArray(rawOptions))throw new PmCliError(`Template "${templateName}" has invalid options payload.`,EXIT_CODE.GENERIC_FAILURE);const optionsRecord=rawOptions,normalized={};for(const[key,value]of Object.entries(optionsRecord)){const normalizedKey=key.trim();if(normalizedKey.length===0)throw new PmCliError(`Template "${templateName}" contains an empty option key.`,EXIT_CODE.GENERIC_FAILURE);if(typeof value=="string"){normalized[normalizedKey]=value;continue}if(Array.isArray(value)&&value.every(entry=>typeof entry=="string")){normalized[normalizedKey]=[...value];continue}throw new PmCliError(`Template "${templateName}" contains invalid value for option "${normalizedKey}".`,EXIT_CODE.GENERIC_FAILURE)}return sortTemplateOptions(normalized)}function parseStoredTemplateDocument(raw,normalizedName){let parsed;try{parsed=JSON.parse(raw)}catch{throw new PmCliError(`Template "${normalizedName}" contains invalid JSON.`,EXIT_CODE.GENERIC_FAILURE)}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new PmCliError(`Template "${normalizedName}" has invalid document shape.`,EXIT_CODE.GENERIC_FAILURE);const record=parsed,options=parseStoredTemplateOptions(record.options,normalizedName),now=nowIso();return{name:typeof record.name=="string"&&record.name.trim().length>0?record.name.trim():normalizedName,created_at:typeof record.created_at=="string"?record.created_at:now,updated_at:typeof record.updated_at=="string"?record.updated_at:now,options}}function builtinTemplateDocument(normalizedName){const options=BUILTIN_TEMPLATES[normalizedName];return options?{name:normalizedName,created_at:BUILTIN_TEMPLATE_TIMESTAMP,updated_at:BUILTIN_TEMPLATE_TIMESTAMP,options:sortTemplateOptions({...options})}:null}async function resolveTemplateDocument(pmRoot,normalizedName){const raw=await readFileIfExists(templatePath(pmRoot,normalizedName));if(raw!==null)return{document:parseStoredTemplateDocument(raw,normalizedName),source:"user"};const builtin=builtinTemplateDocument(normalizedName);if(builtin)return{document:builtin,source:"builtin"};throw new PmCliError(`Template "${normalizedName}" not found`,EXIT_CODE.NOT_FOUND)}async function readStoredTemplateDocument(pmRoot,normalizedName){const raw=await readFileIfExists(templatePath(pmRoot,normalizedName));if(raw===null)throw new PmCliError(`Template "${normalizedName}" not found`,EXIT_CODE.NOT_FOUND);return parseStoredTemplateDocument(raw,normalizedName)}async function loadCreateTemplateOptions(pmRoot,rawTemplateName){const normalizedName=normalizeTemplateName(rawTemplateName),{document}=await resolveTemplateDocument(pmRoot,normalizedName);return document.options}async function runTemplatesSave(rawTemplateName,options,global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);await ensureTrackerInitialized(pmRoot);const normalizedName=normalizeTemplateName(rawTemplateName),nextOptions=extractTemplateOptions(options);if(Object.keys(nextOptions).length===0)throw new PmCliError("templates save requires at least one create option flag",EXIT_CODE.USAGE);const now=nowIso(),storedPath=templatePath(pmRoot,normalizedName);let createdAt=now;await pathExists(storedPath)&&(createdAt=(await readStoredTemplateDocument(pmRoot,normalizedName)).created_at);const document={name:normalizedName,created_at:createdAt,updated_at:now,options:nextOptions},settings=await readSettings(pmRoot);return await fs.mkdir(templatesDirectory(pmRoot),{recursive:!0}),await writeWorkspaceJsonWithHistory({pmRoot,filePath:storedPath,raw:`${JSON.stringify(document,null,2)}
26
26
  `,op:"templates:save",author:resolveAuthor(void 0,settings.author_default),lockTtlSeconds:settings.locks.ttl_seconds,lockWaitMs:settings.locks.wait_ms}),{name:document.name,created_at:document.created_at,updated_at:document.updated_at,path:storedPath,options:document.options}}async function readUserTemplateNames(pmRoot){const dirPath=templatesDirectory(pmRoot);return await pathExists(dirPath)?(await fs.readdir(dirPath)).filter(entry=>entry.toLowerCase().endsWith(TEMPLATE_FILE_EXTENSION)).map(entry=>entry.slice(0,-TEMPLATE_FILE_EXTENSION.length)).filter(entry=>TEMPLATE_NAME_PATTERN.test(entry)):[]}async function runTemplatesList(global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);await ensureTrackerInitialized(pmRoot);const userTemplates=await readUserTemplateNames(pmRoot),userTemplateSet=new Set(userTemplates),builtinTemplates=Object.keys(BUILTIN_TEMPLATES).filter(name=>!userTemplateSet.has(name)),sortedUser=[...userTemplates].sort((left,right)=>left.localeCompare(right)),sortedBuiltin=[...builtinTemplates].sort((left,right)=>left.localeCompare(right)),templates=[...new Set([...sortedUser,...sortedBuiltin])].sort((left,right)=>left.localeCompare(right));return{templates,count:templates.length,builtin_templates:sortedBuiltin,user_templates:sortedUser}}async function runTemplatesShow(rawTemplateName,global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);await ensureTrackerInitialized(pmRoot);const normalizedName=normalizeTemplateName(rawTemplateName),{document,source}=await resolveTemplateDocument(pmRoot,normalizedName);return{name:document.name,source,created_at:document.created_at,updated_at:document.updated_at,path:source==="builtin"?`builtin:${normalizedName}`:templatePath(pmRoot,normalizedName),options:document.options}}export{_testOnly,loadCreateTemplateOptions,runTemplatesList,runTemplatesSave,runTemplatesShow};
27
27
  //# sourceMappingURL=templates.js.map
package/docs/COMMANDS.md CHANGED
@@ -1041,6 +1041,14 @@ MCP tool via `options.fields`.
1041
1041
  `pm context --format ndjson` concatenates the bounded high-level, low-level, and blocked-fallback focus rows in deterministic ranking order. Like list/search NDJSON, it emits no wrapper and no trailing count object. SDK and MCP callers retain the structured arrays; package authors can use the exported `serializeNdjsonRows` primitive when their transport needs line framing.
1042
1042
 
1043
1043
  `calendar` defaults to markdown for human and agent readability. Other commands default to TOON unless configured otherwise.
1044
+ Calendar results publish matching `total_count`, returned `count`, zero-based
1045
+ `page_start`, remaining `omitted_count`, and `has_more`. `summary_scope` is
1046
+ `returned_rows`: summaries and day buckets cover this page. Repeat the original
1047
+ query with `--after <next_cursor>` to recover subsequent bounded pages; changing
1048
+ `--limit` is allowed. Relative bounds keep the first page's clock. Changed
1049
+ matching content refuses the cursor; restart without `--after`. With `--limit 0`,
1050
+ counts remain available; use `--limit 1` or larger to retrieve rows.
1051
+
1044
1052
  For `--include events` without explicit `--to`, `--recurrence-lookahead-days`, or `--occurrence-limit`, recurring expansion is intentionally capped to a bounded default window and emits a warning with retry hints for broader windows.
1045
1053
 
1046
1054
  ## Validation and Maintenance
@@ -1219,7 +1227,17 @@ as its compatibility spelling, `--full` for events with patch payloads, or
1219
1227
  `--provenance` for patch-free provenance rows. Every mode reports total and
1220
1228
  omitted row counts plus the applied bound. Use `--limit` for a deliberate cap,
1221
1229
  or `--unbounded` for an explicitly unlimited read; the two flags are mutually
1222
- exclusive.
1230
+ exclusive. Continue a limited result by repeating the same query with
1231
+ `--after <next_cursor>`; `page_start` gives the page offset and `omitted_count`
1232
+ counts rows remaining after that page. `window` publishes the original anchor,
1233
+ inclusive lower bound, and exclusive upper bound. Bounded reads pin an omitted
1234
+ upper bound to the first page's clock. Later writes outside that window are
1235
+ excluded. Changed filters, projection, workspace, or matching content refuse
1236
+ continuation; restart without `--after`. Digest rows join current metadata, so
1237
+ metadata changes may also require a restart. Continuation does not retain a
1238
+ persisted or atomic cross-file snapshot. Use `--from` for a starting timestamp;
1239
+ `--since` refusals suggest that correction. Use an envelope (for example `--json`
1240
+ without `--stream`) when paging: stream mode emits rows without cursor metadata.
1223
1241
  Workspace-scoped mutations to settings, schema, profiles, init state, and
1224
1242
  extension/package activation are recorded in
1225
1243
  `.agents/pm/history/_workspace.jsonl` using the same patch/hash format.
@@ -306,7 +306,7 @@ Use the public SDK barrel. Do not deep-import from `src/core` or `dist/core`.
306
306
  - `api.extension` is a read-only identity (`name`, `layer`, `version`, `capabilities`, `pm_min_version?`, `pm_max_version?`, `source_package?`) for self-identifying logs and version gating without re-reading the manifest.
307
307
  - `api.registerCommand(definition)` adds package-owned commands; `read_output` opts readers into the [SDK output contract](SDK.md#minimal-command-extension).
308
308
  - `api.registerFlags(command, flags)` adds runtime command flags. A flag may declare `value_type` (canonical; the legacy `type` alias is honored only when `value_type` is absent), `list: true` to accumulate repeated/comma-joined values like core `--tags`, a `default` applied when the flag is omitted, and `value_validation: "strict"` to refuse malformed `number`/`boolean` tokens before the handler runs (the default `"coerce"` forwards the raw token). See [Flag Contracts](SDK.md#flag-contracts).
309
- - `api.registerItemFields(fields)` adds custom metadata fields. Agents can set declared fields with repeatable `pm create --field name=value` and `pm update <id> --field name=value`; undeclared names are rejected. `SchemaFieldDefinition.type` is the same closed union used by `pm schema add-field`: `string | number | boolean | string_array | array | object`. Unsupported values fail at compile time for TypeScript authors and at activation for JavaScript packages, with a did-you-mean hint on typos. `string_array` is the repeatable string collection; `array` and `object` require JSON containers.
309
+ - `api.registerItemFields(fields)` adds custom metadata fields. Agents can set declared fields with repeatable `pm create --field name=value` and `pm update <id> --field name=value`; undeclared names are rejected. `SchemaFieldDefinition.type` is the same closed union used by `pm schema add-field`: `string | number | boolean | string_array | array | object`. Unsupported values fail at compile time for TypeScript authors and at activation for JavaScript packages, with a did-you-mean hint on typos. `string_array` is the repeatable string collection; `array` and `object` require JSON containers. Active fields support `get`, `list` and `search` projections with `--fields name` or `--fields item.name`, preserving declared value types through `PmClient` and CLI reads. Disabled packages do not contribute selectors. Tracked by [pm-gh1571](../.agents/pm/issues/pm-gh1571.toon).
310
310
  - Custom fields whose camel-case option name is already owned by a canonical MCP input remain usable through `options.<name>`, but authoring surfaces report the collision instead of allowing silent top-level shadowing. `pm schema add-field`, `pm profile lint`, and `pm package doctor` name the field, canonical `mcp_tool_input` owner, and nested recovery path. SDK authors can preflight the same rule with `resolvePmToolCustomFieldCollision`.
311
311
  - `api.registerItemTypes(types)` adds custom item types.
312
312
  - `api.registerRelationshipKinds(definitions)` adds validated graph semantics. Definitions declare direction, inverse spelling, ordering/precedence, hierarchy, cardinality, lifecycle, aliases, payload schema, compatibility version, and self-edge policy. Active definitions govern CLI, MCP, and SDK dependency mutation admission as well as workspace graph assembly; mutation aliases are stored canonically. Requires the `schema` capability and is governed by the `schema.relationshipkinds` policy surface. See [relationship mutation admission](RELATIONSHIP_GRAPH.md#contract), tracked by [pm-7dsolo](../.agents/pm/issues/pm-7dsolo.toon).
@@ -132,6 +132,10 @@ pm merge install --dry-run --json
132
132
 
133
133
  ## Artifact semantics
134
134
 
135
+ History scalar rebasing and ignored settlement artifacts are tracked by
136
+ [pm-gh1553](../.agents/pm/issues/pm-gh1553.toon) and
137
+ [pm-gh1556](../.agents/pm/issues/pm-gh1556.toon).
138
+
135
139
  | Artifact | Driver | Merge behavior |
136
140
  | ---------------------------------------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
137
141
  | Item `.toon` / `.md` | `pm-item-toon` / `pm-item-markdown` | Three-way field merge; append-like collections use set union, `updated_at` uses the latest timestamp, scalar conflicts select the value from the later document update with stable value order as an equal-timestamp tie-break, and canonical serialization recomputes TOON counts. |
@@ -139,6 +143,18 @@ pm merge install --dry-run --json
139
143
  | tracker `**/*.jsonl` except the later `history/*.jsonl` override | `pm-relationship` | Covers default and package-owned custom relationship event paths, unions divergent suffixes by `eventId` (timestamp-ordered, ours-first on ties), and renumbers `sequence` consecutively so the strict-sequence store loader accepts the merged stream. |
140
144
  | root `settings.json` and nested `**/*.json` | `pm-json` | Recursively merges objects per key. Arrays compose when both branches preserve the base and add distinct entries, so independent extension installs and evaluation additions merge without weakening edit/removal conflict detection. |
141
145
 
146
+ History union validates each event in its original branch before rebasing its
147
+ effects. A whole metadata-field replacement still assigns its exact value when
148
+ another branch removed that field; a repeated whole-field removal keeps its
149
+ event even when absence already satisfies its effect. This covers a branch
150
+ claim following another branch's release without losing closure or comments.
151
+ Nested paths and conditional patches remain strict. An unsafe scalar patch
152
+ refuses with `history_union_rebase_conflict` and SDK `history_merge` coordinates
153
+ (branch, one-based event line, operation, scalar-patch index and JSON pointer).
154
+ CLI diagnostics name those coordinates in the error message. Preserve all three
155
+ inputs and both item snapshots for deliberate recovery;
156
+ verify the resolved history and preview reconciliation before committing.
157
+
142
158
  The `tests` collection has an additional execution-safety rule. Its semantic
143
159
  identity excludes provenance so the same command/context does not duplicate
144
160
  when branches record different authorship metadata. A test definition newly
@@ -485,6 +501,18 @@ The result's `staged_paths` lists the repository-relative artifacts added.
485
501
  Tracker aliases resolve before preview, so proof verification, repair and staging
486
502
  use the same physical tracker root.
487
503
 
504
+ Both preview and apply check Git's effective ignore rules before any staging or
505
+ audit write. An ignored artifact refuses with `merge_settlement_review_required`,
506
+ `reason: ignored_merge_artifacts`, its relative path, and the owning
507
+ `file:line: pattern`. Remove or narrow that rule, then retry the preview. Older
508
+ workspaces may still ignore `merge-receipts/` from the former clone-local receipt
509
+ policy; current receipt sidecars must travel with the merge commit. `pm health`
510
+ checks a representative receipt path even before a merge exists and reports
511
+ `merge_artifacts_ignored` with the rule coordinates. A file-specific rule is
512
+ also checked against each actual settlement artifact. Git negations and tracked
513
+ files retain their native meaning; pm neither force-adds artifacts nor rewrites
514
+ user ignore rules.
515
+
488
516
  Repositories can explicitly opt into a merge-aware `pre-commit` hook:
489
517
 
490
518
  ```bash
package/docs/SDK.md CHANGED
@@ -312,6 +312,19 @@ explicitly installs the merge-aware pre-commit hook; the default installs no hoo
312
312
  verified lossless history and receipt artifacts. It refuses forced acceptance,
313
313
  competing values, unrelated drift, dirty reconciliation paths and unresolved Git
314
314
  paths. `staged_paths` reports exactly which relative paths were added to the index.
315
+ Git-ignored artifacts refuse before staging or auditing with
316
+ `merge_settlement_review_required`, `reason: ignored_merge_artifacts`, relative
317
+ `paths`, and owning ignore-rule coordinates. The same check applies to
318
+ `{ stage: true, dryRun: true }`; health reports legacy directory rules before a
319
+ merge exists. This recovery is tracked by
320
+ [pm-gh1556](../.agents/pm/issues/pm-gh1556.toon).
321
+
322
+ `mergeHistoryStreams` preserves validated whole-field assignment/removal intent
323
+ when another branch removed its target. Nested or conditional patches that
324
+ cannot replay refuse with `history_union_rebase_conflict` and typed
325
+ `PmCliError.context.history_merge` coordinates, retaining source inputs for
326
+ deliberate recovery. See [history semantics](MERGE_SAFETY.md#artifact-semantics)
327
+ and [pm-gh1553](../.agents/pm/issues/pm-gh1553.toon).
315
328
 
316
329
  The single-commit journey pauses Git with `git merge --no-commit --no-ff` before
317
330
  reconciliation or an opted-in pre-commit hook runs. `durable_receipt_ids` on the
@@ -643,12 +656,41 @@ explicit full projection. Active package commands receive deterministic
643
656
  fallback contracts, so extension authors can discover a bounded surface before
644
657
  they invoke it.
645
658
 
646
- `pm activity` applies a compact 20-row default bound; direct SDK calls default
647
- to five full rows. Results disclose `total_count`, `omitted_count`, `has_more`,
648
- and `applied_bound`. An explicit `limit` remains authoritative, while
649
- `unbounded: true` (CLI: `--unbounded`) is an intentional opt-out and cannot be
650
- combined with a limit. The activity flag and tool schemas publish the same
651
- option for extension and transport consumers.
659
+ `runActivity` defaults to a 15-item digest over the last 24 hours. `raw: true`
660
+ selects compact events (20 by default); `raw: true, compact: false` selects full
661
+ history entries (five by default). CLI equivalents are `--raw` and `--full`.
662
+ Results disclose `total_count`, `count`, `page_start`, `omitted_count`,
663
+ `has_more`, `next_cursor`, and `applied_bound`. Continue with the same options
664
+ and `after: result.next_cursor` (CLI/MCP: `--after` / `after`). Page size may
665
+ change. `omitted_count` counts rows remaining after the current page.
666
+
667
+ Activity's `window` publishes the original evaluation `anchor`, inclusive
668
+ `from`, and exclusive `to`. Bounded reads without an explicit upper bound pin
669
+ `to` to that anchor. Relative bounds resolve against the same clock on every
670
+ page. Later writes outside the window do not disturb continuation. Query,
671
+ projection, workspace, or matching-content changes refuse the old cursor with
672
+ `invalid_query_cursor`; start the query again without `after`. This is checked
673
+ continuation over an unchanged matching set, not a persisted snapshot or an
674
+ atomic cross-file read. Backdated writes within the window and current metadata
675
+ changes affecting digest rows can require a restart. `unbounded: true`
676
+ intentionally removes the row bound and cannot be combined with a limit.
677
+
678
+ Queries collect the matching rows and scan them on each page to detect changes.
679
+ Content fingerprints hash canonical rows incrementally, bounding additional
680
+ serialization storage to the largest row. Digest activity also hashes its full
681
+ source events incrementally so hidden patch changes still invalidate a cursor.
682
+
683
+ `runCalendar` uses the same `after` contract and frozen clock. `total_count`
684
+ counts matching expanded rows within the selected window and recurrence caps;
685
+ `count`, `page_start`, `omitted_count`, `has_more`, and `next_cursor` describe
686
+ the page. `summary_scope: "returned_rows"` labels `summary` and `days` as
687
+ page-local. Exact-full and empty results have `has_more: false`. A zero limit
688
+ returns counts without rows or a new cursor; repeat with `limit: "1"` or larger
689
+ to fetch rows. Existing recurrence expansion limits remain separate from
690
+ pagination, and calendar mutations affecting matching rows require a restart.
691
+ Repository tracking (PM records are excluded from the npm package):
692
+ [pm-gh1554](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gh1554.toon)
693
+ and [pm-gh1562](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gh1562.toon).
652
694
 
653
695
  The required `quality:token-budget` gate keeps discovery and answer cost
654
696
  separate. Help and contract discovery surfaces use ratcheted baselines;
@@ -1011,6 +1053,18 @@ pm contracts --action calendar --runtime-only --schema-only --json
1011
1053
  pm contracts --command templates --runtime-only --flags-only --json
1012
1054
  ```
1013
1055
 
1056
+ The SDK owns template persistence independently of the presentation package.
1057
+ `runTemplatesSave(name, options: TemplatesSaveOptions, global)` accepts priority
1058
+ as an integer `0..4`, a numeric string, or a named priority such as `critical`.
1059
+ It validates priority before writing and stores its normalized numeric string;
1060
+ `0` therefore survives save, show, and item creation. Invalid priority values
1061
+ refuse with exit code 2 and the accepted forms, preserving the template and
1062
+ workspace history. Other template keys retain the existing string/string-array
1063
+ storage contract, including extension-defined fields. Import the input type
1064
+ and function from `@unbrained/pm-cli/sdk/runtime` or the aggregate SDK.
1065
+ Tracked by [pm-gh1561](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gh1561.toon)
1066
+ (repository-only tracker record, excluded from npm).
1067
+
1014
1068
  Use static SDK contracts for baseline validation, then use runtime contracts in the target project before invoking package-provided commands or actions. Embedded SDK consumers can avoid subprocesses:
1015
1069
 
1016
1070
  ```ts
@@ -1741,6 +1795,23 @@ the SDK search engine directly. Package authors can import these functions and
1741
1795
  their typed result contracts from `@unbrained/pm-cli/sdk` without importing CLI
1742
1796
  implementation modules.
1743
1797
 
1798
+ Read projections also accept metadata names registered by active extensions with
1799
+ `registerItemFields`, including `item.<name>` selectors. For example,
1800
+ `client.get(id, { fields: "id,probe_score" })` returns the declared numeric value
1801
+ without requiring a full item read. `list` and `search` use the same active field
1802
+ vocabulary; search retains the requested selector spelling in its row keys.
1803
+ Disabling the extension removes its selectors from validation and recovery.
1804
+ Unknown names still refuse, and recovery retains valid requested custom fields.
1805
+ Tracked by [pm-gh1571](../.agents/pm/issues/pm-gh1571.toon).
1806
+
1807
+ Settings reads load optional schema files without creating missing files. Missing
1808
+ sections use configured or built-in defaults in memory, and later file creation
1809
+ invalidates the settings cache. Explicit `pm init --defaults` scaffolds missing
1810
+ sections while preserving existing schema definitions. This applies to shared
1811
+ SDK settings reads and CLI read commands; derived query caches and normal
1812
+ observability retain their own policies. Tracked by
1813
+ [pm-gh1568](../.agents/pm/issues/pm-gh1568.toon).
1814
+
1744
1815
  The shared query cursor contract treats every published list, context, and
1745
1816
  search flag as query-semantic by default: it changes the matched or ordered
1746
1817
  result and therefore invalidates a cursor. Only page-size and rendering flags
@@ -2510,6 +2581,14 @@ same list/default semantics as core flags:
2510
2581
  `default: "a,b"` or `default: ["a,b", "c"]`) are split into elements. A default
2511
2582
  that would not cleanly coerce under the declared `value_type` (e.g.
2512
2583
  `value_type: "number", default: "abc"`) is rejected at registration.
2584
+ Declared defaults are discoverable without running the command: text help
2585
+ shows `(default: ...)`, JSON help uses `default_value`, and runtime flag
2586
+ contracts and command schemas use `default`, preserving strings, numbers,
2587
+ booleans, empty strings and arrays. These are declaration values; runtime
2588
+ coercion and list flattening still apply during execution. Explicit values
2589
+ replace omitted-flag defaults, including list defaults. Tracked by
2590
+ [pm-gh1560](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gh1560.toon)
2591
+ (repository-only tracker record, excluded from npm).
2513
2592
  - `value_validation` (`"coerce"` | `"strict"`, tracked by
2514
2593
  [pm-extension-scalar-validation](../.agents/pm/features/pm-extension-scalar-validation.toon))
2515
2594
  decides what happens to a `number`/`boolean` token that does not coerce.
@@ -42,7 +42,7 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
42
42
  | `merge` | workspace | 29 | 29 |
43
43
  | `schema` | workspace | 43 | 43 |
44
44
  | `profile` | workspace | 22 | 22 |
45
- | `activity` | context | 35 | 35 |
45
+ | `activity` | context | 36 | 36 |
46
46
  | `restore` | intake | 23 | 23 |
47
47
  | `update` | lifecycle | 105 | 105 |
48
48
  | `update-many` | lifecycle | 146 | 146 |
@@ -80,7 +80,7 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
80
80
  | `history redact` | evidence | 27 | 27 |
81
81
  | `history repair` | evidence | 27 | 27 |
82
82
  | `history compact` | evidence | 30 | 30 |
83
- | `history activity` | context | 35 | 35 |
83
+ | `history activity` | context | 36 | 36 |
84
84
  | `history restore` | intake | 23 | 23 |
85
85
  | `context next` | context | 38 | 38 |
86
86
  | `context focus` | intake | 22 | 22 |
@@ -4,12 +4,12 @@ Tracker: `pm-f05lsg`.
4
4
 
5
5
  Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.
6
6
 
7
- - Catalog error codes: 427
7
+ - Catalog error codes: 429
8
8
  - Executable error codes: 19
9
9
  - Executable-code ratchet floor: 18
10
10
  - Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `manifest_unknown_key`, `missing_lifecycle_target`, `missing_required_argument`, `no_version_bounds_declared`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
11
- - Uncovered error codes: 408
12
- - Coverage fraction: 0.044496
11
+ - Uncovered error codes: 410
12
+ - Coverage fraction: 0.044289
13
13
  - Closed-domain probes: 19
14
14
  - Grammar probes: 117
15
15
 
@@ -134,6 +134,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
134
134
  | `history_stream_over_compact_threshold` | `history_stream_over_compact_threshold` | uncovered | none | 0 |
135
135
  | `history_target_out_of_range` | `history_target_out_of_range` | uncovered | none | 0 |
136
136
  | `history_timestamp_invalid` | `history_timestamp_invalid` | uncovered | none | 0 |
137
+ | `history_union_rebase_conflict` | `history_union_rebase_conflict` | uncovered | none | 0 |
137
138
  | `history_unknown_author_events` | `history_unknown_author_events` | uncovered | none | 0 |
138
139
  | `history_version_mapping_unavailable` | `history_version_mapping_unavailable` | uncovered | none | 0 |
139
140
  | `history_version_pruned` | `history_version_pruned` | uncovered | none | 0 |
@@ -215,6 +216,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
215
216
  | `mcp_annotation_file_unavailable` | `mcp_annotation_file_unavailable` | uncovered | none | 0 |
216
217
  | `mcp_stdin_unavailable` | `mcp_stdin_unavailable` | uncovered | none | 0 |
217
218
  | `mcp_task_not_found_or_not_authorized` | `mcp_task_not_found_or_not_authorized` | uncovered | none | 0 |
219
+ | `merge_artifacts_ignored` | `merge_artifacts_ignored` | uncovered | none | 0 |
218
220
  | `merge_bun_launcher_unavailable` | `merge_bun_launcher_unavailable` | uncovered | none | 0 |
219
221
  | `merge_conflict_markers_detected` | `merge_conflict_markers_detected` | uncovered | none | 0 |
220
222
  | `merge_decisions_unreviewed` | `merge_decisions_unreviewed` | uncovered | none | 0 |
package/marketplace.json CHANGED
@@ -1 +1 @@
1
- {"name":"pm","owner":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"description":"Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.","version":"2026.10.24","plugins":[{"name":"pm-claude","source":"./plugins/pm-claude","description":"Native pm CLI integration for Claude Code — 32 MCP tools, 14 workflow skills with slash invocations, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.","version":"2026.10.24","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","project-management","mcp","tasks","agents","workflows","git-native","task-tracker","ai"],"category":"productivity"}]}
1
+ {"name":"pm","owner":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"description":"Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.","version":"2026.10.25","plugins":[{"name":"pm-claude","source":"./plugins/pm-claude","description":"Native pm CLI integration for Claude Code — 32 MCP tools, 14 workflow skills with slash invocations, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.","version":"2026.10.25","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","project-management","mcp","tasks","agents","workflows","git-native","task-tracker","ai"],"category":"productivity"}]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-cli",
3
- "version": "2026.10.24",
3
+ "version": "2026.10.25",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.28.5",
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-beads","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for importing Beads JSONL records.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-beads"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","beads"],"pm":{"aliases":["beads"],"extensions":["extensions/beads"],"catalog":{"display_name":"Beads Import","category":"migration","summary":"Import Beads JSONL records into pm while preserving source IDs.","tags":["migration","beads","import"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-beads","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for importing Beads JSONL records.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-beads"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","beads"],"pm":{"aliases":["beads"],"extensions":["extensions/beads"],"catalog":{"display_name":"Beads Import","category":"migration","summary":"Import Beads JSONL records into pm while preserving source IDs.","tags":["migration","beads","import"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-beads","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -37,6 +37,12 @@ export const manifest = {
37
37
  };
38
38
 
39
39
  const calendarFlags = [
40
+ {
41
+ long: "--after",
42
+ value_name: "cursor",
43
+ value_type: "string",
44
+ description: "Continue the original fixed-window calendar query.",
45
+ },
40
46
  {
41
47
  long: "--view",
42
48
  value_name: "value",
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-calendar","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for calendar and agenda views.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-calendar"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","calendar","agenda"],"pm":{"aliases":["calendar"],"extensions":["extensions/calendar"],"catalog":{"display_name":"Calendar Views","category":"workflow","summary":"Show agenda, day, week, and month views for deadlines, reminders, and scheduled events.","tags":["calendar","agenda","workflow"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-calendar","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for calendar and agenda views.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-calendar"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","calendar","agenda"],"pm":{"aliases":["calendar"],"extensions":["extensions/calendar"],"catalog":{"display_name":"Calendar Views","category":"workflow","summary":"Show agenda, day, week, and month views for deadlines, reminders, and scheduled events.","tags":["calendar","agenda","workflow"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-command-kit","version":"2026.10.24","private":true,"type":"module","description":"First-party pm exemplar package for the commands capability: registerCommand, registerFlags, and registerParser.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-command-kit"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","sdk","commands","exemplar"],"pm":{"aliases":["command-kit"],"extensions":["extensions/command-kit"],"catalog":{"display_name":"Command Kit Exemplar","category":"sdk","summary":"Copy-paste-able exemplar for registerCommand, registerFlags, and registerParser.","tags":["sdk","commands","parser","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-command-kit","version":"2026.10.25","private":true,"type":"module","description":"First-party pm exemplar package for the commands capability: registerCommand, registerFlags, and registerParser.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-command-kit"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","sdk","commands","exemplar"],"pm":{"aliases":["command-kit"],"extensions":["extensions/command-kit"],"catalog":{"display_name":"Command Kit Exemplar","category":"sdk","summary":"Copy-paste-able exemplar for registerCommand, registerFlags, and registerParser.","tags":["sdk","commands","parser","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-command-kit","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-digital-twin","version":"2026.10.24","private":true,"type":"module","description":"Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-digital-twin"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","sdk","digital-twin","event-sourcing","temporal-graph","exemplar"],"pm":{"aliases":["digital-twin","twin"],"extensions":["extensions/digital-twin"],"catalog":{"display_name":"Digital Twin SDK Exemplar","category":"sdk","summary":"Temporal facility graph proving event replay, point-in-time state, invariants, federation, checkpoints, and compact exports through public SDK contracts.","tags":["sdk","digital-twin","event-sourcing","graph","offline-first","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin","report":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin/GAP_REPORT.md"}},"docs":["README.md","GAP_REPORT.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-digital-twin","version":"2026.10.25","private":true,"type":"module","description":"Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-digital-twin"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","sdk","digital-twin","event-sourcing","temporal-graph","exemplar"],"pm":{"aliases":["digital-twin","twin"],"extensions":["extensions/digital-twin"],"catalog":{"display_name":"Digital Twin SDK Exemplar","category":"sdk","summary":"Temporal facility graph proving event replay, point-in-time state, invariants, federation, checkpoints, and compact exports through public SDK contracts.","tags":["sdk","digital-twin","event-sourcing","graph","offline-first","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin","report":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-digital-twin/GAP_REPORT.md"}},"docs":["README.md","GAP_REPORT.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-governance-audit","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for governance audit and normalization workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-governance-audit"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","governance","audit","normalize","hooks"],"pm":{"aliases":["governance-audit","audit"],"extensions":["extensions/governance-audit"],"catalog":{"display_name":"Governance Audit","category":"governance","summary":"Run dedupe audits, comments audits, and normalize sweeps as package-owned workflows.","tags":["governance","audit","normalize","hooks"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-governance-audit","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for governance audit and normalization workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-governance-audit"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","governance","audit","normalize","hooks"],"pm":{"aliases":["governance-audit","audit"],"extensions":["extensions/governance-audit"],"catalog":{"display_name":"Governance Audit","category":"governance","summary":"Run dedupe audits, comments audits, and normalize sweeps as package-owned workflows.","tags":["governance","audit","normalize","hooks"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-guide-shell","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for guide and shell completion workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-guide-shell"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","guide","completion","shell"],"pm":{"aliases":["guide-shell"],"extensions":["extensions/guide-shell"],"catalog":{"display_name":"Guide + Shell UX","category":"workflow","summary":"Restore guide documentation and shell completion commands as package-owned UX surfaces.","tags":["guide","completion","shell"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-guide-shell","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for guide and shell completion workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-guide-shell"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","guide","completion","shell"],"pm":{"aliases":["guide-shell"],"extensions":["extensions/guide-shell"],"catalog":{"display_name":"Guide + Shell UX","category":"workflow","summary":"Restore guide documentation and shell completion commands as package-owned UX surfaces.","tags":["guide","completion","shell"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-kanban","version":"2026.10.24","private":true,"type":"module","description":"First-party pm archetype package: a complete Kanban continuous-flow profile built on public SDK primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-kanban"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","sdk","profile","archetype","kanban","exemplar"],"pm":{"aliases":["kanban"],"extensions":["extensions/kanban"],"catalog":{"display_name":"Kanban Archetype","category":"sdk","summary":"Installable Kanban continuous-flow archetype: Card item type, flow fields, and a ProjectProfileDefinition built on public SDK primitives.","tags":["sdk","profile","archetype","kanban","schema","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-kanban","version":"2026.10.25","private":true,"type":"module","description":"First-party pm archetype package: a complete Kanban continuous-flow profile built on public SDK primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-kanban"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","sdk","profile","archetype","kanban","exemplar"],"pm":{"aliases":["kanban"],"extensions":["extensions/kanban"],"catalog":{"display_name":"Kanban Archetype","category":"sdk","summary":"Installable Kanban continuous-flow archetype: Card item type, flow fields, and a ProjectProfileDefinition built on public SDK primitives.","tags":["sdk","profile","archetype","kanban","schema","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-kanban","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-lifecycle-hooks","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package demonstrating safe lifecycle hook registration.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-lifecycle-hooks"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","hooks","lifecycle","sdk"],"pm":{"aliases":["lifecycle-hooks"],"extensions":["extensions/lifecycle-hooks"],"catalog":{"display_name":"Lifecycle Hooks","category":"sdk","summary":"Default-inert lifecycle hook exemplar for package authors.","tags":["hooks","lifecycle","sdk"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-lifecycle-hooks","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package demonstrating safe lifecycle hook registration.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-lifecycle-hooks"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","hooks","lifecycle","sdk"],"pm":{"aliases":["lifecycle-hooks"],"extensions":["extensions/lifecycle-hooks"],"catalog":{"display_name":"Lifecycle Hooks","category":"sdk","summary":"Default-inert lifecycle hook exemplar for package authors.","tags":["hooks","lifecycle","sdk"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-lifecycle-hooks","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-linked-test-adapters","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for optional linked-test run management adapters and reporters.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-linked-test-adapters"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","linked-tests","background-runs","test-runs"],"pm":{"aliases":["linked-test-adapters"],"extensions":["extensions/linked-test-adapters"],"catalog":{"display_name":"Linked Test Adapters","category":"testing","summary":"Restore optional linked-test run management/reporting command surfaces.","tags":["tests","linked-tests","background","reporting"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-linked-test-adapters","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for optional linked-test run management adapters and reporters.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-linked-test-adapters"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","linked-tests","background-runs","test-runs"],"pm":{"aliases":["linked-test-adapters"],"extensions":["extensions/linked-test-adapters"],"catalog":{"display_name":"Linked Test Adapters","category":"testing","summary":"Restore optional linked-test run management/reporting command surfaces.","tags":["tests","linked-tests","background","reporting"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-linked-test-adapters","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-search-advanced","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for semantic, hybrid, and reindex search workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-search-advanced"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","search","reindex","semantic","hybrid"],"pm":{"aliases":["search-advanced"],"extensions":["extensions/search-advanced"],"catalog":{"display_name":"Advanced Search","category":"search","summary":"Enable semantic/hybrid search modes and reindex workflows.","tags":["search","semantic","hybrid","reindex"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-search-advanced","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for semantic, hybrid, and reindex search workflows.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-search-advanced"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","search","reindex","semantic","hybrid"],"pm":{"aliases":["search-advanced"],"extensions":["extensions/search-advanced"],"catalog":{"display_name":"Advanced Search","category":"search","summary":"Enable semantic/hybrid search modes and reindex workflows.","tags":["search","semantic","hybrid","reindex"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-search-advanced","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -12,6 +12,7 @@ import {
12
12
  type GlobalOptions,
13
13
  type TemplatesListResult,
14
14
  type TemplatesSaveResult,
15
+ type TemplatesSaveOptions,
15
16
  type TemplatesShowResult,
16
17
  } from "@unbrained/pm-cli/sdk";
17
18
 
@@ -19,6 +20,7 @@ export type {
19
20
  CreateTemplateOptions,
20
21
  TemplatesListResult,
21
22
  TemplatesSaveResult,
23
+ TemplatesSaveOptions,
22
24
  TemplatesShowResult,
23
25
  } from "@unbrained/pm-cli/sdk";
24
26
 
@@ -33,7 +35,7 @@ export async function loadCreateTemplateOptions(
33
35
  /** Executes the templates save operation through the package runtime. */
34
36
  export async function runTemplatesSave(
35
37
  rawTemplateName: string,
36
- options: Record<string, unknown>,
38
+ options: TemplatesSaveOptions,
37
39
  global: GlobalOptions,
38
40
  ): Promise<TemplatesSaveResult> {
39
41
  return runSdkTemplatesSave(rawTemplateName, options, global);
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-templates","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for reusable create templates.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-templates"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","templates"],"pm":{"aliases":["templates"],"extensions":["extensions/templates"],"catalog":{"display_name":"Create Templates","category":"workflow","summary":"Save, list, show, and apply reusable pm create option templates.","tags":["templates","create","workflow"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-templates","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for reusable create templates.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-templates"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","templates"],"pm":{"aliases":["templates"],"extensions":["extensions/templates"],"catalog":{"display_name":"Create Templates","category":"workflow","summary":"Save, list, show, and apply reusable pm create option templates.","tags":["templates","create","workflow"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-templates","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-todos","version":"2026.10.24","private":true,"type":"module","description":"First-party pm package for Todo markdown import and export.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-todos"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","todos"],"pm":{"aliases":["todos"],"extensions":["extensions/todos"],"catalog":{"display_name":"Todos Import/Export","category":"migration","summary":"Import and export Todo markdown tasks through pm package commands.","tags":["migration","todos","import","export"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-todos","version":"2026.10.25","private":true,"type":"module","description":"First-party pm package for Todo markdown import and export.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-todos"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","project-management","todos"],"pm":{"aliases":["todos"],"extensions":["extensions/todos"],"catalog":{"display_name":"Todos Import/Export","category":"migration","summary":"Import and export Todo markdown tasks through pm package commands.","tags":["migration","todos","import","export"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-todos","report":"https://github.com/unbraind/pm-cli/issues"}},"docs":["README.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"name":"@unbrained/pm-vcs-sdk-exemplar","version":"2026.10.24","private":true,"type":"module","description":"Beyond-PM exemplar: a VCS-style changeset workflow built entirely on public pm SDK and extension primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-vcs"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","sdk","vcs","event-sourcing","exemplar"],"pm":{"aliases":["vcs-exemplar"],"extensions":["extensions/vcs"],"catalog":{"display_name":"VCS SDK Exemplar","category":"sdk","summary":"Non-PM changeset/ref workflow proving custom schema, domain commands, hooks, history replay, and typed relationship events through public SDK contracts.","tags":["sdk","vcs","event-sourcing","graph","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs","report":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs/GAP_REPORT.md"}},"docs":["README.md","GAP_REPORT.md"],"examples":["README.md"]}}
1
+ {"name":"@unbrained/pm-vcs-sdk-exemplar","version":"2026.10.25","private":true,"type":"module","description":"Beyond-PM exemplar: a VCS-style changeset workflow built entirely on public pm SDK and extension primitives.","homepage":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs#readme","repository":{"type":"git","url":"git+https://github.com/unbraind/pm-cli.git","directory":"packages/pm-vcs"},"bugs":{"url":"https://github.com/unbraind/pm-cli/issues"},"keywords":["pm-package","sdk","vcs","event-sourcing","exemplar"],"pm":{"aliases":["vcs-exemplar"],"extensions":["extensions/vcs"],"catalog":{"display_name":"VCS SDK Exemplar","category":"sdk","summary":"Non-PM changeset/ref workflow proving custom schema, domain commands, hooks, history replay, and typed relationship events through public SDK contracts.","tags":["sdk","vcs","event-sourcing","graph","exemplar"],"links":{"docs":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs#readme","repository":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs","report":"https://github.com/unbraind/pm-cli/tree/main/packages/pm-vcs/GAP_REPORT.md"}},"docs":["README.md","GAP_REPORT.md"],"examples":["README.md"]}}
@@ -1 +1 @@
1
- {"$schema":"https://json.schemastore.org/claude-code-plugin-manifest.json","name":"pm-claude","displayName":"pm CLI","description":"Native pm CLI integration for Claude Code — 32 MCP tools, 14 skills with slash invocations, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.","version":"2026.10.24","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","project-management","mcp","tasks","agents","workflows","git-native","task-tracker","ai"]}
1
+ {"$schema":"https://json.schemastore.org/claude-code-plugin-manifest.json","name":"pm-claude","displayName":"pm CLI","description":"Native pm CLI integration for Claude Code — 32 MCP tools, 14 skills with slash invocations, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.","version":"2026.10.25","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","project-management","mcp","tasks","agents","workflows","git-native","task-tracker","ai"]}
@@ -1 +1 @@
1
- {"name":"pm-claude-runtime","private":true,"type":"module","version":"2026.10.24","dependencies":{"@unbrained/pm-cli":"2026.10.24"}}
1
+ {"name":"pm-claude-runtime","private":true,"type":"module","version":"2026.10.25","dependencies":{"@unbrained/pm-cli":"2026.10.25"}}
@@ -1 +1 @@
1
- {"name":"pm-codex","version":"2026.10.24","description":"Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli/tree/main/plugins/pm-codex","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","codex","mcp","project-management","agents","tasks","workflows"],"skills":"./skills/","mcpServers":"./.mcp.json","interface":{"displayName":"pm CLI","shortDescription":"Native pm tracker tools and agent workflows","longDescription":"Use pm CLI from Codex through native MCP tools instead of shelling out to the pm command. The plugin bundles tracker operations, skills, command prompts, and subagent workflow guidance for planning, execution, validation, release, and audit work.","developerName":"unbrained","category":"Coding","capabilities":["Interactive","Read","Write"],"websiteURL":"https://github.com/unbraind/pm-cli","privacyPolicyURL":"https://github.com/unbraind/pm-cli/blob/main/SECURITY.md","termsOfServiceURL":"https://github.com/unbraind/pm-cli/blob/main/LICENSE","defaultPrompt":["Use pm CLI to orient, claim, track, verify, and close this repository task"],"composerIcon":"./assets/pm-cli-small.svg","logo":"./assets/pm-cli-small.svg","screenshots":[],"brandColor":"#2563EB"}}
1
+ {"name":"pm-codex","version":"2026.10.25","description":"Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli/tree/main/plugins/pm-codex","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","codex","mcp","project-management","agents","tasks","workflows"],"skills":"./skills/","mcpServers":"./.mcp.json","interface":{"displayName":"pm CLI","shortDescription":"Native pm tracker tools and agent workflows","longDescription":"Use pm CLI from Codex through native MCP tools instead of shelling out to the pm command. The plugin bundles tracker operations, skills, command prompts, and subagent workflow guidance for planning, execution, validation, release, and audit work.","developerName":"unbrained","category":"Coding","capabilities":["Interactive","Read","Write"],"websiteURL":"https://github.com/unbraind/pm-cli","privacyPolicyURL":"https://github.com/unbraind/pm-cli/blob/main/SECURITY.md","termsOfServiceURL":"https://github.com/unbraind/pm-cli/blob/main/LICENSE","defaultPrompt":["Use pm CLI to orient, claim, track, verify, and close this repository task"],"composerIcon":"./assets/pm-cli-small.svg","logo":"./assets/pm-cli-small.svg","screenshots":[],"brandColor":"#2563EB"}}
@@ -1 +1 @@
1
- {"name":"pm-codex-runtime","private":true,"type":"module","version":"2026.10.24","dependencies":{"@unbrained/pm-cli":"2026.10.24"}}
1
+ {"name":"pm-codex-runtime","private":true,"type":"module","version":"2026.10.25","dependencies":{"@unbrained/pm-cli":"2026.10.25"}}
@@ -1 +1 @@
1
- {"$schema":"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name":"pm-codex","version":"2026.10.24","description":"Repository-native project context workflows and a version-pinned pm MCP server for Codex.","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli/tree/main/plugins/pm-codex","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","codex","mcp","project-management","agents"],"extensions":{"com.openai":{"interface":{"displayName":"pm CLI","shortDescription":"Track project context with pm","longDescription":"Orient, plan, implement, verify, and hand off work with repository-native pm records and a bundled MCP server.","developerName":"unbrained","category":"Coding","capabilities":["Interactive","Read","Write"],"websiteURL":"https://github.com/unbraind/pm-cli","privacyPolicyURL":"https://github.com/unbraind/pm-cli/blob/main/SECURITY.md","termsOfServiceURL":"https://github.com/unbraind/pm-cli/blob/main/LICENSE","defaultPrompt":["Use pm to orient, track, verify, and hand off this repository task."],"composerIcon":"./assets/pm-cli-small.svg","logo":"./assets/pm-cli-small.svg","brandColor":"#2563EB"}}}}
1
+ {"$schema":"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name":"pm-codex","version":"2026.10.25","description":"Repository-native project context workflows and a version-pinned pm MCP server for Codex.","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli/tree/main/plugins/pm-codex","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","codex","mcp","project-management","agents"],"extensions":{"com.openai":{"interface":{"displayName":"pm CLI","shortDescription":"Track project context with pm","longDescription":"Orient, plan, implement, verify, and hand off work with repository-native pm records and a bundled MCP server.","developerName":"unbrained","category":"Coding","capabilities":["Interactive","Read","Write"],"websiteURL":"https://github.com/unbraind/pm-cli","privacyPolicyURL":"https://github.com/unbraind/pm-cli/blob/main/SECURITY.md","termsOfServiceURL":"https://github.com/unbraind/pm-cli/blob/main/LICENSE","defaultPrompt":["Use pm to orient, track, verify, and hand off this repository task."],"composerIcon":"./assets/pm-cli-small.svg","logo":"./assets/pm-cli-small.svg","brandColor":"#2563EB"}}}}