@unbrained/pm-cli 2026.8.12 → 2026.8.13

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 (173) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +22 -0
  3. package/dist/cli/error-guidance.js +4 -8
  4. package/dist/cli/main.js +3 -2
  5. package/dist/cli/register-assurance.js +28 -17
  6. package/dist/cli-bundle/bundle-manifest.json +161 -161
  7. package/dist/cli-bundle/chunks/chunk-3ZMOWAFM.js +2 -0
  8. package/dist/cli-bundle/chunks/chunk-DEDU3DG7.js +196 -0
  9. package/dist/cli-bundle/chunks/chunk-DL5M5J3V.js +13 -0
  10. package/dist/cli-bundle/chunks/chunk-F7FJYGK3.js +8 -0
  11. package/dist/cli-bundle/chunks/{chunk-RBTK5EZV.js → chunk-HIUZVCMN.js} +2 -2
  12. package/dist/cli-bundle/chunks/chunk-IMGIN7R6.js +2 -0
  13. package/dist/cli-bundle/chunks/{chunk-WLAHPSOX.js → chunk-Q47C67TQ.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-BM5YJ2UW.js → chunk-QGTUPEU5.js} +52 -52
  15. package/dist/cli-bundle/chunks/chunk-TF3TPKPR.js +34 -0
  16. package/dist/cli-bundle/chunks/{chunk-KOQMGCTA.js → chunk-YLBAPY22.js} +50 -50
  17. package/dist/cli-bundle/chunks/{register-list-query-XPCJRUUD.js → register-list-query-4HIZ7EA3.js} +2 -2
  18. package/dist/cli-bundle/chunks/{register-mutation-4RJCBKRS.js → register-mutation-W64FZ5HN.js} +2 -2
  19. package/dist/cli-bundle/chunks/register-operations-C44ET7R5.js +2 -0
  20. package/dist/cli-bundle/chunks/{register-setup-LLHAKP2V.js → register-setup-634MFRXU.js} +2 -2
  21. package/dist/cli-bundle/focused-chunks/chunk-27N23W6M.js +31 -0
  22. package/dist/cli-bundle/focused-chunks/{chunk-YIAXMC3T.js → chunk-2JP7W7GO.js} +2 -2
  23. package/dist/cli-bundle/focused-chunks/chunk-2RI2FESN.js +4 -0
  24. package/dist/cli-bundle/focused-chunks/chunk-3BNVU6LC.js +8 -0
  25. package/dist/cli-bundle/focused-chunks/{chunk-KHM2CS2C.js → chunk-3DJSGWVB.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/{chunk-2DALMVF7.js → chunk-6MLIRBLV.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/chunk-6XYLENDV.js +155 -0
  28. package/dist/cli-bundle/focused-chunks/chunk-CP4K4WFS.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-RWPAWUOT.js → chunk-E3AVJ655.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-5TAGTDRE.js → chunk-EBTNSFYE.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-KPSXVBDV.js → chunk-HC2OL2H2.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-GQW4BPUT.js → chunk-I75MANL7.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-ZMGWAYH7.js → chunk-IIS2FRKL.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-NFHFZH2Z.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-OGC4XSBC.js +17 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-JAFRIWVF.js → chunk-OOYYKQWX.js} +4 -4
  37. package/dist/cli-bundle/focused-chunks/{chunk-KTLOKKCQ.js → chunk-PKPOZXLL.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-QDZUABWL.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-QQX5TDFT.js +16 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-NYLOUPOB.js → chunk-TEZIXMTH.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-WEH6NSL6.js +18 -0
  42. package/dist/cli-bundle/main.js +13 -13
  43. package/dist/cli-bundle/sdk-authoring.js +1 -1
  44. package/dist/cli-bundle/sdk-contracts.js +1 -1
  45. package/dist/cli-bundle/sdk-core.js +42 -41
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-graph.js +1 -1
  48. package/dist/cli-bundle/sdk-merge.js +1 -1
  49. package/dist/cli-bundle/sdk-query.js +1 -1
  50. package/dist/cli-bundle/sdk-runtime.js +1 -1
  51. package/dist/cli-bundle/sdk-testing.js +1 -1
  52. package/dist/cli-bundle/sdk.js +2 -2
  53. package/dist/core/checkpoint/checkpoint-gc.js +7 -12
  54. package/dist/core/extensions/activation-summary-markdown.js +5 -4
  55. package/dist/core/extensions/activation-summary.d.ts +2 -0
  56. package/dist/core/extensions/activation-summary.js +6 -2
  57. package/dist/core/extensions/capability-usage.d.ts +1 -1
  58. package/dist/core/extensions/capability-usage.js +4 -3
  59. package/dist/core/extensions/contribution-inventory.d.ts +1 -0
  60. package/dist/core/extensions/contribution-inventory.js +6 -2
  61. package/dist/core/extensions/extension-registries.js +3 -2
  62. package/dist/core/extensions/extension-types.d.ts +83 -1
  63. package/dist/core/extensions/extension-types.js +3 -2
  64. package/dist/core/extensions/loader.d.ts +2 -8
  65. package/dist/core/extensions/loader.js +53 -144
  66. package/dist/core/extensions/registration-values.d.ts +43 -0
  67. package/dist/core/extensions/registration-values.js +210 -0
  68. package/dist/core/extensions/runtime-registrations.d.ts +3 -1
  69. package/dist/core/extensions/runtime-registrations.js +12 -2
  70. package/dist/core/fs/fs-utils.d.ts +2 -0
  71. package/dist/core/fs/fs-utils.js +7 -3
  72. package/dist/core/history/drift-cache.js +4 -3
  73. package/dist/core/history/drift-scan.js +5 -11
  74. package/dist/core/lock/lock-gc.js +8 -13
  75. package/dist/core/lock/lock.js +5 -4
  76. package/dist/core/search/vector-stores.js +6 -11
  77. package/dist/core/store/item-metadata-cache.js +4 -4
  78. package/dist/core/telemetry/runtime.d.ts +6 -0
  79. package/dist/core/telemetry/runtime.js +101 -30
  80. package/dist/sdk/agent/command-recovery.d.ts +2 -0
  81. package/dist/sdk/agent/command-recovery.js +10 -2
  82. package/dist/sdk/annotations.js +4 -4
  83. package/dist/sdk/cli-contracts/completeness.js +9 -3
  84. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  85. package/dist/sdk/cli-contracts/flag-contracts.js +6 -3
  86. package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +32 -0
  87. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +25 -2
  88. package/dist/sdk/cli-contracts/tool-parameter-tables.js +35 -5
  89. package/dist/sdk/cli-contracts/tool-schema.js +17 -2
  90. package/dist/sdk/comments.js +4 -3
  91. package/dist/sdk/compile-cache.js +4 -3
  92. package/dist/sdk/compose.d.ts +3 -1
  93. package/dist/sdk/compose.js +16 -2
  94. package/dist/sdk/context-signal-store.js +4 -3
  95. package/dist/sdk/extension/install-runtime.js +4 -4
  96. package/dist/sdk/extension/managed-state.js +4 -3
  97. package/dist/sdk/extension-contracts.d.ts +1 -1
  98. package/dist/sdk/flag-invocation-contracts.js +5 -6
  99. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +14 -2
  100. package/dist/sdk/governance/assurance-action.d.ts +27 -3
  101. package/dist/sdk/governance/assurance-action.js +112 -28
  102. package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
  103. package/dist/sdk/governance/assurance-mutation-error.js +25 -2
  104. package/dist/sdk/governance/assurance-presets.d.ts +54 -0
  105. package/dist/sdk/governance/assurance-presets.js +136 -0
  106. package/dist/sdk/governance/assurance-runtime.d.ts +4 -0
  107. package/dist/sdk/governance/assurance-runtime.js +109 -8
  108. package/dist/sdk/governance/assurance.d.ts +39 -0
  109. package/dist/sdk/governance/assurance.js +143 -4
  110. package/dist/sdk/governance/gc.js +5 -11
  111. package/dist/sdk/governance/health.js +5 -5
  112. package/dist/sdk/governance/validate.js +4 -4
  113. package/dist/sdk/graph/durable-cache.js +61 -3
  114. package/dist/sdk/graph/governance-contracts.d.ts +12 -0
  115. package/dist/sdk/graph/governance-contracts.js +27 -0
  116. package/dist/sdk/graph/governance.d.ts +30 -2
  117. package/dist/sdk/graph/governance.js +124 -5
  118. package/dist/sdk/guide.js +4 -4
  119. package/dist/sdk/index.d.ts +2 -1
  120. package/dist/sdk/index.js +4 -3
  121. package/dist/sdk/linked-artifacts.d.ts +2 -0
  122. package/dist/sdk/linked-artifacts.js +29 -4
  123. package/dist/sdk/merge/install.js +5 -4
  124. package/dist/sdk/query/activity.js +4 -3
  125. package/dist/sdk/relationship-history.js +5 -5
  126. package/dist/sdk/schema-migration.js +4 -4
  127. package/dist/sdk/test/execution.js +4 -4
  128. package/dist/sdk/workspace-memory.js +4 -4
  129. package/dist/sdk/workspace-snapshot.js +8 -14
  130. package/dist/sdk/workspace-transaction-gc.js +4 -9
  131. package/dist/sdk/workspace-transaction.js +4 -4
  132. package/dist/sdk/workspace.js +4 -3
  133. package/docs/ASSURANCE.md +154 -3
  134. package/docs/CONFIGURATION.md +2 -0
  135. package/docs/EXTENSIONS.md +11 -12
  136. package/docs/RELATIONSHIP_GRAPH.md +15 -0
  137. package/docs/SDK.md +17 -3
  138. package/docs/TESTING.md +24 -15
  139. package/marketplace.json +2 -2
  140. package/package.json +3 -3
  141. package/packages/pm-beads/package.json +1 -1
  142. package/packages/pm-calendar/package.json +1 -1
  143. package/packages/pm-command-kit/package.json +1 -1
  144. package/packages/pm-digital-twin/package.json +1 -1
  145. package/packages/pm-governance-audit/package.json +1 -1
  146. package/packages/pm-guide-shell/package.json +1 -1
  147. package/packages/pm-kanban/package.json +1 -1
  148. package/packages/pm-lifecycle-hooks/package.json +1 -1
  149. package/packages/pm-linked-test-adapters/package.json +1 -1
  150. package/packages/pm-search-advanced/package.json +1 -1
  151. package/packages/pm-templates/package.json +1 -1
  152. package/packages/pm-todos/package.json +1 -1
  153. package/packages/pm-vcs/package.json +1 -1
  154. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  155. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  156. package/sdk/public-surface.json +183 -33
  157. package/dist/cli-bundle/chunks/chunk-3PS7X6GS.js +0 -8
  158. package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +0 -13
  159. package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +0 -33
  160. package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +0 -196
  161. package/dist/cli-bundle/chunks/chunk-R76342NV.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-VLUQOIDT.js +0 -2
  163. package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +0 -2
  164. package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +0 -155
  165. package/dist/cli-bundle/focused-chunks/chunk-ECADZMVC.js +0 -18
  166. package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +0 -2
  167. package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +0 -16
  168. package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +0 -2
  169. package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +0 -8
  170. package/dist/cli-bundle/focused-chunks/chunk-NBLUKITQ.js +0 -4
  171. package/dist/cli-bundle/focused-chunks/chunk-Q4T463SD.js +0 -31
  172. package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +0 -2
  173. package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +0 -17
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
9
- "version": "2026.8.12"
9
+ "version": "2026.8.13"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "pm-claude",
14
14
  "source": "./plugins/pm-claude",
15
15
  "description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
16
- "version": "2026.8.12",
16
+ "version": "2026.8.13",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.8.13 - 2026-08-13
4
+
5
+ ### Added
6
+
7
+ - Assurance presets and self-derivation: a new workspace acquires a working quality contract in one command, seeded from its own record rather than from a generic template ([pm-m7bb7r](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-m7bb7r.toon))
8
+ - Measurement provider API: extensions contribute measurement sources, so a coverage percentage, a benchmark millisecond, an eval score, an RL episode reward, or a registry dist-tag is bounded on the same terms as an item count ([pm-uhv1m5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-uhv1m5.toon))
9
+
10
+ ### Fixed
11
+
12
+ - The relationship graph's only automated reader is a nine-field census with no structural property, so the deepest enforceable statement about an 11,291-edge record is that every active item has two edges ([pm-4vz6mz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-4vz6mz.toon))
13
+ - The measurement ratchet has a single polarity: a filed number can only be enforced as a ceiling, so no quality floor this project wants to hold is expressible ([pm-g4k74y](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-g4k74y.toon))
14
+ - Telemetry flush reliability: configurable cold-connect timeout without foreground blocking ([pm-pmwozm](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-pmwozm.toon))
15
+ - The real all-package install is budgeted in one of its two instances, so the coverage gate flakes and then reports no coverage verdict at all ([pm-h9gsix](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-h9gsix.toon))
16
+ - Absence-tolerant readers accept only ENOENT, so a tracker root that is a regular file raises an unclassified fault instead of the typed refusal the guard already owns — and that fault blocks the daily release ([pm-6xlyss](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-6xlyss.toon))
17
+ - Mixed linked-resource remove and add in one command silently favors removal ([pm-c6urop](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-c6urop.toon))
18
+ - Global flags before a subcommand corrupt guided-error command examples by treating the flag value as the command ([pm-lph0y6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-lph0y6.toon))
19
+
20
+ ### Other
21
+
22
+ - ADR: Lifecycle-sensitive graph partitions are advisory; stable all-status outcomes carry blocking assurance ([pm-dczodv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/decisions/pm-dczodv.toon))
23
+ - The Windows nightly leg cannot separate product defects from harness noise: 744 hardcoded POSIX path literals and 203 raw errno strings in the suite fail on Windows for reasons unrelated to pm behaviour ([pm-j668gl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-j668gl.toon))
24
+
3
25
  ## 2026.8.12 - 2026-08-12
4
26
 
5
27
  ### Fixed
@@ -1,5 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0203943b-16ea-5c3a-a2d3-56a0c4d2848f")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9ec35c35-f2dc-5f86-a166-cf0c80eab1bd")}catch(e){}}();
3
+ import { resolveRecoveryCommandName } from "../sdk/agent/command-recovery.js";
3
4
  import { renderPmCommand } from "./argv-utils.js";
4
5
  import { discoverNearbyPmRoot } from "../sdk/tracker-root-discovery.js";
5
6
  /** Compact an error envelope to fields that change the caller's next action. */
@@ -341,12 +342,7 @@ function dedupeStrings(values) {
341
342
  return result;
342
343
  }
343
344
  function inferCommandNameFromRecovery(recovery) {
344
- const args = recovery?.normalized_args;
345
- if (!Array.isArray(args) || args.length === 0) {
346
- return undefined;
347
- }
348
- const firstCommandArg = args.find((arg) => arg.trim().length > 0 && !arg.startsWith("-"));
349
- return firstCommandArg?.trim();
345
+ return resolveRecoveryCommandName(recovery?.normalized_args);
350
346
  }
351
347
  function inferAllowedValuesFromMessage(message) {
352
348
  const match = message.match(/\bmust be one of:?\s+([A-Za-z0-9_.|,\- ]+)/i);
@@ -1201,4 +1197,4 @@ export const _testOnly = {
1201
1197
  resolveKnownPackageCommandHint,
1202
1198
  };
1203
1199
  //# sourceMappingURL=error-guidance.js.map
1204
- //# debugId=0203943b-16ea-5c3a-a2d3-56a0c4d2848f
1200
+ //# debugId=9ec35c35-f2dc-5f86-a166-cf0c80eab1bd
package/dist/cli/main.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * @module cli/main
4
4
  */
5
5
 
6
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6eb8f2a6-6096-54af-a3dc-eb15fdbe5999")}catch(e){}}();
6
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8aed7a8b-4c51-5aba-b27e-80f87f8f3d35")}catch(e){}}();
7
7
  import { Command } from "commander";
8
8
  import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
9
9
  import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
@@ -938,6 +938,7 @@ function hasGlobalExtensionContributions(contributions) {
938
938
  entriesOrEmpty(contributions.item_fields).length,
939
939
  entriesOrEmpty(contributions.relationship_kinds).length,
940
940
  entriesOrEmpty(contributions.service_overrides).length,
941
+ entriesOrEmpty(contributions.assurance_providers).length,
941
942
  entriesOrEmpty(contributions.renderer_overrides).length -
942
943
  entriesOrEmpty(contributions.renderer_ownership).length,
943
944
  ];
@@ -2474,4 +2475,4 @@ export const _testOnly = {
2474
2475
  wrapThrownErrorForSentry,
2475
2476
  };
2476
2477
  //# sourceMappingURL=main.js.map
2477
- //# debugId=6eb8f2a6-6096-54af-a3dc-eb15fdbe5999
2478
+ //# debugId=8aed7a8b-4c51-5aba-b27e-80f87f8f3d35
@@ -1,16 +1,21 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1adbac08-0950-55be-82bf-cc4dc7b6ad18")}catch(e){}}();
3
- import { ASSURANCE_ACTIONS, ASSURANCE_DECLARATION_KINDS, runAssuranceAction, } from "../sdk/governance/assurance-action.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41d01430-1e95-5f09-9a2f-7e7f8fad8184")}catch(e){}}();
3
+ import { runAssuranceAction } from "../sdk/governance/assurance-action.js";
4
4
  import { printResult } from "../sdk/runtime-primitives.js";
5
5
  import { getGlobalOptions, readOptionString } from "./registration-helpers.js";
6
6
  async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
7
7
  const global = getGlobalOptions(command);
8
8
  const isRun = action === "run";
9
9
  const isVerdicts = action === "verdicts";
10
+ const isPresetAction = action === "presets" || action === "apply";
11
+ const isPromote = action === "promote";
10
12
  const result = await runAssuranceAction({
11
13
  action,
12
- ...(isRun || isVerdicts ? {} : { kind: kindOrGate }),
13
- id: isRun || isVerdicts ? (id ?? kindOrGate) : id,
14
+ ...(isRun || isVerdicts || isPresetAction || isPromote
15
+ ? {}
16
+ : { kind: kindOrGate }),
17
+ id: isRun || isVerdicts || isPromote ? (id ?? kindOrGate) : id,
18
+ preset: isPresetAction ? (id ?? kindOrGate) : undefined,
14
19
  definition: readOptionString(options, "definition"),
15
20
  trigger: readOptionString(options, "trigger"),
16
21
  tree: readOptionString(options, "tree"),
@@ -21,6 +26,9 @@ async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
21
26
  idOnly: global.idOnly,
22
27
  author: readOptionString(options, "author"),
23
28
  message: readOptionString(options, "message"),
29
+ owner: readOptionString(options, "owner"),
30
+ apply: options.apply === true,
31
+ enforcement: readOptionString(options, "enforcement"),
24
32
  }, global);
25
33
  printResult(result, global);
26
34
  if (typeof result === "object" &&
@@ -34,19 +42,22 @@ async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
34
42
  export function registerAssuranceCommand(program) {
35
43
  program
36
44
  .command("assurance")
37
- .argument("<action>", `Action: ${ASSURANCE_ACTIONS.join(", ")}`)
38
- .argument("[kind]", `Declaration kind: ${ASSURANCE_DECLARATION_KINDS.join(", ")}; for run this may be the gate id`)
39
- .argument("[id]", "Declaration or gate id")
40
- .description("Declare and evaluate SDK-owned project assurance contracts.")
41
- .option("--definition <json>", "JSON declaration for put")
42
- .option("--trigger <value>", "Gate lifecycle trigger")
43
- .option("--tree <value>", "Commit, tree, or snapshot identity being judged")
44
- .option("--gate <id>", "Filter verdict history by gate id")
45
- .option("--limit <number>", "Maximum newest verdicts returned")
46
- .option("--dry-run", "Evaluate a gate without appending a verdict")
47
- .option("--author <value>", "Mutation author override")
48
- .option("--message <value>", "Audited mutation rationale")
45
+ .argument("<action>", "Action; inspect `pm contracts --command assurance`")
46
+ .argument("[kind]", "Declaration kind or run gate id")
47
+ .argument("[id]", "Declaration/gate id")
48
+ .description("Manage SDK-owned assurance contracts.")
49
+ .option("--definition <json>", "Put declaration JSON")
50
+ .option("--trigger <value>", "Gate trigger")
51
+ .option("--tree <value>", "Revision identity")
52
+ .option("--gate <id>", "Verdict gate filter")
53
+ .option("--limit <number>", "Verdict limit")
54
+ .option("--dry-run", "Evaluate without recording")
55
+ .option("--author <value>", "Mutation author")
56
+ .option("--message <value>", "Mutation rationale")
57
+ .option("--owner <item-id>", "Preset/derivation owner")
58
+ .option("--apply", "Persist derived proposals")
59
+ .option("--enforcement <level>", "Promote to warn or block")
49
60
  .action(runAssuranceCliAction);
50
61
  }
51
62
  //# sourceMappingURL=register-assurance.js.map
52
- //# debugId=1adbac08-0950-55be-82bf-cc4dc7b6ad18
63
+ //# debugId=41d01430-1e95-5f09-9a2f-7e7f8fad8184