@cendor/tokenguard 0.2.2 → 0.2.4
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/NOTICE +7 -0
- package/README.md +3 -3
- package/package.json +9 -3
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @cendor/tokenguard
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@cendor/tokenguard) [](https://opensource.org/licenses/Apache-2.0)
|
|
4
|
+
|
|
5
|
+
Spending limits for LLM calls: stop a call before it runs if it would blow the budget, and see cost broken down per feature. The TypeScript port of `cendor.tokenguard`.
|
|
5
6
|
|
|
6
7
|
tokenguard **subscribes** to `@cendor/core`'s event bus and registers a pre-flight interceptor — it
|
|
7
8
|
never patches a client itself (the locked architecture: one `instrument()`, many subscribers). Once a
|
|
@@ -75,4 +76,3 @@ async, single-threaded TS runtime:
|
|
|
75
76
|
**projections** use exact token counts. The OS-thread thread-safety tests are dropped (Node is
|
|
76
77
|
single-threaded); `QueueSink` is an async FIFO drain loop rather than a daemon thread, preserving
|
|
77
78
|
the observable semantics (FIFO order, back-pressure, idempotent close, flush→close ordering).
|
|
78
|
-
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cendor/tokenguard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Spending limits for LLM calls: stop a call before it runs if it would blow the budget, and see cost broken down per feature.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
-
"README.md"
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"NOTICE"
|
|
22
24
|
],
|
|
23
25
|
"sideEffects": [
|
|
24
26
|
"./dist/index.js"
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
"node": ">=18"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
|
-
"@cendor/core": "^0.3.
|
|
32
|
+
"@cendor/core": "^0.3.3"
|
|
31
33
|
},
|
|
32
34
|
"optionalDependencies": {
|
|
33
35
|
"better-sqlite3": "^12.11.1"
|
|
@@ -52,6 +54,10 @@
|
|
|
52
54
|
"url": "git+https://github.com/cendorhq/cendor-libs-js.git",
|
|
53
55
|
"directory": "packages/tokenguard"
|
|
54
56
|
},
|
|
57
|
+
"homepage": "https://cendor.ai/docs/tokenguard",
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/cendorhq/cendor-libs-js/issues"
|
|
60
|
+
},
|
|
55
61
|
"publishConfig": {
|
|
56
62
|
"access": "public"
|
|
57
63
|
}
|