@weiliang0121/capix-measurement 0.1.0 → 0.3.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/README.md +3 -1
- package/dist/resource.d.ts +1 -1
- package/dist/usage.d.ts +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Message usage measurement and resource contracts for CAPiX.
|
|
4
4
|
|
|
5
|
+
`MessageUsage` consumes the public Transcript `Message` type. Counts use object identity: each selected message is counted once per `add` call, equal text in distinct objects counts separately, and each instance owns its independent counts. Measurement does not depend on transport DTOs.
|
|
6
|
+
|
|
5
7
|
ES modules and TypeScript declarations. Requires Node.js 22.23.2 or newer.
|
|
6
8
|
|
|
7
9
|
```sh
|
|
@@ -16,4 +18,4 @@ This package is part of CAPiX. The npm distribution contains compiled JavaScript
|
|
|
16
18
|
|
|
17
19
|
## License
|
|
18
20
|
|
|
19
|
-
MIT. Copyright (c) 2026 wei.liang. See [LICENSE](
|
|
21
|
+
MIT. Copyright (c) 2026 wei.liang. See [LICENSE](LICENSE).
|
package/dist/resource.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResourceOffer } from '@weiliang0121/capix-resources';
|
|
2
2
|
import type { MessageUsage } from './usage.js';
|
|
3
|
-
import type { Message } from '@weiliang0121/capix-
|
|
3
|
+
import type { Message } from '@weiliang0121/capix-transcript';
|
|
4
4
|
export declare const MessageUsageResource: Readonly<{
|
|
5
5
|
record: ResourceOffer<MessageUsage, Readonly<{
|
|
6
6
|
add(messages: readonly Readonly<Message>[]): void;
|
package/dist/usage.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weiliang0121/capix-measurement",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@weiliang0121/capix-
|
|
14
|
-
"@weiliang0121/capix-resources": "0.
|
|
13
|
+
"@weiliang0121/capix-transcript": "0.3.0",
|
|
14
|
+
"@weiliang0121/capix-resources": "0.3.0"
|
|
15
15
|
},
|
|
16
16
|
"description": "Message usage measurement and resource contracts for CAPiX.",
|
|
17
17
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/weiliang0121/capix.git",
|
|
22
|
-
"directory": "
|
|
22
|
+
"directory": "packages/measurement"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=22.23.2"
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsc -p tsconfig.json",
|
|
41
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
41
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
42
|
+
"test": "node ../../scripts/test/run.mjs --package ."
|
|
42
43
|
}
|
|
43
44
|
}
|