feat(PR-05): pure static export and hardened Live boundary

- export.rs: marqdo view export PATH --out DIR through the same ReaderRenderer;
  index.html + pages/<relative>.html + hash-named assets + manifest.json
- export never calls Core run; refuses output inside project root and unrelated
  non-empty dirs; staging + atomic rename replaces only prior View exports
- offline by construction: embedded asset bytes, data-URI images, relative
  links, no remote subresources; --no-annotations hides anchors only
- HTTP hardening: max 32 concurrent requests (503), detail-free public error
  JSON/pages (no absolute paths/subprocess text), 30s page check budget
- tools/test-export.sh (manifest hashes + file:// Chromium offline check),
  tools/test-security.sh, adversarial security-project browser fixture
- tests/export.rs export contracts; ADR-0005; docs updated
This commit is contained in:
marqdo-view dev committed 2026-11-22 11:52:22 +08:00
1 parent 9a80272b5f
commit 1f34daffb0
20 files changed
+983 -19

No files matched your search

+2 -2
View File
@@ -30,8 +30,8 @@ Beta 版 CLI 必须使用 prerelease 范围(`>=3.0.0-beta.1,<4.0.0`);`>=3.
| 文档态 / 源码态切换 | **已实现**(PR-02) |
| 暖纸 Reader 视觉(单一 CSS/JS) | 计划 PR-03 |
| 用户显式触发运行 + Trace v2 事件可视化 | **已实现**(PR-04,仅 `pure` 模式,需页面内确认 + CSRF) |
| Live 本机安全 API | 部分实现(PR-02 只读 + PR-04 run;PR-05 强化/导出) |
| 静态离线导出(纯只读) | 计划 PR-05 |
| Live 本机安全 API | **已实现**(PR-02 只读 + PR-04 run + PR-05 并发/公开错误/导出) |
| 静态离线导出(纯只读) | **已实现**(PR-05,同一渲染器) |
| 逐语句变量值 / 参数实际值 / 内存快照 | **UNSUPPORTED**(Trace v2 不提供,绝不伪造) |
| 知识“已证明”状态 | **UNSUPPORTED**(需要独立 Prove 协议与证书) |
| 调试器/断点/单步 | **不实现**(首版非目标) |