@salesforce/plugin-agent 1.27.7 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +223 -16
  2. package/lib/commands/agent/generate/authoring-bundle.d.ts +0 -1
  3. package/lib/commands/agent/generate/authoring-bundle.js +77 -49
  4. package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
  5. package/lib/commands/agent/preview/end.d.ts +20 -0
  6. package/lib/commands/agent/preview/end.js +77 -0
  7. package/lib/commands/agent/preview/end.js.map +1 -0
  8. package/lib/commands/agent/preview/send.d.ts +23 -0
  9. package/lib/commands/agent/preview/send.js +74 -0
  10. package/lib/commands/agent/preview/send.js.map +1 -0
  11. package/lib/commands/agent/preview/sessions.d.ts +14 -0
  12. package/lib/commands/agent/preview/sessions.js +58 -0
  13. package/lib/commands/agent/preview/sessions.js.map +1 -0
  14. package/lib/commands/agent/preview/start.d.ts +19 -0
  15. package/lib/commands/agent/preview/start.js +66 -0
  16. package/lib/commands/agent/preview/start.js.map +1 -0
  17. package/lib/components/agent-preview-react.js.map +1 -1
  18. package/lib/previewSessionStore.d.ts +45 -0
  19. package/lib/previewSessionStore.js +159 -0
  20. package/lib/previewSessionStore.js.map +1 -0
  21. package/messages/agent.generate.authoring-bundle.md +51 -3
  22. package/messages/agent.preview.end.md +47 -0
  23. package/messages/agent.preview.md +1 -1
  24. package/messages/agent.preview.send.md +47 -0
  25. package/messages/agent.preview.sessions.md +27 -0
  26. package/messages/agent.preview.start.md +41 -0
  27. package/oclif.manifest.json +431 -102
  28. package/package.json +3 -3
  29. package/schemas/agent-preview-end.json +19 -0
  30. package/schemas/agent-preview-send.json +28 -0
  31. package/schemas/agent-preview-sessions.json +25 -0
  32. package/schemas/agent-preview-start.json +16 -0
@@ -282,7 +282,7 @@
282
282
  "api-name": {
283
283
  "char": "n",
284
284
  "name": "api-name",
285
- "summary": "API name of the published and active agent you want to interact with.",
285
+ "summary": "API name of the activated published agent you want to interact with.",
286
286
  "hasDynamicHelp": false,
287
287
  "multiple": false,
288
288
  "type": "option"
@@ -623,22 +623,6 @@
623
623
  "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
624
624
  "enableJsonFlag": true,
625
625
  "requiresProject": true,
626
- "FLAGGABLE_PROMPTS": {
627
- "name": {
628
- "message": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
629
- "promptMessage": "Name (label) of the authoring bundle",
630
- "required": true
631
- },
632
- "api-name": {
633
- "message": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
634
- "promptMessage": "API name of the new authoring bundle"
635
- },
636
- "spec": {
637
- "message": "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.",
638
- "promptMessage": "Path to the agent spec YAML file",
639
- "required": true
640
- }
641
- },
642
626
  "isESM": true,
643
627
  "relativePath": [
644
628
  "lib",
@@ -891,90 +875,6 @@
891
875
  "authoring-bundle:publish:agent"
892
876
  ]
893
877
  },
894
- "agent:validate:authoring-bundle": {
895
- "aliases": [],
896
- "args": {},
897
- "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
898
- "examples": [
899
- "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
900
- "Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
901
- ],
902
- "flags": {
903
- "json": {
904
- "description": "Format output as json.",
905
- "helpGroup": "GLOBAL",
906
- "name": "json",
907
- "allowNo": false,
908
- "type": "boolean"
909
- },
910
- "flags-dir": {
911
- "helpGroup": "GLOBAL",
912
- "name": "flags-dir",
913
- "summary": "Import flag values from a directory.",
914
- "hasDynamicHelp": false,
915
- "multiple": false,
916
- "type": "option"
917
- },
918
- "target-org": {
919
- "char": "o",
920
- "name": "target-org",
921
- "noCacheDefault": true,
922
- "required": true,
923
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
924
- "hasDynamicHelp": true,
925
- "multiple": false,
926
- "type": "option"
927
- },
928
- "api-version": {
929
- "description": "Override the api version used for api requests made by this command",
930
- "name": "api-version",
931
- "hasDynamicHelp": false,
932
- "multiple": false,
933
- "type": "option"
934
- },
935
- "api-name": {
936
- "char": "n",
937
- "name": "api-name",
938
- "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
939
- "hasDynamicHelp": false,
940
- "multiple": false,
941
- "type": "option"
942
- }
943
- },
944
- "hasDynamicHelp": true,
945
- "hiddenAliases": [],
946
- "id": "agent:validate:authoring-bundle",
947
- "pluginAlias": "@salesforce/plugin-agent",
948
- "pluginName": "@salesforce/plugin-agent",
949
- "pluginType": "core",
950
- "strict": true,
951
- "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
952
- "enableJsonFlag": true,
953
- "requiresProject": true,
954
- "FLAGGABLE_PROMPTS": {
955
- "api-name": {
956
- "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
957
- "promptMessage": "API name of the authoring bundle to validate"
958
- }
959
- },
960
- "isESM": true,
961
- "relativePath": [
962
- "lib",
963
- "commands",
964
- "agent",
965
- "validate",
966
- "authoring-bundle.js"
967
- ],
968
- "aliasPermutations": [],
969
- "permutations": [
970
- "agent:validate:authoring-bundle",
971
- "validate:agent:authoring-bundle",
972
- "validate:authoring-bundle:agent",
973
- "agent:authoring-bundle:validate",
974
- "authoring-bundle:agent:validate",
975
- "authoring-bundle:validate:agent"
976
- ]
977
- },
978
878
  "agent:test:create": {
979
879
  "aliases": [],
980
880
  "args": {},
@@ -1488,7 +1388,436 @@
1488
1388
  "run:agent:test",
1489
1389
  "run:test:agent"
1490
1390
  ]
1391
+ },
1392
+ "agent:preview:end": {
1393
+ "aliases": [],
1394
+ "args": {},
1395
+ "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, 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.",
1396
+ "examples": [
1397
+ "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",
1398
+ "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",
1399
+ "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"
1400
+ ],
1401
+ "flags": {
1402
+ "json": {
1403
+ "description": "Format output as json.",
1404
+ "helpGroup": "GLOBAL",
1405
+ "name": "json",
1406
+ "allowNo": false,
1407
+ "type": "boolean"
1408
+ },
1409
+ "flags-dir": {
1410
+ "helpGroup": "GLOBAL",
1411
+ "name": "flags-dir",
1412
+ "summary": "Import flag values from a directory.",
1413
+ "hasDynamicHelp": false,
1414
+ "multiple": false,
1415
+ "type": "option"
1416
+ },
1417
+ "target-org": {
1418
+ "char": "o",
1419
+ "name": "target-org",
1420
+ "noCacheDefault": true,
1421
+ "required": true,
1422
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1423
+ "hasDynamicHelp": true,
1424
+ "multiple": false,
1425
+ "type": "option"
1426
+ },
1427
+ "api-version": {
1428
+ "description": "Override the api version used for api requests made by this command",
1429
+ "name": "api-version",
1430
+ "hasDynamicHelp": false,
1431
+ "multiple": false,
1432
+ "type": "option"
1433
+ },
1434
+ "session-id": {
1435
+ "name": "session-id",
1436
+ "required": false,
1437
+ "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.",
1438
+ "hasDynamicHelp": false,
1439
+ "multiple": false,
1440
+ "type": "option"
1441
+ },
1442
+ "api-name": {
1443
+ "char": "n",
1444
+ "name": "api-name",
1445
+ "summary": "API name of the activated published agent you want to preview.",
1446
+ "hasDynamicHelp": false,
1447
+ "multiple": false,
1448
+ "type": "option"
1449
+ },
1450
+ "authoring-bundle": {
1451
+ "name": "authoring-bundle",
1452
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1453
+ "hasDynamicHelp": false,
1454
+ "multiple": false,
1455
+ "type": "option"
1456
+ }
1457
+ },
1458
+ "hasDynamicHelp": true,
1459
+ "hiddenAliases": [],
1460
+ "id": "agent:preview:end",
1461
+ "pluginAlias": "@salesforce/plugin-agent",
1462
+ "pluginName": "@salesforce/plugin-agent",
1463
+ "pluginType": "core",
1464
+ "state": "beta",
1465
+ "strict": true,
1466
+ "summary": "End an existing programmatic agent preview session and get trace location.",
1467
+ "enableJsonFlag": true,
1468
+ "requiresProject": true,
1469
+ "isESM": true,
1470
+ "relativePath": [
1471
+ "lib",
1472
+ "commands",
1473
+ "agent",
1474
+ "preview",
1475
+ "end.js"
1476
+ ],
1477
+ "aliasPermutations": [],
1478
+ "permutations": [
1479
+ "agent:preview:end",
1480
+ "preview:agent:end",
1481
+ "preview:end:agent",
1482
+ "agent:end:preview",
1483
+ "end:agent:preview",
1484
+ "end:preview:agent"
1485
+ ]
1486
+ },
1487
+ "agent:preview:send": {
1488
+ "aliases": [],
1489
+ "args": {},
1490
+ "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.",
1491
+ "examples": [
1492
+ "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>",
1493
+ "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",
1494
+ "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"
1495
+ ],
1496
+ "flags": {
1497
+ "json": {
1498
+ "description": "Format output as json.",
1499
+ "helpGroup": "GLOBAL",
1500
+ "name": "json",
1501
+ "allowNo": false,
1502
+ "type": "boolean"
1503
+ },
1504
+ "flags-dir": {
1505
+ "helpGroup": "GLOBAL",
1506
+ "name": "flags-dir",
1507
+ "summary": "Import flag values from a directory.",
1508
+ "hasDynamicHelp": false,
1509
+ "multiple": false,
1510
+ "type": "option"
1511
+ },
1512
+ "target-org": {
1513
+ "char": "o",
1514
+ "name": "target-org",
1515
+ "noCacheDefault": true,
1516
+ "required": true,
1517
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1518
+ "hasDynamicHelp": true,
1519
+ "multiple": false,
1520
+ "type": "option"
1521
+ },
1522
+ "api-version": {
1523
+ "description": "Override the api version used for api requests made by this command",
1524
+ "name": "api-version",
1525
+ "hasDynamicHelp": false,
1526
+ "multiple": false,
1527
+ "type": "option"
1528
+ },
1529
+ "session-id": {
1530
+ "name": "session-id",
1531
+ "required": false,
1532
+ "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.",
1533
+ "hasDynamicHelp": false,
1534
+ "multiple": false,
1535
+ "type": "option"
1536
+ },
1537
+ "utterance": {
1538
+ "char": "u",
1539
+ "name": "utterance",
1540
+ "required": true,
1541
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
1542
+ "hasDynamicHelp": false,
1543
+ "multiple": false,
1544
+ "type": "option"
1545
+ },
1546
+ "api-name": {
1547
+ "char": "n",
1548
+ "name": "api-name",
1549
+ "summary": "API name of the activated published agent you want to preview.",
1550
+ "hasDynamicHelp": false,
1551
+ "multiple": false,
1552
+ "type": "option"
1553
+ },
1554
+ "authoring-bundle": {
1555
+ "name": "authoring-bundle",
1556
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1557
+ "hasDynamicHelp": false,
1558
+ "multiple": false,
1559
+ "type": "option"
1560
+ }
1561
+ },
1562
+ "hasDynamicHelp": true,
1563
+ "hiddenAliases": [],
1564
+ "id": "agent:preview:send",
1565
+ "pluginAlias": "@salesforce/plugin-agent",
1566
+ "pluginName": "@salesforce/plugin-agent",
1567
+ "pluginType": "core",
1568
+ "state": "beta",
1569
+ "strict": true,
1570
+ "summary": "Send a message to an existing agent preview session.",
1571
+ "enableJsonFlag": true,
1572
+ "requiresProject": true,
1573
+ "isESM": true,
1574
+ "relativePath": [
1575
+ "lib",
1576
+ "commands",
1577
+ "agent",
1578
+ "preview",
1579
+ "send.js"
1580
+ ],
1581
+ "aliasPermutations": [],
1582
+ "permutations": [
1583
+ "agent:preview:send",
1584
+ "preview:agent:send",
1585
+ "preview:send:agent",
1586
+ "agent:send:preview",
1587
+ "send:agent:preview",
1588
+ "send:preview:agent"
1589
+ ]
1590
+ },
1591
+ "agent:preview:sessions": {
1592
+ "aliases": [],
1593
+ "args": {},
1594
+ "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.",
1595
+ "examples": [
1596
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
1597
+ ],
1598
+ "flags": {
1599
+ "json": {
1600
+ "description": "Format output as json.",
1601
+ "helpGroup": "GLOBAL",
1602
+ "name": "json",
1603
+ "allowNo": false,
1604
+ "type": "boolean"
1605
+ },
1606
+ "flags-dir": {
1607
+ "helpGroup": "GLOBAL",
1608
+ "name": "flags-dir",
1609
+ "summary": "Import flag values from a directory.",
1610
+ "hasDynamicHelp": false,
1611
+ "multiple": false,
1612
+ "type": "option"
1613
+ }
1614
+ },
1615
+ "hasDynamicHelp": false,
1616
+ "hiddenAliases": [],
1617
+ "id": "agent:preview:sessions",
1618
+ "pluginAlias": "@salesforce/plugin-agent",
1619
+ "pluginName": "@salesforce/plugin-agent",
1620
+ "pluginType": "core",
1621
+ "state": "beta",
1622
+ "strict": true,
1623
+ "summary": "List all known programmatic agent preview sessions.",
1624
+ "enableJsonFlag": true,
1625
+ "requiresProject": true,
1626
+ "isESM": true,
1627
+ "relativePath": [
1628
+ "lib",
1629
+ "commands",
1630
+ "agent",
1631
+ "preview",
1632
+ "sessions.js"
1633
+ ],
1634
+ "aliasPermutations": [],
1635
+ "permutations": [
1636
+ "agent:preview:sessions",
1637
+ "preview:agent:sessions",
1638
+ "preview:sessions:agent",
1639
+ "agent:sessions:preview",
1640
+ "sessions:agent:preview",
1641
+ "sessions:preview:agent"
1642
+ ]
1643
+ },
1644
+ "agent:preview:start": {
1645
+ "aliases": [],
1646
+ "args": {},
1647
+ "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 using the authoring bundle, which contains the agent's Agent Script file, the preview uses mocked actions by default. Specify --use-live-actions for live mode, which uses the real Apex classes, flows, etc, in the org for the actions.",
1648
+ "examples": [
1649
+ "Start a programmatic agent preview session by specifying an authoring bundle; uses mocked actions by default. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org",
1650
+ "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",
1651
+ "Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
1652
+ ],
1653
+ "flags": {
1654
+ "json": {
1655
+ "description": "Format output as json.",
1656
+ "helpGroup": "GLOBAL",
1657
+ "name": "json",
1658
+ "allowNo": false,
1659
+ "type": "boolean"
1660
+ },
1661
+ "flags-dir": {
1662
+ "helpGroup": "GLOBAL",
1663
+ "name": "flags-dir",
1664
+ "summary": "Import flag values from a directory.",
1665
+ "hasDynamicHelp": false,
1666
+ "multiple": false,
1667
+ "type": "option"
1668
+ },
1669
+ "target-org": {
1670
+ "char": "o",
1671
+ "name": "target-org",
1672
+ "noCacheDefault": true,
1673
+ "required": true,
1674
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1675
+ "hasDynamicHelp": true,
1676
+ "multiple": false,
1677
+ "type": "option"
1678
+ },
1679
+ "api-version": {
1680
+ "description": "Override the api version used for api requests made by this command",
1681
+ "name": "api-version",
1682
+ "hasDynamicHelp": false,
1683
+ "multiple": false,
1684
+ "type": "option"
1685
+ },
1686
+ "api-name": {
1687
+ "char": "n",
1688
+ "name": "api-name",
1689
+ "summary": "API name of the activated published agent you want to preview.",
1690
+ "hasDynamicHelp": false,
1691
+ "multiple": false,
1692
+ "type": "option"
1693
+ },
1694
+ "authoring-bundle": {
1695
+ "name": "authoring-bundle",
1696
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1697
+ "hasDynamicHelp": false,
1698
+ "multiple": false,
1699
+ "type": "option"
1700
+ },
1701
+ "use-live-actions": {
1702
+ "name": "use-live-actions",
1703
+ "summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
1704
+ "allowNo": false,
1705
+ "type": "boolean"
1706
+ }
1707
+ },
1708
+ "hasDynamicHelp": true,
1709
+ "hiddenAliases": [],
1710
+ "id": "agent:preview:start",
1711
+ "pluginAlias": "@salesforce/plugin-agent",
1712
+ "pluginName": "@salesforce/plugin-agent",
1713
+ "pluginType": "core",
1714
+ "state": "beta",
1715
+ "strict": true,
1716
+ "summary": "Start a programmatic agent preview session.",
1717
+ "enableJsonFlag": true,
1718
+ "requiresProject": true,
1719
+ "isESM": true,
1720
+ "relativePath": [
1721
+ "lib",
1722
+ "commands",
1723
+ "agent",
1724
+ "preview",
1725
+ "start.js"
1726
+ ],
1727
+ "aliasPermutations": [],
1728
+ "permutations": [
1729
+ "agent:preview:start",
1730
+ "preview:agent:start",
1731
+ "preview:start:agent",
1732
+ "agent:start:preview",
1733
+ "start:agent:preview",
1734
+ "start:preview:agent"
1735
+ ]
1736
+ },
1737
+ "agent:validate:authoring-bundle": {
1738
+ "aliases": [],
1739
+ "args": {},
1740
+ "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
1741
+ "examples": [
1742
+ "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1743
+ "Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
1744
+ ],
1745
+ "flags": {
1746
+ "json": {
1747
+ "description": "Format output as json.",
1748
+ "helpGroup": "GLOBAL",
1749
+ "name": "json",
1750
+ "allowNo": false,
1751
+ "type": "boolean"
1752
+ },
1753
+ "flags-dir": {
1754
+ "helpGroup": "GLOBAL",
1755
+ "name": "flags-dir",
1756
+ "summary": "Import flag values from a directory.",
1757
+ "hasDynamicHelp": false,
1758
+ "multiple": false,
1759
+ "type": "option"
1760
+ },
1761
+ "target-org": {
1762
+ "char": "o",
1763
+ "name": "target-org",
1764
+ "noCacheDefault": true,
1765
+ "required": true,
1766
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1767
+ "hasDynamicHelp": true,
1768
+ "multiple": false,
1769
+ "type": "option"
1770
+ },
1771
+ "api-version": {
1772
+ "description": "Override the api version used for api requests made by this command",
1773
+ "name": "api-version",
1774
+ "hasDynamicHelp": false,
1775
+ "multiple": false,
1776
+ "type": "option"
1777
+ },
1778
+ "api-name": {
1779
+ "char": "n",
1780
+ "name": "api-name",
1781
+ "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
1782
+ "hasDynamicHelp": false,
1783
+ "multiple": false,
1784
+ "type": "option"
1785
+ }
1786
+ },
1787
+ "hasDynamicHelp": true,
1788
+ "hiddenAliases": [],
1789
+ "id": "agent:validate:authoring-bundle",
1790
+ "pluginAlias": "@salesforce/plugin-agent",
1791
+ "pluginName": "@salesforce/plugin-agent",
1792
+ "pluginType": "core",
1793
+ "strict": true,
1794
+ "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
1795
+ "enableJsonFlag": true,
1796
+ "requiresProject": true,
1797
+ "FLAGGABLE_PROMPTS": {
1798
+ "api-name": {
1799
+ "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
1800
+ "promptMessage": "API name of the authoring bundle to validate"
1801
+ }
1802
+ },
1803
+ "isESM": true,
1804
+ "relativePath": [
1805
+ "lib",
1806
+ "commands",
1807
+ "agent",
1808
+ "validate",
1809
+ "authoring-bundle.js"
1810
+ ],
1811
+ "aliasPermutations": [],
1812
+ "permutations": [
1813
+ "agent:validate:authoring-bundle",
1814
+ "validate:agent:authoring-bundle",
1815
+ "validate:authoring-bundle:agent",
1816
+ "agent:authoring-bundle:validate",
1817
+ "authoring-bundle:agent:validate",
1818
+ "authoring-bundle:validate:agent"
1819
+ ]
1491
1820
  }
1492
1821
  },
1493
- "version": "1.27.7"
1822
+ "version": "1.29.0"
1494
1823
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
3
  "description": "Commands to interact with Salesforce agents",
4
- "version": "1.27.7",
4
+ "version": "1.29.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "enableO11y": true,
@@ -239,7 +239,7 @@
239
239
  "exports": "./lib/index.js",
240
240
  "type": "module",
241
241
  "sfdx": {
242
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.27.7.crt",
243
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.27.7.sig"
242
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.29.0.crt",
243
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.29.0.sig"
244
244
  }
245
245
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentPreviewEndResult",
4
+ "definitions": {
5
+ "AgentPreviewEndResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "sessionId": {
9
+ "type": "string"
10
+ },
11
+ "tracesPath": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": ["sessionId", "tracesPath"],
16
+ "additionalProperties": false
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentPreviewSendResult",
4
+ "definitions": {
5
+ "AgentPreviewSendResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "messages": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "message": {
14
+ "type": "string"
15
+ },
16
+ "role": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "additionalProperties": false
21
+ }
22
+ }
23
+ },
24
+ "required": ["messages"],
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/AgentPreviewSessionsResult",
4
+ "definitions": {
5
+ "AgentPreviewSessionsResult": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "agentId": {
11
+ "type": "string"
12
+ },
13
+ "displayName": {
14
+ "type": "string"
15
+ },
16
+ "sessionId": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "required": ["agentId", "sessionId"],
21
+ "additionalProperties": false
22
+ }
23
+ }
24
+ }
25
+ }