@copado/agentia-cli 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +2370 -1850
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- package/dist/commands/cicd/credential/auth/status.js +38 -0
- package/dist/commands/cicd/credential/auth/web/login.js +54 -0
- package/dist/commands/cicd/credential/list.js +13 -17
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +9 -12
- package/dist/commands/cicd/environment/auth/status.js +34 -13
- package/dist/commands/cicd/environment/auth/web/login.js +20 -4
- package/dist/commands/cicd/environment/open.js +6 -22
- package/dist/commands/cicd/extension-configuration/get.js +24 -0
- package/dist/commands/cicd/extension-configuration/list.js +49 -0
- package/dist/commands/cicd/extension-configuration/open.js +38 -0
- package/dist/commands/cicd/metadata/content/get.js +1 -1
- package/dist/commands/cicd/metadata/dependency/list.js +2 -2
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/list.js +3 -3
- package/dist/commands/cicd/metadata/refresh/deleted.js +1 -1
- package/dist/commands/cicd/metadata/refresh/run.js +2 -2
- package/dist/commands/cicd/metadata/refresh/status.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/create.js +33 -0
- package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
- package/dist/commands/cicd/pipeline/automation/get.js +32 -0
- package/dist/commands/cicd/pipeline/automation/list.js +38 -0
- package/dist/commands/cicd/pipeline/automation/open.js +38 -0
- package/dist/commands/cicd/pipeline/automation/update.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
- package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
- package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
- package/dist/commands/cicd/work/create.js +1 -0
- package/dist/commands/cicd/work/environment-sync.js +8 -7
- package/dist/commands/cicd/work/set.js +6 -4
- package/dist/commands/cicd/work/submit.js +3 -2
- package/dist/commands/cicd/work/update.js +1 -0
- package/dist/commands/plugins/install.js +2 -5
- package/dist/commands/setup/skills/create.js +28 -2
- package/dist/commands/setup/skills/list.js +55 -0
- package/dist/commands/setup/skills/update.js +36 -3
- package/dist/commands/setup.js +3 -3
- package/dist/commands/testing/data-table/create.js +1 -2
- package/dist/commands/testing/data-table/delete.js +1 -2
- package/dist/commands/testing/data-table/export.js +2 -6
- package/dist/commands/testing/data-table/get.js +2 -4
- package/dist/commands/testing/data-table/list.js +1 -2
- package/dist/commands/testing/data-table/update.js +3 -4
- package/dist/commands/testing/job/create.js +26 -22
- package/dist/commands/testing/job/delete.js +2 -2
- package/dist/commands/testing/job/files/download.js +73 -0
- package/dist/commands/testing/job/files/list.js +43 -0
- package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
- package/dist/commands/testing/job/get.js +2 -2
- package/dist/commands/testing/job/list.js +1 -1
- package/dist/commands/testing/job/refs.js +4 -4
- package/dist/commands/testing/job/run.js +134 -1
- package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
- package/dist/commands/testing/job/runs/get.js +42 -0
- package/dist/commands/testing/{build → job/runs}/list.js +19 -10
- package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
- package/dist/commands/testing/{build → job/runs}/search.js +9 -7
- package/dist/commands/testing/job/schedule/get.js +5 -11
- package/dist/commands/testing/job/schedule/remove.js +3 -3
- package/dist/commands/testing/job/schedule/set.js +3 -3
- package/dist/commands/testing/job/update.js +22 -65
- package/dist/commands/testing/live/continue.js +5 -10
- package/dist/commands/testing/live/execute.js +3 -3
- package/dist/commands/testing/live/history.js +7 -2
- package/dist/commands/testing/live/inspect.js +5 -4
- package/dist/commands/testing/live/interrupt.js +5 -10
- package/dist/commands/testing/live/recorder.js +23 -115
- package/dist/commands/testing/live/reports.js +3 -3
- package/dist/commands/testing/live/screenshot.js +3 -3
- package/dist/commands/testing/live/set-options.js +11 -4
- package/dist/commands/testing/live/start.js +9 -4
- package/dist/commands/testing/live/status.js +2 -5
- package/dist/commands/testing/live/stop.js +3 -5
- package/dist/commands/testing/live/view.js +2 -2
- package/dist/commands/testing/project/create.js +1 -17
- package/dist/commands/testing/project/get.js +0 -1
- package/dist/commands/testing/project/list.js +2 -2
- package/dist/commands/testing/project/permission/set.js +3 -7
- package/dist/commands/testing/project/permission/update.js +2 -2
- package/dist/commands/testing/robot/create.js +22 -25
- package/dist/commands/testing/robot/get.js +1 -1
- package/dist/commands/testing/robot/list.js +3 -3
- package/dist/commands/testing/robot/update.js +3 -3
- package/dist/commands/testing/user-parameter/create.js +3 -9
- package/dist/commands/testing/user-parameter/update.js +1 -7
- package/dist/commands/testing/variable/create.js +4 -9
- package/dist/commands/testing/variable/list.js +3 -3
- package/dist/commands/testing/variable/update.js +5 -12
- package/dist/help.js +17 -0
- package/dist/lib/ai-types.js +2 -1
- package/dist/lib/claude-mcp-config.js +15 -0
- package/dist/lib/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +4 -1
- package/dist/lib/environment-auth-status.js +2 -1
- package/dist/lib/environment-auth.js +2 -1
- package/dist/lib/environment-credential-flags.js +3 -1
- package/dist/lib/environment-credential-operations.js +8 -2
- package/dist/lib/environment-types.js +3 -1
- package/dist/lib/extension-configuration-ops.js +4 -0
- package/dist/lib/extension-configuration-sanitize.js +7 -0
- package/dist/lib/extension-configuration-types.js +8 -0
- package/dist/lib/http-proxy.js +13 -0
- package/dist/lib/mcp/ai-tools.js +3 -3
- package/dist/lib/mcp/command-id.js +2 -0
- package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
- package/dist/lib/mcp/server.js +70 -1
- package/dist/lib/mcp/testing-live-tools.js +24 -13
- package/dist/lib/mcp/testing-tools.js +239 -550
- package/dist/lib/mcp/tool-annotations.js +27 -18
- package/dist/lib/mcp/tools.js +117 -32
- package/dist/lib/mcp/work-tools.js +18 -4
- package/dist/lib/metadata-explore.js +8 -0
- package/dist/lib/network-error.js +8 -0
- package/dist/lib/pipeline-automation-flags.js +12 -0
- package/dist/lib/pipeline-automation-ops.js +9 -0
- package/dist/lib/pipeline-automation-types.js +18 -0
- package/dist/lib/pipeline-lifecycle-id.js +3 -0
- package/dist/lib/pipeline-quality-gate-flags.js +12 -0
- package/dist/lib/pipeline-quality-gate-ops.js +9 -0
- package/dist/lib/pipeline-quality-gate-types.js +17 -0
- package/dist/lib/plugin-host/ai.js +2 -1
- package/dist/lib/plugin-skills.js +22 -0
- package/dist/lib/plugin-trust/gate.js +1 -2
- package/dist/lib/project-root.js +3 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/salesforce-tooling-check.js +6 -0
- package/dist/lib/skill-packs.js +7 -0
- package/dist/lib/testing-archive.js +9 -0
- package/dist/lib/testing-data-table.js +39 -0
- package/dist/lib/testing-execution.js +22 -0
- package/dist/lib/testing-flags.js +6 -2
- package/dist/lib/testing-gateway.js +4 -1
- package/dist/lib/testing-live-command.js +3 -1
- package/dist/lib/testing-live-operations.js +7 -1
- package/dist/lib/testing-live-recorder.js +3 -1
- package/dist/lib/testing-live-state.js +8 -1
- package/dist/lib/testing-operations.js +6 -21
- package/dist/lib/testing-sanitization.js +2 -1
- package/dist/lib/testing-secret-input.js +2 -1
- package/dist/lib/testing-types.js +24 -3
- package/dist/lib/work-environment-sync.js +3 -1
- package/dist/lib/work-flags.js +6 -1
- package/dist/lib/work-local-development-flow.js +4 -0
- package/dist/lib/work-submit-wait.js +3 -1
- package/oclif.manifest.json +6609 -6895
- package/package.json +35 -2
- package/templates/skills/agentia-ai/SKILL.md +3 -4
- package/templates/skills/agentia-ai/references/ai-agents.md +2 -2
- package/templates/skills/agentia-cicd/SKILL.md +7 -4
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +19 -13
- package/templates/skills/agentia-cicd/references/extensions.md +3 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
- package/templates/skills/agentia-cicd/references/work.md +20 -5
- package/templates/skills/agentia-metadata/SKILL.md +140 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +142 -0
- package/templates/skills/agentia-testing/SKILL.md +3 -3
- package/templates/skills/agentia-testing/references/tests.md +14 -14
- package/dist/commands/testing/build/get.js +0 -38
- package/dist/commands/testing/build/latest.js +0 -40
- package/dist/commands/testing/build/logs.js +0 -47
- package/dist/commands/testing/build/run.js +0 -26
- package/dist/commands/testing/create.js +0 -2
- package/dist/commands/testing/job/download.js +0 -54
- package/dist/commands/testing/job/files.js +0 -34
- package/dist/commands/testing/run.js +0 -26
- package/dist/commands/testing/status.js +0 -45
- package/dist/commands/testing/test/create.js +0 -2
- package/dist/commands/testing/test/logs.js +0 -2
- package/dist/commands/testing/test/run.js +0 -26
- package/dist/commands/testing/test/status.js +0 -2
- package/dist/commands/testing/test/update.js +0 -2
- package/dist/commands/testing/update.js +0 -65
- package/dist/lib/testing-data-command.js +0 -8
- package/dist/lib/testing-data-core.js +0 -20
- package/dist/lib/testing-data-export.js +0 -6
- package/dist/lib/testing-data-import.js +0 -6
- package/dist/lib/testing-data-io.js +0 -12
- package/dist/lib/testing-data-operations.js +0 -10
- package/dist/lib/testing-data-types.js +0 -4
- package/dist/lib/testing-live-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- package/dist/lib/testing-run-command.js +0 -3
- package/dist/lib/testing-schedule.js +0 -5
- package/dist/lib/testing-session.js +0 -5
- package/dist/lib/testing-watch.js +0 -4
|
@@ -37,17 +37,20 @@ const ACTION_TOOLS = [
|
|
|
37
37
|
'agentia_job_pause',
|
|
38
38
|
'agentia_job_resume',
|
|
39
39
|
'agentia_job_run',
|
|
40
|
+
'agentia_metadata_explore',
|
|
40
41
|
'agentia_metadata_refresh_deleted',
|
|
41
42
|
'agentia_metadata_refresh_run',
|
|
43
|
+
'agentia_pipeline_automation_activate',
|
|
44
|
+
'agentia_pipeline_automation_deactivate',
|
|
45
|
+
'agentia_pipeline_quality_gate_activate',
|
|
46
|
+
'agentia_pipeline_quality_gate_deactivate',
|
|
42
47
|
'agentia_promotion_run',
|
|
43
|
-
'
|
|
44
|
-
'agentia_testing_build_run',
|
|
48
|
+
'agentia_testing_job_runs_abort',
|
|
45
49
|
'agentia_testing_job_run',
|
|
46
50
|
'agentia_testing_live_continue',
|
|
47
51
|
'agentia_testing_live_execute',
|
|
48
52
|
'agentia_testing_live_interrupt',
|
|
49
53
|
'agentia_testing_live_stop',
|
|
50
|
-
'agentia_testing_run',
|
|
51
54
|
'agentia_work_commit',
|
|
52
55
|
'agentia_work_done',
|
|
53
56
|
'agentia_work_publish',
|
|
@@ -57,9 +60,7 @@ const ACTION_TOOLS = [
|
|
|
57
60
|
'agentia_work_test_apex',
|
|
58
61
|
];
|
|
59
62
|
/** Read-only, non-repeatable model calls. */
|
|
60
|
-
const ASK_TOOLS = [
|
|
61
|
-
'agentia_ai_ask',
|
|
62
|
-
];
|
|
63
|
+
const ASK_TOOLS = ['agentia_ai_ask'];
|
|
63
64
|
/** Additive writes. */
|
|
64
65
|
const CREATE_TOOLS = [
|
|
65
66
|
'agentia_adv_deployment_create',
|
|
@@ -70,16 +71,17 @@ const CREATE_TOOLS = [
|
|
|
70
71
|
'agentia_data_template_convert_old',
|
|
71
72
|
'agentia_data_template_create',
|
|
72
73
|
'agentia_environment_create',
|
|
74
|
+
'agentia_pipeline_automation_create',
|
|
73
75
|
'agentia_pipeline_connection_create',
|
|
74
76
|
'agentia_pipeline_create',
|
|
77
|
+
'agentia_pipeline_quality_gate_create',
|
|
75
78
|
'agentia_pipeline_stage_connection_create',
|
|
76
79
|
'agentia_project_create',
|
|
77
80
|
'agentia_repository_create',
|
|
78
81
|
'agentia_stage_create',
|
|
79
|
-
'agentia_testing_create',
|
|
80
82
|
'agentia_testing_data_table_create',
|
|
81
83
|
'agentia_testing_job_create',
|
|
82
|
-
'
|
|
84
|
+
'agentia_testing_job_files_download',
|
|
83
85
|
'agentia_testing_live_start',
|
|
84
86
|
'agentia_testing_project_create',
|
|
85
87
|
'agentia_testing_robot_create',
|
|
@@ -94,7 +96,9 @@ const DELETE_TOOLS = [
|
|
|
94
96
|
'agentia_data_template_delete',
|
|
95
97
|
'agentia_function_delete',
|
|
96
98
|
'agentia_template_delete',
|
|
99
|
+
'agentia_pipeline_automation_delete',
|
|
97
100
|
'agentia_pipeline_connection_delete',
|
|
101
|
+
'agentia_pipeline_quality_gate_delete',
|
|
98
102
|
'agentia_pipeline_stage_connection_delete',
|
|
99
103
|
'agentia_project_delete',
|
|
100
104
|
'agentia_repository_delete',
|
|
@@ -125,6 +129,7 @@ const READ_TOOLS = [
|
|
|
125
129
|
'agentia_adv_organization_validate',
|
|
126
130
|
'agentia_adv_deployment_get',
|
|
127
131
|
'agentia_adv_deployment_list',
|
|
132
|
+
'agentia_credential_auth_status',
|
|
128
133
|
'agentia_credential_list',
|
|
129
134
|
'agentia_data_commit_list',
|
|
130
135
|
'agentia_data_dataset_file_content',
|
|
@@ -142,6 +147,8 @@ const READ_TOOLS = [
|
|
|
142
147
|
'agentia_environment_auth_status',
|
|
143
148
|
'agentia_environment_get',
|
|
144
149
|
'agentia_environment_list',
|
|
150
|
+
'agentia_extension_configuration_get',
|
|
151
|
+
'agentia_extension_configuration_list',
|
|
145
152
|
'agentia_function_defaults',
|
|
146
153
|
'agentia_function_get',
|
|
147
154
|
'agentia_function_list',
|
|
@@ -164,9 +171,13 @@ const READ_TOOLS = [
|
|
|
164
171
|
'agentia_metadata_refresh_status',
|
|
165
172
|
'agentia_navigation_resolve',
|
|
166
173
|
'agentia_notification_get',
|
|
174
|
+
'agentia_pipeline_automation_get',
|
|
175
|
+
'agentia_pipeline_automation_list',
|
|
167
176
|
'agentia_pipeline_connection_list',
|
|
168
177
|
'agentia_pipeline_get',
|
|
169
178
|
'agentia_pipeline_list',
|
|
179
|
+
'agentia_pipeline_quality_gate_get',
|
|
180
|
+
'agentia_pipeline_quality_gate_list',
|
|
170
181
|
'agentia_pipeline_stage_connection_list',
|
|
171
182
|
'agentia_project_default_get',
|
|
172
183
|
'agentia_project_get',
|
|
@@ -180,14 +191,13 @@ const READ_TOOLS = [
|
|
|
180
191
|
'agentia_repository_validate',
|
|
181
192
|
'agentia_stage_get',
|
|
182
193
|
'agentia_stage_list',
|
|
183
|
-
'
|
|
184
|
-
'
|
|
185
|
-
'
|
|
186
|
-
'
|
|
187
|
-
'agentia_testing_build_search',
|
|
194
|
+
'agentia_testing_job_runs_get',
|
|
195
|
+
'agentia_testing_job_runs_list',
|
|
196
|
+
'agentia_testing_job_runs_logs',
|
|
197
|
+
'agentia_testing_job_runs_search',
|
|
188
198
|
'agentia_testing_data_table_get',
|
|
189
199
|
'agentia_testing_data_table_list',
|
|
190
|
-
'
|
|
200
|
+
'agentia_testing_job_files_list',
|
|
191
201
|
'agentia_testing_job_get',
|
|
192
202
|
'agentia_testing_job_list',
|
|
193
203
|
'agentia_testing_job_refs',
|
|
@@ -197,14 +207,12 @@ const READ_TOOLS = [
|
|
|
197
207
|
'agentia_testing_live_reports',
|
|
198
208
|
'agentia_testing_live_screenshot',
|
|
199
209
|
'agentia_testing_live_status',
|
|
200
|
-
'agentia_testing_logs',
|
|
201
210
|
'agentia_testing_project_get',
|
|
202
211
|
'agentia_testing_project_list',
|
|
203
212
|
'agentia_testing_project_permission_get',
|
|
204
213
|
'agentia_testing_project_permission_list',
|
|
205
214
|
'agentia_testing_robot_get',
|
|
206
215
|
'agentia_testing_robot_list',
|
|
207
|
-
'agentia_testing_status',
|
|
208
216
|
'agentia_testing_user_parameter_get',
|
|
209
217
|
'agentia_testing_user_parameter_list',
|
|
210
218
|
'agentia_testing_variable_get',
|
|
@@ -231,7 +239,9 @@ const UPDATE_TOOLS = [
|
|
|
231
239
|
'agentia_environment_update',
|
|
232
240
|
'agentia_function_upsert',
|
|
233
241
|
'agentia_template_upsert',
|
|
242
|
+
'agentia_pipeline_automation_update',
|
|
234
243
|
'agentia_pipeline_connection_update',
|
|
244
|
+
'agentia_pipeline_quality_gate_update',
|
|
235
245
|
'agentia_pipeline_stage_connection_update',
|
|
236
246
|
'agentia_pipeline_update',
|
|
237
247
|
'agentia_project_default_set',
|
|
@@ -247,13 +257,12 @@ const UPDATE_TOOLS = [
|
|
|
247
257
|
'agentia_testing_data_table_update',
|
|
248
258
|
'agentia_testing_job_schedule_set',
|
|
249
259
|
'agentia_testing_job_update',
|
|
250
|
-
'
|
|
260
|
+
'agentia_testing_job_files_upload',
|
|
251
261
|
'agentia_testing_live_set_options',
|
|
252
262
|
'agentia_testing_project_permission_set',
|
|
253
263
|
'agentia_testing_project_permission_update',
|
|
254
264
|
'agentia_testing_project_update',
|
|
255
265
|
'agentia_testing_robot_update',
|
|
256
|
-
'agentia_testing_update',
|
|
257
266
|
'agentia_testing_user_parameter_update',
|
|
258
267
|
'agentia_testing_variable_update',
|
|
259
268
|
'agentia_work_deployment_step_reorder',
|
package/dist/lib/mcp/tools.js
CHANGED
|
@@ -4,15 +4,16 @@ import { buildMetadataCompareFileRequests } from '../../commands/cicd/metadata/c
|
|
|
4
4
|
import { buildMetadataContentRequest } from '../../commands/cicd/metadata/content/get.js';
|
|
5
5
|
import { buildMetadataCompareRequest } from '../../commands/cicd/metadata/index/compare.js';
|
|
6
6
|
import { buildMetadataIndexRequest } from '../../commands/cicd/metadata/list.js';
|
|
7
|
+
import { AI_METADATA_ACTIONS, buildAiMetadataToolRequest, callAiMetadataTool, } from '../metadata-explore.js';
|
|
7
8
|
import { assertRequired } from '../assert.js';
|
|
8
9
|
import { applyAuthSet, getAiAuthStatus, getCicdAuthStatus, getCrtAuthStatus } from '../auth-config.js';
|
|
9
10
|
import { CicdGateway } from '../cicd-gateway.js';
|
|
10
11
|
import { CICD_REGIONS } from '../cicd-region.js';
|
|
11
12
|
import { credentialLabel, } from '../credential-store.js';
|
|
12
13
|
import { readDefaults, readLastWorkItem, resolveDefaults, unsetDefaults, writeDefaults, } from '../defaults-store.js';
|
|
13
|
-
import { runEnvironmentAuthStatus } from '../environment-auth-status.js';
|
|
14
|
+
import { runCredentialAuthStatus, runEnvironmentAuthStatus } from '../environment-auth-status.js';
|
|
14
15
|
import { collectCredentialUpdateFlagKeys, validateCredentialName } from '../environment-credential-flags.js';
|
|
15
|
-
import { createEnvironmentCredential,
|
|
16
|
+
import { createEnvironmentCredential, listCredentials, resolveEnvironmentOrgType, sanitizeCredentialListItem, sanitizeEnvironment, updateCredentialById, } from '../environment-credential-operations.js';
|
|
16
17
|
import { buildCreatePayload, buildMutationPayload, ENVIRONMENT_STRING_VALIDATION_KEYS, validateNonEmptyStringFields, } from '../environment-flags.js';
|
|
17
18
|
import { fetchEnvironment, fetchEnvironments } from '../environment-get.js';
|
|
18
19
|
import { DEFAULT_ENVIRONMENT_PLATFORM, DEFAULT_ENVIRONMENT_TYPE, ENVIRONMENT_TYPES, environmentEndpoint, } from '../environment-types.js';
|
|
@@ -58,6 +59,7 @@ import { agentiaMcpAiToolHandlers, registerAgentiaMcpAiTools } from './ai-tools.
|
|
|
58
59
|
import { agentiaMcpDataToolHandlers, registerAgentiaMcpDataTools } from './data-tools.js';
|
|
59
60
|
import { agentiaMcpDeploymentStepToolHandlers, registerAgentiaMcpDeploymentStepTools } from './deployment-step-tools.js';
|
|
60
61
|
import { agentiaMcpHealthCheckToolHandlers, registerAgentiaMcpHealthCheckTools } from './health-check-tools.js';
|
|
62
|
+
import { agentiaMcpPipelineAutomationQualityToolHandlers, registerAgentiaMcpPipelineAutomationQualityTools, } from './pipeline-automation-quality-tools.js';
|
|
61
63
|
import { safelyHandleTool, wrapMcpToolHandlers } from './result.js';
|
|
62
64
|
import { agentiaMcpTestingToolHandlers, registerAgentiaMcpTestingTools } from './testing-tools.js';
|
|
63
65
|
import { agentiaMcpWorkToolHandlers, registerAgentiaMcpWorkTools } from './work-tools.js';
|
|
@@ -203,9 +205,12 @@ async function credentialCreate(args) {
|
|
|
203
205
|
});
|
|
204
206
|
return { credential };
|
|
205
207
|
}
|
|
206
|
-
async function credentialList(args) {
|
|
207
|
-
const
|
|
208
|
-
return
|
|
208
|
+
async function credentialList(args = {}) {
|
|
209
|
+
const page = await listCredentials(args);
|
|
210
|
+
return mcpPaginatedListPayload('credentials', {
|
|
211
|
+
...page,
|
|
212
|
+
data: page.data.map((credential) => sanitizeCredentialListItem(credential)),
|
|
213
|
+
});
|
|
209
214
|
}
|
|
210
215
|
async function credentialUpdate(args) {
|
|
211
216
|
const selectedKeys = collectCredentialUpdateFlagKeys({
|
|
@@ -219,15 +224,17 @@ async function credentialUpdate(args) {
|
|
|
219
224
|
if (nameError !== undefined) {
|
|
220
225
|
throw new Error(nameError);
|
|
221
226
|
}
|
|
222
|
-
const
|
|
223
|
-
const credential = await updateEnvironmentCredential({
|
|
227
|
+
const credential = await updateCredentialById({
|
|
224
228
|
credentialId: assertRequired(args.id, 'id'),
|
|
225
229
|
defaultCredential: args.default,
|
|
226
|
-
environmentId: args.environmentId,
|
|
227
230
|
name: args.name,
|
|
228
|
-
orgType,
|
|
229
231
|
});
|
|
230
|
-
return { credential };
|
|
232
|
+
return { credential: sanitizeCredentialListItem(credential) };
|
|
233
|
+
}
|
|
234
|
+
async function credentialAuthStatus(args) {
|
|
235
|
+
return runCredentialAuthStatus({
|
|
236
|
+
credentialId: assertRequired(args.id, 'id'),
|
|
237
|
+
});
|
|
231
238
|
}
|
|
232
239
|
async function jobList(args) {
|
|
233
240
|
const filters = {
|
|
@@ -969,6 +976,29 @@ async function metadataContentCompare(args) {
|
|
|
969
976
|
target: targetSide,
|
|
970
977
|
};
|
|
971
978
|
}
|
|
979
|
+
async function metadataExplore(args) {
|
|
980
|
+
const body = await buildAiMetadataToolRequest({
|
|
981
|
+
action: assertRequired(args.action, 'action'),
|
|
982
|
+
'apex-unit-tests': args.apexUnitTests,
|
|
983
|
+
// Deferred write/deploy flags:
|
|
984
|
+
// 'async-id': args.asyncId,
|
|
985
|
+
// 'metadata-files': args.metadataFiles,
|
|
986
|
+
// 'organization-name': args.organizationName,
|
|
987
|
+
// 'test-level': args.testLevel,
|
|
988
|
+
// 'validate-only': args.validateOnly,
|
|
989
|
+
'credential-id': args.credentialId,
|
|
990
|
+
endpoint: args.endpoint,
|
|
991
|
+
'full-name': args.fullName,
|
|
992
|
+
'object-type': args.objectType,
|
|
993
|
+
pattern: args.pattern,
|
|
994
|
+
'session-id': args.sessionId,
|
|
995
|
+
});
|
|
996
|
+
const output = await callAiMetadataTool(body);
|
|
997
|
+
return {
|
|
998
|
+
...(body.credentialId === undefined ? {} : { credentialId: body.credentialId }),
|
|
999
|
+
output,
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
972
1002
|
async function metadataDependencyList(args) {
|
|
973
1003
|
const selection = {
|
|
974
1004
|
name: assertRequired(args.metadataName, 'metadataName'),
|
|
@@ -1048,9 +1078,14 @@ async function authSet(args) {
|
|
|
1048
1078
|
return { ...(result.baseUrl === undefined ? {} : { baseUrl: result.baseUrl }), stored: result.stored };
|
|
1049
1079
|
}
|
|
1050
1080
|
async function environmentAuthStatus(args) {
|
|
1081
|
+
const environmentId = typeof args.id === 'string' ? args.id.trim() : '';
|
|
1082
|
+
const credentialId = typeof args.credentialId === 'string' ? args.credentialId.trim() : '';
|
|
1083
|
+
if (environmentId.length === 0 && credentialId.length === 0) {
|
|
1084
|
+
throw new Error('Provide id (environment ID) or credentialId.');
|
|
1085
|
+
}
|
|
1051
1086
|
return runEnvironmentAuthStatus({
|
|
1052
|
-
credentialId:
|
|
1053
|
-
environmentId:
|
|
1087
|
+
credentialId: credentialId.length > 0 ? credentialId : undefined,
|
|
1088
|
+
environmentId: environmentId.length > 0 ? environmentId : undefined,
|
|
1054
1089
|
});
|
|
1055
1090
|
}
|
|
1056
1091
|
async function jobLogGet(args) {
|
|
@@ -1249,8 +1284,10 @@ export const agentiaMcpToolHandlers = wrapMcpToolHandlers({
|
|
|
1249
1284
|
...agentiaMcpDataToolHandlers,
|
|
1250
1285
|
...agentiaMcpDeploymentStepToolHandlers,
|
|
1251
1286
|
...agentiaMcpHealthCheckToolHandlers,
|
|
1287
|
+
...agentiaMcpPipelineAutomationQualityToolHandlers,
|
|
1252
1288
|
authGet,
|
|
1253
1289
|
authSet,
|
|
1290
|
+
credentialAuthStatus,
|
|
1254
1291
|
credentialCreate,
|
|
1255
1292
|
credentialList,
|
|
1256
1293
|
credentialUpdate,
|
|
@@ -1280,6 +1317,7 @@ export const agentiaMcpToolHandlers = wrapMcpToolHandlers({
|
|
|
1280
1317
|
metadataContentCompare,
|
|
1281
1318
|
metadataContentGet,
|
|
1282
1319
|
metadataDependencyList,
|
|
1320
|
+
metadataExplore,
|
|
1283
1321
|
metadataIndexCompare,
|
|
1284
1322
|
metadataList,
|
|
1285
1323
|
metadataRefreshDeleted,
|
|
@@ -1426,6 +1464,7 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1426
1464
|
registerAgentiaMcpDataTools(server);
|
|
1427
1465
|
registerAgentiaMcpDeploymentStepTools(server);
|
|
1428
1466
|
registerAgentiaMcpHealthCheckTools(server);
|
|
1467
|
+
registerAgentiaMcpPipelineAutomationQualityTools(server);
|
|
1429
1468
|
registerAgentiaMcpTestingTools(server);
|
|
1430
1469
|
server.registerTool('agentia_environment_list', {
|
|
1431
1470
|
description: 'List Copado environments via the CICD gateway.',
|
|
@@ -1472,22 +1511,29 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1472
1511
|
title: 'Agentia Credential Create',
|
|
1473
1512
|
}, (args) => safelyHandleTool(() => credentialCreate(args)));
|
|
1474
1513
|
server.registerTool('agentia_credential_list', {
|
|
1475
|
-
description: 'List
|
|
1514
|
+
description: 'List Copado credentials via the CICD gateway, optionally filtered by name.',
|
|
1476
1515
|
inputSchema: {
|
|
1477
|
-
|
|
1516
|
+
name: z.string().optional().describe('Filter credentials by name (partial match).'),
|
|
1517
|
+
...listPaginationZodFields,
|
|
1478
1518
|
},
|
|
1479
1519
|
title: 'Agentia Credential List',
|
|
1480
|
-
}, (args) => safelyHandleTool(() => credentialList(args)));
|
|
1520
|
+
}, (args) => safelyHandleTool(() => credentialList(args || {})));
|
|
1481
1521
|
server.registerTool('agentia_credential_update', {
|
|
1482
|
-
description: 'Update a Copado
|
|
1522
|
+
description: 'Update a Copado credential by Id via the CICD gateway.',
|
|
1483
1523
|
inputSchema: {
|
|
1484
1524
|
default: z.boolean().optional().describe('Mark this credential as the environment default.'),
|
|
1485
|
-
environmentId: z.string().describe('Copado environment Id.'),
|
|
1486
1525
|
id: z.string().describe('Copado credential Id.'),
|
|
1487
1526
|
name: z.string().optional().describe('Credential name.'),
|
|
1488
1527
|
},
|
|
1489
1528
|
title: 'Agentia Credential Update',
|
|
1490
1529
|
}, (args) => safelyHandleTool(() => credentialUpdate(args)));
|
|
1530
|
+
server.registerTool('agentia_credential_auth_status', {
|
|
1531
|
+
description: 'Validate a Copado credential by Id through the CICD gateway.',
|
|
1532
|
+
inputSchema: {
|
|
1533
|
+
id: z.string().describe('Copado credential Id.'),
|
|
1534
|
+
},
|
|
1535
|
+
title: 'Agentia Credential Auth Status',
|
|
1536
|
+
}, (args) => safelyHandleTool(() => credentialAuthStatus(args)));
|
|
1491
1537
|
server.registerTool('agentia_promotion_list', {
|
|
1492
1538
|
description: 'List Copado promotions via the CICD gateway.',
|
|
1493
1539
|
inputSchema: promotionListSchema,
|
|
@@ -1801,12 +1847,12 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1801
1847
|
}, (args) => safelyHandleTool(() => projectDefaultUnset(args || {})));
|
|
1802
1848
|
registerAgentiaMcpWorkTools(server);
|
|
1803
1849
|
server.registerTool('agentia_metadata_list', {
|
|
1804
|
-
description: 'Search the Copado metadata index
|
|
1850
|
+
description: 'Search the Copado metadata index.',
|
|
1805
1851
|
inputSchema: {
|
|
1806
1852
|
avoidSourceTracking: z
|
|
1807
1853
|
.boolean()
|
|
1808
1854
|
.optional()
|
|
1809
|
-
.describe('Pass avoidSourceTracking=true to the
|
|
1855
|
+
.describe('Pass avoidSourceTracking=true to the index route.'),
|
|
1810
1856
|
changeDateFrom: z
|
|
1811
1857
|
.string()
|
|
1812
1858
|
.optional()
|
|
@@ -1820,7 +1866,7 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1820
1866
|
moduleType: z.enum(MODULE_TYPES).optional().describe('Optional addon module type.'),
|
|
1821
1867
|
orderDirection: z.enum(ORDER_DIRECTIONS).optional().describe('Sort direction for last modified date.'),
|
|
1822
1868
|
pipelineId: z.string().describe('Pipeline Id.'),
|
|
1823
|
-
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('
|
|
1869
|
+
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('Platform experience header.'),
|
|
1824
1870
|
source: z.enum(INDEX_SOURCES).optional().describe('Index source filter.'),
|
|
1825
1871
|
sourceCredentialId: z.string().describe('Source org credential Id.'),
|
|
1826
1872
|
sourceOrgId: z.string().describe('Source org Id.'),
|
|
@@ -1828,8 +1874,44 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1828
1874
|
},
|
|
1829
1875
|
title: 'Agentia Metadata List',
|
|
1830
1876
|
}, (args) => safelyHandleTool(() => metadataList(args)));
|
|
1877
|
+
server.registerTool('agentia_metadata_explore', {
|
|
1878
|
+
description: 'Explore Salesforce metadata through Org Intelligence. Uses the project default credential when credentialId is omitted; otherwise pass credentialId, or both sessionId and endpoint. Returns YAML tool output.',
|
|
1879
|
+
inputSchema: {
|
|
1880
|
+
action: z
|
|
1881
|
+
.enum(AI_METADATA_ACTIONS)
|
|
1882
|
+
.describe('Metadata action: list, search, read_documentation, describe_type, read, find_references, run_apex_tests.'),
|
|
1883
|
+
apexUnitTests: z
|
|
1884
|
+
.string()
|
|
1885
|
+
.optional()
|
|
1886
|
+
.describe('Comma-separated Apex test classes. Required for run_apex_tests.'),
|
|
1887
|
+
// Deferred write/deploy MCP fields (re-add with AI_METADATA_ACTIONS when shipping mutate):
|
|
1888
|
+
// asyncId, metadataFiles, organizationName, testLevel, validateOnly
|
|
1889
|
+
credentialId: z
|
|
1890
|
+
.string()
|
|
1891
|
+
.optional()
|
|
1892
|
+
.describe('Copado credential Id. Defaults to the CICD project default credential when set. Exclusive with sessionId+endpoint.'),
|
|
1893
|
+
endpoint: z
|
|
1894
|
+
.string()
|
|
1895
|
+
.optional()
|
|
1896
|
+
.describe('Salesforce instance URL used with sessionId when credentialId is omitted.'),
|
|
1897
|
+
fullName: z
|
|
1898
|
+
.string()
|
|
1899
|
+
.optional()
|
|
1900
|
+
.describe('Fully qualified metadata name (required for read).'),
|
|
1901
|
+
objectType: z.string().optional().describe('Metadata type, for example ApexClass or CustomObject.'),
|
|
1902
|
+
pattern: z
|
|
1903
|
+
.string()
|
|
1904
|
+
.optional()
|
|
1905
|
+
.describe('Wildcard pattern for list/search (name without namespace). Defaults to *.'),
|
|
1906
|
+
sessionId: z
|
|
1907
|
+
.string()
|
|
1908
|
+
.optional()
|
|
1909
|
+
.describe('Salesforce session Id used with endpoint when credentialId is omitted.'),
|
|
1910
|
+
},
|
|
1911
|
+
title: 'Agentia Metadata Explore',
|
|
1912
|
+
}, (args) => safelyHandleTool(() => metadataExplore(args)));
|
|
1831
1913
|
server.registerTool('agentia_metadata_content_get', {
|
|
1832
|
-
description: 'Retrieve metadata file content
|
|
1914
|
+
description: 'Retrieve metadata file content.',
|
|
1833
1915
|
inputSchema: {
|
|
1834
1916
|
apiName: z.string().describe('Metadata API name.'),
|
|
1835
1917
|
branch: z.string().optional().describe('Git branch when source is REPOSITORY or GIT_MIRROR.'),
|
|
@@ -1844,7 +1926,7 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1844
1926
|
title: 'Agentia Metadata Content Get',
|
|
1845
1927
|
}, (args) => safelyHandleTool(() => metadataContentGet(args)));
|
|
1846
1928
|
server.registerTool('agentia_metadata_index_compare', {
|
|
1847
|
-
description: 'Compare metadata between orgs or Git branches
|
|
1929
|
+
description: 'Compare metadata between orgs or Git branches.',
|
|
1848
1930
|
inputSchema: {
|
|
1849
1931
|
comparisonMode: z.enum(COMPARISON_MODES).describe('Comparison mode.'),
|
|
1850
1932
|
filterType: z.string().optional().describe('Optional metadata type filter, for example ApexClass.'),
|
|
@@ -1874,14 +1956,14 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1874
1956
|
title: 'Agentia Metadata Content Compare',
|
|
1875
1957
|
}, (args) => safelyHandleTool(() => metadataContentCompare(args)));
|
|
1876
1958
|
server.registerTool('agentia_metadata_dependency_list', {
|
|
1877
|
-
description: 'Retrieve metadata dependencies
|
|
1959
|
+
description: 'Retrieve metadata dependencies.',
|
|
1878
1960
|
inputSchema: {
|
|
1879
1961
|
metadataCategory: z.string().optional().describe('Optional metadata category.'),
|
|
1880
1962
|
metadataName: z.string().describe('Metadata API name.'),
|
|
1881
1963
|
metadataType: z.string().describe('Metadata type, for example ApexClass.'),
|
|
1882
1964
|
moduleType: z.enum(MODULE_TYPES).optional().describe('Optional addon module type.'),
|
|
1883
1965
|
pipelineId: z.string().describe('Pipeline Id.'),
|
|
1884
|
-
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('
|
|
1966
|
+
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('Platform experience header.'),
|
|
1885
1967
|
resultId: z.string().optional().describe('Optional result Id from a prior metadata operation.'),
|
|
1886
1968
|
retrieveMode: z.enum(RETRIEVE_MODES).optional().describe('Dependency retrieve mode.'),
|
|
1887
1969
|
sourceCredentialId: z.string().describe('Source org credential Id.'),
|
|
@@ -1918,10 +2000,13 @@ export function registerAgentiaMcpTools(server) {
|
|
|
1918
2000
|
title: 'Agentia Auth Set',
|
|
1919
2001
|
}, (args) => safelyHandleTool(() => authSet(args)));
|
|
1920
2002
|
server.registerTool('agentia_environment_auth_status', {
|
|
1921
|
-
description: 'Validate an environment credential through the CICD gateway.',
|
|
2003
|
+
description: 'Validate an environment credential through the CICD gateway. Provide id, or credentialId alone to resolve the environment from the credential.',
|
|
1922
2004
|
inputSchema: {
|
|
1923
|
-
credentialId: z
|
|
1924
|
-
|
|
2005
|
+
credentialId: z
|
|
2006
|
+
.string()
|
|
2007
|
+
.optional()
|
|
2008
|
+
.describe('Credential ID; when id is omitted, resolves the environment from the credential.'),
|
|
2009
|
+
id: z.string().optional().describe('Copado environment ID (optional when credentialId is provided).'),
|
|
1925
2010
|
},
|
|
1926
2011
|
title: 'Agentia Environment Auth Status',
|
|
1927
2012
|
}, (args) => safelyHandleTool(() => environmentAuthStatus(args)));
|
|
@@ -2267,14 +2352,14 @@ export function registerAgentiaMcpTools(server) {
|
|
|
2267
2352
|
title: 'Agentia Promotion Conflict Unresolve',
|
|
2268
2353
|
}, (args) => safelyHandleTool(() => promotionConflictUnresolve(args)));
|
|
2269
2354
|
server.registerTool('agentia_metadata_refresh_run', {
|
|
2270
|
-
description: 'Trigger a metadata index refresh
|
|
2355
|
+
description: 'Trigger a metadata index refresh.',
|
|
2271
2356
|
inputSchema: {
|
|
2272
2357
|
all: z.boolean().optional().describe('Replace the metadata index instead of merging it.'),
|
|
2273
2358
|
env: z.string().describe('Environment ID used to resolve source configuration.'),
|
|
2274
2359
|
gitFiles: z.array(z.string()).optional().describe('Git file paths to refresh.'),
|
|
2275
2360
|
moduleType: z.enum(MODULE_TYPES).optional().describe('Optional addon module type.'),
|
|
2276
2361
|
pipelineId: z.string().optional().describe('Optional pipeline ID.'),
|
|
2277
|
-
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('
|
|
2362
|
+
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('Platform experience header.'),
|
|
2278
2363
|
refreshMode: z.string().optional().describe('Optional refresh mode.'),
|
|
2279
2364
|
selectedName: z.string().optional().describe('Selected metadata API name.'),
|
|
2280
2365
|
selectedType: z.string().optional().describe('Selected metadata type.'),
|
|
@@ -2285,16 +2370,16 @@ export function registerAgentiaMcpTools(server) {
|
|
|
2285
2370
|
title: 'Agentia Metadata Refresh Run',
|
|
2286
2371
|
}, (args) => safelyHandleTool(() => metadataRefreshRun(args)));
|
|
2287
2372
|
server.registerTool('agentia_metadata_refresh_status', {
|
|
2288
|
-
description: 'Get metadata index refresh status
|
|
2373
|
+
description: 'Get metadata index refresh status.',
|
|
2289
2374
|
inputSchema: {
|
|
2290
2375
|
jobId: z.string().describe('Metadata refresh event ID.'),
|
|
2291
2376
|
moduleType: z.enum(MODULE_TYPES).optional().describe('Addon module type used by the refresh.'),
|
|
2292
|
-
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('
|
|
2377
|
+
platformExperience: z.enum(PLATFORM_EXPERIENCES).optional().describe('Platform experience header.'),
|
|
2293
2378
|
},
|
|
2294
2379
|
title: 'Agentia Metadata Refresh Status',
|
|
2295
2380
|
}, (args) => safelyHandleTool(() => metadataRefreshStatus(args)));
|
|
2296
2381
|
server.registerTool('agentia_metadata_refresh_deleted', {
|
|
2297
|
-
description: 'Refresh deleted metadata index entries
|
|
2382
|
+
description: 'Refresh deleted metadata index entries.',
|
|
2298
2383
|
inputSchema: {
|
|
2299
2384
|
env: z.string().describe('Environment ID used to resolve the source credential.'),
|
|
2300
2385
|
moduleType: z.enum(MODULE_TYPES).optional().describe('Optional addon module type.'),
|
|
@@ -17,7 +17,7 @@ import { planWorkApexTestRun, recordWorkApexTestOutcome } from '../work-apex-tes
|
|
|
17
17
|
import { DEFAULT_APEX_TEST_WAIT_MINUTES, parseApexTestClassNames, runWorkApexTests, skippedWorkApexTestResult, validateApexTestWaitMinutes, WorkApexTestError, } from '../work-apex-test.js';
|
|
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
|
-
import { validateWorkMutationPayload, WORK_LONG_TEXT_MAX_LENGTH, WORK_SHORT_TEXT_MAX_LENGTH, } from '../work-flags.js';
|
|
20
|
+
import { normalizeWorkCustomFields, validateWorkMutationPayload, WORK_LONG_TEXT_MAX_LENGTH, WORK_SHORT_TEXT_MAX_LENGTH, } from '../work-flags.js';
|
|
21
21
|
import { fetchWorkItems, fetchWorkItemWithOptions } from '../work-get.js';
|
|
22
22
|
import { performWorkLocalCommit } from '../work-local-commit.js';
|
|
23
23
|
import { reportLocalQualityGatesFailure, reportLocalQualityGatesOutcome, } from '../work-local-run-tests.js';
|
|
@@ -54,6 +54,7 @@ const WORK_MUTATION_PAYLOAD_KEYS = [
|
|
|
54
54
|
'assignee',
|
|
55
55
|
'cancellationReason',
|
|
56
56
|
'closeDate',
|
|
57
|
+
'customFields',
|
|
57
58
|
'epic',
|
|
58
59
|
'excludedFromCbm',
|
|
59
60
|
'feature',
|
|
@@ -80,7 +81,12 @@ function buildWorkMutationPayloadFromArgs(args) {
|
|
|
80
81
|
for (const key of WORK_MUTATION_PAYLOAD_KEYS) {
|
|
81
82
|
const value = args[key];
|
|
82
83
|
if (value !== undefined) {
|
|
83
|
-
|
|
84
|
+
if (key === 'customFields') {
|
|
85
|
+
Object.assign(payload, { customFields: normalizeWorkCustomFields(value) });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
Object.assign(payload, { [key]: value });
|
|
89
|
+
}
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
return applySourceCredentialEnvironmentRule(payload);
|
|
@@ -617,6 +623,10 @@ const skipNestedMetadataDetectionSchema = z
|
|
|
617
623
|
.boolean()
|
|
618
624
|
.optional()
|
|
619
625
|
.describe('Do not detect the nested metadata changed across the branch. Also configurable via skipNestedMetadataDetection in .agentia/config.json or .agentia/config.user.json.');
|
|
626
|
+
const workCustomFieldWriteSchema = z.object({
|
|
627
|
+
apiName: z.string().min(1).describe('Salesforce subscriber custom field API name (for example JIRA_Key__c).'),
|
|
628
|
+
value: z.unknown().optional().describe('Field value to write (string, number, boolean, null, or multipicklist string).'),
|
|
629
|
+
});
|
|
620
630
|
const workMutationSchema = {
|
|
621
631
|
acceptanceCriteria: z.string().max(WORK_SHORT_TEXT_MAX_LENGTH).optional().describe('Acceptance criteria (maximum 255 characters).'),
|
|
622
632
|
actualPoints: z.number().int().optional().describe('Actual points.'),
|
|
@@ -624,6 +634,10 @@ const workMutationSchema = {
|
|
|
624
634
|
assignee: z.string().optional().describe('Assignee ID.'),
|
|
625
635
|
cancellationReason: z.string().optional().describe('Cancellation reason.'),
|
|
626
636
|
closeDate: z.string().optional().describe('Close date.'),
|
|
637
|
+
customFields: z
|
|
638
|
+
.array(workCustomFieldWriteSchema)
|
|
639
|
+
.optional()
|
|
640
|
+
.describe('Subscriber custom fields to write as [{ apiName, value }]. Omit for packaged-only create/update. Duplicate apiNames are rejected.'),
|
|
627
641
|
epic: z.string().optional().describe('Epic.'),
|
|
628
642
|
excludedFromCbm: z.boolean().optional().describe('Exclude from CBM.'),
|
|
629
643
|
feature: z.string().optional().describe('Feature.'),
|
|
@@ -697,7 +711,7 @@ export function registerAgentiaMcpWorkTools(server) {
|
|
|
697
711
|
title: 'Agentia Work Delete',
|
|
698
712
|
}, (args) => safelyHandleTool(() => workDelete(args)));
|
|
699
713
|
server.registerTool('agentia_work_set', {
|
|
700
|
-
description: 'Set the active Copado work item and prepare a local feature/<user-story-name> branch. Requires a clean tracked working tree. Fetches the base branch from origin, fetches the feature branch when it exists on origin, then creates or checks out the feature branch from the remote feature when present, otherwise from the base. A gateway warning prints the message, skips git, clears lastBaseBranch/lastDevOrgBranch/lastPullRequestBaseUrl, and records lastWorkItemId/lastWorkItem/lastWorkItemTitle from the returned work item. After work/set returns, compares the Story source credential with the CICD project default: warns when the
|
|
714
|
+
description: 'Set the active Copado work item and prepare a local feature/<user-story-name> branch. Requires a clean tracked working tree. Fetches the base branch from origin, fetches the feature branch when it exists on origin, then creates or checks out the feature branch from the remote feature when present, otherwise from the base. A gateway warning prints the message, skips git, clears lastBaseBranch/lastDevOrgBranch/lastPullRequestBaseUrl, and records lastWorkItemId/lastWorkItem/lastWorkItemTitle from the returned work item. After work/set returns, compares the Story source credential with the CICD project default: warns when the Story credential is missing, skips comparison when a bound Story has no project default, and warns without changing the Story when they differ (shows the current credential and environment; use work update to change it). With none=true, clears every last* key from config.user.json and checks out the previous lastBaseBranch when present, else main, else master, else stays put.',
|
|
701
715
|
inputSchema: {
|
|
702
716
|
baseBranch: z
|
|
703
717
|
.string()
|
|
@@ -727,7 +741,7 @@ export function registerAgentiaMcpWorkTools(server) {
|
|
|
727
741
|
skipNestedMetadataDetection: skipNestedMetadataDetectionSchema,
|
|
728
742
|
};
|
|
729
743
|
server.registerTool('agentia_work_publish', {
|
|
730
|
-
description: 'Publish the current feature/<lastWorkItem> branch and register commits with Copado. Requires a clean working tree, lastBaseBranch, and lastDevOrgBranch from config.user.json. Applies Copado environment-variable then yaml replacements when needed (yaml `-b` is the feature branch, matching Copado Commit), commits both as a single follow-up commit, sends one headless push changeListUpdate list of Action:MetadataType:MetadataName corrections (lastPermissionSelected and the permissions argument plus the nested metadata of the changed profiles and permission sets as RetrieveOnly so Copado registers that metadata with the Retrieve Only commit action, lastFullMetadataSelected and the fullMetadata argument plus brand-new nested parent files as fullMetadata, the ignored nested parents as unchanged, the nested metadata the branch deleted as
|
|
744
|
+
description: 'Publish the current feature/<lastWorkItem> branch and register commits with Copado. Requires a clean working tree, lastBaseBranch, and lastDevOrgBranch from config.user.json. Applies Copado environment-variable then yaml replacements when needed (yaml `-b` is the feature branch, matching Copado Commit), commits both as a single follow-up commit, sends one headless push changeListUpdate list of Action:MetadataType:MetadataName corrections (lastPermissionSelected and the permissions argument plus the nested metadata of the changed profiles and permission sets as RetrieveOnly so Copado registers that metadata with the Retrieve Only commit action, lastFullMetadataSelected and the fullMetadata argument plus brand-new nested parent files as fullMetadata, the ignored nested parents as unchanged, the nested metadata the branch deleted as Delete, and the remaining nested metadata as Add). The changed profiles and permission sets themselves are never sent as corrections, so they stay in the change list and deploy only the permissions their RetrieveOnly entries select; brand-new nested parent files are sent as fullMetadata instead. Merges the feature branch into the recorded dev org branch after headless push. With dryRun=true, previews replacements and changeListUpdate, restores dirtied tracked files, and skips commit/push/lock/register/dev-org sync. Prefer this over agentia_work_push.',
|
|
731
745
|
inputSchema: workPublishInputSchema,
|
|
732
746
|
title: 'Agentia Work Publish',
|
|
733
747
|
}, (args) => safelyHandleTool(() => workPublish(args || {})));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const AI_METADATA_ACTIONS = modules["metadata-explore.js"]["AI_METADATA_ACTIONS"]
|
|
3
|
+
const AI_METADATA_TOOL_ENDPOINT = modules["metadata-explore.js"]["AI_METADATA_TOOL_ENDPOINT"]
|
|
4
|
+
const buildAiMetadataToolRequest = modules["metadata-explore.js"]["buildAiMetadataToolRequest"]
|
|
5
|
+
const callAiMetadataTool = modules["metadata-explore.js"]["callAiMetadataTool"]
|
|
6
|
+
const missingExploreCredentialError = modules["metadata-explore.js"]["missingExploreCredentialError"]
|
|
7
|
+
const resolveExploreCredentialId = modules["metadata-explore.js"]["resolveExploreCredentialId"]
|
|
8
|
+
export {AI_METADATA_ACTIONS, AI_METADATA_TOOL_ENDPOINT, buildAiMetadataToolRequest, callAiMetadataTool, missingExploreCredentialError, resolveExploreCredentialId};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const formatTransportNetworkError = modules["network-error.js"]["formatTransportNetworkError"]
|
|
3
|
+
const gatewayTimeoutError = modules["network-error.js"]["gatewayTimeoutError"]
|
|
4
|
+
const getTransportNetworkInfo = modules["network-error.js"]["getTransportNetworkInfo"]
|
|
5
|
+
const isHttpGatewaySoftMiss = modules["network-error.js"]["isHttpGatewaySoftMiss"]
|
|
6
|
+
const isTransportNetworkError = modules["network-error.js"]["isTransportNetworkError"]
|
|
7
|
+
const throwFormattedTransportNetworkError = modules["network-error.js"]["throwFormattedTransportNetworkError"]
|
|
8
|
+
export {formatTransportNetworkError, gatewayTimeoutError, getTransportNetworkInfo, isHttpGatewaySoftMiss, isTransportNetworkError, throwFormattedTransportNetworkError};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const AUTOMATION_FILTER_CRITERIA_FLAG_DESCRIPTION = modules["pipeline-automation-flags.js"]["AUTOMATION_FILTER_CRITERIA_FLAG_DESCRIPTION"]
|
|
3
|
+
const buildPipelineAutomationCreatePayload = modules["pipeline-automation-flags.js"]["buildPipelineAutomationCreatePayload"]
|
|
4
|
+
const buildPipelineAutomationUpdatePayload = modules["pipeline-automation-flags.js"]["buildPipelineAutomationUpdatePayload"]
|
|
5
|
+
const normalizeAutomationFilterCriteria = modules["pipeline-automation-flags.js"]["normalizeAutomationFilterCriteria"]
|
|
6
|
+
const parseAutomationFilterCriteria = modules["pipeline-automation-flags.js"]["parseAutomationFilterCriteria"]
|
|
7
|
+
const pipelineAutomationListFlags = modules["pipeline-automation-flags.js"]["pipelineAutomationListFlags"]
|
|
8
|
+
const pipelineAutomationMutationFlags = modules["pipeline-automation-flags.js"]["pipelineAutomationMutationFlags"]
|
|
9
|
+
const readAutomationFilterCriteriaFromFile = modules["pipeline-automation-flags.js"]["readAutomationFilterCriteriaFromFile"]
|
|
10
|
+
const resolveAutomationFilterCriteria = modules["pipeline-automation-flags.js"]["resolveAutomationFilterCriteria"]
|
|
11
|
+
const validateAutomationCreateControls = modules["pipeline-automation-flags.js"]["validateAutomationCreateControls"]
|
|
12
|
+
export {AUTOMATION_FILTER_CRITERIA_FLAG_DESCRIPTION, buildPipelineAutomationCreatePayload, buildPipelineAutomationUpdatePayload, normalizeAutomationFilterCriteria, parseAutomationFilterCriteria, pipelineAutomationListFlags, pipelineAutomationMutationFlags, readAutomationFilterCriteriaFromFile, resolveAutomationFilterCriteria, validateAutomationCreateControls};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const activatePipelineAutomationRule = modules["pipeline-automation-ops.js"]["activatePipelineAutomationRule"]
|
|
3
|
+
const createPipelineAutomationRule = modules["pipeline-automation-ops.js"]["createPipelineAutomationRule"]
|
|
4
|
+
const deactivatePipelineAutomationRule = modules["pipeline-automation-ops.js"]["deactivatePipelineAutomationRule"]
|
|
5
|
+
const deletePipelineAutomationRule = modules["pipeline-automation-ops.js"]["deletePipelineAutomationRule"]
|
|
6
|
+
const fetchPipelineAutomationRule = modules["pipeline-automation-ops.js"]["fetchPipelineAutomationRule"]
|
|
7
|
+
const fetchPipelineAutomationRules = modules["pipeline-automation-ops.js"]["fetchPipelineAutomationRules"]
|
|
8
|
+
const updatePipelineAutomationRule = modules["pipeline-automation-ops.js"]["updatePipelineAutomationRule"]
|
|
9
|
+
export {activatePipelineAutomationRule, createPipelineAutomationRule, deactivatePipelineAutomationRule, deletePipelineAutomationRule, fetchPipelineAutomationRule, fetchPipelineAutomationRules, updatePipelineAutomationRule};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const AUTOMATION_CRITERIA_LOGICS = modules["pipeline-automation-types.js"]["AUTOMATION_CRITERIA_LOGICS"]
|
|
3
|
+
const AUTOMATION_CRITERIA_MODES = modules["pipeline-automation-types.js"]["AUTOMATION_CRITERIA_MODES"]
|
|
4
|
+
const AUTOMATION_CRITERIA_OPERATORS = modules["pipeline-automation-types.js"]["AUTOMATION_CRITERIA_OPERATORS"]
|
|
5
|
+
const AUTOMATION_EXECUTION_TIMES = modules["pipeline-automation-types.js"]["AUTOMATION_EXECUTION_TIMES"]
|
|
6
|
+
const AUTOMATION_PROMOTION_TRIGGERS = modules["pipeline-automation-types.js"]["AUTOMATION_PROMOTION_TRIGGERS"]
|
|
7
|
+
const AUTOMATION_SCOPES = modules["pipeline-automation-types.js"]["AUTOMATION_SCOPES"]
|
|
8
|
+
const AUTOMATION_SOURCE_ACTIONS = modules["pipeline-automation-types.js"]["AUTOMATION_SOURCE_ACTIONS"]
|
|
9
|
+
const AUTOMATION_SOURCE_ACTION_STATUSES = modules["pipeline-automation-types.js"]["AUTOMATION_SOURCE_ACTION_STATUSES"]
|
|
10
|
+
const formatPipelineAutomationRuleDetail = modules["pipeline-automation-types.js"]["formatPipelineAutomationRuleDetail"]
|
|
11
|
+
const formatPipelineAutomationRuleTable = modules["pipeline-automation-types.js"]["formatPipelineAutomationRuleTable"]
|
|
12
|
+
const normalizePipelineAutomationRule = modules["pipeline-automation-types.js"]["normalizePipelineAutomationRule"]
|
|
13
|
+
const normalizePipelineAutomationRulesListPage = modules["pipeline-automation-types.js"]["normalizePipelineAutomationRulesListPage"]
|
|
14
|
+
const pipelineAutomationRuleActivateEndpoint = modules["pipeline-automation-types.js"]["pipelineAutomationRuleActivateEndpoint"]
|
|
15
|
+
const pipelineAutomationRuleDeactivateEndpoint = modules["pipeline-automation-types.js"]["pipelineAutomationRuleDeactivateEndpoint"]
|
|
16
|
+
const pipelineAutomationRuleEndpoint = modules["pipeline-automation-types.js"]["pipelineAutomationRuleEndpoint"]
|
|
17
|
+
const pipelineAutomationRulesEndpoint = modules["pipeline-automation-types.js"]["pipelineAutomationRulesEndpoint"]
|
|
18
|
+
export {AUTOMATION_CRITERIA_LOGICS, AUTOMATION_CRITERIA_MODES, AUTOMATION_CRITERIA_OPERATORS, AUTOMATION_EXECUTION_TIMES, AUTOMATION_PROMOTION_TRIGGERS, AUTOMATION_SCOPES, AUTOMATION_SOURCE_ACTIONS, AUTOMATION_SOURCE_ACTION_STATUSES, formatPipelineAutomationRuleDetail, formatPipelineAutomationRuleTable, normalizePipelineAutomationRule, normalizePipelineAutomationRulesListPage, pipelineAutomationRuleActivateEndpoint, pipelineAutomationRuleDeactivateEndpoint, pipelineAutomationRuleEndpoint, pipelineAutomationRulesEndpoint};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {modules} from './runtime.js';
|
|
2
|
+
const QUALITY_GATE_FILTER_CRITERIA_FLAG_DESCRIPTION = modules["pipeline-quality-gate-flags.js"]["QUALITY_GATE_FILTER_CRITERIA_FLAG_DESCRIPTION"]
|
|
3
|
+
const buildPipelineQualityGateCreateArgsPayload = modules["pipeline-quality-gate-flags.js"]["buildPipelineQualityGateCreateArgsPayload"]
|
|
4
|
+
const buildPipelineQualityGateCreatePayload = modules["pipeline-quality-gate-flags.js"]["buildPipelineQualityGateCreatePayload"]
|
|
5
|
+
const buildPipelineQualityGateUpdatePayload = modules["pipeline-quality-gate-flags.js"]["buildPipelineQualityGateUpdatePayload"]
|
|
6
|
+
const normalizeQualityGateFilterCriteria = modules["pipeline-quality-gate-flags.js"]["normalizeQualityGateFilterCriteria"]
|
|
7
|
+
const parseQualityGateFilterCriteria = modules["pipeline-quality-gate-flags.js"]["parseQualityGateFilterCriteria"]
|
|
8
|
+
const pipelineQualityGateCreateFlags = modules["pipeline-quality-gate-flags.js"]["pipelineQualityGateCreateFlags"]
|
|
9
|
+
const pipelineQualityGateListFlags = modules["pipeline-quality-gate-flags.js"]["pipelineQualityGateListFlags"]
|
|
10
|
+
const pipelineQualityGateUpdateFlags = modules["pipeline-quality-gate-flags.js"]["pipelineQualityGateUpdateFlags"]
|
|
11
|
+
const readQualityGateFilterCriteriaFromFile = modules["pipeline-quality-gate-flags.js"]["readQualityGateFilterCriteriaFromFile"]
|
|
12
|
+
export {QUALITY_GATE_FILTER_CRITERIA_FLAG_DESCRIPTION, buildPipelineQualityGateCreateArgsPayload, buildPipelineQualityGateCreatePayload, buildPipelineQualityGateUpdatePayload, normalizeQualityGateFilterCriteria, parseQualityGateFilterCriteria, pipelineQualityGateCreateFlags, pipelineQualityGateListFlags, pipelineQualityGateUpdateFlags, readQualityGateFilterCriteriaFromFile};
|