@hamsterbase/evidra 0.0.0-stage → 0.2.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.
Files changed (228) hide show
  1. package/README.md +2 -2
  2. package/bin/evidra.mjs +2 -0
  3. package/dist/sdk/main.d.ts +176 -0
  4. package/dist/sdk/main.js +1322 -0
  5. package/dist/service/cli.js +2645 -0
  6. package/dist/types/modules/core/contracts/comparison.d.ts +41 -0
  7. package/dist/types/modules/core/contracts/config.d.ts +19 -0
  8. package/dist/types/modules/core/contracts/context.d.ts +6 -0
  9. package/dist/types/modules/core/contracts/functions/addCase.d.ts +128 -0
  10. package/dist/types/modules/core/contracts/functions/addTask.d.ts +14 -0
  11. package/dist/types/modules/core/contracts/functions/approve.d.ts +8 -0
  12. package/dist/types/modules/core/contracts/functions/baselineChanges.d.ts +14 -0
  13. package/dist/types/modules/core/contracts/functions/compare.d.ts +14 -0
  14. package/dist/types/modules/core/contracts/functions/compareTask.d.ts +6 -0
  15. package/dist/types/modules/core/contracts/functions/compareTasks.d.ts +18 -0
  16. package/dist/types/modules/core/contracts/functions/deleteBaselineFile.d.ts +8 -0
  17. package/dist/types/modules/core/contracts/functions/finishTask.d.ts +8 -0
  18. package/dist/types/modules/core/contracts/functions/getBaseline.d.ts +10 -0
  19. package/dist/types/modules/core/contracts/functions/getBaselineChanges.d.ts +6 -0
  20. package/dist/types/modules/core/contracts/functions/getGitChanges.d.ts +6 -0
  21. package/dist/types/modules/core/contracts/functions/getGitDiff.d.ts +8 -0
  22. package/dist/types/modules/core/contracts/functions/getTaskCase.d.ts +23 -0
  23. package/dist/types/modules/core/contracts/functions/getTaskTree.d.ts +21 -0
  24. package/dist/types/modules/core/contracts/functions/gitChanges.d.ts +25 -0
  25. package/dist/types/modules/core/contracts/functions/index.d.ts +18 -0
  26. package/dist/types/modules/core/contracts/functions/listBaselines.d.ts +5 -0
  27. package/dist/types/modules/core/contracts/functions/listRuns.d.ts +7 -0
  28. package/dist/types/modules/core/contracts/functions/listTaskSummaries.d.ts +15 -0
  29. package/dist/types/modules/core/contracts/functions/listTasks.d.ts +15 -0
  30. package/dist/types/modules/core/contracts/functions/loadConfig.d.ts +5 -0
  31. package/dist/types/modules/core/contracts/functions/readProjectInfo.d.ts +5 -0
  32. package/dist/types/modules/core/contracts/functions/readTaskReport.d.ts +6 -0
  33. package/dist/types/modules/core/contracts/functions/resolveConfig.d.ts +6 -0
  34. package/dist/types/modules/core/contracts/functions/reviewBaselineChanges.d.ts +9 -0
  35. package/dist/types/modules/core/contracts/functions/reviewCodeChanges.d.ts +9 -0
  36. package/dist/types/modules/core/contracts/functions/taskRecords.d.ts +6 -0
  37. package/dist/types/modules/core/contracts/functions/updateBaseline.d.ts +20 -0
  38. package/dist/types/modules/core/contracts/git.d.ts +14 -0
  39. package/dist/types/modules/core/contracts/imageDiffPool.d.ts +5 -0
  40. package/dist/types/modules/core/contracts/index.d.ts +30 -0
  41. package/dist/types/modules/core/contracts/internal/compare.d.ts +14 -0
  42. package/dist/types/modules/core/contracts/internal/getBaseline.d.ts +10 -0
  43. package/dist/types/modules/core/contracts/internal/listTasks.d.ts +12 -0
  44. package/dist/types/modules/core/contracts/internal/taskRecords.d.ts +6 -0
  45. package/dist/types/modules/core/contracts/internal/updateBaseline.d.ts +20 -0
  46. package/dist/types/modules/core/contracts/model.d.ts +80 -0
  47. package/dist/types/modules/core/contracts/report.d.ts +52 -0
  48. package/dist/types/modules/core/contracts/repository.d.ts +5 -0
  49. package/dist/types/modules/core/contracts/requests.d.ts +23 -0
  50. package/dist/types/modules/core/contracts/scanCases.d.ts +15 -0
  51. package/dist/types/modules/core/contracts/shared.d.ts +6 -0
  52. package/dist/types/modules/core/contracts/snapshots.d.ts +6 -0
  53. package/dist/types/modules/core/contracts/taskRecord.d.ts +76 -0
  54. package/dist/types/modules/core/implementations/Functions/addCase.d.ts +4 -0
  55. package/dist/types/modules/core/implementations/Functions/addTask.d.ts +4 -0
  56. package/dist/types/modules/core/implementations/Functions/approve.d.ts +6 -0
  57. package/dist/types/modules/core/implementations/Functions/compare.d.ts +15 -0
  58. package/dist/types/modules/core/implementations/Functions/compareTask.d.ts +3 -0
  59. package/dist/types/modules/core/implementations/Functions/compareTasks.d.ts +5 -0
  60. package/dist/types/modules/core/implementations/Functions/deleteBaselineFile.d.ts +4 -0
  61. package/dist/types/modules/core/implementations/Functions/finishTask.d.ts +4 -0
  62. package/dist/types/modules/core/implementations/Functions/getBaseline.d.ts +4 -0
  63. package/dist/types/modules/core/implementations/Functions/getBaselineChanges.d.ts +4 -0
  64. package/dist/types/modules/core/implementations/Functions/getGitChanges.d.ts +3 -0
  65. package/dist/types/modules/core/implementations/Functions/getGitDiff.d.ts +3 -0
  66. package/dist/types/modules/core/implementations/Functions/getTaskCase.d.ts +5 -0
  67. package/dist/types/modules/core/implementations/Functions/getTaskTree.d.ts +5 -0
  68. package/dist/types/modules/core/implementations/Functions/listBaselines.d.ts +3 -0
  69. package/dist/types/modules/core/implementations/Functions/listTaskSummaries.d.ts +2 -0
  70. package/dist/types/modules/core/implementations/Functions/listTasks.d.ts +4 -0
  71. package/dist/types/modules/core/implementations/Functions/loadConfig.d.ts +3 -0
  72. package/dist/types/modules/core/implementations/Functions/readProjectInfo.d.ts +3 -0
  73. package/dist/types/modules/core/implementations/Functions/readTaskReport.d.ts +3 -0
  74. package/dist/types/modules/core/implementations/Functions/resolveConfig.d.ts +9 -0
  75. package/dist/types/modules/core/implementations/Functions/reviewBaselineChanges.d.ts +4 -0
  76. package/dist/types/modules/core/implementations/Functions/reviewCodeChanges.d.ts +4 -0
  77. package/dist/types/modules/core/implementations/Functions/taskRecords.d.ts +4 -0
  78. package/dist/types/modules/core/implementations/Functions/updateBaseline.d.ts +5 -0
  79. package/dist/types/modules/core/implementations/Utils/assertNamespace.d.ts +1 -0
  80. package/dist/types/modules/core/implementations/Utils/canonical.d.ts +1 -0
  81. package/dist/types/modules/core/implementations/Utils/createTaskId.d.ts +1 -0
  82. package/dist/types/modules/core/implementations/Utils/deletionAllowed.d.ts +2 -0
  83. package/dist/types/modules/core/implementations/Utils/download.d.ts +3 -0
  84. package/dist/types/modules/core/implementations/Utils/hash.d.ts +1 -0
  85. package/dist/types/modules/core/implementations/Utils/imageDiffPool.d.ts +18 -0
  86. package/dist/types/modules/core/implementations/Utils/imageKey.d.ts +1 -0
  87. package/dist/types/modules/core/implementations/Utils/loadBaseline.d.ts +4 -0
  88. package/dist/types/modules/core/implementations/Utils/mapLimit.d.ts +1 -0
  89. package/dist/types/modules/core/implementations/Utils/observationKey.d.ts +1 -0
  90. package/dist/types/modules/core/implementations/Utils/pngSize.d.ts +4 -0
  91. package/dist/types/modules/core/implementations/Utils/readJson.d.ts +1 -0
  92. package/dist/types/modules/core/implementations/Utils/readTaskRecord.d.ts +2 -0
  93. package/dist/types/modules/core/implementations/Utils/scanCases.d.ts +9 -0
  94. package/dist/types/modules/core/implementations/Utils/taskDirectory.d.ts +1 -0
  95. package/dist/types/modules/core/implementations/Utils/toCase.d.ts +3 -0
  96. package/dist/types/modules/core/implementations/Utils/toObservation.d.ts +3 -0
  97. package/dist/types/modules/core/implementations/Utils/toSnapshot.d.ts +3 -0
  98. package/dist/types/modules/core/implementations/Utils/writeBytesAtomic.d.ts +1 -0
  99. package/dist/types/modules/core/implementations/Utils/writeJsonAtomic.d.ts +1 -0
  100. package/dist/types/modules/core/implementations/Utils/writeTextAtomic.d.ts +1 -0
  101. package/dist/types/modules/core/implementations/baselineChanges.d.ts +6 -0
  102. package/dist/types/modules/core/implementations/config.d.ts +6 -0
  103. package/dist/types/modules/core/implementations/content.d.ts +1 -0
  104. package/dist/types/modules/core/implementations/evidra.d.ts +31 -0
  105. package/dist/types/modules/core/implementations/git.d.ts +11 -0
  106. package/dist/types/modules/core/implementations/gitChanges.d.ts +29 -0
  107. package/dist/types/modules/core/implementations/index.d.ts +17 -0
  108. package/dist/types/modules/core/implementations/internal/compare.d.ts +15 -0
  109. package/dist/types/modules/core/implementations/internal/getBaseline.d.ts +4 -0
  110. package/dist/types/modules/core/implementations/internal/listTasks.d.ts +2 -0
  111. package/dist/types/modules/core/implementations/internal/taskRecords.d.ts +4 -0
  112. package/dist/types/modules/core/implementations/internal/updateBaseline.d.ts +5 -0
  113. package/dist/types/modules/core/implementations/paths.d.ts +48 -0
  114. package/dist/types/modules/core/implementations/report.d.ts +3 -0
  115. package/dist/types/modules/core/implementations/reportResources.d.ts +4 -0
  116. package/dist/types/modules/core/implementations/reportStatus.d.ts +10 -0
  117. package/dist/types/modules/core/implementations/reportTree.d.ts +5 -0
  118. package/dist/types/modules/core/implementations/repository.d.ts +10 -0
  119. package/dist/types/modules/core/implementations/requests.d.ts +13 -0
  120. package/dist/types/modules/core/implementations/snapshots.d.ts +11 -0
  121. package/dist/types/modules/core/implementations/storage/local.d.ts +3 -0
  122. package/dist/types/modules/core/implementations/storage/objects.d.ts +3 -0
  123. package/dist/types/modules/core/index.d.ts +21 -0
  124. package/dist/types/packages/sdk/src/index.d.ts +21 -0
  125. package/dist/types/packages/sdk/src/types.d.ts +9 -0
  126. package/dist/web/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
  127. package/dist/web/assets/abap-08VXUWAP.js +1 -0
  128. package/dist/web/assets/apex-BWPQTe0t.js +1 -0
  129. package/dist/web/assets/azcli-Bc_sGQ0U.js +1 -0
  130. package/dist/web/assets/bat-i0X4ZdIN.js +1 -0
  131. package/dist/web/assets/bicep-B5-_aFwp.js +2 -0
  132. package/dist/web/assets/cameligo-DMUM7wLl.js +1 -0
  133. package/dist/web/assets/clojure-Cm7r79vr.js +1 -0
  134. package/dist/web/assets/codicon-DF1abBS2.ttf +0 -0
  135. package/dist/web/assets/coffee-Ba7i2nA0.js +1 -0
  136. package/dist/web/assets/cpp-C7h46wYY.js +1 -0
  137. package/dist/web/assets/csharp-BKxtCVv1.js +1 -0
  138. package/dist/web/assets/csp-bTuwJoIa.js +1 -0
  139. package/dist/web/assets/css-DIMkf-bt.js +3 -0
  140. package/dist/web/assets/css.worker-DwfUZ3fB.js +96 -0
  141. package/dist/web/assets/cssMode-C0YhK9yk.js +1 -0
  142. package/dist/web/assets/cypher-CVaqCwHa.js +1 -0
  143. package/dist/web/assets/dart-onAF5SnQ.js +1 -0
  144. package/dist/web/assets/dockerfile-DZFCIeNp.js +1 -0
  145. package/dist/web/assets/ecl-94qehhXe.js +1 -0
  146. package/dist/web/assets/editor-DjpsE8to.css +1 -0
  147. package/dist/web/assets/editor.api-CMNmRHg7.js +908 -0
  148. package/dist/web/assets/editor.worker-CRz__AKW.js +33 -0
  149. package/dist/web/assets/elixir-6RTg0lbw.js +1 -0
  150. package/dist/web/assets/flow9-C5_-GSwl.js +1 -0
  151. package/dist/web/assets/freemarker2-BPF-_qAr.js +3 -0
  152. package/dist/web/assets/fsharp-C8Ef5oNN.js +1 -0
  153. package/dist/web/assets/go-C-y9NEjX.js +1 -0
  154. package/dist/web/assets/graphql-fmXr3nnJ.js +1 -0
  155. package/dist/web/assets/handlebars-ZZYTfRBR.js +1 -0
  156. package/dist/web/assets/hcl-CpzslTdj.js +1 -0
  157. package/dist/web/assets/html-Dgtv0wV7.js +1 -0
  158. package/dist/web/assets/html.worker-D9ugpX4y.js +509 -0
  159. package/dist/web/assets/htmlMode-CE3TDKC3.js +1 -0
  160. package/dist/web/assets/index-D_0ZWPum.js +37 -0
  161. package/dist/web/assets/index-U9oKSlEO.css +2 -0
  162. package/dist/web/assets/ini-sBoK_t0W.js +1 -0
  163. package/dist/web/assets/java-BEtHBSE6.js +1 -0
  164. package/dist/web/assets/javascript-v3U6PHk8.js +1 -0
  165. package/dist/web/assets/json.worker-CV9fqkUp.js +65 -0
  166. package/dist/web/assets/jsonMode-CRbfEt8i.js +7 -0
  167. package/dist/web/assets/julia-Bri6UV-V.js +1 -0
  168. package/dist/web/assets/kotlin-BOotOW0E.js +1 -0
  169. package/dist/web/assets/less-B9JPFI3C.js +2 -0
  170. package/dist/web/assets/lexon-CfSJPG6W.js +1 -0
  171. package/dist/web/assets/liquid-D_mEV4oV.js +1 -0
  172. package/dist/web/assets/lspLanguageFeatures-DX6MhoAE.js +4 -0
  173. package/dist/web/assets/lua-CsQS60Ue.js +1 -0
  174. package/dist/web/assets/m3-D-oSqn_W.js +1 -0
  175. package/dist/web/assets/markdown-Cimd5fb3.js +1 -0
  176. package/dist/web/assets/mdx-BhVFxchM.js +1 -0
  177. package/dist/web/assets/mips-CIPQ_RoX.js +1 -0
  178. package/dist/web/assets/monaco-C2bEmNwl.js +58 -0
  179. package/dist/web/assets/monaco-n7clI0si.css +1 -0
  180. package/dist/web/assets/msdax-DauUninz.js +1 -0
  181. package/dist/web/assets/mysql-SOo6toE5.js +1 -0
  182. package/dist/web/assets/objective-c-FvmIjYaQ.js +1 -0
  183. package/dist/web/assets/pascal-DrH0SRf2.js +1 -0
  184. package/dist/web/assets/pascaligo-D-ptJ9y-.js +1 -0
  185. package/dist/web/assets/perl-oz_6vUea.js +1 -0
  186. package/dist/web/assets/pgsql-DTj74zXo.js +1 -0
  187. package/dist/web/assets/php-nr791fC2.js +1 -0
  188. package/dist/web/assets/pla-CopQ2nXW.js +1 -0
  189. package/dist/web/assets/postiats-43DmfD33.js +1 -0
  190. package/dist/web/assets/powerquery-D3hlyOfw.js +1 -0
  191. package/dist/web/assets/powershell-DmHpPYUd.js +1 -0
  192. package/dist/web/assets/protobuf-C531GsRP.js +2 -0
  193. package/dist/web/assets/pug-Z5eAx3Zn.js +1 -0
  194. package/dist/web/assets/python-BWAEzptE.js +1 -0
  195. package/dist/web/assets/qsharp-DkqhCAOL.js +1 -0
  196. package/dist/web/assets/r-BwWrilGY.js +1 -0
  197. package/dist/web/assets/razor-fGgHB_D8.js +1 -0
  198. package/dist/web/assets/redis-ClamHrr6.js +1 -0
  199. package/dist/web/assets/redshift-DT7zqm-g.js +1 -0
  200. package/dist/web/assets/restructuredtext-BYgofb2h.js +1 -0
  201. package/dist/web/assets/ruby-DezsRK8O.js +1 -0
  202. package/dist/web/assets/rust-DdL9SqIa.js +1 -0
  203. package/dist/web/assets/sb-CcwsVR0C.js +1 -0
  204. package/dist/web/assets/scala-DHpiXF5c.js +1 -0
  205. package/dist/web/assets/scheme-BeGwcela.js +1 -0
  206. package/dist/web/assets/scss-gp-XZpBa.js +3 -0
  207. package/dist/web/assets/shell-CC2rA5mh.js +1 -0
  208. package/dist/web/assets/solidity-BEEn4gHE.js +1 -0
  209. package/dist/web/assets/sophia-CRfGWb83.js +1 -0
  210. package/dist/web/assets/sparql-D_Lu-MrJ.js +1 -0
  211. package/dist/web/assets/sql-NEE52Syq.js +1 -0
  212. package/dist/web/assets/st-DbInun42.js +1 -0
  213. package/dist/web/assets/swift-Bxkupp3x.js +1 -0
  214. package/dist/web/assets/systemverilog-Bz4Y3fRF.js +1 -0
  215. package/dist/web/assets/tcl-DISqw1ZD.js +1 -0
  216. package/dist/web/assets/ts.worker-DIAQkoB3.js +67741 -0
  217. package/dist/web/assets/tsMode-Dhqndf6Y.js +11 -0
  218. package/dist/web/assets/twig-De2hgUGE.js +1 -0
  219. package/dist/web/assets/typescript-BdctO1F-.js +1 -0
  220. package/dist/web/assets/typespec-B8J7ngcE.js +1 -0
  221. package/dist/web/assets/vb-DV3o63ZY.js +1 -0
  222. package/dist/web/assets/wgsl-DpFanUEy.js +298 -0
  223. package/dist/web/assets/workers-CL1LWpiD.js +1 -0
  224. package/dist/web/assets/xml-h8WCDUbN.js +1 -0
  225. package/dist/web/assets/yaml-Dh4FUWeU.js +1 -0
  226. package/dist/web/index.html +13 -0
  227. package/package.json +78 -4
  228. package/skills/evidra/SKILL.md +112 -0
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Temporary Holding Version
1
+ # Evidra
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Evidra 帮你将测试快照保存为基线,并在后续运行时自动与基线比较,让你直观地查看测试的变化。
package/bin/evidra.mjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ await import('../dist/service/cli.js');
@@ -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 {};