@dudousxd/nestjs-agent 1.29.0 → 1.31.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/dist/a2ui/index.cjs +207 -11
- package/dist/a2ui/index.cjs.map +1 -1
- package/dist/a2ui/index.d.cts +3 -3
- package/dist/a2ui/index.d.ts +3 -3
- package/dist/a2ui/index.js +203 -12
- package/dist/a2ui/index.js.map +1 -1
- package/dist/agent-genui.module-D0X3YnzO.d.cts +147 -0
- package/dist/agent-genui.module-D0X3YnzO.d.ts +147 -0
- package/dist/{chat-queue.service-B-fVOJGf.d.ts → chat-queue.service-Bdz43pAC.d.ts} +1 -1
- package/dist/{chat-queue.service-Bk7DCKGV.d.cts → chat-queue.service-ZwQ9p-Ps.d.cts} +1 -1
- package/dist/durable/index.cjs +249 -32
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +2 -2
- package/dist/durable/index.d.ts +2 -2
- package/dist/durable/index.js +240 -28
- package/dist/durable/index.js.map +1 -1
- package/dist/genui/index.cjs +211 -11
- package/dist/genui/index.cjs.map +1 -1
- package/dist/genui/index.d.cts +27 -94
- package/dist/genui/index.d.ts +27 -94
- package/dist/genui/index.js +205 -12
- package/dist/genui/index.js.map +1 -1
- package/dist/{index-APh8WN3z.d.ts → index-BGevU_Ih.d.ts} +8 -1
- package/dist/{index-D9EM7ivO.d.cts → index-DoCdfNrO.d.cts} +8 -1
- package/dist/index.cjs +240 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +236 -27
- package/dist/index.js.map +1 -1
- package/dist/vite/index.cjs +48 -0
- package/dist/vite/index.cjs.map +1 -0
- package/dist/vite/index.d.cts +32 -0
- package/dist/vite/index.d.ts +32 -0
- package/dist/vite/index.js +21 -0
- package/dist/vite/index.js.map +1 -0
- package/package.json +17 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/vite/index.ts
|
|
22
|
+
var vite_exports = {};
|
|
23
|
+
__export(vite_exports, {
|
|
24
|
+
NEST_SANDBOX_KIT_DESCRIPTOR: () => NEST_SANDBOX_KIT_DESCRIPTOR,
|
|
25
|
+
SANDBOX_KIT_DEV_PREFIX: () => import_kit.SANDBOX_KIT_DEV_PREFIX,
|
|
26
|
+
SANDBOX_KIT_MANIFEST_KEYS: () => import_kit.SANDBOX_KIT_MANIFEST_KEYS,
|
|
27
|
+
SANDBOX_KIT_UPDATE_EVENT: () => import_kit.SANDBOX_KIT_UPDATE_EVENT,
|
|
28
|
+
genuiSandboxKit: () => genuiSandboxKit
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(vite_exports);
|
|
31
|
+
var import_kit = require("@dudousxd/nestjs-agent-core/genui/kit");
|
|
32
|
+
var NEST_SANDBOX_KIT_DESCRIPTOR = ".genui/sandbox-kit.json";
|
|
33
|
+
function genuiSandboxKit(options = {}) {
|
|
34
|
+
return (0, import_kit.createGenuiSandboxKitPlugin)(options, {
|
|
35
|
+
descriptor: NEST_SANDBOX_KIT_DESCRIPTOR,
|
|
36
|
+
rendererImport: /@dudousxd\/nestjs-agent-react/
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
__name(genuiSandboxKit, "genuiSandboxKit");
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
NEST_SANDBOX_KIT_DESCRIPTOR,
|
|
43
|
+
SANDBOX_KIT_DEV_PREFIX,
|
|
44
|
+
SANDBOX_KIT_MANIFEST_KEYS,
|
|
45
|
+
SANDBOX_KIT_UPDATE_EVENT,
|
|
46
|
+
genuiSandboxKit
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/vite/index.ts"],"sourcesContent":["/**\n * `@dudousxd/nestjs-agent/vite` — `genuiSandboxKit()`, the Vite plugin that puts the app's design\n * system (its components, its theme, Tailwind) inside the sandbox:\n *\n * ```ts\n * // vite.config.ts (the SPA that talks to the agent)\n * import { genuiSandboxKit } from '@dudousxd/nestjs-agent/vite'\n * export default defineConfig({ plugins: [react(), genuiSandboxKit({ include: 'src/components/ui/*.tsx' })] })\n * ```\n *\n * Then `AgentGenuiModule.forRoot({ sandbox: { kit: true, tailwind: true } })` finds the bundle and\n * the docs: the descriptor the dev server writes (`.genui/sandbox-kit.json`) in dev, the Vite\n * manifest in production (see `AgentGenuiOptions.sandboxKit`).\n */\nimport {\n type GenuiSandboxKitApi,\n type GenuiSandboxKitOptions,\n type GenuiSandboxKitPlugin,\n SANDBOX_KIT_DEV_PREFIX,\n SANDBOX_KIT_MANIFEST_KEYS,\n SANDBOX_KIT_UPDATE_EVENT,\n createGenuiSandboxKitPlugin,\n} from '@dudousxd/nestjs-agent-core/genui/kit';\n\n/**\n * Where the dev descriptor is written, relative to the Vite root — and where the server reads it,\n * relative to its working directory (run both from the project root, or point\n * `sandboxKit.descriptor` at it). Add `.genui/` to `.gitignore`.\n */\nexport const NEST_SANDBOX_KIT_DESCRIPTOR = '.genui/sandbox-kit.json';\n\n/**\n * The sandbox kit plugin. `entry` (a module exporting the kit) or `include` (a glob of component\n * files); neither → the first `components/ui` folder (`src/components/ui`…). See\n * {@link GenuiSandboxKitOptions}.\n */\nexport function genuiSandboxKit(options: GenuiSandboxKitOptions = {}): GenuiSandboxKitPlugin {\n return createGenuiSandboxKitPlugin(options, {\n descriptor: NEST_SANDBOX_KIT_DESCRIPTOR,\n rendererImport: /@dudousxd\\/nestjs-agent-react/,\n });\n}\n\nexport {\n type GenuiSandboxKitApi,\n type GenuiSandboxKitOptions,\n type GenuiSandboxKitPlugin,\n SANDBOX_KIT_DEV_PREFIX,\n SANDBOX_KIT_MANIFEST_KEYS,\n SANDBOX_KIT_UPDATE_EVENT,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;AAcA,iBAQO;AAOA,IAAMA,8BAA8B;AAOpC,SAASC,gBAAgBC,UAAkC,CAAC,GAAC;AAClE,aAAOC,wCAA4BD,SAAS;IAC1CE,YAAYJ;IACZK,gBAAgB;EAClB,CAAA;AACF;AALgBJ;","names":["NEST_SANDBOX_KIT_DESCRIPTOR","genuiSandboxKit","options","createGenuiSandboxKitPlugin","descriptor","rendererImport"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GenuiSandboxKitOptions, GenuiSandboxKitPlugin } from '@dudousxd/nestjs-agent-core/genui/kit';
|
|
2
|
+
export { GenuiSandboxKitApi, GenuiSandboxKitOptions, GenuiSandboxKitPlugin, SANDBOX_KIT_DEV_PREFIX, SANDBOX_KIT_MANIFEST_KEYS, SANDBOX_KIT_UPDATE_EVENT } from '@dudousxd/nestjs-agent-core/genui/kit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `@dudousxd/nestjs-agent/vite` — `genuiSandboxKit()`, the Vite plugin that puts the app's design
|
|
6
|
+
* system (its components, its theme, Tailwind) inside the sandbox:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // vite.config.ts (the SPA that talks to the agent)
|
|
10
|
+
* import { genuiSandboxKit } from '@dudousxd/nestjs-agent/vite'
|
|
11
|
+
* export default defineConfig({ plugins: [react(), genuiSandboxKit({ include: 'src/components/ui/*.tsx' })] })
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Then `AgentGenuiModule.forRoot({ sandbox: { kit: true, tailwind: true } })` finds the bundle and
|
|
15
|
+
* the docs: the descriptor the dev server writes (`.genui/sandbox-kit.json`) in dev, the Vite
|
|
16
|
+
* manifest in production (see `AgentGenuiOptions.sandboxKit`).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Where the dev descriptor is written, relative to the Vite root — and where the server reads it,
|
|
21
|
+
* relative to its working directory (run both from the project root, or point
|
|
22
|
+
* `sandboxKit.descriptor` at it). Add `.genui/` to `.gitignore`.
|
|
23
|
+
*/
|
|
24
|
+
declare const NEST_SANDBOX_KIT_DESCRIPTOR = ".genui/sandbox-kit.json";
|
|
25
|
+
/**
|
|
26
|
+
* The sandbox kit plugin. `entry` (a module exporting the kit) or `include` (a glob of component
|
|
27
|
+
* files); neither → the first `components/ui` folder (`src/components/ui`…). See
|
|
28
|
+
* {@link GenuiSandboxKitOptions}.
|
|
29
|
+
*/
|
|
30
|
+
declare function genuiSandboxKit(options?: GenuiSandboxKitOptions): GenuiSandboxKitPlugin;
|
|
31
|
+
|
|
32
|
+
export { NEST_SANDBOX_KIT_DESCRIPTOR, genuiSandboxKit };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GenuiSandboxKitOptions, GenuiSandboxKitPlugin } from '@dudousxd/nestjs-agent-core/genui/kit';
|
|
2
|
+
export { GenuiSandboxKitApi, GenuiSandboxKitOptions, GenuiSandboxKitPlugin, SANDBOX_KIT_DEV_PREFIX, SANDBOX_KIT_MANIFEST_KEYS, SANDBOX_KIT_UPDATE_EVENT } from '@dudousxd/nestjs-agent-core/genui/kit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `@dudousxd/nestjs-agent/vite` — `genuiSandboxKit()`, the Vite plugin that puts the app's design
|
|
6
|
+
* system (its components, its theme, Tailwind) inside the sandbox:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // vite.config.ts (the SPA that talks to the agent)
|
|
10
|
+
* import { genuiSandboxKit } from '@dudousxd/nestjs-agent/vite'
|
|
11
|
+
* export default defineConfig({ plugins: [react(), genuiSandboxKit({ include: 'src/components/ui/*.tsx' })] })
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Then `AgentGenuiModule.forRoot({ sandbox: { kit: true, tailwind: true } })` finds the bundle and
|
|
15
|
+
* the docs: the descriptor the dev server writes (`.genui/sandbox-kit.json`) in dev, the Vite
|
|
16
|
+
* manifest in production (see `AgentGenuiOptions.sandboxKit`).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Where the dev descriptor is written, relative to the Vite root — and where the server reads it,
|
|
21
|
+
* relative to its working directory (run both from the project root, or point
|
|
22
|
+
* `sandboxKit.descriptor` at it). Add `.genui/` to `.gitignore`.
|
|
23
|
+
*/
|
|
24
|
+
declare const NEST_SANDBOX_KIT_DESCRIPTOR = ".genui/sandbox-kit.json";
|
|
25
|
+
/**
|
|
26
|
+
* The sandbox kit plugin. `entry` (a module exporting the kit) or `include` (a glob of component
|
|
27
|
+
* files); neither → the first `components/ui` folder (`src/components/ui`…). See
|
|
28
|
+
* {@link GenuiSandboxKitOptions}.
|
|
29
|
+
*/
|
|
30
|
+
declare function genuiSandboxKit(options?: GenuiSandboxKitOptions): GenuiSandboxKitPlugin;
|
|
31
|
+
|
|
32
|
+
export { NEST_SANDBOX_KIT_DESCRIPTOR, genuiSandboxKit };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/vite/index.ts
|
|
5
|
+
import { SANDBOX_KIT_DEV_PREFIX, SANDBOX_KIT_MANIFEST_KEYS, SANDBOX_KIT_UPDATE_EVENT, createGenuiSandboxKitPlugin } from "@dudousxd/nestjs-agent-core/genui/kit";
|
|
6
|
+
var NEST_SANDBOX_KIT_DESCRIPTOR = ".genui/sandbox-kit.json";
|
|
7
|
+
function genuiSandboxKit(options = {}) {
|
|
8
|
+
return createGenuiSandboxKitPlugin(options, {
|
|
9
|
+
descriptor: NEST_SANDBOX_KIT_DESCRIPTOR,
|
|
10
|
+
rendererImport: /@dudousxd\/nestjs-agent-react/
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
__name(genuiSandboxKit, "genuiSandboxKit");
|
|
14
|
+
export {
|
|
15
|
+
NEST_SANDBOX_KIT_DESCRIPTOR,
|
|
16
|
+
SANDBOX_KIT_DEV_PREFIX,
|
|
17
|
+
SANDBOX_KIT_MANIFEST_KEYS,
|
|
18
|
+
SANDBOX_KIT_UPDATE_EVENT,
|
|
19
|
+
genuiSandboxKit
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/vite/index.ts"],"sourcesContent":["/**\n * `@dudousxd/nestjs-agent/vite` — `genuiSandboxKit()`, the Vite plugin that puts the app's design\n * system (its components, its theme, Tailwind) inside the sandbox:\n *\n * ```ts\n * // vite.config.ts (the SPA that talks to the agent)\n * import { genuiSandboxKit } from '@dudousxd/nestjs-agent/vite'\n * export default defineConfig({ plugins: [react(), genuiSandboxKit({ include: 'src/components/ui/*.tsx' })] })\n * ```\n *\n * Then `AgentGenuiModule.forRoot({ sandbox: { kit: true, tailwind: true } })` finds the bundle and\n * the docs: the descriptor the dev server writes (`.genui/sandbox-kit.json`) in dev, the Vite\n * manifest in production (see `AgentGenuiOptions.sandboxKit`).\n */\nimport {\n type GenuiSandboxKitApi,\n type GenuiSandboxKitOptions,\n type GenuiSandboxKitPlugin,\n SANDBOX_KIT_DEV_PREFIX,\n SANDBOX_KIT_MANIFEST_KEYS,\n SANDBOX_KIT_UPDATE_EVENT,\n createGenuiSandboxKitPlugin,\n} from '@dudousxd/nestjs-agent-core/genui/kit';\n\n/**\n * Where the dev descriptor is written, relative to the Vite root — and where the server reads it,\n * relative to its working directory (run both from the project root, or point\n * `sandboxKit.descriptor` at it). Add `.genui/` to `.gitignore`.\n */\nexport const NEST_SANDBOX_KIT_DESCRIPTOR = '.genui/sandbox-kit.json';\n\n/**\n * The sandbox kit plugin. `entry` (a module exporting the kit) or `include` (a glob of component\n * files); neither → the first `components/ui` folder (`src/components/ui`…). See\n * {@link GenuiSandboxKitOptions}.\n */\nexport function genuiSandboxKit(options: GenuiSandboxKitOptions = {}): GenuiSandboxKitPlugin {\n return createGenuiSandboxKitPlugin(options, {\n descriptor: NEST_SANDBOX_KIT_DESCRIPTOR,\n rendererImport: /@dudousxd\\/nestjs-agent-react/,\n });\n}\n\nexport {\n type GenuiSandboxKitApi,\n type GenuiSandboxKitOptions,\n type GenuiSandboxKitPlugin,\n SANDBOX_KIT_DEV_PREFIX,\n SANDBOX_KIT_MANIFEST_KEYS,\n SANDBOX_KIT_UPDATE_EVENT,\n};\n"],"mappings":";;;;AAcA,SAIEA,wBACAC,2BACAC,0BACAC,mCACK;AAOA,IAAMC,8BAA8B;AAOpC,SAASC,gBAAgBC,UAAkC,CAAC,GAAC;AAClE,SAAOC,4BAA4BD,SAAS;IAC1CE,YAAYJ;IACZK,gBAAgB;EAClB,CAAA;AACF;AALgBJ;","names":["SANDBOX_KIT_DEV_PREFIX","SANDBOX_KIT_MANIFEST_KEYS","SANDBOX_KIT_UPDATE_EVENT","createGenuiSandboxKitPlugin","NEST_SANDBOX_KIT_DESCRIPTOR","genuiSandboxKit","options","createGenuiSandboxKitPlugin","descriptor","rendererImport"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/DavideCarvalho/nestjs-agent.git",
|
|
@@ -92,6 +92,16 @@
|
|
|
92
92
|
"types": "./dist/a2ui/index.d.cts",
|
|
93
93
|
"default": "./dist/a2ui/index.cjs"
|
|
94
94
|
}
|
|
95
|
+
},
|
|
96
|
+
"./vite": {
|
|
97
|
+
"import": {
|
|
98
|
+
"types": "./dist/vite/index.d.ts",
|
|
99
|
+
"default": "./dist/vite/index.js"
|
|
100
|
+
},
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./dist/vite/index.d.cts",
|
|
103
|
+
"default": "./dist/vite/index.cjs"
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
},
|
|
97
107
|
"files": [
|
|
@@ -100,7 +110,7 @@
|
|
|
100
110
|
"dependencies": {
|
|
101
111
|
"@standard-schema/spec": "1.1.0",
|
|
102
112
|
"zod": "3.25.76",
|
|
103
|
-
"@dudousxd/nestjs-agent-core": "0.
|
|
113
|
+
"@dudousxd/nestjs-agent-core": "0.52.0"
|
|
104
114
|
},
|
|
105
115
|
"peerDependencies": {
|
|
106
116
|
"@dudousxd/nestjs-durable": ">=0.34.0",
|
|
@@ -110,7 +120,8 @@
|
|
|
110
120
|
"@nestjs/core": "^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
111
121
|
"@nestjs/platform-express": "^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
112
122
|
"ioredis": "^5.0.0",
|
|
113
|
-
"reflect-metadata": "^0.2.0"
|
|
123
|
+
"reflect-metadata": "^0.2.0",
|
|
124
|
+
"vite": ">=5"
|
|
114
125
|
},
|
|
115
126
|
"peerDependenciesMeta": {
|
|
116
127
|
"@dudousxd/nestjs-durable": {
|
|
@@ -124,6 +135,9 @@
|
|
|
124
135
|
},
|
|
125
136
|
"ioredis": {
|
|
126
137
|
"optional": true
|
|
138
|
+
},
|
|
139
|
+
"vite": {
|
|
140
|
+
"optional": true
|
|
127
141
|
}
|
|
128
142
|
},
|
|
129
143
|
"devDependencies": {
|