@uipath/skills 1.203.0-preview.886 → 1.203.0-preview.905
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hooks/send-telemetry.ps1
CHANGED
|
@@ -66,14 +66,16 @@
|
|
|
66
66
|
# values ever leave the machine.
|
|
67
67
|
#
|
|
68
68
|
# Non-blocking by contract: registered as an async hook in hooks.json
|
|
69
|
-
# ("async": true) on every event EXCEPT SessionEnd, so
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
69
|
+
# ("async": true) on every event EXCEPT SessionEnd, so the agent runs it in the
|
|
70
|
+
# background and never waits for it. SessionEnd is registered SYNCHRONOUSLY
|
|
71
|
+
# (30s timeout): async hooks still running at session teardown are killed after
|
|
72
|
+
# a short grace window — shorter than this hook's PowerShell + `uip track`
|
|
73
|
+
# startup — which would silently drop the session-end event. The hand-off
|
|
74
|
+
# therefore runs INLINE on every event: the HOST owns non-blocking dispatch, and
|
|
75
|
+
# detaching it here would defeat the synchronous SessionEnd registration by
|
|
76
|
+
# letting the hook return before `uip track` has flushed. Always exits 0 and
|
|
77
|
+
# swallows every error. Runs under Windows PowerShell 5.1 and PowerShell 7+
|
|
78
|
+
# (pwsh) on Windows, macOS, and Linux — no jq, node, or python.
|
|
77
79
|
#
|
|
78
80
|
# Structure: pure helpers (below), driven by Main (bottom). Configuration is
|
|
79
81
|
# env only:
|
|
@@ -455,11 +457,13 @@ function Main {
|
|
|
455
457
|
# disappears). Send no envelope, no `source` (the CLI overrides it), and no
|
|
456
458
|
# session id (the CLI resolves its own and drops a payload one).
|
|
457
459
|
#
|
|
458
|
-
#
|
|
459
|
-
#
|
|
460
|
-
#
|
|
461
|
-
#
|
|
462
|
-
#
|
|
460
|
+
# INLINE, never detached: hooks.json registers this hook async on every event
|
|
461
|
+
# except SessionEnd (see header), so the host — not this script — owns
|
|
462
|
+
# non-blocking dispatch. A detached hand-off would return before `uip track`
|
|
463
|
+
# flushed, silently dropping the very session-end event the synchronous
|
|
464
|
+
# SessionEnd registration exists to protect. `uip track` is never-fail (exits
|
|
465
|
+
# 0, emits nothing when telemetry is opted out); piping to it is harmless even
|
|
466
|
+
# if the CLI is absent (the catch swallows the command-not-found error).
|
|
463
467
|
try { $json | & uip track *> $null } catch { }
|
|
464
468
|
|
|
465
469
|
exit 0
|
package/hooks/send-telemetry.sh
CHANGED
|
@@ -67,13 +67,16 @@
|
|
|
67
67
|
# bash/PowerShell polyglot command.
|
|
68
68
|
#
|
|
69
69
|
# Non-blocking by contract: registered as an async hook in hooks.json
|
|
70
|
-
# ("async": true) on every event EXCEPT SessionEnd, so
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
# session-end event.
|
|
75
|
-
#
|
|
76
|
-
#
|
|
70
|
+
# ("async": true) on every event EXCEPT SessionEnd, so the agent runs it in the
|
|
71
|
+
# background and never waits for it. SessionEnd is registered SYNCHRONOUSLY
|
|
72
|
+
# (30s timeout): async hooks still running at session teardown are killed after
|
|
73
|
+
# a short grace window — shorter than `uip track` startup — which would silently
|
|
74
|
+
# drop the session-end event. The hand-off therefore runs INLINE on every event:
|
|
75
|
+
# the HOST owns non-blocking dispatch, and detaching it here would defeat the
|
|
76
|
+
# synchronous SessionEnd registration by letting the hook return before
|
|
77
|
+
# `uip track` has flushed. Always exits 0 and swallows every error.
|
|
78
|
+
# Cross-platform (macOS, Linux, Windows via Git Bash / MSYS). Pure bash +
|
|
79
|
+
# grep/sed/awk — no jq, node, or python.
|
|
77
80
|
#
|
|
78
81
|
# Structure: pure helpers + side-effecting procedures (below), driven by main()
|
|
79
82
|
# (bottom). Configuration is env only:
|
|
@@ -529,10 +532,14 @@ main() {
|
|
|
529
532
|
# disappears). Send no envelope, no `source` (the CLI overrides it), and no
|
|
530
533
|
# session id (the CLI resolves its own and drops a payload one).
|
|
531
534
|
#
|
|
532
|
-
#
|
|
533
|
-
#
|
|
534
|
-
#
|
|
535
|
-
|
|
535
|
+
# INLINE, never detached: hooks.json registers this hook async on every event
|
|
536
|
+
# except SessionEnd (see header), so the host — not this script — owns
|
|
537
|
+
# non-blocking dispatch. A detached hand-off would return before `uip track`
|
|
538
|
+
# flushed, silently dropping the very session-end event the synchronous
|
|
539
|
+
# SessionEnd registration exists to protect. `uip track` is never-fail (exits
|
|
540
|
+
# 0, emits nothing when telemetry is opted out); piping to it is harmless even
|
|
541
|
+
# if the CLI is absent.
|
|
542
|
+
printf '%s' "$(build_event_json)" | uip track >/dev/null 2>&1
|
|
536
543
|
|
|
537
544
|
exit 0
|
|
538
545
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/skills",
|
|
3
|
-
"version": "1.203.0-preview.
|
|
3
|
+
"version": "1.203.0-preview.905",
|
|
4
4
|
"description": "UiPath agent skills for Claude Code, Codex, Cursor, Copilot, Gemini and OpenCode — RPA, UI automation, UI testing, coded agents/apps/workflows, and troubleshooting. Distributed as the UiPath Claude Code plugin.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "UiPath"
|
|
@@ -86,6 +86,16 @@ Then re-read `uip ah applications list` and use the new ids in the answer.
|
|
|
86
86
|
|
|
87
87
|
Write the answers to `./ah-answers.json` as the filled `user_inputs` structure (the CLI accepts the whole schema-get document or just the answers map). Wrapping rules unchanged: most fields `{ "value": <v> }`; owner/submitter are **direct strings**; enum codes from that field's own `enum`; integers as numbers. Show the user a concise preview and get a confirm before writing.
|
|
88
88
|
|
|
89
|
+
### Preflight: check the answers against the schema
|
|
90
|
+
|
|
91
|
+
`ah-schema.json` is the same document the service validates against, so check `ah-answers.json` against it locally **before** creating:
|
|
92
|
+
|
|
93
|
+
1. **Required answers present** — every question the schema flags `required`, plus owner and submitter (enforced but never flagged), has a non-empty value. Take requiredness from *this tenant's* schema, never from a fixed list: the same Business Process flow requires `COUNT_APPS` on one tenant and rejects it on another.
|
|
94
|
+
2. **Enum codes verbatim** — every enum answer (Documentation, application questions, any select) is a code that appears exactly in that question's own `enum`. Copy it; never retype it. A code with a dropped segment (`…-ovrbp-0-3-5` instead of `…-ovrbp-0-3-0-5`) is rejected as an unnamed required-field error, not as a bad code.
|
|
95
|
+
3. **No placeholders left** — no `Sample input`, no `First.last@example.com`, no template category `1` unless the tenant's tree really has it.
|
|
96
|
+
|
|
97
|
+
Fix anything found locally, then create. This costs nothing on a correct payload and turns the two unnamed `400`s below into a named local fix.
|
|
98
|
+
|
|
89
99
|
## Step 5: Create the process
|
|
90
100
|
|
|
91
101
|
```bash
|
|
@@ -93,7 +103,7 @@ uip ah automations create --from-schema --idea-flow-id $IDEA_FLOW_ID --file ./ah
|
|
|
93
103
|
```
|
|
94
104
|
|
|
95
105
|
- `Result: Success` → **`Data.Id`** is the new process id. A success means it WAS created — never re-run on a confusing field read (that duplicates).
|
|
96
|
-
- `ValidationError`/`Failure` → the `Message`/`Instructions` carry the service's validation text; the same causes as the API flow apply (unnamed required
|
|
106
|
+
- `ValidationError`/`Failure` → the `Message`/`Instructions` carry the service's validation text; the same causes as the API flow apply (unnamed `Please fill in all the required information` → re-run the preflight: a missing required answer or an enum code that is not verbatim from the schema; `Invalid Category Id`; `Cannot set properties of undefined (setting 'co_question_answer_option_value')` → the payload shape is off: an answer code the schema does not know, or the answers not wrapped as `user_inputs`). Fix and retry **once**.
|
|
97
107
|
- `Cannot identify owner by email` → **not a typo'd address; do not retry with a different email.** The account is authenticated but has never been activated on this tenant. Confirm with `uip ah auth-info get` — `IsActive: 1` plus a role list proves the identity is real — then tell them to open Automation Hub in a browser once and sign in, and retry unchanged:
|
|
98
108
|
|
|
99
109
|
```
|
|
@@ -89,6 +89,8 @@ Then build `user_inputs` using the template's **structure** but the **collected
|
|
|
89
89
|
|
|
90
90
|
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.
|
|
91
91
|
|
|
92
|
+
**Preflight before creating:** validate the payload against the schema you fetched — every `required`-flagged question plus owner/submitter answered; every enum answer a code copied **verbatim** from that question's own `enum` (a code with a dropped segment is rejected as an unnamed required-field error); no template placeholders left. Requiredness comes from *this tenant's* schema, never a fixed list — the same flow requires `COUNT_APPS` on one tenant and rejects it on another.
|
|
93
|
+
|
|
92
94
|
## Step 5: Create the process
|
|
93
95
|
|
|
94
96
|
```bash
|
package/version-manifest.json
CHANGED