deepseek-cost-meter 0.0.0-stage → 0.1.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.
Files changed (865) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CONTRIBUTING.md +39 -0
  3. package/LICENSE +21 -0
  4. package/README.en.md +110 -0
  5. package/README.md +156 -2
  6. package/SECURITY.md +17 -0
  7. package/VERIFICATION.md +23 -0
  8. package/client.js +84 -0
  9. package/cordis.patch.yml +4 -0
  10. package/docs/architecture.md +30 -0
  11. package/icon.svg +1 -0
  12. package/index.js +29 -0
  13. package/locale/en.json +18 -0
  14. package/locale/zh.json +19 -0
  15. package/node_modules/zod/LICENSE +21 -0
  16. package/node_modules/zod/README.md +218 -0
  17. package/node_modules/zod/compile.cjs +96 -0
  18. package/node_modules/zod/compile.d.cts +1 -0
  19. package/node_modules/zod/compile.d.ts +1 -0
  20. package/node_modules/zod/compile.js +52 -0
  21. package/node_modules/zod/index.cjs +52 -0
  22. package/node_modules/zod/index.d.cts +3 -0
  23. package/node_modules/zod/index.d.ts +3 -0
  24. package/node_modules/zod/index.js +7 -0
  25. package/node_modules/zod/locales/index.cjs +36 -0
  26. package/node_modules/zod/locales/index.d.cts +1 -0
  27. package/node_modules/zod/locales/index.d.ts +1 -0
  28. package/node_modules/zod/locales/index.js +1 -0
  29. package/node_modules/zod/locales/package.json +7 -0
  30. package/node_modules/zod/mini/index.cjs +51 -0
  31. package/node_modules/zod/mini/index.d.cts +3 -0
  32. package/node_modules/zod/mini/index.d.ts +3 -0
  33. package/node_modules/zod/mini/index.js +3 -0
  34. package/node_modules/zod/mini/package.json +7 -0
  35. package/node_modules/zod/package.json +147 -0
  36. package/node_modules/zod/src/compile.ts +56 -0
  37. package/node_modules/zod/src/index.ts +7 -0
  38. package/node_modules/zod/src/locales/index.ts +1 -0
  39. package/node_modules/zod/src/mini/index.ts +3 -0
  40. package/node_modules/zod/src/v3/ZodError.ts +340 -0
  41. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  42. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  43. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  44. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  45. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  46. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  47. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  48. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  49. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  50. package/node_modules/zod/src/v3/errors.ts +13 -0
  51. package/node_modules/zod/src/v3/external.ts +6 -0
  52. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  53. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  54. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  55. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  56. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  57. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  58. package/node_modules/zod/src/v3/index.ts +4 -0
  59. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  60. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  61. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  62. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  63. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  64. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  65. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  66. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  67. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  68. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  69. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  70. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  71. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  72. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  73. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  74. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  75. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  76. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  77. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  78. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  79. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  80. package/node_modules/zod/src/v3/tests/error.test.ts +586 -0
  81. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  82. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  83. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  84. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  85. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  86. package/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
  87. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  88. package/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
  89. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  90. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  91. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  92. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  93. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  94. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  95. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  96. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  97. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  98. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  99. package/node_modules/zod/src/v3/tests/object.test.ts +431 -0
  100. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  101. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  102. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  103. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  104. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  105. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  106. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  107. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  108. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  109. package/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
  110. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  111. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  112. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  113. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  114. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  115. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  116. package/node_modules/zod/src/v3/tests/string.test.ts +922 -0
  117. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  118. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  119. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  120. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  121. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  122. package/node_modules/zod/src/v3/types.ts +5138 -0
  123. package/node_modules/zod/src/v4/classic/checks.ts +33 -0
  124. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  125. package/node_modules/zod/src/v4/classic/compat.ts +78 -0
  126. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  127. package/node_modules/zod/src/v4/classic/errors.ts +97 -0
  128. package/node_modules/zod/src/v4/classic/external.ts +57 -0
  129. package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
  130. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  131. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  132. package/node_modules/zod/src/v4/classic/iso.ts +20 -0
  133. package/node_modules/zod/src/v4/classic/parse.ts +88 -0
  134. package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
  135. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  136. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
  137. package/node_modules/zod/src/v4/classic/tests/array.test.ts +291 -0
  138. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
  139. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  140. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  141. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  142. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
  143. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  144. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
  145. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  146. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
  147. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
  148. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  149. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  150. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  151. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  152. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  153. package/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
  154. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
  155. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  156. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  157. package/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
  158. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  159. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  160. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
  161. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
  162. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
  163. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
  164. package/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
  165. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  166. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  167. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  168. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
  169. package/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
  170. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  171. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
  172. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
  173. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  174. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  175. package/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
  176. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  177. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
  178. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
  179. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  180. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
  181. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  182. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
  183. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
  184. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  185. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  186. package/node_modules/zod/src/v4/classic/tests/map.test.ts +349 -0
  187. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  188. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  189. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  190. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  191. package/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
  192. package/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
  193. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  194. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
  195. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
  196. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  197. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  198. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
  199. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
  200. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  201. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  202. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  203. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  204. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  205. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
  206. package/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
  207. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
  208. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  209. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
  210. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  211. package/node_modules/zod/src/v4/classic/tests/set.test.ts +196 -0
  212. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
  213. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  214. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
  215. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
  216. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
  217. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  218. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
  219. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  220. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
  221. package/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
  222. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  223. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  224. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  225. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  226. package/node_modules/zod/src/v4/core/api.ts +1875 -0
  227. package/node_modules/zod/src/v4/core/checks.ts +1266 -0
  228. package/node_modules/zod/src/v4/core/compile.ts +2322 -0
  229. package/node_modules/zod/src/v4/core/core.ts +230 -0
  230. package/node_modules/zod/src/v4/core/doc.ts +52 -0
  231. package/node_modules/zod/src/v4/core/errors.ts +543 -0
  232. package/node_modules/zod/src/v4/core/index.ts +19 -0
  233. package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
  234. package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
  235. package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
  236. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  237. package/node_modules/zod/src/v4/core/parse.ts +309 -0
  238. package/node_modules/zod/src/v4/core/regexes.ts +217 -0
  239. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  240. package/node_modules/zod/src/v4/core/schemas.ts +5226 -0
  241. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  242. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  243. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  244. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  245. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  246. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  247. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  248. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  249. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  250. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  251. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  252. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  253. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
  254. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  255. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
  256. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  257. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  258. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  259. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  260. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  261. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  262. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  263. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  264. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  265. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  266. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  267. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  268. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  269. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  270. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  271. package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
  272. package/node_modules/zod/src/v4/core/util.ts +1293 -0
  273. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  274. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  275. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  276. package/node_modules/zod/src/v4/index.ts +4 -0
  277. package/node_modules/zod/src/v4/locales/ar.ts +120 -0
  278. package/node_modules/zod/src/v4/locales/az.ts +116 -0
  279. package/node_modules/zod/src/v4/locales/be.ts +188 -0
  280. package/node_modules/zod/src/v4/locales/bg.ts +133 -0
  281. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  282. package/node_modules/zod/src/v4/locales/ca.ts +121 -0
  283. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  284. package/node_modules/zod/src/v4/locales/cs.ts +123 -0
  285. package/node_modules/zod/src/v4/locales/da.ts +128 -0
  286. package/node_modules/zod/src/v4/locales/de.ts +121 -0
  287. package/node_modules/zod/src/v4/locales/el.ts +124 -0
  288. package/node_modules/zod/src/v4/locales/en.ts +136 -0
  289. package/node_modules/zod/src/v4/locales/eo.ts +123 -0
  290. package/node_modules/zod/src/v4/locales/es.ts +145 -0
  291. package/node_modules/zod/src/v4/locales/fa.ts +131 -0
  292. package/node_modules/zod/src/v4/locales/fi.ts +126 -0
  293. package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
  294. package/node_modules/zod/src/v4/locales/fr.ts +139 -0
  295. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  296. package/node_modules/zod/src/v4/locales/he.ts +253 -0
  297. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  298. package/node_modules/zod/src/v4/locales/hr.ts +135 -0
  299. package/node_modules/zod/src/v4/locales/hu.ts +122 -0
  300. package/node_modules/zod/src/v4/locales/hy.ts +175 -0
  301. package/node_modules/zod/src/v4/locales/id.ts +120 -0
  302. package/node_modules/zod/src/v4/locales/index.ts +63 -0
  303. package/node_modules/zod/src/v4/locales/is.ts +124 -0
  304. package/node_modules/zod/src/v4/locales/it.ts +121 -0
  305. package/node_modules/zod/src/v4/locales/ja.ts +119 -0
  306. package/node_modules/zod/src/v4/locales/ka.ts +128 -0
  307. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  308. package/node_modules/zod/src/v4/locales/km.ts +124 -0
  309. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  310. package/node_modules/zod/src/v4/locales/ko.ts +126 -0
  311. package/node_modules/zod/src/v4/locales/lt.ts +243 -0
  312. package/node_modules/zod/src/v4/locales/mk.ts +123 -0
  313. package/node_modules/zod/src/v4/locales/ms.ts +120 -0
  314. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  315. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  316. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  317. package/node_modules/zod/src/v4/locales/no.ts +121 -0
  318. package/node_modules/zod/src/v4/locales/ota.ts +122 -0
  319. package/node_modules/zod/src/v4/locales/pl.ts +123 -0
  320. package/node_modules/zod/src/v4/locales/ps.ts +131 -0
  321. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  322. package/node_modules/zod/src/v4/locales/pt.ts +159 -0
  323. package/node_modules/zod/src/v4/locales/ro.ts +132 -0
  324. package/node_modules/zod/src/v4/locales/ru.ts +188 -0
  325. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  326. package/node_modules/zod/src/v4/locales/sl.ts +123 -0
  327. package/node_modules/zod/src/v4/locales/sv.ts +124 -0
  328. package/node_modules/zod/src/v4/locales/ta.ts +123 -0
  329. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  330. package/node_modules/zod/src/v4/locales/th.ts +124 -0
  331. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  332. package/node_modules/zod/src/v4/locales/tr.ts +116 -0
  333. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  334. package/node_modules/zod/src/v4/locales/uk.ts +122 -0
  335. package/node_modules/zod/src/v4/locales/ur.ts +124 -0
  336. package/node_modules/zod/src/v4/locales/uz.ts +120 -0
  337. package/node_modules/zod/src/v4/locales/vi.ts +122 -0
  338. package/node_modules/zod/src/v4/locales/yo.ts +129 -0
  339. package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
  340. package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
  341. package/node_modules/zod/src/v4/mini/checks.ts +33 -0
  342. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  343. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  344. package/node_modules/zod/src/v4/mini/external.ts +52 -0
  345. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  346. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  347. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  348. package/node_modules/zod/src/v4/mini/parse.ts +16 -0
  349. package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
  350. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
  351. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
  352. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  353. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
  354. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
  355. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
  356. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  357. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  358. package/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
  359. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
  360. package/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
  361. package/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
  362. package/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
  363. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  364. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
  365. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  366. package/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
  367. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  368. package/node_modules/zod/v3/ZodError.cjs +167 -0
  369. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  370. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  371. package/node_modules/zod/v3/ZodError.js +143 -0
  372. package/node_modules/zod/v3/errors.cjs +36 -0
  373. package/node_modules/zod/v3/errors.d.cts +5 -0
  374. package/node_modules/zod/v3/errors.d.ts +5 -0
  375. package/node_modules/zod/v3/errors.js +9 -0
  376. package/node_modules/zod/v3/external.cjs +41 -0
  377. package/node_modules/zod/v3/external.d.cts +6 -0
  378. package/node_modules/zod/v3/external.d.ts +6 -0
  379. package/node_modules/zod/v3/external.js +6 -0
  380. package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
  381. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  382. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  383. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  384. package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
  385. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  386. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  387. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  388. package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
  389. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  390. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  391. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  392. package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
  393. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  394. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  395. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  396. package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
  397. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  398. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  399. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  400. package/node_modules/zod/v3/helpers/util.cjs +156 -0
  401. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  402. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  403. package/node_modules/zod/v3/helpers/util.js +133 -0
  404. package/node_modules/zod/v3/index.cjs +52 -0
  405. package/node_modules/zod/v3/index.d.cts +4 -0
  406. package/node_modules/zod/v3/index.d.ts +4 -0
  407. package/node_modules/zod/v3/index.js +4 -0
  408. package/node_modules/zod/v3/locales/en.cjs +112 -0
  409. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  410. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  411. package/node_modules/zod/v3/locales/en.js +109 -0
  412. package/node_modules/zod/v3/package.json +7 -0
  413. package/node_modules/zod/v3/standard-schema.cjs +21 -0
  414. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  415. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  416. package/node_modules/zod/v3/standard-schema.js +1 -0
  417. package/node_modules/zod/v3/types.cjs +3798 -0
  418. package/node_modules/zod/v3/types.d.cts +1034 -0
  419. package/node_modules/zod/v3/types.d.ts +1034 -0
  420. package/node_modules/zod/v3/types.js +3697 -0
  421. package/node_modules/zod/v4/classic/checks.cjs +53 -0
  422. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  423. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  424. package/node_modules/zod/v4/classic/checks.js +1 -0
  425. package/node_modules/zod/v4/classic/coerce.cjs +66 -0
  426. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  427. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  428. package/node_modules/zod/v4/classic/coerce.js +17 -0
  429. package/node_modules/zod/v4/classic/compat.cjs +80 -0
  430. package/node_modules/zod/v4/classic/compat.d.cts +48 -0
  431. package/node_modules/zod/v4/classic/compat.d.ts +48 -0
  432. package/node_modules/zod/v4/classic/compat.js +31 -0
  433. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  434. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  435. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  436. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  437. package/node_modules/zod/v4/classic/errors.cjs +102 -0
  438. package/node_modules/zod/v4/classic/errors.d.cts +29 -0
  439. package/node_modules/zod/v4/classic/errors.d.ts +29 -0
  440. package/node_modules/zod/v4/classic/errors.js +57 -0
  441. package/node_modules/zod/v4/classic/external.cjs +97 -0
  442. package/node_modules/zod/v4/classic/external.d.cts +19 -0
  443. package/node_modules/zod/v4/classic/external.d.ts +19 -0
  444. package/node_modules/zod/v4/classic/external.js +17 -0
  445. package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
  446. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  447. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  448. package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
  449. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  450. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  451. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  452. package/node_modules/zod/v4/classic/in-out.js +36 -0
  453. package/node_modules/zod/v4/classic/index.cjs +52 -0
  454. package/node_modules/zod/v4/classic/index.d.cts +3 -0
  455. package/node_modules/zod/v4/classic/index.d.ts +3 -0
  456. package/node_modules/zod/v4/classic/index.js +4 -0
  457. package/node_modules/zod/v4/classic/iso.cjs +68 -0
  458. package/node_modules/zod/v4/classic/iso.d.cts +7 -0
  459. package/node_modules/zod/v4/classic/iso.d.ts +7 -0
  460. package/node_modules/zod/v4/classic/iso.js +15 -0
  461. package/node_modules/zod/v4/classic/package.json +7 -0
  462. package/node_modules/zod/v4/classic/parse.cjs +63 -0
  463. package/node_modules/zod/v4/classic/parse.d.cts +44 -0
  464. package/node_modules/zod/v4/classic/parse.d.ts +44 -0
  465. package/node_modules/zod/v4/classic/parse.js +16 -0
  466. package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
  467. package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
  468. package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
  469. package/node_modules/zod/v4/classic/schemas.js +1535 -0
  470. package/node_modules/zod/v4/core/api.cjs +1269 -0
  471. package/node_modules/zod/v4/core/api.d.cts +335 -0
  472. package/node_modules/zod/v4/core/api.d.ts +335 -0
  473. package/node_modules/zod/v4/core/api.js +1107 -0
  474. package/node_modules/zod/v4/core/checks.cjs +561 -0
  475. package/node_modules/zod/v4/core/checks.d.cts +294 -0
  476. package/node_modules/zod/v4/core/checks.d.ts +294 -0
  477. package/node_modules/zod/v4/core/checks.js +516 -0
  478. package/node_modules/zod/v4/core/compile.cjs +1916 -0
  479. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  480. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  481. package/node_modules/zod/v4/core/compile.js +1866 -0
  482. package/node_modules/zod/v4/core/core.cjs +167 -0
  483. package/node_modules/zod/v4/core/core.d.cts +82 -0
  484. package/node_modules/zod/v4/core/core.d.ts +82 -0
  485. package/node_modules/zod/v4/core/core.js +141 -0
  486. package/node_modules/zod/v4/core/doc.cjs +61 -0
  487. package/node_modules/zod/v4/core/doc.d.cts +16 -0
  488. package/node_modules/zod/v4/core/doc.d.ts +16 -0
  489. package/node_modules/zod/v4/core/doc.js +38 -0
  490. package/node_modules/zod/v4/core/errors.cjs +317 -0
  491. package/node_modules/zod/v4/core/errors.d.cts +225 -0
  492. package/node_modules/zod/v4/core/errors.d.ts +225 -0
  493. package/node_modules/zod/v4/core/errors.js +267 -0
  494. package/node_modules/zod/v4/core/index.cjs +70 -0
  495. package/node_modules/zod/v4/core/index.d.cts +19 -0
  496. package/node_modules/zod/v4/core/index.d.ts +19 -0
  497. package/node_modules/zod/v4/core/index.js +19 -0
  498. package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
  499. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  500. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  501. package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
  502. package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
  503. package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
  504. package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
  505. package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
  506. package/node_modules/zod/v4/core/json-schema.cjs +21 -0
  507. package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
  508. package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
  509. package/node_modules/zod/v4/core/json-schema.js +1 -0
  510. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  511. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  512. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  513. package/node_modules/zod/v4/core/memoizer.js +311 -0
  514. package/node_modules/zod/v4/core/package.json +7 -0
  515. package/node_modules/zod/v4/core/parse.cjs +233 -0
  516. package/node_modules/zod/v4/core/parse.d.cts +52 -0
  517. package/node_modules/zod/v4/core/parse.d.ts +52 -0
  518. package/node_modules/zod/v4/core/parse.js +175 -0
  519. package/node_modules/zod/v4/core/regexes.cjs +209 -0
  520. package/node_modules/zod/v4/core/regexes.d.cts +90 -0
  521. package/node_modules/zod/v4/core/regexes.d.ts +90 -0
  522. package/node_modules/zod/v4/core/regexes.js +156 -0
  523. package/node_modules/zod/v4/core/registries.cjs +75 -0
  524. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  525. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  526. package/node_modules/zod/v4/core/registries.js +51 -0
  527. package/node_modules/zod/v4/core/schemas.cjs +2699 -0
  528. package/node_modules/zod/v4/core/schemas.d.cts +1275 -0
  529. package/node_modules/zod/v4/core/schemas.d.ts +1275 -0
  530. package/node_modules/zod/v4/core/schemas.js +2636 -0
  531. package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
  532. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  533. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  534. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  535. package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
  536. package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
  537. package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
  538. package/node_modules/zod/v4/core/to-json-schema.js +651 -0
  539. package/node_modules/zod/v4/core/util.cjs +964 -0
  540. package/node_modules/zod/v4/core/util.d.cts +280 -0
  541. package/node_modules/zod/v4/core/util.d.ts +280 -0
  542. package/node_modules/zod/v4/core/util.js +873 -0
  543. package/node_modules/zod/v4/core/versions.cjs +27 -0
  544. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  545. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  546. package/node_modules/zod/v4/core/versions.js +5 -0
  547. package/node_modules/zod/v4/core/visit.cjs +214 -0
  548. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  549. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  550. package/node_modules/zod/v4/core/visit.js +169 -0
  551. package/node_modules/zod/v4/index.cjs +51 -0
  552. package/node_modules/zod/v4/index.d.cts +3 -0
  553. package/node_modules/zod/v4/index.d.ts +3 -0
  554. package/node_modules/zod/v4/index.js +4 -0
  555. package/node_modules/zod/v4/locales/ar.cjs +138 -0
  556. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  557. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  558. package/node_modules/zod/v4/locales/ar.js +111 -0
  559. package/node_modules/zod/v4/locales/az.cjs +137 -0
  560. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  561. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  562. package/node_modules/zod/v4/locales/az.js +110 -0
  563. package/node_modules/zod/v4/locales/be.cjs +195 -0
  564. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  565. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  566. package/node_modules/zod/v4/locales/be.js +168 -0
  567. package/node_modules/zod/v4/locales/bg.cjs +152 -0
  568. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  569. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  570. package/node_modules/zod/v4/locales/bg.js +125 -0
  571. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  572. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  573. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  574. package/node_modules/zod/v4/locales/bn.js +113 -0
  575. package/node_modules/zod/v4/locales/ca.cjs +139 -0
  576. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  577. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  578. package/node_modules/zod/v4/locales/ca.js +112 -0
  579. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  580. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  581. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  582. package/node_modules/zod/v4/locales/ckb.js +133 -0
  583. package/node_modules/zod/v4/locales/cs.cjs +143 -0
  584. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  585. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  586. package/node_modules/zod/v4/locales/cs.js +116 -0
  587. package/node_modules/zod/v4/locales/da.cjs +147 -0
  588. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  589. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  590. package/node_modules/zod/v4/locales/da.js +120 -0
  591. package/node_modules/zod/v4/locales/de.cjs +140 -0
  592. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  593. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  594. package/node_modules/zod/v4/locales/de.js +113 -0
  595. package/node_modules/zod/v4/locales/el.cjs +139 -0
  596. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  597. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  598. package/node_modules/zod/v4/locales/el.js +112 -0
  599. package/node_modules/zod/v4/locales/en.cjs +152 -0
  600. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  601. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  602. package/node_modules/zod/v4/locales/en.js +125 -0
  603. package/node_modules/zod/v4/locales/eo.cjs +141 -0
  604. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  605. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  606. package/node_modules/zod/v4/locales/eo.js +114 -0
  607. package/node_modules/zod/v4/locales/es.cjs +163 -0
  608. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  609. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  610. package/node_modules/zod/v4/locales/es.js +136 -0
  611. package/node_modules/zod/v4/locales/fa.cjs +146 -0
  612. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  613. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  614. package/node_modules/zod/v4/locales/fa.js +119 -0
  615. package/node_modules/zod/v4/locales/fi.cjs +144 -0
  616. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  617. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  618. package/node_modules/zod/v4/locales/fi.js +117 -0
  619. package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
  620. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  621. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  622. package/node_modules/zod/v4/locales/fr-CA.js +112 -0
  623. package/node_modules/zod/v4/locales/fr.cjs +156 -0
  624. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  625. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  626. package/node_modules/zod/v4/locales/fr.js +129 -0
  627. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  628. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  629. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  630. package/node_modules/zod/v4/locales/gu.js +113 -0
  631. package/node_modules/zod/v4/locales/he.cjs +248 -0
  632. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  633. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  634. package/node_modules/zod/v4/locales/he.js +221 -0
  635. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  636. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  637. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  638. package/node_modules/zod/v4/locales/hi.js +111 -0
  639. package/node_modules/zod/v4/locales/hr.cjs +153 -0
  640. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  641. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  642. package/node_modules/zod/v4/locales/hr.js +126 -0
  643. package/node_modules/zod/v4/locales/hu.cjs +140 -0
  644. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  645. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  646. package/node_modules/zod/v4/locales/hu.js +113 -0
  647. package/node_modules/zod/v4/locales/hy.cjs +185 -0
  648. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  649. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  650. package/node_modules/zod/v4/locales/hy.js +158 -0
  651. package/node_modules/zod/v4/locales/id.cjs +138 -0
  652. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  653. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  654. package/node_modules/zod/v4/locales/id.js +111 -0
  655. package/node_modules/zod/v4/locales/index.cjs +152 -0
  656. package/node_modules/zod/v4/locales/index.d.cts +63 -0
  657. package/node_modules/zod/v4/locales/index.d.ts +63 -0
  658. package/node_modules/zod/v4/locales/index.js +63 -0
  659. package/node_modules/zod/v4/locales/is.cjs +141 -0
  660. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  661. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  662. package/node_modules/zod/v4/locales/is.js +114 -0
  663. package/node_modules/zod/v4/locales/it.cjs +140 -0
  664. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  665. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  666. package/node_modules/zod/v4/locales/it.js +113 -0
  667. package/node_modules/zod/v4/locales/ja.cjs +139 -0
  668. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  669. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  670. package/node_modules/zod/v4/locales/ja.js +112 -0
  671. package/node_modules/zod/v4/locales/ka.cjs +144 -0
  672. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  673. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  674. package/node_modules/zod/v4/locales/ka.js +117 -0
  675. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  676. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  677. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  678. package/node_modules/zod/v4/locales/kh.js +5 -0
  679. package/node_modules/zod/v4/locales/km.cjs +142 -0
  680. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  681. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  682. package/node_modules/zod/v4/locales/km.js +115 -0
  683. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  684. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  685. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  686. package/node_modules/zod/v4/locales/kn.js +116 -0
  687. package/node_modules/zod/v4/locales/ko.cjs +143 -0
  688. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  689. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  690. package/node_modules/zod/v4/locales/ko.js +116 -0
  691. package/node_modules/zod/v4/locales/lt.cjs +234 -0
  692. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  693. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  694. package/node_modules/zod/v4/locales/lt.js +207 -0
  695. package/node_modules/zod/v4/locales/mk.cjs +141 -0
  696. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  697. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  698. package/node_modules/zod/v4/locales/mk.js +114 -0
  699. package/node_modules/zod/v4/locales/ms.cjs +139 -0
  700. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  701. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  702. package/node_modules/zod/v4/locales/ms.js +112 -0
  703. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  704. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  705. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  706. package/node_modules/zod/v4/locales/ne.js +111 -0
  707. package/node_modules/zod/v4/locales/nl.cjs +142 -0
  708. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  709. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  710. package/node_modules/zod/v4/locales/nl.js +115 -0
  711. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  712. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  713. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  714. package/node_modules/zod/v4/locales/nn.js +113 -0
  715. package/node_modules/zod/v4/locales/no.cjs +140 -0
  716. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  717. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  718. package/node_modules/zod/v4/locales/no.js +113 -0
  719. package/node_modules/zod/v4/locales/ota.cjs +141 -0
  720. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  721. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  722. package/node_modules/zod/v4/locales/ota.js +114 -0
  723. package/node_modules/zod/v4/locales/package.json +7 -0
  724. package/node_modules/zod/v4/locales/pl.cjs +141 -0
  725. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  726. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  727. package/node_modules/zod/v4/locales/pl.js +114 -0
  728. package/node_modules/zod/v4/locales/ps.cjs +146 -0
  729. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  730. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  731. package/node_modules/zod/v4/locales/ps.js +119 -0
  732. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  733. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  734. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  735. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  736. package/node_modules/zod/v4/locales/pt.cjs +169 -0
  737. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  738. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  739. package/node_modules/zod/v4/locales/pt.js +142 -0
  740. package/node_modules/zod/v4/locales/ro.cjs +149 -0
  741. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  742. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  743. package/node_modules/zod/v4/locales/ro.js +122 -0
  744. package/node_modules/zod/v4/locales/ru.cjs +195 -0
  745. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  746. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  747. package/node_modules/zod/v4/locales/ru.js +168 -0
  748. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  749. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  750. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  751. package/node_modules/zod/v4/locales/sk.js +116 -0
  752. package/node_modules/zod/v4/locales/sl.cjs +141 -0
  753. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  754. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  755. package/node_modules/zod/v4/locales/sl.js +114 -0
  756. package/node_modules/zod/v4/locales/sv.cjs +142 -0
  757. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  758. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  759. package/node_modules/zod/v4/locales/sv.js +115 -0
  760. package/node_modules/zod/v4/locales/ta.cjs +142 -0
  761. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  762. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  763. package/node_modules/zod/v4/locales/ta.js +115 -0
  764. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  765. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  766. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  767. package/node_modules/zod/v4/locales/tg.js +117 -0
  768. package/node_modules/zod/v4/locales/th.cjs +142 -0
  769. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  770. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  771. package/node_modules/zod/v4/locales/th.js +115 -0
  772. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  773. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  774. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  775. package/node_modules/zod/v4/locales/tk.js +107 -0
  776. package/node_modules/zod/v4/locales/tr.cjs +137 -0
  777. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  778. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  779. package/node_modules/zod/v4/locales/tr.js +110 -0
  780. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  781. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  782. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  783. package/node_modules/zod/v4/locales/ua.js +5 -0
  784. package/node_modules/zod/v4/locales/uk.cjs +140 -0
  785. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  786. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  787. package/node_modules/zod/v4/locales/uk.js +113 -0
  788. package/node_modules/zod/v4/locales/ur.cjs +142 -0
  789. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  790. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  791. package/node_modules/zod/v4/locales/ur.js +115 -0
  792. package/node_modules/zod/v4/locales/uz.cjs +140 -0
  793. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  794. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  795. package/node_modules/zod/v4/locales/uz.js +113 -0
  796. package/node_modules/zod/v4/locales/vi.cjs +140 -0
  797. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  798. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  799. package/node_modules/zod/v4/locales/vi.js +113 -0
  800. package/node_modules/zod/v4/locales/yo.cjs +139 -0
  801. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  802. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  803. package/node_modules/zod/v4/locales/yo.js +112 -0
  804. package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
  805. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  806. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  807. package/node_modules/zod/v4/locales/zh-CN.js +114 -0
  808. package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
  809. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  810. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  811. package/node_modules/zod/v4/locales/zh-TW.js +112 -0
  812. package/node_modules/zod/v4/mini/checks.cjs +54 -0
  813. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  814. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  815. package/node_modules/zod/v4/mini/checks.js +1 -0
  816. package/node_modules/zod/v4/mini/coerce.cjs +71 -0
  817. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  818. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  819. package/node_modules/zod/v4/mini/coerce.js +22 -0
  820. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  821. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  822. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  823. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  824. package/node_modules/zod/v4/mini/external.cjs +95 -0
  825. package/node_modules/zod/v4/mini/external.d.cts +16 -0
  826. package/node_modules/zod/v4/mini/external.d.ts +16 -0
  827. package/node_modules/zod/v4/mini/external.js +16 -0
  828. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  829. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  830. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  831. package/node_modules/zod/v4/mini/in-out.js +36 -0
  832. package/node_modules/zod/v4/mini/index.cjs +51 -0
  833. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  834. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  835. package/node_modules/zod/v4/mini/index.js +3 -0
  836. package/node_modules/zod/v4/mini/iso.cjs +83 -0
  837. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  838. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  839. package/node_modules/zod/v4/mini/iso.js +34 -0
  840. package/node_modules/zod/v4/mini/package.json +7 -0
  841. package/node_modules/zod/v4/mini/parse.cjs +37 -0
  842. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  843. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  844. package/node_modules/zod/v4/mini/parse.js +1 -0
  845. package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
  846. package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
  847. package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
  848. package/node_modules/zod/v4/mini/schemas.js +1002 -0
  849. package/node_modules/zod/v4/package.json +7 -0
  850. package/node_modules/zod/v4-mini/index.cjs +51 -0
  851. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  852. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  853. package/node_modules/zod/v4-mini/index.js +3 -0
  854. package/node_modules/zod/v4-mini/package.json +7 -0
  855. package/package.json +83 -4
  856. package/rates.json +11 -0
  857. package/scripts/build.mjs +9 -0
  858. package/scripts/check-package.mjs +20 -0
  859. package/scripts/install-local.sh +13 -0
  860. package/scripts/runtime-smoke.cjs +85 -0
  861. package/src/client-factory.js +76 -0
  862. package/src/pricing.js +72 -0
  863. package/src/projection.js +114 -0
  864. package/tests/cost.test.js +132 -0
  865. package/tests/package.test.js +23 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1 — 2026-11-01
4
+
5
+ - Publish the public npm package as `deepseek-cost-meter`.
6
+ - Align bundle and browser module names; derive the browser module ID from package metadata.
7
+ - Rebuild and run tests before packing, and document migration from the old `@local` package.
8
+ - Preserve pricing, projection and storage identifiers; no accounting behavior changes.
9
+
10
+ ## 0.1.0 — 2026-10-29
11
+
12
+ Initial community release.
13
+
14
+ - Show estimated model cost after every completed, failed or interrupted conversation turn.
15
+ - Expand per-model input, cache, output and price details with session totals.
16
+ - Count recorded retries and avoid double-counting cumulative usage or inherited fork history.
17
+ - Keep exact fixed-point amounts and persistent price snapshots.
18
+ - Support official DeepSeek routes and configurable provider tariffs.
19
+ - Include Chinese and English interface text, unit tests and a local Harness integration check.
20
+
21
+ Validated on DeepSeek Harness Desktop 0.2.1-rc.3 for macOS. Built-in peak-calendar coverage ends on 2026-12-31. Estimates exclude independent subagents, title generation, tool fees and account adjustments.
@@ -0,0 +1,39 @@
1
+ # Contributing / 参与贡献
2
+
3
+ 欢迎提交可复现的问题、定价修正和 Pull Request。中文和英文均可。
4
+
5
+ ## Local development
6
+
7
+ Use Node.js 22+ and npm:
8
+
9
+ ```sh
10
+ npm ci --ignore-scripts
11
+ npm run build
12
+ npm run check
13
+ npm pack
14
+ ```
15
+
16
+ Edit `src/client-factory.js` or `locale/*.json`, then regenerate and commit `client.js`. Keep dependencies pinned and commit `package-lock.json`. Use two spaces, LF endings and descriptive commit messages.
17
+
18
+ For an optional integration check on macOS with Harness installed:
19
+
20
+ ```sh
21
+ ELECTRON_RUN_AS_NODE=1 '/Applications/DeepSeek Harness.app/Contents/MacOS/DeepSeek Harness' \
22
+ --expose-internals scripts/runtime-smoke.cjs
23
+ ```
24
+
25
+ `DSH_RUNTIME_ROOT` can override the runtime directory. The check uses a temporary storage directory and synthetic events with flat fixture prices, makes no model calls, and removes its temporary data. It requires the real Harness runtime and is not part of hosted CI.
26
+
27
+ ## Changes worth testing
28
+
29
+ - Pricing: UTC+8 peak boundaries, holidays, expired calendars, currency separation and exact arithmetic.
30
+ - Usage: retries, interruptions, missing counters, cumulative samples and reasoning-token inclusion.
31
+ - Projection: persisted-state replay, forks, completed-turn totals and disposal.
32
+
33
+ For pricing changes, include an official source, verification date and effective date. Do not infer missing usage or unknown provider pricing. Update `CHANGELOG.md` for user-facing changes. Bump projection checkpoint compatibility if an algorithm change makes old state invalid.
34
+
35
+ ## Pull requests
36
+
37
+ Explain the problem, resulting behavior, and verification performed. Keep changes focused. CI must pass; runtime integration results should identify the tested Harness version. Avoid adding personal conversations, API keys, account identifiers or machine-specific paths to fixtures and screenshots.
38
+
39
+ Be respectful and constructive. Code and documentation contributions are accepted under this repository's MIT License; do not copy code whose license is incompatible.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 deepseek-cost-meter 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.en.md ADDED
@@ -0,0 +1,110 @@
1
+ # DeepSeek Harness Cost Meter
2
+
3
+ English · [简体中文](README.md)
4
+
5
+ [![CI](https://github.com/luomuwen/deepseek-cost-meter/actions/workflows/ci.yml/badge.svg)](https://github.com/luomuwen/deepseek-cost-meter/actions/workflows/ci.yml)
6
+
7
+ An independent MIT-licensed community plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). Show estimated model costs after each conversation turn, with expandable token, price and session-total details. Not affiliated with or endorsed by DeepSeek.
8
+
9
+ ```text
10
+ Estimated model cost CNY 0.012300 · 1 call
11
+ Uncached input: 1,000 tokens
12
+ Cache read: 2,000 tokens
13
+ Output: 100 tokens
14
+ ```
15
+
16
+ The example uses the bundled peak rate for deepseek-v4-pro. Amounts are estimates based on recorded API usage and configured prices, not account billing records.
17
+
18
+ ## Install
19
+
20
+ Recommended npm installation:
21
+
22
+ ```sh
23
+ dsh plugin --profile desktop add deepseek-cost-meter
24
+ # Web profile:
25
+ dsh plugin --profile web add deepseek-cost-meter
26
+ ```
27
+
28
+ On macOS without a global `dsh`, use `/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh`.
29
+
30
+ ### Upgrade from 0.1.0
31
+
32
+ Save any custom `config.rates`, remove the old `@local/deepseek-cost-meter` package, then install the new package. Do not enable both:
33
+
34
+ ```sh
35
+ dsh plugin --profile desktop remove @local/deepseek-cost-meter
36
+ dsh plugin --profile desktop add deepseek-cost-meter
37
+ ```
38
+
39
+ Reapply custom prices and restart Harness. Storage and projection identifiers stay unchanged so existing price snapshots remain usable.
40
+
41
+ ### Source or release archive
42
+
43
+ Tested with DeepSeek Harness Desktop **0.2.1-rc.3 on macOS**. Other versions and platforms are unverified. Source installation requires Node.js 22+, npm and Git.
44
+
45
+ ```sh
46
+ git clone https://github.com/luomuwen/deepseek-cost-meter.git
47
+ cd deepseek-cost-meter
48
+ npm ci --ignore-scripts
49
+ bash scripts/install-local.sh
50
+ ```
51
+
52
+ The installer uses the bundled macOS Desktop CLI when available; otherwise it uses `dsh` on PATH and the `web` profile. Pass `desktop` or `web` to override the profile. This links the source directory: keep it in place and restart Harness after installation or code changes.
53
+
54
+ Manual installation:
55
+
56
+ ```sh
57
+ dsh plugin --profile desktop add "$PWD"
58
+ ```
59
+
60
+ On macOS, the bundled CLI is `/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh`. For Web, use `--profile web` and restart `dsh web`.
61
+
62
+ Alternatively, download a `.tgz` from [Releases](https://github.com/luomuwen/deepseek-cost-meter/releases) and install it with `dsh plugin --profile desktop add /absolute/path/package.tgz`. `npm pack` builds the package locally. Zod is bundled; React is provided by Harness. The public npm package is `deepseek-cost-meter`.
63
+
64
+ ## Accounting model
65
+
66
+ - A turn runs from `turn/start` to `turn/end`, including recorded retries in that session.
67
+ - Uses persisted usage events, never token estimates from text length. Cumulative samples are replaced by their final value.
68
+ - Uncached input, cache reads, cache writes and output are disjoint. Reasoning tokens are already included in output.
69
+ - Uses exact fixed-point integer arithmetic, displayed to six decimal places.
70
+ - Missing usage or prices is shown as incomplete, not free. Known totals may be partial.
71
+ - Inherited fork history is displayed without adding it to new session spending.
72
+ - Excludes independent subagent sessions, title generation, search/fetch and other tool fees, discounts and account adjustments.
73
+ - No API key, additional model calls or telemetry. Aggregate state does not copy prompts, responses or tool payloads.
74
+
75
+ ## Prices and configuration
76
+
77
+ The bundled CNY tariff was checked on **2026-10-29** against [DeepSeek's official pricing](https://api-docs.deepseek.com/zh-cn/quick_start/pricing/). It applies from that date; earlier prices are unknown. Peak-calendar coverage ends on **2026-12-31**. Expired calendars are marked unavailable instead of silently using stale rules.
78
+
79
+ Prices are per million tokens. Official `deepseek`, `deepseek-official` and `deepseek-account` routes are supported. Unrecognized providers do not inherit official prices. Cache writes default to the uncached-input rate. Peak requests are approximated using the step/retry start timestamp in UTC+8.
80
+
81
+ Edit `rates.json` and restart, or supply the complete same-shaped object under the plugin's `config.rates`. Decimal prices must be strings with up to six fractional digits. Omit `peak` for flat pricing. See the [Chinese configuration guide](README.md#修改价格) and [architecture](docs/architecture.md) for the full contract.
82
+
83
+ Rate changes append immutable snapshots to Harness storage. The initial snapshot starts at `effectiveFrom`; later changes take effect when loaded. Old calls use their saved price history. Losing that history prevents exact reconstruction: this is not an accounting ledger.
84
+
85
+ ## Development
86
+
87
+ ```sh
88
+ npm ci --ignore-scripts
89
+ npm run build
90
+ npm run check
91
+ npm pack
92
+ ```
93
+
94
+ CI checks syntax, unit tests, deterministic client generation and package contents on Node.js 22 and 24. The real Harness integration check needs a separate local Harness installation; it is not run in hosted CI. See [CONTRIBUTING.md](CONTRIBUTING.md) and [VERIFICATION.md](VERIFICATION.md).
95
+
96
+ ## Uninstall
97
+
98
+ Disable or remove the plugin in Harness, or run:
99
+
100
+ ```sh
101
+ dsh plugin --profile desktop remove deepseek-cost-meter
102
+ ```
103
+
104
+ Restart Harness if needed. The plugin does not modify conversation logs; price snapshots are retained by Harness storage.
105
+
106
+ ## Community and license
107
+
108
+ [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Changelog](CHANGELOG.md) · [MIT License](LICENSE)
109
+
110
+ DeepSeek and DeepSeek Harness names belong to their respective owners.
package/README.md CHANGED
@@ -1,3 +1,157 @@
1
- # Temporary Holding Version
1
+ # DeepSeek Harness Cost Meter
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
+ [English](README.en.md) · 简体中文
4
+
5
+ [![CI](https://github.com/luomuwen/deepseek-cost-meter/actions/workflows/ci.yml/badge.svg)](https://github.com/luomuwen/deepseek-cost-meter/actions/workflows/ci.yml)
6
+
7
+ 独立社区插件,采用 MIT 许可证;与 DeepSeek 官方无隶属关系。
8
+
9
+ 在每轮回复下方显示 **本轮模型费用约 CNY 0.012300 · 1 次调用**。点击展开模型、token、单价、峰谷时段及累计费用。支持正常完成、错误和中断轮次。
10
+
11
+ 兼容性:已在 macOS 桌面版 **DeepSeek Harness 0.2.1-rc.3** 验证。使用 `sessionProjections`、`storageDomain`、`conversation.chat.turnTail` 和 `useProjection`;其他版本需要重新验证。
12
+
13
+ ## 安装
14
+
15
+ 推荐通过 npm 包名安装(Node.js 22+ 的 Harness 环境):
16
+
17
+ ```sh
18
+ dsh plugin --profile desktop add deepseek-cost-meter
19
+ # Web profile:
20
+ dsh plugin --profile web add deepseek-cost-meter
21
+ ```
22
+
23
+ macOS 桌面版没有全局 `dsh` 时,使用应用自带的 `/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh`。
24
+
25
+ ### 从 0.1.0 升级
26
+
27
+ 旧包名是 `@local/deepseek-cost-meter`。请先保存自行配置的 `config.rates`,移除旧包再安装新包,不要同时启用两者:
28
+
29
+ ```sh
30
+ dsh plugin --profile desktop remove @local/deepseek-cost-meter
31
+ dsh plugin --profile desktop add deepseek-cost-meter
32
+ ```
33
+
34
+ 安装后重新应用自定义价格并重启 Harness。存储域和投影标识保持不变,可继续使用原有价格快照。
35
+
36
+ ### 源码或安装包
37
+
38
+ 需要已安装的 DeepSeek Harness。源码安装和开发需要 Node.js 22 或更新版本、npm 和 Git;已验证的 Harness 版本见上文。
39
+
40
+ ```sh
41
+ git clone https://github.com/luomuwen/deepseek-cost-meter.git
42
+ cd deepseek-cost-meter
43
+ npm ci --ignore-scripts
44
+ bash scripts/install-local.sh
45
+ ```
46
+
47
+ 安装脚本优先使用 macOS 桌面版自带 CLI;其他环境使用 PATH 中的 `dsh`,默认安装到 `web` profile。可以用 `bash scripts/install-local.sh desktop` 指定 profile。这是本地链接安装,请保留源码目录。若界面未立即更新,退出并重新打开 Harness。
48
+
49
+ 手动安装:
50
+
51
+ ```sh
52
+ dsh plugin --profile desktop add "$PWD"
53
+ # Web profile:
54
+ dsh plugin --profile web add "$PWD"
55
+ ```
56
+
57
+ macOS 桌面版若没有全局 `dsh`,使用 `/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh` 替代命令。插件不需要 API Key,不会发起额外模型请求。
58
+
59
+ 也可以从 [Releases](https://github.com/luomuwen/deepseek-cost-meter/releases) 下载 `.tgz` 安装包:
60
+
61
+ ```sh
62
+ dsh plugin --profile desktop add /absolute/path/deepseek-cost-meter-0.1.1.tgz
63
+ ```
64
+
65
+ 运行 `npm pack` 可自行打包。运行依赖 zod 随包分发;React 由 Harness 提供。npm 包名为 `deepseek-cost-meter`,公开发布到 npm registry;市场展示名保持“DeepSeek Cost Meter(每轮费用)”。
66
+
67
+ ## 计费口径
68
+
69
+ - 一轮为 `turn/start` 到 `turn/end`,包括本会话内各步骤和已记录的重试尝试。
70
+ - 读取 API 返回的持久化 usage,不使用字符数估算 token。不把多个累计 usage 样本相加。
71
+ - 输入、缓存读取、缓存写入、输出是互斥桶;推理 token 已包含在输出中,不重复收费。
72
+ - 默认缓存写入按未缓存输入价计算;若服务商采用其他规则,请显式配置。
73
+ - 缺少 usage、模型价格或缓存拆分时显示不完整;已知金额为部分合计,不代表最终账单。
74
+ - 不含子 Agent 独立会话、标题生成、Search/Fetch、其他工具费用及账户优惠。
75
+ - 金额用 BigInt 定点计算,持久状态用十进制字符串,显示六位小数。
76
+ - 分叉继承记录可显示,累计新增费用不重复包含继承历史。
77
+ - 每轮展示的累计值固定为截至该轮结束时的值。多币种分别显示,不自动换汇。
78
+
79
+ ## 默认价格
80
+
81
+ 核验日期:2026-10-29;来源:[DeepSeek 官方人民币定价](https://api-docs.deepseek.com/zh-cn/quick_start/pricing/)。币种 CNY,单位元 / 百万 token。
82
+
83
+ | 模型 | 时段 | 未缓存输入 | 缓存命中 | 输出 |
84
+ |---|---|---:|---:|---:|
85
+ | deepseek-flash | 空闲 | 1 | 0.02 | 4 |
86
+ | deepseek-flash | 高峰 | 2 | 0.04 | 8 |
87
+ | deepseek-v4-pro | 空闲 | 4.5 | 0.15 | 13.5 |
88
+ | deepseek-v4-pro | 高峰 | 9 | 0.30 | 27 |
89
+
90
+ 峰值窗口为北京时间周一至周五 09:00–12:00、14:00–18:00,周末和配置中的节假日除外。按 `step/start` / `llm/retry-started` 时间近似请求开始时间;跨边界请求仍属于估算。
91
+
92
+ 内置表只回算 **2026-10-29 00:00(北京时间)及以后**的记录。该日期前不猜测历史价。内置节假日日历覆盖到 2026-12-31,此覆盖区间内无中国法定节假日;进入 2027 年后会提示更新日历,避免套用未经核验的时段规则。
93
+
94
+ `deepseek-v4-flash`、`deepseek-v4-flash-vision-exp` 按官方别名规则使用 Flash 价格。支持 Harness 官方路由 `deepseek-official`、登录账号路由 `deepseek-account`,以及 `deepseek`;前两者没有显式价格行时使用 `deepseek` 价格。账号路由也仅按公开 API 价格估算,不读取账户实际扣款。其他 provider 不自动套用官方价格,即使模型名称相同。
95
+
96
+ ## 修改价格
97
+
98
+ 首次安装可修改 `rates.json`。运行后修改该文件并重启,或通过个人配置中对应插件行的 `config.rates` 指定完整同结构价格表。示意:
99
+
100
+ ```yaml
101
+ - id: local-deepseek-cost-meter
102
+ config:
103
+ rates:
104
+ version: my-provider-2026-11-01
105
+ source: manual
106
+ effectiveFrom: '2026-11-01T00:00:00+08:00'
107
+ calendarThrough: '2027-12-31'
108
+ holidays: []
109
+ prices:
110
+ - provider: my-provider
111
+ models: [my-model]
112
+ currency: CNY
113
+ offPeak:
114
+ input: '1'
115
+ cacheRead: '0.02'
116
+ cacheWrite: '1'
117
+ output: '4'
118
+ ```
119
+
120
+ 不提供 `peak` 则全天使用 `offPeak`。价格以字符串填写,最多六位小数。配置是完整替换,需保留仍要使用的其他模型行;高峰日历需提供实际节假日,不应随意延长覆盖期。
121
+
122
+ 每次价格配置变化会向 Harness 存储域 `local_turn_cost_prices` 追加不可变快照。首次快照从 `effectiveFrom` 回算;后续快照从加载新配置的时间生效。已保存的旧快照继续用于旧调用;卸载不会删除快照。更新算法或价格目录时投影缓存自动重建。丢失该存储域后只能按剩余价格表回算,因此此插件不是财务账本。
123
+
124
+ ## 开发与验证
125
+
126
+ ```sh
127
+ npm ci
128
+ npm run build
129
+ npm run check
130
+ ELECTRON_RUN_AS_NODE=1 '/Applications/DeepSeek Harness.app/Contents/MacOS/DeepSeek Harness' \
131
+ --expose-internals scripts/runtime-smoke.cjs
132
+ ```
133
+
134
+ - `src/pricing.js`:价格校验、峰谷规则、定点计算。
135
+ - `src/projection.js`:增量处理调用尝试、轮次汇总和分叉边界。
136
+ - `index.js`:价格快照与 Host 投影注册。
137
+ - `src/client-factory.js`:原生插槽组件;`client.js` 是生成产物。
138
+ - `locale/`:中英文文案;`icon.svg`:原创图标。
139
+
140
+ 统计状态只保存每轮聚合明细,不复制提示词、回答、工具结果或 API Key。空间随轮数和不同模型/价格组合数增长。客户端通过投影读取结果,不扫描聊天 DOM,不修改对话内容。插件不增加模型 token,也不改变 KV Cache。
141
+
142
+ ## 卸载
143
+
144
+ 可在 Harness 插件页关闭或移除“每轮费用”。也可运行:
145
+
146
+ ```sh
147
+ "/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" \
148
+ plugin --profile desktop remove deepseek-cost-meter
149
+ ```
150
+
151
+ 若当前进程未自动卸载,请重启应用。会话日志不会被插件改写。
152
+
153
+ ## 参与贡献与许可
154
+
155
+ 欢迎提交 Issue 和 Pull Request。请先阅读 [贡献指南](CONTRIBUTING.md)、[安全政策](SECURITY.md) 和 [更新记录](CHANGELOG.md)。详细架构见 [架构说明](docs/architecture.md),手动集成验证记录见 [VERIFICATION.md](VERIFICATION.md)。
156
+
157
+ 采用 [MIT License](LICENSE)。DeepSeek Harness 是 [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) 项目;相关名称与商标归各自所有者所有。
package/SECURITY.md ADDED
@@ -0,0 +1,17 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes target the latest release on `main`. This project is a community plugin and does not guarantee compatibility with every Harness version.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Use this repository's **Security → Report a vulnerability** private reporting flow when available. If it is unavailable, open an issue asking for a private contact channel without including exploit details or sensitive data. Do not attach API keys, full conversation logs, credentials or personal account data to public issues.
10
+
11
+ Include the plugin version, Harness version, operating system, affected component, impact and a minimal sanitized reproduction. There is no guaranteed response time.
12
+
13
+ ## Data handling
14
+
15
+ The plugin reads local session events and stores aggregate usage/cost projections and price snapshots through Harness services. It does not send telemetry or issue model API requests. It does not intentionally copy prompts, answers, tool results or credentials into its own state. It runs with the permissions of the Harness host; it is not a security boundary.
16
+
17
+ A cost estimate is not a spending limit or a billing guarantee. Missing usage, unavailable tariffs and expired calendars must remain visible as incomplete.
@@ -0,0 +1,23 @@
1
+ # 本地验证记录
2
+
3
+ ## 0.1.1 npm 发布验证(2026-11-01)
4
+
5
+ - 17 项单元与包元数据测试通过;检查 npm 包名、Cordis 引用和生成客户端注册 ID 一致。
6
+ - 将实际 `.tgz` 解包到隔离目录,以 `DSH_COST_PLUGIN_ROOT` 指向该目录运行真实 Harness 集成检查,验证 Host 加载、生成客户端渲染、价格存储及卸载/重载。
7
+ - 保留原有投影、配置行和存储域标识,未改计费算法。
8
+
9
+ ## 0.1.0 首次验证
10
+
11
+ 日期:2026-10-29;环境:macOS、DeepSeek Harness Desktop 0.2.1-rc.3。
12
+
13
+ - `npm run check`:15 项计费测试全部通过,Host 和生成的 Client JavaScript 语法检查通过。
14
+ - `scripts/runtime-smoke.cjs`:使用已安装 Harness 的真实 Cordis、Session、Projection、JSON Storage 服务验证注册、事件驱动、价格持久化、卸载和重新加载;使用 React 18.2 验证组件渲染与清理。
15
+ - 隔离 profile:通过官方 `dsh plugin --profile web add` 安装,使用临时 `DSH_HOME` 启动真实 Web composition,插件成功激活。
16
+ - 实际 Desktop profile:通过应用附带官方 CLI 安装。插件页出现“每轮费用”,启用状态为 on。重启后,现有历史对话成功显示每轮费用、调用次数、缓存及输出明细和累计金额。
17
+ - 官方账号路由 `deepseek-account` 在真实界面验证通过;普通 API 路由 `deepseek-official` 有自动化覆盖。
18
+ - `npm pack`:生成包含全部运行文件、原创 SVG 图标、中英文文案以及 zod 4.6.7 的安装包。
19
+ - 依赖安装审计:0 个已知漏洞。没有发起额外收费模型请求,没有改写用户会话日志。
20
+
21
+ 限制:没有向真实 API 新发请求测试流式网络过程;该部分由持久化事件测试覆盖。未验证其他 Harness 版本、Windows/Linux、2027 年峰谷日历及第三方提供商账单。
22
+
23
+ 首次热安装时,已经连接的旧会话可能暂时显示“费用统计正在加载”;重启 Harness 后恢复正常。修改插件代码后也需重启以加载新模块。
package/client.js ADDED
@@ -0,0 +1,84 @@
1
+ // Generated by npm run build. Edit src/client-factory.js and locale/*.json.
2
+ window.__ModuleLoader__.load({
3
+ id: "deepseek-cost-meter",
4
+ factory(require) {
5
+ /** Browser factory: only React is shared with the host. Generated artifact embeds dictionaries. */
6
+ function clientFactory(require, dictionaries) {
7
+ const React = require('react');
8
+ const h = React.createElement;
9
+ const ns = 'local-turn-cost';
10
+ const css = `
11
+ .dsh-cost-meter { margin: 6px 0; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1.6; }
12
+ .dsh-cost-meter summary { cursor: pointer; width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 6px; }
13
+ .dsh-cost-meter summary:hover { background: var(--dsw-alias-interactive-bg-hover); }
14
+ .dsh-cost-meter summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
15
+ .dsh-cost-meter .cost-body { border: 1px solid var(--dsw-alias-border-primary); border-radius: 8px; padding: 12px; margin-top: 6px; }
16
+ .dsh-cost-meter .cost-route { margin: 10px 0 4px; overflow-wrap: anywhere; font-weight: 600; }
17
+ .dsh-cost-meter .cost-note { margin: 6px 0; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
18
+ .dsh-cost-meter .cost-table-scroll { overflow-x: auto; }
19
+ .dsh-cost-meter table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
20
+ .dsh-cost-meter th, .dsh-cost-meter td { padding: 4px 8px; text-align: right; white-space: nowrap; }
21
+ .dsh-cost-meter th:first-child, .dsh-cost-meter td:first-child { text-align: left; padding-left: 0; }
22
+ .dsh-cost-meter .cost-amount { font-variant-numeric: tabular-nums; }
23
+ `;
24
+
25
+ function money(pico, currency) {
26
+ const n = BigInt(pico);
27
+ const rounded = (n + 500_000n) / 1_000_000n;
28
+ const whole = rounded / 1_000_000n;
29
+ const part = (rounded % 1_000_000n).toString().padStart(6, '0');
30
+ return `${currency} ${n > 0n && rounded === 0n ? '<0.000001' : `${whole}.${part}`}`;
31
+ }
32
+ function amounts(totals) {
33
+ return Object.entries(totals).map(([currency, value]) => money(value, currency)).join(' + ');
34
+ }
35
+ function CostTail({ turn, useProjection, t }) {
36
+ const data = useProjection('localTurnCost');
37
+ const current = data?.turns?.[turn.turn];
38
+ if (!current) return h('div', { className: 'dsh-cost-meter', role: 'status' }, t('waiting'));
39
+ const amount = amounts(current.totals);
40
+ const title = current.calls === 0 ? t('zero') : !amount ? t('unavailable')
41
+ : t(current.unknown ? 'partial' : 'summary', { amount });
42
+ // Stable per-turn snapshot prevents older rows changing as later turns finish.
43
+ const total = current.sessionTotals ?? {};
44
+ const note = text => h('p', { className: 'cost-note' }, text);
45
+ return h('details', { className: 'dsh-cost-meter', 'data-cost-turn': current.turn },
46
+ h('summary', null, h('span', { className: 'cost-amount' }, title), ' · ', t('calls', { count: current.calls })),
47
+ h('div', { className: 'cost-body' },
48
+ current.unknown > 0 && note(t('missing', { count: current.unknown })),
49
+ current.inherited && note(t('inherited')),
50
+ ...current.lines.map((row, index) => h('section', { key: index },
51
+ h('div', { className: 'cost-route' }, `${row.provider} / ${row.model} · `, t('calls', { count: row.calls })),
52
+ row.issue && note(t(row.issue)),
53
+ row.usage && h('div', { className: 'cost-table-scroll' }, h('table', null,
54
+ h('thead', null, h('tr', null, h('th'), h('th', null, t('tokens')), h('th', null, t('price')))),
55
+ h('tbody', null, ...['input', 'cacheRead', 'cacheWrite', 'output'].map(key =>
56
+ h('tr', { key }, h('td', null, t(key)), h('td', null, row.usage[key].toLocaleString()),
57
+ h('td', null, row.rates ? `${row.currency} ${row.rates[key]}` : '—')))))),
58
+ !row.issue && h('div', { className: 'cost-amount' }, `${t('subtotal')}: ${money(row.amountPico, row.currency)}`),
59
+ row.version && note(`${t('version')}: ${row.version} · ${t(row.period)}`))),
60
+ Object.keys(total).length > 0 && h('p', { className: 'cost-amount' }, t('session', { amount: amounts(total) })),
61
+ current.sessionUnknown > 0 && note(t('sessionPartial')),
62
+ note(t('scope')), note(t('timeRule')), note(t('history'))));
63
+ }
64
+ return {
65
+ inject: ['slots', 'locale'],
66
+ apply(ctx) {
67
+ ctx.effect(() => ctx.locale.register(ns, dictionaries));
68
+ ctx.effect(() => {
69
+ const style = document.createElement('style');
70
+ style.dataset.plugin = 'deepseek-cost-meter';
71
+ style.textContent = css;
72
+ document.head.appendChild(style);
73
+ return () => style.remove();
74
+ });
75
+ ctx.slots.inject('conversation.chat.turnTail', () => ctx.slots.register({
76
+ name: 'conversation.chat.turnTail', id: 'local-deepseek-cost-meter', locale: ns, order: 30,
77
+ }, CostTail));
78
+ },
79
+ };
80
+ }
81
+
82
+ return clientFactory(require, {"en":{"meta":{"title":"Turn costs","description":"Show estimated model cost, request counts and token pricing below each completed turn."},"summary":"Estimated model cost: {amount}","partial":"Known model cost: {amount}","unavailable":"Model cost unavailable","zero":"No model calls this turn","calls":"{count} calls","missing":"{count} calls have incomplete billing data","inherited":"Inherited history; excluded from new spending in this branch","scope":"Model requests in this session only. Subagents, title generation and tool charges are excluded. Estimates use API usage and configured prices; the provider invoice is authoritative.","timeRule":"Peak pricing uses request start time. Cache writes use the uncached input rate.","history":"Older records are recalculated using verified historical prices. Prices checked on 2026-10-29.","session":"New session model cost through this turn: {amount}","input":"Uncached input","cacheRead":"Cache reads","cacheWrite":"Cache writes","output":"Output (including reasoning)","tokens":"Tokens","price":"Rate / 1M tokens","subtotal":"Estimated cost","peak":"Peak","offPeak":"Off-peak","version":"Price version","usage-unavailable":"Usage missing or incomplete","price-unavailable":"No applicable price","calendar-expired":"Peak calendar needs updating","waiting":"Loading cost estimate","unknown":"Unknown","sessionPartial":"Some calls are missing from this subtotal."},"zh":{"meta":{"title":"每轮费用","description":"在每轮回复下方显示模型费用估算、调用次数和 token 计费明细。"},"summary":"本轮模型费用约 {amount}","partial":"本轮已知模型费用约 {amount}","unavailable":"本轮模型费用暂无法估算","zero":"本轮没有模型调用","calls":"{count} 次调用","missing":"{count} 次调用缺少完整计费数据","inherited":"继承自原会话,不计入本分支新增费用","scope":"仅统计本会话模型请求,不含子 Agent、标题生成及工具费用。金额按 API 用量与单价估算,以服务商账单为准。","timeRule":"峰谷价按请求开始时间估算;缓存写入按未命中输入计价。","history":"安装前的记录按已核验的历史价格回算。价格表核验日期:2026-10-29。","session":"本会话新增模型费用(截至本轮)约 {amount}","input":"未缓存输入","cacheRead":"缓存读取","cacheWrite":"缓存写入","output":"输出(含推理)","tokens":"Token 数","price":"单价 / 百万 token","subtotal":"费用估算","peak":"高峰时段","offPeak":"空闲时段","version":"价格版本","usage-unavailable":"用量缺失或不完整","price-unavailable":"缺少适用价格","calendar-expired":"峰谷日历需要更新","waiting":"费用统计正在加载","unknown":"未知","sessionPartial":"累计中有未能计价的调用。"}});
83
+ },
84
+ });
@@ -0,0 +1,4 @@
1
+ - insert:
2
+ - id: local-deepseek-cost-meter
3
+ name: 'deepseek-cost-meter'
4
+ config: {}
@@ -0,0 +1,30 @@
1
+ # Architecture
2
+
3
+ ```mermaid
4
+ flowchart LR
5
+ Events[Persisted Harness session events] --> Projection[localTurnCost projection]
6
+ Rates[rates.json or config.rates] --> Catalog[Immutable price snapshots]
7
+ Catalog --> Projection
8
+ Projection --> View[Completed-turn aggregates]
9
+ View --> Slot[conversation.chat.turnTail]
10
+ ```
11
+
12
+ ## Host and projection
13
+
14
+ `index.js` registers the `localTurnCost` projection through `sessionProjections` and opens the `local_turn_cost_prices` storage domain. A hash of the rate configuration identifies each saved snapshot. The projection checkpoint version incorporates the algorithm version and complete price catalog so incompatible caches are rebuilt.
15
+
16
+ `src/projection.js` folds turn, step, retry and assistant-settlement events. A pending attempt keeps the final usage sample, commits on retry/step/turn boundaries, and aggregates lines by provider, model, price version, period and completeness. Only ended turns are published to the client. Fork-inherited records are excluded from new session totals.
17
+
18
+ `src/pricing.js` validates configuration and usage. Prices have at most six decimals per million tokens; multiplication produces integer trillionths of currency serialized as decimal strings. Reasoning tokens are not an additional charge. Missing counters are inferred as zero only when the exact total proves it.
19
+
20
+ ## Price history
21
+
22
+ The initial catalog entry starts at the configured `effectiveFrom`; subsequent changes start when loaded. A new catalog also respects its own `effectiveFrom`, so a future tariff is unavailable until that date. Catalog selection uses attempt-start time; peak windows use UTC+8, weekdays and configured holiday dates. The calendar is deliberately bounded. Explicit provider rows override official-route aliases.
23
+
24
+ ## Client
25
+
26
+ `src/client-factory.js` uses Harness-provided React, `useProjection` and `conversation.chat.turnTail`. `scripts/build.mjs` generates the standalone `client.js` and embeds locale dictionaries. The client neither scans chat DOM nor changes conversation messages. Registration and styles are removed on disposal.
27
+
28
+ ## Limits
29
+
30
+ Storage grows with turn count and distinct model/price combinations. Unknown usage cannot be recovered from rendered text. Independent subagent sessions and model calls outside the current session are excluded. Price history is not an authoritative financial ledger. Runtime service and slot APIs depend on the tested Harness version.
package/icon.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect x="4" y="4" width="56" height="56" rx="15" fill="#176B64"/><path d="M17 19h30v21H30l-9 7v-7h-4z" fill="none" stroke="#fff" stroke-width="3" stroke-linejoin="round"/><path d="m27 24 5 6 5-6m-5 6v7m-7-6h14m-14 4h14" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg>
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { createHash } from 'node:crypto';
3
+ import { z } from 'zod';
4
+ import { rateSchema, catalogSchema } from './src/pricing.js';
5
+ import { createProjection } from './src/projection.js';
6
+
7
+ export const name = 'local-deepseek-cost-meter';
8
+ export const inject = ['sessionProjections', 'storageDomain'];
9
+ export const Config = z.object({ rates: rateSchema.optional() }).strict().default({});
10
+
11
+ /** Pin rate changes in host storage; replay uses the rate catalog active at the request time. */
12
+ export async function apply(ctx, config = {}) {
13
+ const rates = rateSchema.parse(config.rates ?? JSON.parse(await readFile(new URL('./rates.json', import.meta.url), 'utf8')));
14
+ const domain = await ctx.storageDomain.open({
15
+ name: 'local_turn_cost_prices', version: 1, tables: {},
16
+ global: { schema: catalogSchema, initial: [] },
17
+ });
18
+ ctx.effect(() => () => domain.close());
19
+ const id = createHash('sha256').update(JSON.stringify(rates)).digest('hex');
20
+ let catalog = domain.global.get();
21
+ if (catalog.at(-1)?.id !== id) {
22
+ catalog = [...catalog, { id, startsAt: catalog.length ? Date.now() : Date.parse(rates.effectiveFrom), rates }];
23
+ await domain.global.set(catalog);
24
+ }
25
+ // Include both implementation and price history in checkpoint compatibility.
26
+ const stateVersion = createHash('sha256').update('projection-v2:' + JSON.stringify(catalog)).digest().readUInt32BE(0);
27
+ const handle = await ctx.sessionProjections.register(createProjection(catalog, stateVersion));
28
+ ctx.effect(() => () => handle.dispose());
29
+ }
package/locale/en.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "meta": {"title": "Turn costs", "description": "Show estimated model cost, request counts and token pricing below each completed turn."},
3
+ "summary": "Estimated model cost: {amount}",
4
+ "partial": "Known model cost: {amount}",
5
+ "unavailable": "Model cost unavailable",
6
+ "zero": "No model calls this turn",
7
+ "calls": "{count} calls", "missing": "{count} calls have incomplete billing data",
8
+ "inherited": "Inherited history; excluded from new spending in this branch",
9
+ "scope": "Model requests in this session only. Subagents, title generation and tool charges are excluded. Estimates use API usage and configured prices; the provider invoice is authoritative.",
10
+ "timeRule": "Peak pricing uses request start time. Cache writes use the uncached input rate.",
11
+ "history": "Older records are recalculated using verified historical prices. Prices checked on 2026-10-29.",
12
+ "session": "New session model cost through this turn: {amount}",
13
+ "input": "Uncached input", "cacheRead": "Cache reads", "cacheWrite": "Cache writes", "output": "Output (including reasoning)",
14
+ "tokens": "Tokens", "price": "Rate / 1M tokens", "subtotal": "Estimated cost",
15
+ "peak": "Peak", "offPeak": "Off-peak", "version": "Price version",
16
+ "usage-unavailable": "Usage missing or incomplete", "price-unavailable": "No applicable price", "calendar-expired": "Peak calendar needs updating",
17
+ "waiting": "Loading cost estimate", "unknown": "Unknown", "sessionPartial": "Some calls are missing from this subtotal."
18
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "meta": {"title": "每轮费用", "description": "在每轮回复下方显示模型费用估算、调用次数和 token 计费明细。"},
3
+ "summary": "本轮模型费用约 {amount}",
4
+ "partial": "本轮已知模型费用约 {amount}",
5
+ "unavailable": "本轮模型费用暂无法估算",
6
+ "zero": "本轮没有模型调用",
7
+ "calls": "{count} 次调用",
8
+ "missing": "{count} 次调用缺少完整计费数据",
9
+ "inherited": "继承自原会话,不计入本分支新增费用",
10
+ "scope": "仅统计本会话模型请求,不含子 Agent、标题生成及工具费用。金额按 API 用量与单价估算,以服务商账单为准。",
11
+ "timeRule": "峰谷价按请求开始时间估算;缓存写入按未命中输入计价。",
12
+ "history": "安装前的记录按已核验的历史价格回算。价格表核验日期:2026-10-29。",
13
+ "session": "本会话新增模型费用(截至本轮)约 {amount}",
14
+ "input": "未缓存输入", "cacheRead": "缓存读取", "cacheWrite": "缓存写入", "output": "输出(含推理)",
15
+ "tokens": "Token 数", "price": "单价 / 百万 token", "subtotal": "费用估算",
16
+ "peak": "高峰时段", "offPeak": "空闲时段", "version": "价格版本",
17
+ "usage-unavailable": "用量缺失或不完整", "price-unavailable": "缺少适用价格", "calendar-expired": "峰谷日历需要更新",
18
+ "waiting": "费用统计正在加载", "unknown": "未知", "sessionPartial": "累计中有未能计价的调用。"
19
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Colin McDonnell
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.