dsh-balance-hub 0.0.0-stage → 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 d1019296026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,35 @@
1
- # Temporary Holding Version
1
+ # dsh-balance-hub (余额总览)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 在 DeepSeek Harness(DSH)侧栏「余额」面板与 Agent 工具 `balance_query` 中,集中查询 9 家 AI 供应商的账户充值余额与 Plan 套餐配额(共 13 个条目),并支持可自定义分钟间隔的定时刷新:
4
+
5
+ - **DeepSeek**(API Key)
6
+ - **智谱 API** & **智谱 Coding Plan**(可分别配置同时显示)
7
+ - **MiniMax API**(`sk-api-*`)& **MiniMax Coding Plan**(`sk-cp-*`,可分别配置同时显示)
8
+ - **Kimi API** & **Kimi Coding Plan**(可分别配置同时显示)
9
+ - **阿里百炼**(阿里云费用中心 OpenAPI `QueryAccountBalance`,使用 RAM AK / SK;百炼 Coding Plan 官方无额度查询 API)
10
+ - **腾讯混元**(腾讯云计费 OpenAPI `DescribeAccountBalance`,使用 SecretId / SecretKey)
11
+ - **字节火山 API**(费用中心 `QueryBalanceAcct`,AK / SK)& **字节火山 Coding Plan**(方舟 `GetCodingPlanUsage`,AK / SK)
12
+ - **小米 MiMo**(API Key)
13
+ - **谷歌 Antigravity**(自动关联 `dsh-agy-link` 账号池 `~/.dsh/agy-accounts/pool.json` 与本地刷新接口,显示 Gemini / Argon / Claude 5h & 7d 配额)
14
+
15
+ ## 安装与使用
16
+
17
+ ```bash
18
+ # 通过 DSH CLI 安装(npm 包发布后可用)
19
+ dsh plugin add dsh-balance-hub
20
+ ```
21
+
22
+ 1. 在 DSH 中打开 **Plugins → Add plugin**,输入 npm 包名 `dsh-balance-hub`、GitHub 仓库 `https://github.com/d1019296026/dsh-balance-hub` 或本地目录 `dsh-balance-hub`。
23
+ 2. 启用后,左侧栏会出现「余额」图标,点击打开面板。
24
+ 3. 展开对应供应商行即可录入凭据并点击「保存并测试」(谷歌 Antigravity 会在检测到 `dsh-agy-link` 账号池后自动关联)。所有密钥存储在 DSH 凭据库(`balance-hub/<provider>`)中,不会写入配置文件或日志,也不会通过 HTTP 接口或工具结果返回。
25
+ 4. 在面板顶部可开启或关闭**定时查询**,支持 5 / 15 / 30 / 60 分钟快捷预设或 1–1440 分钟自定义间隔,配置保存在 `~/.dsh/balance-hub-schedule.json`。
26
+ 5. 在新对话中可直接让智能体查询各账户余额与配额(内部调用 `balance_query` 工具)。
27
+
28
+ ## 安全与权限建议
29
+
30
+ - 定时查询默认为关闭;开启后将按设定间隔自动刷新,插件停用或关闭开关后立即停止。
31
+ - **腾讯混元**与**字节火山**(以及阿里百炼 AK/SK 模式)使用的是云账号访问密钥,建议创建**仅含计费只读权限**的子账号:
32
+ - 腾讯云:`QCloudFinanceReadOnlyAccess`
33
+ - 火山引擎:`BillingReadOnly`
34
+ - 阿里云:`AliyunBSSReadOnlyAccess`(或 `bss:DescribeAcccount`)
35
+ - 本插件仅允许向各供应商受信任官方域名发起请求,拒绝 HTTP 重定向。