@memberjunction/core-actions 6.2.0-edge.2 → 6.2.0-edge.4
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/README.md +3 -1
- package/dist/custom/ai/execute-agent.action.d.ts +10 -0
- package/dist/custom/ai/execute-agent.action.d.ts.map +1 -1
- package/dist/custom/ai/execute-agent.action.js +24 -1
- package/dist/custom/ai/execute-agent.action.js.map +1 -1
- package/dist/custom/ai/execute-ai-prompt.action.d.ts.map +1 -1
- package/dist/custom/ai/execute-ai-prompt.action.js +3 -0
- package/dist/custom/ai/execute-ai-prompt.action.js.map +1 -1
- package/dist/custom/ai/generate-image.action.d.ts +5 -2
- package/dist/custom/ai/generate-image.action.d.ts.map +1 -1
- package/dist/custom/ai/generate-image.action.js +18 -8
- package/dist/custom/ai/generate-image.action.js.map +1 -1
- package/dist/custom/ai/summarize-content.action.d.ts.map +1 -1
- package/dist/custom/ai/summarize-content.action.js +3 -0
- package/dist/custom/ai/summarize-content.action.js.map +1 -1
- package/dist/custom/data/get-entity-details.action.js +2 -2
- package/dist/custom/data/get-entity-details.action.js.map +1 -1
- package/dist/custom/data/run-adhoc-query.action.d.ts +29 -30
- package/dist/custom/data/run-adhoc-query.action.d.ts.map +1 -1
- package/dist/custom/data/run-adhoc-query.action.js +140 -102
- package/dist/custom/data/run-adhoc-query.action.js.map +1 -1
- package/dist/custom/demo/calculate-expression.action.d.ts +2 -6
- package/dist/custom/demo/calculate-expression.action.d.ts.map +1 -1
- package/dist/custom/demo/calculate-expression.action.js +5 -113
- package/dist/custom/demo/calculate-expression.action.js.map +1 -1
- package/dist/custom/interactive-forms/_shared.d.ts +113 -31
- package/dist/custom/interactive-forms/_shared.d.ts.map +1 -1
- package/dist/custom/interactive-forms/_shared.js +198 -74
- package/dist/custom/interactive-forms/_shared.js.map +1 -1
- package/dist/custom/interactive-forms/activate-form-contribution-version.action.d.ts +25 -0
- package/dist/custom/interactive-forms/activate-form-contribution-version.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/activate-form-contribution-version.action.js +153 -0
- package/dist/custom/interactive-forms/activate-form-contribution-version.action.js.map +1 -0
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.d.ts +25 -7
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.js +116 -58
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.js.map +1 -1
- package/dist/custom/interactive-forms/create-form-contribution.action.d.ts +37 -0
- package/dist/custom/interactive-forms/create-form-contribution.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/create-form-contribution.action.js +151 -0
- package/dist/custom/interactive-forms/create-form-contribution.action.js.map +1 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.d.ts +2 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/create-interactive-form.action.js +2 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.js.map +1 -1
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.d.ts +5 -0
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.js +7 -1
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.js.map +1 -1
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.d.ts +2 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.js +2 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.js.map +1 -1
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.d.ts +2 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.js +2 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.js.map +1 -1
- package/dist/custom/interactive-forms/get-form-composition-for-entity.action.d.ts +61 -0
- package/dist/custom/interactive-forms/get-form-composition-for-entity.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/get-form-composition-for-entity.action.js +315 -0
- package/dist/custom/interactive-forms/get-form-composition-for-entity.action.js.map +1 -0
- package/dist/custom/interactive-forms/get-form-contributions-for-entity.action.d.ts +49 -0
- package/dist/custom/interactive-forms/get-form-contributions-for-entity.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/get-form-contributions-for-entity.action.js +117 -0
- package/dist/custom/interactive-forms/get-form-contributions-for-entity.action.js.map +1 -0
- package/dist/custom/interactive-forms/index.d.ts +5 -0
- package/dist/custom/interactive-forms/index.d.ts.map +1 -1
- package/dist/custom/interactive-forms/index.js +5 -0
- package/dist/custom/interactive-forms/index.js.map +1 -1
- package/dist/custom/interactive-forms/modify-form-contribution.action.d.ts +38 -0
- package/dist/custom/interactive-forms/modify-form-contribution.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/modify-form-contribution.action.js +183 -0
- package/dist/custom/interactive-forms/modify-form-contribution.action.js.map +1 -0
- package/dist/custom/interactive-forms/modify-interactive-form.action.d.ts +15 -11
- package/dist/custom/interactive-forms/modify-interactive-form.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/modify-interactive-form.action.js +67 -64
- package/dist/custom/interactive-forms/modify-interactive-form.action.js.map +1 -1
- package/dist/custom/interactive-forms/revert-interactive-form.action.d.ts +14 -0
- package/dist/custom/interactive-forms/revert-interactive-form.action.d.ts.map +1 -1
- package/dist/custom/interactive-forms/revert-interactive-form.action.js +31 -4
- package/dist/custom/interactive-forms/revert-interactive-form.action.js.map +1 -1
- package/dist/custom/utilities/safe-math-evaluator.d.ts +27 -0
- package/dist/custom/utilities/safe-math-evaluator.d.ts.map +1 -0
- package/dist/custom/utilities/safe-math-evaluator.js +104 -0
- package/dist/custom/utilities/safe-math-evaluator.js.map +1 -0
- package/dist/custom/visualization/create-mermaid-diagram.action.d.ts +18 -3
- package/dist/custom/visualization/create-mermaid-diagram.action.d.ts.map +1 -1
- package/dist/custom/visualization/create-mermaid-diagram.action.js +71 -33
- package/dist/custom/visualization/create-mermaid-diagram.action.js.map +1 -1
- package/dist/custom/visualization/shared/mermaid-renderer.d.ts +65 -0
- package/dist/custom/visualization/shared/mermaid-renderer.d.ts.map +1 -0
- package/dist/custom/visualization/shared/mermaid-renderer.js +310 -0
- package/dist/custom/visualization/shared/mermaid-renderer.js.map +1 -0
- package/dist/custom/workflow/conditional.action.d.ts +1 -18
- package/dist/custom/workflow/conditional.action.d.ts.map +1 -1
- package/dist/custom/workflow/conditional.action.js +12 -83
- package/dist/custom/workflow/conditional.action.js.map +1 -1
- package/package.json +44 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revert-interactive-form.action.js","sourceRoot":"","sources":["../../../src/custom/interactive-forms/revert-interactive-form.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACH,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"revert-interactive-form.action.js","sourceRoot":"","sources":["../../../src/custom/interactive-forms/revert-interactive-form.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACH,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,GAC5H,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;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AC;QAChD,CAAC;IACL,CAAC;;AA9HQ,2BAA2B;IADvC,aAAa,CAAC,UAAU,EAAE,yBAAyB,CAAC;GACxC,2BAA2B,CA+HvC;;AAED,0BAA0B;AAC1B,MAAM,UAAU,+BAA+B;IAC3C,IAAI,KAAgB,EAAE,CAAC;QACnB,MAAM,CAAC,GAAY,2BAA2B,CAAC;IACnD,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluates arithmetic text without running it as JavaScript.
|
|
3
|
+
*
|
|
4
|
+
* The text is parsed by mathjs and every node of the parse tree is checked against an allowlist:
|
|
5
|
+
* numeric literals, parentheses, the operators `+ - * / ^ %`, the constants in
|
|
6
|
+
* {@link ALLOWED_CONSTANTS} and calls to the functions in {@link ALLOWED_FUNCTIONS}. Property
|
|
7
|
+
* access, assignment, strings, arrays, objects, ranges and calls to any other function are refused
|
|
8
|
+
* before anything is evaluated.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SafeMathEvaluator {
|
|
11
|
+
/**
|
|
12
|
+
* Evaluates an arithmetic expression to a number. Accepts `**` for `^` and a `Math.` prefix on
|
|
13
|
+
* function and constant names.
|
|
14
|
+
* @param expression the arithmetic expression
|
|
15
|
+
* @returns the result
|
|
16
|
+
* @throws Error when the expression is too long, does not parse, uses a construct that is not
|
|
17
|
+
* allowed, or does not evaluate to a number
|
|
18
|
+
*/
|
|
19
|
+
Evaluate(expression: string): number;
|
|
20
|
+
/** Maps the JavaScript spellings the action has always accepted onto mathjs syntax. */
|
|
21
|
+
private normalize;
|
|
22
|
+
/** The first node in the tree that is not allowed, described, or null when every node is allowed. */
|
|
23
|
+
private findRefusal;
|
|
24
|
+
/** Why a single node is not allowed, or null when it is. */
|
|
25
|
+
private describeRefusal;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=safe-math-evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-math-evaluator.d.ts","sourceRoot":"","sources":["../../../src/custom/utilities/safe-math-evaluator.ts"],"names":[],"mappings":"AAuFA;;;;;;;;GAQG;AACH,qBAAa,iBAAiB;IAC1B;;;;;;;OAOG;IACI,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAiB3C,uFAAuF;IACvF,OAAO,CAAC,SAAS;IAIjB,qGAAqG;IACrG,OAAO,CAAC,WAAW;IAQnB,4DAA4D;IAC5D,OAAO,CAAC,eAAe;CAmB1B"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { create, parseDependencies, addDependencies, subtractDependencies, multiplyDependencies, divideDependencies, powDependencies, modDependencies, unaryMinusDependencies, unaryPlusDependencies, absDependencies, acosDependencies, asinDependencies, atanDependencies, atan2Dependencies, cbrtDependencies, ceilDependencies, cosDependencies, coshDependencies, expDependencies, fixDependencies, floorDependencies, logDependencies, log10Dependencies, log2Dependencies, maxDependencies, minDependencies, randomDependencies, roundDependencies, signDependencies, sinDependencies, sinhDependencies, sqrtDependencies, tanDependencies, tanhDependencies, eDependencies, piDependencies, isConstantNode, isFunctionNode, isOperatorNode, isParenthesisNode, isSymbolNode, } from 'mathjs/number';
|
|
2
|
+
/** Longest expression accepted, in characters. */
|
|
3
|
+
const MAX_EXPRESSION_LENGTH = 1000;
|
|
4
|
+
/** The mathjs function names behind the operators an expression may use: `+ - * / ^ %` and unary `-`/`+`. */
|
|
5
|
+
const ALLOWED_OPERATORS = new Set([
|
|
6
|
+
'add', 'subtract', 'multiply', 'divide', 'pow', 'mod', 'unaryMinus', 'unaryPlus',
|
|
7
|
+
]);
|
|
8
|
+
/** Constants an expression may name. `PI` and `E` are supplied in the evaluation scope. */
|
|
9
|
+
const ALLOWED_CONSTANTS = new Set(['pi', 'PI', 'e', 'E']);
|
|
10
|
+
/** Functions an expression may call. `trunc` is supplied in the evaluation scope. */
|
|
11
|
+
const ALLOWED_FUNCTIONS = new Set([
|
|
12
|
+
'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', 'exp', 'fix', 'floor',
|
|
13
|
+
'log', 'log10', 'log2', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt',
|
|
14
|
+
'tan', 'tanh', 'trunc',
|
|
15
|
+
]);
|
|
16
|
+
/**
|
|
17
|
+
* A number-only mathjs instance holding the parser, the operators and the allowed functions and
|
|
18
|
+
* constants, and nothing else.
|
|
19
|
+
*/
|
|
20
|
+
const math = create({
|
|
21
|
+
parseDependencies,
|
|
22
|
+
addDependencies, subtractDependencies, multiplyDependencies, divideDependencies, powDependencies,
|
|
23
|
+
modDependencies, unaryMinusDependencies, unaryPlusDependencies,
|
|
24
|
+
absDependencies, acosDependencies, asinDependencies, atanDependencies, atan2Dependencies,
|
|
25
|
+
cbrtDependencies, ceilDependencies, cosDependencies, coshDependencies, expDependencies,
|
|
26
|
+
fixDependencies, floorDependencies, logDependencies, log10Dependencies, log2Dependencies,
|
|
27
|
+
maxDependencies, minDependencies, randomDependencies, roundDependencies, signDependencies,
|
|
28
|
+
sinDependencies, sinhDependencies, sqrtDependencies, tanDependencies, tanhDependencies,
|
|
29
|
+
eDependencies, piDependencies,
|
|
30
|
+
});
|
|
31
|
+
/** Names the action has always accepted that the mathjs instance spells differently. */
|
|
32
|
+
const SCOPE_ENTRIES = [
|
|
33
|
+
['trunc', Math.trunc],
|
|
34
|
+
['PI', Math.PI],
|
|
35
|
+
['E', Math.E],
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Evaluates arithmetic text without running it as JavaScript.
|
|
39
|
+
*
|
|
40
|
+
* The text is parsed by mathjs and every node of the parse tree is checked against an allowlist:
|
|
41
|
+
* numeric literals, parentheses, the operators `+ - * / ^ %`, the constants in
|
|
42
|
+
* {@link ALLOWED_CONSTANTS} and calls to the functions in {@link ALLOWED_FUNCTIONS}. Property
|
|
43
|
+
* access, assignment, strings, arrays, objects, ranges and calls to any other function are refused
|
|
44
|
+
* before anything is evaluated.
|
|
45
|
+
*/
|
|
46
|
+
export class SafeMathEvaluator {
|
|
47
|
+
/**
|
|
48
|
+
* Evaluates an arithmetic expression to a number. Accepts `**` for `^` and a `Math.` prefix on
|
|
49
|
+
* function and constant names.
|
|
50
|
+
* @param expression the arithmetic expression
|
|
51
|
+
* @returns the result
|
|
52
|
+
* @throws Error when the expression is too long, does not parse, uses a construct that is not
|
|
53
|
+
* allowed, or does not evaluate to a number
|
|
54
|
+
*/
|
|
55
|
+
Evaluate(expression) {
|
|
56
|
+
const text = this.normalize(expression);
|
|
57
|
+
if (text.length > MAX_EXPRESSION_LENGTH) {
|
|
58
|
+
throw new Error(`Expression exceeds the maximum length of ${MAX_EXPRESSION_LENGTH} characters`);
|
|
59
|
+
}
|
|
60
|
+
const root = math.parse(text);
|
|
61
|
+
const refusal = this.findRefusal(root);
|
|
62
|
+
if (refusal) {
|
|
63
|
+
throw new Error(`Expression contains a construct that is not allowed: ${refusal}`);
|
|
64
|
+
}
|
|
65
|
+
const value = root.evaluate(new Map(SCOPE_ENTRIES));
|
|
66
|
+
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
67
|
+
throw new Error('Expression did not evaluate to a valid number');
|
|
68
|
+
}
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
/** Maps the JavaScript spellings the action has always accepted onto mathjs syntax. */
|
|
72
|
+
normalize(expression) {
|
|
73
|
+
return expression.trim().replace(/\*\*/g, '^').replace(/\bMath\./g, '');
|
|
74
|
+
}
|
|
75
|
+
/** The first node in the tree that is not allowed, described, or null when every node is allowed. */
|
|
76
|
+
findRefusal(root) {
|
|
77
|
+
let refusal = null;
|
|
78
|
+
root.traverse((node, path, parent) => {
|
|
79
|
+
refusal ??= this.describeRefusal(node, path, parent);
|
|
80
|
+
});
|
|
81
|
+
return refusal;
|
|
82
|
+
}
|
|
83
|
+
/** Why a single node is not allowed, or null when it is. */
|
|
84
|
+
describeRefusal(node, path, parent) {
|
|
85
|
+
if (isConstantNode(node)) {
|
|
86
|
+
return typeof node.value === 'number' ? null : 'only numbers are allowed as values';
|
|
87
|
+
}
|
|
88
|
+
if (isParenthesisNode(node)) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
if (isOperatorNode(node)) {
|
|
92
|
+
return ALLOWED_OPERATORS.has(node.fn) ? null : `the operator "${node.op}"`;
|
|
93
|
+
}
|
|
94
|
+
if (isFunctionNode(node)) {
|
|
95
|
+
return isSymbolNode(node.fn) && ALLOWED_FUNCTIONS.has(node.fn.name) ? null : 'only the listed math functions can be called';
|
|
96
|
+
}
|
|
97
|
+
if (isSymbolNode(node)) {
|
|
98
|
+
const isCalledName = path === 'fn' && parent !== null && isFunctionNode(parent);
|
|
99
|
+
return isCalledName || ALLOWED_CONSTANTS.has(node.name) ? null : `the name "${node.name}"`;
|
|
100
|
+
}
|
|
101
|
+
return node.type;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=safe-math-evaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-math-evaluator.js","sourceRoot":"","sources":["../../../src/custom/utilities/safe-math-evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EAC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AY,GAAG,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;YAChF,OAAO,YAAY,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,IAAI,GAAG,CAAC;QAC/F,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -6,9 +6,15 @@ import { BaseAction } from "@memberjunction/actions";
|
|
|
6
6
|
* Gantt charts, and more.
|
|
7
7
|
*
|
|
8
8
|
* Mermaid is a text-based diagram generation tool that converts markdown-like
|
|
9
|
-
* syntax into rich visual diagrams. This action
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* syntax into rich visual diagrams. This action renders diagrams server-side as
|
|
10
|
+
* static SVG (no script), suitable for embedding in reports, artifacts, and
|
|
11
|
+
* AI-generated content.
|
|
12
|
+
*
|
|
13
|
+
* Rendering runs in headless Chromium via {@link MermaidRenderer}, because Mermaid
|
|
14
|
+
* measures rendered text to lay diagrams out and cannot run in plain Node. Hosts
|
|
15
|
+
* that use this action need a Chromium build for the `playwright` dependency
|
|
16
|
+
* (`npx playwright install chromium`); without one the action fails with `BROWSER_UNAVAILABLE` rather
|
|
17
|
+
* than producing a broken diagram.
|
|
12
18
|
*
|
|
13
19
|
* @example
|
|
14
20
|
* ```typescript
|
|
@@ -68,6 +74,15 @@ export declare class CreateMermaidDiagramAction extends BaseAction {
|
|
|
68
74
|
/**
|
|
69
75
|
* Helper to get parameter value by name (case-insensitive)
|
|
70
76
|
*/
|
|
77
|
+
/**
|
|
78
|
+
* Whether an HTML tag in the code carries an event handler (`<img onerror=...>`). Each tag is read from
|
|
79
|
+
* `<name` to its closing `>`, skipping quoted attribute VALUES (a quote right after `=`), so a `<` or `>`
|
|
80
|
+
* inside a value cannot end it early and hide a handler after it. Any other quote is ordinary text: in
|
|
81
|
+
* Mermaid, label quotes (`A["x<y"] --> B["online = true"]`) are not tag syntax. Text that doesn't start a tag (labels like `online = true`,
|
|
82
|
+
* class-diagram arrows like `<|--`) is not checked. One pass, never revisiting a character: a regex such
|
|
83
|
+
* as /<[^>]*on\w+=/ backtracks quadratically on a run of `<`, and this runs on the server's main thread.
|
|
84
|
+
*/
|
|
85
|
+
private hasTagEventHandler;
|
|
71
86
|
private getParamValue;
|
|
72
87
|
/**
|
|
73
88
|
* Helper to get string parameter with optional default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-mermaid-diagram.action.d.ts","sourceRoot":"","sources":["../../../src/custom/visualization/create-mermaid-diagram.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD
|
|
1
|
+
{"version":3,"file":"create-mermaid-diagram.action.d.ts","sourceRoot":"","sources":["../../../src/custom/visualization/create-mermaid-diagram.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,qBACa,0BAA2B,SAAQ,UAAU;IAEtD;;;;;;;;;;;;OAYG;cACa,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgFvF;;OAEG;IACH;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,aAAa;IAYrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,SAAS;CAsBpB"}
|
|
@@ -6,17 +6,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { BaseAction } from "@memberjunction/actions";
|
|
8
8
|
import { RegisterClass } from "@memberjunction/global";
|
|
9
|
-
import mermaid from 'mermaid';
|
|
10
9
|
import { SVGUtils } from './shared/svg-utils.js';
|
|
10
|
+
import { MermaidRenderer } from './shared/mermaid-renderer.js';
|
|
11
11
|
/**
|
|
12
12
|
* Action that generates SVG diagrams from Mermaid text syntax.
|
|
13
13
|
* Supports flowcharts, sequence diagrams, ER diagrams, class diagrams, state machines,
|
|
14
14
|
* Gantt charts, and more.
|
|
15
15
|
*
|
|
16
16
|
* Mermaid is a text-based diagram generation tool that converts markdown-like
|
|
17
|
-
* syntax into rich visual diagrams. This action
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* syntax into rich visual diagrams. This action renders diagrams server-side as
|
|
18
|
+
* static SVG (no script), suitable for embedding in reports, artifacts, and
|
|
19
|
+
* AI-generated content.
|
|
20
|
+
*
|
|
21
|
+
* Rendering runs in headless Chromium via {@link MermaidRenderer}, because Mermaid
|
|
22
|
+
* measures rendered text to lay diagrams out and cannot run in plain Node. Hosts
|
|
23
|
+
* that use this action need a Chromium build for the `playwright` dependency
|
|
24
|
+
* (`npx playwright install chromium`); without one the action fails with `BROWSER_UNAVAILABLE` rather
|
|
25
|
+
* than producing a broken diagram.
|
|
20
26
|
*
|
|
21
27
|
* @example
|
|
22
28
|
* ```typescript
|
|
@@ -74,8 +80,9 @@ let CreateMermaidDiagramAction = class CreateMermaidDiagramAction extends BaseAc
|
|
|
74
80
|
*/
|
|
75
81
|
async InternalRunAction(params) {
|
|
76
82
|
try {
|
|
77
|
-
// Extract required Code parameter
|
|
78
|
-
|
|
83
|
+
// Extract required Code parameter. Default to '' so a missing Code reaches the
|
|
84
|
+
// MISSING_PARAMETERS check below instead of throwing into DIAGRAM_GENERATION_FAILED.
|
|
85
|
+
const code = this.getStringParam(params, 'Code', '');
|
|
79
86
|
if (!code) {
|
|
80
87
|
return {
|
|
81
88
|
Success: false,
|
|
@@ -108,37 +115,30 @@ let CreateMermaidDiagramAction = class CreateMermaidDiagramAction extends BaseAc
|
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
// Check for suspicious patterns (basic XSS prevention)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
if (/<script/i.test(code) || /javascript:/i.test(code) || this.hasTagEventHandler(code)) {
|
|
119
|
+
return {
|
|
120
|
+
Success: false,
|
|
121
|
+
Message: 'Invalid Mermaid code: contains suspicious content',
|
|
122
|
+
ResultCode: 'INVALID_CODE'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const rendered = await MermaidRenderer.Instance.Render(code, theme, config);
|
|
126
|
+
if (rendered.Success === false) {
|
|
127
|
+
// Every agent that holds this action needs the fallback, not just the ones whose prompt spells it out.
|
|
128
|
+
const fallback = rendered.ErrorCode === 'BROWSER_UNAVAILABLE'
|
|
129
|
+
? ' Retrying will not help; build the diagram with Create SVG Diagram instead.'
|
|
130
|
+
: '';
|
|
131
|
+
return {
|
|
132
|
+
Success: false,
|
|
133
|
+
ResultCode: rendered.ErrorCode === 'RENDER_FAILED' ? 'DIAGRAM_GENERATION_FAILED' : rendered.ErrorCode,
|
|
134
|
+
Message: `Failed to generate Mermaid diagram: ${rendered.Message}${fallback}`
|
|
135
|
+
};
|
|
124
136
|
}
|
|
125
|
-
//
|
|
126
|
-
mermaid.initialize({
|
|
127
|
-
theme,
|
|
128
|
-
startOnLoad: false, // Headless mode for server-side rendering
|
|
129
|
-
securityLevel: 'strict', // Enforce strict security
|
|
130
|
-
...config
|
|
131
|
-
});
|
|
132
|
-
// Generate unique ID for this render
|
|
133
|
-
const renderId = `mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
134
|
-
// Render diagram to SVG
|
|
135
|
-
const { svg } = await mermaid.render(renderId, code);
|
|
136
|
-
// Sanitize SVG (XSS prevention)
|
|
137
|
-
const sanitizedSvg = SVGUtils.sanitizeSVG(svg);
|
|
137
|
+
// Sanitize SVG (XSS prevention) — the source is model output, so never trust the markup.
|
|
138
138
|
return {
|
|
139
139
|
Success: true,
|
|
140
140
|
ResultCode: "SUCCESS",
|
|
141
|
-
Message:
|
|
141
|
+
Message: SVGUtils.SanitizeSVG(rendered.Svg)
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
catch (error) {
|
|
@@ -153,6 +153,44 @@ let CreateMermaidDiagramAction = class CreateMermaidDiagramAction extends BaseAc
|
|
|
153
153
|
/**
|
|
154
154
|
* Helper to get parameter value by name (case-insensitive)
|
|
155
155
|
*/
|
|
156
|
+
/**
|
|
157
|
+
* Whether an HTML tag in the code carries an event handler (`<img onerror=...>`). Each tag is read from
|
|
158
|
+
* `<name` to its closing `>`, skipping quoted attribute VALUES (a quote right after `=`), so a `<` or `>`
|
|
159
|
+
* inside a value cannot end it early and hide a handler after it. Any other quote is ordinary text: in
|
|
160
|
+
* Mermaid, label quotes (`A["x<y"] --> B["online = true"]`) are not tag syntax. Text that doesn't start a tag (labels like `online = true`,
|
|
161
|
+
* class-diagram arrows like `<|--`) is not checked. One pass, never revisiting a character: a regex such
|
|
162
|
+
* as /<[^>]*on\w+=/ backtracks quadratically on a run of `<`, and this runs on the server's main thread.
|
|
163
|
+
*/
|
|
164
|
+
hasTagEventHandler(code) {
|
|
165
|
+
let index = code.indexOf('<');
|
|
166
|
+
while (index !== -1) {
|
|
167
|
+
if (!/[a-z/]/i.test(code[index + 1] ?? '')) {
|
|
168
|
+
index = code.indexOf('<', index + 1);
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
let end = index + 1;
|
|
172
|
+
while (end < code.length && code[end] !== '>') {
|
|
173
|
+
if (code[end] === '=') {
|
|
174
|
+
end++;
|
|
175
|
+
while (code[end] === ' ' || code[end] === '\t')
|
|
176
|
+
end++;
|
|
177
|
+
const quote = code[end];
|
|
178
|
+
if (quote === '"' || quote === "'") {
|
|
179
|
+
const close = code.indexOf(quote, end + 1);
|
|
180
|
+
end = close === -1 ? code.length : close + 1;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
end++;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (/\bon\w+\s*=/i.test(code.slice(index, end))) {
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
index = code.indexOf('<', end);
|
|
191
|
+
}
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
156
194
|
getParamValue(params, paramName) {
|
|
157
195
|
const param = params.Params.find(p => p.Name.trim().toLowerCase() === paramName.toLowerCase());
|
|
158
196
|
if (param?.Value && typeof param.Value === 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-mermaid-diagram.action.js","sourceRoot":"","sources":["../../../src/custom/visualization/create-mermaid-diagram.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"create-mermaid-diagram.action.js","sourceRoot":"","sources":["../../../src/custom/visualization/create-mermaid-diagram.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,UAAU;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KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAM,CAAC;YAClC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CACX,cAAc,SAAS,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC9G,CAAC;YACN,CAAC;QACL,CAAC;QAED,yBAAyB;QACzB,MAAM,IAAI,KAAK,CACX,cAAc,SAAS,+CAA+C,OAAO,KAAK,GAAG,CACxF,CAAC;IACN,CAAC;CACJ,CAAA;AAxLY,0BAA0B;IADtC,aAAa,CAAC,UAAU,EAAE,wBAAwB,CAAC;GACvC,0BAA0B,CAwLtC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BaseSingleton, IShutdownable } from '@memberjunction/global';
|
|
2
|
+
import { MermaidConfig, MermaidTheme } from './mermaid-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Why a render did not produce an SVG. `RENDER_FAILED` means Mermaid rejected the source, so fixing
|
|
5
|
+
* it can help. `BROWSER_UNAVAILABLE` means the browser failed, not the diagram, so retrying won't.
|
|
6
|
+
*/
|
|
7
|
+
export type MermaidRenderErrorCode = 'BROWSER_UNAVAILABLE' | 'RENDER_FAILED' | 'TIMEOUT';
|
|
8
|
+
export type MermaidRenderResult = {
|
|
9
|
+
Success: true;
|
|
10
|
+
Svg: string;
|
|
11
|
+
} | {
|
|
12
|
+
Success: false;
|
|
13
|
+
ErrorCode: MermaidRenderErrorCode;
|
|
14
|
+
Message: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Process-wide renderer. The browser is launched lazily on first use and shared. Renders run on a
|
|
18
|
+
* pool of at most {@link MAX_PAGES} warm pages, each with Mermaid loaded and no network access, so
|
|
19
|
+
* the 3 MB bundle is parsed once per page rather than once per render. A page that crashed or timed
|
|
20
|
+
* out is closed, never reused. Registered with {@link ShutdownRegistry} so the Chromium child
|
|
21
|
+
* process goes away with the host.
|
|
22
|
+
*/
|
|
23
|
+
export declare class MermaidRenderer extends BaseSingleton<MermaidRenderer> implements IShutdownable {
|
|
24
|
+
readonly ShutdownName = "MermaidRenderer";
|
|
25
|
+
private browserPromise;
|
|
26
|
+
private bundlePath;
|
|
27
|
+
/** Warm pages, each tagged with the browser it belongs to so a relaunch never reuses a dead one. */
|
|
28
|
+
private idlePages;
|
|
29
|
+
private busyPages;
|
|
30
|
+
private slotWaiters;
|
|
31
|
+
protected constructor();
|
|
32
|
+
static get Instance(): MermaidRenderer;
|
|
33
|
+
/**
|
|
34
|
+
* Renders Mermaid source to an SVG string. Never throws: every failure comes back as a
|
|
35
|
+
* result with an error code, so a caller (an agent) can decide what to do instead.
|
|
36
|
+
*/
|
|
37
|
+
Render(code: string, theme: MermaidTheme, config: MermaidConfig): Promise<MermaidRenderResult>;
|
|
38
|
+
/**
|
|
39
|
+
* The config a render actually runs with: only the caller options {@link ALLOWED_CONFIG_SECTIONS} allows,
|
|
40
|
+
* then the theme, strict security and plain-text labels, which no caller can override. Plain-text labels
|
|
41
|
+
* (`htmlLabels: false`) put label text in `<text>` instead of `<foreignObject>`, which MJ's markdown SVG
|
|
42
|
+
* sanitizer strips, so a diagram embedded in chat would otherwise lose every label.
|
|
43
|
+
*/
|
|
44
|
+
static EffectiveConfig(config: MermaidConfig, theme: MermaidTheme): Record<string, unknown>;
|
|
45
|
+
/** Closes the shared browser, if one was launched. Its pages, idle ones included, close with it. */
|
|
46
|
+
Shutdown(): Promise<void>;
|
|
47
|
+
private getBrowser;
|
|
48
|
+
private launchBrowser;
|
|
49
|
+
/** Waits for one of the {@link MAX_PAGES} render slots. */
|
|
50
|
+
private acquireSlot;
|
|
51
|
+
private releaseSlot;
|
|
52
|
+
/** A warm page from this browser, if one is idle. */
|
|
53
|
+
private takeIdlePage;
|
|
54
|
+
/** Returns a healthy page to the pool, or closes one that crashed or timed out. Always frees the slot. */
|
|
55
|
+
private checkInPage;
|
|
56
|
+
private renderOnPage;
|
|
57
|
+
/** The diagram source is model output and the page needs nothing from outside, so its context gets nothing. */
|
|
58
|
+
private lockDown;
|
|
59
|
+
private withTimeout;
|
|
60
|
+
private getBundlePath;
|
|
61
|
+
private classifyFailure;
|
|
62
|
+
private closeQuietly;
|
|
63
|
+
private describe;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=mermaid-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-renderer.d.ts","sourceRoot":"","sources":["../../../../src/custom/visualization/shared/mermaid-renderer.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAoB,MAAM,wBAAwB,CAAC;AAExF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG,eAAe,GAAG,SAAS,CAAC;AAEzF,MAAM,MAAM,mBAAmB,GACzB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,sBAAsB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoE7E;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,aAAa,CAAC,eAAe,CAAE,YAAW,aAAa;IACxF,SAAgB,YAAY,qBAAqB;IAEjD,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,UAAU,CAAuB;IACzC,oGAAoG;IACpG,OAAO,CAAC,SAAS,CAA+C;IAChE,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAyB;IAE5C,SAAS;IAKT,WAAkB,QAAQ,IAAI,eAAe,CAE5C;IAED;;;OAGG;I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