ccusage 0.4.2 → 0.5.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 (42) hide show
  1. package/README.md +68 -0
  2. package/dist/arktype-C-GObzDh-Dj1DVoqC.js +5 -0
  3. package/dist/calculate-cost.d.ts +4 -4
  4. package/dist/calculate-cost.js +1 -1
  5. package/dist/core-BgFXUe_h.js +693 -0
  6. package/dist/{data-loader-DtCt7sNl.d.ts → data-loader-LMCrJ-lW.d.ts} +3 -3
  7. package/dist/{data-loader-B8mdiY5r.js → data-loader-r5ZcMQy7.js} +2 -2
  8. package/dist/data-loader.d.ts +4 -4
  9. package/dist/data-loader.js +4 -4
  10. package/dist/{debug-Oce2b5bO.js → debug-BVxGf4UL.js} +4 -4
  11. package/dist/debug.js +5 -5
  12. package/dist/dist-C_i5I27w.js +469 -0
  13. package/dist/{dist-D6rk8Ra5.js → dist-FwNhpFrW.js} +30 -1
  14. package/dist/effect-WSjEuzC9-BsxP11fz.js +10 -0
  15. package/dist/esm-vjyZjnpZ.js +1090 -0
  16. package/dist/index-CISmcbXk-BotItq1T.js +23 -0
  17. package/dist/index.js +48 -9
  18. package/dist/{logger-nCODI08N.js → logger-Cu4Ir1a5.js} +2 -2
  19. package/dist/logger.js +1 -1
  20. package/dist/mcp-DAzj5Pua.js +37580 -0
  21. package/dist/mcp.d.ts +15 -0
  22. package/dist/mcp.js +10 -0
  23. package/dist/{pricing-fetcher-bvi4lbXl.js → pricing-fetcher-B5yPtoTB.js} +2 -2
  24. package/dist/{pricing-fetcher-BqlslEH3.d.ts → pricing-fetcher-DygIroMj.d.ts} +1 -1
  25. package/dist/pricing-fetcher.d.ts +2 -2
  26. package/dist/pricing-fetcher.js +3 -3
  27. package/dist/{shared-args-DWaGio0e.js → shared-args-DN3jRldX.js} +3 -3
  28. package/dist/shared-args.js +6 -6
  29. package/dist/sury-DmrZ3_Oj-DhGOjCNc.js +10 -0
  30. package/dist/{types-BfZ5dOy7.d.ts → types-B3ib19os.d.ts} +1 -1
  31. package/dist/types-CFnCBr2I.js +3586 -0
  32. package/dist/{types-DjlBTM5P.js → types-DFrbJmnT.js} +1 -1
  33. package/dist/types.d.ts +2 -2
  34. package/dist/types.js +2 -2
  35. package/dist/utils.js +1 -1
  36. package/dist/valibot-CQk-M5rL-Cq5E7F3g.js +10 -0
  37. package/dist/zod-Db63SLXj-BWdcigdx.js +30 -0
  38. package/package.json +2 -1
  39. /package/dist/{calculate-cost-BnufbprY.js → calculate-cost-2IwHSzmi.js} +0 -0
  40. /package/dist/{index-Bazt8Nfd.d.ts → index-BurjgCfW.d.ts} +0 -0
  41. /package/dist/{prompt-BwcIpzWm.js → prompt-IToGuko2.js} +0 -0
  42. /package/dist/{utils-BeihwpHn.js → utils-C7kg8MXN.js} +0 -0
package/dist/mcp.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import "./index-BurjgCfW.js";
2
+ import "./pricing-fetcher-DygIroMj.js";
3
+ import "./types-B3ib19os.js";
4
+ import { LoadOptions } from "./data-loader-LMCrJ-lW.js";
5
+ import { FastMCP } from "fastmcp";
6
+
7
+ //#region src/mcp.d.ts
8
+ /**
9
+ * Creates a FastMCP server with tools for showing usage reports.
10
+ */
11
+ declare function createMcpServer({
12
+ claudePath
13
+ }?: LoadOptions): FastMCP;
14
+ //#endregion
15
+ export { createMcpServer };
package/dist/mcp.js ADDED
@@ -0,0 +1,10 @@
1
+ import "./data-loader-r5ZcMQy7.js";
2
+ import "./dist-FwNhpFrW.js";
3
+ import "./logger-Cu4Ir1a5.js";
4
+ import "./pricing-fetcher-B5yPtoTB.js";
5
+ import "./types-DFrbJmnT.js";
6
+ import "./types-CFnCBr2I.js";
7
+ import { createMcpServer } from "./mcp-DAzj5Pua.js";
8
+ import "./index-CISmcbXk-BotItq1T.js";
9
+
10
+ export { createMcpServer };
@@ -1,5 +1,5 @@
1
- import { number, object, optional, parse } from "./dist-D6rk8Ra5.js";
2
- import { logger } from "./logger-nCODI08N.js";
1
+ import { number, object, optional, parse } from "./dist-FwNhpFrW.js";
2
+ import { logger } from "./logger-Cu4Ir1a5.js";
3
3
 
4
4
  //#region src/pricing-fetcher.ts
5
5
  const ModelPricingSchema = object({
@@ -1,4 +1,4 @@
1
- import { InferOutput, NumberSchema, ObjectSchema, OptionalSchema } from "./index-Bazt8Nfd.js";
1
+ import { InferOutput, NumberSchema, ObjectSchema, OptionalSchema } from "./index-BurjgCfW.js";
2
2
 
3
3
  //#region src/pricing-fetcher.d.ts
4
4
  declare const ModelPricingSchema: ObjectSchema<{
@@ -1,3 +1,3 @@
1
- import "./index-Bazt8Nfd.js";
2
- import { ModelPricing, calculateCostFromTokens$1 as calculateCostFromTokens, clearPricingCache$1 as clearPricingCache, fetchModelPricing$1 as fetchModelPricing, getModelPricing$1 as getModelPricing } from "./pricing-fetcher-BqlslEH3.js";
1
+ import "./index-BurjgCfW.js";
2
+ import { ModelPricing, calculateCostFromTokens$1 as calculateCostFromTokens, clearPricingCache$1 as clearPricingCache, fetchModelPricing$1 as fetchModelPricing, getModelPricing$1 as getModelPricing } from "./pricing-fetcher-DygIroMj.js";
3
3
  export { ModelPricing, calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing };
@@ -1,5 +1,5 @@
1
- import "./dist-D6rk8Ra5.js";
2
- import "./logger-nCODI08N.js";
3
- import { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing } from "./pricing-fetcher-bvi4lbXl.js";
1
+ import "./dist-FwNhpFrW.js";
2
+ import "./logger-Cu4Ir1a5.js";
3
+ import { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing } from "./pricing-fetcher-B5yPtoTB.js";
4
4
 
5
5
  export { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing };
@@ -1,6 +1,6 @@
1
- import { getDefaultClaudePath } from "./data-loader-B8mdiY5r.js";
2
- import { safeParse } from "./dist-D6rk8Ra5.js";
3
- import { CostModes, dateSchema } from "./types-DjlBTM5P.js";
1
+ import { getDefaultClaudePath } from "./data-loader-r5ZcMQy7.js";
2
+ import { safeParse } from "./dist-FwNhpFrW.js";
3
+ import { CostModes, dateSchema } from "./types-DFrbJmnT.js";
4
4
 
5
5
  //#region src/shared-args.ts
6
6
  const parseDateArg = (value) => {
@@ -1,8 +1,8 @@
1
- import "./data-loader-B8mdiY5r.js";
2
- import "./dist-D6rk8Ra5.js";
3
- import "./logger-nCODI08N.js";
4
- import "./pricing-fetcher-bvi4lbXl.js";
5
- import "./types-DjlBTM5P.js";
6
- import { sharedArgs, sharedCommandConfig } from "./shared-args-DWaGio0e.js";
1
+ import "./data-loader-r5ZcMQy7.js";
2
+ import "./dist-FwNhpFrW.js";
3
+ import "./logger-Cu4Ir1a5.js";
4
+ import "./pricing-fetcher-B5yPtoTB.js";
5
+ import "./types-DFrbJmnT.js";
6
+ import { sharedArgs, sharedCommandConfig } from "./shared-args-DN3jRldX.js";
7
7
 
8
8
  export { sharedArgs, sharedCommandConfig };
@@ -0,0 +1,10 @@
1
+ import { tryImport } from "./index-CISmcbXk-BotItq1T.js";
2
+
3
+ //#region node_modules/xsschema/dist/sury-DmrZ3_Oj.js
4
+ const getToJsonSchemaFn = async () => {
5
+ const { toJSONSchema } = await tryImport(import("sury"), "sury");
6
+ return (schema) => toJSONSchema(schema);
7
+ };
8
+
9
+ //#endregion
10
+ export { getToJsonSchemaFn };
@@ -1,4 +1,4 @@
1
- import { BooleanSchema, InferOutput, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, RegexAction, SchemaWithPipe, StringSchema, UnionSchema } from "./index-Bazt8Nfd.js";
1
+ import { BooleanSchema, InferOutput, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, RegexAction, SchemaWithPipe, StringSchema, UnionSchema } from "./index-BurjgCfW.js";
2
2
 
3
3
  //#region src/types.d.ts
4
4
  declare const ModelSpecSchema: ObjectSchema<{