@handong66/evidoc-core 0.1.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/src/agent-runtime.d.ts +15 -0
- package/dist/src/agent-runtime.js +149 -0
- package/dist/src/agent-runtime.js.map +1 -0
- package/dist/src/detectors.d.ts +2 -0
- package/dist/src/detectors.js +852 -0
- package/dist/src/detectors.js.map +1 -0
- package/dist/src/finding-documents.d.ts +2 -0
- package/dist/src/finding-documents.js +13 -0
- package/dist/src/finding-documents.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +297 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/path-safety.d.ts +7 -0
- package/dist/src/path-safety.js +94 -0
- package/dist/src/path-safety.js.map +1 -0
- package/dist/src/repository.d.ts +6 -0
- package/dist/src/repository.js +277 -0
- package/dist/src/repository.js.map +1 -0
- package/dist/src/types.d.ts +157 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/workflow-warnings.d.ts +18 -0
- package/dist/src/workflow-warnings.js +458 -0
- package/dist/src/workflow-warnings.js.map +1 -0
- package/package.json +27 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { access, readFile, readdir, stat } from "node:fs/promises";
|
|
2
|
+
import { join, relative } from "node:path";
|
|
3
|
+
import { resolveExistingPathInsideRoot } from "./path-safety.js";
|
|
4
|
+
const IGNORED_DIRECTORIES = new Set([
|
|
5
|
+
".git",
|
|
6
|
+
".opencode-plugin-codex",
|
|
7
|
+
".evidoc",
|
|
8
|
+
"coverage",
|
|
9
|
+
"dist",
|
|
10
|
+
"node_modules"
|
|
11
|
+
]);
|
|
12
|
+
const IGNORED_FILE_NAMES = new Set([".DS_Store"]);
|
|
13
|
+
export async function readRepository(root, options = {}) {
|
|
14
|
+
const files = await listFiles(root);
|
|
15
|
+
const config = await readConfig(root);
|
|
16
|
+
const packageManifest = await readPackageManifest(root, files);
|
|
17
|
+
const { documents, skippedOversized } = await readDocuments(root, files, config, options);
|
|
18
|
+
const apiOperations = await readApiOperations(root, files, config);
|
|
19
|
+
const reviewLog = await readReviewLog(root);
|
|
20
|
+
return {
|
|
21
|
+
root,
|
|
22
|
+
files: new Set(files),
|
|
23
|
+
documents,
|
|
24
|
+
packageManifest,
|
|
25
|
+
expectedPackageManager: detectPackageManager(packageManifest, files),
|
|
26
|
+
apiOperations,
|
|
27
|
+
config,
|
|
28
|
+
reviewLog,
|
|
29
|
+
skippedOversized
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export async function pathExists(root, candidate) {
|
|
33
|
+
try {
|
|
34
|
+
const target = await resolveExistingPathInsideRoot(root, candidate);
|
|
35
|
+
if (!target)
|
|
36
|
+
return false;
|
|
37
|
+
await access(target);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function listFiles(root) {
|
|
45
|
+
const results = [];
|
|
46
|
+
async function walk(current) {
|
|
47
|
+
const entries = await readdir(current, { withFileTypes: true });
|
|
48
|
+
for (const entry of entries) {
|
|
49
|
+
if (entry.isDirectory() && IGNORED_DIRECTORIES.has(entry.name)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (entry.isFile() && IGNORED_FILE_NAMES.has(entry.name)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const absolute = join(current, entry.name);
|
|
56
|
+
const repoRelative = relative(root, absolute).replaceAll("\\", "/");
|
|
57
|
+
if (entry.isDirectory()) {
|
|
58
|
+
await walk(absolute);
|
|
59
|
+
}
|
|
60
|
+
else if (entry.isFile()) {
|
|
61
|
+
results.push(repoRelative);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
await walk(root);
|
|
66
|
+
return results.sort();
|
|
67
|
+
}
|
|
68
|
+
async function readPackageManifest(root, files) {
|
|
69
|
+
if (!files.includes("package.json")) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const raw = await readFile(join(root, "package.json"), "utf8");
|
|
73
|
+
const parsed = JSON.parse(raw);
|
|
74
|
+
return {
|
|
75
|
+
name: parsed.name,
|
|
76
|
+
version: parsed.version,
|
|
77
|
+
packageManager: parsed.packageManager,
|
|
78
|
+
scripts: parsed.scripts ?? {}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
async function readDocuments(root, files, config, options) {
|
|
82
|
+
const restrictToChangedFiles = options.changedFiles !== undefined;
|
|
83
|
+
const changedFiles = new Set(options.changedFiles?.map(normalizePath));
|
|
84
|
+
const docs = files.filter((file) => isMarkdown(file) && (isIncludedDocument(file, config) || isAgentInstruction(file)));
|
|
85
|
+
const records = [];
|
|
86
|
+
let skippedOversized = 0;
|
|
87
|
+
for (const path of docs) {
|
|
88
|
+
const size = await fileSize(root, path);
|
|
89
|
+
if (config.maxFileBytes !== undefined && size > config.maxFileBytes) {
|
|
90
|
+
skippedOversized += 1;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (restrictToChangedFiles && !changedFiles.has(path)) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const text = await readFile(join(root, path), "utf8");
|
|
97
|
+
if (hasIgnoreFileDirective(text)) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
records.push({
|
|
101
|
+
path,
|
|
102
|
+
kind: isAgentInstruction(path) ? "agent_instruction" : "markdown",
|
|
103
|
+
lineCount: text.split(/\r?\n/).length,
|
|
104
|
+
text
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return { documents: records, skippedOversized };
|
|
108
|
+
}
|
|
109
|
+
async function readApiOperations(root, files, config) {
|
|
110
|
+
const configured = config.apiSpecPaths ?? [];
|
|
111
|
+
const specs = configured.length > 0
|
|
112
|
+
? configured.filter((file) => files.includes(file))
|
|
113
|
+
: files.filter((file) => /(^|\/)(openapi|swagger)\.json$/i.test(file));
|
|
114
|
+
const operations = [];
|
|
115
|
+
for (const specPath of specs) {
|
|
116
|
+
const raw = await readFile(join(root, specPath), "utf8");
|
|
117
|
+
let parsed;
|
|
118
|
+
try {
|
|
119
|
+
parsed = JSON.parse(raw);
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const paths = asRecord(asRecord(parsed).paths);
|
|
125
|
+
for (const [apiPath, methods] of Object.entries(paths)) {
|
|
126
|
+
if (!apiPath.startsWith("/"))
|
|
127
|
+
continue;
|
|
128
|
+
for (const [method, operation] of Object.entries(asRecord(methods))) {
|
|
129
|
+
const normalizedMethod = method.toUpperCase();
|
|
130
|
+
if (!isHttpMethod(normalizedMethod))
|
|
131
|
+
continue;
|
|
132
|
+
const operationId = asRecord(operation).operationId;
|
|
133
|
+
operations.push({
|
|
134
|
+
specPath,
|
|
135
|
+
method: normalizedMethod,
|
|
136
|
+
path: apiPath,
|
|
137
|
+
operationId: typeof operationId === "string" ? operationId : undefined,
|
|
138
|
+
requestSchemas: extractRequestSchemas(asRecord(operation)),
|
|
139
|
+
responseSchemas: extractResponseSchemas(asRecord(operation))
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return operations;
|
|
145
|
+
}
|
|
146
|
+
async function readConfig(root) {
|
|
147
|
+
try {
|
|
148
|
+
const raw = await readFile(join(root, ".evidoc", "config.json"), "utf8");
|
|
149
|
+
const parsed = JSON.parse(raw);
|
|
150
|
+
return {
|
|
151
|
+
...parsed,
|
|
152
|
+
ignorePatterns: parsed.ignorePatterns ?? [],
|
|
153
|
+
docRoots: parsed.docRoots?.map(normalizePath),
|
|
154
|
+
apiSpecPaths: parsed.apiSpecPaths?.map(normalizePath)
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return { ignorePatterns: [] };
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async function readReviewLog(root) {
|
|
162
|
+
try {
|
|
163
|
+
const raw = await readFile(join(root, ".evidoc", "review-log.jsonl"), "utf8");
|
|
164
|
+
const entries = [];
|
|
165
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
166
|
+
if (!line.trim())
|
|
167
|
+
continue;
|
|
168
|
+
try {
|
|
169
|
+
const parsed = JSON.parse(line);
|
|
170
|
+
if (typeof parsed.findingId === "string" && typeof parsed.reviewedAt === "string") {
|
|
171
|
+
entries.push(parsed);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return entries;
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
return [];
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function hasIgnoreFileDirective(text) {
|
|
185
|
+
return text.split(/\r?\n/, 12).some((line) => line.includes("evidoc: ignore-file"));
|
|
186
|
+
}
|
|
187
|
+
function isAgentInstruction(path) {
|
|
188
|
+
const normalized = normalizePath(path).toLowerCase();
|
|
189
|
+
const name = normalized.split("/").at(-1);
|
|
190
|
+
return (name === "agents.md" ||
|
|
191
|
+
name === "claude.md" ||
|
|
192
|
+
normalized === ".github/copilot-instructions.md" ||
|
|
193
|
+
normalized.startsWith(".cursor/rules/"));
|
|
194
|
+
}
|
|
195
|
+
function isMarkdown(path) {
|
|
196
|
+
const lower = path.toLowerCase();
|
|
197
|
+
return lower.endsWith(".md") || lower.endsWith(".mdx");
|
|
198
|
+
}
|
|
199
|
+
function isIncludedDocument(path, config) {
|
|
200
|
+
const normalized = normalizePath(path);
|
|
201
|
+
if (config.docRoots?.length && !config.docRoots.some((root) => normalized === root || normalized.startsWith(`${root}/`))) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
return !(config.ignorePatterns ?? []).some((pattern) => matchesGlob(normalized, pattern));
|
|
205
|
+
}
|
|
206
|
+
function detectPackageManager(manifest, files) {
|
|
207
|
+
const declared = manifest?.packageManager?.split("@")[0];
|
|
208
|
+
if (declared === "npm" || declared === "pnpm" || declared === "yarn" || declared === "bun") {
|
|
209
|
+
return declared;
|
|
210
|
+
}
|
|
211
|
+
if (files.includes("pnpm-lock.yaml"))
|
|
212
|
+
return "pnpm";
|
|
213
|
+
if (files.includes("yarn.lock"))
|
|
214
|
+
return "yarn";
|
|
215
|
+
if (files.includes("bun.lockb") || files.includes("bun.lock"))
|
|
216
|
+
return "bun";
|
|
217
|
+
if (files.includes("package-lock.json"))
|
|
218
|
+
return "npm";
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
function asRecord(value) {
|
|
222
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
223
|
+
? value
|
|
224
|
+
: {};
|
|
225
|
+
}
|
|
226
|
+
function isHttpMethod(value) {
|
|
227
|
+
return ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "TRACE"].includes(value);
|
|
228
|
+
}
|
|
229
|
+
function extractRequestSchemas(operation) {
|
|
230
|
+
const requestBody = asRecord(operation.requestBody);
|
|
231
|
+
return extractSchemasFromContent(asRecord(requestBody.content));
|
|
232
|
+
}
|
|
233
|
+
function extractResponseSchemas(operation) {
|
|
234
|
+
const responses = {};
|
|
235
|
+
for (const [status, response] of Object.entries(asRecord(operation.responses))) {
|
|
236
|
+
responses[status] = extractSchemasFromContent(asRecord(asRecord(response).content));
|
|
237
|
+
}
|
|
238
|
+
return responses;
|
|
239
|
+
}
|
|
240
|
+
function extractSchemasFromContent(content) {
|
|
241
|
+
const schemas = new Set();
|
|
242
|
+
for (const media of Object.values(content)) {
|
|
243
|
+
const schema = asRecord(asRecord(media).schema);
|
|
244
|
+
const name = schemaName(schema);
|
|
245
|
+
if (name)
|
|
246
|
+
schemas.add(name);
|
|
247
|
+
}
|
|
248
|
+
return [...schemas].sort();
|
|
249
|
+
}
|
|
250
|
+
function schemaName(schema) {
|
|
251
|
+
const ref = schema.$ref;
|
|
252
|
+
if (typeof ref === "string")
|
|
253
|
+
return ref.split("/").at(-1);
|
|
254
|
+
const title = schema.title;
|
|
255
|
+
return typeof title === "string" ? title : undefined;
|
|
256
|
+
}
|
|
257
|
+
async function fileSize(root, file) {
|
|
258
|
+
try {
|
|
259
|
+
return (await stat(join(root, file))).size;
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
return 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function normalizePath(path) {
|
|
266
|
+
return path.replaceAll("\\", "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
267
|
+
}
|
|
268
|
+
function matchesGlob(path, pattern) {
|
|
269
|
+
const normalized = normalizePath(pattern);
|
|
270
|
+
const escaped = normalized
|
|
271
|
+
.replace(/[.+^${}()|[\]\\]/g, "\\$&")
|
|
272
|
+
.replaceAll("**", "__DOUBLE_STAR__")
|
|
273
|
+
.replaceAll("*", "[^/]*")
|
|
274
|
+
.replaceAll("__DOUBLE_STAR__", ".*");
|
|
275
|
+
return new RegExp(`^${escaped}$`).test(path);
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../src/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAUjE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,MAAM;IACN,wBAAwB;IACxB,SAAS;IACT,UAAU;IACV,MAAM;IACN,cAAc;CACf,CAAC,CAAC;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAMlD,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O,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,UAAU;SACvB,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,UAAU,CAAC,IAAI,EAAE,iBAAiB,CAAC;SACnC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACvC,OAAO,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export type DriftStatus = "ok" | "review_needed" | "broken";
|
|
2
|
+
export type DriftSeverity = "low" | "medium" | "high";
|
|
3
|
+
export interface DocumentRecord {
|
|
4
|
+
path: string;
|
|
5
|
+
kind: "agent_instruction" | "markdown";
|
|
6
|
+
lineCount: number;
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PackageManifest {
|
|
10
|
+
name?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
packageManager?: string;
|
|
13
|
+
scripts: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export interface ApiOperation {
|
|
16
|
+
specPath: string;
|
|
17
|
+
method: string;
|
|
18
|
+
path: string;
|
|
19
|
+
operationId?: string;
|
|
20
|
+
requestSchemas: string[];
|
|
21
|
+
responseSchemas: Record<string, string[]>;
|
|
22
|
+
}
|
|
23
|
+
export interface ReviewLogEntry {
|
|
24
|
+
findingId: string;
|
|
25
|
+
decision: "accepted" | "false_positive" | "deferred" | "fixed";
|
|
26
|
+
reviewer: string;
|
|
27
|
+
reviewedAt: string;
|
|
28
|
+
expiresAt?: string;
|
|
29
|
+
note?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface EvidocConfig {
|
|
32
|
+
docRoots?: string[];
|
|
33
|
+
ignorePatterns?: string[];
|
|
34
|
+
severityOverrides?: Record<string, DriftSeverity>;
|
|
35
|
+
apiSpecPaths?: string[];
|
|
36
|
+
ownerMapping?: Record<string, string>;
|
|
37
|
+
reviewTtlDays?: number;
|
|
38
|
+
requireTestsForSources?: boolean;
|
|
39
|
+
requireDocsForChangedSources?: boolean;
|
|
40
|
+
maxFileBytes?: number;
|
|
41
|
+
concurrency?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface RepositorySnapshot {
|
|
44
|
+
root: string;
|
|
45
|
+
files: Set<string>;
|
|
46
|
+
documents: DocumentRecord[];
|
|
47
|
+
packageManifest?: PackageManifest;
|
|
48
|
+
expectedPackageManager?: "npm" | "pnpm" | "yarn" | "bun";
|
|
49
|
+
apiOperations: ApiOperation[];
|
|
50
|
+
config: EvidocConfig;
|
|
51
|
+
reviewLog: ReviewLogEntry[];
|
|
52
|
+
skippedOversized: number;
|
|
53
|
+
}
|
|
54
|
+
export interface CheckRepositoryOptions {
|
|
55
|
+
changedFiles?: string[];
|
|
56
|
+
changedSourceFiles?: string[];
|
|
57
|
+
undocumentedChangedFiles?: string[];
|
|
58
|
+
now?: Date;
|
|
59
|
+
}
|
|
60
|
+
export interface DriftEvidence {
|
|
61
|
+
kind: "agent_instruction" | "api" | "command" | "config" | "coverage" | "frontmatter" | "path" | "review_log" | "symbol";
|
|
62
|
+
subject: string;
|
|
63
|
+
expected?: string;
|
|
64
|
+
actual?: string;
|
|
65
|
+
detail: string;
|
|
66
|
+
}
|
|
67
|
+
export interface DriftFinding {
|
|
68
|
+
id: string;
|
|
69
|
+
ruleId: string;
|
|
70
|
+
severity: DriftSeverity;
|
|
71
|
+
status: Exclude<DriftStatus, "ok">;
|
|
72
|
+
docPath: string;
|
|
73
|
+
line: number;
|
|
74
|
+
message: string;
|
|
75
|
+
evidence: DriftEvidence[];
|
|
76
|
+
suggestedAction: string;
|
|
77
|
+
review?: {
|
|
78
|
+
decision: ReviewLogEntry["decision"];
|
|
79
|
+
reviewer: string;
|
|
80
|
+
reviewedAt: string;
|
|
81
|
+
expiresAt?: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface DriftSummary {
|
|
85
|
+
documentsScanned: number;
|
|
86
|
+
findings: number;
|
|
87
|
+
broken: number;
|
|
88
|
+
reviewNeeded: number;
|
|
89
|
+
reviewSuppressed: number;
|
|
90
|
+
skippedOversized: number;
|
|
91
|
+
healthScore?: number;
|
|
92
|
+
byRule: Record<string, number>;
|
|
93
|
+
bySeverity: Record<DriftSeverity, number>;
|
|
94
|
+
}
|
|
95
|
+
export interface DriftReport {
|
|
96
|
+
root: string;
|
|
97
|
+
scannedAt: string;
|
|
98
|
+
documents: Array<Pick<DocumentRecord, "path" | "kind" | "lineCount">>;
|
|
99
|
+
findings: DriftFinding[];
|
|
100
|
+
summary: DriftSummary;
|
|
101
|
+
}
|
|
102
|
+
export type AgentRuntimeEvent = "pre-commit" | "pre-push" | "manual" | "mcp" | "ide";
|
|
103
|
+
export type AgentRuntimeMode = "advisory" | "blocking";
|
|
104
|
+
export type AgentRuntimeScope = "staged" | "worktree" | "full_repository";
|
|
105
|
+
export type AgentRuntimeStatus = "passed" | "review_needed" | "failed";
|
|
106
|
+
export interface AgentRuntimeFinding {
|
|
107
|
+
fingerprint: string;
|
|
108
|
+
findingId: string;
|
|
109
|
+
ruleId: string;
|
|
110
|
+
status: Exclude<DriftStatus, "ok">;
|
|
111
|
+
severity: DriftSeverity;
|
|
112
|
+
location: string;
|
|
113
|
+
message: string;
|
|
114
|
+
suggestedAction: string;
|
|
115
|
+
}
|
|
116
|
+
export interface AgentRuntimeContract {
|
|
117
|
+
schemaVersion: "evidoc.agent-runtime.v1";
|
|
118
|
+
source: "evidoc";
|
|
119
|
+
event: AgentRuntimeEvent;
|
|
120
|
+
mode: AgentRuntimeMode;
|
|
121
|
+
scope: AgentRuntimeScope;
|
|
122
|
+
baseline?: string;
|
|
123
|
+
baselineCommit?: string;
|
|
124
|
+
status: AgentRuntimeStatus;
|
|
125
|
+
fingerprint: string;
|
|
126
|
+
generatedAt: string;
|
|
127
|
+
scannedAt: string;
|
|
128
|
+
summary: {
|
|
129
|
+
findings: number;
|
|
130
|
+
broken: number;
|
|
131
|
+
reviewNeeded: number;
|
|
132
|
+
};
|
|
133
|
+
findings: AgentRuntimeFinding[];
|
|
134
|
+
dedupe: {
|
|
135
|
+
strategy: "runtime.findings[].fingerprint";
|
|
136
|
+
fingerprintCount: number;
|
|
137
|
+
};
|
|
138
|
+
changedFiles?: string[];
|
|
139
|
+
changedFileFingerprints?: Record<string, string>;
|
|
140
|
+
affectedDocuments?: string[];
|
|
141
|
+
}
|
|
142
|
+
export interface MultiRepositoryReport {
|
|
143
|
+
scannedAt: string;
|
|
144
|
+
repositories: DriftReport[];
|
|
145
|
+
summary: {
|
|
146
|
+
repositoriesScanned: number;
|
|
147
|
+
documentsScanned: number;
|
|
148
|
+
findings: number;
|
|
149
|
+
broken: number;
|
|
150
|
+
reviewNeeded: number;
|
|
151
|
+
reviewSuppressed: number;
|
|
152
|
+
skippedOversized: number;
|
|
153
|
+
healthScore?: number;
|
|
154
|
+
byRule: Record<string, number>;
|
|
155
|
+
bySeverity: Record<DriftSeverity, number>;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface WorkflowLocalActionDefinition {
|
|
2
|
+
path: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export interface EvidocWorkflowTextDetection {
|
|
6
|
+
matches: boolean;
|
|
7
|
+
localActions: WorkflowLocalActionDefinition[];
|
|
8
|
+
}
|
|
9
|
+
export type WorkflowLocalActionReader = (repoRelativeActionPath: string) => Promise<WorkflowLocalActionDefinition | undefined>;
|
|
10
|
+
export declare function isEvidocWorkflowText(text: string): boolean;
|
|
11
|
+
export declare function detectEvidocWorkflowText(text: string, readLocalAction: WorkflowLocalActionReader, options?: {
|
|
12
|
+
maxLocalActionDepth?: number;
|
|
13
|
+
}): Promise<EvidocWorkflowTextDetection>;
|
|
14
|
+
export declare function detectRepositoryEvidocWorkflowText(root: string, text: string, options?: {
|
|
15
|
+
maxLocalActionDepth?: number;
|
|
16
|
+
}): Promise<EvidocWorkflowTextDetection>;
|
|
17
|
+
export declare function workflowLocalActionPaths(text: string): string[];
|
|
18
|
+
export declare function evidocWorkflowWarnings(path: string, text: string, defaultBranch: string | undefined): string[];
|