@tencent-ai/workbuddy-cloud-sdk 0.1.0-dev.dee063d.202608201621 → 0.1.1-dev.111acaf.202609102031

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.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # WorkBuddy Cloud SDK
2
+
3
+ 通过 WorkBuddy 云服务的 `publicConfig` 访问 Auth、Database、Storage 和 LLM。
4
+
5
+ ## 微信小程序
6
+
7
+ 在小程序项目的 `package.json` 所在目录安装依赖:
8
+
9
+ ```sh
10
+ npm install @tencent-ai/workbuddy-cloud-sdk@dev
11
+ ```
12
+
13
+ 然后在微信开发者工具中执行「工具 → 构建 npm」,确认生成
14
+ `miniprogram_npm/@tencent-ai/workbuddy-cloud-sdk/miniprogram.js`,再点击「编译」。
15
+ 仅写入 `package.json` 不会安装依赖;升级 SDK 后也需要重新构建 npm。
16
+
17
+ ```js
18
+ const { createMiniProgramWorkBuddyCloud } = require('@tencent-ai/workbuddy-cloud-sdk/miniprogram');
19
+
20
+ const cloud = createMiniProgramWorkBuddyCloud({
21
+ endpoint: publicConfig.endpoint,
22
+ publishableKey: publicConfig.publishableKey,
23
+ });
24
+ ```
25
+
26
+ SDK 通过 `package.json#miniprogram` 提供微信专用的 CommonJS `.js` 产物,
27
+ 其中已打包运行时依赖。现有 Web / Node 的根入口和 `/miniprogram` 子入口保持不变。
28
+ WorkBuddy H5 预览会注入 SDK,预览成功不能替代微信项目的安装、构建 npm 验证。