kibi-cli 2.2.0 → 2.4.0
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/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +2 -2
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +3 -0
- package/dist/cli-operation-metadata.d.ts +5 -1
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +6 -1
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +7 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +4 -0
- package/dist/commands/check-diff.d.ts +5 -0
- package/dist/commands/check-diff.d.ts.map +1 -0
- package/dist/commands/check-diff.js +62 -0
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +41 -18
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +210 -73
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +63 -29
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +9 -2
- package/dist/commands/merge-driver.d.ts +31 -0
- package/dist/commands/merge-driver.d.ts.map +1 -0
- package/dist/commands/merge-driver.js +268 -0
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +3 -1
- package/dist/engine.d.ts +15 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +252 -52
- package/dist/extractors/symbols-coordinator.d.ts +7 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +75 -39
- package/dist/operations/bootstrap/candidates.js +1 -1
- package/dist/operations/bootstrap/discovery.js +1 -1
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +21 -5
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +3 -0
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +7 -1
- package/dist/operations/bootstrap/intent-claims.d.ts +17 -0
- package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -0
- package/dist/operations/bootstrap/intent-claims.js +95 -0
- package/dist/operations/bootstrap/presentation.d.ts +2 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +60 -1
- package/dist/operations/bootstrap/types.d.ts +28 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/bootstrap/types.js +16 -0
- package/dist/operations/modeling/predicate-inference-1.js +1 -1
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +175 -53
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +4 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +5 -7
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +5 -9
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +1 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +7 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +26 -4
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +7 -1
- package/dist/performance-trace.d.ts +17 -0
- package/dist/performance-trace.d.ts.map +1 -0
- package/dist/performance-trace.js +134 -0
- package/dist/plugins/approved-source-analyzers.d.ts +13 -0
- package/dist/plugins/approved-source-analyzers.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts +71 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.js +77 -0
- package/dist/plugins/approved-source-analyzers.js +3 -0
- package/dist/plugins/maintenance-source-analysis.d.ts +14 -0
- package/dist/plugins/maintenance-source-analysis.d.ts.map +1 -0
- package/dist/plugins/maintenance-source-analysis.js +191 -0
- package/dist/plugins/registry.d.ts +2 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +6 -1
- package/dist/plugins/source-analysis-service.d.ts +36 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +184 -27
- package/dist/plugins/source-change-analysis.d.ts +15 -0
- package/dist/plugins/source-change-analysis.d.ts.map +1 -0
- package/dist/plugins/source-change-analysis.js +54 -0
- package/dist/plugins/source-classification.d.ts +41 -0
- package/dist/plugins/source-classification.d.ts.map +1 -0
- package/dist/plugins/source-classification.js +490 -0
- package/dist/prolog/swipl-resolver.d.ts +88 -0
- package/dist/prolog/swipl-resolver.d.ts.map +1 -0
- package/dist/prolog/swipl-resolver.js +446 -0
- package/dist/prolog.d.ts +15 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +67 -6
- package/dist/public/diagnostic-usage.d.ts +14 -0
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +55 -1
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +56 -5
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +3 -1
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +15 -1
- package/dist/public/impact/source-changes.d.ts.map +1 -1
- package/dist/public/impact/source-changes.js +35 -27
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +117 -1
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +2 -0
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +309 -8
- package/dist/public/operations/impact-review-preparation.d.ts +14 -0
- package/dist/public/operations/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/impact-review-preparation.js +379 -0
- package/dist/public/operations/index.d.ts +2 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +2 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +1 -35
- package/dist/public/operations/proof-receipt-projection.d.ts +5 -0
- package/dist/public/operations/proof-receipt-projection.d.ts.map +1 -0
- package/dist/public/operations/proof-receipt-projection.js +36 -0
- package/dist/public/operations/specs/bootstrap.d.ts +73 -1
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -1
- package/dist/public/operations/specs/bootstrap.js +66 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +47 -0
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/specs/impact-review-preparation.js +43 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +3 -1
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/skills/kibi-bootstrap/SKILL.md +47 -11
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -1
- package/dist/public/skills/kibi-usage/SKILL.md +14 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +5 -0
- package/dist/public/telemetry-acceptance.d.ts +8 -0
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +10 -0
- package/dist/traceability/analysis-gate.d.ts +39 -0
- package/dist/traceability/analysis-gate.d.ts.map +1 -0
- package/dist/traceability/analysis-gate.js +51 -0
- package/dist/traceability/git-change-snapshot.d.ts +27 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -0
- package/dist/traceability/git-change-snapshot.js +411 -0
- package/dist/traceability/git-staged.d.ts +5 -1
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +16 -11
- package/dist/traceability/impact-evaluator.d.ts +54 -0
- package/dist/traceability/impact-evaluator.d.ts.map +1 -0
- package/dist/traceability/impact-evaluator.js +270 -0
- package/dist/traceability/impact-git-tree.d.ts +12 -0
- package/dist/traceability/impact-git-tree.d.ts.map +1 -0
- package/dist/traceability/impact-git-tree.js +46 -0
- package/dist/traceability/impact-knowledge.d.ts +16 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -0
- package/dist/traceability/impact-knowledge.js +165 -0
- package/dist/traceability/impact-policy.d.ts +15 -0
- package/dist/traceability/impact-policy.d.ts.map +1 -0
- package/dist/traceability/impact-policy.js +48 -0
- package/dist/traceability/impact-policy.v1.schema.json +48 -0
- package/dist/traceability/impact-pr-diff.d.ts +5 -0
- package/dist/traceability/impact-pr-diff.d.ts.map +1 -0
- package/dist/traceability/impact-pr-diff.js +83 -0
- package/dist/traceability/impact-record-validation.d.ts +9 -0
- package/dist/traceability/impact-record-validation.d.ts.map +1 -0
- package/dist/traceability/impact-record-validation.js +113 -0
- package/dist/traceability/impact-review.d.ts +148 -0
- package/dist/traceability/impact-review.d.ts.map +1 -0
- package/dist/traceability/impact-review.js +494 -0
- package/dist/traceability/impact-review.schema.json +365 -0
- package/dist/traceability/impact-side-evidence.d.ts +13 -0
- package/dist/traceability/impact-side-evidence.d.ts.map +1 -0
- package/dist/traceability/impact-side-evidence.js +240 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +10 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +1 -0
- package/dist/traceability/reviewed-coordinate-refresh.js +49 -0
- package/dist/traceability/snapshot-knowledge.d.ts +4 -0
- package/dist/traceability/snapshot-knowledge.d.ts.map +1 -0
- package/dist/traceability/snapshot-knowledge.js +98 -0
- package/dist/traceability/staged-file-coverage.d.ts +23 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +2 -16
- package/dist/traceability/staged-symbols-manifest.d.ts +4 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +17 -6
- package/dist/traceability/symbol-extract.d.ts +3 -5
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +49 -34
- package/dist/traceability/temp-kb.d.ts +1 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +49 -13
- package/dist/traceability/trusted-pr-event.d.ts +13 -0
- package/dist/traceability/trusted-pr-event.d.ts.map +1 -0
- package/dist/traceability/trusted-pr-event.js +105 -0
- package/dist/utils/canonical-path.d.ts +3 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +33 -0
- package/package.json +14 -5
- package/src/public/diagnostic-usage.ts +59 -1
- package/src/public/impact/analyzer.ts +88 -5
- package/src/public/impact/diagnostics.ts +7 -5
- package/src/public/impact/manifest.ts +14 -1
- package/src/public/impact/source-changes.ts +39 -34
- package/src/public/impact/types.ts +5 -0
- package/src/public/operations/catalog.ts +2 -0
- package/src/public/operations/contracts.ts +385 -9
- package/src/public/operations/impact-review-preparation.ts +548 -0
- package/src/public/operations/index.ts +2 -0
- package/src/public/operations/node-ports.ts +1 -39
- package/src/public/operations/proof-receipt-projection.ts +39 -0
- package/src/public/operations/specs/bootstrap.ts +78 -4
- package/src/public/operations/specs/impact-review-preparation.ts +46 -0
- package/src/public/operations/symbol-repair-plan.ts +3 -1
- package/src/public/operations/types.ts +1 -0
- package/src/public/skills/kibi-bootstrap/SKILL.md +47 -11
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -1
- package/src/public/skills/kibi-usage/SKILL.md +14 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +5 -0
- package/src/public/telemetry-acceptance.ts +9 -0
- package/src/traceability/impact-policy.v1.schema.json +48 -0
- package/src/traceability/impact-review.schema.json +365 -0
- package/templates/github/kibi-badge.yml +0 -4
- package/templates/github/kibi-report.yml +0 -4
|
@@ -11,6 +11,14 @@ const valueArray = {
|
|
|
11
11
|
type: "array",
|
|
12
12
|
items: anyValue,
|
|
13
13
|
};
|
|
14
|
+
const stringValue = { type: "string" };
|
|
15
|
+
const integerValue = { type: "integer" };
|
|
16
|
+
const numberValue = { type: "number" };
|
|
17
|
+
const booleanValue = { type: "boolean" };
|
|
18
|
+
const stringArray = {
|
|
19
|
+
type: "array",
|
|
20
|
+
items: stringValue,
|
|
21
|
+
};
|
|
14
22
|
function objectData(properties, required = []) {
|
|
15
23
|
return {
|
|
16
24
|
type: "object",
|
|
@@ -19,6 +27,284 @@ function objectData(properties, required = []) {
|
|
|
19
27
|
properties,
|
|
20
28
|
};
|
|
21
29
|
}
|
|
30
|
+
const sha256Fingerprint = {
|
|
31
|
+
type: "string",
|
|
32
|
+
pattern: "^sha256:[0-9a-f]{64}$",
|
|
33
|
+
};
|
|
34
|
+
const gitObjectId = {
|
|
35
|
+
type: "string",
|
|
36
|
+
pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$",
|
|
37
|
+
};
|
|
38
|
+
const reviewRange = objectData({ start: integerValue, end: integerValue }, [
|
|
39
|
+
"start",
|
|
40
|
+
"end",
|
|
41
|
+
]);
|
|
42
|
+
const uncoveredReviewRange = objectData({
|
|
43
|
+
startLine: integerValue,
|
|
44
|
+
startColumn: integerValue,
|
|
45
|
+
endLine: integerValue,
|
|
46
|
+
endColumn: integerValue,
|
|
47
|
+
reason: stringValue,
|
|
48
|
+
}, ["startLine", "startColumn", "endLine", "endColumn", "reason"]);
|
|
49
|
+
const reviewAnalysis = objectData({
|
|
50
|
+
contractVersion: { const: "kibi.symbol-extractor.v2" },
|
|
51
|
+
status: { enum: ["ok", "partial", "unsupported", "failed"] },
|
|
52
|
+
language: stringValue,
|
|
53
|
+
sourceFile: stringValue,
|
|
54
|
+
providerId: { type: ["string", "null"] },
|
|
55
|
+
providerStamp: anyValue,
|
|
56
|
+
providerFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
57
|
+
inputFingerprint: sha256Fingerprint,
|
|
58
|
+
resultFingerprint: sha256Fingerprint,
|
|
59
|
+
diagnosticCodes: stringArray,
|
|
60
|
+
uncoveredRanges: {
|
|
61
|
+
type: "array",
|
|
62
|
+
items: uncoveredReviewRange,
|
|
63
|
+
},
|
|
64
|
+
}, [
|
|
65
|
+
"contractVersion",
|
|
66
|
+
"status",
|
|
67
|
+
"language",
|
|
68
|
+
"sourceFile",
|
|
69
|
+
"providerId",
|
|
70
|
+
"providerStamp",
|
|
71
|
+
"providerFingerprint",
|
|
72
|
+
"inputFingerprint",
|
|
73
|
+
"resultFingerprint",
|
|
74
|
+
"diagnosticCodes",
|
|
75
|
+
"uncoveredRanges",
|
|
76
|
+
]);
|
|
77
|
+
const reviewSideEvidence = objectData({
|
|
78
|
+
mode: { enum: ["100644", "100755", "120000", "160000"] },
|
|
79
|
+
objectId: { oneOf: [gitObjectId, { type: "null" }] },
|
|
80
|
+
byteFingerprint: sha256Fingerprint,
|
|
81
|
+
kind: { enum: ["regular", "symlink", "gitlink"] },
|
|
82
|
+
contentProjection: { const: "proof_receipts_stripped" },
|
|
83
|
+
analysis: { oneOf: [reviewAnalysis, { type: "null" }] },
|
|
84
|
+
}, ["mode", "objectId", "byteFingerprint", "kind", "analysis"]);
|
|
85
|
+
const reviewFileEvidence = {
|
|
86
|
+
...objectData({
|
|
87
|
+
path: stringValue,
|
|
88
|
+
status: { enum: ["A", "M", "R", "C", "T", "D"] },
|
|
89
|
+
oldPath: stringValue,
|
|
90
|
+
copyFromPath: stringValue,
|
|
91
|
+
analysisDepth: { enum: ["symbol", "metadata", "file", "none"] },
|
|
92
|
+
disposition: { enum: ["checked", "advisory", "skipped"] },
|
|
93
|
+
skipReason: {
|
|
94
|
+
enum: ["binary", "unsupported_encoding", "symlink", "submodule"],
|
|
95
|
+
},
|
|
96
|
+
gitMode: stringValue,
|
|
97
|
+
previousMode: stringValue,
|
|
98
|
+
oldHunkRanges: { type: "array", items: reviewRange },
|
|
99
|
+
newHunkRanges: { type: "array", items: reviewRange },
|
|
100
|
+
before: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
101
|
+
after: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
102
|
+
}, [
|
|
103
|
+
"path",
|
|
104
|
+
"status",
|
|
105
|
+
"analysisDepth",
|
|
106
|
+
"disposition",
|
|
107
|
+
"oldHunkRanges",
|
|
108
|
+
"newHunkRanges",
|
|
109
|
+
"before",
|
|
110
|
+
"after",
|
|
111
|
+
]),
|
|
112
|
+
anyOf: [
|
|
113
|
+
{ properties: { before: reviewSideEvidence } },
|
|
114
|
+
{ properties: { after: reviewSideEvidence } },
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
const recordTemplateFile = {
|
|
118
|
+
...objectData({
|
|
119
|
+
...(reviewFileEvidence.properties ?? {}),
|
|
120
|
+
analysisReviews: { type: "null" },
|
|
121
|
+
decision: { type: "null" },
|
|
122
|
+
}, [
|
|
123
|
+
"path",
|
|
124
|
+
"status",
|
|
125
|
+
"analysisDepth",
|
|
126
|
+
"disposition",
|
|
127
|
+
"oldHunkRanges",
|
|
128
|
+
"newHunkRanges",
|
|
129
|
+
"before",
|
|
130
|
+
"after",
|
|
131
|
+
"analysisReviews",
|
|
132
|
+
"decision",
|
|
133
|
+
]),
|
|
134
|
+
anyOf: [
|
|
135
|
+
{ properties: { before: reviewSideEvidence } },
|
|
136
|
+
{ properties: { after: reviewSideEvidence } },
|
|
137
|
+
],
|
|
138
|
+
};
|
|
139
|
+
const impactRecordHeaders = objectData({
|
|
140
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
141
|
+
policy: objectData({
|
|
142
|
+
id: stringValue,
|
|
143
|
+
version: stringValue,
|
|
144
|
+
fingerprint: sha256Fingerprint,
|
|
145
|
+
}, ["id", "version", "fingerprint"]),
|
|
146
|
+
evaluator: objectData({
|
|
147
|
+
contractVersion: { const: "kibi.impact-evaluator.v1" },
|
|
148
|
+
fingerprint: sha256Fingerprint,
|
|
149
|
+
}, ["contractVersion", "fingerprint"]),
|
|
150
|
+
scope: objectData({
|
|
151
|
+
fingerprint: sha256Fingerprint,
|
|
152
|
+
knowledgeFingerprint: sha256Fingerprint,
|
|
153
|
+
providerSetFingerprint: sha256Fingerprint,
|
|
154
|
+
}, ["fingerprint", "knowledgeFingerprint", "providerSetFingerprint"]),
|
|
155
|
+
}, ["contractVersion", "policy", "evaluator", "scope"]);
|
|
156
|
+
const reviewSnapshotIdentity = objectData({
|
|
157
|
+
kind: { enum: ["staged", "diff"] },
|
|
158
|
+
baseCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
159
|
+
baseTree: gitObjectId,
|
|
160
|
+
headCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
161
|
+
headTree: gitObjectId,
|
|
162
|
+
headTreeSource: { enum: ["index", "commit"] },
|
|
163
|
+
}, [
|
|
164
|
+
"kind",
|
|
165
|
+
"baseCommit",
|
|
166
|
+
"baseTree",
|
|
167
|
+
"headCommit",
|
|
168
|
+
"headTree",
|
|
169
|
+
"headTreeSource",
|
|
170
|
+
]);
|
|
171
|
+
const semanticEdge = objectData({ type: stringValue, from: stringValue, to: stringValue }, ["type", "from", "to"]);
|
|
172
|
+
const relatedRequirementEntity = objectData({
|
|
173
|
+
id: stringValue,
|
|
174
|
+
type: { oneOf: [stringValue, { type: "null" }] },
|
|
175
|
+
entityFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
176
|
+
artifactPath: { oneOf: [stringValue, { type: "null" }] },
|
|
177
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
178
|
+
entity: recordValue,
|
|
179
|
+
}, ["id", "type", "entityFingerprint", "artifactPath", "sourcePath", "entity"]);
|
|
180
|
+
const requirementContext = {
|
|
181
|
+
oneOf: [
|
|
182
|
+
objectData({
|
|
183
|
+
id: stringValue,
|
|
184
|
+
state: { const: "absent" },
|
|
185
|
+
entityFingerprint: { type: "null" },
|
|
186
|
+
artifactPath: { type: "null" },
|
|
187
|
+
sourcePath: { type: "null" },
|
|
188
|
+
relationships: { type: "array", items: semanticEdge },
|
|
189
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
190
|
+
}, [
|
|
191
|
+
"id",
|
|
192
|
+
"state",
|
|
193
|
+
"entityFingerprint",
|
|
194
|
+
"artifactPath",
|
|
195
|
+
"sourcePath",
|
|
196
|
+
"relationships",
|
|
197
|
+
"relatedEntities",
|
|
198
|
+
]),
|
|
199
|
+
objectData({
|
|
200
|
+
id: stringValue,
|
|
201
|
+
state: { const: "present" },
|
|
202
|
+
entityFingerprint: sha256Fingerprint,
|
|
203
|
+
artifactPath: stringValue,
|
|
204
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
205
|
+
entity: recordValue,
|
|
206
|
+
relationships: { type: "array", items: semanticEdge },
|
|
207
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
208
|
+
}, [
|
|
209
|
+
"id",
|
|
210
|
+
"state",
|
|
211
|
+
"entityFingerprint",
|
|
212
|
+
"artifactPath",
|
|
213
|
+
"sourcePath",
|
|
214
|
+
"entity",
|
|
215
|
+
"relationships",
|
|
216
|
+
"relatedEntities",
|
|
217
|
+
]),
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
const requirementScope = objectData({
|
|
221
|
+
path: stringValue,
|
|
222
|
+
requirementIds: stringArray,
|
|
223
|
+
before: { type: "array", items: requirementContext },
|
|
224
|
+
after: { type: "array", items: requirementContext },
|
|
225
|
+
}, ["path", "requirementIds", "before", "after"]);
|
|
226
|
+
const residualReviewObligation = {
|
|
227
|
+
oneOf: [
|
|
228
|
+
objectData({
|
|
229
|
+
path: stringValue,
|
|
230
|
+
side: { enum: ["before", "after"] },
|
|
231
|
+
status: { const: "unsupported" },
|
|
232
|
+
diagnosticCodes: stringArray,
|
|
233
|
+
kind: { const: "unsupported_review" },
|
|
234
|
+
wholeFile: { const: true },
|
|
235
|
+
pending: { const: true },
|
|
236
|
+
}, [
|
|
237
|
+
"path",
|
|
238
|
+
"side",
|
|
239
|
+
"status",
|
|
240
|
+
"diagnosticCodes",
|
|
241
|
+
"kind",
|
|
242
|
+
"wholeFile",
|
|
243
|
+
"pending",
|
|
244
|
+
]),
|
|
245
|
+
objectData({
|
|
246
|
+
path: stringValue,
|
|
247
|
+
side: { enum: ["before", "after"] },
|
|
248
|
+
status: { const: "partial" },
|
|
249
|
+
diagnosticCodes: stringArray,
|
|
250
|
+
kind: { const: "partial_review" },
|
|
251
|
+
limitationClass: stringValue,
|
|
252
|
+
ranges: { type: "array", items: uncoveredReviewRange },
|
|
253
|
+
pending: { const: true },
|
|
254
|
+
}, [
|
|
255
|
+
"path",
|
|
256
|
+
"side",
|
|
257
|
+
"status",
|
|
258
|
+
"diagnosticCodes",
|
|
259
|
+
"kind",
|
|
260
|
+
"limitationClass",
|
|
261
|
+
"ranges",
|
|
262
|
+
"pending",
|
|
263
|
+
]),
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
const unauthoredRecordTemplate = objectData({
|
|
267
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
268
|
+
policy: impactRecordHeaders.properties.policy,
|
|
269
|
+
evaluator: impactRecordHeaders.properties.evaluator,
|
|
270
|
+
scope: impactRecordHeaders.properties.scope,
|
|
271
|
+
reviewer: objectData({ id: { type: "null" }, source: { const: "self-claimed-local" } }, ["id", "source"]),
|
|
272
|
+
reviewedAt: { type: "null" },
|
|
273
|
+
files: { type: "array", items: recordTemplateFile },
|
|
274
|
+
}, [
|
|
275
|
+
"contractVersion",
|
|
276
|
+
"policy",
|
|
277
|
+
"evaluator",
|
|
278
|
+
"scope",
|
|
279
|
+
"reviewer",
|
|
280
|
+
"reviewedAt",
|
|
281
|
+
"files",
|
|
282
|
+
]);
|
|
283
|
+
const impactReviewAuthorship = objectData({
|
|
284
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
285
|
+
isValidImpactReviewRecord: { const: false },
|
|
286
|
+
instructions: stringValue,
|
|
287
|
+
authoredFields: stringArray,
|
|
288
|
+
recordSchema: recordValue,
|
|
289
|
+
decisionSchema: recordValue,
|
|
290
|
+
analysisReviewSchema: recordValue,
|
|
291
|
+
templateSchema: recordValue,
|
|
292
|
+
recordTemplate: objectData({
|
|
293
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
294
|
+
isValidImpactReviewRecord: { const: false },
|
|
295
|
+
record: unauthoredRecordTemplate,
|
|
296
|
+
}, ["templateVersion", "isValidImpactReviewRecord", "record"]),
|
|
297
|
+
}, [
|
|
298
|
+
"templateVersion",
|
|
299
|
+
"isValidImpactReviewRecord",
|
|
300
|
+
"instructions",
|
|
301
|
+
"authoredFields",
|
|
302
|
+
"recordSchema",
|
|
303
|
+
"decisionSchema",
|
|
304
|
+
"analysisReviewSchema",
|
|
305
|
+
"templateSchema",
|
|
306
|
+
"recordTemplate",
|
|
307
|
+
]);
|
|
22
308
|
/**
|
|
23
309
|
* kibi.job.v1 receipt returned by async-mode operations (kb_check with
|
|
24
310
|
* `async: true`) instead of the synchronous payload. Agents poll
|
|
@@ -34,14 +320,6 @@ const jobReceiptData = objectData({
|
|
|
34
320
|
status: { type: "string" },
|
|
35
321
|
pollWith: { const: "kb_job_status" },
|
|
36
322
|
}, ["kibiProtocol", "jobVersion", "jobId", "tool", "status", "pollWith"]);
|
|
37
|
-
const stringValue = { type: "string" };
|
|
38
|
-
const integerValue = { type: "integer" };
|
|
39
|
-
const numberValue = { type: "number" };
|
|
40
|
-
const booleanValue = { type: "boolean" };
|
|
41
|
-
const stringArray = {
|
|
42
|
-
type: "array",
|
|
43
|
-
items: stringValue,
|
|
44
|
-
};
|
|
45
323
|
/** Preserve JSON Schema's nullable scalar/object representation in every
|
|
46
324
|
* generated consumer contract. Using a `type` union keeps the catalog
|
|
47
325
|
* readable and lets the MCP bridge round-trip the same wire schema. */
|
|
@@ -264,6 +542,28 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
264
542
|
jobReceiptData,
|
|
265
543
|
],
|
|
266
544
|
},
|
|
545
|
+
kb_prepare_impact_review: objectData({
|
|
546
|
+
preparationVersion: { const: "kibi.impact-review-preparation.v1" },
|
|
547
|
+
status: { const: "ready_for_authoring" },
|
|
548
|
+
snapshot: reviewSnapshotIdentity,
|
|
549
|
+
recordHeaders: impactRecordHeaders,
|
|
550
|
+
files: { type: "array", items: reviewFileEvidence },
|
|
551
|
+
requirementScopes: { type: "array", items: requirementScope },
|
|
552
|
+
residualReviewObligations: {
|
|
553
|
+
type: "array",
|
|
554
|
+
items: residualReviewObligation,
|
|
555
|
+
},
|
|
556
|
+
authorship: impactReviewAuthorship,
|
|
557
|
+
}, [
|
|
558
|
+
"preparationVersion",
|
|
559
|
+
"status",
|
|
560
|
+
"snapshot",
|
|
561
|
+
"recordHeaders",
|
|
562
|
+
"files",
|
|
563
|
+
"requirementScopes",
|
|
564
|
+
"residualReviewObligations",
|
|
565
|
+
"authorship",
|
|
566
|
+
]),
|
|
267
567
|
kb_compile_intent: objectData({
|
|
268
568
|
version: stringValue,
|
|
269
569
|
planHash: stringValue,
|
|
@@ -337,6 +637,7 @@ const EFFECT_OVERRIDES = {
|
|
|
337
637
|
"workspace-write": { destructive: true, retrySafety: "unsafe" },
|
|
338
638
|
},
|
|
339
639
|
kb_check: {},
|
|
640
|
+
kb_prepare_impact_review: {},
|
|
340
641
|
kb_compile_intent: {},
|
|
341
642
|
kb_apply_plan: {
|
|
342
643
|
"kb-write": { destructive: true, retrySafety: "unsafe" },
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OperationContext } from "./runtime-types.js";
|
|
2
|
+
import type { OperationResult } from "./types.js";
|
|
3
|
+
export type ImpactReviewPreparationScope = Readonly<{
|
|
4
|
+
kind: "staged";
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
kind: "diff";
|
|
7
|
+
baseCommit: string;
|
|
8
|
+
headCommit: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type PrepareImpactReviewInput = Readonly<{
|
|
11
|
+
scope: ImpactReviewPreparationScope;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function executePrepareImpactReview(input: PrepareImpactReviewInput, context: OperationContext): Promise<OperationResult<Record<string, unknown>>>;
|
|
14
|
+
//# sourceMappingURL=impact-review-preparation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impact-review-preparation.d.ts","sourceRoot":"","sources":["../../../src/public/operations/impact-review-preparation.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAmBlD,MAAM,MAAM,4BAA4B,GACpC,QAAQ,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,GAC5B,QAAQ,CAAC;IACP,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEP,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,KAAK,EAAE,4BAA4B,CAAC;CACrC,CAAC,CAAC;AAqaH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,wBAAwB,EAC/B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAiEnD"}
|