@copado/agentia-cli 0.112.0-alpha.0 → 0.113.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1965 -410
- package/dist/commands/testing/build/abort.d.ts +7 -1
- package/dist/commands/testing/build/abort.js +13 -3
- package/dist/commands/testing/build/abort.js.map +1 -1
- package/dist/commands/testing/build/get.d.ts +18 -0
- package/dist/commands/testing/build/get.js +38 -0
- package/dist/commands/testing/build/get.js.map +1 -0
- package/dist/commands/testing/build/latest.d.ts +12 -0
- package/dist/commands/testing/build/latest.js +40 -0
- package/dist/commands/testing/build/latest.js.map +1 -0
- package/dist/commands/testing/build/list.d.ts +6 -1
- package/dist/commands/testing/build/list.js +23 -1
- package/dist/commands/testing/build/list.js.map +1 -1
- package/dist/commands/testing/build/logs.d.ts +6 -0
- package/dist/commands/testing/build/logs.js +8 -1
- package/dist/commands/testing/build/logs.js.map +1 -1
- package/dist/commands/testing/build/run.d.ts +27 -4
- package/dist/commands/testing/build/run.js +4 -18
- package/dist/commands/testing/build/run.js.map +1 -1
- package/dist/commands/testing/build/search.d.ts +21 -0
- package/dist/commands/testing/build/search.js +57 -0
- package/dist/commands/testing/build/search.js.map +1 -0
- package/dist/commands/testing/create.d.ts +1 -15
- package/dist/commands/testing/create.js +1 -43
- package/dist/commands/testing/create.js.map +1 -1
- package/dist/commands/testing/data-table/create.d.ts +30 -0
- package/dist/commands/testing/data-table/create.js +52 -0
- package/dist/commands/testing/data-table/create.js.map +1 -0
- package/dist/commands/testing/data-table/delete.d.ts +25 -0
- package/dist/commands/testing/data-table/delete.js +40 -0
- package/dist/commands/testing/data-table/delete.js.map +1 -0
- package/dist/commands/testing/data-table/export.d.ts +33 -0
- package/dist/commands/testing/data-table/export.js +59 -0
- package/dist/commands/testing/data-table/export.js.map +1 -0
- package/dist/commands/testing/data-table/get.d.ts +21 -0
- package/dist/commands/testing/data-table/get.js +35 -0
- package/dist/commands/testing/data-table/get.js.map +1 -0
- package/dist/commands/testing/data-table/list.d.ts +16 -0
- package/dist/commands/testing/data-table/list.js +33 -0
- package/dist/commands/testing/data-table/list.js.map +1 -0
- package/dist/commands/testing/data-table/update.d.ts +34 -0
- package/dist/commands/testing/data-table/update.js +64 -0
- package/dist/commands/testing/data-table/update.js.map +1 -0
- package/dist/commands/testing/job/create.d.ts +18 -0
- package/dist/commands/testing/job/create.js +60 -4
- package/dist/commands/testing/job/create.js.map +1 -1
- package/dist/commands/testing/job/delete.d.ts +6 -1
- package/dist/commands/testing/job/delete.js +13 -3
- package/dist/commands/testing/job/delete.js.map +1 -1
- package/dist/commands/testing/job/refs.d.ts +17 -0
- package/dist/commands/testing/job/refs.js +30 -0
- package/dist/commands/testing/job/refs.js.map +1 -0
- package/dist/commands/testing/job/schedule/get.d.ts +23 -0
- package/dist/commands/testing/job/schedule/get.js +31 -0
- package/dist/commands/testing/job/schedule/get.js.map +1 -0
- package/dist/commands/testing/job/schedule/remove.d.ts +24 -0
- package/dist/commands/testing/job/schedule/remove.js +34 -0
- package/dist/commands/testing/job/schedule/remove.js.map +1 -0
- package/dist/commands/testing/job/schedule/set.d.ts +23 -0
- package/dist/commands/testing/job/schedule/set.js +39 -0
- package/dist/commands/testing/job/schedule/set.js.map +1 -0
- package/dist/commands/testing/job/update.d.ts +2 -0
- package/dist/commands/testing/job/update.js +7 -1
- package/dist/commands/testing/job/update.js.map +1 -1
- package/dist/commands/testing/job/upload.d.ts +6 -0
- package/dist/commands/testing/job/upload.js +22 -0
- package/dist/commands/testing/job/upload.js.map +1 -1
- package/dist/commands/testing/live/continue.d.ts +20 -0
- package/dist/commands/testing/live/continue.js +21 -0
- package/dist/commands/testing/live/continue.js.map +1 -0
- package/dist/commands/testing/live/execute.d.ts +30 -0
- package/dist/commands/testing/live/execute.js +43 -0
- package/dist/commands/testing/live/execute.js.map +1 -0
- package/dist/commands/testing/live/history.d.ts +23 -0
- package/dist/commands/testing/live/history.js +35 -0
- package/dist/commands/testing/live/history.js.map +1 -0
- package/dist/commands/testing/live/inspect.d.ts +18 -0
- package/dist/commands/testing/live/inspect.js +30 -0
- package/dist/commands/testing/live/inspect.js.map +1 -0
- package/dist/commands/testing/live/interrupt.d.ts +20 -0
- package/dist/commands/testing/live/interrupt.js +21 -0
- package/dist/commands/testing/live/interrupt.js.map +1 -0
- package/dist/commands/testing/live/recorder.d.ts +23 -0
- package/dist/commands/testing/live/recorder.js +134 -0
- package/dist/commands/testing/live/recorder.js.map +1 -0
- package/dist/commands/testing/live/reports.d.ts +20 -0
- package/dist/commands/testing/live/reports.js +31 -0
- package/dist/commands/testing/live/reports.js.map +1 -0
- package/dist/commands/testing/live/screenshot.d.ts +23 -0
- package/dist/commands/testing/live/screenshot.js +25 -0
- package/dist/commands/testing/live/screenshot.js.map +1 -0
- package/dist/commands/testing/live/set-options.d.ts +27 -0
- package/dist/commands/testing/live/set-options.js +28 -0
- package/dist/commands/testing/live/set-options.js.map +1 -0
- package/dist/commands/testing/live/start.d.ts +29 -0
- package/dist/commands/testing/live/start.js +53 -0
- package/dist/commands/testing/live/start.js.map +1 -0
- package/dist/commands/testing/live/status.d.ts +19 -0
- package/dist/commands/testing/live/status.js +27 -0
- package/dist/commands/testing/live/status.js.map +1 -0
- package/dist/commands/testing/live/stop.d.ts +24 -0
- package/dist/commands/testing/live/stop.js +38 -0
- package/dist/commands/testing/live/stop.js.map +1 -0
- package/dist/commands/testing/live/view.d.ts +16 -0
- package/dist/commands/testing/live/view.js +36 -0
- package/dist/commands/testing/live/view.js.map +1 -0
- package/dist/commands/testing/logs.d.ts +6 -0
- package/dist/commands/testing/logs.js +8 -1
- package/dist/commands/testing/logs.js.map +1 -1
- package/dist/commands/testing/project/create.d.ts +3 -0
- package/dist/commands/testing/project/create.js +17 -1
- package/dist/commands/testing/project/create.js.map +1 -1
- package/dist/commands/testing/project/delete.d.ts +7 -2
- package/dist/commands/testing/project/delete.js +15 -3
- package/dist/commands/testing/project/delete.js.map +1 -1
- package/dist/commands/testing/project/get.js +1 -1
- package/dist/commands/testing/project/get.js.map +1 -1
- package/dist/commands/testing/project/permission/get.d.ts +13 -0
- package/dist/commands/testing/project/permission/get.js +21 -0
- package/dist/commands/testing/project/permission/get.js.map +1 -0
- package/dist/commands/testing/project/permission/list.d.ts +13 -0
- package/dist/commands/testing/project/permission/list.js +21 -0
- package/dist/commands/testing/project/permission/list.js.map +1 -0
- package/dist/commands/testing/project/permission/set.d.ts +19 -0
- package/dist/commands/testing/project/permission/set.js +33 -0
- package/dist/commands/testing/project/permission/set.js.map +1 -0
- package/dist/commands/testing/project/permission/update.d.ts +19 -0
- package/dist/commands/testing/project/permission/update.js +33 -0
- package/dist/commands/testing/project/permission/update.js.map +1 -0
- package/dist/commands/testing/project/update.d.ts +14 -0
- package/dist/commands/testing/project/update.js +28 -0
- package/dist/commands/testing/project/update.js.map +1 -0
- package/dist/commands/testing/robot/create.d.ts +4 -1
- package/dist/commands/testing/robot/create.js +20 -5
- package/dist/commands/testing/robot/create.js.map +1 -1
- package/dist/commands/testing/robot/delete.d.ts +6 -1
- package/dist/commands/testing/robot/delete.js +13 -3
- package/dist/commands/testing/robot/delete.js.map +1 -1
- package/dist/commands/testing/robot/update.d.ts +19 -0
- package/dist/commands/testing/robot/update.js +49 -0
- package/dist/commands/testing/robot/update.js.map +1 -0
- package/dist/commands/testing/run.d.ts +27 -4
- package/dist/commands/testing/run.js +4 -11
- package/dist/commands/testing/run.js.map +1 -1
- package/dist/commands/testing/test/run.d.ts +27 -11
- package/dist/commands/testing/test/run.js +5 -37
- package/dist/commands/testing/test/run.js.map +1 -1
- package/dist/commands/testing/update.d.ts +6 -0
- package/dist/commands/testing/update.js +10 -0
- package/dist/commands/testing/update.js.map +1 -1
- package/dist/commands/testing/user-parameter/create.d.ts +19 -0
- package/dist/commands/testing/user-parameter/create.js +45 -0
- package/dist/commands/testing/user-parameter/create.js.map +1 -0
- package/dist/commands/testing/user-parameter/delete.d.ts +21 -0
- package/dist/commands/testing/user-parameter/delete.js +33 -0
- package/dist/commands/testing/user-parameter/delete.js.map +1 -0
- package/dist/commands/testing/user-parameter/get.d.ts +13 -0
- package/dist/commands/testing/user-parameter/get.js +21 -0
- package/dist/commands/testing/user-parameter/get.js.map +1 -0
- package/dist/commands/testing/user-parameter/list.d.ts +12 -0
- package/dist/commands/testing/user-parameter/list.js +23 -0
- package/dist/commands/testing/user-parameter/list.js.map +1 -0
- package/dist/commands/testing/user-parameter/update.d.ts +23 -0
- package/dist/commands/testing/user-parameter/update.js +45 -0
- package/dist/commands/testing/user-parameter/update.js.map +1 -0
- package/dist/commands/testing/variable/create.d.ts +6 -2
- package/dist/commands/testing/variable/create.js +14 -5
- package/dist/commands/testing/variable/create.js.map +1 -1
- package/dist/commands/testing/variable/delete.d.ts +6 -1
- package/dist/commands/testing/variable/delete.js +13 -3
- package/dist/commands/testing/variable/delete.js.map +1 -1
- package/dist/commands/testing/variable/get.d.ts +13 -0
- package/dist/commands/testing/variable/get.js +25 -0
- package/dist/commands/testing/variable/get.js.map +1 -0
- package/dist/commands/testing/variable/list.d.ts +4 -0
- package/dist/commands/testing/variable/list.js +15 -3
- package/dist/commands/testing/variable/list.js.map +1 -1
- package/dist/commands/testing/variable/update.d.ts +6 -2
- package/dist/commands/testing/variable/update.js +11 -5
- package/dist/commands/testing/variable/update.js.map +1 -1
- package/dist/lib/credential-store.d.ts +3 -0
- package/dist/lib/credential-store.js +16 -0
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/mcp/command-id.js +3 -0
- package/dist/lib/mcp/command-id.js.map +1 -1
- package/dist/lib/mcp/testing-live-tools.d.ts +126 -0
- package/dist/lib/mcp/testing-live-tools.js +215 -0
- package/dist/lib/mcp/testing-live-tools.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +455 -9
- package/dist/lib/mcp/testing-tools.js +677 -37
- package/dist/lib/mcp/testing-tools.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +551 -14
- package/dist/lib/testing-config.d.ts +3 -0
- package/dist/lib/testing-config.js +9 -0
- package/dist/lib/testing-config.js.map +1 -1
- package/dist/lib/testing-confirmation.d.ts +14 -0
- package/dist/lib/testing-confirmation.js +17 -0
- package/dist/lib/testing-confirmation.js.map +1 -0
- package/dist/lib/testing-data-command.d.ts +21 -0
- package/dist/lib/testing-data-command.js +49 -0
- package/dist/lib/testing-data-command.js.map +1 -0
- package/dist/lib/testing-data-core.d.ts +22 -0
- package/dist/lib/testing-data-core.js +208 -0
- package/dist/lib/testing-data-core.js.map +1 -0
- package/dist/lib/testing-data-export.d.ts +1 -0
- package/dist/lib/testing-data-export.js +2 -0
- package/dist/lib/testing-data-export.js.map +1 -0
- package/dist/lib/testing-data-import.d.ts +1 -0
- package/dist/lib/testing-data-import.js +2 -0
- package/dist/lib/testing-data-import.js.map +1 -0
- package/dist/lib/testing-data-io.d.ts +21 -0
- package/dist/lib/testing-data-io.js +236 -0
- package/dist/lib/testing-data-io.js.map +1 -0
- package/dist/lib/testing-data-operations.d.ts +36 -0
- package/dist/lib/testing-data-operations.js +91 -0
- package/dist/lib/testing-data-operations.js.map +1 -0
- package/dist/lib/testing-data-types.d.ts +41 -0
- package/dist/lib/testing-data-types.js +3 -0
- package/dist/lib/testing-data-types.js.map +1 -0
- package/dist/lib/testing-flags.d.ts +62 -1
- package/dist/lib/testing-flags.js +177 -1
- package/dist/lib/testing-flags.js.map +1 -1
- package/dist/lib/testing-gateway.d.ts +17 -3
- package/dist/lib/testing-gateway.js +175 -45
- package/dist/lib/testing-gateway.js.map +1 -1
- package/dist/lib/testing-live-command.d.ts +24 -0
- package/dist/lib/testing-live-command.js +56 -0
- package/dist/lib/testing-live-command.js.map +1 -0
- package/dist/lib/testing-live-endpoints.d.ts +14 -0
- package/dist/lib/testing-live-endpoints.js +34 -0
- package/dist/lib/testing-live-endpoints.js.map +1 -0
- package/dist/lib/testing-live-history.d.ts +11 -0
- package/dist/lib/testing-live-history.js +96 -0
- package/dist/lib/testing-live-history.js.map +1 -0
- package/dist/lib/testing-live-operations.d.ts +118 -0
- package/dist/lib/testing-live-operations.js +676 -0
- package/dist/lib/testing-live-operations.js.map +1 -0
- package/dist/lib/testing-live-recorder.d.ts +14 -0
- package/dist/lib/testing-live-recorder.js +122 -0
- package/dist/lib/testing-live-recorder.js.map +1 -0
- package/dist/lib/testing-live-robot.d.ts +16 -0
- package/dist/lib/testing-live-robot.js +158 -0
- package/dist/lib/testing-live-robot.js.map +1 -0
- package/dist/lib/testing-live-state.d.ts +4 -0
- package/dist/lib/testing-live-state.js +90 -0
- package/dist/lib/testing-live-state.js.map +1 -0
- package/dist/lib/testing-live-types.d.ts +92 -0
- package/dist/lib/testing-live-types.js +2 -0
- package/dist/lib/testing-live-types.js.map +1 -0
- package/dist/lib/testing-operations.d.ts +157 -5
- package/dist/lib/testing-operations.js +829 -66
- package/dist/lib/testing-operations.js.map +1 -1
- package/dist/lib/testing-run-command.d.ts +25 -0
- package/dist/lib/testing-run-command.js +94 -0
- package/dist/lib/testing-run-command.js.map +1 -0
- package/dist/lib/testing-sanitization.d.ts +11 -0
- package/dist/lib/testing-sanitization.js +135 -0
- package/dist/lib/testing-sanitization.js.map +1 -0
- package/dist/lib/testing-schedule.d.ts +23 -0
- package/dist/lib/testing-schedule.js +48 -0
- package/dist/lib/testing-schedule.js.map +1 -0
- package/dist/lib/testing-secret-input.d.ts +12 -0
- package/dist/lib/testing-secret-input.js +56 -0
- package/dist/lib/testing-secret-input.js.map +1 -0
- package/dist/lib/testing-session.d.ts +8 -0
- package/dist/lib/testing-session.js +82 -0
- package/dist/lib/testing-session.js.map +1 -0
- package/dist/lib/testing-types.d.ts +143 -13
- package/dist/lib/testing-types.js +110 -5
- package/dist/lib/testing-types.js.map +1 -1
- package/dist/lib/testing-watch.d.ts +4 -0
- package/dist/lib/testing-watch.js +45 -0
- package/dist/lib/testing-watch.js.map +1 -0
- package/oclif.manifest.json +8354 -3760
- package/package.json +12 -1
- package/templates/skills/agentia-testing/SKILL.md +9 -6
- package/templates/skills/agentia-testing/references/tests.md +70 -36
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/* eslint-disable unicorn/text-encoding-identifier-case -- CRT file APIs require the literal utf-8 enum. */
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { prepareTestingData, TESTING_DATA_MAX_CELL_BYTES, TESTING_DATA_MAX_COLUMNS, TESTING_DATA_MAX_ROWS, } from '../testing-data-core.js';
|
|
4
|
+
import { createTestingDataTable, deleteTestingDataTable, getTestingDataTable, listTestingDataTables, updateTestingDataTable, } from '../testing-data-operations.js';
|
|
5
|
+
import { abortTestingBuild, buildTestingGitStorageUpdate, countTestingBuilds, createTestingJob, createTestingProject, createTestingRobot, createTestingUserParameter, createTestingVariable, deleteTestingJob, deleteTestingProject, deleteTestingRobot, deleteTestingUserParameter, deleteTestingVariable, downloadTestingJobFiles, getTestingBuild, getTestingBuildLogs, getTestingJob, getTestingJobRefs, getTestingProject, getTestingProjectPermission, getTestingRobot, getTestingUserParameter, getTestingVariable, latestTestingBuilds, listTestingBuilds, listTestingJobFiles, listTestingJobs, listTestingProjectPermissions, listTestingProjects, listTestingRobots, listTestingUserParameters, listTestingVariables, normalizeTestingRemotePath, runTestingBuild, searchTestingBuilds, setTestingProjectPermission, updateTestingJob, updateTestingProject, updateTestingRobot, updateTestingUserParameter, updateTestingVariable, uploadTestingJobFiles, waitForTestingBuildResult, } from '../testing-operations.js';
|
|
6
|
+
import { sanitizeTestingOutput } from '../testing-sanitization.js';
|
|
7
|
+
import { getTestingJobSchedule, removeTestingJobSchedule, setTestingJobSchedule, } from '../testing-schedule.js';
|
|
8
|
+
import { normalizeTestingId, TESTING_BUILD_STATUSES, TESTING_CONSOLE_COLORS, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, TESTING_PROJECT_EXECUTORS, TESTING_PROJECT_TYPES, TESTING_RECORD_BUILD_OPTIONS, TESTING_ROBOT_REPORTING, TESTING_ROBOT_RUN_ENVIRONMENTS, TESTING_ROBOT_TYPES, TESTING_RUN_TYPES, TESTING_VARIABLE_TYPES, } from '../testing-types.js';
|
|
4
9
|
import { safelyHandleTool } from './result.js';
|
|
5
|
-
|
|
6
|
-
dir: z.array(z.string()).optional().describe('Directories containing Robot Framework files to upload.'),
|
|
7
|
-
file: z.array(z.string()).optional().describe('Robot Framework files to upload.'),
|
|
8
|
-
};
|
|
10
|
+
import { registerTestingLiveMcpTools, testingLiveMcpHandlers } from './testing-live-tools.js';
|
|
9
11
|
const gitStorageSchema = {
|
|
10
12
|
gitBranch: z.string().optional().describe('Git branch to use for a Git-backed CRT job.'),
|
|
11
13
|
gitDomainCredential: z.string().optional().describe('CRT domain credential ID for Git repository access.'),
|
|
@@ -15,11 +17,6 @@ const gitStorageSchema = {
|
|
|
15
17
|
gitUseCallerCredentials: z.boolean().optional().describe('Use caller credentials for Git repository access.'),
|
|
16
18
|
gitUsername: z.string().optional().describe('Git username for repository access. Prefer domain credentials.'),
|
|
17
19
|
};
|
|
18
|
-
const uploadOperationSchema = {
|
|
19
|
-
add: z.array(z.string()).optional().describe('Add file operations using local[:remote] syntax.'),
|
|
20
|
-
remove: z.array(z.string()).optional().describe('Remote file paths to remove.'),
|
|
21
|
-
replace: z.array(z.string()).optional().describe('Replace file operations using local[:remote] syntax.'),
|
|
22
|
-
};
|
|
23
20
|
function parseParameter(spec) {
|
|
24
21
|
const separator = spec.indexOf('=');
|
|
25
22
|
const key = separator === -1 ? spec.trim() : spec.slice(0, separator).trim();
|
|
@@ -37,27 +34,74 @@ function runOptions(args) {
|
|
|
37
34
|
}
|
|
38
35
|
return {
|
|
39
36
|
branch: args.branch,
|
|
37
|
+
consoleColors: args.consoleColors,
|
|
38
|
+
consoleWidth: args.consoleWidth,
|
|
39
|
+
dataTables: args.datatable,
|
|
40
|
+
doc: args.doc,
|
|
41
|
+
dryRun: args.dryRun,
|
|
40
42
|
exclude: args.exclude,
|
|
43
|
+
exitOnError: args.exitOnError,
|
|
44
|
+
exitOnFailure: args.exitOnFailure,
|
|
41
45
|
include: args.include,
|
|
42
46
|
jobId: args.job,
|
|
47
|
+
metadata: args.metadata,
|
|
48
|
+
name: args.name,
|
|
43
49
|
parameters: (args.param ?? []).map((param) => parseParameter(param)),
|
|
44
50
|
projectId: args.project,
|
|
45
51
|
record: args.record,
|
|
46
52
|
rerunFailedFromLatest: args.rerunFailedFromLatest === true ? true : undefined,
|
|
47
53
|
rerunFailedId: args.rerunFailed,
|
|
54
|
+
runEmptySuite: args.runEmptySuite,
|
|
55
|
+
runType: args.runType,
|
|
56
|
+
setTags: args.setTag,
|
|
57
|
+
skip: args.skip,
|
|
58
|
+
skipOnFailure: args.skipOnFailure,
|
|
59
|
+
suites: args.suite,
|
|
48
60
|
tag: args.tag,
|
|
61
|
+
tests: args.test,
|
|
62
|
+
variables: args.variable,
|
|
49
63
|
};
|
|
50
64
|
}
|
|
51
65
|
async function testingProjectList(args = {}) {
|
|
52
66
|
return { result: await listTestingProjects({ name: args.name }) };
|
|
53
67
|
}
|
|
54
68
|
async function testingProjectCreate(args) {
|
|
55
|
-
return {
|
|
69
|
+
return {
|
|
70
|
+
result: await createTestingProject({
|
|
71
|
+
dashboardId: args.dashboardId,
|
|
72
|
+
description: args.description,
|
|
73
|
+
name: args.name,
|
|
74
|
+
projectExecutor: args.executor,
|
|
75
|
+
projectType: args.type,
|
|
76
|
+
}),
|
|
77
|
+
};
|
|
56
78
|
}
|
|
57
79
|
async function testingProjectGet(args) {
|
|
58
80
|
return { result: await getTestingProject({ projectId: args.id }) };
|
|
59
81
|
}
|
|
82
|
+
async function testingProjectUpdate(args) {
|
|
83
|
+
return { result: await updateTestingProject({ description: args.description, name: args.name, projectId: args.id }) };
|
|
84
|
+
}
|
|
85
|
+
async function testingProjectPermissionList(args) {
|
|
86
|
+
return { result: await listTestingProjectPermissions({ projectId: args.project }) };
|
|
87
|
+
}
|
|
88
|
+
async function testingProjectPermissionGet(args) {
|
|
89
|
+
return { result: await getTestingProjectPermission({ projectId: args.project }) };
|
|
90
|
+
}
|
|
91
|
+
async function testingProjectPermissionSet(args) {
|
|
92
|
+
return {
|
|
93
|
+
result: await setTestingProjectPermission({
|
|
94
|
+
edit: args.edit,
|
|
95
|
+
groupId: args.group,
|
|
96
|
+
projectId: args.project,
|
|
97
|
+
userId: args.user,
|
|
98
|
+
view: args.view,
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
60
102
|
async function testingProjectDelete(args) {
|
|
103
|
+
if (args.confirm !== true)
|
|
104
|
+
throw new Error('Project deletion requires confirm: true.');
|
|
61
105
|
return { result: await deleteTestingProject({ projectId: args.id }) };
|
|
62
106
|
}
|
|
63
107
|
async function testingRobotList(args) {
|
|
@@ -67,17 +111,38 @@ async function testingRobotGet(args) {
|
|
|
67
111
|
return { result: await getTestingRobot({ projectId: args.project, robotId: args.id }) };
|
|
68
112
|
}
|
|
69
113
|
async function testingRobotDelete(args) {
|
|
114
|
+
if (args.confirm !== true)
|
|
115
|
+
throw new Error('Robot deletion requires confirm: true.');
|
|
70
116
|
return { result: await deleteTestingRobot({ projectId: args.project, robotId: args.id }) };
|
|
71
117
|
}
|
|
72
118
|
async function testingRobotCreate(args) {
|
|
119
|
+
if (args.kind !== undefined && args.runEnvironment !== undefined) {
|
|
120
|
+
throw new Error('Use either kind or runEnvironment, not both.');
|
|
121
|
+
}
|
|
73
122
|
return {
|
|
74
123
|
result: await createTestingRobot({
|
|
75
124
|
description: args.description,
|
|
76
125
|
fwVersion: args.fwVersion,
|
|
77
|
-
kind: args.kind,
|
|
126
|
+
kind: args.runEnvironment ?? args.kind,
|
|
127
|
+
label: args.label,
|
|
78
128
|
name: args.name,
|
|
79
129
|
os: args.os,
|
|
80
130
|
projectId: args.project,
|
|
131
|
+
reporting: args.reporting,
|
|
132
|
+
robotType: args.robotType,
|
|
133
|
+
}),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async function testingRobotUpdate(args) {
|
|
137
|
+
return {
|
|
138
|
+
result: await updateTestingRobot({
|
|
139
|
+
description: args.description,
|
|
140
|
+
fwVersion: args.fwVersion,
|
|
141
|
+
label: args.label,
|
|
142
|
+
name: args.name,
|
|
143
|
+
projectId: args.project,
|
|
144
|
+
reporting: args.reporting,
|
|
145
|
+
robotId: args.id,
|
|
81
146
|
robotType: args.robotType,
|
|
82
147
|
}),
|
|
83
148
|
};
|
|
@@ -127,13 +192,111 @@ async function testingJobUpdate(args) {
|
|
|
127
192
|
};
|
|
128
193
|
}
|
|
129
194
|
async function testingJobDelete(args) {
|
|
195
|
+
if (args.confirm !== true)
|
|
196
|
+
throw new Error('Job deletion requires confirm: true.');
|
|
130
197
|
return { result: await deleteTestingJob({ jobId: args.id, projectId: args.project }) };
|
|
131
198
|
}
|
|
199
|
+
async function testingJobScheduleGet(args) {
|
|
200
|
+
const schedule = await getTestingJobSchedule({ jobId: args.job, projectId: args.project });
|
|
201
|
+
return { result: { configured: schedule !== undefined, jobId: args.job, projectId: args.project, schedule } };
|
|
202
|
+
}
|
|
203
|
+
async function testingJobScheduleSet(args) {
|
|
204
|
+
return {
|
|
205
|
+
result: await setTestingJobSchedule({
|
|
206
|
+
cron: args.cron,
|
|
207
|
+
jobId: args.job,
|
|
208
|
+
projectId: args.project,
|
|
209
|
+
record: args.record,
|
|
210
|
+
timezone: args.timezone,
|
|
211
|
+
}),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
async function testingJobScheduleRemove(args) {
|
|
215
|
+
if (args.confirm !== true)
|
|
216
|
+
throw new Error('Schedule removal requires confirm: true.');
|
|
217
|
+
return { result: await removeTestingJobSchedule({ jobId: args.job, projectId: args.project }) };
|
|
218
|
+
}
|
|
219
|
+
async function testingDataTableList(args) {
|
|
220
|
+
return {
|
|
221
|
+
result: await listTestingDataTables({
|
|
222
|
+
fields: args.fields,
|
|
223
|
+
jobId: args.job,
|
|
224
|
+
name: args.name,
|
|
225
|
+
projectId: args.project,
|
|
226
|
+
version: args.revision,
|
|
227
|
+
}),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
async function testingDataTableGet(args) {
|
|
231
|
+
return {
|
|
232
|
+
result: await getTestingDataTable({
|
|
233
|
+
jobId: args.job,
|
|
234
|
+
projectId: args.project,
|
|
235
|
+
tableId: args.id,
|
|
236
|
+
version: args.revision,
|
|
237
|
+
}),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
async function testingDataTableCreate(args) {
|
|
241
|
+
if (args.confirm !== true)
|
|
242
|
+
throw new Error('Data-table creation requires confirm: true.');
|
|
243
|
+
return {
|
|
244
|
+
result: await createTestingDataTable({
|
|
245
|
+
body: {
|
|
246
|
+
...(args.aiGenerated === undefined ? {} : { aiGenerated: args.aiGenerated }),
|
|
247
|
+
data: prepareTestingData(args.data, args.header ?? 'row'),
|
|
248
|
+
...(args.defaultRow === undefined ? {} : { defaultRow: args.defaultRow }),
|
|
249
|
+
name: args.name,
|
|
250
|
+
...(args.topics === undefined ? {} : { topics: args.topics }),
|
|
251
|
+
},
|
|
252
|
+
jobId: args.job,
|
|
253
|
+
projectId: args.project,
|
|
254
|
+
}),
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
async function testingDataTableUpdate(args) {
|
|
258
|
+
if (args.confirm !== true)
|
|
259
|
+
throw new Error('Data-table update requires confirm: true.');
|
|
260
|
+
const body = {
|
|
261
|
+
...(args.aiGenerated === undefined ? {} : { aiGenerated: args.aiGenerated }),
|
|
262
|
+
...(args.data === undefined ? {} : { data: prepareTestingData(args.data, args.header ?? 'row') }),
|
|
263
|
+
...(args.defaultRow === undefined ? {} : { defaultRow: args.defaultRow }),
|
|
264
|
+
...(args.topics === undefined ? {} : { topics: args.topics }),
|
|
265
|
+
};
|
|
266
|
+
if (Object.keys(body).length === 0)
|
|
267
|
+
throw new Error('Data-table update requires at least one field.');
|
|
268
|
+
return {
|
|
269
|
+
result: await updateTestingDataTable({
|
|
270
|
+
body,
|
|
271
|
+
jobId: args.job,
|
|
272
|
+
projectId: args.project,
|
|
273
|
+
tableId: args.id,
|
|
274
|
+
}),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
async function testingDataTableDelete(args) {
|
|
278
|
+
if (args.confirm !== true)
|
|
279
|
+
throw new Error('Data-table deletion requires confirm: true.');
|
|
280
|
+
return {
|
|
281
|
+
result: await deleteTestingDataTable({
|
|
282
|
+
jobId: args.job,
|
|
283
|
+
projectId: args.project,
|
|
284
|
+
tableId: args.id,
|
|
285
|
+
}),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
132
288
|
async function testingJobCreate(args) {
|
|
289
|
+
const screenValues = [args.screenDepth, args.screenHeight, args.screenWidth];
|
|
290
|
+
if (screenValues.some((value) => value !== undefined) && screenValues.includes(undefined)) {
|
|
291
|
+
throw new Error('Provide screenWidth, screenHeight, and screenDepth together.');
|
|
292
|
+
}
|
|
133
293
|
return {
|
|
134
294
|
result: await createTestingJob({
|
|
295
|
+
analytics: args.caseDurationChangeDetection === undefined
|
|
296
|
+
? undefined
|
|
297
|
+
: { caseDurationChangeDetection: args.caseDurationChangeDetection },
|
|
135
298
|
description: args.description,
|
|
136
|
-
|
|
299
|
+
dryRun: args.dryRun,
|
|
137
300
|
gitBranch: args.gitBranch,
|
|
138
301
|
gitDomainCredentialId: args.gitDomainCredential,
|
|
139
302
|
gitPassword: args.gitPassword,
|
|
@@ -142,24 +305,57 @@ async function testingJobCreate(args) {
|
|
|
142
305
|
gitUseCallerCredentials: args.gitUseCallerCredentials,
|
|
143
306
|
gitUsername: args.gitUsername,
|
|
144
307
|
name: args.name,
|
|
308
|
+
parallelExecution: args.parallelMode,
|
|
145
309
|
projectId: args.project,
|
|
146
310
|
robotId: args.robot,
|
|
311
|
+
screen: args.screenWidth === undefined
|
|
312
|
+
? undefined
|
|
313
|
+
: { depth: args.screenDepth, height: args.screenHeight, width: args.screenWidth },
|
|
314
|
+
showVideoParams: args.showVideoParams,
|
|
315
|
+
suiteType: args.suiteType,
|
|
316
|
+
timeout: args.timeout,
|
|
317
|
+
validation: args.validation,
|
|
147
318
|
}),
|
|
148
319
|
};
|
|
149
320
|
}
|
|
150
321
|
async function testingJobFiles(args) {
|
|
151
322
|
return { result: await listTestingJobFiles({ jobId: args.job, projectId: args.project }) };
|
|
152
323
|
}
|
|
324
|
+
async function testingJobRefs(args) {
|
|
325
|
+
return {
|
|
326
|
+
result: await getTestingJobRefs({
|
|
327
|
+
jobId: args.job,
|
|
328
|
+
projectId: args.project,
|
|
329
|
+
sharedCredentials: args.sharedCredentials,
|
|
330
|
+
}),
|
|
331
|
+
};
|
|
332
|
+
}
|
|
153
333
|
async function testingJobUpload(args) {
|
|
154
|
-
const operations =
|
|
334
|
+
const operations = args.operations.map((operation) => ({
|
|
335
|
+
encoding: operation.encoding,
|
|
336
|
+
op: operation.op,
|
|
337
|
+
path: normalizeTestingRemotePath(operation.path),
|
|
338
|
+
value: operation.value,
|
|
339
|
+
}));
|
|
340
|
+
for (const operation of operations) {
|
|
341
|
+
if (operation.op === 'remove' && operation.value !== undefined) {
|
|
342
|
+
throw new Error('Remove operations must not include value.');
|
|
343
|
+
}
|
|
344
|
+
if (operation.op !== 'remove' && operation.value === undefined) {
|
|
345
|
+
throw new Error(`${operation.op} operations require value.`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
155
348
|
return {
|
|
156
349
|
result: await uploadTestingJobFiles({
|
|
157
350
|
author: args.authorName === undefined && args.authorEmail === undefined
|
|
158
351
|
? undefined
|
|
159
352
|
: { email: args.authorEmail ?? 'agentia@copado.com', name: args.authorName ?? 'Agentia CLI' },
|
|
160
353
|
branch: args.branch,
|
|
354
|
+
commitMessage: args.commitMessage,
|
|
355
|
+
dryRun: args.dryRun,
|
|
161
356
|
jobId: args.job,
|
|
162
357
|
operations,
|
|
358
|
+
parentCommitHash: args.parentCommitHash,
|
|
163
359
|
projectId: args.project,
|
|
164
360
|
}),
|
|
165
361
|
};
|
|
@@ -176,29 +372,98 @@ async function testingJobDownload(args) {
|
|
|
176
372
|
};
|
|
177
373
|
}
|
|
178
374
|
async function testingBuildRun(args) {
|
|
179
|
-
|
|
375
|
+
if ((args.datatable?.length ?? 0) > 0 && (args.waitForResult === true || args.streamLogs === true)) {
|
|
376
|
+
throw new Error('Data-driven MCP runs start a batch and cannot wait or stream logs.');
|
|
377
|
+
}
|
|
378
|
+
const options = runOptions(args);
|
|
379
|
+
const run = await runTestingBuild(options);
|
|
380
|
+
if (args.waitForResult !== true && args.streamLogs !== true)
|
|
381
|
+
return { result: run };
|
|
382
|
+
const buildId = normalizeTestingId(run.build);
|
|
383
|
+
if (buildId === undefined)
|
|
384
|
+
throw new Error('CRT did not return a build ID for the started run.');
|
|
385
|
+
const wait = await waitForTestingBuildResult({
|
|
386
|
+
...options,
|
|
387
|
+
buildId,
|
|
388
|
+
sensitiveValues: options.parameters?.filter((parameter) => parameter.sensitive === true).map((parameter) => parameter.value ?? ''),
|
|
389
|
+
streamLogs: args.streamLogs,
|
|
390
|
+
timeoutMs: (args.timeout ?? 60) * 60_000,
|
|
391
|
+
});
|
|
392
|
+
return { result: { ...run, finalBuild: wait.build, wait } };
|
|
180
393
|
}
|
|
181
394
|
async function testingBuildList(args) {
|
|
395
|
+
if (args.count === true) {
|
|
396
|
+
if (args.job === undefined)
|
|
397
|
+
throw new Error('count requires job.');
|
|
398
|
+
return { result: { count: await countTestingBuilds({ jobId: args.job, projectId: args.project }) } };
|
|
399
|
+
}
|
|
182
400
|
return {
|
|
183
401
|
result: await listTestingBuilds({
|
|
184
402
|
jobId: args.job,
|
|
403
|
+
page: args.page,
|
|
404
|
+
pageSize: args.pageSize,
|
|
185
405
|
projectId: args.project,
|
|
186
406
|
resultSize: args.resultSize ?? 'compact',
|
|
187
407
|
status: args.status,
|
|
188
408
|
}),
|
|
189
409
|
};
|
|
190
410
|
}
|
|
411
|
+
async function testingBuildGet(args) {
|
|
412
|
+
return {
|
|
413
|
+
result: await getTestingBuild({
|
|
414
|
+
buildId: args.build,
|
|
415
|
+
full: args.full,
|
|
416
|
+
jobId: args.job,
|
|
417
|
+
projectId: args.project,
|
|
418
|
+
}),
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
async function testingBuildLatest(args) {
|
|
422
|
+
return {
|
|
423
|
+
result: await latestTestingBuilds({
|
|
424
|
+
projectId: args.project,
|
|
425
|
+
resultSize: args.resultSize ?? 'compact',
|
|
426
|
+
status: args.status,
|
|
427
|
+
}),
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
async function testingBuildSearch(args) {
|
|
431
|
+
return {
|
|
432
|
+
result: await searchTestingBuilds({
|
|
433
|
+
count: args.count,
|
|
434
|
+
from: args.from,
|
|
435
|
+
jobId: args.job,
|
|
436
|
+
order: args.order,
|
|
437
|
+
page: args.page,
|
|
438
|
+
pageSize: args.pageSize,
|
|
439
|
+
projectId: args.project,
|
|
440
|
+
robots: args.robot,
|
|
441
|
+
runTypes: args.runType,
|
|
442
|
+
sort: args.sort,
|
|
443
|
+
statuses: args.status,
|
|
444
|
+
to: args.to,
|
|
445
|
+
}),
|
|
446
|
+
};
|
|
447
|
+
}
|
|
191
448
|
async function testingBuildLogs(args) {
|
|
192
449
|
return {
|
|
193
|
-
result: await getTestingBuildLogs({
|
|
450
|
+
result: sanitizeTestingOutput(await getTestingBuildLogs({
|
|
194
451
|
buildId: args.build,
|
|
452
|
+
container: args.container,
|
|
195
453
|
jobId: args.job,
|
|
454
|
+
limitBytes: args.limitBytes,
|
|
196
455
|
output: args.output,
|
|
456
|
+
pretty: args.pretty,
|
|
197
457
|
projectId: args.project,
|
|
198
|
-
|
|
458
|
+
sinceSeconds: args.sinceSeconds,
|
|
459
|
+
tailLines: args.tailLines,
|
|
460
|
+
timestamps: args.timestamps,
|
|
461
|
+
})),
|
|
199
462
|
};
|
|
200
463
|
}
|
|
201
464
|
async function testingBuildAbort(args) {
|
|
465
|
+
if (args.confirm !== true)
|
|
466
|
+
throw new Error('Build abort requires confirm: true.');
|
|
202
467
|
return {
|
|
203
468
|
result: await abortTestingBuild({
|
|
204
469
|
buildId: args.build,
|
|
@@ -211,11 +476,18 @@ async function testingVariableList(args) {
|
|
|
211
476
|
return {
|
|
212
477
|
result: await listTestingVariables({
|
|
213
478
|
jobId: args.job,
|
|
479
|
+
key: args.key,
|
|
214
480
|
projectId: args.project,
|
|
215
481
|
robotId: args.robot,
|
|
482
|
+
sensitive: args.sensitive,
|
|
483
|
+
type: args.type,
|
|
484
|
+
userSpecific: args.userSpecific,
|
|
216
485
|
}),
|
|
217
486
|
};
|
|
218
487
|
}
|
|
488
|
+
async function testingVariableGet(args) {
|
|
489
|
+
return { result: await getTestingVariable({ projectId: args.project, variableId: args.id }) };
|
|
490
|
+
}
|
|
219
491
|
async function testingVariableCreate(args) {
|
|
220
492
|
return {
|
|
221
493
|
result: await createTestingVariable({
|
|
@@ -248,10 +520,48 @@ async function testingVariableUpdate(args) {
|
|
|
248
520
|
};
|
|
249
521
|
}
|
|
250
522
|
async function testingVariableDelete(args) {
|
|
523
|
+
if (args.confirm !== true)
|
|
524
|
+
throw new Error('Variable deletion requires confirm: true.');
|
|
251
525
|
return { result: await deleteTestingVariable({ projectId: args.project, variableId: args.id }) };
|
|
252
526
|
}
|
|
527
|
+
async function testingUserParameterList(args) {
|
|
528
|
+
return { result: await listTestingUserParameters({ jobId: args.job, key: args.key, projectId: args.project }) };
|
|
529
|
+
}
|
|
530
|
+
async function testingUserParameterGet(args) {
|
|
531
|
+
return { result: await getTestingUserParameter({ parameterId: args.id }) };
|
|
532
|
+
}
|
|
533
|
+
async function testingUserParameterCreate(args) {
|
|
534
|
+
return {
|
|
535
|
+
result: await createTestingUserParameter({
|
|
536
|
+
description: args.description,
|
|
537
|
+
key: args.key,
|
|
538
|
+
sensitive: args.sensitive,
|
|
539
|
+
unique: args.unique,
|
|
540
|
+
value: args.value,
|
|
541
|
+
}),
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
async function testingUserParameterUpdate(args) {
|
|
545
|
+
return {
|
|
546
|
+
result: await updateTestingUserParameter({
|
|
547
|
+
description: args.description,
|
|
548
|
+
key: args.key,
|
|
549
|
+
parameterId: args.id,
|
|
550
|
+
unique: args.unique,
|
|
551
|
+
value: args.value,
|
|
552
|
+
}),
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
async function testingUserParameterDelete(args) {
|
|
556
|
+
if (args.confirm !== true)
|
|
557
|
+
throw new Error('User-parameter deletion requires confirm: true.');
|
|
558
|
+
return { result: await deleteTestingUserParameter({ parameterId: args.id }) };
|
|
559
|
+
}
|
|
253
560
|
const buildListSchema = {
|
|
561
|
+
count: z.boolean().optional().describe('Return only the build count; requires job.'),
|
|
254
562
|
job: z.number().int().positive().optional().describe('CRT job/test ID.'),
|
|
563
|
+
page: z.number().int().positive().optional().describe('Build page number.'),
|
|
564
|
+
pageSize: z.number().int().positive().optional().describe('Build page size.'),
|
|
255
565
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
256
566
|
resultSize: z.enum(['compact']).optional().describe('CRT result size.'),
|
|
257
567
|
status: z.enum(TESTING_BUILD_STATUSES).optional().describe('Build status filter.'),
|
|
@@ -260,38 +570,93 @@ const uploadSchema = {
|
|
|
260
570
|
authorEmail: z.string().optional().describe('Author email for CRT file history.'),
|
|
261
571
|
authorName: z.string().optional().describe('Author name for CRT file history.'),
|
|
262
572
|
branch: z.string().optional().describe('Optional CRT branch name.'),
|
|
573
|
+
commitMessage: z.string().optional().describe('Commit message for CRT file history.'),
|
|
574
|
+
dryRun: z.boolean().optional().describe('Return a sanitized plan without making a network mutation.'),
|
|
263
575
|
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
576
|
+
operations: z.array(z.object({
|
|
577
|
+
encoding: z.enum(['utf-8', 'base64']).optional(),
|
|
578
|
+
op: z.enum(['add', 'replace', 'remove']),
|
|
579
|
+
path: z.string().min(1),
|
|
580
|
+
value: z.string().max(1_048_576).optional(),
|
|
581
|
+
})).min(1).max(100).describe('Bounded structured file operations; local paths and stdin are not available in MCP.'),
|
|
582
|
+
parentCommitHash: z.string().optional().describe('Expected parent commit hash.'),
|
|
264
583
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
265
|
-
...uploadOperationSchema,
|
|
266
584
|
};
|
|
267
585
|
const runOptionSchema = {
|
|
268
586
|
branch: z.string().optional().describe('Git branch/ref to use for this run. Mutually exclusive with tag.'),
|
|
587
|
+
consoleColors: z.enum(TESTING_CONSOLE_COLORS).optional().describe('Robot Framework console color mode.'),
|
|
588
|
+
consoleWidth: z.number().int().positive().optional().describe('Robot Framework console width.'),
|
|
589
|
+
datatable: z.array(z.string()).optional().describe('Data-driven TABLE_ID:DATASETS selections.'),
|
|
590
|
+
doc: z.string().optional().describe('Top-level Robot Framework suite documentation.'),
|
|
591
|
+
dryRun: z.boolean().optional().describe('Validate Robot Framework data without executing library keywords.'),
|
|
269
592
|
exclude: z.array(z.string()).optional().describe('Robot Framework tags to exclude from this run.'),
|
|
593
|
+
exitOnError: z.boolean().optional().describe('Stop execution on Robot Framework data or import errors.'),
|
|
594
|
+
exitOnFailure: z.boolean().optional().describe('Stop execution on a critical test failure.'),
|
|
270
595
|
include: z.array(z.string()).optional().describe('Robot Framework tags to include in this run.'),
|
|
596
|
+
metadata: z.array(z.string()).optional().describe('Top-level Robot Framework suite metadata.'),
|
|
597
|
+
name: z.string().optional().describe('Top-level Robot Framework suite name.'),
|
|
271
598
|
param: z.array(z.string()).optional().describe('Execution parameters in KEY=VALUE format.'),
|
|
272
599
|
record: z.enum(TESTING_RECORD_BUILD_OPTIONS).optional().describe('CRT execution recording mode.'),
|
|
273
600
|
rerunFailed: z.number().int().positive().optional().describe('Rerun failed tests from this build/run ID.'),
|
|
274
601
|
rerunFailedFromLatest: z.boolean().optional().describe('Rerun failed tests from the latest failed run.'),
|
|
602
|
+
runEmptySuite: z.boolean().optional().describe('Execute an empty selected Robot Framework suite.'),
|
|
603
|
+
runType: z.enum(TESTING_RUN_TYPES).optional().describe('CRT run type.'),
|
|
604
|
+
setTag: z.array(z.string()).optional().describe('Tags to set on every executed test.'),
|
|
605
|
+
skip: z.array(z.string()).optional().describe('Tags for tests to skip.'),
|
|
606
|
+
skipOnFailure: z.array(z.string()).optional().describe('Tags whose failing tests should be skipped.'),
|
|
607
|
+
streamLogs: z.boolean().optional().describe('Poll logs while waiting and return them once; MCP never streams chunks.'),
|
|
608
|
+
suite: z.array(z.string()).optional().describe('Robot Framework suites to select.'),
|
|
275
609
|
tag: z.string().optional().describe('Git tag to use for this run. Mutually exclusive with branch.'),
|
|
610
|
+
test: z.array(z.string()).optional().describe('Robot Framework tests/tasks to select.'),
|
|
611
|
+
timeout: z.number().int().positive().optional().describe('Maximum wait time in minutes.'),
|
|
612
|
+
variable: z.array(z.string()).optional().describe('Robot Framework variables.'),
|
|
613
|
+
waitForResult: z.boolean().optional().describe('Poll until the build reaches a terminal result.'),
|
|
276
614
|
};
|
|
277
615
|
const buildRunSchema = {
|
|
278
616
|
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
279
617
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
280
618
|
...runOptionSchema,
|
|
281
619
|
};
|
|
620
|
+
const testingDataMatrixSchema = z
|
|
621
|
+
.array(z.array(z.string().max(TESTING_DATA_MAX_CELL_BYTES)).max(TESTING_DATA_MAX_COLUMNS))
|
|
622
|
+
.max(TESTING_DATA_MAX_ROWS);
|
|
623
|
+
const buildLogSchema = {
|
|
624
|
+
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
625
|
+
container: z.string().optional().describe('Specific CRT log stream/container.'),
|
|
626
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
627
|
+
limitBytes: z.number().int().positive().optional().describe('Maximum log bytes to fetch.'),
|
|
628
|
+
output: z.string().optional().describe('Output file for logs.'),
|
|
629
|
+
pretty: z.boolean().optional().describe('Request readable log formatting.'),
|
|
630
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
631
|
+
sinceSeconds: z.number().int().nonnegative().optional().describe('Fetch logs from the last N seconds.'),
|
|
632
|
+
tailLines: z.number().int().nonnegative().optional().describe('Return only the last N lines.'),
|
|
633
|
+
timestamps: z.boolean().optional().describe('Add timestamps to log lines.'),
|
|
634
|
+
};
|
|
282
635
|
export const agentiaMcpTestingToolHandlers = {
|
|
283
636
|
testingBuildAbort,
|
|
637
|
+
testingBuildGet,
|
|
638
|
+
testingBuildLatest,
|
|
284
639
|
testingBuildList,
|
|
285
640
|
testingBuildLogs,
|
|
286
641
|
testingBuildRun,
|
|
642
|
+
testingBuildSearch,
|
|
287
643
|
testingCreate: testingJobCreate,
|
|
644
|
+
testingDataTableCreate,
|
|
645
|
+
testingDataTableDelete,
|
|
646
|
+
testingDataTableGet,
|
|
647
|
+
testingDataTableList,
|
|
648
|
+
testingDataTableUpdate,
|
|
288
649
|
testingJobCreate,
|
|
289
650
|
testingJobDelete,
|
|
290
651
|
testingJobDownload,
|
|
291
652
|
testingJobFiles,
|
|
292
653
|
testingJobGet,
|
|
293
654
|
testingJobList,
|
|
655
|
+
testingJobRefs,
|
|
294
656
|
testingJobRun: testingBuildRun,
|
|
657
|
+
testingJobScheduleGet,
|
|
658
|
+
testingJobScheduleRemove,
|
|
659
|
+
testingJobScheduleSet,
|
|
295
660
|
testingJobUpdate,
|
|
296
661
|
testingJobUpload,
|
|
297
662
|
testingLogs: testingBuildLogs,
|
|
@@ -299,17 +664,29 @@ export const agentiaMcpTestingToolHandlers = {
|
|
|
299
664
|
testingProjectDelete,
|
|
300
665
|
testingProjectGet,
|
|
301
666
|
testingProjectList,
|
|
667
|
+
testingProjectPermissionGet,
|
|
668
|
+
testingProjectPermissionList,
|
|
669
|
+
testingProjectPermissionSet,
|
|
670
|
+
testingProjectUpdate,
|
|
302
671
|
testingRobotCreate,
|
|
303
672
|
testingRobotDelete,
|
|
304
673
|
testingRobotGet,
|
|
305
674
|
testingRobotList,
|
|
675
|
+
testingRobotUpdate,
|
|
306
676
|
testingRun: testingBuildRun,
|
|
307
677
|
testingStatus: testingBuildList,
|
|
308
678
|
testingUpdate: testingJobUpload,
|
|
679
|
+
testingUserParameterCreate,
|
|
680
|
+
testingUserParameterDelete,
|
|
681
|
+
testingUserParameterGet,
|
|
682
|
+
testingUserParameterList,
|
|
683
|
+
testingUserParameterUpdate,
|
|
309
684
|
testingVariableCreate,
|
|
310
685
|
testingVariableDelete,
|
|
686
|
+
testingVariableGet,
|
|
311
687
|
testingVariableList,
|
|
312
688
|
testingVariableUpdate,
|
|
689
|
+
...testingLiveMcpHandlers,
|
|
313
690
|
};
|
|
314
691
|
export function registerAgentiaMcpTestingTools(server) {
|
|
315
692
|
server.registerTool('agentia_testing_project_list', {
|
|
@@ -320,8 +697,11 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
320
697
|
server.registerTool('agentia_testing_project_create', {
|
|
321
698
|
description: 'Create a Copado Robotic Testing project.',
|
|
322
699
|
inputSchema: {
|
|
700
|
+
dashboardId: z.number().int().positive().optional().describe('Optional CRT dashboard ID.'),
|
|
323
701
|
description: z.string().optional().describe('Project description.'),
|
|
702
|
+
executor: z.enum(TESTING_PROJECT_EXECUTORS).optional().describe('Project execution backend.'),
|
|
324
703
|
name: z.string().describe('Project name.'),
|
|
704
|
+
type: z.enum(TESTING_PROJECT_TYPES).optional().describe('CRT project type.'),
|
|
325
705
|
},
|
|
326
706
|
title: 'Agentia Testing Project Create',
|
|
327
707
|
}, (args) => safelyHandleTool(() => testingProjectCreate(args)));
|
|
@@ -330,9 +710,48 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
330
710
|
inputSchema: { id: z.string().describe('CRT project ID.') },
|
|
331
711
|
title: 'Agentia Testing Project Get',
|
|
332
712
|
}, (args) => safelyHandleTool(() => testingProjectGet(args)));
|
|
713
|
+
server.registerTool('agentia_testing_project_update', {
|
|
714
|
+
description: 'Update a Copado Robotic Testing project.',
|
|
715
|
+
inputSchema: {
|
|
716
|
+
description: z.string().optional().describe('New project description.'),
|
|
717
|
+
id: z.string().describe('CRT project ID.'),
|
|
718
|
+
name: z.string().optional().describe('New project name.'),
|
|
719
|
+
},
|
|
720
|
+
title: 'Agentia Testing Project Update',
|
|
721
|
+
}, (args) => safelyHandleTool(() => testingProjectUpdate(args)));
|
|
722
|
+
server.registerTool('agentia_testing_project_permission_list', {
|
|
723
|
+
description: 'List assignments for a Copado Robotic Testing project.',
|
|
724
|
+
inputSchema: { project: z.number().int().positive().describe('CRT project ID.') },
|
|
725
|
+
title: 'Agentia Testing Project Permission List',
|
|
726
|
+
}, (args) => safelyHandleTool(() => testingProjectPermissionList(args)));
|
|
727
|
+
server.registerTool('agentia_testing_project_permission_get', {
|
|
728
|
+
description: "Get the caller's permission on a Copado Robotic Testing project.",
|
|
729
|
+
inputSchema: { project: z.number().int().positive().describe('CRT project ID.') },
|
|
730
|
+
title: 'Agentia Testing Project Permission Get',
|
|
731
|
+
}, (args) => safelyHandleTool(() => testingProjectPermissionGet(args)));
|
|
732
|
+
const permissionMutationSchema = {
|
|
733
|
+
edit: z.boolean().optional().describe('Grant edit access.'),
|
|
734
|
+
group: z.number().int().positive().optional().describe('Platform group ID; exclusive with user.'),
|
|
735
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
736
|
+
user: z.number().int().positive().optional().describe('Platform user ID; exclusive with group.'),
|
|
737
|
+
view: z.boolean().optional().describe('Grant view access.'),
|
|
738
|
+
};
|
|
739
|
+
server.registerTool('agentia_testing_project_permission_set', {
|
|
740
|
+
description: 'Set a validated user or group permission on a Copado Robotic Testing project.',
|
|
741
|
+
inputSchema: permissionMutationSchema,
|
|
742
|
+
title: 'Agentia Testing Project Permission Set',
|
|
743
|
+
}, (args) => safelyHandleTool(() => testingProjectPermissionSet(args)));
|
|
744
|
+
server.registerTool('agentia_testing_project_permission_update', {
|
|
745
|
+
description: 'Update a validated user or group permission on a Copado Robotic Testing project.',
|
|
746
|
+
inputSchema: permissionMutationSchema,
|
|
747
|
+
title: 'Agentia Testing Project Permission Update',
|
|
748
|
+
}, (args) => safelyHandleTool(() => testingProjectPermissionSet(args)));
|
|
333
749
|
server.registerTool('agentia_testing_project_delete', {
|
|
334
750
|
description: 'Delete a Copado Robotic Testing project.',
|
|
335
|
-
inputSchema: {
|
|
751
|
+
inputSchema: {
|
|
752
|
+
confirm: z.boolean().describe('Must be true to confirm project deletion.'),
|
|
753
|
+
id: z.number().int().positive().describe('CRT project ID.'),
|
|
754
|
+
},
|
|
336
755
|
title: 'Agentia Testing Project Delete',
|
|
337
756
|
}, (args) => safelyHandleTool(() => testingProjectDelete(args)));
|
|
338
757
|
server.registerTool('agentia_testing_robot_list', {
|
|
@@ -351,6 +770,7 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
351
770
|
server.registerTool('agentia_testing_robot_delete', {
|
|
352
771
|
description: 'Delete a Copado Robotic Testing robot.',
|
|
353
772
|
inputSchema: {
|
|
773
|
+
confirm: z.boolean().describe('Must be true to confirm robot deletion.'),
|
|
354
774
|
id: z.string().describe('CRT robot ID.'),
|
|
355
775
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
356
776
|
},
|
|
@@ -361,14 +781,31 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
361
781
|
inputSchema: {
|
|
362
782
|
description: z.string().optional().describe('Robot description.'),
|
|
363
783
|
fwVersion: z.string().optional().describe('Robot framework version.'),
|
|
364
|
-
kind: z.enum(
|
|
784
|
+
kind: z.enum(TESTING_ROBOT_RUN_ENVIRONMENTS).optional().describe('Robot run environment.'),
|
|
785
|
+
label: z.string().optional().describe('Robot label.'),
|
|
365
786
|
name: z.string().describe('Robot name.'),
|
|
366
787
|
os: z.string().optional().describe('Robot operating system.'),
|
|
367
788
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
368
|
-
|
|
789
|
+
reporting: z.enum(TESTING_ROBOT_REPORTING).optional().describe('Testing result retention.'),
|
|
790
|
+
robotType: z.enum(TESTING_ROBOT_TYPES).optional().describe('CRT robot type.'),
|
|
791
|
+
runEnvironment: z.enum(TESTING_ROBOT_RUN_ENVIRONMENTS).optional().describe('Robot execution environment.'),
|
|
369
792
|
},
|
|
370
793
|
title: 'Agentia Testing Robot Create',
|
|
371
794
|
}, (args) => safelyHandleTool(() => testingRobotCreate(args)));
|
|
795
|
+
server.registerTool('agentia_testing_robot_update', {
|
|
796
|
+
description: 'Update a Copado Robotic Testing robot.',
|
|
797
|
+
inputSchema: {
|
|
798
|
+
description: z.string().optional().describe('New robot description.'),
|
|
799
|
+
fwVersion: z.string().optional().describe('New Robot Framework release channel.'),
|
|
800
|
+
id: z.string().describe('CRT robot ID.'),
|
|
801
|
+
label: z.string().optional().describe('New robot label.'),
|
|
802
|
+
name: z.string().optional().describe('New robot name.'),
|
|
803
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
804
|
+
reporting: z.enum(TESTING_ROBOT_REPORTING).optional().describe('Testing result retention.'),
|
|
805
|
+
robotType: z.enum(TESTING_ROBOT_TYPES).optional().describe('CRT robot type.'),
|
|
806
|
+
},
|
|
807
|
+
title: 'Agentia Testing Robot Update',
|
|
808
|
+
}, (args) => safelyHandleTool(() => testingRobotUpdate(args)));
|
|
372
809
|
server.registerTool('agentia_testing_job_list', {
|
|
373
810
|
description: 'List Copado Robotic Testing jobs/tests.',
|
|
374
811
|
inputSchema: {
|
|
@@ -409,19 +846,118 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
409
846
|
server.registerTool('agentia_testing_job_delete', {
|
|
410
847
|
description: 'Delete a Copado Robotic Testing job/test.',
|
|
411
848
|
inputSchema: {
|
|
849
|
+
confirm: z.boolean().describe('Must be true to confirm job deletion.'),
|
|
412
850
|
id: z.number().int().positive().describe('CRT job/test ID.'),
|
|
413
851
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
414
852
|
},
|
|
415
853
|
title: 'Agentia Testing Job Delete',
|
|
416
854
|
}, (args) => safelyHandleTool(() => testingJobDelete(args)));
|
|
855
|
+
server.registerTool('agentia_testing_job_schedule_get', {
|
|
856
|
+
description: 'Get a Copado Robotic Testing job schedule.',
|
|
857
|
+
inputSchema: {
|
|
858
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
859
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
860
|
+
},
|
|
861
|
+
title: 'Agentia Testing Job Schedule Get',
|
|
862
|
+
}, (args) => safelyHandleTool(() => testingJobScheduleGet(args)));
|
|
863
|
+
server.registerTool('agentia_testing_job_schedule_set', {
|
|
864
|
+
description: 'Create or update a Copado Robotic Testing job schedule.',
|
|
865
|
+
inputSchema: {
|
|
866
|
+
cron: z.string().min(1).describe('Cron expression.'),
|
|
867
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
868
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
869
|
+
record: z.enum(TESTING_RECORD_BUILD_OPTIONS).optional().describe('Scheduled run recording mode.'),
|
|
870
|
+
timezone: z.string().optional().describe('Schedule timezone.'),
|
|
871
|
+
},
|
|
872
|
+
title: 'Agentia Testing Job Schedule Set',
|
|
873
|
+
}, (args) => safelyHandleTool(() => testingJobScheduleSet(args)));
|
|
874
|
+
server.registerTool('agentia_testing_job_schedule_remove', {
|
|
875
|
+
description: 'Remove a Copado Robotic Testing job schedule.',
|
|
876
|
+
inputSchema: {
|
|
877
|
+
confirm: z.boolean().describe('Must be true to confirm schedule removal.'),
|
|
878
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
879
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
880
|
+
},
|
|
881
|
+
title: 'Agentia Testing Job Schedule Remove',
|
|
882
|
+
}, (args) => safelyHandleTool(() => testingJobScheduleRemove(args)));
|
|
883
|
+
server.registerTool('agentia_testing_data_table_list', {
|
|
884
|
+
description: 'List Copado Robotic Testing data tables.',
|
|
885
|
+
inputSchema: {
|
|
886
|
+
fields: z.string().optional().describe('Comma-separated response fields.'),
|
|
887
|
+
job: z.number().int().positive().optional().describe('CRT job/test ID filter.'),
|
|
888
|
+
name: z.string().optional().describe('Exact table name filter.'),
|
|
889
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
890
|
+
revision: z.string().optional().describe('Table revision/version filter.'),
|
|
891
|
+
},
|
|
892
|
+
title: 'Agentia Testing Data Table List',
|
|
893
|
+
}, (args) => safelyHandleTool(() => testingDataTableList(args)));
|
|
894
|
+
server.registerTool('agentia_testing_data_table_get', {
|
|
895
|
+
description: 'Get a Copado Robotic Testing data table.',
|
|
896
|
+
inputSchema: {
|
|
897
|
+
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
898
|
+
job: z.number().int().positive().optional().describe('CRT job/test ID filter.'),
|
|
899
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
900
|
+
revision: z.string().optional().describe('Table revision/version.'),
|
|
901
|
+
},
|
|
902
|
+
title: 'Agentia Testing Data Table Get',
|
|
903
|
+
}, (args) => safelyHandleTool(() => testingDataTableGet(args)));
|
|
904
|
+
server.registerTool('agentia_testing_data_table_create', {
|
|
905
|
+
description: 'Create a Copado Robotic Testing data table from structured string cells.',
|
|
906
|
+
inputSchema: {
|
|
907
|
+
aiGenerated: z.boolean().optional().describe('Mark the table as AI-generated.'),
|
|
908
|
+
confirm: z.boolean().describe('Must be true to confirm preview-bypassing creation.'),
|
|
909
|
+
data: testingDataMatrixSchema.min(1).describe('Rows with a header row followed by datasets.'),
|
|
910
|
+
defaultRow: z.number().int().positive().optional().describe('Default dataset row.'),
|
|
911
|
+
header: z.enum(['row', 'column']).optional().describe('Input header orientation.'),
|
|
912
|
+
job: z.number().int().positive().optional().describe('Optional CRT job/test ID scope.'),
|
|
913
|
+
name: z.string().min(1).describe('Data-table name.'),
|
|
914
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
915
|
+
topics: z.array(z.string()).optional().describe('Topic tags.'),
|
|
916
|
+
},
|
|
917
|
+
title: 'Agentia Testing Data Table Create',
|
|
918
|
+
}, (args) => safelyHandleTool(() => testingDataTableCreate(args)));
|
|
919
|
+
server.registerTool('agentia_testing_data_table_update', {
|
|
920
|
+
description: 'Update a Copado Robotic Testing data table.',
|
|
921
|
+
inputSchema: {
|
|
922
|
+
aiGenerated: z.boolean().optional().describe('Set whether the table is AI-generated.'),
|
|
923
|
+
confirm: z.boolean().describe('Must be true to confirm preview-bypassing update.'),
|
|
924
|
+
data: testingDataMatrixSchema.optional().describe('Replacement rows.'),
|
|
925
|
+
defaultRow: z.number().int().positive().optional().describe('Default dataset row.'),
|
|
926
|
+
header: z.enum(['row', 'column']).optional().describe('Input header orientation.'),
|
|
927
|
+
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
928
|
+
job: z.number().int().positive().optional().describe('Optional CRT job/test ID scope.'),
|
|
929
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
930
|
+
topics: z.array(z.string()).optional().describe('Replacement topic tags.'),
|
|
931
|
+
},
|
|
932
|
+
title: 'Agentia Testing Data Table Update',
|
|
933
|
+
}, (args) => safelyHandleTool(() => testingDataTableUpdate(args)));
|
|
934
|
+
server.registerTool('agentia_testing_data_table_delete', {
|
|
935
|
+
description: 'Delete a Copado Robotic Testing data table.',
|
|
936
|
+
inputSchema: {
|
|
937
|
+
confirm: z.boolean().describe('Must be true to confirm deletion.'),
|
|
938
|
+
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
939
|
+
job: z.number().int().positive().optional().describe('Optional CRT job/test ID scope.'),
|
|
940
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
941
|
+
},
|
|
942
|
+
title: 'Agentia Testing Data Table Delete',
|
|
943
|
+
}, (args) => safelyHandleTool(() => testingDataTableDelete(args)));
|
|
417
944
|
server.registerTool('agentia_testing_job_create', {
|
|
418
945
|
description: 'Create a Copado Robotic Testing job/test from uploaded files or Git storage.',
|
|
419
946
|
inputSchema: {
|
|
947
|
+
caseDurationChangeDetection: z.boolean().optional().describe('Enable or disable duration analytics.'),
|
|
420
948
|
description: z.string().optional().describe('Job/test description.'),
|
|
949
|
+
dryRun: z.boolean().optional().describe('Return a sanitized creation plan without network mutation.'),
|
|
421
950
|
name: z.string().describe('Job/test name.'),
|
|
951
|
+
parallelMode: z.enum(TESTING_JOB_PARALLEL_MODES).optional().describe('Parallel execution mode.'),
|
|
422
952
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
423
953
|
robot: z.string().describe('CRT robot ID.'),
|
|
424
|
-
|
|
954
|
+
screenDepth: z.number().int().positive().optional().describe('Screen color depth.'),
|
|
955
|
+
screenHeight: z.number().int().positive().optional().describe('Screen height.'),
|
|
956
|
+
screenWidth: z.number().int().positive().optional().describe('Screen width.'),
|
|
957
|
+
showVideoParams: z.boolean().optional().describe('Show or hide video parameters.'),
|
|
958
|
+
suiteType: z.enum(TESTING_JOB_SUITE_TYPES).optional().describe('CRT suite/job type.'),
|
|
959
|
+
timeout: z.string().optional().describe('Build timeout, for example 10m.'),
|
|
960
|
+
validation: z.boolean().optional().describe('Ask CRT to validate the created job.'),
|
|
425
961
|
...gitStorageSchema,
|
|
426
962
|
},
|
|
427
963
|
title: 'Agentia Testing Job Create',
|
|
@@ -439,6 +975,15 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
439
975
|
},
|
|
440
976
|
title: 'Agentia Testing Job Files',
|
|
441
977
|
}, (args) => safelyHandleTool(() => testingJobFiles(args)));
|
|
978
|
+
server.registerTool('agentia_testing_job_refs', {
|
|
979
|
+
description: 'List Git branches and tags for a Copado Robotic Testing job/test.',
|
|
980
|
+
inputSchema: {
|
|
981
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
982
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
983
|
+
sharedCredentials: z.boolean().optional().describe('Use shared stored Git credentials.'),
|
|
984
|
+
},
|
|
985
|
+
title: 'Agentia Testing Job Refs',
|
|
986
|
+
}, (args) => safelyHandleTool(() => testingJobRefs(args)));
|
|
442
987
|
server.registerTool('agentia_testing_job_upload', {
|
|
443
988
|
description: 'Upload file operations to a Copado Robotic Testing job/test.',
|
|
444
989
|
inputSchema: uploadSchema,
|
|
@@ -465,20 +1010,53 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
465
1010
|
inputSchema: buildListSchema,
|
|
466
1011
|
title: 'Agentia Testing Build List',
|
|
467
1012
|
}, (args) => safelyHandleTool(() => testingBuildList(args)));
|
|
468
|
-
server.registerTool('
|
|
469
|
-
description: 'Get
|
|
1013
|
+
server.registerTool('agentia_testing_build_get', {
|
|
1014
|
+
description: 'Get a Copado Robotic Testing build/run.',
|
|
470
1015
|
inputSchema: {
|
|
471
1016
|
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
1017
|
+
full: z.boolean().optional().describe('Fetch the full build result.'),
|
|
1018
|
+
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
1019
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1020
|
+
},
|
|
1021
|
+
title: 'Agentia Testing Build Get',
|
|
1022
|
+
}, (args) => safelyHandleTool(() => testingBuildGet(args)));
|
|
1023
|
+
server.registerTool('agentia_testing_build_latest', {
|
|
1024
|
+
description: 'List the latest Copado Robotic Testing builds/runs.',
|
|
1025
|
+
inputSchema: {
|
|
1026
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1027
|
+
resultSize: z.enum(['compact']).optional().describe('CRT result size.'),
|
|
1028
|
+
status: z.enum(TESTING_BUILD_STATUSES).optional().describe('Build status filter.'),
|
|
1029
|
+
},
|
|
1030
|
+
title: 'Agentia Testing Build Latest',
|
|
1031
|
+
}, (args) => safelyHandleTool(() => testingBuildLatest(args)));
|
|
1032
|
+
server.registerTool('agentia_testing_build_search', {
|
|
1033
|
+
description: 'Search Copado Robotic Testing build metrics.',
|
|
1034
|
+
inputSchema: {
|
|
1035
|
+
count: z.boolean().optional().describe('Return only the filtered count.'),
|
|
1036
|
+
from: z.string().optional().describe('Start date or epoch filter.'),
|
|
472
1037
|
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
473
|
-
|
|
1038
|
+
order: z.enum(['asc', 'desc']).optional().describe('Sort order.'),
|
|
1039
|
+
page: z.number().int().positive().optional().describe('Result page.'),
|
|
1040
|
+
pageSize: z.number().int().positive().optional().describe('Result page size.'),
|
|
474
1041
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1042
|
+
robot: z.array(z.string()).optional().describe('Robot ID filters.'),
|
|
1043
|
+
runType: z.array(z.enum(TESTING_RUN_TYPES)).optional().describe('Run type filters.'),
|
|
1044
|
+
sort: z.enum(['date', 'duration', 'id', 'status']).optional().describe('Sort field.'),
|
|
1045
|
+
status: z.array(z.string()).optional().describe('Status filters.'),
|
|
1046
|
+
to: z.string().optional().describe('End date or epoch filter.'),
|
|
475
1047
|
},
|
|
1048
|
+
title: 'Agentia Testing Build Search',
|
|
1049
|
+
}, (args) => safelyHandleTool(() => testingBuildSearch(args)));
|
|
1050
|
+
server.registerTool('agentia_testing_build_logs', {
|
|
1051
|
+
description: 'Get logs for a Copado Robotic Testing build/run.',
|
|
1052
|
+
inputSchema: buildLogSchema,
|
|
476
1053
|
title: 'Agentia Testing Build Logs',
|
|
477
1054
|
}, (args) => safelyHandleTool(() => testingBuildLogs(args)));
|
|
478
1055
|
server.registerTool('agentia_testing_build_abort', {
|
|
479
1056
|
description: 'Abort a Copado Robotic Testing build/run.',
|
|
480
1057
|
inputSchema: {
|
|
481
1058
|
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
1059
|
+
confirm: z.boolean().describe('Must be true to confirm the abort.'),
|
|
482
1060
|
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
483
1061
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
484
1062
|
},
|
|
@@ -487,12 +1065,24 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
487
1065
|
server.registerTool('agentia_testing_variable_list', {
|
|
488
1066
|
description: 'List Copado Robotic Testing variables/secrets.',
|
|
489
1067
|
inputSchema: {
|
|
490
|
-
job: z.number().int().positive().optional().describe('
|
|
1068
|
+
job: z.number().int().positive().optional().describe('Job/test ID filter.'),
|
|
1069
|
+
key: z.string().optional().describe('Exact variable key filter.'),
|
|
491
1070
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
492
|
-
robot: z.number().int().positive().optional().describe('
|
|
1071
|
+
robot: z.number().int().positive().optional().describe('Robot ID filter.'),
|
|
1072
|
+
sensitive: z.boolean().optional().describe('Sensitive status filter.'),
|
|
1073
|
+
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type filter.'),
|
|
1074
|
+
userSpecific: z.boolean().optional().describe('User-specific status filter.'),
|
|
493
1075
|
},
|
|
494
1076
|
title: 'Agentia Testing Variable List',
|
|
495
1077
|
}, (args) => safelyHandleTool(() => testingVariableList(args)));
|
|
1078
|
+
server.registerTool('agentia_testing_variable_get', {
|
|
1079
|
+
description: 'Get a Copado Robotic Testing variable/secret with value redaction.',
|
|
1080
|
+
inputSchema: {
|
|
1081
|
+
id: z.string().describe('CRT variable/secret ID.'),
|
|
1082
|
+
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1083
|
+
},
|
|
1084
|
+
title: 'Agentia Testing Variable Get',
|
|
1085
|
+
}, (args) => safelyHandleTool(() => testingVariableGet(args)));
|
|
496
1086
|
server.registerTool('agentia_testing_variable_create', {
|
|
497
1087
|
description: 'Create a Copado Robotic Testing variable/secret.',
|
|
498
1088
|
inputSchema: {
|
|
@@ -504,7 +1094,7 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
504
1094
|
sensitive: z.boolean().optional().describe('Mark variable as sensitive.'),
|
|
505
1095
|
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type.'),
|
|
506
1096
|
userSpecific: z.boolean().optional().describe('Create a user-specific variable.'),
|
|
507
|
-
value: z.string().optional().describe('
|
|
1097
|
+
value: z.string().max(1_048_576).optional().describe('Structured variable value; redacted from output.'),
|
|
508
1098
|
},
|
|
509
1099
|
title: 'Agentia Testing Variable Create',
|
|
510
1100
|
}, (args) => safelyHandleTool(() => testingVariableCreate(args)));
|
|
@@ -518,26 +1108,80 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
518
1108
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
519
1109
|
sensitive: z.boolean().optional().describe('Mark variable as sensitive.'),
|
|
520
1110
|
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type.'),
|
|
521
|
-
value: z.string().optional().describe('
|
|
1111
|
+
value: z.string().max(1_048_576).optional().describe('Structured variable value; redacted from output.'),
|
|
522
1112
|
},
|
|
523
1113
|
title: 'Agentia Testing Variable Update',
|
|
524
1114
|
}, (args) => safelyHandleTool(() => testingVariableUpdate(args)));
|
|
525
1115
|
server.registerTool('agentia_testing_variable_delete', {
|
|
526
1116
|
description: 'Delete a Copado Robotic Testing variable/secret.',
|
|
527
1117
|
inputSchema: {
|
|
1118
|
+
confirm: z.boolean().describe('Must be true to confirm variable deletion.'),
|
|
528
1119
|
id: z.string().describe('CRT variable/secret ID.'),
|
|
529
1120
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
530
1121
|
},
|
|
531
1122
|
title: 'Agentia Testing Variable Delete',
|
|
532
1123
|
}, (args) => safelyHandleTool(() => testingVariableDelete(args)));
|
|
1124
|
+
server.registerTool('agentia_testing_user_parameter_list', {
|
|
1125
|
+
description: 'List account-scoped Copado Robotic Testing user parameters.',
|
|
1126
|
+
inputSchema: {
|
|
1127
|
+
job: z.number().int().positive().optional().describe('Defensive job scope filter.'),
|
|
1128
|
+
key: z.string().optional().describe('Exact parameter key filter.'),
|
|
1129
|
+
project: z.number().int().positive().optional().describe('Defensive project scope filter.'),
|
|
1130
|
+
},
|
|
1131
|
+
title: 'Agentia Testing User Parameter List',
|
|
1132
|
+
}, (args) => safelyHandleTool(() => testingUserParameterList(args || {})));
|
|
1133
|
+
server.registerTool('agentia_testing_user_parameter_get', {
|
|
1134
|
+
description: 'Get an account-scoped Copado Robotic Testing user parameter with value redaction.',
|
|
1135
|
+
inputSchema: { id: z.number().int().positive().describe('CRT user-parameter ID.') },
|
|
1136
|
+
title: 'Agentia Testing User Parameter Get',
|
|
1137
|
+
}, (args) => safelyHandleTool(() => testingUserParameterGet(args)));
|
|
1138
|
+
server.registerTool('agentia_testing_user_parameter_create', {
|
|
1139
|
+
description: 'Create an account-scoped Copado Robotic Testing user parameter.',
|
|
1140
|
+
inputSchema: {
|
|
1141
|
+
description: z.string().optional().describe('Parameter description.'),
|
|
1142
|
+
key: z.string().min(1).describe('Parameter key.'),
|
|
1143
|
+
sensitive: z.boolean().optional().describe('Mark the parameter as sensitive.'),
|
|
1144
|
+
unique: z.boolean().optional().describe('Reject an existing parameter with the same key.'),
|
|
1145
|
+
value: z.string().max(1_048_576).describe('Structured parameter value; always redacted from output.'),
|
|
1146
|
+
},
|
|
1147
|
+
title: 'Agentia Testing User Parameter Create',
|
|
1148
|
+
}, (args) => safelyHandleTool(() => testingUserParameterCreate(args)));
|
|
1149
|
+
server.registerTool('agentia_testing_user_parameter_update', {
|
|
1150
|
+
description: 'Update an account-scoped Copado Robotic Testing user parameter.',
|
|
1151
|
+
inputSchema: {
|
|
1152
|
+
description: z.string().optional().describe('New parameter description.'),
|
|
1153
|
+
id: z.number().int().positive().describe('CRT user-parameter ID.'),
|
|
1154
|
+
key: z.string().optional().describe('New parameter key.'),
|
|
1155
|
+
unique: z.boolean().optional().describe('Reject another parameter with the same key.'),
|
|
1156
|
+
value: z.string().max(1_048_576).optional().describe('Structured value; always redacted from output.'),
|
|
1157
|
+
},
|
|
1158
|
+
title: 'Agentia Testing User Parameter Update',
|
|
1159
|
+
}, (args) => safelyHandleTool(() => testingUserParameterUpdate(args)));
|
|
1160
|
+
server.registerTool('agentia_testing_user_parameter_delete', {
|
|
1161
|
+
description: 'Delete an account-scoped Copado Robotic Testing user parameter.',
|
|
1162
|
+
inputSchema: {
|
|
1163
|
+
confirm: z.boolean().describe('Must be true to confirm user-parameter deletion.'),
|
|
1164
|
+
id: z.number().int().positive().describe('CRT user-parameter ID.'),
|
|
1165
|
+
},
|
|
1166
|
+
title: 'Agentia Testing User Parameter Delete',
|
|
1167
|
+
}, (args) => safelyHandleTool(() => testingUserParameterDelete(args)));
|
|
533
1168
|
server.registerTool('agentia_testing_create', {
|
|
534
1169
|
description: 'Create a Copado Robotic Testing test from uploaded files or Git storage.',
|
|
535
1170
|
inputSchema: {
|
|
1171
|
+
caseDurationChangeDetection: z.boolean().optional().describe('Enable or disable duration analytics.'),
|
|
536
1172
|
description: z.string().optional().describe('Test description.'),
|
|
1173
|
+
dryRun: z.boolean().optional().describe('Return a sanitized creation plan without network mutation.'),
|
|
537
1174
|
name: z.string().describe('Test name.'),
|
|
1175
|
+
parallelMode: z.enum(TESTING_JOB_PARALLEL_MODES).optional().describe('Parallel execution mode.'),
|
|
538
1176
|
project: z.number().int().positive().describe('CRT project ID.'),
|
|
539
1177
|
robot: z.string().describe('CRT robot ID.'),
|
|
540
|
-
|
|
1178
|
+
screenDepth: z.number().int().positive().optional().describe('Screen color depth.'),
|
|
1179
|
+
screenHeight: z.number().int().positive().optional().describe('Screen height.'),
|
|
1180
|
+
screenWidth: z.number().int().positive().optional().describe('Screen width.'),
|
|
1181
|
+
showVideoParams: z.boolean().optional().describe('Show or hide video parameters.'),
|
|
1182
|
+
suiteType: z.enum(TESTING_JOB_SUITE_TYPES).optional().describe('CRT suite/job type.'),
|
|
1183
|
+
timeout: z.string().optional().describe('Build timeout, for example 10m.'),
|
|
1184
|
+
validation: z.boolean().optional().describe('Ask CRT to validate the created job.'),
|
|
541
1185
|
...gitStorageSchema,
|
|
542
1186
|
},
|
|
543
1187
|
title: 'Agentia Testing Create',
|
|
@@ -559,13 +1203,9 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
559
1203
|
}, (args) => safelyHandleTool(() => testingBuildList(args)));
|
|
560
1204
|
server.registerTool('agentia_testing_logs', {
|
|
561
1205
|
description: 'Get logs for a Copado Robotic Testing run.',
|
|
562
|
-
inputSchema:
|
|
563
|
-
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
564
|
-
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
565
|
-
output: z.string().optional().describe('Output file for logs.'),
|
|
566
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
567
|
-
},
|
|
1206
|
+
inputSchema: buildLogSchema,
|
|
568
1207
|
title: 'Agentia Testing Logs',
|
|
569
1208
|
}, (args) => safelyHandleTool(() => testingBuildLogs(args)));
|
|
1209
|
+
registerTestingLiveMcpTools(server);
|
|
570
1210
|
}
|
|
571
1211
|
//# sourceMappingURL=testing-tools.js.map
|