@unbrained/pm-cli 2026.8.11 → 2026.8.12

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 (184) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +52 -21
  3. package/dist/cli/commander-usage.js +37 -11
  4. package/dist/cli/error-guidance.d.ts +2 -0
  5. package/dist/cli/error-guidance.js +80 -13
  6. package/dist/cli/main.js +34 -19
  7. package/dist/cli/register-annotations.js +56 -3
  8. package/dist/cli/register-list-query.js +10 -7
  9. package/dist/cli/register-operations.js +16 -6
  10. package/dist/cli-bundle/bundle-manifest.json +157 -157
  11. package/dist/cli-bundle/chunks/{chunk-2OOU2AFH.js → chunk-3PS7X6GS.js} +2 -2
  12. package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +13 -0
  13. package/dist/cli-bundle/chunks/{chunk-WMEZHCFI.js → chunk-BM5YJ2UW.js} +51 -43
  14. package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +33 -0
  15. package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +196 -0
  16. package/dist/cli-bundle/chunks/{chunk-ZU34C3LH.js → chunk-KOQMGCTA.js} +2 -2
  17. package/dist/cli-bundle/chunks/chunk-R76342NV.js +2 -0
  18. package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +5 -0
  19. package/dist/cli-bundle/chunks/{chunk-IUNRVDAI.js → chunk-VLUQOIDT.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-A2SJGHSI.js → chunk-WLAHPSOX.js} +2 -2
  21. package/dist/cli-bundle/chunks/register-list-query-XPCJRUUD.js +10 -0
  22. package/dist/cli-bundle/chunks/register-mutation-4RJCBKRS.js +20 -0
  23. package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +2 -0
  24. package/dist/cli-bundle/chunks/{register-setup-NOCOOWQY.js → register-setup-LLHAKP2V.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +5 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +155 -0
  27. package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +2 -0
  28. package/dist/cli-bundle/focused-chunks/{chunk-FPSYO5ZG.js → chunk-ECADZMVC.js} +11 -11
  29. package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +16 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-BKPIY34S.js → chunk-GQW4BPUT.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-UDAZWT25.js → chunk-JAFRIWVF.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-2DL3MRTD.js → chunk-KHM2CS2C.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-J5EKAIVD.js → chunk-KPSXVBDV.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-23FTGO3W.js → chunk-KTLOKKCQ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +8 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-KDH5OX3D.js → chunk-NBLUKITQ.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-55BIB6DV.js → chunk-NYLOUPOB.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-DPO7TEFX.js → chunk-Q4T463SD.js} +28 -28
  41. package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-TL5M2PAY.js → chunk-RWPAWUOT.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +17 -0
  44. package/dist/cli-bundle/focused-chunks/{chunk-4H5IA6AV.js → chunk-YIAXMC3T.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/chunk-ZMGWAYH7.js +2 -0
  46. package/dist/cli-bundle/main.js +13 -13
  47. package/dist/cli-bundle/sdk-authoring.js +1 -1
  48. package/dist/cli-bundle/sdk-contracts.js +1 -1
  49. package/dist/cli-bundle/sdk-core.js +40 -40
  50. package/dist/cli-bundle/sdk-governance.js +1 -1
  51. package/dist/cli-bundle/sdk-graph.js +1 -1
  52. package/dist/cli-bundle/sdk-merge.js +1 -1
  53. package/dist/cli-bundle/sdk-query.js +1 -1
  54. package/dist/cli-bundle/sdk-runtime.js +1 -1
  55. package/dist/cli-bundle/sdk-testing.js +1 -1
  56. package/dist/cli-bundle/sdk.js +2 -2
  57. package/dist/core/extensions/reserved-host-flags.js +3 -2
  58. package/dist/core/history/drift-scan.js +13 -8
  59. package/dist/core/history/history.d.ts +8 -0
  60. package/dist/core/history/history.js +57 -7
  61. package/dist/core/history/replay.d.ts +9 -1
  62. package/dist/core/history/replay.js +48 -13
  63. package/dist/core/output/output.d.ts +2 -0
  64. package/dist/core/output/output.js +46 -14
  65. package/dist/core/shared/command-types.d.ts +2 -0
  66. package/dist/core/shared/command-types.js +2 -2
  67. package/dist/core/shared/errors.d.ts +5 -0
  68. package/dist/core/shared/errors.js +2 -2
  69. package/dist/core/store/item-metadata-cache.d.ts +1 -1
  70. package/dist/core/store/item-metadata-cache.js +14 -7
  71. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  72. package/dist/sdk/cli-bootstrap.js +6 -2
  73. package/dist/sdk/cli-contracts/completeness.js +3 -2
  74. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  75. package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
  76. package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
  77. package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +8 -6
  78. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +4 -3
  79. package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
  80. package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -2
  81. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  82. package/dist/sdk/cli-contracts/tool-schema.js +7 -4
  83. package/dist/sdk/cli-program.js +3 -2
  84. package/dist/sdk/completion.js +16 -7
  85. package/dist/sdk/context-intent-contracts.js +45 -4
  86. package/dist/sdk/core.d.ts +1 -0
  87. package/dist/sdk/core.js +3 -2
  88. package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
  89. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1585 -0
  90. package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
  91. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
  92. package/dist/sdk/generated-error-code-catalog.js +6 -3140
  93. package/dist/sdk/governance/assurance-action.js +9 -7
  94. package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
  95. package/dist/sdk/governance/assurance-mutation-error.js +35 -0
  96. package/dist/sdk/governance/assurance-runtime.js +11 -8
  97. package/dist/sdk/governance/assurance.d.ts +12 -6
  98. package/dist/sdk/governance/assurance.js +181 -66
  99. package/dist/sdk/governance/health.d.ts +3 -1
  100. package/dist/sdk/governance/health.js +21 -4
  101. package/dist/sdk/governance/validate-item-reader.js +3 -3
  102. package/dist/sdk/governance/validate.d.ts +2 -0
  103. package/dist/sdk/governance/validate.js +13 -3
  104. package/dist/sdk/graph/durable-cache.d.ts +1 -1
  105. package/dist/sdk/graph/durable-cache.js +98 -29
  106. package/dist/sdk/graph/governance.d.ts +14 -0
  107. package/dist/sdk/graph/governance.js +34 -9
  108. package/dist/sdk/index.d.ts +1 -1
  109. package/dist/sdk/index.js +3 -3
  110. package/dist/sdk/lifecycle/claim.js +10 -3
  111. package/dist/sdk/merge/driver.d.ts +2 -2
  112. package/dist/sdk/merge/driver.js +3 -3
  113. package/dist/sdk/merge/receipts.d.ts +6 -4
  114. package/dist/sdk/merge/receipts.js +7 -5
  115. package/dist/sdk/merge/three-way.d.ts +2 -2
  116. package/dist/sdk/merge/three-way.js +3 -3
  117. package/dist/sdk/output-projection.d.ts +9 -1
  118. package/dist/sdk/output-projection.js +45 -9
  119. package/dist/sdk/query/activity.d.ts +49 -2
  120. package/dist/sdk/query/activity.js +183 -37
  121. package/dist/sdk/query/get.js +19 -2
  122. package/dist/sdk/read-output-contracts.d.ts +5 -1
  123. package/dist/sdk/read-output-contracts.js +17 -2
  124. package/dist/sdk/read-output-session.d.ts +2 -0
  125. package/dist/sdk/read-output-session.js +12 -5
  126. package/dist/sdk/runtime-primitives.d.ts +3 -3
  127. package/dist/sdk/runtime-primitives.js +5 -5
  128. package/dist/sdk/runtime-stats-options.js +3 -2
  129. package/dist/sdk/runtime.js +5 -9
  130. package/dist/sdk/stats.d.ts +36 -3
  131. package/dist/sdk/stats.js +55 -15
  132. package/dist/sdk/test/execution.d.ts +4 -0
  133. package/dist/sdk/test/execution.js +86 -21
  134. package/dist/types.d.ts +2 -0
  135. package/dist/types.js +2 -2
  136. package/docs/ASSURANCE.md +17 -12
  137. package/docs/COMMANDS.md +29 -8
  138. package/docs/CONFIGURATION.md +7 -0
  139. package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
  140. package/docs/MERGE_SAFETY.md +3 -1
  141. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
  142. package/docs/README.md +2 -0
  143. package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
  144. package/docs/SDK_AGENT_SESSION_CONTEXT.md +12 -1
  145. package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
  146. package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
  147. package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
  148. package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
  149. package/marketplace.json +2 -2
  150. package/package.json +5 -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-codex/.codex-plugin/plugin.json +1 -1
  166. package/sdk/public-surface.json +203 -52
  167. package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +0 -33
  168. package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +0 -13
  169. package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +0 -194
  170. package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +0 -5
  172. package/dist/cli-bundle/chunks/register-list-query-HAUXVUPY.js +0 -10
  173. package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +0 -20
  174. package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +0 -2
  175. package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +0 -2
  176. package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +0 -2
  177. package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +0 -16
  178. package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +0 -8
  179. package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +0 -2
  180. package/dist/cli-bundle/focused-chunks/chunk-E3KCL7AY.js +0 -5
  181. package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +0 -153
  182. package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +0 -2
  183. package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +0 -2
  184. package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +0 -17
@@ -1,9 +1,10 @@
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]="597e1ac0-f461-5984-95a9-cd3447b1fea7")}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]="d7b8bd03-cd67-5f3f-9ac9-74808a03c2c7")}catch(e){}}();
3
3
  import { EXIT_CODE } from "../../core/shared/constants.js";
4
4
  import { PmCliError } from "../../core/shared/errors.js";
5
5
  import { ASSURANCE_GATE_TRIGGERS, evaluateAssuranceGate, getAssuranceDeclaration, listAssuranceDeclarations, listAssuranceVerdicts, putAssuranceDeclaration, recordAssuranceVerdict, removeAssuranceDeclaration, } from "./assurance.js";
6
6
  import { MAX_ASSURANCE_VERDICT_LIMIT } from "./assurance-limits.js";
7
+ import { normalizeAssuranceMutation } from "./assurance-mutation-error.js";
7
8
  import { createAssuranceWorkspaceContext } from "./assurance-runtime.js";
8
9
  import { resolvePmRoot } from "../runtime-primitives.js";
9
10
  import { parseRuntimeInteger, readRuntimeString } from "../runtime-input.js";
@@ -148,16 +149,17 @@ export async function runAssuranceAction(input, global = {}) {
148
149
  if (!input.id) {
149
150
  throw new PmCliError(`assurance ${action} requires an id`, EXIT_CODE.USAGE);
150
151
  }
152
+ const id = input.id;
151
153
  if (action === "show") {
152
- return getAssuranceDeclaration(pmRoot, kind, input.id);
154
+ return getAssuranceDeclaration(pmRoot, kind, id);
153
155
  }
154
156
  if (action === "remove") {
155
- const receipt = await removeAssuranceDeclaration(pmRoot, kind, input.id, { author: input.author, message: input.message });
157
+ const receipt = await normalizeAssuranceMutation(() => removeAssuranceDeclaration(pmRoot, kind, id, { author: input.author, message: input.message }));
156
158
  return projectMutationReceipt(receipt, input.idOnly);
157
159
  }
158
160
  const definition = parseDefinition(kind, input.definition);
159
- if (definition.id !== input.id) {
160
- throw new PmCliError(`Assurance definition id ${definition.id} does not match requested id ${input.id}`, EXIT_CODE.USAGE);
161
+ if (definition.id !== id) {
162
+ throw new PmCliError(`Assurance definition id ${definition.id} does not match requested id ${id}`, EXIT_CODE.USAGE);
161
163
  }
162
164
  const mutationOptions = {
163
165
  author: input.author,
@@ -168,7 +170,7 @@ export async function runAssuranceAction(input, global = {}) {
168
170
  }
169
171
  : {}),
170
172
  };
171
- const receipt = await putAssuranceDeclaration(pmRoot, kind, definition, mutationOptions);
173
+ const receipt = await normalizeAssuranceMutation(() => putAssuranceDeclaration(pmRoot, kind, definition, mutationOptions));
172
174
  return projectMutationReceipt(receipt, input.idOnly);
173
175
  }
174
176
  /** Normalize a generic SDK or MCP argument envelope into one assurance request. */
@@ -195,4 +197,4 @@ export function runAssuranceDispatch(args, options, global) {
195
197
  }, global);
196
198
  }
197
199
  //# sourceMappingURL=assurance-action.js.map
198
- //# debugId=597e1ac0-f461-5984-95a9-cd3447b1fea7
200
+ //# debugId=d7b8bd03-cd67-5f3f-9ac9-74808a03c2c7
@@ -0,0 +1,7 @@
1
+ /** Expected declaration-validation or mutation-policy refusal. */
2
+ export declare class AssuranceMutationRefusalError extends TypeError {
3
+ /** Create one typed refusal while retaining TypeError compatibility for SDK callers. */
4
+ constructor(message: string);
5
+ }
6
+ /** Normalize only expected assurance mutation refusals for CLI and MCP hosts. */
7
+ export declare function normalizeAssuranceMutation<T>(operation: () => Promise<T>): Promise<T>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @module sdk/assurance-mutation-error
3
+ *
4
+ * Distinguishes expected assurance mutation refusals from unexpected runtime
5
+ * faults before transport layers normalize them into stable usage errors.
6
+ */
7
+
8
+ !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]="255eee6e-f6bb-5fd2-8a73-545e672d205d")}catch(e){}}();
9
+ import { EXIT_CODE } from "../../core/shared/constants.js";
10
+ import { PmCliError } from "../../core/shared/errors.js";
11
+ /** Expected declaration-validation or mutation-policy refusal. */
12
+ export class AssuranceMutationRefusalError extends TypeError {
13
+ /** Create one typed refusal while retaining TypeError compatibility for SDK callers. */
14
+ constructor(message) {
15
+ super(message);
16
+ this.name = "AssuranceMutationRefusalError";
17
+ }
18
+ }
19
+ /** Normalize only expected assurance mutation refusals for CLI and MCP hosts. */
20
+ export async function normalizeAssuranceMutation(operation) {
21
+ try {
22
+ return await operation();
23
+ }
24
+ catch (error) {
25
+ if (error instanceof AssuranceMutationRefusalError) {
26
+ throw new PmCliError(error.message, EXIT_CODE.USAGE, {
27
+ code: "invalid_argument_value",
28
+ reason: "assurance_mutation_refused",
29
+ });
30
+ }
31
+ throw error;
32
+ }
33
+ }
34
+ //# sourceMappingURL=assurance-mutation-error.js.map
35
+ //# debugId=255eee6e-f6bb-5fd2-8a73-545e672d205d
@@ -5,26 +5,29 @@
5
5
  * and verdict semantics in the host-neutral assurance module.
6
6
  */
7
7
 
8
- !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]="0dbe4ce9-9714-588d-bc85-d2591b7a5400")}catch(e){}}();
8
+ !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]="abb3946c-ec68-52af-8521-ae0389f31f54")}catch(e){}}();
9
9
  import { execFile } from "node:child_process";
10
10
  import { promisify } from "node:util";
11
11
  import { runGraph } from "../graph/run.js";
12
12
  import { runHealth } from "./health.js";
13
13
  import { runValidate } from "./validate.js";
14
- import { getHistoryPath, listAllItemMetadataLight, readHistoryEntries, readSettings, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, } from "../runtime-primitives.js";
14
+ import { getHistoryPath, listAllItemMetadata, readHistoryEntries, readSettings, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, } from "../runtime-primitives.js";
15
15
  const execFileAsync = promisify(execFile);
16
16
  const HISTORY_READ_CONCURRENCY = 16;
17
17
  function valueAtPath(input, field) {
18
18
  let current = input;
19
19
  for (const segment of field.split(".")) {
20
- if (typeof current !== "object" || current === null || Array.isArray(current)) {
20
+ if (typeof current !== "object" ||
21
+ current === null ||
22
+ Array.isArray(current)) {
21
23
  throw new TypeError(`assurance field ${field} is not present`);
22
24
  }
23
25
  current = current[segment];
24
26
  }
25
27
  if (typeof current === "number" && Number.isFinite(current))
26
28
  return current;
27
- if (Array.isArray(current) && current.every((entry) => typeof entry === "string")) {
29
+ if (Array.isArray(current) &&
30
+ current.every((entry) => typeof entry === "string")) {
28
31
  return current;
29
32
  }
30
33
  throw new TypeError(`assurance field ${field} must resolve to a finite number or string array`);
@@ -33,8 +36,8 @@ function checkValue(result, checkName, field) {
33
36
  const check = result.checks.find((entry) => entry.name === checkName);
34
37
  if (!check)
35
38
  throw new TypeError(`assurance check ${checkName} is not present`);
36
- const value = field === "status"
37
- ? check.status === "ok"
39
+ const value = field === "status" || field === "ok"
40
+ ? check.ok
38
41
  ? 0
39
42
  : 1
40
43
  : valueAtPath(check.details, field);
@@ -85,7 +88,7 @@ export async function createAssuranceWorkspaceContext(pmRoot, options = {}) {
85
88
  const settings = await readSettings(pmRoot);
86
89
  const typeRegistry = resolveItemTypeRegistry(settings);
87
90
  const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
88
- const metadata = await listAllItemMetadataLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
91
+ const metadata = await listAllItemMetadata(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
89
92
  const items = metadata.map((item) => ({
90
93
  ...item,
91
94
  id: item.id,
@@ -128,4 +131,4 @@ export async function createAssuranceWorkspaceContext(pmRoot, options = {}) {
128
131
  };
129
132
  }
130
133
  //# sourceMappingURL=assurance-runtime.js.map
131
- //# debugId=0dbe4ce9-9714-588d-bc85-d2591b7a5400
134
+ //# debugId=abb3946c-ec68-52af-8521-ae0389f31f54
@@ -32,11 +32,11 @@ export interface AssuranceItemRecord {
32
32
  /** Typed relationships. */
33
33
  dependencies?: AssuranceDependencyRecord[];
34
34
  /** Linked files. */
35
- files?: Array<Record<string, unknown>>;
35
+ files?: object[];
36
36
  /** Linked tests. */
37
- tests?: Array<Record<string, unknown>>;
37
+ tests?: object[];
38
38
  /** Linked docs. */
39
- docs?: Array<Record<string, unknown>>;
39
+ docs?: object[];
40
40
  /** Extension-owned metadata remains filterable. */
41
41
  [key: string]: unknown;
42
42
  }
@@ -67,6 +67,8 @@ export interface AssuranceItemsSource {
67
67
  field?: string;
68
68
  /** Required exact value for field. */
69
69
  equals?: string | number | boolean | null;
70
+ /** Presence predicate for the selected field. */
71
+ state?: "present" | "missing";
70
72
  }
71
73
  /** Typed relationship-count source. */
72
74
  export interface AssuranceDependencyKindSource {
@@ -297,6 +299,8 @@ export interface AssuranceMeasurementCost {
297
299
  export interface AssuranceMeasurementResult {
298
300
  /** Measurement id. */
299
301
  id: string;
302
+ /** Stable fingerprint of the exact declaration that produced this result. */
303
+ definition_fingerprint: string;
300
304
  /** Observed value. */
301
305
  value: AssuranceValue;
302
306
  /** Population denominator. */
@@ -319,6 +323,8 @@ export interface AssuranceAssertionVerdict {
319
323
  assertion_id: string;
320
324
  /** Stable observation key used to obtain the evaluated value. */
321
325
  measurement_id: string;
326
+ /** Stable fingerprint of the measurement declaration used for this verdict. */
327
+ measurement_definition_fingerprint: string;
322
328
  /** Explicit scope. */
323
329
  scope: AssuranceScope;
324
330
  /** Population denominator. */
@@ -401,12 +407,12 @@ export declare function createEmptyAssuranceDocument(): AssuranceDocument;
401
407
  export declare function evaluateMeasurement(definition: AssuranceMeasurementDefinition, context: AssuranceEvaluationContext, definitions?: AssuranceMeasurementDefinition[]): Promise<AssuranceMeasurementResult>;
402
408
  /** Evaluate one assertion against a precomputed measurement receipt. */
403
409
  export declare function evaluateAssuranceAssertion(definition: AssuranceAssertionDefinition, measurement: AssuranceMeasurementResult, options?: {
404
- owner_terminal?: boolean;
410
+ /** Whether the owning item is terminal. */ owner_terminal?: boolean;
405
411
  }): AssuranceAssertionVerdict;
406
412
  /** Evaluate a named gate into one presentation-independent verdict document. */
407
413
  export declare function evaluateAssuranceGate(gateId: string, document: AssuranceDocument, context: AssuranceEvaluationContext, options: {
408
- trigger: AssuranceGateTrigger; /** Skip persistence in the caller. */
409
- dry_run?: boolean;
414
+ /** Trigger being evaluated. */ trigger: AssuranceGateTrigger;
415
+ /** Skip persistence in the caller. */ dry_run?: boolean;
410
416
  }): Promise<AssuranceGateVerdict>;
411
417
  /** Read all declarations of one kind with a stable row selector receipt. */
412
418
  export declare function listAssuranceDeclarations(pmRoot: string, kind: AssuranceDeclarationKind): Promise<{