@codingame/monaco-vscode-chat-service-override 38.0.7 → 38.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/common.js +0 -53
  2. package/index.js +0 -3
  3. package/package.json +5 -5
  4. package/session.js +0 -3
  5. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +1 -1
  6. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +1 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +1 -1
  8. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +6 -6
  9. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +1 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +7 -7
  15. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +4 -4
  16. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +1 -1
  17. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.d.ts +0 -135
  18. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.js +0 -510
  19. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +0 -22
  20. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +0 -21
  21. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.d.ts +0 -273
  22. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.js +0 -61
  23. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.d.ts +0 -7
  24. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.js +0 -17
  25. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.d.ts +0 -12
  26. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.js +0 -48
  27. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.d.ts +0 -8
  28. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.js +0 -11
  29. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.d.ts +0 -114
  30. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.js +0 -141
  31. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.d.ts +0 -48
  32. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.js +0 -238
  33. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.d.ts +0 -102
  34. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.js +0 -260
  35. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.d.ts +0 -102
  36. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.js +0 -115
  37. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.d.ts +0 -46
  38. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.js +0 -92
  39. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -9
  40. package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.d.ts +0 -14
  41. package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +0 -385
  42. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.d.ts +0 -67
  43. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.js +0 -695
  44. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.d.ts +0 -4
  45. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.js +0 -39
  46. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.d.ts +0 -1
  47. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +0 -59
  48. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +0 -1
  49. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +0 -83
  50. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +0 -87
  51. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +0 -176
  52. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +0 -422
  53. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +0 -2444
  54. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.d.ts +0 -91
  55. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.js +0 -620
  56. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.d.ts +0 -1
  57. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +0 -5
  58. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +0 -46
  59. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +0 -321
  60. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +0 -104
  61. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +0 -345
  62. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +0 -2
  63. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +0 -611
  64. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +0 -20
  65. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +0 -85
  66. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +0 -200
  67. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +0 -981
  68. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +0 -24
  69. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +0 -206
  70. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +0 -65
  71. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +0 -368
  72. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +0 -10
  73. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +0 -57
  74. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +0 -33
  75. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +0 -98
  76. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +0 -32
  77. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +0 -186
  78. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +0 -12
  79. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +0 -116
  80. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +0 -32
  81. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +0 -226
  82. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +0 -18
  83. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +0 -138
  84. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +0 -32
  85. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +0 -29
  86. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +0 -13
  87. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +0 -108
  88. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +0 -13
  89. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +0 -63
  90. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +0 -252
  91. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +0 -1
  92. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +0 -178
  93. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +0 -47
  94. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +0 -322
  95. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +0 -146
  96. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +0 -890
  97. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +0 -132
  98. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +0 -237
  99. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +0 -120
  100. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +0 -234
  101. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +0 -36
  102. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +0 -164
  103. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.d.ts +0 -21
  104. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.js +0 -122
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.d.ts +0 -82
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.js +0 -213
  107. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.d.ts +0 -40
  108. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.js +0 -561
  109. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.d.ts +0 -133
  110. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.js +0 -1176
  111. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.d.ts +0 -17
  112. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.js +0 -76
  113. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.d.ts +0 -54
  114. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.js +0 -220
  115. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.d.ts +0 -21
  116. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.js +0 -184
  117. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.d.ts +0 -8
  118. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.js +0 -165
  119. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.d.ts +0 -43
  120. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.js +0 -162
  121. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.d.ts +0 -40
  122. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.js +0 -129
  123. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.d.ts +0 -166
  124. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.js +0 -838
  125. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.d.ts +0 -40
  126. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.js +0 -604
  127. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.d.ts +0 -289
  128. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.js +0 -497
  129. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.d.ts +0 -6
  130. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.js +0 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.d.ts +0 -73
  132. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.js +0 -398
  133. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.d.ts +0 -45
  134. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.js +0 -296
  135. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +0 -63
  136. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +0 -361
  137. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +0 -34
  138. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +0 -198
  139. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +0 -131
  140. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +0 -871
  141. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +0 -66
  142. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +0 -297
  143. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +0 -31
  144. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +0 -118
@@ -1,273 +0,0 @@
1
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
2
- import { SessionStatus } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
3
- import { SessionModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
4
- /** Configuration key gating the cloud-sandbox connection path. Disabled by default. */
5
- export declare const CloudSandboxEnabledSettingId = "chat.agentHost.cloudSandbox.enabled";
6
- export declare const CloudSandboxAutoConnectOnOpenSettingId = "chat.agentHost.cloudSandbox.autoConnectOnOpen";
7
- /**
8
- * Whether cloud sandbox sessions can be created or connected to. A sandbox is reached over the
9
- * remote-agent-host relay, so it needs that setting too.
10
- */
11
- export declare function isCloudSandboxEnabled(configurationService: IConfigurationService): boolean;
12
- /** Prefix for the synthesized display address of a cloud sandbox connection. */
13
- export declare const CLOUD_SANDBOX_ADDRESS_PREFIX = "cloudsandbox:";
14
- /**
15
- * Session URI scheme the Copilot host uses when it creates and lists sessions
16
- * (`ahp-session:/<uuid>`). Differs from its agent provider ({@link CLOUD_SANDBOX_AGENT_PROVIDER}):
17
- * the UI routes by provider, but backend calls must address sessions under this scheme because the
18
- * host's session registry is keyed by the exact URI.
19
- */
20
- export declare const CLOUD_SANDBOX_SESSION_SCHEME = "ahp-session";
21
- /** The agent provider advertised by the Copilot host inside the sandbox. */
22
- export declare const CLOUD_SANDBOX_AGENT_PROVIDER = "copilot";
23
- /** Prefix of a sealed token envelope (`copilot-sealed.v1.<key_id>.<b64url>`). */
24
- export declare const CLOUD_SANDBOX_SEALED_TOKEN_PREFIX = "copilot-sealed.v1.";
25
- /** Whether {@link token} is a sealed envelope, and so safe to forward over the relay. */
26
- export declare function isCloudSandboxSealedToken(token: string | undefined): boolean;
27
- /** The Mission Control environment id encoded in a cloud sandbox connection address, if any. */
28
- export declare function cloudSandboxEnvironmentId(address: string): string | undefined;
29
- /**
30
- * The Copilot cloud agent slug whose tasks run inside a Mission Control sandbox.
31
- *
32
- * Sandbox tasks carry this slug today, which is why {@link CloudSandboxEnabledSettingId} exists and
33
- * defaults to off: the Copilot extension's cloud provider lists tasks by an allowlist of cloud
34
- * slugs (`copilot-developer`, `copilot-swe-agent`) that excludes this one, so the two providers do
35
- * not overlap. Sandbox tasks are expected to move under one of those slugs eventually, at which
36
- * point both providers would list the same task and the sessions list would show it twice — the
37
- * setting keeps that from reaching everyone before the overlap is resolved.
38
- *
39
- * That migration also breaks discovery, which requires this slug *and* the `sandboxes` compute
40
- * provider to recognize a task. Both must be resolved before the setting is enabled by default.
41
- */
42
- export declare const CLOUD_SANDBOX_AGENT_SLUG = "copilot-developer-cli";
43
- /**
44
- * Sentinel environment id asking Mission Control to provision a fresh sandbox VM. Never a real
45
- * environment: the concrete id comes back on the created session and everything must address that
46
- * one — see {@link ICloudSandboxCreatedSession.environmentId}.
47
- */
48
- export declare const CLOUD_SANDBOX_ON_DEMAND_ENVIRONMENT_ID = "github-sandbox";
49
- /** What to provision a sandbox session for. */
50
- export interface ICloudSandboxCreateSessionRequest {
51
- /** Repository to bind the sandbox to, as `owner/name`. Omitted for a repo-less sandbox. */
52
- readonly repoNwo?: string;
53
- /** First user turn. Mission Control starts no run, so the client sends it over the relay. */
54
- readonly prompt: string;
55
- }
56
- /** A freshly provisioned sandbox task/session pair, bound to a concrete environment. */
57
- export interface ICloudSandboxCreatedSession {
58
- /** Mission Control task id owning the session; the key its persisted AHP history is under. */
59
- readonly taskId: string;
60
- /** Session id, issued as `ahp-session:/<sessionId>` and listed back by the host under that id. */
61
- readonly sessionId: string;
62
- /** The sandbox VM Mission Control bound, never {@link CLOUD_SANDBOX_ON_DEMAND_ENVIRONMENT_ID}. */
63
- readonly environmentId: string;
64
- }
65
- /** A sandbox session discovered from the Copilot task list, enough to seed a session entry. */
66
- export interface ICloudSandboxDiscoveredSession {
67
- readonly eventType?: string;
68
- /** Mission Control environment id the session's sandbox is bound to. */
69
- readonly environmentId: string;
70
- /**
71
- * Session id, used as the native session's raw id. Mission Control creates the session as
72
- * `ahp-session:/<sessionId>` and the host lists it back under the same id, so seeded entries
73
- * reconcile with the host's `listSessions()` on connect.
74
- */
75
- readonly sessionId: string;
76
- /**
77
- * Mission Control task id owning the session. Persisted AHP history is addressed per task, so
78
- * this is what makes a session's conversation readable after its sandbox is gone.
79
- */
80
- readonly taskId: string;
81
- /** Display name for the session/host. */
82
- readonly name: string;
83
- /** Owning repository as `owner/name`, when known. */
84
- readonly repoName?: string;
85
- /** Whether discovery identified a repository association, independent of name resolution. */
86
- readonly hasRepository?: boolean;
87
- /** Last-updated timestamp (ISO 8601), when known, for ordering. */
88
- readonly updatedAt?: string;
89
- /** Last reported activity; this does not establish environment availability or session flags. */
90
- readonly status?: SessionStatus;
91
- /** Mission Control's archive state, independent of the sandbox's AHP session flags. */
92
- readonly isArchived?: boolean;
93
- }
94
- /** Build the synthesized remote-agent-host address for a sandbox environment. */
95
- export declare function cloudSandboxAddress(environmentId: string): string;
96
- /** Build the Web PubSub URL for a client token. The scheme is forced to `wss://`. */
97
- export declare function buildWpsUrl(token: ICloudSandboxClientToken): string;
98
- /**
99
- * The three per-client Web PubSub group "lanes". The client joins {@link broadcast} and
100
- * {@link to_client} (inbound) and publishes to {@link to_host} (outbound).
101
- */
102
- export interface IWebPubSubClientGroups {
103
- /** Host → this-client broadcast lane the client subscribes to. */
104
- readonly broadcast: string;
105
- /** Host → this-client lane the client subscribes to. */
106
- readonly to_client: string;
107
- /** This-client → host lane the client publishes to. */
108
- readonly to_host: string;
109
- }
110
- /** A public sealing key advertised by the sandbox host. */
111
- export interface IHostEncryptionKey {
112
- /** Stateless key fingerprint; names the key in a sealed value's envelope. */
113
- readonly key_id: string;
114
- /** Trust domain the key serves (e.g. `auth-token`). */
115
- readonly use: string;
116
- /** Sealing scheme, such as `x25519-sealedbox` or `hpke-x25519-hkdf-sha256-aes256gcm`. */
117
- readonly algorithm: string;
118
- /** Recipient public key in standard (padded) base64. */
119
- readonly public_key: string;
120
- }
121
- /**
122
- * A client Web PubSub connection token (`/connect` and `/reconnect`, HTTP 200). Field names mirror
123
- * the wire shape so the extension can pass them through the bridge without remapping.
124
- */
125
- export interface ICloudSandboxClientToken {
126
- /** Short-lived Web PubSub JWT. Never persisted. */
127
- readonly access_token: string;
128
- /** ISO-8601 expiry of {@link access_token}. */
129
- readonly expires_at: string;
130
- /** Web PubSub endpoint URL (without the access-token query param). */
131
- readonly wps_endpoint: string;
132
- /** Web PubSub hub name. */
133
- readonly hub: string;
134
- /** WebSocket subprotocol to negotiate (e.g. the reliable JSON subprotocol). */
135
- readonly subprotocol: string;
136
- /** MC-issued stable client identity used for group lanes, `initialize`, and reconnect. */
137
- readonly client_id: string;
138
- /** The per-client group lanes. */
139
- readonly groups: IWebPubSubClientGroups;
140
- /** Opaque `copilot-sealed.v1.<key_id>.<b64url>` envelope, when MC sealed a token. */
141
- readonly encrypted_github_token?: string;
142
- /** The host key the {@link encrypted_github_token} was sealed to, when present. */
143
- readonly host_encryption_key?: IHostEncryptionKey;
144
- }
145
- /**
146
- * Mission Control signalled that the environment is waking (HTTP 202). The
147
- * client must retry `/connect` after {@link retryAfterSeconds} until it gets a
148
- * token (HTTP 200).
149
- */
150
- export interface ICloudSandboxWaking {
151
- /** Seconds to wait before retrying, from the `Retry-After` header. */
152
- readonly retryAfterSeconds: number;
153
- }
154
- /** Result of a credentials mint: either a usable token or a "waking" retry signal. */
155
- export type CloudSandboxConnectResult = {
156
- readonly kind: "token";
157
- readonly token: ICloudSandboxClientToken;
158
- } | {
159
- readonly kind: "waking";
160
- readonly waking: ICloudSandboxWaking;
161
- };
162
- /**
163
- * Operational state of a sandbox environment. Only `online` has a daemon listening on the relay;
164
- * connecting to any other state leaves the AHP `initialize` unanswered.
165
- */
166
- export type CloudSandboxEnvironmentStatus = "online" | "offline" | "degraded" | "waking" | "draining";
167
- /** A sandbox environment's current record, as reported by Mission Control. */
168
- export interface ICloudSandboxEnvironment {
169
- readonly id: string;
170
- readonly status: CloudSandboxEnvironmentStatus;
171
- readonly capabilities?: {
172
- /** The copilotd **host** version (e.g. `0.6.3`), not the AHP wire protocol version. */
173
- readonly ahp_version?: string;
174
- };
175
- /** Public recipient keys obtained through authenticated MC HTTPS, not through the relay. */
176
- readonly encryption_keys?: readonly IHostEncryptionKey[];
177
- }
178
- /** Credential-free discovery metadata for a Mission Control environment. */
179
- export interface IMissionControlEnvironment {
180
- readonly id: string;
181
- /** Open vocabulary; only online permits attachment without a warning. */
182
- readonly status: string;
183
- readonly kind: string;
184
- readonly name: string;
185
- }
186
- /** Identifies which sandbox environment/session credentials are being minted for. */
187
- export interface ICloudSandboxConnectionRequest {
188
- /** Stable environment identifier (`env_<uuid>`) of the sandbox. */
189
- readonly environmentId: string;
190
- /**
191
- * The cloud session/task id the client is connecting to. Mission Control
192
- * uses it to resolve the repository when minting the token.
193
- */
194
- readonly sessionId?: string;
195
- /** Reports credential HTTP dispatch or a pending response locally; never sent to the server. */
196
- readonly onRequest?: (event: "issued" | "waking") => void;
197
- }
198
- export interface ICloudSandboxModelCatalog {
199
- readonly models: readonly SessionModelInfo[];
200
- readonly defaultModel?: string;
201
- }
202
- /** Only a complete scan permits removing absent sessions; other results may name explicit removals. */
203
- export type ICloudSandboxDiscoveryResult =
204
- /** Every task was scanned and resolved; absent sessions really are gone. */
205
- {
206
- readonly kind: "complete";
207
- readonly sessions: readonly ICloudSandboxDiscoveredSession[];
208
- }
209
- /** Changes only; sessions absent from this result must be retained. */
210
- | {
211
- readonly kind: "incremental";
212
- readonly sessions: readonly ICloudSandboxDiscoveredSession[];
213
- readonly removedTaskIds: readonly string[];
214
- }
215
- /** Some tasks could not be resolved; only explicitly removed tasks may be dropped. */
216
- | {
217
- readonly kind: "partial";
218
- readonly sessions: readonly ICloudSandboxDiscoveredSession[];
219
- readonly removedTaskIds?: readonly string[];
220
- }
221
- /** Discovery could not run (auth not ready, request failed). Existing state must be left alone. */
222
- | {
223
- readonly kind: "failed";
224
- readonly reason: string;
225
- };
226
- /** Thrown when no GitHub session with the required scopes is available. */
227
- export declare class CloudSandboxAuthenticationRequiredError extends Error {
228
- constructor();
229
- }
230
- /** A connection request failed without receiving an HTTP response. */
231
- export declare class CloudSandboxNetworkError extends Error {
232
- constructor(message: string, options?: ErrorOptions);
233
- }
234
- /**
235
- * A Mission Control request that came back with a non-success status. Carries the {@link statusCode}
236
- * so callers can tell a failure that may clear on its own from one that never will.
237
- */
238
- export declare class CloudSandboxRequestError extends Error {
239
- readonly statusCode: number | undefined;
240
- readonly retryAfterSeconds?: number | undefined;
241
- constructor(statusCode: number | undefined, message: string, retryAfterSeconds?: number | undefined);
242
- }
243
- /**
244
- * Whether re-issuing a failed request could plausibly succeed later. Callers that retry on a timer
245
- * MUST consult this, or one dead session becomes an unbounded stream of failed requests.
246
- *
247
- * Transport failures (no status), 5xx, 408 and 429 are transient; every other 4xx describes a
248
- * request Mission Control will reject identically however often it is repeated.
249
- *
250
- * This gates credential refresh for *live* connections, where a transient fault must not tear down
251
- * a working session — hence 5xx staying retryable. Opening a new connection deliberately does not
252
- * use it: only {@link CloudSandboxNetworkError} is retried there, and HTTP answers remain final.
253
- * {@link CloudSandboxAuthenticationRequiredError} is retryable here because it is raised before
254
- * any request goes out, so callers need their own ceiling.
255
- */
256
- export declare function isRetryableCloudSandboxError(error: unknown): boolean;
257
- /** Options for establishing a live AHP relay to a cloud sandbox environment. */
258
- export interface ICloudSandboxConnectOptions {
259
- /** Selects the generic native-host path rather than sandbox checkout preparation. */
260
- readonly environmentKind?: "user-local";
261
- /** Stable Mission Control environment identifier (`env_<uuid>`). */
262
- readonly environmentId: string;
263
- /** The cloud session/task id this connection is for, used for token minting. */
264
- readonly sessionId?: string;
265
- /** Human-readable display name for the connection. */
266
- readonly name: string;
267
- /** Local identity that owns this staged user-local connection; never sent to MC. */
268
- readonly accountKey?: string;
269
- /** Caller provenance, not a claim about warm or cold compute. */
270
- readonly connectionSource?: "created" | "existing";
271
- /** Local task-creation start time for end-to-end provisioning telemetry; never persisted or sent to MC. */
272
- readonly provisioningStartedAt?: number;
273
- }
@@ -1,61 +0,0 @@
1
-
2
- import { RemoteAgentHostsEnabledSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService';
3
-
4
- const CloudSandboxEnabledSettingId = 'chat.agentHost.cloudSandbox.enabled';
5
- const CloudSandboxAutoConnectOnOpenSettingId = 'chat.agentHost.cloudSandbox.autoConnectOnOpen';
6
- function isCloudSandboxEnabled(configurationService) {
7
- return configurationService.getValue(CloudSandboxEnabledSettingId) === true
8
- && configurationService.getValue(RemoteAgentHostsEnabledSettingId) === true;
9
- }
10
- const CLOUD_SANDBOX_ADDRESS_PREFIX = 'cloudsandbox:';
11
- const CLOUD_SANDBOX_SESSION_SCHEME = 'ahp-session';
12
- const CLOUD_SANDBOX_AGENT_PROVIDER = 'copilot';
13
- const CLOUD_SANDBOX_SEALED_TOKEN_PREFIX = 'copilot-sealed.v1.';
14
- function isCloudSandboxSealedToken(token) {
15
- return typeof token === 'string' && token.startsWith(CLOUD_SANDBOX_SEALED_TOKEN_PREFIX);
16
- }
17
- function cloudSandboxEnvironmentId(address) {
18
- return address.startsWith(CLOUD_SANDBOX_ADDRESS_PREFIX)
19
- ? address.slice(CLOUD_SANDBOX_ADDRESS_PREFIX.length)
20
- : undefined;
21
- }
22
- const CLOUD_SANDBOX_AGENT_SLUG = 'copilot-developer-cli';
23
- const CLOUD_SANDBOX_ON_DEMAND_ENVIRONMENT_ID = 'github-sandbox';
24
- function cloudSandboxAddress(environmentId) {
25
- return `${CLOUD_SANDBOX_ADDRESS_PREFIX}${environmentId}`;
26
- }
27
- function buildWpsUrl(token) {
28
- const base = token.wps_endpoint.replace(/^ws:\/\//i, 'wss://').replace(/^http:\/\//i, 'wss://').replace(/^https:\/\//i, 'wss://');
29
- const withScheme = /^wss:\/\//i.test(base) ? base : `wss://${base}`;
30
- const separator = withScheme.includes('?') ? '&' : '?';
31
- return `${withScheme}${separator}access_token=${encodeURIComponent(token.access_token)}&clientId=${encodeURIComponent(token.client_id)}`;
32
- }
33
- class CloudSandboxAuthenticationRequiredError extends Error {
34
- constructor() {
35
- super('Connecting to a cloud sandbox requires a signed-in GitHub account.');
36
- this.name = 'CloudSandboxAuthenticationRequiredError';
37
- }
38
- }
39
- class CloudSandboxNetworkError extends Error {
40
- constructor(message, options) {
41
- super(message, options);
42
- this.name = 'CloudSandboxNetworkError';
43
- }
44
- }
45
- class CloudSandboxRequestError extends Error {
46
- constructor(statusCode, message, retryAfterSeconds) {
47
- super(message);
48
- this.statusCode = statusCode;
49
- this.retryAfterSeconds = retryAfterSeconds;
50
- this.name = 'CloudSandboxRequestError';
51
- }
52
- }
53
- function isRetryableCloudSandboxError(error) {
54
- if (!(error instanceof CloudSandboxRequestError) || error.statusCode === undefined) {
55
- return true;
56
- }
57
- const status = error.statusCode;
58
- return status === 408 || status === 429 || status < 400 || status >= 500;
59
- }
60
-
61
- export { CLOUD_SANDBOX_ADDRESS_PREFIX, CLOUD_SANDBOX_AGENT_PROVIDER, CLOUD_SANDBOX_AGENT_SLUG, CLOUD_SANDBOX_ON_DEMAND_ENVIRONMENT_ID, CLOUD_SANDBOX_SEALED_TOKEN_PREFIX, CLOUD_SANDBOX_SESSION_SCHEME, CloudSandboxAuthenticationRequiredError, CloudSandboxAutoConnectOnOpenSettingId, CloudSandboxEnabledSettingId, CloudSandboxNetworkError, CloudSandboxRequestError, buildWpsUrl, cloudSandboxAddress, cloudSandboxEnvironmentId, isCloudSandboxEnabled, isCloudSandboxSealedToken, isRetryableCloudSandboxError };
@@ -1,7 +0,0 @@
1
- import type { SessionModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
2
- import type { IAgentModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agent";
3
- import { type IAgentModelPricingMeta } from "./vscode/agentModelPricing.js";
4
- export { createAgentModelPricingMeta, createPricingMetaFromBilling, hasLongContextSurcharge, normalizeCAPIBilling } from "./vscode/agentModelPricing.js";
5
- export type { IAgentModelPricingMeta, ICAPIModelBilling } from "./vscode/agentModelPricing.js";
6
- export { readAgentModelEnsembleMeta, withAgentModelEnsembleMeta, type IAgentModelEnsembleMeta } from "./vscode/agentModelEnsembleMeta.js";
7
- export declare function readAgentModelPricingMeta(model: IAgentModelInfo | SessionModelInfo): IAgentModelPricingMeta;
@@ -1,17 +0,0 @@
1
-
2
- import { hasAgentMetadata } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/meta/metadata';
3
- import { readCopilotModelCategory } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/meta/copilotd/copilotdMetadataReader';
4
- import { readAgentModelPricingMeta as readAgentModelPricingMeta$1 } from './vscode/agentModelPricing.js';
5
- export { createAgentModelPricingMeta, createPricingMetaFromBilling, normalizeCAPIBilling } from './vscode/agentModelPricing.js';
6
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
7
-
8
- const pricingKeys = ['multiplierNumeric', 'inputCost', 'cacheCost', 'cacheWriteCost', 'outputCost', 'longContextInputCost', 'longContextCacheCost', 'longContextCacheWriteCost', 'longContextOutputCost', 'discountPercent', 'priceCategory', 'category', 'promo'];
9
- function readAgentModelPricingMeta(model) {
10
- if (hasAgentMetadata(model, pricingKeys)) {
11
- return readAgentModelPricingMeta$1(model);
12
- }
13
- const category = readCopilotModelCategory(model);
14
- return category ? { category } : {};
15
- }
16
-
17
- export { readAgentModelPricingMeta };
@@ -1,12 +0,0 @@
1
- import type { RootState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
2
- export interface ICloudSandboxProject {
3
- readonly id: string;
4
- readonly path: string;
5
- readonly git: boolean;
6
- readonly status: "ready" | "cloning" | "failed";
7
- readonly progress?: number;
8
- readonly remoteUrl?: string;
9
- readonly error?: string;
10
- }
11
- export declare function readCloudSandboxCloneResult(result: unknown): ICloudSandboxProject | undefined;
12
- export declare function readCloudSandboxProjects(state: RootState): readonly ICloudSandboxProject[] | undefined;
@@ -1,48 +0,0 @@
1
-
2
- import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
3
-
4
- function readCloudSandboxCloneResult(result) {
5
- return isRecord(result) ? readProject(result.project) : undefined;
6
- }
7
- function readProject(value) {
8
- if (!isRecord(value)
9
- || typeof value.id !== 'string' || !value.id
10
- || typeof value.path !== 'string' || !value.path
11
- || typeof value.git !== 'boolean') {
12
- return undefined;
13
- }
14
- const status = value.status === undefined ? 'ready' : value.status;
15
- if (status !== 'ready' && status !== 'cloning' && status !== 'failed') {
16
- return undefined;
17
- }
18
- return {
19
- id: value.id,
20
- path: value.path,
21
- git: value.git,
22
- status,
23
- progress: status === 'cloning' && typeof value.progress === 'number' && Number.isFinite(value.progress)
24
- ? Math.min(100, Math.max(0, value.progress))
25
- : undefined,
26
- remoteUrl: typeof value.remoteUrl === 'string' ? value.remoteUrl : undefined,
27
- error: typeof value.error === 'string' ? value.error : undefined,
28
- };
29
- }
30
- function readCloudSandboxProjects(state) {
31
- const capability = state._meta?.['copilot.projectManagement'];
32
- if (!isRecord(capability) || capability.available !== true) {
33
- return undefined;
34
- }
35
- const copilot = state.config?.values?.copilot;
36
- if (!isRecord(copilot) || !Array.isArray(copilot.projects)) {
37
- return [];
38
- }
39
- return copilot.projects.flatMap(value => {
40
- const project = readProject(value);
41
- return project ? [project] : [];
42
- });
43
- }
44
- function isRecord(value) {
45
- return isObject(value);
46
- }
47
-
48
- export { readCloudSandboxCloneResult, readCloudSandboxProjects };
@@ -1,8 +0,0 @@
1
- import type { SessionModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
2
- import type { IAgentModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agent";
3
- /** How the host presents its Auto model as Ensemble. */
4
- export interface IAgentModelEnsembleMeta {
5
- readonly intelligenceUsesHydraFusion: boolean;
6
- }
7
- export declare function withAgentModelEnsembleMeta(meta: Record<string, unknown> | undefined, ensemble: IAgentModelEnsembleMeta): Record<string, unknown>;
8
- export declare function readAgentModelEnsembleMeta(model: IAgentModelInfo | SessionModelInfo): IAgentModelEnsembleMeta | undefined;
@@ -1,11 +0,0 @@
1
-
2
- import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
3
-
4
- const VSCODE_ENSEMBLE_META_KEY = 'vscode.chat.ensemble';
5
- function readAgentModelEnsembleMeta(model) {
6
- const value = model._meta?.[VSCODE_ENSEMBLE_META_KEY];
7
- const intelligenceUsesHydraFusion = isObject(value) ? value.intelligenceUsesHydraFusion : undefined;
8
- return typeof intelligenceUsesHydraFusion === 'boolean' ? { intelligenceUsesHydraFusion } : undefined;
9
- }
10
-
11
- export { readAgentModelEnsembleMeta };
@@ -1,114 +0,0 @@
1
- import type { SessionModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
2
- import type { IAgentModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agent";
3
- /**
4
- * Well-known model picker metadata carried under a model's open `_meta` bag (see {@link IAgentModelInfo._meta} /
5
- * {@link SessionModelInfo._meta}). Agents populate these keys so the chat model picker can render pricing,
6
- * capability categories, and promotions.
7
- *
8
- * All cost values are expressed as credits per 1M tokens — the same unit the model picker hover renders (see
9
- * `getModelHoverContent` in `modelPicker/modelPickerHover.ts`). Fields are optional; agents omit what they don't know.
10
- */
11
- export interface IAgentModelPricingMeta {
12
- /** Request multiplier (e.g. `1.5` rendered as "1.5x"). */
13
- readonly multiplierNumeric?: number;
14
- /** Default-tier input cost in credits per 1M tokens. */
15
- readonly inputCost?: number;
16
- /** Default-tier cached-input (read) cost in credits per 1M tokens. */
17
- readonly cacheCost?: number;
18
- /** Default-tier cache-write cost in credits per 1M tokens. */
19
- readonly cacheWriteCost?: number;
20
- /** Default-tier output cost in credits per 1M tokens. */
21
- readonly outputCost?: number;
22
- /** Long-context-tier input cost in credits per 1M tokens. */
23
- readonly longContextInputCost?: number;
24
- /** Long-context-tier cached-input (read) cost in credits per 1M tokens. */
25
- readonly longContextCacheCost?: number;
26
- /** Long-context-tier cache-write cost in credits per 1M tokens. */
27
- readonly longContextCacheWriteCost?: number;
28
- /** Long-context-tier output cost in credits per 1M tokens. */
29
- readonly longContextOutputCost?: number;
30
- /** Coarse price bucket (e.g. `low`, `medium`, `high`) for an at-a-glance tag. */
31
- readonly priceCategory?: string;
32
- /** Capability category (e.g. `lightweight`, `versatile`, `powerful`) shown in the model picker hover. */
33
- readonly category?: string;
34
- /** Whole-number percentage discount (0-100) for the synthetic `auto` model; shown as a "{n}% discount" detail. */
35
- readonly discountPercent?: number;
36
- /** Promotional information for the model. A `discountPercent` of `0` is a valid message-only promo. */
37
- readonly promo?: {
38
- readonly id: string;
39
- readonly discountPercent: number;
40
- /** ISO 8601 end date; absent for open-ended promotions. */
41
- readonly endsAt?: string;
42
- readonly message: string;
43
- readonly showBanner?: boolean;
44
- };
45
- }
46
- /**
47
- * Reads the well-known {@link IAgentModelPricingMeta} keys from a model's open `_meta` bag, ignoring any unrelated
48
- * provider-specific keys and values of the wrong type. Returns an object containing only the keys that were present
49
- * with a valid value.
50
- */
51
- export declare function readAgentModelPricingMeta(model: IAgentModelInfo | SessionModelInfo): IAgentModelPricingMeta;
52
- /**
53
- * Builds a `_meta` payload from {@link IAgentModelPricingMeta}, dropping `undefined` entries. Returns `undefined` when
54
- * no model picker fields are known so callers can avoid attaching an empty `_meta` object.
55
- */
56
- export declare function createAgentModelPricingMeta(pricing: IAgentModelPricingMeta): Record<string, unknown> | undefined;
57
- /**
58
- * Normalizes a raw CAPI or Copilot SDK billing payload into the camelCase
59
- * {@link ICAPIModelBilling} shape that {@link createPricingMetaFromBilling} expects.
60
- * Prices are converted from the payload's billing batch to credits per million tokens.
61
- */
62
- export declare function normalizeCAPIBilling(raw: unknown): ICAPIModelBilling | undefined;
63
- /**
64
- * Normalized model billing shape shared by CAPI-backed agents and the Copilot SDK model list.
65
- * Raw snake_case and current SDK fields are converted at the read boundary by {@link normalizeCAPIBilling}.
66
- */
67
- export interface ICAPIModelBilling {
68
- readonly multiplier?: number;
69
- /** Coarse price bucket surfaced as a tag in the model picker hover. */
70
- readonly priceCategory?: string;
71
- /** Whole-number percentage discount (0-100) for the synthetic `auto` model; rendered as a "{n}% discount" detail. */
72
- readonly discountPercent?: number;
73
- /** Promotional information for the model. A `discountPercent` of `0` is a valid message-only promo. */
74
- readonly promo?: {
75
- readonly id: string;
76
- readonly discountPercent: number;
77
- /** ISO 8601 end date; absent for open-ended promotions. */
78
- readonly endsAt?: string;
79
- readonly message: string;
80
- /** Whether the promo may be surfaced as a chat input banner. Absent means eligible; only `false` suppresses it. */
81
- readonly showBanner?: boolean;
82
- };
83
- readonly tokenPrices?: {
84
- readonly contextMax?: number;
85
- readonly inputPrice?: number;
86
- readonly cachePrice?: number;
87
- readonly cacheWritePrice?: number;
88
- readonly outputPrice?: number;
89
- readonly longContext?: {
90
- readonly contextMax?: number;
91
- readonly inputPrice?: number;
92
- readonly cachePrice?: number;
93
- readonly cacheWritePrice?: number;
94
- readonly outputPrice?: number;
95
- };
96
- };
97
- }
98
- /**
99
- * Converts a CAPI model's billing payload into an {@link IAgentModelPricingMeta} `_meta` bag. Long-context costs are
100
- * only emitted when there is an actual surcharge (at least one long-context price differs from the default tier).
101
- * When emitting, any missing long-context field falls back to the default-tier value so the hover table renders
102
- * complete rows. See {@link hasLongContextSurcharge} for the surcharge detection logic.
103
- *
104
- * @param billing - The model's billing info, narrowed through {@link ICAPIModelBilling}.
105
- * @param priceCategory - An optional override for the price category (e.g. from `modelPickerPriceCategory` on the
106
- * model object itself). Falls back to `billing.priceCategory` when not provided.
107
- * @param category - The model's capability category from its top-level `modelPickerCategory` field.
108
- */
109
- export declare function createPricingMetaFromBilling(billing: ICAPIModelBilling | undefined, priceCategory?: string, category?: string): Record<string, unknown> | undefined;
110
- /**
111
- * Whether the model's long-context tier has any cost that differs from its default tier.
112
- * Drives the context-size picker default: smaller tier when surcharged, full window when free.
113
- */
114
- export declare function hasLongContextSurcharge(billing: ICAPIModelBilling | undefined): boolean;