@uipath/maestro-builder-sdk 6.117.0 → 6.117.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/check.d.ts CHANGED
@@ -83,6 +83,13 @@ export interface CheckOpts extends ConnectorCheckOpts, EventCheckOpts {
83
83
  * whether it grants an error port is then the same answer in both rungs.
84
84
  */
85
85
  connectorDefinition?: (connector: string, operation: string, version?: string, object?: string) => unknown;
86
+ /**
87
+ * The top-level fields one connector operation declares it returns (its
88
+ * library entry's `outputSchema`), for the read rule on `out(step, field)`.
89
+ * Undefined when the library cannot say: no declared fields, a list
90
+ * operation, or a schema that depends on the connection.
91
+ */
92
+ connectorOutputFields?: (connector: string, operation: string, version?: string, object?: string) => readonly string[] | undefined;
86
93
  /**
87
94
  * The connector library `compile` serializes with. `check` runs the
88
95
  * serializer in collect mode, with this library and `bindings`, to report
package/dist/check.js CHANGED
@@ -8,7 +8,7 @@ import { bundledDefinition, resolveContributionDefinition, serialize } from './s
8
8
  import { checkEventResolution, checkEventSubscription, eventParamsFor, } from './core/event-checks.js';
9
9
  import { checkCookedEscapes, checkFlowExpressions, checkVarsOnlyInQuotes, literalExprShape, literalLooksLikeExpr } from './flow-expr-check.js';
10
10
  import { FLOW_EXPR_DIALECT, checkBindingLabels, checkConnectorLookups as coreCheckConnectorLookups, checkConnectorResources as coreCheckConnectorResources, checkConnectorSchema as coreCheckConnectorSchema, } from './core/connector-checks.js';
11
- import { nearestName } from './core/edit-distance.js';
11
+ import { editDistance, nearestName } from './core/edit-distance.js';
12
12
  import { escapeRegExp } from './core/escape-regexp.js';
13
13
  import { hasExits } from './core/step-ports.js';
14
14
  import { actionTails, armReachesJoin } from './flow-parallel-hitl.js';
@@ -20,7 +20,7 @@ import { childStepLists } from './flow-step-tree.js';
20
20
  import { VARS_READ_RE } from './core/vars-read.js';
21
21
  import { FLOW_METADATA_KEYS, unknownMetadataKeys } from './core/flow-metadata.js';
22
22
  import { endContentKey } from './flow-end-content.js';
23
- import { FLOW_NODE_TYPES, FLOW_TRIGGER_TYPES } from './flow-node-registry.js';
23
+ import { FLOW_NODE_TYPES, FLOW_TRIGGER_TYPES, isNodeTypeFinding } from './flow-node-registry.js';
24
24
  import { stepExits, stepRouting } from './flow-step-exits.js';
25
25
  import { stepDeclaredVariables } from './flow-step-variables.js';
26
26
  import { resolveVersion, resolveVersionCarried } from './core/nodes/versioned.js';
@@ -103,7 +103,11 @@ export function scopeToEdit(edited, baseline) {
103
103
  const sorted = classifyDrafts(baseline.flow ?? {}, edited.flow ?? {}, baseline.flow, placed);
104
104
  const kept = new Set(sorted.kept.map((f) => f.index));
105
105
  const unplaced = new Set(sorted.unplaced.map((f) => f.index));
106
- const preExisting = preExistingFindings(placed.map((f) => ({ level: f.level, code: f.code, message: f.message, place: unplaced.has(f.index) ? '' : f.nodeId, unchanged: kept.has(f.index) })), locate(baseline).map((b) => ({ level: b.level, code: b.code, message: b.message, place: b.nodeId })));
106
+ // A finding about the node's type (a retired node, `aboutNodeType`) is not
107
+ // introduced by an edit to the node's content, so it is judged as if the node
108
+ // were unchanged: pre-existing when the baseline reports it on the same node.
109
+ // A node the edit added has no baseline finding, so it stays edited.
110
+ const preExisting = preExistingFindings(placed.map((f) => ({ level: f.level, code: f.code, message: f.message, place: unplaced.has(f.index) ? '' : f.nodeId, unchanged: kept.has(f.index) || isNodeTypeFinding(f.code) })), locate(baseline).map((b) => ({ level: b.level, code: b.code, message: b.message, place: b.nodeId })));
107
111
  const out = scopeFindings(edited.diagnostics, preExisting, PRE_EXISTING_LOWERING_NOTE);
108
112
  if (edited.stoppedAt) {
109
113
  const at = edited.stoppedAt.code !== undefined ? `[${edited.stoppedAt.code}] ` : '';
@@ -1138,7 +1142,8 @@ function checkFlow(built, ancestors, opts = {}) {
1138
1142
  // at the same point as the per-family no-output rules below.
1139
1143
  const placed = checkedSteps.get(name);
1140
1144
  if (placed) {
1141
- const contract = placed.impl.output(placed.spec, { resources: opts.resources });
1145
+ const contract = placed.impl.checkOutput?.(placed.spec, opts)
1146
+ ?? placed.impl.output(placed.spec, { resources: opts.resources });
1142
1147
  if (contract.kind === 'none') {
1143
1148
  diags.push(catalogued(placed.entry, step, contract.code, contract.message({ node: name, ref: `$vars.${name}${field ? '.' + field : ''}`, reader: step })));
1144
1149
  continue;
@@ -1213,14 +1218,16 @@ function checkFlow(built, ancestors, opts = {}) {
1213
1218
  // A registered node type that states its output's fields: the same read
1214
1219
  // rule, worded by its contract and reported through its family's catalog.
1215
1220
  const fieldsPlaced = checkedSteps.get(name);
1216
- const fieldsContract = fieldsPlaced?.impl.output(fieldsPlaced.spec, { resources: opts.resources });
1221
+ const fieldsContract = fieldsPlaced
1222
+ && (fieldsPlaced.impl.checkOutput?.(fieldsPlaced.spec, opts)
1223
+ ?? fieldsPlaced.impl.output(fieldsPlaced.spec, { resources: opts.resources }));
1217
1224
  if (fieldsPlaced && fieldsContract?.kind === 'fields') {
1218
1225
  const found = [];
1219
1226
  checkDeclaredOutputRead({
1220
1227
  prefix: fieldsContract.read.codePrefix, what: fieldsContract.read.label, name, field, rest, step,
1221
1228
  diags: found, withoutReturns: fieldsContract.read.whenUndeclared,
1222
1229
  declared: fieldsContract.fields === undefined ? undefined : Object.keys(fieldsContract.fields),
1223
- open: fieldsContract.open,
1230
+ open: fieldsContract.open, partial: fieldsContract.partial,
1224
1231
  });
1225
1232
  for (const d of found)
1226
1233
  diags.push(catalogued(fieldsPlaced.entry, step, d.code, d.message, d.suggestion));
@@ -2151,6 +2158,47 @@ function checkDeclaredOutputRead(o) {
2151
2158
  if (o.declared.includes(wanted))
2152
2159
  return;
2153
2160
  const nearest = nearestName(wanted, o.declared);
2161
+ if (o.partial) {
2162
+ // A bracket or other non-identifier head (`output['updated-at']`) is not
2163
+ // judged: the split above cannot tell where its name ends.
2164
+ if (!/^[A-Za-z_$][\w$]*$/.test(wanted))
2165
+ return;
2166
+ if (nearest !== undefined && nearest.toLowerCase() === wanted.toLowerCase()) {
2167
+ diags.push({
2168
+ level: 'error', code: `${prefix}_READ_FIELD_CASE`, step,
2169
+ message: `${what} "${name}" declares the output "${nearest}", but "$vars.${name}.output.${wanted}" (read in `
2170
+ + `"${step}") spells it "${wanted}". Field names are case-sensitive, so unless the response itself uses `
2171
+ + `"${wanted}", this read resolves to undefined at run time.`,
2172
+ suggestion: `out('${name}', '${nearest}')`,
2173
+ });
2174
+ return;
2175
+ }
2176
+ // Suggest only a close typo (`convrsationId` -> `conversationId`), at most
2177
+ // one edit per three letters: `ok` is two edits from `id`, and a declared
2178
+ // list of dozens nearly always has a short name (`id`) inside the read, so
2179
+ // `nearestName`'s looser match would point at an unrelated field.
2180
+ let suggested;
2181
+ let best = Math.min(2, Math.floor(wanted.length / 3)) + 1;
2182
+ for (const c of o.declared) {
2183
+ const d = editDistance(wanted.toLowerCase(), c.toLowerCase());
2184
+ if (d < best) {
2185
+ best = d;
2186
+ suggested = c;
2187
+ }
2188
+ }
2189
+ // A large response (Jira's get-issue) declares dozens of heads; name the first ones.
2190
+ const listed = o.declared.length > 20
2191
+ ? `${o.declared.slice(0, 20).join(', ')} and ${o.declared.length - 20} more`
2192
+ : o.declared.join(', ');
2193
+ diags.push({
2194
+ level: 'error', code: `${prefix}_READ_UNKNOWN_FIELD`, step,
2195
+ message: `${what} "${name}" declares no output "${wanted}" (read as "$vars.${name}.output.${wanted}" in `
2196
+ + `"${step}"). It declares: ${listed}. The declared list can miss a field the response `
2197
+ + `really carries; keep the read only if you have seen "${wanted}" in a real response.`,
2198
+ ...(suggested !== undefined ? { suggestion: `out('${name}', '${suggested}')` } : {}),
2199
+ });
2200
+ return;
2201
+ }
2154
2202
  diags.push({
2155
2203
  level: 'error', code: `${prefix}_READ_UNKNOWN_FIELD`, step,
2156
2204
  message: `${what} "${name}" declares no output "${wanted}" (read as "$vars.${name}.output.${wanted}" in `
@@ -1,4 +1,5 @@
1
1
  import { connectorCheckOpts } from './core/cli-library.js';
2
+ import { connectorOutputFields } from './core/connector-output-fields.js';
2
3
  import { synthesizedDefinitionRefusal } from './core/synthesized-definition.js';
3
4
  import { connectorInputErrors } from './serialize.js';
4
5
  export { openCliLibrary, connectorCheckOpts, eventResolveErrorFor, byoaCheckOpts } from './core/cli-library.js';
@@ -20,6 +21,8 @@ export function flowCheckOpts(library, bindings) {
20
21
  };
21
22
  if (!library)
22
23
  return shared;
24
+ // One resolve per operation per check; the read rule asks on every read.
25
+ const outputFields = new Map();
23
26
  return {
24
27
  ...shared,
25
28
  listEnvelope: (connector, operation, version, object) => {
@@ -38,5 +41,19 @@ export function flowCheckOpts(library, bindings) {
38
41
  return undefined; // as above
39
42
  }
40
43
  },
44
+ connectorOutputFields: (connector, operation, version, object) => {
45
+ const id = JSON.stringify([connector, operation, version ?? null, object ?? null]);
46
+ if (outputFields.has(id))
47
+ return outputFields.get(id);
48
+ let fields;
49
+ try {
50
+ fields = connectorOutputFields(library.resolve(connector, operation, version, object), library.schemaReadiness(connector, operation, version, object));
51
+ }
52
+ catch {
53
+ fields = undefined; // as above
54
+ }
55
+ outputFields.set(id, fields);
56
+ return fields;
57
+ },
41
58
  };
42
59
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The top-level output fields a connector operation declares (the heads of its
3
+ * library entry's `outputSchema.fields`: `fields.issuetype.name` -> `fields`),
4
+ * for the read rule on `out(step, field)`. The list is not exhaustive.
5
+ *
6
+ * `undefined` means "the library cannot say", and the rule stays silent:
7
+ *
8
+ * - no declared fields;
9
+ * - a `List` operation: the output is the collection, the fields an item's;
10
+ * - a file response: an `octet-stream` field names the file, not a property;
11
+ * - an object no entry describes (`objectNameUnverified`);
12
+ * - a connection-resolved schema not yet prepared (`schemaReadiness`).
13
+ */
14
+ import type { ResolvedConnector, SchemaReadiness } from './library.js';
15
+ export declare function connectorOutputFields(rc: ResolvedConnector, readiness: SchemaReadiness | undefined): readonly string[] | undefined;
@@ -0,0 +1,24 @@
1
+ export function connectorOutputFields(rc, readiness) {
2
+ if (rc.objectNameUnverified)
3
+ return undefined;
4
+ if (readiness && !readiness.prepared)
5
+ return undefined;
6
+ const entry = rc.entry;
7
+ if (entry?.operation?.name === 'List')
8
+ return undefined;
9
+ const fields = entry?.outputSchema?.fields;
10
+ if (!Array.isArray(fields))
11
+ return undefined;
12
+ const heads = new Set();
13
+ for (const f of fields) {
14
+ if (f?.type === 'octet-stream')
15
+ return undefined;
16
+ const name = f?.name;
17
+ if (typeof name !== 'string')
18
+ continue;
19
+ const head = name.split(/[.[]/, 1)[0];
20
+ if (head)
21
+ heads.add(head);
22
+ }
23
+ return heads.size > 0 ? [...heads] : undefined;
24
+ }
@@ -14,6 +14,14 @@ import type { AnyNodeType } from './versioned.js';
14
14
  export type DiagnosticCatalog = Readonly<Record<string, {
15
15
  readonly severity: 'error' | 'warning';
16
16
  readonly summary: string;
17
+ /**
18
+ * The finding is about the node's type, not its content (a retired node type).
19
+ * An edit to the node's content does not introduce it, so under a baseline
20
+ * (`check --baseline`, `merge --baseline-from`) it is pre-existing when the
21
+ * baseline reports the same code on the same node, even when the edit changed
22
+ * that node. Unset for a finding about what the node holds.
23
+ */
24
+ readonly aboutNodeType?: boolean;
17
25
  }>>;
18
26
  /** One placed node of a family, as the family-level check sees it. */
19
27
  export interface Placement<Spec = unknown> {
@@ -94,6 +94,11 @@ export interface FieldsRead {
94
94
  * states the fields a read may name — `undefined` when the author declared none,
95
95
  * which makes any field read its own mistake — and `read` keeps the wording of
96
96
  * the read rule it replaces, for the same reason. `open` admits any field.
97
+ * `partial` says the list may miss fields the value really carries (a
98
+ * connector operation's library schema): a read that differs from a declared
99
+ * field only in letter case is `<PREFIX>_READ_FIELD_CASE`, certain to read
100
+ * undefined, and any other miss is `<PREFIX>_READ_UNKNOWN_FIELD`, worded as a
101
+ * possible gap in the list, at the severity the family's catalog gives it.
97
102
  *
98
103
  * `reader` is for an output whose shape no field list states: an HTTP response is
99
104
  * an envelope (`body`, `statusCode`, `headers`) whose `body` holds the author's
@@ -108,6 +113,7 @@ export type OutputContract = {
108
113
  readonly kind: 'fields';
109
114
  readonly fields: Readonly<Record<string, TypeDesc>> | undefined;
110
115
  readonly open?: boolean;
116
+ readonly partial?: boolean;
111
117
  readonly read: FieldsRead;
112
118
  } | {
113
119
  readonly kind: 'reader';
@@ -241,6 +241,9 @@ export declare const REFUSALS: {
241
241
  readonly CONNECTOR_OBJECT_REQUIRED: "draft";
242
242
  readonly CONNECTOR_OUTPUT_SOURCE: "lint";
243
243
  readonly CONNECTOR_OUTPUT_VAR_CLASH: "lint";
244
+ readonly CONNECTOR_READ_FIELD_CASE: "lint";
245
+ readonly CONNECTOR_READ_NOT_OUTPUT: "lint";
246
+ readonly CONNECTOR_READ_UNKNOWN_FIELD: "lint";
244
247
  readonly CONNECTOR_RESOLVE_FAILED: "lowering";
245
248
  readonly CONTINUE_OUTSIDE_LOOP: "lowering";
246
249
  readonly CONTRIBUTION_BINDING_UNRESOLVED: "draft";
@@ -315,6 +315,9 @@ export const REFUSALS = {
315
315
  CONNECTOR_OBJECT_REQUIRED: 'draft',
316
316
  CONNECTOR_OUTPUT_SOURCE: 'lint',
317
317
  CONNECTOR_OUTPUT_VAR_CLASH: 'lint',
318
+ CONNECTOR_READ_FIELD_CASE: 'lint',
319
+ CONNECTOR_READ_NOT_OUTPUT: 'lint',
320
+ CONNECTOR_READ_UNKNOWN_FIELD: 'lint',
318
321
  CONNECTOR_RESOLVE_FAILED: 'lowering',
319
322
  CONTINUE_OUTSIDE_LOOP: 'lowering',
320
323
  CONTRIBUTION_BINDING_UNRESOLVED: 'draft',
@@ -11,6 +11,13 @@ import type { FlowContexts, FlowNodeFamily, FlowTriggerFamily, FlowTriggerType }
11
11
  /** The families, in no significant order. Adding one is the whole of registering it. */
12
12
  export declare const FLOW_NODE_FAMILIES: readonly FlowNodeFamily[];
13
13
  export declare const FLOW_NODE_TYPES: NodeTypeRegistry<FlowContexts>;
14
+ /**
15
+ * Whether a family's catalog marks `code` as about the node's type, not its
16
+ * content (`aboutNodeType`): an edit to a node the baseline reports it on too
17
+ * does not introduce it. Read by `check --baseline` (`scopeToEdit`) and by
18
+ * `merge --baseline-from`.
19
+ */
20
+ export declare function isNodeTypeFinding(code: string): boolean;
14
21
  /**
15
22
  * Register a node-type package's family with the Flow registry
16
23
  * (`@uipath/maestro-builder-sdk/extend`'s `defineFlowNodeFamily` calls this).
@@ -27,6 +27,15 @@ import { triggerFlowFamily } from './nodes/trigger/flow/family.js';
27
27
  /** The families, in no significant order. Adding one is the whole of registering it. */
28
28
  export const FLOW_NODE_FAMILIES = [agentFlowFamily, aiPatternsFlowFamily, connectorFlowFamily, conversationFlowFamily, dataFabricFlowFamily, delayFlowFamily, documentFlowFamily, hitlFlowFamily, httpFlowFamily, mockFlowFamily, processFlowFamily, queueFlowFamily, scriptFlowFamily, transformFlowFamily];
29
29
  export const FLOW_NODE_TYPES = new NodeTypeRegistry('flow', FLOW_NODE_FAMILIES, { hasBundledDefinition });
30
+ /**
31
+ * Whether a family's catalog marks `code` as about the node's type, not its
32
+ * content (`aboutNodeType`): an edit to a node the baseline reports it on too
33
+ * does not introduce it. Read by `check --baseline` (`scopeToEdit`) and by
34
+ * `merge --baseline-from`.
35
+ */
36
+ export function isNodeTypeFinding(code) {
37
+ return FLOW_NODE_TYPES.families.some((f) => Object.hasOwn(f.diagnostics, code) && f.diagnostics[code].aboutNodeType === true);
38
+ }
30
39
  // Node-type packages contribute their families through the light `/extend` entry;
31
40
  // adopt the ones already contributed and register every later one as it arrives.
32
41
  adoptContributedFamilies((family) => FLOW_NODE_TYPES.register(family));
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { SolutionProjects } from './core/solution-projects.js';
13
13
  import type { ResourceResolutions } from './core/resource-resolution.js';
14
- import type { ArtifactContexts, FactoryCall, NodeType, OptionKeyLists } from './core/nodes/node-type.js';
14
+ import type { ArtifactContexts, FactoryCall, NodeType, OptionKeyLists, OutputContract } from './core/nodes/node-type.js';
15
15
  import type { VersionedNodeType } from './core/nodes/versioned.js';
16
16
  import type { DiagnosticCatalog, NodeFamily, Placement } from './core/nodes/family.js';
17
17
  import type { DefinitionReference, NodeContribution } from './core/node-classes.js';
@@ -670,6 +670,13 @@ export interface FlowNodeType<Spec> extends NodeType<Spec, FlowNodeContribution,
670
670
  * `errorPort`, so the two rungs give one answer; undefined when it cannot.
671
671
  */
672
672
  checkDefinition?(spec: Spec, options: CheckOpts): unknown;
673
+ /**
674
+ * What reading this step's output yields, when only check's `options` can say
675
+ * (a connector operation's declared outputs, from the library). Check reads it
676
+ * in place of `output`; undefined falls back to `output`, so a check with no
677
+ * library judges the step as it always did.
678
+ */
679
+ checkOutput?(spec: Spec, options: CheckOpts): OutputContract | undefined;
673
680
  /**
674
681
  * The node a spec builds, as far as the spec itself names it, for a per-tenant
675
682
  * prefix type: its concrete type name, and the version the spec pins. A refused
package/dist/merge-cli.js CHANGED
@@ -109,6 +109,7 @@ import { fetchesDefinitions, openWithFetchedDefinitions, withFetchedDefinitions
109
109
  import { Bindings } from './bindings.js';
110
110
  import { defaultBindingsFile } from './workdir.js';
111
111
  import { loadNodePackages } from './node-packages.js';
112
+ import { isNodeTypeFinding } from './flow-node-registry.js';
112
113
  import { baselineFromOriginal, checkEdited, compileSourceDraftTolerant, decompileOriginal } from './merge-compile.js';
113
114
  import { classifyDrafts, classifyLowering, findingCounts, splitUnplaced } from './edit-scope.js';
114
115
  const USAGE = 'usage: flow-merge <original.flow> <edited.flow | Edited.flow.ts> [-o merged.flow, or the original for a stamped .flow.ts] '
@@ -529,11 +530,24 @@ export async function run(argv) {
529
530
  // refused when it does not: then the edit introduced it (#1322). With a
530
531
  // precompiled --baseline file there is nothing to compare against, so every
531
532
  // one is refused, as before.
533
+ const baselineChecks = baselineCompile === undefined ? []
534
+ : checkEdited(baselineCompile.built, baselineCompile.flow, checkOpts).filter((d) => d.level === 'error');
532
535
  const baselineFindings = baselineCompile === undefined ? undefined : findingCounts([
533
536
  ...baselineCompile.drafts,
534
537
  ...baselineCompile.lowering,
535
- ...checkEdited(baselineCompile.built, baselineCompile.flow, checkOpts).filter((d) => d.level === 'error'),
538
+ ...baselineChecks,
536
539
  ]);
540
+ // A finding about the node's type (`aboutNodeType`, a retired node) on a node
541
+ // the edit changed does not stop the write when the original's own round trip
542
+ // reports it on that node too: the node was already of that type, and the edit
543
+ // did not make it so. It is printed; a node the edit added stays
544
+ // refused. Needs --baseline-from: a precompiled --baseline carries no findings.
545
+ const typeFindings = new Set(baselineChecks.filter((d) => isNodeTypeFinding(d.code)).map((d) => `${d.nodeId}\n${d.code}`));
546
+ const keptType = checked.refused.filter((d) => d.reason === 'edited' && typeFindings.has(`${d.nodeId}\n${d.code}`));
547
+ checked.refused = checked.refused.filter((d) => !keptType.includes(d));
548
+ for (const d of keptType) {
549
+ console.error(` ⚠ [${d.code}] "${d.nodeId}" is changed, and the original has this finding on it too, so it does not stop the write: ${d.message}`);
550
+ }
537
551
  const unplacedDrafts = splitUnplaced(unplaced, baselineFindings);
538
552
  const unplacedChecks = splitUnplaced(checked.unplaced, baselineFindings);
539
553
  const unplacedLowering = splitUnplaced(lowered.unplaced, baselineFindings);
@@ -557,7 +571,11 @@ export async function run(argv) {
557
571
  : d.reason === 'uncompared'
558
572
  ? `"${d.nodeId}" is the original's, but the SDK cannot compile it, and ${baseline ? 'a precompiled --baseline has no record of' : 'with no baseline merge cannot tell'} `
559
573
  + 'whether the edit touched it; pass --baseline-from <original.flow> (instead of --baseline) so merge compiles the original itself and can compare the node'
560
- : `"${d.nodeId}" is changed or new in the edited flow`;
574
+ : baselineCompile === undefined && isNodeTypeFinding(d.code)
575
+ ? `"${d.nodeId}" is changed or new in the edited flow, and without a derived baseline merge cannot tell whether `
576
+ + 'the original already had this finding on it; pass --baseline-from <original.flow> (instead of --baseline) '
577
+ + 'so a node the original already had is written with a warning'
578
+ : `"${d.nodeId}" is changed or new in the edited flow`;
561
579
  console.error(` ✗ [${d.code}] ${where}: ${d.message}`);
562
580
  }
563
581
  console.error(`flow-merge: ${errors.length} error(s) in nodes merge takes from the edited flow; each line says what to do (finish the node, revert the edit, or pass what merge needs). Nothing written.`);
@@ -1,12 +1,14 @@
1
1
  import { eventTriggerType } from './event-trigger.js';
2
2
  import { eventWaitNodeType } from './event-wait.js';
3
3
  import { connectorNodeType } from './node-type.js';
4
+ import { CONNECTOR_DIAGNOSTICS } from './output-read.js';
4
5
  export const connectorFlowFamily = {
5
6
  id: 'connector',
6
7
  title: 'Integration Service connector',
7
8
  types: [connectorNodeType, eventWaitNodeType],
8
- // Its rules' codes are the pipeline's, shared with the triggers (ctx.connector, ctx.eventSubscription).
9
- diagnostics: {},
9
+ // The output-read codes are the family's own; its other rules' codes are the
10
+ // pipeline's, shared with the triggers (ctx.connector, ctx.eventSubscription).
11
+ diagnostics: CONNECTOR_DIAGNOSTICS,
10
12
  };
11
13
  export const connectorTriggerFamily = {
12
14
  id: 'connector',
@@ -7,6 +7,7 @@ import { libraryExecution } from '../../../core/external-execution.js';
7
7
  import { CONNECTOR_INPUT_MISSING, FLOW_EXPR_DIALECT, buildConnectorInputs, replayInputsOf, transportHttpMethod } from '../../../core/connector-inputs.js';
8
8
  import { ConnectorResolveError } from '../../../core/connector-resolve-error.js';
9
9
  import { definitionHasErrorPort } from '../../../core/error-port.js';
10
+ import { connectorCheckOutput } from './output-read.js';
10
11
  import { Expr } from '../../../core/expr.js';
11
12
  import { jsonClone } from '../../../core/json-clone.js';
12
13
  import { subNodeId } from '../../../core/node-id-placeholder.js';
@@ -454,6 +455,8 @@ const connector10 = {
454
455
  // Every Expr in the inputs, nested ones included, resolves against the flow's names.
455
456
  expressions: (spec) => [{ value: spec.inputs }],
456
457
  output: () => ({ kind: 'opaque' }),
458
+ // Given a library, the operation's declared outputs: a read outside them is reported (#1967).
459
+ checkOutput: (spec, options) => connectorCheckOutput(spec, options.connectorOutputFields),
457
460
  listShape: (spec, options) => options.listEnvelope?.(spec.key, spec.action, spec.version, spec.object),
458
461
  };
459
462
  export const connectorNodeType = {
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The read rule on a connector operation's output, and the family's catalog.
3
+ *
4
+ * `out('upload', 'WebUrl')` compiles, and reads undefined at run time when the
5
+ * operation returns `webUrl`: field names are case-sensitive and nothing
6
+ * compared the read with the operation's declared outputs (#1967). Given a
7
+ * library, the operation type's `checkOutput` states those outputs as a
8
+ * `partial` `fields` contract, and check's shared read rule reports:
9
+ *
10
+ * - CONNECTOR_READ_NOT_OUTPUT: `$vars.<step>.<x>` where `x` is not `output`
11
+ * (or `error`); a connector publishes its response only under `output`.
12
+ * - CONNECTOR_READ_FIELD_CASE: the field differs from a declared one only in
13
+ * letter case. It reads undefined unless the response's casing differs
14
+ * from the declared one, which no live response has been checked for; a
15
+ * warning until one is (#2017 review).
16
+ * - CONNECTOR_READ_UNKNOWN_FIELD: no declared field has the name. A warning,
17
+ * because the library's list can miss a field the response really carries
18
+ * (`core/connector-output-fields.ts`).
19
+ *
20
+ * Without a library, or for an operation the library cannot describe (a list,
21
+ * an unprepared connection-resolved schema, no declared fields), the type falls
22
+ * back to its `opaque` output and nothing is reported.
23
+ */
24
+ import type { DiagnosticCatalog } from '../../../core/nodes/family.js';
25
+ import type { OutputContract } from '../../../core/nodes/node-type.js';
26
+ /** Every code the family reports, with the severity it reports it at. */
27
+ export declare const CONNECTOR_DIAGNOSTICS: DiagnosticCatalog;
28
+ /** The top-level output fields of one operation, from check's library (`CheckOpts.connectorOutputFields`). */
29
+ type OutputFields = (connector: string, operation: string, version?: string, object?: string) => readonly string[] | undefined;
30
+ /** The operation's output as check's library states it, or undefined to fall back to `opaque`. */
31
+ export declare function connectorCheckOutput(spec: {
32
+ key: string;
33
+ action: string;
34
+ version?: string;
35
+ object?: string;
36
+ }, outputFields: OutputFields | undefined): OutputContract | undefined;
37
+ export {};
@@ -0,0 +1,23 @@
1
+ /** Every code the family reports, with the severity it reports it at. */
2
+ export const CONNECTOR_DIAGNOSTICS = {
3
+ CONNECTOR_READ_NOT_OUTPUT: { severity: 'error', summary: 'a read outside the step\'s output' },
4
+ CONNECTOR_READ_FIELD_CASE: { severity: 'warning', summary: 'a read of a declared output field in the wrong letter case' },
5
+ CONNECTOR_READ_UNKNOWN_FIELD: { severity: 'warning', summary: 'a read of a field the operation does not declare' },
6
+ };
7
+ /** The operation's output as check's library states it, or undefined to fall back to `opaque`. */
8
+ export function connectorCheckOutput(spec, outputFields) {
9
+ const fields = outputFields?.(spec.key, spec.action, spec.version, spec.object);
10
+ if (fields === undefined)
11
+ return undefined;
12
+ return {
13
+ kind: 'fields',
14
+ fields: Object.fromEntries(fields.map((f) => [f, 'any'])),
15
+ partial: true,
16
+ read: {
17
+ codePrefix: 'CONNECTOR',
18
+ label: 'Connector step',
19
+ // Unreachable: a partial contract always carries its fields.
20
+ whenUndeclared: '',
21
+ },
22
+ };
23
+ }
@@ -3,7 +3,12 @@ import { escapeRegExp } from '../../../core/escape-regexp.js';
3
3
  import { isJsExpressionValue } from '../../../core/wire-expr.js';
4
4
  import { Expr } from '../../../core/expr.js';
5
5
  export const HTTP_DIAGNOSTICS = {
6
- HTTP_V1_RETIRED: { severity: 'warning', summary: 'the plain node is retired on the tenant registry' },
6
+ HTTP_V1_RETIRED: {
7
+ severity: 'error',
8
+ summary: 'the plain node, which the tenant node registry no longer serves',
9
+ // About what the node is, not what it holds.
10
+ aboutNodeType: true,
11
+ },
7
12
  HTTP_BINDING_REQUIRES_MANAGED: { severity: 'error', summary: 'connection settings on the standalone node' },
8
13
  HTTP_MANAGED_BINDING_INCOMPLETE: { severity: 'error', summary: 'a managed connection without both connection and folder' },
9
14
  HTTP_TARGET_CONNECTOR_EMPTY: { severity: 'error', summary: 'an empty targetConnector' },
@@ -102,10 +107,8 @@ function checkSecretHeaders(inputs, ctx) {
102
107
  */
103
108
  export function checkHttp(inputs, ctx) {
104
109
  const step = ctx.step;
105
- // `core.action.http` is retired: the tenant serves only `core.action.http.v2`,
106
- // and a run of the plain node answers 500 "No handler registered for extension
107
- // type 'Intsvc.HttpExecution'". A warning, not an error, so `decompile` keeps
108
- // round-tripping existing flows.
110
+ // A new plain node is an error; a node the baseline already has is a warning
111
+ // (`aboutNodeType`). `compile` does not run `check`.
109
112
  //
110
113
  // Moving to the managed node is not a rename: a non-2xx fails the step instead
111
114
  // of arriving on the success path with `statusCode`, so a status branch becomes
@@ -119,9 +122,10 @@ export function checkHttp(inputs, ctx) {
119
122
  const tail = wantsConnection
120
123
  ? `It also sets Integration Service connection settings, which only the managed node can use.`
121
124
  : `Without a connection it sends the request through Integration Service's shared egress, so public APIs can answer 429.`;
122
- ctx.report('HTTP_V1_RETIRED', `Step "${step}" emits core.action.http, which no longer runs on the platform: the tenant registry serves only `
123
- + `core.action.http.v2, and the runtime answers 500 "No handler registered for extension type `
124
- + `'Intsvc.HttpExecution'". Moving to managed: true changes behaviour rather than just the node type: a non-2xx `
125
+ ctx.report('HTTP_V1_RETIRED', `Step "${step}" emits core.action.http, the plain HTTP node, which the tenant node registry no longer serves `
126
+ + `(it serves only core.action.http.v2), so the designer does not offer it. Write managed: true for a new step. `
127
+ + `A plain node the flow already has is a warning under check --baseline, even when the edit changes it. `
128
+ + `Moving to managed: true changes behaviour rather than just the node type: a non-2xx `
125
129
  + `fails the step instead of arriving with statusCode, so a status branch becomes an .onError() handler `
126
130
  + `reading err('${step}', 'status'). ${tail}`, wantsConnection ? `http({ url: …, managed: true, connection, folder })` : `http({ url: …, managed: true })`);
127
131
  }
@@ -15,7 +15,7 @@ export function http(inputs) {
15
15
  if (typeof inputs.managed !== 'boolean') {
16
16
  throw new CompileRefusal('HTTP_MANAGED_REQUIRED', 'http() requires managed: true or managed: false because they emit different platform nodes. '
17
17
  + 'Use true for Managed HTTP Request/core.action.http.v2 or when non-2xx statuses must reach .onError(); '
18
- + 'false emits the retired core.action.http, which no longer runs on the platform.');
18
+ + 'false emits the plain core.action.http, which the tenant node registry no longer serves.');
19
19
  }
20
20
  return builtinActionSpec({ kind: 'http', inputs });
21
21
  }
@@ -35,9 +35,9 @@ interface HttpInputsBase {
35
35
  body?: string | Expr;
36
36
  contentType?: string;
37
37
  /**
38
- * Choose the HTTP node explicitly. `false` emits the retired
39
- * `core.action.http`, which no longer runs on the platform (500 "No handler
40
- * registered for extension type 'Intsvc.HttpExecution'"); `true` emits the managed `core.action.http.v2`, routed
38
+ * Choose the HTTP node explicitly. `false` emits the plain
39
+ * `core.action.http`, which the tenant node registry no longer serves, so
40
+ * `check` refuses a new one (HTTP_V1_RETIRED); `true` emits the managed `core.action.http.v2`, routed
41
41
  * through Integration Service's HTTP connector.
42
42
  *
43
43
  * This has no default because these are different platform nodes, not two
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.117.0",
3
+ "version": "6.117.1",
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",
@@ -124,5 +124,5 @@
124
124
  "@types/node": "^22.7.0",
125
125
  "esbuild": "^0.28.1"
126
126
  },
127
- "gitref": "1b64d4c5c62d489c3bb736aa9a47860615d43fa0"
127
+ "gitref": "eacce228a15703bf2725ea4513eaedb88d6f7663"
128
128
  }