@hamsterbase/evidra 0.3.2 → 0.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.
Files changed (155) hide show
  1. package/dist/sdk/conformance-rules.js +38 -24
  2. package/dist/sdk/index.d.ts +1 -1
  3. package/dist/sdk/rules.d.ts +1 -1
  4. package/dist/sdk/types-DHfARqti.d.ts +15 -0
  5. package/dist/service/cli.js +93 -57
  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/{cssMode-BTAZgpQt.js → cssMode-CT7qaTm_.js} +1 -1
  127. package/dist/web/assets/{editor.api-CfnVkTAL.js → editor.api-CsVhWQDt.js} +1 -1
  128. package/dist/web/assets/{freemarker2-BV0isRRj.js → freemarker2-Biydhqq4.js} +1 -1
  129. package/dist/web/assets/{handlebars-CbLz4Wc3.js → handlebars-OLGn3O0q.js} +1 -1
  130. package/dist/web/assets/{html-D2xBZbJh.js → html-Cw5ATHyh.js} +1 -1
  131. package/dist/web/assets/{htmlMode-DwPRG6d4.js → htmlMode-BI1zICew.js} +1 -1
  132. package/dist/web/assets/index-C49ToWrK.js +2 -0
  133. package/dist/web/assets/{javascript-D-gNVUGD.js → javascript-BS1aYt5R.js} +1 -1
  134. package/dist/web/assets/{jsonMode-BMqe91Um.js → jsonMode-DCJhJggA.js} +1 -1
  135. package/dist/web/assets/{liquid-D6FHObSg.js → liquid-DoQa4FNY.js} +1 -1
  136. package/dist/web/assets/{lspLanguageFeatures-D6i7D2oO.js → lspLanguageFeatures-D9tA1yBW.js} +1 -1
  137. package/dist/web/assets/main-BO3J7gmH.css +2 -0
  138. package/dist/web/assets/main-Bpk1-JEL.css +1 -0
  139. package/dist/web/assets/main-DqSNHHTP.js +13 -0
  140. package/dist/web/assets/main-TbSjhXd2.js +18 -0
  141. package/dist/web/assets/{mdx-CGtrE9A8.js → mdx-CA3qWzFi.js} +1 -1
  142. package/dist/web/assets/{monaco-C3WraHAR.js → monaco-BtL7JKYj.js} +4 -4
  143. package/dist/web/assets/{python-B2ywaTtF.js → python-BrQiqC89.js} +1 -1
  144. package/dist/web/assets/{razor-zzTWj2fW.js → razor-08hjtCNT.js} +1 -1
  145. package/dist/web/assets/{tsMode-BrfjRJaR.js → tsMode-DC-2vqQt.js} +1 -1
  146. package/dist/web/assets/{typescript-xVM47PRQ.js → typescript-9DOCFqrz.js} +1 -1
  147. package/dist/web/assets/useDisplayPreference-B-z8NzSv.js +23 -0
  148. package/dist/web/assets/{workers-DEZ7PLe8.js → workers-BcFJUhLI.js} +1 -1
  149. package/dist/web/assets/{xml-kpizFTtc.js → xml-ZJo8Un2M.js} +1 -1
  150. package/dist/web/assets/{yaml-DDFZ3vPi.js → yaml-8EZC7v3K.js} +1 -1
  151. package/dist/web/index.html +1 -2
  152. package/package.json +6 -2
  153. package/dist/sdk/types-B6cBsknY.d.ts +0 -12
  154. package/dist/web/assets/index-CJuNTIx5.css +0 -2
  155. package/dist/web/assets/index-CqRUszBc.js +0 -35
@@ -0,0 +1,128 @@
1
+ import { z } from 'zod';
2
+ import type { Case } from '../model.js';
3
+ export declare const SnapshotInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ col: z.ZodOptional<z.ZodNumber>;
7
+ type: z.ZodLiteral<"text">;
8
+ body: z.ZodString;
9
+ language: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ id: z.ZodString;
12
+ name: z.ZodString;
13
+ col: z.ZodOptional<z.ZodNumber>;
14
+ type: z.ZodLiteral<"image">;
15
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
16
+ contentType: z.ZodLiteral<"image/png">;
17
+ maxDiffPixels: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>], "type">;
19
+ export type SnapshotInput = z.infer<typeof SnapshotInputSchema>;
20
+ export declare const ObservationInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
+ name: z.ZodString;
22
+ type: z.ZodLiteral<"text">;
23
+ body: z.ZodString;
24
+ language: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ name: z.ZodString;
27
+ type: z.ZodLiteral<"image">;
28
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
29
+ contentType: z.ZodLiteral<"image/png">;
30
+ }, z.core.$strip>], "type">;
31
+ export type ObservationInput = z.infer<typeof ObservationInputSchema>;
32
+ export declare const CaseInputSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ name: z.ZodString;
35
+ treePath: z.ZodArray<z.ZodObject<{
36
+ key: z.ZodString;
37
+ display: z.ZodString;
38
+ }, z.core.$strip>>;
39
+ snapshots: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
40
+ id: z.ZodString;
41
+ name: z.ZodString;
42
+ col: z.ZodOptional<z.ZodNumber>;
43
+ type: z.ZodLiteral<"text">;
44
+ body: z.ZodString;
45
+ language: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ id: z.ZodString;
48
+ name: z.ZodString;
49
+ col: z.ZodOptional<z.ZodNumber>;
50
+ type: z.ZodLiteral<"image">;
51
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
52
+ contentType: z.ZodLiteral<"image/png">;
53
+ maxDiffPixels: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strip>], "type">>>;
55
+ result: z.ZodObject<{
56
+ status: z.ZodEnum<{
57
+ passed: "passed";
58
+ failed: "failed";
59
+ skipped: "skipped";
60
+ interrupted: "interrupted";
61
+ }>;
62
+ durationMs: z.ZodOptional<z.ZodNumber>;
63
+ errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
+ }, z.core.$strip>;
65
+ observations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
66
+ name: z.ZodString;
67
+ type: z.ZodLiteral<"text">;
68
+ body: z.ZodString;
69
+ language: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ name: z.ZodString;
72
+ type: z.ZodLiteral<"image">;
73
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
74
+ contentType: z.ZodLiteral<"image/png">;
75
+ }, z.core.$strip>], "type">>>;
76
+ }, z.core.$strip>;
77
+ export type CaseInput = z.infer<typeof CaseInputSchema>;
78
+ export declare const AddCaseInputSchema: z.ZodObject<{
79
+ repoRoot: z.ZodString;
80
+ taskId: z.ZodString;
81
+ case: z.ZodObject<{
82
+ id: z.ZodString;
83
+ name: z.ZodString;
84
+ treePath: z.ZodArray<z.ZodObject<{
85
+ key: z.ZodString;
86
+ display: z.ZodString;
87
+ }, z.core.$strip>>;
88
+ snapshots: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
89
+ id: z.ZodString;
90
+ name: z.ZodString;
91
+ col: z.ZodOptional<z.ZodNumber>;
92
+ type: z.ZodLiteral<"text">;
93
+ body: z.ZodString;
94
+ language: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ id: z.ZodString;
97
+ name: z.ZodString;
98
+ col: z.ZodOptional<z.ZodNumber>;
99
+ type: z.ZodLiteral<"image">;
100
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
101
+ contentType: z.ZodLiteral<"image/png">;
102
+ maxDiffPixels: z.ZodOptional<z.ZodNumber>;
103
+ }, z.core.$strip>], "type">>>;
104
+ result: z.ZodObject<{
105
+ status: z.ZodEnum<{
106
+ passed: "passed";
107
+ failed: "failed";
108
+ skipped: "skipped";
109
+ interrupted: "interrupted";
110
+ }>;
111
+ durationMs: z.ZodOptional<z.ZodNumber>;
112
+ errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ }, z.core.$strip>;
114
+ observations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ name: z.ZodString;
116
+ type: z.ZodLiteral<"text">;
117
+ body: z.ZodString;
118
+ language: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ name: z.ZodString;
121
+ type: z.ZodLiteral<"image">;
122
+ body: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
123
+ contentType: z.ZodLiteral<"image/png">;
124
+ }, z.core.$strip>], "type">>>;
125
+ }, z.core.$strip>;
126
+ }, z.core.$strip>;
127
+ export type AddCaseInput = z.infer<typeof AddCaseInputSchema>;
128
+ export type AddCaseOutput = Case;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import type { Task } from '../model.js';
3
+ export declare const AddTaskInputSchema: z.ZodObject<{
4
+ repoRoot: z.ZodString;
5
+ namespace: z.ZodString;
6
+ name: z.ZodString;
7
+ startedAt: z.ZodISODateTime;
8
+ coverage: z.ZodOptional<z.ZodEnum<{
9
+ partial: "partial";
10
+ complete: "complete";
11
+ }>>;
12
+ }, z.core.$strip>;
13
+ export type AddTaskInput = z.infer<typeof AddTaskInputSchema>;
14
+ export type AddTaskOutput = Task;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const ApproveInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ taskId: z.ZodString;
5
+ baselineVersion: z.ZodString;
6
+ caseIds: z.ZodArray<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ export type ApproveInput = z.infer<typeof ApproveInputSchema>;
@@ -0,0 +1,14 @@
1
+ import type { CaseDiff } from '../comparison.js';
2
+ export interface BaselineChange {
3
+ namespace: string;
4
+ namespaceName: string;
5
+ item: CaseDiff;
6
+ file: string;
7
+ }
8
+ export interface BaselineChanges {
9
+ ref: string;
10
+ sha: string;
11
+ version: string;
12
+ entries: BaselineChange[];
13
+ reviewed: string[];
14
+ }
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import type { Comparison } from '../comparison.js';
3
+ import type { ImageDiffResult } from '../imageDiffPool.js';
4
+ export declare const CompareInputSchema: z.ZodObject<{
5
+ taskId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type CompareInput = z.infer<typeof CompareInputSchema>;
8
+ export type CompareOutput = Comparison;
9
+ export interface CompareRecordOptions {
10
+ concurrency?: number;
11
+ pool?: {
12
+ compare(oldBytes: Uint8Array, newBytes: Uint8Array): Promise<ImageDiffResult>;
13
+ };
14
+ }
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const CompareTaskInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ taskId: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type CompareTaskInput = z.infer<typeof CompareTaskInputSchema>;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import type { ComparisonSummary } from '../comparison.js';
3
+ import type { TaskStatus } from '../model.js';
4
+ export declare const CompareTasksInputSchema: z.ZodObject<{
5
+ taskPaths: z.ZodArray<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type CompareTasksInput = z.infer<typeof CompareTasksInputSchema>;
8
+ export interface TaskComparisonSummary {
9
+ taskPath: string;
10
+ taskId: string;
11
+ namespace: string;
12
+ status: TaskStatus;
13
+ deletionAllowed: boolean;
14
+ summary: ComparisonSummary;
15
+ }
16
+ export interface CompareTasksOutput {
17
+ tasks: TaskComparisonSummary[];
18
+ }
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const DeleteBaselineFileInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ namespace: z.ZodString;
5
+ file: z.ZodString;
6
+ version: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export type DeleteBaselineFileInput = z.infer<typeof DeleteBaselineFileInputSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import type { Task } from '../model.js';
3
+ export declare const FinishTaskInputSchema: z.ZodObject<{
4
+ repoRoot: z.ZodString;
5
+ taskId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type FinishTaskInput = z.infer<typeof FinishTaskInputSchema>;
8
+ export type FinishTaskOutput = Task;
@@ -0,0 +1,10 @@
1
+ import type { BaselineCase } from '../model.js';
2
+ export interface GetBaselineOutput {
3
+ candidates: {
4
+ file: string;
5
+ ignored: boolean;
6
+ baseline: BaselineCase;
7
+ }[];
8
+ version: string;
9
+ cases: BaselineCase[];
10
+ }
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const GetBaselineChangesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ ref: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type GetBaselineChangesInput = z.infer<typeof GetBaselineChangesInputSchema>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const GetGitChangesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ ref: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type GetGitChangesInput = z.infer<typeof GetGitChangesInputSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const GetGitDiffInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ ref: z.ZodString;
5
+ file: z.ZodString;
6
+ version: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ export type GetGitDiffInput = z.infer<typeof GetGitDiffInputSchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import type { CaseDiff } from '../comparison.js';
3
+ export declare const GetTaskCaseInputSchema: z.ZodObject<{
4
+ taskPath: z.ZodString;
5
+ caseId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type GetTaskCaseInput = z.infer<typeof GetTaskCaseInputSchema>;
8
+ export interface TaskCaseObservation {
9
+ name: string;
10
+ type: 'text' | 'image';
11
+ text?: string;
12
+ key?: string;
13
+ contentType?: 'image/png';
14
+ width?: number;
15
+ height?: number;
16
+ }
17
+ export interface GetTaskCaseOutput {
18
+ taskPath: string;
19
+ diff: CaseDiff;
20
+ currentText: Record<string, string>;
21
+ baselineText: Record<string, string>;
22
+ observations: TaskCaseObservation[];
23
+ }
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import type { Change, ComparisonSummary } from '../comparison.js';
3
+ import type { Task } from '../model.js';
4
+ export declare const GetTaskTreeInputSchema: z.ZodObject<{
5
+ taskPath: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type GetTaskTreeInput = z.infer<typeof GetTaskTreeInputSchema>;
8
+ export interface TaskTreeNode {
9
+ key: string;
10
+ display: string;
11
+ change: Change | 'mixed';
12
+ counts: ComparisonSummary;
13
+ caseIds: string[];
14
+ children: TaskTreeNode[];
15
+ }
16
+ export interface GetTaskTreeOutput {
17
+ task: Task;
18
+ deletionAllowed: boolean;
19
+ summary: ComparisonSummary;
20
+ nodes: TaskTreeNode[];
21
+ }
@@ -0,0 +1,25 @@
1
+ export interface CodeChange {
2
+ path: string;
3
+ oldPath?: string;
4
+ status: 'added' | 'modified' | 'deleted' | 'renamed';
5
+ /** 审核键:路径、两侧内容和文件模式共同决定,内容变化后需要重新审核。 */
6
+ reviewKey: string;
7
+ }
8
+ export interface CodeChanges {
9
+ sha: string;
10
+ files: CodeChange[];
11
+ reviewed: string[];
12
+ }
13
+ export interface CodeDiff {
14
+ path: string;
15
+ oldPath?: string;
16
+ status: CodeChange['status'];
17
+ original: string;
18
+ modified: string;
19
+ isBinary: boolean;
20
+ tooLarge: boolean;
21
+ }
22
+ export interface CodeReviewInput {
23
+ path: string;
24
+ key: string;
25
+ }
@@ -0,0 +1,18 @@
1
+ export { AddCaseInputSchema, CaseInputSchema, ObservationInputSchema, SnapshotInputSchema, } from './addCase.js';
2
+ export type { AddCaseInput, AddCaseOutput, CaseInput, ObservationInput, SnapshotInput, } from './addCase.js';
3
+ export { AddTaskInputSchema } from './addTask.js';
4
+ export type { AddTaskInput, AddTaskOutput } from './addTask.js';
5
+ export type { BaselineChange, BaselineChanges } from './baselineChanges.js';
6
+ export { CompareInputSchema } from '../internal/compare.js';
7
+ export type { CompareInput, CompareOutput, CompareRecordOptions } from '../internal/compare.js';
8
+ export { FinishTaskInputSchema } from './finishTask.js';
9
+ export type { FinishTaskInput, FinishTaskOutput } from './finishTask.js';
10
+ export type { GetBaselineOutput } from '../internal/getBaseline.js';
11
+ export type { CodeChange, CodeChanges, CodeDiff, CodeReviewInput } from './gitChanges.js';
12
+ export { ListTasksInputSchema } from '../internal/listTasks.js';
13
+ export type { ListTasksInput, ListTasksOutput } from '../internal/listTasks.js';
14
+ export type { TaskRecordEntry } from '../internal/taskRecords.js';
15
+ export { UpdateBaselineInputSchema } from '../internal/updateBaseline.js';
16
+ export type { UpdateBaselineInput, UpdateBaselineOutput } from '../internal/updateBaseline.js';
17
+ export type { TaskSummaryItem } from './listTaskSummaries.js';
18
+ export type { TaskListItem } from '../internal/listTasks.js';
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const ListBaselinesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type ListBaselinesInput = z.infer<typeof ListBaselinesInputSchema>;
@@ -0,0 +1,7 @@
1
+ import type { Task } from '../model.js';
2
+ /** Cross-namespace task list; details and image comparisons are loaded separately. */
3
+ export interface RunListItem extends Pick<Task, 'id' | 'namespace' | 'name' | 'startedAt' | 'status' | 'finishedAt' | 'coverage' | 'caseCount'> {
4
+ failedCount: number;
5
+ cached: boolean;
6
+ counts: Record<string, number>;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const ListTaskSummariesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type ListTaskSummariesInput = z.infer<typeof ListTaskSummariesInputSchema>;
6
+ import type { TaskDisplay } from '../report.js';
7
+ import type { Task } from '../model.js';
8
+ /** Cross-namespace task list; details and image comparisons are loaded separately. */
9
+ export interface TaskSummaryItem extends Pick<Task, 'id' | 'namespace' | 'name' | 'startedAt' | 'status' | 'finishedAt' | 'coverage' | 'caseCount'> {
10
+ namespaceName: string;
11
+ display: TaskDisplay;
12
+ failedCount: number;
13
+ cached: boolean;
14
+ counts: Record<string, number>;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import type { Task } from '../model.js';
3
+ export declare const ListTasksInputSchema: z.ZodObject<{
4
+ namespace: z.ZodOptional<z.ZodString>;
5
+ cursor: z.ZodOptional<z.ZodString>;
6
+ limit: z.ZodOptional<z.ZodNumber>;
7
+ }, z.core.$strip>;
8
+ export type ListTasksInput = z.infer<typeof ListTasksInputSchema>;
9
+ export interface TaskListItem extends Task {
10
+ failedCount: number;
11
+ }
12
+ export interface ListTasksOutput {
13
+ tasks: TaskListItem[];
14
+ nextCursor?: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const LoadConfigInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type LoadConfigInput = z.infer<typeof LoadConfigInputSchema>;
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const ReadProjectInfoInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type ReadProjectInfoInput = z.infer<typeof ReadProjectInfoInputSchema>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const ReadTaskReportInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ taskId: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type ReadTaskReportInput = z.infer<typeof ReadTaskReportInputSchema>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const ResolveConfigInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ namespace: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export type ResolveConfigInput = z.infer<typeof ResolveConfigInputSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const ReviewBaselineChangesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ ref: z.ZodString;
5
+ version: z.ZodString;
6
+ items: z.ZodArray<z.ZodString>;
7
+ reviewed: z.ZodBoolean;
8
+ }, z.core.$strip>;
9
+ export type ReviewBaselineChangesInput = z.infer<typeof ReviewBaselineChangesInputSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const ReviewCodeChangesInputSchema: z.ZodObject<{
3
+ repoRoot: z.ZodString;
4
+ ref: z.ZodString;
5
+ version: z.ZodString;
6
+ items: z.ZodArray<z.ZodString>;
7
+ reviewed: z.ZodBoolean;
8
+ }, z.core.$strip>;
9
+ export type ReviewCodeChangesInput = z.infer<typeof ReviewCodeChangesInputSchema>;
@@ -0,0 +1,6 @@
1
+ import type { TaskRecord } from '../taskRecord.js';
2
+ export interface TaskRecordEntry {
3
+ /** 相对 tasks 根目录的路径。 */
4
+ taskPath: string;
5
+ record: TaskRecord;
6
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import type { CompareOutput } from './compare.js';
3
+ export declare const UpdateBaselineInputSchema: z.ZodObject<{
4
+ taskPath: z.ZodString;
5
+ baselineVersion: z.ZodOptional<z.ZodString>;
6
+ cases: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ baselineHash: z.ZodNullable<z.ZodString>;
9
+ }, z.core.$strip>>;
10
+ }, z.core.$strip>;
11
+ export type UpdateBaselineInput = z.infer<typeof UpdateBaselineInputSchema>;
12
+ export type UpdateBaselineOutput = {
13
+ conflict: false;
14
+ updatedCaseIds: string[];
15
+ deletedCaseIds: string[];
16
+ comparison: CompareOutput;
17
+ } | {
18
+ conflict: true;
19
+ comparison: CompareOutput;
20
+ };
@@ -0,0 +1,14 @@
1
+ export interface ProjectRef {
2
+ name: string;
3
+ sha: string;
4
+ shortSha: string;
5
+ }
6
+ export interface ProjectInfo {
7
+ repoRoot: string;
8
+ isGitRepo: boolean;
9
+ branch: string | null;
10
+ detached: boolean;
11
+ headSha: string | null;
12
+ refs: ProjectRef[];
13
+ defaultRef: string | null;
14
+ }
@@ -0,0 +1,5 @@
1
+ export interface ImageDiffResult {
2
+ diffPixels?: number;
3
+ png?: Uint8Array;
4
+ dimensionMismatch?: boolean;
5
+ }
@@ -0,0 +1,30 @@
1
+ export { AddCaseInputSchema, CaseInputSchema, ObservationInputSchema, SnapshotInputSchema, } from './functions/index.js';
2
+ export type { AddCaseInput, AddCaseOutput, CaseInput, ObservationInput, SnapshotInput, } from './functions/index.js';
3
+ export { AddTaskInputSchema } from './functions/index.js';
4
+ export type { AddTaskInput, AddTaskOutput } from './functions/index.js';
5
+ export type { BaselineChange, BaselineChanges } from './functions/index.js';
6
+ export { CompareInputSchema } from './functions/index.js';
7
+ export type { CompareInput, CompareOutput, CompareRecordOptions } from './functions/index.js';
8
+ export type { CaseDiff, Change, Comparison, ComparisonSummary, SnapshotDiff, } from './comparison.js';
9
+ export { ConfigSchema, NamespaceSchema } from './config.js';
10
+ export type { Config } from './config.js';
11
+ export type { FileStorage } from './context.js';
12
+ export { FinishTaskInputSchema } from './functions/index.js';
13
+ export type { FinishTaskInput, FinishTaskOutput } from './functions/index.js';
14
+ export type { GetBaselineOutput } from './functions/index.js';
15
+ export type { ProjectInfo, ProjectRef } from './git.js';
16
+ export type { CodeChange, CodeChanges, CodeDiff, CodeReviewInput } from './functions/index.js';
17
+ export type { ImageDiffResult } from './imageDiffPool.js';
18
+ export { ListTasksInputSchema } from './functions/index.js';
19
+ export type { ListTasksInput, ListTasksOutput } from './functions/index.js';
20
+ export type { BaselineCase, Case, CaseResult, CaseStatus, Coverage, Key, Namespace, Observation, Snapshot, Task, TaskStatus, TreeSegment, } from './model.js';
21
+ export type { TaskDetail } from './repository.js';
22
+ export { ScanCasesInputSchema } from './scanCases.js';
23
+ export type { CaseFile, ScanCasesInput, ScanCasesOutput } from './scanCases.js';
24
+ export { ColSchema, DateTimeSchema, IdSchema, NameSchema, TaskPathSchema } from './shared.js';
25
+ export type { Baseline } from './snapshots.js';
26
+ export type { BaselineEntry, BaselineState, CachedCaseDiff, CachedComparisonIndex, StoredCase, StoredImageObservation, StoredImageSnapshot, StoredObservation, StoredSnapshot, StoredTextObservation, StoredTextSnapshot, TaskRecord, } from './taskRecord.js';
27
+ export type { TaskRecordEntry } from './functions/index.js';
28
+ export { UpdateBaselineInputSchema } from './functions/index.js';
29
+ export type { UpdateBaselineInput, UpdateBaselineOutput } from './functions/index.js';
30
+ export type { TaskSummaryItem, TaskListItem } from './functions/index.js';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import type { Comparison } from '../comparison.js';
3
+ import type { ImageDiffResult } from '../imageDiffPool.js';
4
+ export declare const CompareInputSchema: z.ZodObject<{
5
+ taskId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type CompareInput = z.infer<typeof CompareInputSchema>;
8
+ export type CompareOutput = Comparison;
9
+ export interface CompareRecordOptions {
10
+ concurrency?: number;
11
+ pool?: {
12
+ compare(oldBytes: Uint8Array, newBytes: Uint8Array): Promise<ImageDiffResult>;
13
+ };
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { BaselineCase } from '../model.js';
2
+ export interface GetBaselineOutput {
3
+ candidates: {
4
+ file: string;
5
+ ignored: boolean;
6
+ baseline: BaselineCase;
7
+ }[];
8
+ version: string;
9
+ cases: BaselineCase[];
10
+ }
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import type { Task } from '../model.js';
3
+ export declare const ListTasksInputSchema: z.ZodObject<{
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ }, z.core.$strip>;
6
+ export type ListTasksInput = z.infer<typeof ListTasksInputSchema>;
7
+ export interface TaskListItem extends Task {
8
+ failedCount: number;
9
+ }
10
+ export interface ListTasksOutput {
11
+ tasks: TaskListItem[];
12
+ }
@@ -0,0 +1,6 @@
1
+ import type { TaskRecord } from '../taskRecord.js';
2
+ export interface TaskRecordEntry {
3
+ /** 相对 tasks 根目录的路径。 */
4
+ taskPath: string;
5
+ record: TaskRecord;
6
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import type { CompareOutput } from './compare.js';
3
+ export declare const UpdateBaselineInputSchema: z.ZodObject<{
4
+ taskPath: z.ZodString;
5
+ baselineVersion: z.ZodOptional<z.ZodString>;
6
+ cases: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ baselineHash: z.ZodNullable<z.ZodString>;
9
+ }, z.core.$strip>>;
10
+ }, z.core.$strip>;
11
+ export type UpdateBaselineInput = z.infer<typeof UpdateBaselineInputSchema>;
12
+ export type UpdateBaselineOutput = {
13
+ conflict: false;
14
+ updatedCaseIds: string[];
15
+ deletedCaseIds: string[];
16
+ comparison: CompareOutput;
17
+ } | {
18
+ conflict: true;
19
+ comparison: CompareOutput;
20
+ };