{"version":3,"file":"client.cjs","names":["documentVersion","z","z","useState","Menu","IconChevronDownOutlineRegular","Button","documentVersion","useMemo","useRef","useState","objectOf","isObject","createSnapshotStore","createSnapshotStore","createSnapshotStore","createSnapshotStore","documentVersion","inspectDocumentVersion","sparseSettingOperations","resetSettingsOperations","useId","useState","Tag","Input","Button","Input","useState","credentialRefs","connectionChoices","connectionName","useId","useState","Input","textOf","Switch","useId","useState","StateDot","Tag","Button","IconChevronDownOutlineRegular","Switch","SegmentedControl","IconRightUpOutlineRegular","useState","StateDot","Button","StateDot","useId","Switch","useState","Button","useId","useState","Input","Checkbox","Button","useState","Button","IconPlusOutlineRegular","StateDot","Tag","Switch","ipaddr","z","catalogCredentialRefs","catalogChoices","catalogConnectionName","css","css","css","css","Switch","css","css","useId","css","useState","Button","useId","useState","css","Input","Button","css","css","StateDot","createSnapshotStore"],"sources":["../../core/src/shared/ids.ts","../../core/src/shared/url.ts","../../core/src/shared/connections.ts","../../core/src/shared/route.ts","../../core/src/shared/settings.ts","../../../node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.2.1-rc.2_@deepseek-ai+cordis@4.0.5/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/remote-info.js","../../core/src/shared/selection.ts","../src/contract.ts","../../core/src/client/settings/parts.tsx","../../core/src/client/settings/document.ts","../../core/src/client/remote-services.ts","../../core/src/client/command.ts","../../core/src/client/selection.ts","../../core/src/client/route.ts","../../core/src/client/pairings.ts","../../core/src/client/credentials.ts","../../core/src/client/settings/sparse.ts","../../core/src/client/settings/CredentialEditor.tsx","../../core/src/client/settings/fields.ts","../../core/src/client/settings/OptionsEditor.tsx","../../core/src/client/settings/model.ts","../../core/src/client/settings/ServiceFields.tsx","../../core/src/client/settings/ServicesSection.tsx","../../core/src/client/settings/PairingsSection.tsx","../../core/src/client/settings/DefaultsSection.tsx","../../core/src/client/settings/EnhancedToolsSection.tsx","../../core/src/client/settings/ResetSection.tsx","../../core/src/client/settings/RouteNotice.tsx","../../core/src/client/settings/connection-form.ts","../../core/src/client/settings/ConnectionEditor.tsx","../../core/src/client/settings/CustomConnections.tsx","../src/catalog.ts","../src/client/connections.ts","../src/client/command.ts","../src/settings/retired.ts","../../../node_modules/.pnpm/ipaddr.js@2.5.0/node_modules/ipaddr.js/lib/ipaddr.js","../src/local/rules.ts","../src/settings/resolve.ts","../src/client/settings/model.ts","../src/client/locales.ts","../src/client/route.ts","../src/client/section.ts","../src/client/selection.ts","../src/client/settings/CredentialEditor.tsx","../src/client/settings/parts.tsx","../src/client/settings/OptionsEditor.tsx","../src/client/settings/sparse.ts","../src/client/settings/CustomConnections.tsx","../src/client/settings/DefaultsSection.tsx","../src/client/settings/EnhancedToolsSection.tsx","../src/client/settings/PairingsSection.tsx","../src/client/allowlist-lines.ts","../src/client/settings/AllowlistEditor.tsx","../src/client/settings/LocalExtras.tsx","../src/client/settings/ServicesSection.tsx","../src/client/settings/SettingsPage.tsx","../src/client/index.tsx"],"sourcesContent":["/**\n * Identities that bind the profile bundle, its rows, and both faces together.\n * The profile's patch writes these ids, the plugins register them, and the\n * browser faces key their slots by them; tests assert all three agree.\n * Nothing here imports Node, the browser, or a Host package.\n */\n\n/** npm name of the profile bundle users install; the Plugins page keys bundle and row pages by it. */\nexport const PROFILE_PACKAGE = 'dsh-tool-web-enhanced-profile'\n\n/** A package the profile mounts as one row. */\nexport interface RowIdentity {\n  /** npm package name; the profile bundle depends on it and names it in its row. */\n  readonly packageName: string\n  /** Row id the profile patch inserts; also the Settings namespace and the Cordis plugin name. */\n  readonly rowId: string\n}\n\n/**\n * The two model-facing tools a capability registers while the operator has\n * them turned on and the `web` row routes the capability to this plugin.\n * Model-facing text calls a connection a \"provider\".\n */\nexport interface EnhancedToolNames {\n  /** Runs one request on a provider the Agent names. */\n  readonly action: string\n  /** Lists the providers the Agent may name in this conversation. */\n  readonly list: string\n}\n\n/** A row that serves one web capability. */\nexport interface PluginIdentity extends RowIdentity {\n  /** Provider id registered in `ctx.web`; the profile writes it into the `web` row. */\n  readonly providerId: string\n  readonly tools: EnhancedToolNames\n  /** Host command, without the slash, that shows or changes the Session's connection. */\n  readonly command: string\n}\n\nexport const SEARCH: PluginIdentity = {\n  packageName: 'dsh-web-search-enhanced',\n  rowId: 'web-search-enhanced',\n  providerId: 'search-enhanced',\n  tools: { action: 'web_search_enhanced', list: 'list_web_search_providers' },\n  command: 'setup-search',\n}\n\nexport const FETCH: PluginIdentity = {\n  packageName: 'dsh-web-fetch-enhanced',\n  rowId: 'web-fetch-enhanced',\n  providerId: 'fetch-enhanced',\n  tools: { action: 'web_fetch_enhanced', list: 'list_web_fetch_providers' },\n  command: 'setup-fetch',\n}\n\n/** The browser-only row holding the shared composer connection menu. */\nexport const UI: RowIdentity = {\n  packageName: 'dsh-tool-web-enhanced-ui',\n  rowId: 'tool-web-enhanced-ui',\n}\n\n/**\n * Key of a row's configuration page on the Plugins page (`plugins.row.config`).\n * @param row - the row the page configures.\n * @returns `<profile package>#<row id>`.\n */\nexport function rowConfigKey(row: RowIdentity): string {\n  return `${PROFILE_PACKAGE}#${row.rowId}`\n}\n","/** URL shape checks both faces apply to endpoints and to search sources. */\n\n/** Absolute http(s) URL without credentials, query or fragment: what an API endpoint may look like. */\nexport function isEndpoint(value: string): boolean {\n  if (!URL.canParse(value)) return false\n  const url = new URL(value)\n  return (url.protocol === 'https:' || url.protocol === 'http:') && url.username === '' && url.password === '' && url.search === '' && url.hash === ''\n}\n\n/** Longest URL a search source may carry. */\nexport const MAX_SOURCE_URL_LENGTH = 8192\n\n/**\n * A public http(s) URL without user information, as a search source may cite.\n * @returns the raw string and its normalized href, or undefined when the value is not acceptable.\n */\nexport function sourceUrl(value: unknown): { readonly raw: string; readonly href: string } | undefined {\n  if (typeof value !== 'string') return undefined\n  const raw = value.trim()\n  if (raw === '' || raw.length > MAX_SOURCE_URL_LENGTH || !URL.canParse(raw)) return undefined\n  const url = new URL(raw)\n  if ((url.protocol !== 'http:' && url.protocol !== 'https:') || url.username !== '' || url.password !== '') return undefined\n  return { raw, href: url.href }\n}\n","/**\n * The connection grammar both capabilities share: how connections are named,\n * how a catalog entry describes itself, and how operator-supplied options are\n * checked against that description. Pure and isomorphic.\n */\n\nimport { isEndpoint } from './url.ts'\n\n/** Upper bound on any text option; a pattern runs only on text within it. */\nexport const TEXT_MAX_LENGTH = 2000\n\n/** A connection the operator can select: a catalog entry or an operator-defined one. */\nexport type ConnectionId = `builtin:${string}` | `custom:${string}`\n\nexport const BUILTIN_PREFIX = 'builtin:'\nexport const CUSTOM_PREFIX = 'custom:'\n\n/** Operator-defined connection ids: `custom:` plus a short, readable name. */\nexport const CUSTOM_CONNECTION_ID = /^custom:[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/u\n\n/** Catalog connection ids: `builtin:` plus a lower-case, hyphenated catalog key. */\nexport const BUILTIN_CONNECTION_ID = /^builtin:[a-z0-9]{1,50}(?:-[a-z0-9]{1,50}){0,5}$/u\n\n/** Whether a string, such as an untrusted tool argument, has the grammar of a connection id; it may still name nothing. */\nexport const isConnectionId = (value: string): value is ConnectionId => BUILTIN_CONNECTION_ID.test(value) || CUSTOM_CONNECTION_ID.test(value)\n\n/** A DSH Credentials reference, the only form a key is ever stored in. */\nexport const CREDENTIAL_REF = /^[A-Za-z_][A-Za-z0-9_]*$/u\n\n/** Persisted access modes; `account` is derived per call from the Session's model route. */\nexport type AccessMode = 'keyless' | 'api-key'\n\n/** How a call actually authenticates. */\nexport type Access = AccessMode | 'account'\n\n/** The four backend kinds (docs/architecture.md, \"后端种类与执行层\"). */\nexport type BackendKind = 'native' | 'adapter' | 'model' | 'local'\n\n/**\n * One accepted operator option of a connection. `keyless` narrows the option\n * on the anonymous route: omitted accepts it unchanged, `false` rejects it, a\n * list narrows the accepted enum values.\n */\nexport type OptionRule =\n  | { readonly kind: 'enum'; readonly values: readonly string[]; readonly keyless?: readonly string[] | false }\n  /** Text matching `pattern`; never longer than `maxLength` (default {@link TEXT_MAX_LENGTH}), checked before the pattern runs. */\n  | { readonly kind: 'text'; readonly pattern: RegExp; readonly maxLength?: number; readonly keyless?: false }\n  /** An absolute http(s) URL without credentials, query or fragment (see `isEndpoint`). */\n  | { readonly kind: 'url'; readonly keyless?: false }\n  | { readonly kind: 'boolean'; readonly keyless?: false }\n  | { readonly kind: 'integer'; readonly min: number; readonly max: number; readonly keyless?: false }\n  /** A list of strings, each matching `pattern`; capabilities add semantic checks (CIDR syntax) on top. */\n  | { readonly kind: 'list'; readonly pattern: RegExp; readonly max: number }\n\n/** How a catalog entry can be reached. */\nexport interface AccessFacts {\n  /** An anonymous route exists; built-in connections then default to it. */\n  readonly keyless: boolean\n  /** Personal-key access and the DSH Credentials reference it resolves by default. */\n  readonly apiKey: { readonly credentialRef: string } | false\n  /** A DeepSeek account sign-in can authenticate Sessions on the account route. */\n  readonly account: boolean\n}\n\n/**\n * Secret-free catalog facts about one built-in connection. Validation, the\n * settings page, and status views all read it; a capability extends it with\n * its own facts (endpoint, freshness support, …).\n */\nexport interface Descriptor {\n  readonly label: string\n  readonly homepage?: string\n  readonly kind: BackendKind\n  /** Whether the query or URL leaves this machine for a third-party service; only drives explanatory text. */\n  readonly remote: boolean\n  /** A remote service the operator must turn on: the built-in connection starts disabled (docs/design.md, \"连接与目录\"). */\n  readonly optIn: boolean\n  /** Short English phrase on what the connection is for, shown to the Agent only where it changes the choice. */\n  readonly use?: string\n  readonly access: AccessFacts\n  readonly options: Readonly<Record<string, OptionRule>>\n  /** Pairs of options at most one of which may be set. */\n  readonly exclusive?: readonly ExclusiveOptions[]\n}\n\n/** Two option names an operator may not set together. */\nexport type ExclusiveOptions = readonly [string, string]\n\n/**\n * A model wire protocol a custom `model` connection may name, with the\n * operator options it accepts; the counterpart of an adapter catalog entry\n * for custom adapter connections.\n */\nexport interface ProtocolDescriptor {\n  readonly label: string\n  /** Same meaning as {@link Descriptor.use}, for custom connections of this protocol. */\n  readonly use?: string\n  readonly options: Readonly<Record<string, OptionRule>>\n  /** Pairs of options at most one of which may be set. */\n  readonly exclusive?: readonly ExclusiveOptions[]\n}\n\nexport const builtinId = (key: string): ConnectionId => `${BUILTIN_PREFIX}${key}`\n\nexport const isBuiltinId = (id: string): boolean => id.startsWith(BUILTIN_PREFIX)\nexport const isCustomId = (id: string): boolean => CUSTOM_CONNECTION_ID.test(id)\n\n/** The catalog key of a built-in connection id, or undefined for any other id. */\nexport function builtinKey(id: string): string | undefined {\n  return id.startsWith(BUILTIN_PREFIX) ? id.slice(BUILTIN_PREFIX.length) : undefined\n}\n\n/** The default access of a catalog entry: anonymous when it exists, else a personal key. */\nexport function defaultAccess(access: AccessFacts): AccessMode {\n  return access.keyless ? 'keyless' : 'api-key'\n}\n\n/**\n * Check operator options against a descriptor's rules.\n * @param label - connection label used in the problems.\n * @param rules - the descriptor's option rules.\n * @param options - the operator's options.\n * @param access - persisted access mode; keyless may reject or narrow an option.\n * @param exclusive - the descriptor's option pairs that may not both be set.\n * @returns one English problem per invalid option or exclusive pair; empty when all are valid.\n */\nexport function validateOptions(label: string, rules: Readonly<Record<string, OptionRule>>, options: Readonly<Record<string, unknown>>, access: AccessMode, exclusive: readonly ExclusiveOptions[] = []): string[] {\n  const invalid = Object.entries(options).flatMap(([key, value]) => {\n    const rule = Object.hasOwn(rules, key) ? rules[key] : undefined\n    if (rule === undefined) return [`${label} has no option \"${key}\"`]\n    if (!accepts(rule, value)) return [`${label} option \"${key}\" has an invalid value`]\n    if (access === 'keyless' && !keylessAccepts(rule, value)) return [`${label} option \"${key}\" = ${JSON.stringify(value)} needs API-key access`]\n    return []\n  })\n  const combined = exclusive\n    .filter(([first, second]) => Object.hasOwn(options, first) && Object.hasOwn(options, second))\n    .map(([first, second]) => `${label} options \"${first}\" and \"${second}\" cannot both be set`)\n  return [...invalid, ...combined]\n}\n\nfunction accepts(rule: OptionRule, value: unknown): boolean {\n  switch (rule.kind) {\n    case 'enum': return typeof value === 'string' && rule.values.includes(value)\n    case 'text': return typeof value === 'string' && value.length <= (rule.maxLength ?? TEXT_MAX_LENGTH) && rule.pattern.test(value)\n    case 'url': return typeof value === 'string' && value.length <= TEXT_MAX_LENGTH && isEndpoint(value)\n    case 'boolean': return typeof value === 'boolean'\n    case 'integer': return Number.isInteger(value) && (value as number) >= rule.min && (value as number) <= rule.max\n    case 'list': return Array.isArray(value) && value.length <= rule.max && value.every(item => typeof item === 'string' && rule.pattern.test(item))\n  }\n}\n\nfunction keylessAccepts(rule: OptionRule, value: unknown): boolean {\n  if (!('keyless' in rule) || rule.keyless === undefined) return true\n  if (rule.keyless === false) return false\n  return rule.keyless.includes(value as string)\n}\n","/**\n * Whether the shared `web` row routes a capability to this plugin, judged the\n * way `WebRuntime` selects: the row's field, else the process environment\n * variable, else auto-selection. The Host reads the row through the public\n * Settings data; the browser reads it through `configForms.get('web')`. When\n * the row cannot be read, the answer is `unknown` and callers treat it as\n * \"not routed\".\n */\n\nexport type Route =\n  /** The `web` row is not readable, or the Host has not answered yet. */\n  | { readonly kind: 'unknown' }\n  | { readonly kind: 'this' }\n  /** Nothing pins a provider: `WebRuntime` auto-selects and fails while several are usable. */\n  | { readonly kind: 'auto'; readonly providerId: string }\n  /** Another provider serves the capability, so this plugin's settings have no effect. */\n  | { readonly kind: 'other'; readonly provider: string; readonly providerId: string }\n\n/** The two `web` row fields and the environment variables `WebRuntime` reads instead. */\nexport const WEB_ROW = 'web'\nexport const WEB_FIELD = { search: 'searchProvider', fetch: 'fetchProvider' } as const\nexport const WEB_ENV = { search: 'DSH_WEB_SEARCH_PROVIDER', fetch: 'DSH_WEB_FETCH_PROVIDER' } as const\n\n/**\n * @param row - the `web` row's effective value, or undefined when it cannot be read.\n * @param field - which capability's field to judge.\n * @param envProvider - the process variable of that capability, or null when unset.\n * @param providerId - the id this plugin registered.\n */\nexport function routeOf(row: Readonly<Record<string, unknown>> | undefined, field: string, envProvider: string | null, providerId: string): Route {\n  if (row === undefined) return { kind: 'unknown' }\n  const configured = row[field]\n  // Like `WebRuntime` (`config.searchProvider.get() ?? env`): only an absent field falls back to the variable.\n  const pinned = typeof configured === 'string' ? configured : envProvider\n  if (pinned === null) return { kind: 'auto', providerId }\n  return pinned === providerId ? { kind: 'this' } : { kind: 'other', provider: pinned, providerId }\n}\n\n/** Whether the capability reaches this plugin; `unknown` and `auto` count as not routed. */\nexport const isRouted = (route: Route): boolean => route.kind === 'this'\n","import { z } from 'zod'\nimport { builtinId, builtinKey, CREDENTIAL_REF, CUSTOM_CONNECTION_ID, defaultAccess, TEXT_MAX_LENGTH, validateOptions, type AccessMode, type Descriptor, type ProtocolDescriptor } from './connections.ts'\nimport { isEndpoint } from './url.ts'\n\n// Unversioned documents are permanently the first unified grammar, not the latest release.\nexport const UNVERSIONED_SETTINGS_VERSION = 2 as const\nexport const CURRENT_SETTINGS_VERSION = 2 as const\nexport const SETTINGS_RESET_HINT = 'this release does not read 0.1.x settings; remove the field or use Reset on the settings page'\nexport const SETTINGS_FIELDS = ['version', 'defaultConnection', 'showSelector', 'enhancedTools', 'defaults', 'connections'] as const\n\nexport type DocumentVersion =\n  | { readonly kind: 'current' }\n  | { readonly kind: 'older'; readonly version: number }\n  | { readonly kind: 'newer'; readonly version: number }\n  | { readonly kind: 'invalid'; readonly reason: string }\n\nexport function documentVersion(document: unknown, currentVersion: number = CURRENT_SETTINGS_VERSION): DocumentVersion {\n  if (document === null || typeof document !== 'object' || Array.isArray(document)) return { kind: 'invalid', reason: 'settings must be an object' }\n  const storedVersion = (document as Record<string, unknown>).version\n  const version = storedVersion === undefined ? UNVERSIONED_SETTINGS_VERSION : storedVersion\n  if (version === currentVersion) return { kind: 'current' }\n  if (typeof version !== 'number' || !Number.isSafeInteger(version) || version < 1) return { kind: 'invalid', reason: 'settings.version must be a positive integer' }\n  return { kind: version < currentVersion ? 'older' : 'newer', version }\n}\n\nexport type SettingsMigration = (document: Readonly<Record<string, unknown>>) => Record<string, unknown>\nexport interface SettingsMigrations {\n  readonly currentVersion: number\n  readonly steps: ReadonlyMap<number, SettingsMigration>\n}\n// Add only this grammar's future N → N+1 steps; predecessor formats have no steps.\nexport const SETTINGS_MIGRATIONS: SettingsMigrations = { currentVersion: CURRENT_SETTINGS_VERSION, steps: new Map() }\n\n/** Pure upgrade pipeline. Never guesses a predecessor's schema or rewrites its fields. */\nexport function migrateDocument(document: unknown, migrations: SettingsMigrations = SETTINGS_MIGRATIONS): Record<string, unknown> {\n  validateDocumentBounds(document)\n  const state = documentVersion(document, migrations.currentVersion)\n  if (state.kind === 'invalid') throw new Error(state.reason)\n  if (state.kind === 'newer') throw new Error('settings.version is newer than supported; upgrade the plugin')\n  let result = structuredClone(document) as Record<string, unknown>\n  if (state.kind === 'older') {\n    for (let version = state.version; version < migrations.currentVersion; version += 1) {\n      const migrate = migrations.steps.get(version)\n      if (migrate === undefined) throw new Error('settings.version: no migration from version ' + version + '; ' + SETTINGS_RESET_HINT)\n      result = { ...migrate(result), version: version + 1 }\n      validateDocumentBounds(result)\n    }\n  }\n  return result\n}\n\n/**\n * Operator text shown as one line (a label in menus, error messages and the\n * Agent's provider list): control characters and line or paragraph separators\n * become spaces, runs of whitespace one space, the ends trimmed.\n */\nexport function singleLine(value: string): string {\n  return value.replaceAll(/[\\p{Cc}\\p{Zl}\\p{Zp}]/gu, ' ').replaceAll(/\\s+/gu, ' ').trim()\n}\n\nconst text = z.string().trim().min(1).max(TEXT_MAX_LENGTH)\nconst label = z.string().transform(singleLine).pipe(z.string().min(1).max(200))\nconst credentialRef = text.regex(CREDENTIAL_REF, 'must be a credential reference such as EXA_API_KEY')\nconst endpoint = text.refine(isEndpoint, 'must be an absolute http(s) URL without credentials, query or fragment')\nconst options = z.record(z.string(), z.unknown())\n\nexport function documentSchema<S extends z.ZodRawShape>(defaults: z.ZodObject<S>, currentVersion: number = CURRENT_SETTINGS_VERSION) {\n  return z.strictObject({\n    version: z.literal(currentVersion).optional(),\n    defaultConnection: z.string().min(1).max(200).optional(),\n    showSelector: z.boolean().optional(),\n    enhancedTools: z.boolean().optional(),\n    defaults: defaults.optional(),\n    connections: z.record(z.string().max(200), z.unknown()).refine(value => Object.keys(value).length <= 200, 'must contain at most 200 connections').optional(),\n  })\n}\n\nexport const builtinOverrideSchema = z.strictObject({\n  label: label.optional(), disabled: z.boolean().optional(),\n  access: z.enum(['keyless', 'api-key']).optional(), credentialRef: credentialRef.optional(),\n  trustedEndpoint: z.boolean().optional(), options: options.optional(),\n})\nexport interface BuiltinOverride {\n  label?: string\n  disabled?: boolean\n  access?: AccessMode\n  credentialRef?: string\n  trustedEndpoint?: boolean\n  options?: Record<string, unknown>\n}\n\n/** A persisted operator-defined connection; its grammar is customConnectionSchema, and a test keeps the two identical. */\nexport interface CustomAdapterConnection<A extends string = string> {\n  readonly kind: 'adapter'\n  readonly adapter: A\n  readonly label: string\n  readonly credentialRef: string\n  readonly endpoint?: string | undefined\n  readonly trustedEndpoint?: boolean | undefined\n  readonly disabled?: boolean | undefined\n  readonly options?: Record<string, unknown> | undefined\n}\n\nexport interface CustomModelConnection<P extends string = string> {\n  readonly kind: 'model'\n  readonly protocol: P\n  readonly model: string\n  readonly label: string\n  readonly credentialRef: string\n  readonly endpoint: string\n  readonly trustedEndpoint: true\n  readonly disabled?: boolean | undefined\n  readonly options?: Record<string, unknown> | undefined\n}\nexport type CustomConnection<A extends string = string, P extends string = string> = CustomAdapterConnection<A> | CustomModelConnection<P>\n\nexport function customConnectionSchema<A extends string, P extends string>(adapterKeys: readonly A[], protocolKeys: readonly P[]) {\n  const adapterSchema = z.strictObject({\n    kind: z.literal('adapter'), adapter: z.enum(adapterKeys), label, credentialRef,\n    endpoint: endpoint.optional(), trustedEndpoint: z.boolean().optional(),\n    disabled: z.boolean().optional(), options: options.optional(),\n  })\n  const modelSchema = z.strictObject({\n    kind: z.literal('model'), protocol: z.enum(protocolKeys),\n    model: z.string().min(1).max(200).regex(/^[^\\p{Cc}]+$/u, 'must not contain control characters').trim().min(1),\n    label, credentialRef, endpoint, trustedEndpoint: z.literal(true),\n    disabled: z.boolean().optional(), options: options.optional(),\n  })\n  if (adapterKeys.length === 0 && protocolKeys.length === 0) return z.never()\n  if (adapterKeys.length === 0) return z.discriminatedUnion('kind', [modelSchema])\n  if (protocolKeys.length === 0) return z.discriminatedUnion('kind', [adapterSchema])\n  return z.discriminatedUnion('kind', [adapterSchema, modelSchema])\n}\n\ninterface CommonConnection {\n  readonly id: string\n  readonly label: string\n  readonly disabled: boolean\n  readonly remote: boolean\n  readonly trustedEndpoint: boolean\n  readonly options: Readonly<Record<string, unknown>>\n  readonly catalogKey: string\n}\nexport type ResolvedModel<P extends string = string> =\n  | { readonly kind: 'session' }\n  | { readonly kind: 'fixed'; readonly protocol: P; readonly model: string; readonly endpoint: string; readonly credentialRef: string }\nexport type ResolvedBase<P extends string = string> = CommonConnection & (\n  | { readonly kind: 'local'; readonly access: 'keyless' }\n  | { readonly kind: 'model'; readonly route: ResolvedModel<P> }\n  | { readonly kind: 'native' | 'adapter'; readonly access: AccessMode; readonly credentialRef: string; readonly endpoint: string }\n)\nexport interface ResolvedDocument<D, C = ResolvedBase> {\n  readonly version: number\n  readonly defaultConnection: string\n  readonly showSelector: boolean\n  /** Whether the operator turned on this capability's two enhanced model tools (docs/design.md, \"增强工具\"). */\n  readonly enhancedTools: boolean\n  readonly defaults: D\n  readonly connections: ReadonlyMap<string, C>\n}\nexport type SettingsDescriptor = Descriptor & { readonly endpoint?: string }\n\n/**\n * Where a resolved connection comes from. A built-in connection without a\n * `disabled` override takes the catalog's `optIn` (remote services start off);\n * an operator-defined one starts enabled (docs/design.md, \"远程服务缺省停用\").\n */\ntype ConnectionOrigin =\n  | { readonly kind: 'builtin' }\n  | { readonly kind: 'custom'; readonly endpoint: string | undefined }\n\n/** Resolve the identical document and connection grammar for Host and browser. */\nexport function resolveDocument<S extends z.ZodRawShape, P extends string = never>({ catalog, document, defaults, capabilityLabel, protocols, retiredFields = [], migrations = SETTINGS_MIGRATIONS }: {\n  readonly catalog: Readonly<Record<string, SettingsDescriptor>>\n  readonly protocols?: Readonly<Record<P, ProtocolDescriptor>>\n  readonly document: unknown\n  readonly defaults: { readonly schema: z.ZodObject<S>; readonly defaultConnection: string }\n  readonly capabilityLabel: string\n  readonly retiredFields?: readonly string[]\n  readonly migrations?: SettingsMigrations\n}): ResolvedDocument<z.output<z.ZodObject<S>>, ResolvedBase<P>> {\n  const fail = (path: string, message: string): never => { throw new Error('invalid ' + capabilityLabel + ' settings: ' + path + ': ' + message) }\n  const parse = <T>(schema: z.ZodType<T>, value: unknown, path: string): T => {\n    const result = schema.safeParse(value)\n    if (result.success) return result.data\n    const issues = result.error.issues.map(issue => {\n      const field = [path, ...issue.path.map(String)].join('.')\n      const retired = issue.code === 'unrecognized_keys' && path === 'settings' && issue.path.length === 0\n        ? issue.keys.filter(key => retiredFields.includes(key)) : []\n      const retirement = retired.map(key => key + ' is a 0.1.x setting this release does not read; remove it or use Reset')\n      return field + ': ' + [...retirement, issue.message].join('; ') + (issue.code === 'unrecognized_keys' ? '; ' + SETTINGS_RESET_HINT : '')\n    })\n    return fail(path, issues.join('; '))\n  }\n  const settings = parse(documentSchema(defaults.schema, migrations.currentVersion), migrateDocument(document, migrations), 'settings')\n  const overrides = settings.connections ?? {}\n  const adapterKeys = Object.keys(catalog).filter(key => catalog[key]!.kind === 'adapter')\n  const protocolKeys = protocols === undefined ? [] : Object.keys(protocols) as P[]\n  const customSchema = customConnectionSchema(adapterKeys, protocolKeys)\n  const connections = new Map<string, ResolvedBase<P>>()\n  const rejectId = (id: string, path: string): never => fail(path, 'unknown connection id \"' + id + '\"; ' + SETTINGS_RESET_HINT)\n  const resolve = (id: string, key: string, override: z.infer<typeof builtinOverrideSchema>, origin: ConnectionOrigin): ResolvedBase<P> => {\n    const info = catalog[key]!\n    const path = 'connections.' + id\n    const access = info.kind === 'model' ? 'api-key' : override.access ?? defaultAccess(info.access)\n    if (access === 'keyless' && !info.access.keyless) fail(path + '.access', 'no keyless access')\n    if (info.kind !== 'model' && access === 'api-key' && !info.access.apiKey) fail(path + '.access', 'no API-key access')\n    if (override.credentialRef !== undefined && !info.access.apiKey) fail(path + '.credentialRef', 'this connection does not accept credentials')\n    const values = override.options ?? {}\n    const problems = validateOptions(info.label, info.options, values, access, info.exclusive)\n    if (problems.length > 0) fail(path + '.options', problems.join('; ') + '; ' + SETTINGS_RESET_HINT)\n    const trustedEndpoint = override.trustedEndpoint ?? false\n    for (const [name, rule] of Object.entries(info.options)) {\n      if (rule.kind === 'url' && values[name] !== undefined && values[name] !== info.endpoint && !trustedEndpoint) {\n        fail(path + '.trustedEndpoint', 'a non-official ' + name + ' needs trustedEndpoint: true')\n      }\n    }\n    const disabled = override.disabled ?? (origin.kind === 'builtin' ? info.optIn : false)\n    const base = { id, catalogKey: key, label: override.label ?? info.label, disabled, remote: info.remote, trustedEndpoint, options: values }\n    if (info.kind === 'model') return { ...base, kind: 'model', route: { kind: 'session' } }\n    if (info.kind === 'local') return { ...base, kind: 'local', access: 'keyless' }\n    if (info.kind !== 'native' && info.kind !== 'adapter') return fail(path + '.kind', 'unsupported catalog kind')\n    if (!info.access.apiKey || info.endpoint === undefined) return fail(path, 'remote catalog entry needs credentials and an endpoint')\n    const url = origin.kind === 'custom' && origin.endpoint !== undefined ? origin.endpoint : info.endpoint\n    if (url !== info.endpoint && !trustedEndpoint) fail(path + '.trustedEndpoint', 'a custom endpoint needs trustedEndpoint: true')\n    return { ...base, kind: info.kind, access, credentialRef: override.credentialRef ?? info.access.apiKey.credentialRef, endpoint: url }\n  }\n  for (const key of Object.keys(catalog)) {\n    const id = builtinId(key)\n    const raw = overrides[id]\n    if (catalog[key]!.kind === 'model' && raw !== null && typeof raw === 'object') {\n      for (const field of ['access', 'credentialRef', 'trustedEndpoint']) {\n        if (Object.hasOwn(raw, field)) fail('connections.' + id + '.' + field, 'this connection takes its route from the Session model')\n      }\n    }\n    const override = raw === undefined ? {} : parse(builtinOverrideSchema, raw, 'connections.' + id)\n    connections.set(id, resolve(id, key, override, { kind: 'builtin' }))\n  }\n  for (const [id, raw] of Object.entries(overrides)) {\n    if (connections.has(id)) continue\n    if ((adapterKeys.length === 0 && protocolKeys.length === 0) || !CUSTOM_CONNECTION_ID.test(id) || builtinKey(id) !== undefined) rejectId(id, 'connections.' + id)\n    const path = 'connections.' + id\n    const custom = parse(customSchema, raw, path)\n    if (custom.kind === 'adapter') {\n      connections.set(id, resolve(id, custom.adapter, { ...custom, access: 'api-key' }, { kind: 'custom', endpoint: custom.endpoint }))\n    } else {\n      const info = protocols![custom.protocol]\n      const values = custom.options ?? {}\n      const problems = validateOptions(info.label, info.options, values, 'api-key', info.exclusive)\n      if (problems.length > 0) fail(path + '.options', problems.join('; ') + '; ' + SETTINGS_RESET_HINT)\n      connections.set(id, {\n        id, catalogKey: custom.protocol, kind: 'model', label: custom.label, disabled: custom.disabled ?? false,\n        remote: true, trustedEndpoint: true, options: values,\n        route: { kind: 'fixed', protocol: custom.protocol, model: custom.model, endpoint: custom.endpoint, credentialRef: custom.credentialRef },\n      })\n    }\n  }\n  const defaultConnection = settings.defaultConnection ?? defaults.defaultConnection\n  if (!connections.has(defaultConnection)) rejectId(defaultConnection, 'defaultConnection')\n  return { version: migrations.currentVersion, defaultConnection, showSelector: settings.showSelector ?? true, enhancedTools: settings.enhancedTools ?? false, defaults: settings.defaults ?? parse(defaults.schema, {}, 'defaults'), connections }\n}\n\n/** Bound traversal and cloning before parsing even unknown fields. */\nfunction validateDocumentBounds(value: unknown): void {\n  const pending = [{ value, path: 'settings', depth: 0 }]\n  const visited = new Set<object>()\n  let nodes = 1\n  while (pending.length > 0) {\n    const current = pending.pop()!\n    if (typeof current.value === 'string' && current.value.length > TEXT_MAX_LENGTH) throw new Error(current.path + ': text must contain at most ' + TEXT_MAX_LENGTH + ' characters')\n    if (current.value === null || typeof current.value !== 'object') continue\n    if (current.depth > 20) throw new Error(current.path + ': settings depth exceeds 20')\n    if (visited.has(current.value)) continue\n    visited.add(current.value)\n    if (Array.isArray(current.value) && current.value.length > 200) throw new Error(current.path + ': must contain at most 200 entries')\n    let entries = 0\n    for (const key in current.value) {\n      if (!Object.hasOwn(current.value, key)) continue\n      entries += 1\n      if (entries > 200) throw new Error(current.path + ': must contain at most 200 entries')\n      if (key.length > TEXT_MAX_LENGTH) throw new Error(current.path + ': key must contain at most ' + TEXT_MAX_LENGTH + ' characters')\n      const path = current.path + '.' + key\n      if (key === '__proto__' || key === 'constructor' || key === 'prototype') throw new Error(path + ': unsafe key; ' + SETTINGS_RESET_HINT)\n      nodes += 1\n      if (nodes > 100_000) throw new Error('settings: node budget exceeds 100000')\n      pending.push({ value: (current.value as Record<string, unknown>)[key], path, depth: current.depth + 1 })\n    }\n  }\n}\n","/** Lazy assembly of generated Remote definitions using caller-supplied Zod; no runtime imports. */\n/**\n * Retain one generated definition per endpoint without constructing parsers or projections.\n * The class instance builds its shared descriptor/method index on first access;\n * input schemas and JSON Schema projections are cached only when requested.\n * @param spec - compiler-produced method facts and Zod factories.\n * @param zod - the generated artifact's Zod runtime for named-input parsers.\n * @returns a lazy, mountable info instance with no registration or transport effects.\n */\nexport function createTypertRemoteInfo(spec, zod) {\n    return new RemoteInfo(spec, zod);\n}\nclass RemoteInfo {\n    spec;\n    zod;\n    index;\n    constructor(spec, zod) {\n        this.spec = spec;\n        this.zod = zod;\n    }\n    get package() { return this.spec.package; }\n    get descriptors() { return this.resolve().descriptors; }\n    get methods() { return this.resolve().methods; }\n    resolve() {\n        if (this.index !== undefined)\n            return this.index;\n        const zod = this.zod;\n        const descriptors = [];\n        const methods = Object.create(null);\n        for (const [endpoint, definition] of Object.entries(this.spec.methods)) {\n            const separator = endpoint.indexOf('/');\n            const namespace = endpoint.slice(0, separator);\n            const method = endpoint.slice(separator + 1);\n            const parameters = definition.parameters.map(parameter => ({ ...parameter, wire: parameter.wire ?? parameter.name }));\n            const descriptor = {\n                ...definition,\n                id: `${this.spec.package}#${endpoint}`,\n                namespace,\n                method,\n                parameters,\n                result: definition.result.description === undefined ? definition.result : new ResultValue(definition.result),\n            };\n            if (definition.invocation.kind === 'direct') {\n                const inputs = [];\n                const direct = Object.assign(descriptor, {\n                    input(options) {\n                        const strict = options?.strict === true;\n                        return inputs[strict ? 1 : 0] ??= new NamedInput(parameters, strict, zod);\n                    },\n                    invoke(remote, input, signal) {\n                        const named = input;\n                        const values = parameters.map(parameter => named[parameter.wire]);\n                        if (definition.cancellation !== undefined)\n                            values.push(signal);\n                        // Namespace access retains the Gateway's mount checks and scoped receiver policy.\n                        const receiver = Reflect.get(remote, namespace);\n                        const call = Reflect.get(receiver, method);\n                        return call.apply(receiver, values);\n                    },\n                });\n                // The generated namespace return type is selected by this same descriptor's mode.\n                methods[endpoint] = direct;\n            }\n            descriptors.push(descriptor);\n        }\n        return this.index = { descriptors, methods };\n    }\n}\n/**\n * Narrow a Registry descriptor to its generated direct-method capabilities.\n * @param descriptor - a live descriptor, including possible source fallback or Context-only receivers.\n * @returns whether generated named input and direct invocation are available.\n */\nexport function isTypertRemoteMethod(descriptor) {\n    return descriptor.invocation.kind === 'direct' && descriptor.result.mode === 'strict'\n        && 'input' in descriptor && typeof descriptor.input === 'function'\n        && 'invoke' in descriptor && typeof descriptor.invoke === 'function';\n}\nfunction optional(parameter) {\n    return parameter.source === 'json' && parameter.acceptsUndefined === true;\n}\nclass NamedInput {\n    parameters;\n    strict;\n    zod;\n    schema;\n    projection;\n    constructor(parameters, strict, zod) {\n        this.parameters = parameters;\n        this.strict = strict;\n        this.zod = zod;\n    }\n    codec(parameter) {\n        return this.strict ? parameter.strictCodec : parameter.codec;\n    }\n    create = () => this.schema ??= this.zod.strictObject(Object.fromEntries(this.parameters.map((parameter) => {\n        const value = this.codec(parameter).create();\n        return [parameter.wire, optional(parameter) ? value.optional() : value.nonoptional()];\n    })));\n    get jsonSchema() { return this.project().jsonSchema; }\n    get jsonSchemaError() { return this.project().jsonSchemaError; }\n    project() {\n        if (this.projection !== undefined)\n            return this.projection;\n        const unavailable = this.parameters.find(parameter => this.codec(parameter).jsonSchema === undefined);\n        if (unavailable !== undefined) {\n            return this.projection = { jsonSchemaError: this.codec(unavailable).jsonSchemaError ?? `No JSON Schema for parameter ${unavailable.wire}` };\n        }\n        return this.projection = {\n            jsonSchema: {\n                type: 'object',\n                properties: Object.fromEntries(this.parameters.map(parameter => [parameter.wire, {\n                        ...this.codec(parameter).jsonSchema,\n                        ...(parameter.description === undefined ? {} : { description: parameter.description }),\n                    }])),\n                required: this.parameters.filter(parameter => !optional(parameter)).map(parameter => parameter.wire),\n                additionalProperties: false,\n            },\n        };\n    }\n}\nclass ResultValue {\n    spec;\n    projection;\n    constructor(spec) {\n        this.spec = spec;\n    }\n    get mode() { return this.spec.mode; }\n    get typeSymbol() { return this.spec.typeSymbol; }\n    get create() { return this.spec.create; }\n    get decode() { return this.spec.decode; }\n    get encode() { return this.spec.encode; }\n    get description() { return this.spec.description; }\n    get jsonSchemaError() { return this.spec.jsonSchemaError; }\n    get jsonSchema() {\n        if (this.projection === undefined) {\n            const schema = this.spec.jsonSchema;\n            this.projection = { value: schema === undefined ? undefined : { ...schema, description: this.spec.description } };\n        }\n        return this.projection.value;\n    }\n}\n//# sourceMappingURL=remote-info.js.map","/**\n * The per-Session selection vocabulary and the `<ns>/get` · `<ns>/set` ·\n * `<ns>/provider` · `<ns>/pairings` · `<ns>/forgetPairing` Remote contract\n * both capabilities expose. A capability instantiates the zod fragments with\n * its own session options schema and connection extras; Host service and\n * browser store then parse the same shapes.\n */\nimport type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'\nimport { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'\nimport { z } from 'zod'\nimport type { Access, BackendKind } from './connections.ts'\n\n/** What a Session chose: a connection, or `null` for off; revision 0 means it never chose. */\nexport interface Selection<O> {\n  readonly connectionId: string | null\n  readonly revision: number\n  readonly options: O\n}\n\n/** Where the Session's current connection comes from; the UI explains it. */\nexport const SELECTION_SOURCES = ['session', 'inherited', 'model', 'default'] as const\nexport type SelectionSource = typeof SELECTION_SOURCES[number]\n\n/** Model memory: the connection last chosen in a Session of this model; `null` remembers \"off\". */\nexport interface Pairing {\n  readonly provider: string\n  readonly model: string\n  readonly connectionId: string | null\n}\n\n/**\n * Whether a connection can serve this Session, judged from local facts only:\n * `ready` never proves upstream access, quota or health.\n */\nexport const CONNECTION_STATUS = ['ready', 'disabled', 'needs-credential', 'unsupported'] as const\nexport type ConnectionStatus = typeof CONNECTION_STATUS[number]\n\n/**\n * Why a connection that follows the Session model cannot serve its current\n * route: no model yet, a provider without a public route, an undeclared or\n * unsupported protocol, no usable endpoint, custom request headers, or no\n * single credential reference. The browser words each reason.\n */\nexport const UNSUPPORTED_REASONS = ['no-model', 'unknown-route', 'protocol', 'endpoint', 'headers', 'credential'] as const\nexport type UnsupportedReason = typeof UNSUPPORTED_REASONS[number]\n\nconst KINDS = ['native', 'adapter', 'model', 'local'] as const satisfies readonly BackendKind[]\nconst ACCESS = ['keyless', 'api-key', 'account'] as const satisfies readonly Access[]\n\nexport const sessionId = z.string().min(1).max(256)\nexport const connectionId = z.string().min(1).max(128)\n\n/** Fields every connection view carries; a capability adds its own with `extras`. */\nexport const connectionViewBase = z.object({\n  id: connectionId,\n  label: z.string(),\n  kind: z.enum(KINDS),\n  /** Whether the query or URL is sent to a third-party service. */\n  remote: z.boolean(),\n  /** How the next call would authenticate. */\n  access: z.enum(ACCESS),\n  status: z.enum(CONNECTION_STATUS),\n  /** Present exactly when `status` is `unsupported`. */\n  reason: z.enum(UNSUPPORTED_REASONS).optional(),\n})\n\nexport const selectionRequest = z.object({ sessionId }).strict()\nexport const providerRequest = z.object({}).strict()\nexport const pairingsRequest = z.object({}).strict()\nexport const forgetPairingRequest = z.object({ provider: z.string().min(1), model: z.string().min(1) }).strict()\n\nexport const pairingView = z.object({ provider: z.string(), model: z.string(), connectionId: z.string().nullable() }).strict()\nexport const pairingsView = z.object({ pairings: z.array(pairingView) }).strict()\n\n/**\n * The two facts the browser cannot see when it judges the route from\n * `configForms.get('web')`: the id this plugin registered and the process\n * variable `WebRuntime` falls back to.\n */\nexport const providerView = z.object({\n  providerId: z.string(),\n  envProvider: z.string().nullable(),\n}).strict()\n\nexport type SelectionRequest = z.infer<typeof selectionRequest>\nexport type ProviderRequest = z.infer<typeof providerRequest>\nexport type ProviderView = z.infer<typeof providerView>\nexport type PairingsRequest = z.infer<typeof pairingsRequest>\nexport type ForgetPairingRequest = z.infer<typeof forgetPairingRequest>\nexport type PairingsView = z.infer<typeof pairingsView>\n\n/** What a capability hands the contract factory. */\nexport interface SelectionContractSpec<O extends z.ZodRawShape, E extends z.ZodRawShape> {\n  /** Remote namespace, e.g. `searchConnections`. */\n  readonly namespace: string\n  /** npm name of the plugin, recorded in the generated Remote info. */\n  readonly packageName: string\n  /** Session options shape (search: `{ freshness }`; fetch: `{}`); a change may carry any subset of it. */\n  readonly options: O\n  /** Capability-specific connection view fields (search: `{ freshness: z.boolean() }`). */\n  readonly extras: E\n}\n\n/**\n * Build the zod fragments and the mountable Remote info of one capability.\n * Request and result schemas are strict at both ends.\n */\nexport function selectionContract<O extends z.ZodRawShape, E extends z.ZodRawShape>(spec: SelectionContractSpec<O, E>) {\n  const { namespace, packageName } = spec\n  const options = z.strictObject(spec.options)\n  const optionsChange = options.partial()\n  const connectionView = connectionViewBase.extend(spec.extras).strict()\n  const selection = z.object({ connectionId: z.string().nullable(), revision: z.number().int().nonnegative(), options }).strict()\n  const selectionView = z.object({\n    selection,\n    source: z.enum(SELECTION_SOURCES),\n    connections: z.array(connectionView),\n  }).strict()\n  const selectionChange = z.object({\n    sessionId,\n    /** A connection id, or null to turn the capability off for the Session. */\n    connectionId: connectionId.nullable().optional(),\n    /** Session options to change; omitted fields keep their value. */\n    options: optionsChange.optional(),\n    /** Revision the caller observed; a stale one fails with `<ns>/conflict`. */\n    expectedRevision: z.number().int().nonnegative(),\n  }).strict().refine(change => change.connectionId !== undefined || change.options !== undefined, 'a change needs connectionId or options')\n\n  const strict = (typeSymbol: string, create: () => z.ZodType) => ({ mode: 'strict', typeSymbol, create }) as const\n  const request = (typeSymbol: string, create: () => z.ZodType) => ({ name: 'request', source: 'json', codec: strict(typeSymbol, create), strictCodec: strict(typeSymbol, create) }) as const\n  const method = (name: string, parameter: ReturnType<typeof request>, result: ReturnType<typeof strict>) =>\n    [`${namespace}/${name}`, { service: namespace, invocation: { kind: 'direct' }, parameters: [parameter], result }] as const\n  const Type = (name: string) => `${namespace[0]!.toUpperCase()}${namespace.slice(1)}${name}`\n\n  /** Client contribution; mount with `ctx.remote.$mount(remoteInfo)`. */\n  const remoteInfo = createTypertRemoteInfo({\n    package: packageName,\n    methods: Object.fromEntries([\n      method('get', request(Type('SelectionRequest'), () => selectionRequest), strict(Type('SelectionView'), () => selectionView)),\n      method('set', request(Type('SelectionChange'), () => selectionChange), strict(Type('SelectionView'), () => selectionView)),\n      method('provider', request(Type('ProviderRequest'), () => providerRequest), strict(Type('ProviderView'), () => providerView)),\n      method('pairings', request(Type('PairingsRequest'), () => pairingsRequest), strict(Type('PairingsView'), () => pairingsView)),\n      method('forgetPairing', request(Type('ForgetPairingRequest'), () => forgetPairingRequest), strict(Type('PairingsView'), () => pairingsView)),\n    ]),\n  }, z)\n\n  return { namespace, options, optionsChange, connectionView, selection, selectionView, selectionChange, remoteInfo }\n}\n\nexport type SelectionContract<O extends z.ZodRawShape, E extends z.ZodRawShape> = ReturnType<typeof selectionContract<O, E>>\nexport type ConnectionViewOf<C> = C extends { connectionView: z.ZodType<infer V> } ? V : never\nexport type SelectionViewOf<C> = C extends { selectionView: z.ZodType<infer V> } ? V : never\nexport type SelectionChangeOf<C> = C extends { selectionChange: z.ZodType<infer V> } ? V : never\n\n/**\n * The capability-agnostic views, for code that handles either capability (the\n * ui package). A capability's own types (`SelectionViewOf<typeof contract>`)\n * are assignable to them.\n */\nexport type ConnectionView = z.infer<typeof connectionViewBase> & Readonly<Record<string, unknown>>\nexport interface SelectionView<O extends Record<string, unknown> = Record<string, unknown>> {\n  readonly selection: Selection<O>\n  readonly source: SelectionSource\n  readonly connections: readonly ConnectionView[]\n}\n/** A change as any capability's `<ns>/set` accepts it; the capability's contract narrows `options`. */\nexport interface SelectionChange<O extends Record<string, unknown> = Record<string, unknown>> {\n  readonly sessionId: string\n  readonly connectionId?: string | null | undefined\n  readonly options?: Partial<O> | undefined\n  readonly expectedRevision: number\n}\n\n/**\n * The method map a capability merges into `TypertRemoteMap`:\n * `interface TypertRemoteMap extends ConnectionsRemoteMap<'searchConnections', SearchSelectionView> {}`.\n */\nexport type ConnectionsRemoteMap<NS extends string, V, C = SelectionChange> = {\n  [K in `${NS}/get`]: (request: SelectionRequest) => Promise<RemoteResult<V>>\n} & {\n  [K in `${NS}/set`]: (request: C) => Promise<RemoteResult<V>>\n} & {\n  [K in `${NS}/provider`]: (request: ProviderRequest) => Promise<RemoteResult<ProviderView>>\n} & {\n  [K in `${NS}/pairings`]: (request: PairingsRequest) => Promise<RemoteResult<PairingsView>>\n} & {\n  [K in `${NS}/forgetPairing`]: (request: ForgetPairingRequest) => Promise<RemoteResult<PairingsView>>\n}\n\n/** The error details a capability merges into `RemoteErrorDetailsMap`. */\nexport type ConnectionsRemoteErrors<NS extends string> = {\n  /** The row document is invalid; repair it on the settings page. */\n  [K in `${NS}/invalid-settings`]: {}\n} & {\n  /** The selection changed after the caller read it; re-read and retry. */\n  [K in `${NS}/conflict`]: {}\n} & {\n  /** The requested connection is missing or disabled. */\n  [K in `${NS}/unavailable`]: { readonly connectionId: string }\n}\n","import type { TypertRemoteNamespace } from '@deepseek-ai/dsh-typert-protocol'\nimport { FETCH, selectionContract, type ConnectionsRemoteErrors, type ConnectionsRemoteMap } from 'dsh-tool-web-enhanced-core/shared'\nimport type { z } from 'zod'\n\nexport const contract = selectionContract({ namespace: 'fetchConnections', packageName: FETCH.packageName, options: {}, extras: {} })\nexport const fetchOptions = contract.options\n\nexport type FetchConnectionView = z.infer<typeof contract.connectionView>\nexport type FetchSelectionView = z.infer<typeof contract.selectionView>\nexport type FetchSelectionChange = z.infer<typeof contract.selectionChange>\n\ndeclare module '@deepseek-ai/dsh-typert-protocol' {\n  interface TypertRemoteMap extends ConnectionsRemoteMap<'fetchConnections', FetchSelectionView, FetchSelectionChange> {}\n  interface TypertRemoteNamespaceMap {\n    fetchConnections: TypertRemoteNamespace<'fetchConnections'>\n  }\n  interface RemoteErrorDetailsMap extends ConnectionsRemoteErrors<'fetchConnections'> {}\n}\n","/** Building blocks shared by the settings sections. */\nimport { useState, type ReactNode } from 'react'\nimport { Button, IconChevronDownOutlineRegular, Menu } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsLayers } from './sparse.ts'\nexport type SettingsClasses = Readonly<Record<string, string>>\n\nexport function classNames(...args: unknown[]): string {\n  return args\n    .flat(Number.POSITIVE_INFINITY)\n    .filter(Boolean)\n    .map(arg => {\n      if (typeof arg === 'string') return arg\n      if (typeof arg === 'object' && arg !== null) {\n        return Object.entries(arg)\n          .filter(([, v]) => Boolean(v))\n          .map(([k]) => k)\n          .join(' ')\n      }\n      return ''\n    })\n    .filter(Boolean)\n    .join(' ')\n}\n\n/** The accepted document a section edits. */\nexport interface SettingsDoc<S = unknown> {\n  readonly config: S\n  readonly layers: SettingsLayers\n  readonly revision: number\n  /** Writable and in the current schema version. */\n  readonly editable: boolean\n}\n\n/**\n * Operations computed from the layers they will apply to: the page runs it\n * once the writes before it have settled, on the document they left.\n */\nexport type SettingsChange = (layers: SettingsLayers) => readonly SettingsPathOpView[]\n\n/**\n * Submit a change after the page's earlier writes; resolves whether the Host\n * accepted it. Operations are fenced by a revision (default: the one the page\n * shows), so a form that edited what it displayed is refused once that changed;\n * a {@link SettingsChange} is fenced by the revision it was computed on. No\n * operations is a no-op success.\n */\nexport type WriteSettings = (change: readonly SettingsPathOpView[] | SettingsChange, revision?: number) => Promise<boolean>\n\n/** A local schema failure whose diagnostic stays out of the translated message. */\nexport class SettingsValidationError extends Error {}\n\nexport interface WriteState {\n  readonly busy: boolean\n  readonly error: string | undefined\n  readonly errorTitle: string | undefined\n  /** Run one write, recording a refusal or a transport failure as this section's error. */\n  run(work: () => Promise<boolean>): Promise<boolean>\n}\n\nexport interface SelectOption<T extends string = string> { readonly id: T; readonly label: string }\n\nexport function createSettingsParts<K extends string>({ classes: css, keys }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<'refused' | 'invalid' | 'failed', K>>\n}) {\n  /** `titleId` lets a control inside name itself by the section title. */\n  function Section({ title, titleId, actions, children }: { title: string; titleId?: string | undefined; actions?: ReactNode; children: ReactNode }) {\n    return (\n      <section className={css.section}>\n        <div className={css.sectionHead}>\n          <h4 id={titleId} className={css.sectionTitle}>{title}</h4>\n          {actions}\n        </div>\n        {children}\n      </section>\n    )\n  }\n  \n  /** Title and hint on the left, one control on the right; wraps under the text on narrow pages. */\n  function SettingRow({ title, hint, children }: { title: string; hint: ReactNode; children: ReactNode }) {\n    return (\n      <div className={css.settingRow}>\n        <div className={css.settingText}>\n          <div className={css.settingTitle}>{title}</div>\n          <div className={css.hint}>{hint}</div>\n        </div>\n        <div className={css.settingControl}>{children}</div>\n      </div>\n    )\n  }\n  \n  \n  \n  /** A dropdown in the settings pill style, built on the shared Menu. */\n  function SelectMenu<T extends string = string>({ label, title, value, options, disabled, onChange, compact = false }: {\n    label: string\n    /** Hover text, e.g. the upstream name of an option. */\n    title?: string\n    value: T\n    options: readonly SelectOption<T>[]\n    disabled: boolean\n    onChange: (id: T) => void\n    compact?: boolean\n  }) {\n    const [open, setOpen] = useState(false)\n    const current = options.find(option => option.id === value)\n    return (\n      <Menu\n        open={open}\n        onClose={() => { setOpen(false) }}\n        items={options.map(option => ({ id: option.id, label: option.label }))}\n        selectedId={value}\n        onSelect={(id) => {\n          setOpen(false)\n          if (id !== value) onChange(id as T)\n        }}\n        align=\"end\"\n        portal\n        anchor={(\n          <button\n            type=\"button\"\n            className={compact ? css.selectCompact : css.select}\n            aria-label={label}\n            title={title}\n            aria-haspopup=\"menu\"\n            aria-expanded={open}\n            disabled={disabled}\n            onClick={() => { setOpen(!open) }}\n          >\n            <span className={css.selectValue}>{current?.label ?? value}</span>\n            <IconChevronDownOutlineRegular className={css.selectChevron} />\n          </button>\n        )}\n      />\n    )\n  }\n  \n    /** Pending state and the last failure of one section's writes. */\n  function useWrite(t: ClientTranslate<K>): WriteState {\n    const [state, setState] = useState<{ busy: boolean; error: string | undefined; errorTitle: string | undefined }>({ busy: false, error: undefined, errorTitle: undefined })\n    const run = async (work: () => Promise<boolean>): Promise<boolean> => {\n      setState({ busy: true, error: undefined, errorTitle: undefined })\n      try {\n        const accepted = await work()\n        setState({ busy: false, error: accepted ? undefined : t(keys.refused), errorTitle: undefined })\n        return accepted\n      } catch (error) {\n        const message = error instanceof Error ? error.message : String(error)\n        const invalid = error instanceof SettingsValidationError\n        setState({\n          busy: false,\n          error: invalid ? t(keys.invalid) : message || t(keys.failed),\n          errorTitle: invalid ? message : undefined,\n        })\n        return false\n      }\n    }\n    return { ...state, run }\n  }\n  \n  function ErrorText({ children, title }: { children: string | undefined; title?: string | undefined }) {\n    return children === undefined ? null : <p className={css.error} role=\"alert\" title={title}>{children}</p>\n  }\n  \n  /** Inline confirmation of a destructive action: the question beside cancel and confirm. */\n  function ConfirmRow({ message, confirmLabel, cancelLabel, disabled, onConfirm, onCancel }: {\n    message: string\n    confirmLabel: string\n    cancelLabel: string\n    disabled: boolean\n    onConfirm: () => void\n    onCancel: () => void\n  }) {\n    return (\n      <div className={css.confirmRow} role=\"group\" aria-label={message}>\n        <span className={css.confirmText}>{message}</span>\n        <div className={css.actions}>\n          <Button variant=\"ghost\" size=\"sm\" onClick={onCancel}>{cancelLabel}</Button>\n          <Button variant=\"outline\" size=\"sm\" className={css.danger} disabled={disabled} onClick={onConfirm}>{confirmLabel}</Button>\n        </div>\n      </div>\n    )\n  }\n  \n  \n  return { Section, SettingRow, SelectMenu, ErrorText, ConfirmRow, useWrite }\n}\nexport type SettingsParts<K extends string> = ReturnType<typeof createSettingsParts<K>>\n\nexport function applyOps(user: unknown, ops: readonly SettingsPathOpView[]): Record<string, unknown> {\n  const root = structuredClone(user !== null && typeof user === 'object' && !Array.isArray(user) ? user as Record<string, unknown> : {})\n  for (const op of ops) {\n    if (op.path.length === 0) continue\n    if (op.op === 'set') {\n      let current: Record<string, unknown> = root\n      for (let i = 0; i < op.path.length - 1; i++) {\n        const seg = op.path[i]!\n        if (current[seg] === null || typeof current[seg] !== 'object' || Array.isArray(current[seg])) {\n          current[seg] = {}\n        }\n        current = current[seg] as Record<string, unknown>\n      }\n      current[op.path.at(-1)!] = structuredClone(op.value)\n    } else if (op.op === 'unset') {\n      let current: Record<string, unknown> = root\n      for (let i = 0; i < op.path.length - 1; i++) {\n        const seg = op.path[i]!\n        if (current[seg] === null || typeof current[seg] !== 'object' || Array.isArray(current[seg])) {\n          break\n        }\n        current = current[seg] as Record<string, unknown>\n      }\n      delete current[op.path.at(-1)!]\n    }\n  }\n  return root\n}\n","import { useEffect, useMemo, useRef, useState } from 'react'\nimport type { SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { SettingsDocumentSnapshot } from './secret-diagnostics.ts'\nimport { CURRENT_SETTINGS_VERSION, SETTINGS_MIGRATIONS, documentVersion, migrateDocument, type SettingsMigrations } from '../../shared/settings.ts'\nimport { applyOps, SettingsValidationError, type WriteSettings } from './parts.tsx'\nimport type { SettingsLayers } from './sparse.ts'\n\ntype Document = Record<string, unknown>\ntype ResolveSettings = (document: unknown) => unknown\ntype Mutate = (operations: SettingsPathOpView[], revision: number) => Promise<boolean>\n\nexport type SettingsDocumentView<S> =\n  | { readonly kind: 'ready'; readonly config: S; readonly layers: SettingsLayers; readonly needsWriteback: boolean }\n  | { readonly kind: 'invalid'; readonly diagnostic: string; readonly layers: SettingsLayers; readonly needsWriteback: false }\n\n/** ConfigForm.value is schema-projected; the raw layers retain unknown fields for validation. */\nexport function effectiveDocument(snapshot: SettingsLayers): Document {\n  return merge(snapshot.base, snapshot.user)\n}\n\n/** Validate before exposing normal editors; only successful older migrations need writeback. */\nexport function editableSettings<S>(raw: unknown, layers: SettingsLayers, writable: boolean, resolve: ResolveSettings, migrations: SettingsMigrations = SETTINGS_MIGRATIONS): SettingsDocumentView<S> {\n  try {\n    const version = documentVersion(raw, migrations.currentVersion)\n    const config = migrateDocument(raw, migrations)\n    resolve(config)\n    return { kind: 'ready', config: config as S, layers, needsWriteback: writable && version.kind === 'older' }\n  } catch (error) {\n    return { kind: 'invalid', diagnostic: diagnostic(error), layers, needsWriteback: false }\n  }\n}\n\n/** Check the exact recursively overlaid candidate that the settings store will persist. */\nexport function settingsOperations(layers: SettingsLayers, operations: readonly SettingsPathOpView[], resolve: ResolveSettings): SettingsPathOpView[] {\n  try {\n    const candidate = effectiveDocument({ base: layers.base, user: applyOps(layers.user, operations) })\n    const result = [...operations]\n    if (result.some(op => op.op === 'set') && candidate.version === undefined) {\n      result.push({ op: 'set', path: ['version'], value: CURRENT_SETTINGS_VERSION })\n      candidate.version = CURRENT_SETTINGS_VERSION\n    }\n    resolve(candidate)\n    return result\n  } catch (error) {\n    throw new SettingsValidationError(diagnostic(error))\n  }\n}\n\n/**\n * Share validation, revision fencing and automatic future migrations between both pages.\n * @param snapshot - the settings snapshot the page renders.\n * @param read - the settings snapshot now, which a write the form accepted has already updated.\n */\nexport function useSettingsDocument<S>(snapshot: SettingsDocumentSnapshot<S>, read: () => SettingsDocumentSnapshot<S>, resolve: ResolveSettings, mutate: Mutate, migrations: SettingsMigrations = SETTINGS_MIGRATIONS) {\n  const view = useMemo((): SettingsDocumentView<S> | undefined => {\n    if (snapshot.status === 'unavailable' || snapshot.value === undefined || snapshot.revision === undefined) return undefined\n    const result = editableSettings<S>(effectiveDocument(snapshot), { base: snapshot.base, user: snapshot.user }, snapshot.writable, resolve, migrations)\n    if (snapshot.diagnostic === undefined) return result\n    return { kind: 'invalid', layers: result.layers, needsWriteback: false,\n      diagnostic: result.kind === 'invalid' ? result.diagnostic + '; ' + snapshot.diagnostic : snapshot.diagnostic }\n  }, [snapshot, resolve, migrations])\n  const attemptedRevision = useRef<number | undefined>(undefined)\n  const [failure, setFailure] = useState<{ revision: number; diagnostic: string }>()\n  const revision = snapshot.revision\n\n  useEffect(() => {\n    if (view?.kind !== 'ready' || !view.needsWriteback || revision === undefined || attemptedRevision.current === revision) return\n    attemptedRevision.current = revision\n    const writeback = async () => {\n      try {\n        const operations = replaceDocumentOperations(view.layers.user, view.config as Document)\n        await mutate(settingsOperations(view.layers, operations, resolve), revision)\n      } catch (error) {\n        setFailure({ revision, diagnostic: diagnostic(error) })\n      }\n    }\n    void writeback()\n  }, [view, revision, resolve, mutate])\n\n  // Sections write independently; one at a time, each on what the one before it left.\n  const queue = useRef<Promise<unknown>>(Promise.resolve())\n  const submit = async (change: Parameters<WriteSettings>[0], displayedRevision: number | undefined): Promise<boolean> => {\n    if (typeof change !== 'function') {\n      if (change.length === 0) return true\n      if (view === undefined || !snapshot.writable || displayedRevision === undefined) return false\n      return mutate(settingsOperations(view.layers, change, resolve), displayedRevision)\n    }\n    const current = read()\n    if (current.status !== 'ready' || !current.writable || current.revision === undefined) return false\n    const layers = { base: current.base, user: current.user }\n    const operations = change(layers)\n    if (operations.length === 0) return true\n    return mutate(settingsOperations(layers, operations, resolve), current.revision)\n  }\n  const write: WriteSettings = (change, expectedRevision = revision) => {\n    const task = queue.current.then(() => submit(change, expectedRevision))\n    queue.current = task.then(() => {}, () => {})\n    return task\n  }\n  return { view, write, migrationError: failure?.revision === revision ? failure?.diagnostic : undefined }\n}\n\nfunction replaceDocumentOperations(user: unknown, document: Document): SettingsPathOpView[] {\n  const operations: SettingsPathOpView[] = Object.keys(objectOf(user))\n    .filter(key => !Object.hasOwn(document, key))\n    .map(key => ({ op: 'unset', path: [key] }))\n  for (const [key, value] of Object.entries(document)) {\n    operations.push({ op: 'set', path: [key], value: value as Extract<SettingsPathOpView, { op: 'set' }>['value'] })\n  }\n  return operations\n}\n\nfunction diagnostic(error: unknown): string {\n  return error instanceof Error ? error.message : String(error)\n}\n\nfunction isObject(value: unknown): value is Document {\n  return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction objectOf(value: unknown): Document {\n  return isObject(value) ? value : {}\n}\n\nfunction merge(base: unknown, user: unknown): Document {\n  const result = { ...objectOf(base) }\n  for (const [key, value] of Object.entries(objectOf(user))) {\n    Object.defineProperty(result, key, { value: isObject(value) && isObject(result[key]) ? merge(result[key], value) : value, enumerable: true, writable: true, configurable: true })\n  }\n  return result\n}\n","/**\n * The composer menu's \"more services in settings\" fact, derived from the row\n * settings by the same resolution the Host uses (docs/design.md, \"远程服务缺省停用\").\n */\nimport type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { ConfigFormSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport { builtinId, type Descriptor } from '../shared/connections.ts'\nimport { effectiveDocument, editableSettings } from './settings/document.ts'\n\n/** What the fact reads of a resolved document. */\nexport interface ResolvedConnections {\n  readonly connections: ReadonlyMap<string, { readonly disabled: boolean }>\n}\n\n/** Whether the catalog has remote services and every one of them is off. */\nexport function remoteServicesOff(catalog: Readonly<Record<string, Descriptor>>, resolved: ResolvedConnections): boolean {\n  const remote = Object.keys(catalog).filter(key => catalog[key]!.optIn)\n  return remote.length > 0 && remote.every(key => resolved.connections.get(builtinId(key))!.disabled)\n}\n\n/** The fact for the current row settings, recomputed only when the settings snapshot changes. */\nexport function remoteServicesOffSource<S>(settings: ObservableSnapshot<ConfigFormSnapshot<S>>, catalog: Readonly<Record<string, Descriptor>>, resolve: (document: unknown) => ResolvedConnections): ObservableSnapshot<boolean> {\n  let cached: { readonly source: ConfigFormSnapshot<S>; readonly off: boolean } | undefined\n  const compute = (source: ConfigFormSnapshot<S>): boolean => {\n    if (source.value === undefined) return false\n    const view = editableSettings(effectiveDocument(source), source, false, resolve)\n    return view.kind === 'ready' && remoteServicesOff(catalog, resolve(view.config))\n  }\n  return {\n    getSnapshot() {\n      const source = settings.getSnapshot()\n      if (cached === undefined || cached.source !== source) cached = { source, off: compute(source) }\n      return cached.off\n    },\n    subscribe: listener => settings.subscribe(listener),\n  }\n}\n","import type { Context } from '@deepseek-ai/cordis'\nimport type { CommandDecoration, SelectOption, SelectOptionGroup } from '@deepseek-ai/dsh-client-ui-commands/client'\nimport type { RemoteFailure } from '@deepseek-ai/dsh-typert-protocol'\nimport type { SelectionView } from '../shared/selection.ts'\nimport type { ConnectionText, SelectionState, SelectionStore, SelectionUpdate } from './section.ts'\n\nexport type ClientTranslate<K extends string = string> = (key: K, params?: Record<string, string | number>) => string\nexport type CommandCopyKey = 'placeholder' | 'empty' | 'noResults' | 'readFailed' | 'current' | 'off'\nexport type CommandDetail = (hint: string | undefined, current: boolean) => { detail?: string }\n\nexport interface CommandOptions<V extends SelectionView> {\n  choices(view: V, detail: CommandDetail): readonly SelectOption[]\n  parse(id: string): SelectionUpdate | undefined\n  isCurrent(update: SelectionUpdate, selection: V['selection']): boolean\n}\n\nexport interface SelectionCommandSpec<V extends SelectionView, K extends string> {\n  /** The capability's Host command (`PluginIdentity.command`). */\n  readonly name: string\n  readonly t: ClientTranslate<K>\n  readonly keys: Readonly<Record<CommandCopyKey, K>>\n  readonly groups: (view: V) => readonly { group: SelectOptionGroup; connections: readonly V['connections'][number][] }[]\n  readonly describe: (connection: V['connections'][number]) => ConnectionText\n  readonly writeFailureText: (error: RemoteFailure) => string\n  readonly options?: CommandOptions<V>\n}\n\n/** Shared ids cannot be shadowed by capability-specific option groups. */\nexport function parseSelectionCommandOption(id: string, parseOptions?: (id: string) => SelectionUpdate | undefined): SelectionUpdate | undefined {\n  if (id === 'off') return { connectionId: null }\n  const prefix = 'connection:'\n  if (id.startsWith(prefix) && id.length > prefix.length) return { connectionId: id.slice(prefix.length) }\n  return parseOptions?.(id)\n}\n\n/**\n * The browser's bare invocation of the capability's Host command: a popup over\n * the same per-session store the composer menu uses. The Host command keeps its\n * menu row and runs every line with arguments.\n */\nexport function selectionCommand<V extends SelectionView, K extends string>(\n  selections: SelectionStore<V> & { current(sessionId: string): Promise<SelectionState<V>> },\n  spec: SelectionCommandSpec<V, K>,\n): CommandDecoration {\n  const t = (key: CommandCopyKey) => spec.t(spec.keys[key])\n  const read = async (sessionId: string) => {\n    const { view, readFailure } = await selections.current(sessionId)\n    if (view === undefined || readFailure !== undefined) throw new Error(t('readFailed'))\n    return view\n  }\n  return {\n    name: spec.name,\n    available: () => true,\n    ui: {\n      kind: 'popupSelect',\n      searchLabels: () => ({ placeholder: t('placeholder'), empty: t('empty'), noResults: t('noResults') }),\n      async options(session) {\n        const view = await read(session.sessionId)\n        const { connectionId } = view.selection\n        const detail: CommandDetail = (hint, current) => {\n          const text = [hint, current ? t('current') : undefined].filter(part => part !== undefined).join(' · ')\n          return text === '' ? {} : { detail: text }\n        }\n        const options: SelectOption[] = [\n          { id: 'off', label: t('off'), ...detail(undefined, connectionId === null), ...(connectionId === null ? { active: true } : {}) },\n        ]\n        for (const { group, connections } of spec.groups(view)) {\n          for (const connection of connections) {\n            if (connection.status !== 'ready') continue\n            const text = spec.describe(connection)\n            options.push({ id: 'connection:' + connection.id, label: text.label, group,\n              ...detail(text.caption, connection.id === connectionId), ...(connection.id === connectionId ? { active: true } : {}) })\n          }\n        }\n        if (spec.options !== undefined) options.push(...spec.options.choices(view, detail))\n        return options\n      },\n      async onSelect(option, session) {\n        const options = spec.options\n        const update = parseSelectionCommandOption(option.id, options === undefined ? undefined : id => options.parse(id))\n        if (update === undefined) return\n        const { selection } = await read(session.sessionId)\n        const current = update.connectionId !== undefined\n          ? update.connectionId === selection.connectionId\n          : spec.options !== undefined && spec.options.isCurrent(update, selection)\n        if (current) return\n        const result = await selections.set(session.sessionId, update)\n        if (!result.ok) throw new Error(spec.writeFailureText(result.error))\n      },\n    },\n  }\n}\n\n/**\n * Call `ran` after this browser ran the Host command `name` in a Session. A line\n * with arguments (`/setup-search off`) writes on the Host without the selection\n * store, so that Session's views must read again. DSH reports each Host command\n * this browser executed with `command/executed`, without its arguments, so every\n * run counts; runs from another browser or the TUI are not reported here.\n * @returns the listener's disposer; it also ends with `ctx`'s fiber.\n */\nexport function followHostCommand(ctx: Context, name: string, ran: (sessionId: string) => void): () => void {\n  return ctx.on('command/executed', (sessionId, executed) => {\n    if (executed === name) ran(sessionId)\n  })\n}\n","import { createSnapshotStore, type ObservableSnapshot, type SnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'\nimport type { SelectionStore, SelectionState, WriteResult } from './section.ts'\nimport type { SelectionChange, SelectionView } from '../shared/selection.ts'\n\n/** Capability callers keep their option type; the shared UI consumes SelectionStore. */\nexport interface CapabilitySelectionUpdate<V extends SelectionView> {\n  readonly connectionId?: string | null\n  readonly options?: Readonly<Partial<V['selection']['options']>>\n}\n\nexport interface SelectionRemote<V extends SelectionView> {\n  get(request: { sessionId: string }): Promise<RemoteResult<V>>\n  set(request: SelectionChange<V['selection']['options']>): Promise<RemoteResult<V>>\n}\n\ninterface Entry<V extends SelectionView> {\n  readonly sessionId: string\n  readonly store: SnapshotStore<SelectionState<V>>\n  readonly source: ObservableSnapshot<SelectionState<V>>\n  observers: number\n  /** Whether the stored view may be outdated. */\n  stale: boolean\n  /** Session model the view was read for. */\n  modelKey: string | undefined\n  /** Bumped by every event that outdates an in-flight read. */\n  epoch: number\n  reading: Promise<void> | undefined\n}\n\nexport class ConnectionSelectionStore<V extends SelectionView> implements SelectionStore<V> {\n  private readonly entries = new Map<string, Entry<V>>()\n\n  constructor(private readonly remote: SelectionRemote<V>, private readonly changed: () => void = () => {}) {}\n\n  /** Stable observable of one session; the renderer caches its hook binding per source. */\n  source(sessionId: string): ObservableSnapshot<SelectionState<V>> {\n    return this.entry(sessionId).source\n  }\n\n  /**\n   * Make sure the session's view is current, reading only when it is missing,\n   * outdated, or was read for another session model.\n   */\n  load(sessionId: string, modelKey?: string): Promise<void> {\n    const entry = this.entry(sessionId)\n    if (modelKey !== undefined && modelKey !== entry.modelKey) {\n      entry.modelKey = modelKey\n      this.outdate(entry)\n    }\n    return entry.stale ? this.read(entry) : entry.reading ?? Promise.resolve()\n  }\n\n  /** Read the session again, joining a read already in flight. */\n  refresh(sessionId: string): Promise<void> {\n    return this.read(this.entry(sessionId))\n  }\n\n  /** The latest view of a session after making sure it is current. */\n  async current(sessionId: string): Promise<SelectionState<V>> {\n    await this.refresh(sessionId)\n    return this.entry(sessionId).store.getSnapshot()\n  }\n\n  /**\n   * Write a change against the revision the views show. The confirmed view\n   * replaces the stored one; a refused write rereads so every view shows what\n   * the Host holds now.\n   */\n  async set(sessionId: string, update: CapabilitySelectionUpdate<V>): Promise<WriteResult> {\n    const entry = this.entry(sessionId)\n    const { view } = entry.store.getSnapshot()\n    if (view === undefined) throw new Error('connection selection has not been read yet')\n    this.outdate(entry)\n    const writeEpoch = entry.epoch\n    let invalidated = false\n    this.publish(entry, { saving: true })\n    let result: Awaited<ReturnType<SelectionRemote<V>['set']>>\n    try {\n      result = await this.remote.set({ sessionId, ...update, expectedRevision: view.selection.revision })\n    } finally {\n      // Settings/model changes during a write still require a newer read.\n      invalidated = entry.epoch !== writeEpoch\n      this.outdate(entry)\n      this.publish(entry, { saving: false })\n    }\n    if (result.ok) {\n      entry.stale = invalidated\n      this.publish(entry, { view: result.value, saving: false, readFailure: undefined })\n      if (invalidated) await this.read(entry)\n      this.changed()\n      return { ok: true }\n    }\n    this.publish(entry, { saving: false })\n    await this.read(entry)\n    return result\n  }\n\n  /**\n   * Settings, credentials, or the Host connection changed: observed sessions\n   * read again, the others read on their next load.\n   */\n  invalidate(): void {\n    for (const entry of this.entries.values()) this.reread(entry)\n  }\n\n  /**\n   * The Session's selection changed without this store (its Host command ran):\n   * its views read again, at once when observed, otherwise on their next load.\n   * A read already in flight reads once more.\n   */\n  invalidateSession(sessionId: string): void {\n    const entry = this.entries.get(sessionId)\n    if (entry !== undefined) this.reread(entry)\n  }\n\n  private entry(sessionId: string): Entry<V> {\n    const existing = this.entries.get(sessionId)\n    if (existing !== undefined) return existing\n    const store = createSnapshotStore<SelectionState<V>>({ view: undefined, saving: false, readFailure: undefined })\n    const entry: Entry<V> = {\n      sessionId, store, observers: 0, stale: true, modelKey: undefined, epoch: 0, reading: undefined,\n      source: {\n        getSnapshot: () => store.getSnapshot(),\n        subscribe: (listener) => {\n          entry.observers += 1\n          const unsubscribe = store.subscribe(listener)\n          return () => {\n            entry.observers -= 1\n            unsubscribe()\n          }\n        },\n      },\n    }\n    this.entries.set(sessionId, entry)\n    return entry\n  }\n\n  private reread(entry: Entry<V>): void {\n    this.outdate(entry)\n    if (entry.observers > 0) void this.read(entry)\n  }\n\n  private outdate(entry: Entry<V>): void {\n    entry.stale = true\n    entry.epoch += 1\n  }\n\n  private read(entry: Entry<V>): Promise<void> {\n    entry.reading ??= this.fetch(entry).finally(() => { entry.reading = undefined })\n    return entry.reading\n  }\n\n  /** Read until a result arrives that nothing outdated while it was in flight. */\n  private async fetch(entry: Entry<V>): Promise<void> {\n    for (;;) {\n      const epoch = entry.epoch\n      const result = await this.remote.get({ sessionId: entry.sessionId })\n      if (epoch !== entry.epoch) continue\n      entry.stale = false\n      if (result.ok) {\n        this.publish(entry, { view: result.value, readFailure: undefined })\n      } else {\n        const readFailure = result.error.code.endsWith('/invalid-settings') ? 'invalid-settings' : 'failed'\n        this.publish(entry, { readFailure })\n      }\n      return\n    }\n  }\n\n  private publish(entry: Entry<V>, patch: Partial<SelectionState<V>>): void {\n    entry.store.set({ ...entry.store.getSnapshot(), ...patch })\n  }\n}\n","import { createSnapshotStore, type ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { ConfigForm, ConfigFormSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type { RouteStore } from './section.ts'\nimport { routeOf, type Route } from '../shared/route.ts'\nimport type { ProviderView } from '../shared/selection.ts'\nimport type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'\nexport interface ProviderRemote { provider(request: Record<string, never>): Promise<RemoteResult<ProviderView>> }\n\nexport type WebSelection = Readonly<Record<string, unknown>>\nexport function clientRoute(web: ConfigFormSnapshot<WebSelection>, host: ProviderView | undefined, field: string): Route {\n  if (host === undefined || web.status !== 'ready') return { kind: 'unknown' }\n  return routeOf(web.value, field, host.envProvider, host.providerId)\n}\n\nexport class RouteStatus implements RouteStore {\n  readonly source: ObservableSnapshot<Route>\n  private readonly store = createSnapshotStore<Route>({ kind: 'unknown' })\n  private host: ProviderView | undefined\n  private reader: ProviderRemote | undefined\n  private observers = 0\n  private unwatch: (() => void) | undefined\n  private epoch = 0\n\n  constructor(private readonly web: ConfigForm<WebSelection>, private readonly field: string) {\n    this.source = {\n      getSnapshot: () => this.store.getSnapshot(),\n      subscribe: listener => {\n        const unsubscribe = this.store.subscribe(listener)\n        this.observers += 1\n        if (this.observers === 1) {\n          this.unwatch = web.subscribe(() => { this.publish() })\n          this.publish()\n          this.refresh()\n        }\n        return () => {\n          this.observers -= 1\n          if (this.observers === 0) {\n            if (this.unwatch !== undefined) this.unwatch()\n            this.unwatch = undefined\n            this.epoch += 1\n          }\n          unsubscribe()\n        }\n      },\n    }\n  }\n\n  attach(reader: ProviderRemote): () => void {\n    this.reader = reader\n    this.refresh()\n    return () => {\n      if (this.reader !== reader) return\n      this.reader = undefined\n      this.host = undefined\n      this.epoch += 1\n      this.publish()\n    }\n  }\n\n  refresh(): void {\n    const reader = this.reader\n    if (reader === undefined || this.observers === 0) return\n    const epoch = ++this.epoch\n    void reader.provider({}).then(result => {\n      if (epoch !== this.epoch) return\n      this.host = result.ok ? result.value : undefined\n      this.publish()\n    })\n  }\n\n  /** Publish only a changed route: observers re-render per publish, and some subscribe inside render. */\n  private publish(): void {\n    const next = clientRoute(this.web.getSnapshot(), this.host, this.field)\n    if (!sameRoute(this.store.getSnapshot(), next)) this.store.set(next)\n  }\n}\n\nfunction sameRoute(a: Route, b: Route): boolean {\n  if (a.kind !== b.kind) return false\n  switch (a.kind) {\n    case 'unknown': return true\n    case 'this': return true\n    case 'auto': return a.providerId === (b as typeof a).providerId\n    case 'other': return a.provider === (b as typeof a).provider && a.providerId === (b as typeof a).providerId\n  }\n}\n","import { createSnapshotStore, type ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'\nimport type { Pairing, PairingsView } from '../shared/selection.ts'\n\nexport type PairingsState =\n  | { readonly state: 'loading' }\n  | { readonly state: 'ready'; readonly pairings: Pairing[] }\n  | { readonly state: 'failed'; readonly message: string }\n\nexport interface PairingsRemote {\n  pairings(request: Record<string, never>): Promise<RemoteResult<PairingsView>>\n  forgetPairing(request: { provider: string; model: string }): Promise<RemoteResult<PairingsView>>\n}\n\nexport class PairingsStatus {\n  readonly source: ObservableSnapshot<PairingsState>\n  private readonly store = createSnapshotStore<PairingsState>({ state: 'loading' })\n  private observers = 0\n  private epoch = 0\n\n  constructor(private readonly remote: PairingsRemote, private readonly forgetFailureText: () => string) {\n    this.source = {\n      getSnapshot: () => this.store.getSnapshot(),\n      subscribe: listener => {\n        const unsubscribe = this.store.subscribe(listener)\n        this.observers += 1\n        if (this.observers === 1) void this.refresh()\n        return () => {\n          this.observers -= 1\n          if (this.observers === 0) this.epoch += 1\n          unsubscribe()\n        }\n      },\n    }\n  }\n\n  invalidate(): void {\n    this.epoch += 1\n    this.store.set({ state: 'loading' })\n    if (this.observers > 0) void this.refresh()\n  }\n\n  async refresh(): Promise<void> {\n    const epoch = ++this.epoch\n    this.store.set({ state: 'loading' })\n    const result = await this.remote.pairings({})\n    if (epoch !== this.epoch) return\n    this.store.set(result.ok ? { state: 'ready', pairings: result.value.pairings } : { state: 'failed', message: result.error.message })\n  }\n\n  async forget(provider: string, model: string): Promise<void> {\n    const result = await this.remote.forgetPairing({ provider, model })\n    if (!result.ok) throw new Error(this.forgetFailureText())\n    await this.refresh()\n  }\n}\n","import type { CredentialInfo, RemoteResult } from '@deepseek-ai/dsh-api-remotes/client'\nimport { createSnapshotStore, type ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nexport type CredentialStatusMap = Readonly<Record<string, 'configured' | 'missing' | 'unknown'>>\n\nexport interface CredentialDescriber {\n  describe(refs: string[]): Promise<RemoteResult<Record<string, CredentialInfo>>>\n}\n\nexport class CredentialStatus<S> {\n  readonly source: ObservableSnapshot<CredentialStatusMap>\n  private readonly store = createSnapshotStore<CredentialStatusMap>({})\n  private observers = 0\n  private epoch = 0\n\n  constructor(private readonly settings: () => S | undefined, private readonly credentials: CredentialDescriber, private readonly refs: (settings: S) => Iterable<string>) {\n    this.source = {\n      getSnapshot: () => this.store.getSnapshot(),\n      subscribe: listener => {\n        const unsubscribe = this.store.subscribe(listener)\n        this.observers += 1\n        if (this.observers === 1) this.refresh()\n        return () => {\n          this.observers -= 1\n          if (this.observers === 0) this.epoch += 1\n          unsubscribe()\n        }\n      },\n    }\n  }\n\n  refresh(): void {\n    if (this.observers === 0) return\n    const epoch = ++this.epoch\n    const settings = this.settings()\n    if (settings === undefined) {\n      this.store.set({})\n      return\n    }\n    const refs = new Set(this.refs(settings))\n    void this.credentials.describe([...refs]).then(result => {\n      if (epoch !== this.epoch) return\n      const states: Record<string, 'configured' | 'missing' | 'unknown'> = {}\n      for (const ref of refs) {\n        const info = result.ok ? result.value[ref] : undefined\n        states[ref] = info === undefined ? 'unknown' : info.configured ? 'configured' : 'missing'\n      }\n      this.store.set(states)\n    })\n  }\n}\n","/**\n * Sparse settings writes. The catalog supplies every default, so a write\n * stores only what differs from the inherited (composition) layer, and\n * returning a value to its inherited state removes the user entry instead of\n * materializing it.\n */\nimport type { SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client'\nimport { documentVersion as inspectDocumentVersion, type DocumentVersion } from '../../shared/settings.ts'\nexport type { DocumentVersion } from '../../shared/settings.ts'\n\n\n/** The two layers of a ConfigForm snapshot. */\nexport interface SettingsLayers {\n  readonly base?: unknown\n  readonly user?: unknown\n}\n\ntype Settable = Extract<SettingsPathOpView, { op: 'set' }>['value']\ntype Json = Record<string, unknown>\n\nconst objectOf = (value: unknown): Json =>\n  value !== null && typeof value === 'object' && !Array.isArray(value) ? value as Json : {}\n\nconst isObject = (value: unknown): value is Json => value !== null && typeof value === 'object' && !Array.isArray(value)\n\nfunction equal(a: unknown, b: unknown): boolean {\n  if (Object.is(a, b)) return true\n  if (Array.isArray(a) || Array.isArray(b)) {\n    return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((value, index) => equal(value, b[index]))\n  }\n  if (!isObject(a) || !isObject(b)) return false\n  const keys = Object.keys(a)\n  return keys.length === Object.keys(b).length && keys.every(key => Object.hasOwn(b, key) && equal(a[key], b[key]))\n}\n\n/** Remove what an object value shares with its inherited counterpart, key by key. */\nfunction delta(value: unknown, inherited: unknown): unknown {\n  if (equal(value, inherited)) return undefined\n  if (!isObject(value)) return value\n  const base = objectOf(inherited)\n  return Object.fromEntries(Object.entries(value)\n    .map(([key, child]) => [key, delta(child, base[key])] as const)\n    .filter(([, child]) => child !== undefined))\n}\n\nfunction documentVersion(layers: SettingsLayers): DocumentVersion {\n  return inspectDocumentVersion({ ...objectOf(layers.base), ...objectOf(layers.user) })\n}\n\nfunction assertCurrentVersion(layers: SettingsLayers): void {\n  const state = documentVersion(layers)\n  if (state.kind !== 'current') throw new Error('settings document version is ' + state.kind)\n}\n\n/**\n * Operations that make `path` hold `target`, touching only that path.\n * @param fallback - the catalog default used when the base layer has no value.\n * @param target - the desired effective value; undefined returns the path to its inherited value.\n */\nfunction sparseSettingOperations(spec: SparseSettingsSpec, layers: SettingsLayers, path: readonly string[], target: unknown, fallback?: unknown): SettingsPathOpView[] {\n  assertCurrentVersion(layers)\n  const inherited = valueAt(layers.base, path) ?? fallback\n  const user = valueAt(layers.user, path)\n  const ops: SettingsPathOpView[] = []\n  if (target === undefined || equal(target, inherited)) {\n    if (user !== undefined) ops.push({ op: 'unset', path: prunedPath(layers.user, path) })\n  } else {\n    const sparse = delta(target, inherited)\n    if (!equal(sparse, user)) ops.push({ op: 'set', path: [...path], value: sparse as Settable })\n  }\n  if (ops.some(op => op.op === 'set') && objectOf(layers.user).version !== spec.version) {\n    ops.push({ op: 'set', path: ['version'], value: spec.version })\n  }\n  return ops\n}\n\nfunction valueAt(root: unknown, path: readonly string[]): unknown {\n  return path.reduce<unknown>((value, key) => objectOf(value)[key], root)\n}\n\n/**\n * The path to unset so no empty object stays behind: removing the only key of\n * a user-layer object removes that object instead, up to a top-level field.\n */\nfunction prunedPath(user: unknown, path: readonly string[]): string[] {\n  let end = path.length\n  while (end > 1 && Object.keys(objectOf(valueAt(user, path.slice(0, end - 1)))).length === 1) end -= 1\n  return path.slice(0, end)\n}\n\n\n\n/** Unset every field this plugin stores in the user layer; inherited values and credentials stay. */\nfunction resetSettingsOperations(layers: SettingsLayers): SettingsPathOpView[] {\n  return Object.keys(objectOf(layers.user)).map(key => ({ op: 'unset', path: [key] }))\n}\n\nexport interface SparseSettingsSpec {\n  readonly version: number\n  readonly fields: readonly string[]\n}\n\n/** Bind the current document version and fields; no predecessor schema is inferred. */\nexport function createSparseSettings(spec: SparseSettingsSpec) {\n  return {\n    documentVersion: (layers: SettingsLayers) => documentVersion(layers),\n    sparseSettingOperations: (layers: SettingsLayers, path: readonly string[], target: unknown, fallback?: unknown) => sparseSettingOperations(spec, layers, path, target, fallback),\n    resetSettingsOperations: (layers: SettingsLayers) => resetSettingsOperations(layers),\n  }\n}\nexport type SparseSettings = ReturnType<typeof createSparseSettings>\n","/** Write-only key entry: the value goes to DSH Credentials and never into settings. */\nimport { useId, useState } from 'react'\nimport { Button, Input, Tag } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { CredentialStatusMap } from '../credentials.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsClasses } from './parts.tsx'\n\n\nexport type SaveCredential = (ref: string, value: string) => Promise<void>\n\ntype Outcome = { readonly kind: 'saved' } | { readonly kind: 'failed'; readonly message: string } | undefined\n\nexport type CredentialCopyKey = \"credential.label\" | \"credential.set\" | \"credential.unset\" | \"credential.placeholder\" | \"saving\" | \"credential.save\" | \"credential.saved\" | \"credential.failed\" | \"credential.hint\"\nexport function createCredentialEditor<K extends string>({ classes: css, keys }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<CredentialCopyKey, K>>\n}) {\n  function CredentialEditor({ credentialRef, status, save, t }: {\n    credentialRef: string\n    status: CredentialStatusMap[string] | undefined\n    save: SaveCredential\n    t: ClientTranslate<K>\n  }) {\n    const id = useId()\n    const [value, setValue] = useState('')\n    const [busy, setBusy] = useState(false)\n    const [outcome, setOutcome] = useState<Outcome>(undefined)\n  \n    const submit = async (): Promise<void> => {\n      const trimmed = value.trim()\n      if (!trimmed) return\n      setBusy(true)\n      setOutcome(undefined)\n      try {\n        await save(credentialRef, trimmed)\n        setValue('')\n        setOutcome({ kind: 'saved' })\n      } catch (error) {\n        setOutcome({ kind: 'failed', message: error instanceof Error ? error.message : String(error) })\n      } finally {\n        setBusy(false)\n      }\n    }\n  \n    const isConfigured = status === 'configured'\n    const isMissing = status === 'missing'\n  \n    return (\n      <div className={css.formField}>\n        <div className={css.fieldHead}>\n          <label className={css.fieldLabel} htmlFor={id}>{t(keys['credential.label'])}</label>\n          {isConfigured ? <Tag tone=\"success\">{t(keys['credential.set'])}</Tag> : null}\n          {isMissing ? <Tag tone=\"warning\">{t(keys['credential.unset'])}</Tag> : null}\n        </div>\n        <div className={css.inline}>\n          <Input\n            id={id}\n            className={css.input as string}\n            type=\"password\"\n            value={value}\n            disabled={busy}\n            placeholder={t(keys['credential.placeholder'])}\n            autoComplete=\"off\"\n            spellCheck={false}\n            aria-label={t(keys['credential.label'])}\n            onChange={event => { setValue(event.target.value) }}\n            onKeyDown={event => {\n              if (event.key === 'Enter' && !event.nativeEvent.isComposing) {\n                event.preventDefault()\n                void submit()\n              }\n            }}\n          />\n          <Button\n            variant=\"outline\"\n            size=\"md\"\n            disabled={busy || value.trim() === ''}\n            onClick={() => { void submit() }}\n          >\n            {busy ? t(keys['saving']) : t(keys['credential.save'])}\n          </Button>\n        </div>\n        {outcome?.kind === 'saved' ? <p className={css.success} role=\"status\">{t(keys['credential.saved'])}</p> : null}\n        {outcome?.kind === 'failed' ? <p className={css.error} role=\"alert\">{outcome.message || t(keys['credential.failed'])}</p> : null}\n        <p className={css.hint}>{t(keys['credential.hint'], { ref: credentialRef })}</p>\n      </div>\n    )\n  }\n  return CredentialEditor\n}\nexport type CredentialEditorComponent<K extends string> = ReturnType<typeof createCredentialEditor<K>>\n","import { isEndpoint } from '../../shared/url.ts'\nimport type { ClientTranslate } from '../command.ts'\n\n/** One optional request option as the forms show it; empty text means the default. */\nexport interface OptionField<K extends string = string> {\n  readonly name: string\n  readonly label: K\n  readonly kind: 'text' | 'url' | 'integer' | 'boolean' | 'enum' | 'list'\n  /** Accepted enum values on this route. */\n  readonly values: readonly string[]\n  /** What a text value, or each item of a list, must match. */\n  readonly pattern?: RegExp\n  readonly min?: number\n  readonly max?: number\n  /** Most items a list holds. */\n  readonly maxItems?: number\n  /** Options that may not be set together with this one (catalog `exclusive`). */\n  readonly exclusive?: readonly string[]\n  /** Localized example or the default value. */\n  readonly placeholder: (t: ClientTranslate<K>) => string | undefined\n  /** A note below the field, such as what a special value means or a unit conversion. */\n  readonly hint?: K\n}\n\n/**\n * A titled subset of an entry's options, such as those some model protocols\n * apply; derived from catalog data (`protocolGroups`).\n */\nexport interface OptionGroup {\n  readonly title: string\n  readonly options: readonly string[]\n}\n\n/** Editor text per field name. */\nexport type FieldTexts = Readonly<Record<string, string>>\n\n/** Editor text of a stored value; empty means the default. A list is one item per line. */\nexport const fieldText = (value: unknown): string => {\n  if (value === undefined || value === null) return ''\n  if (typeof value === 'string') return value\n  if (Array.isArray(value) && value.every(item => typeof item === 'string')) return value.join('\\n')\n  if (typeof value === 'number' || typeof value === 'boolean') return `${value}`\n  return JSON.stringify(value)\n}\n\n/** The items of list text: one per line, blank lines ignored. */\nfunction listLines(text: string): { readonly line: number; readonly item: string }[] {\n  return text.split('\\n').map((raw, index) => ({ line: index + 1, item: raw.trim() })).filter(entry => entry.item !== '')\n}\n\n/** What is wrong with list text: the first line that does not match, or too many items. */\nexport type ListProblem = { readonly kind: 'line'; readonly line: number; readonly item: string } | { readonly kind: 'count'; readonly max: number }\n\nexport function listProblem<K extends string>(field: OptionField<K>, text: string): ListProblem | undefined {\n  const lines = listLines(text)\n  const bad = lines.find(entry => field.pattern !== undefined && !field.pattern.test(entry.item))\n  if (bad !== undefined) return { kind: 'line', line: bad.line, item: bad.item }\n  if (field.maxItems !== undefined && lines.length > field.maxItems) return { kind: 'count', max: field.maxItems }\n  return undefined\n}\n\n/** Whether editor text is acceptable; empty always is. */\nexport function isValidText<K extends string>(field: OptionField<K>, text: string): boolean {\n  if (text === '') return true\n  switch (field.kind) {\n    case 'list': return listProblem(field, text) === undefined\n    case 'enum': return field.values.includes(text)\n    case 'boolean': return text === 'true' || text === 'false'\n    case 'integer': {\n      // Canonical decimal text only: no leading zeros, no \"-0\", no exponent.\n      if (!/^(?:0|-?[1-9]\\d{0,15})$/u.test(text)) return false\n      const num = Number(text)\n      if (!Number.isSafeInteger(num)) return false\n      if (field.min !== undefined && num < field.min) return false\n      if (field.max !== undefined && num > field.max) return false\n      return true\n    }\n    case 'url': return isEndpoint(text)\n    case 'text': return field.pattern === undefined || field.pattern.test(text)\n  }\n}\n\n/** The first other field with a value that this one, when it has a value too, may not be set with. */\nexport function conflictOf<K extends string>(field: OptionField<K>, fields: readonly OptionField<K>[], texts: FieldTexts): OptionField<K> | undefined {\n  const exclusive = field.exclusive\n  if (exclusive === undefined || !isSet(field, texts)) return undefined\n  return fields.find(other => exclusive.includes(other.name) && isSet(other, texts))\n}\n\nfunction isSet<K extends string>(field: OptionField<K>, texts: FieldTexts): boolean {\n  const text = Object.hasOwn(texts, field.name) ? texts[field.name]! : ''\n  return fieldValue(field, text) !== undefined\n}\n\n/** Stored value of valid editor text; undefined returns the option to its default. */\nexport function fieldValue<K extends string>(field: OptionField<K>, text: string): unknown {\n  if (text === '') return undefined\n  switch (field.kind) {\n    case 'boolean': return text === 'true'\n    case 'integer': return Number(text)\n    case 'list': {\n      const items = listLines(text).map(entry => entry.item)\n      return items.length === 0 ? undefined : items\n    }\n    default: return text\n  }\n}\n\n/** Options with every field's text applied; empty text removes the option. Other keys stay. */\nexport function applyFields<K extends string>(fields: readonly OptionField<K>[], texts: FieldTexts, stored: Readonly<Record<string, unknown>>): Record<string, unknown> {\n  const next: Record<string, unknown> = { ...stored }\n  for (const field of fields) {\n    const value = fieldValue(field, texts[field.name] ?? fieldText(stored[field.name]))\n    if (value === undefined) delete next[field.name]\n    else next[field.name] = value\n  }\n  return next\n}\n","/** Optional request options: labelled inputs over editor text, and a self-saving form around them. */\nimport { useState, type KeyboardEvent } from 'react'\nimport { Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ClientTranslate } from '../command.ts'\nimport { conflictOf, fieldText, fieldValue, isValidText, listProblem, type OptionField, type OptionGroup, type FieldTexts } from './fields.ts'\nimport { classNames, type SettingsClasses, type SettingsParts } from './parts.tsx'\n\n/**\n * `options.invalidItem` names a refused list line (`{line}`, `{item}`);\n * `options.invalidLine` is kept for dictionaries that still carry it;\n * `options.exclusive` names the option (`{other}`) that may not be set too.\n */\nexport type OptionsCopyKey = 'options.default' | 'options.invalid' | 'options.invalidLine' | 'options.invalidItem' | 'options.tooMany' | 'options.exclusive' | 'options.on' | 'options.off'\n\n/** How much of a refused list item the error quotes. */\nconst QUOTED_ITEM = 40\n\nexport type { OptionGroup } from './fields.ts'\n\nexport function createOptionsEditor<K extends string>({ classes: css, keys, parts: { SelectMenu }, valueLabel }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<OptionsCopyKey, K>>\n  parts: SettingsParts<K>\n  valueLabel: (value: string, t: ClientTranslate<K>) => string\n}) {\n  /**\n   * A grid of option inputs; empty text means the default. \\`onSettle\\` marks\n   * a finished edit: a choice from a menu at once, typed text on blur or Enter\n   * (a list, typed one item per line, on blur). With \\`groups\\`, options outside\n   * every group come first, then each group under its title. Two options the\n   * catalog declares exclusive are both marked while both have a value.\n   */\n  function OptionFields({ id, fields, groups, texts, disabled, onEdit, onSettle, t }: {\n    id: string\n    fields: readonly OptionField<K>[]\n    groups?: readonly OptionGroup[] | undefined\n    texts: FieldTexts\n    disabled: boolean\n    onEdit: (name: string, text: string) => void\n    onSettle?: (name: string, text: string) => void\n    t: ClientTranslate<K>\n  }) {\n    const grid = (subset: readonly OptionField<K>[]) => (\n      <div className={css.optionGrid}>\n        {subset.map(field => (\n          <OptionInput\n            key={field.name}\n            id={id + '-' + field.name}\n            field={field}\n            text={texts[field.name] ?? ''}\n            conflict={conflictOf(field, fields, texts)}\n            disabled={disabled}\n            t={t}\n            onEdit={text => onEdit(field.name, text)}\n            onSettle={text => onSettle?.(field.name, text)}\n          />\n        ))}\n      </div>\n    )\n    if (groups === undefined) return grid(fields)\n    const grouped = new Set(groups.flatMap(group => group.options))\n    const loose = fields.filter(field => !grouped.has(field.name))\n    return (\n      <>\n        {loose.length === 0 ? null : grid(loose)}\n        {groups.map(group => {\n          const subset = group.options.flatMap(name => fields.filter(field => field.name === name))\n          if (subset.length === 0) return null\n          return (\n            <div key={group.title} className={css.optionGroup} role=\"group\" aria-label={group.title}>\n              <span className={css.optionGroupTitle}>{group.title}</span>\n              {grid(subset)}\n            </div>\n          )\n        })}\n      </>\n    )\n  }\n\n  /** Why the text is refused: a list names its first bad line or its item limit; a valid value names the option it conflicts with. */\n  function problemText(field: OptionField<K>, text: string, conflict: OptionField<K> | undefined, t: ClientTranslate<K>): string | undefined {\n    if (isValidText(field, text)) return conflict === undefined ? undefined : t(keys['options.exclusive'], { other: t(conflict.label) })\n    if (field.kind !== 'list') return t(keys['options.invalid'])\n    const problem = listProblem(field, text)\n    if (problem === undefined) return t(keys['options.invalid'])\n    if (problem.kind === 'count') return t(keys['options.tooMany'], { max: problem.max })\n    const chars = Array.from(problem.item)\n    const item = chars.length > QUOTED_ITEM ? chars.slice(0, QUOTED_ITEM).join('') + '…' : problem.item\n    return t(keys['options.invalidItem'], { line: problem.line, item })\n  }\n\n  function OptionInput({ id, field, text, conflict, disabled, onEdit, onSettle, t }: {\n    id: string\n    field: OptionField<K>\n    text: string\n    /** The option this one may not be set together with, while both have a value. */\n    conflict: OptionField<K> | undefined\n    disabled: boolean\n    onEdit: (text: string) => void\n    onSettle: (text: string) => void\n    t: ClientTranslate<K>\n  }) {\n    const label = t(field.label)\n    const hintId = id + '-hint'\n    const errorId = id + '-error'\n    const hint = field.hint === undefined ? null : <span className={css.hint} id={hintId}>{t(field.hint)}</span>\n    const problem = problemText(field, text, conflict, t)\n    const error = problem === undefined ? null : <span className={css.fieldError} id={errorId}>{problem}</span>\n    // The error, then the hint: what is wrong is read before what the field is for.\n    const describedBy = [problem === undefined ? undefined : errorId, hint === null ? undefined : hintId].filter(part => part !== undefined).join(' ')\n    const description = describedBy === '' ? undefined : describedBy\n\n    if (field.kind === 'list') {\n      return (\n        <div className={classNames(css.option, css.optionWide)}>\n          <label className={css.optionName} htmlFor={id}>{label}</label>\n          <textarea\n            id={id}\n            className={css.textarea}\n            rows={3}\n            value={text}\n            disabled={disabled}\n            aria-invalid={problem !== undefined}\n            aria-describedby={description}\n            spellCheck={false}\n            title={field.name}\n            placeholder={field.placeholder(t) ?? t(keys['options.default'])}\n            onChange={event => { onEdit(event.target.value.trim() === '' ? '' : event.target.value) }}\n            onBlur={() => { onSettle(text) }}\n          />\n          {error}\n          {hint}\n        </div>\n      )\n    }\n\n    if (field.kind === 'text' || field.kind === 'url' || field.kind === 'integer') {\n      const settleOnEnter = (event: KeyboardEvent<HTMLInputElement>) => {\n        if (event.key !== 'Enter' || event.nativeEvent.isComposing) return\n        event.preventDefault()\n        onSettle(text)\n      }\n      return (\n        <div className={css.option}>\n          <label className={css.optionName} htmlFor={id}>{label}</label>\n          <Input\n            id={id}\n            className={css.input as string}\n            type={field.kind === 'url' ? 'url' : 'text'}\n            value={text}\n            disabled={disabled}\n            aria-invalid={problem !== undefined}\n            aria-describedby={description}\n            spellCheck={false}\n            title={field.name}\n            inputMode={field.kind === 'integer' ? 'numeric' : undefined}\n            placeholder={field.placeholder(t) ?? t(keys['options.default'])}\n            onChange={event => { onEdit(event.target.value.trim() === '' ? '' : event.target.value) }}\n            onBlur={() => { onSettle(text) }}\n            onKeyDown={settleOnEnter}\n          />\n          {error}\n          {hint}\n        </div>\n      )\n    }\n\n    // Unset is the service's own default, which the catalog does not claim to know; a boolean is no exception.\n    const choices = field.kind === 'boolean'\n      ? [{ id: 'true', label: t(keys['options.on']) }, { id: 'false', label: t(keys['options.off']) }]\n      : field.values.map(value => ({ id: value, label: valueLabel(value, t) }))\n    return (\n      <div className={css.option}>\n        <span className={css.optionName}>{label}</span>\n        <SelectMenu\n          compact\n          label={label}\n          title={field.name}\n          value={text}\n          disabled={disabled}\n          options={[{ id: '', label: t(keys['options.default']) }, ...choices]}\n          onChange={choice => {\n            onEdit(choice)\n            onSettle(choice)\n          }}\n        />\n        {error}\n        {hint}\n      </div>\n    )\n  }\n\n  /**\n   * Options that save themselves, one path per option: a menu choice at once,\n   * typed text once it settles and is valid. An invalid draft, or one that\n   * conflicts with an exclusive option, stays visible with its error and is not\n   * written; once the conflict is cleared, the held draft saves too.\n   */\n  function OptionsForm({ id, title, hint, fields, groups, stored, disabled, onCommit, t }: {\n    id: string\n    title: string\n    hint: string\n    fields: readonly OptionField<K>[]\n    groups?: readonly OptionGroup[] | undefined\n    stored: Readonly<Record<string, unknown>>\n    disabled: boolean\n    /** Settled option changes, written atomically under one settings revision. */\n    onCommit: (changes: Readonly<Record<string, unknown>>) => Promise<boolean>\n    t: ClientTranslate<K>\n  }) {\n    const [drafts, setDrafts] = useState<Record<string, string>>({})\n    if (fields.length === 0) return null\n    const texts: FieldTexts = Object.fromEntries(fields.map(field => [field.name, drafts[field.name] ?? fieldText(stored[field.name])]))\n\n    const settle = async (name: string, text: string): Promise<void> => {\n      const field = fields.find(candidate => candidate.name === name)\n      if (!field) return\n      const current = { ...texts, [name]: text }\n      const valid = (candidate: OptionField<K>) => isValidText(candidate, current[candidate.name]!) && conflictOf(candidate, fields, current) === undefined\n      if (!valid(field)) return\n      // Clearing one option can release a held draft. Validate and write both\n      // together, never through successive writes using the same old revision.\n      const released = fields.filter(candidate => field.exclusive?.includes(candidate.name) && Object.hasOwn(drafts, candidate.name) && valid(candidate))\n      const settled = [field, ...released]\n      const changes = Object.fromEntries(settled\n        .map(candidate => [candidate.name, fieldValue(candidate, current[candidate.name]!)] as const)\n        .filter(([option, value]) => fieldText(value) !== fieldText(stored[option])))\n      if (Object.keys(changes).length > 0 && !await onCommit(changes)) return\n      const names = new Set(settled.map(candidate => candidate.name))\n      setDrafts(previous => Object.fromEntries(Object.entries(previous).filter(([option]) => !names.has(option))))\n    }\n    return (\n      <div className={css.field}>\n        <div className={css.fieldHead}><span className={css.fieldLabel}>{title}</span></div>\n        <OptionFields\n          id={id}\n          fields={fields}\n          groups={groups}\n          texts={texts}\n          disabled={disabled}\n          t={t}\n          onEdit={(name, text) => { setDrafts(current => ({ ...current, [name]: text })) }}\n          onSettle={(name, text) => { void settle(name, text) }}\n        />\n        <p className={css.hint}>{hint}</p>\n      </div>\n    )\n  }\n  return { OptionFields, OptionsForm }\n}\nexport type OptionsEditor<K extends string> = ReturnType<typeof createOptionsEditor<K>>\n","/**\n * Read-only facts a settings page derives from a validated document and its\n * capability's catalog. Everything is keyed by the catalog, so a new catalog\n * entry appears on the page without page code naming it.\n */\nimport { builtinId, builtinKey, CUSTOM_CONNECTION_ID, type AccessMode, type Descriptor, type ExclusiveOptions, type OptionRule, type ProtocolDescriptor } from '../../shared/connections.ts'\nimport { singleLine, type BuiltinOverride, type CustomConnection, type SettingsDescriptor } from '../../shared/settings.ts'\nexport type { CustomConnection, CustomAdapterConnection, CustomModelConnection } from '../../shared/settings.ts'\nimport type { OptionField, OptionGroup } from './fields.ts'\n\n/** A capability catalog; key order is display order. */\nexport type SettingsCatalog = Readonly<Record<string, SettingsDescriptor>>\n\n/** Catalog keys of adapter entries: the formats a custom connection can use. */\nexport type AdapterKeyOf<T extends SettingsCatalog> = { [Key in keyof T]: T[Key]['kind'] extends 'adapter' ? Key : never }[keyof T] & string\n\n/** The document fields these helpers read; both capability documents have them. */\nexport interface CatalogSettings {\n  readonly defaultConnection?: string | undefined\n  readonly connections?: Readonly<Record<string, unknown>> | undefined\n}\n\nexport interface Choice { readonly id: string; readonly label: string }\n\n/** Locale keys for one option: its label, an optional placeholder and an optional hint shown below the field. */\nexport interface OptionCopy<K extends string> { readonly label: K; readonly placeholder?: K; readonly hint?: K }\n\n/** A plugin's copy for the options of one catalog entry. */\nexport interface OptionCopyTable<K extends string> {\n  readonly options: Readonly<Partial<Record<string, OptionCopy<K>>>>\n  /** Label of an option that has no copy of its own yet. */\n  readonly fallback: K\n}\n\n/** The entry of a key taken from the same catalog. */\nexport function catalogEntry<T extends SettingsCatalog>(catalog: T, key: keyof T & string): SettingsDescriptor {\n  const info = catalog[key]\n  if (info === undefined) throw new Error('unknown catalog key ' + key)\n  return info\n}\n\nexport function adapterKeys<T extends SettingsCatalog>(catalog: T): AdapterKeyOf<T>[] {\n  return Object.entries(catalog).filter(([, info]) => info.kind === 'adapter').map(([key]) => key as AdapterKeyOf<T>)\n}\n\n/** A built-in entry's override as stored, its label on one line as the grammar reads it. */\nexport function builtinOverride(config: CatalogSettings, key: string): BuiltinOverride {\n  const stored = config.connections === undefined ? undefined : config.connections[builtinId(key)] as BuiltinOverride | undefined\n  if (stored === undefined) return {}\n  return stored.label === undefined ? stored : { ...stored, label: singleLine(stored.label) }\n}\n\n/** Custom connections in document order, labels on one line; the document has passed the capability's validation. */\nexport function customConnections<A extends string = string, P extends string = string>(config: CatalogSettings): [string, CustomConnection<A, P>][] {\n  if (config.connections === undefined) return []\n  return Object.entries(config.connections)\n    .filter(([id]) => CUSTOM_CONNECTION_ID.test(id))\n    .map(([id, stored]) => {\n      const connection = stored as CustomConnection<A, P>\n      return [id, { ...connection, label: singleLine(connection.label) }]\n    })\n}\n\n/**\n * The access an operator configures for a built-in entry: one of its routes,\n * or `none` when the catalog offers neither a keyless nor an API-key route\n * (the entry takes its route and credentials from the Session model).\n */\nexport type BuiltinAccess = AccessMode | 'none'\n\n/** Built-in connections default to the anonymous route where one exists. */\nexport function builtinAccess(info: Descriptor, override: BuiltinOverride): BuiltinAccess {\n  if (info.access.keyless) return override.access ?? 'keyless'\n  return info.access.apiKey ? 'api-key' : 'none'\n}\n\n/** The credential a built-in connection resolves on its API-key route, and the catalog's name for it. */\nexport interface BuiltinCredential {\n  readonly ref: string\n  readonly catalogRef: string\n}\n\n/** Undefined for an entry without an API-key route. */\nexport function builtinCredential(info: Descriptor, override: BuiltinOverride): BuiltinCredential | undefined {\n  if (!info.access.apiKey) return undefined\n  const catalogRef = info.access.apiKey.credentialRef\n  return { ref: override.credentialRef ?? catalogRef, catalogRef }\n}\n\n/** Every credential the page reports on: each catalog entry with API-key access and every custom connection. */\nexport function credentialRefs(catalog: SettingsCatalog, config: CatalogSettings): string[] {\n  const builtin = Object.entries(catalog).flatMap(([key, info]) => {\n    const credential = builtinCredential(info, builtinOverride(config, key))\n    return credential === undefined ? [] : [credential.ref]\n  })\n  const custom = customConnections(config).map(([, connection]) => connection.credentialRef)\n  return [...new Set([...builtin, ...custom])]\n}\n\n/** Connections a default can name: the catalog in order, then custom connections. */\nexport function connectionChoices<C extends string>(catalog: Readonly<Record<C, SettingsDescriptor>>, config: CatalogSettings, catalogLabel: (key: C) => string): Choice[] {\n  return [\n    ...(Object.keys(catalog) as C[]).map(key => ({ id: builtinId(key), label: builtinOverride(config, key).label ?? catalogLabel(key) })),\n    ...customConnections(config).map(([id, connection]) => ({ id, label: connection.label })),\n  ]\n}\n\n/** Display name of any connection id; an id that names nothing is shown as is. */\nexport function connectionName<C extends string>(catalog: Readonly<Record<C, SettingsDescriptor>>, config: CatalogSettings, id: string, catalogLabel: (key: C) => string): string {\n  const key = builtinKey(id)\n  if (key !== undefined && Object.hasOwn(catalog, key)) return builtinOverride(config, key).label ?? catalogLabel(key as C)\n  const custom = customConnections(config).find(([candidate]) => candidate === id)\n  return custom === undefined ? id : custom[1].label\n}\n\n/**\n * Editable fields for a catalog entry's option rules. The keyless route drops\n * options it rejects and narrows enums it limits; `restricted` reports either.\n * A list option is edited one item per line; a plugin editor that owns it\n * (`ExtraEditor.options`) takes it over.\n */\nexport function catalogFields<K extends string>(rules: Readonly<Record<string, OptionRule>>, access: AccessMode, copy: OptionCopyTable<K>, exclusive: readonly ExclusiveOptions[] = []): { fields: OptionField<K>[]; restricted: boolean } {\n  const fields: OptionField<K>[] = []\n  let restricted = false\n  for (const [name, rule] of Object.entries(rules)) {\n    const scope: KeylessScope = access === 'keyless' ? keylessScope(rule) : { kind: 'all' }\n    if (scope.kind === 'none') {\n      restricted = true\n      continue\n    }\n    let values: readonly string[] = []\n    if (rule.kind === 'enum') {\n      values = scope.kind === 'values' ? scope.values : rule.values\n      if (values.length < rule.values.length) restricted = true\n    }\n    const optionCopy = copy.options[name]\n    const placeholder = optionCopy === undefined ? undefined : optionCopy.placeholder\n    fields.push({\n      name,\n      label: optionCopy === undefined ? copy.fallback : optionCopy.label,\n      kind: rule.kind,\n      values,\n      placeholder: t => placeholder === undefined ? undefined : t(placeholder),\n      ...(optionCopy?.hint === undefined ? {} : { hint: optionCopy.hint }),\n      ...(rule.kind === 'text' ? { pattern: rule.pattern } : {}),\n      ...(rule.kind === 'integer' ? { min: rule.min, max: rule.max } : {}),\n      ...(rule.kind === 'list' ? { pattern: rule.pattern, maxItems: rule.max } : {}),\n      ...exclusiveWith(name, exclusive),\n    })\n  }\n  return { fields, restricted }\n}\n\n/**\n * The options of several protocols, grouped by the protocols that apply them:\n * one group per distinct set, in order of first appearance, titled with those\n * protocols' labels. An entry that takes every protocol's options (one that\n * follows the Session model) shows which apply where.\n */\nexport function protocolGroups(protocols: Readonly<Record<string, ProtocolDescriptor>>): OptionGroup[] {\n  const entries = Object.values(protocols)\n  const groups = new Map<string, { title: string; options: string[] }>()\n  for (const option of new Set(entries.flatMap(entry => Object.keys(entry.options)))) {\n    const title = entries.filter(entry => Object.hasOwn(entry.options, option)).map(entry => entry.label).join(' / ')\n    const group = groups.get(title)\n    if (group === undefined) groups.set(title, { title, options: [option] })\n    else group.options.push(option)\n  }\n  return [...groups.values()]\n}\n\n/** The options an option is declared exclusive with; nothing when it has none. */\nfunction exclusiveWith(name: string, exclusive: readonly ExclusiveOptions[]): { exclusive?: readonly string[] } {\n  const others = exclusive.flatMap(([first, second]) => first === name ? [second] : second === name ? [first] : [])\n  return others.length === 0 ? {} : { exclusive: others }\n}\n\n/** What the keyless route accepts of one option: all of it, nothing, or only some enum values. */\ntype KeylessScope = { readonly kind: 'all' } | { readonly kind: 'none' } | { readonly kind: 'values'; readonly values: readonly string[] }\n\nfunction keylessScope(rule: OptionRule): KeylessScope {\n  if (rule.kind === 'list' || rule.keyless === undefined) return { kind: 'all' }\n  if (rule.keyless === false) return { kind: 'none' }\n  return { kind: 'values', values: rule.keyless }\n}\n\n/** Names of stored options the keyless route rejects, by the rule {@link catalogFields} applies. */\nexport function keylessRejected(rules: Readonly<Record<string, OptionRule>>, stored: Readonly<Record<string, unknown>>): string[] {\n  return Object.keys(stored).filter(name => {\n    const rule = Object.hasOwn(rules, name) ? rules[name] : undefined\n    if (rule === undefined) return false\n    const scope = keylessScope(rule)\n    return scope.kind === 'none' || (scope.kind === 'values' && !scope.values.some(value => value === stored[name]))\n  })\n}\n","/** Per-connection editors every built-in connection gets from its catalog facts. */\nimport { useId, useState, type KeyboardEvent } from 'react'\nimport { Input, Switch } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { CREDENTIAL_REF } from '../../shared/connections.ts'\nimport type { BuiltinOverride } from '../../shared/settings.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport { isValidText, type OptionField } from './fields.ts'\nimport type { SettingsClasses, SettingsDoc, SettingsParts, WriteSettings } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\n\nexport type ServiceFieldsCopyKey = 'credential.reference' | 'credential.referenceHint' | 'services.trust' | 'services.trustUnsaved' | 'options.invalid' | 'options.default'\n\nconst onEnter = (commit: () => void) => (event: KeyboardEvent<HTMLInputElement>) => {\n  if (event.key !== 'Enter' || event.nativeEvent.isComposing) return\n  event.preventDefault()\n  commit()\n}\n\nexport function createServiceFields<K extends string>({ classes: css, keys, parts: { ErrorText, useWrite }, sparse }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<ServiceFieldsCopyKey, K>>\n  parts: SettingsParts<K>\n  sparse: SparseSettings\n}) {\n  interface FieldProps {\n    connectionId: string\n    doc: SettingsDoc\n    write: WriteSettings\n    disabled: boolean\n    t: ClientTranslate<K>\n  }\n\n  /** The DSH Credentials name the API-key route resolves; empty returns to the catalog's name. */\n  function CredentialRefField({ connectionId, credentialRef, catalogRef, doc, write, disabled, t }: FieldProps & {\n    credentialRef: string\n    catalogRef: string\n  }) {\n    const id = useId()\n    const [draft, setDraft] = useState<string | undefined>(undefined)\n    const action = useWrite(t)\n    const text = draft === undefined ? credentialRef : draft\n    const valid = text === '' || CREDENTIAL_REF.test(text)\n\n    const commit = async (): Promise<void> => {\n      if (!valid || text === credentialRef) return\n      const ops = sparse.sparseSettingOperations(doc.layers, ['connections', connectionId, 'credentialRef'], text === '' ? undefined : text, catalogRef)\n      if (await action.run(() => write(ops))) setDraft(undefined)\n    }\n\n    return (\n      <div className={css.formField}>\n        <label className={css.fieldLabel} htmlFor={id}>{t(keys['credential.reference'])}</label>\n        <Input\n          id={id}\n          className={css.input as string}\n          value={text}\n          placeholder={catalogRef}\n          disabled={disabled || action.busy}\n          aria-invalid={!valid}\n          autoComplete=\"off\"\n          spellCheck={false}\n          onChange={event => { setDraft(event.target.value) }}\n          onBlur={() => { void commit() }}\n          onKeyDown={onEnter(() => { void commit() })}\n        />\n        <p className={css.hint}>{t(keys['credential.referenceHint'])}</p>\n        {valid ? null : <p className={css.fieldError}>{t(keys['options.invalid'])}</p>}\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n      </div>\n    )\n  }\n\n  /**\n   * A URL option such as a native base URL. A value other than the catalog\n   * endpoint is written only together with `trustedEndpoint: true`, and only\n   * after the trust switch was turned on for that very address: a stored trust\n   * covers the stored address, not a new one typed over it. Turning an active\n   * trust off revokes it for the whole connection and returns every URL option\n   * to the official endpoint in the same write.\n   */\n  function UrlOptionField({ connectionId, field, official, override, urlOptions, doc, write, disabled, t }: FieldProps & {\n    field: OptionField<K>\n    official: string | undefined\n    override: BuiltinOverride\n    /** Names of every URL option of this connection. */\n    urlOptions: readonly string[]\n  }) {\n    const id = useId()\n    const stored = override.options === undefined ? {} : override.options\n    const storedText = textOf(stored, field.name)\n    const storedTrust = override.trustedEndpoint === true\n    const [urlDraft, setUrlDraft] = useState<string | undefined>(undefined)\n    /** The address the switch was turned on for in this edit. */\n    const [confirmed, setConfirmed] = useState<string | undefined>(undefined)\n    const action = useWrite(t)\n\n    const url = urlDraft === undefined ? storedText : urlDraft\n    const valid = isValidText(field, url)\n    const differs = (text: string) => text !== '' && text !== official\n    const needsTrust = differs(url)\n    const trusted = url === confirmed || (url === storedText && storedTrust)\n    const othersNeedTrust = urlOptions.some(name => name !== field.name && differs(textOf(stored, name)))\n    const path = ['connections', connectionId]\n\n    const settled = (accepted: boolean) => {\n      if (!accepted) return\n      setUrlDraft(undefined)\n      setConfirmed(undefined)\n    }\n\n    /** Store the address with the trust it needs; an unconfirmed other address stays a draft. */\n    const save = async (trust: boolean): Promise<void> => {\n      if (!valid || (needsTrust && !trust)) return\n      const ops = [\n        ...sparse.sparseSettingOperations(doc.layers, [...path, 'options', field.name], url === '' ? official : url, official),\n        ...sparse.sparseSettingOperations(doc.layers, [...path, 'trustedEndpoint'], needsTrust || othersNeedTrust, false),\n      ]\n      settled(await action.run(() => write(ops)))\n    }\n\n    const revoke = async (): Promise<void> => {\n      const ops = [\n        ...urlOptions.flatMap(name => differs(textOf(stored, name)) ? sparse.sparseSettingOperations(doc.layers, [...path, 'options', name], official, official) : []),\n        ...sparse.sparseSettingOperations(doc.layers, [...path, 'trustedEndpoint'], false, false),\n      ]\n      settled(await action.run(() => write(ops)))\n    }\n\n    const toggle = (on: boolean) => {\n      if (on) {\n        setConfirmed(url)\n        void save(true)\n      } else if (storedTrust && url === storedText) {\n        void revoke()\n      } else {\n        setConfirmed(undefined)\n      }\n    }\n\n    return (\n      <div className={css.formField}>\n        <label className={css.fieldLabel} htmlFor={id}>{t(field.label)}</label>\n        <Input\n          id={id}\n          className={css.input as string}\n          type=\"url\"\n          value={url}\n          placeholder={official === undefined ? t(keys['options.default']) : official}\n          title={field.name}\n          disabled={disabled || action.busy}\n          aria-invalid={!valid}\n          spellCheck={false}\n          onChange={event => { setUrlDraft(event.target.value.trim() === '' ? '' : event.target.value) }}\n          onBlur={() => { void save(trusted) }}\n          onKeyDown={onEnter(() => { void save(trusted) })}\n        />\n        {valid ? null : <p className={css.fieldError}>{t(keys['options.invalid'])}</p>}\n        {needsTrust ? (\n          <div className={css.inline}>\n            <Switch\n              checked={trusted}\n              disabled={disabled || action.busy}\n              label={t(keys['services.trust'])}\n              onChange={toggle}\n            />\n            <span className={css.hint}>{t(keys['services.trust'])}</span>\n          </div>\n        ) : null}\n        {needsTrust && valid && !trusted ? <p className={css.fieldError}>{t(keys['services.trustUnsaved'])}</p> : null}\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n      </div>\n    )\n  }\n\n  return { CredentialRefField, UrlOptionField }\n}\n\nfunction textOf(options: Readonly<Record<string, unknown>>, name: string): string {\n  const value = Object.hasOwn(options, name) ? options[name] : undefined\n  return typeof value === 'string' ? value : ''\n}\n","/**\n * Catalog-driven built-in connection controls. Every entry gets its access\n * switch, credential, URL options with endpoint trust and a self-saving option\n * form from its catalog facts; a plugin registers extra editors by catalog key.\n * An entry without an access route of its own (a `model` entry following the\n * Session model) gets only its switch and options; its plugin says who\n * receives the query in the entry's summary and note.\n */\nimport { useId, useState, type ComponentType } from 'react'\nimport { Button, IconChevronDownOutlineRegular, IconRightUpOutlineRegular, SegmentedControl, StateDot, Switch, Tag, type StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { builtinId, type AccessMode } from '../../shared/connections.ts'\nimport type { SettingsDescriptor } from '../../shared/settings.ts'\nimport type { CredentialStatusMap } from '../credentials.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport type { CredentialEditorComponent, SaveCredential } from './CredentialEditor.tsx'\nimport type { OptionGroup, OptionsEditor } from './OptionsEditor.tsx'\nimport { builtinAccess, builtinCredential, builtinOverride, catalogFields, keylessRejected, type BuiltinAccess, type CatalogSettings, type OptionCopyTable } from './model.ts'\nimport { effectiveDocument } from './document.ts'\nimport { applyOps, classNames, type SettingsClasses, type SettingsParts, type SettingsDoc, type WriteSettings } from './parts.tsx'\nimport { createServiceFields, type ServiceFieldsCopyKey } from './ServiceFields.tsx'\nimport type { SettingsLayers, SparseSettings } from './sparse.ts'\n\n/**\n * Configuration only, not service health or a conversation's account\n * availability; only an API-key route needs something here. An entry without\n * an access route has nothing on this page to configure: neutral, not done.\n */\nexport function configurationState(enabled: boolean, access: BuiltinAccess, status: string | undefined): StateDotState {\n  if (!enabled || access === 'none') return 'idle'\n  if (access === 'keyless' || status === 'configured') return 'done'\n  return 'warning'\n}\n\nexport interface ExtraEditorProps<S, K extends string> {\n  doc: SettingsDoc<S>\n  write: WriteSettings\n  disabled: boolean\n  t: ClientTranslate<K>\n}\n\n/** A capability's own editor for one catalog entry. */\nexport interface ExtraEditor<S, K extends string> {\n  /** Options this editor owns; the shared option form leaves them out. */\n  readonly options: readonly string[]\n  readonly Editor: ComponentType<ExtraEditorProps<S, K>>\n}\n\nexport type ServicesCopyKey = ServiceFieldsCopyKey | \"services.title\" | \"services.optInNotice\" | \"options.hint\" | \"options.keylessMore\" | \"services.remoteNotice\" | \"services.off\" | \"services.configureLabel\" | \"services.configure\" | \"services.enable\" | \"services.access\" | \"services.accessKeyless\" | \"services.accessPersonal\" | \"services.accessHint.keyless\" | \"services.accessHint.apiKey\" | \"services.accountHint\" | \"services.getKey\" | \"options.title\" | \"services.keyless\" | \"services.account\" | \"services.personalKey\" | \"credential.set\" | \"credential.unset\"\nexport function createServicesSection<S extends CatalogSettings, C extends string, K extends string>({\n  classes: css, keys, parts, CredentialEditor, optionsEditor: { OptionsForm }, sparse,\n  catalog, optionCopy, label, notes = {}, summaries = {}, optionGroups = {}, extras = {},\n}: {\n  classes: SettingsClasses\n  keys: Readonly<Record<ServicesCopyKey, K>>\n  parts: SettingsParts<K>\n  CredentialEditor: CredentialEditorComponent<K>\n  optionsEditor: OptionsEditor<K>\n  sparse: SparseSettings\n  catalog: Readonly<Record<C, SettingsDescriptor>>\n  /** Copy for the options of each catalog entry. */\n  optionCopy: (key: C) => OptionCopyTable<K>\n  label?: (key: C, t: ClientTranslate<K>) => string\n  /** A plain note per entry, such as how a remote service caches or keeps what it receives, or who receives the query of an entry without a catalog endpoint. */\n  notes?: { readonly [Key in C]?: K }\n  /** A fixed row summary per entry in place of the access summary, such as how a local connection reaches pages; an entry without an access route needs one. */\n  summaries?: { readonly [Key in C]?: K }\n  /** Titled option groups per entry, such as the options each model protocol applies. */\n  optionGroups?: { readonly [Key in C]?: readonly OptionGroup[] }\n  extras?: { readonly [Key in C]?: ExtraEditor<S, K> }\n}) {\n  const { Section, ErrorText, useWrite } = parts\n  const { CredentialRefField, UrlOptionField } = createServiceFields({ classes: css, keys, parts, sparse })\n\n  interface ServiceProps {\n    doc: SettingsDoc<S>\n    write: WriteSettings\n    credentials: CredentialStatusMap\n    saveCredential: SaveCredential\n    t: ClientTranslate<K>\n  }\n\n  function ServicesSection(props: ServiceProps) {\n    const catalogKeys = Object.keys(catalog) as C[]\n    // Said once for the list; each panel names its own recipient.\n    const optIn = catalogKeys.some(key => catalog[key].optIn)\n    return (\n      <Section title={props.t(keys['services.title'])}>\n        {optIn ? <p className={css.note}>{props.t(keys['services.optInNotice'])}</p> : null}\n        <ul className={css.list}>\n          {catalogKeys.map(key => <ServiceRow key={key} catalogKey={key} {...props} />)}\n        </ul>\n      </Section>\n    )\n  }\n\n  function ServiceRow({ catalogKey, doc, write, credentials, saveCredential, t }: ServiceProps & { catalogKey: C }) {\n    const id = useId()\n    const [open, setOpen] = useState(false)\n    const action = useWrite(t)\n\n    const info = catalog[catalogKey]\n    const connectionId = builtinId(catalogKey)\n    const override = builtinOverride(doc.config, catalogKey)\n    const name = override.label ?? (label === undefined ? info.label : label(catalogKey, t))\n    const access = builtinAccess(info, override)\n    // The route options are checked on; without an access route of its own nothing narrows an entry's options.\n    const route: AccessMode = access === 'keyless' ? 'keyless' : 'api-key'\n    const credential = builtinCredential(info, override)\n    const credentialRef = credential === undefined ? undefined : credential.ref\n    const credentialStatus = credentialRef === undefined ? undefined : credentials[credentialRef]\n    // Without an override of its own, an entry is as the catalog starts it: a remote service is off.\n    const enabled = !(override.disabled ?? info.optIn)\n    const disabled = !doc.editable || action.busy\n\n    // Each write is computed on the document the page's earlier writes left, not on this render's.\n    const operations = (layers: SettingsLayers, path: string[], target: unknown, fallback?: unknown) =>\n      sparse.sparseSettingOperations(layers, ['connections', connectionId, ...path], target, fallback)\n    const save = (path: string[], target: unknown, fallback?: unknown) => action.run(() => write(layers => operations(layers, path, target, fallback)))\n    const stored = override.options === undefined ? {} : override.options\n    const saveOptions = (changes: Readonly<Record<string, unknown>>) => action.run(() => write(initial => {\n      let layers = initial\n      return Object.entries(changes).flatMap(([option, value]) => {\n        const next = sparse.sparseSettingOperations(layers, ['connections', connectionId, 'options', option], value)\n        // A sparse unset may prune an empty parent; subsequent paths must see\n        // that change before this one atomic write is validated and submitted.\n        layers = { ...layers, user: applyOps(layers.user, next) }\n        return next\n      })\n    }))\n\n    /**\n     * The keyless route takes only the options it accepts; the rest go in the\n     * same write. Which ones those are is read from the layers the write runs\n     * on: options changed while it waited stay as they are now.\n     */\n    const switchAccess = (next: AccessMode) => {\n      if (next === 'api-key') return save(['access'], next, 'keyless')\n      return action.run(() => write(layers => {\n        const current = builtinOverride(effectiveDocument(layers), catalogKey).options\n        const options = current === undefined ? {} : current\n        const rejected = keylessRejected(info.options, options)\n        const kept = Object.fromEntries(Object.entries(options).filter(([option]) => !rejected.includes(option)))\n        return [\n          ...operations(layers, ['access'], next, 'keyless'),\n          ...(rejected.length === 0 ? [] : operations(layers, ['options'], Object.keys(kept).length === 0 ? undefined : kept)),\n        ]\n      }))\n    }\n\n    const note = notes[catalogKey]\n    const extra = extras[catalogKey]\n    const owned: readonly string[] = extra === undefined ? [] : extra.options\n    const options = catalogFields(info.options, route, optionCopy(catalogKey), info.exclusive)\n    const shared = options.fields.filter(field => !owned.includes(field.name))\n    const urlFields = shared.filter(field => field.kind === 'url')\n    const formFields = shared.filter(field => field.kind !== 'url')\n    const optionsHint = t(keys['options.hint']) + (options.restricted ? ' ' + t(keys['options.keylessMore']) : '')\n\n    // The catalog service receives the query at its own endpoint; without one, the plugin's note names the recipient.\n    const remoteNoticeText = info.remote && info.endpoint !== undefined ? t(keys['services.remoteNotice'], { name }) : undefined\n    // The summary stays short; who receives what is said once, in the panel.\n    const summary = summaries[catalogKey]\n    const summaryText = summary === undefined ? accessSummary(info, access, credentialRef, credentialStatus, t) : t(summary)\n\n    return (\n      <li className={css.row}>\n        <div className={css.rowLine}>\n          <StateDot state={configurationState(enabled, access, credentialStatus)} />\n          <div className={css.rowMain}>\n            <span className={css.rowTitle}>\n              {name}\n              {enabled ? null : <Tag tone=\"neutral\">{t(keys['services.off'])}</Tag>}\n            </span>\n            <span className={css.rowMeta}>{summaryText}</span>\n          </div>\n          <div className={css.rowActions}>\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              className={css.disclosure}\n              aria-expanded={open}\n              aria-controls={id}\n              aria-label={t(keys['services.configureLabel'], { name })}\n              onClick={() => { setOpen(!open) }}\n            >\n              {t(keys['services.configure'])}\n              <IconChevronDownOutlineRegular className={classNames(css.disclosureIcon, open && css.disclosureOpen)} />\n            </Button>\n            <Switch\n              checked={enabled}\n              label={t(keys['services.enable'], { name })}\n              disabled={disabled}\n              onChange={next => void save(['disabled'], !next, info.optIn)}\n            />\n          </div>\n        </div>\n        {open ? null : <ErrorText title={action.errorTitle}>{action.error}</ErrorText>}\n        {open ? (\n          <div className={css.panel} id={id}>\n            {remoteNoticeText ? <p className={css.note}>{remoteNoticeText}</p> : null}\n            {note === undefined ? null : <p className={css.note}>{t(note)}</p>}\n            {info.access.keyless && info.access.apiKey ? (\n              <div className={css.field}>\n                <span className={css.fieldLabel}>{t(keys['services.access'])}</span>\n                <SegmentedControl<AccessMode>\n                  id={id + '-access'}\n                  className={css.segmented}\n                  label={t(keys['services.access'])}\n                  value={route}\n                  disabled={disabled}\n                  options={[\n                    { value: 'keyless', label: t(keys['services.accessKeyless']) },\n                    { value: 'api-key', label: t(keys['services.accessPersonal']) },\n                  ]}\n                  onChange={next => void switchAccess(next)}\n                />\n                <p className={css.hint}>{t(keys[access === 'keyless' ? 'services.accessHint.keyless' : 'services.accessHint.apiKey'])}</p>\n              </div>\n            ) : null}\n            {info.access.account ? <p className={css.note}>{t(keys['services.accountHint'])}</p> : null}\n            {access === 'api-key' && credential !== undefined ? (\n              <>\n                <CredentialRefField\n                  connectionId={connectionId}\n                  credentialRef={credential.ref}\n                  catalogRef={credential.catalogRef}\n                  doc={doc}\n                  write={write}\n                  disabled={disabled}\n                  t={t}\n                />\n                <CredentialEditor credentialRef={credential.ref} status={credentialStatus} save={saveCredential} t={t} />\n                {info.homepage ? (\n                  <a className={css.link} href={info.homepage} target=\"_blank\" rel=\"noopener noreferrer\">\n                    {t(keys['services.getKey'])}\n                    <IconRightUpOutlineRegular size={12} />\n                  </a>\n                ) : null}\n              </>\n            ) : null}\n            {extra === undefined ? null : <extra.Editor doc={doc} write={write} disabled={disabled} t={t} />}\n            {urlFields.map(field => (\n              <UrlOptionField\n                key={field.name}\n                connectionId={connectionId}\n                field={field}\n                official={info.endpoint}\n                override={override}\n                urlOptions={urlFields.map(candidate => candidate.name)}\n                doc={doc}\n                write={write}\n                disabled={disabled}\n                t={t}\n              />\n            ))}\n            {formFields.length === 0 && options.restricted ? <p className={css.hint}>{t(keys['options.keylessMore'])}</p> : null}\n            <OptionsForm\n              key={access}\n              id={id + '-options'}\n              title={t(keys['options.title'])}\n              hint={optionsHint}\n              fields={formFields}\n              groups={optionGroups[catalogKey]}\n              stored={stored}\n              disabled={disabled}\n              t={t}\n              onCommit={saveOptions}\n            />\n            {/* With the panel open, a refused write is reported after the fields it most likely came from. */}\n            <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n          </div>\n        ) : null}\n      </li>\n    )\n  }\n\n  function accessSummary(info: SettingsDescriptor, access: BuiltinAccess, ref: string | undefined, status: string | undefined, t: ClientTranslate<K>): string {\n    if (access === 'none') return ''\n    if (access === 'keyless' || ref === undefined) return t(keys['services.keyless'])\n    const route = t(keys[info.access.account ? 'services.account' : 'services.personalKey'], { ref })\n    if (status === 'configured') return route + ' · ' + t(keys['credential.set'])\n    if (status === 'missing') return route + ' · ' + t(keys['credential.unset'])\n    return route\n  }\n  return ServicesSection\n}\n","import { useState } from 'react'\nimport { Button, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PairingsState } from '../pairings.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsClasses, SettingsParts } from './parts.tsx'\nexport type PairingsCopyKey = \"pairings.forgetFailed\" | \"pairings.title\" | \"pairings.hint\" | \"pairings.failed\" | \"pairings.loading\" | \"pairings.empty\" | \"connection.off\" | \"saving\" | \"pairings.forget\"\nexport function createPairingsSection<S, K extends string>({ classes: css, keys, parts: { Section, ErrorText }, formatConnectionName }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<PairingsCopyKey, K>>\n  parts: SettingsParts<K>\n  formatConnectionName: (id: string, config: S, t: ClientTranslate<K>) => string\n}) {\n  function PairingsSection({\n    pairingsState,\n    config,\n    forgetPairing,\n    t,\n  }: {\n    pairingsState: PairingsState\n    config: S\n    forgetPairing: (provider: string, model: string) => Promise<void>\n    t: ClientTranslate<K>\n  }) {\n    const [busyKeys, setBusyKeys] = useState<ReadonlySet<string>>(new Set())\n    const [error, setError] = useState<string | undefined>(undefined)\n  \n    const handleForget = async (provider: string, model: string) => {\n      const key = `${provider}:${model}`\n      setBusyKeys(prev => new Set(prev).add(key))\n      setError(undefined)\n      try {\n        await forgetPairing(provider, model)\n      } catch {\n        setError(t(keys['pairings.forgetFailed']))\n      } finally {\n        setBusyKeys(prev => {\n          const next = new Set(prev)\n          next.delete(key)\n          return next\n        })\n      }\n    }\n  \n    const items = pairingsState.state === 'ready' ? pairingsState.pairings : []\n  \n    return (\n      <Section title={t(keys['pairings.title'])}>\n        <p className={css.hint}>{t(keys['pairings.hint'])}</p>\n        <ErrorText>{error}</ErrorText>\n        {pairingsState.state === 'failed' ? (\n          <ErrorText title={pairingsState.message}>{t(keys['pairings.failed'])}</ErrorText>\n        ) : pairingsState.state === 'loading' ? (\n          <p className={css.status} role=\"status\">\n            <StateDot state=\"ongoing\" />\n            {t(keys['pairings.loading'])}\n          </p>\n        ) : items.length === 0 ? (\n          <p className={css.empty}>{t(keys['pairings.empty'])}</p>\n        ) : (\n          <ul className={css.list}>\n            {items.map(pairing => {\n              const itemKey = `${pairing.provider}:${pairing.model}`\n              const isBusy = busyKeys.has(itemKey)\n              const targetText = pairing.connectionId === null\n                ? t(keys['connection.off'])\n                : formatConnectionName(pairing.connectionId, config, t)\n  \n              return (\n                <li key={itemKey} className={css.row}>\n                  <div className={css.rowLine}>\n                    <StateDot state={pairing.connectionId === null ? 'idle' : 'done'} />\n                    <div className={css.rowMain}>\n                      <span className={css.rowTitle}>\n                        {pairing.provider} / {pairing.model}\n                      </span>\n                      <span className={css.rowMeta}>{targetText}</span>\n                    </div>\n                    <div className={css.rowActions}>\n                      <Button\n                        variant=\"ghost\"\n                        size=\"sm\"\n                        disabled={isBusy}\n                        onClick={() => { void handleForget(pairing.provider, pairing.model) }}\n                      >\n                        {isBusy ? t(keys['saving']) : t(keys['pairings.forget'])}\n                      </Button>\n                    </div>\n                  </div>\n                </li>\n              )\n            })}\n          </ul>\n        )}\n      </Section>\n    )\n  }\n  \n  \n  return PairingsSection\n}\n","import type { ReactNode } from 'react'\nimport { StateDot } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { configurationState } from './ServicesSection.tsx'\nimport type { ClientTranslate } from '../command.ts'\nimport type { BuiltinAccess } from './model.ts'\nimport type { SettingsDoc, SettingsParts, WriteSettings, SelectOption } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\n\nexport type DefaultsCopyKey = 'title' | 'connection' | 'connectionHint' | 'connectionUnset' | 'connectionMissing'\nexport interface DefaultsControls {\n  readonly disabled: boolean\n  readonly save: (path: string[], target: unknown, fallback?: unknown) => void\n}\n\n/** Default connection plus capability-owned controls sharing one write/error state. */\nexport function createDefaultsSection<K extends string>({ parts: { Section, SettingRow, SelectMenu, ErrorText, useWrite }, sparse, keys }: {\n  parts: SettingsParts<K>\n  sparse: SparseSettings\n  keys: Readonly<Record<DefaultsCopyKey, K>>\n}) {\n  return function DefaultsSection({ doc, write, t, defaultConnection, defaultLabel, defaultAvailability, choices, children }: {\n    doc: SettingsDoc\n    write: WriteSettings\n    t: ClientTranslate<K>\n    defaultConnection: string | undefined\n    defaultLabel: string\n    defaultAvailability?: {\n      readonly disabled: boolean\n      readonly access: BuiltinAccess\n      readonly credentialStatus: string | undefined\n      readonly warning: string\n    } | undefined\n    choices: readonly SelectOption[]\n    children?: (controls: DefaultsControls) => ReactNode\n  }) {\n    const action = useWrite(t)\n    const disabled = !doc.editable || action.busy\n    const save = (path: string[], target: unknown, fallback?: unknown) => {\n      void action.run(() => write(layers => sparse.sparseSettingOperations(layers, path, target, fallback)))\n    }\n    const missing = defaultConnection !== undefined && !choices.some(choice => choice.id === defaultConnection)\n    const warning = missing ? t(keys.connectionMissing, { id: defaultConnection })\n      : defaultAvailability && (defaultAvailability.disabled || configurationState(true, defaultAvailability.access, defaultAvailability.credentialStatus) === 'warning')\n        ? defaultAvailability.warning : undefined\n    const connectionOptions = [\n      { id: '', label: t(keys.connectionUnset, { name: defaultLabel }) },\n      ...(missing ? [{ id: defaultConnection, label: t(keys.connectionMissing, { id: defaultConnection }) }] : []),\n      ...choices,\n    ]\n    return (\n      <Section title={t(keys.title)}>\n        <SettingRow title={t(keys.connection)} hint={<>\n          <span>{t(keys.connectionHint)}</span>\n          {warning && <span role=\"status\"><StateDot state=\"warning\" />{warning}</span>}\n        </>}>\n          <SelectMenu label={t(keys.connection)} value={defaultConnection ?? ''} options={connectionOptions} disabled={disabled}\n            onChange={next => { save(['defaultConnection'], next === '' ? undefined : next) }} />\n        </SettingRow>\n        {children?.({ disabled, save })}\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n      </Section>\n    )\n  }\n}\n","/**\n * The row's Enhanced tools switch (docs/design.md, \"开关与同意\"): what turning\n * it on lets the Agent do, and what the operator agrees to by doing so.\n */\nimport { useId } from 'react'\nimport { Switch } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsClasses, SettingsDoc, SettingsParts, WriteSettings } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\n\nexport type EnhancedToolsCopyKey = 'title' | 'description' | 'consent'\n\n/** The document field this section edits; both capability documents have it. */\nexport interface EnhancedToolsSettings {\n  readonly enhancedTools?: boolean | undefined\n}\n\nexport function createEnhancedToolsSection<K extends string>({ classes: css, parts: { Section, ErrorText, useWrite }, sparse, keys }: {\n  classes: SettingsClasses\n  parts: SettingsParts<K>\n  sparse: SparseSettings\n  keys: Readonly<Record<EnhancedToolsCopyKey, K>>\n}) {\n  return function EnhancedToolsSection({ doc, write, t }: {\n    doc: SettingsDoc<EnhancedToolsSettings>\n    write: WriteSettings\n    t: ClientTranslate<K>\n  }) {\n    const id = useId()\n    const action = useWrite(t)\n    const enabled = doc.config.enhancedTools ?? false\n    // Off unless a layer turns it on: the user layer stores only a difference from the inherited value.\n    const save = (next: boolean) => action.run(() => write(layers => sparse.sparseSettingOperations(layers, ['enhancedTools'], next, false)))\n    return (\n      <Section title={t(keys.title)} titleId={id + '-title'}>\n        {/* A screen reader entering the switch hears what it does and what turning it on agrees to. */}\n        <div className={css.settingRow} role=\"group\" aria-labelledby={id + '-title'} aria-describedby={id + '-description ' + id + '-consent'}>\n          <div className={css.settingText}>\n            <p id={id + '-description'} className={css.settingLead}>{t(keys.description)}</p>\n            <p id={id + '-consent'} className={css.hint}>{t(keys.consent)}</p>\n          </div>\n          <div className={css.settingControl}>\n            <Switch checked={enabled} label={t(keys.title)} disabled={!doc.editable || action.busy} onChange={next => void save(next)} />\n          </div>\n        </div>\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n      </Section>\n    )\n  }\n}\n","import { useState } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsClasses, SettingsParts, SettingsDoc, WriteSettings } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\nexport type ResetCopyKey = \"reset.confirm\" | \"reset.confirmButton\" | \"confirm.cancel\" | \"reset.hint\" | \"reset.button\"\nexport function createResetSection<K extends string>({ classes: css, keys, parts: { ConfirmRow, ErrorText, useWrite }, sparse }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<ResetCopyKey, K>>\n  parts: SettingsParts<K>\n  sparse: SparseSettings\n}) {\n  return function ResetSection({ doc, write, t }: { doc: SettingsDoc; write: WriteSettings; t: ClientTranslate<K> }) {\n    const [confirming, setConfirming] = useState(false)\n    const action = useWrite(t)\n    const disabled = !doc.editable || action.busy\n  \n    const reset = async () => {\n      if (await action.run(() => write(sparse.resetSettingsOperations(doc.layers)))) {\n        setConfirming(false)\n      }\n    }\n  \n    return (\n      <div className={css.reset}>\n        {confirming ? (\n          <ConfirmRow\n            message={t(keys['reset.confirm'])}\n            confirmLabel={t(keys['reset.confirmButton'])}\n            cancelLabel={t(keys['confirm.cancel'])}\n            disabled={disabled}\n            onConfirm={() => { void reset() }}\n            onCancel={() => { setConfirming(false) }}\n          />\n        ) : (\n          <div className={css.confirmRow}>\n            <span className={css.confirmText}>{t(keys['reset.hint'])}</span>\n            <Button variant=\"outline\" size=\"sm\" disabled={disabled} onClick={() => { setConfirming(true) }}>\n              {t(keys['reset.button'])}\n            </Button>\n          </div>\n        )}\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n      </div>\n    )\n  }\n}\n","import type { Route } from '../../shared/route.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport type { SettingsClasses } from './parts.tsx'\nexport function createRouteNotice<K extends string>({ classes: css, keys, other }: {\n  classes: SettingsClasses\n  keys: Readonly<Record<'unknown' | 'auto' | 'other', K>>\n  other?: (route: Extract<Route, { kind: 'other' }>, t: ClientTranslate<K>) => string | undefined\n}) {\n  return function RouteNotice({ route, t }: { route: Route; t: ClientTranslate<K> }) {\n    let text: string | undefined\n    switch (route.kind) {\n      case 'this': return null\n      case 'unknown': text = t(keys.unknown); break\n      case 'auto': text = t(keys.auto, { id: route.providerId }); break\n      case 'other': text = other?.(route, t) ?? t(keys.other, { provider: route.provider, id: route.providerId }); break\n    }\n    return <p className={css.warning} role=\"status\">{text}</p>\n  }\n}\n","/**\n * Custom connection form: a catalog adapter, or a model protocol the plugin\n * passes. Endpoint trust always comes from explicit consent, given for one\n * destination.\n */\nimport { CREDENTIAL_REF, CUSTOM_CONNECTION_ID, CUSTOM_PREFIX, type ProtocolDescriptor } from '../../shared/connections.ts'\nimport { singleLine } from '../../shared/settings.ts'\nimport { isEndpoint } from '../../shared/url.ts'\nimport { applyFields, conflictOf, fieldText, isValidText, type FieldTexts, type OptionField } from './fields.ts'\nimport { adapterKeys, catalogEntry, catalogFields, type AdapterKeyOf, type CustomConnection, type OptionCopyTable, type SettingsCatalog } from './model.ts'\n\n/** What a custom connection talks to: a catalog adapter, or a model over one protocol. */\nexport type Format<A extends string = string, P extends string = string> =\n  | { readonly kind: 'adapter'; readonly adapter: A }\n  | { readonly kind: 'model'; readonly protocol: P }\n\ninterface FormFields {\n  readonly id: string\n  readonly label: string\n  readonly credentialRef: string\n  readonly options: FieldTexts\n  readonly endpoint: string\n}\nexport type ConnectionForm<A extends string = string, P extends string = string> =\n  | FormFields & { readonly kind: 'adapter'; readonly adapter: A }\n  | FormFields & { readonly kind: 'model'; readonly protocol: P; readonly model: string }\n\nexport type FormError = 'id' | 'duplicate' | 'label' | 'model' | 'credentialRef' | 'endpoint' | 'options' | 'trust'\nexport type BuildResult<A extends string = string, P extends string = string> =\n  | { readonly ok: true; readonly id: string; readonly connection: CustomConnection<A, P> }\n  | { readonly ok: false; readonly error: FormError }\n\n/** The model protocols a capability offers to custom connections, with copy for their options. */\nexport interface ProtocolTable<P extends string, K extends string> {\n  readonly catalog: Readonly<Record<P, ProtocolDescriptor>>\n  readonly optionCopy: (protocol: P) => OptionCopyTable<K>\n}\n\n/** Same bound as the settings grammar: 1–200 characters, no control characters. */\nconst MODEL_ID = /^[^\\p{Cc}]{1,200}$/u\n\nexport function emptyForm<A extends string, P extends string>(format: Format<A, P>): ConnectionForm<A, P> {\n  const fields: FormFields = { id: CUSTOM_PREFIX, label: '', credentialRef: '', options: {}, endpoint: '' }\n  return format.kind === 'adapter'\n    ? { ...fields, kind: 'adapter', adapter: format.adapter }\n    : { ...fields, kind: 'model', protocol: format.protocol, model: '' }\n}\n\n/** The form in another format: name, id, credential and endpoint stay; options belong to the format they were set for. */\nexport function withFormat<A extends string, P extends string>(form: ConnectionForm<A, P>, format: Format<A, P>): ConnectionForm<A, P> {\n  const fields: FormFields = { id: form.id, label: form.label, credentialRef: form.credentialRef, endpoint: form.endpoint, options: {} }\n  if (format.kind === 'adapter') return { ...fields, kind: 'adapter', adapter: format.adapter }\n  return { ...fields, kind: 'model', protocol: format.protocol, model: form.kind === 'model' ? form.model : '' }\n}\n\nexport function formatOf<A extends string, P extends string>(form: ConnectionForm<A, P> | CustomConnection<A, P>): Format<A, P> {\n  return form.kind === 'adapter' ? { kind: 'adapter', adapter: form.adapter } : { kind: 'model', protocol: form.protocol }\n}\n\n/** A stable key of a format, unique across adapters and protocols. */\nexport function formatKey(format: Format): string {\n  return format.kind === 'adapter' ? 'adapter:' + format.adapter : 'model:' + format.protocol\n}\n\nexport function formOf<A extends string, P extends string>(id: string, connection: CustomConnection<A, P>): ConnectionForm<A, P> {\n  const options = connection.options === undefined ? {} : connection.options\n  const fields: FormFields = {\n    id, label: singleLine(connection.label), credentialRef: connection.credentialRef,\n    endpoint: connection.endpoint === undefined ? '' : connection.endpoint,\n    options: Object.fromEntries(Object.entries(options).map(([name, value]) => [name, fieldText(value)])),\n  }\n  return connection.kind === 'adapter'\n    ? { ...fields, kind: 'adapter', adapter: connection.adapter }\n    : { ...fields, kind: 'model', protocol: connection.protocol, model: connection.model }\n}\n\nexport function suggestCredentialRef(id: string): string {\n  const name = id.slice(CUSTOM_PREFIX.length).toUpperCase().replace(/[^A-Z0-9]+/gu, '_').replace(/^_+|_+$/gu, '')\n  return name === '' ? '' : 'CUSTOM_' + name + '_API_KEY'\n}\n\n/**\n * The form rules of one catalog: its adapter entries, then the protocols the\n * plugin passes, are the formats; options use the API-key route.\n */\nexport function createConnectionForm<T extends SettingsCatalog, K extends string, P extends string = never>({ catalog, optionCopy, protocols }: {\n  catalog: T\n  optionCopy: (key: AdapterKeyOf<T>) => OptionCopyTable<K>\n  protocols?: ProtocolTable<P, K> | undefined\n}) {\n  type A = AdapterKeyOf<T>\n  type Form = ConnectionForm<A, P>\n\n  const protocolKeys = protocols === undefined ? [] : Object.keys(protocols.catalog) as P[]\n  const formats: Format<A, P>[] = [\n    ...adapterKeys(catalog).map(adapter => ({ kind: 'adapter', adapter }) as const),\n    ...protocolKeys.map(protocol => ({ kind: 'model', protocol }) as const),\n  ]\n\n  function protocolEntry(protocol: P): { readonly info: ProtocolDescriptor; readonly copy: OptionCopyTable<K> } {\n    if (protocols === undefined || !Object.hasOwn(protocols.catalog, protocol)) throw new Error('unknown protocol ' + protocol)\n    return { info: protocols.catalog[protocol], copy: protocols.optionCopy(protocol) }\n  }\n\n  const formFields = (form: Form): OptionField<K>[] => {\n    if (form.kind === 'adapter') {\n      const entry = catalogEntry(catalog, form.adapter)\n      return catalogFields(entry.options, 'api-key', optionCopy(form.adapter), entry.exclusive).fields\n    }\n    const { info, copy } = protocolEntry(form.protocol)\n    return catalogFields(info.options, 'api-key', copy, info.exclusive).fields\n  }\n\n  const urlTexts = (form: Form): string[] =>\n    formFields(form).filter(field => field.kind === 'url').map(field => textOf(form.options, field.name).trim())\n\n  /**\n   * Another endpoint, or a URL option off the catalog endpoint, sends the key\n   * elsewhere. A model connection has no catalog endpoint to compare with: it\n   * always needs trust.\n   */\n  function needsTrust(form: Form): boolean {\n    if (form.kind === 'model') return true\n    const official = catalogEntry(catalog, form.adapter).endpoint\n    const differs = (text: string) => text !== '' && text !== official\n    return [form.endpoint.trim(), ...urlTexts(form)].some(differs)\n  }\n\n  /** Everything that decides where the key goes; endpoint consent is given for one destination. */\n  const destination = (form: Form): string => JSON.stringify([formatKey(formatOf(form)), form.endpoint.trim(), ...urlTexts(form)])\n\n  function buildConnection(input: Form, consent: boolean, taken: readonly string[], previous?: CustomConnection<A, P>): BuildResult<A, P> {\n    const fail = (error: FormError): BuildResult<A, P> => ({ ok: false, error })\n    const form: Form = { ...input, id: input.id.trim(), label: singleLine(input.label), credentialRef: input.credentialRef.trim(), endpoint: input.endpoint.trim() }\n    if (!CUSTOM_CONNECTION_ID.test(form.id)) return fail('id')\n    if (taken.includes(form.id)) return fail('duplicate')\n    if (form.label === '' || form.label.length > 200) return fail('label')\n    const model = form.kind === 'model' ? form.model.trim() : ''\n    if (form.kind === 'model' && !MODEL_ID.test(model)) return fail('model')\n    if (!CREDENTIAL_REF.test(form.credentialRef) || form.credentialRef.length > 2000) return fail('credentialRef')\n    const fields = formFields(form)\n    const valid = (field: OptionField<K>) => isValidText(field, textOf(form.options, field.name)) && conflictOf(field, fields, form.options) === undefined\n    if (!fields.every(valid)) return fail('options')\n    // A model connection names its endpoint; an adapter one may leave it to the catalog.\n    const endpointMissing = form.endpoint === '' && form.kind === 'model'\n    if (endpointMissing || (form.endpoint !== '' && !isEndpoint(form.endpoint))) return fail('endpoint')\n    const trusted = needsTrust(form)\n    if (trusted && !consent) return fail('trust')\n    const options = applyFields(fields, form.options, {})\n    const common = {\n      label: form.label, credentialRef: form.credentialRef,\n      ...(previous === undefined || previous.disabled === undefined ? {} : { disabled: previous.disabled }),\n      ...(Object.keys(options).length === 0 ? {} : { options }),\n    }\n    if (form.kind === 'model') {\n      return { ok: true, id: form.id, connection: { ...common, kind: 'model', protocol: form.protocol, model, endpoint: form.endpoint, trustedEndpoint: true } }\n    }\n    return { ok: true, id: form.id, connection: {\n      ...common, kind: 'adapter', adapter: form.adapter,\n      ...(form.endpoint === '' ? {} : { endpoint: form.endpoint }),\n      ...(trusted ? { trustedEndpoint: true } : {}),\n    } }\n  }\n\n  return { formats, formFields, needsTrust, destination, buildConnection }\n}\nexport type ConnectionFormRules<T extends SettingsCatalog, K extends string, P extends string = never> = ReturnType<typeof createConnectionForm<T, K, P>>\n\nfunction textOf(texts: FieldTexts, name: string): string {\n  return Object.hasOwn(texts, name) ? texts[name]! : ''\n}\n","/**\n * Add or edit one custom connection with plain fields: a catalog adapter, or a\n * model over one of the protocols the plugin passes. The editor keeps the\n * document layers and revision it opened with, so a save never overwrites a\n * change made since. An optional key goes to DSH Credentials once the\n * connection is saved.\n */\nimport { useId, useState } from 'react'\nimport { Button, Checkbox, Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { CUSTOM_PREFIX } from '../../shared/connections.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport {\n  emptyForm, formatKey, formatOf, formOf, suggestCredentialRef, withFormat,\n  type ConnectionForm, type ConnectionFormRules, type Format, type FormError, type ProtocolTable,\n} from './connection-form.ts'\nimport type { SaveCredential } from './CredentialEditor.tsx'\nimport { catalogEntry, type AdapterKeyOf, type CatalogSettings, type CustomConnection, type SettingsCatalog } from './model.ts'\nimport type { OptionsEditor } from './OptionsEditor.tsx'\nimport { classNames, type SettingsClasses, type SettingsDoc, type SettingsParts, type WriteSettings } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\n\nexport type CustomEditorTarget = { readonly kind: 'new' } | { readonly kind: 'edit'; readonly id: string }\n\nexport interface CustomEditorProps<S, K extends string> {\n  target: CustomEditorTarget\n  doc: SettingsDoc<S>\n  write: WriteSettings\n  saveCredential: SaveCredential\n  /** Ids of every existing connection. */\n  taken: readonly string[]\n  t: ClientTranslate<K>\n  /** Close the editor, with a problem to report after the connection saved. */\n  onClose: (problem?: string) => void\n}\n\nexport type EditorCopyKey =\n  | 'editor.titleNew' | 'editor.titleEdit' | 'editor.id' | 'editor.idHint' | 'editor.idPlaceholder' | 'editor.label' | 'editor.adapter'\n  | 'editor.endpoint' | 'editor.endpointHint' | 'editor.credentialRef' | 'editor.credentialRefHint' | 'editor.trust' | 'editor.trustUnnamed'\n  | 'editor.save' | 'editor.cancel' | 'editor.stale' | 'editor.optionsHint' | 'editor.apiKey' | 'editor.apiKeyHint' | 'editor.keyFailed'\n  | 'draft.id' | 'draft.duplicate' | 'draft.label' | 'draft.trust' | 'draft.credentialRef' | 'draft.endpoint' | 'draft.options'\n  | 'options.title' | 'credential.placeholder' | 'saving'\n\n/** Copy of the model formats: \\`model.format\\` names a protocol (\\`{protocol}\\`) in the format list and on a row. */\nexport type ModelCopyKey = 'model.format' | 'model.id' | 'model.idHint' | 'model.endpointHint' | 'model.note' | 'draft.model'\n\n/** Model protocols a capability offers to custom connections, after its adapter formats. */\nexport interface ModelFormats<P extends string, K extends string> extends ProtocolTable<P, K> {\n  readonly keys: Readonly<Record<ModelCopyKey, K>>\n  /** A note per protocol shown while it is chosen, such as which services run web search over it. */\n  readonly notes?: { readonly [Key in P]?: K }\n}\n\nconst FORM_ERRORS = {\n  id: 'draft.id',\n  duplicate: 'draft.duplicate',\n  label: 'draft.label',\n  credentialRef: 'draft.credentialRef',\n  endpoint: 'draft.endpoint',\n  options: 'draft.options',\n  trust: 'draft.trust',\n} as const satisfies Record<Exclude<FormError, 'model'>, EditorCopyKey>\n\n/** The model formats of a capability that has them; a model form exists only then. */\nexport function modelFormats<P extends string, K extends string>(protocols: ModelFormats<P, K> | undefined): ModelFormats<P, K> {\n  if (protocols === undefined) throw new Error('this capability has no model protocols')\n  return protocols\n}\n\n/** Display name of a format: the catalog adapter, or \"model search · <protocol>\". */\nexport function formatLabel<T extends SettingsCatalog, P extends string, K extends string>(\n  catalog: T, protocols: ModelFormats<P, K> | undefined, format: Format<AdapterKeyOf<T>, P>, t: ClientTranslate<K>,\n): string {\n  if (format.kind === 'adapter') return catalogEntry(catalog, format.adapter).label\n  const models = modelFormats(protocols)\n  return t(models.keys['model.format'], { protocol: models.catalog[format.protocol].label })\n}\n\nexport function createConnectionEditor<S extends CatalogSettings, T extends SettingsCatalog, K extends string, P extends string = never>({\n  classes: css, keys, parts: { ErrorText, SelectMenu, useWrite }, optionsEditor: { OptionFields }, sparse, catalog, rules, initialFormat, protocols,\n}: {\n  classes: SettingsClasses\n  keys: Readonly<Record<EditorCopyKey, K>>\n  parts: SettingsParts<K>\n  optionsEditor: OptionsEditor<K>\n  sparse: SparseSettings\n  catalog: T\n  rules: ConnectionFormRules<T, K, P>\n  /** The format a new connection starts with. */\n  initialFormat: Format<AdapterKeyOf<T>, P>\n  protocols?: ModelFormats<P, K> | undefined\n}) {\n  type A = AdapterKeyOf<T>\n  type Form = ConnectionForm<A, P>\n  const { formats, buildConnection, destination, formFields, needsTrust } = rules\n\n  const errorText = (error: FormError, t: ClientTranslate<K>): string =>\n    error === 'model' ? t(modelFormats(protocols).keys['draft.model']) : t(keys[FORM_ERRORS[error]])\n\n  function ConnectionEditor({ target, doc, write, saveCredential, taken, onClose, t }: CustomEditorProps<S, K>) {\n    const formId = useId()\n    const [opened] = useState(() => ({\n      layers: doc.layers,\n      revision: doc.revision,\n      previous: target.kind === 'edit' ? storedConnection(doc.config, target.id) : undefined,\n    }))\n    const [form, setForm] = useState<Form>(() => opened.previous === undefined || target.kind !== 'edit'\n      ? emptyForm(initialFormat)\n      : formOf(target.id, opened.previous))\n\n    // The reference follows the id until the user edits it.\n    const [refEdited, setRefEdited] = useState(target.kind === 'edit')\n    const [apiKey, setApiKey] = useState('')\n    // Consent covers the destination it was given for; a stored trust covers the stored one.\n    const [consentFor, setConsentFor] = useState<string | undefined>(() =>\n      opened.previous !== undefined && opened.previous.trustedEndpoint === true ? destination(form) : undefined)\n    const consent = consentFor === destination(form)\n    const [error, setError] = useState<FormError | undefined>(undefined)\n    const action = useWrite(t)\n\n    const change = (next: (current: Form) => Form) => {\n      setForm(next)\n      setError(undefined)\n    }\n    const update = (patch: Partial<Pick<Form, 'id' | 'label' | 'credentialRef' | 'endpoint' | 'options'>>) => {\n      change(current => ({ ...current, ...patch }))\n    }\n\n    const changeId = (suffix: string) => {\n      const id = CUSTOM_PREFIX + suffix\n      update(refEdited ? { id } : { id, credentialRef: suggestCredentialRef(id) })\n    }\n\n    const askTrust = needsTrust(form)\n    const awaitingTrust = askTrust && !consent\n\n    const submit = async (): Promise<void> => {\n      const others = target.kind === 'edit' ? taken.filter(existing => existing !== target.id) : taken\n      const result = buildConnection(form, consent, others, opened.previous)\n      if (!result.ok) return setError(result.error)\n      const ops = sparse.sparseSettingOperations(opened.layers, ['connections', result.id], result.connection)\n      if (!await action.run(() => write(ops, opened.revision))) return\n\n      const key = apiKey.trim()\n      if (key === '') return onClose()\n\n      try {\n        await saveCredential(form.credentialRef.trim(), key)\n        onClose()\n      } catch {\n        onClose(t(keys['editor.keyFailed']))\n      }\n    }\n\n    const trustLabel = form.credentialRef.trim() === ''\n      ? t(keys['editor.trustUnnamed'])\n      : t(keys['editor.trust'], { ref: form.credentialRef.trim() })\n\n    const current = formatKey(formatOf(form))\n    const choose = (key: string) => {\n      const format = formats.find(candidate => formatKey(candidate) === key)\n      if (format !== undefined) change(previous => withFormat(previous, format))\n    }\n\n    return (\n      <form className={css.editor} aria-labelledby={formId + '-title'} onSubmit={event => { event.preventDefault(); void submit() }}>\n        <h5 className={css.editorTitle} id={formId + '-title'}>\n          {target.kind === 'edit' ? t(keys['editor.titleEdit'], { id: target.id }) : t(keys['editor.titleNew'])}\n        </h5>\n        <div className={css.formGrid}>\n          <TextField id={formId + '-label'} label={t(keys['editor.label'])} value={form.label} onChange={label => update({ label })} />\n          <div className={css.formField}>\n            <label className={css.fieldLabel} htmlFor={formId + '-id'}>{t(keys['editor.id'])}</label>\n            <span className={classNames(css.prefixed, target.kind === 'edit' && css.prefixedDisabled)}>\n              <span className={css.prefix} aria-hidden=\"true\">{CUSTOM_PREFIX}</span>\n              <input\n                id={formId + '-id'}\n                className={css.prefixedInput}\n                value={form.id.slice(CUSTOM_PREFIX.length)}\n                disabled={target.kind === 'edit'}\n                placeholder={t(keys['editor.idPlaceholder'])}\n                autoComplete=\"off\"\n                spellCheck={false}\n                aria-describedby={formId + '-id-hint'}\n                onChange={event => { changeId(event.target.value) }}\n              />\n            </span>\n            <p className={css.hint} id={formId + '-id-hint'}>{t(keys['editor.idHint'])}</p>\n          </div>\n          <div className={css.formField}>\n            <span className={css.fieldLabel}>{t(keys['editor.adapter'])}</span>\n            <SelectMenu\n              compact\n              label={t(keys['editor.adapter'])}\n              value={current}\n              options={formats.map(format => ({ id: formatKey(format), label: formatLabel(catalog, protocols, format, t) }))}\n              disabled={false}\n              onChange={choose}\n            />\n            {form.kind === 'model' ? <ModelNotes protocol={form.protocol} t={t} /> : null}\n          </div>\n          {form.kind === 'model' ? (\n            <TextField\n              id={formId + '-model'}\n              label={t(modelFormats(protocols).keys['model.id'])}\n              hint={t(modelFormats(protocols).keys['model.idHint'])}\n              value={form.model}\n              onChange={model => { change(previous => previous.kind === 'model' ? { ...previous, model } : previous) }}\n            />\n          ) : null}\n          <TextField\n            id={formId + '-endpoint'}\n            label={t(keys['editor.endpoint'])}\n            hint={form.kind === 'model' ? t(modelFormats(protocols).keys['model.endpointHint']) : t(keys['editor.endpointHint'])}\n            type=\"url\"\n            placeholder={form.kind === 'adapter' ? catalogEntry(catalog, form.adapter).endpoint : undefined}\n            value={form.endpoint}\n            onChange={endpoint => update({ endpoint })}\n          />\n          <TextField\n            id={formId + '-ref'}\n            label={t(keys['editor.credentialRef'])}\n            hint={t(keys['editor.credentialRefHint'])}\n            value={form.credentialRef}\n            onChange={credentialRef => {\n              setRefEdited(true)\n              update({ credentialRef })\n            }}\n          />\n          <div className={css.formField}>\n            <label className={css.fieldLabel} htmlFor={formId + '-key'}>{t(keys['editor.apiKey'])}</label>\n            <Input\n              id={formId + '-key'}\n              className={css.input as string}\n              type=\"password\"\n              autoComplete=\"new-password\"\n              spellCheck={false}\n              placeholder={t(keys['credential.placeholder'])}\n              value={apiKey}\n              onChange={event => { setApiKey(event.target.value) }}\n            />\n            <p className={css.hint}>{t(keys['editor.apiKeyHint'])}</p>\n          </div>\n          {/* Consent sits with the endpoint and the key it covers, before the options. */}\n          {askTrust ? (\n            <div className={classNames(css.formWide, css.trust)}>\n              <Checkbox className={css.trustCheck} checked={consent} onChange={checked => { setConsentFor(checked ? destination(form) : undefined) }} label={trustLabel} />\n            </div>\n          ) : null}\n        </div>\n        <div className={css.field}>\n          <span className={css.fieldLabel}>{t(keys['options.title'])}</span>\n          <OptionFields\n            id={formId + '-option'}\n            fields={formFields(form)}\n            texts={form.options}\n            disabled={false}\n            t={t}\n            onEdit={(name, value) => update({ options: { ...form.options, [name]: value } })}\n          />\n          <p className={css.hint}>{t(keys['editor.optionsHint'])}</p>\n        </div>\n        {doc.revision === opened.revision ? null : <p className={css.warning} role=\"alert\">{t(keys['editor.stale'])}</p>}\n        <ErrorText title={error === undefined ? action.errorTitle : undefined}>{error === undefined ? action.error : errorText(error, t)}</ErrorText>\n        <div className={css.actions}>\n          {awaitingTrust ? <span className={css.hint} id={formId + '-save-blocked'}>{t(keys['draft.trust'])}</span> : null}\n          <Button type=\"button\" variant=\"ghost\" onClick={() => { onClose() }}>{t(keys['editor.cancel'])}</Button>\n          <Button type=\"submit\" variant=\"primary\" aria-describedby={awaitingTrust ? formId + '-save-blocked' : undefined} disabled={awaitingTrust || !doc.editable || action.busy}>\n            {action.busy ? t(keys['saving']) : t(keys['editor.save'])}\n          </Button>\n        </div>\n      </form>\n    )\n  }\n\n  /** What the chosen protocol is good for, then what any model connection returns and costs. */\n  function ModelNotes({ protocol, t }: { protocol: P; t: ClientTranslate<K> }) {\n    const models = modelFormats(protocols)\n    const note = models.notes === undefined ? undefined : models.notes[protocol]\n    return (\n      <>\n        {note === undefined ? null : <p className={css.hint}>{t(note)}</p>}\n        <p className={css.hint}>{t(models.keys['model.note'])}</p>\n      </>\n    )\n  }\n\n  function storedConnection(config: S, id: string): CustomConnection<A, P> | undefined {\n    const stored = config.connections === undefined ? undefined : config.connections[id]\n    return stored === undefined ? undefined : stored as CustomConnection<A, P>\n  }\n\n  function TextField({ id, label, hint, value, onChange, type = 'text', placeholder }: {\n    id: string\n    label: string\n    hint?: string\n    value: string\n    onChange: (value: string) => void\n    type?: string\n    placeholder?: string | undefined\n  }) {\n    return (\n      <div className={css.formField}>\n        <label className={css.fieldLabel} htmlFor={id}>{label}</label>\n        <Input\n          id={id}\n          className={css.input as string}\n          type={type}\n          value={value}\n          placeholder={placeholder}\n          autoComplete=\"off\"\n          spellCheck={false}\n          onChange={event => { onChange(event.target.value) }}\n        />\n        {hint === undefined ? null : <p className={css.hint}>{hint}</p>}\n      </div>\n    )\n  }\n\n  return ConnectionEditor\n}\n","/**\n * Operator-defined connections. The catalog's adapter entries, then the model\n * protocols a plugin passes, are the formats; without any the section does\n * not render. Removing the connection that is the default restores the\n * catalog default in the same write.\n */\nimport { useState, type ReactNode } from 'react'\nimport { Button, IconPlusOutlineRegular, StateDot, Switch, Tag } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { CredentialStatusMap } from '../credentials.ts'\nimport type { ClientTranslate } from '../command.ts'\nimport { createConnectionForm, formatOf } from './connection-form.ts'\nimport { createConnectionEditor, formatLabel, type CustomEditorTarget, type EditorCopyKey, type ModelFormats } from './ConnectionEditor.tsx'\nimport type { CredentialEditorComponent, SaveCredential } from './CredentialEditor.tsx'\nimport { catalogEntry, customConnections, type AdapterKeyOf, type CatalogSettings, type CustomConnection, type OptionCopyTable, type SettingsCatalog } from './model.ts'\nimport type { OptionsEditor } from './OptionsEditor.tsx'\nimport type { SettingsClasses, SettingsParts, SettingsDoc, WriteSettings } from './parts.tsx'\nimport type { SparseSettings } from './sparse.ts'\n\nexport type CustomCopyKey = EditorCopyKey | \"services.remoteNotice\" | \"custom.title\" | \"custom.addStructured\" | \"custom.empty\" | \"custom.kindStructured\" | \"credential.set\" | \"credential.unset\" | \"credential.manage\" | \"custom.edit\" | \"custom.remove\" | \"services.enable\" | \"custom.removeConfirm\" | \"confirm.cancel\"\n\ninterface CustomProps<S, K extends string> {\n  doc: SettingsDoc<S>\n  write: WriteSettings\n  credentials: CredentialStatusMap\n  saveCredential: SaveCredential\n  t: ClientTranslate<K>\n}\n\nexport function createCustomConnectionsSection<S extends CatalogSettings, T extends SettingsCatalog, K extends string, P extends string = never>({\n  classes: css, keys, parts, CredentialEditor, optionsEditor, sparse, catalog, optionCopy, protocols, defaultConnection,\n}: {\n  classes: SettingsClasses\n  keys: Readonly<Record<CustomCopyKey, K>>\n  parts: SettingsParts<K>\n  CredentialEditor: CredentialEditorComponent<K>\n  optionsEditor: OptionsEditor<K>\n  sparse: SparseSettings\n  catalog: T\n  /** Copy for the options of each adapter entry. */\n  optionCopy: (key: AdapterKeyOf<T>) => OptionCopyTable<K>\n  /** Model protocols offered after the adapters; a capability without model connections omits them. */\n  protocols?: ModelFormats<P, K> | undefined\n  /** The catalog default that replaces a removed default connection. */\n  defaultConnection: string\n}): (props: CustomProps<S, K>) => ReactNode {\n  type A = AdapterKeyOf<T>\n  const { Section, ErrorText, ConfirmRow, useWrite } = parts\n  const rules = createConnectionForm<T, K, P>({ catalog, optionCopy, protocols })\n  const [initialFormat] = rules.formats\n  if (initialFormat === undefined) return () => null\n  const ConnectionEditor = createConnectionEditor<S, T, K, P>({ classes: css, keys, parts, optionsEditor, sparse, catalog, rules, initialFormat, protocols })\n\n  /**\n   * Who receives what a connection sends: the catalog service, and the host\n   * when the endpoint is not the catalog's; a model connection's own endpoint host.\n   */\n  function recipient(connection: CustomConnection<A, P>): string {\n    if (connection.kind === 'model') return new URL(connection.endpoint).host\n    const info = catalogEntry(catalog, connection.adapter)\n    if (connection.endpoint === undefined || connection.endpoint === info.endpoint) return info.label\n    return info.label + ' (' + new URL(connection.endpoint).host + ')'\n  }\n\n  function CustomConnectionsSection({ doc, write, credentials, saveCredential, t }: CustomProps<S, K>) {\n    const [editor, setEditor] = useState<CustomEditorTarget | undefined>(undefined)\n    const [notice, setNotice] = useState<string | undefined>(undefined)\n    const connections = customConnections<A, P>(doc.config)\n    const taken = doc.config.connections === undefined ? [] : Object.keys(doc.config.connections)\n\n    const open = (target: CustomEditorTarget | undefined) => {\n      setNotice(undefined)\n      setEditor(target)\n    }\n\n    const editorFor = (target: CustomEditorTarget) => (\n      <ConnectionEditor\n        key={target.kind === 'edit' ? target.id : 'new'}\n        target={target}\n        doc={doc}\n        write={write}\n        saveCredential={saveCredential}\n        taken={taken}\n        t={t}\n        onClose={(problem) => {\n          setEditor(undefined)\n          setNotice(problem)\n        }}\n      />\n    )\n\n    const editing = (id: string) => editor !== undefined && editor.kind === 'edit' && editor.id === id\n\n    return (\n      <Section\n        title={t(keys['custom.title'])}\n        actions={(\n          <div className={css.sectionActions}>\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              icon={<IconPlusOutlineRegular size={14} />}\n              disabled={!doc.editable}\n              onClick={() => { open({ kind: 'new' }) }}\n            >\n              {t(keys['custom.addStructured'])}\n            </Button>\n          </div>\n        )}\n      >\n        <ErrorText>{notice}</ErrorText>\n        {editor !== undefined && editor.kind === 'new' ? editorFor(editor) : null}\n        {connections.length === 0 ? <p className={css.empty}>{t(keys['custom.empty'])}</p> : (\n          <ul className={css.list}>\n            {connections.map(([id, connection]) => (\n              <CustomRow\n                key={id}\n                id={id}\n                connection={connection}\n                doc={doc}\n                write={write}\n                credentials={credentials}\n                saveCredential={saveCredential}\n                t={t}\n                editing={editing(id)}\n                onEdit={() => { open(editing(id) ? undefined : { kind: 'edit', id }) }}\n                editor={editing(id) ? editorFor({ kind: 'edit', id }) : null}\n              />\n            ))}\n          </ul>\n        )}\n      </Section>\n    )\n  }\n\n  function CustomRow({ id, connection, doc, write, credentials, saveCredential, editing, onEdit, editor, t }: CustomProps<S, K> & {\n    id: string\n    connection: CustomConnection<A, P>\n    editing: boolean\n    onEdit: () => void\n    editor: ReactNode\n  }) {\n    const [keyOpen, setKeyOpen] = useState(false)\n    const [confirming, setConfirming] = useState(false)\n    const action = useWrite(t)\n    const credentialRef = connection.credentialRef\n    const credentialStatus = credentials[credentialRef]\n    const enabled = connection.disabled !== true\n    const disabled = !doc.editable || action.busy\n\n    const userConnections = (doc.layers.user as { connections?: Record<string, unknown> } | undefined)?.connections\n    const removable = userConnections !== undefined && Object.hasOwn(userConnections, id)\n\n    const save = (path: string[], target: unknown, fallback?: unknown) =>\n      action.run(() => write(layers => sparse.sparseSettingOperations(layers, ['connections', id, ...path], target, fallback)))\n\n    /** Removing the default connection puts the catalog default back in the same write. */\n    const remove = () => {\n      const ops = sparse.sparseSettingOperations(doc.layers, ['connections', id], undefined)\n      const restore = doc.config.defaultConnection === id ? sparse.sparseSettingOperations(doc.layers, ['defaultConnection'], defaultConnection, defaultConnection) : []\n      return action.run(() => write([...ops, ...restore]))\n    }\n\n    return (\n      <li className={css.row}>\n        <div className={css.rowLine}>\n          <StateDot state={!enabled ? 'idle' : credentialStatus === 'configured' ? 'done' : 'warning'} />\n          <div className={css.rowMain}>\n            <span className={css.rowTitle}>\n              {connection.label}\n              <Tag tone=\"neutral\">{connection.kind === 'adapter' ? t(keys['custom.kindStructured']) : formatLabel(catalog, protocols, formatOf(connection), t)}</Tag>\n            </span>\n            <span className={css.rowMeta}>\n              <code>{id}</code>\n              {' · '}\n              {connection.kind === 'model' ? <><code>{connection.model}</code>{' · '}</> : null}\n              <code>{credentialRef}</code>\n              {credentialStatus === 'configured' ? ' · ' + t(keys['credential.set']) : ''}\n              {credentialStatus === 'missing' ? ' · ' + t(keys['credential.unset']) : ''}\n              {' · ' + t(keys['services.remoteNotice'], { name: recipient(connection) })}\n            </span>\n          </div>\n          <div className={css.rowActions}>\n            <Button variant=\"ghost\" size=\"sm\" aria-expanded={keyOpen} onClick={() => { setKeyOpen(!keyOpen) }}>{t(keys['credential.manage'])}</Button>\n            <Button variant=\"ghost\" size=\"sm\" aria-expanded={editing} disabled={!doc.editable} onClick={onEdit}>{t(keys['custom.edit'])}</Button>\n            {removable ? (\n              <Button variant=\"ghost\" size=\"sm\" className={css.danger} disabled={disabled} aria-expanded={confirming} onClick={() => { setConfirming(true) }}>\n                {t(keys['custom.remove'])}\n              </Button>\n            ) : null}\n          </div>\n          <Switch\n            checked={enabled}\n            label={t(keys['services.enable'], { name: connection.label })}\n            disabled={disabled}\n            onChange={next => void save(['disabled'], !next, false)}\n          />\n        </div>\n        {confirming ? (\n          <ConfirmRow\n            message={t(keys['custom.removeConfirm'], { name: connection.label })}\n            confirmLabel={t(keys['custom.remove'])}\n            cancelLabel={t(keys['confirm.cancel'])}\n            disabled={disabled}\n            onConfirm={() => { void remove() }}\n            onCancel={() => { setConfirming(false) }}\n          />\n        ) : null}\n        <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n        {keyOpen ? (\n          <div className={css.panel}>\n            <CredentialEditor credentialRef={credentialRef} status={credentialStatus} save={saveCredential} t={t} />\n          </div>\n        ) : null}\n        {editor}\n      </li>\n    )\n  }\n\n  return CustomConnectionsSection\n}\n","import type { Descriptor } from 'dsh-tool-web-enhanced-core/shared'\nimport type { LocalSettings } from './settings/types.ts'\n\nexport type FetchDescriptor =\n  | (Descriptor & { readonly kind: 'local' })\n  | (Descriptor & { readonly kind: 'native'; readonly endpoint: string })\n  | (Descriptor & { readonly kind: 'adapter'; readonly endpoint: string })\n\nconst MAX_INT32 = 2_147_483_647\nexport const MAX_TIMER_DELAY_MS = MAX_INT32\nexport const ALLOWLIST_MAX_ENTRIES = 200\nexport const USER_AGENT_PATTERN = /^[\\x20-\\x7e\\x80-\\xff]*$/u\n\n/** Mirrored from the native row; its Host-only module must not enter the browser bundle. */\nexport const DEFAULT_LOCAL_SETTINGS: LocalSettings = {\n  allowCidrs: [], allowHostnames: [],\n  userAgent: 'deepseek-harness/0.0.1 (+https://github.com/deepseek-ai)',\n  maxResponseBytes: 5_000_000, maxBodyChars: 100_000, timeoutMs: 30_000, maxRedirects: 5,\n}\n\nconst allowlist = { kind: 'list', pattern: /^[\\s\\S]{0,2000}$/u, max: ALLOWLIST_MAX_ENTRIES } as const\n\n/**\n * Display order and secret-free facts shared by Host and browser. Remote\n * adapters receive the URL as requested; the service owns target access.\n * Option bounds stay inside the remote deadline (src/remote/http.ts).\n */\nexport const CATALOG = {\n  local: {\n    label: 'Local HTTP', kind: 'local', remote: false, optIn: false,\n    access: { keyless: true, apiKey: false, account: false },\n    options: {\n      allowCidrs: allowlist, allowHostnames: allowlist,\n      userAgent: { kind: 'text', pattern: USER_AGENT_PATTERN },\n      maxResponseBytes: { kind: 'integer', min: 1, max: Number.MAX_SAFE_INTEGER },\n      maxBodyChars: { kind: 'integer', min: 1, max: Number.MAX_SAFE_INTEGER },\n      timeoutMs: { kind: 'integer', min: 1, max: MAX_TIMER_DELAY_MS },\n      maxRedirects: { kind: 'integer', min: 0, max: Number.MAX_SAFE_INTEGER },\n    },\n  },\n  'deepseek-fetch-api': {\n    label: 'DeepSeek Fetch API', kind: 'native', remote: true, optIn: true,\n    endpoint: 'https://api.deepseek.com/v1/tools', homepage: 'https://platform.deepseek.com',\n    access: { keyless: false, apiKey: { credentialRef: 'DEEPSEEK_API_KEY' }, account: true },\n    options: { baseURL: { kind: 'url' } },\n  },\n  exa: {\n    label: 'Exa', kind: 'adapter', remote: true, optIn: true,\n    endpoint: 'https://api.exa.ai/contents', homepage: 'https://exa.ai',\n    // Keyless goes through Exa's hosted MCP tool, which takes only the URL and a character budget.\n    access: { keyless: true, apiKey: { credentialRef: 'EXA_API_KEY' }, account: false },\n    options: {\n      maxAgeHours: { kind: 'integer', min: -1, max: 720, keyless: false },\n      livecrawlTimeout: { kind: 'integer', min: 1, max: 90_000, keyless: false },\n    },\n  },\n  firecrawl: {\n    label: 'Firecrawl', kind: 'adapter', remote: true, optIn: true,\n    endpoint: 'https://api.firecrawl.dev/v2/scrape', homepage: 'https://www.firecrawl.dev',\n    access: { keyless: true, apiKey: { credentialRef: 'FIRECRAWL_API_KEY' }, account: false },\n    options: {\n      onlyMainContent: { kind: 'boolean' },\n      maxAge: { kind: 'integer', min: 0, max: Number.MAX_SAFE_INTEGER },\n      storeInCache: { kind: 'boolean' },\n      timeout: { kind: 'integer', min: 1000, max: 110_000 },\n      waitFor: { kind: 'integer', min: 0, max: 60_000 },\n      proxy: { kind: 'enum', values: ['basic', 'enhanced', 'auto'] },\n    },\n  },\n  tavily: {\n    label: 'Tavily', kind: 'adapter', remote: true, optIn: true,\n    endpoint: 'https://api.tavily.com/extract', homepage: 'https://www.tavily.com',\n    access: { keyless: true, apiKey: { credentialRef: 'TAVILY_API_KEY' }, account: false },\n    options: {\n      extract_depth: { kind: 'enum', values: ['basic', 'advanced'] },\n      format: { kind: 'enum', values: ['markdown', 'text'] },\n      timeout: { kind: 'integer', min: 1, max: 60 },\n    },\n  },\n  tinyfish: {\n    label: 'Tinyfish', kind: 'adapter', remote: true, optIn: true,\n    endpoint: 'https://api.fetch.tinyfish.ai', homepage: 'https://www.tinyfish.ai',\n    // No documented anonymous fetch route: personal key only.\n    access: { keyless: false, apiKey: { credentialRef: 'TINYFISH_API_KEY' }, account: false },\n    options: {\n      // Seconds of cache tolerance; the service documents no upper bound.\n      ttl: { kind: 'integer', min: 0, max: MAX_INT32 },\n      per_url_timeout_ms: { kind: 'integer', min: 1, max: 110_000 },\n    },\n  },\n  anysearch: {\n    label: 'AnySearch', kind: 'adapter', remote: true, optIn: true,\n    endpoint: 'https://api.anysearch.com/v1/extract', homepage: 'https://www.anysearch.com',\n    // The service has an anonymous tier; this plugin offers personal keys only (free accounts exist).\n    access: { keyless: false, apiKey: { credentialRef: 'ANYSEARCH_API_KEY' }, account: false },\n    // The extract body takes exactly one url: no operator options.\n    options: {},\n  },\n} as const satisfies Record<string, FetchDescriptor>\n\nexport type CatalogKey = keyof typeof CATALOG\nexport const NATIVE_KEYS = ['deepseek-fetch-api'] as const satisfies readonly CatalogKey[]\nexport const ADAPTER_KEYS = ['exa', 'firecrawl', 'tavily', 'tinyfish', 'anysearch'] as const satisfies readonly CatalogKey[]\nexport type NativeKey = typeof NATIVE_KEYS[number]\nexport type AdapterKey = typeof ADAPTER_KEYS[number]\nexport const isCatalogKey = (value: unknown): value is CatalogKey => typeof value === 'string' && Object.hasOwn(CATALOG, value)\nexport const DEFAULT_CONNECTION = 'builtin:local'\n","import type { ClientTranslate } from 'dsh-tool-web-enhanced-core/client'\nimport type { RemoteFailure } from '@deepseek-ai/dsh-typert-protocol'\nimport type { ConnectionText } from 'dsh-tool-web-enhanced-core/client'\nimport type { Access, ConnectionView, SelectionView } from 'dsh-tool-web-enhanced-core/shared'\nimport type { LocaleKey } from './locales.ts'\nimport { CATALOG } from '../catalog.ts'\nimport { builtinId } from 'dsh-tool-web-enhanced-core/shared'\n\nexport type Translate = ClientTranslate<LocaleKey>\n\nexport function connectionLabel(connection: Pick<ConnectionView, 'id' | 'label'>, t: Translate): string {\n  return connection.id === builtinId('local') && connection.label === CATALOG.local.label ? t('connection.local') : connection.label\n}\n\nconst ACCESS_LABELS = { keyless: 'access.keyless', 'api-key': 'access.apiKey', account: 'access.account' } as const satisfies Record<Access, LocaleKey>\n\nexport function describe(connection: ConnectionView, t: Translate): ConnectionText {\n  const label = connectionLabel(connection, t)\n  switch (connection.status) {\n    case 'disabled': return { label, caption: t('services.off'), reason: t('status.disabled', { name: label }) }\n    case 'unsupported': return { label, caption: t('status.short.unsupported'), reason: t('status.unsupported', { name: label }) }\n    // Native connections can also use a DeepSeek account; adapters only take a key.\n    case 'needs-credential': return { label, caption: t('status.short.needsCredential'), reason: t(connection.kind === 'native' ? 'status.needsAccount' : 'status.needsCredential') }\n    case 'ready': return { label, caption: readyCaption(connection, label, t) }\n  }\n}\n\n/** How the connection reaches pages, and for a remote one which service receives the URL. */\nfunction readyCaption(connection: ConnectionView, label: string, t: Translate): string {\n  if (connection.kind === 'local') return t('access.local')\n  const access = t(ACCESS_LABELS[connection.access])\n  return connection.remote ? t('status.remoteReady', { access, name: label }) : access\n}\n\nexport function sourceText(view: SelectionView, t: Translate): string {\n  const keys = { session: 'source.session', inherited: 'source.inherited', model: 'source.model', default: 'source.default' } as const\n  return t(keys[view.source])\n}\n\nexport function writeFailureText(error: RemoteFailure, t: Translate): string {\n  switch (error.code) {\n    case 'fetchConnections/conflict': return t('write.conflict')\n    case 'fetchConnections/unavailable': return t('write.unavailable')\n    default: return t('write.failed')\n  }\n}\n","import { selectionCommand, parseSelectionCommandOption } from 'dsh-tool-web-enhanced-core/client'\nimport { FETCH } from 'dsh-tool-web-enhanced-core/shared'\nimport { describe, writeFailureText, type Translate } from './connections.ts'\nimport type { FetchSelectionStore } from './selection.ts'\n\nexport const FETCH_COMMAND = FETCH.command\nexport const parseCommandOption = parseSelectionCommandOption\n\nexport function fetchCommand(selections: FetchSelectionStore, t: Translate) {\n  return selectionCommand(selections, {\n    name: FETCH_COMMAND, t,\n    keys: { placeholder: 'command.placeholder', empty: 'command.empty', noResults: 'command.noResults',\n      readFailed: 'command.readFailed', current: 'command.current', off: 'selector.offRow' },\n    groups: view => [{ group: { name: 'services', label: t('selector.services') }, connections: view.connections }],\n    describe: connection => describe(connection, t),\n    writeFailureText: error => writeFailureText(error, t),\n  })\n}\n","/** Only exposes retired fields to the browser so Reset can remove them; resolveSettings still rejects them. */\nexport const RETIRED_FIELDS = [\"schemaVersion\",\"providerId\",\"allowCidrs\",\"allowHostnames\",\"userAgent\",\"maxResponseBytes\",\"maxBodyChars\",\"timeoutMs\",\"maxRedirects\"] as const\n","(function (root) {\n    'use strict';\n    // A list of regular expressions that match arbitrary IPv4 addresses,\n    // for which a number of weird notations exist.\n    // Note that an address like 0010.0xa5.1.1 is considered legal.\n    const ipv4Part = '(0?\\\\d+|0x[a-f0-9]+)';\n    const ipv4Regexes = {\n        fourOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n        threeOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n        twoOctet: new RegExp(`^${ipv4Part}\\\\.${ipv4Part}$`, 'i'),\n        longValue: new RegExp(`^${ipv4Part}$`, 'i')\n    };\n\n    // Regular Expression for checking Octal numbers\n    const octalRegex = new RegExp(`^0[0-7]+$`, 'i');\n    const hexRegex = new RegExp(`^0x[a-f0-9]+$`, 'i');\n\n    const zoneIndex = '%[0-9a-z]{1,}';\n\n    // IPv6-matching regular expressions.\n    // For IPv6, the task is simpler: it is enough to match the colon-delimited\n    // hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at\n    // the end.\n    const ipv6Part = '(?:[0-9a-f]+::?)+';\n    const ipv6Regexes = {\n        zoneIndex: new RegExp(zoneIndex, 'i'),\n        'native': new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, 'i'),\n        deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}(${zoneIndex})?)$`, 'i'),\n        transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}\\\\.${ipv4Part}(${zoneIndex})?$`, 'i')\n    };\n\n    // Expand :: in an IPv6 address or address part consisting of `parts` groups.\n    function expandIPv6 (string, parts) {\n        // More than one '::' means invalid address\n        if (string.indexOf('::') !== string.lastIndexOf('::')) {\n            return null;\n        }\n\n        let colonCount = 0;\n        let lastColon = -1;\n        let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0];\n        let replacement, replacementCount;\n\n        // Remove zone index and save it for later\n        if (zoneId) {\n            zoneId = zoneId.substring(1);\n            string = string.replace(/%.+$/, '');\n        }\n\n        // How many parts do we already have?\n        while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {\n            colonCount++;\n        }\n\n        // 0::0 is two parts more than ::\n        if (string.substr(0, 2) === '::') {\n            colonCount--;\n        }\n\n        if (string.substr(-2, 2) === '::') {\n            colonCount--;\n        }\n\n        // An address must not contain more separators than available parts,\n        // and :: must compress at least one part.\n        if (colonCount >= parts) {\n            return null;\n        }\n\n        // replacement = ':' + '0:' * (parts - colonCount)\n        replacementCount = parts - colonCount;\n        replacement = ':';\n        while (replacementCount--) {\n            replacement += '0:';\n        }\n\n        // Insert the missing zeroes\n        string = string.replace('::', replacement);\n\n        // Trim any garbage which may be hanging around if :: was at the edge in\n        // the source string\n        if (string[0] === ':') {\n            string = string.slice(1);\n        }\n\n        if (string[string.length - 1] === ':') {\n            string = string.slice(0, -1);\n        }\n\n        parts = (function () {\n            const ref = string.split(':');\n            const results = [];\n\n            for (let i = 0; i < ref.length; i++) {\n                results.push(ref[i].length > 4 ? NaN : parseInt(ref[i], 16));\n            }\n\n            return results;\n        })();\n\n        return {\n            parts: parts,\n            zoneId: zoneId\n        };\n    }\n\n    // A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.\n    function matchCIDR (first, second, partSize, cidrBits) {\n        if (first.length !== second.length) {\n            throw new Error('ipaddr: cannot match CIDR for objects with different lengths');\n        }\n\n        let part = 0;\n        let shift;\n\n        while (cidrBits > 0) {\n            shift = partSize - cidrBits;\n            if (shift < 0) {\n                shift = 0;\n            }\n\n            if (first[part] >> shift !== second[part] >> shift) {\n                return false;\n            }\n\n            cidrBits -= partSize;\n            part += 1;\n        }\n\n        return true;\n    }\n\n    function parseIntAuto (string) {\n        // Hexadecimal base 16 (0x#)\n        if (hexRegex.test(string)) {\n            return parseInt(string, 16);\n        }\n        // While octal representation is discouraged by ECMAScript 3\n        // and forbidden by ECMAScript 5, we silently allow it to\n        // work only if the rest of the string has numbers less than 8.\n        if (string[0] === '0' && !isNaN(parseInt(string[1], 10))) {\n        if (octalRegex.test(string)) {\n            return parseInt(string, 8);\n        }\n            throw new Error(`ipaddr: cannot parse ${string} as octal`);\n        }\n        // Always include the base 10 radix!\n        return parseInt(string, 10);\n    }\n\n    function padPart (part, length) {\n        while (part.length < length) {\n            part = `0${part}`;\n        }\n\n        return part;\n    }\n\n    const ipaddr = {};\n\n    // An IPv4 address (RFC791).\n    ipaddr.IPv4 = (function () {\n        // Constructs a new IPv4 address from an array of four octets\n        // in network order (MSB first)\n        // Verifies the input.\n        function IPv4 (octets) {\n            if (octets.length !== 4) {\n                throw new Error('ipaddr: ipv4 octet count should be 4');\n            }\n\n            let i, octet;\n\n            for (i = 0; i < octets.length; i++) {\n                octet = octets[i];\n                if (!((0 <= octet && octet <= 255))) {\n                    throw new Error('ipaddr: ipv4 octet should fit in 8 bits');\n                }\n            }\n\n            this.octets = octets;\n        }\n\n        // Special IPv4 address ranges.\n        // See also https://en.wikipedia.org/wiki/Reserved_IP_addresses\n        IPv4.prototype.SpecialRanges = {\n            unspecified: [[new IPv4([0, 0, 0, 0]), 8]],\n            broadcast: [[new IPv4([255, 255, 255, 255]), 32]],\n            // RFC3171\n            multicast: [[new IPv4([224, 0, 0, 0]), 4]],\n            // RFC3927\n            linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],\n            // RFC5735\n            loopback: [[new IPv4([127, 0, 0, 0]), 8]],\n            // RFC6598\n            carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],\n            // RFC1918\n            'private': [\n                [new IPv4([10, 0, 0, 0]), 8],\n                [new IPv4([172, 16, 0, 0]), 12],\n                [new IPv4([192, 168, 0, 0]), 16]\n            ],\n            // Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700\n            reserved: [\n                [new IPv4([192, 0, 0, 0]), 24],\n                [new IPv4([192, 0, 2, 0]), 24],\n                [new IPv4([192, 88, 99, 0]), 24],\n                [new IPv4([198, 18, 0, 0]), 15],\n                [new IPv4([198, 51, 100, 0]), 24],\n                [new IPv4([203, 0, 113, 0]), 24],\n                [new IPv4([240, 0, 0, 0]), 4]\n            ],\n            // RFC7534, RFC7535\n            as112: [\n                [new IPv4([192, 175, 48, 0]), 24],\n                [new IPv4([192, 31, 196, 0]), 24],\n            ],\n            // RFC7450\n            amt: [\n                [new IPv4([192, 52, 193, 0]), 24],\n            ],\n        };\n\n        // The 'kind' method exists on both IPv4 and IPv6 classes.\n        IPv4.prototype.kind = function () {\n            return 'ipv4';\n        };\n\n        // Checks if this address matches other one within given CIDR range.\n        IPv4.prototype.match = function (other, cidrRange) {\n            let ref;\n            if (cidrRange === undefined) {\n                ref = other;\n                other = ref[0];\n                cidrRange = ref[1];\n            }\n\n            if (other.kind() !== 'ipv4') {\n                throw new Error('ipaddr: cannot match ipv4 address with non-ipv4 one');\n            }\n\n            return matchCIDR(this.octets, other.octets, 8, cidrRange);\n        };\n\n        // returns a number of leading ones in IPv4 address, making sure that\n        // the rest is a solid sequence of 0's (valid netmask)\n        // returns either the CIDR length or null if mask is not valid\n        IPv4.prototype.prefixLengthFromSubnetMask = function () {\n            let cidr = 0;\n            // non-zero encountered stop scanning for zeroes\n            let stop = false;\n            // number of zeroes in octet\n            const zerotable = {\n                0: 8,\n                128: 7,\n                192: 6,\n                224: 5,\n                240: 4,\n                248: 3,\n                252: 2,\n                254: 1,\n                255: 0\n            };\n            let i, octet, zeros;\n\n            for (i = 3; i >= 0; i -= 1) {\n                octet = this.octets[i];\n                if (octet in zerotable) {\n                    zeros = zerotable[octet];\n                    if (stop && zeros !== 0) {\n                        return null;\n                    }\n\n                    if (zeros !== 8) {\n                        stop = true;\n                    }\n\n                    cidr += zeros;\n                } else {\n                    return null;\n                }\n            }\n\n            return 32 - cidr;\n        };\n\n        // Checks if the address corresponds to one of the special ranges.\n        IPv4.prototype.range = function () {\n            return ipaddr.subnetMatch(this, this.SpecialRanges);\n        };\n\n        // Returns an array of byte-sized values in network order (MSB first)\n        IPv4.prototype.toByteArray = function () {\n            return this.octets.slice(0);\n        };\n\n        // Converts this IPv4 address to an IPv4-mapped IPv6 address.\n        IPv4.prototype.toIPv4MappedAddress = function () {\n            return ipaddr.IPv6.parse(`::ffff:${this.toString()}`);\n        };\n\n        // Symmetrical method strictly for aligning with the IPv6 methods.\n        IPv4.prototype.toNormalizedString = function () {\n            return this.toString();\n        };\n\n        // Returns the address in convenient, decimal-dotted format.\n        IPv4.prototype.toString = function () {\n            return this.octets.join('.');\n        };\n\n        return IPv4;\n    })();\n\n    // A utility function to return broadcast address given the IPv4 interface and prefix length in CIDR notation\n    ipaddr.IPv4.broadcastAddressFromCIDR = function (string) {\n\n        try {\n            const cidr = this.parseCIDR(string);\n            const ipInterfaceOctets = cidr[0].toByteArray();\n            const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n            const octets = [];\n            let i = 0;\n            while (i < 4) {\n                // Broadcast address is bitwise OR between ip interface and inverted mask\n                octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);\n                i++;\n            }\n\n            return new this(octets);\n        } catch (e) {\n            throw new Error('ipaddr: the address does not have IPv4 CIDR format', { cause: e });\n        }\n    };\n\n    // Checks if a given string is formatted like IPv4 address.\n    ipaddr.IPv4.isIPv4 = function (string) {\n        return this.parser(string) !== null;\n    };\n\n    // Checks if a given string is a valid IPv4 address.\n    ipaddr.IPv4.isValid = function (string) {\n        try {\n            new this(this.parser(string));\n            return true;\n        } catch {\n            return false;\n        }\n    };\n\n    // Checks if a given string is a valid IPv4 address in CIDR notation.\n    ipaddr.IPv4.isValidCIDR = function (string) {\n        try {\n            this.parseCIDR(string);\n            return true;\n        } catch {\n            return false;\n        }\n    };\n\n    // Checks if a given string is a full four-part IPv4 Address.\n    ipaddr.IPv4.isValidFourPartDecimal = function (string) {\n        if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){3}$/)) {\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    // Checks if a given string is a full four-part IPv4 Address with CIDR prefix.\n    ipaddr.IPv4.isValidCIDRFourPartDecimal = function (string) {\n        const match = string.match(/^(.+)\\/(\\d+)$/);\n\n        if (!ipaddr.IPv4.isValidCIDR(string) || !match) {\n            return false;\n        }\n\n        return ipaddr.IPv4.isValidFourPartDecimal(match[1]);\n    };\n\n    // A utility function to return network address given the IPv4 interface and prefix length in CIDR notation\n    ipaddr.IPv4.networkAddressFromCIDR = function (string) {\n        let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;\n\n        try {\n            cidr = this.parseCIDR(string);\n            ipInterfaceOctets = cidr[0].toByteArray();\n            subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n            octets = [];\n            i = 0;\n            while (i < 4) {\n                // Network address is bitwise AND between ip interface and mask\n                octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));\n                i++;\n            }\n\n            return new this(octets);\n        } catch (e) {\n            throw new Error('ipaddr: the address does not have IPv4 CIDR format', { cause: e });\n        }\n    };\n\n    // Tries to parse and validate a string with IPv4 address.\n    // Throws an error if it fails.\n    ipaddr.IPv4.parse = function (string) {\n        const parts = this.parser(string);\n\n        if (parts === null) {\n            throw new Error('ipaddr: string is not formatted like an IPv4 Address');\n        }\n\n        return new this(parts);\n    };\n\n    // Parses the string as an IPv4 Address with CIDR Notation.\n    ipaddr.IPv4.parseCIDR = function (string) {\n        let match;\n\n        if ((match = string.match(/^(.+)\\/(\\d+)$/))) {\n            const maskLength = parseInt(match[2]);\n            if (maskLength >= 0 && maskLength <= 32) {\n                const parsed = [this.parse(match[1]), maskLength];\n                Object.defineProperty(parsed, 'toString', {\n                    value: function () {\n                        return this.join('/');\n                    }\n                });\n                return parsed;\n            }\n        }\n\n        throw new Error('ipaddr: string is not formatted like an IPv4 CIDR range');\n    };\n\n    // Classful variants (like a.b, where a is an octet, and b is a 24-bit\n    // value representing last three octets; this corresponds to a class C\n    // address) are omitted due to classless nature of modern Internet.\n    ipaddr.IPv4.parser = function (string) {\n        let match, part, value;\n\n        // parseInt recognizes all that octal & hexadecimal weirdness for us\n        if ((match = string.match(ipv4Regexes.fourOctet))) {\n            return (function () {\n                const ref = match.slice(1, 6);\n                const results = [];\n\n                for (let i = 0; i < ref.length; i++) {\n                    part = ref[i];\n                    results.push(parseIntAuto(part));\n                }\n\n                return results;\n            })();\n        } else if ((match = string.match(ipv4Regexes.longValue))) {\n            value = parseIntAuto(match[1]);\n            if (value > 0xffffffff || value < 0) {\n                throw new Error('ipaddr: address outside defined range');\n            }\n\n            return ((function () {\n                const results = [];\n                let shift;\n\n                for (shift = 0; shift <= 24; shift += 8) {\n                    results.push((value >> shift) & 0xff);\n                }\n\n                return results;\n            })()).reverse();\n        } else if ((match = string.match(ipv4Regexes.twoOctet))) {\n            return (function () {\n                const ref = match.slice(1, 4);\n                const results = [];\n\n                value = parseIntAuto(ref[1]);\n                if (value > 0xffffff || value < 0) {\n                    throw new Error('ipaddr: address outside defined range');\n                }\n\n                results.push(parseIntAuto(ref[0]));\n                results.push((value >> 16) & 0xff);\n                results.push((value >>  8) & 0xff);\n                results.push( value        & 0xff);\n\n                return results;\n            })();\n        } else if ((match = string.match(ipv4Regexes.threeOctet))) {\n            return (function () {\n                const ref = match.slice(1, 5);\n                const results = [];\n\n                value = parseIntAuto(ref[2]);\n                if (value > 0xffff || value < 0) {\n                    throw new Error('ipaddr: address outside defined range');\n                }\n\n                results.push(parseIntAuto(ref[0]));\n                results.push(parseIntAuto(ref[1]));\n                results.push((value >> 8) & 0xff);\n                results.push( value       & 0xff);\n\n                return results;\n            })();\n        } else {\n            return null;\n        }\n    };\n\n    // A utility function to return subnet mask in IPv4 format given the prefix length\n    ipaddr.IPv4.subnetMaskFromPrefixLength = function (prefix) {\n        prefix = parseInt(prefix);\n        if (Number.isNaN(prefix) || prefix < 0 || prefix > 32) {\n            throw new Error('ipaddr: invalid IPv4 prefix length');\n        }\n\n        const octets = [0, 0, 0, 0];\n        let j = 0;\n        const filledOctetCount = Math.floor(prefix / 8);\n\n        while (j < filledOctetCount) {\n            octets[j] = 255;\n            j++;\n        }\n\n        if (filledOctetCount < 4) {\n            octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);\n        }\n\n        return new this(octets);\n    };\n\n    // An IPv6 address (RFC2460)\n    ipaddr.IPv6 = (function () {\n        // Constructs an IPv6 address from an array of eight 16 - bit parts\n        // or sixteen 8 - bit parts in network order(MSB first).\n        // Throws an error if the input is invalid.\n        function IPv6 (parts, zoneId) {\n            let i, part;\n\n            if (parts.length === 16) {\n                this.parts = [];\n                for (i = 0; i <= 14; i += 2) {\n                    this.parts.push((parts[i] << 8) | parts[i + 1]);\n                }\n            } else if (parts.length === 8) {\n                this.parts = parts;\n            } else {\n                throw new Error('ipaddr: ipv6 part count should be 8 or 16');\n            }\n\n            for (i = 0; i < this.parts.length; i++) {\n                part = this.parts[i];\n                if (!((0 <= part && part <= 0xffff))) {\n                    throw new Error('ipaddr: ipv6 part should fit in 16 bits');\n                }\n            }\n\n            if (zoneId) {\n                this.zoneId = zoneId;\n            }\n        }\n\n        // Special IPv6 ranges\n        IPv6.prototype.SpecialRanges = {\n            // RFC4291, here and after\n            unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],\n            linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],\n            multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],\n            loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],\n            uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],\n            ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],\n            // RFC3879\n            deprecatedSiteLocal: [new IPv6([0xfec0, 0, 0, 0, 0, 0, 0, 0]), 10],\n            // RFC6666\n            discard: [new IPv6([0x100, 0, 0, 0, 0, 0, 0, 0]), 64],\n            // RFC6145\n            rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],\n            rfc6052: [\n                // RFC6052\n                [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],\n                // RFC8215\n                [new IPv6([0x64, 0xff9b, 0x1, 0, 0, 0, 0, 0]), 48],\n            ],\n            // RFC3056\n            '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],\n            // RFC6052, RFC6146\n            teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],\n            // RFC5180\n            benchmarking: [new IPv6([0x2001, 0x2, 0, 0, 0, 0, 0, 0]), 48],\n            // RFC7450\n            amt: [new IPv6([0x2001, 0x3, 0, 0, 0, 0, 0, 0]), 32],\n            as112v6: [\n                // RFC7535\n                [new IPv6([0x2001, 0x4, 0x112, 0, 0, 0, 0, 0]), 48],\n                // RFC7534\n                [new IPv6([0x2620, 0x4f, 0x8000, 0, 0, 0, 0, 0]), 48],\n            ],\n            // RFC4843\n            deprecatedOrchid: [new IPv6([0x2001, 0x10, 0, 0, 0, 0, 0, 0]), 28],\n            // RFC7343\n            orchid2: [new IPv6([0x2001, 0x20, 0, 0, 0, 0, 0, 0]), 28],\n            // RFC9374\n            droneRemoteIdProtocolEntityTags: [new IPv6([0x2001, 0x30, 0, 0, 0, 0, 0, 0]), 28],\n            // RFC9602\n            segmentRouting: [new IPv6([0x5f00, 0, 0, 0, 0, 0, 0, 0]), 16],\n            reserved: [\n                // RFC3849\n                [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 23],\n                // RFC2928\n                [new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32],\n                // RFC9637\n                [new IPv6([0x3fff, 0, 0, 0, 0, 0, 0, 0]), 20],\n            ],\n        };\n\n        // Checks if this address is an IPv4-mapped IPv6 address.\n        IPv6.prototype.isIPv4MappedAddress = function () {\n            return this.range() === 'ipv4Mapped';\n        };\n\n        // The 'kind' method exists on both IPv4 and IPv6 classes.\n        IPv6.prototype.kind = function () {\n            return 'ipv6';\n        };\n\n        // Checks if this address matches other one within given CIDR range.\n        IPv6.prototype.match = function (other, cidrRange) {\n            let ref;\n\n            if (cidrRange === undefined) {\n                ref = other;\n                other = ref[0];\n                cidrRange = ref[1];\n            }\n\n            if (other.kind() !== 'ipv6') {\n                throw new Error('ipaddr: cannot match ipv6 address with non-ipv6 one');\n            }\n\n            return matchCIDR(this.parts, other.parts, 16, cidrRange);\n        };\n\n        // returns a number of leading ones in IPv6 address, making sure that\n        // the rest is a solid sequence of 0's (valid netmask)\n        // returns either the CIDR length or null if mask is not valid\n        IPv6.prototype.prefixLengthFromSubnetMask = function () {\n            let cidr = 0;\n            // non-zero encountered stop scanning for zeroes\n            let stop = false;\n            // number of zeroes in octet\n            const zerotable = {\n                0: 16,\n                32768: 15,\n                49152: 14,\n                57344: 13,\n                61440: 12,\n                63488: 11,\n                64512: 10,\n                65024: 9,\n                65280: 8,\n                65408: 7,\n                65472: 6,\n                65504: 5,\n                65520: 4,\n                65528: 3,\n                65532: 2,\n                65534: 1,\n                65535: 0\n            };\n            let part, zeros;\n\n            for (let i = 7; i >= 0; i -= 1) {\n                part = this.parts[i];\n                if (part in zerotable) {\n                    zeros = zerotable[part];\n                    if (stop && zeros !== 0) {\n                        return null;\n                    }\n\n                    if (zeros !== 16) {\n                        stop = true;\n                    }\n\n                    cidr += zeros;\n                } else {\n                    return null;\n                }\n            }\n\n            return 128 - cidr;\n        };\n\n\n        // Checks if the address corresponds to one of the special ranges.\n        IPv6.prototype.range = function () {\n            return ipaddr.subnetMatch(this, this.SpecialRanges);\n        };\n\n        // Returns an array of byte-sized values in network order (MSB first)\n        IPv6.prototype.toByteArray = function () {\n            let part;\n            const bytes = [];\n            const ref = this.parts;\n            for (let i = 0; i < ref.length; i++) {\n                part = ref[i];\n                bytes.push(part >> 8);\n                bytes.push(part & 0xff);\n            }\n\n            return bytes;\n        };\n\n        // Returns the address in expanded format with all zeroes included, like\n        // 2001:0db8:0008:0066:0000:0000:0000:0001\n        IPv6.prototype.toFixedLengthString = function () {\n            const addr = ((function () {\n                const results = [];\n                for (let i = 0; i < this.parts.length; i++) {\n                    results.push(padPart(this.parts[i].toString(16), 4));\n                }\n\n                return results;\n            }).call(this)).join(':');\n\n            let suffix = '';\n\n            if (this.zoneId) {\n                suffix = `%${this.zoneId}`;\n            }\n\n            return addr + suffix;\n        };\n\n        // Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address.\n        // Throws an error otherwise.\n        IPv6.prototype.toIPv4Address = function () {\n            if (!this.isIPv4MappedAddress()) {\n                throw new Error('ipaddr: trying to convert a generic ipv6 address to ipv4');\n            }\n\n            const ref = this.parts.slice(-2);\n            const high = ref[0];\n            const low = ref[1];\n\n            return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);\n        };\n\n        // Returns the address in expanded format with all zeroes included, like\n        // 2001:db8:8:66:0:0:0:1\n        //\n        // Deprecated: use toFixedLengthString() instead.\n        IPv6.prototype.toNormalizedString = function () {\n            const addr = ((function () {\n                const results = [];\n\n                for (let i = 0; i < this.parts.length; i++) {\n                    results.push(this.parts[i].toString(16));\n                }\n\n                return results;\n            }).call(this)).join(':');\n\n            let suffix = '';\n\n            if (this.zoneId) {\n                suffix = `%${this.zoneId}`;\n            }\n\n            return addr + suffix;\n        };\n\n        // Returns the address in compact, human-readable format like\n        // 2001:db8:8:66::1\n        // in line with RFC 5952 (see https://tools.ietf.org/html/rfc5952#section-4)\n        IPv6.prototype.toRFC5952String = function () {\n            const regex = /((^|:)(0(:|$)){2,})/g;\n            // The zone identifier (RFC 4007) is not part of the address; match\n            // against the address alone so a trailing zero run right before the\n            // \"%\" suffix still gets compressed (RFC 5952, 4.2.2).\n            let suffix = '';\n            if (this.zoneId) {\n                suffix = `%${this.zoneId}`;\n            }\n            const normalized = this.toNormalizedString();\n            const string = normalized.slice(0, normalized.length - suffix.length);\n            let bestMatchIndex = 0;\n            let bestMatchLength = -1;\n            let bestMatchGroups = -1;\n            let match;\n\n            while ((match = regex.exec(string))) {\n                // Compare by the number of zero groups, not the matched length:\n                // a run that is not at the start carries a leading \":\" in the\n                // match, so an equal-length run later in the address would\n                // otherwise be preferred over the leftmost one (RFC 5952, 4.2.3).\n                const groups = (match[0].match(/0/g) || []).length;\n                if (groups > bestMatchGroups) {\n                    bestMatchGroups = groups;\n                    bestMatchIndex = match.index;\n                    bestMatchLength = match[0].length;\n                }\n            }\n\n            if (bestMatchLength < 0) {\n                return string + suffix;\n            }\n\n            return `${string.substring(0, bestMatchIndex)}::${string.substring(bestMatchIndex + bestMatchLength)}${suffix}`;\n        };\n\n        // Returns the address in compact, human-readable format like\n        // 2001:db8:8:66::1\n        // Calls toRFC5952String under the hood.\n        IPv6.prototype.toString = function () {\n            return this.toRFC5952String();\n        };\n\n        return IPv6;\n\n    })();\n\n    // A utility function to return broadcast address given the IPv6 interface and prefix length in CIDR notation\n    ipaddr.IPv6.broadcastAddressFromCIDR = function (string) {\n        try {\n            const cidr = this.parseCIDR(string);\n            const ipInterfaceOctets = cidr[0].toByteArray();\n            const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n            const octets = [];\n            let i = 0;\n            while (i < 16) {\n                // Broadcast address is bitwise OR between ip interface and inverted mask\n                octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);\n                i++;\n            }\n\n            return new this(octets);\n        } catch (e) {\n            throw new Error('ipaddr: the address does not have IPv6 CIDR format', { cause: e });\n        }\n    };\n\n    // Checks if a given string is formatted like IPv6 address.\n    ipaddr.IPv6.isIPv6 = function (string) {\n        return this.parser(string) !== null;\n    };\n\n    // Checks to see if string is a valid IPv6 Address\n    ipaddr.IPv6.isValid = function (string) {\n\n        // Since IPv6.isValid is always called first, this shortcut\n        // provides a substantial performance gain.\n        if (typeof string === 'string' && string.indexOf(':') === -1) {\n            return false;\n        }\n\n        try {\n            const addr = this.parser(string);\n            new this(addr.parts, addr.zoneId);\n            return true;\n        } catch {\n            return false;\n        }\n    };\n\n    // Checks if a given string is a valid IPv6 address in CIDR notation.\n    ipaddr.IPv6.isValidCIDR = function (string) {\n\n        // See note in IPv6.isValid\n        if (typeof string === 'string' && string.indexOf(':') === -1) {\n            return false;\n        }\n\n        try {\n            this.parseCIDR(string);\n            return true;\n        } catch {\n            return false;\n        }\n    };\n\n    // A utility function to return network address given the IPv6 interface and prefix length in CIDR notation\n    ipaddr.IPv6.networkAddressFromCIDR = function (string) {\n        let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;\n\n        try {\n            cidr = this.parseCIDR(string);\n            ipInterfaceOctets = cidr[0].toByteArray();\n            subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n            octets = [];\n            i = 0;\n            while (i < 16) {\n                // Network address is bitwise AND between ip interface and mask\n                octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));\n                i++;\n            }\n\n            return new this(octets);\n        } catch (e) {\n            throw new Error('ipaddr: the address does not have IPv6 CIDR format', { cause: e });\n        }\n    };\n\n    // Tries to parse and validate a string with IPv6 address.\n    // Throws an error if it fails.\n    ipaddr.IPv6.parse = function (string) {\n        const addr = this.parser(string);\n\n        if (addr === null) {\n            throw new Error('ipaddr: string is not formatted like an IPv6 Address');\n        }\n\n        return new this(addr.parts, addr.zoneId);\n    };\n\n    ipaddr.IPv6.parseCIDR = function (string) {\n        let maskLength, match, parsed;\n\n        if ((match = string.match(/^(.+)\\/(\\d+)$/))) {\n            maskLength = parseInt(match[2]);\n            if (maskLength >= 0 && maskLength <= 128) {\n                parsed = [this.parse(match[1]), maskLength];\n                Object.defineProperty(parsed, 'toString', {\n                    value: function () {\n                        return this.join('/');\n                    }\n                });\n                return parsed;\n            }\n        }\n\n        throw new Error('ipaddr: string is not formatted like an IPv6 CIDR range');\n    };\n\n    // Parse an IPv6 address.\n    ipaddr.IPv6.parser = function (string) {\n        let addr, i, match, octet, octets, zoneId;\n\n        if ((match = string.match(ipv6Regexes.deprecatedTransitional))) {\n            return this.parser(`::ffff:${match[1]}`);\n        }\n        if (ipv6Regexes.native.test(string)) {\n            return expandIPv6(string, 8);\n        }\n        if ((match = string.match(ipv6Regexes.transitional))) {\n            zoneId = match[6] || '';\n            addr = match[1]\n            if (!match[1].endsWith('::')) {\n                addr = addr.slice(0, -1)\n            }\n            addr = expandIPv6(addr + zoneId, 6);\n            if (addr && addr.parts) {\n                octets = [\n                    parseInt(match[2]),\n                    parseInt(match[3]),\n                    parseInt(match[4]),\n                    parseInt(match[5])\n                ];\n                for (i = 0; i < octets.length; i++) {\n                    octet = octets[i];\n                    if (!((0 <= octet && octet <= 255))) {\n                        return null;\n                    }\n                }\n\n                addr.parts.push(octets[0] << 8 | octets[1]);\n                addr.parts.push(octets[2] << 8 | octets[3]);\n                return {\n                    parts: addr.parts,\n                    zoneId: addr.zoneId\n                };\n            }\n        }\n\n        return null;\n    };\n\n    // A utility function to return subnet mask in IPv6 format given the prefix length\n    ipaddr.IPv6.subnetMaskFromPrefixLength = function (prefix) {\n        prefix = parseInt(prefix);\n        if (Number.isNaN(prefix) || prefix < 0 || prefix > 128) {\n            throw new Error('ipaddr: invalid IPv6 prefix length');\n        }\n\n        const octets = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n        let j = 0;\n        const filledOctetCount = Math.floor(prefix / 8);\n\n        while (j < filledOctetCount) {\n            octets[j] = 255;\n            j++;\n        }\n\n        if (filledOctetCount < 16) {\n            octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);\n        }\n\n        return new this(octets);\n    };\n\n    // Try to parse an array in network order (MSB first) for IPv4 and IPv6\n    ipaddr.fromByteArray = function (bytes) {\n        const length = bytes.length;\n\n        if (length === 4) {\n            return new ipaddr.IPv4(bytes);\n        } else if (length === 16) {\n            return new ipaddr.IPv6(bytes);\n        } else {\n            throw new Error('ipaddr: the binary input is neither an IPv6 nor IPv4 address');\n        }\n    };\n\n    // Checks if the address is valid IP address\n    ipaddr.isValid = function (string) {\n        return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);\n    };\n\n    // Checks if the address is valid IP address in CIDR notation\n    ipaddr.isValidCIDR = function (string) {\n        return ipaddr.IPv6.isValidCIDR(string) || ipaddr.IPv4.isValidCIDR(string);\n    };\n\n\n    // Attempts to parse an IP Address, first through IPv6 then IPv4.\n    // Throws an error if it could not be parsed.\n    ipaddr.parse = function (string) {\n        if (ipaddr.IPv6.isValid(string)) {\n            return ipaddr.IPv6.parse(string);\n        } else if (ipaddr.IPv4.isValid(string)) {\n            return ipaddr.IPv4.parse(string);\n        } else {\n            throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format');\n        }\n    };\n\n    // Attempt to parse CIDR notation, first through IPv6 then IPv4.\n    // Throws an error if it could not be parsed.\n    ipaddr.parseCIDR = function (string) {\n        try {\n            return ipaddr.IPv6.parseCIDR(string);\n        } catch {\n            try {\n                return ipaddr.IPv4.parseCIDR(string);\n            } catch (e) {\n                throw new Error('ipaddr: the address has neither IPv6 nor IPv4 CIDR format', { cause: e });\n            }\n        }\n    };\n\n    // Parse an address and return plain IPv4 address if it is an IPv4-mapped address\n    ipaddr.process = function (string) {\n        const addr = this.parse(string);\n\n        if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {\n            return addr.toIPv4Address();\n        } else {\n            return addr;\n        }\n    };\n\n    // An utility function to ease named range matching. See examples below.\n    // rangeList can contain both IPv4 and IPv6 subnet entries and will not throw errors\n    // on matching IPv4 addresses to IPv6 ranges or vice versa.\n    ipaddr.subnetMatch = function (address, rangeList, defaultName) {\n        let i, rangeName, rangeSubnets, subnet;\n\n        if (defaultName === undefined || defaultName === null) {\n            defaultName = 'unicast';\n        }\n\n        for (rangeName in rangeList) {\n            if (Object.prototype.hasOwnProperty.call(rangeList, rangeName)) {\n                rangeSubnets = rangeList[rangeName];\n                // ECMA5 Array.isArray isn't available everywhere\n                if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {\n                    rangeSubnets = [rangeSubnets];\n                }\n\n                for (i = 0; i < rangeSubnets.length; i++) {\n                    subnet = rangeSubnets[i];\n                    if (address.kind() === subnet[0].kind() && address.match.apply(address, subnet)) {\n                        return rangeName;\n                    }\n                }\n            }\n        }\n\n        return defaultName;\n    };\n\n    // Export for both the CommonJS and browser-like environment\n    if (typeof module !== 'undefined' && module.exports) {\n        module.exports = ipaddr;\n\n    } else {\n        root.ipaddr = ipaddr;\n    }\n\n}(this));\n","/**\n * Grammar of the local provider's allowlist rules. The Host policy and the\n * settings page parse with this one module, so a line the page accepts is a\n * line the Host accepts, and a refused line can be explained and corrected\n * in the browser instead of failing a save.\n */\nimport ipaddr from 'ipaddr.js'\n\n/** A parsed IPv4 or IPv6 address. */\nexport type IpAddress = ipaddr.IPv4 | ipaddr.IPv6\n\n/** A CIDR written as its network base address. */\nexport interface Cidr {\n  readonly network: IpAddress\n  readonly prefixLength: number\n}\n\n/** An exact hostname, or a left-most wildcard matching strict subdomains of `suffix`. */\nexport type HostnameRule =\n  | { readonly kind: 'exact'; readonly hostname: string }\n  | { readonly kind: 'suffix'; readonly suffix: string }\n\n/** Why a rule line is refused; `fix` is the corrected line when exactly one is meant. */\nexport type RuleProblem =\n  /** Not a CIDR or hostname at all. */\n  | { readonly code: 'syntax' }\n  /** IPv4 written in a form other than four decimal octets, such as `010.0.0.0/8` or `10.1/16`. */\n  | { readonly code: 'ipv4-form' }\n  /** An IPv6 zone id such as `%eth0`, which no destination address carries. */\n  | { readonly code: 'zone' }\n  /** An IPv4-mapped or IPv4-compatible IPv6 CIDR; addresses are matched as IPv4. */\n  | { readonly code: 'mapped'; readonly fix?: string }\n  /** Host bits set below the prefix; the rule must name its network address. */\n  | { readonly code: 'host-bits'; readonly fix: string }\n  /** A `*` anywhere but a whole left-most label. */\n  | { readonly code: 'wildcard' }\n  /** A wildcard over an IP address. */\n  | { readonly code: 'wildcard-ip' }\n  /** A URL, path, or port where a bare hostname belongs. */\n  | { readonly code: 'not-hostname'; readonly fix: string }\n\n/** Accepted CIDRs that deserve a second look before they widen reachability. */\nexport type CidrWarning =\n  /** A public range: public addresses are reachable without any rule. */\n  | 'public'\n  /** Shorter than /8 (IPv4) or /16 (IPv6). */\n  | 'broad'\n  /** Includes this machine's loopback address. */\n  | 'loopback'\n  /** Includes the cloud instance metadata endpoint. */\n  | 'metadata'\n\n/** Outcome of parsing one rule line. */\nexport type ParseResult<T> = { readonly ok: true; readonly value: T } | { readonly ok: false; readonly problem: RuleProblem }\n\nconst DECIMAL_IPV4 = /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/\nconst PREFIX = /^(?:0|[1-9]\\d*)$/\nconst LOOPBACK = parseRanges(['127.0.0.0/8', '::1/128'])\nconst METADATA = parseRanges(['169.254.169.254/32', 'fd00:ec2::254/128'])\n// Union of ipaddr.js 2.5's non-unicast ranges (nested ranges are redundant).\n// Keep this aligned with range(), which the destination policy uses. Inspecting\n// only the rule's base or endpoints misses special ranges inside a larger CIDR.\nconst NON_PUBLIC = parseRanges([\n  '0.0.0.0/8', '10.0.0.0/8', '100.64.0.0/10', '127.0.0.0/8',\n  '169.254.0.0/16', '172.16.0.0/12', '192.168.0.0/16',\n  '192.0.0.0/24', '192.0.2.0/24', '192.88.99.0/24',\n  '198.18.0.0/15', '198.51.100.0/24', '203.0.113.0/24',\n  '192.175.48.0/24', '192.31.196.0/24', '192.52.193.0/24',\n  '224.0.0.0/4', '240.0.0.0/4',\n  '::/128', '::1/128', '::ffff:0:0/96', 'fe80::/10', 'ff00::/8',\n  'fc00::/7', 'fec0::/10', '100::/64', '::ffff:0:0:0/96',\n  '64:ff9b::/96', '64:ff9b:1::/48', '2002::/16',\n  '2001::/23', '2001:db8::/32', '2620:4f:8000::/48',\n  '5f00::/16', '3fff::/20',\n])\n\n/**\n * Parse one CIDR rule.\n * @param input - one line as typed; surrounding whitespace is ignored.\n * @returns the CIDR, or why it is refused.\n */\nexport function parseCidr(input: string): ParseResult<Cidr> {\n  const [address = '', prefix, ...extra] = input.trim().split('/')\n  if (prefix === undefined || extra.length > 0 || !PREFIX.test(prefix)) return refuse('syntax')\n  if (address.includes('%')) return refuse('zone')\n  const prefixLength = Number(prefix)\n  let network: IpAddress\n  if (address.includes(':')) {\n    if (!ipaddr.IPv6.isValid(address) || prefixLength > 128) return refuse('syntax')\n    network = ipaddr.IPv6.parse(address)\n    const bytes = network.toByteArray()\n    const compatible = network.range() !== 'unspecified' && network.range() !== 'loopback' && bytes.slice(0, 12).every(byte => byte === 0)\n    if (network.isIPv4MappedAddress() || compatible) {\n      const fix = prefixLength >= 96 ? `${new ipaddr.IPv4(bytes.slice(12)).toString()}/${prefixLength - 96}` : undefined\n      return { ok: false, problem: fix === undefined ? { code: 'mapped' } : { code: 'mapped', fix } }\n    }\n  } else {\n    if (!DECIMAL_IPV4.test(address)) return refuse(ipaddr.IPv4.isValid(address) ? 'ipv4-form' : 'syntax')\n    if (prefixLength > 32) return refuse('syntax')\n    network = ipaddr.IPv4.parse(address)\n  }\n  const base = network.kind() === 'ipv4'\n    ? ipaddr.IPv4.networkAddressFromCIDR(`${address}/${prefixLength}`)\n    : ipaddr.IPv6.networkAddressFromCIDR(`${address}/${prefixLength}`)\n  if (base.toString() !== network.toString()) {\n    return { ok: false, problem: { code: 'host-bits', fix: `${base.toString()}/${prefixLength}` } }\n  }\n  return { ok: true, value: { network, prefixLength } }\n}\n\n/**\n * Parse one hostname rule: an exact hostname, an IP literal, or `*.` plus a hostname.\n * @param input - one line as typed; surrounding whitespace is ignored.\n * @returns the normalized rule, or why it is refused.\n */\nexport function parseHostnameRule(input: string): ParseResult<HostnameRule> {\n  const source = input.trim()\n  if (source.startsWith('*.')) {\n    const base = source.slice(2)\n    if (base.includes('*')) return refuse('wildcard')\n    const parsed = parseHostname(base)\n    if (!parsed.ok) return parsed\n    if (isIpLiteral(parsed.value)) return refuse('wildcard-ip')\n    return { ok: true, value: { kind: 'suffix', suffix: `.${parsed.value}` } }\n  }\n  if (source.includes('*')) return refuse('wildcard')\n  const parsed = parseHostname(source)\n  return parsed.ok ? { ok: true, value: { kind: 'exact', hostname: parsed.value } } : parsed\n}\n\n/**\n * Notes about an accepted CIDR that widens reachability more than its author may intend.\n * @param cidr - an accepted rule.\n * @returns every warning that applies, most severe first.\n */\nexport function cidrWarnings(cidr: Cidr): CidrWarning[] {\n  const intersects = (targets: readonly Cidr[]) => targets.some(target => intersectsCidr(target, cidr))\n  const warnings: CidrWarning[] = []\n  if (intersects(METADATA)) warnings.push('metadata')\n  if (intersects(LOOPBACK)) warnings.push('loopback')\n  if (cidr.prefixLength < (cidr.network.kind() === 'ipv4' ? 8 : 16)) warnings.push('broad')\n  else if (!intersects(NON_PUBLIC)) warnings.push('public')\n  return warnings\n}\n\n/**\n * Whether an address lies inside a CIDR of the same family.\n * @param address - the parsed address.\n * @param cidr - the rule.\n * @returns true for a match.\n */\nexport function matchesCidr(address: IpAddress, cidr: Cidr): boolean {\n  return address.kind() === cidr.network.kind() && address.match(cidr.network, cidr.prefixLength)\n}\n\n/**\n * Normalize a URL hostname for rule comparison: no IPv6 brackets, no trailing\n * dot, lower case, and IP literals in canonical form.\n * @param hostname - `URL.hostname` or a rule's host part.\n * @returns the comparable form.\n */\nexport function normalizeHost(hostname: string): string {\n  const host = stripIpv6Brackets(hostname).replace(/\\.$/, '').toLowerCase()\n  return ipaddr.IPv6.isValid(host) ? ipaddr.IPv6.parse(host).toString() : host\n}\n\n/** WHATWG URL keeps brackets around an IPv6 hostname; address parsers do not. */\nexport function stripIpv6Brackets(hostname: string): string {\n  return hostname.startsWith('[') && hostname.endsWith(']') ? hostname.slice(1, -1) : hostname\n}\n\n/** English diagnostic for an invalid operator rule. */\nexport function describeProblem(problem: RuleProblem): string {\n  switch (problem.code) {\n    case 'syntax': return 'is not valid'\n    case 'ipv4-form': return 'must write IPv4 as four decimal octets'\n    case 'zone': return 'must not carry an IPv6 zone id'\n    case 'mapped': return `is IPv4-mapped; write the IPv4 CIDR${problem.fix === undefined ? '' : ` ${problem.fix}`}`\n    case 'host-bits': return `must name its network address ${problem.fix}`\n    case 'wildcard': return 'may use * only as the whole left-most label'\n    case 'wildcard-ip': return 'cannot wildcard an IP address'\n    case 'not-hostname': return `must be a bare hostname such as ${problem.fix}`\n  }\n}\n\nfunction parseHostname(source: string): ParseResult<string> {\n  if (source === '' || /[\\s@\\\\]/.test(source)) return refuse('syntax')\n  const bare = stripIpv6Brackets(source)\n  if (bare.includes('%')) return refuse('zone')\n  if (DECIMAL_IPV4.test(bare)) return { ok: true, value: bare }\n  if (ipaddr.IPv6.isValid(bare)) {\n    // Only forms a URL can carry: the URL parser refuses, for example, a zero-padded IPv4 tail.\n    const url = URL.parse(`http://[${bare}]/`)\n    return url === null ? refuse('syntax') : { ok: true, value: normalizeHost(url.hostname) }\n  }\n  // A URL, a path, or a port: offer the hostname it names.\n  if (/[/:?#]/.test(source)) {\n    const url = URL.parse(/^[a-z][a-z\\d+.-]*:\\/\\//i.test(source) ? source : `http://${source}`)\n    if (url === null || url.hostname === '') return refuse('syntax')\n    return { ok: false, problem: { code: 'not-hostname', fix: normalizeHost(url.hostname) } }\n  }\n  const url = URL.parse(`http://${source}/`)\n  return url === null || url.hostname === '' ? refuse('syntax') : { ok: true, value: normalizeHost(url.hostname) }\n}\n\nfunction parseRanges(rules: readonly string[]): Cidr[] {\n  return rules.map(rule => {\n    const [network, prefixLength] = ipaddr.parseCIDR(rule)\n    return { network, prefixLength }\n  })\n}\n\nfunction intersectsCidr(left: Cidr, right: Cidr): boolean {\n  return left.network.kind() === right.network.kind()\n    && left.network.match(right.network, Math.min(left.prefixLength, right.prefixLength))\n}\n\nfunction isIpLiteral(host: string): boolean {\n  return DECIMAL_IPV4.test(host) || ipaddr.IPv6.isValid(host)\n}\n\nfunction refuse(code: 'syntax' | 'ipv4-form' | 'zone' | 'wildcard' | 'wildcard-ip'): { ok: false; problem: RuleProblem } {\n  return { ok: false, problem: { code } }\n}\n","import { z } from 'zod'\nimport { RETIRED_FIELDS } from './retired.ts'\nimport { resolveDocument } from 'dsh-tool-web-enhanced-core/shared'\nimport { CATALOG, DEFAULT_CONNECTION, DEFAULT_LOCAL_SETTINGS, type AdapterKey, type NativeKey } from '../catalog.ts'\nimport { describeProblem, parseCidr, parseHostnameRule } from '../local/rules.ts'\nimport type { Connection, LocalSettings, ResolvedSettings } from './types.ts'\nexport type { AdapterConnection, Connection, CustomConnection, LocalConnection, LocalSettings, NativeConnection, ResolvedSettings } from './types.ts'\n\nconst localOptions = z.strictObject({\n  allowCidrs: z.array(z.string()).default(() => []), allowHostnames: z.array(z.string()).default(() => []),\n  userAgent: z.string().default(DEFAULT_LOCAL_SETTINGS.userAgent),\n  maxResponseBytes: z.number().default(DEFAULT_LOCAL_SETTINGS.maxResponseBytes),\n  maxBodyChars: z.number().default(DEFAULT_LOCAL_SETTINGS.maxBodyChars),\n  timeoutMs: z.number().default(DEFAULT_LOCAL_SETTINGS.timeoutMs),\n  maxRedirects: z.number().default(DEFAULT_LOCAL_SETTINGS.maxRedirects),\n})\n\n\n/** Pure sparse resolution shared by Host and browser. */\nexport function resolveSettings(document: unknown = {}): ResolvedSettings {\n  const resolved = resolveDocument({ catalog: CATALOG, document, retiredFields: RETIRED_FIELDS, defaults: { schema: z.strictObject({}), defaultConnection: DEFAULT_CONNECTION }, capabilityLabel: 'fetch' })\n  const connections = new Map<string, Connection>()\n  for (const [id, connection] of resolved.connections) {\n    const { catalogKey, ...base } = connection\n    if (base.kind === 'model') throw new Error('fetch catalog cannot contain a model connection')\n    const path = 'connections.' + id\n    if (base.kind === 'local') {\n      const options: LocalSettings = localOptions.parse(base.options)\n      options.allowCidrs.forEach((entry, index) => {\n        const result = parseCidr(entry)\n        if (!result.ok) invalidRule(path, 'allowCidrs', index, describeProblem(result.problem))\n      })\n      options.allowHostnames.forEach((entry, index) => {\n        const result = parseHostnameRule(entry)\n        if (!result.ok) invalidRule(path, 'allowHostnames', index, describeProblem(result.problem))\n      })\n      connections.set(id, { ...base, options })\n    } else if (base.kind === 'native') {\n      connections.set(id, { ...base, kind: 'native', native: catalogKey as NativeKey, access: 'api-key' })\n    } else {\n      connections.set(id, { ...base, kind: 'adapter', adapter: catalogKey as AdapterKey })\n    }\n  }\n  return { ...resolved, connections }\n}\nfunction invalidRule(path: string, field: string, index: number, reason: string): never {\n  throw new Error('invalid fetch settings: ' + path + '.options.' + field + ' entry ' + (index + 1) + ': ' + reason)\n}\n","/** Read-only facts the settings page derives from the effective settings and the catalog. */\nimport { builtinId } from 'dsh-tool-web-enhanced-core/shared'\nimport {\n  connectionChoices as catalogChoices, connectionName as catalogConnectionName, credentialRefs as catalogCredentialRefs,\n  type Choice, type ClientTranslate, type OptionCopy, type OptionCopyTable,\n} from 'dsh-tool-web-enhanced-core/client'\nimport { CATALOG, type CatalogKey } from '../../catalog.ts'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport { connectionLabel, type Translate } from '../connections.ts'\nimport type { LocaleKey } from '../locales.ts'\nexport { builtinOverride } from 'dsh-tool-web-enhanced-core/client'\n\n/** Every credential reference the page reports on. */\nexport const credentialRefs = (config: FetchSettings): string[] => catalogCredentialRefs(CATALOG, config)\n\n/** Catalog name of an entry; the local connection is named in the conversation's language. */\nexport const catalogLabel = (key: CatalogKey, t: Translate): string => connectionLabel({ id: builtinId(key), label: CATALOG[key].label }, t)\n\n/** Connections a default can name, in catalog order. */\nexport const connectionChoices = (config: FetchSettings, t: Translate): Choice[] => catalogChoices(CATALOG, config, key => catalogLabel(key, t))\n\nexport const connectionName = (id: string, config: FetchSettings, t: Translate): string => catalogConnectionName(CATALOG, config, id, key => catalogLabel(key, t))\n\nconst OPTION_COPY: Readonly<Record<CatalogKey, Readonly<Record<string, OptionCopy<LocaleKey>>>>> = {\n  local: {\n    userAgent: { label: 'option.local.userAgent' },\n    maxResponseBytes: { label: 'option.local.maxResponseBytes' },\n    maxBodyChars: { label: 'option.local.maxBodyChars' },\n    timeoutMs: { label: 'option.local.timeoutMs' },\n    maxRedirects: { label: 'option.local.maxRedirects' },\n  },\n  'deepseek-fetch-api': {\n    baseURL: { label: 'option.native.baseURL' },\n  },\n  exa: {\n    maxAgeHours: { label: 'option.exa.maxAgeHours', placeholder: 'option.exa.maxAgeHours.placeholder', hint: 'option.exa.maxAgeHours.hint' },\n    livecrawlTimeout: { label: 'option.exa.livecrawlTimeout' },\n  },\n  firecrawl: {\n    onlyMainContent: { label: 'option.firecrawl.onlyMainContent' },\n    maxAge: { label: 'option.firecrawl.maxAge', placeholder: 'option.firecrawl.maxAge.placeholder', hint: 'option.firecrawl.maxAge.hint' },\n    storeInCache: { label: 'option.firecrawl.storeInCache' },\n    timeout: { label: 'option.firecrawl.timeout' },\n    waitFor: { label: 'option.firecrawl.waitFor' },\n    proxy: { label: 'option.firecrawl.proxy' },\n  },\n  tavily: {\n    extract_depth: { label: 'option.tavily.extract_depth' },\n    format: { label: 'option.tavily.format' },\n    timeout: { label: 'option.tavily.timeout' },\n  },\n  tinyfish: {\n    ttl: { label: 'option.tinyfish.ttl', placeholder: 'option.tinyfish.ttl.placeholder', hint: 'option.tinyfish.ttl.hint' },\n    per_url_timeout_ms: { label: 'option.tinyfish.per_url_timeout_ms' },\n  },\n  anysearch: {},\n}\n\n/** Copy for the options of one catalog entry; an option without copy yet falls back to a generic label. */\nexport const optionCopy = (key: CatalogKey): OptionCopyTable<LocaleKey> => ({ options: OPTION_COPY[key], fallback: 'options.title' })\n\n/** How each remote service handles what it receives, as far as its published terms say. */\nexport const SERVICE_NOTES = {\n  exa: 'services.note.exa',\n  firecrawl: 'services.note.firecrawl',\n  tavily: 'services.note.tavily',\n  tinyfish: 'services.note.tinyfish',\n  anysearch: 'services.note.anysearch',\n} as const satisfies Partial<Record<CatalogKey, LocaleKey>>\n\nconst VALUE_LABELS: Readonly<Record<string, LocaleKey>> = {\n  auto: 'value.auto', basic: 'value.basic', enhanced: 'value.enhanced', advanced: 'value.advanced', markdown: 'value.markdown', text: 'value.text',\n}\n\n/** Localized enum value where it is a word; codes stay verbatim. */\nexport function valueLabel(value: string, t: ClientTranslate<LocaleKey>): string {\n  const key = Object.hasOwn(VALUE_LABELS, value) ? VALUE_LABELS[value] : undefined\n  return key === undefined ? value : t(key)\n}\n","/** Shared copy for the fetch command, connection menu and row settings. */\nexport const NS = 'web-fetch-enhanced'\n\nexport const en = {\n  \"section.title\": \"Fetch\",\n  \"source.session\": \"This conversation\",\n  \"source.inherited\": \"Parent conversation\",\n  \"source.model\": \"Model's last choice\",\n  \"source.default\": \"Default connection\",\n  \"access.apiKey\": \"API key\",\n  \"access.keyless\": \"No key needed\",\n  \"access.account\": \"DeepSeek account\",\n  \"access.local\": \"Direct HTTP access\",\n  \"connection.off\": \"Fetch off\",\n  \"connection.local\": \"Local HTTP\",\n  \"status.disabled\": \"{name} is turned off in settings.\",\n  \"status.needsAccount\": \"Needs a DeepSeek account or API key\",\n  \"status.unsupported\": \"{name} is not supported in this version.\",\n  \"status.short.needsCredential\": \"Needs key\",\n  \"status.short.unsupported\": \"Not supported\",\n  \"selector.services\": \"Fetch connections\",\n  \"selector.offRow\": \"Off\",\n  \"write.conflict\": \"Fetch was changed elsewhere. The menu now shows the current choice.\",\n  \"write.unavailable\": \"That connection is turned off or was removed.\",\n  \"write.failed\": \"Not saved. Try again.\",\n  \"command.label\": \"Fetch connection\",\n  \"command.description\": \"Switch the fetch connection of this conversation\",\n  \"command.placeholder\": \"Filter fetch connections\",\n  \"command.empty\": \"No fetch connection is enabled\",\n  \"command.noResults\": \"No matching option\",\n  \"command.current\": \"Current\",\n  \"command.readFailed\": \"Could not load fetch settings. Try again.\",\n  \"settings.intro\": \"Each conversation chooses a fetch connection with the globe button or /setup-fetch. Set the default and each connection below. Status dots show configuration only, not service health.\",\n  \"settings.loading\": \"Loading settings…\",\n  \"settings.readOnly\": \"These settings are read-only.\",\n  \"settings.unsupported\": \"These settings can't be read. They may be from 0.1.x or a newer version. Restore the defaults below, or upgrade the plugin.\",\n  \"settings.refused\": \"Not saved. The settings may have changed elsewhere; review and try again.\",\n  \"settings.invalid\": \"Invalid settings; not saved.\",\n  \"settings.failed\": \"Not saved. Check the connection to DSH and try again.\",\n  \"route.unknown\": \"Can't confirm that web fetch goes through this plugin.\",\n  \"route.auto\": \"No fetch service is selected, so these settings may not apply. Open this bundle on the Plugins page to fix it.\",\n  \"route.other\": \"Web fetch currently uses {provider}, so these settings don't apply. Check this bundle on the Plugins page.\",\n  \"defaults.title\": \"Defaults\",\n  \"defaults.showSelector\": \"Show fetch connections in the composer menu\",\n  \"defaults.showSelectorHint\": \"When hidden, switch the current conversation with /setup-fetch.\",\n  \"defaults.connection\": \"Default connection\",\n  \"defaults.connectionHint\": \"A conversation that hasn't chosen uses, in order: its parent's choice (forked conversations only), the last choice for its model, then the default.\",\n  \"defaults.connectionUnset\": \"Default ({name})\",\n  \"defaults.connectionMissing\": \"Missing: {id}\",\n  \"services.title\": \"Fetch connections\",\n  \"services.optInNotice\": \"Remote services are off by default.\",\n  \"enhanced.title\": \"Enhanced tools\",\n  \"enhanced.description\": \"Lets the Agent pick which enabled service fetches a URL with web_fetch_enhanced, and see the choices with list_web_fetch_providers. Applies to conversations started afterwards.\",\n  \"enhanced.consent\": \"Turning this on means you agree that when the Agent picks a service, the URL is sent to that service.\",\n  \"services.enable\": \"Enable {name}\",\n  \"services.configure\": \"Configure\",\n  \"services.configureLabel\": \"Configure {name}\",\n  \"services.off\": \"Off\",\n  \"services.keyless\": \"No key needed\",\n  \"services.personalKey\": \"Personal key {ref}\",\n  \"services.account\": \"DeepSeek account or {ref}\",\n  \"services.access\": \"Access\",\n  \"services.accessKeyless\": \"Without a key\",\n  \"services.accessPersonal\": \"Personal key\",\n  \"services.accessHint.keyless\": \"Your API key is never sent.\",\n  \"services.accessHint.apiKey\": \"Uses your API key.\",\n  \"services.accountHint\": \"Conversations using a DeepSeek account model use that account; other conversations use the API key below.\",\n  \"services.getKey\": \"Get an API key\",\n  \"services.remoteNotice\": \"The URL is sent to {name}, which decides what it can reach.\",\n  \"credential.label\": \"API key\",\n  \"credential.placeholder\": \"Enter a new key\",\n  \"credential.save\": \"Save key\",\n  \"credential.saved\": \"Key saved.\",\n  \"credential.failed\": \"The key was not saved. Try again.\",\n  \"credential.hint\": \"Stored in DSH Credentials as {ref}, never in settings.\",\n  \"credential.set\": \"Configured\",\n  \"credential.unset\": \"Not configured\",\n  \"credential.reference\": \"Credential name\",\n  \"credential.referenceHint\": \"The name in DSH Credentials, not the key itself. Leave empty for the default.\",\n  \"services.trustUnsaved\": \"Not saved: confirm that you trust this address first.\",\n  \"options.on\": \"On\",\n  \"options.off\": \"Off\",\n  \"options.title\": \"Request options\",\n  \"options.hint\": \"Saved when you finish editing. Leave empty to use the default.\",\n  \"options.default\": \"Default\",\n  \"options.invalid\": \"Invalid value\",\n  \"options.invalidLine\": \"Line {line} is not valid\",\n  \"options.tooMany\": \"At most {max} lines\",\n  \"options.invalidItem\": \"Line {line} (“{item}”) is not valid\",\n  \"options.exclusive\": \"Clear “{other}” first: only one of the two lists can be set\",\n  \"options.keylessMore\": \"More options need a personal key.\",\n  \"option.local.userAgent\": \"User-Agent\",\n  \"option.local.userAgentHint\": \"Leaving it empty sends an empty User-Agent. Use \\\"Restore User-Agent\\\" to go back to the default.\",\n  \"option.local.userAgentReset\": \"Restore User-Agent\",\n  \"option.local.maxResponseBytes\": \"Max response bytes\",\n  \"option.local.maxBodyChars\": \"Max returned characters\",\n  \"option.local.timeoutMs\": \"Timeout (ms)\",\n  \"option.local.maxRedirects\": \"Max same-origin redirects\",\n  \"option.native.baseURL\": \"API base URL\",\n  \"option.native.trust\": \"I trust this address and allow sending this connection’s credential to it.\",\n  \"pairings.title\": \"Model memories\",\n  \"pairings.hint\": \"Choosing a connection (including off) remembers it for the conversation’s model. New conversations with that model use it. Clear a memory to use the default again.\",\n  \"pairings.loading\": \"Loading model memories…\",\n  \"pairings.empty\": \"No model memories.\",\n  \"pairings.failed\": \"Could not load model memories. Try again.\",\n  \"pairings.forget\": \"Clear memory\",\n  \"pairings.forgetFailed\": \"Model memory was not cleared. Try again.\",\n  \"reset.button\": \"Restore default settings\",\n  \"reset.hint\": \"Restore all fetch settings. Saved keys are kept.\",\n  \"reset.confirm\": \"Restore all fetch settings to their defaults?\",\n  \"reset.confirmButton\": \"Restore\",\n  \"confirm.cancel\": \"Cancel\",\n  \"saving\": \"Saving…\",\n  \"allowlist.title\": \"Private network access\",\n  \"allowlist.description\": \"With an empty list, direct connections reach public addresses only. With a proxy, hostnames are resolved by the proxy, and neither that limit nor these rules apply to them.\",\n  \"allowlist.allowCidrs\": \"Allowed ranges (CIDR)\",\n  \"allowlist.allowHostnames\": \"Only these hostnames (optional)\",\n  \"allowlist.cidrsHint\": \"One IPv4 or IPv6 range per line. Keep each range narrow.\",\n  \"allowlist.hostnamesHint\": \"Leave empty for any hostname. *.example.com matches subdomains, not example.com itself.\",\n  \"allowlist.save\": \"Save access rules\",\n  \"allowlist.saving\": \"Saving…\",\n  \"allowlist.reset\": \"Discard edits\",\n  \"allowlist.saved\": \"Access rules saved.\",\n  \"allowlist.saveFailed\": \"Access rules were not saved. Review and try again.\",\n  \"allowlist.line\": \"Line {line}\",\n  \"allowlist.duplicate\": \"Repeats line {line}.\",\n  \"allowlist.applyFix\": \"Use {fix}\",\n  \"allowlist.removeDuplicate\": \"Remove duplicate\",\n  \"allowlist.problem.syntax\": \"Not a valid range or hostname.\",\n  \"allowlist.problem.ipv4-form\": \"Write IPv4 as four decimal numbers.\",\n  \"allowlist.problem.zone\": \"Remove the IPv6 zone id (%…).\",\n  \"allowlist.problem.mapped\": \"Write the IPv4 range instead of its IPv6 mapped form.\",\n  \"allowlist.problem.host-bits\": \"Use the network address: {fix}.\",\n  \"allowlist.problem.wildcard\": \"Use * only as the whole first label, as in *.example.com.\",\n  \"allowlist.problem.wildcard-ip\": \"IP addresses cannot use wildcards.\",\n  \"allowlist.problem.not-hostname\": \"Enter only the hostname, without scheme, path or port: {fix}.\",\n  \"allowlist.warning.public\": \"Public addresses are already reachable; this rule changes nothing.\",\n  \"allowlist.warning.broad\": \"Very broad range. Narrow it to what you need.\",\n  \"allowlist.warning.loopback\": \"Includes loopback: the model can reach services on this machine.\",\n  \"allowlist.warning.metadata\": \"Includes cloud metadata (169.254.169.254), which can expose instance credentials.\",\n  \"status.needsCredential\": \"Needs an API key\",\n  \"status.remoteReady\": \"{access} · the URL is sent to {name}\",\n  \"credential.manage\": \"Set key\",\n  \"services.note.exa\": \"Without a key, requests go through Exa’s hosted MCP service and include this plugin’s name and version. Content may come from Exa’s cache.\",\n  \"services.note.firecrawl\": \"By default it may return a copy cached up to 2 days ago, and it stores results in Firecrawl’s cache and index; turn off “Store in cache” to avoid that.\",\n  \"services.note.tavily\": \"Tavily sees the URL and the page it reads. It states zero data retention, but its privacy policy says data is kept as long as needed to provide the service.\",\n  \"services.note.tinyfish\": \"Tinyfish sees the URL and the page it reads, and may return a cached copy. Its terms allow it to use this data to improve and train its models.\",\n  \"services.note.anysearch\": \"AnySearch sees the URL and the page it reads. Its privacy policy says it does not store requests or results once it has responded, but its terms of service say they are kept for 30 days after the service ends; API call logs are kept for 12 months. It reads HTML, plain text, JSON and Markdown, not PDF or other binary files, and may cut long pages at 50,000 characters.\",\n  \"option.exa.maxAgeHours\": \"Max cache age (hours)\",\n  \"option.exa.maxAgeHours.placeholder\": \"Default\",\n  \"option.exa.maxAgeHours.hint\": \"0 = always live, -1 = cache only\",\n  \"option.exa.livecrawlTimeout\": \"Live read timeout (ms)\",\n  \"option.firecrawl.onlyMainContent\": \"Main content only\",\n  \"option.firecrawl.maxAge\": \"Max cache age (ms)\",\n  \"option.firecrawl.maxAge.placeholder\": \"Default\",\n  \"option.firecrawl.maxAge.hint\": \"0 = always live; 1 day = 86 400 000 ms\",\n  \"option.firecrawl.storeInCache\": \"Store in cache\",\n  \"option.firecrawl.timeout\": \"Timeout (ms)\",\n  \"option.firecrawl.waitFor\": \"Wait before reading (ms)\",\n  \"option.firecrawl.proxy\": \"Proxy\",\n  \"option.tavily.extract_depth\": \"Extraction depth\",\n  \"option.tavily.format\": \"Format\",\n  \"option.tavily.timeout\": \"Timeout (seconds)\",\n  \"option.tinyfish.ttl\": \"Max cache age (seconds)\",\n  \"option.tinyfish.ttl.placeholder\": \"Default\",\n  \"option.tinyfish.ttl.hint\": \"0 = always live\",\n  \"option.tinyfish.per_url_timeout_ms\": \"Timeout (ms)\",\n  \"value.auto\": \"Auto\",\n  \"value.basic\": \"Basic\",\n  \"value.enhanced\": \"Enhanced\",\n  \"value.advanced\": \"Advanced\",\n  \"value.markdown\": \"Markdown\",\n  \"value.text\": \"Plain text\",\n  \"custom.title\": \"Custom connections\",\n  \"custom.empty\": \"No custom connections yet.\",\n  \"custom.addStructured\": \"Add fetch service\",\n  \"custom.kindStructured\": \"Fetch service\",\n  \"custom.edit\": \"Edit\",\n  \"custom.remove\": \"Remove\",\n  \"custom.removeConfirm\": \"Remove the custom connection “{name}”? Its credential is not deleted.\",\n  \"editor.titleNew\": \"New connection\",\n  \"editor.titleEdit\": \"Edit {id}\",\n  \"editor.id\": \"ID\",\n  \"editor.idHint\": \"Letters, digits, dots, underscores or hyphens.\",\n  \"editor.idPlaceholder\": \"team-reader\",\n  \"editor.label\": \"Name\",\n  \"editor.adapter\": \"Service\",\n  \"editor.endpoint\": \"Endpoint\",\n  \"editor.endpointHint\": \"Leave empty for the official endpoint.\",\n  \"editor.credentialRef\": \"Credential name\",\n  \"editor.credentialRefHint\": \"The name in DSH Credentials, such as READER_API_KEY. Not the key itself.\",\n  \"editor.trust\": \"I trust this address and allow sending the credential {ref} to it.\",\n  \"editor.trustUnnamed\": \"I trust this address and allow sending this connection’s credential to it.\",\n  \"editor.save\": \"Save\",\n  \"editor.cancel\": \"Cancel\",\n  \"editor.stale\": \"Settings changed after you opened this editor. Cancel and reopen it to avoid overwriting those changes.\",\n  \"editor.optionsHint\": \"Leave a field empty for the default.\",\n  \"editor.apiKey\": \"API key (optional)\",\n  \"editor.apiKeyHint\": \"Saved to DSH Credentials under the name above after the connection is saved.\",\n  \"editor.keyFailed\": \"The connection was saved, but its key was not. Set the key from the list.\",\n  \"draft.id\": \"The ID must start with custom: followed by letters, digits, dots, underscores or hyphens.\",\n  \"draft.duplicate\": \"This ID is already in use.\",\n  \"draft.label\": \"Enter a name.\",\n  \"draft.trust\": \"Confirm that you trust this address.\",\n  \"draft.credentialRef\": \"A credential name uses letters, digits and underscores and does not start with a digit.\",\n  \"draft.endpoint\": \"Enter a full http(s) address.\",\n  \"draft.options\": \"Fix the highlighted options.\",\n} as const\n\nexport type LocaleKey = keyof typeof en\n\nexport const zh: Record<LocaleKey, string> = {\n  \"section.title\": \"网页获取\",\n  \"source.session\": \"本会话\",\n  \"source.inherited\": \"来自父会话\",\n  \"source.model\": \"该模型上次的选择\",\n  \"source.default\": \"默认连接\",\n  \"access.apiKey\": \"API Key\",\n  \"access.keyless\": \"无需密钥\",\n  \"access.account\": \"DeepSeek 账号\",\n  \"access.local\": \"本机直接访问\",\n  \"connection.off\": \"网页获取已关闭\",\n  \"connection.local\": \"本机 HTTP\",\n  \"status.disabled\": \"{name} 未在设置中启用。\",\n  \"status.needsAccount\": \"需要 DeepSeek 账号或 API Key\",\n  \"status.unsupported\": \"本版本不支持 {name}。\",\n  \"status.short.needsCredential\": \"未配置密钥\",\n  \"status.short.unsupported\": \"不支持\",\n  \"selector.services\": \"网页获取连接\",\n  \"selector.offRow\": \"关闭\",\n  \"write.conflict\": \"网页获取设置已在别处更改，菜单已显示最新选择。\",\n  \"write.unavailable\": \"该连接未启用或已移除。\",\n  \"write.failed\": \"保存失败，请重试。\",\n  \"command.label\": \"网页获取连接\",\n  \"command.description\": \"切换当前会话的网页获取连接\",\n  \"command.placeholder\": \"筛选网页获取连接\",\n  \"command.empty\": \"没有已启用的网页获取连接\",\n  \"command.noResults\": \"没有匹配的选项\",\n  \"command.current\": \"当前\",\n  \"command.readFailed\": \"读取网页获取设置失败，请重试。\",\n  \"settings.intro\": \"每个会话通过地球按钮或 /setup-fetch 选择网页获取连接。本页设置默认连接及各连接的参数。状态点只反映配置，不代表服务可用性。\",\n  \"settings.loading\": \"正在读取设置…\",\n  \"settings.readOnly\": \"当前设置为只读。\",\n  \"settings.unsupported\": \"无法读取这些设置，可能来自 0.1.x 或更新的版本。请在下方恢复默认设置，或升级插件。\",\n  \"settings.refused\": \"未保存：设置可能已在别处更改，请检查后重试。\",\n  \"settings.invalid\": \"设置无效，未保存。\",\n  \"settings.failed\": \"未保存，请检查与 DSH 的连接后重试。\",\n  \"route.unknown\": \"无法确认网页获取是否经过本插件。\",\n  \"route.auto\": \"尚未指定网页获取服务，这里的设置可能不生效。请在插件页打开本组合包修复。\",\n  \"route.other\": \"网页获取当前由 {provider} 提供，这里的设置不生效。请在插件页查看本组合包。\",\n  \"defaults.title\": \"默认值\",\n  \"defaults.showSelector\": \"在输入框菜单中显示网页获取连接\",\n  \"defaults.showSelectorHint\": \"隐藏后可用 /setup-fetch 切换当前会话。\",\n  \"defaults.connection\": \"默认连接\",\n  \"defaults.connectionHint\": \"未自行选择的会话依次使用：父会话的选择（仅限分叉出的会话）、该模型上次的选择、默认连接。\",\n  \"defaults.connectionUnset\": \"默认（{name}）\",\n  \"defaults.connectionMissing\": \"不存在：{id}\",\n  \"services.title\": \"网页获取连接\",\n  \"services.optInNotice\": \"远程服务默认关闭。\",\n  \"enhanced.title\": \"增强工具\",\n  \"enhanced.description\": \"让 Agent 用 web_fetch_enhanced 在已启用的服务中自行选择本次获取用哪个，并用 list_web_fetch_providers 查看可选项。只影响之后新建的会话。\",\n  \"enhanced.consent\": \"打开即表示同意：Agent 选用某个服务时，URL 会发送给该服务。\",\n  \"services.enable\": \"启用 {name}\",\n  \"services.configure\": \"配置\",\n  \"services.configureLabel\": \"配置 {name}\",\n  \"services.off\": \"未启用\",\n  \"services.keyless\": \"无需密钥\",\n  \"services.personalKey\": \"个人密钥 {ref}\",\n  \"services.account\": \"DeepSeek 账号或 {ref}\",\n  \"services.access\": \"访问方式\",\n  \"services.accessKeyless\": \"无需密钥\",\n  \"services.accessPersonal\": \"个人密钥\",\n  \"services.accessHint.keyless\": \"不会发送你的 API Key。\",\n  \"services.accessHint.apiKey\": \"使用你的 API Key。\",\n  \"services.accountHint\": \"使用 DeepSeek 账号模型的会话通过账号获取网页；其他会话使用下方的 API Key。\",\n  \"services.getKey\": \"获取 API Key\",\n  \"services.remoteNotice\": \"URL 会发送给 {name}，能否访问目标由对方决定。\",\n  \"credential.label\": \"API Key\",\n  \"credential.placeholder\": \"输入新的密钥\",\n  \"credential.save\": \"保存密钥\",\n  \"credential.saved\": \"密钥已保存。\",\n  \"credential.failed\": \"密钥未保存，请重试。\",\n  \"credential.hint\": \"以 {ref} 保存到 DSH 凭据，不写入设置。\",\n  \"credential.set\": \"已配置\",\n  \"credential.unset\": \"未配置\",\n  \"credential.reference\": \"凭据名称\",\n  \"credential.referenceHint\": \"DSH 凭据中的名称，不是密钥本身。留空使用默认名称。\",\n  \"services.trustUnsaved\": \"尚未保存：请先确认信任此地址。\",\n  \"options.on\": \"开\",\n  \"options.off\": \"关\",\n  \"options.title\": \"请求参数\",\n  \"options.hint\": \"编辑完成后自动保存，留空使用默认值。\",\n  \"options.default\": \"默认\",\n  \"options.invalid\": \"格式无效\",\n  \"options.invalidLine\": \"第 {line} 行格式无效\",\n  \"options.tooMany\": \"最多 {max} 行\",\n  \"options.invalidItem\": \"第 {line} 行（“{item}”）格式无效\",\n  \"options.exclusive\": \"请先清空“{other}”：两项只能填一项\",\n  \"options.keylessMore\": \"使用个人密钥时可设置更多参数。\",\n  \"option.local.userAgent\": \"User-Agent\",\n  \"option.local.userAgentHint\": \"留空会发送空的 User-Agent；点“恢复默认 User-Agent”改回默认值。\",\n  \"option.local.userAgentReset\": \"恢复默认 User-Agent\",\n  \"option.local.maxResponseBytes\": \"最大响应字节数\",\n  \"option.local.maxBodyChars\": \"最大返回字符数\",\n  \"option.local.timeoutMs\": \"超时（毫秒）\",\n  \"option.local.maxRedirects\": \"最大同源跳转次数\",\n  \"option.native.baseURL\": \"API 基础地址\",\n  \"option.native.trust\": \"我信任此地址，允许向它发送此连接的凭据。\",\n  \"pairings.title\": \"模型记忆\",\n  \"pairings.hint\": \"在会话里选择连接（包括关闭）会为该模型记住选择。该模型的新会话会沿用它，清除后改用默认连接。\",\n  \"pairings.loading\": \"正在读取模型记忆…\",\n  \"pairings.empty\": \"没有模型记忆。\",\n  \"pairings.failed\": \"读取模型记忆失败，请重试。\",\n  \"pairings.forget\": \"清除记忆\",\n  \"pairings.forgetFailed\": \"未清除模型记忆，请重试。\",\n  \"reset.button\": \"恢复默认设置\",\n  \"reset.hint\": \"将全部网页获取设置恢复默认值，已保存的密钥不受影响。\",\n  \"reset.confirm\": \"确定将全部网页获取设置恢复默认值？\",\n  \"reset.confirmButton\": \"恢复\",\n  \"confirm.cancel\": \"取消\",\n  \"saving\": \"正在保存…\",\n  \"allowlist.title\": \"内网访问\",\n  \"allowlist.description\": \"列表为空时，直连只能访问公网地址。设置了代理时，域名由代理解析，公网限制和这里的规则都管不到它们。\",\n  \"allowlist.allowCidrs\": \"允许的网段（CIDR）\",\n  \"allowlist.allowHostnames\": \"仅限这些域名（可选）\",\n  \"allowlist.cidrsHint\": \"每行一个 IPv4 或 IPv6 网段，范围越小越安全。\",\n  \"allowlist.hostnamesHint\": \"留空时任何域名都可使用上面的网段。*.example.com 匹配子域名，不含 example.com 本身。\",\n  \"allowlist.save\": \"保存访问规则\",\n  \"allowlist.saving\": \"正在保存…\",\n  \"allowlist.reset\": \"放弃修改\",\n  \"allowlist.saved\": \"访问规则已保存。\",\n  \"allowlist.saveFailed\": \"访问规则未保存，请检查后重试。\",\n  \"allowlist.line\": \"第 {line} 行\",\n  \"allowlist.duplicate\": \"与第 {line} 行重复。\",\n  \"allowlist.applyFix\": \"改为 {fix}\",\n  \"allowlist.removeDuplicate\": \"移除重复行\",\n  \"allowlist.problem.syntax\": \"不是有效的网段或域名。\",\n  \"allowlist.problem.ipv4-form\": \"IPv4 需写成四段十进制。\",\n  \"allowlist.problem.zone\": \"请去掉 IPv6 区域标识（%…）。\",\n  \"allowlist.problem.mapped\": \"请直接填写 IPv4 网段，而不是 IPv6 映射形式。\",\n  \"allowlist.problem.host-bits\": \"请填写网段的网络地址：{fix}。\",\n  \"allowlist.problem.wildcard\": \"通配符只能作为最左侧的一整段，例如 *.example.com。\",\n  \"allowlist.problem.wildcard-ip\": \"IP 地址不能使用通配符。\",\n  \"allowlist.problem.not-hostname\": \"只填写域名，不含协议、路径或端口：{fix}。\",\n  \"allowlist.warning.public\": \"公网地址本就可以访问，这一行不起作用。\",\n  \"allowlist.warning.broad\": \"范围过大，请缩小到实际需要的网段。\",\n  \"allowlist.warning.loopback\": \"包含本机回环地址，模型将能访问本机上的服务。\",\n  \"allowlist.warning.metadata\": \"包含云元数据地址 169.254.169.254，可能泄露实例凭据。\",\n  \"status.needsCredential\": \"需要 API Key\",\n  \"status.remoteReady\": \"{access} · URL 会发送给 {name}\",\n  \"credential.manage\": \"设置密钥\",\n  \"services.note.exa\": \"无需密钥时经 Exa 托管的 MCP 服务发送，并附带本插件的名称和版本。内容可能来自 Exa 的缓存。\",\n  \"services.note.firecrawl\": \"默认可能返回最多 2 天前的缓存，结果会存入 Firecrawl 的缓存与索引；关闭“存入缓存”可避免。\",\n  \"services.note.tavily\": \"Tavily 会收到 URL 和读到的页面内容。它声称零数据保留，但隐私政策写的是保留到提供服务所需的期限。\",\n  \"services.note.tinyfish\": \"Tinyfish 会收到 URL 和读到的页面内容，可能返回缓存。其服务条款允许用这些数据改进和训练模型。\",\n  \"services.note.anysearch\": \"AnySearch 会收到 URL 和读到的页面内容。它的隐私政策称回复后不保存请求与结果，但服务条款写的是终止服务后仍保留 30 天；API 调用日志保留 12 个月。它读取 HTML、纯文本、JSON 与 Markdown，不读 PDF 等二进制文件，较长的页面可能在 50 000 字符处截断。\",\n  \"option.exa.maxAgeHours\": \"缓存最长时间（小时）\",\n  \"option.exa.maxAgeHours.placeholder\": \"默认\",\n  \"option.exa.maxAgeHours.hint\": \"0 为总是实时，-1 为只用缓存\",\n  \"option.exa.livecrawlTimeout\": \"实时读取超时（毫秒）\",\n  \"option.firecrawl.onlyMainContent\": \"只保留正文\",\n  \"option.firecrawl.maxAge\": \"缓存最长时间（毫秒）\",\n  \"option.firecrawl.maxAge.placeholder\": \"默认\",\n  \"option.firecrawl.maxAge.hint\": \"0 为总是实时；1 天 = 86 400 000 毫秒\",\n  \"option.firecrawl.storeInCache\": \"存入缓存\",\n  \"option.firecrawl.timeout\": \"超时（毫秒）\",\n  \"option.firecrawl.waitFor\": \"读取前等待（毫秒）\",\n  \"option.firecrawl.proxy\": \"代理\",\n  \"option.tavily.extract_depth\": \"提取深度\",\n  \"option.tavily.format\": \"格式\",\n  \"option.tavily.timeout\": \"超时（秒）\",\n  \"option.tinyfish.ttl\": \"缓存最长时间（秒）\",\n  \"option.tinyfish.ttl.placeholder\": \"默认\",\n  \"option.tinyfish.ttl.hint\": \"0 为总是实时\",\n  \"option.tinyfish.per_url_timeout_ms\": \"超时（毫秒）\",\n  \"value.auto\": \"自动\",\n  \"value.basic\": \"基础\",\n  \"value.enhanced\": \"增强\",\n  \"value.advanced\": \"深入\",\n  \"value.markdown\": \"Markdown\",\n  \"value.text\": \"纯文本\",\n  \"custom.title\": \"自定义连接\",\n  \"custom.empty\": \"还没有自定义连接。\",\n  \"custom.addStructured\": \"添加网页获取服务\",\n  \"custom.kindStructured\": \"网页获取服务\",\n  \"custom.edit\": \"编辑\",\n  \"custom.remove\": \"移除\",\n  \"custom.removeConfirm\": \"确定移除自定义连接“{name}”？凭据不会删除。\",\n  \"editor.titleNew\": \"新建连接\",\n  \"editor.titleEdit\": \"编辑 {id}\",\n  \"editor.id\": \"ID\",\n  \"editor.idHint\": \"字母、数字、点、下划线或连字符。\",\n  \"editor.idPlaceholder\": \"team-reader\",\n  \"editor.label\": \"名称\",\n  \"editor.adapter\": \"服务\",\n  \"editor.endpoint\": \"接口地址\",\n  \"editor.endpointHint\": \"留空使用官方地址。\",\n  \"editor.credentialRef\": \"凭据名称\",\n  \"editor.credentialRefHint\": \"DSH 凭据中的名称，例如 READER_API_KEY，不是密钥本身。\",\n  \"editor.trust\": \"我信任此地址，允许向它发送凭据 {ref}。\",\n  \"editor.trustUnnamed\": \"我信任此地址，允许向它发送此连接的凭据。\",\n  \"editor.save\": \"保存\",\n  \"editor.cancel\": \"取消\",\n  \"editor.stale\": \"打开编辑器后设置已变化。请取消后重新打开，以免覆盖这些修改。\",\n  \"editor.optionsHint\": \"留空使用默认值。\",\n  \"editor.apiKey\": \"密钥（可选）\",\n  \"editor.apiKeyHint\": \"连接保存后，以上面的凭据名称写入 DSH 凭据。\",\n  \"editor.keyFailed\": \"连接已保存，但密钥未保存，请在列表中重新设置密钥。\",\n  \"draft.id\": \"ID 必须以 custom: 开头，后接字母、数字、点、下划线或连字符。\",\n  \"draft.duplicate\": \"此 ID 已被使用。\",\n  \"draft.label\": \"请填写名称。\",\n  \"draft.trust\": \"请确认信任此地址。\",\n  \"draft.credentialRef\": \"凭据名称只能包含字母、数字和下划线，且不能以数字开头。\",\n  \"draft.endpoint\": \"请输入完整的 http(s) 地址。\",\n  \"draft.options\": \"请修正标红的参数。\",\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n  interface LocaleNamespaceMap {\n    'web-fetch-enhanced': LocaleKey\n  }\n}","import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport { RouteStatus, type WebSelection } from 'dsh-tool-web-enhanced-core/client'\nexport type { WebSelection } from 'dsh-tool-web-enhanced-core/client'\nexport class FetchRouteStatus extends RouteStatus {\n  constructor(web: ConfigForm<WebSelection>) { super(web, 'fetchProvider') }\n}\n","import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { ConnectionSection } from 'dsh-tool-web-enhanced-core/client'\nimport { describe, sourceText, writeFailureText, type Translate } from './connections.ts'\nimport type { FetchSelectionStore } from './selection.ts'\n\nexport function fetchSection(selection: FetchSelectionStore, settings: ObservableSnapshot<(() => void) | undefined>, remoteServicesOff: ObservableSnapshot<boolean>, t: Translate): ConnectionSection {\n  return {\n    capability: 'fetch', order: 20, title: () => t('section.title'), selection, settings, remoteServicesOff,\n    describe: connection => describe(connection, t),\n    sourceText: view => sourceText(view, t),\n    writeFailureText: error => writeFailureText(error, t),\n  }\n}\n","import type { TypertRemoteNamespace } from '@deepseek-ai/dsh-typert-protocol'\nimport { ConnectionSelectionStore } from 'dsh-tool-web-enhanced-core/client'\nimport type { FetchSelectionView } from '../contract.ts'\nexport type { SelectionUpdate } from 'dsh-tool-web-enhanced-core/client'\nexport type FetchConnectionsRemote = TypertRemoteNamespace<'fetchConnections'>\n\nexport class FetchSelectionStore extends ConnectionSelectionStore<FetchSelectionView> {\n  constructor(remote: FetchConnectionsRemote, changed: () => void = () => {}) {\n    super(remote, changed)\n  }\n}\n","import { createCredentialEditor } from 'dsh-tool-web-enhanced-core/client'\nimport type { LocaleKey } from '../locales.ts'\nimport css from './Settings.module.css'\nexport type { SaveCredential } from 'dsh-tool-web-enhanced-core/client'\nexport const CredentialEditor = createCredentialEditor<LocaleKey>({ classes: css, keys: {\n  'credential.label': 'credential.label',\n  'credential.set': 'credential.set',\n  'credential.unset': 'credential.unset',\n  'credential.placeholder': 'credential.placeholder',\n  'saving': 'saving',\n  'credential.save': 'credential.save',\n  'credential.saved': 'credential.saved',\n  'credential.failed': 'credential.failed',\n  'credential.hint': 'credential.hint',\n} })\n","import { createSettingsParts, type SettingsDoc as CoreSettingsDoc } from 'dsh-tool-web-enhanced-core/client'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport css from './Settings.module.css'\nexport { classNames, applyOps, SettingsValidationError, type WriteSettings, type WriteState, type SelectOption } from 'dsh-tool-web-enhanced-core/client'\nexport type SettingsDoc = CoreSettingsDoc<FetchSettings>\nexport const settingsParts = createSettingsParts<LocaleKey>({ classes: css, keys: {\n  refused: 'settings.refused', invalid: 'settings.invalid', failed: 'settings.failed',\n} })\nexport const { Section, SettingRow, SelectMenu, ErrorText, ConfirmRow, useWrite } = settingsParts\n","import { createOptionsEditor } from 'dsh-tool-web-enhanced-core/client'\nimport type { LocaleKey } from '../locales.ts'\nimport { valueLabel } from './model.ts'\nimport { settingsParts } from './parts.tsx'\nimport css from './Settings.module.css'\nexport const optionsEditor = createOptionsEditor<LocaleKey>({ classes: css, parts: settingsParts, valueLabel,\n  keys: { 'options.default': 'options.default', 'options.invalid': 'options.invalid', 'options.invalidLine': 'options.invalidLine', 'options.tooMany': 'options.tooMany', 'options.invalidItem': 'options.invalidItem', 'options.exclusive': 'options.exclusive', 'options.on': 'options.on', 'options.off': 'options.off' },\n})\nexport const { OptionFields, OptionsForm } = optionsEditor\n","import { createSparseSettings } from 'dsh-tool-web-enhanced-core/client'\nimport { CURRENT_SETTINGS_VERSION, SETTINGS_FIELDS } from 'dsh-tool-web-enhanced-core/shared'\nexport type { SettingsLayers, DocumentVersion } from 'dsh-tool-web-enhanced-core/client'\n\nexport const { documentVersion, sparseSettingOperations, resetSettingsOperations } = createSparseSettings({\n  version: CURRENT_SETTINGS_VERSION, fields: SETTINGS_FIELDS,\n})\n","import { createCustomConnectionsSection } from 'dsh-tool-web-enhanced-core/client'\nimport { CATALOG, DEFAULT_CONNECTION } from '../../catalog.ts'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport { CredentialEditor } from './CredentialEditor.tsx'\nimport { optionCopy } from './model.ts'\nimport { optionsEditor } from './OptionsEditor.tsx'\nimport { settingsParts } from './parts.tsx'\nimport * as sparse from './sparse.ts'\nimport css from './Settings.module.css'\n\nexport const CustomConnectionsSection = createCustomConnectionsSection<FetchSettings, typeof CATALOG, LocaleKey>({\n  classes: css, parts: settingsParts, CredentialEditor, optionsEditor, sparse, catalog: CATALOG, optionCopy, defaultConnection: DEFAULT_CONNECTION,\n  keys: {\n    'services.remoteNotice': 'services.remoteNotice',\n    'custom.title': 'custom.title',\n    'custom.addStructured': 'custom.addStructured',\n    'custom.empty': 'custom.empty',\n    'custom.kindStructured': 'custom.kindStructured',\n    'credential.set': 'credential.set',\n    'credential.unset': 'credential.unset',\n    'credential.manage': 'credential.manage',\n    'credential.placeholder': 'credential.placeholder',\n    'custom.edit': 'custom.edit',\n    'custom.remove': 'custom.remove',\n    'services.enable': 'services.enable',\n    'custom.removeConfirm': 'custom.removeConfirm',\n    'confirm.cancel': 'confirm.cancel',\n    'editor.titleNew': 'editor.titleNew',\n    'editor.titleEdit': 'editor.titleEdit',\n    'editor.id': 'editor.id',\n    'editor.idHint': 'editor.idHint',\n    'editor.idPlaceholder': 'editor.idPlaceholder',\n    'editor.label': 'editor.label',\n    'editor.adapter': 'editor.adapter',\n    'editor.endpoint': 'editor.endpoint',\n    'editor.endpointHint': 'editor.endpointHint',\n    'editor.credentialRef': 'editor.credentialRef',\n    'editor.credentialRefHint': 'editor.credentialRefHint',\n    'editor.trust': 'editor.trust',\n    'editor.trustUnnamed': 'editor.trustUnnamed',\n    'editor.save': 'editor.save',\n    'editor.cancel': 'editor.cancel',\n    'editor.stale': 'editor.stale',\n    'editor.optionsHint': 'editor.optionsHint',\n    'editor.apiKey': 'editor.apiKey',\n    'editor.apiKeyHint': 'editor.apiKeyHint',\n    'editor.keyFailed': 'editor.keyFailed',\n    'draft.id': 'draft.id',\n    'draft.duplicate': 'draft.duplicate',\n    'draft.label': 'draft.label',\n    'draft.trust': 'draft.trust',\n    'draft.credentialRef': 'draft.credentialRef',\n    'draft.endpoint': 'draft.endpoint',\n    'draft.options': 'draft.options',\n    'options.title': 'options.title',\n    'saving': 'saving',\n  },\n})\n","import { Switch } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { createDefaultsSection, type CredentialStatusMap } from 'dsh-tool-web-enhanced-core/client'\nimport { DEFAULT_CONNECTION } from '../../catalog.ts'\nimport { resolveSettings } from '../../settings/resolve.ts'\nimport { connectionLabel, type Translate } from '../connections.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport { connectionChoices, connectionName } from './model.ts'\nimport { settingsParts, SettingRow, type SettingsDoc, type WriteSettings } from './parts.tsx'\nimport * as sparse from './sparse.ts'\n\nconst Defaults = createDefaultsSection<LocaleKey>({ parts: settingsParts, sparse, keys: {\n  title: 'defaults.title', connection: 'defaults.connection', connectionHint: 'defaults.connectionHint',\n  connectionUnset: 'defaults.connectionUnset', connectionMissing: 'defaults.connectionMissing',\n} })\nexport function DefaultsSection({ doc, write, credentials = {}, t }: { doc: SettingsDoc; write: WriteSettings; credentials?: CredentialStatusMap; t: Translate }) {\n  const resolved = resolveSettings(doc.config)\n  const connection = resolved.connections.get(resolved.defaultConnection)\n  const defaultAvailability = connection && {\n    disabled: connection.disabled,\n    access: connection.access,\n    credentialStatus: connection.kind === 'local' ? undefined : credentials[connection.credentialRef],\n    warning: t(connection.disabled ? 'status.disabled' : connection.kind === 'native' ? 'status.needsAccount' : 'status.needsCredential', { name: connectionLabel(connection, t) }),\n  }\n  return <Defaults doc={doc} write={write} t={t} defaultConnection={doc.config.defaultConnection} defaultLabel={connectionName(DEFAULT_CONNECTION, doc.config, t)} defaultAvailability={defaultAvailability} choices={connectionChoices(doc.config, t)}>\n    {({ disabled, save }) => <SettingRow title={t('defaults.showSelector')} hint={t('defaults.showSelectorHint')}>\n      <Switch checked={doc.config.showSelector ?? true} label={t('defaults.showSelector')} disabled={disabled}\n        onChange={next => { save(['showSelector'], next, true) }} />\n    </SettingRow>}\n  </Defaults>\n}\n","import { createEnhancedToolsSection } from 'dsh-tool-web-enhanced-core/client'\nimport type { LocaleKey } from '../locales.ts'\nimport { settingsParts } from './parts.tsx'\nimport * as sparse from './sparse.ts'\nimport css from './Settings.module.css'\n\nexport const EnhancedToolsSection = createEnhancedToolsSection<LocaleKey>({\n  classes: css, parts: settingsParts, sparse,\n  keys: { title: 'enhanced.title', description: 'enhanced.description', consent: 'enhanced.consent' },\n})\n","import { createPairingsSection } from 'dsh-tool-web-enhanced-core/client'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport { connectionName } from './model.ts'\nimport { settingsParts } from './parts.tsx'\nimport css from './Settings.module.css'\nexport const PairingsSection = createPairingsSection<FetchSettings, LocaleKey>({ classes: css, parts: settingsParts, formatConnectionName: connectionName, keys: {\n  'pairings.forgetFailed': 'pairings.forgetFailed',\n  'pairings.title': 'pairings.title',\n  'pairings.hint': 'pairings.hint',\n  'pairings.failed': 'pairings.failed',\n  'pairings.loading': 'pairings.loading',\n  'pairings.empty': 'pairings.empty',\n  'connection.off': 'connection.off',\n  'saving': 'saving',\n  'pairings.forget': 'pairings.forget',\n} })\n","import { type CidrWarning, type RuleProblem, cidrWarnings, parseCidr, parseHostnameRule } from '../local/rules.ts'\n\nexport type AllowlistField = 'allowCidrs' | 'allowHostnames'\n\nexport type LineNote =\n  | { readonly kind: 'problem'; readonly problem: RuleProblem }\n  | { readonly kind: 'duplicate'; readonly of: number }\n  | { readonly kind: 'warning'; readonly warning: CidrWarning }\n\nexport interface LineReport {\n  /** 1-based physical line in the textarea, including blank lines. */\n  readonly line: number\n  readonly text: string\n  readonly note: LineNote\n}\n\nexport interface AllowlistReading {\n  /** Undefined if any line is invalid or a semantic duplicate; warnings do not block saving. */\n  readonly values: readonly string[] | undefined\n  readonly reports: readonly LineReport[]\n}\n\n/** Read with the Host's grammar, preserving accepted spelling and ignoring blank lines. */\nexport function readAllowlist(field: AllowlistField, text: string): AllowlistReading {\n  const values: string[] = []\n  const reports: LineReport[] = []\n  const seen = new Map<string, number>()\n  let refused = false\n\n  text.split(/\\r\\n?|\\n/).forEach((raw, index) => {\n    const line = index + 1\n    const value = raw.trim()\n    if (value === '') return\n    const parsed = field === 'allowCidrs' ? parseCidr(value) : parseHostnameRule(value)\n    if (!parsed.ok) {\n      refused = true\n      reports.push({ line, text: value, note: { kind: 'problem', problem: parsed.problem } })\n      return\n    }\n    const key = JSON.stringify(parsed.value)\n    const first = seen.get(key)\n    if (first !== undefined) {\n      refused = true\n      reports.push({ line, text: value, note: { kind: 'duplicate', of: first } })\n      return\n    }\n    seen.set(key, line)\n    values.push(value)\n    if (field === 'allowCidrs' && 'prefixLength' in parsed.value) {\n      for (const warning of cidrWarnings(parsed.value)) {\n        reports.push({ line, text: value, note: { kind: 'warning', warning } })\n      }\n    }\n  })\n  return { values: refused ? undefined : values, reports }\n}\n\n/** Replace a physical line without changing other lines or their line endings. */\nexport function replaceLine(text: string, line: number, replacement: string): string {\n  const parts = text.split(/(\\r\\n|\\r|\\n)/)\n  parts[(line - 1) * 2] = replacement\n  return parts.join('')\n}\n\n/** Append a rule on its own line. */\nexport function appendLine(text: string, rule: string): string {\n  const body = text.replace(/\\s+$/, '')\n  return body === '' ? rule : body + '\\n' + rule\n}\n","import { useId, useState } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { WriteSettings } from 'dsh-tool-web-enhanced-core/client'\nimport type { Translate } from '../connections.ts'\nimport { readAllowlist, replaceLine, type AllowlistField, type AllowlistReading, type LineNote } from '../allowlist-lines.ts'\nimport { useWrite, ErrorText } from './parts.tsx'\nimport css from './Allowlist.module.css'\n\nexport interface AllowlistEditorProps {\n  readonly allowCidrs: readonly string[]\n  readonly allowHostnames: readonly string[]\n  readonly disabled: boolean\n  readonly revision: number\n  readonly write: WriteSettings\n  readonly t: Translate\n}\n\nfunction noteText(note: LineNote, t: Translate): string {\n  switch (note.kind) {\n    case 'duplicate': return t('allowlist.duplicate', { line: note.of })\n    case 'warning': return t(`allowlist.warning.${note.warning}`)\n    case 'problem': {\n      const problem = note.problem\n      return t(`allowlist.problem.${problem.code}`, 'fix' in problem ? { fix: problem.fix } : {})\n    }\n  }\n}\n\nfunction RuleField({ field, text, reading, disabled, onChange, t }: {\n  field: AllowlistField\n  text: string\n  reading: AllowlistReading\n  disabled: boolean\n  onChange: (text: string) => void\n  t: Translate\n}) {\n  const id = useId()\n  const hint = field === 'allowCidrs' ? 'allowlist.cidrsHint' : 'allowlist.hostnamesHint'\n  return (\n    <div className={css.field}>\n      <label className={css.label} htmlFor={id}>{t(field === 'allowCidrs' ? 'allowlist.allowCidrs' : 'allowlist.allowHostnames')}</label>\n      <p id={id + '-hint'} className={css.hint}>{t(hint)}</p>\n      <textarea\n        id={id}\n        className={css.textarea}\n        rows={7}\n        value={text}\n        disabled={disabled}\n        spellCheck={false}\n        autoCapitalize=\"off\"\n        autoCorrect=\"off\"\n        aria-invalid={reading.values === undefined}\n        aria-describedby={id + '-hint ' + id + '-reports'}\n        onChange={event => onChange(event.currentTarget.value)}\n      />\n      <ul id={id + '-reports'} className={css.reports} aria-live=\"polite\">\n        {reading.reports.map((report, index) => {\n          const { note } = report\n          const fix = note.kind === 'problem' && 'fix' in note.problem ? note.problem.fix : undefined\n          return (\n            <li key={report.line + '-' + index} className={note.kind === 'warning' ? css.warning : css.error}>\n              <span>{t('allowlist.line', { line: report.line })}: <code>{report.text}</code> — {noteText(note, t)}</span>\n              {fix !== undefined && <button type=\"button\" className={css.fix} disabled={disabled} onClick={() => onChange(replaceLine(text, report.line, fix))}>{t('allowlist.applyFix', { fix })}</button>}\n              {note.kind === 'duplicate' && <button type=\"button\" className={css.fix} disabled={disabled} onClick={() => onChange(replaceLine(text, report.line, ''))}>{t('allowlist.removeDuplicate')}</button>}\n            </li>\n          )\n        })}\n      </ul>\n    </div>\n  )\n}\n\n/** Edits stay local until one explicit, atomic write of both allowlist arrays. */\nexport function AllowlistEditor({ allowCidrs, allowHostnames, disabled, revision, write, t }: AllowlistEditorProps) {\n  const sourceCidrs = allowCidrs.join('\\n')\n  const sourceHostnames = allowHostnames.join('\\n')\n  const [observed, setObserved] = useState({ cidrs: sourceCidrs, hostnames: sourceHostnames, revision })\n  const [draft, setDraft] = useState({ cidrs: sourceCidrs, hostnames: sourceHostnames, baselineCidrs: sourceCidrs, baselineHostnames: sourceHostnames, revision })\n  const action = useWrite(t)\n  const { busy } = action\n  const [status, setStatus] = useState<'idle' | 'saved' | 'failed'>('idle')\n\n  const dirty = draft.cidrs !== draft.baselineCidrs || draft.hostnames !== draft.baselineHostnames\n  // A settings push may refresh a pristine editor, never an in-progress draft.\n  if (observed.cidrs !== sourceCidrs || observed.hostnames !== sourceHostnames || observed.revision !== revision) {\n    setObserved({ cidrs: sourceCidrs, hostnames: sourceHostnames, revision })\n    if (!dirty) {\n      setDraft({ cidrs: sourceCidrs, hostnames: sourceHostnames, baselineCidrs: sourceCidrs, baselineHostnames: sourceHostnames, revision })\n      setStatus('idle')\n    }\n  }\n\n  const cidrs = readAllowlist('allowCidrs', draft.cidrs)\n  const hostnames = readAllowlist('allowHostnames', draft.hostnames)\n  const locked = disabled || busy\n\n  function change(field: 'cidrs' | 'hostnames', text: string) {\n    setDraft(previous => ({ ...previous, [field]: text, revision: dirty ? previous.revision : revision }))\n    setStatus('idle')\n  }\n\n  async function save() {\n    if (locked || !dirty || cidrs.values === undefined || hostnames.values === undefined) return\n    const cidrValues = [...cidrs.values]\n    const hostnameValues = [...hostnames.values]\n    setStatus('idle')\n    const accepted = await action.run(() => write([\n      { op: 'set', path: ['connections', 'builtin:local', 'options', 'allowCidrs'], value: cidrValues },\n      { op: 'set', path: ['connections', 'builtin:local', 'options', 'allowHostnames'], value: hostnameValues },\n    ], draft.revision))\n    if (accepted) {\n      const cidrsText = cidrValues.join('\\n')\n      const hostnamesText = hostnameValues.join('\\n')\n      setDraft({ cidrs: cidrsText, hostnames: hostnamesText, baselineCidrs: cidrsText, baselineHostnames: hostnamesText, revision: draft.revision })\n      setStatus('saved')\n    } else {\n      setStatus('failed')\n    }\n  }\n\n  return (\n    <section className={css.editor} aria-label={t('allowlist.title')} aria-busy={busy}>\n      <h4 className={css.title}>{t('allowlist.title')}</h4>\n      <p className={css.hint}>{t('allowlist.description')}</p>\n      <div className={css.fields}>\n        <RuleField field=\"allowCidrs\" text={draft.cidrs} reading={cidrs} disabled={locked} onChange={text => change('cidrs', text)} t={t} />\n        <RuleField field=\"allowHostnames\" text={draft.hostnames} reading={hostnames} disabled={locked} onChange={text => change('hostnames', text)} t={t} />\n      </div>\n      <div className={css.actions}>\n        <Button\n          type=\"button\"\n          variant=\"primary\"\n          disabled={locked || !dirty || cidrs.values === undefined || hostnames.values === undefined}\n          onClick={() => { void save() }}\n        >\n          {t(busy ? 'allowlist.saving' : 'allowlist.save')}\n        </Button>\n        <Button\n          type=\"button\"\n          variant=\"ghost\"\n          disabled={locked || !dirty}\n          onClick={() => {\n            setDraft({ cidrs: sourceCidrs, hostnames: sourceHostnames, baselineCidrs: sourceCidrs, baselineHostnames: sourceHostnames, revision })\n            setStatus('idle')\n          }}\n        >\n          {t('allowlist.reset')}\n        </Button>\n      </div>\n      <ErrorText title={action.errorTitle}>{status === 'failed' ? action.error : undefined}</ErrorText>\n      {status === 'saved' && <p role=\"status\" className={css.success}>{t('allowlist.saved')}</p>}\n    </section>\n  )\n}\n","import { useId, useState } from 'react'\nimport { Button, Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ExtraEditor, ExtraEditorProps } from 'dsh-tool-web-enhanced-core/client'\nimport { DEFAULT_LOCAL_SETTINGS, USER_AGENT_PATTERN } from '../../catalog.ts'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport { AllowlistEditor } from './AllowlistEditor.tsx'\nimport { builtinOverride } from './model.ts'\nimport { ErrorText, useWrite } from './parts.tsx'\nimport { sparseSettingOperations } from './sparse.ts'\nimport css from './Settings.module.css'\n\n/** The local connection's own editors; they take over the allowlist and User-Agent options. */\nexport const localExtras: ExtraEditor<FetchSettings, LocaleKey> = {\n  options: ['allowCidrs', 'allowHostnames', 'userAgent'],\n  Editor: LocalExtras,\n}\n\ntype ExtraProps = ExtraEditorProps<FetchSettings, LocaleKey>\n\nfunction LocalExtras({ doc, write, disabled, t }: ExtraProps) {\n  const stored = builtinOverride(doc.config, 'local').options ?? {}\n  return <>\n    <AllowlistEditor allowCidrs={(stored.allowCidrs ?? []) as string[]} allowHostnames={(stored.allowHostnames ?? []) as string[]} disabled={disabled} revision={doc.revision} write={write} t={t} />\n    <UserAgentEditor doc={doc} write={write} disabled={disabled} t={t} />\n  </>\n}\n\nfunction UserAgentEditor({ doc, write, disabled, t }: ExtraProps) {\n  const id = useId()\n  const stored = builtinOverride(doc.config, 'local').options ?? {}\n  const inherited = typeof stored.userAgent === 'string' ? stored.userAgent : DEFAULT_LOCAL_SETTINGS.userAgent\n  const [draft, setDraft] = useState<string | undefined>(undefined)\n  const action = useWrite(t)\n  const text = draft === undefined ? inherited : draft\n  const valid = USER_AGENT_PATTERN.test(text)\n  const commit = async (value: string | undefined) => {\n    if (value !== undefined && !USER_AGENT_PATTERN.test(value)) return\n    if (value === inherited) { setDraft(undefined); return }\n    const ops = sparseSettingOperations(doc.layers, ['connections', 'builtin:local', 'options', 'userAgent'], value, DEFAULT_LOCAL_SETTINGS.userAgent)\n    if (await action.run(() => write(ops))) setDraft(undefined)\n  }\n  return <div className={css.formField}>\n    <label className={css.fieldLabel} htmlFor={id}>{t('option.local.userAgent')}</label>\n    <div className={css.inline}>\n      <Input id={id} className={css.input as string} value={text} disabled={disabled || action.busy} aria-invalid={!valid}\n        onChange={event => { setDraft(event.target.value) }} onBlur={() => { void commit(text) }}\n        onKeyDown={event => { if (event.key === 'Enter' && !event.nativeEvent.isComposing) { event.preventDefault(); void commit(text) } }} />\n      <Button variant=\"ghost\" disabled={disabled || action.busy} onClick={() => { void commit(undefined) }}>{t('option.local.userAgentReset')}</Button>\n    </div>\n    <p className={css.hint}>{t('option.local.userAgentHint')}</p>\n    {valid ? null : <p className={css.fieldError}>{t('options.invalid')}</p>}\n    <ErrorText title={action.errorTitle}>{action.error}</ErrorText>\n  </div>\n}\n","import { createServicesSection } from 'dsh-tool-web-enhanced-core/client'\nimport { CATALOG, type CatalogKey } from '../../catalog.ts'\nimport type { FetchSettings } from '../../settings/types.ts'\nimport type { LocaleKey } from '../locales.ts'\nimport { CredentialEditor } from './CredentialEditor.tsx'\nimport { localExtras } from './LocalExtras.tsx'\nimport { catalogLabel, optionCopy, SERVICE_NOTES } from './model.ts'\nimport { optionsEditor } from './OptionsEditor.tsx'\nimport { settingsParts } from './parts.tsx'\nimport * as sparse from './sparse.ts'\nimport css from './Settings.module.css'\nexport const ServicesSection = createServicesSection<FetchSettings, CatalogKey, LocaleKey>({\n  classes: css, parts: settingsParts, CredentialEditor, optionsEditor, sparse, catalog: CATALOG,\n  label: catalogLabel, optionCopy, notes: SERVICE_NOTES, summaries: { local: 'access.local' }, extras: { local: localExtras },\n  keys: {\n    'services.title': 'services.title',\n    'services.optInNotice': 'services.optInNotice',\n    'options.hint': 'options.hint',\n    'options.keylessMore': 'options.keylessMore',\n    'options.invalid': 'options.invalid',\n    'options.default': 'options.default',\n    'services.remoteNotice': 'services.remoteNotice',\n    'services.off': 'services.off',\n    'services.configureLabel': 'services.configureLabel',\n    'services.configure': 'services.configure',\n    'services.enable': 'services.enable',\n    'services.access': 'services.access',\n    'services.accessKeyless': 'services.accessKeyless',\n    'services.accessPersonal': 'services.accessPersonal',\n    'services.accessHint.keyless': 'services.accessHint.keyless',\n    'services.accessHint.apiKey': 'services.accessHint.apiKey',\n    'services.accountHint': 'services.accountHint',\n    'services.getKey': 'services.getKey',\n    'services.trust': 'option.native.trust',\n    'options.title': 'options.title',\n    'services.keyless': 'services.keyless',\n    'services.account': 'services.account',\n    'services.personalKey': 'services.personalKey',\n    'credential.set': 'credential.set',\n    'credential.unset': 'credential.unset',\n    'credential.reference': 'credential.reference',\n    'credential.referenceHint': 'credential.referenceHint',\n    'services.trustUnsaved': 'services.trustUnsaved',\n  },\n})\n","import { StateDot } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport { createResetSection, createRouteNotice, useSettingsDocument } from 'dsh-tool-web-enhanced-core/client'\nimport type { SettingsPageInjected } from '../injected.ts'\nimport type { NS, LocaleKey } from '../locales.ts'\nimport { CustomConnectionsSection } from './CustomConnections.tsx'\nimport { DefaultsSection } from './DefaultsSection.tsx'\nimport { EnhancedToolsSection } from './EnhancedToolsSection.tsx'\nimport { PairingsSection } from './PairingsSection.tsx'\nimport { resolveSettings } from '../../settings/resolve.ts'\nimport { settingsParts, type SettingsDoc } from './parts.tsx'\nimport { ServicesSection } from './ServicesSection.tsx'\nimport * as sparse from './sparse.ts'\nimport css from './Settings.module.css'\n\nexport type SettingsPageProps = PropsRuntime<'plugins.row.config'> & InjectFace<SettingsPageInjected> & PropsLocale<typeof NS>\n\nexport function SettingsPage({ useSettings, useCredentials, useRoute, usePairings, readSettings, mutate, saveCredential, forgetPairing, t }: SettingsPageProps) {\n  const snapshot = useSettings(value => value)\n  const credentials = useCredentials(value => value)\n  const route = useRoute(value => value)\n  const pairings = usePairings(value => value)\n  const { view, write, migrationError } = useSettingsDocument(snapshot, readSettings, resolveSettings, mutate)\n  if (snapshot.status === 'unavailable') return null\n  if (snapshot.value === undefined || snapshot.revision === undefined) {\n    return <p className={css.status} role=\"status\"><StateDot state=\"ongoing\" />{t('settings.loading')}</p>\n  }\n  if (view === undefined) return null\n  const resetDoc = { config: snapshot.value, layers: view.layers, revision: snapshot.revision, editable: snapshot.writable }\n  if (view.kind === 'invalid') return <div className={css.page}>\n    <p className={css.warning} role=\"alert\" title={view.diagnostic}>{t('settings.unsupported')}</p>\n    <ResetSection doc={resetDoc} write={write} t={t} />\n  </div>\n  const doc: SettingsDoc = { ...resetDoc, config: view.config, editable: snapshot.writable && !view.needsWriteback }\n\n  return <div className={css.page}>\n    <p className={css.intro}>{t('settings.intro')}</p>\n    {view.needsWriteback ? <p className={css.warning} role=\"status\">{t('settings.loading')}</p> : null}\n    {snapshot.writable ? null : <p className={css.warning} role=\"status\">{t('settings.readOnly')}</p>}\n    {migrationError === undefined ? null : <p className={css.warning} role=\"alert\" title={migrationError}>{t('settings.invalid')}</p>}\n    <RouteNotice route={route} t={t} />\n    <DefaultsSection doc={doc} write={write} credentials={credentials} t={t} />\n    <EnhancedToolsSection doc={doc} write={write} t={t} />\n    <ServicesSection doc={doc} write={write} credentials={credentials} saveCredential={saveCredential} t={t} />\n    <CustomConnectionsSection doc={doc} write={write} credentials={credentials} saveCredential={saveCredential} t={t} />\n    <PairingsSection pairingsState={pairings} config={doc.config} forgetPairing={forgetPairing} t={t} />\n    <ResetSection doc={resetDoc} write={write} t={t} />\n  </div>\n}\n\nconst RouteNotice = createRouteNotice<LocaleKey>({ classes: css, keys: { unknown: 'route.unknown', auto: 'route.auto', other: 'route.other' } })\nconst ResetSection = createResetSection<LocaleKey>({ classes: css, parts: settingsParts, sparse, keys: {\n  'reset.confirm': 'reset.confirm', 'reset.confirmButton': 'reset.confirmButton', 'confirm.cancel': 'confirm.cancel',\n  'reset.hint': 'reset.hint', 'reset.button': 'reset.button',\n} })\n","import type { Context } from '@deepseek-ai/cordis'\nimport type { ConnectionHandle } from '@deepseek-ai/dsh-api-remotes/client'\nimport { createSnapshotStore, type ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-commands/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'\nimport { FETCH, PROFILE_PACKAGE, WEB_ROW, rowConfigKey } from 'dsh-tool-web-enhanced-core/shared'\nimport { contract } from '../contract.ts'\nimport type { FetchSettings } from '../settings/types.ts'\nimport { fetchCommand } from './command.ts'\nimport { CredentialStatus, PairingsStatus, editableSettings, followHostCommand, remoteServicesOffSource } from 'dsh-tool-web-enhanced-core/client'\nimport { CATALOG } from '../catalog.ts'\nimport { resolveSettings } from '../settings/resolve.ts'\nimport { credentialRefs } from './settings/model.ts'\nimport type { SettingsPageInjected } from './injected.ts'\nimport { en, NS, zh } from './locales.ts'\nimport { FetchRouteStatus, type WebSelection } from './route.ts'\nimport { fetchSection } from './section.ts'\nimport { FetchSelectionStore } from './selection.ts'\nimport { SettingsPage } from './settings/SettingsPage.tsx'\n\n// rc.2 exports the public handle but does not augment its carrier service.\ndeclare module '@deepseek-ai/cordis' {\n  interface Context {\n    connection: ConnectionHandle\n  }\n}\n\nexport const inject = ['connection', 'slots', 'locale', 'configForms', 'remote', 'remote.credentials']\n\nexport async function apply(ctx: Context): Promise<void> {\n  ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'fetch: dictionaries')\n  const t = ctx.locale.bind(NS)\n  const settings = ctx.configForms.get<FetchSettings>(FETCH.rowId)\n  const navigationState = createSnapshotStore<{ open: (() => void) | undefined }>({ open: undefined })\n  const navigation: ObservableSnapshot<(() => void) | undefined> = {\n    getSnapshot: () => navigationState.getSnapshot().open,\n    subscribe: listener => navigationState.subscribe(listener),\n  }\n  ctx.inject(['pluginNavigation'], scope => {\n    scope.effect(() => {\n      // rc.2 exposes openBundle only; do not inspect private navigation state.\n      navigationState.set({ open: () => { scope.pluginNavigation.openBundle(PROFILE_PACKAGE) } })\n      return () => { navigationState.set({ open: undefined }) }\n    }, 'fetch: settings link')\n  })\n  const unmount = await ctx.remote.$mount(contract.remoteInfo)\n  ctx.effect(() => unmount, 'fetch: remote')\n  ctx.inject(['remote.fetchConnections'], scope => {\n    const remote = scope.remote.fetchConnections\n    const credentials = new CredentialStatus(() => {\n      const config = settings.getSnapshot().value\n      if (config === undefined) return undefined\n      const view = editableSettings<FetchSettings>(config, {}, false, resolveSettings)\n      return view.kind === 'ready' ? view.config : undefined\n    }, scope.remote.credentials, credentialRefs)\n    const route = new FetchRouteStatus(scope.configForms.get<WebSelection>(WEB_ROW))\n    scope.effect(() => route.attach(remote), 'fetch: provider facts')\n    const pairings = new PairingsStatus(remote, () => t('pairings.forgetFailed'))\n    const selection = new FetchSelectionStore(remote, () => { pairings.invalidate() })\n    const page: SettingsPageInjected = {\n      hooks: { settings, credentials: credentials.source, route: route.source, pairings: pairings.source },\n      readSettings: () => settings.getSnapshot(),\n      async mutate(ops, revision) {\n        return settings.mutate(ops, revision)\n      },\n      async saveCredential(ref, value) {\n        const result = await scope.remote.credentials.set(ref, value)\n        if (!result.ok) throw new Error(t('credential.failed'))\n      },\n      refreshPairings: () => pairings.refresh(),\n      async forgetPairing(provider, model) {\n        await pairings.forget(provider, model)\n        selection.invalidate()\n      },\n    }\n    scope.effect(() => scope.configForms.whileServed([FETCH.rowId], () => scope.slots.inject('plugins.row.config', () => scope.slots.register({\n      name: 'plugins.row.config', key: rowConfigKey(FETCH), locale: NS, inject: () => page,\n    }, SettingsPage))), 'fetch: settings page')\n    const section = fetchSection(selection, navigation, remoteServicesOffSource(settings, CATALOG, resolveSettings), t)\n    scope.inject(['webConnections'], ui => {\n      ui.effect(() => ui.webConnections.registerRoute('fetch', route), 'fetch: route facts')\n      ui.effect(() => {\n        let unregister: (() => void) | undefined\n        const sync = () => {\n          const visible = settings.getSnapshot().value?.showSelector !== false\n          if (visible && unregister === undefined) unregister = ui.webConnections.register(section)\n          if (!visible && unregister !== undefined) {\n            unregister()\n            unregister = undefined\n          }\n        }\n        const unsubscribe = settings.subscribe(sync)\n        sync()\n        return () => {\n          unsubscribe()\n          if (unregister !== undefined) unregister()\n        }\n      }, 'fetch: composer section')\n    })\n    scope.inject(['commandUi'], command => {\n      command.effect(() => command.commandUi.decorate(fetchCommand(selection, t)), 'fetch: /setup-fetch')\n      followHostCommand(command, FETCH.command, sessionId => {\n        selection.invalidateSession(sessionId)\n        pairings.invalidate()\n      })\n    })\n    const invalidate = () => {\n      selection.invalidate()\n      credentials.refresh()\n      pairings.invalidate()\n      route.refresh()\n    }\n    scope.effect(() => settings.subscribe(invalidate), 'fetch: row settings')\n    scope.effect(() => scope.remote.$on('settings/document-updated', invalidate), 'fetch: settings updates')\n    scope.effect(() => scope.remote.$on('credentials/reference-updated', invalidate), 'fetch: credential updates')\n    scope.inject(['connection'], connected => {\n      connected.effect(() => connected.connection.generation.subscribe(invalidate), 'fetch: connection updates')\n    })\n  })\n}\n"],"ignoreList":[5,35],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQA,MAAa,kBAAkB;EAuC/B,MAAa,QAAwB;GACnC,aAAa;GACb,OAAO;GACP,YAAY;GACZ,OAAO;IAAE,QAAQ;IAAsB,MAAM;GAA2B;GACxE,SAAS;EACX;;;;;;EAaA,SAAgB,aAAa,KAA0B;GACrD,OAAO,GAAG,gBAAgB,GAAG,IAAI;EACnC;;;;;ECjEA,SAAgB,WAAW,OAAwB;GACjD,IAAI,CAAC,IAAI,SAAS,KAAK,GAAG,OAAO;GACjC,MAAM,MAAM,IAAI,IAAI,KAAK;GACzB,QAAQ,IAAI,aAAa,YAAY,IAAI,aAAa,YAAY,IAAI,aAAa,MAAM,IAAI,aAAa,MAAM,IAAI,WAAW,MAAM,IAAI,SAAS;EACpJ;;;;;;;;;ECEA,MAAa,kBAAkB;EAK/B,MAAa,iBAAiB;EAC9B,MAAa,gBAAgB;;EAG7B,MAAa,uBAAuB;;EASpC,MAAa,iBAAiB;EA2E9B,MAAa,aAAa,QAA8B,GAAG,iBAAiB;;EAM5E,SAAgB,WAAW,IAAgC;GACzD,OAAO,GAAG,WAAA,UAAyB,IAAI,GAAG,MAAM,CAAqB,IAAI,KAAA;EAC3E;;EAGA,SAAgB,cAAc,QAAiC;GAC7D,OAAO,OAAO,UAAU,YA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