@uipath/skills 1.200.0 → 1.201.0-preview.433

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 (205) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.cursor-plugin/plugin.json +32 -0
  4. package/CODEOWNERS +25 -4
  5. package/README.md +1 -0
  6. package/assets/skill-status.json +8 -0
  7. package/assets/uip-catalog-snapshot.json +113 -41
  8. package/assets/uipath-icon.png +0 -0
  9. package/commands/install-permissions.md +1 -0
  10. package/package.json +3 -2
  11. package/skills/uipath-admin/SKILL.md +1 -1
  12. package/skills/uipath-admin/references/authorization/permission-catalog.md +61 -1
  13. package/skills/uipath-admin/references/authorization/role-management.md +3 -1
  14. package/skills/uipath-admin/references/diagnose/references/failure-modes.md +29 -4
  15. package/skills/uipath-admin/references/diagnose/references/troubleshooting-guide.md +13 -0
  16. package/skills/uipath-agents/SKILL.md +1 -0
  17. package/skills/uipath-agents/references/coded/capabilities/context-grounding.md +3 -3
  18. package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +6 -1
  19. package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +89 -1
  20. package/skills/uipath-agents/references/coded/embedding-in-flows.md +17 -1
  21. package/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md +64 -2
  22. package/skills/uipath-agents/references/coded/lifecycle/deployment.md +3 -0
  23. package/skills/uipath-agents/references/coded/lifecycle/environment-variables.md +90 -0
  24. package/skills/uipath-agents/references/coded/lifecycle/file-sync.md +3 -1
  25. package/skills/uipath-agents/references/coded/quickstart.md +10 -6
  26. package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails-recommend.md +20 -5
  27. package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails.md +13 -0
  28. package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +1 -3
  29. package/skills/uipath-api-workflow/references/operating-published-workflows.md +17 -6
  30. package/skills/uipath-automationhub/SKILL.md +58 -0
  31. package/skills/uipath-automationhub/references/api-endpoints.md +140 -0
  32. package/skills/uipath-automationhub/references/get-process.md +69 -0
  33. package/skills/uipath-automationhub/references/publish-process.md +171 -0
  34. package/skills/uipath-coded-apps/SKILL.md +24 -11
  35. package/skills/uipath-coded-apps/references/commands-reference.md +29 -29
  36. package/skills/uipath-coded-apps/references/create-action-app.md +4 -0
  37. package/skills/uipath-coded-apps/references/create-web-app.md +10 -0
  38. package/skills/uipath-coded-apps/references/debug.md +16 -0
  39. package/skills/uipath-coded-apps/references/oauth-client-setup.md +3 -1
  40. package/skills/uipath-coded-apps/references/oauth-scopes.md +39 -4
  41. package/skills/uipath-coded-apps/references/pack-publish-deploy.md +37 -21
  42. package/skills/uipath-coded-apps/references/sdk/conversational-agent.md +2 -0
  43. package/skills/uipath-coded-apps/references/sdk/data-fabric.md +2 -0
  44. package/skills/uipath-coded-apps/references/sdk/orchestrator.md +2 -0
  45. package/skills/uipath-coded-apps/references/widgets/conversational-agent-chat.md +90 -0
  46. package/skills/uipath-coded-apps/references/widgets/datatable.md +97 -0
  47. package/skills/uipath-coded-apps/references/widgets/external-auth.md +97 -0
  48. package/skills/uipath-coded-apps/references/widgets/multi-file-upload.md +98 -0
  49. package/skills/uipath-coded-apps/references/widgets/pdf-viewer.md +122 -0
  50. package/skills/uipath-coded-apps/references/widgets/validation-station.md +1 -1
  51. package/skills/uipath-functions/SKILL.md +11 -0
  52. package/skills/uipath-insights/SKILL.md +52 -247
  53. package/skills/uipath-insights/references/filter-discovery-guide.md +106 -0
  54. package/skills/uipath-insights/references/investigation-playbook-guide.md +24 -16
  55. package/skills/uipath-insights/references/jobs-commands-guide.md +196 -53
  56. package/skills/uipath-ixp/SKILL.md +10 -4
  57. package/skills/uipath-ixp/references/cli-reference.md +59 -5
  58. package/skills/uipath-ixp/references/label-documents-guide.md +12 -5
  59. package/skills/uipath-maestro-bpmn/SKILL.md +27 -9
  60. package/skills/uipath-maestro-bpmn/references/diagnose/references/failure-modes.md +6 -3
  61. package/skills/uipath-maestro-bpmn/references/operate/CAPABILITY.md +1 -1
  62. package/skills/uipath-maestro-bpmn/references/operate/references/ship.md +9 -3
  63. package/skills/uipath-maestro-bpmn/references/registry-workflow.md +1 -1
  64. package/skills/uipath-maestro-bpmn/references/shared/local-metadata-regeneration-guide.md +18 -11
  65. package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +13 -7
  66. package/skills/uipath-maestro-case/SKILL.md +138 -170
  67. package/skills/uipath-maestro-case/references/bindings-and-expressions.md +14 -1
  68. package/skills/uipath-maestro-case/references/bindings-v2-sync.md +25 -1
  69. package/skills/uipath-maestro-case/references/brownfield.md +7 -3
  70. package/skills/uipath-maestro-case/references/case-commands.md +63 -8
  71. package/skills/uipath-maestro-case/references/case-editing-operations.md +11 -8
  72. package/skills/uipath-maestro-case/references/case-schema.md +5 -3
  73. package/skills/uipath-maestro-case/references/case-spec-input-details.md +4 -0
  74. package/skills/uipath-maestro-case/references/connector-integration.md +3 -1
  75. package/skills/uipath-maestro-case/references/connector-trigger-impl.md +236 -0
  76. package/skills/uipath-maestro-case/references/connector-trigger-planning.md +300 -0
  77. package/skills/uipath-maestro-case/references/entry-points-sync.md +2 -0
  78. package/skills/uipath-maestro-case/references/evals/evals.json +33 -40
  79. package/skills/uipath-maestro-case/references/implementation.md +58 -13
  80. package/skills/uipath-maestro-case/references/phased-execution.md +87 -20
  81. package/skills/uipath-maestro-case/references/placeholder-tasks.md +3 -1
  82. package/skills/uipath-maestro-case/references/planning.md +26 -16
  83. package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +2 -5
  84. package/skills/uipath-maestro-case/references/plugins/case/planning.md +3 -1
  85. package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +3 -1
  86. package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/planning.md +5 -3
  87. package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +4 -2
  88. package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +6 -4
  89. package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +6 -4
  90. package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +6 -4
  91. package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +42 -3
  92. package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +6 -4
  93. package/skills/uipath-maestro-case/references/plugins/logging/impl-json.md +50 -32
  94. package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +2 -4
  95. package/skills/uipath-maestro-case/references/plugins/sla/planning.md +3 -1
  96. package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +1 -4
  97. package/skills/uipath-maestro-case/references/plugins/stages/planning.md +2 -0
  98. package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +2 -0
  99. package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +2 -0
  100. package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +2 -0
  101. package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +2 -0
  102. package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +2 -0
  103. package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +5 -3
  104. package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +2 -0
  105. package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +2 -0
  106. package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +43 -13
  107. package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +4 -2
  108. package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +10 -7
  109. package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +5 -3
  110. package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +3 -1
  111. package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +2 -0
  112. package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +2 -0
  113. package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +2 -0
  114. package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +2 -0
  115. package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +2 -0
  116. package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +2 -0
  117. package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +9 -6
  118. package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +5 -3
  119. package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +1 -4
  120. package/skills/uipath-maestro-case/references/plugins/triggers/manual/planning.md +2 -0
  121. package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +1 -4
  122. package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +2 -0
  123. package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +3 -1
  124. package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +40 -2
  125. package/skills/uipath-maestro-case/references/plugins/variables/global-vars/planning.md +12 -2
  126. package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +8 -6
  127. package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +17 -3
  128. package/skills/uipath-maestro-case/references/registry-discovery.md +9 -5
  129. package/skills/uipath-maestro-case/references/sla-response-shapes.md +3 -1
  130. package/skills/uipath-maestro-case/references/troubleshooting-guide.md +2 -0
  131. package/skills/uipath-maestro-case/scripts/audit_plan.py +231 -0
  132. package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +8 -4
  133. package/skills/uipath-maestro-flow/references/author/references/editing-operations-cli.md +5 -3
  134. package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +14 -4
  135. package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +3 -3
  136. package/skills/uipath-maestro-flow/references/author/references/greenfield.md +12 -3
  137. package/skills/uipath-maestro-flow/references/author/references/planning-arch.md +17 -13
  138. package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +1 -1
  139. package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +49 -4
  140. package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +59 -17
  141. package/skills/uipath-maestro-flow/references/author/references/plugins/connector-trigger/impl.md +3 -3
  142. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-connector.md +3 -1
  143. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-manual.md +3 -1
  144. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl.md +5 -2
  145. package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md +31 -16
  146. package/skills/uipath-maestro-flow/references/author/references/plugins/ixp/impl.md +13 -4
  147. package/skills/uipath-maestro-flow/references/author/references/plugins/loop/impl.md +185 -25
  148. package/skills/uipath-maestro-flow/references/author/references/plugins/loop/planning.md +18 -10
  149. package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +9 -3
  150. package/skills/uipath-maestro-flow/references/author/references/plugins/terminate/impl.md +6 -3
  151. package/skills/uipath-maestro-flow/references/diagnose/references/failure-modes.md +68 -0
  152. package/skills/uipath-maestro-flow/references/shared/cli-commands.md +2 -1
  153. package/skills/uipath-maestro-flow/references/shared/file-format.md +36 -9
  154. package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +1 -1
  155. package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +1 -1
  156. package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +77 -20
  157. package/skills/uipath-planner/SKILL.md +30 -12
  158. package/skills/{uipath-maestro-case/assets/templates/sdd-template-examples.md → uipath-planner/assets/templates/case-sdd-examples.md} +18 -32
  159. package/skills/uipath-planner/assets/templates/case-sdd-template.md +289 -309
  160. package/skills/uipath-planner/references/case-design-lane-guide.md +288 -0
  161. package/skills/uipath-planner/references/multi-skill-patterns-guide.md +1 -1
  162. package/skills/uipath-planner/references/package-selection-guide.md +2 -2
  163. package/skills/uipath-planner/references/pdd-driven-lane-guide.md +5 -1
  164. package/skills/uipath-planner/references/product-selection-guide.md +2 -2
  165. package/skills/uipath-planner/references/sdd-generation-guide.md +16 -15
  166. package/skills/uipath-planner/scripts/audit_sdd.py +437 -0
  167. package/skills/uipath-platform/SKILL.md +7 -2
  168. package/skills/uipath-platform/references/data-fabric/choice-sets.md +1 -1
  169. package/skills/uipath-platform/references/data-fabric/data-fabric.md +1 -1
  170. package/skills/uipath-platform/references/data-fabric/entity-schema.md +37 -21
  171. package/skills/uipath-platform/references/data-fabric/file-attachments.md +1 -1
  172. package/skills/uipath-platform/references/guardrails/byo-configurations.md +205 -0
  173. package/skills/uipath-platform/references/traces/feedback.md +4 -2
  174. package/skills/uipath-platform/references/uip-commands.md +2 -2
  175. package/skills/uipath-review/SKILL.md +55 -52
  176. package/skills/uipath-review/references/agents/agent-grading-rubric.md +62 -40
  177. package/skills/uipath-review/references/agents/agents-coded-rules.md +7 -1
  178. package/skills/uipath-review/references/agents/agents-lowcode-rules.md +21 -2
  179. package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +78 -13
  180. package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +11 -4
  181. package/skills/uipath-review/references/architecture-assessment-guide.md +1 -1
  182. package/skills/uipath-review/references/review-workflow-guide.md +19 -10
  183. package/skills/uipath-review/references/rule-catalog-workflow.md +6 -6
  184. package/skills/uipath-review/references/rule-format.md +1 -1
  185. package/skills/uipath-rpa/SKILL.md +1 -1
  186. package/skills/uipath-solution/SKILL.md +4 -4
  187. package/skills/uipath-solution/references/solution-overview.md +7 -2
  188. package/skills/uipath-tasks/SKILL.md +27 -1
  189. package/skills/uipath-tasks/references/task-catalogs.md +79 -0
  190. package/skills/uipath-tasks/references/task-data.md +45 -0
  191. package/skills/uipath-tasks/references/task-metadata.md +69 -0
  192. package/skills/uipath-test/SKILL.md +3 -3
  193. package/skills/uipath-test/references/test-result-report-guide.md +16 -1
  194. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/ambiguous-selector.md +1 -1
  195. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/scope-container-wrong-page.md +1 -1
  196. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/verify-execution-failure.md +2 -2
  197. package/skills/uipath-troubleshoot/references/products/agents/playbooks/guardrail-violation.md +12 -0
  198. package/version-manifest.json +2 -2
  199. package/skills/uipath-maestro-case/assets/templates/sdd-template.md +0 -667
  200. package/skills/uipath-maestro-case/references/connector-trigger-common.md +0 -511
  201. package/skills/uipath-maestro-case/references/phase-0-interview.md +0 -279
  202. package/skills/uipath-maestro-case/references/sdd-generation-rules.md +0 -1026
  203. package/skills/uipath-review/references/agents/agent-common-issues.md +0 -401
  204. package/skills/uipath-review/references/agents/agent-review-checklist.md +0 -379
  205. /package/skills/{uipath-maestro-case → uipath-planner}/assets/templates/sdd-viewer.html +0 -0
@@ -53,15 +53,26 @@ uip api-workflow validate ./Workflow.json --output json # static: schema + sem
53
53
  uip api-workflow run ./Workflow.json --no-auth --output json # runtime: expression / logic
54
54
  ```
55
55
 
56
- Faults that only surface in cloud (auth, connection state, real vendor responses, trigger wiring) are diagnosed from the deployed job:
56
+ Faults that only surface in cloud (auth, connection state, real vendor responses, trigger wiring) are diagnosed from the deployed job. **`uip or jobs get` is the only surface that carries the fault** — verified end-to-end against a deliberately-faulting deployed API workflow (alpha, uip 1.200.0):
57
57
 
58
58
  ```bash
59
- uip or jobs get <jobId> --output json # status + fault summary
60
- uip or jobs logs <jobId> --output json # execution logs for the run
61
- uip traces spans get --job-key <jobKey> --output json # span-level execution trace (also accepts a <trace-id> positional)
59
+ uip or jobs get <jobId> --output json # THE diagnostic: Data.State + Data.Info
62
60
  ```
63
61
 
64
- > `uip or jobs traces` is documented Agent-type-process-only — for an API-workflow job use `uip traces spans get --job-key <jobKey>` instead.
62
+ `Data.State` is `Faulted`; `Data.Info` carries the runtime message, e.g.
63
+ `"Worker operation failed: <the error your JavaScript or connector activity raised>"`.
64
+ Read `Info` first — for an API workflow it is usually the whole answer.
65
+
66
+ Two surfaces that look useful and are NOT, for API-workflow jobs:
67
+
68
+ | Command | What it actually returns |
69
+ |---------|--------------------------|
70
+ | `uip or jobs logs <jobId>` | Lifecycle lines only — `"Workflow started"` / `"Workflow completed"`, both at level `Info`. It reports **`Workflow completed` even for a Faulted job** and never carries the error. Do not diagnose from it, and never read "completed" as success. |
71
+ | `uip traces spans get --job-key <jobKey>` | Fails with `"Error retrieving trace ID for job"`. API-workflow jobs have no span/trace surface. |
72
+
73
+ > **Diagnose before you tear down.** Uninstalling the deployment destroys its job records — `uip or jobs get <jobId>` then returns `Result: Failure` with an empty `State`. Capture what you need while the deployment still stands.
74
+
75
+ > For per-activity detail the local loop is stronger than anything in cloud: reproduce with `uip api-workflow run <Workflow.json> --no-auth --output json`, which names the failing activity. Cloud gives you the fault message; local gives you its position.
65
76
 
66
77
  Map the surfaced error back to a fix using the category catalog in [troubleshooting.md](troubleshooting.md) (Structure > Expression > Activity Config > Logic). For deep, multi-signal root-cause investigations (what changed, cross-run comparison, incident correlation), hand off to **uipath-troubleshoot**.
67
78
 
@@ -71,4 +82,4 @@ Map the surfaced error back to a fix using the category catalog in [troubleshoot
71
82
  |------|--------------------------|-------------------------|
72
83
  | **Build** | `init`, edit, `validate`, `registry resolve`/`stub`, `pack` | — |
73
84
  | **Operate** | `run` (local execution) | `uip or jobs start <process-key>`/`list`/`stop`, `uip or triggers` (need `--folder-path`/`--folder-key`), `uip is connections` |
74
- | **Diagnose** | `validate` → `run --no-auth` loop, `uip is connections ping` | `uip or jobs logs`/`get`, `uip traces spans get --job-key`, uipath-troubleshoot |
85
+ | **Diagnose** | `validate` → `run --no-auth` loop, `uip is connections ping` | `uip or jobs get` — `Data.Info` carries the fault; `jobs logs` and `traces spans get` do NOT work for API-workflow jobs. Then uipath-troubleshoot |
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: uipath-automationhub
3
+ description: "Publish and read business processes in UiPath Automation Hub via the Open API, using the user's cloud login — no admin OpenAPI token needed. PUBLISH an approved process and its PDD/SDD documents (schema-driven payload, base64 file upload or link) to AH as the system of record — e.g. a process captured/approved by Process Scribe. GET a process back by id or search, list its attached documents, and DOWNLOAD their file bytes (e.g. for dedup / related-idea lookups or retrieving a published PDD). Authenticates with the user's cloud bearer token and NEVER sends the admin `x-ah-openapi-auth` header. Routes by intent to `references/publish-process.md` (publish/create/upload) or `references/get-process.md` (get/read/fetch/list), over the shared auth + endpoint catalog in `references/api-endpoints.md`. Structured to extend to more Automation Hub Open API operations."
4
+ allowed-tools: Bash, Read, AskUserQuestion
5
+ user-invocable: true
6
+ ---
7
+
8
+ # UiPath Automation Hub — Open API Assistant
9
+
10
+ Work with business processes in UiPath Automation Hub (AH) through the AH Open API, authenticating with the **user's cloud access token** — the user does **not** need an admin-generated OpenAPI token. This one skill covers both writing a process to AH and reading one back; pick the flow below.
11
+
12
+ ## Step 0: Read the API reference
13
+
14
+ Always read [`references/api-endpoints.md`](references/api-endpoints.md) first. It is the shared source of truth for the cloud-token auth model, the base/gateway URL, the exact headers (**and which header to never send**), and every endpoint the flows use.
15
+
16
+ ## Authentication (shared — both flows)
17
+
18
+ Resolve the cloud token + base URL + org + tenant in this **priority order**:
19
+
20
+ 1. **Runtime env-auth (preferred — how UiPath Delegate provides it).** If `UIPATH_CLI_AUTH_TOKEN` is set (with `UIPATH_CLI_ENABLE_ENV_AUTH=true`), use it as the bearer and take org/tenant from `UIPATH_CLI_ORGANIZATION_NAME` / `UIPATH_CLI_TENANT_NAME` (and the `..._ID` variants). Base URL defaults to `https://cloud.uipath.com`. *(If a parent `uip` process instead exported `UIPATH_ACCESS_TOKEN` + `UIPATH_URL` — the `{base}/{org}/{tenant}` shape — use those.)*
21
+ 2. **Logged-in `uip` session.** Otherwise, if the user has run `uip login`, read `~/.uipath/.auth` (JSON: `accessToken`, `baseUrl`, `organizationName`, `tenantName`).
22
+ 3. **User-provided (last resort).** Ask the user to paste a cloud bearer token plus their **org** and **tenant** slugs (the two path segments after the host in their AH URL).
23
+
24
+ Use whatever you resolved as `$ACCESS_TOKEN`, `$BASE_URL`, `$ORG`, `$TENANT` in the flows.
25
+
26
+ **Gateway URL** (every request):
27
+
28
+ ```
29
+ {baseUrl}/{org}/{tenant}/automationhub_/api/v1/openapi
30
+ ```
31
+
32
+ The platform injects tenant-routing headers from the `{org}/{tenant}` segments — always use this gateway URL.
33
+
34
+ **Header rules (do not regress these):**
35
+
36
+ - Send `Authorization: Bearer <cloud access token>` on every request (and `Content-Type: application/json` on POSTs).
37
+ - **NEVER** send `x-ah-openapi-auth` or `x-ah-openapi-app-key`. Those route to the admin-token path and reject a cloud token with **401** — never add them to "fix" a 401.
38
+ - Never fall back to an admin OpenAPI token. If no token resolves, stop and explain the skill needs the user's cloud session (`uip login`) or a host-provided token.
39
+ - Cloud tokens are short-lived. On a **401**, if the token came from `~/.uipath/.auth`, tell the user to run `uip login` again, re-resolve, and retry.
40
+
41
+ ## Routing — pick the flow by intent
42
+
43
+ Classify what the user wants, then follow the matching reference. All flows share the Authentication section above and the endpoint catalog in `references/api-endpoints.md`.
44
+
45
+ | The user wants to... | Follow |
46
+ |---|---|
47
+ | **Publish / create / upload** a process (+ its PDD/SDD documents) to AH | [`references/publish-process.md`](references/publish-process.md) |
48
+ | **Get / read / fetch / list** a process (+ its documents) from AH | [`references/get-process.md`](references/get-process.md) |
49
+ | Shared **auth + endpoint catalog** (base URL, headers, every endpoint, error codes) | [`references/api-endpoints.md`](references/api-endpoints.md) |
50
+ | _(future AH Open API operation — add a row here)_ <!-- uip-check-skip --> | _add `references/<operation>.md` and route to it_ |
51
+
52
+ To add a new capability (e.g. a future AH `uip` CLI surface or another Open API operation), keep this skill's product shape: add one `references/<operation>.md`, add a row above, and reuse this shared Authentication section — do not create a new per-operation skill.
53
+
54
+ ## Notes
55
+
56
+ - **Cloud token only** — authorization is the user's real AH permissions; you see and can do exactly what their AH role allows.
57
+ - The publish flow fetches the idea-flow schema live, so it adapts automatically if fields change on the tenant.
58
+ - **Open dependency:** in a hosted runtime (e.g. Process Scribe/Delegate) the cloud token is expected via the environment (Authentication, option 1). Confirm the runtime provides `UIPATH_CLI_AUTH_TOKEN` (or an equivalent) before relying on it in production.
@@ -0,0 +1,140 @@
1
+ # Automation Hub Open API — Reference (cloud-token auth)
2
+
3
+ > This skill authenticates with the **user's UiPath cloud access token** — **not** an admin-generated OpenAPI token. This is the AH Open API's `automation-cloud` mode: send the bearer token and **do not** send `x-ah-openapi-auth`.
4
+
5
+ This is the shared auth + endpoint catalog for both flows — [`publish-process.md`](publish-process.md) (write) and [`get-process.md`](get-process.md) (read).
6
+
7
+ ## Authentication
8
+
9
+ ### Getting the cloud token + org/tenant (in priority order)
10
+
11
+ 1. **Runtime env-auth (preferred — this is how UiPath Delegate provides it).** The runtime runs `uip` in a virtual shell with `UIPATH_CLI_ENABLE_ENV_AUTH=true` and sets `UIPATH_CLI_AUTH_TOKEN` (the user's cloud bearer token) plus `UIPATH_CLI_ORGANIZATION_NAME` / `UIPATH_CLI_TENANT_NAME` (and `..._ID` variants). If `UIPATH_CLI_AUTH_TOKEN` is set, use it as the bearer and take org/tenant from those vars. Base URL defaults to `https://cloud.uipath.com` unless the environment specifies another. *(If a parent `uip` process instead exported `UIPATH_ACCESS_TOKEN` + `UIPATH_URL` — the `{base}/{org}/{tenant}` shape — use those.)*
12
+ 2. **Logged-in `uip` session.** Otherwise, if the user has run `uip login`, read `~/.uipath/.auth` (JSON). Use its `accessToken`, `baseUrl`, `organizationName`, `tenantName`. If the file is missing or has no `accessToken`, tell the user to run `uip login` (and `uip login tenant set <name>` to pick the tenant).
13
+ 3. **User-provided (last resort).** Ask the user to paste a cloud bearer token plus their **org** and **tenant** slugs (the two path segments after the host in their AH URL).
14
+
15
+ Never fall back to an admin OpenAPI token. If none of the above yields a token, stop and explain that the skill needs the user's cloud session (`uip login`) or a host-provided token.
16
+
17
+ ### Base URL
18
+
19
+ ```
20
+ {baseUrl}/{org}/{tenant}/automationhub_/api/v1/openapi
21
+ ```
22
+
23
+ e.g. `https://cloud.uipath.com/acme/prod/automationhub_/api/v1/openapi`. Always use this **gateway** URL — the platform injects the tenant-routing headers from the `{org}/{tenant}` segments. (Local dev: base `http://localhost:3002`, path `/api/v1/openapi`, and you must confirm how org/tenant are supplied locally.)
24
+
25
+ ### Headers (every request)
26
+
27
+ | Header | Value | When |
28
+ |--------|-------|------|
29
+ | `Authorization` | `Bearer <cloud access token>` | always |
30
+ | `Content-Type` | `application/json` | POST only |
31
+
32
+ **Do NOT send** `x-ah-openapi-auth` or `x-ah-openapi-app-key`. Sending `x-ah-openapi-auth: openapi-token` routes to the admin-token path and rejects a cloud token with **401**.
33
+
34
+ ### Token expiry
35
+
36
+ Cloud access tokens are short-lived. If any call returns **401** and the token came from `~/.uipath/.auth`, tell the user to run `uip login` again (or re-provide a token) and retry.
37
+
38
+ ## Endpoints used by this skill
39
+
40
+ ### GET `/idea-flows`
41
+ All idea flows (workflow types) on the tenant. Each element has `Idea flow name` (e.g. "Business Process") and `Idea flow ID` (number). Response wrapped as `{ message, statusCode, data: [...] }`. *(Used by the publish flow.)*
42
+
43
+ ### GET `/idea-schema?idea_flow_id={id}`
44
+ Full JSON schema for an idea flow + a ready-made `user_inputs` template. Response wrapped as `{ status: "success", data: {...} }`:
45
+ - `data.properties.schema.properties` — field definitions, 3-level nested (Assessment Type > Section > Question); enums carry `answer_option` codes + labels in `custom_properties`.
46
+ - `data.user_inputs` — the exact POST body template ("fill in the blanks"). Most fields wrap as `{ "value": <v> }`; owner/submitter questions take a direct string (no wrapper); questions with no example are omitted.
47
+
48
+ *(Used by the publish flow.)*
49
+
50
+ ### POST `/idea-from-schema`
51
+ Create a process from the schema. **Use this, not `POST /automations`** (the `/automations` alias 404s in some deployments).
52
+
53
+ Body:
54
+ ```json
55
+ { "idea_flow_id": <id>, "user_inputs": { "<AssessmentType>": { "<section-ahid>": { "<question-key>": { "value": "<v>" } } } } }
56
+ ```
57
+ **Do not POST `data.user_inputs` verbatim** — its example values are placeholders that the API rejects. Replace each with a real value; in particular resolve a **valid** `OVERVIEW_CATEGORY` id (the template's `1` → `Invalid Category Id`) and real `answer_option` codes (a placeholder code → backend `co_question_answer_option_value` crash).
58
+
59
+ **Required fields (Business Process, `idea_flow_id`=7), verified live** — note the backend enforces owner + submitter even though the schema's `required` flags omit them:
60
+
61
+ | Key | Section | Shape |
62
+ |---|---|---|
63
+ | `OVR-OVERVIEW_NAME` | `ah-section-ovr-0-0` | `{"value":"…"}` |
64
+ | `OVR-OVERVIEW_DESCRIPTION` | `ah-section-ovr-0-0` | `{"value":"…"}` |
65
+ | `OVR-OVERVIEW_CATEGORY` | `ah-section-ovr-0-0` | `{"value":<valid id>}` |
66
+ | `OVR-PROCESS_DOCUMENTS` | `ah-section-ovr-0-0` | `{"value":["<answer_option code>"]}` |
67
+ | `OVR-PROCESS_OWNER` | `ah-section-ovr-0-0` | `"<email>"` (direct string) |
68
+ | `OVR-OVERVIEW_PROCESS_SUBMITTER` | `ah-section-ovr-0-1` | `"<email>"` (direct string) |
69
+
70
+ When a required field is missing the API may return `errorDetails: {}` (no field named) with `"Please fill in all the required information"` — usually the un-flagged owner/submitter, but **tenant admins can mark additional questions required** (commonly "Applications used"/"Thin applications used"); diff the payload against every `required`-flagged question in the live schema.
71
+
72
+ **Response 201** — the standard envelope with the created process **nested under `data`**: `{ "message": "Resource Created", "statusCode": 201, "data": { "process_id": …, "process_uuid": …, "process_name": … } }`. Read **`data.process_id`** — it is NOT at the top level. If you received a 201 the process WAS created — never re-POST because a field read came back undefined; re-read the response instead. *(Used by the publish flow.)*
73
+
74
+ ### POST `/automations/{process_id}/documents`
75
+ Attach a document to a process — **by uploaded bytes (`file`) or by link (`embed_link`)**. Governed by `open-api-service` `ProcessDocumentValidator` (`src/api/v1/services/processDocumentValidator.class.ts`; schema `src/models/schema/processDocumentRequest.schema.ts`). **Required fields, verified against the validator source:**
76
+
77
+ ```json
78
+ {
79
+ "document_title": "…",
80
+ "document_description": "…",
81
+ "document_type_id": 1,
82
+ "file": { "file_name": "…", "mimetype": "…", "file_content": "<base64>", "file_encoding": "base64" }
83
+ }
84
+ ```
85
+
86
+ - `document_title` (**not** `document_name`), `document_description`, `document_type_id` are all required by the schema.
87
+ - **`document_type_id` values are fixed platform-wide** (from `tenant-service` `file.constants.js` — never guess):
88
+
89
+ | id | Type | id | Type |
90
+ |---|---|---|---|
91
+ | 1 | PDD (Process Definition Document) | 7 | INF (Input File) |
92
+ | 2 | SDD (Solution Design Document) | 8 | OUF (Output File) |
93
+ | 3 | DSD (Development Specification Document) | 9 | MISC ("Misc." — anything else) |
94
+ | 4 | SOP (Standard Operating Procedure) | 10 | TCD (Task Capture Document — **special**: accepts only `zip`/`ssp` uploads, **no embed_link**) |
95
+ | 5 | DWI (Detailed Work Instructions) | 11 | ASC (Automation Source Code) |
96
+ | 6 | PM (Process Map) | | |
97
+
98
+ Pick by the document's kind: PDD → `1`, SDD → `2`; when unsure, default to `9` (MISC).
99
+ - Plus **exactly one** of `file` or `embed_link` — an XOR enforced in the handler, not the schema. Sending both, or neither, 400s with `"One and only one of embed_link or file need to be specified."`
100
+ - **`file` — byte upload, the default.** Validated by `EncodedFileValidator`: `file_name`, `mimetype`, `file_content`, `file_encoding` are all required and must be non-empty, and `file_encoding` must be `base64` — the only accepted value. No mimetype allowlist. The JSON body limit is **300mb**, so a PDD-sized `.docx` or `.md` fits with room to spare.
101
+ - **`embed_link`** — use only when the document already lives at a URL and the bytes are not available.
102
+
103
+ Returns the standard envelope with the created id **nested under `data`** — read **`data.document_id`**. *(Used by the publish flow.)*
104
+
105
+ ### POST `/automations/{process_id}/media` *(not needed for documents)*
106
+ A separate byte-upload route taking the same `EncodedFileValidator` shape. Documents do **not** need it — `/documents` accepts `file` directly.
107
+
108
+ ### GET `/hierarchy`
109
+ The tenant's category tree (verified live): `data.levels` (level names) + `data.categories[]`, each with `category_id`, `category_name`, `category_is_active`, and nested `subcategories`. **This is how to resolve a valid `OVERVIEW_CATEGORY` id** — it works even on a tenant with zero processes. Only pick nodes with **`category_is_active: 1`** — `0` means archived and the write will be rejected or hidden. *(Used by the publish flow.)*
110
+
111
+ ### GET `/users?limit=<n>`
112
+ The Automation Hub users on the tenant (verified live): paged envelope with the list under **`data.users[]`**; each entry carries **`user_email`**, `user_first_name`/`user_last_name`, and `user_is_active`. **This is how to resolve a valid owner/submitter email** — both must be provisioned AH users (prefer `user_is_active: 1`), and this endpoint is the ground truth. *(Used by the publish flow.)*
113
+
114
+ ### GET `/appinventory?limit=<n>`
115
+ The tenant's application inventory (paged; entries carry the application id, name, version, language). **This is the valid-answer set for tenant-required application questions** ("Applications used", "Thin applications used") in the publish flow. *(Used by the publish flow when the tenant requires application questions.)*
116
+
117
+ ### GET `/automations?search=<text>&limit=<n>&offset=<n>`
118
+ Search/list processes. Returns a paged list (results under a resource key, e.g. `processes`, or a bare array). Use to resolve a name → `process_id`. *(Used by the get flow.)*
119
+
120
+ ### GET `/automations/{id}`
121
+ Fetch one process by numeric id (or slug). Returns the full process record (can be ~300 fields; project to the ones you need for display). *(Used by the get flow.)*
122
+
123
+ ### GET `/automations/{process_id}/documents`
124
+ List a process's documents (key `documents`). Each entry carries `document_id`, `document_title`, `document_type_id`, and **either** a `file_id` (file-backed — downloadable) **or** an `embed_link` (link-backed — nothing to download; show the URL). *(Used by both flows.)*
125
+
126
+ ### GET `/download/file/{file_id}`
127
+ Download a file-backed document's **bytes**. `{file_id}` is the `file_id` from the documents list — **not** the `document_id`. The response body is the raw file — save it with `curl -o <path>`; there is no JSON envelope. Link-backed documents (`file_id` absent) cannot be downloaded — present their `embed_link` instead. *(Used by the get flow.)*
128
+
129
+ ### GET `/automations/{id}/components` *(optional)*
130
+ Linked components for the process.
131
+
132
+ ## Errors
133
+
134
+ | Status | Meaning |
135
+ |--------|---------|
136
+ | 400 | Validation — missing required field, invalid enum, empty `user_inputs`, missing `OVERVIEW_NAME` |
137
+ | 401 | Unauthorized — token missing/expired, or `x-ah-openapi-auth` was wrongly sent |
138
+ | 403 | Forbidden — the user lacks the AH permission (authorization = the user's real AH role) |
139
+ | 404 | Wrong URL, or AH not enabled on the tenant |
140
+ | 409 | Duplicate process name |
@@ -0,0 +1,69 @@
1
+ # Get a Process from Automation Hub
2
+
3
+ Fetches one process (by id or search) and its documents from Automation Hub, authenticating with the **user's cloud token** — no admin OpenAPI token required. Read-only: this flow never writes.
4
+
5
+ > Auth, base/gateway URL, headers (and the header to **never** send), and the read endpoints are defined in [`api-endpoints.md`](api-endpoints.md). Resolve `$ACCESS_TOKEN` / `$BASE_URL` / `$ORG` / `$TENANT` via the shared **Authentication** section in [`../SKILL.md`](../SKILL.md) before starting.
6
+
7
+ ## Step 1: Resolve the process
8
+
9
+ - If the caller gives a **process id**, use it directly.
10
+ - Otherwise search by name:
11
+ ```bash
12
+ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
13
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/automations?search=$QUERY&limit=20"
14
+ ```
15
+ If one clear match → use its `process_id`. If several → show a short list (name + id + owner) and ask the user to pick. If none → tell the user and stop.
16
+
17
+ ## Step 2: Fetch the process
18
+
19
+ ```bash
20
+ curl -s -w "\n%{http_code}" -H "Authorization: Bearer $ACCESS_TOKEN" \
21
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/automations/$PROCESS_ID"
22
+ ```
23
+ - **200** → keep the record; project to the useful fields for display (name, status/phase, category, owner, description). The raw record is large — don't dump it all unless asked.
24
+ - **401** → re-authenticate. **403** → the user can't view this process. **404** → no such process.
25
+
26
+ ## Step 3: Fetch the documents
27
+
28
+ ```bash
29
+ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
30
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/automations/$PROCESS_ID/documents"
31
+ ```
32
+
33
+ The list is under **`data.documents[]`** (standard envelope). Each entry carries `document_id`, `document_title`, `document_type_id`, and **either** a `file_id` (file-backed) **or** an `embed_link` (link-backed). *(Optional: `/automations/$PROCESS_ID/components` for linked components.)*
34
+
35
+ ## Step 3b: Download a document (when the caller wants the bytes)
36
+
37
+ Only **file-backed** documents can be downloaded, and the endpoint takes the **`file_id`** — not the `document_id`:
38
+
39
+ ```bash
40
+ curl -s -w "%{http_code}" -H "Authorization: Bearer $ACCESS_TOKEN" \
41
+ -o "<destination-path>" \
42
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/download/file/$FILE_ID"
43
+ ```
44
+
45
+ - The response body is the **raw file** (no JSON envelope) — always save with `-o`; pick the filename from `document_title` or ask the user.
46
+ - **200** → confirm the file exists and is non-empty before reporting success.
47
+ - A **link-backed** document (`file_id` absent) has nothing to download — present its `embed_link` to the user instead. Never invent a download URL for it.
48
+ - Do not guess other paths (`/documents/{id}/download`, `/files/{id}`, …) — `/download/file/{file_id}` is the only download route.
49
+
50
+ ## Step 4: Present
51
+
52
+ ```
53
+ Process: <name> (process_id: <id>)
54
+ Status: <phase/status>
55
+ Category: <category>
56
+ Owner: <owner>
57
+ View: {baseUrl}/{org}/{tenant}/automationhub_/automation-profile/{process_slug}/documentation
58
+ Documents:
59
+ - PDD (document_id 12, file_id 42 — downloadable)
60
+ - SDD (document_id 13, embed_link — link only)
61
+ ```
62
+
63
+ Offer to return the raw JSON, download the documents, or fetch components if relevant.
64
+
65
+ ## Notes
66
+
67
+ - **Cloud token only** — never send `x-ah-openapi-auth` / `x-ah-openapi-app-key`. You see exactly what the user's AH permissions allow.
68
+ - Read-only: this flow never writes. To create/attach, use the [`publish-process.md`](publish-process.md) flow.
69
+ - **Open dependency:** in a hosted runtime (Process Scribe/Delegate) the cloud token is expected via the environment (see the shared Authentication section). Confirm the runtime provides it before relying on it in production.
@@ -0,0 +1,171 @@
1
+ # Publish a Process to Automation Hub
2
+
3
+ Creates one process in Automation Hub from a schema-driven payload and attaches its documents (PDD/SDD). Authenticates with the **user's cloud token** — the user does **not** need an admin-generated OpenAPI token.
4
+
5
+ > Auth, base/gateway URL, headers (and the header to **never** send), and every endpoint below are defined in [`api-endpoints.md`](api-endpoints.md). Resolve `$ACCESS_TOKEN` / `$BASE_URL` / `$ORG` / `$TENANT` via the shared **Authentication** section in [`../SKILL.md`](../SKILL.md) before starting.
6
+
7
+ ## Step 1: Verify connectivity (and fetch the idea flows)
8
+
9
+ Verify the resolved token with a cheap call — this also fetches the idea flows you need next:
10
+
11
+ ```bash
12
+ curl -s -w "\n%{http_code}" \
13
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
14
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/idea-flows"
15
+ ```
16
+
17
+ - **200** → save the `data` array (reused in Step 2) and tell the user "Connected to Automation Hub."
18
+ - **401** → token missing/expired: if it came from `~/.uipath/.auth`, ask the user to run `uip login` again; re-resolve and retry. **Never** add `x-ah-openapi-auth` to "fix" a 401 — that routes to the admin-token path and guarantees failure.
19
+ - **403** → the user is authenticated but lacks AH access on this tenant.
20
+ - **404 / network** → wrong URL or AH not enabled; confirm the org/tenant.
21
+
22
+ Do not proceed until you have a 200.
23
+
24
+ ## Step 2: Pick the idea flow
25
+
26
+ From the saved `/idea-flows` `data` array:
27
+ 1. Default to the entry whose `Idea flow name` contains "Business Process" (case-insensitive) and take its `Idea flow ID`.
28
+ 2. If the caller specified a different flow, use that. If neither is found, list the available names + IDs and ask the user which to use. If none exist, tell the user Business Process flows may not be enabled and stop.
29
+
30
+ Store `idea_flow_id`.
31
+
32
+ ## Step 3: Fetch the schema
33
+
34
+ ```bash
35
+ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
36
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/idea-schema?idea_flow_id=$IDEA_FLOW_ID"
37
+ ```
38
+
39
+ Parse `data.properties.schema.properties` for the field catalog (Assessment Type > Section > Question; note types, required flags, enum `answer_option` codes/labels) and keep `data.user_inputs` as the payload template. The process-name question (key contains `OVERVIEW_NAME`) is **required**.
40
+
41
+ > ⚠️ **Do NOT POST `data.user_inputs` verbatim.** The template ships **example/placeholder values that the API rejects** — e.g. `OVERVIEW_CATEGORY: 1` (→ `Invalid Category Id`), a placeholder `PROCESS_DOCUMENTS` answer-option that triggers a backend `co_question_answer_option_value` crash, and `First.last@example.com` owner/submitter emails. Treat the template as **shape only** and replace every value with a real one (below).
42
+
43
+ ## Step 4: Collect the inputs, then assemble the payload
44
+
45
+ **Collect every required input BEFORE the first POST** — do not discover gaps one 400 at a time.
46
+
47
+ First, **enumerate the tenant's actual required set from the live schema** (Step 3): walk `data.properties.schema.properties` and collect every question whose `required` flag is set — tenant admins can mark **additional** questions required (commonly "Applications used" and "Thin applications used"), so the baseline table below is the *minimum*, never the whole list. Add the two questions the backend enforces without flagging (owner + submitter). Then resolve a value for **each** required question: from the caller's supplied data (e.g. a Process Scribe hand-off object), from the discovery recipes below, or via `AskUserQuestion` — never by inventing one.
48
+
49
+ The six baseline inputs:
50
+
51
+ | Input | How to resolve when not supplied |
52
+ |---|---|
53
+ | Process **name** | Ask the user. Non-empty; a duplicate name 409s. |
54
+ | **Description** | Ask the user, or derive from the supplied material and confirm. |
55
+ | **Category id** | `GET /hierarchy` → pick from `data.categories[]` (`category_id`, `category_name`, nested `subcategories`) — **only nodes with `category_is_active: 1`** (0 = archived). One clear fit → propose it; several plausible → `AskUserQuestion` with the names. **Never send the template's `1`.** (Works on an empty tenant — do not depend on an existing process.) |
56
+ | **Documentation** answer code | The `PROCESS_DOCUMENTS` question's own `enum` in the schema — match by **label** (e.g. "Standard Operating Procedure") and send that `answer_option` code. Never reuse the template's placeholder code. |
57
+ | **Owner email** | `GET /users` → the list is under `data.users[]`, the field is **`user_email`** (prefer `user_is_active: 1`); a non-listed address 400s (`Cannot identify owner by email`). Default to the signed-in user — confirm which listed email is theirs. |
58
+ | **Submitter email** | Same recipe as owner; usually the same person. |
59
+
60
+ **Tenant-required application questions** ("Applications used", "Thin applications used", and similar): the valid answers are the tenant's application inventory — `GET /appinventory` (paged; entries carry the app id, name, version, language). Match what the caller's material names, but if the documents leave the systems unconfirmed, `AskUserQuestion` with the inventory entries — **never record an application the material does not support**. Follow that question's own schema shape for how the selected entries are encoded in `user_inputs`.
61
+
62
+ Then build `user_inputs` using the template's **structure** but the **collected values**:
63
+ - Place each value in its `AssessmentType > section > question` slot.
64
+ - Follow the template's wrapping per field: most are `{ "value": <v> }`; owner/submitter questions take a **direct string** (no `value` wrapper).
65
+ - Convert enum labels to their `answer_option` codes taken from that field's own `enum` in the schema — **never** reuse the template's placeholder code. Send integers as numbers.
66
+
67
+ **Required fields for `idea_flow_id` = Business Process** (verified live — the backend enforces owner + submitter even though the schema's `required` flags do **not** list them):
68
+
69
+ | Question (key) | Section | Shape | Value |
70
+ |---|---|---|---|
71
+ | `OVR-OVERVIEW_NAME` | `ah-section-ovr-0-0` | `{"value": "<name>"}` | process name, non-empty |
72
+ | `OVR-OVERVIEW_DESCRIPTION` | `ah-section-ovr-0-0` | `{"value": "<desc>"}` | description |
73
+ | `OVR-OVERVIEW_CATEGORY` | `ah-section-ovr-0-0` | `{"value": <int>}` | **valid** category id |
74
+ | `OVR-PROCESS_DOCUMENTS` | `ah-section-ovr-0-0` | `{"value": ["<answer_option code>"]}` | code from the field's `enum` |
75
+ | `OVR-PROCESS_OWNER` | `ah-section-ovr-0-0` | `"<email>"` (direct string) | real AH user |
76
+ | `OVR-OVERVIEW_PROCESS_SUBMITTER` | `ah-section-ovr-0-1` | `"<email>"` (direct string) | real AH user |
77
+
78
+ Include only sections that have at least one populated field. Show the user a concise preview (name + key fields, and "show raw JSON" on request) and get a confirm before writing.
79
+
80
+ ## Step 5: Create the process
81
+
82
+ ```bash
83
+ curl -s -w "\n%{http_code}" -X POST \
84
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
85
+ -H "Content-Type: application/json" \
86
+ -d "$PAYLOAD" \
87
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/idea-from-schema"
88
+ ```
89
+ where `$PAYLOAD` is `{ "idea_flow_id": <id>, "user_inputs": { … } }`.
90
+
91
+ - **201** → the envelope is `{ "message": "Resource Created", "statusCode": 201, "data": { … } }` — read **`data.process_id`** (it is nested, NOT top-level). Keep it for Step 6. A 201 means the process WAS created: if a field read comes back undefined, re-read the response — **never re-POST** (that creates a duplicate and 409s).
92
+ - **400** → fix and retry. The message shapes seen live:
93
+ - `errorDetails: { "<question>": ["An answer selection is required…"] }` → that required field is missing/empty; add it.
94
+ - `errorDetails: {}` with `"Please fill in all the required information"` → a required field the API **won't name** is missing. Check in order: (1) owner (`OVR-PROCESS_OWNER`) / submitter (`OVR-OVERVIEW_PROCESS_SUBMITTER`) — enforced but never flagged; (2) **diff your payload against every `required`-flagged question in the live schema** — tenant admins add required questions (e.g. "Applications used" / "Thin applications used"), and a payload missing any of them gets this same generic 400. Fill the gaps (Step 4 recipes), then retry once.
95
+ - `"Invalid Category Id."` → `OVERVIEW_CATEGORY` isn't a real category on this tenant (see Step 4).
96
+ - `Cannot set properties of undefined (setting 'co_question_answer_option_value')` → an enum field carries an invalid `answer_option` code (you left a template placeholder in). Use a code from that field's `enum`.
97
+ - **401** → re-authenticate. **409** → duplicate name; ask the user for a new name or stop.
98
+
99
+ ## Step 6: Attach documents (PDD/SDD)
100
+
101
+ Attach each document the caller supplies — **default to all of them**; never silently skip a supplied file. The one exception: if two supplied files appear to be the *same document in different formats*, ask which to attach — as part of the single up-front clarifying round (Step 4), not a separate round. **Upload the bytes** — the endpoint takes a base64 `file` object directly, so nothing needs hosting first. Fall back to `embed_link` only when the caller has a URL instead of bytes.
102
+
103
+ ```bash
104
+ curl -s -w "\n%{http_code}" -X POST \
105
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
106
+ -H "Content-Type: application/json" \
107
+ -d "$DOC_PAYLOAD" \
108
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/automations/$PROCESS_ID/documents"
109
+ ```
110
+
111
+ Build `$DOC_PAYLOAD` per `ProcessDocumentValidator`:
112
+
113
+ ```json
114
+ {
115
+ "document_title": "PDD - <name>",
116
+ "document_description": "<desc>",
117
+ "document_type_id": <int>,
118
+ "file": {
119
+ "file_name": "<name>.docx",
120
+ "mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
121
+ "file_content": "<base64 of the file bytes>",
122
+ "file_encoding": "base64"
123
+ }
124
+ }
125
+ ```
126
+
127
+ - `document_title`, `document_description`, `document_type_id` are all required (the field is `document_title`, **not** `document_name`).
128
+ - **`document_type_id` comes from the fixed platform table in [`api-endpoints.md`](api-endpoints.md)** — PDD → `1`, SDD → `2`, otherwise `9` (MISC). Never guess other ids.
129
+ - Supply **exactly one** of `file` or `embed_link` — an XOR enforced in the handler, not the JSON schema. Both, or neither, 400s with `"One and only one of embed_link or file need to be specified."`
130
+ - **`file` (default).** Base64-encode the file and send `file_name`, `mimetype`, `file_content`, `file_encoding`. `file_encoding` must be the literal `base64` — any other value fails with `"Invalid file."`, as does an empty `file_name`, `mimetype`, or `file_content`. Body limit is 300mb.
131
+ - Common mimetypes: `.docx` → `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `.md` → `text/markdown`, `.pdf` → `application/pdf`.
132
+ - Generate the base64 without loading the file into the conversation:
133
+
134
+ ```bash
135
+ base64 -i "<FILE_PATH>" | tr -d '\n' # macOS/Linux; use `base64 -w0 "<FILE_PATH>"` on GNU coreutils
136
+ ```
137
+
138
+ - **`embed_link` (alternative).** Use only when the caller has a URL and no bytes: replace the `file` object with `"embed_link": "https://…"`. Never invent a URL.
139
+
140
+ Record each returned id — it is nested: read **`data.document_id`** from the response envelope. On 400, surface the validation message and continue with the remaining documents.
141
+
142
+ ## Step 7: Verify, then report
143
+
144
+ **Verify before claiming success** — read the process back and confirm the documents landed:
145
+
146
+ ```bash
147
+ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
148
+ "$BASE_URL/$ORG/$TENANT/automationhub_/api/v1/openapi/automations/$PROCESS_ID/documents"
149
+ ```
150
+
151
+ Check every attached `document_id` appears (file-backed entries also carry a `file_id`). If one is missing, report it as failed — never report a document as attached without seeing it in this list.
152
+
153
+ Then summarize. The report **MUST end with both View deep links** — they are not optional; a publish report without them is incomplete. The URL segment is `process_slug`: take it from the 201's `data.process_slug`, and **if you no longer have it, fetch it** — `GET /automations/{process_id}` returns the record with `process_slug`. URL-encode it. Emit the links only after the verification read-back above succeeded:
154
+
155
+ ```
156
+ Published to Automation Hub:
157
+ Process: <name> (process_id: <id>)
158
+ Documents: PDD ✓ (doc 12, file 42), SDD ✓ (doc 13, file 43)
159
+ View process: {baseUrl}/{org}/{tenant}/automationhub_/automation-profile/{process_slug}
160
+ View documents: {baseUrl}/{org}/{tenant}/automationhub_/automation-profile/{process_slug}/documentation
161
+ ```
162
+
163
+ Always build the links from the **same org/tenant** the process was created on — never another tenant's segments.
164
+
165
+ ## Notes
166
+
167
+ - **Cloud token only** — never send `x-ah-openapi-auth` / `x-ah-openapi-app-key`. Authorization is the user's real AH permissions.
168
+ - **Always** `POST /idea-from-schema` (not `/automations`) and **always** include `idea_flow_id`.
169
+ - The schema is fetched live, so the flow adapts automatically if fields change on the tenant.
170
+ - Idempotency: AH is the system of record for the *approved* process — publish once after approval. A duplicate name returns 409; decide up front whether to update-in-place (out of scope here) or treat as an error.
171
+ - To read a process back, use the [`get-process.md`](get-process.md) flow.
@@ -14,7 +14,7 @@ Build, debug, and deploy UiPath Coded Web Applications and Coded Action Apps usi
14
14
  - User wants to **build, debug, or deploy** a UiPath Coded Web App or Coded Action App
15
15
  - User asks about `uip codedapp` commands, `.uipath/` directory, `app.config.json`, or `action-schema.json`
16
16
  - User wants to **scaffold** a new React/Vue frontend for UiPath Cloud or an Action Center form
17
- - User wants to embed the **Document Understanding Validation Station** widget for human review of DU extraction results
17
+ - User asks for app UI that a **prebuilt UiPath widget** covers: review/correct Document Understanding extraction results (Validation Station), chat with a conversational agent, browse/edit a Data Fabric entity in a grid, upload files to a storage bucket, display a PDF, or sign in with an external IdP (Google/SAML)
18
18
  - User wants to **push/pull source** between local and Studio Web
19
19
  - User wants to use the `@uipath/uipath-typescript` SDK from a coded app
20
20
  - User wants to run the **full pipeline** (build → pack → publish → deploy)
@@ -28,7 +28,12 @@ Build, debug, and deploy UiPath Coded Web Applications and Coded Action Apps usi
28
28
  | **Coded Web App** | React/Vue/other frontend hosted on UiPath CDN | User-facing app accessed via a URL |
29
29
  | **Coded Action App** | React form wired to UiPath Action Center | Rendered inside human task reviews in Maestro/Agent workflows |
30
30
 
31
- > **Coded apps are not registered in `.uipx` solutions.** They have no `project.uiproj` / `project.json`, so `uip solution projects add` does not apply. A coded app can live alongside a solution directory but deploys independently via `uip codedapp publish` (and `uip codedapp deploy`), not via `uip solution pack` / `publish` / `deploy`.
31
+ > **Two lifecycles, two scaffolding entry points.**
32
+ >
33
+ > - **Standalone coded app**: scaffold with `npx create-vite@latest` (see [create-web-app.md](references/create-web-app.md) / [create-action-app.md](references/create-action-app.md)). No `project.uiproj` / `webAppManifest.json` — those are solution-membership artefacts and standalone apps don't need them. Deploy via `uip codedapp pack` → `uip codedapp publish` (`-t Action` for action apps) → `uip codedapp deploy`. This is the classic single-app lifecycle covered by the rest of this skill.
34
+ > - **In-solution coded app**: run `uip codedapp init` from **inside a `.uipx` solution**. Init writes `project.uiproj` (`ProjectType: "AppV2"`) + `webAppManifest.json`, nests runtime + build artefacts under `source/dist/`, auto-registers the project as `Type: "AppV2"` in the `.uipx`, and emits `resources/solution_folder/app/{Coded,CodedAction}/`. From then on the app is part of the solution — `uip solution pack` bundles its `.nupkg` and `uip solution deploy run` provisions it in the deployment folder. **Do not** run `uip codedapp pack` / `publish` / `deploy` on a coded app that's already registered in `.uipx` — that bypasses the solution's deploy config (external client ID, routing name, action schema) and double-registers the package. `uip solution projects add` / `uip solution projects import` register existing AppV2 folders too, reading `webAppManifest.config.isActionApp` to pick the `Coded` / `CodedAction` subType. For the solution-side lifecycle see [/uipath:uipath-solution](/uipath:uipath-solution).
35
+ >
36
+ > **`uip codedapp init` is for solutions only.** It is not the scaffolding entry point for a standalone coded app — use `create-vite` for that.
32
37
 
33
38
  ## Critical Rules
34
39
 
@@ -40,9 +45,9 @@ Build, debug, and deploy UiPath Coded Web Applications and Coded Action Apps usi
40
45
  6. **Action apps require `-t Action` on publish.** Run `uip codedapp publish -t Action` (not the default `Web` type).
41
46
  7. **Never handle access tokens manually.** Do not pass, print, parse, source, or set cached access tokens. Use `uip login` and supported `uip codedapp` commands; the CLI manages authentication.
42
47
  8. **Base URL must use the API subdomain.** `https://api.uipath.com` not `https://cloud.uipath.com`. See the table below.
43
- 9. **`vite.config.ts` must always set `base: './'`.** The platform handles URL routing — apps must use relative asset paths. Do not use a routing name or a sub-path here.
48
+ 9. **`vite.config.ts` must always set `base: './'`.** The platform handles URL routing — apps must use relative asset paths. Do not use a routing name or a sub-path here. **Import static assets through the bundler** (`import logo from './assets/logo.png'`) so Vite fingerprints and base-rewrites them. Do NOT place them in `public/` or reference them by a hardcoded `/`-rooted path — those bypass base rewriting and 404 after deploy under the non-root mount.
44
49
  10. **Use `getAppBase()` from `@uipath/uipath-typescript` for any absolute URL constructed at runtime** — router basename, image `src`, `fetch` paths. Deployed apps mount at a non-root prefix; `/`-rooted paths work locally but 404 after deploy. Vite's `base: './'` only fixes import-time references.
45
- 11. **`uip codedapp deploy` must run non-interactively.** Pass the folder key as `--folder-key <GUID>` (or as `UIPATH_FOLDER_KEY=<GUID>` env-var prefix — either works). The interactive folder picker fails in non-TTY contexts (CI, agent shells). If the user provides a folder **name**, resolve it to a key with `uip or folders list --output json` and match on the `Name` field (output rows are `{ Key, Name, Path, Description, Type, ParentKey }`). A **personal workspace** is the row with `Type == "Personal"` — resolve its `Key` the same way. To deploy into a **new** folder, create it first with `uip or folders create "<NAME>" --output json` and read `Data.Key`. The `uip or ...` commands require the Orchestrator tool — install once via `uip tools install @uipath/orchestrator-tool` (check first with `uip tools list`).
50
+ 11. **`uip codedapp deploy` must run non-interactively.** Pass the folder key as `--folder-key <GUID>` (or as `UIPATH_FOLDER_KEY=<GUID>` env-var prefix — either works). The interactive folder picker fails in non-TTY contexts (CI, agent shells). If the user provides a folder **name**, resolve it with the server-side filter `uip or folders list --all --name "<name>" --output json` and pick the row whose `Name` **exactly** equals the target, then read its `Key` (the plain list is paginated 50/page and `--name` is a *contains* match requiring `--all`, so never just take the first row). A **personal workspace** is not in `--all` — resolve it from the default `uip or folders list --output json` where `Type == "Personal"`. To deploy into a **new** folder, create it first with `uip or folders create "<NAME>" --output json` and read `Data.Key`. The `uip or ...` commands require the Orchestrator tool — install once via `uip tools install @uipath/orchestrator-tool` (check first with `uip tools list`).
46
51
  12. **Guard against text overflow in every UI.** See [patterns.md](references/patterns.md) "Preventing Text Overflow".
47
52
  13. **Inspect the DF schema before writing analytics, filters, or seeds.** Run `uip df entities get <ENTITY_ID> --output json` to inspect fields and types. At runtime, use `entities.getById(<id>)` from the app's authenticated session. DF doesn't behave like a typical RDBMS; see [sdk/data-fabric.md](references/sdk/data-fabric.md) "Anti-shapes & gotchas".
48
53
  14. **Every list call returns ONE page — even with no options. There is no "give me everything" path.** Applies to `getAll`, `getAllRecords`, `queryRecordsById`, `getFileMetaData`, etc. `getAll()` with no options does NOT return all rows; the SDK sends no `pageSize` and the **server** applies its own cap, wrapped in a misleadingly-named `NonPaginatedResponse`. To list every row from a source that may exceed the cap, you MUST loop the cursor: `while (page.hasNextPage) { page = await getAll({ cursor: page.nextCursor }) }` and accumulate `items`. Reading `result.items.length` after a single call is almost always a bug. See [sdk/pagination.md](references/sdk/pagination.md).
@@ -80,6 +85,11 @@ Build, debug, and deploy UiPath Coded Web Applications and Coded Action Apps usi
80
85
  | **Package and deploy** | [references/pack-publish-deploy.md](references/pack-publish-deploy.md) |
81
86
  | **Full CLI command reference** | [references/commands-reference.md](references/commands-reference.md) |
82
87
  | **Embed the DU Validation Station widget** | [references/widgets/validation-station.md](references/widgets/validation-station.md) |
88
+ | **Embed the Conversational Agent chat widget** | [references/widgets/conversational-agent-chat.md](references/widgets/conversational-agent-chat.md) |
89
+ | **Embed the Data Fabric DataTable widget** | [references/widgets/datatable.md](references/widgets/datatable.md) |
90
+ | **Embed the multi-file bucket upload widget** | [references/widgets/multi-file-upload.md](references/widgets/multi-file-upload.md) |
91
+ | **Embed the PDF viewer widget** | [references/widgets/pdf-viewer.md](references/widgets/pdf-viewer.md) |
92
+ | **Add external IdP sign-in buttons (Google/SAML)** | [references/widgets/external-auth.md](references/widgets/external-auth.md) |
83
93
  | **OAuth scopes for SDK services** | [references/oauth-scopes.md](references/oauth-scopes.md) |
84
94
  | **SDK: Import paths & subpath exports** | [references/sdk/imports.md](references/sdk/imports.md) |
85
95
  | **SDK: Assets, Queues, Buckets, Processes, Jobs, Attachments** | [references/sdk/orchestrator.md](references/sdk/orchestrator.md) |
@@ -123,19 +133,22 @@ uip login status --output json # check if logged in
123
133
  uip login # interactive OAuth (opens browser)
124
134
  uip login --authority https://alpha.uipath.com # non-production environments
125
135
 
126
- # Client-credentials (headless/CI) — MUST include Apps.Read Apps.Write or publish's
127
- # "Registering coded app" step fails with 401 even though package upload succeeds.
128
- # OR.Default alone is NOT sufficient — it covers Orchestrator but not the Apps service.
136
+ # Client-credentials (headless/CI) — scope MUST name one Orchestrator scope AND
137
+ # the two Apps-service scopes. Neither set covers the other:
138
+ # OR.Default → Orchestrator
139
+ # Apps.Read Apps.Write → Apps-service registration in `uip codedapp publish`
140
+ # Do NOT substitute granular Orchestrator scopes (OR.Folders/OR.Execution/
141
+ # OR.Administration) for OR.Default.
129
142
  uip login \
130
143
  --client-id <id> \
131
144
  --client-secret <secret> \
132
145
  --organization <org> \
133
146
  --tenant <tenant> \
134
- --scope "OR.Folders OR.Execution OR.Administration Apps.Read Apps.Write" \
147
+ --scope "OR.Default Apps.Read Apps.Write" \
135
148
  --authority https://alpha.uipath.com # omit --authority for production
136
149
  ```
137
150
 
138
- > **The `uip login` session scope is separate from the app's runtime OAuth scopes.** The scopes in `uipath.json` are what the *deployed app* requests at runtime (see [oauth-scopes.md](references/oauth-scopes.md)). The `--scope` on `uip login` above is what the *CLI session* needs to call the Apps registration API during `uip codedapp publish`. `uip codedapp publish` does two things: uploads the package (needs Orchestrator scopes) **and** registers the coded app (needs `Apps.Read Apps.Write`). Omitting the Apps scopes lets the upload succeed but silently 401s the registration.
151
+ > **The `uip login` session scope is separate from the app's runtime OAuth scopes.** The scopes in `uipath.json` are what the *deployed app* requests at runtime (see [oauth-scopes.md](references/oauth-scopes.md)). The `--scope` on `uip login` above is what the *CLI session* needs to call the Apps registration API during `uip codedapp publish`. `uip codedapp publish` does two things: uploads the package (needs `OR.Default`) **and** registers the coded app (needs `Apps.Read Apps.Write`). For what each failure looks like, see [debug.md](references/debug.md#publish--deploy-fails-under-a-client-credentials-login).
139
152
 
140
153
  ## SDK Config (web app)
141
154
 
@@ -161,7 +174,7 @@ To change any of these values, edit `uipath.json`.
161
174
 
162
175
  **Do NOT pause between steps to ask "should I continue?" — execute the full pipeline. Only stop if you need auth credentials or an app name.**
163
176
 
164
- 1. **Auth** — `uip login status --output json`. If not logged in, ask the user for their environment and run `uip login`. If using **client credentials** (headless/CI), always include `Apps.Read Apps.Write` in `--scope` — required by the Apps service registration inside `uip codedapp publish`. `OR.Default` alone covers Orchestrator (package upload) but not Apps registration; omitting them causes a silent 401 on the second half of publish.
177
+ 1. **Auth** — `uip login status --output json`. If not logged in, ask the user for their environment and run `uip login`. With **client credentials** (headless/CI), use `--scope "OR.Default Apps.Read Apps.Write"` — all three names are required: `OR.Default` for Orchestrator, `Apps.Read` and `Apps.Write` for the Apps-service registration in `uip codedapp publish`. The External Application itself needs only `Apps.Read` and `Apps.Write`; `OR.Default` is auto-granted and not portal-selectable, so name it in `--scope`. If publish or deploy then fails, see [debug.md](references/debug.md#publish--deploy-fails-under-a-client-credentials-login).
165
178
  2. **Build** — `npm run build`. Verify `ls dist/`.
166
179
  3. **Pack** — `uip codedapp pack dist -n <name> --version <version>`. Produces `.uipath/<name>.<version>.nupkg`. Bump version if previously published.
167
180
  4. **Publish** — `uip codedapp publish` (add `-t Action` for action apps). Verify `cat .uipath/app.config.json`.
@@ -189,7 +202,7 @@ See [references/debug.md](references/debug.md) for detailed diagnosis steps.
189
202
  |-------|-------|-----|
190
203
  | `Not authenticated` | No valid session | Run `uip login` |
191
204
  | `dist/ not found` | App not built | Run `npm run build` |
192
- | `Version already exists` | Same version re-published | Bump version in `pack` |
205
+ | `Published app with package name '<name>' and version '<version>' already exists` | Same name+version already published (registration rejects duplicates) | Bump `--version` and re-publish |
193
206
  | `Folder key required` / deploy hangs on prompt | Missing folder for CLI deploy | Resolve folder name → key via `uip or folders list --output json` (match on `Name`, read `Key`), then run `uip codedapp deploy --folder-key <GUID> ...`. See [pack-publish-deploy.md](references/pack-publish-deploy.md#folder-key). |
194
207
  | `No packages found` | No `.nupkg` in `.uipath/` | Run `pack` first |
195
208
  | Login fails / redirect error | OAuth misconfiguration | See [debug.md](references/debug.md) |