callman-mcp 0.3.0 → 0.5.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/CHANGELOG.md +38 -0
- package/README.md +29 -7
- package/dist/client/api.d.ts +83 -1
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +105 -0
- package/dist/client/api.js.map +1 -1
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js +46 -11
- package/dist/client/errors.js.map +1 -1
- package/dist/client/types.d.ts +231 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/domain/diagram/patch.d.ts +2 -2
- package/dist/domain/uiTest/compose.d.ts +55 -0
- package/dist/domain/uiTest/compose.d.ts.map +1 -0
- package/dist/domain/uiTest/compose.js +228 -0
- package/dist/domain/uiTest/compose.js.map +1 -0
- package/dist/domain/uiTest/summarize.d.ts +273 -0
- package/dist/domain/uiTest/summarize.d.ts.map +1 -0
- package/dist/domain/uiTest/summarize.js +145 -0
- package/dist/domain/uiTest/summarize.js.map +1 -0
- package/dist/lib/truncate.d.ts +1 -1
- package/dist/lib/truncate.d.ts.map +1 -1
- package/dist/lib/truncate.js.map +1 -1
- package/dist/resources/docs/overview.d.ts +1 -1
- package/dist/resources/docs/overview.d.ts.map +1 -1
- package/dist/resources/docs/overview.js +12 -3
- package/dist/resources/docs/overview.js.map +1 -1
- package/dist/resources/docs/uiTests.d.ts +2 -0
- package/dist/resources/docs/uiTests.d.ts.map +1 -0
- package/dist/resources/docs/uiTests.js +101 -0
- package/dist/resources/docs/uiTests.js.map +1 -0
- package/dist/resources/generated/aiPacks.d.ts +1 -1
- package/dist/resources/generated/aiPacks.js +2 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +13 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/catalog.d.ts +1 -1
- package/dist/tools/catalog.d.ts.map +1 -1
- package/dist/tools/catalog.js +31 -0
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/lookups.d.ts +19 -1
- package/dist/tools/lookups.d.ts.map +1 -1
- package/dist/tools/lookups.js +77 -0
- package/dist/tools/lookups.js.map +1 -1
- package/dist/tools/shared.d.ts +5 -0
- package/dist/tools/shared.d.ts.map +1 -1
- package/dist/tools/shared.js +10 -0
- package/dist/tools/shared.js.map +1 -1
- package/dist/tools/uiTestAdmin.d.ts +4 -0
- package/dist/tools/uiTestAdmin.d.ts.map +1 -0
- package/dist/tools/uiTestAdmin.js +509 -0
- package/dist/tools/uiTestAdmin.js.map +1 -0
- package/dist/tools/uiTestRuns.d.ts +24 -0
- package/dist/tools/uiTestRuns.d.ts.map +1 -0
- package/dist/tools/uiTestRuns.js +367 -0
- package/dist/tools/uiTestRuns.js.map +1 -0
- package/dist/tools/uiTestShared.d.ts +236 -0
- package/dist/tools/uiTestShared.d.ts.map +1 -0
- package/dist/tools/uiTestShared.js +187 -0
- package/dist/tools/uiTestShared.js.map +1 -0
- package/dist/tools/uiTests.d.ts +4 -0
- package/dist/tools/uiTests.d.ts.map +1 -0
- package/dist/tools/uiTests.js +572 -0
- package/dist/tools/uiTests.js.map +1 -0
- package/dist-cjs/client/api.js +105 -0
- package/dist-cjs/client/errors.js +46 -11
- package/dist-cjs/domain/uiTest/compose.js +242 -0
- package/dist-cjs/domain/uiTest/summarize.js +155 -0
- package/dist-cjs/resources/docs/overview.js +12 -3
- package/dist-cjs/resources/docs/uiTests.js +103 -0
- package/dist-cjs/resources/generated/aiPacks.js +2 -2
- package/dist-cjs/resources/index.js +11 -0
- package/dist-cjs/server.js +2 -2
- package/dist-cjs/tools/catalog.js +31 -0
- package/dist-cjs/tools/index.js +6 -0
- package/dist-cjs/tools/lookups.js +83 -1
- package/dist-cjs/tools/shared.js +12 -1
- package/dist-cjs/tools/uiTestAdmin.js +512 -0
- package/dist-cjs/tools/uiTestRuns.js +372 -0
- package/dist-cjs/tools/uiTestShared.js +202 -0
- package/dist-cjs/tools/uiTests.js +575 -0
- package/package.json +3 -3
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import type { UiTestFlow, UiTestResultRow, UiTestRunReport, UiTestSchedule } from "../../client/types.js";
|
|
2
|
+
export declare const flowSummaryView: (flow: UiTestFlow, folderPath?: string | null) => {
|
|
3
|
+
updatedAt: string | null;
|
|
4
|
+
group?: string | undefined;
|
|
5
|
+
activeVersionNumber?: number | undefined;
|
|
6
|
+
reviewStatus?: import("../../client/types.js").ScenarioReviewStatus | undefined;
|
|
7
|
+
folder: string | null;
|
|
8
|
+
tags: string[];
|
|
9
|
+
testType: string | null;
|
|
10
|
+
severity: string | null;
|
|
11
|
+
version: number | null;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
platform: import("../../client/types.js").UiTestPlatform;
|
|
16
|
+
};
|
|
17
|
+
export declare const maskedDatasetKeys: (dataset: Record<string, string> | undefined | null) => string[];
|
|
18
|
+
export declare const settingsView: (flow: UiTestFlow) => {
|
|
19
|
+
runSettings: import("callman-core").UiTestRunSettings;
|
|
20
|
+
browserKind: import("../../client/types.js").UiTestBrowserKind | null;
|
|
21
|
+
headless: boolean | null;
|
|
22
|
+
} | {
|
|
23
|
+
runSettings: import("callman-core").UiTestRunSettings;
|
|
24
|
+
dismissPopups: string[];
|
|
25
|
+
};
|
|
26
|
+
export declare const runReportView: (report: UiTestRunReport, options?: {
|
|
27
|
+
includeNetwork?: boolean;
|
|
28
|
+
allStepData?: boolean;
|
|
29
|
+
}) => {
|
|
30
|
+
fromApprovedSnapshot?: boolean | undefined;
|
|
31
|
+
flowVersionNumber?: number | null | undefined;
|
|
32
|
+
networkTruncated?: boolean | undefined;
|
|
33
|
+
network: string | null;
|
|
34
|
+
screenshots: {
|
|
35
|
+
failure: boolean;
|
|
36
|
+
final: boolean;
|
|
37
|
+
};
|
|
38
|
+
warnings?: string[] | undefined;
|
|
39
|
+
datasetIssues?: string[] | undefined;
|
|
40
|
+
stepData?: {
|
|
41
|
+
dataTruncated?: boolean | undefined;
|
|
42
|
+
extracted?: string | null | undefined;
|
|
43
|
+
data?: string | null | undefined;
|
|
44
|
+
note?: string | undefined;
|
|
45
|
+
source?: string | undefined;
|
|
46
|
+
index: number;
|
|
47
|
+
command: string;
|
|
48
|
+
status: string;
|
|
49
|
+
error: string | null;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
failedSteps?: {
|
|
52
|
+
dataTruncated?: boolean | undefined;
|
|
53
|
+
extracted?: string | null | undefined;
|
|
54
|
+
data?: string | null | undefined;
|
|
55
|
+
note?: string | undefined;
|
|
56
|
+
source?: string | undefined;
|
|
57
|
+
index: number;
|
|
58
|
+
command: string;
|
|
59
|
+
status: string;
|
|
60
|
+
error: string | null;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
stepsTruncated?: number | undefined;
|
|
63
|
+
stepCounts: Record<string, number>;
|
|
64
|
+
steps: {
|
|
65
|
+
retries?: number | undefined;
|
|
66
|
+
healed?: string | undefined;
|
|
67
|
+
source?: string | undefined;
|
|
68
|
+
error?: string | undefined;
|
|
69
|
+
index: number;
|
|
70
|
+
command: string;
|
|
71
|
+
status: string;
|
|
72
|
+
durationMs: number | null;
|
|
73
|
+
}[];
|
|
74
|
+
error?: string | undefined;
|
|
75
|
+
startedAt: string | null;
|
|
76
|
+
finishedAt: string | null;
|
|
77
|
+
durationMs: number | null;
|
|
78
|
+
schedule?: string | undefined;
|
|
79
|
+
triggerType: string | null;
|
|
80
|
+
device?: string | null | undefined;
|
|
81
|
+
platform?: import("../../client/types.js").UiTestPlatform | undefined;
|
|
82
|
+
executor?: "server" | "desktop" | undefined;
|
|
83
|
+
reportId: string;
|
|
84
|
+
flow: {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
status: import("../../client/types.js").UiTestRunStatus;
|
|
89
|
+
} | {
|
|
90
|
+
fromApprovedSnapshot?: boolean | undefined;
|
|
91
|
+
flowVersionNumber?: number | null | undefined;
|
|
92
|
+
networkEvents: number | undefined;
|
|
93
|
+
screenshots: {
|
|
94
|
+
failure: boolean;
|
|
95
|
+
final: boolean;
|
|
96
|
+
};
|
|
97
|
+
warnings?: string[] | undefined;
|
|
98
|
+
datasetIssues?: string[] | undefined;
|
|
99
|
+
stepData?: {
|
|
100
|
+
dataTruncated?: boolean | undefined;
|
|
101
|
+
extracted?: string | null | undefined;
|
|
102
|
+
data?: string | null | undefined;
|
|
103
|
+
note?: string | undefined;
|
|
104
|
+
source?: string | undefined;
|
|
105
|
+
index: number;
|
|
106
|
+
command: string;
|
|
107
|
+
status: string;
|
|
108
|
+
error: string | null;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
failedSteps?: {
|
|
111
|
+
dataTruncated?: boolean | undefined;
|
|
112
|
+
extracted?: string | null | undefined;
|
|
113
|
+
data?: string | null | undefined;
|
|
114
|
+
note?: string | undefined;
|
|
115
|
+
source?: string | undefined;
|
|
116
|
+
index: number;
|
|
117
|
+
command: string;
|
|
118
|
+
status: string;
|
|
119
|
+
error: string | null;
|
|
120
|
+
}[] | undefined;
|
|
121
|
+
stepsTruncated?: number | undefined;
|
|
122
|
+
stepCounts: Record<string, number>;
|
|
123
|
+
steps: {
|
|
124
|
+
retries?: number | undefined;
|
|
125
|
+
healed?: string | undefined;
|
|
126
|
+
source?: string | undefined;
|
|
127
|
+
error?: string | undefined;
|
|
128
|
+
index: number;
|
|
129
|
+
command: string;
|
|
130
|
+
status: string;
|
|
131
|
+
durationMs: number | null;
|
|
132
|
+
}[];
|
|
133
|
+
error?: string | undefined;
|
|
134
|
+
startedAt: string | null;
|
|
135
|
+
finishedAt: string | null;
|
|
136
|
+
durationMs: number | null;
|
|
137
|
+
schedule?: string | undefined;
|
|
138
|
+
triggerType: string | null;
|
|
139
|
+
device?: string | null | undefined;
|
|
140
|
+
platform?: import("../../client/types.js").UiTestPlatform | undefined;
|
|
141
|
+
executor?: "server" | "desktop" | undefined;
|
|
142
|
+
reportId: string;
|
|
143
|
+
flow: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
};
|
|
147
|
+
status: import("../../client/types.js").UiTestRunStatus;
|
|
148
|
+
} | {
|
|
149
|
+
fromApprovedSnapshot?: boolean | undefined;
|
|
150
|
+
flowVersionNumber?: number | null | undefined;
|
|
151
|
+
screenshots: {
|
|
152
|
+
failure: boolean;
|
|
153
|
+
final: boolean;
|
|
154
|
+
};
|
|
155
|
+
warnings?: string[] | undefined;
|
|
156
|
+
datasetIssues?: string[] | undefined;
|
|
157
|
+
stepData?: {
|
|
158
|
+
dataTruncated?: boolean | undefined;
|
|
159
|
+
extracted?: string | null | undefined;
|
|
160
|
+
data?: string | null | undefined;
|
|
161
|
+
note?: string | undefined;
|
|
162
|
+
source?: string | undefined;
|
|
163
|
+
index: number;
|
|
164
|
+
command: string;
|
|
165
|
+
status: string;
|
|
166
|
+
error: string | null;
|
|
167
|
+
}[] | undefined;
|
|
168
|
+
failedSteps?: {
|
|
169
|
+
dataTruncated?: boolean | undefined;
|
|
170
|
+
extracted?: string | null | undefined;
|
|
171
|
+
data?: string | null | undefined;
|
|
172
|
+
note?: string | undefined;
|
|
173
|
+
source?: string | undefined;
|
|
174
|
+
index: number;
|
|
175
|
+
command: string;
|
|
176
|
+
status: string;
|
|
177
|
+
error: string | null;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
stepsTruncated?: number | undefined;
|
|
180
|
+
stepCounts: Record<string, number>;
|
|
181
|
+
steps: {
|
|
182
|
+
retries?: number | undefined;
|
|
183
|
+
healed?: string | undefined;
|
|
184
|
+
source?: string | undefined;
|
|
185
|
+
error?: string | undefined;
|
|
186
|
+
index: number;
|
|
187
|
+
command: string;
|
|
188
|
+
status: string;
|
|
189
|
+
durationMs: number | null;
|
|
190
|
+
}[];
|
|
191
|
+
error?: string | undefined;
|
|
192
|
+
startedAt: string | null;
|
|
193
|
+
finishedAt: string | null;
|
|
194
|
+
durationMs: number | null;
|
|
195
|
+
schedule?: string | undefined;
|
|
196
|
+
triggerType: string | null;
|
|
197
|
+
device?: string | null | undefined;
|
|
198
|
+
platform?: import("../../client/types.js").UiTestPlatform | undefined;
|
|
199
|
+
executor?: "server" | "desktop" | undefined;
|
|
200
|
+
reportId: string;
|
|
201
|
+
flow: {
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
};
|
|
205
|
+
status: import("../../client/types.js").UiTestRunStatus;
|
|
206
|
+
};
|
|
207
|
+
export declare const runListRow: (report: UiTestRunReport) => {
|
|
208
|
+
failedStep?: {
|
|
209
|
+
index: number;
|
|
210
|
+
command: string;
|
|
211
|
+
} | null | undefined;
|
|
212
|
+
error?: string | undefined;
|
|
213
|
+
triggerType: string | null;
|
|
214
|
+
startedAt: string | null;
|
|
215
|
+
durationMs: number | null;
|
|
216
|
+
executor?: "server" | "desktop" | undefined;
|
|
217
|
+
reportId: string;
|
|
218
|
+
flow: {
|
|
219
|
+
id: string;
|
|
220
|
+
name: string;
|
|
221
|
+
};
|
|
222
|
+
status: import("../../client/types.js").UiTestRunStatus;
|
|
223
|
+
};
|
|
224
|
+
export declare const historyRow: (row: UiTestResultRow) => {
|
|
225
|
+
reportId?: string | undefined;
|
|
226
|
+
error?: string | undefined;
|
|
227
|
+
startedAt: string | null;
|
|
228
|
+
durationMs: number | null;
|
|
229
|
+
device?: string | undefined;
|
|
230
|
+
flow: {
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
};
|
|
234
|
+
status: "failed" | "stopped" | "passed";
|
|
235
|
+
source: string;
|
|
236
|
+
platform: import("../../client/types.js").UiTestPlatform;
|
|
237
|
+
};
|
|
238
|
+
export declare const scheduleView: (schedule: UiTestSchedule) => {
|
|
239
|
+
isRunning?: boolean | undefined;
|
|
240
|
+
lastRunAt: string | null;
|
|
241
|
+
lastRunStatus: string | null;
|
|
242
|
+
nextRunAt: string | null;
|
|
243
|
+
notificationConfig?: Record<string, unknown> | undefined;
|
|
244
|
+
failurePolicy?: Record<string, unknown> | undefined;
|
|
245
|
+
executionPolicy?: Record<string, unknown> | undefined;
|
|
246
|
+
description?: string | undefined;
|
|
247
|
+
customCronExpression?: string | undefined;
|
|
248
|
+
monthlyConfig?: {
|
|
249
|
+
daysOfMonth: number[];
|
|
250
|
+
times: string[];
|
|
251
|
+
} | undefined;
|
|
252
|
+
weeklyConfig?: {
|
|
253
|
+
daysOfWeek: number[];
|
|
254
|
+
times: string[];
|
|
255
|
+
} | undefined;
|
|
256
|
+
dailyConfig?: {
|
|
257
|
+
times: string[];
|
|
258
|
+
} | undefined;
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
flow: {
|
|
262
|
+
id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
};
|
|
265
|
+
enabled: boolean;
|
|
266
|
+
triggerType: "daily" | "weekly" | "monthly" | "custom_cron";
|
|
267
|
+
timezone: string;
|
|
268
|
+
};
|
|
269
|
+
export declare const imageFromDataUrl: (dataUrl: string | null | undefined) => {
|
|
270
|
+
data: string;
|
|
271
|
+
mimeType: string;
|
|
272
|
+
} | null;
|
|
273
|
+
//# sourceMappingURL=summarize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarize.d.ts","sourceRoot":"","sources":["../../../src/domain/uiTest/summarize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAiB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAczH,eAAO,MAAM,eAAe,GAAI,MAAM,UAAU,EAAE,aAAa,MAAM,GAAG,IAAI;;;;;;;;;;;;;;CAc1E,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,KAAG,MAAM,EACH,CAAC;AAE3F,eAAO,MAAM,YAAY,GAAI,MAAM,UAAU;;;;;;;CAG3C,CAAC;AA6BH,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,EAAE,UAAS;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCvH,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,eAAe;;;;;;;;;;;;;;;;CAahD,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,KAAK,eAAe;;;;;;;;;;;;;CAU7C,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,UAAU,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBnD,CAAC;AAGH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAI1G,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { resolveRunSettings } from "callman-core";
|
|
2
|
+
import { isMasked } from "../../lib/mask.js";
|
|
3
|
+
import { clip, jsonPreview } from "../../lib/truncate.js";
|
|
4
|
+
// Compact UI-test views: a flow row, a run timeline with the failing steps
|
|
5
|
+
// expanded, schedule rows. Screenshots never go into structuredContent —
|
|
6
|
+
// they travel as MCP image blocks (tools/uiTestRuns) or as `has…` flags.
|
|
7
|
+
const time = (value) => {
|
|
8
|
+
if (value === null || value === undefined || value === "")
|
|
9
|
+
return null;
|
|
10
|
+
const date = typeof value === "number" ? new Date(value) : new Date(String(value));
|
|
11
|
+
return Number.isNaN(date.getTime()) ? String(value) : date.toISOString();
|
|
12
|
+
};
|
|
13
|
+
export const flowSummaryView = (flow, folderPath) => ({
|
|
14
|
+
id: flow.clientId,
|
|
15
|
+
name: flow.name,
|
|
16
|
+
platform: flow.platform,
|
|
17
|
+
...(flow.description ? { description: clip(flow.description, 300) } : {}),
|
|
18
|
+
folder: folderPath ?? null,
|
|
19
|
+
tags: flow.tags ?? [],
|
|
20
|
+
testType: flow.testType ?? null,
|
|
21
|
+
severity: flow.severity ?? null,
|
|
22
|
+
version: flow.version ?? null,
|
|
23
|
+
...(flow.reviewStatus ? { reviewStatus: flow.reviewStatus } : {}),
|
|
24
|
+
...(flow.activeVersionNumber ? { activeVersionNumber: flow.activeVersionNumber } : {}),
|
|
25
|
+
...(flow.groupName ? { group: flow.groupName } : {}),
|
|
26
|
+
updatedAt: time(flow.updatedAt),
|
|
27
|
+
});
|
|
28
|
+
export const maskedDatasetKeys = (dataset) => Object.entries(dataset ?? {}).filter(([, value]) => isMasked(value)).map(([key]) => key);
|
|
29
|
+
export const settingsView = (flow) => ({
|
|
30
|
+
...(flow.platform === "web" ? { browserKind: flow.browserKind ?? null, headless: flow.headless ?? null } : { dismissPopups: flow.dismissPopups ?? [] }),
|
|
31
|
+
runSettings: resolveRunSettings(flow.runSettings ?? null),
|
|
32
|
+
});
|
|
33
|
+
const MAX_STEP_ROWS = 300;
|
|
34
|
+
const stepRow = (step, index) => ({
|
|
35
|
+
index: index + 1,
|
|
36
|
+
command: clip(step.command ?? "", 160),
|
|
37
|
+
status: step.status,
|
|
38
|
+
durationMs: step.durationMs ?? null,
|
|
39
|
+
...(step.error ? { error: clip(step.error, 500) } : {}),
|
|
40
|
+
...(step.source ? { source: step.source } : {}),
|
|
41
|
+
...(step.healed ? { healed: clip(step.healed, 200) } : {}),
|
|
42
|
+
...(step.retries ? { retries: step.retries } : {}),
|
|
43
|
+
});
|
|
44
|
+
const failedStepDetail = (step, index) => ({
|
|
45
|
+
index: index + 1,
|
|
46
|
+
command: clip(step.command ?? "", 400),
|
|
47
|
+
status: step.status,
|
|
48
|
+
error: step.error ? clip(step.error, 4000) : null,
|
|
49
|
+
...(step.source ? { source: step.source } : {}),
|
|
50
|
+
...(step.note ? { note: clip(step.note, 500) } : {}),
|
|
51
|
+
...(step.data !== undefined && step.data !== null ? { data: jsonPreview(step.data, 3000) } : {}),
|
|
52
|
+
...(step.extracted ? { extracted: jsonPreview(step.extracted, 1500) } : {}),
|
|
53
|
+
...(step.dataTruncated ? { dataTruncated: true } : {}),
|
|
54
|
+
});
|
|
55
|
+
const isFailed = (status) => status === "failed" || status === "error";
|
|
56
|
+
export const runReportView = (report, options = {}) => {
|
|
57
|
+
const steps = report.steps ?? [];
|
|
58
|
+
const counts = steps.reduce((acc, step) => ((acc[step.status] = (acc[step.status] ?? 0) + 1), acc), {});
|
|
59
|
+
const failed = steps.map((step, index) => ({ step, index })).filter(({ step }) => isFailed(step.status));
|
|
60
|
+
const withData = options.allStepData ? steps.map((step, index) => ({ step, index })).filter(({ step }) => !isFailed(step.status) && (step.data != null || step.extracted)) : [];
|
|
61
|
+
return {
|
|
62
|
+
reportId: report.id,
|
|
63
|
+
flow: { id: report.flowClientId, name: report.flowName },
|
|
64
|
+
status: report.status,
|
|
65
|
+
...(report.executor ? { executor: report.executor } : {}),
|
|
66
|
+
...(report.platform ? { platform: report.platform } : {}),
|
|
67
|
+
...(report.relay?.deviceName || report.relay?.deviceId ? { device: report.relay.deviceName ?? report.relay.deviceId } : {}),
|
|
68
|
+
triggerType: report.triggerType ?? null,
|
|
69
|
+
...(report.scheduleName ? { schedule: report.scheduleName } : {}),
|
|
70
|
+
startedAt: time(report.startedAt),
|
|
71
|
+
finishedAt: time(report.finishedAt),
|
|
72
|
+
durationMs: report.durationMs ?? null,
|
|
73
|
+
...(report.error ? { error: clip(report.error, 4000) } : {}),
|
|
74
|
+
stepCounts: counts,
|
|
75
|
+
steps: steps.slice(0, MAX_STEP_ROWS).map(stepRow),
|
|
76
|
+
...(steps.length > MAX_STEP_ROWS ? { stepsTruncated: steps.length } : {}),
|
|
77
|
+
...(failed.length > 0 ? { failedSteps: failed.slice(0, 10).map(({ step, index }) => failedStepDetail(step, index)) } : {}),
|
|
78
|
+
...(withData.length > 0 ? { stepData: withData.slice(0, 30).map(({ step, index }) => failedStepDetail(step, index)) } : {}),
|
|
79
|
+
...(report.datasetIssues?.length ? { datasetIssues: report.datasetIssues } : {}),
|
|
80
|
+
...(report.warnings?.length ? { warnings: report.warnings } : {}),
|
|
81
|
+
screenshots: {
|
|
82
|
+
failure: Boolean(report.failureScreenshot ?? report.hasFailureScreenshot),
|
|
83
|
+
final: Boolean(report.finalScreenshot ?? report.hasFinalScreenshot),
|
|
84
|
+
},
|
|
85
|
+
...(options.includeNetwork
|
|
86
|
+
? { network: jsonPreview(report.network ?? [], 12_000), ...(report.networkTruncated ? { networkTruncated: true } : {}) }
|
|
87
|
+
: (report.network?.length ?? report.networkCount)
|
|
88
|
+
? { networkEvents: report.network?.length ?? report.networkCount }
|
|
89
|
+
: {}),
|
|
90
|
+
...(report.fromApprovedSnapshot ? { fromApprovedSnapshot: true, flowVersionNumber: report.flowVersionNumber ?? null } : {}),
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export const runListRow = (report) => ({
|
|
94
|
+
reportId: report.id,
|
|
95
|
+
flow: { id: report.flowClientId, name: report.flowName },
|
|
96
|
+
status: report.status,
|
|
97
|
+
...(report.executor ? { executor: report.executor } : {}),
|
|
98
|
+
triggerType: report.triggerType ?? null,
|
|
99
|
+
startedAt: time(report.startedAt),
|
|
100
|
+
durationMs: report.durationMs ?? null,
|
|
101
|
+
...(report.error ? { error: clip(report.error, 300) } : {}),
|
|
102
|
+
...(report.steps ? { failedStep: (() => {
|
|
103
|
+
const index = report.steps.findIndex((step) => isFailed(step.status));
|
|
104
|
+
return index >= 0 ? { index: index + 1, command: clip(report.steps[index].command, 160) } : null;
|
|
105
|
+
})() } : {}),
|
|
106
|
+
});
|
|
107
|
+
export const historyRow = (row) => ({
|
|
108
|
+
flow: { id: row.flowClientId, name: row.flowName },
|
|
109
|
+
status: row.status,
|
|
110
|
+
source: row.triggeredBy === "schedule" ? "schedule" : row.triggeredBy ? row.triggeredBy : "desktop",
|
|
111
|
+
platform: row.platform,
|
|
112
|
+
...(row.deviceId ? { device: row.deviceId } : {}),
|
|
113
|
+
startedAt: time(row.startedAt),
|
|
114
|
+
durationMs: row.durationMs,
|
|
115
|
+
...(row.error ? { error: clip(row.error, 300) } : {}),
|
|
116
|
+
...(row.reportId ? { reportId: row.reportId } : {}),
|
|
117
|
+
});
|
|
118
|
+
export const scheduleView = (schedule) => ({
|
|
119
|
+
id: schedule.id,
|
|
120
|
+
name: schedule.name,
|
|
121
|
+
flow: { id: schedule.flowClientId, name: schedule.flowName },
|
|
122
|
+
enabled: schedule.enabled,
|
|
123
|
+
triggerType: schedule.triggerType,
|
|
124
|
+
timezone: schedule.timezone,
|
|
125
|
+
...(schedule.dailyConfig ? { dailyConfig: schedule.dailyConfig } : {}),
|
|
126
|
+
...(schedule.weeklyConfig ? { weeklyConfig: schedule.weeklyConfig } : {}),
|
|
127
|
+
...(schedule.monthlyConfig ? { monthlyConfig: schedule.monthlyConfig } : {}),
|
|
128
|
+
...(schedule.customCronExpression ? { customCronExpression: schedule.customCronExpression } : {}),
|
|
129
|
+
...(schedule.description ? { description: schedule.description } : {}),
|
|
130
|
+
...(schedule.executionPolicy ? { executionPolicy: schedule.executionPolicy } : {}),
|
|
131
|
+
...(schedule.failurePolicy ? { failurePolicy: schedule.failurePolicy } : {}),
|
|
132
|
+
...(schedule.notificationConfig ? { notificationConfig: schedule.notificationConfig } : {}),
|
|
133
|
+
lastRunAt: time(schedule.lastRunAt),
|
|
134
|
+
lastRunStatus: schedule.lastRunStatus ?? null,
|
|
135
|
+
nextRunAt: time(schedule.nextRunAt),
|
|
136
|
+
...(schedule.isRunning ? { isRunning: true } : {}),
|
|
137
|
+
});
|
|
138
|
+
// `data:image/jpeg;base64,…` → an MCP image block.
|
|
139
|
+
export const imageFromDataUrl = (dataUrl) => {
|
|
140
|
+
if (!dataUrl)
|
|
141
|
+
return null;
|
|
142
|
+
const match = /^data:(image\/[a-z0-9.+-]+);base64,(.+)$/i.exec(dataUrl.trim());
|
|
143
|
+
return match ? { mimeType: match[1].toLowerCase(), data: match[2] } : null;
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=summarize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarize.js","sourceRoot":"","sources":["../../../src/domain/uiTest/summarize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE1D,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AAEzE,MAAM,IAAI,GAAG,CAAC,KAAc,EAAiB,EAAE;IAC7C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACnF,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAgB,EAAE,UAA0B,EAAE,EAAE,CA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
19
19
|
totalBytes: number;
|
|
20
20
|
}
|
|
21
21
|
export declare const clipBytes: (value: string, maxBytes: number) => Clipped;
|
|
22
|
-
export declare const jsonPreview: (value: unknown, max?:
|
|
22
|
+
export declare const jsonPreview: (value: unknown, max?: number) => string | null;
|
|
23
23
|
export declare const safeStringify: (value: unknown, space?: number) => string;
|
|
24
24
|
export declare const byteLength: (value: unknown) => number;
|
|
25
25
|
//# sourceMappingURL=truncate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../src/lib/truncate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;;;;;EAajB,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,KAAG,MACM,CAAC;AAEzD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,UAAU,MAAM,KAAG,OAM3D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../src/lib/truncate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;;;;;EAajB,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,KAAG,MACM,CAAC;AAEzD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,UAAU,MAAM,KAAG,OAM3D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,EAAE,MAAK,MAA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AAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,KAAc,EAAU,EAAE;IACtE,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAU,EAAE,CACnD,MAAM,CAAC,UAAU,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const OVERVIEW_DOC = "# Working with Callman through MCP\n\nCallman is an API client and test platform (collections of HTTP requests, environments,\nmulti-step test scenarios, system-design diagrams). This
|
|
1
|
+
export declare const OVERVIEW_DOC = "# Working with Callman through MCP\n\nCallman is an API client and test platform (collections of HTTP requests, environments,\nmulti-step API test scenarios, UI tests for web / Android / iOS, system-design diagrams). This\nserver exposes it to you through tools; everything you do goes to the same server the Callman desktop app uses, as the user\nwhose token is configured, limited to that token's permissions and the user's workspace role.\n\n## Start here\n1. `whoami` \u2014 proves the connection and tells you the workspaces, features and which tools\n this token can use.\n2. Look before you create: `list_collections` / `get_collection_tree` / `search_requests`.\n Creating a collection whose name exists is refused on purpose.\n3. Arguments are strict: a misspelled or unknown argument is an error that lists the valid\n ones \u2014 read it and retry; nothing is silently ignored.\n4. Names work as references everywhere an id does (collection, folder, request, environment,\n scenario, UI test, diagram, workspace). Ambiguous names come back as a candidate list \u2014 pick one.\n5. Preview big writes with `dryRun: true` (bulk create, imports, scenarios, diagrams).\n6. Deletions need `confirm: true` and an exact name or id. Ask the user unless they explicitly\n requested the deletion.\n\n## Workspaces\nThe token works in EVERY workspace the user belongs to (with their role in each):\n- Lists and searches (`list_collections`, `search_requests`, `list_environments`,\n `list_connections`, `list_scenarios`) cover all workspaces unless you pass `workspace`;\n every row says which workspace it is in.\n- A name (collection, request, environment) is looked up in the default workspace first, then\n in all others; a unique match anywhere is used and the result says where it was found. The\n same name in several workspaces comes back as candidates tagged with their workspace \u2014 pass\n `workspace` or the id.\n- Creating needs one target: `workspace`, or the collection it goes into, or the session\n default. `use_workspace` changes the default for the session (it never hides the others).\n- Environments, connections and global variables belong to one workspace: a request uses the\n ones of its own workspace.\n\n## Requests\n- Use `{{variable}}` for hosts and secrets (`{{baseUrl}}/users`) and put the values in an\n environment (`create_environment` / `set_environment_variables`). Use `:id` for path\n variables. See `callman://docs/request-schema`.\n- get_request returns a request in the same shape create/update take \u2014 read, change, send back.\n- Bodies: a JSON value, a raw string, or `{ mode: raw|formdata|urlencoded|json }`.\n- Database / Kafka / Redis steps and DB assertions are request fields; connections are\n referenced by id or name (`list_connections`).\n- Contract checks (field rules, data-driven rows) \u2014 `callman://docs/contracts`.\n- Scripts run in a sandbox with the `pm.*` API \u2014 `callman://docs/scripting/pm-api`.\n- `run_request` / `run_collection` execute on the user's machine with real variable values;\n you only get results and the names of variables scripts changed.\n\n## Secrets\nEnvironment values come back masked (`\u2022\u2022\u2022\u2022ab`) unless the token holds `environments:reveal`\nand you ask for `reveal: true`. Never write a masked environment value back \u2014 it is refused.\nRequest auth secrets and sensitive headers are masked the same way; sending a masked request\nsecret back UNCHANGED keeps the stored one, anything else masked is refused.\n\n## Scenarios\nMulti-step flows as a graph of typed nodes (request, condition, assertion, set-vars, poll,\ndb, kafka, script, wait, end \u2026). Read `callman://docs/scenario-nodes` before building one;\npartial node configs are merged over defaults. Runs happen on the server (`run_scenario`).\n\n## UI tests\nBrowser and mobile-app flows (YAML: header, `---`, steps) \u2014 the desktop app's UI Testing area.\nRead `callman://docs/ui-tests` first and `callman://docs/ui-test-steps` for every step. Flows are\nlinted before they are saved (`validate_ui_test`); edit steps by number with\n`patch_ui_test_steps`. Web flows run on the server runner when there is one; Android, iOS (and\nweb without a runner) run on the user's own Callman desktop app, which must be open with\n\"Let AI tools run UI tests on this computer\" on \u2014 `list_ui_test_devices` shows what is\navailable. Runs return per-step results; screenshots come back as images on request.\n\n## Diagrams\nSystem-design diagrams use a fixed component catalog \u2014 `callman://diagram/components`.\nBuild with `create_diagram` (auto layout), edit with `patch_diagram`, share with\n`share_diagram`. See `callman://docs/diagram-schema`.\n\n## After writing\nThe desktop app refreshes when the user switches back to it. Tell the user what you created\nand where (collection / folder names).\n";
|
|
2
2
|
//# sourceMappingURL=overview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,izJA2ExB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const OVERVIEW_DOC = `# Working with Callman through MCP
|
|
2
2
|
|
|
3
3
|
Callman is an API client and test platform (collections of HTTP requests, environments,
|
|
4
|
-
multi-step test scenarios, system-design diagrams). This
|
|
5
|
-
tools; everything you do goes to the same server the Callman desktop app uses, as the user
|
|
4
|
+
multi-step API test scenarios, UI tests for web / Android / iOS, system-design diagrams). This
|
|
5
|
+
server exposes it to you through tools; everything you do goes to the same server the Callman desktop app uses, as the user
|
|
6
6
|
whose token is configured, limited to that token's permissions and the user's workspace role.
|
|
7
7
|
|
|
8
8
|
## Start here
|
|
@@ -13,7 +13,7 @@ whose token is configured, limited to that token's permissions and the user's wo
|
|
|
13
13
|
3. Arguments are strict: a misspelled or unknown argument is an error that lists the valid
|
|
14
14
|
ones — read it and retry; nothing is silently ignored.
|
|
15
15
|
4. Names work as references everywhere an id does (collection, folder, request, environment,
|
|
16
|
-
scenario, diagram, workspace). Ambiguous names come back as a candidate list — pick one.
|
|
16
|
+
scenario, UI test, diagram, workspace). Ambiguous names come back as a candidate list — pick one.
|
|
17
17
|
5. Preview big writes with \`dryRun: true\` (bulk create, imports, scenarios, diagrams).
|
|
18
18
|
6. Deletions need \`confirm: true\` and an exact name or id. Ask the user unless they explicitly
|
|
19
19
|
requested the deletion.
|
|
@@ -56,6 +56,15 @@ Multi-step flows as a graph of typed nodes (request, condition, assertion, set-v
|
|
|
56
56
|
db, kafka, script, wait, end …). Read \`callman://docs/scenario-nodes\` before building one;
|
|
57
57
|
partial node configs are merged over defaults. Runs happen on the server (\`run_scenario\`).
|
|
58
58
|
|
|
59
|
+
## UI tests
|
|
60
|
+
Browser and mobile-app flows (YAML: header, \`---\`, steps) — the desktop app's UI Testing area.
|
|
61
|
+
Read \`callman://docs/ui-tests\` first and \`callman://docs/ui-test-steps\` for every step. Flows are
|
|
62
|
+
linted before they are saved (\`validate_ui_test\`); edit steps by number with
|
|
63
|
+
\`patch_ui_test_steps\`. Web flows run on the server runner when there is one; Android, iOS (and
|
|
64
|
+
web without a runner) run on the user's own Callman desktop app, which must be open with
|
|
65
|
+
"Let AI tools run UI tests on this computer" on — \`list_ui_test_devices\` shows what is
|
|
66
|
+
available. Runs return per-step results; screenshots come back as images on request.
|
|
67
|
+
|
|
59
68
|
## Diagrams
|
|
60
69
|
System-design diagrams use a fixed component catalog — \`callman://diagram/components\`.
|
|
61
70
|
Build with \`create_diagram\` (auto layout), edit with \`patch_diagram\`, share with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2E3B,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const UI_TESTS_DOC = "# UI tests in Callman\n\nUI tests drive a real web browser or a mobile app step by step \u2014 the same flows QA builds in\nthe desktop app's UI Testing area. Every step (`tapOn`, `inputText`, `assertVisible`,\n`dbQuery` \u2026) with its arguments is in `callman://docs/ui-test-steps`.\n\n## A flow\nA flow is YAML text: an optional **header**, a `---` line, then a **list of steps**.\n\n```yaml\nurl: https://shop.example.com # web: where the browser starts (mobile: appId: com.shop.app)\n---\n- runFlow: \"Login\" # precondition: another flow, by EXACT name\n- tapOn: \"Catalog\"\n- inputText:\n id: \"search\"\n text: \"{{product}}\" # dataset placeholder\n- assertVisible:\n text: \"{{product}}\"\n label: \"Search shows the product\"\n- dbQuery: # hybrid data step (runs between UI steps)\n connection: orders-db # a workspace connection, by name or id\n query: \"select status from orders where id = '{{orderId}}'\"\n expect:\n - field: \"rows[0].status\"\n op: equals\n value: \"PAID\"\n```\n\n- **Platforms**: `web` (Playwright), `android` and `ios` (the mobile engine in the desktop app).\n A flow has one platform; steps the platform cannot run are lint warnings.\n- **Header**: `url` (web) or `appId` (android/ios) is what matters; `env`, `tags`, `appActivity`,\n `deviceName`, `onFlowStart`/`onFlowComplete` are optional.\n- **Preconditions / sub-flows**: `- runFlow: \"Name\"` inlines another flow of the library by its\n exact name (recursively). The leading runFlow lines are the flow's *preconditions*\n (create_ui_test / update_ui_test `preconditions: [\"Login\"]`). Renaming a flow breaks callers \u2014\n update_ui_test lists them. Names are unique per workspace.\n- **Labels**: any mapping step may carry `label:` \u2014 its name in reports (patch op `setLabel`).\n\n## Data\n- **dataset**: key \u2192 value, used as `{{key}}` anywhere (header included). Values whose key looks\n secret (password, token, apiKey, pin, otp \u2026) come back masked (`\u2022\u2022\u2022\u2022ab`) unless the token holds\n `environments:reveal` and you pass `reveal: true`. Editing a flow without reveal is fine:\n stored secrets are kept as they are. Never type a masked value yourself \u2014 pass the real value\n to change a secret, or leave the key out.\n- **datasetSources**: `{ key: { connection, query, column? } }` \u2014 the value comes from a database\n query at run time (a database connection of the workspace).\n- **Extracted values**: `extract` / `copyTextFrom` / data steps save `{{vars}}` for later steps.\n- **Hybrid steps**: `dbQuery`, `apiCall`, `kafkaPublish`, `kafkaCheck`, `redisCheck`, `runScript`\n run outside the UI engine, in order. Connections are the workspace's (`list_connections`),\n referenced by name or id.\n\n## Settings\nPer flow: `browserKind` (chrome / firefox / webkit) and `headless` for web desktop runs;\n`dismissPopups` (texts auto-dismissed) for mobile; `runSettings` { screenshotOnSuccess,\nscreenshotOnFailure, autoRetryTransient, captureNetwork } \u2014 null = the shared default.\n\n## Where runs happen\n- **Server runner** (`target: \"server\"`): web flows only, when the installation runs one.\n Schedules always use it.\n- **Your desktop app** (`target: \"desktop\"`): the Callman desktop app on the user's computer runs\n the job \u2014 Android devices/emulators, iOS simulators/devices, local browsers. It must be open,\n signed in, with **Settings \u2192 AI tools \u2192 \"Let AI tools run UI tests on this computer\"** on.\n Desktop runs queue one at a time. `device`, `browserKind`, `headless` and a one-off\n `dataset` override apply here.\n- `target: \"auto\"` (default): web \u2192 server runner when available, otherwise the desktop.\n- `list_ui_test_devices` shows the server runner, the online desktop apps and their devices.\n `UI_TEST_DESKTOP_OFFLINE` means no desktop app of the user is online.\n\n## Reports\n`run_ui_test` / `get_ui_test_run` return per-step rows (command, status, duration, error, the\nsub-flow it came from), failing steps expanded with the data they returned (DB rows, API\nresponses, extracted vars), dataset issues and warnings. `includeScreenshots: true` adds the\nfailure / final screenshots as images; `includeNetwork: true` the captured API calls.\n`list_ui_test_runs` merges server reports with the history the desktop app recorded itself.\n\n## Schedules\nWeb flows only, on the server runner: daily / weekly / monthly at times (HH:mm) or a cron\nexpression, with retries and notifications. One call can schedule many flows. On-prem,\nschedules run the flow's APPROVED version.\n\n## Review (on-prem)\nEditing a flow makes it a draft. `submit_ui_test` sends it for review; an approver\n`review_ui_test` (approve / reject with a note). Each approval is a version\n(`list_ui_test_versions`, with a diff against the current content); `restore_ui_test_version`\nre-activates an older one. Cloud has no review workflow \u2014 flows run as saved.\n\n## Recommended workflow\n1. `list_ui_test_devices` \u2014 where can it run (server runner? desktop app + devices?).\n2. `list_ui_tests` \u2014 reuse existing flows (Login \u2026) as preconditions instead of copying steps.\n3. Read `callman://docs/ui-test-steps`, draft the steps, then `validate_ui_test` (content +\n platform) \u2014 or `create_ui_test` with `dryRun: true`.\n4. `create_ui_test` (lint errors refuse the save; warnings are reported).\n5. `run_ui_test` \u2192 read the failing steps; `get_ui_test_run includeScreenshots: true` when a\n picture helps.\n6. Fix with `patch_ui_test_steps` (insert / replace / remove / move / setLabel by step number\n from `get_ui_test`) and run again.\n7. Organise with folders (`create_ui_test_folder`, `move_ui_tests`), schedule web flows\n (`create_ui_test_schedule`), submit for approval on-prem.\n";
|
|
2
|
+
//# sourceMappingURL=uiTests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiTests.d.ts","sourceRoot":"","sources":["../../../src/resources/docs/uiTests.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,gzLAmGxB,CAAC"}
|