Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.47 KB

File metadata and controls

27 lines (20 loc) · 1.47 KB

模块服务目录

跨模块能力通过 service 名(如 economy.account.debit)暴露;平台用 service.get / tx.call 派发。
有 typed client 的模块应优先走 client,避免手写 service 字符串和直操表。

机制:SDK · service · 服务 RPC · manifest 契约

提供方一览

模块(install id) manifest.id 文档
economy feature-economy economy
land feature-land land
area feature-area area
coop feature-coop coop
online-time feature-online-time online-time
tps feature-tps tps

消费 服务、不对外 provides 的模块(如 guichat)——见各包 sapi/manifest.jsonservices.requires

约定

  1. 依赖方向:业务 → 业务 OK;平台(db-server)不 npm 依赖业务包。
  2. 声明:消费方 manifest.requires + services.requires + permissions: ["service:…"] + package.json dependencies。
  3. 装机mod install / fetch-module 不会按 npm 依赖自动拉齐;装 land 时请同时装 economy
  4. 权威类型:在提供方包内(client.ts / types.ts),不要塞回 @sfmc-bds/sdk/contracts
  5. npm:业务包 @sfmc-bds/module-<install-id>(或社区 @user/sfmc-module-*)。