feat(registry): aliases.yaml scope synonym table + contract aliases field
- registry/aliases.yaml: scope-level synonym table for 21 built-in components covers api (gmail/google_sheets/telegram/line_notify/http_request), data (string/array/date/number/json), logic (if/foreach/switch/try_catch/wait), ai scopes; includes zh/en/abbrev variants - types.ts: add optional aliases[] field to ComponentContractSchema - CONTRIBUTING.md: explain aliases auto-merge from aliases.yaml vs manual contract aliases Note: manual maintenance for now; aliases.yaml becomes KBDB synonym graph seed data when KBDB is introduced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,10 @@ export const ComponentContractSchema = z.object({
|
||||
no_network_syscall: z.boolean().optional(),
|
||||
service_binding_key: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
// aliases:搜尋同義詞,不作為識別符使用
|
||||
// 從 registry/aliases.yaml 的 scope 同義詞表自動合併,也可在 contract 內手動補充
|
||||
// 未來接入 KBDB 後,canonical_id 將獲得系統派發的唯一 hash id
|
||||
aliases: z.array(z.string()).optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user