@uipath/maestro-builder-sdk 6.122.5 → 6.122.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-index.md +9 -9
- package/dist/api-members.md +47 -42
- package/dist/core/refusals.d.ts +2 -0
- package/dist/core/refusals.js +2 -0
- package/dist/nodes/process/flow/check.js +42 -1
- package/dist/nodes/process/flow/contract.d.ts +8 -0
- package/dist/nodes/process/flow/contract.js +4 -4
- package/dist/nodes/process/flow/input-schema.d.ts +50 -0
- package/dist/nodes/process/flow/input-schema.js +113 -0
- package/dist/nodes/process/flow/node-type.js +31 -38
- package/dist/nodes/process/flow/refusals.js +12 -0
- package/dist/nodes/process/flow/spec.d.ts +105 -0
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -51,21 +51,21 @@ could hand you spans for a version you do not have.
|
|
|
51
51
|
| `ActionSchemaSection` | interface | `dist/nodes/hitl/flow/spec.d.ts:274-280` | Supporting types | One section (`inputs`, `outputs`, `inOuts`, `outcomes`) of an `action-schema.json`. |
|
|
52
52
|
| `ActionSpec` | type | `dist/core/actions.d.ts:1001-1009` | Supporting types | One action step's spec: `{ kind }` plus that kind's body from FlowActionSpecs, for every kind there. |
|
|
53
53
|
| `agent` | function | `dist/nodes/process/flow/factories.d.ts:159-213` | Actions | Invoke an AGENT resource — either one published to Orchestrator or a sibling agent project registered in the same… |
|
|
54
|
-
| `AgentFlavour` | type | `dist/nodes/process/flow/spec.d.ts:
|
|
54
|
+
| `AgentFlavour` | type | `dist/nodes/process/flow/spec.d.ts:502-506` | Supporting types | Which KIND of agent project was published behind a `uipath.core.agent.<key>` resource. |
|
|
55
55
|
| `AgentGuardrail` | type | `dist/core/actions.d.ts:430` | Supporting types | |
|
|
56
56
|
| `agenticProcess` | function | `dist/nodes/process/flow/factories.d.ts:113-158` | Actions | Invoke a deployed AGENTIC PROCESS — a Maestro process orchestration published to Orchestrator: a BPMN process that… |
|
|
57
|
-
| `AgenticProcessCompletion` | type | `dist/nodes/process/flow/spec.d.ts:
|
|
58
|
-
| `AgenticProcessInputs` | type | `dist/nodes/process/flow/spec.d.ts:
|
|
59
|
-
| `AgenticProcessInputsBase` | interface | `dist/nodes/process/flow/spec.d.ts:
|
|
60
|
-
| `AgentInputs` | interface | `dist/nodes/process/flow/spec.d.ts:
|
|
61
|
-
| `AgentLocation` | type | `dist/nodes/process/flow/spec.d.ts:
|
|
57
|
+
| `AgenticProcessCompletion` | type | `dist/nodes/process/flow/spec.d.ts:457-499` | Supporting types | Whether an Agentic Process step waits for the process's result. |
|
|
58
|
+
| `AgenticProcessInputs` | type | `dist/nodes/process/flow/spec.d.ts:500-501` | Option shapes | What `agenticProcess()` takes: the shared fields plus the completion policy. |
|
|
59
|
+
| `AgenticProcessInputsBase` | interface | `dist/nodes/process/flow/spec.d.ts:351-456` | Option shapes | 9 field(s) |
|
|
60
|
+
| `AgentInputs` | interface | `dist/nodes/process/flow/spec.d.ts:509-656` | Option shapes | What `agent()` takes: the agent resource to start, its arguments, and the output fields a read may name. |
|
|
61
|
+
| `AgentLocation` | type | `dist/nodes/process/flow/spec.d.ts:507-508` | Supporting types | Where a published agent lives: deployed to a folder (`'published'`) or a sibling project of the same solution… |
|
|
62
62
|
| `AgentMemoryRef` | interface | `dist/core/actions.d.ts:589-613` | Supporting types | An episodic memory the agent learns from across runs, wired to the agent's own `memory` handle. |
|
|
63
63
|
| `AgentResourcePlacement` | interface | `dist/core/actions.d.ts:443-478` | Supporting types | Where one of an inline agent's resources (a context index, a tool, an escalation) sits in the `.flow`: the id of its own… |
|
|
64
64
|
| `AgentResources` | type | `dist/nodes/agent/flow/spec.d.ts:38-44` | Supporting types | The resources an agent attaches on its artifact handles — `context`, `tools` and `escalation`, written exactly as… |
|
|
65
65
|
| `Aggregation` | interface | `dist/nodes/transform/flow/spec.d.ts:36-42` | Supporting types | 3 field(s) |
|
|
66
66
|
| `AggregationOperation` | type | `dist/nodes/transform/flow/spec.d.ts:35` | Supporting types | |
|
|
67
67
|
| `apiWorkflow` | function | `dist/nodes/process/flow/factories.d.ts:53-87` | Actions | Invoke a deployed API workflow — a coded workflow published to Orchestrator, run as a serverless job rather than by a… |
|
|
68
|
-
| `ApiWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:
|
|
68
|
+
| `ApiWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:125-236` | Option shapes | 9 field(s) |
|
|
69
69
|
| `AppRef` | interface | `dist/nodes/hitl/flow/spec.d.ts:146-254` | Supporting types | A deployed Action App that supplies a human task's form — the `'action-app'` variant's subject. |
|
|
70
70
|
| `ArmBuilder` | class | `dist/flow-sdk.d.ts:1273-1296` | Builders | The sub-builder an ARM callback receives — a `StepList` that can also name itself with `.label(...)`. |
|
|
71
71
|
| `AskedField` | interface | `dist/core/actions.d.ts:258-277` | Supporting types | A value the reviewer FILLS IN: read downstream with `out('<step>', '<id>')`. |
|
|
@@ -236,7 +236,7 @@ could hand you spans for a version you do not have.
|
|
|
236
236
|
| `ProcessToolKind` | type | `dist/core/actions.d.ts:735-748` | Supporting types | The tool kinds that wrap a DEPLOYED tenant resource. |
|
|
237
237
|
| `ProcessToolRef` | interface | `dist/core/actions.d.ts:778-811` | Supporting types | A deployed tenant resource the agent may invoke. |
|
|
238
238
|
| `publishedFunction` | function | `dist/nodes/process/flow/factories.d.ts:88-112` | Actions | Invoke a published Orchestrator **Function** — a deployed unit of code run as one step (`uipath.core.function.<key>`,… |
|
|
239
|
-
| `PublishedFunctionInputs` | interface | `dist/nodes/process/flow/spec.d.ts:
|
|
239
|
+
| `PublishedFunctionInputs` | interface | `dist/nodes/process/flow/spec.d.ts:237-350` | Option shapes | A published Orchestrator **Function** — a small, single-purpose unit of code deployed as its own resource and invoked as… |
|
|
240
240
|
| `queueItem` | function | `dist/nodes/queue/flow/factories.d.ts:4-49` | Actions | Declare an Orchestrator QUEUE ITEM step. |
|
|
241
241
|
| `QueueItemInputs` | interface | `dist/nodes/queue/flow/spec.d.ts:11-84` | Option shapes | 10 field(s) |
|
|
242
242
|
| `QueuePriority` | type | `dist/nodes/queue/flow/spec.d.ts:9-10` | Supporting types | The three priorities an Orchestrator queue item can carry. |
|
|
@@ -254,7 +254,7 @@ could hand you spans for a version you do not have.
|
|
|
254
254
|
| `ReturnFieldType` | type | `dist/core/actions.d.ts:305-322` | Supporting types | A JSON-schema-ish type for one field of a step's declared `returns`. |
|
|
255
255
|
| `ReturnOptions` | interface | `dist/flow-sdk.d.ts:384-425` | Option shapes | `.return(...)`-specific options. |
|
|
256
256
|
| `rpaWorkflow` | function | `dist/nodes/process/flow/factories.d.ts:8-52` | Actions | Invoke a deployed RPA (robotic process automation) workflow — a classic UI-automation process, published to… |
|
|
257
|
-
| `RpaWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:11-
|
|
257
|
+
| `RpaWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:11-124` | Option shapes | 9 field(s) |
|
|
258
258
|
| `SCHEDULE_PRESETS` | const | `dist/nodes/trigger/flow/spec.d.ts:8-15` | Actions | The eight intervals the designer offers in its Frequency dropdown. |
|
|
259
259
|
| `scheduled` | function | `dist/nodes/trigger/flow/factories.d.ts:12-31` | Actions | Start the flow on a recurring schedule instead of on demand. |
|
|
260
260
|
| `ScheduledInputs` | interface | `dist/nodes/trigger/flow/spec.d.ts:29-51` | Option shapes | 1 field(s) |
|
package/dist/api-members.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
# Maestro Builder SDK — member index
|
|
7
7
|
|
|
8
|
-
**A lookup table of
|
|
8
|
+
**A lookup table of 1373 rows — match one name in it, do not read it.**
|
|
9
9
|
Grep or search for the member you have; the row it lands on is the whole
|
|
10
10
|
answer. Reading top to bottom costs ~20x what the one row does and tells you
|
|
11
11
|
nothing you asked for.
|
|
12
12
|
|
|
13
|
-
Every field and method of every exported shape —
|
|
13
|
+
Every field and method of every exported shape — 1373 across
|
|
14
14
|
251 interfaces and classes — keyed by the MEMBER's own name.
|
|
15
15
|
|
|
16
16
|
**Use this when the name you have is a field or a method**, which is usually
|
|
@@ -32,7 +32,7 @@ truncated summary would, for less. Read the span.
|
|
|
32
32
|
Member names repeat across shapes (`name` is declared on 69 of them), so the
|
|
33
33
|
`Declared on` column is what makes a match actionable. For the whole shape
|
|
34
34
|
rather than the one field, look that name up in [`api-index.md`](api-index.md) —
|
|
35
|
-
which is why its span is not repeated on all
|
|
35
|
+
which is why its span is not repeated on all 1373 rows here.
|
|
36
36
|
|
|
37
37
|
**A name that misses both indexes is probably not part of the API.** The one
|
|
38
38
|
that comes up is a RUNTIME output key — a human task's `Action`, a step's
|
|
@@ -61,16 +61,16 @@ not find it either.
|
|
|
61
61
|
| `activity` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3289-3327` |
|
|
62
62
|
| `actualPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:59-60` |
|
|
63
63
|
| `additionalOutputs` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:98-102` |
|
|
64
|
-
| `agent` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:
|
|
64
|
+
| `agent` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:675-678` |
|
|
65
65
|
| `agent` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1355-1364` |
|
|
66
|
-
| `agenticProcess` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:
|
|
66
|
+
| `agenticProcess` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:671-674` |
|
|
67
67
|
| `aiSummary` | property | `CaseAppConfig` | `dist/case/case-sdk.d.ts:1148-1153` |
|
|
68
68
|
| `alias` | property | `Aggregation` | `dist/nodes/transform/flow/spec.d.ts:38-39` |
|
|
69
69
|
| `aliases` | property | `LookupSpec` | `dist/core/lookups.d.ts:31-32` |
|
|
70
70
|
| `allErrors` | property | `RetrySpec` | `dist/bpmn/bpmn-sdk.d.ts:999-1000` |
|
|
71
71
|
| `allowAdhocOptionalStageTasks` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:1226-1227` |
|
|
72
72
|
| `allowAdhocTasks` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:2007-2014` |
|
|
73
|
-
| `apiWorkflow` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:
|
|
73
|
+
| `apiWorkflow` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:663-666` |
|
|
74
74
|
| `apiWorkflow` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1375-1384` |
|
|
75
75
|
| `app` | property | `EscalationRef` | `dist/core/actions.d.ts:875-902` |
|
|
76
76
|
| `app` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:326-330` |
|
|
@@ -443,7 +443,7 @@ not find it either.
|
|
|
443
443
|
| `filters` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:85-86` |
|
|
444
444
|
| `filters` | property | `EventSubscription` | `dist/core/actions.d.ts:1250-1251` |
|
|
445
445
|
| `filters` | property | `TriggerOptions` | `dist/core/actions.d.ts:1207-1208` |
|
|
446
|
-
| `flavour` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
446
|
+
| `flavour` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:641-655` |
|
|
447
447
|
| `flowIds` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3491-3534` |
|
|
448
448
|
| `flowMode` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2429-2468` |
|
|
449
449
|
| `flowProcess` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1397-1406` |
|
|
@@ -482,9 +482,9 @@ not find it either.
|
|
|
482
482
|
| `folderKey` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:20-26` |
|
|
483
483
|
| `FolderKey` | property | `FlowMetadata` | `dist/nodes/script/flow/spec.d.ts:85-86` |
|
|
484
484
|
| `folderName` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:183-189` |
|
|
485
|
-
| `folderPath` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
486
|
-
| `folderPath` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
487
|
-
| `folderPath` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
485
|
+
| `folderPath` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:403-410` |
|
|
486
|
+
| `folderPath` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:560-571` |
|
|
487
|
+
| `folderPath` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:174-181` |
|
|
488
488
|
| `folderPath` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:198-204` |
|
|
489
489
|
| `folderPath` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1740-1746` |
|
|
490
490
|
| `folderPath` | property | `ContextIndexRef` | `dist/core/actions.d.ts:935-936` |
|
|
@@ -492,14 +492,14 @@ not find it either.
|
|
|
492
492
|
| `folderPath` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:209-215` |
|
|
493
493
|
| `folderPath` | property | `McpToolRef` | `dist/core/actions.d.ts:492-493` |
|
|
494
494
|
| `folderPath` | property | `ProcessToolRef` | `dist/core/actions.d.ts:795-796` |
|
|
495
|
-
| `folderPath` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
495
|
+
| `folderPath` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:292-302` |
|
|
496
496
|
| `folderPath` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:14-15` |
|
|
497
497
|
| `folderPath` | property | `RemoteA2aToolRef` | `dist/core/actions.d.ts:525` |
|
|
498
498
|
| `folderPath` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:58-65` |
|
|
499
499
|
| `folderPath` | property | `TaskRef` | `dist/case/case-sdk.d.ts:749` |
|
|
500
500
|
| `fork` | property | `ParallelOptions` | `dist/flow-sdk.d.ts:356-373` |
|
|
501
501
|
| `fork` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3434-3459` |
|
|
502
|
-
| `form` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
502
|
+
| `form` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:448-455` |
|
|
503
503
|
| `form` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1624-1625` |
|
|
504
504
|
| `form` | property | `HumanTaskFormOpts` | `dist/bpmn/bpmn-sdk.d.ts:1655-1656` |
|
|
505
505
|
| `format` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:267-268` |
|
|
@@ -585,9 +585,9 @@ not find it either.
|
|
|
585
585
|
| `inputs` | property | `ActionSchemaFile` | `dist/nodes/hitl/flow/spec.d.ts:283-284` |
|
|
586
586
|
| `inputs` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:914-915` |
|
|
587
587
|
| `inputs` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1856-1857` |
|
|
588
|
-
| `inputs` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
589
|
-
| `inputs` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
590
|
-
| `inputs` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
588
|
+
| `inputs` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:421-426` |
|
|
589
|
+
| `inputs` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:578-595` |
|
|
590
|
+
| `inputs` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:193-197` |
|
|
591
591
|
| `inputs` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:211-219` |
|
|
592
592
|
| `inputs` | property | `BuiltEntryPoint` | `dist/flow-sdk.d.ts:735-736` |
|
|
593
593
|
| `inputs` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:753` |
|
|
@@ -599,7 +599,7 @@ not find it either.
|
|
|
599
599
|
| `inputs` | property | `NodeContribution` | `dist/core/node-classes.d.ts:122-126` |
|
|
600
600
|
| `inputs` | property | `PlatformActionSchema` | `dist/nodes/hitl/flow/spec.d.ts:307-308` |
|
|
601
601
|
| `inputs` | property | `ProcessToolRef` | `dist/core/actions.d.ts:803-808` |
|
|
602
|
-
| `inputs` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
602
|
+
| `inputs` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:314-315` |
|
|
603
603
|
| `inputs` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:95-96` |
|
|
604
604
|
| `inputs` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:77-82` |
|
|
605
605
|
| `inputs` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1075-1094` |
|
|
@@ -607,9 +607,14 @@ not find it either.
|
|
|
607
607
|
| `inputs` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1687-1722` |
|
|
608
608
|
| `inputs` | property | `VoiceAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:157-162` |
|
|
609
609
|
| `inputSchema` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1911-1919` |
|
|
610
|
+
| `inputSchema` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:427-447` |
|
|
611
|
+
| `inputSchema` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:596-616` |
|
|
612
|
+
| `inputSchema` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:198-218` |
|
|
610
613
|
| `inputSchema` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:245-253` |
|
|
611
614
|
| `inputSchema` | property | `ClientSideToolRef` | `dist/core/actions.d.ts:544-555` |
|
|
612
615
|
| `inputSchema` | property | `ExtensionPayload` | `dist/bpmn/bpmn-sdk.d.ts:755-756` |
|
|
616
|
+
| `inputSchema` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:316-336` |
|
|
617
|
+
| `inputSchema` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:83-103` |
|
|
613
618
|
| `inputSchema` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1125-1136` |
|
|
614
619
|
| `inputTarget` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:93` |
|
|
615
620
|
| `InstanceId` | property | `FlowMetadata` | `dist/nodes/script/flow/spec.d.ts:87-88` |
|
|
@@ -636,16 +641,16 @@ not find it either.
|
|
|
636
641
|
| `join` | property | `ChooseOpts` | `dist/bpmn/bpmn-sdk.d.ts:2164-2165` |
|
|
637
642
|
| `join` | property | `SplitOpts` | `dist/bpmn/bpmn-sdk.d.ts:2171-2172` |
|
|
638
643
|
| `js` | property | `Expr` | `dist/core/expr.d.ts:17` |
|
|
639
|
-
| `key` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
640
|
-
| `key` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
641
|
-
| `key` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
644
|
+
| `key` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:352-370` |
|
|
645
|
+
| `key` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:511-532` |
|
|
646
|
+
| `key` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:126-145` |
|
|
642
647
|
| `key` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:179-185` |
|
|
643
648
|
| `key` | property | `HitlConnection` | `dist/nodes/hitl/flow/spec.d.ts:28-29` |
|
|
644
649
|
| `key` | property | `HttpRequestConnector` | `dist/case/case-sdk.d.ts:614-615` |
|
|
645
650
|
| `key` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1637-1638` |
|
|
646
651
|
| `key` | property | `McpToolRef` | `dist/core/actions.d.ts:489-490` |
|
|
647
652
|
| `key` | property | `ProcessToolRef` | `dist/core/actions.d.ts:787-792` |
|
|
648
|
-
| `key` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
653
|
+
| `key` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:244-262` |
|
|
649
654
|
| `key` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:16-25` |
|
|
650
655
|
| `key` | property | `RemoteA2aToolRef` | `dist/core/actions.d.ts:517-518` |
|
|
651
656
|
| `key` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:12-30` |
|
|
@@ -688,12 +693,12 @@ not find it either.
|
|
|
688
693
|
| `limit` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:101-106` |
|
|
689
694
|
| `limit` | property | `DoWhileOptions` | `dist/flow-sdk.d.ts:456-457` |
|
|
690
695
|
| `literal` | property | `Expr` | `dist/core/expr.d.ts:18` |
|
|
691
|
-
| `location` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
692
|
-
| `location` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
693
|
-
| `location` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
696
|
+
| `location` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:373-383` |
|
|
697
|
+
| `location` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:535-540` |
|
|
698
|
+
| `location` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:148-154` |
|
|
694
699
|
| `location` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:186-197` |
|
|
695
700
|
| `location` | property | `CarriedConnectorField` | `dist/core/carried-connector-fields.d.ts:43-44` |
|
|
696
|
-
| `location` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
701
|
+
| `location` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:265-272` |
|
|
697
702
|
| `location` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:33-38` |
|
|
698
703
|
| `lookups` | property | `ConnectorMeta` | `dist/core/connectors.d.ts:89-100` |
|
|
699
704
|
| `loop` | property | `ActivityNodeFields` | `dist/bpmn/bpmn-sdk.d.ts:400-401` |
|
|
@@ -761,10 +766,10 @@ not find it either.
|
|
|
761
766
|
| `name` | property | `ActionAppRef` | `dist/case/case-sdk.d.ts:859-860` |
|
|
762
767
|
| `name` | property | `ActionField` | `dist/case/case-sdk.d.ts:820-821` |
|
|
763
768
|
| `name` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1844-1845` |
|
|
764
|
-
| `name` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
765
|
-
| `name` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
769
|
+
| `name` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:371-372` |
|
|
770
|
+
| `name` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:533-534` |
|
|
766
771
|
| `name` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:598-599` |
|
|
767
|
-
| `name` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
772
|
+
| `name` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:146-147` |
|
|
768
773
|
| `name` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:177-178` |
|
|
769
774
|
| `name` | property | `BindingContribution` | `dist/core/node-classes.d.ts:96-97` |
|
|
770
775
|
| `name` | property | `BindingDecl` | `dist/bpmn/bpmn-sdk.d.ts:508-509` |
|
|
@@ -823,7 +828,7 @@ not find it either.
|
|
|
823
828
|
| `name` | property | `PlatformActionSchemaArg` | `dist/nodes/hitl/flow/spec.d.ts:294-295` |
|
|
824
829
|
| `name` | property | `ProcessEntryPoint` | `dist/case/case-sdk.d.ts:768-769` |
|
|
825
830
|
| `name` | property | `ProcessToolRef` | `dist/core/actions.d.ts:793-794` |
|
|
826
|
-
| `name` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
831
|
+
| `name` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:263-264` |
|
|
827
832
|
| `name` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1536-1537` |
|
|
828
833
|
| `name` | property | `ReceiveMessageOpts` | `dist/bpmn/bpmn-sdk.d.ts:1691-1692` |
|
|
829
834
|
| `name` | property | `RegistryContextField` | `dist/bpmn/typed-node.d.ts:22` |
|
|
@@ -981,17 +986,17 @@ not find it either.
|
|
|
981
986
|
| `processorKey` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:98-109` |
|
|
982
987
|
| `processorName` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:110-116` |
|
|
983
988
|
| `processorReadOnly` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:117-122` |
|
|
984
|
-
| `project` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
985
|
-
| `project` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
986
|
-
| `project` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
989
|
+
| `project` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:384-402` |
|
|
990
|
+
| `project` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:541-559` |
|
|
991
|
+
| `project` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:155-173` |
|
|
987
992
|
| `project` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:151-164` |
|
|
988
|
-
| `project` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
993
|
+
| `project` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:273-291` |
|
|
989
994
|
| `project` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:39-57` |
|
|
990
|
-
| `projectId` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:
|
|
991
|
-
| `projectId` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
992
|
-
| `projectId` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
995
|
+
| `projectId` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:411-420` |
|
|
996
|
+
| `projectId` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:572-577` |
|
|
997
|
+
| `projectId` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:182-192` |
|
|
993
998
|
| `projectId` | property | `IxpToolRef` | `dist/core/actions.d.ts:824-834` |
|
|
994
|
-
| `projectId` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
999
|
+
| `projectId` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:303-313` |
|
|
995
1000
|
| `projectId` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:66-76` |
|
|
996
1001
|
| `prompt` | property | `BatchTransformInputs` | `dist/nodes/ai-patterns/flow/spec.d.ts:48-49` |
|
|
997
1002
|
| `prompt` | property | `SummarizeInputs` | `dist/nodes/ai-patterns/flow/spec.d.ts:33-34` |
|
|
@@ -1000,7 +1005,7 @@ not find it either.
|
|
|
1000
1005
|
| `propertyAttribute` | property | `BindingContribution` | `dist/core/node-classes.d.ts:106-107` |
|
|
1001
1006
|
| `propertyAttribute` | property | `BindingDecl` | `dist/bpmn/bpmn-sdk.d.ts:512-513` |
|
|
1002
1007
|
| `propertyAttribute` | property | `BindingOpts` | `dist/bpmn/bpmn-sdk.d.ts:1251-1252` |
|
|
1003
|
-
| `publishedFunction` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1008
|
+
| `publishedFunction` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:667-670` |
|
|
1004
1009
|
| `query` | property | `BuiltinToolRef` | `dist/core/actions.d.ts:631-637` |
|
|
1005
1010
|
| `query` | property | `CaseHttpRequestSpec` | `dist/case/case-sdk.d.ts:588-594` |
|
|
1006
1011
|
| `query` | property | `ContextIndexRef` | `dist/core/actions.d.ts:939-944` |
|
|
@@ -1080,15 +1085,15 @@ not find it either.
|
|
|
1080
1085
|
| `retryCount` | property | `HttpInputsBase` | `dist/nodes/http/flow/spec.d.ts:119-133` |
|
|
1081
1086
|
| `return` | method | `StepList` | `dist/flow-sdk.d.ts:1262-1271` |
|
|
1082
1087
|
| `returnCitations` | property | `SummarizeInputs` | `dist/nodes/ai-patterns/flow/spec.d.ts:35-40` |
|
|
1083
|
-
| `returns` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1084
|
-
| `returns` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1088
|
+
| `returns` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:617-640` |
|
|
1089
|
+
| `returns` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:219-235` |
|
|
1085
1090
|
| `returns` | property | `ClientSideToolRef` | `dist/core/actions.d.ts:542-543` |
|
|
1086
1091
|
| `returns` | property | `HttpInputsBase` | `dist/nodes/http/flow/spec.d.ts:69-91` |
|
|
1087
1092
|
| `returns` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:280-293` |
|
|
1088
1093
|
| `returns` | property | `ProcessToolRef` | `dist/core/actions.d.ts:809-810` |
|
|
1089
|
-
| `returns` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1094
|
+
| `returns` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:337-349` |
|
|
1090
1095
|
| `returns` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:63-83` |
|
|
1091
|
-
| `returns` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1096
|
+
| `returns` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:104-123` |
|
|
1092
1097
|
| `returns` | property | `ScriptInputs` | `dist/nodes/script/flow/spec.d.ts:10-43` |
|
|
1093
1098
|
| `role` | property | `FlowAction` | `dist/core/node-classes.d.ts:175-176` |
|
|
1094
1099
|
| `role` | property | `FlowNode` | `dist/core/node-classes.d.ts:151-152` |
|
|
@@ -1096,7 +1101,7 @@ not find it either.
|
|
|
1096
1101
|
| `role` | property | `FlowTrigger` | `dist/core/node-classes.d.ts:182-183` |
|
|
1097
1102
|
| `routedWaypoints` | property | `EdgeRoute` | `dist/flow-sdk.d.ts:659-664` |
|
|
1098
1103
|
| `rpa` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1365-1374` |
|
|
1099
|
-
| `rpaWorkflow` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:
|
|
1104
|
+
| `rpaWorkflow` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:659-662` |
|
|
1100
1105
|
| `rule` | property | `CaseRule` | `dist/case/case-sdk.d.ts:98` |
|
|
1101
1106
|
| `rules` | property | `BuiltCaseExitCondition` | `dist/case/case-sdk.d.ts:458` |
|
|
1102
1107
|
| `rules` | property | `BuiltEntryCondition` | `dist/case/case-sdk.d.ts:400` |
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -663,6 +663,8 @@ export declare const REFUSALS: {
|
|
|
663
663
|
readonly PRESERVATION_LEGACY_DEFAULT_MISMATCH: "lowering";
|
|
664
664
|
readonly PRESERVATION_TARGET_MISSING: "lowering";
|
|
665
665
|
readonly PROCESS_INPUT_MISSING: "lint";
|
|
666
|
+
readonly PROCESS_INPUT_SCHEMA_INVALID: "lowering";
|
|
667
|
+
readonly PROCESS_INPUT_SCHEMA_TYPE: "lint";
|
|
666
668
|
readonly PROCESS_INPUT_TYPE: "lint";
|
|
667
669
|
readonly PROCESS_INPUT_UNKNOWN: "lint";
|
|
668
670
|
readonly PROCESS_KEY_MISMATCH: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -739,6 +739,8 @@ export const REFUSALS = {
|
|
|
739
739
|
PRESERVATION_LEGACY_DEFAULT_MISMATCH: 'lowering',
|
|
740
740
|
PRESERVATION_TARGET_MISSING: 'lowering',
|
|
741
741
|
PROCESS_INPUT_MISSING: 'lint',
|
|
742
|
+
PROCESS_INPUT_SCHEMA_INVALID: 'lowering',
|
|
743
|
+
PROCESS_INPUT_SCHEMA_TYPE: 'lint',
|
|
742
744
|
PROCESS_INPUT_TYPE: 'lint',
|
|
743
745
|
PROCESS_INPUT_UNKNOWN: 'lint',
|
|
744
746
|
PROCESS_KEY_MISMATCH: 'lint',
|
|
@@ -3,7 +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
|
+
import { isLiteral, literalFits, literalType, returnsFromTenantHint, typesOf } from './contract.js';
|
|
7
7
|
export const PROCESS_DIAGNOSTICS = {
|
|
8
8
|
AGENT_EMPTY_INPUT_FLOOR: { severity: 'warning', summary: 'an agent step that binds no inputs' },
|
|
9
9
|
AGENT_EMPTY_RETURNS: { severity: 'warning', summary: 'an agent step with returns: {}' },
|
|
@@ -61,6 +61,8 @@ export const PROCESS_DIAGNOSTICS = {
|
|
|
61
61
|
IN_SOLUTION_PROJECT_NOT_FOUND: { severity: 'error', summary: 'an in-solution process step naming no project of the solution' },
|
|
62
62
|
IN_SOLUTION_PROJECT_PUBLISHED: { severity: 'error', summary: 'a process step naming a project with location published' },
|
|
63
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_SCHEMA_INVALID: { severity: 'error', summary: 'a process step whose inputSchema is not a JSON object' },
|
|
65
|
+
PROCESS_INPUT_SCHEMA_TYPE: { severity: 'error', summary: 'a process step input whose literal is not the type its inputSchema declares' },
|
|
64
66
|
PROCESS_INPUT_MISSING: { severity: 'error', summary: 'a published process step that leaves out an input the recorded process requires' },
|
|
65
67
|
PROCESS_INPUT_TYPE: { severity: 'error', summary: 'a published process step input whose literal is not the recorded argument type' },
|
|
66
68
|
PROCESS_INPUT_UNKNOWN: { severity: 'error', summary: 'a published process step input the recorded process does not declare' },
|
|
@@ -100,6 +102,40 @@ function noProjectIdMessage(kind, step, solutionFolder) {
|
|
|
100
102
|
+ `add it: Studio Web's Run node reads \`model.projectId\` to deploy the sibling before it runs the step. `
|
|
101
103
|
+ `Read \`resource.projectKey\` from \`resources/solution_folder/process/${solutionFolder}/<project>.json\`.`;
|
|
102
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* `PROCESS_INPUT_SCHEMA_TYPE`: a literal input that does not fit the type its
|
|
107
|
+
* `inputSchema` property declares. `uip maestro flow validate` reports the same
|
|
108
|
+
* value as `[TYPE_MISMATCH] "<input>" on "<node>" expects <type>`; this says it
|
|
109
|
+
* before compile. Only a JSON Schema object (`properties`) is read, and only
|
|
110
|
+
* object and array literals: an expression's value is not known until run
|
|
111
|
+
* time, and validate coerces a string or number literal rather than rejecting
|
|
112
|
+
* it (`TimeoutMinutes: "5"` against `number` validates).
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* // inputs: { owsResult: {} }, inputSchema: { type: 'object', properties: { owsResult: { type: 'string' } } }
|
|
116
|
+
* // → PROCESS_INPUT_SCHEMA_TYPE: passes {} (object) for "owsResult", which inputSchema declares as string
|
|
117
|
+
*/
|
|
118
|
+
function checkInputSchema(inputs, label, ctx) {
|
|
119
|
+
const schema = inputs?.inputSchema;
|
|
120
|
+
const properties = schema !== null && typeof schema === 'object' ? schema.properties : undefined;
|
|
121
|
+
if (properties === null || typeof properties !== 'object' || Array.isArray(properties))
|
|
122
|
+
return;
|
|
123
|
+
const declared = properties;
|
|
124
|
+
for (const [name, value] of Object.entries(inputs?.inputs ?? {})) {
|
|
125
|
+
// Only an object or array literal: validate coerces a string (`"5"` for a
|
|
126
|
+
// number, `"=$vars.x"` for an object) and accepts it, so a scalar is not
|
|
127
|
+
// reported here.
|
|
128
|
+
if (!Object.hasOwn(declared, name) || value === null || typeof value !== 'object' || !isLiteral(value))
|
|
129
|
+
continue;
|
|
130
|
+
const property = declared[name];
|
|
131
|
+
const types = typesOf(property !== null && typeof property === 'object' ? property : undefined);
|
|
132
|
+
if (literalFits(value, types))
|
|
133
|
+
continue;
|
|
134
|
+
ctx.report('PROCESS_INPUT_SCHEMA_TYPE', `${label} step "${ctx.step}" passes ${JSON.stringify(value)} (${literalType(value)}) for input ${JSON.stringify(name)}, `
|
|
135
|
+
+ `which its \`inputSchema\` declares as ${types.join(' | ')}. \`uip maestro flow validate\` rejects the file `
|
|
136
|
+
+ '(TYPE_MISMATCH). Pass a value of that type, or fix the type in `inputSchema`.');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
103
139
|
/**
|
|
104
140
|
* Check an `rpaWorkflow(...)` call.
|
|
105
141
|
*
|
|
@@ -126,6 +162,7 @@ function noProjectIdMessage(kind, step, solutionFolder) {
|
|
|
126
162
|
export function checkRpaWorkflow(inputs, ctx) {
|
|
127
163
|
const step = ctx.step;
|
|
128
164
|
const at = (code, message, suggestion) => ctx.report(code, message, suggestion);
|
|
165
|
+
checkInputSchema(inputs, 'RPA', ctx);
|
|
129
166
|
// A blank key is the serializer's RPA_NO_KEY (refusals.ts).
|
|
130
167
|
if (!blank(inputs?.key) && !GUID_RE.test(String(inputs.key).trim())) {
|
|
131
168
|
at('RPA_KEY_NOT_KEY', `RPA step "${step}"'s \`key\` is ${JSON.stringify(inputs.key)}, which is not a release key. `
|
|
@@ -184,6 +221,7 @@ export function checkRpaWorkflow(inputs, ctx) {
|
|
|
184
221
|
export function checkApiWorkflow(inputs, ctx) {
|
|
185
222
|
const step = ctx.step;
|
|
186
223
|
const at = (code, message, suggestion) => ctx.report(code, message, suggestion);
|
|
224
|
+
checkInputSchema(inputs, 'API workflow', ctx);
|
|
187
225
|
// A blank key is the serializer's APIWF_NO_KEY (refusals.ts).
|
|
188
226
|
if (!blank(inputs?.key) && !GUID_RE.test(String(inputs.key).trim())) {
|
|
189
227
|
at('APIWF_KEY_NOT_KEY', `API workflow step "${step}"'s \`key\` is ${JSON.stringify(inputs.key)}, which is not a key. `
|
|
@@ -234,6 +272,7 @@ export function checkApiWorkflow(inputs, ctx) {
|
|
|
234
272
|
export function checkPublishedFunction(inputs, ctx) {
|
|
235
273
|
const step = ctx.step;
|
|
236
274
|
const at = (code, message, suggestion) => ctx.report(code, message, suggestion);
|
|
275
|
+
checkInputSchema(inputs, 'Function', ctx);
|
|
237
276
|
// A blank key is the serializer's FUNCTION_NO_KEY (refusals.ts).
|
|
238
277
|
if (!blank(inputs?.key) && !GUID_RE.test(String(inputs.key).trim())) {
|
|
239
278
|
at('FUNCTION_KEY_NOT_KEY', `Function step "${step}"'s \`key\` is ${JSON.stringify(inputs.key)}, which is not a key. \`key\` is the `
|
|
@@ -297,6 +336,7 @@ export function checkPublishedFunction(inputs, ctx) {
|
|
|
297
336
|
export function checkAgenticProcess(inputs, ctx) {
|
|
298
337
|
const step = ctx.step;
|
|
299
338
|
const at = (code, message, suggestion) => ctx.report(code, message, suggestion);
|
|
339
|
+
checkInputSchema(inputs, 'Agentic process', ctx);
|
|
300
340
|
// A blank key is the serializer's AGENTIC_NO_KEY (refusals.ts).
|
|
301
341
|
if (!blank(inputs?.key) && !GUID_RE.test(String(inputs.key).trim())) {
|
|
302
342
|
at('AGENTIC_KEY_NOT_KEY', `Agentic process step "${step}"'s \`key\` is ${JSON.stringify(inputs.key)}, which is not a key. `
|
|
@@ -490,6 +530,7 @@ export function checkAgenticProcessRead({ node: name, field, rest, reader: step
|
|
|
490
530
|
export function checkAgent(inputs, ctx) {
|
|
491
531
|
const step = ctx.step;
|
|
492
532
|
const at = (code, message, suggestion) => ctx.report(code, message, suggestion);
|
|
533
|
+
checkInputSchema(inputs, 'Agent', ctx);
|
|
493
534
|
const inSolution = inputs?.location === 'in-solution';
|
|
494
535
|
// A blank key is the serializer's AGENT_NO_KEY (refusals.ts).
|
|
495
536
|
if (!blank(inputs?.key) && !GUID_RE.test(String(inputs.key).trim())) {
|
|
@@ -34,6 +34,8 @@ import type { FlowCheckContext } from '../../../flow-node-type.js';
|
|
|
34
34
|
* or one missing either, which has nothing to look up.
|
|
35
35
|
*/
|
|
36
36
|
export declare function processRef(inputs: unknown): ResourceRef | undefined;
|
|
37
|
+
/** A property's JSON Schema types: `['integer']`, `['string', 'null']`; `[]` for an untyped one. */
|
|
38
|
+
export declare function typesOf(property: Record<string, unknown> | undefined): string[];
|
|
37
39
|
/**
|
|
38
40
|
* The `returns` a recorded output schema declares, or undefined when it
|
|
39
41
|
* declares no field.
|
|
@@ -68,6 +70,12 @@ export declare function unrecordedKeyReason(inputs: unknown, resources: Resource
|
|
|
68
70
|
* writes. `''` when the step names no process to record.
|
|
69
71
|
*/
|
|
70
72
|
export declare function returnsFromTenantHint(inputs: unknown): string;
|
|
73
|
+
/** True for a value written as a plain JSON literal (not an expression or other object). */
|
|
74
|
+
export declare function isLiteral(v: unknown): boolean;
|
|
75
|
+
/** Whether a literal fits a JSON Schema type list; an untyped property takes anything. */
|
|
76
|
+
export declare function literalFits(v: unknown, types: readonly string[]): boolean;
|
|
77
|
+
/** A literal's JSON type, for a message. */
|
|
78
|
+
export declare function literalType(v: unknown): string;
|
|
71
79
|
/**
|
|
72
80
|
* Check a published process step against its recorded row: the key, the
|
|
73
81
|
* factory (`subType`, the binding subtype the step would be written with, is
|
|
@@ -38,7 +38,7 @@ function propertiesOf(schema) {
|
|
|
38
38
|
return typeof p === 'object' && p !== null && !Array.isArray(p) ? p : {};
|
|
39
39
|
}
|
|
40
40
|
/** A property's JSON Schema types: `['integer']`, `['string', 'null']`; `[]` for an untyped one. */
|
|
41
|
-
function typesOf(property) {
|
|
41
|
+
export function typesOf(property) {
|
|
42
42
|
const t = property?.type;
|
|
43
43
|
if (typeof t === 'string')
|
|
44
44
|
return [t];
|
|
@@ -122,7 +122,7 @@ export function returnsFromTenantHint(inputs) {
|
|
|
122
122
|
return ref === undefined ? '' : ` Or record the process (\`${resourcePrepareCommand(ref)}\`) and leave \`returns\` out: compile writes the output schema when Orchestrator has one (it prints \`Outputs\`).`;
|
|
123
123
|
}
|
|
124
124
|
/** True for a value written as a plain JSON literal (not an expression or other object). */
|
|
125
|
-
function isLiteral(v) {
|
|
125
|
+
export function isLiteral(v) {
|
|
126
126
|
if (v === null || typeof v !== 'object')
|
|
127
127
|
return true;
|
|
128
128
|
if (Array.isArray(v))
|
|
@@ -130,7 +130,7 @@ function isLiteral(v) {
|
|
|
130
130
|
return Object.getPrototypeOf(v) === Object.prototype;
|
|
131
131
|
}
|
|
132
132
|
/** Whether a literal fits a JSON Schema type list; an untyped property takes anything. */
|
|
133
|
-
function literalFits(v, types) {
|
|
133
|
+
export function literalFits(v, types) {
|
|
134
134
|
if (types.length === 0 || v === null || v === undefined)
|
|
135
135
|
return true;
|
|
136
136
|
return types.some((t) => {
|
|
@@ -147,7 +147,7 @@ function literalFits(v, types) {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
/** A literal's JSON type, for a message. */
|
|
150
|
-
function literalType(v) {
|
|
150
|
+
export function literalType(v) {
|
|
151
151
|
if (Array.isArray(v))
|
|
152
152
|
return 'array';
|
|
153
153
|
if (typeof v === 'number')
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** A process's input arguments as a JSON Schema: the definition's `inputDefinition`, verbatim. */
|
|
2
|
+
export type ProcessInputSchema = Readonly<Record<string, unknown>>;
|
|
3
|
+
/**
|
|
4
|
+
* Which input definition a process kind writes: `'plain'` declares only the
|
|
5
|
+
* process's own arguments; `'with-fire-and-forget'` (agentic process) also
|
|
6
|
+
* declares the boolean `fireAndForget` switch.
|
|
7
|
+
*/
|
|
8
|
+
export type InputSchemaPolicy = 'plain' | 'with-fire-and-forget';
|
|
9
|
+
/**
|
|
10
|
+
* Whether an `inputSchema` is one compile can write: a plain JSON object.
|
|
11
|
+
* Anything else is `PROCESS_INPUT_SCHEMA_INVALID` (refusals.ts); until that
|
|
12
|
+
* refusal is reported, the definition is derived as if no schema were written,
|
|
13
|
+
* so check and the error-port lookup never trip over it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isWritableInputSchema(v: unknown): v is ProcessInputSchema;
|
|
16
|
+
/**
|
|
17
|
+
* A passed value's JSON Schema type, as compile infers it with no `inputSchema`:
|
|
18
|
+
* a literal by its JSON shape, anything else (an expression, `input()`, `out()`)
|
|
19
|
+
* a string, since its value is not known until run time.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* inferredInputType(3) // 'number'
|
|
23
|
+
* inferredInputType({}) // 'object'
|
|
24
|
+
* inferredInputType([1]) // 'array'
|
|
25
|
+
* inferredInputType(js`$x`) // 'string'
|
|
26
|
+
*/
|
|
27
|
+
export declare function inferredInputType(v: unknown): string;
|
|
28
|
+
/**
|
|
29
|
+
* The `inputDefinition` compile writes for a process step.
|
|
30
|
+
*
|
|
31
|
+
* @param inputs - The step's inputs as passed (authored or lifted).
|
|
32
|
+
* @param inputSchema - The author's `inputSchema`, or undefined to infer one
|
|
33
|
+
* from `inputs`. A value that is not a plain object is ignored here (and
|
|
34
|
+
* refused by the serializer as `PROCESS_INPUT_SCHEMA_INVALID`).
|
|
35
|
+
* @param policy - `'with-fire-and-forget'` adds the agentic-process switch to
|
|
36
|
+
* an object schema that does not declare it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function processInputDefinition(inputs: Readonly<Record<string, unknown>>, inputSchema: unknown, policy: InputSchemaPolicy): Record<string, unknown>;
|
|
39
|
+
/** The argument names an input definition declares under `properties` (none for any other shape). */
|
|
40
|
+
export declare function inputSchemaPropertyNames(definition: Readonly<Record<string, unknown>>): string[];
|
|
41
|
+
/**
|
|
42
|
+
* The `inputSchema` decompile writes for a step: the saved `inputDefinition`
|
|
43
|
+
* verbatim when compile would not reproduce it from the lifted inputs, else
|
|
44
|
+
* undefined (so a step compile wrote decompiles without one).
|
|
45
|
+
*
|
|
46
|
+
* @param saved - The definition's `inputDefinition` as the file has it.
|
|
47
|
+
* @param inputs - The step's inputs as lifted (expressions as `Expr`).
|
|
48
|
+
* @param policy - As for {@link processInputDefinition}.
|
|
49
|
+
*/
|
|
50
|
+
export declare function liftedInputSchema(saved: unknown, inputs: Readonly<Record<string, unknown>>, policy: InputSchemaPolicy): ProcessInputSchema | undefined;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The process family's input schema: what a process step's definition says
|
|
3
|
+
* about the arguments the process takes (`inputDefinition`), and how that
|
|
4
|
+
* survives a decompile → compile round trip.
|
|
5
|
+
*
|
|
6
|
+
* Compile has two sources for it:
|
|
7
|
+
*
|
|
8
|
+
* - the author's `inputSchema` option, written verbatim (the platform's own
|
|
9
|
+
* definition carries the deployed process's argument schema, with titles,
|
|
10
|
+
* descriptions, enums and `additionalProperties`, and a decompiled step
|
|
11
|
+
* carries that schema back here);
|
|
12
|
+
* - otherwise, one property per passed input, typed from the value passed.
|
|
13
|
+
*
|
|
14
|
+
* Decompile writes `inputSchema` only when the saved definition says something
|
|
15
|
+
* the second rule would not reproduce, so an SDK-authored step decompiles to
|
|
16
|
+
* the source it came from.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // A saved definition types `owsResult` as an object; the step passes `{}`.
|
|
20
|
+
* // Inferred, compile would write `{ owsResult: { type: 'object' } }` without the
|
|
21
|
+
* // title, so decompile carries the saved schema:
|
|
22
|
+
* publishedFunction({ key, name, folderPath, inputs: { owsResult: {} },
|
|
23
|
+
* inputSchema: { type: 'object', properties: { owsResult: { type: 'object', title: 'Owsresult' } } } })
|
|
24
|
+
*/
|
|
25
|
+
import { Expr } from '../../../core/expr.js';
|
|
26
|
+
import { isLiteral } from './contract.js';
|
|
27
|
+
/** The input the agentic-process definition always declares: the design-time fire-and-forget switch. */
|
|
28
|
+
const FIRE_AND_FORGET = 'fireAndForget';
|
|
29
|
+
/**
|
|
30
|
+
* Whether an `inputSchema` is one compile can write: a plain JSON object.
|
|
31
|
+
* Anything else is `PROCESS_INPUT_SCHEMA_INVALID` (refusals.ts); until that
|
|
32
|
+
* refusal is reported, the definition is derived as if no schema were written,
|
|
33
|
+
* so check and the error-port lookup never trip over it.
|
|
34
|
+
*/
|
|
35
|
+
export function isWritableInputSchema(v) {
|
|
36
|
+
return isPlainObject(v);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A passed value's JSON Schema type, as compile infers it with no `inputSchema`:
|
|
40
|
+
* a literal by its JSON shape, anything else (an expression, `input()`, `out()`)
|
|
41
|
+
* a string, since its value is not known until run time.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* inferredInputType(3) // 'number'
|
|
45
|
+
* inferredInputType({}) // 'object'
|
|
46
|
+
* inferredInputType([1]) // 'array'
|
|
47
|
+
* inferredInputType(js`$x`) // 'string'
|
|
48
|
+
*/
|
|
49
|
+
export function inferredInputType(v) {
|
|
50
|
+
const value = v instanceof Expr && v.literal ? v.value : v;
|
|
51
|
+
if (typeof value === 'number')
|
|
52
|
+
return 'number';
|
|
53
|
+
if (typeof value === 'boolean')
|
|
54
|
+
return 'boolean';
|
|
55
|
+
if (Array.isArray(value))
|
|
56
|
+
return 'array';
|
|
57
|
+
if (value !== null && typeof value === 'object' && isLiteral(value))
|
|
58
|
+
return 'object';
|
|
59
|
+
return 'string';
|
|
60
|
+
}
|
|
61
|
+
function isPlainObject(v) {
|
|
62
|
+
return typeof v === 'object' && v !== null && !Array.isArray(v) && isLiteral(v);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The `inputDefinition` compile writes for a process step.
|
|
66
|
+
*
|
|
67
|
+
* @param inputs - The step's inputs as passed (authored or lifted).
|
|
68
|
+
* @param inputSchema - The author's `inputSchema`, or undefined to infer one
|
|
69
|
+
* from `inputs`. A value that is not a plain object is ignored here (and
|
|
70
|
+
* refused by the serializer as `PROCESS_INPUT_SCHEMA_INVALID`).
|
|
71
|
+
* @param policy - `'with-fire-and-forget'` adds the agentic-process switch to
|
|
72
|
+
* an object schema that does not declare it.
|
|
73
|
+
*/
|
|
74
|
+
export function processInputDefinition(inputs, inputSchema, policy) {
|
|
75
|
+
const fireAndForget = policy === 'with-fire-and-forget';
|
|
76
|
+
if (isWritableInputSchema(inputSchema)) {
|
|
77
|
+
const schema = JSON.parse(JSON.stringify(inputSchema));
|
|
78
|
+
if (fireAndForget && isPlainObject(schema.properties) && !Object.hasOwn(schema.properties, FIRE_AND_FORGET)) {
|
|
79
|
+
schema.properties = { ...schema.properties, [FIRE_AND_FORGET]: { type: 'boolean' } };
|
|
80
|
+
}
|
|
81
|
+
return schema;
|
|
82
|
+
}
|
|
83
|
+
const properties = {};
|
|
84
|
+
for (const [k, v] of Object.entries(inputs))
|
|
85
|
+
properties[k] = { type: inferredInputType(v) };
|
|
86
|
+
if (fireAndForget)
|
|
87
|
+
return { type: 'object', properties: { ...properties, [FIRE_AND_FORGET]: { type: 'boolean' } } };
|
|
88
|
+
return Object.keys(properties).length ? { type: 'object', properties } : {};
|
|
89
|
+
}
|
|
90
|
+
/** The argument names an input definition declares under `properties` (none for any other shape). */
|
|
91
|
+
export function inputSchemaPropertyNames(definition) {
|
|
92
|
+
return isPlainObject(definition.properties) ? Object.keys(definition.properties) : [];
|
|
93
|
+
}
|
|
94
|
+
/** JSON with object keys sorted, so two schemas compare equal whatever order their keys were written in. */
|
|
95
|
+
function canonical(v) {
|
|
96
|
+
return JSON.stringify(v, (_k, x) => (isPlainObject(x)
|
|
97
|
+
? Object.fromEntries(Object.keys(x).sort().map((k) => [k, x[k]]))
|
|
98
|
+
: x));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The `inputSchema` decompile writes for a step: the saved `inputDefinition`
|
|
102
|
+
* verbatim when compile would not reproduce it from the lifted inputs, else
|
|
103
|
+
* undefined (so a step compile wrote decompiles without one).
|
|
104
|
+
*
|
|
105
|
+
* @param saved - The definition's `inputDefinition` as the file has it.
|
|
106
|
+
* @param inputs - The step's inputs as lifted (expressions as `Expr`).
|
|
107
|
+
* @param policy - As for {@link processInputDefinition}.
|
|
108
|
+
*/
|
|
109
|
+
export function liftedInputSchema(saved, inputs, policy) {
|
|
110
|
+
const schema = isPlainObject(saved) ? saved : {};
|
|
111
|
+
const inferred = processInputDefinition(inputs, undefined, policy);
|
|
112
|
+
return canonical(processInputDefinition(inputs, schema, policy)) === canonical(inferred) ? undefined : schema;
|
|
113
|
+
}
|
|
@@ -22,6 +22,7 @@ import { checkRecordedProcess, withRecordedProcess } from './contract.js';
|
|
|
22
22
|
import { processLabel, refuseLossyProcess } from './refusals.js';
|
|
23
23
|
import { refuseInSolution, resolveInSolution } from './in-solution.js';
|
|
24
24
|
import { declareKeys } from '../../../core/option-keys.js';
|
|
25
|
+
import { inputSchemaPropertyNames, liftedInputSchema, processInputDefinition } from './input-schema.js';
|
|
25
26
|
/** The RPA-workflow node type family. The process's release key is the suffix. */
|
|
26
27
|
const RPA_WORKFLOW_PREFIX = 'uipath.core.rpa-workflow.';
|
|
27
28
|
/**
|
|
@@ -53,7 +54,9 @@ const RPA_WORKFLOW_PREFIX = 'uipath.core.rpa-workflow.';
|
|
|
53
54
|
* what is evidenced — but here the evidence is the authored call, not the
|
|
54
55
|
* deployed process, so it cannot catch an argument the process does not have.
|
|
55
56
|
* Nothing local can: only the robot knows. A wrong argument name faults the
|
|
56
|
-
* job on a live run, which is what the `robot` rung is for.
|
|
57
|
+
* job on a live run, which is what the `robot` rung is for. An `inputSchema`
|
|
58
|
+
* the author (or decompile, from a saved definition) writes replaces the
|
|
59
|
+
* inferred one verbatim (`input-schema.ts`).
|
|
57
60
|
* - `outputDefinition.output` carries no schema for the same reason. Its source
|
|
58
61
|
* expressions follow the tenant-current registry (`=this` / `=Error`). Older
|
|
59
62
|
* corpus artifacts mostly used `=result.response` / `=result.Error`, but a
|
|
@@ -63,10 +66,6 @@ const RPA_WORKFLOW_PREFIX = 'uipath.core.rpa-workflow.';
|
|
|
63
66
|
function rpaWorkflowDef(spec) {
|
|
64
67
|
const loc = processResourceLocation(spec);
|
|
65
68
|
const { resourceKey } = loc;
|
|
66
|
-
const properties = {};
|
|
67
|
-
for (const [k, v] of Object.entries(spec.inputs)) {
|
|
68
|
-
properties[k] = { type: typeof v === 'number' ? 'number' : typeof v === 'boolean' ? 'boolean' : 'string' };
|
|
69
|
-
}
|
|
70
69
|
return {
|
|
71
70
|
nodeType: `${RPA_WORKFLOW_PREFIX}${spec.key}`,
|
|
72
71
|
version: '1.0.0',
|
|
@@ -104,7 +103,7 @@ function rpaWorkflowDef(spec) {
|
|
|
104
103
|
{ name: '_label', type: 'string', value: spec.name },
|
|
105
104
|
],
|
|
106
105
|
},
|
|
107
|
-
inputDefinition:
|
|
106
|
+
inputDefinition: processInputDefinition(spec.inputs, spec.inputSchema, 'plain'),
|
|
108
107
|
inputDefaults: {},
|
|
109
108
|
outputDefinition: {
|
|
110
109
|
output: {
|
|
@@ -182,10 +181,6 @@ const API_WORKFLOW_PREFIX = 'uipath.core.api-workflow.';
|
|
|
182
181
|
function apiWorkflowDef(spec) {
|
|
183
182
|
const loc = processResourceLocation(spec);
|
|
184
183
|
const { resourceKey } = loc;
|
|
185
|
-
const properties = {};
|
|
186
|
-
for (const [k, v] of Object.entries(spec.inputs)) {
|
|
187
|
-
properties[k] = { type: typeof v === 'number' ? 'number' : typeof v === 'boolean' ? 'boolean' : 'string' };
|
|
188
|
-
}
|
|
189
184
|
return {
|
|
190
185
|
nodeType: `${API_WORKFLOW_PREFIX}${spec.key}`,
|
|
191
186
|
version: '1.0.0',
|
|
@@ -223,7 +218,7 @@ function apiWorkflowDef(spec) {
|
|
|
223
218
|
{ name: '_label', type: 'string', value: spec.name },
|
|
224
219
|
],
|
|
225
220
|
},
|
|
226
|
-
inputDefinition:
|
|
221
|
+
inputDefinition: processInputDefinition(spec.inputs, spec.inputSchema, 'plain'),
|
|
227
222
|
inputDefaults: {},
|
|
228
223
|
outputDefinition: {
|
|
229
224
|
output: {
|
|
@@ -271,10 +266,6 @@ function publishedFunctionDef(spec) {
|
|
|
271
266
|
// `section`, and `projectId`/`projectName`/`isInSolution` on the model.
|
|
272
267
|
const loc = processResourceLocation(spec);
|
|
273
268
|
const { resourceKey } = loc;
|
|
274
|
-
const properties = {};
|
|
275
|
-
for (const [k, v] of Object.entries(spec.inputs)) {
|
|
276
|
-
properties[k] = { type: typeof v === 'number' ? 'number' : typeof v === 'boolean' ? 'boolean' : 'string' };
|
|
277
|
-
}
|
|
278
269
|
return {
|
|
279
270
|
nodeType: `${FUNCTION_PREFIX}${spec.key}`,
|
|
280
271
|
version: '1.0.0',
|
|
@@ -322,7 +313,7 @@ function publishedFunctionDef(spec) {
|
|
|
322
313
|
{ name: '_label', type: 'string', value: spec.name },
|
|
323
314
|
],
|
|
324
315
|
},
|
|
325
|
-
inputDefinition:
|
|
316
|
+
inputDefinition: processInputDefinition(spec.inputs, spec.inputSchema, 'plain'),
|
|
326
317
|
inputDefaults: {},
|
|
327
318
|
outputDefinition: {
|
|
328
319
|
output: {
|
|
@@ -394,10 +385,6 @@ function agenticProcessDef(spec) {
|
|
|
394
385
|
const form = ownEntry(AGENTIC_PROCESS_FORMS, spec.form ?? 'bpmn') ?? AGENTIC_PROCESS_FORMS.bpmn;
|
|
395
386
|
const loc = processResourceLocation(spec);
|
|
396
387
|
const { resourceKey } = loc;
|
|
397
|
-
const properties = {};
|
|
398
|
-
for (const [k, v] of Object.entries(spec.inputs)) {
|
|
399
|
-
properties[k] = { type: typeof v === 'number' ? 'number' : typeof v === 'boolean' ? 'boolean' : 'string' };
|
|
400
|
-
}
|
|
401
388
|
return {
|
|
402
389
|
nodeType: `${form.prefix}${spec.key}`,
|
|
403
390
|
version: '1.0.0',
|
|
@@ -439,7 +426,7 @@ function agenticProcessDef(spec) {
|
|
|
439
426
|
// declares it: a boolean INPUT on the definition (default false). The sync
|
|
440
427
|
// serviceType stays on the model — the platform's BPMN serializer swaps in
|
|
441
428
|
// the async sibling when the instance opts in.
|
|
442
|
-
inputDefinition:
|
|
429
|
+
inputDefinition: processInputDefinition(spec.inputs, spec.inputSchema, 'with-fire-and-forget'),
|
|
443
430
|
inputDefaults: { fireAndForget: false },
|
|
444
431
|
outputDefinition: {
|
|
445
432
|
output: {
|
|
@@ -528,10 +515,7 @@ function agentDef(spec) {
|
|
|
528
515
|
// flow-core's `createModel` writes for every sibling-project resource.
|
|
529
516
|
const loc = processResourceLocation(spec);
|
|
530
517
|
const { inSolution, resourceKey } = loc;
|
|
531
|
-
const
|
|
532
|
-
for (const [k, v] of Object.entries(spec.inputs)) {
|
|
533
|
-
properties[k] = { type: typeof v === 'number' ? 'number' : typeof v === 'boolean' ? 'boolean' : 'string' };
|
|
534
|
-
}
|
|
518
|
+
const inputDefinition = processInputDefinition(spec.inputs, spec.inputSchema, 'plain');
|
|
535
519
|
return {
|
|
536
520
|
nodeType: `${AGENT_PREFIX}${spec.key}`,
|
|
537
521
|
version: '1.0.0',
|
|
@@ -572,9 +556,9 @@ function agentDef(spec) {
|
|
|
572
556
|
{ name: '_label', type: 'string', value: spec.name },
|
|
573
557
|
],
|
|
574
558
|
},
|
|
575
|
-
inputDefinition
|
|
559
|
+
inputDefinition,
|
|
576
560
|
inputDefaults: inSolution
|
|
577
|
-
? Object.fromEntries(
|
|
561
|
+
? Object.fromEntries(inputSchemaPropertyNames(inputDefinition).map((name) => [name, '']))
|
|
578
562
|
: {},
|
|
579
563
|
outputDefinition: {
|
|
580
564
|
output: {
|
|
@@ -615,27 +599,27 @@ export function processDefinition(spec) {
|
|
|
615
599
|
case 'publishedFunction':
|
|
616
600
|
return publishedFunctionDef({
|
|
617
601
|
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
618
|
-
inputs: s.inputs ?? {}, returns: s.returns,
|
|
602
|
+
inputs: s.inputs ?? {}, inputSchema: s.inputSchema, returns: s.returns,
|
|
619
603
|
});
|
|
620
604
|
case 'apiWorkflow':
|
|
621
605
|
return apiWorkflowDef({
|
|
622
606
|
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
623
|
-
inputs: s.inputs ?? {}, returns: s.returns,
|
|
607
|
+
inputs: s.inputs ?? {}, inputSchema: s.inputSchema, returns: s.returns,
|
|
624
608
|
});
|
|
625
609
|
case 'agenticProcess':
|
|
626
610
|
return agenticProcessDef({
|
|
627
611
|
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
628
|
-
inputs: s.inputs ?? {}, returns: s.returns, form: s.form,
|
|
612
|
+
inputs: s.inputs ?? {}, inputSchema: s.inputSchema, returns: s.returns, form: s.form,
|
|
629
613
|
});
|
|
630
614
|
case 'rpaWorkflow':
|
|
631
615
|
return rpaWorkflowDef({
|
|
632
616
|
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
633
|
-
inputs: s.inputs ?? {}, returns: s.returns,
|
|
617
|
+
inputs: s.inputs ?? {}, inputSchema: s.inputSchema, returns: s.returns,
|
|
634
618
|
});
|
|
635
619
|
case 'agent':
|
|
636
620
|
return agentDef({
|
|
637
621
|
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
638
|
-
inputs: s.inputs ?? {}, returns: s.returns, flavour: s.flavour,
|
|
622
|
+
inputs: s.inputs ?? {}, inputSchema: s.inputSchema, returns: s.returns, flavour: s.flavour,
|
|
639
623
|
});
|
|
640
624
|
}
|
|
641
625
|
}
|
|
@@ -774,13 +758,21 @@ function liftProcess(node, ctx, prefix, kind, form) {
|
|
|
774
758
|
+ `a fire-and-forget dispatch publishes no output, and agenticProcess() refuses the pair. Compile writes the `
|
|
775
759
|
+ `definition without that schema. To read the process result, set completion: 'wait' and declare \`returns\`.`);
|
|
776
760
|
}
|
|
761
|
+
const liftedInputs = Object.fromEntries(Object.entries(inputs).map(([k, v]) => [k, lifted(v, ctx)]));
|
|
762
|
+
// The saved argument schema, when compile would not write it back from the
|
|
763
|
+
// inputs alone: a definition that types `owsResult` as an object, or that
|
|
764
|
+
// declares an argument the step does not pass, or one it passes as
|
|
765
|
+
// undeclared. Inferred, every non-literal input became `{ type: 'string' }`
|
|
766
|
+
// and a passed `{}` then failed validate's type check.
|
|
767
|
+
const inputSchema = liftedInputSchema(def?.inputDefinition, liftedInputs, kind === 'agenticProcess' ? 'with-fire-and-forget' : 'plain');
|
|
777
768
|
const spec = {
|
|
778
769
|
key,
|
|
779
770
|
...(name !== undefined ? { name } : {}),
|
|
780
771
|
...(inSolution ? { location: 'in-solution' } : {}),
|
|
781
772
|
...(!inSolution && folderPath !== undefined ? { folderPath } : {}),
|
|
782
773
|
...(inSolution && projectId !== undefined ? { projectId } : {}),
|
|
783
|
-
...(Object.keys(inputs).length ? { inputs:
|
|
774
|
+
...(Object.keys(inputs).length ? { inputs: liftedInputs } : {}),
|
|
775
|
+
...(inputSchema !== undefined ? { inputSchema } : {}),
|
|
784
776
|
...(returns !== undefined && !fireAndForget ? { returns } : {}),
|
|
785
777
|
...(form !== undefined ? { form } : {}),
|
|
786
778
|
...(fireAndForget ? { completion: 'fire-and-forget' } : {}),
|
|
@@ -803,6 +795,7 @@ function printProcess(spec, ctx, factory) {
|
|
|
803
795
|
['folderPath', p.folderPath !== undefined ? ctx.string(p.folderPath) : undefined],
|
|
804
796
|
['projectId', p.projectId !== undefined ? ctx.string(p.projectId) : undefined],
|
|
805
797
|
['inputs', p.inputs !== undefined ? obj(Object.entries(p.inputs).map(([k, v]) => [k, val(v)])) : undefined],
|
|
798
|
+
['inputSchema', p.inputSchema !== undefined ? ctx.json(p.inputSchema) : undefined],
|
|
806
799
|
['returns', p.returns !== undefined ? obj(Object.entries(p.returns).map(([k, t]) => [k, ctx.string(t)])) : undefined],
|
|
807
800
|
['form', p.form !== undefined ? ctx.string(p.form) : undefined],
|
|
808
801
|
['completion', p.completion !== undefined ? ctx.string(p.completion) : undefined],
|
|
@@ -856,11 +849,11 @@ function processCheck(authored, ctx) {
|
|
|
856
849
|
}
|
|
857
850
|
/** Every key of each factory's options (builder-sdk#1990), by kind; `tsc` holds each list to its type. */
|
|
858
851
|
const PROCESS_OPTIONS = {
|
|
859
|
-
rpaWorkflow: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, returns: true }) },
|
|
860
|
-
apiWorkflow: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, returns: true }) },
|
|
861
|
-
publishedFunction: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, returns: true }) },
|
|
862
|
-
agenticProcess: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, form: true, completion: true, returns: true }) },
|
|
863
|
-
agent: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, returns: true, flavour: true }) },
|
|
852
|
+
rpaWorkflow: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, inputSchema: true, returns: true }) },
|
|
853
|
+
apiWorkflow: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, inputSchema: true, returns: true }) },
|
|
854
|
+
publishedFunction: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, inputSchema: true, returns: true }) },
|
|
855
|
+
agenticProcess: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, inputSchema: true, form: true, completion: true, returns: true }) },
|
|
856
|
+
agent: { inputs: declareKeys({ key: true, name: true, location: true, project: true, folderPath: true, projectId: true, inputs: true, inputSchema: true, returns: true, flavour: true }) },
|
|
864
857
|
};
|
|
865
858
|
function processType(kind, prefix, factory, form) {
|
|
866
859
|
const impl = {
|
|
@@ -11,11 +11,14 @@
|
|
|
11
11
|
* folder `""` (`processResourceLocation`), so the author's folderPath is dropped.
|
|
12
12
|
* - `AGENTIC_RESERVED_INPUT`: `fireAndForget` is the design-time switch; the
|
|
13
13
|
* definition retypes it boolean and decompile deletes it as an argument.
|
|
14
|
+
* - `PROCESS_INPUT_SCHEMA_INVALID`: `inputSchema` is written verbatim as the
|
|
15
|
+
* definition's `inputDefinition`, so it must be a plain JSON object.
|
|
14
16
|
*/
|
|
15
17
|
import { CompileRefusal } from '../../../core/compile-refusal.js';
|
|
16
18
|
import { ownEntry } from '../../../core/own-entry.js';
|
|
17
19
|
import { blank, renamedFieldMessage } from '../../../core/process-resource.js';
|
|
18
20
|
import { unrecordedKeyReason } from './contract.js';
|
|
21
|
+
import { isWritableInputSchema } from './input-schema.js';
|
|
19
22
|
/** Per kind: the codes, the label messages use, and the retired name of `key` (if any). */
|
|
20
23
|
const KINDS = {
|
|
21
24
|
rpaWorkflow: {
|
|
@@ -97,6 +100,15 @@ export function refuseLossyProcess(kind, inputs, step, resources) {
|
|
|
97
100
|
+ `arrives. Locally it would appear to work, because this engine passes the whole envelope through. `
|
|
98
101
|
+ `Rename the argument, or set \`completion: 'fire-and-forget'\` to start the process without waiting.`);
|
|
99
102
|
}
|
|
103
|
+
// `inputSchema` is written verbatim as the definition's `inputDefinition`, so it
|
|
104
|
+
// has to be the JSON object a definition holds: an expression or an array would
|
|
105
|
+
// be serialized as whatever its fields happen to be.
|
|
106
|
+
const schema = s.inputSchema;
|
|
107
|
+
if (schema !== undefined && !isWritableInputSchema(schema)) {
|
|
108
|
+
throw new CompileRefusal('PROCESS_INPUT_SCHEMA_INVALID', `${k.label} step "${step}"'s \`inputSchema\` is not a JSON object. It is written as is as the definition's `
|
|
109
|
+
+ `\`inputDefinition\` (the process's argument schema), so it has to be a plain object literal, e.g. `
|
|
110
|
+
+ `\`{ type: 'object', properties: { payload: { type: 'object' } } }\`. Leave it out to declare each input typed from its value.`, `inputSchema: { type: 'object', properties: { … } }`);
|
|
111
|
+
}
|
|
100
112
|
}
|
|
101
113
|
/** How a message names a process kind's step: `RPA`, `API workflow`, `Agent`, … */
|
|
102
114
|
export function processLabel(kind) {
|
|
@@ -80,6 +80,27 @@ export interface RpaWorkflowInputs {
|
|
|
80
80
|
* and only the deployed process knows them.
|
|
81
81
|
*/
|
|
82
82
|
inputs?: Record<string, unknown>;
|
|
83
|
+
/**
|
|
84
|
+
* The process's input arguments as a JSON Schema, written verbatim as the
|
|
85
|
+
* definition's `inputDefinition`. Optional: left out, compile declares one
|
|
86
|
+
* property per entry of `inputs`, typed from the value passed (a number,
|
|
87
|
+
* boolean, array or object literal by its shape; an expression as a string).
|
|
88
|
+
*
|
|
89
|
+
* Write it when that guess is wrong — for example an argument the process
|
|
90
|
+
* types as an object that the step fills from an expression, or one the step
|
|
91
|
+
* does not pass at all:
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* inputSchema: { type: 'object', properties: { payload: { type: 'object' }, mode: { type: 'string', enum: ['a', 'b'] } } }
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* Decompile writes it from the saved definition whenever compile would not
|
|
98
|
+
* reproduce that definition from `inputs` alone, so a round trip keeps the
|
|
99
|
+
* titles, descriptions, enums and types the platform wrote.
|
|
100
|
+
*
|
|
101
|
+
* @enforcedBy PROCESS_INPUT_SCHEMA_TYPE A literal input fits the type its property declares.
|
|
102
|
+
*/
|
|
103
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
83
104
|
/**
|
|
84
105
|
* The process's OUTPUT arguments — the fields it returns, and their types
|
|
85
106
|
* (e.g. `{ title: 'string' }`). Required if anything reads the step's output.
|
|
@@ -174,6 +195,27 @@ export interface ApiWorkflowInputs {
|
|
|
174
195
|
* `{ name: 'tomasz' }`). Not a fixed schema — every workflow declares its own.
|
|
175
196
|
*/
|
|
176
197
|
inputs?: Record<string, unknown>;
|
|
198
|
+
/**
|
|
199
|
+
* The process's input arguments as a JSON Schema, written verbatim as the
|
|
200
|
+
* definition's `inputDefinition`. Optional: left out, compile declares one
|
|
201
|
+
* property per entry of `inputs`, typed from the value passed (a number,
|
|
202
|
+
* boolean, array or object literal by its shape; an expression as a string).
|
|
203
|
+
*
|
|
204
|
+
* Write it when that guess is wrong — for example an argument the process
|
|
205
|
+
* types as an object that the step fills from an expression, or one the step
|
|
206
|
+
* does not pass at all:
|
|
207
|
+
*
|
|
208
|
+
* ```ts
|
|
209
|
+
* inputSchema: { type: 'object', properties: { payload: { type: 'object' }, mode: { type: 'string', enum: ['a', 'b'] } } }
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* Decompile writes it from the saved definition whenever compile would not
|
|
213
|
+
* reproduce that definition from `inputs` alone, so a round trip keeps the
|
|
214
|
+
* titles, descriptions, enums and types the platform wrote.
|
|
215
|
+
*
|
|
216
|
+
* @enforcedBy PROCESS_INPUT_SCHEMA_TYPE A literal input fits the type its property declares.
|
|
217
|
+
*/
|
|
218
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
177
219
|
/**
|
|
178
220
|
* The workflow's OUTPUT arguments — the fields it returns, and their types
|
|
179
221
|
* (e.g. `{ EstimatedAge: 'integer' }`). Required if anything reads the step's
|
|
@@ -271,6 +313,27 @@ export interface PublishedFunctionInputs {
|
|
|
271
313
|
projectId?: string;
|
|
272
314
|
/** The function's own input arguments, by its own names. */
|
|
273
315
|
inputs?: Record<string, unknown>;
|
|
316
|
+
/**
|
|
317
|
+
* The process's input arguments as a JSON Schema, written verbatim as the
|
|
318
|
+
* definition's `inputDefinition`. Optional: left out, compile declares one
|
|
319
|
+
* property per entry of `inputs`, typed from the value passed (a number,
|
|
320
|
+
* boolean, array or object literal by its shape; an expression as a string).
|
|
321
|
+
*
|
|
322
|
+
* Write it when that guess is wrong — for example an argument the process
|
|
323
|
+
* types as an object that the step fills from an expression, or one the step
|
|
324
|
+
* does not pass at all:
|
|
325
|
+
*
|
|
326
|
+
* ```ts
|
|
327
|
+
* inputSchema: { type: 'object', properties: { payload: { type: 'object' }, mode: { type: 'string', enum: ['a', 'b'] } } }
|
|
328
|
+
* ```
|
|
329
|
+
*
|
|
330
|
+
* Decompile writes it from the saved definition whenever compile would not
|
|
331
|
+
* reproduce that definition from `inputs` alone, so a round trip keeps the
|
|
332
|
+
* titles, descriptions, enums and types the platform wrote.
|
|
333
|
+
*
|
|
334
|
+
* @enforcedBy PROCESS_INPUT_SCHEMA_TYPE A literal input fits the type its property declares.
|
|
335
|
+
*/
|
|
336
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
274
337
|
/**
|
|
275
338
|
* The function's OUTPUT arguments — the fields it returns, and their types.
|
|
276
339
|
* Required if anything reads the step's output: the schema lives on the
|
|
@@ -361,6 +424,27 @@ interface AgenticProcessInputsBase {
|
|
|
361
424
|
* own, and only the deployed process knows them.
|
|
362
425
|
*/
|
|
363
426
|
inputs?: Record<string, unknown>;
|
|
427
|
+
/**
|
|
428
|
+
* The process's input arguments as a JSON Schema, written verbatim as the
|
|
429
|
+
* definition's `inputDefinition`. Optional: left out, compile declares one
|
|
430
|
+
* property per entry of `inputs`, typed from the value passed (a number,
|
|
431
|
+
* boolean, array or object literal by its shape; an expression as a string).
|
|
432
|
+
*
|
|
433
|
+
* Write it when that guess is wrong — for example an argument the process
|
|
434
|
+
* types as an object that the step fills from an expression, or one the step
|
|
435
|
+
* does not pass at all:
|
|
436
|
+
*
|
|
437
|
+
* ```ts
|
|
438
|
+
* inputSchema: { type: 'object', properties: { payload: { type: 'object' }, mode: { type: 'string', enum: ['a', 'b'] } } }
|
|
439
|
+
* ```
|
|
440
|
+
*
|
|
441
|
+
* Decompile writes it from the saved definition whenever compile would not
|
|
442
|
+
* reproduce that definition from `inputs` alone, so a round trip keeps the
|
|
443
|
+
* titles, descriptions, enums and types the platform wrote.
|
|
444
|
+
*
|
|
445
|
+
* @enforcedBy PROCESS_INPUT_SCHEMA_TYPE A literal input fits the type its property declares.
|
|
446
|
+
*/
|
|
447
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
364
448
|
/**
|
|
365
449
|
* Which published form this Agentic Process is: the three forms
|
|
366
450
|
* share one public concept and differ only in wire identity. `'bpmn'` (the
|
|
@@ -509,6 +593,27 @@ export interface AgentInputs {
|
|
|
509
593
|
* tell you what the platform will do with it.
|
|
510
594
|
*/
|
|
511
595
|
inputs: Record<string, unknown>;
|
|
596
|
+
/**
|
|
597
|
+
* The process's input arguments as a JSON Schema, written verbatim as the
|
|
598
|
+
* definition's `inputDefinition`. Optional: left out, compile declares one
|
|
599
|
+
* property per entry of `inputs`, typed from the value passed (a number,
|
|
600
|
+
* boolean, array or object literal by its shape; an expression as a string).
|
|
601
|
+
*
|
|
602
|
+
* Write it when that guess is wrong — for example an argument the process
|
|
603
|
+
* types as an object that the step fills from an expression, or one the step
|
|
604
|
+
* does not pass at all:
|
|
605
|
+
*
|
|
606
|
+
* ```ts
|
|
607
|
+
* inputSchema: { type: 'object', properties: { payload: { type: 'object' }, mode: { type: 'string', enum: ['a', 'b'] } } }
|
|
608
|
+
* ```
|
|
609
|
+
*
|
|
610
|
+
* Decompile writes it from the saved definition whenever compile would not
|
|
611
|
+
* reproduce that definition from `inputs` alone, so a round trip keeps the
|
|
612
|
+
* titles, descriptions, enums and types the platform wrote.
|
|
613
|
+
*
|
|
614
|
+
* @enforcedBy PROCESS_INPUT_SCHEMA_TYPE A literal input fits the type its property declares.
|
|
615
|
+
*/
|
|
616
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
512
617
|
/**
|
|
513
618
|
* The agent's OUTPUT fields and their types (e.g.
|
|
514
619
|
* `{ count: 'integer', inputString: 'string' }`). Required if anything reads the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.122.
|
|
3
|
+
"version": "6.122.6",
|
|
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",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"@types/node": "^22.7.0",
|
|
127
127
|
"esbuild": "^0.28.1"
|
|
128
128
|
},
|
|
129
|
-
"gitref": "
|
|
129
|
+
"gitref": "f11a5901d050fbca10cffe4229d30be9ab1a4eb6"
|
|
130
130
|
}
|