@uipath/maestro-builder-sdk 6.101.0 → 6.103.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.
Files changed (56) hide show
  1. package/dist/api-index.md +22 -22
  2. package/dist/api-members.md +30 -30
  3. package/dist/core/actions.d.ts +6 -0
  4. package/dist/core/actions.js +7 -0
  5. package/dist/core/binding-messages.d.ts +33 -1
  6. package/dist/core/binding-messages.js +51 -0
  7. package/dist/core/connector-option-keys.d.ts +4 -0
  8. package/dist/core/connector-option-keys.js +9 -0
  9. package/dist/core/entity-schema.d.ts +94 -0
  10. package/dist/core/entity-schema.js +58 -0
  11. package/dist/core/event-subscription.d.ts +8 -0
  12. package/dist/core/event-subscription.js +2 -4
  13. package/dist/core/nodes/node-type.d.ts +25 -0
  14. package/dist/core/nodes/versioned.d.ts +3 -1
  15. package/dist/core/nodes/versioned.js +1 -0
  16. package/dist/core/option-keys.d.ts +62 -0
  17. package/dist/core/option-keys.js +66 -0
  18. package/dist/core/refusals.d.ts +10 -0
  19. package/dist/core/refusals.js +12 -0
  20. package/dist/core/resource-resolution.d.ts +9 -0
  21. package/dist/flow-node-type.d.ts +31 -1
  22. package/dist/flow-option-keys.d.ts +22 -0
  23. package/dist/flow-option-keys.js +33 -0
  24. package/dist/flow-sdk.js +5 -9
  25. package/dist/nodes/agent/flow/inline-agent.js +2 -4
  26. package/dist/nodes/agent/flow/node-type.js +12 -0
  27. package/dist/nodes/ai-patterns/flow/node-type.js +6 -0
  28. package/dist/nodes/connector/flow/event-trigger.js +4 -2
  29. package/dist/nodes/connector/flow/event-wait.js +4 -2
  30. package/dist/nodes/connector/flow/node-type.js +5 -4
  31. package/dist/nodes/connector/flow/raw-node.js +1 -1
  32. package/dist/nodes/conversation/flow/node-type.js +9 -0
  33. package/dist/nodes/data-fabric/flow/check.js +214 -0
  34. package/dist/nodes/data-fabric/flow/verbs.js +10 -0
  35. package/dist/nodes/delay/flow/node-type.js +4 -0
  36. package/dist/nodes/document/flow/ixp.js +4 -0
  37. package/dist/nodes/document/flow/node-type.js +6 -0
  38. package/dist/nodes/hitl/flow/node-type.js +4 -0
  39. package/dist/nodes/http/flow/check.js +55 -0
  40. package/dist/nodes/http/flow/node-type.js +7 -4
  41. package/dist/nodes/process/flow/node-type.js +10 -0
  42. package/dist/nodes/queue/flow/node-type.js +4 -0
  43. package/dist/nodes/script/flow/node-type.js +4 -0
  44. package/dist/nodes/transform/flow/node-type.js +4 -0
  45. package/dist/nodes/trigger/flow/check.js +193 -2
  46. package/dist/nodes/trigger/flow/node-type.js +6 -0
  47. package/dist/nodes/trigger/flow/spec.d.ts +10 -1
  48. package/dist/registry/prepare/entity-schema.d.ts +40 -0
  49. package/dist/registry/prepare/entity-schema.js +135 -0
  50. package/dist/registry/prepare/resources.d.ts +12 -5
  51. package/dist/registry/prepare/resources.js +26 -4
  52. package/dist/registry/prepare-cli.js +38 -3
  53. package/dist/registry/uip/commands.d.ts +19 -0
  54. package/dist/registry/uip/commands.js +25 -0
  55. package/dist/serialize.js +73 -1
  56. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  import { type ResourceRef, type ResourceResolution, type ResourceResolutions } from "../../core/resource-resolution.js";
2
2
  import type { UipClient } from "../uip/client.js";
3
+ import type { EntitySchemaTarget } from "./entity-schema.js";
3
4
  /** The ledger's file name, under the SDK's work directory. */
4
5
  export declare const RESOURCE_LEDGER_FILENAME = "resources.json";
5
6
  /**
@@ -75,19 +76,25 @@ export interface ResolveResourceRequest extends ResourceRef {
75
76
  export declare function solutionRoot(cwd: string): string | undefined;
76
77
  /** True when `cwd` or a parent holds a solution file (`*.uipx`). */
77
78
  export declare function insideSolution(cwd: string): boolean;
79
+ /** {@link resolveResource}'s answer. */
80
+ export interface ResolvedResource {
81
+ /** The row to record. */
82
+ row: ResourceResolution;
83
+ /** A note for the author, when it was found without a folder. */
84
+ note?: string;
85
+ /** For an entity on the tenant: what `uip df entities get` reads its columns by. */
86
+ schema?: EntitySchemaTarget;
87
+ }
78
88
  /**
79
89
  * Resolve one reference against the solution and the tenant, or refuse with
80
90
  * what was searched.
81
91
  *
82
92
  * @param client - The `uip` client every call goes through.
83
93
  * @param request - The kind, the name, its folder path when the author gave one, and which listings to consult.
84
- * @returns The row to record, and a note for the author when it was found without a folder.
94
+ * @returns The row to record, a note for the author when it was found without a folder, and how to read an entity's columns.
85
95
  * @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED`.
86
96
  */
87
- export declare function resolveResource(client: UipClient, request: ResolveResourceRequest): Promise<{
88
- row: ResourceResolution;
89
- note?: string;
90
- }>;
97
+ export declare function resolveResource(client: UipClient, request: ResolveResourceRequest): Promise<ResolvedResource>;
91
98
  /** One line per recorded fact, for the console. */
92
99
  export declare function recordedLines(row: ResourceResolution, ledger: string): string[];
93
100
  /**
@@ -332,6 +332,17 @@ function nearMisses(name, pool) {
332
332
  function asRow(c) {
333
333
  return { kind: c.kind, name: c.name, scope: c.scope, folderPath: c.folderPath, folderKey: c.folderKey, key: c.key, source: c.source };
334
334
  }
335
+ /**
336
+ * What resolved, and how to read its columns: a remote folder entity by its
337
+ * resource key (the entity's id) and folder key, a tenant-level one by its
338
+ * `Id`. A resource authored in the solution has no tenant schema yet.
339
+ */
340
+ function resolved(c, note) {
341
+ const schema = c.kind !== ENTITY_KIND ? undefined
342
+ : c.scope === "tenant" ? (c.entityId !== undefined ? { id: c.entityId } : undefined)
343
+ : c.source === "remote" && c.key !== null && c.folderKey !== null ? { id: c.key, folderKey: c.folderKey } : undefined;
344
+ return { row: asRow(c), ...(note !== undefined ? { note } : {}), ...(schema !== undefined ? { schema } : {}) };
345
+ }
335
346
  /**
336
347
  * The solution's rows as candidates: a row whose `Key` a remote row has is that
337
348
  * remote resource (the remote row answers for it, with its real folder); one
@@ -350,7 +361,7 @@ function localCandidates(local, remote) {
350
361
  *
351
362
  * @param client - The `uip` client every call goes through.
352
363
  * @param request - The kind, the name, its folder path when the author gave one, and which listings to consult.
353
- * @returns The row to record, and a note for the author when it was found without a folder.
364
+ * @returns The row to record, a note for the author when it was found without a folder, and how to read an entity's columns.
354
365
  * @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED`.
355
366
  */
356
367
  export async function resolveResource(client, request) {
@@ -399,7 +410,10 @@ export async function resolveResource(client, request) {
399
410
  .filter((r) => text(getCI(r, "FolderId")) === TENANT_FOLDER_ID)
400
411
  .map((r) => {
401
412
  const name = text(getCI(r, "Name"));
402
- return name === null ? undefined : { kind, name, scope: "tenant", folderPath: null, folderKey: null, key: null, source: "tenant" };
413
+ const entityId = text(getCI(r, "Id"));
414
+ return name === null ? undefined : {
415
+ kind, name, scope: "tenant", folderPath: null, folderKey: null, key: null, source: "tenant", ...(entityId !== null ? { entityId } : {}),
416
+ };
403
417
  })
404
418
  .filter((c) => c !== undefined);
405
419
  tenantExact.push(...tenantRows.filter(exactName));
@@ -413,7 +427,7 @@ export async function resolveResource(client, request) {
413
427
  if (request.folder !== undefined) {
414
428
  const matches = exact.filter(inFolder);
415
429
  if (matches.length === 1)
416
- return { row: asRow(matches[0]) };
430
+ return resolved(matches[0]);
417
431
  if (matches.length > 1) {
418
432
  throw new Refusal(`${matches.length} ${resourcePlural(kind)} named ${JSON.stringify(request.name)} are in folder ${JSON.stringify(request.folder)}; refusing to pick one:\n` +
419
433
  matches.map(candidateLine).join("\n") + `\n${searchedBlock(searched)}`, "RESOURCE_AMBIGUOUS");
@@ -432,7 +446,7 @@ export async function resolveResource(client, request) {
432
446
  ? `Found at tenant level. A tenant-level entity needs no prepare; write it as entity: '${only.name}'`
433
447
  : `Found in folder ${JSON.stringify(only.folderPath)}${only.source === "local" ? " (authored in this solution)" : ""} with no folder given. `
434
448
  + `Pin it in the source: ${only.kind === ENTITY_KIND ? `entity: { name: '${only.name}', folder: '${only.folderPath ?? ""}' }` : `resource('${only.kind}', '${only.name}', { folder: '${only.folderPath ?? ""}' })`}`;
435
- return { row: asRow(only), note };
449
+ return resolved(only, note);
436
450
  }
437
451
  if (all.length > 1) {
438
452
  throw new Refusal(`${all.length} ${resourcePlural(kind)} are named ${JSON.stringify(request.name)}; refusing to pick one:\n` +
@@ -462,6 +476,13 @@ export async function resolveResource(client, request) {
462
476
  (near.length > 0 ? `Near misses:\n${near.map(candidateLine).join("\n")}\n` : "") +
463
477
  findBlock(kind), "RESOURCE_NOT_FOUND");
464
478
  }
479
+ /** `4: Name, Status, Total, Notes (and 5 system columns)`, the first dozen named. */
480
+ function columnSummary(fields) {
481
+ const own = fields.filter((f) => f.system !== true).map((f) => f.name);
482
+ const named = own.length > 12 ? `${own.slice(0, 12).join(", ")}, …` : own.join(", ");
483
+ const system = fields.length - own.length;
484
+ return `${own.length}: ${named}${system > 0 ? ` (and ${system} system columns)` : ""}`;
485
+ }
465
486
  /** One line per recorded fact, for the console. */
466
487
  export function recordedLines(row, ledger) {
467
488
  const label = row.kind.padEnd(9);
@@ -469,6 +490,7 @@ export function recordedLines(row, ledger) {
469
490
  `${label} ${row.name} (${row.scope === "tenant" ? "tenant level" : row.folderPath}, ${row.source})`,
470
491
  ...(row.key !== null ? [`Key ${row.key}`] : []),
471
492
  ...(row.folderKey !== null ? [`Folder ${row.folderKey}`] : []),
493
+ ...(row.fields !== undefined ? [`Columns ${columnSummary(row.fields)}`] : []),
472
494
  `Recorded ${ledger}`,
473
495
  ];
474
496
  }
@@ -10,6 +10,7 @@ import { consoleReporter } from "./reporter.js";
10
10
  import { relative } from "node:path";
11
11
  import { ENTITY_KIND } from "../core/resource-resolution.js";
12
12
  import { defaultResourceLedger, forgetResource, readResourceLedger, recordResource, recordedLines, recordedRefs, resolveResource, } from "./prepare/resources.js";
13
+ import { readEntitySchema } from "./prepare/entity-schema.js";
13
14
  import { Refusal, UsageError } from "./errors.js";
14
15
  import { defaultUipClient } from "./uip/client.js";
15
16
  // This mirrors the generator's own flags one for one, so a `--version` here is
@@ -292,6 +293,31 @@ function requestedRef(options) {
292
293
  return { kind: options.kind, name: options.name, ...folder };
293
294
  return undefined;
294
295
  }
296
+ /**
297
+ * `row` with the entity's columns, read from the tenant (#1980). A failed read
298
+ * is a warning, not a refusal: the keys are what `compile` needs, and they
299
+ * resolved. The row is then recorded without columns, so `check` judges none,
300
+ * and the warning says so.
301
+ *
302
+ * This differs on purpose from a published process's argument schema, which
303
+ * `prepare` refuses to record without (`PROCESS_SCHEMA_READ_FAILED`): compile
304
+ * writes that schema into the node, so a row without it would compile wrong.
305
+ * An entity's columns are read only by `check`, and compile never writes them.
306
+ */
307
+ async function withSchema(ports, row, target, cwd) {
308
+ try {
309
+ const { fields, warnings } = await readEntitySchema(ports.client, target, cwd);
310
+ for (const warning of warnings)
311
+ ports.reporter.warn(`[ENTITY_SCHEMA_UNREAD] ${warning}`);
312
+ return { ...row, fields };
313
+ }
314
+ catch (error) {
315
+ if (!(error instanceof Refusal))
316
+ throw error;
317
+ ports.reporter.warn(`[${error.code}] ${row.name}: ${error.message}\n The keys are recorded; check will not judge this entity's columns until prepare reads them.`);
318
+ return row;
319
+ }
320
+ }
295
321
  /**
296
322
  * `--entity` / `--kind --name` / `--refresh-resources`: resolve each reference
297
323
  * against the solution and the tenant and record it in the resource ledger. A
@@ -335,12 +361,21 @@ export async function prepareResources(options, ports) {
335
361
  refused.push({ ref, error });
336
362
  continue;
337
363
  }
338
- recordResource(ledger, ref, resolved.row);
339
- for (const line of recordedLines(resolved.row, shownLedger))
364
+ const row = resolved.schema !== undefined ? await withSchema(ports, resolved.row, resolved.schema, cwd) : resolved.row;
365
+ if (row.kind === ENTITY_KIND && resolved.schema === undefined) {
366
+ if (row.source === "local") {
367
+ ports.reporter.info(`${row.name} was authored in this solution and is not on the tenant yet, so its columns are not recorded; check will not judge them.`);
368
+ }
369
+ else {
370
+ ports.reporter.warn(`[ENTITY_SCHEMA_UNREAD] ${row.name}: the listing gave no entity id to read its columns by; check will not judge them.`);
371
+ }
372
+ }
373
+ recordResource(ledger, ref, row);
374
+ for (const line of recordedLines(row, shownLedger))
340
375
  ports.reporter.info(line);
341
376
  if (resolved.note !== undefined)
342
377
  ports.reporter.info(resolved.note);
343
- recorded.push(resolved.row);
378
+ recorded.push(row);
344
379
  }
345
380
  if (refused.length > 0) {
346
381
  throw new Refusal(`${refused.length} of ${refs.length} recorded reference(s) no longer resolve; their rows are removed, so check reports them:\n`
@@ -70,3 +70,22 @@ export declare function solutionResourceList(kind: string, source: "local" | "re
70
70
  * all-zero GUID). The one listing that knows an entity the catalogue omits.
71
71
  */
72
72
  export declare function dfEntitiesList(): string[];
73
+ /**
74
+ * `uip df entities get <id>`: one entity's schema, `Data.Fields[]` with each
75
+ * column's `Name`, `FieldDataType.Name`, `IsRequired`, `IsSystemField`,
76
+ * `ChoiceSetId` and `ReferenceEntity`. The id of a folder-scoped entity is its
77
+ * solution resource `Key`, read with its `--folder-key`; a tenant-level one's is
78
+ * the `Id` `uip df entities list` gives it. More complete than the listing's
79
+ * `Fields`, which leaves out `RecordOwner` (staging, 2026-11-13).
80
+ */
81
+ export declare function dfEntityGet(id: string, folderKey?: string): string[];
82
+ /**
83
+ * `uip df choice-sets list-values <id>`: one page of a choice set's values,
84
+ * `Data.Items[]` with each value's `Name`, `DisplayName` and `NumberId`, and
85
+ * `Data.HasNextPage`. A folder-scoped set is read with its `--folder-key`.
86
+ */
87
+ export declare function dfChoiceSetValues(id: string, opts?: {
88
+ folderKey?: string;
89
+ limit?: number;
90
+ offset?: number;
91
+ }): string[];
@@ -122,3 +122,28 @@ export function solutionResourceList(kind, source, opts = {}) {
122
122
  export function dfEntitiesList() {
123
123
  return [UIP, "df", "entities", "list", "--output", "json"];
124
124
  }
125
+ /**
126
+ * `uip df entities get <id>`: one entity's schema, `Data.Fields[]` with each
127
+ * column's `Name`, `FieldDataType.Name`, `IsRequired`, `IsSystemField`,
128
+ * `ChoiceSetId` and `ReferenceEntity`. The id of a folder-scoped entity is its
129
+ * solution resource `Key`, read with its `--folder-key`; a tenant-level one's is
130
+ * the `Id` `uip df entities list` gives it. More complete than the listing's
131
+ * `Fields`, which leaves out `RecordOwner` (staging, 2026-11-13).
132
+ */
133
+ export function dfEntityGet(id, folderKey) {
134
+ return [UIP, "df", "entities", "get", id, ...(folderKey !== undefined ? ["--folder-key", folderKey] : []), "--output", "json"];
135
+ }
136
+ /**
137
+ * `uip df choice-sets list-values <id>`: one page of a choice set's values,
138
+ * `Data.Items[]` with each value's `Name`, `DisplayName` and `NumberId`, and
139
+ * `Data.HasNextPage`. A folder-scoped set is read with its `--folder-key`.
140
+ */
141
+ export function dfChoiceSetValues(id, opts = {}) {
142
+ return [
143
+ UIP, "df", "choice-sets", "list-values", id,
144
+ ...(opts.folderKey !== undefined ? ["--folder-key", opts.folderKey] : []),
145
+ ...(opts.limit !== undefined ? ["--limit", String(opts.limit)] : []),
146
+ ...(opts.offset !== undefined ? ["--offset", String(opts.offset)] : []),
147
+ "--output", "json",
148
+ ];
149
+ }
package/dist/serialize.js CHANGED
@@ -15,6 +15,9 @@ import { connectorRawNodeRefusal } from './nodes/connector/flow/family.js';
15
15
  import { isAgentResourceType } from './nodes/agent/flow/family.js';
16
16
  import { CompileRefusal, LibraryRequiredRefusal } from './core/compile-refusal.js';
17
17
  import { nearestName } from './core/edit-distance.js';
18
+ import { unknownOptionRefusal } from './core/option-keys.js';
19
+ import { ownEntry } from './core/own-entry.js';
20
+ import { ENTRY_POINT_OPTION_KEYS, STEP_OPTION_KEYS, TRIGGER_OPTION_KEYS } from './flow-option-keys.js';
18
21
  import { rawNodeInputProblem, registeredRawType } from './raw-node-advice.js';
19
22
  import { planContributionBindings } from './core/contribution-bindings.js';
20
23
  import { declaredErrorPortRefusal, definitionHasErrorPort, errorPortRefusal } from './core/error-port.js';
@@ -26,7 +29,7 @@ import { indexCarriedDefinitions } from './core/carried-definitions.js';
26
29
  import { sharedDefinition } from './core/shared-definition.js';
27
30
  import { FlowBuildError, loweringExpressionErrors } from './flow-expr-check.js';
28
31
  import { connectionConnectors } from './bindings-v2.js';
29
- import { BindingRefusal, bindingLabelRefusal, connectionStubMessage } from './core/binding-messages.js';
32
+ import { BindingRefusal, bindingLabelRefusal, bindingPairRefusal, connectionStubMessage } from './core/binding-messages.js';
30
33
  import { OUTCOME_HANDLE_NODE_TYPES, assertHitlExitInvariant, hitlExitViolation } from './core/hitl-routing.js';
31
34
  import { STICKY_NOTE_TYPE, STICKY_NOTE_TYPE_VERSION } from './core/definitionless-node-types.js';
32
35
  import { placeholderPosition } from './node-placement.js';
@@ -463,12 +466,27 @@ function resolveBinding(opts, name, attribute, where, target) {
463
466
  opts.warn({ code: 'CONNECTION_STUB', message: stub });
464
467
  return value;
465
468
  }
469
+ /**
470
+ * A node's `{ connection, folder }` labels, each resolved by {@link resolveBinding}
471
+ * (its own refusals first), then the pair judged by `bindingPairRefusal`: one
472
+ * label for both, or two labels that resolve to one real key, is
473
+ * `BINDING_CONNECTION_IS_FOLDER` (#1968).
474
+ */
475
+ function resolveBindingPair(opts, labels, where, target) {
476
+ const connectionId = resolveBinding(opts, labels.connection, 'connection', where, target);
477
+ const folderKey = resolveBinding(opts, labels.folder, 'folder', where, target);
478
+ const refused = bindingPairRefusal(opts.bindings, labels, where, target);
479
+ if (refused)
480
+ throw refused;
481
+ return { connectionId, folderKey };
482
+ }
466
483
  /** What the shared event-subscription emission (`core/event-subscription.ts`) needs from these options. */
467
484
  function eventEnv(opts) {
468
485
  return {
469
486
  ...(opts.library !== undefined ? { library: opts.library } : {}),
470
487
  ...(opts.bindings !== undefined ? { bindings: opts.bindings } : {}),
471
488
  resolveBinding: (name, attribute, where, target) => resolveBinding(opts, name, attribute, where, target),
489
+ resolveBindingPair: (labels, where, target) => resolveBindingPair(opts, labels, where, target),
472
490
  };
473
491
  }
474
492
  /**
@@ -2004,6 +2022,7 @@ function serializeFlow(built, opts) {
2004
2022
  // lowered eagerly to `$vars.start.output.x`, so a rename is applied by the
2005
2023
  // same `renameRefs` pass that rewrites step names (see `rename.nodeIds`).
2006
2024
  const triggerId = built.triggerId ?? 'start';
2025
+ refuseUnknownRootOptions('trigger', triggerId, built.trigger, built.triggerOptions, '.trigger()');
2007
2026
  const trigger = emitRootNode('trigger', triggerId, built.trigger, built.triggerOptions?.version, () => {
2008
2027
  // A custom FlowTrigger subclass (no `kind`) compiles through its own
2009
2028
  // contribution: exact definition, author inputs, definition-owned identity.
@@ -2292,6 +2311,7 @@ function serializeFlow(built, opts) {
2292
2311
  : bundledDefinition(typeName, v) ?? carriedFor(typeName, v)),
2293
2312
  bindings: resourceBindings,
2294
2313
  resolveBinding: ((name, attribute, at, target) => resolveBinding(bindingOpts, name, attribute, at, target)),
2314
+ resolveBindingPair: (labels, at, target) => resolveBindingPair(bindingOpts, labels, at, target),
2295
2315
  bindConnection: (c) => {
2296
2316
  const { entries } = connectionResourceBindings({
2297
2317
  def: { model: c.model },
@@ -2522,6 +2542,46 @@ function serializeFlow(built, opts) {
2522
2542
  }
2523
2543
  refuseOn(scope, step.name, refusal);
2524
2544
  }
2545
+ /**
2546
+ * FLOW_UNKNOWN_OPTION for every option object of `spec` its type declares
2547
+ * (`optionKeys`, flow-node-type.ts) and for `options` against `optionKeys`:
2548
+ * each key the serializer does not know would be dropped from the file, so
2549
+ * it is refused (builder-sdk#1990). `report` is how the caller refuses: on
2550
+ * a step, or on a root. A spec of no registered type, a custom node's, has
2551
+ * no declared keys and stays open.
2552
+ */
2553
+ function unknownOptions(spec, lists, factory, options, optionKeys, where, report) {
2554
+ for (const [field, keys] of Object.entries(lists ?? {})) {
2555
+ if (keys === undefined || spec === null || typeof spec !== 'object')
2556
+ continue;
2557
+ const call = factory !== undefined ? `${factory}()${field === 'inputs' ? '' : `'s ${field}`}` : field;
2558
+ const refusal = unknownOptionRefusal(spec[field], keys, call, where);
2559
+ if (refusal)
2560
+ report(refusal);
2561
+ }
2562
+ if (optionKeys) {
2563
+ const refusal = unknownOptionRefusal(options, optionKeys.keys, `${optionKeys.call}'s options`, where);
2564
+ if (refusal)
2565
+ report(refusal);
2566
+ }
2567
+ }
2568
+ /** {@link unknownOptions} for one step: its spec's objects (an action's, a `.stepSwitch()`'s) and its builder options. */
2569
+ function refuseUnknownStepOptions(scope, step) {
2570
+ if (!('name' in step))
2571
+ return;
2572
+ const spec = 'spec' in step ? step.spec : undefined;
2573
+ const entry = spec !== undefined && typeof spec.kind === 'string' ? FLOW_NODE_TYPES.byKind(spec.kind, spec) : undefined;
2574
+ const lists = entry?.type.optionKeys;
2575
+ unknownOptions(spec, lists, entry?.type.factory, 'options' in step ? step.options : undefined, ownEntry(STEP_OPTION_KEYS, step.kind), `step "${step.name}"`, (refusal) => refuseOn(scope, step.name, refusal));
2576
+ }
2577
+ /** {@link unknownOptions} for one root: its trigger spec's objects and its `.trigger()` / `.entryPoint()` options. */
2578
+ function refuseUnknownRootOptions(name, nodeId, spec, options, call) {
2579
+ const kind = spec?.kind;
2580
+ const type = typeof kind === 'string' && !(spec instanceof FlowTrigger && !('kind' in spec)) ? FLOW_TRIGGER_TYPES.byKind(kind)?.type : undefined;
2581
+ const keys = call === '.trigger()' ? TRIGGER_OPTION_KEYS : ENTRY_POINT_OPTION_KEYS;
2582
+ unknownOptions(spec, type?.optionKeys, type?.factory, options, { call, keys }, call === '.trigger()' ? '.trigger()' : `.entryPoint("${name}")`, (refusal) => { if (!opts.collect)
2583
+ throw refusal; record(refusal, name, nodeId); });
2584
+ }
2525
2585
  function refuseOn(scope, stepName, refusal) {
2526
2586
  if (!opts.collect || stepName === undefined)
2527
2587
  throw refusal;
@@ -2616,6 +2676,7 @@ function serializeFlow(built, opts) {
2616
2676
  library: opts.library,
2617
2677
  events: eventEnv(opts),
2618
2678
  resolveBinding: (name, attribute, where, target) => resolveBinding(opts, name, attribute, where, target),
2679
+ resolveBindingPair: (labels, where, target) => resolveBindingPair(opts, labels, where, target),
2619
2680
  bindConnection: (b) => {
2620
2681
  const { entries } = connectionResourceBindings({ def: { model: b.model }, ...b }, resourceBindings);
2621
2682
  for (const e of entries)
@@ -2741,6 +2802,10 @@ function serializeFlow(built, opts) {
2741
2802
  return emitRegistered(registered, step, tails, scope, parentId);
2742
2803
  if (spec.kind === 'subflow') {
2743
2804
  refuseChildRoots(spec.child, step.name);
2805
+ // The child's `.trigger(manual(), { label, version, updates })` names its Start node: refuse a key it would drop.
2806
+ const childOptions = unknownOptionRefusal(spec.child?.triggerOptions, TRIGGER_OPTION_KEYS, ".trigger()'s options", `subflow "${step.name}"`);
2807
+ if (childOptions)
2808
+ refuseOn(scope, step.name, childOptions);
2744
2809
  const id = stepUid(scope, step.name);
2745
2810
  // `subflows` is ONE flat map for the whole file, keyed by the calling
2746
2811
  // node's id. `stepUid` draws from the file-wide allocator, including in
@@ -2938,8 +3003,14 @@ function serializeFlow(built, opts) {
2938
3003
  + `path continues from it and ${'name' in step ? `"${step.name}"` : `.${step.kind}()`} after it would `
2939
3004
  + `have no incoming edge. Route each exit with .stepToList('<port>', …), e.g. .stepToList('case-<id>', …).`));
2940
3005
  }
3006
+ // A family's own refusal of a key it knows is wrong (IXP_FORBIDDEN_INPUT,
3007
+ // AGENT_NO_KEY for `agent:`) says more than FLOW_UNKNOWN_OPTION, so an
3008
+ // action's emission goes first; any other step is judged before it.
3009
+ if (step.kind !== 'action')
3010
+ refuseUnknownStepOptions(scope, step);
2941
3011
  if (step.kind === 'action') {
2942
3012
  tails = emitStep(step, tails, scope, parentId, () => { applyUpdates(step); applyLabel(step); });
3013
+ refuseUnknownStepOptions(scope, step);
2943
3014
  lastAction = step.name;
2944
3015
  // A fan-out human task's `action: 'End'` outcomes end the run here: the
2945
3016
  // flow runtime never reads `action`, so only an End node can. When the
@@ -3493,6 +3564,7 @@ function serializeFlow(built, opts) {
3493
3564
  throw new CompileRefusal('ENTRY_POINT_DUP_ID', `.entryPoint("${ep.id}"): the id collides with a step, the trigger, or another entry point.`);
3494
3565
  }
3495
3566
  takenIds.add(ep.id);
3567
+ refuseUnknownRootOptions(ep.id, ep.id, ep.trigger, ep.options, '.entryPoint()');
3496
3568
  // Stood in when refused in collect mode, so its prefix and the body are still judged.
3497
3569
  emitRootNode(ep.id, ep.id, ep.trigger, ep.options?.version, () => {
3498
3570
  const spec = ep.trigger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.101.0",
3
+ "version": "6.103.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",
@@ -121,5 +121,5 @@
121
121
  "@types/node": "^22.7.0",
122
122
  "esbuild": "^0.28.1"
123
123
  },
124
- "gitref": "a61a8ae8c2fc41973228083ad52eb07a55eb5893"
124
+ "gitref": "a2b0c3e4c8d5532116ba89a1761d07300bd4c4bd"
125
125
  }