@github/copilot-sdk 0.1.33-unstable.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -6
- package/dist/cjs/client.js +1317 -0
- package/dist/cjs/extension.js +45 -0
- package/dist/cjs/generated/rpc.js +123 -0
- package/dist/cjs/generated/session-events.js +16 -0
- package/dist/cjs/index.js +38 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/sdkProtocolVersion.js +33 -0
- package/dist/cjs/session.js +616 -0
- package/dist/cjs/telemetry.js +35 -0
- package/dist/cjs/types.js +49 -0
- package/dist/client.d.ts +2 -4
- package/dist/client.js +204 -88
- package/dist/extension.d.ts +6 -7
- package/dist/extension.js +5 -1
- package/dist/generated/rpc.d.ts +540 -1
- package/dist/generated/rpc.js +41 -2
- package/dist/generated/session-events.d.ts +731 -25
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/session.d.ts +34 -4
- package/dist/session.js +73 -8
- package/dist/telemetry.d.ts +14 -0
- package/dist/telemetry.js +11 -0
- package/dist/types.d.ts +153 -6
- package/dist/types.js +15 -0
- package/docs/agent-author.md +0 -2
- package/docs/examples.md +2 -15
- package/docs/extensions.md +0 -2
- package/package.json +19 -7
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -40,16 +40,34 @@ export interface ModelsListResult {
|
|
|
40
40
|
* Model capabilities and limits
|
|
41
41
|
*/
|
|
42
42
|
capabilities: {
|
|
43
|
+
/**
|
|
44
|
+
* Feature flags indicating what the model supports
|
|
45
|
+
*/
|
|
43
46
|
supports: {
|
|
47
|
+
/**
|
|
48
|
+
* Whether this model supports vision/image input
|
|
49
|
+
*/
|
|
44
50
|
vision?: boolean;
|
|
45
51
|
/**
|
|
46
52
|
* Whether this model supports reasoning effort configuration
|
|
47
53
|
*/
|
|
48
54
|
reasoningEffort?: boolean;
|
|
49
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Token limits for prompts, outputs, and context window
|
|
58
|
+
*/
|
|
50
59
|
limits: {
|
|
60
|
+
/**
|
|
61
|
+
* Maximum number of prompt/input tokens
|
|
62
|
+
*/
|
|
51
63
|
max_prompt_tokens?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Maximum number of output/completion tokens
|
|
66
|
+
*/
|
|
52
67
|
max_output_tokens?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Maximum total context window size in tokens
|
|
70
|
+
*/
|
|
53
71
|
max_context_window_tokens: number;
|
|
54
72
|
};
|
|
55
73
|
};
|
|
@@ -57,13 +75,22 @@ export interface ModelsListResult {
|
|
|
57
75
|
* Policy state (if applicable)
|
|
58
76
|
*/
|
|
59
77
|
policy?: {
|
|
78
|
+
/**
|
|
79
|
+
* Current policy state for this model
|
|
80
|
+
*/
|
|
60
81
|
state: string;
|
|
82
|
+
/**
|
|
83
|
+
* Usage terms or conditions for this model
|
|
84
|
+
*/
|
|
61
85
|
terms: string;
|
|
62
86
|
};
|
|
63
87
|
/**
|
|
64
88
|
* Billing information
|
|
65
89
|
*/
|
|
66
90
|
billing?: {
|
|
91
|
+
/**
|
|
92
|
+
* Billing cost multiplier relative to the base rate
|
|
93
|
+
*/
|
|
67
94
|
multiplier: number;
|
|
68
95
|
};
|
|
69
96
|
/**
|
|
@@ -145,6 +172,9 @@ export interface AccountGetQuotaResult {
|
|
|
145
172
|
};
|
|
146
173
|
}
|
|
147
174
|
export interface SessionModelGetCurrentResult {
|
|
175
|
+
/**
|
|
176
|
+
* Currently active model identifier
|
|
177
|
+
*/
|
|
148
178
|
modelId?: string;
|
|
149
179
|
}
|
|
150
180
|
export interface SessionModelGetCurrentParams {
|
|
@@ -154,6 +184,9 @@ export interface SessionModelGetCurrentParams {
|
|
|
154
184
|
sessionId: string;
|
|
155
185
|
}
|
|
156
186
|
export interface SessionModelSwitchToResult {
|
|
187
|
+
/**
|
|
188
|
+
* Currently active model identifier after the switch
|
|
189
|
+
*/
|
|
157
190
|
modelId?: string;
|
|
158
191
|
}
|
|
159
192
|
export interface SessionModelSwitchToParams {
|
|
@@ -161,8 +194,14 @@ export interface SessionModelSwitchToParams {
|
|
|
161
194
|
* Target session identifier
|
|
162
195
|
*/
|
|
163
196
|
sessionId: string;
|
|
197
|
+
/**
|
|
198
|
+
* Model identifier to switch to
|
|
199
|
+
*/
|
|
164
200
|
modelId: string;
|
|
165
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Reasoning effort level to use for the model
|
|
203
|
+
*/
|
|
204
|
+
reasoningEffort?: string;
|
|
166
205
|
}
|
|
167
206
|
export interface SessionModeGetResult {
|
|
168
207
|
/**
|
|
@@ -276,12 +315,14 @@ export interface SessionWorkspaceCreateFileParams {
|
|
|
276
315
|
*/
|
|
277
316
|
content: string;
|
|
278
317
|
}
|
|
318
|
+
/** @experimental */
|
|
279
319
|
export interface SessionFleetStartResult {
|
|
280
320
|
/**
|
|
281
321
|
* Whether fleet mode was successfully activated
|
|
282
322
|
*/
|
|
283
323
|
started: boolean;
|
|
284
324
|
}
|
|
325
|
+
/** @experimental */
|
|
285
326
|
export interface SessionFleetStartParams {
|
|
286
327
|
/**
|
|
287
328
|
* Target session identifier
|
|
@@ -292,6 +333,7 @@ export interface SessionFleetStartParams {
|
|
|
292
333
|
*/
|
|
293
334
|
prompt?: string;
|
|
294
335
|
}
|
|
336
|
+
/** @experimental */
|
|
295
337
|
export interface SessionAgentListResult {
|
|
296
338
|
/**
|
|
297
339
|
* Available custom agents
|
|
@@ -311,12 +353,14 @@ export interface SessionAgentListResult {
|
|
|
311
353
|
description: string;
|
|
312
354
|
}[];
|
|
313
355
|
}
|
|
356
|
+
/** @experimental */
|
|
314
357
|
export interface SessionAgentListParams {
|
|
315
358
|
/**
|
|
316
359
|
* Target session identifier
|
|
317
360
|
*/
|
|
318
361
|
sessionId: string;
|
|
319
362
|
}
|
|
363
|
+
/** @experimental */
|
|
320
364
|
export interface SessionAgentGetCurrentResult {
|
|
321
365
|
/**
|
|
322
366
|
* Currently selected custom agent, or null if using the default agent
|
|
@@ -336,12 +380,14 @@ export interface SessionAgentGetCurrentResult {
|
|
|
336
380
|
description: string;
|
|
337
381
|
} | null;
|
|
338
382
|
}
|
|
383
|
+
/** @experimental */
|
|
339
384
|
export interface SessionAgentGetCurrentParams {
|
|
340
385
|
/**
|
|
341
386
|
* Target session identifier
|
|
342
387
|
*/
|
|
343
388
|
sessionId: string;
|
|
344
389
|
}
|
|
390
|
+
/** @experimental */
|
|
345
391
|
export interface SessionAgentSelectResult {
|
|
346
392
|
/**
|
|
347
393
|
* The newly selected custom agent
|
|
@@ -361,6 +407,7 @@ export interface SessionAgentSelectResult {
|
|
|
361
407
|
description: string;
|
|
362
408
|
};
|
|
363
409
|
}
|
|
410
|
+
/** @experimental */
|
|
364
411
|
export interface SessionAgentSelectParams {
|
|
365
412
|
/**
|
|
366
413
|
* Target session identifier
|
|
@@ -371,14 +418,294 @@ export interface SessionAgentSelectParams {
|
|
|
371
418
|
*/
|
|
372
419
|
name: string;
|
|
373
420
|
}
|
|
421
|
+
/** @experimental */
|
|
374
422
|
export interface SessionAgentDeselectResult {
|
|
375
423
|
}
|
|
424
|
+
/** @experimental */
|
|
376
425
|
export interface SessionAgentDeselectParams {
|
|
377
426
|
/**
|
|
378
427
|
* Target session identifier
|
|
379
428
|
*/
|
|
380
429
|
sessionId: string;
|
|
381
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 */
|
|
382
709
|
export interface SessionCompactionCompactResult {
|
|
383
710
|
/**
|
|
384
711
|
* Whether compaction completed successfully
|
|
@@ -393,6 +720,7 @@ export interface SessionCompactionCompactResult {
|
|
|
393
720
|
*/
|
|
394
721
|
messagesRemoved: number;
|
|
395
722
|
}
|
|
723
|
+
/** @experimental */
|
|
396
724
|
export interface SessionCompactionCompactParams {
|
|
397
725
|
/**
|
|
398
726
|
* Target session identifier
|
|
@@ -400,6 +728,9 @@ export interface SessionCompactionCompactParams {
|
|
|
400
728
|
sessionId: string;
|
|
401
729
|
}
|
|
402
730
|
export interface SessionToolsHandlePendingToolCallResult {
|
|
731
|
+
/**
|
|
732
|
+
* Whether the tool call result was handled successfully
|
|
733
|
+
*/
|
|
403
734
|
success: boolean;
|
|
404
735
|
}
|
|
405
736
|
export interface SessionToolsHandlePendingToolCallParams {
|
|
@@ -418,7 +749,128 @@ export interface SessionToolsHandlePendingToolCallParams {
|
|
|
418
749
|
};
|
|
419
750
|
error?: string;
|
|
420
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
|
+
}
|
|
421
870
|
export interface SessionPermissionsHandlePendingPermissionRequestResult {
|
|
871
|
+
/**
|
|
872
|
+
* Whether the permission request was handled successfully
|
|
873
|
+
*/
|
|
422
874
|
success: boolean;
|
|
423
875
|
}
|
|
424
876
|
export interface SessionPermissionsHandlePendingPermissionRequestParams {
|
|
@@ -466,6 +918,54 @@ export interface SessionLogParams {
|
|
|
466
918
|
* When true, the message is transient and not persisted to the session event log on disk
|
|
467
919
|
*/
|
|
468
920
|
ephemeral?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Optional URL the user can open in their browser for more details
|
|
923
|
+
*/
|
|
924
|
+
url?: string;
|
|
925
|
+
}
|
|
926
|
+
export interface SessionShellExecResult {
|
|
927
|
+
/**
|
|
928
|
+
* Unique identifier for tracking streamed output
|
|
929
|
+
*/
|
|
930
|
+
processId: string;
|
|
931
|
+
}
|
|
932
|
+
export interface SessionShellExecParams {
|
|
933
|
+
/**
|
|
934
|
+
* Target session identifier
|
|
935
|
+
*/
|
|
936
|
+
sessionId: string;
|
|
937
|
+
/**
|
|
938
|
+
* Shell command to execute
|
|
939
|
+
*/
|
|
940
|
+
command: string;
|
|
941
|
+
/**
|
|
942
|
+
* Working directory (defaults to session working directory)
|
|
943
|
+
*/
|
|
944
|
+
cwd?: string;
|
|
945
|
+
/**
|
|
946
|
+
* Timeout in milliseconds (default: 30000)
|
|
947
|
+
*/
|
|
948
|
+
timeout?: number;
|
|
949
|
+
}
|
|
950
|
+
export interface SessionShellKillResult {
|
|
951
|
+
/**
|
|
952
|
+
* Whether the signal was sent successfully
|
|
953
|
+
*/
|
|
954
|
+
killed: boolean;
|
|
955
|
+
}
|
|
956
|
+
export interface SessionShellKillParams {
|
|
957
|
+
/**
|
|
958
|
+
* Target session identifier
|
|
959
|
+
*/
|
|
960
|
+
sessionId: string;
|
|
961
|
+
/**
|
|
962
|
+
* Process identifier returned by shell.exec
|
|
963
|
+
*/
|
|
964
|
+
processId: string;
|
|
965
|
+
/**
|
|
966
|
+
* Signal to send (default: SIGTERM)
|
|
967
|
+
*/
|
|
968
|
+
signal?: "SIGTERM" | "SIGKILL" | "SIGINT";
|
|
469
969
|
}
|
|
470
970
|
/** Create typed server-scoped RPC methods (no session required). */
|
|
471
971
|
export declare function createServerRpc(connection: MessageConnection): {
|
|
@@ -500,23 +1000,62 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
500
1000
|
readFile: (params: Omit<SessionWorkspaceReadFileParams, "sessionId">) => Promise<SessionWorkspaceReadFileResult>;
|
|
501
1001
|
createFile: (params: Omit<SessionWorkspaceCreateFileParams, "sessionId">) => Promise<SessionWorkspaceCreateFileResult>;
|
|
502
1002
|
};
|
|
1003
|
+
/** @experimental */
|
|
503
1004
|
fleet: {
|
|
504
1005
|
start: (params: Omit<SessionFleetStartParams, "sessionId">) => Promise<SessionFleetStartResult>;
|
|
505
1006
|
};
|
|
1007
|
+
/** @experimental */
|
|
506
1008
|
agent: {
|
|
507
1009
|
list: () => Promise<SessionAgentListResult>;
|
|
508
1010
|
getCurrent: () => Promise<SessionAgentGetCurrentResult>;
|
|
509
1011
|
select: (params: Omit<SessionAgentSelectParams, "sessionId">) => Promise<SessionAgentSelectResult>;
|
|
510
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>;
|
|
511
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 */
|
|
512
1041
|
compaction: {
|
|
513
1042
|
compact: () => Promise<SessionCompactionCompactResult>;
|
|
514
1043
|
};
|
|
515
1044
|
tools: {
|
|
516
1045
|
handlePendingToolCall: (params: Omit<SessionToolsHandlePendingToolCallParams, "sessionId">) => Promise<SessionToolsHandlePendingToolCallResult>;
|
|
517
1046
|
};
|
|
1047
|
+
commands: {
|
|
1048
|
+
handlePendingCommand: (params: Omit<SessionCommandsHandlePendingCommandParams, "sessionId">) => Promise<SessionCommandsHandlePendingCommandResult>;
|
|
1049
|
+
};
|
|
1050
|
+
ui: {
|
|
1051
|
+
elicitation: (params: Omit<SessionUiElicitationParams, "sessionId">) => Promise<SessionUiElicitationResult>;
|
|
1052
|
+
};
|
|
518
1053
|
permissions: {
|
|
519
1054
|
handlePendingPermissionRequest: (params: Omit<SessionPermissionsHandlePendingPermissionRequestParams, "sessionId">) => Promise<SessionPermissionsHandlePendingPermissionRequestResult>;
|
|
520
1055
|
};
|
|
521
1056
|
log: (params: Omit<SessionLogParams, "sessionId">) => Promise<SessionLogResult>;
|
|
1057
|
+
shell: {
|
|
1058
|
+
exec: (params: Omit<SessionShellExecParams, "sessionId">) => Promise<SessionShellExecResult>;
|
|
1059
|
+
kill: (params: Omit<SessionShellKillParams, "sessionId">) => Promise<SessionShellKillResult>;
|
|
1060
|
+
};
|
|
522
1061
|
};
|