**In Studio Web the builder SDK is built in.** `uip maestro flow check`, `compile`, `decompile` and `merge` run `@uipath/maestro-builder-sdk` inside the page. Install nothing: no `npm` or Node. **The open solution is the workspace.** `/solution` is the Studio Web solution the user has open; never create another, and never copy a project out of it. Each project is a folder `/solution//`. Build there even when the shell starts in `/sandbox`; `.flow-sdk/` source and the final `.flow` too. Create a Flow project only when the user asks for one, never because the request names the flow ("a Maestro Automate called CronCop"): `uip maestro flow init ` creates it through Studio Web and seeds a trigger-only `new.flow`. When the request names no project and a user can answer, ask for its name before you create it. When the user names the flow after you created its project in this conversation, do not create a second project or `.flow`: that is not a rename, and it leaves the first behind. Keep building in it, and tell the user to rename it in Studio Web; you cannot. For `uip maestro flow init`, never pass `--force`. Run `uip maestro flow init --automate` when the request names **Maestro Automate** as the product. A project you fill keeps its type: if the request names Maestro Automate and `/solution//.maestro_automate` is missing, keep building, then tell the user to switch Build as to Maestro Automate. **Edit the open flow.** Each turn's context gives: - `CurrentFile.AbsolutePath` — the open file, for example `/solution/Flow/new.flow`. - `CurrentFile.IsCurrentFileEmpty` — `true` when the open `.flow` has no flow yet. - `CurrentProject.AbsolutePath` — the open project, for example `/solution/Flow`. - `CurrentWorkingDirectory` — the shell's directory; it can differ from the project, so `cd` there first. Choose the target `.flow` in order: 1. The user names an existing `.flow`: edit it. 2. An edit: edit the `.flow` at `CurrentFile.AbsolutePath`. 3. A new flow, and `IsCurrentFileEmpty` is `true`, you just created the project, or the project holds only an empty or trigger-only `new.flow`: fill that `new.flow` ([Lifecycle](#lifecycle)). 4. A different new flow, and `new.flow` already has steps: write a new `.flow` in the open project ([Lifecycle](#lifecycle)). Then tell the user to open it in the Explorer: a write refreshes the canvas only for the open file. Under rule 3 never write a second `.flow`: the request's flow name names no file. A copy the user asks for is fine. In every reference, `` is the target's folder, `` its file name without `.flow`: `new` for `new.flow`, never the flow's name. **The target `.flow` is the single source of truth.** The user can change it on the canvas between turns, so never reuse an earlier turn's `.flow.ts`: decompile a fresh one. **The source lives in `.flow-sdk/`.** `/solution//.flow-sdk/` keeps `.flow.ts` and the `prepare` output; each turn decompiles `.flow.ts` fresh. Merge carries an inline agent's `agent.json` ([`references/brownfield.md`](references/brownfield.md#inline-agents-merge-carries-agentjson)). **Never delete or rename a file under `/solution`:** the file system refuses both; overwrite it instead. **A read-only page refuses every write.** When the page shows "Locked by you" and an Edit button, writes fail, sometimes as `[object Object]`. Ask the user to click Edit, then retry. **The Flow SDK can be off for this user.** When an SDK verb answers `ConfigError` "this host has no way to run …", it is off. Say so, and stop. Every `uip` call prints a harmless `[WARN] [Telemetry] applicationinsights package not available`. ### Commands in Studio Web Commands that differ in Studio Web: | Command | In Studio Web | | --- | --- | | `uip maestro flow check`, `compile`, `decompile`, `merge` | Work, inside the page. `decompile` writes no pipeline helper. Pass `merge` only `--original` and `--strict`: `--baseline-from`, `--bindings` and `--library` are rejected here. `check` refuses a compiled `.flow`: use `validate`. | | `uip maestro flow validate`, `format` | Work. Never `format` a merged file. | | `uip maestro flow registry get`, `search`, `list`, `pull` | Work: the product node registry. | | `uip maestro flow extraction check` | Works: it answers whether the tenant of the session can run an Extract document node. | | `uip maestro registry search`, `describe`, `prepare` | Work: the connector library. Run `prepare` from the project folder. | | `uip maestro registry pull` | Answered by the CLI, with no effect: it confirms the library of the session, ignores its options, and writes no `./connectors/.ts` modules. | | `uip maestro registry path` | Not available: there is no local library cache. | | `uip solution resources add`, `list` | Work. | | `uip solution resources refresh` | Fails: no local `.uipx`. Add connections with `resources add` ([the connector loop](#the-connector-loop-in-studio-web), step 7). | | `uip solution publish`, `uip solution deploy run` | Work. Studio Web packages and signs in for `publish`. | | `uip maestro flow debug "" --inputs '{}'` | Works: a real run of the flow open in the designer. Without `--inputs` it waits on a dialog. | | `uip solution pack`, `upload`, `init` | Not available. Studio Web owns the solution. | | `uip login` | Not available. You are already signed in to the user's tenant. | | `npm`, `node`, the `flow-sdk` bin, `uv`, `uip codedagent` | Not available. Studio Web cannot create a coded agent. | For a command that is not available, use the Studio Web route this guide gives. With no route, tell the user. Integrations with non-UiPath systems use connectors. **Choose the node before writing it.** For an external service or data (weather, Slack, a REST API), run `uip maestro registry search ''`, unless the request names the transport itself ("over HTTP, not a connector" means `http()`). A hit is a connector. `"total": 0` is a miss and means `http()` (not for an external agent: see the table). For another tenant capability (agent, process), run the `uip maestro flow registry search` of that family ([`references/agent.md`](references/agent.md)). For document extraction, default to a published IXP model ([`references/ixp.md`](references/ixp.md)); the Extract document node only when asked for by name or already in the flow ([`references/extract-document-node.md`](references/extract-document-node.md)). A `script()` that returns fixed values is never a stand-in for that step, and `mock()` only marks a capability that the search proved absent. ### The connector loop in Studio Web Run each command from the project folder `/solution/`. `prepare` writes `.flow-sdk/connectors-local/.ts` and `.flow-sdk/bindings.json` there. 1. **Describe the operation:** `uip maestro registry describe --output plain`. The page gives the inputs, outputs, lookup fields and the code to write. 2. **Choose the connection:** `uip is connections list --all-folders --output json`. When more than one connection is `Enabled`, ask the user which one to use. Then pass `--connection-id ` to `prepare`, and report it ([completion output](references/author.md#completion-output) item 5). `prepare` refuses a connection in state `Failed`. 3. **Prepare the action:** `uip maestro registry prepare --action `. For each lookup field, add `--resolve :=`. Then run it again with `-f =` for all of those fields. The hints of `prepare` give the exact next command: run it. 4. **Author with the prepared descriptor**, as the `next:` lines of `prepare` show. The import path is relative to the draft in `.flow-sdk/`: ```ts import { CreateIssue } from './connectors-local/uipath-atlassian-jira.ts'; // … .step('issue', connector(CreateIssue, { /* fields */ }, { connection: 'jira', folder: 'shared' })) ``` With no prepared descriptor, write `connector('', '', inputs, { connection, folder })`. Never import from `./connectors/`: Studio Web writes no modules there. 5. **Check:** `uip maestro flow check .flow-sdk/.flow.ts --source` (edits add `--baseline`: [Lifecycle](#lifecycle)). It also reports the required fields of the project from the prepared page (for example Jira `components`). Run each `prepare` it names, then check again. 6. **A new flow compiles; an edit merges** ([Lifecycle](#lifecycle)). 7. **Add each connection to the solution.** Then read each `connection` row in `bindings_v2.json` of the project. For each row, run `uip solution resources add --source remote --kind connection --cloud-key `. If the file has no such row, use the `resourceKey` of each `ConnectionId` entry in `.flow-sdk/bindings.json`. Without this step, the node shows "The selected resource is not part of the solution". Check the result with `uip solution resources list --source local --output json`. Connectors require [`.flow-sdk/bindings.json`](references/bindings.md). `CONNECTOR_NOT_IN_LIBRARY`, `CONNECTOR_OBJECT_REQUIRED` and `CONNECTOR_OBJECT_NOT_GENERIC` are source fixes, not prepares: [connector-params.md](references/connector-params.md#author-first--check-names-every-prepare-you-owe). Schema-dynamic operations (`loadByDefault`, dependent dropdowns, `customFieldsRequestDetails`) need the prepare `check` names with every required `-f`, and a post-compile cache check: [`references/connector-params.md`](references/connector-params.md#schema-dynamic-operations-the-parent-field-loop). **A new flow** (rule 3) fills the project's `new.flow`: ```bash cd /solution/ uip maestro flow decompile new.flow -o .flow-sdk/new.flow.ts --no-pipeline # Delete its .layout() call so compile lays it out, then add your steps: uip maestro flow check .flow-sdk/new.flow.ts --source uip maestro flow compile .flow-sdk/new.flow.ts -o new.flow uip maestro flow validate new.flow --output json ``` An empty `new.flow` fails `decompile`, and a rule 4 flow has no file yet: write `.flow-sdk/.flow.ts` from [Hello world](#hello-world-flow) and run the rest on `.flow`. If `check` or `validate` fails, fix the source and rerun from `check`. **An edit** round-trips through the target `.flow`. `decompile` stamps the source's first line; `merge` takes it, derives the baseline from the target in memory and writes over the target. Merge keeps layout and sidecars and moves nodes to make room: never move them back or edit the merged `.flow`. ```bash cd /solution/ # 1. Fresh source, every turn uip maestro flow decompile .flow -o .flow-sdk/.flow.ts --no-pipeline # 2. Edit .flow-sdk/.flow.ts narrowly; keep its first line; no .layout() for added steps (builder-sdk#1320). Then check until clean # (refused, or `decompile` stopped: references/brownfield.md#check-only-what-you-changed-check---baseline) uip maestro flow check .flow-sdk/.flow.ts --source --baseline .flow # 3. Merge, stamped only; undo a removal on the canvas ( head -n 1 .flow-sdk/.flow.ts | grep -q '^// @decompiled-from ' || { echo 'no stamp: NOT merged' >&2; exit 1; }; uip maestro flow merge .flow-sdk/.flow.ts --original .flow ) # 4. Validate the file the canvas shows uip maestro flow validate .flow --output json ``` **An Extract document node** takes this round trip as `dynamicExtract()` with its `processorKey` and taxonomy; it needs Studio Web's SDK 6.119.0 or later ([`references/extract-document-node.md`](references/extract-document-node.md)). Valid is top-level `Result` plus `Data.Status: "Valid"`. Treat `Data.Warnings` as failures, except the reviewed shared-connection advisory and `err()` diagnostics. If an edit fails `validate`, fix the source and rerun steps 2 to 4: merge restamped it. To drop an edit: [undo](references/brownfield.md#dropping-an-edit). A refused merge writes nothing. `MERGE_ORIGINAL_CHANGED` or no stamp: [the stamp](references/brownfield.md#the-stamp-and-when-merge-refuses). - **An edit always ends with the merge into the target.** About 400 ms after a write, the canvas reloads the open file. Never run `format` on the merged file: it re-lays out the user's canvas. - **A draft node** (a generic operation with no object picked) that you changed stops the merge: [`references/brownfield.md`](references/brownfield.md#flows-with-draft-nodes-let-merge-compile). - **A node `check` marks `(pre-existing)`** as a probable SDK defect: merge keeps it as saved. Tell the user (UiPath/builder-sdk#1402). - **A flow with connectors** needs each connection in the solution afterwards ([the connector loop](#the-connector-loop-in-studio-web), step 7). Run the flow only for a stated runtime-behavior claim. `uip maestro flow debug "" --inputs '{}'` is a real run: ask per references/operate.md. The reply is plain text and waits up to 120 s (`--timeout `, max 150). `TimedOut` means the run is still going, not that it failed: do not re-run it. If it names the dialog, ask the user to click Save & Debug. First add each connection to the solution (connector loop, step 7). Do not run `uip solution resources refresh`: it fails in this host. Or ask the user to run it from the designer. In brownfield work, preserve the supplied source, step names, and unaffected wiring. Insert a step by moving the old edge through it, not by creating a second path. Edit the decompiled source narrowly and let the merge carry only that delta back ([Lifecycle](#lifecycle)). Validate the merged target `.flow`. Studio Web has no pipeline helper: `decompile` here never writes one. **True-brownfield procedure:** **[`references/brownfield.md`](references/brownfield.md)** — read its judgments. Its shell sequences assume a terminal, so use the round trip above instead. **Every signature, option shape and field is indexed in the SDK that Studio Web ships**, not in this guide. Its package root is `/plugins/bundled/uipath-studio-web/flow-sdk/`, and a row's path is relative to it: | you have | look in | a row gives you | | --- | --- | --- | | a field or method — `outcomePorts`, `stepToList` (the usual case) | `dist/api-members.md` | the shape that declares it, and the lines that do | | an exported symbol — `HitlInputs`, `hitl`, `FlowBuilder` | `dist/api-index.md` | its kind, area, and the lines that declare it | **Match one name; do not read either file end to end** — `grep` it. Then read the span (e.g. `dist/core/actions.d.ts:583-597`): the whole declaration with its doc comment, so one read answers the question. A name in neither index is probably a RUNTIME output key, which the node references carry. Debug, publish, deploy, trigger, inspect a job, and drive an instance's lifecycle. You are already signed in to the tenant of the user. Before every publish or debug, make sure each connection is in the solution; never run `uip solution resources refresh` here. Run the flow with `uip maestro flow debug "" --inputs '{}'`. Publish the open solution with `uip solution publish` (the destination is the user's choice). `flow debug` is a REAL run, not a validation step: ask first, as it says. Read **[`references/operate.md`](references/operate.md)**.