@unbrained/pm-cli 2026.5.12 → 2026.5.14

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 (128) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/PRD.md +7 -28
  3. package/README.md +2 -9
  4. package/dist/cli/commander-usage.js +27 -0
  5. package/dist/cli/commander-usage.js.map +1 -1
  6. package/dist/cli/commands/activity.js +19 -4
  7. package/dist/cli/commands/activity.js.map +1 -1
  8. package/dist/cli/commands/calendar.js +5 -2
  9. package/dist/cli/commands/calendar.js.map +1 -1
  10. package/dist/cli/commands/contracts.js +56 -18
  11. package/dist/cli/commands/contracts.js.map +1 -1
  12. package/dist/cli/commands/create.js +58 -3
  13. package/dist/cli/commands/create.js.map +1 -1
  14. package/dist/cli/commands/extension.d.ts +5 -1
  15. package/dist/cli/commands/extension.js +245 -39
  16. package/dist/cli/commands/extension.js.map +1 -1
  17. package/dist/cli/commands/index.d.ts +0 -8
  18. package/dist/cli/commands/index.js +0 -8
  19. package/dist/cli/commands/index.js.map +1 -1
  20. package/dist/cli/commands/reindex.d.ts +8 -0
  21. package/dist/cli/commands/reindex.js +96 -23
  22. package/dist/cli/commands/reindex.js.map +1 -1
  23. package/dist/cli/commands/search.js +51 -25
  24. package/dist/cli/commands/search.js.map +1 -1
  25. package/dist/cli/help-content.js +17 -18
  26. package/dist/cli/help-content.js.map +1 -1
  27. package/dist/cli/main.js +73 -7
  28. package/dist/cli/main.js.map +1 -1
  29. package/dist/cli/register-list-query.js +24 -142
  30. package/dist/cli/register-list-query.js.map +1 -1
  31. package/dist/cli/register-mutation.js +49 -257
  32. package/dist/cli/register-mutation.js.map +1 -1
  33. package/dist/cli/register-operations.js +29 -198
  34. package/dist/cli/register-operations.js.map +1 -1
  35. package/dist/cli/register-setup.js +32 -133
  36. package/dist/cli/register-setup.js.map +1 -1
  37. package/dist/cli/registration-helpers.d.ts +2 -2
  38. package/dist/cli/registration-helpers.js +1 -19
  39. package/dist/cli/registration-helpers.js.map +1 -1
  40. package/dist/core/extensions/loader.js +7 -1
  41. package/dist/core/extensions/loader.js.map +1 -1
  42. package/dist/core/packages/manifest.d.ts +26 -1
  43. package/dist/core/packages/manifest.js +82 -0
  44. package/dist/core/packages/manifest.js.map +1 -1
  45. package/dist/core/search/embedding-batches.d.ts +13 -1
  46. package/dist/core/search/embedding-batches.js +19 -1
  47. package/dist/core/search/embedding-batches.js.map +1 -1
  48. package/dist/core/store/front-matter-cache.d.ts +8 -1
  49. package/dist/core/store/front-matter-cache.js +20 -11
  50. package/dist/core/store/front-matter-cache.js.map +1 -1
  51. package/dist/mcp/server.d.ts +8 -0
  52. package/dist/mcp/server.js +93 -43
  53. package/dist/mcp/server.js.map +1 -1
  54. package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +7 -0
  55. package/dist/sdk/cli-contracts/commander-mutation-options.js +477 -0
  56. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -0
  57. package/dist/sdk/cli-contracts/commander-types.d.ts +21 -0
  58. package/dist/sdk/cli-contracts/commander-types.js +92 -0
  59. package/dist/sdk/cli-contracts/commander-types.js.map +1 -0
  60. package/dist/sdk/cli-contracts.d.ts +6 -17
  61. package/dist/sdk/cli-contracts.js +19 -262
  62. package/dist/sdk/cli-contracts.js.map +1 -1
  63. package/dist/sdk/index.d.ts +2 -1
  64. package/dist/sdk/index.js +1 -0
  65. package/dist/sdk/index.js.map +1 -1
  66. package/dist/sdk/runtime.d.ts +29 -0
  67. package/dist/sdk/runtime.js +28 -0
  68. package/dist/sdk/runtime.js.map +1 -0
  69. package/docs/COMMANDS.md +3 -0
  70. package/docs/EXTENSIONS.md +60 -35
  71. package/docs/QUICKSTART.md +1 -0
  72. package/docs/RELEASING.md +4 -2
  73. package/docs/SDK.md +78 -441
  74. package/package.json +4 -3
  75. package/packages/pm-beads/extensions/beads/index.js +90 -101
  76. package/packages/pm-beads/extensions/beads/index.ts +2 -2
  77. package/packages/pm-beads/extensions/beads/runtime.js +2 -17
  78. package/packages/pm-beads/extensions/beads/runtime.ts +41 -18
  79. package/packages/pm-beads/package.json +33 -0
  80. package/packages/pm-calendar/README.md +13 -0
  81. package/packages/pm-calendar/extensions/calendar/index.js +56 -0
  82. package/packages/pm-calendar/extensions/calendar/index.ts +62 -0
  83. package/packages/pm-calendar/extensions/calendar/manifest.json +7 -0
  84. package/packages/pm-calendar/extensions/calendar/runtime.js +95 -0
  85. package/packages/pm-calendar/extensions/calendar/runtime.ts +104 -0
  86. package/packages/pm-calendar/package.json +51 -0
  87. package/packages/pm-governance-audit/README.md +23 -0
  88. package/packages/pm-governance-audit/extensions/governance-audit/index.js +117 -0
  89. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +118 -0
  90. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +7 -0
  91. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +159 -0
  92. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +176 -0
  93. package/packages/pm-governance-audit/package.json +52 -0
  94. package/packages/pm-guide-shell/README.md +23 -0
  95. package/packages/pm-guide-shell/extensions/guide-shell/index.js +76 -0
  96. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +81 -0
  97. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +7 -0
  98. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +263 -0
  99. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +327 -0
  100. package/packages/pm-guide-shell/package.json +52 -0
  101. package/packages/pm-linked-test-adapters/README.md +24 -0
  102. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +101 -0
  103. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +102 -0
  104. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +7 -0
  105. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +142 -0
  106. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +173 -0
  107. package/packages/pm-linked-test-adapters/package.json +53 -0
  108. package/packages/pm-search-advanced/README.md +27 -0
  109. package/packages/pm-search-advanced/extensions/search-advanced/index.js +93 -0
  110. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +94 -0
  111. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +7 -0
  112. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +120 -0
  113. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +144 -0
  114. package/packages/pm-search-advanced/package.json +54 -0
  115. package/packages/pm-templates/README.md +20 -0
  116. package/packages/pm-templates/extensions/templates/index.js +101 -0
  117. package/packages/pm-templates/extensions/templates/index.ts +109 -0
  118. package/packages/pm-templates/extensions/templates/manifest.json +7 -0
  119. package/packages/pm-templates/extensions/templates/runtime.js +226 -0
  120. package/packages/pm-templates/extensions/templates/runtime.ts +283 -0
  121. package/packages/pm-templates/package.json +50 -0
  122. package/packages/pm-todos/extensions/todos/index.js +105 -116
  123. package/packages/pm-todos/extensions/todos/index.ts +3 -2
  124. package/packages/pm-todos/extensions/todos/runtime.js +2 -17
  125. package/packages/pm-todos/extensions/todos/runtime.ts +40 -18
  126. package/packages/pm-todos/package.json +34 -0
  127. package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +4 -2
  128. package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +4 -2
@@ -1,6 +1,7 @@
1
1
  import { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, type ExtensionApi, type ExtensionManifest } from "../core/extensions/loader.js";
2
- export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, collectPackageExtensionDirectories, readPmPackageManifest, type PmPackageManifest, type PmPackageResourceKind, type PmPackageResourceMap, } from "../core/packages/manifest.js";
2
+ export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, collectPackageExtensionDirectories, readPmPackageManifest, type PmPackageCatalogLinkMap, type PmPackageCatalogMediaMap, type PmPackageCatalogMetadata, type PmPackageManifest, type PmPackageResourceKind, type PmPackageResourceMap, } from "../core/packages/manifest.js";
3
3
  export * from "./cli-contracts.js";
4
+ export * from "./runtime.js";
4
5
  /**
5
6
  * Canonical extension capability names accepted by pm.
6
7
  *
package/dist/sdk/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, KNOWN_EXTENSION_CAPABILITIES, KNOWN_EXTENSION_POLICY_MODES, KNOWN_EXTENSION_POLICY_SURFACES, KNOWN_EXTENSION_SANDBOX_PROFILES, KNOWN_EXTENSION_TRUST_MODES, } from "../core/extensions/loader.js";
2
2
  export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, collectPackageExtensionDirectories, readPmPackageManifest, } from "../core/packages/manifest.js";
3
3
  export * from "./cli-contracts.js";
4
+ export * from "./runtime.js";
4
5
  /**
5
6
  * Canonical extension capability names accepted by pm.
6
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,mCAAmC,EACnC,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,2BAA2B,GAG5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,EACtC,yBAAyB,EACzB,kCAAkC,EAClC,qBAAqB,GAItB,MAAM,8BAA8B,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAM3E;;GAEG;AACH,OAAO,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,CAAC;AAarH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAkC,MAAe;IAC9E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n type ExtensionApi,\n type ExtensionManifest,\n} from \"../core/extensions/loader.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport * from \"./cli-contracts.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\nexport interface ExtensionModule {\n /**\n * Optional in-module metadata mirror.\n *\n * The authoritative manifest remains on-disk `manifest.json`; this field is\n * useful when authors want colocated metadata for tooling/tests.\n */\n manifest?: ExtensionManifest;\n activate(api: ExtensionApi): void | Promise<void>;\n}\n\n/**\n * Typed identity helper for extension module exports.\n *\n * Use as:\n * `export default defineExtension({ activate(api) { ... } })`\n */\nexport function defineExtension<TModule extends ExtensionModule>(module: TModule): TModule {\n return module;\n}\n\nexport type {\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,mCAAmC,EACnC,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,2BAA2B,GAG5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,EACtC,yBAAyB,EACzB,kCAAkC,EAClC,qBAAqB,GAOtB,MAAM,8BAA8B,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAM3E;;GAEG;AACH,OAAO,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,CAAC;AAarH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAkC,MAAe;IAC9E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n type ExtensionApi,\n type ExtensionManifest,\n} from \"../core/extensions/loader.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport * from \"./cli-contracts.js\";\nexport * from \"./runtime.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\nexport interface ExtensionModule {\n /**\n * Optional in-module metadata mirror.\n *\n * The authoritative manifest remains on-disk `manifest.json`; this field is\n * useful when authors want colocated metadata for tooling/tests.\n */\n manifest?: ExtensionManifest;\n activate(api: ExtensionApi): void | Promise<void>;\n}\n\n/**\n * Typed identity helper for extension module exports.\n *\n * Use as:\n * `export default defineExtension({ activate(api) { ... } })`\n */\nexport function defineExtension<TModule extends ExtensionModule>(module: TModule): TModule {\n return module;\n}\n\nexport type {\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"]}
@@ -0,0 +1,29 @@
1
+ export { getActiveExtensionRegistrations, runActiveOnReadHooks, runActiveOnWriteHooks, } from "../core/extensions/index.js";
2
+ export { pathExists, readFileIfExists, removeFileIfExists, writeFileAtomic } from "../core/fs/fs-utils.js";
3
+ export { appendHistoryEntry, createHistoryEntry } from "../core/history/history.js";
4
+ export { generateItemId, normalizeItemId, normalizeRawItemId } from "../core/item/id.js";
5
+ export { canonicalDocument, normalizeFrontMatter, serializeItemDocument, splitFrontMatter, } from "../core/item/item-format.js";
6
+ export { parseTags } from "../core/item/parse.js";
7
+ export { normalizeStatusInput } from "../core/item/status.js";
8
+ export { resolveItemTypeRegistry } from "../core/item/type-registry.js";
9
+ export { acquireLock } from "../core/lock/lock.js";
10
+ export { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry } from "../core/schema/runtime-schema.js";
11
+ export { EXIT_CODE } from "../core/shared/constants.js";
12
+ export { PmCliError } from "../core/shared/errors.js";
13
+ export { isTimestampLiteral, nowIso } from "../core/shared/time.js";
14
+ export { listAllFrontMatter, locateItem, readLocatedItem } from "../core/store/item-store.js";
15
+ export { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from "../core/store/paths.js";
16
+ export { readSettings } from "../core/store/settings.js";
17
+ export { renderCalendarMarkdown, resolveCalendarOutputFormat, runCalendar, type CalendarOptions, type CalendarResult, } from "../cli/commands/calendar.js";
18
+ export { renderGuideMarkdown, resolveGuideOutputFormat, runGuide, type GuideDepth, type GuideOptions, type GuideOutputFormat, type GuideResult, } from "../cli/commands/guide.js";
19
+ export { runCompletion, type CompletionResult, type CompletionShell } from "../cli/commands/completion.js";
20
+ export { runCommentsAudit, type CommentsAuditEntry, type CommentsAuditHistoryRow, type CommentsAuditOptions, type CommentsAuditResult, type CommentsAuditSummary, type CommentsAuditTypeSummary, } from "../cli/commands/comments-audit.js";
21
+ export { runDedupeAudit, type DedupeAuditCandidate, type DedupeAuditCluster, type DedupeAuditOptions, type DedupeAuditResult, } from "../cli/commands/dedupe-audit.js";
22
+ export { runNormalize, type NormalizeCommandOptions, type NormalizeResult } from "../cli/commands/normalize.js";
23
+ export { runReindex, type ReindexOptions, type ReindexResult } from "../cli/commands/reindex.js";
24
+ export { runSearch, type SearchOptions, type SearchResult } from "../cli/commands/search.js";
25
+ export { loadCreateTemplateOptions, runTemplatesList, runTemplatesSave, runTemplatesShow, type CreateTemplateOptions, type TemplatesListResult, type TemplatesSaveResult, type TemplatesShowResult, } from "../cli/commands/templates.js";
26
+ export { runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, type TestRunsListCommandOptions, type TestRunsLogsCommandOptions, type TestRunsResumeCommandOptions, type TestRunsStopCommandOptions, } from "../cli/commands/test-runs.js";
27
+ export { CONFIDENCE_TEXT_VALUES, DEPENDENCY_KIND_VALUES, ISSUE_SEVERITY_VALUES, RISK_VALUES, } from "../types/index.js";
28
+ export type { GlobalOptions } from "../core/shared/command-types.js";
29
+ export type { Dependency, ItemDocument, ItemMetadata, ItemStatus, ItemType, LinkedDoc, LinkedFile, LinkedTest, LogNote, PmSettings, } from "../types/index.js";
@@ -0,0 +1,28 @@
1
+ export { getActiveExtensionRegistrations, runActiveOnReadHooks, runActiveOnWriteHooks, } from "../core/extensions/index.js";
2
+ export { pathExists, readFileIfExists, removeFileIfExists, writeFileAtomic } from "../core/fs/fs-utils.js";
3
+ export { appendHistoryEntry, createHistoryEntry } from "../core/history/history.js";
4
+ export { generateItemId, normalizeItemId, normalizeRawItemId } from "../core/item/id.js";
5
+ export { canonicalDocument, normalizeFrontMatter, serializeItemDocument, splitFrontMatter, } from "../core/item/item-format.js";
6
+ export { parseTags } from "../core/item/parse.js";
7
+ export { normalizeStatusInput } from "../core/item/status.js";
8
+ export { resolveItemTypeRegistry } from "../core/item/type-registry.js";
9
+ export { acquireLock } from "../core/lock/lock.js";
10
+ export { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry } from "../core/schema/runtime-schema.js";
11
+ export { EXIT_CODE } from "../core/shared/constants.js";
12
+ export { PmCliError } from "../core/shared/errors.js";
13
+ export { isTimestampLiteral, nowIso } from "../core/shared/time.js";
14
+ export { listAllFrontMatter, locateItem, readLocatedItem } from "../core/store/item-store.js";
15
+ export { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from "../core/store/paths.js";
16
+ export { readSettings } from "../core/store/settings.js";
17
+ export { renderCalendarMarkdown, resolveCalendarOutputFormat, runCalendar, } from "../cli/commands/calendar.js";
18
+ export { renderGuideMarkdown, resolveGuideOutputFormat, runGuide, } from "../cli/commands/guide.js";
19
+ export { runCompletion } from "../cli/commands/completion.js";
20
+ export { runCommentsAudit, } from "../cli/commands/comments-audit.js";
21
+ export { runDedupeAudit, } from "../cli/commands/dedupe-audit.js";
22
+ export { runNormalize } from "../cli/commands/normalize.js";
23
+ export { runReindex } from "../cli/commands/reindex.js";
24
+ export { runSearch } from "../cli/commands/search.js";
25
+ export { loadCreateTemplateOptions, runTemplatesList, runTemplatesSave, runTemplatesShow, } from "../cli/commands/templates.js";
26
+ export { runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, } from "../cli/commands/test-runs.js";
27
+ export { CONFIDENCE_TEXT_VALUES, DEPENDENCY_KIND_VALUES, ISSUE_SEVERITY_VALUES, RISK_VALUES, } from "../types/index.js";
28
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"/","sources":["sdk/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,WAAW,GAGZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,GAKT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAA+C,MAAM,+BAA+B,CAAC;AAC3G,OAAO,EACL,gBAAgB,GAOjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,GAKf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAsD,MAAM,8BAA8B,CAAC;AAChH,OAAO,EAAE,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,SAAS,EAAyC,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAKhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,WAAW,GACZ,MAAM,mBAAmB,CAAC","sourcesContent":["export {\n getActiveExtensionRegistrations,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n} from \"../core/extensions/index.js\";\nexport { pathExists, readFileIfExists, removeFileIfExists, writeFileAtomic } from \"../core/fs/fs-utils.js\";\nexport { appendHistoryEntry, createHistoryEntry } from \"../core/history/history.js\";\nexport { generateItemId, normalizeItemId, normalizeRawItemId } from \"../core/item/id.js\";\nexport {\n canonicalDocument,\n normalizeFrontMatter,\n serializeItemDocument,\n splitFrontMatter,\n} from \"../core/item/item-format.js\";\nexport { parseTags } from \"../core/item/parse.js\";\nexport { normalizeStatusInput } from \"../core/item/status.js\";\nexport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nexport { acquireLock } from \"../core/lock/lock.js\";\nexport { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry } from \"../core/schema/runtime-schema.js\";\nexport { EXIT_CODE } from \"../core/shared/constants.js\";\nexport { PmCliError } from \"../core/shared/errors.js\";\nexport { isTimestampLiteral, nowIso } from \"../core/shared/time.js\";\nexport { listAllFrontMatter, locateItem, readLocatedItem } from \"../core/store/item-store.js\";\nexport { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nexport { readSettings } from \"../core/store/settings.js\";\nexport {\n renderCalendarMarkdown,\n resolveCalendarOutputFormat,\n runCalendar,\n type CalendarOptions,\n type CalendarResult,\n} from \"../cli/commands/calendar.js\";\nexport {\n renderGuideMarkdown,\n resolveGuideOutputFormat,\n runGuide,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n} from \"../cli/commands/guide.js\";\nexport { runCompletion, type CompletionResult, type CompletionShell } from \"../cli/commands/completion.js\";\nexport {\n runCommentsAudit,\n type CommentsAuditEntry,\n type CommentsAuditHistoryRow,\n type CommentsAuditOptions,\n type CommentsAuditResult,\n type CommentsAuditSummary,\n type CommentsAuditTypeSummary,\n} from \"../cli/commands/comments-audit.js\";\nexport {\n runDedupeAudit,\n type DedupeAuditCandidate,\n type DedupeAuditCluster,\n type DedupeAuditOptions,\n type DedupeAuditResult,\n} from \"../cli/commands/dedupe-audit.js\";\nexport { runNormalize, type NormalizeCommandOptions, type NormalizeResult } from \"../cli/commands/normalize.js\";\nexport { runReindex, type ReindexOptions, type ReindexResult } from \"../cli/commands/reindex.js\";\nexport { runSearch, type SearchOptions, type SearchResult } from \"../cli/commands/search.js\";\nexport {\n loadCreateTemplateOptions,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n type CreateTemplateOptions,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n} from \"../cli/commands/templates.js\";\nexport {\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n} from \"../cli/commands/test-runs.js\";\nexport {\n CONFIDENCE_TEXT_VALUES,\n DEPENDENCY_KIND_VALUES,\n ISSUE_SEVERITY_VALUES,\n RISK_VALUES,\n} from \"../types/index.js\";\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type {\n Dependency,\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n ItemType,\n LinkedDoc,\n LinkedFile,\n LinkedTest,\n LogNote,\n PmSettings,\n} from \"../types/index.js\";\n"]}
package/docs/COMMANDS.md CHANGED
@@ -48,6 +48,7 @@ pm health --check-only
48
48
 
49
49
  ```bash
50
50
  pm install '*' --project
51
+ pm package catalog --project
51
52
  pm install npm:@scope/pm-package --project
52
53
  pm package doctor --project --detail summary
53
54
  pm upgrade --dry-run
@@ -56,6 +57,7 @@ pm upgrade --cli-only --repair
56
57
  ```
57
58
 
58
59
  `pm install` and `pm package` are the preferred package-first workflow. `pm install '*'`, shell-expanded `pm install *`, and `pm install all` install bundled first-party packages. `pm extension` remains as a compatibility command for direct extension lifecycle operations.
60
+ When package-owned commands are unavailable, usage guidance includes an install-ready retry (for example `pm install calendar`, `pm install search-advanced`, `pm install governance-audit`, or `pm install guide-shell`).
59
61
 
60
62
  ## Triage
61
63
 
@@ -181,6 +183,7 @@ pm context --from today --to +7d --limit 10
181
183
  ```
182
184
 
183
185
  `calendar` defaults to markdown for human and agent readability. Other commands default to TOON unless configured otherwise.
186
+ 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.
184
187
 
185
188
  ## Validation and Maintenance
186
189
 
@@ -31,12 +31,14 @@ pm package reload --project
31
31
  Compatibility equivalents:
32
32
 
33
33
  ```bash
34
- pm extension init ./my-package
34
+ pm extension init ./my-package # prefer: pm package init ./my-package
35
35
  pm extension install ./my-package --project
36
36
  pm extension doctor --project --detail summary
37
37
  pm extension reload --project
38
38
  ```
39
39
 
40
+ Use compatibility equivalents only for existing automation or for debugging extension-runtime behavior directly.
41
+
40
42
  ## Upgrade Workflow
41
43
 
42
44
  `pm upgrade` is the package-first update entrypoint:
@@ -84,12 +86,29 @@ Package roots can expose resources with a `pm` manifest in `package.json`:
84
86
  "name": "my-pm-package",
85
87
  "keywords": ["pm-package"],
86
88
  "pm": {
87
- "extensions": ["extensions/my-extension"]
89
+ "aliases": ["my-workflow"],
90
+ "extensions": ["extensions/my-extension"],
91
+ "docs": ["README.md"],
92
+ "examples": ["README.md"],
93
+ "catalog": {
94
+ "display_name": "My pm Package",
95
+ "category": "workflow",
96
+ "summary": "Adds a custom workflow to pm.",
97
+ "tags": ["workflow"],
98
+ "links": {
99
+ "docs": "https://example.com/docs",
100
+ "repository": "https://github.com/org/my-pm-package",
101
+ "report": "https://github.com/org/my-pm-package/issues"
102
+ },
103
+ "media": {
104
+ "image": "https://example.com/preview.png"
105
+ }
106
+ }
88
107
  }
89
108
  }
90
109
  ```
91
110
 
92
- The SDK exposes this project-management package model through `PM_PACKAGE_RESOURCE_KINDS`, `PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS`, and `readPmPackageManifest`. Package installation activates runtime extension resources. Agent-specific bundles such as prompts, skills, and MCP servers should live in separate agent adapter packages rather than the core `pm` package contract.
111
+ `pm.aliases` declares short install targets for bundled first-party packages. If aliases are omitted, `pm` derives a default alias from the `packages/pm-*` directory name. The SDK exposes this project-management package model through `PM_PACKAGE_RESOURCE_KINDS`, `PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS`, and `readPmPackageManifest`. Package installation currently activates only `pm.extensions`; `pm.docs` and `pm.examples` are metadata-first catalog resources. Agent-specific bundles such as prompts, skills, and MCP servers should live in separate agent adapter packages rather than the core `pm` package contract.
93
112
 
94
113
  When no manifest is present, `pm` discovers conventional extension directories:
95
114
 
@@ -103,8 +122,10 @@ If a package contains multiple extension manifests, install the exact extension
103
122
  First-party optional packages are shipped as package roots under `packages/`:
104
123
 
105
124
  ```bash
125
+ pm package catalog --project
106
126
  pm install '*' --project
107
127
  pm install all --project
128
+ pm install packages/pm-calendar --project
108
129
  pm install packages/pm-beads --project
109
130
  pm install packages/pm-todos --project
110
131
  ```
@@ -115,11 +136,14 @@ Compatibility aliases remain available:
115
136
 
116
137
  ```bash
117
138
  pm install beads --project
139
+ pm install calendar --project
118
140
  pm install todos --project
119
141
  ```
120
142
 
121
143
  Those aliases install package-shipped extension sources. They are then tracked in managed package state and can be refreshed with `pm upgrade --packages-only`.
122
144
 
145
+ If a package-owned command is invoked before installation (for example `pm calendar --help`, `pm reindex --help`, or `pm normalize --help` in bare core mode), runtime usage guidance now includes a direct recovery command such as `pm install calendar`, `pm install search-advanced`, or `pm install governance-audit`.
146
+
123
147
  ## Manifest Contract
124
148
 
125
149
  ### Manifest v1 (supported)
@@ -273,6 +297,7 @@ pm extension --doctor --project --detail deep --trace
273
297
  Management commands:
274
298
 
275
299
  ```bash
300
+ pm package catalog --project
276
301
  pm package explore
277
302
  pm package manage --project
278
303
  pm package manage --project --runtime-probe
@@ -317,7 +342,7 @@ pm package doctor --project --detail summary --strict-exit
317
342
  - `docs/examples/ci/github-actions-pm-extension-gate.yml`
318
343
  - `docs/examples/ci/gitlab-ci-pm-extension-gate.yml`
319
344
  - `docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile`
320
- # Extensions
345
+ # Extension Runtime Details
321
346
 
322
347
  Extensions let you add or override `pm` runtime behavior without modifying core `pm-cli`.
323
348
 
@@ -332,17 +357,17 @@ This guide is the authoritative reference for:
332
357
  ## Quick Start
333
358
 
334
359
  ```bash
335
- # 1) Scaffold an extension
336
- pm extension --init ./my-extension
360
+ # 1) Scaffold a package-backed extension
361
+ pm package init ./my-package
337
362
 
338
363
  # 2) Install in project scope
339
- pm extension --install --project ./my-extension
364
+ pm install ./my-package --project
340
365
 
341
366
  # 3) Run diagnostics
342
- pm extension --doctor --project --detail summary
367
+ pm package doctor --project --detail summary
343
368
 
344
369
  # 4) Reload runtime modules after local edits
345
- pm extension --reload --project
370
+ pm package reload --project
346
371
  ```
347
372
 
348
373
  ## Delta From Previous Scope
@@ -352,7 +377,7 @@ Compared to the previous policy-only extension surface, this release adds:
352
377
  - **Manifest v2 metadata** for trust, provenance, sandbox profile, and runtime permission declarations.
353
378
  - **Policy v2 controls** for trust mode, provenance requirement, sandbox defaults, and command/action/service allow/block maps.
354
379
  - **Registration enforcement upgrades** so command/action/service restrictions are evaluated at registration boundaries.
355
- - **Hot reload controls** via cache-busted extension reload (`pm extension --reload`) with watch-mode semantics (`--watch`).
380
+ - **Hot reload controls** via cache-busted package reload (`pm package reload`) with watch-mode semantics (`--watch`).
356
381
  - **Contracts metadata upgrades** for trust/sandbox compatibility information in `pm contracts`.
357
382
 
358
383
  ## Extension Locations
@@ -562,27 +587,27 @@ pm extension --doctor --project --detail summary --strict-exit
562
587
  - `docs/examples/ci/github-actions-pm-extension-gate.yml`
563
588
  - `docs/examples/ci/gitlab-ci-pm-extension-gate.yml`
564
589
  - `docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile`
565
- # Extensions
590
+ # Extension Runtime Governance
566
591
 
567
592
  Extensions let you add or override `pm` runtime behavior without editing core `pm-cli` sources. They are loaded at runtime, gated by manifest capabilities, and now support granular governance policies for capability/surface allow/block controls.
568
593
 
569
594
  ## Quick Start
570
595
 
571
596
  ```bash
572
- # 1) Scaffold a new extension
573
- pm extension --init ./my-extension
597
+ # 1) Scaffold a new package
598
+ pm package init ./my-package
574
599
 
575
600
  # 2) Install into project scope
576
- pm extension --install --project ./my-extension
601
+ pm install ./my-package --project
577
602
 
578
- # 3) Run extension diagnostics
579
- pm extension --doctor --project --detail summary
603
+ # 3) Run package diagnostics
604
+ pm package doctor --project --detail summary
580
605
 
581
606
  # 4) Deep diagnostics with traces
582
- pm extension --doctor --project --detail deep --trace
607
+ pm package doctor --project --detail deep --trace
583
608
  ```
584
609
 
585
- Expected summary signals from `extension --doctor`:
610
+ Expected summary signals from `pm package doctor`:
586
611
 
587
612
  - `details.summary.status`: `ok` or `warn`
588
613
  - `details.summary.warning_codes`: deterministic warning code list
@@ -763,27 +788,27 @@ For CI/CD and agents:
763
788
 
764
789
  ## Troubleshooting
765
790
 
766
- - Manifest/entry failures: run `pm extension --explore --project`
767
- - Activation failures: run `pm extension --doctor --detail deep --trace`
791
+ - Manifest/entry failures: run `pm package explore --project`
792
+ - Activation failures: run `pm package doctor --detail deep --trace`
768
793
  - Policy blocks: review `settings.extensions.policy` and `details.summary.policy`
769
794
  - Runtime drift suspicion: compare with `pm --no-extensions <command>`
770
- - Managed-state update-check gaps: run `pm extension --manage --fix-managed-state`
795
+ - Managed-state update-check gaps: run `pm package manage --fix-managed-state`
771
796
 
772
797
  ## Related Docs
773
798
 
774
799
  - `docs/SDK.md`
775
800
  - `docs/examples/starter-extension/README.md`
776
801
  - `docs/CLAUDE_CODE_PLUGIN.md`
777
- # Extensions
802
+ # Extension Runtime Reference
778
803
 
779
804
  Extensions add commands, schema, renderers, importers/exporters, search adapters, lifecycle hooks, and selected runtime overrides without modifying core `pm-cli`.
780
805
 
781
806
  ## Agent Quick Context
782
807
 
783
- - Use `pm extension init ./my-extension` for a starter scaffold.
808
+ - Use `pm package init ./my-package` for a starter scaffold.
784
809
  - Use `@unbrained/pm-cli/sdk` for public extension APIs.
785
810
  - Declare only the capabilities your extension uses.
786
- - Run `pm extension doctor --detail deep --trace` for activation failures.
811
+ - Run `pm package doctor --detail deep --trace` for activation failures.
787
812
  - Use `--no-extensions` to isolate core behavior during incident triage.
788
813
  - Use `pm guide extensions --depth standard` for local docs routing.
789
814
 
@@ -808,8 +833,8 @@ Load order is global, then project. Project extensions take precedence when keys
808
833
  Scaffold:
809
834
 
810
835
  ```bash
811
- pm extension init ./my-extension
812
- pm extension scaffold ./my-extension
836
+ pm package init ./my-package
837
+ pm package scaffold ./my-package
813
838
  ```
814
839
 
815
840
  Install:
@@ -823,29 +848,29 @@ pm install todos --project
823
848
  Inspect and manage:
824
849
 
825
850
  ```bash
826
- pm extension explore --project
827
- pm extension manage --project
828
- pm extension doctor --detail summary
829
- pm extension doctor --detail deep --trace
851
+ pm package explore --project
852
+ pm package manage --project
853
+ pm package doctor --detail summary
854
+ pm package doctor --detail deep --trace
830
855
  ```
831
856
 
832
857
  Activate and deactivate:
833
858
 
834
859
  ```bash
835
- pm extension activate my-extension --project
836
- pm extension deactivate my-extension --project
860
+ pm package activate my-extension --project
861
+ pm package deactivate my-extension --project
837
862
  ```
838
863
 
839
864
  Adopt unmanaged extensions:
840
865
 
841
866
  ```bash
842
- pm extension adopt my-extension --project
843
- pm extension adopt-all --project
867
+ pm package adopt my-extension --project
868
+ pm package adopt-all --project
844
869
  ```
845
870
 
846
871
  ## Install Sources
847
872
 
848
- `pm extension install` accepts:
873
+ `pm install` and `pm package install` accept:
849
874
 
850
875
  - local directories
851
876
  - GitHub HTTPS URLs
@@ -37,6 +37,7 @@ npx @unbrained/pm-cli --help
37
37
  Optional first-party packages are installable on demand:
38
38
 
39
39
  ```bash
40
+ pm package catalog --project
40
41
  pm install '*' --project
41
42
  pm install all --project
42
43
  pm package doctor --project --detail summary
package/docs/RELEASING.md CHANGED
@@ -40,7 +40,7 @@ pnpm version:check
40
40
  - Keep any `release` environment compatible with free GitHub features. This repository is public, so environment secrets and tag/branch deployment rules are compatible with the free GitHub path; do not add paid-only release gates.
41
41
  - Ensure `GITHUB_TOKEN` has `contents: write` for GitHub Release creation.
42
42
  - Keep `package.json` repository, homepage, and bugs URLs aligned with `https://github.com/unbraind/pm-cli`.
43
- - Keep npm automation token settings compatible with provenance publishing. The release workflow must keep `id-token: write`, a GitHub-hosted runner, and `npm publish --access public --provenance`.
43
+ - Keep npm automation token settings compatible with provenance publishing. The release workflow must keep `id-token: write`, a GitHub-hosted runner, and `npm publish --access public --provenance`. npm Trusted Publishing is preferred because it uses OIDC short-lived credentials; if the npm package is configured for Trusted Publishing, restrict traditional token publishing after verifying the workflow.
44
44
 
45
45
  ## Automated Daily Driver
46
46
 
@@ -134,8 +134,9 @@ git push origin v<version>
134
134
  - generated release notes from changelog plus sanitized tracker metadata
135
135
  - artifact uploads
136
136
  - `npm publish --access public --provenance`, skipped on retry when the exact version is already present on npm
137
- - post-publish npm/npx/bunx verification
137
+ - post-publish npm/npx/bunx verification through `scripts/release/verify-published-release.mjs`
138
138
  - GitHub Release creation
139
+ - GitHub Release metadata verification through the same local verification script
139
140
 
140
141
  Monitor:
141
142
 
@@ -151,6 +152,7 @@ npm view @unbrained/pm-cli@<version> version dist.integrity dist.unpackedSize --
151
152
  npx --yes --package @unbrained/pm-cli@<version> -- pm --version
152
153
  bunx --bun @unbrained/pm-cli@<version> pm --version
153
154
  gh release view v<version> --json tagName,name,isDraft,isPrerelease,url
155
+ pnpm release:verify-published -- --version <version>
154
156
  ```
155
157
 
156
158
  The executable remains `pm` even though the npm package is scoped.