feat: ship the unique offline marqdo web Tool (WEB-02 candidate) #2

Merged
cflmy merged 1 commits from feature/web02-preview into main 2026-11-27 08:53:13 +08:00
Owner

范围(WEB-02 首个候选)

在唯一责任仓实现 marqdo web Tool 的首个可用版本:

  • 独立 executable + tool.json(command: web,api_revision 1/analysis 3),通过真实 CLI tool install 注册、tool remove 卸载。
  • 只消费固定 git revision 的 marqdo-web-design 公开 crate(Cargo.lock 锁定;非 ../design 路径依赖),不复制 Markdown/设计解析。
  • web check|preview|handoff:check 摘要;preview 生成单个离线 index.html(严格 hashed CSP、原型/模拟标识、构建摘要、场景面板、模拟按钮、重置、无服务/无网络/无 eval);handoff 原子写 Markdown。
  • 安全/发布:ContentBlock 全转义、raw HTML inert、拒绝 javascript:/外部 script、输出默认不覆盖、staging→rename 原子发布、拒绝 symlink 目标、0/1/2 退出码与 stderr 诊断。
  • scripts/ci.sh 真实执行 fmt/clippy、构建、tool install → check/preview/handoff → 覆盖拒绝 → CLI 二进制 SHA 不变 → tool remove。

验证(候选 e739f45)

MARQDO_BIN=<root-fixed CLI> scripts/ci.sh PASS;Design 依赖 2f18ded。证据:docs/evidence/WEB-02-preview-candidate.md。

未完成(不隐藏,工单保持 open)

真实浏览器/file:// 行为与 390px responsive 验收、图片/本地 raster 资产与魔数校验、完整安全负例矩阵(</script>/Unicode/双引号等)、输出/超时/进程预算边界、WEB-05 冷安装与根接入。

Refs cflmy/marqdo-web-preview#1, cflmy/marqdo#6

## 范围(WEB-02 首个候选) 在唯一责任仓实现 `marqdo web` Tool 的首个可用版本: - 独立 executable + `tool.json`(`command: web`,api_revision 1/analysis 3),通过真实 CLI `tool install` 注册、`tool remove` 卸载。 - 只消费固定 git revision 的 `marqdo-web-design` 公开 crate(`Cargo.lock` 锁定;非 `../design` 路径依赖),不复制 Markdown/设计解析。 - `web check|preview|handoff`:check 摘要;preview 生成单个离线 `index.html`(严格 hashed CSP、原型/模拟标识、构建摘要、场景面板、模拟按钮、重置、无服务/无网络/无 eval);handoff 原子写 Markdown。 - 安全/发布:ContentBlock 全转义、raw HTML inert、拒绝 `javascript:`/外部 script、输出默认不覆盖、staging→rename 原子发布、拒绝 symlink 目标、0/1/2 退出码与 stderr 诊断。 - `scripts/ci.sh` 真实执行 fmt/clippy、构建、tool install → check/preview/handoff → 覆盖拒绝 → CLI 二进制 SHA 不变 → tool remove。 ## 验证(候选 `e739f45`) `MARQDO_BIN=<root-fixed CLI> scripts/ci.sh` PASS;Design 依赖 `2f18ded`。证据:[docs/evidence/WEB-02-preview-candidate.md](docs/evidence/WEB-02-preview-candidate.md)。 ## 未完成(不隐藏,工单保持 open) 真实浏览器/file:// 行为与 390px responsive 验收、图片/本地 raster 资产与魔数校验、完整安全负例矩阵(`</script>`/Unicode/双引号等)、输出/超时/进程预算边界、WEB-05 冷安装与根接入。 Refs cflmy/marqdo-web-preview#1, cflmy/marqdo#6
cflmy added 1 commit 2026-11-27 08:53:06 +08:00
Implement the first Preview candidate in its unique owner repository:
- marqdo web check/preview/handoff with explicit ENTRY/--unit/--root/--out/
  --theme; independent executable packaged with tool.json (command web,
  api_revision/analysis requirements).
- Consume only the public marqdo-web-design crate at a fixed git revision
  (Cargo.lock pinned; no ../design path dependency, no Markdown re-parsing).
- preview renders one offline index.html: strict hashed CSP (default-src
  'none', no network), visible prototype banner and build summary, escaped
  Design ContentBlocks (raw HTML stays inert), finite-state scenario panels with
  hashed inline script and reset, no server/timer/eval business logic.
- Publication refuses existing outputs and symlink targets, builds in a private
  sibling staging dir and renames atomically; 0/1/2 exit codes with stderr
  diagnostics.
- scripts/ci.sh installs the Tool through the real CLI, runs all three
  commands on a fixture project, asserts the offline/safety facts, verifies the
  CLI binary digest is unchanged and removes the Tool.
- Evidence records we do NOT yet claim real-browser/responsive acceptance,
  image assets, the full negative matrix, budgets/timeouts or WEB-05 cold
  install.

Refs cflmy/marqdo-web-preview#1, cflmy/marqdo#6
cflmy merged commit e739f4504a into main 2026-11-27 08:53:13 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cflmy/marqdo-web-preview#2