@serviceme/devtools-shared 2.0.0 → 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.
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,56 +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 (default "123456", matching `sslkit`). */
907
- 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;
908
917
  }
909
918
  /** Response sent back to the Webview — same shape as the existing PEM bundle
910
919
  * download (filename + base64 zip), so the Webview side can reuse its
911
920
  * existing download helper without branching on format. */
912
- interface DownloadCertificateBundleResponse {
913
- success: boolean;
914
- filename?: string;
915
- mime?: string;
916
- base64?: string;
917
- error?: string;
921
+ export interface DownloadCertificateBundleResponse {
922
+ success: boolean;
923
+ filename?: string;
924
+ mime?: string;
925
+ base64?: string;
926
+ error?: string;
918
927
  }
919
928
  /** Feature availability reported by the extension to the Webview so the UI
920
929
  * can grey out formats whose prerequisites aren't met on this machine. */
921
- interface CertificateBundleEnvironmentSupport {
922
- /** `true` once `sslkit` was resolved via `node_modules/.bin` or PATH. */
923
- sslkitAvailable: boolean;
924
- /** `true` once `keytool` was found on PATH (required only for JKS). */
925
- jdkAvailable: boolean;
926
- /** Mirror of `msDevTools.certificate.exportPassword` — surfaces the
927
- * effective default so the UI doesn't have to subscribe to config
928
- * change events. */
929
- defaultPassword: string;
930
- }
931
-
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
932
943
  /**
933
944
  * Medalsoft-internal infrastructure addresses.
934
945
  *
@@ -943,46 +954,47 @@ interface CertificateBundleEnvironmentSupport {
943
954
  * needs — ADL-003 forbids core → shared. Keep those in lock-step.
944
955
  */
945
956
  /** Medalsoft 内网 LLM 网关(OpenAI-compatible `/v1`),仅办公网可达。 */
946
- 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";
947
958
  /** Medalsoft 私有 NuGet 源,仅办公网可达。 */
948
- declare const MEDALSOFT_NUGET_PRIVATE_SOURCE = "http://192.168.20.209:10010/nuget";
949
-
950
- type CopilotCustomizationScope = "workspace" | "personal";
951
- type CopilotCustomizationArtifactKind = "agent" | "skill" | "prompt" | "instruction" | "mcp" | "hook";
952
- type CopilotCustomizationInstallIntent = "available" | "selected" | "moving" | "removing";
953
- type CopilotCustomizationHealth = "healthy" | "missing" | "drifted" | "conflict" | "source-unavailable" | "unsupported";
954
- type CopilotCustomizationGate = "ready" | "approval-required" | "configuration-required";
955
- type CopilotCustomizationStatus = "healthy" | "action-required" | "blocked" | "not-enabled";
956
- interface CopilotArtifactStatePayload {
957
- intent: CopilotCustomizationInstallIntent;
958
- health: CopilotCustomizationHealth;
959
- gate: CopilotCustomizationGate;
960
- }
961
- interface CopilotArtifactSummaryPayload {
962
- id: string;
963
- packageId: string;
964
- kind: CopilotCustomizationArtifactKind;
965
- displayName: string;
966
- description?: string;
967
- installStrategy: "link" | "generated-config" | "approval-gated";
968
- risk: "none" | "review-required";
969
- }
970
- interface CopilotPackageInstallationPayload {
971
- packageId: string;
972
- scope: CopilotCustomizationScope;
973
- selectedArtifactIds: string[];
974
- pinnedVersion?: string;
975
- }
976
- interface CopilotPackageDefinitionPayload {
977
- id: string;
978
- sourceId: string;
979
- displayName: string;
980
- description?: string;
981
- version?: string;
982
- artifacts: CopilotArtifactSummaryPayload[];
983
- /** Whole-package registrar installation — the home package list shows
984
- * these; per-artifact v1 manifest plugins stay in enabled-content. */
985
- 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;
986
998
  }
987
999
  /**
988
1000
  * Whole-package registrar install marker: the explicit `wholePackage`
@@ -990,10 +1002,16 @@ interface CopilotPackageDefinitionPayload {
990
1002
  * packages are PERSONAL-scope only — registrar-owned, so per-artifact
991
1003
  * scope actions (move to workspace) do not apply.
992
1004
  */
993
- declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
994
- interface CopilotArtifactViewPayload {
995
- artifact: CopilotArtifactSummaryPayload;
996
- state: CopilotArtifactStatePayload;
1005
+ export declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
1006
+ /**
1007
+ * Registrar record id (`repo:plugin`) from a view/package payload id
1008
+ * (`repo::plugin`). Both spellings float around the wire; the registrar
1009
+ * and the settings keys always use the single-colon form.
1010
+ */
1011
+ export declare function registrationIdFromPackageId(packageId: string): string;
1012
+ export interface CopilotArtifactViewPayload {
1013
+ artifact: CopilotArtifactSummaryPayload;
1014
+ state: CopilotArtifactStatePayload;
997
1015
  }
998
1016
  /**
999
1017
  * An installable plugin.json package found by scanning an enabled git
@@ -1002,78 +1020,79 @@ interface CopilotArtifactViewPayload {
1002
1020
  * `copilotCustomizations.list` result; `packageId` is directly usable
1003
1021
  * as the install input.
1004
1022
  */
1005
- interface CopilotAvailablePackagePayload {
1006
- /** `${sourceId}::${pluginId}` — directly usable as the install input. */
1007
- packageId: string;
1008
- sourceId: string;
1009
- displayName: string;
1010
- description?: string;
1011
- version?: string;
1012
- /** Full artifact summaries so the install preview can select artifacts. */
1013
- artifacts: CopilotArtifactSummaryPayload[];
1014
- /** Which scopes currently have this packageId installed (may be both). */
1015
- installedScopes: CopilotCustomizationScope[];
1016
- /** VS Code enablement (`chat.pluginLocations` value) for registered
1017
- * packages — overlaid extension-side; `undefined` for not-registered
1018
- * packages or older extension builds. */
1019
- enabled?: boolean;
1020
- }
1021
- interface CopilotPackageViewPayload {
1022
- definition: CopilotPackageDefinitionPayload;
1023
- installation: CopilotPackageInstallationPayload;
1024
- artifacts: CopilotArtifactViewPayload[];
1025
- selectedArtifactCount: number;
1026
- /** VS Code enablement for whole-package (registrar) rows —
1027
- * overlaid extension-side; `undefined` for artifact-level packages
1028
- * or older extension builds. */
1029
- enabled?: boolean;
1030
- status: CopilotCustomizationStatus;
1031
- }
1032
- interface CopilotSourceViewPayload {
1033
- id: string;
1034
- type: "marketplace" | "git" | "local";
1035
- displayName: string;
1036
- updateCapability: "pinned" | "live" | "none";
1037
- 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[];
1038
1056
  }
1039
1057
  /** Task 10 — normalized source record for the source manager UI. */
1040
- interface CopilotSourceRecordPayload {
1041
- id: string;
1042
- type: "marketplace" | "git" | "local";
1043
- displayName: string;
1044
- updateCapability: "pinned" | "live" | "none";
1045
- /** Whether the source content is currently materialized on disk. */
1046
- available: boolean;
1047
- /** Where this source is declared: "workspace" (manifest), "personal" (intent), or both. */
1048
- 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">;
1049
1067
  }
1050
1068
  /** Task 10 — deterministic, side-effect-free package update preview. */
1051
- interface CopilotPackageUpdatePreviewPayload {
1052
- packageId: string;
1053
- fromVersion?: string;
1054
- toVersion: string;
1055
- addedArtifactIds: string[];
1056
- removedArtifactIds: string[];
1057
- changedArtifactIds: string[];
1058
- approvalInvalidatedArtifactIds: string[];
1059
- }
1060
- interface CopilotCustomizationViewPayload {
1061
- scope: CopilotCustomizationScope;
1062
- generatedAt: string;
1063
- sources: CopilotSourceViewPayload[];
1064
- packages: CopilotPackageViewPayload[];
1065
- attention: CopilotArtifactViewPayload[];
1066
- summary: {
1067
- packageCount: number;
1068
- enabledArtifactCount: number;
1069
- attentionCount: number;
1070
- };
1071
- legacyMigration?: {
1072
- count: number;
1073
- sourceLabel: "~/.agents";
1074
- };
1075
- }
1076
-
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
1077
1096
  /**
1078
1097
  * Device-auth wire contract shared by the extension (signer) and the
1079
1098
  * server (verifier).
@@ -1092,19 +1111,19 @@ interface CopilotCustomizationViewPayload {
1092
1111
  * for the wire format.
1093
1112
  */
1094
1113
  /** Canonical header names — MUST match the server's verifier. */
1095
- declare const DeviceAuthHeaders: {
1096
- readonly deviceId: "x-ms-device-id";
1097
- readonly deviceSecret: "x-ms-device-secret";
1098
- readonly signature: "x-ms-device-signature";
1099
- readonly timestamp: "x-ms-device-timestamp";
1100
- 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";
1101
1120
  };
1102
- interface DeviceRequestSignatureParams {
1103
- method: string;
1104
- path: string;
1105
- timestamp: number;
1106
- body: string;
1107
- secret: string;
1121
+ export interface DeviceRequestSignatureParams {
1122
+ method: string;
1123
+ path: string;
1124
+ timestamp: number;
1125
+ body: string;
1126
+ secret: string;
1108
1127
  }
1109
1128
  /**
1110
1129
  * Basis is `METHOD\nPATH\nTIMESTAMP\nBODY\nSECRET` (LF-joined, NOT JSON).
@@ -1115,8 +1134,9 @@ interface DeviceRequestSignatureParams {
1115
1134
  * shared barrel is consumed by browser bundles — `node:crypto` breaks
1116
1135
  * the vite/rollup build).
1117
1136
  */
1118
- declare function createDeviceRequestSignature(params: DeviceRequestSignatureParams): string;
1119
-
1137
+ export declare function createDeviceRequestSignature(params: DeviceRequestSignatureParams): string;
1138
+ //#endregion
1139
+ //#region src/git-utils.d.ts
1120
1140
  /**
1121
1141
  * Git URL Utilities
1122
1142
  *
@@ -1134,12 +1154,12 @@ declare function createDeviceRequestSignature(params: DeviceRequestSignaturePara
1134
1154
  * in `apps/server/src/app/api/v1/projects/_validators.ts`) consistent with
1135
1155
  * whatever the client already resolved and sent as `canonical_slug`.
1136
1156
  */
1137
- declare const GIT_REMOTE_HOST_ALIASES: Readonly<Record<string, string>>;
1157
+ export declare const GIT_REMOTE_HOST_ALIASES: Readonly<Record<string, string>>;
1138
1158
  /**
1139
1159
  * Apply {@link GIT_REMOTE_HOST_ALIASES} to an already-canonical `host/owner/repo`
1140
1160
  * slug string (as opposed to a raw Git URL — see `normalizeGitUrl` for that).
1141
1161
  */
1142
- declare function normalizeCanonicalSlug(slug: string): string;
1162
+ export declare function normalizeCanonicalSlug(slug: string): string;
1143
1163
  /**
1144
1164
  * Normalize a Git remote URL to a canonical slug: host/owner/repo
1145
1165
  * - Supports HTTPS, SSH, and SCP-like syntax
@@ -1149,42 +1169,43 @@ declare function normalizeCanonicalSlug(slug: string): string;
1149
1169
  *
1150
1170
  * @throws Error if the input cannot be parsed into a valid slug
1151
1171
  */
1152
- declare function normalizeGitUrl(input: string): string;
1172
+ export declare function normalizeGitUrl(input: string): string;
1153
1173
  /**
1154
1174
  * Validate whether a string matches the canonical slug format: host/owner/repo
1155
1175
  * Requires at least three segments (host + two path parts).
1156
1176
  * Allows percent-encoded characters (e.g. %20) for hosts like Azure DevOps
1157
1177
  * that permit spaces in project/repo names.
1158
1178
  */
1159
- declare function isValidCanonicalSlug(slug: string): boolean;
1160
-
1161
- interface GitHubUser {
1162
- id: number;
1163
- login: string;
1164
- email: string | null;
1165
- name: string | null;
1166
- avatar_url: string | null;
1167
- plan?: {
1168
- name: string;
1169
- space: number;
1170
- collaborators: number;
1171
- private_repos: number;
1172
- };
1173
- [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;
1174
1195
  }
1175
1196
  interface GitHubEmailRecord {
1176
- email: string;
1177
- primary: boolean;
1178
- verified: boolean;
1179
- visibility: "public" | "private" | null;
1197
+ email: string;
1198
+ primary: boolean;
1199
+ verified: boolean;
1200
+ visibility: "public" | "private" | null;
1180
1201
  }
1181
- type GitHubOrgMembershipStatus = "active" | "pending" | "not_member" | "forbidden" | "unauthorized";
1182
- interface GitHubOrgMembershipCheckResult {
1183
- status: GitHubOrgMembershipStatus;
1184
- httpStatus: number;
1185
- organization: string;
1186
- role: string | null;
1187
- 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;
1188
1209
  }
1189
1210
  /**
1190
1211
  * Fetch user info from GitHub API
@@ -1192,19 +1213,19 @@ interface GitHubOrgMembershipCheckResult {
1192
1213
  * @returns GitHubUser object
1193
1214
  * @throws Error if request fails or token is invalid
1194
1215
  */
1195
- declare function fetchGitHubUser(token: string): Promise<GitHubUser>;
1216
+ export declare function fetchGitHubUser(token: string): Promise<GitHubUser>;
1196
1217
  declare function pickPreferredGitHubEmail(emails: GitHubEmailRecord[]): string | null;
1197
1218
  declare function sanitizeEmail(email: string | null | undefined): string | null;
1198
- declare const __internal: {
1199
- pickPreferredGitHubEmail: typeof pickPreferredGitHubEmail;
1200
- sanitizeEmail: typeof sanitizeEmail;
1219
+ export declare const __internal: {
1220
+ pickPreferredGitHubEmail: typeof pickPreferredGitHubEmail;
1221
+ sanitizeEmail: typeof sanitizeEmail;
1201
1222
  };
1202
1223
  /**
1203
1224
  * Fetch the authenticated user's membership details for a GitHub organization.
1204
1225
  * Uses the memberships list endpoint so callers can distinguish active, pending,
1205
1226
  * and indeterminate states instead of collapsing everything into a boolean.
1206
1227
  */
1207
- declare function getGitHubOrgMembership(token: string, org: string): Promise<GitHubOrgMembershipCheckResult>;
1228
+ export declare function getGitHubOrgMembership(token: string, org: string): Promise<GitHubOrgMembershipCheckResult>;
1208
1229
  /**
1209
1230
  * Check if the token owner is authorized for a given GitHub organization.
1210
1231
  * Uses the authenticated user's own token — works for both public and private membership.
@@ -1212,12 +1233,14 @@ declare function getGitHubOrgMembership(token: string, org: string): Promise<Git
1212
1233
  * @param token GitHub Personal Access Token or OAuth Access Token
1213
1234
  * @param org GitHub organization name
1214
1235
  */
1215
- declare function checkGitHubOrgMembership(token: string, org: string): Promise<boolean>;
1216
-
1217
- declare function isGitHubLocalEmail(email: string | null | undefined): boolean;
1218
- declare function buildGitHubLocalEmail(login: string): string;
1219
- declare function resolvePrimaryEmail(login: string, email: string | null | undefined): string;
1220
-
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
1221
1244
  /**
1222
1245
  * Unified, environment-agnostic logger contract for the SERVICEME monorepo.
1223
1246
  *
@@ -1235,11 +1258,11 @@ declare function resolvePrimaryEmail(login: string, email: string | null | undef
1235
1258
  * {@link createConsoleLogger} fallback defined here.
1236
1259
  */
1237
1260
  /** Severity levels, ordered low → high. */
1238
- declare enum LogLevel {
1239
- DEBUG = 0,
1240
- INFO = 1,
1241
- WARN = 2,
1242
- ERROR = 3
1261
+ export declare enum LogLevel {
1262
+ DEBUG = 0,
1263
+ INFO = 1,
1264
+ WARN = 2,
1265
+ ERROR = 3
1243
1266
  }
1244
1267
  /**
1245
1268
  * The logger contract every package implements / consumes.
@@ -1250,16 +1273,16 @@ declare enum LogLevel {
1250
1273
  * implementation can normalize / redact it; implementations SHOULD run
1251
1274
  * {@link normalizeErrorForLog} on that value before emitting.
1252
1275
  */
1253
- interface ILogger {
1254
- debug(message: string, ...args: unknown[]): void;
1255
- info(message: string, ...args: unknown[]): void;
1256
- warn(message: string, ...args: unknown[]): void;
1257
- error(message: string, error?: unknown, ...args: unknown[]): void;
1258
- setLevel(level: LogLevel): void;
1259
- /** Optional — file-backed loggers return their directory. */
1260
- getLogDir?(): string | undefined;
1261
- /** Optional — UI-backed loggers reveal their sink (e.g. an OutputChannel). */
1262
- 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;
1263
1286
  }
1264
1287
  /**
1265
1288
  * Normalize any thrown value into a serializable record for logging.
@@ -1271,7 +1294,7 @@ interface ILogger {
1271
1294
  * `apps/extension/src/core/logger/Logger.ts` so every package shares one
1272
1295
  * normalization path.
1273
1296
  */
1274
- declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1297
+ export declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1275
1298
  /**
1276
1299
  * Create a console-backed {@link ILogger}.
1277
1300
  *
@@ -1285,8 +1308,9 @@ declare function normalizeErrorForLog(error: unknown): Record<string, unknown>;
1285
1308
  * This is the canonical fallback for packages without a richer sink (cli,
1286
1309
  * webview bootstrap, extension logger self-diagnostics).
1287
1310
  */
1288
- declare function createConsoleLogger(name: string): ILogger;
1289
-
1311
+ export declare function createConsoleLogger(name: string): ILogger;
1312
+ //#endregion
1313
+ //#region src/types/protocol-contracts.d.ts
1290
1314
  /**
1291
1315
  * Protocol Contract Types — single source of truth.
1292
1316
  *
@@ -1317,180 +1341,181 @@ declare function createConsoleLogger(name: string): ILogger;
1317
1341
  * the module stays self-contained (e.g. `ScheduledTaskV1`, `TaskWorkspaceRef`,
1318
1342
  * `TaskRunStatus`, `BridgeLinkMode`).
1319
1343
  */
1320
- type ScheduledTaskType = "command" | "shell" | "http_request" | "github_copilot_cli";
1321
- interface CommandPayload {
1322
- command: string;
1323
- args?: unknown[];
1324
- }
1325
- interface ShellPayload {
1326
- script: string;
1327
- cwd?: string;
1328
- /** Timeout in seconds. Omit for default 60s; use 0 for no limit. */
1329
- timeout?: number;
1330
- }
1331
- interface HttpRequestPayload {
1332
- url: string;
1333
- method: string;
1334
- headers?: Record<string, string>;
1335
- body?: string;
1336
- /** Timeout in seconds. Omit for default 30s; use 0 for no limit. */
1337
- timeout?: number;
1338
- }
1339
- interface GithubCopilotCliPayload {
1340
- prompt: string;
1341
- workspace?: string;
1342
- autopilot?: boolean;
1343
- allowTools?: string[];
1344
- /** Timeout in seconds. Omit for default 300s; use 0 for no limit. */
1345
- timeout?: number;
1346
- model?: string;
1347
- agent?: string;
1348
- }
1349
- 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;
1350
1374
  /** Reference to the workspace a scheduled task is bound to. Required by v2. */
1351
- interface TaskWorkspaceRef {
1352
- /** Absolute path to the workspace root. Required and unique. */
1353
- path: string;
1354
- /** Display name. Defaults to `path` basename; users may override. */
1355
- name: string;
1356
- /** `git@github.com:owner/repo.git` — auto-detected at task creation. */
1357
- gitRemote?: string;
1358
- /** Current branch — auto-detected at task creation; verified at execute. */
1359
- gitBranch?: string;
1360
- /** Last time the extension saw this workspace alive. */
1361
- 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;
1362
1386
  }
1363
1387
  /**
1364
1388
  * v1 task shape — kept for reading legacy `<workspace>/.serviceme/scheduled-tasks.json`
1365
1389
  * during migration. New code should always use {@link ScheduledTask} (v2).
1366
1390
  */
1367
- interface ScheduledTaskV1 {
1368
- id: string;
1369
- name: string;
1370
- description?: string;
1371
- enabled: boolean;
1372
- scheduleType: "cron" | "interval";
1373
- schedule: string;
1374
- taskType: ScheduledTaskType;
1375
- payload: TaskPayload;
1376
- createdAt: string;
1377
- 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;
1378
1402
  }
1379
1403
  /** Runtime status of the most recent execution for a task. */
1380
- type TaskRunStatus = "ok" | "error" | "skipped";
1404
+ export type TaskRunStatus = "ok" | "error" | "skipped";
1381
1405
  /**
1382
1406
  * v2 scheduled task — adds required `workspace` reference and runtime metadata
1383
1407
  * fields. See `docs/architecture/skill-agent-v2-repo.md` §14.2.
1384
1408
  */
1385
- interface ScheduledTask extends ScheduledTaskV1 {
1386
- /** Required in v2. The workspace this task executes in. */
1387
- workspace: TaskWorkspaceRef;
1388
- /** ISO timestamp of the most recent execution. */
1389
- lastRunAt?: string;
1390
- /** Status of the most recent execution. */
1391
- lastRunStatus?: TaskRunStatus;
1392
- /** Error message from the most recent failed execution. */
1393
- lastRunError?: string;
1394
- /** Duration of the most recent execution, in milliseconds. */
1395
- lastRunDurationMs?: number;
1396
- /** Next scheduled run (computed by scheduler). */
1397
- nextRunAt?: string;
1398
- /** Total successful executions. */
1399
- 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;
1400
1424
  }
1401
1425
  /** v2 config — single source of truth for the global scheduler. */
1402
- interface ScheduledTasksConfig {
1403
- version: 2;
1404
- tasks: ScheduledTask[];
1405
- }
1406
- type TaskExecutionStatus = "running" | "success" | "failure" | "timeout" | "cancelled";
1407
- interface TaskExecutionLog {
1408
- id: string;
1409
- taskId: string;
1410
- taskName: string;
1411
- startedAt: string;
1412
- finishedAt: string;
1413
- status: Exclude<TaskExecutionStatus, "running">;
1414
- output?: string;
1415
- error?: string;
1416
- }
1417
- type AgentToolRiskLevel = "high" | "medium" | "low";
1418
- interface AgentToolPermission {
1419
- tool: string;
1420
- riskLevel: AgentToolRiskLevel;
1421
- }
1422
- interface AgentPermissionSummary {
1423
- agentId: string;
1424
- agentName: string;
1425
- tools: AgentToolPermission[];
1426
- highRiskCount: number;
1427
- mediumRiskCount: number;
1428
- 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;
1429
1453
  }
1430
1454
  /** Kinds of artifacts in the catalog. */
1431
- type BridgeSkillKind = "skill" | "agent";
1455
+ export type BridgeSkillKind = "skill" | "agent";
1432
1456
  /** Which side of the link is reported. Matches SkillLinker's `LinkMode`. */
1433
- type BridgeLinkMode = "symlink" | "junction" | "copy";
1457
+ export type BridgeLinkMode = "symlink" | "junction" | "copy";
1434
1458
  /** A single skill/agent entry inside a repo (SkillStore.SkillEntry). */
1435
- interface BridgeSkillRepoEntry {
1436
- repoId: string;
1437
- name: string;
1438
- kind: BridgeSkillKind;
1439
- /** Absolute path to the manifest file. */
1440
- manifestPath: string;
1441
- /** Absolute path to the entry's directory. */
1442
- dir: string;
1443
- /** Best-effort parsed frontmatter. */
1444
- frontmatter: Record<string, unknown>;
1445
- /** ISO timestamp of the manifest's mtime. */
1446
- modifiedAt: string;
1447
- /** Machine-local disable mark — true when the entry's link is removed
1448
- * on this machine while its installation intent stays. Overlaid by
1449
- * the bridge; absent on older CLIs. */
1450
- 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;
1451
1475
  }
1452
1476
  /** A single file inside an entry (SkillStore.SkillFile). */
1453
- interface BridgeSkillRepoFile {
1454
- /** Path relative to the entry's directory. */
1455
- path: string;
1456
- /** UTF-8 content. */
1457
- content: string;
1477
+ export interface BridgeSkillRepoFile {
1478
+ /** Path relative to the entry's directory. */
1479
+ path: string;
1480
+ /** UTF-8 content. */
1481
+ content: string;
1458
1482
  }
1459
1483
  /** A symlink/junction currently present in a workspace or user (global) scope. */
1460
- interface BridgeLinkedSkill {
1461
- repoId: string;
1462
- name: string;
1463
- linkPath: string;
1464
- targetPath: string;
1465
- mode: BridgeLinkMode;
1466
- /** Which scope this link lives in — "workspace" or "user" (global, `~/.agents/...`). */
1467
- 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";
1468
1492
  }
1469
1493
  /** A single entry from `repos.json` (subset of RepoConfig). */
1470
- interface BridgeRepoEntry {
1471
- id: string;
1472
- name: string;
1473
- url: string;
1474
- branch: string;
1475
- enabled: boolean;
1476
- useProxy?: boolean;
1477
- writeEnabled: boolean;
1478
- source: "default" | "user";
1479
- description?: string;
1480
- addedAt: string;
1481
- lastSyncAt?: string;
1482
- lastSyncCommitSha?: string;
1483
- lastSyncStatus?: "ok" | "error";
1484
- 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;
1485
1509
  }
1486
1510
  /** A single line of a sync run. */
1487
- interface BridgeRepoSyncPull {
1488
- repoId: string;
1489
- status: "ok" | "error";
1490
- commitSha?: string;
1491
- error?: string;
1511
+ export interface BridgeRepoSyncPull {
1512
+ repoId: string;
1513
+ status: "ok" | "error";
1514
+ commitSha?: string;
1515
+ error?: string;
1492
1516
  }
1493
-
1517
+ //#endregion
1518
+ //#region src/webview-contract.d.ts
1494
1519
  /**
1495
1520
  * Webview ↔ extension message-contract types.
1496
1521
  *
@@ -1507,180 +1532,181 @@ interface BridgeRepoSyncPull {
1507
1532
  * NOTE: `apps/webview-ui/src/types/index.ts` re-exports these so
1508
1533
  * existing webview imports keep working unchanged.
1509
1534
  */
1510
- interface ExternalTool {
1511
- id: string;
1512
- name: string;
1513
- url: string;
1514
- description?: string;
1515
- icon?: string;
1516
- isDefault?: boolean;
1517
- }
1518
- interface AzureProfile {
1519
- id: string;
1520
- name: string;
1521
- method: "FTP" | "MSDeploy";
1522
- host: string;
1523
- username?: string;
1524
- password?: string;
1525
- remotePath?: string;
1526
- port?: number;
1527
- }
1528
- interface ApiConfig {
1529
- schemaPath: string;
1530
- requestLibPath?: string;
1531
- projectName?: string;
1532
- namespace?: string;
1533
- serversPath?: string;
1534
- apiPrefix?: string;
1535
- mock?: boolean;
1536
- templatesFolder?: string;
1537
- enumStyle?: "string-literal" | "enum";
1538
- }
1539
-
1540
- declare enum WebviewMessageType {
1541
- WebviewReady = "webviewReady",
1542
- Ready = "ready",
1543
- Log = "log",
1544
- ExecuteCommand = "executeCommand",
1545
- OpenUrl = "openUrl",
1546
- UsePrompt = "usePrompt",
1547
- UpdateAzureProfiles = "updateAzureProfiles",
1548
- UpdateAzureProfile = "updateAzureProfile",
1549
- GetApiConfig = "getApiConfig",
1550
- UpdateApiConfig = "updateApiConfig",
1551
- SaveApiConfig = "saveApiConfig",
1552
- ApiConfigSaveFailed = "apiConfigSaveFailed",
1553
- ExportApiConfig = "exportApiConfig",
1554
- ImportApiConfig = "importApiConfig",
1555
- ApiConfigImported = "apiConfigImported",
1556
- AddExternalTool = "addExternalTool",
1557
- UpdateExternalTool = "updateExternalTool",
1558
- UpdateExternalTools = "updateExternalTools",
1559
- DeleteExternalTool = "deleteExternalTool",
1560
- ReorderExternalTools = "reorderExternalTools",
1561
- UpdateNgrokStatus = "updateNgrokStatus",
1562
- UpdateServerStatus = "updateServerStatus",
1563
- UpdateOcxStatus = "updateOcxStatus",
1564
- UpdateRtkStatus = "updateRtkStatus",
1565
- UpdateCodegraphStatus = "updateCodegraphStatus",
1566
- GetAuthState = "getAuthState",
1567
- UpdateAuthState = "updateAuthState",
1568
- Login = "login",
1569
- Logout = "logout",
1570
- GetAccounts = "getAccounts",
1571
- UpdateAccounts = "updateAccounts",
1572
- SwitchAccount = "switchAccount",
1573
- GetUserProfile = "getUserProfile",
1574
- UpdateUserProfile = "updateUserProfile",
1575
- UserProfileUpdated = "userProfileUpdated",
1576
- AddExtraEmail = "addExtraEmail",
1577
- DeleteExtraEmail = "deleteExtraEmail",
1578
- GetCalendarHolidays = "getCalendarHolidays",
1579
- UpdateCalendarHolidays = "updateCalendarHolidays",
1580
- GetCalendarLeaves = "getCalendarLeaves",
1581
- UpdateCalendarLeaves = "updateCalendarLeaves",
1582
- CreateCalendarLeave = "createCalendarLeave",
1583
- DeleteCalendarLeave = "deleteCalendarLeave",
1584
- GetCalendarNotes = "getCalendarNotes",
1585
- UpdateCalendarNotes = "updateCalendarNotes",
1586
- SaveCalendarNote = "saveCalendarNote",
1587
- GetCalendarMonthSchedule = "getCalendarMonthSchedule",
1588
- GetScheduledTasks = "getScheduledTasks",
1589
- UpdateScheduledTasks = "updateScheduledTasks",
1590
- CreateScheduledTask = "createScheduledTask",
1591
- EditScheduledTask = "editScheduledTask",
1592
- DeleteScheduledTask = "deleteScheduledTask",
1593
- ToggleScheduledTask = "toggleScheduledTask",
1594
- TriggerScheduledTask = "triggerScheduledTask",
1595
- CancelTaskExecution = "cancelTaskExecution",
1596
- GetTaskExecutionLogs = "getTaskExecutionLogs",
1597
- ClearTaskExecutionLogs = "clearTaskExecutionLogs",
1598
- UpdateTaskExecutionLogs = "updateTaskExecutionLogs",
1599
- UpdateTaskExecutionState = "updateTaskExecutionState",
1600
- GetCurrentWorkspace = "getCurrentWorkspace",
1601
- UpdateCurrentWorkspace = "updateCurrentWorkspace",
1602
- GetProviders = "getProviders",
1603
- ProvidersResponse = "providersResponse",
1604
- AddProvider = "addProvider",
1605
- UpdateProvider = "updateProvider",
1606
- RemoveProvider = "removeProvider",
1607
- SetDefaultProvider = "setDefaultProvider",
1608
- SetProviderEnabled = "setProviderEnabled",
1609
- SetProviderOrder = "setProviderOrder",
1610
- TestProvider = "testProvider",
1611
- ProviderTestResultMessage = "providerTestResult",
1612
- TestProviderModel = "testProviderModel",
1613
- ProviderTestModelResultMessage = "providerTestModelResult",
1614
- DefaultProviderChanged = "defaultProviderChanged",
1615
- FetchProviderModels = "fetchProviderModels",
1616
- FetchProviderModelsResult = "fetchProviderModelsResult",
1617
- GetProviderUsage = "getProviderUsage",
1618
- ProviderUsageResponse = "providerUsageResponse",
1619
- SetCacheControlEnabled = "setCacheControlEnabled",
1620
- GetByomSettings = "getByomSettings",
1621
- ByomSettingsResponse = "byomSettingsResponse",
1622
- ListSkillRepoEntries = "listSkillRepoEntries",
1623
- GetSkillRepoEntry = "getSkillRepoEntry",
1624
- InstallSkillRepoEntry = "installSkillRepoEntry",
1625
- ConvertSkillRepoEntryToSymlink = "convertSkillRepoEntryToSymlink",
1626
- UninstallSkillRepoEntry = "uninstallSkillRepoEntry",
1627
- SetSkillRepoEntryEnabled = "setSkillRepoEntryEnabled",
1628
- ListLinkedSkills = "listLinkedSkills",
1629
- UpdateSkillRepoCatalog = "updateSkillRepoCatalog",
1630
- UpdateSkillRepoInstall = "updateSkillRepoInstall",
1631
- UpdateLinkedSkills = "updateLinkedSkills",
1632
- CreateSkillRepoDraft = "createSkillRepoDraft",
1633
- CommitSkillRepoDraft = "commitSkillRepoDraft",
1634
- ListSkillRepoDrafts = "listSkillRepoDrafts",
1635
- DeleteSkillRepoDraft = "deleteSkillRepoDraft",
1636
- UpdateSkillRepoDraft = "updateSkillRepoDraft",
1637
- ListRepositories = "listRepositories",
1638
- AddRepository = "addRepository",
1639
- UpdateRepository = "updateRepository",
1640
- RemoveRepository = "removeRepository",
1641
- EnableRepository = "enableRepository",
1642
- DisableRepository = "disableRepository",
1643
- SyncRepository = "syncRepository",
1644
- SyncAllRepositories = "syncAllRepositories",
1645
- ResetParseCache = "resetParseCache",
1646
- ListCopilotPlugins = "listCopilotPlugins",
1647
- RegisterCopilotPlugin = "registerCopilotPlugin",
1648
- UnregisterCopilotPlugin = "unregisterCopilotPlugin",
1649
- SetCopilotPluginEnabled = "setCopilotPluginEnabled",
1650
- GetCopilotContentStatus = "getCopilotContentStatus",
1651
- RestoreCopilotContent = "restoreCopilotContent",
1652
- ApproveCopilotContent = "approveCopilotContent",
1653
- UpdateRepositoryList = "updateRepositoryList",
1654
- UpdateRepositoryAdd = "updateRepositoryAdd",
1655
- UpdateRepositoryUpdate = "updateRepositoryUpdate",
1656
- UpdateRepositoryRemove = "updateRepositoryRemove",
1657
- UpdateRepositoryToggle = "updateRepositoryToggle",
1658
- UpdateRepositorySyncResult = "updateRepositorySyncResult",
1659
- UpdateCopilotContentStatus = "updateCopilotContentStatus",
1660
- GetCopilotCustomizations = "getCopilotCustomizations",
1661
- SyncCopilotCustomizations = "syncCopilotCustomizations",
1662
- UpdateCopilotCustomizations = "updateCopilotCustomizations",
1663
- InstallCopilotPackage = "installCopilotPackage",
1664
- MoveCopilotPackage = "moveCopilotPackage",
1665
- UninstallCopilotPackage = "uninstallCopilotPackage",
1666
- ListCopilotSources = "listCopilotSources",
1667
- RemoveCopilotSource = "removeCopilotSource",
1668
- PreviewCopilotUpdate = "previewCopilotUpdate",
1669
- UpdateCopilotPackage = "updateCopilotPackage",
1670
- PreviewCopilotLegacy = "previewCopilotLegacy",
1671
- MigrateCopilotLegacy = "migrateCopilotLegacy",
1672
- UpdateCopilotSources = "updateCopilotSources",
1673
- UpdateCopilotUpdatePreview = "updateCopilotUpdatePreview",
1674
- UpdateCopilotLegacyPreview = "updateCopilotLegacyPreview",
1675
- GetUtilityModels = "getUtilityModels",
1676
- UtilityModelsResponse = "utilityModelsResponse",
1677
- UpdateUtilityModels = "updateUtilityModels",
1678
- GetServerProxyState = "getServerProxyState",
1679
- ServerProxyStateResponse = "serverProxyStateResponse",
1680
- SetServerProxyEnabled = "setServerProxyEnabled",
1681
- SetServerProxyAllowOverride = "setServerProxyAllowOverride",
1682
- GetCachedServerUrl = "getCachedServerUrl",
1683
- 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"
1684
1710
  }
1685
1711
  /**
1686
1712
  * Top-level const aliases for the BYO Utility Models message-type
@@ -1696,18 +1722,18 @@ declare enum WebviewMessageType {
1696
1722
  * sync; Task 5 (extension handler) uses the enum members, the webview
1697
1723
  * component + tests use the consts.
1698
1724
  */
1699
- declare const GetUtilityModels: "getUtilityModels";
1700
- declare const UtilityModelsResponse: "utilityModelsResponse";
1701
- declare const UpdateUtilityModels: "updateUtilityModels";
1702
- declare const SetCacheControlEnabled: "setCacheControlEnabled";
1703
- declare const GetByomSettings: "getByomSettings";
1704
- declare const ByomSettingsResponse: "byomSettingsResponse";
1705
- declare const GetServerProxyState: "getServerProxyState";
1706
- declare const ServerProxyStateResponse: "serverProxyStateResponse";
1707
- declare const SetServerProxyEnabled: "setServerProxyEnabled";
1708
- declare const SetServerProxyAllowOverride: "setServerProxyAllowOverride";
1709
- declare const GetCachedServerUrl: "getCachedServerUrl";
1710
- 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";
1711
1737
  /**
1712
1738
  * Snapshot of the r7 server-proxy toggle (HTTP CONNECT through intranet
1713
1739
  * Server). Mirrors `IProxyConfigService`'s `ProxyState` shape so the
@@ -1720,24 +1746,24 @@ declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1720
1746
  * See `apps/extension/src/services/proxy/ProxyConfigService.ts` for
1721
1747
  * the authoritative source of truth.
1722
1748
  */
1723
- type ServerProxySupportMode = "off" | "on" | "fallback" | "override";
1724
- interface ServerProxySnapshot {
1725
- httpProxy: string | undefined;
1726
- httpProxyStrictSSL: boolean;
1727
- httpProxySupport: ServerProxySupportMode;
1728
- /** Self-flag at serverProxy.enabled; computed by the extension handler. */
1729
- enabled: boolean;
1730
- /**
1731
- * rev.21 — opt-in to bypass the `proxySupport === "override"`
1732
- * guard. Power users (e.g. corp environments that WANT all
1733
- * extensions including GitHub Copilot Chat to route through the
1734
- * corp tunnel) tick the "Allow under proxySupport=override"
1735
- * checkbox in the Webview; this flag is persisted to
1736
- * `~/.serviceme/server-proxy.json` alongside `enabled`.
1737
- */
1738
- allowOverride: boolean;
1739
- /** Last server URL we toggled ON with. Used for re-toggling and UI hint. */
1740
- 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;
1741
1767
  }
1742
1768
  /**
1743
1769
  * Payload for `SetServerProxyEnabled`. The extension handler is the
@@ -1754,16 +1780,16 @@ interface ServerProxySnapshot {
1754
1780
  * applied as `http.proxy` even when `http.proxy` is currently empty.
1755
1781
  * Still subject to the `proxySupport !== "override"` server-side gate.
1756
1782
  */
1757
- interface ServerProxyTogglePayload {
1758
- enabled: boolean;
1759
- /** Optional — defaults to Workspace. */
1760
- target?: "workspace" | "global";
1761
- /**
1762
- * Optional — override the snapshot's `http.proxy` for the write.
1763
- * Only honoured when `enabled === true`; ignored on disable so the
1764
- * existing "only clear our own write" semantics stay intact.
1765
- */
1766
- 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;
1767
1793
  }
1768
1794
  /**
1769
1795
  * rev.21 — payload for `SetServerProxyAllowOverride`. Toggles the
@@ -1771,8 +1797,8 @@ interface ServerProxyTogglePayload {
1771
1797
  * Persisted across VS Code restarts; defaults to `false` so users
1772
1798
  * must explicitly opt-in to the `override` mode bypass.
1773
1799
  */
1774
- interface ServerProxyAllowOverridePayload {
1775
- allowOverride: boolean;
1800
+ export interface ServerProxyAllowOverridePayload {
1801
+ allowOverride: boolean;
1776
1802
  }
1777
1803
  /**
1778
1804
  * Reply to `GetCachedServerUrl`. Carries the cached base URL resolved
@@ -1784,9 +1810,9 @@ interface ServerProxyAllowOverridePayload {
1784
1810
  * reachable Server — the Webview should hide the "Apply cached base
1785
1811
  * URL" affordance rather than offer a no-op button.
1786
1812
  */
1787
- interface CachedServerUrlSnapshot {
1788
- baseUrl: string | null;
1789
- httpProxySupport: ServerProxySupportMode;
1813
+ export interface CachedServerUrlSnapshot {
1814
+ baseUrl: string | null;
1815
+ httpProxySupport: ServerProxySupportMode;
1790
1816
  }
1791
1817
  /**
1792
1818
  * Where the three `msDevTools.utilityModels.*` settings (and their
@@ -1802,16 +1828,16 @@ interface CachedServerUrlSnapshot {
1802
1828
  * wins over a user value when both are present), so we only need to
1803
1829
  * write to ONE target — the other scope just naturally inherits.
1804
1830
  */
1805
- type UtilityModelScope = "user" | "workspace";
1831
+ export type UtilityModelScope = "user" | "workspace";
1806
1832
  /**
1807
1833
  * Per-field source for UI "this value comes from user / workspace /
1808
1834
  * default" indicators. Mirrors the `ConfigurationInspectionScope`
1809
1835
  * categories of `vscode.WorkspaceConfiguration.inspect(key)`.
1810
1836
  */
1811
- interface UtilityModelsSource {
1812
- small: "user" | "workspace" | "default";
1813
- medium: "user" | "workspace" | "default";
1814
- fallbackToCopilot: "user" | "workspace" | "default";
1837
+ export interface UtilityModelsSource {
1838
+ small: "user" | "workspace" | "default";
1839
+ medium: "user" | "workspace" | "default";
1840
+ fallbackToCopilot: "user" | "workspace" | "default";
1815
1841
  }
1816
1842
  /**
1817
1843
  * The value Copilot is ACTUALLY using right now — VS Code's real
@@ -1820,10 +1846,10 @@ interface UtilityModelsSource {
1820
1846
  * for editing. Computed via `configSection.get(key, default)`, the
1821
1847
  * same call VS Code itself uses to resolve a setting.
1822
1848
  */
1823
- interface UtilityModelsEffective {
1824
- small: string;
1825
- medium: string;
1826
- fallbackToCopilot: boolean;
1849
+ export interface UtilityModelsEffective {
1850
+ small: string;
1851
+ medium: string;
1852
+ fallbackToCopilot: boolean;
1827
1853
  }
1828
1854
  /**
1829
1855
  * Snapshot of the three msDevTools.utilityModels.* settings plus the
@@ -1847,17 +1873,17 @@ interface UtilityModelsEffective {
1847
1873
  * title always shows what's actually in effect regardless of which
1848
1874
  * scope tab happens to be open.
1849
1875
  */
1850
- interface UtilityModelsSnapshot {
1851
- small: string;
1852
- medium: string;
1853
- fallbackToCopilot: boolean;
1854
- enabledModelIds: string[];
1855
- /** Effective scope for the next write. Defaults to `"user"`. */
1856
- scope: UtilityModelScope;
1857
- /** Per-field source (which scope actually defined the value). */
1858
- source?: UtilityModelsSource;
1859
- /** The real merged value Copilot uses right now. See docstring above. */
1860
- 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;
1861
1887
  }
1862
1888
  /**
1863
1889
  * Partial-update payload for UpdateUtilityModels. Omit a field to
@@ -1868,11 +1894,11 @@ interface UtilityModelsSnapshot {
1868
1894
  * the previous scope; the first call (with no prior scope) defaults
1869
1895
  * to `"user"`.
1870
1896
  */
1871
- interface UpdateUtilityModelsPayload {
1872
- small?: string;
1873
- medium?: string;
1874
- fallbackToCopilot?: boolean;
1875
- scope?: UtilityModelScope;
1897
+ export interface UpdateUtilityModelsPayload {
1898
+ small?: string;
1899
+ medium?: string;
1900
+ fallbackToCopilot?: boolean;
1901
+ scope?: UtilityModelScope;
1876
1902
  }
1877
1903
  /**
1878
1904
  * Per-provider BYOM toggle payload. Used by `SetCacheControlEnabled` —
@@ -1884,9 +1910,9 @@ interface UpdateUtilityModelsPayload {
1884
1910
  * `msDevTools.byom.<providerId>.<key>` key that the
1885
1911
  * `LmChatProviderRegistrar` already reads on every chat invocation.
1886
1912
  */
1887
- interface ByomTogglePayload {
1888
- id: string;
1889
- enabled: boolean;
1913
+ export interface ByomTogglePayload {
1914
+ id: string;
1915
+ enabled: boolean;
1890
1916
  }
1891
1917
  /**
1892
1918
  * Snapshot of every BYOM provider's runtime toggles, keyed by
@@ -1899,16 +1925,16 @@ interface ByomTogglePayload {
1899
1925
  * `byomSettings.ts` default (`cacheEnabled: true`) — the Webview
1900
1926
  * does NOT need a separate "default" branch.
1901
1927
  */
1902
- type ByomSettingsSnapshot = Record<string, ByomProviderToggles>;
1928
+ export type ByomSettingsSnapshot = Record<string, ByomProviderToggles>;
1903
1929
  /**
1904
1930
  * Per-provider BYOM toggles. Mirrors the runtime contract in
1905
1931
  * `apps/extension/src/services/providers/byomSettings.ts`
1906
1932
  * (`ByomProviderToggles`) — keep the two in lock-step so a
1907
1933
  * `GetByomSettings` payload round-trips without reshape code.
1908
1934
  */
1909
- interface ByomProviderToggles {
1910
- /** P0.1 + P0.2 cache toggle — default TRUE (main-line decision Q1). */
1911
- cacheEnabled: boolean;
1935
+ export interface ByomProviderToggles {
1936
+ /** P0.1 + P0.2 cache toggle — default TRUE (main-line decision Q1). */
1937
+ cacheEnabled: boolean;
1912
1938
  }
1913
1939
  /**
1914
1940
  * Strict-typed shape for the inbound messages handled by
@@ -1921,65 +1947,65 @@ interface ByomProviderToggles {
1921
1947
  * Each variant lists ONLY the fields the hook actually reads; optional
1922
1948
  * fields are explicit (`tools?` / `profiles?` / `workspaceOpen`).
1923
1949
  */
1924
- type WebviewInboundMessage = {
1925
- type: typeof WebviewMessageType.UpdateRepositoryList;
1926
- repos: BridgeRepoEntry[];
1950
+ export type WebviewInboundMessage = {
1951
+ type: typeof WebviewMessageType.UpdateRepositoryList;
1952
+ repos: BridgeRepoEntry[];
1927
1953
  } | {
1928
- type: typeof WebviewMessageType.UpdateRepositoryUpdate;
1929
- repos: BridgeRepoEntry[];
1954
+ type: typeof WebviewMessageType.UpdateRepositoryUpdate;
1955
+ repos: BridgeRepoEntry[];
1930
1956
  } | {
1931
- type: typeof WebviewMessageType.UpdateSkillRepoCatalog;
1932
- entries?: BridgeSkillRepoEntry[];
1933
- workspaceOpen?: boolean;
1957
+ type: typeof WebviewMessageType.UpdateSkillRepoCatalog;
1958
+ entries?: BridgeSkillRepoEntry[];
1959
+ workspaceOpen?: boolean;
1934
1960
  } | {
1935
- type: typeof WebviewMessageType.UpdateLinkedSkills;
1936
- links: LinkedSkillPayloadEntry[];
1937
- kind: "skill" | "agent";
1961
+ type: typeof WebviewMessageType.UpdateLinkedSkills;
1962
+ links: LinkedSkillPayloadEntry[];
1963
+ kind: "skill" | "agent";
1938
1964
  } | {
1939
- type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1940
- entries: CopilotContentStatusEntry[];
1941
- changed: boolean;
1942
- workspaceOpen?: boolean;
1965
+ type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1966
+ entries: CopilotContentStatusEntry[];
1967
+ changed: boolean;
1968
+ workspaceOpen?: boolean;
1943
1969
  } | {
1944
- type: typeof WebviewMessageType.UpdateCopilotCustomizations;
1945
- view: CopilotCustomizationViewPayload;
1946
- /** Installable plugin.json packages from the enabled git
1947
- * sources. Optional: older CLI builds omit it. */
1948
- 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[];
1949
1975
  } | {
1950
- type: typeof WebviewMessageType.UpdateCopilotSources;
1951
- sources: CopilotSourceRecordPayload[];
1976
+ type: typeof WebviewMessageType.UpdateCopilotSources;
1977
+ sources: CopilotSourceRecordPayload[];
1952
1978
  } | {
1953
- type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1954
- preview: CopilotPackageUpdatePreviewPayload;
1979
+ type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1980
+ preview: CopilotPackageUpdatePreviewPayload;
1955
1981
  } | {
1956
- type: typeof WebviewMessageType.UpdateExternalTools;
1957
- tools?: ExternalTool[];
1982
+ type: typeof WebviewMessageType.UpdateExternalTools;
1983
+ tools?: ExternalTool[];
1958
1984
  } | {
1959
- type: typeof WebviewMessageType.UpdateNgrokStatus;
1960
- isRunning: boolean;
1985
+ type: typeof WebviewMessageType.UpdateNgrokStatus;
1986
+ isRunning: boolean;
1961
1987
  } | {
1962
- type: typeof WebviewMessageType.UpdateOcxStatus;
1963
- isRunning: boolean;
1988
+ type: typeof WebviewMessageType.UpdateOcxStatus;
1989
+ isRunning: boolean;
1964
1990
  } | {
1965
- type: typeof WebviewMessageType.UpdateRtkStatus;
1966
- installed: boolean;
1967
- version?: string;
1968
- workspaceEnabled: boolean;
1991
+ type: typeof WebviewMessageType.UpdateRtkStatus;
1992
+ installed: boolean;
1993
+ version?: string;
1994
+ workspaceEnabled: boolean;
1969
1995
  } | {
1970
- type: typeof WebviewMessageType.UpdateCodegraphStatus;
1971
- installed: boolean;
1972
- version?: string;
1973
- indexed: boolean;
1974
- mcpConfigured?: boolean;
1975
- hookInstalled?: boolean;
1976
- 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;
1977
2003
  } | {
1978
- type: typeof WebviewMessageType.UpdateAzureProfiles;
1979
- profiles?: AzureProfile[];
2004
+ type: typeof WebviewMessageType.UpdateAzureProfiles;
2005
+ profiles?: AzureProfile[];
1980
2006
  } | {
1981
- type: typeof WebviewMessageType.UpdateApiConfig;
1982
- config: ApiConfig;
2007
+ type: typeof WebviewMessageType.UpdateApiConfig;
2008
+ config: ApiConfig;
1983
2009
  };
1984
2010
  /**
1985
2011
  * One entry inside the `UpdateLinkedSkills.links` array. Mirrors the
@@ -1987,10 +2013,10 @@ type WebviewInboundMessage = {
1987
2013
  * than re-declared at the call site) lets the discriminated union's
1988
2014
  * `links` field carry a real type instead of `unknown[]`.
1989
2015
  */
1990
- interface LinkedSkillPayloadEntry {
1991
- repoId: string;
1992
- name: string;
1993
- scope?: string;
2016
+ export interface LinkedSkillPayloadEntry {
2017
+ repoId: string;
2018
+ name: string;
2019
+ scope?: string;
1994
2020
  }
1995
2021
  /**
1996
2022
  * One entry inside the `UpdateCopilotContentStatus.entries` array.
@@ -1998,10 +2024,10 @@ interface LinkedSkillPayloadEntry {
1998
2024
  * (identity + status + optional message) so the webview can render the
1999
2025
  * reconciliation state without importing the protocol package.
2000
2026
  */
2001
- interface CopilotContentStatusEntry {
2002
- identity: string;
2003
- status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2004
- message?: string;
2027
+ export interface CopilotContentStatusEntry {
2028
+ identity: string;
2029
+ status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2030
+ message?: string;
2005
2031
  }
2006
2032
  /**
2007
2033
  * Task 7 — webview → extension install intent. Mirrors the Task 3
@@ -2011,64 +2037,66 @@ interface CopilotContentStatusEntry {
2011
2037
  * discovery preview blocks submission until the user picks one) and
2012
2038
  * is omitted for git / marketplace sources.
2013
2039
  */
2014
- interface InstallCopilotPackageAction {
2015
- type: WebviewMessageType.InstallCopilotPackage;
2016
- scope: "workspace" | "personal";
2017
- sourceId: string;
2018
- packageId: string;
2019
- artifactIds: string[];
2020
- pinnedVersion?: string;
2021
- 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";
2022
2048
  }
2023
2049
  /** Task 9 — webview → extension move intent; workspaceDir is resolved extension-side. */
2024
- interface MoveCopilotPackageAction {
2025
- type: WebviewMessageType.MoveCopilotPackage;
2026
- packageId: string;
2027
- from: "workspace" | "personal";
2028
- to: "workspace" | "personal";
2050
+ export interface MoveCopilotPackageAction {
2051
+ type: WebviewMessageType.MoveCopilotPackage;
2052
+ packageId: string;
2053
+ from: "workspace" | "personal";
2054
+ to: "workspace" | "personal";
2029
2055
  }
2030
2056
  /** Task 9 — webview → extension uninstall intent; workspaceDir is resolved extension-side. */
2031
- interface UninstallCopilotPackageAction {
2032
- type: WebviewMessageType.UninstallCopilotPackage;
2033
- scope: "workspace" | "personal";
2034
- packageId: string;
2057
+ export interface UninstallCopilotPackageAction {
2058
+ type: WebviewMessageType.UninstallCopilotPackage;
2059
+ scope: "workspace" | "personal";
2060
+ packageId: string;
2035
2061
  }
2036
2062
  /** Task 10 — webview → extension source list intent; workspaceDir is resolved extension-side. */
2037
- interface ListCopilotSourcesAction {
2038
- type: WebviewMessageType.ListCopilotSources;
2039
- scope: "workspace" | "personal";
2063
+ export interface ListCopilotSourcesAction {
2064
+ type: WebviewMessageType.ListCopilotSources;
2065
+ scope: "workspace" | "personal";
2040
2066
  }
2041
2067
  /** Task 10 — webview → extension source removal intent; workspaceDir is resolved extension-side. */
2042
- interface RemoveCopilotSourceAction {
2043
- type: WebviewMessageType.RemoveCopilotSource;
2044
- scope: "workspace" | "personal";
2045
- sourceId: string;
2068
+ export interface RemoveCopilotSourceAction {
2069
+ type: WebviewMessageType.RemoveCopilotSource;
2070
+ scope: "workspace" | "personal";
2071
+ sourceId: string;
2046
2072
  }
2047
2073
  /** Task 10 — webview → extension update preview intent; workspaceDir is resolved extension-side. */
2048
- interface PreviewCopilotUpdateAction {
2049
- type: WebviewMessageType.PreviewCopilotUpdate;
2050
- scope: "workspace" | "personal";
2051
- packageId: string;
2052
- revision: string;
2053
- }
2054
-
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
2055
2082
  /** Live execution state pushed to webview during task execution */
2056
- interface TaskExecutionState {
2057
- executionId: string;
2058
- taskId: string;
2059
- taskName: string;
2060
- status: "running" | "success" | "failure" | "timeout" | "cancelled";
2061
- startedAt: string;
2062
- finishedAt?: string;
2063
- output: string;
2064
- 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;
2065
2092
  }
2066
2093
  /** Log file schema for .serviceme/scheduled-tasks-log.json */
2067
- interface ScheduledTasksLogFile {
2068
- version: 1;
2069
- logs: TaskExecutionLog[];
2094
+ export interface ScheduledTasksLogFile {
2095
+ version: 1;
2096
+ logs: TaskExecutionLog[];
2070
2097
  }
2071
-
2098
+ //#endregion
2099
+ //#region src/utils/safe-cast.d.ts
2072
2100
  /**
2073
2101
  * Environment-agnostic cast helpers.
2074
2102
  *
@@ -2088,7 +2116,7 @@ interface ScheduledTasksLogFile {
2088
2116
  * the runtime shape here. Keeping the cast in one place makes the intent
2089
2117
  * (and the assumption) explicit and grep-able.
2090
2118
  */
2091
- declare function parsePayload<T>(raw: unknown): T;
2119
+ export declare function parsePayload<T>(raw: unknown): T;
2092
2120
  /**
2093
2121
  * Best-effort extraction of an `AbortSignal` from an inbound request object.
2094
2122
  *
@@ -2100,7 +2128,7 @@ declare function parsePayload<T>(raw: unknown): T;
2100
2128
  * is the same as "no signal". In practice the request signal is always a real
2101
2129
  * `AbortSignal`, so behavior is unchanged for every production path.
2102
2130
  */
2103
- declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2131
+ export declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2104
2132
  /**
2105
2133
  * Parse a JSON string, returning `fallback` when parsing fails.
2106
2134
  *
@@ -2109,6 +2137,5 @@ declare function asAbortSignal(input: unknown): AbortSignal | undefined;
2109
2137
  * with their own `.catch` so that a body-read failure still yields the same
2110
2138
  * fallback as a malformed-body failure).
2111
2139
  */
2112
- declare function safeJson<T>(text: string, fallback: T): T;
2113
-
2114
- 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, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
2140
+ export declare function safeJson<T>(text: string, fallback: T): T;
2141
+ //#endregion