@uipath/skills 1.199.0-preview.218 → 1.199.0-preview.245

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.
@@ -20,7 +20,12 @@
20
20
  # the event name, the authenticated cloud identity, the `source:
21
21
  # "skills-plugin"` dimension, and — since UiPath/cli#2806 — the
22
22
  # environment/base_url/region base dimensions stamped fresh on every event
23
- # from its own auth context (so this hook sends no environment info). This
23
+ # from its own auth context (so this hook sends no environment info). Since
24
+ # UiPath/cli#3431 the CLI also owns the session id: it resolves one per process
25
+ # (UIPATH_SESSION_ID, else an inherited agent/terminal handle) and puts it on
26
+ # App Insights' native ai.session.id tag, and `uip track` no longer accepts a
27
+ # session id from the payload — so this hook sends none. Correlation comes from
28
+ # set-session-env.ps1, which exports UIPATH_SESSION_ID for the session. This
24
29
  # hook only derives + sanitizes fields and gates on the opt-out flag; value
25
30
  # sanitization stays the hook's responsibility because the CLI and skills
26
31
  # ship co-versioned.
@@ -31,7 +36,7 @@
31
36
  # JSON-shaped text (`"success":false`, `uip solution publish`, `.flow"`,
32
37
  # `"resolvedModel":"..."`). So the payload is parsed as real JSON
33
38
  # (ConvertFrom-Json) and each field is read ONLY from the region it lives in:
34
- # ENVELOPE (top-level) -> toolName, toolUseId, session_id, permissionMode,
39
+ # ENVELOPE (top-level) -> toolName, toolUseId, permissionMode,
35
40
  # durationMs, effortLevel (effort.level), agentType,
36
41
  # source (-> session_source), reason (session-end),
37
42
  # model (-> agent_model; Claude sends it on
@@ -83,8 +88,11 @@ $ErrorActionPreference = 'SilentlyContinue'
83
88
  # eventName / session_source / reason / agent_model keys, renames
84
89
  # sessionId -> session_id (canonical casing, matches the CLI command stream,
85
90
  # UiPath/cli#2800), and drops environment/baseUrl (the CLI stamps fresh
86
- # environment/base_url/region base dimensions itself, UiPath/cli#2806).
87
- $SCHEMA_VERSION = 2
91
+ # environment/base_url/region base dimensions itself, UiPath/cli#2806). v3:
92
+ # drops session_id — the session is no longer a custom dimension; the CLI puts
93
+ # its own per-process id on the native ai.session.id tag and `uip track`
94
+ # rejects a payload session id (UiPath/cli#3431).
95
+ $SCHEMA_VERSION = 3
88
96
 
89
97
  # --- extraction helpers ------------------------------------------------------
90
98
 
@@ -270,7 +278,6 @@ function Main {
270
278
  $hookEvent = [string](Get-Prop $payload 'hook_event_name')
271
279
  $tool = [string](Get-Prop $payload 'tool_name')
272
280
  $toolUseId = [string](Get-Prop $payload 'tool_use_id')
273
- $sessionId = [string](Get-Prop $payload 'session_id')
274
281
  $permissionMode = [string](Get-Prop $payload 'permission_mode')
275
282
  $durationMs = Get-Prop $payload 'duration_ms'
276
283
  $agentType = [string](Get-Prop $payload 'agent_type')
@@ -364,7 +371,6 @@ function Main {
364
371
  @('effortLevel', 's', $effortLevel),
365
372
  @('skillsVersion', 's', $skillsVer),
366
373
  @('toolUseId', 's', $toolUseId),
367
- @('session_id', 's', $sessionId),
368
374
  @('subagentModel', 's', $subagentModel),
369
375
  @('subagentType', 's', $subagentType),
370
376
  @('agentType', 's', $agentType),
@@ -383,7 +389,8 @@ function Main {
383
389
  # the uip.skills.<event> name, stamps source: "skills-plugin", attaches the
384
390
  # authenticated cloud identity + CLI app version, owns transport + flush,
385
391
  # redacts PII, and drops any non-scalar value (so a null durationMs
386
- # disappears). Send no envelope and no `source` (the CLI overrides it).
392
+ # disappears). Send no envelope, no `source` (the CLI overrides it), and no
393
+ # session id (the CLI resolves its own and drops a payload one).
387
394
  #
388
395
  # `uip track` is never-fail (exits 0, emits nothing when telemetry is opted
389
396
  # out); piping to it is harmless even if the CLI is absent (the catch
@@ -16,7 +16,12 @@
16
16
  # the event name, the authenticated cloud identity, the `source:
17
17
  # "skills-plugin"` dimension, and — since UiPath/cli#2806 — the
18
18
  # environment/base_url/region base dimensions stamped fresh on every event
19
- # from its own auth context (so this hook sends no environment info). This
19
+ # from its own auth context (so this hook sends no environment info). Since
20
+ # UiPath/cli#3431 the CLI also owns the session id: it resolves one per process
21
+ # (UIPATH_SESSION_ID, else an inherited agent/terminal handle) and puts it on
22
+ # App Insights' native ai.session.id tag, and `uip track` no longer accepts a
23
+ # session id from the payload — so this hook sends none. Correlation comes from
24
+ # set-session-env.sh, which exports UIPATH_SESSION_ID for the session. This
20
25
  # hook only derives + sanitizes fields and gates on the opt-out flag; value
21
26
  # sanitization stays the hook's responsibility because the CLI and skills
22
27
  # ship co-versioned.
@@ -27,7 +32,7 @@
27
32
  # contains JSON-shaped text (`"success":false`, `uip solution publish`,
28
33
  # `.flow"`, `"resolvedModel":"..."`). So a single string-aware awk pass walks
29
34
  # the JSON once and pulls each field ONLY from the region it lives in:
30
- # ENVELOPE (top-level) -> toolName, toolUseId, session_id, permissionMode,
35
+ # ENVELOPE (top-level) -> toolName, toolUseId, permissionMode,
31
36
  # durationMs, effortLevel (effort.level), agentType,
32
37
  # source (-> session_source), reason (session-end),
33
38
  # model (-> agent_model; Claude sends it on
@@ -83,8 +88,11 @@ set +e
83
88
  # eventName / session_source / reason / agent_model keys, renames
84
89
  # sessionId -> session_id (canonical casing, matches the CLI command stream,
85
90
  # UiPath/cli#2800), and drops environment/baseUrl (the CLI stamps fresh
86
- # environment/base_url/region base dimensions itself, UiPath/cli#2806).
87
- SCHEMA_VERSION=2
91
+ # environment/base_url/region base dimensions itself, UiPath/cli#2806). v3:
92
+ # drops session_id — the session is no longer a custom dimension; the CLI puts
93
+ # its own per-process id on the native ai.session.id tag and `uip track`
94
+ # rejects a payload session id (UiPath/cli#3431).
95
+ SCHEMA_VERSION=3
88
96
 
89
97
  # --- extraction ------------------------------------------------------------
90
98
 
@@ -99,7 +107,7 @@ extract_fields() {
99
107
  awk '
100
108
  function interesting(k, d, c) {
101
109
  if (d == 1)
102
- return (k=="tool_name"||k=="tool_use_id"||k=="session_id"|| \
110
+ return (k=="tool_name"||k=="tool_use_id"|| \
103
111
  k=="permission_mode"||k=="duration_ms"||k=="agent_type"|| \
104
112
  k=="hook_event_name"||k=="source"||k=="reason"||k=="model")
105
113
  if (d == 2 && c == "input")
@@ -198,7 +206,7 @@ extract_fields() {
198
206
  # while loop runs in the current shell (here-doc, not a pipe), so the
199
207
  # assignments persist.
200
208
  read_fields() {
201
- event=""; tool=""; tool_use_id=""; session_id=""; permission_mode=""
209
+ event=""; tool=""; tool_use_id=""; permission_mode=""
202
210
  duration_ms=""; agent_type=""; skill=""; command=""; file_path=""
203
211
  subagent_type=""; interrupted=""; success=""; resolved_model=""
204
212
  effort_level=""; response_seen=""; session_source=""; reason=""
@@ -209,7 +217,6 @@ read_fields() {
209
217
  hook_event_name) event="$v" ;;
210
218
  tool_name) tool="$v" ;;
211
219
  tool_use_id) tool_use_id="$v" ;;
212
- session_id) session_id="$v" ;;
213
220
  permission_mode) permission_mode="$v" ;;
214
221
  duration_ms) duration_ms="$v" ;;
215
222
  agent_type) agent_type="$v" ;;
@@ -381,7 +388,6 @@ permissionMode|s|$permission_mode
381
388
  effortLevel|s|$effort_level
382
389
  skillsVersion|s|$skills_ver
383
390
  toolUseId|s|$tool_use_id
384
- session_id|s|$session_id
385
391
  subagentModel|s|$subagent_model
386
392
  subagentType|s|$subagent_type
387
393
  agentType|s|$agent_type
@@ -458,7 +464,6 @@ main() {
458
464
  effort_level="$(san "$effort_level")"
459
465
  skills_ver="$(san "$skills_ver")"
460
466
  tool_use_id="$(san "$tool_use_id")"
461
- session_id="$(san "$session_id")"
462
467
  subagent_model="$(san "$subagent_model")"
463
468
  subagent_type="$(san "$subagent_type")"
464
469
  agent_type="$(san "$agent_type")"
@@ -470,7 +475,8 @@ main() {
470
475
  # the uip.skills.<event> name, stamps source: "skills-plugin", attaches the
471
476
  # authenticated cloud identity + CLI app version, owns transport + flush,
472
477
  # redacts PII, and drops any non-scalar value (so a null durationMs
473
- # disappears). Send no envelope and no `source` (the CLI overrides it).
478
+ # disappears). Send no envelope, no `source` (the CLI overrides it), and no
479
+ # session id (the CLI resolves its own and drops a payload one).
474
480
  #
475
481
  # Detached subshell ( cmd & ) survives this hook's exit so the agent never
476
482
  # waits. `uip track` is never-fail (exits 0, emits nothing when telemetry is
@@ -6,10 +6,12 @@
6
6
  # Reads the SessionStart payload on stdin, takes its top-level `session_id`,
7
7
  # and appends `export UIPATH_SESSION_ID='<id>'` to $env:CLAUDE_ENV_FILE so
8
8
  # every subsequent shell tool subprocess — and therefore every `uip` command
9
- # the agent runs — inherits it. The CLI stamps that value as the `session_id`
10
- # dimension on native command telemetry (UiPath/cli#2800), which joins the
11
- # command stream with the skills events emitted by send-telemetry.ps1: both
12
- # streams then carry the same session id.
9
+ # the agent runs — inherits it. The CLI puts that value on App Insights'
10
+ # native `ai.session.id` tag (query it as `session_Id`) for every command it
11
+ # runs, including the `uip track` calls made by send-telemetry.ps1
12
+ # (UiPath/cli#3431) — so the command stream and the skills events share one
13
+ # session id. This export is the ONLY way they correlate: since schema v3 the
14
+ # telemetry hook sends no session id of its own.
13
15
  #
14
16
  # Registered SYNCHRONOUSLY in hooks.json (no "async": true): the write must
15
17
  # complete before the session's first shell call, or early `uip` commands
@@ -8,10 +8,12 @@
8
8
  # Reads the SessionStart payload on stdin, takes its top-level `session_id`,
9
9
  # and appends `export UIPATH_SESSION_ID='<id>'` to $CLAUDE_ENV_FILE so every
10
10
  # subsequent Bash tool subprocess — and therefore every `uip` command the
11
- # agent runs — inherits it. The CLI stamps that value as the `session_id`
12
- # dimension on native command telemetry (UiPath/cli#2800), which joins the
13
- # command stream with the skills events emitted by send-telemetry.sh: both
14
- # streams then carry the same session id.
11
+ # agent runs — inherits it. The CLI puts that value on App Insights' native
12
+ # `ai.session.id` tag (query it as `session_Id`) for every command it runs,
13
+ # including the `uip track` calls made by send-telemetry.sh (UiPath/cli#3431)
14
+ # — so the command stream and the skills events share one session id. This
15
+ # export is the ONLY way they correlate: since schema v3 the telemetry hook
16
+ # sends no session id of its own.
15
17
  #
16
18
  # Registered SYNCHRONOUSLY in hooks.json (no "async": true): the write must
17
19
  # complete before the session's first Bash call, or early `uip` commands would
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/skills",
3
- "version": "1.199.0-preview.218",
3
+ "version": "1.199.0-preview.245",
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"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "skillsVersion": "1.199.0-preview.218",
3
+ "skillsVersion": "1.199.0-preview.245",
4
4
  "targetCli": "^1.199.0"
5
5
  }