[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77485":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":24,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":29,"discoverSource":30},77485,"windsurf-assistant","zhouyoukang1234-spec\u002Fwindsurf-assistant","zhouyoukang1234-spec","A fully decentralized Windsurf assistant &mdash; **一气化三清 · 道并行而不悖** · 印 65 三清立 · 印 101 大道至简 · **印 ∞ 道法自然推进到底·★ 对照 tab 默见·左 A\u002FB 双路·中 WAM 无感** · 反者道之动 · 为道日损.",null,"JavaScript",226,44,21,2,0,4,37,203,27,81.46,"MIT License",false,"main",true,[],"2026-06-12 04:01:21","# Windsurf Assistant\n\n> 道生一 · 一生二 · 二生三 · 三生万物\n> 反者道之动 · 弱者道之用 · 天下之物生于有 · 有生于无\n\nA fully decentralized Windsurf assistant &mdash; **一气化三清 · 道并行而不悖** · 印 65 三清立 · 印 101 大道至简 · **印 ∞ 道法自然推进到底·★ 对照 tab 默见·左 A\u002FB 双路·中 WAM 无感** · 反者道之动 · 为道日损.\n\n历之详 (印 88 → 印 101 之阶) 入 [`_archive\u002Fseal-history.md`](_archive\u002Fseal-history.md). 当前道只示三清 + 一装三步 + 道义守.\n\n[![Cloud Daemon](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Fdao-fleet-cloud.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Fdao-fleet-cloud.yml)\n[![Keepalive](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Fdao-fleet-keepalive.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Fdao-fleet-keepalive.yml)\n[![Test core](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Ftest-core.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant\u002Factions\u002Fworkflows\u002Ftest-core.yml)\n[![Code of Conduct](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FContributor%20Covenant-2.1-4baaaa.svg)](.\u002FCODE_OF_CONDUCT.md)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](.\u002FLICENSE)\n\n> **Compliance & remediation note** &mdash; This repository underwent a\n> self-audit in May 2026 to address a false-positive anti-abuse flag.\n> All high-frequency cron schedules have been disabled, README phrasing\n> softened, and OSS compliance documents added. The full transparent\n> remediation log is at [`ABUSE_REMEDIATION.md`](.\u002FABUSE_REMEDIATION.md)\n> and the public tracking issue is [#20](..\u002F..\u002Fissues\u002F20).\n>\n> Project policies: [SECURITY](.\u002FSECURITY.md) &middot;\n> [CODE_OF_CONDUCT](.\u002FCODE_OF_CONDUCT.md) &middot;\n> [CONTRIBUTING](.\u002FCONTRIBUTING.md) &middot;\n> [LICENSE (MIT)](.\u002FLICENSE)\n\n---\n\n## 一气化三清 · Three Pure\n\n| 清 | What it is | Where it lives | Who it serves |\n|---|---|---|---|\n| **反代 API** &middot; [`packages\u002Fdao-core\u002F`](packages\u002Fdao-core\u002F) | Cloud reverse-proxy &middot; OpenAI-compatible `\u002Fv1` &middot; SSE streaming &middot; 0 npm deps | Your own VM (Devin Cloud \u002F VPS \u002F RPi \u002F anywhere) | **Any OpenAI client** (LobeChat, OpenWebUI, NextChat, Cherry Studio, Continue.dev, Aider, `openai` SDK, Cursor \"OpenAI override\", …) |\n| **切号 WAM** &middot; [`packages\u002Fwam\u002F`](packages\u002Fwam\u002F) | Account-rotation Windsurf extension &middot; 60s strong-lock &middot; quota-aware switch | Inside your Windsurf IDE | **Windsurf IDE users with multiple accounts** &mdash; auto-rotate when one runs out |\n| **提示词反代 dao-proxy-min** &middot; [`packages\u002Fdao-proxy-min\u002F`](packages\u002Fdao-proxy-min\u002F) | Cascade Connect-RPC reverse-proxy &middot; injects 《老子》(Mawangdui silk text) as system prompt &middot; tool-root preserved (`\u003Cadditional_metadata>` kept) | Inside your Windsurf IDE Cascade panel | **Windsurf IDE users who want a custom system prompt** without losing the @-tool ecosystem |\n\nThe three are **orthogonal** &mdash; any subset can run alone, all three can run together with zero conflict. Pick by scenario:\n\n| Scenario | Stack |\n|---|---|\n| Use Windsurf models in *any other client* (web, terminal, your own app) | **反代 API** alone |\n| Use Windsurf IDE *daily* and run out of quota on one account | **切号 WAM** alone |\n| Use Windsurf IDE and want *Cascade with a custom system prompt* | **提示词反代** alone |\n| Power-user &mdash; all three IDE-side + cloud-side workflows | **All three** together |\n\n```text\n                       一气化三清 · 道并行而不悖\n                                 │\n        ┌────────────────────────┼────────────────────────┐\n        ▼                        ▼                        ▼\n   反代 API                 切号 WAM             提示词反代 dao-proxy-min\n   (dao-core)               (wam)                 (dao-proxy-min)\n        │                        │                        │\n   user's VM                user's IDE               user's IDE\n   (Devin Cloud)            (Windsurf)               (Windsurf Cascade)\n        │                        │                        │\n        ▼                        ▼                        ▼\n   OpenAI \u002Fv1            account rotation         帛书 SP injection\n   any client          (60s lock · quota-aware)   (tool-root preserved)\n        │                        │                        │\n        └────────────────────────┴────────────────────────┘\n                                 ▼\n                        Windsurf Cloud\n                    inference.codeium.com\n```\n\n---\n\n## Public entry · 公网入口\n\n**Self-host on your own GitHub account.** Each user installs a private\ncopy: visit the entry page, sign in with a GitHub fine-grained personal\naccess token (used only in your browser, locally), and the page guides\nyou through setting up your own fork. Every byte (VM URL, accounts, SP\npresets, chat history) lives entirely on *your* GitHub &mdash; never on\nany shared server.\n\n```text\n   https:\u002F\u002Fzhouyoukang.github.io\u002Fwindsurf-assistant\u002F    (公网入口 · gate)\n              │  ① paste PAT (一次\"为\")\n              ▼\n   Your GitHub · personal fork + Pages + private config + daemon ready\n              │  ② redirect (≤ 4 min)\n              ▼\n   https:\u002F\u002F\u003Cyou>.github.io\u002Fwindsurf-assistant\u002F         (专属页 · mine)\n              │  ③ 即用即活 · chat \u002F iframe \u002F batch + 抽屉「管」\n              ▼\n   Your daemon (any Node.js >= 18 environment of your choice)\n              │\n              ▼\n   Windsurf Cloud · inference.codeium.com\n```\n\nThe Web UI is composed of a top-bar (status + utility), a main \"use\"\npanel (chat, iframe, batch run), and a collapsible \"manage\" drawer\n(accounts, SP, endpoints, smoke tests). Add `?v=100` for the legacy\nthree-column layout.\n\n### Privacy · Trust model\n\n| Bytes | Where they live | Who can see them |\n|---|---|---|\n| GitHub PAT | Your browser `localStorage` | You (logout button = wipe) |\n| `dao.json` (VM URL · accounts · SP · chat) | Your private GitHub Gist | You + holders of your PAT |\n| Windsurf API key | Your browser + your daemon | You |\n| Public Pages site | Your GitHub Pages | Public (static code only · no data) |\n\nThe upstream `zhouyoukang\u002Fwindsurf-assistant` only sees the one-time\nGitHub `POST \u002Fforks` (which is a GitHub-server action, not your browser).\nAfter that your browser **never connects upstream again** &mdash; everything\nflows directly to your GitHub and your daemon. *原汤化原食*.\n\n---\n\n## I &middot; 反代 API (`packages\u002Fdao-core\u002F`)\n\n**One GitHub fork. One web page. One daemon per account. Zero npm dependencies.**\n\nBrowsers talk directly to your daemon &mdash; no relay, no middleman.\n\n### Three steps to self-host\n\n**1. Fork & enable Pages.** Fork this repo, then **Settings → Pages → Source: GitHub Actions**. The included `deploy-pages.yml` auto-deploys on every push to `web\u002F`.\n\n**2. Provision a daemon.** On any machine with `curl` + `node >= 18`:\n\n```bash\n# single-account \u002F single-VM\ncurl -sL https:\u002F\u002Fraw.githubusercontent.com\u002F\u003Cyour-user>\u002Fwindsurf-assistant\u002Fmain\u002Fscripts\u002Fdevin-bootstrap.sh | \\\n  DAO_API_KEY=\"sk-ws-01-YOUR_WINDSURF_KEY\" \\\n  DAO_AUTH_KEY=\"sk-ws-proxy-RANDOM_LONG_SECRET\" \\\n  DAO_TUNNEL=yes \\\n  bash\n```\n\nFor users with multiple accounts the repo also ships [`scripts\u002Fdevin-bootstrap-fleet.sh`](scripts\u002Fdevin-bootstrap-fleet.sh) &mdash; *multi-account \u002F single-VM* (one VM runs N `fleet_vm_unit.js` instances on N ports behind one `cloudflared` tunnel; coordinated by `fleet_controller.js`). Use this when one VM has spare capacity and you want to *取之尽锱铢* (squeeze every cycle) without paying for N VMs.\n\nOr use the GitHub Actions workflow `dao-fleet-cloud.yml` (manual `workflow_dispatch` &middot; daemon URL is written back to your data Gist).\n\n**3. Plug into anything OpenAI-compatible.** Open the API panel of your hosted page; copy `Base URL` + `API Key` into LobeChat \u002F OpenWebUI \u002F NextChat \u002F Cherry Studio \u002F `openai` SDK \u002F Continue.dev \u002F Aider \u002F Cursor.\n\n### One-click API key from email + password\n\nThe Setup tab can walk the four-step Windsurf auth chain (`login → postauth → register → status`) on your behalf. Requires the daemon started with `--allow-auth` (off by default for safety).\n\n---\n\n## II &middot; 切号 WAM (`packages\u002Fwam\u002F`)\n\n> *天下莫柔弱于水 · 而攻坚强者莫之能胜也.* &mdash; 帛书《老子》七十八\n\n**Windsurf IDE extension for account rotation.** Multiple accounts &mdash; auto-switches when one runs out of quota. 60-second strong-lock prevents thrashing; quota-aware picks the freshest account.\n\n```powershell\ngit clone https:\u002F\u002Fgithub.com\u002Fzhouyoukang\u002Fwindsurf-assistant.git\ncd windsurf-assistant\u002Fpackages\u002Fwam\n\ncp _dao_env.local.psd1.example _dao_env.local.psd1   # fill in your targets\ncp 账号库.example.md 账号库最新.md                   # fill in your real accounts (.gitignore guards)\n\n.\\_dao_deploy.ps1                                     # source-direct deploy\n# Ctrl+Shift+P → Developer: Reload Window\n```\n\nA pre-built deployment bundle also lives at [`wam-bundle\u002F`](wam-bundle\u002F) for users who only need the marketplace-shaped install. Full docs: [`packages\u002Fwam\u002FREADME.md`](packages\u002Fwam\u002FREADME.md).\n\nWAM is a pure VS Code extension &mdash; it does **not** need the daemon, the web UI, or any of dao-core.\n\n---\n\n## III &middot; 提示词反代 dao-proxy-min (`packages\u002Fdao-proxy-min\u002F`)\n\n> *昔之得一者: 天得一以清 · 地得一以宁 · 侯王得一以为天下正.* &mdash; 帛书《老子》三十九\n\n**Cascade Connect-RPC reverse-proxy as a Windsurf extension.** Injects the Mawangdui silk-text 《老子》 as the system prompt while preserving the entire `@`-tool ecosystem (`\u003Cadditional_metadata>` kept intact so `trajectory_search`, `read_file`, `view_content_chunk` etc. all keep working).\n\n```powershell\ncd packages\u002Fdao-proxy-min\n.\\_build_vsix.ps1            # produces  dao-proxy-min-9.8.0.vsix\nwindsurf --install-extension dao-proxy-min-9.8.0.vsix\n```\n\nFull docs: [`packages\u002Fdao-proxy-min\u002FREADME.md`](packages\u002Fdao-proxy-min\u002FREADME.md).\n\ndao-proxy-min is a pure VS Code extension &mdash; coexists with WAM in the same IDE without conflict (different concerns: WAM rotates accounts, dao-proxy-min rewrites prompts).\n\n---\n\n## Repository layout\n\n| Path | Purpose |\n|------|---------|\n| [`web\u002F`](web\u002F) | Single-page UI (`index.html` + `dao_app.js` + `dao_bootstrap.js` + `dao_github_sync.js`). No build, no npm, no CDN. |\n| [`packages\u002Fdao-core\u002F`](packages\u002Fdao-core\u002F) | The cloud reverse-proxy &mdash; Node.js builtins only, no `package-lock.json`. |\n| [`packages\u002Fwam\u002F`](packages\u002Fwam\u002F) | The account-rotation IDE extension. |\n| [`packages\u002Fdao-proxy-min\u002F`](packages\u002Fdao-proxy-min\u002F) | The Cascade RPC reverse-proxy IDE extension. |\n| [`packages\u002Fdao-pool\u002F`](packages\u002Fdao-pool\u002F) | Gist-backed token pool + bootstrap CLI. |\n| [`packages\u002Fdao-vm\u002F`](packages\u002Fdao-vm\u002F) | Optional `vm_up.js` to provision a 24h Devin VM with a single ACU. |\n| [`packages\u002Fdao-injector\u002F`](packages\u002Fdao-injector\u002F) | Optional browser-side WebSocket hook for `app.devin.ai` (MV3 + Tampermonkey). |\n| [`scripts\u002Fdevin-bootstrap.sh`](scripts\u002Fdevin-bootstrap.sh) | One-line daemon bootstrap. |\n| [`tests\u002F`](tests\u002F) | Self-contained Node test suite. |\n| [`.github\u002Fworkflows\u002F`](.github\u002Fworkflows\u002F) | CI + Pages + cloud daemon + keepalive. |\n| [`_archive\u002Fseal-history.md`](_archive\u002Fseal-history.md) | History of releases 印 88 → 印 101. |\n| [`INDEX_GUIZONG.md`](INDEX_GUIZONG.md) | 一文锚三身 · entry index. |\n\n---\n\n## API endpoints (`fleet_vm_unit.js`)\n\n| Method | Path | Auth | Purpose |\n|---|---|---|---|\n| `POST` | `\u002Fv1\u002Fchat\u002Fcompletions` | gated | OpenAI-compatible chat &middot; SSE with 15s heartbeat |\n| `GET`  | `\u002Fv1\u002Fmodels`           | gated | Model list (54+ models) |\n| `POST` | `\u002Fdc\u002Fv1\u002Fchat\u002Fcompletions` | gated | Devin-Cloud path (B route via `app.devin.ai` ACP) |\n| `GET`  | `\u002Fquota`               | gated | Real-time daily\u002Fweekly quota |\n| `GET`  | `\u002Fstats`               | gated | Latency p50\u002Fp95\u002Fp99 over 1m\u002F10m\u002F1h windows |\n| `GET`  | `\u002Fhealth`              | public | Health, uptime, `authRequired`, `authAllowed`, `sseActive`, `draining`, `dualPath` |\n| `GET`  | `\u002Ffleet\u002Finfo`          | public | Unit metadata for fleet discovery |\n| `POST` | `\u002Fsp\u002F{mode,custom,opts,silk,observe,state}` | gated | System-prompt control (passthrough · dao · custom) |\n| `POST` | `\u002Fauth\u002F{login,postauth,register,status,auto}` | gated + `--allow-auth` | Windsurf 4-step auth chain |\n\n**Auth.** When `--auth-key` (or `DAO_AUTH_KEY`) is set, gated endpoints require `Authorization: Bearer \u003Ckey>`. Multiple keys can be passed comma-separated. `\u002Fhealth` and `\u002Ffleet\u002Finfo` always stay public so probes \u002F load-balancers can monitor without secrets. Three header forms are accepted: `Authorization: Bearer …`, `X-Api-Key: …`, `?api_key=…`.\n\n---\n\n## Zero dependencies\n\n* **`packages\u002Fdao-core\u002F`**: no `dependencies` in `package.json`, no `node_modules`, no `package-lock.json`. Only Node.js builtins (`http`, `https`, `crypto`, `fs`, `path`, `os`, `dns`, `child_process`, `ws` is **not** used &mdash; we hand-roll the wss frame). CI enforces this on every push.\n* **`web\u002F`**: no `\u003Cscript src=\"…\">`, no `\u003Clink href=\"…stylesheet\">`, no `@import`, no Google Fonts, no jsdelivr\u002Funpkg\u002Fcdnjs. Static-audit test verifies this.\n* **`scripts\u002Fdevin-bootstrap.sh`**: pure bash + curl.\n* **`tunnel`**: `cloudflared` is one optional binary. Free Tier, no signup.\n\n---\n\n## Testing\n\n```bash\nnode tests\u002Frun_all.cjs\n```\n\nRuns the full suite in fresh sub-processes &mdash; static audit, syntax check, three-pure smoke, public-entry smoke, auth smoke, and the `_seal*_smoke` series for each release. CI runs the full suite on every PR against `packages\u002F`, `web\u002F`, `tests\u002F`, or `scripts\u002F`.\n\n---\n\n## Architecture principles\n\n* **去中心化** &mdash; no central server. Browser ↔ your daemon, direct.\n* **零依赖** &mdash; everything runs on bare Node.js + bash + curl.\n* **软编码** &mdash; URLs, owners, repos, ports, keys all configurable; the page auto-detects from `location.*` so a fresh fork \"just works\".\n* **守门有度** &mdash; `\u002Fhealth` and `\u002Ffleet\u002Finfo` are intentionally public so probes work without secrets; `\u002Fv1\u002F*` `\u002Fquota` `\u002Fstats` `\u002Fsp\u002F*` are gated. `\u002Fauth\u002F*` carries an extra `--allow-auth` flag (default off) on top of the auth-key check, because it accepts user passwords.\n* **向后兼容** &mdash; running without `--auth-key` is allowed for local dev (open mode); production deployments should always set one.\n* **道法自然** &mdash; the upstream-default soft-codes default to `zhouyoukang\u002Fwindsurf-assistant`, but every user's fork takes over its own identity automatically. *无为而无不为*.\n\n---\n\n## License\n\nMIT (`web\u002F`, `packages\u002Fdao-core\u002F`, `packages\u002Fdao-pool\u002F`, `packages\u002Fdao-vm\u002F`, `packages\u002Fdao-injector\u002F`, `scripts\u002F`, `tests\u002F`) &middot; MIT (`packages\u002Fwam\u002F`, `wam-bundle\u002F`) &middot; Apache 2.0 (`packages\u002Fdao-proxy-min\u002F`).\n\n---\n\n*反者道之动 · 弱者道之用 · 天下之物生于有 · 有生于无*\n","Windsurf Assistant 是一个完全去中心化的风帆助手，旨在为用户提供高效、灵活的辅助功能。该项目的核心功能包括反代API（支持OpenAI兼容接口和SSE流）、切号WAM（账户轮换扩展）以及提示词反代dao-proxy-min（注入自定义系统提示）。技术上，它采用JavaScript编写，并通过云守护进程、存活监测和核心测试等自动化流程保证其稳定性和安全性。适用于需要在不同场景下使用多个账户的用户，尤其是那些希望在不丢失工具生态系统的情况下添加自定义系统提示的Windsurf IDE用户。","2026-06-11 03:55:30","CREATED_QUERY"]