@unbrained/pm-cli 2026.8.15 → 2026.8.17
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 +56 -12
- package/README.md +13 -13
- package/dist/cli/error-guidance.d.ts +5 -0
- package/dist/cli/error-guidance.js +15 -2
- package/dist/cli/public.d.ts +2 -0
- package/dist/cli/public.js +21 -0
- package/dist/cli/register-history-author.js +16 -11
- package/dist/cli/register-mutation.js +4 -4
- package/dist/cli-bundle/bundle-manifest.json +143 -143
- package/dist/cli-bundle/chunks/{chunk-J42EGKDK.js → chunk-2QLOXC3V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LJHOAVGI.js → chunk-3UEGXBMR.js} +49 -43
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +35 -0
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +13 -0
- package/dist/cli-bundle/chunks/chunk-7IBRGCHX.js +2 -0
- package/dist/cli-bundle/chunks/chunk-HBJAS566.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-WLPDLNEZ.js → chunk-JOKATURE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MEM2ZS3O.js → chunk-TPXZIBIV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-CT3LFDDN.js → register-list-query-Q7KII4G5.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-NWEVA5YS.js → register-mutation-4WBRPXLV.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-AHIAG5KM.js → register-operations-SSENDH5B.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZJZFVAKE.js → register-setup-DOSFBGKE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WTSER4WJ.js → chunk-267MUUS6.js} +11 -11
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZMFXQ7VF.js → chunk-ATEY76SX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M67F5AIN.js → chunk-CYFK5UPB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EXZA4257.js → chunk-KGEXTMPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MHPIL773.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ITAUHSO6.js → chunk-SALH6B6K.js} +47 -47
- package/dist/cli-bundle/focused-chunks/{chunk-KLVUMNXJ.js → chunk-SYZENPIT.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-KTKH4IMG.js → chunk-XKAMP5OU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NSPYTG6G.js → chunk-XPIC53VA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6XKF3PGV.js → chunk-ZQPGZZWQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +155 -0
- package/dist/cli-bundle/main.js +10 -10
- 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 +31 -31
- 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 +32 -32
- 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 +4 -2
- package/dist/core/extensions/loader.js +10 -6
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +52 -0
- package/dist/core/history/replay.js +32 -14
- package/dist/core/history/workspace-history.js +32 -10
- package/dist/core/output/output.js +6 -3
- package/dist/core/schema/fields-file.d.ts +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +115 -9
- package/dist/core/schema/runtime-schema.d.ts +3 -1
- package/dist/core/schema/runtime-schema.js +124 -3
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +27 -2
- package/dist/core/store/item-store.js +28 -2
- package/dist/sdk/agent/refusal-reachability.d.ts +56 -8
- package/dist/sdk/agent/refusal-reachability.js +414 -4
- package/dist/sdk/author-attribution.d.ts +56 -11
- package/dist/sdk/author-attribution.js +174 -50
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +12 -4
- package/dist/sdk/cli-contracts/tool-schema.js +12 -4
- package/dist/sdk/completion.js +11 -4
- package/dist/sdk/compose.d.ts +6 -2
- package/dist/sdk/compose.js +33 -3
- package/dist/sdk/context-intent-contracts.d.ts +8 -4
- package/dist/sdk/context-intent-contracts.js +76 -31
- package/dist/sdk/dependency-flag-validation.d.ts +9 -2
- package/dist/sdk/dependency-flag-validation.js +101 -35
- package/dist/sdk/environment/host-environment-errors.js +25 -7
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +62 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -2
- package/dist/sdk/governance/assurance-action.d.ts +3 -7
- package/dist/sdk/governance/assurance-action.js +97 -2
- package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
- package/dist/sdk/governance/boundary-fixtures.js +201 -0
- package/dist/sdk/governance/coverage-assurance.d.ts +24 -0
- package/dist/sdk/governance/coverage-assurance.js +61 -0
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
- package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
- package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
- package/dist/sdk/governance/defect-recurrence.js +523 -0
- package/dist/sdk/governance/extension-host-version.js +20 -9
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +4 -2
- package/dist/sdk/graph/governance.js +3 -2
- package/dist/sdk/guide-topics.js +191 -2
- package/dist/sdk/index.d.ts +5 -1
- package/dist/sdk/index.js +6 -3
- package/dist/sdk/lifecycle/create.js +4 -2
- package/dist/sdk/lifecycle/update-many.js +15 -2
- package/dist/sdk/lifecycle/update.js +5 -2
- package/dist/sdk/linked-artifacts.js +63 -14
- package/dist/sdk/query/get.d.ts +2 -0
- package/dist/sdk/query/get.js +32 -7
- package/dist/sdk/read-output-contracts.js +5 -3
- package/dist/sdk/relationship-analytics.js +90 -14
- package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
- package/dist/sdk/relationship-kinds/contract.js +3 -2
- package/dist/sdk/relationships.d.ts +1 -1
- package/dist/sdk/relationships.js +11 -2
- package/dist/sdk/runtime.d.ts +2 -5
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/schema.d.ts +1 -0
- package/dist/sdk/schema.js +2 -2
- package/dist/sdk/test/execution.d.ts +6 -2
- package/dist/sdk/test/execution.js +39 -13
- package/dist/types.d.ts +29 -2
- package/dist/types.js +4 -2
- package/docs/CONFIGURATION.md +58 -1
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
- package/docs/DEFECT_RECURRENCE.md +134 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +7 -1
- package/docs/RELATIONSHIP_GRAPH.md +16 -2
- package/docs/RELEASING.md +13 -7
- package/docs/SDK.md +38 -5
- package/docs/SDK_CONTEXT_INTEGRITY.md +33 -5
- package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +13 -5
- package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
- package/docs/TESTING.md +18 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
- package/marketplace.json +2 -2
- package/package.json +6 -4
- 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-claude/skills/pm-audit/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
- package/sdk/public-surface.json +716 -33
- package/dist/cli-bundle/chunks/chunk-24GAV7XL.js +0 -8
- package/dist/cli-bundle/chunks/chunk-AIM6VT2N.js +0 -13
- package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +0 -197
- package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KLKYLSDX.js +0 -2
- package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +0 -35
- package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KT5XMYSX.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-SLKC6QLJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +0 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type { AssuranceItemRecord } from "./assurance.js";
|
|
2
|
+
/** Stable defect escape taxonomy used by project policy and PM metadata. */
|
|
3
|
+
export declare const DEFECT_ESCAPE_CLASSES: readonly ["production_defect", "nightly_regression", "scanner_finding", "review_caught_late"];
|
|
4
|
+
/** Evidence dispositions accepted by the fail-closed defect gate. */
|
|
5
|
+
export declare const DEFECT_GATE_EVIDENCE_DISPOSITIONS: readonly ["gate_added", "gate_strengthened", "explicit_waiver"];
|
|
6
|
+
/** Defect escape classification. */
|
|
7
|
+
export type DefectEscapeClass = (typeof DEFECT_ESCAPE_CLASSES)[number];
|
|
8
|
+
/** Distinguishes a concrete assurance improvement from a reviewed exception. */
|
|
9
|
+
export type DefectGateEvidenceDisposition = (typeof DEFECT_GATE_EVIDENCE_DISPOSITIONS)[number];
|
|
10
|
+
/** Structured proof attached to a terminal defect item. */
|
|
11
|
+
export interface DefectGateEvidence {
|
|
12
|
+
/** Whether a gate was added, strengthened, or explicitly waived. */
|
|
13
|
+
disposition: DefectGateEvidenceDisposition;
|
|
14
|
+
/** Stable gate identifier, except for an explicit waiver. */
|
|
15
|
+
gate_id?: string;
|
|
16
|
+
/** Runnable negative-control command that proves the gate can fail. */
|
|
17
|
+
negative_control?: string;
|
|
18
|
+
/** Local checks selected by the same recurrence policy as hosted checks. */
|
|
19
|
+
local_checks?: string[];
|
|
20
|
+
/** Hosted checks selected by the same recurrence policy as local checks. */
|
|
21
|
+
hosted_checks?: string[];
|
|
22
|
+
/** Accountable owner of the gate or waiver. */
|
|
23
|
+
owner: string;
|
|
24
|
+
/** Concrete reason for an explicit waiver. */
|
|
25
|
+
waiver_reason?: string;
|
|
26
|
+
/** ISO timestamp after which an explicit waiver is invalid. */
|
|
27
|
+
waiver_expires_at?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Signals that associate a family with source changes or PM context. */
|
|
30
|
+
export interface DefectRecurrenceTriggers {
|
|
31
|
+
/** Repository-relative glob patterns. */
|
|
32
|
+
file_patterns?: string[];
|
|
33
|
+
/** Package names or workspace package paths. */
|
|
34
|
+
package_names?: string[];
|
|
35
|
+
/** Canonical PM item ids. */
|
|
36
|
+
item_ids?: string[];
|
|
37
|
+
/** PM tags. */
|
|
38
|
+
tags?: string[];
|
|
39
|
+
/** Stable error-code contracts. */
|
|
40
|
+
error_codes?: string[];
|
|
41
|
+
}
|
|
42
|
+
/** Local and hosted checks selected together for one recurrence family. */
|
|
43
|
+
export interface DefectRecurrenceChecks {
|
|
44
|
+
/** Fast checks suitable for local development. */
|
|
45
|
+
local: string[];
|
|
46
|
+
/** Hosted checks that add independent or environment-specific evidence. */
|
|
47
|
+
hosted: string[];
|
|
48
|
+
}
|
|
49
|
+
/** Budget that makes an assurance family measurable over time. */
|
|
50
|
+
export interface DefectRecurrenceBudget {
|
|
51
|
+
/** Maximum accepted escaped-defect rate. */
|
|
52
|
+
max_escape_rate: number;
|
|
53
|
+
/** Maximum accepted false-positive rate. */
|
|
54
|
+
max_false_positive_rate: number;
|
|
55
|
+
}
|
|
56
|
+
/** Versioned recurrence policy for one historically observed defect family. */
|
|
57
|
+
export interface DefectRecurrenceFamily {
|
|
58
|
+
/** Stable family identifier. */
|
|
59
|
+
id: string;
|
|
60
|
+
/** Monotonic family contract version. */
|
|
61
|
+
version: number;
|
|
62
|
+
/** Concise human-readable title. */
|
|
63
|
+
title: string;
|
|
64
|
+
/** PM item accountable for maintaining this family. */
|
|
65
|
+
owner_item_id: string;
|
|
66
|
+
/** Escape class represented by the historical examples. */
|
|
67
|
+
escape_class: DefectEscapeClass;
|
|
68
|
+
/** Signals that select this family. */
|
|
69
|
+
triggers: DefectRecurrenceTriggers;
|
|
70
|
+
/** Shared local and hosted assurance policy. */
|
|
71
|
+
checks: DefectRecurrenceChecks;
|
|
72
|
+
/** Input that must select this family during policy validation. */
|
|
73
|
+
negative_control: DefectChangeRiskInput;
|
|
74
|
+
/** Historical items that justify the family. */
|
|
75
|
+
historical_item_ids: string[];
|
|
76
|
+
/** Quantitative escape and false-positive budgets. */
|
|
77
|
+
budget: DefectRecurrenceBudget;
|
|
78
|
+
}
|
|
79
|
+
/** Repository recurrence policy serialized by a project or extension. */
|
|
80
|
+
export interface DefectRecurrencePolicy {
|
|
81
|
+
/** Serialized policy format version. */
|
|
82
|
+
version: 1;
|
|
83
|
+
/** ISO instant after which terminal defects require structured evidence. */
|
|
84
|
+
evidence_epoch: string;
|
|
85
|
+
/** Versioned recurrence families. */
|
|
86
|
+
families: DefectRecurrenceFamily[];
|
|
87
|
+
}
|
|
88
|
+
/** Input used to explain assurance requirements for a proposed change. */
|
|
89
|
+
export interface DefectChangeRiskInput {
|
|
90
|
+
/** Changed repository-relative files. */
|
|
91
|
+
files?: string[];
|
|
92
|
+
/** Changed package names or workspace package paths. */
|
|
93
|
+
package_names?: string[];
|
|
94
|
+
/** PM items in the change lineage. */
|
|
95
|
+
item_ids?: string[];
|
|
96
|
+
/** PM tags in the change lineage. */
|
|
97
|
+
tags?: string[];
|
|
98
|
+
/** Error-code contracts touched by the change. */
|
|
99
|
+
error_codes?: string[];
|
|
100
|
+
}
|
|
101
|
+
/** Options for a full or incremental recurrence-index build. */
|
|
102
|
+
export interface BuildDefectRecurrenceIndexOptions {
|
|
103
|
+
/** Previous index whose unaffected item mappings can be reused. */
|
|
104
|
+
previous_index?: DefectRecurrenceIndex;
|
|
105
|
+
/** Item ids replaced by the supplied item projection. */
|
|
106
|
+
changed_item_ids?: string[];
|
|
107
|
+
}
|
|
108
|
+
/** Deterministic recurrence index shared by CLI, SDK, MCP, and CI. */
|
|
109
|
+
export interface DefectRecurrenceIndex {
|
|
110
|
+
/** Index format version. */
|
|
111
|
+
version: 1;
|
|
112
|
+
/** Hash of the policy used to build the index. */
|
|
113
|
+
policy_fingerprint: string;
|
|
114
|
+
/** Hash of policy plus deterministic item-to-family contributions. */
|
|
115
|
+
index_fingerprint: string;
|
|
116
|
+
/** Stable family definitions. */
|
|
117
|
+
families: DefectRecurrenceFamily[];
|
|
118
|
+
/** Sparse PM item-to-family index. */
|
|
119
|
+
item_families: Record<string, string[]>;
|
|
120
|
+
/** Build-cost receipt. */
|
|
121
|
+
build: {
|
|
122
|
+
/** Items inspected during this build. */
|
|
123
|
+
items_scanned: number;
|
|
124
|
+
/** Unchanged item mappings reused from a previous index. */
|
|
125
|
+
items_reused: number;
|
|
126
|
+
/** Items with at least one recurrence family. */
|
|
127
|
+
items_indexed: number;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** One explainable reason that selected an assurance family. */
|
|
131
|
+
export interface DefectChangeRiskReason {
|
|
132
|
+
/** Signal category that matched. */
|
|
133
|
+
signal: "file" | "package" | "item" | "tag" | "error_code";
|
|
134
|
+
/** Submitted signal value. */
|
|
135
|
+
value: string;
|
|
136
|
+
/** Policy trigger or indexed item that matched. */
|
|
137
|
+
matched: string;
|
|
138
|
+
}
|
|
139
|
+
/** One selected recurrence family and its evidence requirements. */
|
|
140
|
+
export interface DefectChangeRiskMatch {
|
|
141
|
+
/** Stable family identifier. */
|
|
142
|
+
family_id: string;
|
|
143
|
+
/** Family contract version. */
|
|
144
|
+
family_version: number;
|
|
145
|
+
/** Accountable PM item. */
|
|
146
|
+
owner_item_id: string;
|
|
147
|
+
/** Historical escape class. */
|
|
148
|
+
escape_class: DefectEscapeClass;
|
|
149
|
+
/** Exact selection reasons. */
|
|
150
|
+
reasons: DefectChangeRiskReason[];
|
|
151
|
+
/** Required local checks. */
|
|
152
|
+
local_checks: string[];
|
|
153
|
+
/** Required hosted checks. */
|
|
154
|
+
hosted_checks: string[];
|
|
155
|
+
/** Quantitative policy budget. */
|
|
156
|
+
budget: DefectRecurrenceBudget;
|
|
157
|
+
}
|
|
158
|
+
/** Pagination controls for bounded change-risk output. */
|
|
159
|
+
export interface AnalyzeDefectChangeRiskOptions {
|
|
160
|
+
/** Opaque cursor returned by a previous report. */
|
|
161
|
+
cursor?: string;
|
|
162
|
+
/** Maximum family rows returned, from 1 through 100. */
|
|
163
|
+
limit?: number;
|
|
164
|
+
}
|
|
165
|
+
/** Serialized assurance-risk request shared by CLI, SDK, and MCP transports. */
|
|
166
|
+
export interface DefectChangeRiskRequest {
|
|
167
|
+
/** Project- or package-owned recurrence policy. */
|
|
168
|
+
policy: DefectRecurrencePolicy;
|
|
169
|
+
/** Proposed source and PM-context changes. */
|
|
170
|
+
change: DefectChangeRiskInput;
|
|
171
|
+
/** Opaque cursor returned by a previous report. */
|
|
172
|
+
cursor?: string;
|
|
173
|
+
/** Maximum family rows returned, from 1 through 100. */
|
|
174
|
+
limit?: number;
|
|
175
|
+
}
|
|
176
|
+
/** Bounded and explainable change-risk report. */
|
|
177
|
+
export interface DefectChangeRiskReport {
|
|
178
|
+
/** Whether at least one historical family was selected. */
|
|
179
|
+
risk_detected: boolean;
|
|
180
|
+
/** Stable recurrence-index identity. */
|
|
181
|
+
index_fingerprint: string;
|
|
182
|
+
/** Current page of selected families. */
|
|
183
|
+
items: DefectChangeRiskMatch[];
|
|
184
|
+
/** Total selected families before pagination. */
|
|
185
|
+
total: number;
|
|
186
|
+
/** Opaque continuation cursor when rows remain. */
|
|
187
|
+
next_cursor?: string;
|
|
188
|
+
/** Deduplicated local checks across every selected family. */
|
|
189
|
+
required_local_checks: string[];
|
|
190
|
+
/** Deduplicated hosted checks across every selected family. */
|
|
191
|
+
required_hosted_checks: string[];
|
|
192
|
+
/** Deterministic analysis-cost receipt. */
|
|
193
|
+
cost: {
|
|
194
|
+
/** Families evaluated. */
|
|
195
|
+
families_evaluated: number;
|
|
196
|
+
/** Submitted signals evaluated against the policy. */
|
|
197
|
+
signals_evaluated: number;
|
|
198
|
+
/** Selected families before pagination. */
|
|
199
|
+
families_selected: number;
|
|
200
|
+
/** Approximate JSON-token cost of the bounded response. */
|
|
201
|
+
estimated_output_tokens: number;
|
|
202
|
+
};
|
|
203
|
+
/** Stable collection selector for agent consumers. */
|
|
204
|
+
row_contract: {
|
|
205
|
+
row_keys: ["items"];
|
|
206
|
+
jq_selector: ".items[]";
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/** One fail-closed defect-evidence finding. */
|
|
210
|
+
export interface DefectGateEvidenceFinding {
|
|
211
|
+
/** PM item missing or carrying invalid evidence. */
|
|
212
|
+
item_id: string;
|
|
213
|
+
/** Stable machine-readable finding kind. */
|
|
214
|
+
kind: "missing_escape_class" | "invalid_escape_class" | "invalid_completion_timestamp" | "missing_gate_evidence" | "invalid_gate_evidence" | "expired_waiver";
|
|
215
|
+
/** Actionable explanation. */
|
|
216
|
+
detail: string;
|
|
217
|
+
}
|
|
218
|
+
/** Fail-closed governance report for terminal defects after the policy epoch. */
|
|
219
|
+
export interface DefectGateEvidenceReport {
|
|
220
|
+
/** Whether every governed defect carried valid evidence. */
|
|
221
|
+
ok: boolean;
|
|
222
|
+
/** Terminal defect items governed by the epoch. */
|
|
223
|
+
governed_item_count: number;
|
|
224
|
+
/** Terminal defects carrying a recognized historical escape classification. */
|
|
225
|
+
classified_item_count: number;
|
|
226
|
+
/** Historical and epoch-governed counts by required escape class. */
|
|
227
|
+
class_counts: Record<DefectEscapeClass, number>;
|
|
228
|
+
/** Historical and epoch-governed counts by evidence disposition. */
|
|
229
|
+
evidence_disposition_counts: Record<DefectGateEvidenceDisposition, number>;
|
|
230
|
+
/** Stable sorted findings. */
|
|
231
|
+
findings: DefectGateEvidenceFinding[];
|
|
232
|
+
}
|
|
233
|
+
/** Compile deterministic policy and PM metadata into a sparse incremental index. */
|
|
234
|
+
export declare function buildDefectRecurrenceIndex(policy: DefectRecurrencePolicy, items: readonly AssuranceItemRecord[], options?: BuildDefectRecurrenceIndexOptions): DefectRecurrenceIndex;
|
|
235
|
+
/** Explain recurrence families and shared local/hosted checks for one change. */
|
|
236
|
+
export declare function analyzeDefectChangeRisk(index: DefectRecurrenceIndex, input: DefectChangeRiskInput, options?: AnalyzeDefectChangeRiskOptions): DefectChangeRiskReport;
|
|
237
|
+
/** Enforce structured escape classification and gate evidence on new terminal defects. */
|
|
238
|
+
export declare function evaluateDefectGateEvidence(items: readonly AssuranceItemRecord[], policy: DefectRecurrencePolicy, terminalStatuses: readonly string[], now?: Date): DefectGateEvidenceReport;
|
|
239
|
+
/** Parse an untrusted serialized policy without weakening runtime validation. */
|
|
240
|
+
export declare function parseDefectRecurrencePolicy(value: unknown): DefectRecurrencePolicy;
|
|
241
|
+
/** Parse an untrusted cross-transport change-risk request. */
|
|
242
|
+
export declare function parseDefectChangeRiskRequest(value: unknown): DefectChangeRiskRequest;
|