@github/copilot-sdk 0.1.33-preview.2 → 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.
@@ -315,12 +315,14 @@ export interface SessionWorkspaceCreateFileParams {
315
315
  */
316
316
  content: string;
317
317
  }
318
+ /** @experimental */
318
319
  export interface SessionFleetStartResult {
319
320
  /**
320
321
  * Whether fleet mode was successfully activated
321
322
  */
322
323
  started: boolean;
323
324
  }
325
+ /** @experimental */
324
326
  export interface SessionFleetStartParams {
325
327
  /**
326
328
  * Target session identifier
@@ -331,6 +333,7 @@ export interface SessionFleetStartParams {
331
333
  */
332
334
  prompt?: string;
333
335
  }
336
+ /** @experimental */
334
337
  export interface SessionAgentListResult {
335
338
  /**
336
339
  * Available custom agents
@@ -350,12 +353,14 @@ export interface SessionAgentListResult {
350
353
  description: string;
351
354
  }[];
352
355
  }
356
+ /** @experimental */
353
357
  export interface SessionAgentListParams {
354
358
  /**
355
359
  * Target session identifier
356
360
  */
357
361
  sessionId: string;
358
362
  }
363
+ /** @experimental */
359
364
  export interface SessionAgentGetCurrentResult {
360
365
  /**
361
366
  * Currently selected custom agent, or null if using the default agent
@@ -375,12 +380,14 @@ export interface SessionAgentGetCurrentResult {
375
380
  description: string;
376
381
  } | null;
377
382
  }
383
+ /** @experimental */
378
384
  export interface SessionAgentGetCurrentParams {
379
385
  /**
380
386
  * Target session identifier
381
387
  */
382
388
  sessionId: string;
383
389
  }
390
+ /** @experimental */
384
391
  export interface SessionAgentSelectResult {
385
392
  /**
386
393
  * The newly selected custom agent
@@ -400,6 +407,7 @@ export interface SessionAgentSelectResult {
400
407
  description: string;
401
408
  };
402
409
  }
410
+ /** @experimental */
403
411
  export interface SessionAgentSelectParams {
404
412
  /**
405
413
  * Target session identifier
@@ -410,14 +418,294 @@ export interface SessionAgentSelectParams {
410
418
  */
411
419
  name: string;
412
420
  }
421
+ /** @experimental */
413
422
  export interface SessionAgentDeselectResult {
414
423
  }
424
+ /** @experimental */
415
425
  export interface SessionAgentDeselectParams {
416
426
  /**
417
427
  * Target session identifier
418
428
  */
419
429
  sessionId: string;
420
430
  }
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 */
421
709
  export interface SessionCompactionCompactResult {
422
710
  /**
423
711
  * Whether compaction completed successfully
@@ -432,6 +720,7 @@ export interface SessionCompactionCompactResult {
432
720
  */
433
721
  messagesRemoved: number;
434
722
  }
723
+ /** @experimental */
435
724
  export interface SessionCompactionCompactParams {
436
725
  /**
437
726
  * Target session identifier
@@ -460,6 +749,124 @@ export interface SessionToolsHandlePendingToolCallParams {
460
749
  };
461
750
  error?: string;
462
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
+ }
463
870
  export interface SessionPermissionsHandlePendingPermissionRequestResult {
464
871
  /**
465
872
  * Whether the permission request was handled successfully
@@ -511,6 +918,10 @@ export interface SessionLogParams {
511
918
  * When true, the message is transient and not persisted to the session event log on disk
512
919
  */
513
920
  ephemeral?: boolean;
921
+ /**
922
+ * Optional URL the user can open in their browser for more details
923
+ */
924
+ url?: string;
514
925
  }
515
926
  export interface SessionShellExecResult {
516
927
  /**
@@ -589,21 +1000,56 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
589
1000
  readFile: (params: Omit<SessionWorkspaceReadFileParams, "sessionId">) => Promise<SessionWorkspaceReadFileResult>;
590
1001
  createFile: (params: Omit<SessionWorkspaceCreateFileParams, "sessionId">) => Promise<SessionWorkspaceCreateFileResult>;
591
1002
  };
1003
+ /** @experimental */
592
1004
  fleet: {
593
1005
  start: (params: Omit<SessionFleetStartParams, "sessionId">) => Promise<SessionFleetStartResult>;
594
1006
  };
1007
+ /** @experimental */
595
1008
  agent: {
596
1009
  list: () => Promise<SessionAgentListResult>;
597
1010
  getCurrent: () => Promise<SessionAgentGetCurrentResult>;
598
1011
  select: (params: Omit<SessionAgentSelectParams, "sessionId">) => Promise<SessionAgentSelectResult>;
599
1012
  deselect: () => Promise<SessionAgentDeselectResult>;
1013
+ reload: () => Promise<SessionAgentReloadResult>;
600
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>;
1039
+ };
1040
+ /** @experimental */
601
1041
  compaction: {
602
1042
  compact: () => Promise<SessionCompactionCompactResult>;
603
1043
  };
604
1044
  tools: {
605
1045
  handlePendingToolCall: (params: Omit<SessionToolsHandlePendingToolCallParams, "sessionId">) => Promise<SessionToolsHandlePendingToolCallResult>;
606
1046
  };
1047
+ commands: {
1048
+ handlePendingCommand: (params: Omit<SessionCommandsHandlePendingCommandParams, "sessionId">) => Promise<SessionCommandsHandlePendingCommandResult>;
1049
+ };
1050
+ ui: {
1051
+ elicitation: (params: Omit<SessionUiElicitationParams, "sessionId">) => Promise<SessionUiElicitationResult>;
1052
+ };
607
1053
  permissions: {
608
1054
  handlePendingPermissionRequest: (params: Omit<SessionPermissionsHandlePendingPermissionRequestParams, "sessionId">) => Promise<SessionPermissionsHandlePendingPermissionRequestResult>;
609
1055
  };
@@ -32,21 +32,56 @@ function createSessionRpc(connection, sessionId) {
32
32
  readFile: async (params) => connection.sendRequest("session.workspace.readFile", { sessionId, ...params }),
33
33
  createFile: async (params) => connection.sendRequest("session.workspace.createFile", { sessionId, ...params })
34
34
  },
35
+ /** @experimental */
35
36
  fleet: {
36
37
  start: async (params) => connection.sendRequest("session.fleet.start", { sessionId, ...params })
37
38
  },
39
+ /** @experimental */
38
40
  agent: {
39
41
  list: async () => connection.sendRequest("session.agent.list", { sessionId }),
40
42
  getCurrent: async () => connection.sendRequest("session.agent.getCurrent", { sessionId }),
41
43
  select: async (params) => connection.sendRequest("session.agent.select", { sessionId, ...params }),
42
- 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 })
43
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 })
71
+ },
72
+ /** @experimental */
44
73
  compaction: {
45
74
  compact: async () => connection.sendRequest("session.compaction.compact", { sessionId })
46
75
  },
47
76
  tools: {
48
77
  handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { sessionId, ...params })
49
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
+ },
50
85
  permissions: {
51
86
  handlePendingPermissionRequest: async (params) => connection.sendRequest("session.permissions.handlePendingPermissionRequest", { sessionId, ...params })
52
87
  },