@unbrained/pm-cli 2026.8.14 → 2026.8.16

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 (160) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +51 -11
  3. package/dist/cli/commander-usage.js +17 -4
  4. package/dist/cli/error-guidance.d.ts +7 -0
  5. package/dist/cli/error-guidance.js +65 -25
  6. package/dist/cli/main.js +3 -2
  7. package/dist/cli/register-history-author.js +16 -11
  8. package/dist/cli/register-mutation.js +4 -2
  9. package/dist/cli/register-operations.js +5 -5
  10. package/dist/cli-bundle/bundle-manifest.json +148 -148
  11. package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +2 -0
  12. package/dist/cli-bundle/chunks/{chunk-XAVMOK6B.js → chunk-73UGEBRS.js} +2 -2
  13. package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +35 -0
  14. package/dist/cli-bundle/chunks/{chunk-FIW4P64F.js → chunk-I2LUWWR5.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-SBRKH6OR.js → chunk-IC5W2T34.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-TMJ7URWS.js → chunk-PANOOBIS.js} +9 -9
  17. package/dist/cli-bundle/chunks/{chunk-BFALV3YP.js → chunk-RIS565OA.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-TXMEUUUY.js → chunk-TK6N7HGM.js} +2 -2
  19. package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +197 -0
  20. package/dist/cli-bundle/chunks/{chunk-G5JUB66K.js → chunk-URW4QRMI.js} +65 -59
  21. package/dist/cli-bundle/chunks/{register-list-query-T3EHHNNV.js → register-list-query-EYCXHZAG.js} +2 -2
  22. package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +20 -0
  23. package/dist/cli-bundle/chunks/register-operations-KGDNRMCL.js +2 -0
  24. package/dist/cli-bundle/chunks/{register-setup-3YXZ444E.js → register-setup-NVXBOD5I.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-PPFGQDSI.js → chunk-4JPEBFFC.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +155 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-YOOI3UZX.js → chunk-6ROKKT4X.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-XDNAW5OI.js → chunk-C7JUBRFP.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-4DQ2YERC.js → chunk-CODV5LUT.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/chunk-HAACPSUW.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-WCVE2NIG.js → chunk-J4UFYHOD.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-KSEDUWVZ.js → chunk-NJ5RLEFD.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-K7RWWOAG.js → chunk-QYZERYR5.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-SSNDYZTM.js +8 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-T46KLOIB.js +50 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-KFSZ3BP6.js → chunk-TZATVC4G.js} +6 -6
  41. package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +2 -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 +32 -35
  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 +32 -31
  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/diagnostics/remediation.js +7 -2
  54. package/dist/core/extensions/reserved-host-flags.js +3 -2
  55. package/dist/core/history/replay.d.ts +14 -1
  56. package/dist/core/history/replay.js +45 -8
  57. package/dist/core/history/workspace-history.js +32 -10
  58. package/dist/core/output/output.d.ts +2 -0
  59. package/dist/core/output/output.js +7 -3
  60. package/dist/core/shared/command-types.d.ts +2 -0
  61. package/dist/core/shared/command-types.js +2 -2
  62. package/dist/core/shared/errors.d.ts +14 -0
  63. package/dist/core/shared/errors.js +2 -2
  64. package/dist/core/store/item-store.js +28 -2
  65. package/dist/mcp/tool-definitions.js +9 -5
  66. package/dist/sdk/agent/refusal-reachability.d.ts +69 -0
  67. package/dist/sdk/agent/refusal-reachability.js +159 -3
  68. package/dist/sdk/author-attribution.d.ts +56 -11
  69. package/dist/sdk/author-attribution.js +174 -50
  70. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  71. package/dist/sdk/cli-bootstrap.js +7 -2
  72. package/dist/sdk/cli-contracts/completeness.js +3 -2
  73. package/dist/sdk/cli-contracts/flag-contracts.js +6 -2
  74. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  75. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +5 -0
  76. package/dist/sdk/cli-contracts/runtime-contracts.js +23 -7
  77. package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -5
  78. package/dist/sdk/cli-contracts/tool-schema.js +20 -5
  79. package/dist/sdk/cli-program.js +3 -2
  80. package/dist/sdk/completion.js +11 -4
  81. package/dist/sdk/core.d.ts +2 -2
  82. package/dist/sdk/core.js +3 -3
  83. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +50 -2
  84. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +74 -14
  85. package/dist/sdk/governance/assurance-action.d.ts +7 -1
  86. package/dist/sdk/governance/assurance-action.js +7 -6
  87. package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
  88. package/dist/sdk/governance/assurance-mutation-error.js +27 -3
  89. package/dist/sdk/governance/assurance-runtime.js +12 -11
  90. package/dist/sdk/governance/assurance.d.ts +9 -0
  91. package/dist/sdk/governance/assurance.js +80 -14
  92. package/dist/sdk/governance/coverage-assurance.d.ts +24 -0
  93. package/dist/sdk/governance/coverage-assurance.js +61 -0
  94. package/dist/sdk/governance/extension-host-version.d.ts +25 -0
  95. package/dist/sdk/governance/extension-host-version.js +116 -0
  96. package/dist/sdk/governance/health.d.ts +32 -1
  97. package/dist/sdk/governance/health.js +119 -27
  98. package/dist/sdk/governance/provenance-health.d.ts +27 -0
  99. package/dist/sdk/governance/provenance-health.js +95 -3
  100. package/dist/sdk/governance/validate.js +7 -8
  101. package/dist/sdk/governance.d.ts +6 -0
  102. package/dist/sdk/governance.js +8 -2
  103. package/dist/sdk/history-repair.d.ts +13 -1
  104. package/dist/sdk/history-repair.js +62 -18
  105. package/dist/sdk/index.d.ts +2 -1
  106. package/dist/sdk/index.js +4 -3
  107. package/dist/sdk/linked-artifacts.js +16 -5
  108. package/dist/sdk/pagination.d.ts +15 -0
  109. package/dist/sdk/pagination.js +9 -5
  110. package/dist/sdk/query/context.d.ts +5 -1
  111. package/dist/sdk/query/context.js +14 -5
  112. package/dist/sdk/read-output/continuation.d.ts +11 -0
  113. package/dist/sdk/read-output/continuation.js +132 -0
  114. package/dist/sdk/read-output-budget.d.ts +1 -1
  115. package/dist/sdk/read-output-budget.js +14 -10
  116. package/dist/sdk/read-output-contracts.d.ts +66 -2
  117. package/dist/sdk/read-output-contracts.js +185 -19
  118. package/dist/sdk/read-output-rows.d.ts +2 -0
  119. package/dist/sdk/read-output-rows.js +15 -2
  120. package/dist/sdk/runtime-input.js +4 -2
  121. package/dist/sdk/runtime.d.ts +2 -5
  122. package/dist/sdk/runtime.js +3 -2
  123. package/docs/ASSURANCE.md +59 -2
  124. package/docs/COMMANDS.md +8 -2
  125. package/docs/READ_OUTPUT_CONTRACTS.md +55 -8
  126. package/docs/RELEASING.md +54 -11
  127. package/docs/SDK_CONTEXT_INTEGRITY.md +94 -4
  128. package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +13 -5
  129. package/marketplace.json +2 -2
  130. package/package.json +3 -3
  131. package/packages/pm-beads/package.json +1 -1
  132. package/packages/pm-calendar/package.json +1 -1
  133. package/packages/pm-command-kit/package.json +1 -1
  134. package/packages/pm-digital-twin/package.json +1 -1
  135. package/packages/pm-governance-audit/package.json +1 -1
  136. package/packages/pm-guide-shell/package.json +1 -1
  137. package/packages/pm-kanban/package.json +1 -1
  138. package/packages/pm-lifecycle-hooks/package.json +1 -1
  139. package/packages/pm-linked-test-adapters/package.json +1 -1
  140. package/packages/pm-search-advanced/package.json +1 -1
  141. package/packages/pm-templates/package.json +1 -1
  142. package/packages/pm-todos/package.json +1 -1
  143. package/packages/pm-vcs/package.json +1 -1
  144. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  145. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  146. package/sdk/public-surface.json +1241 -180
  147. package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +0 -197
  148. package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +0 -34
  149. package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +0 -2
  150. package/dist/cli-bundle/chunks/register-mutation-E27WCLSZ.js +0 -20
  151. package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +0 -2
  152. package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +0 -8
  153. package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-LZ4MV3RH.js +0 -2
  155. package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +0 -155
  156. package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +0 -2
  157. package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +0 -46
  158. package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +0 -2
  159. package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +0 -2
  160. package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.js +0 -2
@@ -1,6 +1,69 @@
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]="e96813c2-e30f-5000-9935-281c564c19aa")}catch(e){}}();
4
+ export const PM_RECOVERY_REFERENCE_KINDS = [
5
+ "suggested_retry",
6
+ "candidate_command",
7
+ "example",
8
+ "next_step",
9
+ "migration_hint",
10
+ "restore_with",
11
+ ];
12
+ const RECOVERY_REFERENCE_FIELD_CONTRACTS = {
13
+ suggested_retry: { kind: "suggested_retry", semantics: "recovery" },
14
+ candidate_command: { kind: "candidate_command", semantics: "recovery" },
15
+ candidate_commands: { kind: "candidate_command", semantics: "recovery" },
16
+ example: { kind: "example", semantics: "recovery" },
17
+ examples: { kind: "example", semantics: "recovery" },
18
+ next_step: { kind: "next_step", semantics: "recovery" },
19
+ next_steps: { kind: "next_step", semantics: "recovery" },
20
+ migration_hint: { kind: "migration_hint", semantics: "replacement" },
21
+ migration_hints: { kind: "migration_hint", semantics: "replacement" },
22
+ restore_with: {
23
+ kind: "restore_with",
24
+ semantics: "behavior_preserving",
25
+ },
26
+ };
27
+ /** Derive typed obligations from every recognized recovery field in an emitted envelope. */
28
+ export function derivePmRecoveryReferenceObligations(probeId, envelope) {
29
+ const obligations = [];
30
+ const visit = (value, path) => {
31
+ if (Array.isArray(value)) {
32
+ value.forEach((entry, index) => visit(entry, [...path, String(index)]));
33
+ return;
34
+ }
35
+ if (typeof value !== "object" || value === null)
36
+ return;
37
+ for (const [key, entry] of Object.entries(value).sort(([left], [right]) => left.localeCompare(right))) {
38
+ const baseContract = RECOVERY_REFERENCE_FIELD_CONTRACTS[key];
39
+ const contract = baseContract?.kind === "migration_hint" &&
40
+ value.semantics === "behavior_preserving"
41
+ ? { ...baseContract, semantics: "behavior_preserving" }
42
+ : baseContract;
43
+ const entries = Array.isArray(entry) ? entry : [entry];
44
+ if (contract !== undefined) {
45
+ entries.forEach((candidate, index) => {
46
+ if (typeof candidate !== "string" || candidate.trim().length === 0)
47
+ return;
48
+ const coordinate = [...path, key, String(index)]
49
+ .map((segment) => encodeURIComponent(segment))
50
+ .join("/");
51
+ obligations.push({
52
+ id: `${probeId}:${contract.kind}:${coordinate}`,
53
+ probe_id: probeId,
54
+ kind: contract.kind,
55
+ semantics: contract.semantics,
56
+ value: candidate,
57
+ });
58
+ });
59
+ }
60
+ visit(entry, [...path, key]);
61
+ }
62
+ };
63
+ visit(envelope, []);
64
+ return obligations;
65
+ }
66
+ /** Compare declared refusal states with real-entrypoint observations. */
4
67
  export function verifyPmRefusalReachability(catalog, observations) {
5
68
  const declarations = catalog.flatMap((contract) => (contract.owned_states ?? []).map((state) => ({ contract, state })));
6
69
  const findings = [];
@@ -68,5 +131,98 @@ export function verifyPmRefusalReachability(catalog, observations) {
68
131
  findings,
69
132
  };
70
133
  }
134
+ /** Verify executable and declared-path proof for emitted recovery references. */
135
+ export function verifyPmRecoveryReferences(obligations, observations) {
136
+ const findings = [];
137
+ const declaredIds = new Set();
138
+ const duplicateIds = new Set();
139
+ for (const obligation of obligations) {
140
+ if (declaredIds.has(obligation.id)) {
141
+ duplicateIds.add(obligation.id);
142
+ findings.push({
143
+ kind: "duplicate_obligation",
144
+ reference_id: obligation.id,
145
+ detail: `Recovery obligation ${obligation.id} was declared more than once.`,
146
+ });
147
+ continue;
148
+ }
149
+ declaredIds.add(obligation.id);
150
+ }
151
+ const observationsById = new Map();
152
+ for (const observation of observations) {
153
+ if (observationsById.has(observation.id)) {
154
+ findings.push({
155
+ kind: "duplicate_observation",
156
+ reference_id: observation.id,
157
+ detail: `Recovery reference ${observation.id} was observed more than once.`,
158
+ });
159
+ continue;
160
+ }
161
+ observationsById.set(observation.id, observation);
162
+ if (!declaredIds.has(observation.id)) {
163
+ findings.push({
164
+ kind: "undeclared_observation",
165
+ reference_id: observation.id,
166
+ detail: `Recovery observation ${observation.id} has no emitted obligation.`,
167
+ });
168
+ }
169
+ }
170
+ for (const obligation of obligations) {
171
+ if (duplicateIds.has(obligation.id))
172
+ continue;
173
+ const observation = observationsById.get(obligation.id);
174
+ if (!observation) {
175
+ findings.push({
176
+ kind: "missing_observation",
177
+ reference_id: obligation.id,
178
+ detail: `No reachability proof was recorded for ${obligation.kind} ${obligation.value}.`,
179
+ });
180
+ }
181
+ else if (!observation.reachable) {
182
+ findings.push({
183
+ kind: "unreachable_reference",
184
+ reference_id: obligation.id,
185
+ detail: `Recovery reference ${obligation.value} did not reach its promised target.`,
186
+ });
187
+ }
188
+ else if (observation.semantics !== obligation.semantics) {
189
+ findings.push({
190
+ kind: "wrong_semantics",
191
+ reference_id: obligation.id,
192
+ detail: `Recovery reference ${obligation.value} promised ${obligation.semantics}; proof demonstrated ${observation.semantics}.`,
193
+ });
194
+ }
195
+ }
196
+ const coverageByKind = PM_RECOVERY_REFERENCE_KINDS.map((kind) => {
197
+ const kindObligations = obligations.filter((obligation) => obligation.kind === kind);
198
+ const kindObservations = kindObligations
199
+ .filter((obligation) => !duplicateIds.has(obligation.id))
200
+ .map((obligation) => observationsById.get(obligation.id))
201
+ .filter((observation) => observation !== undefined);
202
+ return {
203
+ kind,
204
+ declared: kindObligations.length,
205
+ observed: kindObservations.length,
206
+ passed: kindObligations.filter((obligation) => {
207
+ const observation = observationsById.get(obligation.id);
208
+ return (!duplicateIds.has(obligation.id) &&
209
+ observation?.reachable === true &&
210
+ observation.semantics === obligation.semantics);
211
+ }).length,
212
+ };
213
+ });
214
+ findings.sort((left, right) => left.reference_id !== right.reference_id
215
+ ? left.reference_id.localeCompare(right.reference_id)
216
+ : left.kind.localeCompare(right.kind));
217
+ const passed = coverageByKind.reduce((total, coverage) => total + coverage.passed, 0);
218
+ return {
219
+ ok: findings.length === 0,
220
+ declared_reference_count: obligations.length,
221
+ observed_reference_count: observations.length,
222
+ pass_fraction: declaredIds.size === 0 ? 1 : passed / declaredIds.size,
223
+ coverage_by_kind: coverageByKind,
224
+ findings,
225
+ };
226
+ }
71
227
  //# sourceMappingURL=refusal-reachability.js.map
72
- //# debugId=55318c8e-1fbd-5abd-b18f-f0cc1f81dd5c
228
+ //# debugId=e96813c2-e30f-5000-9935-281c564c19aa
@@ -46,12 +46,63 @@ export interface AcknowledgeUnknownAuthorEventsOptions {
46
46
  /** Select every currently actionable, undispositioned event in the tracker. */
47
47
  all_actionable?: boolean;
48
48
  /** Principal attributed by maintainer review. */
49
- attributed_author: string;
49
+ attributed_author?: string;
50
50
  /** Reviewer appending the disposition event. */
51
- reviewer: string;
51
+ reviewer?: string;
52
52
  /** Evidence-backed rationale for the attribution. */
53
- reason: string;
53
+ reason?: string;
54
+ /** Resolve and return the selected plan without appending history. */
55
+ dry_run?: boolean;
56
+ /** Fingerprint from the exact preview plan being applied. */
57
+ plan_fingerprint?: string;
58
+ /** Maximum coordinate rows included in the returned plan. */
59
+ coordinate_limit?: number;
54
60
  }
61
+ /** One source-bound coordinate in an author-acknowledgement plan. */
62
+ export interface UnknownAuthorAcknowledgmentPlanCoordinate extends UnknownAuthorHistoryEvent {
63
+ /** SHA-256 of the exact immutable JSONL source line. */
64
+ source_event_hash: string;
65
+ /** Whether the row is undispositioned or an explicit apply would supersede it. */
66
+ disposition: "actionable" | "already_acknowledged";
67
+ }
68
+ /** Deterministic preview shared by CLI, SDK, and MCP apply paths. */
69
+ export interface UnknownAuthorAcknowledgmentPlan {
70
+ /** Selector family resolved by the plan. */
71
+ selection: {
72
+ kind: "events" | "all_actionable";
73
+ };
74
+ /** Complete number of unique selected coordinates. */
75
+ selected_count: number;
76
+ /** Selected coordinates not covered by an earlier disposition. */
77
+ actionable_count: number;
78
+ /** Coordinates an explicit-events apply would supersede. */
79
+ already_acknowledged_count: number;
80
+ /** Coordinate rows omitted only from this bounded preview. */
81
+ omitted_count: number;
82
+ /** Stable ordered prefix of the complete selected set. */
83
+ coordinates: UnknownAuthorAcknowledgmentPlanCoordinate[];
84
+ /** SHA-256 over selection kind and every complete source-bound coordinate. */
85
+ plan_fingerprint: string;
86
+ }
87
+ /** Structured preview or apply result for immutable author acknowledgement. */
88
+ export interface UnknownAuthorAcknowledgmentResult {
89
+ /** Whether this invocation was a read-only preview. */
90
+ dry_run: boolean;
91
+ /** Whether an append-only workspace event was written. */
92
+ mutated: boolean;
93
+ /** Number of coordinates written to the appended disposition. */
94
+ acknowledged: number;
95
+ /** Effect-aware command outcome. */
96
+ outcome: "preview" | "effect" | "no_effect" | "partial_effect";
97
+ /** Stable shell and transport exit paired with the outcome. */
98
+ exit_code: 0 | 6 | 7;
99
+ /** Exact plan used for preview or apply. */
100
+ plan: UnknownAuthorAcknowledgmentPlan;
101
+ /** Appended workspace history path when mutation occurred. */
102
+ history_path?: string;
103
+ }
104
+ /** Resolve a deterministic, source-bound author-acknowledgement preview. */
105
+ export declare function planUnknownAuthorHistoryAcknowledgment(pmRoot: string, selector: Pick<AcknowledgeUnknownAuthorEventsOptions, "events" | "all_actionable">, coordinateLimit?: number): Promise<UnknownAuthorAcknowledgmentPlan>;
55
106
  /** Resolve the mutually exclusive CLI and SDK acknowledgment selectors. */
56
107
  export declare function resolveUnknownAuthorAcknowledgmentSelector(rawEvents: readonly string[], allActionable: boolean): {
57
108
  events: UnknownAuthorHistoryEvent[];
@@ -60,15 +111,9 @@ export declare function resolveUnknownAuthorAcknowledgmentSelector(rawEvents: re
60
111
  /** Parse user-facing item or workspace history coordinates into SDK events. */
61
112
  export declare function parseUnknownAuthorHistoryEventCoordinates(values: readonly string[]): UnknownAuthorHistoryEvent[];
62
113
  /** Normalize an untyped transport payload and execute author acknowledgment. */
63
- export declare function acknowledgeUnknownAuthorHistoryEventsFromTransport(pmRoot: string, input: Record<string, unknown>): Promise<{
64
- acknowledged: number;
65
- history_path: string;
66
- }>;
114
+ export declare function acknowledgeUnknownAuthorHistoryEventsFromTransport(pmRoot: string, input: Record<string, unknown>): Promise<UnknownAuthorAcknowledgmentResult>;
67
115
  /**
68
116
  * Append an audited disposition for immutable unknown-author events without
69
117
  * rewriting their original streams.
70
118
  */
71
- export declare function acknowledgeUnknownAuthorHistoryEvents(pmRoot: string, options: AcknowledgeUnknownAuthorEventsOptions): Promise<{
72
- acknowledged: number;
73
- history_path: string;
74
- }>;
119
+ export declare function acknowledgeUnknownAuthorHistoryEvents(pmRoot: string, options: AcknowledgeUnknownAuthorEventsOptions): Promise<UnknownAuthorAcknowledgmentResult>;
@@ -4,7 +4,8 @@
4
4
  * Provides reusable diagnostics for mutation-author provenance in tracker history.
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]="4fd16197-979e-5269-bed7-f2fb0e2038c2")}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]="b389e521-f689-5895-a5f4-08c3866b3ea3")}catch(e){}}();
8
+ import { createHash } from "node:crypto";
8
9
  import fs from "node:fs/promises";
9
10
  import path from "node:path";
10
11
  import { appendWorkspaceAuditEvent, WORKSPACE_HISTORY_ID, } from "../core/history/workspace-history.js";
@@ -204,6 +205,111 @@ export const scanHistoryAuthorAttribution = async (pmRoot, sampleLimit = 20, inc
204
205
  ...(includeActionableEvents ? { actionable_events: actionableEvents } : {}),
205
206
  };
206
207
  };
208
+ /** Deduplicate and deterministically order history coordinates. */
209
+ function normalizeUnknownAuthorHistoryEvents(events) {
210
+ return [
211
+ ...new Map(events.map((event) => [
212
+ `${event.item_id}:${event.line}`,
213
+ { item_id: event.item_id, line: event.line },
214
+ ])).values(),
215
+ ].sort((left, right) => left.item_id.localeCompare(right.item_id) || left.line - right.line);
216
+ }
217
+ /** Read the append-only set of previously dispositioned coordinates. */
218
+ async function readAcknowledgedUnknownEvents(pmRoot) {
219
+ try {
220
+ return collectAcknowledgedUnknownEvents(await fs.readFile(path.join(pmRoot, "history", "_workspace.jsonl"), "utf8"));
221
+ }
222
+ catch {
223
+ return new Set();
224
+ }
225
+ }
226
+ /** Check whether a coordinate can safely name one immutable history line. */
227
+ function isValidUnknownAuthorHistoryEvent(event) {
228
+ return ((event.item_id === WORKSPACE_HISTORY_ID ||
229
+ /^[a-z0-9][a-z0-9-]*$/iu.test(event.item_id)) &&
230
+ Number.isSafeInteger(event.line) &&
231
+ event.line >= 1);
232
+ }
233
+ /** Resolve one coordinate against its preloaded immutable source stream. */
234
+ function resolveAcknowledgmentPlanCoordinate(event, acknowledgedEvents, sourceLines) {
235
+ const sourceLine = sourceLines[event.line - 1] ?? "";
236
+ let parsed;
237
+ try {
238
+ parsed = JSON.parse(sourceLine);
239
+ }
240
+ catch {
241
+ refuseAuthorAcknowledgmentArgument(`Unknown-author acknowledgment target ${event.item_id}:${event.line} is not readable.`, { code: "history_author_acknowledge_target_unreadable" });
242
+ }
243
+ if (classifyHistoryAuthorEvent(parsed) !== "actionable_unknown") {
244
+ refuseAuthorAcknowledgmentArgument(`Author acknowledgment target ${event.item_id}:${event.line} is not an actionable unknown-author event.`, { code: "history_author_acknowledge_target_not_actionable" });
245
+ }
246
+ return {
247
+ ...event,
248
+ source_event_hash: createHash("sha256").update(sourceLine).digest("hex"),
249
+ disposition: acknowledgedEvents.has(`${event.item_id}:${event.line}`)
250
+ ? "already_acknowledged"
251
+ : "actionable",
252
+ };
253
+ }
254
+ async function resolveUnknownAuthorAcknowledgmentPlan(pmRoot, selector, coordinateLimit) {
255
+ const explicitEvents = selector.events ?? [];
256
+ const selectorCount = Number(selector.all_actionable === true) +
257
+ Number(explicitEvents.length > 0);
258
+ if (selectorCount === 0) {
259
+ refuseAuthorAcknowledgmentArgument("Specify exactly one selector: events or all_actionable.", { code: "history_author_acknowledge_selector_required" });
260
+ }
261
+ if (selectorCount > 1) {
262
+ refuseAuthorAcknowledgmentArgument("Author acknowledgment accepts either explicit events or all_actionable, not both.", { code: "history_author_acknowledge_selector_conflict" });
263
+ }
264
+ if (!Number.isSafeInteger(coordinateLimit) || coordinateLimit < 0) {
265
+ refuseAuthorAcknowledgmentArgument("Author acknowledgment coordinate_limit must be a non-negative integer.", { code: "history_author_acknowledge_preview_limit_invalid" });
266
+ }
267
+ const selectedEvents = normalizeUnknownAuthorHistoryEvents(selector.all_actionable === true
268
+ ? (await scanHistoryAuthorAttribution(pmRoot, 0, true))
269
+ .actionable_events
270
+ : explicitEvents);
271
+ const acknowledgedEvents = await readAcknowledgedUnknownEvents(pmRoot);
272
+ const sourceLinesByItem = new Map();
273
+ for (const event of selectedEvents) {
274
+ if (!isValidUnknownAuthorHistoryEvent(event)) {
275
+ refuseAuthorAcknowledgmentArgument(`Unknown-author acknowledgment target ${event.item_id}:${event.line} is not readable.`, { code: "history_author_acknowledge_target_unreadable" });
276
+ }
277
+ if (sourceLinesByItem.has(event.item_id))
278
+ continue;
279
+ try {
280
+ sourceLinesByItem.set(event.item_id, (await fs.readFile(path.join(pmRoot, "history", `${event.item_id}.jsonl`), "utf8")).split(/\r?\n/u));
281
+ }
282
+ catch {
283
+ refuseAuthorAcknowledgmentArgument(`Unknown-author acknowledgment target ${event.item_id}:${event.line} is not readable.`, { code: "history_author_acknowledge_target_unreadable" });
284
+ }
285
+ }
286
+ const completeCoordinates = selectedEvents.map((event) => resolveAcknowledgmentPlanCoordinate(event, acknowledgedEvents, sourceLinesByItem.get(event.item_id)));
287
+ const kind = selector.all_actionable === true ? "all_actionable" : "events";
288
+ const planFingerprint = createHash("sha256")
289
+ .update(JSON.stringify({
290
+ version: 1,
291
+ selection: kind,
292
+ coordinates: completeCoordinates,
293
+ }))
294
+ .digest("hex");
295
+ const actionableCount = completeCoordinates.filter(({ disposition }) => disposition === "actionable").length;
296
+ return {
297
+ plan: {
298
+ selection: { kind },
299
+ selected_count: completeCoordinates.length,
300
+ actionable_count: actionableCount,
301
+ already_acknowledged_count: completeCoordinates.length - actionableCount,
302
+ omitted_count: Math.max(0, completeCoordinates.length - coordinateLimit),
303
+ coordinates: completeCoordinates.slice(0, coordinateLimit),
304
+ plan_fingerprint: planFingerprint,
305
+ },
306
+ completeCoordinates,
307
+ };
308
+ }
309
+ /** Resolve a deterministic, source-bound author-acknowledgement preview. */
310
+ export async function planUnknownAuthorHistoryAcknowledgment(pmRoot, selector, coordinateLimit = 50) {
311
+ return (await resolveUnknownAuthorAcknowledgmentPlan(pmRoot, selector, coordinateLimit)).plan;
312
+ }
207
313
  /** Resolve the mutually exclusive CLI and SDK acknowledgment selectors. */
208
314
  export function resolveUnknownAuthorAcknowledgmentSelector(rawEvents, allActionable) {
209
315
  const hasExplicitEvents = rawEvents.length > 0;
@@ -254,11 +360,19 @@ export function acknowledgeUnknownAuthorHistoryEventsFromTransport(pmRoot, input
254
360
  return acknowledgeUnknownAuthorHistoryEvents(pmRoot, {
255
361
  events: selector.events,
256
362
  all_actionable: selector.all_actionable,
363
+ dry_run: input.dryRun === true || input.dry_run === true,
364
+ plan_fingerprint: readRuntimeString(input, "planFingerprint") ??
365
+ readRuntimeString(input, "plan_fingerprint"),
366
+ coordinate_limit: typeof input.limit === "number"
367
+ ? input.limit
368
+ : typeof input.limit === "string"
369
+ ? Number(input.limit)
370
+ : undefined,
257
371
  attributed_author: readRuntimeString(input, "attributedAuthor") ??
258
372
  readRuntimeString(input, "attributed_author") ??
259
- "",
260
- reviewer: readRuntimeString(input, "reviewer") ?? "",
261
- reason: readRuntimeString(input, "reason") ?? "",
373
+ undefined,
374
+ reviewer: readRuntimeString(input, "reviewer"),
375
+ reason: readRuntimeString(input, "reason"),
262
376
  });
263
377
  }
264
378
  /**
@@ -266,23 +380,21 @@ export function acknowledgeUnknownAuthorHistoryEventsFromTransport(pmRoot, input
266
380
  * rewriting their original streams.
267
381
  */
268
382
  export async function acknowledgeUnknownAuthorHistoryEvents(pmRoot, options) {
269
- const reviewer = options.reviewer.trim();
270
- const attributedAuthor = options.attributed_author.trim();
271
- const reason = options.reason.trim();
272
- const explicitEvents = options.events ?? [];
273
- const selectorCount = Number(options.all_actionable === true) + Number(explicitEvents.length > 0);
274
- if (selectorCount === 0) {
275
- refuseAuthorAcknowledgmentArgument("Specify exactly one selector: events or all_actionable.", { code: "history_author_acknowledge_selector_required" });
383
+ const reviewer = options.reviewer?.trim() ?? "";
384
+ const attributedAuthor = options.attributed_author?.trim() ?? "";
385
+ const reason = options.reason?.trim() ?? "";
386
+ const resolved = await resolveUnknownAuthorAcknowledgmentPlan(pmRoot, options, options.coordinate_limit ?? 50);
387
+ if (options.dry_run === true) {
388
+ return {
389
+ dry_run: true,
390
+ mutated: false,
391
+ acknowledged: 0,
392
+ outcome: "preview",
393
+ exit_code: EXIT_CODE.SUCCESS,
394
+ plan: resolved.plan,
395
+ };
276
396
  }
277
- if (selectorCount > 1) {
278
- refuseAuthorAcknowledgmentArgument("Author acknowledgment accepts either explicit events or all_actionable, not both.", { code: "history_author_acknowledge_selector_conflict" });
279
- }
280
- const selectedEvents = options.all_actionable === true
281
- ? (await scanHistoryAuthorAttribution(pmRoot, 0, true))
282
- .actionable_events
283
- : explicitEvents;
284
397
  const requiredValuesMissing = [
285
- selectedEvents.length > 0,
286
398
  reviewer.length > 0,
287
399
  reviewer.toLowerCase() !== "unknown",
288
400
  attributedAuthor.length > 0,
@@ -292,34 +404,35 @@ export async function acknowledgeUnknownAuthorHistoryEvents(pmRoot, options) {
292
404
  if (requiredValuesMissing) {
293
405
  refuseAuthorAcknowledgmentArgument("Author acknowledgment requires events, reviewer, attributed_author, and reason.", { code: "history_author_acknowledge_required_values_missing" });
294
406
  }
295
- const uniqueEvents = [
296
- ...new Map(selectedEvents.map((event) => [
297
- `${event.item_id}:${event.line}`,
298
- { item_id: event.item_id, line: event.line },
299
- ])).values(),
300
- ].sort((left, right) => left.item_id.localeCompare(right.item_id) || left.line - right.line);
301
- for (const event of uniqueEvents) {
302
- const invalidCoordinate = [
303
- event.item_id === WORKSPACE_HISTORY_ID ||
304
- /^[a-z0-9][a-z0-9-]*$/i.test(event.item_id),
305
- Number.isSafeInteger(event.line),
306
- event.line >= 1,
307
- ].includes(false);
308
- if (invalidCoordinate) {
309
- refuseAuthorAcknowledgmentArgument(`Unknown-author acknowledgment target ${event.item_id}:${event.line} is not readable.`, { code: "history_author_acknowledge_target_unreadable" });
310
- }
311
- let parsed;
312
- try {
313
- const raw = await fs.readFile(path.join(pmRoot, "history", `${event.item_id}.jsonl`), "utf8");
314
- const line = raw.split(/\r?\n/)[event.line - 1];
315
- parsed = JSON.parse(line ?? "");
316
- }
317
- catch {
318
- refuseAuthorAcknowledgmentArgument(`Unknown-author acknowledgment target ${event.item_id}:${event.line} is not readable.`, { code: "history_author_acknowledge_target_unreadable" });
319
- }
320
- if (classifyHistoryAuthorEvent(parsed) !== "actionable_unknown") {
321
- refuseAuthorAcknowledgmentArgument(`Author acknowledgment target ${event.item_id}:${event.line} is not an actionable unknown-author event.`, { code: "history_author_acknowledge_target_not_actionable" });
322
- }
407
+ if (!options.plan_fingerprint?.trim()) {
408
+ refuseAuthorAcknowledgmentArgument("Author acknowledgment apply requires plan_fingerprint from a fresh dry-run preview.", {
409
+ code: "history_author_acknowledge_plan_fingerprint_required",
410
+ recovery: {
411
+ suggested_retry: "Rerun history-author-acknowledge with --dry-run, then pass --plan-fingerprint <value>.",
412
+ },
413
+ });
414
+ }
415
+ if (options.plan_fingerprint.trim() !== resolved.plan.plan_fingerprint) {
416
+ throw new PmCliError("Author acknowledgment selection changed after preview; no history was mutated.", EXIT_CODE.CONFLICT, {
417
+ code: "history_author_acknowledge_plan_conflict",
418
+ recovery: {
419
+ suggested_retry: "Rerun history-author-acknowledge with --dry-run and apply the fresh plan_fingerprint.",
420
+ },
421
+ });
422
+ }
423
+ const eventsToAcknowledge = resolved.completeCoordinates
424
+ .filter(({ disposition }) => resolved.plan.selection.kind === "events" ||
425
+ disposition === "actionable")
426
+ .map(({ item_id, line }) => ({ item_id, line }));
427
+ if (eventsToAcknowledge.length === 0) {
428
+ return {
429
+ dry_run: false,
430
+ mutated: false,
431
+ acknowledged: 0,
432
+ outcome: "no_effect",
433
+ exit_code: EXIT_CODE.NO_EFFECT,
434
+ plan: resolved.plan,
435
+ };
323
436
  }
324
437
  const settings = await readSettings(pmRoot);
325
438
  const appended = await appendWorkspaceAuditEvent({
@@ -328,7 +441,7 @@ export async function acknowledgeUnknownAuthorHistoryEvents(pmRoot, options) {
328
441
  author: reviewer,
329
442
  context: {
330
443
  author_acknowledgment: {
331
- events: uniqueEvents,
444
+ events: eventsToAcknowledge,
332
445
  attributed_author: attributedAuthor,
333
446
  },
334
447
  },
@@ -336,10 +449,21 @@ export async function acknowledgeUnknownAuthorHistoryEvents(pmRoot, options) {
336
449
  lockTtlSeconds: settings.locks.ttl_seconds,
337
450
  lockWaitMs: settings.locks.wait_ms,
338
451
  });
452
+ const effectResult = resolved.plan.actionable_count > 0 &&
453
+ resolved.plan.already_acknowledged_count > 0
454
+ ? {
455
+ outcome: "partial_effect",
456
+ exit_code: EXIT_CODE.PARTIAL_EFFECT,
457
+ }
458
+ : { outcome: "effect", exit_code: EXIT_CODE.SUCCESS };
339
459
  return {
340
- acknowledged: uniqueEvents.length,
460
+ dry_run: false,
461
+ mutated: true,
462
+ acknowledged: eventsToAcknowledge.length,
463
+ ...effectResult,
464
+ plan: resolved.plan,
341
465
  history_path: appended.historyPath,
342
466
  };
343
467
  }
344
468
  //# sourceMappingURL=author-attribution.js.map
345
- //# debugId=4fd16197-979e-5269-bed7-f2fb0e2038c2
469
+ //# debugId=b389e521-f689-5895-a5f4-08c3866b3ea3
@@ -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]="c82d9b50-274f-585d-be0e-9a0c5067b9e9")}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" },
@@ -350,6 +351,9 @@ export const HISTORY_REPAIR_FLAG_CONTRACTS = [
350
351
  export const HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS = [
351
352
  { flag: "--event", repeatable: true },
352
353
  { flag: "--all-actionable" },
354
+ { flag: "--dry-run" },
355
+ { flag: "--plan-fingerprint" },
356
+ { flag: "--limit", value_type: "number" },
353
357
  { flag: "--attributed-author", aliases: ["--attributed_author"] },
354
358
  { flag: "--reviewer" },
355
359
  { flag: "--reason" },
@@ -1817,4 +1821,4 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
1817
1821
  return normalizeUniqueStringList(all).join(" ");
1818
1822
  }
1819
1823
  //# sourceMappingURL=flag-contracts.js.map
1820
- //# debugId=a5a2c81f-8870-5111-b13c-74c362098d54
1824
+ //# debugId=c82d9b50-274f-585d-be0e-9a0c5067b9e9