@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.
- package/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +2 -2
- package/.output/server/package.json +1 -1
- package/README.md +60 -25
- package/package.json +12 -12
package/.output/nitro.json
CHANGED
|
@@ -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.
|
|
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.
|
|
6908
|
+
var version = "5.0.0-beta.7";
|
|
6909
6909
|
|
|
6910
6910
|
function isCommandMessage(msg) {
|
|
6911
6911
|
return msg.type === "command";
|
package/README.md
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
-
|
|
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
|
|
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
|
|
170
|
+
### Connection features
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
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.
|
|
4
|
-
"description": "
|
|
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
|
-
"
|
|
14
|
-
"
|
|
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.
|
|
47
|
-
"@kubb/core": "5.0.0-beta.
|
|
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.
|
|
51
|
+
"msw": "^2.14.6",
|
|
52
52
|
"nitropack": "^2.13.4",
|
|
53
|
-
"vite": "^8.0.
|
|
53
|
+
"vite": "^8.0.12",
|
|
54
54
|
"@internals/utils": "0.0.0",
|
|
55
|
-
"@kubb/
|
|
56
|
-
"@kubb/
|
|
57
|
-
"@kubb/renderer-jsx": "5.0.0-beta.
|
|
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"
|