openxiangda-skill-kit 2.3.125 → 2.3.127

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda-skill-kit",
3
- "version": "2.3.125",
3
+ "version": "2.3.127",
4
4
  "description": "OpenXiangda 2.0 中文 AI 技能的校验、分发与安装。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "README.md"
18
18
  ],
19
19
  "dependencies": {
20
- "openxiangda-devkit-core": "2.71.1"
20
+ "openxiangda-devkit-core": "2.71.3"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsx": "4.23.12",
@@ -254,3 +254,28 @@ const publicDetail = await client.getPublic(publicPage.items[0].data.id as strin
254
254
  8. 生产入口为 HTTPS,没有新增公开存储桶或匿名上传白名单。
255
255
 
256
256
  开发与交付时按[检查与验收](testing.md)保留跨浏览器正反证据。
257
+
258
+
259
+ ## 匿名具名查询的有界批量读取
260
+
261
+ 需要多个独立公开查询时,使用官方 `createAnonymousPublicClient({ routeCode }).queryBatch(operations)`。先按正常公开入口完成 `bootstrap()`,使用同一浏览器匿名凭证;每项显式给出 `key`、`policyCode`、`queryCode`,可带原查询的 `parameters`、`limit`、`cursor`。批次固定当前应用、环境和一个已声明route,不接受浏览器传入SQL、字段、排序、角色或授权上下文。
262
+
263
+ ```ts
264
+ const client = createAnonymousPublicClient({ routeCode: 'public-home', policyCode: 'catalogue' });
265
+ await client.bootstrap();
266
+ const batch = await client.queryBatch([
267
+ { key: 'summary', policyCode: 'catalogue', queryCode: 'summary', limit: 1 },
268
+ { key: 'cards', policyCode: 'catalogue', queryCode: 'cards', limit: 9 },
269
+ ]);
270
+ for (const item of batch.items) {
271
+ if (!item.ok) throw new Error(`${item.error.code} (${item.error.status})`);
272
+ if (item.result.kind === 'records') {
273
+ // 记录行使用 record.data;聚合行是直接含指标/维度的对象。
274
+ console.log(item.result.items.map(record => record.data));
275
+ }
276
+ }
277
+ ```
278
+
279
+ 服务端每批最多10项、合计最多500条请求上限、输入最多64KiB,最多3项并发;每项继续执行原不可变策略、固定条件、字段白名单、限流和真实RLS。批量结果按key/策略/查询精确对应,单项403/404/429/503保留为error;不能把整批HTTP成功当作每项成功,也不能把拒绝变成空表/零。SDK对缺失、重复、错位、超量及错误形状的回执明确拒绝,不自动改走普通Data API或逐项重放。
280
+
281
+ 此能力需要正式平台提供 `POST .../anonymous-public/public/query-batch`;旧平台的404应明确报告并先升级平台。批次是独立只读查询组合,不是同一数据库快照,不承载写入或通知。原单查询API继续可用,`AnonymousPublicQueryResult`、`AnonymousPublicQueryBatchOperation`、`AnonymousPublicQueryBatchResult`等类型从`openxiangda/react`导出。