@uipath/maestro-builder-sdk 6.85.0 → 6.85.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-index.md +3 -3
- package/dist/core/refusals.d.ts +2 -0
- package/dist/core/refusals.js +2 -0
- package/dist/core-definitions.json +857 -203
- package/dist/nodes/ai-patterns/flow/family.js +3 -3
- package/dist/nodes/ai-patterns/flow/node-type.d.ts +8 -0
- package/dist/nodes/ai-patterns/flow/node-type.js +23 -0
- package/dist/nodes/document/flow/factories.d.ts +5 -2
- package/dist/nodes/document/flow/factories.js +5 -2
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aiPatternNodeTypes } from './node-type.js';
|
|
1
|
+
import { AI_PATTERN_DIAGNOSTICS, aiPatternNodeTypes } from './node-type.js';
|
|
2
2
|
export const aiPatternsFlowFamily = {
|
|
3
3
|
id: 'ai-patterns',
|
|
4
4
|
title: 'AI patterns',
|
|
5
5
|
types: aiPatternNodeTypes,
|
|
6
|
-
//
|
|
7
|
-
diagnostics:
|
|
6
|
+
// Only the two inputs both definitions require; the rest is the service's to say.
|
|
7
|
+
diagnostics: AI_PATTERN_DIAGNOSTICS,
|
|
8
8
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DiagnosticCatalog } from '../../../core/nodes/family.js';
|
|
1
2
|
import type { FlowNodeType } from '../../../flow-node-type.js';
|
|
2
3
|
import type { BatchTransformInputs, SummarizeInputs } from './spec.js';
|
|
3
4
|
export type SummarizeSpec = {
|
|
@@ -8,4 +9,11 @@ export type BatchTransformSpec = {
|
|
|
8
9
|
kind: 'batchTransform';
|
|
9
10
|
inputs: BatchTransformInputs;
|
|
10
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Both definitions list `attachment` and `prompt` in `inputDefinition.required`,
|
|
14
|
+
* as the designer's form does, so `uip maestro flow validate` refuses a node
|
|
15
|
+
* without either. `serialize` drops an input the author left out, so check says
|
|
16
|
+
* so first, naming the step.
|
|
17
|
+
*/
|
|
18
|
+
export declare const AI_PATTERN_DIAGNOSTICS: DiagnosticCatalog;
|
|
11
19
|
export declare const aiPatternNodeTypes: (FlowNodeType<SummarizeSpec> | FlowNodeType<BatchTransformSpec>)[];
|
|
@@ -5,6 +5,27 @@
|
|
|
5
5
|
* serialized output and printed source unchanged.
|
|
6
6
|
*/
|
|
7
7
|
import { Expr } from '../../../core/expr.js';
|
|
8
|
+
/**
|
|
9
|
+
* Both definitions list `attachment` and `prompt` in `inputDefinition.required`,
|
|
10
|
+
* as the designer's form does, so `uip maestro flow validate` refuses a node
|
|
11
|
+
* without either. `serialize` drops an input the author left out, so check says
|
|
12
|
+
* so first, naming the step.
|
|
13
|
+
*/
|
|
14
|
+
export const AI_PATTERN_DIAGNOSTICS = {
|
|
15
|
+
PATTERN_NO_ATTACHMENT: { severity: 'error', summary: 'no attachment, so the AI service has no file to read' },
|
|
16
|
+
PATTERN_NO_PROMPT: { severity: 'error', summary: 'no prompt, so the AI service is not told what to do' },
|
|
17
|
+
};
|
|
18
|
+
function isBlank(v) {
|
|
19
|
+
return v === undefined || v === null || (typeof v === 'string' && v.trim() === '');
|
|
20
|
+
}
|
|
21
|
+
function checkRequired(inputs, ctx) {
|
|
22
|
+
if (isBlank(inputs.attachment)) {
|
|
23
|
+
ctx.report('PATTERN_NO_ATTACHMENT', `"${ctx.step}" has no attachment. Pass a file input or an upstream attachment, e.g. attachment: input('documentFile').`);
|
|
24
|
+
}
|
|
25
|
+
if (isBlank(inputs.prompt)) {
|
|
26
|
+
ctx.report('PATTERN_NO_PROMPT', `"${ctx.step}" has no prompt. Say what the service should do with the file.`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
8
29
|
/** A value as the author wrote it: an expression back to an Expr, a literal string as itself, any other JSON as is. */
|
|
9
30
|
function lifted(raw, ctx) {
|
|
10
31
|
const text = Array.isArray(raw) ? undefined : ctx.sourceText(raw);
|
|
@@ -58,6 +79,7 @@ const summarizeType = {
|
|
|
58
79
|
['returnCitations', inputs.returnCitations === true ? 'true' : undefined],
|
|
59
80
|
],
|
|
60
81
|
}),
|
|
82
|
+
check: ({ inputs }, ctx) => checkRequired(inputs, ctx),
|
|
61
83
|
// Deliberately none: references in the prompt, the attachment and the columns are not checked.
|
|
62
84
|
expressions: () => [],
|
|
63
85
|
output: () => ({ kind: 'opaque' }),
|
|
@@ -99,6 +121,7 @@ const batchTransformType = {
|
|
|
99
121
|
['enableWebSearchGrounding', inputs.enableWebSearchGrounding === true ? 'true' : undefined],
|
|
100
122
|
],
|
|
101
123
|
}),
|
|
124
|
+
check: ({ inputs }, ctx) => checkRequired(inputs, ctx),
|
|
102
125
|
// Deliberately none, as for Summarize.
|
|
103
126
|
expressions: () => [],
|
|
104
127
|
output: () => ({ kind: 'opaque' }),
|
|
@@ -7,8 +7,11 @@ import { type ActionSpec } from '../../../core/actions.js';
|
|
|
7
7
|
import type { DocumentClassifyInputs, DynamicExtractInputs, IxpExtractInputs } from './spec.js';
|
|
8
8
|
/**
|
|
9
9
|
* Classify a document into a document type (`uipath.document.classify`). The
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* output is the IDP `ProcessedDocument` envelope the designer declares:
|
|
11
|
+
* `version`, `type` (`'Classification'`), `result` (the processor's `output`,
|
|
12
|
+
* its `attribution` and `traceContext`), `taxonomy` and `metadata` (run ids
|
|
13
|
+
* and the model configuration). Read the answer at
|
|
14
|
+
* `$vars.<step>.output.result.output`.
|
|
12
15
|
*
|
|
13
16
|
* @param inputs - The file reference and optional page range / split / model settings.
|
|
14
17
|
* @returns An action spec to pass to `.step(name, …)`.
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
import { builtinActionSpec } from '../../../core/actions.js';
|
|
7
7
|
/**
|
|
8
8
|
* Classify a document into a document type (`uipath.document.classify`). The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* output is the IDP `ProcessedDocument` envelope the designer declares:
|
|
10
|
+
* `version`, `type` (`'Classification'`), `result` (the processor's `output`,
|
|
11
|
+
* its `attribution` and `traceContext`), `taxonomy` and `metadata` (run ids
|
|
12
|
+
* and the model configuration). Read the answer at
|
|
13
|
+
* `$vars.<step>.output.result.output`.
|
|
11
14
|
*
|
|
12
15
|
* @param inputs - The file reference and optional page range / split / model settings.
|
|
13
16
|
* @returns An action spec to pass to `.step(name, …)`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.85.
|
|
3
|
+
"version": "6.85.2",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@types/node": "^22.7.0",
|
|
104
104
|
"esbuild": "^0.28.1"
|
|
105
105
|
},
|
|
106
|
-
"gitref": "
|
|
106
|
+
"gitref": "a57b37eeea153a6556a9ec4a53754fb12b39c6c4"
|
|
107
107
|
}
|