ccusage 11.0.1 → 11.0.2
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/dist/arktype-C-GObzDh-Bx7Fdrqj.js +1 -4
- package/dist/calculate-cost-D3IraeGW.js +1 -4
- package/dist/calculate-cost.js +1 -2
- package/dist/core-eFvU0K4V.js +1 -10
- package/dist/{data-loader-BzOeJe6y.js → data-loader-B2EwZ_7B.js} +61 -182
- package/dist/data-loader.js +4 -5
- package/dist/{debug-CjjJciy1.js → debug-D4Ka6IrY.js} +4 -8
- package/dist/debug.js +5 -6
- package/dist/dist-Cb1UHXV5.js +1 -5
- package/dist/dist-DCvt9hEv.js +1 -4
- package/dist/effect-WSjEuzC9-CZCpOgOT.js +1 -5
- package/dist/esm-D74K9ESq.js +1 -110
- package/dist/index-CISmcbXk-DpuCarFe.js +1 -4
- package/dist/index.js +53 -189
- package/dist/{logger-E_Utl_fr.js → logger-DPEwxrOW.js} +2 -21
- package/dist/logger.js +2 -3
- package/dist/{mcp-SPAE-cNK.js → mcp-CklIto13.js} +362 -942
- package/dist/mcp.js +5 -6
- package/dist/{pricing-fetcher-BtW4MVG7.js → pricing-fetcher-DDs53oR8.js} +5 -23
- package/dist/pricing-fetcher.js +3 -4
- package/dist/prompt-CUbwSrjo.js +1 -5
- package/dist/sury-DmrZ3_Oj-Lq7x0IZW.js +1 -5
- package/dist/types-5-VF7WcO.js +1 -22
- package/dist/valibot-CQk-M5rL-btpzU8Qa.js +1 -5
- package/dist/zod-Db63SLXj-BqWqpKnQ.js +1 -5
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
2
|
-
import "./data-loader-
|
|
1
|
+
import "./pricing-fetcher-DDs53oR8.js";
|
|
2
|
+
import "./data-loader-B2EwZ_7B.js";
|
|
3
3
|
import "./dist-DCvt9hEv.js";
|
|
4
|
-
import "./logger-
|
|
4
|
+
import "./logger-DPEwxrOW.js";
|
|
5
5
|
import "./types-5-VF7WcO.js";
|
|
6
|
-
import { createMcpServer } from "./mcp-
|
|
6
|
+
import { createMcpServer } from "./mcp-CklIto13.js";
|
|
7
7
|
import "./index-CISmcbXk-DpuCarFe.js";
|
|
8
|
-
|
|
9
|
-
export { createMcpServer };
|
|
8
|
+
export { createMcpServer };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { number, object, optional, pipe, regex, safeParse, string } from "./dist-DCvt9hEv.js";
|
|
2
|
-
import { logger } from "./logger-
|
|
2
|
+
import { logger } from "./logger-DPEwxrOW.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
|
|
5
|
-
//#region rolldown:runtime
|
|
6
4
|
var __create = Object.create;
|
|
7
5
|
var __defProp = Object.defineProperty;
|
|
8
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
11
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var
|
|
13
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
|
-
};
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
15
11
|
var __copyProps = (to, from, except, desc) => {
|
|
16
12
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
13
|
key = keys[i];
|
|
@@ -27,16 +23,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
23
|
enumerable: true
|
|
28
24
|
}) : target, mod));
|
|
29
25
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/consts.internal.ts
|
|
33
26
|
/**
|
|
34
27
|
* URL for LiteLLM's model pricing and context window data
|
|
35
28
|
*/
|
|
36
29
|
const LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json";
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/types.internal.ts
|
|
40
30
|
/**
|
|
41
31
|
* Valibot schema for validating date strings in YYYYMMDD format
|
|
42
32
|
*/
|
|
@@ -65,10 +55,7 @@ const modelPricingSchema = object({
|
|
|
65
55
|
cache_creation_input_token_cost: optional(number()),
|
|
66
56
|
cache_read_input_token_cost: optional(number())
|
|
67
57
|
});
|
|
68
|
-
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region node_modules/rolldown/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
71
|
-
var require_usingCtx = __commonJS({ "node_modules/rolldown/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
58
|
+
var require_usingCtx = __commonJSMin((exports, module) => {
|
|
72
59
|
function _usingCtx() {
|
|
73
60
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) {
|
|
74
61
|
var n$1 = Error();
|
|
@@ -124,10 +111,7 @@ var require_usingCtx = __commonJS({ "node_modules/rolldown/node_modules/@oxc-pro
|
|
|
124
111
|
};
|
|
125
112
|
}
|
|
126
113
|
module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/pricing-fetcher.ts
|
|
114
|
+
});
|
|
131
115
|
var import_usingCtx = __toESM(require_usingCtx(), 1);
|
|
132
116
|
/**
|
|
133
117
|
* Fetches and caches model pricing information from LiteLLM
|
|
@@ -355,6 +339,4 @@ var PricingFetcher = class {
|
|
|
355
339
|
return cost;
|
|
356
340
|
}
|
|
357
341
|
};
|
|
358
|
-
|
|
359
|
-
//#endregion
|
|
360
|
-
export { CostModes, PricingFetcher, SortOrders, __commonJS, __require, __toESM, dateSchema, require_usingCtx };
|
|
342
|
+
export { CostModes, PricingFetcher, SortOrders, __commonJSMin, __require, __toESM, dateSchema, require_usingCtx };
|
package/dist/pricing-fetcher.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PricingFetcher } from "./pricing-fetcher-
|
|
1
|
+
import { PricingFetcher } from "./pricing-fetcher-DDs53oR8.js";
|
|
2
2
|
import "./dist-DCvt9hEv.js";
|
|
3
|
-
import "./logger-
|
|
4
|
-
|
|
5
|
-
export { PricingFetcher };
|
|
3
|
+
import "./logger-DPEwxrOW.js";
|
|
4
|
+
export { PricingFetcher };
|
package/dist/prompt-CUbwSrjo.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import process$1, { stdin, stdout } from "node:process";
|
|
2
2
|
import { WriteStream } from "node:tty";
|
|
3
3
|
import f from "node:readline";
|
|
4
|
-
|
|
5
|
-
//#region node_modules/consola/dist/chunks/prompt.mjs
|
|
6
4
|
function getDefaultExportFromCjs(x$1) {
|
|
7
5
|
return x$1 && x$1.__esModule && Object.prototype.hasOwnProperty.call(x$1, "default") ? x$1["default"] : x$1;
|
|
8
6
|
}
|
|
@@ -847,6 +845,4 @@ async function prompt(message, opts = {}) {
|
|
|
847
845
|
}).then(handleCancel);
|
|
848
846
|
throw new Error(`Unknown prompt type: ${opts.type}`);
|
|
849
847
|
}
|
|
850
|
-
|
|
851
|
-
//#endregion
|
|
852
|
-
export { prompt };
|
|
848
|
+
export { prompt };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { tryImport } from "./index-CISmcbXk-DpuCarFe.js";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/xsschema/dist/sury-DmrZ3_Oj.js
|
|
4
2
|
const getToJsonSchemaFn = async () => {
|
|
5
3
|
const { toJSONSchema } = await tryImport(import("sury"), "sury");
|
|
6
4
|
return (schema) => toJSONSchema(schema);
|
|
7
5
|
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getToJsonSchemaFn };
|
|
6
|
+
export { getToJsonSchemaFn };
|
package/dist/types-5-VF7WcO.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region node_modules/zod/dist/esm/v3/helpers/util.js
|
|
2
1
|
var util;
|
|
3
2
|
(function(util$1) {
|
|
4
3
|
util$1.assertEqual = (_) => {};
|
|
@@ -95,9 +94,6 @@ const getParsedType = (data) => {
|
|
|
95
94
|
default: return ZodParsedType.unknown;
|
|
96
95
|
}
|
|
97
96
|
};
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region node_modules/zod/dist/esm/v3/ZodError.js
|
|
101
97
|
const ZodIssueCode = util.arrayToEnum([
|
|
102
98
|
"invalid_type",
|
|
103
99
|
"invalid_literal",
|
|
@@ -196,9 +192,6 @@ ZodError.create = (issues) => {
|
|
|
196
192
|
const error = new ZodError(issues);
|
|
197
193
|
return error;
|
|
198
194
|
};
|
|
199
|
-
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region node_modules/zod/dist/esm/v3/locales/en.js
|
|
202
195
|
const errorMap = (issue, _ctx) => {
|
|
203
196
|
let message;
|
|
204
197
|
switch (issue.code) {
|
|
@@ -274,16 +267,10 @@ const errorMap = (issue, _ctx) => {
|
|
|
274
267
|
return { message };
|
|
275
268
|
};
|
|
276
269
|
var en_default = errorMap;
|
|
277
|
-
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region node_modules/zod/dist/esm/v3/errors.js
|
|
280
270
|
let overrideErrorMap = en_default;
|
|
281
271
|
function getErrorMap() {
|
|
282
272
|
return overrideErrorMap;
|
|
283
273
|
}
|
|
284
|
-
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region node_modules/zod/dist/esm/v3/helpers/parseUtil.js
|
|
287
274
|
const makeIssue = (params) => {
|
|
288
275
|
const { data, path, errorMaps, issueData } = params;
|
|
289
276
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -386,17 +373,11 @@ const isAborted = (x) => x.status === "aborted";
|
|
|
386
373
|
const isDirty = (x) => x.status === "dirty";
|
|
387
374
|
const isValid = (x) => x.status === "valid";
|
|
388
375
|
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
389
|
-
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region node_modules/zod/dist/esm/v3/helpers/errorUtil.js
|
|
392
376
|
var errorUtil;
|
|
393
377
|
(function(errorUtil$1) {
|
|
394
378
|
errorUtil$1.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
395
379
|
errorUtil$1.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
396
380
|
})(errorUtil || (errorUtil = {}));
|
|
397
|
-
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region node_modules/zod/dist/esm/v3/types.js
|
|
400
381
|
var ParseInputLazyPath = class {
|
|
401
382
|
constructor(parent, value, path, key) {
|
|
402
383
|
this._cachedPath = [];
|
|
@@ -3581,6 +3562,4 @@ const optionalType = ZodOptional.create;
|
|
|
3581
3562
|
const nullableType = ZodNullable.create;
|
|
3582
3563
|
const preprocessType = ZodEffects.createWithPreprocess;
|
|
3583
3564
|
const pipelineType = ZodPipeline.create;
|
|
3584
|
-
|
|
3585
|
-
//#endregion
|
|
3586
|
-
export { ZodFirstPartyTypeKind, ZodOptional, anyType, arrayType, booleanType, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType };
|
|
3565
|
+
export { ZodFirstPartyTypeKind, ZodOptional, anyType, arrayType, booleanType, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { tryImport } from "./index-CISmcbXk-DpuCarFe.js";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/xsschema/dist/valibot-CQk-M5rL.js
|
|
4
2
|
const getToJsonSchemaFn = async () => {
|
|
5
3
|
const { toJsonSchema } = await tryImport(import("./dist-Cb1UHXV5.js"), "@valibot/to-json-schema");
|
|
6
4
|
return (schema) => toJsonSchema(schema);
|
|
7
5
|
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getToJsonSchemaFn };
|
|
6
|
+
export { getToJsonSchemaFn };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { missingDependenciesUrl } from "./index-CISmcbXk-DpuCarFe.js";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/xsschema/dist/zod-Db63SLXj.js
|
|
4
2
|
const getToJsonSchemaFn = async () => {
|
|
5
3
|
let zodV4toJSONSchema = (_schema) => {
|
|
6
4
|
throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${missingDependenciesUrl}`);
|
|
@@ -25,6 +23,4 @@ const getToJsonSchemaFn = async () => {
|
|
|
25
23
|
else return zodV3ToJSONSchema(schema);
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { getToJsonSchemaFn };
|
|
26
|
+
export { getToJsonSchemaFn };
|