From cdca29604495b9b282b8ce939be96c2ad70db7fc Mon Sep 17 00:00:00 2001 From: richblack Date: Wed, 29 Jul 2026 19:38:14 +0800 Subject: [PATCH] =?UTF-8?q?D36=EF=BC=9A=E4=BF=AE=E6=AD=A3=E5=9B=9B?= =?UTF-8?q?=E5=80=8B=E9=9B=B6=E4=BB=B6=E5=A5=91=E7=B4=84=E7=9A=84=E5=81=87?= =?UTF-8?q?=E8=B3=87=E8=A8=8A=E6=95=98=E8=BF=B0=EF=BC=88=E7=8F=BE=E8=A1=8C?= =?UTF-8?q?=E6=B2=92=E6=9C=89=E7=99=BC=20API=20key=20=E7=9A=84=E6=A9=9F?= =?UTF-8?q?=E5=88=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leo 07-29 指正:「現在沒有 partner key,改用 namespace,現在沒有發 API key 的機制」。 這些契約寫著 'KBDB partner key(ak_xxx)'/'租戶識別(ak_ 前綴)'=假資訊源—— 總管就是被它騙的(先把範例改成不存在的 {{credential.kbdb_partner_key}}), 不修的話下一個 AI 會再挖同一個坑。 改:kbdb_upsert_block/auth_oauth2/auth_service_account/auth_static_key 的 api_key description,改述為「租戶識別=Arcrun namespace」+註明 examples 裡的 ak_test/ak_nonexistent 是測試假值不代表真實格式。 只動 description,不動 schema/欄位名/gherkin_tests (api_key 欄位名保留——改名會破壞現有 workflow)。 驗:四檔 YAML 可解析、required 不變、欄位清單不變、gherkin_tests 全保留、 ak_test 等測試值原封不動。 人閘:leo 07-29 跑 scripts/component-arm.sh 解保險授權。 --- registry/components/auth_oauth2/component.contract.yaml | 6 +++++- .../auth_service_account/component.contract.yaml | 6 +++++- .../components/auth_static_key/component.contract.yaml | 6 +++++- .../components/kbdb_upsert_block/component.contract.yaml | 7 ++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/registry/components/auth_oauth2/component.contract.yaml b/registry/components/auth_oauth2/component.contract.yaml index d0b726a..0723647 100644 --- a/registry/components/auth_oauth2/component.contract.yaml +++ b/registry/components/auth_oauth2/component.contract.yaml @@ -27,7 +27,11 @@ input_schema: refresh — 強制重新 refresh,更新 CREDENTIALS_KV 中的 access_token/expires_at api_key: type: string - description: 租戶識別(ak_ 前綴),用來組 {api_key}:cred:{name} KV key + description: >- + 租戶識別=Arcrun namespace,用來組 {api_key}:cred:{name} KV key。 + ⚠️ 2026-07-29 更正:舊敘述寫「ak_ 前綴」,但現行沒有發 API key 的機制 + (leo 07-29 指正)——namespace 即身分即憑證。下方 examples 的 ak_test/ak_nonexistent + 是測試用假值,不代表真實格式。 service: type: string description: auth recipe 名稱,對應 auth_recipe:{service} 的 KV 記錄 diff --git a/registry/components/auth_service_account/component.contract.yaml b/registry/components/auth_service_account/component.contract.yaml index b778ed2..92145eb 100644 --- a/registry/components/auth_service_account/component.contract.yaml +++ b/registry/components/auth_service_account/component.contract.yaml @@ -24,7 +24,11 @@ input_schema: description: 目前僅支援 authenticate api_key: type: string - description: 租戶識別(ak_ 前綴),用來組 {api_key}:cred:{name} KV key + description: >- + 租戶識別=Arcrun namespace,用來組 {api_key}:cred:{name} KV key。 + ⚠️ 2026-07-29 更正:舊敘述寫「ak_ 前綴」,但現行沒有發 API key 的機制 + (leo 07-29 指正)——namespace 即身分即憑證。下方 examples 的 ak_test/ak_nonexistent + 是測試用假值,不代表真實格式。 service: type: string description: auth recipe 名稱,對應 auth_recipe:{service} 的 KV 記錄 diff --git a/registry/components/auth_static_key/component.contract.yaml b/registry/components/auth_static_key/component.contract.yaml index de2a028..a23ec2c 100644 --- a/registry/components/auth_static_key/component.contract.yaml +++ b/registry/components/auth_static_key/component.contract.yaml @@ -24,7 +24,11 @@ input_schema: description: 目前僅支援 authenticate;static_key 無 refresh 概念 api_key: type: string - description: 租戶識別(ak_ 前綴),用來組 {api_key}:cred:{name} KV key + description: >- + 租戶識別=Arcrun namespace,用來組 {api_key}:cred:{name} KV key。 + ⚠️ 2026-07-29 更正:舊敘述寫「ak_ 前綴」,但現行沒有發 API key 的機制 + (leo 07-29 指正)——namespace 即身分即憑證。下方 examples 的 ak_test/ak_nonexistent + 是測試用假值,不代表真實格式。 service: type: string description: auth recipe 名稱,對應 auth_recipe:{service} 的 KV 記錄 diff --git a/registry/components/kbdb_upsert_block/component.contract.yaml b/registry/components/kbdb_upsert_block/component.contract.yaml index 533ae3f..1adf546 100644 --- a/registry/components/kbdb_upsert_block/component.contract.yaml +++ b/registry/components/kbdb_upsert_block/component.contract.yaml @@ -20,7 +20,12 @@ input_schema: properties: api_key: type: string - description: KBDB partner key(ak_xxx) + description: >- + 租戶識別=Arcrun namespace(送出時放 X-Arcrun-API-Key header)。 + ⚠️ 2026-07-29 更正:舊敘述寫「KBDB partner key(ak_xxx)」,但**現行沒有發 + API key 的機制**(leo 07-29 指正)——namespace 即身分即憑證。 + workflow 裡一律寫 {{credential.arcrun_namespace}},值由執行期解析(D36)。 + 欄位名維持 api_key(改名會破壞現有 workflow),只是它裝的是 namespace。 page_name: type: string description: 當 idempotency key。內部用 GET /blocks?page_name= 查找。