dsh-codearts 0.5.3 → 1.0.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/CHANGELOG.md +96 -0
- package/README.en.md +4 -0
- package/README.md +6 -2
- package/lib/bin.mjs +2 -2
- package/lib/client/index.d.cts +17 -5
- package/lib/client/index.js +746 -397
- package/lib/index.d.mts +11 -8
- package/lib/index.mjs +146 -69
- package/lib/{usage-Djtou78p.mjs → usage-BEoMNRwo.mjs} +7 -1
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# 更新日志
|
|
2
|
+
|
|
3
|
+
本文件记录本插件的重要改动。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
|
|
4
|
+
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
5
|
+
|
|
6
|
+
## [1.0.1] - 2026-10-21
|
|
7
|
+
|
|
8
|
+
### 文档
|
|
9
|
+
|
|
10
|
+
- 新增本更新日志,README 中英文版均增加入口。
|
|
11
|
+
- 修正 README 中「CodeArts 不提供积分接口」的过时说明。
|
|
12
|
+
|
|
13
|
+
## [1.0.0] - 2026-10-21
|
|
14
|
+
|
|
15
|
+
### 新增
|
|
16
|
+
|
|
17
|
+
- 逐账号积分:缓存按账号分槽,状态接口输出 `creditsByAccount`,一个号失败不影响其他号。
|
|
18
|
+
- 「全部账号领取」:逐号串行签到并逐号显示结果;对话底部积分条按所有账号合计。
|
|
19
|
+
- 用量四段式:今日合计 / 近 30 天 / 今日按账号 / 今日按模型。
|
|
20
|
+
- 模型用量横向条形行(模型 · 条 · token · 占比 · 请求数),展示前 5 名。
|
|
21
|
+
|
|
22
|
+
### 变更
|
|
23
|
+
|
|
24
|
+
- 设置页改为 账号 / 模型 / 用量 三个 tab。
|
|
25
|
+
- 每张账号卡独立边框,与「全部账号领取」行之间加分隔。
|
|
26
|
+
- 积分卡显示「已用 / 总额度 / 即将到期」、更新时间与额度重置日。
|
|
27
|
+
- 去掉账号隐藏功能,账号始终显示。
|
|
28
|
+
- 状态接口透出 `last30` 与 `byAccountToday`。
|
|
29
|
+
|
|
30
|
+
## [0.5.3] - 2026-10-21
|
|
31
|
+
|
|
32
|
+
### 新增
|
|
33
|
+
|
|
34
|
+
- 模型下拉、插件卡片、CLI 都带倍率(如 `GLM-5.2 · x0.70`);福利模型显示 ` · x0.00 · 福利`。
|
|
35
|
+
- 「刷新模型列表」按钮:立刻重拉内置 / 限时福利 / agent-center 三路。
|
|
36
|
+
|
|
37
|
+
### 修复
|
|
38
|
+
|
|
39
|
+
- 福利模型被上游判定无权益(`benefit not found`)后当天置灰并说明原因,刷新可立刻恢复。
|
|
40
|
+
- 华为侧 TPM 限额(HTTP 200 + 流内 error_code)改为本地排队指数退避(3s → 30s),
|
|
41
|
+
不再无意义地切换账号;错误信息会写明等待时长。
|
|
42
|
+
|
|
43
|
+
### 变更
|
|
44
|
+
|
|
45
|
+
- 移除手维护的种子模型清单:未登录或三路全失败时目录为空。
|
|
46
|
+
- CLI `status` / `models` 不再输出种子模型(`--json` schema 升到 6)。
|
|
47
|
+
|
|
48
|
+
## [0.5.2] - 2026-10-19
|
|
49
|
+
|
|
50
|
+
### 修复
|
|
51
|
+
|
|
52
|
+
- `deploy` 适配 pnpm 不再写 `.package-map.json` 的变化。
|
|
53
|
+
- 指定 `packageManager: pnpm@11.24.0`,修复 Release workflow 中 pnpm 版本缺失。
|
|
54
|
+
|
|
55
|
+
## [0.5.1] - 2026-10-19
|
|
56
|
+
|
|
57
|
+
### 修复
|
|
58
|
+
|
|
59
|
+
- 底部共享 composer 槽位中的积分条不再被其他插件挤掉,也不挤掉宿主统计。
|
|
60
|
+
|
|
61
|
+
## [0.5.0] - 2026-10-19
|
|
62
|
+
|
|
63
|
+
### 变更
|
|
64
|
+
|
|
65
|
+
- 兼容 dsh 0.2 宿主线,peer range 覆盖整条 0.2.x。
|
|
66
|
+
|
|
67
|
+
## [0.4.2] - 2026-10-16
|
|
68
|
+
|
|
69
|
+
### 新增
|
|
70
|
+
|
|
71
|
+
- 应用内领取每日签到积分,走福利中心 `/v1/ops/delivery` + `/v1/ops/claim`。
|
|
72
|
+
|
|
73
|
+
## [0.4.1] - 2026-10-14
|
|
74
|
+
|
|
75
|
+
### 修复
|
|
76
|
+
|
|
77
|
+
- 「领取积分」按钮改为打开官网登录页,不再直接调用未登录状态的接口。
|
|
78
|
+
|
|
79
|
+
## [0.4.0] - 2026-10-10
|
|
80
|
+
|
|
81
|
+
### 新增
|
|
82
|
+
|
|
83
|
+
- 手动领取积分按钮,按天去重。
|
|
84
|
+
- 文档补充 HMR module-watch 会阻止 pnpm 替换插件的风险提示。
|
|
85
|
+
|
|
86
|
+
## [0.3.0] - 2026-10-10
|
|
87
|
+
|
|
88
|
+
### 新增
|
|
89
|
+
|
|
90
|
+
- 从 CodeArts 官方 API 读取并显示账号的真实积分余额。
|
|
91
|
+
|
|
92
|
+
## [0.2.1] - 2026-10-08
|
|
93
|
+
|
|
94
|
+
### 新增
|
|
95
|
+
|
|
96
|
+
- 首个 npm 发布版本:OAuth2 登录(PKCE + DPoP)、模型发现、CLI 与状态卡。
|
package/README.en.md
CHANGED
|
@@ -133,6 +133,10 @@ other local processes cannot impersonate it.
|
|
|
133
133
|
- Docs: README and INSTALL have English versions; [DEV.md](./DEV.md) (hot-reload dev loop)
|
|
134
134
|
is Chinese-only for now.
|
|
135
135
|
|
|
136
|
+
## Changelog
|
|
137
|
+
|
|
138
|
+
See [CHANGELOG.md](https://github.com/elegant01/dsh-codearts/blob/main/CHANGELOG.md) for the changes in each release.
|
|
139
|
+
|
|
136
140
|
## Disclaimer
|
|
137
141
|
|
|
138
142
|
- This project is **for personal study and research only**. It drives the user’s own
|
package/README.md
CHANGED
|
@@ -99,11 +99,15 @@ shim 只监听回环地址,并校验 Host、Origin 与本进程随机密钥,
|
|
|
99
99
|
`InferHub.001001005.400`。插件按**实测上限**下发请求(免费 DeepSeek 系列 65536、
|
|
100
100
|
GLM-5.2 已实测可到 131072),没实测过的模型退回 65536 保守值。上下文长度用发现值,
|
|
101
101
|
它只影响 DSH 的上下文计量与截断余量。
|
|
102
|
-
-
|
|
103
|
-
|
|
102
|
+
- 用量账本只统计**本机经插件发出**的请求,不等于账号总额度;额度/积分以卡片上的账号余额为准,
|
|
103
|
+
官方明细走卡片里的链接。账本按天保留 60 天,换机器/清 `$DSH_HOME` 即丢失。
|
|
104
104
|
- 文档:README 与 INSTALL 有英文版([README.en.md](./README.en.md) / [INSTALL.en.md](./INSTALL.en.md)),
|
|
105
105
|
[DEV.md](./DEV.md)(热重载开发循环)目前只有中文。
|
|
106
106
|
|
|
107
|
+
## 更新日志
|
|
108
|
+
|
|
109
|
+
各版本的改动见 [CHANGELOG.md](https://github.com/elegant01/dsh-codearts/blob/main/CHANGELOG.md)。
|
|
110
|
+
|
|
107
111
|
## 免责声明
|
|
108
112
|
|
|
109
113
|
- 本项目**仅供个人学习和研究使用**,仅驱动使用者自己的账号在本机调用,请勿用于商业用途或
|
package/lib/bin.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as isBenefitModel, N as codeartsAccountsPath, j as CodeArtsAccountStore, n as codeartsUsagePath, r as discoverModels, t as CodeArtsUsageTracker, u as fetchCallerIdentity } from "./usage-
|
|
2
|
+
import { A as isBenefitModel, N as codeartsAccountsPath, j as CodeArtsAccountStore, n as codeartsUsagePath, r as discoverModels, t as CodeArtsUsageTracker, u as fetchCallerIdentity } from "./usage-BEoMNRwo.mjs";
|
|
3
3
|
import { existsSync, statSync } from "node:fs";
|
|
4
4
|
//#region src/version.ts
|
|
5
|
-
const CODEARTS_VERSION = "0.
|
|
5
|
+
const CODEARTS_VERSION = "1.0.1";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/bin.ts
|
|
8
8
|
/**
|
package/lib/client/index.d.cts
CHANGED
|
@@ -2,6 +2,10 @@ import { Context } from "@deepseek-ai/cordis";
|
|
|
2
2
|
//#region src/client/locales.d.ts
|
|
3
3
|
interface CodeArtsSettingsKey {
|
|
4
4
|
tabLabel: string;
|
|
5
|
+
tabsLabel: string;
|
|
6
|
+
tabAccounts: string;
|
|
7
|
+
tabModels: string;
|
|
8
|
+
tabUsage: string;
|
|
5
9
|
cardTitle: string;
|
|
6
10
|
statusSignedIn: string;
|
|
7
11
|
statusSignedOut: string;
|
|
@@ -19,10 +23,9 @@ interface CodeArtsSettingsKey {
|
|
|
19
23
|
saveToken: string;
|
|
20
24
|
expiredHint: string;
|
|
21
25
|
accountsTitle: string;
|
|
22
|
-
accountsShow: string;
|
|
23
|
-
accountsHide: string;
|
|
24
26
|
accountRemove: string;
|
|
25
27
|
addAccount: string;
|
|
28
|
+
pasteTokenAdd: string;
|
|
26
29
|
accountsRotateHint: string;
|
|
27
30
|
accountNeedsSignIn: string;
|
|
28
31
|
accountNoKey: string;
|
|
@@ -53,7 +56,11 @@ interface CodeArtsSettingsKey {
|
|
|
53
56
|
modelsLoading: string;
|
|
54
57
|
usageTitle: string;
|
|
55
58
|
usageToday: string;
|
|
59
|
+
usageTodayTotal: string;
|
|
60
|
+
usageLast30: string;
|
|
61
|
+
usageByAccount: string;
|
|
56
62
|
usageRequests: string;
|
|
63
|
+
usageRequestCount: string;
|
|
57
64
|
usageTokens: string;
|
|
58
65
|
usageAllTime: string;
|
|
59
66
|
usageByModel: string;
|
|
@@ -64,19 +71,24 @@ interface CodeArtsSettingsKey {
|
|
|
64
71
|
usageStateDisabled: string;
|
|
65
72
|
usageNoQuota: string;
|
|
66
73
|
usageEmpty: string;
|
|
67
|
-
|
|
68
|
-
creditsRemaining: string;
|
|
74
|
+
creditsUnit: string;
|
|
69
75
|
creditsUsed: string;
|
|
70
|
-
|
|
76
|
+
creditsUsedOfTotal: string;
|
|
77
|
+
creditsTotal: string;
|
|
78
|
+
creditsExpiringShort: string;
|
|
79
|
+
creditsUpdated: string;
|
|
71
80
|
creditsReset: string;
|
|
81
|
+
creditsDetailLink: string;
|
|
72
82
|
creditsTokensToday: string;
|
|
73
83
|
creditsTokensBalance: string;
|
|
74
84
|
creditsUnavailable: string;
|
|
85
|
+
creditsNeedSignIn: string;
|
|
75
86
|
creditsDock: string;
|
|
76
87
|
creditsDockTitle: string;
|
|
77
88
|
claimButton: string;
|
|
78
89
|
claimButtonDone: string;
|
|
79
90
|
claimPending: string;
|
|
91
|
+
claimAll: string;
|
|
80
92
|
claimHint: string;
|
|
81
93
|
claimDone: string;
|
|
82
94
|
claimAlready: string;
|