@serviceme/devtools-shared 2.0.1 → 2.0.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 (5) hide show
  1. package/dist/index.d.mts +1020 -1001
  2. package/dist/index.d.ts +1020 -1001
  3. package/dist/index.js +2306 -2350
  4. package/dist/index.mjs +2250 -2268
  5. package/package.json +5 -5
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ //#region src/ai/providers.types.d.ts
1
2
  /**
2
3
  * BYO Model Provider types — Phase 2 of the multi-vendor model
3
4
  * configuration system.
@@ -40,7 +41,7 @@
40
41
  * pre-fill baseUrl / displayName / default model list without
41
42
  * requiring the user to look up endpoint docs.
42
43
  */
43
- type ProviderType = "openai-compatible" | "anthropic-compatible" | "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita" | "agnes" | "medalsoft" | "sensenova" | "vscode-builtin";
44
+ export type ProviderType = "openai-compatible" | "anthropic-compatible" | "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita" | "agnes" | "medalsoft" | "sensenova" | "vscode-builtin";
44
45
  /**
45
46
  * Curated metadata for named, well-known models. Used as a
46
47
  * **fallback** when a `ProviderModel` entry omits one of the
@@ -72,46 +73,46 @@ type ProviderType = "openai-compatible" | "anthropic-compatible" | "minimax" | "
72
73
  * (CNY values from the per-region pricing pages on
73
74
  * https://api-docs.deepseek.com/quick_start/pricing)
74
75
  */
75
- interface CuratedModelMetadata {
76
- /** Short description for the picker's `detail` column. */
77
- detail: ModelDetail;
78
- /** Whether the model advertises vision. */
79
- imageInput: boolean;
80
- /** Whether the model supports tool calling. */
81
- toolCalling: boolean;
82
- /** USD pricing (per million tokens). */
83
- pricingUSD: ModelPricing;
84
- /** CNY pricing (per million tokens). */
85
- pricingCNY: ModelPricing;
86
- /** Tier tag for the picker's price column. */
87
- priceCategory: ModelPriceCategory;
88
- /** Thinking-dropdown schema (omit = no thinking dropdown). */
89
- thinkingSchema?: Exclude<ModelThinkingSchema, "none">;
90
- /**
91
- * Whether the endpoint additionally accepts the `reasoning_effort`
92
- * field (Zhipu official OpenAPI: "仅 GLM-5.2 及其以上模型支持",
93
- * fetched 2026-08-19). Distinct from {@link thinkingSchema}: the
94
- * 3-level dropdown rides every GLM-4.5+ model (thinking switch
95
- * on/off), while the effort field is a 5.2+ extra that older
96
- * endpoints may reject. Consumed by the OpenAI adapter to gate the
97
- * `reasoning_effort` wire field (mirrors `supportsReasoningEffort`
98
- * in `docs/references/GLM-for-copilot-main/src/consts.ts`).
99
- */
100
- supportsReasoningEffort?: boolean;
101
- /**
102
- * Context-window token caps. Centralized here (rather than as
103
- * magic numbers scattered across `BUILTIN_PROVIDER_PRESETS` call
104
- * sites) so every consumer — the named-vendor Add-form presets,
105
- * "Fetch from API" enrichment (`ProviderRegistry.fetchRemoteModels`),
106
- * and the chat-registration fallback
107
- * (`LmChatProviderRegistrar.resolveModelMetadata`) — agrees on the
108
- * same numbers for a given model id. Optional: a curated entry can
109
- * exist purely for capability/pricing metadata without token caps
110
- * (uncommon, but keeps the field honest for cases where only the
111
- * cost/capability data is verified).
112
- */
113
- maxInputTokens?: number;
114
- maxOutputTokens?: number;
76
+ export interface CuratedModelMetadata {
77
+ /** Short description for the picker's `detail` column. */
78
+ detail: ModelDetail;
79
+ /** Whether the model advertises vision. */
80
+ imageInput: boolean;
81
+ /** Whether the model supports tool calling. */
82
+ toolCalling: boolean;
83
+ /** USD pricing (per million tokens). */
84
+ pricingUSD: ModelPricing;
85
+ /** CNY pricing (per million tokens). */
86
+ pricingCNY: ModelPricing;
87
+ /** Tier tag for the picker's price column. */
88
+ priceCategory: ModelPriceCategory;
89
+ /** Thinking-dropdown schema (omit = no thinking dropdown). */
90
+ thinkingSchema?: Exclude<ModelThinkingSchema, "none">;
91
+ /**
92
+ * Whether the endpoint additionally accepts the `reasoning_effort`
93
+ * field (Zhipu official OpenAPI: "仅 GLM-5.2 及其以上模型支持",
94
+ * fetched 2026-08-19). Distinct from {@link thinkingSchema}: the
95
+ * 3-level dropdown rides every GLM-4.5+ model (thinking switch
96
+ * on/off), while the effort field is a 5.2+ extra that older
97
+ * endpoints may reject. Consumed by the OpenAI adapter to gate the
98
+ * `reasoning_effort` wire field (mirrors `supportsReasoningEffort`
99
+ * in `docs/references/GLM-for-copilot-main/src/consts.ts`).
100
+ */
101
+ supportsReasoningEffort?: boolean;
102
+ /**
103
+ * Context-window token caps. Centralized here (rather than as
104
+ * magic numbers scattered across `BUILTIN_PROVIDER_PRESETS` call
105
+ * sites) so every consumer — the named-vendor Add-form presets,
106
+ * "Fetch from API" enrichment (`ProviderRegistry.fetchRemoteModels`),
107
+ * and the chat-registration fallback
108
+ * (`LmChatProviderRegistrar.resolveModelMetadata`) — agrees on the
109
+ * same numbers for a given model id. Optional: a curated entry can
110
+ * exist purely for capability/pricing metadata without token caps
111
+ * (uncommon, but keeps the field honest for cases where only the
112
+ * cost/capability data is verified).
113
+ */
114
+ maxInputTokens?: number;
115
+ maxOutputTokens?: number;
115
116
  }
116
117
  /**
117
118
  * Short one-line description rendered in the VSCode chat model
@@ -119,7 +120,7 @@ interface CuratedModelMetadata {
119
120
  * surfaced separately as the picker's `tooltip` (multi-line). Kept
120
121
  * short (one sentence) so it fits on a single line in the picker.
121
122
  */
122
- type ModelDetail = string;
123
+ export type ModelDetail = string;
123
124
  /**
124
125
  * Pricing column metadata. Both the chat model picker and the
125
126
  * ProvidersTab form render this. `cacheRead` is the cache-hit cost
@@ -129,20 +130,20 @@ type ModelDetail = string;
129
130
  * provider has not published a cache-hit price; the picker shows
130
131
  * "(not published)" rather than a misleading zero.
131
132
  */
132
- interface ModelPricing {
133
- /** Input cost per million tokens (USD or CNY per `currencyForBaseUrl`). */
134
- input: number;
135
- /** Output cost per million tokens. */
136
- output: number;
137
- /** Cache-hit cost per million tokens. `null` = provider has not published one. */
138
- cacheRead: number | null;
133
+ export interface ModelPricing {
134
+ /** Input cost per million tokens (USD or CNY per `currencyForBaseUrl`). */
135
+ input: number;
136
+ /** Output cost per million tokens. */
137
+ output: number;
138
+ /** Cache-hit cost per million tokens. `null` = provider has not published one. */
139
+ cacheRead: number | null;
139
140
  }
140
141
  /**
141
142
  * Tier tag for the picker's price column. Aligned with the
142
143
  * upstream Copilot Chat price categories so the visual bucket
143
144
  * matches what GitHub Copilot uses for its own models.
144
145
  */
145
- type ModelPriceCategory = "low" | "medium" | "high" | "very_high";
146
+ export type ModelPriceCategory = "low" | "medium" | "high" | "very_high";
146
147
  /**
147
148
  * Thinking dropdown schema the picker renders beneath the model
148
149
  * name. The user's selection is delivered to
@@ -157,7 +158,7 @@ type ModelPriceCategory = "low" | "medium" | "high" | "very_high";
157
158
  * - `none` — picker hides the thinking dropdown
158
159
  * entirely (model has no configurable reasoning depth)
159
160
  */
160
- type ModelThinkingSchema = "thinkingEnabled" | "reasoningEffort" | "none";
161
+ export type ModelThinkingSchema = "thinkingEnabled" | "reasoningEffort" | "none";
161
162
  /**
162
163
  * One model that a provider exposes. Stable id within the provider.
163
164
  *
@@ -173,37 +174,37 @@ type ModelThinkingSchema = "thinkingEnabled" | "reasoningEffort" | "none";
173
174
  * just show up in the picker without the cost column or thinking
174
175
  * dropdown.
175
176
  */
176
- interface ProviderModel {
177
- /** Stable id within the provider (e.g. "deepseek-v4-flash", "MiniMax-M2.7") */
178
- id: string;
179
- /** Human-readable display name (defaults to id if omitted) */
180
- displayName?: string;
181
- /** Max input tokens (best-effort, may be approximate) */
182
- maxInputTokens?: number;
183
- /** Max output tokens */
184
- maxOutputTokens?: number;
185
- /** Short one-line description for the picker's `detail` column. */
186
- detail?: ModelDetail;
187
- /** Capability flags (advisory — adapter honors only what it supports) */
188
- capabilities?: {
189
- supportsImageToText?: boolean;
190
- supportsToolCalling?: boolean;
191
- };
192
- /**
193
- * Pricing block. Renders in the picker's `Input` / `Output` /
194
- * `Cache Read` columns when this model is selected. Currency is
195
- * resolved from `baseUrl` (minimaxi.com / deepseek.com → CNY,
196
- * minimax.io / others → USD); the same numeric value is shown
197
- * with the resolved currency symbol.
198
- */
199
- pricing?: ModelPricing;
200
- /** Tier tag for the picker's price column (default bucket per upstream). */
201
- priceCategory?: ModelPriceCategory;
202
- /**
203
- * Thinking-dropdown schema the picker renders for this model.
204
- * Omit (or set to `none`) to hide the dropdown entirely.
205
- */
206
- thinkingSchema?: ModelThinkingSchema;
177
+ export interface ProviderModel {
178
+ /** Stable id within the provider (e.g. "deepseek-v4-flash", "MiniMax-M2.7") */
179
+ id: string;
180
+ /** Human-readable display name (defaults to id if omitted) */
181
+ displayName?: string;
182
+ /** Max input tokens (best-effort, may be approximate) */
183
+ maxInputTokens?: number;
184
+ /** Max output tokens */
185
+ maxOutputTokens?: number;
186
+ /** Short one-line description for the picker's `detail` column. */
187
+ detail?: ModelDetail;
188
+ /** Capability flags (advisory — adapter honors only what it supports) */
189
+ capabilities?: {
190
+ supportsImageToText?: boolean;
191
+ supportsToolCalling?: boolean;
192
+ };
193
+ /**
194
+ * Pricing block. Renders in the picker's `Input` / `Output` /
195
+ * `Cache Read` columns when this model is selected. Currency is
196
+ * resolved from `baseUrl` (minimaxi.com / deepseek.com → CNY,
197
+ * minimax.io / others → USD); the same numeric value is shown
198
+ * with the resolved currency symbol.
199
+ */
200
+ pricing?: ModelPricing;
201
+ /** Tier tag for the picker's price column (default bucket per upstream). */
202
+ priceCategory?: ModelPriceCategory;
203
+ /**
204
+ * Thinking-dropdown schema the picker renders for this model.
205
+ * Omit (or set to `none`) to hide the dropdown entirely.
206
+ */
207
+ thinkingSchema?: ModelThinkingSchema;
207
208
  }
208
209
  /**
209
210
  * Per-model vision handling mode (BYOM-depth #3).
@@ -227,65 +228,65 @@ interface ProviderModel {
227
228
  * for text-only models and self-hosted gateways where inline
228
229
  * base64 is undesirable.
229
230
  */
230
- type ProviderVisionMode = "native" | "mcp";
231
+ export type ProviderVisionMode = "native" | "mcp";
231
232
  /**
232
233
  * Persisted provider configuration. `apiKeyRef` is the SecretStorage
233
234
  * key; the actual key never appears in this object after creation
234
235
  * (it's stored under `ms-devtools.providers.<id>.apiKey` and resolved
235
236
  * by `ProviderRegistry.getApiKey(id)`).
236
237
  */
237
- interface ProviderConfig {
238
- /** Stable identifier (UUID v4) — used as SecretStorage key suffix */
239
- id: string;
240
- /** UI-facing name, e.g. "MiniMax (prod)" */
241
- displayName: string;
242
- /** Provider type — picks the adapter */
243
- type: ProviderType;
244
- /** HTTP base URL (no trailing slash) */
245
- baseUrl: string;
246
- /** Reference to SecretStorage key. Format: "ms-devtools.providers.<id>.apiKey" */
247
- apiKeyRef: string;
248
- /** Models this provider exposes */
249
- models: ProviderModel[];
250
- /** Whether this provider is the user's default. At most one at a time. */
251
- isDefault?: boolean;
252
- /**
253
- * Whether this provider is active. `undefined` is treated as
254
- * `true` (pre-existing providers persisted before this field
255
- * existed default to enabled). Set to `false` to stop the
256
- * provider's models from being registered with `vscode.lm`
257
- * (see `LmChatProviderRegistrar`) without deleting the provider
258
- * config or its SecretStorage-held API key — the user can
259
- * re-enable it later without re-entering credentials.
260
- */
261
- enabled?: boolean;
262
- /**
263
- * MiniMax billing type for this provider's API key.
264
- * `token_plan` — key is on a coding plan; usage can be fetched via the coding_plan API.
265
- * `pay_as_you_go` — key is pure pay-as-you-go; no usage API available.
266
- * Ignored for non-minimax providers.
267
- */
268
- minimaxBillingType?: "token_plan" | "pay_as_you_go";
269
- /**
270
- * Per-provider vision handling mode (BYOM-depth #3). Defaults
271
- * to `"native"` when absent — the existing v0 behaviour,
272
- * byte-identical to the pre-BYOM-depth path. Set to `"mcp"`
273
- * to route image-bearing requests through the on-disk
274
- * placeholder path (useful for text-only models and self-
275
- * hosted gateways). See {@link ProviderVisionMode} for the
276
- * full contract.
277
- */
278
- visionMode?: ProviderVisionMode;
279
- /** Created / updated timestamps (informational) */
280
- createdAt: string;
281
- updatedAt: string;
282
- /**
283
- * Display order hint. Lower values sort first. User-added providers
284
- * that never had their order explicitly set default to `0`. Builtin
285
- * (`vscode-builtin`) is always injected at position `0` regardless
286
- * of this field — its sort order is fixed.
287
- */
288
- sortOrder?: number;
238
+ export interface ProviderConfig {
239
+ /** Stable identifier (UUID v4) — used as SecretStorage key suffix */
240
+ id: string;
241
+ /** UI-facing name, e.g. "MiniMax (prod)" */
242
+ displayName: string;
243
+ /** Provider type — picks the adapter */
244
+ type: ProviderType;
245
+ /** HTTP base URL (no trailing slash) */
246
+ baseUrl: string;
247
+ /** Reference to SecretStorage key. Format: "ms-devtools.providers.<id>.apiKey" */
248
+ apiKeyRef: string;
249
+ /** Models this provider exposes */
250
+ models: ProviderModel[];
251
+ /** Whether this provider is the user's default. At most one at a time. */
252
+ isDefault?: boolean;
253
+ /**
254
+ * Whether this provider is active. `undefined` is treated as
255
+ * `true` (pre-existing providers persisted before this field
256
+ * existed default to enabled). Set to `false` to stop the
257
+ * provider's models from being registered with `vscode.lm`
258
+ * (see `LmChatProviderRegistrar`) without deleting the provider
259
+ * config or its SecretStorage-held API key — the user can
260
+ * re-enable it later without re-entering credentials.
261
+ */
262
+ enabled?: boolean;
263
+ /**
264
+ * MiniMax billing type for this provider's API key.
265
+ * `token_plan` — key is on a coding plan; usage can be fetched via the coding_plan API.
266
+ * `pay_as_you_go` — key is pure pay-as-you-go; no usage API available.
267
+ * Ignored for non-minimax providers.
268
+ */
269
+ minimaxBillingType?: "token_plan" | "pay_as_you_go";
270
+ /**
271
+ * Per-provider vision handling mode (BYOM-depth #3). Defaults
272
+ * to `"native"` when absent — the existing v0 behaviour,
273
+ * byte-identical to the pre-BYOM-depth path. Set to `"mcp"`
274
+ * to route image-bearing requests through the on-disk
275
+ * placeholder path (useful for text-only models and self-
276
+ * hosted gateways). See {@link ProviderVisionMode} for the
277
+ * full contract.
278
+ */
279
+ visionMode?: ProviderVisionMode;
280
+ /** Created / updated timestamps (informational) */
281
+ createdAt: string;
282
+ updatedAt: string;
283
+ /**
284
+ * Display order hint. Lower values sort first. User-added providers
285
+ * that never had their order explicitly set default to `0`. Builtin
286
+ * (`vscode-builtin`) is always injected at position `0` regardless
287
+ * of this field — its sort order is fixed.
288
+ */
289
+ sortOrder?: number;
289
290
  }
290
291
  /**
291
292
  * Public-facing projection of {@link ProviderConfig}. Strips
@@ -295,9 +296,9 @@ interface ProviderConfig {
295
296
  * resolves it at chat time. `hasApiKey` is a boolean only — never
296
297
  * the actual value.
297
298
  */
298
- type PublicProvider = Omit<ProviderConfig, "apiKeyRef"> & {
299
- /** Whether this provider has a key configured (boolean only, never the value) */
300
- hasApiKey: boolean;
299
+ export type PublicProvider = Omit<ProviderConfig, "apiKeyRef"> & {
300
+ /** Whether this provider has a key configured (boolean only, never the value) */
301
+ hasApiKey: boolean;
301
302
  };
302
303
  /**
303
304
  * Result of a connectivity probe. `ok=true` means credentials +
@@ -306,19 +307,19 @@ type PublicProvider = Omit<ProviderConfig, "apiKeyRef"> & {
306
307
  * `sampleModelId` is the first model id the provider reported
307
308
  * (helpful when validating "does this base URL serve the models I expect").
308
309
  */
309
- interface ProviderTestResult {
310
- ok: boolean;
311
- latencyMs?: number;
312
- sampleModelId?: string;
313
- error?: string;
310
+ export interface ProviderTestResult {
311
+ ok: boolean;
312
+ latencyMs?: number;
313
+ sampleModelId?: string;
314
+ error?: string;
314
315
  }
315
316
  /**
316
317
  * Message types for the providers list. Used in `GetProviders` /
317
318
  * `ProvidersResponse` envelopes.
318
319
  */
319
- interface ProvidersResponsePayload {
320
- providers: PublicProvider[];
321
- defaultProviderId: string | null;
320
+ export interface ProvidersResponsePayload {
321
+ providers: PublicProvider[];
322
+ defaultProviderId: string | null;
322
323
  }
323
324
  /**
324
325
  * Payload for `AddProvider` / `UpdateProvider`. Does NOT include
@@ -329,101 +330,101 @@ interface ProvidersResponsePayload {
329
330
  * SecretStorage and never echoes it back. Pass empty string to
330
331
  * leave an existing key untouched on update.
331
332
  */
332
- interface ProviderMutationPayload {
333
- id?: string;
334
- displayName: string;
335
- type: ProviderType;
336
- baseUrl: string;
337
- apiKey: string;
338
- models: ProviderModel[];
339
- isDefault?: boolean;
340
- /** See {@link ProviderConfig.enabled}. Omit to leave unchanged on update / default to `true` on add. */
341
- enabled?: boolean;
342
- /** See {@link ProviderConfig.minimaxBillingType}. */
343
- minimaxBillingType?: "token_plan" | "pay_as_you_go";
344
- /**
345
- * See {@link ProviderConfig.visionMode} (2026-08-20 — surfaced in
346
- * the ProvidersTab form). Omit to leave unchanged on update /
347
- * default to `"native"` on add.
348
- */
349
- visionMode?: ProviderVisionMode;
333
+ export interface ProviderMutationPayload {
334
+ id?: string;
335
+ displayName: string;
336
+ type: ProviderType;
337
+ baseUrl: string;
338
+ apiKey: string;
339
+ models: ProviderModel[];
340
+ isDefault?: boolean;
341
+ /** See {@link ProviderConfig.enabled}. Omit to leave unchanged on update / default to `true` on add. */
342
+ enabled?: boolean;
343
+ /** See {@link ProviderConfig.minimaxBillingType}. */
344
+ minimaxBillingType?: "token_plan" | "pay_as_you_go";
345
+ /**
346
+ * See {@link ProviderConfig.visionMode} (2026-08-20 — surfaced in
347
+ * the ProvidersTab form). Omit to leave unchanged on update /
348
+ * default to `"native"` on add.
349
+ */
350
+ visionMode?: ProviderVisionMode;
350
351
  }
351
352
  /** Which vendor API to call for usage data. */
352
- type ProviderUsageKind = "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita";
353
+ export type ProviderUsageKind = "minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita";
353
354
  /**
354
355
  * One quota window (5h or weekly) from a coding-plan provider.
355
356
  * `utilizationPercent` is precomputed as `100 - remaining_percent`.
356
357
  */
357
- interface UsageWindow {
358
- /** 0..100 utilization */
359
- utilizationPercent: number;
360
- /** ISO 8601 reset time */
361
- resetsAt: string;
362
- /** Precomputed epoch ms (webview convenience) */
363
- resetsAtMs: number;
358
+ export interface UsageWindow {
359
+ /** 0..100 utilization */
360
+ utilizationPercent: number;
361
+ /** ISO 8601 reset time */
362
+ resetsAt: string;
363
+ /** Precomputed epoch ms (webview convenience) */
364
+ resetsAtMs: number;
364
365
  }
365
366
  /** MiniMax `/coding_plan/remains` response, normalised. */
366
- interface MinimaxUsage {
367
- kind: "minimax";
368
- /** 5-hour billing window (always present, derived from model_name === "general") */
369
- interval: UsageWindow;
370
- /** Weekly quota — only present when the account has a weekly cap. */
371
- weekly?: UsageWindow;
367
+ export interface MinimaxUsage {
368
+ kind: "minimax";
369
+ /** 5-hour billing window (always present, derived from model_name === "general") */
370
+ interval: UsageWindow;
371
+ /** Weekly quota — only present when the account has a weekly cap. */
372
+ weekly?: UsageWindow;
372
373
  }
373
374
  /**
374
375
  * Shared coding-plan usage for Kimi / Zhipu (same five_hour + optional weekly structure).
375
376
  * Parsed from their respective API responses into this normalised shape.
376
377
  */
377
- interface CodingPlanUsage {
378
- kind: "kimi" | "zhipu";
379
- /** Five-hour billing window */
380
- interval: UsageWindow;
381
- /** Weekly quota — only present when the account has a weekly cap. */
382
- weekly?: UsageWindow;
378
+ export interface CodingPlanUsage {
379
+ kind: "kimi" | "zhipu";
380
+ /** Five-hour billing window */
381
+ interval: UsageWindow;
382
+ /** Weekly quota — only present when the account has a weekly cap. */
383
+ weekly?: UsageWindow;
383
384
  }
384
385
  /** One currency row in a balance response. */
385
- interface BalanceEntry {
386
- currency: string;
387
- totalBalance: number;
386
+ export interface BalanceEntry {
387
+ currency: string;
388
+ totalBalance: number;
388
389
  }
389
390
  /** DeepSeek-specific balance entry (includes granted + topped-up breakdown). */
390
- interface DeepseekBalanceEntry {
391
- currency: string;
392
- totalBalance: number;
393
- grantedBalance?: number;
394
- toppedUpBalance?: number;
391
+ export interface DeepseekBalanceEntry {
392
+ currency: string;
393
+ totalBalance: number;
394
+ grantedBalance?: number;
395
+ toppedUpBalance?: number;
395
396
  }
396
397
  /** DeepSeek `/user/balance` response, normalised. */
397
- interface DeepseekUsage {
398
- kind: "deepseek";
399
- isAvailable: boolean;
400
- balances: DeepseekBalanceEntry[];
398
+ export interface DeepseekUsage {
399
+ kind: "deepseek";
400
+ isAvailable: boolean;
401
+ balances: DeepseekBalanceEntry[];
401
402
  }
402
403
  /**
403
404
  * Generic balance for StepFun / SiliconFlow / OpenRouter / Novita.
404
405
  * Each provider returns a different response shape; the parse function normalises
405
406
  * all four into this shared interface.
406
407
  */
407
- interface GenericBalanceUsage {
408
- kind: "stepfun" | "siliconflow" | "openrouter" | "novita";
409
- balances: BalanceEntry[];
408
+ export interface GenericBalanceUsage {
409
+ kind: "stepfun" | "siliconflow" | "openrouter" | "novita";
410
+ balances: BalanceEntry[];
410
411
  }
411
412
  /** Union of all supported vendor usage shapes. */
412
- type ProviderUsageData = MinimaxUsage | DeepseekUsage | CodingPlanUsage | GenericBalanceUsage;
413
+ export type ProviderUsageData = MinimaxUsage | DeepseekUsage | CodingPlanUsage | GenericBalanceUsage;
413
414
  /**
414
415
  * Result of a usage probe. `transient` governs the webview's keep-last-good
415
416
  * strategy: true = network/timeout (retry silently), false = deterministic
416
417
  * (auth/parse/4xx — drop last good, show hard error).
417
418
  */
418
- type ProviderUsageResult = {
419
- ok: true;
420
- data: ProviderUsageData;
421
- fetchedAtMs: number;
419
+ export type ProviderUsageResult = {
420
+ ok: true;
421
+ data: ProviderUsageData;
422
+ fetchedAtMs: number;
422
423
  } | {
423
- ok: false;
424
- transient: boolean;
425
- code: string;
426
- message: string;
424
+ ok: false;
425
+ transient: boolean;
426
+ code: string;
427
+ message: string;
427
428
  };
428
429
  /**
429
430
  * Cache_control capability declaration, keyed by provider type.
@@ -442,9 +443,9 @@ type ProviderUsageResult = {
442
443
  * == entire cache path is SKIPPED. Avoids 400 risk on unknown
443
444
  * upstreams.
444
445
  */
445
- interface ProviderCacheControlMetadata {
446
- /** Stable prompt-prefix cache declared by the upstream? (OpenAI path reads this) */
447
- supportsCacheControl?: boolean;
446
+ export interface ProviderCacheControlMetadata {
447
+ /** Stable prompt-prefix cache declared by the upstream? (OpenAI path reads this) */
448
+ supportsCacheControl?: boolean;
448
449
  }
449
450
  /**
450
451
  * A single known-good baseUrl candidate for a provider type, offered
@@ -452,12 +453,13 @@ interface ProviderCacheControlMetadata {
452
453
  * `<input>` stays freely editable — these are suggestions, not an
453
454
  * enum; the user can always type a custom endpoint.
454
455
  */
455
- interface ProviderBaseUrlPreset {
456
- /** Short human label distinguishing candidates (e.g. "国内" / "全球"). */
457
- label: string;
458
- baseUrl: string;
456
+ export interface ProviderBaseUrlPreset {
457
+ /** Short human label distinguishing candidates (e.g. "国内" / "全球"). */
458
+ label: string;
459
+ baseUrl: string;
459
460
  }
460
-
461
+ //#endregion
462
+ //#region src/ai/protocol.d.ts
461
463
  /**
462
464
  * Wire protocol implied by a `baseUrl`.
463
465
  *
@@ -488,8 +490,8 @@ interface ProviderBaseUrlPreset {
488
490
  * we do not currently support routing to Anthropic's own
489
491
  * production API (their models are first-class VSCode features).
490
492
  */
491
- type ProviderWireProtocol = "openai" | "anthropic";
492
- declare function protocolForBaseUrl(baseUrl: string): ProviderWireProtocol;
493
+ export type ProviderWireProtocol = "openai" | "anthropic";
494
+ export declare function protocolForBaseUrl(baseUrl: string): ProviderWireProtocol;
493
495
  /**
494
496
  * Resolve the actual `ProviderType` whose adapter should handle a
495
497
  * request with the given `configuredType` + `baseUrl`.
@@ -513,8 +515,9 @@ declare function protocolForBaseUrl(baseUrl: string): ProviderWireProtocol;
513
515
  * `configuredType` unchanged — these vendors don't publish an
514
516
  * alternate-protocol endpoint on the same host.
515
517
  */
516
- declare function effectiveAdapterType(configuredType: ProviderType, baseUrl: string): ProviderType;
517
-
518
+ export declare function effectiveAdapterType(configuredType: ProviderType, baseUrl: string): ProviderType;
519
+ //#endregion
520
+ //#region src/ai/providers.base-url.d.ts
518
521
  /**
519
522
  * Provider-type → known baseUrl candidates (e.g. mainland-China vs.
520
523
  * global endpoints for the same vendor, like Agnes/MiniMax/DeepSeek).
@@ -522,28 +525,30 @@ declare function effectiveAdapterType(configuredType: ProviderType, baseUrl: str
522
525
  * no runtime auto-switching reads this (that mechanism was removed;
523
526
  * see git history for the retired `autoSwitch` feature).
524
527
  */
525
- declare const PROVIDER_BASE_URL_PRESETS: Readonly<Record<ProviderType, readonly ProviderBaseUrlPreset[]>>;
528
+ export declare const PROVIDER_BASE_URL_PRESETS: Readonly<Record<ProviderType, readonly ProviderBaseUrlPreset[]>>;
526
529
  /**
527
530
  * Resolve the dropdown candidate list for a provider type. Returns
528
531
  * an empty array (NEVER throws) for `-compatible` types or provider
529
532
  * types the table doesn't cover.
530
533
  */
531
- declare function getProviderBaseUrlPresets(type: ProviderType): readonly ProviderBaseUrlPreset[];
532
-
534
+ export declare function getProviderBaseUrlPresets(type: ProviderType): readonly ProviderBaseUrlPreset[];
535
+ //#endregion
536
+ //#region src/ai/providers.cache-control.d.ts
533
537
  /**
534
538
  * Provider-type → cache_control capability lookup. Read by the
535
539
  * OpenAI adapter's `prompt_cache_key` decision (T-04) via
536
540
  * {@link isProviderCacheControlAware}.
537
541
  */
538
- declare const PROVIDER_CACHE_CONTROL_METADATA: Readonly<Record<ProviderType, ProviderCacheControlMetadata>>;
542
+ export declare const PROVIDER_CACHE_CONTROL_METADATA: Readonly<Record<ProviderType, ProviderCacheControlMetadata>>;
539
543
  /**
540
544
  * Does this provider type declare "stable prompt cache" support?
541
545
  * The OpenAI path reads this flag to decide whether to write
542
546
  * `prompt_cache_key`; the Anthropic path uses its own 4-breakpoint
543
547
  * logic and ignores this flag.
544
548
  */
545
- declare function isProviderCacheControlAware(type: ProviderType): boolean;
546
-
549
+ export declare function isProviderCacheControlAware(type: ProviderType): boolean;
550
+ //#endregion
551
+ //#region src/ai/providers.metadata.d.ts
547
552
  /**
548
553
  * Map of namespaced model ids (used by aggregator platforms like
549
554
  * SiliconFlow and Novita) to their primary entry. **Exported** so
@@ -556,9 +561,9 @@ declare function isProviderCacheControlAware(type: ProviderType): boolean;
556
561
  * aggregator alias, do it here so the merged `MODEL_METADATA`
557
562
  * auto-tracks the primary.
558
563
  */
559
- declare const NAMESPACE_ALIASES: Readonly<Record<string, string>>;
560
- declare const NAMESPACE_ALIAS_FAMILY: Readonly<Record<string, string>>;
561
- declare const MODEL_METADATA: Readonly<Record<string, CuratedModelMetadata>>;
564
+ export declare const NAMESPACE_ALIASES: Readonly<Record<string, string>>;
565
+ export declare const NAMESPACE_ALIAS_FAMILY: Readonly<Record<string, string>>;
566
+ export declare const MODEL_METADATA: Readonly<Record<string, CuratedModelMetadata>>;
562
567
  /**
563
568
  * Look up curated metadata for a model by its un-qualified id
564
569
  * (the part after the last `::` in a qualified id, or the raw id
@@ -567,7 +572,7 @@ declare const MODEL_METADATA: Readonly<Record<string, CuratedModelMetadata>>;
567
572
  * callers should then fall back to whatever the user typed into
568
573
  * the ProvidersTab.
569
574
  */
570
- declare function lookupModelMetadata(modelId: string): CuratedModelMetadata | undefined;
575
+ export declare function lookupModelMetadata(modelId: string): CuratedModelMetadata | undefined;
571
576
  /**
572
577
  * Resolve the currency for a baseUrl. Strict hostname match —
573
578
  * `api.minimaxi.com` and `api.minimaxi.cn` map to CNY (the China
@@ -585,8 +590,9 @@ declare function lookupModelMetadata(modelId: string): CuratedModelMetadata | un
585
590
  * the price those users actually pay. The DeepSeek entries pin the
586
591
  * PEAK tier (conservative worst-case; off-peak is exactly half).
587
592
  */
588
- declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
589
-
593
+ export declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
594
+ //#endregion
595
+ //#region src/ai/providers.presets.d.ts
590
596
  /**
591
597
  * Default configuration snippets shipped with named vendor types.
592
598
  *
@@ -638,7 +644,7 @@ declare function currencyForBaseUrl(baseUrl: string): "USD" | "CNY";
638
644
  * `PROVIDER_BASE_URL_PRESETS` dropdown or user-typed); the empty
639
645
  * `""` default picks USD as a safe fallback.
640
646
  */
641
- declare function buildPresetModel(id: string, displayName: string, baseUrl?: string): ProviderModel;
647
+ export declare function buildPresetModel(id: string, displayName: string, baseUrl?: string): ProviderModel;
642
648
  /**
643
649
  * Union a model row returned by the "Fetch from API" flow with its
644
650
  * curated preset metadata, when the id matches an entry in
@@ -690,18 +696,18 @@ declare function buildPresetModel(id: string, displayName: string, baseUrl?: str
690
696
  * so `lookupModelMetadata("deepseek-ai/DeepSeek-V4-Pro")` returns
691
697
  * the same object as `lookupModelMetadata("deepseek-v4-pro")`.
692
698
  */
693
- declare function unionProviderModelWithPreset(fetched: ProviderModel, baseUrl: string): ProviderModel;
699
+ export declare function unionProviderModelWithPreset(fetched: ProviderModel, baseUrl: string): ProviderModel;
694
700
  /**
695
701
  * One entry in the "Pick from preset" dropdown shown next to the
696
702
  * "+ Add model" button in ProvidersTab.
697
703
  */
698
- interface PresetModelListing {
699
- /** Canonical (primary, non-alias) model id; safe to feed to {@link buildPresetModel}. */
700
- id: string;
701
- /** Short human label; the dropdown option text. */
702
- displayName: string;
703
- /** Vendor family bucket — drives the `<optgroup>` grouping. */
704
- vendorFamily: string;
704
+ export interface PresetModelListing {
705
+ /** Canonical (primary, non-alias) model id; safe to feed to {@link buildPresetModel}. */
706
+ id: string;
707
+ /** Short human label; the dropdown option text. */
708
+ displayName: string;
709
+ /** Vendor family bucket — drives the `<optgroup>` grouping. */
710
+ vendorFamily: string;
705
711
  }
706
712
  /**
707
713
  * The list of vendor family groups shown in the preset dropdown.
@@ -716,7 +722,7 @@ interface PresetModelListing {
716
722
  * last because users on aggregators usually type the namespaced
717
723
  * id by hand rather than reach for a curated dropdown.
718
724
  */
719
- declare const PRESET_MODEL_FAMILIES: readonly string[];
725
+ export declare const PRESET_MODEL_FAMILIES: readonly string[];
720
726
  /**
721
727
  * The "Pick from preset" dropdown options — every curated primary
722
728
  * entry in `MODEL_METADATA` PLUS every alias tagged with an
@@ -755,7 +761,7 @@ declare const PRESET_MODEL_FAMILIES: readonly string[];
755
761
  * still rename the field after picking — this is just a starter
756
762
  * label.
757
763
  */
758
- declare const LISTABLE_PRESET_MODELS: readonly PresetModelListing[];
764
+ export declare const LISTABLE_PRESET_MODELS: readonly PresetModelListing[];
759
765
  /**
760
766
  * Group {@link LISTABLE_PRESET_MODELS} by `vendorFamily`, preserving
761
767
  * the order declared in {@link PRESET_MODEL_FAMILIES} (most-common
@@ -765,15 +771,15 @@ declare const LISTABLE_PRESET_MODELS: readonly PresetModelListing[];
765
771
  * Returns: array of `{ family, entries }` — the shape a UI
766
772
  * `<select>` renderer expects when building `<optgroup>`s.
767
773
  */
768
- interface PresetModelFamilyGroup {
769
- family: string;
770
- entries: readonly PresetModelListing[];
774
+ export interface PresetModelFamilyGroup {
775
+ family: string;
776
+ entries: readonly PresetModelListing[];
771
777
  }
772
- declare function listPresetModelGroups(): readonly PresetModelFamilyGroup[];
773
- declare const BUILTIN_PROVIDER_PRESETS: Readonly<Record<"minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita" | "agnes" | "medalsoft" | "sensenova", {
774
- displayName: string;
775
- baseUrl: string;
776
- models: ProviderModel[];
778
+ export declare function listPresetModelGroups(): readonly PresetModelFamilyGroup[];
779
+ export declare const BUILTIN_PROVIDER_PRESETS: Readonly<Record<"minimax" | "deepseek" | "kimi" | "zhipu" | "stepfun" | "siliconflow" | "openrouter" | "novita" | "agnes" | "medalsoft" | "sensenova", {
780
+ displayName: string;
781
+ baseUrl: string;
782
+ models: ProviderModel[];
777
783
  }>>;
778
784
  /**
779
785
  * Look up the curated friendly displayName for a model id. Two
@@ -814,18 +820,19 @@ declare const BUILTIN_PROVIDER_PRESETS: Readonly<Record<"minimax" | "deepseek" |
814
820
  * or "GLM-4.7 Flash" instead of the bare id right after the
815
821
  * fetch result lands.
816
822
  */
817
- declare function getPresetModelDisplayName(id: string): string | undefined;
823
+ export declare function getPresetModelDisplayName(id: string): string | undefined;
818
824
  /**
819
825
  * Look up the default config (displayName / baseUrl / models) for a
820
826
  * named vendor type. Returns `null` for the `-compatible` family —
821
827
  * those have no canned defaults; the user enters them by hand.
822
828
  */
823
- declare function getBuiltinProviderPreset(type: ProviderType): {
824
- displayName: string;
825
- baseUrl: string;
826
- models: ProviderModel[];
829
+ export declare function getBuiltinProviderPreset(type: ProviderType): {
830
+ displayName: string;
831
+ baseUrl: string;
832
+ models: ProviderModel[];
827
833
  } | null;
828
-
834
+ //#endregion
835
+ //#region src/ai-models.d.ts
829
836
  /**
830
837
  * Shared AI model types.
831
838
  *
@@ -842,10 +849,10 @@ declare function getBuiltinProviderPreset(type: ProviderType): {
842
849
  * `context.globalState` and used to select a model from
843
850
  * `vscode.lm.selectChatModels({ vendor, family })`.
844
851
  */
845
- interface AIModelConfig {
846
- vendor: string;
847
- family?: string;
848
- version?: string;
852
+ export interface AIModelConfig {
853
+ vendor: string;
854
+ family?: string;
855
+ version?: string;
849
856
  }
850
857
  /**
851
858
  * Webview-friendly projection of `vscode.LanguageModelChat`.
@@ -856,20 +863,21 @@ interface AIModelConfig {
856
863
  * Webview can render capability badges (tool calling, image input)
857
864
  * without a second round-trip.
858
865
  */
859
- interface AIModelInfo {
860
- id: string;
861
- name: string;
862
- vendor: string;
863
- family?: string;
864
- version?: string;
865
- maxInputTokens?: number;
866
- maxOutputTokens?: number;
867
- capabilities?: {
868
- supportsImageToText?: boolean;
869
- supportsToolCalling?: boolean;
870
- };
871
- }
872
-
866
+ export interface AIModelInfo {
867
+ id: string;
868
+ name: string;
869
+ vendor: string;
870
+ family?: string;
871
+ version?: string;
872
+ maxInputTokens?: number;
873
+ maxOutputTokens?: number;
874
+ capabilities?: {
875
+ supportsImageToText?: boolean;
876
+ supportsToolCalling?: boolean;
877
+ };
878
+ }
879
+ //#endregion
880
+ //#region src/certificate-bundle.d.ts
873
881
  /**
874
882
  * Certificate bundle download — wire types shared between the certificate
875
883
  * Webview (apps/webview-ui/src/certificate) and the extension panel service
@@ -879,58 +887,59 @@ interface AIModelInfo {
879
887
  * format and receiving the resulting zip.
880
888
  */
881
889
  /** Target formats that the extension can produce via `sslkit`. */
882
- type CertificateBundleFormat = "pem" | "pfx" | "crt" | "jks";
890
+ export type CertificateBundleFormat = "pem" | "pfx" | "crt" | "jks";
883
891
  /** Static metadata describing each supported bundle format — used by the UI
884
892
  * to render the format picker without hard-coding labels in two places. */
885
- interface CertificateBundleFormatDescriptor {
886
- readonly format: CertificateBundleFormat;
887
- /** Short label shown in the picker (e.g. "Nginx PEM"). */
888
- readonly label: string;
889
- /** One-line description of what the format is for. */
890
- readonly description: string;
891
- /** Icon name (lucide) for the picker button. */
892
- readonly icon: string;
893
- /** Whether this format requires a password (PFX / JKS). */
894
- readonly requiresPassword: boolean;
895
- /** Conventional file extension(s) for the primary artifact(s) the user
896
- * is downloading, shown in the picker subtitle. */
897
- readonly artifactExtension: string;
898
- }
899
- declare const CERTIFICATE_BUNDLE_FORMATS: readonly CertificateBundleFormatDescriptor[];
893
+ export interface CertificateBundleFormatDescriptor {
894
+ readonly format: CertificateBundleFormat;
895
+ /** Short label shown in the picker (e.g. "Nginx PEM"). */
896
+ readonly label: string;
897
+ /** One-line description of what the format is for. */
898
+ readonly description: string;
899
+ /** Icon name (lucide) for the picker button. */
900
+ readonly icon: string;
901
+ /** Whether this format requires a password (PFX / JKS). */
902
+ readonly requiresPassword: boolean;
903
+ /** Conventional file extension(s) for the primary artifact(s) the user
904
+ * is downloading, shown in the picker subtitle. */
905
+ readonly artifactExtension: string;
906
+ }
907
+ export declare const CERTIFICATE_BUNDLE_FORMATS: readonly CertificateBundleFormatDescriptor[];
900
908
  /** Request sent from the Webview when the user picks a format. */
901
- interface DownloadCertificateBundleRequest {
902
- id: string;
903
- format: CertificateBundleFormat;
904
- /** Override for the export password (PFX / JKS only). When omitted, the
905
- * extension falls back to the `ms-devtools.certificate.exportPassword`
906
- * setting; when that is unset, a strong random password is generated
907
- * per export. */
908
- password?: string;
909
+ export interface DownloadCertificateBundleRequest {
910
+ id: string;
911
+ format: CertificateBundleFormat;
912
+ /** Override for the export password (PFX / JKS only). When omitted, the
913
+ * extension falls back to the `ms-devtools.certificate.exportPassword`
914
+ * setting; when that is unset, a strong random password is generated
915
+ * per export. */
916
+ password?: string;
909
917
  }
910
918
  /** Response sent back to the Webview — same shape as the existing PEM bundle
911
919
  * download (filename + base64 zip), so the Webview side can reuse its
912
920
  * existing download helper without branching on format. */
913
- interface DownloadCertificateBundleResponse {
914
- success: boolean;
915
- filename?: string;
916
- mime?: string;
917
- base64?: string;
918
- error?: string;
921
+ export interface DownloadCertificateBundleResponse {
922
+ success: boolean;
923
+ filename?: string;
924
+ mime?: string;
925
+ base64?: string;
926
+ error?: string;
919
927
  }
920
928
  /** Feature availability reported by the extension to the Webview so the UI
921
929
  * can grey out formats whose prerequisites aren't met on this machine. */
922
- interface CertificateBundleEnvironmentSupport {
923
- /** `true` once `sslkit` was resolved via `node_modules/.bin` or PATH. */
924
- sslkitAvailable: boolean;
925
- /** `true` once `keytool` was found on PATH (required only for JKS). */
926
- jdkAvailable: boolean;
927
- /** Mirror of `msDevTools.certificate.exportPassword` — surfaces the
928
- * effective default (the configured value, or a freshly generated
929
- * random one when unset) so the UI doesn't have to subscribe to config
930
- * change events. */
931
- defaultPassword: string;
932
- }
933
-
930
+ export interface CertificateBundleEnvironmentSupport {
931
+ /** `true` once `sslkit` was resolved via `node_modules/.bin` or PATH. */
932
+ sslkitAvailable: boolean;
933
+ /** `true` once `keytool` was found on PATH (required only for JKS). */
934
+ jdkAvailable: boolean;
935
+ /** Mirror of `msDevTools.certificate.exportPassword` — surfaces the
936
+ * effective default (the configured value, or a freshly generated
937
+ * random one when unset) so the UI doesn't have to subscribe to config
938
+ * change events. */
939
+ defaultPassword: string;
940
+ }
941
+ //#endregion
942
+ //#region src/constants.d.ts
934
943
  /**
935
944
  * Medalsoft-internal infrastructure addresses.
936
945
  *
@@ -945,46 +954,47 @@ interface CertificateBundleEnvironmentSupport {
945
954
  * needs — ADL-003 forbids core → shared. Keep those in lock-step.
946
955
  */
947
956
  /** Medalsoft 内网 LLM 网关(OpenAI-compatible `/v1`),仅办公网可达。 */
948
- declare const MEDALSOFT_PRIVATE_GATEWAY_URL = "http://10.10.10.249:3000/v1";
957
+ export declare const MEDALSOFT_PRIVATE_GATEWAY_URL = "http://10.10.10.249:3000/v1";
949
958
  /** Medalsoft 私有 NuGet 源,仅办公网可达。 */
950
- declare const MEDALSOFT_NUGET_PRIVATE_SOURCE = "http://192.168.20.209:10010/nuget";
951
-
952
- type CopilotCustomizationScope = "workspace" | "personal";
953
- type CopilotCustomizationArtifactKind = "agent" | "skill" | "prompt" | "instruction" | "mcp" | "hook";
954
- type CopilotCustomizationInstallIntent = "available" | "selected" | "moving" | "removing";
955
- type CopilotCustomizationHealth = "healthy" | "missing" | "drifted" | "conflict" | "source-unavailable" | "unsupported";
956
- type CopilotCustomizationGate = "ready" | "approval-required" | "configuration-required";
957
- type CopilotCustomizationStatus = "healthy" | "action-required" | "blocked" | "not-enabled";
958
- interface CopilotArtifactStatePayload {
959
- intent: CopilotCustomizationInstallIntent;
960
- health: CopilotCustomizationHealth;
961
- gate: CopilotCustomizationGate;
962
- }
963
- interface CopilotArtifactSummaryPayload {
964
- id: string;
965
- packageId: string;
966
- kind: CopilotCustomizationArtifactKind;
967
- displayName: string;
968
- description?: string;
969
- installStrategy: "link" | "generated-config" | "approval-gated";
970
- risk: "none" | "review-required";
971
- }
972
- interface CopilotPackageInstallationPayload {
973
- packageId: string;
974
- scope: CopilotCustomizationScope;
975
- selectedArtifactIds: string[];
976
- pinnedVersion?: string;
977
- }
978
- interface CopilotPackageDefinitionPayload {
979
- id: string;
980
- sourceId: string;
981
- displayName: string;
982
- description?: string;
983
- version?: string;
984
- artifacts: CopilotArtifactSummaryPayload[];
985
- /** Whole-package registrar installation — the home package list shows
986
- * these; per-artifact v1 manifest plugins stay in enabled-content. */
987
- wholePackage?: boolean;
959
+ export declare const MEDALSOFT_NUGET_PRIVATE_SOURCE = "http://192.168.20.209:10010/nuget";
960
+ //#endregion
961
+ //#region src/copilot-customizations.d.ts
962
+ export type CopilotCustomizationScope = "workspace" | "personal";
963
+ export type CopilotCustomizationArtifactKind = "agent" | "skill" | "prompt" | "instruction" | "mcp" | "hook";
964
+ export type CopilotCustomizationInstallIntent = "available" | "selected" | "moving" | "removing";
965
+ export type CopilotCustomizationHealth = "healthy" | "missing" | "drifted" | "conflict" | "source-unavailable" | "unsupported";
966
+ export type CopilotCustomizationGate = "ready" | "approval-required" | "configuration-required";
967
+ export type CopilotCustomizationStatus = "healthy" | "action-required" | "blocked" | "not-enabled";
968
+ export interface CopilotArtifactStatePayload {
969
+ intent: CopilotCustomizationInstallIntent;
970
+ health: CopilotCustomizationHealth;
971
+ gate: CopilotCustomizationGate;
972
+ }
973
+ export interface CopilotArtifactSummaryPayload {
974
+ id: string;
975
+ packageId: string;
976
+ kind: CopilotCustomizationArtifactKind;
977
+ displayName: string;
978
+ description?: string;
979
+ installStrategy: "link" | "generated-config" | "approval-gated";
980
+ risk: "none" | "review-required";
981
+ }
982
+ export interface CopilotPackageInstallationPayload {
983
+ packageId: string;
984
+ scope: CopilotCustomizationScope;
985
+ selectedArtifactIds: string[];
986
+ pinnedVersion?: string;
987
+ }
988
+ export interface CopilotPackageDefinitionPayload {
989
+ id: string;
990
+ sourceId: string;
991
+ displayName: string;
992
+ description?: string;
993
+ version?: string;
994
+ artifacts: CopilotArtifactSummaryPayload[];
995
+ /** Whole-package registrar installation the home package list shows
996
+ * these; per-artifact v1 manifest plugins stay in enabled-content. */
997
+ wholePackage?: boolean;
988
998
  }
989
999
  /**
990
1000
  * Whole-package registrar install marker: the explicit `wholePackage`
@@ -992,16 +1002,16 @@ interface CopilotPackageDefinitionPayload {
992
1002
  * packages are PERSONAL-scope only — registrar-owned, so per-artifact
993
1003
  * scope actions (move to workspace) do not apply.
994
1004
  */
995
- declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
1005
+ export declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
996
1006
  /**
997
1007
  * Registrar record id (`repo:plugin`) from a view/package payload id
998
1008
  * (`repo::plugin`). Both spellings float around the wire; the registrar
999
1009
  * and the settings keys always use the single-colon form.
1000
1010
  */
1001
- declare function registrationIdFromPackageId(packageId: string): string;
1002
- interface CopilotArtifactViewPayload {
1003
- artifact: CopilotArtifactSummaryPayload;
1004
- state: CopilotArtifactStatePayload;
1011
+ export declare function registrationIdFromPackageId(packageId: string): string;
1012
+ export interface CopilotArtifactViewPayload {
1013
+ artifact: CopilotArtifactSummaryPayload;
1014
+ state: CopilotArtifactStatePayload;
1005
1015
  }
1006
1016
  /**
1007
1017
  * An installable plugin.json package found by scanning an enabled git
@@ -1010,78 +1020,79 @@ interface CopilotArtifactViewPayload {
1010
1020
  * `copilotCustomizations.list` result; `packageId` is directly usable
1011
1021
  * as the install input.
1012
1022
  */
1013
- interface CopilotAvailablePackagePayload {
1014
- /** `${sourceId}::${pluginId}` — directly usable as the install input. */
1015
- packageId: string;
1016
- sourceId: string;
1017
- displayName: string;
1018
- description?: string;
1019
- version?: string;
1020
- /** Full artifact summaries so the install preview can select artifacts. */
1021
- artifacts: CopilotArtifactSummaryPayload[];
1022
- /** Which scopes currently have this packageId installed (may be both). */
1023
- installedScopes: CopilotCustomizationScope[];
1024
- /** VS Code enablement (`chat.pluginLocations` value) for registered
1025
- * packages — overlaid extension-side; `undefined` for not-registered
1026
- * packages or older extension builds. */
1027
- enabled?: boolean;
1028
- }
1029
- interface CopilotPackageViewPayload {
1030
- definition: CopilotPackageDefinitionPayload;
1031
- installation: CopilotPackageInstallationPayload;
1032
- artifacts: CopilotArtifactViewPayload[];
1033
- selectedArtifactCount: number;
1034
- /** VS Code enablement for whole-package (registrar) rows —
1035
- * overlaid extension-side; `undefined` for artifact-level packages
1036
- * or older extension builds. */
1037
- enabled?: boolean;
1038
- status: CopilotCustomizationStatus;
1039
- }
1040
- interface CopilotSourceViewPayload {
1041
- id: string;
1042
- type: "marketplace" | "git" | "local";
1043
- displayName: string;
1044
- updateCapability: "pinned" | "live" | "none";
1045
- packages: CopilotPackageViewPayload[];
1023
+ export interface CopilotAvailablePackagePayload {
1024
+ /** `${sourceId}::${pluginId}` — directly usable as the install input. */
1025
+ packageId: string;
1026
+ sourceId: string;
1027
+ displayName: string;
1028
+ description?: string;
1029
+ version?: string;
1030
+ /** Full artifact summaries so the install preview can select artifacts. */
1031
+ artifacts: CopilotArtifactSummaryPayload[];
1032
+ /** Which scopes currently have this packageId installed (may be both). */
1033
+ installedScopes: CopilotCustomizationScope[];
1034
+ /** VS Code enablement (`chat.pluginLocations` value) for registered
1035
+ * packages — overlaid extension-side; `undefined` for not-registered
1036
+ * packages or older extension builds. */
1037
+ enabled?: boolean;
1038
+ }
1039
+ export interface CopilotPackageViewPayload {
1040
+ definition: CopilotPackageDefinitionPayload;
1041
+ installation: CopilotPackageInstallationPayload;
1042
+ artifacts: CopilotArtifactViewPayload[];
1043
+ selectedArtifactCount: number;
1044
+ /** VS Code enablement for whole-package (registrar) rows —
1045
+ * overlaid extension-side; `undefined` for artifact-level packages
1046
+ * or older extension builds. */
1047
+ enabled?: boolean;
1048
+ status: CopilotCustomizationStatus;
1049
+ }
1050
+ export interface CopilotSourceViewPayload {
1051
+ id: string;
1052
+ type: "marketplace" | "git" | "local";
1053
+ displayName: string;
1054
+ updateCapability: "pinned" | "live" | "none";
1055
+ packages: CopilotPackageViewPayload[];
1046
1056
  }
1047
1057
  /** Task 10 — normalized source record for the source manager UI. */
1048
- interface CopilotSourceRecordPayload {
1049
- id: string;
1050
- type: "marketplace" | "git" | "local";
1051
- displayName: string;
1052
- updateCapability: "pinned" | "live" | "none";
1053
- /** Whether the source content is currently materialized on disk. */
1054
- available: boolean;
1055
- /** Where this source is declared: "workspace" (manifest), "personal" (intent), or both. */
1056
- declaredIn: Array<"workspace" | "personal">;
1058
+ export interface CopilotSourceRecordPayload {
1059
+ id: string;
1060
+ type: "marketplace" | "git" | "local";
1061
+ displayName: string;
1062
+ updateCapability: "pinned" | "live" | "none";
1063
+ /** Whether the source content is currently materialized on disk. */
1064
+ available: boolean;
1065
+ /** Where this source is declared: "workspace" (manifest), "personal" (intent), or both. */
1066
+ declaredIn: Array<"workspace" | "personal">;
1057
1067
  }
1058
1068
  /** Task 10 — deterministic, side-effect-free package update preview. */
1059
- interface CopilotPackageUpdatePreviewPayload {
1060
- packageId: string;
1061
- fromVersion?: string;
1062
- toVersion: string;
1063
- addedArtifactIds: string[];
1064
- removedArtifactIds: string[];
1065
- changedArtifactIds: string[];
1066
- approvalInvalidatedArtifactIds: string[];
1067
- }
1068
- interface CopilotCustomizationViewPayload {
1069
- scope: CopilotCustomizationScope;
1070
- generatedAt: string;
1071
- sources: CopilotSourceViewPayload[];
1072
- packages: CopilotPackageViewPayload[];
1073
- attention: CopilotArtifactViewPayload[];
1074
- summary: {
1075
- packageCount: number;
1076
- enabledArtifactCount: number;
1077
- attentionCount: number;
1078
- };
1079
- legacyMigration?: {
1080
- count: number;
1081
- sourceLabel: "~/.agents";
1082
- };
1083
- }
1084
-
1069
+ export interface CopilotPackageUpdatePreviewPayload {
1070
+ packageId: string;
1071
+ fromVersion?: string;
1072
+ toVersion: string;
1073
+ addedArtifactIds: string[];
1074
+ removedArtifactIds: string[];
1075
+ changedArtifactIds: string[];
1076
+ approvalInvalidatedArtifactIds: string[];
1077
+ }
1078
+ export interface CopilotCustomizationViewPayload {
1079
+ scope: CopilotCustomizationScope;
1080
+ generatedAt: string;
1081
+ sources: CopilotSourceViewPayload[];
1082
+ packages: CopilotPackageViewPayload[];
1083
+ attention: CopilotArtifactViewPayload[];
1084
+ summary: {
1085
+ packageCount: number;
1086
+ enabledArtifactCount: number;
1087
+ attentionCount: number;
1088
+ };
1089
+ legacyMigration?: {
1090
+ count: number;
1091
+ sourceLabel: "~/.agents";
1092
+ };
1093
+ }
1094
+ //#endregion
1095
+ //#region src/device-auth.d.ts
1085
1096
  /**
1086
1097
  * Device-auth wire contract shared by the extension (signer) and the
1087
1098
  * server (verifier).
@@ -1100,19 +1111,19 @@ interface CopilotCustomizationViewPayload {
1100
1111
  * for the wire format.
1101
1112
  */
1102
1113
  /** Canonical header names — MUST match the server's verifier. */
1103
- declare const DeviceAuthHeaders: {
1104
- readonly deviceId: "x-ms-device-id";
1105
- readonly deviceSecret: "x-ms-device-secret";
1106
- readonly signature: "x-ms-device-signature";
1107
- readonly timestamp: "x-ms-device-timestamp";
1108
- readonly secretVersion: "x-ms-device-secret-version";
1114
+ export declare const DeviceAuthHeaders: {
1115
+ readonly deviceId: "x-ms-device-id";
1116
+ readonly deviceSecret: "x-ms-device-secret";
1117
+ readonly signature: "x-ms-device-signature";
1118
+ readonly timestamp: "x-ms-device-timestamp";
1119
+ readonly secretVersion: "x-ms-device-secret-version";
1109
1120
  };
1110
- interface DeviceRequestSignatureParams {
1111
- method: string;
1112
- path: string;
1113
- timestamp: number;
1114
- body: string;
1115
- secret: string;
1121
+ export interface DeviceRequestSignatureParams {
1122
+ method: string;
1123
+ path: string;
1124
+ timestamp: number;
1125
+ body: string;
1126
+ secret: string;
1116
1127
  }
1117
1128
  /**
1118
1129
  * Basis is `METHOD\nPATH\nTIMESTAMP\nBODY\nSECRET` (LF-joined, NOT JSON).
@@ -1123,8 +1134,9 @@ interface DeviceRequestSignatureParams {
1123
1134
  * shared barrel is consumed by browser bundles — `node:crypto` breaks
1124
1135
  * the vite/rollup build).
1125
1136
  */
1126
- declare function createDeviceRequestSignature(params: DeviceRequestSignatureParams): string;
1127
-
1137
+ export declare function createDeviceRequestSignature(params: DeviceRequestSignatureParams): string;
1138
+ //#endregion
1139
+ //#region src/git-utils.d.ts
1128
1140
  /**
1129
1141
  * Git URL Utilities
1130
1142
  *
@@ -1142,12 +1154,12 @@ declare function createDeviceRequestSignature(params: DeviceRequestSignaturePara
1142
1154
  * in `apps/server/src/app/api/v1/projects/_validators.ts`) consistent with
1143
1155
  * whatever the client already resolved and sent as `canonical_slug`.
1144
1156
  */
1145
- declare const GIT_REMOTE_HOST_ALIASES: Readonly<Record<string, string>>;
1157
+ export declare const GIT_REMOTE_HOST_ALIASES: Readonly<Record<string, string>>;
1146
1158
  /**
1147
1159
  * Apply {@link GIT_REMOTE_HOST_ALIASES} to an already-canonical `host/owner/repo`
1148
1160
  * slug string (as opposed to a raw Git URL — see `normalizeGitUrl` for that).
1149
1161
  */
1150
- declare function normalizeCanonicalSlug(slug: string): string;
1162
+ export declare function normalizeCanonicalSlug(slug: string): string;
1151
1163
  /**
1152
1164
  * Normalize a Git remote URL to a canonical slug: host/owner/repo
1153
1165
  * - Supports HTTPS, SSH, and SCP-like syntax
@@ -1157,42 +1169,43 @@ declare function normalizeCanonicalSlug(slug: string): string;
1157
1169
  *
1158
1170
  * @throws Error if the input cannot be parsed into a valid slug
1159
1171
  */
1160
- declare function normalizeGitUrl(input: string): string;
1172
+ export declare function normalizeGitUrl(input: string): string;
1161
1173
  /**
1162
1174
  * Validate whether a string matches the canonical slug format: host/owner/repo
1163
1175
  * Requires at least three segments (host + two path parts).
1164
1176
  * Allows percent-encoded characters (e.g. %20) for hosts like Azure DevOps
1165
1177
  * that permit spaces in project/repo names.
1166
1178
  */
1167
- declare function isValidCanonicalSlug(slug: string): boolean;
1168
-
1169
- interface GitHubUser {
1170
- id: number;
1171
- login: string;
1172
- email: string | null;
1173
- name: string | null;
1174
- avatar_url: string | null;
1175
- plan?: {
1176
- name: string;
1177
- space: number;
1178
- collaborators: number;
1179
- private_repos: number;
1180
- };
1181
- [key: string]: unknown;
1179
+ export declare function isValidCanonicalSlug(slug: string): boolean;
1180
+ //#endregion
1181
+ //#region src/github-api.d.ts
1182
+ export interface GitHubUser {
1183
+ id: number;
1184
+ login: string;
1185
+ email: string | null;
1186
+ name: string | null;
1187
+ avatar_url: string | null;
1188
+ plan?: {
1189
+ name: string;
1190
+ space: number;
1191
+ collaborators: number;
1192
+ private_repos: number;
1193
+ };
1194
+ [key: string]: unknown;
1182
1195
  }
1183
1196
  interface GitHubEmailRecord {
1184
- email: string;
1185
- primary: boolean;
1186
- verified: boolean;
1187
- visibility: "public" | "private" | null;
1197
+ email: string;
1198
+ primary: boolean;
1199
+ verified: boolean;
1200
+ visibility: "public" | "private" | null;
1188
1201
  }
1189
- type GitHubOrgMembershipStatus = "active" | "pending" | "not_member" | "forbidden" | "unauthorized";
1190
- interface GitHubOrgMembershipCheckResult {
1191
- status: GitHubOrgMembershipStatus;
1192
- httpStatus: number;
1193
- organization: string;
1194
- role: string | null;
1195
- directMembership: boolean | null;
1202
+ export type GitHubOrgMembershipStatus = "active" | "pending" | "not_member" | "forbidden" | "unauthorized";
1203
+ export interface GitHubOrgMembershipCheckResult {
1204
+ status: GitHubOrgMembershipStatus;
1205
+ httpStatus: number;
1206
+ organization: string;
1207
+ role: string | null;
1208
+ directMembership: boolean | null;
1196
1209
  }
1197
1210
  /**
1198
1211
  * Fetch user info from GitHub API
@@ -1200,19 +1213,19 @@ interface GitHubOrgMembershipCheckResult {
1200
1213
  * @returns GitHubUser object
1201
1214
  * @throws Error if request fails or token is invalid
1202
1215
  */
1203
- declare function fetchGitHubUser(token: string): Promise<GitHubUser>;
1216
+ export declare function fetchGitHubUser(token: string): Promise<GitHubUser>;
1204
1217
  declare function pickPreferredGitHubEmail(emails: GitHubEmailRecord[]): string | null;
1205
1218
  declare function sanitizeEmail(email: string | null | undefined): string | null;
1206
- declare const __internal: {
1207
- pickPreferredGitHubEmail: typeof pickPreferredGitHubEmail;
1208
- sanitizeEmail: typeof sanitizeEmail;
1219
+ export declare const __internal: {
1220
+ pickPreferredGitHubEmail: typeof pickPreferredGitHubEmail;
1221
+ sanitizeEmail: typeof sanitizeEmail;
1209
1222
  };
1210
1223
  /**
1211
1224
  * Fetch the authenticated user's membership details for a GitHub organization.
1212
1225
  * Uses the memberships list endpoint so callers can distinguish active, pending,
1213
1226
  * and indeterminate states instead of collapsing everything into a boolean.
1214
1227
  */
1215
- declare function getGitHubOrgMembership(token: string, org: string): Promise<GitHubOrgMembershipCheckResult>;
1228
+ export declare function getGitHubOrgMembership(token: string, org: string): Promise<GitHubOrgMembershipCheckResult>;
1216
1229
  /**
1217
1230
  * Check if the token owner is authorized for a given GitHub organization.
1218
1231
  * Uses the authenticated user's own token — works for both public and private membership.
@@ -1220,12 +1233,14 @@ declare function getGitHubOrgMembership(token: string, org: string): Promise<Git
1220
1233
  * @param token GitHub Personal Access Token or OAuth Access Token
1221
1234
  * @param org GitHub organization name
1222
1235
  */
1223
- declare function checkGitHubOrgMembership(token: string, org: string): Promise<boolean>;
1224
-
1225
- declare function isGitHubLocalEmail(email: string | null | undefined): boolean;
1226
- declare function buildGitHubLocalEmail(login: string): string;
1227
- declare function resolvePrimaryEmail(login: string, email: string | null | undefined): string;
1228
-
1236
+ export declare function checkGitHubOrgMembership(token: string, org: string): Promise<boolean>;
1237
+ //#endregion
1238
+ //#region src/github-user-email.d.ts
1239
+ export declare function isGitHubLocalEmail(email: string | null | undefined): boolean;
1240
+ export declare function buildGitHubLocalEmail(login: string): string;
1241
+ export declare function resolvePrimaryEmail(login: string, email: string | null | undefined): string;
1242
+ //#endregion
1243
+ //#region src/logger/index.d.ts
1229
1244
  /**
1230
1245
  * Unified, environment-agnostic logger contract for the SERVICEME monorepo.
1231
1246
  *
@@ -1243,11 +1258,11 @@ declare function resolvePrimaryEmail(login: string, email: string | null | undef
1243
1258
  * {@link createConsoleLogger} fallback defined here.
1244
1259
  */
1245
1260
  /** Severity levels, ordered low → high. */
1246
- declare enum LogLevel {
1247
- DEBUG = 0,
1248
- INFO = 1,
1249
- WARN = 2,
1250
- ERROR = 3
1261
+ export declare enum LogLevel {
1262
+ DEBUG = 0,
1263
+ INFO = 1,
1264
+ WARN = 2,
1265
+ ERROR = 3
1251
1266
  }
1252
1267
  /**
1253
1268
  * The logger contract every package implements / consumes.
@@ -1258,16 +1273,16 @@ declare enum LogLevel {
1258
1273
  * implementation can normalize / redact it; implementations SHOULD run
1259
1274
  * {@link normalizeErrorForLog} on that value before emitting.
1260
1275
  */
1261
- interface ILogger {
1262
- debug(message: string, ...args: unknown[]): void;
1263
- info(message: string, ...args: unknown[]): void;
1264
- warn(message: string, ...args: unknown[]): void;
1265
- error(message: string, error?: unknown, ...args: unknown[]): void;
1266
- setLevel(level: LogLevel): void;
1267
- /** Optional — file-backed loggers return their directory. */
1268
- getLogDir?(): string | undefined;
1269
- /** Optional — UI-backed loggers reveal their sink (e.g. an OutputChannel). */
1270
- show?(): void;
1276
+ export interface ILogger {
1277
+ debug(message: string, ...args: unknown[]): void;
1278
+ info(message: string, ...args: unknown[]): void;
1279
+ warn(message: string, ...args: unknown[]): void;
1280
+ error(message: string, error?: unknown, ...args: unknown[]): void;
1281
+ setLevel(level: LogLevel): void;
1282
+ /** Optional — file-backed loggers return their directory. */
1283
+ getLogDir?(): string | undefined;
1284
+ /** Optional — UI-backed loggers reveal their sink (e.g. an OutputChannel). */
1285
+ show?(): void;
1271
1286
  }
1272
1287
  /**
1273
1288
  * Normalize any thrown value into a serializable record for logging.
@@ -1279,7 +1294,7 @@ interface ILogger {
1279
1294
  * `apps/extension/src/core/logger/Logger.ts` so every package shares one
1280
1295
  * normalization path.
1281
1296
  */
1282
- declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1297
+ export declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1283
1298
  /**
1284
1299
  * Create a console-backed {@link ILogger}.
1285
1300
  *
@@ -1293,8 +1308,9 @@ declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1293
1308
  * This is the canonical fallback for packages without a richer sink (cli,
1294
1309
  * webview bootstrap, extension logger self-diagnostics).
1295
1310
  */
1296
- declare function createConsoleLogger(name: string): ILogger;
1297
-
1311
+ export declare function createConsoleLogger(name: string): ILogger;
1312
+ //#endregion
1313
+ //#region src/types/protocol-contracts.d.ts
1298
1314
  /**
1299
1315
  * Protocol Contract Types — single source of truth.
1300
1316
  *
@@ -1325,180 +1341,181 @@ declare function createConsoleLogger(name: string): ILogger;
1325
1341
  * the module stays self-contained (e.g. `ScheduledTaskV1`, `TaskWorkspaceRef`,
1326
1342
  * `TaskRunStatus`, `BridgeLinkMode`).
1327
1343
  */
1328
- type ScheduledTaskType = "command" | "shell" | "http_request" | "github_copilot_cli";
1329
- interface CommandPayload {
1330
- command: string;
1331
- args?: unknown[];
1332
- }
1333
- interface ShellPayload {
1334
- script: string;
1335
- cwd?: string;
1336
- /** Timeout in seconds. Omit for default 60s; use 0 for no limit. */
1337
- timeout?: number;
1338
- }
1339
- interface HttpRequestPayload {
1340
- url: string;
1341
- method: string;
1342
- headers?: Record<string, string>;
1343
- body?: string;
1344
- /** Timeout in seconds. Omit for default 30s; use 0 for no limit. */
1345
- timeout?: number;
1346
- }
1347
- interface GithubCopilotCliPayload {
1348
- prompt: string;
1349
- workspace?: string;
1350
- autopilot?: boolean;
1351
- allowTools?: string[];
1352
- /** Timeout in seconds. Omit for default 300s; use 0 for no limit. */
1353
- timeout?: number;
1354
- model?: string;
1355
- agent?: string;
1356
- }
1357
- type TaskPayload = CommandPayload | ShellPayload | HttpRequestPayload | GithubCopilotCliPayload;
1344
+ export type ScheduledTaskType = "command" | "shell" | "http_request" | "github_copilot_cli";
1345
+ export interface CommandPayload {
1346
+ command: string;
1347
+ args?: unknown[];
1348
+ }
1349
+ export interface ShellPayload {
1350
+ script: string;
1351
+ cwd?: string;
1352
+ /** Timeout in seconds. Omit for default 60s; use 0 for no limit. */
1353
+ timeout?: number;
1354
+ }
1355
+ export interface HttpRequestPayload {
1356
+ url: string;
1357
+ method: string;
1358
+ headers?: Record<string, string>;
1359
+ body?: string;
1360
+ /** Timeout in seconds. Omit for default 30s; use 0 for no limit. */
1361
+ timeout?: number;
1362
+ }
1363
+ export interface GithubCopilotCliPayload {
1364
+ prompt: string;
1365
+ workspace?: string;
1366
+ autopilot?: boolean;
1367
+ allowTools?: string[];
1368
+ /** Timeout in seconds. Omit for default 300s; use 0 for no limit. */
1369
+ timeout?: number;
1370
+ model?: string;
1371
+ agent?: string;
1372
+ }
1373
+ export type TaskPayload = CommandPayload | ShellPayload | HttpRequestPayload | GithubCopilotCliPayload;
1358
1374
  /** Reference to the workspace a scheduled task is bound to. Required by v2. */
1359
- interface TaskWorkspaceRef {
1360
- /** Absolute path to the workspace root. Required and unique. */
1361
- path: string;
1362
- /** Display name. Defaults to `path` basename; users may override. */
1363
- name: string;
1364
- /** `git@github.com:owner/repo.git` — auto-detected at task creation. */
1365
- gitRemote?: string;
1366
- /** Current branch — auto-detected at task creation; verified at execute. */
1367
- gitBranch?: string;
1368
- /** Last time the extension saw this workspace alive. */
1369
- lastSeenAt?: string;
1375
+ export interface TaskWorkspaceRef {
1376
+ /** Absolute path to the workspace root. Required and unique. */
1377
+ path: string;
1378
+ /** Display name. Defaults to `path` basename; users may override. */
1379
+ name: string;
1380
+ /** `git@github.com:owner/repo.git` — auto-detected at task creation. */
1381
+ gitRemote?: string;
1382
+ /** Current branch — auto-detected at task creation; verified at execute. */
1383
+ gitBranch?: string;
1384
+ /** Last time the extension saw this workspace alive. */
1385
+ lastSeenAt?: string;
1370
1386
  }
1371
1387
  /**
1372
1388
  * v1 task shape — kept for reading legacy `<workspace>/.serviceme/scheduled-tasks.json`
1373
1389
  * during migration. New code should always use {@link ScheduledTask} (v2).
1374
1390
  */
1375
- interface ScheduledTaskV1 {
1376
- id: string;
1377
- name: string;
1378
- description?: string;
1379
- enabled: boolean;
1380
- scheduleType: "cron" | "interval";
1381
- schedule: string;
1382
- taskType: ScheduledTaskType;
1383
- payload: TaskPayload;
1384
- createdAt: string;
1385
- updatedAt: string;
1391
+ export interface ScheduledTaskV1 {
1392
+ id: string;
1393
+ name: string;
1394
+ description?: string;
1395
+ enabled: boolean;
1396
+ scheduleType: "cron" | "interval";
1397
+ schedule: string;
1398
+ taskType: ScheduledTaskType;
1399
+ payload: TaskPayload;
1400
+ createdAt: string;
1401
+ updatedAt: string;
1386
1402
  }
1387
1403
  /** Runtime status of the most recent execution for a task. */
1388
- type TaskRunStatus = "ok" | "error" | "skipped";
1404
+ export type TaskRunStatus = "ok" | "error" | "skipped";
1389
1405
  /**
1390
1406
  * v2 scheduled task — adds required `workspace` reference and runtime metadata
1391
1407
  * fields. See `docs/architecture/skill-agent-v2-repo.md` §14.2.
1392
1408
  */
1393
- interface ScheduledTask extends ScheduledTaskV1 {
1394
- /** Required in v2. The workspace this task executes in. */
1395
- workspace: TaskWorkspaceRef;
1396
- /** ISO timestamp of the most recent execution. */
1397
- lastRunAt?: string;
1398
- /** Status of the most recent execution. */
1399
- lastRunStatus?: TaskRunStatus;
1400
- /** Error message from the most recent failed execution. */
1401
- lastRunError?: string;
1402
- /** Duration of the most recent execution, in milliseconds. */
1403
- lastRunDurationMs?: number;
1404
- /** Next scheduled run (computed by scheduler). */
1405
- nextRunAt?: string;
1406
- /** Total successful executions. */
1407
- runCount?: number;
1409
+ export interface ScheduledTask extends ScheduledTaskV1 {
1410
+ /** Required in v2. The workspace this task executes in. */
1411
+ workspace: TaskWorkspaceRef;
1412
+ /** ISO timestamp of the most recent execution. */
1413
+ lastRunAt?: string;
1414
+ /** Status of the most recent execution. */
1415
+ lastRunStatus?: TaskRunStatus;
1416
+ /** Error message from the most recent failed execution. */
1417
+ lastRunError?: string;
1418
+ /** Duration of the most recent execution, in milliseconds. */
1419
+ lastRunDurationMs?: number;
1420
+ /** Next scheduled run (computed by scheduler). */
1421
+ nextRunAt?: string;
1422
+ /** Total successful executions. */
1423
+ runCount?: number;
1408
1424
  }
1409
1425
  /** v2 config — single source of truth for the global scheduler. */
1410
- interface ScheduledTasksConfig {
1411
- version: 2;
1412
- tasks: ScheduledTask[];
1413
- }
1414
- type TaskExecutionStatus = "running" | "success" | "failure" | "timeout" | "cancelled";
1415
- interface TaskExecutionLog {
1416
- id: string;
1417
- taskId: string;
1418
- taskName: string;
1419
- startedAt: string;
1420
- finishedAt: string;
1421
- status: Exclude<TaskExecutionStatus, "running">;
1422
- output?: string;
1423
- error?: string;
1424
- }
1425
- type AgentToolRiskLevel = "high" | "medium" | "low";
1426
- interface AgentToolPermission {
1427
- tool: string;
1428
- riskLevel: AgentToolRiskLevel;
1429
- }
1430
- interface AgentPermissionSummary {
1431
- agentId: string;
1432
- agentName: string;
1433
- tools: AgentToolPermission[];
1434
- highRiskCount: number;
1435
- mediumRiskCount: number;
1436
- lowRiskCount: number;
1426
+ export interface ScheduledTasksConfig {
1427
+ version: 2;
1428
+ tasks: ScheduledTask[];
1429
+ }
1430
+ export type TaskExecutionStatus = "running" | "success" | "failure" | "timeout" | "cancelled";
1431
+ export interface TaskExecutionLog {
1432
+ id: string;
1433
+ taskId: string;
1434
+ taskName: string;
1435
+ startedAt: string;
1436
+ finishedAt: string;
1437
+ status: Exclude<TaskExecutionStatus, "running">;
1438
+ output?: string;
1439
+ error?: string;
1440
+ }
1441
+ export type AgentToolRiskLevel = "high" | "medium" | "low";
1442
+ export interface AgentToolPermission {
1443
+ tool: string;
1444
+ riskLevel: AgentToolRiskLevel;
1445
+ }
1446
+ export interface AgentPermissionSummary {
1447
+ agentId: string;
1448
+ agentName: string;
1449
+ tools: AgentToolPermission[];
1450
+ highRiskCount: number;
1451
+ mediumRiskCount: number;
1452
+ lowRiskCount: number;
1437
1453
  }
1438
1454
  /** Kinds of artifacts in the catalog. */
1439
- type BridgeSkillKind = "skill" | "agent";
1455
+ export type BridgeSkillKind = "skill" | "agent";
1440
1456
  /** Which side of the link is reported. Matches SkillLinker's `LinkMode`. */
1441
- type BridgeLinkMode = "symlink" | "junction" | "copy";
1457
+ export type BridgeLinkMode = "symlink" | "junction" | "copy";
1442
1458
  /** A single skill/agent entry inside a repo (SkillStore.SkillEntry). */
1443
- interface BridgeSkillRepoEntry {
1444
- repoId: string;
1445
- name: string;
1446
- kind: BridgeSkillKind;
1447
- /** Absolute path to the manifest file. */
1448
- manifestPath: string;
1449
- /** Absolute path to the entry's directory. */
1450
- dir: string;
1451
- /** Best-effort parsed frontmatter. */
1452
- frontmatter: Record<string, unknown>;
1453
- /** ISO timestamp of the manifest's mtime. */
1454
- modifiedAt: string;
1455
- /** Machine-local disable mark — true when the entry's link is removed
1456
- * on this machine while its installation intent stays. Overlaid by
1457
- * the bridge; absent on older CLIs. */
1458
- disabled?: boolean;
1459
+ export interface BridgeSkillRepoEntry {
1460
+ repoId: string;
1461
+ name: string;
1462
+ kind: BridgeSkillKind;
1463
+ /** Absolute path to the manifest file. */
1464
+ manifestPath: string;
1465
+ /** Absolute path to the entry's directory. */
1466
+ dir: string;
1467
+ /** Best-effort parsed frontmatter. */
1468
+ frontmatter: Record<string, unknown>;
1469
+ /** ISO timestamp of the manifest's mtime. */
1470
+ modifiedAt: string;
1471
+ /** Machine-local disable mark — true when the entry's link is removed
1472
+ * on this machine while its installation intent stays. Overlaid by
1473
+ * the bridge; absent on older CLIs. */
1474
+ disabled?: boolean;
1459
1475
  }
1460
1476
  /** A single file inside an entry (SkillStore.SkillFile). */
1461
- interface BridgeSkillRepoFile {
1462
- /** Path relative to the entry's directory. */
1463
- path: string;
1464
- /** UTF-8 content. */
1465
- content: string;
1477
+ export interface BridgeSkillRepoFile {
1478
+ /** Path relative to the entry's directory. */
1479
+ path: string;
1480
+ /** UTF-8 content. */
1481
+ content: string;
1466
1482
  }
1467
1483
  /** A symlink/junction currently present in a workspace or user (global) scope. */
1468
- interface BridgeLinkedSkill {
1469
- repoId: string;
1470
- name: string;
1471
- linkPath: string;
1472
- targetPath: string;
1473
- mode: BridgeLinkMode;
1474
- /** Which scope this link lives in — "workspace" or "user" (global, `~/.agents/...`). */
1475
- scope: "workspace" | "user";
1484
+ export interface BridgeLinkedSkill {
1485
+ repoId: string;
1486
+ name: string;
1487
+ linkPath: string;
1488
+ targetPath: string;
1489
+ mode: BridgeLinkMode;
1490
+ /** Which scope this link lives in — "workspace" or "user" (global, `~/.agents/...`). */
1491
+ scope: "workspace" | "user";
1476
1492
  }
1477
1493
  /** A single entry from `repos.json` (subset of RepoConfig). */
1478
- interface BridgeRepoEntry {
1479
- id: string;
1480
- name: string;
1481
- url: string;
1482
- branch: string;
1483
- enabled: boolean;
1484
- useProxy?: boolean;
1485
- writeEnabled: boolean;
1486
- source: "default" | "user";
1487
- description?: string;
1488
- addedAt: string;
1489
- lastSyncAt?: string;
1490
- lastSyncCommitSha?: string;
1491
- lastSyncStatus?: "ok" | "error";
1492
- lastSyncError?: string;
1494
+ export interface BridgeRepoEntry {
1495
+ id: string;
1496
+ name: string;
1497
+ url: string;
1498
+ branch: string;
1499
+ enabled: boolean;
1500
+ useProxy?: boolean;
1501
+ writeEnabled: boolean;
1502
+ source: "default" | "user";
1503
+ description?: string;
1504
+ addedAt: string;
1505
+ lastSyncAt?: string;
1506
+ lastSyncCommitSha?: string;
1507
+ lastSyncStatus?: "ok" | "error";
1508
+ lastSyncError?: string;
1493
1509
  }
1494
1510
  /** A single line of a sync run. */
1495
- interface BridgeRepoSyncPull {
1496
- repoId: string;
1497
- status: "ok" | "error";
1498
- commitSha?: string;
1499
- error?: string;
1511
+ export interface BridgeRepoSyncPull {
1512
+ repoId: string;
1513
+ status: "ok" | "error";
1514
+ commitSha?: string;
1515
+ error?: string;
1500
1516
  }
1501
-
1517
+ //#endregion
1518
+ //#region src/webview-contract.d.ts
1502
1519
  /**
1503
1520
  * Webview ↔ extension message-contract types.
1504
1521
  *
@@ -1515,180 +1532,181 @@ interface BridgeRepoSyncPull {
1515
1532
  * NOTE: `apps/webview-ui/src/types/index.ts` re-exports these so
1516
1533
  * existing webview imports keep working unchanged.
1517
1534
  */
1518
- interface ExternalTool {
1519
- id: string;
1520
- name: string;
1521
- url: string;
1522
- description?: string;
1523
- icon?: string;
1524
- isDefault?: boolean;
1525
- }
1526
- interface AzureProfile {
1527
- id: string;
1528
- name: string;
1529
- method: "FTP" | "MSDeploy";
1530
- host: string;
1531
- username?: string;
1532
- password?: string;
1533
- remotePath?: string;
1534
- port?: number;
1535
- }
1536
- interface ApiConfig {
1537
- schemaPath: string;
1538
- requestLibPath?: string;
1539
- projectName?: string;
1540
- namespace?: string;
1541
- serversPath?: string;
1542
- apiPrefix?: string;
1543
- mock?: boolean;
1544
- templatesFolder?: string;
1545
- enumStyle?: "string-literal" | "enum";
1546
- }
1547
-
1548
- declare enum WebviewMessageType {
1549
- WebviewReady = "webviewReady",
1550
- Ready = "ready",
1551
- Log = "log",
1552
- ExecuteCommand = "executeCommand",
1553
- OpenUrl = "openUrl",
1554
- UsePrompt = "usePrompt",
1555
- UpdateAzureProfiles = "updateAzureProfiles",
1556
- UpdateAzureProfile = "updateAzureProfile",
1557
- GetApiConfig = "getApiConfig",
1558
- UpdateApiConfig = "updateApiConfig",
1559
- SaveApiConfig = "saveApiConfig",
1560
- ApiConfigSaveFailed = "apiConfigSaveFailed",
1561
- ExportApiConfig = "exportApiConfig",
1562
- ImportApiConfig = "importApiConfig",
1563
- ApiConfigImported = "apiConfigImported",
1564
- AddExternalTool = "addExternalTool",
1565
- UpdateExternalTool = "updateExternalTool",
1566
- UpdateExternalTools = "updateExternalTools",
1567
- DeleteExternalTool = "deleteExternalTool",
1568
- ReorderExternalTools = "reorderExternalTools",
1569
- UpdateNgrokStatus = "updateNgrokStatus",
1570
- UpdateServerStatus = "updateServerStatus",
1571
- UpdateOcxStatus = "updateOcxStatus",
1572
- UpdateRtkStatus = "updateRtkStatus",
1573
- UpdateCodegraphStatus = "updateCodegraphStatus",
1574
- GetAuthState = "getAuthState",
1575
- UpdateAuthState = "updateAuthState",
1576
- Login = "login",
1577
- Logout = "logout",
1578
- GetAccounts = "getAccounts",
1579
- UpdateAccounts = "updateAccounts",
1580
- SwitchAccount = "switchAccount",
1581
- GetUserProfile = "getUserProfile",
1582
- UpdateUserProfile = "updateUserProfile",
1583
- UserProfileUpdated = "userProfileUpdated",
1584
- AddExtraEmail = "addExtraEmail",
1585
- DeleteExtraEmail = "deleteExtraEmail",
1586
- GetCalendarHolidays = "getCalendarHolidays",
1587
- UpdateCalendarHolidays = "updateCalendarHolidays",
1588
- GetCalendarLeaves = "getCalendarLeaves",
1589
- UpdateCalendarLeaves = "updateCalendarLeaves",
1590
- CreateCalendarLeave = "createCalendarLeave",
1591
- DeleteCalendarLeave = "deleteCalendarLeave",
1592
- GetCalendarNotes = "getCalendarNotes",
1593
- UpdateCalendarNotes = "updateCalendarNotes",
1594
- SaveCalendarNote = "saveCalendarNote",
1595
- GetCalendarMonthSchedule = "getCalendarMonthSchedule",
1596
- GetScheduledTasks = "getScheduledTasks",
1597
- UpdateScheduledTasks = "updateScheduledTasks",
1598
- CreateScheduledTask = "createScheduledTask",
1599
- EditScheduledTask = "editScheduledTask",
1600
- DeleteScheduledTask = "deleteScheduledTask",
1601
- ToggleScheduledTask = "toggleScheduledTask",
1602
- TriggerScheduledTask = "triggerScheduledTask",
1603
- CancelTaskExecution = "cancelTaskExecution",
1604
- GetTaskExecutionLogs = "getTaskExecutionLogs",
1605
- ClearTaskExecutionLogs = "clearTaskExecutionLogs",
1606
- UpdateTaskExecutionLogs = "updateTaskExecutionLogs",
1607
- UpdateTaskExecutionState = "updateTaskExecutionState",
1608
- GetCurrentWorkspace = "getCurrentWorkspace",
1609
- UpdateCurrentWorkspace = "updateCurrentWorkspace",
1610
- GetProviders = "getProviders",
1611
- ProvidersResponse = "providersResponse",
1612
- AddProvider = "addProvider",
1613
- UpdateProvider = "updateProvider",
1614
- RemoveProvider = "removeProvider",
1615
- SetDefaultProvider = "setDefaultProvider",
1616
- SetProviderEnabled = "setProviderEnabled",
1617
- SetProviderOrder = "setProviderOrder",
1618
- TestProvider = "testProvider",
1619
- ProviderTestResultMessage = "providerTestResult",
1620
- TestProviderModel = "testProviderModel",
1621
- ProviderTestModelResultMessage = "providerTestModelResult",
1622
- DefaultProviderChanged = "defaultProviderChanged",
1623
- FetchProviderModels = "fetchProviderModels",
1624
- FetchProviderModelsResult = "fetchProviderModelsResult",
1625
- GetProviderUsage = "getProviderUsage",
1626
- ProviderUsageResponse = "providerUsageResponse",
1627
- SetCacheControlEnabled = "setCacheControlEnabled",
1628
- GetByomSettings = "getByomSettings",
1629
- ByomSettingsResponse = "byomSettingsResponse",
1630
- ListSkillRepoEntries = "listSkillRepoEntries",
1631
- GetSkillRepoEntry = "getSkillRepoEntry",
1632
- InstallSkillRepoEntry = "installSkillRepoEntry",
1633
- ConvertSkillRepoEntryToSymlink = "convertSkillRepoEntryToSymlink",
1634
- UninstallSkillRepoEntry = "uninstallSkillRepoEntry",
1635
- SetSkillRepoEntryEnabled = "setSkillRepoEntryEnabled",
1636
- ListLinkedSkills = "listLinkedSkills",
1637
- UpdateSkillRepoCatalog = "updateSkillRepoCatalog",
1638
- UpdateSkillRepoInstall = "updateSkillRepoInstall",
1639
- UpdateLinkedSkills = "updateLinkedSkills",
1640
- CreateSkillRepoDraft = "createSkillRepoDraft",
1641
- CommitSkillRepoDraft = "commitSkillRepoDraft",
1642
- ListSkillRepoDrafts = "listSkillRepoDrafts",
1643
- DeleteSkillRepoDraft = "deleteSkillRepoDraft",
1644
- UpdateSkillRepoDraft = "updateSkillRepoDraft",
1645
- ListRepositories = "listRepositories",
1646
- AddRepository = "addRepository",
1647
- UpdateRepository = "updateRepository",
1648
- RemoveRepository = "removeRepository",
1649
- EnableRepository = "enableRepository",
1650
- DisableRepository = "disableRepository",
1651
- SyncRepository = "syncRepository",
1652
- SyncAllRepositories = "syncAllRepositories",
1653
- ResetParseCache = "resetParseCache",
1654
- ListCopilotPlugins = "listCopilotPlugins",
1655
- RegisterCopilotPlugin = "registerCopilotPlugin",
1656
- UnregisterCopilotPlugin = "unregisterCopilotPlugin",
1657
- SetCopilotPluginEnabled = "setCopilotPluginEnabled",
1658
- GetCopilotContentStatus = "getCopilotContentStatus",
1659
- RestoreCopilotContent = "restoreCopilotContent",
1660
- ApproveCopilotContent = "approveCopilotContent",
1661
- UpdateRepositoryList = "updateRepositoryList",
1662
- UpdateRepositoryAdd = "updateRepositoryAdd",
1663
- UpdateRepositoryUpdate = "updateRepositoryUpdate",
1664
- UpdateRepositoryRemove = "updateRepositoryRemove",
1665
- UpdateRepositoryToggle = "updateRepositoryToggle",
1666
- UpdateRepositorySyncResult = "updateRepositorySyncResult",
1667
- UpdateCopilotContentStatus = "updateCopilotContentStatus",
1668
- GetCopilotCustomizations = "getCopilotCustomizations",
1669
- SyncCopilotCustomizations = "syncCopilotCustomizations",
1670
- UpdateCopilotCustomizations = "updateCopilotCustomizations",
1671
- InstallCopilotPackage = "installCopilotPackage",
1672
- MoveCopilotPackage = "moveCopilotPackage",
1673
- UninstallCopilotPackage = "uninstallCopilotPackage",
1674
- ListCopilotSources = "listCopilotSources",
1675
- RemoveCopilotSource = "removeCopilotSource",
1676
- PreviewCopilotUpdate = "previewCopilotUpdate",
1677
- UpdateCopilotPackage = "updateCopilotPackage",
1678
- PreviewCopilotLegacy = "previewCopilotLegacy",
1679
- MigrateCopilotLegacy = "migrateCopilotLegacy",
1680
- UpdateCopilotSources = "updateCopilotSources",
1681
- UpdateCopilotUpdatePreview = "updateCopilotUpdatePreview",
1682
- UpdateCopilotLegacyPreview = "updateCopilotLegacyPreview",
1683
- GetUtilityModels = "getUtilityModels",
1684
- UtilityModelsResponse = "utilityModelsResponse",
1685
- UpdateUtilityModels = "updateUtilityModels",
1686
- GetServerProxyState = "getServerProxyState",
1687
- ServerProxyStateResponse = "serverProxyStateResponse",
1688
- SetServerProxyEnabled = "setServerProxyEnabled",
1689
- SetServerProxyAllowOverride = "setServerProxyAllowOverride",
1690
- GetCachedServerUrl = "getCachedServerUrl",
1691
- CachedServerUrlResponse = "cachedServerUrlResponse"
1535
+ export interface ExternalTool {
1536
+ id: string;
1537
+ name: string;
1538
+ url: string;
1539
+ description?: string;
1540
+ icon?: string;
1541
+ isDefault?: boolean;
1542
+ }
1543
+ export interface AzureProfile {
1544
+ id: string;
1545
+ name: string;
1546
+ method: "FTP" | "MSDeploy";
1547
+ host: string;
1548
+ username?: string;
1549
+ password?: string;
1550
+ remotePath?: string;
1551
+ port?: number;
1552
+ }
1553
+ export interface ApiConfig {
1554
+ schemaPath: string;
1555
+ requestLibPath?: string;
1556
+ projectName?: string;
1557
+ namespace?: string;
1558
+ serversPath?: string;
1559
+ apiPrefix?: string;
1560
+ mock?: boolean;
1561
+ templatesFolder?: string;
1562
+ enumStyle?: "string-literal" | "enum";
1563
+ }
1564
+ //#endregion
1565
+ //#region src/messages.d.ts
1566
+ export declare enum WebviewMessageType {
1567
+ WebviewReady = "webviewReady",
1568
+ Ready = "ready",
1569
+ Log = "log",
1570
+ ExecuteCommand = "executeCommand",
1571
+ OpenUrl = "openUrl",
1572
+ UsePrompt = "usePrompt",
1573
+ UpdateAzureProfiles = "updateAzureProfiles",
1574
+ UpdateAzureProfile = "updateAzureProfile",
1575
+ GetApiConfig = "getApiConfig",
1576
+ UpdateApiConfig = "updateApiConfig",
1577
+ SaveApiConfig = "saveApiConfig",
1578
+ ApiConfigSaveFailed = "apiConfigSaveFailed",
1579
+ ExportApiConfig = "exportApiConfig",
1580
+ ImportApiConfig = "importApiConfig",
1581
+ ApiConfigImported = "apiConfigImported",
1582
+ AddExternalTool = "addExternalTool",
1583
+ UpdateExternalTool = "updateExternalTool",
1584
+ UpdateExternalTools = "updateExternalTools",
1585
+ DeleteExternalTool = "deleteExternalTool",
1586
+ ReorderExternalTools = "reorderExternalTools",
1587
+ UpdateNgrokStatus = "updateNgrokStatus",
1588
+ UpdateServerStatus = "updateServerStatus",
1589
+ UpdateOcxStatus = "updateOcxStatus",
1590
+ UpdateRtkStatus = "updateRtkStatus",
1591
+ UpdateCodegraphStatus = "updateCodegraphStatus",
1592
+ GetAuthState = "getAuthState",
1593
+ UpdateAuthState = "updateAuthState",
1594
+ Login = "login",
1595
+ Logout = "logout",
1596
+ GetAccounts = "getAccounts",
1597
+ UpdateAccounts = "updateAccounts",
1598
+ SwitchAccount = "switchAccount",
1599
+ GetUserProfile = "getUserProfile",
1600
+ UpdateUserProfile = "updateUserProfile",
1601
+ UserProfileUpdated = "userProfileUpdated",
1602
+ AddExtraEmail = "addExtraEmail",
1603
+ DeleteExtraEmail = "deleteExtraEmail",
1604
+ GetCalendarHolidays = "getCalendarHolidays",
1605
+ UpdateCalendarHolidays = "updateCalendarHolidays",
1606
+ GetCalendarLeaves = "getCalendarLeaves",
1607
+ UpdateCalendarLeaves = "updateCalendarLeaves",
1608
+ CreateCalendarLeave = "createCalendarLeave",
1609
+ DeleteCalendarLeave = "deleteCalendarLeave",
1610
+ GetCalendarNotes = "getCalendarNotes",
1611
+ UpdateCalendarNotes = "updateCalendarNotes",
1612
+ SaveCalendarNote = "saveCalendarNote",
1613
+ GetCalendarMonthSchedule = "getCalendarMonthSchedule",
1614
+ GetScheduledTasks = "getScheduledTasks",
1615
+ UpdateScheduledTasks = "updateScheduledTasks",
1616
+ CreateScheduledTask = "createScheduledTask",
1617
+ EditScheduledTask = "editScheduledTask",
1618
+ DeleteScheduledTask = "deleteScheduledTask",
1619
+ ToggleScheduledTask = "toggleScheduledTask",
1620
+ TriggerScheduledTask = "triggerScheduledTask",
1621
+ CancelTaskExecution = "cancelTaskExecution",
1622
+ GetTaskExecutionLogs = "getTaskExecutionLogs",
1623
+ ClearTaskExecutionLogs = "clearTaskExecutionLogs",
1624
+ UpdateTaskExecutionLogs = "updateTaskExecutionLogs",
1625
+ UpdateTaskExecutionState = "updateTaskExecutionState",
1626
+ GetCurrentWorkspace = "getCurrentWorkspace",
1627
+ UpdateCurrentWorkspace = "updateCurrentWorkspace",
1628
+ GetProviders = "getProviders",
1629
+ ProvidersResponse = "providersResponse",
1630
+ AddProvider = "addProvider",
1631
+ UpdateProvider = "updateProvider",
1632
+ RemoveProvider = "removeProvider",
1633
+ SetDefaultProvider = "setDefaultProvider",
1634
+ SetProviderEnabled = "setProviderEnabled",
1635
+ SetProviderOrder = "setProviderOrder",
1636
+ TestProvider = "testProvider",
1637
+ ProviderTestResultMessage = "providerTestResult",
1638
+ TestProviderModel = "testProviderModel",
1639
+ ProviderTestModelResultMessage = "providerTestModelResult",
1640
+ DefaultProviderChanged = "defaultProviderChanged",
1641
+ FetchProviderModels = "fetchProviderModels",
1642
+ FetchProviderModelsResult = "fetchProviderModelsResult",
1643
+ GetProviderUsage = "getProviderUsage",
1644
+ ProviderUsageResponse = "providerUsageResponse",
1645
+ SetCacheControlEnabled = "setCacheControlEnabled",
1646
+ GetByomSettings = "getByomSettings",
1647
+ ByomSettingsResponse = "byomSettingsResponse",
1648
+ ListSkillRepoEntries = "listSkillRepoEntries",
1649
+ GetSkillRepoEntry = "getSkillRepoEntry",
1650
+ InstallSkillRepoEntry = "installSkillRepoEntry",
1651
+ ConvertSkillRepoEntryToSymlink = "convertSkillRepoEntryToSymlink",
1652
+ UninstallSkillRepoEntry = "uninstallSkillRepoEntry",
1653
+ SetSkillRepoEntryEnabled = "setSkillRepoEntryEnabled",
1654
+ ListLinkedSkills = "listLinkedSkills",
1655
+ UpdateSkillRepoCatalog = "updateSkillRepoCatalog",
1656
+ UpdateSkillRepoInstall = "updateSkillRepoInstall",
1657
+ UpdateLinkedSkills = "updateLinkedSkills",
1658
+ CreateSkillRepoDraft = "createSkillRepoDraft",
1659
+ CommitSkillRepoDraft = "commitSkillRepoDraft",
1660
+ ListSkillRepoDrafts = "listSkillRepoDrafts",
1661
+ DeleteSkillRepoDraft = "deleteSkillRepoDraft",
1662
+ UpdateSkillRepoDraft = "updateSkillRepoDraft",
1663
+ ListRepositories = "listRepositories",
1664
+ AddRepository = "addRepository",
1665
+ UpdateRepository = "updateRepository",
1666
+ RemoveRepository = "removeRepository",
1667
+ EnableRepository = "enableRepository",
1668
+ DisableRepository = "disableRepository",
1669
+ SyncRepository = "syncRepository",
1670
+ SyncAllRepositories = "syncAllRepositories",
1671
+ ResetParseCache = "resetParseCache",
1672
+ ListCopilotPlugins = "listCopilotPlugins",
1673
+ RegisterCopilotPlugin = "registerCopilotPlugin",
1674
+ UnregisterCopilotPlugin = "unregisterCopilotPlugin",
1675
+ SetCopilotPluginEnabled = "setCopilotPluginEnabled",
1676
+ GetCopilotContentStatus = "getCopilotContentStatus",
1677
+ RestoreCopilotContent = "restoreCopilotContent",
1678
+ ApproveCopilotContent = "approveCopilotContent",
1679
+ UpdateRepositoryList = "updateRepositoryList",
1680
+ UpdateRepositoryAdd = "updateRepositoryAdd",
1681
+ UpdateRepositoryUpdate = "updateRepositoryUpdate",
1682
+ UpdateRepositoryRemove = "updateRepositoryRemove",
1683
+ UpdateRepositoryToggle = "updateRepositoryToggle",
1684
+ UpdateRepositorySyncResult = "updateRepositorySyncResult",
1685
+ UpdateCopilotContentStatus = "updateCopilotContentStatus",
1686
+ GetCopilotCustomizations = "getCopilotCustomizations",
1687
+ SyncCopilotCustomizations = "syncCopilotCustomizations",
1688
+ UpdateCopilotCustomizations = "updateCopilotCustomizations",
1689
+ InstallCopilotPackage = "installCopilotPackage",
1690
+ MoveCopilotPackage = "moveCopilotPackage",
1691
+ UninstallCopilotPackage = "uninstallCopilotPackage",
1692
+ ListCopilotSources = "listCopilotSources",
1693
+ RemoveCopilotSource = "removeCopilotSource",
1694
+ PreviewCopilotUpdate = "previewCopilotUpdate",
1695
+ UpdateCopilotPackage = "updateCopilotPackage",
1696
+ PreviewCopilotLegacy = "previewCopilotLegacy",
1697
+ MigrateCopilotLegacy = "migrateCopilotLegacy",
1698
+ UpdateCopilotSources = "updateCopilotSources",
1699
+ UpdateCopilotUpdatePreview = "updateCopilotUpdatePreview",
1700
+ UpdateCopilotLegacyPreview = "updateCopilotLegacyPreview",
1701
+ GetUtilityModels = "getUtilityModels",
1702
+ UtilityModelsResponse = "utilityModelsResponse",
1703
+ UpdateUtilityModels = "updateUtilityModels",
1704
+ GetServerProxyState = "getServerProxyState",
1705
+ ServerProxyStateResponse = "serverProxyStateResponse",
1706
+ SetServerProxyEnabled = "setServerProxyEnabled",
1707
+ SetServerProxyAllowOverride = "setServerProxyAllowOverride",
1708
+ GetCachedServerUrl = "getCachedServerUrl",
1709
+ CachedServerUrlResponse = "cachedServerUrlResponse"
1692
1710
  }
1693
1711
  /**
1694
1712
  * Top-level const aliases for the BYO Utility Models message-type
@@ -1704,18 +1722,18 @@ declare enum WebviewMessageType {
1704
1722
  * sync; Task 5 (extension handler) uses the enum members, the webview
1705
1723
  * component + tests use the consts.
1706
1724
  */
1707
- declare const GetUtilityModels: "getUtilityModels";
1708
- declare const UtilityModelsResponse: "utilityModelsResponse";
1709
- declare const UpdateUtilityModels: "updateUtilityModels";
1710
- declare const SetCacheControlEnabled: "setCacheControlEnabled";
1711
- declare const GetByomSettings: "getByomSettings";
1712
- declare const ByomSettingsResponse: "byomSettingsResponse";
1713
- declare const GetServerProxyState: "getServerProxyState";
1714
- declare const ServerProxyStateResponse: "serverProxyStateResponse";
1715
- declare const SetServerProxyEnabled: "setServerProxyEnabled";
1716
- declare const SetServerProxyAllowOverride: "setServerProxyAllowOverride";
1717
- declare const GetCachedServerUrl: "getCachedServerUrl";
1718
- declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1725
+ export declare const GetUtilityModels: "getUtilityModels";
1726
+ export declare const UtilityModelsResponse: "utilityModelsResponse";
1727
+ export declare const UpdateUtilityModels: "updateUtilityModels";
1728
+ export declare const SetCacheControlEnabled: "setCacheControlEnabled";
1729
+ export declare const GetByomSettings: "getByomSettings";
1730
+ export declare const ByomSettingsResponse: "byomSettingsResponse";
1731
+ export declare const GetServerProxyState: "getServerProxyState";
1732
+ export declare const ServerProxyStateResponse: "serverProxyStateResponse";
1733
+ export declare const SetServerProxyEnabled: "setServerProxyEnabled";
1734
+ export declare const SetServerProxyAllowOverride: "setServerProxyAllowOverride";
1735
+ export declare const GetCachedServerUrl: "getCachedServerUrl";
1736
+ export declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1719
1737
  /**
1720
1738
  * Snapshot of the r7 server-proxy toggle (HTTP CONNECT through intranet
1721
1739
  * Server). Mirrors `IProxyConfigService`'s `ProxyState` shape so the
@@ -1728,24 +1746,24 @@ declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1728
1746
  * See `apps/extension/src/services/proxy/ProxyConfigService.ts` for
1729
1747
  * the authoritative source of truth.
1730
1748
  */
1731
- type ServerProxySupportMode = "off" | "on" | "fallback" | "override";
1732
- interface ServerProxySnapshot {
1733
- httpProxy: string | undefined;
1734
- httpProxyStrictSSL: boolean;
1735
- httpProxySupport: ServerProxySupportMode;
1736
- /** Self-flag at serverProxy.enabled; computed by the extension handler. */
1737
- enabled: boolean;
1738
- /**
1739
- * rev.21 — opt-in to bypass the `proxySupport === "override"`
1740
- * guard. Power users (e.g. corp environments that WANT all
1741
- * extensions including GitHub Copilot Chat to route through the
1742
- * corp tunnel) tick the "Allow under proxySupport=override"
1743
- * checkbox in the Webview; this flag is persisted to
1744
- * `~/.serviceme/server-proxy.json` alongside `enabled`.
1745
- */
1746
- allowOverride: boolean;
1747
- /** Last server URL we toggled ON with. Used for re-toggling and UI hint. */
1748
- lastServerUrl?: string;
1749
+ export type ServerProxySupportMode = "off" | "on" | "fallback" | "override";
1750
+ export interface ServerProxySnapshot {
1751
+ httpProxy: string | undefined;
1752
+ httpProxyStrictSSL: boolean;
1753
+ httpProxySupport: ServerProxySupportMode;
1754
+ /** Self-flag at serverProxy.enabled; computed by the extension handler. */
1755
+ enabled: boolean;
1756
+ /**
1757
+ * rev.21 — opt-in to bypass the `proxySupport === "override"`
1758
+ * guard. Power users (e.g. corp environments that WANT all
1759
+ * extensions including GitHub Copilot Chat to route through the
1760
+ * corp tunnel) tick the "Allow under proxySupport=override"
1761
+ * checkbox in the Webview; this flag is persisted to
1762
+ * `~/.serviceme/server-proxy.json` alongside `enabled`.
1763
+ */
1764
+ allowOverride: boolean;
1765
+ /** Last server URL we toggled ON with. Used for re-toggling and UI hint. */
1766
+ lastServerUrl?: string;
1749
1767
  }
1750
1768
  /**
1751
1769
  * Payload for `SetServerProxyEnabled`. The extension handler is the
@@ -1762,16 +1780,16 @@ interface ServerProxySnapshot {
1762
1780
  * applied as `http.proxy` even when `http.proxy` is currently empty.
1763
1781
  * Still subject to the `proxySupport !== "override"` server-side gate.
1764
1782
  */
1765
- interface ServerProxyTogglePayload {
1766
- enabled: boolean;
1767
- /** Optional — defaults to Workspace. */
1768
- target?: "workspace" | "global";
1769
- /**
1770
- * Optional — override the snapshot's `http.proxy` for the write.
1771
- * Only honoured when `enabled === true`; ignored on disable so the
1772
- * existing "only clear our own write" semantics stay intact.
1773
- */
1774
- serverUrl?: string;
1783
+ export interface ServerProxyTogglePayload {
1784
+ enabled: boolean;
1785
+ /** Optional — defaults to Workspace. */
1786
+ target?: "workspace" | "global";
1787
+ /**
1788
+ * Optional — override the snapshot's `http.proxy` for the write.
1789
+ * Only honoured when `enabled === true`; ignored on disable so the
1790
+ * existing "only clear our own write" semantics stay intact.
1791
+ */
1792
+ serverUrl?: string;
1775
1793
  }
1776
1794
  /**
1777
1795
  * rev.21 — payload for `SetServerProxyAllowOverride`. Toggles the
@@ -1779,8 +1797,8 @@ interface ServerProxyTogglePayload {
1779
1797
  * Persisted across VS Code restarts; defaults to `false` so users
1780
1798
  * must explicitly opt-in to the `override` mode bypass.
1781
1799
  */
1782
- interface ServerProxyAllowOverridePayload {
1783
- allowOverride: boolean;
1800
+ export interface ServerProxyAllowOverridePayload {
1801
+ allowOverride: boolean;
1784
1802
  }
1785
1803
  /**
1786
1804
  * Reply to `GetCachedServerUrl`. Carries the cached base URL resolved
@@ -1792,9 +1810,9 @@ interface ServerProxyAllowOverridePayload {
1792
1810
  * reachable Server — the Webview should hide the "Apply cached base
1793
1811
  * URL" affordance rather than offer a no-op button.
1794
1812
  */
1795
- interface CachedServerUrlSnapshot {
1796
- baseUrl: string | null;
1797
- httpProxySupport: ServerProxySupportMode;
1813
+ export interface CachedServerUrlSnapshot {
1814
+ baseUrl: string | null;
1815
+ httpProxySupport: ServerProxySupportMode;
1798
1816
  }
1799
1817
  /**
1800
1818
  * Where the three `msDevTools.utilityModels.*` settings (and their
@@ -1810,16 +1828,16 @@ interface CachedServerUrlSnapshot {
1810
1828
  * wins over a user value when both are present), so we only need to
1811
1829
  * write to ONE target — the other scope just naturally inherits.
1812
1830
  */
1813
- type UtilityModelScope = "user" | "workspace";
1831
+ export type UtilityModelScope = "user" | "workspace";
1814
1832
  /**
1815
1833
  * Per-field source for UI "this value comes from user / workspace /
1816
1834
  * default" indicators. Mirrors the `ConfigurationInspectionScope`
1817
1835
  * categories of `vscode.WorkspaceConfiguration.inspect(key)`.
1818
1836
  */
1819
- interface UtilityModelsSource {
1820
- small: "user" | "workspace" | "default";
1821
- medium: "user" | "workspace" | "default";
1822
- fallbackToCopilot: "user" | "workspace" | "default";
1837
+ export interface UtilityModelsSource {
1838
+ small: "user" | "workspace" | "default";
1839
+ medium: "user" | "workspace" | "default";
1840
+ fallbackToCopilot: "user" | "workspace" | "default";
1823
1841
  }
1824
1842
  /**
1825
1843
  * The value Copilot is ACTUALLY using right now — VS Code's real
@@ -1828,10 +1846,10 @@ interface UtilityModelsSource {
1828
1846
  * for editing. Computed via `configSection.get(key, default)`, the
1829
1847
  * same call VS Code itself uses to resolve a setting.
1830
1848
  */
1831
- interface UtilityModelsEffective {
1832
- small: string;
1833
- medium: string;
1834
- fallbackToCopilot: boolean;
1849
+ export interface UtilityModelsEffective {
1850
+ small: string;
1851
+ medium: string;
1852
+ fallbackToCopilot: boolean;
1835
1853
  }
1836
1854
  /**
1837
1855
  * Snapshot of the three msDevTools.utilityModels.* settings plus the
@@ -1855,17 +1873,17 @@ interface UtilityModelsEffective {
1855
1873
  * title always shows what's actually in effect regardless of which
1856
1874
  * scope tab happens to be open.
1857
1875
  */
1858
- interface UtilityModelsSnapshot {
1859
- small: string;
1860
- medium: string;
1861
- fallbackToCopilot: boolean;
1862
- enabledModelIds: string[];
1863
- /** Effective scope for the next write. Defaults to `"user"`. */
1864
- scope: UtilityModelScope;
1865
- /** Per-field source (which scope actually defined the value). */
1866
- source?: UtilityModelsSource;
1867
- /** The real merged value Copilot uses right now. See docstring above. */
1868
- effective: UtilityModelsEffective;
1876
+ export interface UtilityModelsSnapshot {
1877
+ small: string;
1878
+ medium: string;
1879
+ fallbackToCopilot: boolean;
1880
+ enabledModelIds: string[];
1881
+ /** Effective scope for the next write. Defaults to `"user"`. */
1882
+ scope: UtilityModelScope;
1883
+ /** Per-field source (which scope actually defined the value). */
1884
+ source?: UtilityModelsSource;
1885
+ /** The real merged value Copilot uses right now. See docstring above. */
1886
+ effective: UtilityModelsEffective;
1869
1887
  }
1870
1888
  /**
1871
1889
  * Partial-update payload for UpdateUtilityModels. Omit a field to
@@ -1876,11 +1894,11 @@ interface UtilityModelsSnapshot {
1876
1894
  * the previous scope; the first call (with no prior scope) defaults
1877
1895
  * to `"user"`.
1878
1896
  */
1879
- interface UpdateUtilityModelsPayload {
1880
- small?: string;
1881
- medium?: string;
1882
- fallbackToCopilot?: boolean;
1883
- scope?: UtilityModelScope;
1897
+ export interface UpdateUtilityModelsPayload {
1898
+ small?: string;
1899
+ medium?: string;
1900
+ fallbackToCopilot?: boolean;
1901
+ scope?: UtilityModelScope;
1884
1902
  }
1885
1903
  /**
1886
1904
  * Per-provider BYOM toggle payload. Used by `SetCacheControlEnabled` —
@@ -1892,9 +1910,9 @@ interface UpdateUtilityModelsPayload {
1892
1910
  * `msDevTools.byom.<providerId>.<key>` key that the
1893
1911
  * `LmChatProviderRegistrar` already reads on every chat invocation.
1894
1912
  */
1895
- interface ByomTogglePayload {
1896
- id: string;
1897
- enabled: boolean;
1913
+ export interface ByomTogglePayload {
1914
+ id: string;
1915
+ enabled: boolean;
1898
1916
  }
1899
1917
  /**
1900
1918
  * Snapshot of every BYOM provider's runtime toggles, keyed by
@@ -1907,16 +1925,16 @@ interface ByomTogglePayload {
1907
1925
  * `byomSettings.ts` default (`cacheEnabled: true`) — the Webview
1908
1926
  * does NOT need a separate "default" branch.
1909
1927
  */
1910
- type ByomSettingsSnapshot = Record<string, ByomProviderToggles>;
1928
+ export type ByomSettingsSnapshot = Record<string, ByomProviderToggles>;
1911
1929
  /**
1912
1930
  * Per-provider BYOM toggles. Mirrors the runtime contract in
1913
1931
  * `apps/extension/src/services/providers/byomSettings.ts`
1914
1932
  * (`ByomProviderToggles`) — keep the two in lock-step so a
1915
1933
  * `GetByomSettings` payload round-trips without reshape code.
1916
1934
  */
1917
- interface ByomProviderToggles {
1918
- /** P0.1 + P0.2 cache toggle — default TRUE (main-line decision Q1). */
1919
- cacheEnabled: boolean;
1935
+ export interface ByomProviderToggles {
1936
+ /** P0.1 + P0.2 cache toggle — default TRUE (main-line decision Q1). */
1937
+ cacheEnabled: boolean;
1920
1938
  }
1921
1939
  /**
1922
1940
  * Strict-typed shape for the inbound messages handled by
@@ -1929,65 +1947,65 @@ interface ByomProviderToggles {
1929
1947
  * Each variant lists ONLY the fields the hook actually reads; optional
1930
1948
  * fields are explicit (`tools?` / `profiles?` / `workspaceOpen`).
1931
1949
  */
1932
- type WebviewInboundMessage = {
1933
- type: typeof WebviewMessageType.UpdateRepositoryList;
1934
- repos: BridgeRepoEntry[];
1950
+ export type WebviewInboundMessage = {
1951
+ type: typeof WebviewMessageType.UpdateRepositoryList;
1952
+ repos: BridgeRepoEntry[];
1935
1953
  } | {
1936
- type: typeof WebviewMessageType.UpdateRepositoryUpdate;
1937
- repos: BridgeRepoEntry[];
1954
+ type: typeof WebviewMessageType.UpdateRepositoryUpdate;
1955
+ repos: BridgeRepoEntry[];
1938
1956
  } | {
1939
- type: typeof WebviewMessageType.UpdateSkillRepoCatalog;
1940
- entries?: BridgeSkillRepoEntry[];
1941
- workspaceOpen?: boolean;
1957
+ type: typeof WebviewMessageType.UpdateSkillRepoCatalog;
1958
+ entries?: BridgeSkillRepoEntry[];
1959
+ workspaceOpen?: boolean;
1942
1960
  } | {
1943
- type: typeof WebviewMessageType.UpdateLinkedSkills;
1944
- links: LinkedSkillPayloadEntry[];
1945
- kind: "skill" | "agent";
1961
+ type: typeof WebviewMessageType.UpdateLinkedSkills;
1962
+ links: LinkedSkillPayloadEntry[];
1963
+ kind: "skill" | "agent";
1946
1964
  } | {
1947
- type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1948
- entries: CopilotContentStatusEntry[];
1949
- changed: boolean;
1950
- workspaceOpen?: boolean;
1965
+ type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1966
+ entries: CopilotContentStatusEntry[];
1967
+ changed: boolean;
1968
+ workspaceOpen?: boolean;
1951
1969
  } | {
1952
- type: typeof WebviewMessageType.UpdateCopilotCustomizations;
1953
- view: CopilotCustomizationViewPayload;
1954
- /** Installable plugin.json packages from the enabled git
1955
- * sources. Optional: older CLI builds omit it. */
1956
- availablePackages?: CopilotAvailablePackagePayload[];
1970
+ type: typeof WebviewMessageType.UpdateCopilotCustomizations;
1971
+ view: CopilotCustomizationViewPayload;
1972
+ /** Installable plugin.json packages from the enabled git
1973
+ * sources. Optional: older CLI builds omit it. */
1974
+ availablePackages?: CopilotAvailablePackagePayload[];
1957
1975
  } | {
1958
- type: typeof WebviewMessageType.UpdateCopilotSources;
1959
- sources: CopilotSourceRecordPayload[];
1976
+ type: typeof WebviewMessageType.UpdateCopilotSources;
1977
+ sources: CopilotSourceRecordPayload[];
1960
1978
  } | {
1961
- type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1962
- preview: CopilotPackageUpdatePreviewPayload;
1979
+ type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1980
+ preview: CopilotPackageUpdatePreviewPayload;
1963
1981
  } | {
1964
- type: typeof WebviewMessageType.UpdateExternalTools;
1965
- tools?: ExternalTool[];
1982
+ type: typeof WebviewMessageType.UpdateExternalTools;
1983
+ tools?: ExternalTool[];
1966
1984
  } | {
1967
- type: typeof WebviewMessageType.UpdateNgrokStatus;
1968
- isRunning: boolean;
1985
+ type: typeof WebviewMessageType.UpdateNgrokStatus;
1986
+ isRunning: boolean;
1969
1987
  } | {
1970
- type: typeof WebviewMessageType.UpdateOcxStatus;
1971
- isRunning: boolean;
1988
+ type: typeof WebviewMessageType.UpdateOcxStatus;
1989
+ isRunning: boolean;
1972
1990
  } | {
1973
- type: typeof WebviewMessageType.UpdateRtkStatus;
1974
- installed: boolean;
1975
- version?: string;
1976
- workspaceEnabled: boolean;
1991
+ type: typeof WebviewMessageType.UpdateRtkStatus;
1992
+ installed: boolean;
1993
+ version?: string;
1994
+ workspaceEnabled: boolean;
1977
1995
  } | {
1978
- type: typeof WebviewMessageType.UpdateCodegraphStatus;
1979
- installed: boolean;
1980
- version?: string;
1981
- indexed: boolean;
1982
- mcpConfigured?: boolean;
1983
- hookInstalled?: boolean;
1984
- instructionsEnabled?: boolean;
1996
+ type: typeof WebviewMessageType.UpdateCodegraphStatus;
1997
+ installed: boolean;
1998
+ version?: string;
1999
+ indexed: boolean;
2000
+ mcpConfigured?: boolean;
2001
+ hookInstalled?: boolean;
2002
+ instructionsEnabled?: boolean;
1985
2003
  } | {
1986
- type: typeof WebviewMessageType.UpdateAzureProfiles;
1987
- profiles?: AzureProfile[];
2004
+ type: typeof WebviewMessageType.UpdateAzureProfiles;
2005
+ profiles?: AzureProfile[];
1988
2006
  } | {
1989
- type: typeof WebviewMessageType.UpdateApiConfig;
1990
- config: ApiConfig;
2007
+ type: typeof WebviewMessageType.UpdateApiConfig;
2008
+ config: ApiConfig;
1991
2009
  };
1992
2010
  /**
1993
2011
  * One entry inside the `UpdateLinkedSkills.links` array. Mirrors the
@@ -1995,10 +2013,10 @@ type WebviewInboundMessage = {
1995
2013
  * than re-declared at the call site) lets the discriminated union's
1996
2014
  * `links` field carry a real type instead of `unknown[]`.
1997
2015
  */
1998
- interface LinkedSkillPayloadEntry {
1999
- repoId: string;
2000
- name: string;
2001
- scope?: string;
2016
+ export interface LinkedSkillPayloadEntry {
2017
+ repoId: string;
2018
+ name: string;
2019
+ scope?: string;
2002
2020
  }
2003
2021
  /**
2004
2022
  * One entry inside the `UpdateCopilotContentStatus.entries` array.
@@ -2006,10 +2024,10 @@ interface LinkedSkillPayloadEntry {
2006
2024
  * (identity + status + optional message) so the webview can render the
2007
2025
  * reconciliation state without importing the protocol package.
2008
2026
  */
2009
- interface CopilotContentStatusEntry {
2010
- identity: string;
2011
- status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2012
- message?: string;
2027
+ export interface CopilotContentStatusEntry {
2028
+ identity: string;
2029
+ status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2030
+ message?: string;
2013
2031
  }
2014
2032
  /**
2015
2033
  * Task 7 — webview → extension install intent. Mirrors the Task 3
@@ -2019,64 +2037,66 @@ interface CopilotContentStatusEntry {
2019
2037
  * discovery preview blocks submission until the user picks one) and
2020
2038
  * is omitted for git / marketplace sources.
2021
2039
  */
2022
- interface InstallCopilotPackageAction {
2023
- type: WebviewMessageType.InstallCopilotPackage;
2024
- scope: "workspace" | "personal";
2025
- sourceId: string;
2026
- packageId: string;
2027
- artifactIds: string[];
2028
- pinnedVersion?: string;
2029
- localMode?: "live" | "private-workspace-override";
2040
+ export interface InstallCopilotPackageAction {
2041
+ type: WebviewMessageType.InstallCopilotPackage;
2042
+ scope: "workspace" | "personal";
2043
+ sourceId: string;
2044
+ packageId: string;
2045
+ artifactIds: string[];
2046
+ pinnedVersion?: string;
2047
+ localMode?: "live" | "private-workspace-override";
2030
2048
  }
2031
2049
  /** Task 9 — webview → extension move intent; workspaceDir is resolved extension-side. */
2032
- interface MoveCopilotPackageAction {
2033
- type: WebviewMessageType.MoveCopilotPackage;
2034
- packageId: string;
2035
- from: "workspace" | "personal";
2036
- to: "workspace" | "personal";
2050
+ export interface MoveCopilotPackageAction {
2051
+ type: WebviewMessageType.MoveCopilotPackage;
2052
+ packageId: string;
2053
+ from: "workspace" | "personal";
2054
+ to: "workspace" | "personal";
2037
2055
  }
2038
2056
  /** Task 9 — webview → extension uninstall intent; workspaceDir is resolved extension-side. */
2039
- interface UninstallCopilotPackageAction {
2040
- type: WebviewMessageType.UninstallCopilotPackage;
2041
- scope: "workspace" | "personal";
2042
- packageId: string;
2057
+ export interface UninstallCopilotPackageAction {
2058
+ type: WebviewMessageType.UninstallCopilotPackage;
2059
+ scope: "workspace" | "personal";
2060
+ packageId: string;
2043
2061
  }
2044
2062
  /** Task 10 — webview → extension source list intent; workspaceDir is resolved extension-side. */
2045
- interface ListCopilotSourcesAction {
2046
- type: WebviewMessageType.ListCopilotSources;
2047
- scope: "workspace" | "personal";
2063
+ export interface ListCopilotSourcesAction {
2064
+ type: WebviewMessageType.ListCopilotSources;
2065
+ scope: "workspace" | "personal";
2048
2066
  }
2049
2067
  /** Task 10 — webview → extension source removal intent; workspaceDir is resolved extension-side. */
2050
- interface RemoveCopilotSourceAction {
2051
- type: WebviewMessageType.RemoveCopilotSource;
2052
- scope: "workspace" | "personal";
2053
- sourceId: string;
2068
+ export interface RemoveCopilotSourceAction {
2069
+ type: WebviewMessageType.RemoveCopilotSource;
2070
+ scope: "workspace" | "personal";
2071
+ sourceId: string;
2054
2072
  }
2055
2073
  /** Task 10 — webview → extension update preview intent; workspaceDir is resolved extension-side. */
2056
- interface PreviewCopilotUpdateAction {
2057
- type: WebviewMessageType.PreviewCopilotUpdate;
2058
- scope: "workspace" | "personal";
2059
- packageId: string;
2060
- revision: string;
2061
- }
2062
-
2074
+ export interface PreviewCopilotUpdateAction {
2075
+ type: WebviewMessageType.PreviewCopilotUpdate;
2076
+ scope: "workspace" | "personal";
2077
+ packageId: string;
2078
+ revision: string;
2079
+ }
2080
+ //#endregion
2081
+ //#region src/scheduled-tasks.d.ts
2063
2082
  /** Live execution state pushed to webview during task execution */
2064
- interface TaskExecutionState {
2065
- executionId: string;
2066
- taskId: string;
2067
- taskName: string;
2068
- status: "running" | "success" | "failure" | "timeout" | "cancelled";
2069
- startedAt: string;
2070
- finishedAt?: string;
2071
- output: string;
2072
- error?: string;
2083
+ export interface TaskExecutionState {
2084
+ executionId: string;
2085
+ taskId: string;
2086
+ taskName: string;
2087
+ status: "running" | "success" | "failure" | "timeout" | "cancelled";
2088
+ startedAt: string;
2089
+ finishedAt?: string;
2090
+ output: string;
2091
+ error?: string;
2073
2092
  }
2074
2093
  /** Log file schema for .serviceme/scheduled-tasks-log.json */
2075
- interface ScheduledTasksLogFile {
2076
- version: 1;
2077
- logs: TaskExecutionLog[];
2094
+ export interface ScheduledTasksLogFile {
2095
+ version: 1;
2096
+ logs: TaskExecutionLog[];
2078
2097
  }
2079
-
2098
+ //#endregion
2099
+ //#region src/utils/safe-cast.d.ts
2080
2100
  /**
2081
2101
  * Environment-agnostic cast helpers.
2082
2102
  *
@@ -2096,7 +2116,7 @@ interface ScheduledTasksLogFile {
2096
2116
  * the runtime shape here. Keeping the cast in one place makes the intent
2097
2117
  * (and the assumption) explicit and grep-able.
2098
2118
  */
2099
- declare function parsePayload<T>(raw: unknown): T;
2119
+ export declare function parsePayload<T>(raw: unknown): T;
2100
2120
  /**
2101
2121
  * Best-effort extraction of an `AbortSignal` from an inbound request object.
2102
2122
  *
@@ -2108,7 +2128,7 @@ declare function parsePayload<T>(raw: unknown): T;
2108
2128
  * is the same as "no signal". In practice the request signal is always a real
2109
2129
  * `AbortSignal`, so behavior is unchanged for every production path.
2110
2130
  */
2111
- declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2131
+ export declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2112
2132
  /**
2113
2133
  * Parse a JSON string, returning `fallback` when parsing fails.
2114
2134
  *
@@ -2117,6 +2137,5 @@ declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2117
2137
  * with their own `.catch` so that a body-read failure still yields the same
2118
2138
  * fallback as a malformed-body failure).
2119
2139
  */
2120
- declare function safeJson<T>(text: string, fallback: T): T;
2121
-
2122
- export { type AIModelConfig, type AIModelInfo, type AgentPermissionSummary, type AgentToolPermission, type AgentToolRiskLevel, type ApiConfig, type AzureProfile, BUILTIN_PROVIDER_PRESETS, type BalanceEntry, type BridgeLinkMode, type BridgeLinkedSkill, type BridgeRepoEntry, type BridgeRepoSyncPull, type BridgeSkillKind, type BridgeSkillRepoEntry, type BridgeSkillRepoFile, type ByomProviderToggles, ByomSettingsResponse, type ByomSettingsSnapshot, type ByomTogglePayload, CERTIFICATE_BUNDLE_FORMATS, CachedServerUrlResponse, type CachedServerUrlSnapshot, type CertificateBundleEnvironmentSupport, type CertificateBundleFormat, type CertificateBundleFormatDescriptor, type CodingPlanUsage, type CommandPayload, type CopilotArtifactStatePayload, type CopilotArtifactSummaryPayload, type CopilotArtifactViewPayload, type CopilotAvailablePackagePayload, type CopilotContentStatusEntry, type CopilotCustomizationArtifactKind, type CopilotCustomizationGate, type CopilotCustomizationHealth, type CopilotCustomizationInstallIntent, type CopilotCustomizationScope, type CopilotCustomizationStatus, type CopilotCustomizationViewPayload, type CopilotPackageDefinitionPayload, type CopilotPackageInstallationPayload, type CopilotPackageUpdatePreviewPayload, type CopilotPackageViewPayload, type CopilotSourceRecordPayload, type CopilotSourceViewPayload, type CuratedModelMetadata, type DeepseekBalanceEntry, type DeepseekUsage, DeviceAuthHeaders, type DeviceRequestSignatureParams, type DownloadCertificateBundleRequest, type DownloadCertificateBundleResponse, type ExternalTool, GIT_REMOTE_HOST_ALIASES, type GenericBalanceUsage, GetByomSettings, GetCachedServerUrl, GetServerProxyState, GetUtilityModels, type GitHubOrgMembershipCheckResult, type GitHubOrgMembershipStatus, type GitHubUser, type GithubCopilotCliPayload, type HttpRequestPayload, type ILogger, type InstallCopilotPackageAction, LISTABLE_PRESET_MODELS, type LinkedSkillPayloadEntry, type ListCopilotSourcesAction, LogLevel, MEDALSOFT_NUGET_PRIVATE_SOURCE, MEDALSOFT_PRIVATE_GATEWAY_URL, MODEL_METADATA, type MinimaxUsage, type ModelDetail, type ModelPriceCategory, type ModelPricing, type ModelThinkingSchema, type MoveCopilotPackageAction, NAMESPACE_ALIASES, NAMESPACE_ALIAS_FAMILY, PRESET_MODEL_FAMILIES, PROVIDER_BASE_URL_PRESETS, PROVIDER_CACHE_CONTROL_METADATA, type PresetModelFamilyGroup, type PresetModelListing, type PreviewCopilotUpdateAction, type ProviderBaseUrlPreset, type ProviderCacheControlMetadata, type ProviderConfig, type ProviderModel, type ProviderMutationPayload, type ProviderTestResult, type ProviderType, type ProviderUsageData, type ProviderUsageKind, type ProviderUsageResult, type ProviderVisionMode, type ProviderWireProtocol, type ProvidersResponsePayload, type PublicProvider, type RemoveCopilotSourceAction, type ScheduledTask, type ScheduledTaskType, type ScheduledTaskV1, type ScheduledTasksConfig, type ScheduledTasksLogFile, type ServerProxyAllowOverridePayload, type ServerProxySnapshot, ServerProxyStateResponse, type ServerProxySupportMode, type ServerProxyTogglePayload, SetCacheControlEnabled, SetServerProxyAllowOverride, SetServerProxyEnabled, type ShellPayload, type TaskExecutionLog, type TaskExecutionState, type TaskExecutionStatus, type TaskPayload, type TaskRunStatus, type TaskWorkspaceRef, type UninstallCopilotPackageAction, UpdateUtilityModels, type UpdateUtilityModelsPayload, type UsageWindow, type UtilityModelScope, type UtilityModelsEffective, UtilityModelsResponse, type UtilityModelsSnapshot, type UtilityModelsSource, type WebviewInboundMessage, WebviewMessageType, __internal, asAbortSignal, buildGitHubLocalEmail, buildPresetModel, checkGitHubOrgMembership, createConsoleLogger, createDeviceRequestSignature, currencyForBaseUrl, effectiveAdapterType, fetchGitHubUser, getBuiltinProviderPreset, getGitHubOrgMembership, getPresetModelDisplayName, getProviderBaseUrlPresets, isGitHubLocalEmail, isProviderCacheControlAware, isValidCanonicalSlug, isWholePackageInstall, listPresetModelGroups, lookupModelMetadata, normalizeCanonicalSlug, normalizeErrorForLog, normalizeGitUrl, parsePayload, protocolForBaseUrl, registrationIdFromPackageId, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
2140
+ export declare function safeJson<T>(text: string, fallback: T): T;
2141
+ //#endregion