AuraxM/dsh-plugin-doc-present ↗★ 0

dsh-doc-present

Doc Present: let the agent present plans/designs as self-contained interactive HTML pages (FX animations) - shown in an in-GUI panel and a shareable LAN preview server instead of long chat text 适合需要将设计方案以交互网页形式展示并进行局域网分享的用户。

패키지
dsh-doc-present
호환성
미검증
버전
0.1.0
최근 업데이트
2026. 9. 1.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

Usage

For the agent (model tool)

doc_present — one tool for the whole lifecycle:

actionWhat it does
newCreate //index.html from the template (needs slug, optional title), ensure the LAN server, return the file path and all URLs. The agent then writes the content with its normal write/edit tools.
statusServer state, root, port, doc counts, URLs.
ensureStart (or reuse/adopt) the LAN server; prints share URLs.
listList published docs with update times (all: true includes withdrawn, query: "..." filters by slug/title).
unpublishTake a doc offline (visitors see a 410 page); files kept, restorable.
republishRe-publish a withdrawn doc.
deleteMove a doc to the trash (hard: true deletes permanently).
trashList the trash (empty: true empties it).
restoreMove a trash item back to the doc root (needs name from the trash list).

Authoring rules the agent follows (enforced by the prompt section): a doc is one self-contained HTML file — inline CSS/JS, no CDN / web fonts / external images (LAN readers may not reach the public internet), demos paused by default with a static caption each, semantic colors (blue = active, green = done, yellow = attention, red = risk, purple = self-call). The two guides in references/ teach the FX framework and the writing structure; the prompt section points the agent at their absolute paths.

For the user

  • 📄 方案预览 button (session header, top right) — toggle the preview drawer: doc chips on top, live preview below; 浏览器打开 / 复制链接 / ↔ 全宽 / ⟳ / ✕ in the drawer header; Esc closes.
  • Doc management in the drawer — a search box filters chips by title/slug; the manage bar shows the selected doc's update time and offers 撤回 / 重新发布 and 删除 (soft delete into the trash, confirmed first); the 回收站 section restores items individually or empties the trash. These actions call the loopback-only POST /doc-present/__api__/manage endpoint, so LAN visitors keep read-only access.
  • Tool cards — after the agent publishes, its doc_present result renders a card with 在面板中打开 (opens the drawer straight at that doc), 浏览器打开, and 复制内网链接.
  • /doc-present status|start|stop|list — the service as a command. (/doc-present json is the machine-readable state the panel uses.)

Configuration

  • Doc root: DOC_PRESENT_ROOT env var, default ~/.dsh/doc-present (docs + .server/ metadata: config.json, state.json, trash/).
  • Port: DOC_PRESENT_PORT env var > /.server/config.json > 8899.
  • Template and guides resolve relative to the installed package, so keep assets/ and references/ next to lib/.