dsh-budget 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.
Files changed (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +201 -0
  3. package/README.es.md +140 -0
  4. package/README.hi.md +140 -0
  5. package/README.md +140 -0
  6. package/README.pt.md +140 -0
  7. package/README.zh.md +140 -0
  8. package/SECURITY.md +37 -0
  9. package/THIRD_PARTY_NOTICES.md +23 -0
  10. package/cordis.patch.yml +73 -0
  11. package/lib/client.js +4893 -0
  12. package/lib/client.js.map +1 -0
  13. package/lib/index.js +1225 -0
  14. package/lib/typert.host.js +26 -0
  15. package/lib/types/aggregate/usage.d.ts +112 -0
  16. package/lib/types/aggregate/usage.d.ts.map +1 -0
  17. package/lib/types/client/BudgetTab.d.ts +18 -0
  18. package/lib/types/client/BudgetTab.d.ts.map +1 -0
  19. package/lib/types/client/index.d.ts +35 -0
  20. package/lib/types/client/index.d.ts.map +1 -0
  21. package/lib/types/client/locales.d.ts +42 -0
  22. package/lib/types/client/locales.d.ts.map +1 -0
  23. package/lib/types/client/present.d.ts +19 -0
  24. package/lib/types/client/present.d.ts.map +1 -0
  25. package/lib/types/client/remote.d.ts +270 -0
  26. package/lib/types/client/remote.d.ts.map +1 -0
  27. package/lib/types/client/styles.d.ts +12 -0
  28. package/lib/types/client/styles.d.ts.map +1 -0
  29. package/lib/types/command.d.ts +51 -0
  30. package/lib/types/command.d.ts.map +1 -0
  31. package/lib/types/config.d.ts +132 -0
  32. package/lib/types/config.d.ts.map +1 -0
  33. package/lib/types/estimate/carbon.d.ts +128 -0
  34. package/lib/types/estimate/carbon.d.ts.map +1 -0
  35. package/lib/types/estimate/cost.d.ts +71 -0
  36. package/lib/types/estimate/cost.d.ts.map +1 -0
  37. package/lib/types/estimate/latency-stats.d.ts +111 -0
  38. package/lib/types/estimate/latency-stats.d.ts.map +1 -0
  39. package/lib/types/estimate/models.d.ts +29 -0
  40. package/lib/types/estimate/models.d.ts.map +1 -0
  41. package/lib/types/estimate/prices.d.ts +85 -0
  42. package/lib/types/estimate/prices.d.ts.map +1 -0
  43. package/lib/types/estimate/sanitize.d.ts +56 -0
  44. package/lib/types/estimate/sanitize.d.ts.map +1 -0
  45. package/lib/types/events.d.ts +57 -0
  46. package/lib/types/events.d.ts.map +1 -0
  47. package/lib/types/governance.d.ts +67 -0
  48. package/lib/types/governance.d.ts.map +1 -0
  49. package/lib/types/index.d.ts +50 -0
  50. package/lib/types/index.d.ts.map +1 -0
  51. package/lib/types/service.d.ts +67 -0
  52. package/lib/types/service.d.ts.map +1 -0
  53. package/lib/types/typert.host.d.ts +258 -0
  54. package/lib/types/typert.host.d.ts.map +1 -0
  55. package/lib/types/wire.d.ts +629 -0
  56. package/lib/types/wire.d.ts.map +1 -0
  57. package/lib/wire-DVO8yw7L.js +4219 -0
  58. package/package.json +164 -0
package/package.json ADDED
@@ -0,0 +1,164 @@
1
+ {
2
+ "name": "dsh-budget",
3
+ "version": "0.1.0",
4
+ "description": "Cost governance for DeepSeek Harness: aggregated token/cost metering per model, session and day, session/daily/monthly budget caps with threshold alerts (desktop notification + webhook) and alert/block/degrade over-limit policies, built-in carbon footprint estimation and per-model latency benchmarks, a Settings budget tab, and the /budget command",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/PerryLink/dsh-budget.git"
8
+ },
9
+ "homepage": "https://github.com/PerryLink/dsh-budget#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/PerryLink/dsh-budget/issues"
12
+ },
13
+ "author": "PerryLink",
14
+ "private": false,
15
+ "type": "module",
16
+ "main": "./lib/index.js",
17
+ "types": "./lib/types/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./lib/types/index.d.ts",
21
+ "default": "./lib/index.js"
22
+ },
23
+ "./typert": {
24
+ "types": "./lib/types/typert.host.d.ts",
25
+ "default": "./lib/typert.host.js"
26
+ },
27
+ "./client": {
28
+ "types": "./lib/types/client/index.d.ts",
29
+ "default": "./lib/client.js"
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "files": [
34
+ "lib",
35
+ "cordis.patch.yml",
36
+ "CHANGELOG.md",
37
+ "THIRD_PARTY_NOTICES.md",
38
+ "SECURITY.md",
39
+ "README.md",
40
+ "README.zh.md",
41
+ "README.es.md",
42
+ "README.pt.md",
43
+ "README.hi.md",
44
+ "LICENSE"
45
+ ],
46
+ "dsh": {
47
+ "bundle": {
48
+ "patch": "./cordis.patch.yml"
49
+ },
50
+ "client": {
51
+ "platform": "web",
52
+ "inject": [
53
+ "@deepseek-ai/dsh-client-connection",
54
+ "@deepseek-ai/dsh-client-runtime",
55
+ "@deepseek-ai/dsh-client-locale",
56
+ "@deepseek-ai/dsh-client-ui-settings"
57
+ ]
58
+ }
59
+ },
60
+ "dshWorkshop": {
61
+ "schema": "omdsh-workshop-package/v1",
62
+ "type": "plugin",
63
+ "integration": {
64
+ "protocol": "harness-profile",
65
+ "artifact": "cordis.patch.yml"
66
+ },
67
+ "install": {
68
+ "mode": "transactional",
69
+ "adapter": "profile-bundle",
70
+ "failurePolicy": "generation-rollback",
71
+ "touchesCurrentBeforeActivation": false
72
+ },
73
+ "lifecycle": {
74
+ "activation": "hot-reload",
75
+ "dispose": "supported"
76
+ },
77
+ "permissions": [
78
+ "network:outbound",
79
+ "session:append",
80
+ "native-code:none"
81
+ ],
82
+ "compatibility": {
83
+ "dshVersions": [
84
+ "0.1.0-rc.6"
85
+ ]
86
+ },
87
+ "capability": {
88
+ "id": "budget-governance",
89
+ "kind": "command",
90
+ "invocation": "/budget",
91
+ "expected": "a per-scope budget overview with aggregated tokens, estimated cost, carbon footprint and per-model latency statistics, plus unblock and model-breakdown subcommands"
92
+ },
93
+ "evidence": {
94
+ "install": null,
95
+ "failureIsolation": null,
96
+ "hotReload": null,
97
+ "remove": null
98
+ }
99
+ },
100
+ "keywords": [
101
+ "dsh",
102
+ "dsh-plugin",
103
+ "deepseek-harness",
104
+ "deepseek",
105
+ "cordis",
106
+ "budget",
107
+ "cost-tracking",
108
+ "carbon-footprint",
109
+ "latency-benchmark",
110
+ "token-usage"
111
+ ],
112
+ "engines": {
113
+ "node": "^22.19.0 || >=24.0.0"
114
+ },
115
+ "packageManager": "pnpm@11.7.0",
116
+ "peerDependencies": {
117
+ "@deepseek-ai/cordis": "^4.0.1",
118
+ "@deepseek-ai/schemastery": "^3.18.0",
119
+ "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
120
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
121
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
122
+ "@deepseek-ai/dsh-session": "0.1.0-rc.6",
123
+ "@deepseek-ai/dsh-token-meter": "0.1.0-rc.6",
124
+ "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
125
+ "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6"
126
+ },
127
+ "dependencies": {
128
+ "tsdown": "^0.22.14",
129
+ "typescript": "^5.9.0",
130
+ "zod": "^4.4.3"
131
+ },
132
+ "devDependencies": {
133
+ "@deepseek-ai/cordis": "^4.0.1",
134
+ "@deepseek-ai/schemastery": "^3.18.0",
135
+ "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
136
+ "@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
137
+ "@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
138
+ "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
139
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
140
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
141
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
142
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
143
+ "@deepseek-ai/dsh-session": "0.1.0-rc.6",
144
+ "@deepseek-ai/dsh-token-meter": "0.1.0-rc.6",
145
+ "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
146
+ "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
147
+ "@types/node": "^22.19.0",
148
+ "@types/react": "18.3.31",
149
+ "react": "18.3.1",
150
+ "react-dom": "18.3.1",
151
+ "vitest": "^3.2.0"
152
+ },
153
+ "scripts": {
154
+ "build": "node scripts/prepare.mjs",
155
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
156
+ "typecheck:ci": "tsc -p tsconfig.ci.json --noEmit",
157
+ "test": "vitest run",
158
+ "test:watch": "vitest",
159
+ "prepare": "node scripts/prepare.mjs",
160
+ "verify:self-contained": "node scripts/verify-self-contained.mjs",
161
+ "verify:artifacts": "node scripts/verify-artifacts.mjs"
162
+ },
163
+ "license": "Apache-2.0"
164
+ }