@salesforce/plugin-agent 1.3.2

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.
@@ -0,0 +1,379 @@
1
+ {
2
+ "commands": {
3
+ "agent:create": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Create an Agent from an agent spec. Agent metadata is created in the target org and retrieved to the local project.",
7
+ "examples": [
8
+ "Create an Agent:\n<%= config.bin %> <%= command.id %> --spec ./agent-spec.json"
9
+ ],
10
+ "flags": {
11
+ "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "flags-dir": {
19
+ "helpGroup": "GLOBAL",
20
+ "name": "flags-dir",
21
+ "summary": "Import flag values from a directory.",
22
+ "hasDynamicHelp": false,
23
+ "multiple": false,
24
+ "type": "option"
25
+ },
26
+ "target-org": {
27
+ "char": "o",
28
+ "name": "target-org",
29
+ "noCacheDefault": true,
30
+ "required": true,
31
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
32
+ "hasDynamicHelp": true,
33
+ "multiple": false,
34
+ "type": "option"
35
+ },
36
+ "api-version": {
37
+ "description": "Override the api version used for api requests made by this command",
38
+ "name": "api-version",
39
+ "hasDynamicHelp": false,
40
+ "multiple": false,
41
+ "type": "option"
42
+ },
43
+ "job-spec": {
44
+ "char": "f",
45
+ "description": "The agent spec file defines job titles and descriptions for the agent and can be created using the `sf agent create spec` command.",
46
+ "name": "job-spec",
47
+ "required": true,
48
+ "summary": "The path to an agent spec file.",
49
+ "hasDynamicHelp": false,
50
+ "multiple": false,
51
+ "type": "option"
52
+ },
53
+ "name": {
54
+ "char": "n",
55
+ "name": "name",
56
+ "required": true,
57
+ "summary": "The name of the agent.",
58
+ "hasDynamicHelp": false,
59
+ "multiple": false,
60
+ "type": "option"
61
+ }
62
+ },
63
+ "hasDynamicHelp": true,
64
+ "hiddenAliases": [],
65
+ "id": "agent:create",
66
+ "pluginAlias": "@salesforce/plugin-agent",
67
+ "pluginName": "@salesforce/plugin-agent",
68
+ "pluginType": "core",
69
+ "strict": true,
70
+ "summary": "Create an Agent from an agent spec.",
71
+ "enableJsonFlag": true,
72
+ "isESM": true,
73
+ "relativePath": [
74
+ "lib",
75
+ "commands",
76
+ "agent",
77
+ "create.js"
78
+ ],
79
+ "aliasPermutations": [],
80
+ "permutations": [
81
+ "agent:create",
82
+ "create:agent"
83
+ ]
84
+ },
85
+ "agent:generate:spec": {
86
+ "aliases": [],
87
+ "args": {},
88
+ "description": "Create an Agent spec, which is a list of job titles and descriptions that the agent performs.",
89
+ "examples": [
90
+ "Create an Agent spec in the default location:\n<%= config.bin %> <%= command.id %> --type customer_facing --role Support --company-name \"Coral Cloud\" --company-description \"A meaningful description\""
91
+ ],
92
+ "flags": {
93
+ "json": {
94
+ "description": "Format output as json.",
95
+ "helpGroup": "GLOBAL",
96
+ "name": "json",
97
+ "allowNo": false,
98
+ "type": "boolean"
99
+ },
100
+ "flags-dir": {
101
+ "helpGroup": "GLOBAL",
102
+ "name": "flags-dir",
103
+ "summary": "Import flag values from a directory.",
104
+ "hasDynamicHelp": false,
105
+ "multiple": false,
106
+ "type": "option"
107
+ },
108
+ "target-org": {
109
+ "char": "o",
110
+ "name": "target-org",
111
+ "noCacheDefault": true,
112
+ "required": true,
113
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
114
+ "hasDynamicHelp": true,
115
+ "multiple": false,
116
+ "type": "option"
117
+ },
118
+ "api-version": {
119
+ "description": "Override the api version used for api requests made by this command",
120
+ "name": "api-version",
121
+ "hasDynamicHelp": false,
122
+ "multiple": false,
123
+ "type": "option"
124
+ },
125
+ "type": {
126
+ "char": "t",
127
+ "name": "type",
128
+ "summary": "The type of agent to create.",
129
+ "hasDynamicHelp": false,
130
+ "multiple": false,
131
+ "options": [
132
+ "customer_facing",
133
+ "employee_facing"
134
+ ],
135
+ "type": "option"
136
+ },
137
+ "role": {
138
+ "name": "role",
139
+ "summary": "The role of the agent.",
140
+ "hasDynamicHelp": false,
141
+ "multiple": false,
142
+ "type": "option"
143
+ },
144
+ "company-name": {
145
+ "name": "company-name",
146
+ "summary": "The name of the company.",
147
+ "hasDynamicHelp": false,
148
+ "multiple": false,
149
+ "type": "option"
150
+ },
151
+ "company-description": {
152
+ "name": "company-description",
153
+ "summary": "The description of the company, containing details to be used when generating agent job descriptions.",
154
+ "hasDynamicHelp": false,
155
+ "multiple": false,
156
+ "type": "option"
157
+ },
158
+ "company-website": {
159
+ "name": "company-website",
160
+ "summary": "The website URL for the company.",
161
+ "hasDynamicHelp": false,
162
+ "multiple": false,
163
+ "type": "option"
164
+ },
165
+ "output-dir": {
166
+ "char": "d",
167
+ "name": "output-dir",
168
+ "summary": "The location within the project where the agent spec will be written.",
169
+ "default": "config",
170
+ "hasDynamicHelp": false,
171
+ "multiple": false,
172
+ "type": "option"
173
+ },
174
+ "file-name": {
175
+ "char": "f",
176
+ "name": "file-name",
177
+ "summary": "The name of the file to write the agent spec to.",
178
+ "default": "agentSpec.json",
179
+ "hasDynamicHelp": false,
180
+ "multiple": false,
181
+ "type": "option"
182
+ }
183
+ },
184
+ "hasDynamicHelp": true,
185
+ "hiddenAliases": [],
186
+ "id": "agent:generate:spec",
187
+ "pluginAlias": "@salesforce/plugin-agent",
188
+ "pluginName": "@salesforce/plugin-agent",
189
+ "pluginType": "core",
190
+ "strict": true,
191
+ "summary": "Create an Agent spec.",
192
+ "enableJsonFlag": true,
193
+ "requiresProject": true,
194
+ "isESM": true,
195
+ "relativePath": [
196
+ "lib",
197
+ "commands",
198
+ "agent",
199
+ "generate",
200
+ "spec.js"
201
+ ],
202
+ "aliasPermutations": [],
203
+ "permutations": [
204
+ "agent:generate:spec",
205
+ "generate:agent:spec",
206
+ "generate:spec:agent",
207
+ "agent:spec:generate",
208
+ "spec:agent:generate",
209
+ "spec:generate:agent"
210
+ ]
211
+ },
212
+ "agent:test:cancel": {
213
+ "aliases": [],
214
+ "args": {},
215
+ "description": "Cancel a running test for an Agent, providing the AiEvaluation ID.",
216
+ "examples": [
217
+ "Cancel a test for an Agent:\n<%= config.bin %> <%= command.id %> --id AiEvalId"
218
+ ],
219
+ "flags": {
220
+ "json": {
221
+ "description": "Format output as json.",
222
+ "helpGroup": "GLOBAL",
223
+ "name": "json",
224
+ "allowNo": false,
225
+ "type": "boolean"
226
+ },
227
+ "flags-dir": {
228
+ "helpGroup": "GLOBAL",
229
+ "name": "flags-dir",
230
+ "summary": "Import flag values from a directory.",
231
+ "hasDynamicHelp": false,
232
+ "multiple": false,
233
+ "type": "option"
234
+ },
235
+ "target-org": {
236
+ "char": "o",
237
+ "name": "target-org",
238
+ "noCacheDefault": true,
239
+ "required": true,
240
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
241
+ "hasDynamicHelp": true,
242
+ "multiple": false,
243
+ "type": "option"
244
+ },
245
+ "job-id": {
246
+ "char": "i",
247
+ "name": "job-id",
248
+ "required": true,
249
+ "summary": "The AiEvaluation ID.",
250
+ "hasDynamicHelp": false,
251
+ "multiple": false,
252
+ "type": "option"
253
+ },
254
+ "use-most-recent": {
255
+ "char": "r",
256
+ "name": "use-most-recent",
257
+ "summary": "Use the job ID of the most recent test evaluation.",
258
+ "allowNo": false,
259
+ "type": "boolean"
260
+ }
261
+ },
262
+ "hasDynamicHelp": true,
263
+ "hiddenAliases": [],
264
+ "id": "agent:test:cancel",
265
+ "pluginAlias": "@salesforce/plugin-agent",
266
+ "pluginName": "@salesforce/plugin-agent",
267
+ "pluginType": "core",
268
+ "strict": true,
269
+ "summary": "Cancel a running test for an Agent.",
270
+ "enableJsonFlag": true,
271
+ "isESM": true,
272
+ "relativePath": [
273
+ "lib",
274
+ "commands",
275
+ "agent",
276
+ "test",
277
+ "cancel.js"
278
+ ],
279
+ "aliasPermutations": [],
280
+ "permutations": [
281
+ "agent:test:cancel",
282
+ "test:agent:cancel",
283
+ "test:cancel:agent",
284
+ "agent:cancel:test",
285
+ "cancel:agent:test",
286
+ "cancel:test:agent"
287
+ ]
288
+ },
289
+ "agent:test:run": {
290
+ "aliases": [],
291
+ "args": {},
292
+ "description": "Start a test for an Agent, providing the AiEvalDefinitionVersion ID. Returns the job ID.",
293
+ "examples": [
294
+ "Start a test for an Agent:\n<%= config.bin %> <%= command.id %> --id AiEvalDefVerId"
295
+ ],
296
+ "flags": {
297
+ "json": {
298
+ "description": "Format output as json.",
299
+ "helpGroup": "GLOBAL",
300
+ "name": "json",
301
+ "allowNo": false,
302
+ "type": "boolean"
303
+ },
304
+ "flags-dir": {
305
+ "helpGroup": "GLOBAL",
306
+ "name": "flags-dir",
307
+ "summary": "Import flag values from a directory.",
308
+ "hasDynamicHelp": false,
309
+ "multiple": false,
310
+ "type": "option"
311
+ },
312
+ "target-org": {
313
+ "char": "o",
314
+ "name": "target-org",
315
+ "noCacheDefault": true,
316
+ "required": true,
317
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
318
+ "hasDynamicHelp": true,
319
+ "multiple": false,
320
+ "type": "option"
321
+ },
322
+ "id": {
323
+ "char": "i",
324
+ "description": "The AiEvalDefinitionVersion ID.",
325
+ "name": "id",
326
+ "required": true,
327
+ "summary": "The AiEvalDefinitionVersion ID.",
328
+ "hasDynamicHelp": false,
329
+ "multiple": false,
330
+ "type": "option"
331
+ },
332
+ "wait": {
333
+ "char": "w",
334
+ "description": "If the command continues to run after the wait period, the CLI returns control of the terminal window to you.",
335
+ "name": "wait",
336
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
337
+ "hasDynamicHelp": true,
338
+ "multiple": false,
339
+ "type": "option"
340
+ },
341
+ "output-dir": {
342
+ "char": "d",
343
+ "name": "output-dir",
344
+ "summary": "Directory in which to store test run files.",
345
+ "hasDynamicHelp": false,
346
+ "multiple": false,
347
+ "type": "option"
348
+ }
349
+ },
350
+ "hasDynamicHelp": true,
351
+ "hiddenAliases": [],
352
+ "id": "agent:test:run",
353
+ "pluginAlias": "@salesforce/plugin-agent",
354
+ "pluginName": "@salesforce/plugin-agent",
355
+ "pluginType": "core",
356
+ "strict": true,
357
+ "summary": "Start a test for an Agent.",
358
+ "enableJsonFlag": true,
359
+ "isESM": true,
360
+ "relativePath": [
361
+ "lib",
362
+ "commands",
363
+ "agent",
364
+ "test",
365
+ "run.js"
366
+ ],
367
+ "aliasPermutations": [],
368
+ "permutations": [
369
+ "agent:test:run",
370
+ "test:agent:run",
371
+ "test:run:agent",
372
+ "agent:run:test",
373
+ "run:agent:test",
374
+ "run:test:agent"
375
+ ]
376
+ }
377
+ },
378
+ "version": "1.3.2"
379
+ }
package/package.json ADDED
@@ -0,0 +1,209 @@
1
+ {
2
+ "name": "@salesforce/plugin-agent",
3
+ "description": "Commands to interact with Salesforce agents",
4
+ "version": "1.3.2",
5
+ "author": "Salesforce",
6
+ "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "dependencies": {
8
+ "@inquirer/figures": "^1.0.7",
9
+ "@inquirer/input": "^4.0.1",
10
+ "@inquirer/select": "^4.0.1",
11
+ "@oclif/core": "^4",
12
+ "@salesforce/agents": "^0.1.4",
13
+ "@oclif/multi-stage-output": "^0.7.12",
14
+ "@salesforce/core": "^8.5.2",
15
+ "@salesforce/kit": "^3.2.1",
16
+ "@salesforce/sf-plugins-core": "^12",
17
+ "ansis": "^3.3.2"
18
+ },
19
+ "devDependencies": {
20
+ "@oclif/plugin-command-snapshot": "^5.2.19",
21
+ "@salesforce/cli-plugins-testkit": "^5.3.35",
22
+ "@salesforce/dev-scripts": "^10.2.10",
23
+ "@salesforce/plugin-command-reference": "^3.1.29",
24
+ "eslint-plugin-sf-plugin": "^1.20.9",
25
+ "oclif": "^4.15.12",
26
+ "ts-node": "^10.9.2",
27
+ "typescript": "^5.5.4"
28
+ },
29
+ "engines": {
30
+ "node": ">=18.0.0"
31
+ },
32
+ "files": [
33
+ "/lib",
34
+ "/messages",
35
+ "/npm-shrinkwrap.json",
36
+ "/oclif.lock",
37
+ "/oclif.manifest.json",
38
+ "/schemas"
39
+ ],
40
+ "homepage": "https://github.com/salesforcecli/plugin-agent",
41
+ "keywords": [
42
+ "force",
43
+ "salesforce",
44
+ "salesforcedx",
45
+ "sf",
46
+ "sf-plugin",
47
+ "sfdx",
48
+ "sfdx-plugin"
49
+ ],
50
+ "license": "BSD-3-Clause",
51
+ "oclif": {
52
+ "commands": "./lib/commands",
53
+ "bin": "sf",
54
+ "topicSeparator": " ",
55
+ "devPlugins": [
56
+ "@oclif/plugin-help",
57
+ "@oclif/plugin-command-snapshot",
58
+ "@salesforce/plugin-command-reference"
59
+ ],
60
+ "topics": {
61
+ "agent": {
62
+ "description": "Commands to work with agents."
63
+ }
64
+ },
65
+ "flexibleTaxonomy": true
66
+ },
67
+ "repository": "salesforcecli/plugin-agent",
68
+ "scripts": {
69
+ "build": "wireit",
70
+ "clean": "sf-clean",
71
+ "clean-all": "sf-clean all",
72
+ "compile": "wireit",
73
+ "docs": "sf-docs",
74
+ "format": "wireit",
75
+ "link-check": "wireit",
76
+ "lint": "wireit",
77
+ "postpack": "sf-clean --ignore-signing-artifacts",
78
+ "prepack": "sf-prepack",
79
+ "prepare": "sf-install",
80
+ "test": "wireit",
81
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
82
+ "test:only": "wireit",
83
+ "version": "oclif readme"
84
+ },
85
+ "publishConfig": {
86
+ "access": "public"
87
+ },
88
+ "wireit": {
89
+ "build": {
90
+ "dependencies": [
91
+ "compile",
92
+ "lint"
93
+ ]
94
+ },
95
+ "compile": {
96
+ "command": "tsc -p . --pretty --incremental",
97
+ "files": [
98
+ "src/**/*.ts",
99
+ "**/tsconfig.json",
100
+ "messages/**"
101
+ ],
102
+ "output": [
103
+ "lib/**",
104
+ "*.tsbuildinfo"
105
+ ],
106
+ "clean": "if-file-deleted"
107
+ },
108
+ "format": {
109
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
110
+ "files": [
111
+ "src/**/*.ts",
112
+ "test/**/*.ts",
113
+ "schemas/**/*.json",
114
+ "command-snapshot.json",
115
+ ".prettier*"
116
+ ],
117
+ "output": []
118
+ },
119
+ "lint": {
120
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
121
+ "files": [
122
+ "src/**/*.ts",
123
+ "test/**/*.ts",
124
+ "messages/**",
125
+ "**/.eslint*",
126
+ "**/tsconfig.json"
127
+ ],
128
+ "output": []
129
+ },
130
+ "test:compile": {
131
+ "command": "tsc -p \"./test\" --pretty",
132
+ "files": [
133
+ "test/**/*.ts",
134
+ "**/tsconfig.json"
135
+ ],
136
+ "output": []
137
+ },
138
+ "test": {
139
+ "dependencies": [
140
+ "test:compile",
141
+ "test:only",
142
+ "test:command-reference",
143
+ "test:deprecation-policy",
144
+ "lint",
145
+ "test:json-schema",
146
+ "link-check"
147
+ ]
148
+ },
149
+ "test:only": {
150
+ "command": "nyc mocha \"test/**/*.test.ts\"",
151
+ "env": {
152
+ "FORCE_COLOR": "2"
153
+ },
154
+ "files": [
155
+ "test/**/*.ts",
156
+ "src/**/*.ts",
157
+ "**/tsconfig.json",
158
+ ".mocha*",
159
+ "!*.nut.ts",
160
+ ".nycrc"
161
+ ],
162
+ "output": []
163
+ },
164
+ "test:command-reference": {
165
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
166
+ "files": [
167
+ "src/**/*.ts",
168
+ "messages/**",
169
+ "package.json"
170
+ ],
171
+ "output": [
172
+ "tmp/root"
173
+ ]
174
+ },
175
+ "test:deprecation-policy": {
176
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:compare",
177
+ "files": [
178
+ "src/**/*.ts"
179
+ ],
180
+ "output": [],
181
+ "dependencies": [
182
+ "compile"
183
+ ]
184
+ },
185
+ "test:json-schema": {
186
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" schema:compare",
187
+ "files": [
188
+ "src/**/*.ts",
189
+ "schemas"
190
+ ],
191
+ "output": []
192
+ },
193
+ "link-check": {
194
+ "command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
195
+ "files": [
196
+ "./*.md",
197
+ "./!(CHANGELOG).md",
198
+ "messages/**/*.md"
199
+ ],
200
+ "output": []
201
+ }
202
+ },
203
+ "exports": "./lib/index.js",
204
+ "type": "module",
205
+ "sfdx": {
206
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.3.2.crt",
207
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.3.2.sig"
208
+ }
209
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentCreateResult",
4
+ "definitions": {
5
+ "AgentCreateResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "isSuccess": {
9
+ "type": "boolean"
10
+ },
11
+ "errorMessage": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "isSuccess"
17
+ ],
18
+ "additionalProperties": false
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentCreateSpecResult",
4
+ "definitions": {
5
+ "AgentCreateSpecResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "isSuccess": {
9
+ "type": "boolean"
10
+ },
11
+ "errorMessage": {
12
+ "type": "string"
13
+ },
14
+ "jobSpec": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": [
19
+ "isSuccess"
20
+ ],
21
+ "additionalProperties": false
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentTestCancelResult",
4
+ "definitions": {
5
+ "AgentTestCancelResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "jobId": {
9
+ "type": "string"
10
+ },
11
+ "success": {
12
+ "type": "boolean"
13
+ },
14
+ "errorCode": {
15
+ "type": "string"
16
+ },
17
+ "message": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "jobId",
23
+ "success"
24
+ ],
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentTestRunResult",
4
+ "definitions": {
5
+ "AgentTestRunResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "jobId": {
9
+ "type": "string"
10
+ },
11
+ "success": {
12
+ "type": "boolean"
13
+ },
14
+ "errorCode": {
15
+ "type": "string"
16
+ },
17
+ "message": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "jobId",
23
+ "success"
24
+ ],
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ }