@unbrained/pm-cli 2026.9.4 → 2026.9.5

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 (190) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +1 -1
  2. package/.agents/skills/README.md +2 -2
  3. package/.agents/skills/pm-developer/SKILL.md +4 -1
  4. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +10 -0
  5. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +3 -1
  6. package/.agents/skills/pm-extensions/SKILL.md +2 -2
  7. package/.agents/skills/pm-extensions/references/LIFECYCLE.md +3 -3
  8. package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +3 -3
  9. package/.agents/skills/pm-user/SKILL.md +2 -0
  10. package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +5 -0
  11. package/.agents/skills/pm-user/references/WORKFLOWS.md +20 -5
  12. package/.claude-plugin/marketplace.json +2 -2
  13. package/CHANGELOG.md +26 -1
  14. package/dist/cli/commander-usage.d.ts +2 -0
  15. package/dist/cli/commander-usage.js +15 -12
  16. package/dist/cli/help-json-payload.js +12 -7
  17. package/dist/cli/main.js +15 -6
  18. package/dist/cli/register-list-query.js +4 -2
  19. package/dist/cli/register-mutation.js +4 -2
  20. package/dist/cli/register-operations.js +6 -2
  21. package/dist/cli-bundle/bundle-manifest.json +153 -153
  22. package/dist/cli-bundle/chunks/{chunk-RI4XNOYS.js → chunk-3HBDTJRK.js} +2 -2
  23. package/dist/cli-bundle/chunks/chunk-66VPKFP2.js +5 -0
  24. package/dist/cli-bundle/chunks/{chunk-I2AS367G.js → chunk-HUAQITVW.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-HI6BHPCU.js → chunk-IBYREGSP.js} +2 -2
  26. package/dist/cli-bundle/chunks/chunk-LUI4E32I.js +231 -0
  27. package/dist/cli-bundle/chunks/{chunk-YW4QK2G7.js → chunk-QPZHQY2O.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-X6CMGV6L.js → chunk-SF6SM6U5.js} +2 -2
  29. package/dist/cli-bundle/chunks/chunk-SVK5Y64D.js +40 -0
  30. package/dist/cli-bundle/chunks/chunk-V5GBD5KV.js +9 -0
  31. package/dist/cli-bundle/chunks/{chunk-V72UV7QS.js → chunk-WWAEGW4V.js} +57 -57
  32. package/dist/cli-bundle/chunks/{chunk-A24WAVE6.js → chunk-ZRAQS3UA.js} +2 -2
  33. package/dist/cli-bundle/chunks/{register-list-query-Z5YYSJJG.js → register-list-query-AYKGODWT.js} +3 -3
  34. package/dist/cli-bundle/chunks/{register-mutation-ELSP6I4I.js → register-mutation-YZYG53SQ.js} +4 -4
  35. package/dist/cli-bundle/chunks/register-operations-KFSCC7QV.js +2 -0
  36. package/dist/cli-bundle/chunks/{register-setup-E2AE72QG.js → register-setup-UJCRVGBG.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-24IG6ONG.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-53IHPICX.js → chunk-3ASU6WGI.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-3ITLIBKS.js +56 -0
  40. package/dist/cli-bundle/focused-chunks/chunk-3NQD5YDG.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-7N2TV7WZ.js → chunk-4OSHLNUE.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/chunk-65N6JHAN.js +2 -0
  43. package/dist/cli-bundle/focused-chunks/{chunk-AJR3OP2E.js → chunk-B2TTQGFG.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-GUBM3RGY.js +20 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-25UJBH4M.js → chunk-H5FOGAVD.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-JX3RCVCX.js +2 -0
  47. package/dist/cli-bundle/focused-chunks/{chunk-6PWPQKDN.js → chunk-KWWCBWFO.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/chunk-MV752SUC.js +12 -0
  49. package/dist/cli-bundle/focused-chunks/chunk-PKIPMCFS.js +6 -0
  50. package/dist/cli-bundle/focused-chunks/{chunk-3646BZ4W.js → chunk-QL66QNWG.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/chunk-RJMR2JIF.js +9 -0
  52. package/dist/cli-bundle/focused-chunks/chunk-WIUPWIZR.js +177 -0
  53. package/dist/cli-bundle/focused-chunks/{chunk-NBMJD6MK.js → chunk-WOCIPMW7.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-MHKUIPJW.js → chunk-YEF5PQQ2.js} +2 -2
  55. package/dist/cli-bundle/main.js +22 -15
  56. package/dist/cli-bundle/sdk-authoring.js +1 -1
  57. package/dist/cli-bundle/sdk-contracts.js +1 -1
  58. package/dist/cli-bundle/sdk-core.js +29 -29
  59. package/dist/cli-bundle/sdk-governance.js +1 -1
  60. package/dist/cli-bundle/sdk-graph.js +1 -1
  61. package/dist/cli-bundle/sdk-merge.js +42 -39
  62. package/dist/cli-bundle/sdk-query.js +1 -1
  63. package/dist/cli-bundle/sdk-runtime.js +1 -1
  64. package/dist/cli-bundle/sdk-testing.js +1 -1
  65. package/dist/cli-bundle/sdk.js +8 -8
  66. package/dist/core/extensions/extension-types.d.ts +2 -0
  67. package/dist/core/extensions/extension-types.js +2 -2
  68. package/dist/core/history/drift-scan.d.ts +5 -0
  69. package/dist/core/history/drift-scan.js +16 -6
  70. package/dist/core/history/event-classification.d.ts +1 -1
  71. package/dist/core/history/event-classification.js +3 -2
  72. package/dist/core/history/history.js +37 -5
  73. package/dist/core/history/identity.d.ts +15 -0
  74. package/dist/core/history/identity.js +31 -0
  75. package/dist/core/history/projection.js +50 -17
  76. package/dist/core/history/read.js +6 -3
  77. package/dist/core/history/replay.d.ts +1 -2
  78. package/dist/core/history/replay.js +4 -4
  79. package/dist/core/history/version-address.d.ts +13 -0
  80. package/dist/core/history/version-address.js +33 -0
  81. package/dist/core/item/actionability.d.ts +21 -1
  82. package/dist/core/item/actionability.js +45 -10
  83. package/dist/core/item/id.js +8 -4
  84. package/dist/core/item/item-type-definition.d.ts +2 -0
  85. package/dist/core/item/item-type-definition.js +9 -2
  86. package/dist/core/item/type-registry.d.ts +5 -1
  87. package/dist/core/item/type-registry.js +9 -4
  88. package/dist/core/shared/errors.d.ts +8 -0
  89. package/dist/core/shared/errors.js +2 -2
  90. package/dist/core/store/item-store.d.ts +14 -0
  91. package/dist/core/store/item-store.js +48 -10
  92. package/dist/core/store/settings-validator.js +3 -2
  93. package/dist/sdk/actionability.d.ts +1 -1
  94. package/dist/sdk/actionability.js +3 -3
  95. package/dist/sdk/cli-contracts/command-aliases.js +11 -2
  96. package/dist/sdk/cli-contracts/completeness.js +4 -3
  97. package/dist/sdk/cli-contracts/flag-contracts.js +29 -5
  98. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +19 -12
  99. package/dist/sdk/cli-contracts/tool-parameter-tables.js +14 -2
  100. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  101. package/dist/sdk/cli-contracts/tool-schema.js +19 -6
  102. package/dist/sdk/context-intent-contracts.js +3 -3
  103. package/dist/sdk/context-usage.js +9 -11
  104. package/dist/sdk/define.d.ts +1 -1
  105. package/dist/sdk/define.js +2 -2
  106. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +98 -50
  107. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -2
  108. package/dist/sdk/governance/validate-history-drift.js +16 -5
  109. package/dist/sdk/guide-topics.js +116 -2
  110. package/dist/sdk/history/salvage.d.ts +35 -0
  111. package/dist/sdk/history/salvage.js +248 -0
  112. package/dist/sdk/history-compact.js +32 -37
  113. package/dist/sdk/history-read.d.ts +3 -2
  114. package/dist/sdk/history-read.js +6 -3
  115. package/dist/sdk/history-repair.d.ts +5 -0
  116. package/dist/sdk/history-repair.js +14 -2
  117. package/dist/sdk/lifecycle/claim.d.ts +4 -0
  118. package/dist/sdk/lifecycle/claim.js +9 -3
  119. package/dist/sdk/lifecycle/restore.d.ts +1 -0
  120. package/dist/sdk/lifecycle/restore.js +19 -7
  121. package/dist/sdk/output-projection.d.ts +3 -1
  122. package/dist/sdk/output-projection.js +11 -3
  123. package/dist/sdk/public-surface.json +1 -0
  124. package/dist/sdk/query/context.d.ts +9 -0
  125. package/dist/sdk/query/context.js +33 -21
  126. package/dist/sdk/query/get.d.ts +2 -2
  127. package/dist/sdk/query/get.js +4 -3
  128. package/dist/sdk/query/history.d.ts +11 -0
  129. package/dist/sdk/query/history.js +34 -10
  130. package/dist/sdk/query/next.d.ts +15 -1
  131. package/dist/sdk/query/next.js +43 -20
  132. package/dist/sdk/query.d.ts +1 -0
  133. package/dist/sdk/query.js +3 -2
  134. package/dist/sdk/runtime-primitives.d.ts +1 -1
  135. package/dist/sdk/runtime-primitives.js +3 -3
  136. package/dist/types.d.ts +2 -0
  137. package/dist/types.js +2 -2
  138. package/docs/AGENT_GUIDE.md +36 -0
  139. package/docs/HISTORY_RECOVERY.md +146 -0
  140. package/docs/README.md +1 -0
  141. package/docs/RELEASING.md +25 -11
  142. package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +24 -1
  143. package/docs/SDK_EXECUTION_CONTRACTS.md +105 -0
  144. package/docs/TESTING.md +5 -0
  145. package/docs/agent-task-token-baseline.json +17 -17
  146. package/docs/agent-task-transcripts.json +2 -1
  147. package/docs/generated/FLAG_LEXICON_BUDGETS.md +10 -10
  148. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +11 -3
  149. package/marketplace.json +2 -2
  150. package/package.json +4 -5
  151. package/packages/pm-beads/package.json +1 -1
  152. package/packages/pm-calendar/package.json +1 -1
  153. package/packages/pm-command-kit/package.json +1 -1
  154. package/packages/pm-digital-twin/package.json +1 -1
  155. package/packages/pm-governance-audit/package.json +1 -1
  156. package/packages/pm-guide-shell/package.json +1 -1
  157. package/packages/pm-kanban/package.json +1 -1
  158. package/packages/pm-lifecycle-hooks/package.json +1 -1
  159. package/packages/pm-linked-test-adapters/package.json +1 -1
  160. package/packages/pm-search-advanced/package.json +1 -1
  161. package/packages/pm-templates/package.json +1 -1
  162. package/packages/pm-todos/package.json +1 -1
  163. package/packages/pm-vcs/package.json +1 -1
  164. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  165. package/plugins/pm-claude/skills/pm-audit/SKILL.md +2 -2
  166. package/plugins/pm-claude/skills/pm-developer/SKILL.md +2 -2
  167. package/plugins/pm-claude/skills/pm-planner/SKILL.md +2 -2
  168. package/plugins/pm-claude/skills/pm-release/SKILL.md +2 -2
  169. package/plugins/pm-claude/skills/pm-workflow/SKILL.md +3 -3
  170. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  171. package/plugins/pm-codex/skills/pm-auditor/SKILL.md +2 -2
  172. package/plugins/pm-codex/skills/pm-native/SKILL.md +3 -4
  173. package/plugins/pm-codex/skills/pm-release/SKILL.md +2 -2
  174. package/scripts/finalize-build.mjs +13 -1
  175. package/dist/cli-bundle/chunks/chunk-6XSKPNCF.js +0 -230
  176. package/dist/cli-bundle/chunks/chunk-OGBVU67G.js +0 -5
  177. package/dist/cli-bundle/chunks/chunk-TXW6VL33.js +0 -38
  178. package/dist/cli-bundle/chunks/chunk-VGLHECAP.js +0 -9
  179. package/dist/cli-bundle/chunks/register-operations-OH7R3ZT4.js +0 -2
  180. package/dist/cli-bundle/focused-chunks/chunk-4YRAVI43.js +0 -12
  181. package/dist/cli-bundle/focused-chunks/chunk-5P4HVOWG.js +0 -176
  182. package/dist/cli-bundle/focused-chunks/chunk-636VVQ7F.js +0 -54
  183. package/dist/cli-bundle/focused-chunks/chunk-B3A6MJYE.js +0 -2
  184. package/dist/cli-bundle/focused-chunks/chunk-BFDDJ2T2.js +0 -2
  185. package/dist/cli-bundle/focused-chunks/chunk-BHUIRZWQ.js +0 -9
  186. package/dist/cli-bundle/focused-chunks/chunk-JADHHPY6.js +0 -6
  187. package/dist/cli-bundle/focused-chunks/chunk-NSKBLHVI.js +0 -20
  188. package/dist/cli-bundle/focused-chunks/chunk-P2GOAOQN.js +0 -2
  189. package/dist/cli-bundle/focused-chunks/chunk-YARWJM2B.js +0 -2
  190. package/sdk/public-surface.json +0 -33034
@@ -4,13 +4,22 @@
4
4
  * Implements the SDK-owned restore lifecycle operation shared by every surface.
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]="db5f3a6d-9ae5-5f9b-bedf-766b2b79324c")}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]="7a3effef-6ba8-51ba-ae99-436d4ef69813")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
9
  import jsonPatch from "fast-json-patch";
10
10
  import fs from "node:fs/promises";
11
- import { pathExists, readFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, replayToCanonicalItemDocument, replayToItemDocument, toReplayDocument, enforceHistoryStreamPolicyForItem, normalizeItemId, normalizeRawItemId, canonicalDocument, serializeItemDocument, resolveItemTypeRegistry, acquireLock, EXIT_CODE, PmCliError, nowIso, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveOnWriteHooks, runActiveBeforeMutationHooks, locateItem, createMutationGuardSdk, readLocatedItem, getHistoryPath, getItemPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
11
+ import { readLocatedItemSnapshot } from "../../core/store/item-store.js";
12
+ import { historyVersionOffset } from "../../core/history/version-address.js";
13
+ import { pathExists, readFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, replayToCanonicalItemDocument, replayToItemDocument, toReplayDocument, enforceHistoryStreamPolicyForItem, normalizeItemId, normalizeRawItemId, canonicalDocument, serializeItemDocument, resolveItemTypeRegistry, acquireLock, EXIT_CODE, PmCliError, nowIso, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveOnWriteHooks, runActiveBeforeMutationHooks, locateItem, createMutationGuardSdk, getHistoryPath, getItemPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
12
14
  import { applyHistoryPatch, ensureMaterializedHistoryTarget as ensureMaterializedRestoreTarget, extractPatchFailureContext, readHistoryEntries, replayHistoryToTarget as replayToTarget, resolveHistoryTarget, } from "../history-read.js";
13
15
  import { acquireItemMetadataDerivedIndexLock, refreshItemMetadataDerivedIndex, } from "../item-metadata-index.js";
16
+ /** Read a restore input without discarding unreadable bytes needed for rollback. */
17
+ async function readRestoreItem(located, settings, history) {
18
+ const snapshot = await readLocatedItemSnapshot(located, { schema: settings.schema });
19
+ return snapshot.error === null
20
+ ? { raw: snapshot.raw, document: snapshot.document }
21
+ : { raw: snapshot.raw, document: replayCurrentDocument(history), recovered: true };
22
+ }
14
23
  /** Resolve restore targets with the command's established wording and at-or-before timestamp semantics. */
15
24
  function ensureReplayTarget(target, history) {
16
25
  return resolveHistoryTarget(target, history, {
@@ -82,6 +91,7 @@ function changedFields(beforeDocument, afterDocument) {
82
91
  }
83
92
  return Array.from(fields).sort((a, b) => a.localeCompare(b));
84
93
  }
94
+ /** Reload item and history under the caller's lock, refusing changes since the recovery snapshot. */
85
95
  async function loadRestoreStateUnderLock(params) {
86
96
  const historyRawUnderLock = await readFileIfExists(params.subject.historyPath);
87
97
  if (historyRawUnderLock !== params.historyRawBeforeLock) {
@@ -89,9 +99,7 @@ async function loadRestoreStateUnderLock(params) {
89
99
  }
90
100
  const locatedUnderLock = await locateItem(params.pmRoot, params.resolvedId, params.settings.id_prefix, params.settings.item_format, params.typeToFolder);
91
101
  const loadedItemUnderLock = locatedUnderLock
92
- ? await readLocatedItem(locatedUnderLock, {
93
- schema: params.settings.schema,
94
- })
102
+ ? await readRestoreItem(locatedUnderLock, params.settings, params.history)
95
103
  : null;
96
104
  if ((loadedItemUnderLock?.raw ?? null) !== params.currentItemRawBeforeLock) {
97
105
  throw new PmCliError(`Item ${params.resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);
@@ -183,7 +191,7 @@ export async function runRestore(id, target, options, global) {
183
191
  throw new PmCliError(`Restore target resolved to item ${restoredDocument.metadata.id}, expected ${resolvedId}.`, EXIT_CODE.GENERIC_FAILURE);
184
192
  }
185
193
  const loadedItemBeforeLock = subject.located
186
- ? await readLocatedItem(subject.located, { schema: settings.schema })
194
+ ? await readRestoreItem(subject.located, settings, history)
187
195
  : null;
188
196
  const currentItemRawBeforeLock = loadedItemBeforeLock?.raw ?? null;
189
197
  const author = resolveAuthor(options.author, settings.author_default);
@@ -197,6 +205,7 @@ export async function runRestore(id, target, options, global) {
197
205
  typeToFolder: typeRegistry.type_to_folder,
198
206
  historyRawBeforeLock,
199
207
  currentItemRawBeforeLock,
208
+ history,
200
209
  });
201
210
  const itemFormat = "toon";
202
211
  const currentState = resolveRestoreCurrentState(loadedItemUnderLock, history);
@@ -282,17 +291,20 @@ export async function runRestore(id, target, options, global) {
282
291
  changed_fields: restoreChangedFields,
283
292
  });
284
293
  const targetEntry = history[resolvedTarget.historyIndex];
294
+ const offset = historyVersionOffset(history, true);
285
295
  return {
286
296
  item: restoredDocument.metadata,
287
297
  restored_from: {
288
298
  kind: resolvedTarget.kind,
289
299
  target: resolvedTarget.raw,
290
300
  history_index: resolvedTarget.historyIndex + 1,
301
+ version: offset === null ? null : offset + resolvedTarget.historyIndex + 1,
291
302
  entry_ts: targetEntry.ts,
292
303
  entry_op: targetEntry.op,
293
304
  },
294
305
  changed_fields: restoreChangedFields,
295
306
  warnings: [
307
+ ...(loadedItemUnderLock?.recovered ? ["restore_unreadable_item_recovered"] : []),
296
308
  ...subject.historyPolicyWarnings,
297
309
  ...ownershipWarnings,
298
310
  ...derivedIndexWarnings,
@@ -316,4 +328,4 @@ export const _testOnlyRestoreCommand = {
316
328
  resolveRestoreSubject,
317
329
  };
318
330
  //# sourceMappingURL=restore.js.map
319
- //# debugId=db5f3a6d-9ae5-5f9b-bedf-766b2b79324c
331
+ //# debugId=7a3effef-6ba8-51ba-ae99-436d4ef69813
@@ -13,6 +13,8 @@ export interface OutputOmissionReceipt {
13
13
  omitted_field_group_count: number;
14
14
  /** Withheld groups and the exact opt-in that restores each one. */
15
15
  omitted_field_groups: OutputProjectionFieldGroup[];
16
+ /** Population counted by context summary regardless of bounded focus rows. */
17
+ summary_scope?: "matching_items";
16
18
  }
17
19
  /** Self-describing projection metadata that built-ins and extensions can use to derive receipts without command-specific code. */
18
20
  export interface OutputProjectionDeclaration {
@@ -59,7 +61,7 @@ export declare const PM_READ_ROW_CONTRACTS: {
59
61
  readonly fields: "supported";
60
62
  };
61
63
  readonly next: {
62
- readonly row_keys: readonly ["recommended", "ready", "decision_needed", "blocked", "held_by_others"];
64
+ readonly row_keys: readonly ["recommended", "ready", "decision_needed", "gate_needed", "containers", "blocked", "held_by_others"];
63
65
  readonly fields: "unsupported";
64
66
  };
65
67
  readonly search: {
@@ -4,7 +4,7 @@
4
4
  * Declares machine-readable field-group omissions for bounded command results.
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]="8ffd2cd5-8b7e-5ae1-a0c6-aab488edb73c")}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]="db6180ed-0b18-5bf8-bcc1-24171e2dfdc4")}catch(e){}}();
8
8
  import { EXIT_CODE } from "../core/shared/constants.js";
9
9
  import { PmCliError } from "../core/shared/errors.js";
10
10
  const MATERIAL_FIELD_GROUPS_BY_RESULT = new WeakMap();
@@ -24,6 +24,8 @@ export const PM_READ_ROW_CONTRACTS = {
24
24
  "recommended",
25
25
  "ready",
26
26
  "decision_needed",
27
+ "gate_needed",
28
+ "containers",
27
29
  "blocked",
28
30
  "held_by_others",
29
31
  ],
@@ -208,6 +210,8 @@ const READ_RESULT_SENTINEL_KEYS = {
208
210
  "recommended",
209
211
  "ready",
210
212
  "decision_needed",
213
+ "gate_needed",
214
+ "containers",
211
215
  "blocked",
212
216
  "held_by_others",
213
217
  ],
@@ -314,7 +318,11 @@ function resolveDeclaredProjectionReceipt(result) {
314
318
  function resolveContextReceipt(result) {
315
319
  if (!Array.isArray(result.sections_included))
316
320
  return undefined;
317
- return createOutputOmissionReceipt(CONTEXT_FIELD_GROUPS, new Set(result.sections_included.filter((section) => typeof section === "string")));
321
+ const receipt = createOutputOmissionReceipt(CONTEXT_FIELD_GROUPS, new Set(result.sections_included.filter((section) => typeof section === "string")));
322
+ if (isRecord(result.summary) && result.summary.scope === "matching_items") {
323
+ receipt.summary_scope = "matching_items";
324
+ }
325
+ return receipt;
318
326
  }
319
327
  function resolveGetReceipt(result) {
320
328
  if (!isRecord(result.item))
@@ -420,4 +428,4 @@ export function attachOutputOmissionReceipt(command, result) {
420
428
  : { ...disclosedResult, omission_receipt: receipt };
421
429
  }
422
430
  //# sourceMappingURL=output-projection.js.map
423
- //# debugId=8ffd2cd5-8b7e-5ae1-a0c6-aab488edb73c
431
+ //# debugId=db6180ed-0b18-5bf8-bcc1-24171e2dfdc4