@heybox/hb-sdk 0.8.1-alpha.6 → 0.8.1-alpha.8

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 (35) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/README.md +3 -3
  3. package/dist/cli-chunks/{build-B0X9pazW.cjs → build-BYWPo2MY.cjs} +4 -4
  4. package/dist/cli-chunks/{context-DVfWZ6d1.cjs → context-B4tBsR6l.cjs} +11 -2
  5. package/dist/cli-chunks/{create-CyQWVxCA.cjs → create-Dct-INxs.cjs} +1 -1
  6. package/dist/cli-chunks/{dev-DP7WtQOo.cjs → dev-6N5ruKiC.cjs} +172 -49
  7. package/dist/cli-chunks/{doctor-D6l-ONq-.cjs → doctor-9HtdddBL.cjs} +1 -1
  8. package/dist/cli-chunks/{index-CDwwaNvP.cjs → index-Bc4AXYHM.cjs} +15 -15
  9. package/dist/cli-chunks/{index-DvOPzPxS.cjs → index-Cl5cfUqJ.cjs} +2 -2
  10. package/dist/cli-chunks/{index.esm-B8pX0BrZ.cjs → index.esm-DhXN7XjE.cjs} +7 -7
  11. package/dist/cli-chunks/{login-Dt-FHzpL.cjs → login-CTZgu8Q-.cjs} +2 -2
  12. package/dist/cli-chunks/{project-vite-CE7kyqxl.cjs → project-vite--h2M6eBb.cjs} +1 -1
  13. package/dist/cli-chunks/{remote-Be6PeR-n.cjs → remote-0hw42fDG.cjs} +6 -6
  14. package/dist/cli-chunks/{runtime-permission-env-DWSscWBT.cjs → runtime-permission-env-Bvggu6mn.cjs} +1 -1
  15. package/dist/cli-chunks/{session-DZXRQ4Dp.cjs → session-5fnHlEGO.cjs} +1 -1
  16. package/dist/cli-chunks/{skill-B8GWL2KT.cjs → skill-DrFEqmdD.cjs} +2 -2
  17. package/dist/cli-chunks/{version-D19lZmYN.cjs → version-CccOA4so.cjs} +1 -1
  18. package/dist/cli.cjs +1 -1
  19. package/dist/devtools/browser-dev-host/assets/browser-dev-host-BQ9v4rI1.js +101 -0
  20. package/dist/devtools/browser-dev-host/assets/{index-Dh5wRj5c.js → index-8LTH05np.js} +2 -2
  21. package/dist/devtools/browser-dev-host/index.html +1 -1
  22. package/dist/index.cjs.js +1 -10
  23. package/dist/index.esm.js +1 -10
  24. package/dist/vite.cjs.js +1 -1
  25. package/dist/vite.esm.js +1 -1
  26. package/package.json +7 -7
  27. package/skill/SKILL.md +1 -1
  28. package/skill/references/api-root.md +1 -1
  29. package/skill/references/cli.md +2 -0
  30. package/skill/references/safety-boundaries.md +2 -2
  31. package/skill/skill.json +5 -5
  32. package/types/modules/network/index.d.ts +1 -4
  33. package/types/modules/network/observability.d.ts +0 -1
  34. package/types/protocol/dev-session.d.ts +2 -1
  35. package/dist/devtools/browser-dev-host/assets/browser-dev-host-Bb43BPMS.js +0 -101
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="theme-color" content="#f4f5f7" />
7
7
  <title>小程序工坊调试台</title>
8
- <script type="module" crossorigin src="/assets/index-Dh5wRj5c.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-8LTH05np.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/desktop-app-launch-DnPRjCa3.js">
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-D-aNERAr.css">
11
11
  </head>
package/dist/index.cjs.js CHANGED
@@ -835,7 +835,7 @@ function createMessageId() {
835
835
  /** 构建时替换为当前发布包的实际版本。 */
836
836
  const HB_SDK_VERSION = typeof undefined === 'string'
837
837
  ? undefined
838
- : '0.8.1-alpha.6';
838
+ : '0.8.1-alpha.8';
839
839
 
840
840
  const RUNTIME_MODES = new Set(['production', 'preview', 'development', 'unknown']);
841
841
  const OPERATING_SYSTEM_NAMES = new Set(['android', 'ios', 'ohos', 'windows', 'macos', 'linux', 'unknown']);
@@ -3364,9 +3364,6 @@ function createNetworkRequestFailureLog(config, error, extras) {
3364
3364
  if (config.timeout !== undefined) {
3365
3365
  detail.timeout = config.timeout;
3366
3366
  }
3367
- if (config.withCredentials !== undefined) {
3368
- detail.withCredentials = config.withCredentials;
3369
- }
3370
3367
  const headers = sanitizeNetworkHeaders(extras.headers || config.headers);
3371
3368
  if (Object.keys(headers).length > 0) {
3372
3369
  detail.headers = headers;
@@ -3404,7 +3401,6 @@ function snapshotRequestConfig(config) {
3404
3401
  ...(config.data === undefined ? {} : { data: clonePublicValue(config.data) }),
3405
3402
  ...(config.headers === undefined ? {} : { headers: clonePublicValue(config.headers) }),
3406
3403
  ...(config.timeout === undefined ? {} : { timeout: config.timeout }),
3407
- ...(config.withCredentials === undefined ? {} : { withCredentials: config.withCredentials }),
3408
3404
  ...(config.validateStatus === undefined ? {} : { validateStatus: config.validateStatus }),
3409
3405
  };
3410
3406
  }
@@ -3416,7 +3412,6 @@ function toRequestPayload(config) {
3416
3412
  ...(config.data === undefined ? {} : { data: clonePublicValue(config.data) }),
3417
3413
  ...(config.headers === undefined ? {} : { headers: clonePublicValue(config.headers) }),
3418
3414
  ...(config.timeout === undefined ? {} : { timeout: config.timeout }),
3419
- ...(config.withCredentials === undefined ? {} : { withCredentials: config.withCredentials }),
3420
3415
  };
3421
3416
  }
3422
3417
  function normalizeHeaders(headers) {
@@ -3585,9 +3580,6 @@ function normalizeDownloadPayload(options, to, isFileTarget) {
3585
3580
  if (options.maxBytes !== undefined && (!Number.isSafeInteger(options.maxBytes) || options.maxBytes <= 0)) {
3586
3581
  throw createSDKError('INVALID_PARAMS', 'maxBytes 必须是正的 safe integer');
3587
3582
  }
3588
- if (options.withCredentials !== undefined && typeof options.withCredentials !== 'boolean') {
3589
- throw createSDKError('INVALID_PARAMS', 'withCredentials 必须是 boolean');
3590
- }
3591
3583
  if (options.onProgress !== undefined && typeof options.onProgress !== 'function') {
3592
3584
  throw createSDKError('INVALID_PARAMS', 'onProgress 必须是函数');
3593
3585
  }
@@ -3607,7 +3599,6 @@ function normalizeDownloadPayload(options, to, isFileTarget) {
3607
3599
  ...(options.params === undefined ? {} : { params: clonePublicValue(options.params) }),
3608
3600
  ...(options.headers === undefined ? {} : { headers: clonePublicValue(options.headers) }),
3609
3601
  ...(options.timeout === undefined ? {} : { timeout: options.timeout }),
3610
- ...(options.withCredentials === undefined ? {} : { withCredentials: options.withCredentials }),
3611
3602
  ...(options.maxBytes === undefined ? {} : { maxBytes: options.maxBytes }),
3612
3603
  };
3613
3604
  if (isFileTarget) {
package/dist/index.esm.js CHANGED
@@ -831,7 +831,7 @@ function createMessageId() {
831
831
  /** 构建时替换为当前发布包的实际版本。 */
832
832
  const HB_SDK_VERSION = typeof undefined === 'string'
833
833
  ? undefined
834
- : '0.8.1-alpha.6';
834
+ : '0.8.1-alpha.8';
835
835
 
836
836
  const RUNTIME_MODES = new Set(['production', 'preview', 'development', 'unknown']);
837
837
  const OPERATING_SYSTEM_NAMES = new Set(['android', 'ios', 'ohos', 'windows', 'macos', 'linux', 'unknown']);
@@ -3360,9 +3360,6 @@ function createNetworkRequestFailureLog(config, error, extras) {
3360
3360
  if (config.timeout !== undefined) {
3361
3361
  detail.timeout = config.timeout;
3362
3362
  }
3363
- if (config.withCredentials !== undefined) {
3364
- detail.withCredentials = config.withCredentials;
3365
- }
3366
3363
  const headers = sanitizeNetworkHeaders(extras.headers || config.headers);
3367
3364
  if (Object.keys(headers).length > 0) {
3368
3365
  detail.headers = headers;
@@ -3400,7 +3397,6 @@ function snapshotRequestConfig(config) {
3400
3397
  ...(config.data === undefined ? {} : { data: clonePublicValue(config.data) }),
3401
3398
  ...(config.headers === undefined ? {} : { headers: clonePublicValue(config.headers) }),
3402
3399
  ...(config.timeout === undefined ? {} : { timeout: config.timeout }),
3403
- ...(config.withCredentials === undefined ? {} : { withCredentials: config.withCredentials }),
3404
3400
  ...(config.validateStatus === undefined ? {} : { validateStatus: config.validateStatus }),
3405
3401
  };
3406
3402
  }
@@ -3412,7 +3408,6 @@ function toRequestPayload(config) {
3412
3408
  ...(config.data === undefined ? {} : { data: clonePublicValue(config.data) }),
3413
3409
  ...(config.headers === undefined ? {} : { headers: clonePublicValue(config.headers) }),
3414
3410
  ...(config.timeout === undefined ? {} : { timeout: config.timeout }),
3415
- ...(config.withCredentials === undefined ? {} : { withCredentials: config.withCredentials }),
3416
3411
  };
3417
3412
  }
3418
3413
  function normalizeHeaders(headers) {
@@ -3581,9 +3576,6 @@ function normalizeDownloadPayload(options, to, isFileTarget) {
3581
3576
  if (options.maxBytes !== undefined && (!Number.isSafeInteger(options.maxBytes) || options.maxBytes <= 0)) {
3582
3577
  throw createSDKError('INVALID_PARAMS', 'maxBytes 必须是正的 safe integer');
3583
3578
  }
3584
- if (options.withCredentials !== undefined && typeof options.withCredentials !== 'boolean') {
3585
- throw createSDKError('INVALID_PARAMS', 'withCredentials 必须是 boolean');
3586
- }
3587
3579
  if (options.onProgress !== undefined && typeof options.onProgress !== 'function') {
3588
3580
  throw createSDKError('INVALID_PARAMS', 'onProgress 必须是函数');
3589
3581
  }
@@ -3603,7 +3595,6 @@ function normalizeDownloadPayload(options, to, isFileTarget) {
3603
3595
  ...(options.params === undefined ? {} : { params: clonePublicValue(options.params) }),
3604
3596
  ...(options.headers === undefined ? {} : { headers: clonePublicValue(options.headers) }),
3605
3597
  ...(options.timeout === undefined ? {} : { timeout: options.timeout }),
3606
- ...(options.withCredentials === undefined ? {} : { withCredentials: options.withCredentials }),
3607
3598
  ...(options.maxBytes === undefined ? {} : { maxBytes: options.maxBytes }),
3608
3599
  };
3609
3600
  if (isFileTarget) {
package/dist/vite.cjs.js CHANGED
@@ -11,7 +11,7 @@ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentS
11
11
  /** 构建时替换为当前发布包的实际版本。 */
12
12
  const HB_SDK_VERSION = typeof undefined === 'string'
13
13
  ? undefined
14
- : '0.8.1-alpha.6';
14
+ : '0.8.1-alpha.8';
15
15
 
16
16
  /**
17
17
  * iframe 与调试台页面的开发期 console 捕获转发。
package/dist/vite.esm.js CHANGED
@@ -8,7 +8,7 @@ import { AsyncLocalStorage } from 'node:async_hooks';
8
8
  /** 构建时替换为当前发布包的实际版本。 */
9
9
  const HB_SDK_VERSION = typeof undefined === 'string'
10
10
  ? undefined
11
- : '0.8.1-alpha.6';
11
+ : '0.8.1-alpha.8';
12
12
 
13
13
  /**
14
14
  * iframe 与调试台页面的开发期 console 捕获转发。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heybox/hb-sdk",
3
- "version": "0.8.1-alpha.6",
3
+ "version": "0.8.1-alpha.8",
4
4
  "sideEffects": [
5
5
  "./src/index.ts",
6
6
  "./src/core/singleton.ts",
@@ -62,7 +62,7 @@
62
62
  "skills": "1.5.23",
63
63
  "undici": "^7.28.0",
64
64
  "ws": "^8.18.0",
65
- "@heybox/hb-sdk-protocol": "0.8.1-alpha.6"
65
+ "@heybox/hb-sdk-protocol": "0.8.1-alpha.8"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "vite": ">=5"
@@ -113,12 +113,12 @@
113
113
  "vue-tsc": "^3.3.7",
114
114
  "vite": "^8.0.12",
115
115
  "vitest": "^3.2.4",
116
- "@heybox-domain/heybox-theme": "~0.1.0",
117
- "@heybox/hb-api": "~1.28.3",
118
116
  "@heybox-domain/heybox-vue3-ui": "~0.1.0",
119
- "@heybox/hb-sdk-runtime": "~0.8.1-alpha.6",
120
- "@heybox/runtime": "~0.2.0",
117
+ "@heybox/hb-api": "~1.28.3",
118
+ "@heybox/hb-sdk-runtime": "~0.8.1-alpha.8",
119
+ "@heybox-domain/heybox-theme": "~0.1.0",
121
120
  "@heybox/runtime-transport-fetch": "~0.2.0",
121
+ "@heybox/runtime": "~0.2.0",
122
122
  "@heybox/runtime-policy": "~0.2.0"
123
123
  },
124
124
  "publishConfig": {
@@ -171,7 +171,7 @@
171
171
  "check:compatibility-evidence": "node scripts/validate-compatibility-evidence.mjs",
172
172
  "check:api-semver": "node ../../ops/jobs/hb-sdk-docs-contract/semantic-diff.cjs",
173
173
  "clean": "rimraf ./dist && rimraf ./types",
174
- "test:unit": "NODE_OPTIONS='--conditions=heybox' vitest run",
174
+ "test:unit": "vitest run",
175
175
  "test:types:characterization": "tsc -p tsconfig.characterization.json --noEmit --pretty false",
176
176
  "test:types:browser-dev-host": "vue-tsc -p tsconfig.browser-dev-host.json --noEmit --pretty false",
177
177
  "test:types": "pnpm run test:types:characterization && pnpm run test:types:browser-dev-host",
package/skill/SKILL.md CHANGED
@@ -61,7 +61,7 @@ Apply these instructions when writing, reviewing, or debugging code that consume
61
61
 
62
62
  1. Use `hb-sdk create <project-name>` to scaffold a workshop mini-program.
63
63
  2. Use `hb-sdk dev` for Browser Mock and Mobile App debugging. Browser debugging can start without CLI login, project binding, or a remote Dev Context; capabilities that need those inputs fail explicitly. Mobile uses the single QR entry with the `open_inapp` and `heybox://` `openWindow` wrapper around a LAN short URL, then opens `heybox-mini-dev://sandbox` with the complete launch context.
64
- 3. The debugging page does not edit permissions. Treat the validated remote permission snapshot as canonical Runtime input. Use `--port`, `--browser-dev-host-port`, and `--no-open` to control local endpoints and browser opening. Select a Mobile network interface the device can reach. `launch.json` is a LAN discovery document, not authentication, encryption, signing, or HMAC protection.
64
+ 3. The debugging page does not edit permissions. Treat the effective intersection of the current project declaration and validated remote approval as canonical Runtime input. Mobile debugging preserves `useOfficialDomain: true` only when both inputs allow it, refreshes the effective permissions before opening on a phone, and never accepts a browser-side permission override. Use `--port`, `--browser-dev-host-port`, and `--no-open` to control local endpoints and browser opening. Select a Mobile network interface the device can reach. `launch.json` is a LAN discovery document, not authentication, encryption, signing, or HMAC protection.
65
65
  For real PC Companion debugging, configure local artifacts in `package.json#heybox.companions`, keep `miniappManifest()` enabled, bind the project, and ensure COA has approved `companion`. `hb-sdk dev` validates immutable snapshots without requiring an upload; config or artifact changes rotate the snapshot while existing Sessions retain their original artifact. Prepare and launch the new artifact explicitly. Check separate Browser, Mobile and PC Companion readiness in the debugging workbench. Without a local declaration, use Browser Fake only for state/UI integration.
66
66
  4. Use `hb-sdk build [--env <name>] [--verbose]` as the recommended production build entry. It directly owns the Vite build, always cleans and writes `dist/`, and works without CLI login, project binding, or network access.
67
67
  5. Declare the actual supported platforms in `package.json#heybox.platforms` and keep the no-argument `miniappManifest()` explicitly enabled in `vite.config.ts`; `hb-sdk build` must fail when the declaration, Manifest, or Runtime gate output is missing or inconsistent.
@@ -27,7 +27,7 @@
27
27
  ## Package metadata
28
28
 
29
29
  - Package: `@heybox/hb-sdk`
30
- - Version at generation time: `0.8.1-alpha.6`
30
+ - Version at generation time: `0.8.1-alpha.8`
31
31
  - Public root export: `@heybox/hb-sdk`
32
32
  - Protocol export: `@heybox/hb-sdk/protocol`
33
33
  - Vite plugin export: `@heybox/hb-sdk/vite`
@@ -121,6 +121,8 @@ CLI 会启动页面服务并自动打开 Vue 3 本地调试台。左侧集中放
121
121
 
122
122
  本地真 PC 调试 Companion 不要求先上传版本,但必须在 `package.json#heybox.companions` 中配置本地 ZIP、绑定项目,并由 COA 批准 `companion`;`miniappManifest()` 只保留构建配置。dev server 只向 loopback 提供 canonical Manifest 与固定 ZIP 路由;CLI 在签发或刷新本地启动票时绑定 Manifest 摘要。配置或 ZIP 变化后会校验并切换到新快照,已有 Session 保持原有产物,新产物须重新准备与启动。调试台分别展示浏览器、手机与 PC Companion 的就绪状态,以及本地 alias、target 和摘要短前缀;产物缺失、校验失败或授权不可用时显示明确阻塞原因,不影响浏览器联调。没有本地 Companion 配置时仍可使用 Browser Fake 做状态联调,但真实 PC Companion 会 fail closed。
123
123
 
124
+ 手机 Dev Session 仅使用当前版本声明与平台批准结果求交后的有效权限,不接受调试页本地覆盖。两者均允许 `useOfficialDomain: true` 时,真机扫码调试会保留该配置;未批准、未声明或非法快照继续 fail closed。
125
+
124
126
  Browser Mock 会自动在实时与兼容链路间切换。手机调试使用 `open_inapp`/`openWindow` 包裹的 LAN 短链接二维码(先开普通 H5 跳转页,再进入小程序并关闭中间页)。
125
127
 
126
128
  ### 2. 先用浏览器 Mock 验收
@@ -18,12 +18,12 @@
18
18
  - `auth.login()`、`user.getInfo()` 和 `user.getSteamGameList()` 的可用性不由 `network` 决定;它们分别要求 `userInfo` 或 `steamLibrary`,并继续遵循各自的用户授权和数据规则。
19
19
  - `user.revokeAuthorization()` 在两种网络模式下都要求可信用户手势;成功后必须停止使用并清理业务缓存的旧身份、资料和服务端会话。
20
20
  - `on()` 返回取消监听函数,组件卸载或页面销毁时需要调用。
21
- - 业务网络请求使用 `network.request()`,不要依赖浏览器原生网络出口。
21
+ - 现有业务网络请求仍使用 `network.request()`;该 API 已标记废弃,但目前没有替代调用入口,不要依赖浏览器原生网络出口。
22
22
  - 公开 `network.request()` 与 `network.download()` 均使用 no-follow redirect policy;3xx 不会在 Host 内静默跳转。
23
23
  - `network.request()` 不能访问平台保留的 runtime auth 与 OpenAPI 内部路径;页面不得持有或交换服务端应用凭据。
24
24
  - `network.request` 不支持 `multipart/form-data`;App Host 仅支持 form(`application/x-www-form-urlencoded`)与 JSON。表单请用 `URLSearchParams#toString()` 作为 `data`,文件上传请走专用上传能力。
25
25
  - 新 PC 开放持久 sandbox、单文件/目录 picker、精确 File 保存与公网 `network.download()`;多选和小黑盒域名流式下载暂不支持。Mobile、Web 与 Browser Dev Host 仍未开放这些 primitive。
26
- - 新 PC 支持 `network.request`,但会忽略 `withCredentials`;它不改变请求路由或凭据行为。其他平台继续遵循各自的 Host 语义。
26
+ - `withCredentials` 不再是支持的配置字段,也不会进入新 SDK、协议或 Host contract;旧 SDK 构建产物的 wire 字段仅由 Runtime 兼容忽略。Mobile 对官方 HTTPS 默认端口目标自动启用 Native Cookie,第三方关闭;应用可显式提供 `Cookie`、`Authorization` 等请求头。`Origin`、`Referer`、`User-Agent` 由 Host 接管;`Host`、分帧及逐跳请求头由传输层管理,不能由小程序设置。Web Host 使用浏览器 Fetch,无法发送显式 `Cookie` 等浏览器禁止的头,会返回 `REQUEST_UNSUPPORTED`;需要第三方 Cookie 会话时请在支持原始请求头的 Mobile/PC Host 验收。
27
27
  - 新 PC 不支持振动、分享菜单和截图分享;`navigation.openAppPage` 仅支持 `game_detail`,用户/帖子详情会明确失败。调用平台相关能力时应处理 `METHOD_FORBIDDEN` 或 `REQUEST_UNSUPPORTED`。
28
28
  - picker 必须来自可信用户手势;取消选择返回 `FILE_PICKER_CANCELLED`。`saveFile()` 只接受 `suggestedName`,不接受 `accept`。
29
29
  - `pickFiles()` / `pickDirectory()` 默认只读;`pickFiles()` 仅在显式传入 `multiple: true` 时允许 Host 返回多个文件。要写入或作为下载目标时显式请求 `mode: 'readwrite'`。
package/skill/skill.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "hb-sdk",
3
- "skillVersion": "0.8.1-alpha.6+skill.079dd19d1630",
3
+ "skillVersion": "0.8.1-alpha.8+skill.8df6196da06d",
4
4
  "sdk": {
5
5
  "package": "@heybox/hb-sdk",
6
- "version": "0.8.1-alpha.6",
7
- "compatibility": "0.8.1-alpha.6"
6
+ "version": "0.8.1-alpha.8",
7
+ "compatibility": "0.8.1-alpha.8"
8
8
  },
9
9
  "distribution": {
10
10
  "type": "npm",
11
11
  "package": "@heybox/hb-sdk",
12
- "version": "0.8.1-alpha.6",
12
+ "version": "0.8.1-alpha.8",
13
13
  "path": "skill"
14
14
  },
15
- "integrity": "sha256-079dd19d16302a5e71519d30312ad45aa1e0c05546e52f71dac6d7bf2fac238f"
15
+ "integrity": "sha256-8df6196da06d2647adf2fcc5c715f24e27824577c944fb6854d4986bd12d31ca"
16
16
  }
@@ -38,8 +38,6 @@ export interface MiniProgramNetworkRequestConfig {
38
38
  headers?: MiniProgramNetworkHeaders;
39
39
  /** 超时时间,单位毫秒。 */
40
40
  timeout?: number;
41
- /** 是否携带凭据意图;具体策略由宿主运行时决定。 */
42
- withCredentials?: boolean;
43
41
  /** SDK 侧状态校验;不会跨 bridge 传输函数值。 */
44
42
  validateStatus?: MiniProgramNetworkValidateStatus;
45
43
  }
@@ -54,7 +52,6 @@ export interface DownloadBaseOptions {
54
52
  params?: MiniProgramNetworkParams;
55
53
  headers?: MiniProgramNetworkHeaders;
56
54
  timeout?: number;
57
- withCredentials?: boolean;
58
55
  maxBytes?: number;
59
56
  signal?: AbortSignal;
60
57
  onProgress?: (progress: DownloadProgress) => void;
@@ -82,7 +79,6 @@ export interface NetworkRequestPayload {
82
79
  data?: unknown;
83
80
  headers?: MiniProgramNetworkHeaders;
84
81
  timeout?: number;
85
- withCredentials?: boolean;
86
82
  }
87
83
  /**
88
84
  * bridge / runtime 返回的标准化 HTTP 响应。
@@ -114,6 +110,7 @@ export interface MiniProgramNetworkModule {
114
110
  * @returns 标准化网络响应;HTTP 2xx 默认返回 resolve。
115
111
  * @throws 当请求已完成但 HTTP 状态不满足 `validateStatus` 时抛出 `HbMiniProgramNetworkError`。
116
112
  * @throws 当 bridge、运行时或宿主能力调用失败时抛出 `HbMiniProgramSDKError`。
113
+ * @deprecated Since 0.8.1-alpha.7. 暂无替代接口;现有调用仍可使用,请移除 withCredentials 配置。Native Cookie 由 Host 按目标域名决定。
117
114
  * @since 0.2.0-alpha.0
118
115
  * @hbPlatform android
119
116
  * @hbPlatform ios
@@ -12,7 +12,6 @@ export interface NetworkRequestFailureLog {
12
12
  headers?: MiniProgramNetworkHeaders;
13
13
  dataPreview?: unknown;
14
14
  timeout?: number;
15
- withCredentials?: boolean;
16
15
  }
17
16
  /**
18
17
  * 记录 `network.request` 失败,保证异常路径在开发者控制台可观测。
@@ -12,7 +12,8 @@ export declare const MINI_PROGRAM_DEV_LAUNCH_SCHEMA_VERSION: 1;
12
12
  /** Browser Dev Host 创建 Dev Session 时接收的请求。 */
13
13
  export interface MiniProgramDevSessionCreatePayload {
14
14
  mini_url_origin: string;
15
- runtime_permissions: MiniProgramRuntimePermissionsSnapshot;
15
+ /** 仅用于兼容旧 Node 服务;当前服务端忽略该字段并自行读取远端权限。 */
16
+ runtime_permissions?: MiniProgramRuntimePermissionsSnapshot;
16
17
  }
17
18
  /** Browser Dev Host 创建 Dev Session 后返回的短期引用。 */
18
19
  export interface MiniProgramDevSessionCreateResult {