docs: record the 0.1.6-alpha.2 adaptation and resync the user docs

Adds the per-version adaptation record (docs/plans/2026-09-21-…-adaptation.md),
rewrites AGENTS.md §3 for the new baseline (the two silent contract breaks, the
terminal/browser handoff, the new official plugin-manager surface, the three
ui-primitives breaks, the widened primitives bare-import set), and updates both
READMEs and the integration guide for the v0.20.0 feature set.

Also retires the support text the terminal deletion made false: the install
flow is one step again (no build-script approval), the FAQ's two node-pty rows
collapse into one pointing at DSH's own terminal, the platform note no longer
promises prebuilt native binaries (there are no native deps left), and the
installers drop the -Repair mode and their allowBuilds writes along with
pnpm-workspace.yaml's now-empty allowBuilds block. Removes the dead
browserNoSandboxWarning locale key (its setting went with the plugin's browser)
and tightens theme.spec's capsule guard so a literal colour fails it.

The e2e resolver now refuses a PATH  that is not on the baseline line:
this machine's PATH  is 0.1.6-alpha.1, and running the mount lane against
it fails at 'the bundle was not registered' with a zero exit from the CLI —
a misleading dead end worth one explicit error instead.
This commit is contained in:
Menghuan1918
2026-09-21 21:00:09 +08:00
parent 5912274e41
commit de99fd4cfb
32 changed files with 308 additions and 221 deletions
+16 -12
View File
@@ -127,21 +127,25 @@ describe('skin contract: the plugin owns no color of its own', () => {
// paint. A literal here would drift away from the host under every skin.
const styles = readFileSync(resolve(ROOT, 'src/client/sidebar.module.css'), 'utf8')
const block = /\.paneCard \{([\s\S]*?)\n\}/.exec(styles)?.[1]
expect(block, 'the .paneCard rule must exist').toBeDefined()
expect(block!).toContain('border: 0.5px solid var(--dsw-alias-border-l4)')
expect(block!).toContain('border-radius: 24px')
expect(block!).toContain('background: var(--dsw-alias-bg-layer-1)')
expect(block!).toContain('min-height: 56px')
expect(block!).toContain('padding: 14px 20px')
if (block === undefined) throw new Error('the .paneCard rule must exist in src/client/sidebar.module.css')
expect(block).toContain('border: 0.5px solid var(--dsw-alias-border-l4)')
expect(block).toContain('border-radius: 24px')
expect(block).toContain('background: var(--dsw-alias-bg-layer-1)')
expect(block).toContain('min-height: 56px')
expect(block).toContain('padding: 14px 20px')
// No paint of its own: every color-ish declaration resolves to a token,
// and the upstream-only spellings this repo must not copy are absent.
for (const declaration of block!.matchAll(/(?:^|\n)\s*(?:background|border|color|font):\s*([^;]+);/g)) {
const value = declaration[1]
if (!/var\(--dsw-/.test(value)) continue
expect(value, declaration[0]).toContain('var(--dsw-')
for (const declaration of block.matchAll(/(?:^|\n)\s*(?:background|border|color|font):\s*([^;]*);/g)) {
const value = declaration[1] ?? ''
// A literal here (hex, rgba, a named colour) would drift from the host
// under every skin, so any keyword whose value is not a token fails.
expect(
value === '' || value.includes('var(--dsw-'),
`${declaration[0].trim()} must paint through a --dsw-* token (got: ${value})`,
).toBe(true)
}
expect(block!).not.toContain('--dsw-alias-bg-l1')
expect(block!).not.toContain('--dsw-alias-bg-l2')
expect(block).not.toContain('--dsw-alias-bg-l1')
expect(block).not.toContain('--dsw-alias-bg-l2')
})
it('no icon dataset is shipped as a lazy chunk', () => {