@salesforce/plugin-agent 1.41.0 → 1.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +424 -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 +63 -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 +64 -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 +66 -0
  19. package/lib/commands/agent/adl/get.js.map +1 -0
  20. package/lib/commands/agent/adl/list.d.ts +18 -0
  21. package/lib/commands/agent/adl/list.js +63 -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 +21 -0
  27. package/lib/commands/agent/adl/update.js +102 -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 +80 -0
  31. package/lib/commands/agent/adl/upload.js.map +1 -0
  32. package/lib/commands/agent/generate/test-spec.js +1 -1
  33. package/lib/commands/agent/generate/test-spec.js.map +1 -1
  34. package/messages/agent.adl.create.md +65 -0
  35. package/messages/agent.adl.delete.md +21 -0
  36. package/messages/agent.adl.file.add.md +31 -0
  37. package/messages/agent.adl.file.delete.md +25 -0
  38. package/messages/agent.adl.file.list.md +25 -0
  39. package/messages/agent.adl.get.md +21 -0
  40. package/messages/agent.adl.list.md +25 -0
  41. package/messages/agent.adl.status.md +21 -0
  42. package/messages/agent.adl.update.md +53 -0
  43. package/messages/agent.adl.upload.md +55 -0
  44. package/oclif.manifest.json +1799 -821
  45. package/package.json +14 -4
  46. package/schemas/agent-adl-create.json +83 -0
  47. package/schemas/agent-adl-delete.json +19 -0
  48. package/schemas/agent-adl-file-add.json +31 -0
  49. package/schemas/agent-adl-file-delete.json +19 -0
  50. package/schemas/agent-adl-file-list.json +44 -0
  51. package/schemas/agent-adl-get.json +83 -0
  52. package/schemas/agent-adl-list.json +44 -0
  53. package/schemas/agent-adl-status.json +63 -0
  54. package/schemas/agent-adl-update.json +83 -0
  55. package/schemas/agent-adl-upload.json +28 -0
  56. 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,70 @@
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"
742
+ "api-version": {
743
+ "description": "Override the api version used for api requests made by this command",
744
+ "name": "api-version",
745
+ "hasDynamicHelp": false,
746
+ "multiple": false,
747
+ "type": "option"
845
748
  },
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\".",
749
+ "source-type": {
750
+ "name": "source-type",
751
+ "summary": "Filter by source type: sfdrive, knowledge, or retriever.",
850
752
  "hasDynamicHelp": false,
851
753
  "multiple": false,
754
+ "options": [
755
+ "sfdrive",
756
+ "knowledge",
757
+ "retriever"
758
+ ],
852
759
  "type": "option"
853
760
  }
854
761
  },
855
- "hasDynamicHelp": false,
762
+ "hasDynamicHelp": true,
856
763
  "hiddenAliases": [],
857
- "id": "agent:generate:test-spec",
764
+ "id": "agent:adl:list",
858
765
  "pluginAlias": "@salesforce/plugin-agent",
859
766
  "pluginName": "@salesforce/plugin-agent",
860
767
  "pluginType": "core",
768
+ "state": "preview",
861
769
  "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,
770
+ "summary": "List Agentforce Data Libraries in an org.",
771
+ "enableJsonFlag": true,
864
772
  "isESM": true,
865
773
  "relativePath": [
866
774
  "lib",
867
775
  "commands",
868
776
  "agent",
869
- "generate",
870
- "test-spec.js"
777
+ "adl",
778
+ "list.js"
871
779
  ],
872
780
  "aliasPermutations": [],
873
781
  "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"
782
+ "agent:adl:list",
783
+ "adl:agent:list",
784
+ "adl:list:agent",
785
+ "agent:list:adl",
786
+ "list:agent:adl",
787
+ "list:adl:agent"
880
788
  ]
881
789
  },
882
- "agent:preview:end": {
790
+ "agent:adl:status": {
883
791
  "aliases": [],
884
792
  "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.",
793
+ "description": "Returns the current indexing status including stage details (DATA_LAKE_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
886
794
  "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>"
795
+ "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
892
796
  ],
893
797
  "flags": {
894
798
  "json": {
@@ -923,129 +827,53 @@
923
827
  "multiple": false,
924
828
  "type": "option"
925
829
  },
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.",
830
+ "library-id": {
831
+ "char": "i",
832
+ "name": "library-id",
833
+ "required": true,
834
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
954
835
  "hasDynamicHelp": false,
955
836
  "multiple": false,
956
837
  "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
838
  }
974
839
  },
975
840
  "hasDynamicHelp": true,
976
841
  "hiddenAliases": [],
977
- "id": "agent:preview:end",
842
+ "id": "agent:adl:status",
978
843
  "pluginAlias": "@salesforce/plugin-agent",
979
844
  "pluginName": "@salesforce/plugin-agent",
980
845
  "pluginType": "core",
846
+ "state": "preview",
981
847
  "strict": true,
982
- "summary": "End an existing programmatic agent preview session and get trace location.",
848
+ "summary": "Get indexing status of an Agentforce Data Library.",
983
849
  "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
850
  "isESM": true,
1024
851
  "relativePath": [
1025
852
  "lib",
1026
853
  "commands",
1027
854
  "agent",
1028
- "preview",
1029
- "end.js"
855
+ "adl",
856
+ "status.js"
1030
857
  ],
1031
858
  "aliasPermutations": [],
1032
859
  "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"
860
+ "agent:adl:status",
861
+ "adl:agent:status",
862
+ "adl:status:agent",
863
+ "agent:status:adl",
864
+ "status:agent:adl",
865
+ "status:adl:agent"
1039
866
  ]
1040
867
  },
1041
- "agent:preview:send": {
868
+ "agent:adl:update": {
1042
869
  "aliases": [],
1043
870
  "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.",
871
+ "description": "Updates the label, description, or other mutable properties of an existing data library.",
1045
872
  "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"
873
+ "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
874
+ "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
875
+ "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",
876
+ "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
1049
877
  ],
1050
878
  "flags": {
1051
879
  "json": {
@@ -1080,166 +908,86 @@
1080
908
  "multiple": false,
1081
909
  "type": "option"
1082
910
  },
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.",
911
+ "library-id": {
912
+ "char": "i",
913
+ "name": "library-id",
914
+ "required": true,
915
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1087
916
  "hasDynamicHelp": false,
1088
917
  "multiple": false,
1089
918
  "type": "option"
1090
919
  },
1091
- "utterance": {
1092
- "char": "u",
1093
- "name": "utterance",
1094
- "required": true,
1095
- "summary": "Utterance to send to the agent, enclosed in double quotes.",
920
+ "name": {
921
+ "char": "n",
922
+ "name": "name",
923
+ "summary": "New display name for the data library (max 80 characters).",
1096
924
  "hasDynamicHelp": false,
1097
925
  "multiple": false,
1098
926
  "type": "option"
1099
927
  },
1100
- "api-name": {
1101
- "char": "n",
1102
- "name": "api-name",
1103
- "summary": "API name of the activated published agent you want to preview.",
928
+ "description": {
929
+ "name": "description",
930
+ "summary": "New description for the data library (max 255 characters).",
1104
931
  "hasDynamicHelp": false,
1105
932
  "multiple": false,
1106
933
  "type": "option"
1107
934
  },
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.",
935
+ "content-fields": {
936
+ "name": "content-fields",
937
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
1111
938
  "hasDynamicHelp": false,
1112
939
  "multiple": false,
1113
940
  "type": "option"
1114
- }
1115
- },
1116
- "hasDynamicHelp": true,
1117
- "hiddenAliases": [],
1118
- "id": "agent:preview:send",
1119
- "pluginAlias": "@salesforce/plugin-agent",
1120
- "pluginName": "@salesforce/plugin-agent",
1121
- "pluginType": "core",
1122
- "strict": true,
1123
- "summary": "Send a message to an existing agent preview session.",
1124
- "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
- "isESM": true,
1157
- "relativePath": [
1158
- "lib",
1159
- "commands",
1160
- "agent",
1161
- "preview",
1162
- "send.js"
1163
- ],
1164
- "aliasPermutations": [],
1165
- "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"
1172
- ]
1173
- },
1174
- "agent:preview:sessions": {
1175
- "aliases": [],
1176
- "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.",
1178
- "examples": [
1179
- "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
1180
- ],
1181
- "flags": {
1182
- "json": {
1183
- "description": "Format output as json.",
1184
- "helpGroup": "GLOBAL",
1185
- "name": "json",
1186
- "allowNo": false,
941
+ },
942
+ "restrict-to-public-articles": {
943
+ "name": "restrict-to-public-articles",
944
+ "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
945
+ "allowNo": true,
1187
946
  "type": "boolean"
1188
947
  },
1189
- "flags-dir": {
1190
- "helpGroup": "GLOBAL",
1191
- "name": "flags-dir",
1192
- "summary": "Import flag values from a directory.",
948
+ "retriever-id": {
949
+ "name": "retriever-id",
950
+ "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
1193
951
  "hasDynamicHelp": false,
1194
952
  "multiple": false,
1195
953
  "type": "option"
1196
954
  }
1197
955
  },
1198
- "hasDynamicHelp": false,
956
+ "hasDynamicHelp": true,
1199
957
  "hiddenAliases": [],
1200
- "id": "agent:preview:sessions",
958
+ "id": "agent:adl:update",
1201
959
  "pluginAlias": "@salesforce/plugin-agent",
1202
960
  "pluginName": "@salesforce/plugin-agent",
1203
961
  "pluginType": "core",
962
+ "state": "preview",
1204
963
  "strict": true,
1205
- "summary": "List all known programmatic agent preview sessions.",
964
+ "summary": "Update an Agentforce Data Library.",
1206
965
  "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
966
  "isESM": true,
1218
967
  "relativePath": [
1219
968
  "lib",
1220
969
  "commands",
1221
970
  "agent",
1222
- "preview",
1223
- "sessions.js"
971
+ "adl",
972
+ "update.js"
1224
973
  ],
1225
974
  "aliasPermutations": [],
1226
975
  "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"
976
+ "agent:adl:update",
977
+ "adl:agent:update",
978
+ "adl:update:agent",
979
+ "agent:update:adl",
980
+ "update:agent:adl",
981
+ "update:adl:agent"
1233
982
  ]
1234
983
  },
1235
- "agent:preview:start": {
984
+ "agent:adl:upload": {
1236
985
  "aliases": [],
1237
986
  "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.",
987
+ "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.",
1239
988
  "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"
989
+ "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",
990
+ "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
1243
991
  ],
1244
992
  "flags": {
1245
993
  "json": {
@@ -1274,46 +1022,831 @@
1274
1022
  "multiple": false,
1275
1023
  "type": "option"
1276
1024
  },
1277
- "api-name": {
1278
- "char": "n",
1025
+ "library-id": {
1026
+ "char": "i",
1027
+ "name": "library-id",
1028
+ "required": true,
1029
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1030
+ "hasDynamicHelp": false,
1031
+ "multiple": false,
1032
+ "type": "option"
1033
+ },
1034
+ "file": {
1035
+ "char": "f",
1036
+ "name": "file",
1037
+ "required": true,
1038
+ "summary": "Path to the file to upload.",
1039
+ "hasDynamicHelp": false,
1040
+ "multiple": true,
1041
+ "type": "option"
1042
+ },
1043
+ "wait": {
1044
+ "char": "w",
1045
+ "name": "wait",
1046
+ "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
1047
+ "hasDynamicHelp": true,
1048
+ "multiple": false,
1049
+ "type": "option"
1050
+ }
1051
+ },
1052
+ "hasDynamicHelp": true,
1053
+ "hiddenAliases": [],
1054
+ "id": "agent:adl:upload",
1055
+ "pluginAlias": "@salesforce/plugin-agent",
1056
+ "pluginName": "@salesforce/plugin-agent",
1057
+ "pluginType": "core",
1058
+ "state": "preview",
1059
+ "strict": true,
1060
+ "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1061
+ "enableJsonFlag": true,
1062
+ "isESM": true,
1063
+ "relativePath": [
1064
+ "lib",
1065
+ "commands",
1066
+ "agent",
1067
+ "adl",
1068
+ "upload.js"
1069
+ ],
1070
+ "aliasPermutations": [],
1071
+ "permutations": [
1072
+ "agent:adl:upload",
1073
+ "adl:agent:upload",
1074
+ "adl:upload:agent",
1075
+ "agent:upload:adl",
1076
+ "upload:agent:adl",
1077
+ "upload:adl:agent"
1078
+ ]
1079
+ },
1080
+ "agent:generate:agent-spec": {
1081
+ "aliases": [],
1082
+ "args": {},
1083
+ "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.)",
1084
+ "examples": [
1085
+ "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.\"",
1086
+ "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",
1087
+ "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
1088
+ "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\"",
1089
+ "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"
1090
+ ],
1091
+ "flags": {
1092
+ "json": {
1093
+ "description": "Format output as json.",
1094
+ "helpGroup": "GLOBAL",
1095
+ "name": "json",
1096
+ "allowNo": false,
1097
+ "type": "boolean"
1098
+ },
1099
+ "flags-dir": {
1100
+ "helpGroup": "GLOBAL",
1101
+ "name": "flags-dir",
1102
+ "summary": "Import flag values from a directory.",
1103
+ "hasDynamicHelp": false,
1104
+ "multiple": false,
1105
+ "type": "option"
1106
+ },
1107
+ "target-org": {
1108
+ "char": "o",
1109
+ "name": "target-org",
1110
+ "noCacheDefault": true,
1111
+ "required": true,
1112
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1113
+ "hasDynamicHelp": true,
1114
+ "multiple": false,
1115
+ "type": "option"
1116
+ },
1117
+ "api-version": {
1118
+ "description": "Override the api version used for api requests made by this command",
1119
+ "name": "api-version",
1120
+ "hasDynamicHelp": false,
1121
+ "multiple": false,
1122
+ "type": "option"
1123
+ },
1124
+ "type": {
1125
+ "name": "type",
1126
+ "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.",
1127
+ "hasDynamicHelp": false,
1128
+ "multiple": false,
1129
+ "options": [
1130
+ "customer",
1131
+ "internal"
1132
+ ],
1133
+ "type": "option"
1134
+ },
1135
+ "role": {
1136
+ "name": "role",
1137
+ "summary": "Role of the agent.",
1138
+ "hasDynamicHelp": false,
1139
+ "multiple": false,
1140
+ "type": "option"
1141
+ },
1142
+ "company-name": {
1143
+ "name": "company-name",
1144
+ "summary": "Name of your company.",
1145
+ "hasDynamicHelp": false,
1146
+ "multiple": false,
1147
+ "type": "option"
1148
+ },
1149
+ "company-description": {
1150
+ "name": "company-description",
1151
+ "summary": "Description of your company.",
1152
+ "hasDynamicHelp": false,
1153
+ "multiple": false,
1154
+ "type": "option"
1155
+ },
1156
+ "company-website": {
1157
+ "name": "company-website",
1158
+ "summary": "Website URL of your company.",
1159
+ "hasDynamicHelp": false,
1160
+ "multiple": false,
1161
+ "type": "option"
1162
+ },
1163
+ "max-topics": {
1164
+ "name": "max-topics",
1165
+ "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
1166
+ "hasDynamicHelp": false,
1167
+ "multiple": false,
1168
+ "type": "option"
1169
+ },
1170
+ "agent-user": {
1171
+ "name": "agent-user",
1172
+ "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
1173
+ "hasDynamicHelp": false,
1174
+ "multiple": false,
1175
+ "type": "option"
1176
+ },
1177
+ "enrich-logs": {
1178
+ "name": "enrich-logs",
1179
+ "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
1180
+ "hasDynamicHelp": false,
1181
+ "multiple": false,
1182
+ "options": [
1183
+ "true",
1184
+ "false"
1185
+ ],
1186
+ "type": "option"
1187
+ },
1188
+ "tone": {
1189
+ "name": "tone",
1190
+ "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
1191
+ "hasDynamicHelp": false,
1192
+ "multiple": false,
1193
+ "options": [
1194
+ "formal",
1195
+ "casual",
1196
+ "neutral"
1197
+ ],
1198
+ "type": "option"
1199
+ },
1200
+ "spec": {
1201
+ "name": "spec",
1202
+ "summary": "Agent spec file, in YAML format, to use as input to the command.",
1203
+ "hasDynamicHelp": false,
1204
+ "multiple": false,
1205
+ "type": "option"
1206
+ },
1207
+ "output-file": {
1208
+ "name": "output-file",
1209
+ "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
1210
+ "default": "specs/agentSpec.yaml",
1211
+ "hasDynamicHelp": false,
1212
+ "multiple": false,
1213
+ "type": "option"
1214
+ },
1215
+ "full-interview": {
1216
+ "name": "full-interview",
1217
+ "summary": "Prompt for both required and optional flags.",
1218
+ "allowNo": false,
1219
+ "type": "boolean"
1220
+ },
1221
+ "prompt-template": {
1222
+ "name": "prompt-template",
1223
+ "summary": "API name of a customized prompt template to use instead of the default prompt template.",
1224
+ "hasDynamicHelp": false,
1225
+ "multiple": false,
1226
+ "type": "option"
1227
+ },
1228
+ "grounding-context": {
1229
+ "dependsOn": [
1230
+ "prompt-template"
1231
+ ],
1232
+ "name": "grounding-context",
1233
+ "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
1234
+ "hasDynamicHelp": false,
1235
+ "multiple": false,
1236
+ "type": "option"
1237
+ },
1238
+ "force-overwrite": {
1239
+ "name": "force-overwrite",
1240
+ "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
1241
+ "allowNo": false,
1242
+ "type": "boolean"
1243
+ }
1244
+ },
1245
+ "hasDynamicHelp": true,
1246
+ "hiddenAliases": [],
1247
+ "id": "agent:generate:agent-spec",
1248
+ "pluginAlias": "@salesforce/plugin-agent",
1249
+ "pluginName": "@salesforce/plugin-agent",
1250
+ "pluginType": "core",
1251
+ "strict": true,
1252
+ "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
1253
+ "enableJsonFlag": true,
1254
+ "requiresProject": true,
1255
+ "isESM": true,
1256
+ "relativePath": [
1257
+ "lib",
1258
+ "commands",
1259
+ "agent",
1260
+ "generate",
1261
+ "agent-spec.js"
1262
+ ],
1263
+ "aliasPermutations": [],
1264
+ "permutations": [
1265
+ "agent:generate:agent-spec",
1266
+ "generate:agent:agent-spec",
1267
+ "generate:agent-spec:agent",
1268
+ "agent:agent-spec:generate",
1269
+ "agent-spec:agent:generate",
1270
+ "agent-spec:generate:agent"
1271
+ ]
1272
+ },
1273
+ "agent:generate:authoring-bundle": {
1274
+ "aliases": [],
1275
+ "args": {},
1276
+ "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.",
1277
+ "examples": [
1278
+ "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 %>",
1279
+ "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\"",
1280
+ "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\"",
1281
+ "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"
1282
+ ],
1283
+ "flags": {
1284
+ "json": {
1285
+ "description": "Format output as json.",
1286
+ "helpGroup": "GLOBAL",
1287
+ "name": "json",
1288
+ "allowNo": false,
1289
+ "type": "boolean"
1290
+ },
1291
+ "flags-dir": {
1292
+ "helpGroup": "GLOBAL",
1293
+ "name": "flags-dir",
1294
+ "summary": "Import flag values from a directory.",
1295
+ "hasDynamicHelp": false,
1296
+ "multiple": false,
1297
+ "type": "option"
1298
+ },
1299
+ "target-org": {
1300
+ "char": "o",
1301
+ "name": "target-org",
1302
+ "noCacheDefault": true,
1303
+ "required": true,
1304
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1305
+ "hasDynamicHelp": true,
1306
+ "multiple": false,
1307
+ "type": "option"
1308
+ },
1309
+ "api-name": {
1279
1310
  "name": "api-name",
1280
- "summary": "API name of the activated published agent you want to preview.",
1311
+ "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.",
1312
+ "hasDynamicHelp": false,
1313
+ "multiple": false,
1314
+ "type": "option"
1315
+ },
1316
+ "api-version": {
1317
+ "description": "Override the api version used for api requests made by this command",
1318
+ "name": "api-version",
1319
+ "hasDynamicHelp": false,
1320
+ "multiple": false,
1321
+ "type": "option"
1322
+ },
1323
+ "spec": {
1324
+ "char": "f",
1325
+ "name": "spec",
1326
+ "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.",
1327
+ "hasDynamicHelp": false,
1328
+ "multiple": false,
1329
+ "type": "option"
1330
+ },
1331
+ "no-spec": {
1332
+ "name": "no-spec",
1333
+ "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
1334
+ "allowNo": false,
1335
+ "type": "boolean"
1336
+ },
1337
+ "output-dir": {
1338
+ "char": "d",
1339
+ "name": "output-dir",
1340
+ "summary": "Directory where the authoring bundle files are generated.",
1341
+ "hasDynamicHelp": false,
1342
+ "multiple": false,
1343
+ "type": "option"
1344
+ },
1345
+ "name": {
1346
+ "char": "n",
1347
+ "name": "name",
1348
+ "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
1349
+ "hasDynamicHelp": false,
1350
+ "multiple": false,
1351
+ "type": "option"
1352
+ },
1353
+ "force-overwrite": {
1354
+ "name": "force-overwrite",
1355
+ "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
1356
+ "allowNo": false,
1357
+ "type": "boolean"
1358
+ }
1359
+ },
1360
+ "hasDynamicHelp": true,
1361
+ "hiddenAliases": [],
1362
+ "id": "agent:generate:authoring-bundle",
1363
+ "pluginAlias": "@salesforce/plugin-agent",
1364
+ "pluginName": "@salesforce/plugin-agent",
1365
+ "pluginType": "core",
1366
+ "strict": true,
1367
+ "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
1368
+ "enableJsonFlag": true,
1369
+ "requiresProject": true,
1370
+ "isESM": true,
1371
+ "relativePath": [
1372
+ "lib",
1373
+ "commands",
1374
+ "agent",
1375
+ "generate",
1376
+ "authoring-bundle.js"
1377
+ ],
1378
+ "aliasPermutations": [],
1379
+ "permutations": [
1380
+ "agent:generate:authoring-bundle",
1381
+ "generate:agent:authoring-bundle",
1382
+ "generate:authoring-bundle:agent",
1383
+ "agent:authoring-bundle:generate",
1384
+ "authoring-bundle:agent:generate",
1385
+ "authoring-bundle:generate:agent"
1386
+ ]
1387
+ },
1388
+ "agent:generate:template": {
1389
+ "aliases": [],
1390
+ "args": {},
1391
+ "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.",
1392
+ "examples": [
1393
+ "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"
1394
+ ],
1395
+ "flags": {
1396
+ "json": {
1397
+ "description": "Format output as json.",
1398
+ "helpGroup": "GLOBAL",
1399
+ "name": "json",
1400
+ "allowNo": false,
1401
+ "type": "boolean"
1402
+ },
1403
+ "flags-dir": {
1404
+ "helpGroup": "GLOBAL",
1405
+ "name": "flags-dir",
1406
+ "summary": "Import flag values from a directory.",
1407
+ "hasDynamicHelp": false,
1408
+ "multiple": false,
1409
+ "type": "option"
1410
+ },
1411
+ "api-version": {
1412
+ "description": "Override the api version used for api requests made by this command",
1413
+ "name": "api-version",
1414
+ "hasDynamicHelp": false,
1415
+ "multiple": false,
1416
+ "type": "option"
1417
+ },
1418
+ "source-org": {
1419
+ "char": "s",
1420
+ "name": "source-org",
1421
+ "noCacheDefault": true,
1422
+ "required": true,
1423
+ "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
1424
+ "hasDynamicHelp": true,
1425
+ "multiple": false,
1426
+ "type": "option"
1427
+ },
1428
+ "agent-version": {
1429
+ "name": "agent-version",
1430
+ "required": true,
1431
+ "summary": "Version of the agent (BotVersion).",
1432
+ "hasDynamicHelp": false,
1433
+ "multiple": false,
1434
+ "type": "option"
1435
+ },
1436
+ "agent-file": {
1437
+ "char": "f",
1438
+ "name": "agent-file",
1439
+ "required": true,
1440
+ "summary": "Path to an agent (Bot) metadata file.",
1441
+ "hasDynamicHelp": false,
1442
+ "multiple": false,
1443
+ "type": "option"
1444
+ },
1445
+ "output-dir": {
1446
+ "char": "r",
1447
+ "name": "output-dir",
1448
+ "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
1449
+ "hasDynamicHelp": false,
1450
+ "multiple": false,
1451
+ "type": "option"
1452
+ }
1453
+ },
1454
+ "hasDynamicHelp": true,
1455
+ "hiddenAliases": [],
1456
+ "id": "agent:generate:template",
1457
+ "pluginAlias": "@salesforce/plugin-agent",
1458
+ "pluginName": "@salesforce/plugin-agent",
1459
+ "pluginType": "core",
1460
+ "strict": true,
1461
+ "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.",
1462
+ "enableJsonFlag": true,
1463
+ "requiresProject": true,
1464
+ "isESM": true,
1465
+ "relativePath": [
1466
+ "lib",
1467
+ "commands",
1468
+ "agent",
1469
+ "generate",
1470
+ "template.js"
1471
+ ],
1472
+ "aliasPermutations": [],
1473
+ "permutations": [
1474
+ "agent:generate:template",
1475
+ "generate:agent:template",
1476
+ "generate:template:agent",
1477
+ "agent:template:generate",
1478
+ "template:agent:generate",
1479
+ "template:generate:agent"
1480
+ ]
1481
+ },
1482
+ "agent:generate:test-spec": {
1483
+ "aliases": [],
1484
+ "args": {},
1485
+ "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.",
1486
+ "examples": [
1487
+ "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
1488
+ "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",
1489
+ "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"
1490
+ ],
1491
+ "flags": {
1492
+ "flags-dir": {
1493
+ "helpGroup": "GLOBAL",
1494
+ "name": "flags-dir",
1495
+ "summary": "Import flag values from a directory.",
1496
+ "hasDynamicHelp": false,
1497
+ "multiple": false,
1498
+ "type": "option"
1499
+ },
1500
+ "from-definition": {
1501
+ "char": "d",
1502
+ "name": "from-definition",
1503
+ "summary": "Filepath to the AIEvaluationDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
1504
+ "hasDynamicHelp": false,
1505
+ "multiple": false,
1506
+ "type": "option"
1507
+ },
1508
+ "force-overwrite": {
1509
+ "name": "force-overwrite",
1510
+ "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
1511
+ "allowNo": false,
1512
+ "type": "boolean"
1513
+ },
1514
+ "output-file": {
1515
+ "char": "f",
1516
+ "name": "output-file",
1517
+ "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\".",
1518
+ "hasDynamicHelp": false,
1519
+ "multiple": false,
1520
+ "type": "option"
1521
+ }
1522
+ },
1523
+ "hasDynamicHelp": false,
1524
+ "hiddenAliases": [],
1525
+ "id": "agent:generate:test-spec",
1526
+ "pluginAlias": "@salesforce/plugin-agent",
1527
+ "pluginName": "@salesforce/plugin-agent",
1528
+ "pluginType": "core",
1529
+ "strict": true,
1530
+ "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
1531
+ "enableJsonFlag": false,
1532
+ "isESM": true,
1533
+ "relativePath": [
1534
+ "lib",
1535
+ "commands",
1536
+ "agent",
1537
+ "generate",
1538
+ "test-spec.js"
1539
+ ],
1540
+ "aliasPermutations": [],
1541
+ "permutations": [
1542
+ "agent:generate:test-spec",
1543
+ "generate:agent:test-spec",
1544
+ "generate:test-spec:agent",
1545
+ "agent:test-spec:generate",
1546
+ "test-spec:agent:generate",
1547
+ "test-spec:generate:agent"
1548
+ ]
1549
+ },
1550
+ "agent:publish:authoring-bundle": {
1551
+ "aliases": [],
1552
+ "args": {},
1553
+ "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.",
1554
+ "examples": [
1555
+ "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1556
+ "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",
1557
+ "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
1558
+ "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
1559
+ ],
1560
+ "flags": {
1561
+ "json": {
1562
+ "description": "Format output as json.",
1563
+ "helpGroup": "GLOBAL",
1564
+ "name": "json",
1565
+ "allowNo": false,
1566
+ "type": "boolean"
1567
+ },
1568
+ "flags-dir": {
1569
+ "helpGroup": "GLOBAL",
1570
+ "name": "flags-dir",
1571
+ "summary": "Import flag values from a directory.",
1572
+ "hasDynamicHelp": false,
1573
+ "multiple": false,
1574
+ "type": "option"
1575
+ },
1576
+ "target-org": {
1577
+ "char": "o",
1578
+ "name": "target-org",
1579
+ "noCacheDefault": true,
1580
+ "required": true,
1581
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1582
+ "hasDynamicHelp": true,
1583
+ "multiple": false,
1584
+ "type": "option"
1585
+ },
1586
+ "api-version": {
1587
+ "description": "Override the api version used for api requests made by this command",
1588
+ "name": "api-version",
1281
1589
  "hasDynamicHelp": false,
1282
1590
  "multiple": false,
1283
1591
  "type": "option"
1284
1592
  },
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.",
1593
+ "api-name": {
1594
+ "char": "n",
1595
+ "name": "api-name",
1596
+ "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1288
1597
  "hasDynamicHelp": false,
1289
1598
  "multiple": false,
1290
1599
  "type": "option"
1291
1600
  },
1292
- "use-live-actions": {
1601
+ "skip-retrieve": {
1602
+ "name": "skip-retrieve",
1603
+ "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
1604
+ "allowNo": false,
1605
+ "type": "boolean"
1606
+ },
1607
+ "verbose": {
1608
+ "char": "v",
1293
1609
  "exclusive": [
1294
- "simulate-actions"
1610
+ "concise"
1295
1611
  ],
1296
- "name": "use-live-actions",
1297
- "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
1612
+ "name": "verbose",
1613
+ "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
1298
1614
  "allowNo": false,
1299
1615
  "type": "boolean"
1300
1616
  },
1301
- "simulate-actions": {
1617
+ "concise": {
1302
1618
  "exclusive": [
1303
- "use-live-actions"
1619
+ "verbose"
1304
1620
  ],
1305
- "name": "simulate-actions",
1306
- "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
1621
+ "name": "concise",
1622
+ "summary": "Display minimal output with only essential information about the publish operation.",
1623
+ "allowNo": false,
1624
+ "type": "boolean"
1625
+ }
1626
+ },
1627
+ "hasDynamicHelp": true,
1628
+ "hiddenAliases": [],
1629
+ "id": "agent:publish:authoring-bundle",
1630
+ "pluginAlias": "@salesforce/plugin-agent",
1631
+ "pluginName": "@salesforce/plugin-agent",
1632
+ "pluginType": "core",
1633
+ "strict": true,
1634
+ "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
1635
+ "enableJsonFlag": true,
1636
+ "requiresProject": true,
1637
+ "errorCodes": {
1638
+ "header": "ERROR CODES",
1639
+ "body": [
1640
+ {
1641
+ "name": "Succeeded (0)",
1642
+ "description": "Agent published successfully without errors."
1643
+ },
1644
+ {
1645
+ "name": "Failed (1)",
1646
+ "description": "Compilation errors found in the Agent Script file."
1647
+ }
1648
+ ]
1649
+ },
1650
+ "FLAGGABLE_PROMPTS": {
1651
+ "api-name": {
1652
+ "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1653
+ "promptMessage": "API name of the authoring bundle to publish"
1654
+ }
1655
+ },
1656
+ "isESM": true,
1657
+ "relativePath": [
1658
+ "lib",
1659
+ "commands",
1660
+ "agent",
1661
+ "publish",
1662
+ "authoring-bundle.js"
1663
+ ],
1664
+ "aliasPermutations": [],
1665
+ "permutations": [
1666
+ "agent:publish:authoring-bundle",
1667
+ "publish:agent:authoring-bundle",
1668
+ "publish:authoring-bundle:agent",
1669
+ "agent:authoring-bundle:publish",
1670
+ "authoring-bundle:agent:publish",
1671
+ "authoring-bundle:publish:agent"
1672
+ ]
1673
+ },
1674
+ "agent:test:create": {
1675
+ "aliases": [],
1676
+ "args": {},
1677
+ "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.",
1678
+ "examples": [
1679
+ "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 %>",
1680
+ "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",
1681
+ "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",
1682
+ "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"
1683
+ ],
1684
+ "flags": {
1685
+ "json": {
1686
+ "description": "Format output as json.",
1687
+ "helpGroup": "GLOBAL",
1688
+ "name": "json",
1307
1689
  "allowNo": false,
1308
1690
  "type": "boolean"
1309
1691
  },
1310
- "agent-json": {
1311
- "dependsOn": [
1312
- "authoring-bundle"
1692
+ "flags-dir": {
1693
+ "helpGroup": "GLOBAL",
1694
+ "name": "flags-dir",
1695
+ "summary": "Import flag values from a directory.",
1696
+ "hasDynamicHelp": false,
1697
+ "multiple": false,
1698
+ "type": "option"
1699
+ },
1700
+ "api-name": {
1701
+ "name": "api-name",
1702
+ "summary": "API name of the new test; the API name must not exist in the org.",
1703
+ "hasDynamicHelp": false,
1704
+ "multiple": false,
1705
+ "type": "option"
1706
+ },
1707
+ "spec": {
1708
+ "name": "spec",
1709
+ "summary": "Path to the test spec YAML file.",
1710
+ "hasDynamicHelp": false,
1711
+ "multiple": false,
1712
+ "type": "option"
1713
+ },
1714
+ "target-org": {
1715
+ "char": "o",
1716
+ "name": "target-org",
1717
+ "noCacheDefault": true,
1718
+ "required": true,
1719
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1720
+ "hasDynamicHelp": true,
1721
+ "multiple": false,
1722
+ "type": "option"
1723
+ },
1724
+ "api-version": {
1725
+ "description": "Override the api version used for api requests made by this command",
1726
+ "name": "api-version",
1727
+ "hasDynamicHelp": false,
1728
+ "multiple": false,
1729
+ "type": "option"
1730
+ },
1731
+ "preview": {
1732
+ "name": "preview",
1733
+ "summary": "Preview the test metadata file without deploying to your org.",
1734
+ "allowNo": false,
1735
+ "type": "boolean"
1736
+ },
1737
+ "force-overwrite": {
1738
+ "name": "force-overwrite",
1739
+ "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
1740
+ "allowNo": false,
1741
+ "type": "boolean"
1742
+ },
1743
+ "test-runner": {
1744
+ "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.",
1745
+ "name": "test-runner",
1746
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1747
+ "hasDynamicHelp": false,
1748
+ "multiple": false,
1749
+ "options": [
1750
+ "agentforce-studio",
1751
+ "testing-center"
1313
1752
  ],
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.",
1753
+ "type": "option"
1754
+ }
1755
+ },
1756
+ "hasDynamicHelp": true,
1757
+ "hiddenAliases": [],
1758
+ "id": "agent:test:create",
1759
+ "pluginAlias": "@salesforce/plugin-agent",
1760
+ "pluginName": "@salesforce/plugin-agent",
1761
+ "pluginType": "core",
1762
+ "strict": true,
1763
+ "summary": "Create an agent test in your org using a local test spec YAML file.",
1764
+ "enableJsonFlag": true,
1765
+ "envVariablesSection": {
1766
+ "header": "ENVIRONMENT VARIABLES",
1767
+ "body": [
1768
+ {
1769
+ "name": "SF_TARGET_ORG",
1770
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1771
+ }
1772
+ ]
1773
+ },
1774
+ "errorCodes": {
1775
+ "header": "ERROR CODES",
1776
+ "body": [
1777
+ {
1778
+ "name": "Succeeded (0)",
1779
+ "description": "Test created and deployed successfully."
1780
+ },
1781
+ {
1782
+ "name": "Failed (1)",
1783
+ "description": "Test validation errors or metadata format issues."
1784
+ },
1785
+ {
1786
+ "name": "NotFound (2)",
1787
+ "description": "Test spec file not found or org connection failed."
1788
+ },
1789
+ {
1790
+ "name": "DeploymentFailed (4)",
1791
+ "description": "Deployment failed due to API or network errors."
1792
+ }
1793
+ ]
1794
+ },
1795
+ "isESM": true,
1796
+ "relativePath": [
1797
+ "lib",
1798
+ "commands",
1799
+ "agent",
1800
+ "test",
1801
+ "create.js"
1802
+ ],
1803
+ "aliasPermutations": [],
1804
+ "permutations": [
1805
+ "agent:test:create",
1806
+ "test:agent:create",
1807
+ "test:create:agent",
1808
+ "agent:create:test",
1809
+ "create:agent:test",
1810
+ "create:test:agent"
1811
+ ]
1812
+ },
1813
+ "agent:test:list": {
1814
+ "aliases": [],
1815
+ "args": {},
1816
+ "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.",
1817
+ "examples": [
1818
+ "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
1819
+ "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
1820
+ ],
1821
+ "flags": {
1822
+ "json": {
1823
+ "description": "Format output as json.",
1824
+ "helpGroup": "GLOBAL",
1825
+ "name": "json",
1826
+ "allowNo": false,
1827
+ "type": "boolean"
1828
+ },
1829
+ "flags-dir": {
1830
+ "helpGroup": "GLOBAL",
1831
+ "name": "flags-dir",
1832
+ "summary": "Import flag values from a directory.",
1833
+ "hasDynamicHelp": false,
1834
+ "multiple": false,
1835
+ "type": "option"
1836
+ },
1837
+ "target-org": {
1838
+ "char": "o",
1839
+ "name": "target-org",
1840
+ "noCacheDefault": true,
1841
+ "required": true,
1842
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1843
+ "hasDynamicHelp": true,
1844
+ "multiple": false,
1845
+ "type": "option"
1846
+ },
1847
+ "api-version": {
1848
+ "description": "Override the api version used for api requests made by this command",
1849
+ "name": "api-version",
1317
1850
  "hasDynamicHelp": false,
1318
1851
  "multiple": false,
1319
1852
  "type": "option"
@@ -1321,14 +1854,13 @@
1321
1854
  },
1322
1855
  "hasDynamicHelp": true,
1323
1856
  "hiddenAliases": [],
1324
- "id": "agent:preview:start",
1857
+ "id": "agent:test:list",
1325
1858
  "pluginAlias": "@salesforce/plugin-agent",
1326
1859
  "pluginName": "@salesforce/plugin-agent",
1327
1860
  "pluginType": "core",
1328
1861
  "strict": true,
1329
- "summary": "Start a programmatic agent preview session.",
1862
+ "summary": "List the available agent tests in your org.",
1330
1863
  "enableJsonFlag": true,
1331
- "requiresProject": true,
1332
1864
  "envVariablesSection": {
1333
1865
  "header": "ENVIRONMENT VARIABLES",
1334
1866
  "body": [
@@ -1343,23 +1875,11 @@
1343
1875
  "body": [
1344
1876
  {
1345
1877
  "name": "Succeeded (0)",
1346
- "description": "Preview session started successfully."
1347
- },
1348
- {
1349
- "name": "Failed (1)",
1350
- "description": "Agent Script compilation failed (syntax errors in the script)."
1351
- },
1352
- {
1353
- "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)."
1878
+ "description": "Agent tests listed successfully."
1359
1879
  },
1360
1880
  {
1361
- "name": "PreviewStartFailed (4)",
1362
- "description": "Preview session failed to start due to API or network errors."
1881
+ "name": "Failed (4)",
1882
+ "description": "Failed to retrieve agent tests due to API or network errors."
1363
1883
  }
1364
1884
  ]
1365
1885
  },
@@ -1368,28 +1888,27 @@
1368
1888
  "lib",
1369
1889
  "commands",
1370
1890
  "agent",
1371
- "preview",
1372
- "start.js"
1891
+ "test",
1892
+ "list.js"
1373
1893
  ],
1374
1894
  "aliasPermutations": [],
1375
1895
  "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"
1896
+ "agent:test:list",
1897
+ "test:agent:list",
1898
+ "test:list:agent",
1899
+ "agent:list:test",
1900
+ "list:agent:test",
1901
+ "list:test:agent"
1382
1902
  ]
1383
1903
  },
1384
- "agent:publish:authoring-bundle": {
1904
+ "agent:test:results": {
1385
1905
  "aliases": [],
1386
1906
  "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.",
1907
+ "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.",
1388
1908
  "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"
1909
+ "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1910
+ "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",
1911
+ "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"
1393
1912
  ],
1394
1913
  "flags": {
1395
1914
  "json": {
@@ -1424,96 +1943,119 @@
1424
1943
  "multiple": false,
1425
1944
  "type": "option"
1426
1945
  },
1427
- "api-name": {
1428
- "char": "n",
1429
- "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.",
1946
+ "job-id": {
1947
+ "char": "i",
1948
+ "name": "job-id",
1949
+ "required": true,
1950
+ "summary": "Job ID of the completed agent test run.",
1431
1951
  "hasDynamicHelp": false,
1432
1952
  "multiple": false,
1433
1953
  "type": "option"
1434
1954
  },
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"
1440
- },
1441
- "verbose": {
1442
- "char": "v",
1443
- "exclusive": [
1444
- "concise"
1955
+ "result-format": {
1956
+ "name": "result-format",
1957
+ "summary": "Format of the agent test run results.",
1958
+ "default": "human",
1959
+ "hasDynamicHelp": false,
1960
+ "multiple": false,
1961
+ "options": [
1962
+ "json",
1963
+ "human",
1964
+ "junit",
1965
+ "tap"
1445
1966
  ],
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"
1967
+ "type": "option"
1450
1968
  },
1451
- "concise": {
1452
- "exclusive": [
1453
- "verbose"
1969
+ "output-dir": {
1970
+ "char": "d",
1971
+ "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.",
1972
+ "name": "output-dir",
1973
+ "summary": "Directory to write the agent test results into.",
1974
+ "hasDynamicHelp": false,
1975
+ "multiple": false,
1976
+ "type": "option"
1977
+ },
1978
+ "test-runner": {
1979
+ "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.",
1980
+ "name": "test-runner",
1981
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1982
+ "hasDynamicHelp": false,
1983
+ "multiple": false,
1984
+ "options": [
1985
+ "agentforce-studio",
1986
+ "testing-center"
1454
1987
  ],
1455
- "name": "concise",
1456
- "summary": "Display minimal output with only essential information about the publish operation.",
1988
+ "type": "option"
1989
+ },
1990
+ "verbose": {
1991
+ "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.",
1992
+ "name": "verbose",
1993
+ "summary": "Show generated data in the test results output.",
1457
1994
  "allowNo": false,
1458
1995
  "type": "boolean"
1459
1996
  }
1460
1997
  },
1461
1998
  "hasDynamicHelp": true,
1462
1999
  "hiddenAliases": [],
1463
- "id": "agent:publish:authoring-bundle",
2000
+ "id": "agent:test:results",
1464
2001
  "pluginAlias": "@salesforce/plugin-agent",
1465
2002
  "pluginName": "@salesforce/plugin-agent",
1466
2003
  "pluginType": "core",
1467
2004
  "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.",
2005
+ "summary": "Get the results of a completed agent test run.",
1469
2006
  "enableJsonFlag": true,
1470
- "requiresProject": true,
2007
+ "envVariablesSection": {
2008
+ "header": "ENVIRONMENT VARIABLES",
2009
+ "body": [
2010
+ {
2011
+ "name": "SF_TARGET_ORG",
2012
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2013
+ }
2014
+ ]
2015
+ },
1471
2016
  "errorCodes": {
1472
2017
  "header": "ERROR CODES",
1473
2018
  "body": [
1474
2019
  {
1475
2020
  "name": "Succeeded (0)",
1476
- "description": "Agent published successfully without errors."
2021
+ "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
1477
2022
  },
1478
2023
  {
1479
- "name": "Failed (1)",
1480
- "description": "Compilation errors found in the Agent Script file."
2024
+ "name": "NotFound (2)",
2025
+ "description": "Job ID not found or invalid."
2026
+ },
2027
+ {
2028
+ "name": "Failed (4)",
2029
+ "description": "Failed to retrieve results due to API or network errors."
1481
2030
  }
1482
2031
  ]
1483
2032
  },
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
2033
  "isESM": true,
1491
2034
  "relativePath": [
1492
2035
  "lib",
1493
2036
  "commands",
1494
2037
  "agent",
1495
- "publish",
1496
- "authoring-bundle.js"
2038
+ "test",
2039
+ "results.js"
1497
2040
  ],
1498
2041
  "aliasPermutations": [],
1499
2042
  "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"
2043
+ "agent:test:results",
2044
+ "test:agent:results",
2045
+ "test:results:agent",
2046
+ "agent:results:test",
2047
+ "results:agent:test",
2048
+ "results:test:agent"
1506
2049
  ]
1507
2050
  },
1508
- "agent:test:create": {
2051
+ "agent:test:resume": {
1509
2052
  "aliases": [],
1510
2053
  "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.",
2054
+ "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.",
1512
2055
  "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"
2056
+ "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
2057
+ "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",
2058
+ "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"
1517
2059
  ],
1518
2060
  "flags": {
1519
2061
  "json": {
@@ -1531,20 +2073,6 @@
1531
2073
  "multiple": false,
1532
2074
  "type": "option"
1533
2075
  },
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
2076
  "target-org": {
1549
2077
  "char": "o",
1550
2078
  "name": "target-org",
@@ -1562,18 +2090,53 @@
1562
2090
  "multiple": false,
1563
2091
  "type": "option"
1564
2092
  },
1565
- "preview": {
1566
- "name": "preview",
1567
- "summary": "Preview the test metadata file without deploying to your org.",
1568
- "allowNo": false,
1569
- "type": "boolean"
2093
+ "job-id": {
2094
+ "char": "i",
2095
+ "name": "job-id",
2096
+ "summary": "Job ID of the original agent test run.",
2097
+ "hasDynamicHelp": false,
2098
+ "multiple": false,
2099
+ "type": "option"
1570
2100
  },
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.",
2101
+ "use-most-recent": {
2102
+ "char": "r",
2103
+ "name": "use-most-recent",
2104
+ "summary": "Use the job ID of the most recent agent test run.",
1574
2105
  "allowNo": false,
1575
2106
  "type": "boolean"
1576
2107
  },
2108
+ "wait": {
2109
+ "char": "w",
2110
+ "name": "wait",
2111
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2112
+ "default": "5 minutes",
2113
+ "hasDynamicHelp": true,
2114
+ "multiple": false,
2115
+ "type": "option"
2116
+ },
2117
+ "result-format": {
2118
+ "name": "result-format",
2119
+ "summary": "Format of the agent test run results.",
2120
+ "default": "human",
2121
+ "hasDynamicHelp": false,
2122
+ "multiple": false,
2123
+ "options": [
2124
+ "json",
2125
+ "human",
2126
+ "junit",
2127
+ "tap"
2128
+ ],
2129
+ "type": "option"
2130
+ },
2131
+ "output-dir": {
2132
+ "char": "d",
2133
+ "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.",
2134
+ "name": "output-dir",
2135
+ "summary": "Directory to write the agent test results into.",
2136
+ "hasDynamicHelp": false,
2137
+ "multiple": false,
2138
+ "type": "option"
2139
+ },
1577
2140
  "test-runner": {
1578
2141
  "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
2142
  "name": "test-runner",
@@ -1585,16 +2148,23 @@
1585
2148
  "testing-center"
1586
2149
  ],
1587
2150
  "type": "option"
2151
+ },
2152
+ "verbose": {
2153
+ "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.",
2154
+ "name": "verbose",
2155
+ "summary": "Show generated data in the test results output.",
2156
+ "allowNo": false,
2157
+ "type": "boolean"
1588
2158
  }
1589
2159
  },
1590
2160
  "hasDynamicHelp": true,
1591
2161
  "hiddenAliases": [],
1592
- "id": "agent:test:create",
2162
+ "id": "agent:test:resume",
1593
2163
  "pluginAlias": "@salesforce/plugin-agent",
1594
2164
  "pluginName": "@salesforce/plugin-agent",
1595
2165
  "pluginType": "core",
1596
2166
  "strict": true,
1597
- "summary": "Create an agent test in your org using a local test spec YAML file.",
2167
+ "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
1598
2168
  "enableJsonFlag": true,
1599
2169
  "envVariablesSection": {
1600
2170
  "header": "ENVIRONMENT VARIABLES",
@@ -1610,19 +2180,19 @@
1610
2180
  "body": [
1611
2181
  {
1612
2182
  "name": "Succeeded (0)",
1613
- "description": "Test created and deployed successfully."
2183
+ "description": "Test completed successfully (with test results in the output)."
1614
2184
  },
1615
2185
  {
1616
2186
  "name": "Failed (1)",
1617
- "description": "Test validation errors or metadata format issues."
2187
+ "description": "Tests encountered execution errors (test cases with ERROR status)."
1618
2188
  },
1619
2189
  {
1620
2190
  "name": "NotFound (2)",
1621
- "description": "Test spec file not found or org connection failed."
2191
+ "description": "Job ID not found or invalid."
1622
2192
  },
1623
2193
  {
1624
- "name": "DeploymentFailed (4)",
1625
- "description": "Deployment failed due to API or network errors."
2194
+ "name": "OperationFailed (4)",
2195
+ "description": "Failed to poll test due to API or network errors."
1626
2196
  }
1627
2197
  ]
1628
2198
  },
@@ -1632,25 +2202,29 @@
1632
2202
  "commands",
1633
2203
  "agent",
1634
2204
  "test",
1635
- "create.js"
2205
+ "resume.js"
1636
2206
  ],
1637
2207
  "aliasPermutations": [],
1638
2208
  "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"
2209
+ "agent:test:resume",
2210
+ "test:agent:resume",
2211
+ "test:resume:agent",
2212
+ "agent:resume:test",
2213
+ "resume:agent:test",
2214
+ "resume:test:agent"
1645
2215
  ]
1646
2216
  },
1647
- "agent:test:list": {
2217
+ "agent:test:run-eval": {
1648
2218
  "aliases": [],
1649
2219
  "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.",
2220
+ "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.",
1651
2221
  "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"
2222
+ "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",
2223
+ "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",
2224
+ "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
2225
+ "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",
2226
+ "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",
2227
+ "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
1654
2228
  ],
1655
2229
  "flags": {
1656
2230
  "json": {
@@ -1684,16 +2258,62 @@
1684
2258
  "hasDynamicHelp": false,
1685
2259
  "multiple": false,
1686
2260
  "type": "option"
2261
+ },
2262
+ "spec": {
2263
+ "char": "s",
2264
+ "name": "spec",
2265
+ "required": true,
2266
+ "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
2267
+ "hasDynamicHelp": false,
2268
+ "multiple": false,
2269
+ "type": "option"
2270
+ },
2271
+ "api-name": {
2272
+ "char": "n",
2273
+ "name": "api-name",
2274
+ "summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
2275
+ "hasDynamicHelp": false,
2276
+ "multiple": false,
2277
+ "type": "option"
2278
+ },
2279
+ "result-format": {
2280
+ "name": "result-format",
2281
+ "summary": "Format of the agent test run results.",
2282
+ "default": "human",
2283
+ "hasDynamicHelp": false,
2284
+ "multiple": false,
2285
+ "options": [
2286
+ "json",
2287
+ "human",
2288
+ "junit",
2289
+ "tap"
2290
+ ],
2291
+ "type": "option"
2292
+ },
2293
+ "batch-size": {
2294
+ "name": "batch-size",
2295
+ "summary": "Number of tests per API request (max 5).",
2296
+ "default": 5,
2297
+ "hasDynamicHelp": false,
2298
+ "multiple": false,
2299
+ "type": "option"
2300
+ },
2301
+ "no-normalize": {
2302
+ "name": "no-normalize",
2303
+ "summary": "Disable auto-normalization of field names and shorthand references.",
2304
+ "allowNo": false,
2305
+ "type": "boolean"
1687
2306
  }
1688
2307
  },
1689
2308
  "hasDynamicHelp": true,
1690
2309
  "hiddenAliases": [],
1691
- "id": "agent:test:list",
2310
+ "id": "agent:test:run-eval",
1692
2311
  "pluginAlias": "@salesforce/plugin-agent",
1693
2312
  "pluginName": "@salesforce/plugin-agent",
1694
2313
  "pluginType": "core",
2314
+ "state": "beta",
1695
2315
  "strict": true,
1696
- "summary": "List the available agent tests in your org.",
2316
+ "summary": "Run rich evaluation tests against an Agentforce agent.",
1697
2317
  "enableJsonFlag": true,
1698
2318
  "envVariablesSection": {
1699
2319
  "header": "ENVIRONMENT VARIABLES",
@@ -1709,11 +2329,19 @@
1709
2329
  "body": [
1710
2330
  {
1711
2331
  "name": "Succeeded (0)",
1712
- "description": "Agent tests listed successfully."
2332
+ "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
1713
2333
  },
1714
2334
  {
1715
- "name": "Failed (4)",
1716
- "description": "Failed to retrieve agent tests due to API or network errors."
2335
+ "name": "Failed (1)",
2336
+ "description": "Tests encountered execution errors (tests couldn't run properly)."
2337
+ },
2338
+ {
2339
+ "name": "NotFound (2)",
2340
+ "description": "Agent not found, spec file not found, or invalid agent name."
2341
+ },
2342
+ {
2343
+ "name": "OperationFailed (4)",
2344
+ "description": "Failed to execute tests due to API or network errors."
1717
2345
  }
1718
2346
  ]
1719
2347
  },
@@ -1723,26 +2351,26 @@
1723
2351
  "commands",
1724
2352
  "agent",
1725
2353
  "test",
1726
- "list.js"
2354
+ "run-eval.js"
1727
2355
  ],
1728
2356
  "aliasPermutations": [],
1729
2357
  "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"
2358
+ "agent:test:run-eval",
2359
+ "test:agent:run-eval",
2360
+ "test:run-eval:agent",
2361
+ "agent:run-eval:test",
2362
+ "run-eval:agent:test",
2363
+ "run-eval:test:agent"
1736
2364
  ]
1737
2365
  },
1738
- "agent:test:results": {
2366
+ "agent:test:run": {
1739
2367
  "aliases": [],
1740
2368
  "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.",
2369
+ "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.",
1742
2370
  "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"
2371
+ "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",
2372
+ "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",
2373
+ "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"
1746
2374
  ],
1747
2375
  "flags": {
1748
2376
  "json": {
@@ -1777,15 +2405,22 @@
1777
2405
  "multiple": false,
1778
2406
  "type": "option"
1779
2407
  },
1780
- "job-id": {
1781
- "char": "i",
1782
- "name": "job-id",
1783
- "required": true,
1784
- "summary": "Job ID of the completed agent test run.",
2408
+ "api-name": {
2409
+ "char": "n",
2410
+ "name": "api-name",
2411
+ "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
1785
2412
  "hasDynamicHelp": false,
1786
2413
  "multiple": false,
1787
2414
  "type": "option"
1788
2415
  },
2416
+ "wait": {
2417
+ "char": "w",
2418
+ "name": "wait",
2419
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2420
+ "hasDynamicHelp": true,
2421
+ "multiple": false,
2422
+ "type": "option"
2423
+ },
1789
2424
  "result-format": {
1790
2425
  "name": "result-format",
1791
2426
  "summary": "Format of the agent test run results.",
@@ -1831,12 +2466,12 @@
1831
2466
  },
1832
2467
  "hasDynamicHelp": true,
1833
2468
  "hiddenAliases": [],
1834
- "id": "agent:test:results",
2469
+ "id": "agent:test:run",
1835
2470
  "pluginAlias": "@salesforce/plugin-agent",
1836
2471
  "pluginName": "@salesforce/plugin-agent",
1837
2472
  "pluginType": "core",
1838
2473
  "strict": true,
1839
- "summary": "Get the results of a completed agent test run.",
2474
+ "summary": "Start an agent test in your org.",
1840
2475
  "enableJsonFlag": true,
1841
2476
  "envVariablesSection": {
1842
2477
  "header": "ENVIRONMENT VARIABLES",
@@ -1852,15 +2487,19 @@
1852
2487
  "body": [
1853
2488
  {
1854
2489
  "name": "Succeeded (0)",
1855
- "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
2490
+ "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
2491
+ },
2492
+ {
2493
+ "name": "Failed (1)",
2494
+ "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
1856
2495
  },
1857
2496
  {
1858
2497
  "name": "NotFound (2)",
1859
- "description": "Job ID not found or invalid."
2498
+ "description": "Test definition not found or invalid test name."
1860
2499
  },
1861
2500
  {
1862
- "name": "Failed (4)",
1863
- "description": "Failed to retrieve results due to API or network errors."
2501
+ "name": "OperationFailed (4)",
2502
+ "description": "Failed to start or poll test due to API or network errors."
1864
2503
  }
1865
2504
  ]
1866
2505
  },
@@ -1870,26 +2509,28 @@
1870
2509
  "commands",
1871
2510
  "agent",
1872
2511
  "test",
1873
- "results.js"
2512
+ "run.js"
1874
2513
  ],
1875
2514
  "aliasPermutations": [],
1876
2515
  "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"
2516
+ "agent:test:run",
2517
+ "test:agent:run",
2518
+ "test:run:agent",
2519
+ "agent:run:test",
2520
+ "run:agent:test",
2521
+ "run:test:agent"
1883
2522
  ]
1884
2523
  },
1885
- "agent:test:resume": {
2524
+ "agent:preview:end": {
1886
2525
  "aliases": [],
1887
2526
  "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.",
2527
+ "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.",
1889
2528
  "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"
2529
+ "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",
2530
+ "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",
2531
+ "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",
2532
+ "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",
2533
+ "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>"
1893
2534
  ],
1894
2535
  "flags": {
1895
2536
  "json": {
@@ -1924,82 +2565,65 @@
1924
2565
  "multiple": false,
1925
2566
  "type": "option"
1926
2567
  },
1927
- "job-id": {
1928
- "char": "i",
1929
- "name": "job-id",
1930
- "summary": "Job ID of the original agent test run.",
2568
+ "session-id": {
2569
+ "exclusive": [
2570
+ "all"
2571
+ ],
2572
+ "name": "session-id",
2573
+ "required": false,
2574
+ "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.",
1931
2575
  "hasDynamicHelp": false,
1932
2576
  "multiple": false,
1933
2577
  "type": "option"
1934
2578
  },
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",
1955
- "hasDynamicHelp": false,
1956
- "multiple": false,
1957
- "options": [
1958
- "json",
1959
- "human",
1960
- "junit",
1961
- "tap"
2579
+ "api-name": {
2580
+ "char": "n",
2581
+ "exclusive": [
2582
+ "authoring-bundle"
1962
2583
  ],
1963
- "type": "option"
1964
- },
1965
- "output-dir": {
1966
- "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.",
2584
+ "name": "api-name",
2585
+ "summary": "API name of the activated published agent you want to preview.",
1970
2586
  "hasDynamicHelp": false,
1971
2587
  "multiple": false,
1972
2588
  "type": "option"
1973
2589
  },
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).",
2590
+ "authoring-bundle": {
2591
+ "exclusive": [
2592
+ "api-name"
2593
+ ],
2594
+ "name": "authoring-bundle",
2595
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1978
2596
  "hasDynamicHelp": false,
1979
2597
  "multiple": false,
1980
- "options": [
1981
- "agentforce-studio",
1982
- "testing-center"
1983
- ],
1984
2598
  "type": "option"
1985
2599
  },
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.",
2600
+ "all": {
2601
+ "exclusive": [
2602
+ "session-id"
2603
+ ],
2604
+ "name": "all",
2605
+ "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.",
2606
+ "allowNo": false,
2607
+ "type": "boolean"
2608
+ },
2609
+ "no-prompt": {
2610
+ "char": "p",
2611
+ "name": "no-prompt",
2612
+ "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
1990
2613
  "allowNo": false,
1991
2614
  "type": "boolean"
1992
2615
  }
1993
2616
  },
1994
2617
  "hasDynamicHelp": true,
1995
2618
  "hiddenAliases": [],
1996
- "id": "agent:test:resume",
2619
+ "id": "agent:preview:end",
1997
2620
  "pluginAlias": "@salesforce/plugin-agent",
1998
2621
  "pluginName": "@salesforce/plugin-agent",
1999
2622
  "pluginType": "core",
2000
2623
  "strict": true,
2001
- "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
2624
+ "summary": "End an existing programmatic agent preview session and get trace location.",
2002
2625
  "enableJsonFlag": true,
2626
+ "requiresProject": true,
2003
2627
  "envVariablesSection": {
2004
2628
  "header": "ENVIRONMENT VARIABLES",
2005
2629
  "body": [
@@ -2014,19 +2638,27 @@
2014
2638
  "body": [
2015
2639
  {
2016
2640
  "name": "Succeeded (0)",
2017
- "description": "Test completed successfully (with test results in the output)."
2641
+ "description": "Preview session ended successfully and traces saved."
2018
2642
  },
2019
2643
  {
2020
- "name": "Failed (1)",
2021
- "description": "Tests encountered execution errors (test cases with ERROR status)."
2644
+ "name": "ExactlyOneRequired (2)",
2645
+ "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
2022
2646
  },
2023
2647
  {
2024
2648
  "name": "NotFound (2)",
2025
- "description": "Job ID not found or invalid."
2649
+ "description": "Agent not found, or no preview session exists for this agent."
2026
2650
  },
2027
2651
  {
2028
- "name": "OperationFailed (4)",
2029
- "description": "Failed to poll test due to API or network errors."
2652
+ "name": "PreviewEndFailed (4)",
2653
+ "description": "Failed to end the preview session."
2654
+ },
2655
+ {
2656
+ "name": "PreviewEndPartialFailure (68)",
2657
+ "description": "With --all, one or more sessions failed to end while others succeeded."
2658
+ },
2659
+ {
2660
+ "name": "SessionAmbiguous (5)",
2661
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
2030
2662
  }
2031
2663
  ]
2032
2664
  },
@@ -2035,30 +2667,27 @@
2035
2667
  "lib",
2036
2668
  "commands",
2037
2669
  "agent",
2038
- "test",
2039
- "resume.js"
2670
+ "preview",
2671
+ "end.js"
2040
2672
  ],
2041
2673
  "aliasPermutations": [],
2042
2674
  "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"
2675
+ "agent:preview:end",
2676
+ "preview:agent:end",
2677
+ "preview:end:agent",
2678
+ "agent:end:preview",
2679
+ "end:agent:preview",
2680
+ "end:preview:agent"
2049
2681
  ]
2050
2682
  },
2051
- "agent:test:run-eval": {
2683
+ "agent:preview:send": {
2052
2684
  "aliases": [],
2053
2685
  "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.",
2686
+ "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.",
2055
2687
  "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"
2688
+ "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>",
2689
+ "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",
2690
+ "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"
2062
2691
  ],
2063
2692
  "flags": {
2064
2693
  "json": {
@@ -2093,62 +2722,49 @@
2093
2722
  "multiple": false,
2094
2723
  "type": "option"
2095
2724
  },
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.",
2725
+ "session-id": {
2726
+ "name": "session-id",
2727
+ "required": false,
2728
+ "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.",
2101
2729
  "hasDynamicHelp": false,
2102
2730
  "multiple": false,
2103
2731
  "type": "option"
2104
2732
  },
2105
- "api-name": {
2106
- "char": "n",
2107
- "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.",
2733
+ "utterance": {
2734
+ "char": "u",
2735
+ "name": "utterance",
2736
+ "required": true,
2737
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
2109
2738
  "hasDynamicHelp": false,
2110
2739
  "multiple": false,
2111
2740
  "type": "option"
2112
2741
  },
2113
- "result-format": {
2114
- "name": "result-format",
2115
- "summary": "Format of the agent test run results.",
2116
- "default": "human",
2742
+ "api-name": {
2743
+ "char": "n",
2744
+ "name": "api-name",
2745
+ "summary": "API name of the activated published agent you want to preview.",
2117
2746
  "hasDynamicHelp": false,
2118
2747
  "multiple": false,
2119
- "options": [
2120
- "json",
2121
- "human",
2122
- "junit",
2123
- "tap"
2124
- ],
2125
2748
  "type": "option"
2126
2749
  },
2127
- "batch-size": {
2128
- "name": "batch-size",
2129
- "summary": "Number of tests per API request (max 5).",
2130
- "default": 5,
2750
+ "authoring-bundle": {
2751
+ "name": "authoring-bundle",
2752
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2131
2753
  "hasDynamicHelp": false,
2132
2754
  "multiple": false,
2133
2755
  "type": "option"
2134
- },
2135
- "no-normalize": {
2136
- "name": "no-normalize",
2137
- "summary": "Disable auto-normalization of field names and shorthand references.",
2138
- "allowNo": false,
2139
- "type": "boolean"
2140
2756
  }
2141
2757
  },
2142
2758
  "hasDynamicHelp": true,
2143
2759
  "hiddenAliases": [],
2144
- "id": "agent:test:run-eval",
2760
+ "id": "agent:preview:send",
2145
2761
  "pluginAlias": "@salesforce/plugin-agent",
2146
2762
  "pluginName": "@salesforce/plugin-agent",
2147
2763
  "pluginType": "core",
2148
- "state": "beta",
2149
2764
  "strict": true,
2150
- "summary": "Run rich evaluation tests against an Agentforce agent.",
2765
+ "summary": "Send a message to an existing agent preview session.",
2151
2766
  "enableJsonFlag": true,
2767
+ "requiresProject": true,
2152
2768
  "envVariablesSection": {
2153
2769
  "header": "ENVIRONMENT VARIABLES",
2154
2770
  "body": [
@@ -2163,19 +2779,19 @@
2163
2779
  "body": [
2164
2780
  {
2165
2781
  "name": "Succeeded (0)",
2166
- "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
2782
+ "description": "Message sent successfully and agent response received."
2167
2783
  },
2168
2784
  {
2169
- "name": "Failed (1)",
2170
- "description": "Tests encountered execution errors (tests couldn't run properly)."
2785
+ "name": "NotFound (2)",
2786
+ "description": "Agent not found, or no preview session exists for this agent."
2171
2787
  },
2172
2788
  {
2173
- "name": "NotFound (2)",
2174
- "description": "Agent not found, spec file not found, or invalid agent name."
2789
+ "name": "PreviewSendFailed (4)",
2790
+ "description": "Failed to send message or receive response from the preview session."
2175
2791
  },
2176
2792
  {
2177
- "name": "OperationFailed (4)",
2178
- "description": "Failed to execute tests due to API or network errors."
2793
+ "name": "SessionAmbiguous (5)",
2794
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
2179
2795
  }
2180
2796
  ]
2181
2797
  },
@@ -2184,27 +2800,88 @@
2184
2800
  "lib",
2185
2801
  "commands",
2186
2802
  "agent",
2187
- "test",
2188
- "run-eval.js"
2803
+ "preview",
2804
+ "send.js"
2189
2805
  ],
2190
2806
  "aliasPermutations": [],
2191
2807
  "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"
2808
+ "agent:preview:send",
2809
+ "preview:agent:send",
2810
+ "preview:send:agent",
2811
+ "agent:send:preview",
2812
+ "send:agent:preview",
2813
+ "send:preview:agent"
2198
2814
  ]
2199
2815
  },
2200
- "agent:test:run": {
2816
+ "agent:preview:sessions": {
2201
2817
  "aliases": [],
2202
2818
  "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.",
2819
+ "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.",
2204
2820
  "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"
2821
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
2822
+ ],
2823
+ "flags": {
2824
+ "json": {
2825
+ "description": "Format output as json.",
2826
+ "helpGroup": "GLOBAL",
2827
+ "name": "json",
2828
+ "allowNo": false,
2829
+ "type": "boolean"
2830
+ },
2831
+ "flags-dir": {
2832
+ "helpGroup": "GLOBAL",
2833
+ "name": "flags-dir",
2834
+ "summary": "Import flag values from a directory.",
2835
+ "hasDynamicHelp": false,
2836
+ "multiple": false,
2837
+ "type": "option"
2838
+ }
2839
+ },
2840
+ "hasDynamicHelp": false,
2841
+ "hiddenAliases": [],
2842
+ "id": "agent:preview:sessions",
2843
+ "pluginAlias": "@salesforce/plugin-agent",
2844
+ "pluginName": "@salesforce/plugin-agent",
2845
+ "pluginType": "core",
2846
+ "strict": true,
2847
+ "summary": "List all known programmatic agent preview sessions.",
2848
+ "enableJsonFlag": true,
2849
+ "requiresProject": true,
2850
+ "errorCodes": {
2851
+ "header": "ERROR CODES",
2852
+ "body": [
2853
+ {
2854
+ "name": "Succeeded (0)",
2855
+ "description": "Sessions listed successfully (or empty list if no active sessions)."
2856
+ }
2857
+ ]
2858
+ },
2859
+ "isESM": true,
2860
+ "relativePath": [
2861
+ "lib",
2862
+ "commands",
2863
+ "agent",
2864
+ "preview",
2865
+ "sessions.js"
2866
+ ],
2867
+ "aliasPermutations": [],
2868
+ "permutations": [
2869
+ "agent:preview:sessions",
2870
+ "preview:agent:sessions",
2871
+ "preview:sessions:agent",
2872
+ "agent:sessions:preview",
2873
+ "sessions:agent:preview",
2874
+ "sessions:preview:agent"
2875
+ ]
2876
+ },
2877
+ "agent:preview:start": {
2878
+ "aliases": [],
2879
+ "args": {},
2880
+ "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.",
2881
+ "examples": [
2882
+ "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",
2883
+ "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",
2884
+ "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2208
2885
  ],
2209
2886
  "flags": {
2210
2887
  "json": {
@@ -2242,71 +2919,58 @@
2242
2919
  "api-name": {
2243
2920
  "char": "n",
2244
2921
  "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.",
2246
- "hasDynamicHelp": false,
2247
- "multiple": false,
2248
- "type": "option"
2249
- },
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",
2922
+ "summary": "API name of the activated published agent you want to preview.",
2262
2923
  "hasDynamicHelp": false,
2263
2924
  "multiple": false,
2264
- "options": [
2265
- "json",
2266
- "human",
2267
- "junit",
2268
- "tap"
2269
- ],
2270
2925
  "type": "option"
2271
2926
  },
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.",
2927
+ "authoring-bundle": {
2928
+ "name": "authoring-bundle",
2929
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2277
2930
  "hasDynamicHelp": false,
2278
2931
  "multiple": false,
2279
2932
  "type": "option"
2280
2933
  },
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).",
2285
- "hasDynamicHelp": false,
2286
- "multiple": false,
2287
- "options": [
2288
- "agentforce-studio",
2289
- "testing-center"
2934
+ "use-live-actions": {
2935
+ "exclusive": [
2936
+ "simulate-actions"
2290
2937
  ],
2291
- "type": "option"
2938
+ "name": "use-live-actions",
2939
+ "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
2940
+ "allowNo": false,
2941
+ "type": "boolean"
2292
2942
  },
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.",
2943
+ "simulate-actions": {
2944
+ "exclusive": [
2945
+ "use-live-actions"
2946
+ ],
2947
+ "name": "simulate-actions",
2948
+ "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
2297
2949
  "allowNo": false,
2298
2950
  "type": "boolean"
2951
+ },
2952
+ "agent-json": {
2953
+ "dependsOn": [
2954
+ "authoring-bundle"
2955
+ ],
2956
+ "hidden": true,
2957
+ "name": "agent-json",
2958
+ "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2959
+ "hasDynamicHelp": false,
2960
+ "multiple": false,
2961
+ "type": "option"
2299
2962
  }
2300
2963
  },
2301
2964
  "hasDynamicHelp": true,
2302
2965
  "hiddenAliases": [],
2303
- "id": "agent:test:run",
2966
+ "id": "agent:preview:start",
2304
2967
  "pluginAlias": "@salesforce/plugin-agent",
2305
2968
  "pluginName": "@salesforce/plugin-agent",
2306
2969
  "pluginType": "core",
2307
2970
  "strict": true,
2308
- "summary": "Start an agent test in your org.",
2971
+ "summary": "Start a programmatic agent preview session.",
2309
2972
  "enableJsonFlag": true,
2973
+ "requiresProject": true,
2310
2974
  "envVariablesSection": {
2311
2975
  "header": "ENVIRONMENT VARIABLES",
2312
2976
  "body": [
@@ -2321,19 +2985,23 @@
2321
2985
  "body": [
2322
2986
  {
2323
2987
  "name": "Succeeded (0)",
2324
- "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
2988
+ "description": "Preview session started successfully."
2325
2989
  },
2326
2990
  {
2327
2991
  "name": "Failed (1)",
2328
- "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
2992
+ "description": "Agent Script compilation failed (syntax errors in the script)."
2329
2993
  },
2330
2994
  {
2331
2995
  "name": "NotFound (2)",
2332
- "description": "Test definition not found or invalid test name."
2996
+ "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2333
2997
  },
2334
2998
  {
2335
- "name": "OperationFailed (4)",
2336
- "description": "Failed to start or poll test due to API or network errors."
2999
+ "name": "ServerError (3)",
3000
+ "description": "Compilation API returned HTTP 500 (server error during compilation)."
3001
+ },
3002
+ {
3003
+ "name": "PreviewStartFailed (4)",
3004
+ "description": "Preview session failed to start due to API or network errors."
2337
3005
  }
2338
3006
  ]
2339
3007
  },
@@ -2342,17 +3010,17 @@
2342
3010
  "lib",
2343
3011
  "commands",
2344
3012
  "agent",
2345
- "test",
2346
- "run.js"
3013
+ "preview",
3014
+ "start.js"
2347
3015
  ],
2348
3016
  "aliasPermutations": [],
2349
3017
  "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"
3018
+ "agent:preview:start",
3019
+ "preview:agent:start",
3020
+ "preview:start:agent",
3021
+ "agent:start:preview",
3022
+ "start:agent:preview",
3023
+ "start:preview:agent"
2356
3024
  ]
2357
3025
  },
2358
3026
  "agent:trace:delete": {
@@ -2755,7 +3423,317 @@
2755
3423
  "authoring-bundle:agent:validate",
2756
3424
  "authoring-bundle:validate:agent"
2757
3425
  ]
3426
+ },
3427
+ "agent:adl:file:add": {
3428
+ "aliases": [],
3429
+ "args": {},
3430
+ "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.",
3431
+ "examples": [
3432
+ "Add a file to an existing library:\n<%= config.bin %> <%= command.id %> -i 1JDSG000007IbWX4A0 --path ./docs/new-guide.pdf --target-org myOrg",
3433
+ "Add multiple files:\n<%= config.bin %> <%= command.id %> -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg"
3434
+ ],
3435
+ "flags": {
3436
+ "json": {
3437
+ "description": "Format output as json.",
3438
+ "helpGroup": "GLOBAL",
3439
+ "name": "json",
3440
+ "allowNo": false,
3441
+ "type": "boolean"
3442
+ },
3443
+ "flags-dir": {
3444
+ "helpGroup": "GLOBAL",
3445
+ "name": "flags-dir",
3446
+ "summary": "Import flag values from a directory.",
3447
+ "hasDynamicHelp": false,
3448
+ "multiple": false,
3449
+ "type": "option"
3450
+ },
3451
+ "target-org": {
3452
+ "char": "o",
3453
+ "name": "target-org",
3454
+ "noCacheDefault": true,
3455
+ "required": true,
3456
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3457
+ "hasDynamicHelp": true,
3458
+ "multiple": false,
3459
+ "type": "option"
3460
+ },
3461
+ "api-version": {
3462
+ "description": "Override the api version used for api requests made by this command",
3463
+ "name": "api-version",
3464
+ "hasDynamicHelp": false,
3465
+ "multiple": false,
3466
+ "type": "option"
3467
+ },
3468
+ "library-id": {
3469
+ "char": "i",
3470
+ "name": "library-id",
3471
+ "required": true,
3472
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3473
+ "hasDynamicHelp": false,
3474
+ "multiple": false,
3475
+ "type": "option"
3476
+ },
3477
+ "path": {
3478
+ "char": "f",
3479
+ "name": "path",
3480
+ "required": true,
3481
+ "summary": "Path to file(s) to add. Specify multiple times for batch upload.",
3482
+ "hasDynamicHelp": false,
3483
+ "multiple": true,
3484
+ "type": "option"
3485
+ }
3486
+ },
3487
+ "hasDynamicHelp": true,
3488
+ "hiddenAliases": [],
3489
+ "id": "agent:adl:file:add",
3490
+ "pluginAlias": "@salesforce/plugin-agent",
3491
+ "pluginName": "@salesforce/plugin-agent",
3492
+ "pluginType": "core",
3493
+ "state": "preview",
3494
+ "strict": true,
3495
+ "summary": "Add files to an existing Agentforce Data Library.",
3496
+ "enableJsonFlag": true,
3497
+ "isESM": true,
3498
+ "relativePath": [
3499
+ "lib",
3500
+ "commands",
3501
+ "agent",
3502
+ "adl",
3503
+ "file",
3504
+ "add.js"
3505
+ ],
3506
+ "aliasPermutations": [],
3507
+ "permutations": [
3508
+ "agent:adl:file:add",
3509
+ "adl:agent:file:add",
3510
+ "adl:file:agent:add",
3511
+ "adl:file:add:agent",
3512
+ "agent:file:adl:add",
3513
+ "file:agent:adl:add",
3514
+ "file:adl:agent:add",
3515
+ "file:adl:add:agent",
3516
+ "agent:file:add:adl",
3517
+ "file:agent:add:adl",
3518
+ "file:add:agent:adl",
3519
+ "file:add:adl:agent",
3520
+ "agent:adl:add:file",
3521
+ "adl:agent:add:file",
3522
+ "adl:add:agent:file",
3523
+ "adl:add:file:agent",
3524
+ "agent:add:adl:file",
3525
+ "add:agent:adl:file",
3526
+ "add:adl:agent:file",
3527
+ "add:adl:file:agent",
3528
+ "agent:add:file:adl",
3529
+ "add:agent:file:adl",
3530
+ "add:file:agent:adl",
3531
+ "add:file:adl:agent"
3532
+ ]
3533
+ },
3534
+ "agent:adl:file:delete": {
3535
+ "aliases": [],
3536
+ "args": {},
3537
+ "description": "Permanently removes a file from an SFDRIVE data library and triggers re-indexing of the search index.",
3538
+ "examples": [
3539
+ "Delete a file from a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg"
3540
+ ],
3541
+ "flags": {
3542
+ "json": {
3543
+ "description": "Format output as json.",
3544
+ "helpGroup": "GLOBAL",
3545
+ "name": "json",
3546
+ "allowNo": false,
3547
+ "type": "boolean"
3548
+ },
3549
+ "flags-dir": {
3550
+ "helpGroup": "GLOBAL",
3551
+ "name": "flags-dir",
3552
+ "summary": "Import flag values from a directory.",
3553
+ "hasDynamicHelp": false,
3554
+ "multiple": false,
3555
+ "type": "option"
3556
+ },
3557
+ "target-org": {
3558
+ "char": "o",
3559
+ "name": "target-org",
3560
+ "noCacheDefault": true,
3561
+ "required": true,
3562
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3563
+ "hasDynamicHelp": true,
3564
+ "multiple": false,
3565
+ "type": "option"
3566
+ },
3567
+ "api-version": {
3568
+ "description": "Override the api version used for api requests made by this command",
3569
+ "name": "api-version",
3570
+ "hasDynamicHelp": false,
3571
+ "multiple": false,
3572
+ "type": "option"
3573
+ },
3574
+ "library-id": {
3575
+ "char": "i",
3576
+ "name": "library-id",
3577
+ "required": true,
3578
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3579
+ "hasDynamicHelp": false,
3580
+ "multiple": false,
3581
+ "type": "option"
3582
+ },
3583
+ "file-id": {
3584
+ "name": "file-id",
3585
+ "required": true,
3586
+ "summary": "ID of the file to delete (AiGroundingFileRef record ID).",
3587
+ "hasDynamicHelp": false,
3588
+ "multiple": false,
3589
+ "type": "option"
3590
+ }
3591
+ },
3592
+ "hasDynamicHelp": true,
3593
+ "hiddenAliases": [],
3594
+ "id": "agent:adl:file:delete",
3595
+ "pluginAlias": "@salesforce/plugin-agent",
3596
+ "pluginName": "@salesforce/plugin-agent",
3597
+ "pluginType": "core",
3598
+ "state": "preview",
3599
+ "strict": true,
3600
+ "summary": "Delete a file from an Agentforce Data Library.",
3601
+ "enableJsonFlag": true,
3602
+ "isESM": true,
3603
+ "relativePath": [
3604
+ "lib",
3605
+ "commands",
3606
+ "agent",
3607
+ "adl",
3608
+ "file",
3609
+ "delete.js"
3610
+ ],
3611
+ "aliasPermutations": [],
3612
+ "permutations": [
3613
+ "agent:adl:file:delete",
3614
+ "adl:agent:file:delete",
3615
+ "adl:file:agent:delete",
3616
+ "adl:file:delete:agent",
3617
+ "agent:file:adl:delete",
3618
+ "file:agent:adl:delete",
3619
+ "file:adl:agent:delete",
3620
+ "file:adl:delete:agent",
3621
+ "agent:file:delete:adl",
3622
+ "file:agent:delete:adl",
3623
+ "file:delete:agent:adl",
3624
+ "file:delete:adl:agent",
3625
+ "agent:adl:delete:file",
3626
+ "adl:agent:delete:file",
3627
+ "adl:delete:agent:file",
3628
+ "adl:delete:file:agent",
3629
+ "agent:delete:adl:file",
3630
+ "delete:agent:adl:file",
3631
+ "delete:adl:agent:file",
3632
+ "delete:adl:file:agent",
3633
+ "agent:delete:file:adl",
3634
+ "delete:agent:file:adl",
3635
+ "delete:file:agent:adl",
3636
+ "delete:file:adl:agent"
3637
+ ]
3638
+ },
3639
+ "agent:adl:file:list": {
3640
+ "aliases": [],
3641
+ "args": {},
3642
+ "description": "Returns the list of files in an SFDRIVE library including file name, size, and creation date.",
3643
+ "examples": [
3644
+ "List files in a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg",
3645
+ "List files and output as JSON:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json"
3646
+ ],
3647
+ "flags": {
3648
+ "json": {
3649
+ "description": "Format output as json.",
3650
+ "helpGroup": "GLOBAL",
3651
+ "name": "json",
3652
+ "allowNo": false,
3653
+ "type": "boolean"
3654
+ },
3655
+ "flags-dir": {
3656
+ "helpGroup": "GLOBAL",
3657
+ "name": "flags-dir",
3658
+ "summary": "Import flag values from a directory.",
3659
+ "hasDynamicHelp": false,
3660
+ "multiple": false,
3661
+ "type": "option"
3662
+ },
3663
+ "target-org": {
3664
+ "char": "o",
3665
+ "name": "target-org",
3666
+ "noCacheDefault": true,
3667
+ "required": true,
3668
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3669
+ "hasDynamicHelp": true,
3670
+ "multiple": false,
3671
+ "type": "option"
3672
+ },
3673
+ "api-version": {
3674
+ "description": "Override the api version used for api requests made by this command",
3675
+ "name": "api-version",
3676
+ "hasDynamicHelp": false,
3677
+ "multiple": false,
3678
+ "type": "option"
3679
+ },
3680
+ "library-id": {
3681
+ "char": "i",
3682
+ "name": "library-id",
3683
+ "required": true,
3684
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3685
+ "hasDynamicHelp": false,
3686
+ "multiple": false,
3687
+ "type": "option"
3688
+ }
3689
+ },
3690
+ "hasDynamicHelp": true,
3691
+ "hiddenAliases": [],
3692
+ "id": "agent:adl:file:list",
3693
+ "pluginAlias": "@salesforce/plugin-agent",
3694
+ "pluginName": "@salesforce/plugin-agent",
3695
+ "pluginType": "core",
3696
+ "state": "preview",
3697
+ "strict": true,
3698
+ "summary": "List files in an Agentforce Data Library.",
3699
+ "enableJsonFlag": true,
3700
+ "isESM": true,
3701
+ "relativePath": [
3702
+ "lib",
3703
+ "commands",
3704
+ "agent",
3705
+ "adl",
3706
+ "file",
3707
+ "list.js"
3708
+ ],
3709
+ "aliasPermutations": [],
3710
+ "permutations": [
3711
+ "agent:adl:file:list",
3712
+ "adl:agent:file:list",
3713
+ "adl:file:agent:list",
3714
+ "adl:file:list:agent",
3715
+ "agent:file:adl:list",
3716
+ "file:agent:adl:list",
3717
+ "file:adl:agent:list",
3718
+ "file:adl:list:agent",
3719
+ "agent:file:list:adl",
3720
+ "file:agent:list:adl",
3721
+ "file:list:agent:adl",
3722
+ "file:list:adl:agent",
3723
+ "agent:adl:list:file",
3724
+ "adl:agent:list:file",
3725
+ "adl:list:agent:file",
3726
+ "adl:list:file:agent",
3727
+ "agent:list:adl:file",
3728
+ "list:agent:adl:file",
3729
+ "list:adl:agent:file",
3730
+ "list:adl:file:agent",
3731
+ "agent:list:file:adl",
3732
+ "list:agent:file:adl",
3733
+ "list:file:agent:adl",
3734
+ "list:file:adl:agent"
3735
+ ]
2758
3736
  }
2759
3737
  },
2760
- "version": "1.41.0"
3738
+ "version": "1.42.1"
2761
3739
  }