Leo
|
39d6fdfaff
|
fix(examples): graph_neighbors 去寫死官方 KBDB URL(審查 🔴)+敏感輸入註記
審查發現:workflow.yaml 寫死 kbdb.finally.click = KBDB_BASE_URL fallback 同家族坑
(self-hosted 用戶照抄示範,查詢與資料流向直接打進官方庫)。
改法:
- fetch_triplets base URL 參數化為 {{input.kbdb_base}}(每次呼叫帶),yaml 檔頂加醒目
警示「先改成你自己的 KBDB URL」;grep 證兩檔零 finally.click 殘留。
- 1042 註解保留並補一句:self-hosted 有 global_fetch_strictly_public flag
(credential-primitives-wasm Phase 7),開了 workers.dev URL 亦可帶。
- description.md 參數表加 kbdb_base(必填)+觸發範例改自有域名佔位+補
「敏感輸入請用 POST /query(GET /q/ 的 query string 會進各層 log)」。
tsc 乾淨、全套 50 passed(1 失敗為 main 既有 executor.test.ts 斷言漂移,無關)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 09:01:20 +00:00 |
|
Leo
|
06ff0e21ce
|
fix(cypher-executor): component-loader 白名單補 code 零件(#29 發現)
WASM_HTTP_RUNNER_IDS 漏 'code',導致 workflow 寫 `component: code` 在解析鏈
step 1-6 全不命中後落到 step 8 直接「找不到零件」——本 PR 的 graph_neighbors
範例正用 code 節點,故歸此分支。
URL 推導:走既有 wasmWorkerUrl 通用推導 arcrun-code.{WORKER_SUBDOMAIN}.workers.dev
(WORKER_SUBDOMAIN 來自 wrangler.toml [vars],self-hosted 由 deploy 注入自己的
subdomain)——無寫死官方 code.arcrun.dev,self-hosted 天然成立。
測試:tests/component-loader-code.test.ts(2 測)——`code` 解析成 runner 不 throw、
stub fetch 證 runner 打 arcrun-code.{sub}.workers.dev;wasmWorkerUrl 對任意 subdomain
推導正確。tsc 乾淨、全套 50 passed(1 失敗為 main 既有、無關)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 08:42:51 +00:00 |
|
Leo
|
313aeb13bf
|
feat(cypher-executor): 同步查詢 trigger + graph_neighbors 查詢面 workflow 示範
Part 1(框架,cypher-executor webhooks-named.ts):加同步查詢 trigger。
現有 named webhook /trigger 回 {success,data,trace,duration_ms} 信封、只有 POST;
查詢面(console/MCP 打 graph neighbors/traverse)要 GET + 直接拿最終節點輸出當 response。
新端點同步 await 執行 workflow graph → 回 result.data(最終節點輸出)本身當 body(非 202):
- GET /q/:ns/:name (namespace 走 path,input 走 query string)
- GET /webhooks/named/:name/query (X-Arcrun-API-Key header,input 走 query string)
- POST /webhooks/named/:name/query (header,input 走 body)
- POST /webhooks/named/:ns/:name/query (namespace 走 path,input 走 body)
認證沿用 X-Arcrun-API-Key。誠實(mindset §7):節點失敗回 error+trace(500,非假綠);
paused 工作流無法同步回答 → 409 明講;輸出 5 MiB 硬上限(超過 413);duration 走 header 不污染 body。
Part 2(A 類 workflow.yaml):registry/examples/graph-neighbors/。
http_request 打 base custom domain kbdb.finally.click(避 CF 1042)撈 triplet records
→ code 零件記憶體 BFS(對照 kbdb-graph-plugin graph-traverse.ts)→ 同步回鄰居。
把 graph plugin 內建 GET /graph/neighbors 泛化成查詢面 workflow 的示範。
測試:cypher-executor/tests/query-trigger.test.ts(7 測,全綠)——同步回輸出(非 202)、
GET/POST × header/path 四端點、節點失敗回錯+trace、缺 key 401、不存在 404。
用內建 comp_uppercase(純記憶體)證明 Part 1 同步 trigger 機制本身可用。
待驗:graph_neighbors 需 code 零件部署 leo21c 後才能 live 端到端(另線處理);
triplet template id 上線前對一次(workflow 已參數化未寫死)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 08:16:17 +00:00 |
|
Leo
|
b13b4dfe49
|
Merge pull request 'refactor(mcp): u6u_* tool rename → arcrun_* + 前綴收斂單一來源' (#20) from feat/mcp-tool-rename-arcrun into main
|
2026-07-07 06:02:10 +00:00 |
|
Leo
|
9a609c4a04
|
Merge branch 'main' into feat/mcp-tool-rename-arcrun
|
2026-07-07 06:02:07 +00:00 |
|
Leo
|
a981dde1d3
|
Merge pull request 'feat(mcp): OAuth 2.1 server for claude.ai remote connector(修明碼-namespace bearer 漏洞)' (#15) from feat/mcp-oauth-server into main
|
2026-07-07 06:01:51 +00:00 |
|
Claude
|
5fa3b79a4c
|
fix(mcp): validate/normalize RFC 8707 resource at issuance; store canonical aud
leo review 最後一條:簽發端沒驗證/正規化 resource → 失敗劇本「OAuth 全程成功但每次打 /mcp 401 aud
mismatch」(尾斜線/canonical 變體,錯誤離根因最遠最難 debug)。改在簽發端 fail fast:
- metadata.ts 加 normalizeResource(scheme/host 小寫、去預設 port、path 去尾斜線,與 resourceUri
canonical 一致)+ resourceMatches。
- /authorize(GET+POST):帶 resource 且正規化後 != canonical → redirect 帶 error=invalid_target
(redirect_uri 已驗過才 redirect);一律把 canonical resource 存進 code(不存 client 原樣值)。
- /token:帶 resource 且正規化後 != canonical → 400 invalid_target;aud 一律存 canonical
resourceUri(origin) → 與 partner-auth 嚴格比對 at.aud===resourceUri(origin) 恆一致。
裁決:尾斜線/大小寫等「正規化後等價」的 resource → 接受(存 canonical aud,/mcp 必過),非拒絕——
否則 claude.ai 真送變體會永久授權失敗連不上(把 401 問題換位重現)。只有正規化後真正不同的
resource(別 host/path)才 fail-fast 拒。詳見 OAUTH.md §2。
測試:normalizeResource/resourceMatches 單元 + 尾斜線變體→正常發碼且 aud canonical、別 host→
/authorize redirect invalid_target 不發碼、/token 別 host→400 invalid_target。
mcp vitest 52/52、tsc exit 0。
Refs #15
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 05:38:35 +00:00 |
|
Claude
|
53080ffa53
|
docs(mcp): GUIDE/README 全面改教 arcrun_*,清掉死 u6u_ 工具名
死文件治理:GUIDE.md(25 處)與 README.md(21 處)仍在教 u6u_* 工具名,
含本 PR 已刪的 4 個 tool(deploy/execute/get/list_workflows),下個 CC 照著走會撞牆。
- 全部 u6u_* → 現役 arcrun_*(component/tag/gui 那批用新名)
- 已刪 tool 改指現役:execute→run、deploy→push、get/list_workflows→crud 版
- 修正因換工具而失真的流程與參數:沙盒測試段改為 arcrun_validate_yaml(部署前
schema 驗證)→ arcrun_push_workflow(部署)→ arcrun_run_workflow(觸發,帶
api_key/name/input);get_workflow 參數 workflow_id→name
- 順帶把兩處品牌 prose "u6u" 改 "Arcrun"
- grep 確認兩檔零 u6u
brand.ts:釐清 ARCRUN_TOOL_PREFIX 覆蓋僅內部 rebrand 過渡 / 測試鉤子,
Workers runtime 無 process 全域基本不生效、勿當對外特性。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 05:37:54 +00:00 |
|
Claude
|
5fc7277c3c
|
refactor(mcp): u6u_* tool 全面 rename 為 arcrun_* + 前綴收斂單一來源
零 u6u 洩漏(leo 要求 1):connector tool 清單只剩 arcrun_*,並移除壞掉/
重複的 u6u_ workflow tool(deploy/execute/get/list_workflows 由 arcrun_
push/run/get/list_workflows 取代);MCP server name 也由 u6u-mcp-server
改 arcrun-mcp-server。
前綴單一真相源(leo 要求 2):新增 mcp/src/brand.ts(TOOL_PREFIX + toolName()
helper),所有 server.tool() 註冊一律走 toolName("suffix"),前綴不再明碼散寫。
未來 rebrand 只改 brand.ts 一行。
- 12 個獨有能力 tool rename(component/tag/gui/search_workflows)
- 4 個重複/壞掉 tool 移除
- inter-tool hint、描述字串、註解內 u6u_ 名字全數更新
- tsc exit 0;vitest 19/19 綠
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 05:21:34 +00:00 |
|
Claude
|
92cfb9c59f
|
fix(mcp): address PR #15 review — aud validation, OAUTH_KV auto-inject, TTL/sunset docs, drift test
leo review 5 條逐條處理:
1. RFC 8707 aud 驗證(真缺口):partner-auth OAuth 路徑補「at.aud === resourceUri(originOf(url))」,
不符回 401 invalid_token(防別的 arcrun-mcp 部署簽的 token passthrough)。加 aud 不符→401 測試。
2. deploy.ts injectWranglerConfig 涵蓋 OAUTH_KV(在 PR 內補):OAUTH_KV 納入 REQUIRED_KV_NAMESPACES →
acr init/update 自動建 namespace + 注入用戶帳號真 id(比照 SUBMISSIONS_KV 家族)。wrangler.toml 註解
更新(CLI 路徑自動、手動直推才需手建)。注入 regex 已驗證命中。
3. MCP_TOKEN_TTL 預設維持 30 天(leo 拍板不改):OAUTH.md 明寫為有意取捨(無 refresh token → 到期重走
OAuth=再輸 owner secret),MCP_TOKEN_TTL 可調、7 天為更保守選項。per-owner 可調另開 issue #19(非阻塞)。
4. ALLOW_PLAINTEXT_NAMESPACE 逃生門標 SUNSET(code + wrangler.toml + OAUTH.md),開 issue #18 追蹤
「遷移完成後移除整段 code path + Env 欄位」。
5. 防 drift 測試:spy KV 攔所有 put,斷言對 OAUTH_KV 的每一次 put 都帶 expirationTtl>0(完整流程 +
store 層兩道),防未來往這顆短效 KV 塞長效資料。
驗證:mcp tsc exit 0、vitest 45/45(+aud +drift×2);cli tsc exit 0。
Refs #15 #18 #19
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 04:56:59 +00:00 |
|
Claude
|
7d9d478baa
|
feat(mcp): OAuth 2.1 server for claude.ai remote connector; close plaintext-namespace bearer hole
在 arcrun-mcp worker 實作 MCP Authorization 規範(OAuth 2.1 + PKCE S256),
讓 claude.ai 遠端 connector 安全登入;並修掉「Bearer 明碼 namespace 直接放行」漏洞。
安全模型
- /authorize 同意頁以 owner secret(CF Secrets MCP_OWNER_SECRET)把關,只有 owner 知道 →
只知 URL 的人走不完 OAuth、拿不到 token。
- access_token 是 /mcp 唯一接受的 bearer(預設);明碼 namespace 舊路徑移除(步驟 5 直接 401)。
實作 endpoint(掛 worker 根路徑)
- RFC 9728 /.well-known/oauth-protected-resource(+/mcp 變體)+ 401 帶
WWW-Authenticate: Bearer resource_metadata=...
- RFC 8414 /.well-known/oauth-authorization-server(response_types=code, S256, none)
- RFC 7591 /register(public client,無 secret,無狀態不落地)
- GET/POST /authorize(PKCE S256 + owner-secret 閘 + redirect_uri 白名單)
- POST /token(authorization_code + PKCE 驗證 → access_token 綁定 owner namespace)
儲存鐵律
- authorization code / access token → 短效 KV OAUTH_KV(key 用 SHA-256 hash、帶 TTL、code 一次性)
- owner secret / static token → CF Secrets(非 KV、非明碼 var)
- DCR client / refresh token → 不落地(無狀態 / 不實作,避免長效機密進 KV)
相容決策
- 本機 CLI/GUI/Claude Code → 用真祕密 MCP_STATIC_TOKEN(CF Secret)取代舊明碼 namespace
- 官方 SaaS partner-key 路徑行為不變
- ALLOW_PLAINTEXT_NAMESPACE 逃生門預設關(僅遷移期)
驗證:tsc exit 0;vitest 42/42(oauth 22 + partner-auth 10 改測真實 middleware + 既有 10);
wrangler deploy --dry-run 打包過、OAUTH_KV binding 正確識別。設計文件 mcp/OAUTH.md。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
|
2026-07-07 03:59:00 +00:00 |
|
kbdb-cc
|
befc63cfe0
|
fix(kbdb/embed): 語意查詢 metadata 過濾根因修復(Arcrun#11)
根因:Vectorize index 建了卻從沒建 metadata index。CF Vectorize v2 要對某
metadata 欄位下 filter,必須先為該欄建 metadata index,否則帶 owner_id/
entry_type/source 過濾的語意查詢一律回 0 命中(app 端 filter 接線本來就對)。
且 metadata index 只索引「建立後 upsert」的向量 → 既有向量須重推才會被收錄。
- deploy.ts:加 ensureVectorizeMetadataIndexes(),隨部署冪等建 owner_id/
entry_type/source(string)三個 metadata index(self-host/官方帳號皆自動)。
- embed.ts / routes/embed.ts:backfillEmbeddings 加 reindex+offset,重推「所有
embeddable(含 is_embedded=1)」既有向量,讓事後建立的 metadata index 收錄;
POST /embed/backfill {"reindex":true} 觸發,offset 分頁到 remaining=0。
- wrangler.toml:註解補 create-metadata-index 手動步驟 + reindex 提示。
- tests:mock DB 對齊 LIMIT?/OFFSET? 與 reindex predicate;補 reindex 測試。
leo21c 已驗:owner_id=leo / entry_type 過濾修前 0→修後命中,不帶過濾不變。
已知後續(非本 bug 症狀):source 值 89-91 bytes 超過 Vectorize string
metadata index 的 64-byte 索引上限 → source 過濾對長值失效,另案。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 06:03:43 +00:00 |
|
Leo
|
4439880bbd
|
merge: 機械 wiki ingest workflow(Arcrun#8)——code 節點 card→envelope,Phase B live 驗過
|
2026-07-06 05:48:10 +00:00 |
|
Leo
|
b87c18df60
|
fix(km-wiki-ingest): code 節點 post 前剝除 envelope 的 _estSubrequests(graph strict schema)
leo21c 實 ingest 發現:graph /triplets/ingest 為 strict schema,會以 422
unrecognized_keys 拒絕 planEnvelopes 掛在 envelope 上的診斷鍵 _estSubrequests。
修:parse_card 內聯碼在 return 前把每個 envelope 的所有 _-前綴鍵剝除,使
post_one_envelope 的 body_json={{envelope}} 為 ingest-candidate 契約乾淨 payload
(source/extractor/nodes/triplets)。已驗:剝除後 entry/nodes/triplets 與原
planCard 逐欄一致。實 ingest(直接驅動同資料流)已用此剝除成功寫入 15 triplets。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 05:38:10 +00:00 |
|
Leo
|
08a79229a5
|
fix(code): Workers 實部署修正 —— wasmfile+Module 載入 + tick-budget timeout(CF 實測)
leo21c 實部署發現兩個 CF 限制並修正:
1. CF 禁 runtime 從 bytes 編譯 wasm(WebAssembly.instantiate(bytes) 被 embedder 擋)
→ singlefile(base64) 內嵌不可用。改 wasmfile variant + `import wasm from './vendor/quickjs.wasm'`
(wrangler CompiledWasm rule 綁成預編 WebAssembly.Module),newVariant({wasmModule}) 注入。
sandbox 改 variant 注入制(setVariant):Worker 注 wrangler Module、Node 由 bytes 建 Module,
同一 production 路徑受測。vendor/quickjs.wasm 由 postinstall 自 node_modules 複製(gitignored)。
2. CF 凍結同步執行期 Date.now → wall-clock deadline 對純同步迴圈失效(撞 CF CPU 回 1102)。
改指令計數 interrupt(max_ticks,CF-safe),wall-clock 留 Node 保護。校準:cadence≈5000
指令/tick、真實 card 解析≈4 ticks、CF 門檻≈1000+ ticks → 預設 max_ticks=500。
有 body 的迴圈(含 100M 迴圈)皆乾淨回 TimeoutError;空體 while(true){} 仍由 CF CPU guard 容納。
Worker live: arcrun-code.leo21c.workers.dev(cypher-executor 以此 workers.dev 慣例位址呼叫)。
Node 單測 12/12 綠(wasmfile variant + 注入 Module,同 production 路徑)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 05:15:50 +00:00 |
|
Leo
|
1a7b4639c3
|
docs(code): DESIGN.md 更新為「裁定 A、Workers 就緒」的最終狀態
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 04:51:39 +00:00 |
|
Leo
|
d93dc4e350
|
feat(km-wiki-ingest): parse_card 改用通用 code 零件;刪 domain 零件 km_wiki_card_parse
Arcrun#10 裁定:一次性解析走通用逃生口,不再鑄 domain 零件。
- workflow.yaml:parse_card 由 component:km_wiki_card_parse -> component:code,
config.code 內聯 card-to-envelope 的 planCard 邏輯(去 import/export、raw NUL
分隔符改 u0000 escape、改用 code 沙箱注入的 sha256);下游 refs 改 parse_card.data.*;
加 limits(timeout_ms/max_output_bytes)。已端到端驗證(YAML 解析->JS eval)與原
planCard 輸出逐欄全等(含 content_hash)。
- 刪 registry/examples/km-wiki-ingest/component-contract.yaml(km_wiki_card_parse 契約)。
- lib/card-to-envelope.mjs:header 改述為「code 節點內聯 JS 的權威來源 + 參考實作」,
邏輯不變(續為 inline JS 之單一真相源)。
- lib/dry-run.mjs / description.md:框架改述為 code-節點形態;部署清單更新為「部署通用
code 零件」。dry-run-evidence.json(3 entries/15 triplets/16 nodes)不變——解析輸出等價。
不部署、不寫 live。留分支可部署狀態。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 04:50:08 +00:00 |
|
Leo
|
efa0b0578c
|
feat(code): Workers 就緒化(裁定 A)—— singlefile variant + 純 JS SHA-256 prelude
- 沙箱改用 quickjs-emscripten singlefile variant(wasm 內嵌 base64、同步載入),
CF Workers 相容;sandbox.mjs 成 Node/Worker 共用 runtime-agnostic 核心。
- sha256 curated builtin 改「純 JS SHA-256 prelude 字串注入」,去掉 node:crypto /
async Web Crypto host-call,Node/Worker 皆決定性(card content_hash 逐字等價)。
- index.ts 成可部署 Worker host(Hono,POST /→runCode),自足不走 TinyGo 模板流程。
- 補 wrangler.toml(arcrun-code / code.arcrun.dev)、tsconfig、DEPLOY.md。
- contract stability 修為 floating(過 registry zod schema 驗證)。
- 單測 12/12 全綠(含 card→envelope 與原模組 planCard 逐欄全等)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 04:39:28 +00:00 |
|
Leo
|
60f5f10ba5
|
feat(code): 新增通用 code 零件(sandbox inline JS)—— Arcrun#10 設計+PoC
n8n Code node 式逃生口:config 帶 inline JS、stdin 帶 input JSON、
stdout 回 {success,data}|{success:false,error,error_type}。
沙箱=QuickJS-wasm:user JS 跑在 QuickJS context,global 只有純 ECMAScript
內建 + 唯一 curated builtin sha256(純函式);碰不到網路/檔案/env/secret/
Worker 物件圖。資源上限:timeout(interrupt)/memory/stack/output/code size。
本輪=設計+PoC,未部署 leo21c。sandbox.mjs + test/ 為 Node/vitest 可跑實作
(12 測試全綠,含 card→envelope 與原模組 planCard 逐欄全等)。index.ts 為
Worker host 骨架、DESIGN.md 記錄機制/安全性質/生產路徑/設計岔路(A/B)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 04:27:15 +00:00 |
|
Arcrun CC
|
cc494a250e
|
feat(ingest): 機械式 wiki 卡片→KBDB ingest(Arcrun#8 Phase A,dry-run 驗證)
新 ingest 模型(無 LLM,取代舊 raw→Haiku 路):
- 來源 = system-dev/wiki/cards/**/*.md(精耕卡)+ ## 實體/## 關聯 typed-edge + [[wikilink]]
- 卡片→base entry(metadata.embed=true);typed-edge/wikilink→graph triplet
- 純機械決定性,零 token
形式 = Arcrun workflow(cron drain + Gitea webhook delta)+ 新自訂零件 km_wiki_card_parse
不撞頂設計:一卡一 tick + 超大卡以 source_uri anchor 自動分段;
graph fan-out 精確 = 7+4N+M+D,dry-run 對 notes 三卡上限 33 subrequest(<50)。
Phase A:不部署、不寫 live。含純核心 + dry-run 證據(3 entries/15 triplets/16 nodes)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
|
2026-07-06 03:52:50 +00:00 |
|
uncle6me-web
|
ed2e42e007
|
feat(credentials): T6 讀取/注入接新家 + T7 雙讀 fallback (credential-store-migration 方案 A)
D19「擁有目錄不擁有內容物」遷移的讀取斷點。密文住 cypher per-script secrets、
D1 只存 secret_ref、auth worker 讀不到 cypher 的 secrets → cypher 先取值塞 payload。
WASM 端(T7 fallback 骨架,零行為改變可獨立部署驗):
- auth_static_key/main.go + auth_service_account/main.go:Input 加 resolved_secrets,
解密處改「有 resolved 就用、沒有才 fallback 舊 kv_get+crypto_decrypt」。default 等於舊碼。
- tinygo build 兩支通過,copy 到 .component-builds/*/component.wasm。
TS 端(T6 主路徑):
- auth-dispatcher.ts 新增 resolveSecretsFromNewHome:查 D1 拿 secret_ref →
secret_get(env[ref], T4) 取明文 → 組 map(取不到的 name 缺席,不放空字串) →
更新 last_used_at。tryAuthDispatch + resolveCredentialRefs 都塞 resolved_secrets。
- rule 02 §2.2 對齊:只查 ref/取值/塞字串,不解密不展開模板不組 JWT。
驗證:cypher-executor + cli tsc exit 0;vitest 41/42(新增 auth-dispatcher.test.ts 6 案例全過,
剩 1 pre-existing 無關失敗)。待 leo21c 部署驗 WASM 端到端(不由本任務部署,acr update
硬綁 GitHub codeload=mistakes #23)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-05 13:44:26 +08:00 |
|
Claude
|
55a47d7c18
|
kbdb(embed): add batch backfill endpoint for pre-Vectorize entries (issue #7 / T2.4 缺口)
embed 模組原本只有 embedOnWrite(寫入即嵌),對「開 Vectorize binding 之前就寫入」或
embed-on-write 當時漏掉的既有 entry 沒有回填路徑 → is_embedded=0 永遠補不回,語義查詢回 0 筆。
新增(base,對 entries 做;embedding 是 base 唯一職責,非 graph 插件):
- embed.ts: backfillEmbeddings()——找 is_embedded=0 且 isEmbeddable(metadata.embed===true) 的 entry,
批次補嵌(單次 AI.run 陣列 + 單次 VECTORIZE.upsert 陣列 + 單次 UPDATE IN,一批≈3 subrequest)、
設 is_embedded=1,冪等、分批(limit 1-100,回傳 processed/remaining,可重複呼叫直到清零)。
模組未開誠實回 enabled:false(不假綠)。backfillStatus() 回 pending/embedded 計數。
- routes/embed.ts: POST /embed/backfill、GET /embed/backfill/status;模組未開回 409 + capability_hint。
- index.ts: mount /embed。
- tests/embed-backfill.test.ts: 5 vitest(off no-op / 補嵌+標記 / 冪等 / 分批 remaining / status)。
base 維持對內容語意無知(只認通用 embed 旗標,不知 triplet/wiki)。tsc exit 0、vitest 5/5。
端到端(leo21c,wrangler 直推、非 acr update):pending 5→processed 5→remaining 0,
Vectorize vectorCount 0→5,/entries/search?mode=semantic 由 0 筆→5 筆(語義排序命中)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDtnGPJpAzp8UqHfAo8o1s
|
2026-07-05 04:37:04 +00:00 |
|
Claude
|
1d19d46161
|
feat(credentials): T8 回填端點 + T9 治理端點/CLI (credential-store-migration)
- POST /credentials/migrate-to-workers-secrets:舊 KV credential 逐筆解密回填 D1+Workers
Secrets,冪等可審,重用 wasi-shim 唯一合法 crypto_decrypt 呼叫點
- GET /credentials 改讀 D1(與既有 /credentials/catalog 共用查詢);DELETE 改為新家優先、
舊 KV fallback,避免孤兒資料
- acr creds list/replace/delete 三支 CLI 薄殼指令;順手修好過期的 acr creds push(舊
client 端加密格式已被 T5 取代)
- 新增 cypher-executor/tests/credentials.test.ts + D1 test fixture
T6/T7(讀取/注入路徑、雙讀 fallback)需要重新編譯 registry/components/auth_static_key
的 TinyGo WASM,本環境無 tinygo 且 proxy 擋 github.com 下載,卡在工具鏈缺口,詳細分析
記錄在 credential-store-migration.md。
端到端驗證:部署到 leo21c 帳號真實跑過 GET/POST/DELETE 三分支 + migrate 端點(對真實
既存的兩筆 credential 跑,發現 cypher-executor 自己的 ENCRYPTION_KEY secret 疑似為空,
誠實記錄為待 leo/總管裁決的不可逆風險項,未擅自重設)。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
2026-07-04 23:00:07 +00:00 |
|
uncle6me-web
|
1db8a13a3a
|
fix(console): leo 實測三回饋——深淺主題預設淺色/登入頁置中/fetch 斷網韌性 (Arcrun#3 console 系)
1. 深/淺主題切換+預設淺色(leo 明示):CSS custom properties 兩份色板
一套結構——:root=淺色紙感(宣紙米白紙紋+墨色文字+琥珀調深 #8a5f1e,
WCAG 對比實算正文 12.2:1/琥珀 4.82/ok 4.58/err 5.17 全過 AA),
:root[data-theme=dark]=原定稿暖黑 2a 原值不動。選擇存 localStorage
(arcrun_console_theme),head 預載腳本防閃色。切換入口:登入/首次
設定頁小鈕、桌面側欄項、設定頁正式開關;/console/dashboard 免登入頁
同步支援(pagehead 小圖示)。金琥珀例外兩版刻意不變(btn 漸層/狀態球/
toast/gcenter)。
2. 登入/首次設定頁置中:根因=.view.on{display:block} 蓋掉 .authwrap 的
flex → 內容靠左;補一行 .authwrap.view.on{display:flex} 水平垂直置中。
3. fetch 斷網韌性:friendlyErr() 把裸 Failed to fetch/Load failed 轉
「連線中斷」誠實文案(非斷網錯誤原樣保留);駕駛艙與 dashboard 的
60 秒定時器常駐、錯誤文案標明自動重試,網路恢復自動刷回。
驗證:tsc --noEmit exit 0;vitest 26/27(1 失敗=pre-existing 基準);
三層跳脫驗證(mistakes #24:template 求值→node --check→行為斷言)全綠。
不部署,總管接手。
|
2026-07-04 18:30:30 +08:00 |
|
uncle6me-web
|
c673d37ace
|
docs(wiki): Mira Console 完整版已部署 leo21c——驗收全綠 (Arcrun#3 console 系)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-04 18:07:13 +08:00 |
|
uncle6me-web
|
9cc29f5dfb
|
docs(wiki): Mira Console 完整版收尾——mistakes #24 三層跳脫驗證法+DELETE 假綠缺口、status 更新 (Arcrun#3 console 系)
|
2026-07-04 17:51:25 +08:00 |
|
uncle6me-web
|
f9e44abc59
|
feat(console): Mira Console 完整版——8 頁紙感定稿視覺 SPA (Arcrun#3 console 系)
依 claude design 定稿(紙感暖黑 2a)+ brief 8 頁資訊架構重寫 /console:
- 單檔 HTML+原生 JS hash routing,零外部資源;紙紋底/明體標題/琥珀強調/
呼吸球嵌「安/趕/滯」;手機優先 390px + ≥1024px 側欄 + 底部五 tab
- 頁1 登入/首次設定(沿 console-auth v1)|頁2 駕駛艙(dashboard-data,60s 刷新;
/console/dashboard 免登入獨立頁同步換視覺)|頁3 總庫搜尋(entry_type chips=
KBDB 真能篩的欄位、共 N 筆中命中 M(誠實 total)、語意未啟用誠實降級 banner)|
頁4 卡片詳頁+關聯(Markdown 渲染 + kbdb-graph-plugin 鄰居放射圖,經新 proxy
/kbdb/graph/neighbors/:name;無 triplet →「尚無關聯資料」)|頁5 工作流
(/webhooks/named list+手動觸發+最近執行;釘選 localStorage;v0 零件/recipes
查詢收進本頁折疊區不砍功能)|頁6 憑證(新 GET /credentials/catalog D1 目錄
唯讀,絕不回密文;新增/替換走既有端點;刪除未接 D1(T9)標「即將開通」)|
頁7 收件匣(新 GET /console/inbox-data,session 鎖——訊息原文屬機敏)|
頁8 設定(vectorize 狀態探測讀 search 降級訊號、開關標「即將開通」、
/console/setup/reset 換帳密、系統資訊)
驗證:tsc exit 0;vitest 26/27(1 失敗 stash 複驗 pre-existing);wrangler
deploy --dry-run 打包過;inline JS 求值後 node --check + esc/mdRender/parseAtMs
純函式行為測試全過(含 XSS escape)。未部署,留總管接手。
|
2026-07-04 17:49:49 +08:00 |
|
uncle6me-web
|
5174ed6821
|
feat(console): 駕駛艙 dashboard——/console/dashboard(-data) 聚合 KBDB dash_* entries (T-cockpit ②, Arcrun#3 console 系)
- GET /console/dashboard-data:無需登入唯讀聚合端點(dash_beat/dash_task/dash_wait/inbox,
租戶=CONSOLE_TENANT),燈號判定寫死在端點(red=blocked/心跳>240分僅台北09-22判定;
yellow=非標準落後標記;green=其餘)。created_at 實測 epoch 秒(number),解析防禦性兼容字串
- GET /console/dashboard:單檔 HTML 兩格儀表板(狀態燈+心跳+今日完成度橫條 / 今日路線+
等你的事+收件匣數),手機優先一屏、60s 自動刷新、無互動
- kbdb-proxy.ts:kbdbBase() 改 export 供 dashboard 共用(同一 KBDB 連線慣例,不重複實作)
- SDD 補件:docs/3-specs/arcrun/search-console/(issue #3 授權;位於既有 arcrun/ 白名單下)
部署:手工注入法(mistakes #23,禁 acr update)deploy leo21c,version 4252c321-e15b-494c-ab97-29f82eefa565
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-04 12:49:59 +08:00 |
|
Claude
|
05333b8fe6
|
feat(credential-store-migration): T3 best-effort — secrets 設定就緒 + 誠實缺口 closure
acr init 加印手動指令 wrangler secret put CF_SECRETS_API_TOKEN
(比照既有 ENCRYPTION_KEY 模式,不發明新模式);CF_ACCOUNT_ID 已在
T5 的 deploy.ts 改動中自動注入(同 WORKER_SUBDOMAIN 機制)。
誠實缺口 closure:對本次真實改動過的 committed code(leo21c
arcrun-cypher-executor)做第二次 wrangler deploy,確認
CF_SECRETS_API_TOKEN/ENCRYPTION_KEY 兩個 secret 存活 + 寫入路徑
redeploy 後仍正常運作(真實 curl 驗證),比 T1.5 spike 對 throwaway
worker 的舊證據更貼近本次改動。
刻意不跑 acr update:mistakes #23 已知限制(硬綁 GitHub codeload
舊碼,會拉回覆蓋剛部署的 T4/T5 成果),跑了只會摧毀測試環境又
證明不了新東西,SDD 本身允許此替代路徑。此結構性衝突留 leo 裁決。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
|
2026-07-03 23:07:42 +00:00 |
|
Claude
|
c24edbbdb6
|
feat(credential-store-migration): T5 寫入路徑改走 Workers Secrets + D1 ref
POST/PUT /credentials 改寫:密文值 PUT 進 CF Workers per-script Secrets
(唯寫,D19 不持有內容物),D1 credentials 表只存目錄(不含密文)。
secret_ref = CRED_<NAME>_<sha256(api_key)[:8]>,避免跨租戶撞名。
DELETE/GET /credentials 本次不動(仍走舊 KV,T9 範圍),已誠實標注。
新增 CREDENTIALS_DB D1 binding(與 KBDB base 共用同一顆 arcrun-kbdb,
沿用既有 database_id 注入機制)+ CF_SECRETS_API_TOKEN/CF_ACCOUNT_ID
env vars(CF_ACCOUNT_ID 由 deploy.ts 自動注入,同 WORKER_SUBDOMAIN 模式)。
§2.4 選項甲落地:client 不再加密,明文值經 TLS 傳輸,cypher 短暫經手
明文不落地不持金鑰——與舊版 01-tech-stack.md 傳輸格式不同,是本 SDD
對舊格式的刻意取代(§6 Q-b 仍需 leo 明確接受)。
驗證:tsc --noEmit exit 0;vitest 26/27(1 pre-existing 無關失敗)。
端到端:真實部署 leo21c arcrun-cypher-executor,POST/PUT /credentials
成功寫入 Workers Secrets + D1 row(CF API + D1 query 雙重確認),
清理測試資料後 restore wrangler.toml(無帳號專屬 id 殘留 git)。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
|
2026-07-03 23:04:59 +00:00 |
|
Claude
|
c3c0a8b17d
|
feat(credential-store-migration): T4 wasi-shim secret_get host function
新增 secret_get(ref) host function:讀 CF Workers per-script Secrets 的值,
host 端實作 = env[ref] 動態字串索引(T1.5 spike ② 已證可行,零網路呼叫)。
- ArcrunHostEnv 加 index signature 支援任意 secret_ref 動態取值
- WasiHostFunctions 加 secret_get,u6u WASI imports 比照 kv_get 同款
pointer/memory-write 機制 wiring
- 安全邊界:只允許 CRED_ 前綴(拒絕讀 ENCRYPTION_KEY/CF_SECRETS_API_TOKEN
等非 credential 機密),比照既有 routedKvGet 前綴檢查精神
驗證:tsc --noEmit exit 0;vitest 18/18 通過(新增 5 案例)。
撞牆記錄:JSPI Suspending 物件不可在單元測試直接呼叫(既有架構環境限制,
kv_get 同樣受影響),已移除不可行的 2 個測試並記錄於測試檔註解。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
|
2026-07-03 22:56:42 +00:00 |
|
Claude
|
f9dad311ff
|
feat(credential-store-migration): T2 D1 migration 0002_credentials.sql
新增 credentials 目錄表(api_key/name/service/sensitivity/secret_ref/
created_at/last_used_at,PRIMARY KEY(api_key,name) + idx_cred_apikey),
D19:只存目錄不存密文,密文本體改住 CF Workers per-script Secrets(T5)。
deploy.ts 重用既有 applyD1Migration,緊接 0001_base.sql 之後套用同一顆 D1,
機制完全一致(同一支 CF D1 query API)。
驗證:cli tsc --noEmit exit 0;leo21c arcrun-kbdb D1
(1099d0f3-d062-4202-984c-5a57b0a8c031)實際套用,
sqlite_master 確認 table+index 存在,重跑驗證冪等。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018D6QoC5waFkcjc2N7csJBB
|
2026-07-03 22:52:09 +00:00 |
|
Leo
|
abf232327c
|
feat(console): API Key 介面錯位收斂為簡單 email+password 登入 (Arcrun#3 發現②)
背景:self-hosted 單租戶下 console 原本那格「API Key」其實只是 namespace
明碼字串,不是註冊制 key(leo 原話:理論上根本沒有 API Key 這件事)。leo 拍板:
換成簡單 email+password 登入頁(自己設一組帳密,不用 OAuth),登入成功後端發
session token 存 localStorage;後端 API 呼叫仍用固定租戶字串打 KBDB(登入系統
只擋外人看頁面,不做多租戶)。
租戶字串收斂:發現①已核實 owner_id='leo' 是 D1 中 458,357 筆資料實際使用的
租戶字串(ak_... 只有 2 筆孤兒資料)。CONSOLE_TENANT 預設 "leo",不製造第三個租戶。
新增:
- cypher-executor/src/routes/console-auth.ts:/console/auth-status、
/console/setup(首次自助設定帳密,寫入 SESSIONS_KV console:credentials)、
/console/setup/reset(換帳密,需舊密碼)、/console/login、/console/session
(驗 session + 回傳固定租戶字串)、/console/logout。密碼用 salt + 3 輪
SHA-256 雜湊,不存明碼。
- cypher-executor/src/types.ts:Bindings 加 CONSOLE_TENANT。
- cypher-executor/wrangler.toml:[vars] 加 CONSOLE_TENANT = "leo"。
- cypher-executor/src/routes/console.ts:① 卡片從「貼 API Key」改成登入/首次
設定表單;查詢函式改用登入後端回的固定租戶字串,使用者不再需要知道任何
namespace 字串。
驗證見 issue #3 留言。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
2026-07-03 09:01:04 +00:00 |
|
Leo
|
9024f22534
|
fix(kbdb): entries list 端點加 q/search filter + 誠實 total 欄位 (Arcrun#3 發現①)
根因(CF D1 直查已核實):owner_id='leo' 租戶下 D1 實際有 458,357 筆,但
/kbdb/entries(list)從沒接過 search/q 參數——proxy 轉發白名單漏了它、base
listEntries() 也沒這個 filter,caller 帶 search= 會被靜默丟棄,永遠回「無過濾
list」。加上舊版 count 欄位=本頁筆數(非總數),容易被誤讀成「總共只有這幾筆」。
修法:
- kbdb/src/actions/entry-crud.ts:ListEntriesFilter 加 q,listEntries 回傳
{ entries, total }(total = 符合條件全部筆數,COUNT(*) 與 list 查詢並行跑)。
- kbdb/src/routes/entries.ts:GET / 讀 q 或 search(別名)當 LIKE filter,
回應同時帶 count(本頁)與 total(全部)。
- cypher-executor/src/routes/kbdb-proxy.ts:GET /kbdb/entries 轉發白名單加
q/search → 統一轉發成 base 認得的 q。
驗證見 issue #3 留言(CF D1 直查 + curl /kbdb/entries?search=遷移 有真實命中)。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
2026-07-03 08:51:29 +00:00 |
|
uncle6me-web
|
406f0fedf8
|
docs(sdd): credential 遷移 SDD 依 T1.5 spike 改寫——Secrets Store 產品換成 Workers per-script Secrets
依據 T1.5 spike 四驗證全過(2026-07-03,證據 Gitea Arcrun#2):
① API 動態加 secret 免重部署即讀 ② env[ref] 動態字串索引可行
③ 14 把未觸上限(D21 單用戶:記錄即可)④ 重部署後 secrets 存活。
- §2.3 全段改寫:寫入走 CF API PUT /workers/scripts/{script}/secrets、
讀取走 env[ref]、原三條候選路徑待決撤銷(T1 spike 實證 Secrets Store
binding 靜態 + .get(ref) 參數被忽略 + REST 唯寫,路徑不成立)
- §2.5 改寫:取值=env[secret_ref](零網路呼叫),wasi-shim
secret_get(ref) host 端實作=env[ref]
- T3 改寫:ensure store + 注入 store_id 整步取消,改為確保 secrets
寫入 token/account id 就緒+非關鍵 worker 跑一次 acr update 驗存活
- T4 改寫:secret_get(ref) 實作=env[ref](spike ② 已證)
- T1 標完成(負結果)、T1.5 標完成、T2-T9 解凍施工
- 其餘矛盾句對齊用詞(§0/§2.1/§2.2/§2.4/§3/§4/§5/§6 Q-a/Q-d、
回填端點更名 migrate-to-workers-secrets)
- 雙讀過渡、回填、回滾、治理(D1 只存 metadata+secret_ref)設計不動
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-03 07:22:38 +08:00 |
|
uncle6me-web
|
5d00e71275
|
chore: D22 落地——docs/SDD/wiki/CLAUDE.md 進 repo(Gitea private 預設全 push)
頂層 D22 決策(leo 2026-07-03 拍板):推什麼由開發環境歸屬決定,
Gitea private=除機敏值/build 產物/.github 外全 push。
解 T1.5 卡點:雲端工人 clone 拿得到 credential-store-migration.md,可就地改寫 SDD。
機敏掃描兩輪通過(新增 189 檔約 2.1MB,node_modules/dist/wasm 照舊排除)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-03 07:13:33 +08:00 |
|
Claude
|
c830150da1
|
docs(wiki): 記錄 acr update 部署源綁 GitHub codeload 的框架級發現(mistakes #23)
雲端工人跑 Arcrun#3 控制台頁時發現:acr update 部署物永遠從 GitHub codeload
tarball 抓,跟本地/Gitea checkout 脫鉤——D20 鎖死 GitHub 的雲端工人若照字面
指示部署會蓋掉自己的改動卻回報成功(假綠)。本次改手工複刻注入邏輯部署
單一 worker 繞過此坑,記錄供下次沿用;多 worker 場景正解留 leo 裁。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 09:10:00 +00:00 |
|
Claude
|
981dc25086
|
feat(console): 搜尋/控制台頁 v0(Arcrun#3,T-loop1d 雲端壓測)
cypher-executor 新 route GET /console:單檔 HTML+原生 JS 薄殼,三查詢區
(KBDB/workflows/components+recipes)全打既有端點,無新業務邏輯。
components 改打「同帳號」arcrun-registry worker(WORKER_SUBDOMAIN 現算),
不硬打官方 registry.arcrun.dev,避免自架用戶查到別人的零件庫。
vectorize 狀態直接讀 KBDB 既有 mode/capability_hint,不開新 config 端點。
已部署 leo21c 帳號驗證:/console 200、三查詢 curl 皆 200 真回資料
(public-recipes 命中 telegram_send 真實紀錄)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 09:08:27 +00:00 |
|
uncle6me-web
|
f6c773a9b5
|
note: 31d4a9c 訊息誤植——實際內容=wiki 收尾(退役清三源卡+mistakes/status),非 sprint 檔
|
2026-07-02 16:52:56 +08:00 |
|
uncle6me-web
|
31d4a9c47b
|
feat(sprint): T-loop1d 今晚任務——雲端做 Arcrun#3 控制台頁(第二次壓測,跨多repo)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 16:46:52 +08:00 |
|
uncle6me-web
|
2a51d67da0
|
fix(deploy): cache-bust codeload tarball 下載,修 seed 假綠根因 (Arcrun#13 P2)
根因:acr update / init 從 codeload.github.com/.../tar.gz/main 抓部署源,該 branch
tarball 由 GitHub CDN 快取,push 後可 stale 數分鐘。「push→立刻 acr update」抓到舊
tarball → wrangler deploy 仍回 ✓ 但 ship 舊 code → /init/seed 只灌 23(舊種子數,
不含 telegram/line_notify/kbdb)。「deploy 成功」≠「部到修好的版本」= 假綠同一類。
實證:leo21c GET /auth-recipes 部署後仍持久回 23、無 telegram(非傳播延遲);
source main 已含 27 個種子(git show main 核實),但部署的是舊 bundle。
修:downloadRepoTarball 加 no-cache header + cache: 'no-store' + 唯一 _cb query
param,強制繞過 CDN stale entry,每次抓 ref 的最新內容。
待 leo21c 驗:push 此修 + acr update → /auth-recipes 應變 26+(含 telegram)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 21:04:52 +08:00 |
|
uncle6me-web
|
c1a06df68f
|
feat(exposure): 完全移除 acr push 暴露 consent 閘 (Arcrun#13 P1)
leo 2026-06-29 拍板:arcrun 是給 AI 用的系統,push/暴露不再需要人類確認。
- 刪 cypher-executor/src/lib/exposure-consent.ts(server 閘,MCP push 的真正擋點)
- 刪 cli/src/lib/exposure-warning.ts(CLI 互動 + 非 TTY 拒絕)
- recipes.ts / webhooks-named.ts:移除 checkExposureConsent 403 閘,直接放行
- recipe.ts / push.ts:移除 obtainExposureConsent 呼叫,不再 prompt/拒絕
- init-seed / seed-api-recipes:移除種子層級 consent
- exposure_consent 欄位降為向後相容(讀舊 record 不報錯,不再寫入/檢查)
不補審計線索、不做替代防護(leo:先拿掉,出問題再設置)。
tsc 全綠(cypher-executor + cli)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 20:58:32 +08:00 |
|
uncle6me-web
|
43948d9247
|
merge: acr search 跨類統一 + acr parts 去 hardcode recipe (Arcrun#13)
|
2026-06-29 19:30:37 +08:00 |
|
uncle6me-web
|
d8fac6750e
|
merge: telegram/line/kbdb auth-recipe seed 漂移修復 (Arcrun#13 A)
|
2026-06-29 19:30:37 +08:00 |
|
uncle6me-web
|
2aa26a5bdd
|
feat(cli): acr search 跨類統一搜尋 + acr parts 去 hardcode recipe(issue #13 根治)
leo 2026-06-29 重構根因:「telegram 與 google 不一致」其實是查錯表——舊世界要找一個能力
必須先決定它是 component/recipe/workflow 才查對清單,但查到答案前根本不知道屬哪類 →
「先知道分類」成了查詢前置,倒因為果(leo:連我都會查錯表)。這是搜尋設計缺陷,非粗心。
兩部分互補修法:
1. acr parts 清理(W3.1/W3.3):移除 5 個 hardcode 的 recipe(gmail_send/google_sheets_append/
telegram_send/line_notify_send/notion)——它們是 recipe(動態,存 store)不是零件(component)。
只留真 WASM 零件。檔頭寫死分流原則 + 移除處留註解防再 hardcode。footer 改指向動態清單 + acr search。
2. acr search <term> 新增(W3.2,正向修法):cli/src/commands/search.ts。fan-out 4 來源——
component(靜態 BUILTIN_COMPONENTS) + recipe(GET /recipes) + auth-recipe(GET /auth-recipes)
+ workflow(GET /webhooks/named),依類別回 counts+命中。各來源獨立 try(離線降級指路、不連坐)。
查的人不必先選表 → 結構性消除「查錯表」。
薄殼合規(rule 07 §2):search 只 fan-out 既有清單端點 + 過濾 + 分組 + 印出(介面層暴露/格式化),
不在介面層拼裝能力。component 靜態(PR-only)、recipe/auth/workflow 動態(store) 分流明確、不再 conflate。
實證(對 leo21c 跑,read-only GET):
- acr search telegram → component:0 recipe:1 auth-recipe:0 workflow:1(一眼看出 telegram 是 recipe)
- acr parts → 只剩 http_request 等真零件,5 個 recipe 已不在
- tsc 全綠、build 通過
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 13:08:11 +08:00 |
|
uncle6me-web
|
90777e3877
|
fix(auth-recipe): 回灌 telegram/line_notify/kbdb 種子,補 AuthInjectSpec.path(修 source/live 漂移)
issue #13 升級:根因不只 acr parts 殘留,是 auth-recipe-seeds.ts source 漏了 3 個 static_key
auth recipe(telegram/line_notify/kbdb),但 prod KV 手動 seed 過 → 任何全新 self-hosted
`POST /init/seed` 只 seed 23 個、漏 telegram → self-host(leo21c/mira)telegram_send 的
auth_service:'telegram' resolve 不到 → {{auth.bot_token}} 注入空 → telegram 發訊壞掉。
實測 smoking gun(2026-06-29):
- prod cypher.arcrun.dev/auth-recipes = 27 個(含 telegram)
- self-host arcrun-cypher-executor.leo21c.workers.dev = 23 個(無 telegram/line_notify/kbdb)
修法(資料/型別,非業務邏輯,守 mindset §1 不建 component):
- auth-recipe-seeds.ts 補 telegram(inject.path bot_token)/line_notify(header Bearer)/kbdb(header Bearer)
- recipes.ts AuthInjectSpec 補 path?(WASM auth_static_key + SDD §六早有此欄、source 介面漏 → tsc 擋)
- google_user(oauth2)暫不回灌:內嵌 client_secret 不可進 git + 介面無 oauth2 欄 → 留 Phase D
形態取自 prod GET /auth-recipes/{service};設計權威 auth-recipe.md §六(telegram path)/§七(kbdb 共用)。
telegram 自此與 notion(header)/gsheets(service_account) 同一條 recipe+auth-recipe 鏈,一致。
tsc 全綠;local 模擬 token-in-path 注入 PASS。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 12:37:19 +08:00 |
|
uncle6me-web
|
764f657201
|
merge: issue #13 步驟2 清 parts.ts 降級零件殘留
telegram/gmail/sheets/line 改走 recipe canonical_id、移除已刪 ai_transform。
TS tsc 過、gmail 讀取留 TODO 不硬塞。自動派工第 2 件共用框架 PR。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-28 16:06:54 +08:00 |
|
uncle6me-web
|
225aa9f9e7
|
清 parts.ts 降級零件殘留:telegram/gmail/sheets/line 改走 recipe、移除已刪的 ai_transform(issue #13 步驟2)
telegram/gmail/google_sheets/line_notify 已於 2026-05-29 Phase 2 降級為 recipe,
但 acr parts 仍列舊 component: 形態誤導 CC。參照 notion 樣板改成「走 recipe」描述 +
canonical_id 對齊 api-recipe-seeds.ts(telegram_send/gmail_send/google_sheets_append/line_notify_send)。
ai_transform_compile/run 已刪除(mindset §2),整段移除。
canonical_id 均已核實存在於 cypher-executor/src/lib/api-recipe-seeds.ts。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-28 16:05:39 +08:00 |
|
uncle6me-web
|
caa8e103ff
|
merge: issue #13 步驟1 telegram 示例改 recipe(gmail 留 TODO)
PR review 抓出 gmail_send 假綠已擋下,只併對的 telegram 三處。
自動派工首次共用框架 PR 閉環:subagent 診斷→改→獨立 review→拆併。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-28 15:47:01 +08:00 |
|
uncle6me-web
|
a234201235
|
修正示例 yaml:telegram 改用 recipe canonical_id;gmail 讀取留 TODO(issue #13 步驟1)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-28 15:45:50 +08:00 |
|