@uipath/maestro-builder-sdk 6.42.0 → 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.
Files changed (52) hide show
  1. package/dist/api-index.md +99 -99
  2. package/dist/api-members.md +307 -307
  3. package/dist/check.d.ts +0 -19
  4. package/dist/check.js +40 -1036
  5. package/dist/compile-cli.js +2 -1
  6. package/dist/core/actions.d.ts +1 -713
  7. package/dist/core/actions.js +0 -193
  8. package/dist/core/agent-sidecar.d.ts +186 -0
  9. package/dist/core/agent-sidecar.js +409 -0
  10. package/dist/core/agent-tool-resources.d.ts +62 -0
  11. package/dist/core/agent-tool-resources.js +81 -0
  12. package/dist/{config.js → core/connector-configuration.js} +2 -2
  13. package/dist/core/node-id-placeholder.d.ts +8 -0
  14. package/dist/core/node-id-placeholder.js +10 -0
  15. package/dist/core/ts-literal.d.ts +6 -0
  16. package/dist/core/ts-literal.js +15 -0
  17. package/dist/core/typed-raw-node.js +0 -5
  18. package/dist/decompile.js +34 -822
  19. package/dist/flow-node-registry.js +2 -1
  20. package/dist/flow-node-type.d.ts +130 -6
  21. package/dist/flow-sdk.d.ts +1 -0
  22. package/dist/flow-sdk.js +1 -0
  23. package/dist/nodes/agent/flow/check.d.ts +88 -0
  24. package/dist/nodes/agent/flow/check.js +873 -0
  25. package/dist/nodes/agent/flow/factories.d.ts +134 -0
  26. package/dist/nodes/agent/flow/factories.js +143 -0
  27. package/dist/nodes/agent/flow/family.d.ts +3 -0
  28. package/dist/nodes/agent/flow/family.js +8 -0
  29. package/dist/nodes/agent/flow/index.d.ts +3 -0
  30. package/dist/nodes/agent/flow/index.js +3 -0
  31. package/dist/nodes/agent/flow/inline-agent-lift.d.ts +44 -0
  32. package/dist/nodes/agent/flow/inline-agent-lift.js +572 -0
  33. package/dist/nodes/agent/flow/inline-agent.d.ts +15 -0
  34. package/dist/nodes/agent/flow/inline-agent.js +526 -0
  35. package/dist/nodes/agent/flow/node-type.d.ts +20 -0
  36. package/dist/nodes/agent/flow/node-type.js +422 -0
  37. package/dist/nodes/agent/flow/resources.d.ts +502 -0
  38. package/dist/nodes/agent/flow/resources.js +1409 -0
  39. package/dist/nodes/agent/flow/spec.d.ts +448 -0
  40. package/dist/nodes/agent/flow/spec.js +1 -0
  41. package/dist/nodes/process/flow/check.d.ts +40 -2
  42. package/dist/nodes/process/flow/check.js +156 -0
  43. package/dist/nodes/process/flow/factories.d.ts +58 -3
  44. package/dist/nodes/process/flow/factories.js +59 -2
  45. package/dist/nodes/process/flow/node-type.d.ts +4 -1
  46. package/dist/nodes/process/flow/node-type.js +181 -10
  47. package/dist/nodes/process/flow/spec.d.ts +112 -5
  48. package/dist/serialize.d.ts +9 -54
  49. package/dist/serialize.js +47 -2763
  50. package/package.json +2 -2
  51. /package/dist/{config.d.ts → core/connector-configuration.d.ts} +0 -0
  52. /package/dist/{ixp-definition.json → core/ixp-definition.json} +0 -0
@@ -0,0 +1,134 @@
1
+ /**
2
+ * The agents family's factories — `createOutgoingCall()`, `endCall()`,
3
+ * `voiceAgent()`, `conversationalAgent()` and `inlineAgent()`. Moved from core/actions.ts in
4
+ * Phase 4 of docs/NODE_TYPE_ARCHITECTURE_DESIGN.md; the package entry
5
+ * re-exports them.
6
+ */
7
+ import { type ActionSpec } from '../../../core/actions.js';
8
+ import type { ConversationalAgentInputs, CreateOutgoingCallInputs, EndCallInputs, InlineAgentInputs, VoiceAgentInputs } from './spec.js';
9
+ /**
10
+ * Place an outgoing phone call
11
+ * (`uipath.conversational.voice.create-outgoing-call`) and get back the
12
+ * `callContext` every other voice step is keyed by.
13
+ *
14
+ * ```ts
15
+ * .step('dial', createOutgoingCall({ from: '+15550001111', to: input('customerPhone') }))
16
+ * .step('talk', voiceAgent({
17
+ * systemPrompt: 'Confirm the delivery window, then thank them.',
18
+ * callContext: out('dial', 'callContext'),
19
+ * }))
20
+ * ```
21
+ *
22
+ * @param inputs - The provisioned `from` number and the `to` number to dial.
23
+ * @returns An action spec to pass to `.step(...)`.
24
+ */
25
+ export declare function createOutgoingCall(inputs: CreateOutgoingCallInputs): ActionSpec;
26
+ /**
27
+ * Hang up (`uipath.conversational.voice.end-call`). Reads
28
+ * `out('<step>', 'ended')`.
29
+ *
30
+ * @param inputs - The `callContext` of the call to end.
31
+ * @returns An action spec to pass to `.step(...)`.
32
+ */
33
+ export declare function endCall(inputs: EndCallInputs): ActionSpec;
34
+ /**
35
+ * Put a VOICE agent on a live call (`uipath.agent.voice`) — it speaks and
36
+ * listens for one turn, then the flow continues.
37
+ *
38
+ * ```ts
39
+ * .trigger(voiceTrigger())
40
+ * .step('greet', voiceAgent({
41
+ * systemPrompt: 'Greet {{input.customerName}} and find out why they called.',
42
+ * inputs: { customerName: input('customerName') },
43
+ * callContext: out('start', 'callContext'),
44
+ * voice: { model: 'gemini-3.1-flash-live-preview', persona: 'Kore' },
45
+ * }))
46
+ * ```
47
+ *
48
+ * Like `inlineAgent`, compile emits the node PLUS a stable
49
+ * `<source>/agent.json` sidecar. Unlike it, the turn's content comes from the
50
+ * call rather than from a user-prompt argument. Flow context can still be
51
+ * supplied through `inputs` and referenced from the system prompt. There are no
52
+ * declared `returns`: read the turn back as
53
+ * `out('<step>', 'uipath__agent_response_messages')`.
54
+ *
55
+ * @param inputs - The instructions, the call to join, and how the agent sounds.
56
+ * @returns An action spec to pass to `.step(...)`.
57
+ */
58
+ export declare function voiceAgent(inputs: VoiceAgentInputs): ActionSpec;
59
+ /**
60
+ * A CONVERSATIONAL agent (`uipath.agent.conversational`) — it answers one turn
61
+ * of a live chat, reading the transcript rather than flow arguments.
62
+ *
63
+ * ```ts
64
+ * .trigger(conversationTrigger())
65
+ * .step('listen', waitForMessage({ conversationId: out('start', 'conversationId') }))
66
+ * .step('reply', conversationalAgent({
67
+ * model: 'gpt-5.4',
68
+ * systemPrompt: 'You are a support agent. Be brief.',
69
+ * settings: { context: out('listen', 'conversationContext') },
70
+ * }))
71
+ * ```
72
+ *
73
+ * The reply is `out('<step>', 'uipath__agent_response_messages')` — the
74
+ * platform's own field name. Like `inlineAgent`, compile emits the node plus a
75
+ * stable `<source>/agent.json` sidecar.
76
+ *
77
+ * `sendMessage` is the alternative when the flow (not a model) decides what to
78
+ * say; this factory is for when the model does.
79
+ *
80
+ * @param inputs - The model, the instructions, and how the turn is bound.
81
+ * @returns An action spec to pass to `.step(...)`.
82
+ */
83
+ export declare function conversationalAgent(inputs: ConversationalAgentInputs): ActionSpec;
84
+ /**
85
+ * Declare an INLINE AUTONOMOUS AGENT — an agent defined inside this flow's own
86
+ * project rather than published to Orchestrator (`uipath.agent.autonomous`,
87
+ * `Orchestrator.StartInlineAgentJob`).
88
+ *
89
+ * @remarks
90
+ * **Two artifacts, not one.** The node carries the prompts and the variable
91
+ * descriptors, and it points at a directory — `source` — where the platform expects
92
+ * the agent's own configuration (flow-v1 emits `entryPoint: <source>/agent.json`).
93
+ * So `compile` writes `<source>/agent.json` beside the `.flow`, built from the same
94
+ * fields. Nothing to assemble by hand; `source` defaults to a uuid derived from the
95
+ * flow id and step name so a recompile is not a diff.
96
+ *
97
+ * **How this differs from `agent()`.** That one references something already
98
+ * published and started as an Orchestrator job; this one IS the definition, and the
99
+ * platform runs it inside the flow's own debug/publish context. The practical
100
+ * consequences: there is no folder, no release key and no binding pair here — and
101
+ * no `uip` verb that starts one headlessly either.
102
+ *
103
+ * ── the live bar, stated ─────────────────────────────────────────────────────────
104
+ * Weaker than `agent()`'s, and in a specific way. `Orchestrator.StartInlineAgentJob`
105
+ * is Studio-Web-debug-only, so there is no Orchestrator job to point at and no
106
+ * headless verb that starts one. No local runner currently calls a model for this
107
+ * node either — an offline run asserts the WIRING and the declared `returns` shape,
108
+ * never that a model answered. Two differences would remain for any runner that did
109
+ * call one: knowledge grounding (a context handle) is a cloud-side index an offline
110
+ * path does not have, so the call would be ungrounded; and the node's `model` would
111
+ * have to be substituted for one reachable headlessly. Answer quality stays on the
112
+ * offline `expect` seeds; real behaviour needs a Studio Web debug run.
113
+ *
114
+ * @example
115
+ * **Classify an email with an agent defined inline**
116
+ * ```ts
117
+ * .step('triage', inlineAgent({
118
+ * model: 'gpt-5.4',
119
+ * systemPrompt:
120
+ * 'You are a support triage assistant. Classify the email into exactly one ' +
121
+ * 'category and one priority. Return a result conforming to the output schema. ' +
122
+ * 'category: billing | technical | account. priority: low | normal | high.',
123
+ * userPrompt: 'Classify this email:\n{{input.body}}',
124
+ * inputs: { body: input('body') },
125
+ * returns: { category: 'string', priority: 'string' },
126
+ * }))
127
+ * .return({ category: out('triage', 'category') })
128
+ * ```
129
+ *
130
+ * @param inputs - The agent defined in this project: its `model`,
131
+ * `systemPrompt`, `userPrompt`, and the `returns` fields it must produce.
132
+ * @returns An action spec to pass to `.step(name, …)`.
133
+ */
134
+ export declare function inlineAgent(inputs: InlineAgentInputs): ActionSpec;
@@ -0,0 +1,143 @@
1
+ /**
2
+ * The agents family's factories — `createOutgoingCall()`, `endCall()`,
3
+ * `voiceAgent()`, `conversationalAgent()` and `inlineAgent()`. Moved from core/actions.ts in
4
+ * Phase 4 of docs/NODE_TYPE_ARCHITECTURE_DESIGN.md; the package entry
5
+ * re-exports them.
6
+ */
7
+ import { builtinActionSpec } from '../../../core/actions.js';
8
+ /**
9
+ * Place an outgoing phone call
10
+ * (`uipath.conversational.voice.create-outgoing-call`) and get back the
11
+ * `callContext` every other voice step is keyed by.
12
+ *
13
+ * ```ts
14
+ * .step('dial', createOutgoingCall({ from: '+15550001111', to: input('customerPhone') }))
15
+ * .step('talk', voiceAgent({
16
+ * systemPrompt: 'Confirm the delivery window, then thank them.',
17
+ * callContext: out('dial', 'callContext'),
18
+ * }))
19
+ * ```
20
+ *
21
+ * @param inputs - The provisioned `from` number and the `to` number to dial.
22
+ * @returns An action spec to pass to `.step(...)`.
23
+ */
24
+ export function createOutgoingCall(inputs) {
25
+ return builtinActionSpec({ kind: 'createOutgoingCall', inputs });
26
+ }
27
+ /**
28
+ * Hang up (`uipath.conversational.voice.end-call`). Reads
29
+ * `out('<step>', 'ended')`.
30
+ *
31
+ * @param inputs - The `callContext` of the call to end.
32
+ * @returns An action spec to pass to `.step(...)`.
33
+ */
34
+ export function endCall(inputs) {
35
+ return builtinActionSpec({ kind: 'endCall', inputs });
36
+ }
37
+ /**
38
+ * Put a VOICE agent on a live call (`uipath.agent.voice`) — it speaks and
39
+ * listens for one turn, then the flow continues.
40
+ *
41
+ * ```ts
42
+ * .trigger(voiceTrigger())
43
+ * .step('greet', voiceAgent({
44
+ * systemPrompt: 'Greet {{input.customerName}} and find out why they called.',
45
+ * inputs: { customerName: input('customerName') },
46
+ * callContext: out('start', 'callContext'),
47
+ * voice: { model: 'gemini-3.1-flash-live-preview', persona: 'Kore' },
48
+ * }))
49
+ * ```
50
+ *
51
+ * Like `inlineAgent`, compile emits the node PLUS a stable
52
+ * `<source>/agent.json` sidecar. Unlike it, the turn's content comes from the
53
+ * call rather than from a user-prompt argument. Flow context can still be
54
+ * supplied through `inputs` and referenced from the system prompt. There are no
55
+ * declared `returns`: read the turn back as
56
+ * `out('<step>', 'uipath__agent_response_messages')`.
57
+ *
58
+ * @param inputs - The instructions, the call to join, and how the agent sounds.
59
+ * @returns An action spec to pass to `.step(...)`.
60
+ */
61
+ export function voiceAgent(inputs) {
62
+ return builtinActionSpec({ kind: 'voiceAgent', inputs });
63
+ }
64
+ /**
65
+ * A CONVERSATIONAL agent (`uipath.agent.conversational`) — it answers one turn
66
+ * of a live chat, reading the transcript rather than flow arguments.
67
+ *
68
+ * ```ts
69
+ * .trigger(conversationTrigger())
70
+ * .step('listen', waitForMessage({ conversationId: out('start', 'conversationId') }))
71
+ * .step('reply', conversationalAgent({
72
+ * model: 'gpt-5.4',
73
+ * systemPrompt: 'You are a support agent. Be brief.',
74
+ * settings: { context: out('listen', 'conversationContext') },
75
+ * }))
76
+ * ```
77
+ *
78
+ * The reply is `out('<step>', 'uipath__agent_response_messages')` — the
79
+ * platform's own field name. Like `inlineAgent`, compile emits the node plus a
80
+ * stable `<source>/agent.json` sidecar.
81
+ *
82
+ * `sendMessage` is the alternative when the flow (not a model) decides what to
83
+ * say; this factory is for when the model does.
84
+ *
85
+ * @param inputs - The model, the instructions, and how the turn is bound.
86
+ * @returns An action spec to pass to `.step(...)`.
87
+ */
88
+ export function conversationalAgent(inputs) {
89
+ return builtinActionSpec({ kind: 'conversationalAgent', inputs });
90
+ }
91
+ /**
92
+ * Declare an INLINE AUTONOMOUS AGENT — an agent defined inside this flow's own
93
+ * project rather than published to Orchestrator (`uipath.agent.autonomous`,
94
+ * `Orchestrator.StartInlineAgentJob`).
95
+ *
96
+ * @remarks
97
+ * **Two artifacts, not one.** The node carries the prompts and the variable
98
+ * descriptors, and it points at a directory — `source` — where the platform expects
99
+ * the agent's own configuration (flow-v1 emits `entryPoint: <source>/agent.json`).
100
+ * So `compile` writes `<source>/agent.json` beside the `.flow`, built from the same
101
+ * fields. Nothing to assemble by hand; `source` defaults to a uuid derived from the
102
+ * flow id and step name so a recompile is not a diff.
103
+ *
104
+ * **How this differs from `agent()`.** That one references something already
105
+ * published and started as an Orchestrator job; this one IS the definition, and the
106
+ * platform runs it inside the flow's own debug/publish context. The practical
107
+ * consequences: there is no folder, no release key and no binding pair here — and
108
+ * no `uip` verb that starts one headlessly either.
109
+ *
110
+ * ── the live bar, stated ─────────────────────────────────────────────────────────
111
+ * Weaker than `agent()`'s, and in a specific way. `Orchestrator.StartInlineAgentJob`
112
+ * is Studio-Web-debug-only, so there is no Orchestrator job to point at and no
113
+ * headless verb that starts one. No local runner currently calls a model for this
114
+ * node either — an offline run asserts the WIRING and the declared `returns` shape,
115
+ * never that a model answered. Two differences would remain for any runner that did
116
+ * call one: knowledge grounding (a context handle) is a cloud-side index an offline
117
+ * path does not have, so the call would be ungrounded; and the node's `model` would
118
+ * have to be substituted for one reachable headlessly. Answer quality stays on the
119
+ * offline `expect` seeds; real behaviour needs a Studio Web debug run.
120
+ *
121
+ * @example
122
+ * **Classify an email with an agent defined inline**
123
+ * ```ts
124
+ * .step('triage', inlineAgent({
125
+ * model: 'gpt-5.4',
126
+ * systemPrompt:
127
+ * 'You are a support triage assistant. Classify the email into exactly one ' +
128
+ * 'category and one priority. Return a result conforming to the output schema. ' +
129
+ * 'category: billing | technical | account. priority: low | normal | high.',
130
+ * userPrompt: 'Classify this email:\n{{input.body}}',
131
+ * inputs: { body: input('body') },
132
+ * returns: { category: 'string', priority: 'string' },
133
+ * }))
134
+ * .return({ category: out('triage', 'category') })
135
+ * ```
136
+ *
137
+ * @param inputs - The agent defined in this project: its `model`,
138
+ * `systemPrompt`, `userPrompt`, and the `returns` fields it must produce.
139
+ * @returns An action spec to pass to `.step(name, …)`.
140
+ */
141
+ export function inlineAgent(inputs) {
142
+ return builtinActionSpec({ kind: 'inlineAgent', inputs });
143
+ }
@@ -0,0 +1,3 @@
1
+ /** The agents node family, as flow-node-registry.ts lists it: the inline, conversational and voice agents and the voice call steps. */
2
+ import type { FlowNodeFamily } from '../../../flow-node-type.js';
3
+ export declare const agentFlowFamily: FlowNodeFamily;
@@ -0,0 +1,8 @@
1
+ import { AGENT_DIAGNOSTICS } from './check.js';
2
+ import { agentNodeTypes } from './node-type.js';
3
+ export const agentFlowFamily = {
4
+ id: 'agent',
5
+ title: 'Agents',
6
+ types: agentNodeTypes,
7
+ diagnostics: AGENT_DIAGNOSTICS,
8
+ };
@@ -0,0 +1,3 @@
1
+ /** The agents family's public surface, which the package entry re-exports. */
2
+ export * from './spec.js';
3
+ export * from './factories.js';
@@ -0,0 +1,3 @@
1
+ /** The agents family's public surface, which the package entry re-exports. */
2
+ export * from './spec.js';
3
+ export * from './factories.js';
@@ -0,0 +1,44 @@
1
+ import { Expr } from '../../../core/expr.js';
2
+ import type { FlowDeserializeContext, FlowPrintContext } from '../../../flow-node-type.js';
3
+ /** The part of a `.flow` node the lift reads. */
4
+ interface FlowNode {
5
+ id: string;
6
+ type: string;
7
+ typeVersion?: string;
8
+ display?: {
9
+ label?: unknown;
10
+ };
11
+ inputs?: Record<string, unknown>;
12
+ }
13
+ /** Where the agent's own `inputs` go in the option list: the printer writes them, as expressions. */
14
+ declare const INPUT_ROWS: unique symbol;
15
+ /** The lifted agent: its options in factory order, as source, and its input rows. */
16
+ export interface LiftedInlineAgent {
17
+ kind: 'inlineAgent';
18
+ inputs: {
19
+ inputRows: Array<[string, Expr]>;
20
+ options: Array<[string, string | undefined | typeof INPUT_ROWS]>;
21
+ };
22
+ }
23
+ /**
24
+ * An AGENT and its attached resources — the inline autonomous agent, the
25
+ * conversational agent, and the voice agent.
26
+ *
27
+ * The cluster is a node plus artifact nodes on its `tool` / `context` /
28
+ * `escalation` / `memory` handles, so this walks those edges and recovers each
29
+ * resource as an argument rather than as a step (see {@link ARTIFACT_PORTS}).
30
+ *
31
+ * **The author's input NAMES are not recoverable, and that is by design.** The
32
+ * platform does not send an agent the names you declared: it keys each argument
33
+ * by the reference PATH, `__`-joined (`$vars.prep.output` → `prep__output`), and
34
+ * only those flat names survive in the emitted file. Recovery therefore uses
35
+ * them for both the `inputs` keys and the `{{input.…}}` placeholders — the same
36
+ * arguments reach the model, spelled the platform's way. (Node ids are
37
+ * preserved exactly; only these logical names change.)
38
+ */
39
+ export declare function liftInlineAgent(node: FlowNode, ctx: FlowDeserializeContext): LiftedInlineAgent;
40
+ export declare function printInlineAgent(spec: LiftedInlineAgent, ctx: FlowPrintContext): {
41
+ factory: string;
42
+ options: (readonly [string, string | undefined])[];
43
+ };
44
+ export {};