@youzan-cloud/zan-saas-cli 0.0.0-stage → 0.1.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/DEPENDENCIES.json +50 -0
  2. package/INSTALL.md +79 -0
  3. package/LICENSE +21 -0
  4. package/NOTICE +1 -0
  5. package/README.md +151 -2
  6. package/THIRD_PARTY_NOTICES.txt +162 -0
  7. package/bin/zan-saas-cli.js +28 -0
  8. package/internal/registry/index.js +123 -0
  9. package/internal/registry/manifest.json +424 -0
  10. package/npm-shrinkwrap.json +86 -0
  11. package/package.json +33 -4
  12. package/skills/README.md +30 -0
  13. package/skills/zan-saas/SKILL.md +54 -0
  14. package/skills/zan-saas/references/host-entry.md +25 -0
  15. package/skills/zan-saas-access/SKILL.md +37 -0
  16. package/skills/zan-saas-access/references/role-list.md +11 -0
  17. package/skills/zan-saas-access/references/staff-perms-get.md +11 -0
  18. package/skills/zan-saas-aftersale/SKILL.md +31 -0
  19. package/skills/zan-saas-aftersale/references/case-list.md +13 -0
  20. package/skills/zan-saas-aftersale/references/case-scan.md +31 -0
  21. package/skills/zan-saas-benefit/SKILL.md +46 -0
  22. package/skills/zan-saas-benefit/references/card-get.md +7 -0
  23. package/skills/zan-saas-benefit/references/card-grant-list.md +11 -0
  24. package/skills/zan-saas-benefit/references/card-list.md +7 -0
  25. package/skills/zan-saas-benefit/references/customer-card-get.md +7 -0
  26. package/skills/zan-saas-benefit/references/customer-card-list.md +7 -0
  27. package/skills/zan-saas-coupon/SKILL.md +41 -0
  28. package/skills/zan-saas-coupon/references/activity-get.md +11 -0
  29. package/skills/zan-saas-coupon/references/activity-list.md +15 -0
  30. package/skills/zan-saas-coupon/references/voucher-get.md +13 -0
  31. package/skills/zan-saas-coupon/references/voucher-list.md +25 -0
  32. package/skills/zan-saas-customer/SKILL.md +73 -0
  33. package/skills/zan-saas-customer/references/customer-scan.md +11 -0
  34. package/skills/zan-saas-customer/references/segment-list.md +22 -0
  35. package/skills/zan-saas-fulfillment/SKILL.md +36 -0
  36. package/skills/zan-saas-fulfillment/references/delivery-get.md +11 -0
  37. package/skills/zan-saas-fulfillment/references/shipment-list.md +11 -0
  38. package/skills/zan-saas-fulfillment/references/waybill-get.md +9 -0
  39. package/skills/zan-saas-interaction/SKILL.md +37 -0
  40. package/skills/zan-saas-interaction/references/lottery-get.md +11 -0
  41. package/skills/zan-saas-interaction/references/lottery-list.md +19 -0
  42. package/skills/zan-saas-item/SKILL.md +61 -0
  43. package/skills/zan-saas-item/references/attribute-list.md +11 -0
  44. package/skills/zan-saas-item/references/brand-list.md +7 -0
  45. package/skills/zan-saas-item/references/classification-get.md +7 -0
  46. package/skills/zan-saas-item/references/classification-list.md +7 -0
  47. package/skills/zan-saas-item/references/group-list.md +9 -0
  48. package/skills/zan-saas-item/references/item-content.md +9 -0
  49. package/skills/zan-saas-item/references/item-get.md +9 -0
  50. package/skills/zan-saas-item/references/item-search.md +23 -0
  51. package/skills/zan-saas-item/references/product-identity.md +11 -0
  52. package/skills/zan-saas-member/SKILL.md +41 -0
  53. package/skills/zan-saas-member/references/customer-level-get.md +7 -0
  54. package/skills/zan-saas-member/references/growth-log-list.md +17 -0
  55. package/skills/zan-saas-member/references/membership-get.md +7 -0
  56. package/skills/zan-saas-order/SKILL.md +56 -0
  57. package/skills/zan-saas-order/references/order-get.md +26 -0
  58. package/skills/zan-saas-order/references/order-list.md +25 -0
  59. package/skills/zan-saas-order/references/order-scan.md +35 -0
  60. package/skills/zan-saas-org/SKILL.md +37 -0
  61. package/skills/zan-saas-org/references/staff-get.md +15 -0
  62. package/skills/zan-saas-org/references/staff-role-get.md +11 -0
  63. package/skills/zan-saas-org/references/unit-get.md +11 -0
  64. package/skills/zan-saas-org/references/unit-list.md +15 -0
  65. package/skills/zan-saas-points/SKILL.md +42 -0
  66. package/skills/zan-saas-points/references/account-get.md +7 -0
  67. package/skills/zan-saas-points/references/log-list.md +17 -0
  68. package/skills/zan-saas-points/references/rule-list.md +2 -0
  69. package/skills/zan-saas-privacy/SKILL.md +30 -0
  70. package/skills/zan-saas-privacy/references/field-decrypt.md +19 -0
  71. package/skills/zan-saas-shared/SKILL.md +94 -0
  72. package/skills/zan-saas-shared/references/authentication.md +52 -0
  73. package/skills/zan-saas-shared/references/value-processing.md +27 -0
  74. package/skills/zan-saas-stock/SKILL.md +28 -0
  75. package/skills/zan-saas-stock/references/log-list.md +11 -0
  76. package/skills/zan-saas-valuecard/SKILL.md +37 -0
  77. package/skills/zan-saas-valuecard/references/card-get.md +13 -0
  78. package/skills/zan-saas-valuecard/references/card-list.md +11 -0
  79. package/src/auth/browser.js +28 -0
  80. package/src/auth/callback-server.js +99 -0
  81. package/src/auth/config.js +53 -0
  82. package/src/auth/credential-store.js +109 -0
  83. package/src/auth/oauth-client.js +105 -0
  84. package/src/auth/pkce.js +28 -0
  85. package/src/auth/session.js +178 -0
  86. package/src/auth/tool.js +25 -0
  87. package/src/cli/command-paths.js +126 -0
  88. package/src/cli/context-help.js +102 -0
  89. package/src/cli/diagnostic-command.js +57 -0
  90. package/src/cli/domain-catalog.js +42 -0
  91. package/src/cli/help-text.js +32 -0
  92. package/src/cli/native-loader.js +120 -0
  93. package/src/cli/native-path.js +22 -0
  94. package/src/cli/parser-policy.js +141 -0
  95. package/src/cli/program.js +134 -0
  96. package/src/cli/skill-catalog.js +241 -0
  97. package/src/commands/native/access/commands.index.json +24 -0
  98. package/src/commands/native/access/domain.json +3 -0
  99. package/src/commands/native/access/role/list/command.js +141 -0
  100. package/src/commands/native/access/role/list/schema.json +393 -0
  101. package/src/commands/native/access/staff-perms/get/command.js +119 -0
  102. package/src/commands/native/access/staff-perms/get/schema.json +703 -0
  103. package/src/commands/native/aftersale/case/get/command.js +104 -0
  104. package/src/commands/native/aftersale/case/get/exact-json.js +52 -0
  105. package/src/commands/native/aftersale/case/get/money.js +28 -0
  106. package/src/commands/native/aftersale/case/get/projection.js +120 -0
  107. package/src/commands/native/aftersale/case/get/query.js +72 -0
  108. package/src/commands/native/aftersale/case/get/schema.json +134 -0
  109. package/src/commands/native/aftersale/case/list/command.js +135 -0
  110. package/src/commands/native/aftersale/case/list/schema.json +1095 -0
  111. package/src/commands/native/aftersale/case/scan/command.js +110 -0
  112. package/src/commands/native/aftersale/case/scan/query.js +62 -0
  113. package/src/commands/native/aftersale/case/scan/scan.js +78 -0
  114. package/src/commands/native/aftersale/case/scan/schema.json +964 -0
  115. package/src/commands/native/aftersale/case/scan/search.js +108 -0
  116. package/src/commands/native/aftersale/commands.index.json +42 -0
  117. package/src/commands/native/aftersale/domain.json +3 -0
  118. package/src/commands/native/aftersale/refund/list/command.js +97 -0
  119. package/src/commands/native/aftersale/refund/list/money.js +25 -0
  120. package/src/commands/native/aftersale/refund/list/projection.js +50 -0
  121. package/src/commands/native/aftersale/refund/list/query.js +73 -0
  122. package/src/commands/native/aftersale/refund/list/schema.json +130 -0
  123. package/src/commands/native/aftersale/shared/query.js +58 -0
  124. package/src/commands/native/aftersale/shared/search.js +128 -0
  125. package/src/commands/native/benefit/card-definition/get/command.js +110 -0
  126. package/src/commands/native/benefit/card-definition/get/schema.json +545 -0
  127. package/src/commands/native/benefit/card-definition/list/command.js +106 -0
  128. package/src/commands/native/benefit/card-definition/list/schema.json +690 -0
  129. package/src/commands/native/benefit/card-grant/list/command.js +135 -0
  130. package/src/commands/native/benefit/card-grant/list/schema.json +758 -0
  131. package/src/commands/native/benefit/commands.index.json +51 -0
  132. package/src/commands/native/benefit/customer-card/get/command.js +110 -0
  133. package/src/commands/native/benefit/customer-card/get/schema.json +340 -0
  134. package/src/commands/native/benefit/customer-card/list/command.js +103 -0
  135. package/src/commands/native/benefit/customer-card/list/schema.json +731 -0
  136. package/src/commands/native/benefit/domain.json +3 -0
  137. package/src/commands/native/coupon/activity/get/command.js +183 -0
  138. package/src/commands/native/coupon/activity/get/schema.json +624 -0
  139. package/src/commands/native/coupon/activity/list/command.js +169 -0
  140. package/src/commands/native/coupon/activity/list/schema.json +845 -0
  141. package/src/commands/native/coupon/commands.index.json +42 -0
  142. package/src/commands/native/coupon/domain.json +3 -0
  143. package/src/commands/native/coupon/shared/query.js +15 -0
  144. package/src/commands/native/coupon/voucher/get/command.js +113 -0
  145. package/src/commands/native/coupon/voucher/get/schema.json +147 -0
  146. package/src/commands/native/coupon/voucher/list/command.js +155 -0
  147. package/src/commands/native/coupon/voucher/list/schema.json +772 -0
  148. package/src/commands/native/customer/commands.index.json +96 -0
  149. package/src/commands/native/customer/customer/get/adapter.js +82 -0
  150. package/src/commands/native/customer/customer/get/command.js +106 -0
  151. package/src/commands/native/customer/customer/get/schema.json +958 -0
  152. package/src/commands/native/customer/customer/list/command.js +78 -0
  153. package/src/commands/native/customer/customer/list/input.js +145 -0
  154. package/src/commands/native/customer/customer/list/query.js +103 -0
  155. package/src/commands/native/customer/customer/list/schema.json +969 -0
  156. package/src/commands/native/customer/customer/scan/command.js +80 -0
  157. package/src/commands/native/customer/customer/scan/scan.js +92 -0
  158. package/src/commands/native/customer/customer/scan/schema.json +211 -0
  159. package/src/commands/native/customer/customer-tag/get/command.js +166 -0
  160. package/src/commands/native/customer/customer-tag/get/schema.json +317 -0
  161. package/src/commands/native/customer/customer-tag/list/command.js +143 -0
  162. package/src/commands/native/customer/customer-tag/list/schema.json +259 -0
  163. package/src/commands/native/customer/domain.json +3 -0
  164. package/src/commands/native/customer/segment/list/command.js +96 -0
  165. package/src/commands/native/customer/segment/list/query.js +98 -0
  166. package/src/commands/native/customer/segment/list/schema.json +135 -0
  167. package/src/commands/native/customer/segment-customer/list/command.js +171 -0
  168. package/src/commands/native/customer/segment-customer/list/schema.json +123 -0
  169. package/src/commands/native/customer/shared/search-input.js +179 -0
  170. package/src/commands/native/customer/shared/search-page.js +54 -0
  171. package/src/commands/native/customer/tag/get/command.js +73 -0
  172. package/src/commands/native/customer/tag/get/schema.json +339 -0
  173. package/src/commands/native/customer/tagcategory/get/command.js +80 -0
  174. package/src/commands/native/customer/tagcategory/get/query.js +98 -0
  175. package/src/commands/native/customer/tagcategory/get/schema.json +339 -0
  176. package/src/commands/native/customer/tagcategory/list/command.js +127 -0
  177. package/src/commands/native/customer/tagcategory/list/schema.json +394 -0
  178. package/src/commands/native/fulfillment/commands.index.json +33 -0
  179. package/src/commands/native/fulfillment/delivery/get/command.js +107 -0
  180. package/src/commands/native/fulfillment/delivery/get/projection.js +142 -0
  181. package/src/commands/native/fulfillment/delivery/get/schema.json +173 -0
  182. package/src/commands/native/fulfillment/domain.json +3 -0
  183. package/src/commands/native/fulfillment/shipment/list/command.js +83 -0
  184. package/src/commands/native/fulfillment/shipment/list/projection.js +130 -0
  185. package/src/commands/native/fulfillment/shipment/list/schema.json +752 -0
  186. package/src/commands/native/fulfillment/waybill/get/command.js +193 -0
  187. package/src/commands/native/fulfillment/waybill/get/response.js +68 -0
  188. package/src/commands/native/fulfillment/waybill/get/schema.json +190 -0
  189. package/src/commands/native/interaction/commands.index.json +24 -0
  190. package/src/commands/native/interaction/domain.json +3 -0
  191. package/src/commands/native/interaction/lottery/get/command.js +61 -0
  192. package/src/commands/native/interaction/lottery/get/query.js +152 -0
  193. package/src/commands/native/interaction/lottery/get/schema.json +1004 -0
  194. package/src/commands/native/interaction/lottery/list/command.js +176 -0
  195. package/src/commands/native/interaction/lottery/list/schema.json +898 -0
  196. package/src/commands/native/item/attribute/list/command.js +122 -0
  197. package/src/commands/native/item/attribute/list/schema.json +727 -0
  198. package/src/commands/native/item/brand/list/command.js +114 -0
  199. package/src/commands/native/item/brand/list/schema.json +725 -0
  200. package/src/commands/native/item/classification/get/command.js +87 -0
  201. package/src/commands/native/item/classification/get/schema.json +596 -0
  202. package/src/commands/native/item/classification/list/command.js +105 -0
  203. package/src/commands/native/item/classification/list/schema.json +676 -0
  204. package/src/commands/native/item/commands.index.json +87 -0
  205. package/src/commands/native/item/domain.json +1 -0
  206. package/src/commands/native/item/group/list/command.js +122 -0
  207. package/src/commands/native/item/group/list/schema.json +809 -0
  208. package/src/commands/native/item/item/get/command.js +122 -0
  209. package/src/commands/native/item/item/get/schema.json +3799 -0
  210. package/src/commands/native/item/item/list/command.js +7 -0
  211. package/src/commands/native/item/item/list/schema.json +1118 -0
  212. package/src/commands/native/item/item/scan/command.js +7 -0
  213. package/src/commands/native/item/item/scan/schema.json +1046 -0
  214. package/src/commands/native/item/item-content/get/command.js +54 -0
  215. package/src/commands/native/item/item-content/get/schema.json +677 -0
  216. package/src/commands/native/item/shared/api.js +31 -0
  217. package/src/commands/native/item/shared/content.js +20 -0
  218. package/src/commands/native/item/shared/diagnostics.js +61 -0
  219. package/src/commands/native/item/shared/h5.js +63 -0
  220. package/src/commands/native/item/shared/identity.js +62 -0
  221. package/src/commands/native/item/shared/normalize.js +49 -0
  222. package/src/commands/native/item/shared/scope.js +22 -0
  223. package/src/commands/native/item/shared/search-command.js +61 -0
  224. package/src/commands/native/item/shared/search-options.js +150 -0
  225. package/src/commands/native/item/shared/search.js +158 -0
  226. package/src/commands/native/member/commands.index.json +60 -0
  227. package/src/commands/native/member/customer-level/get/command.js +122 -0
  228. package/src/commands/native/member/customer-level/get/schema.json +300 -0
  229. package/src/commands/native/member/domain.json +3 -0
  230. package/src/commands/native/member/growth/get/command.js +64 -0
  231. package/src/commands/native/member/growth/get/schema.json +283 -0
  232. package/src/commands/native/member/growth-log/list/command.js +203 -0
  233. package/src/commands/native/member/growth-log/list/schema.json +695 -0
  234. package/src/commands/native/member/level/get/command.js +70 -0
  235. package/src/commands/native/member/level/get/query.js +125 -0
  236. package/src/commands/native/member/level/get/schema.json +339 -0
  237. package/src/commands/native/member/level/list/command.js +50 -0
  238. package/src/commands/native/member/level/list/query.js +109 -0
  239. package/src/commands/native/member/level/list/schema.json +104 -0
  240. package/src/commands/native/member/membership/get/command.js +78 -0
  241. package/src/commands/native/member/membership/get/schema.json +283 -0
  242. package/src/commands/native/order/commands.index.json +33 -0
  243. package/src/commands/native/order/domain.json +3 -0
  244. package/src/commands/native/order/order/get/command.js +155 -0
  245. package/src/commands/native/order/order/get/schema.json +1167 -0
  246. package/src/commands/native/order/order/list/command.js +230 -0
  247. package/src/commands/native/order/order/list/schema.json +1363 -0
  248. package/src/commands/native/order/order/scan/command.js +148 -0
  249. package/src/commands/native/order/order/scan/scan.js +89 -0
  250. package/src/commands/native/order/order/scan/schema.json +1445 -0
  251. package/src/commands/native/order/shared/projection.js +183 -0
  252. package/src/commands/native/order/shared/query.js +84 -0
  253. package/src/commands/native/order/shared/search.js +112 -0
  254. package/src/commands/native/org/commands.index.json +42 -0
  255. package/src/commands/native/org/domain.json +3 -0
  256. package/src/commands/native/org/shared/single-staff.js +115 -0
  257. package/src/commands/native/org/staff/get/command.js +148 -0
  258. package/src/commands/native/org/staff/get/schema.json +114 -0
  259. package/src/commands/native/org/staff-role/get/command.js +45 -0
  260. package/src/commands/native/org/staff-role/get/schema.json +93 -0
  261. package/src/commands/native/org/unit/get/command.js +131 -0
  262. package/src/commands/native/org/unit/get/schema.json +478 -0
  263. package/src/commands/native/org/unit/list/command.js +187 -0
  264. package/src/commands/native/org/unit/list/schema.json +828 -0
  265. package/src/commands/native/points/account/get/command.js +65 -0
  266. package/src/commands/native/points/account/get/schema.json +303 -0
  267. package/src/commands/native/points/commands.index.json +33 -0
  268. package/src/commands/native/points/domain.json +3 -0
  269. package/src/commands/native/points/log/list/command.js +141 -0
  270. package/src/commands/native/points/log/list/schema.json +761 -0
  271. package/src/commands/native/points/rule/list/command.js +82 -0
  272. package/src/commands/native/points/rule/list/schema.json +294 -0
  273. package/src/commands/native/privacy/commands.index.json +15 -0
  274. package/src/commands/native/privacy/domain.json +3 -0
  275. package/src/commands/native/privacy/field/decrypt/command.js +185 -0
  276. package/src/commands/native/privacy/field/decrypt/schema.json +656 -0
  277. package/src/commands/native/privacy/shared/order-source.js +33 -0
  278. package/src/commands/native/stock/commands.index.json +15 -0
  279. package/src/commands/native/stock/domain.json +3 -0
  280. package/src/commands/native/stock/log/list/command.js +207 -0
  281. package/src/commands/native/stock/log/list/schema.json +922 -0
  282. package/src/commands/native/valuecard/card/get/command.js +107 -0
  283. package/src/commands/native/valuecard/card/get/schema.json +683 -0
  284. package/src/commands/native/valuecard/card/list/command.js +136 -0
  285. package/src/commands/native/valuecard/card/list/pagination.js +23 -0
  286. package/src/commands/native/valuecard/card/list/schema.json +780 -0
  287. package/src/commands/native/valuecard/commands.index.json +24 -0
  288. package/src/commands/native/valuecard/domain.json +3 -0
  289. package/src/commands/native/valuecard/shared/projection.js +57 -0
  290. package/src/commands/system/api.js +47 -0
  291. package/src/commands/system/auth.js +118 -0
  292. package/src/commands/system/contracts.js +373 -0
  293. package/src/commands/system/doctor.js +24 -0
  294. package/src/commands/system/install.js +41 -0
  295. package/src/commands/system/printer.js +16 -0
  296. package/src/commands/system/schema.js +162 -0
  297. package/src/commands/system/shop-guidance.js +9 -0
  298. package/src/commands/system/shop.js +237 -0
  299. package/src/commands/system/skills.js +49 -0
  300. package/src/execution/beijing-date-time.js +29 -0
  301. package/src/execution/beijing-time.js +21 -0
  302. package/src/execution/bounded-input.js +42 -0
  303. package/src/execution/command-io.js +137 -0
  304. package/src/execution/command-policy.js +41 -0
  305. package/src/execution/command-schema.js +131 -0
  306. package/src/execution/datetime.js +83 -0
  307. package/src/execution/error-details.js +399 -0
  308. package/src/execution/error-model.js +82 -0
  309. package/src/execution/exact-json.js +80 -0
  310. package/src/execution/list-total.js +10 -0
  311. package/src/execution/money.js +59 -0
  312. package/src/execution/parser-error.js +66 -0
  313. package/src/execution/privacy.js +197 -0
  314. package/src/execution/public-schema.js +52 -0
  315. package/src/execution/query-api.js +101 -0
  316. package/src/execution/range.js +84 -0
  317. package/src/execution/request-state.js +55 -0
  318. package/src/execution/schema-completeness.js +116 -0
  319. package/src/execution/shop-query.js +54 -0
  320. package/src/execution/target-shop-default.js +23 -0
  321. package/src/execution/target-shop.js +49 -0
  322. package/src/identity/context-store.js +54 -0
  323. package/src/identity/context.js +38 -0
  324. package/src/installation/install.js +158 -0
  325. package/src/installation/npm-error.js +93 -0
  326. package/src/installation/skill.js +113 -0
  327. package/src/transport/account-api.js +152 -0
  328. package/src/transport/api.js +199 -0
  329. package/src/transport/shop-app.js +63 -0
@@ -0,0 +1,424 @@
1
+ {
2
+ "schemaVersion": 6,
3
+ "businessCommandCount": 59,
4
+ "domains": [
5
+ {
6
+ "name": "access",
7
+ "description": "访问控制:店铺角色定义与员工权限点",
8
+ "skill": "zan-saas-access",
9
+ "fingerprint": "a34377ac7c8fa698b9c9eee4479c987a40d44a9a554fd68e9b5af7fc293e07b5",
10
+ "indexFile": "access/commands.index.json",
11
+ "commandCount": 2,
12
+ "indexSize": 652,
13
+ "indexSha256": "77d7b2ec53cfff2a40f6dee4adb5501f12cf9681a09e7e759c78570feff46546"
14
+ },
15
+ {
16
+ "name": "aftersale",
17
+ "description": "售后:售后单查询、预算内扫描与退款资金记录",
18
+ "skill": "zan-saas-aftersale",
19
+ "fingerprint": "dd9d215f105f60f35aac2c78d072f1732894101d2429601df8fa5deed30f3cb8",
20
+ "indexFile": "aftersale/commands.index.json",
21
+ "commandCount": 4,
22
+ "indexSize": 1236,
23
+ "indexSha256": "0ff273295e45ce53833b9382d2612dd6f2801978272dd0353265f1f71ddc3608"
24
+ },
25
+ {
26
+ "name": "benefit",
27
+ "description": "权益:权益卡定义、客户持卡与发放记录",
28
+ "skill": "zan-saas-benefit",
29
+ "fingerprint": "7ccd52ed991db860337bf90aac001804e9ba805d50d41f022f3809f55bef7dc3",
30
+ "indexFile": "benefit/commands.index.json",
31
+ "commandCount": 5,
32
+ "indexSize": 1584,
33
+ "indexSha256": "fef946b05d691ffdc0e016c4def2c922d29b8f8000e199a4a1a39e80f6c5c50c"
34
+ },
35
+ {
36
+ "name": "coupon",
37
+ "description": "优惠券:券发行活动与客户持券",
38
+ "skill": "zan-saas-coupon",
39
+ "fingerprint": "6848902d6529916e6867c995b59309d76756ea5055838f92c666ecaa0d1b3b0e",
40
+ "indexFile": "coupon/commands.index.json",
41
+ "commandCount": 4,
42
+ "indexSize": 1227,
43
+ "indexSha256": "9d6b67b9f818036e9f225b4cac0ff582792f76cb6cb89dbb1fe61124cdde93af"
44
+ },
45
+ {
46
+ "name": "customer",
47
+ "description": "客户:档案、行为、标签与分群",
48
+ "skill": "zan-saas-customer",
49
+ "fingerprint": "b54a41598d6147f32c235f4921cca8848d288a6b5d16b23fc0cbb50619eb0f57",
50
+ "indexFile": "customer/commands.index.json",
51
+ "commandCount": 10,
52
+ "indexSize": 3042,
53
+ "indexSha256": "f978a5016e0f30f32b4808d05f258992e1e162cff4c5448bd85672dc266a97b0"
54
+ },
55
+ {
56
+ "name": "fulfillment",
57
+ "description": "履约:发货单、配送单与物流轨迹",
58
+ "skill": "zan-saas-fulfillment",
59
+ "fingerprint": "92a78c0f2d74134012c228b3b1bd1441e74e44ccadc8bd0ba43662771d748fec",
60
+ "indexFile": "fulfillment/commands.index.json",
61
+ "commandCount": 3,
62
+ "indexSize": 975,
63
+ "indexSha256": "4fe241dd15fd01b92ba265dcccd1758a3f22c38667eb8ef4a77166e09b6ae823"
64
+ },
65
+ {
66
+ "name": "interaction",
67
+ "description": "互动营销:抽奖活动配置与活动查询",
68
+ "skill": "zan-saas-interaction",
69
+ "fingerprint": "b05b98819bbf63f422b30068deb2076e3bd2658ddf029bbd1e894f2179d8ee80",
70
+ "indexFile": "interaction/commands.index.json",
71
+ "commandCount": 2,
72
+ "indexSize": 674,
73
+ "indexSha256": "ddda0886aacb419476ac1a8c67e3c9f2c214b4225cbdcab8fb06dfd2a77694b3"
74
+ },
75
+ {
76
+ "name": "item",
77
+ "description": "商品:商品资料、规格与关联内容",
78
+ "skill": "zan-saas-item",
79
+ "fingerprint": "72124a32760747e2a9fd83d30109c9c514bdbd966f8d21decb449cda6ecdc244",
80
+ "indexFile": "item/commands.index.json",
81
+ "commandCount": 9,
82
+ "indexSize": 2639,
83
+ "indexSha256": "e4658bc4e8654dd582225d97f0401c41d7e40e5e3e770c8ba974dda59eea0d2a"
84
+ },
85
+ {
86
+ "name": "member",
87
+ "description": "会员:身份、等级、成长值与变更记录",
88
+ "skill": "zan-saas-member",
89
+ "fingerprint": "46e8866f9bbc01f144c78ffa077316970cdfb3eee5d9c4963780aa4e38adf8b5",
90
+ "indexFile": "member/commands.index.json",
91
+ "commandCount": 6,
92
+ "indexSize": 1811,
93
+ "indexSha256": "62618e138aa9ef06743cfc9b3c1a08fd40883d7ebf8bc058e880f1b8a4a1bb65"
94
+ },
95
+ {
96
+ "name": "order",
97
+ "description": "订单:交易订单、商品行与售后履约摘要",
98
+ "skill": "zan-saas-order",
99
+ "fingerprint": "ac980f08cb7f222d01d66b19562909115cf024ebd27e63b84d972006ac2f2c08",
100
+ "indexFile": "order/commands.index.json",
101
+ "commandCount": 3,
102
+ "indexSize": 918,
103
+ "indexSha256": "5b45860fd19977de29cb2d93772b0b3a0f3c9a52029b9bdd88191a9a39f9f3b5"
104
+ },
105
+ {
106
+ "name": "org",
107
+ "description": "组织:组织资料、员工与角色关联",
108
+ "skill": "zan-saas-org",
109
+ "fingerprint": "e2584b58e4c8ed6b2c080096e7e0fe1ba9c7f5297a1854d49f939749eef848c6",
110
+ "indexFile": "org/commands.index.json",
111
+ "commandCount": 4,
112
+ "indexSize": 1185,
113
+ "indexSha256": "553820c277b0965b1a4e9d485290588e5939ca5a4b7986ea66501ceb5197f17f"
114
+ },
115
+ {
116
+ "name": "points",
117
+ "description": "积分:客户积分、积分流水与规则",
118
+ "skill": "zan-saas-points",
119
+ "fingerprint": "9f3918d33f760cbf5e919b79dc41b7e0b9af7dfd5412244520ddeb2e308345b2",
120
+ "indexFile": "points/commands.index.json",
121
+ "commandCount": 3,
122
+ "indexSize": 923,
123
+ "indexSha256": "767827af5d38457a503c4319e4638b231e85b3dafda6e5a55b4e87beb4c30a82"
124
+ },
125
+ {
126
+ "name": "privacy",
127
+ "description": "隐私数据:订单字段受控解密,仅支持离线预览",
128
+ "skill": "zan-saas-privacy",
129
+ "fingerprint": "d9039cfc744e411ebc4d21a38ef8eb385effe76a1132aced2bc1ee7c4d50fbf8",
130
+ "indexFile": "privacy/commands.index.json",
131
+ "commandCount": 1,
132
+ "indexSize": 371,
133
+ "indexSha256": "702a6e587605b5c4e2862185fb7f611f21fee0418dd6bfb88c7d560ec99c7800"
134
+ },
135
+ {
136
+ "name": "stock",
137
+ "description": "库存:库存变化记录",
138
+ "skill": "zan-saas-stock",
139
+ "fingerprint": "a42f6e312e7d13d54a8976f034b54c16f7aedf4816e3868ea72b9995a0c98b84",
140
+ "indexFile": "stock/commands.index.json",
141
+ "commandCount": 1,
142
+ "indexSize": 352,
143
+ "indexSha256": "a8f99f851b5a2d4b8be2c0237433e59f81083f93c9dbb832c8c14efeacc9a5e5"
144
+ },
145
+ {
146
+ "name": "valuecard",
147
+ "description": "储值卡:余额卡与礼品卡的资产和余额",
148
+ "skill": "zan-saas-valuecard",
149
+ "fingerprint": "3bc44b028d62afbce49cb0c9d8e08bbbcf8555e66c344909898ed3f6ac68551c",
150
+ "indexFile": "valuecard/commands.index.json",
151
+ "commandCount": 2,
152
+ "indexSize": 652,
153
+ "indexSha256": "4f6bf3ad368eec7bd5f7bbcc160c848fb0bece49be8e9fa108e80eb52657005a"
154
+ }
155
+ ],
156
+ "skills": [
157
+ {
158
+ "name": "zan-saas",
159
+ "type": "entry",
160
+ "description": "有赞 SaaS 产品的命令行工具入口。用户需要查询有赞店铺的商品、订单、客户、会员、营销、库存等业务数据,或执行当前版本支持的店铺操作时使用。具体能力与适用范围以当前安装版指引为准。",
161
+ "dependsOn": [
162
+ "zan-saas-shared"
163
+ ],
164
+ "files": [
165
+ "SKILL.md",
166
+ "references/host-entry.md"
167
+ ],
168
+ "fingerprint": "6fd2bb9b078420651fc470a57b64a7a64e16e565ee5ca5f29445348a5a342031"
169
+ },
170
+ {
171
+ "name": "zan-saas-shared",
172
+ "type": "shared",
173
+ "description": "zan-saas 跨领域公共使用规则。首次调用或 CLI 版本变化时读取,核对目标范围、当前认证边界、输出与结果判断;不定义领域参数或新增权限。",
174
+ "dependsOn": [],
175
+ "files": [
176
+ "SKILL.md",
177
+ "references/authentication.md",
178
+ "references/value-processing.md"
179
+ ],
180
+ "fingerprint": "5e4b2681b29e7e383fe0a39ca91327f7b9f00cded29c8f4da30eef8daca9dab0"
181
+ },
182
+ {
183
+ "name": "zan-saas-access",
184
+ "type": "domain",
185
+ "domain": "access",
186
+ "description": "访问控制:店铺角色定义与员工权限点",
187
+ "dependsOn": [
188
+ "zan-saas-shared"
189
+ ],
190
+ "files": [
191
+ "SKILL.md",
192
+ "references/role-list.md",
193
+ "references/staff-perms-get.md"
194
+ ],
195
+ "fingerprint": "03ce49f2cd786176282a75f7becdedcc318d3fd52c07b9477aaadf87b24f79d7"
196
+ },
197
+ {
198
+ "name": "zan-saas-aftersale",
199
+ "type": "domain",
200
+ "domain": "aftersale",
201
+ "description": "售后:售后单查询、预算内扫描与退款资金记录",
202
+ "dependsOn": [
203
+ "zan-saas-shared"
204
+ ],
205
+ "files": [
206
+ "SKILL.md",
207
+ "references/case-list.md",
208
+ "references/case-scan.md"
209
+ ],
210
+ "fingerprint": "a744dee062d9491c8fec107fc579a96dfc86636e41946d6e654ede84be1912d9"
211
+ },
212
+ {
213
+ "name": "zan-saas-benefit",
214
+ "type": "domain",
215
+ "domain": "benefit",
216
+ "description": "权益:权益卡定义、客户持卡与发放记录",
217
+ "dependsOn": [
218
+ "zan-saas-shared"
219
+ ],
220
+ "files": [
221
+ "SKILL.md",
222
+ "references/card-get.md",
223
+ "references/card-grant-list.md",
224
+ "references/card-list.md",
225
+ "references/customer-card-get.md",
226
+ "references/customer-card-list.md"
227
+ ],
228
+ "fingerprint": "8b3f87ae0cfb9129609b7bfe51512e426a6bbb613f545be8f1739c77751354c4"
229
+ },
230
+ {
231
+ "name": "zan-saas-coupon",
232
+ "type": "domain",
233
+ "domain": "coupon",
234
+ "description": "优惠券:券发行活动与客户持券",
235
+ "dependsOn": [
236
+ "zan-saas-shared"
237
+ ],
238
+ "files": [
239
+ "SKILL.md",
240
+ "references/activity-get.md",
241
+ "references/activity-list.md",
242
+ "references/voucher-get.md",
243
+ "references/voucher-list.md"
244
+ ],
245
+ "fingerprint": "658fbc89b2584f6bad72083964dad7c9096ab96a566e0eb025d17d644d2a3394"
246
+ },
247
+ {
248
+ "name": "zan-saas-customer",
249
+ "type": "domain",
250
+ "domain": "customer",
251
+ "description": "客户:档案、行为、标签与分群",
252
+ "dependsOn": [
253
+ "zan-saas-shared"
254
+ ],
255
+ "files": [
256
+ "SKILL.md",
257
+ "references/customer-scan.md",
258
+ "references/segment-list.md"
259
+ ],
260
+ "fingerprint": "8470178213e99997ec15b3fae5612e74c273e31931bf222ccc840ecd013ae10e"
261
+ },
262
+ {
263
+ "name": "zan-saas-fulfillment",
264
+ "type": "domain",
265
+ "domain": "fulfillment",
266
+ "description": "履约:发货单、配送单与物流轨迹",
267
+ "dependsOn": [
268
+ "zan-saas-shared"
269
+ ],
270
+ "files": [
271
+ "SKILL.md",
272
+ "references/delivery-get.md",
273
+ "references/shipment-list.md",
274
+ "references/waybill-get.md"
275
+ ],
276
+ "fingerprint": "acacdc1f7ee20d08f3f52f16f1b2cabe467361eab613353ce4d3f43b470b04f9"
277
+ },
278
+ {
279
+ "name": "zan-saas-interaction",
280
+ "type": "domain",
281
+ "domain": "interaction",
282
+ "description": "互动营销:抽奖活动配置与活动查询",
283
+ "dependsOn": [
284
+ "zan-saas-shared"
285
+ ],
286
+ "files": [
287
+ "SKILL.md",
288
+ "references/lottery-get.md",
289
+ "references/lottery-list.md"
290
+ ],
291
+ "fingerprint": "ddd171469bc816dc134b257cccc780be1aeea215620c29781efb9de3b4991771"
292
+ },
293
+ {
294
+ "name": "zan-saas-item",
295
+ "type": "domain",
296
+ "domain": "item",
297
+ "description": "商品:商品资料、规格与关联内容",
298
+ "dependsOn": [
299
+ "zan-saas-shared"
300
+ ],
301
+ "files": [
302
+ "SKILL.md",
303
+ "references/attribute-list.md",
304
+ "references/brand-list.md",
305
+ "references/classification-get.md",
306
+ "references/classification-list.md",
307
+ "references/group-list.md",
308
+ "references/item-content.md",
309
+ "references/item-get.md",
310
+ "references/item-search.md",
311
+ "references/product-identity.md"
312
+ ],
313
+ "fingerprint": "3968b6d1a695a795c55646bad4f78bbc93578ff654d3375a83c06649a0e1fb57"
314
+ },
315
+ {
316
+ "name": "zan-saas-member",
317
+ "type": "domain",
318
+ "domain": "member",
319
+ "description": "会员:身份、等级、成长值与变更记录",
320
+ "dependsOn": [
321
+ "zan-saas-shared"
322
+ ],
323
+ "files": [
324
+ "SKILL.md",
325
+ "references/customer-level-get.md",
326
+ "references/growth-log-list.md",
327
+ "references/membership-get.md"
328
+ ],
329
+ "fingerprint": "000a2b334e2ada6f1b8046dded4be151fe0d0464053be5215d888a40f3b77830"
330
+ },
331
+ {
332
+ "name": "zan-saas-order",
333
+ "type": "domain",
334
+ "domain": "order",
335
+ "description": "订单:交易订单、商品行与售后履约摘要",
336
+ "dependsOn": [
337
+ "zan-saas-shared"
338
+ ],
339
+ "files": [
340
+ "SKILL.md",
341
+ "references/order-get.md",
342
+ "references/order-list.md",
343
+ "references/order-scan.md"
344
+ ],
345
+ "fingerprint": "5dc09b5addec07dfb12878d8047c53a8aee14dd0aaa6ad91f712d1b5b8f0829c"
346
+ },
347
+ {
348
+ "name": "zan-saas-org",
349
+ "type": "domain",
350
+ "domain": "org",
351
+ "description": "组织:组织资料、员工与角色关联",
352
+ "dependsOn": [
353
+ "zan-saas-shared"
354
+ ],
355
+ "files": [
356
+ "SKILL.md",
357
+ "references/staff-get.md",
358
+ "references/staff-role-get.md",
359
+ "references/unit-get.md",
360
+ "references/unit-list.md"
361
+ ],
362
+ "fingerprint": "1ba9227cd426f9770a57c87fa335e5cac87f4c0e8d7d65f62437ab3bcbf1fa47"
363
+ },
364
+ {
365
+ "name": "zan-saas-points",
366
+ "type": "domain",
367
+ "domain": "points",
368
+ "description": "积分:客户积分、积分流水与规则",
369
+ "dependsOn": [
370
+ "zan-saas-shared"
371
+ ],
372
+ "files": [
373
+ "SKILL.md",
374
+ "references/account-get.md",
375
+ "references/log-list.md",
376
+ "references/rule-list.md"
377
+ ],
378
+ "fingerprint": "18e7a0569e2e2e5395f9e05fbdfd2fb46f99824f159cacd573698414d937240e"
379
+ },
380
+ {
381
+ "name": "zan-saas-privacy",
382
+ "type": "domain",
383
+ "domain": "privacy",
384
+ "description": "隐私数据:订单字段受控解密,仅支持离线预览",
385
+ "dependsOn": [
386
+ "zan-saas-shared"
387
+ ],
388
+ "files": [
389
+ "SKILL.md",
390
+ "references/field-decrypt.md"
391
+ ],
392
+ "fingerprint": "ac528338858b0a0d712cfc19d4c3c8dc5f89e415737b5d21092b5a0d23d3a2be"
393
+ },
394
+ {
395
+ "name": "zan-saas-stock",
396
+ "type": "domain",
397
+ "domain": "stock",
398
+ "description": "库存:库存变化记录",
399
+ "dependsOn": [
400
+ "zan-saas-shared"
401
+ ],
402
+ "files": [
403
+ "SKILL.md",
404
+ "references/log-list.md"
405
+ ],
406
+ "fingerprint": "f0262021156a20bc0b4197e62e0ce737e81a3465fe86e91f70fba3377e08c1df"
407
+ },
408
+ {
409
+ "name": "zan-saas-valuecard",
410
+ "type": "domain",
411
+ "domain": "valuecard",
412
+ "description": "储值卡:余额卡与礼品卡的资产和余额",
413
+ "dependsOn": [
414
+ "zan-saas-shared"
415
+ ],
416
+ "files": [
417
+ "SKILL.md",
418
+ "references/card-get.md",
419
+ "references/card-list.md"
420
+ ],
421
+ "fingerprint": "8f170112f98379f817379bb2110bc3154a8651d8ea1e3e061ba4e0156b118152"
422
+ }
423
+ ]
424
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@youzan-cloud/zan-saas-cli",
3
+ "version": "0.1.0-beta.4",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@youzan-cloud/zan-saas-cli",
9
+ "version": "0.1.0-beta.4",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "ajv": "8.20.0",
13
+ "commander": "12.1.0"
14
+ },
15
+ "bin": {
16
+ "zan-saas": "./bin/zan-saas-cli.js"
17
+ },
18
+ "engines": {
19
+ "node": ">=18",
20
+ "npm": ">=8 <12"
21
+ }
22
+ },
23
+ "node_modules/ajv": {
24
+ "version": "8.20.0",
25
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
26
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "fast-deep-equal": "^3.1.3",
30
+ "fast-uri": "^3.0.1",
31
+ "json-schema-traverse": "^1.0.0",
32
+ "require-from-string": "^2.0.2"
33
+ },
34
+ "funding": {
35
+ "type": "github",
36
+ "url": "https://github.com/sponsors/epoberezkin"
37
+ }
38
+ },
39
+ "node_modules/commander": {
40
+ "version": "12.1.0",
41
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
42
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
43
+ "license": "MIT",
44
+ "engines": {
45
+ "node": ">=18"
46
+ }
47
+ },
48
+ "node_modules/fast-deep-equal": {
49
+ "version": "3.1.3",
50
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
51
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
52
+ "license": "MIT"
53
+ },
54
+ "node_modules/fast-uri": {
55
+ "version": "3.1.9",
56
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
57
+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
58
+ "funding": [
59
+ {
60
+ "type": "github",
61
+ "url": "https://github.com/sponsors/fastify"
62
+ },
63
+ {
64
+ "type": "opencollective",
65
+ "url": "https://opencollective.com/fastify"
66
+ }
67
+ ],
68
+ "license": "BSD-3-Clause"
69
+ },
70
+ "node_modules/json-schema-traverse": {
71
+ "version": "1.0.0",
72
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
73
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
74
+ "license": "MIT"
75
+ },
76
+ "node_modules/require-from-string": {
77
+ "version": "2.0.2",
78
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
79
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
80
+ "license": "MIT",
81
+ "engines": {
82
+ "node": ">=0.10.0"
83
+ }
84
+ }
85
+ }
86
+ }
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@youzan-cloud/zan-saas-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-beta.4",
4
+ "description": "Youzan SaaS CLI preview",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": ">=18",
8
+ "npm": ">=8 <12"
9
+ },
10
+ "bin": {
11
+ "zan-saas": "./bin/zan-saas-cli.js"
12
+ },
13
+ "files": [
14
+ "bin/",
15
+ "src/",
16
+ "internal/registry/",
17
+ "skills/",
18
+ "LICENSE",
19
+ "NOTICE",
20
+ "THIRD_PARTY_NOTICES.txt",
21
+ "DEPENDENCIES.json",
22
+ "npm-shrinkwrap.json",
23
+ "INSTALL.md",
24
+ "README.md"
25
+ ],
26
+ "publishConfig": {
27
+ "registry": "https://registry.npmjs.org/",
28
+ "access": "public",
29
+ "tag": "latest"
30
+ },
31
+ "dependencies": {
32
+ "ajv": "8.20.0",
33
+ "commander": "12.1.0"
34
+ }
35
+ }
@@ -0,0 +1,30 @@
1
+ # 对外发布的 Skill
2
+
3
+ 随包提供入口 [zan-saas](zan-saas/SKILL.md)、[公共规则](zan-saas-shared/SKILL.md) 和以下领域指引。以 `zan-saas skills list` 发现当前安装版,领域登记不表示已经提供该域的全部操作。
4
+
5
+ | 领域 | 可选择的用户目标与关键边界 |
6
+ | --- | --- |
7
+ | [组织 org](zan-saas-org/SKILL.md) | 当前组织、总部下级组织、单店员工与员工角色关联;角色目录和权限点转交访问控制域。 |
8
+ | [访问控制 access](zan-saas-access/SKILL.md) | 店铺角色定义目录与当前单店员工权限点;目录、授角和权限分别判断。 |
9
+ | [客户 customer](zan-saas-customer/SKILL.md) | 客户档案、标签定义、标签组与客户标签关系;客户不等于会员。 |
10
+ | [会员 member](zan-saas-member/SKILL.md) | 会员身份、实际等级、等级定义与成长值;不从其中一个事实推算另一个。 |
11
+ | [积分 points](zan-saas-points/SKILL.md) | 当前积分、历史变动与奖励规则;流水余额不代替当前账户。 |
12
+ | [权益 benefit](zan-saas-benefit/SKILL.md) | 权益卡定义、客户持卡与历史发放记录;历史发放不证明当前可用。 |
13
+ | [优惠券 coupon](zan-saas-coupon/SKILL.md) | 券发行活动与客户持券的列表、详情;活动状态不证明订单可用。 |
14
+ | [储值卡 valuecard](zan-saas-valuecard/SKILL.md) | 余额卡、礼品卡的单卡或客户持卡查询;单卡余额不是客户资产汇总。 |
15
+ | [商品 item](zan-saas-item/SKILL.md) | 商品资料、SKU、图文及相关目录;商品配置不等于库存数量。 |
16
+ | [订单 order](zan-saas-order/SKILL.md) | 单笔订单、单页列表与预算内扫描;配送和物流转交履约域。 |
17
+ | [履约 fulfillment](zan-saas-fulfillment/SKILL.md) | 发货单集合、配送单详情及物流运单轨迹;各对象的标识与状态分别核对。 |
18
+ | [库存 stock](zan-saas-stock/SKILL.md) | 指定商品和时间范围的库存变动日志;不提供当前库存或进销存单据查询。 |
19
+ | [售后 aftersale](zan-saas-aftersale/SKILL.md) | 售后单详情、单页或有界扫描,以及关联退款资金明细;售后状态不证明到账。 |
20
+ | [互动营销 interaction](zan-saas-interaction/SKILL.md) | 抽奖活动列表与详情;活动、参与和实际奖励分别判断。 |
21
+
22
+ 从 `zan-saas skills read zan-saas` 开始,再读取公共规则和当前任务涉及的领域。`skills list` 的 `type` 区分 `entry`、`shared` 和 `domain`。`skills read <名称> [相对 Markdown 路径]` 默认读取正文,只有命中特定分支时再读取正文指向的 reference。
23
+
24
+ 领域指引负责对象、关系、用户目标、跨域转交和停止条件。选定命令后,从同版 help/schema 取得参数、默认值、枚举、返回字段、单位与授权前置;金额计算或时间处理再按 shared 的条件指引读取。Skill 不授予权限,也不能让未注册命令可执行。
25
+
26
+ 当前领域命令均为只读原子操作,内部可以调用多个 API。Agent/宿主负责理解需求、组合命令和解释结果;复合任务入口的含义与当前范围见入口指引。需要未提供的查询或写入时说明缺口,不自动转成 Raw API。
27
+
28
+ 首次准备员工登录时查看 `zan-saas auth login --help`,本地凭证状态使用 `zan-saas auth status`。凭证与目标店铺、上下文及业务权限仍须分别核对。
29
+
30
+ 需要将轻量入口接入 Agent 宿主时,读取 `zan-saas skills read zan-saas references/host-entry.md`。宿主和作用范围由用户选择,CLI 安装不自动改写宿主或全局指令。
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: zan-saas
3
+ description: 有赞 SaaS 产品的命令行工具入口。用户需要查询有赞店铺的商品、订单、客户、会员、营销、库存等业务数据,或执行当前版本支持的店铺操作时使用。具体能力与适用范围以当前安装版指引为准。
4
+ ---
5
+
6
+ # 有赞 SaaS CLI 入口
7
+
8
+ ## 人机交接
9
+
10
+ Agent 负责运行命令、定位对象和解释结果。用户只需完成浏览器授权,并在目标店铺不明确时补充选择。
11
+
12
+ 需要登录时,Agent 运行 `zan-saas auth login` 并把输出的授权地址交给用户;用户在浏览器确认授权,Agent 等待命令成功,再运行 `zan-saas auth status`。浏览器显示授权完成但命令失败时,按错误核查并停止,不将已有凭证状态当作本次登录成功。用户取消或授权超时后,需要继续时重新运行登录。
13
+
14
+ 先运行 `zan-saas shop current` 查看当前店铺。已有有效上下文且用户没有要求切店时继续使用,不重复询问。用户明确指定店名时,Agent 用 `zan-saas shop list` 查找可选店铺。核对相关候选和分页后,只有店名唯一匹配时才用结果中的 `kdtId` 执行 `zan-saas shop use <kdtId>`。同名或含义不明确时,展示店名和类型让用户区分,不从名称片段推定目标。
15
+
16
+ 没有上下文且用户没有指定店铺时,展示候选店名供选择。即使只有一个候选,也简短询问“使用某某店吗?”。用户可以按店名或本次展示的序号回答,Agent 保留候选与 ID 的对应关系,无需用户理解或输入 `kdtId`。不默认选第一家,也不把未查完的一页当成全部候选。
17
+
18
+ 店铺列表的 `total` 是员工停用过滤前的匹配总数,未知时为 `null`。`nextPageNo` 非空时,保留名称、业务线、容量及 `--all` 等选项,用 `--page-no` 继续;`hasMore=null` 表示是否还有后续未知。不要因本页候选少或为空就认定查完;`windowLimitReached=true` 时停止翻页,缩小筛选,不宣称已查全。
19
+
20
+ 选店后用 `zan-saas shop current` 核对实际生效的店铺和来源。切店无需重新登录,浏览器中的店铺选择不改变 CLI 上下文。账号接口路由或 OAuth 地址错误时,按共享指引的[认证排查](../zan-saas-shared/references/authentication.md)核查版本、配置和服务端路由,停止后续请求。`whoami`、`shop current`、`help`、`schema`、`--dry-run`、业务请求和错误判断由 Agent 完成。
21
+
22
+ ## 选择当前能力
23
+
24
+ 首次使用或 CLI 版本变化时,先读取 `zan-saas skills read zan-saas-shared`。公共规则不代替用户本次目标和授权。
25
+
26
+ 1. 运行 `zan-saas skills list`,从 `type: "domain"` 的条目中按用户目标选择领域。`entry` 和 `shared` 是指引类型,不是业务领域。
27
+ 2. 用 `zan-saas skills read <列表中的名称>` 读取所选领域。领域正文说明对象、易混边界、转交和停止条件;命中特定分支时再读取它指向的 reference。
28
+ 3. 选定领域和资源后,用 `zan-saas help item.item.get` 或 `zan-saas help item item get` 这样的叶子路径查看帮助;也可以使用叶子命令的 `--help`。先用 `zan-saas schema <命令路径> --section input` 核对参数和前置,执行前按需读取 `--section output` 理解结果。需要其他部分时读取 `preview`、`error` 或完整契约。`--section` 只用于叶子命令,不能与 `--summary` 同用;路径未知时可用 `zan-saas schema --summary` 或 `zan-saas schema item --summary` 查轻量目录。点号路径作为一个参数,空格路径按词分别传入,不能把含空格的整条命令当成一个参数。
29
+ 4. 核对命令要求的对象、目标店铺及其他必要范围。信息不全或候选含义不同,就询问能区分目标的最小问题。已有只读定位能力时,按其契约使用;缺少定位能力时说明缺口并停止。
30
+
31
+ 已知命令和对象时,可以直接读取相关领域指引和叶子契约。同一任务内无需重复读取未变化的指引,也不必展开所有领域或全量 schema。摘要只用于发现,不替代调用契约。
32
+
33
+ ## 能力与执行边界
34
+
35
+ 当前提供原子查询命令:每条命令完成职责明确的业务读取,内部可以调用多个 API。意图识别、命令组合、分页决策和自然语言回答由 Agent/宿主按同版契约完成。`+任务` 表示 CLI 自身负责定位、选路或步骤核验的复合任务入口;本版尚未发行这类命令。
36
+
37
+ 当前安装版未提供目标命令时,说明未支持的操作并停止。Raw API 需要独立、明确的 API 调用目标,不能用作领域操作缺失后的自动替代。
38
+
39
+ Skill 解释如何选择和使用命令,不授予员工、店铺或业务权限。执行和结果判断遵循共享规则与该命令契约。
40
+
41
+ ## 从一句话到查询结果
42
+
43
+ 例如用户说“查当前店铺最新创建的 10 个商品”:
44
+
45
+ 1. Agent 检查登录状态和 `shop current`;已有有效店铺时沿用,缺登录或目标时按上面的流程补齐。
46
+ 2. 读取商品领域指引,选择 `item item list`,而非遍历全部商品的 `scan`。
47
+ 3. 读取 `help item.item.list`、输入与输出契约,确认按创建时间降序取一页的参数,以及返回金额、时间和分页的含义。
48
+ 4. 当前上下文能提供店铺时省略 `--kdt-id`,执行 `zan-saas item item list --page-size 10 --sorts CREATED_TIME_DESC`。需要本地核对计划时可先加 `--dry-run`,预览不证明真实接口可用。
49
+ 5. 参数错误时按 `issues` 定位问题;只有错误诊断明确允许 `correct_input` 且整次调用完整观测、零请求,才修正输入并构造新调用。不得修改用户的目标或筛选含义;业务请求已发送、状态未知或诊断不足时停止核查,不自动重放。
50
+ 6. 查询成功后,把这页商品整理成用户能读懂的回答,说明本次最多读取 10 条。按分页结果说明是否还有结果或未知,不把一页当成全店商品。
51
+
52
+ ## 接入宿主
53
+
54
+ 需要让外部 Agent 发现本入口时,运行 `zan-saas install`。安装范围、其他宿主及重复安装规则见 `zan-saas skills read zan-saas references/host-entry.md`。
@@ -0,0 +1,25 @@
1
+ # 将入口接入 Agent 宿主
2
+
3
+ 使用 `zan-saas install` 选择 Agent 并安装入口,默认个人范围。非交互安装使用 `zan-saas install --yes --host <宿主>`;仅当前项目使用时追加 `--scope project`。
4
+
5
+ 安装器从同包模板生成轻量入口,记录持久 CLI 的 Node.js 与启动位置,供桌面宿主按需读取指引。普通 npm 安装不自动改写宿主配置。其他宿主可以指定 `--directory <Skill目录>`,也可手动保存下面模板。
6
+
7
+ ```markdown
8
+ ---
9
+ name: zan-saas
10
+ description: 有赞 SaaS 产品的命令行工具入口。用户需要查询有赞店铺的商品、订单、客户、会员、营销、库存等业务数据,或执行当前版本支持的店铺操作时使用。具体能力与适用范围以当前安装版指引为准。
11
+ ---
12
+
13
+ # 有赞 SaaS CLI
14
+
15
+ 开始时运行 `zan-saas --version` 和 `zan-saas skills read zan-saas`。
16
+ 使用 CLI 返回的同版正文,再按其中的共享规则与领域指引继续。
17
+
18
+ 如果命令不可用、入口读取失败或版本兼容性无法确认,说明缺口并停止。
19
+ ```
20
+
21
+ 宿主负责把用户需求交给 Agent,并提供运行本机 CLI、展示授权地址及返回结果的能力。入口 Skill 负责指向当前安装版,领域选路、参数校验和输出解释规则由 CLI 同包指引与契约提供。
22
+
23
+ 宿主侧只保存这个轻量入口,不复制整份领域知识。CLI 升级后重新读取同版指引;宿主不支持按需读取时,需要显式安装匹配版本的静态副本。
24
+
25
+ 重复安装只更新本项目管理且未被手工修改的入口;同名其他 Skill 保留并报错。安装不执行登录、选店或业务请求。完成后在宿主技能列表确认 `zan-saas` 已启用,再打开新会话。