@v1nvn/zai 0.44.0 → 0.45.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 CHANGED
@@ -22,7 +22,7 @@ claude plugin install zai@agentic
22
22
  In a terminal, bare:
23
23
 
24
24
  ```sh
25
- npx -y @v1nvn/zai@0.44.0 usage
25
+ npx -y @v1nvn/zai@0.45.0 usage
26
26
  ```
27
27
 
28
28
  ## Usage
@@ -30,10 +30,10 @@ npx -y @v1nvn/zai@0.44.0 usage
30
30
  | Invocation | Does |
31
31
  |---|---|
32
32
  | `/zai-usage` | the account's usage report, as a pane |
33
- | `npx -y @v1nvn/zai@0.44.0 usage` | the same report, printed bare |
34
- | `npx -y @v1nvn/zai@0.44.0 usage --auth-token TOKEN` | same, key on the command line (visible in `ps`) |
35
- | `npx -y @v1nvn/zai@0.44.0 usage --auth-token=TOKEN` | `=` form — zsh quoting-safe |
36
- | `npx -y @v1nvn/zai@0.44.0 usage --base-url URL` | another GLM endpoint (default `api.z.ai`) |
33
+ | `npx -y @v1nvn/zai@0.45.0 usage` | the same report, printed bare |
34
+ | `npx -y @v1nvn/zai@0.45.0 usage --auth-token TOKEN` | same, key on the command line (visible in `ps`) |
35
+ | `npx -y @v1nvn/zai@0.45.0 usage --auth-token=TOKEN` | `=` form — zsh quoting-safe |
36
+ | `npx -y @v1nvn/zai@0.45.0 usage --base-url URL` | another GLM endpoint (default `api.z.ai`) |
37
37
 
38
38
  Each setting takes the first source that provides it:
39
39
 
@@ -77,13 +77,13 @@ and re-vendor `types/claude-code.d.ts` (repo root) from the engine-laid
77
77
  | `src/resolve.ts` | auth-token resolution chain |
78
78
  | `src/format.ts` | the report's lines — printed by the CLI, drawn by the pane |
79
79
  | `hooks/register.tsx` | the mod: registers `/zai-usage`, execs the CLI, opens its report as a pane |
80
- | `bin/usage.mjs` | the standalone build the mod execs — committed, synced by `yarn build` |
80
+ | `src/index.ts` | the CLI source the mod execs — node runs it directly, nothing built |
81
81
 
82
82
  ## Contracts
83
83
 
84
84
  - One job: print the report, exit 0. Nothing is written anywhere.
85
- - `/zai-usage` is one `node <plugin root>/bin/usage.mjs usage --json` exec through
85
+ - `/zai-usage` is one `node <plugin root>/src/index.ts usage --json` exec through
86
86
  the session's Bash tool — the same query `npx zai-usage` runs, awaited
87
87
  as-is. The one allow rule it needs is
88
- `Bash(node <plugin root>/bin/usage.mjs usage --json)`; the first run asks for it
88
+ `Bash(node <plugin root>/src/index.ts usage --json)`; the first run asks for it
89
89
  once, then it is remembered. Its report is a pane the model never reads.
package/package.json CHANGED
@@ -1,21 +1,19 @@
1
1
  {
2
2
  "name": "@v1nvn/zai",
3
- "version": "0.44.0",
4
- "description": "GLM Coding Plan usage and quota report — the zai-usage CLI behind the zai plugin.",
3
+ "version": "0.45.0",
4
+ "description": "Query GLM Coding Plan quota and usage — the zai-usage CLI behind the zai plugin.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "zai-usage": "dist/index.js"
7
+ "zai-usage": "./src/index.ts"
8
8
  },
9
9
  "scripts": {
10
- "build": "vite build && vite build --mode usage",
11
- "test": "vitest run",
12
- "test:watch": "vitest"
10
+ "test": "yarn run -T vitest run",
11
+ "test:watch": "yarn run -T vitest"
13
12
  },
14
13
  "keywords": [
15
14
  "glm",
16
- "zai",
17
- "claude-code",
18
- "usage"
15
+ "zhipu",
16
+ "claude-code"
19
17
  ],
20
18
  "author": {
21
19
  "name": "v1nvn",
@@ -28,21 +26,15 @@
28
26
  "directory": "packages/zai"
29
27
  },
30
28
  "files": [
31
- "dist"
29
+ "src"
32
30
  ],
33
31
  "publishConfig": {
34
32
  "access": "public"
35
33
  },
36
34
  "engines": {
37
- "node": ">=22"
35
+ "node": ">=23.6"
38
36
  },
39
37
  "dependencies": {
40
- "@v1nvn/agentic-core": "^0.44.0",
41
- "@v1nvn/tokens": "^0.44.0",
42
- "commander": "^15.0.0"
43
- },
44
- "devDependencies": {
45
- "vite": "^8.1.4",
46
- "vitest": "^4.1.10"
38
+ "@v1nvn/agentic-core": "0.45.0"
47
39
  }
48
40
  }