
Stateark
io.github.Askrion由 GitHub 帳號 Askrion 發布v0.5.3更新於 Oct 24, 2026
Local-first version control for AI work. Savepoint and resume your project state across chats.
概覽
為 AI 工作設計的本地優先版本控制:把專案狀態存成版本化快照,並可在任何新對話中接續。
- 可以做什麼
- StateArk 把一次工作階段整理成可版本化、可攜帶的專案狀態,以 Markdown、JSON 和真實檔案的普通資料夾形式存放在本機儲存區。對話內指令包括 Savepoint(把本次工作階段合併為新版本)、Resume(把最新狀態載入新對話)、History(列出版本)與 Diff(查看兩次快照之間的變化)。搭配工具還有 get_artifact、note_event、journal、diff_savepoints 與 sync_savepoint。完整性檢查會把每份快照與前一版比對,對沿用、縮小、待傳或缺失的產出物提出警告,但從不阻止快照寫入。
- 適用情境
- 適合長時間的 AI 編碼或設計工作階段在切換對話後遺失脈絡,而你希望決策、限制條件、被否決的做法和實際檔案都能延續的情況。適合 Claude Desktop、Claude Code 等本機 MCP 用戶端在單一機器上使用。由廠商雲端發起連線的託管用戶端無法連到 localhost,因此目前不適合這類用戶端。
- 執行需求
- 需要 Node 20+ 以及本機 MCP 宿主(例如 Claude Desktop 或 Claude Code);npm 套件 stateark 以 stdio 執行。僅本機模式不需要 .env。選用的 Supabase 鏡像需要 SUPABASE_URL、SUPABASE_SECRET_KEY、STATEARK_OWNER_ID 與 STATEARK_STORAGE_BUCKET,並依序執行提供的 SQL 遷移。預設儲存位置為 ~/StateArk;本機 HTTP 代理只綁定 127.0.0.1,並在儲存區產生存取金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Stateark,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
StateArk
Never explain your project to an AI twice.
Your chat is a workspace, not an archive. StateArk turns a working session into a versioned, portable project state that any new chat can pick up. Open terminal and write:
Then quit Claude Desktop completely (Cmd+Q) and reopen it. That is the whole install.
(Prefer to install from source? npm install && npm run build && npm run setup —
see INSTALL.md. Undo any time with npx stateark remove.)
Here what we had in mind developing stateark - we address a problem millions of users have...
Local by default. Savepoints are ordinary folders of Markdown, JSON and your real files. Nothing is uploaded. If StateArk disappears tomorrow, you still have everything.
Commands
What makes it more than a summary
- Carry-forward. Files you do not re-submit are copied into the new version with their original hash, so a forgetful model cannot silently lose your schema.
- Integrity checks. StateArk cannot see your chat - so it checks what it can:
truncation markers (
// ... rest unchanged), files that collapsed in size, files the state describes but never handed over, savepoints identical to their predecessor. It warns, it never blocks: the savepoint is always written. - Journal. Between savepoints the model quietly records turning points, so a Savepoint at the end of a long session does not depend on a degraded context. Only for projects you already saved once - scratch conversations are never touched.
Requirements
Node 20+. Claude Desktop, or Claude Code (claude mcp add --transport http ...).
It also runs under other local MCP hosts — users have it working with Codex and
Hermes against the same store.
Hosted clients that dial your server from the vendor's cloud (Claude web,
ChatGPT web) cannot reach localhost. See INSTALL.md.
Several agents at once
Supported, and worth saying plainly because it is the setup that broke first. Writes to a project are serialised across processes, so two agents cannot claim the same version number. If a savepoint reports that another process is busy, repeat it in a moment — nothing is lost. A process that dies mid-write releases its lock automatically.
If your store lives in Dropbox, OneDrive or iCloud Drive: several agents on one machine are fine. Two machines writing the same store simultaneously is a sync conflict, which the sync client resolves and StateArk cannot.
Licence
Elastic License 2.0. Use it for anything including commercially, read and modify the source, share the package. You may not offer it to third parties as a hosted or managed service. Your savepoints are yours and are not covered by this licence.
Architecture
A Savepoint is an ordinary directory, not a proprietary database:
If StateArk disappears, those files remain usable.
Install
Requires Node 20+.
No .env is needed for local-only mode. Copy .env.example to .env only if you want
to change the port, the store location, or enable the Supabase mirror.
On first run StateArk generates a random access key and stores it in
~/StateArk/.access-key (mode 0600). The startup banner prints your endpoints:
Security model
The HTTP entrypoint is a local server on your own machine, so StateArk assumes any web page you visit is hostile:
Before exposing the agent over HTTPS: set a long STATEARK_ACCESS_KEY, set
STATEARK_ALLOWED_HOSTS to your tunnel hostname, and put a real reverse proxy in front.
Platform reality
Local-first and hosted LLMs are different networking environments. Claude Desktop/Code and
other local MCP clients can talk to the local agent directly. A hosted ChatGPT/Gemini
client generally cannot reach localhost on your computer. For those you would need a
secure HTTPS route to your running local agent — remote access is on the roadmap and does
not exist yet.
If you are setting this up, in this order:
- run StateArk locally;
- test Savepoint and Resume from a local MCP client;
- enable Supabase sync only if you actually want a mirror;
- expose the agent over HTTPS only after the three steps above work.
Local-only mode — the default
Leave SUPABASE_URL, SUPABASE_SECRET_KEY and STATEARK_OWNER_ID unset. Cloud sync stays
off and files never leave the machine. Default store: ~/StateArk
(override with STATEARK_LOCAL_ROOT).
This is what you get out of the box. The Supabase section below is opt-in.
Local + Supabase sync
Run the migrations in the Supabase SQL editor, in order:
supabase/migrations/001_stateark.sqlsupabase/migrations/002_artifacts.sqlsupabase/migrations/003_hardening.sql
Then set SUPABASE_URL, SUPABASE_SECRET_KEY (server-side Secret key, never a
publishable key), STATEARK_OWNER_ID, and STATEARK_STORAGE_BUCKET.
Cloud is a mirror, not the master:
- the local savepoint is committed first and a cloud failure cannot invalidate it;
- cloud deletion does not delete local data;
- sync status lives in
meta.json(disabled/pending/synced/failed); - retry a failed push with the
sync_savepointtool.
Text/code artifacts up to 2 MB are mirrored inline in Postgres; everything else goes to the private Storage bucket. The mirror is not end-to-end encrypted — the Supabase project can read what it stores. Sync is off by default for exactly that reason; turn it on only for a project you would be comfortable putting in any hosted database.
Savepoint behaviour
When you say Savepoint, the host LLM should:
- reconstruct the latest valid state rather than summarise chronology;
- retain governing decisions, requirements and constraints;
- keep rejected approaches only when the reason matters;
- send exact text/code as
transfer=text; - send binary bytes as
transfer=base64only when truly available; - otherwise mark the artifact
transfer=pendinginstead of fabricating it; - omit files that have not changed — they are carried forward automatically;
- never abbreviate a file with
... rest unchanged.
Local creation is atomic: StateArk writes a temporary bundle and renames it only when
complete. Artifact names are sanitised; if a name had to be changed, manifest.json
records the original under original_name.
Integrity checks
Every savepoint is compared against its predecessor. Findings are returned in the tool
result and rendered at the top of state.md. The savepoint is always written — a
check never costs you work, it only tells the model to come clean.
The last one is the check that matters most in practice. StateArk cannot read your chat, so a filename appearing in the prose is the only available clue that the model described a file instead of preserving it. The warning is phrased as a question, because a named file may legitimately be planned or live outside the conversation.
Journal
note_event records one short line per turning point, silently, and only for projects
that already exist in StateArk. Untracked projects return tracked: false and nothing is
written — that is the filter that keeps scratch conversations out.
At the next Savepoint the journal is consolidated into the new version and cleared. It is never cleared before the savepoint is durably on disk.
Inspect pending entries with the journal tool. Nudging is based on entry count
(STATEARK_JOURNAL_NUDGE_AT, default 20), never on a timer.
Diff
diff_savepoints with no version arguments compares the latest savepoint against its
predecessor: LCS line diff on the text fields, set diff on the lists, SHA-256 comparison on
the artifacts, plus an attention block for anything that looks like silent loss.
Artifacts
Every stored artifact has a SHA-256. Pending files are explicit in manifest.json and in
the resume_project output, so the LLM cannot quietly pretend a file exists.
If a binary cannot travel through MCP, open the local upload page printed at startup and attach it to the existing project/version. This resolves the pending manifest entry.
Resume
Resume My Project returns state.md plus the artifact manifest. The LLM calls
get_artifact for exact text only when needed. For binaries it gets the verified local
path and hash rather than invented content.
MCP clients
- Claude Desktop —
npx statearkregisters the stdio entrypoint for you. - Claude Code — point it at the local Streamable HTTP endpoint:
claude mcp add --transport http ... - Codex, Hermes and other local MCP hosts — point them at the same store root and
they share your savepoints. Each client is configured separately; there is no shared
setting. StateArk writes a
README.mdinto the store explaining the layout, which most coding agents will read on their own. - ChatGPT web/mobile, Gemini, and other hosted clients — these dial your server from
the vendor's cloud and cannot reach
localhoston your machine. That is a networking fact, not a missing feature. Reaching your savepoints from a hosted client needs an authenticated HTTPS route to your own machine; it is on the roadmap and does not exist yet.
Roadmap
Nothing here exists yet. In roughly this order:
- Optional cloud storage — your savepoints mirrored so a dead laptop is not a dead project. Off by default, and only ever a copy: your disk stays the original.
- Remote access — reaching your state from web and mobile clients, not just the desktop app on the one machine that holds it.
- Branching — two chats working the same project currently produce one linear chain of versions. Documented, not solved.
- State pruning — over many savepoints
state.mdgrows without limit. It needs a size ceiling and a rule for what ages out.
StateArk is free to use, including commercially. See the licence above for the one thing it does not allow.
來源:README.md,提交 e1092c6
工具
0版本歷史
1- v0.5.3最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。