From e40d21760a8cab2a218456d9b6ebc23d36a967c0 Mon Sep 17 00:00:00 2001 From: cflmy Date: Tue, 1 Sep 2026 11:18:13 +0800 Subject: [PATCH] =?UTF-8?q?release:=20v0.3.2=20=E2=80=94=20browser=20WASM?= =?UTF-8?q?=20route=20C=20+=20release=20skill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .cursor/skills/marqdo-release/SKILL.md | 166 ++++++++++ .cursor/skills/marqdo-release/reference.md | 305 ++++++++++++++++++ .../marqdo-release/scripts/detect_version.py | 76 +++++ .cursor/skills/marqdo/SKILL.md | 2 + .github/workflows/release.yml | 8 +- CHANGELOG.md | 20 ++ Cargo.toml | 2 +- README.md | 15 +- crates/marqdo-wasm/Cargo.toml | 2 +- public/features/05-extensions.mq.md | 2 +- public/features/05-扩展.mq.md | 2 +- skills/marqdo/SKILL.md | 2 + 12 files changed, 589 insertions(+), 13 deletions(-) create mode 100644 .cursor/skills/marqdo-release/SKILL.md create mode 100644 .cursor/skills/marqdo-release/reference.md create mode 100755 .cursor/skills/marqdo-release/scripts/detect_version.py diff --git a/.cursor/skills/marqdo-release/SKILL.md b/.cursor/skills/marqdo-release/SKILL.md new file mode 100644 index 0000000..51e10f9 --- /dev/null +++ b/.cursor/skills/marqdo-release/SKILL.md @@ -0,0 +1,166 @@ +--- +name: marqdo-release +description: >- + Run a full Marqdo product release: detect latest version and ask the user for + the next tag, update CHANGELOG/README/skills/public docs, bump Cargo versions, + sync VS Code extension on branch vscode-extension when needed, build or + trigger install assets (CLI, stdlib, ext, public zip, VSIX, wasm notes), push + tag, publish GitHub Release with detailed notes, and recover from network + failures via proxy. Use when the user asks to release, cut a version, publish + vX.Y.Z, ship a GitHub release, 发版, 发布新版本, or tag marqdo. +--- + +# Marqdo release + +Canonical release playbook for **cflmy/marqdo**. Read this skill **before** tagging or uploading assets. Details: [reference.md](reference.md). + +## Hard rules + +1. **Never invent the next version.** Detect current versions → **stop and ask the user** for the next SemVer (`X.Y.Z`). Do not proceed until they confirm. +2. **Never force-push** `main` / tags. **Never** `--no-verify` unless the user explicitly orders it. +3. **Never commit `vscode-extension/` on `main`** (gitignored). Extension source lives only on branch **`vscode-extension`**. See `doc/design/vscode-extension-commit.md`. +4. **Do not release from a dirty tree** (except intentional release commits you create in this flow). +5. **Tag format** is always `vX.Y.Z` matching root `Cargo.toml` `version = "X.Y.Z"`. +6. Prefer **tag push → GitHub Actions** (`.github/workflows/release.yml`) for Windows CLI + VSIX + zips. Local packaging is fallback / verification. +7. After network errors: apply [reference.md § Proxy](reference.md); retry; do not silently skip uploads. + +## Defaults (after version is confirmed) + +Unless the user overrides, apply these automatically — **do not re-ask**: + +| Setting | Default | +|---------|---------| +| Sync / bump `vscode-extension` to same `VER` | **yes** | +| Push `main`, create annotated tag, push tag immediately (trigger CI) | **yes** | +| Release notes language | **中英双语** (Chinese first, then English section, or paired ZH/EN under each heading) | +| Skip VSIX | **no** | +| Docs-only release | **no** (full asset pipeline via CI) | +| Deploy gh-pages after release | **no** (only if user asks) | + +Phase 0 asks **only** for the next version (and optional overrides). Example ask: + +> 当前最新是 **vA.B.C**。请指定下一个版本号(如 `0.3.2`)。其余按默认:同步扩展、立刻打 tag 发布、中英双语说明。 + +## Phase 0 — Detect versions (mandatory stop) + +Run in repo root (parallel OK): + +```bash +python3 .cursor/skills/marqdo-release/scripts/detect_version.py +# or: rg / git tag / gh release list — see reference.md +``` + +Report briefly, then **ask only for the next SemVer** (defaults above). Wait for confirmation. Normalize to `VER=X.Y.Z` and `TAG=vX.Y.Z`. + +## Phase 1 — Preflight + +Copy and track: + +``` +Release progress: +- [ ] Phase 0: version confirmed by user (TAG=…) +- [ ] Phase 1: preflight green +- [ ] Phase 2: docs + version bumps committed +- [ ] Phase 3: extension branch (if needed) +- [ ] Phase 4: main pushed; tag created & pushed +- [ ] Phase 5: CI / assets / release notes verified +- [ ] Phase 6: post-release checks +``` + +Checks: + +1. `git status` clean or only release WIP you control. +2. `git checkout main && git pull --ff-only origin main`. +3. Quick gate: `cargo test --test gold structure_hello` (and any release-critical tests the user named). Full gold suite if time allows. +4. `CHANGELOG.md` has meaningful **Unreleased** notes; if empty, draft from `git log vLAST..HEAD --oneline` and confirm with user. +5. Confirm no secrets in the commit (`*.env`, credentials). + +## Phase 2 — Docs & version bumps (main) + +Bump **in lockstep**: + +| File | Change | +|------|--------| +| `Cargo.toml` | `version = "VER"` | +| `crates/marqdo-wasm/Cargo.toml` | same `VER` | +| `CHANGELOG.md` | Move `## Unreleased` → `## vVER — YYYY-MM-DD`; leave fresh empty `## Unreleased` | +| `README.md` | 「现状 / 如何使用最新」version strings, checkout tag, release URL | +| `.cursor/skills/marqdo/SKILL.md` | Version-sensitive bullets if any (WASM/web status); keep rules accurate | +| `public/**` | User-facing tutorials if features shipped (welcome, features/*, extensions). Prefer small factual updates over rewrites | +| `doc/roadmap/*.md` | Mark shipped waves done if this release closes them | +| `.github/workflows/release.yml` | Update **Highlights** body template to this release (CI still uses hardcoded blurb—keep in sync) | + +Public HTML: regenerate before packaging / pages deploy: + +```bash +./scripts/build-public.sh +# outputs under public/ (gitignored HTML); used by release zip / gh-pages +``` + +Commit on `main` (HEREDOC message), e.g.: + +```text +release: vVER — + +EOF +``` + +Push `main`: `git push origin main` (with proxy/`all` perms if needed). + +## Phase 3 — VS Code / Cursor extension + +**Default: always** bump extension to `VER` on branch `vscode-extension` (skip only if user said so). + +1. `git fetch origin vscode-extension` +2. Work on `vscode-extension` branch (not main): + - Bump `vscode-extension/package.json` `version` to `VER`. + - Update `engines` / CLI version hints in extension README if present. + - `npm ci && npm run compile` +3. Commit & `git push origin vscode-extension`. +4. Return to `main`. **Do not** add `vscode-extension/` to main. + +## Phase 4 — Tag & trigger CI + +```bash +git tag -a "TAG" -m "TAG" +git push origin "TAG" +``` + +This runs `.github/workflows/release.yml` (Windows): CLI exe/zip, stdlib zip, ext zip, source zip, public zip, VSIX. + +If tag push fails: [reference.md § Proxy](reference.md), retry once; then report. + +## Phase 5 — Release notes & assets + +1. Wait for Actions success: `gh run list --workflow=Release --limit 3` / open the run URL. +2. Ensure GitHub Release for `TAG` exists with assets (workflow uses `softprops/action-gh-release`). +3. **Rewrite release body** (workflow body is a stub) with **中英双语** — see [reference.md § Notes template](reference.md). `gh release edit TAG --notes-file …`. +4. Include: Highlights, Breaking, Install (`ext add`, plugins build), Downloads table, WASM (`marqdo wasm build`), links to CHANGELOG/README, extension branch note. +5. Optional Linux local extras (not required if CI green): `marqdo wasm build` smoke; document in notes that wasm is built from source via CLI. + +Local Windows fallback: `scripts/release-full.ps1 -Tag TAG -Upload` (see script header). + +## Phase 6 — Post-release + +1. `gh release view TAG` — confirm assets + notes. +2. `git status` clean; `main` synced. +3. Tell user: release URL `https://github.com/cflmy/marqdo/releases/tag/TAG`. +4. Optional: `./scripts/deploy-public.ps1` / pages workflow if user wants user-site refresh. +5. Open fresh `## Unreleased` already done in Phase 2. + +## Failure matrix (short) + +| Failure | Action | +|---------|--------| +| `gh` / git TLS or proxy `7890` refused | Unset bad proxy; use working `HTTP(S)_PROXY` or `required_permissions: ["all"]`; see reference | +| Tag exists | Stop; ask user to bump or delete tag (no force on shared tags without explicit order) | +| CI red | Fix on main, move tag only if user explicitly allows delete+re-push tag | +| VSIX missing | Fetch `vscode-extension`, build locally, `gh release upload TAG dist/*.vsix` | +| Partial assets | Re-run workflow or upload missing files only | + +## Do not + +- Ship without user-confirmed version. +- Hardcode release highlights only in Actions YAML and forget CHANGELOG. +- Commit `target/`, `dist/`, `*.wasm`, or `public/**/*.html` unless project policy changes. +- Merge extension tree into `main`. diff --git a/.cursor/skills/marqdo-release/reference.md b/.cursor/skills/marqdo-release/reference.md new file mode 100644 index 0000000..4e2257e --- /dev/null +++ b/.cursor/skills/marqdo-release/reference.md @@ -0,0 +1,305 @@ +# Marqdo release — reference + +Companion to [SKILL.md](SKILL.md). Use during a release; keep SKILL short. + +## Detect versions (commands) + +```bash +# From repo root +python3 .cursor/skills/marqdo-release/scripts/detect_version.py +# or manually: +git fetch --tags origin 2>/dev/null || true +echo "Cargo: $(sed -n 's/^version = \"\(.*\)\"/\1/p' Cargo.toml | head -1)" +echo "wasm: $(sed -n 's/^version = \"\(.*\)\"/\1/p' crates/marqdo-wasm/Cargo.toml | head -1)" +echo "tags: $(git tag -l 'v*' --sort=-v:refname | head -3 | tr '\n' ' ')" +gh release list --limit 3 2>/dev/null || true +``` + +**SemVer guidance for the ask (do not choose for the user):** + +| Kind | When | +|------|------| +| patch `x.y.(z+1)` | Fixes, docs, no public API / MQ surface break | +| minor `x.(y+1).0` | New features (WASM route C, new ext APIs) backward compatible | +| major `(x+1).0.0` | Breaking MQ / CLI / plugin ABI | + +## Asset matrix (CI tag `v*`) + +Produced by `.github/workflows/release.yml` on **windows-latest**: + +| Asset | Role | +|-------|------| +| `marqdo-VER-x86_64-pc-windows-msvc.exe` | CLI (stdlib embedded) | +| `marqdo-VER-x86_64-pc-windows-msvc.zip` | `marqdo.exe` + `lib/` | +| `marqdo-VER-stdlib.zip` | `lib/` only | +| `marqdo-VER-ext.zip` | Official `ext/` L1 | +| `marqdo-VER-source.zip` | `git archive` of tagged commit | +| `marqdo-VER.vsix` | VS Code / Cursor (from branch `vscode-extension`) | +| `marqdo-VER-public.zip` | Static user docs (`marqdo view output public`) | + +Not CI-uploaded (document in notes): Linux/macOS build from source; WASM via `marqdo wasm build` → `dist/wasm/`. + +## Doc sync checklist (Phase 2 detail) + +### CHANGELOG.md + +1. Ensure `## Unreleased` lists everything shipping. +2. Rename to `## vVER — YYYY-MM-DD` (use release day in Asia/Shanghai unless user says otherwise). +3. Add a short **Highlights** subsection (install snippet + 3–6 bullets). +4. Insert empty: + +```markdown +## Unreleased + +### Added + +### Fixed + +### Changed +``` + +### README.md + +Update every user-visible version pin, typically: + +- Section title `## 现状(vVER)` +- `### 如何使用最新 Marqdo(vVER)` +- `git checkout vVER` +- Release URL `…/releases/tag/vVER` + +Keep install / `ext add` / plugin build instructions accurate for this release. + +### `.cursor/skills/marqdo/SKILL.md` + +- Sync hard rules / feature bullets that this release changes (e.g. WASM, web). +- Do **not** dump full CHANGELOG into the skill. +- If release-only process changed, point to `.cursor/skills/marqdo-release/`. + +### `public/` (author Markdown sources) + +User tutorials under `public/` (not generated HTML). Update when: + +- New CLI (`marqdo wasm …`, `ext add`, `version`) +- New tutorials (browser hello, web client embed) +- Version badges / “requires vVER” lines + +Then regenerate HTML for zip/pages: + +```bash +./scripts/build-public.sh +# Windows: powershell -File ./scripts/build-public.ps1 +``` + +HTML under `public/**/*.html` is typically gitignored — zip still ships from CI `marqdo view output public`. + +### Workflow stub + +Edit `.github/workflows/release.yml` `body:` **Highlights** so the first auto body matches this tag (agent still replaces with full notes via `gh release edit`). + +### Roadmaps / ADRs + +If this release closes a wave: set status Completed in `doc/roadmap/*`; leave ADRs immutable (link from CHANGELOG). + +## Extension checklist (Phase 3 detail) + +Branch policy: `doc/design/vscode-extension-commit.md`. + +```bash +git fetch origin vscode-extension +git checkout vscode-extension +# edit vscode-extension/package.json version → VER +# npm ci && npm run compile +git add vscode-extension/ +git commit -m "$(cat <<'EOF' +vscode-extension: bump to VER for release + +EOF +)" +git push origin vscode-extension +git checkout main +``` + +Local VSIX only (fallback): + +```bash +git fetch origin vscode-extension +git checkout origin/vscode-extension -- vscode-extension +(cd vscode-extension && npm ci && npm run compile && npx @vscode/vsce package --no-dependencies -o "../dist/marqdo-VER.vsix") +# cleanup ignored tree if desired +gh release upload "vVER" "dist/marqdo-VER.vsix" --clobber +``` + +## Defaults (mirror of SKILL) + +| Setting | Default | +|---------|---------| +| Sync `vscode-extension` to `VER` | yes | +| Push main + annotated tag immediately | yes | +| Release notes | 中英双语 | +| Skip VSIX / docs-only / deploy pages | no | + +Phase 0 asks **only** for the next version unless the user wants overrides. + +## Notes template (中英双语 — default) + +Save as `/tmp/marqdo-vVER-notes.md` then: + +```bash +gh release edit "vVER" --notes-file /tmp/marqdo-vVER-notes.md +``` + +```markdown +## Marqdo vVER + +### 亮点 / Highlights + +- **中文** … / **EN** … +- … + +### 安装 / Install + +```bash +git clone https://github.com/cflmy/marqdo.git && cd marqdo +git checkout vVER +cargo build --release +./target/release/marqdo version + +cargo build --release -p marqdo_plugin_web -p marqdo_plugin_agent -p marqdo_plugin_quantum +marqdo ext add web && marqdo ext add agent && marqdo ext add quantum +# 中文 id:网页 / 智能体 / 量子 +``` + +**浏览器 WASM / Browser WASM** + +```bash +marqdo wasm build +# → dist/wasm/marqdo_wasm_bg.wasm + marqdo-bridge.js +# examples: examples/browser-hello/ +``` + +### 破坏性变更 / Breaking changes + +- 无 / None +- … + +### 下载 / Downloads + +| Asset | 内容 / Contents | +|-------|-----------------| +| `marqdo-*-windows-msvc.exe` | CLI(内置 stdlib) | +| `marqdo-*-windows-msvc.zip` | exe + `lib/` | +| `marqdo-*-stdlib.zip` | 仅 `lib/` | +| `marqdo-*-ext.zip` | 官方 `ext/` | +| `marqdo-*-source.zip` | 源码快照 | +| `marqdo-*.vsix` | VS Code / Cursor 扩展 | +| `marqdo-*-public.zip` | 用户文档站 | + +扩展源码分支 / Extension branch: **`vscode-extension`** ([policy](https://github.com/cflmy/marqdo/blob/main/doc/design/vscode-extension-commit.md)). + +### 链接 / Links + +- [CHANGELOG](https://github.com/cflmy/marqdo/blob/main/CHANGELOG.md) +- [README](https://github.com/cflmy/marqdo/blob/main/README.md) +``` + +## Proxy & auth (network recovery) + +Symptoms seen in this project: broken local proxy on `127.0.0.1:7890`, TLS failures, `gh` needing token, Cursor sandbox blocking git/gh. + +### Diagnose + +```bash +env | grep -iE 'proxy|PROXY' || true +curl -sI https://github.com | head -5 +gh auth status +``` + +### Fix order + +1. **Unset bad proxy** if connection refused: + +```bash +unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ALL_PROXY all_proxy +``` + +2. **Set a working proxy** only if the user provides one (or known working): + +```bash +export HTTPS_PROXY=http://HOST:PORT +export HTTP_PROXY=http://HOST:PORT +``` + +3. **Agent Shell**: retry `git push` / `gh` with `required_permissions: ["all"]` (and `full_network` if needed). + +4. **`gh` auth**: if `gh auth status` fails, ask user to `gh auth login` or set `GH_TOKEN` / `GITHUB_TOKEN` for the session — **never commit tokens**. + +5. **Git remote**: prefer `https://github.com/cflmy/marqdo.git`; SSH needs keys. + +6. **Partial upload**: + +```bash +gh release upload "vVER" dist/FILE --clobber +``` + +7. **Re-run CI** without retagging (if tag already correct): + +```bash +gh workflow run Release --ref "vVER" # only if workflow_dispatch exists; else fix + new patch tag +``` + +Current Release workflow is **tag-push only**. Red CI after tag → fix on `main`, then either new patch tag or **user-approved** delete+recreate tag (dangerous; prefer patch). + +## Local Windows fallback + +```powershell +powershell -File ./scripts/release-full.ps1 -Tag vVER -Upload +# -SkipVsix / -SkipPublic / -DeployPages as needed +``` + +Also: `scripts/release-windows.ps1`, `scripts/publish-release.py` if present. + +## Commit message style + +```text +release: vVER — + +``` + +Extension: + +```text +vscode-extension: bump to VER for release + +``` + +## Pre-tag test suggestions + +Minimum: + +```bash +cargo test --test gold structure_hello +./target/release/marqdo version # after cargo build --release +``` + +Stronger (time permitting): + +```bash +cargo test --test gold +cargo test -p marqdo-wasm -- --nocapture # if wasm tests exist +# optional Node: node tests/wasm/smoke.mjs after marqdo wasm build +``` + +## Ask-user prompt (copy) + +```text +版本探测结果: +- Cargo.toml: A.B.C +- crates/marqdo-wasm: … +- 最新 git tag: v… +- 最新 GitHub Release: v… +- CHANGELOG Unreleased: 有 / 无(摘要:…) + +请指定下一个版本号(例如 0.3.2)。 +默认(无需确认):同步 vscode-extension 同号、立刻 push tag 发版、发布说明中英双语。 +若要改默认请一并说明。 +``` diff --git a/.cursor/skills/marqdo-release/scripts/detect_version.py b/.cursor/skills/marqdo-release/scripts/detect_version.py new file mode 100755 index 0000000..32f609a --- /dev/null +++ b/.cursor/skills/marqdo-release/scripts/detect_version.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Detect Marqdo version sources for release Phase 0. Never invent next SemVer.""" +from __future__ import annotations + +import re +import subprocess +import sys +from pathlib import Path + +# …/marqdo/.cursor/skills/marqdo-release/scripts/this.py → parents[4] = repo root +ROOT = Path(__file__).resolve().parents[4] + + +def cargo_version(path: Path) -> str | None: + if not path.is_file(): + return None + m = re.search(r'^version\s*=\s*"([^"]+)"', path.read_text(encoding="utf-8"), re.M) + return m.group(1) if m else None + + +def run(cmd: list[str]) -> str: + try: + out = subprocess.check_output(cmd, cwd=ROOT, stderr=subprocess.DEVNULL, text=True) + return out.strip() + except (subprocess.CalledProcessError, FileNotFoundError): + return "" + + +def main() -> int: + cargo = cargo_version(ROOT / "Cargo.toml") + wasm = cargo_version(ROOT / "crates" / "marqdo-wasm" / "Cargo.toml") + tags = run(["git", "tag", "-l", "v*", "--sort=-v:refname"]) + latest_tag = tags.splitlines()[0] if tags else "(none)" + gh_list = run(["gh", "release", "list", "--limit", "3"]) + latest_gh = "(gh unavailable)" + if gh_list: + # first column is tag name for `gh release list` + latest_gh = gh_list.splitlines()[0].split("\t")[0].strip() + + changelog = ROOT / "CHANGELOG.md" + unreleased = False + unreleased_preview = "" + if changelog.is_file(): + text = changelog.read_text(encoding="utf-8") + m = re.search(r"^## Unreleased\s*\n(.*?)(?=^## |\Z)", text, re.M | re.S) + if m: + body = m.group(1).strip() + # nonempty if any bullet or non-heading content beyond empty section headers + content_lines = [ + ln + for ln in body.splitlines() + if ln.strip() and not re.match(r"^###\s+", ln.strip()) + ] + unreleased = bool(content_lines) + unreleased_preview = " | ".join(content_lines[:3])[:200] + + print("=== Marqdo version detect (do NOT invent next; ask the user) ===") + print(f"repo: {ROOT}") + print(f"Cargo.toml: {cargo or '(missing)'}") + print(f"marqdo-wasm: {wasm or '(missing)'}") + print(f"latest git tag: {latest_tag}") + print(f"latest gh release: {latest_gh}") + print(f"Unreleased notes: {'YES' if unreleased else 'NO/empty'}") + if unreleased_preview: + print(f"Unreleased peek: {unreleased_preview}") + if cargo and latest_tag.lstrip("v") != cargo: + print("WARN: Cargo version != latest tag (expected during pre-bump or lag)") + if cargo and wasm and cargo != wasm: + print("WARN: root Cargo.toml and marqdo-wasm versions differ — sync before release") + print() + print("ASK USER: next SemVer X.Y.Z (tag will be vX.Y.Z)") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.cursor/skills/marqdo/SKILL.md b/.cursor/skills/marqdo/SKILL.md index bcf95bc..d96d4c0 100644 --- a/.cursor/skills/marqdo/SKILL.md +++ b/.cursor/skills/marqdo/SKILL.md @@ -16,6 +16,8 @@ Marqdo = **Markdown markers as syntax**. A `.mq.md` file is both documentation a Canonical design (repo): `doc/design/markdown-mapping.md`, `doc/design/keywords.md`. Deeper tables: [reference.md](reference.md). Copy-paste patterns: [examples.md](examples.md). +**Product release** (tag, CHANGELOG, README, public docs, VSIX, GitHub assets): use [marqdo-release](../marqdo-release/SKILL.md) — detect latest version, **ask the user for the next SemVer**, then follow that playbook. Do not invent a version number. + ## Hard rules (do not violate) 1. **File suffix** must be `.mq.md` (never plain `.md` for executable sources). diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd6a998..3922bd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,10 +92,10 @@ jobs: body: | ## Marqdo ${{ github.ref_name }} - ### Highlights — v0.3.1 - - **W8**: favicon / head assets / image assembly (`app.icons`, `page.head`, `make_images`) - - Fix: absolute `entry_dir` for relative entry scripts (no nested `tests/ext/tests/ext`) - - **`ext/web`**: W0–W7 + P3 + W8; **`ext/quantum`** Q7/Q8; **`ext/agent`** A1–A4 + ### 亮点 / Highlights — v0.3.2 + - **浏览器 Marqdo(路线 C)**:`marqdo wasm build`、官方 bridge、会话 ABI、`fetch`/`after` 效应;示例 `examples/browser-hello/` + - **Browser Marqdo (route C)**: WASM build, official bridge, session ABI, async effects; see CHANGELOG + - Fix: Admin 长内容布局 · `ext add` 原生插件预检 · `@keyframes` / 样式表比率引号约定 - Install: `marqdo ext list` / `marqdo ext add llm|agent|web|quantum` - Native plugins: `cargo build --release -p marqdo_plugin_*` then `ext add` - Details: [CHANGELOG](https://github.com/cflmy/marqdo/blob/main/CHANGELOG.md) · [README](https://github.com/cflmy/marqdo/blob/main/README.md) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35b2bc3..34a4f60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ ## Unreleased +### Added + +### Fixed + +### Changed + +## v0.3.2 — 2026-09-01 + +### Highlights + +**浏览器 Marqdo(路线 C)首版完备**:`wasm-core`、`marqdo wasm build`、会话 ABI、DOM/`fetch`/`after` 效应、官方 bridge、体积与冒烟;并修 Admin 长内容布局、`ext add` 原生插件预检、`@keyframes` 与样式表 `/` 比率约定。 + +```bash +git checkout v0.3.2 +cargo build --release +marqdo wasm build +marqdo ext add web # 改插件后请重新 add +``` + ### Added - **浏览器 Marqdo(路线 C)**: [ADR 0002](doc/adr/0002-browser-marqdo-wasm.md) · [design](doc/design/browser-marqdo-wasm.md) · [roadmap C0–C5](doc/roadmap/browser-wasm.md)。 - **C0/C1**:`wasm-core` feature 门控;`run_source`;crate `crates/marqdo-wasm`(`mq_run` ABI);示例 [examples/browser-hello](examples/browser-hello/)。 @@ -9,6 +28,7 @@ - **C4**:[ADR 0003](doc/adr/0003-browser-async-effects.md) 效应表(`fetch` / `after`)+ bridge 续体;[fetch.html](examples/browser-hello/fetch.html)。 - **C5**:`release-wasm` 体积配置;`marqdo wasm build` 报告 KiB 并可选 `wasm-opt`;`run_source` bytecode 单测;会话仍为 tree。 - **WASM 收口**:规范 `crates/marqdo-wasm/js/marqdo-bridge.js`;`wasm build` 同时拷贝 bridge;Node 冒烟 `tests/wasm`;`web.client_embed` / `网页.客户端挂载`;路线图标 Completed。 +- **发版 Skill**:`.cursor/skills/marqdo-release/`(探测版本 → 用户确认 → 文档/资产/扩展/Release 说明)。 ### Fixed - **Admin UI**:主区取消 `max-width:56rem` 限制,表格外包可横向滚动的 `.table-wrap`,单元格完整展示并自动换行;表单加宽且 textarea 可随内容增高。 diff --git a/Cargo.toml b/Cargo.toml index 297aaad..11dcbf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo" -version = "0.3.1" +version = "0.3.2" edition = "2021" license = "Apache-2.0" description = "Marqdo — Markdown markers as an interpreted programming language" diff --git a/README.md b/README.md index c708846..a862ef4 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ marqdo catalog public -o .marqdo --- -## 现状(v0.3.1) +## 现状(v0.3.2) - 映射与解释器:Phase I 树遍历 + 字节码后端可用;金样例在 `tests/` - **对象**:`#` = 类型/构造,`##`+ = 函数/方法;见 [objects.md](doc/design/objects.md) @@ -117,14 +117,15 @@ marqdo catalog public -o .marqdo - **原生插件 ABI**:[`include/marqdo_abi.h`](include/marqdo_abi.h) · [ext-abi.md](doc/design/ext-abi.md);`plugins/{demo,agent,web,quantum}` - **用户静态站**:`public/` → `view output` → CI 发布 [gh-pages](https://cflmy.github.io/marqdo/) - **VS Code 扩展**:分支 **`vscode-extension`**(`main` 不跟踪源码;见 [vscode-extension-commit.md](doc/design/vscode-extension-commit.md));Release 附带 `.vsix` +- **浏览器 Marqdo(WASM)**:`marqdo wasm build` + 官方 bridge;示例 [browser-hello](examples/browser-hello/);站点挂载 `web.client_embed` / `网页.客户端挂载`([ADR 0002](doc/adr/0002-browser-marqdo-wasm.md) · [ADR 0003](doc/adr/0003-browser-async-effects.md)) - 选型:[ADR 0001 — Rust](doc/adr/0001-implementation-language.md) · [ADR 0002 — 浏览器 WASM](doc/adr/0002-browser-marqdo-wasm.md)(C0–C5 完结,见 [roadmap/browser-wasm.md](doc/roadmap/browser-wasm.md))· [ADR 0003 — 异步效应](doc/adr/0003-browser-async-effects.md) -### 如何使用最新 Marqdo(v0.3.1) +### 如何使用最新 Marqdo(v0.3.2) ```bash # 1) 源码安装(跟 tag 或 main) git clone https://github.com/cflmy/marqdo.git && cd marqdo -git checkout v0.3.1 # 或留在 main +git checkout v0.3.2 # 或留在 main cargo build --release export PATH="$PWD/target/release:$PATH" marqdo version @@ -148,8 +149,12 @@ marqdo ext add llm # 或:大模型 marqdo run examples/marqdo-blog/index.mq.md # 浏览器打开终端打印的 listen 地址;/favicon.ico 与 logo 装配见 W8 -# 5) Windows:也可从 GitHub Releases 下载 exe / zip / vsix -# https://github.com/cflmy/marqdo/releases/tag/v0.3.1 +# 5) 浏览器 WASM(可选) +marqdo wasm build +# → dist/wasm/ … 见 examples/browser-hello/ + +# 6) Windows:也可从 GitHub Releases 下载 exe / zip / vsix +# https://github.com/cflmy/marqdo/releases/tag/v0.3.2 ``` 开发期也可用 `cargo run -- …` 代替已安装的 `marqdo`: diff --git a/crates/marqdo-wasm/Cargo.toml b/crates/marqdo-wasm/Cargo.toml index 97e9797..a655900 100644 --- a/crates/marqdo-wasm/Cargo.toml +++ b/crates/marqdo-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo-wasm" -version = "0.3.1" +version = "0.3.2" edition = "2021" license = "Apache-2.0" description = "Marqdo interpreter as WebAssembly (browser host bridge)" diff --git a/public/features/05-extensions.mq.md b/public/features/05-extensions.mq.md index dcce442..d1aa560 100644 --- a/public/features/05-extensions.mq.md +++ b/public/features/05-extensions.mq.md @@ -34,7 +34,7 @@ ext/llm — OpenAI-compatible chat. Design: doc/design/ext-llm.md ext/agent — agent framework + native plugin. Design: doc/design/ext-agent.md -ext/web — HTTP / SQLite·Postgres site helpers + native plugin. **W0–W7 + P3 complete** (middleware, CRUD+FTS, security, SEO/RSS, upload/gallery, RBAC, sitemap). Design: doc/design/ext-web.md · capabilities: doc/design/web-net-capabilities.md · example: examples/marqdo-blog/ +ext/web — HTTP / SQLite·Postgres site helpers + native plugin. **W0–W7 + P3 + W8** (middleware, CRUD+FTS, security, SEO/RSS, upload/gallery, RBAC, sitemap, favicon/head/images). **Browser embed (v0.3.2+)**: `web.client_embed` mounts WASM client scripts — build with `marqdo wasm build`; examples: examples/browser-hello/. Design: doc/design/ext-web.md · capabilities: doc/design/web-net-capabilities.md · WASM: doc/adr/0002-browser-marqdo-wasm.md · example: examples/marqdo-blog/ ext/quantum — circuits, draw, noise, formula matrix custom gates, Q7 density/viz, Q8 themed SVG (`theme=dark|light|bw`). Design: doc/design/ext-quantum.md · doc/design/ext-quantum-viz-style.md diff --git a/public/features/05-扩展.mq.md b/public/features/05-扩展.mq.md index 48a1398..643ec3c 100644 --- a/public/features/05-扩展.mq.md +++ b/public/features/05-扩展.mq.md @@ -34,7 +34,7 @@ ext/llm(大模型)— OpenAI 兼容聊天。设计:doc/design/ext-llm.md ext/agent(智能体)— 智能体框架 + 原生插件。设计:doc/design/ext-agent.md -ext/web(网页)— HTTP / SQLite 站点助手 + 原生插件。设计:doc/design/ext-web.md +ext/web(网页)— HTTP / SQLite 站点助手 + 原生插件。**W0–W7 + P3 + W8**。**浏览器挂载(v0.3.2+)**:`网页.客户端挂载` / `web.client_embed`;先 `marqdo wasm build`;示例 examples/browser-hello/。设计:doc/design/ext-web.md · WASM:doc/adr/0002-browser-marqdo-wasm.md ext/quantum(量子)— 电路、绘图、噪声、公式矩阵自定义门、Q7 密度/高级图、Q8 主题 SVG(`主题=dark|light|bw`)。设计:doc/design/ext-quantum.md · doc/design/ext-quantum-viz-style.md diff --git a/skills/marqdo/SKILL.md b/skills/marqdo/SKILL.md index 6f03858..639eb98 100644 --- a/skills/marqdo/SKILL.md +++ b/skills/marqdo/SKILL.md @@ -16,6 +16,8 @@ Marqdo = **Markdown markers as syntax**. A `.mq.md` file is both documentation a Canonical design (repo): `doc/design/markdown-mapping.md`, `doc/design/keywords.md`. Deeper tables: [reference.md](reference.md). Copy-paste patterns: [examples.md](examples.md). +**Product release** (tag, CHANGELOG, README, public docs, VSIX, GitHub assets): use [`.cursor/skills/marqdo-release/SKILL.md`](../../.cursor/skills/marqdo-release/SKILL.md) — detect latest version, **ask the user for the next SemVer**, then follow that playbook. Do not invent a version number. + ## Hard rules (do not violate) 1. **File suffix** must be `.mq.md` (never plain `.md` for executable sources).