@hamsterbase/evidra 0.0.0-stage → 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/README.md +2 -2
- package/bin/evidra.mjs +2 -0
- package/dist/sdk/main.d.ts +176 -0
- package/dist/sdk/main.js +1322 -0
- package/dist/service/cli.js +2645 -0
- package/dist/types/modules/core/contracts/comparison.d.ts +41 -0
- package/dist/types/modules/core/contracts/config.d.ts +19 -0
- package/dist/types/modules/core/contracts/context.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/addCase.d.ts +128 -0
- package/dist/types/modules/core/contracts/functions/addTask.d.ts +14 -0
- package/dist/types/modules/core/contracts/functions/approve.d.ts +8 -0
- package/dist/types/modules/core/contracts/functions/baselineChanges.d.ts +14 -0
- package/dist/types/modules/core/contracts/functions/compare.d.ts +14 -0
- package/dist/types/modules/core/contracts/functions/compareTask.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/compareTasks.d.ts +18 -0
- package/dist/types/modules/core/contracts/functions/deleteBaselineFile.d.ts +8 -0
- package/dist/types/modules/core/contracts/functions/finishTask.d.ts +8 -0
- package/dist/types/modules/core/contracts/functions/getBaseline.d.ts +10 -0
- package/dist/types/modules/core/contracts/functions/getBaselineChanges.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/getGitChanges.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/getGitDiff.d.ts +8 -0
- package/dist/types/modules/core/contracts/functions/getTaskCase.d.ts +23 -0
- package/dist/types/modules/core/contracts/functions/getTaskTree.d.ts +21 -0
- package/dist/types/modules/core/contracts/functions/gitChanges.d.ts +25 -0
- package/dist/types/modules/core/contracts/functions/index.d.ts +18 -0
- package/dist/types/modules/core/contracts/functions/listBaselines.d.ts +5 -0
- package/dist/types/modules/core/contracts/functions/listRuns.d.ts +7 -0
- package/dist/types/modules/core/contracts/functions/listTaskSummaries.d.ts +15 -0
- package/dist/types/modules/core/contracts/functions/listTasks.d.ts +15 -0
- package/dist/types/modules/core/contracts/functions/loadConfig.d.ts +5 -0
- package/dist/types/modules/core/contracts/functions/readProjectInfo.d.ts +5 -0
- package/dist/types/modules/core/contracts/functions/readTaskReport.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/resolveConfig.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/reviewBaselineChanges.d.ts +9 -0
- package/dist/types/modules/core/contracts/functions/reviewCodeChanges.d.ts +9 -0
- package/dist/types/modules/core/contracts/functions/taskRecords.d.ts +6 -0
- package/dist/types/modules/core/contracts/functions/updateBaseline.d.ts +20 -0
- package/dist/types/modules/core/contracts/git.d.ts +14 -0
- package/dist/types/modules/core/contracts/imageDiffPool.d.ts +5 -0
- package/dist/types/modules/core/contracts/index.d.ts +30 -0
- package/dist/types/modules/core/contracts/internal/compare.d.ts +14 -0
- package/dist/types/modules/core/contracts/internal/getBaseline.d.ts +10 -0
- package/dist/types/modules/core/contracts/internal/listTasks.d.ts +12 -0
- package/dist/types/modules/core/contracts/internal/taskRecords.d.ts +6 -0
- package/dist/types/modules/core/contracts/internal/updateBaseline.d.ts +20 -0
- package/dist/types/modules/core/contracts/model.d.ts +80 -0
- package/dist/types/modules/core/contracts/report.d.ts +52 -0
- package/dist/types/modules/core/contracts/repository.d.ts +5 -0
- package/dist/types/modules/core/contracts/requests.d.ts +23 -0
- package/dist/types/modules/core/contracts/scanCases.d.ts +15 -0
- package/dist/types/modules/core/contracts/shared.d.ts +6 -0
- package/dist/types/modules/core/contracts/snapshots.d.ts +6 -0
- package/dist/types/modules/core/contracts/taskRecord.d.ts +76 -0
- package/dist/types/modules/core/implementations/Functions/addCase.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/addTask.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/approve.d.ts +6 -0
- package/dist/types/modules/core/implementations/Functions/compare.d.ts +15 -0
- package/dist/types/modules/core/implementations/Functions/compareTask.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/compareTasks.d.ts +5 -0
- package/dist/types/modules/core/implementations/Functions/deleteBaselineFile.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/finishTask.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/getBaseline.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/getBaselineChanges.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/getGitChanges.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/getGitDiff.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/getTaskCase.d.ts +5 -0
- package/dist/types/modules/core/implementations/Functions/getTaskTree.d.ts +5 -0
- package/dist/types/modules/core/implementations/Functions/listBaselines.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/listTaskSummaries.d.ts +2 -0
- package/dist/types/modules/core/implementations/Functions/listTasks.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/loadConfig.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/readProjectInfo.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/readTaskReport.d.ts +3 -0
- package/dist/types/modules/core/implementations/Functions/resolveConfig.d.ts +9 -0
- package/dist/types/modules/core/implementations/Functions/reviewBaselineChanges.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/reviewCodeChanges.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/taskRecords.d.ts +4 -0
- package/dist/types/modules/core/implementations/Functions/updateBaseline.d.ts +5 -0
- package/dist/types/modules/core/implementations/Utils/assertNamespace.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/canonical.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/createTaskId.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/deletionAllowed.d.ts +2 -0
- package/dist/types/modules/core/implementations/Utils/download.d.ts +3 -0
- package/dist/types/modules/core/implementations/Utils/hash.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/imageDiffPool.d.ts +18 -0
- package/dist/types/modules/core/implementations/Utils/imageKey.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/loadBaseline.d.ts +4 -0
- package/dist/types/modules/core/implementations/Utils/mapLimit.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/observationKey.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/pngSize.d.ts +4 -0
- package/dist/types/modules/core/implementations/Utils/readJson.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/readTaskRecord.d.ts +2 -0
- package/dist/types/modules/core/implementations/Utils/scanCases.d.ts +9 -0
- package/dist/types/modules/core/implementations/Utils/taskDirectory.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/toCase.d.ts +3 -0
- package/dist/types/modules/core/implementations/Utils/toObservation.d.ts +3 -0
- package/dist/types/modules/core/implementations/Utils/toSnapshot.d.ts +3 -0
- package/dist/types/modules/core/implementations/Utils/writeBytesAtomic.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/writeJsonAtomic.d.ts +1 -0
- package/dist/types/modules/core/implementations/Utils/writeTextAtomic.d.ts +1 -0
- package/dist/types/modules/core/implementations/baselineChanges.d.ts +6 -0
- package/dist/types/modules/core/implementations/config.d.ts +6 -0
- package/dist/types/modules/core/implementations/content.d.ts +1 -0
- package/dist/types/modules/core/implementations/evidra.d.ts +31 -0
- package/dist/types/modules/core/implementations/git.d.ts +11 -0
- package/dist/types/modules/core/implementations/gitChanges.d.ts +29 -0
- package/dist/types/modules/core/implementations/index.d.ts +17 -0
- package/dist/types/modules/core/implementations/internal/compare.d.ts +15 -0
- package/dist/types/modules/core/implementations/internal/getBaseline.d.ts +4 -0
- package/dist/types/modules/core/implementations/internal/listTasks.d.ts +2 -0
- package/dist/types/modules/core/implementations/internal/taskRecords.d.ts +4 -0
- package/dist/types/modules/core/implementations/internal/updateBaseline.d.ts +5 -0
- package/dist/types/modules/core/implementations/paths.d.ts +48 -0
- package/dist/types/modules/core/implementations/report.d.ts +3 -0
- package/dist/types/modules/core/implementations/reportResources.d.ts +4 -0
- package/dist/types/modules/core/implementations/reportStatus.d.ts +10 -0
- package/dist/types/modules/core/implementations/reportTree.d.ts +5 -0
- package/dist/types/modules/core/implementations/repository.d.ts +10 -0
- package/dist/types/modules/core/implementations/requests.d.ts +13 -0
- package/dist/types/modules/core/implementations/snapshots.d.ts +11 -0
- package/dist/types/modules/core/implementations/storage/local.d.ts +3 -0
- package/dist/types/modules/core/implementations/storage/objects.d.ts +3 -0
- package/dist/types/modules/core/index.d.ts +21 -0
- package/dist/types/packages/sdk/src/index.d.ts +21 -0
- package/dist/types/packages/sdk/src/types.d.ts +9 -0
- package/dist/web/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/web/assets/abap-08VXUWAP.js +1 -0
- package/dist/web/assets/apex-BWPQTe0t.js +1 -0
- package/dist/web/assets/azcli-Bc_sGQ0U.js +1 -0
- package/dist/web/assets/bat-i0X4ZdIN.js +1 -0
- package/dist/web/assets/bicep-B5-_aFwp.js +2 -0
- package/dist/web/assets/cameligo-DMUM7wLl.js +1 -0
- package/dist/web/assets/clojure-Cm7r79vr.js +1 -0
- package/dist/web/assets/codicon-DF1abBS2.ttf +0 -0
- package/dist/web/assets/coffee-Ba7i2nA0.js +1 -0
- package/dist/web/assets/cpp-C7h46wYY.js +1 -0
- package/dist/web/assets/csharp-BKxtCVv1.js +1 -0
- package/dist/web/assets/csp-bTuwJoIa.js +1 -0
- package/dist/web/assets/css-DIMkf-bt.js +3 -0
- package/dist/web/assets/css.worker-DwfUZ3fB.js +96 -0
- package/dist/web/assets/cssMode-B8lMpRZk.js +1 -0
- package/dist/web/assets/cypher-CVaqCwHa.js +1 -0
- package/dist/web/assets/dart-onAF5SnQ.js +1 -0
- package/dist/web/assets/dockerfile-DZFCIeNp.js +1 -0
- package/dist/web/assets/ecl-94qehhXe.js +1 -0
- package/dist/web/assets/editor-DjpsE8to.css +1 -0
- package/dist/web/assets/editor.api-v7kHj8A9.js +908 -0
- package/dist/web/assets/editor.worker-CRz__AKW.js +33 -0
- package/dist/web/assets/elixir-6RTg0lbw.js +1 -0
- package/dist/web/assets/flow9-C5_-GSwl.js +1 -0
- package/dist/web/assets/freemarker2-DGeBHzes.js +3 -0
- package/dist/web/assets/fsharp-C8Ef5oNN.js +1 -0
- package/dist/web/assets/go-C-y9NEjX.js +1 -0
- package/dist/web/assets/graphql-fmXr3nnJ.js +1 -0
- package/dist/web/assets/handlebars-CJj8r50C.js +1 -0
- package/dist/web/assets/hcl-CpzslTdj.js +1 -0
- package/dist/web/assets/html-DjzDFsf0.js +1 -0
- package/dist/web/assets/html.worker-D9ugpX4y.js +509 -0
- package/dist/web/assets/htmlMode-CkwZJBoD.js +1 -0
- package/dist/web/assets/index-CSk5TcTU.js +37 -0
- package/dist/web/assets/index-jRxy440Y.css +2 -0
- package/dist/web/assets/ini-sBoK_t0W.js +1 -0
- package/dist/web/assets/java-BEtHBSE6.js +1 -0
- package/dist/web/assets/javascript-C-MAHJiN.js +1 -0
- package/dist/web/assets/json.worker-CV9fqkUp.js +65 -0
- package/dist/web/assets/jsonMode-CkXjaZv2.js +7 -0
- package/dist/web/assets/julia-Bri6UV-V.js +1 -0
- package/dist/web/assets/kotlin-BOotOW0E.js +1 -0
- package/dist/web/assets/less-B9JPFI3C.js +2 -0
- package/dist/web/assets/lexon-CfSJPG6W.js +1 -0
- package/dist/web/assets/liquid-7k8-ZDme.js +1 -0
- package/dist/web/assets/lspLanguageFeatures-CUP45dUg.js +4 -0
- package/dist/web/assets/lua-CsQS60Ue.js +1 -0
- package/dist/web/assets/m3-D-oSqn_W.js +1 -0
- package/dist/web/assets/markdown-Cimd5fb3.js +1 -0
- package/dist/web/assets/mdx-D-hYSOvW.js +1 -0
- package/dist/web/assets/mips-CIPQ_RoX.js +1 -0
- package/dist/web/assets/monaco-Dq3bzBUw.js +58 -0
- package/dist/web/assets/monaco-n7clI0si.css +1 -0
- package/dist/web/assets/msdax-DauUninz.js +1 -0
- package/dist/web/assets/mysql-SOo6toE5.js +1 -0
- package/dist/web/assets/objective-c-FvmIjYaQ.js +1 -0
- package/dist/web/assets/pascal-DrH0SRf2.js +1 -0
- package/dist/web/assets/pascaligo-D-ptJ9y-.js +1 -0
- package/dist/web/assets/perl-oz_6vUea.js +1 -0
- package/dist/web/assets/pgsql-DTj74zXo.js +1 -0
- package/dist/web/assets/php-nr791fC2.js +1 -0
- package/dist/web/assets/pla-CopQ2nXW.js +1 -0
- package/dist/web/assets/postiats-43DmfD33.js +1 -0
- package/dist/web/assets/powerquery-D3hlyOfw.js +1 -0
- package/dist/web/assets/powershell-DmHpPYUd.js +1 -0
- package/dist/web/assets/protobuf-C531GsRP.js +2 -0
- package/dist/web/assets/pug-Z5eAx3Zn.js +1 -0
- package/dist/web/assets/python-BpkAjkSI.js +1 -0
- package/dist/web/assets/qsharp-DkqhCAOL.js +1 -0
- package/dist/web/assets/r-BwWrilGY.js +1 -0
- package/dist/web/assets/razor-CxgXgZt1.js +1 -0
- package/dist/web/assets/redis-ClamHrr6.js +1 -0
- package/dist/web/assets/redshift-DT7zqm-g.js +1 -0
- package/dist/web/assets/restructuredtext-BYgofb2h.js +1 -0
- package/dist/web/assets/ruby-DezsRK8O.js +1 -0
- package/dist/web/assets/rust-DdL9SqIa.js +1 -0
- package/dist/web/assets/sb-CcwsVR0C.js +1 -0
- package/dist/web/assets/scala-DHpiXF5c.js +1 -0
- package/dist/web/assets/scheme-BeGwcela.js +1 -0
- package/dist/web/assets/scss-gp-XZpBa.js +3 -0
- package/dist/web/assets/shell-CC2rA5mh.js +1 -0
- package/dist/web/assets/solidity-BEEn4gHE.js +1 -0
- package/dist/web/assets/sophia-CRfGWb83.js +1 -0
- package/dist/web/assets/sparql-D_Lu-MrJ.js +1 -0
- package/dist/web/assets/sql-NEE52Syq.js +1 -0
- package/dist/web/assets/st-DbInun42.js +1 -0
- package/dist/web/assets/swift-Bxkupp3x.js +1 -0
- package/dist/web/assets/systemverilog-Bz4Y3fRF.js +1 -0
- package/dist/web/assets/tcl-DISqw1ZD.js +1 -0
- package/dist/web/assets/ts.worker-DIAQkoB3.js +67741 -0
- package/dist/web/assets/tsMode-BUKs-FlJ.js +11 -0
- package/dist/web/assets/twig-De2hgUGE.js +1 -0
- package/dist/web/assets/typescript-DVSIawmK.js +1 -0
- package/dist/web/assets/typespec-B8J7ngcE.js +1 -0
- package/dist/web/assets/vb-DV3o63ZY.js +1 -0
- package/dist/web/assets/wgsl-DpFanUEy.js +298 -0
- package/dist/web/assets/workers-v4-uKnr3.js +1 -0
- package/dist/web/assets/xml-D2x86430.js +1 -0
- package/dist/web/assets/yaml-nb07hHZ9.js +1 -0
- package/dist/web/index.html +13 -0
- package/package.json +77 -4
- package/skills/evidra/SKILL.md +112 -0
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Evidra
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Evidra 帮你将测试快照保存为基线,并在后续运行时自动与基线比较,让你直观地查看测试的变化。
|
package/bin/evidra.mjs
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** keypath 的单段与 id 共用同一约束:只允许大小写字母、数字、中划线。 */
|
|
3
|
+
type Key = string;
|
|
4
|
+
interface TreeSegment {
|
|
5
|
+
key: Key;
|
|
6
|
+
display: string;
|
|
7
|
+
}
|
|
8
|
+
type CaseStatus = 'passed' | 'failed' | 'skipped' | 'interrupted';
|
|
9
|
+
interface CaseResult {
|
|
10
|
+
status: CaseStatus;
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
errors?: string[];
|
|
13
|
+
}
|
|
14
|
+
/** 已保存的快照元数据。 */
|
|
15
|
+
interface Snapshot {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: 'text' | 'image';
|
|
19
|
+
/** 文本正文;图片使用独立对象 key。 */
|
|
20
|
+
body?: string;
|
|
21
|
+
language?: string;
|
|
22
|
+
contentType?: 'image/png';
|
|
23
|
+
width?: number;
|
|
24
|
+
height?: number;
|
|
25
|
+
/** 1–12,默认 4。 */
|
|
26
|
+
col?: number;
|
|
27
|
+
maxDiffPixels?: number;
|
|
28
|
+
/** 对象存储 key。 */
|
|
29
|
+
key?: string;
|
|
30
|
+
/** 内容读取地址;文本返回 text/plain,图片返回 image/png。 */
|
|
31
|
+
url?: string;
|
|
32
|
+
}
|
|
33
|
+
interface Observation {
|
|
34
|
+
name: string;
|
|
35
|
+
type: 'text' | 'image';
|
|
36
|
+
/** 文本正文;图片使用独立对象 key。 */
|
|
37
|
+
body?: string;
|
|
38
|
+
language?: string;
|
|
39
|
+
contentType?: 'image/png';
|
|
40
|
+
width?: number;
|
|
41
|
+
height?: number;
|
|
42
|
+
/** 对象存储 key。 */
|
|
43
|
+
key?: string;
|
|
44
|
+
url?: string;
|
|
45
|
+
}
|
|
46
|
+
interface Case {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
treePath: TreeSegment[];
|
|
50
|
+
/** 失败且未采集到快照时为 null。 */
|
|
51
|
+
snapshots: Snapshot[] | null;
|
|
52
|
+
result: CaseResult;
|
|
53
|
+
observations: Observation[];
|
|
54
|
+
}
|
|
55
|
+
interface BaselineCase {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
treePath: TreeSegment[];
|
|
59
|
+
snapshots: Snapshot[];
|
|
60
|
+
approvedAt: string;
|
|
61
|
+
}
|
|
62
|
+
declare const CaseInputSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
treePath: z.ZodArray<z.ZodObject<{
|
|
66
|
+
key: z.ZodString;
|
|
67
|
+
display: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
snapshots: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
col: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
type: z.ZodLiteral<"text">;
|
|
74
|
+
body: z.ZodString;
|
|
75
|
+
language: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
col: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
type: z.ZodLiteral<"image">;
|
|
81
|
+
body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
82
|
+
contentType: z.ZodLiteral<"image/png">;
|
|
83
|
+
maxDiffPixels: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, z.core.$strip>], "type">>>;
|
|
85
|
+
result: z.ZodObject<{
|
|
86
|
+
status: z.ZodEnum<{
|
|
87
|
+
passed: "passed";
|
|
88
|
+
failed: "failed";
|
|
89
|
+
skipped: "skipped";
|
|
90
|
+
interrupted: "interrupted";
|
|
91
|
+
}>;
|
|
92
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
observations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
type: z.ZodLiteral<"text">;
|
|
98
|
+
body: z.ZodString;
|
|
99
|
+
language: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
type: z.ZodLiteral<"image">;
|
|
103
|
+
body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
104
|
+
contentType: z.ZodLiteral<"image/png">;
|
|
105
|
+
}, z.core.$strip>], "type">>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
type CaseInput = z.infer<typeof CaseInputSchema>;
|
|
108
|
+
declare const AddTaskInputSchema: z.ZodObject<{
|
|
109
|
+
repoRoot: z.ZodString;
|
|
110
|
+
namespace: z.ZodString;
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
startedAt: z.ZodISODateTime;
|
|
113
|
+
coverage: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
partial: "partial";
|
|
115
|
+
complete: "complete";
|
|
116
|
+
}>>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
type AddTaskInput = z.infer<typeof AddTaskInputSchema>;
|
|
119
|
+
type Change = 'added' | 'modified' | 'deleted' | 'same' | 'unavailable';
|
|
120
|
+
interface SnapshotDiff {
|
|
121
|
+
id: string;
|
|
122
|
+
change: Change;
|
|
123
|
+
current?: Snapshot;
|
|
124
|
+
baseline?: Snapshot;
|
|
125
|
+
/** 内容(文本/像素)是否一致;change 还包含名称、布局等元数据比较。 */
|
|
126
|
+
contentSame?: boolean;
|
|
127
|
+
diffPixels?: number;
|
|
128
|
+
maxDiffPixels?: number;
|
|
129
|
+
/** 相对 reportDir 的差异图路径。 */
|
|
130
|
+
diffFile?: string;
|
|
131
|
+
/** 差异图绝对路径,供本地调用方使用。 */
|
|
132
|
+
diffUrl?: string;
|
|
133
|
+
}
|
|
134
|
+
interface CaseDiff {
|
|
135
|
+
id: string;
|
|
136
|
+
change: Change;
|
|
137
|
+
current?: Case;
|
|
138
|
+
baseline?: BaselineCase;
|
|
139
|
+
baselineHash?: string;
|
|
140
|
+
snapshots: SnapshotDiff[];
|
|
141
|
+
}
|
|
142
|
+
interface ComparisonSummary {
|
|
143
|
+
added: number;
|
|
144
|
+
modified: number;
|
|
145
|
+
deleted: number;
|
|
146
|
+
same: number;
|
|
147
|
+
unavailable: number;
|
|
148
|
+
}
|
|
149
|
+
interface Comparison {
|
|
150
|
+
taskId: string;
|
|
151
|
+
namespace: string;
|
|
152
|
+
/** 当前基线的稳定版本,用于审批冲突检测。 */
|
|
153
|
+
baselineVersion: string;
|
|
154
|
+
/** 是否允许把缺失用例/快照作为删除项。 */
|
|
155
|
+
deletionAllowed: boolean;
|
|
156
|
+
cases: CaseDiff[];
|
|
157
|
+
summary: ComparisonSummary;
|
|
158
|
+
}
|
|
159
|
+
declare const ResolveConfigInputSchema: z.ZodObject<{
|
|
160
|
+
repoRoot: z.ZodString;
|
|
161
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
type ResolveConfigInput = z.infer<typeof ResolveConfigInputSchema>;
|
|
164
|
+
export declare function createEvidra(options: Pick<ResolveConfigInput, 'repoRoot'>): Promise<{
|
|
165
|
+
repoRoot: string;
|
|
166
|
+
reportDir: string;
|
|
167
|
+
start(input: Omit<AddTaskInput, "repoRoot" | "startedAt"> & {
|
|
168
|
+
startedAt?: string;
|
|
169
|
+
}): Promise<{
|
|
170
|
+
taskId: string;
|
|
171
|
+
}>;
|
|
172
|
+
case(id: string, input: CaseInput): Promise<void>;
|
|
173
|
+
finish(id: string): Promise<void>;
|
|
174
|
+
compare(taskId: string): Promise<Comparison>;
|
|
175
|
+
}>;
|
|
176
|
+
export {};
|