@unbrained/pm-cli 2026.8.13 → 2026.8.15

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 (194) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +165 -113
  3. package/dist/cli/commander-usage.js +17 -4
  4. package/dist/cli/error-guidance.d.ts +2 -0
  5. package/dist/cli/error-guidance.js +52 -25
  6. package/dist/cli/main.js +40 -3
  7. package/dist/cli/register-mutation.js +4 -2
  8. package/dist/cli/register-operations.js +5 -5
  9. package/dist/cli-bundle/bundle-manifest.json +146 -178
  10. package/dist/cli-bundle/chunks/{chunk-F7FJYGK3.js → chunk-24GAV7XL.js} +2 -2
  11. package/dist/cli-bundle/chunks/chunk-AIM6VT2N.js +13 -0
  12. package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +197 -0
  13. package/dist/cli-bundle/chunks/{chunk-Q47C67TQ.js → chunk-J42EGKDK.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +2 -0
  15. package/dist/cli-bundle/chunks/{chunk-3ZMOWAFM.js → chunk-KLKYLSDX.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-QGTUPEU5.js → chunk-LJHOAVGI.js} +59 -59
  17. package/dist/cli-bundle/chunks/chunk-MEM2ZS3O.js +5 -0
  18. package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +35 -0
  19. package/dist/cli-bundle/chunks/{chunk-YLBAPY22.js → chunk-WLPDLNEZ.js} +2 -2
  20. package/dist/cli-bundle/chunks/{register-list-query-4HIZ7EA3.js → register-list-query-CT3LFDDN.js} +2 -2
  21. package/dist/cli-bundle/chunks/{register-mutation-W64FZ5HN.js → register-mutation-NWEVA5YS.js} +3 -3
  22. package/dist/cli-bundle/chunks/register-operations-AHIAG5KM.js +2 -0
  23. package/dist/cli-bundle/chunks/{register-setup-634MFRXU.js → register-setup-ZJZFVAKE.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +2 -0
  25. package/dist/cli-bundle/focused-chunks/chunk-6XKF3PGV.js +18 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-I75MANL7.js → chunk-EXZA4257.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-ITAUHSO6.js +50 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-OOYYKQWX.js → chunk-KLVUMNXJ.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-2RI2FESN.js → chunk-KT5XMYSX.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-E3AVJ655.js → chunk-KTKH4IMG.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-M67F5AIN.js +8 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-3DJSGWVB.js → chunk-NSPYTG6G.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +155 -0
  37. package/dist/cli-bundle/focused-chunks/{chunk-IIS2FRKL.js → chunk-SLKC6QLJ.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-WTSER4WJ.js +16 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-2JP7W7GO.js → chunk-ZMFXQ7VF.js} +2 -2
  41. package/dist/cli-bundle/main.js +13 -13
  42. package/dist/cli-bundle/sdk-authoring.js +1 -1
  43. package/dist/cli-bundle/sdk-contracts.js +1 -1
  44. package/dist/cli-bundle/sdk-core.js +41 -41
  45. package/dist/cli-bundle/sdk-governance.js +1 -1
  46. package/dist/cli-bundle/sdk-graph.js +1 -1
  47. package/dist/cli-bundle/sdk-merge.js +110 -1
  48. package/dist/cli-bundle/sdk-query.js +1 -1
  49. package/dist/cli-bundle/sdk-runtime.js +1 -1
  50. package/dist/cli-bundle/sdk-testing.js +1 -1
  51. package/dist/cli-bundle/sdk.js +2 -2
  52. package/dist/core/diagnostics/remediation.js +7 -2
  53. package/dist/core/extensions/reserved-host-flags.js +3 -2
  54. package/dist/core/history/drift-scan.d.ts +6 -0
  55. package/dist/core/history/drift-scan.js +74 -50
  56. package/dist/core/history/replay.d.ts +14 -1
  57. package/dist/core/history/replay.js +45 -8
  58. package/dist/core/history/workspace-history.d.ts +59 -0
  59. package/dist/core/history/workspace-history.js +197 -10
  60. package/dist/core/output/output.d.ts +2 -0
  61. package/dist/core/output/output.js +13 -4
  62. package/dist/core/shared/command-types.d.ts +2 -0
  63. package/dist/core/shared/command-types.js +2 -2
  64. package/dist/core/shared/errors.d.ts +12 -0
  65. package/dist/core/shared/errors.js +2 -2
  66. package/dist/mcp/tool-definitions.js +9 -5
  67. package/dist/sdk/agent/refusal-reachability.d.ts +61 -0
  68. package/dist/sdk/agent/refusal-reachability.js +91 -3
  69. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  70. package/dist/sdk/cli-bootstrap.js +7 -2
  71. package/dist/sdk/cli-contracts/completeness.js +3 -2
  72. package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
  73. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  74. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -1
  75. package/dist/sdk/cli-contracts/runtime-contracts.js +176 -65
  76. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -5
  77. package/dist/sdk/cli-contracts/tool-schema.js +10 -3
  78. package/dist/sdk/cli-program.js +4 -3
  79. package/dist/sdk/context-relevance.js +12 -4
  80. package/dist/sdk/core.d.ts +2 -2
  81. package/dist/sdk/core.js +3 -3
  82. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +26 -2
  83. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -26
  84. package/dist/sdk/governance/assurance-action.d.ts +7 -1
  85. package/dist/sdk/governance/assurance-action.js +7 -6
  86. package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
  87. package/dist/sdk/governance/assurance-mutation-error.js +27 -3
  88. package/dist/sdk/governance/assurance-runtime.js +12 -11
  89. package/dist/sdk/governance/assurance.d.ts +9 -0
  90. package/dist/sdk/governance/assurance.js +82 -16
  91. package/dist/sdk/governance/extension-host-version.d.ts +25 -0
  92. package/dist/sdk/governance/extension-host-version.js +105 -0
  93. package/dist/sdk/governance/health.d.ts +32 -1
  94. package/dist/sdk/governance/health.js +132 -28
  95. package/dist/sdk/governance/provenance-health.d.ts +27 -0
  96. package/dist/sdk/governance/provenance-health.js +95 -3
  97. package/dist/sdk/governance/validate-history-drift.d.ts +7 -0
  98. package/dist/sdk/governance/validate-history-drift.js +68 -0
  99. package/dist/sdk/governance/validate.js +9 -52
  100. package/dist/sdk/governance.d.ts +6 -0
  101. package/dist/sdk/governance.js +8 -2
  102. package/dist/sdk/graph/assembly.d.ts +23 -0
  103. package/dist/sdk/graph/assembly.js +54 -2
  104. package/dist/sdk/graph/durable-cache.js +50 -20
  105. package/dist/sdk/graph/governance-contracts.d.ts +1 -1
  106. package/dist/sdk/graph/governance-contracts.js +4 -2
  107. package/dist/sdk/graph/governance.d.ts +21 -1
  108. package/dist/sdk/graph/governance.js +94 -32
  109. package/dist/sdk/graph/index.d.ts +2 -2
  110. package/dist/sdk/graph/index.js +4 -4
  111. package/dist/sdk/graph/mutation-advisory.js +15 -7
  112. package/dist/sdk/graph/remediation.js +12 -2
  113. package/dist/sdk/history-read.d.ts +8 -0
  114. package/dist/sdk/history-read.js +2 -2
  115. package/dist/sdk/history-repair.d.ts +13 -1
  116. package/dist/sdk/history-repair.js +62 -18
  117. package/dist/sdk/index.d.ts +1 -1
  118. package/dist/sdk/index.js +3 -3
  119. package/dist/sdk/linked-artifacts.js +16 -5
  120. package/dist/sdk/pagination.d.ts +15 -0
  121. package/dist/sdk/pagination.js +9 -5
  122. package/dist/sdk/query/context.d.ts +5 -1
  123. package/dist/sdk/query/context.js +14 -5
  124. package/dist/sdk/query/history.js +20 -3
  125. package/dist/sdk/read-output/continuation.d.ts +11 -0
  126. package/dist/sdk/read-output/continuation.js +132 -0
  127. package/dist/sdk/read-output-budget.d.ts +3 -1
  128. package/dist/sdk/read-output-budget.js +24 -13
  129. package/dist/sdk/read-output-contracts.d.ts +127 -7
  130. package/dist/sdk/read-output-contracts.js +381 -35
  131. package/dist/sdk/read-output-rows.d.ts +13 -0
  132. package/dist/sdk/read-output-rows.js +60 -2
  133. package/dist/sdk/runtime-input.js +4 -2
  134. package/dist/sdk/runtime-primitives.d.ts +1 -1
  135. package/dist/sdk/runtime-primitives.js +3 -3
  136. package/dist/sdk/runtime.js +5 -3
  137. package/docs/ASSURANCE.md +68 -2
  138. package/docs/COMMANDS.md +39 -4
  139. package/docs/READ_OUTPUT_CONTRACTS.md +85 -8
  140. package/docs/RELATIONSHIP_GRAPH.md +20 -5
  141. package/docs/RELEASING.md +42 -5
  142. package/docs/SDK.md +12 -5
  143. package/docs/SDK_CONTEXT_INTEGRITY.md +94 -1
  144. package/docs/TESTING.md +23 -1
  145. package/docs/performance/sdk-entrypoint-import-costs.md +20 -13
  146. package/marketplace.json +2 -2
  147. package/package.json +7 -7
  148. package/packages/pm-beads/extensions/beads/index.ts +1 -0
  149. package/packages/pm-beads/package.json +1 -1
  150. package/packages/pm-calendar/extensions/calendar/index.ts +1 -0
  151. package/packages/pm-calendar/package.json +1 -1
  152. package/packages/pm-command-kit/package.json +1 -1
  153. package/packages/pm-digital-twin/extensions/digital-twin/index.ts +7 -0
  154. package/packages/pm-digital-twin/package.json +1 -1
  155. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +4 -0
  156. package/packages/pm-governance-audit/package.json +1 -1
  157. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +5 -0
  158. package/packages/pm-guide-shell/package.json +1 -1
  159. package/packages/pm-kanban/package.json +1 -1
  160. package/packages/pm-lifecycle-hooks/package.json +1 -1
  161. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +6 -0
  162. package/packages/pm-linked-test-adapters/package.json +1 -1
  163. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -0
  164. package/packages/pm-search-advanced/package.json +1 -1
  165. package/packages/pm-templates/extensions/templates/index.ts +4 -0
  166. package/packages/pm-templates/package.json +1 -1
  167. package/packages/pm-todos/extensions/todos/index.ts +2 -0
  168. package/packages/pm-todos/package.json +1 -1
  169. package/packages/pm-vcs/extensions/vcs/index.ts +7 -0
  170. package/packages/pm-vcs/package.json +1 -1
  171. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  172. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  173. package/scripts/bundle-cli.mjs +17 -4
  174. package/sdk/public-surface.json +1283 -157
  175. package/dist/cli-bundle/chunks/chunk-DEDU3DG7.js +0 -196
  176. package/dist/cli-bundle/chunks/chunk-DL5M5J3V.js +0 -13
  177. package/dist/cli-bundle/chunks/chunk-HIUZVCMN.js +0 -5
  178. package/dist/cli-bundle/chunks/chunk-IMGIN7R6.js +0 -2
  179. package/dist/cli-bundle/chunks/chunk-TF3TPKPR.js +0 -34
  180. package/dist/cli-bundle/chunks/register-operations-C44ET7R5.js +0 -2
  181. package/dist/cli-bundle/focused-chunks/chunk-27N23W6M.js +0 -31
  182. package/dist/cli-bundle/focused-chunks/chunk-3BNVU6LC.js +0 -8
  183. package/dist/cli-bundle/focused-chunks/chunk-6MLIRBLV.js +0 -5
  184. package/dist/cli-bundle/focused-chunks/chunk-6XYLENDV.js +0 -155
  185. package/dist/cli-bundle/focused-chunks/chunk-CP4K4WFS.js +0 -2
  186. package/dist/cli-bundle/focused-chunks/chunk-EBTNSFYE.js +0 -2
  187. package/dist/cli-bundle/focused-chunks/chunk-HC2OL2H2.js +0 -2
  188. package/dist/cli-bundle/focused-chunks/chunk-NFHFZH2Z.js +0 -2
  189. package/dist/cli-bundle/focused-chunks/chunk-OGC4XSBC.js +0 -17
  190. package/dist/cli-bundle/focused-chunks/chunk-PKPOZXLL.js +0 -2
  191. package/dist/cli-bundle/focused-chunks/chunk-QDZUABWL.js +0 -2
  192. package/dist/cli-bundle/focused-chunks/chunk-QQX5TDFT.js +0 -16
  193. package/dist/cli-bundle/focused-chunks/chunk-TEZIXMTH.js +0 -2
  194. package/dist/cli-bundle/focused-chunks/chunk-WEH6NSL6.js +0 -18
@@ -1,5 +1,5 @@
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]="044af354-3047-5fd4-ae65-458a259dedca")}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]="525dce5a-3824-5c45-aa61-bd8b132bd973")}catch(e){}}();
3
3
  export {};
4
4
  //# sourceMappingURL=command-types.js.map
5
- //# debugId=044af354-3047-5fd4-ae65-458a259dedca
5
+ //# debugId=525dce5a-3824-5c45-aa61-bd8b132bd973
@@ -32,6 +32,8 @@ export interface PmCliErrorRecoveryPayload {
32
32
  candidate_commands_total?: number;
33
33
  /** Whether additional accepting command paths were omitted from this payload. */
34
34
  candidate_commands_truncated?: boolean;
35
+ /** Declared lexicon membership of an option rejected by the attempted path. */
36
+ option_scope?: "declared_on_path" | "declared_elsewhere" | "declared_nowhere";
35
37
  /** Value that configures or reports suggested retry for this contract. */
36
38
  suggested_retry?: string;
37
39
  /** Elapsed time in milliseconds for retry after. */
@@ -53,6 +55,16 @@ export interface PmCliErrorContext {
53
55
  reason?: string;
54
56
  /** Metadata field responsible for a validation failure, when known. */
55
57
  field?: string;
58
+ /** Assurance gate whose evaluation was refused, when known. */
59
+ gate_id?: string;
60
+ /** Assurance assertion whose evaluation was refused, when known. */
61
+ assertion_id?: string;
62
+ /** Assurance measurement whose source could not resolve, when known. */
63
+ measurement_id?: string;
64
+ /** Assurance measurement source kind involved in a refusal, when known. */
65
+ source_kind?: string;
66
+ /** Validate or health check selected by an assurance source, when known. */
67
+ check?: string;
56
68
  /** Serialization format involved in a parse failure. */
57
69
  format?: string;
58
70
  /** Item format version involved in a compatibility failure. */
@@ -1,6 +1,6 @@
1
1
  /** Implements the exported pm cli error runtime abstraction for core/shared/errors.ts. */
2
2
 
3
- !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]="62fb0ba7-643f-5b33-870b-df875559610a")}catch(e){}}();
3
+ !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]="d1a7b5e2-0915-5f00-8b5a-38af814e1ea1")}catch(e){}}();
4
4
  export class PmCliError extends Error {
5
5
  /** Value that configures or reports exit code for this contract. */
6
6
  exitCode;
@@ -18,4 +18,4 @@ export class PmCliError extends Error {
18
18
  }
19
19
  }
20
20
  //# sourceMappingURL=errors.js.map
21
- //# debugId=62fb0ba7-643f-5b33-870b-df875559610a
21
+ //# debugId=d1a7b5e2-0915-5f00-8b5a-38af814e1ea1
@@ -4,7 +4,7 @@
4
4
  * Defines the Tool Definitions module for pm CLI source.
5
5
  */
6
6
 
7
- !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]="cde81c26-97fa-5236-b807-e944ba4af321")}catch(e){}}();
7
+ !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]="d440a41a-ae54-55fd-b939-5404a1edcdd7")}catch(e){}}();
8
8
  import { GRAPH_SUBCOMMAND_VALUES, PM_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
9
9
  import { buildPmActionToolInputSchema } from "../sdk/cli-contracts/tool-schema.js";
10
10
  import { RUNTIME_STATUS_ROLE_VALUES } from "../types.js";
@@ -20,9 +20,8 @@ const READ_OUTPUT_TOOL_PROPERTIES = {
20
20
  description: "Universal read row ceiling, or unbounded to disable the shared ceiling.",
21
21
  },
22
22
  outputBudget: {
23
- type: "integer",
24
- minimum: 1,
25
- description: "Universal estimated-token ceiling for a read result.",
23
+ anyOf: [{ type: "integer", minimum: 1 }, { const: "unbounded" }],
24
+ description: "Universal estimated-token ceiling, or unbounded to return the complete read result.",
26
25
  },
27
26
  outputFormat: {
28
27
  type: "string",
@@ -32,6 +31,11 @@ const READ_OUTPUT_TOOL_PROPERTIES = {
32
31
  outputSession: {
33
32
  ...CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY,
34
33
  },
34
+ outputCursor: {
35
+ type: "string",
36
+ minLength: 1,
37
+ description: "Opaque continuation cursor returned after budget compaction of a declared row collection.",
38
+ },
35
39
  };
36
40
  /** MCP transport parameters layered over every canonical action schema. */
37
41
  export const TOOL_SCHEMA_BASE = {
@@ -739,4 +743,4 @@ export function buildMcpToolContracts() {
739
743
  }).sort((left, right) => left.name.localeCompare(right.name));
740
744
  }
741
745
  //# sourceMappingURL=tool-definitions.js.map
742
- //# debugId=cde81c26-97fa-5236-b807-e944ba4af321
746
+ //# debugId=d440a41a-ae54-55fd-b939-5404a1edcdd7
@@ -36,5 +36,66 @@ export interface PmRefusalReachabilityReport {
36
36
  /** Stable, sorted conformance findings. */
37
37
  findings: PmRefusalReachabilityFinding[];
38
38
  }
39
+ /** Recovery-reference kinds emitted by structured refusal envelopes. */
40
+ export declare const PM_RECOVERY_REFERENCE_KINDS: readonly ["suggested_retry", "candidate_command", "example", "next_step"];
41
+ /** Recovery-reference kind emitted by a refusal. */
42
+ export type PmRecoveryReferenceKind = (typeof PM_RECOVERY_REFERENCE_KINDS)[number];
43
+ /** One derived promise that another invocation or command path is reachable. */
44
+ export interface PmRecoveryReferenceObligation {
45
+ /** Stable reference identifier derived from its emitting envelope. */
46
+ id: string;
47
+ /** Refusal probe that emitted the reference. */
48
+ probe_id: string;
49
+ /** Typed recovery vocabulary rather than prose inference. */
50
+ kind: PmRecoveryReferenceKind;
51
+ /** Exact emitted command or recovery text. */
52
+ value: string;
53
+ }
54
+ /** Result of executing or resolving one derived recovery obligation. */
55
+ export interface PmRecoveryReferenceObservation {
56
+ /** Stable obligation identifier. */
57
+ id: string;
58
+ /** Whether the promised recovery or command path was reachable. */
59
+ reachable: boolean;
60
+ /** How the promise was discharged. */
61
+ proof: "executed" | "declared_command_path" | "linked_execution";
62
+ }
63
+ /** Coverage totals for one emitted recovery-reference kind. */
64
+ export interface PmRecoveryReferenceKindCoverage {
65
+ /** Typed reference kind. */
66
+ kind: PmRecoveryReferenceKind;
67
+ /** Derived obligations of this kind. */
68
+ declared: number;
69
+ /** Obligations with one observation. */
70
+ observed: number;
71
+ /** Obligations proven reachable. */
72
+ passed: number;
73
+ }
74
+ /** One recovery-reference coverage failure. */
75
+ export interface PmRecoveryReferenceFinding {
76
+ /** Stable finding kind for assurance and CI. */
77
+ kind: "duplicate_obligation" | "duplicate_observation" | "missing_observation" | "unreachable_reference" | "undeclared_observation";
78
+ /** Obligation or observation identifier. */
79
+ reference_id: string;
80
+ /** Human-readable mismatch summary. */
81
+ detail: string;
82
+ }
83
+ /** Complete cross-kind recovery-reference coverage receipt. */
84
+ export interface PmRecoveryReferenceReport {
85
+ /** Whether every derived reference was uniquely proven reachable. */
86
+ ok: boolean;
87
+ /** Total references derived from real refusal envelopes. */
88
+ declared_reference_count: number;
89
+ /** Total reference observations supplied. */
90
+ observed_reference_count: number;
91
+ /** Reachable fraction across the declared obligation set. */
92
+ pass_fraction: number;
93
+ /** Stable coverage buckets, including zero-population kinds. */
94
+ coverage_by_kind: PmRecoveryReferenceKindCoverage[];
95
+ /** Stable, sorted conformance findings. */
96
+ findings: PmRecoveryReferenceFinding[];
97
+ }
39
98
  /** Compare declared refusal states with real-entrypoint observations. */
40
99
  export declare function verifyPmRefusalReachability(catalog: readonly PmErrorCodeContract[], observations: readonly PmRefusalProbeObservation[]): PmRefusalReachabilityReport;
100
+ /** Verify executable and declared-path proof for emitted recovery references. */
101
+ export declare function verifyPmRecoveryReferences(obligations: readonly PmRecoveryReferenceObligation[], observations: readonly PmRecoveryReferenceObservation[]): PmRecoveryReferenceReport;
@@ -1,6 +1,13 @@
1
- /** Compare declared refusal states with real-entrypoint observations. */
1
+ /** Recovery-reference kinds emitted by structured refusal envelopes. */
2
2
 
3
- !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]="55318c8e-1fbd-5abd-b18f-f0cc1f81dd5c")}catch(e){}}();
3
+ !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]="631031be-883f-5a1d-bcb6-498208cf7922")}catch(e){}}();
4
+ export const PM_RECOVERY_REFERENCE_KINDS = [
5
+ "suggested_retry",
6
+ "candidate_command",
7
+ "example",
8
+ "next_step",
9
+ ];
10
+ /** Compare declared refusal states with real-entrypoint observations. */
4
11
  export function verifyPmRefusalReachability(catalog, observations) {
5
12
  const declarations = catalog.flatMap((contract) => (contract.owned_states ?? []).map((state) => ({ contract, state })));
6
13
  const findings = [];
@@ -68,5 +75,86 @@ export function verifyPmRefusalReachability(catalog, observations) {
68
75
  findings,
69
76
  };
70
77
  }
78
+ /** Verify executable and declared-path proof for emitted recovery references. */
79
+ export function verifyPmRecoveryReferences(obligations, observations) {
80
+ const findings = [];
81
+ const declaredIds = new Set();
82
+ const duplicateIds = new Set();
83
+ for (const obligation of obligations) {
84
+ if (declaredIds.has(obligation.id)) {
85
+ duplicateIds.add(obligation.id);
86
+ findings.push({
87
+ kind: "duplicate_obligation",
88
+ reference_id: obligation.id,
89
+ detail: `Recovery obligation ${obligation.id} was declared more than once.`,
90
+ });
91
+ continue;
92
+ }
93
+ declaredIds.add(obligation.id);
94
+ }
95
+ const observationsById = new Map();
96
+ for (const observation of observations) {
97
+ if (observationsById.has(observation.id)) {
98
+ findings.push({
99
+ kind: "duplicate_observation",
100
+ reference_id: observation.id,
101
+ detail: `Recovery reference ${observation.id} was observed more than once.`,
102
+ });
103
+ continue;
104
+ }
105
+ observationsById.set(observation.id, observation);
106
+ if (!declaredIds.has(observation.id)) {
107
+ findings.push({
108
+ kind: "undeclared_observation",
109
+ reference_id: observation.id,
110
+ detail: `Recovery observation ${observation.id} has no emitted obligation.`,
111
+ });
112
+ }
113
+ }
114
+ for (const obligation of obligations) {
115
+ if (duplicateIds.has(obligation.id))
116
+ continue;
117
+ const observation = observationsById.get(obligation.id);
118
+ if (!observation) {
119
+ findings.push({
120
+ kind: "missing_observation",
121
+ reference_id: obligation.id,
122
+ detail: `No reachability proof was recorded for ${obligation.kind} ${obligation.value}.`,
123
+ });
124
+ }
125
+ else if (!observation.reachable) {
126
+ findings.push({
127
+ kind: "unreachable_reference",
128
+ reference_id: obligation.id,
129
+ detail: `Recovery reference ${obligation.value} did not reach its promised target.`,
130
+ });
131
+ }
132
+ }
133
+ const coverageByKind = PM_RECOVERY_REFERENCE_KINDS.map((kind) => {
134
+ const kindObligations = obligations.filter((obligation) => obligation.kind === kind);
135
+ const kindObservations = kindObligations
136
+ .filter((obligation) => !duplicateIds.has(obligation.id))
137
+ .map((obligation) => observationsById.get(obligation.id))
138
+ .filter((observation) => observation !== undefined);
139
+ return {
140
+ kind,
141
+ declared: kindObligations.length,
142
+ observed: kindObservations.length,
143
+ passed: kindObservations.filter(({ reachable }) => reachable).length,
144
+ };
145
+ });
146
+ findings.sort((left, right) => left.reference_id !== right.reference_id
147
+ ? left.reference_id.localeCompare(right.reference_id)
148
+ : left.kind.localeCompare(right.kind));
149
+ const passed = coverageByKind.reduce((total, coverage) => total + coverage.passed, 0);
150
+ return {
151
+ ok: findings.length === 0,
152
+ declared_reference_count: obligations.length,
153
+ observed_reference_count: observations.length,
154
+ pass_fraction: declaredIds.size === 0 ? 1 : passed / declaredIds.size,
155
+ coverage_by_kind: coverageByKind,
156
+ findings,
157
+ };
158
+ }
71
159
  //# sourceMappingURL=refusal-reachability.js.map
72
- //# debugId=55318c8e-1fbd-5abd-b18f-f0cc1f81dd5c
160
+ //# debugId=631031be-883f-5a1d-bcb6-498208cf7922
@@ -31,6 +31,8 @@ export interface BootstrapGlobalOptions {
31
31
  outputFormat?: "toon" | "json";
32
32
  /** Caller-carried cross-call budget and served-item state. */
33
33
  outputSession?: string;
34
+ /** Opaque budget-compaction continuation cursor. */
35
+ outputCursor?: string;
34
36
  /** Whether machine-readable row discovery metadata is requested. */
35
37
  outputRowContract?: boolean;
36
38
  /** Invocation-wide mutation author override. */
@@ -4,7 +4,7 @@
4
4
  * Provides public bootstrap argument normalization for embedded CLI hosts.
5
5
  */
6
6
 
7
- !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]="7b3209a8-8580-542c-9e80-21d04df3f61f")}catch(e){}}();
7
+ !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]="eccdb2d2-da6f-555b-ba1b-8339f9b64f1a")}catch(e){}}();
8
8
  import { EXECUTABLE_COMMAND_ALIASES, resolveSubcommandFlagContractsForCommand, } from "./cli-contracts.js";
9
9
  export { EXECUTABLE_COMMAND_ALIASES };
10
10
  import { levenshteinDistanceWithinLimit } from "../core/shared/levenshtein.js";
@@ -20,6 +20,7 @@ const GLOBAL_VALUE_CONSUMING_FLAGS = new Set([
20
20
  "--output-budget",
21
21
  "--output-format",
22
22
  "--output-session",
23
+ "--output-cursor",
23
24
  ]);
24
25
  const OUTPUT_VALUE_FLAGS = new Set([
25
26
  "--output-include",
@@ -27,6 +28,7 @@ const OUTPUT_VALUE_FLAGS = new Set([
27
28
  "--output-budget",
28
29
  "--output-format",
29
30
  "--output-session",
31
+ "--output-cursor",
30
32
  ]);
31
33
  /** Whether a global value-consuming flag uses its inline `--flag=value` form. */
32
34
  const isInlineGlobalValueToken = (token) => {
@@ -117,6 +119,9 @@ export function parseBootstrapGlobalOptions(argv) {
117
119
  ...(state.outputValues.get("--output-session") === undefined
118
120
  ? {}
119
121
  : { outputSession: state.outputValues.get("--output-session") }),
122
+ ...(state.outputValues.get("--output-cursor") === undefined
123
+ ? {}
124
+ : { outputCursor: state.outputValues.get("--output-cursor") }),
120
125
  ...(state.author === ""
121
126
  ? { authorMissingValue: true }
122
127
  : state.author !== undefined
@@ -890,4 +895,4 @@ export const _testOnly = {
890
895
  resolveCanonicalFlag,
891
896
  };
892
897
  //# sourceMappingURL=cli-bootstrap.js.map
893
- //# debugId=7b3209a8-8580-542c-9e80-21d04df3f61f
898
+ //# debugId=eccdb2d2-da6f-555b-ba1b-8339f9b64f1a
@@ -7,7 +7,7 @@
7
7
  * a hand-picked test list.
8
8
  */
9
9
 
10
- !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]="cf238c71-1626-5e48-9207-7acf22c0d680")}catch(e){}}();
10
+ !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]="8b227cb2-a30d-5384-b9c2-558603181c67")}catch(e){}}();
11
11
  import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
12
12
  import { resolveSubcommandFlagContractsForCommand, } from "./flag-contracts.js";
13
13
  import { pmToolActionParameterKeys } from "./tool-schema.js";
@@ -23,6 +23,7 @@ const CLI_TRANSPORT_FLAGS = new Set([
23
23
  "--output-budget",
24
24
  "--output-format",
25
25
  "--output-session",
26
+ "--output-cursor",
26
27
  "--output-row-contract",
27
28
  "--no-changed-fields",
28
29
  "--no-extensions",
@@ -383,4 +384,4 @@ export function analyzeSdkCliParameterCompleteness(source = {}) {
383
384
  });
384
385
  }
385
386
  //# sourceMappingURL=completeness.js.map
386
- //# debugId=cf238c71-1626-5e48-9207-7acf22c0d680
387
+ //# debugId=8b227cb2-a30d-5384-b9c2-558603181c67
@@ -7,7 +7,7 @@
7
7
  * flag surface stays single-sourced across the CLI, SDK, and MCP boundaries.
8
8
  */
9
9
 
10
- !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]="a5a2c81f-8870-5111-b13c-74c362098d54")}catch(e){}}();
10
+ !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]="512c41c1-624f-517c-abc3-4448b49cd9e6")}catch(e){}}();
11
11
  import { normalizeUniqueStringList } from "./string-lists.js";
12
12
  import { RESERVED_EXTENSION_HOST_FLAGS } from "../../core/extensions/reserved-host-flags.js";
13
13
  function normalizeFlagAliasKey(flag) {
@@ -342,6 +342,7 @@ export const HISTORY_REPAIR_FLAG_CONTRACTS = [
342
342
  { flag: "--id", value_name: "item-id" },
343
343
  { flag: "--all" },
344
344
  { flag: "--dry-run" },
345
+ { flag: "--normalize-provenance" },
345
346
  { flag: "--author" },
346
347
  { flag: "--message" },
347
348
  { flag: "--force" },
@@ -1817,4 +1818,4 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
1817
1818
  return normalizeUniqueStringList(all).join(" ");
1818
1819
  }
1819
1820
  //# sourceMappingURL=flag-contracts.js.map
1820
- //# debugId=a5a2c81f-8870-5111-b13c-74c362098d54
1821
+ //# debugId=512c41c1-624f-517c-abc3-4448b49cd9e6
@@ -4,7 +4,7 @@
4
4
  * Provides CLI runtime support for Registration Helpers.
5
5
  */
6
6
 
7
- !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]="daefefd1-3b0b-513d-8b8c-ab17f90b995a")}catch(e){}}();
7
+ !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]="8d60b13c-c58a-506f-adc9-2414dd69edef")}catch(e){}}();
8
8
  import { Option } from "commander";
9
9
  import { pathExists, refreshSearchArtifactsForMutation, shouldRunSearchRefreshInForeground, EXIT_CODE, PmCliError, printError, printResult, writeStdout, getSettingsPath, resolvePmRoot, readSettings, runActiveServiceOverride, setActiveCommandResult, } from "../runtime-primitives.js";
10
10
  import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "../cli-contracts.js";
@@ -112,6 +112,7 @@ export function getGlobalOptions(command) {
112
112
  outputLimit: readStringCommandOption(opts, "outputLimit"),
113
113
  outputBudget: readStringCommandOption(opts, "outputBudget"),
114
114
  outputSession: readStringCommandOption(opts, "outputSession"),
115
+ outputCursor: readStringCommandOption(opts, "outputCursor"),
115
116
  ...(opts.outputRowContract === true ? { outputRowContract: true } : {}),
116
117
  ...(opts.outputFormat === "toon" || opts.outputFormat === "json"
117
118
  ? { outputFormat: opts.outputFormat }
@@ -984,4 +985,4 @@ export const _testOnly = {
984
985
  collectMutationItemIds,
985
986
  };
986
987
  //# sourceMappingURL=registration-helpers.js.map
987
- //# debugId=daefefd1-3b0b-513d-8b8c-ab17f90b995a
988
+ //# debugId=8d60b13c-c58a-506f-adc9-2414dd69edef
@@ -148,6 +148,11 @@ export interface ContractsResult {
148
148
  close_validation_modes: string[];
149
149
  workflow_enforcement_modes: string[];
150
150
  };
151
+ /** Authoritative assurance declaration vocabularies for SDK and host validation. */
152
+ assurance_contracts?: {
153
+ measurement_source_kinds: readonly string[];
154
+ gate_triggers: readonly string[];
155
+ };
151
156
  /** Value that configures or reports mcp tools for this contract. */
152
157
  mcp_tools?: McpToolContract[];
153
158
  /** Built-in intent-scoped read projections available to CLI, SDK, MCP, and package consumers. */
@@ -231,8 +236,13 @@ interface CommandSummarySurface {
231
236
  command: string;
232
237
  aliases?: string[];
233
238
  intent: string;
239
+ intent_source: "command" | "description" | "generated";
234
240
  flags?: string[];
235
241
  default_max_estimated_tokens: number;
242
+ default_max_estimated_tokens_by_format: {
243
+ toon: number;
244
+ json: number;
245
+ };
236
246
  }
237
247
  declare function packageOwnedActionForCommand(command: string): string;
238
248
  declare function resolveActionCommandPath(action: PmToolAction): string | null;
@@ -275,7 +285,7 @@ declare function toRuntimeShortFlagToken(token: string): string | null;
275
285
  declare function buildRuntimeFieldFlagContracts(fieldRegistry: RuntimeFieldRegistry): Map<string, CliFlagContract[]>;
276
286
  declare function attachCreateRequiredOptionContracts(schema: Record<string, unknown>, metadata: Record<string, unknown>): Record<string, unknown>;
277
287
  declare function readContractsSettings(pmRoot: string, readSettingsFn?: typeof readSettings): Promise<Awaited<ReturnType<typeof readSettings>>>;
278
- declare function buildCommandSummarySurface(commands: readonly string[]): CommandSummarySurface[];
288
+ declare function buildCommandSummarySurface(commands: readonly string[], extensionContracts?: readonly ExtensionCommandContract[]): CommandSummarySurface[];
279
289
  declare function buildCommandOutputContracts(commands: readonly string[]): NonNullable<ContractsResult["command_output_contracts"]>;
280
290
  declare function buildCommandExitContractGroups(commands: readonly string[]): NonNullable<ContractsResult["command_exit_contracts"]>["command_sets"];
281
291
  /** Implements run contracts for the public runtime surface of this module. */