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
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { tryImport } from "./index-CISmcbXk-DpuCarFe.js";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/xsschema/dist/effect-WSjEuzC9.js
|
|
4
2
|
const getToJsonSchemaFn = async () => {
|
|
5
3
|
const { JSONSchema } = await tryImport(import("effect"), "effect");
|
|
6
4
|
return (schema) => JSONSchema.make(schema);
|
|
7
5
|
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getToJsonSchemaFn };
|
|
6
|
+
export { getToJsonSchemaFn };
|
package/dist/esm-D74K9ESq.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ZodFirstPartyTypeKind, ZodOptional } from "./types-5-VF7WcO.js";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
4
2
|
const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
5
3
|
const defaultOptions = {
|
|
6
4
|
name: void 0,
|
|
@@ -32,9 +30,6 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
32
30
|
...defaultOptions,
|
|
33
31
|
...options
|
|
34
32
|
};
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
38
33
|
const getRefs = (options) => {
|
|
39
34
|
const _options = getDefaultOptions(options);
|
|
40
35
|
const currentPath = _options.name !== void 0 ? [
|
|
@@ -57,9 +52,6 @@ const getRefs = (options) => {
|
|
|
57
52
|
}]))
|
|
58
53
|
};
|
|
59
54
|
};
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
63
55
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
64
56
|
if (!refs?.errorMessages) return;
|
|
65
57
|
if (errorMessage) res.errorMessage = {
|
|
@@ -71,15 +63,9 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
71
63
|
res[key] = value;
|
|
72
64
|
addErrorMessage(res, key, errorMessage, refs);
|
|
73
65
|
}
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
77
66
|
function parseAnyDef() {
|
|
78
67
|
return {};
|
|
79
68
|
}
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
83
69
|
function parseArrayDef(def, refs) {
|
|
84
70
|
const res = { type: "array" };
|
|
85
71
|
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
|
|
@@ -94,9 +80,6 @@ function parseArrayDef(def, refs) {
|
|
|
94
80
|
}
|
|
95
81
|
return res;
|
|
96
82
|
}
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
100
83
|
function parseBigintDef(def, refs) {
|
|
101
84
|
const res = {
|
|
102
85
|
type: "integer",
|
|
@@ -126,27 +109,15 @@ function parseBigintDef(def, refs) {
|
|
|
126
109
|
}
|
|
127
110
|
return res;
|
|
128
111
|
}
|
|
129
|
-
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
132
112
|
function parseBooleanDef() {
|
|
133
113
|
return { type: "boolean" };
|
|
134
114
|
}
|
|
135
|
-
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
138
115
|
function parseBrandedDef(_def, refs) {
|
|
139
116
|
return parseDef(_def.type._def, refs);
|
|
140
117
|
}
|
|
141
|
-
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
144
118
|
const parseCatchDef = (def, refs) => {
|
|
145
119
|
return parseDef(def.innerType._def, refs);
|
|
146
120
|
};
|
|
147
|
-
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
150
121
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
151
122
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
152
123
|
if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
|
|
@@ -179,33 +150,21 @@ const integerDateParser = (def, refs) => {
|
|
|
179
150
|
}
|
|
180
151
|
return res;
|
|
181
152
|
};
|
|
182
|
-
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
185
153
|
function parseDefaultDef(_def, refs) {
|
|
186
154
|
return {
|
|
187
155
|
...parseDef(_def.innerType._def, refs),
|
|
188
156
|
default: _def.defaultValue()
|
|
189
157
|
};
|
|
190
158
|
}
|
|
191
|
-
|
|
192
|
-
//#endregion
|
|
193
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
194
159
|
function parseEffectsDef(_def, refs) {
|
|
195
160
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : {};
|
|
196
161
|
}
|
|
197
|
-
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
200
162
|
function parseEnumDef(def) {
|
|
201
163
|
return {
|
|
202
164
|
type: "string",
|
|
203
165
|
enum: Array.from(def.values)
|
|
204
166
|
};
|
|
205
167
|
}
|
|
206
|
-
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
209
168
|
const isJsonSchema7AllOfType = (type) => {
|
|
210
169
|
if ("type" in type && type.type === "string") return false;
|
|
211
170
|
return "allOf" in type;
|
|
@@ -246,9 +205,6 @@ function parseIntersectionDef(def, refs) {
|
|
|
246
205
|
...unevaluatedProperties
|
|
247
206
|
} : void 0;
|
|
248
207
|
}
|
|
249
|
-
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
252
208
|
function parseLiteralDef(def, refs) {
|
|
253
209
|
const parsedType = typeof def.value;
|
|
254
210
|
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
|
|
@@ -261,9 +217,6 @@ function parseLiteralDef(def, refs) {
|
|
|
261
217
|
const: def.value
|
|
262
218
|
};
|
|
263
219
|
}
|
|
264
|
-
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
267
220
|
let emojiRegex = void 0;
|
|
268
221
|
/**
|
|
269
222
|
* Generated from the regular expressions found here as of 2024-05-22:
|
|
@@ -517,9 +470,6 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
517
470
|
}
|
|
518
471
|
return pattern;
|
|
519
472
|
}
|
|
520
|
-
|
|
521
|
-
//#endregion
|
|
522
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
523
473
|
function parseRecordDef(def, refs) {
|
|
524
474
|
if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
525
475
|
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
@@ -565,9 +515,6 @@ function parseRecordDef(def, refs) {
|
|
|
565
515
|
}
|
|
566
516
|
return schema;
|
|
567
517
|
}
|
|
568
|
-
|
|
569
|
-
//#endregion
|
|
570
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
571
518
|
function parseMapDef(def, refs) {
|
|
572
519
|
if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
|
|
573
520
|
const keys = parseDef(def.keyType._def, {
|
|
@@ -599,9 +546,6 @@ function parseMapDef(def, refs) {
|
|
|
599
546
|
}
|
|
600
547
|
};
|
|
601
548
|
}
|
|
602
|
-
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
605
549
|
function parseNativeEnumDef(def) {
|
|
606
550
|
const object = def.values;
|
|
607
551
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -614,24 +558,15 @@ function parseNativeEnumDef(def) {
|
|
|
614
558
|
enum: actualValues
|
|
615
559
|
};
|
|
616
560
|
}
|
|
617
|
-
|
|
618
|
-
//#endregion
|
|
619
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
620
561
|
function parseNeverDef() {
|
|
621
562
|
return { not: {} };
|
|
622
563
|
}
|
|
623
|
-
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
626
564
|
function parseNullDef(refs) {
|
|
627
565
|
return refs.target === "openApi3" ? {
|
|
628
566
|
enum: ["null"],
|
|
629
567
|
nullable: true
|
|
630
568
|
} : { type: "null" };
|
|
631
569
|
}
|
|
632
|
-
|
|
633
|
-
//#endregion
|
|
634
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
635
570
|
const primitiveMappings = {
|
|
636
571
|
ZodString: "string",
|
|
637
572
|
ZodNumber: "number",
|
|
@@ -689,9 +624,6 @@ const asAnyOf = (def, refs) => {
|
|
|
689
624
|
})).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
|
|
690
625
|
return anyOf.length ? { anyOf } : void 0;
|
|
691
626
|
};
|
|
692
|
-
|
|
693
|
-
//#endregion
|
|
694
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
695
627
|
function parseNullableDef(def, refs) {
|
|
696
628
|
if ([
|
|
697
629
|
"ZodString",
|
|
@@ -730,9 +662,6 @@ function parseNullableDef(def, refs) {
|
|
|
730
662
|
});
|
|
731
663
|
return base && { anyOf: [base, { type: "null" }] };
|
|
732
664
|
}
|
|
733
|
-
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
736
665
|
function parseNumberDef(def, refs) {
|
|
737
666
|
const res = { type: "number" };
|
|
738
667
|
if (!def.checks) return res;
|
|
@@ -763,9 +692,6 @@ function parseNumberDef(def, refs) {
|
|
|
763
692
|
}
|
|
764
693
|
return res;
|
|
765
694
|
}
|
|
766
|
-
|
|
767
|
-
//#endregion
|
|
768
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
769
695
|
function parseObjectDef(def, refs) {
|
|
770
696
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
771
697
|
const result = {
|
|
@@ -823,9 +749,6 @@ function safeIsOptional(schema) {
|
|
|
823
749
|
return true;
|
|
824
750
|
}
|
|
825
751
|
}
|
|
826
|
-
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
829
752
|
const parseOptionalDef = (def, refs) => {
|
|
830
753
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
|
|
831
754
|
const innerSchema = parseDef(def.innerType._def, {
|
|
@@ -838,9 +761,6 @@ const parseOptionalDef = (def, refs) => {
|
|
|
838
761
|
});
|
|
839
762
|
return innerSchema ? { anyOf: [{ not: {} }, innerSchema] } : {};
|
|
840
763
|
};
|
|
841
|
-
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
844
764
|
const parsePipelineDef = (def, refs) => {
|
|
845
765
|
if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
|
|
846
766
|
else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
|
|
@@ -862,15 +782,9 @@ const parsePipelineDef = (def, refs) => {
|
|
|
862
782
|
});
|
|
863
783
|
return { allOf: [a, b].filter((x) => x !== void 0) };
|
|
864
784
|
};
|
|
865
|
-
|
|
866
|
-
//#endregion
|
|
867
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
868
785
|
function parsePromiseDef(def, refs) {
|
|
869
786
|
return parseDef(def.type._def, refs);
|
|
870
787
|
}
|
|
871
|
-
|
|
872
|
-
//#endregion
|
|
873
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
874
788
|
function parseSetDef(def, refs) {
|
|
875
789
|
const items = parseDef(def.valueType._def, {
|
|
876
790
|
...refs,
|
|
@@ -885,9 +799,6 @@ function parseSetDef(def, refs) {
|
|
|
885
799
|
if (def.maxSize) setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
|
|
886
800
|
return schema;
|
|
887
801
|
}
|
|
888
|
-
|
|
889
|
-
//#endregion
|
|
890
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
891
802
|
function parseTupleDef(def, refs) {
|
|
892
803
|
if (def.rest) return {
|
|
893
804
|
type: "array",
|
|
@@ -919,27 +830,15 @@ function parseTupleDef(def, refs) {
|
|
|
919
830
|
})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
|
|
920
831
|
};
|
|
921
832
|
}
|
|
922
|
-
|
|
923
|
-
//#endregion
|
|
924
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
925
833
|
function parseUndefinedDef() {
|
|
926
834
|
return { not: {} };
|
|
927
835
|
}
|
|
928
|
-
|
|
929
|
-
//#endregion
|
|
930
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
931
836
|
function parseUnknownDef() {
|
|
932
837
|
return {};
|
|
933
838
|
}
|
|
934
|
-
|
|
935
|
-
//#endregion
|
|
936
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
937
839
|
const parseReadonlyDef = (def, refs) => {
|
|
938
840
|
return parseDef(def.innerType._def, refs);
|
|
939
841
|
};
|
|
940
|
-
|
|
941
|
-
//#endregion
|
|
942
|
-
//#region node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
943
842
|
const selectParser = (def, typeName, refs) => {
|
|
944
843
|
switch (typeName) {
|
|
945
844
|
case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
|
|
@@ -983,9 +882,6 @@ const selectParser = (def, typeName, refs) => {
|
|
|
983
882
|
return ((_) => void 0)(typeName);
|
|
984
883
|
}
|
|
985
884
|
};
|
|
986
|
-
|
|
987
|
-
//#endregion
|
|
988
|
-
//#region node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
989
885
|
function parseDef(def, refs, forceResolution = false) {
|
|
990
886
|
const seenItem = refs.seen.get(def);
|
|
991
887
|
if (refs.override) {
|
|
@@ -1039,9 +935,6 @@ const addMeta = (def, refs, jsonSchema) => {
|
|
|
1039
935
|
}
|
|
1040
936
|
return jsonSchema;
|
|
1041
937
|
};
|
|
1042
|
-
|
|
1043
|
-
//#endregion
|
|
1044
|
-
//#region node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
1045
938
|
const zodToJsonSchema = (schema, options) => {
|
|
1046
939
|
const refs = getRefs(options);
|
|
1047
940
|
const definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name$1, schema$1]) => ({
|
|
@@ -1085,6 +978,4 @@ const zodToJsonSchema = (schema, options) => {
|
|
|
1085
978
|
if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
|
|
1086
979
|
return combined;
|
|
1087
980
|
};
|
|
1088
|
-
|
|
1089
|
-
//#endregion
|
|
1090
|
-
export { zodToJsonSchema };
|
|
981
|
+
export { zodToJsonSchema };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region node_modules/xsschema/dist/index-CISmcbXk.js
|
|
2
1
|
const missingDependenciesUrl = "https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies";
|
|
3
2
|
const tryImport = async (result, name) => {
|
|
4
3
|
try {
|
|
@@ -18,6 +17,4 @@ const getToJsonSchemaFn = async (vendor) => {
|
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
const toJsonSchema = async (schema) => getToJsonSchemaFn(schema["~standard"].vendor).then(async (toJsonSchema2) => toJsonSchema2(schema));
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { missingDependenciesUrl, toJsonSchema, tryImport };
|
|
20
|
+
export { missingDependenciesUrl, toJsonSchema, tryImport };
|