dsh-kolors 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +38 -2
- package/client.js +1831 -0
- package/cordis.patch.yml +7 -0
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/preview.svg +68 -0
- package/icon.svg +5 -0
- package/index.js +1346 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-kolors contributors
|
|
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,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-kolors
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DeepSeek Harness 左侧栏插件:用硅基流动免费的 `Kwai-Kolors/Kolors` 出图。
|
|
4
|
+
|
|
5
|
+
- **生图页**:提示词、可调参数(5 档尺寸带比例示意、步数、贴合度、反向提示词、种子、水印开关)、浏览窗口(保存 / 下载 / 删除 / 放大)。
|
|
6
|
+
- **历史页**:1 / 3 / 7 / 30 天 / 全部筛选,多选与批量删除,放大、翻页、复用参数、下载、复制路径,外加回收站(恢复 / 彻底删除 / 清空)。
|
|
7
|
+
- **设置页**:Key 池(多 Key 轮换,单 Key 也能用)、图片保存目录(手填或系统选择器)、两个目录的一键打开。
|
|
8
|
+
|
|
9
|
+
没保存的图只活在这一页:切标签、刷新页面都还在,彻底关掉 DSH 后清空。
|
|
10
|
+
额度:每 Key 每分钟 2 张、每天 400 张,本机先挡一道,计数写盘、重启不清零。
|
|
11
|
+
|
|
12
|
+
同时注册 `kolors_image` 工具,让模型在对话里直接出图,走同一套额度和同一个保存文件夹。
|
|
13
|
+
|
|
14
|
+
## 本机文件
|
|
15
|
+
|
|
16
|
+
| 文件 | 用途 |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `~/.dsh/secrets/kolors.env` | API Key(权限 600) |
|
|
19
|
+
| `~/.dsh/dsh-kolors.json` | 输出目录、上次参数、Key 元数据、用量、当前浏览窗口里的那张图 |
|
|
20
|
+
| `~/.dsh/kolors-frames/` | 浏览窗口那张图的本体,界面从不指路,重启时清空 |
|
|
21
|
+
| `<输出目录>/dsh-kolors-image/` | 保存的图 + `index.json` |
|
|
22
|
+
| `<输出目录>/dsh-kolors-image/dsh-kolors-trash/` | 回收站 + `index.json` |
|
|
23
|
+
|
|
24
|
+
## 限制
|
|
25
|
+
|
|
26
|
+
- Kolors 免费,但平台要求账户余额 ≥ 0,余额见底返回 402。
|
|
27
|
+
- 上游图片地址只活 1 小时,所以生成后立刻下载到本机。
|
|
28
|
+
- 尺寸只有 `1024x1024`、`960x1280`、`768x1024`、`720x1440`、`720x1280`。
|
|
29
|
+
- 内嵌 webview 会拦掉 `target="_blank"`,用「下载这张」或「复制文件路径」代替新标签页。
|
|
30
|
+
|
|
31
|
+
## 自检
|
|
32
|
+
|
|
33
|
+
| 命令 | 作用 |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `node scripts/selftest.mjs` | Host 侧离线:Key 池、额度窗口、保存/历史/回收站/恢复/清空、换页保持、重启清空、越权路径、插件装配 |
|
|
36
|
+
| `node scripts/clientaudit.mjs` | 浏览器侧静态:模块形状、标识符、中英字典对齐、主题令牌、hook 依赖、复制路径分支 |
|
|
37
|
+
| `node scripts/pathcheck.mjs` | 真跑 `fullPathOf`:生图页 / 历史页 / 回收站三种记录形状都要拿到绝对路径 |
|
|
38
|
+
| `node scripts/toolschema.mjs` | 用真实 `dsh-tools` 校验 `kolors_image` 的出入参 schema(需 Harness 在跑) |
|
|
39
|
+
| `node scripts/livecheck.mjs` | 打到运行中的插件:保存、历史、回收站、恢复、清空、图片流、越权(需 Harness 在跑) |
|