dsh-usage-spend 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 +21 -0
- package/README.md +93 -2
- package/README.zh.md +94 -0
- package/cordis.patch.yml +11 -0
- package/icon.svg +4 -0
- package/lib/client.js +1351 -0
- package/lib/index.js +20 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +72 -4
package/lib/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host loader entry for dsh-usage-cost.
|
|
3
|
+
*
|
|
4
|
+
* The feature is browser-only: the usage projection, the composer dock and the
|
|
5
|
+
* turn-footer amount all live in the client runtime, and pricing is a local
|
|
6
|
+
* table. This entry exists so the row is a normal Cordis plugin and so the
|
|
7
|
+
* settings service can expose a live (volatile) configuration form for it.
|
|
8
|
+
*/
|
|
9
|
+
import z from "@deepseek-ai/schemastery";
|
|
10
|
+
|
|
11
|
+
/** Fields the Plugins page may edit without reloading the plugin. */
|
|
12
|
+
export const Config = z.object({
|
|
13
|
+
currency: z.union(["CNY", "USD", "BOTH"]).default("CNY").volatile(),
|
|
14
|
+
usdToCny: z.number().default(7.2).volatile(),
|
|
15
|
+
showBalance: z.boolean().default(true).volatile(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const name = "dsh-usage-cost";
|
|
19
|
+
|
|
20
|
+
export function apply() {}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-usage-spend",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Session token usage and estimated spend for DSH, priced with DeepSeek peak and off-peak rates: a composer usage pill, the amount appended to the built-in per-turn usage action, and a settings form for currency and exchange rate.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "itiswaller",
|
|
8
|
+
"main": "lib/index.js",
|
|
9
|
+
"icon": "./icon.svg",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./lib/index.js",
|
|
12
|
+
"./client": "./lib/client.js",
|
|
13
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
14
|
+
"./locale/*.json": "./locale/*.json",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"lib/index.js",
|
|
19
|
+
"lib/client.js",
|
|
20
|
+
"cordis.patch.yml",
|
|
21
|
+
"locale",
|
|
22
|
+
"icon.svg",
|
|
23
|
+
"README.md",
|
|
24
|
+
"README.zh.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"dsh",
|
|
29
|
+
"dsh-plugin",
|
|
30
|
+
"deepseek-harness",
|
|
31
|
+
"cordis",
|
|
32
|
+
"usage",
|
|
33
|
+
"cost",
|
|
34
|
+
"spend",
|
|
35
|
+
"token"
|
|
36
|
+
],
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/iamwaller/dsh-usage-spend.git"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/iamwaller/dsh-usage-spend#readme",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/iamwaller/dsh-usage-spend/issues"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"registry": "https://registry.npmjs.org/"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20",
|
|
50
|
+
"dsh": "^0.2.2-rc.1"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"test": "node --test tests/pricing.test.mjs",
|
|
54
|
+
"prepublishOnly": "node scripts/prepublish.mjs"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@deepseek-ai/schemastery": "^3.18.5"
|
|
58
|
+
},
|
|
59
|
+
"dsh": {
|
|
60
|
+
"bundle": {
|
|
61
|
+
"patch": "./cordis.patch.yml"
|
|
62
|
+
},
|
|
63
|
+
"client": {
|
|
64
|
+
"inject": [
|
|
65
|
+
"@deepseek-ai/dsh-client-locale",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-chat"
|
|
69
|
+
],
|
|
70
|
+
"platform": "web"
|
|
71
|
+
},
|
|
72
|
+
"manifestVersion": 1
|
|
73
|
+
}
|
|
74
|
+
}
|