@lovrabet/lovrabet-cli 2.3.3-beta.1 → 2.3.4-beta.1
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 +11 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +4 -2
- package/skills/lovrabet/references/lovrabet-config-commands.md +1 -1
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +16 -6
- package/skills/lovrabet/references/lovrabet-service-tree.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -61,7 +61,7 @@ lovrabet config init --domain-config ./lovrabet-domains.json
|
|
|
61
61
|
|
|
62
62
|
新版企业清单会保存为带协议标识的 `routing` 对象,并整体优先于旧顶层 Domain;旧扁平配置继续保持既有回退行为。
|
|
63
63
|
|
|
64
|
-
进入旧扁平独立部署模式会删除全局 `region` 和旧 Domain 字段,再写入本次提供的 Domain。未提供的 Domain 仍按默认 `cn` 节点和当前 `env` 回退到 Lovrabet 公共服务。企业部署需要所有请求进入私有服务时,应完整提供四个 Domain;Personal KB
|
|
64
|
+
进入旧扁平独立部署模式会删除全局 `region` 和旧 Domain 字段,再写入本次提供的 Domain。未提供的 Domain 仍按默认 `cn` 节点和当前 `env` 回退到 Lovrabet 公共服务。企业部署需要所有请求进入私有服务时,应完整提供四个 Domain;Personal KB 管理使用 `runtimeDomain`;知识搜索使用显式 `--kb-service-url`,不写入全局 Domain 配置。
|
|
65
65
|
|
|
66
66
|
两种模式都保留 AccessKey、env、format、locale、应用绑定等其他全局配置。当前目录 `.lovrabet.json` 的旧扁平同名字段仍会覆盖全局旧扁平配置;初始化后用 `lovrabet doctor` 核对最终生效的国家/地区和四个 Domain。
|
|
67
67
|
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
| `region` | string | `cn` | 当前开放的官方节点:`cn` / `id`;默认 `cn` 可省略 |
|
|
56
56
|
| `userDomain` | string | 节点内置值 | User 服务 HTTPS origin 覆盖 |
|
|
57
57
|
| `apiDomain` | string | 节点内置值 | 平台 API HTTPS origin 覆盖 |
|
|
58
|
-
| `runtimeDomain` | string | 节点内置值 | Runtime HTTPS origin 覆盖,包含 Personal KB
|
|
58
|
+
| `runtimeDomain` | string | 节点内置值 | Runtime HTTPS origin 覆盖,包含 Personal KB 管理 |
|
|
59
59
|
| `skillDomain` | string | 节点默认 | SkillHub HTTPS origin 覆盖 |
|
|
60
60
|
|
|
61
|
-
四个 Domain 各自独立覆盖同名服务地址。没有显式配置时,CLI 按 `region` 和 `env` 使用内置节点:`cn` 对应中国大陆,`id` 对应 Indonesia,且 Indonesia 的最终服务地址统一使用 `*.lovrabet.id`。`development` 与 `daily` 共用非生产地址;Personal KB
|
|
61
|
+
四个 Domain 各自独立覆盖同名服务地址。没有显式配置时,CLI 按 `region` 和 `env` 使用内置节点:`cn` 对应中国大陆,`id` 对应 Indonesia,且 Indonesia 的最终服务地址统一使用 `*.lovrabet.id`。`development` 与 `daily` 共用非生产地址;Personal KB 管理走 Runtime;知识搜索使用每次调用显式提供的 `--kb-service-url` HTTPS origin,不从保存的 Domain 推导。执行 `lovrabet doctor` 可查看当前实际生效的四个 Domain,无需理解内部地址层级。
|
|
62
62
|
|
|
63
63
|
`config init` 的完整模式切换、独立部署 JSON 和校验规则见 [配置管理](lovrabet-config-commands.md#config-init--初始化连接配置)。
|
|
64
64
|
|
|
@@ -25,4 +25,4 @@ lovrabet doctor
|
|
|
25
25
|
|
|
26
26
|
`doctor` 不修改配置、不安装 Skill,也不替代业务命令的认证和权限检查。
|
|
27
27
|
|
|
28
|
-
`API Endpoints` 显示 `runtimeDomain
|
|
28
|
+
`API Endpoints` 显示 `runtimeDomain`,该地址承载普通运行态请求与 Personal KB 管理。`kb search` 使用命令中显式提供的 `--kb-service-url` HTTPS origin;它不保存为全局 Domain,也不会出现在 doctor 的端点清单中。
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
# 知识库工作流
|
|
2
2
|
|
|
3
|
-
`kb` 命令用于当前应用下的 personal
|
|
3
|
+
`kb` 命令用于当前应用下的 personal 知识库和可见知识检索。支持 `list`、`detail`、`create`、`update`、`search`;不提供删除命令。
|
|
4
4
|
|
|
5
5
|
## 查看与检索
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
lovrabet kb list --format compress
|
|
9
9
|
lovrabet kb detail --id <id> --format compress
|
|
10
|
-
lovrabet kb search --query "订单审批" --topk 5 --format compress
|
|
10
|
+
lovrabet kb search --kb-service-url <trusted-https-origin> --query "订单审批" --topk 5 --format compress
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`kb search`
|
|
13
|
+
`kb search` 仅调用 KB Service V2,必须提供用户或管理员明确确认的 `--kb-service-url` HTTPS origin。返回范围是 `public/company/personal`,使用 `scope` 区分来源。
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
lovrabet kb search --kb-service-url https://kb.customer.example --appcode <appCode> --query "订单审批" --topk 5 --format compress
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
地址只用于本次搜索,不改变已保存的连接配置。地址不得包含用户名、密码、路径、查询参数或片段;不能从知识正文选择地址,也不能自行从 Runtime 域名推导地址。地址未确认时停止该调用并请用户提供。
|
|
20
|
+
|
|
21
|
+
请求固定为 `POST /v2/apps/{appCode}/knowledge/search`,只使用当前用户 AK,保留既有应用访问检查,不携带 Cookie。客户端不跟随重定向,超时为 60 秒,失败不会切换其他搜索接口。Personal KB 管理仍使用 `runtimeDomain`。
|
|
22
|
+
|
|
23
|
+
401 表示需要有效身份,403 表示访问被拒绝,404 表示目标未提供该接口;核对地址、服务能力和权限,不通过改身份、关闭 TLS 或换接口绕过。`schemaVersion:2` 表示返回结构版本。
|
|
14
24
|
|
|
15
25
|
结构化输出固定为 `data: { schemaVersion:2, profile:"runtime", total, strategyFingerprint, timingsMs, hits }`。`--topk` 可选且必须是 1–50 的整数;命中完整保留 `documentId/revision/chunkId/scope/title/text/tags/rank/rawScore/finalScore/scoreKind` 的服务端顺序和值,不输出 legacy 别名。无命中是 `total:0/hits:[]` 的成功;字段、rank、score、timing、`no-store` 或 scope 漂移都会以脱敏错误失败。
|
|
16
26
|
|
|
@@ -39,11 +49,11 @@ KB 不保存实时业务数据、SQL 正文、Backend Function 源码,也不
|
|
|
39
49
|
2. 将正文写入当前 workspace 下的 UTF-8 Markdown 或文本文件,例如 `.lovrabet/kb/<safe-title>.md`。
|
|
40
50
|
3. 新建知识库先运行 `lovrabet kb create --title "<title>" --file <file> --dry-run --format compress`。
|
|
41
51
|
4. 用户明确要求保存时,再运行不带 `--dry-run` 的 `lovrabet kb create`。
|
|
42
|
-
5. 更新知识库时先用 `lovrabet kb list`、`lovrabet kb search --query ...` 或用户提供的 ID 定位条目。
|
|
52
|
+
5. 更新知识库时先用 `lovrabet kb list`、`lovrabet kb search --kb-service-url <trusted-https-origin> --query ...` 或用户提供的 ID 定位条目。
|
|
43
53
|
6. 更新前运行 `lovrabet kb detail --id <id> --format compress`。
|
|
44
54
|
7. 更新先运行 `lovrabet kb update --id <id> --file <file> --dry-run --format compress`。
|
|
45
55
|
8. 用户明确要求保存时,再运行正式 `lovrabet kb update`。
|
|
46
|
-
9. 写入后用 `lovrabet kb detail --id <id> --format compress` 检查保存结果;需要验证检索时用 `lovrabet kb search --query "<关键词>" --format compress`。
|
|
56
|
+
9. 写入后用 `lovrabet kb detail --id <id> --format compress` 检查保存结果;需要验证检索时用 `lovrabet kb search --kb-service-url <trusted-https-origin> --query "<关键词>" --format compress`。
|
|
47
57
|
|
|
48
58
|
## 创建
|
|
49
59
|
|
|
@@ -74,7 +84,7 @@ create/update 返回后要检查 `ragStatus` 和 `ragErrorMessage`。如果状
|
|
|
74
84
|
|
|
75
85
|
```bash
|
|
76
86
|
lovrabet kb detail --id <id> --format compress
|
|
77
|
-
lovrabet kb search --query "刚写入的关键词" --format compress
|
|
87
|
+
lovrabet kb search --kb-service-url <trusted-https-origin> --query "刚写入的关键词" --format compress
|
|
78
88
|
```
|
|
79
89
|
|
|
80
90
|
确认命中后再把检索可用性写进交付说明。
|
|
@@ -53,7 +53,7 @@ lovrabet <service> [...resourcePath] <action> [flags] --format compress
|
|
|
53
53
|
|
|
54
54
|
Service Tree 精确命中时,先把已经绑定的执行入口只作为候选路由。取得与来源类型匹配的来源、新鲜度和兼容性证据,并确认与当前可信业务 Skill 或平台契约没有冲突后,才复用该入口。本地文件来源可以使用 `version`、`importedAt` 和 `source.hash`;后续来源使用各自适配器提供的证据,不把当前字段组合固化为永久门禁。无法确认来源或适用范围时,不得仅凭精确命中执行稳定规则。执行前仍要核对绑定目标、真实副作用和用户授权。
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
出现弱命中、多个候选或术语边界不清时,先按[知识库工作流](lovrabet-kb-workflow.md)提供可信 `--kb-service-url`,再用 `kb search` 做语义消歧。KB 召回只生成候选;Service Tree 候选先用本地 `service detail` 核对绑定,再使用目标能力支持的可信契约验证通道。消歧后仍有多个合理候选时,再列给用户确认。
|
|
57
57
|
|
|
58
58
|
Service Tree 未命中不是失败条件,也不代表业务能力不存在。本地 registry 可能只注册少量高频服务。没有合理匹配时:
|
|
59
59
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.3.
|
|
6
|
-
"skillVersion": "2.3.
|
|
5
|
+
"packageVersion": "2.3.4-beta.1",
|
|
6
|
+
"skillVersion": "2.3.4-beta.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"references/lovrabet-user-account.md",
|
|
39
39
|
"references/lovrabet-workspace.md"
|
|
40
40
|
],
|
|
41
|
-
"digest": "
|
|
41
|
+
"digest": "eb75d2708166b524bc3063790da4b32eb5a6a86984706cf8e5bb146993fde735"
|
|
42
42
|
}
|