@copado/agentia-cli 0.28.0-alpha.0 → 0.31.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 +1000 -87
- package/dist/commands/auth/get.d.ts +2 -0
- package/dist/commands/auth/get.js +13 -2
- package/dist/commands/auth/get.js.map +1 -1
- package/dist/commands/auth/set.d.ts +6 -0
- package/dist/commands/auth/set.js +43 -4
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/environment/list.d.ts +5 -1
- package/dist/commands/environment/list.js +10 -8
- package/dist/commands/environment/list.js.map +1 -1
- package/dist/commands/job/list.d.ts +4 -2
- package/dist/commands/job/list.js +10 -12
- package/dist/commands/job/list.js.map +1 -1
- package/dist/commands/pipeline/list.d.ts +6 -1
- package/dist/commands/pipeline/list.js +10 -7
- package/dist/commands/pipeline/list.js.map +1 -1
- package/dist/commands/project/list.d.ts +4 -1
- package/dist/commands/project/list.js +7 -5
- package/dist/commands/project/list.js.map +1 -1
- package/dist/commands/promotion/list.d.ts +4 -2
- package/dist/commands/promotion/list.js +8 -6
- package/dist/commands/promotion/list.js.map +1 -1
- package/dist/commands/setup.d.ts +12 -0
- package/dist/commands/setup.js +52 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/testing/build/list.d.ts +16 -0
- package/dist/commands/testing/build/list.js +47 -0
- package/dist/commands/testing/build/list.js.map +1 -0
- package/dist/commands/testing/build/logs.d.ts +21 -0
- package/dist/commands/testing/build/logs.js +42 -0
- package/dist/commands/testing/build/logs.js.map +1 -0
- package/dist/commands/testing/build/run.d.ts +19 -0
- package/dist/commands/testing/build/run.js +39 -0
- package/dist/commands/testing/build/run.js.map +1 -0
- package/dist/commands/testing/create.d.ts +18 -0
- package/dist/commands/testing/create.js +46 -0
- package/dist/commands/testing/create.js.map +1 -0
- package/dist/commands/testing/job/create.d.ts +18 -0
- package/dist/commands/testing/job/create.js +46 -0
- package/dist/commands/testing/job/create.js.map +1 -0
- package/dist/commands/testing/job/download.d.ts +22 -0
- package/dist/commands/testing/job/download.js +56 -0
- package/dist/commands/testing/job/download.js.map +1 -0
- package/dist/commands/testing/job/files.d.ts +19 -0
- package/dist/commands/testing/job/files.js +35 -0
- package/dist/commands/testing/job/files.js.map +1 -0
- package/dist/commands/testing/job/list.d.ts +14 -0
- package/dist/commands/testing/job/list.js +32 -0
- package/dist/commands/testing/job/list.js.map +1 -0
- package/dist/commands/testing/job/upload.d.ts +29 -0
- package/dist/commands/testing/job/upload.js +57 -0
- package/dist/commands/testing/job/upload.js.map +1 -0
- package/dist/commands/testing/logs.d.ts +21 -0
- package/dist/commands/testing/logs.js +42 -0
- package/dist/commands/testing/logs.js.map +1 -0
- package/dist/commands/testing/project/create.d.ts +14 -0
- package/dist/commands/testing/project/create.js +36 -0
- package/dist/commands/testing/project/create.js.map +1 -0
- package/dist/commands/testing/project/list.d.ts +13 -0
- package/dist/commands/testing/project/list.js +31 -0
- package/dist/commands/testing/project/list.js.map +1 -0
- package/dist/commands/testing/robot/create.d.ts +19 -0
- package/dist/commands/testing/robot/create.js +60 -0
- package/dist/commands/testing/robot/create.js.map +1 -0
- package/dist/commands/testing/robot/list.d.ts +13 -0
- package/dist/commands/testing/robot/list.js +28 -0
- package/dist/commands/testing/robot/list.js.map +1 -0
- package/dist/commands/testing/run.d.ts +19 -0
- package/dist/commands/testing/run.js +32 -0
- package/dist/commands/testing/run.js.map +1 -0
- package/dist/commands/testing/status.d.ts +16 -0
- package/dist/commands/testing/status.js +47 -0
- package/dist/commands/testing/status.js.map +1 -0
- package/dist/commands/testing/test/create.d.ts +1 -0
- package/dist/commands/testing/test/create.js +2 -0
- package/dist/commands/testing/test/create.js.map +1 -0
- package/dist/commands/testing/test/logs.d.ts +1 -0
- package/dist/commands/testing/test/logs.js +2 -0
- package/dist/commands/testing/test/logs.js.map +1 -0
- package/dist/commands/testing/test/run.d.ts +1 -0
- package/dist/commands/testing/test/run.js +2 -0
- package/dist/commands/testing/test/run.js.map +1 -0
- package/dist/commands/testing/test/status.d.ts +1 -0
- package/dist/commands/testing/test/status.js +2 -0
- package/dist/commands/testing/test/status.js.map +1 -0
- package/dist/commands/testing/test/update.d.ts +1 -0
- package/dist/commands/testing/test/update.js +2 -0
- package/dist/commands/testing/test/update.js.map +1 -0
- package/dist/commands/testing/update.d.ts +29 -0
- package/dist/commands/testing/update.js +57 -0
- package/dist/commands/testing/update.js.map +1 -0
- package/dist/commands/testing/variable/create.d.ts +20 -0
- package/dist/commands/testing/variable/create.js +65 -0
- package/dist/commands/testing/variable/create.js.map +1 -0
- package/dist/commands/testing/variable/delete.d.ts +19 -0
- package/dist/commands/testing/variable/delete.js +30 -0
- package/dist/commands/testing/variable/delete.js.map +1 -0
- package/dist/commands/testing/variable/list.d.ts +15 -0
- package/dist/commands/testing/variable/list.js +40 -0
- package/dist/commands/testing/variable/list.js.map +1 -0
- package/dist/commands/work/list.d.ts +4 -1
- package/dist/commands/work/list.js +7 -5
- package/dist/commands/work/list.js.map +1 -1
- package/dist/commands/work/set.js +8 -1
- package/dist/commands/work/set.js.map +1 -1
- package/dist/commands/work/submit.d.ts +2 -0
- package/dist/commands/work/submit.js +40 -2
- package/dist/commands/work/submit.js.map +1 -1
- package/dist/lib/credential-store.d.ts +4 -0
- package/dist/lib/credential-store.js +14 -0
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/defaults-store.d.ts +3 -0
- package/dist/lib/defaults-store.js +24 -0
- package/dist/lib/defaults-store.js.map +1 -1
- package/dist/lib/environment-flags.d.ts +3 -1
- package/dist/lib/environment-flags.js +3 -1
- package/dist/lib/environment-flags.js.map +1 -1
- package/dist/lib/environment-types.d.ts +4 -1
- package/dist/lib/environment-types.js +2 -0
- package/dist/lib/environment-types.js.map +1 -1
- package/dist/lib/git-worktree.d.ts +4 -0
- package/dist/lib/git-worktree.js +46 -2
- package/dist/lib/git-worktree.js.map +1 -1
- package/dist/lib/job-types.d.ts +7 -4
- package/dist/lib/job-types.js +8 -15
- package/dist/lib/job-types.js.map +1 -1
- package/dist/lib/list-pagination.d.ts +46 -0
- package/dist/lib/list-pagination.js +106 -0
- package/dist/lib/list-pagination.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +144 -0
- package/dist/lib/mcp/testing-tools.js +366 -0
- package/dist/lib/mcp/testing-tools.js.map +1 -0
- package/dist/lib/mcp/tools.d.ts +288 -31
- package/dist/lib/mcp/tools.js +26 -54
- package/dist/lib/mcp/tools.js.map +1 -1
- package/dist/lib/mcp/work-tools.d.ts +1 -3
- package/dist/lib/mcp/work-tools.js +13 -2
- package/dist/lib/mcp/work-tools.js.map +1 -1
- package/dist/lib/open-browser.d.ts +3 -0
- package/dist/lib/open-browser.js +13 -1
- package/dist/lib/open-browser.js.map +1 -1
- package/dist/lib/pipeline-types.d.ts +6 -1
- package/dist/lib/pipeline-types.js +10 -6
- package/dist/lib/pipeline-types.js.map +1 -1
- package/dist/lib/project-flags.d.ts +3 -2
- package/dist/lib/project-flags.js +3 -1
- package/dist/lib/project-flags.js.map +1 -1
- package/dist/lib/project-setup.d.ts +80 -0
- package/dist/lib/project-setup.js +383 -0
- package/dist/lib/project-setup.js.map +1 -0
- package/dist/lib/project-types.d.ts +5 -1
- package/dist/lib/project-types.js +6 -10
- package/dist/lib/project-types.js.map +1 -1
- package/dist/lib/promotion-flags.d.ts +4 -3
- package/dist/lib/promotion-flags.js +3 -8
- package/dist/lib/promotion-flags.js.map +1 -1
- package/dist/lib/promotion-types.d.ts +8 -5
- package/dist/lib/promotion-types.js +10 -14
- package/dist/lib/promotion-types.js.map +1 -1
- package/dist/lib/setup-templates.d.ts +11 -0
- package/dist/lib/setup-templates.js +181 -0
- package/dist/lib/setup-templates.js.map +1 -0
- package/dist/lib/testing-config.d.ts +17 -0
- package/dist/lib/testing-config.js +68 -0
- package/dist/lib/testing-config.js.map +1 -0
- package/dist/lib/testing-flags.d.ts +33 -0
- package/dist/lib/testing-flags.js +70 -0
- package/dist/lib/testing-flags.js.map +1 -0
- package/dist/lib/testing-gateway.d.ts +33 -0
- package/dist/lib/testing-gateway.js +161 -0
- package/dist/lib/testing-gateway.js.map +1 -0
- package/dist/lib/testing-operations.d.ts +99 -0
- package/dist/lib/testing-operations.js +268 -0
- package/dist/lib/testing-operations.js.map +1 -0
- package/dist/lib/testing-types.d.ts +138 -0
- package/dist/lib/testing-types.js +190 -0
- package/dist/lib/testing-types.js.map +1 -0
- package/dist/lib/work-flags.d.ts +3 -1
- package/dist/lib/work-flags.js +3 -1
- package/dist/lib/work-flags.js.map +1 -1
- package/dist/lib/work-types.d.ts +8 -1
- package/dist/lib/work-types.js +16 -3
- package/dist/lib/work-types.js.map +1 -1
- package/oclif.manifest.json +3447 -1079
- package/package.json +4 -1
package/dist/lib/mcp/tools.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { type CicdRegion } from '../cicd-region.js';
|
|
3
3
|
import { type CredentialType } from '../credential-store.js';
|
|
4
|
-
import { type Environment } from '../environment-types.js';
|
|
4
|
+
import { type Environment, type EnvironmentListFilters } from '../environment-types.js';
|
|
5
5
|
import { type JobListFilters } from '../job-types.js';
|
|
6
6
|
import { type ComparisonMode, type ContentSource, type DependencyResult, type IndexSearchResult, type IndexSource, type MetadataContentResult, type ModuleType, type OrderDirection, type PlatformExperience, type RetrieveMode } from '../metadata-common.js';
|
|
7
7
|
import { type IndexRefreshResult, type RefreshDeletedMetadataIndexResult } from '../metadata-refresh.js';
|
|
8
|
-
import { type PipelineConnection, type PipelineDescribe } from '../pipeline-types.js';
|
|
8
|
+
import { type PipelineConnection, type PipelineDescribe, type PipelineListFilters } from '../pipeline-types.js';
|
|
9
9
|
import { type ProjectDefaultScope } from '../project-defaults.js';
|
|
10
|
-
import { type Project } from '../project-types.js';
|
|
10
|
+
import { type Project, type ProjectListFilters } from '../project-types.js';
|
|
11
11
|
import { type PromotionConflict, type PromotionConflictMode, type PromotionConflictResolutionResult, type PromotionConflictUndoResult } from '../promotion-conflicts.js';
|
|
12
12
|
import { type PromotionDetail, type PromotionListFilters } from '../promotion-types.js';
|
|
13
13
|
import { type User } from '../user-types.js';
|
|
@@ -133,24 +133,14 @@ type MetadataDependencyArgs = {
|
|
|
133
133
|
sourceOrgId: string;
|
|
134
134
|
targetOrgId?: string;
|
|
135
135
|
};
|
|
136
|
-
declare function environmentList(args?:
|
|
137
|
-
limit?: number;
|
|
138
|
-
name?: string;
|
|
139
|
-
orgId?: string;
|
|
140
|
-
platform?: string;
|
|
141
|
-
type?: string;
|
|
142
|
-
}): Promise<{
|
|
143
|
-
environments: Environment[];
|
|
144
|
-
}>;
|
|
136
|
+
declare function environmentList(args?: EnvironmentListFilters): Promise<Record<string, unknown>>;
|
|
145
137
|
declare function environmentGet(args: {
|
|
146
138
|
id: string;
|
|
147
139
|
}): Promise<{
|
|
148
140
|
environment: Environment;
|
|
149
141
|
}>;
|
|
150
142
|
type PromotionListArgs = PromotionListFilters;
|
|
151
|
-
declare function promotionList(args?: PromotionListArgs): Promise<
|
|
152
|
-
promotions: import("../promotion-types.js").Promotion[];
|
|
153
|
-
}>;
|
|
143
|
+
declare function promotionList(args?: PromotionListArgs): Promise<Record<string, unknown>>;
|
|
154
144
|
declare function promotionGet(args: {
|
|
155
145
|
id: string;
|
|
156
146
|
}): Promise<{
|
|
@@ -162,9 +152,7 @@ declare function environmentCreate(args: EnvironmentCreateArgs): Promise<{
|
|
|
162
152
|
declare function environmentUpdate(args: EnvironmentUpdateArgs): Promise<{
|
|
163
153
|
environment: Environment;
|
|
164
154
|
}>;
|
|
165
|
-
declare function jobList(args: JobListArgs): Promise<
|
|
166
|
-
jobs: import("../job-types.js").Job[];
|
|
167
|
-
}>;
|
|
155
|
+
declare function jobList(args: JobListArgs): Promise<Record<string, unknown>>;
|
|
168
156
|
declare function jobGet(args: JobIdArgs): Promise<{
|
|
169
157
|
job: import("../job-types.js").Job;
|
|
170
158
|
}>;
|
|
@@ -180,9 +168,7 @@ declare function jobKill(args: JobIdArgs): Promise<{
|
|
|
180
168
|
declare function jobPause(args: JobIdArgs): Promise<{
|
|
181
169
|
result: import("../job-types.js").JobOperationResult;
|
|
182
170
|
}>;
|
|
183
|
-
declare function pipelineList(): Promise<
|
|
184
|
-
pipelines: import("../pipeline-types.js").Pipeline[];
|
|
185
|
-
}>;
|
|
171
|
+
declare function pipelineList(args?: PipelineListFilters): Promise<Record<string, unknown>>;
|
|
186
172
|
declare function pipelineGet(args: {
|
|
187
173
|
id: string;
|
|
188
174
|
}): Promise<{
|
|
@@ -193,12 +179,7 @@ declare function pipelineConnectionList(args: {
|
|
|
193
179
|
}): Promise<{
|
|
194
180
|
connections: PipelineConnection[];
|
|
195
181
|
}>;
|
|
196
|
-
declare function projectList(args?:
|
|
197
|
-
mine?: boolean;
|
|
198
|
-
name?: string;
|
|
199
|
-
}): Promise<{
|
|
200
|
-
projects: Project[];
|
|
201
|
-
}>;
|
|
182
|
+
declare function projectList(args?: ProjectListFilters): Promise<Record<string, unknown>>;
|
|
202
183
|
declare function userGet(args?: {
|
|
203
184
|
id?: string;
|
|
204
185
|
}): Promise<{
|
|
@@ -383,12 +364,20 @@ export declare const agentiaMcpToolHandlers: {
|
|
|
383
364
|
}) => Promise<{
|
|
384
365
|
userStory: import("../work-types.js").UserStory;
|
|
385
366
|
}>;
|
|
386
|
-
workList: (args?: import("../
|
|
367
|
+
workList: (args?: import("../list-pagination.js").ListPaginationQuery & {
|
|
368
|
+
assigneeId?: string;
|
|
369
|
+
assigneeName?: string;
|
|
370
|
+
name?: string;
|
|
371
|
+
ownerId?: string;
|
|
372
|
+
ownerName?: string;
|
|
373
|
+
projectId?: string;
|
|
374
|
+
projectName?: string;
|
|
375
|
+
status?: string;
|
|
376
|
+
title?: string;
|
|
377
|
+
} & {
|
|
387
378
|
assignedToMe?: boolean;
|
|
388
379
|
ownedByMe?: boolean;
|
|
389
|
-
}) => Promise<
|
|
390
|
-
userStories: import("../work-types.js").UserStory[];
|
|
391
|
-
}>;
|
|
380
|
+
}) => Promise<Record<string, unknown>>;
|
|
392
381
|
workPush: () => Promise<import("../work-types.js").WorkPushResult>;
|
|
393
382
|
workSet: (args: {
|
|
394
383
|
baseBranch?: string;
|
|
@@ -412,6 +401,274 @@ export declare const agentiaMcpToolHandlers: {
|
|
|
412
401
|
}) => Promise<{
|
|
413
402
|
userStory: import("../work-types.js").UserStory;
|
|
414
403
|
}>;
|
|
404
|
+
testingBuildList: (args: ({
|
|
405
|
+
domain?: string;
|
|
406
|
+
org?: number;
|
|
407
|
+
pat?: string;
|
|
408
|
+
} & {
|
|
409
|
+
project: number;
|
|
410
|
+
}) & {
|
|
411
|
+
job?: number;
|
|
412
|
+
resultSize?: "compact";
|
|
413
|
+
status?: import("../testing-types.js").TestingBuildStatus;
|
|
414
|
+
}) => Promise<{
|
|
415
|
+
result: import("../testing-types.js").TestingBuild[];
|
|
416
|
+
}>;
|
|
417
|
+
testingBuildLogs: (args: ({
|
|
418
|
+
domain?: string;
|
|
419
|
+
org?: number;
|
|
420
|
+
pat?: string;
|
|
421
|
+
} & {
|
|
422
|
+
project: number;
|
|
423
|
+
}) & {
|
|
424
|
+
build: number;
|
|
425
|
+
job: number;
|
|
426
|
+
output?: string;
|
|
427
|
+
}) => Promise<{
|
|
428
|
+
result: import("../testing-types.js").TestingLogResult;
|
|
429
|
+
}>;
|
|
430
|
+
testingBuildRun: (args: ({
|
|
431
|
+
domain?: string;
|
|
432
|
+
org?: number;
|
|
433
|
+
pat?: string;
|
|
434
|
+
} & {
|
|
435
|
+
project: number;
|
|
436
|
+
}) & {
|
|
437
|
+
job: number;
|
|
438
|
+
}) => Promise<{
|
|
439
|
+
result: import("../testing-types.js").TestingBuildRunResult;
|
|
440
|
+
}>;
|
|
441
|
+
testingCreate: (args: ({
|
|
442
|
+
domain?: string;
|
|
443
|
+
org?: number;
|
|
444
|
+
pat?: string;
|
|
445
|
+
} & {
|
|
446
|
+
project: number;
|
|
447
|
+
}) & {
|
|
448
|
+
description?: string;
|
|
449
|
+
dir?: string[];
|
|
450
|
+
file?: string[];
|
|
451
|
+
name: string;
|
|
452
|
+
robot: string;
|
|
453
|
+
}) => Promise<{
|
|
454
|
+
result: import("../testing-types.js").TestingJobCreateResult;
|
|
455
|
+
}>;
|
|
456
|
+
testingJobCreate: (args: ({
|
|
457
|
+
domain?: string;
|
|
458
|
+
org?: number;
|
|
459
|
+
pat?: string;
|
|
460
|
+
} & {
|
|
461
|
+
project: number;
|
|
462
|
+
}) & {
|
|
463
|
+
description?: string;
|
|
464
|
+
dir?: string[];
|
|
465
|
+
file?: string[];
|
|
466
|
+
name: string;
|
|
467
|
+
robot: string;
|
|
468
|
+
}) => Promise<{
|
|
469
|
+
result: import("../testing-types.js").TestingJobCreateResult;
|
|
470
|
+
}>;
|
|
471
|
+
testingJobDownload: (args: ({
|
|
472
|
+
domain?: string;
|
|
473
|
+
org?: number;
|
|
474
|
+
pat?: string;
|
|
475
|
+
} & {
|
|
476
|
+
project: number;
|
|
477
|
+
}) & {
|
|
478
|
+
branch?: string;
|
|
479
|
+
file: string[];
|
|
480
|
+
job: number;
|
|
481
|
+
outputDir?: string;
|
|
482
|
+
}) => Promise<{
|
|
483
|
+
result: import("../testing-types.js").TestingDownloadResult;
|
|
484
|
+
}>;
|
|
485
|
+
testingJobFiles: (args: ({
|
|
486
|
+
domain?: string;
|
|
487
|
+
org?: number;
|
|
488
|
+
pat?: string;
|
|
489
|
+
} & {
|
|
490
|
+
project: number;
|
|
491
|
+
}) & {
|
|
492
|
+
job: number;
|
|
493
|
+
}) => Promise<{
|
|
494
|
+
result: import("../testing-types.js").TestingFileEntry[];
|
|
495
|
+
}>;
|
|
496
|
+
testingJobList: (args: ({
|
|
497
|
+
domain?: string;
|
|
498
|
+
org?: number;
|
|
499
|
+
pat?: string;
|
|
500
|
+
} & {
|
|
501
|
+
project: number;
|
|
502
|
+
}) & {
|
|
503
|
+
name?: string;
|
|
504
|
+
}) => Promise<{
|
|
505
|
+
result: import("../testing-types.js").TestingJob[];
|
|
506
|
+
}>;
|
|
507
|
+
testingJobUpload: (args: ({
|
|
508
|
+
domain?: string;
|
|
509
|
+
org?: number;
|
|
510
|
+
pat?: string;
|
|
511
|
+
} & {
|
|
512
|
+
project: number;
|
|
513
|
+
}) & {
|
|
514
|
+
add?: string[];
|
|
515
|
+
authorEmail?: string;
|
|
516
|
+
authorName?: string;
|
|
517
|
+
branch?: string;
|
|
518
|
+
job: number;
|
|
519
|
+
remove?: string[];
|
|
520
|
+
replace?: string[];
|
|
521
|
+
}) => Promise<{
|
|
522
|
+
result: {
|
|
523
|
+
operations: import("../testing-types.js").TestingFileOperation[];
|
|
524
|
+
response: import("../testing-types.js").TestingRecord;
|
|
525
|
+
};
|
|
526
|
+
}>;
|
|
527
|
+
testingLogs: (args: ({
|
|
528
|
+
domain?: string;
|
|
529
|
+
org?: number;
|
|
530
|
+
pat?: string;
|
|
531
|
+
} & {
|
|
532
|
+
project: number;
|
|
533
|
+
}) & {
|
|
534
|
+
build: number;
|
|
535
|
+
job: number;
|
|
536
|
+
output?: string;
|
|
537
|
+
}) => Promise<{
|
|
538
|
+
result: import("../testing-types.js").TestingLogResult;
|
|
539
|
+
}>;
|
|
540
|
+
testingProjectCreate: (args: {
|
|
541
|
+
domain?: string;
|
|
542
|
+
org?: number;
|
|
543
|
+
pat?: string;
|
|
544
|
+
} & {
|
|
545
|
+
description?: string;
|
|
546
|
+
name: string;
|
|
547
|
+
}) => Promise<{
|
|
548
|
+
result: import("../testing-types.js").TestingProject;
|
|
549
|
+
}>;
|
|
550
|
+
testingProjectList: (args?: {
|
|
551
|
+
domain?: string;
|
|
552
|
+
org?: number;
|
|
553
|
+
pat?: string;
|
|
554
|
+
} & {
|
|
555
|
+
name?: string;
|
|
556
|
+
}) => Promise<{
|
|
557
|
+
result: import("../testing-types.js").TestingProject[];
|
|
558
|
+
}>;
|
|
559
|
+
testingRobotCreate: (args: ({
|
|
560
|
+
domain?: string;
|
|
561
|
+
org?: number;
|
|
562
|
+
pat?: string;
|
|
563
|
+
} & {
|
|
564
|
+
project: number;
|
|
565
|
+
}) & {
|
|
566
|
+
description?: string;
|
|
567
|
+
fwVersion?: string;
|
|
568
|
+
kind?: "cloud" | "QConnect";
|
|
569
|
+
name: string;
|
|
570
|
+
os?: string;
|
|
571
|
+
robotType?: string;
|
|
572
|
+
}) => Promise<{
|
|
573
|
+
result: import("../testing-types.js").TestingRobot;
|
|
574
|
+
}>;
|
|
575
|
+
testingRobotList: (args: {
|
|
576
|
+
domain?: string;
|
|
577
|
+
org?: number;
|
|
578
|
+
pat?: string;
|
|
579
|
+
} & {
|
|
580
|
+
project: number;
|
|
581
|
+
}) => Promise<{
|
|
582
|
+
result: import("../testing-types.js").TestingRobot[];
|
|
583
|
+
}>;
|
|
584
|
+
testingRun: (args: ({
|
|
585
|
+
domain?: string;
|
|
586
|
+
org?: number;
|
|
587
|
+
pat?: string;
|
|
588
|
+
} & {
|
|
589
|
+
project: number;
|
|
590
|
+
}) & {
|
|
591
|
+
job: number;
|
|
592
|
+
}) => Promise<{
|
|
593
|
+
result: import("../testing-types.js").TestingBuildRunResult;
|
|
594
|
+
}>;
|
|
595
|
+
testingStatus: (args: ({
|
|
596
|
+
domain?: string;
|
|
597
|
+
org?: number;
|
|
598
|
+
pat?: string;
|
|
599
|
+
} & {
|
|
600
|
+
project: number;
|
|
601
|
+
}) & {
|
|
602
|
+
job?: number;
|
|
603
|
+
resultSize?: "compact";
|
|
604
|
+
status?: import("../testing-types.js").TestingBuildStatus;
|
|
605
|
+
}) => Promise<{
|
|
606
|
+
result: import("../testing-types.js").TestingBuild[];
|
|
607
|
+
}>;
|
|
608
|
+
testingUpdate: (args: ({
|
|
609
|
+
domain?: string;
|
|
610
|
+
org?: number;
|
|
611
|
+
pat?: string;
|
|
612
|
+
} & {
|
|
613
|
+
project: number;
|
|
614
|
+
}) & {
|
|
615
|
+
add?: string[];
|
|
616
|
+
authorEmail?: string;
|
|
617
|
+
authorName?: string;
|
|
618
|
+
branch?: string;
|
|
619
|
+
job: number;
|
|
620
|
+
remove?: string[];
|
|
621
|
+
replace?: string[];
|
|
622
|
+
}) => Promise<{
|
|
623
|
+
result: {
|
|
624
|
+
operations: import("../testing-types.js").TestingFileOperation[];
|
|
625
|
+
response: import("../testing-types.js").TestingRecord;
|
|
626
|
+
};
|
|
627
|
+
}>;
|
|
628
|
+
testingVariableCreate: (args: ({
|
|
629
|
+
domain?: string;
|
|
630
|
+
org?: number;
|
|
631
|
+
pat?: string;
|
|
632
|
+
} & {
|
|
633
|
+
project: number;
|
|
634
|
+
}) & {
|
|
635
|
+
description?: string;
|
|
636
|
+
job?: number;
|
|
637
|
+
key: string;
|
|
638
|
+
robot?: number;
|
|
639
|
+
sensitive?: boolean;
|
|
640
|
+
type?: import("../testing-types.js").TestingVariableType;
|
|
641
|
+
userSpecific?: boolean;
|
|
642
|
+
value?: string;
|
|
643
|
+
}) => Promise<{
|
|
644
|
+
result: unknown;
|
|
645
|
+
}>;
|
|
646
|
+
testingVariableDelete: (args: ({
|
|
647
|
+
domain?: string;
|
|
648
|
+
org?: number;
|
|
649
|
+
pat?: string;
|
|
650
|
+
} & {
|
|
651
|
+
project: number;
|
|
652
|
+
}) & {
|
|
653
|
+
id: string;
|
|
654
|
+
}) => Promise<{
|
|
655
|
+
result: {
|
|
656
|
+
projectId: number;
|
|
657
|
+
variableId: string;
|
|
658
|
+
};
|
|
659
|
+
}>;
|
|
660
|
+
testingVariableList: (args: ({
|
|
661
|
+
domain?: string;
|
|
662
|
+
org?: number;
|
|
663
|
+
pat?: string;
|
|
664
|
+
} & {
|
|
665
|
+
project: number;
|
|
666
|
+
}) & {
|
|
667
|
+
job?: number;
|
|
668
|
+
robot?: number;
|
|
669
|
+
}) => Promise<{
|
|
670
|
+
result: import("../testing-types.js").TestingVariable[];
|
|
671
|
+
}>;
|
|
415
672
|
authGet: typeof authGet;
|
|
416
673
|
authSet: typeof authSet;
|
|
417
674
|
environmentAuthStatus: typeof environmentAuthStatus;
|
package/dist/lib/mcp/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-lines -- Tool schemas and registrations are intentionally colocated. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { normalizeEnvironmentsListPage } from '../../commands/environment/list.js';
|
|
4
4
|
import { buildMetadataCompareFileRequests } from '../../commands/metadata/content/compare.js';
|
|
5
5
|
import { buildMetadataContentRequest } from '../../commands/metadata/content/get.js';
|
|
6
6
|
import { buildMetadataCompareRequest } from '../../commands/metadata/index/compare.js';
|
|
@@ -13,43 +13,30 @@ import { readDefaults, readLastWorkItem, resolveDefaults, unsetDefaults, writeDe
|
|
|
13
13
|
import { runEnvironmentAuthStatus } from '../environment-auth-status.js';
|
|
14
14
|
import { buildCreatePayload, buildMutationPayload, ENVIRONMENT_STRING_VALIDATION_KEYS, validateNonEmptyStringFields, } from '../environment-flags.js';
|
|
15
15
|
import { DEFAULT_ENVIRONMENT_PLATFORM, DEFAULT_ENVIRONMENT_TYPE, ENVIRONMENT_TYPES, environmentEndpoint, environmentsListEndpoint, } from '../environment-types.js';
|
|
16
|
-
import {
|
|
16
|
+
import { jobEndpoint, jobKillEndpoint, jobListEndpoint, jobPauseEndpoint, jobResultLogEndpoint, jobResumeEndpoint, jobRunEndpoint, normalizeJob, normalizeJobOperation, normalizeJobsListPage, resolveJobStepForLog, } from '../job-types.js';
|
|
17
|
+
import { listPaginationZodFields, mcpPaginatedListPayload } from '../list-pagination.js';
|
|
17
18
|
import { normalizeLocalGatewayBaseUrl, readLocalGatewayConfig } from '../local-gateway-config.js';
|
|
18
19
|
import { COMPARISON_MODES, CONTENT_SOURCES, contentResultToCompareSide, createUnifiedDiff, INDEX_SOURCES, MODULE_TYPES, ORDER_DIRECTIONS, PLATFORM_EXPERIENCES, RETRIEVE_MODES, sourceSideLabel, } from '../metadata-common.js';
|
|
19
20
|
import { buildRefreshDeletedRequest, buildRefreshIndexRequest, refreshStatusEndpoint, resolveRefreshSourceFromEnv, } from '../metadata-refresh.js';
|
|
20
|
-
import { normalizePipelineDescribe, normalizePipelines, pipelineConnectionsFromPipelines, pipelineDescribeEndpoint, pipelineListEndpoint, } from '../pipeline-types.js';
|
|
21
|
+
import { normalizePipelineDescribe, normalizePipelines, normalizePipelinesListPage, pipelineConnectionsFromPipelines, pipelineDescribeEndpoint, pipelineListEndpoint, } from '../pipeline-types.js';
|
|
21
22
|
import { buildSetValues, collectSelectedKeys } from '../project-default-flags.js';
|
|
22
23
|
import { PROJECT_DEFAULT_KEYS } from '../project-defaults.js';
|
|
23
|
-
import { normalizeProject,
|
|
24
|
+
import { normalizeProject, normalizeProjectsListPage, projectEndpoint, projectsListEndpoint, } from '../project-types.js';
|
|
24
25
|
import { buildPromotionConflictResolutionRequest, normalizePromotionConflicts, PROMOTION_CONFLICT_MODES, promotionConflictContentEndpoint, promotionConflictResolveEndpoint, promotionConflictsEndpoint, promotionConflictUndoEndpoint, withPromotionConflictErrorTranslation, } from '../promotion-conflicts.js';
|
|
25
|
-
import { normalizePromotionDetail,
|
|
26
|
+
import { normalizePromotionDetail, normalizePromotionsListPage, promotionEndpoint, promotionListEndpoint, } from '../promotion-types.js';
|
|
26
27
|
import { getUserContext } from '../user-context.js';
|
|
27
28
|
import { DEFAULT_USER_ID, resolveUserId, userEndpoint } from '../user-types.js';
|
|
28
29
|
import { workStatusEndpoint } from '../work-types.js';
|
|
29
30
|
import { safelyHandleTool } from './result.js';
|
|
31
|
+
import { agentiaMcpTestingToolHandlers, registerAgentiaMcpTestingTools } from './testing-tools.js';
|
|
30
32
|
import { agentiaMcpWorkToolHandlers, registerAgentiaMcpWorkTools } from './work-tools.js';
|
|
31
33
|
const MAX_LIMIT = 2000;
|
|
32
34
|
async function environmentList(args = {}) {
|
|
33
|
-
const filters = {};
|
|
34
|
-
if (args.name !== undefined) {
|
|
35
|
-
filters.name = args.name;
|
|
36
|
-
}
|
|
37
|
-
if (args.orgId !== undefined) {
|
|
38
|
-
filters.orgId = args.orgId;
|
|
39
|
-
}
|
|
40
|
-
if (args.platform !== undefined) {
|
|
41
|
-
filters.platform = args.platform;
|
|
42
|
-
}
|
|
43
|
-
if (args.type !== undefined) {
|
|
44
|
-
filters.type = args.type;
|
|
45
|
-
}
|
|
46
35
|
const response = await CicdGateway.call({
|
|
47
|
-
endpoint: environmentsListEndpoint(
|
|
36
|
+
endpoint: environmentsListEndpoint(args),
|
|
48
37
|
method: 'GET',
|
|
49
38
|
});
|
|
50
|
-
|
|
51
|
-
const limit = args.limit === undefined ? environments.length : Math.min(Math.max(args.limit, 1), MAX_LIMIT);
|
|
52
|
-
return { environments: environments.slice(0, limit) };
|
|
39
|
+
return mcpPaginatedListPayload('environments', normalizeEnvironmentsListPage(response));
|
|
53
40
|
}
|
|
54
41
|
async function environmentGet(args) {
|
|
55
42
|
const environment = await CicdGateway.call({
|
|
@@ -63,7 +50,7 @@ async function promotionList(args = {}) {
|
|
|
63
50
|
endpoint: promotionListEndpoint(args),
|
|
64
51
|
method: 'GET',
|
|
65
52
|
});
|
|
66
|
-
return
|
|
53
|
+
return mcpPaginatedListPayload('promotions', normalizePromotionsListPage(response));
|
|
67
54
|
}
|
|
68
55
|
async function promotionGet(args) {
|
|
69
56
|
const response = await CicdGateway.call({
|
|
@@ -145,9 +132,10 @@ async function environmentUpdate(args) {
|
|
|
145
132
|
async function jobList(args) {
|
|
146
133
|
const filters = {
|
|
147
134
|
context: args.context,
|
|
135
|
+
cursor: args.cursor,
|
|
148
136
|
id: args.id,
|
|
149
|
-
limit: args.limit,
|
|
150
137
|
name: args.name,
|
|
138
|
+
pageSize: args.pageSize,
|
|
151
139
|
parent: args.parent,
|
|
152
140
|
status: args.status,
|
|
153
141
|
type: args.type,
|
|
@@ -163,7 +151,7 @@ async function jobList(args) {
|
|
|
163
151
|
endpoint: jobListEndpoint(filters),
|
|
164
152
|
method: 'GET',
|
|
165
153
|
});
|
|
166
|
-
return
|
|
154
|
+
return mcpPaginatedListPayload('jobs', normalizeJobsListPage(response));
|
|
167
155
|
}
|
|
168
156
|
async function jobGet(args) {
|
|
169
157
|
const response = await CicdGateway.call({
|
|
@@ -200,12 +188,12 @@ async function jobPause(args) {
|
|
|
200
188
|
});
|
|
201
189
|
return { result: normalizeJobOperation(result) };
|
|
202
190
|
}
|
|
203
|
-
async function pipelineList() {
|
|
191
|
+
async function pipelineList(args = {}) {
|
|
204
192
|
const response = await CicdGateway.call({
|
|
205
|
-
endpoint: pipelineListEndpoint(),
|
|
193
|
+
endpoint: pipelineListEndpoint(args),
|
|
206
194
|
method: 'GET',
|
|
207
195
|
});
|
|
208
|
-
return
|
|
196
|
+
return mcpPaginatedListPayload('pipelines', normalizePipelinesListPage(response));
|
|
209
197
|
}
|
|
210
198
|
async function pipelineGet(args) {
|
|
211
199
|
const response = await CicdGateway.call({
|
|
@@ -234,18 +222,11 @@ async function pipelineConnectionList(args) {
|
|
|
234
222
|
return { connections };
|
|
235
223
|
}
|
|
236
224
|
async function projectList(args = {}) {
|
|
237
|
-
const filters = {};
|
|
238
|
-
if (args.mine) {
|
|
239
|
-
filters.mine = true;
|
|
240
|
-
}
|
|
241
|
-
if (typeof args.name === 'string') {
|
|
242
|
-
filters.name = args.name;
|
|
243
|
-
}
|
|
244
225
|
const response = await CicdGateway.call({
|
|
245
|
-
endpoint: projectsListEndpoint(
|
|
226
|
+
endpoint: projectsListEndpoint(args),
|
|
246
227
|
method: 'GET',
|
|
247
228
|
});
|
|
248
|
-
return
|
|
229
|
+
return mcpPaginatedListPayload('projects', normalizeProjectsListPage(response));
|
|
249
230
|
}
|
|
250
231
|
async function userGet(args = {}) {
|
|
251
232
|
const user = await CicdGateway.call({
|
|
@@ -667,6 +648,7 @@ export const agentiaMcpToolHandlers = {
|
|
|
667
648
|
promotionList,
|
|
668
649
|
userGet,
|
|
669
650
|
workStatus,
|
|
651
|
+
...agentiaMcpTestingToolHandlers,
|
|
670
652
|
...agentiaMcpWorkToolHandlers,
|
|
671
653
|
};
|
|
672
654
|
const environmentMutationSchema = {
|
|
@@ -698,13 +680,6 @@ const promotionListSchema = {
|
|
|
698
680
|
destinationEnvironmentId: z.string().optional().describe('Filter by destination environment ID.'),
|
|
699
681
|
destinationEnvironmentName: z.string().optional().describe('Filter by destination environment name.'),
|
|
700
682
|
isBackPromotion: z.boolean().optional().describe('Filter by back promotion.'),
|
|
701
|
-
limit: z
|
|
702
|
-
.number()
|
|
703
|
-
.int()
|
|
704
|
-
.min(PROMOTION_LIST_LIMIT_MIN)
|
|
705
|
-
.max(PROMOTION_LIST_LIMIT_MAX)
|
|
706
|
-
.optional()
|
|
707
|
-
.describe(`Maximum number of promotions to return (${PROMOTION_LIST_LIMIT_MIN}-${PROMOTION_LIST_LIMIT_MAX}).`),
|
|
708
683
|
name: z.string().optional().describe('Filter by name.'),
|
|
709
684
|
pipelineId: z.string().optional().describe('Filter by pipeline ID.'),
|
|
710
685
|
pipelineName: z.string().optional().describe('Filter by pipeline name.'),
|
|
@@ -714,16 +689,18 @@ const promotionListSchema = {
|
|
|
714
689
|
sourceEnvironmentName: z.string().optional().describe('Filter by source environment name.'),
|
|
715
690
|
status: z.string().optional().describe('Filter by status.'),
|
|
716
691
|
userStoryId: z.string().optional().describe('Filter by user story ID.'),
|
|
692
|
+
...listPaginationZodFields,
|
|
717
693
|
};
|
|
718
694
|
export function registerAgentiaMcpTools(server) {
|
|
695
|
+
registerAgentiaMcpTestingTools(server);
|
|
719
696
|
server.registerTool('agentia_environment_list', {
|
|
720
697
|
description: 'List Copado environments via the CICD gateway.',
|
|
721
698
|
inputSchema: {
|
|
722
|
-
limit: z.number().int().min(1).max(MAX_LIMIT).optional().describe('Maximum number of environments to return.'),
|
|
723
699
|
name: z.string().optional().describe('Filter by name.'),
|
|
724
700
|
orgId: z.string().optional().describe('Filter by Salesforce org ID.'),
|
|
725
701
|
platform: z.string().optional().describe('Filter by platform.'),
|
|
726
702
|
type: z.string().optional().describe('Filter by environment type.'),
|
|
703
|
+
...listPaginationZodFields,
|
|
727
704
|
},
|
|
728
705
|
title: 'Agentia Environment List',
|
|
729
706
|
}, (args) => safelyHandleTool(() => environmentList(args || {})));
|
|
@@ -768,18 +745,12 @@ export function registerAgentiaMcpTools(server) {
|
|
|
768
745
|
inputSchema: {
|
|
769
746
|
context: z.string().optional().describe('Contains match on JobExecution context.'),
|
|
770
747
|
id: z.string().optional().describe('Exact JobExecution Id.'),
|
|
771
|
-
limit: z
|
|
772
|
-
.number()
|
|
773
|
-
.int()
|
|
774
|
-
.min(JOB_LIST_LIMIT_MIN)
|
|
775
|
-
.max(JOB_LIST_LIMIT_MAX)
|
|
776
|
-
.optional()
|
|
777
|
-
.describe(`Maximum number of jobs to return (${JOB_LIST_LIMIT_MIN}-${JOB_LIST_LIMIT_MAX}).`),
|
|
778
748
|
mine: z.boolean().optional().describe('List only jobs owned by the current user.'),
|
|
779
749
|
name: z.string().optional().describe('Contains match on JobExecution name.'),
|
|
780
750
|
parent: z.string().optional().describe('Exact parent record Id.'),
|
|
781
751
|
status: z.string().optional().describe('Exact Copado job status.'),
|
|
782
752
|
type: z.string().optional().describe('Contains match on Job Template name.'),
|
|
753
|
+
...listPaginationZodFields,
|
|
783
754
|
},
|
|
784
755
|
title: 'Agentia Job List',
|
|
785
756
|
}, (args) => safelyHandleTool(() => jobList(args)));
|
|
@@ -821,9 +792,9 @@ export function registerAgentiaMcpTools(server) {
|
|
|
821
792
|
}, (args) => safelyHandleTool(() => jobPause(args)));
|
|
822
793
|
server.registerTool('agentia_pipeline_list', {
|
|
823
794
|
description: 'List Copado pipelines via the CICD gateway.',
|
|
824
|
-
inputSchema:
|
|
795
|
+
inputSchema: listPaginationZodFields,
|
|
825
796
|
title: 'Agentia Pipeline List',
|
|
826
|
-
}, () => safelyHandleTool(() => pipelineList()));
|
|
797
|
+
}, (args) => safelyHandleTool(() => pipelineList(args || {})));
|
|
827
798
|
server.registerTool('agentia_pipeline_get', {
|
|
828
799
|
description: 'Describe a Copado pipeline via the CICD gateway.',
|
|
829
800
|
inputSchema: {
|
|
@@ -843,6 +814,7 @@ export function registerAgentiaMcpTools(server) {
|
|
|
843
814
|
inputSchema: {
|
|
844
815
|
mine: z.boolean().optional().describe('When true, list only projects owned by or related to the current user.'),
|
|
845
816
|
name: z.string().optional().describe('Filter by name (partial match).'),
|
|
817
|
+
...listPaginationZodFields,
|
|
846
818
|
},
|
|
847
819
|
title: 'Agentia Project List',
|
|
848
820
|
}, (args) => safelyHandleTool(() => projectList(args || {})));
|