@salesforce/plugin-agent 2.1.1 → 2.2.2

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.
@@ -375,7 +375,7 @@
375
375
  "type": "boolean"
376
376
  },
377
377
  "context-variables": {
378
- "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.",
378
+ "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 is always Text; to send a typed variable, use --context-variables-json.",
379
379
  "name": "context-variables",
380
380
  "summary": "Session variables for the agent preview session, in the form Name=Value.",
381
381
  "delimiter": ",",
@@ -383,6 +383,14 @@
383
383
  "multiple": true,
384
384
  "type": "option"
385
385
  },
386
+ "context-variables-json": {
387
+ "description": "Sets typed variables on the agent preview session. Use this instead of --context-variables when a variable is not Text, for example a boolean-gated route (available when @variables.myFlag == True) that needs a real Boolean, or a Number, Object, List, or Json value.\n\nThe value is a JSON array of objects, each with a \"name\", a \"type\", and an optional \"value\". The \"type\" is one of Text, Date, DateTime, Money, Ref, Boolean, Number, Object, List, or Json. The JSON type of \"value\" must match \"type\": Boolean takes a boolean, Number takes a number, the string types take a string, Object and List take an array, and Json takes an object.\n\nExample: --context-variables-json '[{\"name\":\"probeGate\",\"type\":\"Boolean\",\"value\":true},{\"name\":\"retryCount\",\"type\":\"Number\",\"value\":3}]'.\n\nYou can pass both --context-variables and --context-variables-json in the same command. When the same variable name appears in both, the --context-variables-json value wins.\n\nTip: names follow the same rules as --context-variables. Use the \"$Context.\" prefix for linked context variables, and a bare name for state variables.",
388
+ "name": "context-variables-json",
389
+ "summary": "Typed session variables for the agent preview session, as a JSON array.",
390
+ "hasDynamicHelp": false,
391
+ "multiple": false,
392
+ "type": "option"
393
+ },
386
394
  "agent-json": {
387
395
  "dependsOn": [
388
396
  "authoring-bundle"
@@ -418,14 +426,13 @@
418
426
  "preview:agent"
419
427
  ]
420
428
  },
421
- "agent:adl:create": {
429
+ "agent:mcp:create": {
422
430
  "aliases": [],
423
431
  "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).\n\nFor SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload files with `sf agent adl upload` after creation.",
432
+ "description": "Registers an external Model Context Protocol (MCP) server with the API Catalog and discovers its assets (tools, prompts, and resources). Provide the server URL and, when the server requires it, OAuth authorization details. When the authorization type is OAUTH you must supply the identity provider, client ID, client secret, and scope.",
425
433
  "examples": [
426
- "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
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",
428
- "Create a RETRIEVER library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever --source-type retriever --retriever-id 0ppXX0000000001"
434
+ "Create an MCP server with no authentication:\n<%= config.bin %> <%= command.id %> --name myServer --server-url https://mcp.example.com --target-org myOrg",
435
+ "Create an MCP server that uses OAuth authentication, piping the client secret from stdin to keep it out of shell history:\ncat secret.txt | <%= config.bin %> <%= command.id %> --name myServer --server-url https://mcp.example.com --auth-type OAUTH --identity-provider myIdp --client-id abc123 --client-secret - --scope \"read write\" --target-org myOrg"
429
436
  ],
430
437
  "flags": {
431
438
  "json": {
@@ -464,134 +471,109 @@
464
471
  "char": "n",
465
472
  "name": "name",
466
473
  "required": true,
467
- "summary": "Display name for the data library (max 80 characters).",
468
- "hasDynamicHelp": false,
469
- "multiple": false,
470
- "type": "option"
471
- },
472
- "developer-name": {
473
- "name": "developer-name",
474
- "required": true,
475
- "summary": "API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).",
474
+ "summary": "Unique name of the MCP server.",
476
475
  "hasDynamicHelp": false,
477
476
  "multiple": false,
478
477
  "type": "option"
479
478
  },
480
- "source-type": {
481
- "name": "source-type",
482
- "required": true,
483
- "summary": "Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).",
479
+ "label": {
480
+ "name": "label",
481
+ "summary": "Human-readable label for the MCP server.",
484
482
  "hasDynamicHelp": false,
485
483
  "multiple": false,
486
- "options": [
487
- "sfdrive",
488
- "knowledge",
489
- "retriever"
490
- ],
491
484
  "type": "option"
492
485
  },
493
486
  "description": {
494
487
  "name": "description",
495
- "summary": "Description of the data library (max 255 characters).",
496
- "hasDynamicHelp": false,
497
- "multiple": false,
498
- "type": "option"
499
- },
500
- "index-mode": {
501
- "name": "index-mode",
502
- "summary": "Index mode for SFDRIVE libraries: basic or enhanced.",
488
+ "summary": "Description of the MCP server.",
503
489
  "hasDynamicHelp": false,
504
490
  "multiple": false,
505
- "options": [
506
- "basic",
507
- "enhanced"
508
- ],
509
491
  "type": "option"
510
492
  },
511
- "retriever-id": {
512
- "name": "retriever-id",
513
- "summary": "ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).",
493
+ "server-url": {
494
+ "name": "server-url",
495
+ "required": true,
496
+ "summary": "URL of the external MCP server.",
514
497
  "hasDynamicHelp": false,
515
498
  "multiple": false,
516
499
  "type": "option"
517
500
  },
518
- "primary-index-field1": {
519
- "name": "primary-index-field1",
520
- "summary": "Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).",
501
+ "auth-type": {
502
+ "name": "auth-type",
503
+ "summary": "Authorization type to use when connecting to the MCP server.",
504
+ "default": "NO_AUTH",
521
505
  "hasDynamicHelp": false,
522
506
  "multiple": false,
507
+ "options": [
508
+ "OAUTH",
509
+ "NO_AUTH"
510
+ ],
523
511
  "type": "option"
524
512
  },
525
- "primary-index-field2": {
526
- "name": "primary-index-field2",
527
- "summary": "Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).",
513
+ "identity-provider": {
514
+ "name": "identity-provider",
515
+ "summary": "Identity provider to use for OAuth authorization. Required when auth-type is OAUTH.",
528
516
  "hasDynamicHelp": false,
529
517
  "multiple": false,
530
518
  "type": "option"
531
519
  },
532
- "content-fields": {
533
- "name": "content-fields",
534
- "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).",
520
+ "client-id": {
521
+ "name": "client-id",
522
+ "summary": "OAuth client ID. Required when auth-type is OAUTH.",
535
523
  "hasDynamicHelp": false,
536
524
  "multiple": false,
537
525
  "type": "option"
538
526
  },
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).",
527
+ "client-secret": {
528
+ "name": "client-secret",
529
+ "summary": "OAuth client secret. Required when auth-type is OAUTH. Pass \"-\" to read it from stdin (piped) and keep it out of shell history.",
542
530
  "hasDynamicHelp": false,
543
531
  "multiple": false,
544
532
  "type": "option"
545
533
  },
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).",
534
+ "scope": {
535
+ "name": "scope",
536
+ "summary": "OAuth scope to request. Required when auth-type is OAUTH.",
549
537
  "hasDynamicHelp": false,
550
538
  "multiple": false,
551
539
  "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"
560
540
  }
561
541
  },
562
542
  "hasDynamicHelp": true,
563
543
  "hiddenAliases": [],
564
- "id": "agent:adl:create",
544
+ "id": "agent:mcp:create",
565
545
  "pluginAlias": "@salesforce/plugin-agent",
566
546
  "pluginName": "@salesforce/plugin-agent",
567
547
  "pluginType": "core",
548
+ "state": "preview",
568
549
  "strict": true,
569
- "summary": "Create an Agentforce Data Library.",
550
+ "summary": "Create an MCP server in the API Catalog.",
570
551
  "enableJsonFlag": true,
571
552
  "isESM": true,
572
553
  "relativePath": [
573
554
  "lib",
574
555
  "commands",
575
556
  "agent",
576
- "adl",
557
+ "mcp",
577
558
  "create.js"
578
559
  ],
579
560
  "aliasPermutations": [],
580
561
  "permutations": [
581
- "agent:adl:create",
582
- "adl:agent:create",
583
- "adl:create:agent",
584
- "agent:create:adl",
585
- "create:agent:adl",
586
- "create:adl:agent"
562
+ "agent:mcp:create",
563
+ "mcp:agent:create",
564
+ "mcp:create:agent",
565
+ "agent:create:mcp",
566
+ "create:agent:mcp",
567
+ "create:mcp:agent"
587
568
  ]
588
569
  },
589
- "agent:adl:delete": {
570
+ "agent:mcp:delete": {
590
571
  "aliases": [],
591
572
  "args": {},
592
- "description": "Permanently deletes a data library and all associated files and indexing data.",
573
+ "description": "Permanently removes an MCP (Model Context Protocol) server registration from the API Catalog, identified by its ID. By default you are prompted to confirm the deletion; pass --no-prompt to skip the confirmation (for example in scripts and CI).",
593
574
  "examples": [
594
- "Delete a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
575
+ "Delete an MCP server, confirming interactively:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --target-org myOrg",
576
+ "Delete an MCP server without a confirmation prompt:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt"
595
577
  ],
596
578
  "flags": {
597
579
  "json": {
@@ -626,49 +608,57 @@
626
608
  "multiple": false,
627
609
  "type": "option"
628
610
  },
629
- "library-id": {
611
+ "mcp-server-id": {
630
612
  "char": "i",
631
- "name": "library-id",
613
+ "name": "mcp-server-id",
632
614
  "required": true,
633
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
615
+ "summary": "ID of the MCP server to delete.",
634
616
  "hasDynamicHelp": false,
635
617
  "multiple": false,
636
618
  "type": "option"
619
+ },
620
+ "no-prompt": {
621
+ "name": "no-prompt",
622
+ "summary": "Skip the confirmation prompt and delete the MCP server immediately.",
623
+ "allowNo": false,
624
+ "type": "boolean"
637
625
  }
638
626
  },
639
627
  "hasDynamicHelp": true,
640
628
  "hiddenAliases": [],
641
- "id": "agent:adl:delete",
629
+ "id": "agent:mcp:delete",
642
630
  "pluginAlias": "@salesforce/plugin-agent",
643
631
  "pluginName": "@salesforce/plugin-agent",
644
632
  "pluginType": "core",
633
+ "state": "preview",
645
634
  "strict": true,
646
- "summary": "Delete an Agentforce Data Library.",
635
+ "summary": "Delete an MCP server from the API Catalog.",
647
636
  "enableJsonFlag": true,
648
637
  "isESM": true,
649
638
  "relativePath": [
650
639
  "lib",
651
640
  "commands",
652
641
  "agent",
653
- "adl",
642
+ "mcp",
654
643
  "delete.js"
655
644
  ],
656
645
  "aliasPermutations": [],
657
646
  "permutations": [
658
- "agent:adl:delete",
659
- "adl:agent:delete",
660
- "adl:delete:agent",
661
- "agent:delete:adl",
662
- "delete:agent:adl",
663
- "delete:adl:agent"
647
+ "agent:mcp:delete",
648
+ "mcp:agent:delete",
649
+ "mcp:delete:agent",
650
+ "agent:delete:mcp",
651
+ "delete:agent:mcp",
652
+ "delete:mcp:agent"
664
653
  ]
665
654
  },
666
- "agent:adl:get": {
655
+ "agent:mcp:fetch": {
667
656
  "aliases": [],
668
657
  "args": {},
669
- "description": "Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.",
658
+ "description": "Performs a live fetch against the configured MCP server identified by its ID, returning the assets (MCP tools, prompts, and resources) it currently advertises along with their status and activation state. Use this to refresh the view of what an MCP server exposes before activating its assets as agent actions.",
670
659
  "examples": [
671
- "Get details of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
660
+ "Fetch the assets advertised by an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001",
661
+ "Fetch MCP server assets and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001 --json"
672
662
  ],
673
663
  "flags": {
674
664
  "json": {
@@ -703,11 +693,11 @@
703
693
  "multiple": false,
704
694
  "type": "option"
705
695
  },
706
- "library-id": {
696
+ "mcp-server-id": {
707
697
  "char": "i",
708
- "name": "library-id",
698
+ "name": "mcp-server-id",
709
699
  "required": true,
710
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
700
+ "summary": "ID of the MCP server to fetch assets from.",
711
701
  "hasDynamicHelp": false,
712
702
  "multiple": false,
713
703
  "type": "option"
@@ -715,38 +705,39 @@
715
705
  },
716
706
  "hasDynamicHelp": true,
717
707
  "hiddenAliases": [],
718
- "id": "agent:adl:get",
708
+ "id": "agent:mcp:fetch",
719
709
  "pluginAlias": "@salesforce/plugin-agent",
720
710
  "pluginName": "@salesforce/plugin-agent",
721
711
  "pluginType": "core",
712
+ "state": "preview",
722
713
  "strict": true,
723
- "summary": "Get details of an Agentforce Data Library.",
714
+ "summary": "Fetch the live assets (tools, prompts, resources) advertised by an MCP server.",
724
715
  "enableJsonFlag": true,
725
716
  "isESM": true,
726
717
  "relativePath": [
727
718
  "lib",
728
719
  "commands",
729
720
  "agent",
730
- "adl",
731
- "get.js"
721
+ "mcp",
722
+ "fetch.js"
732
723
  ],
733
724
  "aliasPermutations": [],
734
725
  "permutations": [
735
- "agent:adl:get",
736
- "adl:agent:get",
737
- "adl:get:agent",
738
- "agent:get:adl",
739
- "get:agent:adl",
740
- "get:adl:agent"
726
+ "agent:mcp:fetch",
727
+ "mcp:agent:fetch",
728
+ "mcp:fetch:agent",
729
+ "agent:fetch:mcp",
730
+ "fetch:agent:mcp",
731
+ "fetch:mcp:agent"
741
732
  ]
742
733
  },
743
- "agent:adl:list": {
734
+ "agent:mcp:get": {
744
735
  "aliases": [],
745
736
  "args": {},
746
- "description": "Returns all data libraries in the target org, including their source type, status, and library ID.",
737
+ "description": "Retrieves the details of an MCP (Model Context Protocol) server by its identifier, including its name, label, type, status, and server URL.",
747
738
  "examples": [
748
- "List all data libraries in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
749
- "List data libraries and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --json"
739
+ "Get an MCP server by id in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0Mx000000000001",
740
+ "Get an MCP server and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0Mx000000000001 --json"
750
741
  ],
751
742
  "flags": {
752
743
  "json": {
@@ -781,52 +772,51 @@
781
772
  "multiple": false,
782
773
  "type": "option"
783
774
  },
784
- "source-type": {
785
- "name": "source-type",
786
- "summary": "Filter by source type: sfdrive, knowledge, or retriever.",
775
+ "mcp-server-id": {
776
+ "char": "i",
777
+ "name": "mcp-server-id",
778
+ "required": true,
779
+ "summary": "The identifier of the MCP server to retrieve.",
787
780
  "hasDynamicHelp": false,
788
781
  "multiple": false,
789
- "options": [
790
- "sfdrive",
791
- "knowledge",
792
- "retriever"
793
- ],
794
782
  "type": "option"
795
783
  }
796
784
  },
797
785
  "hasDynamicHelp": true,
798
786
  "hiddenAliases": [],
799
- "id": "agent:adl:list",
787
+ "id": "agent:mcp:get",
800
788
  "pluginAlias": "@salesforce/plugin-agent",
801
789
  "pluginName": "@salesforce/plugin-agent",
802
790
  "pluginType": "core",
791
+ "state": "preview",
803
792
  "strict": true,
804
- "summary": "List Agentforce Data Libraries in an org.",
793
+ "summary": "Get a single MCP server registered in the API Catalog.",
805
794
  "enableJsonFlag": true,
806
795
  "isESM": true,
807
796
  "relativePath": [
808
797
  "lib",
809
798
  "commands",
810
799
  "agent",
811
- "adl",
812
- "list.js"
800
+ "mcp",
801
+ "get.js"
813
802
  ],
814
803
  "aliasPermutations": [],
815
804
  "permutations": [
816
- "agent:adl:list",
817
- "adl:agent:list",
818
- "adl:list:agent",
819
- "agent:list:adl",
820
- "list:agent:adl",
821
- "list:adl:agent"
805
+ "agent:mcp:get",
806
+ "mcp:agent:get",
807
+ "mcp:get:agent",
808
+ "agent:get:mcp",
809
+ "get:agent:mcp",
810
+ "get:mcp:agent"
822
811
  ]
823
812
  },
824
- "agent:adl:status": {
813
+ "agent:mcp:list": {
825
814
  "aliases": [],
826
815
  "args": {},
827
- "description": "Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
816
+ "description": "Returns the Model Context Protocol (MCP) servers registered in the API Catalog, optionally filtered by label, type, or status. Use this to discover which MCP servers are available and inspect their server URLs and current status.",
828
817
  "examples": [
829
- "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
818
+ "List all MCP servers in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
819
+ "List external MCP servers filtered by status and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --type EXTERNAL --status ACTIVE --json"
830
820
  ],
831
821
  "flags": {
832
822
  "json": {
@@ -861,58 +851,70 @@
861
851
  "multiple": false,
862
852
  "type": "option"
863
853
  },
864
- "library-id": {
865
- "char": "i",
866
- "name": "library-id",
867
- "required": true,
868
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
854
+ "label": {
855
+ "name": "label",
856
+ "summary": "Filter the MCP servers by label.",
869
857
  "hasDynamicHelp": false,
870
858
  "multiple": false,
871
859
  "type": "option"
872
860
  },
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"
878
- }
879
- },
880
- "hasDynamicHelp": true,
881
- "hiddenAliases": [],
882
- "id": "agent:adl:status",
861
+ "type": {
862
+ "name": "type",
863
+ "summary": "Filter the MCP servers by type.",
864
+ "hasDynamicHelp": false,
865
+ "multiple": false,
866
+ "options": [
867
+ "EXTERNAL"
868
+ ],
869
+ "type": "option"
870
+ },
871
+ "status": {
872
+ "name": "status",
873
+ "summary": "Filter the MCP servers by connection status. Only ACTIVE and DISCONNECTED are supported as filters.",
874
+ "hasDynamicHelp": false,
875
+ "multiple": false,
876
+ "options": [
877
+ "ACTIVE",
878
+ "DISCONNECTED"
879
+ ],
880
+ "type": "option"
881
+ }
882
+ },
883
+ "hasDynamicHelp": true,
884
+ "hiddenAliases": [],
885
+ "id": "agent:mcp:list",
883
886
  "pluginAlias": "@salesforce/plugin-agent",
884
887
  "pluginName": "@salesforce/plugin-agent",
885
888
  "pluginType": "core",
889
+ "state": "preview",
886
890
  "strict": true,
887
- "summary": "Get indexing status of an Agentforce Data Library.",
891
+ "summary": "List the MCP servers registered in the API Catalog.",
888
892
  "enableJsonFlag": true,
889
893
  "isESM": true,
890
894
  "relativePath": [
891
895
  "lib",
892
896
  "commands",
893
897
  "agent",
894
- "adl",
895
- "status.js"
898
+ "mcp",
899
+ "list.js"
896
900
  ],
897
901
  "aliasPermutations": [],
898
902
  "permutations": [
899
- "agent:adl:status",
900
- "adl:agent:status",
901
- "adl:status:agent",
902
- "agent:status:adl",
903
- "status:agent:adl",
904
- "status:adl:agent"
903
+ "agent:mcp:list",
904
+ "mcp:agent:list",
905
+ "mcp:list:agent",
906
+ "agent:list:mcp",
907
+ "list:agent:mcp",
908
+ "list:mcp:agent"
905
909
  ]
906
910
  },
907
- "agent:adl:update": {
911
+ "agent:mcp:update": {
908
912
  "aliases": [],
909
913
  "args": {},
910
- "description": "Updates the label, description, or other mutable properties of an existing data library.",
914
+ "description": "Updates an existing MCP server in the API Catalog. Only the fields you provide are changed; omitted fields are left untouched. You can update the label, description, and server URL, and replace the authorization configuration. When setting `--auth-type OAUTH`, you must also provide `--identity-provider`, `--client-id`, `--client-secret`, and `--scope`. When setting `--auth-type NO_AUTH`, no authorization credentials are required. At least one updatable field must be supplied.",
911
915
  "examples": [
912
- "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
913
- "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
914
- "Update Knowledge library content fields (triggers re-indexing):\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg",
915
- "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
916
+ "Update the label and description of an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --label \"Orders MCP\" --description \"Order tooling\" --target-org myOrg",
917
+ "Update the server URL and switch the authorization to OAuth, piping the client secret from stdin and outputting as JSON:\ncat secret.txt | <%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --server-url https://mcp.example.com --auth-type OAUTH --identity-provider MyIdp --client-id abc --client-secret - --scope \"read write\" --target-org myOrg --json"
916
918
  ],
917
919
  "flags": {
918
920
  "json": {
@@ -947,177 +949,102 @@
947
949
  "multiple": false,
948
950
  "type": "option"
949
951
  },
950
- "library-id": {
952
+ "mcp-server-id": {
951
953
  "char": "i",
952
- "name": "library-id",
954
+ "name": "mcp-server-id",
953
955
  "required": true,
954
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
956
+ "summary": "ID of the MCP server to update.",
955
957
  "hasDynamicHelp": false,
956
958
  "multiple": false,
957
959
  "type": "option"
958
960
  },
959
- "name": {
960
- "char": "n",
961
- "name": "name",
962
- "summary": "New display name for the data library (max 80 characters).",
961
+ "label": {
962
+ "name": "label",
963
+ "summary": "New display label for the MCP server.",
963
964
  "hasDynamicHelp": false,
964
965
  "multiple": false,
965
966
  "type": "option"
966
967
  },
967
968
  "description": {
968
969
  "name": "description",
969
- "summary": "New description for the data library (max 255 characters).",
970
+ "summary": "New description for the MCP server.",
970
971
  "hasDynamicHelp": false,
971
972
  "multiple": false,
972
973
  "type": "option"
973
974
  },
974
- "content-fields": {
975
- "name": "content-fields",
976
- "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
975
+ "server-url": {
976
+ "name": "server-url",
977
+ "summary": "New endpoint URL of the MCP server.",
977
978
  "hasDynamicHelp": false,
978
979
  "multiple": false,
979
980
  "type": "option"
980
981
  },
981
- "restrict-to-public-articles": {
982
- "name": "restrict-to-public-articles",
983
- "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
984
- "allowNo": true,
985
- "type": "boolean"
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
- },
993
- "retriever-id": {
994
- "name": "retriever-id",
995
- "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
982
+ "auth-type": {
983
+ "name": "auth-type",
984
+ "summary": "Authorization type to apply to the MCP server (OAUTH or NO_AUTH).",
996
985
  "hasDynamicHelp": false,
997
986
  "multiple": false,
987
+ "options": [
988
+ "OAUTH",
989
+ "NO_AUTH"
990
+ ],
998
991
  "type": "option"
999
- }
1000
- },
1001
- "hasDynamicHelp": true,
1002
- "hiddenAliases": [],
1003
- "id": "agent:adl:update",
1004
- "pluginAlias": "@salesforce/plugin-agent",
1005
- "pluginName": "@salesforce/plugin-agent",
1006
- "pluginType": "core",
1007
- "strict": true,
1008
- "summary": "Update an Agentforce Data Library.",
1009
- "enableJsonFlag": true,
1010
- "isESM": true,
1011
- "relativePath": [
1012
- "lib",
1013
- "commands",
1014
- "agent",
1015
- "adl",
1016
- "update.js"
1017
- ],
1018
- "aliasPermutations": [],
1019
- "permutations": [
1020
- "agent:adl:update",
1021
- "adl:agent:update",
1022
- "adl:update:agent",
1023
- "agent:update:adl",
1024
- "update:agent:adl",
1025
- "update:adl:agent"
1026
- ]
1027
- },
1028
- "agent:adl:upload": {
1029
- "aliases": [],
1030
- "args": {},
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.",
1032
- "examples": [
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",
1034
- "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
1035
- ],
1036
- "flags": {
1037
- "json": {
1038
- "description": "Format output as json.",
1039
- "helpGroup": "GLOBAL",
1040
- "name": "json",
1041
- "allowNo": false,
1042
- "type": "boolean"
1043
992
  },
1044
- "flags-dir": {
1045
- "helpGroup": "GLOBAL",
1046
- "name": "flags-dir",
1047
- "summary": "Import flag values from a directory.",
993
+ "identity-provider": {
994
+ "name": "identity-provider",
995
+ "summary": "Identity provider name for OAuth authorization (required when --auth-type is OAUTH).",
1048
996
  "hasDynamicHelp": false,
1049
997
  "multiple": false,
1050
998
  "type": "option"
1051
999
  },
1052
- "target-org": {
1053
- "char": "o",
1054
- "name": "target-org",
1055
- "noCacheDefault": true,
1056
- "required": true,
1057
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1058
- "hasDynamicHelp": true,
1059
- "multiple": false,
1060
- "type": "option"
1061
- },
1062
- "api-version": {
1063
- "description": "Override the api version used for api requests made by this command",
1064
- "name": "api-version",
1000
+ "client-id": {
1001
+ "name": "client-id",
1002
+ "summary": "OAuth client ID (required when --auth-type is OAUTH).",
1065
1003
  "hasDynamicHelp": false,
1066
1004
  "multiple": false,
1067
1005
  "type": "option"
1068
1006
  },
1069
- "library-id": {
1070
- "char": "i",
1071
- "name": "library-id",
1072
- "required": true,
1073
- "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
1007
+ "client-secret": {
1008
+ "name": "client-secret",
1009
+ "summary": "OAuth client secret (required when --auth-type is OAUTH). Pass \"-\" to read it from stdin (piped) and keep it out of shell history.",
1074
1010
  "hasDynamicHelp": false,
1075
1011
  "multiple": false,
1076
1012
  "type": "option"
1077
1013
  },
1078
- "file": {
1079
- "char": "f",
1080
- "name": "file",
1081
- "required": true,
1082
- "summary": "Path to the file to upload.",
1014
+ "scope": {
1015
+ "name": "scope",
1016
+ "summary": "OAuth scope (required when --auth-type is OAUTH).",
1083
1017
  "hasDynamicHelp": false,
1084
- "multiple": true,
1085
- "type": "option"
1086
- },
1087
- "wait": {
1088
- "char": "w",
1089
- "name": "wait",
1090
- "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
1091
- "hasDynamicHelp": true,
1092
1018
  "multiple": false,
1093
1019
  "type": "option"
1094
1020
  }
1095
1021
  },
1096
1022
  "hasDynamicHelp": true,
1097
1023
  "hiddenAliases": [],
1098
- "id": "agent:adl:upload",
1024
+ "id": "agent:mcp:update",
1099
1025
  "pluginAlias": "@salesforce/plugin-agent",
1100
1026
  "pluginName": "@salesforce/plugin-agent",
1101
1027
  "pluginType": "core",
1028
+ "state": "preview",
1102
1029
  "strict": true,
1103
- "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
1030
+ "summary": "Update an MCP server registered in the API Catalog.",
1104
1031
  "enableJsonFlag": true,
1105
1032
  "isESM": true,
1106
1033
  "relativePath": [
1107
1034
  "lib",
1108
1035
  "commands",
1109
1036
  "agent",
1110
- "adl",
1111
- "upload.js"
1037
+ "mcp",
1038
+ "update.js"
1112
1039
  ],
1113
1040
  "aliasPermutations": [],
1114
1041
  "permutations": [
1115
- "agent:adl:upload",
1116
- "adl:agent:upload",
1117
- "adl:upload:agent",
1118
- "agent:upload:adl",
1119
- "upload:agent:adl",
1120
- "upload:adl:agent"
1042
+ "agent:mcp:update",
1043
+ "mcp:agent:update",
1044
+ "mcp:update:agent",
1045
+ "agent:update:mcp",
1046
+ "update:agent:mcp",
1047
+ "update:mcp:agent"
1121
1048
  ]
1122
1049
  },
1123
1050
  "agent:generate:agent-spec": {
@@ -1604,13 +1531,16 @@
1604
1531
  "test-spec:generate:agent"
1605
1532
  ]
1606
1533
  },
1607
- "agent:mcp:create": {
1534
+ "agent:preview:end": {
1608
1535
  "aliases": [],
1609
1536
  "args": {},
1610
- "description": "Registers an external Model Context Protocol (MCP) server with the API Catalog and discovers its assets (tools, prompts, and resources). Provide the server URL and, when the server requires it, OAuth authorization details. When the authorization type is OAUTH you must supply the identity provider, client ID, client secret, and scope.",
1537
+ "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.",
1611
1538
  "examples": [
1612
- "Create an MCP server with no authentication:\n<%= config.bin %> <%= command.id %> --name myServer --server-url https://mcp.example.com --target-org myOrg",
1613
- "Create an MCP server that uses OAuth authentication, piping the client secret from stdin to keep it out of shell history:\ncat secret.txt | <%= config.bin %> <%= command.id %> --name myServer --server-url https://mcp.example.com --auth-type OAUTH --identity-provider myIdp --client-id abc123 --client-secret - --scope \"read write\" --target-org myOrg"
1539
+ "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",
1540
+ "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",
1541
+ "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",
1542
+ "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",
1543
+ "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>"
1614
1544
  ],
1615
1545
  "flags": {
1616
1546
  "json": {
@@ -1645,73 +1575,191 @@
1645
1575
  "multiple": false,
1646
1576
  "type": "option"
1647
1577
  },
1648
- "name": {
1649
- "char": "n",
1650
- "name": "name",
1651
- "required": true,
1652
- "summary": "Unique name of the MCP server.",
1578
+ "session-id": {
1579
+ "exclusive": [
1580
+ "all"
1581
+ ],
1582
+ "name": "session-id",
1583
+ "required": false,
1584
+ "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.",
1653
1585
  "hasDynamicHelp": false,
1654
1586
  "multiple": false,
1655
1587
  "type": "option"
1656
1588
  },
1657
- "label": {
1658
- "name": "label",
1659
- "summary": "Human-readable label for the MCP server.",
1589
+ "api-name": {
1590
+ "char": "n",
1591
+ "exclusive": [
1592
+ "authoring-bundle"
1593
+ ],
1594
+ "name": "api-name",
1595
+ "summary": "API name of the activated published agent you want to preview.",
1660
1596
  "hasDynamicHelp": false,
1661
1597
  "multiple": false,
1662
1598
  "type": "option"
1663
1599
  },
1664
- "description": {
1665
- "name": "description",
1666
- "summary": "Description of the MCP server.",
1600
+ "authoring-bundle": {
1601
+ "exclusive": [
1602
+ "api-name"
1603
+ ],
1604
+ "name": "authoring-bundle",
1605
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1667
1606
  "hasDynamicHelp": false,
1668
1607
  "multiple": false,
1669
1608
  "type": "option"
1670
1609
  },
1671
- "server-url": {
1672
- "name": "server-url",
1673
- "required": true,
1674
- "summary": "URL of the external MCP server.",
1675
- "hasDynamicHelp": false,
1610
+ "all": {
1611
+ "exclusive": [
1612
+ "session-id"
1613
+ ],
1614
+ "name": "all",
1615
+ "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.",
1616
+ "allowNo": false,
1617
+ "type": "boolean"
1618
+ },
1619
+ "no-prompt": {
1620
+ "char": "p",
1621
+ "name": "no-prompt",
1622
+ "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
1623
+ "allowNo": false,
1624
+ "type": "boolean"
1625
+ }
1626
+ },
1627
+ "hasDynamicHelp": true,
1628
+ "hiddenAliases": [],
1629
+ "id": "agent:preview:end",
1630
+ "pluginAlias": "@salesforce/plugin-agent",
1631
+ "pluginName": "@salesforce/plugin-agent",
1632
+ "pluginType": "core",
1633
+ "strict": true,
1634
+ "summary": "End an existing programmatic agent preview session and get trace location.",
1635
+ "enableJsonFlag": true,
1636
+ "requiresProject": true,
1637
+ "envVariablesSection": {
1638
+ "header": "ENVIRONMENT VARIABLES",
1639
+ "body": [
1640
+ {
1641
+ "name": "SF_TARGET_ORG",
1642
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1643
+ }
1644
+ ]
1645
+ },
1646
+ "errorCodes": {
1647
+ "header": "ERROR CODES",
1648
+ "body": [
1649
+ {
1650
+ "name": "Succeeded (0)",
1651
+ "description": "Preview session ended successfully and traces saved."
1652
+ },
1653
+ {
1654
+ "name": "ExactlyOneRequired (2)",
1655
+ "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
1656
+ },
1657
+ {
1658
+ "name": "NotFound (2)",
1659
+ "description": "Agent not found, or no preview session exists for this agent."
1660
+ },
1661
+ {
1662
+ "name": "PreviewEndFailed (4)",
1663
+ "description": "Failed to end the preview session."
1664
+ },
1665
+ {
1666
+ "name": "PreviewEndPartialFailure (68)",
1667
+ "description": "With --all, one or more sessions failed to end while others succeeded."
1668
+ },
1669
+ {
1670
+ "name": "SessionAmbiguous (5)",
1671
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
1672
+ }
1673
+ ]
1674
+ },
1675
+ "isESM": true,
1676
+ "relativePath": [
1677
+ "lib",
1678
+ "commands",
1679
+ "agent",
1680
+ "preview",
1681
+ "end.js"
1682
+ ],
1683
+ "aliasPermutations": [],
1684
+ "permutations": [
1685
+ "agent:preview:end",
1686
+ "preview:agent:end",
1687
+ "preview:end:agent",
1688
+ "agent:end:preview",
1689
+ "end:agent:preview",
1690
+ "end:preview:agent"
1691
+ ]
1692
+ },
1693
+ "agent:preview:send": {
1694
+ "aliases": [],
1695
+ "args": {},
1696
+ "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.",
1697
+ "examples": [
1698
+ "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>",
1699
+ "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",
1700
+ "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"
1701
+ ],
1702
+ "flags": {
1703
+ "json": {
1704
+ "description": "Format output as json.",
1705
+ "helpGroup": "GLOBAL",
1706
+ "name": "json",
1707
+ "allowNo": false,
1708
+ "type": "boolean"
1709
+ },
1710
+ "flags-dir": {
1711
+ "helpGroup": "GLOBAL",
1712
+ "name": "flags-dir",
1713
+ "summary": "Import flag values from a directory.",
1714
+ "hasDynamicHelp": false,
1676
1715
  "multiple": false,
1677
1716
  "type": "option"
1678
1717
  },
1679
- "auth-type": {
1680
- "name": "auth-type",
1681
- "summary": "Authorization type to use when connecting to the MCP server.",
1682
- "default": "NO_AUTH",
1718
+ "target-org": {
1719
+ "char": "o",
1720
+ "name": "target-org",
1721
+ "noCacheDefault": true,
1722
+ "required": true,
1723
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1724
+ "hasDynamicHelp": true,
1725
+ "multiple": false,
1726
+ "type": "option"
1727
+ },
1728
+ "api-version": {
1729
+ "description": "Override the api version used for api requests made by this command",
1730
+ "name": "api-version",
1683
1731
  "hasDynamicHelp": false,
1684
1732
  "multiple": false,
1685
- "options": [
1686
- "OAUTH",
1687
- "NO_AUTH"
1688
- ],
1689
1733
  "type": "option"
1690
1734
  },
1691
- "identity-provider": {
1692
- "name": "identity-provider",
1693
- "summary": "Identity provider to use for OAuth authorization. Required when auth-type is OAUTH.",
1735
+ "session-id": {
1736
+ "name": "session-id",
1737
+ "required": false,
1738
+ "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.",
1694
1739
  "hasDynamicHelp": false,
1695
1740
  "multiple": false,
1696
1741
  "type": "option"
1697
1742
  },
1698
- "client-id": {
1699
- "name": "client-id",
1700
- "summary": "OAuth client ID. Required when auth-type is OAUTH.",
1743
+ "utterance": {
1744
+ "char": "u",
1745
+ "name": "utterance",
1746
+ "required": true,
1747
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
1701
1748
  "hasDynamicHelp": false,
1702
1749
  "multiple": false,
1703
1750
  "type": "option"
1704
1751
  },
1705
- "client-secret": {
1706
- "name": "client-secret",
1707
- "summary": "OAuth client secret. Required when auth-type is OAUTH. Pass \"-\" to read it from stdin (piped) and keep it out of shell history.",
1752
+ "api-name": {
1753
+ "char": "n",
1754
+ "name": "api-name",
1755
+ "summary": "API name of the activated published agent you want to preview.",
1708
1756
  "hasDynamicHelp": false,
1709
1757
  "multiple": false,
1710
1758
  "type": "option"
1711
1759
  },
1712
- "scope": {
1713
- "name": "scope",
1714
- "summary": "OAuth scope to request. Required when auth-type is OAUTH.",
1760
+ "authoring-bundle": {
1761
+ "name": "authoring-bundle",
1762
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1715
1763
  "hasDynamicHelp": false,
1716
1764
  "multiple": false,
1717
1765
  "type": "option"
@@ -1719,39 +1767,131 @@
1719
1767
  },
1720
1768
  "hasDynamicHelp": true,
1721
1769
  "hiddenAliases": [],
1722
- "id": "agent:mcp:create",
1770
+ "id": "agent:preview:send",
1723
1771
  "pluginAlias": "@salesforce/plugin-agent",
1724
1772
  "pluginName": "@salesforce/plugin-agent",
1725
1773
  "pluginType": "core",
1726
- "state": "preview",
1727
1774
  "strict": true,
1728
- "summary": "Create an MCP server in the API Catalog.",
1775
+ "summary": "Send a message to an existing agent preview session.",
1729
1776
  "enableJsonFlag": true,
1777
+ "requiresProject": true,
1778
+ "envVariablesSection": {
1779
+ "header": "ENVIRONMENT VARIABLES",
1780
+ "body": [
1781
+ {
1782
+ "name": "SF_TARGET_ORG",
1783
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1784
+ }
1785
+ ]
1786
+ },
1787
+ "errorCodes": {
1788
+ "header": "ERROR CODES",
1789
+ "body": [
1790
+ {
1791
+ "name": "Succeeded (0)",
1792
+ "description": "Message sent successfully and agent response received."
1793
+ },
1794
+ {
1795
+ "name": "NotFound (2)",
1796
+ "description": "Agent not found, or no preview session exists for this agent."
1797
+ },
1798
+ {
1799
+ "name": "PreviewSendFailed (4)",
1800
+ "description": "Failed to send message or receive response from the preview session."
1801
+ },
1802
+ {
1803
+ "name": "SessionAmbiguous (5)",
1804
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
1805
+ }
1806
+ ]
1807
+ },
1730
1808
  "isESM": true,
1731
1809
  "relativePath": [
1732
1810
  "lib",
1733
1811
  "commands",
1734
1812
  "agent",
1735
- "mcp",
1736
- "create.js"
1813
+ "preview",
1814
+ "send.js"
1737
1815
  ],
1738
1816
  "aliasPermutations": [],
1739
1817
  "permutations": [
1740
- "agent:mcp:create",
1741
- "mcp:agent:create",
1742
- "mcp:create:agent",
1743
- "agent:create:mcp",
1744
- "create:agent:mcp",
1745
- "create:mcp:agent"
1818
+ "agent:preview:send",
1819
+ "preview:agent:send",
1820
+ "preview:send:agent",
1821
+ "agent:send:preview",
1822
+ "send:agent:preview",
1823
+ "send:preview:agent"
1746
1824
  ]
1747
1825
  },
1748
- "agent:mcp:delete": {
1826
+ "agent:preview:sessions": {
1749
1827
  "aliases": [],
1750
1828
  "args": {},
1751
- "description": "Permanently removes an MCP (Model Context Protocol) server registration from the API Catalog, identified by its ID. By default you are prompted to confirm the deletion; pass --no-prompt to skip the confirmation (for example in scripts and CI).",
1829
+ "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.",
1752
1830
  "examples": [
1753
- "Delete an MCP server, confirming interactively:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --target-org myOrg",
1754
- "Delete an MCP server without a confirmation prompt:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt"
1831
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
1832
+ ],
1833
+ "flags": {
1834
+ "json": {
1835
+ "description": "Format output as json.",
1836
+ "helpGroup": "GLOBAL",
1837
+ "name": "json",
1838
+ "allowNo": false,
1839
+ "type": "boolean"
1840
+ },
1841
+ "flags-dir": {
1842
+ "helpGroup": "GLOBAL",
1843
+ "name": "flags-dir",
1844
+ "summary": "Import flag values from a directory.",
1845
+ "hasDynamicHelp": false,
1846
+ "multiple": false,
1847
+ "type": "option"
1848
+ }
1849
+ },
1850
+ "hasDynamicHelp": false,
1851
+ "hiddenAliases": [],
1852
+ "id": "agent:preview:sessions",
1853
+ "pluginAlias": "@salesforce/plugin-agent",
1854
+ "pluginName": "@salesforce/plugin-agent",
1855
+ "pluginType": "core",
1856
+ "strict": true,
1857
+ "summary": "List all known programmatic agent preview sessions.",
1858
+ "enableJsonFlag": true,
1859
+ "requiresProject": true,
1860
+ "errorCodes": {
1861
+ "header": "ERROR CODES",
1862
+ "body": [
1863
+ {
1864
+ "name": "Succeeded (0)",
1865
+ "description": "Sessions listed successfully (or empty list if no active sessions)."
1866
+ }
1867
+ ]
1868
+ },
1869
+ "isESM": true,
1870
+ "relativePath": [
1871
+ "lib",
1872
+ "commands",
1873
+ "agent",
1874
+ "preview",
1875
+ "sessions.js"
1876
+ ],
1877
+ "aliasPermutations": [],
1878
+ "permutations": [
1879
+ "agent:preview:sessions",
1880
+ "preview:agent:sessions",
1881
+ "preview:sessions:agent",
1882
+ "agent:sessions:preview",
1883
+ "sessions:agent:preview",
1884
+ "sessions:preview:agent"
1885
+ ]
1886
+ },
1887
+ "agent:preview:start": {
1888
+ "aliases": [],
1889
+ "args": {},
1890
+ "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.",
1891
+ "examples": [
1892
+ "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",
1893
+ "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",
1894
+ "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
1755
1895
  ],
1756
1896
  "flags": {
1757
1897
  "json": {
@@ -1786,57 +1926,265 @@
1786
1926
  "multiple": false,
1787
1927
  "type": "option"
1788
1928
  },
1789
- "mcp-server-id": {
1790
- "char": "i",
1791
- "name": "mcp-server-id",
1929
+ "api-name": {
1930
+ "char": "n",
1931
+ "name": "api-name",
1932
+ "summary": "API name of the activated published agent you want to preview.",
1933
+ "hasDynamicHelp": false,
1934
+ "multiple": false,
1935
+ "type": "option"
1936
+ },
1937
+ "authoring-bundle": {
1938
+ "name": "authoring-bundle",
1939
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1940
+ "hasDynamicHelp": false,
1941
+ "multiple": false,
1942
+ "type": "option"
1943
+ },
1944
+ "use-live-actions": {
1945
+ "exclusive": [
1946
+ "simulate-actions"
1947
+ ],
1948
+ "name": "use-live-actions",
1949
+ "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
1950
+ "allowNo": false,
1951
+ "type": "boolean"
1952
+ },
1953
+ "simulate-actions": {
1954
+ "exclusive": [
1955
+ "use-live-actions"
1956
+ ],
1957
+ "name": "simulate-actions",
1958
+ "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
1959
+ "allowNo": false,
1960
+ "type": "boolean"
1961
+ },
1962
+ "context-variables": {
1963
+ "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 is always Text; to send a typed variable, use --context-variables-json.",
1964
+ "name": "context-variables",
1965
+ "summary": "Session variables for the agent preview session, in the form Name=Value.",
1966
+ "delimiter": ",",
1967
+ "hasDynamicHelp": false,
1968
+ "multiple": true,
1969
+ "type": "option"
1970
+ },
1971
+ "context-variables-json": {
1972
+ "description": "Sets typed variables on the agent preview session. Use this instead of --context-variables when a variable is not Text, for example a boolean-gated route (available when @variables.myFlag == True) that needs a real Boolean, or a Number, Object, List, or Json value.\n\nThe value is a JSON array of objects, each with a \"name\", a \"type\", and an optional \"value\". The \"type\" is one of Text, Date, DateTime, Money, Ref, Boolean, Number, Object, List, or Json. The JSON type of \"value\" must match \"type\": Boolean takes a boolean, Number takes a number, the string types take a string, Object and List take an array, and Json takes an object.\n\nExample: --context-variables-json '[{\"name\":\"probeGate\",\"type\":\"Boolean\",\"value\":true},{\"name\":\"retryCount\",\"type\":\"Number\",\"value\":3}]'.\n\nYou can pass both --context-variables and --context-variables-json in the same command. When the same variable name appears in both, the --context-variables-json value wins.\n\nTip: names follow the same rules as --context-variables. Use the \"$Context.\" prefix for linked context variables, and a bare name for state variables.",
1973
+ "name": "context-variables-json",
1974
+ "summary": "Typed session variables for the agent preview session, as a JSON array.",
1975
+ "hasDynamicHelp": false,
1976
+ "multiple": false,
1977
+ "type": "option"
1978
+ },
1979
+ "agent-json": {
1980
+ "dependsOn": [
1981
+ "authoring-bundle"
1982
+ ],
1983
+ "hidden": true,
1984
+ "name": "agent-json",
1985
+ "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
1986
+ "hasDynamicHelp": false,
1987
+ "multiple": false,
1988
+ "type": "option"
1989
+ }
1990
+ },
1991
+ "hasDynamicHelp": true,
1992
+ "hiddenAliases": [],
1993
+ "id": "agent:preview:start",
1994
+ "pluginAlias": "@salesforce/plugin-agent",
1995
+ "pluginName": "@salesforce/plugin-agent",
1996
+ "pluginType": "core",
1997
+ "strict": true,
1998
+ "summary": "Start a programmatic agent preview session.",
1999
+ "enableJsonFlag": true,
2000
+ "requiresProject": true,
2001
+ "envVariablesSection": {
2002
+ "header": "ENVIRONMENT VARIABLES",
2003
+ "body": [
2004
+ {
2005
+ "name": "SF_TARGET_ORG",
2006
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2007
+ }
2008
+ ]
2009
+ },
2010
+ "errorCodes": {
2011
+ "header": "ERROR CODES",
2012
+ "body": [
2013
+ {
2014
+ "name": "Succeeded (0)",
2015
+ "description": "Preview session started successfully."
2016
+ },
2017
+ {
2018
+ "name": "Failed (1)",
2019
+ "description": "Agent Script compilation failed (syntax errors in the script)."
2020
+ },
2021
+ {
2022
+ "name": "NotFound (2)",
2023
+ "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2024
+ },
2025
+ {
2026
+ "name": "ServerError (3)",
2027
+ "description": "Compilation API returned HTTP 500 (server error during compilation)."
2028
+ },
2029
+ {
2030
+ "name": "PreviewStartFailed (4)",
2031
+ "description": "Preview session failed to start due to API or network errors."
2032
+ }
2033
+ ]
2034
+ },
2035
+ "isESM": true,
2036
+ "relativePath": [
2037
+ "lib",
2038
+ "commands",
2039
+ "agent",
2040
+ "preview",
2041
+ "start.js"
2042
+ ],
2043
+ "aliasPermutations": [],
2044
+ "permutations": [
2045
+ "agent:preview:start",
2046
+ "preview:agent:start",
2047
+ "preview:start:agent",
2048
+ "agent:start:preview",
2049
+ "start:agent:preview",
2050
+ "start:preview:agent"
2051
+ ]
2052
+ },
2053
+ "agent:publish:authoring-bundle": {
2054
+ "aliases": [],
2055
+ "args": {},
2056
+ "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
2057
+ "examples": [
2058
+ "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2059
+ "Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org",
2060
+ "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
2061
+ "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
2062
+ ],
2063
+ "flags": {
2064
+ "json": {
2065
+ "description": "Format output as json.",
2066
+ "helpGroup": "GLOBAL",
2067
+ "name": "json",
2068
+ "allowNo": false,
2069
+ "type": "boolean"
2070
+ },
2071
+ "flags-dir": {
2072
+ "helpGroup": "GLOBAL",
2073
+ "name": "flags-dir",
2074
+ "summary": "Import flag values from a directory.",
2075
+ "hasDynamicHelp": false,
2076
+ "multiple": false,
2077
+ "type": "option"
2078
+ },
2079
+ "target-org": {
2080
+ "char": "o",
2081
+ "name": "target-org",
2082
+ "noCacheDefault": true,
1792
2083
  "required": true,
1793
- "summary": "ID of the MCP server to delete.",
2084
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2085
+ "hasDynamicHelp": true,
2086
+ "multiple": false,
2087
+ "type": "option"
2088
+ },
2089
+ "api-version": {
2090
+ "description": "Override the api version used for api requests made by this command",
2091
+ "name": "api-version",
1794
2092
  "hasDynamicHelp": false,
1795
2093
  "multiple": false,
1796
2094
  "type": "option"
1797
2095
  },
1798
- "no-prompt": {
1799
- "name": "no-prompt",
1800
- "summary": "Skip the confirmation prompt and delete the MCP server immediately.",
2096
+ "api-name": {
2097
+ "char": "n",
2098
+ "name": "api-name",
2099
+ "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
2100
+ "hasDynamicHelp": false,
2101
+ "multiple": false,
2102
+ "type": "option"
2103
+ },
2104
+ "skip-retrieve": {
2105
+ "name": "skip-retrieve",
2106
+ "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
2107
+ "allowNo": false,
2108
+ "type": "boolean"
2109
+ },
2110
+ "verbose": {
2111
+ "char": "v",
2112
+ "exclusive": [
2113
+ "concise"
2114
+ ],
2115
+ "name": "verbose",
2116
+ "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
2117
+ "allowNo": false,
2118
+ "type": "boolean"
2119
+ },
2120
+ "concise": {
2121
+ "exclusive": [
2122
+ "verbose"
2123
+ ],
2124
+ "name": "concise",
2125
+ "summary": "Display minimal output with only essential information about the publish operation.",
1801
2126
  "allowNo": false,
1802
2127
  "type": "boolean"
1803
2128
  }
1804
2129
  },
1805
2130
  "hasDynamicHelp": true,
1806
2131
  "hiddenAliases": [],
1807
- "id": "agent:mcp:delete",
2132
+ "id": "agent:publish:authoring-bundle",
1808
2133
  "pluginAlias": "@salesforce/plugin-agent",
1809
2134
  "pluginName": "@salesforce/plugin-agent",
1810
2135
  "pluginType": "core",
1811
- "state": "preview",
1812
2136
  "strict": true,
1813
- "summary": "Delete an MCP server from the API Catalog.",
2137
+ "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
1814
2138
  "enableJsonFlag": true,
2139
+ "requiresProject": true,
2140
+ "errorCodes": {
2141
+ "header": "ERROR CODES",
2142
+ "body": [
2143
+ {
2144
+ "name": "Succeeded (0)",
2145
+ "description": "Agent published successfully without errors."
2146
+ },
2147
+ {
2148
+ "name": "Failed (1)",
2149
+ "description": "Compilation errors found in the Agent Script file."
2150
+ }
2151
+ ]
2152
+ },
2153
+ "FLAGGABLE_PROMPTS": {
2154
+ "api-name": {
2155
+ "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
2156
+ "promptMessage": "API name of the authoring bundle to publish"
2157
+ }
2158
+ },
1815
2159
  "isESM": true,
1816
2160
  "relativePath": [
1817
2161
  "lib",
1818
2162
  "commands",
1819
2163
  "agent",
1820
- "mcp",
1821
- "delete.js"
2164
+ "publish",
2165
+ "authoring-bundle.js"
1822
2166
  ],
1823
2167
  "aliasPermutations": [],
1824
2168
  "permutations": [
1825
- "agent:mcp:delete",
1826
- "mcp:agent:delete",
1827
- "mcp:delete:agent",
1828
- "agent:delete:mcp",
1829
- "delete:agent:mcp",
1830
- "delete:mcp:agent"
2169
+ "agent:publish:authoring-bundle",
2170
+ "publish:agent:authoring-bundle",
2171
+ "publish:authoring-bundle:agent",
2172
+ "agent:authoring-bundle:publish",
2173
+ "authoring-bundle:agent:publish",
2174
+ "authoring-bundle:publish:agent"
1831
2175
  ]
1832
2176
  },
1833
- "agent:mcp:fetch": {
2177
+ "agent:trace:delete": {
1834
2178
  "aliases": [],
1835
2179
  "args": {},
1836
- "description": "Performs a live fetch against the configured MCP server identified by its ID, returning the assets (MCP tools, prompts, and resources) it currently advertises along with their status and activation state. Use this to refresh the view of what an MCP server exposes before activating its assets as agent actions.",
2180
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\nBy default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.\n\nWithout filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than).",
1837
2181
  "examples": [
1838
- "Fetch the assets advertised by an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001",
1839
- "Fetch MCP server assets and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001 --json"
2182
+ "Delete all traces for all agents and sessions; prompt for confirmation:\n<%= config.bin %> <%= command.id %>",
2183
+ "Delete all traces for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2184
+ "Delete traces from a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2185
+ "Delete traces older than 7 days:\n<%= config.bin %> <%= command.id %> --older-than 7d",
2186
+ "Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt",
2187
+ "Delete all traces for all agents and sessions; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --no-prompt"
1840
2188
  ],
1841
2189
  "flags": {
1842
2190
  "json": {
@@ -1854,68 +2202,84 @@
1854
2202
  "multiple": false,
1855
2203
  "type": "option"
1856
2204
  },
1857
- "target-org": {
1858
- "char": "o",
1859
- "name": "target-org",
1860
- "noCacheDefault": true,
1861
- "required": true,
1862
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1863
- "hasDynamicHelp": true,
2205
+ "agent": {
2206
+ "char": "a",
2207
+ "name": "agent",
2208
+ "summary": "API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
2209
+ "hasDynamicHelp": false,
1864
2210
  "multiple": false,
1865
2211
  "type": "option"
1866
2212
  },
1867
- "api-version": {
1868
- "description": "Override the api version used for api requests made by this command",
1869
- "name": "api-version",
2213
+ "session-id": {
2214
+ "name": "session-id",
2215
+ "summary": "Session ID used to filter the list of trace files you want to delete. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
1870
2216
  "hasDynamicHelp": false,
1871
2217
  "multiple": false,
1872
2218
  "type": "option"
1873
2219
  },
1874
- "mcp-server-id": {
1875
- "char": "i",
1876
- "name": "mcp-server-id",
1877
- "required": true,
1878
- "summary": "ID of the MCP server to fetch assets from.",
2220
+ "older-than": {
2221
+ "name": "older-than",
2222
+ "summary": "Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w.",
1879
2223
  "hasDynamicHelp": false,
1880
2224
  "multiple": false,
1881
2225
  "type": "option"
2226
+ },
2227
+ "no-prompt": {
2228
+ "name": "no-prompt",
2229
+ "summary": "Skip the confirmation prompt and delete immediately.",
2230
+ "allowNo": false,
2231
+ "type": "boolean"
1882
2232
  }
1883
2233
  },
1884
- "hasDynamicHelp": true,
2234
+ "hasDynamicHelp": false,
1885
2235
  "hiddenAliases": [],
1886
- "id": "agent:mcp:fetch",
2236
+ "id": "agent:trace:delete",
1887
2237
  "pluginAlias": "@salesforce/plugin-agent",
1888
2238
  "pluginName": "@salesforce/plugin-agent",
1889
2239
  "pluginType": "core",
1890
- "state": "preview",
1891
2240
  "strict": true,
1892
- "summary": "Fetch the live assets (tools, prompts, resources) advertised by an MCP server.",
2241
+ "summary": "Delete trace files from an agent preview session.",
1893
2242
  "enableJsonFlag": true,
2243
+ "requiresProject": true,
2244
+ "errorCodes": {
2245
+ "header": "ERROR CODES",
2246
+ "body": [
2247
+ {
2248
+ "name": "Succeeded (0)",
2249
+ "description": "Traces deleted successfully (or no traces matched)."
2250
+ }
2251
+ ]
2252
+ },
1894
2253
  "isESM": true,
1895
2254
  "relativePath": [
1896
2255
  "lib",
1897
2256
  "commands",
1898
2257
  "agent",
1899
- "mcp",
1900
- "fetch.js"
2258
+ "trace",
2259
+ "delete.js"
1901
2260
  ],
1902
2261
  "aliasPermutations": [],
1903
2262
  "permutations": [
1904
- "agent:mcp:fetch",
1905
- "mcp:agent:fetch",
1906
- "mcp:fetch:agent",
1907
- "agent:fetch:mcp",
1908
- "fetch:agent:mcp",
1909
- "fetch:mcp:agent"
2263
+ "agent:trace:delete",
2264
+ "trace:agent:delete",
2265
+ "trace:delete:agent",
2266
+ "agent:delete:trace",
2267
+ "delete:agent:trace",
2268
+ "delete:trace:agent"
1910
2269
  ]
1911
2270
  },
1912
- "agent:mcp:get": {
2271
+ "agent:trace:list": {
1913
2272
  "aliases": [],
1914
2273
  "args": {},
1915
- "description": "Retrieves the details of an MCP (Model Context Protocol) server by its identifier, including its name, label, type, status, and server URL.",
2274
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since).\n\nEach row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.",
1916
2275
  "examples": [
1917
- "Get an MCP server by id in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0Mx000000000001",
1918
- "Get an MCP server and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0Mx000000000001 --json"
2276
+ "List all trace files for all agents and sessions:\n<%= config.bin %> <%= command.id %>",
2277
+ "List all trace files for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
2278
+ "List trace files for a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2279
+ "List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n<%= config.bin %> <%= command.id %> --since 2026-04-20",
2280
+ "List trace files recorded on or after a specific UTC time:\n<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z",
2281
+ "Filter by agent and date together:\n<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20",
2282
+ "Return results as JSON:\n<%= config.bin %> <%= command.id %> --json"
1919
2283
  ],
1920
2284
  "flags": {
1921
2285
  "json": {
@@ -1933,68 +2297,79 @@
1933
2297
  "multiple": false,
1934
2298
  "type": "option"
1935
2299
  },
1936
- "target-org": {
1937
- "char": "o",
1938
- "name": "target-org",
1939
- "noCacheDefault": true,
1940
- "required": true,
1941
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1942
- "hasDynamicHelp": true,
2300
+ "session-id": {
2301
+ "name": "session-id",
2302
+ "summary": "Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
2303
+ "hasDynamicHelp": false,
1943
2304
  "multiple": false,
1944
2305
  "type": "option"
1945
2306
  },
1946
- "api-version": {
1947
- "description": "Override the api version used for api requests made by this command",
1948
- "name": "api-version",
2307
+ "agent": {
2308
+ "char": "a",
2309
+ "name": "agent",
2310
+ "summary": "API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
1949
2311
  "hasDynamicHelp": false,
1950
2312
  "multiple": false,
1951
2313
  "type": "option"
1952
2314
  },
1953
- "mcp-server-id": {
1954
- "char": "i",
1955
- "name": "mcp-server-id",
1956
- "required": true,
1957
- "summary": "The identifier of the MCP server to retrieve.",
2315
+ "since": {
2316
+ "description": "Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds (2026-04-20T14:00:00.000Z). The \"Recorded At\" values shown in the table output are valid inputs.",
2317
+ "name": "since",
2318
+ "summary": "Date used to filter the list of trace files; only those recorded on or after the date are listed.",
1958
2319
  "hasDynamicHelp": false,
1959
2320
  "multiple": false,
1960
2321
  "type": "option"
1961
2322
  }
1962
2323
  },
1963
- "hasDynamicHelp": true,
2324
+ "hasDynamicHelp": false,
1964
2325
  "hiddenAliases": [],
1965
- "id": "agent:mcp:get",
2326
+ "id": "agent:trace:list",
1966
2327
  "pluginAlias": "@salesforce/plugin-agent",
1967
2328
  "pluginName": "@salesforce/plugin-agent",
1968
2329
  "pluginType": "core",
1969
- "state": "preview",
1970
2330
  "strict": true,
1971
- "summary": "Get a single MCP server registered in the API Catalog.",
2331
+ "summary": "List the available trace files that were recorded during all agent preview sessions.",
1972
2332
  "enableJsonFlag": true,
2333
+ "requiresProject": true,
2334
+ "errorCodes": {
2335
+ "header": "ERROR CODES",
2336
+ "body": [
2337
+ {
2338
+ "name": "Succeeded (0)",
2339
+ "description": "Trace files listed successfully (or empty list if none found)."
2340
+ }
2341
+ ]
2342
+ },
1973
2343
  "isESM": true,
1974
2344
  "relativePath": [
1975
2345
  "lib",
1976
2346
  "commands",
1977
2347
  "agent",
1978
- "mcp",
1979
- "get.js"
2348
+ "trace",
2349
+ "list.js"
1980
2350
  ],
1981
2351
  "aliasPermutations": [],
1982
2352
  "permutations": [
1983
- "agent:mcp:get",
1984
- "mcp:agent:get",
1985
- "mcp:get:agent",
1986
- "agent:get:mcp",
1987
- "get:agent:mcp",
1988
- "get:mcp:agent"
2353
+ "agent:trace:list",
2354
+ "trace:agent:list",
2355
+ "trace:list:agent",
2356
+ "agent:list:trace",
2357
+ "list:agent:trace",
2358
+ "list:trace:agent"
1989
2359
  ]
1990
2360
  },
1991
- "agent:mcp:list": {
2361
+ "agent:trace:read": {
1992
2362
  "aliases": [],
1993
2363
  "args": {},
1994
- "description": "Returns the Model Context Protocol (MCP) servers registered in the API Catalog, optionally filtered by label, type, or status. Use this to discover which MCP servers are available and inspect their server URLs and current status.",
2364
+ "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior.\n\nUse the --format flag to specify one of these formats of the outputted trace data:\n\n- summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a preview session.\n- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise.\n- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.\n\nIf you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide:\n\n- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session.\n- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem - the AI reasoning that determined which actions to take.\n- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation.\n- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps.",
1995
2365
  "examples": [
1996
- "List all MCP servers in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
1997
- "List external MCP servers filtered by status and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --type EXTERNAL --status ACTIVE --json"
2366
+ "Show a session trace summary for all turns in the session with the specified ID:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
2367
+ "Show a trace summary for the second turn (utterance or response) of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2",
2368
+ "Drill into action execution across all turns:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions",
2369
+ "Drill into routing decisions for the first turn of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1",
2370
+ "Show all errors across the session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors",
2371
+ "Output raw trace JSON for custom parsing:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw",
2372
+ "Return results as JSON:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json"
1998
2373
  ],
1999
2374
  "flags": {
2000
2375
  "json": {
@@ -2012,87 +2387,89 @@
2012
2387
  "multiple": false,
2013
2388
  "type": "option"
2014
2389
  },
2015
- "target-org": {
2016
- "char": "o",
2017
- "name": "target-org",
2018
- "noCacheDefault": true,
2390
+ "session-id": {
2391
+ "char": "s",
2392
+ "name": "session-id",
2019
2393
  "required": true,
2020
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2021
- "hasDynamicHelp": true,
2022
- "multiple": false,
2023
- "type": "option"
2024
- },
2025
- "api-version": {
2026
- "description": "Override the api version used for api requests made by this command",
2027
- "name": "api-version",
2394
+ "summary": "Session ID to read traces for. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs",
2028
2395
  "hasDynamicHelp": false,
2029
2396
  "multiple": false,
2030
2397
  "type": "option"
2031
2398
  },
2032
- "label": {
2033
- "name": "label",
2034
- "summary": "Filter the MCP servers by label.",
2399
+ "format": {
2400
+ "char": "f",
2401
+ "name": "format",
2402
+ "summary": "Output format of the trace data; specifies the level of detail you want in the trace files.",
2403
+ "default": "summary",
2035
2404
  "hasDynamicHelp": false,
2036
2405
  "multiple": false,
2406
+ "options": [
2407
+ "summary",
2408
+ "detail",
2409
+ "raw"
2410
+ ],
2037
2411
  "type": "option"
2038
2412
  },
2039
- "type": {
2040
- "name": "type",
2041
- "summary": "Filter the MCP servers by type.",
2413
+ "dimension": {
2414
+ "char": "d",
2415
+ "name": "dimension",
2416
+ "summary": "Dimension to drill into when using \"--format detail\"; used to filter and organize the trace data to answer a specific type of question.",
2042
2417
  "hasDynamicHelp": false,
2043
2418
  "multiple": false,
2044
2419
  "options": [
2045
- "EXTERNAL"
2420
+ "actions",
2421
+ "grounding",
2422
+ "routing",
2423
+ "errors"
2046
2424
  ],
2047
2425
  "type": "option"
2048
2426
  },
2049
- "status": {
2050
- "name": "status",
2051
- "summary": "Filter the MCP servers by connection status. Only ACTIVE and DISCONNECTED are supported as filters.",
2427
+ "turn": {
2428
+ "char": "t",
2429
+ "name": "turn",
2430
+ "summary": "Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1.",
2052
2431
  "hasDynamicHelp": false,
2053
2432
  "multiple": false,
2054
- "options": [
2055
- "ACTIVE",
2056
- "DISCONNECTED"
2057
- ],
2058
2433
  "type": "option"
2059
2434
  }
2060
2435
  },
2061
- "hasDynamicHelp": true,
2436
+ "hasDynamicHelp": false,
2062
2437
  "hiddenAliases": [],
2063
- "id": "agent:mcp:list",
2438
+ "id": "agent:trace:read",
2064
2439
  "pluginAlias": "@salesforce/plugin-agent",
2065
2440
  "pluginName": "@salesforce/plugin-agent",
2066
2441
  "pluginType": "core",
2067
- "state": "preview",
2068
2442
  "strict": true,
2069
- "summary": "List the MCP servers registered in the API Catalog.",
2443
+ "summary": "Read trace files from an agent preview session.",
2070
2444
  "enableJsonFlag": true,
2445
+ "requiresProject": true,
2071
2446
  "isESM": true,
2072
2447
  "relativePath": [
2073
2448
  "lib",
2074
2449
  "commands",
2075
2450
  "agent",
2076
- "mcp",
2077
- "list.js"
2451
+ "trace",
2452
+ "read.js"
2078
2453
  ],
2079
2454
  "aliasPermutations": [],
2080
2455
  "permutations": [
2081
- "agent:mcp:list",
2082
- "mcp:agent:list",
2083
- "mcp:list:agent",
2084
- "agent:list:mcp",
2085
- "list:agent:mcp",
2086
- "list:mcp:agent"
2456
+ "agent:trace:read",
2457
+ "trace:agent:read",
2458
+ "trace:read:agent",
2459
+ "agent:read:trace",
2460
+ "read:agent:trace",
2461
+ "read:trace:agent"
2087
2462
  ]
2088
2463
  },
2089
- "agent:mcp:update": {
2464
+ "agent:test:create": {
2090
2465
  "aliases": [],
2091
2466
  "args": {},
2092
- "description": "Updates an existing MCP server in the API Catalog. Only the fields you provide are changed; omitted fields are left untouched. You can update the label, description, and server URL, and replace the authorization configuration. When setting `--auth-type OAUTH`, you must also provide `--identity-provider`, `--client-id`, `--client-secret`, and `--scope`. When setting `--auth-type NO_AUTH`, no authorization credentials are required. At least one updatable field must be supplied.",
2467
+ "description": "To run this command, you must have an agent test spec file, which is a YAML file that lists the test cases for testing a specific agent. Use the \"agent generate test-spec\" CLI command to generate a test spec file. Then specify the file to this command with the --spec flag, or run this command with no flags to be prompted.\n\nWhen this command completes, your org contains the new agent test, which you can view and edit using the Testing Center UI (legacy) or Agentforce Studio (NGT). This command also retrieves the metadata component associated with the new test to your local Salesforce DX project and displays its filename. By default, the legacy AiEvaluationDefinition is created; use --test-runner agentforce-studio to author an AiTestingDefinition (NGT) instead.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
2093
2468
  "examples": [
2094
- "Update the label and description of an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --label \"Orders MCP\" --description \"Order tooling\" --target-org myOrg",
2095
- "Update the server URL and switch the authorization to OAuth, piping the client secret from stdin and outputting as JSON:\ncat secret.txt | <%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --server-url https://mcp.example.com --auth-type OAUTH --identity-provider MyIdp --client-id abc --client-secret - --scope \"read write\" --target-org myOrg --json"
2469
+ "Create an agent test interactively and be prompted for the test spec and API name of the test in the org; use the default org:\n<%= config.bin %> <%= command.id %>",
2470
+ "Create an agent test and use flags to specify all required information; if a test with same API name already exists in the org, overwrite it without confirmation. Use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --force-overwrite --target-org my-org",
2471
+ "Preview what the agent test metadata (AiEvaluationDefinition) looks like without deploying it to your default org:\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview",
2472
+ "Author an Agentforce Studio (NGT) test from an NGT-shaped YAML; writes an AiTestingDefinition metadata file:\n<%= config.bin %> <%= command.id %> --spec specs/ReturnsCheckout.ngt.yaml --api-name Returns_Checkout --test-runner agentforce-studio --target-org my-org"
2096
2473
  ],
2097
2474
  "flags": {
2098
2475
  "json": {
@@ -2110,6 +2487,20 @@
2110
2487
  "multiple": false,
2111
2488
  "type": "option"
2112
2489
  },
2490
+ "api-name": {
2491
+ "name": "api-name",
2492
+ "summary": "API name of the new test; the API name must not exist in the org.",
2493
+ "hasDynamicHelp": false,
2494
+ "multiple": false,
2495
+ "type": "option"
2496
+ },
2497
+ "spec": {
2498
+ "name": "spec",
2499
+ "summary": "Path to the test spec YAML file.",
2500
+ "hasDynamicHelp": false,
2501
+ "multiple": false,
2502
+ "type": "option"
2503
+ },
2113
2504
  "target-org": {
2114
2505
  "char": "o",
2115
2506
  "name": "target-org",
@@ -2127,114 +2518,95 @@
2127
2518
  "multiple": false,
2128
2519
  "type": "option"
2129
2520
  },
2130
- "mcp-server-id": {
2131
- "char": "i",
2132
- "name": "mcp-server-id",
2133
- "required": true,
2134
- "summary": "ID of the MCP server to update.",
2135
- "hasDynamicHelp": false,
2136
- "multiple": false,
2137
- "type": "option"
2138
- },
2139
- "label": {
2140
- "name": "label",
2141
- "summary": "New display label for the MCP server.",
2142
- "hasDynamicHelp": false,
2143
- "multiple": false,
2144
- "type": "option"
2145
- },
2146
- "description": {
2147
- "name": "description",
2148
- "summary": "New description for the MCP server.",
2149
- "hasDynamicHelp": false,
2150
- "multiple": false,
2151
- "type": "option"
2521
+ "preview": {
2522
+ "name": "preview",
2523
+ "summary": "Preview the test metadata file without deploying to your org.",
2524
+ "allowNo": false,
2525
+ "type": "boolean"
2152
2526
  },
2153
- "server-url": {
2154
- "name": "server-url",
2155
- "summary": "New endpoint URL of the MCP server.",
2156
- "hasDynamicHelp": false,
2157
- "multiple": false,
2158
- "type": "option"
2527
+ "force-overwrite": {
2528
+ "name": "force-overwrite",
2529
+ "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
2530
+ "allowNo": false,
2531
+ "type": "boolean"
2159
2532
  },
2160
- "auth-type": {
2161
- "name": "auth-type",
2162
- "summary": "Authorization type to apply to the MCP server (OAUTH or NO_AUTH).",
2533
+ "test-runner": {
2534
+ "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.",
2535
+ "name": "test-runner",
2536
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2163
2537
  "hasDynamicHelp": false,
2164
2538
  "multiple": false,
2165
2539
  "options": [
2166
- "OAUTH",
2167
- "NO_AUTH"
2540
+ "agentforce-studio",
2541
+ "testing-center"
2168
2542
  ],
2169
2543
  "type": "option"
2170
- },
2171
- "identity-provider": {
2172
- "name": "identity-provider",
2173
- "summary": "Identity provider name for OAuth authorization (required when --auth-type is OAUTH).",
2174
- "hasDynamicHelp": false,
2175
- "multiple": false,
2176
- "type": "option"
2177
- },
2178
- "client-id": {
2179
- "name": "client-id",
2180
- "summary": "OAuth client ID (required when --auth-type is OAUTH).",
2181
- "hasDynamicHelp": false,
2182
- "multiple": false,
2183
- "type": "option"
2184
- },
2185
- "client-secret": {
2186
- "name": "client-secret",
2187
- "summary": "OAuth client secret (required when --auth-type is OAUTH). Pass \"-\" to read it from stdin (piped) and keep it out of shell history.",
2188
- "hasDynamicHelp": false,
2189
- "multiple": false,
2190
- "type": "option"
2191
- },
2192
- "scope": {
2193
- "name": "scope",
2194
- "summary": "OAuth scope (required when --auth-type is OAUTH).",
2195
- "hasDynamicHelp": false,
2196
- "multiple": false,
2197
- "type": "option"
2198
2544
  }
2199
2545
  },
2200
2546
  "hasDynamicHelp": true,
2201
2547
  "hiddenAliases": [],
2202
- "id": "agent:mcp:update",
2548
+ "id": "agent:test:create",
2203
2549
  "pluginAlias": "@salesforce/plugin-agent",
2204
2550
  "pluginName": "@salesforce/plugin-agent",
2205
2551
  "pluginType": "core",
2206
- "state": "preview",
2207
2552
  "strict": true,
2208
- "summary": "Update an MCP server registered in the API Catalog.",
2553
+ "summary": "Create an agent test in your org using a local test spec YAML file.",
2209
2554
  "enableJsonFlag": true,
2555
+ "envVariablesSection": {
2556
+ "header": "ENVIRONMENT VARIABLES",
2557
+ "body": [
2558
+ {
2559
+ "name": "SF_TARGET_ORG",
2560
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2561
+ }
2562
+ ]
2563
+ },
2564
+ "errorCodes": {
2565
+ "header": "ERROR CODES",
2566
+ "body": [
2567
+ {
2568
+ "name": "Succeeded (0)",
2569
+ "description": "Test created and deployed successfully."
2570
+ },
2571
+ {
2572
+ "name": "Failed (1)",
2573
+ "description": "Test validation errors or metadata format issues."
2574
+ },
2575
+ {
2576
+ "name": "NotFound (2)",
2577
+ "description": "Test spec file not found or org connection failed."
2578
+ },
2579
+ {
2580
+ "name": "DeploymentFailed (4)",
2581
+ "description": "Deployment failed due to API or network errors."
2582
+ }
2583
+ ]
2584
+ },
2210
2585
  "isESM": true,
2211
2586
  "relativePath": [
2212
2587
  "lib",
2213
2588
  "commands",
2214
2589
  "agent",
2215
- "mcp",
2216
- "update.js"
2590
+ "test",
2591
+ "create.js"
2217
2592
  ],
2218
2593
  "aliasPermutations": [],
2219
2594
  "permutations": [
2220
- "agent:mcp:update",
2221
- "mcp:agent:update",
2222
- "mcp:update:agent",
2223
- "agent:update:mcp",
2224
- "update:agent:mcp",
2225
- "update:mcp:agent"
2595
+ "agent:test:create",
2596
+ "test:agent:create",
2597
+ "test:create:agent",
2598
+ "agent:create:test",
2599
+ "create:agent:test",
2600
+ "create:test:agent"
2226
2601
  ]
2227
2602
  },
2228
- "agent:preview:end": {
2603
+ "agent:test:list": {
2229
2604
  "aliases": [],
2230
2605
  "args": {},
2231
- "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.",
2606
+ "description": "The command outputs a table with the name (API name) of each test along with its unique ID, type ('agentforce-studio' or 'testing-center'), and the date it was created in the org.",
2232
2607
  "examples": [
2233
- "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",
2234
- "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",
2235
- "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",
2236
- "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",
2237
- "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>"
2608
+ "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
2609
+ "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
2238
2610
  ],
2239
2611
  "flags": {
2240
2612
  "json": {
@@ -2268,66 +2640,17 @@
2268
2640
  "hasDynamicHelp": false,
2269
2641
  "multiple": false,
2270
2642
  "type": "option"
2271
- },
2272
- "session-id": {
2273
- "exclusive": [
2274
- "all"
2275
- ],
2276
- "name": "session-id",
2277
- "required": false,
2278
- "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.",
2279
- "hasDynamicHelp": false,
2280
- "multiple": false,
2281
- "type": "option"
2282
- },
2283
- "api-name": {
2284
- "char": "n",
2285
- "exclusive": [
2286
- "authoring-bundle"
2287
- ],
2288
- "name": "api-name",
2289
- "summary": "API name of the activated published agent you want to preview.",
2290
- "hasDynamicHelp": false,
2291
- "multiple": false,
2292
- "type": "option"
2293
- },
2294
- "authoring-bundle": {
2295
- "exclusive": [
2296
- "api-name"
2297
- ],
2298
- "name": "authoring-bundle",
2299
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2300
- "hasDynamicHelp": false,
2301
- "multiple": false,
2302
- "type": "option"
2303
- },
2304
- "all": {
2305
- "exclusive": [
2306
- "session-id"
2307
- ],
2308
- "name": "all",
2309
- "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.",
2310
- "allowNo": false,
2311
- "type": "boolean"
2312
- },
2313
- "no-prompt": {
2314
- "char": "p",
2315
- "name": "no-prompt",
2316
- "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
2317
- "allowNo": false,
2318
- "type": "boolean"
2319
2643
  }
2320
2644
  },
2321
2645
  "hasDynamicHelp": true,
2322
2646
  "hiddenAliases": [],
2323
- "id": "agent:preview:end",
2647
+ "id": "agent:test:list",
2324
2648
  "pluginAlias": "@salesforce/plugin-agent",
2325
2649
  "pluginName": "@salesforce/plugin-agent",
2326
2650
  "pluginType": "core",
2327
2651
  "strict": true,
2328
- "summary": "End an existing programmatic agent preview session and get trace location.",
2652
+ "summary": "List the available agent tests in your org.",
2329
2653
  "enableJsonFlag": true,
2330
- "requiresProject": true,
2331
2654
  "envVariablesSection": {
2332
2655
  "header": "ENVIRONMENT VARIABLES",
2333
2656
  "body": [
@@ -2342,27 +2665,11 @@
2342
2665
  "body": [
2343
2666
  {
2344
2667
  "name": "Succeeded (0)",
2345
- "description": "Preview session ended successfully and traces saved."
2346
- },
2347
- {
2348
- "name": "ExactlyOneRequired (2)",
2349
- "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
2350
- },
2351
- {
2352
- "name": "NotFound (2)",
2353
- "description": "Agent not found, or no preview session exists for this agent."
2354
- },
2355
- {
2356
- "name": "PreviewEndFailed (4)",
2357
- "description": "Failed to end the preview session."
2358
- },
2359
- {
2360
- "name": "PreviewEndPartialFailure (68)",
2361
- "description": "With --all, one or more sessions failed to end while others succeeded."
2668
+ "description": "Agent tests listed successfully."
2362
2669
  },
2363
2670
  {
2364
- "name": "SessionAmbiguous (5)",
2365
- "description": "Multiple preview sessions found; specify --session-id to choose one."
2671
+ "name": "Failed (4)",
2672
+ "description": "Failed to retrieve agent tests due to API or network errors."
2366
2673
  }
2367
2674
  ]
2368
2675
  },
@@ -2371,27 +2678,27 @@
2371
2678
  "lib",
2372
2679
  "commands",
2373
2680
  "agent",
2374
- "preview",
2375
- "end.js"
2681
+ "test",
2682
+ "list.js"
2376
2683
  ],
2377
2684
  "aliasPermutations": [],
2378
2685
  "permutations": [
2379
- "agent:preview:end",
2380
- "preview:agent:end",
2381
- "preview:end:agent",
2382
- "agent:end:preview",
2383
- "end:agent:preview",
2384
- "end:preview:agent"
2686
+ "agent:test:list",
2687
+ "test:agent:list",
2688
+ "test:list:agent",
2689
+ "agent:list:test",
2690
+ "list:agent:test",
2691
+ "list:test:agent"
2385
2692
  ]
2386
2693
  },
2387
- "agent:preview:send": {
2694
+ "agent:test:results": {
2388
2695
  "aliases": [],
2389
2696
  "args": {},
2390
- "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.",
2697
+ "description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
2391
2698
  "examples": [
2392
- "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>",
2393
- "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",
2394
- "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"
2699
+ "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
2700
+ "Get the results of the most recently run agent test in an org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-org",
2701
+ "Get the results of the most recently run agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
2395
2702
  ],
2396
2703
  "flags": {
2397
2704
  "json": {
@@ -2426,49 +2733,67 @@
2426
2733
  "multiple": false,
2427
2734
  "type": "option"
2428
2735
  },
2429
- "session-id": {
2430
- "name": "session-id",
2431
- "required": false,
2432
- "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.",
2736
+ "job-id": {
2737
+ "char": "i",
2738
+ "name": "job-id",
2739
+ "required": true,
2740
+ "summary": "Job ID of the completed agent test run.",
2433
2741
  "hasDynamicHelp": false,
2434
2742
  "multiple": false,
2435
2743
  "type": "option"
2436
2744
  },
2437
- "utterance": {
2438
- "char": "u",
2439
- "name": "utterance",
2440
- "required": true,
2441
- "summary": "Utterance to send to the agent, enclosed in double quotes.",
2745
+ "result-format": {
2746
+ "name": "result-format",
2747
+ "summary": "Format of the agent test run results.",
2748
+ "default": "human",
2442
2749
  "hasDynamicHelp": false,
2443
2750
  "multiple": false,
2751
+ "options": [
2752
+ "json",
2753
+ "human",
2754
+ "junit",
2755
+ "tap"
2756
+ ],
2444
2757
  "type": "option"
2445
2758
  },
2446
- "api-name": {
2447
- "char": "n",
2448
- "name": "api-name",
2449
- "summary": "API name of the activated published agent you want to preview.",
2759
+ "output-dir": {
2760
+ "char": "d",
2761
+ "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
2762
+ "name": "output-dir",
2763
+ "summary": "Directory to write the agent test results into.",
2450
2764
  "hasDynamicHelp": false,
2451
2765
  "multiple": false,
2452
2766
  "type": "option"
2453
2767
  },
2454
- "authoring-bundle": {
2455
- "name": "authoring-bundle",
2456
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2768
+ "test-runner": {
2769
+ "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.",
2770
+ "name": "test-runner",
2771
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2457
2772
  "hasDynamicHelp": false,
2458
2773
  "multiple": false,
2774
+ "options": [
2775
+ "agentforce-studio",
2776
+ "testing-center"
2777
+ ],
2459
2778
  "type": "option"
2779
+ },
2780
+ "verbose": {
2781
+ "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
2782
+ "name": "verbose",
2783
+ "summary": "Show generated data in the test results output.",
2784
+ "allowNo": false,
2785
+ "type": "boolean"
2460
2786
  }
2461
2787
  },
2462
2788
  "hasDynamicHelp": true,
2463
2789
  "hiddenAliases": [],
2464
- "id": "agent:preview:send",
2790
+ "id": "agent:test:results",
2465
2791
  "pluginAlias": "@salesforce/plugin-agent",
2466
2792
  "pluginName": "@salesforce/plugin-agent",
2467
2793
  "pluginType": "core",
2468
2794
  "strict": true,
2469
- "summary": "Send a message to an existing agent preview session.",
2795
+ "summary": "Get the results of a completed agent test run.",
2470
2796
  "enableJsonFlag": true,
2471
- "requiresProject": true,
2472
2797
  "envVariablesSection": {
2473
2798
  "header": "ENVIRONMENT VARIABLES",
2474
2799
  "body": [
@@ -2483,80 +2808,15 @@
2483
2808
  "body": [
2484
2809
  {
2485
2810
  "name": "Succeeded (0)",
2486
- "description": "Message sent successfully and agent response received."
2811
+ "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
2487
2812
  },
2488
2813
  {
2489
2814
  "name": "NotFound (2)",
2490
- "description": "Agent not found, or no preview session exists for this agent."
2491
- },
2492
- {
2493
- "name": "PreviewSendFailed (4)",
2494
- "description": "Failed to send message or receive response from the preview session."
2815
+ "description": "Job ID not found or invalid."
2495
2816
  },
2496
2817
  {
2497
- "name": "SessionAmbiguous (5)",
2498
- "description": "Multiple preview sessions found; specify --session-id to choose one."
2499
- }
2500
- ]
2501
- },
2502
- "isESM": true,
2503
- "relativePath": [
2504
- "lib",
2505
- "commands",
2506
- "agent",
2507
- "preview",
2508
- "send.js"
2509
- ],
2510
- "aliasPermutations": [],
2511
- "permutations": [
2512
- "agent:preview:send",
2513
- "preview:agent:send",
2514
- "preview:send:agent",
2515
- "agent:send:preview",
2516
- "send:agent:preview",
2517
- "send:preview:agent"
2518
- ]
2519
- },
2520
- "agent:preview:sessions": {
2521
- "aliases": [],
2522
- "args": {},
2523
- "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.",
2524
- "examples": [
2525
- "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
2526
- ],
2527
- "flags": {
2528
- "json": {
2529
- "description": "Format output as json.",
2530
- "helpGroup": "GLOBAL",
2531
- "name": "json",
2532
- "allowNo": false,
2533
- "type": "boolean"
2534
- },
2535
- "flags-dir": {
2536
- "helpGroup": "GLOBAL",
2537
- "name": "flags-dir",
2538
- "summary": "Import flag values from a directory.",
2539
- "hasDynamicHelp": false,
2540
- "multiple": false,
2541
- "type": "option"
2542
- }
2543
- },
2544
- "hasDynamicHelp": false,
2545
- "hiddenAliases": [],
2546
- "id": "agent:preview:sessions",
2547
- "pluginAlias": "@salesforce/plugin-agent",
2548
- "pluginName": "@salesforce/plugin-agent",
2549
- "pluginType": "core",
2550
- "strict": true,
2551
- "summary": "List all known programmatic agent preview sessions.",
2552
- "enableJsonFlag": true,
2553
- "requiresProject": true,
2554
- "errorCodes": {
2555
- "header": "ERROR CODES",
2556
- "body": [
2557
- {
2558
- "name": "Succeeded (0)",
2559
- "description": "Sessions listed successfully (or empty list if no active sessions)."
2818
+ "name": "Failed (4)",
2819
+ "description": "Failed to retrieve results due to API or network errors."
2560
2820
  }
2561
2821
  ]
2562
2822
  },
@@ -2565,27 +2825,27 @@
2565
2825
  "lib",
2566
2826
  "commands",
2567
2827
  "agent",
2568
- "preview",
2569
- "sessions.js"
2828
+ "test",
2829
+ "results.js"
2570
2830
  ],
2571
2831
  "aliasPermutations": [],
2572
2832
  "permutations": [
2573
- "agent:preview:sessions",
2574
- "preview:agent:sessions",
2575
- "preview:sessions:agent",
2576
- "agent:sessions:preview",
2577
- "sessions:agent:preview",
2578
- "sessions:preview:agent"
2833
+ "agent:test:results",
2834
+ "test:agent:results",
2835
+ "test:results:agent",
2836
+ "agent:results:test",
2837
+ "results:agent:test",
2838
+ "results:test:agent"
2579
2839
  ]
2580
2840
  },
2581
- "agent:preview:start": {
2841
+ "agent:test:resume": {
2582
2842
  "aliases": [],
2583
2843
  "args": {},
2584
- "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.",
2844
+ "description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nUse the --wait flag to specify the number of minutes for this command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, the CLI returns control of the terminal to you, and you must run \"agent test resume\" again.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
2585
2845
  "examples": [
2586
- "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",
2587
- "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",
2588
- "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2846
+ "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
2847
+ "Resume the most recently-run agent test in an org with alias \"my-org\" org; wait 10 minutes for the tests to finish:\n<%= config.bin %> <%= command.id %> --use-most-recent --wait 10 --target-org my-org",
2848
+ "Resume the most recent agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
2589
2849
  ],
2590
2850
  "flags": {
2591
2851
  "json": {
@@ -2620,70 +2880,82 @@
2620
2880
  "multiple": false,
2621
2881
  "type": "option"
2622
2882
  },
2623
- "api-name": {
2624
- "char": "n",
2625
- "name": "api-name",
2626
- "summary": "API name of the activated published agent you want to preview.",
2627
- "hasDynamicHelp": false,
2628
- "multiple": false,
2629
- "type": "option"
2630
- },
2631
- "authoring-bundle": {
2632
- "name": "authoring-bundle",
2633
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2883
+ "job-id": {
2884
+ "char": "i",
2885
+ "name": "job-id",
2886
+ "summary": "Job ID of the original agent test run.",
2634
2887
  "hasDynamicHelp": false,
2635
2888
  "multiple": false,
2636
2889
  "type": "option"
2637
2890
  },
2638
- "use-live-actions": {
2639
- "exclusive": [
2640
- "simulate-actions"
2641
- ],
2642
- "name": "use-live-actions",
2643
- "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
2891
+ "use-most-recent": {
2892
+ "char": "r",
2893
+ "name": "use-most-recent",
2894
+ "summary": "Use the job ID of the most recent agent test run.",
2644
2895
  "allowNo": false,
2645
2896
  "type": "boolean"
2646
2897
  },
2647
- "simulate-actions": {
2648
- "exclusive": [
2649
- "use-live-actions"
2898
+ "wait": {
2899
+ "char": "w",
2900
+ "name": "wait",
2901
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2902
+ "default": "5 minutes",
2903
+ "hasDynamicHelp": true,
2904
+ "multiple": false,
2905
+ "type": "option"
2906
+ },
2907
+ "result-format": {
2908
+ "name": "result-format",
2909
+ "summary": "Format of the agent test run results.",
2910
+ "default": "human",
2911
+ "hasDynamicHelp": false,
2912
+ "multiple": false,
2913
+ "options": [
2914
+ "json",
2915
+ "human",
2916
+ "junit",
2917
+ "tap"
2650
2918
  ],
2651
- "name": "simulate-actions",
2652
- "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
2653
- "allowNo": false,
2654
- "type": "boolean"
2919
+ "type": "option"
2655
2920
  },
2656
- "context-variables": {
2657
- "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.",
2658
- "name": "context-variables",
2659
- "summary": "Session variables for the agent preview session, in the form Name=Value.",
2660
- "delimiter": ",",
2921
+ "output-dir": {
2922
+ "char": "d",
2923
+ "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
2924
+ "name": "output-dir",
2925
+ "summary": "Directory to write the agent test results into.",
2661
2926
  "hasDynamicHelp": false,
2662
- "multiple": true,
2927
+ "multiple": false,
2663
2928
  "type": "option"
2664
2929
  },
2665
- "agent-json": {
2666
- "dependsOn": [
2667
- "authoring-bundle"
2668
- ],
2669
- "hidden": true,
2670
- "name": "agent-json",
2671
- "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2930
+ "test-runner": {
2931
+ "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.",
2932
+ "name": "test-runner",
2933
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2672
2934
  "hasDynamicHelp": false,
2673
2935
  "multiple": false,
2936
+ "options": [
2937
+ "agentforce-studio",
2938
+ "testing-center"
2939
+ ],
2674
2940
  "type": "option"
2941
+ },
2942
+ "verbose": {
2943
+ "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
2944
+ "name": "verbose",
2945
+ "summary": "Show generated data in the test results output.",
2946
+ "allowNo": false,
2947
+ "type": "boolean"
2675
2948
  }
2676
2949
  },
2677
2950
  "hasDynamicHelp": true,
2678
2951
  "hiddenAliases": [],
2679
- "id": "agent:preview:start",
2952
+ "id": "agent:test:resume",
2680
2953
  "pluginAlias": "@salesforce/plugin-agent",
2681
2954
  "pluginName": "@salesforce/plugin-agent",
2682
2955
  "pluginType": "core",
2683
2956
  "strict": true,
2684
- "summary": "Start a programmatic agent preview session.",
2957
+ "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
2685
2958
  "enableJsonFlag": true,
2686
- "requiresProject": true,
2687
2959
  "envVariablesSection": {
2688
2960
  "header": "ENVIRONMENT VARIABLES",
2689
2961
  "body": [
@@ -2698,23 +2970,19 @@
2698
2970
  "body": [
2699
2971
  {
2700
2972
  "name": "Succeeded (0)",
2701
- "description": "Preview session started successfully."
2973
+ "description": "Test completed successfully (with test results in the output)."
2702
2974
  },
2703
2975
  {
2704
2976
  "name": "Failed (1)",
2705
- "description": "Agent Script compilation failed (syntax errors in the script)."
2977
+ "description": "Tests encountered execution errors (test cases with ERROR status)."
2706
2978
  },
2707
2979
  {
2708
2980
  "name": "NotFound (2)",
2709
- "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2710
- },
2711
- {
2712
- "name": "ServerError (3)",
2713
- "description": "Compilation API returned HTTP 500 (server error during compilation)."
2981
+ "description": "Job ID not found or invalid."
2714
2982
  },
2715
2983
  {
2716
- "name": "PreviewStartFailed (4)",
2717
- "description": "Preview session failed to start due to API or network errors."
2984
+ "name": "OperationFailed (4)",
2985
+ "description": "Failed to poll test due to API or network errors."
2718
2986
  }
2719
2987
  ]
2720
2988
  },
@@ -2723,28 +2991,30 @@
2723
2991
  "lib",
2724
2992
  "commands",
2725
2993
  "agent",
2726
- "preview",
2727
- "start.js"
2994
+ "test",
2995
+ "resume.js"
2728
2996
  ],
2729
2997
  "aliasPermutations": [],
2730
2998
  "permutations": [
2731
- "agent:preview:start",
2732
- "preview:agent:start",
2733
- "preview:start:agent",
2734
- "agent:start:preview",
2735
- "start:agent:preview",
2736
- "start:preview:agent"
2999
+ "agent:test:resume",
3000
+ "test:agent:resume",
3001
+ "test:resume:agent",
3002
+ "agent:resume:test",
3003
+ "resume:agent:test",
3004
+ "resume:test:agent"
2737
3005
  ]
2738
3006
  },
2739
- "agent:publish:authoring-bundle": {
3007
+ "agent:test:run-eval": {
2740
3008
  "aliases": [],
2741
3009
  "args": {},
2742
- "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
3010
+ "description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.\n\nWhen you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
2743
3011
  "examples": [
2744
- "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2745
- "Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org",
2746
- "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
2747
- "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
3012
+ "Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
3013
+ "Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
3014
+ "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
3015
+ "Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
3016
+ "Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec specs/agent-with-context.yaml --target-org my-org",
3017
+ "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
2748
3018
  ],
2749
3019
  "flags": {
2750
3020
  "json": {
@@ -2779,96 +3049,118 @@
2779
3049
  "multiple": false,
2780
3050
  "type": "option"
2781
3051
  },
3052
+ "spec": {
3053
+ "char": "s",
3054
+ "name": "spec",
3055
+ "required": true,
3056
+ "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
3057
+ "hasDynamicHelp": false,
3058
+ "multiple": false,
3059
+ "type": "option"
3060
+ },
2782
3061
  "api-name": {
2783
3062
  "char": "n",
2784
3063
  "name": "api-name",
2785
- "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
3064
+ "summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
2786
3065
  "hasDynamicHelp": false,
2787
3066
  "multiple": false,
2788
3067
  "type": "option"
2789
3068
  },
2790
- "skip-retrieve": {
2791
- "name": "skip-retrieve",
2792
- "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
2793
- "allowNo": false,
2794
- "type": "boolean"
2795
- },
2796
- "verbose": {
2797
- "char": "v",
2798
- "exclusive": [
2799
- "concise"
3069
+ "result-format": {
3070
+ "name": "result-format",
3071
+ "summary": "Format of the agent test run results.",
3072
+ "default": "human",
3073
+ "hasDynamicHelp": false,
3074
+ "multiple": false,
3075
+ "options": [
3076
+ "json",
3077
+ "human",
3078
+ "junit",
3079
+ "tap"
2800
3080
  ],
2801
- "name": "verbose",
2802
- "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
2803
- "allowNo": false,
2804
- "type": "boolean"
3081
+ "type": "option"
2805
3082
  },
2806
- "concise": {
2807
- "exclusive": [
2808
- "verbose"
2809
- ],
2810
- "name": "concise",
2811
- "summary": "Display minimal output with only essential information about the publish operation.",
3083
+ "batch-size": {
3084
+ "name": "batch-size",
3085
+ "summary": "Number of tests per API request (max 5).",
3086
+ "default": 5,
3087
+ "hasDynamicHelp": false,
3088
+ "multiple": false,
3089
+ "type": "option"
3090
+ },
3091
+ "no-normalize": {
3092
+ "name": "no-normalize",
3093
+ "summary": "Disable auto-normalization of field names and shorthand references.",
2812
3094
  "allowNo": false,
2813
3095
  "type": "boolean"
2814
3096
  }
2815
3097
  },
2816
3098
  "hasDynamicHelp": true,
2817
3099
  "hiddenAliases": [],
2818
- "id": "agent:publish:authoring-bundle",
3100
+ "id": "agent:test:run-eval",
2819
3101
  "pluginAlias": "@salesforce/plugin-agent",
2820
3102
  "pluginName": "@salesforce/plugin-agent",
2821
3103
  "pluginType": "core",
3104
+ "state": "beta",
2822
3105
  "strict": true,
2823
- "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
3106
+ "summary": "Run rich evaluation tests against an Agentforce agent.",
2824
3107
  "enableJsonFlag": true,
2825
- "requiresProject": true,
3108
+ "envVariablesSection": {
3109
+ "header": "ENVIRONMENT VARIABLES",
3110
+ "body": [
3111
+ {
3112
+ "name": "SF_TARGET_ORG",
3113
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3114
+ }
3115
+ ]
3116
+ },
2826
3117
  "errorCodes": {
2827
3118
  "header": "ERROR CODES",
2828
3119
  "body": [
2829
3120
  {
2830
3121
  "name": "Succeeded (0)",
2831
- "description": "Agent published successfully without errors."
3122
+ "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
2832
3123
  },
2833
3124
  {
2834
3125
  "name": "Failed (1)",
2835
- "description": "Compilation errors found in the Agent Script file."
3126
+ "description": "Tests encountered execution errors (tests couldn't run properly)."
3127
+ },
3128
+ {
3129
+ "name": "NotFound (2)",
3130
+ "description": "Agent not found, spec file not found, or invalid agent name."
3131
+ },
3132
+ {
3133
+ "name": "OperationFailed (4)",
3134
+ "description": "Failed to execute tests due to API or network errors."
2836
3135
  }
2837
3136
  ]
2838
3137
  },
2839
- "FLAGGABLE_PROMPTS": {
2840
- "api-name": {
2841
- "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
2842
- "promptMessage": "API name of the authoring bundle to publish"
2843
- }
2844
- },
2845
3138
  "isESM": true,
2846
3139
  "relativePath": [
2847
3140
  "lib",
2848
3141
  "commands",
2849
3142
  "agent",
2850
- "publish",
2851
- "authoring-bundle.js"
3143
+ "test",
3144
+ "run-eval.js"
2852
3145
  ],
2853
3146
  "aliasPermutations": [],
2854
3147
  "permutations": [
2855
- "agent:publish:authoring-bundle",
2856
- "publish:agent:authoring-bundle",
2857
- "publish:authoring-bundle:agent",
2858
- "agent:authoring-bundle:publish",
2859
- "authoring-bundle:agent:publish",
2860
- "authoring-bundle:publish:agent"
3148
+ "agent:test:run-eval",
3149
+ "test:agent:run-eval",
3150
+ "test:run-eval:agent",
3151
+ "agent:run-eval:test",
3152
+ "run-eval:agent:test",
3153
+ "run-eval:test:agent"
2861
3154
  ]
2862
3155
  },
2863
- "agent:test:create": {
3156
+ "agent:test:run": {
2864
3157
  "aliases": [],
2865
3158
  "args": {},
2866
- "description": "To run this command, you must have an agent test spec file, which is a YAML file that lists the test cases for testing a specific agent. Use the \"agent generate test-spec\" CLI command to generate a test spec file. Then specify the file to this command with the --spec flag, or run this command with no flags to be prompted.\n\nWhen this command completes, your org contains the new agent test, which you can view and edit using the Testing Center UI (legacy) or Agentforce Studio (NGT). This command also retrieves the metadata component associated with the new test to your local Salesforce DX project and displays its filename. By default, the legacy AiEvaluationDefinition is created; use --test-runner agentforce-studio to author an AiTestingDefinition (NGT) instead.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
3159
+ "description": "Use the --api-name flag to specify the name of the agent test you want to run. Use the output of the \"agent test list\" command to get the names of all the available agent tests in your org.\n\nBy default, this command starts the agent test in your org, but it doesn't wait for the test to finish. Instead, it displays the \"agent test resume\" command, with a job ID, that you execute to see the results of the test run, and then returns control of the terminal window to you. Use the --wait flag to specify the number of minutes for the command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, run \"agent test resume\".\n\nBy default, this command outputs test results in human-readable tables for each test case, if the test completes in time. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
2867
3160
  "examples": [
2868
- "Create an agent test interactively and be prompted for the test spec and API name of the test in the org; use the default org:\n<%= config.bin %> <%= command.id %>",
2869
- "Create an agent test and use flags to specify all required information; if a test with same API name already exists in the org, overwrite it without confirmation. Use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --force-overwrite --target-org my-org",
2870
- "Preview what the agent test metadata (AiEvaluationDefinition) looks like without deploying it to your default org:\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview",
2871
- "Author an Agentforce Studio (NGT) test from an NGT-shaped YAML; writes an AiTestingDefinition metadata file:\n<%= config.bin %> <%= command.id %> --spec specs/ReturnsCheckout.ngt.yaml --api-name Returns_Checkout --test-runner agentforce-studio --target-org my-org"
3161
+ "Start an agent test called Resort_Manager_Test for an agent in your default org, don't wait for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test",
3162
+ "Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --target-org my-org",
3163
+ "Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json"
2872
3164
  ],
2873
3165
  "flags": {
2874
3166
  "json": {
@@ -2886,20 +3178,6 @@
2886
3178
  "multiple": false,
2887
3179
  "type": "option"
2888
3180
  },
2889
- "api-name": {
2890
- "name": "api-name",
2891
- "summary": "API name of the new test; the API name must not exist in the org.",
2892
- "hasDynamicHelp": false,
2893
- "multiple": false,
2894
- "type": "option"
2895
- },
2896
- "spec": {
2897
- "name": "spec",
2898
- "summary": "Path to the test spec YAML file.",
2899
- "hasDynamicHelp": false,
2900
- "multiple": false,
2901
- "type": "option"
2902
- },
2903
3181
  "target-org": {
2904
3182
  "char": "o",
2905
3183
  "name": "target-org",
@@ -2917,17 +3195,44 @@
2917
3195
  "multiple": false,
2918
3196
  "type": "option"
2919
3197
  },
2920
- "preview": {
2921
- "name": "preview",
2922
- "summary": "Preview the test metadata file without deploying to your org.",
2923
- "allowNo": false,
2924
- "type": "boolean"
3198
+ "api-name": {
3199
+ "char": "n",
3200
+ "name": "api-name",
3201
+ "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
3202
+ "hasDynamicHelp": false,
3203
+ "multiple": false,
3204
+ "type": "option"
2925
3205
  },
2926
- "force-overwrite": {
2927
- "name": "force-overwrite",
2928
- "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
2929
- "allowNo": false,
2930
- "type": "boolean"
3206
+ "wait": {
3207
+ "char": "w",
3208
+ "name": "wait",
3209
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
3210
+ "hasDynamicHelp": true,
3211
+ "multiple": false,
3212
+ "type": "option"
3213
+ },
3214
+ "result-format": {
3215
+ "name": "result-format",
3216
+ "summary": "Format of the agent test run results.",
3217
+ "default": "human",
3218
+ "hasDynamicHelp": false,
3219
+ "multiple": false,
3220
+ "options": [
3221
+ "json",
3222
+ "human",
3223
+ "junit",
3224
+ "tap"
3225
+ ],
3226
+ "type": "option"
3227
+ },
3228
+ "output-dir": {
3229
+ "char": "d",
3230
+ "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
3231
+ "name": "output-dir",
3232
+ "summary": "Directory to write the agent test results into.",
3233
+ "hasDynamicHelp": false,
3234
+ "multiple": false,
3235
+ "type": "option"
2931
3236
  },
2932
3237
  "test-runner": {
2933
3238
  "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.",
@@ -2940,16 +3245,23 @@
2940
3245
  "testing-center"
2941
3246
  ],
2942
3247
  "type": "option"
3248
+ },
3249
+ "verbose": {
3250
+ "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
3251
+ "name": "verbose",
3252
+ "summary": "Show generated data in the test results output.",
3253
+ "allowNo": false,
3254
+ "type": "boolean"
2943
3255
  }
2944
3256
  },
2945
3257
  "hasDynamicHelp": true,
2946
3258
  "hiddenAliases": [],
2947
- "id": "agent:test:create",
3259
+ "id": "agent:test:run",
2948
3260
  "pluginAlias": "@salesforce/plugin-agent",
2949
3261
  "pluginName": "@salesforce/plugin-agent",
2950
3262
  "pluginType": "core",
2951
3263
  "strict": true,
2952
- "summary": "Create an agent test in your org using a local test spec YAML file.",
3264
+ "summary": "Start an agent test in your org.",
2953
3265
  "enableJsonFlag": true,
2954
3266
  "envVariablesSection": {
2955
3267
  "header": "ENVIRONMENT VARIABLES",
@@ -2965,19 +3277,19 @@
2965
3277
  "body": [
2966
3278
  {
2967
3279
  "name": "Succeeded (0)",
2968
- "description": "Test created and deployed successfully."
3280
+ "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
2969
3281
  },
2970
3282
  {
2971
3283
  "name": "Failed (1)",
2972
- "description": "Test validation errors or metadata format issues."
3284
+ "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
2973
3285
  },
2974
3286
  {
2975
3287
  "name": "NotFound (2)",
2976
- "description": "Test spec file not found or org connection failed."
3288
+ "description": "Test definition not found or invalid test name."
2977
3289
  },
2978
3290
  {
2979
- "name": "DeploymentFailed (4)",
2980
- "description": "Deployment failed due to API or network errors."
3291
+ "name": "OperationFailed (4)",
3292
+ "description": "Failed to start or poll test due to API or network errors."
2981
3293
  }
2982
3294
  ]
2983
3295
  },
@@ -2987,25 +3299,26 @@
2987
3299
  "commands",
2988
3300
  "agent",
2989
3301
  "test",
2990
- "create.js"
3302
+ "run.js"
2991
3303
  ],
2992
3304
  "aliasPermutations": [],
2993
3305
  "permutations": [
2994
- "agent:test:create",
2995
- "test:agent:create",
2996
- "test:create:agent",
2997
- "agent:create:test",
2998
- "create:agent:test",
2999
- "create:test:agent"
3306
+ "agent:test:run",
3307
+ "test:agent:run",
3308
+ "test:run:agent",
3309
+ "agent:run:test",
3310
+ "run:agent:test",
3311
+ "run:test:agent"
3000
3312
  ]
3001
3313
  },
3002
- "agent:test:list": {
3314
+ "agent:adl:create": {
3003
3315
  "aliases": [],
3004
3316
  "args": {},
3005
- "description": "The command outputs a table with the name (API name) of each test along with its unique ID, type ('agentforce-studio' or 'testing-center'), and the date it was created in the org.",
3317
+ "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.",
3006
3318
  "examples": [
3007
- "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
3008
- "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
3319
+ "Create an SFDRIVE library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"My Docs\" --developer-name My_Docs --source-type sfdrive",
3320
+ "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",
3321
+ "Create a RETRIEVER library:\n<%= config.bin %> <%= command.id %> --target-org myOrg --name \"Existing Retriever\" --developer-name Existing_Retriever --source-type retriever --retriever-id 0ppXX0000000001"
3009
3322
  ],
3010
3323
  "flags": {
3011
3324
  "json": {
@@ -3039,65 +3352,139 @@
3039
3352
  "hasDynamicHelp": false,
3040
3353
  "multiple": false,
3041
3354
  "type": "option"
3355
+ },
3356
+ "name": {
3357
+ "char": "n",
3358
+ "name": "name",
3359
+ "required": true,
3360
+ "summary": "Display name for the data library (max 80 characters).",
3361
+ "hasDynamicHelp": false,
3362
+ "multiple": false,
3363
+ "type": "option"
3364
+ },
3365
+ "developer-name": {
3366
+ "name": "developer-name",
3367
+ "required": true,
3368
+ "summary": "API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).",
3369
+ "hasDynamicHelp": false,
3370
+ "multiple": false,
3371
+ "type": "option"
3372
+ },
3373
+ "source-type": {
3374
+ "name": "source-type",
3375
+ "required": true,
3376
+ "summary": "Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).",
3377
+ "hasDynamicHelp": false,
3378
+ "multiple": false,
3379
+ "options": [
3380
+ "sfdrive",
3381
+ "knowledge",
3382
+ "retriever"
3383
+ ],
3384
+ "type": "option"
3385
+ },
3386
+ "description": {
3387
+ "name": "description",
3388
+ "summary": "Description of the data library (max 255 characters).",
3389
+ "hasDynamicHelp": false,
3390
+ "multiple": false,
3391
+ "type": "option"
3392
+ },
3393
+ "index-mode": {
3394
+ "name": "index-mode",
3395
+ "summary": "Index mode for SFDRIVE libraries: basic or enhanced.",
3396
+ "hasDynamicHelp": false,
3397
+ "multiple": false,
3398
+ "options": [
3399
+ "basic",
3400
+ "enhanced"
3401
+ ],
3402
+ "type": "option"
3403
+ },
3404
+ "retriever-id": {
3405
+ "name": "retriever-id",
3406
+ "summary": "ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).",
3407
+ "hasDynamicHelp": false,
3408
+ "multiple": false,
3409
+ "type": "option"
3410
+ },
3411
+ "primary-index-field1": {
3412
+ "name": "primary-index-field1",
3413
+ "summary": "Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).",
3414
+ "hasDynamicHelp": false,
3415
+ "multiple": false,
3416
+ "type": "option"
3417
+ },
3418
+ "primary-index-field2": {
3419
+ "name": "primary-index-field2",
3420
+ "summary": "Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).",
3421
+ "hasDynamicHelp": false,
3422
+ "multiple": false,
3423
+ "type": "option"
3424
+ },
3425
+ "content-fields": {
3426
+ "name": "content-fields",
3427
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).",
3428
+ "hasDynamicHelp": false,
3429
+ "multiple": false,
3430
+ "type": "option"
3431
+ },
3432
+ "data-category-ids": {
3433
+ "name": "data-category-ids",
3434
+ "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).",
3435
+ "hasDynamicHelp": false,
3436
+ "multiple": false,
3437
+ "type": "option"
3438
+ },
3439
+ "data-category-names": {
3440
+ "name": "data-category-names",
3441
+ "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).",
3442
+ "hasDynamicHelp": false,
3443
+ "multiple": false,
3444
+ "type": "option"
3445
+ },
3446
+ "wait": {
3447
+ "char": "w",
3448
+ "name": "wait",
3449
+ "summary": "Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries require upload before indexing; RETRIEVER libraries are ready immediately.",
3450
+ "hasDynamicHelp": true,
3451
+ "multiple": false,
3452
+ "type": "option"
3042
3453
  }
3043
3454
  },
3044
3455
  "hasDynamicHelp": true,
3045
3456
  "hiddenAliases": [],
3046
- "id": "agent:test:list",
3457
+ "id": "agent:adl:create",
3047
3458
  "pluginAlias": "@salesforce/plugin-agent",
3048
3459
  "pluginName": "@salesforce/plugin-agent",
3049
3460
  "pluginType": "core",
3050
3461
  "strict": true,
3051
- "summary": "List the available agent tests in your org.",
3462
+ "summary": "Create an Agentforce Data Library.",
3052
3463
  "enableJsonFlag": true,
3053
- "envVariablesSection": {
3054
- "header": "ENVIRONMENT VARIABLES",
3055
- "body": [
3056
- {
3057
- "name": "SF_TARGET_ORG",
3058
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3059
- }
3060
- ]
3061
- },
3062
- "errorCodes": {
3063
- "header": "ERROR CODES",
3064
- "body": [
3065
- {
3066
- "name": "Succeeded (0)",
3067
- "description": "Agent tests listed successfully."
3068
- },
3069
- {
3070
- "name": "Failed (4)",
3071
- "description": "Failed to retrieve agent tests due to API or network errors."
3072
- }
3073
- ]
3074
- },
3075
3464
  "isESM": true,
3076
3465
  "relativePath": [
3077
3466
  "lib",
3078
3467
  "commands",
3079
3468
  "agent",
3080
- "test",
3081
- "list.js"
3469
+ "adl",
3470
+ "create.js"
3082
3471
  ],
3083
3472
  "aliasPermutations": [],
3084
3473
  "permutations": [
3085
- "agent:test:list",
3086
- "test:agent:list",
3087
- "test:list:agent",
3088
- "agent:list:test",
3089
- "list:agent:test",
3090
- "list:test:agent"
3474
+ "agent:adl:create",
3475
+ "adl:agent:create",
3476
+ "adl:create:agent",
3477
+ "agent:create:adl",
3478
+ "create:agent:adl",
3479
+ "create:adl:agent"
3091
3480
  ]
3092
3481
  },
3093
- "agent:test:results": {
3482
+ "agent:adl:delete": {
3094
3483
  "aliases": [],
3095
3484
  "args": {},
3096
- "description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
3485
+ "description": "Permanently deletes a data library and all associated files and indexing data.",
3097
3486
  "examples": [
3098
- "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
3099
- "Get the results of the most recently run agent test in an org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-org",
3100
- "Get the results of the most recently run agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
3487
+ "Delete a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
3101
3488
  ],
3102
3489
  "flags": {
3103
3490
  "json": {
@@ -3132,119 +3519,49 @@
3132
3519
  "multiple": false,
3133
3520
  "type": "option"
3134
3521
  },
3135
- "job-id": {
3522
+ "library-id": {
3136
3523
  "char": "i",
3137
- "name": "job-id",
3524
+ "name": "library-id",
3138
3525
  "required": true,
3139
- "summary": "Job ID of the completed agent test run.",
3140
- "hasDynamicHelp": false,
3141
- "multiple": false,
3142
- "type": "option"
3143
- },
3144
- "result-format": {
3145
- "name": "result-format",
3146
- "summary": "Format of the agent test run results.",
3147
- "default": "human",
3148
- "hasDynamicHelp": false,
3149
- "multiple": false,
3150
- "options": [
3151
- "json",
3152
- "human",
3153
- "junit",
3154
- "tap"
3155
- ],
3156
- "type": "option"
3157
- },
3158
- "output-dir": {
3159
- "char": "d",
3160
- "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
3161
- "name": "output-dir",
3162
- "summary": "Directory to write the agent test results into.",
3163
- "hasDynamicHelp": false,
3164
- "multiple": false,
3165
- "type": "option"
3166
- },
3167
- "test-runner": {
3168
- "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.",
3169
- "name": "test-runner",
3170
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
3526
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3171
3527
  "hasDynamicHelp": false,
3172
3528
  "multiple": false,
3173
- "options": [
3174
- "agentforce-studio",
3175
- "testing-center"
3176
- ],
3177
3529
  "type": "option"
3178
- },
3179
- "verbose": {
3180
- "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
3181
- "name": "verbose",
3182
- "summary": "Show generated data in the test results output.",
3183
- "allowNo": false,
3184
- "type": "boolean"
3185
3530
  }
3186
3531
  },
3187
3532
  "hasDynamicHelp": true,
3188
3533
  "hiddenAliases": [],
3189
- "id": "agent:test:results",
3534
+ "id": "agent:adl:delete",
3190
3535
  "pluginAlias": "@salesforce/plugin-agent",
3191
3536
  "pluginName": "@salesforce/plugin-agent",
3192
3537
  "pluginType": "core",
3193
3538
  "strict": true,
3194
- "summary": "Get the results of a completed agent test run.",
3539
+ "summary": "Delete an Agentforce Data Library.",
3195
3540
  "enableJsonFlag": true,
3196
- "envVariablesSection": {
3197
- "header": "ENVIRONMENT VARIABLES",
3198
- "body": [
3199
- {
3200
- "name": "SF_TARGET_ORG",
3201
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3202
- }
3203
- ]
3204
- },
3205
- "errorCodes": {
3206
- "header": "ERROR CODES",
3207
- "body": [
3208
- {
3209
- "name": "Succeeded (0)",
3210
- "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
3211
- },
3212
- {
3213
- "name": "NotFound (2)",
3214
- "description": "Job ID not found or invalid."
3215
- },
3216
- {
3217
- "name": "Failed (4)",
3218
- "description": "Failed to retrieve results due to API or network errors."
3219
- }
3220
- ]
3221
- },
3222
3541
  "isESM": true,
3223
3542
  "relativePath": [
3224
3543
  "lib",
3225
3544
  "commands",
3226
3545
  "agent",
3227
- "test",
3228
- "results.js"
3546
+ "adl",
3547
+ "delete.js"
3229
3548
  ],
3230
3549
  "aliasPermutations": [],
3231
3550
  "permutations": [
3232
- "agent:test:results",
3233
- "test:agent:results",
3234
- "test:results:agent",
3235
- "agent:results:test",
3236
- "results:agent:test",
3237
- "results:test:agent"
3551
+ "agent:adl:delete",
3552
+ "adl:agent:delete",
3553
+ "adl:delete:agent",
3554
+ "agent:delete:adl",
3555
+ "delete:agent:adl",
3556
+ "delete:adl:agent"
3238
3557
  ]
3239
3558
  },
3240
- "agent:test:resume": {
3559
+ "agent:adl:get": {
3241
3560
  "aliases": [],
3242
3561
  "args": {},
3243
- "description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nUse the --wait flag to specify the number of minutes for this command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, the CLI returns control of the terminal to you, and you must run \"agent test resume\" again.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
3562
+ "description": "Returns the full detail of a data library including its grounding source configuration, status, and retriever ID.",
3244
3563
  "examples": [
3245
- "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
3246
- "Resume the most recently-run agent test in an org with alias \"my-org\" org; wait 10 minutes for the tests to finish:\n<%= config.bin %> <%= command.id %> --use-most-recent --wait 10 --target-org my-org",
3247
- "Resume the most recent agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
3564
+ "Get details of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
3248
3565
  ],
3249
3566
  "flags": {
3250
3567
  "json": {
@@ -3279,141 +3596,130 @@
3279
3596
  "multiple": false,
3280
3597
  "type": "option"
3281
3598
  },
3282
- "job-id": {
3599
+ "library-id": {
3283
3600
  "char": "i",
3284
- "name": "job-id",
3285
- "summary": "Job ID of the original agent test run.",
3601
+ "name": "library-id",
3602
+ "required": true,
3603
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3286
3604
  "hasDynamicHelp": false,
3287
3605
  "multiple": false,
3288
3606
  "type": "option"
3289
- },
3290
- "use-most-recent": {
3291
- "char": "r",
3292
- "name": "use-most-recent",
3293
- "summary": "Use the job ID of the most recent agent test run.",
3607
+ }
3608
+ },
3609
+ "hasDynamicHelp": true,
3610
+ "hiddenAliases": [],
3611
+ "id": "agent:adl:get",
3612
+ "pluginAlias": "@salesforce/plugin-agent",
3613
+ "pluginName": "@salesforce/plugin-agent",
3614
+ "pluginType": "core",
3615
+ "strict": true,
3616
+ "summary": "Get details of an Agentforce Data Library.",
3617
+ "enableJsonFlag": true,
3618
+ "isESM": true,
3619
+ "relativePath": [
3620
+ "lib",
3621
+ "commands",
3622
+ "agent",
3623
+ "adl",
3624
+ "get.js"
3625
+ ],
3626
+ "aliasPermutations": [],
3627
+ "permutations": [
3628
+ "agent:adl:get",
3629
+ "adl:agent:get",
3630
+ "adl:get:agent",
3631
+ "agent:get:adl",
3632
+ "get:agent:adl",
3633
+ "get:adl:agent"
3634
+ ]
3635
+ },
3636
+ "agent:adl:list": {
3637
+ "aliases": [],
3638
+ "args": {},
3639
+ "description": "Returns all data libraries in the target org, including their source type, status, and library ID.",
3640
+ "examples": [
3641
+ "List all data libraries in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
3642
+ "List data libraries and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --json"
3643
+ ],
3644
+ "flags": {
3645
+ "json": {
3646
+ "description": "Format output as json.",
3647
+ "helpGroup": "GLOBAL",
3648
+ "name": "json",
3294
3649
  "allowNo": false,
3295
3650
  "type": "boolean"
3296
3651
  },
3297
- "wait": {
3298
- "char": "w",
3299
- "name": "wait",
3300
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
3301
- "default": "5 minutes",
3302
- "hasDynamicHelp": true,
3652
+ "flags-dir": {
3653
+ "helpGroup": "GLOBAL",
3654
+ "name": "flags-dir",
3655
+ "summary": "Import flag values from a directory.",
3656
+ "hasDynamicHelp": false,
3303
3657
  "multiple": false,
3304
3658
  "type": "option"
3305
3659
  },
3306
- "result-format": {
3307
- "name": "result-format",
3308
- "summary": "Format of the agent test run results.",
3309
- "default": "human",
3310
- "hasDynamicHelp": false,
3660
+ "target-org": {
3661
+ "char": "o",
3662
+ "name": "target-org",
3663
+ "noCacheDefault": true,
3664
+ "required": true,
3665
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3666
+ "hasDynamicHelp": true,
3311
3667
  "multiple": false,
3312
- "options": [
3313
- "json",
3314
- "human",
3315
- "junit",
3316
- "tap"
3317
- ],
3318
3668
  "type": "option"
3319
3669
  },
3320
- "output-dir": {
3321
- "char": "d",
3322
- "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
3323
- "name": "output-dir",
3324
- "summary": "Directory to write the agent test results into.",
3670
+ "api-version": {
3671
+ "description": "Override the api version used for api requests made by this command",
3672
+ "name": "api-version",
3325
3673
  "hasDynamicHelp": false,
3326
3674
  "multiple": false,
3327
3675
  "type": "option"
3328
3676
  },
3329
- "test-runner": {
3330
- "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.",
3331
- "name": "test-runner",
3332
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
3677
+ "source-type": {
3678
+ "name": "source-type",
3679
+ "summary": "Filter by source type: sfdrive, knowledge, or retriever.",
3333
3680
  "hasDynamicHelp": false,
3334
3681
  "multiple": false,
3335
3682
  "options": [
3336
- "agentforce-studio",
3337
- "testing-center"
3683
+ "sfdrive",
3684
+ "knowledge",
3685
+ "retriever"
3338
3686
  ],
3339
3687
  "type": "option"
3340
- },
3341
- "verbose": {
3342
- "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
3343
- "name": "verbose",
3344
- "summary": "Show generated data in the test results output.",
3345
- "allowNo": false,
3346
- "type": "boolean"
3347
3688
  }
3348
3689
  },
3349
3690
  "hasDynamicHelp": true,
3350
3691
  "hiddenAliases": [],
3351
- "id": "agent:test:resume",
3692
+ "id": "agent:adl:list",
3352
3693
  "pluginAlias": "@salesforce/plugin-agent",
3353
3694
  "pluginName": "@salesforce/plugin-agent",
3354
3695
  "pluginType": "core",
3355
3696
  "strict": true,
3356
- "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
3697
+ "summary": "List Agentforce Data Libraries in an org.",
3357
3698
  "enableJsonFlag": true,
3358
- "envVariablesSection": {
3359
- "header": "ENVIRONMENT VARIABLES",
3360
- "body": [
3361
- {
3362
- "name": "SF_TARGET_ORG",
3363
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3364
- }
3365
- ]
3366
- },
3367
- "errorCodes": {
3368
- "header": "ERROR CODES",
3369
- "body": [
3370
- {
3371
- "name": "Succeeded (0)",
3372
- "description": "Test completed successfully (with test results in the output)."
3373
- },
3374
- {
3375
- "name": "Failed (1)",
3376
- "description": "Tests encountered execution errors (test cases with ERROR status)."
3377
- },
3378
- {
3379
- "name": "NotFound (2)",
3380
- "description": "Job ID not found or invalid."
3381
- },
3382
- {
3383
- "name": "OperationFailed (4)",
3384
- "description": "Failed to poll test due to API or network errors."
3385
- }
3386
- ]
3387
- },
3388
3699
  "isESM": true,
3389
3700
  "relativePath": [
3390
3701
  "lib",
3391
3702
  "commands",
3392
3703
  "agent",
3393
- "test",
3394
- "resume.js"
3704
+ "adl",
3705
+ "list.js"
3395
3706
  ],
3396
3707
  "aliasPermutations": [],
3397
3708
  "permutations": [
3398
- "agent:test:resume",
3399
- "test:agent:resume",
3400
- "test:resume:agent",
3401
- "agent:resume:test",
3402
- "resume:agent:test",
3403
- "resume:test:agent"
3709
+ "agent:adl:list",
3710
+ "adl:agent:list",
3711
+ "adl:list:agent",
3712
+ "agent:list:adl",
3713
+ "list:agent:adl",
3714
+ "list:adl:agent"
3404
3715
  ]
3405
3716
  },
3406
- "agent:test:run-eval": {
3717
+ "agent:adl:status": {
3407
3718
  "aliases": [],
3408
3719
  "args": {},
3409
- "description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.\n\nWhen you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
3720
+ "description": "Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT, SEARCH_INDEX, RETRIEVER) and any errors.",
3410
3721
  "examples": [
3411
- "Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
3412
- "Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
3413
- "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
3414
- "Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
3415
- "Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec specs/agent-with-context.yaml --target-org my-org",
3416
- "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
3722
+ "Get status of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --target-org myOrg"
3417
3723
  ],
3418
3724
  "flags": {
3419
3725
  "json": {
@@ -3448,118 +3754,58 @@
3448
3754
  "multiple": false,
3449
3755
  "type": "option"
3450
3756
  },
3451
- "spec": {
3452
- "char": "s",
3453
- "name": "spec",
3757
+ "library-id": {
3758
+ "char": "i",
3759
+ "name": "library-id",
3454
3760
  "required": true,
3455
- "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
3456
- "hasDynamicHelp": false,
3457
- "multiple": false,
3458
- "type": "option"
3459
- },
3460
- "api-name": {
3461
- "char": "n",
3462
- "name": "api-name",
3463
- "summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
3464
- "hasDynamicHelp": false,
3465
- "multiple": false,
3466
- "type": "option"
3467
- },
3468
- "result-format": {
3469
- "name": "result-format",
3470
- "summary": "Format of the agent test run results.",
3471
- "default": "human",
3472
- "hasDynamicHelp": false,
3473
- "multiple": false,
3474
- "options": [
3475
- "json",
3476
- "human",
3477
- "junit",
3478
- "tap"
3479
- ],
3480
- "type": "option"
3481
- },
3482
- "batch-size": {
3483
- "name": "batch-size",
3484
- "summary": "Number of tests per API request (max 5).",
3485
- "default": 5,
3761
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3486
3762
  "hasDynamicHelp": false,
3487
3763
  "multiple": false,
3488
3764
  "type": "option"
3489
3765
  },
3490
- "no-normalize": {
3491
- "name": "no-normalize",
3492
- "summary": "Disable auto-normalization of field names and shorthand references.",
3766
+ "include-artifacts": {
3767
+ "name": "include-artifacts",
3768
+ "summary": "Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs and names on each stage. Slower — requires additional queries.",
3493
3769
  "allowNo": false,
3494
3770
  "type": "boolean"
3495
3771
  }
3496
3772
  },
3497
3773
  "hasDynamicHelp": true,
3498
3774
  "hiddenAliases": [],
3499
- "id": "agent:test:run-eval",
3775
+ "id": "agent:adl:status",
3500
3776
  "pluginAlias": "@salesforce/plugin-agent",
3501
3777
  "pluginName": "@salesforce/plugin-agent",
3502
3778
  "pluginType": "core",
3503
- "state": "beta",
3504
3779
  "strict": true,
3505
- "summary": "Run rich evaluation tests against an Agentforce agent.",
3506
- "enableJsonFlag": true,
3507
- "envVariablesSection": {
3508
- "header": "ENVIRONMENT VARIABLES",
3509
- "body": [
3510
- {
3511
- "name": "SF_TARGET_ORG",
3512
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3513
- }
3514
- ]
3515
- },
3516
- "errorCodes": {
3517
- "header": "ERROR CODES",
3518
- "body": [
3519
- {
3520
- "name": "Succeeded (0)",
3521
- "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
3522
- },
3523
- {
3524
- "name": "Failed (1)",
3525
- "description": "Tests encountered execution errors (tests couldn't run properly)."
3526
- },
3527
- {
3528
- "name": "NotFound (2)",
3529
- "description": "Agent not found, spec file not found, or invalid agent name."
3530
- },
3531
- {
3532
- "name": "OperationFailed (4)",
3533
- "description": "Failed to execute tests due to API or network errors."
3534
- }
3535
- ]
3536
- },
3780
+ "summary": "Get indexing status of an Agentforce Data Library.",
3781
+ "enableJsonFlag": true,
3537
3782
  "isESM": true,
3538
3783
  "relativePath": [
3539
3784
  "lib",
3540
3785
  "commands",
3541
3786
  "agent",
3542
- "test",
3543
- "run-eval.js"
3787
+ "adl",
3788
+ "status.js"
3544
3789
  ],
3545
3790
  "aliasPermutations": [],
3546
3791
  "permutations": [
3547
- "agent:test:run-eval",
3548
- "test:agent:run-eval",
3549
- "test:run-eval:agent",
3550
- "agent:run-eval:test",
3551
- "run-eval:agent:test",
3552
- "run-eval:test:agent"
3792
+ "agent:adl:status",
3793
+ "adl:agent:status",
3794
+ "adl:status:agent",
3795
+ "agent:status:adl",
3796
+ "status:agent:adl",
3797
+ "status:adl:agent"
3553
3798
  ]
3554
3799
  },
3555
- "agent:test:run": {
3800
+ "agent:adl:update": {
3556
3801
  "aliases": [],
3557
3802
  "args": {},
3558
- "description": "Use the --api-name flag to specify the name of the agent test you want to run. Use the output of the \"agent test list\" command to get the names of all the available agent tests in your org.\n\nBy default, this command starts the agent test in your org, but it doesn't wait for the test to finish. Instead, it displays the \"agent test resume\" command, with a job ID, that you execute to see the results of the test run, and then returns control of the terminal window to you. Use the --wait flag to specify the number of minutes for the command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, run \"agent test resume\".\n\nBy default, this command outputs test results in human-readable tables for each test case, if the test completes in time. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
3803
+ "description": "Updates the label, description, or other mutable properties of an existing data library.",
3559
3804
  "examples": [
3560
- "Start an agent test called Resort_Manager_Test for an agent in your default org, don't wait for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test",
3561
- "Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --target-org my-org",
3562
- "Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json"
3805
+ "Update the label of a data library:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --name \"New Name\" --target-org myOrg",
3806
+ "Update the description:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --description \"Updated description\" --target-org myOrg",
3807
+ "Update Knowledge library content fields (triggers re-indexing):\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --content-fields \"Answer**c,Summary**c\" --target-org myOrg",
3808
+ "Restrict Knowledge library to public articles:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg"
3563
3809
  ],
3564
3810
  "flags": {
3565
3811
  "json": {
@@ -3594,133 +3840,91 @@
3594
3840
  "multiple": false,
3595
3841
  "type": "option"
3596
3842
  },
3597
- "api-name": {
3598
- "char": "n",
3599
- "name": "api-name",
3600
- "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
3843
+ "library-id": {
3844
+ "char": "i",
3845
+ "name": "library-id",
3846
+ "required": true,
3847
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3601
3848
  "hasDynamicHelp": false,
3602
3849
  "multiple": false,
3603
3850
  "type": "option"
3604
3851
  },
3605
- "wait": {
3606
- "char": "w",
3607
- "name": "wait",
3608
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
3609
- "hasDynamicHelp": true,
3852
+ "name": {
3853
+ "char": "n",
3854
+ "name": "name",
3855
+ "summary": "New display name for the data library (max 80 characters).",
3856
+ "hasDynamicHelp": false,
3610
3857
  "multiple": false,
3611
3858
  "type": "option"
3612
3859
  },
3613
- "result-format": {
3614
- "name": "result-format",
3615
- "summary": "Format of the agent test run results.",
3616
- "default": "human",
3860
+ "description": {
3861
+ "name": "description",
3862
+ "summary": "New description for the data library (max 255 characters).",
3617
3863
  "hasDynamicHelp": false,
3618
3864
  "multiple": false,
3619
- "options": [
3620
- "json",
3621
- "human",
3622
- "junit",
3623
- "tap"
3624
- ],
3625
3865
  "type": "option"
3626
3866
  },
3627
- "output-dir": {
3628
- "char": "d",
3629
- "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
3630
- "name": "output-dir",
3631
- "summary": "Directory to write the agent test results into.",
3867
+ "content-fields": {
3868
+ "name": "content-fields",
3869
+ "summary": "Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).",
3632
3870
  "hasDynamicHelp": false,
3633
3871
  "multiple": false,
3634
3872
  "type": "option"
3635
3873
  },
3636
- "test-runner": {
3637
- "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.",
3638
- "name": "test-runner",
3639
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
3874
+ "restrict-to-public-articles": {
3875
+ "name": "restrict-to-public-articles",
3876
+ "summary": "Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).",
3877
+ "allowNo": true,
3878
+ "type": "boolean"
3879
+ },
3880
+ "data-category-rule": {
3881
+ "name": "data-category-rule",
3882
+ "summary": "Enable or disable data category filtering for KNOWLEDGE libraries. Use --no-data-category-rule to disable.",
3883
+ "allowNo": true,
3884
+ "type": "boolean"
3885
+ },
3886
+ "retriever-id": {
3887
+ "name": "retriever-id",
3888
+ "summary": "Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).",
3640
3889
  "hasDynamicHelp": false,
3641
3890
  "multiple": false,
3642
- "options": [
3643
- "agentforce-studio",
3644
- "testing-center"
3645
- ],
3646
3891
  "type": "option"
3647
- },
3648
- "verbose": {
3649
- "description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
3650
- "name": "verbose",
3651
- "summary": "Show generated data in the test results output.",
3652
- "allowNo": false,
3653
- "type": "boolean"
3654
3892
  }
3655
3893
  },
3656
3894
  "hasDynamicHelp": true,
3657
3895
  "hiddenAliases": [],
3658
- "id": "agent:test:run",
3896
+ "id": "agent:adl:update",
3659
3897
  "pluginAlias": "@salesforce/plugin-agent",
3660
3898
  "pluginName": "@salesforce/plugin-agent",
3661
3899
  "pluginType": "core",
3662
3900
  "strict": true,
3663
- "summary": "Start an agent test in your org.",
3901
+ "summary": "Update an Agentforce Data Library.",
3664
3902
  "enableJsonFlag": true,
3665
- "envVariablesSection": {
3666
- "header": "ENVIRONMENT VARIABLES",
3667
- "body": [
3668
- {
3669
- "name": "SF_TARGET_ORG",
3670
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
3671
- }
3672
- ]
3673
- },
3674
- "errorCodes": {
3675
- "header": "ERROR CODES",
3676
- "body": [
3677
- {
3678
- "name": "Succeeded (0)",
3679
- "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
3680
- },
3681
- {
3682
- "name": "Failed (1)",
3683
- "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
3684
- },
3685
- {
3686
- "name": "NotFound (2)",
3687
- "description": "Test definition not found or invalid test name."
3688
- },
3689
- {
3690
- "name": "OperationFailed (4)",
3691
- "description": "Failed to start or poll test due to API or network errors."
3692
- }
3693
- ]
3694
- },
3695
3903
  "isESM": true,
3696
3904
  "relativePath": [
3697
3905
  "lib",
3698
3906
  "commands",
3699
3907
  "agent",
3700
- "test",
3701
- "run.js"
3908
+ "adl",
3909
+ "update.js"
3702
3910
  ],
3703
3911
  "aliasPermutations": [],
3704
3912
  "permutations": [
3705
- "agent:test:run",
3706
- "test:agent:run",
3707
- "test:run:agent",
3708
- "agent:run:test",
3709
- "run:agent:test",
3710
- "run:test:agent"
3913
+ "agent:adl:update",
3914
+ "adl:agent:update",
3915
+ "adl:update:agent",
3916
+ "agent:update:adl",
3917
+ "update:agent:adl",
3918
+ "update:adl:agent"
3711
3919
  ]
3712
3920
  },
3713
- "agent:trace:delete": {
3921
+ "agent:adl:upload": {
3714
3922
  "aliases": [],
3715
3923
  "args": {},
3716
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\nBy default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.\n\nWithout filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than).",
3924
+ "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.",
3717
3925
  "examples": [
3718
- "Delete all traces for all agents and sessions; prompt for confirmation:\n<%= config.bin %> <%= command.id %>",
3719
- "Delete all traces for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
3720
- "Delete traces from a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
3721
- "Delete traces older than 7 days:\n<%= config.bin %> <%= command.id %> --older-than 7d",
3722
- "Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt",
3723
- "Delete all traces for all agents and sessions; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --no-prompt"
3926
+ "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",
3927
+ "Upload a file without waiting:\n<%= config.bin %> <%= command.id %> --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg"
3724
3928
  ],
3725
3929
  "flags": {
3726
3930
  "json": {
@@ -3738,84 +3942,84 @@
3738
3942
  "multiple": false,
3739
3943
  "type": "option"
3740
3944
  },
3741
- "agent": {
3742
- "char": "a",
3743
- "name": "agent",
3744
- "summary": "API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
3745
- "hasDynamicHelp": false,
3945
+ "target-org": {
3946
+ "char": "o",
3947
+ "name": "target-org",
3948
+ "noCacheDefault": true,
3949
+ "required": true,
3950
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
3951
+ "hasDynamicHelp": true,
3746
3952
  "multiple": false,
3747
3953
  "type": "option"
3748
3954
  },
3749
- "session-id": {
3750
- "name": "session-id",
3751
- "summary": "Session ID used to filter the list of trace files you want to delete. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
3955
+ "api-version": {
3956
+ "description": "Override the api version used for api requests made by this command",
3957
+ "name": "api-version",
3752
3958
  "hasDynamicHelp": false,
3753
3959
  "multiple": false,
3754
3960
  "type": "option"
3755
3961
  },
3756
- "older-than": {
3757
- "name": "older-than",
3758
- "summary": "Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w.",
3962
+ "library-id": {
3963
+ "char": "i",
3964
+ "name": "library-id",
3965
+ "required": true,
3966
+ "summary": "Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).",
3759
3967
  "hasDynamicHelp": false,
3760
3968
  "multiple": false,
3761
3969
  "type": "option"
3762
3970
  },
3763
- "no-prompt": {
3764
- "name": "no-prompt",
3765
- "summary": "Skip the confirmation prompt and delete immediately.",
3766
- "allowNo": false,
3767
- "type": "boolean"
3971
+ "file": {
3972
+ "char": "f",
3973
+ "name": "file",
3974
+ "required": true,
3975
+ "summary": "Path to the file to upload.",
3976
+ "hasDynamicHelp": false,
3977
+ "multiple": true,
3978
+ "type": "option"
3979
+ },
3980
+ "wait": {
3981
+ "char": "w",
3982
+ "name": "wait",
3983
+ "summary": "Number of minutes to wait for indexing to complete. If not specified, returns after triggering indexing.",
3984
+ "hasDynamicHelp": true,
3985
+ "multiple": false,
3986
+ "type": "option"
3768
3987
  }
3769
3988
  },
3770
- "hasDynamicHelp": false,
3989
+ "hasDynamicHelp": true,
3771
3990
  "hiddenAliases": [],
3772
- "id": "agent:trace:delete",
3991
+ "id": "agent:adl:upload",
3773
3992
  "pluginAlias": "@salesforce/plugin-agent",
3774
3993
  "pluginName": "@salesforce/plugin-agent",
3775
3994
  "pluginType": "core",
3776
3995
  "strict": true,
3777
- "summary": "Delete trace files from an agent preview session.",
3996
+ "summary": "Upload a file to an SFDRIVE Agentforce Data Library.",
3778
3997
  "enableJsonFlag": true,
3779
- "requiresProject": true,
3780
- "errorCodes": {
3781
- "header": "ERROR CODES",
3782
- "body": [
3783
- {
3784
- "name": "Succeeded (0)",
3785
- "description": "Traces deleted successfully (or no traces matched)."
3786
- }
3787
- ]
3788
- },
3789
3998
  "isESM": true,
3790
3999
  "relativePath": [
3791
4000
  "lib",
3792
4001
  "commands",
3793
4002
  "agent",
3794
- "trace",
3795
- "delete.js"
4003
+ "adl",
4004
+ "upload.js"
3796
4005
  ],
3797
4006
  "aliasPermutations": [],
3798
4007
  "permutations": [
3799
- "agent:trace:delete",
3800
- "trace:agent:delete",
3801
- "trace:delete:agent",
3802
- "agent:delete:trace",
3803
- "delete:agent:trace",
3804
- "delete:trace:agent"
4008
+ "agent:adl:upload",
4009
+ "adl:agent:upload",
4010
+ "adl:upload:agent",
4011
+ "agent:upload:adl",
4012
+ "upload:agent:adl",
4013
+ "upload:adl:agent"
3805
4014
  ]
3806
4015
  },
3807
- "agent:trace:list": {
4016
+ "agent:validate:authoring-bundle": {
3808
4017
  "aliases": [],
3809
4018
  "args": {},
3810
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since).\n\nEach row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.",
4019
+ "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.",
3811
4020
  "examples": [
3812
- "List all trace files for all agents and sessions:\n<%= config.bin %> <%= command.id %>",
3813
- "List all trace files for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
3814
- "List trace files for a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
3815
- "List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n<%= config.bin %> <%= command.id %> --since 2026-04-20",
3816
- "List trace files recorded on or after a specific UTC time:\n<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z",
3817
- "Filter by agent and date together:\n<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20",
3818
- "Return results as JSON:\n<%= config.bin %> <%= command.id %> --json"
4021
+ "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
4022
+ "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"
3819
4023
  ],
3820
4024
  "flags": {
3821
4025
  "json": {
@@ -3833,79 +4037,103 @@
3833
4037
  "multiple": false,
3834
4038
  "type": "option"
3835
4039
  },
3836
- "session-id": {
3837
- "name": "session-id",
3838
- "summary": "Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
3839
- "hasDynamicHelp": false,
4040
+ "target-org": {
4041
+ "char": "o",
4042
+ "name": "target-org",
4043
+ "noCacheDefault": true,
4044
+ "required": true,
4045
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4046
+ "hasDynamicHelp": true,
3840
4047
  "multiple": false,
3841
4048
  "type": "option"
3842
4049
  },
3843
- "agent": {
3844
- "char": "a",
3845
- "name": "agent",
3846
- "summary": "API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
4050
+ "api-version": {
4051
+ "description": "Override the api version used for api requests made by this command",
4052
+ "name": "api-version",
3847
4053
  "hasDynamicHelp": false,
3848
4054
  "multiple": false,
3849
4055
  "type": "option"
3850
4056
  },
3851
- "since": {
3852
- "description": "Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds (2026-04-20T14:00:00.000Z). The \"Recorded At\" values shown in the table output are valid inputs.",
3853
- "name": "since",
3854
- "summary": "Date used to filter the list of trace files; only those recorded on or after the date are listed.",
4057
+ "api-name": {
4058
+ "char": "n",
4059
+ "name": "api-name",
4060
+ "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
3855
4061
  "hasDynamicHelp": false,
3856
4062
  "multiple": false,
3857
4063
  "type": "option"
3858
4064
  }
3859
4065
  },
3860
- "hasDynamicHelp": false,
4066
+ "hasDynamicHelp": true,
3861
4067
  "hiddenAliases": [],
3862
- "id": "agent:trace:list",
4068
+ "id": "agent:validate:authoring-bundle",
3863
4069
  "pluginAlias": "@salesforce/plugin-agent",
3864
4070
  "pluginName": "@salesforce/plugin-agent",
3865
4071
  "pluginType": "core",
3866
4072
  "strict": true,
3867
- "summary": "List the available trace files that were recorded during all agent preview sessions.",
4073
+ "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
3868
4074
  "enableJsonFlag": true,
3869
4075
  "requiresProject": true,
4076
+ "envVariablesSection": {
4077
+ "header": "ENVIRONMENT VARIABLES",
4078
+ "body": [
4079
+ {
4080
+ "name": "SF_TARGET_ORG",
4081
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
4082
+ }
4083
+ ]
4084
+ },
3870
4085
  "errorCodes": {
3871
4086
  "header": "ERROR CODES",
3872
4087
  "body": [
3873
4088
  {
3874
4089
  "name": "Succeeded (0)",
3875
- "description": "Trace files listed successfully (or empty list if none found)."
4090
+ "description": "Agent Script file compiled successfully without errors."
4091
+ },
4092
+ {
4093
+ "name": "Failed (1)",
4094
+ "description": "Compilation errors found in the Agent Script file."
4095
+ },
4096
+ {
4097
+ "name": "NotFound (2)",
4098
+ "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
4099
+ },
4100
+ {
4101
+ "name": "ServerError (3)",
4102
+ "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
3876
4103
  }
3877
4104
  ]
3878
4105
  },
4106
+ "FLAGGABLE_PROMPTS": {
4107
+ "api-name": {
4108
+ "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
4109
+ "promptMessage": "API name of the authoring bundle to validate"
4110
+ }
4111
+ },
3879
4112
  "isESM": true,
3880
4113
  "relativePath": [
3881
4114
  "lib",
3882
4115
  "commands",
3883
4116
  "agent",
3884
- "trace",
3885
- "list.js"
4117
+ "validate",
4118
+ "authoring-bundle.js"
3886
4119
  ],
3887
4120
  "aliasPermutations": [],
3888
4121
  "permutations": [
3889
- "agent:trace:list",
3890
- "trace:agent:list",
3891
- "trace:list:agent",
3892
- "agent:list:trace",
3893
- "list:agent:trace",
3894
- "list:trace:agent"
4122
+ "agent:validate:authoring-bundle",
4123
+ "validate:agent:authoring-bundle",
4124
+ "validate:authoring-bundle:agent",
4125
+ "agent:authoring-bundle:validate",
4126
+ "authoring-bundle:agent:validate",
4127
+ "authoring-bundle:validate:agent"
3895
4128
  ]
3896
4129
  },
3897
- "agent:trace:read": {
4130
+ "agent:mcp:asset:list": {
3898
4131
  "aliases": [],
3899
4132
  "args": {},
3900
- "description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior.\n\nUse the --format flag to specify one of these formats of the outputted trace data:\n\n- summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a preview session.\n- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise.\n- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.\n\nIf you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide:\n\n- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session.\n- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem - the AI reasoning that determined which actions to take.\n- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation.\n- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps.",
4133
+ "description": "Returns the assets discovered for the specified MCP server, including each asset's kind (MCP_TOOL, MCP_PROMPT, or MCP_RESOURCE), whether it is active, and whether it is available as an agent action.",
3901
4134
  "examples": [
3902
- "Show a session trace summary for all turns in the session with the specified ID:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
3903
- "Show a trace summary for the second turn (utterance or response) of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2",
3904
- "Drill into action execution across all turns:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions",
3905
- "Drill into routing decisions for the first turn of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1",
3906
- "Show all errors across the session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors",
3907
- "Output raw trace JSON for custom parsing:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw",
3908
- "Return results as JSON:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json"
4135
+ "List the assets for an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001",
4136
+ "List the assets for an MCP server and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001 --json"
3909
4137
  ],
3910
4138
  "flags": {
3911
4139
  "json": {
@@ -3923,87 +4151,88 @@
3923
4151
  "multiple": false,
3924
4152
  "type": "option"
3925
4153
  },
3926
- "session-id": {
3927
- "char": "s",
3928
- "name": "session-id",
4154
+ "target-org": {
4155
+ "char": "o",
4156
+ "name": "target-org",
4157
+ "noCacheDefault": true,
3929
4158
  "required": true,
3930
- "summary": "Session ID to read traces for. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs",
3931
- "hasDynamicHelp": false,
3932
- "multiple": false,
3933
- "type": "option"
3934
- },
3935
- "format": {
3936
- "char": "f",
3937
- "name": "format",
3938
- "summary": "Output format of the trace data; specifies the level of detail you want in the trace files.",
3939
- "default": "summary",
3940
- "hasDynamicHelp": false,
4159
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4160
+ "hasDynamicHelp": true,
3941
4161
  "multiple": false,
3942
- "options": [
3943
- "summary",
3944
- "detail",
3945
- "raw"
3946
- ],
3947
4162
  "type": "option"
3948
4163
  },
3949
- "dimension": {
3950
- "char": "d",
3951
- "name": "dimension",
3952
- "summary": "Dimension to drill into when using \"--format detail\"; used to filter and organize the trace data to answer a specific type of question.",
4164
+ "api-version": {
4165
+ "description": "Override the api version used for api requests made by this command",
4166
+ "name": "api-version",
3953
4167
  "hasDynamicHelp": false,
3954
4168
  "multiple": false,
3955
- "options": [
3956
- "actions",
3957
- "grounding",
3958
- "routing",
3959
- "errors"
3960
- ],
3961
4169
  "type": "option"
3962
4170
  },
3963
- "turn": {
3964
- "char": "t",
3965
- "name": "turn",
3966
- "summary": "Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1.",
4171
+ "mcp-server-id": {
4172
+ "char": "i",
4173
+ "name": "mcp-server-id",
4174
+ "required": true,
4175
+ "summary": "The ID of the MCP server whose assets you want to list.",
3967
4176
  "hasDynamicHelp": false,
3968
4177
  "multiple": false,
3969
4178
  "type": "option"
3970
4179
  }
3971
4180
  },
3972
- "hasDynamicHelp": false,
4181
+ "hasDynamicHelp": true,
3973
4182
  "hiddenAliases": [],
3974
- "id": "agent:trace:read",
4183
+ "id": "agent:mcp:asset:list",
3975
4184
  "pluginAlias": "@salesforce/plugin-agent",
3976
4185
  "pluginName": "@salesforce/plugin-agent",
3977
4186
  "pluginType": "core",
4187
+ "state": "preview",
3978
4188
  "strict": true,
3979
- "summary": "Read trace files from an agent preview session.",
4189
+ "summary": "List the assets (tools, prompts, and resources) for an MCP server in the catalog.",
3980
4190
  "enableJsonFlag": true,
3981
- "requiresProject": true,
3982
4191
  "isESM": true,
3983
4192
  "relativePath": [
3984
4193
  "lib",
3985
4194
  "commands",
3986
4195
  "agent",
3987
- "trace",
3988
- "read.js"
4196
+ "mcp",
4197
+ "asset",
4198
+ "list.js"
3989
4199
  ],
3990
4200
  "aliasPermutations": [],
3991
4201
  "permutations": [
3992
- "agent:trace:read",
3993
- "trace:agent:read",
3994
- "trace:read:agent",
3995
- "agent:read:trace",
3996
- "read:agent:trace",
3997
- "read:trace:agent"
4202
+ "agent:mcp:asset:list",
4203
+ "mcp:agent:asset:list",
4204
+ "mcp:asset:agent:list",
4205
+ "mcp:asset:list:agent",
4206
+ "agent:asset:mcp:list",
4207
+ "asset:agent:mcp:list",
4208
+ "asset:mcp:agent:list",
4209
+ "asset:mcp:list:agent",
4210
+ "agent:asset:list:mcp",
4211
+ "asset:agent:list:mcp",
4212
+ "asset:list:agent:mcp",
4213
+ "asset:list:mcp:agent",
4214
+ "agent:mcp:list:asset",
4215
+ "mcp:agent:list:asset",
4216
+ "mcp:list:agent:asset",
4217
+ "mcp:list:asset:agent",
4218
+ "agent:list:mcp:asset",
4219
+ "list:agent:mcp:asset",
4220
+ "list:mcp:agent:asset",
4221
+ "list:mcp:asset:agent",
4222
+ "agent:list:asset:mcp",
4223
+ "list:agent:asset:mcp",
4224
+ "list:asset:agent:mcp",
4225
+ "list:asset:mcp:agent"
3998
4226
  ]
3999
4227
  },
4000
- "agent:validate:authoring-bundle": {
4228
+ "agent:mcp:asset:replace": {
4001
4229
  "aliases": [],
4002
4230
  "args": {},
4003
- "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.",
4231
+ "description": "Replaces the full set of assets (tools, prompts, resources) for an MCP server with the asset items you supply. Provide the assets either inline with `--assets` (a JSON string, or `-` to read from stdin) or from a file with `--assets-file`. The JSON must be either an array of asset items or an object of the form `{ \"assets\": [...] }`. Each asset item may include `id`, `name`, `label`, `description`, `active`, and `kind`. This is a full replacement: existing assets not present in the supplied set are removed, so provide the complete desired asset set (read the current set first with `agent mcp asset list` or `agent mcp fetch`).",
4004
4232
  "examples": [
4005
- "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
4006
- "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"
4233
+ "Replace the assets inline with a JSON string:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets '{\"assets\":[{\"name\":\"McpTool__add\",\"active\":true}]}' --target-org myOrg",
4234
+ "Replace the assets from a JSON file:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets-file ./assets.json --target-org myOrg",
4235
+ "Pipe the assets from stdin:\ncat assets.json | <%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg"
4007
4236
  ],
4008
4237
  "flags": {
4009
4238
  "json": {
@@ -4038,10 +4267,31 @@
4038
4267
  "multiple": false,
4039
4268
  "type": "option"
4040
4269
  },
4041
- "api-name": {
4042
- "char": "n",
4043
- "name": "api-name",
4044
- "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
4270
+ "mcp-server-id": {
4271
+ "char": "i",
4272
+ "name": "mcp-server-id",
4273
+ "required": true,
4274
+ "summary": "ID of the MCP server whose assets you want to replace.",
4275
+ "hasDynamicHelp": false,
4276
+ "multiple": false,
4277
+ "type": "option"
4278
+ },
4279
+ "assets": {
4280
+ "exclusive": [
4281
+ "assets-file"
4282
+ ],
4283
+ "name": "assets",
4284
+ "summary": "The desired asset allowlist as a JSON string (or \"-\" to read from stdin). Mutually exclusive with --assets-file.",
4285
+ "hasDynamicHelp": false,
4286
+ "multiple": false,
4287
+ "type": "option"
4288
+ },
4289
+ "assets-file": {
4290
+ "exclusive": [
4291
+ "assets"
4292
+ ],
4293
+ "name": "assets-file",
4294
+ "summary": "Path to a JSON file containing the desired asset allowlist. Mutually exclusive with --assets.",
4045
4295
  "hasDynamicHelp": false,
4046
4296
  "multiple": false,
4047
4297
  "type": "option"
@@ -4049,66 +4299,49 @@
4049
4299
  },
4050
4300
  "hasDynamicHelp": true,
4051
4301
  "hiddenAliases": [],
4052
- "id": "agent:validate:authoring-bundle",
4302
+ "id": "agent:mcp:asset:replace",
4053
4303
  "pluginAlias": "@salesforce/plugin-agent",
4054
4304
  "pluginName": "@salesforce/plugin-agent",
4055
4305
  "pluginType": "core",
4056
- "strict": true,
4057
- "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
4058
- "enableJsonFlag": true,
4059
- "requiresProject": true,
4060
- "envVariablesSection": {
4061
- "header": "ENVIRONMENT VARIABLES",
4062
- "body": [
4063
- {
4064
- "name": "SF_TARGET_ORG",
4065
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
4066
- }
4067
- ]
4068
- },
4069
- "errorCodes": {
4070
- "header": "ERROR CODES",
4071
- "body": [
4072
- {
4073
- "name": "Succeeded (0)",
4074
- "description": "Agent Script file compiled successfully without errors."
4075
- },
4076
- {
4077
- "name": "Failed (1)",
4078
- "description": "Compilation errors found in the Agent Script file."
4079
- },
4080
- {
4081
- "name": "NotFound (2)",
4082
- "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
4083
- },
4084
- {
4085
- "name": "ServerError (3)",
4086
- "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
4087
- }
4088
- ]
4089
- },
4090
- "FLAGGABLE_PROMPTS": {
4091
- "api-name": {
4092
- "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
4093
- "promptMessage": "API name of the authoring bundle to validate"
4094
- }
4095
- },
4306
+ "state": "preview",
4307
+ "strict": true,
4308
+ "summary": "Replace the asset set of an MCP server in the API Catalog.",
4309
+ "enableJsonFlag": true,
4096
4310
  "isESM": true,
4097
4311
  "relativePath": [
4098
4312
  "lib",
4099
4313
  "commands",
4100
4314
  "agent",
4101
- "validate",
4102
- "authoring-bundle.js"
4315
+ "mcp",
4316
+ "asset",
4317
+ "replace.js"
4103
4318
  ],
4104
4319
  "aliasPermutations": [],
4105
4320
  "permutations": [
4106
- "agent:validate:authoring-bundle",
4107
- "validate:agent:authoring-bundle",
4108
- "validate:authoring-bundle:agent",
4109
- "agent:authoring-bundle:validate",
4110
- "authoring-bundle:agent:validate",
4111
- "authoring-bundle:validate:agent"
4321
+ "agent:mcp:asset:replace",
4322
+ "mcp:agent:asset:replace",
4323
+ "mcp:asset:agent:replace",
4324
+ "mcp:asset:replace:agent",
4325
+ "agent:asset:mcp:replace",
4326
+ "asset:agent:mcp:replace",
4327
+ "asset:mcp:agent:replace",
4328
+ "asset:mcp:replace:agent",
4329
+ "agent:asset:replace:mcp",
4330
+ "asset:agent:replace:mcp",
4331
+ "asset:replace:agent:mcp",
4332
+ "asset:replace:mcp:agent",
4333
+ "agent:mcp:replace:asset",
4334
+ "mcp:agent:replace:asset",
4335
+ "mcp:replace:agent:asset",
4336
+ "mcp:replace:asset:agent",
4337
+ "agent:replace:mcp:asset",
4338
+ "replace:agent:mcp:asset",
4339
+ "replace:mcp:agent:asset",
4340
+ "replace:mcp:asset:agent",
4341
+ "agent:replace:asset:mcp",
4342
+ "replace:agent:asset:mcp",
4343
+ "replace:asset:agent:mcp",
4344
+ "replace:asset:mcp:agent"
4112
4345
  ]
4113
4346
  },
4114
4347
  "agent:adl:file:add": {
@@ -4448,224 +4681,7 @@
4448
4681
  "list:file:agent:adl",
4449
4682
  "list:file:adl:agent"
4450
4683
  ]
4451
- },
4452
- "agent:mcp:asset:list": {
4453
- "aliases": [],
4454
- "args": {},
4455
- "description": "Returns the assets discovered for the specified MCP server, including each asset's kind (MCP_TOOL, MCP_PROMPT, or MCP_RESOURCE), whether it is active, and whether it is available as an agent action.",
4456
- "examples": [
4457
- "List the assets for an MCP server in the default target org:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001",
4458
- "List the assets for an MCP server and output as JSON:\n<%= config.bin %> <%= command.id %> --target-org myOrg --mcp-server-id 0XSxx0000000001 --json"
4459
- ],
4460
- "flags": {
4461
- "json": {
4462
- "description": "Format output as json.",
4463
- "helpGroup": "GLOBAL",
4464
- "name": "json",
4465
- "allowNo": false,
4466
- "type": "boolean"
4467
- },
4468
- "flags-dir": {
4469
- "helpGroup": "GLOBAL",
4470
- "name": "flags-dir",
4471
- "summary": "Import flag values from a directory.",
4472
- "hasDynamicHelp": false,
4473
- "multiple": false,
4474
- "type": "option"
4475
- },
4476
- "target-org": {
4477
- "char": "o",
4478
- "name": "target-org",
4479
- "noCacheDefault": true,
4480
- "required": true,
4481
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4482
- "hasDynamicHelp": true,
4483
- "multiple": false,
4484
- "type": "option"
4485
- },
4486
- "api-version": {
4487
- "description": "Override the api version used for api requests made by this command",
4488
- "name": "api-version",
4489
- "hasDynamicHelp": false,
4490
- "multiple": false,
4491
- "type": "option"
4492
- },
4493
- "mcp-server-id": {
4494
- "char": "i",
4495
- "name": "mcp-server-id",
4496
- "required": true,
4497
- "summary": "The ID of the MCP server whose assets you want to list.",
4498
- "hasDynamicHelp": false,
4499
- "multiple": false,
4500
- "type": "option"
4501
- }
4502
- },
4503
- "hasDynamicHelp": true,
4504
- "hiddenAliases": [],
4505
- "id": "agent:mcp:asset:list",
4506
- "pluginAlias": "@salesforce/plugin-agent",
4507
- "pluginName": "@salesforce/plugin-agent",
4508
- "pluginType": "core",
4509
- "state": "preview",
4510
- "strict": true,
4511
- "summary": "List the assets (tools, prompts, and resources) for an MCP server in the catalog.",
4512
- "enableJsonFlag": true,
4513
- "isESM": true,
4514
- "relativePath": [
4515
- "lib",
4516
- "commands",
4517
- "agent",
4518
- "mcp",
4519
- "asset",
4520
- "list.js"
4521
- ],
4522
- "aliasPermutations": [],
4523
- "permutations": [
4524
- "agent:mcp:asset:list",
4525
- "mcp:agent:asset:list",
4526
- "mcp:asset:agent:list",
4527
- "mcp:asset:list:agent",
4528
- "agent:asset:mcp:list",
4529
- "asset:agent:mcp:list",
4530
- "asset:mcp:agent:list",
4531
- "asset:mcp:list:agent",
4532
- "agent:asset:list:mcp",
4533
- "asset:agent:list:mcp",
4534
- "asset:list:agent:mcp",
4535
- "asset:list:mcp:agent",
4536
- "agent:mcp:list:asset",
4537
- "mcp:agent:list:asset",
4538
- "mcp:list:agent:asset",
4539
- "mcp:list:asset:agent",
4540
- "agent:list:mcp:asset",
4541
- "list:agent:mcp:asset",
4542
- "list:mcp:agent:asset",
4543
- "list:mcp:asset:agent",
4544
- "agent:list:asset:mcp",
4545
- "list:agent:asset:mcp",
4546
- "list:asset:agent:mcp",
4547
- "list:asset:mcp:agent"
4548
- ]
4549
- },
4550
- "agent:mcp:asset:replace": {
4551
- "aliases": [],
4552
- "args": {},
4553
- "description": "Replaces the full set of assets (tools, prompts, resources) for an MCP server with the asset items you supply. Provide the assets either inline with `--assets` (a JSON string, or `-` to read from stdin) or from a file with `--assets-file`. The JSON must be either an array of asset items or an object of the form `{ \"assets\": [...] }`. Each asset item may include `id`, `name`, `label`, `description`, `active`, and `kind`. This is a full replacement: existing assets not present in the supplied set are removed, so provide the complete desired asset set (read the current set first with `agent mcp asset list` or `agent mcp fetch`).",
4554
- "examples": [
4555
- "Replace the assets inline with a JSON string:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets '{\"assets\":[{\"name\":\"McpTool__add\",\"active\":true}]}' --target-org myOrg",
4556
- "Replace the assets from a JSON file:\n<%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets-file ./assets.json --target-org myOrg",
4557
- "Pipe the assets from stdin:\ncat assets.json | <%= config.bin %> <%= command.id %> --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg"
4558
- ],
4559
- "flags": {
4560
- "json": {
4561
- "description": "Format output as json.",
4562
- "helpGroup": "GLOBAL",
4563
- "name": "json",
4564
- "allowNo": false,
4565
- "type": "boolean"
4566
- },
4567
- "flags-dir": {
4568
- "helpGroup": "GLOBAL",
4569
- "name": "flags-dir",
4570
- "summary": "Import flag values from a directory.",
4571
- "hasDynamicHelp": false,
4572
- "multiple": false,
4573
- "type": "option"
4574
- },
4575
- "target-org": {
4576
- "char": "o",
4577
- "name": "target-org",
4578
- "noCacheDefault": true,
4579
- "required": true,
4580
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4581
- "hasDynamicHelp": true,
4582
- "multiple": false,
4583
- "type": "option"
4584
- },
4585
- "api-version": {
4586
- "description": "Override the api version used for api requests made by this command",
4587
- "name": "api-version",
4588
- "hasDynamicHelp": false,
4589
- "multiple": false,
4590
- "type": "option"
4591
- },
4592
- "mcp-server-id": {
4593
- "char": "i",
4594
- "name": "mcp-server-id",
4595
- "required": true,
4596
- "summary": "ID of the MCP server whose assets you want to replace.",
4597
- "hasDynamicHelp": false,
4598
- "multiple": false,
4599
- "type": "option"
4600
- },
4601
- "assets": {
4602
- "exclusive": [
4603
- "assets-file"
4604
- ],
4605
- "name": "assets",
4606
- "summary": "The desired asset allowlist as a JSON string (or \"-\" to read from stdin). Mutually exclusive with --assets-file.",
4607
- "hasDynamicHelp": false,
4608
- "multiple": false,
4609
- "type": "option"
4610
- },
4611
- "assets-file": {
4612
- "exclusive": [
4613
- "assets"
4614
- ],
4615
- "name": "assets-file",
4616
- "summary": "Path to a JSON file containing the desired asset allowlist. Mutually exclusive with --assets.",
4617
- "hasDynamicHelp": false,
4618
- "multiple": false,
4619
- "type": "option"
4620
- }
4621
- },
4622
- "hasDynamicHelp": true,
4623
- "hiddenAliases": [],
4624
- "id": "agent:mcp:asset:replace",
4625
- "pluginAlias": "@salesforce/plugin-agent",
4626
- "pluginName": "@salesforce/plugin-agent",
4627
- "pluginType": "core",
4628
- "state": "preview",
4629
- "strict": true,
4630
- "summary": "Replace the asset set of an MCP server in the API Catalog.",
4631
- "enableJsonFlag": true,
4632
- "isESM": true,
4633
- "relativePath": [
4634
- "lib",
4635
- "commands",
4636
- "agent",
4637
- "mcp",
4638
- "asset",
4639
- "replace.js"
4640
- ],
4641
- "aliasPermutations": [],
4642
- "permutations": [
4643
- "agent:mcp:asset:replace",
4644
- "mcp:agent:asset:replace",
4645
- "mcp:asset:agent:replace",
4646
- "mcp:asset:replace:agent",
4647
- "agent:asset:mcp:replace",
4648
- "asset:agent:mcp:replace",
4649
- "asset:mcp:agent:replace",
4650
- "asset:mcp:replace:agent",
4651
- "agent:asset:replace:mcp",
4652
- "asset:agent:replace:mcp",
4653
- "asset:replace:agent:mcp",
4654
- "asset:replace:mcp:agent",
4655
- "agent:mcp:replace:asset",
4656
- "mcp:agent:replace:asset",
4657
- "mcp:replace:agent:asset",
4658
- "mcp:replace:asset:agent",
4659
- "agent:replace:mcp:asset",
4660
- "replace:agent:mcp:asset",
4661
- "replace:mcp:agent:asset",
4662
- "replace:mcp:asset:agent",
4663
- "agent:replace:asset:mcp",
4664
- "replace:agent:asset:mcp",
4665
- "replace:asset:agent:mcp",
4666
- "replace:asset:mcp:agent"
4667
- ]
4668
4684
  }
4669
4685
  },
4670
- "version": "2.1.1"
4686
+ "version": "2.2.2"
4671
4687
  }