@sisu-ai/mw-usage-tracker 3.0.1 → 3.0.3

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.
Files changed (2) hide show
  1. package/README.md +15 -3
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -2,14 +2,16 @@
2
2
 
3
3
  Track token usage across your pipeline and estimate cost.
4
4
 
5
+ [![Tests](https://github.com/finger-gun/sisu/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/finger-gun/sisu/actions/workflows/tests.yml)
6
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/finger-gun/sisu/blob/main/LICENSE)
7
+ [![Downloads](https://img.shields.io/npm/dm/%40sisu-ai%2Fmw-usage-tracker)](https://www.npmjs.com/package/@sisu-ai/mw-usage-tracker)
8
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/finger-gun/sisu/blob/main/CONTRIBUTING.md)
9
+
5
10
  ## Setup
6
11
  ```bash
7
12
  npm i @sisu-ai/mw-usage-tracker
8
13
  ```
9
14
 
10
- ## Documentation
11
- Discover what you can do through examples or documentation. Check it out at https://github.com/finger-gun/sisu
12
-
13
15
  ## Usage
14
16
  ```ts
15
17
  import { usageTracker } from '@sisu-ai/mw-usage-tracker';
@@ -49,3 +51,13 @@ const app = new Agent()
49
51
  - Each adapter should map its native usage fields to `ModelResponse.usage`.
50
52
  - If a provider doesn’t return usage, you’ll get counts of calls only (no cost).
51
53
  - Image cost estimation is an approximation unless your adapter returns precise image token usage.
54
+
55
+ # Community & Support
56
+
57
+ Discover what you can do through examples or documentation. Check it out at https://github.com/finger-gun/sisu. Example projects live under [`examples/`](https://github.com/finger-gun/sisu/tree/main/examples) in the repo.
58
+
59
+ - [Code of Conduct](https://github.com/finger-gun/sisu/blob/main/CODE_OF_CONDUCT.md)
60
+ - [Contributing Guide](https://github.com/finger-gun/sisu/blob/main/CONTRIBUTING.md)
61
+ - [License](https://github.com/finger-gun/sisu/blob/main/LICENSE)
62
+ - [Report a Bug](https://github.com/finger-gun/sisu/issues/new?template=bug_report.md)
63
+ - [Request a Feature](https://github.com/finger-gun/sisu/issues/new?template=feature_request.md)
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@sisu-ai/mw-usage-tracker",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
+ "license": "Apache-2.0",
4
5
  "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
@@ -14,7 +15,7 @@
14
15
  "build": "tsc -b"
15
16
  },
16
17
  "peerDependencies": {
17
- "@sisu-ai/core": "1.0.1"
18
+ "@sisu-ai/core": "1.0.2"
18
19
  },
19
20
  "repository": {
20
21
  "type": "git",