n8n-nodes-smart-memory 1.0.16 → 1.0.17

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.
@@ -0,0 +1,9 @@
1
+ import { INodeTypeDescription } from './interfaces/MemoryInterfaces';
2
+ /**
3
+ * Defines the properties for the SmartMemory node.
4
+ * This includes operations, settings collections, and their validations.
5
+ */
6
+ export declare class PropertiesDefinition {
7
+ static getProperties(): INodeTypeDescription['properties'];
8
+ }
9
+ //# sourceMappingURL=PropertiesDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertiesDefinition.d.ts","sourceRoot":"","sources":["../src/PropertiesDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,aAAa,IAAI,oBAAoB,CAAC,YAAY,CAAC;CA0O3D"}
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PropertiesDefinition = void 0;
4
+ /**
5
+ * Defines the properties for the SmartMemory node.
6
+ * This includes operations, settings collections, and their validations.
7
+ */
8
+ class PropertiesDefinition {
9
+ static getProperties() {
10
+ return [
11
+ {
12
+ displayName: 'Operation',
13
+ name: 'operation',
14
+ type: 'options',
15
+ options: [
16
+ { name: 'Insert Message', value: 'insert' },
17
+ { name: 'Get Memory', value: 'get' },
18
+ { name: 'Clear Memory', value: 'clear' },
19
+ ],
20
+ default: 'insert',
21
+ description: 'What operation to perform on the memory',
22
+ },
23
+ {
24
+ displayName: 'Session ID',
25
+ name: 'sessionId',
26
+ type: 'string',
27
+ default: '',
28
+ description: 'Unique identifier for the session',
29
+ required: true,
30
+ },
31
+ {
32
+ displayName: 'Insert Mode',
33
+ name: 'insertMode',
34
+ type: 'options',
35
+ displayOptions: {
36
+ show: {
37
+ operation: ['insert'],
38
+ },
39
+ },
40
+ options: [
41
+ { name: 'Append', value: 'append' },
42
+ { name: 'Replace Memory', value: 'replace' },
43
+ ],
44
+ default: 'append',
45
+ description: 'How to insert the message',
46
+ },
47
+ {
48
+ displayName: 'Message Settings',
49
+ name: 'messageSettings',
50
+ type: 'collection',
51
+ placeholder: 'Add Message Setting',
52
+ displayOptions: {
53
+ show: {
54
+ operation: ['insert'],
55
+ },
56
+ },
57
+ default: {},
58
+ options: [
59
+ {
60
+ displayName: 'Chat ID',
61
+ name: 'chatId',
62
+ type: 'string',
63
+ default: '',
64
+ description: 'Unique identifier for the chat',
65
+ },
66
+ {
67
+ displayName: 'Chat Type',
68
+ name: 'chatType',
69
+ type: 'string',
70
+ default: '',
71
+ description: 'Type of chat (private, group, supergroup, channel)',
72
+ },
73
+ {
74
+ displayName: 'Chat Name',
75
+ name: 'chatName',
76
+ type: 'string',
77
+ default: '',
78
+ description: 'Name of the chat',
79
+ },
80
+ {
81
+ displayName: 'Message Content',
82
+ name: 'messageContent',
83
+ type: 'string',
84
+ default: '',
85
+ description: 'Text content of the message',
86
+ },
87
+ {
88
+ displayName: 'Message ID',
89
+ name: 'messageId',
90
+ type: 'string',
91
+ default: '',
92
+ description: 'Optional unique identifier for the message',
93
+ },
94
+ {
95
+ displayName: 'Reply To Message',
96
+ name: 'replyToMessage',
97
+ type: 'string',
98
+ default: '',
99
+ description: 'The message being replied to',
100
+ },
101
+ {
102
+ displayName: 'Include Reply Context',
103
+ name: 'includeReplyContext',
104
+ type: 'boolean',
105
+ default: true,
106
+ description: 'Include information about replied-to messages',
107
+ },
108
+ ],
109
+ },
110
+ {
111
+ displayName: 'Assistant Settings',
112
+ name: 'assistantSettings',
113
+ type: 'collection',
114
+ placeholder: 'Add Assistant Setting',
115
+ displayOptions: {
116
+ show: {
117
+ operation: ['insert'],
118
+ },
119
+ },
120
+ default: {},
121
+ options: [
122
+ {
123
+ displayName: 'Assistant Role',
124
+ name: 'assistantRole',
125
+ type: 'string',
126
+ default: 'Assistant',
127
+ description: 'How the assistant should be identified in memory',
128
+ required: true,
129
+ displayOptions: {
130
+ show: {
131
+ '/assistantSettings.isBotResponse': [true],
132
+ },
133
+ },
134
+ },
135
+ {
136
+ displayName: 'Is Bot Response',
137
+ name: 'isBotResponse',
138
+ type: 'boolean',
139
+ default: false,
140
+ description: 'Whether this is a bot response',
141
+ },
142
+ ],
143
+ },
144
+ {
145
+ displayName: 'User Settings',
146
+ name: 'userSettings',
147
+ type: 'collection',
148
+ placeholder: 'Add User Setting',
149
+ displayOptions: {
150
+ show: {
151
+ operation: ['insert'],
152
+ },
153
+ },
154
+ default: {},
155
+ options: [
156
+ {
157
+ displayName: 'User ID',
158
+ name: 'userId',
159
+ type: 'string',
160
+ default: '',
161
+ description: 'Unique identifier for the user',
162
+ },
163
+ {
164
+ displayName: 'Display Name',
165
+ name: 'displayName',
166
+ type: 'string',
167
+ default: '',
168
+ description: 'Display name for the user',
169
+ },
170
+ {
171
+ displayName: 'Username',
172
+ name: 'username',
173
+ type: 'string',
174
+ default: '',
175
+ description: 'Username for the user',
176
+ },
177
+ {
178
+ displayName: 'User Role',
179
+ name: 'userRole',
180
+ type: 'string',
181
+ default: 'user',
182
+ description: 'Role for the user',
183
+ required: true,
184
+ displayOptions: {
185
+ show: {
186
+ '/assistantSettings.isBotResponse': [false],
187
+ },
188
+ },
189
+ },
190
+ ],
191
+ },
192
+ {
193
+ displayName: 'Memory Settings',
194
+ name: 'memorySettings',
195
+ type: 'collection',
196
+ placeholder: 'Add Memory Setting',
197
+ default: {},
198
+ options: [
199
+ {
200
+ displayName: 'Memory Window Size',
201
+ name: 'memoryWindowSize',
202
+ type: 'number',
203
+ typeOptions: {
204
+ minValue: 5,
205
+ maxValue: 50,
206
+ },
207
+ default: 15,
208
+ description: 'Number of messages to keep in memory',
209
+ },
210
+ {
211
+ displayName: 'Storage Backend',
212
+ name: 'storageBackend',
213
+ type: 'options',
214
+ options: [{ name: 'In-Memory', value: 'memory' }],
215
+ default: 'memory',
216
+ description: 'Where to store the memory',
217
+ },
218
+ {
219
+ displayName: 'Include Timestamp',
220
+ name: 'includeTimestamp',
221
+ type: 'boolean',
222
+ default: false,
223
+ description: 'Include timestamp in messages',
224
+ },
225
+ {
226
+ displayName: 'Include Token Estimate',
227
+ name: 'includeTokenEstimate',
228
+ type: 'boolean',
229
+ default: false,
230
+ description: 'Include token estimate in output',
231
+ },
232
+ {
233
+ displayName: 'Include Message ID',
234
+ name: 'includeMessageId',
235
+ type: 'boolean',
236
+ default: false,
237
+ description: 'Include message ID in messages',
238
+ },
239
+ ],
240
+ },
241
+ ];
242
+ }
243
+ }
244
+ exports.PropertiesDefinition = PropertiesDefinition;
245
+ //# sourceMappingURL=PropertiesDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertiesDefinition.js","sourceRoot":"","sources":["../src/PropertiesDefinition.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,oBAAoB;IAC/B,MAAM,CAAC,aAAa;QAClB,OAAO;YACL;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAC3C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE;oBACpC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE;iBACzC;gBACD,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,yCAAyC;aACvD;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mCAAmC;gBAChD,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,SAAS;gBACf,cAAc,EAAE;o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BACjB,WAAW,EAAE,2BAA2B;qBACzC;oBACD;wBACE,WAAW,EAAE,mBAAmB;wBAChC,IAAI,EAAE,kBAAkB;wBACxB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,WAAW,EAAE,+BAA+B;qBAC7C;oBACD;wBACE,WAAW,EAAE,wBAAwB;wBACrC,IAAI,EAAE,sBAAsB;wBAC5B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,WAAW,EAAE,kCAAkC;qBAChD;oBACD;wBACE,WAAW,EAAE,oBAAoB;wBACjC,IAAI,EAAE,kBAAkB;wBACxB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,WAAW,EAAE,gCAAgC;qBAC9C;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF;AA3OD,oDA2OC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-smart-memory",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Flexible memory management node for n8n with support for multiple storage backends",
5
5
  "main": "dist/SmartMemory.node.js",
6
6
  "scripts": {