@getripple/core 1.0.4
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/CHANGELOG.md +18 -0
- package/README.md +53 -0
- package/dist/adapters.d.ts +39 -0
- package/dist/adapters.js +396 -0
- package/dist/adapters.js.map +1 -0
- package/dist/agent-workflow.d.ts +86 -0
- package/dist/agent-workflow.js +404 -0
- package/dist/agent-workflow.js.map +1 -0
- package/dist/approval.d.ts +45 -0
- package/dist/approval.js +272 -0
- package/dist/approval.js.map +1 -0
- package/dist/audit.d.ts +80 -0
- package/dist/audit.js +271 -0
- package/dist/audit.js.map +1 -0
- package/dist/change-intent.d.ts +242 -0
- package/dist/change-intent.js +1758 -0
- package/dist/change-intent.js.map +1 -0
- package/dist/graph.d.ts +346 -0
- package/dist/graph.js +4221 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/normalizer.d.ts +34 -0
- package/dist/normalizer.js +455 -0
- package/dist/normalizer.js.map +1 -0
- package/dist/policy.d.ts +55 -0
- package/dist/policy.js +380 -0
- package/dist/policy.js.map +1 -0
- package/dist/readiness.d.ts +35 -0
- package/dist/readiness.js +200 -0
- package/dist/readiness.js.map +1 -0
- package/dist/staged-check.d.ts +96 -0
- package/dist/staged-check.js +853 -0
- package/dist/staged-check.js.map +1 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.js +71 -0
- package/dist/types.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ContextPlanAdapterSignal, FileFocusSummary, GraphEngine } from "./graph";
|
|
2
|
+
import { SymbolNode } from "./types";
|
|
3
|
+
import type { RippleAdapterDetectionSummary } from "./adapters";
|
|
4
|
+
export type StagedCheckChangedLineRange = {
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
lineCount: number;
|
|
8
|
+
};
|
|
9
|
+
export type StagedCheckSymbolChangeKind = "implementation" | "signature-or-contract" | "return-shape-review";
|
|
10
|
+
export type StagedCheckSymbolContractRisk = "none" | "review" | "high";
|
|
11
|
+
export type StagedCheckSymbolStatus = "created" | "modified";
|
|
12
|
+
export type StagedCheckChangedSymbol = {
|
|
13
|
+
symbol: string;
|
|
14
|
+
file: string;
|
|
15
|
+
name: string;
|
|
16
|
+
kind: SymbolNode["kind"];
|
|
17
|
+
layer: SymbolNode["layer"];
|
|
18
|
+
exported: boolean;
|
|
19
|
+
callers: number;
|
|
20
|
+
calls: number;
|
|
21
|
+
symbolStatus: StagedCheckSymbolStatus;
|
|
22
|
+
changeKind: StagedCheckSymbolChangeKind;
|
|
23
|
+
contractRisk: StagedCheckSymbolContractRisk;
|
|
24
|
+
signatureTouched: boolean;
|
|
25
|
+
signatureChanged: boolean;
|
|
26
|
+
contractChanged: boolean;
|
|
27
|
+
returnLineChanged: boolean;
|
|
28
|
+
changedLines: number[];
|
|
29
|
+
lineRange: {
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
};
|
|
33
|
+
reason: string;
|
|
34
|
+
adapterSignals: ContextPlanAdapterSignal[];
|
|
35
|
+
};
|
|
36
|
+
export type StagedCheckContractRisk = {
|
|
37
|
+
file: string;
|
|
38
|
+
symbol: string;
|
|
39
|
+
risk: Exclude<StagedCheckSymbolContractRisk, "none">;
|
|
40
|
+
reason: string;
|
|
41
|
+
callers: number;
|
|
42
|
+
exported: boolean;
|
|
43
|
+
verificationTargets: string[];
|
|
44
|
+
adapterSignals: ContextPlanAdapterSignal[];
|
|
45
|
+
};
|
|
46
|
+
export type StagedCheckFileSummary = {
|
|
47
|
+
file: string;
|
|
48
|
+
focus: string;
|
|
49
|
+
modificationRisk: FileFocusSummary["modificationRisk"];
|
|
50
|
+
importerCount: number;
|
|
51
|
+
symbolCount: number;
|
|
52
|
+
changedLineRanges: StagedCheckChangedLineRange[];
|
|
53
|
+
changedSymbols: StagedCheckChangedSymbol[];
|
|
54
|
+
contractRisks: StagedCheckContractRisk[];
|
|
55
|
+
readFirst: string[];
|
|
56
|
+
symbolFocus: string[];
|
|
57
|
+
verificationTargets: string[];
|
|
58
|
+
adapterSignals: ContextPlanAdapterSignal[];
|
|
59
|
+
};
|
|
60
|
+
export type StagedCheckAgentActions = {
|
|
61
|
+
trustedFindings: string[];
|
|
62
|
+
verifyBeforeCommit: string[];
|
|
63
|
+
manualReviewRequired: string[];
|
|
64
|
+
};
|
|
65
|
+
export type StagedCheckSummary = {
|
|
66
|
+
workspace: string;
|
|
67
|
+
mode: "staged" | "changed";
|
|
68
|
+
baseRef?: string;
|
|
69
|
+
stagedFiles: number;
|
|
70
|
+
checkedFiles: number;
|
|
71
|
+
skippedFiles: string[];
|
|
72
|
+
missingFiles: string[];
|
|
73
|
+
highestRisk: FileFocusSummary["modificationRisk"] | "none";
|
|
74
|
+
requiresAttention: boolean;
|
|
75
|
+
adapterSupport: RippleAdapterDetectionSummary;
|
|
76
|
+
agentActions: StagedCheckAgentActions;
|
|
77
|
+
changedSymbols: StagedCheckChangedSymbol[];
|
|
78
|
+
contractRisks: StagedCheckContractRisk[];
|
|
79
|
+
files: StagedCheckFileSummary[];
|
|
80
|
+
};
|
|
81
|
+
export type BuildStagedCheckSummaryOptions = {
|
|
82
|
+
workspaceRoot: string;
|
|
83
|
+
stagedFiles: string[];
|
|
84
|
+
mode?: "staged" | "changed";
|
|
85
|
+
baseRef?: string;
|
|
86
|
+
stagedDiff?: string;
|
|
87
|
+
task?: string;
|
|
88
|
+
tokenBudget?: number;
|
|
89
|
+
};
|
|
90
|
+
export declare function isRippleSourceFile(filePath: string): boolean;
|
|
91
|
+
export declare function listGitStagedFiles(workspaceRoot: string): string[];
|
|
92
|
+
export declare function listGitStagedDiff(workspaceRoot: string): string;
|
|
93
|
+
export declare function listGitChangedFiles(workspaceRoot: string, baseRef: string): string[];
|
|
94
|
+
export declare function listGitChangedDiff(workspaceRoot: string, baseRef: string): string;
|
|
95
|
+
export declare function buildStagedCheckSummary(engine: GraphEngine, options: BuildStagedCheckSummaryOptions): StagedCheckSummary;
|
|
96
|
+
export declare function highestStagedRisk(files: StagedCheckFileSummary[]): FileFocusSummary["modificationRisk"] | "none";
|