@salesforce/plugin-agent 1.41.0 → 1.42.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.
Files changed (54) hide show
  1. package/README.md +415 -23
  2. package/lib/commands/agent/adl/create.d.ts +23 -0
  3. package/lib/commands/agent/adl/create.js +104 -0
  4. package/lib/commands/agent/adl/create.js.map +1 -0
  5. package/lib/commands/agent/adl/delete.d.ts +18 -0
  6. package/lib/commands/agent/adl/delete.js +51 -0
  7. package/lib/commands/agent/adl/delete.js.map +1 -0
  8. package/lib/commands/agent/adl/file/add.d.ts +17 -0
  9. package/lib/commands/agent/adl/file/add.js +59 -0
  10. package/lib/commands/agent/adl/file/add.js.map +1 -0
  11. package/lib/commands/agent/adl/file/delete.d.ts +19 -0
  12. package/lib/commands/agent/adl/file/delete.js +55 -0
  13. package/lib/commands/agent/adl/file/delete.js.map +1 -0
  14. package/lib/commands/agent/adl/file/list.d.ts +18 -0
  15. package/lib/commands/agent/adl/file/list.js +51 -0
  16. package/lib/commands/agent/adl/file/list.js.map +1 -0
  17. package/lib/commands/agent/adl/get.d.ts +16 -0
  18. package/lib/commands/agent/adl/get.js +51 -0
  19. package/lib/commands/agent/adl/get.js.map +1 -0
  20. package/lib/commands/agent/adl/list.d.ts +17 -0
  21. package/lib/commands/agent/adl/list.js +57 -0
  22. package/lib/commands/agent/adl/list.js.map +1 -0
  23. package/lib/commands/agent/adl/status.d.ts +16 -0
  24. package/lib/commands/agent/adl/status.js +57 -0
  25. package/lib/commands/agent/adl/status.js.map +1 -0
  26. package/lib/commands/agent/adl/update.d.ts +20 -0
  27. package/lib/commands/agent/adl/update.js +90 -0
  28. package/lib/commands/agent/adl/update.js.map +1 -0
  29. package/lib/commands/agent/adl/upload.d.ts +18 -0
  30. package/lib/commands/agent/adl/upload.js +73 -0
  31. package/lib/commands/agent/adl/upload.js.map +1 -0
  32. package/messages/agent.adl.create.md +65 -0
  33. package/messages/agent.adl.delete.md +21 -0
  34. package/messages/agent.adl.file.add.md +27 -0
  35. package/messages/agent.adl.file.delete.md +25 -0
  36. package/messages/agent.adl.file.list.md +25 -0
  37. package/messages/agent.adl.get.md +21 -0
  38. package/messages/agent.adl.list.md +21 -0
  39. package/messages/agent.adl.status.md +21 -0
  40. package/messages/agent.adl.update.md +49 -0
  41. package/messages/agent.adl.upload.md +55 -0
  42. package/oclif.manifest.json +2069 -1111
  43. package/package.json +14 -4
  44. package/schemas/agent-adl-create.json +83 -0
  45. package/schemas/agent-adl-delete.json +19 -0
  46. package/schemas/agent-adl-file-add.json +25 -0
  47. package/schemas/agent-adl-file-delete.json +19 -0
  48. package/schemas/agent-adl-file-list.json +44 -0
  49. package/schemas/agent-adl-get.json +83 -0
  50. package/schemas/agent-adl-list.json +44 -0
  51. package/schemas/agent-adl-status.json +63 -0
  52. package/schemas/agent-adl-update.json +83 -0
  53. package/schemas/agent-adl-upload.json +28 -0
  54. package/schemas/agent-preview-end.json +2 -5
@@ -409,16 +409,14 @@
409
409
  "preview:agent"
410
410
  ]
411
411
  },
412
- "agent:generate:agent-spec": {
412
+ "agent:adl:create": {
413
413
  "aliases": [],
414
414
  "args": {},
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.)",
415
+ "description": "Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).",
416
416
  "examples": [
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"
417
+ "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
418
+ "Create a KNOWLEDGE library with index fields:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"KB Library\" --developer-name KB_Library --source-type knowledge --primary-index-field1 Title --primary-index-field2 Summary",
419
+ "Create a RETRIEVER library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever --source-type retriever --retriever-id 0ppXX0000000001"
422
420
  ],
423
421
  "flags": {
424
422
  "json": {
@@ -453,164 +451,110 @@
453
451
  "multiple": false,
454
452
  "type": "option"
455
453
  },
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.",
459
- "hasDynamicHelp": false,
460
- "multiple": false,
461
- "options": [
462
- "customer",
463
- "internal"
464
- ],
465
- "type": "option"
466
- },
467
- "role": {
468
- "name": "role",
469
- "summary": "Role of the agent.",
470
- "hasDynamicHelp": false,
471
- "multiple": false,
472
- "type": "option"
473
- },
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.",
454
+ "name": {
455
+ "char": "n",
456
+ "name": "name",
457
+ "required": true,
458
+ "summary": "Display name for the data library (max 80 characters).",
498
459
  "hasDynamicHelp": false,
499
460
  "multiple": false,
500
461
  "type": "option"
501
462
  },
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.",
463
+ "developer-name": {
464
+ "name": "developer-name",
465
+ "required": true,
466
+ "summary": "API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).",
505
467
  "hasDynamicHelp": false,
506
468
  "multiple": false,
507
469
  "type": "option"
508
470
  },
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.",
471
+ "source-type": {
472
+ "name": "source-type",
473
+ "required": true,
474
+ "summary": "Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).",
512
475
  "hasDynamicHelp": false,
513
476
  "multiple": false,
514
477
  "options": [
515
- "true",
516
- "false"
478
+ "sfdrive",
479
+ "knowledge",
480
+ "retriever"
517
481
  ],
518
482
  "type": "option"
519
483
  },
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.",
484
+ "description": {
485
+ "name": "description",
486
+ "summary": "Description of the data library (max 255 characters).",
523
487
  "hasDynamicHelp": false,
524
488
  "multiple": false,
525
- "options": [
526
- "formal",
527
- "casual",
528
- "neutral"
529
- ],
530
489
  "type": "option"
531
490
  },
532
- "spec": {
533
- "name": "spec",
534
- "summary": "Agent spec file, in YAML format, to use as input to the command.",
491
+ "index-mode": {
492
+ "name": "index-mode",
493
+ "summary": "Index mode for SFDRIVE libraries: basic or enhanced.",
535
494
  "hasDynamicHelp": false,
536
495
  "multiple": false,
496
+ "options": [
497
+ "basic",
498
+ "enhanced"
499
+ ],
537
500
  "type": "option"
538
501
  },
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",
502
+ "retriever-id": {
503
+ "name": "retriever-id",
504
+ "summary": "ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).",
543
505
  "hasDynamicHelp": false,
544
506
  "multiple": false,
545
507
  "type": "option"
546
508
  },
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.",
509
+ "primary-index-field1": {
510
+ "name": "primary-index-field1",
511
+ "summary": "Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).",
556
512
  "hasDynamicHelp": false,
557
513
  "multiple": false,
558
514
  "type": "option"
559
515
  },
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.",
516
+ "primary-index-field2": {
517
+ "name": "primary-index-field2",
518
+ "summary": "Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).",
566
519
  "hasDynamicHelp": false,
567
520
  "multiple": false,
568
521
  "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"
575
522
  }
576
523
  },
577
524
  "hasDynamicHelp": true,
578
525
  "hiddenAliases": [],
579
- "id": "agent:generate:agent-spec",
526
+ "id": "agent:adl:create",
580
527
  "pluginAlias": "@salesforce/plugin-agent",
581
528
  "pluginName": "@salesforce/plugin-agent",
582
529
  "pluginType": "core",
530
+ "state": "preview",
583
531
  "strict": true,
584
- "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
532
+ "summary": "Create an Agentforce Data Library.",
585
533
  "enableJsonFlag": true,
586
- "requiresProject": true,
587
534
  "isESM": true,
588
535
  "relativePath": [
589
536
  "lib",
590
537
  "commands",
591
538
  "agent",
592
- "generate",
593
- "agent-spec.js"
539
+ "adl",
540
+ "create.js"
594
541
  ],
595
542
  "aliasPermutations": [],
596
543
  "permutations": [
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"
544
+ "agent:adl:create",
545
+ "adl:agent:create",
546
+ "adl:create:agent",
547
+ "agent:create:adl",
548
+ "create:agent:adl",
549
+ "create:adl:agent"
603
550
  ]
604
551
  },
605
- "agent:generate:authoring-bundle": {
552
+ "agent:adl:delete": {
606
553
  "aliases": [],
607
554
  "args": {},
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.",
555
+ "description": "Permanently deletes a data library and all associated files and indexing data.",
609
556
  "examples": [
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"
557
+ "Delete a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
614
558
  ],
615
559
  "flags": {
616
560
  "json": {
@@ -638,13 +582,6 @@
638
582
  "multiple": false,
639
583
  "type": "option"
640
584
  },
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
- },
648
585
  "api-version": {
649
586
  "description": "Override the api version used for api requests made by this command",
650
587
  "name": "api-version",
@@ -652,77 +589,50 @@
652
589
  "multiple": false,
653
590
  "type": "option"
654
591
  },
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.",
659
- "hasDynamicHelp": false,
660
- "multiple": false,
661
- "type": "option"
662
- },
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.",
673
- "hasDynamicHelp": false,
674
- "multiple": false,
675
- "type": "option"
676
- },
677
- "name": {
678
- "char": "n",
679
- "name": "name",
680
- "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
592
+ "library-id": {
593
+ "char": "i",
594
+ "name": "library-id",
595
+ "required": true,
596
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
681
597
  "hasDynamicHelp": false,
682
598
  "multiple": false,
683
599
  "type": "option"
684
- },
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"
690
600
  }
691
601
  },
692
602
  "hasDynamicHelp": true,
693
603
  "hiddenAliases": [],
694
- "id": "agent:generate:authoring-bundle",
604
+ "id": "agent:adl:delete",
695
605
  "pluginAlias": "@salesforce/plugin-agent",
696
606
  "pluginName": "@salesforce/plugin-agent",
697
607
  "pluginType": "core",
608
+ "state": "preview",
698
609
  "strict": true,
699
- "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
610
+ "summary": "Delete an Agentforce Data Library.",
700
611
  "enableJsonFlag": true,
701
- "requiresProject": true,
702
612
  "isESM": true,
703
613
  "relativePath": [
704
614
  "lib",
705
615
  "commands",
706
616
  "agent",
707
- "generate",
708
- "authoring-bundle.js"
617
+ "adl",
618
+ "delete.js"
709
619
  ],
710
620
  "aliasPermutations": [],
711
621
  "permutations": [
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"
622
+ "agent:adl:delete",
623
+ "adl:agent:delete",
624
+ "adl:delete:agent",
625
+ "agent:delete:adl",
626
+ "delete:agent:adl",
627
+ "delete:adl:agent"
718
628
  ]
719
629
  },
720
- "agent:generate:template": {
630
+ "agent:adl:get": {
721
631
  "aliases": [],
722
632
  "args": {},
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.",
633
+ "description": "Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.",
724
634
  "examples": [
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"
635
+ "Get details of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
726
636
  ],
727
637
  "flags": {
728
638
  "json": {
@@ -740,44 +650,28 @@
740
650
  "multiple": false,
741
651
  "type": "option"
742
652
  },
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",
653
+ "target-org": {
654
+ "char": "o",
655
+ "name": "target-org",
753
656
  "noCacheDefault": true,
754
657
  "required": true,
755
- "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
658
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
756
659
  "hasDynamicHelp": true,
757
660
  "multiple": false,
758
661
  "type": "option"
759
662
  },
760
- "agent-version": {
761
- "name": "agent-version",
762
- "required": true,
763
- "summary": "Version of the agent (BotVersion).",
663
+ "api-version": {
664
+ "description": "Override the api version used for api requests made by this command",
665
+ "name": "api-version",
764
666
  "hasDynamicHelp": false,
765
667
  "multiple": false,
766
668
  "type": "option"
767
669
  },
768
- "agent-file": {
769
- "char": "f",
770
- "name": "agent-file",
670
+ "library-id": {
671
+ "char": "i",
672
+ "name": "library-id",
771
673
  "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.",
674
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
781
675
  "hasDynamicHelp": false,
782
676
  "multiple": false,
783
677
  "type": "option"
@@ -785,42 +679,48 @@
785
679
  },
786
680
  "hasDynamicHelp": true,
787
681
  "hiddenAliases": [],
788
- "id": "agent:generate:template",
682
+ "id": "agent:adl:get",
789
683
  "pluginAlias": "@salesforce/plugin-agent",
790
684
  "pluginName": "@salesforce/plugin-agent",
791
685
  "pluginType": "core",
686
+ "state": "preview",
792
687
  "strict": true,
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.",
688
+ "summary": "Get details of an Agentforce Data Library.",
794
689
  "enableJsonFlag": true,
795
- "requiresProject": true,
796
690
  "isESM": true,
797
691
  "relativePath": [
798
692
  "lib",
799
693
  "commands",
800
694
  "agent",
801
- "generate",
802
- "template.js"
695
+ "adl",
696
+ "get.js"
803
697
  ],
804
698
  "aliasPermutations": [],
805
699
  "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"
700
+ "agent:adl:get",
701
+ "adl:agent:get",
702
+ "adl:get:agent",
703
+ "agent:get:adl",
704
+ "get:agent:adl",
705
+ "get:adl:agent"
812
706
  ]
813
707
  },
814
- "agent:generate:test-spec": {
708
+ "agent:adl:list": {
815
709
  "aliases": [],
816
710
  "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.",
711
+ "description": "Returns all data libraries in the target org, including their source type, status, and library ID.",
818
712
  "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"
713
+ "List all data libraries in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
714
+ "List data libraries and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --json"
822
715
  ],
823
716
  "flags": {
717
+ "json": {
718
+ "description": "Format output as json.",
719
+ "helpGroup": "GLOBAL",
720
+ "name": "json",
721
+ "allowNo": false,
722
+ "type": "boolean"
723
+ },
824
724
  "flags-dir": {
825
725
  "helpGroup": "GLOBAL",
826
726
  "name": "flags-dir",
@@ -829,66 +729,58 @@
829
729
  "multiple": false,
830
730
  "type": "option"
831
731
  },
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,
732
+ "target-org": {
733
+ "char": "o",
734
+ "name": "target-org",
735
+ "noCacheDefault": true,
736
+ "required": true,
737
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
738
+ "hasDynamicHelp": true,
837
739
  "multiple": false,
838
740
  "type": "option"
839
741
  },
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,
742
+ "api-version": {
743
+ "description": "Override the api version used for api requests made by this command",
744
+ "name": "api-version",
745
+ "hasDynamicHelp": false,
851
746
  "multiple": false,
852
747
  "type": "option"
853
748
  }
854
749
  },
855
- "hasDynamicHelp": false,
750
+ "hasDynamicHelp": true,
856
751
  "hiddenAliases": [],
857
- "id": "agent:generate:test-spec",
752
+ "id": "agent:adl:list",
858
753
  "pluginAlias": "@salesforce/plugin-agent",
859
754
  "pluginName": "@salesforce/plugin-agent",
860
755
  "pluginType": "core",
756
+ "state": "preview",
861
757
  "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,
758
+ "summary": "List Agentforce Data Libraries in an org.",
759
+ "enableJsonFlag": true,
864
760
  "isESM": true,
865
761
  "relativePath": [
866
762
  "lib",
867
763
  "commands",
868
764
  "agent",
869
- "generate",
870
- "test-spec.js"
765
+ "adl",
766
+ "list.js"
871
767
  ],
872
768
  "aliasPermutations": [],
873
769
  "permutations": [
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"
770
+ "agent:adl:list",
771
+ "adl:agent:list",
772
+ "adl:list:agent",
773
+ "agent:list:adl",
774
+ "list:agent:adl",
775
+ "list:adl:agent"
880
776
  ]
881
777
  },
882
- "agent:preview:end": {
778
+ "agent:adl:status": {
883
779
  "aliases": [],
884
780
  "args": {},
885
- "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.",
781
+ "description": "Returns the current indexing status including stage details (DATA_LAKE_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
886
782
  "examples": [
887
- "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",
888
- "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",
889
- "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",
890
- "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",
891
- "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>"
783
+ "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
892
784
  ],
893
785
  "flags": {
894
786
  "json": {
@@ -923,129 +815,53 @@
923
815
  "multiple": false,
924
816
  "type": "option"
925
817
  },
926
- "session-id": {
927
- "exclusive": [
928
- "all"
929
- ],
930
- "name": "session-id",
931
- "required": false,
932
- "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.",
933
- "hasDynamicHelp": false,
934
- "multiple": false,
935
- "type": "option"
936
- },
937
- "api-name": {
938
- "char": "n",
939
- "exclusive": [
940
- "authoring-bundle"
941
- ],
942
- "name": "api-name",
943
- "summary": "API name of the activated published agent you want to preview.",
944
- "hasDynamicHelp": false,
945
- "multiple": false,
946
- "type": "option"
947
- },
948
- "authoring-bundle": {
949
- "exclusive": [
950
- "api-name"
951
- ],
952
- "name": "authoring-bundle",
953
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
818
+ "library-id": {
819
+ "char": "i",
820
+ "name": "library-id",
821
+ "required": true,
822
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
954
823
  "hasDynamicHelp": false,
955
824
  "multiple": false,
956
825
  "type": "option"
957
- },
958
- "all": {
959
- "exclusive": [
960
- "session-id"
961
- ],
962
- "name": "all",
963
- "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.",
964
- "allowNo": false,
965
- "type": "boolean"
966
- },
967
- "no-prompt": {
968
- "char": "p",
969
- "name": "no-prompt",
970
- "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
971
- "allowNo": false,
972
- "type": "boolean"
973
826
  }
974
827
  },
975
828
  "hasDynamicHelp": true,
976
829
  "hiddenAliases": [],
977
- "id": "agent:preview:end",
830
+ "id": "agent:adl:status",
978
831
  "pluginAlias": "@salesforce/plugin-agent",
979
832
  "pluginName": "@salesforce/plugin-agent",
980
833
  "pluginType": "core",
834
+ "state": "preview",
981
835
  "strict": true,
982
- "summary": "End an existing programmatic agent preview session and get trace location.",
836
+ "summary": "Get indexing status of an Agentforce Data Library.",
983
837
  "enableJsonFlag": true,
984
- "requiresProject": true,
985
- "envVariablesSection": {
986
- "header": "ENVIRONMENT VARIABLES",
987
- "body": [
988
- {
989
- "name": "SF_TARGET_ORG",
990
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
991
- }
992
- ]
993
- },
994
- "errorCodes": {
995
- "header": "ERROR CODES",
996
- "body": [
997
- {
998
- "name": "Succeeded (0)",
999
- "description": "Preview session ended successfully and traces saved."
1000
- },
1001
- {
1002
- "name": "ExactlyOneRequired (2)",
1003
- "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
1004
- },
1005
- {
1006
- "name": "NotFound (2)",
1007
- "description": "Agent not found, or no preview session exists for this agent."
1008
- },
1009
- {
1010
- "name": "PreviewEndFailed (4)",
1011
- "description": "Failed to end the preview session."
1012
- },
1013
- {
1014
- "name": "PreviewEndPartialFailure (68)",
1015
- "description": "With --all, one or more sessions failed to end while others succeeded."
1016
- },
1017
- {
1018
- "name": "SessionAmbiguous (5)",
1019
- "description": "Multiple preview sessions found; specify --session-id to choose one."
1020
- }
1021
- ]
1022
- },
1023
838
  "isESM": true,
1024
839
  "relativePath": [
1025
840
  "lib",
1026
841
  "commands",
1027
842
  "agent",
1028
- "preview",
1029
- "end.js"
843
+ "adl",
844
+ "status.js"
1030
845
  ],
1031
846
  "aliasPermutations": [],
1032
847
  "permutations": [
1033
- "agent:preview:end",
1034
- "preview:agent:end",
1035
- "preview:end:agent",
1036
- "agent:end:preview",
1037
- "end:agent:preview",
1038
- "end:preview:agent"
848
+ "agent:adl:status",
849
+ "adl:agent:status",
850
+ "adl:status:agent",
851
+ "agent:status:adl",
852
+ "status:agent:adl",
853
+ "status:adl:agent"
1039
854
  ]
1040
855
  },
1041
- "agent:preview:send": {
856
+ "agent:adl:update": {
1042
857
  "aliases": [],
1043
858
  "args": {},
1044
- "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.",
859
+ "description": "Updates the label, description, or other mutable properties of an existing data library.",
1045
860
  "examples": [
1046
- "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>",
1047
- "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",
1048
- "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"
861
+ "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
862
+ "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
863
+ "Update Knowledge library content fields (triggers re-indexing):\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg",
864
+ "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
1049
865
  ],
1050
866
  "flags": {
1051
867
  "json": {
@@ -1080,103 +896,79 @@
1080
896
  "multiple": false,
1081
897
  "type": "option"
1082
898
  },
1083
- "session-id": {
1084
- "name": "session-id",
1085
- "required": false,
1086
- "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.",
899
+ "library-id": {
900
+ "char": "i",
901
+ "name": "library-id",
902
+ "required": true,
903
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1087
904
  "hasDynamicHelp": false,
1088
905
  "multiple": false,
1089
906
  "type": "option"
1090
907
  },
1091
- "utterance": {
1092
- "char": "u",
1093
- "name": "utterance",
1094
- "required": true,
1095
- "summary": "Utterance to send to the agent, enclosed in double quotes.",
908
+ "name": {
909
+ "char": "n",
910
+ "name": "name",
911
+ "summary": "New display name for the data library (max 80 characters).",
1096
912
  "hasDynamicHelp": false,
1097
913
  "multiple": false,
1098
914
  "type": "option"
1099
915
  },
1100
- "api-name": {
1101
- "char": "n",
1102
- "name": "api-name",
1103
- "summary": "API name of the activated published agent you want to preview.",
916
+ "description": {
917
+ "name": "description",
918
+ "summary": "New description for the data library (max 255 characters).",
1104
919
  "hasDynamicHelp": false,
1105
920
  "multiple": false,
1106
921
  "type": "option"
1107
922
  },
1108
- "authoring-bundle": {
1109
- "name": "authoring-bundle",
1110
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
923
+ "content-fields": {
924
+ "name": "content-fields",
925
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
1111
926
  "hasDynamicHelp": false,
1112
927
  "multiple": false,
1113
928
  "type": "option"
929
+ },
930
+ "restrict-to-public-articles": {
931
+ "name": "restrict-to-public-articles",
932
+ "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
933
+ "allowNo": true,
934
+ "type": "boolean"
1114
935
  }
1115
936
  },
1116
937
  "hasDynamicHelp": true,
1117
938
  "hiddenAliases": [],
1118
- "id": "agent:preview:send",
939
+ "id": "agent:adl:update",
1119
940
  "pluginAlias": "@salesforce/plugin-agent",
1120
941
  "pluginName": "@salesforce/plugin-agent",
1121
942
  "pluginType": "core",
943
+ "state": "preview",
1122
944
  "strict": true,
1123
- "summary": "Send a message to an existing agent preview session.",
945
+ "summary": "Update an Agentforce Data Library.",
1124
946
  "enableJsonFlag": true,
1125
- "requiresProject": true,
1126
- "envVariablesSection": {
1127
- "header": "ENVIRONMENT VARIABLES",
1128
- "body": [
1129
- {
1130
- "name": "SF_TARGET_ORG",
1131
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1132
- }
1133
- ]
1134
- },
1135
- "errorCodes": {
1136
- "header": "ERROR CODES",
1137
- "body": [
1138
- {
1139
- "name": "Succeeded (0)",
1140
- "description": "Message sent successfully and agent response received."
1141
- },
1142
- {
1143
- "name": "NotFound (2)",
1144
- "description": "Agent not found, or no preview session exists for this agent."
1145
- },
1146
- {
1147
- "name": "PreviewSendFailed (4)",
1148
- "description": "Failed to send message or receive response from the preview session."
1149
- },
1150
- {
1151
- "name": "SessionAmbiguous (5)",
1152
- "description": "Multiple preview sessions found; specify --session-id to choose one."
1153
- }
1154
- ]
1155
- },
1156
947
  "isESM": true,
1157
948
  "relativePath": [
1158
949
  "lib",
1159
950
  "commands",
1160
951
  "agent",
1161
- "preview",
1162
- "send.js"
952
+ "adl",
953
+ "update.js"
1163
954
  ],
1164
955
  "aliasPermutations": [],
1165
956
  "permutations": [
1166
- "agent:preview:send",
1167
- "preview:agent:send",
1168
- "preview:send:agent",
1169
- "agent:send:preview",
1170
- "send:agent:preview",
1171
- "send:preview:agent"
957
+ "agent:adl:update",
958
+ "adl:agent:update",
959
+ "adl:update:agent",
960
+ "agent:update:adl",
961
+ "update:agent:adl",
962
+ "update:adl:agent"
1172
963
  ]
1173
964
  },
1174
- "agent:preview:sessions": {
965
+ "agent:adl:upload": {
1175
966
  "aliases": [],
1176
967
  "args": {},
1177
- "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.",
968
+ "description": "Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file, triggers indexing, and optionally polls until the library is ready (retrieverId is populated).\n\nThis command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER libraries require no file upload.",
1178
969
  "examples": [
1179
- "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
970
+ "Upload a file and wait for indexing to complete:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg --wait 10",
971
+ "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
1180
972
  ],
1181
973
  "flags": {
1182
974
  "json": {
@@ -1193,53 +985,1227 @@
1193
985
  "hasDynamicHelp": false,
1194
986
  "multiple": false,
1195
987
  "type": "option"
988
+ },
989
+ "target-org": {
990
+ "char": "o",
991
+ "name": "target-org",
992
+ "noCacheDefault": true,
993
+ "required": true,
994
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
995
+ "hasDynamicHelp": true,
996
+ "multiple": false,
997
+ "type": "option"
998
+ },
999
+ "api-version": {
1000
+ "description": "Override the api version used for api requests made by this command",
1001
+ "name": "api-version",
1002
+ "hasDynamicHelp": false,
1003
+ "multiple": false,
1004
+ "type": "option"
1005
+ },
1006
+ "library-id": {
1007
+ "char": "i",
1008
+ "name": "library-id",
1009
+ "required": true,
1010
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1011
+ "hasDynamicHelp": false,
1012
+ "multiple": false,
1013
+ "type": "option"
1014
+ },
1015
+ "file": {
1016
+ "char": "f",
1017
+ "name": "file",
1018
+ "required": true,
1019
+ "summary": "Path to the file to upload.",
1020
+ "hasDynamicHelp": false,
1021
+ "multiple": false,
1022
+ "type": "option"
1023
+ },
1024
+ "wait": {
1025
+ "char": "w",
1026
+ "name": "wait",
1027
+ "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
1028
+ "hasDynamicHelp": true,
1029
+ "multiple": false,
1030
+ "type": "option"
1196
1031
  }
1197
1032
  },
1198
- "hasDynamicHelp": false,
1033
+ "hasDynamicHelp": true,
1199
1034
  "hiddenAliases": [],
1200
- "id": "agent:preview:sessions",
1035
+ "id": "agent:adl:upload",
1201
1036
  "pluginAlias": "@salesforce/plugin-agent",
1202
1037
  "pluginName": "@salesforce/plugin-agent",
1203
1038
  "pluginType": "core",
1039
+ "state": "preview",
1204
1040
  "strict": true,
1205
- "summary": "List all known programmatic agent preview sessions.",
1041
+ "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1206
1042
  "enableJsonFlag": true,
1207
- "requiresProject": true,
1208
- "errorCodes": {
1209
- "header": "ERROR CODES",
1210
- "body": [
1211
- {
1212
- "name": "Succeeded (0)",
1213
- "description": "Sessions listed successfully (or empty list if no active sessions)."
1214
- }
1215
- ]
1216
- },
1217
1043
  "isESM": true,
1218
1044
  "relativePath": [
1219
1045
  "lib",
1220
1046
  "commands",
1221
1047
  "agent",
1222
- "preview",
1223
- "sessions.js"
1048
+ "adl",
1049
+ "upload.js"
1224
1050
  ],
1225
1051
  "aliasPermutations": [],
1226
1052
  "permutations": [
1227
- "agent:preview:sessions",
1228
- "preview:agent:sessions",
1229
- "preview:sessions:agent",
1230
- "agent:sessions:preview",
1231
- "sessions:agent:preview",
1232
- "sessions:preview:agent"
1053
+ "agent:adl:upload",
1054
+ "adl:agent:upload",
1055
+ "adl:upload:agent",
1056
+ "agent:upload:adl",
1057
+ "upload:agent:adl",
1058
+ "upload:adl:agent"
1233
1059
  ]
1234
1060
  },
1235
- "agent:preview:start": {
1061
+ "agent:generate:agent-spec": {
1236
1062
  "aliases": [],
1237
1063
  "args": {},
1238
- "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.",
1064
+ "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.)",
1239
1065
  "examples": [
1240
- "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",
1241
- "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",
1242
- "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
1066
+ "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.\"",
1067
+ "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",
1068
+ "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
1069
+ "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\"",
1070
+ "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"
1071
+ ],
1072
+ "flags": {
1073
+ "json": {
1074
+ "description": "Format output as json.",
1075
+ "helpGroup": "GLOBAL",
1076
+ "name": "json",
1077
+ "allowNo": false,
1078
+ "type": "boolean"
1079
+ },
1080
+ "flags-dir": {
1081
+ "helpGroup": "GLOBAL",
1082
+ "name": "flags-dir",
1083
+ "summary": "Import flag values from a directory.",
1084
+ "hasDynamicHelp": false,
1085
+ "multiple": false,
1086
+ "type": "option"
1087
+ },
1088
+ "target-org": {
1089
+ "char": "o",
1090
+ "name": "target-org",
1091
+ "noCacheDefault": true,
1092
+ "required": true,
1093
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1094
+ "hasDynamicHelp": true,
1095
+ "multiple": false,
1096
+ "type": "option"
1097
+ },
1098
+ "api-version": {
1099
+ "description": "Override the api version used for api requests made by this command",
1100
+ "name": "api-version",
1101
+ "hasDynamicHelp": false,
1102
+ "multiple": false,
1103
+ "type": "option"
1104
+ },
1105
+ "type": {
1106
+ "name": "type",
1107
+ "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.",
1108
+ "hasDynamicHelp": false,
1109
+ "multiple": false,
1110
+ "options": [
1111
+ "customer",
1112
+ "internal"
1113
+ ],
1114
+ "type": "option"
1115
+ },
1116
+ "role": {
1117
+ "name": "role",
1118
+ "summary": "Role of the agent.",
1119
+ "hasDynamicHelp": false,
1120
+ "multiple": false,
1121
+ "type": "option"
1122
+ },
1123
+ "company-name": {
1124
+ "name": "company-name",
1125
+ "summary": "Name of your company.",
1126
+ "hasDynamicHelp": false,
1127
+ "multiple": false,
1128
+ "type": "option"
1129
+ },
1130
+ "company-description": {
1131
+ "name": "company-description",
1132
+ "summary": "Description of your company.",
1133
+ "hasDynamicHelp": false,
1134
+ "multiple": false,
1135
+ "type": "option"
1136
+ },
1137
+ "company-website": {
1138
+ "name": "company-website",
1139
+ "summary": "Website URL of your company.",
1140
+ "hasDynamicHelp": false,
1141
+ "multiple": false,
1142
+ "type": "option"
1143
+ },
1144
+ "max-topics": {
1145
+ "name": "max-topics",
1146
+ "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
1147
+ "hasDynamicHelp": false,
1148
+ "multiple": false,
1149
+ "type": "option"
1150
+ },
1151
+ "agent-user": {
1152
+ "name": "agent-user",
1153
+ "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
1154
+ "hasDynamicHelp": false,
1155
+ "multiple": false,
1156
+ "type": "option"
1157
+ },
1158
+ "enrich-logs": {
1159
+ "name": "enrich-logs",
1160
+ "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
1161
+ "hasDynamicHelp": false,
1162
+ "multiple": false,
1163
+ "options": [
1164
+ "true",
1165
+ "false"
1166
+ ],
1167
+ "type": "option"
1168
+ },
1169
+ "tone": {
1170
+ "name": "tone",
1171
+ "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
1172
+ "hasDynamicHelp": false,
1173
+ "multiple": false,
1174
+ "options": [
1175
+ "formal",
1176
+ "casual",
1177
+ "neutral"
1178
+ ],
1179
+ "type": "option"
1180
+ },
1181
+ "spec": {
1182
+ "name": "spec",
1183
+ "summary": "Agent spec file, in YAML format, to use as input to the command.",
1184
+ "hasDynamicHelp": false,
1185
+ "multiple": false,
1186
+ "type": "option"
1187
+ },
1188
+ "output-file": {
1189
+ "name": "output-file",
1190
+ "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
1191
+ "default": "specs/agentSpec.yaml",
1192
+ "hasDynamicHelp": false,
1193
+ "multiple": false,
1194
+ "type": "option"
1195
+ },
1196
+ "full-interview": {
1197
+ "name": "full-interview",
1198
+ "summary": "Prompt for both required and optional flags.",
1199
+ "allowNo": false,
1200
+ "type": "boolean"
1201
+ },
1202
+ "prompt-template": {
1203
+ "name": "prompt-template",
1204
+ "summary": "API name of a customized prompt template to use instead of the default prompt template.",
1205
+ "hasDynamicHelp": false,
1206
+ "multiple": false,
1207
+ "type": "option"
1208
+ },
1209
+ "grounding-context": {
1210
+ "dependsOn": [
1211
+ "prompt-template"
1212
+ ],
1213
+ "name": "grounding-context",
1214
+ "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
1215
+ "hasDynamicHelp": false,
1216
+ "multiple": false,
1217
+ "type": "option"
1218
+ },
1219
+ "force-overwrite": {
1220
+ "name": "force-overwrite",
1221
+ "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
1222
+ "allowNo": false,
1223
+ "type": "boolean"
1224
+ }
1225
+ },
1226
+ "hasDynamicHelp": true,
1227
+ "hiddenAliases": [],
1228
+ "id": "agent:generate:agent-spec",
1229
+ "pluginAlias": "@salesforce/plugin-agent",
1230
+ "pluginName": "@salesforce/plugin-agent",
1231
+ "pluginType": "core",
1232
+ "strict": true,
1233
+ "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
1234
+ "enableJsonFlag": true,
1235
+ "requiresProject": true,
1236
+ "isESM": true,
1237
+ "relativePath": [
1238
+ "lib",
1239
+ "commands",
1240
+ "agent",
1241
+ "generate",
1242
+ "agent-spec.js"
1243
+ ],
1244
+ "aliasPermutations": [],
1245
+ "permutations": [
1246
+ "agent:generate:agent-spec",
1247
+ "generate:agent:agent-spec",
1248
+ "generate:agent-spec:agent",
1249
+ "agent:agent-spec:generate",
1250
+ "agent-spec:agent:generate",
1251
+ "agent-spec:generate:agent"
1252
+ ]
1253
+ },
1254
+ "agent:generate:authoring-bundle": {
1255
+ "aliases": [],
1256
+ "args": {},
1257
+ "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.",
1258
+ "examples": [
1259
+ "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 %>",
1260
+ "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\"",
1261
+ "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\"",
1262
+ "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"
1263
+ ],
1264
+ "flags": {
1265
+ "json": {
1266
+ "description": "Format output as json.",
1267
+ "helpGroup": "GLOBAL",
1268
+ "name": "json",
1269
+ "allowNo": false,
1270
+ "type": "boolean"
1271
+ },
1272
+ "flags-dir": {
1273
+ "helpGroup": "GLOBAL",
1274
+ "name": "flags-dir",
1275
+ "summary": "Import flag values from a directory.",
1276
+ "hasDynamicHelp": false,
1277
+ "multiple": false,
1278
+ "type": "option"
1279
+ },
1280
+ "target-org": {
1281
+ "char": "o",
1282
+ "name": "target-org",
1283
+ "noCacheDefault": true,
1284
+ "required": true,
1285
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1286
+ "hasDynamicHelp": true,
1287
+ "multiple": false,
1288
+ "type": "option"
1289
+ },
1290
+ "api-name": {
1291
+ "name": "api-name",
1292
+ "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.",
1293
+ "hasDynamicHelp": false,
1294
+ "multiple": false,
1295
+ "type": "option"
1296
+ },
1297
+ "api-version": {
1298
+ "description": "Override the api version used for api requests made by this command",
1299
+ "name": "api-version",
1300
+ "hasDynamicHelp": false,
1301
+ "multiple": false,
1302
+ "type": "option"
1303
+ },
1304
+ "spec": {
1305
+ "char": "f",
1306
+ "name": "spec",
1307
+ "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.",
1308
+ "hasDynamicHelp": false,
1309
+ "multiple": false,
1310
+ "type": "option"
1311
+ },
1312
+ "no-spec": {
1313
+ "name": "no-spec",
1314
+ "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
1315
+ "allowNo": false,
1316
+ "type": "boolean"
1317
+ },
1318
+ "output-dir": {
1319
+ "char": "d",
1320
+ "name": "output-dir",
1321
+ "summary": "Directory where the authoring bundle files are generated.",
1322
+ "hasDynamicHelp": false,
1323
+ "multiple": false,
1324
+ "type": "option"
1325
+ },
1326
+ "name": {
1327
+ "char": "n",
1328
+ "name": "name",
1329
+ "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
1330
+ "hasDynamicHelp": false,
1331
+ "multiple": false,
1332
+ "type": "option"
1333
+ },
1334
+ "force-overwrite": {
1335
+ "name": "force-overwrite",
1336
+ "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
1337
+ "allowNo": false,
1338
+ "type": "boolean"
1339
+ }
1340
+ },
1341
+ "hasDynamicHelp": true,
1342
+ "hiddenAliases": [],
1343
+ "id": "agent:generate:authoring-bundle",
1344
+ "pluginAlias": "@salesforce/plugin-agent",
1345
+ "pluginName": "@salesforce/plugin-agent",
1346
+ "pluginType": "core",
1347
+ "strict": true,
1348
+ "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
1349
+ "enableJsonFlag": true,
1350
+ "requiresProject": true,
1351
+ "isESM": true,
1352
+ "relativePath": [
1353
+ "lib",
1354
+ "commands",
1355
+ "agent",
1356
+ "generate",
1357
+ "authoring-bundle.js"
1358
+ ],
1359
+ "aliasPermutations": [],
1360
+ "permutations": [
1361
+ "agent:generate:authoring-bundle",
1362
+ "generate:agent:authoring-bundle",
1363
+ "generate:authoring-bundle:agent",
1364
+ "agent:authoring-bundle:generate",
1365
+ "authoring-bundle:agent:generate",
1366
+ "authoring-bundle:generate:agent"
1367
+ ]
1368
+ },
1369
+ "agent:generate:template": {
1370
+ "aliases": [],
1371
+ "args": {},
1372
+ "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.",
1373
+ "examples": [
1374
+ "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"
1375
+ ],
1376
+ "flags": {
1377
+ "json": {
1378
+ "description": "Format output as json.",
1379
+ "helpGroup": "GLOBAL",
1380
+ "name": "json",
1381
+ "allowNo": false,
1382
+ "type": "boolean"
1383
+ },
1384
+ "flags-dir": {
1385
+ "helpGroup": "GLOBAL",
1386
+ "name": "flags-dir",
1387
+ "summary": "Import flag values from a directory.",
1388
+ "hasDynamicHelp": false,
1389
+ "multiple": false,
1390
+ "type": "option"
1391
+ },
1392
+ "api-version": {
1393
+ "description": "Override the api version used for api requests made by this command",
1394
+ "name": "api-version",
1395
+ "hasDynamicHelp": false,
1396
+ "multiple": false,
1397
+ "type": "option"
1398
+ },
1399
+ "source-org": {
1400
+ "char": "s",
1401
+ "name": "source-org",
1402
+ "noCacheDefault": true,
1403
+ "required": true,
1404
+ "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
1405
+ "hasDynamicHelp": true,
1406
+ "multiple": false,
1407
+ "type": "option"
1408
+ },
1409
+ "agent-version": {
1410
+ "name": "agent-version",
1411
+ "required": true,
1412
+ "summary": "Version of the agent (BotVersion).",
1413
+ "hasDynamicHelp": false,
1414
+ "multiple": false,
1415
+ "type": "option"
1416
+ },
1417
+ "agent-file": {
1418
+ "char": "f",
1419
+ "name": "agent-file",
1420
+ "required": true,
1421
+ "summary": "Path to an agent (Bot) metadata file.",
1422
+ "hasDynamicHelp": false,
1423
+ "multiple": false,
1424
+ "type": "option"
1425
+ },
1426
+ "output-dir": {
1427
+ "char": "r",
1428
+ "name": "output-dir",
1429
+ "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
1430
+ "hasDynamicHelp": false,
1431
+ "multiple": false,
1432
+ "type": "option"
1433
+ }
1434
+ },
1435
+ "hasDynamicHelp": true,
1436
+ "hiddenAliases": [],
1437
+ "id": "agent:generate:template",
1438
+ "pluginAlias": "@salesforce/plugin-agent",
1439
+ "pluginName": "@salesforce/plugin-agent",
1440
+ "pluginType": "core",
1441
+ "strict": true,
1442
+ "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.",
1443
+ "enableJsonFlag": true,
1444
+ "requiresProject": true,
1445
+ "isESM": true,
1446
+ "relativePath": [
1447
+ "lib",
1448
+ "commands",
1449
+ "agent",
1450
+ "generate",
1451
+ "template.js"
1452
+ ],
1453
+ "aliasPermutations": [],
1454
+ "permutations": [
1455
+ "agent:generate:template",
1456
+ "generate:agent:template",
1457
+ "generate:template:agent",
1458
+ "agent:template:generate",
1459
+ "template:agent:generate",
1460
+ "template:generate:agent"
1461
+ ]
1462
+ },
1463
+ "agent:generate:test-spec": {
1464
+ "aliases": [],
1465
+ "args": {},
1466
+ "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.",
1467
+ "examples": [
1468
+ "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
1469
+ "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",
1470
+ "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"
1471
+ ],
1472
+ "flags": {
1473
+ "flags-dir": {
1474
+ "helpGroup": "GLOBAL",
1475
+ "name": "flags-dir",
1476
+ "summary": "Import flag values from a directory.",
1477
+ "hasDynamicHelp": false,
1478
+ "multiple": false,
1479
+ "type": "option"
1480
+ },
1481
+ "from-definition": {
1482
+ "char": "d",
1483
+ "name": "from-definition",
1484
+ "summary": "Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
1485
+ "hasDynamicHelp": false,
1486
+ "multiple": false,
1487
+ "type": "option"
1488
+ },
1489
+ "force-overwrite": {
1490
+ "name": "force-overwrite",
1491
+ "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
1492
+ "allowNo": false,
1493
+ "type": "boolean"
1494
+ },
1495
+ "output-file": {
1496
+ "char": "f",
1497
+ "name": "output-file",
1498
+ "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\".",
1499
+ "hasDynamicHelp": false,
1500
+ "multiple": false,
1501
+ "type": "option"
1502
+ }
1503
+ },
1504
+ "hasDynamicHelp": false,
1505
+ "hiddenAliases": [],
1506
+ "id": "agent:generate:test-spec",
1507
+ "pluginAlias": "@salesforce/plugin-agent",
1508
+ "pluginName": "@salesforce/plugin-agent",
1509
+ "pluginType": "core",
1510
+ "strict": true,
1511
+ "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
1512
+ "enableJsonFlag": false,
1513
+ "isESM": true,
1514
+ "relativePath": [
1515
+ "lib",
1516
+ "commands",
1517
+ "agent",
1518
+ "generate",
1519
+ "test-spec.js"
1520
+ ],
1521
+ "aliasPermutations": [],
1522
+ "permutations": [
1523
+ "agent:generate:test-spec",
1524
+ "generate:agent:test-spec",
1525
+ "generate:test-spec:agent",
1526
+ "agent:test-spec:generate",
1527
+ "test-spec:agent:generate",
1528
+ "test-spec:generate:agent"
1529
+ ]
1530
+ },
1531
+ "agent:publish:authoring-bundle": {
1532
+ "aliases": [],
1533
+ "args": {},
1534
+ "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.",
1535
+ "examples": [
1536
+ "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1537
+ "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",
1538
+ "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
1539
+ "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
1540
+ ],
1541
+ "flags": {
1542
+ "json": {
1543
+ "description": "Format output as json.",
1544
+ "helpGroup": "GLOBAL",
1545
+ "name": "json",
1546
+ "allowNo": false,
1547
+ "type": "boolean"
1548
+ },
1549
+ "flags-dir": {
1550
+ "helpGroup": "GLOBAL",
1551
+ "name": "flags-dir",
1552
+ "summary": "Import flag values from a directory.",
1553
+ "hasDynamicHelp": false,
1554
+ "multiple": false,
1555
+ "type": "option"
1556
+ },
1557
+ "target-org": {
1558
+ "char": "o",
1559
+ "name": "target-org",
1560
+ "noCacheDefault": true,
1561
+ "required": true,
1562
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1563
+ "hasDynamicHelp": true,
1564
+ "multiple": false,
1565
+ "type": "option"
1566
+ },
1567
+ "api-version": {
1568
+ "description": "Override the api version used for api requests made by this command",
1569
+ "name": "api-version",
1570
+ "hasDynamicHelp": false,
1571
+ "multiple": false,
1572
+ "type": "option"
1573
+ },
1574
+ "api-name": {
1575
+ "char": "n",
1576
+ "name": "api-name",
1577
+ "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1578
+ "hasDynamicHelp": false,
1579
+ "multiple": false,
1580
+ "type": "option"
1581
+ },
1582
+ "skip-retrieve": {
1583
+ "name": "skip-retrieve",
1584
+ "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
1585
+ "allowNo": false,
1586
+ "type": "boolean"
1587
+ },
1588
+ "verbose": {
1589
+ "char": "v",
1590
+ "exclusive": [
1591
+ "concise"
1592
+ ],
1593
+ "name": "verbose",
1594
+ "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
1595
+ "allowNo": false,
1596
+ "type": "boolean"
1597
+ },
1598
+ "concise": {
1599
+ "exclusive": [
1600
+ "verbose"
1601
+ ],
1602
+ "name": "concise",
1603
+ "summary": "Display minimal output with only essential information about the publish operation.",
1604
+ "allowNo": false,
1605
+ "type": "boolean"
1606
+ }
1607
+ },
1608
+ "hasDynamicHelp": true,
1609
+ "hiddenAliases": [],
1610
+ "id": "agent:publish:authoring-bundle",
1611
+ "pluginAlias": "@salesforce/plugin-agent",
1612
+ "pluginName": "@salesforce/plugin-agent",
1613
+ "pluginType": "core",
1614
+ "strict": true,
1615
+ "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
1616
+ "enableJsonFlag": true,
1617
+ "requiresProject": true,
1618
+ "errorCodes": {
1619
+ "header": "ERROR CODES",
1620
+ "body": [
1621
+ {
1622
+ "name": "Succeeded (0)",
1623
+ "description": "Agent published successfully without errors."
1624
+ },
1625
+ {
1626
+ "name": "Failed (1)",
1627
+ "description": "Compilation errors found in the Agent Script file."
1628
+ }
1629
+ ]
1630
+ },
1631
+ "FLAGGABLE_PROMPTS": {
1632
+ "api-name": {
1633
+ "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1634
+ "promptMessage": "API name of the authoring bundle to publish"
1635
+ }
1636
+ },
1637
+ "isESM": true,
1638
+ "relativePath": [
1639
+ "lib",
1640
+ "commands",
1641
+ "agent",
1642
+ "publish",
1643
+ "authoring-bundle.js"
1644
+ ],
1645
+ "aliasPermutations": [],
1646
+ "permutations": [
1647
+ "agent:publish:authoring-bundle",
1648
+ "publish:agent:authoring-bundle",
1649
+ "publish:authoring-bundle:agent",
1650
+ "agent:authoring-bundle:publish",
1651
+ "authoring-bundle:agent:publish",
1652
+ "authoring-bundle:publish:agent"
1653
+ ]
1654
+ },
1655
+ "agent:test:create": {
1656
+ "aliases": [],
1657
+ "args": {},
1658
+ "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 (legacy) or Agentforce Studio (NGT). This command also retrieves the metadata component associated with the new test to your local Salesforce DX project and displays its filename. By default, the legacy AiEvaluationDefinition is created; use --test-runner agentforce-studio to author an AiTestingDefinition (NGT) instead.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
1659
+ "examples": [
1660
+ "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 %>",
1661
+ "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",
1662
+ "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",
1663
+ "Author an Agentforce Studio (NGT) test from an NGT-shaped YAML; writes an AiTestingDefinition metadata file:\n<%= config.bin %> <%= command.id %> --spec specs/ReturnsCheckout.ngt.yaml --api-name Returns_Checkout --test-runner agentforce-studio --target-org my-org"
1664
+ ],
1665
+ "flags": {
1666
+ "json": {
1667
+ "description": "Format output as json.",
1668
+ "helpGroup": "GLOBAL",
1669
+ "name": "json",
1670
+ "allowNo": false,
1671
+ "type": "boolean"
1672
+ },
1673
+ "flags-dir": {
1674
+ "helpGroup": "GLOBAL",
1675
+ "name": "flags-dir",
1676
+ "summary": "Import flag values from a directory.",
1677
+ "hasDynamicHelp": false,
1678
+ "multiple": false,
1679
+ "type": "option"
1680
+ },
1681
+ "api-name": {
1682
+ "name": "api-name",
1683
+ "summary": "API name of the new test; the API name must not exist in the org.",
1684
+ "hasDynamicHelp": false,
1685
+ "multiple": false,
1686
+ "type": "option"
1687
+ },
1688
+ "spec": {
1689
+ "name": "spec",
1690
+ "summary": "Path to the test spec YAML file.",
1691
+ "hasDynamicHelp": false,
1692
+ "multiple": false,
1693
+ "type": "option"
1694
+ },
1695
+ "target-org": {
1696
+ "char": "o",
1697
+ "name": "target-org",
1698
+ "noCacheDefault": true,
1699
+ "required": true,
1700
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1701
+ "hasDynamicHelp": true,
1702
+ "multiple": false,
1703
+ "type": "option"
1704
+ },
1705
+ "api-version": {
1706
+ "description": "Override the api version used for api requests made by this command",
1707
+ "name": "api-version",
1708
+ "hasDynamicHelp": false,
1709
+ "multiple": false,
1710
+ "type": "option"
1711
+ },
1712
+ "preview": {
1713
+ "name": "preview",
1714
+ "summary": "Preview the test metadata file without deploying to your org.",
1715
+ "allowNo": false,
1716
+ "type": "boolean"
1717
+ },
1718
+ "force-overwrite": {
1719
+ "name": "force-overwrite",
1720
+ "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
1721
+ "allowNo": false,
1722
+ "type": "boolean"
1723
+ },
1724
+ "test-runner": {
1725
+ "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.",
1726
+ "name": "test-runner",
1727
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1728
+ "hasDynamicHelp": false,
1729
+ "multiple": false,
1730
+ "options": [
1731
+ "agentforce-studio",
1732
+ "testing-center"
1733
+ ],
1734
+ "type": "option"
1735
+ }
1736
+ },
1737
+ "hasDynamicHelp": true,
1738
+ "hiddenAliases": [],
1739
+ "id": "agent:test:create",
1740
+ "pluginAlias": "@salesforce/plugin-agent",
1741
+ "pluginName": "@salesforce/plugin-agent",
1742
+ "pluginType": "core",
1743
+ "strict": true,
1744
+ "summary": "Create an agent test in your org using a local test spec YAML file.",
1745
+ "enableJsonFlag": true,
1746
+ "envVariablesSection": {
1747
+ "header": "ENVIRONMENT VARIABLES",
1748
+ "body": [
1749
+ {
1750
+ "name": "SF_TARGET_ORG",
1751
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1752
+ }
1753
+ ]
1754
+ },
1755
+ "errorCodes": {
1756
+ "header": "ERROR CODES",
1757
+ "body": [
1758
+ {
1759
+ "name": "Succeeded (0)",
1760
+ "description": "Test created and deployed successfully."
1761
+ },
1762
+ {
1763
+ "name": "Failed (1)",
1764
+ "description": "Test validation errors or metadata format issues."
1765
+ },
1766
+ {
1767
+ "name": "NotFound (2)",
1768
+ "description": "Test spec file not found or org connection failed."
1769
+ },
1770
+ {
1771
+ "name": "DeploymentFailed (4)",
1772
+ "description": "Deployment failed due to API or network errors."
1773
+ }
1774
+ ]
1775
+ },
1776
+ "isESM": true,
1777
+ "relativePath": [
1778
+ "lib",
1779
+ "commands",
1780
+ "agent",
1781
+ "test",
1782
+ "create.js"
1783
+ ],
1784
+ "aliasPermutations": [],
1785
+ "permutations": [
1786
+ "agent:test:create",
1787
+ "test:agent:create",
1788
+ "test:create:agent",
1789
+ "agent:create:test",
1790
+ "create:agent:test",
1791
+ "create:test:agent"
1792
+ ]
1793
+ },
1794
+ "agent:test:list": {
1795
+ "aliases": [],
1796
+ "args": {},
1797
+ "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.",
1798
+ "examples": [
1799
+ "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
1800
+ "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
1801
+ ],
1802
+ "flags": {
1803
+ "json": {
1804
+ "description": "Format output as json.",
1805
+ "helpGroup": "GLOBAL",
1806
+ "name": "json",
1807
+ "allowNo": false,
1808
+ "type": "boolean"
1809
+ },
1810
+ "flags-dir": {
1811
+ "helpGroup": "GLOBAL",
1812
+ "name": "flags-dir",
1813
+ "summary": "Import flag values from a directory.",
1814
+ "hasDynamicHelp": false,
1815
+ "multiple": false,
1816
+ "type": "option"
1817
+ },
1818
+ "target-org": {
1819
+ "char": "o",
1820
+ "name": "target-org",
1821
+ "noCacheDefault": true,
1822
+ "required": true,
1823
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1824
+ "hasDynamicHelp": true,
1825
+ "multiple": false,
1826
+ "type": "option"
1827
+ },
1828
+ "api-version": {
1829
+ "description": "Override the api version used for api requests made by this command",
1830
+ "name": "api-version",
1831
+ "hasDynamicHelp": false,
1832
+ "multiple": false,
1833
+ "type": "option"
1834
+ }
1835
+ },
1836
+ "hasDynamicHelp": true,
1837
+ "hiddenAliases": [],
1838
+ "id": "agent:test:list",
1839
+ "pluginAlias": "@salesforce/plugin-agent",
1840
+ "pluginName": "@salesforce/plugin-agent",
1841
+ "pluginType": "core",
1842
+ "strict": true,
1843
+ "summary": "List the available agent tests in your org.",
1844
+ "enableJsonFlag": true,
1845
+ "envVariablesSection": {
1846
+ "header": "ENVIRONMENT VARIABLES",
1847
+ "body": [
1848
+ {
1849
+ "name": "SF_TARGET_ORG",
1850
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1851
+ }
1852
+ ]
1853
+ },
1854
+ "errorCodes": {
1855
+ "header": "ERROR CODES",
1856
+ "body": [
1857
+ {
1858
+ "name": "Succeeded (0)",
1859
+ "description": "Agent tests listed successfully."
1860
+ },
1861
+ {
1862
+ "name": "Failed (4)",
1863
+ "description": "Failed to retrieve agent tests due to API or network errors."
1864
+ }
1865
+ ]
1866
+ },
1867
+ "isESM": true,
1868
+ "relativePath": [
1869
+ "lib",
1870
+ "commands",
1871
+ "agent",
1872
+ "test",
1873
+ "list.js"
1874
+ ],
1875
+ "aliasPermutations": [],
1876
+ "permutations": [
1877
+ "agent:test:list",
1878
+ "test:agent:list",
1879
+ "test:list:agent",
1880
+ "agent:list:test",
1881
+ "list:agent:test",
1882
+ "list:test:agent"
1883
+ ]
1884
+ },
1885
+ "agent:test:results": {
1886
+ "aliases": [],
1887
+ "args": {},
1888
+ "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.",
1889
+ "examples": [
1890
+ "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1891
+ "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",
1892
+ "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"
1893
+ ],
1894
+ "flags": {
1895
+ "json": {
1896
+ "description": "Format output as json.",
1897
+ "helpGroup": "GLOBAL",
1898
+ "name": "json",
1899
+ "allowNo": false,
1900
+ "type": "boolean"
1901
+ },
1902
+ "flags-dir": {
1903
+ "helpGroup": "GLOBAL",
1904
+ "name": "flags-dir",
1905
+ "summary": "Import flag values from a directory.",
1906
+ "hasDynamicHelp": false,
1907
+ "multiple": false,
1908
+ "type": "option"
1909
+ },
1910
+ "target-org": {
1911
+ "char": "o",
1912
+ "name": "target-org",
1913
+ "noCacheDefault": true,
1914
+ "required": true,
1915
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1916
+ "hasDynamicHelp": true,
1917
+ "multiple": false,
1918
+ "type": "option"
1919
+ },
1920
+ "api-version": {
1921
+ "description": "Override the api version used for api requests made by this command",
1922
+ "name": "api-version",
1923
+ "hasDynamicHelp": false,
1924
+ "multiple": false,
1925
+ "type": "option"
1926
+ },
1927
+ "job-id": {
1928
+ "char": "i",
1929
+ "name": "job-id",
1930
+ "required": true,
1931
+ "summary": "Job ID of the completed agent test run.",
1932
+ "hasDynamicHelp": false,
1933
+ "multiple": false,
1934
+ "type": "option"
1935
+ },
1936
+ "result-format": {
1937
+ "name": "result-format",
1938
+ "summary": "Format of the agent test run results.",
1939
+ "default": "human",
1940
+ "hasDynamicHelp": false,
1941
+ "multiple": false,
1942
+ "options": [
1943
+ "json",
1944
+ "human",
1945
+ "junit",
1946
+ "tap"
1947
+ ],
1948
+ "type": "option"
1949
+ },
1950
+ "output-dir": {
1951
+ "char": "d",
1952
+ "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.",
1953
+ "name": "output-dir",
1954
+ "summary": "Directory to write the agent test results into.",
1955
+ "hasDynamicHelp": false,
1956
+ "multiple": false,
1957
+ "type": "option"
1958
+ },
1959
+ "test-runner": {
1960
+ "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.",
1961
+ "name": "test-runner",
1962
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1963
+ "hasDynamicHelp": false,
1964
+ "multiple": false,
1965
+ "options": [
1966
+ "agentforce-studio",
1967
+ "testing-center"
1968
+ ],
1969
+ "type": "option"
1970
+ },
1971
+ "verbose": {
1972
+ "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.",
1973
+ "name": "verbose",
1974
+ "summary": "Show generated data in the test results output.",
1975
+ "allowNo": false,
1976
+ "type": "boolean"
1977
+ }
1978
+ },
1979
+ "hasDynamicHelp": true,
1980
+ "hiddenAliases": [],
1981
+ "id": "agent:test:results",
1982
+ "pluginAlias": "@salesforce/plugin-agent",
1983
+ "pluginName": "@salesforce/plugin-agent",
1984
+ "pluginType": "core",
1985
+ "strict": true,
1986
+ "summary": "Get the results of a completed agent test run.",
1987
+ "enableJsonFlag": true,
1988
+ "envVariablesSection": {
1989
+ "header": "ENVIRONMENT VARIABLES",
1990
+ "body": [
1991
+ {
1992
+ "name": "SF_TARGET_ORG",
1993
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1994
+ }
1995
+ ]
1996
+ },
1997
+ "errorCodes": {
1998
+ "header": "ERROR CODES",
1999
+ "body": [
2000
+ {
2001
+ "name": "Succeeded (0)",
2002
+ "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
2003
+ },
2004
+ {
2005
+ "name": "NotFound (2)",
2006
+ "description": "Job ID not found or invalid."
2007
+ },
2008
+ {
2009
+ "name": "Failed (4)",
2010
+ "description": "Failed to retrieve results due to API or network errors."
2011
+ }
2012
+ ]
2013
+ },
2014
+ "isESM": true,
2015
+ "relativePath": [
2016
+ "lib",
2017
+ "commands",
2018
+ "agent",
2019
+ "test",
2020
+ "results.js"
2021
+ ],
2022
+ "aliasPermutations": [],
2023
+ "permutations": [
2024
+ "agent:test:results",
2025
+ "test:agent:results",
2026
+ "test:results:agent",
2027
+ "agent:results:test",
2028
+ "results:agent:test",
2029
+ "results:test:agent"
2030
+ ]
2031
+ },
2032
+ "agent:test:resume": {
2033
+ "aliases": [],
2034
+ "args": {},
2035
+ "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.",
2036
+ "examples": [
2037
+ "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
2038
+ "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",
2039
+ "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"
2040
+ ],
2041
+ "flags": {
2042
+ "json": {
2043
+ "description": "Format output as json.",
2044
+ "helpGroup": "GLOBAL",
2045
+ "name": "json",
2046
+ "allowNo": false,
2047
+ "type": "boolean"
2048
+ },
2049
+ "flags-dir": {
2050
+ "helpGroup": "GLOBAL",
2051
+ "name": "flags-dir",
2052
+ "summary": "Import flag values from a directory.",
2053
+ "hasDynamicHelp": false,
2054
+ "multiple": false,
2055
+ "type": "option"
2056
+ },
2057
+ "target-org": {
2058
+ "char": "o",
2059
+ "name": "target-org",
2060
+ "noCacheDefault": true,
2061
+ "required": true,
2062
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2063
+ "hasDynamicHelp": true,
2064
+ "multiple": false,
2065
+ "type": "option"
2066
+ },
2067
+ "api-version": {
2068
+ "description": "Override the api version used for api requests made by this command",
2069
+ "name": "api-version",
2070
+ "hasDynamicHelp": false,
2071
+ "multiple": false,
2072
+ "type": "option"
2073
+ },
2074
+ "job-id": {
2075
+ "char": "i",
2076
+ "name": "job-id",
2077
+ "summary": "Job ID of the original agent test run.",
2078
+ "hasDynamicHelp": false,
2079
+ "multiple": false,
2080
+ "type": "option"
2081
+ },
2082
+ "use-most-recent": {
2083
+ "char": "r",
2084
+ "name": "use-most-recent",
2085
+ "summary": "Use the job ID of the most recent agent test run.",
2086
+ "allowNo": false,
2087
+ "type": "boolean"
2088
+ },
2089
+ "wait": {
2090
+ "char": "w",
2091
+ "name": "wait",
2092
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2093
+ "default": "5 minutes",
2094
+ "hasDynamicHelp": true,
2095
+ "multiple": false,
2096
+ "type": "option"
2097
+ },
2098
+ "result-format": {
2099
+ "name": "result-format",
2100
+ "summary": "Format of the agent test run results.",
2101
+ "default": "human",
2102
+ "hasDynamicHelp": false,
2103
+ "multiple": false,
2104
+ "options": [
2105
+ "json",
2106
+ "human",
2107
+ "junit",
2108
+ "tap"
2109
+ ],
2110
+ "type": "option"
2111
+ },
2112
+ "output-dir": {
2113
+ "char": "d",
2114
+ "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.",
2115
+ "name": "output-dir",
2116
+ "summary": "Directory to write the agent test results into.",
2117
+ "hasDynamicHelp": false,
2118
+ "multiple": false,
2119
+ "type": "option"
2120
+ },
2121
+ "test-runner": {
2122
+ "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.",
2123
+ "name": "test-runner",
2124
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2125
+ "hasDynamicHelp": false,
2126
+ "multiple": false,
2127
+ "options": [
2128
+ "agentforce-studio",
2129
+ "testing-center"
2130
+ ],
2131
+ "type": "option"
2132
+ },
2133
+ "verbose": {
2134
+ "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.",
2135
+ "name": "verbose",
2136
+ "summary": "Show generated data in the test results output.",
2137
+ "allowNo": false,
2138
+ "type": "boolean"
2139
+ }
2140
+ },
2141
+ "hasDynamicHelp": true,
2142
+ "hiddenAliases": [],
2143
+ "id": "agent:test:resume",
2144
+ "pluginAlias": "@salesforce/plugin-agent",
2145
+ "pluginName": "@salesforce/plugin-agent",
2146
+ "pluginType": "core",
2147
+ "strict": true,
2148
+ "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
2149
+ "enableJsonFlag": true,
2150
+ "envVariablesSection": {
2151
+ "header": "ENVIRONMENT VARIABLES",
2152
+ "body": [
2153
+ {
2154
+ "name": "SF_TARGET_ORG",
2155
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2156
+ }
2157
+ ]
2158
+ },
2159
+ "errorCodes": {
2160
+ "header": "ERROR CODES",
2161
+ "body": [
2162
+ {
2163
+ "name": "Succeeded (0)",
2164
+ "description": "Test completed successfully (with test results in the output)."
2165
+ },
2166
+ {
2167
+ "name": "Failed (1)",
2168
+ "description": "Tests encountered execution errors (test cases with ERROR status)."
2169
+ },
2170
+ {
2171
+ "name": "NotFound (2)",
2172
+ "description": "Job ID not found or invalid."
2173
+ },
2174
+ {
2175
+ "name": "OperationFailed (4)",
2176
+ "description": "Failed to poll test due to API or network errors."
2177
+ }
2178
+ ]
2179
+ },
2180
+ "isESM": true,
2181
+ "relativePath": [
2182
+ "lib",
2183
+ "commands",
2184
+ "agent",
2185
+ "test",
2186
+ "resume.js"
2187
+ ],
2188
+ "aliasPermutations": [],
2189
+ "permutations": [
2190
+ "agent:test:resume",
2191
+ "test:agent:resume",
2192
+ "test:resume:agent",
2193
+ "agent:resume:test",
2194
+ "resume:agent:test",
2195
+ "resume:test:agent"
2196
+ ]
2197
+ },
2198
+ "agent:test:run-eval": {
2199
+ "aliases": [],
2200
+ "args": {},
2201
+ "description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, 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 evaluation framework 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 as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
2202
+ "examples": [
2203
+ "Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
2204
+ "Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
2205
+ "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
2206
+ "Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
2207
+ "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 specs/agent-with-context.yaml --target-org my-org",
2208
+ "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
1243
2209
  ],
1244
2210
  "flags": {
1245
2211
  "json": {
@@ -1274,61 +2240,62 @@
1274
2240
  "multiple": false,
1275
2241
  "type": "option"
1276
2242
  },
2243
+ "spec": {
2244
+ "char": "s",
2245
+ "name": "spec",
2246
+ "required": true,
2247
+ "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
2248
+ "hasDynamicHelp": false,
2249
+ "multiple": false,
2250
+ "type": "option"
2251
+ },
1277
2252
  "api-name": {
1278
2253
  "char": "n",
1279
2254
  "name": "api-name",
1280
- "summary": "API name of the activated published agent you want to preview.",
2255
+ "summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
1281
2256
  "hasDynamicHelp": false,
1282
2257
  "multiple": false,
1283
2258
  "type": "option"
1284
2259
  },
1285
- "authoring-bundle": {
1286
- "name": "authoring-bundle",
1287
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2260
+ "result-format": {
2261
+ "name": "result-format",
2262
+ "summary": "Format of the agent test run results.",
2263
+ "default": "human",
1288
2264
  "hasDynamicHelp": false,
1289
2265
  "multiple": false,
1290
- "type": "option"
1291
- },
1292
- "use-live-actions": {
1293
- "exclusive": [
1294
- "simulate-actions"
1295
- ],
1296
- "name": "use-live-actions",
1297
- "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
1298
- "allowNo": false,
1299
- "type": "boolean"
1300
- },
1301
- "simulate-actions": {
1302
- "exclusive": [
1303
- "use-live-actions"
2266
+ "options": [
2267
+ "json",
2268
+ "human",
2269
+ "junit",
2270
+ "tap"
1304
2271
  ],
1305
- "name": "simulate-actions",
1306
- "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
1307
- "allowNo": false,
1308
- "type": "boolean"
2272
+ "type": "option"
1309
2273
  },
1310
- "agent-json": {
1311
- "dependsOn": [
1312
- "authoring-bundle"
1313
- ],
1314
- "hidden": true,
1315
- "name": "agent-json",
1316
- "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2274
+ "batch-size": {
2275
+ "name": "batch-size",
2276
+ "summary": "Number of tests per API request (max 5).",
2277
+ "default": 5,
1317
2278
  "hasDynamicHelp": false,
1318
2279
  "multiple": false,
1319
2280
  "type": "option"
2281
+ },
2282
+ "no-normalize": {
2283
+ "name": "no-normalize",
2284
+ "summary": "Disable auto-normalization of field names and shorthand references.",
2285
+ "allowNo": false,
2286
+ "type": "boolean"
1320
2287
  }
1321
2288
  },
1322
2289
  "hasDynamicHelp": true,
1323
2290
  "hiddenAliases": [],
1324
- "id": "agent:preview:start",
2291
+ "id": "agent:test:run-eval",
1325
2292
  "pluginAlias": "@salesforce/plugin-agent",
1326
2293
  "pluginName": "@salesforce/plugin-agent",
1327
2294
  "pluginType": "core",
2295
+ "state": "beta",
1328
2296
  "strict": true,
1329
- "summary": "Start a programmatic agent preview session.",
2297
+ "summary": "Run rich evaluation tests against an Agentforce agent.",
1330
2298
  "enableJsonFlag": true,
1331
- "requiresProject": true,
1332
2299
  "envVariablesSection": {
1333
2300
  "header": "ENVIRONMENT VARIABLES",
1334
2301
  "body": [
@@ -1343,23 +2310,19 @@
1343
2310
  "body": [
1344
2311
  {
1345
2312
  "name": "Succeeded (0)",
1346
- "description": "Preview session started successfully."
2313
+ "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
1347
2314
  },
1348
2315
  {
1349
2316
  "name": "Failed (1)",
1350
- "description": "Agent Script compilation failed (syntax errors in the script)."
2317
+ "description": "Tests encountered execution errors (tests couldn't run properly)."
1351
2318
  },
1352
2319
  {
1353
2320
  "name": "NotFound (2)",
1354
- "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
1355
- },
1356
- {
1357
- "name": "ServerError (3)",
1358
- "description": "Compilation API returned HTTP 500 (server error during compilation)."
2321
+ "description": "Agent not found, spec file not found, or invalid agent name."
1359
2322
  },
1360
2323
  {
1361
- "name": "PreviewStartFailed (4)",
1362
- "description": "Preview session failed to start due to API or network errors."
2324
+ "name": "OperationFailed (4)",
2325
+ "description": "Failed to execute tests due to API or network errors."
1363
2326
  }
1364
2327
  ]
1365
2328
  },
@@ -1368,28 +2331,27 @@
1368
2331
  "lib",
1369
2332
  "commands",
1370
2333
  "agent",
1371
- "preview",
1372
- "start.js"
2334
+ "test",
2335
+ "run-eval.js"
1373
2336
  ],
1374
2337
  "aliasPermutations": [],
1375
2338
  "permutations": [
1376
- "agent:preview:start",
1377
- "preview:agent:start",
1378
- "preview:start:agent",
1379
- "agent:start:preview",
1380
- "start:agent:preview",
1381
- "start:preview:agent"
2339
+ "agent:test:run-eval",
2340
+ "test:agent:run-eval",
2341
+ "test:run-eval:agent",
2342
+ "agent:run-eval:test",
2343
+ "run-eval:agent:test",
2344
+ "run-eval:test:agent"
1382
2345
  ]
1383
2346
  },
1384
- "agent:publish:authoring-bundle": {
2347
+ "agent:test:run": {
1385
2348
  "aliases": [],
1386
2349
  "args": {},
1387
- "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.",
2350
+ "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.",
1388
2351
  "examples": [
1389
- "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1390
- "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",
1391
- "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
1392
- "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
2352
+ "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",
2353
+ "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",
2354
+ "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"
1393
2355
  ],
1394
2356
  "flags": {
1395
2357
  "json": {
@@ -1427,93 +2389,126 @@
1427
2389
  "api-name": {
1428
2390
  "char": "n",
1429
2391
  "name": "api-name",
1430
- "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
2392
+ "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
1431
2393
  "hasDynamicHelp": false,
1432
2394
  "multiple": false,
1433
2395
  "type": "option"
1434
2396
  },
1435
- "skip-retrieve": {
1436
- "name": "skip-retrieve",
1437
- "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
1438
- "allowNo": false,
1439
- "type": "boolean"
2397
+ "wait": {
2398
+ "char": "w",
2399
+ "name": "wait",
2400
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2401
+ "hasDynamicHelp": true,
2402
+ "multiple": false,
2403
+ "type": "option"
1440
2404
  },
1441
- "verbose": {
1442
- "char": "v",
1443
- "exclusive": [
1444
- "concise"
2405
+ "result-format": {
2406
+ "name": "result-format",
2407
+ "summary": "Format of the agent test run results.",
2408
+ "default": "human",
2409
+ "hasDynamicHelp": false,
2410
+ "multiple": false,
2411
+ "options": [
2412
+ "json",
2413
+ "human",
2414
+ "junit",
2415
+ "tap"
1445
2416
  ],
1446
- "name": "verbose",
1447
- "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
1448
- "allowNo": false,
1449
- "type": "boolean"
2417
+ "type": "option"
1450
2418
  },
1451
- "concise": {
1452
- "exclusive": [
1453
- "verbose"
2419
+ "output-dir": {
2420
+ "char": "d",
2421
+ "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.",
2422
+ "name": "output-dir",
2423
+ "summary": "Directory to write the agent test results into.",
2424
+ "hasDynamicHelp": false,
2425
+ "multiple": false,
2426
+ "type": "option"
2427
+ },
2428
+ "test-runner": {
2429
+ "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.",
2430
+ "name": "test-runner",
2431
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2432
+ "hasDynamicHelp": false,
2433
+ "multiple": false,
2434
+ "options": [
2435
+ "agentforce-studio",
2436
+ "testing-center"
1454
2437
  ],
1455
- "name": "concise",
1456
- "summary": "Display minimal output with only essential information about the publish operation.",
2438
+ "type": "option"
2439
+ },
2440
+ "verbose": {
2441
+ "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.",
2442
+ "name": "verbose",
2443
+ "summary": "Show generated data in the test results output.",
1457
2444
  "allowNo": false,
1458
2445
  "type": "boolean"
1459
2446
  }
1460
2447
  },
1461
2448
  "hasDynamicHelp": true,
1462
2449
  "hiddenAliases": [],
1463
- "id": "agent:publish:authoring-bundle",
2450
+ "id": "agent:test:run",
1464
2451
  "pluginAlias": "@salesforce/plugin-agent",
1465
2452
  "pluginName": "@salesforce/plugin-agent",
1466
2453
  "pluginType": "core",
1467
2454
  "strict": true,
1468
- "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
2455
+ "summary": "Start an agent test in your org.",
1469
2456
  "enableJsonFlag": true,
1470
- "requiresProject": true,
2457
+ "envVariablesSection": {
2458
+ "header": "ENVIRONMENT VARIABLES",
2459
+ "body": [
2460
+ {
2461
+ "name": "SF_TARGET_ORG",
2462
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2463
+ }
2464
+ ]
2465
+ },
1471
2466
  "errorCodes": {
1472
2467
  "header": "ERROR CODES",
1473
2468
  "body": [
1474
2469
  {
1475
2470
  "name": "Succeeded (0)",
1476
- "description": "Agent published successfully without errors."
2471
+ "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
1477
2472
  },
1478
2473
  {
1479
2474
  "name": "Failed (1)",
1480
- "description": "Compilation errors found in the Agent Script file."
2475
+ "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
2476
+ },
2477
+ {
2478
+ "name": "NotFound (2)",
2479
+ "description": "Test definition not found or invalid test name."
2480
+ },
2481
+ {
2482
+ "name": "OperationFailed (4)",
2483
+ "description": "Failed to start or poll test due to API or network errors."
1481
2484
  }
1482
2485
  ]
1483
2486
  },
1484
- "FLAGGABLE_PROMPTS": {
1485
- "api-name": {
1486
- "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1487
- "promptMessage": "API name of the authoring bundle to publish"
1488
- }
1489
- },
1490
2487
  "isESM": true,
1491
2488
  "relativePath": [
1492
2489
  "lib",
1493
2490
  "commands",
1494
2491
  "agent",
1495
- "publish",
1496
- "authoring-bundle.js"
2492
+ "test",
2493
+ "run.js"
1497
2494
  ],
1498
2495
  "aliasPermutations": [],
1499
2496
  "permutations": [
1500
- "agent:publish:authoring-bundle",
1501
- "publish:agent:authoring-bundle",
1502
- "publish:authoring-bundle:agent",
1503
- "agent:authoring-bundle:publish",
1504
- "authoring-bundle:agent:publish",
1505
- "authoring-bundle:publish:agent"
2497
+ "agent:test:run",
2498
+ "test:agent:run",
2499
+ "test:run:agent",
2500
+ "agent:run:test",
2501
+ "run:agent:test",
2502
+ "run:test:agent"
1506
2503
  ]
1507
2504
  },
1508
- "agent:test:create": {
2505
+ "agent:validate:authoring-bundle": {
1509
2506
  "aliases": [],
1510
2507
  "args": {},
1511
- "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 (legacy) or Agentforce Studio (NGT). This command also retrieves the metadata component associated with the new test to your local Salesforce DX project and displays its filename. By default, the legacy AiEvaluationDefinition is created; use --test-runner agentforce-studio to author an AiTestingDefinition (NGT) instead.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
1512
- "examples": [
1513
- "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 %>",
1514
- "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",
1515
- "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",
1516
- "Author an Agentforce Studio (NGT) test from an NGT-shaped YAML; writes an AiTestingDefinition metadata file:\n<%= config.bin %> <%= command.id %> --spec specs/ReturnsCheckout.ngt.yaml --api-name Returns_Checkout --test-runner agentforce-studio --target-org my-org"
2508
+ "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.",
2509
+ "examples": [
2510
+ "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2511
+ "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"
1517
2512
  ],
1518
2513
  "flags": {
1519
2514
  "json": {
@@ -1531,20 +2526,6 @@
1531
2526
  "multiple": false,
1532
2527
  "type": "option"
1533
2528
  },
1534
- "api-name": {
1535
- "name": "api-name",
1536
- "summary": "API name of the new test; the API name must not exist in the org.",
1537
- "hasDynamicHelp": false,
1538
- "multiple": false,
1539
- "type": "option"
1540
- },
1541
- "spec": {
1542
- "name": "spec",
1543
- "summary": "Path to the test spec YAML file.",
1544
- "hasDynamicHelp": false,
1545
- "multiple": false,
1546
- "type": "option"
1547
- },
1548
2529
  "target-org": {
1549
2530
  "char": "o",
1550
2531
  "name": "target-org",
@@ -1562,40 +2543,25 @@
1562
2543
  "multiple": false,
1563
2544
  "type": "option"
1564
2545
  },
1565
- "preview": {
1566
- "name": "preview",
1567
- "summary": "Preview the test metadata file without deploying to your org.",
1568
- "allowNo": false,
1569
- "type": "boolean"
1570
- },
1571
- "force-overwrite": {
1572
- "name": "force-overwrite",
1573
- "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
1574
- "allowNo": false,
1575
- "type": "boolean"
1576
- },
1577
- "test-runner": {
1578
- "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.",
1579
- "name": "test-runner",
1580
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2546
+ "api-name": {
2547
+ "char": "n",
2548
+ "name": "api-name",
2549
+ "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
1581
2550
  "hasDynamicHelp": false,
1582
2551
  "multiple": false,
1583
- "options": [
1584
- "agentforce-studio",
1585
- "testing-center"
1586
- ],
1587
2552
  "type": "option"
1588
2553
  }
1589
2554
  },
1590
2555
  "hasDynamicHelp": true,
1591
2556
  "hiddenAliases": [],
1592
- "id": "agent:test:create",
2557
+ "id": "agent:validate:authoring-bundle",
1593
2558
  "pluginAlias": "@salesforce/plugin-agent",
1594
2559
  "pluginName": "@salesforce/plugin-agent",
1595
2560
  "pluginType": "core",
1596
2561
  "strict": true,
1597
- "summary": "Create an agent test in your org using a local test spec YAML file.",
2562
+ "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
1598
2563
  "enableJsonFlag": true,
2564
+ "requiresProject": true,
1599
2565
  "envVariablesSection": {
1600
2566
  "header": "ENVIRONMENT VARIABLES",
1601
2567
  "body": [
@@ -1610,47 +2576,57 @@
1610
2576
  "body": [
1611
2577
  {
1612
2578
  "name": "Succeeded (0)",
1613
- "description": "Test created and deployed successfully."
2579
+ "description": "Agent Script file compiled successfully without errors."
1614
2580
  },
1615
2581
  {
1616
2582
  "name": "Failed (1)",
1617
- "description": "Test validation errors or metadata format issues."
2583
+ "description": "Compilation errors found in the Agent Script file."
1618
2584
  },
1619
2585
  {
1620
2586
  "name": "NotFound (2)",
1621
- "description": "Test spec file not found or org connection failed."
2587
+ "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
1622
2588
  },
1623
2589
  {
1624
- "name": "DeploymentFailed (4)",
1625
- "description": "Deployment failed due to API or network errors."
2590
+ "name": "ServerError (3)",
2591
+ "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
1626
2592
  }
1627
2593
  ]
1628
2594
  },
2595
+ "FLAGGABLE_PROMPTS": {
2596
+ "api-name": {
2597
+ "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2598
+ "promptMessage": "API name of the authoring bundle to validate"
2599
+ }
2600
+ },
1629
2601
  "isESM": true,
1630
2602
  "relativePath": [
1631
2603
  "lib",
1632
2604
  "commands",
1633
2605
  "agent",
1634
- "test",
1635
- "create.js"
2606
+ "validate",
2607
+ "authoring-bundle.js"
1636
2608
  ],
1637
2609
  "aliasPermutations": [],
1638
2610
  "permutations": [
1639
- "agent:test:create",
1640
- "test:agent:create",
1641
- "test:create:agent",
1642
- "agent:create:test",
1643
- "create:agent:test",
1644
- "create:test:agent"
2611
+ "agent:validate:authoring-bundle",
2612
+ "validate:agent:authoring-bundle",
2613
+ "validate:authoring-bundle:agent",
2614
+ "agent:authoring-bundle:validate",
2615
+ "authoring-bundle:agent:validate",
2616
+ "authoring-bundle:validate:agent"
1645
2617
  ]
1646
2618
  },
1647
- "agent:test:list": {
2619
+ "agent:trace:delete": {
1648
2620
  "aliases": [],
1649
2621
  "args": {},
1650
- "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.",
2622
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\nBy default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.\n\nWithout filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than).",
1651
2623
  "examples": [
1652
- "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
1653
- "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
2624
+ "Delete all traces for all agents and sessions; prompt for confirmation:\n<%= config.bin %> <%= command.id %>",
2625
+ "Delete all traces for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2626
+ "Delete traces from a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2627
+ "Delete traces older than 7 days:\n<%= config.bin %> <%= command.id %> --older-than 7d",
2628
+ "Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt",
2629
+ "Delete all traces for all agents and sessions; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --no-prompt"
1654
2630
  ],
1655
2631
  "flags": {
1656
2632
  "json": {
@@ -1668,52 +2644,51 @@
1668
2644
  "multiple": false,
1669
2645
  "type": "option"
1670
2646
  },
1671
- "target-org": {
1672
- "char": "o",
1673
- "name": "target-org",
1674
- "noCacheDefault": true,
1675
- "required": true,
1676
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1677
- "hasDynamicHelp": true,
2647
+ "agent": {
2648
+ "char": "a",
2649
+ "name": "agent",
2650
+ "summary": "API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
2651
+ "hasDynamicHelp": false,
1678
2652
  "multiple": false,
1679
2653
  "type": "option"
1680
2654
  },
1681
- "api-version": {
1682
- "description": "Override the api version used for api requests made by this command",
1683
- "name": "api-version",
2655
+ "session-id": {
2656
+ "name": "session-id",
2657
+ "summary": "Session ID used to filter the list of trace files you want to delete. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
2658
+ "hasDynamicHelp": false,
2659
+ "multiple": false,
2660
+ "type": "option"
2661
+ },
2662
+ "older-than": {
2663
+ "name": "older-than",
2664
+ "summary": "Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w.",
1684
2665
  "hasDynamicHelp": false,
1685
2666
  "multiple": false,
1686
2667
  "type": "option"
2668
+ },
2669
+ "no-prompt": {
2670
+ "name": "no-prompt",
2671
+ "summary": "Skip the confirmation prompt and delete immediately.",
2672
+ "allowNo": false,
2673
+ "type": "boolean"
1687
2674
  }
1688
2675
  },
1689
- "hasDynamicHelp": true,
2676
+ "hasDynamicHelp": false,
1690
2677
  "hiddenAliases": [],
1691
- "id": "agent:test:list",
2678
+ "id": "agent:trace:delete",
1692
2679
  "pluginAlias": "@salesforce/plugin-agent",
1693
2680
  "pluginName": "@salesforce/plugin-agent",
1694
2681
  "pluginType": "core",
1695
2682
  "strict": true,
1696
- "summary": "List the available agent tests in your org.",
2683
+ "summary": "Delete trace files from an agent preview session.",
1697
2684
  "enableJsonFlag": true,
1698
- "envVariablesSection": {
1699
- "header": "ENVIRONMENT VARIABLES",
1700
- "body": [
1701
- {
1702
- "name": "SF_TARGET_ORG",
1703
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1704
- }
1705
- ]
1706
- },
2685
+ "requiresProject": true,
1707
2686
  "errorCodes": {
1708
2687
  "header": "ERROR CODES",
1709
2688
  "body": [
1710
2689
  {
1711
2690
  "name": "Succeeded (0)",
1712
- "description": "Agent tests listed successfully."
1713
- },
1714
- {
1715
- "name": "Failed (4)",
1716
- "description": "Failed to retrieve agent tests due to API or network errors."
2691
+ "description": "Traces deleted successfully (or no traces matched)."
1717
2692
  }
1718
2693
  ]
1719
2694
  },
@@ -1722,27 +2697,31 @@
1722
2697
  "lib",
1723
2698
  "commands",
1724
2699
  "agent",
1725
- "test",
1726
- "list.js"
2700
+ "trace",
2701
+ "delete.js"
1727
2702
  ],
1728
2703
  "aliasPermutations": [],
1729
2704
  "permutations": [
1730
- "agent:test:list",
1731
- "test:agent:list",
1732
- "test:list:agent",
1733
- "agent:list:test",
1734
- "list:agent:test",
1735
- "list:test:agent"
2705
+ "agent:trace:delete",
2706
+ "trace:agent:delete",
2707
+ "trace:delete:agent",
2708
+ "agent:delete:trace",
2709
+ "delete:agent:trace",
2710
+ "delete:trace:agent"
1736
2711
  ]
1737
2712
  },
1738
- "agent:test:results": {
2713
+ "agent:trace:list": {
1739
2714
  "aliases": [],
1740
2715
  "args": {},
1741
- "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.",
2716
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since).\n\nEach row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.",
1742
2717
  "examples": [
1743
- "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1744
- "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",
1745
- "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"
2718
+ "List all trace files for all agents and sessions:\n<%= config.bin %> <%= command.id %>",
2719
+ "List all trace files for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2720
+ "List trace files for a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2721
+ "List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n<%= config.bin %> <%= command.id %> --since 2026-04-20",
2722
+ "List trace files recorded on or after a specific UTC time:\n<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z",
2723
+ "Filter by agent and date together:\n<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20",
2724
+ "Return results as JSON:\n<%= config.bin %> <%= command.id %> --json"
1746
2725
  ],
1747
2726
  "flags": {
1748
2727
  "json": {
@@ -1760,107 +2739,46 @@
1760
2739
  "multiple": false,
1761
2740
  "type": "option"
1762
2741
  },
1763
- "target-org": {
1764
- "char": "o",
1765
- "name": "target-org",
1766
- "noCacheDefault": true,
1767
- "required": true,
1768
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1769
- "hasDynamicHelp": true,
1770
- "multiple": false,
1771
- "type": "option"
1772
- },
1773
- "api-version": {
1774
- "description": "Override the api version used for api requests made by this command",
1775
- "name": "api-version",
1776
- "hasDynamicHelp": false,
1777
- "multiple": false,
1778
- "type": "option"
1779
- },
1780
- "job-id": {
1781
- "char": "i",
1782
- "name": "job-id",
1783
- "required": true,
1784
- "summary": "Job ID of the completed agent test run.",
1785
- "hasDynamicHelp": false,
1786
- "multiple": false,
1787
- "type": "option"
1788
- },
1789
- "result-format": {
1790
- "name": "result-format",
1791
- "summary": "Format of the agent test run results.",
1792
- "default": "human",
2742
+ "session-id": {
2743
+ "name": "session-id",
2744
+ "summary": "Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
1793
2745
  "hasDynamicHelp": false,
1794
2746
  "multiple": false,
1795
- "options": [
1796
- "json",
1797
- "human",
1798
- "junit",
1799
- "tap"
1800
- ],
1801
2747
  "type": "option"
1802
2748
  },
1803
- "output-dir": {
1804
- "char": "d",
1805
- "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.",
1806
- "name": "output-dir",
1807
- "summary": "Directory to write the agent test results into.",
2749
+ "agent": {
2750
+ "char": "a",
2751
+ "name": "agent",
2752
+ "summary": "API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
1808
2753
  "hasDynamicHelp": false,
1809
2754
  "multiple": false,
1810
2755
  "type": "option"
1811
2756
  },
1812
- "test-runner": {
1813
- "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.",
1814
- "name": "test-runner",
1815
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2757
+ "since": {
2758
+ "description": "Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds (2026-04-20T14:00:00.000Z). The \"Recorded At\" values shown in the table output are valid inputs.",
2759
+ "name": "since",
2760
+ "summary": "Date used to filter the list of trace files; only those recorded on or after the date are listed.",
1816
2761
  "hasDynamicHelp": false,
1817
2762
  "multiple": false,
1818
- "options": [
1819
- "agentforce-studio",
1820
- "testing-center"
1821
- ],
1822
2763
  "type": "option"
1823
- },
1824
- "verbose": {
1825
- "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.",
1826
- "name": "verbose",
1827
- "summary": "Show generated data in the test results output.",
1828
- "allowNo": false,
1829
- "type": "boolean"
1830
2764
  }
1831
2765
  },
1832
- "hasDynamicHelp": true,
2766
+ "hasDynamicHelp": false,
1833
2767
  "hiddenAliases": [],
1834
- "id": "agent:test:results",
2768
+ "id": "agent:trace:list",
1835
2769
  "pluginAlias": "@salesforce/plugin-agent",
1836
2770
  "pluginName": "@salesforce/plugin-agent",
1837
2771
  "pluginType": "core",
1838
2772
  "strict": true,
1839
- "summary": "Get the results of a completed agent test run.",
1840
- "enableJsonFlag": true,
1841
- "envVariablesSection": {
1842
- "header": "ENVIRONMENT VARIABLES",
1843
- "body": [
1844
- {
1845
- "name": "SF_TARGET_ORG",
1846
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1847
- }
1848
- ]
1849
- },
2773
+ "summary": "List the available trace files that were recorded during all agent preview sessions.",
2774
+ "enableJsonFlag": true,
2775
+ "requiresProject": true,
1850
2776
  "errorCodes": {
1851
2777
  "header": "ERROR CODES",
1852
2778
  "body": [
1853
2779
  {
1854
2780
  "name": "Succeeded (0)",
1855
- "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
1856
- },
1857
- {
1858
- "name": "NotFound (2)",
1859
- "description": "Job ID not found or invalid."
1860
- },
1861
- {
1862
- "name": "Failed (4)",
1863
- "description": "Failed to retrieve results due to API or network errors."
2781
+ "description": "Trace files listed successfully (or empty list if none found)."
1864
2782
  }
1865
2783
  ]
1866
2784
  },
@@ -1869,27 +2787,31 @@
1869
2787
  "lib",
1870
2788
  "commands",
1871
2789
  "agent",
1872
- "test",
1873
- "results.js"
2790
+ "trace",
2791
+ "list.js"
1874
2792
  ],
1875
2793
  "aliasPermutations": [],
1876
2794
  "permutations": [
1877
- "agent:test:results",
1878
- "test:agent:results",
1879
- "test:results:agent",
1880
- "agent:results:test",
1881
- "results:agent:test",
1882
- "results:test:agent"
2795
+ "agent:trace:list",
2796
+ "trace:agent:list",
2797
+ "trace:list:agent",
2798
+ "agent:list:trace",
2799
+ "list:agent:trace",
2800
+ "list:trace:agent"
1883
2801
  ]
1884
2802
  },
1885
- "agent:test:resume": {
2803
+ "agent:trace:read": {
1886
2804
  "aliases": [],
1887
2805
  "args": {},
1888
- "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.",
2806
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior.\n\nUse the --format flag to specify one of these formats of the outputted trace data:\n\n- summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a preview session.\n- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise.\n- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.\n\nIf you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide:\n\n- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session.\n- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem - the AI reasoning that determined which actions to take.\n- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation.\n- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps.",
1889
2807
  "examples": [
1890
- "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1891
- "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",
1892
- "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"
2808
+ "Show a session trace summary for all turns in the session with the specified ID:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2809
+ "Show a trace summary for the second turn (utterance or response) of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2",
2810
+ "Drill into action execution across all turns:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions",
2811
+ "Drill into routing decisions for the first turn of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1",
2812
+ "Show all errors across the session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors",
2813
+ "Output raw trace JSON for custom parsing:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw",
2814
+ "Return results as JSON:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json"
1893
2815
  ],
1894
2816
  "flags": {
1895
2817
  "json": {
@@ -1907,158 +2829,90 @@
1907
2829
  "multiple": false,
1908
2830
  "type": "option"
1909
2831
  },
1910
- "target-org": {
1911
- "char": "o",
1912
- "name": "target-org",
1913
- "noCacheDefault": true,
2832
+ "session-id": {
2833
+ "char": "s",
2834
+ "name": "session-id",
1914
2835
  "required": true,
1915
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1916
- "hasDynamicHelp": true,
1917
- "multiple": false,
1918
- "type": "option"
1919
- },
1920
- "api-version": {
1921
- "description": "Override the api version used for api requests made by this command",
1922
- "name": "api-version",
1923
- "hasDynamicHelp": false,
1924
- "multiple": false,
1925
- "type": "option"
1926
- },
1927
- "job-id": {
1928
- "char": "i",
1929
- "name": "job-id",
1930
- "summary": "Job ID of the original agent test run.",
2836
+ "summary": "Session ID to read traces for. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs",
1931
2837
  "hasDynamicHelp": false,
1932
2838
  "multiple": false,
1933
2839
  "type": "option"
1934
2840
  },
1935
- "use-most-recent": {
1936
- "char": "r",
1937
- "name": "use-most-recent",
1938
- "summary": "Use the job ID of the most recent agent test run.",
1939
- "allowNo": false,
1940
- "type": "boolean"
1941
- },
1942
- "wait": {
1943
- "char": "w",
1944
- "name": "wait",
1945
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
1946
- "default": "5 minutes",
1947
- "hasDynamicHelp": true,
1948
- "multiple": false,
1949
- "type": "option"
1950
- },
1951
- "result-format": {
1952
- "name": "result-format",
1953
- "summary": "Format of the agent test run results.",
1954
- "default": "human",
2841
+ "format": {
2842
+ "char": "f",
2843
+ "name": "format",
2844
+ "summary": "Output format of the trace data; specifies the level of detail you want in the trace files.",
2845
+ "default": "summary",
1955
2846
  "hasDynamicHelp": false,
1956
2847
  "multiple": false,
1957
2848
  "options": [
1958
- "json",
1959
- "human",
1960
- "junit",
1961
- "tap"
2849
+ "summary",
2850
+ "detail",
2851
+ "raw"
1962
2852
  ],
1963
2853
  "type": "option"
1964
2854
  },
1965
- "output-dir": {
2855
+ "dimension": {
1966
2856
  "char": "d",
1967
- "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.",
1968
- "name": "output-dir",
1969
- "summary": "Directory to write the agent test results into.",
2857
+ "name": "dimension",
2858
+ "summary": "Dimension to drill into when using \"--format detail\"; used to filter and organize the trace data to answer a specific type of question.",
1970
2859
  "hasDynamicHelp": false,
1971
2860
  "multiple": false,
2861
+ "options": [
2862
+ "actions",
2863
+ "grounding",
2864
+ "routing",
2865
+ "errors"
2866
+ ],
1972
2867
  "type": "option"
1973
2868
  },
1974
- "test-runner": {
1975
- "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.",
1976
- "name": "test-runner",
1977
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2869
+ "turn": {
2870
+ "char": "t",
2871
+ "name": "turn",
2872
+ "summary": "Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1.",
1978
2873
  "hasDynamicHelp": false,
1979
2874
  "multiple": false,
1980
- "options": [
1981
- "agentforce-studio",
1982
- "testing-center"
1983
- ],
1984
2875
  "type": "option"
1985
- },
1986
- "verbose": {
1987
- "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.",
1988
- "name": "verbose",
1989
- "summary": "Show generated data in the test results output.",
1990
- "allowNo": false,
1991
- "type": "boolean"
1992
2876
  }
1993
2877
  },
1994
- "hasDynamicHelp": true,
2878
+ "hasDynamicHelp": false,
1995
2879
  "hiddenAliases": [],
1996
- "id": "agent:test:resume",
2880
+ "id": "agent:trace:read",
1997
2881
  "pluginAlias": "@salesforce/plugin-agent",
1998
2882
  "pluginName": "@salesforce/plugin-agent",
1999
2883
  "pluginType": "core",
2000
2884
  "strict": true,
2001
- "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
2885
+ "summary": "Read trace files from an agent preview session.",
2002
2886
  "enableJsonFlag": true,
2003
- "envVariablesSection": {
2004
- "header": "ENVIRONMENT VARIABLES",
2005
- "body": [
2006
- {
2007
- "name": "SF_TARGET_ORG",
2008
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2009
- }
2010
- ]
2011
- },
2012
- "errorCodes": {
2013
- "header": "ERROR CODES",
2014
- "body": [
2015
- {
2016
- "name": "Succeeded (0)",
2017
- "description": "Test completed successfully (with test results in the output)."
2018
- },
2019
- {
2020
- "name": "Failed (1)",
2021
- "description": "Tests encountered execution errors (test cases with ERROR status)."
2022
- },
2023
- {
2024
- "name": "NotFound (2)",
2025
- "description": "Job ID not found or invalid."
2026
- },
2027
- {
2028
- "name": "OperationFailed (4)",
2029
- "description": "Failed to poll test due to API or network errors."
2030
- }
2031
- ]
2032
- },
2887
+ "requiresProject": true,
2033
2888
  "isESM": true,
2034
2889
  "relativePath": [
2035
2890
  "lib",
2036
2891
  "commands",
2037
2892
  "agent",
2038
- "test",
2039
- "resume.js"
2893
+ "trace",
2894
+ "read.js"
2040
2895
  ],
2041
2896
  "aliasPermutations": [],
2042
2897
  "permutations": [
2043
- "agent:test:resume",
2044
- "test:agent:resume",
2045
- "test:resume:agent",
2046
- "agent:resume:test",
2047
- "resume:agent:test",
2048
- "resume:test:agent"
2898
+ "agent:trace:read",
2899
+ "trace:agent:read",
2900
+ "trace:read:agent",
2901
+ "agent:read:trace",
2902
+ "read:agent:trace",
2903
+ "read:trace:agent"
2049
2904
  ]
2050
2905
  },
2051
- "agent:test:run-eval": {
2906
+ "agent:preview:end": {
2052
2907
  "aliases": [],
2053
2908
  "args": {},
2054
- "description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, 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 evaluation framework 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 as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
2909
+ "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.",
2055
2910
  "examples": [
2056
- "Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
2057
- "Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
2058
- "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
2059
- "Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
2060
- "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 specs/agent-with-context.yaml --target-org my-org",
2061
- "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
2911
+ "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",
2912
+ "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",
2913
+ "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",
2914
+ "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",
2915
+ "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>"
2062
2916
  ],
2063
2917
  "flags": {
2064
2918
  "json": {
@@ -2093,62 +2947,65 @@
2093
2947
  "multiple": false,
2094
2948
  "type": "option"
2095
2949
  },
2096
- "spec": {
2097
- "char": "s",
2098
- "name": "spec",
2099
- "required": true,
2100
- "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
2950
+ "session-id": {
2951
+ "exclusive": [
2952
+ "all"
2953
+ ],
2954
+ "name": "session-id",
2955
+ "required": false,
2956
+ "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.",
2101
2957
  "hasDynamicHelp": false,
2102
2958
  "multiple": false,
2103
2959
  "type": "option"
2104
2960
  },
2105
2961
  "api-name": {
2106
2962
  "char": "n",
2963
+ "exclusive": [
2964
+ "authoring-bundle"
2965
+ ],
2107
2966
  "name": "api-name",
2108
- "summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
2967
+ "summary": "API name of the activated published agent you want to preview.",
2109
2968
  "hasDynamicHelp": false,
2110
2969
  "multiple": false,
2111
2970
  "type": "option"
2112
2971
  },
2113
- "result-format": {
2114
- "name": "result-format",
2115
- "summary": "Format of the agent test run results.",
2116
- "default": "human",
2117
- "hasDynamicHelp": false,
2118
- "multiple": false,
2119
- "options": [
2120
- "json",
2121
- "human",
2122
- "junit",
2123
- "tap"
2972
+ "authoring-bundle": {
2973
+ "exclusive": [
2974
+ "api-name"
2124
2975
  ],
2125
- "type": "option"
2126
- },
2127
- "batch-size": {
2128
- "name": "batch-size",
2129
- "summary": "Number of tests per API request (max 5).",
2130
- "default": 5,
2976
+ "name": "authoring-bundle",
2977
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2131
2978
  "hasDynamicHelp": false,
2132
2979
  "multiple": false,
2133
2980
  "type": "option"
2134
2981
  },
2135
- "no-normalize": {
2136
- "name": "no-normalize",
2137
- "summary": "Disable auto-normalization of field names and shorthand references.",
2982
+ "all": {
2983
+ "exclusive": [
2984
+ "session-id"
2985
+ ],
2986
+ "name": "all",
2987
+ "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.",
2988
+ "allowNo": false,
2989
+ "type": "boolean"
2990
+ },
2991
+ "no-prompt": {
2992
+ "char": "p",
2993
+ "name": "no-prompt",
2994
+ "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
2138
2995
  "allowNo": false,
2139
2996
  "type": "boolean"
2140
2997
  }
2141
2998
  },
2142
2999
  "hasDynamicHelp": true,
2143
3000
  "hiddenAliases": [],
2144
- "id": "agent:test:run-eval",
3001
+ "id": "agent:preview:end",
2145
3002
  "pluginAlias": "@salesforce/plugin-agent",
2146
3003
  "pluginName": "@salesforce/plugin-agent",
2147
3004
  "pluginType": "core",
2148
- "state": "beta",
2149
3005
  "strict": true,
2150
- "summary": "Run rich evaluation tests against an Agentforce agent.",
3006
+ "summary": "End an existing programmatic agent preview session and get trace location.",
2151
3007
  "enableJsonFlag": true,
3008
+ "requiresProject": true,
2152
3009
  "envVariablesSection": {
2153
3010
  "header": "ENVIRONMENT VARIABLES",
2154
3011
  "body": [
@@ -2163,19 +3020,27 @@
2163
3020
  "body": [
2164
3021
  {
2165
3022
  "name": "Succeeded (0)",
2166
- "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
3023
+ "description": "Preview session ended successfully and traces saved."
2167
3024
  },
2168
3025
  {
2169
- "name": "Failed (1)",
2170
- "description": "Tests encountered execution errors (tests couldn't run properly)."
3026
+ "name": "ExactlyOneRequired (2)",
3027
+ "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
2171
3028
  },
2172
3029
  {
2173
3030
  "name": "NotFound (2)",
2174
- "description": "Agent not found, spec file not found, or invalid agent name."
3031
+ "description": "Agent not found, or no preview session exists for this agent."
2175
3032
  },
2176
3033
  {
2177
- "name": "OperationFailed (4)",
2178
- "description": "Failed to execute tests due to API or network errors."
3034
+ "name": "PreviewEndFailed (4)",
3035
+ "description": "Failed to end the preview session."
3036
+ },
3037
+ {
3038
+ "name": "PreviewEndPartialFailure (68)",
3039
+ "description": "With --all, one or more sessions failed to end while others succeeded."
3040
+ },
3041
+ {
3042
+ "name": "SessionAmbiguous (5)",
3043
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
2179
3044
  }
2180
3045
  ]
2181
3046
  },
@@ -2184,27 +3049,27 @@
2184
3049
  "lib",
2185
3050
  "commands",
2186
3051
  "agent",
2187
- "test",
2188
- "run-eval.js"
3052
+ "preview",
3053
+ "end.js"
2189
3054
  ],
2190
3055
  "aliasPermutations": [],
2191
3056
  "permutations": [
2192
- "agent:test:run-eval",
2193
- "test:agent:run-eval",
2194
- "test:run-eval:agent",
2195
- "agent:run-eval:test",
2196
- "run-eval:agent:test",
2197
- "run-eval:test:agent"
3057
+ "agent:preview:end",
3058
+ "preview:agent:end",
3059
+ "preview:end:agent",
3060
+ "agent:end:preview",
3061
+ "end:agent:preview",
3062
+ "end:preview:agent"
2198
3063
  ]
2199
3064
  },
2200
- "agent:test:run": {
3065
+ "agent:preview:send": {
2201
3066
  "aliases": [],
2202
3067
  "args": {},
2203
- "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.",
3068
+ "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.",
2204
3069
  "examples": [
2205
- "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",
2206
- "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",
2207
- "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"
3070
+ "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>",
3071
+ "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",
3072
+ "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"
2208
3073
  ],
2209
3074
  "flags": {
2210
3075
  "json": {
@@ -2239,74 +3104,49 @@
2239
3104
  "multiple": false,
2240
3105
  "type": "option"
2241
3106
  },
2242
- "api-name": {
2243
- "char": "n",
2244
- "name": "api-name",
2245
- "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
3107
+ "session-id": {
3108
+ "name": "session-id",
3109
+ "required": false,
3110
+ "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.",
2246
3111
  "hasDynamicHelp": false,
2247
3112
  "multiple": false,
2248
3113
  "type": "option"
2249
3114
  },
2250
- "wait": {
2251
- "char": "w",
2252
- "name": "wait",
2253
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2254
- "hasDynamicHelp": true,
2255
- "multiple": false,
2256
- "type": "option"
2257
- },
2258
- "result-format": {
2259
- "name": "result-format",
2260
- "summary": "Format of the agent test run results.",
2261
- "default": "human",
3115
+ "utterance": {
3116
+ "char": "u",
3117
+ "name": "utterance",
3118
+ "required": true,
3119
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
2262
3120
  "hasDynamicHelp": false,
2263
3121
  "multiple": false,
2264
- "options": [
2265
- "json",
2266
- "human",
2267
- "junit",
2268
- "tap"
2269
- ],
2270
3122
  "type": "option"
2271
3123
  },
2272
- "output-dir": {
2273
- "char": "d",
2274
- "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.",
2275
- "name": "output-dir",
2276
- "summary": "Directory to write the agent test results into.",
3124
+ "api-name": {
3125
+ "char": "n",
3126
+ "name": "api-name",
3127
+ "summary": "API name of the activated published agent you want to preview.",
2277
3128
  "hasDynamicHelp": false,
2278
3129
  "multiple": false,
2279
3130
  "type": "option"
2280
3131
  },
2281
- "test-runner": {
2282
- "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.",
2283
- "name": "test-runner",
2284
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
3132
+ "authoring-bundle": {
3133
+ "name": "authoring-bundle",
3134
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2285
3135
  "hasDynamicHelp": false,
2286
3136
  "multiple": false,
2287
- "options": [
2288
- "agentforce-studio",
2289
- "testing-center"
2290
- ],
2291
3137
  "type": "option"
2292
- },
2293
- "verbose": {
2294
- "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.",
2295
- "name": "verbose",
2296
- "summary": "Show generated data in the test results output.",
2297
- "allowNo": false,
2298
- "type": "boolean"
2299
3138
  }
2300
3139
  },
2301
3140
  "hasDynamicHelp": true,
2302
3141
  "hiddenAliases": [],
2303
- "id": "agent:test:run",
3142
+ "id": "agent:preview:send",
2304
3143
  "pluginAlias": "@salesforce/plugin-agent",
2305
3144
  "pluginName": "@salesforce/plugin-agent",
2306
3145
  "pluginType": "core",
2307
3146
  "strict": true,
2308
- "summary": "Start an agent test in your org.",
3147
+ "summary": "Send a message to an existing agent preview session.",
2309
3148
  "enableJsonFlag": true,
3149
+ "requiresProject": true,
2310
3150
  "envVariablesSection": {
2311
3151
  "header": "ENVIRONMENT VARIABLES",
2312
3152
  "body": [
@@ -2321,19 +3161,19 @@
2321
3161
  "body": [
2322
3162
  {
2323
3163
  "name": "Succeeded (0)",
2324
- "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
3164
+ "description": "Message sent successfully and agent response received."
2325
3165
  },
2326
3166
  {
2327
- "name": "Failed (1)",
2328
- "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
3167
+ "name": "NotFound (2)",
3168
+ "description": "Agent not found, or no preview session exists for this agent."
2329
3169
  },
2330
3170
  {
2331
- "name": "NotFound (2)",
2332
- "description": "Test definition not found or invalid test name."
3171
+ "name": "PreviewSendFailed (4)",
3172
+ "description": "Failed to send message or receive response from the preview session."
2333
3173
  },
2334
3174
  {
2335
- "name": "OperationFailed (4)",
2336
- "description": "Failed to start or poll test due to API or network errors."
3175
+ "name": "SessionAmbiguous (5)",
3176
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
2337
3177
  }
2338
3178
  ]
2339
3179
  },
@@ -2342,30 +3182,88 @@
2342
3182
  "lib",
2343
3183
  "commands",
2344
3184
  "agent",
2345
- "test",
2346
- "run.js"
3185
+ "preview",
3186
+ "send.js"
2347
3187
  ],
2348
3188
  "aliasPermutations": [],
2349
3189
  "permutations": [
2350
- "agent:test:run",
2351
- "test:agent:run",
2352
- "test:run:agent",
2353
- "agent:run:test",
2354
- "run:agent:test",
2355
- "run:test:agent"
3190
+ "agent:preview:send",
3191
+ "preview:agent:send",
3192
+ "preview:send:agent",
3193
+ "agent:send:preview",
3194
+ "send:agent:preview",
3195
+ "send:preview:agent"
2356
3196
  ]
2357
3197
  },
2358
- "agent:trace:delete": {
3198
+ "agent:preview:sessions": {
2359
3199
  "aliases": [],
2360
3200
  "args": {},
2361
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\nBy default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.\n\nWithout filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than).",
3201
+ "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.",
2362
3202
  "examples": [
2363
- "Delete all traces for all agents and sessions; prompt for confirmation:\n<%= config.bin %> <%= command.id %>",
2364
- "Delete all traces for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2365
- "Delete traces from a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2366
- "Delete traces older than 7 days:\n<%= config.bin %> <%= command.id %> --older-than 7d",
2367
- "Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt",
2368
- "Delete all traces for all agents and sessions; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --no-prompt"
3203
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
3204
+ ],
3205
+ "flags": {
3206
+ "json": {
3207
+ "description": "Format output as json.",
3208
+ "helpGroup": "GLOBAL",
3209
+ "name": "json",
3210
+ "allowNo": false,
3211
+ "type": "boolean"
3212
+ },
3213
+ "flags-dir": {
3214
+ "helpGroup": "GLOBAL",
3215
+ "name": "flags-dir",
3216
+ "summary": "Import flag values from a directory.",
3217
+ "hasDynamicHelp": false,
3218
+ "multiple": false,
3219
+ "type": "option"
3220
+ }
3221
+ },
3222
+ "hasDynamicHelp": false,
3223
+ "hiddenAliases": [],
3224
+ "id": "agent:preview:sessions",
3225
+ "pluginAlias": "@salesforce/plugin-agent",
3226
+ "pluginName": "@salesforce/plugin-agent",
3227
+ "pluginType": "core",
3228
+ "strict": true,
3229
+ "summary": "List all known programmatic agent preview sessions.",
3230
+ "enableJsonFlag": true,
3231
+ "requiresProject": true,
3232
+ "errorCodes": {
3233
+ "header": "ERROR CODES",
3234
+ "body": [
3235
+ {
3236
+ "name": "Succeeded (0)",
3237
+ "description": "Sessions listed successfully (or empty list if no active sessions)."
3238
+ }
3239
+ ]
3240
+ },
3241
+ "isESM": true,
3242
+ "relativePath": [
3243
+ "lib",
3244
+ "commands",
3245
+ "agent",
3246
+ "preview",
3247
+ "sessions.js"
3248
+ ],
3249
+ "aliasPermutations": [],
3250
+ "permutations": [
3251
+ "agent:preview:sessions",
3252
+ "preview:agent:sessions",
3253
+ "preview:sessions:agent",
3254
+ "agent:sessions:preview",
3255
+ "sessions:agent:preview",
3256
+ "sessions:preview:agent"
3257
+ ]
3258
+ },
3259
+ "agent:preview:start": {
3260
+ "aliases": [],
3261
+ "args": {},
3262
+ "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.",
3263
+ "examples": [
3264
+ "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",
3265
+ "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",
3266
+ "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2369
3267
  ],
2370
3268
  "flags": {
2371
3269
  "json": {
@@ -2383,51 +3281,109 @@
2383
3281
  "multiple": false,
2384
3282
  "type": "option"
2385
3283
  },
2386
- "agent": {
2387
- "char": "a",
2388
- "name": "agent",
2389
- "summary": "API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
3284
+ "target-org": {
3285
+ "char": "o",
3286
+ "name": "target-org",
3287
+ "noCacheDefault": true,
3288
+ "required": true,
3289
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3290
+ "hasDynamicHelp": true,
3291
+ "multiple": false,
3292
+ "type": "option"
3293
+ },
3294
+ "api-version": {
3295
+ "description": "Override the api version used for api requests made by this command",
3296
+ "name": "api-version",
2390
3297
  "hasDynamicHelp": false,
2391
3298
  "multiple": false,
2392
3299
  "type": "option"
2393
3300
  },
2394
- "session-id": {
2395
- "name": "session-id",
2396
- "summary": "Session ID used to filter the list of trace files you want to delete. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
3301
+ "api-name": {
3302
+ "char": "n",
3303
+ "name": "api-name",
3304
+ "summary": "API name of the activated published agent you want to preview.",
3305
+ "hasDynamicHelp": false,
3306
+ "multiple": false,
3307
+ "type": "option"
3308
+ },
3309
+ "authoring-bundle": {
3310
+ "name": "authoring-bundle",
3311
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2397
3312
  "hasDynamicHelp": false,
2398
3313
  "multiple": false,
2399
3314
  "type": "option"
2400
3315
  },
2401
- "older-than": {
2402
- "name": "older-than",
2403
- "summary": "Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w.",
3316
+ "use-live-actions": {
3317
+ "exclusive": [
3318
+ "simulate-actions"
3319
+ ],
3320
+ "name": "use-live-actions",
3321
+ "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
3322
+ "allowNo": false,
3323
+ "type": "boolean"
3324
+ },
3325
+ "simulate-actions": {
3326
+ "exclusive": [
3327
+ "use-live-actions"
3328
+ ],
3329
+ "name": "simulate-actions",
3330
+ "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
3331
+ "allowNo": false,
3332
+ "type": "boolean"
3333
+ },
3334
+ "agent-json": {
3335
+ "dependsOn": [
3336
+ "authoring-bundle"
3337
+ ],
3338
+ "hidden": true,
3339
+ "name": "agent-json",
3340
+ "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2404
3341
  "hasDynamicHelp": false,
2405
3342
  "multiple": false,
2406
3343
  "type": "option"
2407
- },
2408
- "no-prompt": {
2409
- "name": "no-prompt",
2410
- "summary": "Skip the confirmation prompt and delete immediately.",
2411
- "allowNo": false,
2412
- "type": "boolean"
2413
3344
  }
2414
3345
  },
2415
- "hasDynamicHelp": false,
3346
+ "hasDynamicHelp": true,
2416
3347
  "hiddenAliases": [],
2417
- "id": "agent:trace:delete",
3348
+ "id": "agent:preview:start",
2418
3349
  "pluginAlias": "@salesforce/plugin-agent",
2419
3350
  "pluginName": "@salesforce/plugin-agent",
2420
3351
  "pluginType": "core",
2421
3352
  "strict": true,
2422
- "summary": "Delete trace files from an agent preview session.",
3353
+ "summary": "Start a programmatic agent preview session.",
2423
3354
  "enableJsonFlag": true,
2424
3355
  "requiresProject": true,
3356
+ "envVariablesSection": {
3357
+ "header": "ENVIRONMENT VARIABLES",
3358
+ "body": [
3359
+ {
3360
+ "name": "SF_TARGET_ORG",
3361
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3362
+ }
3363
+ ]
3364
+ },
2425
3365
  "errorCodes": {
2426
3366
  "header": "ERROR CODES",
2427
3367
  "body": [
2428
3368
  {
2429
3369
  "name": "Succeeded (0)",
2430
- "description": "Traces deleted successfully (or no traces matched)."
3370
+ "description": "Preview session started successfully."
3371
+ },
3372
+ {
3373
+ "name": "Failed (1)",
3374
+ "description": "Agent Script compilation failed (syntax errors in the script)."
3375
+ },
3376
+ {
3377
+ "name": "NotFound (2)",
3378
+ "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
3379
+ },
3380
+ {
3381
+ "name": "ServerError (3)",
3382
+ "description": "Compilation API returned HTTP 500 (server error during compilation)."
3383
+ },
3384
+ {
3385
+ "name": "PreviewStartFailed (4)",
3386
+ "description": "Preview session failed to start due to API or network errors."
2431
3387
  }
2432
3388
  ]
2433
3389
  },
@@ -2436,31 +3392,25 @@
2436
3392
  "lib",
2437
3393
  "commands",
2438
3394
  "agent",
2439
- "trace",
2440
- "delete.js"
3395
+ "preview",
3396
+ "start.js"
2441
3397
  ],
2442
3398
  "aliasPermutations": [],
2443
3399
  "permutations": [
2444
- "agent:trace:delete",
2445
- "trace:agent:delete",
2446
- "trace:delete:agent",
2447
- "agent:delete:trace",
2448
- "delete:agent:trace",
2449
- "delete:trace:agent"
3400
+ "agent:preview:start",
3401
+ "preview:agent:start",
3402
+ "preview:start:agent",
3403
+ "agent:start:preview",
3404
+ "start:agent:preview",
3405
+ "start:preview:agent"
2450
3406
  ]
2451
3407
  },
2452
- "agent:trace:list": {
3408
+ "agent:adl:file:add": {
2453
3409
  "aliases": [],
2454
3410
  "args": {},
2455
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since).\n\nEach row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.",
3411
+ "description": "Adds one or more files to an existing SFDRIVE data library and triggers SearchIndex re-hydration. This is the day-2 operation for adding files to an already-provisioned library.\n\nConstraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.",
2456
3412
  "examples": [
2457
- "List all trace files for all agents and sessions:\n<%= config.bin %> <%= command.id %>",
2458
- "List all trace files for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2459
- "List trace files for a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2460
- "List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n<%= config.bin %> <%= command.id %> --since 2026-04-20",
2461
- "List trace files recorded on or after a specific UTC time:\n<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z",
2462
- "Filter by agent and date together:\n<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20",
2463
- "Return results as JSON:\n<%= config.bin %> <%= command.id %> --json"
3413
+ "Add a file to an existing library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/new-guide.pdf --target-org myOrg"
2464
3414
  ],
2465
3415
  "flags": {
2466
3416
  "json": {
@@ -2478,79 +3428,95 @@
2478
3428
  "multiple": false,
2479
3429
  "type": "option"
2480
3430
  },
2481
- "session-id": {
2482
- "name": "session-id",
2483
- "summary": "Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
3431
+ "target-org": {
3432
+ "char": "o",
3433
+ "name": "target-org",
3434
+ "noCacheDefault": true,
3435
+ "required": true,
3436
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3437
+ "hasDynamicHelp": true,
3438
+ "multiple": false,
3439
+ "type": "option"
3440
+ },
3441
+ "api-version": {
3442
+ "description": "Override the api version used for api requests made by this command",
3443
+ "name": "api-version",
2484
3444
  "hasDynamicHelp": false,
2485
3445
  "multiple": false,
2486
3446
  "type": "option"
2487
3447
  },
2488
- "agent": {
2489
- "char": "a",
2490
- "name": "agent",
2491
- "summary": "API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
3448
+ "library-id": {
3449
+ "char": "i",
3450
+ "name": "library-id",
3451
+ "required": true,
3452
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
2492
3453
  "hasDynamicHelp": false,
2493
3454
  "multiple": false,
2494
3455
  "type": "option"
2495
3456
  },
2496
- "since": {
2497
- "description": "Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds (2026-04-20T14:00:00.000Z). The \"Recorded At\" values shown in the table output are valid inputs.",
2498
- "name": "since",
2499
- "summary": "Date used to filter the list of trace files; only those recorded on or after the date are listed.",
3457
+ "file": {
3458
+ "char": "f",
3459
+ "name": "file",
3460
+ "required": true,
3461
+ "summary": "Path to the file to add to the library.",
2500
3462
  "hasDynamicHelp": false,
2501
3463
  "multiple": false,
2502
3464
  "type": "option"
2503
3465
  }
2504
3466
  },
2505
- "hasDynamicHelp": false,
3467
+ "hasDynamicHelp": true,
2506
3468
  "hiddenAliases": [],
2507
- "id": "agent:trace:list",
3469
+ "id": "agent:adl:file:add",
2508
3470
  "pluginAlias": "@salesforce/plugin-agent",
2509
3471
  "pluginName": "@salesforce/plugin-agent",
2510
3472
  "pluginType": "core",
3473
+ "state": "preview",
2511
3474
  "strict": true,
2512
- "summary": "List the available trace files that were recorded during all agent preview sessions.",
3475
+ "summary": "Add files to an existing Agentforce Data Library.",
2513
3476
  "enableJsonFlag": true,
2514
- "requiresProject": true,
2515
- "errorCodes": {
2516
- "header": "ERROR CODES",
2517
- "body": [
2518
- {
2519
- "name": "Succeeded (0)",
2520
- "description": "Trace files listed successfully (or empty list if none found)."
2521
- }
2522
- ]
2523
- },
2524
3477
  "isESM": true,
2525
3478
  "relativePath": [
2526
3479
  "lib",
2527
3480
  "commands",
2528
3481
  "agent",
2529
- "trace",
2530
- "list.js"
3482
+ "adl",
3483
+ "file",
3484
+ "add.js"
2531
3485
  ],
2532
3486
  "aliasPermutations": [],
2533
3487
  "permutations": [
2534
- "agent:trace:list",
2535
- "trace:agent:list",
2536
- "trace:list:agent",
2537
- "agent:list:trace",
2538
- "list:agent:trace",
2539
- "list:trace:agent"
3488
+ "agent:adl:file:add",
3489
+ "adl:agent:file:add",
3490
+ "adl:file:agent:add",
3491
+ "adl:file:add:agent",
3492
+ "agent:file:adl:add",
3493
+ "file:agent:adl:add",
3494
+ "file:adl:agent:add",
3495
+ "file:adl:add:agent",
3496
+ "agent:file:add:adl",
3497
+ "file:agent:add:adl",
3498
+ "file:add:agent:adl",
3499
+ "file:add:adl:agent",
3500
+ "agent:adl:add:file",
3501
+ "adl:agent:add:file",
3502
+ "adl:add:agent:file",
3503
+ "adl:add:file:agent",
3504
+ "agent:add:adl:file",
3505
+ "add:agent:adl:file",
3506
+ "add:adl:agent:file",
3507
+ "add:adl:file:agent",
3508
+ "agent:add:file:adl",
3509
+ "add:agent:file:adl",
3510
+ "add:file:agent:adl",
3511
+ "add:file:adl:agent"
2540
3512
  ]
2541
3513
  },
2542
- "agent:trace:read": {
3514
+ "agent:adl:file:delete": {
2543
3515
  "aliases": [],
2544
3516
  "args": {},
2545
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior.\n\nUse the --format flag to specify one of these formats of the outputted trace data:\n\n- summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a preview session.\n- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise.\n- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.\n\nIf you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide:\n\n- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session.\n- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem - the AI reasoning that determined which actions to take.\n- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation.\n- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps.",
3517
+ "description": "Permanently removes a file from an SFDRIVE data library and triggers re-indexing of the search index.",
2546
3518
  "examples": [
2547
- "Show a session trace summary for all turns in the session with the specified ID:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2548
- "Show a trace summary for the second turn (utterance or response) of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2",
2549
- "Drill into action execution across all turns:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions",
2550
- "Drill into routing decisions for the first turn of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1",
2551
- "Show all errors across the session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors",
2552
- "Output raw trace JSON for custom parsing:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw",
2553
- "Return results as JSON:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json"
3519
+ "Delete a file from a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg"
2554
3520
  ],
2555
3521
  "flags": {
2556
3522
  "json": {
@@ -2568,87 +3534,95 @@
2568
3534
  "multiple": false,
2569
3535
  "type": "option"
2570
3536
  },
2571
- "session-id": {
2572
- "char": "s",
2573
- "name": "session-id",
3537
+ "target-org": {
3538
+ "char": "o",
3539
+ "name": "target-org",
3540
+ "noCacheDefault": true,
2574
3541
  "required": true,
2575
- "summary": "Session ID to read traces for. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs",
2576
- "hasDynamicHelp": false,
3542
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3543
+ "hasDynamicHelp": true,
2577
3544
  "multiple": false,
2578
3545
  "type": "option"
2579
3546
  },
2580
- "format": {
2581
- "char": "f",
2582
- "name": "format",
2583
- "summary": "Output format of the trace data; specifies the level of detail you want in the trace files.",
2584
- "default": "summary",
3547
+ "api-version": {
3548
+ "description": "Override the api version used for api requests made by this command",
3549
+ "name": "api-version",
2585
3550
  "hasDynamicHelp": false,
2586
3551
  "multiple": false,
2587
- "options": [
2588
- "summary",
2589
- "detail",
2590
- "raw"
2591
- ],
2592
3552
  "type": "option"
2593
3553
  },
2594
- "dimension": {
2595
- "char": "d",
2596
- "name": "dimension",
2597
- "summary": "Dimension to drill into when using \"--format detail\"; used to filter and organize the trace data to answer a specific type of question.",
3554
+ "library-id": {
3555
+ "char": "i",
3556
+ "name": "library-id",
3557
+ "required": true,
3558
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
2598
3559
  "hasDynamicHelp": false,
2599
3560
  "multiple": false,
2600
- "options": [
2601
- "actions",
2602
- "grounding",
2603
- "routing",
2604
- "errors"
2605
- ],
2606
3561
  "type": "option"
2607
3562
  },
2608
- "turn": {
2609
- "char": "t",
2610
- "name": "turn",
2611
- "summary": "Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1.",
3563
+ "file-id": {
3564
+ "name": "file-id",
3565
+ "required": true,
3566
+ "summary": "ID of the file to delete (AiGroundingFileRef record ID).",
2612
3567
  "hasDynamicHelp": false,
2613
3568
  "multiple": false,
2614
3569
  "type": "option"
2615
3570
  }
2616
3571
  },
2617
- "hasDynamicHelp": false,
3572
+ "hasDynamicHelp": true,
2618
3573
  "hiddenAliases": [],
2619
- "id": "agent:trace:read",
3574
+ "id": "agent:adl:file:delete",
2620
3575
  "pluginAlias": "@salesforce/plugin-agent",
2621
3576
  "pluginName": "@salesforce/plugin-agent",
2622
3577
  "pluginType": "core",
3578
+ "state": "preview",
2623
3579
  "strict": true,
2624
- "summary": "Read trace files from an agent preview session.",
3580
+ "summary": "Delete a file from an Agentforce Data Library.",
2625
3581
  "enableJsonFlag": true,
2626
- "requiresProject": true,
2627
3582
  "isESM": true,
2628
3583
  "relativePath": [
2629
3584
  "lib",
2630
3585
  "commands",
2631
3586
  "agent",
2632
- "trace",
2633
- "read.js"
3587
+ "adl",
3588
+ "file",
3589
+ "delete.js"
2634
3590
  ],
2635
3591
  "aliasPermutations": [],
2636
3592
  "permutations": [
2637
- "agent:trace:read",
2638
- "trace:agent:read",
2639
- "trace:read:agent",
2640
- "agent:read:trace",
2641
- "read:agent:trace",
2642
- "read:trace:agent"
3593
+ "agent:adl:file:delete",
3594
+ "adl:agent:file:delete",
3595
+ "adl:file:agent:delete",
3596
+ "adl:file:delete:agent",
3597
+ "agent:file:adl:delete",
3598
+ "file:agent:adl:delete",
3599
+ "file:adl:agent:delete",
3600
+ "file:adl:delete:agent",
3601
+ "agent:file:delete:adl",
3602
+ "file:agent:delete:adl",
3603
+ "file:delete:agent:adl",
3604
+ "file:delete:adl:agent",
3605
+ "agent:adl:delete:file",
3606
+ "adl:agent:delete:file",
3607
+ "adl:delete:agent:file",
3608
+ "adl:delete:file:agent",
3609
+ "agent:delete:adl:file",
3610
+ "delete:agent:adl:file",
3611
+ "delete:adl:agent:file",
3612
+ "delete:adl:file:agent",
3613
+ "agent:delete:file:adl",
3614
+ "delete:agent:file:adl",
3615
+ "delete:file:agent:adl",
3616
+ "delete:file:adl:agent"
2643
3617
  ]
2644
3618
  },
2645
- "agent:validate:authoring-bundle": {
3619
+ "agent:adl:file:list": {
2646
3620
  "aliases": [],
2647
3621
  "args": {},
2648
- "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.",
3622
+ "description": "Returns the list of files in an SFDRIVE library including file name, size, and creation date.",
2649
3623
  "examples": [
2650
- "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2651
- "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"
3624
+ "List files in a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg",
3625
+ "List files and output as JSON:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json"
2652
3626
  ],
2653
3627
  "flags": {
2654
3628
  "json": {
@@ -2683,10 +3657,11 @@
2683
3657
  "multiple": false,
2684
3658
  "type": "option"
2685
3659
  },
2686
- "api-name": {
2687
- "char": "n",
2688
- "name": "api-name",
2689
- "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
3660
+ "library-id": {
3661
+ "char": "i",
3662
+ "name": "library-id",
3663
+ "required": true,
3664
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
2690
3665
  "hasDynamicHelp": false,
2691
3666
  "multiple": false,
2692
3667
  "type": "option"
@@ -2694,68 +3669,51 @@
2694
3669
  },
2695
3670
  "hasDynamicHelp": true,
2696
3671
  "hiddenAliases": [],
2697
- "id": "agent:validate:authoring-bundle",
3672
+ "id": "agent:adl:file:list",
2698
3673
  "pluginAlias": "@salesforce/plugin-agent",
2699
3674
  "pluginName": "@salesforce/plugin-agent",
2700
3675
  "pluginType": "core",
3676
+ "state": "preview",
2701
3677
  "strict": true,
2702
- "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
3678
+ "summary": "List files in an Agentforce Data Library.",
2703
3679
  "enableJsonFlag": true,
2704
- "requiresProject": true,
2705
- "envVariablesSection": {
2706
- "header": "ENVIRONMENT VARIABLES",
2707
- "body": [
2708
- {
2709
- "name": "SF_TARGET_ORG",
2710
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2711
- }
2712
- ]
2713
- },
2714
- "errorCodes": {
2715
- "header": "ERROR CODES",
2716
- "body": [
2717
- {
2718
- "name": "Succeeded (0)",
2719
- "description": "Agent Script file compiled successfully without errors."
2720
- },
2721
- {
2722
- "name": "Failed (1)",
2723
- "description": "Compilation errors found in the Agent Script file."
2724
- },
2725
- {
2726
- "name": "NotFound (2)",
2727
- "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
2728
- },
2729
- {
2730
- "name": "ServerError (3)",
2731
- "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
2732
- }
2733
- ]
2734
- },
2735
- "FLAGGABLE_PROMPTS": {
2736
- "api-name": {
2737
- "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2738
- "promptMessage": "API name of the authoring bundle to validate"
2739
- }
2740
- },
2741
3680
  "isESM": true,
2742
3681
  "relativePath": [
2743
3682
  "lib",
2744
3683
  "commands",
2745
3684
  "agent",
2746
- "validate",
2747
- "authoring-bundle.js"
3685
+ "adl",
3686
+ "file",
3687
+ "list.js"
2748
3688
  ],
2749
3689
  "aliasPermutations": [],
2750
3690
  "permutations": [
2751
- "agent:validate:authoring-bundle",
2752
- "validate:agent:authoring-bundle",
2753
- "validate:authoring-bundle:agent",
2754
- "agent:authoring-bundle:validate",
2755
- "authoring-bundle:agent:validate",
2756
- "authoring-bundle:validate:agent"
3691
+ "agent:adl:file:list",
3692
+ "adl:agent:file:list",
3693
+ "adl:file:agent:list",
3694
+ "adl:file:list:agent",
3695
+ "agent:file:adl:list",
3696
+ "file:agent:adl:list",
3697
+ "file:adl:agent:list",
3698
+ "file:adl:list:agent",
3699
+ "agent:file:list:adl",
3700
+ "file:agent:list:adl",
3701
+ "file:list:agent:adl",
3702
+ "file:list:adl:agent",
3703
+ "agent:adl:list:file",
3704
+ "adl:agent:list:file",
3705
+ "adl:list:agent:file",
3706
+ "adl:list:file:agent",
3707
+ "agent:list:adl:file",
3708
+ "list:agent:adl:file",
3709
+ "list:adl:agent:file",
3710
+ "list:adl:file:agent",
3711
+ "agent:list:file:adl",
3712
+ "list:agent:file:adl",
3713
+ "list:file:agent:adl",
3714
+ "list:file:adl:agent"
2757
3715
  ]
2758
3716
  }
2759
3717
  },
2760
- "version": "1.41.0"
3718
+ "version": "1.42.0"
2761
3719
  }