ccusage 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -1
- package/dist/arktype-C-GObzDh-Dj1DVoqC.js +5 -0
- package/dist/calculate-cost.d.ts +5 -5
- package/dist/calculate-cost.js +1 -1
- package/dist/core-BgFXUe_h.js +693 -0
- package/dist/{data-loader-B8mdiY5r.js → data-loader-CDv0IYZx.js} +59 -22
- package/dist/{data-loader-DtCt7sNl.d.ts → data-loader-aUOjeZ06.d.ts} +17 -6
- package/dist/data-loader.d.ts +5 -5
- package/dist/data-loader.js +5 -5
- package/dist/{debug-Oce2b5bO.js → debug-Dk36WQTw.js} +4 -4
- package/dist/debug.js +5 -5
- package/dist/dist-C_i5I27w.js +469 -0
- package/dist/{dist-D6rk8Ra5.js → dist-FwNhpFrW.js} +30 -1
- package/dist/effect-WSjEuzC9-BsxP11fz.js +10 -0
- package/dist/esm-vjyZjnpZ.js +1090 -0
- package/dist/index-CISmcbXk-BotItq1T.js +23 -0
- package/dist/index.js +171 -23
- package/dist/{logger-nCODI08N.js → logger-DhDyJEC5.js} +2 -2
- package/dist/logger.js +1 -1
- package/dist/mcp-G-TIOcuj.js +37580 -0
- package/dist/mcp.d.ts +15 -0
- package/dist/mcp.js +10 -0
- package/dist/{pricing-fetcher-bvi4lbXl.js → pricing-fetcher-BCv1Vods.js} +2 -2
- package/dist/{pricing-fetcher-BqlslEH3.d.ts → pricing-fetcher-DygIroMj.d.ts} +1 -1
- package/dist/pricing-fetcher.d.ts +2 -2
- package/dist/pricing-fetcher.js +3 -3
- package/dist/{shared-args-DWaGio0e.js → shared-args-BtMSktLn.js} +10 -3
- package/dist/shared-args.d.ts +14 -0
- package/dist/shared-args.js +6 -6
- package/dist/sury-DmrZ3_Oj-DhGOjCNc.js +10 -0
- package/dist/{types-DjlBTM5P.js → types-BcXIBMQk.js} +3 -2
- package/dist/types-CFnCBr2I.js +3586 -0
- package/dist/{types-BfZ5dOy7.d.ts → types-y1JQzaKZ.d.ts} +4 -2
- package/dist/types.d.ts +3 -3
- package/dist/types.js +3 -3
- package/dist/utils.js +1 -1
- package/dist/valibot-CQk-M5rL-Cq5E7F3g.js +10 -0
- package/dist/zod-Db63SLXj-BWdcigdx.js +30 -0
- package/package.json +2 -1
- /package/dist/{calculate-cost-BnufbprY.js → calculate-cost-2IwHSzmi.js} +0 -0
- /package/dist/{index-Bazt8Nfd.d.ts → index-BurjgCfW.d.ts} +0 -0
- /package/dist/{prompt-BwcIpzWm.js → prompt-IToGuko2.js} +0 -0
- /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-y1JQzaKZ.js";
|
|
4
|
+
import { LoadOptions } from "./data-loader-aUOjeZ06.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-CDv0IYZx.js";
|
|
2
|
+
import "./dist-FwNhpFrW.js";
|
|
3
|
+
import "./logger-DhDyJEC5.js";
|
|
4
|
+
import "./pricing-fetcher-BCv1Vods.js";
|
|
5
|
+
import "./types-BcXIBMQk.js";
|
|
6
|
+
import "./types-CFnCBr2I.js";
|
|
7
|
+
import { createMcpServer } from "./mcp-G-TIOcuj.js";
|
|
8
|
+
import "./index-CISmcbXk-BotItq1T.js";
|
|
9
|
+
|
|
10
|
+
export { createMcpServer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { number, object, optional, parse } from "./dist-
|
|
2
|
-
import { logger } from "./logger-
|
|
1
|
+
import { number, object, optional, parse } from "./dist-FwNhpFrW.js";
|
|
2
|
+
import { logger } from "./logger-DhDyJEC5.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-
|
|
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-
|
|
2
|
-
import { ModelPricing, calculateCostFromTokens$1 as calculateCostFromTokens, clearPricingCache$1 as clearPricingCache, fetchModelPricing$1 as fetchModelPricing, getModelPricing$1 as getModelPricing } from "./pricing-fetcher-
|
|
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 };
|
package/dist/pricing-fetcher.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./logger-
|
|
3
|
-
import { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing } from "./pricing-fetcher-
|
|
1
|
+
import "./dist-FwNhpFrW.js";
|
|
2
|
+
import "./logger-DhDyJEC5.js";
|
|
3
|
+
import { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing } from "./pricing-fetcher-BCv1Vods.js";
|
|
4
4
|
|
|
5
5
|
export { calculateCostFromTokens, clearPricingCache, fetchModelPricing, getModelPricing };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getDefaultClaudePath } from "./data-loader-
|
|
2
|
-
import { safeParse } from "./dist-
|
|
3
|
-
import { CostModes, dateSchema } from "./types-
|
|
1
|
+
import { getDefaultClaudePath } from "./data-loader-CDv0IYZx.js";
|
|
2
|
+
import { safeParse } from "./dist-FwNhpFrW.js";
|
|
3
|
+
import { CostModes, SortOrders, dateSchema } from "./types-BcXIBMQk.js";
|
|
4
4
|
|
|
5
5
|
//#region src/shared-args.ts
|
|
6
6
|
const parseDateArg = (value) => {
|
|
@@ -50,6 +50,13 @@ const sharedArgs = {
|
|
|
50
50
|
type: "number",
|
|
51
51
|
description: "Number of sample discrepancies to show in debug output (default: 5)",
|
|
52
52
|
default: 5
|
|
53
|
+
},
|
|
54
|
+
order: {
|
|
55
|
+
type: "enum",
|
|
56
|
+
short: "o",
|
|
57
|
+
description: "Sort order: desc (newest first) or asc (oldest first)",
|
|
58
|
+
default: "asc",
|
|
59
|
+
choices: SortOrders
|
|
53
60
|
}
|
|
54
61
|
};
|
|
55
62
|
const sharedCommandConfig = {
|
package/dist/shared-args.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ declare const sharedArgs: {
|
|
|
42
42
|
readonly description: "Number of sample discrepancies to show in debug output (default: 5)";
|
|
43
43
|
readonly default: 5;
|
|
44
44
|
};
|
|
45
|
+
readonly order: {
|
|
46
|
+
readonly type: "enum";
|
|
47
|
+
readonly short: "o";
|
|
48
|
+
readonly description: "Sort order: desc (newest first) or asc (oldest first)";
|
|
49
|
+
readonly default: "asc";
|
|
50
|
+
readonly choices: readonly ["desc", "asc"];
|
|
51
|
+
};
|
|
45
52
|
};
|
|
46
53
|
declare const sharedCommandConfig: {
|
|
47
54
|
readonly args: {
|
|
@@ -87,6 +94,13 @@ declare const sharedCommandConfig: {
|
|
|
87
94
|
readonly description: "Number of sample discrepancies to show in debug output (default: 5)";
|
|
88
95
|
readonly default: 5;
|
|
89
96
|
};
|
|
97
|
+
readonly order: {
|
|
98
|
+
readonly type: "enum";
|
|
99
|
+
readonly short: "o";
|
|
100
|
+
readonly description: "Sort order: desc (newest first) or asc (oldest first)";
|
|
101
|
+
readonly default: "asc";
|
|
102
|
+
readonly choices: readonly ["desc", "asc"];
|
|
103
|
+
};
|
|
90
104
|
};
|
|
91
105
|
readonly toKebab: true;
|
|
92
106
|
};
|
package/dist/shared-args.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./data-loader-
|
|
2
|
-
import "./dist-
|
|
3
|
-
import "./logger-
|
|
4
|
-
import "./pricing-fetcher-
|
|
5
|
-
import "./types-
|
|
6
|
-
import { sharedArgs, sharedCommandConfig } from "./shared-args-
|
|
1
|
+
import "./data-loader-CDv0IYZx.js";
|
|
2
|
+
import "./dist-FwNhpFrW.js";
|
|
3
|
+
import "./logger-DhDyJEC5.js";
|
|
4
|
+
import "./pricing-fetcher-BCv1Vods.js";
|
|
5
|
+
import "./types-BcXIBMQk.js";
|
|
6
|
+
import { sharedArgs, sharedCommandConfig } from "./shared-args-BtMSktLn.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 { boolean, number, object, optional, pipe, record, regex, string, union } from "./dist-
|
|
1
|
+
import { boolean, number, object, optional, pipe, record, regex, string, union } from "./dist-FwNhpFrW.js";
|
|
2
2
|
|
|
3
3
|
//#region src/types.ts
|
|
4
4
|
const ModelSpecSchema = object({
|
|
@@ -36,6 +36,7 @@ const CostModes = [
|
|
|
36
36
|
"calculate",
|
|
37
37
|
"display"
|
|
38
38
|
];
|
|
39
|
+
const SortOrders = ["desc", "asc"];
|
|
39
40
|
|
|
40
41
|
//#endregion
|
|
41
|
-
export { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, dateSchema };
|
|
42
|
+
export { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, SortOrders, dateSchema };
|