@salesforce/plugin-agent 1.27.2 → 1.27.3
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 +15 -15
- package/lib/commands/agent/generate/template.js.map +1 -1
- package/oclif.manifest.json +511 -511
- package/package.json +7 -7
package/oclif.manifest.json
CHANGED
|
@@ -339,16 +339,14 @@
|
|
|
339
339
|
"preview:agent"
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
|
-
"agent:
|
|
342
|
+
"agent:test:create": {
|
|
343
343
|
"aliases": [],
|
|
344
344
|
"args": {},
|
|
345
|
-
"description": "
|
|
345
|
+
"description": "To run this command, you must have an agent test spec file, which is a YAML file that lists the test cases for testing a specific agent. Use the \"agent generate test-spec\" CLI command to generate a test spec file. Then specify the file to this command with the --spec flag, or run this command with no flags to be prompted.\n\nWhen this command completes, your org contains the new agent test, which you can view and edit using the Testing Center UI. This command also retrieves the metadata component (AiEvaluationDefinition) associated with the new test to your local Salesforce DX project and displays its filename.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
|
|
346
346
|
"examples": [
|
|
347
|
-
"
|
|
348
|
-
"
|
|
349
|
-
"
|
|
350
|
-
"Specify an existing agent spec file called \"specs/resortManagerAgent.yaml\", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:\n<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role \"Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly\"",
|
|
351
|
-
"Specify that the conversational tone of the agent is formal and to attach the \"resortmanager@myorg.com\" username to it; be prompted for the required properties and use your default org:\n<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com"
|
|
347
|
+
"Create an agent test interactively and be prompted for the test spec and API name of the test in the org; use the default org:\n<%= config.bin %> <%= command.id %>",
|
|
348
|
+
"Create an agent test and use flags to specify all required information; if a test with same API name already exists in the org, overwrite it without confirmation. Use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --force-overwrite --target-org my-org",
|
|
349
|
+
"Preview what the agent test metadata (AiEvaluationDefinition) looks like without deploying it to your default org:\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview"
|
|
352
350
|
],
|
|
353
351
|
"flags": {
|
|
354
352
|
"json": {
|
|
@@ -366,6 +364,20 @@
|
|
|
366
364
|
"multiple": false,
|
|
367
365
|
"type": "option"
|
|
368
366
|
},
|
|
367
|
+
"api-name": {
|
|
368
|
+
"name": "api-name",
|
|
369
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
370
|
+
"hasDynamicHelp": false,
|
|
371
|
+
"multiple": false,
|
|
372
|
+
"type": "option"
|
|
373
|
+
},
|
|
374
|
+
"spec": {
|
|
375
|
+
"name": "spec",
|
|
376
|
+
"summary": "Path to the test spec YAML file.",
|
|
377
|
+
"hasDynamicHelp": false,
|
|
378
|
+
"multiple": false,
|
|
379
|
+
"type": "option"
|
|
380
|
+
},
|
|
369
381
|
"target-org": {
|
|
370
382
|
"char": "o",
|
|
371
383
|
"name": "target-org",
|
|
@@ -383,163 +395,53 @@
|
|
|
383
395
|
"multiple": false,
|
|
384
396
|
"type": "option"
|
|
385
397
|
},
|
|
386
|
-
"
|
|
387
|
-
"name": "
|
|
388
|
-
"summary": "
|
|
389
|
-
"hasDynamicHelp": false,
|
|
390
|
-
"multiple": false,
|
|
391
|
-
"options": [
|
|
392
|
-
"customer",
|
|
393
|
-
"internal"
|
|
394
|
-
],
|
|
395
|
-
"type": "option"
|
|
396
|
-
},
|
|
397
|
-
"role": {
|
|
398
|
-
"name": "role",
|
|
399
|
-
"summary": "Role of the agent.",
|
|
400
|
-
"hasDynamicHelp": false,
|
|
401
|
-
"multiple": false,
|
|
402
|
-
"type": "option"
|
|
403
|
-
},
|
|
404
|
-
"company-name": {
|
|
405
|
-
"name": "company-name",
|
|
406
|
-
"summary": "Name of your company.",
|
|
407
|
-
"hasDynamicHelp": false,
|
|
408
|
-
"multiple": false,
|
|
409
|
-
"type": "option"
|
|
410
|
-
},
|
|
411
|
-
"company-description": {
|
|
412
|
-
"name": "company-description",
|
|
413
|
-
"summary": "Description of your company.",
|
|
414
|
-
"hasDynamicHelp": false,
|
|
415
|
-
"multiple": false,
|
|
416
|
-
"type": "option"
|
|
417
|
-
},
|
|
418
|
-
"company-website": {
|
|
419
|
-
"name": "company-website",
|
|
420
|
-
"summary": "Website URL of your company.",
|
|
421
|
-
"hasDynamicHelp": false,
|
|
422
|
-
"multiple": false,
|
|
423
|
-
"type": "option"
|
|
424
|
-
},
|
|
425
|
-
"max-topics": {
|
|
426
|
-
"name": "max-topics",
|
|
427
|
-
"summary": "Maximum number of topics to generate in the agent spec; default is 5.",
|
|
428
|
-
"hasDynamicHelp": false,
|
|
429
|
-
"multiple": false,
|
|
430
|
-
"type": "option"
|
|
431
|
-
},
|
|
432
|
-
"agent-user": {
|
|
433
|
-
"name": "agent-user",
|
|
434
|
-
"summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
|
|
435
|
-
"hasDynamicHelp": false,
|
|
436
|
-
"multiple": false,
|
|
437
|
-
"type": "option"
|
|
438
|
-
},
|
|
439
|
-
"enrich-logs": {
|
|
440
|
-
"name": "enrich-logs",
|
|
441
|
-
"summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
|
|
442
|
-
"hasDynamicHelp": false,
|
|
443
|
-
"multiple": false,
|
|
444
|
-
"options": [
|
|
445
|
-
"true",
|
|
446
|
-
"false"
|
|
447
|
-
],
|
|
448
|
-
"type": "option"
|
|
449
|
-
},
|
|
450
|
-
"tone": {
|
|
451
|
-
"name": "tone",
|
|
452
|
-
"summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
|
|
453
|
-
"hasDynamicHelp": false,
|
|
454
|
-
"multiple": false,
|
|
455
|
-
"options": [
|
|
456
|
-
"formal",
|
|
457
|
-
"casual",
|
|
458
|
-
"neutral"
|
|
459
|
-
],
|
|
460
|
-
"type": "option"
|
|
461
|
-
},
|
|
462
|
-
"spec": {
|
|
463
|
-
"name": "spec",
|
|
464
|
-
"summary": "Agent spec file, in YAML format, to use as input to the command.",
|
|
465
|
-
"hasDynamicHelp": false,
|
|
466
|
-
"multiple": false,
|
|
467
|
-
"type": "option"
|
|
468
|
-
},
|
|
469
|
-
"output-file": {
|
|
470
|
-
"name": "output-file",
|
|
471
|
-
"summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
|
|
472
|
-
"default": "specs/agentSpec.yaml",
|
|
473
|
-
"hasDynamicHelp": false,
|
|
474
|
-
"multiple": false,
|
|
475
|
-
"type": "option"
|
|
476
|
-
},
|
|
477
|
-
"full-interview": {
|
|
478
|
-
"name": "full-interview",
|
|
479
|
-
"summary": "Prompt for both required and optional flags.",
|
|
398
|
+
"preview": {
|
|
399
|
+
"name": "preview",
|
|
400
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
480
401
|
"allowNo": false,
|
|
481
402
|
"type": "boolean"
|
|
482
403
|
},
|
|
483
|
-
"prompt-template": {
|
|
484
|
-
"name": "prompt-template",
|
|
485
|
-
"summary": "API name of a customized prompt template to use instead of the default prompt template.",
|
|
486
|
-
"hasDynamicHelp": false,
|
|
487
|
-
"multiple": false,
|
|
488
|
-
"type": "option"
|
|
489
|
-
},
|
|
490
|
-
"grounding-context": {
|
|
491
|
-
"dependsOn": [
|
|
492
|
-
"prompt-template"
|
|
493
|
-
],
|
|
494
|
-
"name": "grounding-context",
|
|
495
|
-
"summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
|
|
496
|
-
"hasDynamicHelp": false,
|
|
497
|
-
"multiple": false,
|
|
498
|
-
"type": "option"
|
|
499
|
-
},
|
|
500
404
|
"force-overwrite": {
|
|
501
405
|
"name": "force-overwrite",
|
|
502
|
-
"summary": "Don't prompt
|
|
406
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
503
407
|
"allowNo": false,
|
|
504
408
|
"type": "boolean"
|
|
505
409
|
}
|
|
506
410
|
},
|
|
507
411
|
"hasDynamicHelp": true,
|
|
508
412
|
"hiddenAliases": [],
|
|
509
|
-
"id": "agent:
|
|
413
|
+
"id": "agent:test:create",
|
|
510
414
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
511
415
|
"pluginName": "@salesforce/plugin-agent",
|
|
512
416
|
"pluginType": "core",
|
|
513
417
|
"strict": true,
|
|
514
|
-
"summary": "
|
|
418
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
515
419
|
"enableJsonFlag": true,
|
|
516
|
-
"requiresProject": true,
|
|
517
420
|
"isESM": true,
|
|
518
421
|
"relativePath": [
|
|
519
422
|
"lib",
|
|
520
423
|
"commands",
|
|
521
424
|
"agent",
|
|
522
|
-
"
|
|
523
|
-
"
|
|
425
|
+
"test",
|
|
426
|
+
"create.js"
|
|
524
427
|
],
|
|
525
428
|
"aliasPermutations": [],
|
|
526
429
|
"permutations": [
|
|
527
|
-
"agent:
|
|
528
|
-
"
|
|
529
|
-
"
|
|
530
|
-
"agent:
|
|
531
|
-
"
|
|
532
|
-
"
|
|
430
|
+
"agent:test:create",
|
|
431
|
+
"test:agent:create",
|
|
432
|
+
"test:create:agent",
|
|
433
|
+
"agent:create:test",
|
|
434
|
+
"create:agent:test",
|
|
435
|
+
"create:test:agent"
|
|
533
436
|
]
|
|
534
437
|
},
|
|
535
|
-
"agent:
|
|
438
|
+
"agent:test:list": {
|
|
536
439
|
"aliases": [],
|
|
537
440
|
"args": {},
|
|
538
|
-
"description": "
|
|
441
|
+
"description": "The command outputs a table with the name (API name) of each test along with its unique ID and the date it was created in the org.",
|
|
539
442
|
"examples": [
|
|
540
|
-
"
|
|
541
|
-
"
|
|
542
|
-
"Similar to previous example, but generate the authoring bundle files in the \"other-package-dir/main/default\" package directory; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir other-package-dir/main/default --target-org my-dev-org"
|
|
443
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
444
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
543
445
|
],
|
|
544
446
|
"flags": {
|
|
545
447
|
"json": {
|
|
@@ -567,95 +469,49 @@
|
|
|
567
469
|
"multiple": false,
|
|
568
470
|
"type": "option"
|
|
569
471
|
},
|
|
570
|
-
"api-name": {
|
|
571
|
-
"name": "api-name",
|
|
572
|
-
"summary": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
|
|
573
|
-
"hasDynamicHelp": false,
|
|
574
|
-
"multiple": false,
|
|
575
|
-
"type": "option"
|
|
576
|
-
},
|
|
577
472
|
"api-version": {
|
|
578
473
|
"description": "Override the api version used for api requests made by this command",
|
|
579
474
|
"name": "api-version",
|
|
580
475
|
"hasDynamicHelp": false,
|
|
581
476
|
"multiple": false,
|
|
582
477
|
"type": "option"
|
|
583
|
-
},
|
|
584
|
-
"spec": {
|
|
585
|
-
"char": "f",
|
|
586
|
-
"name": "spec",
|
|
587
|
-
"summary": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
|
|
588
|
-
"hasDynamicHelp": false,
|
|
589
|
-
"multiple": false,
|
|
590
|
-
"type": "option"
|
|
591
|
-
},
|
|
592
|
-
"output-dir": {
|
|
593
|
-
"char": "d",
|
|
594
|
-
"name": "output-dir",
|
|
595
|
-
"summary": "Directory where the authoring bundle files are generated.",
|
|
596
|
-
"hasDynamicHelp": false,
|
|
597
|
-
"multiple": false,
|
|
598
|
-
"type": "option"
|
|
599
|
-
},
|
|
600
|
-
"name": {
|
|
601
|
-
"char": "n",
|
|
602
|
-
"name": "name",
|
|
603
|
-
"summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
604
|
-
"hasDynamicHelp": false,
|
|
605
|
-
"multiple": false,
|
|
606
|
-
"type": "option"
|
|
607
478
|
}
|
|
608
479
|
},
|
|
609
480
|
"hasDynamicHelp": true,
|
|
610
481
|
"hiddenAliases": [],
|
|
611
|
-
"id": "agent:
|
|
482
|
+
"id": "agent:test:list",
|
|
612
483
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
613
484
|
"pluginName": "@salesforce/plugin-agent",
|
|
614
485
|
"pluginType": "core",
|
|
615
486
|
"strict": true,
|
|
616
|
-
"summary": "
|
|
487
|
+
"summary": "List the available agent tests in your org.",
|
|
617
488
|
"enableJsonFlag": true,
|
|
618
|
-
"requiresProject": true,
|
|
619
|
-
"FLAGGABLE_PROMPTS": {
|
|
620
|
-
"name": {
|
|
621
|
-
"message": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
622
|
-
"promptMessage": "Name (label) of the authoring bundle",
|
|
623
|
-
"required": true
|
|
624
|
-
},
|
|
625
|
-
"api-name": {
|
|
626
|
-
"message": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
|
|
627
|
-
"promptMessage": "API name of the new authoring bundle"
|
|
628
|
-
},
|
|
629
|
-
"spec": {
|
|
630
|
-
"message": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
|
|
631
|
-
"promptMessage": "Path to the agent spec YAML file",
|
|
632
|
-
"required": true
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
489
|
"isESM": true,
|
|
636
490
|
"relativePath": [
|
|
637
491
|
"lib",
|
|
638
492
|
"commands",
|
|
639
493
|
"agent",
|
|
640
|
-
"
|
|
641
|
-
"
|
|
494
|
+
"test",
|
|
495
|
+
"list.js"
|
|
642
496
|
],
|
|
643
497
|
"aliasPermutations": [],
|
|
644
498
|
"permutations": [
|
|
645
|
-
"agent:
|
|
646
|
-
"
|
|
647
|
-
"
|
|
648
|
-
"agent:
|
|
649
|
-
"
|
|
650
|
-
"
|
|
499
|
+
"agent:test:list",
|
|
500
|
+
"test:agent:list",
|
|
501
|
+
"test:list:agent",
|
|
502
|
+
"agent:list:test",
|
|
503
|
+
"list:agent:test",
|
|
504
|
+
"list:test:agent"
|
|
651
505
|
]
|
|
652
506
|
},
|
|
653
|
-
"agent:
|
|
507
|
+
"agent:test:results": {
|
|
654
508
|
"aliases": [],
|
|
655
509
|
"args": {},
|
|
656
|
-
"description": "
|
|
510
|
+
"description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
657
511
|
"examples": [
|
|
658
|
-
"
|
|
512
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
513
|
+
"Get the results of the most recently run agent test in an org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-org",
|
|
514
|
+
"Get the results of the most recently run agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
|
|
659
515
|
],
|
|
660
516
|
"flags": {
|
|
661
517
|
"json": {
|
|
@@ -673,134 +529,98 @@
|
|
|
673
529
|
"multiple": false,
|
|
674
530
|
"type": "option"
|
|
675
531
|
},
|
|
676
|
-
"
|
|
677
|
-
"
|
|
678
|
-
"name": "
|
|
679
|
-
"
|
|
680
|
-
"multiple": false,
|
|
681
|
-
"type": "option"
|
|
682
|
-
},
|
|
683
|
-
"agent-version": {
|
|
684
|
-
"name": "agent-version",
|
|
532
|
+
"target-org": {
|
|
533
|
+
"char": "o",
|
|
534
|
+
"name": "target-org",
|
|
535
|
+
"noCacheDefault": true,
|
|
685
536
|
"required": true,
|
|
686
|
-
"summary": "
|
|
537
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
538
|
+
"hasDynamicHelp": true,
|
|
539
|
+
"multiple": false,
|
|
540
|
+
"type": "option"
|
|
541
|
+
},
|
|
542
|
+
"api-version": {
|
|
543
|
+
"description": "Override the api version used for api requests made by this command",
|
|
544
|
+
"name": "api-version",
|
|
687
545
|
"hasDynamicHelp": false,
|
|
688
546
|
"multiple": false,
|
|
689
547
|
"type": "option"
|
|
690
548
|
},
|
|
691
|
-
"
|
|
692
|
-
"char": "
|
|
693
|
-
"name": "
|
|
549
|
+
"job-id": {
|
|
550
|
+
"char": "i",
|
|
551
|
+
"name": "job-id",
|
|
694
552
|
"required": true,
|
|
695
|
-
"summary": "
|
|
553
|
+
"summary": "Job ID of the completed agent test run.",
|
|
696
554
|
"hasDynamicHelp": false,
|
|
697
555
|
"multiple": false,
|
|
698
556
|
"type": "option"
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
705
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
706
|
-
"pluginType": "core",
|
|
707
|
-
"strict": true,
|
|
708
|
-
"summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a managed package.",
|
|
709
|
-
"enableJsonFlag": true,
|
|
710
|
-
"requiresProject": true,
|
|
711
|
-
"isESM": true,
|
|
712
|
-
"relativePath": [
|
|
713
|
-
"lib",
|
|
714
|
-
"commands",
|
|
715
|
-
"agent",
|
|
716
|
-
"generate",
|
|
717
|
-
"template.js"
|
|
718
|
-
],
|
|
719
|
-
"aliasPermutations": [],
|
|
720
|
-
"permutations": [
|
|
721
|
-
"agent:generate:template",
|
|
722
|
-
"generate:agent:template",
|
|
723
|
-
"generate:template:agent",
|
|
724
|
-
"agent:template:generate",
|
|
725
|
-
"template:agent:generate",
|
|
726
|
-
"template:generate:agent"
|
|
727
|
-
]
|
|
728
|
-
},
|
|
729
|
-
"agent:generate:test-spec": {
|
|
730
|
-
"aliases": [],
|
|
731
|
-
"args": {},
|
|
732
|
-
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
733
|
-
"examples": [
|
|
734
|
-
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
735
|
-
"Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
|
|
736
|
-
"Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:\n<%= config.bin %> <%= command.id %> --from-definition force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml"
|
|
737
|
-
],
|
|
738
|
-
"flags": {
|
|
739
|
-
"flags-dir": {
|
|
740
|
-
"helpGroup": "GLOBAL",
|
|
741
|
-
"name": "flags-dir",
|
|
742
|
-
"summary": "Import flag values from a directory.",
|
|
557
|
+
},
|
|
558
|
+
"result-format": {
|
|
559
|
+
"name": "result-format",
|
|
560
|
+
"summary": "Format of the agent test run results.",
|
|
561
|
+
"default": "human",
|
|
743
562
|
"hasDynamicHelp": false,
|
|
744
563
|
"multiple": false,
|
|
564
|
+
"options": [
|
|
565
|
+
"json",
|
|
566
|
+
"human",
|
|
567
|
+
"junit",
|
|
568
|
+
"tap"
|
|
569
|
+
],
|
|
745
570
|
"type": "option"
|
|
746
571
|
},
|
|
747
|
-
"
|
|
572
|
+
"output-dir": {
|
|
748
573
|
"char": "d",
|
|
749
|
-
"
|
|
750
|
-
"
|
|
574
|
+
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
575
|
+
"name": "output-dir",
|
|
576
|
+
"summary": "Directory to write the agent test results into.",
|
|
751
577
|
"hasDynamicHelp": false,
|
|
752
578
|
"multiple": false,
|
|
753
579
|
"type": "option"
|
|
754
580
|
},
|
|
755
|
-
"
|
|
756
|
-
"
|
|
757
|
-
"
|
|
581
|
+
"verbose": {
|
|
582
|
+
"description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
|
|
583
|
+
"name": "verbose",
|
|
584
|
+
"summary": "Show generated data in the test results output.",
|
|
758
585
|
"allowNo": false,
|
|
759
586
|
"type": "boolean"
|
|
760
|
-
},
|
|
761
|
-
"output-file": {
|
|
762
|
-
"char": "f",
|
|
763
|
-
"name": "output-file",
|
|
764
|
-
"summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\".",
|
|
765
|
-
"hasDynamicHelp": false,
|
|
766
|
-
"multiple": false,
|
|
767
|
-
"type": "option"
|
|
768
587
|
}
|
|
769
588
|
},
|
|
770
|
-
"hasDynamicHelp":
|
|
589
|
+
"hasDynamicHelp": true,
|
|
771
590
|
"hiddenAliases": [],
|
|
772
|
-
"id": "agent:
|
|
591
|
+
"id": "agent:test:results",
|
|
773
592
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
774
593
|
"pluginName": "@salesforce/plugin-agent",
|
|
775
594
|
"pluginType": "core",
|
|
776
595
|
"strict": true,
|
|
777
|
-
"summary": "
|
|
778
|
-
"enableJsonFlag":
|
|
596
|
+
"summary": "Get the results of a completed agent test run.",
|
|
597
|
+
"enableJsonFlag": true,
|
|
779
598
|
"isESM": true,
|
|
780
599
|
"relativePath": [
|
|
781
600
|
"lib",
|
|
782
601
|
"commands",
|
|
783
602
|
"agent",
|
|
784
|
-
"
|
|
785
|
-
"
|
|
603
|
+
"test",
|
|
604
|
+
"results.js"
|
|
786
605
|
],
|
|
787
606
|
"aliasPermutations": [],
|
|
788
607
|
"permutations": [
|
|
789
|
-
"agent:
|
|
790
|
-
"
|
|
791
|
-
"
|
|
792
|
-
"agent:test
|
|
793
|
-
"
|
|
794
|
-
"test
|
|
608
|
+
"agent:test:results",
|
|
609
|
+
"test:agent:results",
|
|
610
|
+
"test:results:agent",
|
|
611
|
+
"agent:results:test",
|
|
612
|
+
"results:agent:test",
|
|
613
|
+
"results:test:agent"
|
|
795
614
|
]
|
|
796
615
|
},
|
|
797
|
-
"agent:
|
|
616
|
+
"agent:test:resume": {
|
|
798
617
|
"aliases": [],
|
|
799
618
|
"args": {},
|
|
800
|
-
"description": "
|
|
619
|
+
"description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nUse the --wait flag to specify the number of minutes for this command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, the CLI returns control of the terminal to you, and you must run \"agent test resume\" again.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
801
620
|
"examples": [
|
|
802
|
-
"
|
|
803
|
-
"
|
|
621
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
622
|
+
"Resume the most recently-run agent test in an org with alias \"my-org\" org; wait 10 minutes for the tests to finish:\n<%= config.bin %> <%= command.id %> --use-most-recent --wait 10 --target-org my-org",
|
|
623
|
+
"Resume the most recent agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
|
|
804
624
|
],
|
|
805
625
|
"flags": {
|
|
806
626
|
"json": {
|
|
@@ -835,63 +655,96 @@
|
|
|
835
655
|
"multiple": false,
|
|
836
656
|
"type": "option"
|
|
837
657
|
},
|
|
838
|
-
"
|
|
839
|
-
"char": "
|
|
840
|
-
"name": "
|
|
841
|
-
"summary": "
|
|
658
|
+
"job-id": {
|
|
659
|
+
"char": "i",
|
|
660
|
+
"name": "job-id",
|
|
661
|
+
"summary": "Job ID of the original agent test run.",
|
|
842
662
|
"hasDynamicHelp": false,
|
|
843
663
|
"multiple": false,
|
|
844
664
|
"type": "option"
|
|
845
665
|
},
|
|
846
|
-
"
|
|
847
|
-
"
|
|
848
|
-
"
|
|
666
|
+
"use-most-recent": {
|
|
667
|
+
"char": "r",
|
|
668
|
+
"name": "use-most-recent",
|
|
669
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
670
|
+
"allowNo": false,
|
|
671
|
+
"type": "boolean"
|
|
672
|
+
},
|
|
673
|
+
"wait": {
|
|
674
|
+
"char": "w",
|
|
675
|
+
"name": "wait",
|
|
676
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
677
|
+
"default": "5 minutes",
|
|
678
|
+
"hasDynamicHelp": true,
|
|
679
|
+
"multiple": false,
|
|
680
|
+
"type": "option"
|
|
681
|
+
},
|
|
682
|
+
"result-format": {
|
|
683
|
+
"name": "result-format",
|
|
684
|
+
"summary": "Format of the agent test run results.",
|
|
685
|
+
"default": "human",
|
|
686
|
+
"hasDynamicHelp": false,
|
|
687
|
+
"multiple": false,
|
|
688
|
+
"options": [
|
|
689
|
+
"json",
|
|
690
|
+
"human",
|
|
691
|
+
"junit",
|
|
692
|
+
"tap"
|
|
693
|
+
],
|
|
694
|
+
"type": "option"
|
|
695
|
+
},
|
|
696
|
+
"output-dir": {
|
|
697
|
+
"char": "d",
|
|
698
|
+
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
699
|
+
"name": "output-dir",
|
|
700
|
+
"summary": "Directory to write the agent test results into.",
|
|
701
|
+
"hasDynamicHelp": false,
|
|
702
|
+
"multiple": false,
|
|
703
|
+
"type": "option"
|
|
704
|
+
},
|
|
705
|
+
"verbose": {
|
|
706
|
+
"description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
|
|
707
|
+
"name": "verbose",
|
|
708
|
+
"summary": "Show generated data in the test results output.",
|
|
849
709
|
"allowNo": false,
|
|
850
710
|
"type": "boolean"
|
|
851
711
|
}
|
|
852
712
|
},
|
|
853
713
|
"hasDynamicHelp": true,
|
|
854
714
|
"hiddenAliases": [],
|
|
855
|
-
"id": "agent:
|
|
715
|
+
"id": "agent:test:resume",
|
|
856
716
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
857
717
|
"pluginName": "@salesforce/plugin-agent",
|
|
858
718
|
"pluginType": "core",
|
|
859
719
|
"strict": true,
|
|
860
|
-
"summary": "
|
|
720
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
861
721
|
"enableJsonFlag": true,
|
|
862
|
-
"requiresProject": true,
|
|
863
|
-
"FLAGGABLE_PROMPTS": {
|
|
864
|
-
"api-name": {
|
|
865
|
-
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
866
|
-
"promptMessage": "API name of the authoring bundle to publish"
|
|
867
|
-
}
|
|
868
|
-
},
|
|
869
722
|
"isESM": true,
|
|
870
723
|
"relativePath": [
|
|
871
724
|
"lib",
|
|
872
725
|
"commands",
|
|
873
726
|
"agent",
|
|
874
|
-
"
|
|
875
|
-
"
|
|
727
|
+
"test",
|
|
728
|
+
"resume.js"
|
|
876
729
|
],
|
|
877
730
|
"aliasPermutations": [],
|
|
878
731
|
"permutations": [
|
|
879
|
-
"agent:
|
|
880
|
-
"
|
|
881
|
-
"
|
|
882
|
-
"agent:
|
|
883
|
-
"
|
|
884
|
-
"
|
|
732
|
+
"agent:test:resume",
|
|
733
|
+
"test:agent:resume",
|
|
734
|
+
"test:resume:agent",
|
|
735
|
+
"agent:resume:test",
|
|
736
|
+
"resume:agent:test",
|
|
737
|
+
"resume:test:agent"
|
|
885
738
|
]
|
|
886
739
|
},
|
|
887
|
-
"agent:test:
|
|
740
|
+
"agent:test:run": {
|
|
888
741
|
"aliases": [],
|
|
889
742
|
"args": {},
|
|
890
|
-
"description": "
|
|
743
|
+
"description": "Use the --api-name flag to specify the name of the agent test you want to run. Use the output of the \"agent test list\" command to get the names of all the available agent tests in your org.\n\nBy default, this command starts the agent test in your org, but it doesn't wait for the test to finish. Instead, it displays the \"agent test resume\" command, with a job ID, that you execute to see the results of the test run, and then returns control of the terminal window to you. Use the --wait flag to specify the number of minutes for the command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, run \"agent test resume\".\n\nBy default, this command outputs test results in human-readable tables for each test case, if the test completes in time. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
891
744
|
"examples": [
|
|
892
|
-
"
|
|
893
|
-
"
|
|
894
|
-
"
|
|
745
|
+
"Start an agent test called Resort_Manager_Test for an agent in your default org, don't wait for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test",
|
|
746
|
+
"Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --target-org my-org",
|
|
747
|
+
"Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json"
|
|
895
748
|
],
|
|
896
749
|
"flags": {
|
|
897
750
|
"json": {
|
|
@@ -909,20 +762,6 @@
|
|
|
909
762
|
"multiple": false,
|
|
910
763
|
"type": "option"
|
|
911
764
|
},
|
|
912
|
-
"api-name": {
|
|
913
|
-
"name": "api-name",
|
|
914
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
915
|
-
"hasDynamicHelp": false,
|
|
916
|
-
"multiple": false,
|
|
917
|
-
"type": "option"
|
|
918
|
-
},
|
|
919
|
-
"spec": {
|
|
920
|
-
"name": "spec",
|
|
921
|
-
"summary": "Path to the test spec YAML file.",
|
|
922
|
-
"hasDynamicHelp": false,
|
|
923
|
-
"multiple": false,
|
|
924
|
-
"type": "option"
|
|
925
|
-
},
|
|
926
765
|
"target-org": {
|
|
927
766
|
"char": "o",
|
|
928
767
|
"name": "target-org",
|
|
@@ -940,27 +779,61 @@
|
|
|
940
779
|
"multiple": false,
|
|
941
780
|
"type": "option"
|
|
942
781
|
},
|
|
943
|
-
"
|
|
944
|
-
"
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
782
|
+
"api-name": {
|
|
783
|
+
"char": "n",
|
|
784
|
+
"name": "api-name",
|
|
785
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
786
|
+
"hasDynamicHelp": false,
|
|
787
|
+
"multiple": false,
|
|
788
|
+
"type": "option"
|
|
948
789
|
},
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"
|
|
954
|
-
|
|
955
|
-
|
|
790
|
+
"wait": {
|
|
791
|
+
"char": "w",
|
|
792
|
+
"name": "wait",
|
|
793
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
794
|
+
"hasDynamicHelp": true,
|
|
795
|
+
"multiple": false,
|
|
796
|
+
"type": "option"
|
|
797
|
+
},
|
|
798
|
+
"result-format": {
|
|
799
|
+
"name": "result-format",
|
|
800
|
+
"summary": "Format of the agent test run results.",
|
|
801
|
+
"default": "human",
|
|
802
|
+
"hasDynamicHelp": false,
|
|
803
|
+
"multiple": false,
|
|
804
|
+
"options": [
|
|
805
|
+
"json",
|
|
806
|
+
"human",
|
|
807
|
+
"junit",
|
|
808
|
+
"tap"
|
|
809
|
+
],
|
|
810
|
+
"type": "option"
|
|
811
|
+
},
|
|
812
|
+
"output-dir": {
|
|
813
|
+
"char": "d",
|
|
814
|
+
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
815
|
+
"name": "output-dir",
|
|
816
|
+
"summary": "Directory to write the agent test results into.",
|
|
817
|
+
"hasDynamicHelp": false,
|
|
818
|
+
"multiple": false,
|
|
819
|
+
"type": "option"
|
|
820
|
+
},
|
|
821
|
+
"verbose": {
|
|
822
|
+
"description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
|
|
823
|
+
"name": "verbose",
|
|
824
|
+
"summary": "Show generated data in the test results output.",
|
|
825
|
+
"allowNo": false,
|
|
826
|
+
"type": "boolean"
|
|
827
|
+
}
|
|
828
|
+
},
|
|
956
829
|
"hasDynamicHelp": true,
|
|
957
830
|
"hiddenAliases": [],
|
|
958
|
-
"id": "agent:test:
|
|
831
|
+
"id": "agent:test:run",
|
|
959
832
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
960
833
|
"pluginName": "@salesforce/plugin-agent",
|
|
961
834
|
"pluginType": "core",
|
|
962
835
|
"strict": true,
|
|
963
|
-
"summary": "
|
|
836
|
+
"summary": "Start an agent test in your org.",
|
|
964
837
|
"enableJsonFlag": true,
|
|
965
838
|
"isESM": true,
|
|
966
839
|
"relativePath": [
|
|
@@ -968,25 +841,25 @@
|
|
|
968
841
|
"commands",
|
|
969
842
|
"agent",
|
|
970
843
|
"test",
|
|
971
|
-
"
|
|
844
|
+
"run.js"
|
|
972
845
|
],
|
|
973
846
|
"aliasPermutations": [],
|
|
974
847
|
"permutations": [
|
|
975
|
-
"agent:test:
|
|
976
|
-
"test:agent:
|
|
977
|
-
"test:
|
|
978
|
-
"agent:
|
|
979
|
-
"
|
|
980
|
-
"
|
|
848
|
+
"agent:test:run",
|
|
849
|
+
"test:agent:run",
|
|
850
|
+
"test:run:agent",
|
|
851
|
+
"agent:run:test",
|
|
852
|
+
"run:agent:test",
|
|
853
|
+
"run:test:agent"
|
|
981
854
|
]
|
|
982
855
|
},
|
|
983
|
-
"agent:
|
|
856
|
+
"agent:publish:authoring-bundle": {
|
|
984
857
|
"aliases": [],
|
|
985
858
|
"args": {},
|
|
986
|
-
"description": "
|
|
859
|
+
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
|
|
987
860
|
"examples": [
|
|
988
|
-
"
|
|
989
|
-
"
|
|
861
|
+
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
862
|
+
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org"
|
|
990
863
|
],
|
|
991
864
|
"flags": {
|
|
992
865
|
"json": {
|
|
@@ -1020,43 +893,66 @@
|
|
|
1020
893
|
"hasDynamicHelp": false,
|
|
1021
894
|
"multiple": false,
|
|
1022
895
|
"type": "option"
|
|
896
|
+
},
|
|
897
|
+
"api-name": {
|
|
898
|
+
"char": "n",
|
|
899
|
+
"name": "api-name",
|
|
900
|
+
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
901
|
+
"hasDynamicHelp": false,
|
|
902
|
+
"multiple": false,
|
|
903
|
+
"type": "option"
|
|
904
|
+
},
|
|
905
|
+
"skip-retrieve": {
|
|
906
|
+
"name": "skip-retrieve",
|
|
907
|
+
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
908
|
+
"allowNo": false,
|
|
909
|
+
"type": "boolean"
|
|
1023
910
|
}
|
|
1024
911
|
},
|
|
1025
912
|
"hasDynamicHelp": true,
|
|
1026
913
|
"hiddenAliases": [],
|
|
1027
|
-
"id": "agent:
|
|
914
|
+
"id": "agent:publish:authoring-bundle",
|
|
1028
915
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1029
916
|
"pluginName": "@salesforce/plugin-agent",
|
|
1030
917
|
"pluginType": "core",
|
|
1031
918
|
"strict": true,
|
|
1032
|
-
"summary": "
|
|
919
|
+
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
1033
920
|
"enableJsonFlag": true,
|
|
921
|
+
"requiresProject": true,
|
|
922
|
+
"FLAGGABLE_PROMPTS": {
|
|
923
|
+
"api-name": {
|
|
924
|
+
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
925
|
+
"promptMessage": "API name of the authoring bundle to publish"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
1034
928
|
"isESM": true,
|
|
1035
929
|
"relativePath": [
|
|
1036
930
|
"lib",
|
|
1037
931
|
"commands",
|
|
1038
932
|
"agent",
|
|
1039
|
-
"
|
|
1040
|
-
"
|
|
933
|
+
"publish",
|
|
934
|
+
"authoring-bundle.js"
|
|
1041
935
|
],
|
|
1042
936
|
"aliasPermutations": [],
|
|
1043
937
|
"permutations": [
|
|
1044
|
-
"agent:
|
|
1045
|
-
"
|
|
1046
|
-
"
|
|
1047
|
-
"agent:
|
|
1048
|
-
"
|
|
1049
|
-
"
|
|
938
|
+
"agent:publish:authoring-bundle",
|
|
939
|
+
"publish:agent:authoring-bundle",
|
|
940
|
+
"publish:authoring-bundle:agent",
|
|
941
|
+
"agent:authoring-bundle:publish",
|
|
942
|
+
"authoring-bundle:agent:publish",
|
|
943
|
+
"authoring-bundle:publish:agent"
|
|
1050
944
|
]
|
|
1051
945
|
},
|
|
1052
|
-
"agent:
|
|
946
|
+
"agent:generate:agent-spec": {
|
|
1053
947
|
"aliases": [],
|
|
1054
948
|
"args": {},
|
|
1055
|
-
"description": "
|
|
949
|
+
"description": "An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate, complete, and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply or change a topic's description.\n\nYou can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.\n\nYou can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to add context to the agent's prompts, the tone of the prompts, and the username of a user in the org to assign to the agent.\n\nWhen your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the \"agent generate authoring-bundle\" CLI command. An authoring bundle is a metadata type that contains an Agent Script file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately create an agent with the \"agent create\" command. We don't recommend this workflow because these types of agents don't use Agent Script, and are thus less flexible and more difficult to maintain.)",
|
|
1056
950
|
"examples": [
|
|
1057
|
-
"
|
|
1058
|
-
"
|
|
1059
|
-
"
|
|
951
|
+
"Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and your company details; use your default org:\n<%= config.bin %> <%= command.id %> --type customer --role \"Field customer complaints and manage employee schedules.\" --company-name \"Coral Cloud Resorts\" --company-description \"Provide customers with exceptional destination activities, unforgettable experiences, and reservation services.\"",
|
|
952
|
+
"Generate an agent spec by being prompted for the required agent properties and generate a maxiumum of 5 topics; write the generated file to the \"specs/resortManagerSpec.yaml\" file and use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org",
|
|
953
|
+
"Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
|
|
954
|
+
"Specify an existing agent spec file called \"specs/resortManagerAgent.yaml\", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:\n<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role \"Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly\"",
|
|
955
|
+
"Specify that the conversational tone of the agent is formal and to attach the \"resortmanager@myorg.com\" username to it; be prompted for the required properties and use your default org:\n<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com"
|
|
1060
956
|
],
|
|
1061
957
|
"flags": {
|
|
1062
958
|
"json": {
|
|
@@ -1091,81 +987,163 @@
|
|
|
1091
987
|
"multiple": false,
|
|
1092
988
|
"type": "option"
|
|
1093
989
|
},
|
|
1094
|
-
"
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
1097
|
-
"
|
|
1098
|
-
"
|
|
990
|
+
"type": {
|
|
991
|
+
"name": "type",
|
|
992
|
+
"summary": "Type of agent to create. Internal types are copilots used internally by your company and customer types are the agents you create for your customers.",
|
|
993
|
+
"hasDynamicHelp": false,
|
|
994
|
+
"multiple": false,
|
|
995
|
+
"options": [
|
|
996
|
+
"customer",
|
|
997
|
+
"internal"
|
|
998
|
+
],
|
|
999
|
+
"type": "option"
|
|
1000
|
+
},
|
|
1001
|
+
"role": {
|
|
1002
|
+
"name": "role",
|
|
1003
|
+
"summary": "Role of the agent.",
|
|
1099
1004
|
"hasDynamicHelp": false,
|
|
1100
1005
|
"multiple": false,
|
|
1101
1006
|
"type": "option"
|
|
1102
1007
|
},
|
|
1103
|
-
"
|
|
1104
|
-
"name": "
|
|
1105
|
-
"summary": "
|
|
1106
|
-
"
|
|
1008
|
+
"company-name": {
|
|
1009
|
+
"name": "company-name",
|
|
1010
|
+
"summary": "Name of your company.",
|
|
1011
|
+
"hasDynamicHelp": false,
|
|
1012
|
+
"multiple": false,
|
|
1013
|
+
"type": "option"
|
|
1014
|
+
},
|
|
1015
|
+
"company-description": {
|
|
1016
|
+
"name": "company-description",
|
|
1017
|
+
"summary": "Description of your company.",
|
|
1018
|
+
"hasDynamicHelp": false,
|
|
1019
|
+
"multiple": false,
|
|
1020
|
+
"type": "option"
|
|
1021
|
+
},
|
|
1022
|
+
"company-website": {
|
|
1023
|
+
"name": "company-website",
|
|
1024
|
+
"summary": "Website URL of your company.",
|
|
1025
|
+
"hasDynamicHelp": false,
|
|
1026
|
+
"multiple": false,
|
|
1027
|
+
"type": "option"
|
|
1028
|
+
},
|
|
1029
|
+
"max-topics": {
|
|
1030
|
+
"name": "max-topics",
|
|
1031
|
+
"summary": "Maximum number of topics to generate in the agent spec; default is 5.",
|
|
1032
|
+
"hasDynamicHelp": false,
|
|
1033
|
+
"multiple": false,
|
|
1034
|
+
"type": "option"
|
|
1035
|
+
},
|
|
1036
|
+
"agent-user": {
|
|
1037
|
+
"name": "agent-user",
|
|
1038
|
+
"summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
|
|
1039
|
+
"hasDynamicHelp": false,
|
|
1040
|
+
"multiple": false,
|
|
1041
|
+
"type": "option"
|
|
1042
|
+
},
|
|
1043
|
+
"enrich-logs": {
|
|
1044
|
+
"name": "enrich-logs",
|
|
1045
|
+
"summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
|
|
1107
1046
|
"hasDynamicHelp": false,
|
|
1108
1047
|
"multiple": false,
|
|
1109
1048
|
"options": [
|
|
1110
|
-
"
|
|
1111
|
-
"
|
|
1112
|
-
"junit",
|
|
1113
|
-
"tap"
|
|
1049
|
+
"true",
|
|
1050
|
+
"false"
|
|
1114
1051
|
],
|
|
1115
1052
|
"type": "option"
|
|
1116
1053
|
},
|
|
1117
|
-
"
|
|
1118
|
-
"
|
|
1119
|
-
"
|
|
1120
|
-
"name": "output-dir",
|
|
1121
|
-
"summary": "Directory to write the agent test results into.",
|
|
1054
|
+
"tone": {
|
|
1055
|
+
"name": "tone",
|
|
1056
|
+
"summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
|
|
1122
1057
|
"hasDynamicHelp": false,
|
|
1123
1058
|
"multiple": false,
|
|
1059
|
+
"options": [
|
|
1060
|
+
"formal",
|
|
1061
|
+
"casual",
|
|
1062
|
+
"neutral"
|
|
1063
|
+
],
|
|
1124
1064
|
"type": "option"
|
|
1125
1065
|
},
|
|
1126
|
-
"
|
|
1127
|
-
"
|
|
1128
|
-
"
|
|
1129
|
-
"
|
|
1066
|
+
"spec": {
|
|
1067
|
+
"name": "spec",
|
|
1068
|
+
"summary": "Agent spec file, in YAML format, to use as input to the command.",
|
|
1069
|
+
"hasDynamicHelp": false,
|
|
1070
|
+
"multiple": false,
|
|
1071
|
+
"type": "option"
|
|
1072
|
+
},
|
|
1073
|
+
"output-file": {
|
|
1074
|
+
"name": "output-file",
|
|
1075
|
+
"summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
|
|
1076
|
+
"default": "specs/agentSpec.yaml",
|
|
1077
|
+
"hasDynamicHelp": false,
|
|
1078
|
+
"multiple": false,
|
|
1079
|
+
"type": "option"
|
|
1080
|
+
},
|
|
1081
|
+
"full-interview": {
|
|
1082
|
+
"name": "full-interview",
|
|
1083
|
+
"summary": "Prompt for both required and optional flags.",
|
|
1084
|
+
"allowNo": false,
|
|
1085
|
+
"type": "boolean"
|
|
1086
|
+
},
|
|
1087
|
+
"prompt-template": {
|
|
1088
|
+
"name": "prompt-template",
|
|
1089
|
+
"summary": "API name of a customized prompt template to use instead of the default prompt template.",
|
|
1090
|
+
"hasDynamicHelp": false,
|
|
1091
|
+
"multiple": false,
|
|
1092
|
+
"type": "option"
|
|
1093
|
+
},
|
|
1094
|
+
"grounding-context": {
|
|
1095
|
+
"dependsOn": [
|
|
1096
|
+
"prompt-template"
|
|
1097
|
+
],
|
|
1098
|
+
"name": "grounding-context",
|
|
1099
|
+
"summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
|
|
1100
|
+
"hasDynamicHelp": false,
|
|
1101
|
+
"multiple": false,
|
|
1102
|
+
"type": "option"
|
|
1103
|
+
},
|
|
1104
|
+
"force-overwrite": {
|
|
1105
|
+
"name": "force-overwrite",
|
|
1106
|
+
"summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
|
|
1130
1107
|
"allowNo": false,
|
|
1131
1108
|
"type": "boolean"
|
|
1132
1109
|
}
|
|
1133
1110
|
},
|
|
1134
1111
|
"hasDynamicHelp": true,
|
|
1135
1112
|
"hiddenAliases": [],
|
|
1136
|
-
"id": "agent:
|
|
1113
|
+
"id": "agent:generate:agent-spec",
|
|
1137
1114
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1138
1115
|
"pluginName": "@salesforce/plugin-agent",
|
|
1139
1116
|
"pluginType": "core",
|
|
1140
1117
|
"strict": true,
|
|
1141
|
-
"summary": "
|
|
1118
|
+
"summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
|
|
1142
1119
|
"enableJsonFlag": true,
|
|
1120
|
+
"requiresProject": true,
|
|
1143
1121
|
"isESM": true,
|
|
1144
1122
|
"relativePath": [
|
|
1145
1123
|
"lib",
|
|
1146
1124
|
"commands",
|
|
1147
1125
|
"agent",
|
|
1148
|
-
"
|
|
1149
|
-
"
|
|
1126
|
+
"generate",
|
|
1127
|
+
"agent-spec.js"
|
|
1150
1128
|
],
|
|
1151
1129
|
"aliasPermutations": [],
|
|
1152
1130
|
"permutations": [
|
|
1153
|
-
"agent:
|
|
1154
|
-
"
|
|
1155
|
-
"
|
|
1156
|
-
"agent:
|
|
1157
|
-
"
|
|
1158
|
-
"
|
|
1131
|
+
"agent:generate:agent-spec",
|
|
1132
|
+
"generate:agent:agent-spec",
|
|
1133
|
+
"generate:agent-spec:agent",
|
|
1134
|
+
"agent:agent-spec:generate",
|
|
1135
|
+
"agent-spec:agent:generate",
|
|
1136
|
+
"agent-spec:generate:agent"
|
|
1159
1137
|
]
|
|
1160
1138
|
},
|
|
1161
|
-
"agent:
|
|
1139
|
+
"agent:generate:authoring-bundle": {
|
|
1162
1140
|
"aliases": [],
|
|
1163
1141
|
"args": {},
|
|
1164
|
-
"description": "
|
|
1142
|
+
"description": "Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the agent's blueprint; it fully describes what the agent can do using the Agent Script language.\n\nUse this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the \"agent generate agent-spec\" command. The agent spec YAML file is a high-level description of the agent; it describes its essence rather than exactly what it can do.\n\nThe metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard \"<bundle-api-name>.bundle-meta.xml\" metadata file and the Agent Script file (with extension \".agent\"). When you run this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-api-name> directory. Use the --output-dir flag to generate them elsewhere.\n\nAfter you generate the initial authoring bundle, code the Agent Script file so your agent behaves exactly as you want. The Agent Script file generated by this command is just a first draft of your agent! Interactively test the agent by conversing with it using the \"agent preview\" command. Then publish the agent to your org with the \"agent publish authoring-bundle\" command.\n\nThis command requires an org because it uses it to access an LLM for generating the Agent Script file.",
|
|
1165
1143
|
"examples": [
|
|
1166
|
-
"
|
|
1167
|
-
"
|
|
1168
|
-
"
|
|
1144
|
+
"Generate an authoring bundle by being prompted for all required values, such as the agent spec YAML file, the bundle name, and the API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1145
|
+
"Generate an authoring bundle from the \"specs/agentSpec.yaml\" agent spec YAML file and give it the label \"My Authoring Bundle\"; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\"",
|
|
1146
|
+
"Similar to previous example, but generate the authoring bundle files in the \"other-package-dir/main/default\" package directory; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir other-package-dir/main/default --target-org my-dev-org"
|
|
1169
1147
|
],
|
|
1170
1148
|
"flags": {
|
|
1171
1149
|
"json": {
|
|
@@ -1193,103 +1171,95 @@
|
|
|
1193
1171
|
"multiple": false,
|
|
1194
1172
|
"type": "option"
|
|
1195
1173
|
},
|
|
1196
|
-
"api-
|
|
1197
|
-
"
|
|
1198
|
-
"
|
|
1174
|
+
"api-name": {
|
|
1175
|
+
"name": "api-name",
|
|
1176
|
+
"summary": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
|
|
1199
1177
|
"hasDynamicHelp": false,
|
|
1200
1178
|
"multiple": false,
|
|
1201
1179
|
"type": "option"
|
|
1202
1180
|
},
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1205
|
-
"name": "
|
|
1206
|
-
"summary": "Job ID of the original agent test run.",
|
|
1181
|
+
"api-version": {
|
|
1182
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1183
|
+
"name": "api-version",
|
|
1207
1184
|
"hasDynamicHelp": false,
|
|
1208
1185
|
"multiple": false,
|
|
1209
1186
|
"type": "option"
|
|
1210
1187
|
},
|
|
1211
|
-
"
|
|
1212
|
-
"char": "
|
|
1213
|
-
"name": "
|
|
1214
|
-
"summary": "
|
|
1215
|
-
"allowNo": false,
|
|
1216
|
-
"type": "boolean"
|
|
1217
|
-
},
|
|
1218
|
-
"wait": {
|
|
1219
|
-
"char": "w",
|
|
1220
|
-
"name": "wait",
|
|
1221
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1222
|
-
"default": "5 minutes",
|
|
1223
|
-
"hasDynamicHelp": true,
|
|
1224
|
-
"multiple": false,
|
|
1225
|
-
"type": "option"
|
|
1226
|
-
},
|
|
1227
|
-
"result-format": {
|
|
1228
|
-
"name": "result-format",
|
|
1229
|
-
"summary": "Format of the agent test run results.",
|
|
1230
|
-
"default": "human",
|
|
1188
|
+
"spec": {
|
|
1189
|
+
"char": "f",
|
|
1190
|
+
"name": "spec",
|
|
1191
|
+
"summary": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
|
|
1231
1192
|
"hasDynamicHelp": false,
|
|
1232
1193
|
"multiple": false,
|
|
1233
|
-
"options": [
|
|
1234
|
-
"json",
|
|
1235
|
-
"human",
|
|
1236
|
-
"junit",
|
|
1237
|
-
"tap"
|
|
1238
|
-
],
|
|
1239
1194
|
"type": "option"
|
|
1240
1195
|
},
|
|
1241
1196
|
"output-dir": {
|
|
1242
1197
|
"char": "d",
|
|
1243
|
-
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
1244
1198
|
"name": "output-dir",
|
|
1245
|
-
"summary": "Directory
|
|
1199
|
+
"summary": "Directory where the authoring bundle files are generated.",
|
|
1246
1200
|
"hasDynamicHelp": false,
|
|
1247
1201
|
"multiple": false,
|
|
1248
1202
|
"type": "option"
|
|
1249
1203
|
},
|
|
1250
|
-
"
|
|
1251
|
-
"
|
|
1252
|
-
"name": "
|
|
1253
|
-
"summary": "
|
|
1254
|
-
"
|
|
1255
|
-
"
|
|
1204
|
+
"name": {
|
|
1205
|
+
"char": "n",
|
|
1206
|
+
"name": "name",
|
|
1207
|
+
"summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
1208
|
+
"hasDynamicHelp": false,
|
|
1209
|
+
"multiple": false,
|
|
1210
|
+
"type": "option"
|
|
1256
1211
|
}
|
|
1257
1212
|
},
|
|
1258
1213
|
"hasDynamicHelp": true,
|
|
1259
1214
|
"hiddenAliases": [],
|
|
1260
|
-
"id": "agent:
|
|
1215
|
+
"id": "agent:generate:authoring-bundle",
|
|
1261
1216
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1262
1217
|
"pluginName": "@salesforce/plugin-agent",
|
|
1263
1218
|
"pluginType": "core",
|
|
1264
1219
|
"strict": true,
|
|
1265
|
-
"summary": "
|
|
1220
|
+
"summary": "Generate an authoring bundle from an existing agent spec YAML file.",
|
|
1266
1221
|
"enableJsonFlag": true,
|
|
1222
|
+
"requiresProject": true,
|
|
1223
|
+
"FLAGGABLE_PROMPTS": {
|
|
1224
|
+
"name": {
|
|
1225
|
+
"message": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
1226
|
+
"promptMessage": "Name (label) of the authoring bundle",
|
|
1227
|
+
"required": true
|
|
1228
|
+
},
|
|
1229
|
+
"api-name": {
|
|
1230
|
+
"message": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
|
|
1231
|
+
"promptMessage": "API name of the new authoring bundle"
|
|
1232
|
+
},
|
|
1233
|
+
"spec": {
|
|
1234
|
+
"message": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
|
|
1235
|
+
"promptMessage": "Path to the agent spec YAML file",
|
|
1236
|
+
"required": true
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1267
1239
|
"isESM": true,
|
|
1268
1240
|
"relativePath": [
|
|
1269
1241
|
"lib",
|
|
1270
1242
|
"commands",
|
|
1271
1243
|
"agent",
|
|
1272
|
-
"
|
|
1273
|
-
"
|
|
1244
|
+
"generate",
|
|
1245
|
+
"authoring-bundle.js"
|
|
1274
1246
|
],
|
|
1275
1247
|
"aliasPermutations": [],
|
|
1276
1248
|
"permutations": [
|
|
1277
|
-
"agent:
|
|
1278
|
-
"
|
|
1279
|
-
"
|
|
1280
|
-
"agent:
|
|
1281
|
-
"
|
|
1282
|
-
"
|
|
1249
|
+
"agent:generate:authoring-bundle",
|
|
1250
|
+
"generate:agent:authoring-bundle",
|
|
1251
|
+
"generate:authoring-bundle:agent",
|
|
1252
|
+
"agent:authoring-bundle:generate",
|
|
1253
|
+
"authoring-bundle:agent:generate",
|
|
1254
|
+
"authoring-bundle:generate:agent"
|
|
1283
1255
|
]
|
|
1284
1256
|
},
|
|
1285
|
-
"agent:
|
|
1257
|
+
"agent:generate:template": {
|
|
1286
1258
|
"aliases": [],
|
|
1287
1259
|
"args": {},
|
|
1288
|
-
"description": "
|
|
1260
|
+
"description": "At a high-level, agents are defined by the Bot, BotVersion, and GenAiPlannerBundle metadata types. The GenAiPlannerBundle type in turn defines the agent's topics and actions. This command uses the metadata files for these three types, located in your local DX project, to generate a BotTemplate file for a specific agent (Bot). You then use the BotTemplate file, along with the GenAiPlannerBundle file that references the BotTemplate, to package the template in a managed package that you can share between orgs or on AppExchange.\n\nUse the --agent-file flag to specify the relative or full pathname of the Bot metadata file, such as force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml. A single Bot can have multiple BotVersions, so use the --agent-version flag to specify the version. The corresponding BotVersion file must exist locally. For example, if you specify \"--agent-version 4\", then the file force-app/main/default/bots/My_Awesome_Agent/v4.botVersion-meta.xml must exist.\n\nThe new BotTemplate file is generated in the \"botTemplates\" directory in your local package directory, and has the name <Agent_API_name>_v<Version>_Template.botTemplate-meta.xml, such as force-app/main/default/botTemplates/My_Awesome_Agent_v4_Template.botTemplate-meta.xml. The command displays the full pathname of the generated files when it completes.",
|
|
1289
1261
|
"examples": [
|
|
1290
|
-
"
|
|
1291
|
-
"Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --target-org my-org",
|
|
1292
|
-
"Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json"
|
|
1262
|
+
"Generate an agent template from a Bot metadata file in your DX project that corresponds to the My_Awesome_Agent agent; use version 1 of the agent.\n<%= config.bin %> <%= command.id %> --agent-file force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1"
|
|
1293
1263
|
],
|
|
1294
1264
|
"flags": {
|
|
1295
1265
|
"json": {
|
|
@@ -1307,16 +1277,6 @@
|
|
|
1307
1277
|
"multiple": false,
|
|
1308
1278
|
"type": "option"
|
|
1309
1279
|
},
|
|
1310
|
-
"target-org": {
|
|
1311
|
-
"char": "o",
|
|
1312
|
-
"name": "target-org",
|
|
1313
|
-
"noCacheDefault": true,
|
|
1314
|
-
"required": true,
|
|
1315
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1316
|
-
"hasDynamicHelp": true,
|
|
1317
|
-
"multiple": false,
|
|
1318
|
-
"type": "option"
|
|
1319
|
-
},
|
|
1320
1280
|
"api-version": {
|
|
1321
1281
|
"description": "Override the api version used for api requests made by this command",
|
|
1322
1282
|
"name": "api-version",
|
|
@@ -1324,78 +1284,118 @@
|
|
|
1324
1284
|
"multiple": false,
|
|
1325
1285
|
"type": "option"
|
|
1326
1286
|
},
|
|
1327
|
-
"
|
|
1328
|
-
"
|
|
1329
|
-
"
|
|
1330
|
-
"summary": "
|
|
1287
|
+
"agent-version": {
|
|
1288
|
+
"name": "agent-version",
|
|
1289
|
+
"required": true,
|
|
1290
|
+
"summary": "Version of the agent (BotVersion).",
|
|
1331
1291
|
"hasDynamicHelp": false,
|
|
1332
1292
|
"multiple": false,
|
|
1333
1293
|
"type": "option"
|
|
1334
1294
|
},
|
|
1335
|
-
"
|
|
1336
|
-
"char": "
|
|
1337
|
-
"name": "
|
|
1338
|
-
"
|
|
1339
|
-
"
|
|
1295
|
+
"agent-file": {
|
|
1296
|
+
"char": "f",
|
|
1297
|
+
"name": "agent-file",
|
|
1298
|
+
"required": true,
|
|
1299
|
+
"summary": "Path to an agent (Bot) metadata file.",
|
|
1300
|
+
"hasDynamicHelp": false,
|
|
1340
1301
|
"multiple": false,
|
|
1341
1302
|
"type": "option"
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"hasDynamicHelp": false,
|
|
1306
|
+
"hiddenAliases": [],
|
|
1307
|
+
"id": "agent:generate:template",
|
|
1308
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1309
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1310
|
+
"pluginType": "core",
|
|
1311
|
+
"strict": true,
|
|
1312
|
+
"summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a managed package.",
|
|
1313
|
+
"enableJsonFlag": true,
|
|
1314
|
+
"requiresProject": true,
|
|
1315
|
+
"isESM": true,
|
|
1316
|
+
"relativePath": [
|
|
1317
|
+
"lib",
|
|
1318
|
+
"commands",
|
|
1319
|
+
"agent",
|
|
1320
|
+
"generate",
|
|
1321
|
+
"template.js"
|
|
1322
|
+
],
|
|
1323
|
+
"aliasPermutations": [],
|
|
1324
|
+
"permutations": [
|
|
1325
|
+
"agent:generate:template",
|
|
1326
|
+
"generate:agent:template",
|
|
1327
|
+
"generate:template:agent",
|
|
1328
|
+
"agent:template:generate",
|
|
1329
|
+
"template:agent:generate",
|
|
1330
|
+
"template:generate:agent"
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
"agent:generate:test-spec": {
|
|
1334
|
+
"aliases": [],
|
|
1335
|
+
"args": {},
|
|
1336
|
+
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
1337
|
+
"examples": [
|
|
1338
|
+
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
1339
|
+
"Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
|
|
1340
|
+
"Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:\n<%= config.bin %> <%= command.id %> --from-definition force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml"
|
|
1341
|
+
],
|
|
1342
|
+
"flags": {
|
|
1343
|
+
"flags-dir": {
|
|
1344
|
+
"helpGroup": "GLOBAL",
|
|
1345
|
+
"name": "flags-dir",
|
|
1346
|
+
"summary": "Import flag values from a directory.",
|
|
1347
1347
|
"hasDynamicHelp": false,
|
|
1348
1348
|
"multiple": false,
|
|
1349
|
-
"options": [
|
|
1350
|
-
"json",
|
|
1351
|
-
"human",
|
|
1352
|
-
"junit",
|
|
1353
|
-
"tap"
|
|
1354
|
-
],
|
|
1355
1349
|
"type": "option"
|
|
1356
1350
|
},
|
|
1357
|
-
"
|
|
1351
|
+
"from-definition": {
|
|
1358
1352
|
"char": "d",
|
|
1359
|
-
"
|
|
1360
|
-
"
|
|
1361
|
-
"summary": "Directory to write the agent test results into.",
|
|
1353
|
+
"name": "from-definition",
|
|
1354
|
+
"summary": "Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
|
|
1362
1355
|
"hasDynamicHelp": false,
|
|
1363
1356
|
"multiple": false,
|
|
1364
1357
|
"type": "option"
|
|
1365
1358
|
},
|
|
1366
|
-
"
|
|
1367
|
-
"
|
|
1368
|
-
"
|
|
1369
|
-
"summary": "Show generated data in the test results output.",
|
|
1359
|
+
"force-overwrite": {
|
|
1360
|
+
"name": "force-overwrite",
|
|
1361
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
|
|
1370
1362
|
"allowNo": false,
|
|
1371
1363
|
"type": "boolean"
|
|
1364
|
+
},
|
|
1365
|
+
"output-file": {
|
|
1366
|
+
"char": "f",
|
|
1367
|
+
"name": "output-file",
|
|
1368
|
+
"summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\".",
|
|
1369
|
+
"hasDynamicHelp": false,
|
|
1370
|
+
"multiple": false,
|
|
1371
|
+
"type": "option"
|
|
1372
1372
|
}
|
|
1373
1373
|
},
|
|
1374
|
-
"hasDynamicHelp":
|
|
1374
|
+
"hasDynamicHelp": false,
|
|
1375
1375
|
"hiddenAliases": [],
|
|
1376
|
-
"id": "agent:test
|
|
1376
|
+
"id": "agent:generate:test-spec",
|
|
1377
1377
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1378
1378
|
"pluginName": "@salesforce/plugin-agent",
|
|
1379
1379
|
"pluginType": "core",
|
|
1380
1380
|
"strict": true,
|
|
1381
|
-
"summary": "
|
|
1382
|
-
"enableJsonFlag":
|
|
1381
|
+
"summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
|
|
1382
|
+
"enableJsonFlag": false,
|
|
1383
1383
|
"isESM": true,
|
|
1384
1384
|
"relativePath": [
|
|
1385
1385
|
"lib",
|
|
1386
1386
|
"commands",
|
|
1387
1387
|
"agent",
|
|
1388
|
-
"
|
|
1389
|
-
"
|
|
1388
|
+
"generate",
|
|
1389
|
+
"test-spec.js"
|
|
1390
1390
|
],
|
|
1391
1391
|
"aliasPermutations": [],
|
|
1392
1392
|
"permutations": [
|
|
1393
|
-
"agent:test
|
|
1394
|
-
"
|
|
1395
|
-
"test:
|
|
1396
|
-
"agent:
|
|
1397
|
-
"
|
|
1398
|
-
"
|
|
1393
|
+
"agent:generate:test-spec",
|
|
1394
|
+
"generate:agent:test-spec",
|
|
1395
|
+
"generate:test-spec:agent",
|
|
1396
|
+
"agent:test-spec:generate",
|
|
1397
|
+
"test-spec:agent:generate",
|
|
1398
|
+
"test-spec:generate:agent"
|
|
1399
1399
|
]
|
|
1400
1400
|
},
|
|
1401
1401
|
"agent:validate:authoring-bundle": {
|
|
@@ -1483,5 +1483,5 @@
|
|
|
1483
1483
|
]
|
|
1484
1484
|
}
|
|
1485
1485
|
},
|
|
1486
|
-
"version": "1.27.
|
|
1486
|
+
"version": "1.27.3"
|
|
1487
1487
|
}
|