@copado/agentia-cli 1.0.0-beta.6 → 1.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +280 -277
- package/dist/commands/adv/component/add.js +1 -1
- package/dist/commands/adv/component/remove.js +1 -1
- package/dist/commands/adv/component/types.js +1 -1
- package/dist/commands/adv/deployment/deploy.js +4 -1
- package/dist/commands/adv/deployment/list.js +1 -1
- package/dist/commands/adv/deployment/options.js +1 -1
- package/dist/commands/adv/deployment/quick-deploy.js +5 -2
- package/dist/commands/adv/deployment/validate.js +4 -1
- package/dist/commands/adv/job/list.js +3 -3
- package/dist/commands/adv/job/wait.js +7 -3
- package/dist/commands/cicd/environment/get.js +3 -6
- package/dist/commands/cicd/environment/list.js +2 -7
- package/dist/commands/cicd/job/get.js +3 -7
- package/dist/commands/cicd/job/list.js +3 -7
- package/dist/commands/cicd/pipeline/get.js +3 -7
- package/dist/commands/cicd/pipeline/list.js +3 -7
- package/dist/commands/cicd/project/get.js +3 -7
- package/dist/commands/cicd/project/list.js +3 -7
- package/dist/commands/cicd/promotion/get.js +3 -7
- package/dist/commands/cicd/promotion/list.js +3 -7
- package/dist/commands/cicd/stage/list.js +5 -6
- package/dist/commands/cicd/user/get.js +3 -7
- package/dist/commands/cicd/work/get.js +2 -2
- package/dist/commands/cicd/work/list.js +3 -7
- package/dist/commands/cicd/work/promote.js +1 -0
- package/dist/lib/adv-operations.js +4 -1
- package/dist/lib/agentia-command.js +38 -2
- package/dist/lib/ai-config.js +3 -1
- package/dist/lib/auth-profile.js +2 -1
- package/dist/lib/environment-get.js +4 -0
- package/dist/lib/job-get.js +4 -0
- package/dist/lib/mcp/adv-tools.js +12 -6
- package/dist/lib/mcp/tools.js +25 -67
- package/dist/lib/mcp/work-tools.js +4 -8
- package/dist/lib/pipeline-get.js +4 -0
- package/dist/lib/plugin-host/ai.js +5 -0
- package/dist/lib/plugin-host/environment.js +4 -0
- package/dist/lib/plugin-host/event-log.js +2 -1
- package/dist/lib/plugin-host/input.js +7 -0
- package/dist/lib/plugin-host/job.js +4 -0
- package/dist/lib/plugin-host/pipeline.js +4 -0
- package/dist/lib/plugin-host/project.js +5 -0
- package/dist/lib/plugin-host/projection-utils.js +6 -1
- package/dist/lib/plugin-host/promotion.js +4 -0
- package/dist/lib/plugin-host/stage.js +4 -0
- package/dist/lib/plugin-host/user.js +4 -0
- package/dist/lib/plugin-host/workspace.js +3 -0
- package/dist/lib/project-get.js +4 -0
- package/dist/lib/promotion-get.js +4 -0
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/stage-list.js +3 -0
- package/dist/lib/testing-gateway.js +2 -1
- package/dist/lib/user-get.js +3 -0
- package/dist/lib/work-get.js +3 -2
- package/oclif.manifest.json +271 -20
- package/package.json +1 -1
- package/templates/skills/agentia-adv/SKILL.md +3 -1
- package/templates/skills/agentia-adv/references/pipelines-advanced.md +19 -3
package/dist/lib/auth-profile.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {modules} from './runtime.js';
|
|
2
2
|
const deleteAuthProfile = modules["auth-profile.js"]["deleteAuthProfile"]
|
|
3
|
+
const deleteAuthProfileUserId = modules["auth-profile.js"]["deleteAuthProfileUserId"]
|
|
3
4
|
const ensureLocalKeychainId = modules["auth-profile.js"]["ensureLocalKeychainId"]
|
|
4
5
|
const localProfileKeychainId = modules["auth-profile.js"]["localProfileKeychainId"]
|
|
5
6
|
const readAuthProfile = modules["auth-profile.js"]["readAuthProfile"]
|
|
6
7
|
const updateAuthProfile = modules["auth-profile.js"]["updateAuthProfile"]
|
|
7
8
|
const writeAuthProfile = modules["auth-profile.js"]["writeAuthProfile"]
|
|
8
|
-
export {deleteAuthProfile, ensureLocalKeychainId, localProfileKeychainId, readAuthProfile, updateAuthProfile, writeAuthProfile};
|
|
9
|
+
export {deleteAuthProfile, deleteAuthProfileUserId, ensureLocalKeychainId, localProfileKeychainId, readAuthProfile, updateAuthProfile, writeAuthProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { addAdvComponents, cancelAdvDeployment, createAdvDeployment, getAdvAuthStatus, getAdvDeployment, getAdvJob, getAdvOrganization, listAdvComponents, listAdvComponentTypes, listAdvDeployments, listAdvJobs, listAdvOrganizations, parseAdvComponentSpec, refreshAdvComponents, removeAdvComponents, runAdvDeploymentAction, selectedAdvComponents, updateAdvDeploymentOptions, validateAdvOrganization, waitForAdvJob, } from '../adv-operations.js';
|
|
2
|
+
import { addAdvComponents, assertAdvJobSucceeded, cancelAdvDeployment, createAdvDeployment, getAdvAuthStatus, getAdvDeployment, getAdvJob, getAdvOrganization, listAdvComponents, listAdvComponentTypes, listAdvDeployments, listAdvJobs, listAdvOrganizations, parseAdvComponentSpec, refreshAdvComponents, removeAdvComponents, runAdvDeploymentAction, selectedAdvComponents, updateAdvDeploymentOptions, validateAdvOrganization, waitForAdvJob, } from '../adv-operations.js';
|
|
3
3
|
import { safelyHandleTool } from './result.js';
|
|
4
4
|
const componentReferenceSchema = z.union([
|
|
5
5
|
z.string().min(1).describe('Component in Type/Name format.'),
|
|
@@ -82,7 +82,7 @@ export function registerAgentiaMcpAdvTools(server) {
|
|
|
82
82
|
description: 'Update Copado Pipelines Advanced deployment options.',
|
|
83
83
|
inputSchema: {
|
|
84
84
|
id: z.number().int().positive().describe('Deployment ID.'),
|
|
85
|
-
set: z.array(z.string()).optional().describe('Options as name=value entries.'),
|
|
85
|
+
set: z.array(z.string()).optional().describe('Options as name=value entries; booleans, null, and finite JavaScript Number values are converted.'),
|
|
86
86
|
},
|
|
87
87
|
title: 'Agentia ADV Deployment Options',
|
|
88
88
|
}, (args) => safelyHandleTool(async () => ({ result: await updateAdvDeploymentOptions({ id: args.id, set: args.set }) })));
|
|
@@ -110,7 +110,7 @@ export function registerAgentiaMcpAdvTools(server) {
|
|
|
110
110
|
server.registerTool('agentia_adv_deployment_quick_deploy', {
|
|
111
111
|
description: 'Start a Copado Pipelines Advanced quick deploy run.',
|
|
112
112
|
inputSchema: {
|
|
113
|
-
backup: z.boolean().optional().describe('
|
|
113
|
+
backup: z.boolean().optional().describe('Run backupThenDeploy instead of a quick deploy.'),
|
|
114
114
|
confirm: z.boolean().optional().describe('Required true to start a quick deploy.'),
|
|
115
115
|
id: z.number().int().positive().describe('Deployment ID.'),
|
|
116
116
|
interval: z.number().positive().optional().describe('Seconds between polls when wait is true.'),
|
|
@@ -214,8 +214,14 @@ export function registerAgentiaMcpAdvTools(server) {
|
|
|
214
214
|
timeout: z.number().positive().optional().describe('Maximum seconds to wait.'),
|
|
215
215
|
},
|
|
216
216
|
title: 'Agentia ADV Job Wait',
|
|
217
|
-
}, (args) => safelyHandleTool(async () =>
|
|
218
|
-
result
|
|
219
|
-
|
|
217
|
+
}, (args) => safelyHandleTool(async () => {
|
|
218
|
+
const result = await waitForAdvJob({
|
|
219
|
+
deploymentId: args.deploymentId,
|
|
220
|
+
intervalSeconds: args.interval,
|
|
221
|
+
timeoutSeconds: args.timeout,
|
|
222
|
+
});
|
|
223
|
+
assertAdvJobSucceeded(result);
|
|
224
|
+
return { result };
|
|
225
|
+
}));
|
|
220
226
|
}
|
|
221
227
|
//# sourceMappingURL=adv-tools.js.map
|
package/dist/lib/mcp/tools.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable max-lines -- Tool schemas and registrations are intentionally colocated. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { normalizeEnvironmentsListPage } from '../../commands/cicd/environment/list.js';
|
|
4
3
|
import { buildMetadataCompareFileRequests } from '../../commands/cicd/metadata/content/compare.js';
|
|
5
4
|
import { buildMetadataContentRequest } from '../../commands/cicd/metadata/content/get.js';
|
|
6
5
|
import { buildMetadataCompareRequest } from '../../commands/cicd/metadata/index/compare.js';
|
|
@@ -15,10 +14,12 @@ import { runEnvironmentAuthStatus } from '../environment-auth-status.js';
|
|
|
15
14
|
import { collectCredentialUpdateFlagKeys, validateCredentialName } from '../environment-credential-flags.js';
|
|
16
15
|
import { createEnvironmentCredential, listEnvironmentCredentials, resolveEnvironmentOrgType, sanitizeEnvironment, updateEnvironmentCredential, } from '../environment-credential-operations.js';
|
|
17
16
|
import { buildCreatePayload, buildMutationPayload, ENVIRONMENT_STRING_VALIDATION_KEYS, validateNonEmptyStringFields, } from '../environment-flags.js';
|
|
18
|
-
import {
|
|
17
|
+
import { fetchEnvironment, fetchEnvironments } from '../environment-get.js';
|
|
18
|
+
import { DEFAULT_ENVIRONMENT_PLATFORM, DEFAULT_ENVIRONMENT_TYPE, ENVIRONMENT_TYPES, environmentEndpoint, } from '../environment-types.js';
|
|
19
19
|
import { executeLocalFunctionRun } from '../function-local-run.js';
|
|
20
20
|
import { FUNCTION_LIST_TYPES, FUNCTION_RUNTIMES, functionEndpoint, functionResultEndpoint, functionResultLogEndpoint, functionRunEndpoint, functionsEndpoint, normalizeFunction, normalizeFunctionResultStatus, normalizeFunctionRunResult, normalizeFunctionsListPage, normalizeFunctionUpsertPayload, } from '../function-types.js';
|
|
21
|
-
import {
|
|
21
|
+
import { fetchJob, fetchJobs } from '../job-get.js';
|
|
22
|
+
import { jobEndpoint, jobKillEndpoint, jobPauseEndpoint, jobResultFileContentEndpoint, jobResultFilesEndpoint, jobResultLogEndpoint, jobResumeEndpoint, jobRunEndpoint, normalizeJob, normalizeJobOperation, normalizeJobResultFileContent, normalizeJobResultFiles, resolveJobStepForLog, } from '../job-types.js';
|
|
22
23
|
import { listPaginationZodFields, mcpPaginatedListPayload } from '../list-pagination.js';
|
|
23
24
|
import { COMPARISON_MODES, CONTENT_SOURCES, contentResultToCompareSide, createUnifiedDiff, INDEX_SOURCES, MODULE_TYPES, ORDER_DIRECTIONS, PLATFORM_EXPERIENCES, RETRIEVE_MODES, sourceSideLabel, } from '../metadata-common.js';
|
|
24
25
|
import { buildRefreshDeletedRequest, buildRefreshIndexRequest, refreshStatusEndpoint, resolveRefreshSourceFromEnv, } from '../metadata-refresh.js';
|
|
@@ -27,23 +28,27 @@ import { configureNotification, NOTIFICATION_DESTINATION_TYPES, NOTIFICATION_EVE
|
|
|
27
28
|
import { getNotificationSubscriptions } from '../notifications-get.js';
|
|
28
29
|
import { parsePipelineConnectionMutationObject, parsePipelineConnectionUpdateObject, validatePipelineConnectionCreatePayload, validatePipelineConnectionUpdatePayload, } from '../pipeline-connection-flags.js';
|
|
29
30
|
import { validatePipelineMutationPayload, } from '../pipeline-flags.js';
|
|
31
|
+
import { fetchPipeline, fetchPipelines } from '../pipeline-get.js';
|
|
30
32
|
import { buildPipelineStageConnectionCreatePayload, buildPipelineStageConnectionUpdatePayload, } from '../pipeline-stage-connection-flags.js';
|
|
31
|
-
import { normalizePipeline, normalizePipelineConnections, normalizePipelineDescribe, normalizePipelines,
|
|
33
|
+
import { normalizePipeline, normalizePipelineConnections, normalizePipelineDescribe, normalizePipelines, PIPELINE_CALCULATE_BASED_ON_VALUES, PIPELINE_CONNECTION_SYNC_STATE_NEEDS_RECALCULATING, PIPELINE_PLATFORMS, pipelineConnectionsEndpoint, pipelineConnectionsFromPipelines, pipelineDescribeEndpoint, pipelineEndpoint, pipelineListEndpoint, } from '../pipeline-types.js';
|
|
32
34
|
import { buildSetValues, collectSelectedKeys } from '../project-default-flags.js';
|
|
33
35
|
import { validateProjectDefaultIdentifiers } from '../project-default-validation.js';
|
|
34
36
|
import { PROJECT_DEFAULT_KEYS } from '../project-defaults.js';
|
|
35
37
|
import { validateProjectListFilters, validateProjectMutationPayload } from '../project-flags.js';
|
|
36
|
-
import {
|
|
38
|
+
import { fetchProject, fetchProjects } from '../project-get.js';
|
|
39
|
+
import { normalizeProject, projectEndpoint, projectsListEndpoint, } from '../project-types.js';
|
|
37
40
|
import { buildPromotionConflictResolutionRequest, normalizePromotionConflicts, PROMOTION_CONFLICT_MODES, promotionConflictContentEndpoint, promotionConflictResolveEndpoint, promotionConflictsEndpoint, promotionConflictUndoEndpoint, withPromotionConflictErrorTranslation, } from '../promotion-conflicts.js';
|
|
41
|
+
import { fetchPromotion, fetchPromotions } from '../promotion-get.js';
|
|
38
42
|
import { buildPromotionManualTaskUpdatePayload, PROMOTION_MANUAL_TASK_STATUSES, promotionManualTaskEndpoint, } from '../promotion-job-steps.js';
|
|
39
43
|
import { performPromotionResume, performPromotionRun, PROMOTION_OPERATIONS, PROMOTION_RUN_DEFAULT_TIMEOUT_SECONDS, } from '../promotion-run.js';
|
|
40
|
-
import { normalizePromotionDetail, normalizePromotionsListPage, promotionEndpoint, promotionListEndpoint, } from '../promotion-types.js';
|
|
41
44
|
import { REPOSITORY_STRING_VALIDATION_KEYS, validateNonEmptyStringFields as validateRepositoryNonEmptyStringFields, } from '../repository-flags.js';
|
|
42
45
|
import { normalizeRepositoriesListPage, normalizeRepository, normalizeRepositoryValidateResult, repositoriesEndpoint, REPOSITORY_PROVIDERS, REPOSITORY_SOURCE_FORMATS, repositoryEndpoint, repositoryHttpsAuthEndpoint, repositoryResetEndpoint, repositorySshAuthEndpoint, repositoryValidateEndpoint, } from '../repository-types.js';
|
|
43
46
|
import { buildStageMutationPayload, validateStagePayload } from '../stage-flags.js';
|
|
44
|
-
import {
|
|
47
|
+
import { fetchStages } from '../stage-list.js';
|
|
48
|
+
import { normalizePipelineStageConnection, normalizeStage, pipelineStageConnectionEndpoint, pipelineStageConnectionsEndpoint, STAGE_META_STAGE_SUGGESTIONS, stageEndpoint, stagesEndpoint, } from '../stage-types.js';
|
|
45
49
|
import { getUserContext } from '../user-context.js';
|
|
46
|
-
import {
|
|
50
|
+
import { fetchUser } from '../user-get.js';
|
|
51
|
+
import { DEFAULT_USER_ID } from '../user-types.js';
|
|
47
52
|
import { resolveRecordedWorkBranchMetadata } from '../work-branch-metadata.js';
|
|
48
53
|
import { workStatusEndpoint } from '../work-types.js';
|
|
49
54
|
import { registerAgentiaMcpAdvTools } from './adv-tools.js';
|
|
@@ -56,17 +61,10 @@ import { agentiaMcpTestingToolHandlers, registerAgentiaMcpTestingTools } from '.
|
|
|
56
61
|
import { agentiaMcpWorkToolHandlers, registerAgentiaMcpWorkTools } from './work-tools.js';
|
|
57
62
|
const MAX_LIMIT = 2000;
|
|
58
63
|
async function environmentList(args = {}) {
|
|
59
|
-
|
|
60
|
-
endpoint: environmentsListEndpoint(args),
|
|
61
|
-
method: 'GET',
|
|
62
|
-
});
|
|
63
|
-
return mcpPaginatedListPayload('environments', normalizeEnvironmentsListPage(response));
|
|
64
|
+
return mcpPaginatedListPayload('environments', await fetchEnvironments(args));
|
|
64
65
|
}
|
|
65
66
|
async function environmentGet(args) {
|
|
66
|
-
const environment = sanitizeEnvironment(await
|
|
67
|
-
endpoint: environmentEndpoint(assertRequired(args.id, 'id')),
|
|
68
|
-
method: 'GET',
|
|
69
|
-
}));
|
|
67
|
+
const environment = sanitizeEnvironment(await fetchEnvironment(assertRequired(args.id, 'id')));
|
|
70
68
|
return { environment };
|
|
71
69
|
}
|
|
72
70
|
const silentPromotionRunHooks = {
|
|
@@ -74,18 +72,10 @@ const silentPromotionRunHooks = {
|
|
|
74
72
|
withSpinner: async (_message, action) => action(),
|
|
75
73
|
};
|
|
76
74
|
async function promotionList(args = {}) {
|
|
77
|
-
|
|
78
|
-
endpoint: promotionListEndpoint(args),
|
|
79
|
-
method: 'GET',
|
|
80
|
-
});
|
|
81
|
-
return mcpPaginatedListPayload('promotions', normalizePromotionsListPage(response));
|
|
75
|
+
return mcpPaginatedListPayload('promotions', await fetchPromotions(args));
|
|
82
76
|
}
|
|
83
77
|
async function promotionGet(args) {
|
|
84
|
-
|
|
85
|
-
endpoint: promotionEndpoint(assertRequired(args.id, 'id')),
|
|
86
|
-
method: 'GET',
|
|
87
|
-
});
|
|
88
|
-
return { promotion: normalizePromotionDetail(response) };
|
|
78
|
+
return { promotion: await fetchPromotion(assertRequired(args.id, 'id')) };
|
|
89
79
|
}
|
|
90
80
|
async function promotionRun(args) {
|
|
91
81
|
const waitTimeout = args.waitTimeout ?? PROMOTION_RUN_DEFAULT_TIMEOUT_SECONDS;
|
|
@@ -255,18 +245,10 @@ async function jobList(args) {
|
|
|
255
245
|
}
|
|
256
246
|
filters.ownerId = userId;
|
|
257
247
|
}
|
|
258
|
-
|
|
259
|
-
endpoint: jobListEndpoint(filters),
|
|
260
|
-
method: 'GET',
|
|
261
|
-
});
|
|
262
|
-
return mcpPaginatedListPayload('jobs', normalizeJobsListPage(response));
|
|
248
|
+
return mcpPaginatedListPayload('jobs', await fetchJobs(filters));
|
|
263
249
|
}
|
|
264
250
|
async function jobGet(args) {
|
|
265
|
-
|
|
266
|
-
endpoint: jobEndpoint(assertRequired(args.id, 'id')),
|
|
267
|
-
method: 'GET',
|
|
268
|
-
});
|
|
269
|
-
return { job: normalizeJob(response) };
|
|
251
|
+
return { job: await fetchJob(assertRequired(args.id, 'id')) };
|
|
270
252
|
}
|
|
271
253
|
async function jobRun(args) {
|
|
272
254
|
const result = await CicdGateway.call({
|
|
@@ -297,18 +279,10 @@ async function jobPause(args) {
|
|
|
297
279
|
return { result: normalizeJobOperation(result) };
|
|
298
280
|
}
|
|
299
281
|
async function pipelineList(args = {}) {
|
|
300
|
-
|
|
301
|
-
endpoint: pipelineListEndpoint(args),
|
|
302
|
-
method: 'GET',
|
|
303
|
-
});
|
|
304
|
-
return mcpPaginatedListPayload('pipelines', normalizePipelinesListPage(response));
|
|
282
|
+
return mcpPaginatedListPayload('pipelines', await fetchPipelines(args));
|
|
305
283
|
}
|
|
306
284
|
async function pipelineGet(args) {
|
|
307
|
-
|
|
308
|
-
endpoint: pipelineDescribeEndpoint(assertRequired(args.id, 'id')),
|
|
309
|
-
method: 'GET',
|
|
310
|
-
});
|
|
311
|
-
return { pipeline: normalizePipelineDescribe(response) };
|
|
285
|
+
return { pipeline: await fetchPipeline(assertRequired(args.id, 'id')) };
|
|
312
286
|
}
|
|
313
287
|
async function pipelineConnectionList(args) {
|
|
314
288
|
let connections;
|
|
@@ -422,11 +396,7 @@ async function pipelineConnectionDelete(args) {
|
|
|
422
396
|
return { connectionIds, pipelineId };
|
|
423
397
|
}
|
|
424
398
|
async function stageList(args = {}) {
|
|
425
|
-
|
|
426
|
-
endpoint: stagesEndpoint(args),
|
|
427
|
-
method: 'GET',
|
|
428
|
-
});
|
|
429
|
-
return mcpPaginatedListPayload('stages', normalizeStagesListPage(response));
|
|
399
|
+
return mcpPaginatedListPayload('stages', await fetchStages(args));
|
|
430
400
|
}
|
|
431
401
|
async function stageGet(args) {
|
|
432
402
|
const response = await CicdGateway.call({
|
|
@@ -522,11 +492,7 @@ async function projectList(args = {}) {
|
|
|
522
492
|
const validationError = validateProjectListFilters(args);
|
|
523
493
|
if (validationError !== undefined)
|
|
524
494
|
throw new Error(validationError);
|
|
525
|
-
|
|
526
|
-
endpoint: projectsListEndpoint(args),
|
|
527
|
-
method: 'GET',
|
|
528
|
-
});
|
|
529
|
-
return mcpPaginatedListPayload('projects', normalizeProjectsListPage(response));
|
|
495
|
+
return mcpPaginatedListPayload('projects', await fetchProjects(args));
|
|
530
496
|
}
|
|
531
497
|
async function repositoryList(args = {}) {
|
|
532
498
|
const response = await CicdGateway.call({
|
|
@@ -787,11 +753,7 @@ function validateRepositoryMutationPayload(payload) {
|
|
|
787
753
|
return validateRepositoryNonEmptyStringFields(payload, REPOSITORY_STRING_VALIDATION_KEYS);
|
|
788
754
|
}
|
|
789
755
|
async function userGet(args = {}) {
|
|
790
|
-
|
|
791
|
-
endpoint: userEndpoint(resolveUserId(args.id)),
|
|
792
|
-
method: 'GET',
|
|
793
|
-
});
|
|
794
|
-
return { user };
|
|
756
|
+
return { user: await fetchUser(args.id) };
|
|
795
757
|
}
|
|
796
758
|
async function projectDefaultGet(args = {}) {
|
|
797
759
|
const keys = collectSelectedKeys(args);
|
|
@@ -1070,11 +1032,7 @@ async function jobResultFileGet(args) {
|
|
|
1070
1032
|
return { file: { ...normalizeJobResultFileContent(response), resultId } };
|
|
1071
1033
|
}
|
|
1072
1034
|
async function projectGet(args) {
|
|
1073
|
-
|
|
1074
|
-
endpoint: projectEndpoint(assertRequired(args.id, 'id')),
|
|
1075
|
-
method: 'GET',
|
|
1076
|
-
});
|
|
1077
|
-
return { project: normalizeProject(response) };
|
|
1035
|
+
return { project: await fetchProject(assertRequired(args.id, 'id')) };
|
|
1078
1036
|
}
|
|
1079
1037
|
async function projectCreate(args) {
|
|
1080
1038
|
const payload = {
|
|
@@ -18,7 +18,7 @@ import { DEFAULT_APEX_TEST_WAIT_MINUTES, parseApexTestClassNames, runWorkApexTes
|
|
|
18
18
|
import { buildWorkCommitRequest, normalizeWorkCommitInput, performWorkCommit, resolveWorkCommitPlatformExperience, WORK_COMMIT_ACTIONS, WORK_COMMIT_CHANGES_HELP, WORK_COMMIT_DEFAULT_TIMEOUT_SECONDS, WORK_COMMIT_METADATA_CATEGORY_HELP, } from '../work-commit.js';
|
|
19
19
|
import { buildWorkCreatePayload } from '../work-defaults.js';
|
|
20
20
|
import { validateWorkMutationPayload, WORK_LONG_TEXT_MAX_LENGTH, WORK_SHORT_TEXT_MAX_LENGTH, } from '../work-flags.js';
|
|
21
|
-
import {
|
|
21
|
+
import { fetchWorkItem, fetchWorkItems } from '../work-get.js';
|
|
22
22
|
import { performWorkLocalCommit } from '../work-local-commit.js';
|
|
23
23
|
import { reportLocalQualityGatesFailure, reportLocalQualityGatesOutcome, } from '../work-local-run-tests.js';
|
|
24
24
|
import { capturingWorkPushHooks, performWorkPush, resolveActiveFeatureWorkItem, resolveWorkPushContext, resolveWorkPushNeed, } from '../work-push.js';
|
|
@@ -26,7 +26,7 @@ import { performWorkSetNone } from '../work-set-none.js';
|
|
|
26
26
|
import { isWorkSetWarning, parseWorkSetSelection, toWorkSetWarningResult, writeWorkSetWarningSelection, } from '../work-set-selection.js';
|
|
27
27
|
import { reportSubmitUserStoriesAheadBehind } from '../work-submit-ahead-behind.js';
|
|
28
28
|
import { waitForPendingCommitJobIfNeeded } from '../work-submit-wait.js';
|
|
29
|
-
import { applySourceCredentialEnvironmentRule, featureBranchName,
|
|
29
|
+
import { applySourceCredentialEnvironmentRule, featureBranchName, workCreateEndpoint, workDoneEndpoint, workEndpoint, workSetEndpoint, workSubmitEndpoint, } from '../work-types.js';
|
|
30
30
|
import { safelyHandleTool } from './result.js';
|
|
31
31
|
const CLOUD_ONLY_COMMIT_ARGS = [
|
|
32
32
|
'action',
|
|
@@ -123,14 +123,10 @@ async function workList(args = {}) {
|
|
|
123
123
|
filters.ownerId = userId;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
endpoint: workListEndpoint(filters),
|
|
128
|
-
method: 'GET',
|
|
129
|
-
});
|
|
130
|
-
return mcpPaginatedListPayload('userStories', normalizeUserStoriesListPage(response));
|
|
126
|
+
return mcpPaginatedListPayload('userStories', await fetchWorkItems(filters));
|
|
131
127
|
}
|
|
132
128
|
async function workGet(args = {}) {
|
|
133
|
-
const userStory = await
|
|
129
|
+
const userStory = await fetchWorkItem(args.id);
|
|
134
130
|
return { userStory };
|
|
135
131
|
}
|
|
136
132
|
async function workCreate(args = {}) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {modules} from '../runtime.js';
|
|
2
|
+
const createAiApi = modules["plugin-host/ai.js"]["createAiApi"]
|
|
3
|
+
const projectAiAsk = modules["plugin-host/ai.js"]["projectAiAsk"]
|
|
4
|
+
const projectAiQuota = modules["plugin-host/ai.js"]["projectAiQuota"]
|
|
5
|
+
export {createAiApi, projectAiAsk, projectAiQuota};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import {modules} from '../runtime.js';
|
|
2
|
+
const schedulePluginCommandEvent = modules["plugin-host/event-log.js"]["schedulePluginCommandEvent"]
|
|
2
3
|
const schedulePluginHostEvent = modules["plugin-host/event-log.js"]["schedulePluginHostEvent"]
|
|
3
|
-
export {schedulePluginHostEvent};
|
|
4
|
+
export {schedulePluginCommandEvent, schedulePluginHostEvent};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {modules} from '../runtime.js';
|
|
2
|
+
const isSalesforceId = modules["plugin-host/input.js"]["isSalesforceId"]
|
|
3
|
+
const requireSalesforceId = modules["plugin-host/input.js"]["requireSalesforceId"]
|
|
4
|
+
const requireUserId = modules["plugin-host/input.js"]["requireUserId"]
|
|
5
|
+
const validateListQuery = modules["plugin-host/input.js"]["validateListQuery"]
|
|
6
|
+
const validatePageQuery = modules["plugin-host/input.js"]["validatePageQuery"]
|
|
7
|
+
export {isSalesforceId, requireSalesforceId, requireUserId, validateListQuery, validatePageQuery};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {modules} from '../runtime.js';
|
|
2
|
+
const createProjectApi = modules["plugin-host/project.js"]["createProjectApi"]
|
|
3
|
+
const projectProject = modules["plugin-host/project.js"]["projectProject"]
|
|
4
|
+
const projectProjectDefaults = modules["plugin-host/project.js"]["projectProjectDefaults"]
|
|
5
|
+
export {createProjectApi, projectProject, projectProjectDefaults};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {modules} from '../runtime.js';
|
|
2
2
|
const deepFreeze = modules["plugin-host/projection-utils.js"]["deepFreeze"]
|
|
3
|
+
const namedRef = modules["plugin-host/projection-utils.js"]["namedRef"]
|
|
4
|
+
const namedRefFrom = modules["plugin-host/projection-utils.js"]["namedRefFrom"]
|
|
3
5
|
const nonNegativeInt = modules["plugin-host/projection-utils.js"]["nonNegativeInt"]
|
|
4
6
|
const omitUndefined = modules["plugin-host/projection-utils.js"]["omitUndefined"]
|
|
7
|
+
const optionalBoolean = modules["plugin-host/projection-utils.js"]["optionalBoolean"]
|
|
5
8
|
const optionalText = modules["plugin-host/projection-utils.js"]["optionalText"]
|
|
6
|
-
|
|
9
|
+
const projectMany = modules["plugin-host/projection-utils.js"]["projectMany"]
|
|
10
|
+
const requireRecord = modules["plugin-host/projection-utils.js"]["requireRecord"]
|
|
11
|
+
export {deepFreeze, namedRef, namedRefFrom, nonNegativeInt, omitUndefined, optionalBoolean, optionalText, projectMany, requireRecord};
|