Commit Graph

387 Commits

Author SHA1 Message Date
lishengzxc 7a65fb850c feat(auth): parse and persist workspace_id from console login callback
Adapts to bailian-cli-login af06baf which added workspace_id to the
notifyToken payload. The field is parsed from query/body and written
to config.json as workspace_id.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-15 01:05:00 +08:00
lishengzxc f45b19c261 chore: remove console_gateway_url remnants from schema and tests
Field was replaced by region+site gateway resolution but ConfigFile
definition, parseConfigFile logic, and test case were left behind.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-15 01:01:26 +08:00
lishengzxc 270412d146 refactor(auth): deduplicate canRetry/validateKey between login.ts and login-console.ts
Export validateAndPersistApiKey from login-console.ts and reuse in
login.ts. Remove duplicated canRetry, RETRY_DELAY_BASE_MS, and
validateKeyAndPersist from login.ts. Unify validation model to
qwen3.7-max. Reorder base_url write before apiKey validation in
the --api-key path to avoid double read-modify-write.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-15 00:26:57 +08:00
lishengzxc 6c716e5120 feat(auth): add --base-url flag to bl auth login
When used with --api-key, validates the key against the specified
base URL and persists it to config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 23:44:17 +08:00
lishengzxc 2182a2239f refactor(auth): unify console callback persistence — validate apiKey with callback's baseUrl
Move apiKey validation into login-console.ts so it uses the baseUrl
from the same callback (not stale config). All fields are now persisted
in one place: config fields first, then apiKey validated + written.

Remove onApiKey callback indirection from runConsoleLogin signature.
Clean up debug logging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 23:20:30 +08:00
lishengzxc 51d9833a3d fix(auth): parse baseUrl/consoleSite/consoleRegion/consoleSwitchAgent from POST body
These fields were only extracted from query params but the console
sends them in the JSON POST body. Add parseExtrasFromRawBody() to
handle JSON and form-urlencoded bodies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 22:56:54 +08:00
lishengzxc e68abb6975 refactor(auth): simplify login-console config persistence logic
Extract hasConfig variable to deduplicate the multi-field condition check,
remove the changed flag pattern in favor of direct write-through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 22:35:33 +08:00
lishengzxc 067e96689a feat(console): resolve gateway URL from region + site, add switchAgent support
Console gateway URL and action are now resolved from a region + site
mapping table instead of a single hardcoded config value. Supports
cn-beijing and ap-southeast-1 with domestic/international site variants.

- Add ConsoleSite type, REGION_GATEWAYS mapping, and resolveGateway()
- Add switchAgent to cornerstoneParam for delegated access
- Add console_site, console_region, console_switch_agent to config
- Remove consoleGatewayUrl from Config (replaced by region+site resolution)
- login-console callback now persists baseUrl, site, region, switchAgent
- bl console call gains --site and --switch-agent flags
- All callers delegate region default to callConsoleGateway (no more hardcoded cn-beijing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 20:17:46 +08:00
若麒 ef7aa493e0 chore: release 1.3.2
Bump bailian-cli / bailian-cli-core to 1.3.2, sync skill version, and
document the omni --audio HTTP 400 fix (#54) in CHANGELOG. Also add the
.ogg extension to the --audio help text and reference doc.
2026-06-12 18:33:36 +08:00
clh02467605 e67acc118f fix(omni): use input_audio instead of audio_url
Fixes #54
2026-06-12 17:34:41 +08:00
若麒 d36bc5a82f chore: release 1.3.1
Bump bailian-cli / bailian-cli-core to 1.3.1, sync skill version, and
document the HTTP_PROXY / HTTPS_PROXY / NO_PROXY fix (#35) in CHANGELOG.
2026-06-12 16:12:58 +08:00
若麒 ada7ed32fb Merge remote-tracking branch 'origin/main' into fix/proxy-env-support-v2 2026-06-12 16:07:43 +08:00
Gong Shiqi 7c1be39067 Merge pull request #53 from modelstudioai/feat/delete-apiDocs
feat: No longer expose API documentation
2026-06-12 16:05:55 +08:00
若麒 a96f3a2adf refactor: remove now-unused region threading in help printing
After dropping the API Reference line, printCommandHelp no longer reads
region, so the --region/DASHSCOPE_REGION resolution done solely for help
output is dead code. Endpoint selection via loadConfig is untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 16:03:00 +08:00
qcq01083097 489ba4f843 feat: No longer expose API documentation 2026-06-12 15:35:00 +08:00
故璃 c6afc21b11 fix: e2e test 2026-06-12 14:55:52 +08:00
若麒 d5fb2bfaf8 test: use leaf image prompt in video-ref r2v e2e
Switch the seed-image prompt from a cat sketch to a green leaf for a
simpler, more reliably-generated reference frame.
2026-06-12 14:53:42 +08:00
若麒 8a0de83c24 fix: honor HTTP_PROXY / HTTPS_PROXY / NO_PROXY env vars (#35)
Node's built-in fetch (undici) ignores proxy environment variables, so
bl always connected directly and failed with ECONNRESET behind a VPN or
corporate proxy. Install an EnvHttpProxyAgent as the global dispatcher at
startup, but only when a proxy variable is actually set — behavior is
unchanged otherwise. Lowercase variables take precedence over uppercase
(curl convention) and NO_PROXY is honored.

Values are trimmed and passed explicitly to work around undici reading
env vars with ??, where an empty lowercase variable (https_proxy="")
masks a configured uppercase one. Invalid proxy URLs fail with a clear
usage error instead of a stack trace, and the ECONNRESET hint now
suggests exporting HTTPS_PROXY.

Tests are fully offline and need no credentials: unit tests cover env
parsing, and the e2e test runs a minimal probe (setupProxyFromEnv + a
bare fetch) against a .invalid host through a local CONNECT proxy to
verify traffic routes through the proxy, NO_PROXY is honored, no
dispatcher is installed when unset, and invalid values error clearly.
2026-06-12 14:53:22 +08:00
clark-fc b36eaf34be Merge pull request #49 from modelstudioai/feat/knowledge-api-key
fix(core): 修复 Rerank 字段类型用于请求体中
2026-06-12 10:53:53 +08:00
zeyu.fz d20eea5c1c fix(core): 修复 Rerank 字段类型用于请求体中
- 将 Rerank 字段从单对象修改为对象数组以支持多重重排序配置
- 更新 API 类型定义中 Rerank 为数组类型
- 修正 CLI 命令中构造请求体时将单一 Rerank 包装为数组
- 确保传递给后端的 Rerank 参数格式正确匹配接口要求
2026-06-12 10:21:53 +08:00
故璃 a72f0508c3 Merge branch 'main' into feat/model-usage 2026-06-11 12:26:06 +08:00
zeyu.fz c070699fb2 test(knowledge): 移除 API-KEY 与 AK/SK 测试相关代码 2026-06-11 11:45:13 +08:00
zeyu.fz 8604567ce4 chore(core): 更新版本号至 1.3.0 并修正文档格式 2026-06-11 11:37:04 +08:00
故璃 8b4dceafab feat: update doc 2026-06-10 19:47:17 +08:00
故璃 94120d8a2b feat: sync README.ZH 2026-06-10 17:14:42 +08:00
故璃 fabf8e761d feat: sync readme 2026-06-10 17:11:13 +08:00
故璃 c56c394527 feat: sync README 2026-06-10 16:10:45 +08:00
故璃 418596b960 Merge branch 'main' into feat/model-usage 2026-06-10 16:05:37 +08:00
故璃 dd56b04569 feat: add usage/quota/workspace cli command 2026-06-10 16:04:39 +08:00
zeyu.fz 822c4e6bfe fix(cli): 更新知识检索参数兼容性提示 2026-06-10 14:32:40 +08:00
zeyu.fz f90ed8a0cc feat(cli): 优化知识检索命令的rerank参数支持和请求构造 2026-06-10 14:19:17 +08:00
zeyu.fz 3395858c96 fix(cli): 修复检索命令中的 rerank 参数字段名 2026-06-10 13:59:55 +08:00
zeyu.fz b5abcaefd9 docs(cli): 更新 API Key 和相关链接地址 2026-06-09 15:56:29 +08:00
zeyu.fz d93b951d92 docs(cli): 更新 API Key 和相关链接地址 2026-06-09 15:53:53 +08:00
zeyu.fz d5407ae39b Merge remote-tracking branch 'origin/main' into feat/knowledge-api-key 2026-06-09 15:29:50 +08:00
zeyu.fz 20704ff1c6 fix(cli): 优化鉴权逻辑以支持显式API-Key和AK/SK优先级
- 优先使用显式提供的API-Key进行鉴权
- 在无显式API-Key时优先采用显式AK/SK鉴权
- 保持对无显式鉴权信息情况下的自动鉴权兼容
- 重构鉴权判断逻辑以提高代码清晰度和可维护性
2026-06-09 15:25:15 +08:00
若麒 04e7f30dc9 chore(release): bump version to 1.2.1 2026-06-09 00:35:26 +08:00
zeyu.fz 6317da8454 feat(cli): 重构知识库检索命令,支持API-KEY和AK/SK鉴权
- 增加API-KEY鉴权路径,采用DashScope协议(snake_case)请求后端接口
- 保留AK/SK鉴权路径,但打印废弃警告,采用PascalCase请求后端
- 命令参数调整,新增dense-similarity-top-k、sparse-similarity-top-k等API-KEY专用选项
- 废弃部分旧参数如顶层top-k,提醒用户改用rerank-top-n
- 统一输出格式以及静默模式下文本结果的打印逻辑优化
- 添加相关类型定义,完善请求与响应结构的类型支持
- CLI端增加dry-run模式,展示实际请求参数与地址
- E2E测试覆盖API-KEY和AK/SK两条路径,包含帮助提示、错误场景及关键参数测试
- 更新依赖的核心包导出与接口,新增knowledgeRetrieveEndpoint方法接口调用
2026-06-08 18:43:50 +08:00
若麒 ab0cf8c78e docs: rename README_CN.md to README.zh.md and add bailian-cli skill READMEs 2026-06-08 18:38:15 +08:00
qcq01083097 00934973e9 feat: The version synchronization and skills generation are executed in the pre-commit hook 2026-06-08 17:41:33 +08:00
qcq01083097 d75ddb407a feat: Version synchronization & automatic build generation skills 2026-06-08 17:12:25 +08:00
qcq01083097 252f85c717 feat: Fix the generation format of skills 2026-06-08 16:32:07 +08:00
qcq01083097 db5a96158d feat: Migrate official skills back to this repository 2026-06-08 15:29:51 +08:00
若麒 5a0015dc4f fix: sync README and README_CN to packages/cli 2026-06-05 17:22:26 +08:00
Gong Shiqi d08fa2bde5 Merge pull request #29 from modelstudioai/fix/e2e-test
fix(e2e): add DO_NOT_TRACK environment variable to CLI tests
2026-06-05 17:12:07 +08:00
Gong Shiqi d17fdd7e6f Merge pull request #30 from modelstudioai/feat/model-recommend
add model recommend cli commend
2026-06-05 17:09:08 +08:00
若麒 c1969254fa chore(release): bump version to 1.2.0
- Add `bl mcp` command group, security hardening, watermark/flag fixes
- Update CHANGELOG/CHANGELOG_CN with 1.2.0 entry
- Add MCP integration to README features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-05 17:05:04 +08:00
clh02467605 6423dbfc96 fix(e2e): add DO_NOT_TRACK environment variable to CLI tests 2026-06-05 16:19:15 +08:00
故璃 e22dff3b3b feat: add model preferrence 2026-06-05 16:05:50 +08:00
Gong Shiqi 73acb39c2b Merge pull request #27 from modelstudioai/feat/mcp-command
Feat/mcp command
2026-06-05 16:01:53 +08:00