Amir83Nasr/dsh-rastin ↗★ 0

@amir83nasr/rastin

提供波斯语从右至左排版及内置字体的界面包 适合需要波斯语 RTL 界面排版、特定终端字体及 Todo 栏默认展开的用户。

包名
@amir83nasr/rastin
兼容性
待验证
版本
0.1.0
最近更新
2026年9月26日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Amir83Nasr/dsh-rastin

Rastin

Cordis bundle for the DeepSeek Harness Web GUI: Persian RTL layout with embedded fonts.

Features

  • Persian RTL — chat, queue, and question/plan-review surfaces read right-to-left on the IranYekanX face, shipped as base64 woff2 inside the bundle.
  • Sidebar terminal font — FiraMono Nerd Font Mono. xterm draws on canvas, so CSS alone can't restyle glyphs; the bundle embeds the face and patches the canvas 2d font setter scoped to [data-sidebar-terminal].
  • Todo dock opens by default — host mounts it collapsed; the bundle clicks it open once (user can re-collapse).
  • LTR islands — code blocks, tool-call/command rows, changed-files cards, and process-status labels stay LTR inside the RTL surfaces.

Requirements

  • Node.js 24 (matches ci) + pnpm 12 (packageManager).

Setup

pnpm install --frozen-lockfile
pnpm setup # git hooks: pre-commit = prettier check, pre-push = build + self-check

Workflow

pnpm build # src/client.template.js + fonts → client.js (generated, git-ignored)
pnpm test # build + self-check (mocked ctx, cleanup assertions)

Edit src/client.template.js — never client.js directly.

Files

  • src/client.template.js — editable source (placeholders __IRANYEKAN_B64__, __FIRAMONO_B64__).
  • src/index.js — host half (no rendering).
  • src/cordis.patch.yml — bundle slot patch (rastin / @amir83nasr/rastin).
  • scripts/build.mjs — template + fonts → client.js.
  • scripts/self-check.mjs — behavioral wiring check.
  • fonts/ — embedded faces (.woff2).
  • locale/ — bundle metadata (en.json / fa.json).
  • client.js — generated output (git-ignored).

How it works

  • One style seat on shell.overlay (rastin-style) injects @font-face + RTL rules.
  • installTerminalFont() patches CanvasRenderingContext2D.font, scoped to the sidebar terminal; reverts on cleanup.
  • autoOpenTodoPanels() observes the DOM and opens collapsed todo panels once; disconnects on cleanup.

Release

See AGENTS.md (RELEASE / PUBLISH (origin)): bump version, update CHANGELOG.md, verify, tag vX.Y.Z, push commit + tag, create GitHub Release.