description, kind
| description | kind |
|---|---|
| Types of browser-synced plugin configuration | package-reference |
@deepseek-ai/dsh-client-config
English | 中文
Summary
The types a browser plugin uses to read its live Host configuration. A plugin declares its Config once, with a Host schema; its Client face receives the top-level volatile fields as a SyncedConfig through apply and reads other packages' synced Config through ctx.config. This package holds types only; Client Modules projects, delivers, and updates the values.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
A plugin package lists this package in devDependencies and imports from @deepseek-ai/dsh-client-config/types with import type only:
| Type | Use |
|---|---|
SyncedConfig<C> |
The apply config of a Client face whose shared Config type is C: one SyncedConfigRef per top-level Volatile field. Every field may read undefined (a secret, an unprojectable value, or a Host build not yet matching the browser code), so the plugin handles the absent value at each read |
SyncedConfigRef<T> |
One field: get() reads the current frozen value as the Host reads a volatile reference, and getSnapshot with subscribe make it the observable source injected into a slot's hooks compartment. It has no write operation |
SyncedConfigValues |
The JSON values of one plugin's synced fields, as graph rows carry them |
SyncedConfigService |
ctx.config.resolveConfigByPackage<C>(packageName), a read-only lookup of another package's current activation object; importing the types also declares ctx.config |
Understand the implementation
Implementation internals — click to expand
The package exports types through ./types and both faces, and its Host and Client apply register nothing. Client Modules implements every type: the Host face projects values into graph rows, and the page entry controller hands each plugin activation its object and provides ctx.config. Plugins therefore depend on these types instead of on the bootstrap Client Modules package.
Further Exploration
Model Experience
None, as the package declares browser configuration types and registers nothing model-facing.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
resolveConfigByPackagetrusts the caller's Config type argument; a wrong type is not detected.
Dev Note
Working context for maintainers — click to expand
None.