@salesforce/plugin-agent 1.24.35 → 1.25.1
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/LICENSE.txt +200 -6
- package/README.md +240 -55
- package/lib/agentActivation.js +13 -4
- package/lib/agentActivation.js.map +1 -1
- package/lib/agentTestCache.js +13 -4
- package/lib/agentTestCache.js.map +1 -1
- package/lib/commands/agent/activate.js +13 -4
- package/lib/commands/agent/activate.js.map +1 -1
- package/lib/commands/agent/create.js +13 -4
- package/lib/commands/agent/create.js.map +1 -1
- package/lib/commands/agent/deactivate.js +13 -4
- package/lib/commands/agent/deactivate.js.map +1 -1
- package/lib/commands/agent/generate/agent-spec.js +13 -4
- package/lib/commands/agent/generate/agent-spec.js.map +1 -1
- package/lib/commands/agent/generate/authoring-bundle.d.ts +23 -0
- package/lib/commands/agent/generate/authoring-bundle.js +140 -0
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -0
- package/lib/commands/agent/generate/template.js +13 -4
- package/lib/commands/agent/generate/template.js.map +1 -1
- package/lib/commands/agent/generate/test-spec.js +13 -4
- package/lib/commands/agent/generate/test-spec.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +6 -12
- package/lib/commands/agent/preview.js +130 -67
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/commands/agent/publish/authoring-bundle.d.ts +20 -0
- package/lib/commands/agent/publish/authoring-bundle.js +154 -0
- package/lib/commands/agent/publish/authoring-bundle.js.map +1 -0
- package/lib/commands/agent/test/create.js +13 -4
- package/lib/commands/agent/test/create.js.map +1 -1
- package/lib/commands/agent/test/list.js +13 -4
- package/lib/commands/agent/test/list.js.map +1 -1
- package/lib/commands/agent/test/results.js +13 -4
- package/lib/commands/agent/test/results.js.map +1 -1
- package/lib/commands/agent/test/resume.js +13 -4
- package/lib/commands/agent/test/resume.js.map +1 -1
- package/lib/commands/agent/test/run.js +14 -4
- package/lib/commands/agent/test/run.js.map +1 -1
- package/lib/commands/agent/validate/authoring-bundle.d.ts +19 -0
- package/lib/commands/agent/validate/authoring-bundle.js +128 -0
- package/lib/commands/agent/validate/authoring-bundle.js.map +1 -0
- package/lib/common.d.ts +8 -0
- package/lib/common.js +39 -0
- package/lib/common.js.map +1 -0
- package/lib/components/agent-preview-react.d.ts +9 -2
- package/lib/components/agent-preview-react.js +188 -62
- package/lib/components/agent-preview-react.js.map +1 -1
- package/lib/flags.d.ts +6 -2
- package/lib/flags.js +55 -20
- package/lib/flags.js.map +1 -1
- package/lib/handleTestResults.js +13 -4
- package/lib/handleTestResults.js.map +1 -1
- package/lib/index.js +13 -4
- package/lib/index.js.map +1 -1
- package/lib/inquirer-theme.js +13 -4
- package/lib/inquirer-theme.js.map +1 -1
- package/lib/testStages.js +13 -4
- package/lib/testStages.js.map +1 -1
- package/lib/yes-no-cancel.js +13 -4
- package/lib/yes-no-cancel.js.map +1 -1
- package/messages/agent.create.md +2 -0
- package/messages/agent.generate.agent-spec.md +2 -2
- package/messages/agent.generate.authoring-bundle.md +69 -0
- package/messages/agent.preview.md +25 -12
- package/messages/agent.publish.authoring-bundle.md +50 -0
- package/messages/agent.test.run.md +4 -0
- package/messages/agent.validate.authoring-bundle.md +50 -0
- package/oclif.manifest.json +311 -10
- package/package.json +17 -10
- package/schemas/agent-generate-agent__spec.json +1 -1
- package/schemas/agent-generate-authoring__bundle.json +22 -0
- package/schemas/agent-publish-authoring__bundle.json +25 -0
- package/schemas/agent-validate-authoring__bundle.json +22 -0
- package/npm-shrinkwrap.json +0 -17457
- package/oclif.lock +0 -9156
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the
|
|
5
|
-
*
|
|
2
|
+
* Copyright 2025, 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.
|
|
6
15
|
*/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
16
|
+
import * as path from 'node:path';
|
|
17
|
+
import { join, resolve } from 'node:path';
|
|
18
|
+
import { globSync } from 'glob';
|
|
19
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
20
|
+
import { AuthInfo, Connection, Lifecycle, Messages, SfError } from '@salesforce/core';
|
|
10
21
|
import React from 'react';
|
|
11
22
|
import { render } from 'ink';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { select, confirm, input } from '@inquirer/prompts';
|
|
23
|
+
import { AgentPreview as Preview, AgentSimulate, AgentSource, findAuthoringBundle, } from '@salesforce/agents';
|
|
24
|
+
import { select } from '@inquirer/prompts';
|
|
15
25
|
import { AgentPreviewReact } from '../../components/agent-preview-react.js';
|
|
16
26
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
17
27
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.preview');
|
|
@@ -30,13 +40,15 @@ export default class AgentPreview extends SfCommand {
|
|
|
30
40
|
'client-app': Flags.string({
|
|
31
41
|
char: 'c',
|
|
32
42
|
summary: messages.getMessage('flags.client-app.summary'),
|
|
33
|
-
required: true,
|
|
34
43
|
dependsOn: ['target-org'],
|
|
35
44
|
}),
|
|
36
45
|
'api-name': Flags.string({
|
|
37
46
|
summary: messages.getMessage('flags.api-name.summary'),
|
|
38
47
|
char: 'n',
|
|
39
48
|
}),
|
|
49
|
+
'authoring-bundle': Flags.string({
|
|
50
|
+
summary: messages.getMessage('flags.authoring-bundle.summary'),
|
|
51
|
+
}),
|
|
40
52
|
'output-dir': Flags.directory({
|
|
41
53
|
summary: messages.getMessage('flags.output-dir.summary'),
|
|
42
54
|
char: 'd',
|
|
@@ -45,46 +57,133 @@ export default class AgentPreview extends SfCommand {
|
|
|
45
57
|
summary: messages.getMessage('flags.apex-debug.summary'),
|
|
46
58
|
char: 'x',
|
|
47
59
|
}),
|
|
60
|
+
'use-live-actions': Flags.boolean({
|
|
61
|
+
summary: messages.getMessage('flags.use-live-actions.summary'),
|
|
62
|
+
default: false,
|
|
63
|
+
}),
|
|
48
64
|
};
|
|
49
65
|
async run() {
|
|
66
|
+
// STAGES OF PREVIEW
|
|
67
|
+
// get user's agent selection either from flags, or interaction
|
|
68
|
+
// if .agent selected, use the AgentSimulate class to preview
|
|
69
|
+
// if published agent, use AgentPreview for preview
|
|
70
|
+
// based on agent, differing auth mechanisms required
|
|
50
71
|
const { flags } = await this.parse(AgentPreview);
|
|
51
|
-
const { 'api-name': apiNameFlag } = flags;
|
|
72
|
+
const { 'api-name': apiNameFlag, 'use-live-actions': useLiveActions } = flags;
|
|
52
73
|
const conn = flags['target-org'].getConnection(flags['api-version']);
|
|
53
|
-
const
|
|
54
|
-
username: flags['target-org'].getUsername(),
|
|
55
|
-
});
|
|
56
|
-
const jwtConn = await Connection.create({
|
|
57
|
-
authInfo,
|
|
58
|
-
clientApp: flags['client-app'],
|
|
59
|
-
});
|
|
60
|
-
const agentsQuery = await conn.query('SELECT Id, DeveloperName, (SELECT Status FROM BotVersions) FROM BotDefinition WHERE IsDeleted = false');
|
|
61
|
-
if (agentsQuery.totalSize === 0)
|
|
62
|
-
throw new SfError('No Agents found in the org');
|
|
63
|
-
const agentsInOrg = agentsQuery.records;
|
|
74
|
+
const agentsInOrg = (await conn.query('SELECT Id, DeveloperName, (SELECT Status FROM BotVersions) FROM BotDefinition WHERE IsDeleted = false')).records;
|
|
64
75
|
let selectedAgent;
|
|
65
|
-
if (
|
|
66
|
-
|
|
76
|
+
if (flags['authoring-bundle']) {
|
|
77
|
+
// user specified --authoring-bundle, we'll find the script and use it
|
|
78
|
+
const bundlePath = findAuthoringBundle(this.project.getPath(), flags['authoring-bundle']);
|
|
79
|
+
if (!bundlePath) {
|
|
80
|
+
throw new SfError(`Could not find authoring bundle for ${flags['authoring-bundle']}`);
|
|
81
|
+
}
|
|
82
|
+
selectedAgent = {
|
|
83
|
+
DeveloperName: flags['authoring-bundle'],
|
|
84
|
+
source: AgentSource.SCRIPT,
|
|
85
|
+
path: join(bundlePath, `${flags['authoring-bundle']}.agent`),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
else if (apiNameFlag) {
|
|
89
|
+
// user specified --api-name, it should be in the list of agents from the org
|
|
90
|
+
const agent = agentsInOrg.find((a) => a.DeveloperName === apiNameFlag);
|
|
91
|
+
if (!agent)
|
|
92
|
+
throw new Error(`No valid Agents were found with the Api Name ${apiNameFlag}.`);
|
|
93
|
+
validateAgent(agent);
|
|
94
|
+
selectedAgent = {
|
|
95
|
+
Id: agent.Id,
|
|
96
|
+
DeveloperName: agent.DeveloperName,
|
|
97
|
+
source: AgentSource.PUBLISHED,
|
|
98
|
+
};
|
|
67
99
|
if (!selectedAgent)
|
|
68
100
|
throw new Error(`No valid Agents were found with the Api Name ${apiNameFlag}.`);
|
|
69
|
-
validateAgent(selectedAgent);
|
|
70
101
|
}
|
|
71
102
|
else {
|
|
72
103
|
selectedAgent = await select({
|
|
73
104
|
message: 'Select an agent',
|
|
74
|
-
choices: getAgentChoices(agentsInOrg),
|
|
105
|
+
choices: this.getAgentChoices(agentsInOrg),
|
|
75
106
|
});
|
|
76
107
|
}
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
108
|
+
// we have the selected agent, create the appropriate connection
|
|
109
|
+
const authInfo = await AuthInfo.create({
|
|
110
|
+
username: flags['target-org'].getUsername(),
|
|
111
|
+
});
|
|
112
|
+
// Get client app - check flag first, then auth file, then env var
|
|
113
|
+
let clientApp = flags['client-app'];
|
|
114
|
+
if (!clientApp && selectedAgent?.source === AgentSource.PUBLISHED) {
|
|
115
|
+
const clientApps = getClientAppsFromAuth(authInfo);
|
|
116
|
+
if (clientApps.length === 1) {
|
|
117
|
+
clientApp = clientApps[0];
|
|
118
|
+
}
|
|
119
|
+
else if (clientApps.length > 1) {
|
|
120
|
+
clientApp = await select({
|
|
121
|
+
message: 'Select a client app',
|
|
122
|
+
choices: clientApps.map((app) => ({ value: app, name: app })),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
throw new SfError('No client app found.');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (useLiveActions && selectedAgent.source === AgentSource.PUBLISHED) {
|
|
130
|
+
void Lifecycle.getInstance().emitWarning('Published agents will always use real actions in your org, specifying --use-live-actions and selecting a published agent has no effect');
|
|
131
|
+
}
|
|
132
|
+
const jwtConn = selectedAgent?.source === AgentSource.PUBLISHED
|
|
133
|
+
? await Connection.create({
|
|
134
|
+
authInfo,
|
|
135
|
+
clientApp,
|
|
136
|
+
})
|
|
137
|
+
: await Connection.create({ authInfo });
|
|
138
|
+
// Only resolve outputDir if explicitly provided via flag
|
|
139
|
+
// Otherwise, let user decide when exiting
|
|
140
|
+
const outputDir = flags['output-dir'] ? resolve(flags['output-dir']) : undefined;
|
|
141
|
+
// Both classes share the same interface for the methods we need
|
|
142
|
+
const agentPreview = selectedAgent.source === AgentSource.PUBLISHED
|
|
143
|
+
? new Preview(jwtConn, selectedAgent.Id)
|
|
144
|
+
: new AgentSimulate(jwtConn, selectedAgent.path, !useLiveActions);
|
|
145
|
+
agentPreview.setApexDebugMode(flags['apex-debug']);
|
|
80
146
|
const instance = render(React.createElement(AgentPreviewReact, {
|
|
81
147
|
connection: conn,
|
|
82
148
|
agent: agentPreview,
|
|
83
149
|
name: selectedAgent.DeveloperName,
|
|
84
150
|
outputDir,
|
|
151
|
+
isLocalAgent: selectedAgent.source === AgentSource.SCRIPT,
|
|
152
|
+
apexDebug: flags['apex-debug'],
|
|
85
153
|
}), { exitOnCtrlC: false });
|
|
86
154
|
await instance.waitUntilExit();
|
|
87
155
|
}
|
|
156
|
+
getAgentChoices(agents) {
|
|
157
|
+
const choices = [];
|
|
158
|
+
// Add org agents
|
|
159
|
+
for (const agent of agents) {
|
|
160
|
+
if (agentIsInactive(agent) || agentIsUnsupported(agent.DeveloperName)) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
choices.push({
|
|
164
|
+
name: `${agent.DeveloperName} (Published)`,
|
|
165
|
+
value: {
|
|
166
|
+
Id: agent.Id,
|
|
167
|
+
DeveloperName: agent.DeveloperName,
|
|
168
|
+
source: AgentSource.PUBLISHED,
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
// Add local agents from .agent files
|
|
173
|
+
const localAgentPaths = globSync('**/*.agent', { cwd: this.project.getPath() });
|
|
174
|
+
for (const agentPath of localAgentPaths) {
|
|
175
|
+
const agentName = path.basename(agentPath, '.agent');
|
|
176
|
+
choices.push({
|
|
177
|
+
name: `${agentName} (Agent Script)`,
|
|
178
|
+
value: {
|
|
179
|
+
DeveloperName: agentName,
|
|
180
|
+
source: AgentSource.SCRIPT,
|
|
181
|
+
path: path.join(this.project.getPath(), agentPath),
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return choices;
|
|
186
|
+
}
|
|
88
187
|
}
|
|
89
188
|
export const agentIsUnsupported = (devName) => UNSUPPORTED_AGENTS.includes(devName);
|
|
90
189
|
export const agentIsInactive = (agent) =>
|
|
@@ -103,41 +202,5 @@ export const validateAgent = (agent) => {
|
|
|
103
202
|
}
|
|
104
203
|
return true;
|
|
105
204
|
};
|
|
106
|
-
export const
|
|
107
|
-
let disabled = false;
|
|
108
|
-
if (agentIsInactive(agent))
|
|
109
|
-
disabled = '(Inactive)';
|
|
110
|
-
if (agentIsUnsupported(agent.DeveloperName))
|
|
111
|
-
disabled = '(Not Supported)';
|
|
112
|
-
return {
|
|
113
|
-
name: agent.DeveloperName,
|
|
114
|
-
value: {
|
|
115
|
-
Id: agent.Id,
|
|
116
|
-
DeveloperName: agent.DeveloperName,
|
|
117
|
-
},
|
|
118
|
-
disabled,
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
export const resolveOutputDir = async (outputDir, apexDebug) => {
|
|
122
|
-
if (!outputDir) {
|
|
123
|
-
const response = apexDebug
|
|
124
|
-
? true
|
|
125
|
-
: await confirm({
|
|
126
|
-
message: 'Save transcripts to an output directory?',
|
|
127
|
-
default: true,
|
|
128
|
-
});
|
|
129
|
-
const outputTypes = apexDebug ? 'debug logs and transcripts' : 'transcripts';
|
|
130
|
-
if (response) {
|
|
131
|
-
const getDir = await input({
|
|
132
|
-
message: `Enter the output directory for ${outputTypes}`,
|
|
133
|
-
default: env.getString('SF_AGENT_PREVIEW_OUTPUT_DIR', join('temp', 'agent-preview')),
|
|
134
|
-
required: true,
|
|
135
|
-
});
|
|
136
|
-
return resolve(getDir);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
return resolve(outputDir);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
205
|
+
export const getClientAppsFromAuth = (authInfo) => Object.keys(authInfo.getFields().clientApps ?? {});
|
|
143
206
|
//# sourceMappingURL=preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;A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AAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,aAAa,eAAe,CAAC,CAAC;IACjE,CAAC;IACD,qCAAqC;IACrC,IAAI,kBAAkB,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,aAAa,oBAAoB,EAAE,0BAA0B,EAAE;YAC9F,yGAAyG;SAC1G,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAkB,EAAY,EAAE,CACpE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type AgentPublishAuthoringBundleResult = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
botDeveloperName?: string;
|
|
5
|
+
errors?: string[];
|
|
6
|
+
};
|
|
7
|
+
export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishAuthoringBundleResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly requiresProject = true;
|
|
12
|
+
static state: string;
|
|
13
|
+
static readonly flags: {
|
|
14
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
private static readonly FLAGGABLE_PROMPTS;
|
|
19
|
+
run(): Promise<AgentPublishAuthoringBundleResult>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025, 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 { EOL } from 'node:os';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
import { readFileSync } from 'node:fs';
|
|
19
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
20
|
+
import { MultiStageOutput } from '@oclif/multi-stage-output';
|
|
21
|
+
import { Messages, Lifecycle, SfError } from '@salesforce/core';
|
|
22
|
+
import { Agent, findAuthoringBundle } from '@salesforce/agents';
|
|
23
|
+
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
24
|
+
import { ensureArray } from '@salesforce/kit';
|
|
25
|
+
import { promptForAgentFiles } from '../../../flags.js';
|
|
26
|
+
import { throwAgentCompilationError } from '../../../common.js';
|
|
27
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
28
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.publish.authoring-bundle');
|
|
29
|
+
export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
30
|
+
static summary = messages.getMessage('summary');
|
|
31
|
+
static description = messages.getMessage('description');
|
|
32
|
+
static examples = messages.getMessages('examples');
|
|
33
|
+
static requiresProject = true;
|
|
34
|
+
static state = 'beta';
|
|
35
|
+
static flags = {
|
|
36
|
+
'target-org': Flags.requiredOrg(),
|
|
37
|
+
'api-version': Flags.orgApiVersion(),
|
|
38
|
+
'api-name': Flags.string({
|
|
39
|
+
char: 'n',
|
|
40
|
+
summary: messages.getMessage('flags.api-name.summary'),
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
43
|
+
static FLAGGABLE_PROMPTS = {
|
|
44
|
+
'api-name': {
|
|
45
|
+
message: messages.getMessage('flags.api-name.summary'),
|
|
46
|
+
promptMessage: messages.getMessage('flags.api-name.prompt'),
|
|
47
|
+
validate: (d) => {
|
|
48
|
+
if (d.length > 80) {
|
|
49
|
+
return 'API name cannot be over 80 characters.';
|
|
50
|
+
}
|
|
51
|
+
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
52
|
+
if (d.length === 0 || !regex.test(d)) {
|
|
53
|
+
return 'Invalid API name.';
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
async run() {
|
|
60
|
+
const { flags } = await this.parse(AgentPublishAuthoringBundle);
|
|
61
|
+
// If api-name is not provided, prompt user to select an .agent file from the project and extract the API name from it
|
|
62
|
+
const apiName = flags['api-name'] ??
|
|
63
|
+
(await promptForAgentFiles(this.project, AgentPublishAuthoringBundle.FLAGGABLE_PROMPTS['api-name']));
|
|
64
|
+
const authoringBundleDir = findAuthoringBundle(this.project.getPackageDirectories().map((dir) => dir.fullPath), apiName);
|
|
65
|
+
if (!authoringBundleDir) {
|
|
66
|
+
throw new SfError(messages.getMessage('error.agentNotFound', [apiName]), 'AgentNotFoundError', [
|
|
67
|
+
messages.getMessage('error.agentNotFoundAction'),
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
// Create multi-stage output
|
|
71
|
+
const mso = new MultiStageOutput({
|
|
72
|
+
stages: ['Validate Bundle', 'Publish Agent', 'Retrieve Metadata', 'Deploy Metadata'],
|
|
73
|
+
title: 'Publishing Agent',
|
|
74
|
+
data: { agentName: apiName },
|
|
75
|
+
jsonEnabled: this.jsonEnabled(),
|
|
76
|
+
postStagesBlock: [
|
|
77
|
+
{
|
|
78
|
+
label: 'Agent Name',
|
|
79
|
+
type: 'static-key-value',
|
|
80
|
+
get: (data) => data?.agentName,
|
|
81
|
+
bold: true,
|
|
82
|
+
color: 'cyan',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
});
|
|
86
|
+
try {
|
|
87
|
+
mso.goto('Validate Bundle');
|
|
88
|
+
const targetOrg = flags['target-org'];
|
|
89
|
+
const conn = targetOrg.getConnection(flags['api-version']);
|
|
90
|
+
// First compile the .agent file to get the Agent JSON
|
|
91
|
+
const compileResponse = await Agent.compileAgentScript(conn, readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8'));
|
|
92
|
+
if (compileResponse.status === 'success') {
|
|
93
|
+
mso.skipTo('Publish Agent');
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
throwAgentCompilationError(compileResponse.errors);
|
|
97
|
+
}
|
|
98
|
+
// Then publish the Agent JSON to create the agent
|
|
99
|
+
// Set up lifecycle listeners for retrieve events
|
|
100
|
+
Lifecycle.getInstance().on('scopedPreRetrieve', () => {
|
|
101
|
+
mso.skipTo('Retrieve Metadata');
|
|
102
|
+
return Promise.resolve();
|
|
103
|
+
});
|
|
104
|
+
// Set up lifecycle listeners for deploy events
|
|
105
|
+
Lifecycle.getInstance().on('scopedPreDeploy', () => {
|
|
106
|
+
mso.skipTo('Deploy Metadata');
|
|
107
|
+
return Promise.resolve();
|
|
108
|
+
});
|
|
109
|
+
Lifecycle.getInstance().on('scopedPostRetrieve', (result) => {
|
|
110
|
+
if (result.retrieveResult.response.status !== RequestStatus.Succeeded) {
|
|
111
|
+
const errorMessage = `Metadata retrieval failed: ${ensureArray(
|
|
112
|
+
// @ts-expect-error I saw errorMessages populated with useful information during testing
|
|
113
|
+
result?.retrieveResult.response?.messages ?? result?.retrieveResult?.response?.errorMessage).join(EOL)}`;
|
|
114
|
+
mso.error();
|
|
115
|
+
throw new SfError(errorMessage);
|
|
116
|
+
}
|
|
117
|
+
return Promise.resolve();
|
|
118
|
+
});
|
|
119
|
+
Lifecycle.getInstance().on('scopedPostDeploy', (result) => {
|
|
120
|
+
if (result.deployResult.response.status === RequestStatus.Succeeded) {
|
|
121
|
+
mso.stop();
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const errorMessage = `Metadata deployment failed: ${ensureArray(
|
|
125
|
+
// @ts-expect-error I saw errorMessages populated with useful information during testing
|
|
126
|
+
result?.deployResult.response?.messages ?? result?.deployResult?.response?.errorMessage).join(EOL)}`;
|
|
127
|
+
mso.error();
|
|
128
|
+
throw new SfError(errorMessage);
|
|
129
|
+
}
|
|
130
|
+
return Promise.resolve();
|
|
131
|
+
});
|
|
132
|
+
const result = await Agent.publishAgentJson(conn, this.project, compileResponse.compiledArtifact);
|
|
133
|
+
mso.stop();
|
|
134
|
+
return {
|
|
135
|
+
success: true,
|
|
136
|
+
botDeveloperName: result.developerName,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
// Handle validation errors
|
|
141
|
+
const err = SfError.wrap(error);
|
|
142
|
+
const message = err.message ? err.message : err.name;
|
|
143
|
+
const errorMessage = messages.getMessage('error.publishFailed', [message]);
|
|
144
|
+
// Stop the multi-stage output on error
|
|
145
|
+
mso.error();
|
|
146
|
+
this.error(errorMessage);
|
|
147
|
+
return {
|
|
148
|
+
success: false,
|
|
149
|
+
errors: err.message.split('\n'),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=authoring-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/publish/authoring-bundle.ts"],"names":[],"mappings":"AAA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-1,8 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the
|
|
5
|
-
*
|
|
2
|
+
* Copyright 2025, 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.
|
|
6
15
|
*/
|
|
7
16
|
import { join, resolve } from 'node:path';
|
|
8
17
|
import { existsSync } from 'node:fs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/create.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAc,SAAS,EAAE,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,M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
*
|
|
2
|
+
* Copyright 2025, 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.
|
|
6
15
|
*/
|
|
7
16
|
import { AgentTest } from '@salesforce/agents';
|
|
8
17
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/list.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAA4B,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,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,aAAc,SAAQ,SAA8B;IAChE,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;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;KACrC,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAElD,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9F,IAAI,CAAC,KAAK,CAAC;YACT,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE;gBACrC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;gBACzB,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE;aAC7C;YACD,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC1B,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the
|
|
5
|
-
*
|
|
2
|
+
* Copyright 2025, 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.
|
|
6
15
|
*/
|
|
7
16
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
8
17
|
import { Messages } from '@salesforce/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/results.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"results.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/results.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAA4B,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAC;AAIzF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAiC;IACtE,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;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;YACpD,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,gBAAgB,EAAE;QACnC,YAAY,EAAE,iBAAiB,EAAE;QACjC,OAAO,EAAE,WAAW;KACrB,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAErD,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7F,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5D,MAAM,iBAAiB,CAAC;YACtB,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;YAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the
|
|
5
|
-
*
|
|
2
|
+
* Copyright 2025, 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.
|
|
6
15
|
*/
|
|
7
16
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
8
17
|
import { Messages } from '@salesforce/core';
|