@salesforce/plugin-agent 1.42.1 → 1.43.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 +476 -63
- package/lib/commands/agent/generate/test-spec.d.ts +9 -0
- package/lib/commands/agent/generate/test-spec.js +194 -11
- package/lib/commands/agent/generate/test-spec.js.map +1 -1
- package/lib/commands/agent/mcp/asset/list.d.ts +16 -0
- package/lib/commands/agent/mcp/asset/list.js +68 -0
- package/lib/commands/agent/mcp/asset/list.js.map +1 -0
- package/lib/commands/agent/mcp/asset/replace.d.ts +18 -0
- package/lib/commands/agent/mcp/asset/replace.js +95 -0
- package/lib/commands/agent/mcp/asset/replace.js.map +1 -0
- package/lib/commands/agent/mcp/create.d.ts +24 -0
- package/lib/commands/agent/mcp/create.js +112 -0
- package/lib/commands/agent/mcp/create.js.map +1 -0
- package/lib/commands/agent/mcp/delete.d.ts +19 -0
- package/lib/commands/agent/mcp/delete.js +65 -0
- package/lib/commands/agent/mcp/delete.js.map +1 -0
- package/lib/commands/agent/mcp/fetch.d.ts +16 -0
- package/lib/commands/agent/mcp/fetch.js +68 -0
- package/lib/commands/agent/mcp/fetch.js.map +1 -0
- package/lib/commands/agent/mcp/get.d.ts +16 -0
- package/lib/commands/agent/mcp/get.js +58 -0
- package/lib/commands/agent/mcp/get.js.map +1 -0
- package/lib/commands/agent/mcp/list.d.ts +18 -0
- package/lib/commands/agent/mcp/list.js +73 -0
- package/lib/commands/agent/mcp/list.js.map +1 -0
- package/lib/commands/agent/mcp/update.d.ts +24 -0
- package/lib/commands/agent/mcp/update.js +115 -0
- package/lib/commands/agent/mcp/update.js.map +1 -0
- package/lib/commands/agent/preview/start.d.ts +1 -0
- package/lib/commands/agent/preview/start.js +4 -1
- package/lib/commands/agent/preview/start.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +1 -0
- package/lib/commands/agent/preview.js +4 -0
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/components/agent-preview-react.d.ts +2 -1
- package/lib/components/agent-preview-react.js +3 -3
- package/lib/components/agent-preview-react.js.map +1 -1
- package/lib/flags.d.ts +12 -1
- package/lib/flags.js +31 -0
- package/lib/flags.js.map +1 -1
- package/messages/agent.generate.test-spec.md +33 -5
- package/messages/agent.mcp.asset.list.md +25 -0
- package/messages/agent.mcp.asset.replace.md +49 -0
- package/messages/agent.mcp.create.md +61 -0
- package/messages/agent.mcp.delete.md +37 -0
- package/messages/agent.mcp.fetch.md +25 -0
- package/messages/agent.mcp.get.md +25 -0
- package/messages/agent.mcp.list.md +33 -0
- package/messages/agent.mcp.update.md +65 -0
- package/messages/shared.md +16 -0
- package/oclif.manifest.json +1750 -880
- package/package.json +14 -4
- package/schemas/agent-mcp-asset-list.json +65 -0
- package/schemas/agent-mcp-asset-replace.json +65 -0
- package/schemas/agent-mcp-create.json +144 -0
- package/schemas/agent-mcp-delete.json +22 -0
- package/schemas/agent-mcp-fetch.json +66 -0
- package/schemas/agent-mcp-get.json +86 -0
- package/schemas/agent-mcp-list.json +101 -0
- package/schemas/agent-mcp-update.json +86 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog, } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.create');
|
|
21
|
+
export default class ApiCatalogMcpServerCreate extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
name: Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
32
|
+
char: 'n',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
label: Flags.string({
|
|
36
|
+
summary: messages.getMessage('flags.label.summary'),
|
|
37
|
+
}),
|
|
38
|
+
description: Flags.string({
|
|
39
|
+
summary: messages.getMessage('flags.description.summary'),
|
|
40
|
+
}),
|
|
41
|
+
'server-url': Flags.string({
|
|
42
|
+
summary: messages.getMessage('flags.server-url.summary'),
|
|
43
|
+
required: true,
|
|
44
|
+
}),
|
|
45
|
+
'auth-type': Flags.option({
|
|
46
|
+
summary: messages.getMessage('flags.auth-type.summary'),
|
|
47
|
+
options: ['OAUTH', 'NO_AUTH'],
|
|
48
|
+
default: 'NO_AUTH',
|
|
49
|
+
})(),
|
|
50
|
+
'identity-provider': Flags.string({
|
|
51
|
+
summary: messages.getMessage('flags.identity-provider.summary'),
|
|
52
|
+
}),
|
|
53
|
+
'client-id': Flags.string({
|
|
54
|
+
summary: messages.getMessage('flags.client-id.summary'),
|
|
55
|
+
}),
|
|
56
|
+
'client-secret': Flags.string({
|
|
57
|
+
summary: messages.getMessage('flags.client-secret.summary'),
|
|
58
|
+
allowStdin: true,
|
|
59
|
+
}),
|
|
60
|
+
scope: Flags.string({
|
|
61
|
+
summary: messages.getMessage('flags.scope.summary'),
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
async run() {
|
|
65
|
+
const { flags } = await this.parse(ApiCatalogMcpServerCreate);
|
|
66
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
67
|
+
const authType = flags['auth-type'];
|
|
68
|
+
if (authType === 'OAUTH') {
|
|
69
|
+
if (!flags['identity-provider'] || !flags['client-id'] || !flags['client-secret'] || !flags.scope) {
|
|
70
|
+
throw new SfError(messages.getMessage('error.missingOauthFields'), 'MissingOauthFields', [], 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const input = {
|
|
74
|
+
name: flags.name,
|
|
75
|
+
type: 'EXTERNAL',
|
|
76
|
+
serverUrl: flags['server-url'],
|
|
77
|
+
};
|
|
78
|
+
if (flags.label) {
|
|
79
|
+
input.label = flags.label;
|
|
80
|
+
}
|
|
81
|
+
if (flags.description) {
|
|
82
|
+
input.description = flags.description;
|
|
83
|
+
}
|
|
84
|
+
if (authType === 'OAUTH') {
|
|
85
|
+
const authorization = {
|
|
86
|
+
authType: 'OAUTH',
|
|
87
|
+
identityProvider: flags['identity-provider'],
|
|
88
|
+
clientId: flags['client-id'],
|
|
89
|
+
clientSecret: flags['client-secret'],
|
|
90
|
+
scope: flags.scope,
|
|
91
|
+
};
|
|
92
|
+
input.authorization = authorization;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
input.authorization = { authType: 'NO_AUTH' };
|
|
96
|
+
}
|
|
97
|
+
let result;
|
|
98
|
+
try {
|
|
99
|
+
result = await ApiCatalog.createMcpServer(connection, input);
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
const wrapped = SfError.wrap(error);
|
|
103
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'CreateMcpServerFailed', [], 4, wrapped);
|
|
104
|
+
}
|
|
105
|
+
if (!this.jsonEnabled()) {
|
|
106
|
+
this.log(`Created MCP server "${result.server.name}" (${result.server.id}).`);
|
|
107
|
+
this.log(`Discovered ${result.assets.length} asset(s).`);
|
|
108
|
+
}
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,UAAU,GAKX,MAAM,oBAAoB,CAAC;AAE5B,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAIvF,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,SAAgC;IAC9E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;IAElC,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAClD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,CAAC;QAChD,CAAC;QAED,IAAI,MAA6B,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,IAAI,OAAO,CACf,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EACtD,uBAAuB,EACvB,EAAE,EACF,CAAC,EACD,OAAO,CACR,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,uBAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;YAC9E,IAAI,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,MAAM,CAAC,MAAM,YAAY,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type ApiCatalogMcpServerDeleteResult = {
|
|
3
|
+
id: string;
|
|
4
|
+
deleted: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default class ApiCatalogMcpServerDelete extends SfCommand<ApiCatalogMcpServerDeleteResult> {
|
|
7
|
+
static readonly summary: string;
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly enableJsonFlag = true;
|
|
11
|
+
static readonly state = "preview";
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'mcp-server-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<ApiCatalogMcpServerDeleteResult>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.delete');
|
|
21
|
+
export default class ApiCatalogMcpServerDelete extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
'mcp-server-id': Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.mcp-server-id.summary'),
|
|
32
|
+
char: 'i',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
'no-prompt': Flags.boolean({
|
|
36
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
37
|
+
default: false,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
async run() {
|
|
41
|
+
const { flags } = await this.parse(ApiCatalogMcpServerDelete);
|
|
42
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
43
|
+
// Skip the confirmation prompt in JSON mode — scripted/CI callers cannot answer it.
|
|
44
|
+
if (!flags['no-prompt'] && !this.jsonEnabled()) {
|
|
45
|
+
const confirmed = await this.confirm({
|
|
46
|
+
message: messages.getMessage('confirm.delete', [flags['mcp-server-id']]),
|
|
47
|
+
});
|
|
48
|
+
if (!confirmed) {
|
|
49
|
+
throw new SfError(messages.getMessage('error.aborted'), 'Aborted', [], 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
await ApiCatalog.deleteMcpServer(connection, flags['mcp-server-id']);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
const wrapped = SfError.wrap(error);
|
|
57
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'DeleteMcpServerFailed', [], 4, wrapped);
|
|
58
|
+
}
|
|
59
|
+
if (!this.jsonEnabled()) {
|
|
60
|
+
this.log(`Deleted MCP server ${flags['mcp-server-id']}.`);
|
|
61
|
+
}
|
|
62
|
+
return { id: flags['mcp-server-id'], deleted: true };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/delete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;A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ommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type McpServerFetchOutput } from '@salesforce/agents';
|
|
3
|
+
export type ApiCatalogMcpServerFetchResult = McpServerFetchOutput;
|
|
4
|
+
export default class ApiCatalogMcpServerFetch extends SfCommand<ApiCatalogMcpServerFetchResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly enableJsonFlag = true;
|
|
9
|
+
static readonly state = "preview";
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'mcp-server-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<ApiCatalogMcpServerFetchResult>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.fetch');
|
|
21
|
+
export default class ApiCatalogMcpServerFetch extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
'mcp-server-id': Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.mcp-server-id.summary'),
|
|
32
|
+
char: 'i',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
async run() {
|
|
37
|
+
const { flags } = await this.parse(ApiCatalogMcpServerFetch);
|
|
38
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
39
|
+
let result;
|
|
40
|
+
try {
|
|
41
|
+
result = await ApiCatalog.fetchMcpServer(connection, flags['mcp-server-id']);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
const wrapped = SfError.wrap(error);
|
|
45
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'FetchMcpServerFailed', [], 4, wrapped);
|
|
46
|
+
}
|
|
47
|
+
if (!this.jsonEnabled()) {
|
|
48
|
+
this.table({
|
|
49
|
+
data: (result.assets ?? []).map((a) => ({
|
|
50
|
+
name: a.name,
|
|
51
|
+
kind: a.kind,
|
|
52
|
+
status: a.status,
|
|
53
|
+
active: a.active,
|
|
54
|
+
availableAsAgentAction: a.availableAsAgentAction,
|
|
55
|
+
})),
|
|
56
|
+
columns: [
|
|
57
|
+
{ key: 'name', name: 'Name' },
|
|
58
|
+
{ key: 'kind', name: 'Kind' },
|
|
59
|
+
{ key: 'status', name: 'Status' },
|
|
60
|
+
{ key: 'active', name: 'Active' },
|
|
61
|
+
{ key: 'availableAsAgentAction', name: 'Agent Action' },
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAA6B,MAAM,oBAAoB,CAAC;AAE3E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,iBAAiB,CAAC,CAAC;AAItF,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAyC;IACtF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;IAElC,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC;YAC5B,OAAO,E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AE;oBAC7B,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;oBAC7B,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACjC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACjC,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,cAAc,EAAE;iBACxD;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type McpServerOutput } from '@salesforce/agents';
|
|
3
|
+
export type ApiCatalogMcpServerGetResult = McpServerOutput;
|
|
4
|
+
export default class ApiCatalogMcpServerGet extends SfCommand<ApiCatalogMcpServerGetResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly enableJsonFlag = true;
|
|
9
|
+
static readonly state = "preview";
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'mcp-server-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<ApiCatalogMcpServerGetResult>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.get');
|
|
21
|
+
export default class ApiCatalogMcpServerGet extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
'mcp-server-id': Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.mcp-server-id.summary'),
|
|
32
|
+
char: 'i',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
async run() {
|
|
37
|
+
const { flags } = await this.parse(ApiCatalogMcpServerGet);
|
|
38
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
39
|
+
let result;
|
|
40
|
+
try {
|
|
41
|
+
result = await ApiCatalog.getMcpServer(connection, flags['mcp-server-id']);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
const wrapped = SfError.wrap(error);
|
|
45
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'GetMcpServerFailed', [], 4, wrapped);
|
|
46
|
+
}
|
|
47
|
+
if (!this.jsonEnabled()) {
|
|
48
|
+
this.log(`Id: ${result.id}`);
|
|
49
|
+
this.log(`Name: ${result.name}`);
|
|
50
|
+
this.log(`Label: ${result.label ?? ''}`);
|
|
51
|
+
this.log(`Type: ${result.type}`);
|
|
52
|
+
this.log(`Status: ${result.status}`);
|
|
53
|
+
this.log(`Server URL: ${result.serverUrl ?? ''}`);
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/get.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAEtE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;AAIpF,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAuC;IAClF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;IAElC,MAAM,CAAU,KAAK,GAAG;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AE,CAAC,CAAC;YACtC,IAAI,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type McpServerCollection } from '@salesforce/agents';
|
|
3
|
+
export type ApiCatalogMcpServerListResult = McpServerCollection;
|
|
4
|
+
export default class ApiCatalogMcpServerList extends SfCommand<ApiCatalogMcpServerListResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly enableJsonFlag = true;
|
|
9
|
+
static readonly state = "preview";
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
type: import("@oclif/core/interfaces").OptionFlag<"EXTERNAL" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
status: import("@oclif/core/interfaces").OptionFlag<"ACTIVE" | "DISCONNECTED" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<ApiCatalogMcpServerListResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.list');
|
|
21
|
+
export default class ApiCatalogMcpServerList extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
label: Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.label.summary'),
|
|
32
|
+
}),
|
|
33
|
+
type: Flags.option({
|
|
34
|
+
summary: messages.getMessage('flags.type.summary'),
|
|
35
|
+
options: ['EXTERNAL'],
|
|
36
|
+
})(),
|
|
37
|
+
status: Flags.option({
|
|
38
|
+
summary: messages.getMessage('flags.status.summary'),
|
|
39
|
+
options: ['ACTIVE', 'DISCONNECTED'],
|
|
40
|
+
})(),
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(ApiCatalogMcpServerList);
|
|
44
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
45
|
+
let result;
|
|
46
|
+
try {
|
|
47
|
+
result = await ApiCatalog.listMcpServers(connection, {
|
|
48
|
+
label: flags.label,
|
|
49
|
+
type: flags.type,
|
|
50
|
+
status: flags.status,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const wrapped = SfError.wrap(error);
|
|
55
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'ListMcpServersFailed', [], 4, wrapped);
|
|
56
|
+
}
|
|
57
|
+
if (!this.jsonEnabled()) {
|
|
58
|
+
this.table({
|
|
59
|
+
data: result.mcpServers ?? [],
|
|
60
|
+
columns: [
|
|
61
|
+
{ key: 'id', name: 'ID' },
|
|
62
|
+
{ key: 'name', name: 'Name' },
|
|
63
|
+
{ key: 'label', name: 'Label' },
|
|
64
|
+
{ key: 'type', name: 'Type' },
|
|
65
|
+
{ key: 'status', name: 'Status' },
|
|
66
|
+
{ key: 'serverUrl', name: 'Server URL' },
|
|
67
|
+
],
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAA4B,MAAM,oBAAoB,CAAC;AAE1E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC;AAIrF,MA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nD,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,IAAI,OAAO,CACf,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EACtD,sBAAsB,EACtB,EAAE,EACF,CAAC,EACD,OAAO,CACR,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC;gBACT,IAAI,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;gBAC7B,OAAO,EAAE;oBACP,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;oBACzB,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;oBAC7B,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;oBAC/B,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;oBAC7B,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACjC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE;iBACzC;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type McpServerOutput } from '@salesforce/agents';
|
|
3
|
+
export type ApiCatalogMcpServerUpdateResult = McpServerOutput;
|
|
4
|
+
export default class ApiCatalogMcpServerUpdate extends SfCommand<ApiCatalogMcpServerUpdateResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly enableJsonFlag = true;
|
|
9
|
+
static readonly state = "preview";
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'mcp-server-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'server-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'auth-type': import("@oclif/core/interfaces").OptionFlag<"OAUTH" | "NO_AUTH" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'identity-provider': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'client-secret': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
scope: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<ApiCatalogMcpServerUpdateResult>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { ApiCatalog, } from '@salesforce/agents';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.mcp.update');
|
|
21
|
+
export default class ApiCatalogMcpServerUpdate extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static state = 'preview';
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg(),
|
|
29
|
+
'api-version': Flags.orgApiVersion(),
|
|
30
|
+
'mcp-server-id': Flags.string({
|
|
31
|
+
summary: messages.getMessage('flags.mcp-server-id.summary'),
|
|
32
|
+
char: 'i',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
label: Flags.string({
|
|
36
|
+
summary: messages.getMessage('flags.label.summary'),
|
|
37
|
+
}),
|
|
38
|
+
description: Flags.string({
|
|
39
|
+
summary: messages.getMessage('flags.description.summary'),
|
|
40
|
+
}),
|
|
41
|
+
'server-url': Flags.string({
|
|
42
|
+
summary: messages.getMessage('flags.server-url.summary'),
|
|
43
|
+
}),
|
|
44
|
+
'auth-type': Flags.option({
|
|
45
|
+
summary: messages.getMessage('flags.auth-type.summary'),
|
|
46
|
+
options: ['OAUTH', 'NO_AUTH'],
|
|
47
|
+
})(),
|
|
48
|
+
'identity-provider': Flags.string({
|
|
49
|
+
summary: messages.getMessage('flags.identity-provider.summary'),
|
|
50
|
+
}),
|
|
51
|
+
'client-id': Flags.string({
|
|
52
|
+
summary: messages.getMessage('flags.client-id.summary'),
|
|
53
|
+
}),
|
|
54
|
+
'client-secret': Flags.string({
|
|
55
|
+
summary: messages.getMessage('flags.client-secret.summary'),
|
|
56
|
+
allowStdin: true,
|
|
57
|
+
}),
|
|
58
|
+
scope: Flags.string({
|
|
59
|
+
summary: messages.getMessage('flags.scope.summary'),
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
async run() {
|
|
63
|
+
const { flags } = await this.parse(ApiCatalogMcpServerUpdate);
|
|
64
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
65
|
+
const input = {};
|
|
66
|
+
if (flags.label !== undefined) {
|
|
67
|
+
input.label = flags.label;
|
|
68
|
+
}
|
|
69
|
+
if (flags.description !== undefined) {
|
|
70
|
+
input.description = flags.description;
|
|
71
|
+
}
|
|
72
|
+
if (flags['server-url'] !== undefined) {
|
|
73
|
+
input.serverUrl = flags['server-url'];
|
|
74
|
+
}
|
|
75
|
+
const authType = flags['auth-type'];
|
|
76
|
+
if (authType) {
|
|
77
|
+
if (authType === 'OAUTH') {
|
|
78
|
+
if (!flags['identity-provider'] ||
|
|
79
|
+
!flags['client-id'] ||
|
|
80
|
+
!flags['client-secret'] ||
|
|
81
|
+
!flags.scope) {
|
|
82
|
+
throw new SfError(messages.getMessage('error.missingOauthFields'), 'MissingOauthFields', [], 1);
|
|
83
|
+
}
|
|
84
|
+
const authorization = {
|
|
85
|
+
authType: 'OAUTH',
|
|
86
|
+
identityProvider: flags['identity-provider'],
|
|
87
|
+
clientId: flags['client-id'],
|
|
88
|
+
clientSecret: flags['client-secret'],
|
|
89
|
+
scope: flags.scope,
|
|
90
|
+
};
|
|
91
|
+
input.authorization = authorization;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
const authorization = { authType: 'NO_AUTH' };
|
|
95
|
+
input.authorization = authorization;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (Object.keys(input).length === 0) {
|
|
99
|
+
throw new SfError(messages.getMessage('error.noFields'), 'NoFields', [], 1);
|
|
100
|
+
}
|
|
101
|
+
let result;
|
|
102
|
+
try {
|
|
103
|
+
result = await ApiCatalog.updateMcpServer(connection, flags['mcp-server-id'], input);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
const wrapped = SfError.wrap(error);
|
|
107
|
+
throw new SfError(messages.getMessage('error.failed', [wrapped.message]), 'UpdateMcpServerFailed', [], 4, wrapped);
|
|
108
|
+
}
|
|
109
|
+
if (!this.jsonEnabled()) {
|
|
110
|
+
this.log(`Updated MCP server "${result.label ?? result.name}" (${result.id}).`);
|
|
111
|
+
}
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/agent/mcp/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,UAAU,GAKX,MAAM,oBAAoB,CAAC;AAE5B,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAIvF,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ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