@heybox/hb-sdk-protocol 0.9.1-alpha.3 → 0.9.1-alpha.5

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "hash": "6a5978e344f22fd060ff55f77a1248a7c161cd8fbf5be2b8c73eddd308e8fe78",
2
+ "hash": "afb4d36de51cde7bb0932ac0f3d391440925845a68707c57a5a47487287698e1",
3
3
  "permissions": [
4
4
  {
5
5
  "key": "userInfo",
@@ -168,6 +168,51 @@
168
168
  "conditions": [
169
169
  "声明后仍需平台批准,并继续执行可信用户手势、Host 能力和当前版本 Manifest 校验。"
170
170
  ]
171
+ },
172
+ {
173
+ "key": "cloud_storage",
174
+ "name": "云端存储",
175
+ "description": "读写按小程序和当前登录用户隔离的云端键值数据。",
176
+ "access": "declaration",
177
+ "risk": "medium",
178
+ "config": {},
179
+ "methods": [
180
+ "cloud.storage.getItem",
181
+ "cloud.storage.setItem",
182
+ "cloud.storage.removeItem",
183
+ "cloud.storage.getKeys"
184
+ ],
185
+ "conditions": [
186
+ "云端存储按登录用户隔离并受容量配额限制。"
187
+ ]
188
+ },
189
+ {
190
+ "key": "appProtocol",
191
+ "name": "应用协议执行",
192
+ "description": "执行任意小黑盒客户端协议。",
193
+ "access": "platform-approval",
194
+ "risk": "high",
195
+ "config": {},
196
+ "methods": [
197
+ "device.executeProtocol"
198
+ ],
199
+ "conditions": [
200
+ "最高危险权限:批准后该入口可执行任意协议,并绕过其他 SDK 能力权限及专用授权流程。"
201
+ ]
202
+ },
203
+ {
204
+ "key": "workspaceCards",
205
+ "name": "工作区卡片",
206
+ "description": "在已绑定游戏的桌面工作区展示受审核卡片。",
207
+ "access": "platform-approval",
208
+ "risk": "high",
209
+ "config": {},
210
+ "methods": [
211
+ "workspaceCards.requestRefresh"
212
+ ],
213
+ "conditions": [
214
+ "需平台批准、Host 支持与有效执行租约;不隐式授予网络或存储权限。"
215
+ ]
171
216
  }
172
217
  ],
173
218
  "noDeclarationMethods": [
package/package.json CHANGED
@@ -1,22 +1,28 @@
1
1
  {
2
2
  "name": "@heybox/hb-sdk-protocol",
3
- "version": "0.9.1-alpha.3",
3
+ "version": "0.9.1-alpha.5",
4
4
  "description": "Heybox mini-program iframe bridge wire contracts.",
5
5
  "sideEffects": false,
6
6
  "exports": {
7
7
  ".": {
8
- "heybox": "./src/index.ts",
8
+ "heybox": "./dist/index.esm.js",
9
9
  "types": "./types/index.d.ts",
10
10
  "import": "./dist/index.esm.js",
11
11
  "require": "./dist/index.cjs.js",
12
12
  "default": "./dist/index.esm.js"
13
+ },
14
+ "./card-actions": {
15
+ "heybox": "./dist/card-actions.esm.js",
16
+ "types": "./types/workspace-card-actions.d.ts",
17
+ "import": "./dist/card-actions.esm.js",
18
+ "require": "./dist/card-actions.cjs.js",
19
+ "default": "./dist/card-actions.esm.js"
13
20
  }
14
21
  },
15
22
  "files": [
16
23
  "dist",
17
24
  "generated",
18
25
  "types",
19
- "src",
20
26
  "README.md"
21
27
  ],
22
28
  "license": "ISC",
@@ -28,6 +34,9 @@
28
34
  "rollup": "^4.52.4",
29
35
  "typescript": "^5.9.3",
30
36
  "vitest": "^3.2.4",
37
+ "@ai-desktop/view-contract": "file:vendor/view-contract-2.2.2-6ac49bbf6410.tgz",
38
+ "rollup-plugin-dts": "6.4.0",
39
+ "@rollup/plugin-node-resolve": "^16.0.1",
31
40
  "@heybox/hb-types": "~1.0.2"
32
41
  },
33
42
  "publishConfig": {
@@ -38,7 +47,7 @@
38
47
  "prebuild:package": "pnpm run check:native-host-contract",
39
48
  "build:package": "pnpm run clean && pnpm run build:lib && pnpm run build:types",
40
49
  "build:lib": "rollup -c rollup.config.ts --configPlugin 'typescript={\"tsconfig\":\"tsconfig.build.json\"}'",
41
- "build:types": "tsc -p tsconfig.dts.json",
50
+ "build:types": "tsc -p tsconfig.dts.json && node scripts/bundle-declarations.mjs",
42
51
  "test:types": "tsc -p tsconfig.dts.json --noEmit --pretty false",
43
52
  "clean": "rimraf ./dist && rimraf ./types",
44
53
  "check:boundary": "node scripts/check-boundary.cjs",
@@ -47,7 +56,9 @@
47
56
  "gen:permission-catalog": "pnpm run build:lib && node scripts/generate-permission-catalog.mjs",
48
57
  "check:permission-catalog": "pnpm run build:lib && node scripts/generate-permission-catalog.mjs --check",
49
58
  "pretest:unit": "pnpm run check:native-host-contract && pnpm run build:types",
50
- "test:unit": "NODE_OPTIONS='--conditions=heybox' vitest run",
51
- "test:watch": "NODE_OPTIONS='--conditions=heybox' vitest"
59
+ "test:unit": "NODE_OPTIONS='--conditions=heybox' vitest run __tests__ && node --test scripts/check-bundled-contract.test.mjs",
60
+ "test:watch": "NODE_OPTIONS='--conditions=heybox' vitest __tests__",
61
+ "check:bundled-contract": "node scripts/check-bundled-contract.mjs",
62
+ "postbuild:package": "node scripts/check-bundled-contract.mjs"
52
63
  }
53
64
  }