@copado/agentia-cli 0.37.0-alpha.0 → 0.40.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 +573 -136
- package/dist/commands/auth/set.d.ts +2 -13
- package/dist/commands/auth/set.js +42 -110
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/auth/unset.d.ts +15 -0
- package/dist/commands/auth/unset.js +64 -0
- package/dist/commands/auth/unset.js.map +1 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +16 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/testing/build/abort.d.ts +26 -0
- package/dist/commands/testing/build/abort.js +38 -0
- package/dist/commands/testing/build/abort.js.map +1 -0
- package/dist/commands/testing/build/list.js +2 -2
- package/dist/commands/testing/build/list.js.map +1 -1
- package/dist/commands/testing/build/run.d.ts +8 -0
- package/dist/commands/testing/build/run.js +4 -2
- package/dist/commands/testing/build/run.js.map +1 -1
- package/dist/commands/testing/job/create.d.ts +7 -0
- package/dist/commands/testing/job/create.js +11 -2
- package/dist/commands/testing/job/create.js.map +1 -1
- package/dist/commands/testing/job/delete.d.ts +24 -0
- package/dist/commands/testing/job/delete.js +30 -0
- package/dist/commands/testing/job/delete.js.map +1 -0
- package/dist/commands/testing/job/list.js +2 -2
- package/dist/commands/testing/job/list.js.map +1 -1
- package/dist/commands/testing/job/run.d.ts +1 -0
- package/dist/commands/testing/job/run.js +2 -0
- package/dist/commands/testing/job/run.js.map +1 -0
- package/dist/commands/testing/job/update.d.ts +42 -0
- package/dist/commands/testing/job/update.js +137 -0
- package/dist/commands/testing/job/update.js.map +1 -0
- package/dist/commands/testing/project/delete.d.ts +22 -0
- package/dist/commands/testing/project/delete.js +29 -0
- package/dist/commands/testing/project/delete.js.map +1 -0
- package/dist/commands/testing/robot/delete.d.ts +21 -0
- package/dist/commands/testing/robot/delete.js +30 -0
- package/dist/commands/testing/robot/delete.js.map +1 -0
- package/dist/commands/testing/run.d.ts +8 -0
- package/dist/commands/testing/run.js +4 -2
- package/dist/commands/testing/run.js.map +1 -1
- package/dist/commands/testing/status.js +2 -2
- package/dist/commands/testing/status.js.map +1 -1
- package/dist/commands/testing/test/run.d.ts +34 -1
- package/dist/commands/testing/test/run.js +58 -1
- package/dist/commands/testing/test/run.js.map +1 -1
- package/dist/commands/testing/variable/create.d.ts +1 -1
- package/dist/commands/testing/variable/update.d.ts +21 -0
- package/dist/commands/testing/variable/update.js +63 -0
- package/dist/commands/testing/variable/update.js.map +1 -0
- package/dist/lib/auth-config.d.ts +62 -0
- package/dist/lib/auth-config.js +246 -0
- package/dist/lib/auth-config.js.map +1 -0
- package/dist/lib/credential-store.d.ts +3 -0
- package/dist/lib/credential-store.js +9 -0
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/cursor-mcp-config.d.ts +62 -0
- package/dist/lib/cursor-mcp-config.js +173 -0
- package/dist/lib/cursor-mcp-config.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +98 -2
- package/dist/lib/mcp/testing-tools.js +227 -15
- package/dist/lib/mcp/testing-tools.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +158 -0
- package/dist/lib/mcp/tools.js +10 -34
- package/dist/lib/mcp/tools.js.map +1 -1
- package/dist/lib/project-setup.d.ts +16 -14
- package/dist/lib/project-setup.js +101 -145
- package/dist/lib/project-setup.js.map +1 -1
- package/dist/lib/setup-prompts.d.ts +30 -0
- package/dist/lib/setup-prompts.js +13 -0
- package/dist/lib/setup-prompts.js.map +1 -0
- package/dist/lib/setup-wizard.d.ts +42 -0
- package/dist/lib/setup-wizard.js +422 -0
- package/dist/lib/setup-wizard.js.map +1 -0
- package/dist/lib/testing-config.d.ts +4 -2
- package/dist/lib/testing-config.js +23 -3
- package/dist/lib/testing-config.js.map +1 -1
- package/dist/lib/testing-flags.d.ts +35 -1
- package/dist/lib/testing-flags.js +85 -0
- package/dist/lib/testing-flags.js.map +1 -1
- package/dist/lib/testing-gateway.d.ts +13 -0
- package/dist/lib/testing-gateway.js +42 -1
- package/dist/lib/testing-gateway.js.map +1 -1
- package/dist/lib/testing-operations.d.ts +93 -5
- package/dist/lib/testing-operations.js +211 -19
- package/dist/lib/testing-operations.js.map +1 -1
- package/dist/lib/testing-types.d.ts +76 -5
- package/dist/lib/testing-types.js +65 -1
- package/dist/lib/testing-types.js.map +1 -1
- package/oclif.manifest.json +1237 -191
- package/package.json +2 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
export const AGENTIA_MCP_SERVER_NAME = 'agentia';
|
|
6
|
+
export const AGENTIA_MCP_ENTRY = {
|
|
7
|
+
args: ['mcp', 'start'],
|
|
8
|
+
command: 'agentia',
|
|
9
|
+
type: 'stdio',
|
|
10
|
+
};
|
|
11
|
+
let testDeps;
|
|
12
|
+
export function setCursorMcpDepsForTests(deps) {
|
|
13
|
+
testDeps = deps;
|
|
14
|
+
}
|
|
15
|
+
export function resetCursorMcpDepsForTests() {
|
|
16
|
+
testDeps = undefined;
|
|
17
|
+
}
|
|
18
|
+
function resolveDeps(overrides = {}) {
|
|
19
|
+
const merged = { ...testDeps, ...overrides };
|
|
20
|
+
return {
|
|
21
|
+
existsSync: merged.existsSync ?? existsSync,
|
|
22
|
+
homedir: merged.homedir ?? homedir,
|
|
23
|
+
pathEnv: merged.pathEnv ?? process.env.PATH ?? '',
|
|
24
|
+
platform: merged.platform ?? process.platform,
|
|
25
|
+
readFile: merged.readFile ?? ((filePath, encoding) => readFile(filePath, encoding)),
|
|
26
|
+
writeFile: merged.writeFile ?? ((filePath, contents, encoding) => writeFile(filePath, contents, encoding)),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function isRecord(value) {
|
|
30
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
31
|
+
}
|
|
32
|
+
export function globalCursorMcpPath(home = homedir()) {
|
|
33
|
+
return path.join(home, '.cursor', 'mcp.json');
|
|
34
|
+
}
|
|
35
|
+
export function localCursorMcpPath(projectRoot) {
|
|
36
|
+
return path.join(projectRoot, '.cursor', 'mcp.json');
|
|
37
|
+
}
|
|
38
|
+
export function isAgentiaMcpEntry(value) {
|
|
39
|
+
if (!isRecord(value)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (value.command !== 'agentia') {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (!Array.isArray(value.args) || value.args.length !== 2) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return value.args[0] === 'mcp' && value.args[1] === 'start';
|
|
49
|
+
}
|
|
50
|
+
export function hasConflictingAgentiaEntry(value) {
|
|
51
|
+
return isRecord(value) && Object.keys(value).length > 0 && !isAgentiaMcpEntry(value);
|
|
52
|
+
}
|
|
53
|
+
export function findAgentiaMcpServer(document) {
|
|
54
|
+
const servers = document?.mcpServers;
|
|
55
|
+
if (!isRecord(servers)) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
for (const [name, entry] of Object.entries(servers)) {
|
|
59
|
+
if (isAgentiaMcpEntry(entry)) {
|
|
60
|
+
return { entry, name };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
function commandOnPath(command, pathEnv, platform, exists) {
|
|
66
|
+
const extensions = platform === 'win32' ? ['.cmd', '.exe', '.bat', ''] : [''];
|
|
67
|
+
for (const dir of pathEnv.split(path.delimiter)) {
|
|
68
|
+
if (dir.trim().length === 0) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
for (const extension of extensions) {
|
|
72
|
+
if (exists(path.join(dir, `${command}${extension}`))) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
function standardCursorAppLocations(home, platform) {
|
|
80
|
+
if (platform === 'darwin') {
|
|
81
|
+
return ['/Applications/Cursor.app'];
|
|
82
|
+
}
|
|
83
|
+
if (platform === 'win32') {
|
|
84
|
+
return [
|
|
85
|
+
path.join(home, 'AppData', 'Local', 'Programs', 'cursor', 'Cursor.exe'),
|
|
86
|
+
path.join(home, 'AppData', 'Local', 'Programs', 'Cursor', 'Cursor.exe'),
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
return ['/usr/share/cursor', '/opt/Cursor', path.join(home, '.local', 'share', 'cursor')];
|
|
90
|
+
}
|
|
91
|
+
export function detectCursorInstall(deps = {}) {
|
|
92
|
+
const resolved = resolveDeps(deps);
|
|
93
|
+
const globalPath = globalCursorMcpPath(resolved.homedir());
|
|
94
|
+
const configPresent = resolved.existsSync(globalPath);
|
|
95
|
+
const onPath = commandOnPath('cursor', resolved.pathEnv, resolved.platform, resolved.existsSync) ||
|
|
96
|
+
commandOnPath('agent', resolved.pathEnv, resolved.platform, resolved.existsSync);
|
|
97
|
+
const appPresent = standardCursorAppLocations(resolved.homedir(), resolved.platform).some((filePath) => resolved.existsSync(filePath));
|
|
98
|
+
return {
|
|
99
|
+
configPresent,
|
|
100
|
+
detected: configPresent || onPath || appPresent,
|
|
101
|
+
onPath,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export async function readCursorMcpDocument(filePath, deps = {}) {
|
|
105
|
+
const resolved = resolveDeps(deps);
|
|
106
|
+
if (!resolved.existsSync(filePath)) {
|
|
107
|
+
return { exists: false };
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
const contents = await resolved.readFile(filePath, 'utf8');
|
|
111
|
+
const parsed = JSON.parse(contents);
|
|
112
|
+
if (!isRecord(parsed)) {
|
|
113
|
+
return { error: `Cursor MCP config at ${filePath} must contain a JSON object.`, exists: true };
|
|
114
|
+
}
|
|
115
|
+
return { document: parsed, exists: true };
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (error instanceof SyntaxError) {
|
|
119
|
+
return { error: `Cursor MCP config at ${filePath} contains invalid JSON.`, exists: true };
|
|
120
|
+
}
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export function inspectCursorMcpStatus(document, filePath, exists) {
|
|
125
|
+
const matched = findAgentiaMcpServer(document);
|
|
126
|
+
const namedEntry = document?.mcpServers?.[AGENTIA_MCP_SERVER_NAME];
|
|
127
|
+
return {
|
|
128
|
+
configured: matched !== undefined,
|
|
129
|
+
conflicting: matched === undefined && hasConflictingAgentiaEntry(namedEntry),
|
|
130
|
+
exists,
|
|
131
|
+
path: filePath,
|
|
132
|
+
serverName: matched?.name,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export async function getCursorMcpStatus(projectRoot, deps = {}) {
|
|
136
|
+
const resolved = resolveDeps(deps);
|
|
137
|
+
const localPath = localCursorMcpPath(projectRoot);
|
|
138
|
+
const globalPath = globalCursorMcpPath(resolved.homedir());
|
|
139
|
+
const [localFile, globalFile] = await Promise.all([
|
|
140
|
+
readCursorMcpDocument(localPath, deps),
|
|
141
|
+
readCursorMcpDocument(globalPath, deps),
|
|
142
|
+
]);
|
|
143
|
+
return {
|
|
144
|
+
global: inspectCursorMcpStatus(globalFile.document, globalPath, globalFile.exists),
|
|
145
|
+
local: inspectCursorMcpStatus(localFile.document, localPath, localFile.exists),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export async function upsertAgentiaCursorMcp(filePath, deps = {}) {
|
|
149
|
+
const resolved = resolveDeps(deps);
|
|
150
|
+
const current = await readCursorMcpDocument(filePath, deps);
|
|
151
|
+
if (current.error !== undefined) {
|
|
152
|
+
throw new Error(current.error);
|
|
153
|
+
}
|
|
154
|
+
const document = current.document ?? {};
|
|
155
|
+
const servers = isRecord(document.mcpServers) ? { ...document.mcpServers } : {};
|
|
156
|
+
const existing = findAgentiaMcpServer(document);
|
|
157
|
+
const targetName = existing?.name ?? AGENTIA_MCP_SERVER_NAME;
|
|
158
|
+
const existed = current.exists && servers[targetName] !== undefined;
|
|
159
|
+
servers[targetName] = { ...AGENTIA_MCP_ENTRY };
|
|
160
|
+
document.mcpServers = servers;
|
|
161
|
+
try {
|
|
162
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// Best-effort directory creation; writeFile still runs for injectable test deps.
|
|
166
|
+
}
|
|
167
|
+
await resolved.writeFile(filePath, `${JSON.stringify(document, null, 2)}\n`, 'utf8');
|
|
168
|
+
return {
|
|
169
|
+
path: filePath,
|
|
170
|
+
status: existed || current.exists ? 'updated' : 'created',
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=cursor-mcp-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-mcp-config.js","sourceRoot":"","sources":["../../src/lib/cursor-mcp-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA;AAClC,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAA;AAEhD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,OAAO;CACL,CAAA;AAuCV,IAAI,QAAmC,CAAA;AAEvC,MAAM,UAAU,wBAAwB,CAAC,IAA+B;IACtE,QAAQ,GAAG,IAAI,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,QAAQ,GAAG,SAAS,CAAA;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I,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAEpF,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KAC1D,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { type TestingBuildStatus, type TestingVariableType } from '../testing-types.js';
|
|
2
|
+
import { type TestingBuildStatus, type TestingJobParallelMode, type TestingJobSuiteType, type TestingRecordBuildOption, type TestingVariableType } from '../testing-types.js';
|
|
3
3
|
type ConnectionArgs = {
|
|
4
4
|
domain?: string;
|
|
5
5
|
org?: number;
|
|
@@ -8,6 +8,16 @@ type ConnectionArgs = {
|
|
|
8
8
|
type ProjectArgs = ConnectionArgs & {
|
|
9
9
|
project: number;
|
|
10
10
|
};
|
|
11
|
+
type RunOptionArgs = {
|
|
12
|
+
branch?: string;
|
|
13
|
+
exclude?: string[];
|
|
14
|
+
include?: string[];
|
|
15
|
+
param?: string[];
|
|
16
|
+
record?: TestingRecordBuildOption;
|
|
17
|
+
rerunFailed?: number;
|
|
18
|
+
rerunFailedFromLatest?: boolean;
|
|
19
|
+
tag?: string;
|
|
20
|
+
};
|
|
11
21
|
declare function testingProjectList(args?: ConnectionArgs & {
|
|
12
22
|
name?: string;
|
|
13
23
|
}): Promise<{
|
|
@@ -24,6 +34,14 @@ declare function testingProjectGet(args: ConnectionArgs & {
|
|
|
24
34
|
}): Promise<{
|
|
25
35
|
result: import("../testing-types.js").TestingProject;
|
|
26
36
|
}>;
|
|
37
|
+
declare function testingProjectDelete(args: ConnectionArgs & {
|
|
38
|
+
id: number;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
result: {
|
|
41
|
+
deleted: true;
|
|
42
|
+
projectId: number;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
27
45
|
declare function testingRobotList(args: ProjectArgs): Promise<{
|
|
28
46
|
result: import("../testing-types.js").TestingRobot[];
|
|
29
47
|
}>;
|
|
@@ -32,6 +50,15 @@ declare function testingRobotGet(args: ProjectArgs & {
|
|
|
32
50
|
}): Promise<{
|
|
33
51
|
result: import("../testing-types.js").TestingRobot;
|
|
34
52
|
}>;
|
|
53
|
+
declare function testingRobotDelete(args: ProjectArgs & {
|
|
54
|
+
id: string;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
result: {
|
|
57
|
+
deleted: true;
|
|
58
|
+
projectId: number;
|
|
59
|
+
robotId: number | string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
35
62
|
declare function testingRobotCreate(args: ProjectArgs & {
|
|
36
63
|
description?: string;
|
|
37
64
|
fwVersion?: string;
|
|
@@ -52,10 +79,50 @@ declare function testingJobGet(args: ProjectArgs & {
|
|
|
52
79
|
}): Promise<{
|
|
53
80
|
result: import("../testing-types.js").TestingJob;
|
|
54
81
|
}>;
|
|
82
|
+
declare function testingJobUpdate(args: ProjectArgs & {
|
|
83
|
+
caseDurationChangeDetection?: boolean;
|
|
84
|
+
description?: string;
|
|
85
|
+
gitBranch?: string;
|
|
86
|
+
gitDomainCredential?: string;
|
|
87
|
+
gitPassword?: string;
|
|
88
|
+
gitTag?: string;
|
|
89
|
+
gitUrl?: string;
|
|
90
|
+
gitUseCallerCredentials?: boolean;
|
|
91
|
+
gitUsername?: string;
|
|
92
|
+
hideVideoParams?: boolean;
|
|
93
|
+
id: number;
|
|
94
|
+
name?: string;
|
|
95
|
+
parallelMode?: TestingJobParallelMode;
|
|
96
|
+
robot?: number;
|
|
97
|
+
screenDepth?: number;
|
|
98
|
+
screenHeight?: number;
|
|
99
|
+
screenWidth?: number;
|
|
100
|
+
showVideoParams?: boolean;
|
|
101
|
+
suiteType?: TestingJobSuiteType;
|
|
102
|
+
timeout?: string;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
result: import("../testing-types.js").TestingJob;
|
|
105
|
+
}>;
|
|
106
|
+
declare function testingJobDelete(args: ProjectArgs & {
|
|
107
|
+
id: number;
|
|
108
|
+
}): Promise<{
|
|
109
|
+
result: {
|
|
110
|
+
deleted: true;
|
|
111
|
+
jobId: number;
|
|
112
|
+
projectId: number;
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
55
115
|
declare function testingJobCreate(args: ProjectArgs & {
|
|
56
116
|
description?: string;
|
|
57
117
|
dir?: string[];
|
|
58
118
|
file?: string[];
|
|
119
|
+
gitBranch?: string;
|
|
120
|
+
gitDomainCredential?: string;
|
|
121
|
+
gitPassword?: string;
|
|
122
|
+
gitTag?: string;
|
|
123
|
+
gitUrl?: string;
|
|
124
|
+
gitUseCallerCredentials?: boolean;
|
|
125
|
+
gitUsername?: string;
|
|
59
126
|
name: string;
|
|
60
127
|
robot: string;
|
|
61
128
|
}): Promise<{
|
|
@@ -88,7 +155,7 @@ declare function testingJobDownload(args: ProjectArgs & {
|
|
|
88
155
|
}): Promise<{
|
|
89
156
|
result: import("../testing-types.js").TestingDownloadResult;
|
|
90
157
|
}>;
|
|
91
|
-
declare function testingBuildRun(args: ProjectArgs & {
|
|
158
|
+
declare function testingBuildRun(args: ProjectArgs & RunOptionArgs & {
|
|
92
159
|
job: number;
|
|
93
160
|
}): Promise<{
|
|
94
161
|
result: import("../testing-types.js").TestingBuildRunResult;
|
|
@@ -107,6 +174,17 @@ declare function testingBuildLogs(args: ProjectArgs & {
|
|
|
107
174
|
}): Promise<{
|
|
108
175
|
result: import("../testing-types.js").TestingLogResult;
|
|
109
176
|
}>;
|
|
177
|
+
declare function testingBuildAbort(args: ProjectArgs & {
|
|
178
|
+
build: number;
|
|
179
|
+
job: number;
|
|
180
|
+
}): Promise<{
|
|
181
|
+
result: {
|
|
182
|
+
build: import("../testing-types.js").TestingRecord;
|
|
183
|
+
buildId: number;
|
|
184
|
+
jobId: number;
|
|
185
|
+
projectId: number;
|
|
186
|
+
};
|
|
187
|
+
}>;
|
|
110
188
|
declare function testingVariableList(args: ProjectArgs & {
|
|
111
189
|
job?: number;
|
|
112
190
|
robot?: number;
|
|
@@ -125,6 +203,17 @@ declare function testingVariableCreate(args: ProjectArgs & {
|
|
|
125
203
|
}): Promise<{
|
|
126
204
|
result: unknown;
|
|
127
205
|
}>;
|
|
206
|
+
declare function testingVariableUpdate(args: ProjectArgs & {
|
|
207
|
+
description?: string;
|
|
208
|
+
id: string;
|
|
209
|
+
key?: string;
|
|
210
|
+
notSensitive?: boolean;
|
|
211
|
+
sensitive?: boolean;
|
|
212
|
+
type?: TestingVariableType;
|
|
213
|
+
value?: string;
|
|
214
|
+
}): Promise<{
|
|
215
|
+
result: unknown;
|
|
216
|
+
}>;
|
|
128
217
|
declare function testingVariableDelete(args: ProjectArgs & {
|
|
129
218
|
id: string;
|
|
130
219
|
}): Promise<{
|
|
@@ -134,21 +223,27 @@ declare function testingVariableDelete(args: ProjectArgs & {
|
|
|
134
223
|
};
|
|
135
224
|
}>;
|
|
136
225
|
export declare const agentiaMcpTestingToolHandlers: {
|
|
226
|
+
testingBuildAbort: typeof testingBuildAbort;
|
|
137
227
|
testingBuildList: typeof testingBuildList;
|
|
138
228
|
testingBuildLogs: typeof testingBuildLogs;
|
|
139
229
|
testingBuildRun: typeof testingBuildRun;
|
|
140
230
|
testingCreate: typeof testingJobCreate;
|
|
141
231
|
testingJobCreate: typeof testingJobCreate;
|
|
232
|
+
testingJobDelete: typeof testingJobDelete;
|
|
142
233
|
testingJobDownload: typeof testingJobDownload;
|
|
143
234
|
testingJobFiles: typeof testingJobFiles;
|
|
144
235
|
testingJobGet: typeof testingJobGet;
|
|
145
236
|
testingJobList: typeof testingJobList;
|
|
237
|
+
testingJobRun: typeof testingBuildRun;
|
|
238
|
+
testingJobUpdate: typeof testingJobUpdate;
|
|
146
239
|
testingJobUpload: typeof testingJobUpload;
|
|
147
240
|
testingLogs: typeof testingBuildLogs;
|
|
148
241
|
testingProjectCreate: typeof testingProjectCreate;
|
|
242
|
+
testingProjectDelete: typeof testingProjectDelete;
|
|
149
243
|
testingProjectGet: typeof testingProjectGet;
|
|
150
244
|
testingProjectList: typeof testingProjectList;
|
|
151
245
|
testingRobotCreate: typeof testingRobotCreate;
|
|
246
|
+
testingRobotDelete: typeof testingRobotDelete;
|
|
152
247
|
testingRobotGet: typeof testingRobotGet;
|
|
153
248
|
testingRobotList: typeof testingRobotList;
|
|
154
249
|
testingRun: typeof testingBuildRun;
|
|
@@ -157,6 +252,7 @@ export declare const agentiaMcpTestingToolHandlers: {
|
|
|
157
252
|
testingVariableCreate: typeof testingVariableCreate;
|
|
158
253
|
testingVariableDelete: typeof testingVariableDelete;
|
|
159
254
|
testingVariableList: typeof testingVariableList;
|
|
255
|
+
testingVariableUpdate: typeof testingVariableUpdate;
|
|
160
256
|
};
|
|
161
257
|
export declare function registerAgentiaMcpTestingTools(server: McpServer): void;
|
|
162
258
|
export {};
|