@github/copilot-sdk 0.1.33-preview.3 → 0.1.33-preview.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -429,6 +429,283 @@ export interface SessionAgentDeselectParams {
429
429
  sessionId: string;
430
430
  }
431
431
  /** @experimental */
432
+ export interface SessionAgentReloadResult {
433
+ /**
434
+ * Reloaded custom agents
435
+ */
436
+ agents: {
437
+ /**
438
+ * Unique identifier of the custom agent
439
+ */
440
+ name: string;
441
+ /**
442
+ * Human-readable display name
443
+ */
444
+ displayName: string;
445
+ /**
446
+ * Description of the agent's purpose
447
+ */
448
+ description: string;
449
+ }[];
450
+ }
451
+ /** @experimental */
452
+ export interface SessionAgentReloadParams {
453
+ /**
454
+ * Target session identifier
455
+ */
456
+ sessionId: string;
457
+ }
458
+ /** @experimental */
459
+ export interface SessionSkillsListResult {
460
+ /**
461
+ * Available skills
462
+ */
463
+ skills: {
464
+ /**
465
+ * Unique identifier for the skill
466
+ */
467
+ name: string;
468
+ /**
469
+ * Description of what the skill does
470
+ */
471
+ description: string;
472
+ /**
473
+ * Source location type (e.g., project, personal, plugin)
474
+ */
475
+ source: string;
476
+ /**
477
+ * Whether the skill can be invoked by the user as a slash command
478
+ */
479
+ userInvocable: boolean;
480
+ /**
481
+ * Whether the skill is currently enabled
482
+ */
483
+ enabled: boolean;
484
+ /**
485
+ * Absolute path to the skill file
486
+ */
487
+ path?: string;
488
+ }[];
489
+ }
490
+ /** @experimental */
491
+ export interface SessionSkillsListParams {
492
+ /**
493
+ * Target session identifier
494
+ */
495
+ sessionId: string;
496
+ }
497
+ /** @experimental */
498
+ export interface SessionSkillsEnableResult {
499
+ }
500
+ /** @experimental */
501
+ export interface SessionSkillsEnableParams {
502
+ /**
503
+ * Target session identifier
504
+ */
505
+ sessionId: string;
506
+ /**
507
+ * Name of the skill to enable
508
+ */
509
+ name: string;
510
+ }
511
+ /** @experimental */
512
+ export interface SessionSkillsDisableResult {
513
+ }
514
+ /** @experimental */
515
+ export interface SessionSkillsDisableParams {
516
+ /**
517
+ * Target session identifier
518
+ */
519
+ sessionId: string;
520
+ /**
521
+ * Name of the skill to disable
522
+ */
523
+ name: string;
524
+ }
525
+ /** @experimental */
526
+ export interface SessionSkillsReloadResult {
527
+ }
528
+ /** @experimental */
529
+ export interface SessionSkillsReloadParams {
530
+ /**
531
+ * Target session identifier
532
+ */
533
+ sessionId: string;
534
+ }
535
+ /** @experimental */
536
+ export interface SessionMcpListResult {
537
+ /**
538
+ * Configured MCP servers
539
+ */
540
+ servers: {
541
+ /**
542
+ * Server name (config key)
543
+ */
544
+ name: string;
545
+ /**
546
+ * Connection status: connected, failed, pending, disabled, or not_configured
547
+ */
548
+ status: "connected" | "failed" | "pending" | "disabled" | "not_configured";
549
+ /**
550
+ * Configuration source: user, workspace, plugin, or builtin
551
+ */
552
+ source?: string;
553
+ /**
554
+ * Error message if the server failed to connect
555
+ */
556
+ error?: string;
557
+ }[];
558
+ }
559
+ /** @experimental */
560
+ export interface SessionMcpListParams {
561
+ /**
562
+ * Target session identifier
563
+ */
564
+ sessionId: string;
565
+ }
566
+ /** @experimental */
567
+ export interface SessionMcpEnableResult {
568
+ }
569
+ /** @experimental */
570
+ export interface SessionMcpEnableParams {
571
+ /**
572
+ * Target session identifier
573
+ */
574
+ sessionId: string;
575
+ /**
576
+ * Name of the MCP server to enable
577
+ */
578
+ serverName: string;
579
+ }
580
+ /** @experimental */
581
+ export interface SessionMcpDisableResult {
582
+ }
583
+ /** @experimental */
584
+ export interface SessionMcpDisableParams {
585
+ /**
586
+ * Target session identifier
587
+ */
588
+ sessionId: string;
589
+ /**
590
+ * Name of the MCP server to disable
591
+ */
592
+ serverName: string;
593
+ }
594
+ /** @experimental */
595
+ export interface SessionMcpReloadResult {
596
+ }
597
+ /** @experimental */
598
+ export interface SessionMcpReloadParams {
599
+ /**
600
+ * Target session identifier
601
+ */
602
+ sessionId: string;
603
+ }
604
+ /** @experimental */
605
+ export interface SessionPluginsListResult {
606
+ /**
607
+ * Installed plugins
608
+ */
609
+ plugins: {
610
+ /**
611
+ * Plugin name
612
+ */
613
+ name: string;
614
+ /**
615
+ * Marketplace the plugin came from
616
+ */
617
+ marketplace: string;
618
+ /**
619
+ * Installed version
620
+ */
621
+ version?: string;
622
+ /**
623
+ * Whether the plugin is currently enabled
624
+ */
625
+ enabled: boolean;
626
+ }[];
627
+ }
628
+ /** @experimental */
629
+ export interface SessionPluginsListParams {
630
+ /**
631
+ * Target session identifier
632
+ */
633
+ sessionId: string;
634
+ }
635
+ /** @experimental */
636
+ export interface SessionExtensionsListResult {
637
+ /**
638
+ * Discovered extensions and their current status
639
+ */
640
+ extensions: {
641
+ /**
642
+ * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
643
+ */
644
+ id: string;
645
+ /**
646
+ * Extension name (directory name)
647
+ */
648
+ name: string;
649
+ /**
650
+ * Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
651
+ */
652
+ source: "project" | "user";
653
+ /**
654
+ * Current status: running, disabled, failed, or starting
655
+ */
656
+ status: "running" | "disabled" | "failed" | "starting";
657
+ /**
658
+ * Process ID if the extension is running
659
+ */
660
+ pid?: number;
661
+ }[];
662
+ }
663
+ /** @experimental */
664
+ export interface SessionExtensionsListParams {
665
+ /**
666
+ * Target session identifier
667
+ */
668
+ sessionId: string;
669
+ }
670
+ /** @experimental */
671
+ export interface SessionExtensionsEnableResult {
672
+ }
673
+ /** @experimental */
674
+ export interface SessionExtensionsEnableParams {
675
+ /**
676
+ * Target session identifier
677
+ */
678
+ sessionId: string;
679
+ /**
680
+ * Source-qualified extension ID to enable
681
+ */
682
+ id: string;
683
+ }
684
+ /** @experimental */
685
+ export interface SessionExtensionsDisableResult {
686
+ }
687
+ /** @experimental */
688
+ export interface SessionExtensionsDisableParams {
689
+ /**
690
+ * Target session identifier
691
+ */
692
+ sessionId: string;
693
+ /**
694
+ * Source-qualified extension ID to disable
695
+ */
696
+ id: string;
697
+ }
698
+ /** @experimental */
699
+ export interface SessionExtensionsReloadResult {
700
+ }
701
+ /** @experimental */
702
+ export interface SessionExtensionsReloadParams {
703
+ /**
704
+ * Target session identifier
705
+ */
706
+ sessionId: string;
707
+ }
708
+ /** @experimental */
432
709
  export interface SessionCompactionCompactResult {
433
710
  /**
434
711
  * Whether compaction completed successfully
@@ -472,6 +749,124 @@ export interface SessionToolsHandlePendingToolCallParams {
472
749
  };
473
750
  error?: string;
474
751
  }
752
+ export interface SessionCommandsHandlePendingCommandResult {
753
+ success: boolean;
754
+ }
755
+ export interface SessionCommandsHandlePendingCommandParams {
756
+ /**
757
+ * Target session identifier
758
+ */
759
+ sessionId: string;
760
+ /**
761
+ * Request ID from the command invocation event
762
+ */
763
+ requestId: string;
764
+ /**
765
+ * Error message if the command handler failed
766
+ */
767
+ error?: string;
768
+ }
769
+ export interface SessionUiElicitationResult {
770
+ /**
771
+ * The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
772
+ */
773
+ action: "accept" | "decline" | "cancel";
774
+ /**
775
+ * The form values submitted by the user (present when action is 'accept')
776
+ */
777
+ content?: {
778
+ [k: string]: string | number | boolean | string[];
779
+ };
780
+ }
781
+ export interface SessionUiElicitationParams {
782
+ /**
783
+ * Target session identifier
784
+ */
785
+ sessionId: string;
786
+ /**
787
+ * Message describing what information is needed from the user
788
+ */
789
+ message: string;
790
+ /**
791
+ * JSON Schema describing the form fields to present to the user
792
+ */
793
+ requestedSchema: {
794
+ /**
795
+ * Schema type indicator (always 'object')
796
+ */
797
+ type: "object";
798
+ /**
799
+ * Form field definitions, keyed by field name
800
+ */
801
+ properties: {
802
+ [k: string]: {
803
+ type: "string";
804
+ title?: string;
805
+ description?: string;
806
+ enum: string[];
807
+ enumNames?: string[];
808
+ default?: string;
809
+ } | {
810
+ type: "string";
811
+ title?: string;
812
+ description?: string;
813
+ oneOf: {
814
+ const: string;
815
+ title: string;
816
+ }[];
817
+ default?: string;
818
+ } | {
819
+ type: "array";
820
+ title?: string;
821
+ description?: string;
822
+ minItems?: number;
823
+ maxItems?: number;
824
+ items: {
825
+ type: "string";
826
+ enum: string[];
827
+ };
828
+ default?: string[];
829
+ } | {
830
+ type: "array";
831
+ title?: string;
832
+ description?: string;
833
+ minItems?: number;
834
+ maxItems?: number;
835
+ items: {
836
+ anyOf: {
837
+ const: string;
838
+ title: string;
839
+ }[];
840
+ };
841
+ default?: string[];
842
+ } | {
843
+ type: "boolean";
844
+ title?: string;
845
+ description?: string;
846
+ default?: boolean;
847
+ } | {
848
+ type: "string";
849
+ title?: string;
850
+ description?: string;
851
+ minLength?: number;
852
+ maxLength?: number;
853
+ format?: "email" | "uri" | "date" | "date-time";
854
+ default?: string;
855
+ } | {
856
+ type: "number" | "integer";
857
+ title?: string;
858
+ description?: string;
859
+ minimum?: number;
860
+ maximum?: number;
861
+ default?: number;
862
+ };
863
+ };
864
+ /**
865
+ * List of required field names
866
+ */
867
+ required?: string[];
868
+ };
869
+ }
475
870
  export interface SessionPermissionsHandlePendingPermissionRequestResult {
476
871
  /**
477
872
  * Whether the permission request was handled successfully
@@ -523,6 +918,10 @@ export interface SessionLogParams {
523
918
  * When true, the message is transient and not persisted to the session event log on disk
524
919
  */
525
920
  ephemeral?: boolean;
921
+ /**
922
+ * Optional URL the user can open in their browser for more details
923
+ */
924
+ url?: string;
526
925
  }
527
926
  export interface SessionShellExecResult {
528
927
  /**
@@ -611,6 +1010,32 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
611
1010
  getCurrent: () => Promise<SessionAgentGetCurrentResult>;
612
1011
  select: (params: Omit<SessionAgentSelectParams, "sessionId">) => Promise<SessionAgentSelectResult>;
613
1012
  deselect: () => Promise<SessionAgentDeselectResult>;
1013
+ reload: () => Promise<SessionAgentReloadResult>;
1014
+ };
1015
+ /** @experimental */
1016
+ skills: {
1017
+ list: () => Promise<SessionSkillsListResult>;
1018
+ enable: (params: Omit<SessionSkillsEnableParams, "sessionId">) => Promise<SessionSkillsEnableResult>;
1019
+ disable: (params: Omit<SessionSkillsDisableParams, "sessionId">) => Promise<SessionSkillsDisableResult>;
1020
+ reload: () => Promise<SessionSkillsReloadResult>;
1021
+ };
1022
+ /** @experimental */
1023
+ mcp: {
1024
+ list: () => Promise<SessionMcpListResult>;
1025
+ enable: (params: Omit<SessionMcpEnableParams, "sessionId">) => Promise<SessionMcpEnableResult>;
1026
+ disable: (params: Omit<SessionMcpDisableParams, "sessionId">) => Promise<SessionMcpDisableResult>;
1027
+ reload: () => Promise<SessionMcpReloadResult>;
1028
+ };
1029
+ /** @experimental */
1030
+ plugins: {
1031
+ list: () => Promise<SessionPluginsListResult>;
1032
+ };
1033
+ /** @experimental */
1034
+ extensions: {
1035
+ list: () => Promise<SessionExtensionsListResult>;
1036
+ enable: (params: Omit<SessionExtensionsEnableParams, "sessionId">) => Promise<SessionExtensionsEnableResult>;
1037
+ disable: (params: Omit<SessionExtensionsDisableParams, "sessionId">) => Promise<SessionExtensionsDisableResult>;
1038
+ reload: () => Promise<SessionExtensionsReloadResult>;
614
1039
  };
615
1040
  /** @experimental */
616
1041
  compaction: {
@@ -619,6 +1044,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
619
1044
  tools: {
620
1045
  handlePendingToolCall: (params: Omit<SessionToolsHandlePendingToolCallParams, "sessionId">) => Promise<SessionToolsHandlePendingToolCallResult>;
621
1046
  };
1047
+ commands: {
1048
+ handlePendingCommand: (params: Omit<SessionCommandsHandlePendingCommandParams, "sessionId">) => Promise<SessionCommandsHandlePendingCommandResult>;
1049
+ };
1050
+ ui: {
1051
+ elicitation: (params: Omit<SessionUiElicitationParams, "sessionId">) => Promise<SessionUiElicitationResult>;
1052
+ };
622
1053
  permissions: {
623
1054
  handlePendingPermissionRequest: (params: Omit<SessionPermissionsHandlePendingPermissionRequestParams, "sessionId">) => Promise<SessionPermissionsHandlePendingPermissionRequestResult>;
624
1055
  };
@@ -41,7 +41,33 @@ function createSessionRpc(connection, sessionId) {
41
41
  list: async () => connection.sendRequest("session.agent.list", { sessionId }),
42
42
  getCurrent: async () => connection.sendRequest("session.agent.getCurrent", { sessionId }),
43
43
  select: async (params) => connection.sendRequest("session.agent.select", { sessionId, ...params }),
44
- deselect: async () => connection.sendRequest("session.agent.deselect", { sessionId })
44
+ deselect: async () => connection.sendRequest("session.agent.deselect", { sessionId }),
45
+ reload: async () => connection.sendRequest("session.agent.reload", { sessionId })
46
+ },
47
+ /** @experimental */
48
+ skills: {
49
+ list: async () => connection.sendRequest("session.skills.list", { sessionId }),
50
+ enable: async (params) => connection.sendRequest("session.skills.enable", { sessionId, ...params }),
51
+ disable: async (params) => connection.sendRequest("session.skills.disable", { sessionId, ...params }),
52
+ reload: async () => connection.sendRequest("session.skills.reload", { sessionId })
53
+ },
54
+ /** @experimental */
55
+ mcp: {
56
+ list: async () => connection.sendRequest("session.mcp.list", { sessionId }),
57
+ enable: async (params) => connection.sendRequest("session.mcp.enable", { sessionId, ...params }),
58
+ disable: async (params) => connection.sendRequest("session.mcp.disable", { sessionId, ...params }),
59
+ reload: async () => connection.sendRequest("session.mcp.reload", { sessionId })
60
+ },
61
+ /** @experimental */
62
+ plugins: {
63
+ list: async () => connection.sendRequest("session.plugins.list", { sessionId })
64
+ },
65
+ /** @experimental */
66
+ extensions: {
67
+ list: async () => connection.sendRequest("session.extensions.list", { sessionId }),
68
+ enable: async (params) => connection.sendRequest("session.extensions.enable", { sessionId, ...params }),
69
+ disable: async (params) => connection.sendRequest("session.extensions.disable", { sessionId, ...params }),
70
+ reload: async () => connection.sendRequest("session.extensions.reload", { sessionId })
45
71
  },
46
72
  /** @experimental */
47
73
  compaction: {
@@ -50,6 +76,12 @@ function createSessionRpc(connection, sessionId) {
50
76
  tools: {
51
77
  handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { sessionId, ...params })
52
78
  },
79
+ commands: {
80
+ handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { sessionId, ...params })
81
+ },
82
+ ui: {
83
+ elicitation: async (params) => connection.sendRequest("session.ui.elicitation", { sessionId, ...params })
84
+ },
53
85
  permissions: {
54
86
  handlePendingPermissionRequest: async (params) => connection.sendRequest("session.permissions.handlePendingPermissionRequest", { sessionId, ...params })
55
87
  },