New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-appearance

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-appearance

外观协调器:在 DSH 设置中新增「外观」页,统一注册、开关与体检外观类插件(冲突/危险/性能检查)

latest
npmnpm
Version
0.2.0
Version published
Weekly downloads
9
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

dsh-appearance

Appearance coordinator for DSH: adds an "Appearance" page to Settings to manage appearance plugins in one place.

What it does

  • Adds Appearance to the settings sidebar, between General and Models.
  • Appearance plugins register through the appearance.manager service; the page renders one card per registered module: enable/disable switch, status badge and parameter controls (driven by each module's declared settingsSchema; descriptions are hover tooltips).
  • Three generic checks per module (they work for any number of appearance plugins; the input is each module's embedded whale-picks manifest v1.1 fields):
    • Conflicts: duplicate loader ids / mount points / settings namespaces across modules; declared deps not registered;
    • Danger: declared capabilities (network/telemetry/permissions) + the code-scan verdict from the whale-picks check pipeline (security.verdict);
    • Performance: perf declarations — poll cadences, memory estimate, GPU/VRAM, long-lived timers.
  • The browser never re-scans code: verdicts come from the whale-picks check pipeline (Node side); this page only presents them.
  • Shows an empty state when no appearance plugin is installed.

Install

From npm:

dsh plugin add dsh-appearance

Or manually: add dsh-appearance to the web profile's dsh.profile.bundles, install dependencies, restart dsh web.

Note: do not insert an id appearance row into ~/.dsh/profiles/web/cordis.patch.yml (the loader refuses to boot with duplicate loader entry ids).

Usage

Open Settings → Appearance.

  • Switches and parameters are declared by each appearance plugin itself.
  • Check results are advisory and never block a plugin from running.

For appearance plugin authors

In your client plugin's apply:

const manager = ctx.get('appearance.manager')
if (manager !== undefined) {
  ctx.effect(() => manager.register({
    id: 'your-module',
    name: 'Module name',
    // embedded whale-picks manifest (v1.1 fields) — the input of every check
    whalepicks: {
      patches: { insertIds: ['your-module'], namespaces: [], slots: ['slot.name'] },
      capabilities: { network: false, telemetry: false, permissions: [] },
      deps: [],
      perf: { polls: {}, memoryEstimateMB: 2, gpu: false, timers: 0 },
      security: { verdict: 'passed', scanBy: 'whalepicks check-plugin' },
    },
    // parameter controls (desc is a hover tooltip only)
    settingsSchema: [{ key: 'foo', kind: 'switch', title: 'Switch', desc: 'hover hint' }],
    getState: () => state,
    setState: (patch) => { /* merge + persist + notify */ },
    // optional: live footprint — return your mounted root elements and the
    // manager page counts their DOM subtree nodes every 2s (the performance
    // row's "UI nodes N (live)"); omit the field and the line stays hidden
    roots: () => [rootEl],
  }))
}

Copy is bilingual: name/title/desc/placeholder accept { key } refs resolved through the module's own locale dictionary (plain strings still render verbatim, for compatibility). Persist state to localStorage (see dsh-statusbar); the rc.6 web settings gateway only exposes an allowlisted set of namespaces.

Uninstall

Remove the package from the profile and restart; the Appearance page disappears with it.

Whale-picks paradigm

This repo is the paradigm's service-provider example (spec/PARADIGM.md): the settings.section slot + the appearance.manager service + the module self-descriptor contract; the host half is an empty implementation (browser-only).

  • Paradigm: https://github.com/LeeKai233/dsh-whale-picks/blob/main/spec/PARADIGM.md
  • Migration guide: https://github.com/LeeKai233/dsh-whale-picks/blob/main/docs/migrate-to-paradigm.md

Repository structure

  • src/client: browser-side source.
  • src/index.ts: Node entry (empty implementation — browser-only).
  • lib/client.js: build output.
  • whalepicks.json: the whale-picks manifest.
  • tests: unit tests.

Development

pnpm install
pnpm bundle
pnpm test

Keywords

dsh

FAQs

Package last updated on 16 Aug 2026

Related posts