@n8n/backend-module-workflow-builder 0.0.0-stage → 0.1.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/LICENSE.md +88 -0
- package/README.md +16 -2
- package/dist/build.tsbuildinfo +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/workflow-builder-session.entity.d.ts +26 -0
- package/dist/workflow-builder-session.entity.js +72 -0
- package/dist/workflow-builder-session.entity.js.map +1 -0
- package/dist/workflow-builder-session.repository.d.ts +10 -0
- package/dist/workflow-builder-session.repository.js +79 -0
- package/dist/workflow-builder-session.repository.js.map +1 -0
- package/dist/workflow-builder.module.d.ts +4 -0
- package/dist/workflow-builder.module.js +21 -0
- package/dist/workflow-builder.module.js.map +1 -0
- package/package.json +68 -3
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowBuilderSessionRepository = exports.WorkflowBuilderSession = void 0;
|
|
4
|
+
var workflow_builder_session_entity_1 = require("./workflow-builder-session.entity");
|
|
5
|
+
Object.defineProperty(exports, "WorkflowBuilderSession", { enumerable: true, get: function () { return workflow_builder_session_entity_1.WorkflowBuilderSession; } });
|
|
6
|
+
var workflow_builder_session_repository_1 = require("./workflow-builder-session.repository");
|
|
7
|
+
Object.defineProperty(exports, "WorkflowBuilderSessionRepository", { enumerable: true, get: function () { return workflow_builder_session_repository_1.WorkflowBuilderSessionRepository; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qFAG2C;AAF1C,yIAAA,sBAAsB,OAAA;AAGvB,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoredMessage } from '@langchain/core/messages';
|
|
2
|
+
import { WithTimestamps } from '@n8n/db';
|
|
3
|
+
import type { Relation } from '@n8n/typeorm';
|
|
4
|
+
export interface IWorkflowBuilderSession {
|
|
5
|
+
id: string;
|
|
6
|
+
workflowId: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
messages: StoredMessage[];
|
|
9
|
+
previousSummary: string | null;
|
|
10
|
+
activeVersionCardId: string | null;
|
|
11
|
+
resumeAfterRestoreMessageId: string | null;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
}
|
|
15
|
+
export declare class WorkflowBuilderSession extends WithTimestamps implements IWorkflowBuilderSession {
|
|
16
|
+
id: string;
|
|
17
|
+
generateId(): void;
|
|
18
|
+
workflowId: string;
|
|
19
|
+
workflow?: Relation<object>;
|
|
20
|
+
userId: string;
|
|
21
|
+
user?: Relation<object>;
|
|
22
|
+
messages: StoredMessage[];
|
|
23
|
+
previousSummary: string | null;
|
|
24
|
+
activeVersionCardId: string | null;
|
|
25
|
+
resumeAfterRestoreMessageId: string | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WorkflowBuilderSession = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const node_crypto_1 = require("node:crypto");
|
|
16
|
+
let WorkflowBuilderSession = class WorkflowBuilderSession extends db_1.WithTimestamps {
|
|
17
|
+
generateId() {
|
|
18
|
+
if (!this.id) {
|
|
19
|
+
this.id = (0, node_crypto_1.randomUUID)();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.WorkflowBuilderSession = WorkflowBuilderSession;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], WorkflowBuilderSession.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
30
|
+
__metadata("design:type", Function),
|
|
31
|
+
__metadata("design:paramtypes", []),
|
|
32
|
+
__metadata("design:returntype", void 0)
|
|
33
|
+
], WorkflowBuilderSession.prototype, "generateId", null);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], WorkflowBuilderSession.prototype, "workflowId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)('WorkflowEntity', { onDelete: 'CASCADE' }),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'workflowId' }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], WorkflowBuilderSession.prototype, "workflow", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], WorkflowBuilderSession.prototype, "userId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.ManyToOne)('User', { onDelete: 'CASCADE' }),
|
|
49
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], WorkflowBuilderSession.prototype, "user", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, db_1.JsonColumn)({ default: '[]' }),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], WorkflowBuilderSession.prototype, "messages", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, default: null }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], WorkflowBuilderSession.prototype, "previousSummary", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true, default: null }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], WorkflowBuilderSession.prototype, "activeVersionCardId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true, default: null }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], WorkflowBuilderSession.prototype, "resumeAfterRestoreMessageId", void 0);
|
|
68
|
+
exports.WorkflowBuilderSession = WorkflowBuilderSession = __decorate([
|
|
69
|
+
(0, typeorm_1.Entity)({ name: 'workflow_builder_session' }),
|
|
70
|
+
(0, typeorm_1.Unique)(['workflowId', 'userId'])
|
|
71
|
+
], WorkflowBuilderSession);
|
|
72
|
+
//# sourceMappingURL=workflow-builder-session.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-builder-session.entity.js","sourceRoot":"","sources":["../src/workflow-builder-session.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAqD;AACrD,0CAQsB;AAEtB,6CAAyC;AAmBlC,IAAM,sBAAsB,GAA5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CAAC;;2EAC7B;iCAtC/B,sBAAsB;IAFlC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;IAC5C,IAAA,gBAAM,EAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;GACpB,sBAAsB,CAuClC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ISessionStorage, type StoredSession } from '@n8n/ai-workflow-builder';
|
|
2
|
+
import { DataSource, Repository } from '@n8n/typeorm';
|
|
3
|
+
import { WorkflowBuilderSession } from './workflow-builder-session.entity';
|
|
4
|
+
export declare class WorkflowBuilderSessionRepository extends Repository<WorkflowBuilderSession> implements ISessionStorage {
|
|
5
|
+
constructor(dataSource: DataSource);
|
|
6
|
+
getSession(threadId: string): Promise<StoredSession | null>;
|
|
7
|
+
saveSession(threadId: string, data: StoredSession): Promise<void>;
|
|
8
|
+
deleteSession(threadId: string): Promise<void>;
|
|
9
|
+
private parseThreadId;
|
|
10
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WorkflowBuilderSessionRepository = void 0;
|
|
13
|
+
const messages_1 = require("@langchain/core/messages");
|
|
14
|
+
const ai_workflow_builder_1 = require("@n8n/ai-workflow-builder");
|
|
15
|
+
const di_1 = require("@n8n/di");
|
|
16
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
17
|
+
const node_crypto_1 = require("node:crypto");
|
|
18
|
+
const workflow_builder_session_entity_1 = require("./workflow-builder-session.entity");
|
|
19
|
+
let WorkflowBuilderSessionRepository = class WorkflowBuilderSessionRepository extends typeorm_1.Repository {
|
|
20
|
+
constructor(dataSource) {
|
|
21
|
+
super(workflow_builder_session_entity_1.WorkflowBuilderSession, dataSource.manager);
|
|
22
|
+
}
|
|
23
|
+
async getSession(threadId) {
|
|
24
|
+
const { workflowId, userId } = this.parseThreadId(threadId);
|
|
25
|
+
const entity = await this.findOne({ where: { workflowId, userId } });
|
|
26
|
+
if (!entity)
|
|
27
|
+
return null;
|
|
28
|
+
const restoredMessages = (0, messages_1.mapStoredMessagesToChatMessages)(entity.messages);
|
|
29
|
+
const messages = (0, ai_workflow_builder_1.isLangchainMessagesArray)(restoredMessages)
|
|
30
|
+
? restoredMessages
|
|
31
|
+
: [];
|
|
32
|
+
return {
|
|
33
|
+
messages,
|
|
34
|
+
previousSummary: entity.previousSummary ?? undefined,
|
|
35
|
+
updatedAt: entity.updatedAt,
|
|
36
|
+
activeVersionCardId: entity.activeVersionCardId,
|
|
37
|
+
resumeAfterRestoreMessageId: entity.resumeAfterRestoreMessageId,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
async saveSession(threadId, data) {
|
|
41
|
+
const { workflowId, userId } = this.parseThreadId(threadId);
|
|
42
|
+
const messages = (0, messages_1.mapChatMessagesToStoredMessages)(data.messages);
|
|
43
|
+
const previousSummary = data.previousSummary ?? null;
|
|
44
|
+
const activeVersionCardId = data.activeVersionCardId ?? null;
|
|
45
|
+
const resumeAfterRestoreMessageId = data.resumeAfterRestoreMessageId ?? null;
|
|
46
|
+
await this.createQueryBuilder()
|
|
47
|
+
.insert()
|
|
48
|
+
.into(workflow_builder_session_entity_1.WorkflowBuilderSession)
|
|
49
|
+
.values({
|
|
50
|
+
id: (0, node_crypto_1.randomUUID)(),
|
|
51
|
+
workflowId,
|
|
52
|
+
userId,
|
|
53
|
+
messages,
|
|
54
|
+
previousSummary,
|
|
55
|
+
activeVersionCardId,
|
|
56
|
+
resumeAfterRestoreMessageId,
|
|
57
|
+
})
|
|
58
|
+
.orUpdate(['messages', 'previousSummary', 'activeVersionCardId', 'resumeAfterRestoreMessageId'], ['workflowId', 'userId'])
|
|
59
|
+
.execute();
|
|
60
|
+
}
|
|
61
|
+
async deleteSession(threadId) {
|
|
62
|
+
const { workflowId, userId } = this.parseThreadId(threadId);
|
|
63
|
+
await this.delete({ workflowId, userId });
|
|
64
|
+
}
|
|
65
|
+
parseThreadId(threadId) {
|
|
66
|
+
const normalized = threadId.endsWith('-code') ? threadId.slice(0, -'-code'.length) : threadId;
|
|
67
|
+
const match = normalized.match(/^workflow-(.+)-user-(.+)$/);
|
|
68
|
+
if (!match) {
|
|
69
|
+
throw new Error(`Invalid thread ID format: ${threadId}`);
|
|
70
|
+
}
|
|
71
|
+
return { workflowId: match[1], userId: match[2] };
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.WorkflowBuilderSessionRepository = WorkflowBuilderSessionRepository;
|
|
75
|
+
exports.WorkflowBuilderSessionRepository = WorkflowBuilderSessionRepository = __decorate([
|
|
76
|
+
(0, di_1.Service)(),
|
|
77
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
78
|
+
], WorkflowBuilderSessionRepository);
|
|
79
|
+
//# sourceMappingURL=workflow-builder-session.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-builder-session.repository.js","sourceRoot":"","sources":["../src/workflow-builder-session.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAGkC;AAClC,kEAKkC;AAClC,gCAAkC;AAClC,0CAAsD;AAC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AO,GAAE;qCAKe,oBAAU;GAJtB,gCAAgC,CAuE5C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WorkflowBuilderModule = void 0;
|
|
10
|
+
const decorators_1 = require("@n8n/decorators");
|
|
11
|
+
let WorkflowBuilderModule = class WorkflowBuilderModule {
|
|
12
|
+
async entities() {
|
|
13
|
+
const { WorkflowBuilderSession } = await import('./workflow-builder-session.entity.js');
|
|
14
|
+
return [WorkflowBuilderSession];
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.WorkflowBuilderModule = WorkflowBuilderModule;
|
|
18
|
+
exports.WorkflowBuilderModule = WorkflowBuilderModule = __decorate([
|
|
19
|
+
(0, decorators_1.BackendModule)({ name: 'workflow-builder', instanceTypes: ['main'] })
|
|
20
|
+
], WorkflowBuilderModule);
|
|
21
|
+
//# sourceMappingURL=workflow-builder.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-builder.module.js","sourceRoot":"","sources":["../src/workflow-builder.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAgD;AAGzC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,KAAK,CAAC,QAAQ;QACb,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,sCAAsC,CAAC,CAAC;QACxF,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACjC,CAAC;CACD,CAAA;;gCALY,qBAAqB;IADjC,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;GACxD,qBAAqB,CAKjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/backend-module-workflow-builder",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./module": {
|
|
14
|
+
"types": "./dist/workflow-builder.module.d.ts",
|
|
15
|
+
"import": "./dist/workflow-builder.module.js",
|
|
16
|
+
"require": "./dist/workflow-builder.module.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@n8n/ai-workflow-builder": "1.44.0",
|
|
24
|
+
"@n8n/db": "1.44.0",
|
|
25
|
+
"@n8n/decorators": "1.44.0",
|
|
26
|
+
"@n8n/di": "0.17.0",
|
|
27
|
+
"@n8n/typeorm": "0.12.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@langchain/core": "1.2.8"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@langchain/core": "1.2.8",
|
|
34
|
+
"@n8n/backend-common": "1.44.0",
|
|
35
|
+
"@n8n/backend-test-utils": "1.44.0",
|
|
36
|
+
"@n8n/oxlint-config": "0.0.1",
|
|
37
|
+
"@n8n/typescript-config": "1.12.0",
|
|
38
|
+
"@n8n/vitest-config": "1.24.0",
|
|
39
|
+
"n8n-containers": "1.0.0",
|
|
40
|
+
"oxlint": "1.78.0",
|
|
41
|
+
"oxlint-tsgolint": "^0.21.1",
|
|
42
|
+
"typescript": "7.0.2",
|
|
43
|
+
"vite": "^8.0.2",
|
|
44
|
+
"vitest": "5.0.1",
|
|
45
|
+
"vitest-mock-extended": "^3.1.0"
|
|
46
|
+
},
|
|
47
|
+
"license": "LicenseRef-n8n-sustainable-use",
|
|
48
|
+
"typesVersions": {
|
|
49
|
+
"*": {
|
|
50
|
+
"module": [
|
|
51
|
+
"dist/workflow-builder.module.d.ts"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"clean": "rimraf dist .turbo",
|
|
57
|
+
"dev": "pnpm watch",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"build": "tsc -p tsconfig.build.json",
|
|
60
|
+
"build:unchecked": "tsc -p tsconfig.build.json --noCheck",
|
|
61
|
+
"format": "biome format --write .",
|
|
62
|
+
"format:check": "biome ci .",
|
|
63
|
+
"lint": "oxlint --type-aware . --quiet",
|
|
64
|
+
"lint:fix": "oxlint --type-aware . --fix",
|
|
65
|
+
"watch": "tsc -p tsconfig.build.json --watch",
|
|
66
|
+
"test": "vitest run",
|
|
67
|
+
"test:unit": "vitest run",
|
|
68
|
+
"test:dev": "vitest --silent=false",
|
|
69
|
+
"test:postgres": "N8N_LOG_LEVEL=silent vitest run --config vitest.config.postgres.ts"
|
|
70
|
+
}
|
|
6
71
|
}
|