@uipath/maestro-builder-sdk 6.16.14 → 6.17.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/README.md +2 -2
- package/dist/api-index.md +115 -114
- package/dist/api-members.md +295 -291
- package/dist/bindings-v2.d.ts +39 -1
- package/dist/bindings-v2.js +289 -9
- package/dist/bpmn/compile-cli.js +11 -2
- package/dist/bpmn/decompile.js +2 -1
- package/dist/bpmn/registry-fallback.js +9 -7
- package/dist/case/compile-cli.js +16 -6
- package/dist/case/decompile-cli.js +2 -1
- package/dist/case/decompile.js +3 -2
- package/dist/case/merge-cli.js +3 -2
- package/dist/check-cli.js +2 -30
- package/dist/check.js +278 -55
- package/dist/cli-library.d.ts +18 -4
- package/dist/cli-library.js +24 -6
- package/dist/cli-result.d.ts +9 -0
- package/dist/cli-result.js +12 -0
- package/dist/compile-cli.js +82 -86
- package/dist/core/actions.d.ts +71 -17
- package/dist/core/agentic-process-forms.d.ts +51 -0
- package/dist/core/agentic-process-forms.js +49 -0
- package/dist/core/binding-messages.d.ts +5 -0
- package/dist/core/cli-library.d.ts +16 -7
- package/dist/core/cli-library.js +53 -19
- package/dist/core/comment-text.d.ts +29 -0
- package/dist/core/comment-text.js +40 -0
- package/dist/core/connector-checks.d.ts +18 -2
- package/dist/core/connector-checks.js +15 -5
- package/dist/core/contribution-bindings.d.ts +73 -0
- package/dist/core/contribution-bindings.js +105 -0
- package/dist/core/error-port.d.ts +25 -0
- package/dist/core/error-port.js +36 -0
- package/dist/core/expr-check.js +7 -2
- package/dist/core/expr.d.ts +11 -5
- package/dist/core/expr.js +9 -3
- package/dist/core/json-file.d.ts +1 -0
- package/dist/core/json-file.js +12 -0
- package/dist/core/library.d.ts +19 -0
- package/dist/core/library.js +22 -6
- package/dist/core/script-return.js +4 -1
- package/dist/core/typed-raw-node.js +1 -0
- package/dist/core/typescript-module.d.ts +2 -0
- package/dist/core/typescript-module.js +18 -0
- package/dist/core-definitions.json +210 -0
- package/dist/decompile-cli.js +2 -1
- package/dist/decompile.js +64 -24
- package/dist/emit.js +4 -3
- package/dist/flow-sdk.d.ts +18 -12
- package/dist/flow-sdk.js +19 -8
- package/dist/flow-step-tree.d.ts +2 -3
- package/dist/flow-step-tree.js +2 -3
- package/dist/load.js +1 -1
- package/dist/merge-cli.js +3 -2
- package/dist/merge.d.ts +2 -1
- package/dist/merge.js +0 -0
- package/dist/path-within.d.ts +33 -0
- package/dist/path-within.js +41 -0
- package/dist/registry/archive/extract.js +2 -5
- package/dist/registry/curated-overlay.js +3 -2
- package/dist/registry/generators/descriptors.js +20 -18
- package/dist/registry/generators/triggers.js +4 -4
- package/dist/registry/prepare/messages.js +2 -1
- package/dist/registry/prepare/source-labels.js +60 -1
- package/dist/registry/prepare-cli.js +14 -4
- package/dist/registry/pull-cli.js +3 -2
- package/dist/registry/uip/client.d.ts +28 -3
- package/dist/registry/uip/client.js +95 -34
- package/dist/registry/uip/host.d.ts +41 -0
- package/dist/registry/uip/host.js +312 -0
- package/dist/serialize.d.ts +7 -0
- package/dist/serialize.js +414 -277
- package/dist/workdir.js +1 -1
- package/package.json +3 -3
package/dist/compile-cli.js
CHANGED
|
@@ -17,18 +17,20 @@
|
|
|
17
17
|
* product's own gates are supposed to answer. `.build()` still throws on
|
|
18
18
|
* structural problems; only the diagnostic pass is skipped.
|
|
19
19
|
*/
|
|
20
|
-
import { reportDiagnostics, reportResult } from './cli-result.js';
|
|
21
|
-
import {
|
|
20
|
+
import { reportDiagnostics, reportResult, thrownDiagnostic } from './cli-result.js';
|
|
21
|
+
import { writeJsonFile } from './core/json-file.js';
|
|
22
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync } from 'node:fs';
|
|
22
23
|
import { basename, dirname, join, resolve } from 'node:path';
|
|
23
24
|
import { resolveFlowFile, loadBuiltFlow } from './load.js';
|
|
24
|
-
import { serializeWithSidecars,
|
|
25
|
+
import { serializeWithSidecars, compileOwnsResource } from './serialize.js';
|
|
25
26
|
import { check } from './check.js';
|
|
26
|
-
import {
|
|
27
|
+
import { flowCheckOpts, openCliLibrary } from './cli-library.js';
|
|
27
28
|
import { Bindings } from './bindings.js';
|
|
28
29
|
import { flagValue, runWhenInvokedDirectly } from './cli-run.js';
|
|
29
|
-
import { connectionResources, mergeBindingsV2, readBindingsV2 } from './bindings-v2.js';
|
|
30
|
+
import { connectionResources, inlineAgentResources, mergeBindingsV2, mergeInlineAgentResources, readBindingsV2, readInlineAgentFiles, } from './bindings-v2.js';
|
|
30
31
|
import { ensureTypeScriptRuntime } from './node-runtime.js';
|
|
31
32
|
import { defaultBindingsFile } from './workdir.js';
|
|
33
|
+
import { isWithin } from './path-within.js';
|
|
32
34
|
import { BindingRefusal } from './core/binding-messages.js';
|
|
33
35
|
import { ByoaRefusal } from './core/byoa.js';
|
|
34
36
|
export async function run(argv) {
|
|
@@ -65,43 +67,17 @@ export async function run(argv) {
|
|
|
65
67
|
const library = openCliLibrary(argv);
|
|
66
68
|
const bindFile = flagValue(argv, '--bindings') ?? defaultBindingsFile();
|
|
67
69
|
const bindings = new Bindings(bindFile);
|
|
70
|
+
// One list per run; every exit path reports it (reportResult overwrites keys).
|
|
71
|
+
const diagnostics = [];
|
|
68
72
|
if (!noCheck) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// The refusal serialize() would throw for an event it cannot resolve,
|
|
72
|
-
// printed as `✗ [EVENT_UNKNOWN]` before stopping instead of hiding
|
|
73
|
-
// behind "1 error(s); not emitting".
|
|
74
|
-
eventResolveError: eventResolveErrorFor(library),
|
|
75
|
-
...byoaCheckOpts(library),
|
|
76
|
-
eventParams: (connector, event) => {
|
|
77
|
-
try {
|
|
78
|
-
return library.eventParameterFields(connector, event);
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
return undefined; // unresolvable: serialize() reports it properly
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
lookups: (connector, action, version, object) => library.lookupSpecs(connector, action, version, object),
|
|
85
|
-
resolutions: library.lookupResolutions,
|
|
86
|
-
// Same validator serialize() runs below, so the check pass names the
|
|
87
|
-
// refusal (and stops) instead of printing `0 error(s)` first.
|
|
88
|
-
connectorInputs: (spec, inputs) => {
|
|
89
|
-
try {
|
|
90
|
-
const rc = library.resolve(spec.key, spec.action, spec.version, spec.object);
|
|
91
|
-
return connectorInputErrors(rc, inputs, library.lookupResolutions ?? {}, library.lookupSpecs(spec.key, spec.action, spec.version, spec.object) ?? {});
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
return undefined;
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
bindings,
|
|
98
|
-
}
|
|
99
|
-
: { bindings });
|
|
73
|
+
// Same options as `flow check`, so the two cannot disagree.
|
|
74
|
+
const diags = check(built, flowCheckOpts(library, bindings));
|
|
100
75
|
const errors = diags.filter((d) => d.level === 'error');
|
|
101
76
|
for (const d of diags)
|
|
102
77
|
console.error(` ${d.level === 'error' ? '✗' : '⚠'} [${d.code}] ${d.message}${d.suggestion ? ` (did you mean "${d.suggestion}"?)` : ''}`);
|
|
78
|
+
diagnostics.push(...diags);
|
|
103
79
|
if (errors.length) {
|
|
104
|
-
reportDiagnostics(
|
|
80
|
+
reportDiagnostics(diagnostics);
|
|
105
81
|
console.error(`compile: ${errors.length} error(s); not emitting.`);
|
|
106
82
|
return 1;
|
|
107
83
|
}
|
|
@@ -121,28 +97,27 @@ export async function run(argv) {
|
|
|
121
97
|
emitted = serializeWithSidecars(built, { library, bindings, warn: (w) => warnings.push(w) });
|
|
122
98
|
}
|
|
123
99
|
catch (error) {
|
|
124
|
-
if (!(error instanceof BindingRefusal || error instanceof ByoaRefusal))
|
|
125
|
-
throw error;
|
|
126
100
|
for (const w of warnings)
|
|
127
101
|
console.error(` ⚠ [${w.code}] ${w.message}`);
|
|
102
|
+
diagnostics.push(...warnings.map(serializeWarningDiagnostic));
|
|
103
|
+
if (!(error instanceof BindingRefusal || error instanceof ByoaRefusal)) {
|
|
104
|
+
// Any other throw still ends the run through the caller (exit 1, `--json`
|
|
105
|
+
// `error`); the list is reported first.
|
|
106
|
+
diagnostics.push(thrownDiagnostic(error));
|
|
107
|
+
reportDiagnostics(diagnostics);
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
128
110
|
console.error(` ✗ [${error.code}] ${error.message}`);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
{ level: 'error', code: error.code, message: error.message },
|
|
132
|
-
]);
|
|
111
|
+
diagnostics.push({ level: 'error', code: error.code, message: error.message });
|
|
112
|
+
reportDiagnostics(diagnostics);
|
|
133
113
|
console.error('compile: 1 error(s); not emitting.');
|
|
134
114
|
return 1;
|
|
135
115
|
}
|
|
136
116
|
const { flow: flowJson, sidecars } = emitted;
|
|
137
117
|
for (const w of warnings)
|
|
138
118
|
console.error(` ⚠ [${w.code}] ${w.message}`);
|
|
119
|
+
diagnostics.push(...warnings.map(serializeWarningDiagnostic));
|
|
139
120
|
const out = flagValue(argv, '-o') ?? `${built.name || basename(file).replace(/\.flow\.ts$|\.ts$/, '')}.flow`;
|
|
140
|
-
writeFileSync(out, JSON.stringify(flowJson, null, 2) + '\n');
|
|
141
|
-
console.log(`compile: wrote ${out} (${flowJson.nodes.length} nodes, ${flowJson.edges.length} edges)`);
|
|
142
|
-
const written = [];
|
|
143
|
-
reportResult({ path: resolve(out), nodes: flowJson.nodes.length, edges: flowJson.edges.length, sidecars: written });
|
|
144
|
-
// Same keys and types as a failed compile: `warnings` a count, `diagnostics` the list.
|
|
145
|
-
reportDiagnostics(warnings.map((w) => ({ level: 'warning', code: w.code, message: w.message })));
|
|
146
121
|
// An inline agent is TWO artifacts: the node, and the agent's own configuration
|
|
147
122
|
// at `<source>/agent.json` — which is where flow-v1's serializer points the
|
|
148
123
|
// runtime (`entryPoint: "<source>/agent.json"`, resolved relative to the
|
|
@@ -151,19 +126,31 @@ export async function run(argv) {
|
|
|
151
126
|
// Sidecar paths are relative to the emitted flow, and are confined to its
|
|
152
127
|
// directory: a `..` or absolute path in one would be a bug here, not author
|
|
153
128
|
// input, but it is cheap to refuse rather than write outside the project.
|
|
129
|
+
//
|
|
130
|
+
// Every sidecar is checked before anything is written; success is reported
|
|
131
|
+
// only once every file is on disk.
|
|
154
132
|
const outDir = dirname(resolve(out));
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
133
|
+
const targets = sidecars.map((s) => ({ sidecar: s, target: resolve(outDir, s.path) }));
|
|
134
|
+
const escaping = targets.find(({ target }) => target === outDir || !isWithin(outDir, target));
|
|
135
|
+
if (escaping) {
|
|
136
|
+
const message = `refusing to write a sidecar outside the flow's directory: ${escaping.sidecar.path}`;
|
|
137
|
+
console.error(`compile: ${message}; not emitting.`);
|
|
138
|
+
diagnostics.push({ level: 'error', code: 'SIDECAR_OUTSIDE_FLOW_DIR', message });
|
|
139
|
+
reportDiagnostics(diagnostics);
|
|
140
|
+
return 1;
|
|
141
|
+
}
|
|
142
|
+
// Reported before the first write, so a write that throws still carries it.
|
|
143
|
+
reportDiagnostics(diagnostics);
|
|
144
|
+
writeJsonFile(out, flowJson);
|
|
145
|
+
console.log(`compile: wrote ${out} (${flowJson.nodes.length} nodes, ${flowJson.edges.length} edges)`);
|
|
146
|
+
const written = [];
|
|
147
|
+
for (const { sidecar, target } of targets) {
|
|
162
148
|
mkdirSync(dirname(target), { recursive: true });
|
|
163
|
-
|
|
164
|
-
console.log(`compile: wrote ${
|
|
149
|
+
writeJsonFile(target, sidecar.json);
|
|
150
|
+
console.log(`compile: wrote ${sidecar.path}`);
|
|
165
151
|
written.push(target);
|
|
166
152
|
}
|
|
153
|
+
reportResult({ path: resolve(out), nodes: flowJson.nodes.length, edges: flowJson.edges.length, sidecars: written });
|
|
167
154
|
// PRUNE the agent resources this compile owns but did not write this time.
|
|
168
155
|
// Compile otherwise only ever ADDS files, and an agent resource is keyed by a
|
|
169
156
|
// uuid derived from the step name and the resource's identity — so dropping a
|
|
@@ -180,13 +167,14 @@ export async function run(argv) {
|
|
|
180
167
|
// families the SDK cannot into the same directory (including `internal`
|
|
181
168
|
// built-ins such as `load-attachments`), so anything else found there is
|
|
182
169
|
// someone else's and is left alone.
|
|
183
|
-
const
|
|
170
|
+
const removedResources = [];
|
|
184
171
|
const owned = new Set(sidecars
|
|
185
172
|
.filter((s) => /\/resources\/[^/]+\/resource\.json$/.test(s.path))
|
|
186
173
|
.map((s) => resolve(outDir, s.path)));
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
174
|
+
const agentDirs = [...new Set(sidecars
|
|
175
|
+
.filter((s) => s.path.endsWith('/agent.json'))
|
|
176
|
+
.map((s) => dirname(resolve(outDir, s.path))))];
|
|
177
|
+
for (const agentDir of agentDirs) {
|
|
190
178
|
const resourcesDir = join(agentDir, 'resources');
|
|
191
179
|
if (!existsSync(resourcesDir))
|
|
192
180
|
continue;
|
|
@@ -203,23 +191,7 @@ export async function run(argv) {
|
|
|
203
191
|
}
|
|
204
192
|
if (!compileOwnsResource(body))
|
|
205
193
|
continue;
|
|
206
|
-
|
|
207
|
-
// The binding `uip agent refresh` derived FROM this file has to go with it.
|
|
208
|
-
// Refresh will not retract it: with no resources left it writes nothing, and
|
|
209
|
-
// `mergeBindingsV2` preserves every non-connection entry, so the removed
|
|
210
|
-
// index would stay declared in `bindings_v2.json` and a deploy could still
|
|
211
|
-
// fail on it. Keyed the way refresh keys it — an index by its name.
|
|
212
|
-
const named = body?.indexName ?? body?.name;
|
|
213
|
-
const key = typeof named === 'string' && named !== '' ? named : undefined;
|
|
214
|
-
// A connector tool's binding is a `connection` row, and `mergeBindingsV2`
|
|
215
|
-
// re-derives every connection row from the flow below — nothing to retract.
|
|
216
|
-
// A built-in (`internal`) tool binds nothing at all: retracting a `process`
|
|
217
|
-
// row under its label could only remove a real process tool's binding.
|
|
218
|
-
if (key !== undefined && body?.type !== 'integration' && body?.type !== 'internal') {
|
|
219
|
-
// Keyed the way refresh keys it: an index by its name, a deployed-resource
|
|
220
|
-
// tool under `process` whatever its own type says.
|
|
221
|
-
staleBindings.push({ resource: resourceType === 'context' ? 'index' : 'process', key });
|
|
222
|
-
}
|
|
194
|
+
removedResources.push(body);
|
|
223
195
|
rmSync(join(resourcesDir, entry), { recursive: true, force: true });
|
|
224
196
|
console.log(`compile: removed stale ${join('resources', entry, 'resource.json')}`);
|
|
225
197
|
}
|
|
@@ -235,20 +207,44 @@ export async function run(argv) {
|
|
|
235
207
|
const sidecarPath = join(outDir, 'bindings_v2.json');
|
|
236
208
|
const connections = connectionResources(flowJson);
|
|
237
209
|
const existing = readBindingsV2(sidecarPath);
|
|
210
|
+
// Each inline agent's own rows (process, index, app, … — #962), derived from
|
|
211
|
+
// the agent directory as it now stands on disk, the way `uip agent refresh
|
|
212
|
+
// --inline-in-flow` derives them. `uip agent validate --inline-in-flow`
|
|
213
|
+
// requires every one of them, so leaving them to a refresh the SDK route
|
|
214
|
+
// never runs made every agent with a deployed-resource tool, a context index
|
|
215
|
+
// or an app escalation fail validate with `AgentValidationDrift`.
|
|
216
|
+
const agentRows = agentDirs
|
|
217
|
+
.map((dir) => readInlineAgentFiles(dir))
|
|
218
|
+
.filter((files) => files !== undefined)
|
|
219
|
+
.map((files) => inlineAgentResources(files));
|
|
220
|
+
// The rows a PRUNED resource declared go with it: refresh never retracts a
|
|
221
|
+
// row, so an index the flow dropped would stay declared and a deploy could
|
|
222
|
+
// still fail on it. Generated by the same function, so they match exactly,
|
|
223
|
+
// and kept when a resource that still exists declares the same row.
|
|
224
|
+
// Connection rows are skipped: every one is re-derived from the flow below.
|
|
225
|
+
const live = new Set(agentRows.flat().map((r) => `${r.resource}\u0000${r.key}`));
|
|
226
|
+
const stale = new Set(inlineAgentResources({ agent: {}, resources: removedResources, features: [] })
|
|
227
|
+
.filter((r) => r.resource !== 'connection' && !live.has(`${r.resource}\u0000${r.key}`))
|
|
228
|
+
.map((r) => `${r.resource}\u0000${r.key}`));
|
|
238
229
|
// Nothing to declare and nothing already declared — do not create an empty
|
|
239
230
|
// file for a flow that has no resources at all.
|
|
240
|
-
if (connections.length > 0 || existing !== undefined) {
|
|
231
|
+
if (connections.length > 0 || existing !== undefined || agentRows.some((rows) => rows.length > 0)) {
|
|
241
232
|
const merged = mergeBindingsV2(existing, connections);
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
merged.resources = merged.resources
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const
|
|
233
|
+
merged.resources = merged.resources.filter((r) => !stale.has(`${r.resource}\u0000${r.key}`));
|
|
234
|
+
for (const rows of agentRows)
|
|
235
|
+
merged.resources = mergeInlineAgentResources(merged.resources, rows);
|
|
236
|
+
writeJsonFile(sidecarPath, merged);
|
|
237
|
+
const derived = new Set([...connections, ...agentRows.flat()].map((r) => `${r.resource}\u0000${r.key}`));
|
|
238
|
+
const agentCount = merged.resources.filter((r) => r.resource !== 'connection' && derived.has(`${r.resource}\u0000${r.key}`)).length;
|
|
239
|
+
const kept = merged.resources.filter((r) => !derived.has(`${r.resource}\u0000${r.key}`)).length;
|
|
248
240
|
console.log(`compile: wrote bindings_v2.json (${connections.length} connection resource(s)`
|
|
241
|
+
+ `${agentCount > 0 ? `, ${agentCount} inline-agent resource(s)` : ''}`
|
|
249
242
|
+ `${kept > 0 ? `, ${kept} other resource(s) preserved` : ''})`);
|
|
250
243
|
}
|
|
251
244
|
}
|
|
252
245
|
return 0;
|
|
253
246
|
}
|
|
247
|
+
function serializeWarningDiagnostic(w) {
|
|
248
|
+
return { level: 'warning', code: w.code, message: w.message };
|
|
249
|
+
}
|
|
254
250
|
runWhenInvokedDirectly(import.meta.url, 'compile', run);
|
package/dist/core/actions.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ interface HttpInputsBase {
|
|
|
58
58
|
* an error port only makes sense here (`check` says so: HTTP_ONERROR_V1).
|
|
59
59
|
* The handler can answer the flow (`.return`), stop the run
|
|
60
60
|
* (`.terminate`), or compensate and continue at a step the success path
|
|
61
|
-
* also reaches (`h.
|
|
61
|
+
* also reaches (`h.stepToRef('<step>')` — see `references/error-handling.md`);
|
|
62
62
|
* - both nodes expose JSON responses as parsed values in the live product;
|
|
63
63
|
* use `returns` to declare fields before reading them. The node choice does
|
|
64
64
|
* not decide whether application/json is parsed.
|
|
@@ -981,21 +981,48 @@ export type DelayInputs = {
|
|
|
981
981
|
/** Impossible together with `until` — a delay waits one way or the other. */
|
|
982
982
|
duration?: never;
|
|
983
983
|
};
|
|
984
|
+
/**
|
|
985
|
+
* Where a process resource lives: deployed to an Orchestrator folder
|
|
986
|
+
* (`'published'`, the default) or a sibling project of the SAME solution
|
|
987
|
+
* (`'in-solution'`). Shared by `rpaWorkflow`, `agenticProcess` and `agent`.
|
|
988
|
+
*/
|
|
989
|
+
export type ProcessLocation = 'published' | 'in-solution';
|
|
984
990
|
export interface RpaWorkflowInputs {
|
|
985
991
|
/**
|
|
986
992
|
* The published process's release key (a GUID). It becomes part of the node's
|
|
987
993
|
* type, `uipath.core.rpa-workflow.<key>`. Find it with
|
|
988
994
|
* `uip or processes list --all-folders --process-type Process` (the row's `Key`)
|
|
989
995
|
* or `uip maestro flow registry search "uipath.core.rpa-workflow"`.
|
|
996
|
+
*
|
|
997
|
+
* For an in-solution sibling it is `resource.key` from
|
|
998
|
+
* `resources/solution_folder/process/process/<project>.json` — the suffix of the
|
|
999
|
+
* node type `uip maestro flow registry list --local` shows.
|
|
990
1000
|
*/
|
|
991
1001
|
key: string;
|
|
992
1002
|
/** The process's name in Orchestrator — e.g. `'RPA Workflow'`. */
|
|
993
1003
|
name: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Where the process lives. `'published'` (the default) is a process deployed
|
|
1006
|
+
* to `folderPath`. `'in-solution'` is a sibling RPA project of the same
|
|
1007
|
+
* solution: it needs `projectId` and no `folderPath`.
|
|
1008
|
+
*/
|
|
1009
|
+
location?: ProcessLocation;
|
|
994
1010
|
/**
|
|
995
1011
|
* The Orchestrator folder holding the process — e.g.
|
|
996
|
-
* `'Shared/uipath-maestro-flow/ProjectEuler RPA'`.
|
|
1012
|
+
* `'Shared/uipath-maestro-flow/ProjectEuler RPA'`. Required for a published
|
|
1013
|
+
* process; omit it for an in-solution sibling.
|
|
1014
|
+
*
|
|
1015
|
+
* @enforcedBy RPA_NO_FOLDER A published process needs its folder.
|
|
997
1016
|
*/
|
|
998
|
-
folderPath
|
|
1017
|
+
folderPath?: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* The sibling RPA project's `resource.projectKey`, read from
|
|
1020
|
+
* `resources/solution_folder/process/process/<project>.json`. Required only
|
|
1021
|
+
* when `location` is `'in-solution'`.
|
|
1022
|
+
*
|
|
1023
|
+
* @enforcedBy RPA_LOCAL_NO_PROJECT_ID An in-solution process needs its project id.
|
|
1024
|
+
*/
|
|
1025
|
+
projectId?: string;
|
|
999
1026
|
/**
|
|
1000
1027
|
* The PROCESS's own input arguments, by its own argument names (e.g.
|
|
1001
1028
|
* `{ problemId: 123 }`). Not a fixed schema — every process declares its own,
|
|
@@ -1101,11 +1128,33 @@ interface AgenticProcessInputsBase {
|
|
|
1101
1128
|
key: string;
|
|
1102
1129
|
/** The process's name in Orchestrator — e.g. `'ProcurementProcess'`. */
|
|
1103
1130
|
name: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Where the process lives. `'published'` (the default) is a process deployed
|
|
1133
|
+
* to `folderPath`. `'in-solution'` is a sibling Flow of the same solution, so
|
|
1134
|
+
* it needs `form: 'flow'`, `projectId` and no `folderPath`; `key` is the
|
|
1135
|
+
* sibling's `resource.key` from `resources/solution_folder/process/flow/<project>.json`.
|
|
1136
|
+
* Only the Flow form has been run in-solution; `'bpmn'` and `'case'` siblings
|
|
1137
|
+
* are refused until they are.
|
|
1138
|
+
*
|
|
1139
|
+
* @enforcedBy AGENTIC_LOCAL_FORM_UNVERIFIED In-solution is supported for `form: 'flow'` only.
|
|
1140
|
+
*/
|
|
1141
|
+
location?: ProcessLocation;
|
|
1104
1142
|
/**
|
|
1105
1143
|
* The Orchestrator folder holding it — e.g.
|
|
1106
|
-
* `'Shared/uipath-agents/ProcurementProcess'`.
|
|
1144
|
+
* `'Shared/uipath-agents/ProcurementProcess'`. Required for a published
|
|
1145
|
+
* process; omit it for an in-solution sibling.
|
|
1146
|
+
*
|
|
1147
|
+
* @enforcedBy AGENTIC_NO_FOLDER A published process needs its folder.
|
|
1107
1148
|
*/
|
|
1108
|
-
folderPath
|
|
1149
|
+
folderPath?: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* The sibling project's `resource.projectKey`, read from the same resource
|
|
1152
|
+
* file as `key` (`resources/solution_folder/process/flow/<project>.json`).
|
|
1153
|
+
* Required only when `location` is `'in-solution'`.
|
|
1154
|
+
*
|
|
1155
|
+
* @enforcedBy AGENTIC_LOCAL_NO_PROJECT_ID An in-solution process needs its project id.
|
|
1156
|
+
*/
|
|
1157
|
+
projectId?: string;
|
|
1109
1158
|
/**
|
|
1110
1159
|
* The PROCESS's own input arguments, by its own argument names (e.g.
|
|
1111
1160
|
* `{ productId: 1 }`). Not a fixed schema — every agentic process declares its
|
|
@@ -1167,7 +1216,7 @@ export type AgenticProcessInputs = AgenticProcessInputsBase & AgenticProcessComp
|
|
|
1167
1216
|
* resource. Display-only — see {@link AgentInputs.flavour}.
|
|
1168
1217
|
*/
|
|
1169
1218
|
export type AgentFlavour = 'coded' | 'lowcode';
|
|
1170
|
-
export type AgentLocation =
|
|
1219
|
+
export type AgentLocation = ProcessLocation;
|
|
1171
1220
|
export interface AgentInputs {
|
|
1172
1221
|
/**
|
|
1173
1222
|
* The agent resource key (a GUID). It becomes the node's TYPE,
|
|
@@ -1526,15 +1575,15 @@ export interface InlineAgentInputs {
|
|
|
1526
1575
|
maxIterations?: number;
|
|
1527
1576
|
/**
|
|
1528
1577
|
* The harness the agent runs on — `'standard'` (the default) or
|
|
1529
|
-
* `'advanced'
|
|
1530
|
-
*
|
|
1531
|
-
* definition
|
|
1578
|
+
* `'advanced'`, written to the `agent.json`'s `settings.mode`. It does not
|
|
1579
|
+
* change the node's version: every inline agent emits the bundle's newest
|
|
1580
|
+
* `uipath.agent.autonomous` definition (1.4).
|
|
1532
1581
|
*/
|
|
1533
1582
|
mode?: 'standard' | 'advanced';
|
|
1534
1583
|
/**
|
|
1535
1584
|
* Safety rails over the agent's inputs, outputs, LLM calls and tools — the
|
|
1536
|
-
* platform's own array shape ({@link AgentGuardrail}), carried
|
|
1537
|
-
* (
|
|
1585
|
+
* platform's own array shape ({@link AgentGuardrail}), carried in the
|
|
1586
|
+
* `agent.json` (every bundled definition declares the input).
|
|
1538
1587
|
*
|
|
1539
1588
|
* ```ts
|
|
1540
1589
|
* guardrails: [{
|
|
@@ -1550,8 +1599,8 @@ export interface InlineAgentInputs {
|
|
|
1550
1599
|
guardrails?: AgentGuardrail[];
|
|
1551
1600
|
/**
|
|
1552
1601
|
* Attach an episodic memory so the agent learns from past runs — one
|
|
1553
|
-
* {@link AgentMemoryRef}, wired to the agent's `memory` handle (
|
|
1554
|
-
* definition
|
|
1602
|
+
* {@link AgentMemoryRef}, wired to the agent's `memory` handle (declared by
|
|
1603
|
+
* the bundled 1.4 definition, which every inline agent uses).
|
|
1555
1604
|
*/
|
|
1556
1605
|
memory?: AgentMemoryRef;
|
|
1557
1606
|
/**
|
|
@@ -1764,9 +1813,9 @@ export interface HttpRequestToolRef {
|
|
|
1764
1813
|
* An episodic memory the agent learns from across runs, wired to the agent's
|
|
1765
1814
|
* own `memory` handle. Node type
|
|
1766
1815
|
* `uipath.agent.resource.memory.<name-slug>.<id-slug>`, minted exactly as the
|
|
1767
|
-
* platform's mapper does.
|
|
1768
|
-
* (
|
|
1769
|
-
*
|
|
1816
|
+
* platform's mapper does. The handle is LOCAL content on the bundled
|
|
1817
|
+
* `uipath.agent.autonomous@1.4` (#431): the registry's own 1.4 declares no
|
|
1818
|
+
* `memory` handle, so `check` refuses this today (AGENT_MEMORY_NOT_AUTHORABLE).
|
|
1770
1819
|
*/
|
|
1771
1820
|
export interface AgentMemoryRef {
|
|
1772
1821
|
/** The memory's display name on the tenant. */
|
|
@@ -1960,7 +2009,12 @@ export interface EscalationRef {
|
|
|
1960
2009
|
key: string;
|
|
1961
2010
|
/** The app's name, e.g. `'ContentReviewApp'`. */
|
|
1962
2011
|
name: string;
|
|
1963
|
-
/**
|
|
2012
|
+
/**
|
|
2013
|
+
* The Orchestrator folder the app lives in, e.g. `'Shared/Approvals'`.
|
|
2014
|
+
* Omit it for an app that ships in this solution: compile then writes
|
|
2015
|
+
* `'solution_folder'`, the `Folder` `uip solution resources list` reports
|
|
2016
|
+
* for a solution-internal app.
|
|
2017
|
+
*/
|
|
1964
2018
|
folderPath?: string;
|
|
1965
2019
|
/** The fields the agent hands the reviewer — becomes the app's `inputSchema`. */
|
|
1966
2020
|
inputs?: Record<string, InlineAgentFieldType>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three published forms under the Agentic Process umbrella (design §2.1).
|
|
3
|
+
* One public factory, three wire identities — transcribed from flow-v1's
|
|
4
|
+
* `RESOURCE_TYPE_METADATA` (ProcessOrchestration / Flow / CaseManagement):
|
|
5
|
+
* node-type segment, category, icon, resource subtype, `orchestratorType`
|
|
6
|
+
* (`resourceType.toLowerCase()`, per `createModel`), and the sync/async
|
|
7
|
+
* service-type pair. All three declare the fire-and-forget switch.
|
|
8
|
+
*
|
|
9
|
+
* `solutionFolder` is the folder under `resources/solution_folder/process/`
|
|
10
|
+
* that holds an in-solution sibling's resource file (e.g. a sibling Flow lands in
|
|
11
|
+
* `process/flow/Notifier.json`). The solution writer names it
|
|
12
|
+
* `toLowerFirstChar(resource.type)`: `@uipath/resource-builder-sdk`
|
|
13
|
+
* `MultiFileSolutionDefinitionProvider.buildResourceRelativePath`, with the
|
|
14
|
+
* process types `flow`, `processOrchestration` and `caseManagement` from that
|
|
15
|
+
* package's resource-type catalog.
|
|
16
|
+
*
|
|
17
|
+
* Shared by the serializer (which emits the node) and `check` (which names the
|
|
18
|
+
* resource file in `AGENTIC_LOCAL_NO_PROJECT_ID`), so the two can never disagree
|
|
19
|
+
* about what a form is.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AGENTIC_PROCESS_FORMS: {
|
|
22
|
+
readonly bpmn: {
|
|
23
|
+
readonly prefix: "uipath.core.agentic-process.";
|
|
24
|
+
readonly category: "agentic-process";
|
|
25
|
+
readonly icon: "agentic-process";
|
|
26
|
+
readonly resourceSubType: "ProcessOrchestration";
|
|
27
|
+
readonly orchestratorType: "processorchestration";
|
|
28
|
+
readonly serviceType: "Orchestrator.StartAgenticProcess";
|
|
29
|
+
readonly solutionFolder: "processOrchestration";
|
|
30
|
+
};
|
|
31
|
+
readonly flow: {
|
|
32
|
+
readonly prefix: "uipath.core.flow.";
|
|
33
|
+
readonly category: "flow";
|
|
34
|
+
readonly icon: "flow-project";
|
|
35
|
+
readonly resourceSubType: "Flow";
|
|
36
|
+
readonly orchestratorType: "flow";
|
|
37
|
+
readonly serviceType: "Orchestrator.StartFlowProcess";
|
|
38
|
+
readonly solutionFolder: "flow";
|
|
39
|
+
};
|
|
40
|
+
readonly case: {
|
|
41
|
+
readonly prefix: "uipath.core.case-management.";
|
|
42
|
+
readonly category: "case-management";
|
|
43
|
+
readonly icon: "case-management";
|
|
44
|
+
readonly resourceSubType: "CaseManagement";
|
|
45
|
+
readonly orchestratorType: "casemanagement";
|
|
46
|
+
readonly serviceType: "Orchestrator.StartCaseMgmtProcess";
|
|
47
|
+
readonly solutionFolder: "caseManagement";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** An `agenticProcess` form: `'bpmn' | 'flow' | 'case'`. */
|
|
51
|
+
export type AgenticProcessForm = keyof typeof AGENTIC_PROCESS_FORMS;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three published forms under the Agentic Process umbrella (design §2.1).
|
|
3
|
+
* One public factory, three wire identities — transcribed from flow-v1's
|
|
4
|
+
* `RESOURCE_TYPE_METADATA` (ProcessOrchestration / Flow / CaseManagement):
|
|
5
|
+
* node-type segment, category, icon, resource subtype, `orchestratorType`
|
|
6
|
+
* (`resourceType.toLowerCase()`, per `createModel`), and the sync/async
|
|
7
|
+
* service-type pair. All three declare the fire-and-forget switch.
|
|
8
|
+
*
|
|
9
|
+
* `solutionFolder` is the folder under `resources/solution_folder/process/`
|
|
10
|
+
* that holds an in-solution sibling's resource file (e.g. a sibling Flow lands in
|
|
11
|
+
* `process/flow/Notifier.json`). The solution writer names it
|
|
12
|
+
* `toLowerFirstChar(resource.type)`: `@uipath/resource-builder-sdk`
|
|
13
|
+
* `MultiFileSolutionDefinitionProvider.buildResourceRelativePath`, with the
|
|
14
|
+
* process types `flow`, `processOrchestration` and `caseManagement` from that
|
|
15
|
+
* package's resource-type catalog.
|
|
16
|
+
*
|
|
17
|
+
* Shared by the serializer (which emits the node) and `check` (which names the
|
|
18
|
+
* resource file in `AGENTIC_LOCAL_NO_PROJECT_ID`), so the two can never disagree
|
|
19
|
+
* about what a form is.
|
|
20
|
+
*/
|
|
21
|
+
export const AGENTIC_PROCESS_FORMS = {
|
|
22
|
+
bpmn: {
|
|
23
|
+
prefix: 'uipath.core.agentic-process.',
|
|
24
|
+
category: 'agentic-process',
|
|
25
|
+
icon: 'agentic-process',
|
|
26
|
+
resourceSubType: 'ProcessOrchestration',
|
|
27
|
+
orchestratorType: 'processorchestration',
|
|
28
|
+
serviceType: 'Orchestrator.StartAgenticProcess',
|
|
29
|
+
solutionFolder: 'processOrchestration',
|
|
30
|
+
},
|
|
31
|
+
flow: {
|
|
32
|
+
prefix: 'uipath.core.flow.',
|
|
33
|
+
category: 'flow',
|
|
34
|
+
icon: 'flow-project',
|
|
35
|
+
resourceSubType: 'Flow',
|
|
36
|
+
orchestratorType: 'flow',
|
|
37
|
+
serviceType: 'Orchestrator.StartFlowProcess',
|
|
38
|
+
solutionFolder: 'flow',
|
|
39
|
+
},
|
|
40
|
+
case: {
|
|
41
|
+
prefix: 'uipath.core.case-management.',
|
|
42
|
+
category: 'case-management',
|
|
43
|
+
icon: 'case-management',
|
|
44
|
+
resourceSubType: 'CaseManagement',
|
|
45
|
+
orchestratorType: 'casemanagement',
|
|
46
|
+
serviceType: 'Orchestrator.StartCaseMgmtProcess',
|
|
47
|
+
solutionFolder: 'caseManagement',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -4,6 +4,11 @@ export declare const GUID_RE: RegExp;
|
|
|
4
4
|
export type BindingRefusalCode = 'BINDING_SELF_NAME' | 'BINDING_UNDECLARED'
|
|
5
5
|
/** An emitted definition's `<bindings.NAME>` placeholder has no `bindings[]` entry named NAME (#865). */
|
|
6
6
|
| 'BINDING_PLACEHOLDER_UNRESOLVED'
|
|
7
|
+
/**
|
|
8
|
+
* A custom node's definition references a `<bindings.NAME>` the contribution did not
|
|
9
|
+
* supply and the definition cannot close (no `resourceKey`, or no `values` row) (#942).
|
|
10
|
+
*/
|
|
11
|
+
| 'CONTRIBUTION_BINDING_UNRESOLVED'
|
|
7
12
|
/** Two steps on one connection disagree on which connector it belongs to (#866). */
|
|
8
13
|
| 'CONNECTION_CONNECTOR_CONFLICT'
|
|
9
14
|
/** A connector-bound node names no `connection` or no `folder` label (#890). */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Library } from './library.js';
|
|
1
|
+
import { Library, type ResolvedConnector } from './library.js';
|
|
2
2
|
import type { BindingsView } from './binding-messages.js';
|
|
3
3
|
import { type ConnectorCheckOpts } from './connector-checks.js';
|
|
4
|
+
import type { LookupResolutions, LookupSpec } from './lookups.js';
|
|
4
5
|
import type { EventCheckOpts } from './event-checks.js';
|
|
5
6
|
/**
|
|
6
7
|
* The library for this invocation, or `undefined` when there is none.
|
|
@@ -15,17 +16,25 @@ export declare function openCliLibrary(argv: readonly string[]): Library | undef
|
|
|
15
16
|
* The connector half of a family's check options, from a library the CLI already
|
|
16
17
|
* opened.
|
|
17
18
|
*
|
|
18
|
-
* Every callback fails OPEN:
|
|
19
|
-
*
|
|
20
|
-
* `check` stay the fast inner-loop rung — a process with no
|
|
21
|
-
* library
|
|
22
|
-
*
|
|
19
|
+
* Every fact callback fails OPEN: no library at all, or an entry the library
|
|
20
|
+
* cannot resolve, means "unknown", and an unknown fact fires no rule. That is
|
|
21
|
+
* what lets `check` stay the fast inner-loop rung — a process with no
|
|
22
|
+
* connectors needs no library. The one exception is the resolution itself:
|
|
23
|
+
* `connectorResolveError` reports the refusal `compile` would throw for an
|
|
24
|
+
* action, the way `eventResolveError` does for an event, so `check` never
|
|
25
|
+
* passes a connector step `compile` refuses (#948).
|
|
26
|
+
*
|
|
27
|
+
* `inputErrors` is the family's field-contract validator. The default speaks
|
|
28
|
+
* the `=`-expression dialect BPMN uses; Flow passes its own, which renders its
|
|
29
|
+
* expressions (see `flowCheckOpts` in `../cli-library.ts`).
|
|
23
30
|
*
|
|
24
31
|
* The `resolutions` are the overlay's: without them every lookup already
|
|
25
32
|
* recorded by `registry prepare --resolve` would be reported as still owed,
|
|
26
33
|
* telling the author to re-run a prepare they already ran.
|
|
27
34
|
*/
|
|
28
|
-
export declare function connectorCheckOpts(library: Library | undefined, bindings?: BindingsView): ConnectorCheckOpts & EventCheckOpts;
|
|
35
|
+
export declare function connectorCheckOpts(library: Library | undefined, bindings?: BindingsView, inputErrors?: ConnectorInputValidator): ConnectorCheckOpts & EventCheckOpts;
|
|
36
|
+
/** A family's field-contract validator: `compile`'s refusal for these inputs, or `undefined`. */
|
|
37
|
+
export type ConnectorInputValidator = (rc: ResolvedConnector, inputs: Record<string, unknown>, resolutions: LookupResolutions, lookups: Readonly<Record<string, LookupSpec>>) => string | undefined;
|
|
29
38
|
/**
|
|
30
39
|
* `check`'s EVENT_UNKNOWN verdict: the message `library.resolveEvent` throws
|
|
31
40
|
* for a subscription, or `undefined` when it resolves.
|