READMESource: main@0b99b854
![]()
Rastin
Cordis bundle for the DeepSeek Harness Web GUI: Persian RTL layout with embedded fonts.
Features
- Persian RTL — chat, queue, question/plan-review, and todo surfaces read right-to-left on the IranYekanX face, shipped as base64 woff2 inside the bundle.
- Per-seat auto-direction — each message (and each todo item) follows its own leading word run: a real English opening reads LTR while a lone English term ("Merge کن") stays RTL.
- 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
fontsetter scoped to[data-sidebar-terminal]. - Todo dock opens by default — host mounts it collapsed; the bundle clicks each new panel open once (user can re-collapse; an already-seen panel is never reopened).
- Adjustable line spacing —
lineHeight(1–3, default 2) for the Persian prose surfaces including ordered and unordered lists, tunable from the Settings UI (plugin config) orcordis.patch.yml; ordered lists in RTL seats use Persian digit markers. - Adjustable chat width —
chatWidth(100 full width by default, or 75 / 50 percent) narrows the central conversation column via the host content-width variables, tunable from the Settings UI (plugin config) orcordis.patch.yml. - Justifiable prose —
textAlign(startby default, orjustify) aligns Persian paragraphs in chat and markdown surfaces, tunable from the Settings UI (plugin config) orcordis.patch.yml. - Composer auto-direction — the main input box follows its own leading word run (Persian right, English left) while typing, with no lock: clearing it restores the host default.
- RTL tables — tables inside RTL (Persian) seats keep RTL column order with start-aligned cells and captions.
- LTR islands — code blocks, tool-call/command rows, changed-files cards, and process-status labels stay LTR inside the RTL surfaces.
- RTL arrow mirror — flow arrows (← → ⇐ ⇒) in RTL prose point the RTL way via a per-glyph mirror span; copy text stays intact.
Install
pnpm add @amir83nasr/dsh-rastin
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__,/*__RASTIN_DIRECTION__*/).src/direction.js— seat-direction logic, inlined into the bundle, covered bydirection-check+orient-check.src/index.js— host half (no rendering).src/cordis.patch.yml— bundle slot patch (rastin/@amir83nasr/dsh-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. installAutoDirection()writes each seat'sdirfrom its leading word run (LTR islands excluded) and mirrors flow arrows in RTL prose; streaming ticks re-run the verdict, a settled 2+ word LTR run locks.installTerminalFont()patchesCanvasRenderingContext2D.font, scoped to the sidebar terminal; reverts on cleanup.autoOpenTodoPanels()observes the DOM and opens each new collapsed todo panel 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.
No comments yet. Be the first to write one.