@uipath/maestro-builder-sdk 6.108.0 → 6.110.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.
@@ -89,9 +89,136 @@ const ESSENTIAL_KEYS = new Set([
89
89
  'path',
90
90
  'unifiedTypesCompatible',
91
91
  ]);
92
- function schemaReplayDetails(operation, inputValues) {
92
+ /**
93
+ * An input's value by the library's name for it: the flat key (`project`,
94
+ * `fields.project.key` as one key), else the nested path a body object holds
95
+ * (`{ fields: { project: { key } } }`).
96
+ */
97
+ function inputAt(inputValues, name) {
98
+ if (Object.hasOwn(inputValues, name))
99
+ return inputValues[name];
100
+ let at = inputValues;
101
+ for (const segment of name.split('.')) {
102
+ if (typeof at !== 'object' || at === null || Array.isArray(at) || !Object.hasOwn(at, segment))
103
+ return undefined;
104
+ at = at[segment];
105
+ }
106
+ return at;
107
+ }
108
+ /**
109
+ * A parent input's literal text, or `undefined` for one that is not a literal:
110
+ * absent, a container, or a runtime expression (Flow's `=js:…`, BPMN's
111
+ * `=vars.…`; a literal parent value never starts with `=`).
112
+ */
113
+ function literalParent(value) {
114
+ if (typeof value === 'number' || typeof value === 'boolean')
115
+ return String(value);
116
+ if (typeof value === 'string' && !value.startsWith('='))
117
+ return value;
118
+ return undefined;
119
+ }
120
+ /**
121
+ * The parents a prepared replay request was recorded for that the step sets to
122
+ * a DIFFERENT literal, as `{ name, recorded, given }`.
123
+ *
124
+ * `registry prepare -f <parent>=<value>` records the request
125
+ * (`customFieldsRequestDetails`) and the field set those values select. A step
126
+ * that names another project or issue type had its inputs checked against the
127
+ * old fields (#1972). A parent the step leaves unset, or
128
+ * sets from a runtime expression, is not compared: the recorded values are the
129
+ * author's design-time choice for it.
130
+ */
131
+ export function schemaReplayParentMismatches(details, inputValues) {
132
+ const rows = details?.parameterValues;
133
+ if (!inputValues || !Array.isArray(rows))
134
+ return [];
135
+ const mismatches = [];
136
+ for (const row of rows) {
137
+ if (!Array.isArray(row) || typeof row[0] !== 'string')
138
+ continue;
139
+ const name = row[0].replaceAll('_sub_', '.');
140
+ const recorded = String(row[1]);
141
+ const given = literalParent(inputAt(inputValues, name));
142
+ if (given !== undefined && given !== recorded)
143
+ mismatches.push({ name, recorded, given });
144
+ }
145
+ return mismatches;
146
+ }
147
+ /**
148
+ * The parents a schema-dynamic operation needs literal values for before
149
+ * compile can write a replay request, or `undefined` when it writes one (or
150
+ * needs none).
151
+ *
152
+ * An operation is schema-dynamic when the library records its design-time
153
+ * action (`operation.schemaAction` with `parents`). Compile writes the request
154
+ * `prepare -f` recorded, else one from the step's own literal parents; with a
155
+ * parent unset or computed at run time it writes `customFieldsRequestDetails:
156
+ * null`, which `validate` accepts and the designer cannot replay
157
+ * (`SCHEMA_REPLAY_MISSING`, #1972).
158
+ */
159
+ export function schemaReplayGap(entry, inputValues) {
160
+ const operation = entry?.operation ?? {};
93
161
  if (operation.customFieldsRequestDetails)
94
- return operation.customFieldsRequestDetails;
162
+ return undefined;
163
+ const action = operation.schemaAction;
164
+ const parents = Array.isArray(action?.parents) ? action.parents.filter((p) => typeof p === 'string') : [];
165
+ if (typeof action?.name !== 'string' || parents.length === 0)
166
+ return undefined;
167
+ const unresolved = parents.filter((p) => literalParent(inputAt(inputValues, p)) === undefined);
168
+ return unresolved.length > 0 ? { parents, unresolved } : undefined;
169
+ }
170
+ /**
171
+ * A prepared operation's mismatch for one step: the parents the step sets to
172
+ * another literal, and the `prepare` that would record the step's own values,
173
+ * or `undefined` when the step matches what was prepared (or nothing was).
174
+ *
175
+ * `prepare -f` records ONE request per operation, so two steps on the same
176
+ * operation with different parents (two entities, two Jira projects) cannot
177
+ * both match it. Compile therefore writes each step's own request (see
178
+ * {@link schemaReplayDetails}); what is left is that the step's inputs were
179
+ * validated against the prepared values' field set, which `check` reports as
180
+ * the warning `SCHEMA_REPLAY_PARENT_MISMATCH` (#1972).
181
+ */
182
+ export function schemaReplayMismatch(entry, inputValues) {
183
+ const details = entry?.operation?.customFieldsRequestDetails;
184
+ const mismatches = schemaReplayParentMismatches(details, inputValues);
185
+ if (mismatches.length === 0)
186
+ return undefined;
187
+ const flags = details.parameterValues
188
+ .filter((row) => Array.isArray(row) && typeof row[0] === 'string')
189
+ .flatMap((row) => {
190
+ const name = String(row[0]).replaceAll('_sub_', '.');
191
+ const changed = mismatches.find((m) => m.name === name);
192
+ return ['-f', `${name}=${changed ? changed.given : String(row[1])}`];
193
+ });
194
+ return { mismatches, flags };
195
+ }
196
+ /**
197
+ * The schema replay request compile writes for one step.
198
+ *
199
+ * A prepared request whose parents the step sets to other literals is rebuilt
200
+ * with the step's values: the request is per step, the recording per
201
+ * operation, so the recorded one would describe another parent's schema
202
+ * (#1972). A parent the step leaves unset or computes at run time keeps the
203
+ * prepared value, the author's design-time choice for it.
204
+ */
205
+ function schemaReplayDetails(entry, inputValues) {
206
+ const operation = entry?.operation ?? {};
207
+ if (operation.customFieldsRequestDetails) {
208
+ const details = operation.customFieldsRequestDetails;
209
+ const mismatches = schemaReplayParentMismatches(details, inputValues);
210
+ if (mismatches.length === 0)
211
+ return details;
212
+ return {
213
+ ...details,
214
+ parameterValues: details.parameterValues.map((row) => {
215
+ if (!Array.isArray(row) || typeof row[0] !== 'string')
216
+ return row;
217
+ const changed = mismatches.find((m) => m.name === String(row[0]).replaceAll('_sub_', '.'));
218
+ return changed ? [row[0], changed.given] : row;
219
+ }),
220
+ };
221
+ }
95
222
  const action = operation.schemaAction;
96
223
  const parents = Array.isArray(action?.parents) ? action.parents : [];
97
224
  if (!inputValues || typeof action?.name !== 'string' || parents.length === 0)
@@ -241,7 +368,7 @@ export function buildEssentialConfiguration(entry, version, inputValues, seed =
241
368
  // activity has none (`null`, the default).
242
369
  executionType,
243
370
  operation: verb,
244
- customFieldsRequestDetails: schemaReplayDetails(op, inputValues),
371
+ customFieldsRequestDetails: schemaReplayDetails(entry, inputValues),
245
372
  savedFilterTrees: savedFilterTrees(op, inputValues, seed),
246
373
  objectName: op.objectName,
247
374
  httpMethod: transportHttpMethod(op.httpMethod),
@@ -19,6 +19,7 @@
19
19
  * `flow-node-type.ts`), so a contributor never writes these parameters.
20
20
  */
21
21
  import type { TypeDesc } from '../expr.js';
22
+ import type { ResourceResolutions } from '../resource-resolution.js';
22
23
  /**
23
24
  * Where a node type's definition comes from. `bundled`: a `<typeName>@<version>`
24
25
  * entry the SDK ships, which every answer the definition can give (its error port,
@@ -48,6 +49,15 @@ export type ExprSite = {
48
49
  } | {
49
50
  readonly code: string;
50
51
  };
52
+ /**
53
+ * What an output contract may consult beyond its spec: the solution resources
54
+ * `registry prepare` recorded, for a type whose output schema can come from the
55
+ * tenant (a published process's `returns`, #1979). Undefined when `check` was
56
+ * given no ledger.
57
+ */
58
+ export interface OutputContext {
59
+ readonly resources?: ResourceResolutions;
60
+ }
51
61
  /** A read of a node's output, as the output rules see it. */
52
62
  export interface OutputRead {
53
63
  /** The step name being read. */
@@ -216,8 +226,8 @@ export interface NodeType<Spec, Serialized, Ctx extends ArtifactContexts> {
216
226
  * switch off every reference rule for its steps.
217
227
  */
218
228
  expressions(spec: Spec): Iterable<ExprSite>;
219
- /** What reading this node's output yields. */
220
- output(spec: Spec): OutputContract;
229
+ /** What reading this node's output yields; `ctx` carries what `check` was given beyond the spec. */
230
+ output(spec: Spec, ctx?: OutputContext): OutputContract;
221
231
  /**
222
232
  * Whether this node type is the one for `spec`, when several share a kind (see
223
233
  * VersionedNodeType.matches). On a single-version type only; a versioned type
@@ -630,6 +630,14 @@ export declare const REFUSALS: {
630
630
  readonly PRESERVATION_FIELD_COLLISION: "lowering";
631
631
  readonly PRESERVATION_LEGACY_DEFAULT_MISMATCH: "lowering";
632
632
  readonly PRESERVATION_TARGET_MISSING: "lowering";
633
+ readonly PROCESS_INPUT_MISSING: "lint";
634
+ readonly PROCESS_INPUT_TYPE: "lint";
635
+ readonly PROCESS_INPUT_UNKNOWN: "lint";
636
+ readonly PROCESS_KEY_MISMATCH: "lint";
637
+ readonly PROCESS_RECORD_STALE: "lint";
638
+ readonly PROCESS_RETURNS_TYPE: "lint";
639
+ readonly PROCESS_RETURNS_UNKNOWN: "lint";
640
+ readonly PROCESS_TYPE_MISMATCH: "lint";
633
641
  readonly QUEUE_BAD_DATE: "lint";
634
642
  readonly QUEUE_BAD_PRIORITY: "lint";
635
643
  readonly QUEUE_ITEM_EXPR_UNSUPPORTED: "lowering";
@@ -695,6 +703,8 @@ export declare const REFUSALS: {
695
703
  readonly SCHEDULE_NEVER_FIRES: "lint";
696
704
  readonly SCHEDULE_NOT_ISO: "lint";
697
705
  readonly SCHEDULE_NO_INTERVAL: "lint";
706
+ readonly SCHEMA_REPLAY_MISSING: "lint";
707
+ readonly SCHEMA_REPLAY_PARENT_MISMATCH: "lint";
698
708
  readonly SCHEMA_VERSION_ABOVE_FLOOR: "lint";
699
709
  readonly SCHEMA_VERSION_BELOW_FLOOR: "lint";
700
710
  readonly SCHEMA_VERSION_ON_SUBFLOW: "lint";
@@ -706,6 +706,14 @@ export const REFUSALS = {
706
706
  PRESERVATION_FIELD_COLLISION: 'lowering',
707
707
  PRESERVATION_LEGACY_DEFAULT_MISMATCH: 'lowering',
708
708
  PRESERVATION_TARGET_MISSING: 'lowering',
709
+ PROCESS_INPUT_MISSING: 'lint',
710
+ PROCESS_INPUT_TYPE: 'lint',
711
+ PROCESS_INPUT_UNKNOWN: 'lint',
712
+ PROCESS_KEY_MISMATCH: 'lint',
713
+ PROCESS_RECORD_STALE: 'lint',
714
+ PROCESS_RETURNS_TYPE: 'lint',
715
+ PROCESS_RETURNS_UNKNOWN: 'lint',
716
+ PROCESS_TYPE_MISMATCH: 'lint',
709
717
  QUEUE_BAD_DATE: 'lint',
710
718
  QUEUE_BAD_PRIORITY: 'lint',
711
719
  QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
@@ -771,6 +779,8 @@ export const REFUSALS = {
771
779
  SCHEDULE_NEVER_FIRES: 'lint',
772
780
  SCHEDULE_NOT_ISO: 'lint',
773
781
  SCHEDULE_NO_INTERVAL: 'lint',
782
+ SCHEMA_REPLAY_MISSING: 'lint',
783
+ SCHEMA_REPLAY_PARENT_MISMATCH: 'lint',
774
784
  SCHEMA_VERSION_ABOVE_FLOOR: 'lint',
775
785
  SCHEMA_VERSION_BELOW_FLOOR: 'lint',
776
786
  SCHEMA_VERSION_ON_SUBFLOW: 'lint',
@@ -64,7 +64,39 @@ export interface ResourceResolution {
64
64
  * before prepare recorded it; `check` then checks no column.
65
65
  */
66
66
  fields?: EntityFieldSchema[];
67
+ /**
68
+ * For a published process (kind `Process`): its Orchestrator `ProcessType`
69
+ * (`Process`, `Api`, `Function`, `ProcessOrchestration`, `Flow`,
70
+ * `CaseManagement`, `Agent`), as `uip or processes get <key>` reports it.
71
+ * Absent for a process authored in the solution, and for every other kind.
72
+ */
73
+ processType?: string;
74
+ /**
75
+ * For a published process: its argument contract, the JSON Schemas in its
76
+ * `ArgumentsV2.Input` and `ArgumentsV2.Output` (#1979). A side Orchestrator
77
+ * left blank is absent: blank means the contract was not extracted, not that
78
+ * the process takes nothing (every `Api` process on the dev tenant answers
79
+ * `{"Input":"","Output":""}`, every RPA one `{}`). Absent altogether when
80
+ * neither side was read: every kind but `Process`, a process authored in the
81
+ * solution, and a process whose `ArgumentsV2` is blank.
82
+ *
83
+ * @example
84
+ * { input: { type: 'object', properties: { name: { type: 'string' } } },
85
+ * output: { type: 'object', properties: { EstimatedAge: { type: 'integer' } } } }
86
+ */
87
+ schema?: ResourceSchema;
88
+ }
89
+ /**
90
+ * A published resource's argument contract, as `prepare` recorded it (JSON
91
+ * Schema objects). A side that is absent is unknown, and nothing is checked
92
+ * or filled in from it.
93
+ */
94
+ export interface ResourceSchema {
95
+ input?: Readonly<Record<string, unknown>>;
96
+ output?: Readonly<Record<string, unknown>>;
67
97
  }
98
+ /** The kind a published Orchestrator process (RPA, API workflow, function, agentic process, agent) is catalogued under. */
99
+ export declare const PROCESS_KIND = "Process";
68
100
  /** Every recorded resolution, keyed by {@link resourceLedgerKey}. */
69
101
  export type ResourceResolutions = Readonly<Record<string, ResourceResolution>>;
70
102
  /**
@@ -15,6 +15,8 @@ import { cliSpelling, shellArg } from './cli-spelling.js';
15
15
  import { CompileRefusal } from './compile-refusal.js';
16
16
  /** The kind a Data Fabric entity is catalogued under. */
17
17
  export const ENTITY_KIND = 'Entity';
18
+ /** The kind a published Orchestrator process (RPA, API workflow, function, agentic process, agent) is catalogued under. */
19
+ export const PROCESS_KIND = 'Process';
18
20
  /**
19
21
  * The kinds `uip solution resources list --kind` documents, by lower case, so
20
22
  * `asset` and `Asset` key one row. A kind not listed is kept as written: the
@@ -3,6 +3,7 @@ import { GUID_RE } from '../../../core/binding-messages.js';
3
3
  import { nearestName } from '../../../core/edit-distance.js';
4
4
  import { ownEntry } from '../../../core/own-entry.js';
5
5
  import { blank } from '../../../core/process-resource.js';
6
+ import { returnsFromTenantHint } from './contract.js';
6
7
  export const PROCESS_DIAGNOSTICS = {
7
8
  AGENT_EMPTY_INPUT_FLOOR: { severity: 'warning', summary: 'an agent step that binds no inputs' },
8
9
  AGENT_EMPTY_RETURNS: { severity: 'warning', summary: 'an agent step with returns: {}' },
@@ -60,6 +61,14 @@ export const PROCESS_DIAGNOSTICS = {
60
61
  IN_SOLUTION_PROJECT_NOT_FOUND: { severity: 'error', summary: 'an in-solution process step naming no project of the solution' },
61
62
  IN_SOLUTION_PROJECT_PUBLISHED: { severity: 'error', summary: 'a process step naming a project with location published' },
62
63
  IN_SOLUTION_WRONG_BUILDER: { severity: 'error', summary: 'an in-solution process step whose builder does not call its project\'s type' },
64
+ PROCESS_INPUT_MISSING: { severity: 'error', summary: 'a published process step that leaves out an input the recorded process requires' },
65
+ PROCESS_INPUT_TYPE: { severity: 'error', summary: 'a published process step input whose literal is not the recorded argument type' },
66
+ PROCESS_INPUT_UNKNOWN: { severity: 'error', summary: 'a published process step input the recorded process does not declare' },
67
+ PROCESS_KEY_MISMATCH: { severity: 'error', summary: 'a published process step whose key is not the one prepare recorded' },
68
+ PROCESS_RECORD_STALE: { severity: 'warning', summary: 'a published process step whose prepare record is more than 24 hours old' },
69
+ PROCESS_RETURNS_TYPE: { severity: 'warning', summary: 'a published process step returns field typed differently from the recorded output' },
70
+ PROCESS_RETURNS_UNKNOWN: { severity: 'error', summary: 'a published process step returns field the recorded process does not return' },
71
+ PROCESS_TYPE_MISMATCH: { severity: 'error', summary: 'a published process step whose factory is not for the recorded process type' },
63
72
  RPA_KEY_NOT_KEY: { severity: 'error', summary: 'an RPA step whose key is not a GUID' },
64
73
  RPA_LOCAL_HAS_FOLDER: { severity: 'error', summary: 'an RPA step in-solution, with a folderPath' },
65
74
  RPA_LOCAL_NO_PROJECT_ID: { severity: 'warning', summary: 'an RPA step in-solution, with no projectId' },
@@ -359,8 +368,8 @@ export function rpaWorkflowRead(spec) {
359
368
  codePrefix: 'RPA',
360
369
  label: 'RPA process',
361
370
  whenUndeclared: `The process's output arguments live on the tenant; declare the ones you read. `
362
- + `\`uip maestro flow registry get uipath.core.rpa-workflow.${spec?.key}\` shows what the platform `
363
- + `synthesizes for it.`,
371
+ + `\`uip maestro flow registry get uipath.core.rpa-workflow.${spec?.key ?? '<key>'}\` shows what the platform `
372
+ + `synthesizes for it.${returnsFromTenantHint(spec)}`,
364
373
  };
365
374
  }
366
375
  /** A read of a published function's result — the api-workflow rules, this family's codes. */
@@ -378,8 +387,8 @@ export function checkPublishedFunctionRead({ node: name, field, rest, reader: st
378
387
  report('FUNCTION_READ_WITHOUT_RETURNS', `"$vars.${name}.output.${wanted}" (read in "${step}") reads a field of function "${name}"'s `
379
388
  + `result, but the step declares no \`returns\` — so the node carries no output schema and nothing can `
380
389
  + `tell a real field from a typo. The function's output arguments live on the tenant; declare the ones `
381
- + `you read. \`uip maestro flow registry get uipath.core.function.${spec.key}\` shows what the platform `
382
- + `synthesizes for it.`, `returns: { ${wanted}: 'string' }`);
390
+ + `you read. \`uip maestro flow registry get uipath.core.function.${spec.key ?? '<key>'}\` shows what the platform `
391
+ + `synthesizes for it.${returnsFromTenantHint(spec)}`, `returns: { ${wanted}: 'string' }`);
383
392
  return;
384
393
  }
385
394
  if (declared.includes(wanted))
@@ -405,8 +414,8 @@ export function checkApiWorkflowRead({ node: name, field, rest, reader: step },
405
414
  report('APIWF_READ_WITHOUT_RETURNS', `"$vars.${name}.output.${wanted}" (read in "${step}") reads a field of API workflow "${name}"'s `
406
415
  + `result, but the step declares no \`returns\` — so the node carries no output schema and nothing `
407
416
  + `can tell a real field from a typo. The workflow's output arguments live on the tenant; declare `
408
- + `the ones you read. \`uip maestro flow registry get uipath.core.api-workflow.${spec.key}\` `
409
- + `shows what the platform synthesizes for it.`, `returns: { ${wanted}: 'string' }`);
417
+ + `the ones you read. \`uip maestro flow registry get uipath.core.api-workflow.${spec.key ?? '<key>'}\` `
418
+ + `shows what the platform synthesizes for it.${returnsFromTenantHint(spec)}`, `returns: { ${wanted}: 'string' }`);
410
419
  return;
411
420
  }
412
421
  if (declared.includes(wanted))
@@ -444,8 +453,8 @@ export function checkAgenticProcessRead({ node: name, field, rest, reader: step
444
453
  report('AGENTIC_READ_WITHOUT_RETURNS', `"$vars.${name}.output.${wanted}" (read in "${step}") reads a field of agentic process "${name}"'s `
445
454
  + `result, but the step declares no \`returns\` — so the node carries no output schema and nothing can `
446
455
  + `tell a real field from a typo. The process's output arguments live on the tenant; declare the ones `
447
- + `you read. \`uip maestro flow registry get uipath.core.agentic-process.${spec.key}\` shows what `
448
- + `the platform synthesizes for it.`, `returns: { ${wanted}: 'string' }`);
456
+ + `you read. \`uip maestro flow registry get uipath.core.agentic-process.${spec.key ?? '<key>'}\` shows what `
457
+ + `the platform synthesizes for it.${returnsFromTenantHint(spec)}`, `returns: { ${wanted}: 'string' }`);
449
458
  return;
450
459
  }
451
460
  if (declared.includes(wanted))
@@ -570,8 +579,8 @@ export function checkAgentRead({ node: name, field, rest, reader: step }, spec,
570
579
  report('AGENT_READ_WITHOUT_RETURNS', `"$vars.${name}.output.${wanted}" (read in "${step}") reads a field of agent "${name}"'s result, but `
571
580
  + `the step declares no \`returns\` — so the node carries no output schema and nothing can tell a real `
572
581
  + `field from a typo. The agent's output fields live on the tenant; declare the ones you read. `
573
- + `\`uip maestro flow registry get uipath.core.agent.${spec.key}\` shows them under `
574
- + `outputDefinition.output.schema.properties.`, `returns: { ${wanted}: 'string' }`);
582
+ + `\`uip maestro flow registry get uipath.core.agent.${spec.key ?? '<key>'}\` shows them under `
583
+ + `outputDefinition.output.schema.properties.${returnsFromTenantHint(spec)}`, `returns: { ${wanted}: 'string' }`);
575
584
  return;
576
585
  }
577
586
  if (declared.includes(wanted))
@@ -0,0 +1,81 @@
1
+ /**
2
+ * A published process step against what `registry prepare` recorded for it
3
+ * (#1979): the release key, the Orchestrator `ProcessType`, and the argument
4
+ * contract in the process's `ArgumentsV2` (`registry/prepare/process-schema.ts`).
5
+ *
6
+ * The author names the process the way the runtime does, by `name` and
7
+ * `folderPath`; the ledger row for `['Process', name, folderPath]` then
8
+ *
9
+ * - fills in what the author left out: `key` (the node type's suffix) and,
10
+ * when nothing is declared, `returns` (the output schema);
11
+ * - checks what the author wrote: the key and the factory against the
12
+ * recorded process, each `inputs` name and literal against the input
13
+ * schema, the required inputs, and each `returns` field against the output
14
+ * schema.
15
+ *
16
+ * Without a row nothing changes, so a flow that types the key and `returns` by
17
+ * hand checks and compiles exactly as before. A row older than 24 hours still
18
+ * fills in (a release key does not change while the process exists), but is
19
+ * no longer checked against (`PROCESS_RECORD_STALE`). A side of `ArgumentsV2`
20
+ * Orchestrator left blank is unknown: neither checked nor filled in from. A process in the solution
21
+ * (`location: 'in-solution'`) is never looked up here.
22
+ *
23
+ * @example
24
+ * // prepare --kind Process --name NameToAgeFixed --folder-path Shared, then:
25
+ * apiWorkflow({ name: 'NameToAgeFixed', folderPath: 'Shared', inputs: { name: 'tomasz' } })
26
+ * // compiles with key 'ce857908-…' and returns { EstimatedAge: 'integer' }
27
+ */
28
+ import type { ReturnFieldType } from '../../../core/actions.js';
29
+ import { type ResourceRef, type ResourceResolutions } from '../../../core/resource-resolution.js';
30
+ import type { FlowCheckContext } from '../../../flow-node-type.js';
31
+ /**
32
+ * The ledger reference a published process step names: kind `Process`, its
33
+ * `name`, and its `folderPath` as the folder. Undefined for an in-solution step,
34
+ * or one missing either, which has nothing to look up.
35
+ */
36
+ export declare function processRef(inputs: unknown): ResourceRef | undefined;
37
+ /**
38
+ * The `returns` a recorded output schema declares, or undefined when it
39
+ * declares no field.
40
+ *
41
+ * @example
42
+ * recordedReturns({ type: 'object', properties: { EstimatedAge: { type: 'integer' } } }) // { EstimatedAge: 'integer' }
43
+ */
44
+ export declare function recordedReturns(output: Readonly<Record<string, unknown>> | undefined): Record<string, ReturnFieldType> | undefined;
45
+ /**
46
+ * The step's inputs with what `prepare` recorded filled in: a blank `key` from
47
+ * the row, and an omitted `returns` from its output schema when that side was
48
+ * recorded (not for a fire-and-forget dispatch, which publishes no output).
49
+ * Anything the author wrote is kept. A row of any age is used, so the same
50
+ * source and ledger compile the same `.flow`; without a row, the inputs as
51
+ * they are.
52
+ */
53
+ export declare function withRecordedProcess<T>(inputs: T, resources: ResourceResolutions | undefined): T;
54
+ /**
55
+ * Why a published step with no key has none, naming the `prepare` command that
56
+ * records it — a missing row and an old one read differently
57
+ * (`resolveRecordedResource`'s wording). Undefined when the step names no
58
+ * process to look up (no name or folder, or in-solution), or its row is usable.
59
+ *
60
+ * @example
61
+ * unrecordedKeyReason({ name: 'NameToAgeFixed', folderPath: 'Shared' }, undefined)
62
+ * // 'process "NameToAgeFixed" in folder "Shared" is not resolved. … registry prepare --kind Process --name NameToAgeFixed --folder-path Shared'
63
+ */
64
+ export declare function unrecordedKeyReason(inputs: unknown, resources: ResourceResolutions | undefined): string | undefined;
65
+ /**
66
+ * The sentence a `*_READ_WITHOUT_RETURNS` message ends with for a published
67
+ * step: the `prepare` command that records the output schema compile then
68
+ * writes. `''` when the step names no process to record.
69
+ */
70
+ export declare function returnsFromTenantHint(inputs: unknown): string;
71
+ /**
72
+ * Check a published process step against its recorded row: the key, the
73
+ * factory (`subType`, the binding subtype the step would be written with, is
74
+ * the `ProcessType` it starts), the inputs and the declared `returns`. A step
75
+ * with no fresh row is not checked here.
76
+ *
77
+ * @param inputs - The step's inputs as the author wrote them (not filled in).
78
+ * @param subType - The `resourceSubType` the step's definition carries, e.g. `'Api'`.
79
+ * @param label - How a message names the step's kind, e.g. `'API workflow'`.
80
+ */
81
+ export declare function checkRecordedProcess(inputs: unknown, ctx: FlowCheckContext, subType: string, label: string): void;