90 Commits

Author SHA1 Message Date
若麒 17c52fb86f Merge branch 'main' into fix/default-model 2026-07-28 15:46:46 +08:00
rendianmeng 871c667e97 docs: install shell md 2026-07-28 13:49:51 +08:00
qcq01083097 58252911a8 fix(image): correct wan2.5/2.6 size presets and wanx-v1 dated aliases 2026-07-27 21:09:32 +08:00
故璃 bd17c27023 feat: index.json protocol adapter 2026-07-27 15:41:04 +08:00
qcq01083097 c4f5bb09c6 fix(image): resolve size and prompt_extend by model profile
Stop inferring size/prompt_extend from sync vs async; use per-family sizeProfile. wanx*-imageedit uses function+base_image_url; bare qwen-image uses the fixed resolution table.
2026-07-27 10:17:09 +08:00
qcq01083097 9a13700390 fix(image): route text-to-image and image-edit by model family
Fix wanx/wan2.x-t2i, wan2.5-i2i, z-image, and qwen-image-plus hitting the wrong endpoint, and add routing unit tests plus dry-run coverage.
2026-07-27 10:16:25 +08:00
故璃 8dd786287f feat: add skill commend 2026-07-24 19:56:53 +08:00
rendianmeng d30fb2ae68 feat(release): distribute binaries as per-platform zips 2026-07-24 15:33:15 +08:00
chenanran555 1d589c5178 Merge remote-tracking branch 'origin/main' into feat/cma 2026-07-24 14:52:21 +08:00
若麒 92ee845bdd fix(core): normalize model base URL to origin 2026-07-23 19:31:02 +08:00
rendianmeng 66a797203c multi channel install test 2026-07-23 17:34:30 +08:00
chenanran555 7cbd61dd5c Merge remote-tracking branch 'origin/main' into feat/cma
# Conflicts:
#	packages/commands/src/commands/auth/login.ts
#	packages/commands/src/commands/config/set.ts
#	packages/commands/src/index.ts
#	packages/core/src/client/index.ts
#	packages/core/src/config/schema.ts
#	skills/bailian-cli/reference/auth.md
#	skills/bailian-cli/reference/config.md
#	skills/bailian-cli/reference/index.md
2026-07-22 16:38:46 +08:00
chenanran555 d6bd38a46a feat(agent): agent相关cli命令的client层功能,对齐cli client的基础能力 2026-07-22 13:40:28 +08:00
若麒 81539005cc Merge branch 'main' into feat/token-plan-default-models 2026-07-22 09:55:39 +08:00
若麒 4c566fd60e feat(token-plan): support local images with base64 data URIs
- convert local images to Base64 for Token Plan image and video commands
- preserve the existing OSS upload flow for standard API Key profiles
- use wan2.7-image as the default image model with the sync endpoint
- hide full Base64 image content in dry-run output
- add Token Plan compatibility tests and update related docs
2026-07-22 09:54:54 +08:00
若麒 4ca3e2de80 feat(config): update token-plan default models
- switch the default text model to qwen3.8-max-preview
- add dedicated T2V, I2V, and R2V model defaults
- persist and consume per-mode video model settings
- enable thinking when validating the qwen3.8 preview model
2026-07-20 16:44:53 +08:00
若麒 a03ba673be fix(auth): clear model base URL on full logout 2026-07-17 15:57:23 +08:00
若麒 ece0c8dd1c feat(config): activate explicit profile after successful login 2026-07-17 09:59:14 +08:00
若麒 84805f287c fix(core): normalize model base URLs across all sources
- preserve custom gateway path prefixes
- strip query, fragment, trailing slash, and known SDK suffixes
- normalize flag, environment, config, and fallback sources
- normalize auth and config writes before persistence
- add resolver, login, config, and UI coverage
2026-07-16 14:43:26 +08:00
若麒 de9f1a3889 feat(config): add active profile selection
- persist the active profile in config.json
- resolve config with --config > active_config > default
- add config list and config use commands
- make auth and config writes target the selected profile
- reset activation to default when deleting the active profile
- update config UI with profile activation controls
- keep token refresh and pipeline execution profile-aware
- add loader, UI, auth, and CLI interaction coverage
2026-07-16 11:05:59 +08:00
若麒 64ff057fe5 feat(auth): support token-plan model profile login
- add the built-in Token Plan profile preset
- validate and persist model API keys atomically
- materialize the default Base URL and models on login
- preserve flag > env > config precedence
2026-07-15 16:26:43 +08:00
lisheng.lisheng e0f3d450ae feat(config): add "config ui" local web UI to manage config profiles
启动绑定 127.0.0.1 的本地 HTTP server + 内嵌单页 WebUI,可视化查看/
新建/切换/删除全部命名 profile 并编辑键值与凭证。

- core: readConfigProfiles / deleteConfigProfile 全量配置读写 API
- commands/config/shared.ts: 抽出 VALID_KEYS/别名/校验,set.ts 复用
- commands/shared/local-server.ts: 抽出 listen/openInBrowser,login-console 复用
- config ui: token + Host 校验,--config 决定初始聚焦,密钥明文可编辑
2026-07-13 14:20:32 +08:00
lisheng.lisheng ac4dbb9e88 Merge branch 'main' of github.com:modelstudioai/cli into feat/cli-access-token 2026-07-13 13:13:29 +08:00
lisheng.lisheng 155c9dc883 feat(config): 支持命名配置功能并隔离默认配置数据
- 新增 `--config <name>` 参数支持读取与写入命名的配置块
- 命名配置与默认配置完全隔离,互不影响
- 规范命名配置名称格式,禁止路径穿越及顶层字段冲突
- 配置文件读取写入逻辑改为维护原始完整对象,支持多配置块共存
- AuthStore 和 ConfigStore 均支持命名配置,登录登出只影响指定配置块
- CLI 命令增加对 `--config` 标志的支持,包括 config set/show/auth status 等
- 鉴权状态输出带上配置名和配置文件路径信息
- 提示和报错信息包含配置相关上下文,增强用户体验
- 完善相关单元测试覆盖命名配置行为
2026-07-13 13:04:50 +08:00
lisheng.lisheng e1532bf35c feat(bootstrap): 新增创建控制台用户步骤,完善服务激活流程
- 在 bootstrap 命令流程中添加第 3 步,调用 createUser 接口创建控制台账号用户
- 修改 callApi 函数支持传入请求体参数
- 增强错误日志输出,显示更完整的错误响应内容
- 在服务启动时校验登录信息包含 aliyun.uid,否则抛出错误
- 优化商品检查与激活逻辑,更清晰的状态输出及错误处理
- 在 CLI-core 控制台网关请求中添加日志,打印结构化请求负载,支持 verbose 模式
- BailianError 新增 rawResponse 字段,保存原始错误响应数据
- 增加 bootstrap 命令单元测试,覆盖用户创建及不同初始化场景
- 调整测试框架用例,增加调用控制台网关及错误处理的测试覆盖
2026-07-10 17:57:06 +08:00
故璃 068ec0bfd3 Merge branch 'feat/self-built-framework' into feat/model-deploy-update 2026-07-09 15:37:21 +08:00
若麒 2debfdba6b feat(auth): add OpenAPI AK/SK auth domain for token plan
- add openapi auth requirement with command-scoped access key flags and paired credential resolution
- persist OpenAPI credentials through auth login/status/logout using access_key_* config fields
- route token-plan commands through the centralized ACS signing client
- keep legacy openapi_access_key_* config readable while rejecting it as a new config set key
- refresh docs, generated references, telemetry authMethod, and e2e coverage
2026-07-09 15:03:48 +08:00
故璃 8fd072bcd1 feat: merge self-built-framework 2026-07-09 10:02:56 +08:00
若麒 b0c48bab6b Merge branch 'main' into feat/self-built-framework 2026-07-08 14:05:48 +08:00
若麒 476dd3b841 refactor(output): centralize ANSI styling and remove no-color flag
- remove --no-color from GLOBAL_FLAGS and drop Settings.noColor
- move ANSI styling decisions into runtime color helpers with NO_COLOR support
- update command text renderers to use shared color helpers instead of local ANSI codes
- refresh e2e invocations, generated reference, and agent skill guidance
2026-07-07 00:07:21 +08:00
若麒 468b4d710e refactor(flags): scope yes/async/concurrent to command-owned flags
- remove nonInteractive plus yes/async/concurrent from GLOBAL_FLAGS and Settings;
  command dispatch no longer resolves command-only switches into global settings
- add shared ASYNC_FLAG / CONCURRENT_FLAG definitions for commands that actually
  support task-only return or parallel requests
- keep quota downgrade protection by moving --yes onto quota request and reading
  flags.yes for confirmed downgrade submission
- update existing async/concurrent consumers to read own flags; no new capability
  matrix entries are added
- refresh generated command reference and remove stale --non-interactive usage
  from e2e/stress invocations
2026-07-06 20:43:29 +08:00
若麒 deab3b3841 refactor(flags): scope credential flags by command auth domain
- flags split into GLOBAL_FLAGS (all commands) plus MODEL_AUTH_FLAGS /
  CONSOLE_AUTH_FLAGS, parsed only for commands of the matching auth
  domain; cross-domain flags now fail with "Unknown flag" instead of
  being silently ignored
- all shadow redeclarations removed; the registry guard now rejects any
  own flag named after a reserved (global or visible-domain) flag
- --workspace-id joins the console domain (chain: flag > env > file);
  usage stats drops its private declaration and in-command priority
- auth login declares its credential args as own command parameters
  (--api-key / --base-url / --console-site, original behavior intact);
  auth status no longer accepts credential-domain overrides (use env or
  config set instead)
- command help and the generated reference both show Flags (own + auth
  domain) plus a full Global Flags section, replacing the footer hint
- breaking: pipeline run --timeout renamed to --step-timeout (collided
  with the global request timeout)
2026-07-06 17:42:11 +08:00
若麒 d31b7f83ca refactor(core): split god Config into Identity/Settings/Credential resolved at the dispatch boundary
- commands consume a narrowed context (identity/settings/own flags/client);
  config/auth commands additionally use configStore()/authStore() accessors
- resolution happens once at dispatch: buildSources/buildSettings plus
  per-domain credential resolvers; dry-run tolerates missing credentials
- transport takes structured deps; credentials are injected only by Client;
  console gateway takes a resolved target with optional token (anonymous
  catalog calls); pipeline steps and advisor run against client/settings
- telemetry receives authMethod as a value; global/command flags are split
  at dispatch with a same-type shadowing guard at registry build
- behavior change: base URL resolution now prefers DASHSCOPE_BASE_URL env
  over config file base_url (unified flag > env > file > default chain)
- priority chains, store semantics and command capability boundaries are
  locked by unit tests
2026-07-06 15:59:33 +08:00
qcq01083097 d24b41d452 feat: Remove the logic related to region 2026-06-16 18:16:10 +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 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
qcq01083097 f3c35c411b feat: Dealing with redundancy and semanticization of file names 2026-06-04 17:30:30 +08:00
qcq01083097 6436ca88eb fix: Fix the issue of the watermark being always on and address the issue of paired flags 2026-06-04 17:07:11 +08:00
Claude ba074f566d fix(security): validate base_url / console_gateway_url as real http(s) URLs
The config file accepted any value that merely starts with "http" (so even
"httpfoo://evil" passed) for base_url and console_gateway_url — origins the
client sends the Bearer token to. Validate them with `new URL()` and an
http:/https: protocol check instead, rejecting malformed values. Valid http(s)
URLs (including custom proxies and local http) are unaffected.

https://claude.ai/code/session_017ZGQCjwNQF5Pz96gLUnnG1
2026-05-29 12:44:50 +00:00
若麒 1533e2013e Initial commit 2026-05-28 18:37:07 +08:00