@eum-agent/llm-capability-chat 0.0.0-stage → 1.2.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.
@@ -0,0 +1,8 @@
1
+ import { t as experimentalTokenizerCount } from "./tokenizer-count-CSccWrcN.js";
2
+ import { parentPort, workerData } from "node:worker_threads";
3
+ //#region src/token-worker.ts
4
+ if (!parentPort) throw new Error("token measurement requires a background worker");
5
+ parentPort.postMessage(experimentalTokenizerCount(JSON.stringify(workerData)));
6
+ parentPort.close();
7
+ //#endregion
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { countTokens } from "gpt-tokenizer/encoding/o200k_base";
2
+ //#region src/tokenizer-count.ts
3
+ const ordinaryText = { disallowedSpecial: /* @__PURE__ */ new Set() };
4
+ function experimentalTokenizerCount(text) {
5
+ return countTokens(text, ordinaryText);
6
+ }
7
+ //#endregion
8
+ export { experimentalTokenizerCount as t };
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@eum-agent/llm-capability-chat",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "displayName": {
4
+ "en-US": "Chat Model Capability",
5
+ "zh-CN": "对话模型能力"
6
+ },
7
+ "version": "1.2.0",
8
+ "type": "module",
9
+ "description": "Chat Model Capability",
10
+ "license": "MIT",
11
+ "exports": {
12
+ ".": {
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./token-worker": {
16
+ "default": "./dist/token-worker.js"
17
+ },
18
+ "./exact-token-worker": {
19
+ "default": "./dist/exact-token-worker.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "ui"
25
+ ],
26
+ "devDependencies": {
27
+ "@eum-agent/plugin": "1.2.0",
28
+ "@types/react": "^19.2.18",
29
+ "@types/react-dom": "^19.2.5",
30
+ "@testing-library/react": "^16.3.3",
31
+ "@testing-library/user-event": "^14.6.6",
32
+ "jsdom": "^30.0.1",
33
+ "vite": "^8.2.2",
34
+ "@eum-agent/kernel": "1.0.0",
35
+ "@eum-agent/protocol": "1.0.0",
36
+ "sharp": "0.34.5",
37
+ "react": "^19.2.0",
38
+ "react-dom": "^19.2.0",
39
+ "lucide-react": "^1.40.0",
40
+ "ajv": "8.20.0"
41
+ },
42
+ "dependencies": {
43
+ "zod": "^4.4.3",
44
+ "gpt-tokenizer": "4.0.0"
45
+ },
46
+ "yaoguang": {
47
+ "description": {
48
+ "en-US": "Chat Model Capability",
49
+ "zh-CN": "对话模型能力"
50
+ },
51
+ "dependencies": {
52
+ "@eum-agent/llm-management": "1.2.0"
53
+ },
54
+ "kind": "extension",
55
+ "foundationDependencies": {
56
+ "@eum-agent/infra-local": "1.2.0",
57
+ "@eum-agent/storage-sqlite": "1.2.0"
58
+ }
59
+ },
60
+ "scripts": {
61
+ "build": "tsdown && vite build",
62
+ "test": "vitest run",
63
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.ui.json"
64
+ }
6
65
  }