@uipath/maestro-builder-sdk 6.92.0 → 6.93.1
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 +26 -25
- package/dist/api-members.md +157 -149
- package/dist/case/case-sdk.d.ts +56 -0
- package/dist/case/case-sdk.js +19 -0
- package/dist/case/check.js +58 -0
- package/dist/case/decompile.d.ts +1 -0
- package/dist/case/decompile.js +35 -1
- package/dist/case/preserve.js +1 -1
- package/dist/case/serialize.js +3 -0
- package/dist/core/refusals.d.ts +3 -0
- package/dist/core/refusals.js +3 -0
- package/dist/core-definitions.json +226 -0
- package/dist/nodes/ai-patterns/flow/factories.d.ts +6 -0
- package/dist/nodes/ai-patterns/flow/factories.js +6 -0
- package/dist/nodes/ai-patterns/flow/node-type.d.ts +2 -2
- package/dist/nodes/ai-patterns/flow/node-type.js +49 -38
- package/package.json +2 -2
package/dist/case/case-sdk.d.ts
CHANGED
|
@@ -905,6 +905,45 @@ export type TimerSpecData = {
|
|
|
905
905
|
date?: never;
|
|
906
906
|
cycle: string;
|
|
907
907
|
};
|
|
908
|
+
/**
|
|
909
|
+
* A task's retry policy, saved as the task's `retry` (Case schema V29+). The
|
|
910
|
+
* platform lowers it onto the task's BPMN activity as `uipath:Retry` when the
|
|
911
|
+
* case turns on task error handling (`metadata.caseExecutionTaskErrorHandling`),
|
|
912
|
+
* and the runtime retries a faulted task by it. For example, retry once after a
|
|
913
|
+
* second on any error:
|
|
914
|
+
*
|
|
915
|
+
* .retry({ maxRetryCount: 1, retryBackoff: 'PT1S', retryAllErrors: true, retryBackoffType: 'Static' })
|
|
916
|
+
*
|
|
917
|
+
* The platform keeps but never runs a policy when:
|
|
918
|
+
* - the case does not turn on task error handling. The SDK cannot turn it on;
|
|
919
|
+
* only a plan saved with the Studio Web setting on carries it
|
|
920
|
+
* (`case check`: TASK_RETRY_OFF);
|
|
921
|
+
* - `retryAllErrors` is `false`: that retries only errors the task's error
|
|
922
|
+
* mapping marks retryable, and the SDK writes no error mapping
|
|
923
|
+
* (TASK_RETRY_INEFFECTIVE);
|
|
924
|
+
* - the task is a wait-for-timer or wait-for-connector task (TASK_RETRY_UNSUPPORTED).
|
|
925
|
+
*
|
|
926
|
+
* Decompile keeps such a policy when a saved plan holds one, so it survives the
|
|
927
|
+
* round trip, but do not author one.
|
|
928
|
+
*/
|
|
929
|
+
export interface TaskRetryPolicy {
|
|
930
|
+
/** How many times to retry, after the first attempt. */
|
|
931
|
+
maxRetryCount?: number;
|
|
932
|
+
/** ISO 8601 duration between attempts (`PT1S`); the platform writes `PT1S` when absent. */
|
|
933
|
+
retryBackoff?: string;
|
|
934
|
+
/**
|
|
935
|
+
* Retry on every error. `false` retries only errors the task's error mapping
|
|
936
|
+
* marks retryable; the SDK writes no error mapping, so `false` never retries.
|
|
937
|
+
* Use `true`.
|
|
938
|
+
*/
|
|
939
|
+
retryAllErrors: boolean;
|
|
940
|
+
/** How the backoff grows between attempts. */
|
|
941
|
+
retryBackoffType?: 'Static' | 'Linear' | 'Exponential';
|
|
942
|
+
/** ISO 8601 duration after which no more attempts start. */
|
|
943
|
+
maxDuration?: string;
|
|
944
|
+
/** The growth factor of an `Exponential` backoff. */
|
|
945
|
+
exponentialBase?: number;
|
|
946
|
+
}
|
|
908
947
|
/** A task input binding: a resource input parameter set to a literal or a `=`-expression. */
|
|
909
948
|
export interface TaskInputBinding {
|
|
910
949
|
/** The resource's input parameter name. */
|
|
@@ -962,6 +1001,8 @@ export interface BuiltTask {
|
|
|
962
1001
|
runOnce?: boolean;
|
|
963
1002
|
description?: string;
|
|
964
1003
|
skip?: string;
|
|
1004
|
+
/** The task's retry policy (`retry`). */
|
|
1005
|
+
retry?: TaskRetryPolicy;
|
|
965
1006
|
/** Reference-mode task input bindings (`data.inputs[]`). */
|
|
966
1007
|
inputs?: TaskInputBinding[];
|
|
967
1008
|
/** Reference-mode task output extractions (`data.outputs[]` + a readable case-variable companion). */
|
|
@@ -1222,6 +1263,7 @@ declare class TaskBuilder {
|
|
|
1222
1263
|
private _runOnce?;
|
|
1223
1264
|
private _description?;
|
|
1224
1265
|
private _skip?;
|
|
1266
|
+
private _retry?;
|
|
1225
1267
|
private _inputs?;
|
|
1226
1268
|
private _outputs?;
|
|
1227
1269
|
private readonly _entry;
|
|
@@ -1584,6 +1626,20 @@ declare class TaskBuilder {
|
|
|
1584
1626
|
* @returns This builder, so calls chain.
|
|
1585
1627
|
*/
|
|
1586
1628
|
skipWhen(expression: string): this;
|
|
1629
|
+
/**
|
|
1630
|
+
* Retry this task when it faults. The platform runs the policy only when the
|
|
1631
|
+
* case turns on task error handling, a Studio Web case setting
|
|
1632
|
+
* (`metadata.caseExecutionTaskErrorHandling`) the SDK cannot turn on: a case
|
|
1633
|
+
* built from scratch keeps the policy and never runs it. It never runs
|
|
1634
|
+
* `retryAllErrors: false` (no error mapping) or a retry on a wait-for-timer or
|
|
1635
|
+
* wait-for-connector task either. `case check` warns on each of these
|
|
1636
|
+
* (TASK_RETRY_OFF, TASK_RETRY_INEFFECTIVE, TASK_RETRY_UNSUPPORTED). Decompile
|
|
1637
|
+
* writes `.retry()` for a plan Studio Web saved with a policy.
|
|
1638
|
+
*
|
|
1639
|
+
* @param policy - The retry policy, saved as the task's `retry`. See {@link TaskRetryPolicy}.
|
|
1640
|
+
* @returns This builder, so calls chain.
|
|
1641
|
+
*/
|
|
1642
|
+
retry(policy: TaskRetryPolicy): this;
|
|
1587
1643
|
/**
|
|
1588
1644
|
* Bind resource **input** parameters (reference-mode tasks). Each key is a
|
|
1589
1645
|
* declared input parameter name; each value is a literal, a case-variable read
|
package/dist/case/case-sdk.js
CHANGED
|
@@ -275,6 +275,7 @@ class TaskBuilder {
|
|
|
275
275
|
_runOnce;
|
|
276
276
|
_description;
|
|
277
277
|
_skip;
|
|
278
|
+
_retry;
|
|
278
279
|
_inputs;
|
|
279
280
|
_outputs;
|
|
280
281
|
_entry = [];
|
|
@@ -690,6 +691,23 @@ class TaskBuilder {
|
|
|
690
691
|
this._skip = expression;
|
|
691
692
|
return this;
|
|
692
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* Retry this task when it faults. The platform runs the policy only when the
|
|
696
|
+
* case turns on task error handling, a Studio Web case setting
|
|
697
|
+
* (`metadata.caseExecutionTaskErrorHandling`) the SDK cannot turn on: a case
|
|
698
|
+
* built from scratch keeps the policy and never runs it. It never runs
|
|
699
|
+
* `retryAllErrors: false` (no error mapping) or a retry on a wait-for-timer or
|
|
700
|
+
* wait-for-connector task either. `case check` warns on each of these
|
|
701
|
+
* (TASK_RETRY_OFF, TASK_RETRY_INEFFECTIVE, TASK_RETRY_UNSUPPORTED). Decompile
|
|
702
|
+
* writes `.retry()` for a plan Studio Web saved with a policy.
|
|
703
|
+
*
|
|
704
|
+
* @param policy - The retry policy, saved as the task's `retry`. See {@link TaskRetryPolicy}.
|
|
705
|
+
* @returns This builder, so calls chain.
|
|
706
|
+
*/
|
|
707
|
+
retry(policy) {
|
|
708
|
+
this._retry = { ...policy };
|
|
709
|
+
return this;
|
|
710
|
+
}
|
|
693
711
|
/**
|
|
694
712
|
* Bind resource **input** parameters (reference-mode tasks). Each key is a
|
|
695
713
|
* declared input parameter name; each value is a literal, a case-variable read
|
|
@@ -918,6 +936,7 @@ class TaskBuilder {
|
|
|
918
936
|
runOnce: this._runOnce,
|
|
919
937
|
description: this._description,
|
|
920
938
|
skip: this._skip,
|
|
939
|
+
...(this._retry ? { retry: this._retry } : {}),
|
|
921
940
|
inputs: this._inputs,
|
|
922
941
|
outputs: this._outputs,
|
|
923
942
|
entry: this._entry,
|
package/dist/case/check.js
CHANGED
|
@@ -245,11 +245,69 @@ export function check(built, opts = {}) {
|
|
|
245
245
|
if (t.kind === 'http-request' && t.http)
|
|
246
246
|
for (const f of httpRequestLint(`HTTP request task "${t.name}"`, t.http))
|
|
247
247
|
diags.push({ level: 'error', code: f.code, message: f.message, ...(f.suggestion ? { suggestion: f.suggestion } : {}), where: t.name });
|
|
248
|
+
// A retry policy compile writes as authored but the platform never runs (lint).
|
|
249
|
+
checkTaskRetry(built, diags);
|
|
248
250
|
checkRuleSemantics(built, diags);
|
|
249
251
|
checkLibraryConnectors(built, opts, diags);
|
|
250
252
|
diags.push(...serializerRefusals(built, opts, diags, reportedReads));
|
|
251
253
|
return diags;
|
|
252
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Task types whose retry policy the platform drops (`caseTaskTypeSupportsErrorHandling`
|
|
257
|
+
* in `@uipath/case-schema`): a wait has no activity to retry.
|
|
258
|
+
*/
|
|
259
|
+
const RETRY_UNSUPPORTED_KINDS = new Set(['wait-for-timer', 'wait-for-connector']);
|
|
260
|
+
/**
|
|
261
|
+
* A `.retry()` the platform keeps but never runs. Compile writes the policy as
|
|
262
|
+
* authored (a saved plan can hold any of these, and decompile keeps them), so
|
|
263
|
+
* each is a warning:
|
|
264
|
+
*
|
|
265
|
+
* - TASK_RETRY_UNSUPPORTED: on a wait-for-timer or wait-for-connector task,
|
|
266
|
+
* which the platform's converter gives no retry.
|
|
267
|
+
* - TASK_RETRY_INEFFECTIVE: `retryAllErrors: false` retries only errors the
|
|
268
|
+
* task's error mapping marks retryable, and the SDK writes no error mapping,
|
|
269
|
+
* so nothing is retried (`validate`'s CASE_MGMT_TASK_RETRY_INEFFECTIVE).
|
|
270
|
+
* - TASK_RETRY_OFF: the plan does not turn on task error handling
|
|
271
|
+
* (`metadata.caseExecutionTaskErrorHandling`), and the converter reads `retry`
|
|
272
|
+
* only when it is on. The SDK cannot turn it on; only a plan Studio Web saved
|
|
273
|
+
* with it carries it (the brownfield metadata carry).
|
|
274
|
+
*/
|
|
275
|
+
function checkTaskRetry(built, diags) {
|
|
276
|
+
const handlingOn = caseJsonPreservation(built)?.metadata?.caseExecutionTaskErrorHandling === true;
|
|
277
|
+
for (const stage of built.stages)
|
|
278
|
+
for (const lane of stage.lanes)
|
|
279
|
+
for (const t of lane) {
|
|
280
|
+
if (!t.retry)
|
|
281
|
+
continue;
|
|
282
|
+
const who = `Task "${t.name}"`;
|
|
283
|
+
if (RETRY_UNSUPPORTED_KINDS.has(t.kind)) {
|
|
284
|
+
diags.push({
|
|
285
|
+
level: 'warning',
|
|
286
|
+
code: 'TASK_RETRY_UNSUPPORTED',
|
|
287
|
+
message: `${who} is a ${t.kind} task, which the platform never retries, so its .retry() policy is kept but not run.`,
|
|
288
|
+
suggestion: 'Remove the .retry() call, or move the retry to the task that does the work.',
|
|
289
|
+
where: t.name,
|
|
290
|
+
});
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
if (t.retry.retryAllErrors === false)
|
|
294
|
+
diags.push({
|
|
295
|
+
level: 'warning',
|
|
296
|
+
code: 'TASK_RETRY_INEFFECTIVE',
|
|
297
|
+
message: `${who} retries only errors its error mapping marks retryable (retryAllErrors: false), and it has no error mapping, so it is never retried.`,
|
|
298
|
+
suggestion: 'Set retryAllErrors: true to retry on any error.',
|
|
299
|
+
where: t.name,
|
|
300
|
+
});
|
|
301
|
+
if (!handlingOn)
|
|
302
|
+
diags.push({
|
|
303
|
+
level: 'warning',
|
|
304
|
+
code: 'TASK_RETRY_OFF',
|
|
305
|
+
message: `${who} has a .retry() policy, but this case does not turn on task error handling, so the platform keeps the policy and never runs it. The SDK cannot turn task error handling on yet (builder-sdk#1914).`,
|
|
306
|
+
suggestion: 'Turn on task error handling in the case settings in Studio Web, or remove the .retry() call.',
|
|
307
|
+
where: t.name,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
253
311
|
/**
|
|
254
312
|
* Every refusal `compile` would raise for `built`: the serializer, run in
|
|
255
313
|
* collect mode (docs/CHECK_COMPILE_CONTRACT_DESIGN.md §3.5, phase 8), so each
|
package/dist/case/decompile.d.ts
CHANGED
package/dist/case/decompile.js
CHANGED
|
@@ -1487,6 +1487,38 @@ function ioArg(rows, kind, task, varKeyById) {
|
|
|
1487
1487
|
});
|
|
1488
1488
|
return `{ ${entries.join(', ')} }`;
|
|
1489
1489
|
}
|
|
1490
|
+
/**
|
|
1491
|
+
* The fields of `CaseManagementJsonTaskRetrySchema` (case-schema V29+) and the
|
|
1492
|
+
* type each holds. `retryAllErrors` is the one the schema requires.
|
|
1493
|
+
*/
|
|
1494
|
+
const RETRY_FIELDS = {
|
|
1495
|
+
maxRetryCount: 'number', retryBackoff: 'string', retryAllErrors: 'boolean',
|
|
1496
|
+
retryBackoffType: 'string', maxDuration: 'string', exponentialBase: 'number',
|
|
1497
|
+
};
|
|
1498
|
+
const RETRY_BACKOFF_TYPES = new Set(['Static', 'Linear', 'Exponential']);
|
|
1499
|
+
/**
|
|
1500
|
+
* A task's saved `retry`, as `.retry()` takes it. One the schema would reject
|
|
1501
|
+
* (a field it does not name, a value of another type, no `retryAllErrors`) is
|
|
1502
|
+
* refused: `.retry()` could not write it back as saved.
|
|
1503
|
+
*/
|
|
1504
|
+
function retryPolicy(task) {
|
|
1505
|
+
const retry = task.retry;
|
|
1506
|
+
const who = `task "${task.displayName ?? task.id ?? '?'}"`;
|
|
1507
|
+
if (!retry || typeof retry !== 'object' || Array.isArray(retry))
|
|
1508
|
+
throw new Error(`${who} has a retry policy that is not an object.`);
|
|
1509
|
+
for (const [field, value] of Object.entries(retry)) {
|
|
1510
|
+
const type = ownEntry(RETRY_FIELDS, field);
|
|
1511
|
+
if (!type)
|
|
1512
|
+
throw new Error(`${who} retry policy has unsupported field "${field}".`);
|
|
1513
|
+
if (typeof value !== type || (type === 'number' && !Number.isFinite(value)))
|
|
1514
|
+
throw new Error(`${who} retry policy field "${field}" is not a ${type}.`);
|
|
1515
|
+
if (field === 'retryBackoffType' && !RETRY_BACKOFF_TYPES.has(value))
|
|
1516
|
+
throw new Error(`${who} retry policy has unsupported retryBackoffType ${JSON.stringify(value)}.`);
|
|
1517
|
+
}
|
|
1518
|
+
if (typeof retry.retryAllErrors !== 'boolean')
|
|
1519
|
+
throw new Error(`${who} retry policy has no retryAllErrors.`);
|
|
1520
|
+
return retry;
|
|
1521
|
+
}
|
|
1490
1522
|
function emitTask(out, depth, task, lane, refs, library) {
|
|
1491
1523
|
out.line(depth, `.task(${tsLiteral(taskSourceName(task))}, t => t`);
|
|
1492
1524
|
const inner = depth + 1;
|
|
@@ -1509,6 +1541,8 @@ function emitTask(out, depth, task, lane, refs, library) {
|
|
|
1509
1541
|
out.line(inner, `.description(${tsLiteral(task.description)})`);
|
|
1510
1542
|
if (task.skipCondition)
|
|
1511
1543
|
out.line(inner, `.skipWhen(${tsLiteral(task.skipCondition)})`);
|
|
1544
|
+
if (task.retry !== undefined)
|
|
1545
|
+
out.line(inner, `.retry(${tsLiteral(retryPolicy(task))})`);
|
|
1512
1546
|
for (const condition of task.entryConditions ?? [])
|
|
1513
1547
|
emitEntryWhen(out, inner, condition, refs, false);
|
|
1514
1548
|
out.line(depth, lane > 0 ? `, ${opts([['lane', String(lane)]])})` : ')');
|
|
@@ -2631,7 +2665,7 @@ export function collectPreservation(plan) {
|
|
|
2631
2665
|
preservation.omitTriggerLabels = unlabeled;
|
|
2632
2666
|
const taskKnown = new Set([
|
|
2633
2667
|
'id', 'displayName', 'type', 'data', 'shouldRunOnlyOnce', 'isRequired', 'skipCondition', 'description',
|
|
2634
|
-
'entryConditions', 'conditions', 'nonSequentialRunConditions',
|
|
2668
|
+
'entryConditions', 'conditions', 'nonSequentialRunConditions', 'retry',
|
|
2635
2669
|
]);
|
|
2636
2670
|
const taskFields = [];
|
|
2637
2671
|
const connectorConfigurations = [];
|
package/dist/case/preserve.js
CHANGED
|
@@ -178,7 +178,7 @@ const VARIABLE_KEYS = new Set([
|
|
|
178
178
|
]);
|
|
179
179
|
const TASK_KEYS = new Set([
|
|
180
180
|
'id', 'displayName', 'type', 'data', 'shouldRunOnlyOnce', 'isRequired', 'skipCondition', 'description',
|
|
181
|
-
'entryConditions', 'conditions', 'nonSequentialRunConditions',
|
|
181
|
+
'entryConditions', 'conditions', 'nonSequentialRunConditions', 'retry',
|
|
182
182
|
]);
|
|
183
183
|
const TRIGGER_DATA_KEYS = new Set(['label', 'description', 'uipath', 'display', 'inputs', 'typeVersion']);
|
|
184
184
|
const PRESERVED_TASK_KEYS = new Set(['elementId']);
|
package/dist/case/serialize.js
CHANGED
|
@@ -2207,6 +2207,9 @@ function emitTaskNode(task, stageLabel, stageId, taskId, type, ids, resolver) {
|
|
|
2207
2207
|
if (task.entry.length) {
|
|
2208
2208
|
node.entryConditions = task.entry.map((c, i) => emitTaskEntry(c, `${stageLabel}/${task.name}:entry:${i}`, stageId, task.name, ids, resolver));
|
|
2209
2209
|
}
|
|
2210
|
+
// Last, where Studio Web writes it.
|
|
2211
|
+
if (task.retry)
|
|
2212
|
+
node.retry = { ...task.retry };
|
|
2210
2213
|
return node;
|
|
2211
2214
|
}
|
|
2212
2215
|
function taskData(task, resolver, taskId, stageId, ids) {
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -733,6 +733,9 @@ export declare const REFUSALS: {
|
|
|
733
733
|
readonly TASK_OUTPUT_REF_UNRESOLVED: "lowering";
|
|
734
734
|
readonly TASK_OUTPUT_SOURCE_AND_ASSIGN: "lowering";
|
|
735
735
|
readonly TASK_REENTRY_IGNORED: "lint";
|
|
736
|
+
readonly TASK_RETRY_INEFFECTIVE: "lint";
|
|
737
|
+
readonly TASK_RETRY_OFF: "lint";
|
|
738
|
+
readonly TASK_RETRY_UNSUPPORTED: "lint";
|
|
736
739
|
readonly TASK_TIMER_OUT_OF_RANGE: "lint";
|
|
737
740
|
readonly TEMPLATED_EXITS_ONLY: "lowering";
|
|
738
741
|
readonly TERMINATE_HAS_NO_OUTPUT: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -807,6 +807,9 @@ export const REFUSALS = {
|
|
|
807
807
|
TASK_OUTPUT_REF_UNRESOLVED: 'lowering',
|
|
808
808
|
TASK_OUTPUT_SOURCE_AND_ASSIGN: 'lowering',
|
|
809
809
|
TASK_REENTRY_IGNORED: 'lint',
|
|
810
|
+
TASK_RETRY_INEFFECTIVE: 'lint',
|
|
811
|
+
TASK_RETRY_OFF: 'lint',
|
|
812
|
+
TASK_RETRY_UNSUPPORTED: 'lint',
|
|
810
813
|
TASK_TIMER_OUT_OF_RANGE: 'lint',
|
|
811
814
|
TEMPLATED_EXITS_ONLY: 'lowering',
|
|
812
815
|
TERMINATE_HAS_NO_OUTPUT: 'lint',
|
|
@@ -5265,6 +5265,232 @@
|
|
|
5265
5265
|
]
|
|
5266
5266
|
}
|
|
5267
5267
|
},
|
|
5268
|
+
"uipath.pattern.deep-rag@1.1": {
|
|
5269
|
+
"nodeType": "uipath.pattern.deep-rag",
|
|
5270
|
+
"version": "1.1",
|
|
5271
|
+
"category": "document-processing",
|
|
5272
|
+
"tags": [
|
|
5273
|
+
"synthesis",
|
|
5274
|
+
"citation",
|
|
5275
|
+
"reasoning"
|
|
5276
|
+
],
|
|
5277
|
+
"sortOrder": 1,
|
|
5278
|
+
"supportsErrorHandling": true,
|
|
5279
|
+
"description": "Create a complex summary of a document",
|
|
5280
|
+
"display": {
|
|
5281
|
+
"label": "Summarize",
|
|
5282
|
+
"icon": "sigma",
|
|
5283
|
+
"isPreview": true
|
|
5284
|
+
},
|
|
5285
|
+
"handleConfiguration": [
|
|
5286
|
+
{
|
|
5287
|
+
"position": "left",
|
|
5288
|
+
"handles": [
|
|
5289
|
+
{
|
|
5290
|
+
"id": "input",
|
|
5291
|
+
"type": "target",
|
|
5292
|
+
"handleType": "input"
|
|
5293
|
+
}
|
|
5294
|
+
]
|
|
5295
|
+
},
|
|
5296
|
+
{
|
|
5297
|
+
"position": "right",
|
|
5298
|
+
"handles": [
|
|
5299
|
+
{
|
|
5300
|
+
"id": "output",
|
|
5301
|
+
"type": "source",
|
|
5302
|
+
"handleType": "output"
|
|
5303
|
+
},
|
|
5304
|
+
{
|
|
5305
|
+
"id": "error",
|
|
5306
|
+
"label": "Error",
|
|
5307
|
+
"type": "source",
|
|
5308
|
+
"handleType": "output",
|
|
5309
|
+
"visible": "{inputs.errorHandlingEnabled}",
|
|
5310
|
+
"constraints": {
|
|
5311
|
+
"maxConnections": 1
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
]
|
|
5315
|
+
}
|
|
5316
|
+
],
|
|
5317
|
+
"model": {
|
|
5318
|
+
"type": "bpmn:ServiceTask",
|
|
5319
|
+
"serviceType": "ECS.DeepRag"
|
|
5320
|
+
},
|
|
5321
|
+
"inputDefinition": {
|
|
5322
|
+
"type": "object",
|
|
5323
|
+
"properties": {
|
|
5324
|
+
"attachment": {
|
|
5325
|
+
"type": "string"
|
|
5326
|
+
},
|
|
5327
|
+
"prompt": {
|
|
5328
|
+
"type": "string"
|
|
5329
|
+
},
|
|
5330
|
+
"returnCitations": {
|
|
5331
|
+
"type": "boolean"
|
|
5332
|
+
}
|
|
5333
|
+
},
|
|
5334
|
+
"required": [
|
|
5335
|
+
"attachment",
|
|
5336
|
+
"prompt"
|
|
5337
|
+
]
|
|
5338
|
+
},
|
|
5339
|
+
"inputDefaults": {
|
|
5340
|
+
"attachment": "",
|
|
5341
|
+
"prompt": "",
|
|
5342
|
+
"returnCitations": false
|
|
5343
|
+
},
|
|
5344
|
+
"outputDefinition": {
|
|
5345
|
+
"output": {
|
|
5346
|
+
"type": "object",
|
|
5347
|
+
"source": "=response",
|
|
5348
|
+
"var": "output",
|
|
5349
|
+
"schema": {
|
|
5350
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5351
|
+
"type": "object",
|
|
5352
|
+
"properties": {
|
|
5353
|
+
"id": {
|
|
5354
|
+
"type": "string"
|
|
5355
|
+
},
|
|
5356
|
+
"content": {
|
|
5357
|
+
"type": [
|
|
5358
|
+
"object",
|
|
5359
|
+
"null"
|
|
5360
|
+
],
|
|
5361
|
+
"properties": {
|
|
5362
|
+
"Text": {
|
|
5363
|
+
"type": "string"
|
|
5364
|
+
},
|
|
5365
|
+
"Citations": {
|
|
5366
|
+
"type": [
|
|
5367
|
+
"array",
|
|
5368
|
+
"null"
|
|
5369
|
+
],
|
|
5370
|
+
"items": {
|
|
5371
|
+
"type": "object",
|
|
5372
|
+
"properties": {
|
|
5373
|
+
"Ordinal": {
|
|
5374
|
+
"type": "integer"
|
|
5375
|
+
},
|
|
5376
|
+
"PageNumber": {
|
|
5377
|
+
"type": "integer"
|
|
5378
|
+
},
|
|
5379
|
+
"Source": {
|
|
5380
|
+
"type": "string"
|
|
5381
|
+
},
|
|
5382
|
+
"Reference": {
|
|
5383
|
+
"type": "string"
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5392
|
+
},
|
|
5393
|
+
"error": {
|
|
5394
|
+
"type": "object",
|
|
5395
|
+
"description": "Error information if the node fails",
|
|
5396
|
+
"source": "=Error",
|
|
5397
|
+
"var": "error",
|
|
5398
|
+
"schema": {
|
|
5399
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5400
|
+
"type": "object",
|
|
5401
|
+
"required": [
|
|
5402
|
+
"code",
|
|
5403
|
+
"message",
|
|
5404
|
+
"detail",
|
|
5405
|
+
"category",
|
|
5406
|
+
"status"
|
|
5407
|
+
],
|
|
5408
|
+
"properties": {
|
|
5409
|
+
"code": {
|
|
5410
|
+
"type": "string",
|
|
5411
|
+
"description": "Error code as a string"
|
|
5412
|
+
},
|
|
5413
|
+
"message": {
|
|
5414
|
+
"type": "string",
|
|
5415
|
+
"description": "High-level error message"
|
|
5416
|
+
},
|
|
5417
|
+
"detail": {
|
|
5418
|
+
"type": "string",
|
|
5419
|
+
"description": "Detailed error description"
|
|
5420
|
+
},
|
|
5421
|
+
"category": {
|
|
5422
|
+
"type": "string",
|
|
5423
|
+
"description": "Error category"
|
|
5424
|
+
},
|
|
5425
|
+
"status": {
|
|
5426
|
+
"type": "integer",
|
|
5427
|
+
"description": "HTTP status code"
|
|
5428
|
+
}
|
|
5429
|
+
},
|
|
5430
|
+
"additionalProperties": false
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
},
|
|
5434
|
+
"form": {
|
|
5435
|
+
"id": "deep-rag-properties",
|
|
5436
|
+
"title": "Summarize Configuration",
|
|
5437
|
+
"sections": [
|
|
5438
|
+
{
|
|
5439
|
+
"id": "source",
|
|
5440
|
+
"title": "Data source",
|
|
5441
|
+
"collapsible": true,
|
|
5442
|
+
"defaultExpanded": true,
|
|
5443
|
+
"fields": [
|
|
5444
|
+
{
|
|
5445
|
+
"name": "inputs.attachment",
|
|
5446
|
+
"type": "file",
|
|
5447
|
+
"label": "Attachment",
|
|
5448
|
+
"description": "The summary is generated from this file or document.",
|
|
5449
|
+
"validation": {
|
|
5450
|
+
"required": true,
|
|
5451
|
+
"messages": {
|
|
5452
|
+
"required": "Attachment is required"
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
"name": "inputs.prompt",
|
|
5458
|
+
"type": "custom",
|
|
5459
|
+
"component": "prompt-editor",
|
|
5460
|
+
"label": "Prompt",
|
|
5461
|
+
"description": "The prompt defines what the summary should focus on.",
|
|
5462
|
+
"componentProps": {
|
|
5463
|
+
"multiline": true,
|
|
5464
|
+
"minRows": 4,
|
|
5465
|
+
"maxRows": 20,
|
|
5466
|
+
"placeholder": "Summarize the key findings and risks"
|
|
5467
|
+
},
|
|
5468
|
+
"validation": {
|
|
5469
|
+
"required": true,
|
|
5470
|
+
"messages": {
|
|
5471
|
+
"required": "Prompt is required"
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5475
|
+
]
|
|
5476
|
+
},
|
|
5477
|
+
{
|
|
5478
|
+
"id": "citations",
|
|
5479
|
+
"title": "Citations",
|
|
5480
|
+
"collapsible": true,
|
|
5481
|
+
"defaultExpanded": false,
|
|
5482
|
+
"fields": [
|
|
5483
|
+
{
|
|
5484
|
+
"name": "inputs.returnCitations",
|
|
5485
|
+
"type": "checkbox",
|
|
5486
|
+
"label": "Include citations",
|
|
5487
|
+
"description": "Citations link generated summaries to source material."
|
|
5488
|
+
}
|
|
5489
|
+
]
|
|
5490
|
+
}
|
|
5491
|
+
]
|
|
5492
|
+
}
|
|
5493
|
+
},
|
|
5268
5494
|
"uipath.pattern.batch-transform@1.0": {
|
|
5269
5495
|
"nodeType": "uipath.pattern.batch-transform",
|
|
5270
5496
|
"version": "1.0",
|
|
@@ -20,6 +20,12 @@ import type { BatchTransformInputs, SummarizeInputs } from './spec.js';
|
|
|
20
20
|
* `content.Citations[].{Ordinal, PageNumber, Source, Reference}`. Lowercase
|
|
21
21
|
* `content.text` resolves to nothing at run time.
|
|
22
22
|
*
|
|
23
|
+
* **Version.** An unpinned `summarize()` writes the node at 1.1. Before
|
|
24
|
+
* 1.1 was bundled it wrote 1.0, so recompiling an older unpinned source
|
|
25
|
+
* changes the node's `typeVersion` (the definition differs only in its
|
|
26
|
+
* `version`). Pass `{ version: '1.0' }` as the step's options to keep 1.0;
|
|
27
|
+
* decompile prints that pin for a 1.0 node.
|
|
28
|
+
*
|
|
23
29
|
* A local run cannot reach the service: it returns the baked
|
|
24
30
|
* fixture shape, and only a real platform run (`uip maestro flow debug
|
|
25
31
|
* --attachment <var>=<file>`) calls the model.
|
|
@@ -19,6 +19,12 @@ import { builtinActionSpec } from '../../../core/actions.js';
|
|
|
19
19
|
* `content.Citations[].{Ordinal, PageNumber, Source, Reference}`. Lowercase
|
|
20
20
|
* `content.text` resolves to nothing at run time.
|
|
21
21
|
*
|
|
22
|
+
* **Version.** An unpinned `summarize()` writes the node at 1.1. Before
|
|
23
|
+
* 1.1 was bundled it wrote 1.0, so recompiling an older unpinned source
|
|
24
|
+
* changes the node's `typeVersion` (the definition differs only in its
|
|
25
|
+
* `version`). Pass `{ version: '1.0' }` as the step's options to keep 1.0;
|
|
26
|
+
* decompile prints that pin for a 1.0 node.
|
|
27
|
+
*
|
|
22
28
|
* A local run cannot reach the service: it returns the baked
|
|
23
29
|
* fixture shape, and only a real platform run (`uip maestro flow debug
|
|
24
30
|
* --attachment <var>=<file>`) calls the model.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DiagnosticCatalog } from '../../../core/nodes/family.js';
|
|
2
|
-
import type { FlowNodeType } from '../../../flow-node-type.js';
|
|
2
|
+
import type { FlowNodeType, FlowVersionedNodeType } from '../../../flow-node-type.js';
|
|
3
3
|
import type { BatchTransformInputs, SummarizeInputs } from './spec.js';
|
|
4
4
|
export type SummarizeSpec = {
|
|
5
5
|
kind: 'summarize';
|
|
@@ -16,4 +16,4 @@ export type BatchTransformSpec = {
|
|
|
16
16
|
* so first, naming the step.
|
|
17
17
|
*/
|
|
18
18
|
export declare const AI_PATTERN_DIAGNOSTICS: DiagnosticCatalog;
|
|
19
|
-
export declare const aiPatternNodeTypes: (
|
|
19
|
+
export declare const aiPatternNodeTypes: (FlowVersionedNodeType<SummarizeSpec> | FlowNodeType<BatchTransformSpec>)[];
|