@kubb/agent 4.29.1 → 4.31.1
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 +542 -380
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +3 -1
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +3 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@kubb/fabric-core/dist/chunk-BVHe6Par.js +22 -0
- package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-C1atU7yU.js → defaultParser-BD_N68Bo.js} +3 -2
- package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-BcieQL5M.js → getRelativePath-C4Au07ON.js} +2 -1
- package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +8 -4
- package/.output/server/node_modules/@kubb/fabric-core/dist/{onProcessExit-CF200hsz.js → onProcessExit-CnZym153.js} +10 -3
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +2 -1
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +3 -2
- package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +3 -2
- package/.output/server/node_modules/@kubb/fabric-core/package.json +3 -2
- package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-Cnw5r_-A.js → chunk-DbZtQ4qb.js} +5 -1
- package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +4 -4
- package/.output/server/node_modules/@kubb/react-fabric/dist/{jsx-runtime-Dm7PKVbc.js → jsx-runtime-CZxrhUx8.js} +24 -5
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +3 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +3 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/{react-D652OKii.js → react-C2cYsofv.js} +87 -26
- package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-BkDkx1cs.js → reactPlugin-DGKBWjiR.js} +1454 -317
- package/.output/server/node_modules/@kubb/react-fabric/package.json +4 -3
- package/.output/server/node_modules/@logtail/core/dist/cjs/base.js +339 -0
- package/.output/server/node_modules/@logtail/core/dist/cjs/index.js +9 -0
- package/.output/server/node_modules/@logtail/core/package.json +45 -0
- package/.output/server/node_modules/@logtail/node/dist/cjs/context.js +93 -0
- package/.output/server/node_modules/@logtail/node/dist/cjs/index.js +6 -0
- package/.output/server/node_modules/@logtail/node/dist/cjs/node.js +106 -0
- package/.output/server/node_modules/@logtail/node/package.json +53 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/batch.js +122 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/burstProtection.js +50 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/encode.js +12 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/index.js +41 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/queue.js +41 -0
- package/.output/server/node_modules/@logtail/tools/dist/cjs/throttle.js +67 -0
- package/.output/server/node_modules/@logtail/tools/package.json +39 -0
- package/.output/server/node_modules/@logtail/types/dist/cjs/types.js +21 -0
- package/.output/server/node_modules/@logtail/types/package.json +45 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js +63 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/DecodeError.js +18 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/Decoder.js +583 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/Encoder.js +408 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/ExtData.js +14 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js +72 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/decode.js +32 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/decodeAsync.js +44 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/encode.js +17 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/index.js +34 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/timestamp.js +104 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/utils/int.js +34 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js +8 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/utils/stream.js +40 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js +28 -0
- package/.output/server/node_modules/@msgpack/msgpack/dist/utils/utf8.js +167 -0
- package/.output/server/node_modules/@msgpack/msgpack/package.json +100 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/serialize-error/index.js +154 -0
- package/.output/server/node_modules/serialize-error/package.json +41 -0
- package/.output/server/node_modules/stack-trace/lib/stack-trace.js +136 -0
- package/.output/server/node_modules/stack-trace/package.json +21 -0
- package/.output/server/package.json +11 -3
- package/README.md +3 -3
- package/package.json +23 -18
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
exports.get = function(belowFn) {
|
|
2
|
+
var oldLimit = Error.stackTraceLimit;
|
|
3
|
+
Error.stackTraceLimit = Infinity;
|
|
4
|
+
|
|
5
|
+
var dummyObject = {};
|
|
6
|
+
|
|
7
|
+
var v8Handler = Error.prepareStackTrace;
|
|
8
|
+
Error.prepareStackTrace = function(dummyObject, v8StackTrace) {
|
|
9
|
+
return v8StackTrace;
|
|
10
|
+
};
|
|
11
|
+
Error.captureStackTrace(dummyObject, belowFn || exports.get);
|
|
12
|
+
|
|
13
|
+
var v8StackTrace = dummyObject.stack;
|
|
14
|
+
Error.prepareStackTrace = v8Handler;
|
|
15
|
+
Error.stackTraceLimit = oldLimit;
|
|
16
|
+
|
|
17
|
+
return v8StackTrace;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.parse = function(err) {
|
|
21
|
+
if (!err.stack) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var self = this;
|
|
26
|
+
var lines = err.stack.split('\n').slice(1);
|
|
27
|
+
|
|
28
|
+
return lines
|
|
29
|
+
.map(function(line) {
|
|
30
|
+
if (line.match(/^\s*[-]{4,}$/)) {
|
|
31
|
+
return self._createParsedCallSite({
|
|
32
|
+
fileName: line,
|
|
33
|
+
lineNumber: null,
|
|
34
|
+
functionName: null,
|
|
35
|
+
typeName: null,
|
|
36
|
+
methodName: null,
|
|
37
|
+
columnNumber: null,
|
|
38
|
+
'native': null,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);
|
|
43
|
+
if (!lineMatch) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var object = null;
|
|
48
|
+
var method = null;
|
|
49
|
+
var functionName = null;
|
|
50
|
+
var typeName = null;
|
|
51
|
+
var methodName = null;
|
|
52
|
+
var isNative = (lineMatch[5] === 'native');
|
|
53
|
+
|
|
54
|
+
if (lineMatch[1]) {
|
|
55
|
+
functionName = lineMatch[1];
|
|
56
|
+
var methodStart = functionName.lastIndexOf('.');
|
|
57
|
+
if (functionName[methodStart-1] == '.')
|
|
58
|
+
methodStart--;
|
|
59
|
+
if (methodStart > 0) {
|
|
60
|
+
object = functionName.substr(0, methodStart);
|
|
61
|
+
method = functionName.substr(methodStart + 1);
|
|
62
|
+
var objectEnd = object.indexOf('.Module');
|
|
63
|
+
if (objectEnd > 0) {
|
|
64
|
+
functionName = functionName.substr(objectEnd + 1);
|
|
65
|
+
object = object.substr(0, objectEnd);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
typeName = null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (method) {
|
|
72
|
+
typeName = object;
|
|
73
|
+
methodName = method;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (method === '<anonymous>') {
|
|
77
|
+
methodName = null;
|
|
78
|
+
functionName = null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var properties = {
|
|
82
|
+
fileName: lineMatch[2] || null,
|
|
83
|
+
lineNumber: parseInt(lineMatch[3], 10) || null,
|
|
84
|
+
functionName: functionName,
|
|
85
|
+
typeName: typeName,
|
|
86
|
+
methodName: methodName,
|
|
87
|
+
columnNumber: parseInt(lineMatch[4], 10) || null,
|
|
88
|
+
'native': isNative,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return self._createParsedCallSite(properties);
|
|
92
|
+
})
|
|
93
|
+
.filter(function(callSite) {
|
|
94
|
+
return !!callSite;
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
function CallSite(properties) {
|
|
99
|
+
for (var property in properties) {
|
|
100
|
+
this[property] = properties[property];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
var strProperties = [
|
|
105
|
+
'this',
|
|
106
|
+
'typeName',
|
|
107
|
+
'functionName',
|
|
108
|
+
'methodName',
|
|
109
|
+
'fileName',
|
|
110
|
+
'lineNumber',
|
|
111
|
+
'columnNumber',
|
|
112
|
+
'function',
|
|
113
|
+
'evalOrigin'
|
|
114
|
+
];
|
|
115
|
+
var boolProperties = [
|
|
116
|
+
'topLevel',
|
|
117
|
+
'eval',
|
|
118
|
+
'native',
|
|
119
|
+
'constructor'
|
|
120
|
+
];
|
|
121
|
+
strProperties.forEach(function (property) {
|
|
122
|
+
CallSite.prototype[property] = null;
|
|
123
|
+
CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () {
|
|
124
|
+
return this[property];
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
boolProperties.forEach(function (property) {
|
|
128
|
+
CallSite.prototype[property] = false;
|
|
129
|
+
CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () {
|
|
130
|
+
return this[property];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
exports._createParsedCallSite = function(properties) {
|
|
135
|
+
return new CallSite(properties);
|
|
136
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
|
|
3
|
+
"name": "stack-trace",
|
|
4
|
+
"description": "Get v8 stack traces as an array of CallSite objects.",
|
|
5
|
+
"version": "0.0.10",
|
|
6
|
+
"homepage": "https://github.com/felixge/node-stack-trace",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git://github.com/felixge/node-stack-trace.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "./lib/stack-trace",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": "*"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"dependencies": {},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"far": "0.0.3",
|
|
19
|
+
"long-stack-traces": "0.1.2"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent-prod",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.31.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
"@clack/core": "1.0.1",
|
|
12
12
|
"@clack/prompts": "1.0.1",
|
|
13
13
|
"@humanwhocodes/momoa": "2.0.4",
|
|
14
|
-
"@kubb/fabric-core": "0.13.
|
|
15
|
-
"@kubb/react-fabric": "0.13.
|
|
14
|
+
"@kubb/fabric-core": "0.13.3",
|
|
15
|
+
"@kubb/react-fabric": "0.13.3",
|
|
16
|
+
"@logtail/core": "0.5.6",
|
|
17
|
+
"@logtail/node": "0.5.6",
|
|
18
|
+
"@logtail/tools": "0.5.6",
|
|
19
|
+
"@logtail/types": "0.5.6",
|
|
20
|
+
"@msgpack/msgpack": "2.8.0",
|
|
16
21
|
"@readme/better-ajv-errors": "2.4.0",
|
|
17
22
|
"@readme/http-status-codes": "7.2.0",
|
|
18
23
|
"@readme/openapi-parser": "5.5.0",
|
|
@@ -26,6 +31,7 @@
|
|
|
26
31
|
"chokidar": "5.0.0",
|
|
27
32
|
"compute-gcd": "1.2.1",
|
|
28
33
|
"compute-lcm": "1.1.2",
|
|
34
|
+
"consola": "3.4.2",
|
|
29
35
|
"d": "1.0.2",
|
|
30
36
|
"empathic": "2.0.0",
|
|
31
37
|
"encoding": "0.1.13",
|
|
@@ -74,9 +80,11 @@
|
|
|
74
80
|
"remove-undefined-objects": "7.0.0",
|
|
75
81
|
"safer-buffer": "2.1.2",
|
|
76
82
|
"semver": "7.7.4",
|
|
83
|
+
"serialize-error": "8.1.0",
|
|
77
84
|
"sisteransi": "1.0.5",
|
|
78
85
|
"source-map": "0.6.1",
|
|
79
86
|
"source-map-support": "0.5.21",
|
|
87
|
+
"stack-trace": "0.0.10",
|
|
80
88
|
"swagger2openapi": "7.0.8",
|
|
81
89
|
"timers-ext": "0.1.8",
|
|
82
90
|
"tinyexec": "1.0.2",
|
package/README.md
CHANGED
|
@@ -117,8 +117,8 @@ The `agent_kv` named volume persists the KV store (session cache, machine token)
|
|
|
117
117
|
| `KUBB_AGENT_NO_CACHE` | `false` | Set to `true` to disable session caching. |
|
|
118
118
|
| `KUBB_AGENT_ALLOW_WRITE` | `false` | Set to `true` to allow writing generated files to disk. |
|
|
119
119
|
| `KUBB_AGENT_ALLOW_ALL` | `false` | Set to `true` to grant all permissions (implies `KUBB_AGENT_ALLOW_WRITE=true`). |
|
|
120
|
-
| `KUBB_AGENT_RETRY_TIMEOUT`
|
|
121
|
-
| `
|
|
120
|
+
| `KUBB_AGENT_RETRY_TIMEOUT` | `30000` | Milliseconds to wait before retrying a failed Studio connection. |
|
|
121
|
+
| `KUBB_AGENT_HEARTBEAT_URL` | _(empty)_ | URL to call every 5 minutes to signal the agent is alive (e.g. a Healthchecks.io ping URL). Leave empty to disable. |
|
|
122
122
|
|
|
123
123
|
### Automatic .env Loading
|
|
124
124
|
|
|
@@ -164,7 +164,7 @@ On startup the agent performs these steps before opening a WebSocket:
|
|
|
164
164
|
- **Real-time events**: Streams generation progress and events
|
|
165
165
|
- **Command handling**: Receives `generate` and `connect` commands from Studio
|
|
166
166
|
- **Graceful shutdown**: Notifies Studio when disconnecting
|
|
167
|
-
- **Session management**: 24-hour session expiration with auto-refresh
|
|
167
|
+
- **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
|
|
168
168
|
|
|
169
169
|
### Session Caching
|
|
170
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.31.1",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -28,28 +28,33 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
".output",
|
|
30
30
|
"!/**/**.test.**",
|
|
31
|
-
"!/**/__tests__/**"
|
|
31
|
+
"!/**/__tests__/**",
|
|
32
|
+
"!/**/__snapshots__/**"
|
|
32
33
|
],
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@kubb/fabric-core": "0.13.
|
|
35
|
+
"@kubb/fabric-core": "0.13.3",
|
|
36
|
+
"@logtail/node": "^0.5.6",
|
|
37
|
+
"consola": "^3.4.2",
|
|
35
38
|
"jiti": "2.5.1",
|
|
39
|
+
"remeda": "^2.33.6",
|
|
36
40
|
"tinyexec": "^1.0.2",
|
|
41
|
+
"unstorage": "^1.17.4",
|
|
37
42
|
"ws": "^8.19.0",
|
|
38
|
-
"@kubb/core": "4.
|
|
39
|
-
"@kubb/plugin-client": "4.
|
|
40
|
-
"@kubb/plugin-cypress": "4.
|
|
41
|
-
"@kubb/plugin-faker": "4.
|
|
42
|
-
"@kubb/plugin-mcp": "4.
|
|
43
|
-
"@kubb/plugin-msw": "4.
|
|
44
|
-
"@kubb/plugin-oas": "4.
|
|
45
|
-
"@kubb/plugin-react-query": "4.
|
|
46
|
-
"@kubb/plugin-redoc": "4.
|
|
47
|
-
"@kubb/plugin-solid-query": "4.
|
|
48
|
-
"@kubb/plugin-svelte-query": "4.
|
|
49
|
-
"@kubb/plugin-swr": "4.
|
|
50
|
-
"@kubb/plugin-ts": "4.
|
|
51
|
-
"@kubb/plugin-vue-query": "4.
|
|
52
|
-
"@kubb/plugin-zod": "4.
|
|
43
|
+
"@kubb/core": "4.31.1",
|
|
44
|
+
"@kubb/plugin-client": "4.31.1",
|
|
45
|
+
"@kubb/plugin-cypress": "4.31.1",
|
|
46
|
+
"@kubb/plugin-faker": "4.31.1",
|
|
47
|
+
"@kubb/plugin-mcp": "4.31.1",
|
|
48
|
+
"@kubb/plugin-msw": "4.31.1",
|
|
49
|
+
"@kubb/plugin-oas": "4.31.1",
|
|
50
|
+
"@kubb/plugin-react-query": "4.31.1",
|
|
51
|
+
"@kubb/plugin-redoc": "4.31.1",
|
|
52
|
+
"@kubb/plugin-solid-query": "4.31.1",
|
|
53
|
+
"@kubb/plugin-svelte-query": "4.31.1",
|
|
54
|
+
"@kubb/plugin-swr": "4.31.1",
|
|
55
|
+
"@kubb/plugin-ts": "4.31.1",
|
|
56
|
+
"@kubb/plugin-vue-query": "4.31.1",
|
|
57
|
+
"@kubb/plugin-zod": "4.31.1"
|
|
53
58
|
},
|
|
54
59
|
"devDependencies": {
|
|
55
60
|
"@types/ws": "^8.18.1",
|