@memberjunction/actions 2.52.0 → 2.54.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.
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { EntityInfo, EntitySaveOptions } from "@memberjunction/core";
|
|
2
|
-
import { BaseLLM, ChatParams } from "@memberjunction/ai";
|
|
3
2
|
import { ActionEntityExtended, ActionLibrary, GeneratedCode } from "@memberjunction/actions-base";
|
|
3
|
+
/**
|
|
4
|
+
* Extended GeneratedCode interface to include parameters and result codes
|
|
5
|
+
*/
|
|
6
|
+
interface GeneratedCodeExtended extends GeneratedCode {
|
|
7
|
+
Parameters?: Array<{
|
|
8
|
+
Name: string;
|
|
9
|
+
Type: 'Input' | 'Output' | 'Both';
|
|
10
|
+
ValueType: 'Scalar' | 'Simple Object' | 'BaseEntity Sub-Class' | 'Other';
|
|
11
|
+
IsArray: boolean;
|
|
12
|
+
IsRequired: boolean;
|
|
13
|
+
DefaultValue: string | null;
|
|
14
|
+
Description: string;
|
|
15
|
+
}>;
|
|
16
|
+
ResultCodes?: Array<{
|
|
17
|
+
ResultCode: string;
|
|
18
|
+
Description: string;
|
|
19
|
+
IsSuccess: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
4
22
|
/**
|
|
5
23
|
* Server-Only custom sub-class for Actions entity. This sub-class handles the process of auto-generation code for the Actions entity.
|
|
6
24
|
*/
|
|
7
25
|
export declare class ActionEntityServerEntity extends ActionEntityExtended {
|
|
8
26
|
constructor(Entity: EntityInfo);
|
|
9
|
-
/**
|
|
10
|
-
* Default implementation simply returns 'OpenAI' - override this in your subclass if you are using a different AI vendor.
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
protected get AIVendorName(): string;
|
|
14
27
|
/**
|
|
15
28
|
* Override of the base Save method to handle the pre-processing to auto generate code whenever an action's UserPrompt is modified.
|
|
16
29
|
* This happens when a new record is created and also whenever the UserPrompt field is changed.
|
|
@@ -18,20 +31,43 @@ export declare class ActionEntityServerEntity extends ActionEntityExtended {
|
|
|
18
31
|
* @returns
|
|
19
32
|
*/
|
|
20
33
|
Save(options?: EntitySaveOptions): Promise<boolean>;
|
|
21
|
-
protected manageLibraries(codeLibraries: ActionLibrary[], wasNewRecord: boolean): Promise<
|
|
34
|
+
protected manageLibraries(codeLibraries: ActionLibrary[], wasNewRecord: boolean): Promise<void>;
|
|
22
35
|
protected SendMessage(message: string): void;
|
|
23
36
|
/**
|
|
24
37
|
* This method will generate code using a combination of the UserPrompt field as well as the overall context of how an Action gets executed. Code from the Action is later used by CodeGen to inject into
|
|
25
38
|
* the mj_actions library for each user environment. The mj_actions library will have a class for each action and that class will have certain libraries imported at the top of the file and available for use.
|
|
26
39
|
* That information along with a detailed amount of system prompt steering goes into the AI model in order to generate contextually appropriate and reliable code that maps to the business logic of the user
|
|
27
40
|
*/
|
|
28
|
-
GenerateCode(maxAttempts?: number): Promise<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
GenerateCode(maxAttempts?: number): Promise<GeneratedCodeExtended>;
|
|
42
|
+
/**
|
|
43
|
+
* Prepares the data context for the prompt template
|
|
44
|
+
*/
|
|
45
|
+
protected PreparePromptData(): Promise<Record<string, any>>;
|
|
46
|
+
/**
|
|
47
|
+
* Loads the parent action entity if this is a child action
|
|
48
|
+
*/
|
|
49
|
+
protected LoadParentAction(): Promise<ActionEntityExtended | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Processes generated parameters and saves them to the database
|
|
52
|
+
*/
|
|
53
|
+
protected ProcessGeneratedParameters(parameters: Array<any>): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Processes generated result codes and saves them to the database
|
|
56
|
+
*/
|
|
57
|
+
protected ProcessGeneratedResultCodes(resultCodes: Array<{
|
|
58
|
+
ResultCode: string;
|
|
59
|
+
Description: string;
|
|
60
|
+
IsSuccess: boolean;
|
|
61
|
+
}>): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Validates the generated code
|
|
64
|
+
*/
|
|
65
|
+
protected ValidateGeneratedCode(generatedCode: GeneratedCodeExtended, attemptsRemaining: number): Promise<GeneratedCodeExtended>;
|
|
66
|
+
/**
|
|
67
|
+
* Generates the libraries context for the prompt
|
|
68
|
+
*/
|
|
69
|
+
protected GenerateLibrariesContext(): string;
|
|
35
70
|
}
|
|
36
71
|
export declare function LoadActionEntityServer(): void;
|
|
72
|
+
export {};
|
|
37
73
|
//# sourceMappingURL=ActionEntity.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/generic/ActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/generic/ActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,UAAU,EAAE,iBAAiB,EAA+B,MAAM,sBAAsB,CAAC;AAOpI,OAAO,EAAoB,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEpH;;GAEG;AACH,UAAU,qBAAsB,SAAQ,aAAa;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;QAClC,SAAS,EAAE,QAAQ,GAAG,eAAe,GAAG,sBAAsB,GAAG,OAAO,CAAC;QACzE,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC;KACvB,CAAC,CAAC;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACtB,CAAC,CAAC;CACN;AAED;;GAEG;AACH,qBACa,wBAAyB,SAAQ,oBAAoB;gBAClD,MAAM,EAAE,UAAU;IAS9B;;;;;OAKG;IACmB,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;cA4EzD,eAAe,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDrG,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM;IAQrC;;;;OAIG;IACU,YAAY,CAAC,WAAW,GAAE,MAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA2ElF;;OAEG;cACa,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAwCjE;;OAEG;cACa,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAWxE;;OAEG;cACa,0BAA0B,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAqGjF;;OAEG;cACa,2BAA2B,CAAC,WAAW,EAAE,KAAK,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA2E7I;;OAEG;cACa,qBAAqB,CAAC,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMtI;;OAEG;IACH,SAAS,CAAC,wBAAwB,IAAI,MAAM;CAa/C;AAED,wBAAgB,sBAAsB,SAIrC"}
|
|
@@ -13,7 +13,7 @@ exports.LoadActionEntityServer = exports.ActionEntityServerEntity = void 0;
|
|
|
13
13
|
const core_1 = require("@memberjunction/core");
|
|
14
14
|
const global_1 = require("@memberjunction/global");
|
|
15
15
|
const aiengine_1 = require("@memberjunction/aiengine");
|
|
16
|
-
const
|
|
16
|
+
const ai_prompts_1 = require("@memberjunction/ai-prompts");
|
|
17
17
|
const doc_utils_1 = require("@memberjunction/doc-utils");
|
|
18
18
|
const actions_base_1 = require("@memberjunction/actions-base");
|
|
19
19
|
/**
|
|
@@ -26,13 +26,6 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
26
26
|
if (md.ProviderType !== 'Database')
|
|
27
27
|
throw new Error('This class is only supported for server-side/database providers. Remove this package from your application.');
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Default implementation simply returns 'OpenAI' - override this in your subclass if you are using a different AI vendor.
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
get AIVendorName() {
|
|
34
|
-
return 'OpenAI';
|
|
35
|
-
}
|
|
36
29
|
/**
|
|
37
30
|
* Override of the base Save method to handle the pre-processing to auto generate code whenever an action's UserPrompt is modified.
|
|
38
31
|
* This happens when a new record is created and also whenever the UserPrompt field is changed.
|
|
@@ -43,36 +36,66 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
43
36
|
// make sure the ActionEngine is configured
|
|
44
37
|
await actions_base_1.ActionEngineBase.Instance.Config(false, this.ContextCurrentUser);
|
|
45
38
|
await doc_utils_1.DocumentationEngine.Instance.Config(false, this.ContextCurrentUser);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
this
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
39
|
+
const provider = core_1.Metadata.Provider;
|
|
40
|
+
// Start a database transaction
|
|
41
|
+
await provider.BeginTransaction();
|
|
42
|
+
try {
|
|
43
|
+
let newCodeGenerated = false;
|
|
44
|
+
let codeLibraries = [];
|
|
45
|
+
let generatedParameters = [];
|
|
46
|
+
let generatedResultCodes = [];
|
|
47
|
+
if (this.Type === 'Generated' && // only generate when the type is Generated
|
|
48
|
+
!this.CodeLocked && // only generate when the code is not locked
|
|
49
|
+
(this.GetFieldByName('UserPrompt').Dirty || !this.IsSaved || this.ForceCodeGeneration) // only generate when the UserPrompt field is dirty or this is a new record or we are being asked to FORCE code generation
|
|
50
|
+
) {
|
|
51
|
+
// UserPrompt field is dirty, or this is a new record, either way, this is the condition where we want to generate the Code.
|
|
52
|
+
const result = await this.GenerateCode();
|
|
53
|
+
if (result.Success) {
|
|
54
|
+
this.Code = result.Code;
|
|
55
|
+
this.CodeComments = result.Comments;
|
|
56
|
+
this.CodeApprovalStatus = 'Pending'; // set to pending even if previously approved since we changed the code
|
|
57
|
+
this.CodeApprovedAt = null; // reset the approved at date
|
|
58
|
+
this.CodeApprovedByUserID = null; // reset the approved by user id
|
|
59
|
+
newCodeGenerated = true; // flag for post-save processing of libraries
|
|
60
|
+
codeLibraries = result.LibrariesUsed;
|
|
61
|
+
// Store the generated parameters and result codes for later processing
|
|
62
|
+
generatedParameters = result.Parameters || [];
|
|
63
|
+
generatedResultCodes = result.ResultCodes || [];
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
throw new Error(`Failed to generate code for Action ${this.Name}.`);
|
|
62
67
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
this.ForceCodeGeneration = false; // make sure to reset this flag every time we save, it should never live past one run of the Save method
|
|
69
|
+
const wasNewRecord = !this.IsSaved;
|
|
70
|
+
if (await super.Save(options)) {
|
|
71
|
+
// Now handle all the child entities within the same transaction
|
|
72
|
+
if (newCodeGenerated) {
|
|
73
|
+
// Process libraries
|
|
74
|
+
await this.manageLibraries(codeLibraries, wasNewRecord);
|
|
75
|
+
// Process parameters
|
|
76
|
+
if (generatedParameters.length > 0) {
|
|
77
|
+
await this.ProcessGeneratedParameters(generatedParameters);
|
|
78
|
+
}
|
|
79
|
+
// Process result codes
|
|
80
|
+
if (generatedResultCodes.length > 0) {
|
|
81
|
+
await this.ProcessGeneratedResultCodes(generatedResultCodes);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Commit the transaction
|
|
85
|
+
await provider.CommitTransaction();
|
|
72
86
|
return true;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
// Rollback on save failure
|
|
90
|
+
await provider.RollbackTransaction();
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
// Rollback on any error
|
|
96
|
+
await provider.RollbackTransaction();
|
|
97
|
+
throw e;
|
|
73
98
|
}
|
|
74
|
-
else
|
|
75
|
-
return false;
|
|
76
99
|
}
|
|
77
100
|
async manageLibraries(codeLibraries, wasNewRecord) {
|
|
78
101
|
// new code was generated, we need to sync up the ActionLibraries table with the libraries used in the code for this Action
|
|
@@ -95,7 +118,6 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
95
118
|
const librariesToRemove = existingLibraries.filter(el => !codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
96
119
|
const librariesToUpdate = existingLibraries.filter(el => codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
97
120
|
const md = new core_1.Metadata();
|
|
98
|
-
const tg = await md.CreateTransactionGroup();
|
|
99
121
|
for (const lib of librariesToAdd) {
|
|
100
122
|
const libMetadata = md.Libraries.find(l => l.Name.trim().toLowerCase() === lib.LibraryName.trim().toLowerCase());
|
|
101
123
|
if (libMetadata) {
|
|
@@ -103,7 +125,6 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
103
125
|
newLib.ActionID = this.ID;
|
|
104
126
|
newLib.LibraryID = libMetadata.ID;
|
|
105
127
|
newLib.ItemsUsed = lib.ItemsUsed.join(',');
|
|
106
|
-
newLib.TransactionGroup = tg;
|
|
107
128
|
await newLib.Save();
|
|
108
129
|
}
|
|
109
130
|
}
|
|
@@ -111,20 +132,13 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
111
132
|
for (const lib of librariesToUpdate) {
|
|
112
133
|
const newCode = codeLibraries.find(l => l.LibraryName.trim().toLowerCase() === lib.Library.trim().toLowerCase());
|
|
113
134
|
lib.ItemsUsed = newCode.ItemsUsed.join(',');
|
|
114
|
-
lib.TransactionGroup = tg;
|
|
115
135
|
await lib.Save();
|
|
116
136
|
}
|
|
117
137
|
// now remove the libraries that are no longer used
|
|
118
138
|
for (const lib of librariesToRemove) {
|
|
119
139
|
// each lib in this array iteration is already a BaseEntity derived object
|
|
120
|
-
lib.TransactionGroup = tg;
|
|
121
140
|
await lib.Delete();
|
|
122
141
|
}
|
|
123
|
-
// now commit the transaction
|
|
124
|
-
if (await tg.Submit())
|
|
125
|
-
return true;
|
|
126
|
-
else
|
|
127
|
-
return false;
|
|
128
142
|
}
|
|
129
143
|
SendMessage(message) {
|
|
130
144
|
global_1.MJGlobal.Instance.RaiseEvent({
|
|
@@ -142,416 +156,270 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends actions_ba
|
|
|
142
156
|
async GenerateCode(maxAttempts = 3) {
|
|
143
157
|
try {
|
|
144
158
|
this.SendMessage('Generating code... ');
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
content: this.GenerateSysPrompt()
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
role: 'user',
|
|
156
|
-
content: this.UserPrompt,
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
};
|
|
160
|
-
let result = await this.InternalGenerateCode(llm, chatParams, maxAttempts);
|
|
161
|
-
if (result.Success) {
|
|
162
|
-
//now run the code through the QA agent to make sure the code is valid
|
|
163
|
-
let qaResult = await this.ValidateCode(llm, this.UserPrompt, result, maxAttempts);
|
|
164
|
-
return qaResult;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
//something went wrong in the first pass, just return the error
|
|
168
|
-
return result;
|
|
159
|
+
// Ensure AIEngine is configured
|
|
160
|
+
await aiengine_1.AIEngine.Instance.Config(false, this.ContextCurrentUser);
|
|
161
|
+
// Load the consolidated prompt template from preloaded prompts
|
|
162
|
+
const aiPrompt = aiengine_1.AIEngine.Instance.Prompts.find(p => p.Name === 'Generate Action Code' &&
|
|
163
|
+
p.Category === 'Actions');
|
|
164
|
+
if (!aiPrompt) {
|
|
165
|
+
throw new Error('Failed to find AI prompt template: Generate Action Code in Actions category');
|
|
169
166
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const result = await
|
|
179
|
-
if (result && result.
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if (parsed.reflection) {
|
|
191
|
-
comments = comments + `\n ${parsed.reflection}`;
|
|
192
|
-
}
|
|
193
|
-
const result = {
|
|
194
|
-
Success: true,
|
|
195
|
-
Code: trimmed,
|
|
196
|
-
Comments: parsed.explanation,
|
|
197
|
-
LibrariesUsed: parsed.libraries
|
|
198
|
-
};
|
|
199
|
-
return result;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
throw new Error('Invalid JSON response from AI: ' + llmResponse);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
else
|
|
206
|
-
throw new Error('No response from AI');
|
|
207
|
-
}
|
|
208
|
-
else
|
|
209
|
-
throw new Error('No response from AI');
|
|
210
|
-
}
|
|
211
|
-
catch (e) {
|
|
212
|
-
(0, core_1.LogError)(e);
|
|
213
|
-
if (attemptsRemaining > 1) {
|
|
214
|
-
// try again
|
|
215
|
-
return await this.InternalGenerateCode(llm, chatParams, attemptsRemaining - 1);
|
|
167
|
+
// Prepare prompt data
|
|
168
|
+
const promptData = await this.PreparePromptData();
|
|
169
|
+
// Execute the prompt using AIPromptRunner
|
|
170
|
+
const promptRunner = new ai_prompts_1.AIPromptRunner();
|
|
171
|
+
const params = new ai_prompts_1.AIPromptParams();
|
|
172
|
+
params.prompt = aiPrompt;
|
|
173
|
+
params.data = promptData;
|
|
174
|
+
params.contextUser = this.ContextCurrentUser;
|
|
175
|
+
const result = await promptRunner.ExecutePrompt(params);
|
|
176
|
+
if (result.success && result.result) {
|
|
177
|
+
const generatedCode = {
|
|
178
|
+
Success: true,
|
|
179
|
+
Code: result.result.code.trim(),
|
|
180
|
+
Comments: result.result.explanation,
|
|
181
|
+
LibrariesUsed: result.result.libraries,
|
|
182
|
+
Parameters: result.result.parameters,
|
|
183
|
+
ResultCodes: result.result.resultCodes
|
|
184
|
+
};
|
|
185
|
+
// Validate the generated code
|
|
186
|
+
return await this.ValidateGeneratedCode(generatedCode, maxAttempts);
|
|
216
187
|
}
|
|
217
|
-
else
|
|
188
|
+
else {
|
|
218
189
|
return {
|
|
219
190
|
Success: false,
|
|
220
191
|
Code: '',
|
|
221
|
-
Comments:
|
|
192
|
+
Comments: result.errorMessage || 'Failed to generate code',
|
|
222
193
|
LibrariesUsed: []
|
|
223
194
|
};
|
|
195
|
+
}
|
|
224
196
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const model = await aiengine_1.AIEngine.Instance.GetHighestPowerModel(this.AIVendorName, 'llm', this.ContextCurrentUser);
|
|
229
|
-
const promptMessage = this.GenerateValidateCodePrompt(userRequest, generatedCode);
|
|
230
|
-
const validatePrompt = {
|
|
231
|
-
role: 'system',
|
|
232
|
-
content: promptMessage
|
|
233
|
-
};
|
|
234
|
-
let chatParams = new ai_1.ChatParams();
|
|
235
|
-
chatParams.messages = [validatePrompt];
|
|
236
|
-
chatParams.model = model.APINameOrName;
|
|
237
|
-
let result = await this.InternalGenerateCode(llm, chatParams, attemptsRemaining);
|
|
238
|
-
if (result.Success) {
|
|
239
|
-
return result;
|
|
240
|
-
}
|
|
241
|
-
else if (attemptsRemaining > 1) {
|
|
242
|
-
return this.ValidateCode(llm, userRequest, generatedCode, attemptsRemaining - 1);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
return {
|
|
246
|
-
Success: false,
|
|
247
|
-
Code: '',
|
|
248
|
-
Comments: `Error communicating with AI: ${result.Comments}`,
|
|
249
|
-
LibrariesUsed: []
|
|
250
|
-
};
|
|
197
|
+
catch (e) {
|
|
198
|
+
(0, core_1.LogError)(e);
|
|
199
|
+
throw e;
|
|
251
200
|
}
|
|
252
201
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
${
|
|
269
|
-
|
|
270
|
-
Your response must be JSON and parsable into this type:
|
|
271
|
-
const returnType = {
|
|
272
|
-
code: string, // The typescript code you will create that will work in the context described above. Make sure to include line breaks, but not tabs. That is, pretty format in terms of new lines, but do NOT indent with spaces/tabs, as I'll handle indentation.
|
|
273
|
-
explanation: string // an explanation for a semi-technical person explaining what the code does. Here again use line breaks liberally to make it easy to read but do NOT indent with spaces/tabs as I will handle that. Use * lists and numbered lists as appropriate.
|
|
274
|
-
libraries: [
|
|
275
|
-
{LibraryName: string, ItemsUsed: string[]}, // tell me the libraries you have used in the code you created here in this array of libraries. I need this info to properly import them in the final code.
|
|
276
|
-
]
|
|
277
|
-
};
|
|
278
|
-
</CRITICAL>
|
|
279
|
-
**** REMEMBER **** I am a BOT, do not return anything other than the above JSON format to me or I will choke on your response!
|
|
280
|
-
`;
|
|
281
|
-
return prompt;
|
|
282
|
-
}
|
|
283
|
-
GenerateValidateCodePrompt(userRequest, generatedCode) {
|
|
284
|
-
return `<RETURN_FORMAT>
|
|
285
|
-
* CRITICAL - I am a bot, I can ONLY understand fully formed JSON responses
|
|
286
|
-
* YOUR RESPONSE MUST BE A JSON OBJECT
|
|
287
|
-
* MORE INFO BELOW
|
|
288
|
-
</RETURN_FORMAT>
|
|
289
|
-
|
|
290
|
-
<INTRODUCTION>
|
|
291
|
-
You are an expert in TypeScript coding and business applications. You take great pride in easy to read, commented, and nicely formatted code.
|
|
292
|
-
You are also exceptional in catching errors in other people's code and providing clear and easy to understand bug fixes, with comments explaining the
|
|
293
|
-
issues and how you corrected it.
|
|
294
|
-
You will be provided a request for how to handle a specific type of action that they want created, as well code written by someone else that attempts
|
|
295
|
-
to satisfy the request. An action is a "verb" in the MemberJunction framework that can do basically anything the user asks for.
|
|
296
|
-
Your job is to:
|
|
297
|
-
1 - Verify that the given code can successfully compile and run, using the provided libraries and parameters.
|
|
298
|
-
2- Verify that the given code satifies the user's request.
|
|
299
|
-
</INTRODUCTION>
|
|
300
|
-
|
|
301
|
-
The user's original request was:
|
|
302
|
-
${userRequest}
|
|
303
|
-
|
|
304
|
-
The generated code is below:
|
|
305
|
-
<GENERATEDCODE>
|
|
306
|
-
${generatedCode.Code}
|
|
307
|
-
</GENERATEDCODE>
|
|
308
|
-
|
|
309
|
-
Here are some comments about the above code:
|
|
310
|
-
<CODECOMMENTS>
|
|
311
|
-
${generatedCode.Comments}
|
|
312
|
-
</CODECOMMENTS>
|
|
313
|
-
|
|
314
|
-
As well as the libraries used in the above code:
|
|
315
|
-
<LIBRARIESUSED>
|
|
316
|
-
${JSON.stringify(generatedCode.LibrariesUsed, null, 2)}
|
|
317
|
-
</LIBRARIESUSED>
|
|
318
|
-
|
|
319
|
-
<CONTEXTINFO>
|
|
320
|
-
Here is some additional info to help you:
|
|
321
|
-
${this.GenerateContextInfo()}
|
|
322
|
-
</CONTEXTINFO>
|
|
323
|
-
|
|
324
|
-
<RUNVIEWINFO>
|
|
325
|
-
Here is some additonal info regarding the RunViewParams object
|
|
326
|
-
${this.GenerateRunViewParamsInfo()}
|
|
327
|
-
</RUNVIEWINFO>
|
|
202
|
+
/**
|
|
203
|
+
* Prepares the data context for the prompt template
|
|
204
|
+
*/
|
|
205
|
+
async PreparePromptData() {
|
|
206
|
+
const data = {
|
|
207
|
+
userPrompt: this.UserPrompt,
|
|
208
|
+
availableLibraries: this.GenerateLibrariesContext(),
|
|
209
|
+
IsChildAction: !!this.ParentID // Template variable for conditional sections
|
|
210
|
+
};
|
|
211
|
+
// If this is a child action, load parent context and create ChildActionInfo
|
|
212
|
+
if (this.ParentID) {
|
|
213
|
+
const parentAction = await this.LoadParentAction();
|
|
214
|
+
if (parentAction) {
|
|
215
|
+
// Create the ChildActionInfo template variable with all parent details
|
|
216
|
+
data.ChildActionInfo = `
|
|
217
|
+
**Parent Action Name:** ${parentAction.Name}
|
|
218
|
+
**Parent Description:** ${parentAction.Description || 'No description provided'}
|
|
328
219
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
220
|
+
**Parent Parameters:**
|
|
221
|
+
${JSON.stringify(parentAction.Params.map(p => {
|
|
222
|
+
return {
|
|
223
|
+
Name: p.Name,
|
|
224
|
+
Type: p.Type,
|
|
225
|
+
ValueType: p.ValueType,
|
|
226
|
+
IsArray: p.IsArray,
|
|
227
|
+
IsRequired: p.IsRequired,
|
|
228
|
+
DefaultValue: p.DefaultValue,
|
|
229
|
+
Description: p.Description
|
|
230
|
+
};
|
|
231
|
+
}), null, 2)}
|
|
339
232
|
`;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
public async Run(params: RunActionParams): Promise<ActionResultSimple> {
|
|
346
|
-
// IMPORTANT: your code will go here, do not generate the method signature, just the code inside the method
|
|
347
|
-
/* FOR THE RETURN VALUE you should return a JavaScript object that has these properties:
|
|
348
|
-
{
|
|
349
|
-
Success: boolean // or false if the action failed
|
|
350
|
-
ResultCode: ${this.ResultCodes && this.ResultCodes.length > 0 ? this.ResultCodes.map(rc => `'${rc.ResultCode}'`).join(" | ") : 'string'} // The result of the action
|
|
351
|
-
Message: string // a message to show the user
|
|
233
|
+
// Also include the parent action object for template access
|
|
234
|
+
data.parentAction = {
|
|
235
|
+
Name: parentAction.Name,
|
|
236
|
+
Description: parentAction.Description
|
|
237
|
+
};
|
|
352
238
|
}
|
|
353
|
-
|
|
239
|
+
}
|
|
240
|
+
return data;
|
|
354
241
|
}
|
|
355
|
-
}
|
|
356
|
-
</CODE_EXAMPLE>
|
|
357
|
-
|
|
358
|
-
<AVAILABLE_PARAMETERS>
|
|
359
|
-
The params parameter into the Run method has a property called Params which is an array of ActionParam objects. These objects have a Name and Value property and map to the defined parameters for this action. The parameters for this
|
|
360
|
-
action are as shown below. For parameters shown as output, make sure you generate the code to handle this and place a new item in the Params array with the Name and Value set to the output parameter name and value respectively. If
|
|
361
|
-
the parameter has a type of input/output, you will receive the value as an input, and you can update it if the program you create needs to pass back a different value.
|
|
362
|
-
${JSON.stringify(this.Params)}
|
|
363
|
-
</AVAILABLE_PARAMETERS>
|
|
364
|
-
|
|
365
|
-
<AVAILABLE_LIBRARIES>
|
|
366
|
-
The following libraries are available for use in your code. THEY ARE ALREADY IMPORTED. **DO NOT IMPORT THEM IN YOUR CODE**
|
|
367
|
-
Use the code examples and reference information shown below, only use properties and methods shown in the documentation/examples.
|
|
368
|
-
IMPORTANT: DO NOT GENERATE IMPORT STATEMENTS FOR THESE LIBRARIES, THEY ARE ALREADY IMPORTED FOR YOU!
|
|
369
|
-
${doc_utils_1.DocumentationEngine.Instance.Libraries.map((library) => {
|
|
370
|
-
return library.Items.map((item) => {
|
|
371
|
-
return `
|
|
372
|
-
{
|
|
373
|
-
"LibraryName": ${item.Name},
|
|
374
|
-
"Content": ${item.HTMLContent}
|
|
375
|
-
}
|
|
376
|
-
`;
|
|
377
|
-
});
|
|
378
|
-
})}
|
|
379
|
-
</AVAILABLE_LIBRARIES>
|
|
380
|
-
|
|
381
|
-
<REFERENCE_TYPES>
|
|
382
242
|
/**
|
|
383
|
-
*
|
|
243
|
+
* Loads the parent action entity if this is a child action
|
|
384
244
|
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
public ResultCode: string;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Optional, additional information about the result of the action
|
|
398
|
-
*/
|
|
399
|
-
public Message?: string;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Some actions return output parameters. If the action that was run has outputs, they will be provided here.
|
|
403
|
-
*/
|
|
404
|
-
public Outputs?: ActionParam[];
|
|
245
|
+
async LoadParentAction() {
|
|
246
|
+
if (!this.ParentID)
|
|
247
|
+
return null;
|
|
248
|
+
const md = new core_1.Metadata();
|
|
249
|
+
const parent = await md.GetEntityObject('Actions', this.ContextCurrentUser);
|
|
250
|
+
if (await parent.Load(this.ParentID)) {
|
|
251
|
+
return parent;
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
405
254
|
}
|
|
406
255
|
/**
|
|
407
|
-
*
|
|
256
|
+
* Processes generated parameters and saves them to the database
|
|
408
257
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
258
|
+
async ProcessGeneratedParameters(parameters) {
|
|
259
|
+
const md = new core_1.Metadata();
|
|
260
|
+
try {
|
|
261
|
+
// First, get existing parameters
|
|
262
|
+
const rv = new core_1.RunView();
|
|
263
|
+
const existingParams = await rv.RunView({
|
|
264
|
+
EntityName: 'Action Params',
|
|
265
|
+
ExtraFilter: `ActionID='${this.ID}'`,
|
|
266
|
+
ResultType: 'entity_object'
|
|
267
|
+
}, this.ContextCurrentUser);
|
|
268
|
+
if (!existingParams.Success) {
|
|
269
|
+
throw new Error(`Failed to load existing parameters: ${existingParams.ErrorMessage}`);
|
|
270
|
+
}
|
|
271
|
+
const existingParamsList = existingParams.Results || [];
|
|
272
|
+
const generatedParamNames = parameters.map(p => p.Name.toLowerCase());
|
|
273
|
+
// Find parameters to add, update, or remove
|
|
274
|
+
const paramsToAdd = parameters.filter(p => !existingParamsList.some(ep => ep.Name.toLowerCase() === p.Name.toLowerCase()));
|
|
275
|
+
const paramsToUpdate = existingParamsList.filter(ep => parameters.some(p => p.Name.toLowerCase() === ep.Name.toLowerCase()));
|
|
276
|
+
const paramsToRemove = existingParamsList.filter(ep => !generatedParamNames.includes(ep.Name.toLowerCase()));
|
|
277
|
+
// Add new parameters
|
|
278
|
+
for (const param of paramsToAdd) {
|
|
279
|
+
const newParam = await md.GetEntityObject('Action Params', this.ContextCurrentUser);
|
|
280
|
+
newParam.ActionID = this.ID;
|
|
281
|
+
newParam.Name = param.Name;
|
|
282
|
+
const t = param.Type;
|
|
283
|
+
if (t === 'Input' || t === 'Output' || t === 'Both') {
|
|
284
|
+
newParam.Type = t;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
newParam.Type = 'Input'; // Default to Input if type is not recognized and emit a warning
|
|
288
|
+
console.warn(`Action Generator: Unrecognized parameter type "${t}" for parameter "${param.Name}". Defaulting to "Input".`);
|
|
289
|
+
}
|
|
290
|
+
newParam.ValueType = param.ValueType;
|
|
291
|
+
newParam.IsArray = param.IsArray;
|
|
292
|
+
newParam.IsRequired = param.IsRequired;
|
|
293
|
+
newParam.DefaultValue = param.DefaultValue;
|
|
294
|
+
newParam.Description = param.Description;
|
|
295
|
+
await newParam.Save();
|
|
296
|
+
}
|
|
297
|
+
// Update existing parameters if properties changed
|
|
298
|
+
for (const existingParam of paramsToUpdate) {
|
|
299
|
+
const generatedParam = parameters.find(p => p.Name.toLowerCase() === existingParam.Name.toLowerCase());
|
|
300
|
+
if (generatedParam) {
|
|
301
|
+
let hasChanges = false;
|
|
302
|
+
// Check each property for changes
|
|
303
|
+
if (existingParam.Type !== generatedParam.Type) {
|
|
304
|
+
existingParam.Type = generatedParam.Type;
|
|
305
|
+
hasChanges = true;
|
|
306
|
+
}
|
|
307
|
+
if (existingParam.ValueType !== generatedParam.ValueType) {
|
|
308
|
+
existingParam.ValueType = generatedParam.ValueType;
|
|
309
|
+
hasChanges = true;
|
|
310
|
+
}
|
|
311
|
+
if (existingParam.IsArray !== generatedParam.IsArray) {
|
|
312
|
+
existingParam.IsArray = generatedParam.IsArray;
|
|
313
|
+
hasChanges = true;
|
|
314
|
+
}
|
|
315
|
+
if (existingParam.IsRequired !== generatedParam.IsRequired) {
|
|
316
|
+
existingParam.IsRequired = generatedParam.IsRequired;
|
|
317
|
+
hasChanges = true;
|
|
318
|
+
}
|
|
319
|
+
if (existingParam.DefaultValue !== generatedParam.DefaultValue) {
|
|
320
|
+
existingParam.DefaultValue = generatedParam.DefaultValue;
|
|
321
|
+
hasChanges = true;
|
|
322
|
+
}
|
|
323
|
+
if (existingParam.Description !== generatedParam.Description) {
|
|
324
|
+
existingParam.Description = generatedParam.Description;
|
|
325
|
+
hasChanges = true;
|
|
326
|
+
}
|
|
327
|
+
if (hasChanges) {
|
|
328
|
+
await existingParam.Save();
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
// Remove parameters that are no longer in the generated list
|
|
333
|
+
for (const paramToRemove of paramsToRemove) {
|
|
334
|
+
await paramToRemove.Delete();
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
catch (e) {
|
|
338
|
+
(0, core_1.LogError)('Failed to save generated parameters:', e);
|
|
339
|
+
throw e; // Re-throw since we're in a transaction
|
|
340
|
+
}
|
|
418
341
|
}
|
|
419
342
|
/**
|
|
420
|
-
*
|
|
343
|
+
* Processes generated result codes and saves them to the database
|
|
421
344
|
*/
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
345
|
+
async ProcessGeneratedResultCodes(resultCodes) {
|
|
346
|
+
const md = new core_1.Metadata();
|
|
347
|
+
try {
|
|
348
|
+
// First, get existing result codes
|
|
349
|
+
const rv = new core_1.RunView();
|
|
350
|
+
const existingCodes = await rv.RunView({
|
|
351
|
+
EntityName: 'Action Result Codes',
|
|
352
|
+
ExtraFilter: `ActionID='${this.ID}'`,
|
|
353
|
+
ResultType: 'entity_object'
|
|
354
|
+
}, this.ContextCurrentUser);
|
|
355
|
+
if (!existingCodes.Success) {
|
|
356
|
+
throw new Error(`Failed to load existing result codes: ${existingCodes.ErrorMessage}`);
|
|
357
|
+
}
|
|
358
|
+
const existingCodesList = existingCodes.Results || [];
|
|
359
|
+
const generatedCodeNames = resultCodes.map(rc => rc.ResultCode.toLowerCase());
|
|
360
|
+
// Find result codes to add, update, or remove
|
|
361
|
+
const codesToAdd = resultCodes.filter(rc => !existingCodesList.some(ec => ec.ResultCode.toLowerCase() === rc.ResultCode.toLowerCase()));
|
|
362
|
+
const codesToUpdate = existingCodesList.filter(ec => resultCodes.some(rc => rc.ResultCode.toLowerCase() === ec.ResultCode.toLowerCase()));
|
|
363
|
+
const codesToRemove = existingCodesList.filter(ec => !generatedCodeNames.includes(ec.ResultCode.toLowerCase()));
|
|
364
|
+
// Add new result codes
|
|
365
|
+
for (const resultCode of codesToAdd) {
|
|
366
|
+
const newCode = await md.GetEntityObject('Action Result Codes', this.ContextCurrentUser);
|
|
367
|
+
newCode.ActionID = this.ID;
|
|
368
|
+
newCode.ResultCode = resultCode.ResultCode;
|
|
369
|
+
newCode.Description = resultCode.Description;
|
|
370
|
+
newCode.IsSuccess = resultCode.IsSuccess;
|
|
371
|
+
await newCode.Save();
|
|
372
|
+
}
|
|
373
|
+
// Update existing result codes if properties changed
|
|
374
|
+
for (const existingCode of codesToUpdate) {
|
|
375
|
+
const generatedCode = resultCodes.find(rc => rc.ResultCode.toLowerCase() === existingCode.ResultCode.toLowerCase());
|
|
376
|
+
if (generatedCode) {
|
|
377
|
+
let hasChanges = false;
|
|
378
|
+
// Check each property for changes
|
|
379
|
+
if (existingCode.Description !== generatedCode.Description) {
|
|
380
|
+
existingCode.Description = generatedCode.Description;
|
|
381
|
+
hasChanges = true;
|
|
382
|
+
}
|
|
383
|
+
if (existingCode.IsSuccess !== generatedCode.IsSuccess) {
|
|
384
|
+
existingCode.IsSuccess = generatedCode.IsSuccess;
|
|
385
|
+
hasChanges = true;
|
|
386
|
+
}
|
|
387
|
+
if (hasChanges) {
|
|
388
|
+
await existingCode.Save();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
// Remove result codes that are no longer in the generated list
|
|
393
|
+
for (const codeToRemove of codesToRemove) {
|
|
394
|
+
await codeToRemove.Delete();
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
catch (e) {
|
|
398
|
+
(0, core_1.LogError)('Failed to save generated result codes:', e);
|
|
399
|
+
throw e; // Re-throw since we're in a transaction
|
|
400
|
+
}
|
|
453
401
|
}
|
|
454
|
-
GenerateRunViewParamsInfo() {
|
|
455
|
-
return `/**
|
|
456
|
-
* Parameters for running either a stored or dynamic view.
|
|
457
|
-
* A stored view is a view that is saved in the database and can be run either by ID or Name.
|
|
458
|
-
* A dynamic view is one that is not stored in the database and you provide parameters to return data as
|
|
459
|
-
* desired programatically.
|
|
460
|
-
*/
|
|
461
|
-
export type RunViewParams = {
|
|
462
|
-
/**
|
|
463
|
-
* optional - ID of the UserView record to run, if provided, ViewName is ignored
|
|
464
|
-
*/
|
|
465
|
-
ViewID?: number
|
|
466
402
|
/**
|
|
467
|
-
*
|
|
468
|
-
* so that your view names are unique. For example use a prefix like __Entity_View_ etc so that you're
|
|
469
|
-
* likely to have a single result. If more than one view is available that matches a provided view name an
|
|
470
|
-
* exception will be thrown.
|
|
403
|
+
* Validates the generated code
|
|
471
404
|
*/
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
* If you provide ViewEntity, ViewID/ViewName are ignored.
|
|
478
|
-
*/
|
|
479
|
-
ViewEntity?: BaseEntity
|
|
480
|
-
/**
|
|
481
|
-
* optional - this is only used if ViewID/ViewName/ViewEntity are not provided, it is used for
|
|
482
|
-
* Dynamic Views in combination with the optional ExtraFilter
|
|
483
|
-
*/
|
|
484
|
-
EntityName?: string
|
|
485
|
-
/**
|
|
486
|
-
* An optional SQL WHERE clause that you can add to the existing filters on a stored view. For dynamic views, you can either
|
|
487
|
-
* run a view without a filter (if the entity definition allows it with AllowAllRowsAPI=1) or filter with any valid SQL WHERE clause.
|
|
488
|
-
*/
|
|
489
|
-
ExtraFilter?: string
|
|
490
|
-
/**
|
|
491
|
-
* An optional SQL ORDER BY clause that you can use for dynamic views, as well as to OVERRIDE the stored view's sorting order.
|
|
492
|
-
*/
|
|
493
|
-
OrderBy?: string
|
|
494
|
-
/**
|
|
495
|
-
* An optional array of field names that you want returned. The RunView() function will always return ID so you don't need to ask for that. If you leave this null then
|
|
496
|
-
* for a dynamic view all fields are returned, and for stored views, the fields stored in it view configuration are returned.
|
|
497
|
-
*/
|
|
498
|
-
Fields?: string[]
|
|
499
|
-
/**
|
|
500
|
-
* optional - string that represents a user "search" - typically from a text search option in a UI somewhere. This field is then used in the view filtering to search whichever fields are configured to be included in search in the Entity Fields definition.
|
|
501
|
-
* Search String is combined with the stored view filters as well as ExtraFilter with an AND.
|
|
502
|
-
*/
|
|
503
|
-
UserSearchString?: string
|
|
504
|
-
/**
|
|
505
|
-
* optional - if provided, records that were returned in the specified UserViewRunID will NOT be allowed in the result set.
|
|
506
|
-
* This is useful if you want to run a particular view over time and exclude a specific prior run's resulting data set. If you
|
|
507
|
-
* want to exclude ALL data returned from ALL prior runs, use the ExcludeDataFromAllPriorViewRuns property instead.
|
|
508
|
-
*/
|
|
509
|
-
ExcludeUserViewRunID?: number
|
|
510
|
-
/**
|
|
511
|
-
* optional - if set to true, the resulting data will filter out ANY records that were ever returned by this view, when the SaveViewResults property was set to true.
|
|
512
|
-
* This is useful if you want to run a particular view over time and make sure the results returned each time are new to the view.
|
|
513
|
-
*/
|
|
514
|
-
ExcludeDataFromAllPriorViewRuns?: boolean
|
|
515
|
-
/**
|
|
516
|
-
* optional - if you are providing the optional ExcludeUserViewRunID property, you can also optionally provide
|
|
517
|
-
* this filter which will negate the specific list of record IDs that are excluded by the ExcludeUserViewRunID property.
|
|
518
|
-
* This can be useful if you want to ensure a certain class of data is always allowed into your view and not filtered out
|
|
519
|
-
* by a prior view run.
|
|
520
|
-
*
|
|
521
|
-
*/
|
|
522
|
-
OverrideExcludeFilter?: string
|
|
523
|
-
/**
|
|
524
|
-
* optional - if set to true, the LIST OF ID values from the view run will be stored in the User View Runs entity and the
|
|
525
|
-
* newly created UserViewRun.ID value will be returned in the RunViewResult that the RunView() function sends back to ya.
|
|
526
|
-
*/
|
|
527
|
-
SaveViewResults?: boolean
|
|
528
|
-
/**
|
|
529
|
-
* optional - if set to true, if there IS any UserViewMaxRows property set for the entity in question, it will be IGNORED. This is useful in scenarios where you
|
|
530
|
-
* want to programmatically run a view and get ALL the data back, regardless of the MaxRows setting on the entity.
|
|
531
|
-
*/
|
|
532
|
-
IgnoreMaxRows?: boolean
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* optional - if provided, and if IgnoreMaxRows = false, this value will be used to constrain the total # of rows returned by the view. If this is not provided, either the default settings at the entity-level will be used, or if the entity has no UserViewMaxRows setting, all rows will be returned that match any filter, if provided.
|
|
536
|
-
*/
|
|
537
|
-
MaxRows?: number
|
|
538
|
-
/**
|
|
539
|
-
* optional - if set to true, the view run will ALWAYS be logged to the Audit Log, regardless of the entity's property settings for logging view runs.
|
|
540
|
-
*/
|
|
541
|
-
ForceAuditLog?: boolean
|
|
542
|
-
/**
|
|
543
|
-
* optional - if provided and either ForceAuditLog is set, or the entity's property settings for logging view runs are set to true, this will be used as the Audit Log Description.
|
|
544
|
-
*/
|
|
545
|
-
AuditLogDescription?: string
|
|
546
|
-
|
|
405
|
+
async ValidateGeneratedCode(generatedCode, attemptsRemaining) {
|
|
406
|
+
// For now, return the code as-is
|
|
407
|
+
// TODO: Implement validation logic using a separate prompt
|
|
408
|
+
return generatedCode;
|
|
409
|
+
}
|
|
547
410
|
/**
|
|
548
|
-
*
|
|
549
|
-
* BaseEntity-derived objects instead of simple objects. This is useful if you want to work with the data in a more strongly typed manner and/or
|
|
550
|
-
* if you plan to do any update/delete operations on the data after it is returned. The 'count_only' option will return no rows, but the TotalRowCount property of the RunViewResult object will be populated.
|
|
411
|
+
* Generates the libraries context for the prompt
|
|
551
412
|
*/
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
413
|
+
GenerateLibrariesContext() {
|
|
414
|
+
return doc_utils_1.DocumentationEngine.Instance.Libraries.map((library) => {
|
|
415
|
+
return library.Items.map((item) => {
|
|
416
|
+
return JSON.stringify({
|
|
417
|
+
LibraryName: library.Name,
|
|
418
|
+
ItemName: item.Name,
|
|
419
|
+
Content: item.HTMLContent
|
|
420
|
+
});
|
|
421
|
+
}).join('\n');
|
|
422
|
+
}).join('\n');
|
|
555
423
|
}
|
|
556
424
|
};
|
|
557
425
|
exports.ActionEntityServerEntity = ActionEntityServerEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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
"description": "Main library for MemberJunction Actions. This library is only intended to be imported on the server side.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"typescript": "^5.4.5"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@memberjunction/global": "2.
|
|
23
|
-
"@memberjunction/core": "2.
|
|
24
|
-
"@memberjunction/actions-base": "2.
|
|
25
|
-
"@memberjunction/core-entities": "2.
|
|
26
|
-
"@memberjunction/ai": "2.
|
|
27
|
-
"@memberjunction/aiengine": "2.
|
|
28
|
-
"@memberjunction/
|
|
22
|
+
"@memberjunction/global": "2.54.0",
|
|
23
|
+
"@memberjunction/core": "2.54.0",
|
|
24
|
+
"@memberjunction/actions-base": "2.54.0",
|
|
25
|
+
"@memberjunction/core-entities": "2.54.0",
|
|
26
|
+
"@memberjunction/ai": "2.54.0",
|
|
27
|
+
"@memberjunction/aiengine": "2.54.0",
|
|
28
|
+
"@memberjunction/ai-prompts": "2.54.0",
|
|
29
|
+
"@memberjunction/doc-utils": "2.54.0"
|
|
29
30
|
}
|
|
30
31
|
}
|