arcrun — AI workflow execution engine (clean history)

Self-hosted 開源:WASM 零件 + recipe + cypher-executor,跑在你自己的 Cloudflare。

此為重建的乾淨歷史起點(移除曾誤 commit 的 GCP SA 金鑰,舊歷史保留在
richblack/arcrun 與本地 backup 分支)。含:
- acr init --self-hosted installer(建 KV/R2 + codeload 拉預編譯 wasm + wrangler deploy + seed recipe)
- recipe push 把關(資料外流提醒 + 打通檢查)
- 19 個正當零件預編譯 wasm(claude_api/km_writer/kbdb_upsert_block 排除:違反 DECISIONS §1)
- CLI / cypher-executor / registry / 完整 SDD

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-03 15:52:38 +08:00
commit 922a57fe34
485 changed files with 89356 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
# Tasks: 資料外流警示
> 對應 design.mdrichblack 已 reviewQ1-Q3 + 法律憑證 + 保護入口決議)。
> 每完成一個 task 立刻標 [x],不批次。
---
## 共用:同意憑證機制(§7 法律憑證)
- [x] C1 定義 `exposure_consent { confirmed_by, understood, confirmed_at, suppress_future }` 型別
- [x] C2 同意 log 寫入動作關聯的 recordwebhook record / recipe record),可審
- [x] C3 「以後不要警示」(suppress_future)本身也 log(用戶知風險並接受)
## API 層警示(R1,防在後)
- [x] A1 webhook 部署(webhooks-named.ts POST)要 exposure_consent,缺且未 suppress → 拒絕 + 提示
- [x] A2 recipe push/recipes POST)同上(公私一視同仁)
- [x] A3 首次暴露某資源問、記住(exposure_confirmed / suppress_future)→ 之後不重問(§3
- [x] A4 警示訊息說明風險 + 盤資料源(盡力,盤不出標「請自行確認」)+ **提示 arcrun 保護措施**(§8
## CLI 警示(互動 + 旗標)
- [x] B1 `acr push`:部署前互動式警示(首次某 workflow),人類確認組 exposure_consent 送出;`--confirm-exposure` 跳過互動(CI/非 TTY);`--suppress-warning` 記偏好
- [x] B2 `acr recipe push`:同上
- [x] B3 非 TTYAI 直跑)無 --confirm-exposure → 拒絕並提示「需人類確認暴露」
## hookR2,防在前,Q3=偵測指令)
- [x] H1 pre-bash-guard:偵測 `acr push` / `acr recipe push` → 警示「這會把 X 變可被外部呼叫,需人類確認」
## mindset / 文件
- [x] M1 誠實限制(AI 能偽造 confirmed_by_human,靠憑證可審 + 法律歸責)寫進 mindset Skill(步驟 7+ 文件
## 驗收
- [ ] V1 acr push 部署 webhook(首次)→ 互動警示 + 說明暴露 + 提示保護 的終端輸出
- [x] V2 非 TTY 跑 acr push 無 --confirm-exposure → 拒絕的輸出
- [x] V3 webhook 部署 API 無 exposure_consent → 拒絕的輸出
- [x] V4 同一 workflow 二次部署 → 不重問(已記住)
- [ ] V5 --suppress-warning 後 → 不再警示,但 suppress 選擇有 log
- [x] V6 同意後 → exposure_consent 寫進 record 可查(法律憑證)
## 範圍邊界
- 不動用戶 API 入站保護機制(發 key/權限/限流)—— BACKLOG 待決策,本系統只在警示處「提示它存在」。
- 不擋出站 http 節點(不暴露我的資料)、不擋 acr run(本機)。