Add README, plugin citations, and multi-platform release CI.

Ship screenshots and third-party notices for the desktop shell, and
package Windows, macOS, deb, rpm, and Flatpak from GitHub Releases.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Tommy
2026-08-15 22:02:13 +08:00
commit f8a3c2dc6f
72 changed files with 10372 additions and 0 deletions

29
scripts/capture-screenshots.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
OUT="$ROOT/docs/screenshots"
SRC="$OUT/src"
CHROME="${CHROME:-google-chrome}"
capture() {
local name="$1"
local html="$2"
"$CHROME" \
--headless=new \
--disable-gpu \
--no-sandbox \
--hide-scrollbars \
--force-device-scale-factor=2 \
--window-size=1280,800 \
--default-background-color=00000000 \
--screenshot="$OUT/$name.png" \
"file://$html"
echo "wrote $OUT/$name.png"
}
mkdir -p "$OUT"
capture splash "$SRC/splash.html"
capture session "$SRC/session.html"
capture vision "$SRC/vision.html"
capture menu "$SRC/menu.html"
cp -f "$ROOT/ui/icon.png" "$OUT/icon.png"

58
scripts/localize_preset.py Executable file
View File

@@ -0,0 +1,58 @@
#!/usr/bin/env python3
"""Localize vendored anchored-standard preset.yml files (used by make vendor)."""
from __future__ import annotations
import json
import re
import sys
from pathlib import Path
PRESET_NAME_ZH = "锚定式标准(实验)"
PRESET_DESCRIPTION_ZH = (
"首轮使用 Minimal 的真实工具对(持久 bash + str_replace_editor"
"不自动注入工作区或技能上下文;首次工具调用或回复后开放完整 Standard 工具。"
)
ZERO_PRESET_NAME_ZH = "零工具锚定式标准(实验)"
ZERO_PRESET_DESCRIPTION_ZH = (
"先插入一轮无工具的锚定对话(固定提示),从下一轮起开放完整 Standard 工具。"
)
def localize_preset_yml(text: str, name: str, description: str) -> str:
body = text.replace("\r\n", "\n")
if not body.endswith("\n"):
body += "\n"
name_line = f"name: {json.dumps(name, ensure_ascii=False)}\n"
desc_line = f"description: {json.dumps(description, ensure_ascii=False)}\n"
name_match = re.search(r"(?m)^name:.*\n", body)
if name_match:
body = body[: name_match.start()] + name_line + body[name_match.end() :]
else:
body = name_line + body
desc_match = re.search(r"(?m)^description:(?:[ \t].*)?\n(?:[ \t].+\n)*", body)
if desc_match:
return body[: desc_match.start()] + desc_line + body[desc_match.end() :]
name_written = re.search(r"(?m)^name:.*\n", body)
if name_written:
return body[: name_written.end()] + desc_line + body[name_written.end() :]
return desc_line + body
def main(argv: list[str]) -> int:
if len(argv) < 2:
print("usage: localize_preset.py <preset.yml> [zero]", file=sys.stderr)
return 2
path = Path(argv[1])
zero = len(argv) > 2 and argv[2] == "zero"
name = ZERO_PRESET_NAME_ZH if zero else PRESET_NAME_ZH
description = ZERO_PRESET_DESCRIPTION_ZH if zero else PRESET_DESCRIPTION_ZH
path.write_text(
localize_preset_yml(path.read_text(encoding="utf-8"), name, description),
encoding="utf-8",
)
return 0
if __name__ == "__main__":
raise SystemExit(main(sys.argv))

48
scripts/vendor-native.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Fetch ModLens + Anchored Standard into vendor/ for Tauri resource bundling.
# Does not vendor @deepseek-ai/dsh (that is Flatpak-only; see `make vendor`).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
MODLENS_VERSION="${MODLENS_VERSION:-3.16.6}"
ANCHORED_COMMIT="${ANCHORED_COMMIT:-ffb845c5480adc953392a6db6f8a98ede621174b}"
ANCHORED_REPO="${ANCHORED_REPO:-https://github.com/xiaobright/dsh-anchored-standard.git}"
if [ -z "${PYTHON:-}" ]; then
if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
else
PYTHON=python
fi
fi
ANCHORED_DIR="vendor/anchored-standard"
ZERO_DIR="vendor/zero-anchored-standard"
MODLENS_DIR="vendor/modlens"
rm -rf vendor/.anchored-src "$ANCHORED_DIR" "$ZERO_DIR"
mkdir -p vendor/.anchored-src
git -C vendor/.anchored-src init --initial-branch=main
git -C vendor/.anchored-src remote add origin "$ANCHORED_REPO"
git -C vendor/.anchored-src fetch --depth 1 origin "$ANCHORED_COMMIT"
git -C vendor/.anchored-src checkout --detach FETCH_HEAD
mkdir -p "$ANCHORED_DIR" "$ZERO_DIR"
cp -R vendor/.anchored-src/preset/. "$ANCHORED_DIR/"
cp -R vendor/.anchored-src/zero-anchored-standard/. "$ZERO_DIR/"
cp vendor/.anchored-src/LICENSE vendor/.anchored-src/NOTICE "$ANCHORED_DIR/"
cp vendor/.anchored-src/LICENSE vendor/.anchored-src/NOTICE "$ZERO_DIR/"
printf '%s\n' "$ANCHORED_COMMIT" > "$ANCHORED_DIR/.dsh-desktop-source"
printf '%s\n' "$ANCHORED_COMMIT" > "$ZERO_DIR/.dsh-desktop-source"
"$PYTHON" scripts/localize_preset.py "$ANCHORED_DIR/preset.yml"
"$PYTHON" scripts/localize_preset.py "$ZERO_DIR/preset.yml" zero
rm -rf vendor/.anchored-src
rm -rf "$MODLENS_DIR"
mkdir -p "$MODLENS_DIR"
npm install --prefix "$MODLENS_DIR" --prefer-offline --no-audit --no-fund "@liustack/modlens@${MODLENS_VERSION}"
test -f "$ANCHORED_DIR/preset.yml"
test -f "$ZERO_DIR/preset.yml"
test -d "$MODLENS_DIR/node_modules/@liustack/modlens"
echo "vendored ModLens ${MODLENS_VERSION} and Anchored Standard ${ANCHORED_COMMIT}"