@uipath/flow-tool 1.196.1 → 1.197.0-preview.59
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/index.js +2 -0
- package/dist/init.js +7101 -7594
- package/dist/packager-tool.js +6546 -4928
- package/dist/services/flow-validate-service.d.ts +71 -0
- package/dist/tool.js +19720 -21068
- package/dist/validation.js +7667 -7842
- package/package.json +2 -2
|
@@ -101,6 +101,77 @@ export declare class FlowValidateService {
|
|
|
101
101
|
* specific reason hydration could not fill the prompt fields.
|
|
102
102
|
*/
|
|
103
103
|
private resolveAgentPrompts;
|
|
104
|
+
/**
|
|
105
|
+
* Inline-agent input-binding integrity (warning-only).
|
|
106
|
+
*
|
|
107
|
+
* The .flow→BPMN converter derives each agent `JobArguments` binding by
|
|
108
|
+
* structurally decoding the `agent.json` `inputSchema` property keys
|
|
109
|
+
* (`<node>__output__<field>` → `$vars.<node>.output.<field>`), NOT from
|
|
110
|
+
* `inputs.agentInputVariables`. So a populated `inputSchema` with an
|
|
111
|
+
* empty `agentInputVariables` is the canonical, correct shape for a
|
|
112
|
+
* hand- or AI-authored inline agent — it is never an error, and validate
|
|
113
|
+
* must not demand a redundant node-side binding. (`agentInputVariables`
|
|
114
|
+
* exists only to carry a legacy *manual* binding whose key diverges from
|
|
115
|
+
* the structural encoding; absence of one is normal.)
|
|
116
|
+
*
|
|
117
|
+
* The one actionable gap here is the inverse: the agent declares no
|
|
118
|
+
* inputs (`inputSchema` empty or absent) but the flow node binds some —
|
|
119
|
+
* typically a trigger wired into `agentInputVariables`. The agent has no
|
|
120
|
+
* `{{input.<key>}}` placeholders, so the runtime ignores every binding
|
|
121
|
+
* and the agent silently runs without the flow's inputs. Flagged as a
|
|
122
|
+
* warning.
|
|
123
|
+
*
|
|
124
|
+
* Prompt placeholders that cannot bind (a bare `{{key}}`, or `{{input.K}}`
|
|
125
|
+
* where `K` is undeclared) are caught separately by
|
|
126
|
+
* `validateAgentPromptInputRefs`.
|
|
127
|
+
*/
|
|
128
|
+
private validateAgentInputBindings;
|
|
129
|
+
/**
|
|
130
|
+
* Build the warning for an inline agent that declares no inputs in its
|
|
131
|
+
* `inputSchema` while the flow node binds one or more under
|
|
132
|
+
* `agentInputVariables` (e.g. a trigger wired in). The runtime maps
|
|
133
|
+
* bindings to `{{input.<id>}}` placeholders; with none declared, every
|
|
134
|
+
* binding is dropped and the agent runs without the flow's inputs.
|
|
135
|
+
*/
|
|
136
|
+
private buildIgnoredAgentInputsWarning;
|
|
137
|
+
/**
|
|
138
|
+
* Inline-agent prompt-reference integrity (the prompt-ref → schema
|
|
139
|
+
* direction).
|
|
140
|
+
*
|
|
141
|
+
* The other agent-input checks trust `inputSchema.properties` to know
|
|
142
|
+
* what the prompt reads. But the runtime only binds a `{{...}}` token
|
|
143
|
+
* when it is in the canonical `input.<key>` form AND `<key>` is declared
|
|
144
|
+
* in `inputSchema.properties`. Two ways a prompt token silently stays a
|
|
145
|
+
* literal string at runtime — even when the flow/JobArguments deliver
|
|
146
|
+
* the value — and this reads the actual `messages[].content` tokens to
|
|
147
|
+
* catch both:
|
|
148
|
+
* - Missing namespace: a bare `{{key}}` (no `input.` prefix). The
|
|
149
|
+
* runtime tokenizer keeps the inner text verbatim, so `{{key}}`
|
|
150
|
+
* binds to a `key` variable, not the `input.<key>` the schema
|
|
151
|
+
* expects. Always wrong — flagged regardless of the schema.
|
|
152
|
+
* - Undeclared key: `{{input.K}}` where `K` is not in
|
|
153
|
+
* `inputSchema.properties` (empty or incomplete schema). This is the
|
|
154
|
+
* verified failure that schema-trusting validation let through.
|
|
155
|
+
*/
|
|
156
|
+
private validateAgentPromptInputRefs;
|
|
157
|
+
/**
|
|
158
|
+
* Classify one prompt field's `{{...}}` tokens into malformed (not the
|
|
159
|
+
* canonical `input.<key>` form) and undeclared (`input.<key>` whose key
|
|
160
|
+
* is absent from `inputSchema.properties`), and build one error per
|
|
161
|
+
* non-empty bucket. `field` is the prompt field the tokens came from
|
|
162
|
+
* (`systemPrompt`/`userPrompt`), so the issue path sends the user to the
|
|
163
|
+
* right place.
|
|
164
|
+
*/
|
|
165
|
+
private buildPromptInputRefIssues;
|
|
166
|
+
/**
|
|
167
|
+
* Return the declared-schema key a prompt variable token maps to, or
|
|
168
|
+
* `undefined` when the token is not the canonical `input.<key>` form.
|
|
169
|
+
* The token text must be exactly `input.` + a non-empty key with no
|
|
170
|
+
* surrounding whitespace (matching what `tokenizeContent` produces and
|
|
171
|
+
* what the runtime binds). `{{input.x}}` → `x`; bare `{{x}}`,
|
|
172
|
+
* `{{ input.x }}`, and `{{input.}}` → `undefined`.
|
|
173
|
+
*/
|
|
174
|
+
private canonicalInputKey;
|
|
104
175
|
/**
|
|
105
176
|
* Decorate `[REQUIRED_FIELD] systemPrompt|userPrompt` validator errors
|
|
106
177
|
* on inline-agent nodes with a diagnostic hint pinpointing why the
|