@kubb/agent 5.0.0-beta.6 โ†’ 5.0.0-beta.7

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-05-09T18:02:50.797Z",
2
+ "date": "2026-05-12T10:56:59.171Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -6468,7 +6468,7 @@ const fsStorage = createStorage(() => ({
6468
6468
  await clean(resolve(base));
6469
6469
  }
6470
6470
  }));
6471
- var version$1 = "5.0.0-beta.6";
6471
+ var version$1 = "5.0.0-beta.7";
6472
6472
  function getDiagnosticInfo() {
6473
6473
  return {
6474
6474
  nodeVersion: version$2,
@@ -6905,7 +6905,7 @@ const memoryStorage = createStorage(() => {
6905
6905
  };
6906
6906
  });
6907
6907
 
6908
- var version = "5.0.0-beta.6";
6908
+ var version = "5.0.0-beta.7";
6909
6909
 
6910
6910
  function isCommandMessage(msg) {
6911
6911
  return msg.type === "command";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent-prod",
3
- "version": "5.0.0-beta.6",
3
+ "version": "5.0.0-beta.7",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
package/README.md CHANGED
@@ -1,33 +1,41 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo" width="200" />
3
- </p>
4
-
5
- # @kubb/agent
6
-
7
- Kubb Agent Server โ€” HTTP server for code generation powered by [Nitro](https://nitro.build) with WebSocket integration for real-time Studio communication.
8
-
9
- ## Features
10
-
11
- - ๐Ÿš€ Fast HTTP server built with [Nitro](https://nitro.build)
12
- - ๐Ÿ“ก RESTful API endpoints for code generation
13
- - ๐Ÿ”ง Easy integration with Kubb configuration
14
- - ๐Ÿ“Š Health and info endpoints
15
- - ๐Ÿ”— Bidirectional WebSocket with Kubb Studio
16
- - ๐Ÿ–ฅ๏ธ Machine binding โ€” token locked to the registered machine via stable `machineToken`
17
- - ๐Ÿ’พ Automatic session caching for faster reconnects
18
- - โšก Production-ready
1
+ <div align="center">
2
+ <h1>@kubb/agent</h1>
3
+ <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
4
+ <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
5
+ </a>
6
+
7
+ [![npm version][npm-version-src]][npm-version-href]
8
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
9
+ [![Coverage][coverage-src]][coverage-href]
10
+ [![License][license-src]][license-href]
11
+ [![Sponsors][sponsors-src]][sponsors-href]
12
+
13
+ <h4>
14
+ <a href="https://kubb.dev/" target="_blank">Documentation</a>
15
+ <span> ยท </span>
16
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
17
+ <span> ยท </span>
18
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
19
+ </h4>
20
+ </div>
21
+
22
+ HTTP agent server for Kubb, built on [Nitro](https://nitro.build). It exposes REST endpoints for triggering code generation, a health check, and a bidirectional WebSocket connection to Kubb Studio. Machine tokens are derived from the machine's network identity so they survive restarts. Sessions are cached locally to speed up reconnects.
19
23
 
20
24
  ## Installation
21
25
 
22
26
  The agent server is installed as part of `@kubb/cli`:
23
27
 
24
28
  ```bash
29
+ bun add -D @kubb/cli
30
+ # or
25
31
  pnpm add -D @kubb/cli
32
+ # or
33
+ npm install -D @kubb/cli
26
34
  ```
27
35
 
28
36
  ## Usage
29
37
 
30
- ### Via CLI (Recommended)
38
+ ### Via CLI
31
39
 
32
40
  Start the agent server using the Kubb CLI:
33
41
 
@@ -159,13 +167,15 @@ On startup the agent performs these steps before opening a WebSocket:
159
167
  2. **Create session** โ€” calls `POST /api/agent/session/create` (includes `machineToken` for verification) and receives a WebSocket URL.
160
168
  3. **Connect** โ€” opens a WebSocket to the returned URL using the `Authorization` header for authentication.
161
169
 
162
- ### Connection Features
170
+ ### Connection features
163
171
 
164
- - **Automatic reconnection**: Caches session tokens to speed up reconnects
165
- - **Real-time events**: Streams generation progress and events
166
- - **Command handling**: Receives `generate` and `connect` commands from Studio
167
- - **Graceful shutdown**: Notifies Studio when disconnecting
168
- - **Session management**: 24-hour session expiration with auto-refresh; Studio re-validates session validity on every incoming agent message and disconnects immediately if revoked or expired
172
+ | Feature | Description |
173
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
174
+ | Automatic reconnection | Caches session tokens to speed up reconnects |
175
+ | Real-time events | Streams generation progress and events |
176
+ | Command handling | Receives `generate` and `connect` commands from Studio |
177
+ | Graceful shutdown | Notifies Studio when disconnecting |
178
+ | Session management | 24-hour session expiration with auto-refresh; Studio re-validates every incoming message and disconnects if the session is revoked or expired |
169
179
 
170
180
  ### Session Caching
171
181
 
@@ -324,3 +334,28 @@ npx kubb agent start
324
334
  ```
325
335
 
326
336
  You'll receive a stream of events as the code generation progresses.
337
+
338
+ ## Supporting Kubb
339
+
340
+ Kubb is an open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
341
+
342
+ - [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
343
+
344
+ <p align="center">
345
+ <a href="https://github.com/sponsors/stijnvanhulle">
346
+ <img src="https://raw.githubusercontent.com/stijnvanhulle/sponsors/main/sponsors.svg" alt="My sponsors" />
347
+ </a>
348
+ </p>
349
+
350
+ <!-- Badges -->
351
+
352
+ [npm-version-src]: https://img.shields.io/npm/v/@kubb/agent?flat&colorA=18181B&colorB=f58517
353
+ [npm-version-href]: https://npmjs.com/package/@kubb/agent
354
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@kubb/agent?flat&colorA=18181B&colorB=f58517
355
+ [npm-downloads-href]: https://npmjs.com/package/@kubb/agent
356
+ [license-src]: https://img.shields.io/github/license/kubb-labs/kubb.svg?flat&colorA=18181B&colorB=f58517
357
+ [license-href]: https://github.com/kubb-labs/kubb/blob/main/LICENSE
358
+ [coverage-src]: https://img.shields.io/codecov/c/github/kubb-labs/kubb?style=flat&colorA=18181B&colorB=f58517
359
+ [coverage-href]: https://www.npmjs.com/package/@kubb/agent
360
+ [sponsors-src]: https://img.shields.io/github/sponsors/stijnvanhulle?style=flat&colorA=18181B&colorB=f58517
361
+ [sponsors-href]: https://github.com/sponsors/stijnvanhulle/
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@kubb/agent",
3
- "version": "5.0.0-beta.6",
4
- "description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
3
+ "version": "5.0.0-beta.7",
4
+ "description": "HTTP agent server for Kubb. Exposes code generation via REST API and WebSocket with real-time Kubb Studio integration, machine binding, and Docker support.",
5
5
  "keywords": [
6
6
  "agent",
7
- "code-generation",
8
7
  "codegen",
8
+ "docker",
9
9
  "http",
10
10
  "kubb",
11
11
  "openapi",
12
12
  "server",
13
- "swagger",
14
- "typescript"
13
+ "typescript",
14
+ "websocket"
15
15
  ],
16
16
  "license": "AGPL-3.0-or-later",
17
17
  "author": "stijnvanhulle",
@@ -43,18 +43,18 @@
43
43
  "tinyexec": "^1.1.2",
44
44
  "unstorage": "^1.17.5",
45
45
  "ws": "^8.20.0",
46
- "@kubb/ast": "5.0.0-beta.6",
47
- "@kubb/core": "5.0.0-beta.6"
46
+ "@kubb/ast": "5.0.0-beta.7",
47
+ "@kubb/core": "5.0.0-beta.7"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/ws": "^8.18.1",
51
- "msw": "^2.14.4",
51
+ "msw": "^2.14.6",
52
52
  "nitropack": "^2.13.4",
53
- "vite": "^8.0.11",
53
+ "vite": "^8.0.12",
54
54
  "@internals/utils": "0.0.0",
55
- "@kubb/parser-ts": "5.0.0-beta.6",
56
- "@kubb/adapter-oas": "5.0.0-beta.6",
57
- "@kubb/renderer-jsx": "5.0.0-beta.6"
55
+ "@kubb/adapter-oas": "5.0.0-beta.7",
56
+ "@kubb/parser-ts": "5.0.0-beta.7",
57
+ "@kubb/renderer-jsx": "5.0.0-beta.7"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=22"