@uipath/maestro-builder-sdk 6.41.2 → 6.43.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.
- package/dist/api-index.md +99 -99
- package/dist/api-members.md +307 -307
- package/dist/check.d.ts +0 -19
- package/dist/check.js +40 -1036
- package/dist/cli/commands/registry.js +15 -0
- package/dist/compile-cli.js +2 -1
- package/dist/core/actions.d.ts +1 -713
- package/dist/core/actions.js +0 -193
- package/dist/core/agent-sidecar.d.ts +186 -0
- package/dist/core/agent-sidecar.js +409 -0
- package/dist/core/agent-tool-resources.d.ts +62 -0
- package/dist/core/agent-tool-resources.js +81 -0
- package/dist/core/cli-spelling.d.ts +9 -0
- package/dist/core/cli-spelling.js +9 -0
- package/dist/{config.js → core/connector-configuration.js} +2 -2
- package/dist/core/library-cache.d.ts +0 -9
- package/dist/core/library-cache.js +0 -9
- package/dist/core/library.d.ts +47 -0
- package/dist/core/library.js +135 -34
- package/dist/core/list-envelope.d.ts +36 -1
- package/dist/core/list-envelope.js +24 -19
- package/dist/core/lookup-store.d.ts +4 -3
- package/dist/core/lookup-store.js +46 -38
- package/dist/core/node-id-placeholder.d.ts +8 -0
- package/dist/core/node-id-placeholder.js +10 -0
- package/dist/core/read-text.d.ts +26 -0
- package/dist/core/read-text.js +43 -0
- package/dist/core/ts-literal.d.ts +6 -0
- package/dist/core/ts-literal.js +15 -0
- package/dist/core/typed-raw-node.js +0 -5
- package/dist/decompile.js +34 -822
- package/dist/flow-node-registry.js +2 -1
- package/dist/flow-node-type.d.ts +130 -6
- package/dist/flow-sdk.d.ts +1 -0
- package/dist/flow-sdk.js +1 -0
- package/dist/nodes/agent/flow/check.d.ts +88 -0
- package/dist/nodes/agent/flow/check.js +873 -0
- package/dist/nodes/agent/flow/factories.d.ts +134 -0
- package/dist/nodes/agent/flow/factories.js +143 -0
- package/dist/nodes/agent/flow/family.d.ts +3 -0
- package/dist/nodes/agent/flow/family.js +8 -0
- package/dist/nodes/agent/flow/index.d.ts +3 -0
- package/dist/nodes/agent/flow/index.js +3 -0
- package/dist/nodes/agent/flow/inline-agent-lift.d.ts +44 -0
- package/dist/nodes/agent/flow/inline-agent-lift.js +572 -0
- package/dist/nodes/agent/flow/inline-agent.d.ts +15 -0
- package/dist/nodes/agent/flow/inline-agent.js +526 -0
- package/dist/nodes/agent/flow/node-type.d.ts +20 -0
- package/dist/nodes/agent/flow/node-type.js +422 -0
- package/dist/nodes/agent/flow/resources.d.ts +502 -0
- package/dist/nodes/agent/flow/resources.js +1409 -0
- package/dist/nodes/agent/flow/spec.d.ts +448 -0
- package/dist/nodes/agent/flow/spec.js +1 -0
- package/dist/nodes/process/flow/check.d.ts +40 -2
- package/dist/nodes/process/flow/check.js +156 -0
- package/dist/nodes/process/flow/factories.d.ts +58 -3
- package/dist/nodes/process/flow/factories.js +59 -2
- package/dist/nodes/process/flow/node-type.d.ts +4 -1
- package/dist/nodes/process/flow/node-type.js +181 -10
- package/dist/nodes/process/flow/spec.d.ts +112 -5
- package/dist/registry/describe-cli.d.ts +10 -0
- package/dist/registry/describe-cli.js +41 -0
- package/dist/registry/library-reader.d.ts +12 -2
- package/dist/registry/library-reader.js +17 -16
- package/dist/registry/lookup-specs.d.ts +17 -1
- package/dist/registry/lookup-specs.js +3 -7
- package/dist/registry/path-cli.js +2 -1
- package/dist/registry/search-cli.js +2 -1
- package/dist/serialize.d.ts +9 -54
- package/dist/serialize.js +47 -2763
- package/package.json +2 -2
- /package/dist/{config.d.ts → core/connector-configuration.d.ts} +0 -0
- /package/dist/{ixp-definition.json → core/ixp-definition.json} +0 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agents family's authoring types — the text conversational agent
|
|
3
|
+
* (`uipath.agent.conversational`), the voice agent (`uipath.agent.voice`) and
|
|
4
|
+
* the two voice call steps (`uipath.conversational.voice.create-outgoing-call`,
|
|
5
|
+
* `.end-call`) and the inline agent (`uipath.agent.autonomous`) — and their
|
|
6
|
+
* kinds' entries in `FlowActionSpecs`. Moved from core/actions.ts in Phase 4 of
|
|
7
|
+
* docs/NODE_TYPE_ARCHITECTURE_DESIGN.md. The guardrails and the resource refs
|
|
8
|
+
* (`ToolRef`, `ContextIndexRef`, `EscalationRef`, `AgentMemoryRef`) stay in
|
|
9
|
+
* core: the resource identities and the bindings writers read them.
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentGuardrail, AgentMemoryRef, ContextIndexRef, EscalationRef, InlineAgentFieldType, ToolRef } from '../../../core/actions.js';
|
|
12
|
+
import type { Expr } from '../../../core/expr.js';
|
|
13
|
+
/**
|
|
14
|
+
* How a conversational agent gets its turn — the node's own
|
|
15
|
+
* `conversationalAgentSettings` sub-object.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* `'simple'` (the default) derives everything from ONE conversation-context
|
|
19
|
+
* binding: `context` is the whole context object, and the platform reads
|
|
20
|
+
* `conversationId` / `latestExchangeId` / `messages` / `userSettings` out of
|
|
21
|
+
* it. `'custom'` binds each field yourself — for a flow that assembles a turn
|
|
22
|
+
* from more than one source.
|
|
23
|
+
*/
|
|
24
|
+
export interface ConversationalAgentSettings {
|
|
25
|
+
/** `'simple'` (the default) binds the whole context once; `'custom'` binds each field. */
|
|
26
|
+
mode?: 'simple' | 'custom';
|
|
27
|
+
/** The whole conversation context — `'simple'` mode's single binding. */
|
|
28
|
+
context?: Expr | string;
|
|
29
|
+
/** `'custom'` mode: the conversation id. */
|
|
30
|
+
conversationId?: Expr | string;
|
|
31
|
+
/** `'custom'` mode: the exchange id. */
|
|
32
|
+
exchangeId?: Expr | string;
|
|
33
|
+
/** `'custom'` mode: the chat history array. */
|
|
34
|
+
messages?: Expr | string;
|
|
35
|
+
/** `'custom'` mode: the caller's per-user settings object. */
|
|
36
|
+
userSettings?: Expr | string;
|
|
37
|
+
}
|
|
38
|
+
/** What `conversationalAgent()` takes: the agent's instructions and model, and how it gets its turn. */
|
|
39
|
+
export interface ConversationalAgentInputs {
|
|
40
|
+
/**
|
|
41
|
+
* The agent's standing instructions for the conversation. Plain text — a
|
|
42
|
+
* conversational agent's turn comes from the transcript, not from flow
|
|
43
|
+
* arguments, so there is no `{{input.…}}` templating.
|
|
44
|
+
*/
|
|
45
|
+
systemPrompt: string;
|
|
46
|
+
/** The MODEL to run, e.g. `'gpt-5.4'`. Required by the node's definition. */
|
|
47
|
+
model: string;
|
|
48
|
+
/**
|
|
49
|
+
* How the agent gets its turn. The common case is
|
|
50
|
+
* `{ context: out('<waitStep>', 'conversationContext') }` — one binding the
|
|
51
|
+
* platform reads conversation id, exchange id, history and user settings out
|
|
52
|
+
* of. See {@link ConversationalAgentSettings}.
|
|
53
|
+
*/
|
|
54
|
+
settings: ConversationalAgentSettings;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the agent's reply CLOSES the exchange.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated Has no effect and is not emitted. The platform retired the input:
|
|
59
|
+
* the conversational agent's v1.7 node migration removes it, and the converter
|
|
60
|
+
* always sends `conversationalService.endExchange = ''`. Wait-for-message and
|
|
61
|
+
* the end of the conversation close open exchanges.
|
|
62
|
+
*/
|
|
63
|
+
endExchange?: boolean;
|
|
64
|
+
/** Sampling temperature, 0–1. */
|
|
65
|
+
temperature?: number;
|
|
66
|
+
/** Max tokens in one response. */
|
|
67
|
+
maxTokenPerResponse?: number;
|
|
68
|
+
/**
|
|
69
|
+
* The model's own context ceiling.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated Has no effect and is not emitted. Studio Web derives it from the
|
|
72
|
+
* selected model.
|
|
73
|
+
*/
|
|
74
|
+
modelMaxTokens?: number;
|
|
75
|
+
/** How many tool-calling rounds one turn may take, 1–100. */
|
|
76
|
+
maxIterations?: number;
|
|
77
|
+
/** Safety rails, the same array `inlineAgent` takes. */
|
|
78
|
+
guardrails?: AgentGuardrail[];
|
|
79
|
+
/**
|
|
80
|
+
* The agent's own directory name (a UUID) — the node carries it as `source`
|
|
81
|
+
* and the compiler writes `<source>/agent.json` beside the flow. Derived from
|
|
82
|
+
* the flow id + step name when omitted.
|
|
83
|
+
*/
|
|
84
|
+
source?: string;
|
|
85
|
+
}
|
|
86
|
+
/** What `createOutgoingCall()` takes: the two numbers, in E.164. */
|
|
87
|
+
export interface CreateOutgoingCallInputs {
|
|
88
|
+
/**
|
|
89
|
+
* The number to call FROM — a provisioned number on the tenant's telephony
|
|
90
|
+
* provider, in E.164 (`'+15551234567'`). Required.
|
|
91
|
+
*/
|
|
92
|
+
from: string | Expr;
|
|
93
|
+
/** The number to call, in E.164. Required. */
|
|
94
|
+
to: string | Expr;
|
|
95
|
+
}
|
|
96
|
+
/** What `endCall()` takes: the call to hang up. */
|
|
97
|
+
export interface EndCallInputs {
|
|
98
|
+
/**
|
|
99
|
+
* The call to hang up — bind the `callContext` published by the incoming-call
|
|
100
|
+
* trigger (`out('start', 'callContext')`) or by `createOutgoingCall`
|
|
101
|
+
* (`out('<step>', 'callContext')`). Required.
|
|
102
|
+
*/
|
|
103
|
+
callContext: Expr | string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The audio settings a voice agent speaks with.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* `model` is a VOICE model (a live/realtime one — not the text models
|
|
110
|
+
* `inlineAgent` takes), and `persona` is one of that model's own voices, so the
|
|
111
|
+
* two travel together. The platform's catalog today is
|
|
112
|
+
* `'gemini-3.1-flash-live-preview'` (personas Aoede, Charon, Fenrir, Kore,
|
|
113
|
+
* Leda, Orus, Puck, Zephyr) and `'gpt-realtime-2'` (alloy, ash, ballad, coral,
|
|
114
|
+
* echo, sage, shimmer, verse); omit both for the platform default.
|
|
115
|
+
*/
|
|
116
|
+
export interface VoiceSettings {
|
|
117
|
+
/** The voice model, e.g. `'gemini-3.1-flash-live-preview'`. */
|
|
118
|
+
model?: string;
|
|
119
|
+
/** One of that model's personas, e.g. `'Kore'`. */
|
|
120
|
+
persona?: string;
|
|
121
|
+
/** Sampling temperature, 0–1. */
|
|
122
|
+
temperature?: number;
|
|
123
|
+
/** Max tokens per response. */
|
|
124
|
+
maxTokens?: number;
|
|
125
|
+
/** The model's own context ceiling — informational. */
|
|
126
|
+
modelMaxTokens?: number;
|
|
127
|
+
}
|
|
128
|
+
/** What `voiceAgent()` takes: the agent's instructions, the call it joins, and how it sounds. */
|
|
129
|
+
export interface VoiceAgentInputs {
|
|
130
|
+
/**
|
|
131
|
+
* The agent's standing instructions — who it is on the call and what it must
|
|
132
|
+
* do. Use `{{input.<name>}}` placeholders for values declared in `inputs`;
|
|
133
|
+
* the caller's audio remains the conversational turn.
|
|
134
|
+
*/
|
|
135
|
+
systemPrompt: string;
|
|
136
|
+
/**
|
|
137
|
+
* Flow values made available to `systemPrompt` placeholders. Each key must
|
|
138
|
+
* be referenced as `{{input.<key>}}`; the compiler emits the node's runtime
|
|
139
|
+
* argument binding and the matching agent.json input contract together.
|
|
140
|
+
*/
|
|
141
|
+
inputs?: Record<string, unknown>;
|
|
142
|
+
/**
|
|
143
|
+
* The call to attach the agent to — the `callContext` from the incoming-call
|
|
144
|
+
* trigger or `createOutgoingCall`. Required: without it the agent has no
|
|
145
|
+
* audio channel to join.
|
|
146
|
+
*/
|
|
147
|
+
callContext: Expr | string;
|
|
148
|
+
/** How the agent sounds. Omit for the platform default voice. */
|
|
149
|
+
voice?: VoiceSettings;
|
|
150
|
+
/**
|
|
151
|
+
* How many tool-calling rounds the agent may take in one turn. The node's
|
|
152
|
+
* schema allows **1–8** — a tighter ceiling than a text agent's, because a
|
|
153
|
+
* caller is waiting.
|
|
154
|
+
*/
|
|
155
|
+
maxIterations?: number;
|
|
156
|
+
/**
|
|
157
|
+
* The agent's own directory name (a UUID) — the node carries it as `source`
|
|
158
|
+
* and the compiler writes `<source>/agent.json` beside the flow. Omit and one
|
|
159
|
+
* is derived from the flow id + step name, so a recompile is not a diff.
|
|
160
|
+
*/
|
|
161
|
+
source?: string;
|
|
162
|
+
}
|
|
163
|
+
/** What `inlineAgent()` takes: the model and prompts, the inputs and `returns`, the run settings, and the resources the agent attaches. */
|
|
164
|
+
export interface InlineAgentInputs {
|
|
165
|
+
/**
|
|
166
|
+
* The MODEL to run, e.g. `'gpt-5.4'`. Required by the node's definition, and
|
|
167
|
+
* worth a thought rather than a default: the platform's own scaffold ships
|
|
168
|
+
* `gpt-4o-2024-11-20`, which is stale, and v1's own smoke check for this node
|
|
169
|
+
* type FAILS a flow that keeps it. List what the tenant has with
|
|
170
|
+
* `uip agent model list`.
|
|
171
|
+
*/
|
|
172
|
+
model: string;
|
|
173
|
+
/**
|
|
174
|
+
* The agent's standing instructions — who it is, and what each `returns` field
|
|
175
|
+
* should hold. Required by the definition (`minLength: 1`).
|
|
176
|
+
*
|
|
177
|
+
* **Write it as plain text, and reference a value as `{{input.<name>}}`** — the
|
|
178
|
+
* agent's own template syntax, and the same names `inputs` declares:
|
|
179
|
+
*
|
|
180
|
+
* ```ts
|
|
181
|
+
* systemPrompt: 'You classify support email. Return a result conforming to the output '
|
|
182
|
+
* + 'schema. category: billing | technical | account. priority: low | normal | high.',
|
|
183
|
+
* userPrompt: 'Classify this email:\n{{input.body}}',
|
|
184
|
+
* inputs: { body: input('body') },
|
|
185
|
+
* returns: { category: 'string', priority: 'string' },
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* Why a placeholder rather than an interpolated expression: an inline agent is two
|
|
189
|
+
* artifacts, and its prompt exists in TWO dialects. You write one; the compiler
|
|
190
|
+
* emits the other into the `agent.json` sidecar. The `.flow` node carries no copy
|
|
191
|
+
* of the prompt: it is a shell, so Studio Web reads the sidecar.
|
|
192
|
+
*
|
|
193
|
+
* 1. yours `{{input.claim}}`
|
|
194
|
+
* 2. the AGENT.JSON `{{input.prepare__output__claimRef}}` ← what the runtime SENDS
|
|
195
|
+
*
|
|
196
|
+
* The second exists because the platform does not send an agent the names you
|
|
197
|
+
* declared: it names each argument after the bound reference PATH, `__`-joined.
|
|
198
|
+
* For a flow input the two coincide (`$vars.notes` → `notes`); for a step output
|
|
199
|
+
* they do not, and a sidecar still saying `{{input.claim}}` templates against a key
|
|
200
|
+
* that is not there — the literal text reaches the model. See the inline-agent
|
|
201
|
+
* node reference (`website/reference/inline-agent.md`) §"The prompt dialects".
|
|
202
|
+
*
|
|
203
|
+
* **The answer's shape is `returns`, not the prompt.** `returns` becomes the node's
|
|
204
|
+
* `agentOutputVariables` and the `agent.json` `outputSchema` — what Studio Web's
|
|
205
|
+
* Outputs editor writes — and the platform's agent runtime ends each run with a
|
|
206
|
+
* built-in structured call (`end_execution`) that fills exactly those fields. So
|
|
207
|
+
* `out('<step>', '<field>')` reads a typed value, not text to parse. Describe what
|
|
208
|
+
* each field holds, in the product's own wording, as the example above does:
|
|
209
|
+
* `Return a result conforming to the output schema. <field>: <how to fill it>.`
|
|
210
|
+
*
|
|
211
|
+
* Never ask for JSON TEXT as well ("Return ONLY a JSON object with keys …"). The
|
|
212
|
+
* model then packs its whole answer, serialized, into ONE string field: a writer
|
|
213
|
+
* declaring `{ subject, body }` came back on 2026-09-23 with
|
|
214
|
+
* `body: '{"subject":"…","body":"Dear …"}'` in 3 of 3 debug runs, and the flow sent
|
|
215
|
+
* that text on. A field that should carry structure is declared `'object'` or
|
|
216
|
+
* `'array'` instead.
|
|
217
|
+
*
|
|
218
|
+
* @enforcedBy INLINE_AGENT_PROMPT_JSON_TEXT A prompt that asks for JSON text while
|
|
219
|
+
* `returns` declares fields is refused; the platform accepts it and the run returns
|
|
220
|
+
* the packed value.
|
|
221
|
+
*/
|
|
222
|
+
systemPrompt: string;
|
|
223
|
+
/**
|
|
224
|
+
* The per-run request. Required by the definition (`minLength: 1`). Same
|
|
225
|
+
* `{{input.<name>}}` placeholders as `systemPrompt`.
|
|
226
|
+
*/
|
|
227
|
+
userPrompt: string;
|
|
228
|
+
/**
|
|
229
|
+
* The values the agent gets, by YOUR name for each one — e.g.
|
|
230
|
+
* `{ body: input('body') }`. These become the node's `agentInputVariables`
|
|
231
|
+
* descriptor array (`{ id, type, binding }`, the shape 48 of 53 deployed instances
|
|
232
|
+
* carry) and the `agent.json`'s `inputSchema`.
|
|
233
|
+
*
|
|
234
|
+
* **The name is yours only in this file.** Both emitted artifacts carry the
|
|
235
|
+
* PLATFORM's name — the bound reference's path, `__`-joined
|
|
236
|
+
* (`out('prepare','claimRef')` → `prepare__output__claimRef`) — because that is what
|
|
237
|
+
* the runtime keys the agent's JobArguments by, and an `agent.json` speaking any
|
|
238
|
+
* other name templates against nothing. You never write the long form.
|
|
239
|
+
*
|
|
240
|
+
* **Reference each one in a prompt as `{{input.<name>}}`.** Not decoration: the
|
|
241
|
+
* platform's deployed input list is not necessarily this array. flow-v1's
|
|
242
|
+
* `preDeriveAgentInputDefinitions` pre-pass scans the node's PROMPTS for `$vars.*`
|
|
243
|
+
* references, merges what it finds with this list, and — when its caller asks for
|
|
244
|
+
* pruning — DROPS an entry no prompt reference points at. A referenced entry
|
|
245
|
+
* survives every one of those paths; an unreferenced one survives only some.
|
|
246
|
+
* `check` warns when none of them is referenced, which is the case where the agent
|
|
247
|
+
* would arrive with no arguments at all.
|
|
248
|
+
*
|
|
249
|
+
* Two shapes have no platform name and are handled rather than renamed:
|
|
250
|
+
*
|
|
251
|
+
* - a **literal** (`{ tier: 'Enterprise' }`) is INLINED into both prompts — there
|
|
252
|
+
* is no argument for one, so a token could never substitute;
|
|
253
|
+
* - a **computed expression** is refused by `check`
|
|
254
|
+
* (`INLINE_AGENT_COMPOSITE_INPUT`): the platform names one argument per
|
|
255
|
+
* reference, so an expression spanning several has none. Compute it in a
|
|
256
|
+
* `script` step first and bind that step's output.
|
|
257
|
+
*/
|
|
258
|
+
inputs?: Record<string, unknown>;
|
|
259
|
+
/**
|
|
260
|
+
* The fields the agent must return, and their types — e.g.
|
|
261
|
+
* `{ category: 'string', priority: 'string' }`. These become the node's
|
|
262
|
+
* `agentOutputVariables` descriptor array AND the emitted `agent.json`'s
|
|
263
|
+
* `outputSchema`, and they are what makes `out('<step>', 'category')` a checkable
|
|
264
|
+
* read.
|
|
265
|
+
*
|
|
266
|
+
* Defaults to the definition's own default, `{ content: 'string' }` — which is
|
|
267
|
+
* the toy scaffold shape, so declare something real if the flow reads fields.
|
|
268
|
+
*
|
|
269
|
+
* @enforcedBy INLINE_AGENT_READ_UNKNOWN_FIELD A read outside the declared set is
|
|
270
|
+
* undefined on every rung and on the platform.
|
|
271
|
+
*/
|
|
272
|
+
returns?: Record<string, InlineAgentFieldType>;
|
|
273
|
+
/**
|
|
274
|
+
* The agent's own directory name — a UUID. The node carries it as `source`, and
|
|
275
|
+
* the platform resolves the agent's configuration at `<source>/agent.json`
|
|
276
|
+
* relative to the project (flow-v1 emits `entryPoint: <source>/agent.json`), so
|
|
277
|
+
* the compiler writes that file next to the `.flow`.
|
|
278
|
+
*
|
|
279
|
+
* Omit it and one is derived from the flow id + step name, so a given flow emits
|
|
280
|
+
* the same uuid every time (a random one would make every compile a diff).
|
|
281
|
+
*/
|
|
282
|
+
source?: string;
|
|
283
|
+
/** Sampling temperature, 0–1. The definition's range; omit for the model's default. */
|
|
284
|
+
temperature?: number;
|
|
285
|
+
/** Max tokens in one response, 0–16384. */
|
|
286
|
+
maxTokenPerResponse?: number;
|
|
287
|
+
/**
|
|
288
|
+
* The model's own context ceiling, e.g. `128000`.
|
|
289
|
+
*
|
|
290
|
+
* @deprecated Has no effect and is not emitted. Studio Web derives it from the
|
|
291
|
+
* selected model each time the agent is opened, and the sidecar has no field
|
|
292
|
+
* for it.
|
|
293
|
+
*/
|
|
294
|
+
modelMaxTokens?: number;
|
|
295
|
+
/** How many tool-calling rounds the agent may take, 1–100. */
|
|
296
|
+
maxIterations?: number;
|
|
297
|
+
/**
|
|
298
|
+
* The harness the agent runs on — `'standard'` (the default) or
|
|
299
|
+
* `'advanced'`, written to the `agent.json`'s `settings.mode`. It does not
|
|
300
|
+
* change the node's version: every inline agent emits the bundle's newest
|
|
301
|
+
* `uipath.agent.autonomous` definition (1.4).
|
|
302
|
+
*/
|
|
303
|
+
mode?: 'standard' | 'advanced';
|
|
304
|
+
/**
|
|
305
|
+
* Safety rails over the agent's inputs, outputs, LLM calls and tools — the
|
|
306
|
+
* platform's own array shape ({@link AgentGuardrail}), carried in the
|
|
307
|
+
* `agent.json` (every bundled definition declares the input).
|
|
308
|
+
*
|
|
309
|
+
* ```ts
|
|
310
|
+
* guardrails: [{
|
|
311
|
+
* id: 'no-pii', $guardrailType: 'custom', name: 'Block PII',
|
|
312
|
+
* selector: { scopes: ['Agent'] },
|
|
313
|
+
* action: { $actionType: 'block', reason: 'PII detected' },
|
|
314
|
+
* enabledForEvals: true,
|
|
315
|
+
* rules: [{ $ruleType: 'word', fieldSelector: { $selectorType: 'all' },
|
|
316
|
+
* operator: 'matchesRegex', value: '\\d{3}-\\d{2}-\\d{4}' }],
|
|
317
|
+
* }]
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
guardrails?: AgentGuardrail[];
|
|
321
|
+
/**
|
|
322
|
+
* Attach an episodic memory so the agent learns from past runs — one
|
|
323
|
+
* {@link AgentMemoryRef}, wired to the agent's `memory` handle (declared by
|
|
324
|
+
* the bundled 1.4 definition, which every inline agent uses).
|
|
325
|
+
*/
|
|
326
|
+
memory?: AgentMemoryRef;
|
|
327
|
+
/**
|
|
328
|
+
* GROUND the agent on tenant knowledge — one or more Context Grounding
|
|
329
|
+
* (semantic) indexes, wired to the agent's own `context` handle.
|
|
330
|
+
*
|
|
331
|
+
* ```ts
|
|
332
|
+
* inlineAgent({
|
|
333
|
+
* model: 'gpt-5.4',
|
|
334
|
+
* systemPrompt: 'You decide billing disputes from the SOPs. Return a result conforming to the output '
|
|
335
|
+
* + 'schema. determination: valid | invalid | needs_review. rationale: the SOP rule that decided it.',
|
|
336
|
+
* userPrompt: 'Dispute: {{input.description}}',
|
|
337
|
+
* inputs: { description: input('disputeDescription') },
|
|
338
|
+
* returns: { determination: 'string', rationale: 'string' },
|
|
339
|
+
* context: [{
|
|
340
|
+
* name: 'Billing Dispute SOP Index',
|
|
341
|
+
* id: 'cc45b9b4-dbf6-47b3-40ac-08debc0cec5b',
|
|
342
|
+
* folderPath: 'Shared/uipath-maestro-flow/BillingDispute',
|
|
343
|
+
* query: 'billing dispute resolution policy',
|
|
344
|
+
* }],
|
|
345
|
+
* })
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* Each entry becomes its own NODE —
|
|
349
|
+
* `uipath.agent.resource.context.index.<slug>.<id>` — joined to the agent by an
|
|
350
|
+
* edge out of the agent's `context` port. That is the platform's own shape: the
|
|
351
|
+
* agent definition declares the handle with
|
|
352
|
+
* `allowedTargets: [{ nodeType: 'uipath.agent.resource.context.*' }]`, and the
|
|
353
|
+
* index's definition declares the mirror
|
|
354
|
+
* (`allowedSources: [{ nodeType: 'uipath.agent.autonomous', handleId: 'context' }]`,
|
|
355
|
+
* `maxConnections: 1`). Nothing is a binding: the index's identity is IN the node
|
|
356
|
+
* type, exactly as a published agent's release key is.
|
|
357
|
+
*
|
|
358
|
+
* **Both identifiers are needed and neither is derivable.** The node type carries
|
|
359
|
+
* a slug of the name AND the index's uuid; the node's inputs carry `indexName` +
|
|
360
|
+
* `indexId` again, because the designer reads one and the runtime the other. Find
|
|
361
|
+
* them together — the uuid is the tail of the registry node type:
|
|
362
|
+
*
|
|
363
|
+
* ```bash
|
|
364
|
+
* uip maestro flow registry search "<index name>" --output json
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* **Grounding is a CLOUD-side capability.** An offline run has no retrieval
|
|
368
|
+
* service to reach, so its answer is ungrounded
|
|
369
|
+
* however this is configured — which is why an offline rung can only assert the
|
|
370
|
+
* WIRING and a live rung only that the agent answered. Say so in a task rather
|
|
371
|
+
* than letting a green rung imply retrieval happened.
|
|
372
|
+
*/
|
|
373
|
+
context?: ContextIndexRef | ContextIndexRef[];
|
|
374
|
+
/**
|
|
375
|
+
* Give the agent TOOLS — capabilities it may call while reasoning, wired to
|
|
376
|
+
* the agent's own `tool` handle. Each entry becomes its own resource NODE
|
|
377
|
+
* (`uipath.agent.resource.tool.<kind>…`), joined to the agent by an edge out
|
|
378
|
+
* of its `tool` port — the same artifact shape as `context`.
|
|
379
|
+
*
|
|
380
|
+
* ```ts
|
|
381
|
+
* tools: [
|
|
382
|
+
* { kind: 'builtin', tool: 'summarize' },
|
|
383
|
+
* { kind: 'connector', connector: 'uipath-atlassian-jira', operation: 'create-issue',
|
|
384
|
+
* connection: 'jira', folder: 'shared' }, // bindings.json labels, both required
|
|
385
|
+
* { kind: 'process', key: '6235d64e-b190-4b7a-8918-723df964c068',
|
|
386
|
+
* name: 'Create TestCase', folderPath: 'Shared',
|
|
387
|
+
* inputs: { title: 'string' }, returns: { id: 'string' } },
|
|
388
|
+
* ]
|
|
389
|
+
* ```
|
|
390
|
+
*
|
|
391
|
+
* WHEN a tool runs is the model's decision at run time — nothing in the flow
|
|
392
|
+
* calls it. Locally that means tool nodes are never stepped through (they are
|
|
393
|
+
* artifacts, not steps), so no local rung proves a tool was USED — only that
|
|
394
|
+
* the wiring and shapes are right. Say so in any task that scores this.
|
|
395
|
+
*/
|
|
396
|
+
tools?: ToolRef | ToolRef[];
|
|
397
|
+
/**
|
|
398
|
+
* Let the agent ESCALATE to a human mid-run — an Action Center app task,
|
|
399
|
+
* wired to the agent's own `escalation` handle (its TOP port).
|
|
400
|
+
*
|
|
401
|
+
* ```ts
|
|
402
|
+
* escalation: {
|
|
403
|
+
* name: 'ContentReview',
|
|
404
|
+
* description: 'Escalate uncertain content to a human reviewer',
|
|
405
|
+
* app: {
|
|
406
|
+
* key: '454921d6-137f-4897-943a-1ebf29b15f80',
|
|
407
|
+
* name: 'ContentReviewApp',
|
|
408
|
+
* folderPath: 'Shared',
|
|
409
|
+
* inputs: { ContentText: 'string' },
|
|
410
|
+
* outputs: { ReviewDecision: 'string' },
|
|
411
|
+
* },
|
|
412
|
+
* recipients: ['reviewer@example.com'],
|
|
413
|
+
* outcomes: ['approve', 'reject'],
|
|
414
|
+
* }
|
|
415
|
+
* ```
|
|
416
|
+
*
|
|
417
|
+
* The emitted node type is `uipath.agent.resource.escalation.coded-action-app`
|
|
418
|
+
* — the registry's CURRENT spelling (the bare `….escalation` is the pre-split
|
|
419
|
+
* era; the agent's handle accepts both, and `registry get` resolves only the
|
|
420
|
+
* suffixed one). The other variant, `escalation.quick-form`, is feature-gated
|
|
421
|
+
* off on this tenant and not authorable.
|
|
422
|
+
*/
|
|
423
|
+
escalation?: EscalationRef | EscalationRef[];
|
|
424
|
+
}
|
|
425
|
+
declare module '../../../core/actions.js' {
|
|
426
|
+
interface FlowActionSpecs {
|
|
427
|
+
/** The spec {@link createOutgoingCall} builds. */
|
|
428
|
+
createOutgoingCall: {
|
|
429
|
+
inputs: CreateOutgoingCallInputs;
|
|
430
|
+
};
|
|
431
|
+
/** The spec {@link endCall} builds. */
|
|
432
|
+
endCall: {
|
|
433
|
+
inputs: EndCallInputs;
|
|
434
|
+
};
|
|
435
|
+
/** The spec {@link voiceAgent} builds. */
|
|
436
|
+
voiceAgent: {
|
|
437
|
+
inputs: VoiceAgentInputs;
|
|
438
|
+
};
|
|
439
|
+
/** The spec {@link conversationalAgent} builds. */
|
|
440
|
+
conversationalAgent: {
|
|
441
|
+
inputs: ConversationalAgentInputs;
|
|
442
|
+
};
|
|
443
|
+
/** The spec {@link inlineAgent} builds. */
|
|
444
|
+
inlineAgent: {
|
|
445
|
+
inputs: InlineAgentInputs;
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The process family's rules: what is decidable from the call to `rpaWorkflow()`,
|
|
3
|
-
* `apiWorkflow()`, `publishedFunction()` or `
|
|
3
|
+
* `apiWorkflow()`, `publishedFunction()`, `agenticProcess()` or `agent()` (the three
|
|
4
4
|
* identifiers, the in-solution location, `returns`), and a read of each one's
|
|
5
5
|
* result. Moved from check.ts in Phase 4 of docs/NODE_TYPE_ARCHITECTURE_DESIGN.md;
|
|
6
6
|
* codes and messages unchanged. Whether the process exists, takes these
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { DiagnosticCatalog } from '../../../core/nodes/family.js';
|
|
10
10
|
import type { FieldsRead, OutputPathRead } from '../../../core/nodes/node-type.js';
|
|
11
11
|
import type { FlowCheckContext } from '../../../flow-node-type.js';
|
|
12
|
-
import type { AgenticProcessInputs, ApiWorkflowInputs, PublishedFunctionInputs, RpaWorkflowInputs } from './spec.js';
|
|
12
|
+
import type { AgentInputs, AgenticProcessInputs, ApiWorkflowInputs, PublishedFunctionInputs, RpaWorkflowInputs } from './spec.js';
|
|
13
13
|
export declare const PROCESS_DIAGNOSTICS: DiagnosticCatalog;
|
|
14
14
|
/**
|
|
15
15
|
* Check an `rpaWorkflow(...)` call.
|
|
@@ -110,3 +110,41 @@ export declare function checkApiWorkflowRead({ node: name, field, rest, reader:
|
|
|
110
110
|
* non-empty VALUE is not something any offline gate can promise.
|
|
111
111
|
*/
|
|
112
112
|
export declare function checkAgenticProcessRead({ node: name, field, rest, reader: step }: OutputPathRead, spec: AgenticProcessInputs, report: (code: string, message: string, suggestion?: string) => void): void;
|
|
113
|
+
/**
|
|
114
|
+
* Check an `agent(...)` call — a published or in-solution agent (coded or
|
|
115
|
+
* low-code).
|
|
116
|
+
*
|
|
117
|
+
* WHAT THESE RULES CAN AND CANNOT SEE. Whether the agent exists, which kind it is,
|
|
118
|
+
* and what it returns all live on the tenant. So these cover what is decidable from
|
|
119
|
+
* the call — and two of them are the exact classes v1's own baseline on this family
|
|
120
|
+
* fails on, which is why they are errors rather than warnings:
|
|
121
|
+
*
|
|
122
|
+
* - **A reference to nothing.** 5 of 16 `skill-flow-coded-agent` runs in the
|
|
123
|
+
* 06-29 → 07-20 window emitted an agent node whose `resourceKey` was a LOCAL
|
|
124
|
+
* project id and whose `folderPath` was `""`, and faulted at job start with
|
|
125
|
+
* `[170007] … HTTP 404 "The job's associated process could not be found"`. A
|
|
126
|
+
* blank `name` or `folderPath` is that flow, caught before a tenant round trip.
|
|
127
|
+
* - **The empty-input floor.** `inputs` is required by the type, so `{}` is the only
|
|
128
|
+
* way to reach it, and it is worth saying what the platform then does — see
|
|
129
|
+
* `AGENT_EMPTY_INPUT_FLOOR`.
|
|
130
|
+
*
|
|
131
|
+
* What no rule here can see: whether the agent's ANSWER is right. That is CP-3's
|
|
132
|
+
* ruling — a green live rung means a model responded with the declared shape — and
|
|
133
|
+
* the gate that does cover a flow FAKING an answer is an offline `replays:` seed
|
|
134
|
+
* asserting the exact unfixtured value, not a check.
|
|
135
|
+
*/
|
|
136
|
+
export declare function checkAgent(inputs: AgentInputs | undefined, ctx: FlowCheckContext): void;
|
|
137
|
+
/**
|
|
138
|
+
* A read of a published agent's output: `out('<step>', '<field>')`.
|
|
139
|
+
*
|
|
140
|
+
* The three mistakes are api-workflow's and agentic-process's, plus a fourth this
|
|
141
|
+
* family owns: a read whose CASE differs from the declared field. That is worth its
|
|
142
|
+
* own message because for a while it was a live-only defect rather than a mistake —
|
|
143
|
+
* a poller that read the job through `uip agent run status` got a PascalCased
|
|
144
|
+
* envelope, so `output.Count` was right live and wrong offline while
|
|
145
|
+
* `output.count` was the reverse (flow-builder-sdk #122). Now the agent's own field
|
|
146
|
+
* names arrive verbatim and the wrong case is simply undefined; naming it as a CASE
|
|
147
|
+
* problem rather than an unknown field is the difference between a two-second fix and
|
|
148
|
+
* a re-read of the registry.
|
|
149
|
+
*/
|
|
150
|
+
export declare function checkAgentRead({ node: name, field, rest, reader: step }: OutputPathRead, spec: AgentInputs, report: (code: string, message: string, suggestion?: string) => void): void;
|