@unbrained/pm-cli 2026.5.10 → 2026.5.11

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 (124) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.pi/README.md +10 -1
  3. package/.pi/agents/pm-triage-agent.md +19 -0
  4. package/.pi/agents/pm-verification-agent.md +21 -0
  5. package/.pi/chains/pm-native-delivery.chain.md +11 -0
  6. package/.pi/extensions/pm-cli/index.js +276 -36
  7. package/.pi/skills/pm-native/SKILL.md +6 -2
  8. package/CHANGELOG.md +7 -0
  9. package/README.md +9 -1
  10. package/dist/cli/argv-utils.d.ts +5 -0
  11. package/dist/cli/argv-utils.js +34 -0
  12. package/dist/cli/argv-utils.js.map +1 -0
  13. package/dist/cli/bootstrap-args.d.ts +15 -0
  14. package/dist/cli/bootstrap-args.js +211 -0
  15. package/dist/cli/bootstrap-args.js.map +1 -1
  16. package/dist/cli/commander-usage.js +109 -3
  17. package/dist/cli/commander-usage.js.map +1 -1
  18. package/dist/cli/commands/completion.js +7 -3
  19. package/dist/cli/commands/completion.js.map +1 -1
  20. package/dist/cli/commands/contracts.d.ts +19 -0
  21. package/dist/cli/commands/contracts.js +33 -1
  22. package/dist/cli/commands/contracts.js.map +1 -1
  23. package/dist/cli/commands/create.js +112 -51
  24. package/dist/cli/commands/create.js.map +1 -1
  25. package/dist/cli/commands/docs.js +9 -2
  26. package/dist/cli/commands/docs.js.map +1 -1
  27. package/dist/cli/commands/extension.d.ts +3 -1
  28. package/dist/cli/commands/extension.js +174 -2
  29. package/dist/cli/commands/extension.js.map +1 -1
  30. package/dist/cli/commands/files.js +9 -2
  31. package/dist/cli/commands/files.js.map +1 -1
  32. package/dist/cli/commands/init.d.ts +2 -0
  33. package/dist/cli/commands/init.js +21 -1
  34. package/dist/cli/commands/init.js.map +1 -1
  35. package/dist/cli/commands/metadata-normalizers.d.ts +4 -0
  36. package/dist/cli/commands/metadata-normalizers.js +37 -0
  37. package/dist/cli/commands/metadata-normalizers.js.map +1 -0
  38. package/dist/cli/commands/reindex.js +173 -135
  39. package/dist/cli/commands/reindex.js.map +1 -1
  40. package/dist/cli/commands/search.js +16 -6
  41. package/dist/cli/commands/search.js.map +1 -1
  42. package/dist/cli/commands/test.js +9 -2
  43. package/dist/cli/commands/test.js.map +1 -1
  44. package/dist/cli/commands/update.js +70 -39
  45. package/dist/cli/commands/update.js.map +1 -1
  46. package/dist/cli/error-guidance.d.ts +9 -1
  47. package/dist/cli/error-guidance.js +147 -6
  48. package/dist/cli/error-guidance.js.map +1 -1
  49. package/dist/cli/help-json-payload.js +11 -1
  50. package/dist/cli/help-json-payload.js.map +1 -1
  51. package/dist/cli/main.js +69 -6
  52. package/dist/cli/main.js.map +1 -1
  53. package/dist/cli/register-setup.js +14 -0
  54. package/dist/cli/register-setup.js.map +1 -1
  55. package/dist/cli/telemetry-flush.d.ts +2 -0
  56. package/dist/cli/telemetry-flush.js +4 -0
  57. package/dist/cli/telemetry-flush.js.map +1 -0
  58. package/dist/cli.js +1 -2
  59. package/dist/cli.js.map +1 -1
  60. package/dist/core/extensions/extension-types.d.ts +72 -0
  61. package/dist/core/extensions/extension-types.js +24 -0
  62. package/dist/core/extensions/extension-types.js.map +1 -1
  63. package/dist/core/extensions/loader.d.ts +1 -0
  64. package/dist/core/extensions/loader.js +766 -7
  65. package/dist/core/extensions/loader.js.map +1 -1
  66. package/dist/core/lock/lock.js +2 -0
  67. package/dist/core/lock/lock.js.map +1 -1
  68. package/dist/core/sentry/instrument.d.ts +15 -0
  69. package/dist/core/sentry/instrument.js +35 -3
  70. package/dist/core/sentry/instrument.js.map +1 -1
  71. package/dist/core/shared/constants.js +20 -0
  72. package/dist/core/shared/constants.js.map +1 -1
  73. package/dist/core/shared/errors.d.ts +8 -0
  74. package/dist/core/shared/errors.js.map +1 -1
  75. package/dist/core/shared/levenshtein.d.ts +1 -0
  76. package/dist/core/shared/levenshtein.js +37 -0
  77. package/dist/core/shared/levenshtein.js.map +1 -0
  78. package/dist/core/store/paths.js +34 -1
  79. package/dist/core/store/paths.js.map +1 -1
  80. package/dist/core/store/settings.js +210 -1
  81. package/dist/core/store/settings.js.map +1 -1
  82. package/dist/core/telemetry/runtime.d.ts +1 -0
  83. package/dist/core/telemetry/runtime.js +102 -3
  84. package/dist/core/telemetry/runtime.js.map +1 -1
  85. package/dist/mcp/server.js +3 -1
  86. package/dist/mcp/server.js.map +1 -1
  87. package/dist/pi/native.js +57 -4
  88. package/dist/pi/native.js.map +1 -1
  89. package/dist/sdk/cli-contracts.d.ts +21 -1
  90. package/dist/sdk/cli-contracts.js +250 -0
  91. package/dist/sdk/cli-contracts.js.map +1 -1
  92. package/dist/sdk/index.d.ts +12 -1
  93. package/dist/sdk/index.js +8 -1
  94. package/dist/sdk/index.js.map +1 -1
  95. package/dist/types.d.ts +41 -0
  96. package/dist/types.js.map +1 -1
  97. package/docs/CLAUDE_CODE_PLUGIN.md +39 -0
  98. package/docs/EXTENSIONS.md +687 -0
  99. package/docs/MIGRATION_CLI_SIMPLIFICATION.md +64 -0
  100. package/docs/PI_PACKAGE.md +95 -10
  101. package/docs/SDK.md +441 -0
  102. package/docs/examples/ci/github-actions-pm-extension-gate.yml +53 -0
  103. package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +41 -0
  104. package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +45 -0
  105. package/docs/examples/policy-restricted-extension/README.md +74 -0
  106. package/docs/examples/policy-restricted-extension/index.js +21 -0
  107. package/docs/examples/policy-restricted-extension/manifest.json +21 -0
  108. package/docs/examples/policy-restricted-extension/package.json +8 -0
  109. package/docs/examples/sdk-app-embedding/README.md +39 -0
  110. package/docs/examples/sdk-app-embedding/package.json +9 -0
  111. package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +61 -0
  112. package/docs/examples/sdk-contract-consumer/README.md +57 -0
  113. package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +47 -0
  114. package/docs/examples/sdk-contract-consumer/package.json +10 -0
  115. package/docs/examples/starter-extension/README.md +57 -42
  116. package/docs/examples/starter-extension/manifest.json +15 -0
  117. package/marketplace.json +3 -3
  118. package/package.json +1 -1
  119. package/plugins/pm-cli-claude/.claude-plugin/plugin.json +2 -2
  120. package/plugins/pm-cli-claude/README.md +55 -14
  121. package/plugins/pm-cli-claude/agents/pm-delivery-chain.md +88 -0
  122. package/plugins/pm-cli-claude/agents/pm-triage-agent.md +83 -0
  123. package/plugins/pm-cli-claude/agents/pm-verification-agent.md +88 -0
  124. package/plugins/pm-cli-claude/hooks/session-start.mjs +87 -22
@@ -8,6 +8,17 @@ export * from "./cli-contracts.js";
8
8
  */
9
9
  export declare const EXTENSION_CAPABILITIES: readonly ["commands", "renderers", "hooks", "schema", "importers", "search", "parser", "preflight", "services"];
10
10
  export type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];
11
+ /**
12
+ * Canonical extension governance policy modes and registration surfaces.
13
+ */
14
+ export declare const EXTENSION_POLICY_MODES: readonly ["off", "warn", "enforce"];
15
+ export declare const EXTENSION_POLICY_SURFACES: readonly ["commands.override", "commands.handler", "hooks.beforecommand", "hooks.aftercommand", "hooks.onwrite", "hooks.onread", "hooks.onindex", "schema.flags", "schema.itemfields", "schema.itemtypes", "schema.migrations", "parser.override", "preflight.override", "services.override", "renderers.override", "importers.importer", "importers.exporter", "search.provider", "search.vectorstore"];
16
+ export declare const EXTENSION_TRUST_MODES: readonly ["off", "warn", "enforce"];
17
+ export declare const EXTENSION_SANDBOX_PROFILES: readonly ["none", "restricted", "strict"];
18
+ export type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];
19
+ export type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];
20
+ export type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];
21
+ export type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];
11
22
  /**
12
23
  * Versioned capability contract metadata emitted by runtime diagnostics.
13
24
  */
@@ -29,6 +40,6 @@ export interface ExtensionModule {
29
40
  * `export default defineExtension({ activate(api) { ... } })`
30
41
  */
31
42
  export declare function defineExtension<TModule extends ExtensionModule>(module: TModule): TModule;
32
- export type { AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDiagnostic, ExtensionDiscoveryResult, ExtensionLoadResult, ExtensionManifest, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
43
+ export type { AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDiagnostic, ExtensionDiscoveryResult, ExtensionLoadResult, ExtensionManifest, ExtensionGovernancePolicy, ExtensionPolicyOverride, ExtensionProvenanceMetadata, ExtensionRuntimePermissionDeclaration, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
33
44
  export type { GlobalOptions } from "../core/shared/command-types.js";
34
45
  export type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from "../types/index.js";
package/dist/sdk/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, KNOWN_EXTENSION_CAPABILITIES, } from "../core/extensions/loader.js";
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 * from "./cli-contracts.js";
3
3
  /**
4
4
  * Canonical extension capability names accepted by pm.
@@ -7,6 +7,13 @@ export * from "./cli-contracts.js";
7
7
  * `capabilities`.
8
8
  */
9
9
  export const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;
10
+ /**
11
+ * Canonical extension governance policy modes and registration surfaces.
12
+ */
13
+ export const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;
14
+ export const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;
15
+ export const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;
16
+ export const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;
10
17
  /**
11
18
  * Versioned capability contract metadata emitted by runtime diagnostics.
12
19
  */
@@ -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,GAG7B,MAAM,8BAA8B,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAGnE;;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 type ExtensionApi,\n type ExtensionManifest,\n} from \"../core/extensions/loader.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 * 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 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,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 * 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"]}
package/dist/types.d.ts CHANGED
@@ -314,6 +314,46 @@ export interface GovernanceSettings {
314
314
  metadata_profile: ValidateMetadataProfile;
315
315
  force_required_for_stale_lock: boolean;
316
316
  }
317
+ export type ExtensionPolicyMode = "off" | "warn" | "enforce";
318
+ export type ExtensionTrustMode = "off" | "warn" | "enforce";
319
+ export type ExtensionSandboxProfile = "none" | "restricted" | "strict";
320
+ export interface ExtensionPolicyOverrideSettings {
321
+ name: string;
322
+ disabled?: boolean;
323
+ require_trusted?: boolean;
324
+ require_provenance?: boolean;
325
+ sandbox_profile?: ExtensionSandboxProfile;
326
+ allowed_capabilities?: string[];
327
+ blocked_capabilities?: string[];
328
+ allowed_surfaces?: string[];
329
+ blocked_surfaces?: string[];
330
+ allowed_commands?: string[];
331
+ blocked_commands?: string[];
332
+ allowed_actions?: string[];
333
+ blocked_actions?: string[];
334
+ allowed_services?: string[];
335
+ blocked_services?: string[];
336
+ }
337
+ export interface ExtensionPolicySettings {
338
+ mode: ExtensionPolicyMode;
339
+ trust_mode: ExtensionTrustMode;
340
+ require_provenance: boolean;
341
+ trusted_extensions: string[];
342
+ default_sandbox_profile: ExtensionSandboxProfile;
343
+ allowed_extensions: string[];
344
+ blocked_extensions: string[];
345
+ allowed_capabilities: string[];
346
+ blocked_capabilities: string[];
347
+ allowed_surfaces: string[];
348
+ blocked_surfaces: string[];
349
+ allowed_commands: string[];
350
+ blocked_commands: string[];
351
+ allowed_actions: string[];
352
+ blocked_actions: string[];
353
+ allowed_services: string[];
354
+ blocked_services: string[];
355
+ extension_overrides: ExtensionPolicyOverrideSettings[];
356
+ }
317
357
  export interface PmSettings {
318
358
  version: number;
319
359
  id_prefix: string;
@@ -360,6 +400,7 @@ export interface PmSettings {
360
400
  extensions: {
361
401
  enabled: string[];
362
402
  disabled: string[];
403
+ policy: ExtensionPolicySettings;
363
404
  };
364
405
  search: {
365
406
  score_threshold: number;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"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","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"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","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
@@ -156,6 +156,34 @@ node scripts/smoke-codex-plugin-mcp.mjs
156
156
  pnpm smoke:codex-plugin
157
157
  ```
158
158
 
159
+ ### Contract-safe preflight (recommended for CI agents)
160
+
161
+ ```bash
162
+ pm contracts --schema-only --json
163
+ pm contracts --command extension --flags-only --json
164
+ pm extension --doctor --project --detail summary --strict-exit
165
+ pm extension --reload --project
166
+ ```
167
+
168
+ Why this matters:
169
+
170
+ - `pm contracts` is extension-aware and reflects active runtime action/flag surfaces.
171
+ - `extension --doctor` now includes policy diagnostics and deterministic warning codes.
172
+ - `extension --reload` provides cache-busted module reload for extension dev loops.
173
+ - `--strict-exit` turns warning states into CI-failing exits when governance gates require it.
174
+
175
+ ### CLI simplification compatibility notes
176
+
177
+ The conservative CLI simplification pass adds invocation normalization and replay metadata that plugin/tooling flows should consume:
178
+
179
+ - long-option aliases/shape variants and high-confidence typos are normalized before parse
180
+ - setup resolution can auto-discover initialized tracker roots from ancestor directories
181
+ - structured error envelopes may include `recovery` with replay-ready guidance (`attempted_command`, `normalized_args`, `provided_fields`, `missing`, `suggested_retry`)
182
+
183
+ For migration details and automation expectations, see:
184
+
185
+ - [CLI Simplification Migration](MIGRATION_CLI_SIMPLIFICATION.md)
186
+
159
187
  ### Validate manifests
160
188
 
161
189
  ```bash
@@ -184,3 +212,14 @@ After installing the plugin:
184
212
  | 2026.5.x+ | 1.0.0 | Any current |
185
213
 
186
214
  The MCP server uses JSON-RPC 2.0 over stdio with protocol version `2025-06-18`.
215
+
216
+ ## Extension Policy Diagnostics
217
+
218
+ When extension governance policy is configured (`settings.extensions.policy`), plugin and MCP automation can surface:
219
+
220
+ - `extension_policy_violation_*` warnings in warn mode
221
+ - `extension_policy_blocked_*` warnings in enforce mode
222
+ - `extension_policy_*_trust` warnings for trust/provenance gates
223
+ - policy summary counters under `extension doctor` details (`summary.policy` + `triage.policy_*`)
224
+
225
+ This enables contract-safe and policy-safe automation without falling back to shell heuristics.