diff --git a/skills/uipath-maestro-flow/SKILL.md b/skills/uipath-maestro-flow/SKILL.md index 0022d61ec7..22296f2d9c 100644 --- a/skills/uipath-maestro-flow/SKILL.md +++ b/skills/uipath-maestro-flow/SKILL.md @@ -43,7 +43,7 @@ uip solution init "" Do not hand-write the skeleton. `--sdk-source` decompiles the trigger-only artifact `flow init` writes into the project's `.flow-sdk/.flow.ts`, creating the folder; the source carries the flow id and name the product already assigned — a hand-written `flow('')` invents an id instead. So the stub is the seed rather than litter: the first `compile -o` overwrites it in place. -`init` answering "already exists and is not empty. Use --force to overwrite" means it exists: never pass `--force`; edit it. Drop `--sdk-source` for a flow that will hold an Extract document node — it is CLI-authored throughout ([`references/extract-document-node.md`](references/extract-document-node.md)). +`init` answering "already exists and is not empty. Use --force to overwrite" means it exists: never pass `--force`; edit it. Drop `--sdk-source` for a flow that will hold an Extract document node — it is CLI-authored throughout; asked for in a flow with a supplied `.flow-sdk/.flow.ts`, it goes in a new one ([`references/extract-document-node.md`](references/extract-document-node.md)). **Maestro Automate is `--automate` on the same `flow init`:** when the request names **Maestro Automate** as the product, run `( cd "" && uip maestro flow init --automate --sdk-source )`; the bare verb ("automate invoice intake") asks for a plain Flow. Nothing after `init` changes; the flag writes `runtimeOptions.profile` into `operate.json` plus a `.maestro_automate` marker, and `compile -o` rewrites only the `.flow`, so both survive. diff --git a/skills/uipath-maestro-flow/references/extract-document-node.md b/skills/uipath-maestro-flow/references/extract-document-node.md index b112cd9c56..bd3eefb979 100644 --- a/skills/uipath-maestro-flow/references/extract-document-node.md +++ b/skills/uipath-maestro-flow/references/extract-document-node.md @@ -41,7 +41,7 @@ uip maestro flow validate Flow/Flow.flow --output json 0. **Find the flow.** Everything here edits a `.flow` on disk. When the user describes a flow they are already building and none exists locally, they may be referring to one -that lives in Studio Web and has to be pulled down first — ask them for its URL or solution id, since nothing lists them ([Starting from a flow in Studio Web](extract-document-taxonomy.md#starting-from-a-flow-in-studio-web)). +that lives in Studio Web and has to be pulled down first — ask them for its URL or solution id, since nothing lists them ([Starting from a flow in Studio Web](extract-document-taxonomy.md#starting-from-a-flow-in-studio-web)). **Where the project folder holds a `.flow-sdk/.flow.ts` the task supplied, do not edit its `.flow`:** the flow is compiled from that source, so a new node goes in a separate project ([Adding the node](#adding-the-node)), and every later step runs on that project's `.flow`. 1. **Declare the file the flow takes in,** unless it already has one: `uip maestro flow variables create invoice -d in -t file --description ''`. This is what makes `$vars.start.output.invoice` resolve, so it comes before the node that reads it. 2. **Add the node** with `--label` naming what it extracts, and `--input` carrying `fileRef`. @@ -58,7 +58,13 @@ The feature is new and tenant-gated, so not every tenant has it yet. Nothing in ## Adding the node -**These commands edit the `.flow` file, so they do not mix with a project built from TypeScript source.** A project initialised with `--sdk-source` generates its `.flow` from a `.flow.ts` by compiling, and the next compile overwrites whatever `nodes create` and `nodes schema set` wrote. Check for a `.flow-sdk/` directory before starting. Where one exists, build the Extract document flow in a separate project without source and keep to the CLI — the SDK's `dynamicExtract()` is not the route here ([document-pipeline.md](document-pipeline.md) explains its limits). Do not alternate between the two and re-apply the CLI edits after each compile. +**These commands edit the `.flow` file, so they do not mix with a flow compiled from TypeScript source.** That is a project whose `.flow-sdk/` holds `.flow.ts` when the task starts — a source the task supplied, not one you decompiled for an edit. Its `.flow` is generated by compiling that source, and the next compile — the user's or a later turn's — overwrites whatever `nodes create` and `nodes schema set` wrote. A `.flow-sdk/` holding only `bindings.json`, `connectors/` or `connectors-local/` is the SDK's cache, not a source: edit the `.flow` as usual. The same goes for a flow that already holds an Extract document node: edit that node in place. Where the source exists and the node is new, even when the user names that flow: + +1. Leave that project as it is: no change to its `.flow`, none to its `.flow.ts`. +2. Build the Extract document flow in a new project in the same solution, without source: `( cd "" && uip maestro flow init )`, no `--sdk-source`. Keep to the CLI — the SDK's `dynamicExtract()` is not the route here ([document-pipeline.md](document-pipeline.md) explains its limits). +3. Tell the user why the step is in `` and not in their flow: their flow is compiled from its TypeScript source, and the next compile would delete a node added to its `.flow`. + +Do not alternate between the two and re-apply the CLI edits after each compile. `--label` sets the canvas name and seeds the node id. Give it a name that says which document and which fields, not "Extract" — a flow with two extraction nodes is common, and the label is what the user reads on the canvas and in a trace. Run `uip maestro flow nodes list --output json` afterwards to get the id that was minted; later commands address the node by that id.