@uipath/maestro-builder-sdk 6.40.1 → 6.41.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.
- package/dist/api-index.md +101 -101
- package/dist/api-members.md +292 -292
- package/dist/check.js +8 -487
- package/dist/core/actions.d.ts +0 -391
- package/dist/core/actions.js +0 -167
- package/dist/core/nodes/registry.d.ts +6 -1
- package/dist/core/nodes/registry.js +32 -2
- package/dist/core/nodes/versioned.d.ts +12 -0
- package/dist/core/nodes/versioned.js +7 -2
- package/dist/core/process-resource.d.ts +102 -0
- package/dist/core/process-resource.js +118 -0
- package/dist/decompile.js +9 -10
- package/dist/flow-node-registry.js +2 -1
- package/dist/flow-sdk.d.ts +1 -0
- package/dist/flow-sdk.js +1 -0
- package/dist/nodes/process/flow/check.d.ts +112 -0
- package/dist/nodes/process/flow/check.js +444 -0
- package/dist/nodes/process/flow/factories.d.ts +158 -0
- package/dist/nodes/process/flow/factories.js +173 -0
- package/dist/nodes/process/flow/family.d.ts +3 -0
- package/dist/nodes/process/flow/family.js +8 -0
- package/dist/nodes/process/flow/index.d.ts +3 -0
- package/dist/nodes/process/flow/index.js +3 -0
- package/dist/nodes/process/flow/node-type.d.ts +23 -0
- package/dist/nodes/process/flow/node-type.js +652 -0
- package/dist/nodes/process/flow/spec.d.ts +255 -0
- package/dist/nodes/process/flow/spec.js +1 -0
- package/dist/serialize.js +41 -612
- package/package.json +2 -2
|
@@ -12,7 +12,19 @@ export interface VersionedNodeType<Spec, Serialized, Ctx extends ArtifactContext
|
|
|
12
12
|
/** The implementation type: an artifact's own extension of NodeType, when it has one. */
|
|
13
13
|
Impl extends NodeType<Spec, Serialized, Ctx> = NodeType<Spec, Serialized, Ctx>> {
|
|
14
14
|
readonly kind: string;
|
|
15
|
+
/**
|
|
16
|
+
* The type name in the file. For a type that owns a FAMILY of names
|
|
17
|
+
* (`typeNamePrefix`), the prefix followed by `*` — what messages name it by.
|
|
18
|
+
*/
|
|
15
19
|
readonly typeName: string;
|
|
20
|
+
/**
|
|
21
|
+
* Set for a node type whose name carries the resource it calls, so one
|
|
22
|
+
* implementation owns every name that starts with it: a published function is
|
|
23
|
+
* `uipath.core.function.<key>`. `typeName` is then this prefix plus `*`, and
|
|
24
|
+
* the definition the type supplies names the actual node type. Such a type is
|
|
25
|
+
* per-tenant: no definition could be bundled for a name the SDK cannot know.
|
|
26
|
+
*/
|
|
27
|
+
readonly typeNamePrefix?: string;
|
|
16
28
|
readonly factory: string;
|
|
17
29
|
/** The version used when the author names none. Changing it is a breaking change. */
|
|
18
30
|
readonly defaultVersion: string;
|
|
@@ -71,10 +71,15 @@ export function resolveVersionCarried(t, spec, requested, where, carried) {
|
|
|
71
71
|
// Refused: name both sources, and the way to add the second one.
|
|
72
72
|
const registered = Object.keys(t.versions).sort().join(', ');
|
|
73
73
|
const carriedVersions = [...(carried?.versions?.(t.typeName) ?? [])].sort();
|
|
74
|
+
// A carried definition is keyed by its concrete name, so it can never answer
|
|
75
|
+
// a type that owns the names under a prefix: do not offer it as the remedy.
|
|
76
|
+
const remedy = t.typeNamePrefix !== undefined
|
|
77
|
+
? '. Versions are exact — omit { version } to use the default, or request one listed here.'
|
|
78
|
+
: '. Versions are exact — omit { version } to use the default, request one listed here, or carry '
|
|
79
|
+
+ "that version's definition (the .flow file's definitions[] entry) with .definitions([...]).";
|
|
74
80
|
throw new Error(`${where} requests ${t.typeName}@${requested}, but this SDK registers only ${registered}`
|
|
75
81
|
+ (carriedVersions.length > 0 ? ` and the flow carries only ${carriedVersions.join(', ')}` : '')
|
|
76
|
-
+
|
|
77
|
-
+ "that version's definition (the .flow file's definitions[] entry) with .definitions([...]).");
|
|
82
|
+
+ remedy);
|
|
78
83
|
}
|
|
79
84
|
const impl = resolveVersion(t, spec, requested, where);
|
|
80
85
|
return { impl, version: impl.version };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/process-resource — what every process-resource node (an RPA process, an
|
|
3
|
+
* API workflow, a published function, an agentic process, an agent) shares: its
|
|
4
|
+
* definition's shape, where the resource lives, and the one binding pair per
|
|
5
|
+
* process it references. The process node family (nodes/process/flow/) builds
|
|
6
|
+
* the four process definitions with these; serialize uses them for the agent,
|
|
7
|
+
* the agents' process tools, and a raw node's process bindings.
|
|
8
|
+
*/
|
|
9
|
+
import type { ProcessLocation } from './actions.js';
|
|
10
|
+
/** Every `resourceSubType` a process-resource binding pair can carry. */
|
|
11
|
+
export type ProcessResourceSubType = 'Process' | 'Api' | 'ProcessOrchestration' | 'Flow' | 'CaseManagement' | 'Agent' | 'Function';
|
|
12
|
+
/**
|
|
13
|
+
* What a process-resource definition builder returns. Only the binding subtype is
|
|
14
|
+
* typed, so a misspelled `resourceSubType` in a builder fails `tsc`; the emit path
|
|
15
|
+
* copies it onto the bindings pair.
|
|
16
|
+
*/
|
|
17
|
+
export interface ProcessResourceDef {
|
|
18
|
+
[field: string]: any;
|
|
19
|
+
model: {
|
|
20
|
+
[field: string]: any;
|
|
21
|
+
bindings: {
|
|
22
|
+
[field: string]: any;
|
|
23
|
+
resourceSubType: ProcessResourceSubType;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Where a process resource lives, as ONE slot every process-resource definition
|
|
29
|
+
* shares. In the platform model "in this solution" is orthogonal to the
|
|
30
|
+
* resource type: flow-core's single `createModel` (`@uipath/flow-core`
|
|
31
|
+
* `manifest/mappers/node-manifest-builder.ts`, what `uip maestro flow registry
|
|
32
|
+
* get --local` and Studio Web both run) adds `projectId`, `projectName` and
|
|
33
|
+
* `isInSolution: true` to the model of ANY process resource built from a sibling
|
|
34
|
+
* project.
|
|
35
|
+
*
|
|
36
|
+
* The in-solution shape, transcribed from `registry get --local` for a sibling
|
|
37
|
+
* Flow (2026-10-08) and from uipath-cli's `buildInSolutionNodeManifests`:
|
|
38
|
+
* - `resourceKey` is the bare key (the sibling's `resource.key`), not
|
|
39
|
+
* `<folderPath>.<name>`; the folder default is `''`;
|
|
40
|
+
* - no `section: 'Published'`;
|
|
41
|
+
* - `projectId` on the definition AND on the model, with `projectName` and
|
|
42
|
+
* `isInSolution: true` (the marker the canvas reads);
|
|
43
|
+
* - description `(In-solution) <name>`, tags `in-solution` / `local`, and the
|
|
44
|
+
* `open-workflow` toolbar action.
|
|
45
|
+
*/
|
|
46
|
+
export declare function processResourceLocation(spec: {
|
|
47
|
+
key: string;
|
|
48
|
+
name: string;
|
|
49
|
+
folderPath?: string;
|
|
50
|
+
location?: ProcessLocation;
|
|
51
|
+
projectId?: string;
|
|
52
|
+
}): {
|
|
53
|
+
inSolution: boolean;
|
|
54
|
+
folderPath: string;
|
|
55
|
+
resourceKey: string;
|
|
56
|
+
description: string;
|
|
57
|
+
tags: string[];
|
|
58
|
+
/** Spread onto the definition, before `model`. */
|
|
59
|
+
definitionExtras: Record<string, unknown>;
|
|
60
|
+
/** Spread onto `model` after `bindings`; `section` for a published resource. */
|
|
61
|
+
modelExtras: Record<string, unknown>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The two bindings a process reference always carries — `name` + `folderPath`,
|
|
65
|
+
* both keyed to the SAME `resourceKey`, which is how the node (via its
|
|
66
|
+
* definition's `model.bindings.resourceKey`) finds them. 45 of 45 deployed rpa
|
|
67
|
+
* instances and 42 of 42 deployed api-workflow instances have exactly these two,
|
|
68
|
+
* and no more.
|
|
69
|
+
*
|
|
70
|
+
* ONE PAIR PER PROCESS, not per step. Bindings are addressed by
|
|
71
|
+
* `resource + resourceKey + propertyAttribute` — the key a bindings lookup map is
|
|
72
|
+
* built on — so a second pair for the same process is not a second
|
|
73
|
+
* reference: it is a duplicate that SHADOWS the first, both steps resolve to
|
|
74
|
+
* whichever was inserted last, and the loser sits in the file referenced by
|
|
75
|
+
* nothing. This is the shape PR 12 filed against the rpa family (the queue
|
|
76
|
+
* emitter already avoided it) and the ride-along this card owns; the ids now come
|
|
77
|
+
* from the process rather than from a step name, so two steps starting the same
|
|
78
|
+
* process share one pair.
|
|
79
|
+
*/
|
|
80
|
+
export declare function processResourceBindings(spec: {
|
|
81
|
+
name: string;
|
|
82
|
+
folderPath: string;
|
|
83
|
+
resourceSubType: ProcessResourceSubType;
|
|
84
|
+
resourceKey?: string;
|
|
85
|
+
}, existing: ReadonlyMap<string, any>): {
|
|
86
|
+
ids: {
|
|
87
|
+
name: string;
|
|
88
|
+
folderPath: string;
|
|
89
|
+
};
|
|
90
|
+
entries: any[];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* The four published-resource factories once each named the release key
|
|
94
|
+
* differently — `rpaWorkflow({process})`, `apiWorkflow({workflow})`,
|
|
95
|
+
* `agenticProcess({process})`, `agent({agent})` — for one identical thing: the
|
|
96
|
+
* GUID in a process's `Key` field. They are all `key` now.
|
|
97
|
+
*
|
|
98
|
+
* Flows authored against the old names would otherwise fail as "has no `key`",
|
|
99
|
+
* which points at the wrong problem. When the retired field is the one carrying a
|
|
100
|
+
* value, say so and name the replacement.
|
|
101
|
+
*/
|
|
102
|
+
export declare function renamedFieldMessage(label: string, step: string, oldField: string): string;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a process resource lives, as ONE slot every process-resource definition
|
|
3
|
+
* shares. In the platform model "in this solution" is orthogonal to the
|
|
4
|
+
* resource type: flow-core's single `createModel` (`@uipath/flow-core`
|
|
5
|
+
* `manifest/mappers/node-manifest-builder.ts`, what `uip maestro flow registry
|
|
6
|
+
* get --local` and Studio Web both run) adds `projectId`, `projectName` and
|
|
7
|
+
* `isInSolution: true` to the model of ANY process resource built from a sibling
|
|
8
|
+
* project.
|
|
9
|
+
*
|
|
10
|
+
* The in-solution shape, transcribed from `registry get --local` for a sibling
|
|
11
|
+
* Flow (2026-10-08) and from uipath-cli's `buildInSolutionNodeManifests`:
|
|
12
|
+
* - `resourceKey` is the bare key (the sibling's `resource.key`), not
|
|
13
|
+
* `<folderPath>.<name>`; the folder default is `''`;
|
|
14
|
+
* - no `section: 'Published'`;
|
|
15
|
+
* - `projectId` on the definition AND on the model, with `projectName` and
|
|
16
|
+
* `isInSolution: true` (the marker the canvas reads);
|
|
17
|
+
* - description `(In-solution) <name>`, tags `in-solution` / `local`, and the
|
|
18
|
+
* `open-workflow` toolbar action.
|
|
19
|
+
*/
|
|
20
|
+
export function processResourceLocation(spec) {
|
|
21
|
+
if (spec.location === 'in-solution') {
|
|
22
|
+
return {
|
|
23
|
+
inSolution: true,
|
|
24
|
+
folderPath: '',
|
|
25
|
+
resourceKey: spec.key,
|
|
26
|
+
description: `(In-solution) ${spec.name}`,
|
|
27
|
+
tags: ['in-solution', 'local'],
|
|
28
|
+
definitionExtras: {
|
|
29
|
+
toolbarExtensions: {
|
|
30
|
+
design: { actions: [{ id: 'open-workflow', icon: 'external-link', label: 'Open' }] },
|
|
31
|
+
},
|
|
32
|
+
projectId: spec.projectId,
|
|
33
|
+
},
|
|
34
|
+
modelExtras: { projectId: spec.projectId, projectName: spec.name, isInSolution: true },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const folderPath = spec.folderPath ?? '';
|
|
38
|
+
return {
|
|
39
|
+
inSolution: false,
|
|
40
|
+
folderPath,
|
|
41
|
+
resourceKey: `${folderPath}.${spec.name}`,
|
|
42
|
+
description: `(${folderPath})`,
|
|
43
|
+
tags: [],
|
|
44
|
+
definitionExtras: {},
|
|
45
|
+
modelExtras: {},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The two bindings a process reference always carries — `name` + `folderPath`,
|
|
50
|
+
* both keyed to the SAME `resourceKey`, which is how the node (via its
|
|
51
|
+
* definition's `model.bindings.resourceKey`) finds them. 45 of 45 deployed rpa
|
|
52
|
+
* instances and 42 of 42 deployed api-workflow instances have exactly these two,
|
|
53
|
+
* and no more.
|
|
54
|
+
*
|
|
55
|
+
* ONE PAIR PER PROCESS, not per step. Bindings are addressed by
|
|
56
|
+
* `resource + resourceKey + propertyAttribute` — the key a bindings lookup map is
|
|
57
|
+
* built on — so a second pair for the same process is not a second
|
|
58
|
+
* reference: it is a duplicate that SHADOWS the first, both steps resolve to
|
|
59
|
+
* whichever was inserted last, and the loser sits in the file referenced by
|
|
60
|
+
* nothing. This is the shape PR 12 filed against the rpa family (the queue
|
|
61
|
+
* emitter already avoided it) and the ride-along this card owns; the ids now come
|
|
62
|
+
* from the process rather than from a step name, so two steps starting the same
|
|
63
|
+
* process share one pair.
|
|
64
|
+
*/
|
|
65
|
+
export function processResourceBindings(spec, existing) {
|
|
66
|
+
const resourceKey = spec.resourceKey ?? `${spec.folderPath}.${spec.name}`;
|
|
67
|
+
const found = (attr) => [...existing.values()].find((b) => b.resource === 'process' && b.resourceKey === resourceKey && b.propertyAttribute === attr)?.id;
|
|
68
|
+
const already = { name: found('name'), folderPath: found('folderPath') };
|
|
69
|
+
if (already.name && already.folderPath) {
|
|
70
|
+
return { ids: { name: already.name, folderPath: already.folderPath }, entries: [] };
|
|
71
|
+
}
|
|
72
|
+
// A readable, stable id per process. Two processes sharing a NAME across folders
|
|
73
|
+
// would collide, so the id is suffixed until it is free — the queue emitter's
|
|
74
|
+
// shape, which this is a port of.
|
|
75
|
+
const slug = spec.name.replace(/[^A-Za-z0-9]/g, '') || 'Process';
|
|
76
|
+
let base = `b${slug.charAt(0).toUpperCase()}${slug.slice(1)}`;
|
|
77
|
+
for (let n = 2; existing.has(`${base}Name`) || existing.has(`${base}FolderPath`); n++) {
|
|
78
|
+
base = `b${slug.charAt(0).toUpperCase()}${slug.slice(1)}${n}`;
|
|
79
|
+
}
|
|
80
|
+
const ids = { name: `${base}Name`, folderPath: `${base}FolderPath` };
|
|
81
|
+
return { ids, entries: [
|
|
82
|
+
{
|
|
83
|
+
id: ids.name,
|
|
84
|
+
name: 'name',
|
|
85
|
+
type: 'string',
|
|
86
|
+
resource: 'process',
|
|
87
|
+
resourceKey,
|
|
88
|
+
default: spec.name,
|
|
89
|
+
propertyAttribute: 'name',
|
|
90
|
+
resourceSubType: spec.resourceSubType,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: ids.folderPath,
|
|
94
|
+
name: 'folderPath',
|
|
95
|
+
type: 'string',
|
|
96
|
+
resource: 'process',
|
|
97
|
+
resourceKey,
|
|
98
|
+
default: spec.folderPath,
|
|
99
|
+
propertyAttribute: 'folderPath',
|
|
100
|
+
resourceSubType: spec.resourceSubType,
|
|
101
|
+
},
|
|
102
|
+
] };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The four published-resource factories once each named the release key
|
|
106
|
+
* differently — `rpaWorkflow({process})`, `apiWorkflow({workflow})`,
|
|
107
|
+
* `agenticProcess({process})`, `agent({agent})` — for one identical thing: the
|
|
108
|
+
* GUID in a process's `Key` field. They are all `key` now.
|
|
109
|
+
*
|
|
110
|
+
* Flows authored against the old names would otherwise fail as "has no `key`",
|
|
111
|
+
* which points at the wrong problem. When the retired field is the one carrying a
|
|
112
|
+
* value, say so and name the replacement.
|
|
113
|
+
*/
|
|
114
|
+
export function renamedFieldMessage(label, step, oldField) {
|
|
115
|
+
return (`${label} step "${step}" uses \`${oldField}\`, which was renamed to \`key\`. All four ` +
|
|
116
|
+
`published-resource factories now take \`key\` — the GUID in the process's \`Key\` field ` +
|
|
117
|
+
`(\`uip or processes list\`) — so they read the same way. Rename \`${oldField}:\` to \`key:\`.`);
|
|
118
|
+
}
|
package/dist/decompile.js
CHANGED
|
@@ -183,6 +183,12 @@ function verClause(node) {
|
|
|
183
183
|
*/
|
|
184
184
|
function shippedVersions(type) {
|
|
185
185
|
const registered = FLOW_NODE_TYPES.byTypeName(type);
|
|
186
|
+
// A type that owns the names under a prefix (`uipath.core.api-workflow.<key>`)
|
|
187
|
+
// resolves a pin by its `<prefix>*` name, which no carried definition has, so
|
|
188
|
+
// it is treated as resolving its version elsewhere: its pin is kept and no
|
|
189
|
+
// `.definitions([...])` is offered that compile could not use (#1218).
|
|
190
|
+
if (registered?.type.typeNamePrefix !== undefined)
|
|
191
|
+
return [];
|
|
186
192
|
return registered ? Object.keys(registered.type.versions) : bundledVersions(type);
|
|
187
193
|
}
|
|
188
194
|
/**
|
|
@@ -1624,18 +1630,11 @@ function legacyAgentTemplateInput(v) {
|
|
|
1624
1630
|
return { ...o, type: 'jsExpression', expression: m[1] };
|
|
1625
1631
|
}
|
|
1626
1632
|
function emitPublishedResource(node, imp, inputNames) {
|
|
1633
|
+
// The published AGENT resource — the same shape as the process family's
|
|
1634
|
+
// node types (identity in the definition's binding pair, contract in its
|
|
1635
|
+
// output schema), which lift themselves (nodes/process/flow/).
|
|
1627
1636
|
const FAMILIES = [
|
|
1628
|
-
{ prefix: 'uipath.core.rpa-workflow.', factory: 'rpaWorkflow' },
|
|
1629
|
-
{ prefix: 'uipath.core.api-workflow.', factory: 'apiWorkflow' },
|
|
1630
|
-
{ prefix: 'uipath.core.function.', factory: 'publishedFunction' },
|
|
1631
|
-
// The published AGENT resource — same shape as its siblings (identity in
|
|
1632
|
-
// the definition's binding pair, contract in its output schema).
|
|
1633
1637
|
{ prefix: 'uipath.core.agent.', factory: 'agent' },
|
|
1634
|
-
// The Agentic Process umbrella: one factory, three wire identities. `bpmn`
|
|
1635
|
-
// is the default form, so only the other two name it.
|
|
1636
|
-
{ prefix: 'uipath.core.agentic-process.', factory: 'agenticProcess' },
|
|
1637
|
-
{ prefix: 'uipath.core.flow.', factory: 'agenticProcess', form: 'flow' },
|
|
1638
|
-
{ prefix: 'uipath.core.case-management.', factory: 'agenticProcess', form: 'case' },
|
|
1639
1638
|
];
|
|
1640
1639
|
const family = FAMILIES.find((f) => node.type.startsWith(f.prefix));
|
|
1641
1640
|
if (!family)
|
|
@@ -16,9 +16,10 @@ import { documentFlowFamily } from './nodes/document/flow/family.js';
|
|
|
16
16
|
import { hitlFlowFamily } from './nodes/hitl/flow/family.js';
|
|
17
17
|
import { httpFlowFamily } from './nodes/http/flow/family.js';
|
|
18
18
|
import { mockFlowFamily } from './nodes/mock/flow/family.js';
|
|
19
|
+
import { processFlowFamily } from './nodes/process/flow/family.js';
|
|
19
20
|
import { queueFlowFamily } from './nodes/queue/flow/family.js';
|
|
20
21
|
import { scriptFlowFamily } from './nodes/script/flow/family.js';
|
|
21
22
|
import { transformFlowFamily } from './nodes/transform/flow/family.js';
|
|
22
23
|
/** The families, in no significant order. Adding one is the whole of registering it. */
|
|
23
|
-
export const FLOW_NODE_FAMILIES = [aiPatternsFlowFamily, conversationFlowFamily, dataFabricFlowFamily, delayFlowFamily, documentFlowFamily, hitlFlowFamily, httpFlowFamily, mockFlowFamily, queueFlowFamily, scriptFlowFamily, transformFlowFamily];
|
|
24
|
+
export const FLOW_NODE_FAMILIES = [aiPatternsFlowFamily, conversationFlowFamily, dataFabricFlowFamily, delayFlowFamily, documentFlowFamily, hitlFlowFamily, httpFlowFamily, mockFlowFamily, processFlowFamily, queueFlowFamily, scriptFlowFamily, transformFlowFamily];
|
|
24
25
|
export const FLOW_NODE_TYPES = new NodeTypeRegistry('flow', FLOW_NODE_FAMILIES, { hasBundledDefinition });
|
package/dist/flow-sdk.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './nodes/document/flow/index.js';
|
|
|
26
26
|
export * from './nodes/hitl/flow/index.js';
|
|
27
27
|
export * from './nodes/http/flow/index.js';
|
|
28
28
|
export * from './nodes/mock/flow/index.js';
|
|
29
|
+
export * from './nodes/process/flow/index.js';
|
|
29
30
|
export * from './nodes/queue/flow/index.js';
|
|
30
31
|
export * from './nodes/script/flow/index.js';
|
|
31
32
|
export * from './nodes/transform/flow/index.js';
|
package/dist/flow-sdk.js
CHANGED
|
@@ -30,6 +30,7 @@ export * from './nodes/document/flow/index.js';
|
|
|
30
30
|
export * from './nodes/hitl/flow/index.js';
|
|
31
31
|
export * from './nodes/http/flow/index.js';
|
|
32
32
|
export * from './nodes/mock/flow/index.js';
|
|
33
|
+
export * from './nodes/process/flow/index.js';
|
|
33
34
|
export * from './nodes/queue/flow/index.js';
|
|
34
35
|
export * from './nodes/script/flow/index.js';
|
|
35
36
|
export * from './nodes/transform/flow/index.js';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The process family's rules: what is decidable from the call to `rpaWorkflow()`,
|
|
3
|
+
* `apiWorkflow()`, `publishedFunction()` or `agenticProcess()` (the three
|
|
4
|
+
* identifiers, the in-solution location, `returns`), and a read of each one's
|
|
5
|
+
* result. Moved from check.ts in Phase 4 of docs/NODE_TYPE_ARCHITECTURE_DESIGN.md;
|
|
6
|
+
* codes and messages unchanged. Whether the process exists, takes these
|
|
7
|
+
* arguments or returns these fields is the tenant's to say.
|
|
8
|
+
*/
|
|
9
|
+
import type { DiagnosticCatalog } from '../../../core/nodes/family.js';
|
|
10
|
+
import type { FieldsRead, OutputPathRead } from '../../../core/nodes/node-type.js';
|
|
11
|
+
import type { FlowCheckContext } from '../../../flow-node-type.js';
|
|
12
|
+
import type { AgenticProcessInputs, ApiWorkflowInputs, PublishedFunctionInputs, RpaWorkflowInputs } from './spec.js';
|
|
13
|
+
export declare const PROCESS_DIAGNOSTICS: DiagnosticCatalog;
|
|
14
|
+
/**
|
|
15
|
+
* Check an `rpaWorkflow(...)` call.
|
|
16
|
+
*
|
|
17
|
+
* WHAT THESE RULES CAN AND CANNOT SEE. Everything about a deployed process that
|
|
18
|
+
* matters — which arguments it takes, what it returns, whether it exists —
|
|
19
|
+
* lives on the tenant. So these rules cover exactly the mistakes that are
|
|
20
|
+
* decidable from the call itself, and the doc says plainly that the rest shows
|
|
21
|
+
* up as a faulted job on a live run. What is decidable:
|
|
22
|
+
*
|
|
23
|
+
* - a missing/blank `key`, `name` or `folderPath`. Any of the three missing
|
|
24
|
+
* is fatal in a way no later rung reports usefully: without `key` the node
|
|
25
|
+
* has no type suffix, and without the other two nothing can resolve the node's
|
|
26
|
+
* `resourceBindings.name` — which reads as an engine error rather than an
|
|
27
|
+
* authoring one.
|
|
28
|
+
* - a `key` that is not a GUID. The commonest form of this is passing the
|
|
29
|
+
* process's NAME where its release key belongs, which produces a node type
|
|
30
|
+
* the platform cannot resolve to anything.
|
|
31
|
+
* - a `name` that looks like a path (contains "/"). The two are swappable, and
|
|
32
|
+
* the resulting `resourceKey` is wrong in a way that only surfaces as a 400
|
|
33
|
+
* from Orchestrator ("Folder does not exist"). That is v1's own 2026-06-26
|
|
34
|
+
* failure mode on this task. A single-segment `folderPath` is NOT decidable:
|
|
35
|
+
* root folders and personal workspaces are one segment, so it is not flagged.
|
|
36
|
+
*/
|
|
37
|
+
export declare function checkRpaWorkflow(inputs: RpaWorkflowInputs | undefined, ctx: FlowCheckContext): void;
|
|
38
|
+
/**
|
|
39
|
+
* Check an `apiWorkflow(...)` call.
|
|
40
|
+
*
|
|
41
|
+
* Same three-identifier shape as `rpaWorkflow`, so the same three mistakes are
|
|
42
|
+
* decidable from the call itself (a blank field, a `key` that is not a key, and
|
|
43
|
+
* the swappable `name`/`folderPath` pair). Two things differ, and both come from
|
|
44
|
+
* the corpus rather than from the surface:
|
|
45
|
+
*
|
|
46
|
+
* - the node type's GUID is the workflow's PROCESS key — the `Key` field of
|
|
47
|
+
* `uip or processes list`, whose `ProcessKey` for an API workflow reads
|
|
48
|
+
* `<name>.api.<name>` — so the command to name in the diagnostic is that one;
|
|
49
|
+
* - `returns` matters MORE here than for rpa, because this task's whole answer is
|
|
50
|
+
* a field of the job's output. A read with no `returns` has no schema to check (and
|
|
51
|
+
* a read of an undeclared field is `undefined` everywhere), so both are said at
|
|
52
|
+
* rung 1 instead — see `checkApiWorkflowRead`.
|
|
53
|
+
*
|
|
54
|
+
* What no rule here can see stays what it is: whether the workflow exists, whether
|
|
55
|
+
* it takes these argument names, whether it returns these fields. Only the tenant
|
|
56
|
+
* knows, and a wrong one is a faulted job on a live run — which is what the `job`
|
|
57
|
+
* rung is for.
|
|
58
|
+
*/
|
|
59
|
+
export declare function checkApiWorkflow(inputs: ApiWorkflowInputs | undefined, ctx: FlowCheckContext): void;
|
|
60
|
+
/**
|
|
61
|
+
* A published FUNCTION step (Phase 5B).
|
|
62
|
+
*
|
|
63
|
+
* The same four identity mistakes as its published siblings, in this family's
|
|
64
|
+
* own vocabulary — and one of its own: a function is usually deployed into a
|
|
65
|
+
* folder of its own name, so `folderPath: 'Shared'` when the tenant says
|
|
66
|
+
* `Shared/<name>` points the binding's resourceKey at nothing.
|
|
67
|
+
*/
|
|
68
|
+
export declare function checkPublishedFunction(inputs: PublishedFunctionInputs | undefined, ctx: FlowCheckContext): void;
|
|
69
|
+
/**
|
|
70
|
+
* Check an `agenticProcess(...)` call.
|
|
71
|
+
*
|
|
72
|
+
* The same three-identifier shape as `rpaWorkflow`/`apiWorkflow`, so the same
|
|
73
|
+
* mistakes are decidable from the call itself. Two things are this family's own:
|
|
74
|
+
*
|
|
75
|
+
* - the node type's GUID is the process's own key — the `Key` field of
|
|
76
|
+
* `uip or processes list`, whose `ProcessKey` for an agentic process reads
|
|
77
|
+
* `<name>.agentic.<name>` — so that is the command the diagnostic names. And it
|
|
78
|
+
* names the pagination, because `--all-folders` returns 50 rows with
|
|
79
|
+
* `Pagination.HasMore: true` and no warning: the tenant this was written against
|
|
80
|
+
* has 98 processes, and the agentic ones are not all in the first page.
|
|
81
|
+
* - `fireAndForget` is a RESERVED input. It is the platform's design-time switch
|
|
82
|
+
* (flow-v1's `FIRE_AND_FORGET_INPUT`), and its serializer destructures it OUT of
|
|
83
|
+
* the node's inputs before emitting, so a process argument that happens to be
|
|
84
|
+
* called `fireAndForget` never reaches the process — silently, with a green run
|
|
85
|
+
* locally, because a runner that passes the whole envelope through sees nothing
|
|
86
|
+
* wrong.
|
|
87
|
+
*
|
|
88
|
+
* What no rule here can see stays what it is: whether the process exists, whether
|
|
89
|
+
* it takes these argument names, whether it returns these fields. Only the tenant
|
|
90
|
+
* knows, and a wrong one is a faulted job on a live run — which is what the `job`
|
|
91
|
+
* rung is for.
|
|
92
|
+
*/
|
|
93
|
+
export declare function checkAgenticProcess(inputs: AgenticProcessInputs | undefined, ctx: FlowCheckContext): void;
|
|
94
|
+
/**
|
|
95
|
+
* How an RPA step's result read is worded — the shared `<PREFIX>_READ_*` rule
|
|
96
|
+
* the pipeline's `fields` reader runs (`checkDeclaredOutputRead`).
|
|
97
|
+
*/
|
|
98
|
+
export declare function rpaWorkflowRead(spec: RpaWorkflowInputs | undefined): FieldsRead;
|
|
99
|
+
/** A read of a published function's result — the api-workflow rules, this family's codes. */
|
|
100
|
+
export declare function checkPublishedFunctionRead({ node: name, field, rest, reader: step }: OutputPathRead, spec: PublishedFunctionInputs, report: (code: string, message: string, suggestion?: string) => void): void;
|
|
101
|
+
export declare function checkApiWorkflowRead({ node: name, field, rest, reader: step }: OutputPathRead, spec: ApiWorkflowInputs, report: (code: string, message: string, suggestion?: string) => void): void;
|
|
102
|
+
/**
|
|
103
|
+
* A read of an agentic process's output: `out('<step>', '<field>')`.
|
|
104
|
+
*
|
|
105
|
+
* `waitForJob` records the job's `OutputArguments` UNWRAPPED under `output`, so the
|
|
106
|
+
* readable fields are exactly the ones `returns` declares. The three mistakes are
|
|
107
|
+
* api-workflow's, and one of them has a sharper edge here: a process may DECLARE a
|
|
108
|
+
* field and return it EMPTY (`ProcurementProcess` declares `{status: boolean}` and
|
|
109
|
+
* answers `{"status": null}` on every job), so a declared read is checkable but a
|
|
110
|
+
* non-empty VALUE is not something any offline gate can promise.
|
|
111
|
+
*/
|
|
112
|
+
export declare function checkAgenticProcessRead({ node: name, field, rest, reader: step }: OutputPathRead, spec: AgenticProcessInputs, report: (code: string, message: string, suggestion?: string) => void): void;
|