@uipath/solution-tool 1.204.0 → 1.205.0-preview.258

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 (122) hide show
  1. package/README.md +3 -3
  2. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  3. package/dist/archive-extract-x35t9ktj.js +120 -0
  4. package/dist/cleanup-command-service-rc5e42hk.js +149 -0
  5. package/dist/deploy-delete-service-qdbtj3qd.js +25 -0
  6. package/dist/deploy-run-service-m9mg34n5.js +25 -0
  7. package/dist/{deploy-status-service-3req7hje.js → deploy-status-service-kz3nk43q.js} +41 -33
  8. package/dist/deploy.js +23 -17
  9. package/dist/{deployment-search-3mah6f0a.js → deployment-search-jvwyaqek.js} +16 -10
  10. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  11. package/dist/{feed-resolver-bxj9xkgr.js → feed-resolver-3xb7ayx4.js} +10 -9
  12. package/dist/feed-scope-failure-qps17dv3.js +19 -0
  13. package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
  14. package/dist/governance-options-amc1v319.js +32 -0
  15. package/dist/index-6wak6hg6.js +667 -0
  16. package/dist/index-prm27bvm.js +138 -0
  17. package/dist/index.js +27 -29
  18. package/dist/init.js +11 -10
  19. package/dist/{list-s5pkkefj.js → list-7jy11vb4.js} +10 -8
  20. package/dist/models/pack-command-types.d.ts +15 -0
  21. package/dist/node-p1scvsw8.js +86 -0
  22. package/dist/pack-command-service-8etwpgm9.js +35 -0
  23. package/dist/pack-project-hjvbvhgx.js +97 -0
  24. package/dist/pack.js +24 -14
  25. package/dist/package-id-c18sx4mz.js +13 -0
  26. package/dist/packager-tool-09fwj7e8.js +171 -0
  27. package/dist/{packager-tool-nfmygm61.js → packager-tool-361zx07h.js} +74 -23
  28. package/dist/packager-tool-37jmavap.js +42 -0
  29. package/dist/{packager-tool-px1j9kre.js → packager-tool-3bwnkjdq.js} +2 -2
  30. package/dist/{packager-tool-gb35b4qs.js → packager-tool-43ahv5mn.js} +192 -96
  31. package/dist/packager-tool-47wzvqw0.js +86 -0
  32. package/dist/{packager-tool-gfhdpkp3.js → packager-tool-4bq36bf5.js} +25 -4
  33. package/dist/packager-tool-4jekgh4s.js +517 -0
  34. package/dist/{packager-tool-zns6n8zp.js → packager-tool-5ddtwzva.js} +1 -1
  35. package/dist/packager-tool-5edvzz80.js +543 -0
  36. package/dist/packager-tool-5y09xhx5.js +1333 -0
  37. package/dist/packager-tool-60af1hw2.js +26 -0
  38. package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
  39. package/dist/{packager-tool-kdwsw2x7.js → packager-tool-69jmxeh0.js} +196 -1519
  40. package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
  41. package/dist/{packager-tool-stsnbewn.js → packager-tool-6x35kvbx.js} +17 -8
  42. package/dist/packager-tool-6ybywxxn.js +1809 -0
  43. package/dist/{packager-tool-wfkv9v8b.js → packager-tool-85pen8t9.js} +2196 -3455
  44. package/dist/packager-tool-8ptbmmmp.js +2132 -0
  45. package/dist/{packager-tool-9ex75r32.js → packager-tool-8q4tvv8d.js} +6 -4
  46. package/dist/packager-tool-8rg0s4w9.js +109 -0
  47. package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
  48. package/dist/packager-tool-act5r386.js +239 -0
  49. package/dist/packager-tool-amhyxzz6.js +125 -0
  50. package/dist/{packager-tool-j3520gxw.js → packager-tool-an5bpbwe.js} +3556 -1646
  51. package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
  52. package/dist/packager-tool-bqw7edje.js +188 -0
  53. package/dist/{packager-tool-4gs8y6pr.js → packager-tool-dwxswyv4.js} +149 -53
  54. package/dist/{packager-tool-fehvgd51.js → packager-tool-e7vczxa8.js} +357 -1370
  55. package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
  56. package/dist/packager-tool-gs3f3tf7.js +103 -0
  57. package/dist/packager-tool-kkfb5kgn.js +182 -0
  58. package/dist/{packager-tool-ds45xby2.js → packager-tool-m74zqwmh.js} +104 -14
  59. package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
  60. package/dist/packager-tool-q5j6k3fy.js +1510 -0
  61. package/dist/packager-tool-qk21gk5m.js +445 -0
  62. package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
  63. package/dist/packager-tool-resolver-994z3jkj.js +23 -0
  64. package/dist/{packager-tool-gab9y5ct.js → packager-tool-t8gh825q.js} +37 -13
  65. package/dist/{packager-tool-kswwd3hp.js → packager-tool-tx834spe.js} +2376 -4077
  66. package/dist/{packager-tool-zf3929se.js → packager-tool-v1f5e8t9.js} +11 -1
  67. package/dist/{packager-tool-g8kjzrg7.js → packager-tool-wknfv4p5.js} +13 -11
  68. package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
  69. package/dist/packager-tool-y2k2f6yg.js +68 -0
  70. package/dist/packager-tool.js +2 -2
  71. package/dist/prepare-solution-resources-m1djfj62.js +29 -0
  72. package/dist/project-command-utils-t6pmpvq3.js +90 -0
  73. package/dist/project-contributions-79ndycrx.js +32 -0
  74. package/dist/publish.js +13 -12
  75. package/dist/resource-mutations-c3krjqze.js +36 -0
  76. package/dist/resource-version-lookup-0e3e2j58.js +99 -0
  77. package/dist/resource.js +10 -9
  78. package/dist/restore-command-service-eyx911f2.js +155 -0
  79. package/dist/run-service-p1vzzqe3.js +428 -0
  80. package/dist/services/deploy-activate-service.d.ts +10 -5
  81. package/dist/services/deploy-delete-service.d.ts +8 -4
  82. package/dist/services/deploy-run-service.d.ts +34 -1
  83. package/dist/services/deploy-uninstall-service.d.ts +21 -3
  84. package/dist/services/deploy-upgrade-service.d.ts +35 -1
  85. package/dist/services/deployment-feed-locator.d.ts +15 -4
  86. package/dist/services/deployment-search-client.d.ts +5 -53
  87. package/dist/services/deployment-search.d.ts +58 -3
  88. package/dist/services/deployment-state.d.ts +84 -24
  89. package/dist/services/deployment-validation.d.ts +5 -0
  90. package/dist/services/emit-runtime-dependencies.d.ts +2 -1
  91. package/dist/services/feed-resolver.d.ts +6 -4
  92. package/dist/services/feed-selection.d.ts +47 -0
  93. package/dist/services/http-status.d.ts +2 -7
  94. package/dist/services/pack-command-service.d.ts +9 -0
  95. package/dist/services/pack-project-selection.d.ts +51 -0
  96. package/dist/services/pack-project.d.ts +26 -0
  97. package/dist/services/pack-service.d.ts +7 -3
  98. package/dist/services/package-search-client.d.ts +7 -0
  99. package/dist/services/packager-tool-resolver.d.ts +7 -1
  100. package/dist/services/packages-list-service.d.ts +1 -1
  101. package/dist/services/permanent-deletion-consent.d.ts +110 -0
  102. package/dist/services/pipeline-deploy-poll.d.ts +7 -0
  103. package/dist/services/prepare-solution-resources.d.ts +12 -2
  104. package/dist/services/project-contributions.d.ts +5 -4
  105. package/dist/services/search-failure.d.ts +9 -13
  106. package/dist/services/solution-packager-helpers.d.ts +5 -2
  107. package/dist/services/solution-path.d.ts +1 -1
  108. package/dist/services/uninstall-consent.d.ts +82 -0
  109. package/dist/ship-telemetry-myes7ak5.js +21 -0
  110. package/dist/solution-auth-aead70sw.js +11 -0
  111. package/dist/templates/AGENTS.md +125 -12
  112. package/dist/tool.js +27 -29
  113. package/dist/utils/deployment-errors.d.ts +9 -1
  114. package/package.json +2 -2
  115. package/dist/deploy-delete-service-1zydyyhj.js +0 -22
  116. package/dist/feed-scope-failure-2kndwpf6.js +0 -18
  117. package/dist/packager-tool-f2e9rzxk.js +0 -104
  118. package/dist/packager-tool-resolver-6zwhec62.js +0 -20
  119. package/dist/packager-tool-zdfn32bc.js +0 -4465
  120. package/dist/prepare-solution-resources-jpb5as2s.js +0 -25
  121. package/dist/project-contributions-6wpff2hm.js +0 -30
  122. package/dist/services/legacy-deployment-search-v3.d.ts +0 -23
@@ -1,6 +1,7 @@
1
1
  import { type CliErrorCode, type RetryHint } from "@uipath/common";
2
2
  import { type PendingResource } from "./deployment-state";
3
3
  import { type FeedScope } from "./feed-resolver";
4
+ import { type PermanentDeletionResource } from "./permanent-deletion-consent";
4
5
  /** Discriminator for {@link DeployFailure}; library callers can ignore the tag and read `.message`/`.instructions`. */
5
6
  export type DeployFailureReason = "auth_failed"
6
7
  /**
@@ -41,7 +42,16 @@ export type DeployFailureReason = "auth_failed"
41
42
  /** Activation poll didn't reach a terminal state. */
42
43
  | "activation_poll_failed"
43
44
  /** Activation reached a terminal state but it was a failure. */
44
- | "activation_failed";
45
+ | "activation_failed"
46
+ /**
47
+ * The server wants the permanent deletion of installed resources replaced
48
+ * by links confirmed (schedule error 4026), and `acknowledgePermanentDeletion`
49
+ * was not set, the resources could not be listed, or the re-run after
50
+ * acknowledging them was refused again. Nothing was installed.
51
+ */
52
+ | "permanent_deletion_confirmation_required"
53
+ /** Acknowledging a flagged resource failed; the install was not re-run. */
54
+ | "acknowledge_failed";
45
55
  export interface DeployOptions {
46
56
  /** Override the active tenant for auth + folder-lookup. The CLI's deprecated `--tenant` flag flows through here. */
47
57
  tenant?: string;
@@ -85,6 +95,15 @@ export interface DeployOptions {
85
95
  * that really do want a second, independent copy opt in here.
86
96
  */
87
97
  yes?: boolean;
98
+ /**
99
+ * Confirm that installed resources this deployment replaces with a link
100
+ * are permanently deleted with their data. Without it a deploy the server
101
+ * stops for that confirmation fails with
102
+ * `permanent_deletion_confirmation_required` and lists them; with it they
103
+ * are acknowledged and the identical install runs once more, inside the
104
+ * same `timeout`.
105
+ */
106
+ acknowledgePermanentDeletion?: boolean;
88
107
  /** Host-side cancellation for both poll loops (e.g. VS Code's cancel button); replaces `processContext.pollSignal`. */
89
108
  signal?: AbortSignal;
90
109
  }
@@ -131,6 +150,11 @@ export interface DeploySuccess {
131
150
  packageVersion?: string;
132
151
  /** Which feed the deploy targeted — drives telemetry `target`. */
133
152
  feedKind: FeedScope["kind"];
153
+ /**
154
+ * The installed resources acknowledged for permanent deletion before the
155
+ * install that succeeded (`kind 'name'`). Absent when none were.
156
+ */
157
+ permanentlyDeletedResources?: string[];
134
158
  }
135
159
  export interface DeployFailure {
136
160
  ok: false;
@@ -152,6 +176,15 @@ export interface DeployFailure {
152
176
  */
153
177
  errorCode?: CliErrorCode;
154
178
  retry?: RetryHint;
179
+ /** The refused attempt's draft, on a permanent-deletion refusal. */
180
+ deploymentKey?: string;
181
+ /** What the server wants confirmed, on a permanent-deletion refusal. */
182
+ permanentDeletionResources?: PermanentDeletionResource[];
183
+ /**
184
+ * Resources already acknowledged for permanent deletion when the deploy
185
+ * failed after the install that deleted them (activation failures).
186
+ */
187
+ permanentlyDeletedResources?: string[];
155
188
  }
156
189
  export type DeployResult = DeploySuccess | DeployFailure;
157
190
  /**
@@ -1,5 +1,10 @@
1
1
  import { type CliErrorCode, type RetryHint } from "@uipath/common";
2
- export type UninstallDeploymentFailureReason = "auth_failed" | "uninstall_request_failed"
2
+ import { type FeedSelectionFlags } from "./feed-selection";
3
+ export type UninstallDeploymentFailureReason = "auth_failed"
4
+ /** `--feed` named no feed this session can reach. */
5
+ | "feed_resolution_failed"
6
+ /** `--feed` / `--personal-workspace` with a session the server would not scope. */
7
+ | "feed_requires_user_session" | "uninstall_request_failed"
3
8
  /**
4
9
  * Orchestrator refused the uninstall because the deployment still had an
5
10
  * operation running, and it was still running when the wait ran out —
@@ -9,8 +14,13 @@ export type UninstallDeploymentFailureReason = "auth_failed" | "uninstall_reques
9
14
  /** Uninstall poll didn't reach a terminal state — recommended exit 2 (CI distinguishability). */
10
15
  | "poll_timeout" | "poll_failed" | "poll_aborted"
11
16
  /** Uninstall reached a terminal state but it was `FailedUninstall`. */
12
- | "uninstall_failed";
13
- export interface UninstallDeploymentOptions {
17
+ | "uninstall_failed"
18
+ /**
19
+ * Refused for a cause only `--force` gets past: uncompleted jobs, or the
20
+ * permanent deletion of installed resources replaced by links.
21
+ */
22
+ | "uninstall_confirmation_required";
23
+ export interface UninstallDeploymentOptions extends Pick<FeedSelectionFlags, "personalWorkspace" | "feed"> {
14
24
  /**
15
25
  * Override the active tenant for auth resolution. The CLI's deprecated
16
26
  * `--tenant` flag flows through here; library callers usually omit it.
@@ -30,6 +40,12 @@ export interface UninstallDeploymentOptions {
30
40
  loginValidity?: number;
31
41
  /** Host-side cancellation for the poll loop; replaces `processContext.pollSignal`. */
32
42
  signal?: AbortSignal;
43
+ /**
44
+ * Send `forceUninstall`: uninstall past uncompleted jobs and the
45
+ * permanent deletion of resources replaced by links. The caller's consent;
46
+ * never set on the caller's behalf.
47
+ */
48
+ force?: boolean;
33
49
  }
34
50
  export interface UninstallDeploymentSuccess {
35
51
  ok: true;
@@ -55,6 +71,8 @@ export interface UninstallDeploymentFailure {
55
71
  */
56
72
  errorCode?: CliErrorCode;
57
73
  retry?: RetryHint;
74
+ /** Structured facts for the failure envelope's `Data`, keys as printed. */
75
+ data?: Record<string, unknown>;
58
76
  }
59
77
  export type UninstallDeploymentResult = UninstallDeploymentSuccess | UninstallDeploymentFailure;
60
78
  /**
@@ -1,6 +1,7 @@
1
1
  import type { CliErrorCode, PollFailureReason, RetryHint } from "@uipath/common";
2
2
  import type { PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
3
3
  import { type PendingResource } from "./deployment-state";
4
+ import { type PermanentDeletionResource } from "./permanent-deletion-consent";
4
5
  export type UpgradeDeploymentFailureReason =
5
6
  /** Neither a deployment key nor a name+package pair was given, or both were. */
6
7
  "invalid_target" | "auth_failed"
@@ -51,7 +52,16 @@ export type UpgradeDeploymentFailureReason =
51
52
  * interrupted / aborted. Distinct from `install_timeout`: the deadline was
52
53
  * never reached, so a longer `--timeout` is not the fix.
53
54
  */
54
- | PollFailureReason;
55
+ | PollFailureReason
56
+ /**
57
+ * The server wants the permanent deletion of installed resources replaced
58
+ * by links confirmed (schedule error 4026), and `acknowledgePermanentDeletion`
59
+ * was not set, the resources could not be listed, or the re-run after
60
+ * acknowledging them was refused again. Nothing was installed.
61
+ */
62
+ | "permanent_deletion_confirmation_required"
63
+ /** Acknowledging a flagged resource failed; the upgrade was not re-run. */
64
+ | "acknowledge_failed";
55
65
  export interface UpgradeDeploymentOptions {
56
66
  /**
57
67
  * Key of the deployment to upgrade, as `deploy list` reports it. Resolved
@@ -105,6 +115,19 @@ export interface UpgradeDeploymentOptions {
105
115
  * the deployment by key.
106
116
  */
107
117
  discardDraft?: boolean;
118
+ /**
119
+ * Confirm that installed resources the new version replaces with a link
120
+ * are permanently deleted with their data. Without it an upgrade the
121
+ * server stops for that confirmation fails with
122
+ * `permanent_deletion_confirmation_required` and lists them; with it they
123
+ * are acknowledged and the identical install runs once more, inside the
124
+ * same `timeout`. Has no effect with `noWait`, which never sees the run end.
125
+ * Also lets through a pending draft of the requested version (or, with no
126
+ * version given, of its own) whose only open question is this
127
+ * confirmation: that draft is re-run instead of refused, so the links it
128
+ * carries are kept and acknowledged.
129
+ */
130
+ acknowledgePermanentDeletion?: boolean;
108
131
  /** Minimum minutes before token expiration to trigger a refresh. Default 10. */
109
132
  loginValidity?: number;
110
133
  /**
@@ -192,6 +215,11 @@ export interface UpgradeDeploymentSuccess {
192
215
  pendingResources?: PendingResource[];
193
216
  /** What is left before the new version runs; absent when it does. */
194
217
  nextSteps?: string[];
218
+ /**
219
+ * The installed resources acknowledged for permanent deletion before the
220
+ * install that succeeded (`kind 'name'`). Absent when none were.
221
+ */
222
+ permanentlyDeletedResources?: string[];
195
223
  }
196
224
  export interface UpgradeDeploymentFailure {
197
225
  ok: false;
@@ -208,6 +236,12 @@ export interface UpgradeDeploymentFailure {
208
236
  */
209
237
  errorCode?: CliErrorCode;
210
238
  retry?: RetryHint;
239
+ /** The refused run, on a permanent-deletion refusal. */
240
+ pipelineDeploymentId?: string;
241
+ /** The refused attempt's draft, on a permanent-deletion refusal. */
242
+ deploymentKey?: string;
243
+ /** What the server wants confirmed, on a permanent-deletion refusal. */
244
+ permanentDeletionResources?: PermanentDeletionResource[];
211
245
  }
212
246
  export type UpgradeDeploymentResult = UpgradeDeploymentSuccess | UpgradeDeploymentFailure;
213
247
  /**
@@ -1,6 +1,6 @@
1
1
  import type { DeploymentSearchItemDto2, InitOverrideFunction } from "@uipath/solution-sdk";
2
2
  import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
- import { type FeedKind } from "./feed-resolver";
3
+ import { type FeedKind, type FeedScope } from "./feed-resolver";
4
4
  import type { SkippedFeed } from "./incomplete-feed-sweep";
5
5
  /** A deployment and the feed header every call about it needs. */
6
6
  export interface DeploymentLocation {
@@ -46,17 +46,28 @@ export interface DeploymentLocationOptions {
46
46
  * the feed rather than to the tenant's history row.
47
47
  */
48
48
  includeUninstalled?: boolean;
49
+ /**
50
+ * The feed the caller named (`--feed` / `--personal-workspace`, or the
51
+ * feed a generated follow-up command carried forward). Only that feed is
52
+ * searched: no publish-locations listing, no sweep. A selection that names
53
+ * the tenant feed is still a selection and searches the tenant alone.
54
+ */
55
+ selectedFeed?: FeedScope;
49
56
  }
50
57
  /**
51
58
  * Locate a deployment and the feed it lives in.
52
59
  *
53
- * `uninstall` and `activate` take no feed flag, so they have to work this out
54
- * themselves: every Pipelines call about a deployment resolves against the
60
+ * Without a feed flag, `uninstall`, `activate` and `delete` have to work this
61
+ * out themselves: every Pipelines call about a deployment resolves against the
55
62
  * tenant feed unless it carries `X-UIPATH-FolderKey`, and a deployment created
56
63
  * by `deploy run --personal-workspace` or `--feed <folder-feed>` is invisible
57
64
  * to the tenant-scoped search, so an unscoped call is answered "not found".
58
65
  *
59
- * Tenant first — that is the default feed and the one most deployments live in,
66
+ * With `options.selectedFeed`, that feed alone is searched: the caller said
67
+ * where the deployment lives, so the sweep and its publish-locations call are
68
+ * skipped. A search that fails there is a sweep that skipped that feed.
69
+ *
70
+ * Otherwise tenant first — that is the default feed and the one most deployments live in,
60
71
  * so the common case costs one request. Only on a tenant miss does the sweep
61
72
  * run, and it is best-effort throughout: a feed whose search fails is skipped
62
73
  * rather than allowed to end the sweep, since the next feed may hold the
@@ -1,55 +1,7 @@
1
- import { type DeploymentActivationStatus, type DeploymentOperationStatus, type DeploymentSearchItemDto2, type InitOverrideFunction } from "@uipath/solution-sdk";
2
- import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
- export type DeploymentSearchSource = "pipelines" | "legacy-v3";
4
- /** One page of the deployment search, in the terms both routes understand. */
5
- export interface DeploymentSearchQuery {
6
- take: number;
7
- skip: number;
8
- /**
9
- * Exact name. Filtered by the server on the Pipelines route; a substring
10
- * term on the legacy one, so callers keep their exact match.
11
- */
12
- deploymentName?: string;
13
- packageName?: string;
14
- /** The row's parent folder by full path: exact, case-insensitive, subfolders excluded. */
15
- targetFolderName?: string;
16
- searchTerm?: string;
17
- orderByColumn?: string;
18
- orderByDirection?: "Ascending" | "Descending";
19
- operationStatuses?: DeploymentOperationStatus[];
20
- activationStatuses?: DeploymentActivationStatus[];
21
- }
22
- export interface DeploymentSearchPage {
23
- /** The filtered total; `undefined` when the server omits it. */
24
- count?: number;
25
- values: DeploymentSearchItemDto2[];
26
- /** Which route answered — for logs and tests, never for output. */
27
- source: DeploymentSearchSource;
28
- }
29
1
  /**
30
- * The server has only the legacy search, and that one reads user tokens only.
31
- * Thrown instead of making a request that can only answer 403, so a caller can
32
- * tell "cannot be read with this login" from an outage — the distinction the
33
- * application-session gates were written for.
2
+ * The deployment search lives in `@uipath/solution-sdk/deployments`: the
3
+ * Pipelines route first, the deprecated V3 route only on a server without it.
4
+ * Re-exported here so this package's callers, and the specs that mock this
5
+ * module, keep one local path to it.
34
6
  */
35
- export declare class DeploymentSearchNeedsUserSessionError extends Error {
36
- constructor();
37
- }
38
- /**
39
- * Whether an error from the Pipelines search means the server has no such
40
- * route (and the legacy search should answer), as opposed to a failure of
41
- * the route itself. Measured on a server without it: the POST falls onto
42
- * `GET deployments/{deploymentKey}` and answers **405** with no body; a path
43
- * matching nothing answers 404 with no body. A 404 with *any* body — an
44
- * `errorCode`, or a plain ProblemDetails — is the route answering, and must
45
- * reach the caller.
46
- */
47
- export declare function isMissingPipelinesSearchRoute(error: unknown): Promise<boolean>;
48
- /**
49
- * The one deployment search every command goes through: the Pipelines route
50
- * (SOL-7807), which reads application sessions too and filters an exact name
51
- * on the server; the deprecated `/api/v3/search/deployments` only on a server
52
- * without it. Rows come back as the solution-sdk's DTO either way — the
53
- * Pipelines row is a superset of it, so its extra fields are dropped.
54
- */
55
- export declare function searchDeploymentsPage(auth: SolutionAuthContext, query: DeploymentSearchQuery, scope?: InitOverrideFunction): Promise<DeploymentSearchPage>;
7
+ export { DeploymentSearchNeedsUserSessionError, searchDeploymentsPage, } from "@uipath/solution-sdk/deployments";
@@ -1,7 +1,62 @@
1
- import type { PipelineDeploymentResult, PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
1
+ import { type PipelineDeploymentResult, type PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
2
2
  import type { DeploymentOperationStatus, DeploymentSearchItemDto2, InitOverrideFunction } from "@uipath/solution-sdk";
3
3
  import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
4
4
  export { httpStatusOf } from "./http-status";
5
+ /** A deployment read by key: the fields the callers act on, from either route. */
6
+ export interface DeploymentByKey {
7
+ deploymentKey: string;
8
+ operationStatus: DeploymentOperationStatus;
9
+ installedRootFolderKey?: string | null;
10
+ /**
11
+ * Which route answered. `solutions` is the deprecated fallback, and it
12
+ * answers differently: the exact row asked for, never the current
13
+ * generation.
14
+ */
15
+ source: "pipelines" | "solutions";
16
+ }
17
+ export interface ReadDeploymentByKeyOptions {
18
+ /**
19
+ * The feed header for the deprecated Solutions fallback, which is
20
+ * feed-scoped. The Pipelines lookup spans every feed and is sent without it.
21
+ */
22
+ scope?: InitOverrideFunction;
23
+ /**
24
+ * Skip the Pipelines lookup: the caller has already seen it answer 404 and
25
+ * the Solutions read answer instead, so a poll does not pay a 404 on every
26
+ * interval.
27
+ */
28
+ solutionsOnly?: boolean;
29
+ }
30
+ /**
31
+ * Read a deployment by key once a caller holds one, instead of searching its
32
+ * name again.
33
+ *
34
+ * `GET /pipelines/deployments/by-key/{key}` goes first: S2S-capable, sent
35
+ * without a feed header (it spans every feed in the tenant), and one indexed
36
+ * read where a search is a filtered scan. It answers a superseded key with
37
+ * the deployment's *current* generation, so a caller that needs this exact
38
+ * row compares `deploymentKey` itself.
39
+ *
40
+ * On a 404 from it (a server without the route, or a key it does not know;
41
+ * not told apart, the same rule as `deploy status` and `deploy upgrade`), a
42
+ * user session falls back to the **deprecated** Solutions read
43
+ * ({@link readDeploymentByKeyViaSolutionsAsync}). An application session gets
44
+ * `undefined`. `undefined` from either route means the caller falls back to
45
+ * the search. Any other failure throws.
46
+ */
47
+ export declare function readDeploymentByKeyAsync(auth: SolutionAuthContext, deploymentKey: string, options?: ReadDeploymentByKeyOptions): Promise<DeploymentByKey | undefined>;
48
+ /**
49
+ * @deprecated Fallback for servers without
50
+ * `GET /pipelines/deployments/by-key/{key}`. Remove it once that lookup is on
51
+ * every production ring, together with the `deploy status` / `deploy upgrade`
52
+ * fallbacks to the same route (see the package CLAUDE.md).
53
+ *
54
+ * `GET /api/deployments/{key}` (Automation Solutions): user tokens only, so
55
+ * never on an S2S path (SOL-7805). It is feed-scoped (it needs the feed's
56
+ * header), and it returns the exact row asked for rather than the current
57
+ * generation. A 404 is `undefined`; any other failure throws.
58
+ */
59
+ export declare function readDeploymentByKeyViaSolutionsAsync(auth: SolutionAuthContext, deploymentKey: string, scope?: InitOverrideFunction): Promise<DeploymentByKey | undefined>;
5
60
  /**
6
61
  * Look up a deployment by name in the persistent search/list service.
7
62
  * Returns the deployment's **current generation** — every upgrade and
@@ -37,7 +92,7 @@ export declare function isCompletedUninstall(row: Pick<DeploymentSearchItemDto2,
37
92
  *
38
93
  * `packageName` is the server-side filter, which keeps the result set small;
39
94
  * on the deprecated V3 route it also travels as the substring `searchTerm`
40
- * (see `toLegacyV3Request`), so the lookup still works if that server ignores
95
+ * (see the V3 request mapping in `@uipath/solution-sdk/deployments`), so the lookup still works if that server ignores
41
96
  * `packageName`. The client-side `===` check is what makes the answer exact
42
97
  * either way.
43
98
  *
@@ -245,7 +300,7 @@ export declare function deploymentToTerminalPipelineResult(deployment: Deploymen
245
300
  * whether the deployment really landed on the requested name, so callers can
246
301
  * say so when it did not.
247
302
  */
248
- export declare function resolveInstalledFolder(deployment: DeploymentSearchItemDto2 | undefined, requested: {
303
+ export declare function resolveInstalledFolder(deployment: Pick<DeploymentSearchItemDto2, "installedRootFolderKey" | "installedRootFolderName" | "folderPath"> | undefined, requested: {
249
304
  folderName: string;
250
305
  folderPath: string;
251
306
  parentFolderPath?: string;
@@ -1,4 +1,6 @@
1
- import type { DeploymentsApi, InitOverrideFunction } from "@uipath/solution-sdk";
1
+ import { quoteForShell } from "@uipath/common";
2
+ import { PipelinesApi } from "@uipath/pipelines-sdk";
3
+ import { DeploymentsApi, type InitOverrideFunction } from "@uipath/solution-sdk";
2
4
  /**
3
5
  * A deployed resource the service flags `requiresConfiguration` — the reason a
4
6
  * deployment sits in `NeedsSetupToActivate` instead of running.
@@ -17,7 +19,46 @@ export interface PendingResource {
17
19
  * no error for the resource.
18
20
  */
19
21
  reason?: string;
22
+ /**
23
+ * The Orchestrator folders the resource lives in (`Shared/Sales`), from
24
+ * the Pipelines validation result. Absent when the reasons came from the
25
+ * Solutions routes, which do not carry them.
26
+ */
27
+ folderPaths?: string[];
28
+ }
29
+ /**
30
+ * The two clients {@link readPendingResourcesAsync} reads with: the Pipelines
31
+ * one first, which takes an external-app token, and the Solutions one as the
32
+ * fallback, which takes a user token only.
33
+ */
34
+ export interface PendingResourceApis {
35
+ pipelines: PipelinesApi;
36
+ deployments: DeploymentsApi;
20
37
  }
38
+ /** Both clients for a session. */
39
+ export declare function pendingResourceApis(auth: {
40
+ basePath: string;
41
+ accessToken: string;
42
+ }): PendingResourceApis;
43
+ /** The deployment whose pending resources are read. */
44
+ export interface PendingResourceTarget {
45
+ /** What the Pipelines route is addressed by: the name's newest record. */
46
+ name: string;
47
+ /** What the Solutions routes are addressed by. */
48
+ key: string;
49
+ }
50
+ /**
51
+ * The activation state the run record itself reports, or `undefined` when it
52
+ * reports none.
53
+ *
54
+ * `deploymentResult.activationStatus` arrived with SOL-7883 (s205); an older
55
+ * server leaves it out, and the callers then derive the state the way they
56
+ * did before. `None` is left out too: the server sends it for a record the
57
+ * activation check never covered, which says nothing about a landed install.
58
+ */
59
+ export declare function reportedActivationStatus(record: {
60
+ activationStatus?: string | null;
61
+ } | null | undefined): string | undefined;
21
62
  /** The fields the state helpers read. Both deployment DTOs carry them. */
22
63
  export interface DeploymentStateRecord {
23
64
  name: string;
@@ -27,33 +68,50 @@ export interface DeploymentStateRecord {
27
68
  packageVersion?: string | null;
28
69
  currentPackageVersion?: string | null;
29
70
  }
30
- /**
31
- * A deployment name as an argument in a suggested command, for the shells the
32
- * suggestion is pasted into. Single quotes only: neither PowerShell nor a
33
- * POSIX shell evaluates anything inside them, so a name carrying `$(…)` or a
34
- * backtick stays a name. Double quotes would not do — both shells expand
35
- * `$(…)` inside them. A name with an apostrophe uses the POSIX
36
- * close-and-reopen escape, `'\''`; PowerShell reads that as a parse error
37
- * rather than running anything, which is the acceptable failure for a name
38
- * that rare.
39
- */
40
- export declare function quoteForShell(name: string): string;
71
+ export { quoteForShell };
41
72
  /**
42
73
  * The resources a deployment still needs configured before it can be
43
- * activated.
74
+ * activated, and why.
44
75
  *
45
- * `GET /api/deployments/{key}/resources` is the one place the service says
46
- * *why* a deployment is not live: every row carries `requiresConfiguration`.
47
- * Ask with the deployment key alone. Its `folderKey` parameter is the
48
- * solution-internal folder, not the Orchestrator folder the deployment landed
49
- * in, and the wrong one is a 400 (measured 2026-09-23).
76
+ * The Pipelines validation result is read first: it takes an external-app
77
+ * token, names the folders, and is the activation check's own list of what
78
+ * blocks the deployment. A server before SOL-7883 (s205) does not have the
79
+ * route, and one with it answers 404 when no validation is held; then — and
80
+ * whenever it holds another action's validation — the Solutions routes
81
+ * answer, as before, for a user session.
50
82
  *
51
- * Best-effort: `undefined` when the read fails — or when the page cap cut the
52
- * listing short, because a partial list presented as "the pending resources"
53
- * would omit rows. Every caller is reporting a state that is already final,
54
- * so neither turns into a failed command; the callers say the read failed.
83
+ * Best-effort: `undefined` when neither could be read. Every caller is
84
+ * reporting a state that is already final, so a failed read never fails the
85
+ * command; the callers say it failed.
86
+ */
87
+ export declare function readPendingResourcesAsync(apis: PendingResourceApis, deployment: PendingResourceTarget, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
88
+ /**
89
+ * What the activation check left unresolved, from
90
+ * `GET /v1/pipelines/deployments/{name}/validation-result` with no action:
91
+ * the server answers with the validation the deployment holds and names it,
92
+ * and only an `Activate` one is the check that keeps a deployment from
93
+ * running. One entry per resource, its error-level texts joined into the
94
+ * reason. `undefined` when the route is missing (an older server), holds no
95
+ * validation, is still running, or holds another action's — the caller falls
96
+ * back. `undefined` as well for an error-level entry that names no resource
97
+ * (a `GeneralError`): it blocks the deployment, but is no resource to list,
98
+ * and an answer without it would claim the resources are the whole story.
99
+ *
100
+ * The route reads the name's newest record, not a key, and its answer names
101
+ * no key. It is this record's only while `deployment.key` is still the
102
+ * current one, so the Pipelines by-key lookup is read *after* the answer and
103
+ * the answer kept only when it resolves the key to itself; a key another
104
+ * operation superseded meanwhile, or a lookup that fails, falls back.
105
+ */
106
+ export declare function readActivationBlockersAsync(api: PipelinesApi, deployment: PendingResourceTarget, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
107
+ /**
108
+ * Whether `key` is still its deployment's current record. The lookup answers
109
+ * a superseded key with the current generation, so a different key back
110
+ * means another operation landed. Sent without a feed header, like every
111
+ * by-key read: it spans every feed. `init` may bound the read (a signal), so
112
+ * pass one without the feed scope.
55
113
  */
56
- export declare function readPendingResourcesAsync(api: DeploymentsApi, deploymentKey: string, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
114
+ export declare function isCurrentRecordAsync(api: PipelinesApi, key: string, init?: InitOverrideFunction): Promise<boolean>;
57
115
  /**
58
116
  * One line naming the resources and, when known, why each needs
59
117
  * configuration: `connection 'Outlook' (uipath-microsoft-outlook365): [CNS1072]
@@ -73,8 +131,10 @@ export declare function formatPendingResources(resources: PendingResource[]): st
73
131
  *
74
132
  * `pendingResources` is what {@link readPendingResourcesAsync} returned:
75
133
  * `undefined` when the read failed, which is said rather than hidden.
134
+ * `feedSelector` (`feedSelectorFlag`) goes on the commands the steps name, so
135
+ * they search the deployment's feed alone instead of sweeping every feed.
76
136
  */
77
- export declare function activationNextSteps(deployment: DeploymentStateRecord, pendingResources?: PendingResource[]): string[] | undefined;
137
+ export declare function activationNextSteps(deployment: DeploymentStateRecord, pendingResources?: PendingResource[], feedSelector?: string): string[] | undefined;
78
138
  /**
79
139
  * Append the deployment's own state to error instructions when that state is
80
140
  * the reason the command was refused — a pending draft, or an install that is
@@ -12,6 +12,11 @@ export declare const NO_SERVER_REASON = "the server reported no reason.";
12
12
  * about.
13
13
  */
14
14
  export declare const LOOKUP_TIMEOUT_MS = 15000;
15
+ /**
16
+ * The caller's scope override plus a deadline, and the caller's own abort
17
+ * signal when it has one, so Ctrl-C still ends the command here.
18
+ */
19
+ export declare function boundedScope(scope: InitOverrideFunction | undefined, signal: AbortSignal | undefined): InitOverrideFunction;
15
20
  /**
16
21
  * Ask the server why an install/upgrade failed. Deployment records carry a
17
22
  * status and no error field, so the validation result is the only place an
@@ -1,3 +1,4 @@
1
+ import { type ContributedBinding } from "@uipath/solution-sdk/resources";
1
2
  export interface EmitRuntimeDependenciesResult {
2
3
  processed: number;
3
4
  warnings: string[];
@@ -34,4 +35,4 @@ export interface EmitRuntimeDependenciesResult {
34
35
  * that doesn't have it set before save; that workaround can come out once
35
36
  * SOL-7012 lands (cleanup tracked under SOL-7013).
36
37
  */
37
- export declare function emitRuntimeDependenciesForProcesses(solutionDir: string): Promise<EmitRuntimeDependenciesResult>;
38
+ export declare function emitRuntimeDependenciesForProcesses(solutionDir: string, projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>): Promise<EmitRuntimeDependenciesResult>;
@@ -52,10 +52,12 @@ export interface FeedResolutionFailure {
52
52
  /**
53
53
  * Describe a {@link resolveFeedScope} that threw.
54
54
  *
55
- * An external app has no Personal Workspace, and the Orchestrator lookup
56
- * refuses it with a generated-client error that says nothing on its own
57
- * ("Response returned an error code"). So when an external app's lookup is
58
- * refused — the server answered with a 4xx — the failure names the cause.
55
+ * Both lookups answer an external app's refusal with a generated-client
56
+ * error that says nothing on its own ("Response returned an error code"). An
57
+ * external app has no Personal Workspace, and a `--feed` is checked against
58
+ * the Studio Web publish locations, which an app reads only with a
59
+ * `StudioWebS2S` grant. So when an external app's lookup is refused — the
60
+ * server answered with a 4xx — the failure names the cause.
59
61
  * Anything else keeps the error's own classification, for an external app
60
62
  * too: a 5xx, a timeout or a network failure is an outage that another
61
63
  * session would not fix, and must not read as `RetryWillNotFix`.
@@ -0,0 +1,47 @@
1
+ import { type CliErrorCode, type RetryHint } from "@uipath/common";
2
+ import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
+ import { type FeedScope } from "./feed-resolver";
4
+ /** The feed flags of a command that acts on one deployment by name. */
5
+ export interface FeedSelectionFlags {
6
+ /** `--personal-workspace`: the deployment lives in the caller's own PW. */
7
+ personalWorkspace?: boolean;
8
+ /** `--feed <name-or-key>`: the deployment lives in this feed. */
9
+ feed?: string;
10
+ tenant?: string;
11
+ loginValidity?: number;
12
+ envFilePath?: string;
13
+ }
14
+ export type FeedSelection =
15
+ /** `selectedFeed` undefined: no flag, so the caller sweeps the feeds. */
16
+ {
17
+ ok: true;
18
+ selectedFeed?: FeedScope;
19
+ } | {
20
+ ok: false;
21
+ reason: "feed_resolution_failed" | "feed_requires_user_session";
22
+ message: string;
23
+ instructions: string;
24
+ errorCode?: CliErrorCode;
25
+ retry?: RetryHint;
26
+ };
27
+ /**
28
+ * Turn `--personal-workspace` / `--feed` into the feed the deployment lookup
29
+ * reads, so `uninstall`, `activate` and `delete` search that feed alone
30
+ * instead of sweeping every feed (`findDeploymentAcrossFeeds`). The flags are
31
+ * what `feedSelectorFlag` prints into the follow-up commands other commands
32
+ * generate. `--personal-workspace` then costs one search: the workspace is
33
+ * resolved through Orchestrator, not the publish-locations listing. `--feed`
34
+ * costs one publish-locations call (`resolveFeedScope` validates every
35
+ * `--feed` value against the listing, so a raw key is never sent) and one
36
+ * search. Either way it is never a search per feed.
37
+ *
38
+ * These commands mutate, so a non-tenant feed fails **closed** on any session
39
+ * that is not shown to be a user's, like `deploy run`: the server ignores the
40
+ * feed header on client-credentials requests, and the request would act on a
41
+ * tenant deployment of the same name. A Personal Workspace is refused before
42
+ * it is resolved; a `--feed` after, and only when it is not the tenant feed.
43
+ * A flag naming the tenant feed is still a selection: the tenant alone.
44
+ *
45
+ * @param action what the command does, e.g. "Uninstalling a deployment"
46
+ */
47
+ export declare function resolveFeedSelectionAsync(auth: Pick<SolutionAuthContext, "accessToken" | "identity">, flags: FeedSelectionFlags, action: string): Promise<FeedSelection>;
@@ -1,9 +1,4 @@
1
- /**
2
- * The HTTP status an SDK error carries — from the `Response` a generated
3
- * client attaches, or from the error's own `status` — and `undefined` when it
4
- * carries none (a transport failure, a thrown string). Lets a caller tell the
5
- * one status that means "no such record" (404) from every other failure.
6
- */
7
- export declare function httpStatusOf(error: unknown): number | undefined;
1
+ import { httpStatusOf } from "@uipath/common";
2
+ export { httpStatusOf };
8
3
  /** A 401/403: the server refused this login, as opposed to failing. */
9
4
  export declare function isAuthRefusal(error: unknown): boolean;
@@ -34,6 +34,13 @@ export declare class PackCommandService {
34
34
  * Execute the pack command and return result (for programmatic usage and testing)
35
35
  */
36
36
  executeAsync(solutionPath: string, options: PackCommandOptions): Promise<ToolResult>;
37
+ /**
38
+ * `--project`: pack one project of the solution on its own, as a
39
+ * stand-alone project packs (see `pack-project.ts`). Nothing solution-wide
40
+ * runs — no resource sync, no runtime-dependency emit — so the solution
41
+ * folder is not prepared.
42
+ */
43
+ private packProjectAsync;
37
44
  /**
38
45
  * Copy a solution directory into a fresh temp workspace so a dry run can
39
46
  * mutate it freely. Returns `undefined` when no copy is needed (a real
@@ -74,6 +81,8 @@ export declare class PackCommandService {
74
81
  */
75
82
  private resolvePackageName;
76
83
  private createPackOptions;
84
+ /** The `project-packager` options for a `--project` pack of `project`. */
85
+ private createProjectPackOptions;
77
86
  }
78
87
  /**
79
88
  * The failure envelope for a pack the packager refused.