@salesforce/plugin-agent 1.43.0 → 1.44.4

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 (58) hide show
  1. package/README.md +78 -46
  2. package/lib/adlUtils.d.ts +2 -0
  3. package/lib/adlUtils.js +31 -0
  4. package/lib/adlUtils.js.map +1 -0
  5. package/lib/commands/agent/adl/create.d.ts +6 -1
  6. package/lib/commands/agent/adl/create.js +83 -19
  7. package/lib/commands/agent/adl/create.js.map +1 -1
  8. package/lib/commands/agent/adl/delete.d.ts +0 -1
  9. package/lib/commands/agent/adl/delete.js +3 -2
  10. package/lib/commands/agent/adl/delete.js.map +1 -1
  11. package/lib/commands/agent/adl/file/add.d.ts +0 -1
  12. package/lib/commands/agent/adl/file/add.js +3 -2
  13. package/lib/commands/agent/adl/file/add.js.map +1 -1
  14. package/lib/commands/agent/adl/file/delete.d.ts +0 -1
  15. package/lib/commands/agent/adl/file/delete.js +4 -3
  16. package/lib/commands/agent/adl/file/delete.js.map +1 -1
  17. package/lib/commands/agent/adl/file/list.d.ts +5 -5
  18. package/lib/commands/agent/adl/file/list.js +31 -7
  19. package/lib/commands/agent/adl/file/list.js.map +1 -1
  20. package/lib/commands/agent/adl/get.d.ts +0 -1
  21. package/lib/commands/agent/adl/get.js +15 -3
  22. package/lib/commands/agent/adl/get.js.map +1 -1
  23. package/lib/commands/agent/adl/list.d.ts +0 -1
  24. package/lib/commands/agent/adl/list.js +3 -2
  25. package/lib/commands/agent/adl/list.js.map +1 -1
  26. package/lib/commands/agent/adl/status.d.ts +1 -1
  27. package/lib/commands/agent/adl/status.js +21 -4
  28. package/lib/commands/agent/adl/status.js.map +1 -1
  29. package/lib/commands/agent/adl/update.d.ts +1 -1
  30. package/lib/commands/agent/adl/update.js +18 -5
  31. package/lib/commands/agent/adl/update.js.map +1 -1
  32. package/lib/commands/agent/adl/upload.d.ts +0 -1
  33. package/lib/commands/agent/adl/upload.js +3 -2
  34. package/lib/commands/agent/adl/upload.js.map +1 -1
  35. package/messages/agent.adl.create.md +22 -0
  36. package/messages/agent.adl.file.add.md +2 -0
  37. package/messages/agent.adl.file.delete.md +4 -0
  38. package/messages/agent.adl.file.list.md +12 -0
  39. package/messages/agent.adl.status.md +5 -1
  40. package/messages/agent.adl.update.md +4 -0
  41. package/messages/agent.adl.upload.md +2 -0
  42. package/oclif.manifest.json +635 -573
  43. package/package.json +4 -4
  44. package/schemas/agent-adl-create.json +63 -3
  45. package/schemas/agent-adl-delete.json +5 -2
  46. package/schemas/agent-adl-file-add.json +7 -2
  47. package/schemas/agent-adl-file-delete.json +5 -2
  48. package/schemas/agent-adl-file-list.json +26 -3
  49. package/schemas/agent-adl-get.json +63 -3
  50. package/schemas/agent-adl-list.json +55 -3
  51. package/schemas/agent-adl-status.json +44 -4
  52. package/schemas/agent-adl-update.json +63 -3
  53. package/schemas/agent-adl-upload.json +5 -2
  54. package/schemas/agent-preview-end.json +8 -3
  55. package/schemas/agent-publish-authoring__bundle.json +8 -3
  56. package/schemas/agent-trace-delete.json +7 -2
  57. package/schemas/agent-trace-list.json +9 -2
  58. package/schemas/agent-trace-read.json +131 -21
@@ -421,7 +421,7 @@
421
421
  "agent:adl:create": {
422
422
  "aliases": [],
423
423
  "args": {},
424
- "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).",
424
+ "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).\n\nFor SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload files with `sf agent adl upload` after creation.",
425
425
  "examples": [
426
426
  "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
427
427
  "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",
@@ -528,6 +528,35 @@
528
528
  "hasDynamicHelp": false,
529
529
  "multiple": false,
530
530
  "type": "option"
531
+ },
532
+ "content-fields": {
533
+ "name": "content-fields",
534
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).",
535
+ "hasDynamicHelp": false,
536
+ "multiple": false,
537
+ "type": "option"
538
+ },
539
+ "data-category-ids": {
540
+ "name": "data-category-ids",
541
+ "summary": "Comma-separated list of data category selection IDs for KNOWLEDGE libraries. Mutually exclusive with --data-category-names (provide one or the other, not both).",
542
+ "hasDynamicHelp": false,
543
+ "multiple": false,
544
+ "type": "option"
545
+ },
546
+ "data-category-names": {
547
+ "name": "data-category-names",
548
+ "summary": "Comma-separated list of data category names in qualified format (e.g., \"Group_API_Name.Category\"). Mutually exclusive with --data-category-ids (provide one or the other, not both).",
549
+ "hasDynamicHelp": false,
550
+ "multiple": false,
551
+ "type": "option"
552
+ },
553
+ "wait": {
554
+ "char": "w",
555
+ "name": "wait",
556
+ "summary": "Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries require upload before indexing; RETRIEVER libraries are ready immediately.",
557
+ "hasDynamicHelp": true,
558
+ "multiple": false,
559
+ "type": "option"
531
560
  }
532
561
  },
533
562
  "hasDynamicHelp": true,
@@ -536,7 +565,6 @@
536
565
  "pluginAlias": "@salesforce/plugin-agent",
537
566
  "pluginName": "@salesforce/plugin-agent",
538
567
  "pluginType": "core",
539
- "state": "preview",
540
568
  "strict": true,
541
569
  "summary": "Create an Agentforce Data Library.",
542
570
  "enableJsonFlag": true,
@@ -614,7 +642,6 @@
614
642
  "pluginAlias": "@salesforce/plugin-agent",
615
643
  "pluginName": "@salesforce/plugin-agent",
616
644
  "pluginType": "core",
617
- "state": "preview",
618
645
  "strict": true,
619
646
  "summary": "Delete an Agentforce Data Library.",
620
647
  "enableJsonFlag": true,
@@ -692,7 +719,6 @@
692
719
  "pluginAlias": "@salesforce/plugin-agent",
693
720
  "pluginName": "@salesforce/plugin-agent",
694
721
  "pluginType": "core",
695
- "state": "preview",
696
722
  "strict": true,
697
723
  "summary": "Get details of an Agentforce Data Library.",
698
724
  "enableJsonFlag": true,
@@ -774,7 +800,6 @@
774
800
  "pluginAlias": "@salesforce/plugin-agent",
775
801
  "pluginName": "@salesforce/plugin-agent",
776
802
  "pluginType": "core",
777
- "state": "preview",
778
803
  "strict": true,
779
804
  "summary": "List Agentforce Data Libraries in an org.",
780
805
  "enableJsonFlag": true,
@@ -799,7 +824,7 @@
799
824
  "agent:adl:status": {
800
825
  "aliases": [],
801
826
  "args": {},
802
- "description": "Returns the current indexing status including stage details (DATA_LAKE_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
827
+ "description": "Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
803
828
  "examples": [
804
829
  "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
805
830
  ],
@@ -844,6 +869,12 @@
844
869
  "hasDynamicHelp": false,
845
870
  "multiple": false,
846
871
  "type": "option"
872
+ },
873
+ "include-artifacts": {
874
+ "name": "include-artifacts",
875
+ "summary": "Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs and names on each stage. Slower — requires additional queries.",
876
+ "allowNo": false,
877
+ "type": "boolean"
847
878
  }
848
879
  },
849
880
  "hasDynamicHelp": true,
@@ -852,7 +883,6 @@
852
883
  "pluginAlias": "@salesforce/plugin-agent",
853
884
  "pluginName": "@salesforce/plugin-agent",
854
885
  "pluginType": "core",
855
- "state": "preview",
856
886
  "strict": true,
857
887
  "summary": "Get indexing status of an Agentforce Data Library.",
858
888
  "enableJsonFlag": true,
@@ -954,6 +984,12 @@
954
984
  "allowNo": true,
955
985
  "type": "boolean"
956
986
  },
987
+ "data-category-rule": {
988
+ "name": "data-category-rule",
989
+ "summary": "Enable or disable data category filtering for KNOWLEDGE libraries. Use --no-data-category-rule to disable.",
990
+ "allowNo": true,
991
+ "type": "boolean"
992
+ },
957
993
  "retriever-id": {
958
994
  "name": "retriever-id",
959
995
  "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
@@ -968,7 +1004,6 @@
968
1004
  "pluginAlias": "@salesforce/plugin-agent",
969
1005
  "pluginName": "@salesforce/plugin-agent",
970
1006
  "pluginType": "core",
971
- "state": "preview",
972
1007
  "strict": true,
973
1008
  "summary": "Update an Agentforce Data Library.",
974
1009
  "enableJsonFlag": true,
@@ -993,7 +1028,7 @@
993
1028
  "agent:adl:upload": {
994
1029
  "aliases": [],
995
1030
  "args": {},
996
- "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.",
1031
+ "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\nUpload triggers the full Data Cloud provisioning pipeline, creating all downstream assets (DLO, DMO, SearchIndex, Retriever). Use `sf agent adl status` to monitor progress. For adding files to an already-provisioned library, use `sf agent adl file add` instead.\n\nThis command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER libraries require no file upload.",
997
1032
  "examples": [
998
1033
  "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",
999
1034
  "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
@@ -1064,7 +1099,6 @@
1064
1099
  "pluginAlias": "@salesforce/plugin-agent",
1065
1100
  "pluginName": "@salesforce/plugin-agent",
1066
1101
  "pluginType": "core",
1067
- "state": "preview",
1068
1102
  "strict": true,
1069
1103
  "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1070
1104
  "enableJsonFlag": true,
@@ -1707,16 +1741,16 @@
1707
1741
  "update:mcp:agent"
1708
1742
  ]
1709
1743
  },
1710
- "agent:generate:agent-spec": {
1744
+ "agent:preview:end": {
1711
1745
  "aliases": [],
1712
1746
  "args": {},
1713
- "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.)",
1747
+ "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.",
1714
1748
  "examples": [
1715
- "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.\"",
1716
- "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",
1717
- "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
1718
- "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\"",
1719
- "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"
1749
+ "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",
1750
+ "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",
1751
+ "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",
1752
+ "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",
1753
+ "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>"
1720
1754
  ],
1721
1755
  "flags": {
1722
1756
  "json": {
@@ -1751,164 +1785,129 @@
1751
1785
  "multiple": false,
1752
1786
  "type": "option"
1753
1787
  },
1754
- "type": {
1755
- "name": "type",
1756
- "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.",
1757
- "hasDynamicHelp": false,
1758
- "multiple": false,
1759
- "options": [
1760
- "customer",
1761
- "internal"
1788
+ "session-id": {
1789
+ "exclusive": [
1790
+ "all"
1762
1791
  ],
1763
- "type": "option"
1764
- },
1765
- "role": {
1766
- "name": "role",
1767
- "summary": "Role of the agent.",
1768
- "hasDynamicHelp": false,
1769
- "multiple": false,
1770
- "type": "option"
1771
- },
1772
- "company-name": {
1773
- "name": "company-name",
1774
- "summary": "Name of your company.",
1775
- "hasDynamicHelp": false,
1776
- "multiple": false,
1777
- "type": "option"
1778
- },
1779
- "company-description": {
1780
- "name": "company-description",
1781
- "summary": "Description of your company.",
1782
- "hasDynamicHelp": false,
1783
- "multiple": false,
1784
- "type": "option"
1785
- },
1786
- "company-website": {
1787
- "name": "company-website",
1788
- "summary": "Website URL of your company.",
1789
- "hasDynamicHelp": false,
1790
- "multiple": false,
1791
- "type": "option"
1792
- },
1793
- "max-topics": {
1794
- "name": "max-topics",
1795
- "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
1796
- "hasDynamicHelp": false,
1797
- "multiple": false,
1798
- "type": "option"
1799
- },
1800
- "agent-user": {
1801
- "name": "agent-user",
1802
- "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
1803
- "hasDynamicHelp": false,
1804
- "multiple": false,
1805
- "type": "option"
1806
- },
1807
- "enrich-logs": {
1808
- "name": "enrich-logs",
1809
- "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
1792
+ "name": "session-id",
1793
+ "required": false,
1794
+ "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.",
1810
1795
  "hasDynamicHelp": false,
1811
1796
  "multiple": false,
1812
- "options": [
1813
- "true",
1814
- "false"
1815
- ],
1816
1797
  "type": "option"
1817
1798
  },
1818
- "tone": {
1819
- "name": "tone",
1820
- "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
1821
- "hasDynamicHelp": false,
1822
- "multiple": false,
1823
- "options": [
1824
- "formal",
1825
- "casual",
1826
- "neutral"
1799
+ "api-name": {
1800
+ "char": "n",
1801
+ "exclusive": [
1802
+ "authoring-bundle"
1827
1803
  ],
1828
- "type": "option"
1829
- },
1830
- "spec": {
1831
- "name": "spec",
1832
- "summary": "Agent spec file, in YAML format, to use as input to the command.",
1804
+ "name": "api-name",
1805
+ "summary": "API name of the activated published agent you want to preview.",
1833
1806
  "hasDynamicHelp": false,
1834
1807
  "multiple": false,
1835
1808
  "type": "option"
1836
1809
  },
1837
- "output-file": {
1838
- "name": "output-file",
1839
- "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
1840
- "default": "specs/agentSpec.yaml",
1810
+ "authoring-bundle": {
1811
+ "exclusive": [
1812
+ "api-name"
1813
+ ],
1814
+ "name": "authoring-bundle",
1815
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1841
1816
  "hasDynamicHelp": false,
1842
1817
  "multiple": false,
1843
1818
  "type": "option"
1844
1819
  },
1845
- "full-interview": {
1846
- "name": "full-interview",
1847
- "summary": "Prompt for both required and optional flags.",
1820
+ "all": {
1821
+ "exclusive": [
1822
+ "session-id"
1823
+ ],
1824
+ "name": "all",
1825
+ "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.",
1848
1826
  "allowNo": false,
1849
1827
  "type": "boolean"
1850
1828
  },
1851
- "prompt-template": {
1852
- "name": "prompt-template",
1853
- "summary": "API name of a customized prompt template to use instead of the default prompt template.",
1854
- "hasDynamicHelp": false,
1855
- "multiple": false,
1856
- "type": "option"
1857
- },
1858
- "grounding-context": {
1859
- "dependsOn": [
1860
- "prompt-template"
1861
- ],
1862
- "name": "grounding-context",
1863
- "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
1864
- "hasDynamicHelp": false,
1865
- "multiple": false,
1866
- "type": "option"
1867
- },
1868
- "force-overwrite": {
1869
- "name": "force-overwrite",
1870
- "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
1829
+ "no-prompt": {
1830
+ "char": "p",
1831
+ "name": "no-prompt",
1832
+ "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
1871
1833
  "allowNo": false,
1872
1834
  "type": "boolean"
1873
1835
  }
1874
1836
  },
1875
1837
  "hasDynamicHelp": true,
1876
1838
  "hiddenAliases": [],
1877
- "id": "agent:generate:agent-spec",
1839
+ "id": "agent:preview:end",
1878
1840
  "pluginAlias": "@salesforce/plugin-agent",
1879
1841
  "pluginName": "@salesforce/plugin-agent",
1880
1842
  "pluginType": "core",
1881
1843
  "strict": true,
1882
- "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
1844
+ "summary": "End an existing programmatic agent preview session and get trace location.",
1883
1845
  "enableJsonFlag": true,
1884
1846
  "requiresProject": true,
1847
+ "envVariablesSection": {
1848
+ "header": "ENVIRONMENT VARIABLES",
1849
+ "body": [
1850
+ {
1851
+ "name": "SF_TARGET_ORG",
1852
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1853
+ }
1854
+ ]
1855
+ },
1856
+ "errorCodes": {
1857
+ "header": "ERROR CODES",
1858
+ "body": [
1859
+ {
1860
+ "name": "Succeeded (0)",
1861
+ "description": "Preview session ended successfully and traces saved."
1862
+ },
1863
+ {
1864
+ "name": "ExactlyOneRequired (2)",
1865
+ "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
1866
+ },
1867
+ {
1868
+ "name": "NotFound (2)",
1869
+ "description": "Agent not found, or no preview session exists for this agent."
1870
+ },
1871
+ {
1872
+ "name": "PreviewEndFailed (4)",
1873
+ "description": "Failed to end the preview session."
1874
+ },
1875
+ {
1876
+ "name": "PreviewEndPartialFailure (68)",
1877
+ "description": "With --all, one or more sessions failed to end while others succeeded."
1878
+ },
1879
+ {
1880
+ "name": "SessionAmbiguous (5)",
1881
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
1882
+ }
1883
+ ]
1884
+ },
1885
1885
  "isESM": true,
1886
1886
  "relativePath": [
1887
1887
  "lib",
1888
1888
  "commands",
1889
1889
  "agent",
1890
- "generate",
1891
- "agent-spec.js"
1890
+ "preview",
1891
+ "end.js"
1892
1892
  ],
1893
1893
  "aliasPermutations": [],
1894
1894
  "permutations": [
1895
- "agent:generate:agent-spec",
1896
- "generate:agent:agent-spec",
1897
- "generate:agent-spec:agent",
1898
- "agent:agent-spec:generate",
1899
- "agent-spec:agent:generate",
1900
- "agent-spec:generate:agent"
1895
+ "agent:preview:end",
1896
+ "preview:agent:end",
1897
+ "preview:end:agent",
1898
+ "agent:end:preview",
1899
+ "end:agent:preview",
1900
+ "end:preview:agent"
1901
1901
  ]
1902
1902
  },
1903
- "agent:generate:authoring-bundle": {
1903
+ "agent:preview:send": {
1904
1904
  "aliases": [],
1905
1905
  "args": {},
1906
- "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.",
1906
+ "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.",
1907
1907
  "examples": [
1908
- "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 %>",
1909
- "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\"",
1910
- "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\"",
1911
- "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"
1908
+ "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>",
1909
+ "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",
1910
+ "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"
1912
1911
  ],
1913
1912
  "flags": {
1914
1913
  "json": {
@@ -1936,13 +1935,6 @@
1936
1935
  "multiple": false,
1937
1936
  "type": "option"
1938
1937
  },
1939
- "api-name": {
1940
- "name": "api-name",
1941
- "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.",
1942
- "hasDynamicHelp": false,
1943
- "multiple": false,
1944
- "type": "option"
1945
- },
1946
1938
  "api-version": {
1947
1939
  "description": "Override the api version used for api requests made by this command",
1948
1940
  "name": "api-version",
@@ -1950,77 +1942,103 @@
1950
1942
  "multiple": false,
1951
1943
  "type": "option"
1952
1944
  },
1953
- "spec": {
1954
- "char": "f",
1955
- "name": "spec",
1956
- "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.",
1945
+ "session-id": {
1946
+ "name": "session-id",
1947
+ "required": false,
1948
+ "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.",
1957
1949
  "hasDynamicHelp": false,
1958
1950
  "multiple": false,
1959
1951
  "type": "option"
1960
1952
  },
1961
- "no-spec": {
1962
- "name": "no-spec",
1963
- "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
1964
- "allowNo": false,
1965
- "type": "boolean"
1966
- },
1967
- "output-dir": {
1968
- "char": "d",
1969
- "name": "output-dir",
1970
- "summary": "Directory where the authoring bundle files are generated.",
1953
+ "utterance": {
1954
+ "char": "u",
1955
+ "name": "utterance",
1956
+ "required": true,
1957
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
1971
1958
  "hasDynamicHelp": false,
1972
1959
  "multiple": false,
1973
1960
  "type": "option"
1974
1961
  },
1975
- "name": {
1962
+ "api-name": {
1976
1963
  "char": "n",
1977
- "name": "name",
1978
- "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
1964
+ "name": "api-name",
1965
+ "summary": "API name of the activated published agent you want to preview.",
1979
1966
  "hasDynamicHelp": false,
1980
1967
  "multiple": false,
1981
1968
  "type": "option"
1982
1969
  },
1983
- "force-overwrite": {
1984
- "name": "force-overwrite",
1985
- "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
1986
- "allowNo": false,
1987
- "type": "boolean"
1970
+ "authoring-bundle": {
1971
+ "name": "authoring-bundle",
1972
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1973
+ "hasDynamicHelp": false,
1974
+ "multiple": false,
1975
+ "type": "option"
1988
1976
  }
1989
1977
  },
1990
1978
  "hasDynamicHelp": true,
1991
1979
  "hiddenAliases": [],
1992
- "id": "agent:generate:authoring-bundle",
1980
+ "id": "agent:preview:send",
1993
1981
  "pluginAlias": "@salesforce/plugin-agent",
1994
1982
  "pluginName": "@salesforce/plugin-agent",
1995
1983
  "pluginType": "core",
1996
1984
  "strict": true,
1997
- "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
1985
+ "summary": "Send a message to an existing agent preview session.",
1998
1986
  "enableJsonFlag": true,
1999
1987
  "requiresProject": true,
1988
+ "envVariablesSection": {
1989
+ "header": "ENVIRONMENT VARIABLES",
1990
+ "body": [
1991
+ {
1992
+ "name": "SF_TARGET_ORG",
1993
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1994
+ }
1995
+ ]
1996
+ },
1997
+ "errorCodes": {
1998
+ "header": "ERROR CODES",
1999
+ "body": [
2000
+ {
2001
+ "name": "Succeeded (0)",
2002
+ "description": "Message sent successfully and agent response received."
2003
+ },
2004
+ {
2005
+ "name": "NotFound (2)",
2006
+ "description": "Agent not found, or no preview session exists for this agent."
2007
+ },
2008
+ {
2009
+ "name": "PreviewSendFailed (4)",
2010
+ "description": "Failed to send message or receive response from the preview session."
2011
+ },
2012
+ {
2013
+ "name": "SessionAmbiguous (5)",
2014
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
2015
+ }
2016
+ ]
2017
+ },
2000
2018
  "isESM": true,
2001
2019
  "relativePath": [
2002
2020
  "lib",
2003
2021
  "commands",
2004
2022
  "agent",
2005
- "generate",
2006
- "authoring-bundle.js"
2023
+ "preview",
2024
+ "send.js"
2007
2025
  ],
2008
2026
  "aliasPermutations": [],
2009
2027
  "permutations": [
2010
- "agent:generate:authoring-bundle",
2011
- "generate:agent:authoring-bundle",
2012
- "generate:authoring-bundle:agent",
2013
- "agent:authoring-bundle:generate",
2014
- "authoring-bundle:agent:generate",
2015
- "authoring-bundle:generate:agent"
2028
+ "agent:preview:send",
2029
+ "preview:agent:send",
2030
+ "preview:send:agent",
2031
+ "agent:send:preview",
2032
+ "send:agent:preview",
2033
+ "send:preview:agent"
2016
2034
  ]
2017
2035
  },
2018
- "agent:generate:template": {
2036
+ "agent:preview:sessions": {
2019
2037
  "aliases": [],
2020
2038
  "args": {},
2021
- "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.",
2039
+ "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.",
2022
2040
  "examples": [
2023
- "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"
2041
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
2024
2042
  ],
2025
2043
  "flags": {
2026
2044
  "json": {
@@ -2037,90 +2055,62 @@
2037
2055
  "hasDynamicHelp": false,
2038
2056
  "multiple": false,
2039
2057
  "type": "option"
2040
- },
2041
- "api-version": {
2042
- "description": "Override the api version used for api requests made by this command",
2043
- "name": "api-version",
2044
- "hasDynamicHelp": false,
2045
- "multiple": false,
2046
- "type": "option"
2047
- },
2048
- "source-org": {
2049
- "char": "s",
2050
- "name": "source-org",
2051
- "noCacheDefault": true,
2052
- "required": true,
2053
- "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
2054
- "hasDynamicHelp": true,
2055
- "multiple": false,
2056
- "type": "option"
2057
- },
2058
- "agent-version": {
2059
- "name": "agent-version",
2060
- "required": true,
2061
- "summary": "Version of the agent (BotVersion).",
2062
- "hasDynamicHelp": false,
2063
- "multiple": false,
2064
- "type": "option"
2065
- },
2066
- "agent-file": {
2067
- "char": "f",
2068
- "name": "agent-file",
2069
- "required": true,
2070
- "summary": "Path to an agent (Bot) metadata file.",
2071
- "hasDynamicHelp": false,
2072
- "multiple": false,
2073
- "type": "option"
2074
- },
2075
- "output-dir": {
2076
- "char": "r",
2077
- "name": "output-dir",
2078
- "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
2079
- "hasDynamicHelp": false,
2080
- "multiple": false,
2081
- "type": "option"
2082
2058
  }
2083
2059
  },
2084
- "hasDynamicHelp": true,
2060
+ "hasDynamicHelp": false,
2085
2061
  "hiddenAliases": [],
2086
- "id": "agent:generate:template",
2062
+ "id": "agent:preview:sessions",
2087
2063
  "pluginAlias": "@salesforce/plugin-agent",
2088
2064
  "pluginName": "@salesforce/plugin-agent",
2089
2065
  "pluginType": "core",
2090
2066
  "strict": true,
2091
- "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.",
2067
+ "summary": "List all known programmatic agent preview sessions.",
2092
2068
  "enableJsonFlag": true,
2093
2069
  "requiresProject": true,
2070
+ "errorCodes": {
2071
+ "header": "ERROR CODES",
2072
+ "body": [
2073
+ {
2074
+ "name": "Succeeded (0)",
2075
+ "description": "Sessions listed successfully (or empty list if no active sessions)."
2076
+ }
2077
+ ]
2078
+ },
2094
2079
  "isESM": true,
2095
2080
  "relativePath": [
2096
2081
  "lib",
2097
2082
  "commands",
2098
2083
  "agent",
2099
- "generate",
2100
- "template.js"
2084
+ "preview",
2085
+ "sessions.js"
2101
2086
  ],
2102
2087
  "aliasPermutations": [],
2103
2088
  "permutations": [
2104
- "agent:generate:template",
2105
- "generate:agent:template",
2106
- "generate:template:agent",
2107
- "agent:template:generate",
2108
- "template:agent:generate",
2109
- "template:generate:agent"
2089
+ "agent:preview:sessions",
2090
+ "preview:agent:sessions",
2091
+ "preview:sessions:agent",
2092
+ "agent:sessions:preview",
2093
+ "sessions:agent:preview",
2094
+ "sessions:preview:agent"
2110
2095
  ]
2111
2096
  },
2112
- "agent:generate:test-spec": {
2097
+ "agent:preview:start": {
2113
2098
  "aliases": [],
2114
2099
  "args": {},
2115
- "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` (legacy testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.\n\nIf you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file extension; pass --test-runner to override.",
2100
+ "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.",
2116
2101
  "examples": [
2117
- "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
2118
- "Generate an Agentforce Studio (NGT) test spec YAML file interactively:\n<%= config.bin %> <%= command.id %> --test-runner agentforce-studio",
2119
- "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",
2120
- "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",
2121
- "Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml"
2102
+ "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",
2103
+ "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",
2104
+ "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2122
2105
  ],
2123
2106
  "flags": {
2107
+ "json": {
2108
+ "description": "Format output as json.",
2109
+ "helpGroup": "GLOBAL",
2110
+ "name": "json",
2111
+ "allowNo": false,
2112
+ "type": "boolean"
2113
+ },
2124
2114
  "flags-dir": {
2125
2115
  "helpGroup": "GLOBAL",
2126
2116
  "name": "flags-dir",
@@ -2129,169 +2119,85 @@
2129
2119
  "multiple": false,
2130
2120
  "type": "option"
2131
2121
  },
2132
- "from-definition": {
2133
- "char": "d",
2134
- "name": "from-definition",
2135
- "summary": "Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
2136
- "hasDynamicHelp": false,
2122
+ "target-org": {
2123
+ "char": "o",
2124
+ "name": "target-org",
2125
+ "noCacheDefault": true,
2126
+ "required": true,
2127
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2128
+ "hasDynamicHelp": true,
2137
2129
  "multiple": false,
2138
2130
  "type": "option"
2139
2131
  },
2140
- "force-overwrite": {
2141
- "name": "force-overwrite",
2142
- "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
2143
- "allowNo": false,
2144
- "type": "boolean"
2132
+ "api-version": {
2133
+ "description": "Override the api version used for api requests made by this command",
2134
+ "name": "api-version",
2135
+ "hasDynamicHelp": false,
2136
+ "multiple": false,
2137
+ "type": "option"
2145
2138
  },
2146
- "output-file": {
2147
- "char": "f",
2148
- "name": "output-file",
2149
- "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\" (legacy) or \"specs/<AGENT_API_NAME>-ngtTestSpec.yaml\" (Agentforce Studio).",
2139
+ "api-name": {
2140
+ "char": "n",
2141
+ "name": "api-name",
2142
+ "summary": "API name of the activated published agent you want to preview.",
2150
2143
  "hasDynamicHelp": false,
2151
2144
  "multiple": false,
2152
2145
  "type": "option"
2153
2146
  },
2154
- "test-runner": {
2155
- "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.",
2156
- "name": "test-runner",
2157
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2147
+ "authoring-bundle": {
2148
+ "name": "authoring-bundle",
2149
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2158
2150
  "hasDynamicHelp": false,
2159
2151
  "multiple": false,
2160
- "options": [
2161
- "agentforce-studio",
2162
- "testing-center"
2152
+ "type": "option"
2153
+ },
2154
+ "use-live-actions": {
2155
+ "exclusive": [
2156
+ "simulate-actions"
2157
+ ],
2158
+ "name": "use-live-actions",
2159
+ "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
2160
+ "allowNo": false,
2161
+ "type": "boolean"
2162
+ },
2163
+ "simulate-actions": {
2164
+ "exclusive": [
2165
+ "use-live-actions"
2163
2166
  ],
2164
- "type": "option"
2165
- }
2166
- },
2167
- "hasDynamicHelp": false,
2168
- "hiddenAliases": [],
2169
- "id": "agent:generate:test-spec",
2170
- "pluginAlias": "@salesforce/plugin-agent",
2171
- "pluginName": "@salesforce/plugin-agent",
2172
- "pluginType": "core",
2173
- "strict": true,
2174
- "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
2175
- "enableJsonFlag": false,
2176
- "isESM": true,
2177
- "relativePath": [
2178
- "lib",
2179
- "commands",
2180
- "agent",
2181
- "generate",
2182
- "test-spec.js"
2183
- ],
2184
- "aliasPermutations": [],
2185
- "permutations": [
2186
- "agent:generate:test-spec",
2187
- "generate:agent:test-spec",
2188
- "generate:test-spec:agent",
2189
- "agent:test-spec:generate",
2190
- "test-spec:agent:generate",
2191
- "test-spec:generate:agent"
2192
- ]
2193
- },
2194
- "agent:preview:end": {
2195
- "aliases": [],
2196
- "args": {},
2197
- "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.",
2198
- "examples": [
2199
- "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",
2200
- "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",
2201
- "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",
2202
- "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",
2203
- "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>"
2204
- ],
2205
- "flags": {
2206
- "json": {
2207
- "description": "Format output as json.",
2208
- "helpGroup": "GLOBAL",
2209
- "name": "json",
2210
- "allowNo": false,
2211
- "type": "boolean"
2212
- },
2213
- "flags-dir": {
2214
- "helpGroup": "GLOBAL",
2215
- "name": "flags-dir",
2216
- "summary": "Import flag values from a directory.",
2217
- "hasDynamicHelp": false,
2218
- "multiple": false,
2167
+ "name": "simulate-actions",
2168
+ "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
2169
+ "allowNo": false,
2170
+ "type": "boolean"
2171
+ },
2172
+ "context-variables": {
2173
+ "description": "Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't transform them.\n\nLinked context variables use the \"$Context.\" prefix. These map to externally-provided fields that the runtime resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.\n\nState variables use the bare developerName, no prefix. These seed mutable agent state declared in agentVersion.stateVariables. Example: MyStateVar=some-value.\n\nBoth namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.\n\nTips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name will see null. (3) Type defaults to Text.",
2174
+ "name": "context-variables",
2175
+ "summary": "Session variables for the agent preview session, in the form Name=Value.",
2176
+ "delimiter": ",",
2177
+ "hasDynamicHelp": false,
2178
+ "multiple": true,
2219
2179
  "type": "option"
2220
2180
  },
2221
- "target-org": {
2222
- "char": "o",
2223
- "name": "target-org",
2224
- "noCacheDefault": true,
2225
- "required": true,
2226
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2227
- "hasDynamicHelp": true,
2228
- "multiple": false,
2229
- "type": "option"
2230
- },
2231
- "api-version": {
2232
- "description": "Override the api version used for api requests made by this command",
2233
- "name": "api-version",
2234
- "hasDynamicHelp": false,
2235
- "multiple": false,
2236
- "type": "option"
2237
- },
2238
- "session-id": {
2239
- "exclusive": [
2240
- "all"
2241
- ],
2242
- "name": "session-id",
2243
- "required": false,
2244
- "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.",
2245
- "hasDynamicHelp": false,
2246
- "multiple": false,
2247
- "type": "option"
2248
- },
2249
- "api-name": {
2250
- "char": "n",
2251
- "exclusive": [
2181
+ "agent-json": {
2182
+ "dependsOn": [
2252
2183
  "authoring-bundle"
2253
2184
  ],
2254
- "name": "api-name",
2255
- "summary": "API name of the activated published agent you want to preview.",
2256
- "hasDynamicHelp": false,
2257
- "multiple": false,
2258
- "type": "option"
2259
- },
2260
- "authoring-bundle": {
2261
- "exclusive": [
2262
- "api-name"
2263
- ],
2264
- "name": "authoring-bundle",
2265
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2185
+ "hidden": true,
2186
+ "name": "agent-json",
2187
+ "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2266
2188
  "hasDynamicHelp": false,
2267
2189
  "multiple": false,
2268
2190
  "type": "option"
2269
- },
2270
- "all": {
2271
- "exclusive": [
2272
- "session-id"
2273
- ],
2274
- "name": "all",
2275
- "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.",
2276
- "allowNo": false,
2277
- "type": "boolean"
2278
- },
2279
- "no-prompt": {
2280
- "char": "p",
2281
- "name": "no-prompt",
2282
- "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
2283
- "allowNo": false,
2284
- "type": "boolean"
2285
2191
  }
2286
2192
  },
2287
2193
  "hasDynamicHelp": true,
2288
2194
  "hiddenAliases": [],
2289
- "id": "agent:preview:end",
2195
+ "id": "agent:preview:start",
2290
2196
  "pluginAlias": "@salesforce/plugin-agent",
2291
2197
  "pluginName": "@salesforce/plugin-agent",
2292
2198
  "pluginType": "core",
2293
2199
  "strict": true,
2294
- "summary": "End an existing programmatic agent preview session and get trace location.",
2200
+ "summary": "Start a programmatic agent preview session.",
2295
2201
  "enableJsonFlag": true,
2296
2202
  "requiresProject": true,
2297
2203
  "envVariablesSection": {
@@ -2308,27 +2214,23 @@
2308
2214
  "body": [
2309
2215
  {
2310
2216
  "name": "Succeeded (0)",
2311
- "description": "Preview session ended successfully and traces saved."
2217
+ "description": "Preview session started successfully."
2312
2218
  },
2313
2219
  {
2314
- "name": "ExactlyOneRequired (2)",
2315
- "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
2220
+ "name": "Failed (1)",
2221
+ "description": "Agent Script compilation failed (syntax errors in the script)."
2316
2222
  },
2317
2223
  {
2318
2224
  "name": "NotFound (2)",
2319
- "description": "Agent not found, or no preview session exists for this agent."
2320
- },
2321
- {
2322
- "name": "PreviewEndFailed (4)",
2323
- "description": "Failed to end the preview session."
2225
+ "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2324
2226
  },
2325
2227
  {
2326
- "name": "PreviewEndPartialFailure (68)",
2327
- "description": "With --all, one or more sessions failed to end while others succeeded."
2228
+ "name": "ServerError (3)",
2229
+ "description": "Compilation API returned HTTP 500 (server error during compilation)."
2328
2230
  },
2329
2231
  {
2330
- "name": "SessionAmbiguous (5)",
2331
- "description": "Multiple preview sessions found; specify --session-id to choose one."
2232
+ "name": "PreviewStartFailed (4)",
2233
+ "description": "Preview session failed to start due to API or network errors."
2332
2234
  }
2333
2235
  ]
2334
2236
  },
@@ -2338,26 +2240,28 @@
2338
2240
  "commands",
2339
2241
  "agent",
2340
2242
  "preview",
2341
- "end.js"
2243
+ "start.js"
2342
2244
  ],
2343
2245
  "aliasPermutations": [],
2344
2246
  "permutations": [
2345
- "agent:preview:end",
2346
- "preview:agent:end",
2347
- "preview:end:agent",
2348
- "agent:end:preview",
2349
- "end:agent:preview",
2350
- "end:preview:agent"
2247
+ "agent:preview:start",
2248
+ "preview:agent:start",
2249
+ "preview:start:agent",
2250
+ "agent:start:preview",
2251
+ "start:agent:preview",
2252
+ "start:preview:agent"
2351
2253
  ]
2352
2254
  },
2353
- "agent:preview:send": {
2255
+ "agent:generate:agent-spec": {
2354
2256
  "aliases": [],
2355
2257
  "args": {},
2356
- "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.",
2258
+ "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.)",
2357
2259
  "examples": [
2358
- "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>",
2359
- "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",
2360
- "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"
2260
+ "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.\"",
2261
+ "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",
2262
+ "Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
2263
+ "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\"",
2264
+ "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"
2361
2265
  ],
2362
2266
  "flags": {
2363
2267
  "json": {
@@ -2392,103 +2296,164 @@
2392
2296
  "multiple": false,
2393
2297
  "type": "option"
2394
2298
  },
2395
- "session-id": {
2396
- "name": "session-id",
2397
- "required": false,
2398
- "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.",
2299
+ "type": {
2300
+ "name": "type",
2301
+ "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.",
2399
2302
  "hasDynamicHelp": false,
2400
2303
  "multiple": false,
2304
+ "options": [
2305
+ "customer",
2306
+ "internal"
2307
+ ],
2401
2308
  "type": "option"
2402
2309
  },
2403
- "utterance": {
2404
- "char": "u",
2405
- "name": "utterance",
2406
- "required": true,
2407
- "summary": "Utterance to send to the agent, enclosed in double quotes.",
2310
+ "role": {
2311
+ "name": "role",
2312
+ "summary": "Role of the agent.",
2408
2313
  "hasDynamicHelp": false,
2409
2314
  "multiple": false,
2410
2315
  "type": "option"
2411
2316
  },
2412
- "api-name": {
2413
- "char": "n",
2414
- "name": "api-name",
2415
- "summary": "API name of the activated published agent you want to preview.",
2317
+ "company-name": {
2318
+ "name": "company-name",
2319
+ "summary": "Name of your company.",
2416
2320
  "hasDynamicHelp": false,
2417
2321
  "multiple": false,
2418
2322
  "type": "option"
2419
2323
  },
2420
- "authoring-bundle": {
2421
- "name": "authoring-bundle",
2422
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2324
+ "company-description": {
2325
+ "name": "company-description",
2326
+ "summary": "Description of your company.",
2423
2327
  "hasDynamicHelp": false,
2424
2328
  "multiple": false,
2425
2329
  "type": "option"
2330
+ },
2331
+ "company-website": {
2332
+ "name": "company-website",
2333
+ "summary": "Website URL of your company.",
2334
+ "hasDynamicHelp": false,
2335
+ "multiple": false,
2336
+ "type": "option"
2337
+ },
2338
+ "max-topics": {
2339
+ "name": "max-topics",
2340
+ "summary": "Maximum number of topics to generate in the agent spec; default is 5.",
2341
+ "hasDynamicHelp": false,
2342
+ "multiple": false,
2343
+ "type": "option"
2344
+ },
2345
+ "agent-user": {
2346
+ "name": "agent-user",
2347
+ "summary": "Username of a user in your org to assign to your agent; determines what your agent can access and do.",
2348
+ "hasDynamicHelp": false,
2349
+ "multiple": false,
2350
+ "type": "option"
2351
+ },
2352
+ "enrich-logs": {
2353
+ "name": "enrich-logs",
2354
+ "summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
2355
+ "hasDynamicHelp": false,
2356
+ "multiple": false,
2357
+ "options": [
2358
+ "true",
2359
+ "false"
2360
+ ],
2361
+ "type": "option"
2362
+ },
2363
+ "tone": {
2364
+ "name": "tone",
2365
+ "summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
2366
+ "hasDynamicHelp": false,
2367
+ "multiple": false,
2368
+ "options": [
2369
+ "formal",
2370
+ "casual",
2371
+ "neutral"
2372
+ ],
2373
+ "type": "option"
2374
+ },
2375
+ "spec": {
2376
+ "name": "spec",
2377
+ "summary": "Agent spec file, in YAML format, to use as input to the command.",
2378
+ "hasDynamicHelp": false,
2379
+ "multiple": false,
2380
+ "type": "option"
2381
+ },
2382
+ "output-file": {
2383
+ "name": "output-file",
2384
+ "summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
2385
+ "default": "specs/agentSpec.yaml",
2386
+ "hasDynamicHelp": false,
2387
+ "multiple": false,
2388
+ "type": "option"
2389
+ },
2390
+ "full-interview": {
2391
+ "name": "full-interview",
2392
+ "summary": "Prompt for both required and optional flags.",
2393
+ "allowNo": false,
2394
+ "type": "boolean"
2395
+ },
2396
+ "prompt-template": {
2397
+ "name": "prompt-template",
2398
+ "summary": "API name of a customized prompt template to use instead of the default prompt template.",
2399
+ "hasDynamicHelp": false,
2400
+ "multiple": false,
2401
+ "type": "option"
2402
+ },
2403
+ "grounding-context": {
2404
+ "dependsOn": [
2405
+ "prompt-template"
2406
+ ],
2407
+ "name": "grounding-context",
2408
+ "summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
2409
+ "hasDynamicHelp": false,
2410
+ "multiple": false,
2411
+ "type": "option"
2412
+ },
2413
+ "force-overwrite": {
2414
+ "name": "force-overwrite",
2415
+ "summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
2416
+ "allowNo": false,
2417
+ "type": "boolean"
2426
2418
  }
2427
2419
  },
2428
2420
  "hasDynamicHelp": true,
2429
2421
  "hiddenAliases": [],
2430
- "id": "agent:preview:send",
2422
+ "id": "agent:generate:agent-spec",
2431
2423
  "pluginAlias": "@salesforce/plugin-agent",
2432
2424
  "pluginName": "@salesforce/plugin-agent",
2433
2425
  "pluginType": "core",
2434
2426
  "strict": true,
2435
- "summary": "Send a message to an existing agent preview session.",
2427
+ "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
2436
2428
  "enableJsonFlag": true,
2437
2429
  "requiresProject": true,
2438
- "envVariablesSection": {
2439
- "header": "ENVIRONMENT VARIABLES",
2440
- "body": [
2441
- {
2442
- "name": "SF_TARGET_ORG",
2443
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2444
- }
2445
- ]
2446
- },
2447
- "errorCodes": {
2448
- "header": "ERROR CODES",
2449
- "body": [
2450
- {
2451
- "name": "Succeeded (0)",
2452
- "description": "Message sent successfully and agent response received."
2453
- },
2454
- {
2455
- "name": "NotFound (2)",
2456
- "description": "Agent not found, or no preview session exists for this agent."
2457
- },
2458
- {
2459
- "name": "PreviewSendFailed (4)",
2460
- "description": "Failed to send message or receive response from the preview session."
2461
- },
2462
- {
2463
- "name": "SessionAmbiguous (5)",
2464
- "description": "Multiple preview sessions found; specify --session-id to choose one."
2465
- }
2466
- ]
2467
- },
2468
2430
  "isESM": true,
2469
2431
  "relativePath": [
2470
2432
  "lib",
2471
2433
  "commands",
2472
2434
  "agent",
2473
- "preview",
2474
- "send.js"
2435
+ "generate",
2436
+ "agent-spec.js"
2475
2437
  ],
2476
2438
  "aliasPermutations": [],
2477
2439
  "permutations": [
2478
- "agent:preview:send",
2479
- "preview:agent:send",
2480
- "preview:send:agent",
2481
- "agent:send:preview",
2482
- "send:agent:preview",
2483
- "send:preview:agent"
2440
+ "agent:generate:agent-spec",
2441
+ "generate:agent:agent-spec",
2442
+ "generate:agent-spec:agent",
2443
+ "agent:agent-spec:generate",
2444
+ "agent-spec:agent:generate",
2445
+ "agent-spec:generate:agent"
2484
2446
  ]
2485
2447
  },
2486
- "agent:preview:sessions": {
2448
+ "agent:generate:authoring-bundle": {
2487
2449
  "aliases": [],
2488
2450
  "args": {},
2489
- "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.",
2451
+ "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.",
2490
2452
  "examples": [
2491
- "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
2453
+ "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 %>",
2454
+ "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\"",
2455
+ "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\"",
2456
+ "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"
2492
2457
  ],
2493
2458
  "flags": {
2494
2459
  "json": {
@@ -2505,53 +2470,102 @@
2505
2470
  "hasDynamicHelp": false,
2506
2471
  "multiple": false,
2507
2472
  "type": "option"
2473
+ },
2474
+ "target-org": {
2475
+ "char": "o",
2476
+ "name": "target-org",
2477
+ "noCacheDefault": true,
2478
+ "required": true,
2479
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2480
+ "hasDynamicHelp": true,
2481
+ "multiple": false,
2482
+ "type": "option"
2483
+ },
2484
+ "api-name": {
2485
+ "name": "api-name",
2486
+ "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.",
2487
+ "hasDynamicHelp": false,
2488
+ "multiple": false,
2489
+ "type": "option"
2490
+ },
2491
+ "api-version": {
2492
+ "description": "Override the api version used for api requests made by this command",
2493
+ "name": "api-version",
2494
+ "hasDynamicHelp": false,
2495
+ "multiple": false,
2496
+ "type": "option"
2497
+ },
2498
+ "spec": {
2499
+ "char": "f",
2500
+ "name": "spec",
2501
+ "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.",
2502
+ "hasDynamicHelp": false,
2503
+ "multiple": false,
2504
+ "type": "option"
2505
+ },
2506
+ "no-spec": {
2507
+ "name": "no-spec",
2508
+ "summary": "Skip prompting for an agent spec and use the default Agent Script boilerplate in the generated authoring bundle.",
2509
+ "allowNo": false,
2510
+ "type": "boolean"
2511
+ },
2512
+ "output-dir": {
2513
+ "char": "d",
2514
+ "name": "output-dir",
2515
+ "summary": "Directory where the authoring bundle files are generated.",
2516
+ "hasDynamicHelp": false,
2517
+ "multiple": false,
2518
+ "type": "option"
2519
+ },
2520
+ "name": {
2521
+ "char": "n",
2522
+ "name": "name",
2523
+ "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
2524
+ "hasDynamicHelp": false,
2525
+ "multiple": false,
2526
+ "type": "option"
2527
+ },
2528
+ "force-overwrite": {
2529
+ "name": "force-overwrite",
2530
+ "summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
2531
+ "allowNo": false,
2532
+ "type": "boolean"
2508
2533
  }
2509
2534
  },
2510
- "hasDynamicHelp": false,
2535
+ "hasDynamicHelp": true,
2511
2536
  "hiddenAliases": [],
2512
- "id": "agent:preview:sessions",
2537
+ "id": "agent:generate:authoring-bundle",
2513
2538
  "pluginAlias": "@salesforce/plugin-agent",
2514
2539
  "pluginName": "@salesforce/plugin-agent",
2515
2540
  "pluginType": "core",
2516
2541
  "strict": true,
2517
- "summary": "List all known programmatic agent preview sessions.",
2542
+ "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
2518
2543
  "enableJsonFlag": true,
2519
2544
  "requiresProject": true,
2520
- "errorCodes": {
2521
- "header": "ERROR CODES",
2522
- "body": [
2523
- {
2524
- "name": "Succeeded (0)",
2525
- "description": "Sessions listed successfully (or empty list if no active sessions)."
2526
- }
2527
- ]
2528
- },
2529
2545
  "isESM": true,
2530
2546
  "relativePath": [
2531
2547
  "lib",
2532
2548
  "commands",
2533
2549
  "agent",
2534
- "preview",
2535
- "sessions.js"
2550
+ "generate",
2551
+ "authoring-bundle.js"
2536
2552
  ],
2537
2553
  "aliasPermutations": [],
2538
2554
  "permutations": [
2539
- "agent:preview:sessions",
2540
- "preview:agent:sessions",
2541
- "preview:sessions:agent",
2542
- "agent:sessions:preview",
2543
- "sessions:agent:preview",
2544
- "sessions:preview:agent"
2555
+ "agent:generate:authoring-bundle",
2556
+ "generate:agent:authoring-bundle",
2557
+ "generate:authoring-bundle:agent",
2558
+ "agent:authoring-bundle:generate",
2559
+ "authoring-bundle:agent:generate",
2560
+ "authoring-bundle:generate:agent"
2545
2561
  ]
2546
2562
  },
2547
- "agent:preview:start": {
2563
+ "agent:generate:template": {
2548
2564
  "aliases": [],
2549
2565
  "args": {},
2550
- "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.",
2566
+ "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.",
2551
2567
  "examples": [
2552
- "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",
2553
- "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",
2554
- "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2568
+ "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"
2555
2569
  ],
2556
2570
  "flags": {
2557
2571
  "json": {
@@ -2569,137 +2583,157 @@
2569
2583
  "multiple": false,
2570
2584
  "type": "option"
2571
2585
  },
2572
- "target-org": {
2573
- "char": "o",
2574
- "name": "target-org",
2586
+ "api-version": {
2587
+ "description": "Override the api version used for api requests made by this command",
2588
+ "name": "api-version",
2589
+ "hasDynamicHelp": false,
2590
+ "multiple": false,
2591
+ "type": "option"
2592
+ },
2593
+ "source-org": {
2594
+ "char": "s",
2595
+ "name": "source-org",
2575
2596
  "noCacheDefault": true,
2576
2597
  "required": true,
2577
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2598
+ "summary": "Username or alias of the namespaced scratch org that contains the agent which this template is based on.",
2578
2599
  "hasDynamicHelp": true,
2579
2600
  "multiple": false,
2580
2601
  "type": "option"
2581
2602
  },
2582
- "api-version": {
2583
- "description": "Override the api version used for api requests made by this command",
2584
- "name": "api-version",
2603
+ "agent-version": {
2604
+ "name": "agent-version",
2605
+ "required": true,
2606
+ "summary": "Version of the agent (BotVersion).",
2585
2607
  "hasDynamicHelp": false,
2586
2608
  "multiple": false,
2587
2609
  "type": "option"
2588
2610
  },
2589
- "api-name": {
2590
- "char": "n",
2591
- "name": "api-name",
2592
- "summary": "API name of the activated published agent you want to preview.",
2611
+ "agent-file": {
2612
+ "char": "f",
2613
+ "name": "agent-file",
2614
+ "required": true,
2615
+ "summary": "Path to an agent (Bot) metadata file.",
2593
2616
  "hasDynamicHelp": false,
2594
2617
  "multiple": false,
2595
2618
  "type": "option"
2596
2619
  },
2597
- "authoring-bundle": {
2598
- "name": "authoring-bundle",
2599
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2620
+ "output-dir": {
2621
+ "char": "r",
2622
+ "name": "output-dir",
2623
+ "summary": "Directory where the generated BotTemplate and GenAiPlannerBundle files are saved.",
2624
+ "hasDynamicHelp": false,
2625
+ "multiple": false,
2626
+ "type": "option"
2627
+ }
2628
+ },
2629
+ "hasDynamicHelp": true,
2630
+ "hiddenAliases": [],
2631
+ "id": "agent:generate:template",
2632
+ "pluginAlias": "@salesforce/plugin-agent",
2633
+ "pluginName": "@salesforce/plugin-agent",
2634
+ "pluginType": "core",
2635
+ "strict": true,
2636
+ "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.",
2637
+ "enableJsonFlag": true,
2638
+ "requiresProject": true,
2639
+ "isESM": true,
2640
+ "relativePath": [
2641
+ "lib",
2642
+ "commands",
2643
+ "agent",
2644
+ "generate",
2645
+ "template.js"
2646
+ ],
2647
+ "aliasPermutations": [],
2648
+ "permutations": [
2649
+ "agent:generate:template",
2650
+ "generate:agent:template",
2651
+ "generate:template:agent",
2652
+ "agent:template:generate",
2653
+ "template:agent:generate",
2654
+ "template:generate:agent"
2655
+ ]
2656
+ },
2657
+ "agent:generate:test-spec": {
2658
+ "aliases": [],
2659
+ "args": {},
2660
+ "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` (legacy testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.\n\nIf you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file extension; pass --test-runner to override.",
2661
+ "examples": [
2662
+ "Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
2663
+ "Generate an Agentforce Studio (NGT) test spec YAML file interactively:\n<%= config.bin %> <%= command.id %> --test-runner agentforce-studio",
2664
+ "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",
2665
+ "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",
2666
+ "Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:\n<%= config.bin %> <%= command.id %> --from-definition force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml"
2667
+ ],
2668
+ "flags": {
2669
+ "flags-dir": {
2670
+ "helpGroup": "GLOBAL",
2671
+ "name": "flags-dir",
2672
+ "summary": "Import flag values from a directory.",
2600
2673
  "hasDynamicHelp": false,
2601
2674
  "multiple": false,
2602
2675
  "type": "option"
2603
2676
  },
2604
- "use-live-actions": {
2605
- "exclusive": [
2606
- "simulate-actions"
2607
- ],
2608
- "name": "use-live-actions",
2609
- "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
2610
- "allowNo": false,
2611
- "type": "boolean"
2677
+ "from-definition": {
2678
+ "char": "d",
2679
+ "name": "from-definition",
2680
+ "summary": "Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project that you want to convert to a test spec YAML file.",
2681
+ "hasDynamicHelp": false,
2682
+ "multiple": false,
2683
+ "type": "option"
2612
2684
  },
2613
- "simulate-actions": {
2614
- "exclusive": [
2615
- "use-live-actions"
2616
- ],
2617
- "name": "simulate-actions",
2618
- "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
2685
+ "force-overwrite": {
2686
+ "name": "force-overwrite",
2687
+ "summary": "Don't prompt for confirmation when overwriting an existing test spec YAML file.",
2619
2688
  "allowNo": false,
2620
2689
  "type": "boolean"
2621
2690
  },
2622
- "context-variables": {
2623
- "description": "Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't transform them.\n\nLinked context variables use the \"$Context.\" prefix. These map to externally-provided fields that the runtime resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.\n\nState variables use the bare developerName, no prefix. These seed mutable agent state declared in agentVersion.stateVariables. Example: MyStateVar=some-value.\n\nBoth namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.\n\nTips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name will see null. (3) Type defaults to Text.",
2624
- "name": "context-variables",
2625
- "summary": "Session variables for the agent preview session, in the form Name=Value.",
2626
- "delimiter": ",",
2691
+ "output-file": {
2692
+ "char": "f",
2693
+ "name": "output-file",
2694
+ "summary": "Name of the generated test spec YAML file. Default value is \"specs/<AGENT_API_NAME>-testSpec.yaml\" (legacy) or \"specs/<AGENT_API_NAME>-ngtTestSpec.yaml\" (Agentforce Studio).",
2627
2695
  "hasDynamicHelp": false,
2628
- "multiple": true,
2696
+ "multiple": false,
2629
2697
  "type": "option"
2630
2698
  },
2631
- "agent-json": {
2632
- "dependsOn": [
2633
- "authoring-bundle"
2634
- ],
2635
- "hidden": true,
2636
- "name": "agent-json",
2637
- "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2699
+ "test-runner": {
2700
+ "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.",
2701
+ "name": "test-runner",
2702
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2638
2703
  "hasDynamicHelp": false,
2639
2704
  "multiple": false,
2705
+ "options": [
2706
+ "agentforce-studio",
2707
+ "testing-center"
2708
+ ],
2640
2709
  "type": "option"
2641
2710
  }
2642
2711
  },
2643
- "hasDynamicHelp": true,
2712
+ "hasDynamicHelp": false,
2644
2713
  "hiddenAliases": [],
2645
- "id": "agent:preview:start",
2714
+ "id": "agent:generate:test-spec",
2646
2715
  "pluginAlias": "@salesforce/plugin-agent",
2647
2716
  "pluginName": "@salesforce/plugin-agent",
2648
2717
  "pluginType": "core",
2649
2718
  "strict": true,
2650
- "summary": "Start a programmatic agent preview session.",
2651
- "enableJsonFlag": true,
2652
- "requiresProject": true,
2653
- "envVariablesSection": {
2654
- "header": "ENVIRONMENT VARIABLES",
2655
- "body": [
2656
- {
2657
- "name": "SF_TARGET_ORG",
2658
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2659
- }
2660
- ]
2661
- },
2662
- "errorCodes": {
2663
- "header": "ERROR CODES",
2664
- "body": [
2665
- {
2666
- "name": "Succeeded (0)",
2667
- "description": "Preview session started successfully."
2668
- },
2669
- {
2670
- "name": "Failed (1)",
2671
- "description": "Agent Script compilation failed (syntax errors in the script)."
2672
- },
2673
- {
2674
- "name": "NotFound (2)",
2675
- "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2676
- },
2677
- {
2678
- "name": "ServerError (3)",
2679
- "description": "Compilation API returned HTTP 500 (server error during compilation)."
2680
- },
2681
- {
2682
- "name": "PreviewStartFailed (4)",
2683
- "description": "Preview session failed to start due to API or network errors."
2684
- }
2685
- ]
2686
- },
2719
+ "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
2720
+ "enableJsonFlag": false,
2687
2721
  "isESM": true,
2688
2722
  "relativePath": [
2689
2723
  "lib",
2690
2724
  "commands",
2691
2725
  "agent",
2692
- "preview",
2693
- "start.js"
2726
+ "generate",
2727
+ "test-spec.js"
2694
2728
  ],
2695
2729
  "aliasPermutations": [],
2696
2730
  "permutations": [
2697
- "agent:preview:start",
2698
- "preview:agent:start",
2699
- "preview:start:agent",
2700
- "agent:start:preview",
2701
- "start:agent:preview",
2702
- "start:preview:agent"
2731
+ "agent:generate:test-spec",
2732
+ "generate:agent:test-spec",
2733
+ "generate:test-spec:agent",
2734
+ "agent:test-spec:generate",
2735
+ "test-spec:agent:generate",
2736
+ "test-spec:generate:agent"
2703
2737
  ]
2704
2738
  },
2705
2739
  "agent:publish:authoring-bundle": {
@@ -4080,7 +4114,7 @@
4080
4114
  "agent:adl:file:add": {
4081
4115
  "aliases": [],
4082
4116
  "args": {},
4083
- "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.",
4117
+ "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\nAdds files to an existing READY library. Unlike `sf agent adl upload`, this does NOT create new downstream Data Cloud assets — it appends files to the existing SearchIndex and triggers re-indexing.\n\nConstraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.",
4084
4118
  "examples": [
4085
4119
  "Add a file to an existing library:\n<%= config.bin %> <%= command.id %> -i 1JDSG000007IbWX4A0 --path ./docs/new-guide.pdf --target-org myOrg",
4086
4120
  "Add multiple files:\n<%= config.bin %> <%= command.id %> -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg"
@@ -4143,7 +4177,6 @@
4143
4177
  "pluginAlias": "@salesforce/plugin-agent",
4144
4178
  "pluginName": "@salesforce/plugin-agent",
4145
4179
  "pluginType": "core",
4146
- "state": "preview",
4147
4180
  "strict": true,
4148
4181
  "summary": "Add files to an existing Agentforce Data Library.",
4149
4182
  "enableJsonFlag": true,
@@ -4248,7 +4281,6 @@
4248
4281
  "pluginAlias": "@salesforce/plugin-agent",
4249
4282
  "pluginName": "@salesforce/plugin-agent",
4250
4283
  "pluginType": "core",
4251
- "state": "preview",
4252
4284
  "strict": true,
4253
4285
  "summary": "Delete a file from an Agentforce Data Library.",
4254
4286
  "enableJsonFlag": true,
@@ -4338,6 +4370,37 @@
4338
4370
  "hasDynamicHelp": false,
4339
4371
  "multiple": false,
4340
4372
  "type": "option"
4373
+ },
4374
+ "page-size": {
4375
+ "name": "page-size",
4376
+ "summary": "Number of files to return per page (1-200, default 50).",
4377
+ "default": 50,
4378
+ "hasDynamicHelp": false,
4379
+ "multiple": false,
4380
+ "type": "option"
4381
+ },
4382
+ "offset": {
4383
+ "name": "offset",
4384
+ "summary": "Number of files to skip before returning results (for pagination).",
4385
+ "default": 0,
4386
+ "hasDynamicHelp": false,
4387
+ "multiple": false,
4388
+ "type": "option"
4389
+ },
4390
+ "status": {
4391
+ "name": "status",
4392
+ "summary": "Filter files by indexing status.",
4393
+ "hasDynamicHelp": false,
4394
+ "multiple": false,
4395
+ "options": [
4396
+ "uploaded",
4397
+ "indexing",
4398
+ "indexed",
4399
+ "index_failed",
4400
+ "deleting",
4401
+ "delete_failed"
4402
+ ],
4403
+ "type": "option"
4341
4404
  }
4342
4405
  },
4343
4406
  "hasDynamicHelp": true,
@@ -4346,7 +4409,6 @@
4346
4409
  "pluginAlias": "@salesforce/plugin-agent",
4347
4410
  "pluginName": "@salesforce/plugin-agent",
4348
4411
  "pluginType": "core",
4349
- "state": "preview",
4350
4412
  "strict": true,
4351
4413
  "summary": "List files in an Agentforce Data Library.",
4352
4414
  "enableJsonFlag": true,
@@ -4605,5 +4667,5 @@
4605
4667
  ]
4606
4668
  }
4607
4669
  },
4608
- "version": "1.43.0"
4670
+ "version": "1.44.4"
4609
4671
  }