@serviceme/devtools-shared 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -947,6 +947,133 @@ declare const MEDALSOFT_PRIVATE_GATEWAY_URL = "http://10.10.10.249:3000/v1";
947
947
  /** Medalsoft 私有 NuGet 源,仅办公网可达。 */
948
948
  declare const MEDALSOFT_NUGET_PRIVATE_SOURCE = "http://192.168.20.209:10010/nuget";
949
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;
986
+ }
987
+ /**
988
+ * Whole-package registrar install marker: the explicit `wholePackage`
989
+ * flag, or (legacy shape) the synthetic `::package:` artifact. Such
990
+ * packages are PERSONAL-scope only — registrar-owned, so per-artifact
991
+ * scope actions (move to workspace) do not apply.
992
+ */
993
+ declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
994
+ interface CopilotArtifactViewPayload {
995
+ artifact: CopilotArtifactSummaryPayload;
996
+ state: CopilotArtifactStatePayload;
997
+ }
998
+ /**
999
+ * An installable plugin.json package found by scanning an enabled git
1000
+ * source — NOT yet (necessarily) installed. The CLI enumerates these
1001
+ * via the core plugin catalog and attaches them to the
1002
+ * `copilotCustomizations.list` result; `packageId` is directly usable
1003
+ * as the install input.
1004
+ */
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[];
1038
+ }
1039
+ /** 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">;
1049
+ }
1050
+ /** 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
+
950
1077
  /**
951
1078
  * Device-auth wire contract shared by the extension (signer) and the
952
1079
  * server (verifier).
@@ -1317,6 +1444,10 @@ interface BridgeSkillRepoEntry {
1317
1444
  frontmatter: Record<string, unknown>;
1318
1445
  /** ISO timestamp of the manifest's mtime. */
1319
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;
1320
1451
  }
1321
1452
  /** A single file inside an entry (SkillStore.SkillFile). */
1322
1453
  interface BridgeSkillRepoFile {
@@ -1493,6 +1624,7 @@ declare enum WebviewMessageType {
1493
1624
  InstallSkillRepoEntry = "installSkillRepoEntry",
1494
1625
  ConvertSkillRepoEntryToSymlink = "convertSkillRepoEntryToSymlink",
1495
1626
  UninstallSkillRepoEntry = "uninstallSkillRepoEntry",
1627
+ SetSkillRepoEntryEnabled = "setSkillRepoEntryEnabled",
1496
1628
  ListLinkedSkills = "listLinkedSkills",
1497
1629
  UpdateSkillRepoCatalog = "updateSkillRepoCatalog",
1498
1630
  UpdateSkillRepoInstall = "updateSkillRepoInstall",
@@ -1510,12 +1642,36 @@ declare enum WebviewMessageType {
1510
1642
  DisableRepository = "disableRepository",
1511
1643
  SyncRepository = "syncRepository",
1512
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",
1513
1653
  UpdateRepositoryList = "updateRepositoryList",
1514
1654
  UpdateRepositoryAdd = "updateRepositoryAdd",
1515
1655
  UpdateRepositoryUpdate = "updateRepositoryUpdate",
1516
1656
  UpdateRepositoryRemove = "updateRepositoryRemove",
1517
1657
  UpdateRepositoryToggle = "updateRepositoryToggle",
1518
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",
1519
1675
  GetUtilityModels = "getUtilityModels",
1520
1676
  UtilityModelsResponse = "utilityModelsResponse",
1521
1677
  UpdateUtilityModels = "updateUtilityModels",
@@ -1779,6 +1935,23 @@ type WebviewInboundMessage = {
1779
1935
  type: typeof WebviewMessageType.UpdateLinkedSkills;
1780
1936
  links: LinkedSkillPayloadEntry[];
1781
1937
  kind: "skill" | "agent";
1938
+ } | {
1939
+ type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1940
+ entries: CopilotContentStatusEntry[];
1941
+ changed: boolean;
1942
+ workspaceOpen?: boolean;
1943
+ } | {
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[];
1949
+ } | {
1950
+ type: typeof WebviewMessageType.UpdateCopilotSources;
1951
+ sources: CopilotSourceRecordPayload[];
1952
+ } | {
1953
+ type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1954
+ preview: CopilotPackageUpdatePreviewPayload;
1782
1955
  } | {
1783
1956
  type: typeof WebviewMessageType.UpdateExternalTools;
1784
1957
  tools?: ExternalTool[];
@@ -1819,6 +1992,65 @@ interface LinkedSkillPayloadEntry {
1819
1992
  name: string;
1820
1993
  scope?: string;
1821
1994
  }
1995
+ /**
1996
+ * One entry inside the `UpdateCopilotContentStatus.entries` array.
1997
+ * Mirrors the protocol-level `CopilotContentStatusResult` entry shape
1998
+ * (identity + status + optional message) so the webview can render the
1999
+ * reconciliation state without importing the protocol package.
2000
+ */
2001
+ interface CopilotContentStatusEntry {
2002
+ identity: string;
2003
+ status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2004
+ message?: string;
2005
+ }
2006
+ /**
2007
+ * Task 7 — webview → extension install intent. Mirrors the Task 3
2008
+ * protocol contract (`copilotContent.package.install`) minus the
2009
+ * private `workspaceDir` field, which the extension handler resolves
2010
+ * itself. `localMode` is REQUIRED for workspace-local sources (the
2011
+ * discovery preview blocks submission until the user picks one) and
2012
+ * is omitted for git / marketplace sources.
2013
+ */
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";
2022
+ }
2023
+ /** 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";
2029
+ }
2030
+ /** 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;
2035
+ }
2036
+ /** Task 10 — webview → extension source list intent; workspaceDir is resolved extension-side. */
2037
+ interface ListCopilotSourcesAction {
2038
+ type: WebviewMessageType.ListCopilotSources;
2039
+ scope: "workspace" | "personal";
2040
+ }
2041
+ /** 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;
2046
+ }
2047
+ /** 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
+ }
1822
2054
 
1823
2055
  /** Live execution state pushed to webview during task execution */
1824
2056
  interface TaskExecutionState {
@@ -1879,4 +2111,4 @@ declare function asAbortSignal(input: unknown): AbortSignal | undefined;
1879
2111
  */
1880
2112
  declare function safeJson<T>(text: string, fallback: T): T;
1881
2113
 
1882
- 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 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, LISTABLE_PRESET_MODELS, type LinkedSkillPayloadEntry, LogLevel, MEDALSOFT_NUGET_PRIVATE_SOURCE, MEDALSOFT_PRIVATE_GATEWAY_URL, MODEL_METADATA, type MinimaxUsage, type ModelDetail, type ModelPriceCategory, type ModelPricing, type ModelThinkingSchema, NAMESPACE_ALIASES, NAMESPACE_ALIAS_FAMILY, PRESET_MODEL_FAMILIES, PROVIDER_BASE_URL_PRESETS, PROVIDER_CACHE_CONTROL_METADATA, type PresetModelFamilyGroup, type PresetModelListing, 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 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, 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, listPresetModelGroups, lookupModelMetadata, normalizeCanonicalSlug, normalizeErrorForLog, normalizeGitUrl, parsePayload, protocolForBaseUrl, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
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 };
package/dist/index.d.ts CHANGED
@@ -947,6 +947,133 @@ declare const MEDALSOFT_PRIVATE_GATEWAY_URL = "http://10.10.10.249:3000/v1";
947
947
  /** Medalsoft 私有 NuGet 源,仅办公网可达。 */
948
948
  declare const MEDALSOFT_NUGET_PRIVATE_SOURCE = "http://192.168.20.209:10010/nuget";
949
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;
986
+ }
987
+ /**
988
+ * Whole-package registrar install marker: the explicit `wholePackage`
989
+ * flag, or (legacy shape) the synthetic `::package:` artifact. Such
990
+ * packages are PERSONAL-scope only — registrar-owned, so per-artifact
991
+ * scope actions (move to workspace) do not apply.
992
+ */
993
+ declare function isWholePackageInstall(definition: Pick<CopilotPackageDefinitionPayload, "wholePackage" | "artifacts">): boolean;
994
+ interface CopilotArtifactViewPayload {
995
+ artifact: CopilotArtifactSummaryPayload;
996
+ state: CopilotArtifactStatePayload;
997
+ }
998
+ /**
999
+ * An installable plugin.json package found by scanning an enabled git
1000
+ * source — NOT yet (necessarily) installed. The CLI enumerates these
1001
+ * via the core plugin catalog and attaches them to the
1002
+ * `copilotCustomizations.list` result; `packageId` is directly usable
1003
+ * as the install input.
1004
+ */
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[];
1038
+ }
1039
+ /** 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">;
1049
+ }
1050
+ /** 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
+
950
1077
  /**
951
1078
  * Device-auth wire contract shared by the extension (signer) and the
952
1079
  * server (verifier).
@@ -1317,6 +1444,10 @@ interface BridgeSkillRepoEntry {
1317
1444
  frontmatter: Record<string, unknown>;
1318
1445
  /** ISO timestamp of the manifest's mtime. */
1319
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;
1320
1451
  }
1321
1452
  /** A single file inside an entry (SkillStore.SkillFile). */
1322
1453
  interface BridgeSkillRepoFile {
@@ -1493,6 +1624,7 @@ declare enum WebviewMessageType {
1493
1624
  InstallSkillRepoEntry = "installSkillRepoEntry",
1494
1625
  ConvertSkillRepoEntryToSymlink = "convertSkillRepoEntryToSymlink",
1495
1626
  UninstallSkillRepoEntry = "uninstallSkillRepoEntry",
1627
+ SetSkillRepoEntryEnabled = "setSkillRepoEntryEnabled",
1496
1628
  ListLinkedSkills = "listLinkedSkills",
1497
1629
  UpdateSkillRepoCatalog = "updateSkillRepoCatalog",
1498
1630
  UpdateSkillRepoInstall = "updateSkillRepoInstall",
@@ -1510,12 +1642,36 @@ declare enum WebviewMessageType {
1510
1642
  DisableRepository = "disableRepository",
1511
1643
  SyncRepository = "syncRepository",
1512
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",
1513
1653
  UpdateRepositoryList = "updateRepositoryList",
1514
1654
  UpdateRepositoryAdd = "updateRepositoryAdd",
1515
1655
  UpdateRepositoryUpdate = "updateRepositoryUpdate",
1516
1656
  UpdateRepositoryRemove = "updateRepositoryRemove",
1517
1657
  UpdateRepositoryToggle = "updateRepositoryToggle",
1518
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",
1519
1675
  GetUtilityModels = "getUtilityModels",
1520
1676
  UtilityModelsResponse = "utilityModelsResponse",
1521
1677
  UpdateUtilityModels = "updateUtilityModels",
@@ -1779,6 +1935,23 @@ type WebviewInboundMessage = {
1779
1935
  type: typeof WebviewMessageType.UpdateLinkedSkills;
1780
1936
  links: LinkedSkillPayloadEntry[];
1781
1937
  kind: "skill" | "agent";
1938
+ } | {
1939
+ type: typeof WebviewMessageType.UpdateCopilotContentStatus;
1940
+ entries: CopilotContentStatusEntry[];
1941
+ changed: boolean;
1942
+ workspaceOpen?: boolean;
1943
+ } | {
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[];
1949
+ } | {
1950
+ type: typeof WebviewMessageType.UpdateCopilotSources;
1951
+ sources: CopilotSourceRecordPayload[];
1952
+ } | {
1953
+ type: typeof WebviewMessageType.UpdateCopilotUpdatePreview;
1954
+ preview: CopilotPackageUpdatePreviewPayload;
1782
1955
  } | {
1783
1956
  type: typeof WebviewMessageType.UpdateExternalTools;
1784
1957
  tools?: ExternalTool[];
@@ -1819,6 +1992,65 @@ interface LinkedSkillPayloadEntry {
1819
1992
  name: string;
1820
1993
  scope?: string;
1821
1994
  }
1995
+ /**
1996
+ * One entry inside the `UpdateCopilotContentStatus.entries` array.
1997
+ * Mirrors the protocol-level `CopilotContentStatusResult` entry shape
1998
+ * (identity + status + optional message) so the webview can render the
1999
+ * reconciliation state without importing the protocol package.
2000
+ */
2001
+ interface CopilotContentStatusEntry {
2002
+ identity: string;
2003
+ status: "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
2004
+ message?: string;
2005
+ }
2006
+ /**
2007
+ * Task 7 — webview → extension install intent. Mirrors the Task 3
2008
+ * protocol contract (`copilotContent.package.install`) minus the
2009
+ * private `workspaceDir` field, which the extension handler resolves
2010
+ * itself. `localMode` is REQUIRED for workspace-local sources (the
2011
+ * discovery preview blocks submission until the user picks one) and
2012
+ * is omitted for git / marketplace sources.
2013
+ */
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";
2022
+ }
2023
+ /** 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";
2029
+ }
2030
+ /** 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;
2035
+ }
2036
+ /** Task 10 — webview → extension source list intent; workspaceDir is resolved extension-side. */
2037
+ interface ListCopilotSourcesAction {
2038
+ type: WebviewMessageType.ListCopilotSources;
2039
+ scope: "workspace" | "personal";
2040
+ }
2041
+ /** 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;
2046
+ }
2047
+ /** 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
+ }
1822
2054
 
1823
2055
  /** Live execution state pushed to webview during task execution */
1824
2056
  interface TaskExecutionState {
@@ -1879,4 +2111,4 @@ declare function asAbortSignal(input: unknown): AbortSignal | undefined;
1879
2111
  */
1880
2112
  declare function safeJson<T>(text: string, fallback: T): T;
1881
2113
 
1882
- 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 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, LISTABLE_PRESET_MODELS, type LinkedSkillPayloadEntry, LogLevel, MEDALSOFT_NUGET_PRIVATE_SOURCE, MEDALSOFT_PRIVATE_GATEWAY_URL, MODEL_METADATA, type MinimaxUsage, type ModelDetail, type ModelPriceCategory, type ModelPricing, type ModelThinkingSchema, NAMESPACE_ALIASES, NAMESPACE_ALIAS_FAMILY, PRESET_MODEL_FAMILIES, PROVIDER_BASE_URL_PRESETS, PROVIDER_CACHE_CONTROL_METADATA, type PresetModelFamilyGroup, type PresetModelListing, 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 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, 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, listPresetModelGroups, lookupModelMetadata, normalizeCanonicalSlug, normalizeErrorForLog, normalizeGitUrl, parsePayload, protocolForBaseUrl, resolvePrimaryEmail, safeJson, unionProviderModelWithPreset };
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 };
package/dist/index.js CHANGED
@@ -64,6 +64,7 @@ __export(index_exports, {
64
64
  isGitHubLocalEmail: () => isGitHubLocalEmail,
65
65
  isProviderCacheControlAware: () => isProviderCacheControlAware,
66
66
  isValidCanonicalSlug: () => isValidCanonicalSlug,
67
+ isWholePackageInstall: () => isWholePackageInstall,
67
68
  listPresetModelGroups: () => listPresetModelGroups,
68
69
  lookupModelMetadata: () => lookupModelMetadata,
69
70
  normalizeCanonicalSlug: () => normalizeCanonicalSlug,
@@ -575,6 +576,53 @@ var PRIMARY_METADATA = {
575
576
  maxInputTokens: 1e6,
576
577
  maxOutputTokens: 128e3
577
578
  },
579
+ // GLM-5.3-Flash (2026-08-26) — GLM-5 系列首个原生多模态模型,
580
+ // 320B 总参 / 18B 激活,稀疏+线性注意力混合架构,1M 上下文。
581
+ // 视觉能力原生融入 Coding 循环(自动观察 UI 渲染/交互反馈并迭代)。
582
+ // 比 GLM-5.3 attention 计算量与 KV 缓存分别降低 3.01× / 4.44×。
583
+ // Source:
584
+ // https://docs.bigmodel.cn/cn/guide/start/model-overview
585
+ // https://z.ai/blog/glm-5.3-flash
586
+ // https://bigmodel.cn/pricing (screenshot 2026-08-26 — 截图列
587
+ // 出了限时免费期内的价格,带「5 折限时 2 周」角标,正常定价未
588
+ // 公开列在定价页)。
589
+ // 截图定价(screenshot 2026-08-26,原价):
590
+ // 上下文: 1M
591
+ // 输入: ¥0.4 / M tokens(原文"0.4 元",灰显 0.8 元)
592
+ // 输出: ¥1.4 / M tokens(原文"1.4 元",灰显 2.8 元)
593
+ // 缓存存储: 限时免费(写时按"百万 tokens/小时",我们的
594
+ // `ModelPricing` schema 没有缓存存储字段,忽略)
595
+ // 缓存命中: ¥0.115 / M tokens(原文"0.115 元",灰显 0.23 元)
596
+ // 灰显数字是 5 折限时的折后价,不是新价。优惠结束后回到 0.4/1.4/0.115。
597
+ // USD 按项目的 CNY/7 镜像取两位小数,与 glm-5.2 / glm-5.3 风格保持一致。
598
+ "glm-5.3-flash": {
599
+ detail: "GLM-5.3 Flash \u2014 320B/18B \u6FC0\u6D3B,\u7A00\u758F+\u7EBF\u6027\u6CE8\u610F\u529B\u6DF7\u5408\u67B6\u6784,\u539F\u751F\u591A\u6A21\u6001\u89C6\u89C9 Coding,1M \u4E0A\u4E0B\u6587",
600
+ // 原生多模态:支持图片 / 视频 / 文件 / 文本(imageInput=true)。
601
+ imageInput: true,
602
+ toolCalling: true,
603
+ // 思考模式:`thinking.type` 仅支持 `enabled`(不支持关闭),
604
+ // 控制深度靠 `reasoning_effort`(low/high/max)。与 glm-5.3
605
+ // 共用同一 schema。
606
+ thinkingSchema: "reasoningEffort",
607
+ supportsReasoningEffort: true,
608
+ // CNY 直接取截图数字(¥0.4 / ¥1.4 / ¥0.115);USD = CNY/7
609
+ // 镜像取两位小数:
610
+ // 0.4 / 7 = 0.0571... → 0.057
611
+ // 1.4 / 7 = 0.2
612
+ // 0.115 / 7 = 0.01643... → 0.0164
613
+ // 这与 glm-5.2 (¥8/¥28/¥2 → $1.12/$3.92/$0.28) 的
614
+ // 四舍五入风格保持一致;glm-5.3 用的 USD 国际独立价
615
+ // ($1.4/$4.4/$0.26) 不适用于本条目 — 截图明确是 CNY
616
+ // 国内口径。
617
+ pricingUSD: { input: 0.057, output: 0.2, cacheRead: 0.0164 },
618
+ pricingCNY: { input: 0.4, output: 1.4, cacheRead: 0.115 },
619
+ priceCategory: "low",
620
+ maxInputTokens: 1e6,
621
+ // 官方未单独发布 5.3-Flash 的 max output。按 GLM-5.3 系列
622
+ // 共识取 128K(与 glm-5.2 / glm-5.3 同),保守留 buffer
623
+ // 给输入。
624
+ maxOutputTokens: 128e3
625
+ },
578
626
  // GLM-5.1-HighSpeed (2026-05) — production-grade high-throughput
579
627
  // variant of GLM-5.1. Same 200K context + 128K output, but optimised
580
628
  // via Zhipu's TileRT inference engine for 400 TPS output (~2× the
@@ -1313,16 +1361,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1313
1361
  // (otherwise the user's added model never shows up in the
1314
1362
  // Copilot Chat picker).
1315
1363
  models: [
1316
- buildPresetModel(
1317
- "MiniMax-M3",
1318
- "MiniMax-M3",
1319
- "https://api.minimaxi.com/anthropic"
1320
- ),
1321
- buildPresetModel(
1322
- "MiniMax-M2.7",
1323
- "MiniMax-M2.7",
1324
- "https://api.minimaxi.com/anthropic"
1325
- ),
1364
+ buildPresetModel("MiniMax-M3", "MiniMax-M3", "https://api.minimaxi.com/anthropic"),
1365
+ buildPresetModel("MiniMax-M2.7", "MiniMax-M2.7", "https://api.minimaxi.com/anthropic"),
1326
1366
  buildPresetModel(
1327
1367
  "MiniMax-M2.7-highspeed",
1328
1368
  "MiniMax-M2.7-highspeed",
@@ -1332,11 +1372,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1332
1372
  // predecessor of M2.7. Still in the catalog and often
1333
1373
  // available on MiniMax's promotional $0.30/$1.20 rate, so
1334
1374
  // keep it as a preset for users on the M2.5 plan tier.
1335
- buildPresetModel(
1336
- "MiniMax-M2.5",
1337
- "MiniMax-M2.5",
1338
- "https://api.minimaxi.com/anthropic"
1339
- )
1375
+ buildPresetModel("MiniMax-M2.5", "MiniMax-M2.5", "https://api.minimaxi.com/anthropic")
1340
1376
  ]
1341
1377
  },
1342
1378
  deepseek: {
@@ -1358,16 +1394,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1358
1394
  // the recommended default — users still on V3 can override
1359
1395
  // these defaults in the ProvidersTab form.
1360
1396
  models: [
1361
- buildPresetModel(
1362
- "deepseek-v4-flash",
1363
- "DeepSeek V4 Flash",
1364
- "https://api.deepseek.com/v1"
1365
- ),
1366
- buildPresetModel(
1367
- "deepseek-v4-pro",
1368
- "DeepSeek V4 Pro",
1369
- "https://api.deepseek.com/v1"
1370
- )
1397
+ buildPresetModel("deepseek-v4-flash", "DeepSeek V4 Flash", "https://api.deepseek.com/v1"),
1398
+ buildPresetModel("deepseek-v4-pro", "DeepSeek V4 Pro", "https://api.deepseek.com/v1")
1371
1399
  ]
1372
1400
  },
1373
1401
  agnes: {
@@ -1381,26 +1409,14 @@ var BUILTIN_PROVIDER_PRESETS = {
1381
1409
  // benchmark-listed alpha — followed by the flash tier
1382
1410
  // newest-first.
1383
1411
  models: [
1384
- buildPresetModel(
1385
- "agnes-2.5-pro",
1386
- "Agnes 2.5 Pro",
1387
- "https://apihub.agnes-ai.com/v1"
1388
- ),
1412
+ buildPresetModel("agnes-2.5-pro", "Agnes 2.5 Pro", "https://apihub.agnes-ai.com/v1"),
1389
1413
  buildPresetModel(
1390
1414
  "agnes-2.5-pro-alpha",
1391
1415
  "Agnes 2.5 Pro Alpha",
1392
1416
  "https://apihub.agnes-ai.com/v1"
1393
1417
  ),
1394
- buildPresetModel(
1395
- "agnes-2.5-flash",
1396
- "Agnes 2.5 Flash",
1397
- "https://apihub.agnes-ai.com/v1"
1398
- ),
1399
- buildPresetModel(
1400
- "agnes-2.0-flash",
1401
- "Agnes 2.0 Flash",
1402
- "https://apihub.agnes-ai.com/v1"
1403
- )
1418
+ buildPresetModel("agnes-2.5-flash", "Agnes 2.5 Flash", "https://apihub.agnes-ai.com/v1"),
1419
+ buildPresetModel("agnes-2.0-flash", "Agnes 2.0 Flash", "https://apihub.agnes-ai.com/v1")
1404
1420
  ]
1405
1421
  },
1406
1422
  kimi: {
@@ -1408,11 +1424,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1408
1424
  baseUrl: "https://api.moonshot.cn/v1",
1409
1425
  models: [
1410
1426
  buildPresetModel("kimi-k3", "Kimi K3", "https://api.moonshot.cn/v1"),
1411
- buildPresetModel(
1412
- "kimi-k2.7-code",
1413
- "Kimi K2.7 Code",
1414
- "https://api.moonshot.cn/v1"
1415
- ),
1427
+ buildPresetModel("kimi-k2.7-code", "Kimi K2.7 Code", "https://api.moonshot.cn/v1"),
1416
1428
  buildPresetModel(
1417
1429
  "kimi-k2.7-code-highspeed",
1418
1430
  "Kimi K2.7 Code HighSpeed",
@@ -1490,67 +1502,28 @@ var BUILTIN_PROVIDER_PRESETS = {
1490
1502
  // `MODEL_METADATA` entries are kept so the id is still
1491
1503
  // resolvable for the curated detail / pricing columns.
1492
1504
  models: [
1493
- buildPresetModel(
1494
- "glm-5.3",
1495
- "GLM-5.3",
1496
- "https://open.bigmodel.cn/api/paas/v4"
1497
- ),
1498
- buildPresetModel(
1499
- "glm-5.2",
1500
- "GLM-5.2",
1501
- "https://open.bigmodel.cn/api/paas/v4"
1502
- ),
1503
- buildPresetModel(
1504
- "glm-5.1",
1505
- "GLM-5.1",
1506
- "https://open.bigmodel.cn/api/paas/v4"
1507
- ),
1508
- buildPresetModel(
1509
- "glm-5",
1510
- "GLM-5",
1511
- "https://open.bigmodel.cn/api/paas/v4"
1512
- ),
1513
- buildPresetModel(
1514
- "glm-5-turbo",
1515
- "GLM-5 Turbo",
1516
- "https://open.bigmodel.cn/api/paas/v4"
1517
- ),
1518
- buildPresetModel(
1519
- "glm-4.7",
1520
- "GLM-4.7",
1521
- "https://open.bigmodel.cn/api/paas/v4"
1522
- ),
1523
- buildPresetModel(
1524
- "glm-4.6",
1525
- "GLM-4.6",
1526
- "https://open.bigmodel.cn/api/paas/v4"
1527
- ),
1528
- buildPresetModel(
1529
- "glm-4.5-air",
1530
- "GLM-4.5 Air",
1531
- "https://open.bigmodel.cn/api/paas/v4"
1532
- ),
1533
- buildPresetModel(
1534
- "glm-4.5",
1535
- "GLM-4.5",
1536
- "https://open.bigmodel.cn/api/paas/v4"
1537
- )
1505
+ buildPresetModel("glm-5.3", "GLM-5.3", "https://open.bigmodel.cn/api/paas/v4"),
1506
+ // GLM-5.3-Flash (2026-08-26) — GLM-5 系列首个原生多模态
1507
+ // 模型,性价比高(¥0.4/¥1.4 per 1M tokens),接入 GLM Coding Plan
1508
+ // 后额度较 GLM-5.3 翻 3 倍。放在 5.3 后面,符合
1509
+ // 旗舰/快速版成对的展示惯例。
1510
+ buildPresetModel("glm-5.3-flash", "GLM-5.3 Flash", "https://open.bigmodel.cn/api/paas/v4"),
1511
+ buildPresetModel("glm-5.2", "GLM-5.2", "https://open.bigmodel.cn/api/paas/v4"),
1512
+ buildPresetModel("glm-5.1", "GLM-5.1", "https://open.bigmodel.cn/api/paas/v4"),
1513
+ buildPresetModel("glm-5", "GLM-5", "https://open.bigmodel.cn/api/paas/v4"),
1514
+ buildPresetModel("glm-5-turbo", "GLM-5 Turbo", "https://open.bigmodel.cn/api/paas/v4"),
1515
+ buildPresetModel("glm-4.7", "GLM-4.7", "https://open.bigmodel.cn/api/paas/v4"),
1516
+ buildPresetModel("glm-4.6", "GLM-4.6", "https://open.bigmodel.cn/api/paas/v4"),
1517
+ buildPresetModel("glm-4.5-air", "GLM-4.5 Air", "https://open.bigmodel.cn/api/paas/v4"),
1518
+ buildPresetModel("glm-4.5", "GLM-4.5", "https://open.bigmodel.cn/api/paas/v4")
1538
1519
  ]
1539
1520
  },
1540
1521
  stepfun: {
1541
1522
  displayName: "StepFun",
1542
1523
  baseUrl: "https://api.stepfun.com/v1",
1543
1524
  models: [
1544
- buildPresetModel(
1545
- "step-3.7-flash",
1546
- "Step 3.7 Flash",
1547
- "https://api.stepfun.com/v1"
1548
- ),
1549
- buildPresetModel(
1550
- "step-3.5-flash",
1551
- "Step 3.5 Flash",
1552
- "https://api.stepfun.com/v1"
1553
- ),
1525
+ buildPresetModel("step-3.7-flash", "Step 3.7 Flash", "https://api.stepfun.com/v1"),
1526
+ buildPresetModel("step-3.5-flash", "Step 3.5 Flash", "https://api.stepfun.com/v1"),
1554
1527
  buildPresetModel(
1555
1528
  "step-1o-turbo-vision",
1556
1529
  "Step 1o Turbo Vision",
@@ -1603,11 +1576,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1603
1576
  displayName: "OpenRouter",
1604
1577
  baseUrl: "https://openrouter.ai/api/v1",
1605
1578
  models: [
1606
- buildPresetModel(
1607
- "openrouter/auto",
1608
- "OpenRouter Auto",
1609
- "https://openrouter.ai/api/v1"
1610
- )
1579
+ buildPresetModel("openrouter/auto", "OpenRouter Auto", "https://openrouter.ai/api/v1")
1611
1580
  ]
1612
1581
  },
1613
1582
  novita: {
@@ -1631,16 +1600,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1631
1600
  "https://api.novita.ai/openai/v1"
1632
1601
  ),
1633
1602
  // GLM-5 系列 (2026-04/06)
1634
- buildPresetModel(
1635
- "zai/glm-5.2",
1636
- "GLM-5.2 (via Novita)",
1637
- "https://api.novita.ai/openai/v1"
1638
- ),
1639
- buildPresetModel(
1640
- "zai/glm-5.1",
1641
- "GLM-5.1 (via Novita)",
1642
- "https://api.novita.ai/openai/v1"
1643
- ),
1603
+ buildPresetModel("zai/glm-5.2", "GLM-5.2 (via Novita)", "https://api.novita.ai/openai/v1"),
1604
+ buildPresetModel("zai/glm-5.1", "GLM-5.1 (via Novita)", "https://api.novita.ai/openai/v1"),
1644
1605
  // Kimi K3 (2026-07-16 API, 2026-07-27 开源) — 1M context, 2.8T MoE
1645
1606
  buildPresetModel(
1646
1607
  "moonshotai/kimi-k3",
@@ -1713,11 +1674,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1713
1674
  {
1714
1675
  // Live /v1/models: context_length 1048576,
1715
1676
  // max_output_length 131072, input_modalities ["text"] only.
1716
- ...buildPresetModel(
1717
- "glm-5.2",
1718
- "GLM-5.2 (via SenseNova)",
1719
- "https://token.sensenova.cn/v1"
1720
- ),
1677
+ ...buildPresetModel("glm-5.2", "GLM-5.2 (via SenseNova)", "https://token.sensenova.cn/v1"),
1721
1678
  maxInputTokens: 1048576,
1722
1679
  maxOutputTokens: 131072,
1723
1680
  capabilities: { supportsImageToText: false, supportsToolCalling: true }
@@ -1811,6 +1768,11 @@ var CERTIFICATE_BUNDLE_FORMATS = [
1811
1768
  }
1812
1769
  ];
1813
1770
 
1771
+ // src/copilot-customizations.ts
1772
+ function isWholePackageInstall(definition) {
1773
+ return definition.wholePackage === true || definition.artifacts?.some((artifact) => artifact.id.includes("::package:")) === true;
1774
+ }
1775
+
1814
1776
  // ../../node_modules/.pnpm/js-sha256@1.0.0/node_modules/js-sha256/src/node.mjs
1815
1777
  var import_crypto = require("crypto");
1816
1778
 
@@ -2337,6 +2299,7 @@ var WebviewMessageType = /* @__PURE__ */ ((WebviewMessageType2) => {
2337
2299
  WebviewMessageType2["InstallSkillRepoEntry"] = "installSkillRepoEntry";
2338
2300
  WebviewMessageType2["ConvertSkillRepoEntryToSymlink"] = "convertSkillRepoEntryToSymlink";
2339
2301
  WebviewMessageType2["UninstallSkillRepoEntry"] = "uninstallSkillRepoEntry";
2302
+ WebviewMessageType2["SetSkillRepoEntryEnabled"] = "setSkillRepoEntryEnabled";
2340
2303
  WebviewMessageType2["ListLinkedSkills"] = "listLinkedSkills";
2341
2304
  WebviewMessageType2["UpdateSkillRepoCatalog"] = "updateSkillRepoCatalog";
2342
2305
  WebviewMessageType2["UpdateSkillRepoInstall"] = "updateSkillRepoInstall";
@@ -2354,12 +2317,36 @@ var WebviewMessageType = /* @__PURE__ */ ((WebviewMessageType2) => {
2354
2317
  WebviewMessageType2["DisableRepository"] = "disableRepository";
2355
2318
  WebviewMessageType2["SyncRepository"] = "syncRepository";
2356
2319
  WebviewMessageType2["SyncAllRepositories"] = "syncAllRepositories";
2320
+ WebviewMessageType2["ResetParseCache"] = "resetParseCache";
2321
+ WebviewMessageType2["ListCopilotPlugins"] = "listCopilotPlugins";
2322
+ WebviewMessageType2["RegisterCopilotPlugin"] = "registerCopilotPlugin";
2323
+ WebviewMessageType2["UnregisterCopilotPlugin"] = "unregisterCopilotPlugin";
2324
+ WebviewMessageType2["SetCopilotPluginEnabled"] = "setCopilotPluginEnabled";
2325
+ WebviewMessageType2["GetCopilotContentStatus"] = "getCopilotContentStatus";
2326
+ WebviewMessageType2["RestoreCopilotContent"] = "restoreCopilotContent";
2327
+ WebviewMessageType2["ApproveCopilotContent"] = "approveCopilotContent";
2357
2328
  WebviewMessageType2["UpdateRepositoryList"] = "updateRepositoryList";
2358
2329
  WebviewMessageType2["UpdateRepositoryAdd"] = "updateRepositoryAdd";
2359
2330
  WebviewMessageType2["UpdateRepositoryUpdate"] = "updateRepositoryUpdate";
2360
2331
  WebviewMessageType2["UpdateRepositoryRemove"] = "updateRepositoryRemove";
2361
2332
  WebviewMessageType2["UpdateRepositoryToggle"] = "updateRepositoryToggle";
2362
2333
  WebviewMessageType2["UpdateRepositorySyncResult"] = "updateRepositorySyncResult";
2334
+ WebviewMessageType2["UpdateCopilotContentStatus"] = "updateCopilotContentStatus";
2335
+ WebviewMessageType2["GetCopilotCustomizations"] = "getCopilotCustomizations";
2336
+ WebviewMessageType2["SyncCopilotCustomizations"] = "syncCopilotCustomizations";
2337
+ WebviewMessageType2["UpdateCopilotCustomizations"] = "updateCopilotCustomizations";
2338
+ WebviewMessageType2["InstallCopilotPackage"] = "installCopilotPackage";
2339
+ WebviewMessageType2["MoveCopilotPackage"] = "moveCopilotPackage";
2340
+ WebviewMessageType2["UninstallCopilotPackage"] = "uninstallCopilotPackage";
2341
+ WebviewMessageType2["ListCopilotSources"] = "listCopilotSources";
2342
+ WebviewMessageType2["RemoveCopilotSource"] = "removeCopilotSource";
2343
+ WebviewMessageType2["PreviewCopilotUpdate"] = "previewCopilotUpdate";
2344
+ WebviewMessageType2["UpdateCopilotPackage"] = "updateCopilotPackage";
2345
+ WebviewMessageType2["PreviewCopilotLegacy"] = "previewCopilotLegacy";
2346
+ WebviewMessageType2["MigrateCopilotLegacy"] = "migrateCopilotLegacy";
2347
+ WebviewMessageType2["UpdateCopilotSources"] = "updateCopilotSources";
2348
+ WebviewMessageType2["UpdateCopilotUpdatePreview"] = "updateCopilotUpdatePreview";
2349
+ WebviewMessageType2["UpdateCopilotLegacyPreview"] = "updateCopilotLegacyPreview";
2363
2350
  WebviewMessageType2["GetUtilityModels"] = "getUtilityModels";
2364
2351
  WebviewMessageType2["UtilityModelsResponse"] = "utilityModelsResponse";
2365
2352
  WebviewMessageType2["UpdateUtilityModels"] = "updateUtilityModels";
@@ -2450,6 +2437,7 @@ function safeJson(text, fallback) {
2450
2437
  isGitHubLocalEmail,
2451
2438
  isProviderCacheControlAware,
2452
2439
  isValidCanonicalSlug,
2440
+ isWholePackageInstall,
2453
2441
  listPresetModelGroups,
2454
2442
  lookupModelMetadata,
2455
2443
  normalizeCanonicalSlug,
package/dist/index.mjs CHANGED
@@ -496,6 +496,53 @@ var PRIMARY_METADATA = {
496
496
  maxInputTokens: 1e6,
497
497
  maxOutputTokens: 128e3
498
498
  },
499
+ // GLM-5.3-Flash (2026-08-26) — GLM-5 系列首个原生多模态模型,
500
+ // 320B 总参 / 18B 激活,稀疏+线性注意力混合架构,1M 上下文。
501
+ // 视觉能力原生融入 Coding 循环(自动观察 UI 渲染/交互反馈并迭代)。
502
+ // 比 GLM-5.3 attention 计算量与 KV 缓存分别降低 3.01× / 4.44×。
503
+ // Source:
504
+ // https://docs.bigmodel.cn/cn/guide/start/model-overview
505
+ // https://z.ai/blog/glm-5.3-flash
506
+ // https://bigmodel.cn/pricing (screenshot 2026-08-26 — 截图列
507
+ // 出了限时免费期内的价格,带「5 折限时 2 周」角标,正常定价未
508
+ // 公开列在定价页)。
509
+ // 截图定价(screenshot 2026-08-26,原价):
510
+ // 上下文: 1M
511
+ // 输入: ¥0.4 / M tokens(原文"0.4 元",灰显 0.8 元)
512
+ // 输出: ¥1.4 / M tokens(原文"1.4 元",灰显 2.8 元)
513
+ // 缓存存储: 限时免费(写时按"百万 tokens/小时",我们的
514
+ // `ModelPricing` schema 没有缓存存储字段,忽略)
515
+ // 缓存命中: ¥0.115 / M tokens(原文"0.115 元",灰显 0.23 元)
516
+ // 灰显数字是 5 折限时的折后价,不是新价。优惠结束后回到 0.4/1.4/0.115。
517
+ // USD 按项目的 CNY/7 镜像取两位小数,与 glm-5.2 / glm-5.3 风格保持一致。
518
+ "glm-5.3-flash": {
519
+ detail: "GLM-5.3 Flash \u2014 320B/18B \u6FC0\u6D3B,\u7A00\u758F+\u7EBF\u6027\u6CE8\u610F\u529B\u6DF7\u5408\u67B6\u6784,\u539F\u751F\u591A\u6A21\u6001\u89C6\u89C9 Coding,1M \u4E0A\u4E0B\u6587",
520
+ // 原生多模态:支持图片 / 视频 / 文件 / 文本(imageInput=true)。
521
+ imageInput: true,
522
+ toolCalling: true,
523
+ // 思考模式:`thinking.type` 仅支持 `enabled`(不支持关闭),
524
+ // 控制深度靠 `reasoning_effort`(low/high/max)。与 glm-5.3
525
+ // 共用同一 schema。
526
+ thinkingSchema: "reasoningEffort",
527
+ supportsReasoningEffort: true,
528
+ // CNY 直接取截图数字(¥0.4 / ¥1.4 / ¥0.115);USD = CNY/7
529
+ // 镜像取两位小数:
530
+ // 0.4 / 7 = 0.0571... → 0.057
531
+ // 1.4 / 7 = 0.2
532
+ // 0.115 / 7 = 0.01643... → 0.0164
533
+ // 这与 glm-5.2 (¥8/¥28/¥2 → $1.12/$3.92/$0.28) 的
534
+ // 四舍五入风格保持一致;glm-5.3 用的 USD 国际独立价
535
+ // ($1.4/$4.4/$0.26) 不适用于本条目 — 截图明确是 CNY
536
+ // 国内口径。
537
+ pricingUSD: { input: 0.057, output: 0.2, cacheRead: 0.0164 },
538
+ pricingCNY: { input: 0.4, output: 1.4, cacheRead: 0.115 },
539
+ priceCategory: "low",
540
+ maxInputTokens: 1e6,
541
+ // 官方未单独发布 5.3-Flash 的 max output。按 GLM-5.3 系列
542
+ // 共识取 128K(与 glm-5.2 / glm-5.3 同),保守留 buffer
543
+ // 给输入。
544
+ maxOutputTokens: 128e3
545
+ },
499
546
  // GLM-5.1-HighSpeed (2026-05) — production-grade high-throughput
500
547
  // variant of GLM-5.1. Same 200K context + 128K output, but optimised
501
548
  // via Zhipu's TileRT inference engine for 400 TPS output (~2× the
@@ -1234,16 +1281,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1234
1281
  // (otherwise the user's added model never shows up in the
1235
1282
  // Copilot Chat picker).
1236
1283
  models: [
1237
- buildPresetModel(
1238
- "MiniMax-M3",
1239
- "MiniMax-M3",
1240
- "https://api.minimaxi.com/anthropic"
1241
- ),
1242
- buildPresetModel(
1243
- "MiniMax-M2.7",
1244
- "MiniMax-M2.7",
1245
- "https://api.minimaxi.com/anthropic"
1246
- ),
1284
+ buildPresetModel("MiniMax-M3", "MiniMax-M3", "https://api.minimaxi.com/anthropic"),
1285
+ buildPresetModel("MiniMax-M2.7", "MiniMax-M2.7", "https://api.minimaxi.com/anthropic"),
1247
1286
  buildPresetModel(
1248
1287
  "MiniMax-M2.7-highspeed",
1249
1288
  "MiniMax-M2.7-highspeed",
@@ -1253,11 +1292,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1253
1292
  // predecessor of M2.7. Still in the catalog and often
1254
1293
  // available on MiniMax's promotional $0.30/$1.20 rate, so
1255
1294
  // keep it as a preset for users on the M2.5 plan tier.
1256
- buildPresetModel(
1257
- "MiniMax-M2.5",
1258
- "MiniMax-M2.5",
1259
- "https://api.minimaxi.com/anthropic"
1260
- )
1295
+ buildPresetModel("MiniMax-M2.5", "MiniMax-M2.5", "https://api.minimaxi.com/anthropic")
1261
1296
  ]
1262
1297
  },
1263
1298
  deepseek: {
@@ -1279,16 +1314,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1279
1314
  // the recommended default — users still on V3 can override
1280
1315
  // these defaults in the ProvidersTab form.
1281
1316
  models: [
1282
- buildPresetModel(
1283
- "deepseek-v4-flash",
1284
- "DeepSeek V4 Flash",
1285
- "https://api.deepseek.com/v1"
1286
- ),
1287
- buildPresetModel(
1288
- "deepseek-v4-pro",
1289
- "DeepSeek V4 Pro",
1290
- "https://api.deepseek.com/v1"
1291
- )
1317
+ buildPresetModel("deepseek-v4-flash", "DeepSeek V4 Flash", "https://api.deepseek.com/v1"),
1318
+ buildPresetModel("deepseek-v4-pro", "DeepSeek V4 Pro", "https://api.deepseek.com/v1")
1292
1319
  ]
1293
1320
  },
1294
1321
  agnes: {
@@ -1302,26 +1329,14 @@ var BUILTIN_PROVIDER_PRESETS = {
1302
1329
  // benchmark-listed alpha — followed by the flash tier
1303
1330
  // newest-first.
1304
1331
  models: [
1305
- buildPresetModel(
1306
- "agnes-2.5-pro",
1307
- "Agnes 2.5 Pro",
1308
- "https://apihub.agnes-ai.com/v1"
1309
- ),
1332
+ buildPresetModel("agnes-2.5-pro", "Agnes 2.5 Pro", "https://apihub.agnes-ai.com/v1"),
1310
1333
  buildPresetModel(
1311
1334
  "agnes-2.5-pro-alpha",
1312
1335
  "Agnes 2.5 Pro Alpha",
1313
1336
  "https://apihub.agnes-ai.com/v1"
1314
1337
  ),
1315
- buildPresetModel(
1316
- "agnes-2.5-flash",
1317
- "Agnes 2.5 Flash",
1318
- "https://apihub.agnes-ai.com/v1"
1319
- ),
1320
- buildPresetModel(
1321
- "agnes-2.0-flash",
1322
- "Agnes 2.0 Flash",
1323
- "https://apihub.agnes-ai.com/v1"
1324
- )
1338
+ buildPresetModel("agnes-2.5-flash", "Agnes 2.5 Flash", "https://apihub.agnes-ai.com/v1"),
1339
+ buildPresetModel("agnes-2.0-flash", "Agnes 2.0 Flash", "https://apihub.agnes-ai.com/v1")
1325
1340
  ]
1326
1341
  },
1327
1342
  kimi: {
@@ -1329,11 +1344,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1329
1344
  baseUrl: "https://api.moonshot.cn/v1",
1330
1345
  models: [
1331
1346
  buildPresetModel("kimi-k3", "Kimi K3", "https://api.moonshot.cn/v1"),
1332
- buildPresetModel(
1333
- "kimi-k2.7-code",
1334
- "Kimi K2.7 Code",
1335
- "https://api.moonshot.cn/v1"
1336
- ),
1347
+ buildPresetModel("kimi-k2.7-code", "Kimi K2.7 Code", "https://api.moonshot.cn/v1"),
1337
1348
  buildPresetModel(
1338
1349
  "kimi-k2.7-code-highspeed",
1339
1350
  "Kimi K2.7 Code HighSpeed",
@@ -1411,67 +1422,28 @@ var BUILTIN_PROVIDER_PRESETS = {
1411
1422
  // `MODEL_METADATA` entries are kept so the id is still
1412
1423
  // resolvable for the curated detail / pricing columns.
1413
1424
  models: [
1414
- buildPresetModel(
1415
- "glm-5.3",
1416
- "GLM-5.3",
1417
- "https://open.bigmodel.cn/api/paas/v4"
1418
- ),
1419
- buildPresetModel(
1420
- "glm-5.2",
1421
- "GLM-5.2",
1422
- "https://open.bigmodel.cn/api/paas/v4"
1423
- ),
1424
- buildPresetModel(
1425
- "glm-5.1",
1426
- "GLM-5.1",
1427
- "https://open.bigmodel.cn/api/paas/v4"
1428
- ),
1429
- buildPresetModel(
1430
- "glm-5",
1431
- "GLM-5",
1432
- "https://open.bigmodel.cn/api/paas/v4"
1433
- ),
1434
- buildPresetModel(
1435
- "glm-5-turbo",
1436
- "GLM-5 Turbo",
1437
- "https://open.bigmodel.cn/api/paas/v4"
1438
- ),
1439
- buildPresetModel(
1440
- "glm-4.7",
1441
- "GLM-4.7",
1442
- "https://open.bigmodel.cn/api/paas/v4"
1443
- ),
1444
- buildPresetModel(
1445
- "glm-4.6",
1446
- "GLM-4.6",
1447
- "https://open.bigmodel.cn/api/paas/v4"
1448
- ),
1449
- buildPresetModel(
1450
- "glm-4.5-air",
1451
- "GLM-4.5 Air",
1452
- "https://open.bigmodel.cn/api/paas/v4"
1453
- ),
1454
- buildPresetModel(
1455
- "glm-4.5",
1456
- "GLM-4.5",
1457
- "https://open.bigmodel.cn/api/paas/v4"
1458
- )
1425
+ buildPresetModel("glm-5.3", "GLM-5.3", "https://open.bigmodel.cn/api/paas/v4"),
1426
+ // GLM-5.3-Flash (2026-08-26) — GLM-5 系列首个原生多模态
1427
+ // 模型,性价比高(¥0.4/¥1.4 per 1M tokens),接入 GLM Coding Plan
1428
+ // 后额度较 GLM-5.3 翻 3 倍。放在 5.3 后面,符合
1429
+ // 旗舰/快速版成对的展示惯例。
1430
+ buildPresetModel("glm-5.3-flash", "GLM-5.3 Flash", "https://open.bigmodel.cn/api/paas/v4"),
1431
+ buildPresetModel("glm-5.2", "GLM-5.2", "https://open.bigmodel.cn/api/paas/v4"),
1432
+ buildPresetModel("glm-5.1", "GLM-5.1", "https://open.bigmodel.cn/api/paas/v4"),
1433
+ buildPresetModel("glm-5", "GLM-5", "https://open.bigmodel.cn/api/paas/v4"),
1434
+ buildPresetModel("glm-5-turbo", "GLM-5 Turbo", "https://open.bigmodel.cn/api/paas/v4"),
1435
+ buildPresetModel("glm-4.7", "GLM-4.7", "https://open.bigmodel.cn/api/paas/v4"),
1436
+ buildPresetModel("glm-4.6", "GLM-4.6", "https://open.bigmodel.cn/api/paas/v4"),
1437
+ buildPresetModel("glm-4.5-air", "GLM-4.5 Air", "https://open.bigmodel.cn/api/paas/v4"),
1438
+ buildPresetModel("glm-4.5", "GLM-4.5", "https://open.bigmodel.cn/api/paas/v4")
1459
1439
  ]
1460
1440
  },
1461
1441
  stepfun: {
1462
1442
  displayName: "StepFun",
1463
1443
  baseUrl: "https://api.stepfun.com/v1",
1464
1444
  models: [
1465
- buildPresetModel(
1466
- "step-3.7-flash",
1467
- "Step 3.7 Flash",
1468
- "https://api.stepfun.com/v1"
1469
- ),
1470
- buildPresetModel(
1471
- "step-3.5-flash",
1472
- "Step 3.5 Flash",
1473
- "https://api.stepfun.com/v1"
1474
- ),
1445
+ buildPresetModel("step-3.7-flash", "Step 3.7 Flash", "https://api.stepfun.com/v1"),
1446
+ buildPresetModel("step-3.5-flash", "Step 3.5 Flash", "https://api.stepfun.com/v1"),
1475
1447
  buildPresetModel(
1476
1448
  "step-1o-turbo-vision",
1477
1449
  "Step 1o Turbo Vision",
@@ -1524,11 +1496,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1524
1496
  displayName: "OpenRouter",
1525
1497
  baseUrl: "https://openrouter.ai/api/v1",
1526
1498
  models: [
1527
- buildPresetModel(
1528
- "openrouter/auto",
1529
- "OpenRouter Auto",
1530
- "https://openrouter.ai/api/v1"
1531
- )
1499
+ buildPresetModel("openrouter/auto", "OpenRouter Auto", "https://openrouter.ai/api/v1")
1532
1500
  ]
1533
1501
  },
1534
1502
  novita: {
@@ -1552,16 +1520,8 @@ var BUILTIN_PROVIDER_PRESETS = {
1552
1520
  "https://api.novita.ai/openai/v1"
1553
1521
  ),
1554
1522
  // GLM-5 系列 (2026-04/06)
1555
- buildPresetModel(
1556
- "zai/glm-5.2",
1557
- "GLM-5.2 (via Novita)",
1558
- "https://api.novita.ai/openai/v1"
1559
- ),
1560
- buildPresetModel(
1561
- "zai/glm-5.1",
1562
- "GLM-5.1 (via Novita)",
1563
- "https://api.novita.ai/openai/v1"
1564
- ),
1523
+ buildPresetModel("zai/glm-5.2", "GLM-5.2 (via Novita)", "https://api.novita.ai/openai/v1"),
1524
+ buildPresetModel("zai/glm-5.1", "GLM-5.1 (via Novita)", "https://api.novita.ai/openai/v1"),
1565
1525
  // Kimi K3 (2026-07-16 API, 2026-07-27 开源) — 1M context, 2.8T MoE
1566
1526
  buildPresetModel(
1567
1527
  "moonshotai/kimi-k3",
@@ -1634,11 +1594,7 @@ var BUILTIN_PROVIDER_PRESETS = {
1634
1594
  {
1635
1595
  // Live /v1/models: context_length 1048576,
1636
1596
  // max_output_length 131072, input_modalities ["text"] only.
1637
- ...buildPresetModel(
1638
- "glm-5.2",
1639
- "GLM-5.2 (via SenseNova)",
1640
- "https://token.sensenova.cn/v1"
1641
- ),
1597
+ ...buildPresetModel("glm-5.2", "GLM-5.2 (via SenseNova)", "https://token.sensenova.cn/v1"),
1642
1598
  maxInputTokens: 1048576,
1643
1599
  maxOutputTokens: 131072,
1644
1600
  capabilities: { supportsImageToText: false, supportsToolCalling: true }
@@ -1732,6 +1688,11 @@ var CERTIFICATE_BUNDLE_FORMATS = [
1732
1688
  }
1733
1689
  ];
1734
1690
 
1691
+ // src/copilot-customizations.ts
1692
+ function isWholePackageInstall(definition) {
1693
+ return definition.wholePackage === true || definition.artifacts?.some((artifact) => artifact.id.includes("::package:")) === true;
1694
+ }
1695
+
1735
1696
  // ../../node_modules/.pnpm/js-sha256@1.0.0/node_modules/js-sha256/src/node.mjs
1736
1697
  import { createHash, createHmac } from "crypto";
1737
1698
 
@@ -2258,6 +2219,7 @@ var WebviewMessageType = /* @__PURE__ */ ((WebviewMessageType2) => {
2258
2219
  WebviewMessageType2["InstallSkillRepoEntry"] = "installSkillRepoEntry";
2259
2220
  WebviewMessageType2["ConvertSkillRepoEntryToSymlink"] = "convertSkillRepoEntryToSymlink";
2260
2221
  WebviewMessageType2["UninstallSkillRepoEntry"] = "uninstallSkillRepoEntry";
2222
+ WebviewMessageType2["SetSkillRepoEntryEnabled"] = "setSkillRepoEntryEnabled";
2261
2223
  WebviewMessageType2["ListLinkedSkills"] = "listLinkedSkills";
2262
2224
  WebviewMessageType2["UpdateSkillRepoCatalog"] = "updateSkillRepoCatalog";
2263
2225
  WebviewMessageType2["UpdateSkillRepoInstall"] = "updateSkillRepoInstall";
@@ -2275,12 +2237,36 @@ var WebviewMessageType = /* @__PURE__ */ ((WebviewMessageType2) => {
2275
2237
  WebviewMessageType2["DisableRepository"] = "disableRepository";
2276
2238
  WebviewMessageType2["SyncRepository"] = "syncRepository";
2277
2239
  WebviewMessageType2["SyncAllRepositories"] = "syncAllRepositories";
2240
+ WebviewMessageType2["ResetParseCache"] = "resetParseCache";
2241
+ WebviewMessageType2["ListCopilotPlugins"] = "listCopilotPlugins";
2242
+ WebviewMessageType2["RegisterCopilotPlugin"] = "registerCopilotPlugin";
2243
+ WebviewMessageType2["UnregisterCopilotPlugin"] = "unregisterCopilotPlugin";
2244
+ WebviewMessageType2["SetCopilotPluginEnabled"] = "setCopilotPluginEnabled";
2245
+ WebviewMessageType2["GetCopilotContentStatus"] = "getCopilotContentStatus";
2246
+ WebviewMessageType2["RestoreCopilotContent"] = "restoreCopilotContent";
2247
+ WebviewMessageType2["ApproveCopilotContent"] = "approveCopilotContent";
2278
2248
  WebviewMessageType2["UpdateRepositoryList"] = "updateRepositoryList";
2279
2249
  WebviewMessageType2["UpdateRepositoryAdd"] = "updateRepositoryAdd";
2280
2250
  WebviewMessageType2["UpdateRepositoryUpdate"] = "updateRepositoryUpdate";
2281
2251
  WebviewMessageType2["UpdateRepositoryRemove"] = "updateRepositoryRemove";
2282
2252
  WebviewMessageType2["UpdateRepositoryToggle"] = "updateRepositoryToggle";
2283
2253
  WebviewMessageType2["UpdateRepositorySyncResult"] = "updateRepositorySyncResult";
2254
+ WebviewMessageType2["UpdateCopilotContentStatus"] = "updateCopilotContentStatus";
2255
+ WebviewMessageType2["GetCopilotCustomizations"] = "getCopilotCustomizations";
2256
+ WebviewMessageType2["SyncCopilotCustomizations"] = "syncCopilotCustomizations";
2257
+ WebviewMessageType2["UpdateCopilotCustomizations"] = "updateCopilotCustomizations";
2258
+ WebviewMessageType2["InstallCopilotPackage"] = "installCopilotPackage";
2259
+ WebviewMessageType2["MoveCopilotPackage"] = "moveCopilotPackage";
2260
+ WebviewMessageType2["UninstallCopilotPackage"] = "uninstallCopilotPackage";
2261
+ WebviewMessageType2["ListCopilotSources"] = "listCopilotSources";
2262
+ WebviewMessageType2["RemoveCopilotSource"] = "removeCopilotSource";
2263
+ WebviewMessageType2["PreviewCopilotUpdate"] = "previewCopilotUpdate";
2264
+ WebviewMessageType2["UpdateCopilotPackage"] = "updateCopilotPackage";
2265
+ WebviewMessageType2["PreviewCopilotLegacy"] = "previewCopilotLegacy";
2266
+ WebviewMessageType2["MigrateCopilotLegacy"] = "migrateCopilotLegacy";
2267
+ WebviewMessageType2["UpdateCopilotSources"] = "updateCopilotSources";
2268
+ WebviewMessageType2["UpdateCopilotUpdatePreview"] = "updateCopilotUpdatePreview";
2269
+ WebviewMessageType2["UpdateCopilotLegacyPreview"] = "updateCopilotLegacyPreview";
2284
2270
  WebviewMessageType2["GetUtilityModels"] = "getUtilityModels";
2285
2271
  WebviewMessageType2["UtilityModelsResponse"] = "utilityModelsResponse";
2286
2272
  WebviewMessageType2["UpdateUtilityModels"] = "updateUtilityModels";
@@ -2370,6 +2356,7 @@ export {
2370
2356
  isGitHubLocalEmail,
2371
2357
  isProviderCacheControlAware,
2372
2358
  isValidCanonicalSlug,
2359
+ isWholePackageInstall,
2373
2360
  listPresetModelGroups,
2374
2361
  lookupModelMetadata,
2375
2362
  normalizeCanonicalSlug,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceme/devtools-shared",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
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": {