@bivelio/savings-layer 0.5.2 → 1.1.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/CHANGELOG.md +138 -0
- package/LICENSE +183 -163
- package/LICENSE-CLOUD.md +174 -0
- package/NOTICE +11 -0
- package/README.md +228 -122
- package/dist/adapters/ai-sdk.js +78 -78
- package/dist/adapters/anthropic-sdk.js +88 -88
- package/dist/adapters/langchain.js +58 -58
- package/dist/adapters/mastra.js +70 -70
- package/dist/gateway/bin.js +1291 -1082
- package/dist/index.d.ts +393 -194
- package/dist/index.js +1704 -1612
- package/docs/terminales/README.md +39 -33
- package/docs/terminales/aider.md +1 -1
- package/docs/terminales/claude-code.md +2 -2
- package/docs/terminales/cline.md +1 -1
- package/docs/terminales/codex.md +3 -3
- package/docs/terminales/copilot.md +1 -1
- package/docs/terminales/crush.md +1 -1
- package/docs/terminales/cursor.md +32 -0
- package/docs/terminales/deepseek.md +28 -0
- package/docs/terminales/droid.md +1 -1
- package/docs/terminales/gemini.md +38 -0
- package/docs/terminales/goose.md +2 -2
- package/docs/terminales/kilo.md +2 -2
- package/docs/terminales/no-soportados.md +16 -27
- package/docs/terminales/ollama.md +19 -0
- package/docs/terminales/opencode.md +2 -2
- package/docs/terminales/qwen-code.md +2 -2
- package/package.json +50 -20
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bivelio/savings-layer",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The savings layer for your LLM bill: a
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "The savings layer for your LLM bill: a zero-dependency open-core layer inside your code — and a local gateway for coding agents — that lets through only what has to be paid for, and returns a SavingsReport per call measured with your provider's own meter. Apache-2.0, zero telemetry by default; the optional cloud adds team dashboard and shared caches.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
|
7
7
|
"cost-optimization",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/BiVelio/bivelio-savings-layer.git"
|
|
21
21
|
},
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
23
|
"author": "BiVelio Inc.",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"publishConfig": {
|
|
@@ -64,20 +64,24 @@
|
|
|
64
64
|
"docs/terminales",
|
|
65
65
|
"skills",
|
|
66
66
|
"README.md",
|
|
67
|
-
"
|
|
67
|
+
"CHANGELOG.md",
|
|
68
|
+
"LICENSE",
|
|
69
|
+
"LICENSE-CLOUD.md",
|
|
70
|
+
"NOTICE"
|
|
68
71
|
],
|
|
69
72
|
"engines": {
|
|
70
|
-
"node": ">=20.
|
|
73
|
+
"node": ">=20.19.0"
|
|
71
74
|
},
|
|
72
75
|
"scripts": {
|
|
73
76
|
"build": "tsup",
|
|
74
77
|
"build:packages": "pnpm -r --filter=./packages/* build",
|
|
75
78
|
"build:services": "pnpm -r --filter=./services/* build",
|
|
76
|
-
"build:all": "pnpm run build
|
|
79
|
+
"build:all": "pnpm run build && pnpm run build:packages && pnpm run build:services",
|
|
77
80
|
"typecheck": "tsc --noEmit",
|
|
78
81
|
"typecheck:packages": "pnpm -r --filter=./packages/* --filter=./services/* typecheck",
|
|
79
82
|
"typecheck:all": "pnpm run typecheck && pnpm run typecheck:packages && pnpm run typecheck:ejemplos",
|
|
80
83
|
"typecheck:ejemplos": "tsc -p examples/stacks/tsconfig.json",
|
|
84
|
+
"paper:contenido": "tsx scripts/paper.ts",
|
|
81
85
|
"test": "vitest run",
|
|
82
86
|
"test:watch": "vitest",
|
|
83
87
|
"lint": "tsc --noEmit",
|
|
@@ -94,6 +98,7 @@
|
|
|
94
98
|
"example:anthropic-sdk": "BVSALA_DEV_OPEN=1 tsx examples/stacks/anthropic-sdk/bivelio-check.ts",
|
|
95
99
|
"example:litellm": "BVSALA_DEV_OPEN=1 tsx examples/litellm/check.ts",
|
|
96
100
|
"init:ejemplos": "tsx scripts/ejemplos-de-init.ts",
|
|
101
|
+
"paridad:vectores": "tsx scripts/paridad-vectores.ts",
|
|
97
102
|
"example:licensed": "tsx examples/licensing/licensed.ts",
|
|
98
103
|
"license:demo": "tsx examples/licensing/demo.ts",
|
|
99
104
|
"example:revocation": "tsx examples/licensing/revocation.ts",
|
|
@@ -116,6 +121,8 @@
|
|
|
116
121
|
"sombra:corpus": "tsx benchmarks/sombra-corpus.ts",
|
|
117
122
|
"ttl:replay": "tsx benchmarks/ttl/replay.ts",
|
|
118
123
|
"compactacion:banco": "tsx benchmarks/compactacion-de-cola/banco.ts",
|
|
124
|
+
"ahorro:banco": "tsx benchmarks/ahorro-tool-results/banco.ts",
|
|
125
|
+
"dedup:banco": "tsx benchmarks/dedup-de-lote.ts",
|
|
119
126
|
"sombra:diales": "tsx --env-file-if-exists=.env.bench benchmarks/sombra-diales.ts",
|
|
120
127
|
"anillo1": "tsx --env-file-if-exists=.env.bench benchmarks/anillo1/arnes.ts",
|
|
121
128
|
"anillo2": "tsx benchmarks/anillo2/arnes.ts",
|
|
@@ -128,6 +135,7 @@
|
|
|
128
135
|
"luz-verde": "bash scripts/luz-verde.sh",
|
|
129
136
|
"sonda:sdk": "BVSALA_DEV_OPEN=1 tsx --env-file-if-exists=.env.bench benchmarks/sdk/sonda.ts",
|
|
130
137
|
"sbom:tarball": "tsx scripts/sbom.ts",
|
|
138
|
+
"rc:verify": "pnpm run build:all && pnpm exec tsx scripts/release-candidate.ts",
|
|
131
139
|
"cache-semantica": "BVSALA_DEV_OPEN=1 tsx benchmarks/cache-semantica/arnes.ts",
|
|
132
140
|
"cache-semantica:publicar": "tsx benchmarks/cache-semantica/publicar.ts",
|
|
133
141
|
"latencia:gateways": "tsx benchmarks/latencia-gateways/arnes.ts",
|
|
@@ -136,43 +144,65 @@
|
|
|
136
144
|
"catalogo:contraste": "tsx scripts/contraste-catalogo.ts",
|
|
137
145
|
"cache-semantica:calibrada": "BVSALA_DEV_OPEN=1 tsx benchmarks/cache-semantica/calibrada.ts",
|
|
138
146
|
"cache-semantica:simulacion": "tsx benchmarks/cache-semantica/simulacion.ts",
|
|
147
|
+
"bench:postgres-semantica": "tsx packages/persistence-postgres/benchmark/semantic-100k.ts",
|
|
139
148
|
"bench:bfcl": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/bfcl/arnes.ts",
|
|
140
149
|
"bench:gsm8k": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/gsm8k/arnes.ts",
|
|
141
150
|
"bench:xstest": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/xstest/banco.ts",
|
|
142
151
|
"banco:semanal": "BVSALA_DEV_OPEN=1 tsx --env-file-if-exists=.env.bench benchmarks/banco-semanal/orquestador.ts"
|
|
143
152
|
},
|
|
144
153
|
"devDependencies": {
|
|
145
|
-
"@noble/curves": "^2.2.0",
|
|
146
|
-
"@opentelemetry/api": "^1.9.1",
|
|
147
|
-
"@opentelemetry/sdk-trace-base": "^2.11.0",
|
|
148
|
-
"@types/node": "^22.10.2",
|
|
149
|
-
"gpt-tokenizer": "^3.4.0",
|
|
150
|
-
"hyparquet": "^1.31.2",
|
|
151
|
-
"tsup": "^8.3.5",
|
|
152
|
-
"tsx": "^4.19.2",
|
|
153
|
-
"typescript": "^5.7.2",
|
|
154
|
-
"vitest": "^2.1.8",
|
|
155
154
|
"@ai-sdk/anthropic": "4.0.65",
|
|
156
155
|
"@ai-sdk/openai": "4.0.78",
|
|
157
156
|
"@anthropic-ai/sdk": "0.128.0",
|
|
158
157
|
"@langchain/core": "1.2.13",
|
|
159
158
|
"@langchain/openai": "1.6.0",
|
|
160
159
|
"@mastra/core": "1.71.0",
|
|
160
|
+
"@noble/curves": "^2.2.0",
|
|
161
|
+
"@opentelemetry/api": "^1.9.1",
|
|
162
|
+
"@opentelemetry/sdk-trace-base": "^2.11.0",
|
|
163
|
+
"@types/express": "5.0.6",
|
|
164
|
+
"@types/node": "^22.10.2",
|
|
165
|
+
"@types/pg": "^8.23.1",
|
|
161
166
|
"ai": "7.0.118",
|
|
162
167
|
"ai-v6": "npm:ai@6.0.293",
|
|
163
|
-
"@types/express": "5.0.6",
|
|
164
168
|
"express": "5.2.1",
|
|
169
|
+
"gpt-tokenizer": "^3.4.0",
|
|
170
|
+
"hyparquet": "^1.31.2",
|
|
165
171
|
"langchain": "1.5.14",
|
|
166
|
-
"
|
|
172
|
+
"pg": "^8.23.1",
|
|
173
|
+
"tsup": "^8.3.5",
|
|
174
|
+
"tsx": "^4.19.2",
|
|
175
|
+
"typescript": "^5.7.2",
|
|
176
|
+
"vitest": "^4.1.12",
|
|
177
|
+
"zod": "4.6.6"
|
|
167
178
|
},
|
|
168
179
|
"packageManager": "pnpm@10.17.1",
|
|
180
|
+
"pnpm": {
|
|
181
|
+
"onlyBuiltDependencies": [
|
|
182
|
+
"esbuild"
|
|
183
|
+
],
|
|
184
|
+
"overrides": {
|
|
185
|
+
"zod": "4.6.6",
|
|
186
|
+
"undici": "7.30.1",
|
|
187
|
+
"hono": "4.13.14",
|
|
188
|
+
"langsmith": "0.11.1",
|
|
189
|
+
"vite": "6.4.4",
|
|
190
|
+
"vitest": "4.1.12",
|
|
191
|
+
"esbuild": "0.28.1",
|
|
192
|
+
"tinypool": "2.1.2",
|
|
193
|
+
"source-map-js": "1.2.2",
|
|
194
|
+
"nanoid": "3.3.20",
|
|
195
|
+
"postcss": "8.5.23",
|
|
196
|
+
"body-parser": "2.4.0"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
169
199
|
"peerDependencies": {
|
|
170
|
-
"@opentelemetry/api": "^1.9.0",
|
|
171
|
-
"gpt-tokenizer": "^3",
|
|
172
200
|
"@anthropic-ai/sdk": ">=0.103.0 <1",
|
|
173
201
|
"@langchain/core": ">=1.1.0 <2",
|
|
174
202
|
"@mastra/core": ">=1.68.0 <2",
|
|
203
|
+
"@opentelemetry/api": "^1.9.0",
|
|
175
204
|
"ai": "^6.0.0 || ^7.0.0",
|
|
205
|
+
"gpt-tokenizer": "^3",
|
|
176
206
|
"langchain": ">=1.1.0 <2"
|
|
177
207
|
},
|
|
178
208
|
"peerDependenciesMeta": {
|