@salesforce/plugin-agent 1.38.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -27
- package/lib/commands/agent/preview/end.d.ts +32 -6
- package/lib/commands/agent/preview/end.js +194 -31
- package/lib/commands/agent/preview/end.js.map +1 -1
- package/messages/agent.preview.end.md +40 -2
- package/oclif.manifest.json +998 -963
- package/package.json +4 -4
- package/schemas/agent-preview-end.json +20 -0
package/oclif.manifest.json
CHANGED
|
@@ -409,14 +409,16 @@
|
|
|
409
409
|
"preview:agent"
|
|
410
410
|
]
|
|
411
411
|
},
|
|
412
|
-
"agent:
|
|
412
|
+
"agent:generate:agent-spec": {
|
|
413
413
|
"aliases": [],
|
|
414
414
|
"args": {},
|
|
415
|
-
"description": "
|
|
415
|
+
"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.)",
|
|
416
416
|
"examples": [
|
|
417
|
-
"
|
|
418
|
-
"
|
|
419
|
-
"
|
|
417
|
+
"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.\"",
|
|
418
|
+
"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",
|
|
419
|
+
"Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
|
|
420
|
+
"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\"",
|
|
421
|
+
"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"
|
|
420
422
|
],
|
|
421
423
|
"flags": {
|
|
422
424
|
"json": {
|
|
@@ -451,96 +453,164 @@
|
|
|
451
453
|
"multiple": false,
|
|
452
454
|
"type": "option"
|
|
453
455
|
},
|
|
454
|
-
"
|
|
455
|
-
"name": "
|
|
456
|
-
"
|
|
457
|
-
"summary": "Session ID outputted by \"agent preview start\". Not required when the agent has exactly one active session. Run \"agent preview sessions\" to see the list of all sessions.",
|
|
456
|
+
"type": {
|
|
457
|
+
"name": "type",
|
|
458
|
+
"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.",
|
|
458
459
|
"hasDynamicHelp": false,
|
|
459
460
|
"multiple": false,
|
|
461
|
+
"options": [
|
|
462
|
+
"customer",
|
|
463
|
+
"internal"
|
|
464
|
+
],
|
|
460
465
|
"type": "option"
|
|
461
466
|
},
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
"
|
|
465
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
467
|
+
"role": {
|
|
468
|
+
"name": "role",
|
|
469
|
+
"summary": "Role of the agent.",
|
|
466
470
|
"hasDynamicHelp": false,
|
|
467
471
|
"multiple": false,
|
|
468
472
|
"type": "option"
|
|
469
473
|
},
|
|
470
|
-
"
|
|
471
|
-
"name": "
|
|
472
|
-
"summary": "
|
|
474
|
+
"company-name": {
|
|
475
|
+
"name": "company-name",
|
|
476
|
+
"summary": "Name of your company.",
|
|
477
|
+
"hasDynamicHelp": false,
|
|
478
|
+
"multiple": false,
|
|
479
|
+
"type": "option"
|
|
480
|
+
},
|
|
481
|
+
"company-description": {
|
|
482
|
+
"name": "company-description",
|
|
483
|
+
"summary": "Description of your company.",
|
|
484
|
+
"hasDynamicHelp": false,
|
|
485
|
+
"multiple": false,
|
|
486
|
+
"type": "option"
|
|
487
|
+
},
|
|
488
|
+
"company-website": {
|
|
489
|
+
"name": "company-website",
|
|
490
|
+
"summary": "Website URL of your company.",
|
|
491
|
+
"hasDynamicHelp": false,
|
|
492
|
+
"multiple": false,
|
|
493
|
+
"type": "option"
|
|
494
|
+
},
|
|
495
|
+
"max-topics": {
|
|
496
|
+
"name": "max-topics",
|
|
497
|
+
"summary": "Maximum number of topics to generate in the agent spec; default is 5.",
|
|
498
|
+
"hasDynamicHelp": false,
|
|
499
|
+
"multiple": false,
|
|
500
|
+
"type": "option"
|
|
501
|
+
},
|
|
502
|
+
"agent-user": {
|
|
503
|
+
"name": "agent-user",
|
|
504
|
+
"summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
|
|
505
|
+
"hasDynamicHelp": false,
|
|
506
|
+
"multiple": false,
|
|
507
|
+
"type": "option"
|
|
508
|
+
},
|
|
509
|
+
"enrich-logs": {
|
|
510
|
+
"name": "enrich-logs",
|
|
511
|
+
"summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
|
|
512
|
+
"hasDynamicHelp": false,
|
|
513
|
+
"multiple": false,
|
|
514
|
+
"options": [
|
|
515
|
+
"true",
|
|
516
|
+
"false"
|
|
517
|
+
],
|
|
518
|
+
"type": "option"
|
|
519
|
+
},
|
|
520
|
+
"tone": {
|
|
521
|
+
"name": "tone",
|
|
522
|
+
"summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
|
|
523
|
+
"hasDynamicHelp": false,
|
|
524
|
+
"multiple": false,
|
|
525
|
+
"options": [
|
|
526
|
+
"formal",
|
|
527
|
+
"casual",
|
|
528
|
+
"neutral"
|
|
529
|
+
],
|
|
530
|
+
"type": "option"
|
|
531
|
+
},
|
|
532
|
+
"spec": {
|
|
533
|
+
"name": "spec",
|
|
534
|
+
"summary": "Agent spec file, in YAML format, to use as input to the command.",
|
|
535
|
+
"hasDynamicHelp": false,
|
|
536
|
+
"multiple": false,
|
|
537
|
+
"type": "option"
|
|
538
|
+
},
|
|
539
|
+
"output-file": {
|
|
540
|
+
"name": "output-file",
|
|
541
|
+
"summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
|
|
542
|
+
"default": "specs/agentSpec.yaml",
|
|
543
|
+
"hasDynamicHelp": false,
|
|
544
|
+
"multiple": false,
|
|
545
|
+
"type": "option"
|
|
546
|
+
},
|
|
547
|
+
"full-interview": {
|
|
548
|
+
"name": "full-interview",
|
|
549
|
+
"summary": "Prompt for both required and optional flags.",
|
|
550
|
+
"allowNo": false,
|
|
551
|
+
"type": "boolean"
|
|
552
|
+
},
|
|
553
|
+
"prompt-template": {
|
|
554
|
+
"name": "prompt-template",
|
|
555
|
+
"summary": "API name of a customized prompt template to use instead of the default prompt template.",
|
|
473
556
|
"hasDynamicHelp": false,
|
|
474
557
|
"multiple": false,
|
|
475
558
|
"type": "option"
|
|
559
|
+
},
|
|
560
|
+
"grounding-context": {
|
|
561
|
+
"dependsOn": [
|
|
562
|
+
"prompt-template"
|
|
563
|
+
],
|
|
564
|
+
"name": "grounding-context",
|
|
565
|
+
"summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
|
|
566
|
+
"hasDynamicHelp": false,
|
|
567
|
+
"multiple": false,
|
|
568
|
+
"type": "option"
|
|
569
|
+
},
|
|
570
|
+
"force-overwrite": {
|
|
571
|
+
"name": "force-overwrite",
|
|
572
|
+
"summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
|
|
573
|
+
"allowNo": false,
|
|
574
|
+
"type": "boolean"
|
|
476
575
|
}
|
|
477
576
|
},
|
|
478
577
|
"hasDynamicHelp": true,
|
|
479
578
|
"hiddenAliases": [],
|
|
480
|
-
"id": "agent:
|
|
579
|
+
"id": "agent:generate:agent-spec",
|
|
481
580
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
482
581
|
"pluginName": "@salesforce/plugin-agent",
|
|
483
582
|
"pluginType": "core",
|
|
484
583
|
"strict": true,
|
|
485
|
-
"summary": "
|
|
584
|
+
"summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
|
|
486
585
|
"enableJsonFlag": true,
|
|
487
586
|
"requiresProject": true,
|
|
488
|
-
"envVariablesSection": {
|
|
489
|
-
"header": "ENVIRONMENT VARIABLES",
|
|
490
|
-
"body": [
|
|
491
|
-
{
|
|
492
|
-
"name": "SF_TARGET_ORG",
|
|
493
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
494
|
-
}
|
|
495
|
-
]
|
|
496
|
-
},
|
|
497
|
-
"errorCodes": {
|
|
498
|
-
"header": "ERROR CODES",
|
|
499
|
-
"body": [
|
|
500
|
-
{
|
|
501
|
-
"name": "Succeeded (0)",
|
|
502
|
-
"description": "Preview session ended successfully and traces saved."
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"name": "NotFound (2)",
|
|
506
|
-
"description": "Agent not found, or no preview session exists for this agent."
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
"name": "PreviewEndFailed (4)",
|
|
510
|
-
"description": "Failed to end the preview session."
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"name": "SessionAmbiguous (5)",
|
|
514
|
-
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
515
|
-
}
|
|
516
|
-
]
|
|
517
|
-
},
|
|
518
587
|
"isESM": true,
|
|
519
588
|
"relativePath": [
|
|
520
589
|
"lib",
|
|
521
590
|
"commands",
|
|
522
591
|
"agent",
|
|
523
|
-
"
|
|
524
|
-
"
|
|
592
|
+
"generate",
|
|
593
|
+
"agent-spec.js"
|
|
525
594
|
],
|
|
526
595
|
"aliasPermutations": [],
|
|
527
596
|
"permutations": [
|
|
528
|
-
"agent:
|
|
529
|
-
"
|
|
530
|
-
"
|
|
531
|
-
"agent:
|
|
532
|
-
"
|
|
533
|
-
"
|
|
597
|
+
"agent:generate:agent-spec",
|
|
598
|
+
"generate:agent:agent-spec",
|
|
599
|
+
"generate:agent-spec:agent",
|
|
600
|
+
"agent:agent-spec:generate",
|
|
601
|
+
"agent-spec:agent:generate",
|
|
602
|
+
"agent-spec:generate:agent"
|
|
534
603
|
]
|
|
535
604
|
},
|
|
536
|
-
"agent:
|
|
605
|
+
"agent:generate:authoring-bundle": {
|
|
537
606
|
"aliases": [],
|
|
538
607
|
"args": {},
|
|
539
|
-
"description": "
|
|
608
|
+
"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. The resulting Agent Script file is customized to reflect what's in the agent spec file. You can also create an authoring bundle without an agent spec file by specifying the \"--no-spec\" flag; in this case, the resulting Agent Script file is just the default boilerplate.\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.",
|
|
540
609
|
"examples": [
|
|
541
|
-
"
|
|
542
|
-
"
|
|
543
|
-
"
|
|
610
|
+
"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 %>",
|
|
611
|
+
"Generate an authoring bundle without using an agent spec file; give the bundle the label \"My Authoring Bundle\" and use your default org:\n<%= config.bin %> <%= command.id %> --no-spec --name \"My Authoring Bundle\"",
|
|
612
|
+
"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\"",
|
|
613
|
+
"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"
|
|
544
614
|
],
|
|
545
615
|
"flags": {
|
|
546
616
|
"json": {
|
|
@@ -568,6 +638,13 @@
|
|
|
568
638
|
"multiple": false,
|
|
569
639
|
"type": "option"
|
|
570
640
|
},
|
|
641
|
+
"api-name": {
|
|
642
|
+
"name": "api-name",
|
|
643
|
+
"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.",
|
|
644
|
+
"hasDynamicHelp": false,
|
|
645
|
+
"multiple": false,
|
|
646
|
+
"type": "option"
|
|
647
|
+
},
|
|
571
648
|
"api-version": {
|
|
572
649
|
"description": "Override the api version used for api requests made by this command",
|
|
573
650
|
"name": "api-version",
|
|
@@ -575,103 +652,77 @@
|
|
|
575
652
|
"multiple": false,
|
|
576
653
|
"type": "option"
|
|
577
654
|
},
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"summary": "
|
|
655
|
+
"spec": {
|
|
656
|
+
"char": "f",
|
|
657
|
+
"name": "spec",
|
|
658
|
+
"summary": "Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.",
|
|
582
659
|
"hasDynamicHelp": false,
|
|
583
660
|
"multiple": false,
|
|
584
661
|
"type": "option"
|
|
585
662
|
},
|
|
586
|
-
"
|
|
587
|
-
"
|
|
588
|
-
"
|
|
589
|
-
"
|
|
590
|
-
"
|
|
663
|
+
"no-spec": {
|
|
664
|
+
"name": "no-spec",
|
|
665
|
+
"summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
|
|
666
|
+
"allowNo": false,
|
|
667
|
+
"type": "boolean"
|
|
668
|
+
},
|
|
669
|
+
"output-dir": {
|
|
670
|
+
"char": "d",
|
|
671
|
+
"name": "output-dir",
|
|
672
|
+
"summary": "Directory where the authoring bundle files are generated.",
|
|
591
673
|
"hasDynamicHelp": false,
|
|
592
674
|
"multiple": false,
|
|
593
675
|
"type": "option"
|
|
594
676
|
},
|
|
595
|
-
"
|
|
677
|
+
"name": {
|
|
596
678
|
"char": "n",
|
|
597
|
-
"name": "
|
|
598
|
-
"summary": "
|
|
679
|
+
"name": "name",
|
|
680
|
+
"summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
599
681
|
"hasDynamicHelp": false,
|
|
600
682
|
"multiple": false,
|
|
601
683
|
"type": "option"
|
|
602
684
|
},
|
|
603
|
-
"
|
|
604
|
-
"name": "
|
|
605
|
-
"summary": "
|
|
606
|
-
"
|
|
607
|
-
"
|
|
608
|
-
"type": "option"
|
|
685
|
+
"force-overwrite": {
|
|
686
|
+
"name": "force-overwrite",
|
|
687
|
+
"summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
|
|
688
|
+
"allowNo": false,
|
|
689
|
+
"type": "boolean"
|
|
609
690
|
}
|
|
610
691
|
},
|
|
611
692
|
"hasDynamicHelp": true,
|
|
612
693
|
"hiddenAliases": [],
|
|
613
|
-
"id": "agent:
|
|
694
|
+
"id": "agent:generate:authoring-bundle",
|
|
614
695
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
615
696
|
"pluginName": "@salesforce/plugin-agent",
|
|
616
697
|
"pluginType": "core",
|
|
617
698
|
"strict": true,
|
|
618
|
-
"summary": "
|
|
699
|
+
"summary": "Generate an authoring bundle from an existing agent spec YAML file.",
|
|
619
700
|
"enableJsonFlag": true,
|
|
620
701
|
"requiresProject": true,
|
|
621
|
-
"envVariablesSection": {
|
|
622
|
-
"header": "ENVIRONMENT VARIABLES",
|
|
623
|
-
"body": [
|
|
624
|
-
{
|
|
625
|
-
"name": "SF_TARGET_ORG",
|
|
626
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
627
|
-
}
|
|
628
|
-
]
|
|
629
|
-
},
|
|
630
|
-
"errorCodes": {
|
|
631
|
-
"header": "ERROR CODES",
|
|
632
|
-
"body": [
|
|
633
|
-
{
|
|
634
|
-
"name": "Succeeded (0)",
|
|
635
|
-
"description": "Message sent successfully and agent response received."
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
"name": "NotFound (2)",
|
|
639
|
-
"description": "Agent not found, or no preview session exists for this agent."
|
|
640
|
-
},
|
|
641
|
-
{
|
|
642
|
-
"name": "PreviewSendFailed (4)",
|
|
643
|
-
"description": "Failed to send message or receive response from the preview session."
|
|
644
|
-
},
|
|
645
|
-
{
|
|
646
|
-
"name": "SessionAmbiguous (5)",
|
|
647
|
-
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
648
|
-
}
|
|
649
|
-
]
|
|
650
|
-
},
|
|
651
702
|
"isESM": true,
|
|
652
703
|
"relativePath": [
|
|
653
704
|
"lib",
|
|
654
705
|
"commands",
|
|
655
706
|
"agent",
|
|
656
|
-
"
|
|
657
|
-
"
|
|
707
|
+
"generate",
|
|
708
|
+
"authoring-bundle.js"
|
|
658
709
|
],
|
|
659
710
|
"aliasPermutations": [],
|
|
660
711
|
"permutations": [
|
|
661
|
-
"agent:
|
|
662
|
-
"
|
|
663
|
-
"
|
|
664
|
-
"agent:
|
|
665
|
-
"
|
|
666
|
-
"
|
|
712
|
+
"agent:generate:authoring-bundle",
|
|
713
|
+
"generate:agent:authoring-bundle",
|
|
714
|
+
"generate:authoring-bundle:agent",
|
|
715
|
+
"agent:authoring-bundle:generate",
|
|
716
|
+
"authoring-bundle:agent:generate",
|
|
717
|
+
"authoring-bundle:generate:agent"
|
|
667
718
|
]
|
|
668
719
|
},
|
|
669
|
-
"agent:
|
|
720
|
+
"agent:generate:template": {
|
|
670
721
|
"aliases": [],
|
|
671
722
|
"args": {},
|
|
672
|
-
"description": "This command
|
|
723
|
+
"description": "WARNING: This command doesn't work for agents that were created from an Agent Script file. In other words, you can't currently package an agent template for agents that use Agent Script.\n\nAt 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 metadata file for a specific agent (Bot). You then use the BotTemplate metadata file, along with the GenAiPlannerBundle metadata 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 metadata 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 metadata file is generated in the \"botTemplates\" directory in the output directory specified with the --output-dir flag, and has the name <Agent_API_name>\\_v<Version>\\_Template.botTemplate-meta.xml, such as my-package/botTemplates/My_Awesome_Agent_v4_Template.botTemplate-meta.xml. The command displays the full pathname of the generated files when it completes.\n\nSee \"Develop and Package Agent Templates Using Scratch Orgs\" (https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/dev2gp_package_agent_templates.htm) for details about the complete process, which includes using a scratch org to create and test the agent, retrieving the agent metadata to your DX project, running this command to create the agent template, and then packaging the template.",
|
|
673
724
|
"examples": [
|
|
674
|
-
"
|
|
725
|
+
"Generate an agent template from the My_Awesome_Agent Bot metadata file in your DX project and save the BotTemplate and GenAiPlannerBundle to the specified directory; use version 1 of the agent. The agent that the template is based on is in the org with alias \"my-scratch-org\":\n<%= config.bin %> <%= command.id %> --agent-file force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1 --output-dir my-package --source-org my-scratch-org"
|
|
675
726
|
],
|
|
676
727
|
"flags": {
|
|
677
728
|
"json": {
|
|
@@ -688,53 +739,155 @@
|
|
|
688
739
|
"hasDynamicHelp": false,
|
|
689
740
|
"multiple": false,
|
|
690
741
|
"type": "option"
|
|
742
|
+
},
|
|
743
|
+
"api-version": {
|
|
744
|
+
"description": "Override the api version used for api requests made by this command",
|
|
745
|
+
"name": "api-version",
|
|
746
|
+
"hasDynamicHelp": false,
|
|
747
|
+
"multiple": false,
|
|
748
|
+
"type": "option"
|
|
749
|
+
},
|
|
750
|
+
"source-org": {
|
|
751
|
+
"char": "s",
|
|
752
|
+
"name": "source-org",
|
|
753
|
+
"noCacheDefault": true,
|
|
754
|
+
"required": true,
|
|
755
|
+
"summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
|
|
756
|
+
"hasDynamicHelp": true,
|
|
757
|
+
"multiple": false,
|
|
758
|
+
"type": "option"
|
|
759
|
+
},
|
|
760
|
+
"agent-version": {
|
|
761
|
+
"name": "agent-version",
|
|
762
|
+
"required": true,
|
|
763
|
+
"summary": "Version of the agent (BotVersion).",
|
|
764
|
+
"hasDynamicHelp": false,
|
|
765
|
+
"multiple": false,
|
|
766
|
+
"type": "option"
|
|
767
|
+
},
|
|
768
|
+
"agent-file": {
|
|
769
|
+
"char": "f",
|
|
770
|
+
"name": "agent-file",
|
|
771
|
+
"required": true,
|
|
772
|
+
"summary": "Path to an agent (Bot) metadata file.",
|
|
773
|
+
"hasDynamicHelp": false,
|
|
774
|
+
"multiple": false,
|
|
775
|
+
"type": "option"
|
|
776
|
+
},
|
|
777
|
+
"output-dir": {
|
|
778
|
+
"char": "r",
|
|
779
|
+
"name": "output-dir",
|
|
780
|
+
"summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
|
|
781
|
+
"hasDynamicHelp": false,
|
|
782
|
+
"multiple": false,
|
|
783
|
+
"type": "option"
|
|
691
784
|
}
|
|
692
785
|
},
|
|
693
|
-
"hasDynamicHelp":
|
|
786
|
+
"hasDynamicHelp": true,
|
|
694
787
|
"hiddenAliases": [],
|
|
695
|
-
"id": "agent:
|
|
788
|
+
"id": "agent:generate:template",
|
|
696
789
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
697
790
|
"pluginName": "@salesforce/plugin-agent",
|
|
698
791
|
"pluginType": "core",
|
|
699
792
|
"strict": true,
|
|
700
|
-
"summary": "
|
|
793
|
+
"summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a second-generation managed package.",
|
|
701
794
|
"enableJsonFlag": true,
|
|
702
795
|
"requiresProject": true,
|
|
703
|
-
"
|
|
704
|
-
|
|
705
|
-
"
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
796
|
+
"isESM": true,
|
|
797
|
+
"relativePath": [
|
|
798
|
+
"lib",
|
|
799
|
+
"commands",
|
|
800
|
+
"agent",
|
|
801
|
+
"generate",
|
|
802
|
+
"template.js"
|
|
803
|
+
],
|
|
804
|
+
"aliasPermutations": [],
|
|
805
|
+
"permutations": [
|
|
806
|
+
"agent:generate:template",
|
|
807
|
+
"generate:agent:template",
|
|
808
|
+
"generate:template:agent",
|
|
809
|
+
"agent:template:generate",
|
|
810
|
+
"template:agent:generate",
|
|
811
|
+
"template:generate:agent"
|
|
812
|
+
]
|
|
813
|
+
},
|
|
814
|
+
"agent:generate:test-spec": {
|
|
815
|
+
"aliases": [],
|
|
816
|
+
"args": {},
|
|
817
|
+
"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\nYou can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual information.\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.",
|
|
818
|
+
"examples": [
|
|
819
|
+
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
820
|
+
"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",
|
|
821
|
+
"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"
|
|
822
|
+
],
|
|
823
|
+
"flags": {
|
|
824
|
+
"flags-dir": {
|
|
825
|
+
"helpGroup": "GLOBAL",
|
|
826
|
+
"name": "flags-dir",
|
|
827
|
+
"summary": "Import flag values from a directory.",
|
|
828
|
+
"hasDynamicHelp": false,
|
|
829
|
+
"multiple": false,
|
|
830
|
+
"type": "option"
|
|
831
|
+
},
|
|
832
|
+
"from-definition": {
|
|
833
|
+
"char": "d",
|
|
834
|
+
"name": "from-definition",
|
|
835
|
+
"summary": "Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
|
|
836
|
+
"hasDynamicHelp": false,
|
|
837
|
+
"multiple": false,
|
|
838
|
+
"type": "option"
|
|
839
|
+
},
|
|
840
|
+
"force-overwrite": {
|
|
841
|
+
"name": "force-overwrite",
|
|
842
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
|
|
843
|
+
"allowNo": false,
|
|
844
|
+
"type": "boolean"
|
|
845
|
+
},
|
|
846
|
+
"output-file": {
|
|
847
|
+
"char": "f",
|
|
848
|
+
"name": "output-file",
|
|
849
|
+
"summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\".",
|
|
850
|
+
"hasDynamicHelp": false,
|
|
851
|
+
"multiple": false,
|
|
852
|
+
"type": "option"
|
|
853
|
+
}
|
|
711
854
|
},
|
|
855
|
+
"hasDynamicHelp": false,
|
|
856
|
+
"hiddenAliases": [],
|
|
857
|
+
"id": "agent:generate:test-spec",
|
|
858
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
859
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
860
|
+
"pluginType": "core",
|
|
861
|
+
"strict": true,
|
|
862
|
+
"summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
|
|
863
|
+
"enableJsonFlag": false,
|
|
712
864
|
"isESM": true,
|
|
713
865
|
"relativePath": [
|
|
714
866
|
"lib",
|
|
715
867
|
"commands",
|
|
716
868
|
"agent",
|
|
717
|
-
"
|
|
718
|
-
"
|
|
869
|
+
"generate",
|
|
870
|
+
"test-spec.js"
|
|
719
871
|
],
|
|
720
872
|
"aliasPermutations": [],
|
|
721
873
|
"permutations": [
|
|
722
|
-
"agent:
|
|
723
|
-
"
|
|
724
|
-
"
|
|
725
|
-
"agent:
|
|
726
|
-
"
|
|
727
|
-
"
|
|
874
|
+
"agent:generate:test-spec",
|
|
875
|
+
"generate:agent:test-spec",
|
|
876
|
+
"generate:test-spec:agent",
|
|
877
|
+
"agent:test-spec:generate",
|
|
878
|
+
"test-spec:agent:generate",
|
|
879
|
+
"test-spec:generate:agent"
|
|
728
880
|
]
|
|
729
881
|
},
|
|
730
|
-
"agent:
|
|
882
|
+
"agent:publish:authoring-bundle": {
|
|
731
883
|
"aliases": [],
|
|
732
884
|
"args": {},
|
|
733
|
-
"description": "
|
|
885
|
+
"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.",
|
|
734
886
|
"examples": [
|
|
735
|
-
"
|
|
736
|
-
"
|
|
737
|
-
"
|
|
887
|
+
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
888
|
+
"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",
|
|
889
|
+
"Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
|
|
890
|
+
"Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
|
|
738
891
|
],
|
|
739
892
|
"flags": {
|
|
740
893
|
"json": {
|
|
@@ -772,120 +925,92 @@
|
|
|
772
925
|
"api-name": {
|
|
773
926
|
"char": "n",
|
|
774
927
|
"name": "api-name",
|
|
775
|
-
"summary": "API name of the
|
|
928
|
+
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
776
929
|
"hasDynamicHelp": false,
|
|
777
930
|
"multiple": false,
|
|
778
931
|
"type": "option"
|
|
779
932
|
},
|
|
780
|
-
"
|
|
781
|
-
"name": "
|
|
782
|
-
"summary": "
|
|
783
|
-
"
|
|
784
|
-
"
|
|
785
|
-
"type": "option"
|
|
933
|
+
"skip-retrieve": {
|
|
934
|
+
"name": "skip-retrieve",
|
|
935
|
+
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
936
|
+
"allowNo": false,
|
|
937
|
+
"type": "boolean"
|
|
786
938
|
},
|
|
787
|
-
"
|
|
939
|
+
"verbose": {
|
|
940
|
+
"char": "v",
|
|
788
941
|
"exclusive": [
|
|
789
|
-
"
|
|
942
|
+
"concise"
|
|
790
943
|
],
|
|
791
|
-
"name": "
|
|
792
|
-
"summary": "
|
|
944
|
+
"name": "verbose",
|
|
945
|
+
"summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
|
|
793
946
|
"allowNo": false,
|
|
794
947
|
"type": "boolean"
|
|
795
948
|
},
|
|
796
|
-
"
|
|
949
|
+
"concise": {
|
|
797
950
|
"exclusive": [
|
|
798
|
-
"
|
|
951
|
+
"verbose"
|
|
799
952
|
],
|
|
800
|
-
"name": "
|
|
801
|
-
"summary": "
|
|
953
|
+
"name": "concise",
|
|
954
|
+
"summary": "Display minimal output with only essential information about the publish operation.",
|
|
802
955
|
"allowNo": false,
|
|
803
956
|
"type": "boolean"
|
|
804
|
-
},
|
|
805
|
-
"agent-json": {
|
|
806
|
-
"dependsOn": [
|
|
807
|
-
"authoring-bundle"
|
|
808
|
-
],
|
|
809
|
-
"hidden": true,
|
|
810
|
-
"name": "agent-json",
|
|
811
|
-
"summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
|
|
812
|
-
"hasDynamicHelp": false,
|
|
813
|
-
"multiple": false,
|
|
814
|
-
"type": "option"
|
|
815
957
|
}
|
|
816
958
|
},
|
|
817
959
|
"hasDynamicHelp": true,
|
|
818
960
|
"hiddenAliases": [],
|
|
819
|
-
"id": "agent:
|
|
961
|
+
"id": "agent:publish:authoring-bundle",
|
|
820
962
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
821
963
|
"pluginName": "@salesforce/plugin-agent",
|
|
822
964
|
"pluginType": "core",
|
|
823
965
|
"strict": true,
|
|
824
|
-
"summary": "
|
|
966
|
+
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
825
967
|
"enableJsonFlag": true,
|
|
826
968
|
"requiresProject": true,
|
|
827
|
-
"envVariablesSection": {
|
|
828
|
-
"header": "ENVIRONMENT VARIABLES",
|
|
829
|
-
"body": [
|
|
830
|
-
{
|
|
831
|
-
"name": "SF_TARGET_ORG",
|
|
832
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
833
|
-
}
|
|
834
|
-
]
|
|
835
|
-
},
|
|
836
969
|
"errorCodes": {
|
|
837
970
|
"header": "ERROR CODES",
|
|
838
971
|
"body": [
|
|
839
972
|
{
|
|
840
973
|
"name": "Succeeded (0)",
|
|
841
|
-
"description": "
|
|
974
|
+
"description": "Agent published successfully without errors."
|
|
842
975
|
},
|
|
843
976
|
{
|
|
844
977
|
"name": "Failed (1)",
|
|
845
|
-
"description": "
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
"name": "NotFound (2)",
|
|
849
|
-
"description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
"name": "ServerError (3)",
|
|
853
|
-
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
"name": "PreviewStartFailed (4)",
|
|
857
|
-
"description": "Preview session failed to start due to API or network errors."
|
|
978
|
+
"description": "Compilation errors found in the Agent Script file."
|
|
858
979
|
}
|
|
859
980
|
]
|
|
860
981
|
},
|
|
982
|
+
"FLAGGABLE_PROMPTS": {
|
|
983
|
+
"api-name": {
|
|
984
|
+
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
985
|
+
"promptMessage": "API name of the authoring bundle to publish"
|
|
986
|
+
}
|
|
987
|
+
},
|
|
861
988
|
"isESM": true,
|
|
862
989
|
"relativePath": [
|
|
863
990
|
"lib",
|
|
864
991
|
"commands",
|
|
865
992
|
"agent",
|
|
866
|
-
"
|
|
867
|
-
"
|
|
993
|
+
"publish",
|
|
994
|
+
"authoring-bundle.js"
|
|
868
995
|
],
|
|
869
996
|
"aliasPermutations": [],
|
|
870
997
|
"permutations": [
|
|
871
|
-
"agent:
|
|
872
|
-
"
|
|
873
|
-
"
|
|
874
|
-
"agent:
|
|
875
|
-
"
|
|
876
|
-
"
|
|
998
|
+
"agent:publish:authoring-bundle",
|
|
999
|
+
"publish:agent:authoring-bundle",
|
|
1000
|
+
"publish:authoring-bundle:agent",
|
|
1001
|
+
"agent:authoring-bundle:publish",
|
|
1002
|
+
"authoring-bundle:agent:publish",
|
|
1003
|
+
"authoring-bundle:publish:agent"
|
|
877
1004
|
]
|
|
878
1005
|
},
|
|
879
|
-
"agent:
|
|
1006
|
+
"agent:test:create": {
|
|
880
1007
|
"aliases": [],
|
|
881
1008
|
"args": {},
|
|
882
|
-
"description": "
|
|
1009
|
+
"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.",
|
|
883
1010
|
"examples": [
|
|
884
|
-
"
|
|
885
|
-
"
|
|
886
|
-
"
|
|
887
|
-
"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\"",
|
|
888
|
-
"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"
|
|
1011
|
+
"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 %>",
|
|
1012
|
+
"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",
|
|
1013
|
+
"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"
|
|
889
1014
|
],
|
|
890
1015
|
"flags": {
|
|
891
1016
|
"json": {
|
|
@@ -903,6 +1028,20 @@
|
|
|
903
1028
|
"multiple": false,
|
|
904
1029
|
"type": "option"
|
|
905
1030
|
},
|
|
1031
|
+
"api-name": {
|
|
1032
|
+
"name": "api-name",
|
|
1033
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1034
|
+
"hasDynamicHelp": false,
|
|
1035
|
+
"multiple": false,
|
|
1036
|
+
"type": "option"
|
|
1037
|
+
},
|
|
1038
|
+
"spec": {
|
|
1039
|
+
"name": "spec",
|
|
1040
|
+
"summary": "Path to the test spec YAML file.",
|
|
1041
|
+
"hasDynamicHelp": false,
|
|
1042
|
+
"multiple": false,
|
|
1043
|
+
"type": "option"
|
|
1044
|
+
},
|
|
906
1045
|
"target-org": {
|
|
907
1046
|
"char": "o",
|
|
908
1047
|
"name": "target-org",
|
|
@@ -920,164 +1059,83 @@
|
|
|
920
1059
|
"multiple": false,
|
|
921
1060
|
"type": "option"
|
|
922
1061
|
},
|
|
923
|
-
"
|
|
924
|
-
"name": "
|
|
925
|
-
"summary": "
|
|
926
|
-
"hasDynamicHelp": false,
|
|
927
|
-
"multiple": false,
|
|
928
|
-
"options": [
|
|
929
|
-
"customer",
|
|
930
|
-
"internal"
|
|
931
|
-
],
|
|
932
|
-
"type": "option"
|
|
933
|
-
},
|
|
934
|
-
"role": {
|
|
935
|
-
"name": "role",
|
|
936
|
-
"summary": "Role of the agent.",
|
|
937
|
-
"hasDynamicHelp": false,
|
|
938
|
-
"multiple": false,
|
|
939
|
-
"type": "option"
|
|
940
|
-
},
|
|
941
|
-
"company-name": {
|
|
942
|
-
"name": "company-name",
|
|
943
|
-
"summary": "Name of your company.",
|
|
944
|
-
"hasDynamicHelp": false,
|
|
945
|
-
"multiple": false,
|
|
946
|
-
"type": "option"
|
|
947
|
-
},
|
|
948
|
-
"company-description": {
|
|
949
|
-
"name": "company-description",
|
|
950
|
-
"summary": "Description of your company.",
|
|
951
|
-
"hasDynamicHelp": false,
|
|
952
|
-
"multiple": false,
|
|
953
|
-
"type": "option"
|
|
954
|
-
},
|
|
955
|
-
"company-website": {
|
|
956
|
-
"name": "company-website",
|
|
957
|
-
"summary": "Website URL of your company.",
|
|
958
|
-
"hasDynamicHelp": false,
|
|
959
|
-
"multiple": false,
|
|
960
|
-
"type": "option"
|
|
961
|
-
},
|
|
962
|
-
"max-topics": {
|
|
963
|
-
"name": "max-topics",
|
|
964
|
-
"summary": "Maximum number of topics to generate in the agent spec; default is 5.",
|
|
965
|
-
"hasDynamicHelp": false,
|
|
966
|
-
"multiple": false,
|
|
967
|
-
"type": "option"
|
|
968
|
-
},
|
|
969
|
-
"agent-user": {
|
|
970
|
-
"name": "agent-user",
|
|
971
|
-
"summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
|
|
972
|
-
"hasDynamicHelp": false,
|
|
973
|
-
"multiple": false,
|
|
974
|
-
"type": "option"
|
|
975
|
-
},
|
|
976
|
-
"enrich-logs": {
|
|
977
|
-
"name": "enrich-logs",
|
|
978
|
-
"summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
|
|
979
|
-
"hasDynamicHelp": false,
|
|
980
|
-
"multiple": false,
|
|
981
|
-
"options": [
|
|
982
|
-
"true",
|
|
983
|
-
"false"
|
|
984
|
-
],
|
|
985
|
-
"type": "option"
|
|
986
|
-
},
|
|
987
|
-
"tone": {
|
|
988
|
-
"name": "tone",
|
|
989
|
-
"summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
|
|
990
|
-
"hasDynamicHelp": false,
|
|
991
|
-
"multiple": false,
|
|
992
|
-
"options": [
|
|
993
|
-
"formal",
|
|
994
|
-
"casual",
|
|
995
|
-
"neutral"
|
|
996
|
-
],
|
|
997
|
-
"type": "option"
|
|
998
|
-
},
|
|
999
|
-
"spec": {
|
|
1000
|
-
"name": "spec",
|
|
1001
|
-
"summary": "Agent spec file, in YAML format, to use as input to the command.",
|
|
1002
|
-
"hasDynamicHelp": false,
|
|
1003
|
-
"multiple": false,
|
|
1004
|
-
"type": "option"
|
|
1005
|
-
},
|
|
1006
|
-
"output-file": {
|
|
1007
|
-
"name": "output-file",
|
|
1008
|
-
"summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
|
|
1009
|
-
"default": "specs/agentSpec.yaml",
|
|
1010
|
-
"hasDynamicHelp": false,
|
|
1011
|
-
"multiple": false,
|
|
1012
|
-
"type": "option"
|
|
1013
|
-
},
|
|
1014
|
-
"full-interview": {
|
|
1015
|
-
"name": "full-interview",
|
|
1016
|
-
"summary": "Prompt for both required and optional flags.",
|
|
1062
|
+
"preview": {
|
|
1063
|
+
"name": "preview",
|
|
1064
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
1017
1065
|
"allowNo": false,
|
|
1018
1066
|
"type": "boolean"
|
|
1019
1067
|
},
|
|
1020
|
-
"prompt-template": {
|
|
1021
|
-
"name": "prompt-template",
|
|
1022
|
-
"summary": "API name of a customized prompt template to use instead of the default prompt template.",
|
|
1023
|
-
"hasDynamicHelp": false,
|
|
1024
|
-
"multiple": false,
|
|
1025
|
-
"type": "option"
|
|
1026
|
-
},
|
|
1027
|
-
"grounding-context": {
|
|
1028
|
-
"dependsOn": [
|
|
1029
|
-
"prompt-template"
|
|
1030
|
-
],
|
|
1031
|
-
"name": "grounding-context",
|
|
1032
|
-
"summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
|
|
1033
|
-
"hasDynamicHelp": false,
|
|
1034
|
-
"multiple": false,
|
|
1035
|
-
"type": "option"
|
|
1036
|
-
},
|
|
1037
1068
|
"force-overwrite": {
|
|
1038
1069
|
"name": "force-overwrite",
|
|
1039
|
-
"summary": "Don't prompt
|
|
1070
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1040
1071
|
"allowNo": false,
|
|
1041
1072
|
"type": "boolean"
|
|
1042
1073
|
}
|
|
1043
1074
|
},
|
|
1044
1075
|
"hasDynamicHelp": true,
|
|
1045
1076
|
"hiddenAliases": [],
|
|
1046
|
-
"id": "agent:
|
|
1077
|
+
"id": "agent:test:create",
|
|
1047
1078
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1048
1079
|
"pluginName": "@salesforce/plugin-agent",
|
|
1049
1080
|
"pluginType": "core",
|
|
1050
1081
|
"strict": true,
|
|
1051
|
-
"summary": "
|
|
1082
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1052
1083
|
"enableJsonFlag": true,
|
|
1053
|
-
"
|
|
1084
|
+
"envVariablesSection": {
|
|
1085
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
1086
|
+
"body": [
|
|
1087
|
+
{
|
|
1088
|
+
"name": "SF_TARGET_ORG",
|
|
1089
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1090
|
+
}
|
|
1091
|
+
]
|
|
1092
|
+
},
|
|
1093
|
+
"errorCodes": {
|
|
1094
|
+
"header": "ERROR CODES",
|
|
1095
|
+
"body": [
|
|
1096
|
+
{
|
|
1097
|
+
"name": "Succeeded (0)",
|
|
1098
|
+
"description": "Test created and deployed successfully."
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "Failed (1)",
|
|
1102
|
+
"description": "Test validation errors or metadata format issues."
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"name": "NotFound (2)",
|
|
1106
|
+
"description": "Test spec file not found or org connection failed."
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"name": "DeploymentFailed (4)",
|
|
1110
|
+
"description": "Deployment failed due to API or network errors."
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
},
|
|
1054
1114
|
"isESM": true,
|
|
1055
1115
|
"relativePath": [
|
|
1056
1116
|
"lib",
|
|
1057
1117
|
"commands",
|
|
1058
1118
|
"agent",
|
|
1059
|
-
"
|
|
1060
|
-
"
|
|
1119
|
+
"test",
|
|
1120
|
+
"create.js"
|
|
1061
1121
|
],
|
|
1062
1122
|
"aliasPermutations": [],
|
|
1063
1123
|
"permutations": [
|
|
1064
|
-
"agent:
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"agent:
|
|
1068
|
-
"
|
|
1069
|
-
"
|
|
1124
|
+
"agent:test:create",
|
|
1125
|
+
"test:agent:create",
|
|
1126
|
+
"test:create:agent",
|
|
1127
|
+
"agent:create:test",
|
|
1128
|
+
"create:agent:test",
|
|
1129
|
+
"create:test:agent"
|
|
1070
1130
|
]
|
|
1071
1131
|
},
|
|
1072
|
-
"agent:
|
|
1132
|
+
"agent:test:list": {
|
|
1073
1133
|
"aliases": [],
|
|
1074
1134
|
"args": {},
|
|
1075
|
-
"description": "
|
|
1135
|
+
"description": "The command outputs a table with the name (API name) of each test along with its unique ID, type ('agentforce-studio' or 'testing-center'), and the date it was created in the org.",
|
|
1076
1136
|
"examples": [
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
1079
|
-
"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\"",
|
|
1080
|
-
"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"
|
|
1137
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1138
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1081
1139
|
],
|
|
1082
1140
|
"flags": {
|
|
1083
1141
|
"json": {
|
|
@@ -1105,91 +1163,71 @@
|
|
|
1105
1163
|
"multiple": false,
|
|
1106
1164
|
"type": "option"
|
|
1107
1165
|
},
|
|
1108
|
-
"api-name": {
|
|
1109
|
-
"name": "api-name",
|
|
1110
|
-
"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.",
|
|
1111
|
-
"hasDynamicHelp": false,
|
|
1112
|
-
"multiple": false,
|
|
1113
|
-
"type": "option"
|
|
1114
|
-
},
|
|
1115
1166
|
"api-version": {
|
|
1116
1167
|
"description": "Override the api version used for api requests made by this command",
|
|
1117
1168
|
"name": "api-version",
|
|
1118
1169
|
"hasDynamicHelp": false,
|
|
1119
1170
|
"multiple": false,
|
|
1120
1171
|
"type": "option"
|
|
1121
|
-
},
|
|
1122
|
-
"spec": {
|
|
1123
|
-
"char": "f",
|
|
1124
|
-
"name": "spec",
|
|
1125
|
-
"summary": "Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.",
|
|
1126
|
-
"hasDynamicHelp": false,
|
|
1127
|
-
"multiple": false,
|
|
1128
|
-
"type": "option"
|
|
1129
|
-
},
|
|
1130
|
-
"no-spec": {
|
|
1131
|
-
"name": "no-spec",
|
|
1132
|
-
"summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
|
|
1133
|
-
"allowNo": false,
|
|
1134
|
-
"type": "boolean"
|
|
1135
|
-
},
|
|
1136
|
-
"output-dir": {
|
|
1137
|
-
"char": "d",
|
|
1138
|
-
"name": "output-dir",
|
|
1139
|
-
"summary": "Directory where the authoring bundle files are generated.",
|
|
1140
|
-
"hasDynamicHelp": false,
|
|
1141
|
-
"multiple": false,
|
|
1142
|
-
"type": "option"
|
|
1143
|
-
},
|
|
1144
|
-
"name": {
|
|
1145
|
-
"char": "n",
|
|
1146
|
-
"name": "name",
|
|
1147
|
-
"summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
|
|
1148
|
-
"hasDynamicHelp": false,
|
|
1149
|
-
"multiple": false,
|
|
1150
|
-
"type": "option"
|
|
1151
|
-
},
|
|
1152
|
-
"force-overwrite": {
|
|
1153
|
-
"name": "force-overwrite",
|
|
1154
|
-
"summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
|
|
1155
|
-
"allowNo": false,
|
|
1156
|
-
"type": "boolean"
|
|
1157
1172
|
}
|
|
1158
1173
|
},
|
|
1159
1174
|
"hasDynamicHelp": true,
|
|
1160
1175
|
"hiddenAliases": [],
|
|
1161
|
-
"id": "agent:
|
|
1176
|
+
"id": "agent:test:list",
|
|
1162
1177
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1163
1178
|
"pluginName": "@salesforce/plugin-agent",
|
|
1164
1179
|
"pluginType": "core",
|
|
1165
1180
|
"strict": true,
|
|
1166
|
-
"summary": "
|
|
1181
|
+
"summary": "List the available agent tests in your org.",
|
|
1167
1182
|
"enableJsonFlag": true,
|
|
1168
|
-
"
|
|
1183
|
+
"envVariablesSection": {
|
|
1184
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
1185
|
+
"body": [
|
|
1186
|
+
{
|
|
1187
|
+
"name": "SF_TARGET_ORG",
|
|
1188
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1189
|
+
}
|
|
1190
|
+
]
|
|
1191
|
+
},
|
|
1192
|
+
"errorCodes": {
|
|
1193
|
+
"header": "ERROR CODES",
|
|
1194
|
+
"body": [
|
|
1195
|
+
{
|
|
1196
|
+
"name": "Succeeded (0)",
|
|
1197
|
+
"description": "Agent tests listed successfully."
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"name": "Failed (4)",
|
|
1201
|
+
"description": "Failed to retrieve agent tests due to API or network errors."
|
|
1202
|
+
}
|
|
1203
|
+
]
|
|
1204
|
+
},
|
|
1169
1205
|
"isESM": true,
|
|
1170
1206
|
"relativePath": [
|
|
1171
1207
|
"lib",
|
|
1172
1208
|
"commands",
|
|
1173
1209
|
"agent",
|
|
1174
|
-
"
|
|
1175
|
-
"
|
|
1210
|
+
"test",
|
|
1211
|
+
"list.js"
|
|
1176
1212
|
],
|
|
1177
1213
|
"aliasPermutations": [],
|
|
1178
1214
|
"permutations": [
|
|
1179
|
-
"agent:
|
|
1180
|
-
"
|
|
1181
|
-
"
|
|
1182
|
-
"agent:
|
|
1183
|
-
"
|
|
1184
|
-
"
|
|
1215
|
+
"agent:test:list",
|
|
1216
|
+
"test:agent:list",
|
|
1217
|
+
"test:list:agent",
|
|
1218
|
+
"agent:list:test",
|
|
1219
|
+
"list:agent:test",
|
|
1220
|
+
"list:test:agent"
|
|
1185
1221
|
]
|
|
1186
1222
|
},
|
|
1187
|
-
"agent:
|
|
1223
|
+
"agent:test:results": {
|
|
1188
1224
|
"aliases": [],
|
|
1189
1225
|
"args": {},
|
|
1190
|
-
"description": "
|
|
1226
|
+
"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.",
|
|
1191
1227
|
"examples": [
|
|
1192
|
-
"
|
|
1228
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1229
|
+
"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",
|
|
1230
|
+
"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"
|
|
1193
1231
|
],
|
|
1194
1232
|
"flags": {
|
|
1195
1233
|
"json": {
|
|
@@ -1207,154 +1245,136 @@
|
|
|
1207
1245
|
"multiple": false,
|
|
1208
1246
|
"type": "option"
|
|
1209
1247
|
},
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
"name": "
|
|
1213
|
-
"hasDynamicHelp": false,
|
|
1214
|
-
"multiple": false,
|
|
1215
|
-
"type": "option"
|
|
1216
|
-
},
|
|
1217
|
-
"source-org": {
|
|
1218
|
-
"char": "s",
|
|
1219
|
-
"name": "source-org",
|
|
1248
|
+
"target-org": {
|
|
1249
|
+
"char": "o",
|
|
1250
|
+
"name": "target-org",
|
|
1220
1251
|
"noCacheDefault": true,
|
|
1221
1252
|
"required": true,
|
|
1222
|
-
"summary": "Username or alias of the
|
|
1253
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1223
1254
|
"hasDynamicHelp": true,
|
|
1224
1255
|
"multiple": false,
|
|
1225
1256
|
"type": "option"
|
|
1226
1257
|
},
|
|
1227
|
-
"
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
1230
|
-
"summary": "Version of the agent (BotVersion).",
|
|
1258
|
+
"api-version": {
|
|
1259
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1260
|
+
"name": "api-version",
|
|
1231
1261
|
"hasDynamicHelp": false,
|
|
1232
1262
|
"multiple": false,
|
|
1233
1263
|
"type": "option"
|
|
1234
1264
|
},
|
|
1235
|
-
"
|
|
1236
|
-
"char": "
|
|
1237
|
-
"name": "
|
|
1265
|
+
"job-id": {
|
|
1266
|
+
"char": "i",
|
|
1267
|
+
"name": "job-id",
|
|
1238
1268
|
"required": true,
|
|
1239
|
-
"summary": "
|
|
1240
|
-
"hasDynamicHelp": false,
|
|
1241
|
-
"multiple": false,
|
|
1242
|
-
"type": "option"
|
|
1243
|
-
},
|
|
1244
|
-
"output-dir": {
|
|
1245
|
-
"char": "r",
|
|
1246
|
-
"name": "output-dir",
|
|
1247
|
-
"summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
|
|
1248
|
-
"hasDynamicHelp": false,
|
|
1249
|
-
"multiple": false,
|
|
1250
|
-
"type": "option"
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
"hasDynamicHelp": true,
|
|
1254
|
-
"hiddenAliases": [],
|
|
1255
|
-
"id": "agent:generate:template",
|
|
1256
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1257
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1258
|
-
"pluginType": "core",
|
|
1259
|
-
"strict": true,
|
|
1260
|
-
"summary": "Generate an agent template from an existing agent in your DX project so you can then package the template in a second-generation managed package.",
|
|
1261
|
-
"enableJsonFlag": true,
|
|
1262
|
-
"requiresProject": true,
|
|
1263
|
-
"isESM": true,
|
|
1264
|
-
"relativePath": [
|
|
1265
|
-
"lib",
|
|
1266
|
-
"commands",
|
|
1267
|
-
"agent",
|
|
1268
|
-
"generate",
|
|
1269
|
-
"template.js"
|
|
1270
|
-
],
|
|
1271
|
-
"aliasPermutations": [],
|
|
1272
|
-
"permutations": [
|
|
1273
|
-
"agent:generate:template",
|
|
1274
|
-
"generate:agent:template",
|
|
1275
|
-
"generate:template:agent",
|
|
1276
|
-
"agent:template:generate",
|
|
1277
|
-
"template:agent:generate",
|
|
1278
|
-
"template:generate:agent"
|
|
1279
|
-
]
|
|
1280
|
-
},
|
|
1281
|
-
"agent:generate:test-spec": {
|
|
1282
|
-
"aliases": [],
|
|
1283
|
-
"args": {},
|
|
1284
|
-
"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\nYou can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual information.\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.",
|
|
1285
|
-
"examples": [
|
|
1286
|
-
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
1287
|
-
"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",
|
|
1288
|
-
"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"
|
|
1289
|
-
],
|
|
1290
|
-
"flags": {
|
|
1291
|
-
"flags-dir": {
|
|
1292
|
-
"helpGroup": "GLOBAL",
|
|
1293
|
-
"name": "flags-dir",
|
|
1294
|
-
"summary": "Import flag values from a directory.",
|
|
1269
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1295
1270
|
"hasDynamicHelp": false,
|
|
1296
1271
|
"multiple": false,
|
|
1297
1272
|
"type": "option"
|
|
1298
1273
|
},
|
|
1299
|
-
"
|
|
1300
|
-
"
|
|
1301
|
-
"
|
|
1302
|
-
"
|
|
1274
|
+
"result-format": {
|
|
1275
|
+
"name": "result-format",
|
|
1276
|
+
"summary": "Format of the agent test run results.",
|
|
1277
|
+
"default": "human",
|
|
1303
1278
|
"hasDynamicHelp": false,
|
|
1304
1279
|
"multiple": false,
|
|
1280
|
+
"options": [
|
|
1281
|
+
"json",
|
|
1282
|
+
"human",
|
|
1283
|
+
"junit",
|
|
1284
|
+
"tap"
|
|
1285
|
+
],
|
|
1305
1286
|
"type": "option"
|
|
1306
1287
|
},
|
|
1307
|
-
"
|
|
1308
|
-
"
|
|
1309
|
-
"
|
|
1310
|
-
"
|
|
1311
|
-
"
|
|
1288
|
+
"output-dir": {
|
|
1289
|
+
"char": "d",
|
|
1290
|
+
"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.",
|
|
1291
|
+
"name": "output-dir",
|
|
1292
|
+
"summary": "Directory to write the agent test results into.",
|
|
1293
|
+
"hasDynamicHelp": false,
|
|
1294
|
+
"multiple": false,
|
|
1295
|
+
"type": "option"
|
|
1312
1296
|
},
|
|
1313
|
-
"
|
|
1314
|
-
"
|
|
1315
|
-
"name": "
|
|
1316
|
-
"summary": "
|
|
1297
|
+
"test-runner": {
|
|
1298
|
+
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
1299
|
+
"name": "test-runner",
|
|
1300
|
+
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1317
1301
|
"hasDynamicHelp": false,
|
|
1318
1302
|
"multiple": false,
|
|
1303
|
+
"options": [
|
|
1304
|
+
"agentforce-studio",
|
|
1305
|
+
"testing-center"
|
|
1306
|
+
],
|
|
1319
1307
|
"type": "option"
|
|
1308
|
+
},
|
|
1309
|
+
"verbose": {
|
|
1310
|
+
"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.",
|
|
1311
|
+
"name": "verbose",
|
|
1312
|
+
"summary": "Show generated data in the test results output.",
|
|
1313
|
+
"allowNo": false,
|
|
1314
|
+
"type": "boolean"
|
|
1320
1315
|
}
|
|
1321
1316
|
},
|
|
1322
|
-
"hasDynamicHelp":
|
|
1317
|
+
"hasDynamicHelp": true,
|
|
1323
1318
|
"hiddenAliases": [],
|
|
1324
|
-
"id": "agent:
|
|
1319
|
+
"id": "agent:test:results",
|
|
1325
1320
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1326
1321
|
"pluginName": "@salesforce/plugin-agent",
|
|
1327
1322
|
"pluginType": "core",
|
|
1328
1323
|
"strict": true,
|
|
1329
|
-
"summary": "
|
|
1330
|
-
"enableJsonFlag":
|
|
1324
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1325
|
+
"enableJsonFlag": true,
|
|
1326
|
+
"envVariablesSection": {
|
|
1327
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
1328
|
+
"body": [
|
|
1329
|
+
{
|
|
1330
|
+
"name": "SF_TARGET_ORG",
|
|
1331
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1332
|
+
}
|
|
1333
|
+
]
|
|
1334
|
+
},
|
|
1335
|
+
"errorCodes": {
|
|
1336
|
+
"header": "ERROR CODES",
|
|
1337
|
+
"body": [
|
|
1338
|
+
{
|
|
1339
|
+
"name": "Succeeded (0)",
|
|
1340
|
+
"description": "Results retrieved successfully. Test results (passed/failed) are in the output."
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"name": "NotFound (2)",
|
|
1344
|
+
"description": "Job ID not found or invalid."
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"name": "Failed (4)",
|
|
1348
|
+
"description": "Failed to retrieve results due to API or network errors."
|
|
1349
|
+
}
|
|
1350
|
+
]
|
|
1351
|
+
},
|
|
1331
1352
|
"isESM": true,
|
|
1332
1353
|
"relativePath": [
|
|
1333
1354
|
"lib",
|
|
1334
1355
|
"commands",
|
|
1335
1356
|
"agent",
|
|
1336
|
-
"
|
|
1337
|
-
"
|
|
1357
|
+
"test",
|
|
1358
|
+
"results.js"
|
|
1338
1359
|
],
|
|
1339
1360
|
"aliasPermutations": [],
|
|
1340
1361
|
"permutations": [
|
|
1341
|
-
"agent:
|
|
1342
|
-
"
|
|
1343
|
-
"
|
|
1344
|
-
"agent:test
|
|
1345
|
-
"
|
|
1346
|
-
"test
|
|
1362
|
+
"agent:test:results",
|
|
1363
|
+
"test:agent:results",
|
|
1364
|
+
"test:results:agent",
|
|
1365
|
+
"agent:results:test",
|
|
1366
|
+
"results:agent:test",
|
|
1367
|
+
"results:test:agent"
|
|
1347
1368
|
]
|
|
1348
1369
|
},
|
|
1349
|
-
"agent:
|
|
1370
|
+
"agent:test:resume": {
|
|
1350
1371
|
"aliases": [],
|
|
1351
1372
|
"args": {},
|
|
1352
|
-
"description": "
|
|
1373
|
+
"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.",
|
|
1353
1374
|
"examples": [
|
|
1354
|
-
"
|
|
1355
|
-
"
|
|
1356
|
-
"
|
|
1357
|
-
"Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
|
|
1375
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1376
|
+
"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",
|
|
1377
|
+
"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"
|
|
1358
1378
|
],
|
|
1359
1379
|
"flags": {
|
|
1360
1380
|
"json": {
|
|
@@ -1389,95 +1409,141 @@
|
|
|
1389
1409
|
"multiple": false,
|
|
1390
1410
|
"type": "option"
|
|
1391
1411
|
},
|
|
1392
|
-
"
|
|
1393
|
-
"char": "
|
|
1394
|
-
"name": "
|
|
1395
|
-
"summary": "
|
|
1412
|
+
"job-id": {
|
|
1413
|
+
"char": "i",
|
|
1414
|
+
"name": "job-id",
|
|
1415
|
+
"summary": "Job ID of the original agent test run.",
|
|
1396
1416
|
"hasDynamicHelp": false,
|
|
1397
1417
|
"multiple": false,
|
|
1398
1418
|
"type": "option"
|
|
1399
1419
|
},
|
|
1400
|
-
"
|
|
1401
|
-
"
|
|
1402
|
-
"
|
|
1420
|
+
"use-most-recent": {
|
|
1421
|
+
"char": "r",
|
|
1422
|
+
"name": "use-most-recent",
|
|
1423
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1403
1424
|
"allowNo": false,
|
|
1404
1425
|
"type": "boolean"
|
|
1405
1426
|
},
|
|
1406
|
-
"
|
|
1407
|
-
"char": "
|
|
1408
|
-
"
|
|
1409
|
-
|
|
1427
|
+
"wait": {
|
|
1428
|
+
"char": "w",
|
|
1429
|
+
"name": "wait",
|
|
1430
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1431
|
+
"default": "5 minutes",
|
|
1432
|
+
"hasDynamicHelp": true,
|
|
1433
|
+
"multiple": false,
|
|
1434
|
+
"type": "option"
|
|
1435
|
+
},
|
|
1436
|
+
"result-format": {
|
|
1437
|
+
"name": "result-format",
|
|
1438
|
+
"summary": "Format of the agent test run results.",
|
|
1439
|
+
"default": "human",
|
|
1440
|
+
"hasDynamicHelp": false,
|
|
1441
|
+
"multiple": false,
|
|
1442
|
+
"options": [
|
|
1443
|
+
"json",
|
|
1444
|
+
"human",
|
|
1445
|
+
"junit",
|
|
1446
|
+
"tap"
|
|
1410
1447
|
],
|
|
1411
|
-
"
|
|
1412
|
-
"summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
|
|
1413
|
-
"allowNo": false,
|
|
1414
|
-
"type": "boolean"
|
|
1448
|
+
"type": "option"
|
|
1415
1449
|
},
|
|
1416
|
-
"
|
|
1417
|
-
"
|
|
1418
|
-
|
|
1450
|
+
"output-dir": {
|
|
1451
|
+
"char": "d",
|
|
1452
|
+
"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.",
|
|
1453
|
+
"name": "output-dir",
|
|
1454
|
+
"summary": "Directory to write the agent test results into.",
|
|
1455
|
+
"hasDynamicHelp": false,
|
|
1456
|
+
"multiple": false,
|
|
1457
|
+
"type": "option"
|
|
1458
|
+
},
|
|
1459
|
+
"test-runner": {
|
|
1460
|
+
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
1461
|
+
"name": "test-runner",
|
|
1462
|
+
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1463
|
+
"hasDynamicHelp": false,
|
|
1464
|
+
"multiple": false,
|
|
1465
|
+
"options": [
|
|
1466
|
+
"agentforce-studio",
|
|
1467
|
+
"testing-center"
|
|
1419
1468
|
],
|
|
1420
|
-
"
|
|
1421
|
-
|
|
1469
|
+
"type": "option"
|
|
1470
|
+
},
|
|
1471
|
+
"verbose": {
|
|
1472
|
+
"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.",
|
|
1473
|
+
"name": "verbose",
|
|
1474
|
+
"summary": "Show generated data in the test results output.",
|
|
1422
1475
|
"allowNo": false,
|
|
1423
1476
|
"type": "boolean"
|
|
1424
1477
|
}
|
|
1425
1478
|
},
|
|
1426
1479
|
"hasDynamicHelp": true,
|
|
1427
1480
|
"hiddenAliases": [],
|
|
1428
|
-
"id": "agent:
|
|
1481
|
+
"id": "agent:test:resume",
|
|
1429
1482
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1430
1483
|
"pluginName": "@salesforce/plugin-agent",
|
|
1431
1484
|
"pluginType": "core",
|
|
1432
1485
|
"strict": true,
|
|
1433
|
-
"summary": "
|
|
1486
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1434
1487
|
"enableJsonFlag": true,
|
|
1435
|
-
"
|
|
1488
|
+
"envVariablesSection": {
|
|
1489
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
1490
|
+
"body": [
|
|
1491
|
+
{
|
|
1492
|
+
"name": "SF_TARGET_ORG",
|
|
1493
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1494
|
+
}
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1436
1497
|
"errorCodes": {
|
|
1437
1498
|
"header": "ERROR CODES",
|
|
1438
1499
|
"body": [
|
|
1439
1500
|
{
|
|
1440
1501
|
"name": "Succeeded (0)",
|
|
1441
|
-
"description": "
|
|
1502
|
+
"description": "Test completed successfully (with test results in the output)."
|
|
1442
1503
|
},
|
|
1443
1504
|
{
|
|
1444
1505
|
"name": "Failed (1)",
|
|
1445
|
-
"description": "
|
|
1506
|
+
"description": "Tests encountered execution errors (test cases with ERROR status)."
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "NotFound (2)",
|
|
1510
|
+
"description": "Job ID not found or invalid."
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"name": "OperationFailed (4)",
|
|
1514
|
+
"description": "Failed to poll test due to API or network errors."
|
|
1446
1515
|
}
|
|
1447
1516
|
]
|
|
1448
1517
|
},
|
|
1449
|
-
"FLAGGABLE_PROMPTS": {
|
|
1450
|
-
"api-name": {
|
|
1451
|
-
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1452
|
-
"promptMessage": "API name of the authoring bundle to publish"
|
|
1453
|
-
}
|
|
1454
|
-
},
|
|
1455
1518
|
"isESM": true,
|
|
1456
1519
|
"relativePath": [
|
|
1457
1520
|
"lib",
|
|
1458
1521
|
"commands",
|
|
1459
1522
|
"agent",
|
|
1460
|
-
"
|
|
1461
|
-
"
|
|
1523
|
+
"test",
|
|
1524
|
+
"resume.js"
|
|
1462
1525
|
],
|
|
1463
1526
|
"aliasPermutations": [],
|
|
1464
1527
|
"permutations": [
|
|
1465
|
-
"agent:
|
|
1466
|
-
"
|
|
1467
|
-
"
|
|
1468
|
-
"agent:
|
|
1469
|
-
"
|
|
1470
|
-
"
|
|
1528
|
+
"agent:test:resume",
|
|
1529
|
+
"test:agent:resume",
|
|
1530
|
+
"test:resume:agent",
|
|
1531
|
+
"agent:resume:test",
|
|
1532
|
+
"resume:agent:test",
|
|
1533
|
+
"resume:test:agent"
|
|
1471
1534
|
]
|
|
1472
1535
|
},
|
|
1473
|
-
"agent:test:
|
|
1536
|
+
"agent:test:run-eval": {
|
|
1474
1537
|
"aliases": [],
|
|
1475
1538
|
"args": {},
|
|
1476
|
-
"description": "
|
|
1539
|
+
"description": "Execute rich evaluation tests against an Agentforce agent using the Einstein Evaluation API. Supports both YAML test specs (same format as `sf agent generate test-spec`) and JSON payloads.\n\nWhen you provide a YAML test spec, the command automatically translates test cases into Evaluation API calls and infers the agent name from the spec's `subjectName` field. This means you can use the same test spec with both `sf agent test run` and `sf agent test run-eval`. YAML test specs also support contextVariables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.\n\nWhen you provide a JSON payload, it's sent directly to the API with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities.\n\nSupports 8+ evaluator types, including topic routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
|
|
1477
1540
|
"examples": [
|
|
1478
|
-
"
|
|
1479
|
-
"
|
|
1480
|
-
"
|
|
1541
|
+
"Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org",
|
|
1542
|
+
"Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --api-name My_Agent --target-org my-org",
|
|
1543
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1544
|
+
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
1545
|
+
"Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec tests/agent-with-context.yaml --target-org my-org",
|
|
1546
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1481
1547
|
],
|
|
1482
1548
|
"flags": {
|
|
1483
1549
|
"json": {
|
|
@@ -1495,20 +1561,6 @@
|
|
|
1495
1561
|
"multiple": false,
|
|
1496
1562
|
"type": "option"
|
|
1497
1563
|
},
|
|
1498
|
-
"api-name": {
|
|
1499
|
-
"name": "api-name",
|
|
1500
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1501
|
-
"hasDynamicHelp": false,
|
|
1502
|
-
"multiple": false,
|
|
1503
|
-
"type": "option"
|
|
1504
|
-
},
|
|
1505
|
-
"spec": {
|
|
1506
|
-
"name": "spec",
|
|
1507
|
-
"summary": "Path to the test spec YAML file.",
|
|
1508
|
-
"hasDynamicHelp": false,
|
|
1509
|
-
"multiple": false,
|
|
1510
|
-
"type": "option"
|
|
1511
|
-
},
|
|
1512
1564
|
"target-org": {
|
|
1513
1565
|
"char": "o",
|
|
1514
1566
|
"name": "target-org",
|
|
@@ -1526,27 +1578,60 @@
|
|
|
1526
1578
|
"multiple": false,
|
|
1527
1579
|
"type": "option"
|
|
1528
1580
|
},
|
|
1529
|
-
"
|
|
1530
|
-
"
|
|
1531
|
-
"
|
|
1532
|
-
"
|
|
1533
|
-
"
|
|
1581
|
+
"spec": {
|
|
1582
|
+
"char": "s",
|
|
1583
|
+
"name": "spec",
|
|
1584
|
+
"required": true,
|
|
1585
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1586
|
+
"hasDynamicHelp": false,
|
|
1587
|
+
"multiple": false,
|
|
1588
|
+
"type": "option"
|
|
1534
1589
|
},
|
|
1535
|
-
"
|
|
1536
|
-
"
|
|
1537
|
-
"
|
|
1590
|
+
"api-name": {
|
|
1591
|
+
"char": "n",
|
|
1592
|
+
"name": "api-name",
|
|
1593
|
+
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1594
|
+
"hasDynamicHelp": false,
|
|
1595
|
+
"multiple": false,
|
|
1596
|
+
"type": "option"
|
|
1597
|
+
},
|
|
1598
|
+
"result-format": {
|
|
1599
|
+
"name": "result-format",
|
|
1600
|
+
"summary": "Format of the agent test run results.",
|
|
1601
|
+
"default": "human",
|
|
1602
|
+
"hasDynamicHelp": false,
|
|
1603
|
+
"multiple": false,
|
|
1604
|
+
"options": [
|
|
1605
|
+
"json",
|
|
1606
|
+
"human",
|
|
1607
|
+
"junit",
|
|
1608
|
+
"tap"
|
|
1609
|
+
],
|
|
1610
|
+
"type": "option"
|
|
1611
|
+
},
|
|
1612
|
+
"batch-size": {
|
|
1613
|
+
"name": "batch-size",
|
|
1614
|
+
"summary": "Number of tests per API request (max 5).",
|
|
1615
|
+
"default": 5,
|
|
1616
|
+
"hasDynamicHelp": false,
|
|
1617
|
+
"multiple": false,
|
|
1618
|
+
"type": "option"
|
|
1619
|
+
},
|
|
1620
|
+
"no-normalize": {
|
|
1621
|
+
"name": "no-normalize",
|
|
1622
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1538
1623
|
"allowNo": false,
|
|
1539
1624
|
"type": "boolean"
|
|
1540
1625
|
}
|
|
1541
1626
|
},
|
|
1542
1627
|
"hasDynamicHelp": true,
|
|
1543
1628
|
"hiddenAliases": [],
|
|
1544
|
-
"id": "agent:test:
|
|
1629
|
+
"id": "agent:test:run-eval",
|
|
1545
1630
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1546
1631
|
"pluginName": "@salesforce/plugin-agent",
|
|
1547
1632
|
"pluginType": "core",
|
|
1548
1633
|
"strict": true,
|
|
1549
|
-
"summary": "
|
|
1634
|
+
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
1550
1635
|
"enableJsonFlag": true,
|
|
1551
1636
|
"envVariablesSection": {
|
|
1552
1637
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1562,19 +1647,19 @@
|
|
|
1562
1647
|
"body": [
|
|
1563
1648
|
{
|
|
1564
1649
|
"name": "Succeeded (0)",
|
|
1565
|
-
"description": "Test
|
|
1650
|
+
"description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
|
|
1566
1651
|
},
|
|
1567
1652
|
{
|
|
1568
1653
|
"name": "Failed (1)",
|
|
1569
|
-
"description": "
|
|
1654
|
+
"description": "Tests encountered execution errors (tests couldn't run properly)."
|
|
1570
1655
|
},
|
|
1571
1656
|
{
|
|
1572
1657
|
"name": "NotFound (2)",
|
|
1573
|
-
"description": "
|
|
1658
|
+
"description": "Agent not found, spec file not found, or invalid agent name."
|
|
1574
1659
|
},
|
|
1575
1660
|
{
|
|
1576
|
-
"name": "
|
|
1577
|
-
"description": "
|
|
1661
|
+
"name": "OperationFailed (4)",
|
|
1662
|
+
"description": "Failed to execute tests due to API or network errors."
|
|
1578
1663
|
}
|
|
1579
1664
|
]
|
|
1580
1665
|
},
|
|
@@ -1584,25 +1669,26 @@
|
|
|
1584
1669
|
"commands",
|
|
1585
1670
|
"agent",
|
|
1586
1671
|
"test",
|
|
1587
|
-
"
|
|
1672
|
+
"run-eval.js"
|
|
1588
1673
|
],
|
|
1589
1674
|
"aliasPermutations": [],
|
|
1590
1675
|
"permutations": [
|
|
1591
|
-
"agent:test:
|
|
1592
|
-
"test:agent:
|
|
1593
|
-
"test:
|
|
1594
|
-
"agent:
|
|
1595
|
-
"
|
|
1596
|
-
"
|
|
1676
|
+
"agent:test:run-eval",
|
|
1677
|
+
"test:agent:run-eval",
|
|
1678
|
+
"test:run-eval:agent",
|
|
1679
|
+
"agent:run-eval:test",
|
|
1680
|
+
"run-eval:agent:test",
|
|
1681
|
+
"run-eval:test:agent"
|
|
1597
1682
|
]
|
|
1598
1683
|
},
|
|
1599
|
-
"agent:test:
|
|
1684
|
+
"agent:test:run": {
|
|
1600
1685
|
"aliases": [],
|
|
1601
1686
|
"args": {},
|
|
1602
|
-
"description": "
|
|
1687
|
+
"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.",
|
|
1603
1688
|
"examples": [
|
|
1604
|
-
"
|
|
1605
|
-
"
|
|
1689
|
+
"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",
|
|
1690
|
+
"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",
|
|
1691
|
+
"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"
|
|
1606
1692
|
],
|
|
1607
1693
|
"flags": {
|
|
1608
1694
|
"json": {
|
|
@@ -1636,16 +1722,74 @@
|
|
|
1636
1722
|
"hasDynamicHelp": false,
|
|
1637
1723
|
"multiple": false,
|
|
1638
1724
|
"type": "option"
|
|
1725
|
+
},
|
|
1726
|
+
"api-name": {
|
|
1727
|
+
"char": "n",
|
|
1728
|
+
"name": "api-name",
|
|
1729
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
1730
|
+
"hasDynamicHelp": false,
|
|
1731
|
+
"multiple": false,
|
|
1732
|
+
"type": "option"
|
|
1733
|
+
},
|
|
1734
|
+
"wait": {
|
|
1735
|
+
"char": "w",
|
|
1736
|
+
"name": "wait",
|
|
1737
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1738
|
+
"hasDynamicHelp": true,
|
|
1739
|
+
"multiple": false,
|
|
1740
|
+
"type": "option"
|
|
1741
|
+
},
|
|
1742
|
+
"result-format": {
|
|
1743
|
+
"name": "result-format",
|
|
1744
|
+
"summary": "Format of the agent test run results.",
|
|
1745
|
+
"default": "human",
|
|
1746
|
+
"hasDynamicHelp": false,
|
|
1747
|
+
"multiple": false,
|
|
1748
|
+
"options": [
|
|
1749
|
+
"json",
|
|
1750
|
+
"human",
|
|
1751
|
+
"junit",
|
|
1752
|
+
"tap"
|
|
1753
|
+
],
|
|
1754
|
+
"type": "option"
|
|
1755
|
+
},
|
|
1756
|
+
"output-dir": {
|
|
1757
|
+
"char": "d",
|
|
1758
|
+
"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.",
|
|
1759
|
+
"name": "output-dir",
|
|
1760
|
+
"summary": "Directory to write the agent test results into.",
|
|
1761
|
+
"hasDynamicHelp": false,
|
|
1762
|
+
"multiple": false,
|
|
1763
|
+
"type": "option"
|
|
1764
|
+
},
|
|
1765
|
+
"test-runner": {
|
|
1766
|
+
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
1767
|
+
"name": "test-runner",
|
|
1768
|
+
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1769
|
+
"hasDynamicHelp": false,
|
|
1770
|
+
"multiple": false,
|
|
1771
|
+
"options": [
|
|
1772
|
+
"agentforce-studio",
|
|
1773
|
+
"testing-center"
|
|
1774
|
+
],
|
|
1775
|
+
"type": "option"
|
|
1776
|
+
},
|
|
1777
|
+
"verbose": {
|
|
1778
|
+
"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.",
|
|
1779
|
+
"name": "verbose",
|
|
1780
|
+
"summary": "Show generated data in the test results output.",
|
|
1781
|
+
"allowNo": false,
|
|
1782
|
+
"type": "boolean"
|
|
1639
1783
|
}
|
|
1640
1784
|
},
|
|
1641
1785
|
"hasDynamicHelp": true,
|
|
1642
1786
|
"hiddenAliases": [],
|
|
1643
|
-
"id": "agent:test:
|
|
1787
|
+
"id": "agent:test:run",
|
|
1644
1788
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1645
1789
|
"pluginName": "@salesforce/plugin-agent",
|
|
1646
1790
|
"pluginType": "core",
|
|
1647
1791
|
"strict": true,
|
|
1648
|
-
"summary": "
|
|
1792
|
+
"summary": "Start an agent test in your org.",
|
|
1649
1793
|
"enableJsonFlag": true,
|
|
1650
1794
|
"envVariablesSection": {
|
|
1651
1795
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1661,11 +1805,19 @@
|
|
|
1661
1805
|
"body": [
|
|
1662
1806
|
{
|
|
1663
1807
|
"name": "Succeeded (0)",
|
|
1664
|
-
"description": "
|
|
1808
|
+
"description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
|
|
1665
1809
|
},
|
|
1666
1810
|
{
|
|
1667
|
-
"name": "Failed (
|
|
1668
|
-
"description": "
|
|
1811
|
+
"name": "Failed (1)",
|
|
1812
|
+
"description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
"name": "NotFound (2)",
|
|
1816
|
+
"description": "Test definition not found or invalid test name."
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "OperationFailed (4)",
|
|
1820
|
+
"description": "Failed to start or poll test due to API or network errors."
|
|
1669
1821
|
}
|
|
1670
1822
|
]
|
|
1671
1823
|
},
|
|
@@ -1675,26 +1827,28 @@
|
|
|
1675
1827
|
"commands",
|
|
1676
1828
|
"agent",
|
|
1677
1829
|
"test",
|
|
1678
|
-
"
|
|
1830
|
+
"run.js"
|
|
1679
1831
|
],
|
|
1680
1832
|
"aliasPermutations": [],
|
|
1681
1833
|
"permutations": [
|
|
1682
|
-
"agent:test:
|
|
1683
|
-
"test:agent:
|
|
1684
|
-
"test:
|
|
1685
|
-
"agent:
|
|
1686
|
-
"
|
|
1687
|
-
"
|
|
1834
|
+
"agent:test:run",
|
|
1835
|
+
"test:agent:run",
|
|
1836
|
+
"test:run:agent",
|
|
1837
|
+
"agent:run:test",
|
|
1838
|
+
"run:agent:test",
|
|
1839
|
+
"run:test:agent"
|
|
1688
1840
|
]
|
|
1689
1841
|
},
|
|
1690
|
-
"agent:
|
|
1842
|
+
"agent:preview:end": {
|
|
1691
1843
|
"aliases": [],
|
|
1692
1844
|
"args": {},
|
|
1693
|
-
"description": "This command
|
|
1845
|
+
"description": "You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then use this command to end it. This command also displays the local directory where the session trace files are stored.\n\nThe original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this command to end the session. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respectively. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.\n\nUse the --all flag to end all active preview sessions at once. You can combine --all with --api-name or --authoring-bundle to end only sessions for a specific agent, or use --all on its own to end every session across all agents in the project.",
|
|
1694
1846
|
"examples": [
|
|
1695
|
-
"
|
|
1696
|
-
"
|
|
1697
|
-
"
|
|
1847
|
+
"End a preview session of a published agent by specifying its session ID and API name; use the default org:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --api-name My_Published_Agent",
|
|
1848
|
+
"Similar to previous example, but don't specify a session ID; you get an error if the published agent has more than one active session. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org",
|
|
1849
|
+
"End a preview session of an agent using its authoring bundle API name; you get an error if the agent has more than one active session.\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent",
|
|
1850
|
+
"End all active preview sessions for a specific agent without prompting:\n<%= config.bin %> <%= command.id %> --all --authoring-bundle My_Local_Agent --target-org <target_org> --no-prompt",
|
|
1851
|
+
"End all active preview sessions across every agent in the local session cache for an org:\n<%= config.bin %> <%= command.id %> --all --target-org <target_org>"
|
|
1698
1852
|
],
|
|
1699
1853
|
"flags": {
|
|
1700
1854
|
"json": {
|
|
@@ -1729,67 +1883,65 @@
|
|
|
1729
1883
|
"multiple": false,
|
|
1730
1884
|
"type": "option"
|
|
1731
1885
|
},
|
|
1732
|
-
"
|
|
1733
|
-
"
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
"
|
|
1886
|
+
"session-id": {
|
|
1887
|
+
"exclusive": [
|
|
1888
|
+
"all"
|
|
1889
|
+
],
|
|
1890
|
+
"name": "session-id",
|
|
1891
|
+
"required": false,
|
|
1892
|
+
"summary": "Session ID outputted by \"agent preview start\". Not required when the agent has exactly one active session. Run \"agent preview sessions\" to see the list of all sessions.",
|
|
1737
1893
|
"hasDynamicHelp": false,
|
|
1738
1894
|
"multiple": false,
|
|
1739
1895
|
"type": "option"
|
|
1740
1896
|
},
|
|
1741
|
-
"
|
|
1742
|
-
"
|
|
1743
|
-
"
|
|
1744
|
-
|
|
1897
|
+
"api-name": {
|
|
1898
|
+
"char": "n",
|
|
1899
|
+
"exclusive": [
|
|
1900
|
+
"authoring-bundle"
|
|
1901
|
+
],
|
|
1902
|
+
"name": "api-name",
|
|
1903
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1745
1904
|
"hasDynamicHelp": false,
|
|
1746
1905
|
"multiple": false,
|
|
1747
|
-
"options": [
|
|
1748
|
-
"json",
|
|
1749
|
-
"human",
|
|
1750
|
-
"junit",
|
|
1751
|
-
"tap"
|
|
1752
|
-
],
|
|
1753
1906
|
"type": "option"
|
|
1754
1907
|
},
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
"
|
|
1908
|
+
"authoring-bundle": {
|
|
1909
|
+
"exclusive": [
|
|
1910
|
+
"api-name"
|
|
1911
|
+
],
|
|
1912
|
+
"name": "authoring-bundle",
|
|
1913
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1760
1914
|
"hasDynamicHelp": false,
|
|
1761
1915
|
"multiple": false,
|
|
1762
1916
|
"type": "option"
|
|
1763
1917
|
},
|
|
1764
|
-
"
|
|
1765
|
-
"
|
|
1766
|
-
|
|
1767
|
-
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1768
|
-
"hasDynamicHelp": false,
|
|
1769
|
-
"multiple": false,
|
|
1770
|
-
"options": [
|
|
1771
|
-
"agentforce-studio",
|
|
1772
|
-
"testing-center"
|
|
1918
|
+
"all": {
|
|
1919
|
+
"exclusive": [
|
|
1920
|
+
"session-id"
|
|
1773
1921
|
],
|
|
1774
|
-
"
|
|
1922
|
+
"name": "all",
|
|
1923
|
+
"summary": "End all active preview sessions. Combine with --api-name or --authoring-bundle to limit to a specific agent, or use with only --target-org to end sessions for all agents found in the local session cache. Requires --target-org.",
|
|
1924
|
+
"allowNo": false,
|
|
1925
|
+
"type": "boolean"
|
|
1775
1926
|
},
|
|
1776
|
-
"
|
|
1777
|
-
"
|
|
1778
|
-
"name": "
|
|
1779
|
-
"summary": "
|
|
1927
|
+
"no-prompt": {
|
|
1928
|
+
"char": "p",
|
|
1929
|
+
"name": "no-prompt",
|
|
1930
|
+
"summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
|
|
1780
1931
|
"allowNo": false,
|
|
1781
1932
|
"type": "boolean"
|
|
1782
1933
|
}
|
|
1783
1934
|
},
|
|
1784
1935
|
"hasDynamicHelp": true,
|
|
1785
1936
|
"hiddenAliases": [],
|
|
1786
|
-
"id": "agent:
|
|
1937
|
+
"id": "agent:preview:end",
|
|
1787
1938
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1788
1939
|
"pluginName": "@salesforce/plugin-agent",
|
|
1789
1940
|
"pluginType": "core",
|
|
1790
1941
|
"strict": true,
|
|
1791
|
-
"summary": "
|
|
1942
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
1792
1943
|
"enableJsonFlag": true,
|
|
1944
|
+
"requiresProject": true,
|
|
1793
1945
|
"envVariablesSection": {
|
|
1794
1946
|
"header": "ENVIRONMENT VARIABLES",
|
|
1795
1947
|
"body": [
|
|
@@ -1804,15 +1956,27 @@
|
|
|
1804
1956
|
"body": [
|
|
1805
1957
|
{
|
|
1806
1958
|
"name": "Succeeded (0)",
|
|
1807
|
-
"description": "
|
|
1959
|
+
"description": "Preview session ended successfully and traces saved."
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
"name": "ExactlyOneRequired (2)",
|
|
1963
|
+
"description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
|
|
1808
1964
|
},
|
|
1809
1965
|
{
|
|
1810
1966
|
"name": "NotFound (2)",
|
|
1811
|
-
"description": "
|
|
1967
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"name": "PreviewEndFailed (4)",
|
|
1971
|
+
"description": "Failed to end the preview session."
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"name": "PreviewEndPartialFailure (68)",
|
|
1975
|
+
"description": "With --all, one or more sessions failed to end while others succeeded."
|
|
1812
1976
|
},
|
|
1813
1977
|
{
|
|
1814
|
-
"name": "
|
|
1815
|
-
"description": "
|
|
1978
|
+
"name": "SessionAmbiguous (5)",
|
|
1979
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
1816
1980
|
}
|
|
1817
1981
|
]
|
|
1818
1982
|
},
|
|
@@ -1821,27 +1985,27 @@
|
|
|
1821
1985
|
"lib",
|
|
1822
1986
|
"commands",
|
|
1823
1987
|
"agent",
|
|
1824
|
-
"
|
|
1825
|
-
"
|
|
1988
|
+
"preview",
|
|
1989
|
+
"end.js"
|
|
1826
1990
|
],
|
|
1827
1991
|
"aliasPermutations": [],
|
|
1828
1992
|
"permutations": [
|
|
1829
|
-
"agent:
|
|
1830
|
-
"
|
|
1831
|
-
"
|
|
1832
|
-
"agent:
|
|
1833
|
-
"
|
|
1834
|
-
"
|
|
1993
|
+
"agent:preview:end",
|
|
1994
|
+
"preview:agent:end",
|
|
1995
|
+
"preview:end:agent",
|
|
1996
|
+
"agent:end:preview",
|
|
1997
|
+
"end:agent:preview",
|
|
1998
|
+
"end:preview:agent"
|
|
1835
1999
|
]
|
|
1836
2000
|
},
|
|
1837
|
-
"agent:
|
|
2001
|
+
"agent:preview:send": {
|
|
1838
2002
|
"aliases": [],
|
|
1839
2003
|
"args": {},
|
|
1840
|
-
"description": "
|
|
2004
|
+
"description": "You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then use this command to send the agent a message (utterance). This command then displays the agent's response.\n\nThe original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this command to send a message. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.",
|
|
1841
2005
|
"examples": [
|
|
1842
|
-
"
|
|
1843
|
-
"
|
|
1844
|
-
"
|
|
2006
|
+
"Send a message to an activated published agent using its API name and session ID; use the default org:\n<%= config.bin %> <%= command.id %> --utterance \"What can you help me with?\" --api-name My_Published_Agent --session-id <SESSION_ID>",
|
|
2007
|
+
"Similar to previous example, but don't specify a session ID; you get an error if the agent has more than one active session. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --utterance \"What can you help me with?\" --api-name My_Published_Agent --target-org my-dev-org",
|
|
2008
|
+
"Send a message to an agent using its authoring bundle API name; you get an error if the agent has more than one active session:\n<%= config.bin %> <%= command.id %> --utterance \"what can you help me with?\" --authoring-bundle My_Local_Agent"
|
|
1845
2009
|
],
|
|
1846
2010
|
"flags": {
|
|
1847
2011
|
"json": {
|
|
@@ -1876,82 +2040,49 @@
|
|
|
1876
2040
|
"multiple": false,
|
|
1877
2041
|
"type": "option"
|
|
1878
2042
|
},
|
|
1879
|
-
"
|
|
1880
|
-
"
|
|
1881
|
-
"
|
|
1882
|
-
"summary": "
|
|
2043
|
+
"session-id": {
|
|
2044
|
+
"name": "session-id",
|
|
2045
|
+
"required": false,
|
|
2046
|
+
"summary": "Session ID outputted by \"agent preview start\". Not required when the agent has exactly one active session. Run \"agent preview sessions\" to see list of all sessions.",
|
|
1883
2047
|
"hasDynamicHelp": false,
|
|
1884
2048
|
"multiple": false,
|
|
1885
2049
|
"type": "option"
|
|
1886
2050
|
},
|
|
1887
|
-
"
|
|
1888
|
-
"char": "
|
|
1889
|
-
"name": "
|
|
1890
|
-
"
|
|
1891
|
-
"
|
|
1892
|
-
"type": "boolean"
|
|
1893
|
-
},
|
|
1894
|
-
"wait": {
|
|
1895
|
-
"char": "w",
|
|
1896
|
-
"name": "wait",
|
|
1897
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1898
|
-
"default": "5 minutes",
|
|
1899
|
-
"hasDynamicHelp": true,
|
|
1900
|
-
"multiple": false,
|
|
1901
|
-
"type": "option"
|
|
1902
|
-
},
|
|
1903
|
-
"result-format": {
|
|
1904
|
-
"name": "result-format",
|
|
1905
|
-
"summary": "Format of the agent test run results.",
|
|
1906
|
-
"default": "human",
|
|
2051
|
+
"utterance": {
|
|
2052
|
+
"char": "u",
|
|
2053
|
+
"name": "utterance",
|
|
2054
|
+
"required": true,
|
|
2055
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1907
2056
|
"hasDynamicHelp": false,
|
|
1908
2057
|
"multiple": false,
|
|
1909
|
-
"options": [
|
|
1910
|
-
"json",
|
|
1911
|
-
"human",
|
|
1912
|
-
"junit",
|
|
1913
|
-
"tap"
|
|
1914
|
-
],
|
|
1915
2058
|
"type": "option"
|
|
1916
2059
|
},
|
|
1917
|
-
"
|
|
1918
|
-
"char": "
|
|
1919
|
-
"
|
|
1920
|
-
"
|
|
1921
|
-
"summary": "Directory to write the agent test results into.",
|
|
2060
|
+
"api-name": {
|
|
2061
|
+
"char": "n",
|
|
2062
|
+
"name": "api-name",
|
|
2063
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1922
2064
|
"hasDynamicHelp": false,
|
|
1923
2065
|
"multiple": false,
|
|
1924
2066
|
"type": "option"
|
|
1925
2067
|
},
|
|
1926
|
-
"
|
|
1927
|
-
"
|
|
1928
|
-
"
|
|
1929
|
-
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
2068
|
+
"authoring-bundle": {
|
|
2069
|
+
"name": "authoring-bundle",
|
|
2070
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1930
2071
|
"hasDynamicHelp": false,
|
|
1931
2072
|
"multiple": false,
|
|
1932
|
-
"options": [
|
|
1933
|
-
"agentforce-studio",
|
|
1934
|
-
"testing-center"
|
|
1935
|
-
],
|
|
1936
2073
|
"type": "option"
|
|
1937
|
-
},
|
|
1938
|
-
"verbose": {
|
|
1939
|
-
"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.",
|
|
1940
|
-
"name": "verbose",
|
|
1941
|
-
"summary": "Show generated data in the test results output.",
|
|
1942
|
-
"allowNo": false,
|
|
1943
|
-
"type": "boolean"
|
|
1944
2074
|
}
|
|
1945
2075
|
},
|
|
1946
2076
|
"hasDynamicHelp": true,
|
|
1947
2077
|
"hiddenAliases": [],
|
|
1948
|
-
"id": "agent:
|
|
2078
|
+
"id": "agent:preview:send",
|
|
1949
2079
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1950
2080
|
"pluginName": "@salesforce/plugin-agent",
|
|
1951
2081
|
"pluginType": "core",
|
|
1952
2082
|
"strict": true,
|
|
1953
|
-
"summary": "
|
|
2083
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
1954
2084
|
"enableJsonFlag": true,
|
|
2085
|
+
"requiresProject": true,
|
|
1955
2086
|
"envVariablesSection": {
|
|
1956
2087
|
"header": "ENVIRONMENT VARIABLES",
|
|
1957
2088
|
"body": [
|
|
@@ -1966,19 +2097,19 @@
|
|
|
1966
2097
|
"body": [
|
|
1967
2098
|
{
|
|
1968
2099
|
"name": "Succeeded (0)",
|
|
1969
|
-
"description": "
|
|
2100
|
+
"description": "Message sent successfully and agent response received."
|
|
1970
2101
|
},
|
|
1971
2102
|
{
|
|
1972
|
-
"name": "
|
|
1973
|
-
"description": "
|
|
2103
|
+
"name": "NotFound (2)",
|
|
2104
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
1974
2105
|
},
|
|
1975
2106
|
{
|
|
1976
|
-
"name": "
|
|
1977
|
-
"description": "
|
|
2107
|
+
"name": "PreviewSendFailed (4)",
|
|
2108
|
+
"description": "Failed to send message or receive response from the preview session."
|
|
1978
2109
|
},
|
|
1979
2110
|
{
|
|
1980
|
-
"name": "
|
|
1981
|
-
"description": "
|
|
2111
|
+
"name": "SessionAmbiguous (5)",
|
|
2112
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
1982
2113
|
}
|
|
1983
2114
|
]
|
|
1984
2115
|
},
|
|
@@ -1987,30 +2118,88 @@
|
|
|
1987
2118
|
"lib",
|
|
1988
2119
|
"commands",
|
|
1989
2120
|
"agent",
|
|
1990
|
-
"
|
|
1991
|
-
"
|
|
2121
|
+
"preview",
|
|
2122
|
+
"send.js"
|
|
1992
2123
|
],
|
|
1993
2124
|
"aliasPermutations": [],
|
|
1994
2125
|
"permutations": [
|
|
1995
|
-
"agent:
|
|
1996
|
-
"
|
|
1997
|
-
"
|
|
1998
|
-
"agent:
|
|
1999
|
-
"
|
|
2000
|
-
"
|
|
2126
|
+
"agent:preview:send",
|
|
2127
|
+
"preview:agent:send",
|
|
2128
|
+
"preview:send:agent",
|
|
2129
|
+
"agent:send:preview",
|
|
2130
|
+
"send:agent:preview",
|
|
2131
|
+
"send:preview:agent"
|
|
2001
2132
|
]
|
|
2002
2133
|
},
|
|
2003
|
-
"agent:
|
|
2134
|
+
"agent:preview:sessions": {
|
|
2004
2135
|
"aliases": [],
|
|
2005
2136
|
"args": {},
|
|
2006
|
-
"description": "
|
|
2137
|
+
"description": "This command lists the agent preview sessions that were started with the \"agent preview start\" command and are still in the local cache. Use this command to discover specific session IDs that you can pass to the \"agent preview send\" or \"agent preview end\" commands with the --session-id flag.\n\nProgrammatic agent preview sessions can be started for both published activated agents and by using an agent's local authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In the table, if the same API name has multiple rows with different session IDs, then it means that you previously started multiple preview sessions with the associated agent.",
|
|
2007
2138
|
"examples": [
|
|
2008
|
-
"
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
"
|
|
2012
|
-
|
|
2013
|
-
|
|
2139
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
2140
|
+
],
|
|
2141
|
+
"flags": {
|
|
2142
|
+
"json": {
|
|
2143
|
+
"description": "Format output as json.",
|
|
2144
|
+
"helpGroup": "GLOBAL",
|
|
2145
|
+
"name": "json",
|
|
2146
|
+
"allowNo": false,
|
|
2147
|
+
"type": "boolean"
|
|
2148
|
+
},
|
|
2149
|
+
"flags-dir": {
|
|
2150
|
+
"helpGroup": "GLOBAL",
|
|
2151
|
+
"name": "flags-dir",
|
|
2152
|
+
"summary": "Import flag values from a directory.",
|
|
2153
|
+
"hasDynamicHelp": false,
|
|
2154
|
+
"multiple": false,
|
|
2155
|
+
"type": "option"
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
"hasDynamicHelp": false,
|
|
2159
|
+
"hiddenAliases": [],
|
|
2160
|
+
"id": "agent:preview:sessions",
|
|
2161
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
2162
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
2163
|
+
"pluginType": "core",
|
|
2164
|
+
"strict": true,
|
|
2165
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
2166
|
+
"enableJsonFlag": true,
|
|
2167
|
+
"requiresProject": true,
|
|
2168
|
+
"errorCodes": {
|
|
2169
|
+
"header": "ERROR CODES",
|
|
2170
|
+
"body": [
|
|
2171
|
+
{
|
|
2172
|
+
"name": "Succeeded (0)",
|
|
2173
|
+
"description": "Sessions listed successfully (or empty list if no active sessions)."
|
|
2174
|
+
}
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
"isESM": true,
|
|
2178
|
+
"relativePath": [
|
|
2179
|
+
"lib",
|
|
2180
|
+
"commands",
|
|
2181
|
+
"agent",
|
|
2182
|
+
"preview",
|
|
2183
|
+
"sessions.js"
|
|
2184
|
+
],
|
|
2185
|
+
"aliasPermutations": [],
|
|
2186
|
+
"permutations": [
|
|
2187
|
+
"agent:preview:sessions",
|
|
2188
|
+
"preview:agent:sessions",
|
|
2189
|
+
"preview:sessions:agent",
|
|
2190
|
+
"agent:sessions:preview",
|
|
2191
|
+
"sessions:agent:preview",
|
|
2192
|
+
"sessions:preview:agent"
|
|
2193
|
+
]
|
|
2194
|
+
},
|
|
2195
|
+
"agent:preview:start": {
|
|
2196
|
+
"aliases": [],
|
|
2197
|
+
"args": {},
|
|
2198
|
+
"description": "This command outputs a session ID that you then use with the \"agent preview send\" command to send an utterance to the agent. Use the \"agent preview sessions\" command to list all active sessions and the \"agent preview end\" command to end a specific session.\n\nIdentify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring bundle's API name or --api-name to specify an activated published agent's API name. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.\n\nWhen starting a preview session with --authoring-bundle, you must explicitly specify the execution mode using one of these flags:\n\n- --use-live-actions: Executes real Apex classes, flows, and other actions in the org. This surfaces compile and validation errors during preview.\n- --simulate-actions: Uses AI to simulate action execution without calling real implementations.\n\nPublished agents (--api-name) always use live actions. The mode flags are optional and have no effect for published agents.",
|
|
2199
|
+
"examples": [
|
|
2200
|
+
"Start a programmatic agent preview session by specifying an authoring bundle; use simulated actions. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org --simulate-actions",
|
|
2201
|
+
"Similar to previous example but use live actions and the default org:\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --use-live-actions",
|
|
2202
|
+
"Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
2014
2203
|
],
|
|
2015
2204
|
"flags": {
|
|
2016
2205
|
"json": {
|
|
@@ -2045,61 +2234,61 @@
|
|
|
2045
2234
|
"multiple": false,
|
|
2046
2235
|
"type": "option"
|
|
2047
2236
|
},
|
|
2048
|
-
"spec": {
|
|
2049
|
-
"char": "s",
|
|
2050
|
-
"name": "spec",
|
|
2051
|
-
"required": true,
|
|
2052
|
-
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
2053
|
-
"hasDynamicHelp": false,
|
|
2054
|
-
"multiple": false,
|
|
2055
|
-
"type": "option"
|
|
2056
|
-
},
|
|
2057
2237
|
"api-name": {
|
|
2058
2238
|
"char": "n",
|
|
2059
2239
|
"name": "api-name",
|
|
2060
|
-
"summary": "
|
|
2240
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
2061
2241
|
"hasDynamicHelp": false,
|
|
2062
2242
|
"multiple": false,
|
|
2063
2243
|
"type": "option"
|
|
2064
2244
|
},
|
|
2065
|
-
"
|
|
2066
|
-
"name": "
|
|
2067
|
-
"summary": "
|
|
2068
|
-
"default": "human",
|
|
2245
|
+
"authoring-bundle": {
|
|
2246
|
+
"name": "authoring-bundle",
|
|
2247
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
2069
2248
|
"hasDynamicHelp": false,
|
|
2070
2249
|
"multiple": false,
|
|
2071
|
-
"options": [
|
|
2072
|
-
"json",
|
|
2073
|
-
"human",
|
|
2074
|
-
"junit",
|
|
2075
|
-
"tap"
|
|
2076
|
-
],
|
|
2077
2250
|
"type": "option"
|
|
2078
2251
|
},
|
|
2079
|
-
"
|
|
2080
|
-
"
|
|
2081
|
-
|
|
2082
|
-
|
|
2252
|
+
"use-live-actions": {
|
|
2253
|
+
"exclusive": [
|
|
2254
|
+
"simulate-actions"
|
|
2255
|
+
],
|
|
2256
|
+
"name": "use-live-actions",
|
|
2257
|
+
"summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
|
|
2258
|
+
"allowNo": false,
|
|
2259
|
+
"type": "boolean"
|
|
2260
|
+
},
|
|
2261
|
+
"simulate-actions": {
|
|
2262
|
+
"exclusive": [
|
|
2263
|
+
"use-live-actions"
|
|
2264
|
+
],
|
|
2265
|
+
"name": "simulate-actions",
|
|
2266
|
+
"summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
|
|
2267
|
+
"allowNo": false,
|
|
2268
|
+
"type": "boolean"
|
|
2269
|
+
},
|
|
2270
|
+
"agent-json": {
|
|
2271
|
+
"dependsOn": [
|
|
2272
|
+
"authoring-bundle"
|
|
2273
|
+
],
|
|
2274
|
+
"hidden": true,
|
|
2275
|
+
"name": "agent-json",
|
|
2276
|
+
"summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
|
|
2083
2277
|
"hasDynamicHelp": false,
|
|
2084
2278
|
"multiple": false,
|
|
2085
2279
|
"type": "option"
|
|
2086
|
-
},
|
|
2087
|
-
"no-normalize": {
|
|
2088
|
-
"name": "no-normalize",
|
|
2089
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
2090
|
-
"allowNo": false,
|
|
2091
|
-
"type": "boolean"
|
|
2092
2280
|
}
|
|
2093
2281
|
},
|
|
2094
2282
|
"hasDynamicHelp": true,
|
|
2095
2283
|
"hiddenAliases": [],
|
|
2096
|
-
"id": "agent:
|
|
2284
|
+
"id": "agent:preview:start",
|
|
2097
2285
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2098
2286
|
"pluginName": "@salesforce/plugin-agent",
|
|
2099
2287
|
"pluginType": "core",
|
|
2100
2288
|
"strict": true,
|
|
2101
|
-
"summary": "
|
|
2289
|
+
"summary": "Start a programmatic agent preview session.",
|
|
2102
2290
|
"enableJsonFlag": true,
|
|
2291
|
+
"requiresProject": true,
|
|
2103
2292
|
"envVariablesSection": {
|
|
2104
2293
|
"header": "ENVIRONMENT VARIABLES",
|
|
2105
2294
|
"body": [
|
|
@@ -2114,19 +2303,23 @@
|
|
|
2114
2303
|
"body": [
|
|
2115
2304
|
{
|
|
2116
2305
|
"name": "Succeeded (0)",
|
|
2117
|
-
"description": "
|
|
2306
|
+
"description": "Preview session started successfully."
|
|
2118
2307
|
},
|
|
2119
2308
|
{
|
|
2120
2309
|
"name": "Failed (1)",
|
|
2121
|
-
"description": "
|
|
2310
|
+
"description": "Agent Script compilation failed (syntax errors in the script)."
|
|
2122
2311
|
},
|
|
2123
2312
|
{
|
|
2124
2313
|
"name": "NotFound (2)",
|
|
2125
|
-
"description": "Agent not found,
|
|
2314
|
+
"description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
|
|
2126
2315
|
},
|
|
2127
2316
|
{
|
|
2128
|
-
"name": "
|
|
2129
|
-
"description": "
|
|
2317
|
+
"name": "ServerError (3)",
|
|
2318
|
+
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
"name": "PreviewStartFailed (4)",
|
|
2322
|
+
"description": "Preview session failed to start due to API or network errors."
|
|
2130
2323
|
}
|
|
2131
2324
|
]
|
|
2132
2325
|
},
|
|
@@ -2135,27 +2328,26 @@
|
|
|
2135
2328
|
"lib",
|
|
2136
2329
|
"commands",
|
|
2137
2330
|
"agent",
|
|
2138
|
-
"
|
|
2139
|
-
"
|
|
2331
|
+
"preview",
|
|
2332
|
+
"start.js"
|
|
2140
2333
|
],
|
|
2141
2334
|
"aliasPermutations": [],
|
|
2142
2335
|
"permutations": [
|
|
2143
|
-
"agent:
|
|
2144
|
-
"
|
|
2145
|
-
"
|
|
2146
|
-
"agent:
|
|
2147
|
-
"
|
|
2148
|
-
"
|
|
2336
|
+
"agent:preview:start",
|
|
2337
|
+
"preview:agent:start",
|
|
2338
|
+
"preview:start:agent",
|
|
2339
|
+
"agent:start:preview",
|
|
2340
|
+
"start:agent:preview",
|
|
2341
|
+
"start:preview:agent"
|
|
2149
2342
|
]
|
|
2150
2343
|
},
|
|
2151
|
-
"agent:
|
|
2344
|
+
"agent:validate:authoring-bundle": {
|
|
2152
2345
|
"aliases": [],
|
|
2153
2346
|
"args": {},
|
|
2154
|
-
"description": "
|
|
2347
|
+
"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\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
|
|
2155
2348
|
"examples": [
|
|
2156
|
-
"
|
|
2157
|
-
"
|
|
2158
|
-
"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"
|
|
2349
|
+
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
2350
|
+
"Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
|
|
2159
2351
|
],
|
|
2160
2352
|
"flags": {
|
|
2161
2353
|
"json": {
|
|
@@ -2193,71 +2385,22 @@
|
|
|
2193
2385
|
"api-name": {
|
|
2194
2386
|
"char": "n",
|
|
2195
2387
|
"name": "api-name",
|
|
2196
|
-
"summary": "API name of the
|
|
2197
|
-
"hasDynamicHelp": false,
|
|
2198
|
-
"multiple": false,
|
|
2199
|
-
"type": "option"
|
|
2200
|
-
},
|
|
2201
|
-
"wait": {
|
|
2202
|
-
"char": "w",
|
|
2203
|
-
"name": "wait",
|
|
2204
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
2205
|
-
"hasDynamicHelp": true,
|
|
2206
|
-
"multiple": false,
|
|
2207
|
-
"type": "option"
|
|
2208
|
-
},
|
|
2209
|
-
"result-format": {
|
|
2210
|
-
"name": "result-format",
|
|
2211
|
-
"summary": "Format of the agent test run results.",
|
|
2212
|
-
"default": "human",
|
|
2213
|
-
"hasDynamicHelp": false,
|
|
2214
|
-
"multiple": false,
|
|
2215
|
-
"options": [
|
|
2216
|
-
"json",
|
|
2217
|
-
"human",
|
|
2218
|
-
"junit",
|
|
2219
|
-
"tap"
|
|
2220
|
-
],
|
|
2221
|
-
"type": "option"
|
|
2222
|
-
},
|
|
2223
|
-
"output-dir": {
|
|
2224
|
-
"char": "d",
|
|
2225
|
-
"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.",
|
|
2226
|
-
"name": "output-dir",
|
|
2227
|
-
"summary": "Directory to write the agent test results into.",
|
|
2228
|
-
"hasDynamicHelp": false,
|
|
2229
|
-
"multiple": false,
|
|
2230
|
-
"type": "option"
|
|
2231
|
-
},
|
|
2232
|
-
"test-runner": {
|
|
2233
|
-
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
2234
|
-
"name": "test-runner",
|
|
2235
|
-
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
2388
|
+
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
2236
2389
|
"hasDynamicHelp": false,
|
|
2237
2390
|
"multiple": false,
|
|
2238
|
-
"options": [
|
|
2239
|
-
"agentforce-studio",
|
|
2240
|
-
"testing-center"
|
|
2241
|
-
],
|
|
2242
2391
|
"type": "option"
|
|
2243
|
-
},
|
|
2244
|
-
"verbose": {
|
|
2245
|
-
"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.",
|
|
2246
|
-
"name": "verbose",
|
|
2247
|
-
"summary": "Show generated data in the test results output.",
|
|
2248
|
-
"allowNo": false,
|
|
2249
|
-
"type": "boolean"
|
|
2250
2392
|
}
|
|
2251
2393
|
},
|
|
2252
2394
|
"hasDynamicHelp": true,
|
|
2253
2395
|
"hiddenAliases": [],
|
|
2254
|
-
"id": "agent:
|
|
2396
|
+
"id": "agent:validate:authoring-bundle",
|
|
2255
2397
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2256
2398
|
"pluginName": "@salesforce/plugin-agent",
|
|
2257
2399
|
"pluginType": "core",
|
|
2258
2400
|
"strict": true,
|
|
2259
|
-
"summary": "
|
|
2401
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
2260
2402
|
"enableJsonFlag": true,
|
|
2403
|
+
"requiresProject": true,
|
|
2261
2404
|
"envVariablesSection": {
|
|
2262
2405
|
"header": "ENVIRONMENT VARIABLES",
|
|
2263
2406
|
"body": [
|
|
@@ -2272,38 +2415,44 @@
|
|
|
2272
2415
|
"body": [
|
|
2273
2416
|
{
|
|
2274
2417
|
"name": "Succeeded (0)",
|
|
2275
|
-
"description": "
|
|
2418
|
+
"description": "Agent Script file compiled successfully without errors."
|
|
2276
2419
|
},
|
|
2277
2420
|
{
|
|
2278
2421
|
"name": "Failed (1)",
|
|
2279
|
-
"description": "
|
|
2422
|
+
"description": "Compilation errors found in the Agent Script file."
|
|
2280
2423
|
},
|
|
2281
2424
|
{
|
|
2282
2425
|
"name": "NotFound (2)",
|
|
2283
|
-
"description": "
|
|
2426
|
+
"description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
|
|
2284
2427
|
},
|
|
2285
2428
|
{
|
|
2286
|
-
"name": "
|
|
2287
|
-
"description": "
|
|
2429
|
+
"name": "ServerError (3)",
|
|
2430
|
+
"description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
|
|
2288
2431
|
}
|
|
2289
2432
|
]
|
|
2290
2433
|
},
|
|
2434
|
+
"FLAGGABLE_PROMPTS": {
|
|
2435
|
+
"api-name": {
|
|
2436
|
+
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
2437
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
2438
|
+
}
|
|
2439
|
+
},
|
|
2291
2440
|
"isESM": true,
|
|
2292
2441
|
"relativePath": [
|
|
2293
2442
|
"lib",
|
|
2294
2443
|
"commands",
|
|
2295
2444
|
"agent",
|
|
2296
|
-
"
|
|
2297
|
-
"
|
|
2445
|
+
"validate",
|
|
2446
|
+
"authoring-bundle.js"
|
|
2298
2447
|
],
|
|
2299
2448
|
"aliasPermutations": [],
|
|
2300
2449
|
"permutations": [
|
|
2301
|
-
"agent:
|
|
2302
|
-
"
|
|
2303
|
-
"
|
|
2304
|
-
"agent:
|
|
2305
|
-
"
|
|
2306
|
-
"
|
|
2450
|
+
"agent:validate:authoring-bundle",
|
|
2451
|
+
"validate:agent:authoring-bundle",
|
|
2452
|
+
"validate:authoring-bundle:agent",
|
|
2453
|
+
"agent:authoring-bundle:validate",
|
|
2454
|
+
"authoring-bundle:agent:validate",
|
|
2455
|
+
"authoring-bundle:validate:agent"
|
|
2307
2456
|
]
|
|
2308
2457
|
},
|
|
2309
2458
|
"agent:trace:delete": {
|
|
@@ -2592,121 +2741,7 @@
|
|
|
2592
2741
|
"read:agent:trace",
|
|
2593
2742
|
"read:trace:agent"
|
|
2594
2743
|
]
|
|
2595
|
-
},
|
|
2596
|
-
"agent:validate:authoring-bundle": {
|
|
2597
|
-
"aliases": [],
|
|
2598
|
-
"args": {},
|
|
2599
|
-
"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\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
|
|
2600
|
-
"examples": [
|
|
2601
|
-
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
2602
|
-
"Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
|
|
2603
|
-
],
|
|
2604
|
-
"flags": {
|
|
2605
|
-
"json": {
|
|
2606
|
-
"description": "Format output as json.",
|
|
2607
|
-
"helpGroup": "GLOBAL",
|
|
2608
|
-
"name": "json",
|
|
2609
|
-
"allowNo": false,
|
|
2610
|
-
"type": "boolean"
|
|
2611
|
-
},
|
|
2612
|
-
"flags-dir": {
|
|
2613
|
-
"helpGroup": "GLOBAL",
|
|
2614
|
-
"name": "flags-dir",
|
|
2615
|
-
"summary": "Import flag values from a directory.",
|
|
2616
|
-
"hasDynamicHelp": false,
|
|
2617
|
-
"multiple": false,
|
|
2618
|
-
"type": "option"
|
|
2619
|
-
},
|
|
2620
|
-
"target-org": {
|
|
2621
|
-
"char": "o",
|
|
2622
|
-
"name": "target-org",
|
|
2623
|
-
"noCacheDefault": true,
|
|
2624
|
-
"required": true,
|
|
2625
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
2626
|
-
"hasDynamicHelp": true,
|
|
2627
|
-
"multiple": false,
|
|
2628
|
-
"type": "option"
|
|
2629
|
-
},
|
|
2630
|
-
"api-version": {
|
|
2631
|
-
"description": "Override the api version used for api requests made by this command",
|
|
2632
|
-
"name": "api-version",
|
|
2633
|
-
"hasDynamicHelp": false,
|
|
2634
|
-
"multiple": false,
|
|
2635
|
-
"type": "option"
|
|
2636
|
-
},
|
|
2637
|
-
"api-name": {
|
|
2638
|
-
"char": "n",
|
|
2639
|
-
"name": "api-name",
|
|
2640
|
-
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
2641
|
-
"hasDynamicHelp": false,
|
|
2642
|
-
"multiple": false,
|
|
2643
|
-
"type": "option"
|
|
2644
|
-
}
|
|
2645
|
-
},
|
|
2646
|
-
"hasDynamicHelp": true,
|
|
2647
|
-
"hiddenAliases": [],
|
|
2648
|
-
"id": "agent:validate:authoring-bundle",
|
|
2649
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
2650
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
2651
|
-
"pluginType": "core",
|
|
2652
|
-
"strict": true,
|
|
2653
|
-
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
2654
|
-
"enableJsonFlag": true,
|
|
2655
|
-
"requiresProject": true,
|
|
2656
|
-
"envVariablesSection": {
|
|
2657
|
-
"header": "ENVIRONMENT VARIABLES",
|
|
2658
|
-
"body": [
|
|
2659
|
-
{
|
|
2660
|
-
"name": "SF_TARGET_ORG",
|
|
2661
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
2662
|
-
}
|
|
2663
|
-
]
|
|
2664
|
-
},
|
|
2665
|
-
"errorCodes": {
|
|
2666
|
-
"header": "ERROR CODES",
|
|
2667
|
-
"body": [
|
|
2668
|
-
{
|
|
2669
|
-
"name": "Succeeded (0)",
|
|
2670
|
-
"description": "Agent Script file compiled successfully without errors."
|
|
2671
|
-
},
|
|
2672
|
-
{
|
|
2673
|
-
"name": "Failed (1)",
|
|
2674
|
-
"description": "Compilation errors found in the Agent Script file."
|
|
2675
|
-
},
|
|
2676
|
-
{
|
|
2677
|
-
"name": "NotFound (2)",
|
|
2678
|
-
"description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
|
|
2679
|
-
},
|
|
2680
|
-
{
|
|
2681
|
-
"name": "ServerError (3)",
|
|
2682
|
-
"description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
|
|
2683
|
-
}
|
|
2684
|
-
]
|
|
2685
|
-
},
|
|
2686
|
-
"FLAGGABLE_PROMPTS": {
|
|
2687
|
-
"api-name": {
|
|
2688
|
-
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
2689
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
2690
|
-
}
|
|
2691
|
-
},
|
|
2692
|
-
"isESM": true,
|
|
2693
|
-
"relativePath": [
|
|
2694
|
-
"lib",
|
|
2695
|
-
"commands",
|
|
2696
|
-
"agent",
|
|
2697
|
-
"validate",
|
|
2698
|
-
"authoring-bundle.js"
|
|
2699
|
-
],
|
|
2700
|
-
"aliasPermutations": [],
|
|
2701
|
-
"permutations": [
|
|
2702
|
-
"agent:validate:authoring-bundle",
|
|
2703
|
-
"validate:agent:authoring-bundle",
|
|
2704
|
-
"validate:authoring-bundle:agent",
|
|
2705
|
-
"agent:authoring-bundle:validate",
|
|
2706
|
-
"authoring-bundle:agent:validate",
|
|
2707
|
-
"authoring-bundle:validate:agent"
|
|
2708
|
-
]
|
|
2709
2744
|
}
|
|
2710
2745
|
},
|
|
2711
|
-
"version": "1.
|
|
2746
|
+
"version": "1.39.0"
|
|
2712
2747
|
}
|