@heybox/hb-sdk 0.5.4 → 0.5.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.
- package/README.md +7 -7
- package/dist/cli-chunks/{create-BE4xNVc4.cjs → create-DS-dZw7W.cjs} +1 -1
- package/dist/cli-chunks/{dev-BzH5dEtr.cjs → dev-CWXTB0AZ.cjs} +1 -1
- package/dist/cli-chunks/{doctor-CUCUIlNm.cjs → doctor-CJWXCZQI.cjs} +1 -1
- package/dist/cli-chunks/{index-iU6ySidw.cjs → index-CQjVwycx.cjs} +2 -2
- package/dist/cli-chunks/{index-DXIW8eBN.cjs → index-D-F9nQns.cjs} +21 -21
- package/dist/cli-chunks/{login-Cmgyjaq2.cjs → login-CvUTmVDe.cjs} +2 -2
- package/dist/cli-chunks/{remote-CzlmufT8.cjs → remote-TcGy7SWm.cjs} +4 -4
- package/dist/cli-chunks/{session-ChVF_DnI.cjs → session-DIGS_hBV.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/templates/vue3-vite-ts/README.md.ejs +1 -1
- package/package.json +1 -1
- package/skill/references/api-root.md +2 -2
- package/skill/references/cli.md +2 -2
- package/skill/references/llms-index.md +1 -1
- package/skill/skill.json +4 -4
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ await share.showShareMenu({
|
|
|
129
129
|
});
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
工坊小程序通常不要传 `url`;宿主 runtime 会按当前小程序生成
|
|
133
133
|
`/tools/common_share?user_miniprogram_id=...` 分享落地页。只有确实要分享外部
|
|
134
134
|
HTTP(S) 页面时才显式传 `url`。
|
|
135
135
|
|
|
@@ -336,12 +336,12 @@ try {
|
|
|
336
336
|
| `hb-sdk login status` | 查看脱敏后的 CLI 登录态。 |
|
|
337
337
|
| `hb-sdk login clear` | 清理 CLI 登录态。 |
|
|
338
338
|
| `hb-sdk doctor` | 检查本机 `hb-sdk` Agent Skill 是否匹配当前 SDK,并输出手动安装/刷新命令。 |
|
|
339
|
-
| `hb-sdk remote access` | 查看当前 CLI
|
|
339
|
+
| `hb-sdk remote access` | 查看当前 CLI 用户是否具备创建和管理工坊小程序的资格。 |
|
|
340
340
|
| `hb-sdk remote entity list` | 列出当前 CLI 用户可切换的开发者主体,并标记服务端 current entity。 |
|
|
341
|
-
| `hb-sdk remote entity current` | 查看服务端 current entity
|
|
341
|
+
| `hb-sdk remote entity current` | 查看服务端 current entity,以及该主体的小程序工坊权限状态。 |
|
|
342
342
|
| `hb-sdk remote entity switch <entity-id>` | 切换开发者平台服务端 current entity;不会修改项目绑定的小程序 ID。 |
|
|
343
|
-
| `hb-sdk remote list [--status <status>] [--keyword <text>]` | 列出当前 CLI
|
|
344
|
-
| `hb-sdk remote create --name <name> [--preview-image-url <url>] [--yes] [--force-bind]` | 在服务端 current entity
|
|
343
|
+
| `hb-sdk remote list [--status <status>] [--keyword <text>]` | 列出当前 CLI 用户可管理的远端工坊小程序,用于发现并绑定当前项目。 |
|
|
344
|
+
| `hb-sdk remote create --name <name> [--preview-image-url <url>] [--yes] [--force-bind]` | 在服务端 current entity 下创建远端工坊小程序并写入当前项目的 `package.json.heybox.miniProgramId`。 |
|
|
345
345
|
| `hb-sdk remote bind <mini-program-id> [--force]` | 校验当前 CLI 用户可管理目标小程序后,再把它绑定到当前项目。 |
|
|
346
346
|
| `hb-sdk remote info` | 查看当前项目绑定的小程序详情。 |
|
|
347
347
|
| `hb-sdk remote update [--name <name>] [--preview-image-url <url>]` | 更新绑定小程序的名称或远程预览图 URL。 |
|
|
@@ -421,9 +421,9 @@ HB_SDK_ALLOW_UNSAFE_API_BASE_URL=1 hb-sdk remote deploy --api-base-url http://12
|
|
|
421
421
|
|
|
422
422
|
| 命令 | 说明 |
|
|
423
423
|
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
424
|
-
| `hb-sdk remote access` | 查询当前 CLI
|
|
424
|
+
| `hb-sdk remote access` | 查询当前 CLI 用户是否具备管理工坊小程序的资格。 |
|
|
425
425
|
| `hb-sdk remote entity list` | 列出可切换开发者主体,并标记服务端 current entity。 |
|
|
426
|
-
| `hb-sdk remote entity current` | 查看服务端 current entity
|
|
426
|
+
| `hb-sdk remote entity current` | 查看服务端 current entity 和该主体的小程序工坊权限状态。 |
|
|
427
427
|
| `hb-sdk remote entity switch <entity-id>` | 切换服务端 current entity;只允许切到 `entity list` 返回的主体。 |
|
|
428
428
|
| `hb-sdk remote list [--status <status>] [--keyword <text>]` | 列出 current entity 下当前 CLI 用户可管理的小程序,并标出当前绑定项。 |
|
|
429
429
|
| `hb-sdk remote create --name <name> [--preview-image-url <url>] [--yes] [--force-bind]` | 在 current entity 下创建远端小程序并绑定当前项目;多主体非 TTY 环境必须传 `--yes` 确认使用当前主体;已有绑定时必须显式传 `--force-bind` 才能覆盖。 |
|
|
@@ -5,7 +5,7 @@ var fs = require('node:fs/promises');
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var require$$0 = require('fs');
|
|
7
7
|
var require$$1 = require('path');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-D-F9nQns.cjs');
|
|
9
9
|
require('node:module');
|
|
10
10
|
require('os');
|
|
11
11
|
require('readline');
|
|
@@ -9,7 +9,7 @@ var node_url = require('node:url');
|
|
|
9
9
|
var net = require('node:net');
|
|
10
10
|
var node_http = require('node:http');
|
|
11
11
|
var browser = require('./browser-RAy8e8cV.cjs');
|
|
12
|
-
var index = require('./index-
|
|
12
|
+
var index = require('./index-D-F9nQns.cjs');
|
|
13
13
|
require('node:process');
|
|
14
14
|
require('node:buffer');
|
|
15
15
|
require('node:util');
|
|
@@ -4,7 +4,7 @@ var fs$1 = require('node:fs');
|
|
|
4
4
|
var fs = require('node:fs/promises');
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-D-F9nQns.cjs');
|
|
8
8
|
require('node:module');
|
|
9
9
|
require('path');
|
|
10
10
|
require('os');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$2 = require('./index-
|
|
3
|
+
var index$2 = require('./index-D-F9nQns.cjs');
|
|
4
4
|
var require$$0$2 = require('fs');
|
|
5
5
|
var require$$2$1 = require('crypto');
|
|
6
6
|
var require$$1$2 = require('path');
|
|
7
7
|
var require$$0$3 = require('assert');
|
|
8
8
|
var require$$4$2 = require('events');
|
|
9
9
|
var require$$1$1 = require('util');
|
|
10
|
-
var remote = require('./remote-
|
|
10
|
+
var remote = require('./remote-TcGy7SWm.cjs');
|
|
11
11
|
var require$$0$5 = require('net');
|
|
12
12
|
var require$$0$4 = require('url');
|
|
13
13
|
var require$$2$2 = require('http');
|
|
@@ -234,19 +234,19 @@ function requireArgument () {
|
|
|
234
234
|
|
|
235
235
|
var command = {};
|
|
236
236
|
|
|
237
|
-
const require$5 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-
|
|
237
|
+
const require$5 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-D-F9nQns.cjs', document.baseURI).href)));
|
|
238
238
|
function __require$4() { return require$5("node:events"); }
|
|
239
239
|
|
|
240
|
-
const require$4 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-
|
|
240
|
+
const require$4 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-D-F9nQns.cjs', document.baseURI).href)));
|
|
241
241
|
function __require$3() { return require$4("node:child_process"); }
|
|
242
242
|
|
|
243
|
-
const require$3 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-
|
|
243
|
+
const require$3 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-D-F9nQns.cjs', document.baseURI).href)));
|
|
244
244
|
function __require$2() { return require$3("node:path"); }
|
|
245
245
|
|
|
246
|
-
const require$2 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-
|
|
246
|
+
const require$2 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-D-F9nQns.cjs', document.baseURI).href)));
|
|
247
247
|
function __require$1() { return require$2("node:fs"); }
|
|
248
248
|
|
|
249
|
-
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-
|
|
249
|
+
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-D-F9nQns.cjs', document.baseURI).href)));
|
|
250
250
|
function __require() { return require$1("node:process"); }
|
|
251
251
|
|
|
252
252
|
var help = {};
|
|
@@ -13094,7 +13094,7 @@ function readErrorMessage(error, options = {}) {
|
|
|
13094
13094
|
}
|
|
13095
13095
|
|
|
13096
13096
|
const CLI_VERSION_PLACEHOLDER = ['__HB', 'SDK', 'CLI', 'VERSION__'].join('_');
|
|
13097
|
-
const BUILT_CLI_VERSION = '0.5.
|
|
13097
|
+
const BUILT_CLI_VERSION = '0.5.5';
|
|
13098
13098
|
const PACKAGE_JSON_CANDIDATES = [
|
|
13099
13099
|
path.resolve(__dirname, '..', '..', 'package.json'),
|
|
13100
13100
|
path.resolve(__dirname, '..', 'package.json'),
|
|
@@ -13223,22 +13223,22 @@ function addRemotePublicOptions(command) {
|
|
|
13223
13223
|
.option('--allow-unsafe-api-base-url', '允许向非 Heybox HTTPS API origin 发送登录态,仅限本地调试'));
|
|
13224
13224
|
}
|
|
13225
13225
|
function installRemoteCommands(program, handlers, resolveLogger) {
|
|
13226
|
-
const remote = addRemotePublicOptions(program.command('remote').description('管理当前项目绑定的远程 Heybox
|
|
13227
|
-
addRemotePublicOptions(remote.command('access').description('
|
|
13226
|
+
const remote = addRemotePublicOptions(program.command('remote').description('管理当前项目绑定的远程 Heybox 工坊小程序'));
|
|
13227
|
+
addRemotePublicOptions(remote.command('access').description('查看当前账号的小程序工坊访问权限')).action(createRemoteAction(handlers, resolveLogger, 'access'));
|
|
13228
13228
|
const entity = addRemotePublicOptions(remote.command('entity').description('查看和切换当前开发者主体'));
|
|
13229
13229
|
addRemotePublicOptions(entity.command('list').description('列出当前账号可切换的开发者主体')).action(createRemoteAction(handlers, resolveLogger, 'entity:list'));
|
|
13230
|
-
addRemotePublicOptions(entity.command('current').description('
|
|
13230
|
+
addRemotePublicOptions(entity.command('current').description('查看当前开发者主体和小程序工坊权限状态')).action(createRemoteAction(handlers, resolveLogger, 'entity:current'));
|
|
13231
13231
|
addRemotePublicOptions(entity.command('switch').description('切换当前开发者主体').argument('<entity-id>', '开发者主体 ID')).action(createRemoteAction(handlers, resolveLogger, 'entity:switch', (_command, entityId) => ({
|
|
13232
13232
|
entityId: readStringArgument(entityId, 'entity-id'),
|
|
13233
13233
|
})));
|
|
13234
13234
|
addRemotePublicOptions(remote
|
|
13235
13235
|
.command('list')
|
|
13236
|
-
.description('
|
|
13236
|
+
.description('列出当前账号可管理的工坊小程序')
|
|
13237
13237
|
.option('--status <status>', '按状态筛选')
|
|
13238
13238
|
.option('--keyword <text>', '按关键词筛选')).action(createRemoteAction(handlers, resolveLogger, 'list', (command) => pickOptions(command, ['status', 'keyword'])));
|
|
13239
13239
|
addRemotePublicOptions(remote
|
|
13240
13240
|
.command('create')
|
|
13241
|
-
.description('
|
|
13241
|
+
.description('创建远程工坊小程序并绑定当前项目')
|
|
13242
13242
|
.requiredOption('--name <name>', '小程序名称')
|
|
13243
13243
|
.option('--preview-image-url <url>', '远程预览图 HTTPS URL')
|
|
13244
13244
|
.option('--force-bind', '允许覆盖当前 package.json 中已有绑定')).option('--yes', '多开发者主体时确认使用服务端 current 主体创建').action(createRemoteAction(handlers, resolveLogger, 'create', (command) => ({
|
|
@@ -13246,14 +13246,14 @@ function installRemoteCommands(program, handlers, resolveLogger) {
|
|
|
13246
13246
|
forceBind: Boolean(readCommandOptionsWithAncestors(command).forceBind),
|
|
13247
13247
|
...readYesOption(command),
|
|
13248
13248
|
})));
|
|
13249
|
-
addRemotePublicOptions(remote.command('bind').description('
|
|
13249
|
+
addRemotePublicOptions(remote.command('bind').description('绑定当前项目到已存在的远程工坊小程序').argument('<mini-program-id>', '远程小程序 ID').option('--force', '允许覆盖当前 package.json 中已有绑定')).action(createRemoteAction(handlers, resolveLogger, 'bind', (command, miniProgramId) => ({
|
|
13250
13250
|
force: Boolean(readCommandOptionsWithAncestors(command).force),
|
|
13251
13251
|
miniProgramId: readStringArgument(miniProgramId, 'mini-program-id'),
|
|
13252
13252
|
})));
|
|
13253
|
-
addRemotePublicOptions(remote.command('info').description('
|
|
13253
|
+
addRemotePublicOptions(remote.command('info').description('查看当前绑定的远程工坊小程序详情')).action(createRemoteAction(handlers, resolveLogger, 'info'));
|
|
13254
13254
|
addRemotePublicOptions(remote
|
|
13255
13255
|
.command('update')
|
|
13256
|
-
.description('
|
|
13256
|
+
.description('更新当前绑定的远程工坊小程序基础信息')
|
|
13257
13257
|
.option('--name <name>', '小程序名称')
|
|
13258
13258
|
.option('--preview-image-url <url>', '远程预览图 HTTPS URL')).action(createRemoteAction(handlers, resolveLogger, 'update', (command) => pickOptions(command, ['name', 'previewImageUrl'])));
|
|
13259
13259
|
const allowlist = addRemotePublicOptions(remote.command('allowlist').description('管理当前绑定小程序的预览白名单'));
|
|
@@ -13377,31 +13377,31 @@ function createCommandLoggerResolver(options) {
|
|
|
13377
13377
|
};
|
|
13378
13378
|
}
|
|
13379
13379
|
const defaultClearLoginStatus = async (...args) => {
|
|
13380
|
-
const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-
|
|
13380
|
+
const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-CvUTmVDe.cjs'); });
|
|
13381
13381
|
return clearLoginStatus(...args);
|
|
13382
13382
|
};
|
|
13383
13383
|
const defaultLoginToHeybox = async (...args) => {
|
|
13384
|
-
const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-
|
|
13384
|
+
const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-CvUTmVDe.cjs'); });
|
|
13385
13385
|
return loginToHeybox(...args);
|
|
13386
13386
|
};
|
|
13387
13387
|
const defaultPrintLoginStatus = async (...args) => {
|
|
13388
|
-
const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-
|
|
13388
|
+
const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-CvUTmVDe.cjs'); });
|
|
13389
13389
|
return printLoginStatus(...args);
|
|
13390
13390
|
};
|
|
13391
13391
|
const defaultRunCreateCommand = async (...args) => {
|
|
13392
|
-
const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-
|
|
13392
|
+
const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-DS-dZw7W.cjs'); });
|
|
13393
13393
|
return runCreateCommand(...args);
|
|
13394
13394
|
};
|
|
13395
13395
|
const defaultRunDevCommand = async (...args) => {
|
|
13396
|
-
const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-
|
|
13396
|
+
const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-CWXTB0AZ.cjs'); });
|
|
13397
13397
|
return runDevCommand(...args);
|
|
13398
13398
|
};
|
|
13399
13399
|
const defaultRunDoctorCommand = async (...args) => {
|
|
13400
|
-
const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-
|
|
13400
|
+
const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-CJWXCZQI.cjs'); });
|
|
13401
13401
|
return runDoctorCommand(...args);
|
|
13402
13402
|
};
|
|
13403
13403
|
const defaultRunRemoteCommand = async (...args) => {
|
|
13404
|
-
const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-
|
|
13404
|
+
const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-TcGy7SWm.cjs'); }).then(function (n) { return n.remote; });
|
|
13405
13405
|
return runRemoteCommand(...args);
|
|
13406
13406
|
};
|
|
13407
13407
|
function resolveStandaloneLogger(options, verbose) {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var promises = require('node:readline/promises');
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
5
|
var node_http = require('node:http');
|
|
6
|
-
var session = require('./session-
|
|
6
|
+
var session = require('./session-DIGS_hBV.cjs');
|
|
7
7
|
var browser = require('./browser-RAy8e8cV.cjs');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-D-F9nQns.cjs');
|
|
9
9
|
require('node:path');
|
|
10
10
|
require('fs');
|
|
11
11
|
require('constants');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var promises = require('node:readline/promises');
|
|
4
|
-
var session = require('./session-
|
|
4
|
+
var session = require('./session-DIGS_hBV.cjs');
|
|
5
5
|
var childProcess = require('node:child_process');
|
|
6
6
|
var fs = require('node:fs');
|
|
7
7
|
var fs$1 = require('node:fs/promises');
|
|
8
8
|
var path = require('node:path');
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-D-F9nQns.cjs');
|
|
10
10
|
|
|
11
11
|
var re = {exports: {}};
|
|
12
12
|
|
|
@@ -3113,7 +3113,7 @@ async function createDefaultCosClient(uploadToken) {
|
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
3115
|
async function loadCosConstructor() {
|
|
3116
|
-
const cosModule = await Promise.resolve().then(function () { return require('./index-
|
|
3116
|
+
const cosModule = await Promise.resolve().then(function () { return require('./index-CQjVwycx.cjs'); }).then(function (n) { return n.index; });
|
|
3117
3117
|
return cosModule.default;
|
|
3118
3118
|
}
|
|
3119
3119
|
function formatSize(bytes) {
|
|
@@ -4012,7 +4012,7 @@ async function remoteCreate(options, context, runtime) {
|
|
|
4012
4012
|
const previewImageUrl = validateOptionalHttpsUrl(options.previewImageUrl, '--preview-image-url');
|
|
4013
4013
|
const access = await context.api.accessStatus();
|
|
4014
4014
|
if (access.status !== 'approved') {
|
|
4015
|
-
throw new Error(`当前 CLI
|
|
4015
|
+
throw new Error(`当前 CLI 用户没有创建工坊小程序权限:${String(access.status ?? 'unknown')}`);
|
|
4016
4016
|
}
|
|
4017
4017
|
await confirmCreateWithCurrentEntity(options, context, runtime);
|
|
4018
4018
|
const result = await context.api.createMiniProgram({ name, previewImageUrl });
|
package/dist/cli.cjs
CHANGED
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
## Package metadata
|
|
20
20
|
|
|
21
21
|
- Package: `@heybox/hb-sdk`
|
|
22
|
-
- Version at generation time: `0.5.
|
|
22
|
+
- Version at generation time: `0.5.5`
|
|
23
23
|
- Public root export: `@heybox/hb-sdk`
|
|
24
24
|
- Protocol export: `@heybox/hb-sdk/protocol`
|
|
25
25
|
- Vite plugin export: `@heybox/hb-sdk/vite`
|
|
@@ -422,7 +422,7 @@ await share.showShareMenu({
|
|
|
422
422
|
});
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
|
|
425
|
+
工坊小程序通常不要传 `url`;宿主 runtime 会按当前小程序生成
|
|
426
426
|
`/tools/common_share?user_miniprogram_id=...` 分享落地页。只有确实要分享外部
|
|
427
427
|
HTTP(S) 页面时才显式传 `url`。
|
|
428
428
|
|
package/skill/references/cli.md
CHANGED
|
@@ -232,7 +232,7 @@ hb-sdk remote take-down
|
|
|
232
232
|
hb-sdk remote reopen
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
`hb-sdk remote create`
|
|
235
|
+
`hb-sdk remote create` 会创建远端工坊小程序并写入当前项目绑定;已有绑定时必须传 `--force-bind` 才能覆盖。`hb-sdk remote bind <mini-program-id>` 会先校验当前 CLI 用户可管理目标小程序,再写入本地配置;`--force` 只允许覆盖本地绑定,不跳过远端校验。
|
|
236
236
|
|
|
237
237
|
`hb-sdk remote release`、`hb-sdk remote withdraw`、`hb-sdk remote take-down` 和 `hb-sdk remote reopen` 会改变审核、发布或用户侧可见状态。交互式终端会展示小程序 id、名称、当前状态、目标版本和操作,再要求确认;非 TTY 环境必须传 `--yes`。
|
|
238
238
|
|
|
@@ -382,5 +382,5 @@ const response = await hbSDK.network.request({
|
|
|
382
382
|
});
|
|
383
383
|
```
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
工坊小程序通常不要传 `url`;宿主 runtime 会自动生成当前小程序的通用分享页。只有确实要分享外部 HTTP(S) 页面时才显式传 `url`。
|
|
386
386
|
````
|
|
@@ -33,7 +33,7 @@ This site documents the iframe-side SDK for external mini programs. For AI retri
|
|
|
33
33
|
- [用户与登录](./llms/guide/auth.md): 用户与授权模块当前分工:
|
|
34
34
|
- [CLI 与本地 mock 调试](./llms/guide/cli.md): `@heybox/hb-sdk` 同时提供 iframe 内使用的 SDK 和配套 `hb-sdk` CLI。CLI 负责项目模板、本地 Vite 服务、浏览器 mock runtime host 和 CLI 自己的 Heybox 登录缓存;它不是 iframe SDK 登录态的替代品。
|
|
35
35
|
- [错误处理](./llms/guide/error-handling.md): SDK 对外抛出的标准错误类型是 `HbMiniProgramSDKError`。
|
|
36
|
-
- [安装与运行环境](./llms/guide/installation.md):
|
|
36
|
+
- [安装与运行环境](./llms/guide/installation.md): 如果工坊小程序只是普通展示页面,不调用黑盒开放能力,也不监听 SDK 生命周期事件,可以不安装、不引用、不初始化 `@heybox/hb-sdk`。父容器仍可能在 URL 上注入 `hb_mini_bridge_nonce`,业务页可以直接忽略。
|
|
37
37
|
- [事件与生命周期](./llms/guide/lifecycle.md): SDK 通过 `on` 监听父容器派发的小程序生命周期和业务事件。
|
|
38
38
|
- [快速开始](./llms/guide/quick-start.md): 如果页面不需要黑盒开放能力,可以不接入 SDK。这是一条需要用户能力时的最短接入路径:等待 SDK 完成握手,然后读取当前用户登录态。
|
|
39
39
|
## Recipes
|
package/skill/skill.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hb-sdk",
|
|
3
|
-
"skillVersion": "0.5.
|
|
3
|
+
"skillVersion": "0.5.5+skill.0d0c16cf3747",
|
|
4
4
|
"sdk": {
|
|
5
5
|
"package": "@heybox/hb-sdk",
|
|
6
|
-
"version": "0.5.
|
|
7
|
-
"compatibility": "0.5.
|
|
6
|
+
"version": "0.5.5",
|
|
7
|
+
"compatibility": "0.5.5"
|
|
8
8
|
},
|
|
9
9
|
"source": "https://open.xiaoheihe.cn/agent-skills/hb-sdk",
|
|
10
|
-
"integrity": "sha256-
|
|
10
|
+
"integrity": "sha256-0d0c16cf374723b36892f32dae70ea0f8a50a0f44aa507691f8e9a75d6c43fb6"
|
|
11
11
|
}
|