@uipath/maestro-builder-sdk 6.22.0 → 6.23.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.
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The AI-pattern family's authoring types (`uipath.pattern.deep-rag`,
3
+ * `uipath.pattern.batch-transform`), and their kinds' entries in
4
+ * `FlowActionSpecs`. Moved from core/actions.ts in Phase 4 of
5
+ * docs/NODE_TYPE_ARCHITECTURE_DESIGN.md.
6
+ */
7
+ import type { Expr } from '../../../core/expr.js';
8
+ export interface SummarizeInputs {
9
+ /**
10
+ * The document to summarize — a whole **Flow Attachment** object
11
+ * (`{ ID, FullName, MimeType, Metadata }`), not a path, id or URL.
12
+ *
13
+ * In practice that is a `file`-typed flow input:
14
+ *
15
+ * ```ts
16
+ * flow('SummarizeDemo')
17
+ * .input({ documentFile: types.file })
18
+ * .step('summarizeContract', summarize({ attachment: input('documentFile'), … }))
19
+ * ```
20
+ *
21
+ * `out('start', 'documentFile')` is the same value written the way the CANVAS
22
+ * writes it (`$vars.start.output.documentFile`, resolved through the input's
23
+ * `triggerNodeId` binding). Both forms run — measured on the real service —
24
+ * so prefer whichever the task asks for; `out('start', …)` is what a
25
+ * designer-made flow looks like.
26
+ *
27
+ * The service reads the file's CONTENT, and refuses one it cannot treat as a
28
+ * document: a PDF summarizes, a plain `.txt` comes back
29
+ * `[460005] … "No valid files to use for Summarization."`
30
+ */
31
+ attachment: Expr;
32
+ /** What the summary should cover, e.g. `'Write a 5-bullet executive summary…'`. */
33
+ prompt: string | Expr;
34
+ /**
35
+ * Ask the service for per-claim citations. Each is
36
+ * `{ Ordinal, PageNumber, Source, Reference }` and lands in
37
+ * `out('<step>', 'content.Citations')`. Defaults to `false`.
38
+ */
39
+ returnCitations?: boolean;
40
+ }
41
+ /** One column Batch Transform appends to the CSV. */
42
+ export interface OutputColumn {
43
+ /** The new column's header, e.g. `'Category'`. */
44
+ name: string;
45
+ /** What the model should put in it, e.g. `'One of: Utility, Software, Travel, Other'`. */
46
+ description: string;
47
+ }
48
+ export interface BatchTransformInputs {
49
+ /**
50
+ * The CSV to enrich — a whole **Flow Attachment** object, same shape and same
51
+ * two ways of referencing it as {@link SummarizeInputs.attachment}.
52
+ */
53
+ attachment: Expr;
54
+ /** How to process each row, e.g. `'Classify each row and write a one-line summary.'`. */
55
+ prompt: string | Expr;
56
+ /**
57
+ * The columns to add, in order. The node's own field name — an array of
58
+ * `{ name, description }`, one per new column.
59
+ */
60
+ outputColumns: OutputColumn[];
61
+ /** Let the model use web search while transforming. Defaults to `false`. */
62
+ enableWebSearchGrounding?: boolean;
63
+ }
64
+ declare module '../../../core/actions.js' {
65
+ interface FlowActionSpecs {
66
+ /** The spec {@link summarize} builds. */
67
+ summarize: {
68
+ inputs: SummarizeInputs;
69
+ };
70
+ /** The spec {@link batchTransform} builds. */
71
+ batchTransform: {
72
+ inputs: BatchTransformInputs;
73
+ };
74
+ }
75
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/serialize.js CHANGED
@@ -119,11 +119,6 @@ const NODE_TYPE = {
119
119
  doWhile: 'core.logic.dowhile',
120
120
  subflow: 'core.subflow',
121
121
  terminate: 'core.logic.terminate',
122
- // The two AI patterns. `summarize()` emits `deep-rag`: the canvas name is
123
- // "Summarize", the wire type is the backend's (`ECS.DeepRag`), and there is
124
- // no `uipath.pattern.summarize` node type at all.
125
- summarize: 'uipath.pattern.deep-rag',
126
- batchTransform: 'uipath.pattern.batch-transform',
127
122
  end: 'core.control.end',
128
123
  };
129
124
  /**
@@ -3640,8 +3635,6 @@ export function bundledActionNodeType(spec) {
3640
3635
  case 'hitl': return hitlNodeType(spec.inputs);
3641
3636
  case 'inlineAgent': return INLINE_AGENT_TYPE;
3642
3637
  case 'subflow':
3643
- case 'summarize':
3644
- case 'batchTransform':
3645
3638
  case 'sendMessage':
3646
3639
  case 'waitForMessage':
3647
3640
  case 'conversationContext':
@@ -6069,39 +6062,6 @@ export function serialize(built, opts = {}) {
6069
6062
  addEdge(scope, t, id);
6070
6063
  return [{ node: id, port: successPort(type) }];
6071
6064
  }
6072
- if (spec.kind === 'summarize' || spec.kind === 'batchTransform') {
6073
- // One emit path for both AI patterns: they differ in their definition and
6074
- // in which input fields they carry, and in nothing else. Each field is
6075
- // written under the NODE's own name, so the surface and the emitted file
6076
- // read alike.
6077
- const type = spec.kind === 'summarize' ? NODE_TYPE.summarize : NODE_TYPE.batchTransform;
6078
- const id = stepUid(scope, step.name);
6079
- const node = makeNode(type, id, step.name, { parentId, requestedVersion: step.options?.version });
6080
- // The resource model stays on the DEFINITION only. Both node types are
6081
- // `bpmn:ServiceTask`s whose `serviceType` the platform resolves from
6082
- // `definitions[]`, and every deployed instance of either carries no
6083
- // node-level `model` — v1's own structural checker fails a flow that has
6084
- // one. Same reason the three process-resource families delete theirs.
6085
- delete node.model;
6086
- node.inputs = spec.kind === 'summarize'
6087
- ? {
6088
- attachment: renderValue(spec.inputs.attachment, scope.rename),
6089
- prompt: renderValue(spec.inputs.prompt, scope.rename),
6090
- returnCitations: spec.inputs.returnCitations ?? false,
6091
- }
6092
- : {
6093
- attachment: renderValue(spec.inputs.attachment, scope.rename),
6094
- prompt: renderValue(spec.inputs.prompt, scope.rename),
6095
- enableWebSearchGrounding: spec.inputs.enableWebSearchGrounding ?? false,
6096
- // Written through renderMap per column so an expression in a
6097
- // description renders like every other input.
6098
- outputColumns: spec.inputs.outputColumns.map((c) => renderMap(c, scope.rename)),
6099
- };
6100
- scope.nodes.push(node);
6101
- for (const t of tails)
6102
- addEdge(scope, t, id);
6103
- return [{ node: id, port: successPort(type) }];
6104
- }
6105
6065
  if (spec.kind === 'ixpExtract') {
6106
6066
  const s = spec.inputs;
6107
6067
  const def = perCallDefinition(spec); // ixpExtractDef: throws on an unparseable project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.22.0",
3
+ "version": "6.23.0",
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",
@@ -92,5 +92,5 @@
92
92
  "@types/node": "^22.7.0",
93
93
  "esbuild": "^0.28.1"
94
94
  },
95
- "gitref": "b090b1119c411ed2ffdefab1d258d629ff624a1f"
95
+ "gitref": "4e81a94f4009b646e93353cd0043286f725a4507"
96
96
  }