@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.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +52 -21
- package/dist/cli/commander-usage.js +37 -11
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +80 -13
- package/dist/cli/main.js +34 -19
- package/dist/cli/register-annotations.js +56 -3
- package/dist/cli/register-list-query.js +10 -7
- package/dist/cli/register-operations.js +16 -6
- package/dist/cli-bundle/bundle-manifest.json +157 -157
- package/dist/cli-bundle/chunks/{chunk-2OOU2AFH.js → chunk-3PS7X6GS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-WMEZHCFI.js → chunk-BM5YJ2UW.js} +51 -43
- package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +33 -0
- package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +196 -0
- package/dist/cli-bundle/chunks/{chunk-ZU34C3LH.js → chunk-KOQMGCTA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-R76342NV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-IUNRVDAI.js → chunk-VLUQOIDT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A2SJGHSI.js → chunk-WLAHPSOX.js} +2 -2
- package/dist/cli-bundle/chunks/register-list-query-XPCJRUUD.js +10 -0
- package/dist/cli-bundle/chunks/register-mutation-4RJCBKRS.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-NOCOOWQY.js → register-setup-LLHAKP2V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-FPSYO5ZG.js → chunk-ECADZMVC.js} +11 -11
- package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BKPIY34S.js → chunk-GQW4BPUT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UDAZWT25.js → chunk-JAFRIWVF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2DL3MRTD.js → chunk-KHM2CS2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-J5EKAIVD.js → chunk-KPSXVBDV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-23FTGO3W.js → chunk-KTLOKKCQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KDH5OX3D.js → chunk-NBLUKITQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-55BIB6DV.js → chunk-NYLOUPOB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DPO7TEFX.js → chunk-Q4T463SD.js} +28 -28
- package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TL5M2PAY.js → chunk-RWPAWUOT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +17 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4H5IA6AV.js → chunk-YIAXMC3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZMGWAYH7.js +2 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +40 -40
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +1 -1
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +2 -2
- package/dist/core/extensions/reserved-host-flags.js +3 -2
- package/dist/core/history/drift-scan.js +13 -8
- package/dist/core/history/history.d.ts +8 -0
- package/dist/core/history/history.js +57 -7
- package/dist/core/history/replay.d.ts +9 -1
- package/dist/core/history/replay.js +48 -13
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +46 -14
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/errors.d.ts +5 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/item-metadata-cache.d.ts +1 -1
- package/dist/core/store/item-metadata-cache.js +14 -7
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +6 -2
- package/dist/sdk/cli-contracts/completeness.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
- package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +8 -6
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +4 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +7 -4
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/completion.js +16 -7
- package/dist/sdk/context-intent-contracts.js +45 -4
- package/dist/sdk/core.d.ts +1 -0
- package/dist/sdk/core.js +3 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1585 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
- package/dist/sdk/generated-error-code-catalog.js +6 -3140
- package/dist/sdk/governance/assurance-action.js +9 -7
- package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
- package/dist/sdk/governance/assurance-mutation-error.js +35 -0
- package/dist/sdk/governance/assurance-runtime.js +11 -8
- package/dist/sdk/governance/assurance.d.ts +12 -6
- package/dist/sdk/governance/assurance.js +181 -66
- package/dist/sdk/governance/health.d.ts +3 -1
- package/dist/sdk/governance/health.js +21 -4
- package/dist/sdk/governance/validate-item-reader.js +3 -3
- package/dist/sdk/governance/validate.d.ts +2 -0
- package/dist/sdk/governance/validate.js +13 -3
- package/dist/sdk/graph/durable-cache.d.ts +1 -1
- package/dist/sdk/graph/durable-cache.js +98 -29
- package/dist/sdk/graph/governance.d.ts +14 -0
- package/dist/sdk/graph/governance.js +34 -9
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/lifecycle/claim.js +10 -3
- package/dist/sdk/merge/driver.d.ts +2 -2
- package/dist/sdk/merge/driver.js +3 -3
- package/dist/sdk/merge/receipts.d.ts +6 -4
- package/dist/sdk/merge/receipts.js +7 -5
- package/dist/sdk/merge/three-way.d.ts +2 -2
- package/dist/sdk/merge/three-way.js +3 -3
- package/dist/sdk/output-projection.d.ts +9 -1
- package/dist/sdk/output-projection.js +45 -9
- package/dist/sdk/query/activity.d.ts +49 -2
- package/dist/sdk/query/activity.js +183 -37
- package/dist/sdk/query/get.js +19 -2
- package/dist/sdk/read-output-contracts.d.ts +5 -1
- package/dist/sdk/read-output-contracts.js +17 -2
- package/dist/sdk/read-output-session.d.ts +2 -0
- package/dist/sdk/read-output-session.js +12 -5
- package/dist/sdk/runtime-primitives.d.ts +3 -3
- package/dist/sdk/runtime-primitives.js +5 -5
- package/dist/sdk/runtime-stats-options.js +3 -2
- package/dist/sdk/runtime.js +5 -9
- package/dist/sdk/stats.d.ts +36 -3
- package/dist/sdk/stats.js +55 -15
- package/dist/sdk/test/execution.d.ts +4 -0
- package/dist/sdk/test/execution.js +86 -21
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -2
- package/docs/ASSURANCE.md +17 -12
- package/docs/COMMANDS.md +29 -8
- package/docs/CONFIGURATION.md +7 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
- package/docs/MERGE_SAFETY.md +3 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +12 -1
- package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
- package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
- package/marketplace.json +2 -2
- package/package.json +5 -5
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +203 -52
- package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +0 -33
- package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +0 -13
- package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +0 -194
- package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +0 -5
- package/dist/cli-bundle/chunks/register-list-query-HAUXVUPY.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-E3KCL7AY.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +0 -2
- 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]="
|
|
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,
|
|
154
|
+
return getAssuranceDeclaration(pmRoot, kind, id);
|
|
153
155
|
}
|
|
154
156
|
if (action === "remove") {
|
|
155
|
-
const receipt = await removeAssuranceDeclaration(pmRoot, kind,
|
|
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 !==
|
|
160
|
-
throw new PmCliError(`Assurance definition id ${definition.id} does not match requested id ${
|
|
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=
|
|
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]="
|
|
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,
|
|
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" ||
|
|
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) &&
|
|
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.
|
|
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
|
|
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=
|
|
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?:
|
|
35
|
+
files?: object[];
|
|
36
36
|
/** Linked tests. */
|
|
37
|
-
tests?:
|
|
37
|
+
tests?: object[];
|
|
38
38
|
/** Linked docs. */
|
|
39
|
-
docs?:
|
|
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
|
-
|
|
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<{
|