Files
Arcrun/cypher-executor/wrangler.toml
T
uncle6me-web 5f381a44a6 fix(self-hosted): 修壓測四阻斷項 + 設定分層 + init 非互動
壓測(docs/壓測報告.md)發現 acr init --self-hosted 對任何非官方 CF
帳號都裝不起來,且設定寫死全域單檔 + 強制 TTY。本次一併修:

R2 dead storage 全清(#3#4,registry-canon Phase 1.5 補完):
- cypher-executor wrangler.toml/test.toml/types.ts 移除 WASM_BUCKET binding
- CLI deploy.ts/init.ts/cf-api.ts/config.ts 移除 R2 建立邏輯與 wasm_bucket
- R2 綁信用卡違背「開源免費自架」核心;bucket 名 WASM_BUCKET 本就非法
  → self-hosted 改為只需 Workers + KV(皆免費額度、不綁卡)

fork 帳號部署阻斷(#1#2):
- deploy.ts 新增 stripOfficialOnlyBindings(),注入暫存副本時移除
  [[routes]]/zone_name/[[r2_buckets]]/[ai](fork 沒有 arcrun.dev zone)
- 不刪 repo 內 toml(官方 prod CI 部署仍需 routes),只在 CLI self-hosted 路徑 strip

設定分層 + 非互動(#7#8):
- config.ts loadConfig 改三層:env > 專案層 .arcrun.yaml(就近往上找)> 全域
- init 支援 --account-id/--api-token flag + CLOUDFLARE_* env,缺才互動
- 新增 acr config --where 顯示每個值的來源層(token 自動遮罩)
- gitignore 一併排除 .arcrun.yaml

驗收:tsc 全綠;三層 merge 端對端測試 8/8;strip 對真實 toml 驗證
routes/R2/AI 移除而 name/workers_dev/KV 保留。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 07:22:37 +08:00

117 lines
2.9 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name = "arcrun-cypher-executor"
main = "src/index.ts"
compatibility_date = "2025-02-19"
workers_dev = true
compatibility_flags = ["nodejs_compat"]
[[kv_namespaces]]
binding = "EXEC_CONTEXT"
id = "616967a852eb450a8c01731f71ac8edd"
[[kv_namespaces]]
binding = "WEBHOOKS"
id = "4d23ccd418414a729bd533ba8e3b341f"
[[kv_namespaces]]
binding = "CREDENTIALS_KV"
id = "e7f4320f88d343f187e35e3543dd74c9"
[[kv_namespaces]]
binding = "ANALYTICS_KV"
id = "a43b7997c8e54a34886c2995a853c720"
[[kv_namespaces]]
binding = "RECIPES"
id = "9cf9db905c6241f78503199e58b2ffe0"
[[kv_namespaces]]
binding = "USERS_KV"
id = "25bef01d079148919578894434d58c4d"
[[kv_namespaces]]
binding = "SESSIONS_KV"
id = "455d0505c7534883a4d4985ab8295857"
# 2026-06-04:移除 WASM_BUCKET R2 binding。R2 wasm 路徑早已 dead(平台零件 = 獨立 Worker
# 不從 R2 動態讀),保留只會誤導且 R2 需綁信用卡,與 open source 零費用核心衝突。
# SDD: .agents/specs/component-registry-canon/tasks.md Phase 1.5registry 已於 2026-05-07 移除,此為 cypher-executor 補清)
[ai]
binding = "AI"
[[services]]
binding = "SVC_IF_CONTROL"
service = "arcrun-if-control"
[[services]]
binding = "SVC_SWITCH"
service = "arcrun-switch"
[[services]]
binding = "SVC_FOREACH_CONTROL"
service = "arcrun-foreach-control"
[[services]]
binding = "SVC_FILTER"
service = "arcrun-filter"
[[services]]
binding = "SVC_MERGE"
service = "arcrun-merge"
[[services]]
binding = "SVC_TRY_CATCH"
service = "arcrun-try-catch"
[[services]]
binding = "SVC_WAIT"
service = "arcrun-wait"
[[services]]
binding = "SVC_SET"
service = "arcrun-set"
[[services]]
binding = "SVC_ARRAY_OPS"
service = "arcrun-array-ops"
[[services]]
binding = "SVC_STRING_OPS"
service = "arcrun-string-ops"
[[services]]
binding = "SVC_NUMBER_OPS"
service = "arcrun-number-ops"
[[services]]
binding = "SVC_DATE_OPS"
service = "arcrun-date-ops"
[[services]]
binding = "SVC_VALIDATE_JSON"
service = "arcrun-validate-json"
# ai_transform_compile / ai_transform_run 已於 Phase 22026-05-29)刪除
# (Arcrun 是 AI 呼叫的工具,工作流不該內嵌 AI 節點)。對應 worker 已 wrangler delete
# service binding 一併移除(否則 deploy 報 referenced Worker not found)。
[vars]
ENVIRONMENT = "production"
# MULTI_TENANT = "true"
# ENCRYPTION_KEY 透過 wrangler secret set 設定
# Component worker subdomainworkers.dev 帳號 subdomain
# cypher-executor fetch component worker 一律走 arcrun-{name}.{WORKER_SUBDOMAIN}.workers.dev
# 避開同 zone (*.arcrun.dev) 自循環死鎖,見 arcrun.md P0 #92026-05-13
# Self-hosted fork:改成自己的 CF 帳號 subdomainWorkers & Pages → 你的帳號 → subdomain settings
WORKER_SUBDOMAIN = "uncle6-me"
[[routes]]
pattern = "cypher.arcrun.dev/*"
zone_name = "arcrun.dev"
# Cron triggers — 每分鐘 tickscheduled handler 掃 WEBHOOKS KV 找註冊 cron_expr 的 workflow
# 對應 arcrun.md 三-A P1 #3 / src/scheduled.ts
[triggers]
crons = ["* * * * *"]