@serviceme/devtools-shared 2.0.3 → 2.0.4

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
@@ -1736,13 +1736,7 @@ export declare enum WebviewMessageType {
1736
1736
  UpdateCopilotLegacyPreview = "updateCopilotLegacyPreview",
1737
1737
  GetUtilityModels = "getUtilityModels",
1738
1738
  UtilityModelsResponse = "utilityModelsResponse",
1739
- UpdateUtilityModels = "updateUtilityModels",
1740
- GetServerProxyState = "getServerProxyState",
1741
- ServerProxyStateResponse = "serverProxyStateResponse",
1742
- SetServerProxyEnabled = "setServerProxyEnabled",
1743
- SetServerProxyAllowOverride = "setServerProxyAllowOverride",
1744
- GetCachedServerUrl = "getCachedServerUrl",
1745
- CachedServerUrlResponse = "cachedServerUrlResponse"
1739
+ UpdateUtilityModels = "updateUtilityModels"
1746
1740
  }
1747
1741
  /**
1748
1742
  * Top-level const aliases for the BYO Utility Models message-type
@@ -1764,92 +1758,6 @@ export declare const UpdateUtilityModels: "updateUtilityModels";
1764
1758
  export declare const SetCacheControlEnabled: "setCacheControlEnabled";
1765
1759
  export declare const GetByomSettings: "getByomSettings";
1766
1760
  export declare const ByomSettingsResponse: "byomSettingsResponse";
1767
- export declare const GetServerProxyState: "getServerProxyState";
1768
- export declare const ServerProxyStateResponse: "serverProxyStateResponse";
1769
- export declare const SetServerProxyEnabled: "setServerProxyEnabled";
1770
- export declare const SetServerProxyAllowOverride: "setServerProxyAllowOverride";
1771
- export declare const GetCachedServerUrl: "getCachedServerUrl";
1772
- export declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1773
- /**
1774
- * Snapshot of the r7 server-proxy toggle (HTTP CONNECT through intranet
1775
- * Server). Mirrors `IProxyConfigService`'s `ProxyState` shape so the
1776
- * webview can render the same fields without a reshape.
1777
- *
1778
- * Returned by `GetServerProxyState` and broadcast as
1779
- * `ServerProxyStateResponse` so the ProvidersTab's ServerProxyToggle
1780
- * component can paint at the persisted state on mount.
1781
- *
1782
- * See `apps/extension/src/services/proxy/ProxyConfigService.ts` for
1783
- * the authoritative source of truth.
1784
- */
1785
- export type ServerProxySupportMode = "off" | "on" | "fallback" | "override";
1786
- export interface ServerProxySnapshot {
1787
- httpProxy: string | undefined;
1788
- httpProxyStrictSSL: boolean;
1789
- httpProxySupport: ServerProxySupportMode;
1790
- /** Self-flag at serverProxy.enabled; computed by the extension handler. */
1791
- enabled: boolean;
1792
- /**
1793
- * rev.21 — opt-in to bypass the `proxySupport === "override"`
1794
- * guard. Power users (e.g. corp environments that WANT all
1795
- * extensions including GitHub Copilot Chat to route through the
1796
- * corp tunnel) tick the "Allow under proxySupport=override"
1797
- * checkbox in the Webview; this flag is persisted to
1798
- * `~/.serviceme/server-proxy.json` alongside `enabled`.
1799
- */
1800
- allowOverride: boolean;
1801
- /** Last server URL we toggled ON with. Used for re-toggling and UI hint. */
1802
- lastServerUrl?: string;
1803
- }
1804
- /**
1805
- * Payload for `SetServerProxyEnabled`. The extension handler is the
1806
- * sole owner of `http.proxy` writes — the webview only sends the
1807
- * desired state + (optional) target scope. Server URL is normally read
1808
- * from the snapshot the webview already received via
1809
- * `ServerProxyStateResponse`; if missing, the handler rejects with
1810
- * `serverProxy.error.missingServerUrl`.
1811
- *
1812
- * `serverUrl` is an OVERRIDE: when supplied, the handler uses it
1813
- * instead of the snapshot's `http.proxy` for the `enable` write
1814
- * path. The Webview's "Use Cached Base URL" affordance relies on this
1815
- * so the cached `ServerConnectionService.getBaseUrl()` value gets
1816
- * applied as `http.proxy` even when `http.proxy` is currently empty.
1817
- * Still subject to the `proxySupport !== "override"` server-side gate.
1818
- */
1819
- export interface ServerProxyTogglePayload {
1820
- enabled: boolean;
1821
- /** Optional — defaults to Workspace. */
1822
- target?: "workspace" | "global";
1823
- /**
1824
- * Optional — override the snapshot's `http.proxy` for the write.
1825
- * Only honoured when `enabled === true`; ignored on disable so the
1826
- * existing "only clear our own write" semantics stay intact.
1827
- */
1828
- serverUrl?: string;
1829
- }
1830
- /**
1831
- * rev.21 — payload for `SetServerProxyAllowOverride`. Toggles the
1832
- * `serverProxy.allowOverride` self-flag in `~/.serviceme/server-proxy.json`.
1833
- * Persisted across VS Code restarts; defaults to `false` so users
1834
- * must explicitly opt-in to the `override` mode bypass.
1835
- */
1836
- export interface ServerProxyAllowOverridePayload {
1837
- allowOverride: boolean;
1838
- }
1839
- /**
1840
- * Reply to `GetCachedServerUrl`. Carries the cached base URL resolved
1841
- * by `ServerConnectionService` (probe + cache of `SERVER_URL_CANDIDATES`)
1842
- * and the same `proxySupport` snapshot for the UI to gate the
1843
- * "Apply" button.
1844
- *
1845
- * `baseUrl: null` means the candidate probe has not yet resolved a
1846
- * reachable Server — the Webview should hide the "Apply cached base
1847
- * URL" affordance rather than offer a no-op button.
1848
- */
1849
- export interface CachedServerUrlSnapshot {
1850
- baseUrl: string | null;
1851
- httpProxySupport: ServerProxySupportMode;
1852
- }
1853
1761
  /**
1854
1762
  * Where the three `msDevTools.utilityModels.*` settings (and their
1855
1763
  * derived `chat.*` mirrors) are persisted.
package/dist/index.d.ts CHANGED
@@ -1736,13 +1736,7 @@ export declare enum WebviewMessageType {
1736
1736
  UpdateCopilotLegacyPreview = "updateCopilotLegacyPreview",
1737
1737
  GetUtilityModels = "getUtilityModels",
1738
1738
  UtilityModelsResponse = "utilityModelsResponse",
1739
- UpdateUtilityModels = "updateUtilityModels",
1740
- GetServerProxyState = "getServerProxyState",
1741
- ServerProxyStateResponse = "serverProxyStateResponse",
1742
- SetServerProxyEnabled = "setServerProxyEnabled",
1743
- SetServerProxyAllowOverride = "setServerProxyAllowOverride",
1744
- GetCachedServerUrl = "getCachedServerUrl",
1745
- CachedServerUrlResponse = "cachedServerUrlResponse"
1739
+ UpdateUtilityModels = "updateUtilityModels"
1746
1740
  }
1747
1741
  /**
1748
1742
  * Top-level const aliases for the BYO Utility Models message-type
@@ -1764,92 +1758,6 @@ export declare const UpdateUtilityModels: "updateUtilityModels";
1764
1758
  export declare const SetCacheControlEnabled: "setCacheControlEnabled";
1765
1759
  export declare const GetByomSettings: "getByomSettings";
1766
1760
  export declare const ByomSettingsResponse: "byomSettingsResponse";
1767
- export declare const GetServerProxyState: "getServerProxyState";
1768
- export declare const ServerProxyStateResponse: "serverProxyStateResponse";
1769
- export declare const SetServerProxyEnabled: "setServerProxyEnabled";
1770
- export declare const SetServerProxyAllowOverride: "setServerProxyAllowOverride";
1771
- export declare const GetCachedServerUrl: "getCachedServerUrl";
1772
- export declare const CachedServerUrlResponse: "cachedServerUrlResponse";
1773
- /**
1774
- * Snapshot of the r7 server-proxy toggle (HTTP CONNECT through intranet
1775
- * Server). Mirrors `IProxyConfigService`'s `ProxyState` shape so the
1776
- * webview can render the same fields without a reshape.
1777
- *
1778
- * Returned by `GetServerProxyState` and broadcast as
1779
- * `ServerProxyStateResponse` so the ProvidersTab's ServerProxyToggle
1780
- * component can paint at the persisted state on mount.
1781
- *
1782
- * See `apps/extension/src/services/proxy/ProxyConfigService.ts` for
1783
- * the authoritative source of truth.
1784
- */
1785
- export type ServerProxySupportMode = "off" | "on" | "fallback" | "override";
1786
- export interface ServerProxySnapshot {
1787
- httpProxy: string | undefined;
1788
- httpProxyStrictSSL: boolean;
1789
- httpProxySupport: ServerProxySupportMode;
1790
- /** Self-flag at serverProxy.enabled; computed by the extension handler. */
1791
- enabled: boolean;
1792
- /**
1793
- * rev.21 — opt-in to bypass the `proxySupport === "override"`
1794
- * guard. Power users (e.g. corp environments that WANT all
1795
- * extensions including GitHub Copilot Chat to route through the
1796
- * corp tunnel) tick the "Allow under proxySupport=override"
1797
- * checkbox in the Webview; this flag is persisted to
1798
- * `~/.serviceme/server-proxy.json` alongside `enabled`.
1799
- */
1800
- allowOverride: boolean;
1801
- /** Last server URL we toggled ON with. Used for re-toggling and UI hint. */
1802
- lastServerUrl?: string;
1803
- }
1804
- /**
1805
- * Payload for `SetServerProxyEnabled`. The extension handler is the
1806
- * sole owner of `http.proxy` writes — the webview only sends the
1807
- * desired state + (optional) target scope. Server URL is normally read
1808
- * from the snapshot the webview already received via
1809
- * `ServerProxyStateResponse`; if missing, the handler rejects with
1810
- * `serverProxy.error.missingServerUrl`.
1811
- *
1812
- * `serverUrl` is an OVERRIDE: when supplied, the handler uses it
1813
- * instead of the snapshot's `http.proxy` for the `enable` write
1814
- * path. The Webview's "Use Cached Base URL" affordance relies on this
1815
- * so the cached `ServerConnectionService.getBaseUrl()` value gets
1816
- * applied as `http.proxy` even when `http.proxy` is currently empty.
1817
- * Still subject to the `proxySupport !== "override"` server-side gate.
1818
- */
1819
- export interface ServerProxyTogglePayload {
1820
- enabled: boolean;
1821
- /** Optional — defaults to Workspace. */
1822
- target?: "workspace" | "global";
1823
- /**
1824
- * Optional — override the snapshot's `http.proxy` for the write.
1825
- * Only honoured when `enabled === true`; ignored on disable so the
1826
- * existing "only clear our own write" semantics stay intact.
1827
- */
1828
- serverUrl?: string;
1829
- }
1830
- /**
1831
- * rev.21 — payload for `SetServerProxyAllowOverride`. Toggles the
1832
- * `serverProxy.allowOverride` self-flag in `~/.serviceme/server-proxy.json`.
1833
- * Persisted across VS Code restarts; defaults to `false` so users
1834
- * must explicitly opt-in to the `override` mode bypass.
1835
- */
1836
- export interface ServerProxyAllowOverridePayload {
1837
- allowOverride: boolean;
1838
- }
1839
- /**
1840
- * Reply to `GetCachedServerUrl`. Carries the cached base URL resolved
1841
- * by `ServerConnectionService` (probe + cache of `SERVER_URL_CANDIDATES`)
1842
- * and the same `proxySupport` snapshot for the UI to gate the
1843
- * "Apply" button.
1844
- *
1845
- * `baseUrl: null` means the candidate probe has not yet resolved a
1846
- * reachable Server — the Webview should hide the "Apply cached base
1847
- * URL" affordance rather than offer a no-op button.
1848
- */
1849
- export interface CachedServerUrlSnapshot {
1850
- baseUrl: string | null;
1851
- httpProxySupport: ServerProxySupportMode;
1852
- }
1853
1761
  /**
1854
1762
  * Where the three `msDevTools.utilityModels.*` settings (and their
1855
1763
  * derived `chat.*` mirrors) are persisted.
package/dist/index.js CHANGED
@@ -2295,12 +2295,6 @@ let WebviewMessageType = /* @__PURE__ */ function(WebviewMessageType) {
2295
2295
  WebviewMessageType["GetUtilityModels"] = "getUtilityModels";
2296
2296
  WebviewMessageType["UtilityModelsResponse"] = "utilityModelsResponse";
2297
2297
  WebviewMessageType["UpdateUtilityModels"] = "updateUtilityModels";
2298
- WebviewMessageType["GetServerProxyState"] = "getServerProxyState";
2299
- WebviewMessageType["ServerProxyStateResponse"] = "serverProxyStateResponse";
2300
- WebviewMessageType["SetServerProxyEnabled"] = "setServerProxyEnabled";
2301
- WebviewMessageType["SetServerProxyAllowOverride"] = "setServerProxyAllowOverride";
2302
- WebviewMessageType["GetCachedServerUrl"] = "getCachedServerUrl";
2303
- WebviewMessageType["CachedServerUrlResponse"] = "cachedServerUrlResponse";
2304
2298
  return WebviewMessageType;
2305
2299
  }({});
2306
2300
  /**
@@ -2323,12 +2317,6 @@ const UpdateUtilityModels = "updateUtilityModels";
2323
2317
  const SetCacheControlEnabled = "setCacheControlEnabled";
2324
2318
  const GetByomSettings = "getByomSettings";
2325
2319
  const ByomSettingsResponse = "byomSettingsResponse";
2326
- const GetServerProxyState = "getServerProxyState";
2327
- const ServerProxyStateResponse = "serverProxyStateResponse";
2328
- const SetServerProxyEnabled = "setServerProxyEnabled";
2329
- const SetServerProxyAllowOverride = "setServerProxyAllowOverride";
2330
- const GetCachedServerUrl = "getCachedServerUrl";
2331
- const CachedServerUrlResponse = "cachedServerUrlResponse";
2332
2320
  //#endregion
2333
2321
  //#region src/utils/safe-cast.ts
2334
2322
  /**
@@ -2389,13 +2377,10 @@ function safeJson(text, fallback) {
2389
2377
  exports.BUILTIN_PROVIDER_PRESETS = BUILTIN_PROVIDER_PRESETS;
2390
2378
  exports.ByomSettingsResponse = ByomSettingsResponse;
2391
2379
  exports.CERTIFICATE_BUNDLE_FORMATS = CERTIFICATE_BUNDLE_FORMATS;
2392
- exports.CachedServerUrlResponse = CachedServerUrlResponse;
2393
2380
  exports.DEVICE_SIG_ALG_V2 = DEVICE_SIG_ALG_V2;
2394
2381
  exports.DeviceAuthHeaders = DeviceAuthHeaders;
2395
2382
  exports.GIT_REMOTE_HOST_ALIASES = GIT_REMOTE_HOST_ALIASES;
2396
2383
  exports.GetByomSettings = GetByomSettings;
2397
- exports.GetCachedServerUrl = GetCachedServerUrl;
2398
- exports.GetServerProxyState = GetServerProxyState;
2399
2384
  exports.GetUtilityModels = GetUtilityModels;
2400
2385
  exports.LISTABLE_PRESET_MODELS = LISTABLE_PRESET_MODELS;
2401
2386
  exports.LogLevel = LogLevel;
@@ -2407,10 +2392,7 @@ exports.NAMESPACE_ALIAS_FAMILY = NAMESPACE_ALIAS_FAMILY;
2407
2392
  exports.PRESET_MODEL_FAMILIES = PRESET_MODEL_FAMILIES;
2408
2393
  exports.PROVIDER_BASE_URL_PRESETS = PROVIDER_BASE_URL_PRESETS;
2409
2394
  exports.PROVIDER_CACHE_CONTROL_METADATA = PROVIDER_CACHE_CONTROL_METADATA;
2410
- exports.ServerProxyStateResponse = ServerProxyStateResponse;
2411
2395
  exports.SetCacheControlEnabled = SetCacheControlEnabled;
2412
- exports.SetServerProxyAllowOverride = SetServerProxyAllowOverride;
2413
- exports.SetServerProxyEnabled = SetServerProxyEnabled;
2414
2396
  exports.UpdateUtilityModels = UpdateUtilityModels;
2415
2397
  exports.UtilityModelsResponse = UtilityModelsResponse;
2416
2398
  exports.WebviewMessageType = WebviewMessageType;
package/dist/index.mjs CHANGED
@@ -2294,12 +2294,6 @@ let WebviewMessageType = /* @__PURE__ */ function(WebviewMessageType) {
2294
2294
  WebviewMessageType["GetUtilityModels"] = "getUtilityModels";
2295
2295
  WebviewMessageType["UtilityModelsResponse"] = "utilityModelsResponse";
2296
2296
  WebviewMessageType["UpdateUtilityModels"] = "updateUtilityModels";
2297
- WebviewMessageType["GetServerProxyState"] = "getServerProxyState";
2298
- WebviewMessageType["ServerProxyStateResponse"] = "serverProxyStateResponse";
2299
- WebviewMessageType["SetServerProxyEnabled"] = "setServerProxyEnabled";
2300
- WebviewMessageType["SetServerProxyAllowOverride"] = "setServerProxyAllowOverride";
2301
- WebviewMessageType["GetCachedServerUrl"] = "getCachedServerUrl";
2302
- WebviewMessageType["CachedServerUrlResponse"] = "cachedServerUrlResponse";
2303
2297
  return WebviewMessageType;
2304
2298
  }({});
2305
2299
  /**
@@ -2322,12 +2316,6 @@ const UpdateUtilityModels = "updateUtilityModels";
2322
2316
  const SetCacheControlEnabled = "setCacheControlEnabled";
2323
2317
  const GetByomSettings = "getByomSettings";
2324
2318
  const ByomSettingsResponse = "byomSettingsResponse";
2325
- const GetServerProxyState = "getServerProxyState";
2326
- const ServerProxyStateResponse = "serverProxyStateResponse";
2327
- const SetServerProxyEnabled = "setServerProxyEnabled";
2328
- const SetServerProxyAllowOverride = "setServerProxyAllowOverride";
2329
- const GetCachedServerUrl = "getCachedServerUrl";
2330
- const CachedServerUrlResponse = "cachedServerUrlResponse";
2331
2319
  //#endregion
2332
2320
  //#region src/utils/safe-cast.ts
2333
2321
  /**
@@ -2385,4 +2373,4 @@ function safeJson(text, fallback) {
2385
2373
  }
2386
2374
  }
2387
2375
  //#endregion
2388
- export { BUILTIN_PROVIDER_PRESETS, ByomSettingsResponse, CERTIFICATE_BUNDLE_FORMATS, CachedServerUrlResponse, DEVICE_SIG_ALG_V2, DeviceAuthHeaders, GIT_REMOTE_HOST_ALIASES, GetByomSettings, GetCachedServerUrl, GetServerProxyState, GetUtilityModels, LISTABLE_PRESET_MODELS, LogLevel, MEDALSOFT_NUGET_PRIVATE_SOURCE, MEDALSOFT_PRIVATE_GATEWAY_URL, MODEL_METADATA, NAMESPACE_ALIASES, NAMESPACE_ALIAS_FAMILY, PRESET_MODEL_FAMILIES, PROVIDER_BASE_URL_PRESETS, PROVIDER_CACHE_CONTROL_METADATA, ServerProxyStateResponse, SetCacheControlEnabled, SetServerProxyAllowOverride, SetServerProxyEnabled, UpdateUtilityModels, UtilityModelsResponse, WebviewMessageType, __internal, asAbortSignal, buildGitHubLocalEmail, buildPresetModel, checkGitHubOrgMembership, createConsoleLogger, createDeviceRequestSignature, createDeviceRequestSignatureV2, currencyForBaseUrl, effectiveAdapterType, fetchGitHubUser, getBuiltinProviderPreset, getGitHubOrgMembership, getPresetModelDisplayName, getProviderBaseUrlPresets, isGitHubLocalEmail, isProviderCacheControlAware, isValidCanonicalSlug, isWholePackageInstall, listPresetModelGroups, lookupModelMetadata, normalizeCanonicalSlug, normalizeErrorForLog, normalizeGitUrl, parsePayload, protocolForBaseUrl, registrationIdFromPackageId, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
2376
+ export { BUILTIN_PROVIDER_PRESETS, ByomSettingsResponse, CERTIFICATE_BUNDLE_FORMATS, DEVICE_SIG_ALG_V2, DeviceAuthHeaders, GIT_REMOTE_HOST_ALIASES, GetByomSettings, GetUtilityModels, LISTABLE_PRESET_MODELS, LogLevel, MEDALSOFT_NUGET_PRIVATE_SOURCE, MEDALSOFT_PRIVATE_GATEWAY_URL, MODEL_METADATA, NAMESPACE_ALIASES, NAMESPACE_ALIAS_FAMILY, PRESET_MODEL_FAMILIES, PROVIDER_BASE_URL_PRESETS, PROVIDER_CACHE_CONTROL_METADATA, SetCacheControlEnabled, UpdateUtilityModels, UtilityModelsResponse, WebviewMessageType, __internal, asAbortSignal, buildGitHubLocalEmail, buildPresetModel, checkGitHubOrgMembership, createConsoleLogger, createDeviceRequestSignature, createDeviceRequestSignatureV2, currencyForBaseUrl, effectiveAdapterType, fetchGitHubUser, getBuiltinProviderPreset, getGitHubOrgMembership, getPresetModelDisplayName, getProviderBaseUrlPresets, isGitHubLocalEmail, isProviderCacheControlAware, isValidCanonicalSlug, isWholePackageInstall, listPresetModelGroups, lookupModelMetadata, normalizeCanonicalSlug, normalizeErrorForLog, normalizeGitUrl, parsePayload, protocolForBaseUrl, registrationIdFromPackageId, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceme/devtools-shared",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Shared webview↔extension message contracts and cross-package data models used by SERVICEME.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {