rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:aiShuiJiaoDeXioShou/dsh-canvas
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
An AI-native design canvas inside DeepSeek Harness. Design UI mockups in the right sidebar, send the current selection into the chat composer with one click, and let the agent generate or edit the design through an open JSON file.
The package name is @local/dsh-canvas; installation paths, dsh-canvas:// links,
and the dsh.canvas@1 document format retain their technical identifiers.
right Sidebar guide card "Drafi" → Drafi tab
The composer toolbar carries no Drafi button; the right sidebar is the only entry point. Inserting a selection still adds a locate chip above the composer.

@font-face, used by the text tool and embedded into exports.canvas_comment.canvas_template tool.canvas-ui-design runtime skill: adapted from the user's BD Flutter Dev UI
design skill suite (source/adaptation notes:
SOURCE.md). It drives direct
page/component generation, reference rebuilds, refactor, design review and
handoff on the canvas.canvas_audit tool for screenshot-boundary, contrast,
touch-target, clipping, missing-reference and empty-frame checks, with
explicit skipped checks.image_generation is used; otherwise the
user imports images. canvas_image probe/generate/import exposes this.canvas/DESIGN.md).canvas_read, canvas_write, canvas_edit, canvas_comment,
canvas_template, canvas_audit, canvas_image, canvas_export,
canvas_import, canvas_migrate, canvas_snapshot.canvas_read takes query (match id/name/text and return matches with their
ancestor path), fields (only the outline sections you need), depth and
childrenLimit. Tool output is compact JSON, so a read costs far less context
than the pretty-printed form.canvas_snapshot renders the open canvas tab and saves a PNG under
canvas/exports/, so the agent can read the image instead of guessing visual
results. It requires an open canvas tab; without one the tool explains why.canvas_export writes <name>.drafi.json under
canvas/exports/; the toolbar export dialog downloads the same pack file
through the save picker. canvas_import restores a pack as a document plus
assets.canvas_migrate upgrades a stored document to the current format version and
reports what changed.path vector nodes: SVG path d, viewBox, fill/stroke, solid/gradient
paints and SVG export; basic SVG path import via the toolbar. No pen/anchors.src/{shared,host,client} with generated
client/client.js and dist/host/main.js.
Agent writes appear in an open canvas within a second (SSE, with a polling
fallback). The user's current selection is part of canvas_read output.[画布选区:Title](dsh-canvas://main?node=title). Node details are no longer
duplicated into the draft; the agent reads them with canvas_read. In the
composer it is markdown text; after sending, the chat replaces it with a
clickable canvas chip that opens/focuses the canvas tab, loads that document,
selects the node and zooms to it.#4D6BFE) with larger,
rounder icon buttons; generated iOS templates keep Apple HIG blue.Large-company systems worth knowing: Material Design 3 (Google), Apple Human Interface Guidelines, Fluent 2 (Microsoft), Carbon (IBM), Spectrum (Adobe), Lightning (Salesforce), Polaris (Shopify), Primer (GitHub), Atlassian Design System, Base Web (Uber), and Ant Design / Arco / Semi / TDesign in Chinese products.
Material Design 3 is the most universal cross-platform default. For iOS the platform baseline is Apple HIG. The plugin picks Material 3 when no system is named, and the iOS templates use HIG metrics.
canvas_template action="foundation" returns device (iPhone 16
default / iPhone 15 legacy), Neutral/Minimal/Soft/Compact preset and resolved
tokens.canvas_template { action: "list" | "insert", template: "ios-screen" }.canvas_template { action: "styles", system: "material3" | "ios" }.
The fill/text/effect styles then appear in the Styles panel and can be applied
to layers; loading does not restyle existing layers automatically.V/F/R/O/L/T/H/C/I — move/frame/rectangle/ellipse/line/text/hand/comment/imageSpace drag — pan; mouse wheel — zoom; 1 fit; 2 fit selectionShift+1 / Shift+2 / Shift+0 — fit / fit selection / 100%⌘/Ctrl+C/X/V/D — copy/cut/paste/duplicate; ⌘/Ctrl+G / ⇧⌘G — group/ungroup⌘/Ctrl+] / [ — forward/backward; ⇧⌘] / ⇧⌘[ — front/back⌥/Alt + hover — measure spacing to adjacent elements; release to clearShift+A — add auto layout to selected frame/group⌥⌘K / Ctrl+Alt+K — create component from selection⇧⌘L / ⇧⌘H — lock/unlock or hide/show selection⌘/Ctrl+Z / ⇧⌘Z — undo/redo; Delete — delete; arrows — nudge (Shift = 10)<workspace>/canvas/<name>.canvas.json dsh.canvas@1 document (default `main`)
<workspace>/canvas/assets/ image assets
<workspace>/canvas/fonts/ uploaded font files
<workspace>/canvas/exports/ agent exports and snapshots
<workspace>/canvas/FORMAT.md format reference (generated on first open)
<workspace>/canvas/DESIGN.md default design system and templates
The format is plain JSON and is documented in FORMAT.md and
schema/canvas.v1.schema.json. The agent can edit
it through the canvas tools, or with ordinary read/write file tools; the
editor watches the file and reloads external changes.
Repository: https://github.com/aiShuiJiaoDeXioShou/dsh-canvas
git clone https://github.com/aiShuiJiaoDeXioShou/dsh-canvas.git
cd dsh-canvas
pnpm install
pnpm typecheck
pnpm build
pnpm test
Then install the bundle in the current profile:
plugin_manager action=install_bundle target=/absolute/path/to/dsh-canvas
client/client.js and dist/host/main.js are committed so a checkout can be
installed directly; run pnpm build after source changes. Refresh the Harness
page (or toggle the plugin) to load a rebuilt client bundle. Host code reloads
on plugin disable/enable.
MIT; see LICENSE.
pnpm typecheck # TypeScript checks
pnpm build # esbuild → client/client.js + dist/host/main.js
pnpm test # tsx --test tests/*.test.ts
| Path | Role |
|---|---|
index.js |
thin Host entry, cache-busted import of dist/host/main.js |
src/shared/format.ts |
document model, normalization and validation |
src/shared/ops.ts |
document mutations shared by tools and UI |
src/host/main.ts |
Host routes, SSE, file store, assets/fonts, agent tools |
src/host/skills.ts |
Registers the runtime canvas-ui-design skill |
src/shared/design-system.ts |
Material 3 / iOS HIG tokens and the default-system summary |
src/shared/foundation.ts |
iPhone device metrics + Neutral/Minimal/Soft/Compact presets |
src/shared/templates.ts |
Device-aware iOS page/system templates and placement metadata |
src/shared/audit.ts |
Deterministic design audit checks |
src/host/image.ts |
GPT/Codex image capability probe, Codex CLI adapter and image import |
skills/canvas-ui-design/ |
Adapted UI design skill, workflows and references |
src/client/index.jsx |
placement in the right sidebar (with inline-dock fallback) |
src/client/store.js |
the canvas tab's mutable store, history, autosave, AI sync |
src/client/editor/ |
resolve/layout, hit testing, geometry, text measure, export |
src/client/ui/ |
toolbar, layer tree, inspector, panels |
The client bundle has no runtime npm dependencies; React and the JSX runtime come from the Harness platform module table.
canvas_snapshot returns, which is why it needs an open canvas tab.<path> import is supported; transforms, text,
filters and masks are skipped with warnings. Image generation requires a
GPT-native image tool or a local Codex CLI with image_generation; otherwise
import an image.skills/canvas-ui-design/); Figma/Flutter-specific parts were replaced
with canvas tools and design handoff.icon.png contains the AI-generated Drafi mascot artwork; the browser bundle embeds it directly. icon.svg embeds the same PNG for the package icon export and is not a vector tracing. The full-resolution source is docs/drafi-icon.png.
The artwork combines the Figma mark with a whale-maid character inspired by the community DeepSeek mascot. Drafi is an independent plugin, not an official Figma product. The code's MIT license does not grant rights to third-party trademarks or character designs.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。