@bivelio/savings-layer 0.5.1 → 1.0.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 +115 -0
- package/LICENSE +183 -163
- package/LICENSE-CLOUD.md +174 -0
- package/NOTICE +11 -0
- package/README.md +228 -126
- 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 +367 -197
- package/dist/index.js +1717 -1641
- 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 +48 -20
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bivelio/savings-layer",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The savings layer for your LLM bill: a
|
|
3
|
+
"version": "1.0.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,16 +64,19 @@
|
|
|
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",
|
|
@@ -94,6 +97,7 @@
|
|
|
94
97
|
"example:anthropic-sdk": "BVSALA_DEV_OPEN=1 tsx examples/stacks/anthropic-sdk/bivelio-check.ts",
|
|
95
98
|
"example:litellm": "BVSALA_DEV_OPEN=1 tsx examples/litellm/check.ts",
|
|
96
99
|
"init:ejemplos": "tsx scripts/ejemplos-de-init.ts",
|
|
100
|
+
"paridad:vectores": "tsx scripts/paridad-vectores.ts",
|
|
97
101
|
"example:licensed": "tsx examples/licensing/licensed.ts",
|
|
98
102
|
"license:demo": "tsx examples/licensing/demo.ts",
|
|
99
103
|
"example:revocation": "tsx examples/licensing/revocation.ts",
|
|
@@ -116,6 +120,7 @@
|
|
|
116
120
|
"sombra:corpus": "tsx benchmarks/sombra-corpus.ts",
|
|
117
121
|
"ttl:replay": "tsx benchmarks/ttl/replay.ts",
|
|
118
122
|
"compactacion:banco": "tsx benchmarks/compactacion-de-cola/banco.ts",
|
|
123
|
+
"ahorro:banco": "tsx benchmarks/ahorro-tool-results/banco.ts",
|
|
119
124
|
"sombra:diales": "tsx --env-file-if-exists=.env.bench benchmarks/sombra-diales.ts",
|
|
120
125
|
"anillo1": "tsx --env-file-if-exists=.env.bench benchmarks/anillo1/arnes.ts",
|
|
121
126
|
"anillo2": "tsx benchmarks/anillo2/arnes.ts",
|
|
@@ -128,6 +133,7 @@
|
|
|
128
133
|
"luz-verde": "bash scripts/luz-verde.sh",
|
|
129
134
|
"sonda:sdk": "BVSALA_DEV_OPEN=1 tsx --env-file-if-exists=.env.bench benchmarks/sdk/sonda.ts",
|
|
130
135
|
"sbom:tarball": "tsx scripts/sbom.ts",
|
|
136
|
+
"rc:verify": "pnpm run build:all && pnpm exec tsx scripts/release-candidate.ts",
|
|
131
137
|
"cache-semantica": "BVSALA_DEV_OPEN=1 tsx benchmarks/cache-semantica/arnes.ts",
|
|
132
138
|
"cache-semantica:publicar": "tsx benchmarks/cache-semantica/publicar.ts",
|
|
133
139
|
"latencia:gateways": "tsx benchmarks/latencia-gateways/arnes.ts",
|
|
@@ -136,43 +142,65 @@
|
|
|
136
142
|
"catalogo:contraste": "tsx scripts/contraste-catalogo.ts",
|
|
137
143
|
"cache-semantica:calibrada": "BVSALA_DEV_OPEN=1 tsx benchmarks/cache-semantica/calibrada.ts",
|
|
138
144
|
"cache-semantica:simulacion": "tsx benchmarks/cache-semantica/simulacion.ts",
|
|
145
|
+
"bench:postgres-semantica": "tsx packages/persistence-postgres/benchmark/semantic-100k.ts",
|
|
139
146
|
"bench:bfcl": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/bfcl/arnes.ts",
|
|
140
147
|
"bench:gsm8k": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/gsm8k/arnes.ts",
|
|
141
148
|
"bench:xstest": "tsx --env-file-if-exists=.env.bench benchmarks/publicados/xstest/banco.ts",
|
|
142
149
|
"banco:semanal": "BVSALA_DEV_OPEN=1 tsx --env-file-if-exists=.env.bench benchmarks/banco-semanal/orquestador.ts"
|
|
143
150
|
},
|
|
144
151
|
"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
152
|
"@ai-sdk/anthropic": "4.0.65",
|
|
156
153
|
"@ai-sdk/openai": "4.0.78",
|
|
157
154
|
"@anthropic-ai/sdk": "0.128.0",
|
|
158
155
|
"@langchain/core": "1.2.13",
|
|
159
156
|
"@langchain/openai": "1.6.0",
|
|
160
157
|
"@mastra/core": "1.71.0",
|
|
158
|
+
"@noble/curves": "^2.2.0",
|
|
159
|
+
"@opentelemetry/api": "^1.9.1",
|
|
160
|
+
"@opentelemetry/sdk-trace-base": "^2.11.0",
|
|
161
|
+
"@types/express": "5.0.6",
|
|
162
|
+
"@types/node": "^22.10.2",
|
|
163
|
+
"@types/pg": "^8.23.1",
|
|
161
164
|
"ai": "7.0.118",
|
|
162
165
|
"ai-v6": "npm:ai@6.0.293",
|
|
163
|
-
"@types/express": "5.0.6",
|
|
164
166
|
"express": "5.2.1",
|
|
167
|
+
"gpt-tokenizer": "^3.4.0",
|
|
168
|
+
"hyparquet": "^1.31.2",
|
|
165
169
|
"langchain": "1.5.14",
|
|
166
|
-
"
|
|
170
|
+
"pg": "^8.23.1",
|
|
171
|
+
"tsup": "^8.3.5",
|
|
172
|
+
"tsx": "^4.19.2",
|
|
173
|
+
"typescript": "^5.7.2",
|
|
174
|
+
"vitest": "^4.1.12",
|
|
175
|
+
"zod": "4.6.6"
|
|
167
176
|
},
|
|
168
177
|
"packageManager": "pnpm@10.17.1",
|
|
178
|
+
"pnpm": {
|
|
179
|
+
"onlyBuiltDependencies": [
|
|
180
|
+
"esbuild"
|
|
181
|
+
],
|
|
182
|
+
"overrides": {
|
|
183
|
+
"zod": "4.6.6",
|
|
184
|
+
"undici": "7.30.1",
|
|
185
|
+
"hono": "4.13.14",
|
|
186
|
+
"langsmith": "0.11.1",
|
|
187
|
+
"vite": "6.4.4",
|
|
188
|
+
"vitest": "4.1.12",
|
|
189
|
+
"esbuild": "0.28.1",
|
|
190
|
+
"tinypool": "2.1.2",
|
|
191
|
+
"source-map-js": "1.2.2",
|
|
192
|
+
"nanoid": "3.3.20",
|
|
193
|
+
"postcss": "8.5.23",
|
|
194
|
+
"body-parser": "2.4.0"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
169
197
|
"peerDependencies": {
|
|
170
|
-
"@opentelemetry/api": "^1.9.0",
|
|
171
|
-
"gpt-tokenizer": "^3",
|
|
172
198
|
"@anthropic-ai/sdk": ">=0.103.0 <1",
|
|
173
199
|
"@langchain/core": ">=1.1.0 <2",
|
|
174
200
|
"@mastra/core": ">=1.68.0 <2",
|
|
201
|
+
"@opentelemetry/api": "^1.9.0",
|
|
175
202
|
"ai": "^6.0.0 || ^7.0.0",
|
|
203
|
+
"gpt-tokenizer": "^3",
|
|
176
204
|
"langchain": ">=1.1.0 <2"
|
|
177
205
|
},
|
|
178
206
|
"peerDependenciesMeta": {
|