@github/copilot-sdk 1.0.7-preview.3 → 1.0.8-preview.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/dist/cjs/client.js +7 -6
- package/dist/cjs/generated/rpc.js +80 -3
- package/dist/client.js +7 -6
- package/dist/generated/rpc.d.ts +579 -7
- package/dist/generated/rpc.js +80 -3
- package/dist/generated/session-events.d.ts +344 -5
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +51 -0
- package/package.json +2 -2
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -484,6 +484,79 @@ export type ExternalToolTextResultForLlmContentResourceLinkIconTheme =
|
|
|
484
484
|
*/
|
|
485
485
|
/** @experimental */
|
|
486
486
|
export type ExternalToolTextResultForLlmContentResourceDetails = EmbeddedTextResourceContents | EmbeddedBlobResourceContents;
|
|
487
|
+
/**
|
|
488
|
+
* Kind of factory progress line.
|
|
489
|
+
*
|
|
490
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
491
|
+
* via the `definition` "FactoryLogLineKind".
|
|
492
|
+
*/
|
|
493
|
+
/** @experimental */
|
|
494
|
+
export type FactoryLogLineKind =
|
|
495
|
+
/** A narrator log line. */
|
|
496
|
+
"log"
|
|
497
|
+
/** A named factory phase marker. */
|
|
498
|
+
| "phase";
|
|
499
|
+
/**
|
|
500
|
+
* Machine-readable factory run failure.
|
|
501
|
+
*
|
|
502
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
503
|
+
* via the `definition` "FactoryRunFailure".
|
|
504
|
+
*/
|
|
505
|
+
/** @experimental */
|
|
506
|
+
export type FactoryRunFailure = {
|
|
507
|
+
kind: FactoryRunFailureKind;
|
|
508
|
+
/**
|
|
509
|
+
* Approved effective ceiling that was reached.
|
|
510
|
+
*/
|
|
511
|
+
value: number;
|
|
512
|
+
/**
|
|
513
|
+
* Factory run identifier.
|
|
514
|
+
*/
|
|
515
|
+
runId: string;
|
|
516
|
+
type: "factory_limit_reached";
|
|
517
|
+
} | {
|
|
518
|
+
/**
|
|
519
|
+
* Factory run identifier whose changed limits were declined.
|
|
520
|
+
*/
|
|
521
|
+
runId: string;
|
|
522
|
+
/**
|
|
523
|
+
* Human-readable reason the resume did not proceed.
|
|
524
|
+
*/
|
|
525
|
+
reason: string;
|
|
526
|
+
type: "factory_resume_declined";
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Cumulative resource ceiling that stopped a factory run.
|
|
530
|
+
*
|
|
531
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
532
|
+
* via the `definition` "FactoryRunFailureKind".
|
|
533
|
+
*/
|
|
534
|
+
/** @experimental */
|
|
535
|
+
export type FactoryRunFailureKind =
|
|
536
|
+
/** The run admitted the approved maximum total number of subagents. */
|
|
537
|
+
"maxTotalSubagents"
|
|
538
|
+
/** The run reached the approved timeout deadline. */
|
|
539
|
+
| "timeout";
|
|
540
|
+
/**
|
|
541
|
+
* Current or terminal state of a factory run.
|
|
542
|
+
*
|
|
543
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
544
|
+
* via the `definition` "FactoryRunStatus".
|
|
545
|
+
*/
|
|
546
|
+
/** @experimental */
|
|
547
|
+
export type FactoryRunStatus =
|
|
548
|
+
/** The run was minted and is awaiting approval. */
|
|
549
|
+
"pending"
|
|
550
|
+
/** The run is executing. */
|
|
551
|
+
| "running"
|
|
552
|
+
/** The run completed successfully. */
|
|
553
|
+
| "completed"
|
|
554
|
+
/** The run was interrupted while resource budget remained. */
|
|
555
|
+
| "halted"
|
|
556
|
+
/** The run was cancelled before completion. */
|
|
557
|
+
| "cancelled"
|
|
558
|
+
/** The factory body failed or reached a cumulative resource ceiling. */
|
|
559
|
+
| "error";
|
|
487
560
|
/**
|
|
488
561
|
* Content filtering mode to apply to all tools, or a map of tool name to content filtering mode.
|
|
489
562
|
*
|
|
@@ -784,6 +857,18 @@ export type McpHeadersHandlePendingHeadersRefreshRequest = {
|
|
|
784
857
|
} | {
|
|
785
858
|
kind: "none";
|
|
786
859
|
};
|
|
860
|
+
/**
|
|
861
|
+
* Consumer allowed to call an MCP tool.
|
|
862
|
+
*
|
|
863
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
864
|
+
* via the `definition` "McpToolUiVisibility".
|
|
865
|
+
*/
|
|
866
|
+
/** @experimental */
|
|
867
|
+
export type McpToolUiVisibility =
|
|
868
|
+
/** The model may call the tool. */
|
|
869
|
+
"model"
|
|
870
|
+
/** An MCP App view may call the tool. */
|
|
871
|
+
| "app";
|
|
787
872
|
/**
|
|
788
873
|
* Host response to the pending OAuth request.
|
|
789
874
|
*
|
|
@@ -4558,6 +4643,340 @@ export interface ExternalToolTextResultForLlmContentResource {
|
|
|
4558
4643
|
type: "resource";
|
|
4559
4644
|
resource: ExternalToolTextResultForLlmContentResourceDetails;
|
|
4560
4645
|
}
|
|
4646
|
+
/**
|
|
4647
|
+
* Parameters for cooperatively aborting a factory body.
|
|
4648
|
+
*
|
|
4649
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4650
|
+
* via the `definition` "FactoryAbortRequest".
|
|
4651
|
+
*/
|
|
4652
|
+
/** @experimental */
|
|
4653
|
+
export interface FactoryAbortRequest {
|
|
4654
|
+
/**
|
|
4655
|
+
* Target session identifier
|
|
4656
|
+
*/
|
|
4657
|
+
sessionId: string;
|
|
4658
|
+
/**
|
|
4659
|
+
* Factory run identifier.
|
|
4660
|
+
*/
|
|
4661
|
+
runId: string;
|
|
4662
|
+
}
|
|
4663
|
+
/**
|
|
4664
|
+
* Acknowledgement that a factory request was accepted.
|
|
4665
|
+
*
|
|
4666
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4667
|
+
* via the `definition` "FactoryAckResult".
|
|
4668
|
+
*/
|
|
4669
|
+
/** @experimental */
|
|
4670
|
+
export interface FactoryAckResult {
|
|
4671
|
+
}
|
|
4672
|
+
/**
|
|
4673
|
+
* Options for one factory-scoped subagent call.
|
|
4674
|
+
*
|
|
4675
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4676
|
+
* via the `definition` "FactoryAgentOptions".
|
|
4677
|
+
*/
|
|
4678
|
+
/** @experimental */
|
|
4679
|
+
export interface FactoryAgentOptions {
|
|
4680
|
+
/**
|
|
4681
|
+
* Optional label distinguishing otherwise identical memoized agent calls.
|
|
4682
|
+
*/
|
|
4683
|
+
label?: string;
|
|
4684
|
+
/**
|
|
4685
|
+
* Optional JSON Schema for structured agent output.
|
|
4686
|
+
*/
|
|
4687
|
+
schema?: {
|
|
4688
|
+
[k: string]: unknown | undefined;
|
|
4689
|
+
};
|
|
4690
|
+
/**
|
|
4691
|
+
* Optional model identifier for the subagent.
|
|
4692
|
+
*/
|
|
4693
|
+
model?: string;
|
|
4694
|
+
}
|
|
4695
|
+
/**
|
|
4696
|
+
* Parameters for one factory-scoped subagent call.
|
|
4697
|
+
*
|
|
4698
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4699
|
+
* via the `definition` "FactoryAgentRequest".
|
|
4700
|
+
*/
|
|
4701
|
+
/** @experimental */
|
|
4702
|
+
export interface FactoryAgentRequest {
|
|
4703
|
+
/**
|
|
4704
|
+
* Factory run identifier that owns the subagent.
|
|
4705
|
+
*/
|
|
4706
|
+
factoryRunId: string;
|
|
4707
|
+
/**
|
|
4708
|
+
* Prompt to send to the subagent.
|
|
4709
|
+
*/
|
|
4710
|
+
prompt: string;
|
|
4711
|
+
opts: FactoryAgentOptions;
|
|
4712
|
+
}
|
|
4713
|
+
/**
|
|
4714
|
+
* Result of one factory-scoped subagent call.
|
|
4715
|
+
*
|
|
4716
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4717
|
+
* via the `definition` "FactoryAgentResult".
|
|
4718
|
+
*/
|
|
4719
|
+
/** @experimental */
|
|
4720
|
+
export interface FactoryAgentResult {
|
|
4721
|
+
/**
|
|
4722
|
+
* Agent result, omitted when the agent produced no result.
|
|
4723
|
+
*/
|
|
4724
|
+
result?: {
|
|
4725
|
+
[k: string]: unknown | undefined;
|
|
4726
|
+
};
|
|
4727
|
+
}
|
|
4728
|
+
/**
|
|
4729
|
+
* Parameters for cancelling a factory run.
|
|
4730
|
+
*
|
|
4731
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4732
|
+
* via the `definition` "FactoryCancelRequest".
|
|
4733
|
+
*/
|
|
4734
|
+
/** @experimental */
|
|
4735
|
+
export interface FactoryCancelRequest {
|
|
4736
|
+
/**
|
|
4737
|
+
* Factory run identifier.
|
|
4738
|
+
*/
|
|
4739
|
+
runId: string;
|
|
4740
|
+
}
|
|
4741
|
+
/**
|
|
4742
|
+
* Parameters sent to the owning extension to execute a factory closure.
|
|
4743
|
+
*
|
|
4744
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4745
|
+
* via the `definition` "FactoryExecuteRequest".
|
|
4746
|
+
*/
|
|
4747
|
+
/** @experimental */
|
|
4748
|
+
export interface FactoryExecuteRequest {
|
|
4749
|
+
/**
|
|
4750
|
+
* Target session identifier
|
|
4751
|
+
*/
|
|
4752
|
+
sessionId: string;
|
|
4753
|
+
/**
|
|
4754
|
+
* Registered factory name.
|
|
4755
|
+
*/
|
|
4756
|
+
name: string;
|
|
4757
|
+
/**
|
|
4758
|
+
* Factory run identifier.
|
|
4759
|
+
*/
|
|
4760
|
+
runId: string;
|
|
4761
|
+
/**
|
|
4762
|
+
* Factory input value.
|
|
4763
|
+
*/
|
|
4764
|
+
args: {
|
|
4765
|
+
[k: string]: unknown | undefined;
|
|
4766
|
+
};
|
|
4767
|
+
}
|
|
4768
|
+
/**
|
|
4769
|
+
* Result returned by an extension factory closure.
|
|
4770
|
+
*
|
|
4771
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4772
|
+
* via the `definition` "FactoryExecuteResult".
|
|
4773
|
+
*/
|
|
4774
|
+
/** @experimental */
|
|
4775
|
+
export interface FactoryExecuteResult {
|
|
4776
|
+
/**
|
|
4777
|
+
* Factory result value.
|
|
4778
|
+
*/
|
|
4779
|
+
result: {
|
|
4780
|
+
[k: string]: unknown | undefined;
|
|
4781
|
+
};
|
|
4782
|
+
}
|
|
4783
|
+
/**
|
|
4784
|
+
* Parameters for retrieving a factory run.
|
|
4785
|
+
*
|
|
4786
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4787
|
+
* via the `definition` "FactoryGetRunRequest".
|
|
4788
|
+
*/
|
|
4789
|
+
/** @experimental */
|
|
4790
|
+
export interface FactoryGetRunRequest {
|
|
4791
|
+
/**
|
|
4792
|
+
* Factory run identifier.
|
|
4793
|
+
*/
|
|
4794
|
+
runId: string;
|
|
4795
|
+
}
|
|
4796
|
+
/**
|
|
4797
|
+
* Parameters for reading a factory journal entry.
|
|
4798
|
+
*
|
|
4799
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4800
|
+
* via the `definition` "FactoryJournalGetRequest".
|
|
4801
|
+
*/
|
|
4802
|
+
/** @experimental */
|
|
4803
|
+
export interface FactoryJournalGetRequest {
|
|
4804
|
+
/**
|
|
4805
|
+
* Factory run identifier.
|
|
4806
|
+
*/
|
|
4807
|
+
runId: string;
|
|
4808
|
+
/**
|
|
4809
|
+
* Namespaced journal key.
|
|
4810
|
+
*/
|
|
4811
|
+
key: string;
|
|
4812
|
+
}
|
|
4813
|
+
/**
|
|
4814
|
+
* Result of reading a factory journal entry.
|
|
4815
|
+
*
|
|
4816
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4817
|
+
* via the `definition` "FactoryJournalGetResult".
|
|
4818
|
+
*/
|
|
4819
|
+
/** @experimental */
|
|
4820
|
+
export interface FactoryJournalGetResult {
|
|
4821
|
+
/**
|
|
4822
|
+
* Whether the journal contained the requested key.
|
|
4823
|
+
*/
|
|
4824
|
+
hit: boolean;
|
|
4825
|
+
/**
|
|
4826
|
+
* Cached JSON result. The hit field distinguishes a cached JSON null from a miss.
|
|
4827
|
+
*/
|
|
4828
|
+
resultJson?: {
|
|
4829
|
+
[k: string]: unknown | undefined;
|
|
4830
|
+
};
|
|
4831
|
+
}
|
|
4832
|
+
/**
|
|
4833
|
+
* Parameters for storing a factory journal entry.
|
|
4834
|
+
*
|
|
4835
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4836
|
+
* via the `definition` "FactoryJournalPutRequest".
|
|
4837
|
+
*/
|
|
4838
|
+
/** @experimental */
|
|
4839
|
+
export interface FactoryJournalPutRequest {
|
|
4840
|
+
/**
|
|
4841
|
+
* Factory run identifier.
|
|
4842
|
+
*/
|
|
4843
|
+
runId: string;
|
|
4844
|
+
/**
|
|
4845
|
+
* Namespaced journal key.
|
|
4846
|
+
*/
|
|
4847
|
+
key: string;
|
|
4848
|
+
/**
|
|
4849
|
+
* JSON result to memoize.
|
|
4850
|
+
*/
|
|
4851
|
+
resultJson: {
|
|
4852
|
+
[k: string]: unknown | undefined;
|
|
4853
|
+
};
|
|
4854
|
+
}
|
|
4855
|
+
/**
|
|
4856
|
+
* One ordered factory progress line.
|
|
4857
|
+
*
|
|
4858
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4859
|
+
* via the `definition` "FactoryLogLine".
|
|
4860
|
+
*/
|
|
4861
|
+
/** @experimental */
|
|
4862
|
+
export interface FactoryLogLine {
|
|
4863
|
+
/**
|
|
4864
|
+
* Monotonic sequence number within the factory run.
|
|
4865
|
+
*/
|
|
4866
|
+
seq: number;
|
|
4867
|
+
kind: FactoryLogLineKind;
|
|
4868
|
+
/**
|
|
4869
|
+
* Progress text.
|
|
4870
|
+
*/
|
|
4871
|
+
text: string;
|
|
4872
|
+
}
|
|
4873
|
+
/**
|
|
4874
|
+
* Parameters for recording factory progress.
|
|
4875
|
+
*
|
|
4876
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4877
|
+
* via the `definition` "FactoryLogRequest".
|
|
4878
|
+
*/
|
|
4879
|
+
/** @experimental */
|
|
4880
|
+
export interface FactoryLogRequest {
|
|
4881
|
+
/**
|
|
4882
|
+
* Factory run identifier.
|
|
4883
|
+
*/
|
|
4884
|
+
runId: string;
|
|
4885
|
+
/**
|
|
4886
|
+
* Ordered progress lines to append.
|
|
4887
|
+
*/
|
|
4888
|
+
lines: FactoryLogLine[];
|
|
4889
|
+
}
|
|
4890
|
+
/**
|
|
4891
|
+
* Wire-only per-invocation factory resource ceiling overrides.
|
|
4892
|
+
*
|
|
4893
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4894
|
+
* via the `definition` "FactoryRunLimits".
|
|
4895
|
+
*/
|
|
4896
|
+
/** @experimental */
|
|
4897
|
+
export interface FactoryRunLimits {
|
|
4898
|
+
/**
|
|
4899
|
+
* Maximum number of factory subagents that may run concurrently.
|
|
4900
|
+
*/
|
|
4901
|
+
maxConcurrentSubagents?: number;
|
|
4902
|
+
/**
|
|
4903
|
+
* Maximum total number of factory subagents that may be admitted.
|
|
4904
|
+
*/
|
|
4905
|
+
maxTotalSubagents?: number;
|
|
4906
|
+
/**
|
|
4907
|
+
* Factory active-run timeout in milliseconds.
|
|
4908
|
+
*/
|
|
4909
|
+
timeout?: number;
|
|
4910
|
+
}
|
|
4911
|
+
/**
|
|
4912
|
+
* Parameters for invoking a registered factory.
|
|
4913
|
+
*
|
|
4914
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4915
|
+
* via the `definition` "FactoryRunRequest".
|
|
4916
|
+
*/
|
|
4917
|
+
/** @experimental */
|
|
4918
|
+
export interface FactoryRunRequest {
|
|
4919
|
+
/**
|
|
4920
|
+
* Registered factory name.
|
|
4921
|
+
*/
|
|
4922
|
+
name: string;
|
|
4923
|
+
/**
|
|
4924
|
+
* Factory input value.
|
|
4925
|
+
*/
|
|
4926
|
+
args: {
|
|
4927
|
+
[k: string]: unknown | undefined;
|
|
4928
|
+
};
|
|
4929
|
+
options?: RunOptions;
|
|
4930
|
+
}
|
|
4931
|
+
/**
|
|
4932
|
+
* Options controlling factory invocation.
|
|
4933
|
+
*
|
|
4934
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4935
|
+
* via the `definition` "RunOptions".
|
|
4936
|
+
*/
|
|
4937
|
+
/** @experimental */
|
|
4938
|
+
export interface RunOptions {
|
|
4939
|
+
limits?: FactoryRunLimits;
|
|
4940
|
+
/**
|
|
4941
|
+
* Run identifier whose journal and progress should seed this resumed run.
|
|
4942
|
+
*/
|
|
4943
|
+
resumeFromRunId?: string;
|
|
4944
|
+
}
|
|
4945
|
+
/**
|
|
4946
|
+
* Complete current or terminal factory run envelope.
|
|
4947
|
+
*
|
|
4948
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4949
|
+
* via the `definition` "FactoryRunResult".
|
|
4950
|
+
*/
|
|
4951
|
+
/** @experimental */
|
|
4952
|
+
export interface FactoryRunResult {
|
|
4953
|
+
/**
|
|
4954
|
+
* Factory run identifier.
|
|
4955
|
+
*/
|
|
4956
|
+
runId: string;
|
|
4957
|
+
status: FactoryRunStatus;
|
|
4958
|
+
/**
|
|
4959
|
+
* Completed factory result.
|
|
4960
|
+
*/
|
|
4961
|
+
result?: {
|
|
4962
|
+
[k: string]: unknown | undefined;
|
|
4963
|
+
};
|
|
4964
|
+
/**
|
|
4965
|
+
* Error message for an errored run.
|
|
4966
|
+
*/
|
|
4967
|
+
error?: string;
|
|
4968
|
+
failure?: FactoryRunFailure;
|
|
4969
|
+
/**
|
|
4970
|
+
* Reason for a halted or cancelled run.
|
|
4971
|
+
*/
|
|
4972
|
+
reason?: string;
|
|
4973
|
+
/**
|
|
4974
|
+
* Partial journal and progress snapshot for a halted, cancelled, or errored run.
|
|
4975
|
+
*/
|
|
4976
|
+
snapshot?: {
|
|
4977
|
+
[k: string]: unknown | undefined;
|
|
4978
|
+
};
|
|
4979
|
+
}
|
|
4561
4980
|
/**
|
|
4562
4981
|
* Optional user prompt to combine with the fleet orchestration instructions.
|
|
4563
4982
|
*
|
|
@@ -5224,13 +5643,17 @@ export interface LlmInferenceHttpRequestStartRequest {
|
|
|
5224
5643
|
headers: LlmInferenceHeaders;
|
|
5225
5644
|
transport?: LlmInferenceHttpRequestStartTransport;
|
|
5226
5645
|
/**
|
|
5227
|
-
* Stable
|
|
5646
|
+
* Stable identity of the agent trajectory that issued this request. Present when the request originates from an agent turn; absent for requests outside any agent context. This is the same identity used by lifecycle and bridged session events and remains constant across turns and retries.
|
|
5228
5647
|
*/
|
|
5229
5648
|
agentId?: string;
|
|
5230
5649
|
/**
|
|
5231
|
-
*
|
|
5650
|
+
* Stable identity of the immediate parent trajectory. Present for child trajectories such as subagents and conversation-sampling requests; absent for root-agent and non-agent requests.
|
|
5232
5651
|
*/
|
|
5233
5652
|
parentAgentId?: string;
|
|
5653
|
+
/**
|
|
5654
|
+
* Identity of the agent invocation (one agentic loop) that issued this request. It remains fixed across physical retries within the invocation and is distinct from the stable trajectory `agentId`. A caller-supplied invocation id always takes precedence (this covers auxiliary calls that have no model call id). Otherwise, first-party CAPI requests fall back to the runtime's agent task id — the same value the runtime emits as the `X-Agent-Task-Id` header — while custom-provider requests fall back to the model call id.
|
|
5655
|
+
*/
|
|
5656
|
+
agentInvocationId?: string;
|
|
5234
5657
|
/**
|
|
5235
5658
|
* Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context.
|
|
5236
5659
|
*/
|
|
@@ -6392,7 +6815,7 @@ export interface McpListToolsResult {
|
|
|
6392
6815
|
tools: McpTools[];
|
|
6393
6816
|
}
|
|
6394
6817
|
/**
|
|
6395
|
-
* MCP tool metadata with tool name and
|
|
6818
|
+
* MCP tool metadata with tool name, optional description, and normalized MCP Apps discovery metadata.
|
|
6396
6819
|
*
|
|
6397
6820
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6398
6821
|
* via the `definition` "McpTools".
|
|
@@ -6407,6 +6830,24 @@ export interface McpTools {
|
|
|
6407
6830
|
* Tool description, when provided.
|
|
6408
6831
|
*/
|
|
6409
6832
|
description?: string;
|
|
6833
|
+
ui?: McpToolUi;
|
|
6834
|
+
}
|
|
6835
|
+
/**
|
|
6836
|
+
* Normalized MCP Apps discovery metadata from a tool's `_meta.ui` block.
|
|
6837
|
+
*
|
|
6838
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6839
|
+
* via the `definition` "McpToolUi".
|
|
6840
|
+
*/
|
|
6841
|
+
/** @experimental */
|
|
6842
|
+
export interface McpToolUi {
|
|
6843
|
+
/**
|
|
6844
|
+
* URI of the tool's MCP App resource, typically a `ui://` resource identifier. Use `session.mcp.resources.read` to fetch its HTML and resource metadata.
|
|
6845
|
+
*/
|
|
6846
|
+
resourceUri?: string;
|
|
6847
|
+
/**
|
|
6848
|
+
* Tool visibility advertised by the server. When absent, MCP Apps defaults apply.
|
|
6849
|
+
*/
|
|
6850
|
+
visibility?: McpToolUiVisibility[];
|
|
6410
6851
|
}
|
|
6411
6852
|
/**
|
|
6412
6853
|
* Pending MCP OAuth request ID and host-provided token or cancellation response.
|
|
@@ -7102,7 +7543,7 @@ export interface SessionWorkingDirectoryContext {
|
|
|
7102
7543
|
baseCommit?: string;
|
|
7103
7544
|
}
|
|
7104
7545
|
/**
|
|
7105
|
-
* Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode).
|
|
7546
|
+
* Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode). For a local session, a report whose `cwd` diverges from the session's current working directory is ignored (the call still succeeds but records nothing and emits no event); move a local session's working directory via `metadata.setWorkingDirectory` instead.
|
|
7106
7547
|
*
|
|
7107
7548
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
7108
7549
|
* via the `definition` "MetadataRecordContextChangeResult".
|
|
@@ -10597,6 +11038,14 @@ export interface SandboxConfig {
|
|
|
10597
11038
|
* Whether to auto-add the current working directory to readwritePaths. Default: true.
|
|
10598
11039
|
*/
|
|
10599
11040
|
addCurrentWorkingDirectory?: boolean;
|
|
11041
|
+
/**
|
|
11042
|
+
* Whether to inject the Copilot GitHub token as an `http.<host>.extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. Default: false (opt-in).
|
|
11043
|
+
*/
|
|
11044
|
+
gitAuth?: boolean;
|
|
11045
|
+
/**
|
|
11046
|
+
* Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in).
|
|
11047
|
+
*/
|
|
11048
|
+
ghAuth?: boolean;
|
|
10600
11049
|
}
|
|
10601
11050
|
/**
|
|
10602
11051
|
* User-managed sandbox policy fragment merged into the auto-discovered base policy.
|
|
@@ -11034,6 +11483,10 @@ export interface ServerSkillList {
|
|
|
11034
11483
|
* All discovered skills across all sources
|
|
11035
11484
|
*/
|
|
11036
11485
|
skills: ServerSkill[];
|
|
11486
|
+
/**
|
|
11487
|
+
* Messages for skills that failed to load (e.g. malformed SKILL.md). Empty when host skills are excluded so host-local paths are not disclosed to multitenant callers.
|
|
11488
|
+
*/
|
|
11489
|
+
errors?: string[];
|
|
11037
11490
|
}
|
|
11038
11491
|
/**
|
|
11039
11492
|
* Current activity flags for the session.
|
|
@@ -11749,6 +12202,10 @@ export interface SessionModelList {
|
|
|
11749
12202
|
* Available models, ordered with the most preferred default first. Includes both Copilot (CAPI) models and any registry BYOK models; a BYOK model appears under its provider-qualified selection id (`provider/id`).
|
|
11750
12203
|
*/
|
|
11751
12204
|
list: unknown[];
|
|
12205
|
+
/**
|
|
12206
|
+
* Cost categories for the full CAPI catalog, including picker-disabled models that Auto may select. Metadata only; entries absent from `list` are not manually selectable.
|
|
12207
|
+
*/
|
|
12208
|
+
modelPriceCategories?: SessionModelPriceCategory[];
|
|
11752
12209
|
/**
|
|
11753
12210
|
* Per-quota snapshots returned alongside the model list, keyed by quota type.
|
|
11754
12211
|
*/
|
|
@@ -11756,6 +12213,17 @@ export interface SessionModelList {
|
|
|
11756
12213
|
[k: string]: unknown | undefined;
|
|
11757
12214
|
};
|
|
11758
12215
|
}
|
|
12216
|
+
/**
|
|
12217
|
+
* Cost-category metadata for a CAPI model.
|
|
12218
|
+
*
|
|
12219
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
12220
|
+
* via the `definition` "SessionModelPriceCategory".
|
|
12221
|
+
*/
|
|
12222
|
+
/** @experimental */
|
|
12223
|
+
export interface SessionModelPriceCategory {
|
|
12224
|
+
id: string;
|
|
12225
|
+
priceCategory: ModelPickerPriceCategory;
|
|
12226
|
+
}
|
|
11759
12227
|
/**
|
|
11760
12228
|
* Session construction options.
|
|
11761
12229
|
*
|
|
@@ -13097,6 +13565,10 @@ export interface SessionUpdateOptionsResult {
|
|
|
13097
13565
|
* Whether the operation succeeded
|
|
13098
13566
|
*/
|
|
13099
13567
|
success: boolean;
|
|
13568
|
+
/**
|
|
13569
|
+
* Number of hooks loaded from installed plugins, returned when installedPlugins is updated
|
|
13570
|
+
*/
|
|
13571
|
+
pluginHookCount?: number;
|
|
13100
13572
|
}
|
|
13101
13573
|
/**
|
|
13102
13574
|
* User-requested shell execution cancellation handle.
|
|
@@ -14795,6 +15267,10 @@ export interface UsageMetricsCodeChanges {
|
|
|
14795
15267
|
export interface UsageMetricsModelMetric {
|
|
14796
15268
|
requests: UsageMetricsModelMetricRequests;
|
|
14797
15269
|
usage: UsageMetricsModelMetricUsage;
|
|
15270
|
+
/**
|
|
15271
|
+
* Latest known prompt-cache expiration for this model. A timestamp in the past indicates that the observed cache has expired.
|
|
15272
|
+
*/
|
|
15273
|
+
cacheExpiresAt?: string;
|
|
14798
15274
|
/**
|
|
14799
15275
|
* Accumulated nano-AI units cost for this model
|
|
14800
15276
|
*/
|
|
@@ -15964,6 +16440,68 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
15964
16440
|
};
|
|
15965
16441
|
};
|
|
15966
16442
|
/** @experimental */
|
|
16443
|
+
factory: {
|
|
16444
|
+
/**
|
|
16445
|
+
* Runs a registered factory by name at the top level.
|
|
16446
|
+
*
|
|
16447
|
+
* @param params Parameters for invoking a registered factory.
|
|
16448
|
+
*
|
|
16449
|
+
* @returns Complete current or terminal factory run envelope.
|
|
16450
|
+
*/
|
|
16451
|
+
run: (params: FactoryRunRequest) => Promise<FactoryRunResult>;
|
|
16452
|
+
/**
|
|
16453
|
+
* Gets the current or settled envelope for a factory run.
|
|
16454
|
+
*
|
|
16455
|
+
* @param params Parameters for retrieving a factory run.
|
|
16456
|
+
*
|
|
16457
|
+
* @returns Complete current or terminal factory run envelope.
|
|
16458
|
+
*/
|
|
16459
|
+
getRun: (params: FactoryGetRunRequest) => Promise<FactoryRunResult>;
|
|
16460
|
+
/**
|
|
16461
|
+
* Requests cancellation of a factory run and returns its run envelope.
|
|
16462
|
+
*
|
|
16463
|
+
* @param params Parameters for cancelling a factory run.
|
|
16464
|
+
*
|
|
16465
|
+
* @returns Complete current or terminal factory run envelope.
|
|
16466
|
+
*/
|
|
16467
|
+
cancel: (params: FactoryCancelRequest) => Promise<FactoryRunResult>;
|
|
16468
|
+
/**
|
|
16469
|
+
* Records a batch of ordered factory progress lines.
|
|
16470
|
+
*
|
|
16471
|
+
* @param params Parameters for recording factory progress.
|
|
16472
|
+
*
|
|
16473
|
+
* @returns Acknowledgement that a factory request was accepted.
|
|
16474
|
+
*/
|
|
16475
|
+
log: (params: FactoryLogRequest) => Promise<FactoryAckResult>;
|
|
16476
|
+
/**
|
|
16477
|
+
* Runs one factory-scoped subagent and returns its result.
|
|
16478
|
+
*
|
|
16479
|
+
* @param params Parameters for one factory-scoped subagent call.
|
|
16480
|
+
*
|
|
16481
|
+
* @returns Result of one factory-scoped subagent call.
|
|
16482
|
+
*/
|
|
16483
|
+
agent: (params: FactoryAgentRequest) => Promise<FactoryAgentResult>;
|
|
16484
|
+
/** @experimental */
|
|
16485
|
+
journal: {
|
|
16486
|
+
/**
|
|
16487
|
+
* Reads a memoized factory journal entry.
|
|
16488
|
+
*
|
|
16489
|
+
* @param params Parameters for reading a factory journal entry.
|
|
16490
|
+
*
|
|
16491
|
+
* @returns Result of reading a factory journal entry.
|
|
16492
|
+
*/
|
|
16493
|
+
get: (params: FactoryJournalGetRequest) => Promise<FactoryJournalGetResult>;
|
|
16494
|
+
/**
|
|
16495
|
+
* Stores a memoized factory journal entry.
|
|
16496
|
+
*
|
|
16497
|
+
* @param params Parameters for storing a factory journal entry.
|
|
16498
|
+
*
|
|
16499
|
+
* @returns Acknowledgement that a factory request was accepted.
|
|
16500
|
+
*/
|
|
16501
|
+
put: (params: FactoryJournalPutRequest) => Promise<FactoryAckResult>;
|
|
16502
|
+
};
|
|
16503
|
+
};
|
|
16504
|
+
/** @experimental */
|
|
15967
16505
|
model: {
|
|
15968
16506
|
/**
|
|
15969
16507
|
* Gets the currently selected model for the session.
|
|
@@ -16321,7 +16859,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
16321
16859
|
*/
|
|
16322
16860
|
list: () => Promise<McpServerList>;
|
|
16323
16861
|
/**
|
|
16324
|
-
* Lists the tools exposed by a connected MCP server on this session's host.
|
|
16862
|
+
* Lists the tools exposed by a connected MCP server on this session's host. This performs a live `tools/list` request. Tool UI metadata is returned independently of whether MCP Apps rendering is enabled for the session.
|
|
16325
16863
|
*
|
|
16326
16864
|
* @param params Server name whose tool list should be returned.
|
|
16327
16865
|
*
|
|
@@ -16996,11 +17534,11 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
16996
17534
|
*/
|
|
16997
17535
|
getContextHeaviestMessages: (params: MetadataContextHeaviestMessagesRequest) => Promise<MetadataContextHeaviestMessagesResult>;
|
|
16998
17536
|
/**
|
|
16999
|
-
* Records a working-directory/git context change and emits a `session.context_changed` event.
|
|
17537
|
+
* Records a working-directory/git context change and emits a `session.context_changed` event. For a local session, a report whose `cwd` diverges from the session's current working directory is ignored (the call still succeeds but records nothing and emits no event): a local session's working directory is authoritative and is moved via `metadata.setWorkingDirectory` (or an SDK `session.resume` that supplies a `workingDirectory`), not by this method.
|
|
17000
17538
|
*
|
|
17001
17539
|
* @param params Updated working-directory/git context to record on the session.
|
|
17002
17540
|
*
|
|
17003
|
-
* @returns Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode).
|
|
17541
|
+
* @returns Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode). For a local session, a report whose `cwd` diverges from the session's current working directory is ignored (the call still succeeds but records nothing and emits no event); move a local session's working directory via `metadata.setWorkingDirectory` instead.
|
|
17004
17542
|
*/
|
|
17005
17543
|
recordContextChange: (params: MetadataRecordContextChangeRequest) => Promise<MetadataRecordContextChangeResult>;
|
|
17006
17544
|
/**
|
|
@@ -17223,6 +17761,26 @@ export interface ProviderTokenHandler {
|
|
|
17223
17761
|
*/
|
|
17224
17762
|
getToken(params: ProviderTokenAcquireRequest): Promise<ProviderTokenAcquireResult>;
|
|
17225
17763
|
}
|
|
17764
|
+
/** Handler for `factory` client session API methods. */
|
|
17765
|
+
/** @experimental */
|
|
17766
|
+
export interface FactoryHandler {
|
|
17767
|
+
/**
|
|
17768
|
+
* Asks the owning extension connection to execute a registered factory closure.
|
|
17769
|
+
*
|
|
17770
|
+
* @param params Parameters sent to the owning extension to execute a factory closure.
|
|
17771
|
+
*
|
|
17772
|
+
* @returns Result returned by an extension factory closure.
|
|
17773
|
+
*/
|
|
17774
|
+
execute(params: FactoryExecuteRequest): Promise<FactoryExecuteResult>;
|
|
17775
|
+
/**
|
|
17776
|
+
* Asks the owning extension connection to abort a running factory cooperatively.
|
|
17777
|
+
*
|
|
17778
|
+
* @param params Parameters for cooperatively aborting a factory body.
|
|
17779
|
+
*
|
|
17780
|
+
* @returns Acknowledgement that a factory request was accepted.
|
|
17781
|
+
*/
|
|
17782
|
+
abort(params: FactoryAbortRequest): Promise<FactoryAckResult>;
|
|
17783
|
+
}
|
|
17226
17784
|
/** Handler for `sessionFs` client session API methods. */
|
|
17227
17785
|
/** @experimental */
|
|
17228
17786
|
export interface SessionFsHandler {
|
|
@@ -17352,6 +17910,7 @@ export interface CanvasHandler {
|
|
|
17352
17910
|
/** All client session API handler groups. */
|
|
17353
17911
|
export interface ClientSessionApiHandlers {
|
|
17354
17912
|
providerToken?: ProviderTokenHandler;
|
|
17913
|
+
factory?: FactoryHandler;
|
|
17355
17914
|
sessionFs?: SessionFsHandler;
|
|
17356
17915
|
canvas?: CanvasHandler;
|
|
17357
17916
|
}
|
|
@@ -17362,6 +17921,18 @@ export interface ClientSessionApiHandlers {
|
|
|
17362
17921
|
* function uses `getHandlers` to resolve the session's handlers.
|
|
17363
17922
|
*/
|
|
17364
17923
|
export declare function registerClientSessionApiHandlers(connection: MessageConnection, getHandlers: (sessionId: string) => ClientSessionApiHandlers): void;
|
|
17924
|
+
/** Handler for `hooks` client global API methods. */
|
|
17925
|
+
/** @experimental */
|
|
17926
|
+
export interface HooksHandler {
|
|
17927
|
+
/**
|
|
17928
|
+
* Dispatches one SDK callback hook from the runtime to the connection that registered it. Internal transport plumbing: clients opt in through session initialization and the Rust hook processor owns ordering, policy, timeout, and callback routing.
|
|
17929
|
+
*
|
|
17930
|
+
* @param params Runtime-owned wire payload for a server-to-client hook callback invocation.
|
|
17931
|
+
*
|
|
17932
|
+
* @returns Optional output returned by an SDK callback hook.
|
|
17933
|
+
*/
|
|
17934
|
+
invoke(params: HookInvokeRequest): Promise<HookInvokeResponse>;
|
|
17935
|
+
}
|
|
17365
17936
|
/** Handler for `llmInference` client global API methods. */
|
|
17366
17937
|
/** @experimental */
|
|
17367
17938
|
export interface LlmInferenceHandler {
|
|
@@ -17394,6 +17965,7 @@ export interface GitHubTelemetryHandler {
|
|
|
17394
17965
|
}
|
|
17395
17966
|
/** All client global API handler groups. */
|
|
17396
17967
|
export interface ClientGlobalApiHandlers {
|
|
17968
|
+
hooks?: HooksHandler;
|
|
17397
17969
|
llmInference?: LlmInferenceHandler;
|
|
17398
17970
|
gitHubTelemetry?: GitHubTelemetryHandler;
|
|
17399
17971
|
}
|