mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
125be085e5
- Updated build process to include a new script for building the client bundle in ModuleLoader format. - Introduced `build-client.mjs` to handle client-side bundling with esbuild. - Added `client.ts` to implement the DSH web UI, including settings and usage pages. - Registered new settings section for managing credentials and token usage. - Refactored API routes to remove `/api` prefix for consistency. - Cleaned up Vite configuration by removing unused client entry.
54 lines
2.5 KiB
YAML
54 lines
2.5 KiB
YAML
# bailian-cli-dsh — Aliyun Model Studio (Bailian) as a dsh profile bundle.
|
|
#
|
|
# Inserts Bailian plugin rows: TokenPlan usage display + cross-session memory.
|
|
# Every inserted id is `bailian-`-prefixed so a user profile can address,
|
|
# reconfigure, or disable any single capability without touching the others.
|
|
# Remember that a later patch REPLACES a row's whole `config` rather than
|
|
# merging into it, so restate the complete config when overriding.
|
|
|
|
- insert:
|
|
# Client-only row: name is the package ROOT (no subpath) so client-modules
|
|
# can resolve "<name>/package.json" and detect the dsh.client declaration.
|
|
# Its node half (dist/index.mjs) is a no-op; the row exists to serve the
|
|
# browser bundle (client.bundle.js) that renders the Bailian settings page
|
|
# and the new-session welcome page.
|
|
- id: bailian-client
|
|
name: bailian-cli-dsh
|
|
|
|
# TokenPlan usage display (dual-face: Host provides two webServer routes,
|
|
# Client renders a general "Bailian" settings.section page). All bl commands
|
|
# use `--config dsh` to isolate credentials in a dedicated bl profile.
|
|
#
|
|
# Two routes:
|
|
# POST /api/bailian/credentials — saves AK/SK to dsh profile
|
|
# (bl auth login --open-api --config dsh). Generates fresh access_token.
|
|
# POST /api/bailian/tokenplan/usage — fetches personal-edition usage
|
|
# using the dsh profile (no AK/SK in body; credentials already saved).
|
|
#
|
|
# Users configure AK/SK once on the settings page; all future Bailian
|
|
# plugins reuse the same dsh profile credentials.
|
|
#
|
|
# Config fields:
|
|
# accessKeyId / accessKeySecret: fallback when not provided via UI.
|
|
# consoleRegion: default region (cn-beijing).
|
|
# consoleSite: domestic | international (default: domestic).
|
|
# profile: bl config profile name (default: dsh).
|
|
- id: bailian-tokenplan-usage
|
|
name: bailian-cli-dsh/tokenplan-usage
|
|
config: {}
|
|
|
|
# Disabled by default: memory add/search are billed per call. Enable in
|
|
# the profile patch and configure API Key + parameters on the Bailian
|
|
# settings page. Calls DashScope memory v2 API directly (not bl memory)
|
|
# for full parameter control (min_score, enable_rerank, plan_version,
|
|
# memory_library_id, enable_judge, enable_rewrite).
|
|
- id: bailian-memory
|
|
name: bailian-cli-dsh/memory
|
|
disabled: true
|
|
config:
|
|
baseUrl: "https://dashscope.aliyuncs.com/api/v2/apps/memory/"
|
|
planVersion: "lite"
|
|
topK: 10
|
|
autoInject: true
|
|
autoPersist: true
|